Repository navigation
Canvas 1.3.0
Tweakable props system
Pages can now declare expressive, host-rendered tweak controls, and hosts can render, live-apply, and persist them natively.
New
TweaksBridge— injects adc_set_propsruntime into the page at document start. Pages declare props (slider,select,color,toggle,text), read current values viathis.props, and re-render throughdc_on_props_changed. Declared schemas post to native with key order preserved; native pushes values back viasetProp.TweakProp/TweakPropValue— value models for declared props.TweaksState—@Observablemodel holding the current page's schema.TweaksPanelView— popover-ready panel: "Describe a tweak…" field, an Ideas action, and one native SwiftUI control per declared prop.TweaksPromptBuilder— agent prompts (ideas + custom instruction) with the props contract appended so generated declarations stay machine-editable.TweakPropsSourceEditor— deterministic default-value rewriting in page source: comment/string-aware scanning, tolerant parsing (single quotes, bare keys), splice verified by re-parse. Non-scalar defaults degrade to live-only, never corrupting the file.
Changed
InspectableWebViewgains an optionalonTweakPropsChangecallback (defaulted — source compatible).
Tests
158 tests, including a live WKWebView integration test covering the full round trip (page declares → native receives; native setProp → page re-renders).
Full Changelog: 1.2.2...1.3.0