@copilotkit/react-native 2.0.0-rc.11 → 2.0.0-rc.12

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,4 +1,4 @@
1
- import { r as MarkdownStyle } from "./Markdown-1ips7myr.cjs";
1
+ import { r as MarkdownStyle } from "./Markdown-DzjnSuu5.cjs";
2
2
  import React, { ReactNode } from "react";
3
3
  import { CopilotKitCoreErrorCode, CopilotKitMessageFilter } from "@copilotkit/core";
4
4
  import { DebugConfig } from "@copilotkit/shared";
@@ -118,4 +118,4 @@ interface CopilotKitNativeProviderProps {
118
118
  declare const CopilotKitProvider: React.FC<CopilotKitNativeProviderProps>;
119
119
  //#endregion
120
120
  export { NativeMarkdownRendererProps as a, NativeMarkdownRenderer as i, CopilotKitProvider as n, useMarkdownRenderer as o, MarkdownRendererProvider as r, CopilotKitNativeProviderProps as t };
121
- //# sourceMappingURL=CopilotKitProvider-Btm10msB.d.cts.map
121
+ //# sourceMappingURL=CopilotKitProvider-BOaKT5J9.d.cts.map
@@ -1,4 +1,4 @@
1
- import { r as MarkdownStyle } from "./Markdown-Bl3qS5hQ.mjs";
1
+ import { r as MarkdownStyle } from "./Markdown-a-rdG22_.mjs";
2
2
  import React, { ReactNode } from "react";
3
3
  import { DebugConfig } from "@copilotkit/shared";
4
4
  import { CopilotKitCoreErrorCode, CopilotKitMessageFilter } from "@copilotkit/core";
@@ -118,4 +118,4 @@ interface CopilotKitNativeProviderProps {
118
118
  declare const CopilotKitProvider: React.FC<CopilotKitNativeProviderProps>;
119
119
  //#endregion
120
120
  export { NativeMarkdownRendererProps as a, NativeMarkdownRenderer as i, CopilotKitProvider as n, useMarkdownRenderer as o, MarkdownRendererProvider as r, CopilotKitNativeProviderProps as t };
121
- //# sourceMappingURL=CopilotKitProvider-DzDWD_Vp.d.mts.map
121
+ //# sourceMappingURL=CopilotKitProvider-DcRVO6WN.d.mts.map
@@ -2,8 +2,8 @@ const require_MarkdownRendererContext = require('./MarkdownRendererContext-BRNe8
2
2
  let react = require("react");
3
3
  react = require_MarkdownRendererContext.__toESM(react);
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
- let _copilotkit_markdown_renderer_react_native = require("@copilotkit/markdown-renderer/react-native");
6
- let _copilotkit_markdown_renderer = require("@copilotkit/markdown-renderer");
5
+ let _copilotkit_markdown_react_native = require("@copilotkit/markdown/react-native");
6
+ let _copilotkit_markdown = require("@copilotkit/markdown");
7
7
 
8
8
  //#region src/components/Markdown.tsx
9
9
  /**
@@ -12,12 +12,12 @@ let _copilotkit_markdown_renderer = require("@copilotkit/markdown-renderer");
12
12
  * @public
13
13
  */
14
14
  const defaultMarkdownStyles = {
15
- ..._copilotkit_markdown_renderer_react_native.defaultMarkdownStyles,
16
- code: _copilotkit_markdown_renderer_react_native.defaultMarkdownStyles.inlineCode
15
+ ..._copilotkit_markdown_react_native.defaultMarkdownStyles,
16
+ code: _copilotkit_markdown_react_native.defaultMarkdownStyles.inlineCode
17
17
  };
18
18
  /**
19
19
  * GFM markdown renderer for React Native. Delegates to the shared
20
- * `StreamingMarkdownRenderer` from `@copilotkit/markdown-renderer/react-native`.
20
+ * `StreamingMarkdownRenderer` from `@copilotkit/markdown/react-native`.
21
21
  *
22
22
  * Public API is backward-compatible with the previous basic renderer:
23
23
  * - `CopilotMarkdownProps` — same shape.
@@ -27,7 +27,7 @@ const defaultMarkdownStyles = {
27
27
  * @public
28
28
  */
29
29
  function CopilotMarkdown({ content, style, streamingAnimation = false }) {
30
- (0, _copilotkit_markdown_renderer.warnUnsupportedRichSyntaxOnce)(content);
30
+ (0, _copilotkit_markdown.warnUnsupportedRichSyntaxOnce)(content);
31
31
  let resolvedStyle = style;
32
32
  if (style?.code !== void 0) {
33
33
  const { code, ...rest } = style;
@@ -36,7 +36,7 @@ function CopilotMarkdown({ content, style, streamingAnimation = false }) {
36
36
  inlineCode: rest.inlineCode ?? code
37
37
  };
38
38
  }
39
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_copilotkit_markdown_renderer_react_native.StreamingMarkdownRenderer, {
39
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_copilotkit_markdown_react_native.StreamingMarkdownRenderer, {
40
40
  content,
41
41
  isComplete: true,
42
42
  style: resolvedStyle,
@@ -57,4 +57,4 @@ Object.defineProperty(exports, 'defaultMarkdownStyles', {
57
57
  return defaultMarkdownStyles;
58
58
  }
59
59
  });
60
- //# sourceMappingURL=Markdown-C4dvKQXJ.cjs.map
60
+ //# sourceMappingURL=Markdown-CaYHlD4j.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown-CaYHlD4j.cjs","names":["_streamingDefaultStyles","StreamingMarkdownRenderer"],"sources":["../src/components/Markdown.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n StreamingMarkdownRenderer,\n defaultMarkdownStyles as _streamingDefaultStyles,\n} from \"@copilotkit/markdown/react-native\";\nimport type { MarkdownStyle as StreamingMarkdownStyle } from \"@copilotkit/markdown/react-native\";\nimport { warnUnsupportedRichSyntaxOnce } from \"@copilotkit/markdown\";\n\n/**\n * Style map for CopilotMarkdown. Each key maps a node type to a React Native\n * style object. Extends the streaming renderer's style keys with a `code`\n * shorthand kept for backward compatibility (`list` already exists on the\n * base style and needs no alias).\n *\n * @public\n */\nexport type MarkdownStyle = StreamingMarkdownStyle & {\n /** Alias for `inlineCode`; kept for backward compatibility. */\n code?: Record<string, unknown>;\n};\n\n/**\n * Default styles that ship with CopilotMarkdown.\n *\n * @public\n */\nexport const defaultMarkdownStyles: MarkdownStyle = {\n ..._streamingDefaultStyles,\n // Back-compat alias: `code` = same as `inlineCode`\n code: _streamingDefaultStyles.inlineCode,\n};\n\nexport interface CopilotMarkdownProps {\n content: string;\n style?: MarkdownStyle;\n /**\n * Toggles `Intl.Segmenter`-based token segmentation in the parser. Defaults\n * to `false` (Hermes-safe: no Segmenter needed). Note: the React Native\n * renderer renders text directly and does not perform per-token fade-in\n * animation, so this currently has no visual effect — it is accepted for\n * backward compatibility.\n */\n streamingAnimation?: boolean;\n}\n\n/**\n * GFM markdown renderer for React Native. Delegates to the shared\n * `StreamingMarkdownRenderer` from `@copilotkit/markdown/react-native`.\n *\n * Public API is backward-compatible with the previous basic renderer:\n * - `CopilotMarkdownProps` — same shape.\n * - `MarkdownStyle` / `defaultMarkdownStyles` — same exports.\n * - `streamingAnimation` maps to `animate` (defaults `false` = Hermes-safe).\n *\n * @public\n */\nexport function CopilotMarkdown({\n content,\n style,\n streamingAnimation = false,\n}: CopilotMarkdownProps): React.ReactElement | null {\n // Translate the back-compat `code` alias onto `inlineCode` — the key the\n // streaming renderer actually reads. Without this, a caller migrating from\n // the previous renderer who passes `style={{ code: ... }}` would silently\n // lose inline-code styling. An explicit `inlineCode` wins over the alias.\n // Dev-only: nudge upgraders from the bundled Streamdown default when their\n // content needs math/syntax highlighting the built-in renderer doesn't do.\n warnUnsupportedRichSyntaxOnce(content);\n\n let resolvedStyle = style as StreamingMarkdownStyle | undefined;\n if (style?.code !== undefined) {\n const { code, ...rest } = style;\n resolvedStyle = {\n ...(rest as StreamingMarkdownStyle),\n inlineCode: (rest as StreamingMarkdownStyle).inlineCode ?? code,\n };\n }\n return (\n <StreamingMarkdownRenderer\n content={content}\n isComplete={true}\n style={resolvedStyle}\n animate={streamingAnimation}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA0BA,MAAa,wBAAuC;CAClD,GAAGA;CAEH,MAAMA,wDAAwB;CAC/B;;;;;;;;;;;;AA0BD,SAAgB,gBAAgB,EAC9B,SACA,OACA,qBAAqB,SAC6B;AAOlD,yDAA8B,QAAQ;CAEtC,IAAI,gBAAgB;AACpB,KAAI,OAAO,SAAS,QAAW;EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS;AAC1B,kBAAgB;GACd,GAAI;GACJ,YAAa,KAAgC,cAAc;GAC5D;;AAEH,QACE,2CAACC;EACU;EACT,YAAY;EACZ,OAAO;EACP,SAAS;GACT"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { MarkdownStyle } from "@copilotkit/markdown-renderer/react-native";
2
+ import { MarkdownStyle } from "@copilotkit/markdown/react-native";
3
3
 
4
4
  //#region src/components/Markdown.d.ts
5
5
  /**
@@ -33,7 +33,7 @@ interface CopilotMarkdownProps {
33
33
  }
34
34
  /**
35
35
  * GFM markdown renderer for React Native. Delegates to the shared
36
- * `StreamingMarkdownRenderer` from `@copilotkit/markdown-renderer/react-native`.
36
+ * `StreamingMarkdownRenderer` from `@copilotkit/markdown/react-native`.
37
37
  *
38
38
  * Public API is backward-compatible with the previous basic renderer:
39
39
  * - `CopilotMarkdownProps` — same shape.
@@ -49,4 +49,4 @@ declare function CopilotMarkdown({
49
49
  }: CopilotMarkdownProps): React.ReactElement | null;
50
50
  //#endregion
51
51
  export { defaultMarkdownStyles as i, CopilotMarkdownProps as n, MarkdownStyle$1 as r, CopilotMarkdown as t };
52
- //# sourceMappingURL=Markdown-1ips7myr.d.cts.map
52
+ //# sourceMappingURL=Markdown-DzjnSuu5.d.cts.map
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { StreamingMarkdownRenderer, defaultMarkdownStyles } from "@copilotkit/markdown-renderer/react-native";
4
- import { warnUnsupportedRichSyntaxOnce } from "@copilotkit/markdown-renderer";
3
+ import { StreamingMarkdownRenderer, defaultMarkdownStyles } from "@copilotkit/markdown/react-native";
4
+ import { warnUnsupportedRichSyntaxOnce } from "@copilotkit/markdown";
5
5
 
6
6
  //#region src/components/Markdown.tsx
7
7
  /**
@@ -15,7 +15,7 @@ const defaultMarkdownStyles$1 = {
15
15
  };
16
16
  /**
17
17
  * GFM markdown renderer for React Native. Delegates to the shared
18
- * `StreamingMarkdownRenderer` from `@copilotkit/markdown-renderer/react-native`.
18
+ * `StreamingMarkdownRenderer` from `@copilotkit/markdown/react-native`.
19
19
  *
20
20
  * Public API is backward-compatible with the previous basic renderer:
21
21
  * - `CopilotMarkdownProps` — same shape.
@@ -44,4 +44,4 @@ function CopilotMarkdown({ content, style, streamingAnimation = false }) {
44
44
 
45
45
  //#endregion
46
46
  export { defaultMarkdownStyles$1 as n, CopilotMarkdown as t };
47
- //# sourceMappingURL=Markdown-CICvatMs.mjs.map
47
+ //# sourceMappingURL=Markdown-SE9MfY2U.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown-SE9MfY2U.mjs","names":["defaultMarkdownStyles","_streamingDefaultStyles"],"sources":["../src/components/Markdown.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n StreamingMarkdownRenderer,\n defaultMarkdownStyles as _streamingDefaultStyles,\n} from \"@copilotkit/markdown/react-native\";\nimport type { MarkdownStyle as StreamingMarkdownStyle } from \"@copilotkit/markdown/react-native\";\nimport { warnUnsupportedRichSyntaxOnce } from \"@copilotkit/markdown\";\n\n/**\n * Style map for CopilotMarkdown. Each key maps a node type to a React Native\n * style object. Extends the streaming renderer's style keys with a `code`\n * shorthand kept for backward compatibility (`list` already exists on the\n * base style and needs no alias).\n *\n * @public\n */\nexport type MarkdownStyle = StreamingMarkdownStyle & {\n /** Alias for `inlineCode`; kept for backward compatibility. */\n code?: Record<string, unknown>;\n};\n\n/**\n * Default styles that ship with CopilotMarkdown.\n *\n * @public\n */\nexport const defaultMarkdownStyles: MarkdownStyle = {\n ..._streamingDefaultStyles,\n // Back-compat alias: `code` = same as `inlineCode`\n code: _streamingDefaultStyles.inlineCode,\n};\n\nexport interface CopilotMarkdownProps {\n content: string;\n style?: MarkdownStyle;\n /**\n * Toggles `Intl.Segmenter`-based token segmentation in the parser. Defaults\n * to `false` (Hermes-safe: no Segmenter needed). Note: the React Native\n * renderer renders text directly and does not perform per-token fade-in\n * animation, so this currently has no visual effect — it is accepted for\n * backward compatibility.\n */\n streamingAnimation?: boolean;\n}\n\n/**\n * GFM markdown renderer for React Native. Delegates to the shared\n * `StreamingMarkdownRenderer` from `@copilotkit/markdown/react-native`.\n *\n * Public API is backward-compatible with the previous basic renderer:\n * - `CopilotMarkdownProps` — same shape.\n * - `MarkdownStyle` / `defaultMarkdownStyles` — same exports.\n * - `streamingAnimation` maps to `animate` (defaults `false` = Hermes-safe).\n *\n * @public\n */\nexport function CopilotMarkdown({\n content,\n style,\n streamingAnimation = false,\n}: CopilotMarkdownProps): React.ReactElement | null {\n // Translate the back-compat `code` alias onto `inlineCode` — the key the\n // streaming renderer actually reads. Without this, a caller migrating from\n // the previous renderer who passes `style={{ code: ... }}` would silently\n // lose inline-code styling. An explicit `inlineCode` wins over the alias.\n // Dev-only: nudge upgraders from the bundled Streamdown default when their\n // content needs math/syntax highlighting the built-in renderer doesn't do.\n warnUnsupportedRichSyntaxOnce(content);\n\n let resolvedStyle = style as StreamingMarkdownStyle | undefined;\n if (style?.code !== undefined) {\n const { code, ...rest } = style;\n resolvedStyle = {\n ...(rest as StreamingMarkdownStyle),\n inlineCode: (rest as StreamingMarkdownStyle).inlineCode ?? code,\n };\n }\n return (\n <StreamingMarkdownRenderer\n content={content}\n isComplete={true}\n style={resolvedStyle}\n animate={streamingAnimation}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;AA0BA,MAAaA,0BAAuC;CAClD,GAAGC;CAEH,MAAMA,sBAAwB;CAC/B;;;;;;;;;;;;AA0BD,SAAgB,gBAAgB,EAC9B,SACA,OACA,qBAAqB,SAC6B;AAOlD,+BAA8B,QAAQ;CAEtC,IAAI,gBAAgB;AACpB,KAAI,OAAO,SAAS,QAAW;EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS;AAC1B,kBAAgB;GACd,GAAI;GACJ,YAAa,KAAgC,cAAc;GAC5D;;AAEH,QACE,oBAAC;EACU;EACT,YAAY;EACZ,OAAO;EACP,SAAS;GACT"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { MarkdownStyle } from "@copilotkit/markdown-renderer/react-native";
2
+ import { MarkdownStyle } from "@copilotkit/markdown/react-native";
3
3
 
4
4
  //#region src/components/Markdown.d.ts
5
5
  /**
@@ -33,7 +33,7 @@ interface CopilotMarkdownProps {
33
33
  }
34
34
  /**
35
35
  * GFM markdown renderer for React Native. Delegates to the shared
36
- * `StreamingMarkdownRenderer` from `@copilotkit/markdown-renderer/react-native`.
36
+ * `StreamingMarkdownRenderer` from `@copilotkit/markdown/react-native`.
37
37
  *
38
38
  * Public API is backward-compatible with the previous basic renderer:
39
39
  * - `CopilotMarkdownProps` — same shape.
@@ -49,4 +49,4 @@ declare function CopilotMarkdown({
49
49
  }: CopilotMarkdownProps): React.ReactElement | null;
50
50
  //#endregion
51
51
  export { defaultMarkdownStyles$1 as i, CopilotMarkdownProps as n, MarkdownStyle$1 as r, CopilotMarkdown as t };
52
- //# sourceMappingURL=Markdown-Bl3qS5hQ.d.mts.map
52
+ //# sourceMappingURL=Markdown-a-rdG22_.d.mts.map
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_MarkdownRendererContext = require('../MarkdownRendererContext-BRNe808d.cjs');
3
- const require_Markdown = require('../Markdown-C4dvKQXJ.cjs');
3
+ const require_Markdown = require('../Markdown-CaYHlD4j.cjs');
4
4
  let react = require("react");
5
5
  react = require_MarkdownRendererContext.__toESM(react);
6
6
  let _copilotkit_react_core_context = require("@copilotkit/react-core/context");
@@ -1,4 +1,4 @@
1
- import { i as defaultMarkdownStyles, n as CopilotMarkdownProps, t as CopilotMarkdown } from "../Markdown-1ips7myr.cjs";
1
+ import { i as defaultMarkdownStyles, n as CopilotMarkdownProps, t as CopilotMarkdown } from "../Markdown-DzjnSuu5.cjs";
2
2
  import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import { ViewStyle } from "react-native";
@@ -1,4 +1,4 @@
1
- import { i as defaultMarkdownStyles, n as CopilotMarkdownProps, t as CopilotMarkdown } from "../Markdown-Bl3qS5hQ.mjs";
1
+ import { i as defaultMarkdownStyles, n as CopilotMarkdownProps, t as CopilotMarkdown } from "../Markdown-a-rdG22_.mjs";
2
2
  import React from "react";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
4
  import { ViewStyle } from "react-native";
@@ -1,5 +1,5 @@
1
1
  import { n as isNativeComponentRenderer, r as useMarkdownRenderer } from "../MarkdownRendererContext-B_AKdPAN.mjs";
2
- import { n as defaultMarkdownStyles, t as CopilotMarkdown } from "../Markdown-CICvatMs.mjs";
2
+ import { n as defaultMarkdownStyles, t as CopilotMarkdown } from "../Markdown-SE9MfY2U.mjs";
3
3
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
4
4
  import { useCopilotKit } from "@copilotkit/react-core/context";
5
5
  import { useAgent, useRenderToolCall } from "@copilotkit/react-core/headless";
@@ -1,5 +1,5 @@
1
- import "./Markdown-1ips7myr.cjs";
2
- import { n as CopilotKitProvider, t as CopilotKitNativeProviderProps } from "./CopilotKitProvider-Btm10msB.cjs";
1
+ import "./Markdown-DzjnSuu5.cjs";
2
+ import { n as CopilotKitProvider, t as CopilotKitNativeProviderProps } from "./CopilotKitProvider-BOaKT5J9.cjs";
3
3
  import React from "react";
4
4
  import { AgentContextInput, CopilotChatConfigurationValue, CopilotChatDefaultLabels, CopilotChatLabels, Interrupt, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, JsonSerializable, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, ReactToolCallRenderer as ReactToolCallRenderer$1, RenderToolCompleteProps, RenderToolExecutingProps, RenderToolInProgressProps, RenderToolProps, ResumeEntry, ResumeStatus, Thread, UseAgentUpdate, UseInterruptConfig, UseThreadsInput, UseThreadsResult, defineToolCallRenderer, useAgent, useAgentContext, useCapabilities, useComponent, useConfigureSuggestions, useFrontendTool, useHumanInTheLoop, useInterrupt, useRenderTool, useRenderToolCall, useSuggestions, useThreads } from "@copilotkit/react-core/headless";
5
5
  import { CopilotKitCoreErrorCode, CopilotKitCoreRuntimeConnectionStatus, FrontendTool, Suggestion, ToolCallStatus } from "@copilotkit/core";
@@ -1,5 +1,5 @@
1
- import "./Markdown-Bl3qS5hQ.mjs";
2
- import { n as CopilotKitProvider, t as CopilotKitNativeProviderProps } from "./CopilotKitProvider-DzDWD_Vp.mjs";
1
+ import "./Markdown-a-rdG22_.mjs";
2
+ import { n as CopilotKitProvider, t as CopilotKitNativeProviderProps } from "./CopilotKitProvider-DcRVO6WN.mjs";
3
3
  import React from "react";
4
4
  import { CopilotKitContext, CopilotKitContextValue, useCopilotKit, useLicenseContext } from "@copilotkit/react-core/context";
5
5
  import { AgentContextInput, CopilotChatConfigurationValue, CopilotChatDefaultLabels, CopilotChatLabels, Interrupt, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, JsonSerializable, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, ReactToolCallRenderer as ReactToolCallRenderer$1, RenderToolCompleteProps, RenderToolExecutingProps, RenderToolInProgressProps, RenderToolProps, ResumeEntry, ResumeStatus, Thread, UseAgentUpdate, UseInterruptConfig, UseThreadsInput, UseThreadsResult, defineToolCallRenderer, useAgent, useAgentContext, useCapabilities, useComponent, useConfigureSuggestions, useFrontendTool, useHumanInTheLoop, useInterrupt, useRenderTool, useRenderToolCall, useSuggestions, useThreads } from "@copilotkit/react-core/headless";
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@ const require_MarkdownRendererContext = require('./MarkdownRendererContext-BRNe8
3
3
  require('./utf8-Cf3Ssy33.cjs');
4
4
  const require_CopilotKitProvider = require('./CopilotKitProvider-DbI3aQam.cjs');
5
5
  require('./headless.cjs');
6
- const require_Markdown = require('./Markdown-C4dvKQXJ.cjs');
6
+ const require_Markdown = require('./Markdown-CaYHlD4j.cjs');
7
7
  let react = require("react");
8
8
  react = require_MarkdownRendererContext.__toESM(react);
9
9
  let _copilotkit_react_core_context = require("@copilotkit/react-core/context");
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { i as defaultMarkdownStyles, n as CopilotMarkdownProps, r as MarkdownStyle, t as CopilotMarkdown } from "./Markdown-1ips7myr.cjs";
2
- import { a as NativeMarkdownRendererProps, i as NativeMarkdownRenderer, n as CopilotKitProvider, o as useMarkdownRenderer, r as MarkdownRendererProvider, t as CopilotKitNativeProviderProps } from "./CopilotKitProvider-Btm10msB.cjs";
1
+ import { i as defaultMarkdownStyles, n as CopilotMarkdownProps, r as MarkdownStyle, t as CopilotMarkdown } from "./Markdown-DzjnSuu5.cjs";
2
+ import { a as NativeMarkdownRendererProps, i as NativeMarkdownRenderer, n as CopilotKitProvider, o as useMarkdownRenderer, r as MarkdownRendererProvider, t as CopilotKitNativeProviderProps } from "./CopilotKitProvider-BOaKT5J9.cjs";
3
3
  import { AbstractAgent, AgentCapabilities, AgentContextInput, AssistantMessageType, CopilotChatConfigurationValue, CopilotChatDefaultLabels, CopilotChatLabels, CopilotKitContext, CopilotKitContextValue, CopilotKitCoreErrorCode, CopilotKitCoreRuntimeConnectionStatus, FrontendTool, FrontendToolRenderFunction, Interrupt, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, JsonSerializable, Message, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, RenderToolCompleteProps, RenderToolExecutingProps, RenderToolInProgressProps, RenderToolProps, ResumeEntry, ResumeStatus, Suggestion, Thread, ToolCall, ToolCallStatus, ToolMessage, UseAgentUpdate, UseInterruptConfig, UseThreadsInput, UseThreadsResult, defineToolCallRenderer, useAgent, useAgentContext, useCapabilities, useComponent, useConfigureSuggestions, useCopilotKit, useFrontendTool, useHumanInTheLoop, useInterrupt, useLicenseContext, useRenderTool, useRenderToolCall, useSuggestions, useThreads } from "./headless.cjs";
4
4
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
  import React, { ReactNode } from "react";
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { i as defaultMarkdownStyles, n as CopilotMarkdownProps, r as MarkdownStyle, t as CopilotMarkdown } from "./Markdown-Bl3qS5hQ.mjs";
2
- import { a as NativeMarkdownRendererProps, i as NativeMarkdownRenderer, n as CopilotKitProvider, o as useMarkdownRenderer, r as MarkdownRendererProvider, t as CopilotKitNativeProviderProps } from "./CopilotKitProvider-DzDWD_Vp.mjs";
1
+ import { i as defaultMarkdownStyles, n as CopilotMarkdownProps, r as MarkdownStyle, t as CopilotMarkdown } from "./Markdown-a-rdG22_.mjs";
2
+ import { a as NativeMarkdownRendererProps, i as NativeMarkdownRenderer, n as CopilotKitProvider, o as useMarkdownRenderer, r as MarkdownRendererProvider, t as CopilotKitNativeProviderProps } from "./CopilotKitProvider-DcRVO6WN.mjs";
3
3
  import { AbstractAgent, AgentCapabilities, AgentContextInput, AssistantMessageType, CopilotChatConfigurationValue, CopilotChatDefaultLabels, CopilotChatLabels, CopilotKitContext, CopilotKitContextValue, CopilotKitCoreErrorCode, CopilotKitCoreRuntimeConnectionStatus, FrontendTool, FrontendToolRenderFunction, Interrupt, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, JsonSerializable, Message, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, RenderToolCompleteProps, RenderToolExecutingProps, RenderToolInProgressProps, RenderToolProps, ResumeEntry, ResumeStatus, Suggestion, Thread, ToolCall, ToolCallStatus, ToolMessage, UseAgentUpdate, UseInterruptConfig, UseThreadsInput, UseThreadsResult, defineToolCallRenderer, useAgent, useAgentContext, useCapabilities, useComponent, useConfigureSuggestions, useCopilotKit, useFrontendTool, useHumanInTheLoop, useInterrupt, useLicenseContext, useRenderTool, useRenderToolCall, useSuggestions, useThreads } from "./headless.mjs";
4
4
  import React, { ReactNode } from "react";
5
5
  import { Attachment, AttachmentUploadErrorReason, AttachmentUploadResult } from "@copilotkit/shared";
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import "./utf8-BIN9t4Oy.mjs";
2
2
  import { r as useMarkdownRenderer, t as MarkdownRendererProvider } from "./MarkdownRendererContext-B_AKdPAN.mjs";
3
3
  import { t as CopilotKitProvider } from "./CopilotKitProvider-DlP73sLt.mjs";
4
4
  import { AbstractAgent, CopilotChatDefaultLabels, CopilotKitContext, CopilotKitCoreErrorCode, CopilotKitCoreRuntimeConnectionStatus, ToolCallStatus, UseAgentUpdate, defineToolCallRenderer, useAgent, useAgentContext, useCapabilities, useComponent, useConfigureSuggestions, useCopilotKit, useFrontendTool, useHumanInTheLoop, useInterrupt, useLicenseContext, useRenderTool, useRenderToolCall, useSuggestions, useThreads } from "./headless.mjs";
5
- import { n as defaultMarkdownStyles, t as CopilotMarkdown } from "./Markdown-CICvatMs.mjs";
5
+ import { n as defaultMarkdownStyles, t as CopilotMarkdown } from "./Markdown-SE9MfY2U.mjs";
6
6
  import React, { createContext, forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useRef, useState } from "react";
7
7
  import { useCopilotKit as useCopilotKit$1 } from "@copilotkit/react-core/context";
8
8
  import { useAgent as useAgent$1 } from "@copilotkit/react-core/headless";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@copilotkit/react-native",
3
- "version": "2.0.0-rc.11",
3
+ "version": "2.0.0-rc.12",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "ai",
@@ -77,10 +77,10 @@
77
77
  },
78
78
  "dependencies": {
79
79
  "@ag-ui/client": "1.0.2",
80
- "@copilotkit/core": "2.0.0-rc.11",
81
- "@copilotkit/markdown-renderer": "2.0.0-rc.11",
82
- "@copilotkit/react-core": "2.0.0-rc.11",
83
- "@copilotkit/shared": "2.0.0-rc.11",
80
+ "@copilotkit/core": "2.0.0-rc.12",
81
+ "@copilotkit/markdown": "2.0.0-rc.12",
82
+ "@copilotkit/react-core": "2.0.0-rc.12",
83
+ "@copilotkit/shared": "2.0.0-rc.12",
84
84
  "web-streams-polyfill": "^4.2.0"
85
85
  },
86
86
  "devDependencies": {
@@ -2,9 +2,9 @@ import React from "react";
2
2
  import {
3
3
  StreamingMarkdownRenderer,
4
4
  defaultMarkdownStyles as _streamingDefaultStyles,
5
- } from "@copilotkit/markdown-renderer/react-native";
6
- import type { MarkdownStyle as StreamingMarkdownStyle } from "@copilotkit/markdown-renderer/react-native";
7
- import { warnUnsupportedRichSyntaxOnce } from "@copilotkit/markdown-renderer";
5
+ } from "@copilotkit/markdown/react-native";
6
+ import type { MarkdownStyle as StreamingMarkdownStyle } from "@copilotkit/markdown/react-native";
7
+ import { warnUnsupportedRichSyntaxOnce } from "@copilotkit/markdown";
8
8
 
9
9
  /**
10
10
  * Style map for CopilotMarkdown. Each key maps a node type to a React Native
@@ -45,7 +45,7 @@ export interface CopilotMarkdownProps {
45
45
 
46
46
  /**
47
47
  * GFM markdown renderer for React Native. Delegates to the shared
48
- * `StreamingMarkdownRenderer` from `@copilotkit/markdown-renderer/react-native`.
48
+ * `StreamingMarkdownRenderer` from `@copilotkit/markdown/react-native`.
49
49
  *
50
50
  * Public API is backward-compatible with the previous basic renderer:
51
51
  * - `CopilotMarkdownProps` — same shape.
@@ -14,7 +14,7 @@ vi.mock("react-native", () => ({
14
14
  // Capture the props handed to the underlying streaming renderer so we can
15
15
  // assert how CopilotMarkdown translates its public style map.
16
16
  const capturedProps: any[] = [];
17
- vi.mock("@copilotkit/markdown-renderer/react-native", () => ({
17
+ vi.mock("@copilotkit/markdown/react-native", () => ({
18
18
  StreamingMarkdownRenderer: (props: any) => {
19
19
  capturedProps.push(props);
20
20
  return null;
@@ -1 +0,0 @@
1
- {"version":3,"file":"Markdown-C4dvKQXJ.cjs","names":["_streamingDefaultStyles","StreamingMarkdownRenderer"],"sources":["../src/components/Markdown.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n StreamingMarkdownRenderer,\n defaultMarkdownStyles as _streamingDefaultStyles,\n} from \"@copilotkit/markdown-renderer/react-native\";\nimport type { MarkdownStyle as StreamingMarkdownStyle } from \"@copilotkit/markdown-renderer/react-native\";\nimport { warnUnsupportedRichSyntaxOnce } from \"@copilotkit/markdown-renderer\";\n\n/**\n * Style map for CopilotMarkdown. Each key maps a node type to a React Native\n * style object. Extends the streaming renderer's style keys with a `code`\n * shorthand kept for backward compatibility (`list` already exists on the\n * base style and needs no alias).\n *\n * @public\n */\nexport type MarkdownStyle = StreamingMarkdownStyle & {\n /** Alias for `inlineCode`; kept for backward compatibility. */\n code?: Record<string, unknown>;\n};\n\n/**\n * Default styles that ship with CopilotMarkdown.\n *\n * @public\n */\nexport const defaultMarkdownStyles: MarkdownStyle = {\n ..._streamingDefaultStyles,\n // Back-compat alias: `code` = same as `inlineCode`\n code: _streamingDefaultStyles.inlineCode,\n};\n\nexport interface CopilotMarkdownProps {\n content: string;\n style?: MarkdownStyle;\n /**\n * Toggles `Intl.Segmenter`-based token segmentation in the parser. Defaults\n * to `false` (Hermes-safe: no Segmenter needed). Note: the React Native\n * renderer renders text directly and does not perform per-token fade-in\n * animation, so this currently has no visual effect — it is accepted for\n * backward compatibility.\n */\n streamingAnimation?: boolean;\n}\n\n/**\n * GFM markdown renderer for React Native. Delegates to the shared\n * `StreamingMarkdownRenderer` from `@copilotkit/markdown-renderer/react-native`.\n *\n * Public API is backward-compatible with the previous basic renderer:\n * - `CopilotMarkdownProps` — same shape.\n * - `MarkdownStyle` / `defaultMarkdownStyles` — same exports.\n * - `streamingAnimation` maps to `animate` (defaults `false` = Hermes-safe).\n *\n * @public\n */\nexport function CopilotMarkdown({\n content,\n style,\n streamingAnimation = false,\n}: CopilotMarkdownProps): React.ReactElement | null {\n // Translate the back-compat `code` alias onto `inlineCode` — the key the\n // streaming renderer actually reads. Without this, a caller migrating from\n // the previous renderer who passes `style={{ code: ... }}` would silently\n // lose inline-code styling. An explicit `inlineCode` wins over the alias.\n // Dev-only: nudge upgraders from the bundled Streamdown default when their\n // content needs math/syntax highlighting the built-in renderer doesn't do.\n warnUnsupportedRichSyntaxOnce(content);\n\n let resolvedStyle = style as StreamingMarkdownStyle | undefined;\n if (style?.code !== undefined) {\n const { code, ...rest } = style;\n resolvedStyle = {\n ...(rest as StreamingMarkdownStyle),\n inlineCode: (rest as StreamingMarkdownStyle).inlineCode ?? code,\n };\n }\n return (\n <StreamingMarkdownRenderer\n content={content}\n isComplete={true}\n style={resolvedStyle}\n animate={streamingAnimation}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA0BA,MAAa,wBAAuC;CAClD,GAAGA;CAEH,MAAMA,iEAAwB;CAC/B;;;;;;;;;;;;AA0BD,SAAgB,gBAAgB,EAC9B,SACA,OACA,qBAAqB,SAC6B;AAOlD,kEAA8B,QAAQ;CAEtC,IAAI,gBAAgB;AACpB,KAAI,OAAO,SAAS,QAAW;EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS;AAC1B,kBAAgB;GACd,GAAI;GACJ,YAAa,KAAgC,cAAc;GAC5D;;AAEH,QACE,2CAACC;EACU;EACT,YAAY;EACZ,OAAO;EACP,SAAS;GACT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Markdown-CICvatMs.mjs","names":["defaultMarkdownStyles","_streamingDefaultStyles"],"sources":["../src/components/Markdown.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n StreamingMarkdownRenderer,\n defaultMarkdownStyles as _streamingDefaultStyles,\n} from \"@copilotkit/markdown-renderer/react-native\";\nimport type { MarkdownStyle as StreamingMarkdownStyle } from \"@copilotkit/markdown-renderer/react-native\";\nimport { warnUnsupportedRichSyntaxOnce } from \"@copilotkit/markdown-renderer\";\n\n/**\n * Style map for CopilotMarkdown. Each key maps a node type to a React Native\n * style object. Extends the streaming renderer's style keys with a `code`\n * shorthand kept for backward compatibility (`list` already exists on the\n * base style and needs no alias).\n *\n * @public\n */\nexport type MarkdownStyle = StreamingMarkdownStyle & {\n /** Alias for `inlineCode`; kept for backward compatibility. */\n code?: Record<string, unknown>;\n};\n\n/**\n * Default styles that ship with CopilotMarkdown.\n *\n * @public\n */\nexport const defaultMarkdownStyles: MarkdownStyle = {\n ..._streamingDefaultStyles,\n // Back-compat alias: `code` = same as `inlineCode`\n code: _streamingDefaultStyles.inlineCode,\n};\n\nexport interface CopilotMarkdownProps {\n content: string;\n style?: MarkdownStyle;\n /**\n * Toggles `Intl.Segmenter`-based token segmentation in the parser. Defaults\n * to `false` (Hermes-safe: no Segmenter needed). Note: the React Native\n * renderer renders text directly and does not perform per-token fade-in\n * animation, so this currently has no visual effect — it is accepted for\n * backward compatibility.\n */\n streamingAnimation?: boolean;\n}\n\n/**\n * GFM markdown renderer for React Native. Delegates to the shared\n * `StreamingMarkdownRenderer` from `@copilotkit/markdown-renderer/react-native`.\n *\n * Public API is backward-compatible with the previous basic renderer:\n * - `CopilotMarkdownProps` — same shape.\n * - `MarkdownStyle` / `defaultMarkdownStyles` — same exports.\n * - `streamingAnimation` maps to `animate` (defaults `false` = Hermes-safe).\n *\n * @public\n */\nexport function CopilotMarkdown({\n content,\n style,\n streamingAnimation = false,\n}: CopilotMarkdownProps): React.ReactElement | null {\n // Translate the back-compat `code` alias onto `inlineCode` — the key the\n // streaming renderer actually reads. Without this, a caller migrating from\n // the previous renderer who passes `style={{ code: ... }}` would silently\n // lose inline-code styling. An explicit `inlineCode` wins over the alias.\n // Dev-only: nudge upgraders from the bundled Streamdown default when their\n // content needs math/syntax highlighting the built-in renderer doesn't do.\n warnUnsupportedRichSyntaxOnce(content);\n\n let resolvedStyle = style as StreamingMarkdownStyle | undefined;\n if (style?.code !== undefined) {\n const { code, ...rest } = style;\n resolvedStyle = {\n ...(rest as StreamingMarkdownStyle),\n inlineCode: (rest as StreamingMarkdownStyle).inlineCode ?? code,\n };\n }\n return (\n <StreamingMarkdownRenderer\n content={content}\n isComplete={true}\n style={resolvedStyle}\n animate={streamingAnimation}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;AA0BA,MAAaA,0BAAuC;CAClD,GAAGC;CAEH,MAAMA,sBAAwB;CAC/B;;;;;;;;;;;;AA0BD,SAAgB,gBAAgB,EAC9B,SACA,OACA,qBAAqB,SAC6B;AAOlD,+BAA8B,QAAQ;CAEtC,IAAI,gBAAgB;AACpB,KAAI,OAAO,SAAS,QAAW;EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS;AAC1B,kBAAgB;GACd,GAAI;GACJ,YAAa,KAAgC,cAAc;GAC5D;;AAEH,QACE,oBAAC;EACU;EACT,YAAY;EACZ,OAAO;EACP,SAAS;GACT"}