@shapesos/clay 0.18.0 → 0.19.1

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.
Files changed (60) hide show
  1. package/dist/artifacts.cjs +207 -139
  2. package/dist/artifacts.cjs.map +1 -1
  3. package/dist/artifacts.js +5 -2
  4. package/dist/badge.cjs +70 -0
  5. package/dist/badge.cjs.map +1 -0
  6. package/dist/badge.d.cts +28 -0
  7. package/dist/badge.d.ts +28 -0
  8. package/dist/badge.js +9 -0
  9. package/dist/badge.js.map +1 -0
  10. package/dist/blocks.cjs +452 -185
  11. package/dist/blocks.cjs.map +1 -1
  12. package/dist/blocks.css +1 -1
  13. package/dist/blocks.d.cts +14 -3
  14. package/dist/blocks.d.ts +14 -3
  15. package/dist/blocks.js +17 -5
  16. package/dist/chat.cjs +457 -240
  17. package/dist/chat.cjs.map +1 -1
  18. package/dist/chat.d.cts +1 -1
  19. package/dist/chat.d.ts +1 -1
  20. package/dist/chat.js +10 -5
  21. package/dist/{chunk-JGMN6W72.js → chunk-2X4KUXYP.js} +1 -1
  22. package/dist/{chunk-QR4VBGK4.js → chunk-63AGNGKG.js} +81 -200
  23. package/dist/chunk-63AGNGKG.js.map +1 -0
  24. package/dist/chunk-CSTCTO3B.js +161 -0
  25. package/dist/chunk-CSTCTO3B.js.map +1 -0
  26. package/dist/chunk-EIAWZXE4.js +69 -0
  27. package/dist/chunk-EIAWZXE4.js.map +1 -0
  28. package/dist/chunk-EXRNGIQ2.js +41 -0
  29. package/dist/chunk-EXRNGIQ2.js.map +1 -0
  30. package/dist/{chunk-4MZZH3WX.js → chunk-HU5W7CGE.js} +37 -2
  31. package/dist/chunk-HU5W7CGE.js.map +1 -0
  32. package/dist/chunk-PISZYS2H.js +406 -0
  33. package/dist/chunk-PISZYS2H.js.map +1 -0
  34. package/dist/{chunk-CATIRDZP.js → chunk-PWSEEUVL.js} +10 -44
  35. package/dist/chunk-PWSEEUVL.js.map +1 -0
  36. package/dist/copy-button.cjs +439 -0
  37. package/dist/copy-button.cjs.map +1 -0
  38. package/dist/copy-button.d.cts +20 -0
  39. package/dist/copy-button.d.ts +20 -0
  40. package/dist/copy-button.js +12 -0
  41. package/dist/copy-button.js.map +1 -0
  42. package/dist/index.cjs +533 -298
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.cts +4 -2
  45. package/dist/index.d.ts +4 -2
  46. package/dist/index.js +26 -9
  47. package/dist/table.cjs +40 -0
  48. package/dist/table.cjs.map +1 -1
  49. package/dist/table.d.cts +37 -2
  50. package/dist/table.d.ts +37 -2
  51. package/dist/table.js +11 -1
  52. package/dist/{types-BDYPVP2N.d.cts → types-Bhg0_ES8.d.cts} +74 -2
  53. package/dist/{types-BMwa4bPW.d.ts → types-orOQcI2z.d.ts} +74 -2
  54. package/package.json +11 -1
  55. package/dist/chunk-4MZZH3WX.js.map +0 -1
  56. package/dist/chunk-7MY4X4YL.js +0 -250
  57. package/dist/chunk-7MY4X4YL.js.map +0 -1
  58. package/dist/chunk-CATIRDZP.js.map +0 -1
  59. package/dist/chunk-QR4VBGK4.js.map +0 -1
  60. /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 __iconNode5 = [["path", { "d": "M15 6l-6 6l6 6", "key": "svg-0" }]];
17123
- var IconChevronLeft = createReactComponent("outline", "chevron-left", "ChevronLeft", __iconNode5);
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 __iconNode6 = [["path", { "d": "M9 6l6 6l-6 6", "key": "svg-0" }]];
17127
- var IconChevronRight = createReactComponent("outline", "chevron-right", "ChevronRight", __iconNode6);
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 __iconNode7 = [["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" }]];
17131
- var IconCopy = createReactComponent("outline", "copy", "Copy", __iconNode7);
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 __iconNode8 = [["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" }]];
17135
- var IconDownload = createReactComponent("outline", "download", "Download", __iconNode8);
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 __iconNode9 = [["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" }]];
17139
- var IconFileSpreadsheet = createReactComponent("outline", "file-spreadsheet", "FileSpreadsheet", __iconNode9);
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 __iconNode10 = [["path", { "d": "M12 3a9 9 0 1 0 9 9", "key": "svg-0" }]];
17143
- var IconLoader2 = createReactComponent("outline", "loader-2", "Loader2", __iconNode10);
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 __iconNode11 = [["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" }]];
17147
- var IconPhoto = createReactComponent("outline", "photo", "Photo", __iconNode11);
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 __iconNode12 = [["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" }]];
17151
- var IconThumbDown = createReactComponent("outline", "thumb-down", "ThumbDown", __iconNode12);
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 __iconNode13 = [["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" }]];
17155
- var IconThumbUp = createReactComponent("outline", "thumb-up", "ThumbUp", __iconNode13);
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");
@@ -18420,6 +18435,41 @@ var ChartArtifactService = {
18420
18435
  // src/components/artifacts/deck-artifact/deck-artifact.tsx
18421
18436
  var import_react17 = require("react");
18422
18437
  var import_react_dom = require("react-dom");
18438
+
18439
+ // src/components/badge/badge.tsx
18440
+ var import_jsx_runtime20 = require("react/jsx-runtime");
18441
+ var BASE = "inline-flex items-center whitespace-nowrap rounded-full";
18442
+ var SIZES = {
18443
+ // `sm` is a uniform scale-down of `md` (text 10/12 of caption): padding and line-height keep
18444
+ // md's proportions (caption is 12px text on a 16px line = 1.333 ratio) so the pill shape matches.
18445
+ md: "px-2.5 py-0.5 text-geist-label-caption-medium",
18446
+ sm: "px-2 py-0.5 text-[11px]/[1.333] font-medium"
18447
+ };
18448
+ var SUBTLE = {
18449
+ neutral: "bg-brown-20 text-brown-70",
18450
+ warning: "bg-orange-50 text-orange-600",
18451
+ violet: "bg-violet-50 text-violet-600"
18452
+ };
18453
+ var OUTLINE = {
18454
+ neutral: "border border-brown-30 bg-white text-brown-100",
18455
+ warning: "border border-orange-200 bg-white text-orange-600",
18456
+ violet: "border border-violet-400 bg-white text-violet-600"
18457
+ };
18458
+ var VARIANTS = {
18459
+ subtle: SUBTLE,
18460
+ outline: OUTLINE
18461
+ };
18462
+ function Badge({
18463
+ variant = "subtle",
18464
+ tone = "neutral",
18465
+ size = "md",
18466
+ className,
18467
+ children
18468
+ }) {
18469
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: cn(BASE, SIZES[size], VARIANTS[variant][tone], className), children });
18470
+ }
18471
+
18472
+ // src/components/artifacts/deck-artifact/deck-artifact.tsx
18423
18473
  init_capture_exclude_attribute();
18424
18474
 
18425
18475
  // src/components/artifacts/deck-artifact/deck-artifact-content.tsx
@@ -18427,23 +18477,23 @@ var import_react16 = require("react");
18427
18477
 
18428
18478
  // src/components/ui/table.tsx
18429
18479
  var React3 = __toESM(require("react"), 1);
18430
- var import_jsx_runtime20 = require("react/jsx-runtime");
18431
- var Table = React3.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("relative w-full overflow-auto", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) }));
18480
+ var import_jsx_runtime21 = require("react/jsx-runtime");
18481
+ var Table = React3.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cn("relative w-full overflow-auto", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) }));
18432
18482
  Table.displayName = "Table";
18433
18483
  var TableHeader = React3.forwardRef(
18434
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
18484
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
18435
18485
  );
18436
18486
  TableHeader.displayName = "TableHeader";
18437
18487
  var TableBody = React3.forwardRef(
18438
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
18488
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
18439
18489
  );
18440
18490
  TableBody.displayName = "TableBody";
18441
18491
  var TableFooter = React3.forwardRef(
18442
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tfoot", { ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })
18492
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tfoot", { ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })
18443
18493
  );
18444
18494
  TableFooter.displayName = "TableFooter";
18445
18495
  var TableRow = React3.forwardRef(
18446
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18496
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
18447
18497
  "tr",
18448
18498
  {
18449
18499
  ref,
@@ -18454,7 +18504,7 @@ var TableRow = React3.forwardRef(
18454
18504
  );
18455
18505
  TableRow.displayName = "TableRow";
18456
18506
  var TableHead = React3.forwardRef(
18457
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18507
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
18458
18508
  "th",
18459
18509
  {
18460
18510
  ref,
@@ -18468,11 +18518,11 @@ var TableHead = React3.forwardRef(
18468
18518
  );
18469
18519
  TableHead.displayName = "TableHead";
18470
18520
  var TableCell = React3.forwardRef(
18471
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("td", { ref, className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ...props })
18521
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { ref, className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ...props })
18472
18522
  );
18473
18523
  TableCell.displayName = "TableCell";
18474
18524
  var TableCaption = React3.forwardRef(
18475
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props })
18525
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props })
18476
18526
  );
18477
18527
  TableCaption.displayName = "TableCaption";
18478
18528
 
@@ -18502,6 +18552,36 @@ function useScrollShadow() {
18502
18552
  return { targetRef, isScrolled };
18503
18553
  }
18504
18554
 
18555
+ // src/components/table/data-table.tsx
18556
+ var import_jsx_runtime22 = require("react/jsx-runtime");
18557
+ var DATA_TABLE_HEAD_CLASS = "h-auto py-2 px-4 text-xs font-medium text-foreground whitespace-nowrap text-left";
18558
+ var DATA_TABLE_CELL_CLASS = "p-4 text-sm font-normal text-foreground align-top min-w-[150px] text-left";
18559
+ var DATA_TABLE_ROW_CLASS = "border-b-brown-30 bg-background/70 hover:bg-secondary";
18560
+ var DATA_TABLE_SCROLL_SHADOW = "0 1px 2px rgb(0 0 0 / 0.01), 0 6px 12px -2px rgb(0 0 0 / 0.03)";
18561
+ function DataTable({ header, children, maxBodyHeight, className }) {
18562
+ const { targetRef, isScrolled } = useScrollShadow();
18563
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
18564
+ "div",
18565
+ {
18566
+ ref: targetRef,
18567
+ className: cn("overscroll-none", className),
18568
+ style: maxBodyHeight !== void 0 ? { maxHeight: maxBodyHeight, overflowY: "auto" } : void 0,
18569
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Table, { containerClassName: "overflow-visible", children: [
18570
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
18571
+ TableHeader,
18572
+ {
18573
+ "data-scrolled": isScrolled ? "true" : void 0,
18574
+ className: "sticky top-0 z-10 bg-background/70 backdrop-blur-lg transition-shadow",
18575
+ style: isScrolled ? { boxShadow: DATA_TABLE_SCROLL_SHADOW } : void 0,
18576
+ children: header
18577
+ }
18578
+ ),
18579
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableBody, { children })
18580
+ ] })
18581
+ }
18582
+ );
18583
+ }
18584
+
18505
18585
  // src/components/artifacts/table-artifact/table-artifact-content.constants.ts
18506
18586
  var TABLE_STATUS = {
18507
18587
  LOADING: "loading",
@@ -18514,14 +18594,10 @@ var TABLE_STATUS = {
18514
18594
  function formatCell(row, column) {
18515
18595
  return row[column.key] ?? "";
18516
18596
  }
18517
- var HEAD_CLASS = "h-auto py-2 px-4 text-xs font-medium text-foreground whitespace-nowrap text-left";
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)";
18597
+ var DATA_ROW_CLASSES = `${DATA_TABLE_ROW_CLASS} animate-in fade-in duration-300`;
18522
18598
 
18523
18599
  // src/components/artifacts/table-artifact/table-artifact-content.tsx
18524
- var import_jsx_runtime21 = require("react/jsx-runtime");
18600
+ var import_jsx_runtime23 = require("react/jsx-runtime");
18525
18601
  function TableArtifactContent({
18526
18602
  columns,
18527
18603
  data: data2,
@@ -18531,50 +18607,45 @@ function TableArtifactContent({
18531
18607
  labels
18532
18608
  }) {
18533
18609
  if (data2.status === TABLE_STATUS.ERROR) {
18534
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StatusMessage, { $tone: "error", children: labels.loadError });
18610
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StatusMessage, { $tone: "error", children: labels.loadError });
18535
18611
  }
18536
18612
  if (data2.status === TABLE_STATUS.UNAVAILABLE) {
18537
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StatusMessage, { $tone: "info", children: labels.unavailable });
18613
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StatusMessage, { $tone: "info", children: labels.unavailable });
18538
18614
  }
18539
18615
  if (data2.status === TABLE_STATUS.LOADING) {
18540
18616
  if (typeof knownRowCount === "number" && knownRowCount > 0) {
18541
18617
  const shimmerCount = Math.min(knownRowCount, maxShimmerRows);
18542
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ArtifactTable, { columns, maxBodyHeight, children: renderShimmerRows(columns, shimmerCount) });
18618
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArtifactTable, { columns, maxBodyHeight, children: renderShimmerRows(columns, shimmerCount) });
18543
18619
  }
18544
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StatusMessage, { $tone: "info", children: labels.loading });
18620
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StatusMessage, { $tone: "info", children: labels.loading });
18545
18621
  }
18546
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ArtifactTable, { columns, maxBodyHeight, children: data2.rows.length === 0 ? renderEmptyRow(columns.length, labels.empty) : renderDataRows(columns, data2.rows) });
18622
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArtifactTable, { columns, maxBodyHeight, children: data2.rows.length === 0 ? renderEmptyRow(columns.length, labels.empty) : renderDataRows(columns, data2.rows) });
18547
18623
  }
18548
18624
  function ArtifactTable({ columns, maxBodyHeight, children }) {
18549
- const { targetRef, isScrolled } = useScrollShadow();
18550
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref: targetRef, className: "overscroll-none", style: { maxHeight: maxBodyHeight, overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Table, { containerClassName: "overflow-visible", children: [
18551
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
18552
- TableHeader,
18553
- {
18554
- "data-scrolled": isScrolled ? "true" : void 0,
18555
- className: "sticky top-0 z-10 bg-background/70 backdrop-blur-lg transition-shadow",
18556
- style: isScrolled ? { boxShadow: SCROLL_SHADOW } : void 0,
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
- ] }) });
18625
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
18626
+ DataTable,
18627
+ {
18628
+ maxBodyHeight,
18629
+ header: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableHead, { scope: "col", className: DATA_TABLE_HEAD_CLASS, children: column.label }, column.key)) }),
18630
+ children
18631
+ }
18632
+ );
18562
18633
  }
18563
18634
  function renderShimmerRows(columns, count) {
18564
- return Array.from({ length: count }).map((_, index2) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableRow, { className: ROW_CLASSES, "aria-hidden": "true", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableCell, { className: CELL_CLASS, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "block h-3 w-3/4 animate-pulse rounded bg-muted-foreground/20" }) }, column.key)) }, `shimmer-${index2}`));
18635
+ return Array.from({ length: count }).map((_, index2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableRow, { className: DATA_TABLE_ROW_CLASS, "aria-hidden": "true", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "block h-3 w-3/4 animate-pulse rounded bg-muted-foreground/20" }) }, column.key)) }, `shimmer-${index2}`));
18565
18636
  }
18566
18637
  function renderDataRows(columns, rows) {
18567
- return rows.map((row, index2) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableRow, { className: DATA_ROW_CLASSES, children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableCell, { className: CELL_CLASS, children: formatCell(row, column) }, column.key)) }, index2));
18638
+ return rows.map((row, index2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableRow, { className: DATA_ROW_CLASSES, children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: formatCell(row, column) }, column.key)) }, index2));
18568
18639
  }
18569
18640
  function renderEmptyRow(colSpan, emptyMessage) {
18570
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableCell, { colSpan, className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }) });
18641
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableCell, { colSpan, className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }) });
18571
18642
  }
18572
18643
 
18573
18644
  // src/components/artifacts/deck-artifact/deck-markdown.tsx
18574
18645
  var import_react_markdown = __toESM(require("react-markdown"), 1);
18575
18646
  var import_remark_breaks = __toESM(require("remark-breaks"), 1);
18576
18647
  var import_remark_gfm = __toESM(require("remark-gfm"), 1);
18577
- var import_jsx_runtime22 = require("react/jsx-runtime");
18648
+ var import_jsx_runtime24 = require("react/jsx-runtime");
18578
18649
  function sanitize(text2) {
18579
18650
  return text2.split("\n").filter((line) => {
18580
18651
  const t = line.trim();
@@ -18582,45 +18653,45 @@ function sanitize(text2) {
18582
18653
  }).join("\n");
18583
18654
  }
18584
18655
  var MARKDOWN_COMPONENTS = {
18585
- h1: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { className: "text-[30px] font-semibold leading-tight text-foreground mb-3", ...props }),
18586
- h2: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { className: "text-[26px] font-semibold leading-tight text-foreground mb-2", ...props }),
18587
- h3: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h3", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
18588
- h4: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h4", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
18589
- h5: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h5", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
18590
- h6: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h6", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
18591
- p: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-[22px] leading-relaxed text-foreground my-2", ...props }),
18592
- ul: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ul", { className: "list-disc pl-7 text-[22px] leading-relaxed text-foreground my-2", ...props }),
18593
- ol: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ol", { className: "list-decimal pl-7 text-[22px] leading-relaxed text-foreground my-2", ...props }),
18656
+ h1: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h1", { className: "text-[30px] font-semibold leading-tight text-foreground mb-3", ...props }),
18657
+ h2: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "text-[26px] font-semibold leading-tight text-foreground mb-2", ...props }),
18658
+ h3: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
18659
+ h4: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h4", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
18660
+ h5: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h5", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
18661
+ h6: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h6", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
18662
+ p: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-[22px] leading-relaxed text-foreground my-2", ...props }),
18663
+ ul: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ul", { className: "list-disc pl-7 text-[22px] leading-relaxed text-foreground my-2", ...props }),
18664
+ ol: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ol", { className: "list-decimal pl-7 text-[22px] leading-relaxed text-foreground my-2", ...props }),
18594
18665
  // 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, import_jsx_runtime22.jsx)("li", { className: "my-1", ...props }),
18596
- strong: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("strong", { className: "font-semibold", ...props }),
18597
- em: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("em", { className: "italic", ...props }),
18666
+ li: ({ node: _node, ordered: _ordered, index: _index, checked: _checked, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("li", { className: "my-1", ...props }),
18667
+ strong: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("strong", { className: "font-semibold", ...props }),
18668
+ em: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("em", { className: "italic", ...props }),
18598
18669
  // Gate `<img src>` against an http(s) allowlist. react-markdown v8 percent-encodes the URL but
18599
18670
  // does NOT protocol-filter image src (unlike link href), so an LLM-authored
18600
18671
  // `![](javascript:…)` / `![](data:…)` or a tracking-pixel `![](http://…)` would otherwise render
18601
18672
  // with the raw URL. Unsafe src → render nothing.
18602
- img: ({ node: _node, src, ...props }) => typeof src === "string" && isSafeDownloadUrl(src) ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src, className: "max-w-full", ...props }) : null,
18673
+ img: ({ node: _node, src, ...props }) => typeof src === "string" && isSafeDownloadUrl(src) ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("img", { src, className: "max-w-full", ...props }) : null,
18603
18674
  a: ({ node: _node, ...props }) => (
18604
18675
  // `rel` is forced AFTER `{...props}` so it can't be overridden — if a consumer ever adds
18605
18676
  // `linkTarget="_blank"`, LLM-authored links still can't reach `window.opener`.
18606
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("a", { className: "underline underline-offset-2", ...props, rel: "noopener noreferrer" })
18677
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("a", { className: "underline underline-offset-2", ...props, rel: "noopener noreferrer" })
18607
18678
  ),
18608
18679
  // 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, import_jsx_runtime22.jsx)("code", { className: "rounded bg-muted px-1.5 py-0.5 font-mono text-[18px]", ...props }),
18610
- blockquote: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("blockquote", { className: "border-l-2 border-brown-alpha-12 pl-4 text-[22px] text-muted-foreground", ...props }),
18611
- hr: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("hr", { className: "my-4 border-brown-alpha-12", ...props }),
18612
- table: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("table", { className: "w-full border-collapse text-[20px]", ...props }) }),
18680
+ code: ({ node: _node, inline: _inline, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("code", { className: "rounded bg-muted px-1.5 py-0.5 font-mono text-[18px]", ...props }),
18681
+ blockquote: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("blockquote", { className: "border-l-2 border-brown-alpha-12 pl-4 text-[22px] text-muted-foreground", ...props }),
18682
+ hr: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("hr", { className: "my-4 border-brown-alpha-12", ...props }),
18683
+ table: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("table", { className: "w-full border-collapse text-[20px]", ...props }) }),
18613
18684
  // react-markdown passes `isHeader` to cell renderers — strip it so it never reaches the DOM.
18614
- th: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "border-b border-brown-alpha-12 px-3 py-1.5 text-left font-medium", ...props }),
18615
- td: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "border-b border-brown-alpha-12 px-3 py-1.5", ...props })
18685
+ th: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("th", { className: "border-b border-brown-alpha-12 px-3 py-1.5 text-left font-medium", ...props }),
18686
+ td: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("td", { className: "border-b border-brown-alpha-12 px-3 py-1.5", ...props })
18616
18687
  };
18617
18688
  function DeckMarkdown({ markdown }) {
18618
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default, import_remark_breaks.default], components: MARKDOWN_COMPONENTS, children: sanitize(markdown) });
18689
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default, import_remark_breaks.default], components: MARKDOWN_COMPONENTS, children: sanitize(markdown) });
18619
18690
  }
18620
18691
 
18621
18692
  // src/components/artifacts/deck-artifact/slide-renderers.tsx
18622
18693
  var import_react15 = require("react");
18623
- var import_jsx_runtime23 = require("react/jsx-runtime");
18694
+ var import_jsx_runtime25 = require("react/jsx-runtime");
18624
18695
  function safeLogoUrl(meta) {
18625
18696
  return meta?.logoUrl && isSafeDownloadUrl(meta.logoUrl) ? meta.logoUrl : null;
18626
18697
  }
@@ -18647,7 +18718,7 @@ function SlideFrame({ meta, children, accent = false, bare = false }) {
18647
18718
  const eyebrowColor = accent ? "text-white/70" : "text-brown-60";
18648
18719
  const borderColor = accent ? "border-white/20" : "border-brown-alpha-12";
18649
18720
  const logoSrc = safeLogoUrl(meta);
18650
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref: frameRef, className: `relative aspect-[16/9] w-full overflow-hidden rounded-lg ${bg}`, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
18721
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: frameRef, className: `relative aspect-[16/9] w-full overflow-hidden rounded-lg ${bg}`, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
18651
18722
  "div",
18652
18723
  {
18653
18724
  className: "absolute left-0 top-0 origin-top-left",
@@ -18658,26 +18729,26 @@ function SlideFrame({ meta, children, accent = false, bare = false }) {
18658
18729
  visibility: scale2 === null ? "hidden" : "visible"
18659
18730
  },
18660
18731
  children: [
18661
- !bare ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
18732
+ !bare ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
18662
18733
  "div",
18663
18734
  {
18664
18735
  className: `absolute inset-x-0 top-0 flex items-center justify-between border-b px-16 ${borderColor}`,
18665
18736
  style: { height: EYEBROW_H },
18666
18737
  children: [
18667
- meta?.eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: eyebrowColor, style: { ...ACCENT_FONT, fontSize: 22 }, children: meta.eyebrow }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", {}),
18668
- logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: logoSrc, alt: "", className: "object-contain", style: { maxHeight: CANVAS_LOGO_MAX_H } }) : null
18738
+ meta?.eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: eyebrowColor, style: { ...ACCENT_FONT, fontSize: 22 }, children: meta.eyebrow }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", {}),
18739
+ logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("img", { src: logoSrc, alt: "", className: "object-contain", style: { maxHeight: CANVAS_LOGO_MAX_H } }) : null
18669
18740
  ]
18670
18741
  }
18671
18742
  ) : null,
18672
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute inset-x-0 bottom-0 overflow-hidden", style: { top: bare ? 0 : EYEBROW_H }, children })
18743
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "absolute inset-x-0 bottom-0 overflow-hidden", style: { top: bare ? 0 : EYEBROW_H }, children })
18673
18744
  ]
18674
18745
  }
18675
18746
  ) });
18676
18747
  }
18677
18748
  function TitleSlide({ slide, meta }) {
18678
18749
  const logoSrc = safeLogoUrl(meta);
18679
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SlideFrame, { meta, bare: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex h-full flex-col justify-center px-24 py-16", children: [
18680
- logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
18750
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, bare: true, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex h-full flex-col justify-center px-24 py-16", children: [
18751
+ logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
18681
18752
  "img",
18682
18753
  {
18683
18754
  src: logoSrc,
@@ -18686,7 +18757,7 @@ function TitleSlide({ slide, meta }) {
18686
18757
  style: { maxHeight: 56, maxWidth: 380 }
18687
18758
  }
18688
18759
  ) : null,
18689
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
18760
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
18690
18761
  "h1",
18691
18762
  {
18692
18763
  className: "font-bold tracking-tight text-brown-100",
@@ -18694,36 +18765,36 @@ function TitleSlide({ slide, meta }) {
18694
18765
  children: slide.title
18695
18766
  }
18696
18767
  ),
18697
- slide.subtitle ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "mt-7 text-brown-70", style: { ...ACCENT_FONT, fontSize: 34 }, children: slide.subtitle }) : null,
18698
- slide.description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "mt-4 leading-relaxed text-brown-70", style: { fontSize: 24, maxWidth: 880 }, children: slide.description }) : null,
18699
- meta?.date ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "mt-10 text-brown-70", style: { ...ACCENT_FONT, fontSize: 30 }, children: meta.date }) : null
18768
+ slide.subtitle ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-7 text-brown-70", style: { ...ACCENT_FONT, fontSize: 34 }, children: slide.subtitle }) : null,
18769
+ slide.description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-4 leading-relaxed text-brown-70", style: { fontSize: 24, maxWidth: 880 }, children: slide.description }) : null,
18770
+ meta?.date ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-10 text-brown-70", style: { ...ACCENT_FONT, fontSize: 30 }, children: meta.date }) : null
18700
18771
  ] }) });
18701
18772
  }
18702
18773
  function AgendaSlide({ slide, meta, labels }) {
18703
18774
  const items = slide.items ?? [];
18704
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "h-full px-24 py-14", children: [
18705
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h2", { className: "mb-10 font-bold text-brown-90", style: { fontSize: 40 }, children: slide.title || labels.agenda }),
18706
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex flex-col", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-baseline gap-6 border-b border-brown-alpha-12 py-5", children: [
18707
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "shrink-0 text-indigo-600", style: { ...ACCENT_FONT, fontSize: 28, width: 64 }, children: String(i + 1).padStart(2, "0") }),
18708
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-brown-90", style: { fontSize: 28 }, children: item })
18775
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "h-full px-24 py-14", children: [
18776
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: "mb-10 font-bold text-brown-90", style: { fontSize: 40 }, children: slide.title || labels.agenda }),
18777
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-col", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-baseline gap-6 border-b border-brown-alpha-12 py-5", children: [
18778
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "shrink-0 text-indigo-600", style: { ...ACCENT_FONT, fontSize: 28, width: 64 }, children: String(i + 1).padStart(2, "0") }),
18779
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-brown-90", style: { fontSize: 28 }, children: item })
18709
18780
  ] }, i)) })
18710
18781
  ] }) });
18711
18782
  }
18712
18783
  function SectionSlide({ slide, meta }) {
18713
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SlideFrame, { meta, accent: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex h-full flex-col justify-center gap-6 px-24", children: [
18714
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h2", { className: "font-bold text-white", style: { fontSize: 72, lineHeight: 1.05, maxWidth: 940 }, children: slide.title }),
18715
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "mt-2 bg-white/50", style: { width: 96, height: 5 } })
18784
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, accent: true, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex h-full flex-col justify-center gap-6 px-24", children: [
18785
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: "font-bold text-white", style: { fontSize: 72, lineHeight: 1.05, maxWidth: 940 }, children: slide.title }),
18786
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mt-2 bg-white/50", style: { width: 96, height: 5 } })
18716
18787
  ] }) });
18717
18788
  }
18718
18789
  function ClosingSlide({ meta, labels }) {
18719
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex h-full flex-col items-center justify-center gap-6 px-24 text-center", children: [
18720
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h1", { className: "font-bold text-brown-100", style: { fontSize: 72 }, children: labels.thankYou }),
18721
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-indigo-600", style: { ...ACCENT_FONT, fontSize: 36 }, children: labels.questions })
18790
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex h-full flex-col items-center justify-center gap-6 px-24 text-center", children: [
18791
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h1", { className: "font-bold text-brown-100", style: { fontSize: 72 }, children: labels.thankYou }),
18792
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-indigo-600", style: { ...ACCENT_FONT, fontSize: 36 }, children: labels.questions })
18722
18793
  ] }) });
18723
18794
  }
18724
18795
 
18725
18796
  // src/components/artifacts/deck-artifact/deck-artifact-content.tsx
18726
- var import_jsx_runtime24 = require("react/jsx-runtime");
18797
+ var import_jsx_runtime26 = require("react/jsx-runtime");
18727
18798
  var TABLE_BLOCK_MAX_SHIMMER_ROWS = 10;
18728
18799
  var TABLE_CHROME_RESERVE = 56;
18729
18800
  var VISUAL_FALLBACK_HEIGHT = 360;
@@ -18753,14 +18824,14 @@ function DeckArtifactContent({
18753
18824
  [slides.length, onNavigate, isControlled, onSlideChange]
18754
18825
  );
18755
18826
  const position2 = labels.position.replace("{current}", String(current + 1)).replace("{total}", String(slides.length));
18756
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col gap-3 p-4", children: [
18757
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SlideDispatch, { slide, labels, meta }),
18758
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
18827
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-3 p-4", children: [
18828
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SlideDispatch, { slide, labels, meta }),
18829
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
18759
18830
  "div",
18760
18831
  {
18761
18832
  className: `flex items-center justify-between border-t pt-2 ${onDark ? "border-white/20" : "border-brown-alpha-12"}`,
18762
18833
  children: [
18763
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
18834
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
18764
18835
  IconButton,
18765
18836
  {
18766
18837
  icon: IconChevronLeft,
@@ -18771,8 +18842,8 @@ function DeckArtifactContent({
18771
18842
  onClick: () => goTo(current - 1)
18772
18843
  }
18773
18844
  ),
18774
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: `text-xs font-medium ${onDark ? "text-white/70" : "text-brown-70"}`, children: position2 }),
18775
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
18845
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: `text-xs font-medium ${onDark ? "text-white/70" : "text-brown-70"}`, children: position2 }),
18846
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
18776
18847
  IconButton,
18777
18848
  {
18778
18849
  icon: IconChevronRight,
@@ -18792,16 +18863,16 @@ function SlideDispatch({ slide, labels, meta }) {
18792
18863
  const kind = slide.kind ?? deckSlideKinds.CONTENT;
18793
18864
  switch (kind) {
18794
18865
  case deckSlideKinds.TITLE:
18795
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TitleSlide, { slide, meta });
18866
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TitleSlide, { slide, meta });
18796
18867
  case deckSlideKinds.AGENDA:
18797
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(AgendaSlide, { slide, meta, labels });
18868
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AgendaSlide, { slide, meta, labels });
18798
18869
  case deckSlideKinds.SECTION:
18799
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SectionSlide, { slide, meta });
18870
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SectionSlide, { slide, meta });
18800
18871
  case deckSlideKinds.CLOSING:
18801
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ClosingSlide, { meta, labels });
18872
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ClosingSlide, { meta, labels });
18802
18873
  case deckSlideKinds.CONTENT:
18803
18874
  default:
18804
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ContentSlide, { slide, meta, labels });
18875
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ContentSlide, { slide, meta, labels });
18805
18876
  }
18806
18877
  }
18807
18878
  function isVisualBlock(block) {
@@ -18814,25 +18885,25 @@ function ContentSlide({ slide, meta, labels }) {
18814
18885
  (b) => b.type === deckBlockTypes.TEXT
18815
18886
  );
18816
18887
  if (visuals.length === 1 && texts.length > 0) {
18817
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex h-full items-stretch gap-12 px-16 py-12", children: [
18818
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex w-[42%] shrink-0 flex-col overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(AutoFit, { children: [
18819
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { className: "mb-5 font-bold leading-tight text-foreground", style: { fontSize: 34 }, children: slide.title }),
18820
- texts.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DeckMarkdown, { markdown: block.markdown }, i))
18888
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex h-full items-stretch gap-12 px-16 py-12", children: [
18889
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex w-[42%] shrink-0 flex-col overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(AutoFit, { children: [
18890
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h3", { className: "mb-5 font-bold leading-tight text-foreground", style: { fontSize: 34 }, children: slide.title }),
18891
+ texts.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DeckMarkdown, { markdown: block.markdown }, i))
18821
18892
  ] }) }),
18822
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "min-h-0 min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FillVisual, { block: visuals[0], labels }) })
18893
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "min-h-0 min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FillVisual, { block: visuals[0], labels }) })
18823
18894
  ] }) });
18824
18895
  }
18825
18896
  if (visuals.length > 0) {
18826
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex h-full flex-col gap-5 px-16 py-10", children: [
18827
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { className: "shrink-0 font-bold leading-tight text-foreground", style: { fontSize: 32 }, children: slide.title }),
18897
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex h-full flex-col gap-5 px-16 py-10", children: [
18898
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h3", { className: "shrink-0 font-bold leading-tight text-foreground", style: { fontSize: 32 }, children: slide.title }),
18828
18899
  content2.map(
18829
- (block, i) => isVisualBlock(block) ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "min-h-0 min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FillVisual, { block, labels }) }, i) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "shrink-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DeckMarkdown, { markdown: block.markdown }) }, i)
18900
+ (block, i) => isVisualBlock(block) ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "min-h-0 min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FillVisual, { block, labels }) }, i) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "shrink-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DeckMarkdown, { markdown: block.markdown }) }, i)
18830
18901
  )
18831
18902
  ] }) });
18832
18903
  }
18833
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full px-24 py-12", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(AutoFit, { children: [
18834
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { className: "mb-6 font-bold leading-tight text-foreground", style: { fontSize: 38 }, children: slide.title }),
18835
- texts.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DeckMarkdown, { markdown: block.markdown }, i))
18904
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-full px-24 py-12", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(AutoFit, { children: [
18905
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h3", { className: "mb-6 font-bold leading-tight text-foreground", style: { fontSize: 38 }, children: slide.title }),
18906
+ texts.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DeckMarkdown, { markdown: block.markdown }, i))
18836
18907
  ] }) }) });
18837
18908
  }
18838
18909
  function AutoFit({ children }) {
@@ -18856,7 +18927,7 @@ function AutoFit({ children }) {
18856
18927
  return () => ro.disconnect();
18857
18928
  }, []);
18858
18929
  const scaled = fit.scale < 1;
18859
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref: boxRef, className: "flex h-full min-h-0 w-full flex-col justify-center overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { style: scaled ? { height: fit.height } : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
18930
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref: boxRef, className: "flex h-full min-h-0 w-full flex-col justify-center overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: scaled ? { height: fit.height } : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
18860
18931
  "div",
18861
18932
  {
18862
18933
  ref: contentRef,
@@ -18881,12 +18952,12 @@ function FillVisual({ block, labels }) {
18881
18952
  return () => ro.disconnect();
18882
18953
  }, []);
18883
18954
  const chartLabels = labels.chart ?? DEFAULT_CHART_ARTIFACT_LABELS;
18884
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref, className: "h-full min-h-0 w-full overflow-hidden", children: block.type === deckBlockTypes.CHART ? (
18955
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref, className: "h-full min-h-0 w-full overflow-hidden", children: block.type === deckBlockTypes.CHART ? (
18885
18956
  // ChartArtifactContent assumes a non-empty rowset (the standalone ChartArtifact guards
18886
18957
  // `rows.length > 0` upstream); mirror that guard here so an empty inline chart shows the
18887
18958
  // localized empty status instead of a blank chart area.
18888
- block.rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StatusMessage, { $tone: "info", children: chartLabels.empty }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { style: { height: height2 }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChartArtifactContent, { config: block.config, rows: block.rows, labels: chartLabels }) })
18889
- ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
18959
+ block.rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StatusMessage, { $tone: "info", children: chartLabels.empty }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { height: height2 }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChartArtifactContent, { config: block.config, rows: block.rows, labels: chartLabels }) })
18960
+ ) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
18890
18961
  TableArtifactContent,
18891
18962
  {
18892
18963
  columns: block.config.columns,
@@ -18952,7 +19023,7 @@ function isValidDeckBlock(block) {
18952
19023
  }
18953
19024
 
18954
19025
  // src/components/artifacts/deck-artifact/deck-artifact.tsx
18955
- var import_jsx_runtime25 = require("react/jsx-runtime");
19026
+ var import_jsx_runtime27 = require("react/jsx-runtime");
18956
19027
  var TITLE_CLASSES2 = "text-sm font-semibold text-foreground";
18957
19028
  function DeckArtifact({ artifact, labels, callbacks }) {
18958
19029
  const validConfig = isValidDeckConfig(artifact.config);
@@ -18993,9 +19064,9 @@ function DeckArtifact({ artifact, labels, callbacks }) {
18993
19064
  const meta = artifact.config?.meta;
18994
19065
  const handleOpenFullscreen = () => setIsFullscreen(true);
18995
19066
  const handleCloseFullscreen = () => setIsFullscreen(false);
18996
- const actions = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(ArtifactActions, { ...{ [CAPTURE_EXCLUDE_ATTRIBUTE]: "" }, children: [
18997
- showDownload ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ArtifactDownloadButton, { href: presignedUrl ?? "", label: resolvedLabels.download, onClick: handleDownload }) : null,
18998
- validConfig ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
19067
+ const actions = /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ArtifactActions, { ...{ [CAPTURE_EXCLUDE_ATTRIBUTE]: "" }, children: [
19068
+ showDownload ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactDownloadButton, { href: presignedUrl ?? "", label: resolvedLabels.download, onClick: handleDownload }) : null,
19069
+ validConfig ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
18999
19070
  IconButton,
19000
19071
  {
19001
19072
  icon: IconArrowsMaximize,
@@ -19005,22 +19076,29 @@ function DeckArtifact({ artifact, labels, callbacks }) {
19005
19076
  }
19006
19077
  ) : null
19007
19078
  ] });
19079
+ const heading = /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-2", children: [
19080
+ artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactTitle, { className: TITLE_CLASSES2, children: artifact.title }) : null,
19081
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Badge, { tone: "violet", variant: "subtle", size: "sm", className: "gap-1 py-1", children: [
19082
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { icon: IconFlask2Filled, size: 12 }),
19083
+ "Labs"
19084
+ ] })
19085
+ ] });
19008
19086
  if (!validConfig) {
19009
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
19010
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
19011
- artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ArtifactTitle, { className: TITLE_CLASSES2, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", {}),
19087
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
19088
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
19089
+ heading,
19012
19090
  actions
19013
19091
  ] }),
19014
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ArtifactContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StatusMessage, { $tone: "info", children: resolvedLabels.unavailable }) })
19092
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StatusMessage, { $tone: "info", children: resolvedLabels.unavailable }) })
19015
19093
  ] });
19016
19094
  }
19017
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
19018
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
19019
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
19020
- artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ArtifactTitle, { className: TITLE_CLASSES2, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", {}),
19095
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
19096
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
19097
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
19098
+ heading,
19021
19099
  actions
19022
19100
  ] }),
19023
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ArtifactContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
19101
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
19024
19102
  DeckArtifactContent,
19025
19103
  {
19026
19104
  slides: artifact.config.slides,
@@ -19033,7 +19111,7 @@ function DeckArtifact({ artifact, labels, callbacks }) {
19033
19111
  ) })
19034
19112
  ] }),
19035
19113
  isFullscreen && (0, import_react_dom.createPortal)(
19036
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
19114
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
19037
19115
  FullscreenOverlay,
19038
19116
  {
19039
19117
  artifact,
@@ -19057,15 +19135,15 @@ function FullscreenOverlay({
19057
19135
  onClose
19058
19136
  }) {
19059
19137
  const meta = artifact.config?.meta;
19060
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
19138
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
19061
19139
  "div",
19062
19140
  {
19063
19141
  className: "fixed inset-0 z-[2147483647] flex items-center justify-center bg-black/80",
19064
19142
  role: "dialog",
19065
19143
  "aria-modal": "true",
19066
19144
  "aria-label": resolvedLabels.exitFullscreen,
19067
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "relative", style: { width: "min(94vw, calc(82vh * 16 / 9))" }, children: [
19068
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
19145
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative", style: { width: "min(94vw, calc(82vh * 16 / 9))" }, children: [
19146
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
19069
19147
  DeckArtifactContent,
19070
19148
  {
19071
19149
  slides: artifact.config.slides,
@@ -19077,15 +19155,15 @@ function FullscreenOverlay({
19077
19155
  onDark: true
19078
19156
  }
19079
19157
  ),
19080
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
19158
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
19081
19159
  "button",
19082
19160
  {
19083
19161
  className: "absolute -top-10 right-6 flex items-center gap-1.5 text-sm text-white/80 hover:text-white",
19084
19162
  "aria-label": resolvedLabels.exitFullscreen,
19085
19163
  onClick: onClose,
19086
19164
  children: [
19087
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconArrowsMinimize, { size: 16 }),
19088
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: resolvedLabels.exitFullscreen })
19165
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconArrowsMinimize, { size: 16 }),
19166
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: resolvedLabels.exitFullscreen })
19089
19167
  ]
19090
19168
  }
19091
19169
  )
@@ -19162,7 +19240,7 @@ function useTableArtifactData(presignedUrl, columns) {
19162
19240
  }
19163
19241
 
19164
19242
  // src/components/artifacts/table-artifact/table-artifact.tsx
19165
- var import_jsx_runtime26 = require("react/jsx-runtime");
19243
+ var import_jsx_runtime28 = require("react/jsx-runtime");
19166
19244
  var TITLE_CLASSES3 = "text-sm font-semibold text-foreground";
19167
19245
  var TABLE_MAX_BODY_HEIGHT = 480;
19168
19246
  var MAX_SHIMMER_ROWS = 10;
@@ -19185,10 +19263,10 @@ function TableArtifact({ artifact, labels, callbacks }) {
19185
19263
  const onDownload = callbacks?.onDownload;
19186
19264
  const handleDownloadClick = onDownload ? () => onDownload(artifact) : void 0;
19187
19265
  if (!validConfig || !validColumns) {
19188
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
19189
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
19190
- artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactTitle, { className: TITLE_CLASSES3, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {}),
19191
- presignedUrl ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactActions, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
19266
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
19267
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
19268
+ artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactTitle, { className: TITLE_CLASSES3, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {}),
19269
+ presignedUrl ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactActions, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
19192
19270
  ArtifactDownloadButton,
19193
19271
  {
19194
19272
  href: presignedUrl,
@@ -19197,17 +19275,17 @@ function TableArtifact({ artifact, labels, callbacks }) {
19197
19275
  }
19198
19276
  ) }) : null
19199
19277
  ] }),
19200
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactContent, { className: "p-0 overflow-auto", style: { maxHeight: TABLE_MAX_BODY_HEIGHT }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StatusMessage, { $tone: "info", children: resolvedLabels.unavailable }) })
19278
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactContent, { className: "p-0 overflow-auto", style: { maxHeight: TABLE_MAX_BODY_HEIGHT }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StatusMessage, { $tone: "info", children: resolvedLabels.unavailable }) })
19201
19279
  ] });
19202
19280
  }
19203
19281
  return (
19204
19282
  // The table body owns its own scroll container (`ArtifactTable` inside `TableArtifactContent`).
19205
19283
  // Disable the outer overflow container so only one scroll context exists — this prevents
19206
19284
  // double-scroll nesting and lets `useScrollShadow` find the correct scroll ancestor.
19207
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
19208
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
19209
- artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactTitle, { className: TITLE_CLASSES3, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {}),
19210
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactActions, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
19285
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
19286
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
19287
+ artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactTitle, { className: TITLE_CLASSES3, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {}),
19288
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactActions, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
19211
19289
  ArtifactDownloadButton,
19212
19290
  {
19213
19291
  href: presignedUrl ?? "",
@@ -19216,7 +19294,7 @@ function TableArtifact({ artifact, labels, callbacks }) {
19216
19294
  }
19217
19295
  ) })
19218
19296
  ] }),
19219
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactContent, { className: "p-0 overflow-visible", style: { maxHeight: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
19297
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactContent, { className: "p-0 overflow-visible", style: { maxHeight: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
19220
19298
  TableArtifactContent,
19221
19299
  {
19222
19300
  columns: validColumns,
@@ -19259,13 +19337,13 @@ function artifactToClipboardText(artifact) {
19259
19337
  }
19260
19338
 
19261
19339
  // src/components/blocks/artifact-ref-block/artifact-ref-block.tsx
19262
- var import_jsx_runtime27 = require("react/jsx-runtime");
19340
+ var import_jsx_runtime29 = require("react/jsx-runtime");
19263
19341
  function ArtifactRefBlock({ block }) {
19264
19342
  const { artifact, labels, callbacks } = block.payload;
19265
19343
  const entry = ArtifactServices[artifact.type];
19266
19344
  if (!entry) return null;
19267
19345
  const Component = entry.Component;
19268
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Component, { artifact, labels, callbacks });
19346
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Component, { artifact, labels, callbacks });
19269
19347
  }
19270
19348
 
19271
19349
  // src/components/blocks/block-services/artifact-ref-block-service.ts
@@ -19280,26 +19358,66 @@ var ArtifactRefBlockService = {
19280
19358
  toClipboardText: (block) => artifactToClipboardText(block.payload.artifact)
19281
19359
  };
19282
19360
 
19283
- // src/utils/markdown-to-plain-text.ts
19284
- var PLACEHOLDER_PREFIX = "\u200B\u200BIC";
19285
- var PLACEHOLDER_SUFFIX = "\u200B\u200B";
19286
- var PLACEHOLDER_REGEX = new RegExp(`${PLACEHOLDER_PREFIX}(\\d+)${PLACEHOLDER_SUFFIX}`, "g");
19287
- function stripInlineMarks(text2) {
19288
- 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");
19361
+ // src/components/blocks/notification-draft-block/notification-draft-block.tsx
19362
+ var import_react20 = require("react");
19363
+
19364
+ // src/components/chat/hooks/use-copy-to-clipboard.ts
19365
+ var import_react19 = require("react");
19366
+
19367
+ // src/utils/clipboard.ts
19368
+ function copyToClipboard(text2, options) {
19369
+ navigator.clipboard.writeText(text2).then(
19370
+ () => options?.onSuccess?.(),
19371
+ (error) => options?.onFailure?.(error)
19372
+ );
19289
19373
  }
19290
- function markdownToPlainText(markdown) {
19291
- if (!markdown) return "";
19292
- const inlineCodeSnippets = [];
19293
- let result = markdown.replace(/^<!--[\s\S]*?--!?>\n?/gm, "").replace(/```[\s\S]*?```/g, "").replace(/`([^`]+)`/g, (_match, code) => {
19294
- inlineCodeSnippets.push(code);
19295
- return `${PLACEHOLDER_PREFIX}${inlineCodeSnippets.length - 1}${PLACEHOLDER_SUFFIX}`;
19296
- }).replace(/^#{1,6}\s+/gm, "").replace(/^(?:---|\*\*\*|___)\s*$/gm, "");
19297
- 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();
19298
- result = result.replace(PLACEHOLDER_REGEX, (_match, index2) => inlineCodeSnippets[Number(index2)]);
19299
- return result;
19374
+
19375
+ // src/components/chat/hooks/use-copy-to-clipboard.ts
19376
+ var RESET_DELAY_MS = 2e3;
19377
+ function useCopyToClipboard() {
19378
+ const [isCopied, setIsCopied] = (0, import_react19.useState)(false);
19379
+ const timeoutRef = (0, import_react19.useRef)(null);
19380
+ (0, import_react19.useEffect)(() => {
19381
+ return () => {
19382
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
19383
+ };
19384
+ }, []);
19385
+ const copy = (0, import_react19.useCallback)((text2) => {
19386
+ copyToClipboard(text2, {
19387
+ onSuccess: () => {
19388
+ setIsCopied(true);
19389
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
19390
+ timeoutRef.current = setTimeout(() => {
19391
+ setIsCopied(false);
19392
+ timeoutRef.current = null;
19393
+ }, RESET_DELAY_MS);
19394
+ }
19395
+ });
19396
+ }, []);
19397
+ return { isCopied, copy };
19300
19398
  }
19301
19399
 
19302
- // src/components/blocks/text-block/text-block.tsx
19400
+ // src/components/copy-button/copy-button.tsx
19401
+ var import_jsx_runtime30 = require("react/jsx-runtime");
19402
+ function CopyButton({
19403
+ text: text2,
19404
+ copyLabel = "Copy",
19405
+ copiedLabel = "Copied",
19406
+ className
19407
+ }) {
19408
+ const { isCopied, copy } = useCopyToClipboard();
19409
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
19410
+ IconButton,
19411
+ {
19412
+ icon: isCopied ? IconCheck : IconCopy,
19413
+ onClick: () => copy(text2),
19414
+ "aria-label": isCopied ? copiedLabel : copyLabel,
19415
+ className
19416
+ }
19417
+ );
19418
+ }
19419
+
19420
+ // src/components/blocks/markdown/markdown.tsx
19303
19421
  var import_react_markdown2 = __toESM(require("react-markdown"), 1);
19304
19422
  var import_remark_breaks2 = __toESM(require("remark-breaks"), 1);
19305
19423
  var import_remark_gfm2 = __toESM(require("remark-gfm"), 1);
@@ -19317,9 +19435,9 @@ var TableScroll = import_styled_components3.default.div`
19317
19435
  `;
19318
19436
 
19319
19437
  // src/components/blocks/scrollable-table/scrollable-table.tsx
19320
- var import_jsx_runtime28 = require("react/jsx-runtime");
19438
+ var import_jsx_runtime31 = require("react/jsx-runtime");
19321
19439
  function ScrollableTable({ node: _node, ...props }) {
19322
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableScroll, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("table", { ...props }) }) });
19440
+ 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
19441
  }
19324
19442
 
19325
19443
  // src/components/blocks/text-block/sanitize.ts
@@ -19462,13 +19580,157 @@ var TextBlockWrapper = import_styled_components4.default.div`
19462
19580
  }
19463
19581
  `;
19464
19582
 
19465
- // src/components/blocks/text-block/text-block.tsx
19466
- var import_jsx_runtime29 = require("react/jsx-runtime");
19583
+ // src/components/blocks/markdown/markdown.tsx
19584
+ var import_jsx_runtime32 = require("react/jsx-runtime");
19467
19585
  var markdownComponents = {
19468
- table: ((tableProps) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ScrollableTable, { ...tableProps }))
19586
+ table: ((tableProps) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ScrollableTable, { ...tableProps }))
19587
+ };
19588
+ function Markdown({ children }) {
19589
+ 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) }) });
19590
+ }
19591
+
19592
+ // src/utils/markdown-to-plain-text.ts
19593
+ var PLACEHOLDER_PREFIX = "\u200B\u200BIC";
19594
+ var PLACEHOLDER_SUFFIX = "\u200B\u200B";
19595
+ var PLACEHOLDER_REGEX = new RegExp(`${PLACEHOLDER_PREFIX}(\\d+)${PLACEHOLDER_SUFFIX}`, "g");
19596
+ function stripInlineMarks(text2) {
19597
+ 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");
19598
+ }
19599
+ function markdownToPlainText(markdown) {
19600
+ if (!markdown) return "";
19601
+ const inlineCodeSnippets = [];
19602
+ let result = markdown.replace(/^<!--[\s\S]*?--!?>\n?/gm, "").replace(/```[\s\S]*?```/g, "").replace(/`([^`]+)`/g, (_match, code) => {
19603
+ inlineCodeSnippets.push(code);
19604
+ return `${PLACEHOLDER_PREFIX}${inlineCodeSnippets.length - 1}${PLACEHOLDER_SUFFIX}`;
19605
+ }).replace(/^#{1,6}\s+/gm, "").replace(/^(?:---|\*\*\*|___)\s*$/gm, "");
19606
+ 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();
19607
+ result = result.replace(PLACEHOLDER_REGEX, (_match, index2) => inlineCodeSnippets[Number(index2)]);
19608
+ return result;
19609
+ }
19610
+
19611
+ // src/components/blocks/notification-draft-block/types.ts
19612
+ var notificationChannels = {
19613
+ /** Branded email — renders a From/subject header. */
19614
+ EMAIL: "email",
19615
+ /** Slack DM — renders as a chat bubble, no subject. */
19616
+ SLACK: "slack",
19617
+ /** Microsoft Teams DM — renders as a chat bubble, no subject. */
19618
+ TEAMS: "teams"
19619
+ };
19620
+ var notificationEmailTypes = {
19621
+ /** Recipient's work email. */
19622
+ WORK: "work",
19623
+ /** Recipient's personal email. */
19624
+ PERSONAL: "personal"
19469
19625
  };
19626
+
19627
+ // src/components/blocks/notification-draft-block/to-text.ts
19628
+ function notificationDraftToText(payload) {
19629
+ const { channel, subject, body } = payload;
19630
+ const text2 = markdownToPlainText(body);
19631
+ return channel === notificationChannels.EMAIL && subject ? `${subject}
19632
+
19633
+ ${text2}` : text2;
19634
+ }
19635
+
19636
+ // src/components/blocks/notification-draft-block/notification-draft-block.tsx
19637
+ var import_jsx_runtime33 = require("react/jsx-runtime");
19638
+ var CHIP_LIMIT = 3;
19639
+ var RECIPIENTS_MAX_HEIGHT = 320;
19640
+ function chipLabel(recipient) {
19641
+ return recipient.name ?? recipient.email ?? recipient.employeeId;
19642
+ }
19643
+ function channelCellText(recipient) {
19644
+ return recipient.fallback ? `${recipient.channelLabel} (fallback)` : recipient.channelLabel;
19645
+ }
19646
+ function FieldLabel({ children }) {
19647
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-geist-label-caption-medium tracking-wide text-brown-60", children });
19648
+ }
19649
+ function RecipientChips({ recipients }) {
19650
+ const shown = recipients.slice(0, CHIP_LIMIT);
19651
+ const overflow = recipients.length - shown.length;
19652
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5", children: [
19653
+ shown.map((recipient) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Badge, { variant: "outline", children: chipLabel(recipient) }, recipient.employeeId)),
19654
+ overflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Badge, { variant: "subtle", children: `+${overflow}` })
19655
+ ] });
19656
+ }
19657
+ function RecipientsTable({ recipients }) {
19658
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
19659
+ DataTable,
19660
+ {
19661
+ maxBodyHeight: RECIPIENTS_MAX_HEIGHT,
19662
+ header: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TableRow, { className: "hover:bg-transparent", children: [
19663
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHead, { scope: "col", className: DATA_TABLE_HEAD_CLASS, children: "Name" }),
19664
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHead, { scope: "col", className: DATA_TABLE_HEAD_CLASS, children: "Email" }),
19665
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHead, { scope: "col", className: DATA_TABLE_HEAD_CLASS, children: "Channel" })
19666
+ ] }),
19667
+ children: recipients.map((recipient) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TableRow, { className: DATA_TABLE_ROW_CLASS, children: [
19668
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: recipient.name ?? "\u2014" }),
19669
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: recipient.email ?? "\u2014" }),
19670
+ /* @__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) }) })
19671
+ ] }, recipient.employeeId))
19672
+ }
19673
+ );
19674
+ }
19675
+ function NotificationDraftBlock({ block }) {
19676
+ const { channel, subject, body, recipients } = block.payload;
19677
+ const [detailsOpen, setDetailsOpen] = (0, import_react20.useState)(false);
19678
+ const showSubject = channel === notificationChannels.EMAIL && subject;
19679
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "overflow-hidden rounded-2xl border border-brown-30 bg-white", children: [
19680
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-3 border-b border-brown-30 px-4 py-3", children: [
19681
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
19682
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2", children: [
19683
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-geist-body-s-semi-bold text-brown-100", children: "Notification draft" }),
19684
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Badge, { tone: "violet", variant: "subtle", size: "sm", className: "gap-1 py-1", children: [
19685
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { icon: IconFlask2Filled, size: 12 }),
19686
+ "Labs"
19687
+ ] })
19688
+ ] }),
19689
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CopyButton, { text: notificationDraftToText(block.payload), copyLabel: "Copy draft", copiedLabel: "Copied" })
19690
+ ] }),
19691
+ showSubject && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
19692
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FieldLabel, { children: "Title" }),
19693
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-geist-body-s-medium text-brown-100", children: subject })
19694
+ ] }),
19695
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-1", children: [
19696
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
19697
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FieldLabel, { children: `Recipients (${recipients.length})` }),
19698
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
19699
+ "button",
19700
+ {
19701
+ type: "button",
19702
+ "aria-expanded": detailsOpen,
19703
+ onClick: () => setDetailsOpen((open) => !open),
19704
+ className: "inline-flex items-center gap-1 text-geist-label-caption-medium text-brown-70 transition-colors hover:text-brown-100",
19705
+ children: [
19706
+ "Details",
19707
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { icon: IconChevronDown, size: 14, className: detailsOpen ? "rotate-180" : void 0 })
19708
+ ]
19709
+ }
19710
+ )
19711
+ ] }),
19712
+ detailsOpen ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RecipientsTable, { recipients }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RecipientChips, { recipients })
19713
+ ] })
19714
+ ] }),
19715
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Markdown, { children: body }) })
19716
+ ] });
19717
+ }
19718
+
19719
+ // src/components/blocks/block-services/notification-draft-block-service.ts
19720
+ var NotificationDraftBlockService = {
19721
+ type: blockTypes.NOTIFICATION_DRAFT,
19722
+ Component: NotificationDraftBlock,
19723
+ /**
19724
+ * Plain-text clipboard form of the drafted notification — shared with the in-block copy button
19725
+ * via {@link notificationDraftToText} so both copy the same text.
19726
+ */
19727
+ toClipboardText: (block) => notificationDraftToText(block.payload)
19728
+ };
19729
+
19730
+ // src/components/blocks/text-block/text-block.tsx
19731
+ var import_jsx_runtime34 = require("react/jsx-runtime");
19470
19732
  function TextBlock({ block }) {
19471
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TextBlockWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_markdown2.default, { remarkPlugins: [import_remark_gfm2.default, import_remark_breaks2.default], components: markdownComponents, children: sanitize2(block.payload.text) }) });
19733
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Markdown, { children: block.payload.text });
19472
19734
  }
19473
19735
 
19474
19736
  // src/components/blocks/block-services/text-block-service.ts
@@ -19486,30 +19748,31 @@ var TextBlockService = {
19486
19748
  // src/components/blocks/block-services/index.ts
19487
19749
  var BlockServices = {
19488
19750
  [blockTypes.TEXT]: TextBlockService,
19489
- [blockTypes.ARTIFACT_REF]: ArtifactRefBlockService
19751
+ [blockTypes.ARTIFACT_REF]: ArtifactRefBlockService,
19752
+ [blockTypes.NOTIFICATION_DRAFT]: NotificationDraftBlockService
19490
19753
  };
19491
19754
 
19492
19755
  // src/components/blocks/block/block.tsx
19493
- var import_jsx_runtime30 = require("react/jsx-runtime");
19756
+ var import_jsx_runtime35 = require("react/jsx-runtime");
19494
19757
  function Block({ block }) {
19495
19758
  const service = BlockServices[block.type];
19496
19759
  if (!service) return null;
19497
19760
  const { Component } = service;
19498
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Component, { block });
19761
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Component, { block });
19499
19762
  }
19500
19763
 
19501
19764
  // src/components/blocks/block-context/block-context.tsx
19502
- var import_react19 = require("react");
19503
- var BlockContext = (0, import_react19.createContext)(null);
19765
+ var import_react21 = require("react");
19766
+ var BlockContext = (0, import_react21.createContext)(null);
19504
19767
  function useBlockContext() {
19505
- return (0, import_react19.useContext)(BlockContext) ?? {};
19768
+ return (0, import_react21.useContext)(BlockContext) ?? {};
19506
19769
  }
19507
19770
 
19508
19771
  // src/components/ai-elements/prompt-input/prompt-input.tsx
19509
- var import_react22 = require("react");
19772
+ var import_react24 = require("react");
19510
19773
 
19511
19774
  // src/components/button/button.tsx
19512
- var import_react20 = require("react");
19775
+ var import_react22 = require("react");
19513
19776
 
19514
19777
  // src/components/button/button-styles.ts
19515
19778
  var import_styled_components5 = __toESM(require("styled-components"), 1);
@@ -19632,8 +19895,8 @@ var StyledButton = import_styled_components5.default.button`
19632
19895
  `;
19633
19896
 
19634
19897
  // src/components/button/button.tsx
19635
- var import_jsx_runtime31 = require("react/jsx-runtime");
19636
- var Button2 = (0, import_react20.forwardRef)(function Button3({
19898
+ var import_jsx_runtime36 = require("react/jsx-runtime");
19899
+ var Button2 = (0, import_react22.forwardRef)(function Button3({
19637
19900
  children,
19638
19901
  variant = BUTTON_VARIANT.SOLID,
19639
19902
  intent = BUTTON_INTENT.PRIMARY,
@@ -19645,8 +19908,8 @@ var Button2 = (0, import_react20.forwardRef)(function Button3({
19645
19908
  className,
19646
19909
  "aria-label": ariaLabel
19647
19910
  }, ref) {
19648
- const iconElement = icon ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { icon, size: 16 }) : null;
19649
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
19911
+ const iconElement = icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { icon, size: 16 }) : null;
19912
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
19650
19913
  StyledButton,
19651
19914
  {
19652
19915
  ref,
@@ -19660,7 +19923,7 @@ var Button2 = (0, import_react20.forwardRef)(function Button3({
19660
19923
  "aria-label": ariaLabel,
19661
19924
  children: [
19662
19925
  iconPosition === ICON_POSITION.LEADING && iconElement,
19663
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children }),
19926
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children }),
19664
19927
  iconPosition === ICON_POSITION.TRAILING && iconElement
19665
19928
  ]
19666
19929
  }
@@ -19668,7 +19931,7 @@ var Button2 = (0, import_react20.forwardRef)(function Button3({
19668
19931
  });
19669
19932
 
19670
19933
  // src/components/text-area/text-area.tsx
19671
- var import_react21 = require("react");
19934
+ var import_react23 = require("react");
19672
19935
 
19673
19936
  // src/utils/merge-refs.ts
19674
19937
  function mergeRefs(...refs) {
@@ -19709,23 +19972,23 @@ var StyledTextArea = import_styled_components6.default.textarea`
19709
19972
  `;
19710
19973
 
19711
19974
  // src/components/text-area/text-area.tsx
19712
- var import_jsx_runtime32 = require("react/jsx-runtime");
19713
- var TextArea = (0, import_react21.forwardRef)(function TextArea2({ value: value2, onChange, placeholder, maxHeight, rows = 1, autoFocus, onKeyDown, disabled, className }, externalRef) {
19714
- const internalRef = (0, import_react21.useRef)(null);
19715
- (0, import_react21.useLayoutEffect)(() => {
19975
+ var import_jsx_runtime37 = require("react/jsx-runtime");
19976
+ var TextArea = (0, import_react23.forwardRef)(function TextArea2({ value: value2, onChange, placeholder, maxHeight, rows = 1, autoFocus, onKeyDown, disabled, className }, externalRef) {
19977
+ const internalRef = (0, import_react23.useRef)(null);
19978
+ (0, import_react23.useLayoutEffect)(() => {
19716
19979
  const el = internalRef.current;
19717
19980
  if (el) {
19718
19981
  el.style.height = "auto";
19719
19982
  el.style.height = `${el.scrollHeight}px`;
19720
19983
  }
19721
19984
  }, [value2]);
19722
- const handleChange = (0, import_react21.useCallback)(
19985
+ const handleChange = (0, import_react23.useCallback)(
19723
19986
  (e) => {
19724
19987
  onChange(e.target.value);
19725
19988
  },
19726
19989
  [onChange]
19727
19990
  );
19728
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19991
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
19729
19992
  StyledTextArea,
19730
19993
  {
19731
19994
  ref: mergeRefs(internalRef, externalRef),
@@ -19751,9 +20014,9 @@ var CHAT_STATUS = {
19751
20014
  };
19752
20015
 
19753
20016
  // src/components/ai-elements/prompt-input/prompt-input.tsx
19754
- var import_jsx_runtime33 = require("react/jsx-runtime");
20017
+ var import_jsx_runtime38 = require("react/jsx-runtime");
19755
20018
  var PromptInput = ({ className, onSubmit, disabled, children, ...props }) => {
19756
- const handleSubmit = (0, import_react22.useCallback)(
20019
+ const handleSubmit = (0, import_react24.useCallback)(
19757
20020
  (event) => {
19758
20021
  event.preventDefault();
19759
20022
  if (disabled) {
@@ -19768,7 +20031,7 @@ var PromptInput = ({ className, onSubmit, disabled, children, ...props }) => {
19768
20031
  },
19769
20032
  [disabled, onSubmit]
19770
20033
  );
19771
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20034
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
19772
20035
  "form",
19773
20036
  {
19774
20037
  className: cn(
@@ -19781,9 +20044,9 @@ var PromptInput = ({ className, onSubmit, disabled, children, ...props }) => {
19781
20044
  }
19782
20045
  );
19783
20046
  };
19784
- var PromptInputTextarea = (0, import_react22.forwardRef)(
20047
+ var PromptInputTextarea = (0, import_react24.forwardRef)(
19785
20048
  function PromptInputTextarea2({ className, onKeyDown, placeholder = "What would you like to know?", ...props }, ref) {
19786
- const handleKeyDown = (0, import_react22.useCallback)(
20049
+ const handleKeyDown = (0, import_react24.useCallback)(
19787
20050
  (event) => {
19788
20051
  onKeyDown?.(event);
19789
20052
  if (event.defaultPrevented) {
@@ -19796,21 +20059,21 @@ var PromptInputTextarea = (0, import_react22.forwardRef)(
19796
20059
  },
19797
20060
  [onKeyDown]
19798
20061
  );
19799
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("py-3", className), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TextArea, { ref, className: "px-4", onKeyDown: handleKeyDown, placeholder, ...props }) });
20062
+ 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
20063
  }
19801
20064
  );
19802
- var PromptInputFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("flex items-center justify-between gap-1 px-4 pb-3", className), ...props });
19803
- var PromptInputTools = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("flex min-w-0 items-center gap-1", className), ...props });
20065
+ 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 });
20066
+ var PromptInputTools = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("flex min-w-0 items-center gap-1", className), ...props });
19804
20067
  var PromptInputSubmit = ({
19805
20068
  label = "Submit",
19806
20069
  status = CHAT_STATUS.READY,
19807
20070
  disabled,
19808
20071
  className
19809
20072
  }) => {
19810
- const handleClick = (0, import_react22.useCallback)((event) => {
20073
+ const handleClick = (0, import_react24.useCallback)((event) => {
19811
20074
  event.currentTarget.form?.requestSubmit();
19812
20075
  }, []);
19813
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20076
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
19814
20077
  Button2,
19815
20078
  {
19816
20079
  intent: status === CHAT_STATUS.ERROR ? BUTTON_INTENT.ERROR : BUTTON_INTENT.PRIMARY,
@@ -19824,7 +20087,7 @@ var PromptInputSubmit = ({
19824
20087
  };
19825
20088
 
19826
20089
  // src/components/ai-elements/mouse-grid/mouse-grid.tsx
19827
- var import_react23 = require("react");
20090
+ var import_react25 = require("react");
19828
20091
 
19829
20092
  // src/utils/prefers-reduced-motion.ts
19830
20093
  function prefersReducedMotion() {
@@ -19832,11 +20095,11 @@ function prefersReducedMotion() {
19832
20095
  }
19833
20096
 
19834
20097
  // src/components/ai-elements/mouse-grid/mouse-grid.tsx
19835
- var import_jsx_runtime34 = require("react/jsx-runtime");
20098
+ var import_jsx_runtime39 = require("react/jsx-runtime");
19836
20099
  function MouseGrid({ glowColor, colorCycleMs = 4e3, autoDrift = false } = {}) {
19837
- const layerRef = (0, import_react23.useRef)(null);
19838
- const glowRef = (0, import_react23.useRef)(null);
19839
- (0, import_react23.useEffect)(() => {
20100
+ const layerRef = (0, import_react25.useRef)(null);
20101
+ const glowRef = (0, import_react25.useRef)(null);
20102
+ (0, import_react25.useEffect)(() => {
19840
20103
  const driftEnabled = autoDrift && !prefersReducedMotion();
19841
20104
  let raf = 0;
19842
20105
  let driftRaf = 0;
@@ -19937,7 +20200,7 @@ function MouseGrid({ glowColor, colorCycleMs = 4e3, autoDrift = false } = {}) {
19937
20200
  }, [autoDrift]);
19938
20201
  const colorList = Array.isArray(glowColor) ? glowColor : glowColor != null ? [glowColor] : [];
19939
20202
  const glowColorsKey = JSON.stringify(colorList);
19940
- (0, import_react23.useEffect)(() => {
20203
+ (0, import_react25.useEffect)(() => {
19941
20204
  const glow = glowRef.current;
19942
20205
  if (!glow) {
19943
20206
  return;
@@ -19964,19 +20227,19 @@ function MouseGrid({ glowColor, colorCycleMs = 4e3, autoDrift = false } = {}) {
19964
20227
  clearColor();
19965
20228
  };
19966
20229
  }, [glowColorsKey, colorCycleMs]);
19967
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ref: layerRef, "aria-hidden": "true", className: "vibe-mouse-grid-layer", children: [
19968
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "vibe-mouse-grid" }),
19969
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref: glowRef, className: "vibe-mouse-glow" })
20230
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref: layerRef, "aria-hidden": "true", className: "vibe-mouse-grid-layer", children: [
20231
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "vibe-mouse-grid" }),
20232
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref: glowRef, className: "vibe-mouse-glow" })
19970
20233
  ] });
19971
20234
  }
19972
20235
 
19973
20236
  // src/components/ai-elements/suggestion/suggestion.tsx
19974
- var import_react24 = require("react");
19975
- var import_jsx_runtime35 = require("react/jsx-runtime");
19976
- var Suggestions = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("flex flex-wrap items-center justify-center gap-3", className), ...props });
20237
+ var import_react26 = require("react");
20238
+ var import_jsx_runtime40 = require("react/jsx-runtime");
20239
+ 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
20240
  var Suggestion = ({ suggestion, onClick, className, children, ...props }) => {
19978
- const handleClick = (0, import_react24.useCallback)(() => onClick?.(suggestion), [onClick, suggestion]);
19979
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20241
+ const handleClick = (0, import_react26.useCallback)(() => onClick?.(suggestion), [onClick, suggestion]);
20242
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
19980
20243
  "button",
19981
20244
  {
19982
20245
  type: "button",
@@ -19992,7 +20255,7 @@ var Suggestion = ({ suggestion, onClick, className, children, ...props }) => {
19992
20255
  };
19993
20256
 
19994
20257
  // src/components/chat/chat-message/chat-message.tsx
19995
- var import_react28 = require("react");
20258
+ var import_react29 = require("react");
19996
20259
 
19997
20260
  // src/components/chat/hooks/copy-message-text.ts
19998
20261
  function copyMessageText(message) {
@@ -20009,55 +20272,19 @@ function copyMessageText(message) {
20009
20272
  }
20010
20273
 
20011
20274
  // src/components/chat/chat-message-actions/chat-message-actions.tsx
20012
- var import_react27 = require("react");
20275
+ var import_react28 = require("react");
20013
20276
 
20014
20277
  // src/components/chat/chat-context/chat-context.ts
20015
- var import_react25 = require("react");
20016
- var ChatContext = (0, import_react25.createContext)(null);
20278
+ var import_react27 = require("react");
20279
+ var ChatContext = (0, import_react27.createContext)(null);
20017
20280
  function useChatContext() {
20018
- const context = (0, import_react25.useContext)(ChatContext);
20281
+ const context = (0, import_react27.useContext)(ChatContext);
20019
20282
  if (!context) {
20020
20283
  throw new Error("useChatContext must be used within a Chat.Root component");
20021
20284
  }
20022
20285
  return context;
20023
20286
  }
20024
20287
 
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
20288
  // src/components/chat/constants.ts
20062
20289
  var MESSAGE_ROLE = {
20063
20290
  USER: "user",
@@ -20083,24 +20310,24 @@ var AnimatedAction = import_styled_components7.default.div`
20083
20310
  `;
20084
20311
 
20085
20312
  // src/components/chat/chat-message-actions/chat-message-actions.tsx
20086
- var import_jsx_runtime36 = require("react/jsx-runtime");
20313
+ var import_jsx_runtime41 = require("react/jsx-runtime");
20087
20314
  function ChatMessageActions({ className, messageId, content: content2, role, isHelpful }) {
20088
20315
  const { onCopyMessage, onThumbUpClick, onThumbDownClick } = useChatContext();
20089
20316
  const { isCopied, copy } = useCopyToClipboard();
20090
- const handleCopy = (0, import_react27.useCallback)(() => {
20317
+ const handleCopy = (0, import_react28.useCallback)(() => {
20091
20318
  copy(content2);
20092
20319
  onCopyMessage?.(messageId);
20093
20320
  }, [content2, messageId, copy, onCopyMessage]);
20094
- const handleThumbUp = (0, import_react27.useCallback)(() => {
20321
+ const handleThumbUp = (0, import_react28.useCallback)(() => {
20095
20322
  onThumbUpClick?.(messageId, isHelpful === true ? null : true);
20096
20323
  }, [messageId, isHelpful, onThumbUpClick]);
20097
- const handleThumbDown = (0, import_react27.useCallback)(() => {
20324
+ const handleThumbDown = (0, import_react28.useCallback)(() => {
20098
20325
  onThumbDownClick?.(messageId, isHelpful === false ? null : false);
20099
20326
  }, [messageId, isHelpful, onThumbDownClick]);
20100
20327
  const isAssistant = role === MESSAGE_ROLE.ASSISTANT;
20101
20328
  const hasFeedback = isAssistant && (onThumbUpClick || onThumbDownClick);
20102
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(ActionsContainer, { $role: role, className, children: [
20103
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
20329
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(ActionsContainer, { $role: role, className, children: [
20330
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
20104
20331
  IconButton,
20105
20332
  {
20106
20333
  icon: isCopied ? IconCheck : IconCopy,
@@ -20108,7 +20335,7 @@ function ChatMessageActions({ className, messageId, content: content2, role, isH
20108
20335
  "aria-label": isCopied ? "Copied" : "Copy message"
20109
20336
  }
20110
20337
  ),
20111
- hasFeedback && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AnimatedAction, { $visible: isHelpful !== false, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
20338
+ hasFeedback && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AnimatedAction, { $visible: isHelpful !== false, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
20112
20339
  IconButton,
20113
20340
  {
20114
20341
  icon: IconThumbUp,
@@ -20117,7 +20344,7 @@ function ChatMessageActions({ className, messageId, content: content2, role, isH
20117
20344
  "aria-label": "Good response"
20118
20345
  }
20119
20346
  ) }),
20120
- hasFeedback && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AnimatedAction, { $visible: isHelpful !== true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
20347
+ hasFeedback && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AnimatedAction, { $visible: isHelpful !== true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
20121
20348
  IconButton,
20122
20349
  {
20123
20350
  icon: IconThumbDown,
@@ -20168,12 +20395,12 @@ var MessageBubble = import_styled_components8.default.div`
20168
20395
  `;
20169
20396
 
20170
20397
  // src/components/chat/chat-message/chat-message.tsx
20171
- var import_jsx_runtime37 = require("react/jsx-runtime");
20398
+ var import_jsx_runtime42 = require("react/jsx-runtime");
20172
20399
  function ChatMessage({ message }) {
20173
- const clipboardText = (0, import_react28.useMemo)(() => copyMessageText(message), [message]);
20174
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MessageRow, { $role: message.role, role: "article", "aria-label": `${message.role} message`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(MessageContainer, { $role: message.role, children: [
20175
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MessageBubble, { $role: message.role, "data-testid": "message-bubble", children: message.blocks.map((block, index2) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Block, { block }, index2)) }),
20176
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20400
+ const clipboardText = (0, import_react29.useMemo)(() => copyMessageText(message), [message]);
20401
+ 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: [
20402
+ /* @__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)) }),
20403
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
20177
20404
  ChatMessageActions,
20178
20405
  {
20179
20406
  messageId: message.id,
@@ -20233,21 +20460,21 @@ var Key = import_styled_components9.default.kbd`
20233
20460
  `;
20234
20461
 
20235
20462
  // src/components/keyboard-shortcut/keyboard-shortcut.tsx
20236
- var import_jsx_runtime38 = require("react/jsx-runtime");
20463
+ var import_jsx_runtime43 = require("react/jsx-runtime");
20237
20464
  function KeyboardShortcut({
20238
20465
  keys,
20239
20466
  variant = KEYBOARD_SHORTCUT_VARIANTS.OUTLINED,
20240
20467
  adaptive = false,
20241
20468
  className
20242
20469
  }) {
20243
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Wrapper, { className, children: keys.map((KeyComponent, index2) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Key, { $variant: variant, $adaptive: adaptive, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { icon: KeyComponent, size: 12 }) }, index2)) });
20470
+ 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
20471
  }
20245
20472
 
20246
20473
  // src/components/keyboard-shortcut/icons/icon-ctrl.tsx
20247
- var import_jsx_runtime39 = require("react/jsx-runtime");
20474
+ var import_jsx_runtime44 = require("react/jsx-runtime");
20248
20475
  function IconCtrl(props) {
20249
20476
  const { width: width2 = 24, height: height2 = 24, ...rest } = props;
20250
- return /* @__PURE__ */ (0, import_jsx_runtime39.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_runtime39.jsx)(
20477
+ 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
20478
  "text",
20252
20479
  {
20253
20480
  x: "50%",
@@ -20264,7 +20491,7 @@ function IconCtrl(props) {
20264
20491
  }
20265
20492
 
20266
20493
  // src/components/lottie/lottie.tsx
20267
- var import_react30 = require("react");
20494
+ var import_react31 = require("react");
20268
20495
 
20269
20496
  // src/components/lottie/lottie-styles.ts
20270
20497
  var import_styled_components10 = __toESM(require("styled-components"), 1);
@@ -20280,7 +20507,7 @@ var LottieContainer = import_styled_components10.default.div`
20280
20507
  `;
20281
20508
 
20282
20509
  // src/components/lottie/use-lottie.ts
20283
- var import_react29 = require("react");
20510
+ var import_react30 = require("react");
20284
20511
  var import_lottie_web = __toESM(require_lottie(), 1);
20285
20512
  function useLottie({
20286
20513
  animationData: animationData2,
@@ -20295,17 +20522,17 @@ function useLottie({
20295
20522
  onLoopComplete,
20296
20523
  onEnterFrame
20297
20524
  }) {
20298
- const containerRef = (0, import_react29.useRef)(null);
20299
- const animationRef = (0, import_react29.useRef)(null);
20300
- const onAnimationLoadedRef = (0, import_react29.useRef)(onAnimationLoaded);
20301
- const onCompleteRef = (0, import_react29.useRef)(onComplete);
20302
- const onLoopCompleteRef = (0, import_react29.useRef)(onLoopComplete);
20303
- const onEnterFrameRef = (0, import_react29.useRef)(onEnterFrame);
20525
+ const containerRef = (0, import_react30.useRef)(null);
20526
+ const animationRef = (0, import_react30.useRef)(null);
20527
+ const onAnimationLoadedRef = (0, import_react30.useRef)(onAnimationLoaded);
20528
+ const onCompleteRef = (0, import_react30.useRef)(onComplete);
20529
+ const onLoopCompleteRef = (0, import_react30.useRef)(onLoopComplete);
20530
+ const onEnterFrameRef = (0, import_react30.useRef)(onEnterFrame);
20304
20531
  onAnimationLoadedRef.current = onAnimationLoaded;
20305
20532
  onCompleteRef.current = onComplete;
20306
20533
  onLoopCompleteRef.current = onLoopComplete;
20307
20534
  onEnterFrameRef.current = onEnterFrame;
20308
- (0, import_react29.useEffect)(() => {
20535
+ (0, import_react30.useEffect)(() => {
20309
20536
  if (!containerRef.current) return;
20310
20537
  const anim = import_lottie_web.default.loadAnimation({
20311
20538
  container: containerRef.current,
@@ -20397,8 +20624,8 @@ function createLottieRef(animationRef) {
20397
20624
  }
20398
20625
 
20399
20626
  // src/components/lottie/lottie.tsx
20400
- var import_jsx_runtime40 = require("react/jsx-runtime");
20401
- var Lottie = (0, import_react30.forwardRef)(function Lottie2({
20627
+ var import_jsx_runtime45 = require("react/jsx-runtime");
20628
+ var Lottie = (0, import_react31.forwardRef)(function Lottie2({
20402
20629
  animationData: animationData2,
20403
20630
  autoplay,
20404
20631
  loop,
@@ -20428,8 +20655,8 @@ var Lottie = (0, import_react30.forwardRef)(function Lottie2({
20428
20655
  onLoopComplete,
20429
20656
  onEnterFrame
20430
20657
  });
20431
- (0, import_react30.useImperativeHandle)(ref, () => createLottieRef(animationRef), [animationRef]);
20432
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
20658
+ (0, import_react31.useImperativeHandle)(ref, () => createLottieRef(animationRef), [animationRef]);
20659
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
20433
20660
  LottieContainer,
20434
20661
  {
20435
20662
  ref: containerRef,
@@ -20523,6 +20750,7 @@ function convertTableToCSV(table) {
20523
20750
  BUTTON_INTENT,
20524
20751
  BUTTON_SIZE,
20525
20752
  BUTTON_VARIANT,
20753
+ Badge,
20526
20754
  Block,
20527
20755
  BlockContext,
20528
20756
  BlockServices,
@@ -20531,6 +20759,7 @@ function convertTableToCSV(table) {
20531
20759
  ChartArtifact,
20532
20760
  ChatContext,
20533
20761
  ChatMessage,
20762
+ CopyButton,
20534
20763
  DEFAULT_CHART_ARTIFACT_LABELS,
20535
20764
  DEFAULT_DECK_ARTIFACT_LABELS,
20536
20765
  DEFAULT_TABLE_ARTIFACT_LABELS,
@@ -20544,6 +20773,8 @@ function convertTableToCSV(table) {
20544
20773
  Lottie,
20545
20774
  MESSAGE_ROLE,
20546
20775
  MouseGrid,
20776
+ NotificationDraftBlock,
20777
+ NotificationDraftBlockService,
20547
20778
  PromptInput,
20548
20779
  PromptInputFooter,
20549
20780
  PromptInputSubmit,
@@ -20567,6 +20798,8 @@ function convertTableToCSV(table) {
20567
20798
  isSafeDownloadUrl,
20568
20799
  markdownToPlainText,
20569
20800
  mergeRefs,
20801
+ notificationChannels,
20802
+ notificationEmailTypes,
20570
20803
  parseMarkdownTable,
20571
20804
  typographyMixin,
20572
20805
  typographyStyles,
@@ -20593,6 +20826,7 @@ lottie-web/build/player/lottie.js:
20593
20826
  @tabler/icons-react/dist/esm/icons/IconArrowsMaximize.mjs:
20594
20827
  @tabler/icons-react/dist/esm/icons/IconArrowsMinimize.mjs:
20595
20828
  @tabler/icons-react/dist/esm/icons/IconCheck.mjs:
20829
+ @tabler/icons-react/dist/esm/icons/IconChevronDown.mjs:
20596
20830
  @tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs:
20597
20831
  @tabler/icons-react/dist/esm/icons/IconChevronRight.mjs:
20598
20832
  @tabler/icons-react/dist/esm/icons/IconCopy.mjs:
@@ -20602,6 +20836,7 @@ lottie-web/build/player/lottie.js:
20602
20836
  @tabler/icons-react/dist/esm/icons/IconPhoto.mjs:
20603
20837
  @tabler/icons-react/dist/esm/icons/IconThumbDown.mjs:
20604
20838
  @tabler/icons-react/dist/esm/icons/IconThumbUp.mjs:
20839
+ @tabler/icons-react/dist/esm/icons/IconFlask2Filled.mjs:
20605
20840
  @tabler/icons-react/dist/esm/tabler-icons-react.mjs:
20606
20841
  (**
20607
20842
  * @license @tabler/icons-react v3.37.1 - MIT