@ggui-ai/iframe-runtime 0.8.0 → 0.10.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.
Files changed (48) hide show
  1. package/dist/call-tool-unwrap.d.ts +29 -0
  2. package/dist/call-tool-unwrap.js +56 -0
  3. package/dist/channels/props-update.d.ts +19 -0
  4. package/dist/channels/props-update.js +14 -1
  5. package/dist/compiled-validators.d.ts +16 -7
  6. package/dist/compiled-validators.js +41 -8
  7. package/dist/events-polling.d.ts +123 -1
  8. package/dist/events-polling.js +181 -53
  9. package/dist/iframe-runtime.js +65 -64
  10. package/dist/iframe-runtime.meta.json +1 -1
  11. package/dist/mcp-app-iframe-host.d.ts +1 -1
  12. package/dist/meta-parse.d.ts +13 -0
  13. package/dist/meta-parse.js +41 -0
  14. package/dist/observability.d.ts +1 -1
  15. package/dist/provisional-renderer.d.ts +1 -1
  16. package/dist/provisional-renderer.js +1 -1
  17. package/dist/react-renderer.d.ts +13 -1
  18. package/dist/react-renderer.js +87 -17
  19. package/dist/registry-subscribe.d.ts +42 -3
  20. package/dist/registry-subscribe.js +33 -10
  21. package/dist/render-item.d.ts +9 -0
  22. package/dist/render-item.js +7 -1
  23. package/dist/runtime-telemetry.d.ts +53 -0
  24. package/dist/runtime-telemetry.js +74 -0
  25. package/dist/runtime.d.ts +84 -0
  26. package/dist/runtime.js +522 -100
  27. package/dist/server.d.ts +19 -0
  28. package/dist/server.js +19 -0
  29. package/dist/shims/app-components.js +1 -0
  30. package/dist/shims/components.js +1 -0
  31. package/dist/shims/compositions.js +1 -0
  32. package/dist/shims/design.js +1 -0
  33. package/dist/shims/gadgets.js +1 -0
  34. package/dist/shims/interact.js +1 -0
  35. package/dist/shims/jsx-runtime.js +1 -0
  36. package/dist/shims/primitives.js +1 -0
  37. package/dist/shims/react-dom.js +1 -0
  38. package/dist/shims/react.js +1 -0
  39. package/dist/shims/templates.js +1 -0
  40. package/dist/shims/tokens.js +1 -0
  41. package/dist/shims/wire.js +1 -0
  42. package/dist/system-cards/ProtocolProbeCard.js +1 -1
  43. package/dist/system-cards/UiFeedbackCard.d.ts +1 -1
  44. package/dist/system-cards/UiFeedbackCard.js +1 -1
  45. package/dist/ui-feedback-chrome.js +7 -4
  46. package/dist/zod-jitless.d.ts +1 -0
  47. package/dist/zod-jitless.js +18 -0
  48. package/package.json +8 -7
package/dist/server.d.ts CHANGED
@@ -34,3 +34,22 @@ export declare const RUNTIME_DIST_DIR: string;
34
34
  * `bootstrap.runtimeUrl`, never hardcodes it.
35
35
  */
36
36
  export declare const RUNTIME_BUNDLE_URL_PATH: "/_ggui/iframe-runtime.js";
37
+ /**
38
+ * Directory of the static shim modules (`dist/shims/<name>.js`) the
39
+ * build emits alongside the bundle (ggui#522 slice 2 — `asset-url`
40
+ * delivery). The mcp-server captures these files at composition and
41
+ * serves them under `/_ggui/shims/<runtime-hash>/<name>.js` with the
42
+ * same immutable posture as the hashed bundle route: the shims ship in
43
+ * the same dist as the bundle, so the bundle's content hash versions
44
+ * both — a shim-affecting change in the design package also changes
45
+ * the bundle bytes.
46
+ */
47
+ export declare const RUNTIME_SHIMS_DIR: string;
48
+ /**
49
+ * The URL prefix under which the mcp-server publishes the shim
50
+ * directory family. The full shim directory for a given build is
51
+ * `<origin>${RUNTIME_SHIMS_URL_PREFIX}/<runtime-hash>` — the server-
52
+ * side `asset-url` rewrite composes shim URLs on it, and the shim
53
+ * route parses it back.
54
+ */
55
+ export declare const RUNTIME_SHIMS_URL_PREFIX: "/_ggui/shims";
package/dist/server.js CHANGED
@@ -70,3 +70,22 @@ export const RUNTIME_DIST_DIR = path.dirname(RUNTIME_BUNDLE_FILE);
70
70
  * `bootstrap.runtimeUrl`, never hardcodes it.
71
71
  */
72
72
  export const RUNTIME_BUNDLE_URL_PATH = '/_ggui/iframe-runtime.js';
73
+ /**
74
+ * Directory of the static shim modules (`dist/shims/<name>.js`) the
75
+ * build emits alongside the bundle (ggui#522 slice 2 — `asset-url`
76
+ * delivery). The mcp-server captures these files at composition and
77
+ * serves them under `/_ggui/shims/<runtime-hash>/<name>.js` with the
78
+ * same immutable posture as the hashed bundle route: the shims ship in
79
+ * the same dist as the bundle, so the bundle's content hash versions
80
+ * both — a shim-affecting change in the design package also changes
81
+ * the bundle bytes.
82
+ */
83
+ export const RUNTIME_SHIMS_DIR = path.resolve(here, 'shims');
84
+ /**
85
+ * The URL prefix under which the mcp-server publishes the shim
86
+ * directory family. The full shim directory for a given build is
87
+ * `<origin>${RUNTIME_SHIMS_URL_PREFIX}/<runtime-hash>` — the server-
88
+ * side `asset-url` rewrite composes shim URLs on it, and the shim
89
+ * route parses it back.
90
+ */
91
+ export const RUNTIME_SHIMS_URL_PREFIX = '/_ggui/shims';
@@ -0,0 +1 @@
1
+ const M = (globalThis.__ggui__&&globalThis.__ggui__["appComponents"]||window["__GGUI_APP_COMPONENTS"]) || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);
@@ -0,0 +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;
@@ -0,0 +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;
@@ -0,0 +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;
@@ -0,0 +1 @@
1
+ var P="@ggui-ai/gadgets";function NS(){return(globalThis.__ggui__&&globalThis.__ggui__.gadgets&&globalThis.__ggui__.gadgets[P])||{};}function H(n){return function(){var f=NS()[n];if(typeof f!=="function")throw new Error("[gadget] export "+n+" from package "+P+" is not loaded — the package failed to load at iframe boot or is not registered on App.gadgets.");return f.apply(this,arguments);};}var R=globalThis.__ggui__&&globalThis.__ggui__.react;class GEB extends R.Component{constructor(p){super(p);this.state={e:null};}static getDerivedStateFromError(e){return{e:e};}render(){if(this.state.e)return R.createElement("div",{style:{padding:"8px",border:"1px solid #e0a0c0",borderRadius:"6px",color:"#a03070",font:"13px system-ui"}},"[gadget] "+this.props.g+" failed to render");return this.props.children;}}function C(n){return function(props){var Cmp=NS()[n];if(typeof Cmp!=="function")return R.createElement("div",{style:{padding:"8px",border:"1px solid #e0a0c0",borderRadius:"6px",color:"#a03070",font:"13px system-ui"}},"[gadget] component "+n+" from package "+P+" is not loaded");return R.createElement(GEB,{g:n},R.createElement(Cmp,props));};}export const CachingGadgetCatalog=C("CachingGadgetCatalog");export const InMemoryGadgetCatalog=C("InMemoryGadgetCatalog");export const WrapperConformanceError=C("WrapperConformanceError");export const createGguiGadget=H("createGguiGadget");export const defineGadgetPackage=H("defineGadgetPackage");export const getPublicEnv=H("getPublicEnv");export const useCamera=H("useCamera");export const useClipboardPaste=H("useClipboardPaste");export const useClipboardWrite=H("useClipboardWrite");export const useFilePicker=H("useFilePicker");export const useGeolocation=H("useGeolocation");export const useMicrophone=H("useMicrophone");export const useNotifications=H("useNotifications");export default new Proxy({},{get:function(_,k){return NS()[k];}});
@@ -0,0 +1 @@
1
+ const M = (globalThis.__ggui__&&globalThis.__ggui__["interact"]||window["__GGUI_INTERACT"]||{}); export const Clickable = M["Clickable"]; export const Hoverable = M["Hoverable"]; export const Pressable = M["Pressable"]; export default M;
@@ -0,0 +1 @@
1
+ const R = (globalThis.__ggui__&&globalThis.__ggui__["react"]||window["__REACT"]);function jsx(t,p,k){if(k!==undefined){p={...p,key:k}}const c=p.children;delete p.children;return Array.isArray(c)?R.createElement(t,p,...c):c!==undefined?R.createElement(t,p,c):R.createElement(t,p)}export{jsx,jsx as jsxs,jsx as jsxDEV};export const Fragment=R.Fragment;
@@ -0,0 +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;
@@ -0,0 +1 @@
1
+ const D = globalThis.__ggui__["reactDom"]; export default D; export const createPortal = D.createPortal; export const flushSync = D.flushSync; export const unstable_batchedUpdates = D.unstable_batchedUpdates;
@@ -0,0 +1 @@
1
+ const R = (globalThis.__ggui__&&globalThis.__ggui__["react"]||window["__REACT"]); export default R; export const useState = R.useState; export const useEffect = R.useEffect; export const useRef = R.useRef; export const useCallback = R.useCallback; export const useMemo = R.useMemo; export const useContext = R.useContext; export const useReducer = R.useReducer; export const useId = R.useId; export const use = R.use; export const useActionState = R.useActionState; export const useOptimistic = R.useOptimistic; export const useTransition = R.useTransition; export const startTransition = R.startTransition; export const useDeferredValue = R.useDeferredValue; export const useSyncExternalStore = R.useSyncExternalStore; export const useInsertionEffect = R.useInsertionEffect; export const useLayoutEffect = R.useLayoutEffect; export const useImperativeHandle = R.useImperativeHandle; export const useDebugValue = R.useDebugValue; export const createElement = R.createElement; export const Fragment = R.Fragment; export const Children = R.Children; export const cloneElement = R.cloneElement; export const createContext = R.createContext; export const forwardRef = R.forwardRef; export const memo = R.memo; export const lazy = R.lazy; export const Suspense = R.Suspense; export const Component = R.Component; export const PureComponent = R.PureComponent; export const isValidElement = R.isValidElement; export const createRef = R.createRef;
@@ -0,0 +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;
@@ -0,0 +1 @@
1
+ const M = (globalThis.__ggui__&&globalThis.__ggui__["tokens"]||window["__GGUI_TOKENS"]||{}); export const animation = M["animation"]; export const duration = M["duration"]; export const easing = M["easing"]; export const transition = M["transition"]; export const keyframes = M["keyframes"]; export const thinkingAnimation = M["thinkingAnimation"]; export const thinkingKeyframes = M["thinkingKeyframes"]; export const thinkingPresets = M["thinkingPresets"]; export const THINKING_DEFAULT_STYLE = M["THINKING_DEFAULT_STYLE"]; export const motionSafe = M["motionSafe"]; export const reducedMotion = M["reducedMotion"]; export const reducedMotionCSS = M["reducedMotionCSS"]; export const colors = M["colors"]; export const gray = M["gray"]; export const primary = M["primary"]; export const semantic = M["semantic"]; export const chartColors = M["chartColors"]; export const success = M["success"]; export const warning = M["warning"]; export const error = M["error"]; export const info = M["info"]; export const highContrast = M["highContrast"]; export const typography = M["typography"]; export const fontFamily = M["fontFamily"]; export const fontSize = M["fontSize"]; export const fontSizeValues = M["fontSizeValues"]; export const fontWeight = M["fontWeight"]; export const lineHeight = M["lineHeight"]; export const letterSpacing = M["letterSpacing"]; export const headingStyles = M["headingStyles"]; export const spacing = M["spacing"]; export const spacingValues = M["spacingValues"]; export const radius = M["radius"]; export const shadow = M["shadow"]; export const elevation = M["elevation"]; export const maxWidth = M["maxWidth"]; export const zIndex = M["zIndex"]; export const accessibility = M["accessibility"]; export const focusRing = M["focusRing"]; export const nativeTokens = M["nativeTokens"]; export const tokens = M["tokens"]; export default M;
@@ -0,0 +1 @@
1
+ const w = globalThis.__ggui__.wire; export const useAction = w.useAction; export const useStream = w.useStream; export const useAuth = w.useAuth; export const useApp = w.useApp; export const useRender = w.useRender; export const useGguiContext = w.useGguiContext; export const useContract = w.useContract; export const useWireContext = w.useWireContext; export const GguiWireProvider = w.GguiWireProvider; export default w;
@@ -392,7 +392,7 @@ function ProbeButtonRow({ method, description, call, }) {
392
392
  fontFamily: 'var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)',
393
393
  fontSize: 'var(--ggui-font-size-xs, 11px)',
394
394
  color: outcome.state === 'error'
395
- ? 'var(--ggui-color-warning, #b45309)'
395
+ ? 'var(--ggui-color-warning-500, #b45309)'
396
396
  : 'var(--ggui-color-onSurfaceVariant, #52525b)',
397
397
  background: 'var(--ggui-color-neutral-100, #f4f4f5)',
398
398
  padding: 'var(--ggui-spacing-2, 8px)',
@@ -3,7 +3,7 @@
3
3
  * ("did this generated UI work for you?").
4
4
  *
5
5
  * The in-iframe twin of the host-chrome `UiFeedback` component in
6
- * `@ggui-ai/react`: same three verdicts — Love / Dislike / Other
6
+ * `@ggui-ai/mcp-apps-react`: same three verdicts — Love / Dislike / Other
7
7
  * (free-text comment) — same acknowledgement after submit, same
8
8
  * dismiss control, same payload semantics (trimmed comment only on
9
9
  * `verdict: 'other'`, context stamps present exactly when known).
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
4
4
  * ("did this generated UI work for you?").
5
5
  *
6
6
  * The in-iframe twin of the host-chrome `UiFeedback` component in
7
- * `@ggui-ai/react`: same three verdicts — Love / Dislike / Other
7
+ * `@ggui-ai/mcp-apps-react`: same three verdicts — Love / Dislike / Other
8
8
  * (free-text comment) — same acknowledgement after submit, same
9
9
  * dismiss control, same payload semantics (trimmed comment only on
10
10
  * `verdict: 'other'`, context stamps present exactly when known).
@@ -13,10 +13,13 @@
13
13
  *
14
14
  * Sink-reachability gate — never render a dead affordance:
15
15
  *
16
- * - `window.parent !== window` → a parent window exists, the
17
- * `ggui:observe` envelope has somewhere to go → mount. Parents
18
- * that don't understand the envelope ignore it (best-effort emit;
19
- * one postMessage of cost).
16
+ * - `window.parent !== window` → a parent window exists → this
17
+ * module's own precondition holds. The CALLER (bootSequence)
18
+ * additionally gates on a live sink: an injected `onObserve`
19
+ * emitter, or a first-party embed host (the only parent that
20
+ * consumes `ggui:observe`). Third-party MCP-Apps hosts drop the
21
+ * envelope, so the affordance is NOT mounted there — a feedback
22
+ * control that can never deliver feedback is worse than none.
20
23
  * - `window.parent === window` → top-level tab (the `/r/<shortCode>`
21
24
  * share-link viewer) → NO mount. There is no parent to receive
22
25
  * the envelope, so a rendered affordance would drop every click
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Strict-CSP hygiene (ggui#522 slice 3): declare zod v4 jitless BEFORE
3
+ * any schema-defining module initializes.
4
+ *
5
+ * zod v4 feature-probes codegen with `new Function("")` and falls back
6
+ * cleanly when a CSP forbids it — correct, but the ATTEMPT fires a
7
+ * `securitypolicyviolation` (script-src eval) report in every strict
8
+ * host, polluting the exact diagnostic channel embedders watch (and
9
+ * scenario 27's regression net asserts on). The probe can run during
10
+ * dependency module-init (schemas are constructed at module scope
11
+ * across `@ggui-ai/protocol` / the ext-apps SDK), so a config call in
12
+ * the entry's own body is too late — this module exists to be the
13
+ * runtime entry's FIRST import, ahead of everything that constructs a
14
+ * schema. The frame never wants zod codegen anyway; jitless validation
15
+ * speed is a non-factor at frame scale.
16
+ */
17
+ import { z } from 'zod';
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.8.0",
3
+ "version": "0.10.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",
@@ -35,12 +35,13 @@
35
35
  "qrcode-generator": "^2.0.4",
36
36
  "react": "^19.0.0",
37
37
  "react-dom": "^19.0.0",
38
- "@ggui-ai/live-channel": "0.8.0",
39
- "@ggui-ai/gadgets": "0.8.0",
40
- "@ggui-ai/design": "0.8.0",
41
- "@ggui-ai/protocol": "0.8.0",
42
- "@ggui-ai/preview-a2ui": "0.8.0",
43
- "@ggui-ai/wire": "0.8.0"
38
+ "zod": "^4.3.6",
39
+ "@ggui-ai/design": "0.10.0",
40
+ "@ggui-ai/gadgets": "0.10.0",
41
+ "@ggui-ai/live-channel": "0.10.0",
42
+ "@ggui-ai/protocol": "0.10.0",
43
+ "@ggui-ai/preview-a2ui": "0.10.0",
44
+ "@ggui-ai/wire": "0.10.0"
44
45
  },
45
46
  "peerDependencies": {
46
47
  "@modelcontextprotocol/sdk": "^1.27.0"