Skip to content

v1.1.0rc8

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 14 Jul 04:28
· 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 add scroll_to, clipboard_copy, or a wrapper around a third-party library action short of writing a full dj-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 an ext. wire prefix, so custom names are structurally collision-proof against future built-ins, and built-ins keep their strict surface (JS.shwo still raises AttributeError at mount; register('show', ...) throws). Unknown custom ops fail loud: DEBUG error overlay with a did-you-mean suggestion, console.error in production. Custom implementations get the same to/inner/closest target 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-hook typed values, scoped targets, and shipped TypeScript declarations (ADR-025). Hooks previously got raw dataset strings and re-invented attribute parsing per hook. dj-hook-value-<kebab> attributes are now exposed as this.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-morph updated() sees fresh values with zero staleness machinery) and read-only in v1 (set throws TypeError). Descendants marked dj-hook-target="name" resolve via this.target(name) / this.targets(name) (live subtree queries). The dj-hook-value-*/dj-hook-target prefixes avoid the event-param dj-value-* and scoped-update dj-target namespaces. The already-shipped djust.d.ts gains the new surfaces (DjustHookContext.values / target() / targets(), plus djust.commands.register from the JS.ext feature), purely additive to its existing declarations and validated with tsc --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, a ThemePreset, a complete DesignSystem (typography/layout/surface/icons/animation/interaction), and a ThemePack — and registers through all three seams (THEME_PRESETS, theme packs, design systems), so they appear in the gallery and are selectable via the standard djust_theme_preset cookie 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 own AccessibilityValidator in python/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