@shapesos/clay 0.8.0 → 0.8.2
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/chat.cjs +24 -25
- package/dist/chat.cjs.map +1 -1
- package/dist/chat.js +2 -2
- package/dist/{chunk-N4FMZU56.js → chunk-27GJUWVN.js} +7 -3
- package/dist/chunk-27GJUWVN.js.map +1 -0
- package/dist/{chunk-KYTNUZO6.js → chunk-A77BGJH4.js} +5 -10
- package/dist/chunk-A77BGJH4.js.map +1 -0
- package/dist/{chunk-QUJYTIGD.js → chunk-NMKKU2UG.js} +7 -2
- package/dist/chunk-NMKKU2UG.js.map +1 -0
- package/dist/index.cjs +44 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/utils.cjs +7 -3
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-KYTNUZO6.js.map +0 -1
- package/dist/chunk-N4FMZU56.js.map +0 -1
- package/dist/chunk-QUJYTIGD.js.map +0 -1
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
var PLACEHOLDER_PREFIX = "\u200B\u200BIC";
|
|
3
3
|
var PLACEHOLDER_SUFFIX = "\u200B\u200B";
|
|
4
4
|
var PLACEHOLDER_REGEX = new RegExp(`${PLACEHOLDER_PREFIX}(\\d+)${PLACEHOLDER_SUFFIX}`, "g");
|
|
5
|
+
function stripInlineMarks(text) {
|
|
6
|
+
return text.replace(/\*{3}(.+?)\*{3}/g, "$1").replace(/\*{2}(.+?)\*{2}/g, "$1").replace(/_{2}(.+?)_{2}/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/_(.+?)_/g, "$1").replace(/~~(.+?)~~/g, "$1");
|
|
7
|
+
}
|
|
5
8
|
function markdownToPlainText(markdown) {
|
|
6
9
|
if (!markdown) return "";
|
|
7
10
|
const inlineCodeSnippets = [];
|
|
8
11
|
let result = markdown.replace(/^<!--[\s\S]*?--!?>\n?/gm, "").replace(/```[\s\S]*?```/g, "").replace(/`([^`]+)`/g, (_match, code) => {
|
|
9
12
|
inlineCodeSnippets.push(code);
|
|
10
13
|
return `${PLACEHOLDER_PREFIX}${inlineCodeSnippets.length - 1}${PLACEHOLDER_SUFFIX}`;
|
|
11
|
-
}).replace(/^#{1,6}\s+/gm, "").replace(/^(?:---|\*\*\*|___)\s*$/gm, "")
|
|
14
|
+
}).replace(/^#{1,6}\s+/gm, "").replace(/^(?:---|\*\*\*|___)\s*$/gm, "");
|
|
15
|
+
result = stripInlineMarks(result).replace(/!\[([^\]]*)\]\([^)]+\)/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/^>\s?/gm, "").replace(/^\|[-:\s|]+\|\s*$/gm, "").replace(/^\|\s?/gm, "").replace(/\s?\|$/gm, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
12
16
|
result = result.replace(PLACEHOLDER_REGEX, (_match, index) => inlineCodeSnippets[Number(index)]);
|
|
13
17
|
return result;
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
export {
|
|
21
|
+
stripInlineMarks,
|
|
17
22
|
markdownToPlainText
|
|
18
23
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-NMKKU2UG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/markdown-to-plain-text.ts"],"sourcesContent":["const PLACEHOLDER_PREFIX = \"\\u200B\\u200BIC\";\nconst PLACEHOLDER_SUFFIX = \"\\u200B\\u200B\";\nconst PLACEHOLDER_REGEX = new RegExp(`${PLACEHOLDER_PREFIX}(\\\\d+)${PLACEHOLDER_SUFFIX}`, \"g\");\n\n/**\n * Strips only inline markdown marks (bold, italic, strikethrough) from a string.\n * Does not touch block-level syntax (headings, blockquotes, horizontal rules, links, images)\n * so values like `> 100`, `# items`, or `---` are preserved as-is.\n * @param text - The text to strip inline marks from.\n * @returns The text with inline marks removed.\n */\nexport function stripInlineMarks(text: string): string {\n return (\n text\n // Bold + italic\n .replace(/\\*{3}(.+?)\\*{3}/g, \"$1\")\n // Bold\n .replace(/\\*{2}(.+?)\\*{2}/g, \"$1\")\n .replace(/_{2}(.+?)_{2}/g, \"$1\")\n // Italic\n .replace(/\\*(.+?)\\*/g, \"$1\")\n .replace(/_(.+?)_/g, \"$1\")\n // Strikethrough\n .replace(/~~(.+?)~~/g, \"$1\")\n );\n}\n\n/**\n * Converts a Markdown string to plain text by stripping all formatting syntax.\n *\n * Handles headings, bold/italic/strikethrough, links, images, blockquotes, code blocks,\n * inline code, tables, and horizontal rules. Inline code content is preserved literally\n * (formatting inside backticks is not stripped).\n *\n * @param markdown - The Markdown source string.\n * @returns A plain-text string with all Markdown syntax removed.\n */\nexport function markdownToPlainText(markdown: string): string {\n if (!markdown) return \"\";\n\n // Protect inline code content from bold/italic stripping by replacing with placeholders\n const inlineCodeSnippets: string[] = [];\n let result = markdown\n // HTML comments (e.g. <!-- table-title: ... -->), including multiline and --!> variants\n .replace(/^<!--[\\s\\S]*?--!?>\\n?/gm, \"\")\n // Code blocks (must come first)\n .replace(/```[\\s\\S]*?```/g, \"\")\n // Inline code → placeholder\n .replace(/`([^`]+)`/g, (_match, code: string) => {\n inlineCodeSnippets.push(code);\n return `${PLACEHOLDER_PREFIX}${inlineCodeSnippets.length - 1}${PLACEHOLDER_SUFFIX}`;\n })\n // Remove headings markers, keep text\n .replace(/^#{1,6}\\s+/gm, \"\")\n // Remove horizontal rules\n .replace(/^(?:---|\\*\\*\\*|___)\\s*$/gm, \"\");\n result = stripInlineMarks(result)\n // Images:  → alt (must come before links)\n .replace(/!\\[([^\\]]*)\\]\\([^)]+\\)/g, \"$1\")\n // Links: [text](url) → text\n .replace(/\\[([^\\]]+)\\]\\([^)]+\\)/g, \"$1\")\n // Blockquote markers\n .replace(/^>\\s?/gm, \"\")\n // Table separator rows (|---|---|)\n .replace(/^\\|[-:\\s|]+\\|\\s*$/gm, \"\")\n // Table rows: | a | b | → a | b\n .replace(/^\\|\\s?/gm, \"\")\n .replace(/\\s?\\|$/gm, \"\")\n // Collapse multiple blank lines\n .replace(/\\n{3,}/g, \"\\n\\n\")\n .trim();\n\n // Restore inline code content\n result = result.replace(PLACEHOLDER_REGEX, (_match, index: string) => inlineCodeSnippets[Number(index)]);\n\n return result;\n}\n"],"mappings":";AAAA,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAC3B,IAAM,oBAAoB,IAAI,OAAO,GAAG,kBAAkB,SAAS,kBAAkB,IAAI,GAAG;AASrF,SAAS,iBAAiB,MAAsB;AACrD,SACE,KAEG,QAAQ,oBAAoB,IAAI,EAEhC,QAAQ,oBAAoB,IAAI,EAChC,QAAQ,kBAAkB,IAAI,EAE9B,QAAQ,cAAc,IAAI,EAC1B,QAAQ,YAAY,IAAI,EAExB,QAAQ,cAAc,IAAI;AAEjC;AAYO,SAAS,oBAAoB,UAA0B;AAC5D,MAAI,CAAC,SAAU,QAAO;AAGtB,QAAM,qBAA+B,CAAC;AACtC,MAAI,SAAS,SAEV,QAAQ,2BAA2B,EAAE,EAErC,QAAQ,mBAAmB,EAAE,EAE7B,QAAQ,cAAc,CAAC,QAAQ,SAAiB;AAC/C,uBAAmB,KAAK,IAAI;AAC5B,WAAO,GAAG,kBAAkB,GAAG,mBAAmB,SAAS,CAAC,GAAG,kBAAkB;AAAA,EACnF,CAAC,EAEA,QAAQ,gBAAgB,EAAE,EAE1B,QAAQ,6BAA6B,EAAE;AAC1C,WAAS,iBAAiB,MAAM,EAE7B,QAAQ,2BAA2B,IAAI,EAEvC,QAAQ,0BAA0B,IAAI,EAEtC,QAAQ,WAAW,EAAE,EAErB,QAAQ,uBAAuB,EAAE,EAEjC,QAAQ,YAAY,EAAE,EACtB,QAAQ,YAAY,EAAE,EAEtB,QAAQ,WAAW,MAAM,EACzB,KAAK;AAGR,WAAS,OAAO,QAAQ,mBAAmB,CAAC,QAAQ,UAAkB,mBAAmB,OAAO,KAAK,CAAC,CAAC;AAEvG,SAAO;AACT;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -16754,7 +16754,6 @@ function typographyMixin(type) {
|
|
|
16754
16754
|
}
|
|
16755
16755
|
|
|
16756
16756
|
// src/components/chat/chat-message-content/chat-message-content.tsx
|
|
16757
|
-
var import_react3 = require("react");
|
|
16758
16757
|
var import_react_markdown = __toESM(require("react-markdown"), 1);
|
|
16759
16758
|
var import_remark_breaks = __toESM(require("remark-breaks"), 1);
|
|
16760
16759
|
var import_remark_gfm = __toESM(require("remark-gfm"), 1);
|
|
@@ -16940,21 +16939,17 @@ function ChatMessageContent({ content: content2, messageId }) {
|
|
|
16940
16939
|
const t = line.trim();
|
|
16941
16940
|
return !(t.startsWith("<!-- table-title:") && t.endsWith("-->"));
|
|
16942
16941
|
}).join("\n");
|
|
16943
|
-
const markdownComponents =
|
|
16944
|
-
() => ({
|
|
16945
|
-
|
|
16946
|
-
}),
|
|
16947
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- counter is intentionally a fresh object each render for sequential table indexing
|
|
16948
|
-
[messageId]
|
|
16949
|
-
);
|
|
16942
|
+
const markdownComponents = {
|
|
16943
|
+
table: ((tableProps) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ScrollableTable, { ...tableProps, messageId, counter }))
|
|
16944
|
+
};
|
|
16950
16945
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ContentWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default, import_remark_breaks.default], components: markdownComponents, children: sanitizedContent }) });
|
|
16951
16946
|
}
|
|
16952
16947
|
|
|
16953
16948
|
// src/components/chat/chat-message-actions/chat-message-actions.tsx
|
|
16954
|
-
var
|
|
16949
|
+
var import_react6 = require("react");
|
|
16955
16950
|
|
|
16956
16951
|
// node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs
|
|
16957
|
-
var
|
|
16952
|
+
var import_react3 = require("react");
|
|
16958
16953
|
|
|
16959
16954
|
// node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs
|
|
16960
16955
|
var defaultAttributes = {
|
|
@@ -16981,8 +16976,8 @@ var defaultAttributes = {
|
|
|
16981
16976
|
|
|
16982
16977
|
// node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs
|
|
16983
16978
|
var createReactComponent = (type, iconName, iconNamePascal, iconNode) => {
|
|
16984
|
-
const Component = (0,
|
|
16985
|
-
({ color = "currentColor", size = 24, stroke = 2, title, className, children, ...rest }, ref) => (0,
|
|
16979
|
+
const Component = (0, import_react3.forwardRef)(
|
|
16980
|
+
({ color = "currentColor", size = 24, stroke = 2, title, className, children, ...rest }, ref) => (0, import_react3.createElement)(
|
|
16986
16981
|
"svg",
|
|
16987
16982
|
{
|
|
16988
16983
|
ref,
|
|
@@ -16999,8 +16994,8 @@ var createReactComponent = (type, iconName, iconNamePascal, iconNode) => {
|
|
|
16999
16994
|
...rest
|
|
17000
16995
|
},
|
|
17001
16996
|
[
|
|
17002
|
-
title && (0,
|
|
17003
|
-
...iconNode.map(([tag, attrs]) => (0,
|
|
16997
|
+
title && (0, import_react3.createElement)("title", { key: "svg-title" }, title),
|
|
16998
|
+
...iconNode.map(([tag, attrs]) => (0, import_react3.createElement)(tag, attrs)),
|
|
17004
16999
|
...Array.isArray(children) ? children : [children]
|
|
17005
17000
|
]
|
|
17006
17001
|
)
|
|
@@ -17026,7 +17021,7 @@ var __iconNode4 = [["path", { "d": "M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7
|
|
|
17026
17021
|
var IconThumbUp = createReactComponent("outline", "thumb-up", "ThumbUp", __iconNode4);
|
|
17027
17022
|
|
|
17028
17023
|
// src/components/icon/icon.tsx
|
|
17029
|
-
var
|
|
17024
|
+
var import_react4 = require("react");
|
|
17030
17025
|
|
|
17031
17026
|
// src/components/icon/icon-styles.ts
|
|
17032
17027
|
var import_styled_components3 = __toESM(require("styled-components"), 1);
|
|
@@ -17053,7 +17048,7 @@ var IconWrapper = import_styled_components3.default.span`
|
|
|
17053
17048
|
// src/components/icon/icon.tsx
|
|
17054
17049
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
17055
17050
|
var DEFAULT_SIZE = 16;
|
|
17056
|
-
var Icon = (0,
|
|
17051
|
+
var Icon = (0, import_react4.forwardRef)(function Icon2({ icon: IconComponent, size = DEFAULT_SIZE, color, className, "aria-label": ariaLabel }, ref) {
|
|
17057
17052
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
17058
17053
|
IconWrapper,
|
|
17059
17054
|
{
|
|
@@ -17146,7 +17141,7 @@ function IconButton({
|
|
|
17146
17141
|
}
|
|
17147
17142
|
|
|
17148
17143
|
// src/components/chat/hooks/use-copy-to-clipboard.ts
|
|
17149
|
-
var
|
|
17144
|
+
var import_react5 = require("react");
|
|
17150
17145
|
|
|
17151
17146
|
// src/utils/clipboard.ts
|
|
17152
17147
|
function copyToClipboard(text2, options) {
|
|
@@ -17160,13 +17155,17 @@ function copyToClipboard(text2, options) {
|
|
|
17160
17155
|
var PLACEHOLDER_PREFIX = "\u200B\u200BIC";
|
|
17161
17156
|
var PLACEHOLDER_SUFFIX = "\u200B\u200B";
|
|
17162
17157
|
var PLACEHOLDER_REGEX = new RegExp(`${PLACEHOLDER_PREFIX}(\\d+)${PLACEHOLDER_SUFFIX}`, "g");
|
|
17158
|
+
function stripInlineMarks(text2) {
|
|
17159
|
+
return text2.replace(/\*{3}(.+?)\*{3}/g, "$1").replace(/\*{2}(.+?)\*{2}/g, "$1").replace(/_{2}(.+?)_{2}/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/_(.+?)_/g, "$1").replace(/~~(.+?)~~/g, "$1");
|
|
17160
|
+
}
|
|
17163
17161
|
function markdownToPlainText(markdown) {
|
|
17164
17162
|
if (!markdown) return "";
|
|
17165
17163
|
const inlineCodeSnippets = [];
|
|
17166
17164
|
let result = markdown.replace(/^<!--[\s\S]*?--!?>\n?/gm, "").replace(/```[\s\S]*?```/g, "").replace(/`([^`]+)`/g, (_match, code) => {
|
|
17167
17165
|
inlineCodeSnippets.push(code);
|
|
17168
17166
|
return `${PLACEHOLDER_PREFIX}${inlineCodeSnippets.length - 1}${PLACEHOLDER_SUFFIX}`;
|
|
17169
|
-
}).replace(/^#{1,6}\s+/gm, "").replace(/^(?:---|\*\*\*|___)\s*$/gm, "")
|
|
17167
|
+
}).replace(/^#{1,6}\s+/gm, "").replace(/^(?:---|\*\*\*|___)\s*$/gm, "");
|
|
17168
|
+
result = stripInlineMarks(result).replace(/!\[([^\]]*)\]\([^)]+\)/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/^>\s?/gm, "").replace(/^\|[-:\s|]+\|\s*$/gm, "").replace(/^\|\s?/gm, "").replace(/\s?\|$/gm, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
17170
17169
|
result = result.replace(PLACEHOLDER_REGEX, (_match, index2) => inlineCodeSnippets[Number(index2)]);
|
|
17171
17170
|
return result;
|
|
17172
17171
|
}
|
|
@@ -17174,14 +17173,14 @@ function markdownToPlainText(markdown) {
|
|
|
17174
17173
|
// src/components/chat/hooks/use-copy-to-clipboard.ts
|
|
17175
17174
|
var RESET_DELAY_MS = 2e3;
|
|
17176
17175
|
function useCopyToClipboard() {
|
|
17177
|
-
const [isCopied, setIsCopied] = (0,
|
|
17178
|
-
const timeoutRef = (0,
|
|
17179
|
-
(0,
|
|
17176
|
+
const [isCopied, setIsCopied] = (0, import_react5.useState)(false);
|
|
17177
|
+
const timeoutRef = (0, import_react5.useRef)(null);
|
|
17178
|
+
(0, import_react5.useEffect)(() => {
|
|
17180
17179
|
return () => {
|
|
17181
17180
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
17182
17181
|
};
|
|
17183
17182
|
}, []);
|
|
17184
|
-
const copy = (0,
|
|
17183
|
+
const copy = (0, import_react5.useCallback)((text2) => {
|
|
17185
17184
|
copyToClipboard(markdownToPlainText(text2), {
|
|
17186
17185
|
onSuccess: () => {
|
|
17187
17186
|
setIsCopied(true);
|
|
@@ -17225,14 +17224,14 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
|
17225
17224
|
function ChatMessageActions({ className, messageId, content: content2, role, isHelpful }) {
|
|
17226
17225
|
const { onCopyMessage, onThumbUpClick, onThumbDownClick } = useChatContext();
|
|
17227
17226
|
const { isCopied, copy } = useCopyToClipboard();
|
|
17228
|
-
const handleCopy = (0,
|
|
17227
|
+
const handleCopy = (0, import_react6.useCallback)(() => {
|
|
17229
17228
|
copy(content2);
|
|
17230
17229
|
onCopyMessage?.(messageId);
|
|
17231
17230
|
}, [content2, messageId, copy, onCopyMessage]);
|
|
17232
|
-
const handleThumbUp = (0,
|
|
17231
|
+
const handleThumbUp = (0, import_react6.useCallback)(() => {
|
|
17233
17232
|
onThumbUpClick?.(messageId, isHelpful === true ? null : true);
|
|
17234
17233
|
}, [messageId, isHelpful, onThumbUpClick]);
|
|
17235
|
-
const handleThumbDown = (0,
|
|
17234
|
+
const handleThumbDown = (0, import_react6.useCallback)(() => {
|
|
17236
17235
|
onThumbDownClick?.(messageId, isHelpful === false ? null : false);
|
|
17237
17236
|
}, [messageId, isHelpful, onThumbDownClick]);
|
|
17238
17237
|
const isAssistant = role === MESSAGE_ROLE.ASSISTANT;
|
|
@@ -17380,7 +17379,7 @@ function IconCtrl(props) {
|
|
|
17380
17379
|
}
|
|
17381
17380
|
|
|
17382
17381
|
// src/components/lottie/lottie.tsx
|
|
17383
|
-
var
|
|
17382
|
+
var import_react8 = require("react");
|
|
17384
17383
|
|
|
17385
17384
|
// src/components/lottie/lottie-styles.ts
|
|
17386
17385
|
var import_styled_components8 = __toESM(require("styled-components"), 1);
|
|
@@ -17396,7 +17395,7 @@ var LottieContainer = import_styled_components8.default.div`
|
|
|
17396
17395
|
`;
|
|
17397
17396
|
|
|
17398
17397
|
// src/components/lottie/use-lottie.ts
|
|
17399
|
-
var
|
|
17398
|
+
var import_react7 = require("react");
|
|
17400
17399
|
var import_lottie_web = __toESM(require_lottie(), 1);
|
|
17401
17400
|
function useLottie({
|
|
17402
17401
|
animationData: animationData2,
|
|
@@ -17411,17 +17410,17 @@ function useLottie({
|
|
|
17411
17410
|
onLoopComplete,
|
|
17412
17411
|
onEnterFrame
|
|
17413
17412
|
}) {
|
|
17414
|
-
const containerRef = (0,
|
|
17415
|
-
const animationRef = (0,
|
|
17416
|
-
const onAnimationLoadedRef = (0,
|
|
17417
|
-
const onCompleteRef = (0,
|
|
17418
|
-
const onLoopCompleteRef = (0,
|
|
17419
|
-
const onEnterFrameRef = (0,
|
|
17413
|
+
const containerRef = (0, import_react7.useRef)(null);
|
|
17414
|
+
const animationRef = (0, import_react7.useRef)(null);
|
|
17415
|
+
const onAnimationLoadedRef = (0, import_react7.useRef)(onAnimationLoaded);
|
|
17416
|
+
const onCompleteRef = (0, import_react7.useRef)(onComplete);
|
|
17417
|
+
const onLoopCompleteRef = (0, import_react7.useRef)(onLoopComplete);
|
|
17418
|
+
const onEnterFrameRef = (0, import_react7.useRef)(onEnterFrame);
|
|
17420
17419
|
onAnimationLoadedRef.current = onAnimationLoaded;
|
|
17421
17420
|
onCompleteRef.current = onComplete;
|
|
17422
17421
|
onLoopCompleteRef.current = onLoopComplete;
|
|
17423
17422
|
onEnterFrameRef.current = onEnterFrame;
|
|
17424
|
-
(0,
|
|
17423
|
+
(0, import_react7.useEffect)(() => {
|
|
17425
17424
|
if (!containerRef.current) return;
|
|
17426
17425
|
const anim = import_lottie_web.default.loadAnimation({
|
|
17427
17426
|
container: containerRef.current,
|
|
@@ -17514,7 +17513,7 @@ function createLottieRef(animationRef) {
|
|
|
17514
17513
|
|
|
17515
17514
|
// src/components/lottie/lottie.tsx
|
|
17516
17515
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
17517
|
-
var Lottie = (0,
|
|
17516
|
+
var Lottie = (0, import_react8.forwardRef)(function Lottie2({
|
|
17518
17517
|
animationData: animationData2,
|
|
17519
17518
|
autoplay,
|
|
17520
17519
|
loop,
|
|
@@ -17544,7 +17543,7 @@ var Lottie = (0, import_react9.forwardRef)(function Lottie2({
|
|
|
17544
17543
|
onLoopComplete,
|
|
17545
17544
|
onEnterFrame
|
|
17546
17545
|
});
|
|
17547
|
-
(0,
|
|
17546
|
+
(0, import_react8.useImperativeHandle)(ref, () => createLottieRef(animationRef), [animationRef]);
|
|
17548
17547
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17549
17548
|
LottieContainer,
|
|
17550
17549
|
{
|
|
@@ -17559,7 +17558,7 @@ var Lottie = (0, import_react9.forwardRef)(function Lottie2({
|
|
|
17559
17558
|
});
|
|
17560
17559
|
|
|
17561
17560
|
// src/components/text-area/text-area.tsx
|
|
17562
|
-
var
|
|
17561
|
+
var import_react9 = require("react");
|
|
17563
17562
|
|
|
17564
17563
|
// src/utils/merge-refs.ts
|
|
17565
17564
|
function mergeRefs(...refs) {
|
|
@@ -17600,16 +17599,16 @@ var StyledTextArea = import_styled_components9.default.textarea`
|
|
|
17600
17599
|
|
|
17601
17600
|
// src/components/text-area/text-area.tsx
|
|
17602
17601
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
17603
|
-
var TextArea = (0,
|
|
17604
|
-
const internalRef = (0,
|
|
17605
|
-
(0,
|
|
17602
|
+
var TextArea = (0, import_react9.forwardRef)(function TextArea2({ value: value2, onChange, placeholder, maxHeight, rows = 1, autoFocus, onKeyDown, disabled, className }, externalRef) {
|
|
17603
|
+
const internalRef = (0, import_react9.useRef)(null);
|
|
17604
|
+
(0, import_react9.useLayoutEffect)(() => {
|
|
17606
17605
|
const el = internalRef.current;
|
|
17607
17606
|
if (el) {
|
|
17608
17607
|
el.style.height = "auto";
|
|
17609
17608
|
el.style.height = `${el.scrollHeight}px`;
|
|
17610
17609
|
}
|
|
17611
17610
|
}, [value2]);
|
|
17612
|
-
const handleChange = (0,
|
|
17611
|
+
const handleChange = (0, import_react9.useCallback)(
|
|
17613
17612
|
(e) => {
|
|
17614
17613
|
onChange(e.target.value);
|
|
17615
17614
|
},
|
|
@@ -17665,7 +17664,7 @@ function parseMarkdownTable(markdown, tableIndex = 0) {
|
|
|
17665
17664
|
continue;
|
|
17666
17665
|
}
|
|
17667
17666
|
if (tableCount === tableIndex) {
|
|
17668
|
-
const columns = parseCells(headerLine);
|
|
17667
|
+
const columns = parseCells(headerLine).map(stripInlineMarks);
|
|
17669
17668
|
const rows = [];
|
|
17670
17669
|
const title = i > 0 ? extractTableTitle(lines[i - 1]) : void 0;
|
|
17671
17670
|
for (let j = i + 2; j < lines.length; j++) {
|
|
@@ -17676,7 +17675,7 @@ function parseMarkdownTable(markdown, tableIndex = 0) {
|
|
|
17676
17675
|
if (trimmedLine === "") {
|
|
17677
17676
|
break;
|
|
17678
17677
|
}
|
|
17679
|
-
rows.push(parseCells(lines[j]));
|
|
17678
|
+
rows.push(parseCells(lines[j]).map(stripInlineMarks));
|
|
17680
17679
|
}
|
|
17681
17680
|
return { columns, rows, ...title ? { title } : {} };
|
|
17682
17681
|
}
|
|
@@ -17699,7 +17698,7 @@ function convertTableToCSV(table) {
|
|
|
17699
17698
|
}
|
|
17700
17699
|
|
|
17701
17700
|
// src/components/button/button.tsx
|
|
17702
|
-
var
|
|
17701
|
+
var import_react10 = require("react");
|
|
17703
17702
|
|
|
17704
17703
|
// src/components/button/button-styles.ts
|
|
17705
17704
|
var import_styled_components10 = __toESM(require("styled-components"), 1);
|
|
@@ -17797,7 +17796,7 @@ var ICON_POSITION = {
|
|
|
17797
17796
|
|
|
17798
17797
|
// src/components/button/button.tsx
|
|
17799
17798
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
17800
|
-
var Button2 = (0,
|
|
17799
|
+
var Button2 = (0, import_react10.forwardRef)(function Button3({
|
|
17801
17800
|
children,
|
|
17802
17801
|
variant = BUTTON_VARIANT.SOLID,
|
|
17803
17802
|
size = BUTTON_SIZE.M,
|