Commit Graph
223 Commits
Author SHA1 Message Date
waozi ff07bddbec Simplify hello world and package widget APIs 2026-11-13 04:29:23 -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 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 b570cf3d06 Add multi-select grids and native desktop integration 2026-11-07 23:08:18 -03:00
waozi 34d0ce4ed4 Play Ogg Opus on Windows and ship libopus in renderer artifacts
The native provider now decodes Ogg Opus through the audio package on
Windows too (audio f5eed1e). MinGW hosts link -lopus -lssp -lm, since the
package's libopus keeps its stack protector. The renderer-raylib artifact
builds the package's static libopus for Linux, Windows and Android, so
artifact consumers that use media_audio_raylib link without a system copy.

The Windows artifact sets CMAKE_SYSTEM_PROCESSOR, which dav1d's cross build
now requires, and the artifact test pins Kryon's locked toolchain. The Opus
test gains --windows: a MinGW cross build run under a private Wine prefix.
2026-11-06 20:58:14 -03:00
waozi 34e552dcab Play Ogg Opus through the native MediaAudio provider
The Raylib provider now chooses its decoder by content: an Ogg page whose
first packet is OpusHead decodes through the audio package on Linux and
Android, streamed in two 2048-frame blocks refilled by Status and the owner
tick. Other bytes, including Vorbis Ogg, stay on Raylib; macOS and Windows
return Unsupported for Ogg Opus and the browser keeps decoding it itself.

Play starts the stream before filling it, since PlayAudioStream discards
queued blocks. Linux links -lopus -lm, and the Android build compiles the
package's static opus target. The Opus tests now run the production
provider, including on an Android device with null audio.
2026-11-06 20:19:58 -03:00
waozi cc171806f7 Decode native AVIF with dav1d's runtime-dispatched assembly
dav1d is the default engine in every native artifact and CMake consumer, with
libaom kept as the explicit oracle. Large frames use up to four threads.
Strict parity, cross-target, Android, browser-capability and benchmark
suites cover each target.
2026-11-05 19:17:12 -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 1787e1b09a Add opt-in SDL3 GPU renderer and pinned SDK tests 2026-11-02 12:41:25 -03:00
waozi 9886717e6b Use lossless WebP for bundled UI and profile icon sheets 2026-11-02 11:07:38 -03:00
waozi 7dc6290238 Add persistent local reminders and edition-scoped push 2026-11-02 04:03:39 -03:00
waozi e31434063c Decode WebP images on every host
Lossy, lossless and transparent WebP files, and the first frame of
animated ones, load through the existing image paths: raylib and Android
link Kryon's kryonwebp archive built from the locked libwebp source, the
Cairo desktop host opens the system libwebpdemux, and web hosts use the
browser's decoder. Files are recognized by content, not extension.

Fixtures cover each kind on the raylib, Cairo and browser paths, the
renderer artifact ships libkryonwebp.a, and android-webp-link-test links
the decoder for every Android ABI.
2026-11-01 23:03:37 -03:00
waozi cb98ea3565 Link dependency-owned support artifacts in native project profiles 2026-10-30 23:20:27 -03:00
waozi 1bc32aea89 Share renderer artifact metadata consumption with build tools 2026-10-30 22:59:31 -03:00
waozi b593f9cf00 Provide dependency-owned renderer artifacts and support resources 2026-10-30 20:31:19 -03:00
waozi cdf4dffb07 Add owned per-frame input snapshots for native and hosted apps 2026-10-30 19:47:02 -03:00
waozi 7217475dfa Keep Google libraries in the Google Play edition
Play Billing moves from the app template's build.gradle into
templates/android-gplay.gradle, which only -Papp.edition=gplay applies from
the Kryon checkout; the scaffold no longer copies src/gplay into apps. The
normal and F-Droid editions' build files and APKs then name no Google
library, and F-Droid's scanner finds no usual suspect.

scripts/check-google-free.py (and the google-free action for app CI)
fails when a normal or F-Droid APK holds Google library code, manifest
entries or library markers, or when a Gradle file declares one outside the
gplay edition; --expect-google proves it still finds Play Billing in a
-gplay package.
2026-10-29 16:02:09 -03:00
waozi 2839954d91 Host overlays and explicit tree scopes 2026-10-29 00:31:46 -03:00
waozi 5427f011d2 Clip images to retained polygons across rendering hosts 2026-10-28 17:02:27 -03:00
waozi 1201ec2f3f Name the Android CMake project without spaces
An application named "Jungle Academy" made CMake look for a language
called Academy.
2026-10-26 02:41:17 -03:00
waozi fade061f2e Bundles draw sliders and progress bars through their host
Inner Breeze's practice manuals and settings move into the Practices
package, and they change speeds and durations with sliders and show a hold
with a progress bar. Slider, DiscreteSlider and Progress are now hosted:
the host drags the slider with its own pointer and answers the value, and
paints the progress bar.
2026-10-24 21:10:50 -03:00
waozi 8e2d0bc46b Bundles draw lines, circles, rings and triangles through their host
A portable bundle could draw boxes and icons but no line at an angle, so a
chart's trend lines and dots needed compiled screens. Kryon's shapes are now
hosted like Box: the bundle sends their props and the host fills them with
its renderer's RasterTriangles, which every Kryon renderer provides. The
widget host test stubs that rasterizer, as it draws nothing.
2026-10-24 20:24:00 -03:00
waozi 235f28cda2 Bundles frame form sections and size toggles through their host
A portable form could not draw a fieldset around its sections or place a
toggle at a row's end, because both needed the host's style and font
metrics. Fieldset is now hosted like Box, and the new toggle_measure module
answers the size a toggle needs, from its host as ToggleSize. The host
encodes the answer with the Vector2 encoder, now part of the widget codec.
2026-10-24 20:00:33 -03:00
waozi 2da3b99f87 Bundles draw segmented controls through their host
A portable bundle could not show a row of choices such as Habits' week and
calendar views, so Inner Breeze drew them in compiled screens. Segmented
controls are now hosted like tab bars: the bundle sends its props and up to
32 options and the host draws them with its own widget and style.
2026-10-24 19:27:27 -03:00
waozi 65381f3c1e Share hosted slice validation and scalar field construction 2026-10-24 03:03:21 -03:00
waozi cb637eabcd Use ZX portable executables throughout players and project tools 2026-10-23 18:55:42 -03:00
waozi 689a953ca1 Generate deferred widget codecs in consuming modules
Reuse imported storage and discover supplied operations before generating missing codecs from schema metadata. Preserve complete-provider output and exercise partial providers across source and saved native targets. Regenerate the library against the current widget property records.
2026-10-23 18:49:12 -03:00
waozi 00fe5e1130 Share hosted record field decoding and validation 2026-10-23 15:09:13 -03:00
waozi 018e94781b Expose session-scoped pointer samples to hosted apps 2026-10-21 21:55:06 -03:00
waozi 10be25fd4d Support the shared Dropdown widget in hosted app packages 2026-10-20 19:41:26 -03:00
waozi 806fcd20e1 Mark unused codecs in generated widget decoders
A record of scalars and strings decodes without its codec, and hosts that
build Kryon with -Wextra -Werror stopped at the unused parameter.
2026-10-19 19:46:14 -03:00
waozi 909760ace8 Draw a hosted game's TileMap in one host call
A hosted game's board was one host call per cell: Pushy's 240 tiles
were the larger part of its frame on a phone. TileMap now hands the
whole map to the host as one call, which draws it with the native
TileMap. Each picture a cell shows passes the asset policy once, as
each cell's Image did, and the paint is the same: a test compares it
with a direct TileMap. Maps with more than 1024 cells, pictures or
names are still drawn cell by cell. The codec generator now encodes
slices of plain values such as []string and []s32.
2026-10-19 16:15:57 -03:00
waozi ca749f72a5 Let portable apps draw a vector icon on its own with SvgIcon
A symbol beside a name or a coin beside an amount had no hosted widget:
only buttons carried icons. SvgIcon paints a Shape in the caller's color,
and bundles submit it to their host like the other widgets.
2026-10-19 16:05:44 -03:00
waozi 4e5934c774 Generate gallery export aliases for module configuration checks
The check relied on aliases left behind by a full site build, so it failed
in CI where only the gallery is built.
2026-10-18 19:54:28 -03:00
waozi 4e1afda0b9 Expose canonical context menus to hosted apps 2026-10-18 18:02:28 -03:00
waozi f4f7320864 Render portable ZIB apps on native, web and Android hosts 2026-10-18 16:51:54 -03:00
waozi e450f7bd83 Expose action dialogs to portable apps through the widget host 2026-10-18 15:50:50 -03:00
waozi 255451f330 Reuse preview runtimes and compiled source; complete social cards 2026-10-18 15:08:50 -03:00
waozi 5d82cf3758 Integrate source editing and module categories into the widget gallery 2026-10-18 14:36:05 -03:00
waozi 565e31f3ff Build a shared desktop and web widget gallery for Kryon Labs 2026-10-18 11:38:38 -03:00
waozi cca56b47eb Let portable apps open dialogs with ModalFrame
A bundle could draw text, buttons, scrolls and tab bars through its host,
but no dialog, so an app had to fill a whole page instead. ModalFrame is
now a hosted widget: its props and result cross with generated codecs,
its action images pass the host's asset policy, and its open panel is a
scope the bundle Ends, counted with scrolls toward the host's limit.
2026-10-16 02:21:29 -03:00
waozi 01a3ac262a Keep image codecs small: the Image effect decodes a mesh's points itself
Every ImageProps codec held room for 256 mesh points with a codec each,
about 74 KB, and buttons, title bars and every dropdown option embed one,
so hosted widget codecs grew by megabytes. The points now have no room in
the codec: a bundle still sends them, the Image effect validates and
decodes them into one host buffer (up to IMAGE_MESH_POINT_LIMIT), and an
image codec is back to about 2.7 KB.
2026-10-14 20:38:17 -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 b648eee8c7 Let title bars keep room for controls and draw in portable apps
A TitleBar's trailing_width reserves room at its right for the caller's
own controls, such as an online switch, and the result's trailing_bounds
says where to draw them; the title stays centred clear of them, or takes
what is left on a narrow bar. Portable bundles can now draw a TitleBar
through the widget host, with its leading image and dropdown options
held to the host's asset policy.
2026-10-13 17:35:52 -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 9af484664e Let portable apps draw a Spinbox through the widget host
Hosted bundles can now step numbers with the standard Spinbox. The
regenerated codec also carries TextField's numeric flag, which was
missing from the hosted boundary.
2026-10-12 23:53:19 -03:00
waozi 7870801388 Let bundles use Press through the widget host
A bundle built with KRYON_HOSTED_UI now calls PressHostedHost, and the
widget host draws the press area in the host's frame and returns its press
state, so a hosted app such as Lumi can select messages by holding and
dragging. The generated codec gains PressProps and PressResult.
2026-10-11 00:27:32 -03:00
waozi 63d65c502a Write file imports in generated codecs as #import, file
An application's codec imports its own record files; the generator wrote
them with a space before the comma.
2026-10-11 00:20:25 -03:00
waozi 53ea0fdb87 Host the widgets of a bundle that runs inside another application
An application that runs a .zib inside its own window answered each
widget's HostedHost call with its own codec and dispatcher. Kryon now owns
that host side next to the bundle side: widget_host draws a bundle's widgets
in the frame's session, refuses calls from another frame, foreign records,
texture handles and assets its host's callback rejects, and closes scrolls
the bundle leaves open. WidgetHostSupports lists the calls it answers,
including Toggle.

widget_codec is generated from Kryon's widget records by
scripts/generate-widget-codecs.py, whose --uses option lets an application
generate codecs for its own records on top of Kryon's. hosted_values holds
the shared helpers: fields match by name, so a bundle and its host may be
built against different layouts.
2026-10-11 00:04:50 -03:00