Commit Graph
237 Commits
Author SHA1 Message Date
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 9094c18f23 Add aligned and clipped strikethrough to Text props 2026-09-19 15:21:00 -03:00
waozi e9855aba42 Give sliders aligned headers, readable values and integrated step controls 2026-09-19 15:00:07 -03:00
waozi d8cc3a9fca Complete accessible list selection in native C and Go 2026-09-19 14:54:10 -03:00
waozi 265ff394ec Save native accessibility work and detailed completion goal
Work-in-progress snapshot of all current Kryon changes. Records the remaining native language, KSS migration and verification milestones. Includes nested accessibility trees and ongoing selection support, plus regenerated modal and toggle output.

Validation: 17 generated native parity fixtures passed before the newest concurrent selection edits. Latest accessibility build fails on missing generated selection constants; full preflight also fails on the existing website showcase boundary check. This snapshot is not a completed or fully validated implementation.
2026-09-19 14:29:12 -03:00
waozi e01d95c25a Cache active style cascades and avoid redundant scissor flushes 2026-09-19 14:26:08 -03:00
waozi 9ef3513fd8 Add Linux AT-SPI adapters for native C and Go windows 2026-09-19 14:06:53 -03:00
waozi 76d1d11180 Derive native theme roles from shared Kryon policy 2026-09-19 13:18:18 -03:00
waozi 9b8b6bbed5 Remove unused palette setter and cached colors 2026-09-19 13:07:44 -03:00
waozi 82aa62b3f8 Make glow preference control inward light as well as halos 2026-09-19 13:03:02 -03:00
waozi c7d48ae947 Preserve style materials when optional glow is disabled 2026-09-19 12:52:44 -03:00
waozi 63fd114911 Support native accessibility text value and selection requests 2026-09-19 12:45:29 -03:00
waozi 120c264351 Fix native text selection and X11 input composition 2026-09-19 12:42:11 -03:00
waozi edf2e5ab76 Deliver physical keyboard and focus events for Linux libdraw 2026-09-19 12:29:45 -03:00
waozi 4f966b56eb Render native Go image assets and reuse measured editor rows 2026-09-19 12:19:16 -03:00
waozi b1bd117add Route native accessibility focus and activation requests 2026-09-19 12:16:51 -03:00
waozi 0a5e82e6d3 Share native text rows and restore composed scope state 2026-09-19 12:04:32 -03:00
waozi f772ba1fe6 Align native accessibility snapshots and protect editor values 2026-09-19 11:59:29 -03:00
waozi 2a4d1961d3 Move popup ownership, focus traversal and Scroll scopes into Kry 2026-09-19 11:48:42 -03:00
waozi af4c0907eb Use Unicode grapheme boundaries for native text editing 2026-09-19 11:39:16 -03:00
waozi ae5d281687 Add shared flex spacing and cross-axis alignment 2026-09-19 11:34:02 -03:00
waozi be6550e3b9 Move composed popup lifecycle into Kry policy 2026-09-19 11:32:20 -03:00
waozi b00ed1a5be Add resilient live preview and executable native parity checks 2026-09-19 11:18:24 -03:00
waozi 7e4ac43ba6 Move read-only text reflow into Kry policy 2026-09-19 11:16:18 -03:00
waozi 5af50d6915 Rename classic style pack 2026-09-18 23:58:58 -03:00
waozi 0154a2f0a9 Clarify paused JavaScript target in docs 2026-09-18 23:25:30 -03:00
waozi 556ed7dbe6 Use shared KSS declarations for inline browser styles 2026-09-18 16:19:13 -03:00
waozi a41ad169e9 Share KSS declaration expansion across rules and keyframes 2026-09-18 16:05:30 -03:00
waozi e10e885f61 Move CSS property aliases and numeric unit policy into Kryon sources 2026-09-18 15:52:07 -03:00
waozi 7f13623156 Share KSS positional formula validation and CSS serialization 2026-09-18 15:39:58 -03:00
waozi c430658b34 Move structural and positional pseudo dispatch into shared Kryon policy 2026-09-18 14:53:58 -03:00
waozi d0df2b0a1b Share relative selector parsing and anchor has traversal in Kryon policy 2026-09-18 14:42:27 -03:00
waozi e2f93c547d Share selector chain traversal and backtrack ancestor and sibling alternatives 2026-09-18 14:26:48 -03:00
waozi ae59d26d05 Preserve repeated selector conditions and share identity matching 2026-09-18 14:13:14 -03:00
waozi 011b7f7f7a Preserve independent KSS selector groups with shared matching policy 2026-09-18 13:46:51 -03:00
waozi 16461b5bc6 Use shared KSS lexer for functional pseudo arguments 2026-09-18 13:37:52 -03:00
waozi da7ad7291b Generate declarative selector parsing from shared Kryon source 2026-09-18 13:28:24 -03:00
waozi 32d57370e7 Share selector state and structural rules in Kryon policy 2026-09-18 13:01:13 -03:00
waozi 3ce35bb3d1 Share KSS attribute and sibling-position predicates 2026-09-18 12:46:44 -03:00
waozi a51c90c73e Share cascade priorities and prevent layer score collisions 2026-09-18 12:31:17 -03:00
waozi 419476a1f1 Move CSS declaration semantics into shared KSS runtime 2026-09-18 12:19:18 -03:00
waozi 972bd5140a Share KSS environment policy and repair web verification gates 2026-09-18 11:58:54 -03:00
waozi 6b2d56d6cc Add SetStyleTheme and kryon-preview --theme for pack overlays
SetStyleTheme(light|dark|'') re-resolves every registered pack - built-in
embedded packs, source packs, and their declared variants - through the
shared parse environment's theme axis, preserving the active pack id so
frames repaint in place. The parser exports KssSetTheme beside
KssSetVariant, the C shim grows kss_parse_with_environment, built-ins
re-parse through ReapplyBuiltInStyleTheme, and kryon-preview --theme
applies it before --style so captures can combine any pack (including
'<pack>.<variant>') with either theme overlay. The pack-source test
covers overlay winner flips in both directions and active-pack
survival; every test linking the generated parser now links the
formatter module it references. Go and web keep theme selection at
parse time, with the Go registry's source-retaining counterpart
recorded as a follow-up.
2026-09-16 16:42:23 -03:00
waozi 990d650e81 Assert resolution parity from the shared matched fixture
The matched fixture now anchors the shared cascade across hosts: the C
suite resolves its rules through ResolveStyle and the Go suite through
the same generated resolver, asserting identical winners - the base
state including the dark-theme overlay winner, an imported token,
explicit zero with its presence bit, the contrast env axis field, the
pressed state, class matching, and an active variant rule plus overlay.
The web suite asserts the same winners through the CSS mapping. To make
variant rules win naturally, the fixture splits its glow declaration
into an overlay block before the rules that reference the token and a
rule block after the same-layer base Button, matching the documented
positional semantics now spelled out in the API notes.
2026-09-16 12:29:05 -03:00
waozi 800393ae80 Register declared KSS variants in the Go pack registry
The Go host mirrors the C flow: ParseStyleVariants reports a sheet's
'@variant' declarations with labels, ParseStyleSheetVariant parses with
one active, and RegisterStylePackSource registers each declaration as a
selectable '<pack>.<variant>' pack whose sheet re-resolves base and
variant rules together. The web layer keeps variant selection in the
parse environment since it has no pack registry. Documented in API.md;
end-to-end registration, activation, and resolution are covered by
TestStylePackDeclaredVariant.
2026-09-15 22:54:05 -03:00
waozi 36d6b19181 Add @variant pack options to the KSS grammar
'@variant name "Label" { token overlays and rules }' declares a
selectable pack option in the sheet itself, replacing the
color-substitution-only variant path as the home for treatments like
Lightfield's glow. The shared grammar records every declaration (name
and label) for host enumeration even when inactive; the parse
environment names the active variant (KssSetVariant in C and Go, the
environment's variant field on the web). An active variant contributes
rules in document order and applies token overlays at the variant
origin, above theme and environment and below scoped rules. As with
@theme and @env, overlays apply from their position onward.

RegisterStylePackSource registers each declared variant as a selectable
'<pack>.<variant>' pack carrying the declared label; activating it
re-parses the source with the variant active so base and variant rules
resolve together. The matched fixture grows a glow variant asserted in
C, Go, and web (enumeration, inactive skip, overlay precedence over the
dark theme, and rule ordering), and the pack-source test covers
registration, activation, and resolution end to end.
2026-09-15 22:35:57 -03:00
waozi 6dadfae89b Route the web KSS layer through the generated kry module
parseWebStyleSheet now runs runtime/kss_parser.kry in declarative mode: the shared grammar lexes rule selectors, declaration spans, and foreign blocks (@keyframes, @media, @supports, @container) and the web layer only maps them to CSS. Theme overlays, typed environment axes, imports with cycle and missing-source diagnostics, layer ordering, and file:line:column provenance now behave identically on the web, and the hand-written regex KSS parser is removed. Durations convert through exact decimal shifting and integer diagnostics printing avoids float division so C, Go, and JavaScript agree. Strict and CSS-superset web suites pass; the remaining k2js syntax failure is the pre-existing ruby text regression from 4d60fab5.
2026-09-15 18:38:13 -03:00
waozi e20ac9a273 Add cat turtle and moon avatars with stable icon catalog IDs 2026-09-15 18:20:49 -03:00
waozi 7bcd5d3905 Preserve visible opacity for surfaces without an explicit declaration 2026-09-15 15:44:44 -03:00
waozi 8467e21555 Remove Vanilla styling and keep Material as the default 2026-09-15 12:20:25 -03:00