Commit Graph
34 Commits
Author SHA1 Message Date
waozi 4852066609 Resolve extensionless private imports to generated headers 2026-09-22 17:32:29 -03:00
waozi cd00fd1e6b Declare the tree, widget, and router ABI in a props module
include/ui_tree.h — the umbrella header — is deleted. runtime/tree_props.kry
carries the public ABI: NodeId, the opaque TreeNode, the AccessibilitySink
callback, the RowProps/FlowProps aliases, and Event (whose union now passes
through as a one-line #type) alongside EventKind and Invalidation as one-line
#type enums — #type declarations emit before the enum pass, so records that
reference them must be #types too. ROUTER_NO_ROUTE becomes a Kry constant, and
the tree lifecycle, node queries, accessibility queue, every widget entry
point, the router, and the layout nodes are "#extern #export" declarations.

k2c's instrumented-module emission hard-coded #include "ui_tree.h" (the fourth
such coupling); it now emits the props header. The canonical surface doc test
reads the generated header, and its doc reference follows.

Gates: generated-runtime-parity-test, fast-test (incl. canonical-surface),
k2c/k2cpp/k2go-syntax-test, go-runtime-test, examples-syntax-test,
kryon-boundary-check, public-api-names-check, and the refreshed public-API
snapshot pass.
2026-09-21 02:39:32 -03:00
waozi e2629fae38 Declare the inspector host in its props header
Move the eighteen inspector calls, including PushInspectTransform's Camera2D
(which kryon_compat already supplies), into runtime/inspect_props.kry as
"#extern #export" declarations, so the tracked props header carries the public
ABI and include/ui_inspect.h is deleted. k2c and k2cpp now emit
"#include "ui_inspect_props.generated.h"" for instrumented modules instead of
the handwritten header, and the syntax tests assert the new include.

widget-instance-test fails identically before this change and stays outside
the standard gates.

Gates: generated-runtime-parity-test, fast-test, k2c/k2cpp/k2go-syntax-test,
go-runtime-test, examples-syntax-test, and the refreshed public-API snapshot
pass.
2026-09-21 01:07:38 -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 5af50d6915 Rename classic style pack 2026-09-18 23:58:58 -03:00
waozi da7ad7291b Generate declarative selector parsing from shared Kryon source 2026-09-18 13:28:24 -03:00
waozi 69f162fd7b Include array bounds support in standalone generated modules 2026-09-15 18:24:37 -03:00
waozi 1de818c36a Rename remaining lowered widget scopes 2026-09-13 17:01:40 -03:00
waozi 7a9e906fa6 Rename disabled lowering scopes 2026-09-13 16:58:49 -03:00
waozi 1b5978cf5e Rename popup lowering scopes 2026-09-13 16:55:47 -03:00
waozi 67bee3de38 Register Kry style imports in generated apps 2026-09-13 06:49:48 -03:00
waozi f9ec974863 Remove text color prop 2026-09-13 05:54:54 -03:00
waozi 55695cdb5b Remove text font prop 2026-09-13 05:45:24 -03:00
waozi 172c049467 Move text area line gap to KSS 2026-09-13 05:27:25 -03:00
waozi 24588a1679 Move text input and tab styling to KSS 2026-09-13 04:35:48 -03:00
waozi 567be704ef Move tab bar font styling to KSS 2026-09-13 04:27:01 -03:00
waozi f0df72fc02 Clean button and numeric widget surface 2026-09-13 04:12:07 -03:00
waozi c408db8e7b Hide popup close from public widget API 2026-09-12 21:49:27 -03:00
waozi e2d85c6b53 Clean up canonical widget surface 2026-09-12 18:43:05 -03:00
waozi 502013dd0a Canonicalize Kryon widget surface 2026-09-12 10:38:55 -03:00
waozi 968e19a176 Clean icon type names 2026-09-12 00:16:41 -03:00
waozi 066d569b84 Remove legacy Combo surface 2026-09-11 23:34:27 -03:00
waozi d863d812de Canonicalize Kryon widget surface 2026-09-11 23:20:54 -03:00
waozi 806ee498d9 Match navigation dock icon styling 2026-09-11 01:00:23 -03:00
waozi c5c36a846d Promote NavigationBar widget API 2026-09-11 00:38:28 -03:00
waozi a0852111e2 Define shared Kryon widget styling and Magnetic Lightfield defaults 2026-09-09 18:14:42 -03:00
waozi 231ff599ec Implement declarative themeable buttons 2026-09-08 16:22:39 -03:00
waozi 29adf8c05a Rename UI scaler API 2026-09-07 12:29:41 -03:00
waozi 0970d8f783 Unify native text and composed popup widgets 2026-09-06 11:36:36 -03:00
waozi 365cdd7c22 Complete native widget catalog and runtime interaction parity 2026-09-05 19:08:02 -03:00
waozi 79b57569c9 Emit portable scalar operations from shared KIR and remove cgo 2026-09-05 10:33:14 -03:00
waozi 127f6d7d1d build: honor declared app theme source and mode 2026-09-04 21:04:13 -03:00
waozi b24fde792f Add k2cpp backend with full k2c parity
.kry -> C++ compiler sharing the Kir frontend with k2c. Emits .cpp/.hpp
per module calling the C Kryon runtime through extern "C" declarations,
plus kryon_project.h/.c (still plain C) and the --plan9 and --include-dir
options ported from k2c. Inferred declarations emit 'auto' instead of
__auto_type so g++ accepts the output. Wired into the Makefile, tools
package, conformance matrix, feature matrix, and a k2cpp syntax test.
2026-09-03 13:39:37 -03:00