Repository navigation
Releases
Releases · PhucPM89/mosaic-ui
v9.0.0
@mosaic/ui v9.0.0 — Generative UI Protocol Engine, LLM Schema Compiler, Live SSE/NDJSON Sessions & Full Hardening
Highlights
1. 3-Tier Generative UI Protocol Architecture (SEP-1865, AG-UI, A2UI)
@mosaic/ui/protocol/engine(15.65 KBgzip, zero React): Pure TypeScript engine for backend, Edge, CLI, and Node/Worker runtimes (validateUiProtocol,parseStreamingUiJson,applyProtocolPatch, atomic 6-op RFC-6902applyStateJsonPatch,createProtocolStore,createProtocolSession,connectProtocolStream,parseProtocolStreamChunk,compileLlmProtocolSchema,adaptA2uiMessage,normalizeBridgeMessage).@mosaic/ui/protocol/core(25.45 KBgzip): Selective block-memoizedMosaicCoreRendererwired tocreateProtocolStoreviauseSyncExternalStore+ Vietnamese/EnglishProtocolFormi18n.@mosaic/ui/protocol/host(25.29 KBgzip): Full MCP Apps SEP-1865 host (ui/initialize,tool-input/tool-input-partial,resource-teardown,styles.variablesCSS bridge, bidirectionaltools/call,ResizeObserversize-changed,useProtocolSession).@mosaic/ui/protocol(58.06 KBgzip): Full 35-node renderer (now includingBarListdata-viz node) +McpAppHost.
2. Compact LLM Structured-Output Schema Compiler (compileLlmProtocolSchema)
compact,openai-strict(root object envelope{ root }, strictenum, structuredpayloadEntries/setStateEntries, null-tolerant validation), andgemini(bounded unified flat schema:16.37 KBfor all 35 nodes,10.96 KBfor 16 nodes — eliminating exponential recursion blowup).- Validated directly against Ajv Draft-2020-12 and exposed over MCP via
get_llm_schema.
3. Live Agent SSE & A2UI NDJSON Streaming Showcase
- Zero-dependency HTTP SSE reference server in
examples/ai-agent-live-stream/server.mjsstreamingSTATE_SNAPSHOT,mosaic:render(StatCard+BarList+ToolCallCard), and atomic RFC-6902STATE_DELTAoverGET /api/stream+ HITLPOST /api/action. - Interactive Protocol Sandbox tab in the Workbench (lazy-loaded, Light/Dark WCAG AA verified).
4. Accessibility, RTL, Overlay & Dual-Distribution Hardening
- 100%
className&styleprop coverage across all visual UI primitives; kebab-case CLI aliases (mosaic-ui add data-table);mosaic.lock.jsonisolated to--dest. - LIFO Nested Focus Traps & Inert Containers (
useFocusTrap.ts) fixing nested modal Tab steal and simultaneous-mount deadlocks. - WCAG 1.4.13 Hoverable
Tooltip,Popover/HoverCardfocus restoration,Toastkeyboard-focus pause &role="alert",TreeViewlogicalpaddingInlineStart+ RTL keyboard inversion + rovingtabIndex,PinInputaria-describedby+ disabled paste guard,CalendarVietnamese weekday formatting (T2..T7, CN),CommandPalette/ContextMenu/DropdownMenuIME/typeahead/focus hardening. - Forced Colors (
@media (forced-colors: active)) fallbacks &@containerresponsive queries on.ui-mcp-host. - Agent Tooling & Security: CSPRNG
crypto.randomBytesCSP nonce +escapeStyleTagin VS Code preview extension; strict allowlists and crash-safe timeout cleanup inverify-ui-live.mjs; zero false-positive<Button asChild><a/></Button>& customuse[A-Z]*RSC audit inmosaic-mcp.mjs; 0 test/preview leaks in NPM tarball (354.4 KB, 283 files).
Verification Summary (100% Green)
- TypeScript (
typecheck): PASS (app + lib) - Vitest (
npm test): 23/23 files, 150/150 tests PASS (incl. real HTTP SSE E2E, Ajv Draft-2020-12,axe-core, MCP live verify) - Architecture Gate (
verify:arch): 0 hardcoded colors, 0transition: all, 0 physical RTL CSS, 0 hardcodedz-index, RSC"use client"verified, 0 workbench leaks - Bundle Budgets (
verify:size): 15/15 PASS (mosaic-ui.js82.47 KB,protocol-engine.js15.65 KB,protocol.js58.06 KB,styles.css9.53 KB) - Consumer Smoke (
verify:smoke): 10/10 PASS (packed tarball, 16 ESM subpaths SSR, Tailwind v4@tailwindcss/vite, starter kit, isolated CLI & MCP) - Real Browser WCAG AA (
verify:browser): 56 static surfaces + 14 open overlays + RTL + Mobile 375px + CSS@layer+ Protocol Sandbox Light & Dark — 0 violations - Real Sandboxed Iframe E2E (
verify:iframe):<iframe sandbox="allow-scripts">opaque origin SEP-1865 +ResizeObserver+ AG-UI delta PASS - Visual Regression (
verify:visual): 18/18win32surfaces —diff: 0% - Real React
18.3.1Parity: SSRrenderToString(14,623 B) + real Chromium E2E (0console/page errors) PASS
Attached Release Assets
mosaic-ui-9.0.0.tgz— Packed@mosaic/ui@9.0.0library & CLI tarball (354.4 KB)mosaic-ui-preview-9.0.0.vsix— VS Code Live Preview Extension (309.24 KB)workbench-offline.html— Zero-server single-file offline Workbench (617.1 KB)mosaic.registry.json— Machine-readable component AST registry (135 primitives)mosaic.protocol.schema.json— Draft-2020-12 Generative UI Protocol JSON Schema (35 nodes)mosaic.tokens.json— W3C DTCG Design Tokens
v8.0.0
v7.1.0
v7.0.0
Full Changelog: https://github.com/PhucPM89/mosaic-ui/commits/v7.0.0