Commit Graph
178 Commits
Author SHA1 Message Date
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
waozi 214415b321 Add a first-class Android target as an installable APK
An android profile now builds a real Android application from the same
sources as the desktop: the kryon tool scaffolds a droid/ Gradle project
beside the application on the first build and assembles a debug APK with
the NDK. The canonical host (android_run) drives the session over
raylib's NativeActivity backend with the shared viewport policies; a
generated NativeActivity reports insets, cutouts, IME state, density,
dark mode and orientation through JNI natives written in Ziran, forwards
soft-keyboard text through the session-owned input queue, and an
unconsumed back key finishes the activity. Generation runs the whole Zi
graph through ziran ir --project so application module names may repeat
Kryon module names.
2026-10-08 03:18:27 -03:00
waozi cf2b4a5d66 Add an expand icon to the UI sheet
IconExpand (127) is the two-corner open-in-full glyph, drawn in the same
style as the navigation icons and placed in the next free ui.png cell so no
existing icon moves. The icon generator now keeps the IconType ids it writes,
instead of dropping them from ui.json.
2026-09-29 20:57:14 -03:00
waozi edc8e1207e Generate style pack modules with a Ziran tool and check them in make test
src/kss/style_pack_classic.zi embeds styles/kryon/classic.kss so apps can
install the pack without the file. It stays committed: apps import Kryon
as a package without running its Makefile. A Python script wrote it by
hand, and nothing noticed when the two drifted apart.

tools/style_pack_module.zi now writes it (`make style-packs`) with the same
chunks as before; only the header names the new tool. `make
style-pack-check`, part of `make test`, fails while a module differs from
its pack.
2026-09-29 17:06:36 -03:00
waozi 605855a1cd Follow the desktop theme: read the GTK palette and install the classic style in it
SystemTheme parses a GTK theme's @define-color palette; SystemThemeLinux finds
the configured theme (Xfce xfconf, GTK settings.ini, GTK_THEME); SystemStyle
installs the embedded classic pack with the palette's colors. This replaces the
system theme the legacy C runtime had.
2026-09-28 19:50:44 -03:00
waozi 3d8bbe4b74 Use the full-size profile glyph 2026-09-28 02:16:52 -03:00
waozi 7bf94d8bb4 Classify experimental hosts in the feature matrix 2026-09-27 17:12:55 -03:00
waozi acd3e6b2cb Finish the maintained-source inventory cleanup 2026-09-27 17:07:37 -03:00
waozi 467283bc40 Render links in current feature matrix 2026-09-27 10:38:44 -03:00
waozi a63545f44d Remove obsolete Kryon runtime and migration archives 2026-09-27 10:36:49 -03:00
waozi e10462dc0f Delete legacy header-based Kryon path 2026-09-24 01:06:16 -03:00
waozi 500b9b71b7 Move Kryon UI source into Ziran library layout 2026-09-22 23:34:43 -03:00
waozi 3b32e04878 Declare the icon host in its props module; the names extern moves to the generator
include/ui_icons.h is deleted. runtime/icon_sheet_props.kry declares IconSheet
as a one-line #type enum (#type records emit before the enum pass, so
IconAsset's field needs it that way), IconAsset as a #type record over the
script-generated IconType, and the two asset queries as externs.

The round-32 "extern-variable gap" closed differently than expected: the
ui_icon_names array is generated data from scripts/embed-icon-sheets.py, so
the script now also emits "extern const char *ui_icon_names[ICON_COUNT];" into
the ui_icon_types.h it already generates — the declaration lives with its
generator, sized to the count it owns. The generated asset table includes the
props header, and the Makefile rule drops the deleted header as a prerequisite.

Gates: generated-runtime-parity-test, fast-test, k2c/k2cpp/k2go-syntax-test,
go-runtime-test, examples-syntax-test, kryon-boundary-check, icon-policy-test,
and the refreshed public-API snapshot pass.
2026-09-21 03:37:20 -03:00
waozi e899a40b67 Declare the style-pack ABI in a props module
include/ui_style_sheet.h is deleted. runtime/style_pack_props.kry declares
STYLE_PACK_MAX as a Kry constant, StylePack — whose sheet field points at a
parsed StyleSheet owned by the loader — as a one-line "#type" record importing
the build-generated runtime/style_sheet.h and runtime/style.h headers, and the
twenty registration/resolution/picker calls as "#extern #export" declarations.
The Go host keeps its handwritten style_pack.go parallel (externs and #types
emit nothing in Go).

Makefile test dependencies, the C style-table generator's emitted include, the
KSS host ledger (the props header and the embedded runtime declarations are
now classified call sites), and twenty-four consumer files follow the header.

kss-parser-test and bridge-ledger-check fail identically on pristine master
(concurrent-session palette work) and are excluded; everything else passes:
generated-runtime-parity-test, fast-test, all syntax tests, go-runtime-test,
examples, boundary, style-pack/picker/release-table suites, kss-host-ledger,
and the refreshed public-API snapshot.
2026-09-21 03:28:48 -03:00
waozi 0a65540031 Migrate retained UI to .kry and fix the native C boundary
Move app shell, frame, locale, node, screen routes, theme state, and window
policy ownership into src/ui/*.kry, delete the replaced src/core owners, and
make generated public ABI the type source for capability and retained-node
records.

- runtime/capability_props.kry and runtime/node_props.kry generate the public
  capability and node type headers; handwritten headers keep only the C-only
  declarations (function-pointer typedefs, unions, host functions).
- k2c/k2cpp: terminate a same-line case body and map fixed-width casts
  (i32/i64/u8/f32/...) to their C types.
- locale.c matches the generated LocaleParseEntries argument order;
  locale_policy.kry keeps its return type on the signature line.
- ui_window.c renames the X11 dlopen shim symbols off the downstream app prefix.
- Refresh the canonical surface doc, public API snapshot, and test gates.

Verified: runtime parity (C+Go), k2c/k2cpp/k2go syntax, go runtime,
public-api-names, canonical-surface, kryon-boundary, public-api-snapshot,
laws, fast-test, smart-test.
2026-09-20 22:45:56 -03:00
waozi 4b7c4e84f0 Release v0.2.0: Kry UI runtime authored in .kry
Widget, layout, interaction, style, and UI-tree logic is now authored in
the Kry (.kry) UI language and compiled into the native C and Go runtimes,
replacing the hand-written C widget implementation. The remaining C is
platform and raster backends (X11 window, font rasterization, paint command
execution, surface/image caches, test helpers).

- Clipboard OSC52/paste callbacks are host-provided write functions instead
  of raw function-pointer typedefs, unblocking Go runtime generation.
- AccessibilityNode and Accelerator types are generated from .kry.
- Generated-runtime parity test passes for both C and Go.
2026-09-20 19:36:28 -03:00
waozi 2a209d2091 Add RenderTextGlyph and drop preview text paths
Carries the staged tree cleanup (preview canvas/host/io/layers, kry_settings,
helper scripts, probe examples) plus RenderTextGlyph: one-glyph atlas draw on
the active text font stack for fixed-cell surfaces such as terminal grids.
2026-09-20 17:50:53 -03:00
waozi 120390fbef Point t9 downstream checks at renamed checkout 2026-09-20 17:09:36 -03:00
waozi 9b8b6bbed5 Remove unused palette setter and cached colors 2026-09-19 13:07:44 -03:00
waozi 544a39acee Remove obsolete style branches and unrequested widget chrome 2026-09-19 12:53:30 -03:00
waozi 667a36f049 Bring the illustrated Kryon Labs design to every website page 2026-09-19 12:22:33 -03:00
waozi 16304d0601 Split native Go widget hosts into focused modules 2026-09-19 12:21:24 -03:00
waozi b00ed1a5be Add resilient live preview and executable native parity checks 2026-09-19 11:18:24 -03:00
waozi bf4b70469c Stabilize renderer smoke matrix 2026-09-19 10:56:08 -03:00
waozi 3d399cb4f7 Emit release style tables at build time 2026-09-19 01:53:21 -03:00
waozi 674f149938 Add native KSS source trace wrapper 2026-09-19 01:36:56 -03:00
waozi 56b095ca0e Add KSS host service ledger 2026-09-19 01:15:50 -03:00
waozi 7a8d14a339 Add style bridge ledger gate 2026-09-19 00:42:58 -03:00
waozi 5af50d6915 Rename classic style pack 2026-09-18 23:58:58 -03:00
waozi 58f06d67d3 Pause JavaScript web target 2026-09-18 23:09:02 -03:00
waozi 2da31db19e Generate browser policy modules during builds instead of tracking output 2026-09-18 16:33:54 -03:00
waozi f6a8177f60 Classify the remaining style-gate allowlist entries
Every ratchet entry in check-style-gates.py now states its class: the
src/ui/ui.c theme-catalog application is a legacy bridge whose removal
follows downstream migration off the pre-KSS theme API (tracked by the
legacy-removal plan), the src/ui/ui_tree.c app background is the
documented no-pack platform fallback, and the Go font/opacity and page
metric bases are caller-supplied content metrics under the metrics
contract. plan/style/04 records the status: no unclassified product
decoration remains in the allowlists.
2026-09-15 22:58:23 -03:00
waozi e20ac9a273 Add cat turtle and moon avatars with stable icon catalog IDs 2026-09-15 18:20:49 -03:00
waozi 8467e21555 Remove Vanilla styling and keep Material as the default 2026-09-15 12:20:25 -03:00
waozi 1e6b28acb4 Keep only unfinished work in the style plan 2026-09-15 10:09:18 -03:00
waozi 0a79e330dd Add style separation scanner gates 2026-09-14 16:21:44 -03:00
waozi a603fc44cf Fold glow into lightfield catalog 2026-09-14 10:46:15 -03:00
waozi 9a0db7f455 Rename UI icon sheet to core 2026-09-14 03:25:54 -03:00
waozi 3c8dceb8d5 Use prefixless built-in style pack names 2026-09-12 22:01:38 -03:00
waozi 540e9b47d1 Rename bottom nav internals to NavigationBar 2026-09-12 18:56:15 -03:00
waozi e2d85c6b53 Clean up canonical widget surface 2026-09-12 18:43:05 -03:00
waozi 00ad3075d8 Clean widget coverage and web metadata surface 2026-09-12 12:35:43 -03:00
waozi 8b6d506826 Clean icon helper names 2026-09-12 00:18:49 -03:00
waozi 968e19a176 Clean icon type names 2026-09-12 00:16:41 -03:00
waozi 7302c513ba Clean scroll helper names 2026-09-11 23:58:19 -03:00
waozi 18e8dca7f2 Rename LabelFrame to Fieldset 2026-09-11 23:45:52 -03:00