@assistant-ui/core 0.2.19 → 0.2.20

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.
@@ -1 +1 @@
1
- {"version":3,"file":"GenerativeUI.d.ts","names":[],"sources":["../../../../src/react/primitives/generativeUI/GenerativeUI.tsx"],"mappings":";;;;;;;AAyBA;;;;cAAa,uBAAA,SAAgC,KAAK;EAAA,SAChC,aAAA;cAGd,aAAA,UACA,OAAA;AAAA;;;AAA+E;AAuEnF;;cAAa,kBAAA,EAAoB,EAAE,CAAC,uBAAA;AAAA,kBAgBnB,4BAAA;EAAA,KACH,KAAA;IADG;;;;;;;IASb,UAAA,EAAY,6BAAA;IARF;;;;;IAcV,IAAA,GAAO,gBAAA,cAGH;IADJ,QAAA,GACI,aAAA;MAAgB,SAAA;MAAmB,KAAA;IAAA;EAAA;AAAA;;;;;;;AAuBP;;;;;;;;;;;cADvB,4BAAA,EAA8B,EAAE,CAC3C,4BAAA,CAA6B,KAAA"}
1
+ {"version":3,"file":"GenerativeUI.d.ts","names":[],"sources":["../../../../src/react/primitives/generativeUI/GenerativeUI.tsx"],"mappings":";;;;;;;AAyBA;;;;cAAa,uBAAA,SAAgC,KAAK;EAAA,SAChC,aAAA;cAGd,aAAA,UACA,OAAA;AAAA;;;AAA+E;AA2EnF;;cAAa,kBAAA,EAAoB,EAAE,CAAC,uBAAA;AAAA,kBAgBnB,4BAAA;EAAA,KACH,KAAA;IADG;;;;;;;IASb,UAAA,EAAY,6BAAA;IARF;;;;;IAcV,IAAA,GAAO,gBAAA,cAGH;IADJ,QAAA,GACI,aAAA;MAAgB,SAAA;MAAmB,KAAA;IAAA;EAAA;AAAA;;;;;;;AAuBP;;;;;;;;;;;cADvB,4BAAA,EAA8B,EAAE,CAC3C,4BAAA,CAA6B,KAAA"}
@@ -22,7 +22,7 @@ const isObjectNode = (node) => typeof node === "object" && node !== null;
22
22
  const renderNode = (node, components, Fallback, path) => {
23
23
  if (node === void 0 || node === null) return null;
24
24
  if (typeof node === "string") return node;
25
- if (!isObjectNode(node) || !("component" in node)) {
25
+ if (!isObjectNode(node) || !("component" in node) || typeof node.component !== "string") {
26
26
  if (typeof process !== "undefined" && process.env?.NODE_ENV !== "production") console.warn(`[generative-ui] Skipping malformed node at ${path}:`, node);
27
27
  return null;
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GenerativeUI.js","names":["c","_c","ComponentType","FC","ReactNode","createElement","useMemo","useAuiState","GenerativeUINode","GenerativeUISpec","GenerativeUIComponentRegistry","GenerativeUIRenderProps","GenerativeUIRenderError","Error","componentName","constructor","message","name","isObjectNode","node","Exclude","renderNode","components","Fallback","path","undefined","process","env","NODE_ENV","console","warn","component","props","children","key","Resolved","renderedChildren","length","map","child","i","normalizeRoot","spec","root","Array","isArray","GenerativeUIRender","t0","$","t1","nodes","t2","t3","displayName","MessagePrimitiveGenerativeUI","Props","storeSpec","_temp","partSpec","s","part","type"],"sources":["../../../../src/react/primitives/generativeUI/GenerativeUI.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ComponentType,\n type FC,\n type ReactNode,\n createElement,\n useMemo,\n} from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport type {\n GenerativeUINode,\n GenerativeUISpec,\n} from \"../../../types/message\";\nimport type {\n GenerativeUIComponentRegistry,\n GenerativeUIRenderProps,\n} from \"../../types/MessagePartComponentTypes\";\n\n/**\n * Thrown when a generative-ui spec references a component name that is not\n * present in the consumer-provided allowlist. The allowlist is the security\n * boundary in the same-realm rendering path — there is no fallback by\n * default. Pass `Fallback` to opt into a soft-fail UX.\n */\nexport class GenerativeUIRenderError extends Error {\n public readonly componentName: string;\n\n constructor(\n componentName: string,\n message = `Component \"${componentName}\" is not in the generative-ui allowlist.`,\n ) {\n super(message);\n this.name = \"GenerativeUIRenderError\";\n this.componentName = componentName;\n }\n}\n\nconst isObjectNode = (\n node: GenerativeUINode,\n): node is Exclude<GenerativeUINode, string> =>\n typeof node === \"object\" && node !== null;\n\nconst renderNode = (\n node: GenerativeUINode | undefined,\n components: GenerativeUIComponentRegistry,\n Fallback: GenerativeUIRenderProps[\"Fallback\"],\n path: string,\n): ReactNode => {\n if (node === undefined || node === null) return null;\n\n if (typeof node === \"string\") return node;\n\n if (!isObjectNode(node) || !(\"component\" in node)) {\n if (\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n ) {\n console.warn(`[generative-ui] Skipping malformed node at ${path}:`, node);\n }\n return null;\n }\n\n const { component, props, children, key } = node;\n\n const Resolved = components[component];\n if (!Resolved) {\n if (Fallback) {\n return <Fallback key={key ?? path} component={component} props={props} />;\n }\n throw new GenerativeUIRenderError(component);\n }\n\n const renderedChildren = children?.length\n ? children.map((child, i) =>\n renderNode(child, components, Fallback, `${path}/${i}`),\n )\n : undefined;\n\n return createElement(\n Resolved,\n { ...(props ?? {}), key: key ?? path },\n ...(renderedChildren ?? []),\n );\n};\n\nconst normalizeRoot = (\n spec: GenerativeUISpec | undefined,\n): readonly GenerativeUINode[] => {\n if (!spec || spec.root === undefined || spec.root === null) return [];\n const root = spec.root;\n return Array.isArray(root)\n ? (root as readonly GenerativeUINode[])\n : [root as GenerativeUINode];\n};\n\n/**\n * Internal renderer. Resolves a {@link GenerativeUISpec} against the consumer\n * allowlist. Used by `MessagePrimitive.GenerativeUI` and by\n * `MessagePrimitive.Parts` when handling a `generative-ui` part.\n */\nexport const GenerativeUIRender: FC<GenerativeUIRenderProps> = ({\n spec,\n components,\n Fallback,\n}) => {\n const nodes = useMemo(() => normalizeRoot(spec), [spec]);\n\n return (\n <>\n {nodes.map((node, i) => renderNode(node, components, Fallback, `${i}`))}\n </>\n );\n};\n\nGenerativeUIRender.displayName = \"GenerativeUIRender\";\n\nexport namespace MessagePrimitiveGenerativeUI {\n export type Props = {\n /**\n * The component allowlist. Keys are the names referenced in the spec\n * (e.g. `\"Card\"`, `\"Button\"`), values are the React components.\n *\n * This is the security boundary — any name not in the allowlist is\n * rejected with {@link GenerativeUIRenderError}.\n */\n components: GenerativeUIComponentRegistry;\n /**\n * Optional override spec. If omitted, the primitive reads the\n * `generative-ui` part from the surrounding `MessagePartProvider` /\n * `PartByIndexProvider` context.\n */\n spec?: GenerativeUISpec | undefined;\n /** Optional fallback for unknown component names. */\n Fallback?:\n | ComponentType<{ component: string; props?: unknown }>\n | undefined;\n };\n}\n\n/**\n * Renders a generative-ui message part using a consumer-provided allowlist.\n *\n * The agent emits a `generative-ui` message part containing a JSON spec\n * (see {@link GenerativeUISpec}). This primitive walks the spec and resolves\n * each `component` name against the allowlist. Names not in the allowlist\n * throw {@link GenerativeUIRenderError} unless a `Fallback` is provided.\n *\n * Stream-friendly: a partial spec renders progressively as it is filled in.\n *\n * @example\n * ```tsx\n * <MessagePrimitive.GenerativeUI\n * components={{ Card: MyCard, Button: MyButton }}\n * />\n * ```\n */\nexport const MessagePrimitiveGenerativeUI: FC<\n MessagePrimitiveGenerativeUI.Props\n> = ({ components, spec, Fallback }) => {\n // Selector reads store state only — combining with the `spec` prop inside\n // the selector closes over a value that may change identity per render and\n // would trigger spurious tearing-detection re-renders in\n // `useSyncExternalStore`.\n const storeSpec = useAuiState((s) => {\n const part = s.part as { type?: string; spec?: GenerativeUISpec };\n return part?.type === \"generative-ui\" ? part.spec : undefined;\n });\n const partSpec = spec ?? storeSpec;\n\n if (!partSpec) return null;\n\n return (\n <GenerativeUIRender\n spec={partSpec}\n components={components}\n Fallback={Fallback}\n />\n );\n};\n\nMessagePrimitiveGenerativeUI.displayName = \"MessagePrimitive.GenerativeUI\";\n"],"mappings":";;;;;;;;;;;;AAyBA,IAAaY,0BAAb,cAA6CC,MAAM;CACjD;CAEAE,YACED,eACAE,UAAU,cAAcF,cAAa,2CACrC;EACA,MAAME,OAAO;EACb,KAAKC,OAAO;EACZ,KAAKH,gBAAgBA;CACvB;AACF;AAEA,MAAMI,gBACJC,SAEA,OAAOA,SAAS,YAAYA,SAAS;AAEvC,MAAME,cACJF,MACAG,Y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,OAJFC;AAIE;AAINK,6BAA6BD,cAAc;AAtBvC,SAAAI,MAAAE,GAAA;CAMA,MAAAC,OAAaD,EAACC;CAAoD,OAC3DA,MAAIC,SAAW,kBAAkBD,KAAIlB,OAArCjB,KAAAA;AAAsD"}
1
+ {"version":3,"file":"GenerativeUI.js","names":["c","_c","ComponentType","FC","ReactNode","createElement","useMemo","useAuiState","GenerativeUINode","GenerativeUISpec","GenerativeUIComponentRegistry","GenerativeUIRenderProps","GenerativeUIRenderError","Error","componentName","constructor","message","name","isObjectNode","node","Exclude","renderNode","components","Fallback","path","undefined","component","process","env","NODE_ENV","console","warn","props","children","key","Resolved","renderedChildren","length","map","child","i","normalizeRoot","spec","root","Array","isArray","GenerativeUIRender","t0","$","t1","nodes","t2","t3","displayName","MessagePrimitiveGenerativeUI","Props","storeSpec","_temp","partSpec","s","part","type"],"sources":["../../../../src/react/primitives/generativeUI/GenerativeUI.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ComponentType,\n type FC,\n type ReactNode,\n createElement,\n useMemo,\n} from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport type {\n GenerativeUINode,\n GenerativeUISpec,\n} from \"../../../types/message\";\nimport type {\n GenerativeUIComponentRegistry,\n GenerativeUIRenderProps,\n} from \"../../types/MessagePartComponentTypes\";\n\n/**\n * Thrown when a generative-ui spec references a component name that is not\n * present in the consumer-provided allowlist. The allowlist is the security\n * boundary in the same-realm rendering path — there is no fallback by\n * default. Pass `Fallback` to opt into a soft-fail UX.\n */\nexport class GenerativeUIRenderError extends Error {\n public readonly componentName: string;\n\n constructor(\n componentName: string,\n message = `Component \"${componentName}\" is not in the generative-ui allowlist.`,\n ) {\n super(message);\n this.name = \"GenerativeUIRenderError\";\n this.componentName = componentName;\n }\n}\n\nconst isObjectNode = (\n node: GenerativeUINode,\n): node is Exclude<GenerativeUINode, string> =>\n typeof node === \"object\" && node !== null;\n\nconst renderNode = (\n node: GenerativeUINode | undefined,\n components: GenerativeUIComponentRegistry,\n Fallback: GenerativeUIRenderProps[\"Fallback\"],\n path: string,\n): ReactNode => {\n if (node === undefined || node === null) return null;\n\n if (typeof node === \"string\") return node;\n\n if (\n !isObjectNode(node) ||\n !(\"component\" in node) ||\n typeof node.component !== \"string\"\n ) {\n if (\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n ) {\n console.warn(`[generative-ui] Skipping malformed node at ${path}:`, node);\n }\n return null;\n }\n\n const { component, props, children, key } = node;\n\n const Resolved = components[component];\n if (!Resolved) {\n if (Fallback) {\n return <Fallback key={key ?? path} component={component} props={props} />;\n }\n throw new GenerativeUIRenderError(component);\n }\n\n const renderedChildren = children?.length\n ? children.map((child, i) =>\n renderNode(child, components, Fallback, `${path}/${i}`),\n )\n : undefined;\n\n return createElement(\n Resolved,\n { ...(props ?? {}), key: key ?? path },\n ...(renderedChildren ?? []),\n );\n};\n\nconst normalizeRoot = (\n spec: GenerativeUISpec | undefined,\n): readonly GenerativeUINode[] => {\n if (!spec || spec.root === undefined || spec.root === null) return [];\n const root = spec.root;\n return Array.isArray(root)\n ? (root as readonly GenerativeUINode[])\n : [root as GenerativeUINode];\n};\n\n/**\n * Internal renderer. Resolves a {@link GenerativeUISpec} against the consumer\n * allowlist. Used by `MessagePrimitive.GenerativeUI` and by\n * `MessagePrimitive.Parts` when handling a `generative-ui` part.\n */\nexport const GenerativeUIRender: FC<GenerativeUIRenderProps> = ({\n spec,\n components,\n Fallback,\n}) => {\n const nodes = useMemo(() => normalizeRoot(spec), [spec]);\n\n return (\n <>\n {nodes.map((node, i) => renderNode(node, components, Fallback, `${i}`))}\n </>\n );\n};\n\nGenerativeUIRender.displayName = \"GenerativeUIRender\";\n\nexport namespace MessagePrimitiveGenerativeUI {\n export type Props = {\n /**\n * The component allowlist. Keys are the names referenced in the spec\n * (e.g. `\"Card\"`, `\"Button\"`), values are the React components.\n *\n * This is the security boundary — any name not in the allowlist is\n * rejected with {@link GenerativeUIRenderError}.\n */\n components: GenerativeUIComponentRegistry;\n /**\n * Optional override spec. If omitted, the primitive reads the\n * `generative-ui` part from the surrounding `MessagePartProvider` /\n * `PartByIndexProvider` context.\n */\n spec?: GenerativeUISpec | undefined;\n /** Optional fallback for unknown component names. */\n Fallback?:\n | ComponentType<{ component: string; props?: unknown }>\n | undefined;\n };\n}\n\n/**\n * Renders a generative-ui message part using a consumer-provided allowlist.\n *\n * The agent emits a `generative-ui` message part containing a JSON spec\n * (see {@link GenerativeUISpec}). This primitive walks the spec and resolves\n * each `component` name against the allowlist. Names not in the allowlist\n * throw {@link GenerativeUIRenderError} unless a `Fallback` is provided.\n *\n * Stream-friendly: a partial spec renders progressively as it is filled in.\n *\n * @example\n * ```tsx\n * <MessagePrimitive.GenerativeUI\n * components={{ Card: MyCard, Button: MyButton }}\n * />\n * ```\n */\nexport const MessagePrimitiveGenerativeUI: FC<\n MessagePrimitiveGenerativeUI.Props\n> = ({ components, spec, Fallback }) => {\n // Selector reads store state only — combining with the `spec` prop inside\n // the selector closes over a value that may change identity per render and\n // would trigger spurious tearing-detection re-renders in\n // `useSyncExternalStore`.\n const storeSpec = useAuiState((s) => {\n const part = s.part as { type?: string; spec?: GenerativeUISpec };\n return part?.type === \"generative-ui\" ? part.spec : undefined;\n });\n const partSpec = spec ?? storeSpec;\n\n if (!partSpec) return null;\n\n return (\n <GenerativeUIRender\n spec={partSpec}\n components={components}\n Fallback={Fallback}\n />\n );\n};\n\nMessagePrimitiveGenerativeUI.displayName = \"MessagePrimitive.GenerativeUI\";\n"],"mappings":";;;;;;;;;;;;AAyBA,IAAaY,0BAAb,cAA6CC,MAAM;CACjD;CAEAE,YACED,eACAE,UAAU,cAAcF,cAAa,2CACrC;EACA,MAAME,OAAO;EACb,KAAKC,OAAO;EACZ,KAAKH,gBAAgBA;CACvB;AACF;AAEA,MAAMI,gBACJC,SAEA,OAAOA,SAAS,YAAYA,SAAS;AAEvC,MAAME,cACJF,MACAG,YACAC,UACAC,SACc;CACd,IAAIL,SAASM,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IE;AAINK,6BAA6BD,cAAc;AAtBvC,SAAAI,MAAAE,GAAA;CAMA,MAAAC,OAAaD,EAACC;CAAoD,OAC3DA,MAAIC,SAAW,kBAAkBD,KAAIlB,OAArCjB,KAAAA;AAAsD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assistant-ui/core",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "description": "Framework-agnostic core runtime for assistant-ui",
5
5
  "keywords": [
6
6
  "assistant",
@@ -59,7 +59,7 @@
59
59
  ],
60
60
  "sideEffects": false,
61
61
  "dependencies": {
62
- "assistant-stream": "^0.3.24",
62
+ "assistant-stream": "^0.3.25",
63
63
  "nanoid": "^5.1.15"
64
64
  },
65
65
  "optionalDevDependencies": {
@@ -94,8 +94,8 @@
94
94
  "zustand": "^5.0.14",
95
95
  "@assistant-ui/store": "0.2.19",
96
96
  "@assistant-ui/tap": "0.9.3",
97
- "@assistant-ui/vite": "0.0.6",
98
- "@assistant-ui/x-buildutils": "0.0.16",
97
+ "@assistant-ui/vite": "0.0.8",
98
+ "@assistant-ui/x-buildutils": "0.0.17",
99
99
  "assistant-cloud": "0.1.34"
100
100
  },
101
101
  "publishConfig": {
@@ -51,7 +51,11 @@ const renderNode = (
51
51
 
52
52
  if (typeof node === "string") return node;
53
53
 
54
- if (!isObjectNode(node) || !("component" in node)) {
54
+ if (
55
+ !isObjectNode(node) ||
56
+ !("component" in node) ||
57
+ typeof node.component !== "string"
58
+ ) {
55
59
  if (
56
60
  typeof process !== "undefined" &&
57
61
  process.env?.NODE_ENV !== "production"