v1.1.0rc8
Pre-release
Pre-release
·
365 commits
to main
since this release
Added
- Custom JS commands —
JS.ext.*opens the command set (ADR-025). The eleven built-in JS commands were a closed table; user code had no way to addscroll_to,clipboard_copy, or a wrapper around a third-party library action short of writing a fulldj-hook.window.djust.commands.register(name, fn)(client, CSP-safe, no eval) +JS.ext.<name>(...)(Python, fully dynamic, chainable with built-ins) close the gap. Ops serialize with anext.wire prefix, so custom names are structurally collision-proof against future built-ins, and built-ins keep their strict surface (JS.shwostill raisesAttributeErrorat mount;register('show', ...)throws). Unknown custom ops fail loud: DEBUG error overlay with a did-you-mean suggestion,console.errorin production. Custom implementations get the sameto/inner/closesttarget resolution as built-ins and may be async (awaited in chain order). Tests:python/djust/tests/test_js_ext_commands.py(wire-format pins per #1448) +tests/js/js_ext_commands.test.js(registry rules, dispatch, async ordering, real-DOM click integration); both gate-off verified. Bundle delta: 736 B gzipped. dj-hooktyped values, scoped targets, and shipped TypeScript declarations (ADR-025). Hooks previously got rawdatasetstrings and re-invented attribute parsing per hook.dj-hook-value-<kebab>attributes are now exposed asthis.values.<camelCase>with JSON-first coercion (arrays/objects/numbers/booleans just work; raw-string fallback; JSON-quote a literal string that looks like JSON). Reads are LIVE (a Proxy reads the element's current attribute, so post-morphupdated()sees fresh values with zero staleness machinery) and read-only in v1 (setthrowsTypeError). Descendants markeddj-hook-target="name"resolve viathis.target(name)/this.targets(name)(live subtree queries). Thedj-hook-value-*/dj-hook-targetprefixes avoid the event-paramdj-value-*and scoped-updatedj-targetnamespaces. The already-shippeddjust.d.tsgains the new surfaces (DjustHookContext.values/target()/targets(), plusdjust.commands.registerfrom theJS.extfeature), purely additive to its existing declarations and validated withtsc --strict. Tests:tests/js/hook_values_targets.test.js(coercion matrix, camelCase mapping, live re-read, read-only, target scoping), gate-off verified. Bundle delta: 250 B gzipped.- Five new built-in themes: Sakura, Obsidian, Dune, Mission Control, and Art Nouveau. Each ships the full theme contract — light + dark
ThemeTokens, aThemePreset, a completeDesignSystem(typography/layout/surface/icons/animation/interaction), and aThemePack— and registers through all three seams (THEME_PRESETS, theme packs, design systems), so they appear in the gallery and are selectable via the standarddjust_theme_presetcookie with zero configuration. Personalities: Sakura (Japanese spring — washi paper, blossom pink, matcha; serif elegance, light-default), Obsidian (volcanic glass — near-black gloss, magma orange, ember gold; glow interactions, dark-default), Dune (desert expanse — warm sand, terracotta, oasis teal; airy layout, light-default), Mission Control (retro aerospace console — deep-space navy, telemetry amber, signal green; mono headings, sharp corners, instant transitions, dark-default), and Art Nouveau (Mucha elegance — cream parchment, sage gold, deep plum; serif body, pill buttons, unhurried easing, light-default). Every load-bearing text pair (fg/bg, card, primary, destructive, accent, muted) meets WCAG AA in BOTH modes, verified against the library's ownAccessibilityValidatorinpython/djust/tests/test_theming_new_themes_v11.py(56 cases: three-registry registration pins, structure, CSS-generation content mirroring the cross-theme QA assertions, contrast matrix, palette-distinctness guard); gate-off verified — dropping a single registration turns the suite red.
What's Changed
- feat(js-commands): JS.ext.* user-registered custom commands (ADR-025) by @johnrtipton in #2051
- feat(hooks): typed values, scoped targets, djust.d.ts grafts (ADR-025) by @johnrtipton in #2052
- feat(theming): five new built-in themes — Sakura, Obsidian, Dune, Mission Control, Art Nouveau by @johnrtipton in #2056
Full Changelog: v1.1.0rc7...v1.1.0rc8