@alfadocs/ui-kit-debug 0.46.0 → 0.47.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.
- package/dist/_chunks/alia-sidebar-CVIPrdc9.js +1125 -0
- package/dist/_chunks/alia-sidebar-CVIPrdc9.js.map +1 -0
- package/dist/_chunks/{audio-recorder-C1rhKhSN.js → audio-recorder-DC-v9YFW.js} +81 -91
- package/dist/_chunks/audio-recorder-DC-v9YFW.js.map +1 -0
- package/dist/_chunks/{chat-input-CQe7nR_v.js → chat-input-CFwc7JxL.js} +2 -1
- package/dist/_chunks/{chat-input-CQe7nR_v.js.map → chat-input-CFwc7JxL.js.map} +1 -1
- package/dist/_chunks/{chat-message-ASgGtj-L.js → chat-message-B5JpFj0F.js} +79 -73
- package/dist/_chunks/chat-message-B5JpFj0F.js.map +1 -0
- package/dist/_chunks/code-block-HoddNOKJ.js +106 -0
- package/dist/_chunks/code-block-HoddNOKJ.js.map +1 -0
- package/dist/_chunks/download-CDF1sbL9.js +16 -0
- package/dist/_chunks/download-CDF1sbL9.js.map +1 -0
- package/dist/_chunks/{editable-currency-cell-renderer-BEBUQl9P.js → editable-currency-cell-renderer-CLil9B29.js} +283 -293
- package/dist/_chunks/editable-currency-cell-renderer-CLil9B29.js.map +1 -0
- package/dist/_chunks/mic-B4Gog3Gi.js +16 -0
- package/dist/_chunks/mic-B4Gog3Gi.js.map +1 -0
- package/dist/_chunks/pencil-CfQX-0Qc.js +21 -0
- package/dist/_chunks/pencil-CfQX-0Qc.js.map +1 -0
- package/dist/_chunks/{streaming-text-GH07yIYh.js → streaming-text-CfhDqtIT.js} +49 -45
- package/dist/_chunks/streaming-text-CfhDqtIT.js.map +1 -0
- package/dist/_chunks/{workflow-map-BFNpzTiw.js → workflow-map-Djn1QMJc.js} +135 -150
- package/dist/_chunks/workflow-map-Djn1QMJc.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/code-block.d.ts +39 -0
- package/dist/components/_shared/code-block.d.ts.map +1 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/chat-message.d.ts +6 -0
- package/dist/components/chat-message/chat-message.d.ts.map +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/streaming-text/streaming-text.d.ts.map +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +15 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +16 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +15 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +16 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +15 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +16 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +15 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +16 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +15 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +16 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +15 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +16 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +15 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +16 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +15 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +16 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +15 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +16 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +15 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +16 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +15 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +16 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +15 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +16 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +15 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +16 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +15 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +16 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +15 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +16 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +15 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +16 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +15 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +16 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +15 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +16 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/locales/ar.json +16 -1
- package/dist/locales/de.json +16 -1
- package/dist/locales/el.json +16 -1
- package/dist/locales/en.json +16 -1
- package/dist/locales/es.json +16 -1
- package/dist/locales/fr.json +16 -1
- package/dist/locales/hi.json +16 -1
- package/dist/locales/it.json +16 -1
- package/dist/locales/ja.json +16 -1
- package/dist/locales/nl.json +16 -1
- package/dist/locales/pl.json +16 -1
- package/dist/locales/pt.json +16 -1
- package/dist/locales/ro.json +16 -1
- package/dist/locales/ru.json +16 -1
- package/dist/locales/sq.json +16 -1
- package/dist/locales/sv.json +16 -1
- package/dist/locales/tr.json +16 -1
- package/dist/locales/zh.json +16 -1
- package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/alia-types.d.ts +61 -0
- package/dist/patterns/alia-assistant/alia-types.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/alia-sidebar-Be8FhKYd.js +0 -837
- package/dist/_chunks/alia-sidebar-Be8FhKYd.js.map +0 -1
- package/dist/_chunks/audio-recorder-C1rhKhSN.js.map +0 -1
- package/dist/_chunks/chat-message-ASgGtj-L.js.map +0 -1
- package/dist/_chunks/editable-currency-cell-renderer-BEBUQl9P.js.map +0 -1
- package/dist/_chunks/streaming-text-GH07yIYh.js.map +0 -1
- package/dist/_chunks/workflow-map-BFNpzTiw.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pencil-CfQX-0Qc.js","sources":["../../node_modules/lucide-react/dist/esm/icons/pencil.js"],"sourcesContent":["/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\",\n key: \"1a8usu\"\n }\n ],\n [\"path\", { d: \"m15 5 4 4\", key: \"1mk7zo\" }]\n];\nconst Pencil = createLucideIcon(\"pencil\", __iconNode);\n\nexport { __iconNode, Pencil as default };\n//# sourceMappingURL=pencil.js.map\n"],"names":["__iconNode","Pencil","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AAAA,EACE,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAC5C,GACMC,IAASC,EAAiB,UAAUF,CAAU;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as h, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y, useState as v, useEffect as b, Fragment as m } from "react";
|
|
3
3
|
import { c as x } from "./index-D2ZczOXr.js";
|
|
4
|
-
|
|
4
|
+
import { s as g, C } from "./code-block-HoddNOKJ.js";
|
|
5
|
+
const z = x(
|
|
5
6
|
"type-body ds:block ds:whitespace-pre-wrap ds:break-words",
|
|
6
7
|
{
|
|
7
8
|
variants: {
|
|
@@ -20,86 +21,89 @@ const g = x(
|
|
|
20
21
|
defaultVariants: { size: "md", density: "default" }
|
|
21
22
|
}
|
|
22
23
|
);
|
|
23
|
-
function
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
const
|
|
27
|
-
n >
|
|
24
|
+
function T(a) {
|
|
25
|
+
const s = [], r = a.length, d = 42, c = 96, u = 10;
|
|
26
|
+
let o = 0, e = 0;
|
|
27
|
+
const l = (n) => {
|
|
28
|
+
n > o && s.push({ type: "text", value: a.slice(o, n) });
|
|
28
29
|
};
|
|
29
30
|
for (; e < r; ) {
|
|
30
31
|
const n = a.charCodeAt(e);
|
|
31
|
-
if (n ===
|
|
32
|
-
let
|
|
33
|
-
for (;
|
|
34
|
-
if (
|
|
35
|
-
|
|
32
|
+
if (n === d && e + 1 < r && a.charCodeAt(e + 1) === d) {
|
|
33
|
+
let t = e + 2;
|
|
34
|
+
for (; t < r && a.charCodeAt(t) !== d; ) t++;
|
|
35
|
+
if (t < r - 1 && a.charCodeAt(t + 1) === d && t > e + 2) {
|
|
36
|
+
l(e), s.push({ type: "bold", value: a.slice(e + 2, t) }), e = t + 2, o = e;
|
|
36
37
|
continue;
|
|
37
38
|
}
|
|
38
39
|
e += 2;
|
|
39
40
|
continue;
|
|
40
41
|
}
|
|
41
42
|
if (n === c) {
|
|
42
|
-
let
|
|
43
|
-
for (;
|
|
44
|
-
if (
|
|
45
|
-
|
|
43
|
+
let t = e + 1;
|
|
44
|
+
for (; t < r && a.charCodeAt(t) !== c; ) t++;
|
|
45
|
+
if (t < r && t > e + 1) {
|
|
46
|
+
l(e), s.push({ type: "code", value: a.slice(e + 1, t) }), e = t + 1, o = e;
|
|
46
47
|
continue;
|
|
47
48
|
}
|
|
48
49
|
e += 1;
|
|
49
50
|
continue;
|
|
50
51
|
}
|
|
51
52
|
if (n === u) {
|
|
52
|
-
|
|
53
|
+
l(e), s.push({ type: "br" }), e += 1, o = e;
|
|
53
54
|
continue;
|
|
54
55
|
}
|
|
55
56
|
e += 1;
|
|
56
57
|
}
|
|
57
|
-
return
|
|
58
|
+
return l(r), s;
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
60
|
+
function w(a) {
|
|
61
|
+
return T(a).map((s, r) => s.type === "bold" ? /* @__PURE__ */ i("strong", { children: s.value }, r) : s.type === "code" ? /* @__PURE__ */ i(
|
|
61
62
|
"code",
|
|
62
63
|
{
|
|
63
64
|
dir: "ltr",
|
|
64
65
|
className: "ds:rounded-[var(--radius-sm)] ds:bg-muted/20 ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:font-[family-name:var(--font-mono)] ds:text-[length:0.95em]",
|
|
65
|
-
children:
|
|
66
|
+
children: s.value
|
|
66
67
|
},
|
|
67
68
|
r
|
|
68
|
-
) :
|
|
69
|
+
) : s.type === "br" ? /* @__PURE__ */ i("br", {}, r) : /* @__PURE__ */ i(m, { children: s.value }, r));
|
|
70
|
+
}
|
|
71
|
+
function A(a) {
|
|
72
|
+
return g(a).map((s, r) => s.type === "code" ? /* @__PURE__ */ i(C, { code: s.value, language: s.lang }, r) : /* @__PURE__ */ i(m, { children: w(s.value) }, r));
|
|
69
73
|
}
|
|
70
|
-
const
|
|
74
|
+
const j = y(
|
|
71
75
|
({
|
|
72
76
|
content: a,
|
|
73
|
-
isStreaming:
|
|
77
|
+
isStreaming: s,
|
|
74
78
|
renderMarkdown: r = !1,
|
|
75
|
-
ariaLive:
|
|
79
|
+
ariaLive: d = "polite",
|
|
76
80
|
size: c = "md",
|
|
77
81
|
density: u = "default",
|
|
78
|
-
className:
|
|
82
|
+
className: o,
|
|
79
83
|
...e
|
|
80
|
-
},
|
|
81
|
-
const [n,
|
|
84
|
+
}, l) => {
|
|
85
|
+
const [n, t] = v(a);
|
|
82
86
|
b(() => {
|
|
83
|
-
if (!
|
|
84
|
-
|
|
87
|
+
if (!s) {
|
|
88
|
+
t(a);
|
|
85
89
|
return;
|
|
86
90
|
}
|
|
87
|
-
const
|
|
88
|
-
return () => clearTimeout(
|
|
89
|
-
}, [a,
|
|
90
|
-
const
|
|
91
|
-
return /* @__PURE__ */
|
|
91
|
+
const p = setTimeout(() => t(a), 100);
|
|
92
|
+
return () => clearTimeout(p);
|
|
93
|
+
}, [a, s]);
|
|
94
|
+
const f = r ? A(n) : n;
|
|
95
|
+
return /* @__PURE__ */ h(
|
|
92
96
|
"span",
|
|
93
97
|
{
|
|
94
|
-
ref:
|
|
95
|
-
"aria-live":
|
|
96
|
-
"aria-busy": !!
|
|
98
|
+
ref: l,
|
|
99
|
+
"aria-live": d,
|
|
100
|
+
"aria-busy": !!s,
|
|
97
101
|
"data-component": "streaming-text",
|
|
98
|
-
className:
|
|
102
|
+
className: z({ size: c, density: u, className: o }),
|
|
99
103
|
...e,
|
|
100
104
|
children: [
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
f,
|
|
106
|
+
s ? /* @__PURE__ */ i(
|
|
103
107
|
"span",
|
|
104
108
|
{
|
|
105
109
|
"aria-hidden": "true",
|
|
@@ -120,8 +124,8 @@ const C = h(
|
|
|
120
124
|
);
|
|
121
125
|
}
|
|
122
126
|
);
|
|
123
|
-
|
|
127
|
+
j.displayName = "StreamingText";
|
|
124
128
|
export {
|
|
125
|
-
|
|
129
|
+
j as S
|
|
126
130
|
};
|
|
127
|
-
//# sourceMappingURL=streaming-text-
|
|
131
|
+
//# sourceMappingURL=streaming-text-CfhDqtIT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-text-CfhDqtIT.js","sources":["../../src/components/streaming-text/streaming-text.tsx"],"sourcesContent":["import {\n forwardRef,\n Fragment,\n useEffect,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CodeBlock, splitCodeFences } from '../_shared/code-block';\n\nconst containerVariants = cva(\n 'type-body ds:block ds:whitespace-pre-wrap ds:break-words',\n {\n variants: {\n // Family, weight, tracking, line-height all come from `.type-body` on the base.\n // Size variants override --type-body-size to shift the ramp step.\n size: {\n sm: 'ds:[--type-body-size:var(--font-size-sm)]',\n md: '',\n lg: 'ds:[--type-body-size:var(--font-size-lg)]',\n },\n density: {\n default: '',\n compact: 'ds:[--type-body-size:var(--font-size-sm)] ds:leading-snug',\n },\n },\n defaultVariants: { size: 'md', density: 'default' },\n },\n);\n\ntype NativeProps = Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children' | 'aria-busy' | 'aria-live'\n>;\n\nexport interface StreamingTextProps\n extends NativeProps, VariantProps<typeof containerVariants> {\n /** Accumulated plain-text content. Parent appends tokens as they arrive. */\n content: string;\n /** While true the blinking cursor is shown and aria-busy is set. */\n isStreaming: boolean;\n /** When true, parse a small, safe subset of markdown (bold, inline code, line-breaks).\n * No HTML passes through; no dangerouslySetInnerHTML is ever used. */\n renderMarkdown?: boolean;\n /** Announce updates more aggressively when the streamed content is primary\n * (not wrapped by a higher-level log region). Defaults to 'polite'; never\n * set to 'assertive' for streamed output. */\n ariaLive?: 'polite' | 'off';\n}\n\n/* ------------------------------------------------------------------ */\n/* Safe, dependency-free markdown-ish renderer. */\n/* Handles **bold**, `inline code`, and newlines. Anything that looks */\n/* like HTML stays as text — no dangerouslySetInnerHTML. */\n/* ------------------------------------------------------------------ */\n\ntype Token =\n | { type: 'text'; value: string }\n | { type: 'bold'; value: string }\n | { type: 'code'; value: string }\n | { type: 'br' };\n\nfunction tokenize(input: string): Token[] {\n // Single-pass O(n) scanner. Avoids regex backtracking on `***` triples.\n const tokens: Token[] = [];\n const len = input.length;\n const STAR = 42; // '*'\n const BACKTICK = 96; // '`'\n const LF = 10; // '\\n'\n let textStart = 0;\n let i = 0;\n\n const flushText = (end: number) => {\n if (end > textStart) {\n tokens.push({ type: 'text', value: input.slice(textStart, end) });\n }\n };\n\n while (i < len) {\n const c = input.charCodeAt(i);\n\n if (c === STAR && i + 1 < len && input.charCodeAt(i + 1) === STAR) {\n // Look for closing `**`; inner content must not contain `*`.\n let j = i + 2;\n while (j < len && input.charCodeAt(j) !== STAR) j++;\n if (j < len - 1 && input.charCodeAt(j + 1) === STAR && j > i + 2) {\n flushText(i);\n tokens.push({ type: 'bold', value: input.slice(i + 2, j) });\n i = j + 2;\n textStart = i;\n continue;\n }\n i += 2;\n continue;\n }\n\n if (c === BACKTICK) {\n let j = i + 1;\n while (j < len && input.charCodeAt(j) !== BACKTICK) j++;\n if (j < len && j > i + 1) {\n flushText(i);\n tokens.push({ type: 'code', value: input.slice(i + 1, j) });\n i = j + 1;\n textStart = i;\n continue;\n }\n i += 1;\n continue;\n }\n\n if (c === LF) {\n flushText(i);\n tokens.push({ type: 'br' });\n i += 1;\n textStart = i;\n continue;\n }\n\n i += 1;\n }\n\n flushText(len);\n return tokens;\n}\n\nfunction renderInline(input: string): ReactNode {\n return tokenize(input).map((tok, i) => {\n if (tok.type === 'bold') return <strong key={i}>{tok.value}</strong>;\n if (tok.type === 'code') {\n return (\n <code\n key={i}\n dir=\"ltr\"\n className=\"ds:rounded-[var(--radius-sm)] ds:bg-muted/20 ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:font-[family-name:var(--font-mono)] ds:text-[length:0.95em]\"\n >\n {tok.value}\n </code>\n );\n }\n if (tok.type === 'br') return <br key={i} />;\n return <Fragment key={i}>{tok.value}</Fragment>;\n });\n}\n\n/**\n * Render the streamed body: split fenced code blocks out to `<CodeBlock>` and\n * run the inline tokenizer over the surrounding text. Tolerates an open fence\n * (closing ``` not yet streamed) — the prompt renders as a code block live.\n */\nfunction renderTokens(input: string): ReactNode {\n return splitCodeFences(input).map((seg, i) => {\n if (seg.type === 'code') {\n return <CodeBlock key={i} code={seg.value} language={seg.lang} />;\n }\n return <Fragment key={i}>{renderInline(seg.value)}</Fragment>;\n });\n}\n\nexport const StreamingText = forwardRef<HTMLSpanElement, StreamingTextProps>(\n (\n {\n content,\n isStreaming,\n renderMarkdown = false,\n ariaLive = 'polite',\n size = 'md',\n density = 'default',\n className,\n ...rest\n },\n ref,\n ) => {\n // Throttle visible content to at most ~10 updates per second so assistive\n // tech doesn't receive one announcement per token. We keep the full text in\n // a ref and push it to state on a timer.\n const [visible, setVisible] = useState<string>(content);\n\n useEffect(() => {\n if (!isStreaming) {\n // Streaming ended — flush immediately.\n setVisible(content);\n return;\n }\n // Global `setTimeout` works in both Node and browsers — avoid the\n // `window.` prefix so SSR (Next.js App Router, Remix) doesn't throw.\n const handle = setTimeout(() => setVisible(content), 100);\n return () => clearTimeout(handle);\n }, [content, isStreaming]);\n\n const body = renderMarkdown ? renderTokens(visible) : visible;\n\n return (\n <span\n ref={ref}\n aria-live={ariaLive}\n aria-busy={isStreaming ? true : false}\n data-component=\"streaming-text\"\n className={containerVariants({ size, density, className })}\n {...rest}\n >\n {body}\n {isStreaming ? (\n <span\n aria-hidden=\"true\"\n className={[\n 'ds:inline-block ds:align-baseline',\n 'ds:text-[color:var(--primary)]',\n 'ds:motion-safe:animate-[streaming-cursor-blink_1s_step-end_infinite]',\n 'ds:motion-reduce:opacity-100',\n 'ds:[.theme-accessible_&]:animate-none',\n 'ds:forced-colors:text-[CanvasText]',\n 'ds:ms-[1px]',\n ].join(' ')}\n >\n {'\\u258D'}\n </span>\n ) : null}\n </span>\n );\n },\n);\n\nStreamingText.displayName = 'StreamingText';\n"],"names":["containerVariants","cva","tokenize","input","tokens","len","STAR","BACKTICK","LF","textStart","i","flushText","end","c","j","renderInline","tok","jsx","Fragment","renderTokens","splitCodeFences","seg","CodeBlock","StreamingText","forwardRef","content","isStreaming","renderMarkdown","ariaLive","size","density","className","rest","ref","visible","setVisible","useState","useEffect","handle","body","jsxs"],"mappings":";;;;AAWA,MAAMA,IAAoBC;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA;AAAA,MAGR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,iBAAiB,EAAE,MAAM,MAAM,SAAS,UAAA;AAAA,EAAU;AAEtD;AAkCA,SAASC,EAASC,GAAwB;AAExC,QAAMC,IAAkB,CAAA,GAClBC,IAAMF,EAAM,QACZG,IAAO,IACPC,IAAW,IACXC,IAAK;AACX,MAAIC,IAAY,GACZC,IAAI;AAER,QAAMC,IAAY,CAACC,MAAgB;AACjC,IAAIA,IAAMH,KACRL,EAAO,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