@copilotkit/react-core 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.
- package/dist/{MarkdownRendererContext-CS35epe1.d.mts → MarkdownRendererContext-Bsl28Gmn.d.mts} +2 -2
- package/dist/{MarkdownRendererContext-CS35epe1.d.mts.map → MarkdownRendererContext-Bsl28Gmn.d.mts.map} +1 -1
- package/dist/{MarkdownRendererContext-CfTh92vk.d.cts → MarkdownRendererContext-CBppkb5j.d.cts} +2 -2
- package/dist/{MarkdownRendererContext-CfTh92vk.d.cts.map → MarkdownRendererContext-CBppkb5j.d.cts.map} +1 -1
- package/dist/{MarkdownSurfaces-CimUSR3Y.mjs → MarkdownSurfaces-DKC9Eg_a.mjs} +4 -4
- package/dist/MarkdownSurfaces-DKC9Eg_a.mjs.map +1 -0
- package/dist/{MarkdownSurfaces-DGDeUhbX.cjs → MarkdownSurfaces-EGmsCZWN.cjs} +8 -8
- package/dist/MarkdownSurfaces-EGmsCZWN.cjs.map +1 -0
- package/dist/generative-ui.cjs +1 -1
- package/dist/generative-ui.d.cts +1 -1
- package/dist/generative-ui.d.mts +1 -1
- package/dist/generative-ui.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/dist/MarkdownSurfaces-CimUSR3Y.mjs.map +0 -1
- package/dist/MarkdownSurfaces-DGDeUhbX.cjs.map +0 -1
|
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
let _copilotkit_core = require("@copilotkit/core");
|
|
29
29
|
let react = require("react");
|
|
30
30
|
react = __toESM(react);
|
|
31
|
-
let
|
|
32
|
-
let
|
|
31
|
+
let _copilotkit_markdown_react = require("@copilotkit/markdown/react");
|
|
32
|
+
let _copilotkit_markdown = require("@copilotkit/markdown");
|
|
33
33
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
let _copilotkit_shared = require("@copilotkit/shared");
|
|
35
35
|
let _copilotkit_react_core_context = require("@copilotkit/react-core/context");
|
|
@@ -37,7 +37,7 @@ let zod = require("zod");
|
|
|
37
37
|
zod = __toESM(zod);
|
|
38
38
|
|
|
39
39
|
//#region src/components/chat/StreamingMarkdownDefaultRenderer.tsx
|
|
40
|
-
const defaultNodeRenderers = (0,
|
|
40
|
+
const defaultNodeRenderers = (0, _copilotkit_markdown_react.createStreamingMarkdownNodeRenderers)({ codeBlock: ({ node }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
|
|
41
41
|
className: "cpk-markdown-code-block",
|
|
42
42
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
43
43
|
"data-code-info": node.info ?? void 0,
|
|
@@ -46,19 +46,19 @@ const defaultNodeRenderers = (0, _copilotkit_markdown_renderer_react.createStrea
|
|
|
46
46
|
}) });
|
|
47
47
|
/**
|
|
48
48
|
* react-core's built-in default markdown renderer — a thin adapter over
|
|
49
|
-
* `@copilotkit/markdown
|
|
49
|
+
* `@copilotkit/markdown`'s streaming renderer. Maps the pluggable
|
|
50
50
|
* renderer contract (`{ content, isStreaming, className }`) onto the streaming
|
|
51
51
|
* renderer for streaming-safe incremental rendering + per-token animation.
|
|
52
52
|
* Still overridable via the slot/provider pluggable interface.
|
|
53
53
|
*/
|
|
54
54
|
function StreamingMarkdownDefaultRenderer({ content, isStreaming, className, nodeRenderers, caret, options, onLinkClick, onCitationClick }) {
|
|
55
|
-
const mergedNodeRenderers = (0, react.useMemo)(() => nodeRenderers ? (0,
|
|
55
|
+
const mergedNodeRenderers = (0, react.useMemo)(() => nodeRenderers ? (0, _copilotkit_markdown_react.createStreamingMarkdownNodeRenderers)({
|
|
56
56
|
...defaultNodeRenderers,
|
|
57
57
|
...nodeRenderers
|
|
58
58
|
}) : defaultNodeRenderers, [nodeRenderers]);
|
|
59
59
|
if (!content) return null;
|
|
60
|
-
(0,
|
|
61
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
60
|
+
(0, _copilotkit_markdown.warnUnsupportedRichSyntaxOnce)(content);
|
|
61
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_copilotkit_markdown_react.StreamingMarkdownRenderer, {
|
|
62
62
|
className,
|
|
63
63
|
isComplete: !isStreaming,
|
|
64
64
|
caret: caret ?? !!isStreaming,
|
|
@@ -4051,4 +4051,4 @@ Object.defineProperty(exports, 'wrapperAria', {
|
|
|
4051
4051
|
return wrapperAria;
|
|
4052
4052
|
}
|
|
4053
4053
|
});
|
|
4054
|
-
//# sourceMappingURL=MarkdownSurfaces-
|
|
4054
|
+
//# sourceMappingURL=MarkdownSurfaces-EGmsCZWN.cjs.map
|