@copilotkit/react-core 2.0.0-rc.41 → 2.0.0-rc.43
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.
- package/dist/{MarkdownRendererContext-BL8ct_3U.d.mts → MarkdownRendererContext-CytkPOAJ.d.mts} +1 -1
- package/dist/{MarkdownRendererContext-BL8ct_3U.d.mts.map → MarkdownRendererContext-CytkPOAJ.d.mts.map} +1 -1
- package/dist/MarkdownSurfaces-DlYqJkAE.mjs +135 -0
- package/dist/MarkdownSurfaces-DlYqJkAE.mjs.map +1 -0
- package/dist/MarkdownSurfaces-DytbRzj2.cjs +141 -0
- package/dist/MarkdownSurfaces-DytbRzj2.cjs.map +1 -0
- package/dist/{MarkdownSurfaces-Byz821bg.mjs → ProviderMarkdown-BZaPDROY.mjs} +6 -132
- package/dist/ProviderMarkdown-BZaPDROY.mjs.map +1 -0
- package/dist/{MarkdownSurfaces-D2Ck-cbb.cjs → ProviderMarkdown-i_i2osOH.cjs} +4 -136
- package/dist/ProviderMarkdown-i_i2osOH.cjs.map +1 -0
- package/dist/accessibility-BLK-gE0R.mjs +129 -0
- package/dist/accessibility-BLK-gE0R.mjs.map +1 -0
- package/dist/accessibility-GnodqxkH.cjs +228 -0
- package/dist/accessibility-GnodqxkH.cjs.map +1 -0
- package/dist/{chat-Bf0vVdo7.mjs → chat-B1zczXUD.mjs} +21 -145
- package/dist/chat-B1zczXUD.mjs.map +1 -0
- package/dist/{chat-DgP2N7bD.d.mts → chat-C5XWeO1M.d.mts} +1 -1
- package/dist/{chat-DgP2N7bD.d.mts.map → chat-C5XWeO1M.d.mts.map} +1 -1
- package/dist/{chat-D3fxo6Ah.cjs → chat-CkFZMo5E.cjs} +29 -234
- package/dist/chat-CkFZMo5E.cjs.map +1 -0
- package/dist/context.cjs +2 -2
- package/dist/context.cjs.map +1 -1
- package/dist/context.d.cts +2 -2
- package/dist/context.d.mts +2 -2
- package/dist/context.mjs +2 -2
- package/dist/context.mjs.map +1 -1
- package/dist/generative-ui/native.cjs +9 -8
- package/dist/generative-ui/native.cjs.map +1 -1
- package/dist/generative-ui/native.d.cts.map +1 -1
- package/dist/generative-ui/native.d.mts +2 -2
- package/dist/generative-ui/native.d.mts.map +1 -1
- package/dist/generative-ui/native.mjs +4 -3
- package/dist/generative-ui/native.mjs.map +1 -1
- package/dist/generative-ui.cjs +11 -5767
- package/dist/generative-ui.cjs.map +1 -1
- package/dist/generative-ui.d.mts +4 -4
- package/dist/generative-ui.mjs +8 -5764
- package/dist/generative-ui.mjs.map +1 -1
- package/dist/{hooks-BRYonCVu.d.mts → hooks-DqsOIh8A.d.mts} +3 -3
- package/dist/{hooks-BRYonCVu.d.mts.map → hooks-DqsOIh8A.d.mts.map} +1 -1
- package/dist/index.cjs +180 -681
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -102
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +11 -104
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +64 -407
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +6132 -795
- package/dist/index.umd.js.map +1 -1
- package/dist/{refs-BIUfn1wb.cjs → refs-B5Dn59Pn.cjs} +2 -2
- package/dist/{refs-BIUfn1wb.cjs.map → refs-B5Dn59Pn.cjs.map} +1 -1
- package/dist/{refs-CMrRm3ta.mjs → refs-BW15wX_V.mjs} +1 -1
- package/dist/{refs-CMrRm3ta.mjs.map → refs-BW15wX_V.mjs.map} +1 -1
- package/dist/standard-CqGTZUZy.cjs +5780 -0
- package/dist/standard-CqGTZUZy.cjs.map +1 -0
- package/dist/standard-s8jByRiE.mjs +5784 -0
- package/dist/standard-s8jByRiE.mjs.map +1 -0
- package/dist/{use-generative-ui-root-C12htqbK.cjs → use-generative-ui-root-CIp0ytE6.cjs} +3 -3
- package/dist/{use-generative-ui-root-C12htqbK.cjs.map → use-generative-ui-root-CIp0ytE6.cjs.map} +1 -1
- package/dist/{use-generative-ui-root-CVgsDy1f.mjs → use-generative-ui-root-oBqPa6uy.mjs} +3 -2
- package/dist/{use-generative-ui-root-CVgsDy1f.mjs.map → use-generative-ui-root-oBqPa6uy.mjs.map} +1 -1
- package/package.json +7 -10
- package/dist/MarkdownSurfaces-Byz821bg.mjs.map +0 -1
- package/dist/MarkdownSurfaces-D2Ck-cbb.cjs.map +0 -1
- package/dist/chat-Bf0vVdo7.mjs.map +0 -1
- package/dist/chat-D3fxo6Ah.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.mjs","names":["useGenerativeUIRootImpl"],"sources":["../../src/generative-ui/native.ts"],"sourcesContent":["// The `@copilotkit/react-core/generative-ui/native` entry: generative UI\n// without the DOM. It has the catalog API, the hooks and the surface\n// renderer, and leaves out what only a browser can run: the standard\n// catalog (DOM components, portals, KaTeX), the markdown surfaces\n// (streamdown) and the DOM `<GenerativeUISurface>` mount. A platform gives\n// its host elements through `GenerativeUIHostContext`. That context defaults\n// to the DOM host, which renders HTML elements, so a platform\n// without a DOM MUST provide its own host above every surface it renders.\n// Nothing checks that it did: without one, on React Native, the `<div>` of\n// the surface root fails to render, the surface fallback (a `<div>` too)\n// fails as well, and the surface renders nothing; only the reported errors\n// show it. `@copilotkit/react-native/generative-ui` is built on this entry,\n// and its `GenerativeUIProvider` provides the native host.\n//\n// It is built together with the root entry and `/generative-ui`, so the three\n// entries share one copy of each React context.\n\n// The catalog API, as in `/generative-ui`.\nexport { createGenerativeUI } from \"./catalog\";\nexport type {\n CreateGenerativeUIConfig,\n GenerativeUI,\n GenerativeUIComponentDefinition,\n GenerativeUIComponentName,\n GenerativeUIComponentProps,\n GenerativeUIEventDefinition,\n GenerativeUIFunctionArgs,\n GenerativeUIFunctionDefinition,\n GenerativeUIFunctionInput,\n GenerativeUIFunctionName,\n GenerativeUISlotKind,\n GenerativeUIStateOf,\n} from \"./catalog\";\nexport { child, childList } from \"./refs\";\nexport { exportA2UICatalog } from \"@copilotkit/shared/generative-ui\";\nexport type { ExportA2UICatalogOptions } from \"@copilotkit/shared/generative-ui\";\nexport { useGenerativeUIAccessibility } from \"./accessibility\";\nexport type {\n GenerativeUIAccessibility,\n GenerativeUIAriaAttributes,\n} from \"./accessibility\";\nexport { GenerativeUIError } from \"@copilotkit/shared/generative-ui\";\nexport type {\n GenerativeUIErrorCode,\n GenerativeUIErrorInfo,\n GenerativeUIEventHandler,\n GenerativeUIInvokeResult,\n} from \"@copilotkit/shared/generative-ui\";\nexport type {\n GenerativeUIConfig,\n GenerativeUIErrorBoundaryConfig,\n GenerativeUIMarkdownConfig,\n GenerativeUITheme,\n GenerativeUIToolConfig,\n} from \"./runtime-context\";\nexport { useGenerativeUIRuntime } from \"./runtime-context\";\nexport { useGenerativeUIFunction, useGenerativeUIState } from \"./hooks\";\n\n// The plumbing that a platform package uses to build its provider and\n// surfaces.\nimport { useGenerativeUIRoot as useGenerativeUIRootImpl } from \"./use-generative-ui-root\";\nimport type { CopilotKitCoreReact } from \"../context\";\nimport type {\n GenerativeUIConfig,\n GenerativeUIRuntime,\n} from \"./runtime-context\";\n/**\n * Provider-side wiring: the surface manager, the agent subscriptions and the\n * envelope of each run. Typed with the `CopilotKitCoreReact` of\n * `/context`, which is the instance a React Native provider holds.\n *\n * In source it is the same class that `use-generative-ui-root.ts` imports\n * from `../lib/react-core`, so no cast is needed. The annotation is for the\n * emitted declarations: `../context` is external to the build, so they import\n * the class from `@copilotkit/react-core/context`. Re-exported as is, the\n * hook would be declared with a copy of the class from a bundled chunk, which\n * the `/context` instance is not assignable to (the class has private\n * members). `scripts/assert-dist-context-types.mjs` checks this.\n */\nexport const useGenerativeUIRoot: (\n copilotkit: CopilotKitCoreReact,\n config: GenerativeUIConfig | undefined,\n) => GenerativeUIRuntime | null = useGenerativeUIRootImpl;\nexport {\n GenerativeUIRuntimeContext,\n useRequiredGenerativeUIRuntime,\n} from \"./runtime-context\";\nexport type { GenerativeUIRuntime } from \"./runtime-context\";\nexport { useManagerVersion } from \"./hooks\";\nexport { SurfaceView } from \"./SurfaceView\";\nexport { GenerativeUIToolCallRenderer } from \"./chat\";\nexport {\n GenerativeUISurfaceContentSchema,\n parseGenerativeUISurfaceContent,\n useGenerativeUIActivitySurface,\n useGenerativeUIRejected,\n} from \"./activity\";\nexport type { ParsedGenerativeUISurfaceContent } from \"./activity\";\nexport type { GenerativeUIChatSurfaceProps } from \"./chat\";\nexport { GenerativeUIHostContext, useGenerativeUIHost } from \"./host\";\nexport type {\n GenerativeUIAccessibilityWrapperProps,\n GenerativeUIHost,\n GenerativeUINodeFallbackProps,\n GenerativeUISurfaceRootProps,\n} from \"./host\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"native.mjs","names":["useGenerativeUIRootImpl"],"sources":["../../src/generative-ui/native.ts"],"sourcesContent":["// The `@copilotkit/react-core/generative-ui/native` entry: generative UI\n// without the DOM. It has the catalog API, the hooks and the surface\n// renderer, and leaves out what only a browser can run: the standard\n// catalog (DOM components, portals, KaTeX), the markdown surfaces\n// (streamdown) and the DOM `<GenerativeUISurface>` mount. A platform gives\n// its host elements through `GenerativeUIHostContext`. That context defaults\n// to the DOM host, which renders HTML elements, so a platform\n// without a DOM MUST provide its own host above every surface it renders.\n// Nothing checks that it did: without one, on React Native, the `<div>` of\n// the surface root fails to render, the surface fallback (a `<div>` too)\n// fails as well, and the surface renders nothing; only the reported errors\n// show it. `@copilotkit/react-native/generative-ui` is built on this entry,\n// and its `GenerativeUIProvider` provides the native host.\n//\n// It is built together with the root entry and `/generative-ui`, so the three\n// entries share one copy of each React context.\n\n// The catalog API, as in `/generative-ui`.\nexport { createGenerativeUI } from \"./catalog\";\nexport type {\n CreateGenerativeUIConfig,\n GenerativeUI,\n GenerativeUIComponentDefinition,\n GenerativeUIComponentName,\n GenerativeUIComponentProps,\n GenerativeUIEventDefinition,\n GenerativeUIFunctionArgs,\n GenerativeUIFunctionDefinition,\n GenerativeUIFunctionInput,\n GenerativeUIFunctionName,\n GenerativeUISlotKind,\n GenerativeUIStateOf,\n} from \"./catalog\";\nexport { child, childList } from \"./refs\";\nexport { exportA2UICatalog } from \"@copilotkit/shared/generative-ui\";\nexport type { ExportA2UICatalogOptions } from \"@copilotkit/shared/generative-ui\";\nexport { useGenerativeUIAccessibility } from \"./accessibility\";\nexport type {\n GenerativeUIAccessibility,\n GenerativeUIAriaAttributes,\n} from \"./accessibility\";\nexport { GenerativeUIError } from \"@copilotkit/shared/generative-ui\";\nexport type {\n GenerativeUIErrorCode,\n GenerativeUIErrorInfo,\n GenerativeUIEventHandler,\n GenerativeUIInvokeResult,\n} from \"@copilotkit/shared/generative-ui\";\nexport type {\n GenerativeUIConfig,\n GenerativeUIErrorBoundaryConfig,\n GenerativeUIMarkdownConfig,\n GenerativeUITheme,\n GenerativeUIToolConfig,\n} from \"./runtime-context\";\nexport { useGenerativeUIRuntime } from \"./runtime-context\";\nexport { useGenerativeUIFunction, useGenerativeUIState } from \"./hooks\";\n\n// The plumbing that a platform package uses to build its provider and\n// surfaces.\nimport { useGenerativeUIRoot as useGenerativeUIRootImpl } from \"./use-generative-ui-root\";\nimport type { CopilotKitCoreReact } from \"../context\";\nimport type {\n GenerativeUIConfig,\n GenerativeUIRuntime,\n} from \"./runtime-context\";\n/**\n * Provider-side wiring: the surface manager, the agent subscriptions and the\n * envelope of each run. Typed with the `CopilotKitCoreReact` of\n * `/context`, which is the instance a React Native provider holds.\n *\n * In source it is the same class that `use-generative-ui-root.ts` imports\n * from `../lib/react-core`, so no cast is needed. The annotation is for the\n * emitted declarations: `../context` is external to the build, so they import\n * the class from `@copilotkit/react-core/context`. Re-exported as is, the\n * hook would be declared with a copy of the class from a bundled chunk, which\n * the `/context` instance is not assignable to (the class has private\n * members). `scripts/assert-dist-context-types.mjs` checks this.\n */\nexport const useGenerativeUIRoot: (\n copilotkit: CopilotKitCoreReact,\n config: GenerativeUIConfig | undefined,\n) => GenerativeUIRuntime | null = useGenerativeUIRootImpl;\nexport {\n GenerativeUIRuntimeContext,\n useRequiredGenerativeUIRuntime,\n} from \"./runtime-context\";\nexport type { GenerativeUIRuntime } from \"./runtime-context\";\nexport { useManagerVersion } from \"./hooks\";\nexport { SurfaceView } from \"./SurfaceView\";\nexport { GenerativeUIToolCallRenderer } from \"./chat\";\nexport {\n GenerativeUISurfaceContentSchema,\n parseGenerativeUISurfaceContent,\n useGenerativeUIActivitySurface,\n useGenerativeUIRejected,\n} from \"./activity\";\nexport type { ParsedGenerativeUISurfaceContent } from \"./activity\";\nexport type { GenerativeUIChatSurfaceProps } from \"./chat\";\nexport { GenerativeUIHostContext, useGenerativeUIHost } from \"./host\";\nexport type {\n GenerativeUIAccessibilityWrapperProps,\n GenerativeUIHost,\n GenerativeUINodeFallbackProps,\n GenerativeUISurfaceRootProps,\n} from \"./host\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+EA,MAAa,sBAGqBA"}
|