Fix counter, add input binding, syntax highlighting, dark mode

- Fix increment button: custom action handler instead of no-op setState
- Toggle visibility on Show/Hide Details button via $cond
- Input uses $bindState + useBoundProp for two-way binding
- Add shiki syntax highlighting (catppuccin-latte/mocha dual theme)
- Dark mode via prefers-color-scheme with CSS variables
- Layout: Live UI left, JSX Source + JSON Output stacked right

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-02-28 00:56:59 +00:00
parent af85ad3b07
commit 968faac7f5
8 changed files with 250 additions and 85 deletions

View File

@@ -47,12 +47,7 @@ export const fullSpec = render(
<Card title="Watched Input">
<Input
placeholder="Type a country..."
on={{
change: {
action: "setState",
params: { statePath: "/country", value: { $event: "/value" } },
},
}}
value={{ $bindState: "/country" }}
/>
<Text
content={{ $state: "/country" }}