@shapesos/clay 0.18.0 → 0.19.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/artifacts.cjs +151 -130
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.js +3 -2
- package/dist/badge.cjs +70 -0
- package/dist/badge.cjs.map +1 -0
- package/dist/badge.d.cts +28 -0
- package/dist/badge.d.ts +28 -0
- package/dist/badge.js +9 -0
- package/dist/badge.js.map +1 -0
- package/dist/blocks.cjs +434 -176
- package/dist/blocks.cjs.map +1 -1
- package/dist/blocks.css +1 -1
- package/dist/blocks.d.cts +14 -3
- package/dist/blocks.d.ts +14 -3
- package/dist/blocks.js +17 -5
- package/dist/chat.cjs +439 -231
- package/dist/chat.cjs.map +1 -1
- package/dist/chat.d.cts +1 -1
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +10 -5
- package/dist/{chunk-JGMN6W72.js → chunk-2X4KUXYP.js} +1 -1
- package/dist/chunk-CSTCTO3B.js +161 -0
- package/dist/chunk-CSTCTO3B.js.map +1 -0
- package/dist/{chunk-QR4VBGK4.js → chunk-DC5KYT2G.js} +65 -198
- package/dist/chunk-DC5KYT2G.js.map +1 -0
- package/dist/chunk-EIAWZXE4.js +69 -0
- package/dist/chunk-EIAWZXE4.js.map +1 -0
- package/dist/chunk-EXRNGIQ2.js +41 -0
- package/dist/chunk-EXRNGIQ2.js.map +1 -0
- package/dist/{chunk-CATIRDZP.js → chunk-FCSYVF4Z.js} +10 -44
- package/dist/chunk-FCSYVF4Z.js.map +1 -0
- package/dist/{chunk-4MZZH3WX.js → chunk-HU5W7CGE.js} +37 -2
- package/dist/chunk-HU5W7CGE.js.map +1 -0
- package/dist/chunk-JMHE3Q5K.js +406 -0
- package/dist/chunk-JMHE3Q5K.js.map +1 -0
- package/dist/copy-button.cjs +439 -0
- package/dist/copy-button.cjs.map +1 -0
- package/dist/copy-button.d.cts +20 -0
- package/dist/copy-button.d.ts +20 -0
- package/dist/copy-button.js +12 -0
- package/dist/copy-button.js.map +1 -0
- package/dist/index.cjs +515 -289
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +26 -9
- package/dist/table.cjs +40 -0
- package/dist/table.cjs.map +1 -1
- package/dist/table.d.cts +37 -2
- package/dist/table.d.ts +37 -2
- package/dist/table.js +11 -1
- package/dist/{types-BDYPVP2N.d.cts → types-Bhg0_ES8.d.cts} +74 -2
- package/dist/{types-BMwa4bPW.d.ts → types-orOQcI2z.d.ts} +74 -2
- package/package.json +11 -1
- package/dist/chunk-4MZZH3WX.js.map +0 -1
- package/dist/chunk-7MY4X4YL.js +0 -250
- package/dist/chunk-7MY4X4YL.js.map +0 -1
- package/dist/chunk-CATIRDZP.js.map +0 -1
- package/dist/chunk-QR4VBGK4.js.map +0 -1
- /package/dist/{chunk-JGMN6W72.js.map → chunk-2X4KUXYP.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -16589,6 +16589,7 @@ __export(src_exports, {
|
|
|
16589
16589
|
BUTTON_INTENT: () => BUTTON_INTENT,
|
|
16590
16590
|
BUTTON_SIZE: () => BUTTON_SIZE,
|
|
16591
16591
|
BUTTON_VARIANT: () => BUTTON_VARIANT,
|
|
16592
|
+
Badge: () => Badge,
|
|
16592
16593
|
Block: () => Block,
|
|
16593
16594
|
BlockContext: () => BlockContext,
|
|
16594
16595
|
BlockServices: () => BlockServices,
|
|
@@ -16597,6 +16598,7 @@ __export(src_exports, {
|
|
|
16597
16598
|
ChartArtifact: () => ChartArtifact,
|
|
16598
16599
|
ChatContext: () => ChatContext,
|
|
16599
16600
|
ChatMessage: () => ChatMessage,
|
|
16601
|
+
CopyButton: () => CopyButton,
|
|
16600
16602
|
DEFAULT_CHART_ARTIFACT_LABELS: () => DEFAULT_CHART_ARTIFACT_LABELS,
|
|
16601
16603
|
DEFAULT_DECK_ARTIFACT_LABELS: () => DEFAULT_DECK_ARTIFACT_LABELS,
|
|
16602
16604
|
DEFAULT_TABLE_ARTIFACT_LABELS: () => DEFAULT_TABLE_ARTIFACT_LABELS,
|
|
@@ -16610,6 +16612,8 @@ __export(src_exports, {
|
|
|
16610
16612
|
Lottie: () => Lottie,
|
|
16611
16613
|
MESSAGE_ROLE: () => MESSAGE_ROLE,
|
|
16612
16614
|
MouseGrid: () => MouseGrid,
|
|
16615
|
+
NotificationDraftBlock: () => NotificationDraftBlock,
|
|
16616
|
+
NotificationDraftBlockService: () => NotificationDraftBlockService,
|
|
16613
16617
|
PromptInput: () => PromptInput,
|
|
16614
16618
|
PromptInputFooter: () => PromptInputFooter,
|
|
16615
16619
|
PromptInputSubmit: () => PromptInputSubmit,
|
|
@@ -16633,6 +16637,8 @@ __export(src_exports, {
|
|
|
16633
16637
|
isSafeDownloadUrl: () => isSafeDownloadUrl,
|
|
16634
16638
|
markdownToPlainText: () => markdownToPlainText,
|
|
16635
16639
|
mergeRefs: () => mergeRefs,
|
|
16640
|
+
notificationChannels: () => notificationChannels,
|
|
16641
|
+
notificationEmailTypes: () => notificationEmailTypes,
|
|
16636
16642
|
parseMarkdownTable: () => parseMarkdownTable,
|
|
16637
16643
|
typographyMixin: () => typographyMixin,
|
|
16638
16644
|
typographyStyles: () => typographyStyles,
|
|
@@ -16954,7 +16960,8 @@ function typographyMixin(type) {
|
|
|
16954
16960
|
// src/components/blocks/types.ts
|
|
16955
16961
|
var blockTypes = {
|
|
16956
16962
|
TEXT: "TEXT",
|
|
16957
|
-
ARTIFACT_REF: "ARTIFACT_REF"
|
|
16963
|
+
ARTIFACT_REF: "ARTIFACT_REF",
|
|
16964
|
+
NOTIFICATION_DRAFT: "NOTIFICATION_DRAFT"
|
|
16958
16965
|
};
|
|
16959
16966
|
|
|
16960
16967
|
// src/components/artifacts/artifact-base.ts
|
|
@@ -17118,41 +17125,49 @@ var IconArrowsMinimize = createReactComponent("outline", "arrows-minimize", "Arr
|
|
|
17118
17125
|
var __iconNode4 = [["path", { "d": "M5 12l5 5l10 -10", "key": "svg-0" }]];
|
|
17119
17126
|
var IconCheck = createReactComponent("outline", "check", "Check", __iconNode4);
|
|
17120
17127
|
|
|
17128
|
+
// node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs
|
|
17129
|
+
var __iconNode5 = [["path", { "d": "M6 9l6 6l6 -6", "key": "svg-0" }]];
|
|
17130
|
+
var IconChevronDown = createReactComponent("outline", "chevron-down", "ChevronDown", __iconNode5);
|
|
17131
|
+
|
|
17121
17132
|
// node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs
|
|
17122
|
-
var
|
|
17123
|
-
var IconChevronLeft = createReactComponent("outline", "chevron-left", "ChevronLeft",
|
|
17133
|
+
var __iconNode6 = [["path", { "d": "M15 6l-6 6l6 6", "key": "svg-0" }]];
|
|
17134
|
+
var IconChevronLeft = createReactComponent("outline", "chevron-left", "ChevronLeft", __iconNode6);
|
|
17124
17135
|
|
|
17125
17136
|
// node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs
|
|
17126
|
-
var
|
|
17127
|
-
var IconChevronRight = createReactComponent("outline", "chevron-right", "ChevronRight",
|
|
17137
|
+
var __iconNode7 = [["path", { "d": "M9 6l6 6l-6 6", "key": "svg-0" }]];
|
|
17138
|
+
var IconChevronRight = createReactComponent("outline", "chevron-right", "ChevronRight", __iconNode7);
|
|
17128
17139
|
|
|
17129
17140
|
// node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.mjs
|
|
17130
|
-
var
|
|
17131
|
-
var IconCopy = createReactComponent("outline", "copy", "Copy",
|
|
17141
|
+
var __iconNode8 = [["path", { "d": "M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666", "key": "svg-0" }], ["path", { "d": "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1", "key": "svg-1" }]];
|
|
17142
|
+
var IconCopy = createReactComponent("outline", "copy", "Copy", __iconNode8);
|
|
17132
17143
|
|
|
17133
17144
|
// node_modules/@tabler/icons-react/dist/esm/icons/IconDownload.mjs
|
|
17134
|
-
var
|
|
17135
|
-
var IconDownload = createReactComponent("outline", "download", "Download",
|
|
17145
|
+
var __iconNode9 = [["path", { "d": "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2", "key": "svg-0" }], ["path", { "d": "M7 11l5 5l5 -5", "key": "svg-1" }], ["path", { "d": "M12 4l0 12", "key": "svg-2" }]];
|
|
17146
|
+
var IconDownload = createReactComponent("outline", "download", "Download", __iconNode9);
|
|
17136
17147
|
|
|
17137
17148
|
// node_modules/@tabler/icons-react/dist/esm/icons/IconFileSpreadsheet.mjs
|
|
17138
|
-
var
|
|
17139
|
-
var IconFileSpreadsheet = createReactComponent("outline", "file-spreadsheet", "FileSpreadsheet",
|
|
17149
|
+
var __iconNode10 = [["path", { "d": "M14 3v4a1 1 0 0 0 1 1h4", "key": "svg-0" }], ["path", { "d": "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2", "key": "svg-1" }], ["path", { "d": "M8 11h8v7h-8l0 -7", "key": "svg-2" }], ["path", { "d": "M8 15h8", "key": "svg-3" }], ["path", { "d": "M11 11v7", "key": "svg-4" }]];
|
|
17150
|
+
var IconFileSpreadsheet = createReactComponent("outline", "file-spreadsheet", "FileSpreadsheet", __iconNode10);
|
|
17140
17151
|
|
|
17141
17152
|
// node_modules/@tabler/icons-react/dist/esm/icons/IconLoader2.mjs
|
|
17142
|
-
var
|
|
17143
|
-
var IconLoader2 = createReactComponent("outline", "loader-2", "Loader2",
|
|
17153
|
+
var __iconNode11 = [["path", { "d": "M12 3a9 9 0 1 0 9 9", "key": "svg-0" }]];
|
|
17154
|
+
var IconLoader2 = createReactComponent("outline", "loader-2", "Loader2", __iconNode11);
|
|
17144
17155
|
|
|
17145
17156
|
// node_modules/@tabler/icons-react/dist/esm/icons/IconPhoto.mjs
|
|
17146
|
-
var
|
|
17147
|
-
var IconPhoto = createReactComponent("outline", "photo", "Photo",
|
|
17157
|
+
var __iconNode12 = [["path", { "d": "M15 8h.01", "key": "svg-0" }], ["path", { "d": "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12", "key": "svg-1" }], ["path", { "d": "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5", "key": "svg-2" }], ["path", { "d": "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3", "key": "svg-3" }]];
|
|
17158
|
+
var IconPhoto = createReactComponent("outline", "photo", "Photo", __iconNode12);
|
|
17148
17159
|
|
|
17149
17160
|
// node_modules/@tabler/icons-react/dist/esm/icons/IconThumbDown.mjs
|
|
17150
|
-
var
|
|
17151
|
-
var IconThumbDown = createReactComponent("outline", "thumb-down", "ThumbDown",
|
|
17161
|
+
var __iconNode13 = [["path", { "d": "M7 13v-8a1 1 0 0 0 -1 -1h-2a1 1 0 0 0 -1 1v7a1 1 0 0 0 1 1h3a4 4 0 0 1 4 4v1a2 2 0 0 0 4 0v-5h3a2 2 0 0 0 2 -2l-1 -5a2 3 0 0 0 -2 -2h-7a3 3 0 0 0 -3 3", "key": "svg-0" }]];
|
|
17162
|
+
var IconThumbDown = createReactComponent("outline", "thumb-down", "ThumbDown", __iconNode13);
|
|
17152
17163
|
|
|
17153
17164
|
// node_modules/@tabler/icons-react/dist/esm/icons/IconThumbUp.mjs
|
|
17154
|
-
var
|
|
17155
|
-
var IconThumbUp = createReactComponent("outline", "thumb-up", "ThumbUp",
|
|
17165
|
+
var __iconNode14 = [["path", { "d": "M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3", "key": "svg-0" }]];
|
|
17166
|
+
var IconThumbUp = createReactComponent("outline", "thumb-up", "ThumbUp", __iconNode14);
|
|
17167
|
+
|
|
17168
|
+
// node_modules/@tabler/icons-react/dist/esm/icons/IconFlask2Filled.mjs
|
|
17169
|
+
var __iconNode15 = [["path", { "d": "M15 2a1 1 0 0 1 0 2v5.674l.062 .03a7 7 0 0 1 3.85 5.174l.037 .262a7 7 0 0 1 -3.078 6.693a1 1 0 0 1 -.553 .167h-6.635a1 1 0 0 1 -.552 -.166a7 7 0 0 1 .807 -12.134l.062 -.028v-5.672a1 1 0 1 1 0 -2h6zm-2 2h-2v6.34a1 1 0 0 1 -.551 .894l-.116 .049a5 5 0 0 0 -2.92 2.717h9.172a5 5 0 0 0 -2.918 -2.715a1 1 0 0 1 -.667 -.943v-6.342z", "key": "svg-0" }]];
|
|
17170
|
+
var IconFlask2Filled = createReactComponent("filled", "flask-2-filled", "Flask2Filled", __iconNode15);
|
|
17156
17171
|
|
|
17157
17172
|
// src/components/artifacts/artifact-copy-as-image-button/artifact-copy-as-image-button.tsx
|
|
17158
17173
|
var import_react6 = require("react");
|
|
@@ -18502,6 +18517,36 @@ function useScrollShadow() {
|
|
|
18502
18517
|
return { targetRef, isScrolled };
|
|
18503
18518
|
}
|
|
18504
18519
|
|
|
18520
|
+
// src/components/table/data-table.tsx
|
|
18521
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
18522
|
+
var DATA_TABLE_HEAD_CLASS = "h-auto py-2 px-4 text-xs font-medium text-foreground whitespace-nowrap text-left";
|
|
18523
|
+
var DATA_TABLE_CELL_CLASS = "p-4 text-sm font-normal text-foreground align-top min-w-[150px] text-left";
|
|
18524
|
+
var DATA_TABLE_ROW_CLASS = "border-b-brown-30 bg-background/70 hover:bg-secondary";
|
|
18525
|
+
var DATA_TABLE_SCROLL_SHADOW = "0 1px 2px rgb(0 0 0 / 0.01), 0 6px 12px -2px rgb(0 0 0 / 0.03)";
|
|
18526
|
+
function DataTable({ header, children, maxBodyHeight, className }) {
|
|
18527
|
+
const { targetRef, isScrolled } = useScrollShadow();
|
|
18528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
18529
|
+
"div",
|
|
18530
|
+
{
|
|
18531
|
+
ref: targetRef,
|
|
18532
|
+
className: cn("overscroll-none", className),
|
|
18533
|
+
style: maxBodyHeight !== void 0 ? { maxHeight: maxBodyHeight, overflowY: "auto" } : void 0,
|
|
18534
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Table, { containerClassName: "overflow-visible", children: [
|
|
18535
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
18536
|
+
TableHeader,
|
|
18537
|
+
{
|
|
18538
|
+
"data-scrolled": isScrolled ? "true" : void 0,
|
|
18539
|
+
className: "sticky top-0 z-10 bg-background/70 backdrop-blur-lg transition-shadow",
|
|
18540
|
+
style: isScrolled ? { boxShadow: DATA_TABLE_SCROLL_SHADOW } : void 0,
|
|
18541
|
+
children: header
|
|
18542
|
+
}
|
|
18543
|
+
),
|
|
18544
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableBody, { children })
|
|
18545
|
+
] })
|
|
18546
|
+
}
|
|
18547
|
+
);
|
|
18548
|
+
}
|
|
18549
|
+
|
|
18505
18550
|
// src/components/artifacts/table-artifact/table-artifact-content.constants.ts
|
|
18506
18551
|
var TABLE_STATUS = {
|
|
18507
18552
|
LOADING: "loading",
|
|
@@ -18514,14 +18559,10 @@ var TABLE_STATUS = {
|
|
|
18514
18559
|
function formatCell(row, column) {
|
|
18515
18560
|
return row[column.key] ?? "";
|
|
18516
18561
|
}
|
|
18517
|
-
var
|
|
18518
|
-
var CELL_CLASS = "p-4 text-sm font-normal text-foreground align-top min-w-[150px] text-left";
|
|
18519
|
-
var ROW_CLASSES = "border-b-brown-30 bg-background/70 hover:bg-secondary";
|
|
18520
|
-
var DATA_ROW_CLASSES = `${ROW_CLASSES} animate-in fade-in duration-300`;
|
|
18521
|
-
var SCROLL_SHADOW = "0 1px 2px rgb(0 0 0 / 0.01), 0 6px 12px -2px rgb(0 0 0 / 0.03)";
|
|
18562
|
+
var DATA_ROW_CLASSES = `${DATA_TABLE_ROW_CLASS} animate-in fade-in duration-300`;
|
|
18522
18563
|
|
|
18523
18564
|
// src/components/artifacts/table-artifact/table-artifact-content.tsx
|
|
18524
|
-
var
|
|
18565
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
18525
18566
|
function TableArtifactContent({
|
|
18526
18567
|
columns,
|
|
18527
18568
|
data: data2,
|
|
@@ -18531,50 +18572,45 @@ function TableArtifactContent({
|
|
|
18531
18572
|
labels
|
|
18532
18573
|
}) {
|
|
18533
18574
|
if (data2.status === TABLE_STATUS.ERROR) {
|
|
18534
|
-
return /* @__PURE__ */ (0,
|
|
18575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StatusMessage, { $tone: "error", children: labels.loadError });
|
|
18535
18576
|
}
|
|
18536
18577
|
if (data2.status === TABLE_STATUS.UNAVAILABLE) {
|
|
18537
|
-
return /* @__PURE__ */ (0,
|
|
18578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StatusMessage, { $tone: "info", children: labels.unavailable });
|
|
18538
18579
|
}
|
|
18539
18580
|
if (data2.status === TABLE_STATUS.LOADING) {
|
|
18540
18581
|
if (typeof knownRowCount === "number" && knownRowCount > 0) {
|
|
18541
18582
|
const shimmerCount = Math.min(knownRowCount, maxShimmerRows);
|
|
18542
|
-
return /* @__PURE__ */ (0,
|
|
18583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ArtifactTable, { columns, maxBodyHeight, children: renderShimmerRows(columns, shimmerCount) });
|
|
18543
18584
|
}
|
|
18544
|
-
return /* @__PURE__ */ (0,
|
|
18585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StatusMessage, { $tone: "info", children: labels.loading });
|
|
18545
18586
|
}
|
|
18546
|
-
return /* @__PURE__ */ (0,
|
|
18587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ArtifactTable, { columns, maxBodyHeight, children: data2.rows.length === 0 ? renderEmptyRow(columns.length, labels.empty) : renderDataRows(columns, data2.rows) });
|
|
18547
18588
|
}
|
|
18548
18589
|
function ArtifactTable({ columns, maxBodyHeight, children }) {
|
|
18549
|
-
|
|
18550
|
-
|
|
18551
|
-
|
|
18552
|
-
|
|
18553
|
-
{
|
|
18554
|
-
|
|
18555
|
-
|
|
18556
|
-
|
|
18557
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableHead, { scope: "col", className: HEAD_CLASS, children: column.label }, column.key)) })
|
|
18558
|
-
}
|
|
18559
|
-
),
|
|
18560
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableBody, { children })
|
|
18561
|
-
] }) });
|
|
18590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
18591
|
+
DataTable,
|
|
18592
|
+
{
|
|
18593
|
+
maxBodyHeight,
|
|
18594
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableHead, { scope: "col", className: DATA_TABLE_HEAD_CLASS, children: column.label }, column.key)) }),
|
|
18595
|
+
children
|
|
18596
|
+
}
|
|
18597
|
+
);
|
|
18562
18598
|
}
|
|
18563
18599
|
function renderShimmerRows(columns, count) {
|
|
18564
|
-
return Array.from({ length: count }).map((_, index2) => /* @__PURE__ */ (0,
|
|
18600
|
+
return Array.from({ length: count }).map((_, index2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableRow, { className: DATA_TABLE_ROW_CLASS, "aria-hidden": "true", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "block h-3 w-3/4 animate-pulse rounded bg-muted-foreground/20" }) }, column.key)) }, `shimmer-${index2}`));
|
|
18565
18601
|
}
|
|
18566
18602
|
function renderDataRows(columns, rows) {
|
|
18567
|
-
return rows.map((row, index2) => /* @__PURE__ */ (0,
|
|
18603
|
+
return rows.map((row, index2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableRow, { className: DATA_ROW_CLASSES, children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: formatCell(row, column) }, column.key)) }, index2));
|
|
18568
18604
|
}
|
|
18569
18605
|
function renderEmptyRow(colSpan, emptyMessage) {
|
|
18570
|
-
return /* @__PURE__ */ (0,
|
|
18606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableCell, { colSpan, className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }) });
|
|
18571
18607
|
}
|
|
18572
18608
|
|
|
18573
18609
|
// src/components/artifacts/deck-artifact/deck-markdown.tsx
|
|
18574
18610
|
var import_react_markdown = __toESM(require("react-markdown"), 1);
|
|
18575
18611
|
var import_remark_breaks = __toESM(require("remark-breaks"), 1);
|
|
18576
18612
|
var import_remark_gfm = __toESM(require("remark-gfm"), 1);
|
|
18577
|
-
var
|
|
18613
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
18578
18614
|
function sanitize(text2) {
|
|
18579
18615
|
return text2.split("\n").filter((line) => {
|
|
18580
18616
|
const t = line.trim();
|
|
@@ -18582,45 +18618,45 @@ function sanitize(text2) {
|
|
|
18582
18618
|
}).join("\n");
|
|
18583
18619
|
}
|
|
18584
18620
|
var MARKDOWN_COMPONENTS = {
|
|
18585
|
-
h1: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18586
|
-
h2: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18587
|
-
h3: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18588
|
-
h4: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18589
|
-
h5: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18590
|
-
h6: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18591
|
-
p: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18592
|
-
ul: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18593
|
-
ol: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18621
|
+
h1: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h1", { className: "text-[30px] font-semibold leading-tight text-foreground mb-3", ...props }),
|
|
18622
|
+
h2: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h2", { className: "text-[26px] font-semibold leading-tight text-foreground mb-2", ...props }),
|
|
18623
|
+
h3: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h3", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
|
|
18624
|
+
h4: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h4", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
|
|
18625
|
+
h5: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h5", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
|
|
18626
|
+
h6: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h6", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
|
|
18627
|
+
p: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-[22px] leading-relaxed text-foreground my-2", ...props }),
|
|
18628
|
+
ul: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { className: "list-disc pl-7 text-[22px] leading-relaxed text-foreground my-2", ...props }),
|
|
18629
|
+
ol: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ol", { className: "list-decimal pl-7 text-[22px] leading-relaxed text-foreground my-2", ...props }),
|
|
18594
18630
|
// react-markdown injects list metadata (`ordered` / `index` / `checked`) that must not leak to the DOM.
|
|
18595
|
-
li: ({ node: _node, ordered: _ordered, index: _index, checked: _checked, ...props }) => /* @__PURE__ */ (0,
|
|
18596
|
-
strong: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18597
|
-
em: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18631
|
+
li: ({ node: _node, ordered: _ordered, index: _index, checked: _checked, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("li", { className: "my-1", ...props }),
|
|
18632
|
+
strong: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("strong", { className: "font-semibold", ...props }),
|
|
18633
|
+
em: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("em", { className: "italic", ...props }),
|
|
18598
18634
|
// Gate `<img src>` against an http(s) allowlist. react-markdown v8 percent-encodes the URL but
|
|
18599
18635
|
// does NOT protocol-filter image src (unlike link href), so an LLM-authored
|
|
18600
18636
|
// `` / `` or a tracking-pixel `` would otherwise render
|
|
18601
18637
|
// with the raw URL. Unsafe src → render nothing.
|
|
18602
|
-
img: ({ node: _node, src, ...props }) => typeof src === "string" && isSafeDownloadUrl(src) ? /* @__PURE__ */ (0,
|
|
18638
|
+
img: ({ node: _node, src, ...props }) => typeof src === "string" && isSafeDownloadUrl(src) ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src, className: "max-w-full", ...props }) : null,
|
|
18603
18639
|
a: ({ node: _node, ...props }) => (
|
|
18604
18640
|
// `rel` is forced AFTER `{...props}` so it can't be overridden — if a consumer ever adds
|
|
18605
18641
|
// `linkTarget="_blank"`, LLM-authored links still can't reach `window.opener`.
|
|
18606
|
-
/* @__PURE__ */ (0,
|
|
18642
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { className: "underline underline-offset-2", ...props, rel: "noopener noreferrer" })
|
|
18607
18643
|
),
|
|
18608
18644
|
// react-markdown passes `inline` to distinguish inline code from fenced blocks — strip it from the DOM.
|
|
18609
|
-
code: ({ node: _node, inline: _inline, ...props }) => /* @__PURE__ */ (0,
|
|
18610
|
-
blockquote: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18611
|
-
hr: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18612
|
-
table: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
18645
|
+
code: ({ node: _node, inline: _inline, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("code", { className: "rounded bg-muted px-1.5 py-0.5 font-mono text-[18px]", ...props }),
|
|
18646
|
+
blockquote: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("blockquote", { className: "border-l-2 border-brown-alpha-12 pl-4 text-[22px] text-muted-foreground", ...props }),
|
|
18647
|
+
hr: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("hr", { className: "my-4 border-brown-alpha-12", ...props }),
|
|
18648
|
+
table: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("table", { className: "w-full border-collapse text-[20px]", ...props }) }),
|
|
18613
18649
|
// react-markdown passes `isHeader` to cell renderers — strip it so it never reaches the DOM.
|
|
18614
|
-
th: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0,
|
|
18615
|
-
td: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0,
|
|
18650
|
+
th: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("th", { className: "border-b border-brown-alpha-12 px-3 py-1.5 text-left font-medium", ...props }),
|
|
18651
|
+
td: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "border-b border-brown-alpha-12 px-3 py-1.5", ...props })
|
|
18616
18652
|
};
|
|
18617
18653
|
function DeckMarkdown({ markdown }) {
|
|
18618
|
-
return /* @__PURE__ */ (0,
|
|
18654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default, import_remark_breaks.default], components: MARKDOWN_COMPONENTS, children: sanitize(markdown) });
|
|
18619
18655
|
}
|
|
18620
18656
|
|
|
18621
18657
|
// src/components/artifacts/deck-artifact/slide-renderers.tsx
|
|
18622
18658
|
var import_react15 = require("react");
|
|
18623
|
-
var
|
|
18659
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
18624
18660
|
function safeLogoUrl(meta) {
|
|
18625
18661
|
return meta?.logoUrl && isSafeDownloadUrl(meta.logoUrl) ? meta.logoUrl : null;
|
|
18626
18662
|
}
|
|
@@ -18647,7 +18683,7 @@ function SlideFrame({ meta, children, accent = false, bare = false }) {
|
|
|
18647
18683
|
const eyebrowColor = accent ? "text-white/70" : "text-brown-60";
|
|
18648
18684
|
const borderColor = accent ? "border-white/20" : "border-brown-alpha-12";
|
|
18649
18685
|
const logoSrc = safeLogoUrl(meta);
|
|
18650
|
-
return /* @__PURE__ */ (0,
|
|
18686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref: frameRef, className: `relative aspect-[16/9] w-full overflow-hidden rounded-lg ${bg}`, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
18651
18687
|
"div",
|
|
18652
18688
|
{
|
|
18653
18689
|
className: "absolute left-0 top-0 origin-top-left",
|
|
@@ -18658,26 +18694,26 @@ function SlideFrame({ meta, children, accent = false, bare = false }) {
|
|
|
18658
18694
|
visibility: scale2 === null ? "hidden" : "visible"
|
|
18659
18695
|
},
|
|
18660
18696
|
children: [
|
|
18661
|
-
!bare ? /* @__PURE__ */ (0,
|
|
18697
|
+
!bare ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
18662
18698
|
"div",
|
|
18663
18699
|
{
|
|
18664
18700
|
className: `absolute inset-x-0 top-0 flex items-center justify-between border-b px-16 ${borderColor}`,
|
|
18665
18701
|
style: { height: EYEBROW_H },
|
|
18666
18702
|
children: [
|
|
18667
|
-
meta?.eyebrow ? /* @__PURE__ */ (0,
|
|
18668
|
-
logoSrc ? /* @__PURE__ */ (0,
|
|
18703
|
+
meta?.eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: eyebrowColor, style: { ...ACCENT_FONT, fontSize: 22 }, children: meta.eyebrow }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", {}),
|
|
18704
|
+
logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("img", { src: logoSrc, alt: "", className: "object-contain", style: { maxHeight: CANVAS_LOGO_MAX_H } }) : null
|
|
18669
18705
|
]
|
|
18670
18706
|
}
|
|
18671
18707
|
) : null,
|
|
18672
|
-
/* @__PURE__ */ (0,
|
|
18708
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "absolute inset-x-0 bottom-0 overflow-hidden", style: { top: bare ? 0 : EYEBROW_H }, children })
|
|
18673
18709
|
]
|
|
18674
18710
|
}
|
|
18675
18711
|
) });
|
|
18676
18712
|
}
|
|
18677
18713
|
function TitleSlide({ slide, meta }) {
|
|
18678
18714
|
const logoSrc = safeLogoUrl(meta);
|
|
18679
|
-
return /* @__PURE__ */ (0,
|
|
18680
|
-
logoSrc ? /* @__PURE__ */ (0,
|
|
18715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SlideFrame, { meta, bare: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex h-full flex-col justify-center px-24 py-16", children: [
|
|
18716
|
+
logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
18681
18717
|
"img",
|
|
18682
18718
|
{
|
|
18683
18719
|
src: logoSrc,
|
|
@@ -18686,7 +18722,7 @@ function TitleSlide({ slide, meta }) {
|
|
|
18686
18722
|
style: { maxHeight: 56, maxWidth: 380 }
|
|
18687
18723
|
}
|
|
18688
18724
|
) : null,
|
|
18689
|
-
/* @__PURE__ */ (0,
|
|
18725
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
18690
18726
|
"h1",
|
|
18691
18727
|
{
|
|
18692
18728
|
className: "font-bold tracking-tight text-brown-100",
|
|
@@ -18694,36 +18730,36 @@ function TitleSlide({ slide, meta }) {
|
|
|
18694
18730
|
children: slide.title
|
|
18695
18731
|
}
|
|
18696
18732
|
),
|
|
18697
|
-
slide.subtitle ? /* @__PURE__ */ (0,
|
|
18698
|
-
slide.description ? /* @__PURE__ */ (0,
|
|
18699
|
-
meta?.date ? /* @__PURE__ */ (0,
|
|
18733
|
+
slide.subtitle ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-7 text-brown-70", style: { ...ACCENT_FONT, fontSize: 34 }, children: slide.subtitle }) : null,
|
|
18734
|
+
slide.description ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-4 leading-relaxed text-brown-70", style: { fontSize: 24, maxWidth: 880 }, children: slide.description }) : null,
|
|
18735
|
+
meta?.date ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-10 text-brown-70", style: { ...ACCENT_FONT, fontSize: 30 }, children: meta.date }) : null
|
|
18700
18736
|
] }) });
|
|
18701
18737
|
}
|
|
18702
18738
|
function AgendaSlide({ slide, meta, labels }) {
|
|
18703
18739
|
const items = slide.items ?? [];
|
|
18704
|
-
return /* @__PURE__ */ (0,
|
|
18705
|
-
/* @__PURE__ */ (0,
|
|
18706
|
-
/* @__PURE__ */ (0,
|
|
18707
|
-
/* @__PURE__ */ (0,
|
|
18708
|
-
/* @__PURE__ */ (0,
|
|
18740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "h-full px-24 py-14", children: [
|
|
18741
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "mb-10 font-bold text-brown-90", style: { fontSize: 40 }, children: slide.title || labels.agenda }),
|
|
18742
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex flex-col", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-baseline gap-6 border-b border-brown-alpha-12 py-5", children: [
|
|
18743
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "shrink-0 text-indigo-600", style: { ...ACCENT_FONT, fontSize: 28, width: 64 }, children: String(i + 1).padStart(2, "0") }),
|
|
18744
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-brown-90", style: { fontSize: 28 }, children: item })
|
|
18709
18745
|
] }, i)) })
|
|
18710
18746
|
] }) });
|
|
18711
18747
|
}
|
|
18712
18748
|
function SectionSlide({ slide, meta }) {
|
|
18713
|
-
return /* @__PURE__ */ (0,
|
|
18714
|
-
/* @__PURE__ */ (0,
|
|
18715
|
-
/* @__PURE__ */ (0,
|
|
18749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SlideFrame, { meta, accent: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex h-full flex-col justify-center gap-6 px-24", children: [
|
|
18750
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "font-bold text-white", style: { fontSize: 72, lineHeight: 1.05, maxWidth: 940 }, children: slide.title }),
|
|
18751
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mt-2 bg-white/50", style: { width: 96, height: 5 } })
|
|
18716
18752
|
] }) });
|
|
18717
18753
|
}
|
|
18718
18754
|
function ClosingSlide({ meta, labels }) {
|
|
18719
|
-
return /* @__PURE__ */ (0,
|
|
18720
|
-
/* @__PURE__ */ (0,
|
|
18721
|
-
/* @__PURE__ */ (0,
|
|
18755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex h-full flex-col items-center justify-center gap-6 px-24 text-center", children: [
|
|
18756
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h1", { className: "font-bold text-brown-100", style: { fontSize: 72 }, children: labels.thankYou }),
|
|
18757
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-indigo-600", style: { ...ACCENT_FONT, fontSize: 36 }, children: labels.questions })
|
|
18722
18758
|
] }) });
|
|
18723
18759
|
}
|
|
18724
18760
|
|
|
18725
18761
|
// src/components/artifacts/deck-artifact/deck-artifact-content.tsx
|
|
18726
|
-
var
|
|
18762
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
18727
18763
|
var TABLE_BLOCK_MAX_SHIMMER_ROWS = 10;
|
|
18728
18764
|
var TABLE_CHROME_RESERVE = 56;
|
|
18729
18765
|
var VISUAL_FALLBACK_HEIGHT = 360;
|
|
@@ -18753,14 +18789,14 @@ function DeckArtifactContent({
|
|
|
18753
18789
|
[slides.length, onNavigate, isControlled, onSlideChange]
|
|
18754
18790
|
);
|
|
18755
18791
|
const position2 = labels.position.replace("{current}", String(current + 1)).replace("{total}", String(slides.length));
|
|
18756
|
-
return /* @__PURE__ */ (0,
|
|
18757
|
-
/* @__PURE__ */ (0,
|
|
18758
|
-
/* @__PURE__ */ (0,
|
|
18792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col gap-3 p-4", children: [
|
|
18793
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideDispatch, { slide, labels, meta }),
|
|
18794
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
18759
18795
|
"div",
|
|
18760
18796
|
{
|
|
18761
18797
|
className: `flex items-center justify-between border-t pt-2 ${onDark ? "border-white/20" : "border-brown-alpha-12"}`,
|
|
18762
18798
|
children: [
|
|
18763
|
-
/* @__PURE__ */ (0,
|
|
18799
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
18764
18800
|
IconButton,
|
|
18765
18801
|
{
|
|
18766
18802
|
icon: IconChevronLeft,
|
|
@@ -18771,8 +18807,8 @@ function DeckArtifactContent({
|
|
|
18771
18807
|
onClick: () => goTo(current - 1)
|
|
18772
18808
|
}
|
|
18773
18809
|
),
|
|
18774
|
-
/* @__PURE__ */ (0,
|
|
18775
|
-
/* @__PURE__ */ (0,
|
|
18810
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: `text-xs font-medium ${onDark ? "text-white/70" : "text-brown-70"}`, children: position2 }),
|
|
18811
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
18776
18812
|
IconButton,
|
|
18777
18813
|
{
|
|
18778
18814
|
icon: IconChevronRight,
|
|
@@ -18792,16 +18828,16 @@ function SlideDispatch({ slide, labels, meta }) {
|
|
|
18792
18828
|
const kind = slide.kind ?? deckSlideKinds.CONTENT;
|
|
18793
18829
|
switch (kind) {
|
|
18794
18830
|
case deckSlideKinds.TITLE:
|
|
18795
|
-
return /* @__PURE__ */ (0,
|
|
18831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TitleSlide, { slide, meta });
|
|
18796
18832
|
case deckSlideKinds.AGENDA:
|
|
18797
|
-
return /* @__PURE__ */ (0,
|
|
18833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AgendaSlide, { slide, meta, labels });
|
|
18798
18834
|
case deckSlideKinds.SECTION:
|
|
18799
|
-
return /* @__PURE__ */ (0,
|
|
18835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SectionSlide, { slide, meta });
|
|
18800
18836
|
case deckSlideKinds.CLOSING:
|
|
18801
|
-
return /* @__PURE__ */ (0,
|
|
18837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ClosingSlide, { meta, labels });
|
|
18802
18838
|
case deckSlideKinds.CONTENT:
|
|
18803
18839
|
default:
|
|
18804
|
-
return /* @__PURE__ */ (0,
|
|
18840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ContentSlide, { slide, meta, labels });
|
|
18805
18841
|
}
|
|
18806
18842
|
}
|
|
18807
18843
|
function isVisualBlock(block) {
|
|
@@ -18814,25 +18850,25 @@ function ContentSlide({ slide, meta, labels }) {
|
|
|
18814
18850
|
(b) => b.type === deckBlockTypes.TEXT
|
|
18815
18851
|
);
|
|
18816
18852
|
if (visuals.length === 1 && texts.length > 0) {
|
|
18817
|
-
return /* @__PURE__ */ (0,
|
|
18818
|
-
/* @__PURE__ */ (0,
|
|
18819
|
-
/* @__PURE__ */ (0,
|
|
18820
|
-
texts.map((block, i) => /* @__PURE__ */ (0,
|
|
18853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex h-full items-stretch gap-12 px-16 py-12", children: [
|
|
18854
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex w-[42%] shrink-0 flex-col overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(AutoFit, { children: [
|
|
18855
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h3", { className: "mb-5 font-bold leading-tight text-foreground", style: { fontSize: 34 }, children: slide.title }),
|
|
18856
|
+
texts.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DeckMarkdown, { markdown: block.markdown }, i))
|
|
18821
18857
|
] }) }),
|
|
18822
|
-
/* @__PURE__ */ (0,
|
|
18858
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "min-h-0 min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FillVisual, { block: visuals[0], labels }) })
|
|
18823
18859
|
] }) });
|
|
18824
18860
|
}
|
|
18825
18861
|
if (visuals.length > 0) {
|
|
18826
|
-
return /* @__PURE__ */ (0,
|
|
18827
|
-
/* @__PURE__ */ (0,
|
|
18862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex h-full flex-col gap-5 px-16 py-10", children: [
|
|
18863
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h3", { className: "shrink-0 font-bold leading-tight text-foreground", style: { fontSize: 32 }, children: slide.title }),
|
|
18828
18864
|
content2.map(
|
|
18829
|
-
(block, i) => isVisualBlock(block) ? /* @__PURE__ */ (0,
|
|
18865
|
+
(block, i) => isVisualBlock(block) ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "min-h-0 min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FillVisual, { block, labels }) }, i) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "shrink-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DeckMarkdown, { markdown: block.markdown }) }, i)
|
|
18830
18866
|
)
|
|
18831
18867
|
] }) });
|
|
18832
18868
|
}
|
|
18833
|
-
return /* @__PURE__ */ (0,
|
|
18834
|
-
/* @__PURE__ */ (0,
|
|
18835
|
-
texts.map((block, i) => /* @__PURE__ */ (0,
|
|
18869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "h-full px-24 py-12", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(AutoFit, { children: [
|
|
18870
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h3", { className: "mb-6 font-bold leading-tight text-foreground", style: { fontSize: 38 }, children: slide.title }),
|
|
18871
|
+
texts.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DeckMarkdown, { markdown: block.markdown }, i))
|
|
18836
18872
|
] }) }) });
|
|
18837
18873
|
}
|
|
18838
18874
|
function AutoFit({ children }) {
|
|
@@ -18856,7 +18892,7 @@ function AutoFit({ children }) {
|
|
|
18856
18892
|
return () => ro.disconnect();
|
|
18857
18893
|
}, []);
|
|
18858
18894
|
const scaled = fit.scale < 1;
|
|
18859
|
-
return /* @__PURE__ */ (0,
|
|
18895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: boxRef, className: "flex h-full min-h-0 w-full flex-col justify-center overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { style: scaled ? { height: fit.height } : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
18860
18896
|
"div",
|
|
18861
18897
|
{
|
|
18862
18898
|
ref: contentRef,
|
|
@@ -18881,12 +18917,12 @@ function FillVisual({ block, labels }) {
|
|
|
18881
18917
|
return () => ro.disconnect();
|
|
18882
18918
|
}, []);
|
|
18883
18919
|
const chartLabels = labels.chart ?? DEFAULT_CHART_ARTIFACT_LABELS;
|
|
18884
|
-
return /* @__PURE__ */ (0,
|
|
18920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref, className: "h-full min-h-0 w-full overflow-hidden", children: block.type === deckBlockTypes.CHART ? (
|
|
18885
18921
|
// ChartArtifactContent assumes a non-empty rowset (the standalone ChartArtifact guards
|
|
18886
18922
|
// `rows.length > 0` upstream); mirror that guard here so an empty inline chart shows the
|
|
18887
18923
|
// localized empty status instead of a blank chart area.
|
|
18888
|
-
block.rows.length === 0 ? /* @__PURE__ */ (0,
|
|
18889
|
-
) : /* @__PURE__ */ (0,
|
|
18924
|
+
block.rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StatusMessage, { $tone: "info", children: chartLabels.empty }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { style: { height: height2 }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ChartArtifactContent, { config: block.config, rows: block.rows, labels: chartLabels }) })
|
|
18925
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
18890
18926
|
TableArtifactContent,
|
|
18891
18927
|
{
|
|
18892
18928
|
columns: block.config.columns,
|
|
@@ -18952,7 +18988,7 @@ function isValidDeckBlock(block) {
|
|
|
18952
18988
|
}
|
|
18953
18989
|
|
|
18954
18990
|
// src/components/artifacts/deck-artifact/deck-artifact.tsx
|
|
18955
|
-
var
|
|
18991
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
18956
18992
|
var TITLE_CLASSES2 = "text-sm font-semibold text-foreground";
|
|
18957
18993
|
function DeckArtifact({ artifact, labels, callbacks }) {
|
|
18958
18994
|
const validConfig = isValidDeckConfig(artifact.config);
|
|
@@ -18993,9 +19029,9 @@ function DeckArtifact({ artifact, labels, callbacks }) {
|
|
|
18993
19029
|
const meta = artifact.config?.meta;
|
|
18994
19030
|
const handleOpenFullscreen = () => setIsFullscreen(true);
|
|
18995
19031
|
const handleCloseFullscreen = () => setIsFullscreen(false);
|
|
18996
|
-
const actions = /* @__PURE__ */ (0,
|
|
18997
|
-
showDownload ? /* @__PURE__ */ (0,
|
|
18998
|
-
validConfig ? /* @__PURE__ */ (0,
|
|
19032
|
+
const actions = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ArtifactActions, { ...{ [CAPTURE_EXCLUDE_ATTRIBUTE]: "" }, children: [
|
|
19033
|
+
showDownload ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactDownloadButton, { href: presignedUrl ?? "", label: resolvedLabels.download, onClick: handleDownload }) : null,
|
|
19034
|
+
validConfig ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
18999
19035
|
IconButton,
|
|
19000
19036
|
{
|
|
19001
19037
|
icon: IconArrowsMaximize,
|
|
@@ -19006,21 +19042,21 @@ function DeckArtifact({ artifact, labels, callbacks }) {
|
|
|
19006
19042
|
) : null
|
|
19007
19043
|
] });
|
|
19008
19044
|
if (!validConfig) {
|
|
19009
|
-
return /* @__PURE__ */ (0,
|
|
19010
|
-
/* @__PURE__ */ (0,
|
|
19011
|
-
artifact.title ? /* @__PURE__ */ (0,
|
|
19045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
|
|
19046
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
|
|
19047
|
+
artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactTitle, { className: TITLE_CLASSES2, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {}),
|
|
19012
19048
|
actions
|
|
19013
19049
|
] }),
|
|
19014
|
-
/* @__PURE__ */ (0,
|
|
19050
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StatusMessage, { $tone: "info", children: resolvedLabels.unavailable }) })
|
|
19015
19051
|
] });
|
|
19016
19052
|
}
|
|
19017
|
-
return /* @__PURE__ */ (0,
|
|
19018
|
-
/* @__PURE__ */ (0,
|
|
19019
|
-
/* @__PURE__ */ (0,
|
|
19020
|
-
artifact.title ? /* @__PURE__ */ (0,
|
|
19053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
19054
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
|
|
19055
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
|
|
19056
|
+
artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactTitle, { className: TITLE_CLASSES2, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {}),
|
|
19021
19057
|
actions
|
|
19022
19058
|
] }),
|
|
19023
|
-
/* @__PURE__ */ (0,
|
|
19059
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
19024
19060
|
DeckArtifactContent,
|
|
19025
19061
|
{
|
|
19026
19062
|
slides: artifact.config.slides,
|
|
@@ -19033,7 +19069,7 @@ function DeckArtifact({ artifact, labels, callbacks }) {
|
|
|
19033
19069
|
) })
|
|
19034
19070
|
] }),
|
|
19035
19071
|
isFullscreen && (0, import_react_dom.createPortal)(
|
|
19036
|
-
/* @__PURE__ */ (0,
|
|
19072
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
19037
19073
|
FullscreenOverlay,
|
|
19038
19074
|
{
|
|
19039
19075
|
artifact,
|
|
@@ -19057,15 +19093,15 @@ function FullscreenOverlay({
|
|
|
19057
19093
|
onClose
|
|
19058
19094
|
}) {
|
|
19059
19095
|
const meta = artifact.config?.meta;
|
|
19060
|
-
return /* @__PURE__ */ (0,
|
|
19096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
19061
19097
|
"div",
|
|
19062
19098
|
{
|
|
19063
19099
|
className: "fixed inset-0 z-[2147483647] flex items-center justify-center bg-black/80",
|
|
19064
19100
|
role: "dialog",
|
|
19065
19101
|
"aria-modal": "true",
|
|
19066
19102
|
"aria-label": resolvedLabels.exitFullscreen,
|
|
19067
|
-
children: /* @__PURE__ */ (0,
|
|
19068
|
-
/* @__PURE__ */ (0,
|
|
19103
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "relative", style: { width: "min(94vw, calc(82vh * 16 / 9))" }, children: [
|
|
19104
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
19069
19105
|
DeckArtifactContent,
|
|
19070
19106
|
{
|
|
19071
19107
|
slides: artifact.config.slides,
|
|
@@ -19077,15 +19113,15 @@ function FullscreenOverlay({
|
|
|
19077
19113
|
onDark: true
|
|
19078
19114
|
}
|
|
19079
19115
|
),
|
|
19080
|
-
/* @__PURE__ */ (0,
|
|
19116
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
19081
19117
|
"button",
|
|
19082
19118
|
{
|
|
19083
19119
|
className: "absolute -top-10 right-6 flex items-center gap-1.5 text-sm text-white/80 hover:text-white",
|
|
19084
19120
|
"aria-label": resolvedLabels.exitFullscreen,
|
|
19085
19121
|
onClick: onClose,
|
|
19086
19122
|
children: [
|
|
19087
|
-
/* @__PURE__ */ (0,
|
|
19088
|
-
/* @__PURE__ */ (0,
|
|
19123
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(IconArrowsMinimize, { size: 16 }),
|
|
19124
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: resolvedLabels.exitFullscreen })
|
|
19089
19125
|
]
|
|
19090
19126
|
}
|
|
19091
19127
|
)
|
|
@@ -19162,7 +19198,7 @@ function useTableArtifactData(presignedUrl, columns) {
|
|
|
19162
19198
|
}
|
|
19163
19199
|
|
|
19164
19200
|
// src/components/artifacts/table-artifact/table-artifact.tsx
|
|
19165
|
-
var
|
|
19201
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
19166
19202
|
var TITLE_CLASSES3 = "text-sm font-semibold text-foreground";
|
|
19167
19203
|
var TABLE_MAX_BODY_HEIGHT = 480;
|
|
19168
19204
|
var MAX_SHIMMER_ROWS = 10;
|
|
@@ -19185,10 +19221,10 @@ function TableArtifact({ artifact, labels, callbacks }) {
|
|
|
19185
19221
|
const onDownload = callbacks?.onDownload;
|
|
19186
19222
|
const handleDownloadClick = onDownload ? () => onDownload(artifact) : void 0;
|
|
19187
19223
|
if (!validConfig || !validColumns) {
|
|
19188
|
-
return /* @__PURE__ */ (0,
|
|
19189
|
-
/* @__PURE__ */ (0,
|
|
19190
|
-
artifact.title ? /* @__PURE__ */ (0,
|
|
19191
|
-
presignedUrl ? /* @__PURE__ */ (0,
|
|
19224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
|
|
19225
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
|
|
19226
|
+
artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactTitle, { className: TITLE_CLASSES3, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", {}),
|
|
19227
|
+
presignedUrl ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactActions, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
19192
19228
|
ArtifactDownloadButton,
|
|
19193
19229
|
{
|
|
19194
19230
|
href: presignedUrl,
|
|
@@ -19197,17 +19233,17 @@ function TableArtifact({ artifact, labels, callbacks }) {
|
|
|
19197
19233
|
}
|
|
19198
19234
|
) }) : null
|
|
19199
19235
|
] }),
|
|
19200
|
-
/* @__PURE__ */ (0,
|
|
19236
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactContent, { className: "p-0 overflow-auto", style: { maxHeight: TABLE_MAX_BODY_HEIGHT }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StatusMessage, { $tone: "info", children: resolvedLabels.unavailable }) })
|
|
19201
19237
|
] });
|
|
19202
19238
|
}
|
|
19203
19239
|
return (
|
|
19204
19240
|
// The table body owns its own scroll container (`ArtifactTable` inside `TableArtifactContent`).
|
|
19205
19241
|
// Disable the outer overflow container so only one scroll context exists — this prevents
|
|
19206
19242
|
// double-scroll nesting and lets `useScrollShadow` find the correct scroll ancestor.
|
|
19207
|
-
/* @__PURE__ */ (0,
|
|
19208
|
-
/* @__PURE__ */ (0,
|
|
19209
|
-
artifact.title ? /* @__PURE__ */ (0,
|
|
19210
|
-
/* @__PURE__ */ (0,
|
|
19243
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
|
|
19244
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
|
|
19245
|
+
artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactTitle, { className: TITLE_CLASSES3, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", {}),
|
|
19246
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactActions, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
19211
19247
|
ArtifactDownloadButton,
|
|
19212
19248
|
{
|
|
19213
19249
|
href: presignedUrl ?? "",
|
|
@@ -19216,7 +19252,7 @@ function TableArtifact({ artifact, labels, callbacks }) {
|
|
|
19216
19252
|
}
|
|
19217
19253
|
) })
|
|
19218
19254
|
] }),
|
|
19219
|
-
/* @__PURE__ */ (0,
|
|
19255
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactContent, { className: "p-0 overflow-visible", style: { maxHeight: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
19220
19256
|
TableArtifactContent,
|
|
19221
19257
|
{
|
|
19222
19258
|
columns: validColumns,
|
|
@@ -19259,13 +19295,13 @@ function artifactToClipboardText(artifact) {
|
|
|
19259
19295
|
}
|
|
19260
19296
|
|
|
19261
19297
|
// src/components/blocks/artifact-ref-block/artifact-ref-block.tsx
|
|
19262
|
-
var
|
|
19298
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
19263
19299
|
function ArtifactRefBlock({ block }) {
|
|
19264
19300
|
const { artifact, labels, callbacks } = block.payload;
|
|
19265
19301
|
const entry = ArtifactServices[artifact.type];
|
|
19266
19302
|
if (!entry) return null;
|
|
19267
19303
|
const Component = entry.Component;
|
|
19268
|
-
return /* @__PURE__ */ (0,
|
|
19304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Component, { artifact, labels, callbacks });
|
|
19269
19305
|
}
|
|
19270
19306
|
|
|
19271
19307
|
// src/components/blocks/block-services/artifact-ref-block-service.ts
|
|
@@ -19280,26 +19316,99 @@ var ArtifactRefBlockService = {
|
|
|
19280
19316
|
toClipboardText: (block) => artifactToClipboardText(block.payload.artifact)
|
|
19281
19317
|
};
|
|
19282
19318
|
|
|
19283
|
-
// src/
|
|
19284
|
-
var
|
|
19285
|
-
|
|
19286
|
-
|
|
19287
|
-
|
|
19288
|
-
|
|
19319
|
+
// src/components/blocks/notification-draft-block/notification-draft-block.tsx
|
|
19320
|
+
var import_react20 = require("react");
|
|
19321
|
+
|
|
19322
|
+
// src/components/badge/badge.tsx
|
|
19323
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
19324
|
+
var BASE = "inline-flex items-center whitespace-nowrap rounded-full";
|
|
19325
|
+
var SIZES = {
|
|
19326
|
+
// `sm` is a uniform scale-down of `md` (text 10/12 of caption): padding and line-height keep
|
|
19327
|
+
// md's proportions (caption is 12px text on a 16px line = 1.333 ratio) so the pill shape matches.
|
|
19328
|
+
md: "px-2.5 py-0.5 text-geist-label-caption-medium",
|
|
19329
|
+
sm: "px-2 py-0.5 text-[11px]/[1.333] font-medium"
|
|
19330
|
+
};
|
|
19331
|
+
var SUBTLE = {
|
|
19332
|
+
neutral: "bg-brown-20 text-brown-70",
|
|
19333
|
+
warning: "bg-orange-50 text-orange-600",
|
|
19334
|
+
violet: "bg-violet-50 text-violet-600"
|
|
19335
|
+
};
|
|
19336
|
+
var OUTLINE = {
|
|
19337
|
+
neutral: "border border-brown-30 bg-white text-brown-100",
|
|
19338
|
+
warning: "border border-orange-200 bg-white text-orange-600",
|
|
19339
|
+
violet: "border border-violet-400 bg-white text-violet-600"
|
|
19340
|
+
};
|
|
19341
|
+
var VARIANTS = {
|
|
19342
|
+
subtle: SUBTLE,
|
|
19343
|
+
outline: OUTLINE
|
|
19344
|
+
};
|
|
19345
|
+
function Badge({
|
|
19346
|
+
variant = "subtle",
|
|
19347
|
+
tone = "neutral",
|
|
19348
|
+
size = "md",
|
|
19349
|
+
className,
|
|
19350
|
+
children
|
|
19351
|
+
}) {
|
|
19352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: cn(BASE, SIZES[size], VARIANTS[variant][tone], className), children });
|
|
19289
19353
|
}
|
|
19290
|
-
|
|
19291
|
-
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
|
|
19354
|
+
|
|
19355
|
+
// src/components/chat/hooks/use-copy-to-clipboard.ts
|
|
19356
|
+
var import_react19 = require("react");
|
|
19357
|
+
|
|
19358
|
+
// src/utils/clipboard.ts
|
|
19359
|
+
function copyToClipboard(text2, options) {
|
|
19360
|
+
navigator.clipboard.writeText(text2).then(
|
|
19361
|
+
() => options?.onSuccess?.(),
|
|
19362
|
+
(error) => options?.onFailure?.(error)
|
|
19363
|
+
);
|
|
19300
19364
|
}
|
|
19301
19365
|
|
|
19302
|
-
// src/components/
|
|
19366
|
+
// src/components/chat/hooks/use-copy-to-clipboard.ts
|
|
19367
|
+
var RESET_DELAY_MS = 2e3;
|
|
19368
|
+
function useCopyToClipboard() {
|
|
19369
|
+
const [isCopied, setIsCopied] = (0, import_react19.useState)(false);
|
|
19370
|
+
const timeoutRef = (0, import_react19.useRef)(null);
|
|
19371
|
+
(0, import_react19.useEffect)(() => {
|
|
19372
|
+
return () => {
|
|
19373
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
19374
|
+
};
|
|
19375
|
+
}, []);
|
|
19376
|
+
const copy = (0, import_react19.useCallback)((text2) => {
|
|
19377
|
+
copyToClipboard(text2, {
|
|
19378
|
+
onSuccess: () => {
|
|
19379
|
+
setIsCopied(true);
|
|
19380
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
19381
|
+
timeoutRef.current = setTimeout(() => {
|
|
19382
|
+
setIsCopied(false);
|
|
19383
|
+
timeoutRef.current = null;
|
|
19384
|
+
}, RESET_DELAY_MS);
|
|
19385
|
+
}
|
|
19386
|
+
});
|
|
19387
|
+
}, []);
|
|
19388
|
+
return { isCopied, copy };
|
|
19389
|
+
}
|
|
19390
|
+
|
|
19391
|
+
// src/components/copy-button/copy-button.tsx
|
|
19392
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
19393
|
+
function CopyButton({
|
|
19394
|
+
text: text2,
|
|
19395
|
+
copyLabel = "Copy",
|
|
19396
|
+
copiedLabel = "Copied",
|
|
19397
|
+
className
|
|
19398
|
+
}) {
|
|
19399
|
+
const { isCopied, copy } = useCopyToClipboard();
|
|
19400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
19401
|
+
IconButton,
|
|
19402
|
+
{
|
|
19403
|
+
icon: isCopied ? IconCheck : IconCopy,
|
|
19404
|
+
onClick: () => copy(text2),
|
|
19405
|
+
"aria-label": isCopied ? copiedLabel : copyLabel,
|
|
19406
|
+
className
|
|
19407
|
+
}
|
|
19408
|
+
);
|
|
19409
|
+
}
|
|
19410
|
+
|
|
19411
|
+
// src/components/blocks/markdown/markdown.tsx
|
|
19303
19412
|
var import_react_markdown2 = __toESM(require("react-markdown"), 1);
|
|
19304
19413
|
var import_remark_breaks2 = __toESM(require("remark-breaks"), 1);
|
|
19305
19414
|
var import_remark_gfm2 = __toESM(require("remark-gfm"), 1);
|
|
@@ -19317,9 +19426,9 @@ var TableScroll = import_styled_components3.default.div`
|
|
|
19317
19426
|
`;
|
|
19318
19427
|
|
|
19319
19428
|
// src/components/blocks/scrollable-table/scrollable-table.tsx
|
|
19320
|
-
var
|
|
19429
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
19321
19430
|
function ScrollableTable({ node: _node, ...props }) {
|
|
19322
|
-
return /* @__PURE__ */ (0,
|
|
19431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableScroll, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("table", { ...props }) }) });
|
|
19323
19432
|
}
|
|
19324
19433
|
|
|
19325
19434
|
// src/components/blocks/text-block/sanitize.ts
|
|
@@ -19462,13 +19571,157 @@ var TextBlockWrapper = import_styled_components4.default.div`
|
|
|
19462
19571
|
}
|
|
19463
19572
|
`;
|
|
19464
19573
|
|
|
19465
|
-
// src/components/blocks/
|
|
19466
|
-
var
|
|
19574
|
+
// src/components/blocks/markdown/markdown.tsx
|
|
19575
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
19467
19576
|
var markdownComponents = {
|
|
19468
|
-
table: ((tableProps) => /* @__PURE__ */ (0,
|
|
19577
|
+
table: ((tableProps) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ScrollableTable, { ...tableProps }))
|
|
19578
|
+
};
|
|
19579
|
+
function Markdown({ children }) {
|
|
19580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TextBlockWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_markdown2.default, { remarkPlugins: [import_remark_gfm2.default, import_remark_breaks2.default], components: markdownComponents, children: sanitize2(children) }) });
|
|
19581
|
+
}
|
|
19582
|
+
|
|
19583
|
+
// src/utils/markdown-to-plain-text.ts
|
|
19584
|
+
var PLACEHOLDER_PREFIX = "\u200B\u200BIC";
|
|
19585
|
+
var PLACEHOLDER_SUFFIX = "\u200B\u200B";
|
|
19586
|
+
var PLACEHOLDER_REGEX = new RegExp(`${PLACEHOLDER_PREFIX}(\\d+)${PLACEHOLDER_SUFFIX}`, "g");
|
|
19587
|
+
function stripInlineMarks(text2) {
|
|
19588
|
+
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");
|
|
19589
|
+
}
|
|
19590
|
+
function markdownToPlainText(markdown) {
|
|
19591
|
+
if (!markdown) return "";
|
|
19592
|
+
const inlineCodeSnippets = [];
|
|
19593
|
+
let result = markdown.replace(/^<!--[\s\S]*?--!?>\n?/gm, "").replace(/```[\s\S]*?```/g, "").replace(/`([^`]+)`/g, (_match, code) => {
|
|
19594
|
+
inlineCodeSnippets.push(code);
|
|
19595
|
+
return `${PLACEHOLDER_PREFIX}${inlineCodeSnippets.length - 1}${PLACEHOLDER_SUFFIX}`;
|
|
19596
|
+
}).replace(/^#{1,6}\s+/gm, "").replace(/^(?:---|\*\*\*|___)\s*$/gm, "");
|
|
19597
|
+
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();
|
|
19598
|
+
result = result.replace(PLACEHOLDER_REGEX, (_match, index2) => inlineCodeSnippets[Number(index2)]);
|
|
19599
|
+
return result;
|
|
19600
|
+
}
|
|
19601
|
+
|
|
19602
|
+
// src/components/blocks/notification-draft-block/types.ts
|
|
19603
|
+
var notificationChannels = {
|
|
19604
|
+
/** Branded email — renders a From/subject header. */
|
|
19605
|
+
EMAIL: "email",
|
|
19606
|
+
/** Slack DM — renders as a chat bubble, no subject. */
|
|
19607
|
+
SLACK: "slack",
|
|
19608
|
+
/** Microsoft Teams DM — renders as a chat bubble, no subject. */
|
|
19609
|
+
TEAMS: "teams"
|
|
19610
|
+
};
|
|
19611
|
+
var notificationEmailTypes = {
|
|
19612
|
+
/** Recipient's work email. */
|
|
19613
|
+
WORK: "work",
|
|
19614
|
+
/** Recipient's personal email. */
|
|
19615
|
+
PERSONAL: "personal"
|
|
19616
|
+
};
|
|
19617
|
+
|
|
19618
|
+
// src/components/blocks/notification-draft-block/to-text.ts
|
|
19619
|
+
function notificationDraftToText(payload) {
|
|
19620
|
+
const { channel, subject, body } = payload;
|
|
19621
|
+
const text2 = markdownToPlainText(body);
|
|
19622
|
+
return channel === notificationChannels.EMAIL && subject ? `${subject}
|
|
19623
|
+
|
|
19624
|
+
${text2}` : text2;
|
|
19625
|
+
}
|
|
19626
|
+
|
|
19627
|
+
// src/components/blocks/notification-draft-block/notification-draft-block.tsx
|
|
19628
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
19629
|
+
var CHIP_LIMIT = 3;
|
|
19630
|
+
var RECIPIENTS_MAX_HEIGHT = 320;
|
|
19631
|
+
function chipLabel(recipient) {
|
|
19632
|
+
return recipient.name ?? recipient.email ?? recipient.employeeId;
|
|
19633
|
+
}
|
|
19634
|
+
function channelCellText(recipient) {
|
|
19635
|
+
return recipient.fallback ? `${recipient.channelLabel} (fallback)` : recipient.channelLabel;
|
|
19636
|
+
}
|
|
19637
|
+
function FieldLabel({ children }) {
|
|
19638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-geist-label-caption-medium tracking-wide text-brown-60", children });
|
|
19639
|
+
}
|
|
19640
|
+
function RecipientChips({ recipients }) {
|
|
19641
|
+
const shown = recipients.slice(0, CHIP_LIMIT);
|
|
19642
|
+
const overflow = recipients.length - shown.length;
|
|
19643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
19644
|
+
shown.map((recipient) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Badge, { variant: "outline", children: chipLabel(recipient) }, recipient.employeeId)),
|
|
19645
|
+
overflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Badge, { variant: "subtle", children: `+${overflow}` })
|
|
19646
|
+
] });
|
|
19647
|
+
}
|
|
19648
|
+
function RecipientsTable({ recipients }) {
|
|
19649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
19650
|
+
DataTable,
|
|
19651
|
+
{
|
|
19652
|
+
maxBodyHeight: RECIPIENTS_MAX_HEIGHT,
|
|
19653
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TableRow, { className: "hover:bg-transparent", children: [
|
|
19654
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHead, { scope: "col", className: DATA_TABLE_HEAD_CLASS, children: "Name" }),
|
|
19655
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHead, { scope: "col", className: DATA_TABLE_HEAD_CLASS, children: "Email" }),
|
|
19656
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHead, { scope: "col", className: DATA_TABLE_HEAD_CLASS, children: "Channel" })
|
|
19657
|
+
] }),
|
|
19658
|
+
children: recipients.map((recipient) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TableRow, { className: DATA_TABLE_ROW_CLASS, children: [
|
|
19659
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: recipient.name ?? "\u2014" }),
|
|
19660
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: recipient.email ?? "\u2014" }),
|
|
19661
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Badge, { tone: recipient.fallback ? "warning" : "neutral", variant: "subtle", children: channelCellText(recipient) }) })
|
|
19662
|
+
] }, recipient.employeeId))
|
|
19663
|
+
}
|
|
19664
|
+
);
|
|
19665
|
+
}
|
|
19666
|
+
function NotificationDraftBlock({ block }) {
|
|
19667
|
+
const { channel, subject, body, recipients } = block.payload;
|
|
19668
|
+
const [detailsOpen, setDetailsOpen] = (0, import_react20.useState)(false);
|
|
19669
|
+
const showSubject = channel === notificationChannels.EMAIL && subject;
|
|
19670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "overflow-hidden rounded-2xl border border-brown-30 bg-white", children: [
|
|
19671
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-3 border-b border-brown-30 px-4 py-3", children: [
|
|
19672
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
19673
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
19674
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-geist-body-s-semi-bold text-brown-100", children: "Notification draft" }),
|
|
19675
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Badge, { tone: "violet", variant: "subtle", size: "sm", className: "gap-1 py-1", children: [
|
|
19676
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { icon: IconFlask2Filled, size: 12 }),
|
|
19677
|
+
"Labs"
|
|
19678
|
+
] })
|
|
19679
|
+
] }),
|
|
19680
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CopyButton, { text: notificationDraftToText(block.payload), copyLabel: "Copy draft", copiedLabel: "Copied" })
|
|
19681
|
+
] }),
|
|
19682
|
+
showSubject && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
|
|
19683
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FieldLabel, { children: "Title" }),
|
|
19684
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-geist-body-s-medium text-brown-100", children: subject })
|
|
19685
|
+
] }),
|
|
19686
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
19687
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
19688
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FieldLabel, { children: `Recipients (${recipients.length})` }),
|
|
19689
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
19690
|
+
"button",
|
|
19691
|
+
{
|
|
19692
|
+
type: "button",
|
|
19693
|
+
"aria-expanded": detailsOpen,
|
|
19694
|
+
onClick: () => setDetailsOpen((open) => !open),
|
|
19695
|
+
className: "inline-flex items-center gap-1 text-geist-label-caption-medium text-brown-70 transition-colors hover:text-brown-100",
|
|
19696
|
+
children: [
|
|
19697
|
+
"Details",
|
|
19698
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { icon: IconChevronDown, size: 14, className: detailsOpen ? "rotate-180" : void 0 })
|
|
19699
|
+
]
|
|
19700
|
+
}
|
|
19701
|
+
)
|
|
19702
|
+
] }),
|
|
19703
|
+
detailsOpen ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RecipientsTable, { recipients }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RecipientChips, { recipients })
|
|
19704
|
+
] })
|
|
19705
|
+
] }),
|
|
19706
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Markdown, { children: body }) })
|
|
19707
|
+
] });
|
|
19708
|
+
}
|
|
19709
|
+
|
|
19710
|
+
// src/components/blocks/block-services/notification-draft-block-service.ts
|
|
19711
|
+
var NotificationDraftBlockService = {
|
|
19712
|
+
type: blockTypes.NOTIFICATION_DRAFT,
|
|
19713
|
+
Component: NotificationDraftBlock,
|
|
19714
|
+
/**
|
|
19715
|
+
* Plain-text clipboard form of the drafted notification — shared with the in-block copy button
|
|
19716
|
+
* via {@link notificationDraftToText} so both copy the same text.
|
|
19717
|
+
*/
|
|
19718
|
+
toClipboardText: (block) => notificationDraftToText(block.payload)
|
|
19469
19719
|
};
|
|
19720
|
+
|
|
19721
|
+
// src/components/blocks/text-block/text-block.tsx
|
|
19722
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
19470
19723
|
function TextBlock({ block }) {
|
|
19471
|
-
return /* @__PURE__ */ (0,
|
|
19724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Markdown, { children: block.payload.text });
|
|
19472
19725
|
}
|
|
19473
19726
|
|
|
19474
19727
|
// src/components/blocks/block-services/text-block-service.ts
|
|
@@ -19486,30 +19739,31 @@ var TextBlockService = {
|
|
|
19486
19739
|
// src/components/blocks/block-services/index.ts
|
|
19487
19740
|
var BlockServices = {
|
|
19488
19741
|
[blockTypes.TEXT]: TextBlockService,
|
|
19489
|
-
[blockTypes.ARTIFACT_REF]: ArtifactRefBlockService
|
|
19742
|
+
[blockTypes.ARTIFACT_REF]: ArtifactRefBlockService,
|
|
19743
|
+
[blockTypes.NOTIFICATION_DRAFT]: NotificationDraftBlockService
|
|
19490
19744
|
};
|
|
19491
19745
|
|
|
19492
19746
|
// src/components/blocks/block/block.tsx
|
|
19493
|
-
var
|
|
19747
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
19494
19748
|
function Block({ block }) {
|
|
19495
19749
|
const service = BlockServices[block.type];
|
|
19496
19750
|
if (!service) return null;
|
|
19497
19751
|
const { Component } = service;
|
|
19498
|
-
return /* @__PURE__ */ (0,
|
|
19752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Component, { block });
|
|
19499
19753
|
}
|
|
19500
19754
|
|
|
19501
19755
|
// src/components/blocks/block-context/block-context.tsx
|
|
19502
|
-
var
|
|
19503
|
-
var BlockContext = (0,
|
|
19756
|
+
var import_react21 = require("react");
|
|
19757
|
+
var BlockContext = (0, import_react21.createContext)(null);
|
|
19504
19758
|
function useBlockContext() {
|
|
19505
|
-
return (0,
|
|
19759
|
+
return (0, import_react21.useContext)(BlockContext) ?? {};
|
|
19506
19760
|
}
|
|
19507
19761
|
|
|
19508
19762
|
// src/components/ai-elements/prompt-input/prompt-input.tsx
|
|
19509
|
-
var
|
|
19763
|
+
var import_react24 = require("react");
|
|
19510
19764
|
|
|
19511
19765
|
// src/components/button/button.tsx
|
|
19512
|
-
var
|
|
19766
|
+
var import_react22 = require("react");
|
|
19513
19767
|
|
|
19514
19768
|
// src/components/button/button-styles.ts
|
|
19515
19769
|
var import_styled_components5 = __toESM(require("styled-components"), 1);
|
|
@@ -19632,8 +19886,8 @@ var StyledButton = import_styled_components5.default.button`
|
|
|
19632
19886
|
`;
|
|
19633
19887
|
|
|
19634
19888
|
// src/components/button/button.tsx
|
|
19635
|
-
var
|
|
19636
|
-
var Button2 = (0,
|
|
19889
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
19890
|
+
var Button2 = (0, import_react22.forwardRef)(function Button3({
|
|
19637
19891
|
children,
|
|
19638
19892
|
variant = BUTTON_VARIANT.SOLID,
|
|
19639
19893
|
intent = BUTTON_INTENT.PRIMARY,
|
|
@@ -19645,8 +19899,8 @@ var Button2 = (0, import_react20.forwardRef)(function Button3({
|
|
|
19645
19899
|
className,
|
|
19646
19900
|
"aria-label": ariaLabel
|
|
19647
19901
|
}, ref) {
|
|
19648
|
-
const iconElement = icon ? /* @__PURE__ */ (0,
|
|
19649
|
-
return /* @__PURE__ */ (0,
|
|
19902
|
+
const iconElement = icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { icon, size: 16 }) : null;
|
|
19903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
19650
19904
|
StyledButton,
|
|
19651
19905
|
{
|
|
19652
19906
|
ref,
|
|
@@ -19660,7 +19914,7 @@ var Button2 = (0, import_react20.forwardRef)(function Button3({
|
|
|
19660
19914
|
"aria-label": ariaLabel,
|
|
19661
19915
|
children: [
|
|
19662
19916
|
iconPosition === ICON_POSITION.LEADING && iconElement,
|
|
19663
|
-
/* @__PURE__ */ (0,
|
|
19917
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children }),
|
|
19664
19918
|
iconPosition === ICON_POSITION.TRAILING && iconElement
|
|
19665
19919
|
]
|
|
19666
19920
|
}
|
|
@@ -19668,7 +19922,7 @@ var Button2 = (0, import_react20.forwardRef)(function Button3({
|
|
|
19668
19922
|
});
|
|
19669
19923
|
|
|
19670
19924
|
// src/components/text-area/text-area.tsx
|
|
19671
|
-
var
|
|
19925
|
+
var import_react23 = require("react");
|
|
19672
19926
|
|
|
19673
19927
|
// src/utils/merge-refs.ts
|
|
19674
19928
|
function mergeRefs(...refs) {
|
|
@@ -19709,23 +19963,23 @@ var StyledTextArea = import_styled_components6.default.textarea`
|
|
|
19709
19963
|
`;
|
|
19710
19964
|
|
|
19711
19965
|
// src/components/text-area/text-area.tsx
|
|
19712
|
-
var
|
|
19713
|
-
var TextArea = (0,
|
|
19714
|
-
const internalRef = (0,
|
|
19715
|
-
(0,
|
|
19966
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
19967
|
+
var TextArea = (0, import_react23.forwardRef)(function TextArea2({ value: value2, onChange, placeholder, maxHeight, rows = 1, autoFocus, onKeyDown, disabled, className }, externalRef) {
|
|
19968
|
+
const internalRef = (0, import_react23.useRef)(null);
|
|
19969
|
+
(0, import_react23.useLayoutEffect)(() => {
|
|
19716
19970
|
const el = internalRef.current;
|
|
19717
19971
|
if (el) {
|
|
19718
19972
|
el.style.height = "auto";
|
|
19719
19973
|
el.style.height = `${el.scrollHeight}px`;
|
|
19720
19974
|
}
|
|
19721
19975
|
}, [value2]);
|
|
19722
|
-
const handleChange = (0,
|
|
19976
|
+
const handleChange = (0, import_react23.useCallback)(
|
|
19723
19977
|
(e) => {
|
|
19724
19978
|
onChange(e.target.value);
|
|
19725
19979
|
},
|
|
19726
19980
|
[onChange]
|
|
19727
19981
|
);
|
|
19728
|
-
return /* @__PURE__ */ (0,
|
|
19982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
19729
19983
|
StyledTextArea,
|
|
19730
19984
|
{
|
|
19731
19985
|
ref: mergeRefs(internalRef, externalRef),
|
|
@@ -19751,9 +20005,9 @@ var CHAT_STATUS = {
|
|
|
19751
20005
|
};
|
|
19752
20006
|
|
|
19753
20007
|
// src/components/ai-elements/prompt-input/prompt-input.tsx
|
|
19754
|
-
var
|
|
20008
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
19755
20009
|
var PromptInput = ({ className, onSubmit, disabled, children, ...props }) => {
|
|
19756
|
-
const handleSubmit = (0,
|
|
20010
|
+
const handleSubmit = (0, import_react24.useCallback)(
|
|
19757
20011
|
(event) => {
|
|
19758
20012
|
event.preventDefault();
|
|
19759
20013
|
if (disabled) {
|
|
@@ -19768,7 +20022,7 @@ var PromptInput = ({ className, onSubmit, disabled, children, ...props }) => {
|
|
|
19768
20022
|
},
|
|
19769
20023
|
[disabled, onSubmit]
|
|
19770
20024
|
);
|
|
19771
|
-
return /* @__PURE__ */ (0,
|
|
20025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
19772
20026
|
"form",
|
|
19773
20027
|
{
|
|
19774
20028
|
className: cn(
|
|
@@ -19781,9 +20035,9 @@ var PromptInput = ({ className, onSubmit, disabled, children, ...props }) => {
|
|
|
19781
20035
|
}
|
|
19782
20036
|
);
|
|
19783
20037
|
};
|
|
19784
|
-
var PromptInputTextarea = (0,
|
|
20038
|
+
var PromptInputTextarea = (0, import_react24.forwardRef)(
|
|
19785
20039
|
function PromptInputTextarea2({ className, onKeyDown, placeholder = "What would you like to know?", ...props }, ref) {
|
|
19786
|
-
const handleKeyDown = (0,
|
|
20040
|
+
const handleKeyDown = (0, import_react24.useCallback)(
|
|
19787
20041
|
(event) => {
|
|
19788
20042
|
onKeyDown?.(event);
|
|
19789
20043
|
if (event.defaultPrevented) {
|
|
@@ -19796,21 +20050,21 @@ var PromptInputTextarea = (0, import_react22.forwardRef)(
|
|
|
19796
20050
|
},
|
|
19797
20051
|
[onKeyDown]
|
|
19798
20052
|
);
|
|
19799
|
-
return /* @__PURE__ */ (0,
|
|
20053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("py-3", className), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TextArea, { ref, className: "px-4", onKeyDown: handleKeyDown, placeholder, ...props }) });
|
|
19800
20054
|
}
|
|
19801
20055
|
);
|
|
19802
|
-
var PromptInputFooter = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
19803
|
-
var PromptInputTools = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
20056
|
+
var PromptInputFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("flex items-center justify-between gap-1 px-4 pb-3", className), ...props });
|
|
20057
|
+
var PromptInputTools = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("flex min-w-0 items-center gap-1", className), ...props });
|
|
19804
20058
|
var PromptInputSubmit = ({
|
|
19805
20059
|
label = "Submit",
|
|
19806
20060
|
status = CHAT_STATUS.READY,
|
|
19807
20061
|
disabled,
|
|
19808
20062
|
className
|
|
19809
20063
|
}) => {
|
|
19810
|
-
const handleClick = (0,
|
|
20064
|
+
const handleClick = (0, import_react24.useCallback)((event) => {
|
|
19811
20065
|
event.currentTarget.form?.requestSubmit();
|
|
19812
20066
|
}, []);
|
|
19813
|
-
return /* @__PURE__ */ (0,
|
|
20067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
19814
20068
|
Button2,
|
|
19815
20069
|
{
|
|
19816
20070
|
intent: status === CHAT_STATUS.ERROR ? BUTTON_INTENT.ERROR : BUTTON_INTENT.PRIMARY,
|
|
@@ -19824,7 +20078,7 @@ var PromptInputSubmit = ({
|
|
|
19824
20078
|
};
|
|
19825
20079
|
|
|
19826
20080
|
// src/components/ai-elements/mouse-grid/mouse-grid.tsx
|
|
19827
|
-
var
|
|
20081
|
+
var import_react25 = require("react");
|
|
19828
20082
|
|
|
19829
20083
|
// src/utils/prefers-reduced-motion.ts
|
|
19830
20084
|
function prefersReducedMotion() {
|
|
@@ -19832,11 +20086,11 @@ function prefersReducedMotion() {
|
|
|
19832
20086
|
}
|
|
19833
20087
|
|
|
19834
20088
|
// src/components/ai-elements/mouse-grid/mouse-grid.tsx
|
|
19835
|
-
var
|
|
20089
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
19836
20090
|
function MouseGrid({ glowColor, colorCycleMs = 4e3, autoDrift = false } = {}) {
|
|
19837
|
-
const layerRef = (0,
|
|
19838
|
-
const glowRef = (0,
|
|
19839
|
-
(0,
|
|
20091
|
+
const layerRef = (0, import_react25.useRef)(null);
|
|
20092
|
+
const glowRef = (0, import_react25.useRef)(null);
|
|
20093
|
+
(0, import_react25.useEffect)(() => {
|
|
19840
20094
|
const driftEnabled = autoDrift && !prefersReducedMotion();
|
|
19841
20095
|
let raf = 0;
|
|
19842
20096
|
let driftRaf = 0;
|
|
@@ -19937,7 +20191,7 @@ function MouseGrid({ glowColor, colorCycleMs = 4e3, autoDrift = false } = {}) {
|
|
|
19937
20191
|
}, [autoDrift]);
|
|
19938
20192
|
const colorList = Array.isArray(glowColor) ? glowColor : glowColor != null ? [glowColor] : [];
|
|
19939
20193
|
const glowColorsKey = JSON.stringify(colorList);
|
|
19940
|
-
(0,
|
|
20194
|
+
(0, import_react25.useEffect)(() => {
|
|
19941
20195
|
const glow = glowRef.current;
|
|
19942
20196
|
if (!glow) {
|
|
19943
20197
|
return;
|
|
@@ -19964,19 +20218,19 @@ function MouseGrid({ glowColor, colorCycleMs = 4e3, autoDrift = false } = {}) {
|
|
|
19964
20218
|
clearColor();
|
|
19965
20219
|
};
|
|
19966
20220
|
}, [glowColorsKey, colorCycleMs]);
|
|
19967
|
-
return /* @__PURE__ */ (0,
|
|
19968
|
-
/* @__PURE__ */ (0,
|
|
19969
|
-
/* @__PURE__ */ (0,
|
|
20221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref: layerRef, "aria-hidden": "true", className: "vibe-mouse-grid-layer", children: [
|
|
20222
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "vibe-mouse-grid" }),
|
|
20223
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref: glowRef, className: "vibe-mouse-glow" })
|
|
19970
20224
|
] });
|
|
19971
20225
|
}
|
|
19972
20226
|
|
|
19973
20227
|
// src/components/ai-elements/suggestion/suggestion.tsx
|
|
19974
|
-
var
|
|
19975
|
-
var
|
|
19976
|
-
var Suggestions = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
20228
|
+
var import_react26 = require("react");
|
|
20229
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
20230
|
+
var Suggestions = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("flex flex-wrap items-center justify-center gap-3", className), ...props });
|
|
19977
20231
|
var Suggestion = ({ suggestion, onClick, className, children, ...props }) => {
|
|
19978
|
-
const handleClick = (0,
|
|
19979
|
-
return /* @__PURE__ */ (0,
|
|
20232
|
+
const handleClick = (0, import_react26.useCallback)(() => onClick?.(suggestion), [onClick, suggestion]);
|
|
20233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
19980
20234
|
"button",
|
|
19981
20235
|
{
|
|
19982
20236
|
type: "button",
|
|
@@ -19992,7 +20246,7 @@ var Suggestion = ({ suggestion, onClick, className, children, ...props }) => {
|
|
|
19992
20246
|
};
|
|
19993
20247
|
|
|
19994
20248
|
// src/components/chat/chat-message/chat-message.tsx
|
|
19995
|
-
var
|
|
20249
|
+
var import_react29 = require("react");
|
|
19996
20250
|
|
|
19997
20251
|
// src/components/chat/hooks/copy-message-text.ts
|
|
19998
20252
|
function copyMessageText(message) {
|
|
@@ -20009,55 +20263,19 @@ function copyMessageText(message) {
|
|
|
20009
20263
|
}
|
|
20010
20264
|
|
|
20011
20265
|
// src/components/chat/chat-message-actions/chat-message-actions.tsx
|
|
20012
|
-
var
|
|
20266
|
+
var import_react28 = require("react");
|
|
20013
20267
|
|
|
20014
20268
|
// src/components/chat/chat-context/chat-context.ts
|
|
20015
|
-
var
|
|
20016
|
-
var ChatContext = (0,
|
|
20269
|
+
var import_react27 = require("react");
|
|
20270
|
+
var ChatContext = (0, import_react27.createContext)(null);
|
|
20017
20271
|
function useChatContext() {
|
|
20018
|
-
const context = (0,
|
|
20272
|
+
const context = (0, import_react27.useContext)(ChatContext);
|
|
20019
20273
|
if (!context) {
|
|
20020
20274
|
throw new Error("useChatContext must be used within a Chat.Root component");
|
|
20021
20275
|
}
|
|
20022
20276
|
return context;
|
|
20023
20277
|
}
|
|
20024
20278
|
|
|
20025
|
-
// src/components/chat/hooks/use-copy-to-clipboard.ts
|
|
20026
|
-
var import_react26 = require("react");
|
|
20027
|
-
|
|
20028
|
-
// src/utils/clipboard.ts
|
|
20029
|
-
function copyToClipboard(text2, options) {
|
|
20030
|
-
navigator.clipboard.writeText(text2).then(
|
|
20031
|
-
() => options?.onSuccess?.(),
|
|
20032
|
-
(error) => options?.onFailure?.(error)
|
|
20033
|
-
);
|
|
20034
|
-
}
|
|
20035
|
-
|
|
20036
|
-
// src/components/chat/hooks/use-copy-to-clipboard.ts
|
|
20037
|
-
var RESET_DELAY_MS = 2e3;
|
|
20038
|
-
function useCopyToClipboard() {
|
|
20039
|
-
const [isCopied, setIsCopied] = (0, import_react26.useState)(false);
|
|
20040
|
-
const timeoutRef = (0, import_react26.useRef)(null);
|
|
20041
|
-
(0, import_react26.useEffect)(() => {
|
|
20042
|
-
return () => {
|
|
20043
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
20044
|
-
};
|
|
20045
|
-
}, []);
|
|
20046
|
-
const copy = (0, import_react26.useCallback)((text2) => {
|
|
20047
|
-
copyToClipboard(text2, {
|
|
20048
|
-
onSuccess: () => {
|
|
20049
|
-
setIsCopied(true);
|
|
20050
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
20051
|
-
timeoutRef.current = setTimeout(() => {
|
|
20052
|
-
setIsCopied(false);
|
|
20053
|
-
timeoutRef.current = null;
|
|
20054
|
-
}, RESET_DELAY_MS);
|
|
20055
|
-
}
|
|
20056
|
-
});
|
|
20057
|
-
}, []);
|
|
20058
|
-
return { isCopied, copy };
|
|
20059
|
-
}
|
|
20060
|
-
|
|
20061
20279
|
// src/components/chat/constants.ts
|
|
20062
20280
|
var MESSAGE_ROLE = {
|
|
20063
20281
|
USER: "user",
|
|
@@ -20083,24 +20301,24 @@ var AnimatedAction = import_styled_components7.default.div`
|
|
|
20083
20301
|
`;
|
|
20084
20302
|
|
|
20085
20303
|
// src/components/chat/chat-message-actions/chat-message-actions.tsx
|
|
20086
|
-
var
|
|
20304
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
20087
20305
|
function ChatMessageActions({ className, messageId, content: content2, role, isHelpful }) {
|
|
20088
20306
|
const { onCopyMessage, onThumbUpClick, onThumbDownClick } = useChatContext();
|
|
20089
20307
|
const { isCopied, copy } = useCopyToClipboard();
|
|
20090
|
-
const handleCopy = (0,
|
|
20308
|
+
const handleCopy = (0, import_react28.useCallback)(() => {
|
|
20091
20309
|
copy(content2);
|
|
20092
20310
|
onCopyMessage?.(messageId);
|
|
20093
20311
|
}, [content2, messageId, copy, onCopyMessage]);
|
|
20094
|
-
const handleThumbUp = (0,
|
|
20312
|
+
const handleThumbUp = (0, import_react28.useCallback)(() => {
|
|
20095
20313
|
onThumbUpClick?.(messageId, isHelpful === true ? null : true);
|
|
20096
20314
|
}, [messageId, isHelpful, onThumbUpClick]);
|
|
20097
|
-
const handleThumbDown = (0,
|
|
20315
|
+
const handleThumbDown = (0, import_react28.useCallback)(() => {
|
|
20098
20316
|
onThumbDownClick?.(messageId, isHelpful === false ? null : false);
|
|
20099
20317
|
}, [messageId, isHelpful, onThumbDownClick]);
|
|
20100
20318
|
const isAssistant = role === MESSAGE_ROLE.ASSISTANT;
|
|
20101
20319
|
const hasFeedback = isAssistant && (onThumbUpClick || onThumbDownClick);
|
|
20102
|
-
return /* @__PURE__ */ (0,
|
|
20103
|
-
/* @__PURE__ */ (0,
|
|
20320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(ActionsContainer, { $role: role, className, children: [
|
|
20321
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
20104
20322
|
IconButton,
|
|
20105
20323
|
{
|
|
20106
20324
|
icon: isCopied ? IconCheck : IconCopy,
|
|
@@ -20108,7 +20326,7 @@ function ChatMessageActions({ className, messageId, content: content2, role, isH
|
|
|
20108
20326
|
"aria-label": isCopied ? "Copied" : "Copy message"
|
|
20109
20327
|
}
|
|
20110
20328
|
),
|
|
20111
|
-
hasFeedback && /* @__PURE__ */ (0,
|
|
20329
|
+
hasFeedback && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AnimatedAction, { $visible: isHelpful !== false, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
20112
20330
|
IconButton,
|
|
20113
20331
|
{
|
|
20114
20332
|
icon: IconThumbUp,
|
|
@@ -20117,7 +20335,7 @@ function ChatMessageActions({ className, messageId, content: content2, role, isH
|
|
|
20117
20335
|
"aria-label": "Good response"
|
|
20118
20336
|
}
|
|
20119
20337
|
) }),
|
|
20120
|
-
hasFeedback && /* @__PURE__ */ (0,
|
|
20338
|
+
hasFeedback && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AnimatedAction, { $visible: isHelpful !== true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
20121
20339
|
IconButton,
|
|
20122
20340
|
{
|
|
20123
20341
|
icon: IconThumbDown,
|
|
@@ -20168,12 +20386,12 @@ var MessageBubble = import_styled_components8.default.div`
|
|
|
20168
20386
|
`;
|
|
20169
20387
|
|
|
20170
20388
|
// src/components/chat/chat-message/chat-message.tsx
|
|
20171
|
-
var
|
|
20389
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
20172
20390
|
function ChatMessage({ message }) {
|
|
20173
|
-
const clipboardText = (0,
|
|
20174
|
-
return /* @__PURE__ */ (0,
|
|
20175
|
-
/* @__PURE__ */ (0,
|
|
20176
|
-
/* @__PURE__ */ (0,
|
|
20391
|
+
const clipboardText = (0, import_react29.useMemo)(() => copyMessageText(message), [message]);
|
|
20392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MessageRow, { $role: message.role, role: "article", "aria-label": `${message.role} message`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(MessageContainer, { $role: message.role, children: [
|
|
20393
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MessageBubble, { $role: message.role, "data-testid": "message-bubble", children: message.blocks.map((block, index2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Block, { block }, index2)) }),
|
|
20394
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
20177
20395
|
ChatMessageActions,
|
|
20178
20396
|
{
|
|
20179
20397
|
messageId: message.id,
|
|
@@ -20233,21 +20451,21 @@ var Key = import_styled_components9.default.kbd`
|
|
|
20233
20451
|
`;
|
|
20234
20452
|
|
|
20235
20453
|
// src/components/keyboard-shortcut/keyboard-shortcut.tsx
|
|
20236
|
-
var
|
|
20454
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
20237
20455
|
function KeyboardShortcut({
|
|
20238
20456
|
keys,
|
|
20239
20457
|
variant = KEYBOARD_SHORTCUT_VARIANTS.OUTLINED,
|
|
20240
20458
|
adaptive = false,
|
|
20241
20459
|
className
|
|
20242
20460
|
}) {
|
|
20243
|
-
return /* @__PURE__ */ (0,
|
|
20461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Wrapper, { className, children: keys.map((KeyComponent, index2) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Key, { $variant: variant, $adaptive: adaptive, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: KeyComponent, size: 12 }) }, index2)) });
|
|
20244
20462
|
}
|
|
20245
20463
|
|
|
20246
20464
|
// src/components/keyboard-shortcut/icons/icon-ctrl.tsx
|
|
20247
|
-
var
|
|
20465
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
20248
20466
|
function IconCtrl(props) {
|
|
20249
20467
|
const { width: width2 = 24, height: height2 = 24, ...rest } = props;
|
|
20250
|
-
return /* @__PURE__ */ (0,
|
|
20468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: width2, height: height2, fill: "none", ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
20251
20469
|
"text",
|
|
20252
20470
|
{
|
|
20253
20471
|
x: "50%",
|
|
@@ -20264,7 +20482,7 @@ function IconCtrl(props) {
|
|
|
20264
20482
|
}
|
|
20265
20483
|
|
|
20266
20484
|
// src/components/lottie/lottie.tsx
|
|
20267
|
-
var
|
|
20485
|
+
var import_react31 = require("react");
|
|
20268
20486
|
|
|
20269
20487
|
// src/components/lottie/lottie-styles.ts
|
|
20270
20488
|
var import_styled_components10 = __toESM(require("styled-components"), 1);
|
|
@@ -20280,7 +20498,7 @@ var LottieContainer = import_styled_components10.default.div`
|
|
|
20280
20498
|
`;
|
|
20281
20499
|
|
|
20282
20500
|
// src/components/lottie/use-lottie.ts
|
|
20283
|
-
var
|
|
20501
|
+
var import_react30 = require("react");
|
|
20284
20502
|
var import_lottie_web = __toESM(require_lottie(), 1);
|
|
20285
20503
|
function useLottie({
|
|
20286
20504
|
animationData: animationData2,
|
|
@@ -20295,17 +20513,17 @@ function useLottie({
|
|
|
20295
20513
|
onLoopComplete,
|
|
20296
20514
|
onEnterFrame
|
|
20297
20515
|
}) {
|
|
20298
|
-
const containerRef = (0,
|
|
20299
|
-
const animationRef = (0,
|
|
20300
|
-
const onAnimationLoadedRef = (0,
|
|
20301
|
-
const onCompleteRef = (0,
|
|
20302
|
-
const onLoopCompleteRef = (0,
|
|
20303
|
-
const onEnterFrameRef = (0,
|
|
20516
|
+
const containerRef = (0, import_react30.useRef)(null);
|
|
20517
|
+
const animationRef = (0, import_react30.useRef)(null);
|
|
20518
|
+
const onAnimationLoadedRef = (0, import_react30.useRef)(onAnimationLoaded);
|
|
20519
|
+
const onCompleteRef = (0, import_react30.useRef)(onComplete);
|
|
20520
|
+
const onLoopCompleteRef = (0, import_react30.useRef)(onLoopComplete);
|
|
20521
|
+
const onEnterFrameRef = (0, import_react30.useRef)(onEnterFrame);
|
|
20304
20522
|
onAnimationLoadedRef.current = onAnimationLoaded;
|
|
20305
20523
|
onCompleteRef.current = onComplete;
|
|
20306
20524
|
onLoopCompleteRef.current = onLoopComplete;
|
|
20307
20525
|
onEnterFrameRef.current = onEnterFrame;
|
|
20308
|
-
(0,
|
|
20526
|
+
(0, import_react30.useEffect)(() => {
|
|
20309
20527
|
if (!containerRef.current) return;
|
|
20310
20528
|
const anim = import_lottie_web.default.loadAnimation({
|
|
20311
20529
|
container: containerRef.current,
|
|
@@ -20397,8 +20615,8 @@ function createLottieRef(animationRef) {
|
|
|
20397
20615
|
}
|
|
20398
20616
|
|
|
20399
20617
|
// src/components/lottie/lottie.tsx
|
|
20400
|
-
var
|
|
20401
|
-
var Lottie = (0,
|
|
20618
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
20619
|
+
var Lottie = (0, import_react31.forwardRef)(function Lottie2({
|
|
20402
20620
|
animationData: animationData2,
|
|
20403
20621
|
autoplay,
|
|
20404
20622
|
loop,
|
|
@@ -20428,8 +20646,8 @@ var Lottie = (0, import_react30.forwardRef)(function Lottie2({
|
|
|
20428
20646
|
onLoopComplete,
|
|
20429
20647
|
onEnterFrame
|
|
20430
20648
|
});
|
|
20431
|
-
(0,
|
|
20432
|
-
return /* @__PURE__ */ (0,
|
|
20649
|
+
(0, import_react31.useImperativeHandle)(ref, () => createLottieRef(animationRef), [animationRef]);
|
|
20650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
20433
20651
|
LottieContainer,
|
|
20434
20652
|
{
|
|
20435
20653
|
ref: containerRef,
|
|
@@ -20523,6 +20741,7 @@ function convertTableToCSV(table) {
|
|
|
20523
20741
|
BUTTON_INTENT,
|
|
20524
20742
|
BUTTON_SIZE,
|
|
20525
20743
|
BUTTON_VARIANT,
|
|
20744
|
+
Badge,
|
|
20526
20745
|
Block,
|
|
20527
20746
|
BlockContext,
|
|
20528
20747
|
BlockServices,
|
|
@@ -20531,6 +20750,7 @@ function convertTableToCSV(table) {
|
|
|
20531
20750
|
ChartArtifact,
|
|
20532
20751
|
ChatContext,
|
|
20533
20752
|
ChatMessage,
|
|
20753
|
+
CopyButton,
|
|
20534
20754
|
DEFAULT_CHART_ARTIFACT_LABELS,
|
|
20535
20755
|
DEFAULT_DECK_ARTIFACT_LABELS,
|
|
20536
20756
|
DEFAULT_TABLE_ARTIFACT_LABELS,
|
|
@@ -20544,6 +20764,8 @@ function convertTableToCSV(table) {
|
|
|
20544
20764
|
Lottie,
|
|
20545
20765
|
MESSAGE_ROLE,
|
|
20546
20766
|
MouseGrid,
|
|
20767
|
+
NotificationDraftBlock,
|
|
20768
|
+
NotificationDraftBlockService,
|
|
20547
20769
|
PromptInput,
|
|
20548
20770
|
PromptInputFooter,
|
|
20549
20771
|
PromptInputSubmit,
|
|
@@ -20567,6 +20789,8 @@ function convertTableToCSV(table) {
|
|
|
20567
20789
|
isSafeDownloadUrl,
|
|
20568
20790
|
markdownToPlainText,
|
|
20569
20791
|
mergeRefs,
|
|
20792
|
+
notificationChannels,
|
|
20793
|
+
notificationEmailTypes,
|
|
20570
20794
|
parseMarkdownTable,
|
|
20571
20795
|
typographyMixin,
|
|
20572
20796
|
typographyStyles,
|
|
@@ -20593,6 +20817,7 @@ lottie-web/build/player/lottie.js:
|
|
|
20593
20817
|
@tabler/icons-react/dist/esm/icons/IconArrowsMaximize.mjs:
|
|
20594
20818
|
@tabler/icons-react/dist/esm/icons/IconArrowsMinimize.mjs:
|
|
20595
20819
|
@tabler/icons-react/dist/esm/icons/IconCheck.mjs:
|
|
20820
|
+
@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs:
|
|
20596
20821
|
@tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs:
|
|
20597
20822
|
@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs:
|
|
20598
20823
|
@tabler/icons-react/dist/esm/icons/IconCopy.mjs:
|
|
@@ -20602,6 +20827,7 @@ lottie-web/build/player/lottie.js:
|
|
|
20602
20827
|
@tabler/icons-react/dist/esm/icons/IconPhoto.mjs:
|
|
20603
20828
|
@tabler/icons-react/dist/esm/icons/IconThumbDown.mjs:
|
|
20604
20829
|
@tabler/icons-react/dist/esm/icons/IconThumbUp.mjs:
|
|
20830
|
+
@tabler/icons-react/dist/esm/icons/IconFlask2Filled.mjs:
|
|
20605
20831
|
@tabler/icons-react/dist/esm/tabler-icons-react.mjs:
|
|
20606
20832
|
(**
|
|
20607
20833
|
* @license @tabler/icons-react v3.37.1 - MIT
|