@ggui-ai/iframe-runtime 0.28.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,7 @@
32
32
  import React, { type ReactNode } from 'react';
33
33
  import type { AppTheme } from '@ggui-ai/protocol/wire';
34
34
  import type { RenderFailurePhase } from '@ggui-ai/protocol/render-failure';
35
+ import { type HostDisplayMode } from '@ggui-ai/design/rendering';
35
36
  /** Test hook: shorten the no-commit deadline; `null` restores the default. */
36
37
  export declare function __setNoCommitDeadlineForTest(ms: number | null): void;
37
38
  /**
@@ -110,8 +111,8 @@ export interface ReactRootMountOptions {
110
111
  */
111
112
  readonly hostPalette?: Readonly<Record<string, string>>;
112
113
  readonly cssOverrides?: string;
113
- /** `fill` — the root is the whole canvas: no silhouette, fills the page (ggui#1041; from the host's `displayMode`). */
114
- readonly fit?: 'fill';
114
+ /** The host-announced display mode; with the bundle's canvas export it decides the mount fit (`resolveMountFit`). */
115
+ readonly displayMode?: HostDisplayMode;
115
116
  readonly onError?: (error: Error) => void;
116
117
  /**
117
118
  * The error boundary's give-up (ggui#1679): fires once per terminal catch,
@@ -33,7 +33,7 @@ import React, { Component, createElement, Fragment, useEffect, } from 'react';
33
33
  import { createRoot } from 'react-dom/client';
34
34
  import { postObservabilityToParent } from './observability.js';
35
35
  import { trackThemeFontFaces } from './host-fonts.js';
36
- import { stripMarkers, rewriteImports, composeThemeCss, } from '@ggui-ai/design/rendering';
36
+ import { stripMarkers, rewriteImports, composeThemeCss, resolveMountFit, GGUI_MOUNT_CANVAS_EXPORT, } from '@ggui-ai/design/rendering';
37
37
  import { hoistImports, loadModule, loadModuleInline, probeUrlModuleLoad, } from '@ggui-ai/design/module-loader';
38
38
  /**
39
39
  * Document-lifetime verdict: URL-scheme module loading (`blob:` main
@@ -312,6 +312,9 @@ export async function mountReactRoot(container, opts) {
312
312
  }
313
313
  reportHeldBlank(where, 'rendered-nothing');
314
314
  };
315
+ // The evaluated bundle's canvas export, set by `evaluate`; absent until a bundle has loaded and
316
+ // on a bundle compiled before the export existed — both compose as before (`resolveMountFit`).
317
+ let mountCanvas;
315
318
  async function evaluate(code) {
316
319
  // 0. If code is a URL (S3 presigned), fetch the bytes first.
317
320
  // Matches RCR's first-step URL-fetch guard verbatim.
@@ -332,6 +335,8 @@ export async function mountReactRoot(container, opts) {
332
335
  // real module semantics do.
333
336
  const hoisted = hoistImports(cleaned);
334
337
  const pick = (mod) => {
338
+ // The canvas the bundle was composed for (read untrusted; `resolveMountFit` narrows it).
339
+ mountCanvas = mod[GGUI_MOUNT_CANVAS_EXPORT];
335
340
  const Comp = (mod.default ??
336
341
  Object.values(mod).find((v) => typeof v === 'function'));
337
342
  if (Comp === undefined) {
@@ -432,7 +437,7 @@ export async function mountReactRoot(container, opts) {
432
437
  ...(opts.hostPalette !== undefined ? { hostPalette: opts.hostPalette } : {}),
433
438
  ...(opts.appTheme !== undefined ? { appTheme: opts.appTheme } : {}),
434
439
  ...(opts.cssOverrides !== undefined ? { cssOverrides: opts.cssOverrides } : {}),
435
- ...(opts.fit !== undefined ? { fit: opts.fit } : {}),
440
+ fit: resolveMountFit({ canvas: mountCanvas, displayMode: opts.displayMode }),
436
441
  });
437
442
  // Also inject theme CSS at `:root` on `document.head`. The scoped
438
443
  // injection above isolates token resolution to the React tree, but
@@ -1,3 +1,43 @@
1
+ /**
2
+ * GguiSession dispatcher — routes a single {@link GguiSession} to the
3
+ * appropriate renderer based on its discriminator.
4
+ *
5
+ * Post-render-identity-collapse (2026-05-27): the iframe-runtime mounts
6
+ * EXACTLY ONE render per iframe, in a single container. This module
7
+ * exposes one entry point — {@link mountRender} — that returns a
8
+ * {@link RenderItemHandle} the runtime uses to apply subsequent
9
+ * patches (props_update) or unmount on teardown. The earlier
10
+ * `StackRenderer` / `StackRenderContext` orchestrator (a stack-of-N
11
+ * map keyed by item id) was retired along with `StackModel`.
12
+ *
13
+ * The dispatch tree mirrors `@ggui-ai/mcp-apps-react::DynamicComponent` +
14
+ * `GguiRender`'s MCP-Apps branch:
15
+ *
16
+ * - `type === 'mcpApps'` → `mountMcpAppIframe` (vanilla iframe
17
+ * host; the recursive foreign-MCP-App path).
18
+ * - `componentCode` empty OR absent → `mountProvisional` (A2UI
19
+ * preview fed by the `_ggui:preview` reserved channel).
20
+ * - otherwise → `mountReactRoot` with a per-render `WireConfig`
21
+ * built by the caller. The mounted component is wrapped in
22
+ * `<GguiWireProvider config={scopedConfig}>` through the
23
+ * `renderWrapper` seam.
24
+ *
25
+ * Per-render lifecycle:
26
+ *
27
+ * The handle's `update()` either transitions in-place (props-only,
28
+ * same kind) or tears down + remounts (kind changed — provisional
29
+ * → react when componentCode lands).
30
+ *
31
+ * StreamBus integration:
32
+ *
33
+ * The dispatcher subscribes the mounted provisional renderer to
34
+ * `_ggui:preview` envelopes via the caller-provided StreamBus. On
35
+ * ReactComponentRenderer mount (componentCode lands), the
36
+ * provisional surface is `suspend()`-ed so the authoritative render
37
+ * takes over — matches DynamicComponent's componentCode-present
38
+ * gate.
39
+ */
40
+ import type { HostDisplayMode } from '@ggui-ai/design/rendering';
1
41
  import type { ReactNode } from 'react';
2
42
  import type { AppTheme, GguiSession } from '@ggui-ai/protocol/wire';
3
43
  import type { GguiSessionSeedInput } from './types.js';
@@ -52,11 +92,12 @@ export interface RenderItemOptions {
52
92
  */
53
93
  readonly themeMode?: 'light' | 'dark';
54
94
  /**
55
- * The mounted root fills its surface without a silhouette of its own (ggui#1041):
56
- * set when the host's context says `displayMode: 'fullscreen'` — a canvas panel
57
- * is the chrome. Absent for inline mounts.
95
+ * The display mode the host announced for this view (`hostContext.displayMode`). The renderer
96
+ * reads it with the bundle's canvas export through `resolveMountFit`: under `fullscreen` a
97
+ * canvas fills its surface (the host's panel is the chrome) and a chat-width card keeps its
98
+ * natural height in its own frame. Absent for inline mounts.
58
99
  */
59
- readonly fit?: 'fill';
100
+ readonly displayMode?: HostDisplayMode;
60
101
  /**
61
102
  * The per-app theme (protocol's `AppTheme`, ggui#987 v2) forwarded
62
103
  * verbatim to {@link ReactRootMountOptions.appTheme}: the renderer
@@ -1,42 +1,3 @@
1
- /**
2
- * GguiSession dispatcher — routes a single {@link GguiSession} to the
3
- * appropriate renderer based on its discriminator.
4
- *
5
- * Post-render-identity-collapse (2026-05-27): the iframe-runtime mounts
6
- * EXACTLY ONE render per iframe, in a single container. This module
7
- * exposes one entry point — {@link mountRender} — that returns a
8
- * {@link RenderItemHandle} the runtime uses to apply subsequent
9
- * patches (props_update) or unmount on teardown. The earlier
10
- * `StackRenderer` / `StackRenderContext` orchestrator (a stack-of-N
11
- * map keyed by item id) was retired along with `StackModel`.
12
- *
13
- * The dispatch tree mirrors `@ggui-ai/mcp-apps-react::DynamicComponent` +
14
- * `GguiRender`'s MCP-Apps branch:
15
- *
16
- * - `type === 'mcpApps'` → `mountMcpAppIframe` (vanilla iframe
17
- * host; the recursive foreign-MCP-App path).
18
- * - `componentCode` empty OR absent → `mountProvisional` (A2UI
19
- * preview fed by the `_ggui:preview` reserved channel).
20
- * - otherwise → `mountReactRoot` with a per-render `WireConfig`
21
- * built by the caller. The mounted component is wrapped in
22
- * `<GguiWireProvider config={scopedConfig}>` through the
23
- * `renderWrapper` seam.
24
- *
25
- * Per-render lifecycle:
26
- *
27
- * The handle's `update()` either transitions in-place (props-only,
28
- * same kind) or tears down + remounts (kind changed — provisional
29
- * → react when componentCode lands).
30
- *
31
- * StreamBus integration:
32
- *
33
- * The dispatcher subscribes the mounted provisional renderer to
34
- * `_ggui:preview` envelopes via the caller-provided StreamBus. On
35
- * ReactComponentRenderer mount (componentCode lands), the
36
- * provisional surface is `suspend()`-ed so the authoritative render
37
- * takes over — matches DynamicComponent's componentCode-present
38
- * gate.
39
- */
40
1
  import { createElement } from 'react';
41
2
  import { GguiWireProvider } from '@ggui-ai/wire';
42
3
  import { ActionPendingContext, ActionSpentContext } from '@ggui-ai/wire/internal';
@@ -184,10 +145,10 @@ export async function mountRender(container, opts) {
184
145
  ...(currentOpts.cssOverrides !== undefined
185
146
  ? { cssOverrides: currentOpts.cssOverrides }
186
147
  : {}),
187
- // The host's canvas is the chrome (ggui#1041): `fit` MUST cross this
188
- // boundary like every other compose option — ggui#1073 shipped
189
- // without it, and every served hello composed as an inline card.
190
- ...(currentOpts.fit !== undefined ? { fit: currentOpts.fit } : {}),
148
+ // The host's display mode MUST cross this boundary like every other compose
149
+ // option — ggui#1073 shipped without it, and every served hello composed as an
150
+ // inline card. The renderer turns it into the mount fit.
151
+ ...(currentOpts.displayMode !== undefined ? { displayMode: currentOpts.displayMode } : {}),
191
152
  ...(currentOpts.onError !== undefined ? { onError: currentOpts.onError } : {}),
192
153
  ...(currentOpts.onRenderFailure !== undefined ? { onRenderFailure: currentOpts.onRenderFailure } : {}),
193
154
  renderWrapper: wrapInScopedProvider,
@@ -267,7 +228,7 @@ export async function mountRender(container, opts) {
267
228
  ...(next.appTheme !== undefined ? { appTheme: next.appTheme } : {}),
268
229
  ...(next.hostPalette !== undefined ? { hostPalette: next.hostPalette } : {}),
269
230
  ...(next.cssOverrides !== undefined ? { cssOverrides: next.cssOverrides } : {}),
270
- ...(next.fit !== undefined ? { fit: next.fit } : {}),
231
+ ...(next.displayMode !== undefined ? { displayMode: next.displayMode } : {}),
271
232
  ...(next.onError !== undefined ? { onError: next.onError } : {}),
272
233
  ...(next.onRenderFailure !== undefined ? { onRenderFailure: next.onRenderFailure } : {}),
273
234
  renderWrapper: wrapInScopedProvider,
package/dist/runtime.d.ts CHANGED
@@ -647,6 +647,29 @@ export declare function readPendingToolResultLocator(): string | null;
647
647
  * gone, no envelope) — the caller's other tiers still decide.
648
648
  */
649
649
  export declare function resolveMetaViaReadDoor(app: App, locator: string): Promise<BootMeta | null>;
650
+ /**
651
+ * Pre-handshake variant — listens to raw `window.message` for the
652
+ * autostart layer. Used BEFORE the App is constructed, so this can't
653
+ * route through `app.addEventListener`. Pairs with the minimal-shell
654
+ * pattern: the shell buffers any tool-results that arrived BEFORE
655
+ * runtime load (read via {@link readPendingToolResults}); this
656
+ * listener catches the ones that arrive AFTER the bundle parses but
657
+ * BEFORE bootSequence runs.
658
+ */
659
+ /**
660
+ * What the pre-handshake wait resolves to: an inline slice (boot from
661
+ * it directly), or — read-plane-only posture — the view's locator, to
662
+ * be resolved through the door once the App is connected. `null` on
663
+ * timeout.
664
+ */
665
+ type PreBootToolResult = {
666
+ readonly kind: 'meta';
667
+ readonly boot: BootMeta;
668
+ } | {
669
+ readonly kind: 'locator';
670
+ readonly locator: string;
671
+ };
672
+ export declare function awaitToolResultMeta(timeoutMs: number): Promise<PreBootToolResult | null>;
650
673
  /**
651
674
  * Production {@link ContextSnapshotPoster} — the seam the
652
675
  * context-observer factories consume. Splits the two destinations:
package/dist/runtime.js CHANGED
@@ -1530,7 +1530,7 @@ export async function resolveMetaViaReadDoor(app, locator) {
1530
1530
  return null;
1531
1531
  return bootMetaOf(validateMeta(parsed.meta));
1532
1532
  }
1533
- function awaitToolResultMeta(timeoutMs) {
1533
+ export function awaitToolResultMeta(timeoutMs) {
1534
1534
  if (typeof window === 'undefined')
1535
1535
  return Promise.resolve(null);
1536
1536
  return new Promise((resolve) => {
@@ -1544,6 +1544,13 @@ function awaitToolResultMeta(timeoutMs) {
1544
1544
  resolve(value);
1545
1545
  };
1546
1546
  const onMessage = (ev) => {
1547
+ // MUST act only on the embedding window (ggui#2015). Any frame on
1548
+ // the page can reach this one and post into it, and before the
1549
+ // handshake nothing else binds a tool-result to the host; a
1550
+ // stranger's message is dropped without reply and without
1551
+ // touching the bound, exactly as the App's transport drops it.
1552
+ if (ev.source !== window.parent)
1553
+ return;
1547
1554
  const m = ev.data;
1548
1555
  if (m === null ||
1549
1556
  m === undefined ||
@@ -4320,10 +4327,14 @@ async function bootProduction(opts) {
4320
4327
  const themeMode = resolveMountThemeMode(meta);
4321
4328
  return themeMode !== undefined ? { themeMode } : {};
4322
4329
  })(),
4323
- // The host's canvas is the chrome (ggui#1041): a `fullscreen` display mode
4324
- // composes the tree with `fit: 'fill'`; the hostcontextchanged re-injection
4325
- // below picks up a flip exactly as it does the theme mode.
4326
- ...(hostAnnouncedDisplayMode() === 'fullscreen' ? { fit: 'fill' } : {}),
4330
+ // The host's display mode (ggui#1041): with the bundle's canvas export it
4331
+ // decides the mount fit in the renderer (`resolveMountFit`); the
4332
+ // hostcontextchanged re-injection below picks up a flip exactly as it does
4333
+ // the theme mode.
4334
+ ...(() => {
4335
+ const displayMode = hostAnnouncedDisplayMode();
4336
+ return displayMode !== undefined ? { displayMode } : {};
4337
+ })(),
4327
4338
  // Per-app theme (ggui#987 v2). Threaded straight from the
4328
4339
  // bootstrap's `_meta["ai.ggui/render"].theme` (typed `AppTheme`,
4329
4340
  // already injection-validated by the wire parser) onto the mount
@@ -1 +1 @@
1
- const M = Object.assign({}, (globalThis.__ggui__&&globalThis.__ggui__["components"]||window["__GGUI_COMPONENTS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["primitives"]||window["__GGUI_PRIMITIVES"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["compositions"]||window["__GGUI_COMPOSITIONS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["interact"]||window["__GGUI_INTERACT"]||{})); export const Container = M["Container"]; export const Card = M["Card"]; export const Stack = M["Stack"]; export const Row = M["Row"]; export const Grid = M["Grid"]; export const Box = M["Box"]; export const Divider = M["Divider"]; export const Spacer = M["Spacer"]; export const Text = M["Text"]; export const Heading = M["Heading"]; export const Button = M["Button"]; export const Input = M["Input"]; export const TextArea = M["TextArea"]; export const Select = M["Select"]; export const Checkbox = M["Checkbox"]; export const Toggle = M["Toggle"]; export const RadioGroup = M["RadioGroup"]; export const Slider = M["Slider"]; export const Badge = M["Badge"]; export const Spinner = M["Spinner"]; export const Skeleton = M["Skeleton"]; export const Avatar = M["Avatar"]; export const Alert = M["Alert"]; export const Progress = M["Progress"]; export const Image = M["Image"]; export const Icon = M["Icon"]; export const Link = M["Link"]; export const Tooltip = M["Tooltip"]; export const Table = M["Table"]; export const Tabs = M["Tabs"]; export const Toast = M["Toast"]; export const Accordion = M["Accordion"]; export const MotionKeyframes = M["MotionKeyframes"]; export const useMotion = M["useMotion"]; export const useAnimationKey = M["useAnimationKey"]; export const SearchField = M["SearchField"]; export const FormField = M["FormField"]; export const MenuItem = M["MenuItem"]; export const Tag = M["Tag"]; export const Dropdown = M["Dropdown"]; export const Autocomplete = M["Autocomplete"]; export const Breadcrumb = M["Breadcrumb"]; export const Pagination = M["Pagination"]; export const EmptyState = M["EmptyState"]; export const Stat = M["Stat"]; export const Stepper = M["Stepper"]; export const Markdown = M["Markdown"]; export const MarkdownInline = M["MarkdownInline"]; export const renderRichTextInlines = M["renderRichTextInlines"]; export const Header = M["Header"]; export const Sidebar = M["Sidebar"]; export const CardGrid = M["CardGrid"]; export const CommentThread = M["CommentThread"]; export const DataTable = M["DataTable"]; export const ChatWindow = M["ChatWindow"]; export const NavigationBar = M["NavigationBar"]; export const FileUploader = M["FileUploader"]; export const NotificationCenter = M["NotificationCenter"]; export const Modal = M["Modal"]; export const CommandPalette = M["CommandPalette"]; export const Footer = M["Footer"]; export const Hero = M["Hero"]; export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
1
+ const M = Object.assign({}, (globalThis.__ggui__&&globalThis.__ggui__["components"]||window["__GGUI_COMPONENTS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["primitives"]||window["__GGUI_PRIMITIVES"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["compositions"]||window["__GGUI_COMPOSITIONS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["interact"]||window["__GGUI_INTERACT"]||{})); export const Container = M["Container"]; export const Card = M["Card"]; export const Stack = M["Stack"]; export const Row = M["Row"]; export const Grid = M["Grid"]; export const Box = M["Box"]; export const Divider = M["Divider"]; export const Spacer = M["Spacer"]; export const Text = M["Text"]; export const Heading = M["Heading"]; export const Button = M["Button"]; export const Input = M["Input"]; export const TextArea = M["TextArea"]; export const Select = M["Select"]; export const Checkbox = M["Checkbox"]; export const Toggle = M["Toggle"]; export const RadioGroup = M["RadioGroup"]; export const Slider = M["Slider"]; export const Badge = M["Badge"]; export const Spinner = M["Spinner"]; export const Skeleton = M["Skeleton"]; export const Avatar = M["Avatar"]; export const Alert = M["Alert"]; export const Progress = M["Progress"]; export const Image = M["Image"]; export const Icon = M["Icon"]; export const Link = M["Link"]; export const Tooltip = M["Tooltip"]; export const Table = M["Table"]; export const Tabs = M["Tabs"]; export const Toast = M["Toast"]; export const Accordion = M["Accordion"]; export const MotionKeyframes = M["MotionKeyframes"]; export const useMotion = M["useMotion"]; export const useAnimationKey = M["useAnimationKey"]; export const TINT_STEPS = M["TINT_STEPS"]; export const SearchField = M["SearchField"]; export const FormField = M["FormField"]; export const MenuItem = M["MenuItem"]; export const Tag = M["Tag"]; export const Dropdown = M["Dropdown"]; export const Autocomplete = M["Autocomplete"]; export const Breadcrumb = M["Breadcrumb"]; export const Pagination = M["Pagination"]; export const EmptyState = M["EmptyState"]; export const Stat = M["Stat"]; export const Stepper = M["Stepper"]; export const Markdown = M["Markdown"]; export const MarkdownInline = M["MarkdownInline"]; export const renderRichTextInlines = M["renderRichTextInlines"]; export const Header = M["Header"]; export const Sidebar = M["Sidebar"]; export const CardGrid = M["CardGrid"]; export const CommentThread = M["CommentThread"]; export const DataTable = M["DataTable"]; export const ChatWindow = M["ChatWindow"]; export const NavigationBar = M["NavigationBar"]; export const FileUploader = M["FileUploader"]; export const NotificationCenter = M["NotificationCenter"]; export const Modal = M["Modal"]; export const CommandPalette = M["CommandPalette"]; export const Footer = M["Footer"]; export const Hero = M["Hero"]; export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
@@ -1 +1 @@
1
- const M = Object.assign({}, (globalThis.__ggui__&&globalThis.__ggui__["compositions"]||window["__GGUI_COMPOSITIONS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["primitives"]||window["__GGUI_PRIMITIVES"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["components"]||window["__GGUI_COMPONENTS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["interact"]||window["__GGUI_INTERACT"]||{})); export const Container = M["Container"]; export const Card = M["Card"]; export const Stack = M["Stack"]; export const Row = M["Row"]; export const Grid = M["Grid"]; export const Box = M["Box"]; export const Divider = M["Divider"]; export const Spacer = M["Spacer"]; export const Text = M["Text"]; export const Heading = M["Heading"]; export const Button = M["Button"]; export const Input = M["Input"]; export const TextArea = M["TextArea"]; export const Select = M["Select"]; export const Checkbox = M["Checkbox"]; export const Toggle = M["Toggle"]; export const RadioGroup = M["RadioGroup"]; export const Slider = M["Slider"]; export const Badge = M["Badge"]; export const Spinner = M["Spinner"]; export const Skeleton = M["Skeleton"]; export const Avatar = M["Avatar"]; export const Alert = M["Alert"]; export const Progress = M["Progress"]; export const Image = M["Image"]; export const Icon = M["Icon"]; export const Link = M["Link"]; export const Tooltip = M["Tooltip"]; export const Table = M["Table"]; export const Tabs = M["Tabs"]; export const Toast = M["Toast"]; export const Accordion = M["Accordion"]; export const MotionKeyframes = M["MotionKeyframes"]; export const useMotion = M["useMotion"]; export const useAnimationKey = M["useAnimationKey"]; export const SearchField = M["SearchField"]; export const FormField = M["FormField"]; export const MenuItem = M["MenuItem"]; export const Tag = M["Tag"]; export const Dropdown = M["Dropdown"]; export const Autocomplete = M["Autocomplete"]; export const Breadcrumb = M["Breadcrumb"]; export const Pagination = M["Pagination"]; export const EmptyState = M["EmptyState"]; export const Stat = M["Stat"]; export const Stepper = M["Stepper"]; export const Markdown = M["Markdown"]; export const MarkdownInline = M["MarkdownInline"]; export const renderRichTextInlines = M["renderRichTextInlines"]; export const Header = M["Header"]; export const Sidebar = M["Sidebar"]; export const CardGrid = M["CardGrid"]; export const CommentThread = M["CommentThread"]; export const DataTable = M["DataTable"]; export const ChatWindow = M["ChatWindow"]; export const NavigationBar = M["NavigationBar"]; export const FileUploader = M["FileUploader"]; export const NotificationCenter = M["NotificationCenter"]; export const Modal = M["Modal"]; export const CommandPalette = M["CommandPalette"]; export const Footer = M["Footer"]; export const Hero = M["Hero"]; export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
1
+ const M = Object.assign({}, (globalThis.__ggui__&&globalThis.__ggui__["compositions"]||window["__GGUI_COMPOSITIONS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["primitives"]||window["__GGUI_PRIMITIVES"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["components"]||window["__GGUI_COMPONENTS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["interact"]||window["__GGUI_INTERACT"]||{})); export const Container = M["Container"]; export const Card = M["Card"]; export const Stack = M["Stack"]; export const Row = M["Row"]; export const Grid = M["Grid"]; export const Box = M["Box"]; export const Divider = M["Divider"]; export const Spacer = M["Spacer"]; export const Text = M["Text"]; export const Heading = M["Heading"]; export const Button = M["Button"]; export const Input = M["Input"]; export const TextArea = M["TextArea"]; export const Select = M["Select"]; export const Checkbox = M["Checkbox"]; export const Toggle = M["Toggle"]; export const RadioGroup = M["RadioGroup"]; export const Slider = M["Slider"]; export const Badge = M["Badge"]; export const Spinner = M["Spinner"]; export const Skeleton = M["Skeleton"]; export const Avatar = M["Avatar"]; export const Alert = M["Alert"]; export const Progress = M["Progress"]; export const Image = M["Image"]; export const Icon = M["Icon"]; export const Link = M["Link"]; export const Tooltip = M["Tooltip"]; export const Table = M["Table"]; export const Tabs = M["Tabs"]; export const Toast = M["Toast"]; export const Accordion = M["Accordion"]; export const MotionKeyframes = M["MotionKeyframes"]; export const useMotion = M["useMotion"]; export const useAnimationKey = M["useAnimationKey"]; export const TINT_STEPS = M["TINT_STEPS"]; export const SearchField = M["SearchField"]; export const FormField = M["FormField"]; export const MenuItem = M["MenuItem"]; export const Tag = M["Tag"]; export const Dropdown = M["Dropdown"]; export const Autocomplete = M["Autocomplete"]; export const Breadcrumb = M["Breadcrumb"]; export const Pagination = M["Pagination"]; export const EmptyState = M["EmptyState"]; export const Stat = M["Stat"]; export const Stepper = M["Stepper"]; export const Markdown = M["Markdown"]; export const MarkdownInline = M["MarkdownInline"]; export const renderRichTextInlines = M["renderRichTextInlines"]; export const Header = M["Header"]; export const Sidebar = M["Sidebar"]; export const CardGrid = M["CardGrid"]; export const CommentThread = M["CommentThread"]; export const DataTable = M["DataTable"]; export const ChatWindow = M["ChatWindow"]; export const NavigationBar = M["NavigationBar"]; export const FileUploader = M["FileUploader"]; export const NotificationCenter = M["NotificationCenter"]; export const Modal = M["Modal"]; export const CommandPalette = M["CommandPalette"]; export const Footer = M["Footer"]; export const Hero = M["Hero"]; export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
@@ -1 +1 @@
1
- const M = Object.assign({}, (globalThis.__ggui__&&globalThis.__ggui__["primitives"]||window["__GGUI_PRIMITIVES"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["components"]||window["__GGUI_COMPONENTS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["compositions"]||window["__GGUI_COMPOSITIONS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["interact"]||window["__GGUI_INTERACT"]||{})); export const Container = M["Container"]; export const Card = M["Card"]; export const Stack = M["Stack"]; export const Row = M["Row"]; export const Grid = M["Grid"]; export const Box = M["Box"]; export const Divider = M["Divider"]; export const Spacer = M["Spacer"]; export const Text = M["Text"]; export const Heading = M["Heading"]; export const Button = M["Button"]; export const Input = M["Input"]; export const TextArea = M["TextArea"]; export const Select = M["Select"]; export const Checkbox = M["Checkbox"]; export const Toggle = M["Toggle"]; export const RadioGroup = M["RadioGroup"]; export const Slider = M["Slider"]; export const Badge = M["Badge"]; export const Spinner = M["Spinner"]; export const Skeleton = M["Skeleton"]; export const Avatar = M["Avatar"]; export const Alert = M["Alert"]; export const Progress = M["Progress"]; export const Image = M["Image"]; export const Icon = M["Icon"]; export const Link = M["Link"]; export const Tooltip = M["Tooltip"]; export const Table = M["Table"]; export const Tabs = M["Tabs"]; export const Toast = M["Toast"]; export const Accordion = M["Accordion"]; export const MotionKeyframes = M["MotionKeyframes"]; export const useMotion = M["useMotion"]; export const useAnimationKey = M["useAnimationKey"]; export const SearchField = M["SearchField"]; export const FormField = M["FormField"]; export const MenuItem = M["MenuItem"]; export const Tag = M["Tag"]; export const Dropdown = M["Dropdown"]; export const Autocomplete = M["Autocomplete"]; export const Breadcrumb = M["Breadcrumb"]; export const Pagination = M["Pagination"]; export const EmptyState = M["EmptyState"]; export const Stat = M["Stat"]; export const Stepper = M["Stepper"]; export const Markdown = M["Markdown"]; export const MarkdownInline = M["MarkdownInline"]; export const renderRichTextInlines = M["renderRichTextInlines"]; export const Header = M["Header"]; export const Sidebar = M["Sidebar"]; export const CardGrid = M["CardGrid"]; export const CommentThread = M["CommentThread"]; export const DataTable = M["DataTable"]; export const ChatWindow = M["ChatWindow"]; export const NavigationBar = M["NavigationBar"]; export const FileUploader = M["FileUploader"]; export const NotificationCenter = M["NotificationCenter"]; export const Modal = M["Modal"]; export const CommandPalette = M["CommandPalette"]; export const Footer = M["Footer"]; export const Hero = M["Hero"]; export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
1
+ const M = Object.assign({}, (globalThis.__ggui__&&globalThis.__ggui__["primitives"]||window["__GGUI_PRIMITIVES"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["components"]||window["__GGUI_COMPONENTS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["compositions"]||window["__GGUI_COMPOSITIONS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["interact"]||window["__GGUI_INTERACT"]||{})); export const Container = M["Container"]; export const Card = M["Card"]; export const Stack = M["Stack"]; export const Row = M["Row"]; export const Grid = M["Grid"]; export const Box = M["Box"]; export const Divider = M["Divider"]; export const Spacer = M["Spacer"]; export const Text = M["Text"]; export const Heading = M["Heading"]; export const Button = M["Button"]; export const Input = M["Input"]; export const TextArea = M["TextArea"]; export const Select = M["Select"]; export const Checkbox = M["Checkbox"]; export const Toggle = M["Toggle"]; export const RadioGroup = M["RadioGroup"]; export const Slider = M["Slider"]; export const Badge = M["Badge"]; export const Spinner = M["Spinner"]; export const Skeleton = M["Skeleton"]; export const Avatar = M["Avatar"]; export const Alert = M["Alert"]; export const Progress = M["Progress"]; export const Image = M["Image"]; export const Icon = M["Icon"]; export const Link = M["Link"]; export const Tooltip = M["Tooltip"]; export const Table = M["Table"]; export const Tabs = M["Tabs"]; export const Toast = M["Toast"]; export const Accordion = M["Accordion"]; export const MotionKeyframes = M["MotionKeyframes"]; export const useMotion = M["useMotion"]; export const useAnimationKey = M["useAnimationKey"]; export const TINT_STEPS = M["TINT_STEPS"]; export const SearchField = M["SearchField"]; export const FormField = M["FormField"]; export const MenuItem = M["MenuItem"]; export const Tag = M["Tag"]; export const Dropdown = M["Dropdown"]; export const Autocomplete = M["Autocomplete"]; export const Breadcrumb = M["Breadcrumb"]; export const Pagination = M["Pagination"]; export const EmptyState = M["EmptyState"]; export const Stat = M["Stat"]; export const Stepper = M["Stepper"]; export const Markdown = M["Markdown"]; export const MarkdownInline = M["MarkdownInline"]; export const renderRichTextInlines = M["renderRichTextInlines"]; export const Header = M["Header"]; export const Sidebar = M["Sidebar"]; export const CardGrid = M["CardGrid"]; export const CommentThread = M["CommentThread"]; export const DataTable = M["DataTable"]; export const ChatWindow = M["ChatWindow"]; export const NavigationBar = M["NavigationBar"]; export const FileUploader = M["FileUploader"]; export const NotificationCenter = M["NotificationCenter"]; export const Modal = M["Modal"]; export const CommandPalette = M["CommandPalette"]; export const Footer = M["Footer"]; export const Hero = M["Hero"]; export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
@@ -1 +1 @@
1
- const M = Object.assign({}, (globalThis.__ggui__&&globalThis.__ggui__["primitives"]||window["__GGUI_PRIMITIVES"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["components"]||window["__GGUI_COMPONENTS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["compositions"]||window["__GGUI_COMPOSITIONS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["interact"]||window["__GGUI_INTERACT"]||{})); export const Container = M["Container"]; export const Card = M["Card"]; export const Stack = M["Stack"]; export const Row = M["Row"]; export const Grid = M["Grid"]; export const Box = M["Box"]; export const Divider = M["Divider"]; export const Spacer = M["Spacer"]; export const Text = M["Text"]; export const Heading = M["Heading"]; export const Button = M["Button"]; export const Input = M["Input"]; export const TextArea = M["TextArea"]; export const Select = M["Select"]; export const Checkbox = M["Checkbox"]; export const Toggle = M["Toggle"]; export const RadioGroup = M["RadioGroup"]; export const Slider = M["Slider"]; export const Badge = M["Badge"]; export const Spinner = M["Spinner"]; export const Skeleton = M["Skeleton"]; export const Avatar = M["Avatar"]; export const Alert = M["Alert"]; export const Progress = M["Progress"]; export const Image = M["Image"]; export const Icon = M["Icon"]; export const Link = M["Link"]; export const Tooltip = M["Tooltip"]; export const Table = M["Table"]; export const Tabs = M["Tabs"]; export const Toast = M["Toast"]; export const Accordion = M["Accordion"]; export const MotionKeyframes = M["MotionKeyframes"]; export const useMotion = M["useMotion"]; export const useAnimationKey = M["useAnimationKey"]; export const SearchField = M["SearchField"]; export const FormField = M["FormField"]; export const MenuItem = M["MenuItem"]; export const Tag = M["Tag"]; export const Dropdown = M["Dropdown"]; export const Autocomplete = M["Autocomplete"]; export const Breadcrumb = M["Breadcrumb"]; export const Pagination = M["Pagination"]; export const EmptyState = M["EmptyState"]; export const Stat = M["Stat"]; export const Stepper = M["Stepper"]; export const Markdown = M["Markdown"]; export const MarkdownInline = M["MarkdownInline"]; export const renderRichTextInlines = M["renderRichTextInlines"]; export const Header = M["Header"]; export const Sidebar = M["Sidebar"]; export const CardGrid = M["CardGrid"]; export const CommentThread = M["CommentThread"]; export const DataTable = M["DataTable"]; export const ChatWindow = M["ChatWindow"]; export const NavigationBar = M["NavigationBar"]; export const FileUploader = M["FileUploader"]; export const NotificationCenter = M["NotificationCenter"]; export const Modal = M["Modal"]; export const CommandPalette = M["CommandPalette"]; export const Footer = M["Footer"]; export const Hero = M["Hero"]; export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
1
+ const M = Object.assign({}, (globalThis.__ggui__&&globalThis.__ggui__["primitives"]||window["__GGUI_PRIMITIVES"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["components"]||window["__GGUI_COMPONENTS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["compositions"]||window["__GGUI_COMPOSITIONS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["interact"]||window["__GGUI_INTERACT"]||{})); export const Container = M["Container"]; export const Card = M["Card"]; export const Stack = M["Stack"]; export const Row = M["Row"]; export const Grid = M["Grid"]; export const Box = M["Box"]; export const Divider = M["Divider"]; export const Spacer = M["Spacer"]; export const Text = M["Text"]; export const Heading = M["Heading"]; export const Button = M["Button"]; export const Input = M["Input"]; export const TextArea = M["TextArea"]; export const Select = M["Select"]; export const Checkbox = M["Checkbox"]; export const Toggle = M["Toggle"]; export const RadioGroup = M["RadioGroup"]; export const Slider = M["Slider"]; export const Badge = M["Badge"]; export const Spinner = M["Spinner"]; export const Skeleton = M["Skeleton"]; export const Avatar = M["Avatar"]; export const Alert = M["Alert"]; export const Progress = M["Progress"]; export const Image = M["Image"]; export const Icon = M["Icon"]; export const Link = M["Link"]; export const Tooltip = M["Tooltip"]; export const Table = M["Table"]; export const Tabs = M["Tabs"]; export const Toast = M["Toast"]; export const Accordion = M["Accordion"]; export const MotionKeyframes = M["MotionKeyframes"]; export const useMotion = M["useMotion"]; export const useAnimationKey = M["useAnimationKey"]; export const TINT_STEPS = M["TINT_STEPS"]; export const SearchField = M["SearchField"]; export const FormField = M["FormField"]; export const MenuItem = M["MenuItem"]; export const Tag = M["Tag"]; export const Dropdown = M["Dropdown"]; export const Autocomplete = M["Autocomplete"]; export const Breadcrumb = M["Breadcrumb"]; export const Pagination = M["Pagination"]; export const EmptyState = M["EmptyState"]; export const Stat = M["Stat"]; export const Stepper = M["Stepper"]; export const Markdown = M["Markdown"]; export const MarkdownInline = M["MarkdownInline"]; export const renderRichTextInlines = M["renderRichTextInlines"]; export const Header = M["Header"]; export const Sidebar = M["Sidebar"]; export const CardGrid = M["CardGrid"]; export const CommentThread = M["CommentThread"]; export const DataTable = M["DataTable"]; export const ChatWindow = M["ChatWindow"]; export const NavigationBar = M["NavigationBar"]; export const FileUploader = M["FileUploader"]; export const NotificationCenter = M["NotificationCenter"]; export const Modal = M["Modal"]; export const CommandPalette = M["CommandPalette"]; export const Footer = M["Footer"]; export const Hero = M["Hero"]; export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
@@ -1 +1 @@
1
- const M = Object.assign({}, (globalThis.__ggui__&&globalThis.__ggui__["compositions"]||window["__GGUI_COMPOSITIONS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["primitives"]||window["__GGUI_PRIMITIVES"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["components"]||window["__GGUI_COMPONENTS"]||{})); export const Container = M["Container"]; export const Card = M["Card"]; export const Stack = M["Stack"]; export const Row = M["Row"]; export const Grid = M["Grid"]; export const Box = M["Box"]; export const Divider = M["Divider"]; export const Spacer = M["Spacer"]; export const Text = M["Text"]; export const Heading = M["Heading"]; export const Button = M["Button"]; export const Input = M["Input"]; export const TextArea = M["TextArea"]; export const Select = M["Select"]; export const Checkbox = M["Checkbox"]; export const Toggle = M["Toggle"]; export const RadioGroup = M["RadioGroup"]; export const Slider = M["Slider"]; export const Badge = M["Badge"]; export const Spinner = M["Spinner"]; export const Skeleton = M["Skeleton"]; export const Avatar = M["Avatar"]; export const Alert = M["Alert"]; export const Progress = M["Progress"]; export const Image = M["Image"]; export const Icon = M["Icon"]; export const Link = M["Link"]; export const Tooltip = M["Tooltip"]; export const Table = M["Table"]; export const Tabs = M["Tabs"]; export const Toast = M["Toast"]; export const Accordion = M["Accordion"]; export const MotionKeyframes = M["MotionKeyframes"]; export const useMotion = M["useMotion"]; export const useAnimationKey = M["useAnimationKey"]; export const SearchField = M["SearchField"]; export const FormField = M["FormField"]; export const MenuItem = M["MenuItem"]; export const Tag = M["Tag"]; export const Dropdown = M["Dropdown"]; export const Autocomplete = M["Autocomplete"]; export const Breadcrumb = M["Breadcrumb"]; export const Pagination = M["Pagination"]; export const EmptyState = M["EmptyState"]; export const Stat = M["Stat"]; export const Stepper = M["Stepper"]; export const Markdown = M["Markdown"]; export const MarkdownInline = M["MarkdownInline"]; export const renderRichTextInlines = M["renderRichTextInlines"]; export const Header = M["Header"]; export const Sidebar = M["Sidebar"]; export const CardGrid = M["CardGrid"]; export const CommentThread = M["CommentThread"]; export const DataTable = M["DataTable"]; export const ChatWindow = M["ChatWindow"]; export const NavigationBar = M["NavigationBar"]; export const FileUploader = M["FileUploader"]; export const NotificationCenter = M["NotificationCenter"]; export const Modal = M["Modal"]; export const CommandPalette = M["CommandPalette"]; export const Footer = M["Footer"]; export const Hero = M["Hero"]; export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
1
+ const M = Object.assign({}, (globalThis.__ggui__&&globalThis.__ggui__["compositions"]||window["__GGUI_COMPOSITIONS"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["primitives"]||window["__GGUI_PRIMITIVES"]||{}),(globalThis.__ggui__&&globalThis.__ggui__["components"]||window["__GGUI_COMPONENTS"]||{})); export const Container = M["Container"]; export const Card = M["Card"]; export const Stack = M["Stack"]; export const Row = M["Row"]; export const Grid = M["Grid"]; export const Box = M["Box"]; export const Divider = M["Divider"]; export const Spacer = M["Spacer"]; export const Text = M["Text"]; export const Heading = M["Heading"]; export const Button = M["Button"]; export const Input = M["Input"]; export const TextArea = M["TextArea"]; export const Select = M["Select"]; export const Checkbox = M["Checkbox"]; export const Toggle = M["Toggle"]; export const RadioGroup = M["RadioGroup"]; export const Slider = M["Slider"]; export const Badge = M["Badge"]; export const Spinner = M["Spinner"]; export const Skeleton = M["Skeleton"]; export const Avatar = M["Avatar"]; export const Alert = M["Alert"]; export const Progress = M["Progress"]; export const Image = M["Image"]; export const Icon = M["Icon"]; export const Link = M["Link"]; export const Tooltip = M["Tooltip"]; export const Table = M["Table"]; export const Tabs = M["Tabs"]; export const Toast = M["Toast"]; export const Accordion = M["Accordion"]; export const MotionKeyframes = M["MotionKeyframes"]; export const useMotion = M["useMotion"]; export const useAnimationKey = M["useAnimationKey"]; export const TINT_STEPS = M["TINT_STEPS"]; export const SearchField = M["SearchField"]; export const FormField = M["FormField"]; export const MenuItem = M["MenuItem"]; export const Tag = M["Tag"]; export const Dropdown = M["Dropdown"]; export const Autocomplete = M["Autocomplete"]; export const Breadcrumb = M["Breadcrumb"]; export const Pagination = M["Pagination"]; export const EmptyState = M["EmptyState"]; export const Stat = M["Stat"]; export const Stepper = M["Stepper"]; export const Markdown = M["Markdown"]; export const MarkdownInline = M["MarkdownInline"]; export const renderRichTextInlines = M["renderRichTextInlines"]; export const Header = M["Header"]; export const Sidebar = M["Sidebar"]; export const CardGrid = M["CardGrid"]; export const CommentThread = M["CommentThread"]; export const DataTable = M["DataTable"]; export const ChatWindow = M["ChatWindow"]; export const NavigationBar = M["NavigationBar"]; export const FileUploader = M["FileUploader"]; export const NotificationCenter = M["NotificationCenter"]; export const Modal = M["Modal"]; export const CommandPalette = M["CommandPalette"]; export const Footer = M["Footer"]; export const Hero = M["Hero"]; export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
@@ -14,5 +14,5 @@
14
14
  * schema. The frame never wants zod codegen anyway; jitless validation
15
15
  * speed is a non-factor at frame scale.
16
16
  */
17
- import { z } from 'zod';
17
+ import * as z from 'zod';
18
18
  z.config({ jitless: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/iframe-runtime",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "The iframe-local GGUI runtime: a self-contained ESM bundle that boots inside an MCP Apps host iframe, runs the protocol-version handshake, opens the live-channel WebSocket, and mounts the rendered UI. Bundles React, ReactDOM, and the GGUI design system so generated component code has a single seam to read from.",
5
5
  "keywords": [
6
6
  "ggui",
@@ -41,13 +41,13 @@
41
41
  "qrcode-generator": "^2.0.4",
42
42
  "react": "^19.0.0",
43
43
  "react-dom": "^19.0.0",
44
- "zod": "^4.3.6",
45
- "@ggui-ai/design": "0.28.0",
46
- "@ggui-ai/gadgets": "0.28.0",
47
- "@ggui-ai/live-channel": "0.28.0",
48
- "@ggui-ai/preview-a2ui": "0.28.0",
49
- "@ggui-ai/protocol": "0.28.0",
50
- "@ggui-ai/wire": "0.28.0"
44
+ "zod": "^4.6.6",
45
+ "@ggui-ai/design": "0.29.0",
46
+ "@ggui-ai/gadgets": "0.29.0",
47
+ "@ggui-ai/preview-a2ui": "0.29.0",
48
+ "@ggui-ai/live-channel": "0.29.0",
49
+ "@ggui-ai/protocol": "0.29.0",
50
+ "@ggui-ai/wire": "0.29.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@modelcontextprotocol/sdk": "^1.27.0"
@@ -62,7 +62,7 @@
62
62
  "jsdom": "^24.0.0",
63
63
  "tsx": "^4.21.0",
64
64
  "typescript": "^5.0.0",
65
- "vitest": "^3.2.6"
65
+ "vitest": "^4.1.11"
66
66
  },
67
67
  "repository": {
68
68
  "type": "git",