Skip to content

v0.25.1

Choose a tag to compare

@Innei Innei released this 12 Jun 16:00
· 23 commits to main since this release
3810d58

Summary

Introduces the dynamic external component system: articles can embed externally hosted, interactive ESM components (quizzes, parameter explorers, teaching widgets) through a new DynamicNode, loaded at runtime via import(url) into a shadow root with full style isolation, theme awareness, and a zero-CLS height contract. Wired through the whole ecosystem: LiteXML authoring (<dynamic> tag), the AI agent system prompt (catalog-gated usage), rich-compose module with validateUrl allowlisting, headless registry, and the litexml CLI.

(v0.25.1 supersedes the unreleased v0.25.0: it additionally fixes the RendererConfig module augmentation not merging for consumers importing from the package root — same class of bug as 90f0e09.)

Breaking Changes

None.

Features

  • @haklex/rich-dynamic-protocol (new): framework-agnostic mount contract (mount(container, { props, host }) → { update, unmount }) plus a defineDynamicComponent() React helper under ./react for component authors.
  • @haklex/rich-ext-dynamic (new): DynamicNode / DynamicEditNode with payload { url, props, initialHeight }; shadow-DOM host renderer with loading/error states, retry, push-based theme updates, and initialHeight as a permanent height floor (zero CLS); settings popover (URL / height / props JSON) and INSERT_DYNAMIC_COMMAND + slash-menu entry.
  • rich-compose: new modules/dynamic (configurable validateUrl), registered in allRendererModules / allEditorModules.
  • rich-headless: headless DynamicNode in allHeadlessNodes.
  • rich-litexml: <dynamic url initial-height> writer/reader with props JSON in CDATA; roundtrip-tested; supported by the litexml CLI.
  • rich-ext-ai-agent: document-tool system prompt teaches <dynamic> with a hard catalog rule (never invent URLs; fall back to static nodes when no cataloged component fits).
  • Docs: markdown-flavor-litexml.md contract entry; litexml-authoring skill node map + catalog recipe.

Bug Fixes

  • rich-ext-dynamic: preserve RendererConfig augment side-effects in published dist (dedicated augment.ts + marker export, pattern from rich-ext-chat).

Bump rationale

minor (new packages / new exports) + patch (augment dist fix) → 0.25.1. Published the full set (41 packages) to keep exact workspace peer pins coherent for downstream installs.