Commit Graph
240 Commits
Author SHA1 Message Date
waozi d00b148f21 Build with Ziran 0.5.0 and fix the raylib pixel test and example overrides
The toolchain moves from e813c847 to Ziran v0.5.0 (f9f92b46) in Kryon and
the box, gallery and image examples, locked with `ziran lock`. 0.5.0
builds on macOS again and its browser playground builds, which Kryon's
macOS job, site build and Pages preview need.

tests/android_frame_pixels_test.zi sizes its pbuffer surface through
raylib's CORE.Window record, whose overlay left android_surface.zi on
Nov 10; the test now declares the overlay it uses.

The pay-per-import test builds examples/button and examples/textfield as
applications of this checkout, so CI gives them the same overrides as box,
image and gallery.
2026-11-16 04:08:05 -03:00
waozi 2b7023eb8e Name the text size field in the chart and table examples 2026-11-15 20:44:30 -03:00
waoziandClaude Opus 5.5 277b31162f Build with the Ziran that lowers long-named host records, and test in-tree examples from this checkout
Ziran 93a54f08 kept only the first eight characters of a host import's
record type when lowering to ZX, so --project bundles of hosted widgets
(TileMapResult, ActionModalResult, BundleInput, ...) failed with "this
type has no portable lowered representation yet". Ziran 94355db4 keeps
whole names; the toolchain pin moves to e813c847, current master.

CI built examples/box, examples/image and examples/gallery from the
Kryon their locks pinned, not from the checkout under test: box and
image pinned an image-codec that their locked Kryon no longer declared,
and the gallery's Kryon lacked kryon/box. CI now gives these examples
the same overrides ziran.local.toml gives them locally, as the Pages
workflow already does, and their locks name current Kryon and the same
Ziran.

The notification host test reads std/file.zi from the Ziran its package
graph resolves rather than ZIRAN_ROOT, which CI checks out separately.
The secondary raylib window test links XTest, so the desktop hosts job
installs libxtst-dev. The renderer artifact test builds its consumer
apps with Kryon's Ziran pin: Ziran v0.4.2 cannot read Kryon's current
ziran.toml.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-15 19:01:52 -03:00
waozi ba0d3950d3 Let an empty window carry only the window, its events and presenting
Nothing is imported by default. App.Show(window) shows a window without
frames; examples/window.zi uses it and now compiles to 23 C files and
133 KB instead of 62 and 546 KB, with a 118 KB executable instead of 265 KB.

Hosts that run frames (App.Run(window, Draw) and the frame host
desktop_run) call TreeFrameUse() to register the widget tree's frame driver
(tree_frame, through frame_driver): input routing, begin and end of the
frame, cursor shapes, scrolling, gamepad navigation and the test driver's
hooks. The call, not an import, brings it: a module initializer in the tree
would have turned existing import cycles into fatal startup cycles and made
hostless test builds keep every program export.

Accessibility is split. The window keeps the AT-SPI connection and the
application object; widget roles, states and nodes live in
accessibility_tree_linux, which the same hosts register with
AccessibilityTreeUse().

The test driver is in a build only when KRYON_TEST_DRIVER is defined;
desktop_runtime then connects it through test_driver_frame (exported for
other native hosts), and a window started for a test without it stops and
says how to build it. App.Run passes the window's title straight to the
window. input_delivery, frame_input_provider and gamepad_navigation move to
src/ui, InputDeliveryTake to input_take. desktop_loop and test_driver_frame
are exported. The ZX player imports cursor_picture again, so its guests'
picture cursors decode.

make pay-per-import-test builds the window, hello, box and image examples
and checks which modules their generated C carries.
2026-11-15 16:17:07 -03:00
waoziandGLM 4daa24b78c Drop the CUI name from Kryon's style
Co-Authored-By: GLM <[email protected]>
2026-11-14 22:40:47 -03:00
waozi 7baf863221 Commit pending scene, input, export and asset work
- GPU scene renderer: moved, turned or scaled nodes re-send only their own
  triangles instead of rebuilding the scene; per-node matrices are reused;
  FreezeGeometry skips geometry comparisons; lights carry projected
  textures (LightCookie) in the CPU and GLES renderers.
- One ordered per-session key and text delivery path across Desktop,
  Canvas and Raylib.
- Context-menu rows show accelerator labels and checked state.
- Bundle apps keep extracted assets that already match instead of
  rewriting and syncing all of them on every open.
- Image and PDF export modules, hosted box tests, brand assets, plans,
  and the ZX changelog entry.
2026-11-14 16:27:22 -03:00
waozi 4757cb3e0b Build the time picker and image examples and the pixmap parity test again
The desktop hosts of the time picker and image examples import a shared demo
module beside them. Project builds only take modules from the package's roots
or a named module path, and examples/ cannot be one because window.zi shares
a name with a project module. The two demos move to examples/demo/, which
those rules name. The time picker demo also uses the current Text.Props size
field and imports time_picker_behavior for TimePickerText.

The pixmap parity test builds the image example as part of the project, since
it imports kryon/image, and passes every saved module when building from
saved IR. Naming only the entry left out the app module bound to the host's
ProjectFrame capability, so all four template cases failed.
2026-11-13 22:23:51 -03:00
waozi 718572978d Build kryon/app programs with the project tool and name the web target
A project whose entry module declares main, such as examples/window.zi, is a
program. The project tool now generates a host that only calls that main, so
kryon build gives a desktop executable or a Canvas page from the same file. A
portable zx profile needs a Frame entry and is refused with that reason.

Browser builds pass --target=c --target-os web --target-cpu wasm32 when they
save IR. The Canvas host is selected by OS == .WEB, and untargeted IR is
portable, so with only PLATFORM_WEB defined every canvas, DOM and raylib-web
project and the ZX canvas player failed on unresolved Canvas functions. The
frame-input and password Canvas tests name the target the same way.

Kryon's manifest names the desktop host's system libraries in [package]
links, so ziran build --project --target=c --exe links a program in this
checkout without caller LDLIBS. The examples Makefile drops its pkg-config
link flags and its own compile of the desktop examples.
2026-11-13 21:10:18 -03:00
waozi ff07bddbec Simplify hello world and package widget APIs 2026-11-13 04:29:23 -03:00
waozi 681fd26ddf Checkpoint desktop painter and context menu work
Committed at the owner's request while the work continues.

- Detect unchanged GTK painter surfaces by exact byte comparison, clear
  and copy them in bulk, and reuse resolved GTK style metrics and CSS
  layers within a style generation.
- Present desktop frames before publishing accessibility changes.
- Context menu widget, keyboard and canvas input updates with tests.
2026-11-12 20:12:14 -03:00
waozi 271113fda8 Open website pages at their extensionless URLs
Cloudflare Pages redirects widgets.html to /widgets, and the site only
recognised routes ending in .html, so every page on kryonlabs.com fell
back to the Overview. Match a route with or without the suffix, and make
the browser test server answer clean paths the same way the live host does.
2026-11-12 19:15:10 -03:00
waozi 2d80834675 Fix nested scroll drags and refresh the live website
- Keep scroll pointer, drag and momentum state per Session, so a preview's
  frame sampling cannot release the page's scrollbar thumb or content drag.
- Left-align component navigation, drop the Kryon prefix from core component
  labels, and syntax-highlight the usage, source and guide code areas.
- Replace the Apps text list with card images, public applications and GitHub
  links, and rename Shelf to Explorer.
2026-11-12 18:59:07 -03:00
waozi 3900c56a3d Regenerate the gallery lock 2026-11-12 01:26:04 -03:00
waozi 9383e95e57 Add the GPU scene renderer, hosted widget aggregates and component packages
Restructure maintained components into per-widget source folders, add the
portable scene GPU renderer with GLSL shaders, hosted widget aggregates,
GTK theming and multi-target clipboard support, rebuild the guide with
theming guidance, and move the toolchain to the Ziran revision without
module root limits so the eighty component roots resolve everywhere.
2026-11-12 00:12:06 -03:00
waozi e8c6aa25c1 Integrate components and the public UI surface 2026-11-10 15:37:48 +00:00
waozi 29721d3ab6 Lock Ziran dd799d38 and link the vec module into the hello example 2026-11-06 16:39:15 -03:00
waozi 4a1423d0f6 Resolve image packages in host tests and refresh the gallery's Kryon pin
The image codec integration left four CI gaps:
- The bitmap browser test hard-coded a Bun path; it now uses the
  configured JS_RUNTIME like the other browser tests, and starts from a
  clean work directory so stale IR cannot leak into its saved build.
- The gallery locked Kryon 20b38574, which has no Card widget for its
  card scene; it now locks f2bfeb40 and that commit's image packages.
- The raylib typeface, frame pixel and frame snapshot hosts resolve the
  webp, avif and image_codec packages through the project and link the
  WebP and AVIF archives they now use.
- The behavior suite builds the WebP archive the image job test links.
2026-11-05 21:10:39 -03:00
waozi 56af335572 Integrate Material widgets, image codecs and Kryon Labs website
Add Card elevation and consistent widget states, retained TextArea selection,
and rounded image rendering. Integrate published image-codec, WebP and AVIF
packages across native hosts and renderer artifacts with project-aware builds.

Modernize Kryon Labs around visual GUI apps and modules, with real previews,
honest availability, and rebuilt interactive editor and widget gallery assets.
Bound private browser test lifecycles and verify source, saved IR, native,
portable, browser, Windows and Android paths with the published compiler.
2026-11-05 11:12:10 -03:00
waozi 20b38574f2 Support rotated text and reuse scaled Cairo images 2026-11-04 02:59:58 -03:00
waozi 9886717e6b Use lossless WebP for bundled UI and profile icon sheets 2026-11-02 11:07:38 -03:00
waozi 98d3032352 Align site examples with the tested web toolchain 2026-11-02 04:32:28 -03:00
waozi e339381a2f Refresh site dependency graphs for current Kryon 2026-11-02 04:11:53 -03:00
waozi dd29b98ce4 Add a shared responsive loading screen for native and hosted apps 2026-10-27 22:56:44 -03:00
waozi 47963194ca Initialize local widget records directly 2026-10-23 23:22:27 -03:00
waozi fb011208c4 Construct single-use records at their return or call 2026-10-23 21:39:24 -03:00
waozi cb637eabcd Use ZX portable executables throughout players and project tools 2026-10-23 18:55:42 -03:00
waozi ab04f4db12 Repin packages to the rewritten history 2026-10-19 11:51:53 -03:00
waozi df5b0b07da Pin Ziran with package namespaces and the latest Kryon in the gallery 2026-10-18 23:25:03 -03:00
waozi 6492f540f5 Check the real TableView sample and pin the latest packages
The gallery check now expects TableView's data, notes and cell selection
instead of the former renderer gap. Kryon and the gallery pin the latest
Ziran, Kryon, Plot and DataViews.
2026-10-18 22:34:42 -03:00
waozi b268439a1b Pin the gallery to the portable ZIB renderer 2026-10-18 16:55:49 -03:00
waozi f4f7320864 Render portable ZIB apps on native, web and Android hosts 2026-10-18 16:51:54 -03:00
waozi 255451f330 Reuse preview runtimes and compiled source; complete social cards 2026-10-18 15:08:50 -03:00
waozi 4900a25b61 Pin and refresh the integrated gallery build 2026-10-18 14:39:32 -03:00
waozi 5d82cf3758 Integrate source editing and module categories into the widget gallery 2026-10-18 14:36:05 -03:00
waozi d1a58b234d Use Kryon standard colors in the widget gallery 2026-10-18 13:54:54 -03:00
waozi fefb366f74 Pin the gallery and editor to their shared Kryon implementation 2026-10-18 11:42:28 -03:00
waozi 565e31f3ff Build a shared desktop and web widget gallery for Kryon Labs 2026-10-18 11:38:38 -03:00
waozi b58e5cb3e3 Keep Kryon example outputs directly under build/examples 2026-10-18 11:03:43 -03:00
waozi 2595a062c7 Add interactive Ziran widget catalog example 2026-10-18 11:02:22 -03:00
waozi 197d21f2f8 Draw images warped over a grid of points
ImageProps.mesh holds a columns x rows grid of screen points; Image
stretches the picture across it, two textured triangles per cell, so a
painted limb can bend at its joint like a paper puppet. Mirrored grids
draw (nothing is culled), the bounds still clip, and fit, origin,
rotation and the style radius do not apply. A grid with too few points
draws nothing, and no placeholder covers its bounds.

The paint queue copies the points into per-session blocks when queued,
moves them with their node, and compares them in the retained snapshot,
so a moved vertex repaints and an unchanged grid reuses the frame.

RasterImageMesh draws the grid in every host: raylib (desktop and
Android) sends front-facing textured triangles in one batch, the web
canvas and Cairo draw each triangle through its affine transform under a
clip, the pixmap host and Plan 9 libdraw rasterize pixel centers with a
shared edge rule (bilinear when smooth), and the terminal shows a marker.
The bundle player, zib tool and frame replay bind it, and hosted bundles
send up to 256 points with a plain Image (a per-field slice bound in the
codec generator keeps every ImageProps codec small).

Tests: pixmap mesh test (C, C++, Go, bundles; copy, snapshot reuse,
mirror, bend, clip, seams), Cairo mesh test, RGBA canvas cases, web
canvas pixels and seam at three densities, hosted widget mesh, and a
raylib pixel test on a private Xvfb (make raylib-mesh-pixels-test).
2026-10-14 20:05:57 -03:00
waozi 2514568dd9 Add TimePicker for picking a time of day
TimePicker shows a time as 24-hour HH:MM, or a placeholder while no time
is chosen, and opens an hour and a minute column at the current value. A
tap, a finger drag or fling, or the mouse wheel picks and scrolls; Down
opens it, the arrow keys step a column and wrap within it, Left and Right
switch columns, and Enter or Escape closes it. Optional Now and Done
buttons set the current time and close the popup. The time changes as it
is picked, so closing never loses a choice, and the popup stays on screen,
opening above the field when there is no room below. The picker takes the
dropdown's look from every style, light or dark, and portable apps can draw
it through the widget host.

Dropdowns now follow Kryon's light and dark system palettes; a dark palette
left their field and menu light before.

`make -C examples time-picker` builds a window that shows the picker in
each of its states.
2026-10-13 14:38:03 -03:00
waozi 2e7c4e1e93 Take every queued event in each desktop poll
SDL_PollEvent stops at the marker its last pump left at the end of the
queue. When the host woke while another thread was still pushing input,
that marker landed between the pushes, so PollDesktop returned the key
and left the text and click for the next frame. CI's desktop wait test
failed this way. PollDesktop now pumps once and takes every queued event.
The test now covers a marker between two pushes, which fails without this
change.

The desktop examples link the libraries the desktop host now uses and
generate only what their main reaches, as projects do; they had stopped
linking.
2026-10-11 13:21:55 -03:00
waozi 5dfe1c6717 Describe Kryon as fully on Ziran in its docs and site
Build instructions install the ziran command and use the toolchain locked
in ziran.lock instead of a ../ziran sibling checkout. Downstream apps pick up
Kryon changes through ziran.lock. Terminal owns OSC 52 and bracketed paste.
The website no longer calls the migration underway, and its status page
lists the Android host, Zib desktop apps and opt-in DOM CSS layout.

The obsolete files (shell.nix, .ini themes, old site images, the duplicate
API redirect) were removed in 827eae3d, which picked up these staged
deletions.
2026-10-11 10:12:56 -03:00
waozi 84ba2f3045 Add the Liberation Mono pixmap font, Plan 9 text measure oracle and pixmap blend tests 2026-10-10 19:10:13 -03:00
waozi f00dbb2d4f Restore preview themes and fix the test toolchain harnesses 2026-10-01 13:39:56 -03:00
waozi b9ba4a864b Draw text in Kryon's font on every host
The desktop and libdraw hosts never chose a font, so Cairo drew text in the
system's default sans (Noto Sans here), while raylib and the browser hosts
used Kryon's Liberation Sans and the pixmap host bitmap glyphs. Text
differed in face, width, and line breaks from host to host.

- The Cairo hosts load assets/fonts/LiberationSans-Regular.ttf through
  FreeType (KRYON_FONT_PATH, which `kryon run` sets, else the system's
  copy, else fontconfig by name) and lay glyphs out at their unhinted widths
  with gray anti-aliasing, as a browser does.
- The pixmap host rasterizes Liberation Sans outlines itself: contours with
  implied on-curve points, quadratics flattened in 1/256 pixel, non-zero
  winding coverage from five sub-scanlines with exact spans, all integer.
  It places every glyph where Cairo does, and every Ziran target still
  prints the same bytes. tools/outline_font.zi, run as Python, extracts the
  outlines of 207 Latin glyphs (`make pixmap-font`); Terminus is gone.

libdraw finds plan9port without a fixed sibling path: the installed one
$PLAN9 names, or, when a project adds plan9port as a source package, one
Kryon builds once in its build directory; without either it says how to
add it. The kryon tool now builds its Ziran toolchain only when it is
missing, as ziran builds a pinned one, instead of remaking it on every run.
2026-09-30 15:30:25 -03:00
waozi a63545f44d Remove obsolete Kryon runtime and migration archives 2026-09-27 10:36:49 -03:00
waozi 923e2c092d Use Ziran standard math and vector modules directly 2026-09-27 01:08:11 -03:00
waozi ae9e21f9cc Repair desktop example imports and generated output cleanup 2026-09-27 00:36:28 -03:00
waozi 42d009a607 Add desktop project host and persistent terminal UI 2026-09-25 15:32:43 -03:00