@shapesos/clay 0.13.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/ai-elements.cjs +982 -0
  2. package/dist/ai-elements.cjs.map +1 -0
  3. package/dist/ai-elements.d.cts +164 -0
  4. package/dist/ai-elements.d.ts +164 -0
  5. package/dist/ai-elements.js +31 -0
  6. package/dist/ai-elements.js.map +1 -0
  7. package/dist/artifacts.cjs +56 -11
  8. package/dist/artifacts.cjs.map +1 -1
  9. package/dist/artifacts.js +6 -6
  10. package/dist/blocks.cjs +83 -28
  11. package/dist/blocks.cjs.map +1 -1
  12. package/dist/blocks.css +1 -1
  13. package/dist/blocks.js +7 -7
  14. package/dist/button.cjs +27 -17
  15. package/dist/button.cjs.map +1 -1
  16. package/dist/button.js +3 -2
  17. package/dist/chart.js +3 -3
  18. package/dist/chat.cjs +83 -28
  19. package/dist/chat.cjs.map +1 -1
  20. package/dist/chat.js +8 -8
  21. package/dist/{chunk-YSSLTXZG.js → chunk-3THOTQO3.js} +7 -7
  22. package/dist/chunk-4VE6ZXXW.js +276 -0
  23. package/dist/chunk-4VE6ZXXW.js.map +1 -0
  24. package/dist/{chunk-WPQQVKWY.js → chunk-7OYIDM42.js} +2 -2
  25. package/dist/{chunk-EDICS62G.js → chunk-B4U37WIH.js} +9 -11
  26. package/dist/chunk-B4U37WIH.js.map +1 -0
  27. package/dist/chunk-CYC2YUKU.js +1 -0
  28. package/dist/chunk-CYC2YUKU.js.map +1 -0
  29. package/dist/chunk-L75JPWGS.js +1 -0
  30. package/dist/chunk-L75JPWGS.js.map +1 -0
  31. package/dist/{chunk-QAK7NM5F.js → chunk-MDAWYZBI.js} +3 -3
  32. package/dist/{chunk-L6DUGB2E.js → chunk-PGR2MDDU.js} +16 -5
  33. package/dist/chunk-PGR2MDDU.js.map +1 -0
  34. package/dist/{chunk-OBOXCBDL.js → chunk-PYDVANWI.js} +58 -13
  35. package/dist/chunk-PYDVANWI.js.map +1 -0
  36. package/dist/{chunk-SV24ONND.js → chunk-UXT2H3FM.js} +28 -18
  37. package/dist/chunk-UXT2H3FM.js.map +1 -0
  38. package/dist/{chunk-DT44KNCV.js → chunk-XFJ6XMJZ.js} +5 -5
  39. package/dist/{chunk-QXGYMDIA.js → chunk-YZB6YXKK.js} +4 -4
  40. package/dist/icon.cjs +56 -11
  41. package/dist/icon.cjs.map +1 -1
  42. package/dist/icon.d.cts +11 -2
  43. package/dist/icon.d.ts +11 -2
  44. package/dist/icon.js +1 -1
  45. package/dist/index.cjs +757 -421
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.d.cts +4 -2
  48. package/dist/index.d.ts +4 -2
  49. package/dist/index.js +50 -28
  50. package/dist/keyboard-shortcut.cjs +15 -4
  51. package/dist/keyboard-shortcut.cjs.map +1 -1
  52. package/dist/keyboard-shortcut.d.cts +10 -3
  53. package/dist/keyboard-shortcut.d.ts +10 -3
  54. package/dist/keyboard-shortcut.js +1 -1
  55. package/dist/text-area.cjs +27 -17
  56. package/dist/text-area.cjs.map +1 -1
  57. package/dist/text-area.d.cts +2 -24
  58. package/dist/text-area.d.ts +2 -24
  59. package/dist/text-area.js +3 -2
  60. package/dist/tokens.cjs +27 -17
  61. package/dist/tokens.cjs.map +1 -1
  62. package/dist/tokens.d.cts +6 -5
  63. package/dist/tokens.d.ts +6 -5
  64. package/dist/tokens.js +1 -1
  65. package/dist/types-CMzZsL_J.d.cts +25 -0
  66. package/dist/types-CMzZsL_J.d.ts +25 -0
  67. package/dist/utils.js +3 -3
  68. package/package.json +6 -1
  69. package/dist/chunk-EDICS62G.js.map +0 -1
  70. package/dist/chunk-L6DUGB2E.js.map +0 -1
  71. package/dist/chunk-OBOXCBDL.js.map +0 -1
  72. package/dist/chunk-SV24ONND.js.map +0 -1
  73. /package/dist/{chunk-YSSLTXZG.js.map → chunk-3THOTQO3.js.map} +0 -0
  74. /package/dist/{chunk-WPQQVKWY.js.map → chunk-7OYIDM42.js.map} +0 -0
  75. /package/dist/{chunk-QAK7NM5F.js.map → chunk-MDAWYZBI.js.map} +0 -0
  76. /package/dist/{chunk-DT44KNCV.js.map → chunk-XFJ6XMJZ.js.map} +0 -0
  77. /package/dist/{chunk-QXGYMDIA.js.map → chunk-YZB6YXKK.js.map} +0 -0
package/dist/index.cjs CHANGED
@@ -16591,6 +16591,7 @@ __export(src_exports, {
16591
16591
  BlockContext: () => BlockContext,
16592
16592
  BlockServices: () => BlockServices,
16593
16593
  Button: () => Button2,
16594
+ CHAT_STATUS: () => CHAT_STATUS,
16594
16595
  ChartArtifact: () => ChartArtifact,
16595
16596
  ChatContext: () => ChatContext,
16596
16597
  ChatMessage: () => ChatMessage,
@@ -16604,6 +16605,14 @@ __export(src_exports, {
16604
16605
  KeyboardShortcut: () => KeyboardShortcut,
16605
16606
  Lottie: () => Lottie,
16606
16607
  MESSAGE_ROLE: () => MESSAGE_ROLE,
16608
+ MouseGrid: () => MouseGrid,
16609
+ PromptInput: () => PromptInput,
16610
+ PromptInputFooter: () => PromptInputFooter,
16611
+ PromptInputSubmit: () => PromptInputSubmit,
16612
+ PromptInputTextarea: () => PromptInputTextarea,
16613
+ PromptInputTools: () => PromptInputTools,
16614
+ Suggestion: () => Suggestion,
16615
+ Suggestions: () => Suggestions,
16607
16616
  TableArtifact: () => TableArtifact,
16608
16617
  TextArea: () => TextArea,
16609
16618
  TextBlockService: () => TextBlockService,
@@ -16635,7 +16644,7 @@ init_colors();
16635
16644
  var fontFamilies = {
16636
16645
  /** Geist — primary UI font for body text, labels, headings, and display. */
16637
16646
  GEIST: "Geist",
16638
- /** Crimson Pro — editorial/serif font, always italic. Used for decorative headings and pull quotes. */
16647
+ /** Crimson Pro — editorial/serif font, mostly italic. Used for decorative headings and pull quotes. */
16639
16648
  CRIMSON_PRO: "Crimson Pro"
16640
16649
  };
16641
16650
  var typographyTypes = {
@@ -16675,14 +16684,16 @@ var typographyTypes = {
16675
16684
  GEIST_HEADING_L_BOLD: "GEIST_HEADING_L_BOLD",
16676
16685
  // Geist Display Large (36px)
16677
16686
  GEIST_DISPLAY_L_MEDIUM: "GEIST_DISPLAY_L_MEDIUM",
16678
- // Crimson Pro Body Small (16px)
16679
- CRIMSON_PRO_BODY_S_LIGHT: "CRIMSON_PRO_BODY_S_LIGHT",
16680
- // Crimson Pro Body Medium (18px)
16681
- CRIMSON_PRO_BODY_M_LIGHT: "CRIMSON_PRO_BODY_M_LIGHT",
16682
- // Crimson Pro Heading Medium (24px)
16683
- CRIMSON_PRO_HEADING_M_MEDIUM: "CRIMSON_PRO_HEADING_M_MEDIUM",
16684
- // Crimson Pro Display Extra Large (46px)
16685
- CRIMSON_PRO_DISPLAY_XL_REGULAR: "CRIMSON_PRO_DISPLAY_XL_REGULAR"
16687
+ // Crimson Pro Body Small (16px, italic)
16688
+ CRIMSON_PRO_BODY_S_LIGHT_ITALIC: "CRIMSON_PRO_BODY_S_LIGHT_ITALIC",
16689
+ // Crimson Pro Body Medium (18px, italic)
16690
+ CRIMSON_PRO_BODY_M_LIGHT_ITALIC: "CRIMSON_PRO_BODY_M_LIGHT_ITALIC",
16691
+ // Crimson Pro Heading Medium (24px, italic)
16692
+ CRIMSON_PRO_HEADING_M_MEDIUM_ITALIC: "CRIMSON_PRO_HEADING_M_MEDIUM_ITALIC",
16693
+ // Crimson Pro Display Large (40px, upright)
16694
+ CRIMSON_PRO_DISPLAY_L_REGULAR: "CRIMSON_PRO_DISPLAY_L_REGULAR",
16695
+ // Crimson Pro Display Extra Large (46px, italic)
16696
+ CRIMSON_PRO_DISPLAY_XL_REGULAR_ITALIC: "CRIMSON_PRO_DISPLAY_XL_REGULAR_ITALIC"
16686
16697
  };
16687
16698
  var typographyStyles = {
16688
16699
  // Geist Label Caption (12px)
@@ -16877,8 +16888,8 @@ var typographyStyles = {
16877
16888
  lineHeight: 44,
16878
16889
  letterSpacing: -0.72
16879
16890
  },
16880
- // Crimson Pro Body Small (16px)
16881
- [typographyTypes.CRIMSON_PRO_BODY_S_LIGHT]: {
16891
+ // Crimson Pro Body Small (16px, italic)
16892
+ [typographyTypes.CRIMSON_PRO_BODY_S_LIGHT_ITALIC]: {
16882
16893
  fontFamily: fontFamilies.CRIMSON_PRO,
16883
16894
  fontSize: 16,
16884
16895
  fontWeight: 300,
@@ -16886,8 +16897,8 @@ var typographyStyles = {
16886
16897
  letterSpacing: -0.32,
16887
16898
  fontStyle: "italic"
16888
16899
  },
16889
- // Crimson Pro Body Medium (18px)
16890
- [typographyTypes.CRIMSON_PRO_BODY_M_LIGHT]: {
16900
+ // Crimson Pro Body Medium (18px, italic)
16901
+ [typographyTypes.CRIMSON_PRO_BODY_M_LIGHT_ITALIC]: {
16891
16902
  fontFamily: fontFamilies.CRIMSON_PRO,
16892
16903
  fontSize: 18,
16893
16904
  fontWeight: 300,
@@ -16895,8 +16906,8 @@ var typographyStyles = {
16895
16906
  letterSpacing: 0,
16896
16907
  fontStyle: "italic"
16897
16908
  },
16898
- // Crimson Pro Heading Medium (24px)
16899
- [typographyTypes.CRIMSON_PRO_HEADING_M_MEDIUM]: {
16909
+ // Crimson Pro Heading Medium (24px, italic)
16910
+ [typographyTypes.CRIMSON_PRO_HEADING_M_MEDIUM_ITALIC]: {
16900
16911
  fontFamily: fontFamilies.CRIMSON_PRO,
16901
16912
  fontSize: 24,
16902
16913
  fontWeight: 400,
@@ -16904,8 +16915,16 @@ var typographyStyles = {
16904
16915
  letterSpacing: -0.48,
16905
16916
  fontStyle: "italic"
16906
16917
  },
16907
- // Crimson Pro Display Extra Large (46px)
16908
- [typographyTypes.CRIMSON_PRO_DISPLAY_XL_REGULAR]: {
16918
+ // Crimson Pro Display Large (40px, upright)
16919
+ [typographyTypes.CRIMSON_PRO_DISPLAY_L_REGULAR]: {
16920
+ fontFamily: fontFamilies.CRIMSON_PRO,
16921
+ fontSize: 40,
16922
+ fontWeight: 300,
16923
+ lineHeight: 48,
16924
+ letterSpacing: -1.6
16925
+ },
16926
+ // Crimson Pro Display Extra Large (46px, italic)
16927
+ [typographyTypes.CRIMSON_PRO_DISPLAY_XL_REGULAR_ITALIC]: {
16909
16928
  fontFamily: fontFamilies.CRIMSON_PRO,
16910
16929
  fontSize: 46,
16911
16930
  fontWeight: 400,
@@ -17149,6 +17168,59 @@ var BORDER_RADIUS = {
17149
17168
  small: 6,
17150
17169
  medium: 10
17151
17170
  };
17171
+ var intentStyles = {
17172
+ secondary: ({ $isSelected }) => import_styled_components2.css`
17173
+ background: ${$isSelected ? colors["brown-40"] : "transparent"};
17174
+ color: ${colors["brown-100"]};
17175
+
17176
+ &:hover:not(:disabled) {
17177
+ background: ${$isSelected ? colors["brown-40"] : colors["brown-20"]};
17178
+ }
17179
+
17180
+ &:active:not(:disabled) {
17181
+ background: ${colors["brown-40"]};
17182
+ }
17183
+
17184
+ &:disabled {
17185
+ color: ${colors["brown-50"]};
17186
+ background: transparent;
17187
+ }
17188
+ `,
17189
+ primary: () => import_styled_components2.css`
17190
+ background: ${colors["brown-100"]};
17191
+ color: ${colors.white};
17192
+
17193
+ &:hover:not(:disabled) {
17194
+ background: ${colors["brown-90"]};
17195
+ }
17196
+
17197
+ &:active:not(:disabled) {
17198
+ background: ${colors["brown-90"]};
17199
+ }
17200
+
17201
+ &:disabled {
17202
+ color: ${colors["brown-50"]};
17203
+ background: ${colors["brown-20"]};
17204
+ }
17205
+ `,
17206
+ error: () => import_styled_components2.css`
17207
+ background: ${colors["red-500"]};
17208
+ color: ${colors.white};
17209
+
17210
+ &:hover:not(:disabled) {
17211
+ background: ${colors["red-600"]};
17212
+ }
17213
+
17214
+ &:active:not(:disabled) {
17215
+ background: ${colors["red-600"]};
17216
+ }
17217
+
17218
+ &:disabled {
17219
+ color: ${colors["red-200"]};
17220
+ background: ${colors["red-100"]};
17221
+ }
17222
+ `
17223
+ };
17152
17224
  var Button = import_styled_components2.default.button`
17153
17225
  display: inline-flex;
17154
17226
  align-items: center;
@@ -17156,22 +17228,12 @@ var Button = import_styled_components2.default.button`
17156
17228
  padding: ${({ $size, $variant }) => PADDING[$variant][$size]};
17157
17229
  border: none;
17158
17230
  border-radius: ${({ $size }) => BORDER_RADIUS[$size]}px;
17159
- background: ${({ $isSelected }) => $isSelected ? colors["brown-40"] : "transparent"};
17160
- color: ${colors["brown-100"]};
17161
17231
  cursor: pointer;
17162
17232
  transition: background-color 100ms ease;
17163
17233
 
17164
- &:hover {
17165
- background: ${({ $isSelected }) => $isSelected ? colors["brown-40"] : colors["brown-20"]};
17166
- }
17167
-
17168
- &:active {
17169
- background: ${colors["brown-40"]};
17170
- }
17234
+ ${({ $intent, $isSelected }) => intentStyles[$intent]({ $isSelected })}
17171
17235
 
17172
17236
  &:disabled {
17173
- color: ${colors["brown-50"]};
17174
- background: transparent;
17175
17237
  cursor: not-allowed;
17176
17238
  }
17177
17239
  `;
@@ -17186,6 +17248,7 @@ var IconButton = (0, import_react4.forwardRef)(function IconButton2({
17186
17248
  icon,
17187
17249
  size = "small",
17188
17250
  variant = "short",
17251
+ intent = "secondary",
17189
17252
  isSelected = false,
17190
17253
  disabled = false,
17191
17254
  onClick,
@@ -17205,6 +17268,7 @@ var IconButton = (0, import_react4.forwardRef)(function IconButton2({
17205
17268
  as,
17206
17269
  $size: size,
17207
17270
  $variant: variant,
17271
+ $intent: intent,
17208
17272
  $isSelected: isSelected,
17209
17273
  disabled,
17210
17274
  onClick: disabled ? void 0 : onClick,
@@ -18785,148 +18849,634 @@ function useBlockContext() {
18785
18849
  return (0, import_react16.useContext)(BlockContext) ?? {};
18786
18850
  }
18787
18851
 
18788
- // src/components/chat/chat-message/chat-message.tsx
18789
- var import_react20 = require("react");
18790
-
18791
- // src/components/chat/hooks/copy-message-text.ts
18792
- function copyMessageText(message) {
18793
- const parts = [];
18794
- for (const block of message.blocks) {
18795
- const service = BlockServices[block.type];
18796
- if (!service) continue;
18797
- if (!service.toClipboardText) continue;
18798
- const text2 = service.toClipboardText(block);
18799
- if (text2) parts.push(text2);
18800
- }
18801
- if (parts.length === 0) return message.fallbackText;
18802
- return parts.join("\n\n");
18803
- }
18804
-
18805
- // src/components/chat/chat-message-actions/chat-message-actions.tsx
18852
+ // src/components/ai-elements/prompt-input/prompt-input.tsx
18806
18853
  var import_react19 = require("react");
18807
18854
 
18808
- // src/components/chat/chat-context/chat-context.ts
18855
+ // src/components/button/button.tsx
18809
18856
  var import_react17 = require("react");
18810
- var ChatContext = (0, import_react17.createContext)(null);
18811
- function useChatContext() {
18812
- const context = (0, import_react17.useContext)(ChatContext);
18813
- if (!context) {
18814
- throw new Error("useChatContext must be used within a Chat.Root component");
18815
- }
18816
- return context;
18817
- }
18818
18857
 
18819
- // src/components/chat/hooks/use-copy-to-clipboard.ts
18820
- var import_react18 = require("react");
18858
+ // src/components/button/button-styles.ts
18859
+ var import_styled_components5 = __toESM(require("styled-components"), 1);
18860
+ init_colors();
18821
18861
 
18822
- // src/utils/clipboard.ts
18823
- function copyToClipboard(text2, options) {
18824
- navigator.clipboard.writeText(text2).then(
18825
- () => options?.onSuccess?.(),
18826
- (error) => options?.onFailure?.(error)
18827
- );
18862
+ // src/components/button/constants.ts
18863
+ var BUTTON_VARIANT = {
18864
+ SOLID: "solid",
18865
+ OUTLINE: "outline",
18866
+ GHOST: "ghost"
18867
+ };
18868
+ var BUTTON_SIZE = {
18869
+ XS: "xs",
18870
+ S: "s",
18871
+ M: "m"
18872
+ };
18873
+ var BUTTON_INTENT = {
18874
+ PRIMARY: "primary",
18875
+ ERROR: "error"
18876
+ };
18877
+ var ICON_POSITION = {
18878
+ LEADING: "leading",
18879
+ TRAILING: "trailing"
18880
+ };
18881
+
18882
+ // src/components/button/button-styles.ts
18883
+ var intentColors = {
18884
+ [BUTTON_INTENT.PRIMARY]: {
18885
+ base: colors["brown-100"],
18886
+ hover: colors["brown-90"],
18887
+ disabledBg: colors["brown-20"],
18888
+ disabledText: colors["brown-50"],
18889
+ subtleHover: colors["brown-20"],
18890
+ border: colors["brown-40"],
18891
+ disabledBorder: colors["brown-20"]
18892
+ },
18893
+ [BUTTON_INTENT.ERROR]: {
18894
+ base: colors["red-500"],
18895
+ hover: colors["red-600"],
18896
+ disabledBg: colors["red-100"],
18897
+ disabledText: colors["red-200"],
18898
+ subtleHover: colors["red-50"],
18899
+ border: colors["red-200"],
18900
+ disabledBorder: colors["red-100"]
18901
+ }
18902
+ };
18903
+ var sizeValues = {
18904
+ [BUTTON_SIZE.XS]: { padding: "6px 10px", borderRadius: "8px", gap: "4px" },
18905
+ [BUTTON_SIZE.S]: { padding: "8px 12px", borderRadius: "10px", gap: "6px" },
18906
+ [BUTTON_SIZE.M]: { padding: "10px 14px", borderRadius: "10px", gap: "6px" }
18907
+ };
18908
+ function sizeMixin({ $size }) {
18909
+ const s = sizeValues[$size];
18910
+ return import_styled_components5.css`
18911
+ padding: ${s.padding};
18912
+ border-radius: ${s.borderRadius};
18913
+ gap: ${s.gap};
18914
+ `;
18828
18915
  }
18916
+ var variantColorMap = {
18917
+ [BUTTON_VARIANT.SOLID]: (c) => ({
18918
+ background: c.base,
18919
+ color: colors.white,
18920
+ border: "none",
18921
+ hoverBg: c.hover,
18922
+ disabledBg: c.disabledBg,
18923
+ disabledColor: c.disabledText
18924
+ }),
18925
+ [BUTTON_VARIANT.OUTLINE]: (c) => ({
18926
+ background: colors.white,
18927
+ color: c.base,
18928
+ border: `1px solid ${c.border}`,
18929
+ hoverBg: c.subtleHover,
18930
+ disabledColor: c.disabledText,
18931
+ disabledBorder: c.disabledBorder
18932
+ }),
18933
+ [BUTTON_VARIANT.GHOST]: (c) => ({
18934
+ background: "transparent",
18935
+ color: c.base,
18936
+ border: "none",
18937
+ hoverBg: c.subtleHover,
18938
+ disabledColor: c.disabledText
18939
+ })
18940
+ };
18941
+ function variantMixin({
18942
+ $variant,
18943
+ $intent
18944
+ }) {
18945
+ const v = variantColorMap[$variant](intentColors[$intent]);
18946
+ return import_styled_components5.css`
18947
+ background: ${v.background};
18948
+ color: ${v.color};
18949
+ border: ${v.border};
18829
18950
 
18830
- // src/components/chat/hooks/use-copy-to-clipboard.ts
18831
- var RESET_DELAY_MS = 2e3;
18832
- function useCopyToClipboard() {
18833
- const [isCopied, setIsCopied] = (0, import_react18.useState)(false);
18834
- const timeoutRef = (0, import_react18.useRef)(null);
18835
- (0, import_react18.useEffect)(() => {
18836
- return () => {
18837
- if (timeoutRef.current) clearTimeout(timeoutRef.current);
18838
- };
18839
- }, []);
18840
- const copy = (0, import_react18.useCallback)((text2) => {
18841
- copyToClipboard(text2, {
18842
- onSuccess: () => {
18843
- setIsCopied(true);
18844
- if (timeoutRef.current) clearTimeout(timeoutRef.current);
18845
- timeoutRef.current = setTimeout(() => {
18846
- setIsCopied(false);
18847
- timeoutRef.current = null;
18848
- }, RESET_DELAY_MS);
18849
- }
18850
- });
18851
- }, []);
18852
- return { isCopied, copy };
18951
+ &:hover:not(:disabled) {
18952
+ background: ${v.hoverBg};
18953
+ }
18954
+
18955
+ &:disabled {
18956
+ color: ${v.disabledColor};
18957
+ ${v.disabledBg ? `background: ${v.disabledBg};` : ""}
18958
+ ${v.disabledBorder ? `border-color: ${v.disabledBorder};` : ""}
18959
+ }
18960
+ `;
18853
18961
  }
18962
+ var StyledButton = import_styled_components5.default.button`
18963
+ display: inline-flex;
18964
+ align-items: center;
18965
+ justify-content: center;
18966
+ cursor: pointer;
18967
+ ${typographyMixin(typographyTypes.GEIST_BODY_XS_MEDIUM)};
18968
+ transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
18854
18969
 
18855
- // src/components/chat/constants.ts
18856
- var MESSAGE_ROLE = {
18857
- USER: "user",
18858
- ASSISTANT: "assistant"
18859
- };
18970
+ &:disabled {
18971
+ cursor: not-allowed;
18972
+ }
18860
18973
 
18861
- // src/components/chat/chat-message-actions/chat-message-actions-styles.ts
18862
- var import_styled_components5 = __toESM(require("styled-components"), 1);
18863
- var FADE_DURATION_MS = 150;
18864
- var ANIMATE_DURATION_MS = 200;
18865
- var ActionsContainer = import_styled_components5.default.div`
18866
- display: flex;
18867
- opacity: ${({ $role }) => $role === MESSAGE_ROLE.ASSISTANT ? 1 : 0};
18868
- pointer-events: ${({ $role }) => $role === MESSAGE_ROLE.ASSISTANT ? "auto" : "none"};
18869
- transition: opacity ${FADE_DURATION_MS}ms ease;
18870
- `;
18871
- var AnimatedAction = import_styled_components5.default.div`
18872
- display: flex;
18873
- overflow: hidden;
18874
- max-width: ${({ $visible }) => $visible ? "40px" : "0"};
18875
- opacity: ${({ $visible }) => $visible ? 1 : 0};
18876
- transition: max-width ${ANIMATE_DURATION_MS}ms ease, opacity ${ANIMATE_DURATION_MS}ms ease;
18974
+ ${sizeMixin}
18975
+ ${variantMixin}
18877
18976
  `;
18878
18977
 
18879
- // src/components/chat/chat-message-actions/chat-message-actions.tsx
18978
+ // src/components/button/button.tsx
18880
18979
  var import_jsx_runtime27 = require("react/jsx-runtime");
18881
- function ChatMessageActions({ className, messageId, content: content2, role, isHelpful }) {
18882
- const { onCopyMessage, onThumbUpClick, onThumbDownClick } = useChatContext();
18883
- const { isCopied, copy } = useCopyToClipboard();
18884
- const handleCopy = (0, import_react19.useCallback)(() => {
18885
- copy(content2);
18886
- onCopyMessage?.(messageId);
18887
- }, [content2, messageId, copy, onCopyMessage]);
18888
- const handleThumbUp = (0, import_react19.useCallback)(() => {
18889
- onThumbUpClick?.(messageId, isHelpful === true ? null : true);
18890
- }, [messageId, isHelpful, onThumbUpClick]);
18891
- const handleThumbDown = (0, import_react19.useCallback)(() => {
18892
- onThumbDownClick?.(messageId, isHelpful === false ? null : false);
18893
- }, [messageId, isHelpful, onThumbDownClick]);
18894
- const isAssistant = role === MESSAGE_ROLE.ASSISTANT;
18895
- const hasFeedback = isAssistant && (onThumbUpClick || onThumbDownClick);
18896
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ActionsContainer, { $role: role, className, children: [
18897
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
18898
- IconButton,
18899
- {
18900
- icon: isCopied ? IconCheck : IconCopy,
18901
- onClick: handleCopy,
18902
- "aria-label": isCopied ? "Copied" : "Copy message"
18903
- }
18904
- ),
18905
- hasFeedback && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AnimatedAction, { $visible: isHelpful !== false, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
18906
- IconButton,
18907
- {
18908
- icon: IconThumbUp,
18909
- onClick: handleThumbUp,
18910
- isSelected: isHelpful === true,
18911
- "aria-label": "Good response"
18912
- }
18913
- ) }),
18914
- hasFeedback && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AnimatedAction, { $visible: isHelpful !== true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
18915
- IconButton,
18916
- {
18917
- icon: IconThumbDown,
18918
- onClick: handleThumbDown,
18919
- isSelected: isHelpful === false,
18920
- "aria-label": "Bad response"
18921
- }
18922
- ) })
18923
- ] });
18980
+ var Button2 = (0, import_react17.forwardRef)(function Button3({
18981
+ children,
18982
+ variant = BUTTON_VARIANT.SOLID,
18983
+ intent = BUTTON_INTENT.PRIMARY,
18984
+ size = BUTTON_SIZE.M,
18985
+ icon,
18986
+ iconPosition = ICON_POSITION.LEADING,
18987
+ disabled = false,
18988
+ onClick,
18989
+ className,
18990
+ "aria-label": ariaLabel
18991
+ }, ref) {
18992
+ const iconElement = icon ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { icon, size: 16 }) : null;
18993
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
18994
+ StyledButton,
18995
+ {
18996
+ ref,
18997
+ type: "button",
18998
+ $variant: variant,
18999
+ $intent: intent,
19000
+ $size: size,
19001
+ disabled,
19002
+ onClick: disabled ? void 0 : onClick,
19003
+ className,
19004
+ "aria-label": ariaLabel,
19005
+ children: [
19006
+ iconPosition === ICON_POSITION.LEADING && iconElement,
19007
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children }),
19008
+ iconPosition === ICON_POSITION.TRAILING && iconElement
19009
+ ]
19010
+ }
19011
+ );
19012
+ });
19013
+
19014
+ // src/components/text-area/text-area.tsx
19015
+ var import_react18 = require("react");
19016
+
19017
+ // src/utils/merge-refs.ts
19018
+ function mergeRefs(...refs) {
19019
+ return (node) => {
19020
+ for (const ref of refs) {
19021
+ if (typeof ref === "function") {
19022
+ ref(node);
19023
+ } else if (ref) {
19024
+ ref.current = node;
19025
+ }
19026
+ }
19027
+ };
19028
+ }
19029
+
19030
+ // src/components/text-area/text-area-styles.ts
19031
+ var import_styled_components6 = __toESM(require("styled-components"), 1);
19032
+ init_colors();
19033
+ var StyledTextArea = import_styled_components6.default.textarea`
19034
+ ${typographyMixin(typographyTypes.GEIST_BODY_S_REGULAR)};
19035
+ color: ${colors["brown-100"]};
19036
+ border: none;
19037
+ outline: none;
19038
+ resize: none;
19039
+ width: 100%;
19040
+ background: transparent;
19041
+ vertical-align: bottom;
19042
+ max-height: ${({ $maxHeight }) => $maxHeight ? `${$maxHeight}px` : "none"};
19043
+ overflow-y: ${({ $maxHeight }) => $maxHeight ? "auto" : "hidden"};
19044
+
19045
+ &::placeholder {
19046
+ color: ${colors["brown-50"]};
19047
+ }
19048
+
19049
+ &:disabled {
19050
+ opacity: 0.5;
19051
+ cursor: not-allowed;
19052
+ }
19053
+ `;
19054
+
19055
+ // src/components/text-area/text-area.tsx
19056
+ var import_jsx_runtime28 = require("react/jsx-runtime");
19057
+ var TextArea = (0, import_react18.forwardRef)(function TextArea2({ value: value2, onChange, placeholder, maxHeight, rows = 1, autoFocus, onKeyDown, disabled, className }, externalRef) {
19058
+ const internalRef = (0, import_react18.useRef)(null);
19059
+ (0, import_react18.useLayoutEffect)(() => {
19060
+ const el = internalRef.current;
19061
+ if (el) {
19062
+ el.style.height = "auto";
19063
+ el.style.height = `${el.scrollHeight}px`;
19064
+ }
19065
+ }, [value2]);
19066
+ const handleChange = (0, import_react18.useCallback)(
19067
+ (e) => {
19068
+ onChange(e.target.value);
19069
+ },
19070
+ [onChange]
19071
+ );
19072
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
19073
+ StyledTextArea,
19074
+ {
19075
+ ref: mergeRefs(internalRef, externalRef),
19076
+ value: value2,
19077
+ onChange: handleChange,
19078
+ placeholder,
19079
+ $maxHeight: maxHeight,
19080
+ rows,
19081
+ autoFocus,
19082
+ onKeyDown,
19083
+ disabled,
19084
+ className
19085
+ }
19086
+ );
19087
+ });
19088
+
19089
+ // src/components/ai-elements/prompt-input/types.ts
19090
+ var CHAT_STATUS = {
19091
+ /** Idle / ready to submit. */
19092
+ READY: "ready",
19093
+ /** The last submission errored — the button shows a retry affordance. */
19094
+ ERROR: "error"
19095
+ };
19096
+
19097
+ // src/components/ai-elements/prompt-input/prompt-input.tsx
19098
+ var import_jsx_runtime29 = require("react/jsx-runtime");
19099
+ var PromptInput = ({ className, onSubmit, disabled, children, ...props }) => {
19100
+ const handleSubmit = (0, import_react19.useCallback)(
19101
+ (event) => {
19102
+ event.preventDefault();
19103
+ if (disabled) {
19104
+ return;
19105
+ }
19106
+ const textarea = event.currentTarget.querySelector("textarea");
19107
+ const text2 = textarea?.value ?? "";
19108
+ if (!text2.trim()) {
19109
+ return;
19110
+ }
19111
+ onSubmit({ text: text2 }, event);
19112
+ },
19113
+ [disabled, onSubmit]
19114
+ );
19115
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
19116
+ "form",
19117
+ {
19118
+ className: cn(
19119
+ "flex w-full flex-col overflow-hidden rounded-xl border bg-background shadow-lg shadow-foreground/5",
19120
+ className
19121
+ ),
19122
+ onSubmit: handleSubmit,
19123
+ ...props,
19124
+ children
19125
+ }
19126
+ );
19127
+ };
19128
+ var PromptInputTextarea = (0, import_react19.forwardRef)(
19129
+ function PromptInputTextarea2({ className, onKeyDown, placeholder = "What would you like to know?", ...props }, ref) {
19130
+ const handleKeyDown = (0, import_react19.useCallback)(
19131
+ (event) => {
19132
+ onKeyDown?.(event);
19133
+ if (event.defaultPrevented) {
19134
+ return;
19135
+ }
19136
+ if (event.key === "Enter" && !event.shiftKey && !event.nativeEvent.isComposing) {
19137
+ event.preventDefault();
19138
+ event.currentTarget.form?.requestSubmit();
19139
+ }
19140
+ },
19141
+ [onKeyDown]
19142
+ );
19143
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("py-3", className), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TextArea, { ref, className: "px-4", onKeyDown: handleKeyDown, placeholder, ...props }) });
19144
+ }
19145
+ );
19146
+ var PromptInputFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("flex items-center justify-between gap-1 px-4 pb-3", className), ...props });
19147
+ var PromptInputTools = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("flex min-w-0 items-center gap-1", className), ...props });
19148
+ var PromptInputSubmit = ({
19149
+ label = "Submit",
19150
+ status = CHAT_STATUS.READY,
19151
+ disabled,
19152
+ className
19153
+ }) => {
19154
+ const handleClick = (0, import_react19.useCallback)((event) => {
19155
+ event.currentTarget.form?.requestSubmit();
19156
+ }, []);
19157
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
19158
+ Button2,
19159
+ {
19160
+ intent: status === CHAT_STATUS.ERROR ? BUTTON_INTENT.ERROR : BUTTON_INTENT.PRIMARY,
19161
+ size: BUTTON_SIZE.XS,
19162
+ className,
19163
+ disabled,
19164
+ onClick: handleClick,
19165
+ children: label
19166
+ }
19167
+ );
19168
+ };
19169
+
19170
+ // src/components/ai-elements/mouse-grid/mouse-grid.tsx
19171
+ var import_react20 = require("react");
19172
+
19173
+ // src/utils/prefers-reduced-motion.ts
19174
+ function prefersReducedMotion() {
19175
+ return typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : false;
19176
+ }
19177
+
19178
+ // src/components/ai-elements/mouse-grid/mouse-grid.tsx
19179
+ var import_jsx_runtime30 = require("react/jsx-runtime");
19180
+ function MouseGrid({ glowColor, colorCycleMs = 4e3, autoDrift = false } = {}) {
19181
+ const layerRef = (0, import_react20.useRef)(null);
19182
+ const glowRef = (0, import_react20.useRef)(null);
19183
+ (0, import_react20.useEffect)(() => {
19184
+ const driftEnabled = autoDrift && !prefersReducedMotion();
19185
+ let raf = 0;
19186
+ let driftRaf = 0;
19187
+ let lastDriftTime = 0;
19188
+ let clientX = 0;
19189
+ let clientY = 0;
19190
+ let pointerInside = false;
19191
+ let centerX = 0;
19192
+ let centerY = 0;
19193
+ let hasCenter = false;
19194
+ function setCenter(x, y) {
19195
+ const layer = layerRef.current;
19196
+ if (!layer) {
19197
+ return;
19198
+ }
19199
+ centerX = x;
19200
+ centerY = y;
19201
+ hasCenter = true;
19202
+ layer.style.setProperty("--vibe-mx", `${x}px`);
19203
+ layer.style.setProperty("--vibe-my", `${y}px`);
19204
+ }
19205
+ function flush() {
19206
+ raf = 0;
19207
+ const layer = layerRef.current;
19208
+ if (!layer) {
19209
+ return;
19210
+ }
19211
+ if (driftEnabled && !pointerInside) {
19212
+ return;
19213
+ }
19214
+ const rect = layer.getBoundingClientRect();
19215
+ setCenter(clientX - rect.left, clientY - rect.top);
19216
+ }
19217
+ function onMove(event) {
19218
+ clientX = event.clientX;
19219
+ clientY = event.clientY;
19220
+ const layer = layerRef.current;
19221
+ if (layer) {
19222
+ const rect = layer.getBoundingClientRect();
19223
+ pointerInside = clientX >= rect.left && clientX <= rect.right && clientY >= rect.top && clientY <= rect.bottom;
19224
+ }
19225
+ if (pointerInside) {
19226
+ stopDrift();
19227
+ } else {
19228
+ startDrift();
19229
+ }
19230
+ if (raf) {
19231
+ return;
19232
+ }
19233
+ raf = requestAnimationFrame(flush);
19234
+ }
19235
+ function onPointerLeave() {
19236
+ pointerInside = false;
19237
+ startDrift();
19238
+ }
19239
+ function drift(time2) {
19240
+ const delta = lastDriftTime ? time2 - lastDriftTime : 16.67;
19241
+ lastDriftTime = time2;
19242
+ driftRaf = requestAnimationFrame(drift);
19243
+ const layer = layerRef.current;
19244
+ if (!layer) {
19245
+ return;
19246
+ }
19247
+ const { width: width2, height: height2 } = layer.getBoundingClientRect();
19248
+ if (!hasCenter) {
19249
+ centerX = width2 / 2;
19250
+ centerY = height2 / 2;
19251
+ }
19252
+ const targetX = width2 * (0.5 + 0.32 * Math.sin(time2 * 37e-5) + 0.12 * Math.sin(time2 * 91e-5));
19253
+ const targetY = height2 * (0.5 + 0.32 * Math.cos(time2 * 41e-5) + 0.12 * Math.sin(time2 * 11e-4));
19254
+ const alpha = 1 - Math.exp(-25e-4 * delta);
19255
+ setCenter(centerX + (targetX - centerX) * alpha, centerY + (targetY - centerY) * alpha);
19256
+ }
19257
+ function startDrift() {
19258
+ if (!driftEnabled || driftRaf) {
19259
+ return;
19260
+ }
19261
+ lastDriftTime = 0;
19262
+ driftRaf = requestAnimationFrame(drift);
19263
+ }
19264
+ function stopDrift() {
19265
+ if (driftRaf) {
19266
+ cancelAnimationFrame(driftRaf);
19267
+ driftRaf = 0;
19268
+ }
19269
+ }
19270
+ window.addEventListener("mousemove", onMove, { passive: true });
19271
+ document.documentElement.addEventListener("mouseleave", onPointerLeave);
19272
+ startDrift();
19273
+ return () => {
19274
+ window.removeEventListener("mousemove", onMove);
19275
+ document.documentElement.removeEventListener("mouseleave", onPointerLeave);
19276
+ if (raf) {
19277
+ cancelAnimationFrame(raf);
19278
+ }
19279
+ stopDrift();
19280
+ };
19281
+ }, [autoDrift]);
19282
+ const colorList = Array.isArray(glowColor) ? glowColor : glowColor != null ? [glowColor] : [];
19283
+ const glowColorsKey = JSON.stringify(colorList);
19284
+ (0, import_react20.useEffect)(() => {
19285
+ const glow = glowRef.current;
19286
+ if (!glow) {
19287
+ return;
19288
+ }
19289
+ const colors2 = JSON.parse(glowColorsKey).filter(Boolean);
19290
+ const staticColor = colors2[0];
19291
+ if (staticColor) {
19292
+ glow.style.setProperty("--vibe-glow-color", staticColor);
19293
+ }
19294
+ const clearColor = () => glow.style.removeProperty("--vibe-glow-color");
19295
+ if (colors2.length < 2 || prefersReducedMotion()) {
19296
+ return staticColor ? clearColor : void 0;
19297
+ }
19298
+ let index2 = 0;
19299
+ const raf = requestAnimationFrame(() => glow.style.setProperty("--vibe-glow-cycle", `${colorCycleMs}ms`));
19300
+ const timer = setInterval(() => {
19301
+ index2 = (index2 + 1) % colors2.length;
19302
+ glow.style.setProperty("--vibe-glow-color", colors2[index2]);
19303
+ }, colorCycleMs);
19304
+ return () => {
19305
+ cancelAnimationFrame(raf);
19306
+ clearInterval(timer);
19307
+ glow.style.removeProperty("--vibe-glow-cycle");
19308
+ clearColor();
19309
+ };
19310
+ }, [glowColorsKey, colorCycleMs]);
19311
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { ref: layerRef, "aria-hidden": "true", className: "vibe-mouse-grid-layer", children: [
19312
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "vibe-mouse-grid" }),
19313
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref: glowRef, className: "vibe-mouse-glow" })
19314
+ ] });
19315
+ }
19316
+
19317
+ // src/components/ai-elements/suggestion/suggestion.tsx
19318
+ var import_react21 = require("react");
19319
+ var import_jsx_runtime31 = require("react/jsx-runtime");
19320
+ var Suggestions = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: cn("flex flex-wrap items-center justify-center gap-3", className), ...props });
19321
+ var Suggestion = ({ suggestion, onClick, className, children, ...props }) => {
19322
+ const handleClick = (0, import_react21.useCallback)(() => onClick?.(suggestion), [onClick, suggestion]);
19323
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19324
+ "button",
19325
+ {
19326
+ type: "button",
19327
+ onClick: handleClick,
19328
+ className: cn(
19329
+ "cursor-pointer whitespace-nowrap rounded-[12px] border border-brown-30 bg-white px-4 py-2 text-sm text-brown-100 transition-colors hover:bg-brown-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brown-40",
19330
+ className
19331
+ ),
19332
+ ...props,
19333
+ children: children ?? suggestion
19334
+ }
19335
+ );
19336
+ };
19337
+
19338
+ // src/components/chat/chat-message/chat-message.tsx
19339
+ var import_react25 = require("react");
19340
+
19341
+ // src/components/chat/hooks/copy-message-text.ts
19342
+ function copyMessageText(message) {
19343
+ const parts = [];
19344
+ for (const block of message.blocks) {
19345
+ const service = BlockServices[block.type];
19346
+ if (!service) continue;
19347
+ if (!service.toClipboardText) continue;
19348
+ const text2 = service.toClipboardText(block);
19349
+ if (text2) parts.push(text2);
19350
+ }
19351
+ if (parts.length === 0) return message.fallbackText;
19352
+ return parts.join("\n\n");
19353
+ }
19354
+
19355
+ // src/components/chat/chat-message-actions/chat-message-actions.tsx
19356
+ var import_react24 = require("react");
19357
+
19358
+ // src/components/chat/chat-context/chat-context.ts
19359
+ var import_react22 = require("react");
19360
+ var ChatContext = (0, import_react22.createContext)(null);
19361
+ function useChatContext() {
19362
+ const context = (0, import_react22.useContext)(ChatContext);
19363
+ if (!context) {
19364
+ throw new Error("useChatContext must be used within a Chat.Root component");
19365
+ }
19366
+ return context;
19367
+ }
19368
+
19369
+ // src/components/chat/hooks/use-copy-to-clipboard.ts
19370
+ var import_react23 = require("react");
19371
+
19372
+ // src/utils/clipboard.ts
19373
+ function copyToClipboard(text2, options) {
19374
+ navigator.clipboard.writeText(text2).then(
19375
+ () => options?.onSuccess?.(),
19376
+ (error) => options?.onFailure?.(error)
19377
+ );
19378
+ }
19379
+
19380
+ // src/components/chat/hooks/use-copy-to-clipboard.ts
19381
+ var RESET_DELAY_MS = 2e3;
19382
+ function useCopyToClipboard() {
19383
+ const [isCopied, setIsCopied] = (0, import_react23.useState)(false);
19384
+ const timeoutRef = (0, import_react23.useRef)(null);
19385
+ (0, import_react23.useEffect)(() => {
19386
+ return () => {
19387
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
19388
+ };
19389
+ }, []);
19390
+ const copy = (0, import_react23.useCallback)((text2) => {
19391
+ copyToClipboard(text2, {
19392
+ onSuccess: () => {
19393
+ setIsCopied(true);
19394
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
19395
+ timeoutRef.current = setTimeout(() => {
19396
+ setIsCopied(false);
19397
+ timeoutRef.current = null;
19398
+ }, RESET_DELAY_MS);
19399
+ }
19400
+ });
19401
+ }, []);
19402
+ return { isCopied, copy };
19403
+ }
19404
+
19405
+ // src/components/chat/constants.ts
19406
+ var MESSAGE_ROLE = {
19407
+ USER: "user",
19408
+ ASSISTANT: "assistant"
19409
+ };
19410
+
19411
+ // src/components/chat/chat-message-actions/chat-message-actions-styles.ts
19412
+ var import_styled_components7 = __toESM(require("styled-components"), 1);
19413
+ var FADE_DURATION_MS = 150;
19414
+ var ANIMATE_DURATION_MS = 200;
19415
+ var ActionsContainer = import_styled_components7.default.div`
19416
+ display: flex;
19417
+ opacity: ${({ $role }) => $role === MESSAGE_ROLE.ASSISTANT ? 1 : 0};
19418
+ pointer-events: ${({ $role }) => $role === MESSAGE_ROLE.ASSISTANT ? "auto" : "none"};
19419
+ transition: opacity ${FADE_DURATION_MS}ms ease;
19420
+ `;
19421
+ var AnimatedAction = import_styled_components7.default.div`
19422
+ display: flex;
19423
+ overflow: hidden;
19424
+ max-width: ${({ $visible }) => $visible ? "40px" : "0"};
19425
+ opacity: ${({ $visible }) => $visible ? 1 : 0};
19426
+ transition: max-width ${ANIMATE_DURATION_MS}ms ease, opacity ${ANIMATE_DURATION_MS}ms ease;
19427
+ `;
19428
+
19429
+ // src/components/chat/chat-message-actions/chat-message-actions.tsx
19430
+ var import_jsx_runtime32 = require("react/jsx-runtime");
19431
+ function ChatMessageActions({ className, messageId, content: content2, role, isHelpful }) {
19432
+ const { onCopyMessage, onThumbUpClick, onThumbDownClick } = useChatContext();
19433
+ const { isCopied, copy } = useCopyToClipboard();
19434
+ const handleCopy = (0, import_react24.useCallback)(() => {
19435
+ copy(content2);
19436
+ onCopyMessage?.(messageId);
19437
+ }, [content2, messageId, copy, onCopyMessage]);
19438
+ const handleThumbUp = (0, import_react24.useCallback)(() => {
19439
+ onThumbUpClick?.(messageId, isHelpful === true ? null : true);
19440
+ }, [messageId, isHelpful, onThumbUpClick]);
19441
+ const handleThumbDown = (0, import_react24.useCallback)(() => {
19442
+ onThumbDownClick?.(messageId, isHelpful === false ? null : false);
19443
+ }, [messageId, isHelpful, onThumbDownClick]);
19444
+ const isAssistant = role === MESSAGE_ROLE.ASSISTANT;
19445
+ const hasFeedback = isAssistant && (onThumbUpClick || onThumbDownClick);
19446
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(ActionsContainer, { $role: role, className, children: [
19447
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19448
+ IconButton,
19449
+ {
19450
+ icon: isCopied ? IconCheck : IconCopy,
19451
+ onClick: handleCopy,
19452
+ "aria-label": isCopied ? "Copied" : "Copy message"
19453
+ }
19454
+ ),
19455
+ hasFeedback && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(AnimatedAction, { $visible: isHelpful !== false, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19456
+ IconButton,
19457
+ {
19458
+ icon: IconThumbUp,
19459
+ onClick: handleThumbUp,
19460
+ isSelected: isHelpful === true,
19461
+ "aria-label": "Good response"
19462
+ }
19463
+ ) }),
19464
+ hasFeedback && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(AnimatedAction, { $visible: isHelpful !== true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19465
+ IconButton,
19466
+ {
19467
+ icon: IconThumbDown,
19468
+ onClick: handleThumbDown,
19469
+ isSelected: isHelpful === false,
19470
+ "aria-label": "Bad response"
19471
+ }
19472
+ ) })
19473
+ ] });
18924
19474
  }
18925
19475
 
18926
19476
  // src/components/chat/chat-message/chat-message-styles.ts
18927
- var import_styled_components6 = __toESM(require("styled-components"), 1);
19477
+ var import_styled_components8 = __toESM(require("styled-components"), 1);
18928
19478
  init_colors();
18929
- var MessageRow = import_styled_components6.default.div`
19479
+ var MessageRow = import_styled_components8.default.div`
18930
19480
  display: flex;
18931
19481
  justify-content: ${({ $role }) => $role === MESSAGE_ROLE.USER ? "flex-end" : "flex-start"};
18932
19482
 
@@ -18935,7 +19485,7 @@ var MessageRow = import_styled_components6.default.div`
18935
19485
  pointer-events: auto;
18936
19486
  }
18937
19487
  `;
18938
- var MessageContainer = import_styled_components6.default.div`
19488
+ var MessageContainer = import_styled_components8.default.div`
18939
19489
  display: flex;
18940
19490
  flex-direction: column;
18941
19491
  align-items: ${({ $role }) => $role === MESSAGE_ROLE.USER ? "flex-end" : "flex-start"};
@@ -18943,7 +19493,7 @@ var MessageContainer = import_styled_components6.default.div`
18943
19493
  width: ${({ $role }) => $role === MESSAGE_ROLE.USER ? "auto" : "100%"};
18944
19494
  gap: 12px;
18945
19495
  `;
18946
- var MessageBubble = import_styled_components6.default.div`
19496
+ var MessageBubble = import_styled_components8.default.div`
18947
19497
  ${typographyMixin(typographyTypes.GEIST_BODY_S_REGULAR)};
18948
19498
  color: ${colors["brown-100"]};
18949
19499
  background: ${({ $role }) => $role === MESSAGE_ROLE.USER ? colors.white : "transparent"};
@@ -18962,12 +19512,12 @@ var MessageBubble = import_styled_components6.default.div`
18962
19512
  `;
18963
19513
 
18964
19514
  // src/components/chat/chat-message/chat-message.tsx
18965
- var import_jsx_runtime28 = require("react/jsx-runtime");
19515
+ var import_jsx_runtime33 = require("react/jsx-runtime");
18966
19516
  function ChatMessage({ message }) {
18967
- const clipboardText = (0, import_react20.useMemo)(() => copyMessageText(message), [message]);
18968
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MessageRow, { $role: message.role, role: "article", "aria-label": `${message.role} message`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(MessageContainer, { $role: message.role, children: [
18969
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MessageBubble, { $role: message.role, "data-testid": "message-bubble", children: message.blocks.map((block, index2) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Block, { block }, index2)) }),
18970
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
19517
+ const clipboardText = (0, import_react25.useMemo)(() => copyMessageText(message), [message]);
19518
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MessageRow, { $role: message.role, role: "article", "aria-label": `${message.role} message`, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(MessageContainer, { $role: message.role, children: [
19519
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MessageBubble, { $role: message.role, "data-testid": "message-bubble", children: message.blocks.map((block, index2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Block, { block }, index2)) }),
19520
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
18971
19521
  ChatMessageActions,
18972
19522
  {
18973
19523
  messageId: message.id,
@@ -18980,57 +19530,68 @@ function ChatMessage({ message }) {
18980
19530
  }
18981
19531
 
18982
19532
  // src/components/keyboard-shortcut/keyboard-shortcut-styles.ts
18983
- var import_styled_components7 = __toESM(require("styled-components"), 1);
19533
+ var import_styled_components9 = __toESM(require("styled-components"), 1);
18984
19534
  init_colors();
18985
19535
 
18986
19536
  // src/components/keyboard-shortcut/types.ts
18987
19537
  var KEYBOARD_SHORTCUT_VARIANTS = {
18988
- /** Outlined keys with a subtle border — use on dark backgrounds. */
19538
+ /** Outlined keys with a subtle border + light glyph for dark surfaces / app chrome. Default. */
18989
19539
  OUTLINED: "outlined",
18990
- /** Filled keys with a solid background — use for emphasis or light backgrounds. */
19540
+ /** Filled keys with a solid background — for emphasis. */
18991
19541
  FILLED: "filled"
18992
19542
  };
18993
19543
 
18994
19544
  // src/components/keyboard-shortcut/keyboard-shortcut-styles.ts
18995
19545
  var variantStyles = {
18996
- [KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: import_styled_components7.css`
19546
+ [KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: import_styled_components9.css`
18997
19547
  border: 1px solid ${colors["white-alpha-40"]};
18998
19548
  color: ${colors["brown-10"]};
18999
19549
  `,
19000
- [KEYBOARD_SHORTCUT_VARIANTS.FILLED]: import_styled_components7.css`
19550
+ [KEYBOARD_SHORTCUT_VARIANTS.FILLED]: import_styled_components9.css`
19001
19551
  background: ${colors["brown-80"]};
19002
19552
  color: ${colors["brown-10"]};
19003
19553
  `
19004
19554
  };
19005
- var Wrapper = import_styled_components7.default.div`
19555
+ var adaptiveStyles = {
19556
+ [KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: import_styled_components9.css`
19557
+ border: 1px solid color-mix(in oklch, currentColor 40%, transparent);
19558
+ color: currentColor;
19559
+ `,
19560
+ [KEYBOARD_SHORTCUT_VARIANTS.FILLED]: import_styled_components9.css`
19561
+ background: color-mix(in oklch, currentColor 12%, transparent);
19562
+ color: currentColor;
19563
+ `
19564
+ };
19565
+ var Wrapper = import_styled_components9.default.div`
19006
19566
  display: inline-flex;
19007
19567
  align-items: center;
19008
19568
  gap: 2px;
19009
19569
  `;
19010
- var Key = import_styled_components7.default.kbd`
19570
+ var Key = import_styled_components9.default.kbd`
19011
19571
  display: inline-flex;
19012
19572
  align-items: center;
19013
19573
  justify-content: center;
19014
19574
  padding: 2px;
19015
19575
  border-radius: 6px;
19016
- ${({ $variant }) => variantStyles[$variant]};
19576
+ ${({ $variant, $adaptive }) => ($adaptive ? adaptiveStyles : variantStyles)[$variant]};
19017
19577
  `;
19018
19578
 
19019
19579
  // src/components/keyboard-shortcut/keyboard-shortcut.tsx
19020
- var import_jsx_runtime29 = require("react/jsx-runtime");
19580
+ var import_jsx_runtime34 = require("react/jsx-runtime");
19021
19581
  function KeyboardShortcut({
19022
19582
  keys,
19023
19583
  variant = KEYBOARD_SHORTCUT_VARIANTS.OUTLINED,
19584
+ adaptive = false,
19024
19585
  className
19025
19586
  }) {
19026
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Wrapper, { className, children: keys.map((KeyComponent, index2) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Key, { $variant: variant, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { icon: KeyComponent, size: 12 }) }, index2)) });
19587
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Wrapper, { className, children: keys.map((KeyComponent, index2) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Key, { $variant: variant, $adaptive: adaptive, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { icon: KeyComponent, size: 12 }) }, index2)) });
19027
19588
  }
19028
19589
 
19029
19590
  // src/components/keyboard-shortcut/icons/icon-ctrl.tsx
19030
- var import_jsx_runtime30 = require("react/jsx-runtime");
19591
+ var import_jsx_runtime35 = require("react/jsx-runtime");
19031
19592
  function IconCtrl(props) {
19032
19593
  const { width: width2 = 24, height: height2 = 24, ...rest } = props;
19033
- return /* @__PURE__ */ (0, import_jsx_runtime30.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_runtime30.jsx)(
19594
+ return /* @__PURE__ */ (0, import_jsx_runtime35.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_runtime35.jsx)(
19034
19595
  "text",
19035
19596
  {
19036
19597
  x: "50%",
@@ -19047,11 +19608,11 @@ function IconCtrl(props) {
19047
19608
  }
19048
19609
 
19049
19610
  // src/components/lottie/lottie.tsx
19050
- var import_react22 = require("react");
19611
+ var import_react27 = require("react");
19051
19612
 
19052
19613
  // src/components/lottie/lottie-styles.ts
19053
- var import_styled_components8 = __toESM(require("styled-components"), 1);
19054
- var LottieContainer = import_styled_components8.default.div`
19614
+ var import_styled_components10 = __toESM(require("styled-components"), 1);
19615
+ var LottieContainer = import_styled_components10.default.div`
19055
19616
  display: inline-flex;
19056
19617
  width: ${({ $width }) => typeof $width === "number" ? `${$width}px` : $width};
19057
19618
  height: ${({ $height }) => typeof $height === "number" ? `${$height}px` : $height};
@@ -19063,7 +19624,7 @@ var LottieContainer = import_styled_components8.default.div`
19063
19624
  `;
19064
19625
 
19065
19626
  // src/components/lottie/use-lottie.ts
19066
- var import_react21 = require("react");
19627
+ var import_react26 = require("react");
19067
19628
  var import_lottie_web = __toESM(require_lottie(), 1);
19068
19629
  function useLottie({
19069
19630
  animationData: animationData2,
@@ -19078,17 +19639,17 @@ function useLottie({
19078
19639
  onLoopComplete,
19079
19640
  onEnterFrame
19080
19641
  }) {
19081
- const containerRef = (0, import_react21.useRef)(null);
19082
- const animationRef = (0, import_react21.useRef)(null);
19083
- const onAnimationLoadedRef = (0, import_react21.useRef)(onAnimationLoaded);
19084
- const onCompleteRef = (0, import_react21.useRef)(onComplete);
19085
- const onLoopCompleteRef = (0, import_react21.useRef)(onLoopComplete);
19086
- const onEnterFrameRef = (0, import_react21.useRef)(onEnterFrame);
19642
+ const containerRef = (0, import_react26.useRef)(null);
19643
+ const animationRef = (0, import_react26.useRef)(null);
19644
+ const onAnimationLoadedRef = (0, import_react26.useRef)(onAnimationLoaded);
19645
+ const onCompleteRef = (0, import_react26.useRef)(onComplete);
19646
+ const onLoopCompleteRef = (0, import_react26.useRef)(onLoopComplete);
19647
+ const onEnterFrameRef = (0, import_react26.useRef)(onEnterFrame);
19087
19648
  onAnimationLoadedRef.current = onAnimationLoaded;
19088
19649
  onCompleteRef.current = onComplete;
19089
19650
  onLoopCompleteRef.current = onLoopComplete;
19090
19651
  onEnterFrameRef.current = onEnterFrame;
19091
- (0, import_react21.useEffect)(() => {
19652
+ (0, import_react26.useEffect)(() => {
19092
19653
  if (!containerRef.current) return;
19093
19654
  const anim = import_lottie_web.default.loadAnimation({
19094
19655
  container: containerRef.current,
@@ -19180,8 +19741,8 @@ function createLottieRef(animationRef) {
19180
19741
  }
19181
19742
 
19182
19743
  // src/components/lottie/lottie.tsx
19183
- var import_jsx_runtime31 = require("react/jsx-runtime");
19184
- var Lottie = (0, import_react22.forwardRef)(function Lottie2({
19744
+ var import_jsx_runtime36 = require("react/jsx-runtime");
19745
+ var Lottie = (0, import_react27.forwardRef)(function Lottie2({
19185
19746
  animationData: animationData2,
19186
19747
  autoplay,
19187
19748
  loop,
@@ -19211,8 +19772,8 @@ var Lottie = (0, import_react22.forwardRef)(function Lottie2({
19211
19772
  onLoopComplete,
19212
19773
  onEnterFrame
19213
19774
  });
19214
- (0, import_react22.useImperativeHandle)(ref, () => createLottieRef(animationRef), [animationRef]);
19215
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19775
+ (0, import_react27.useImperativeHandle)(ref, () => createLottieRef(animationRef), [animationRef]);
19776
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19216
19777
  LottieContainer,
19217
19778
  {
19218
19779
  ref: containerRef,
@@ -19225,81 +19786,6 @@ var Lottie = (0, import_react22.forwardRef)(function Lottie2({
19225
19786
  );
19226
19787
  });
19227
19788
 
19228
- // src/components/text-area/text-area.tsx
19229
- var import_react23 = require("react");
19230
-
19231
- // src/utils/merge-refs.ts
19232
- function mergeRefs(...refs) {
19233
- return (node) => {
19234
- for (const ref of refs) {
19235
- if (typeof ref === "function") {
19236
- ref(node);
19237
- } else if (ref) {
19238
- ref.current = node;
19239
- }
19240
- }
19241
- };
19242
- }
19243
-
19244
- // src/components/text-area/text-area-styles.ts
19245
- var import_styled_components9 = __toESM(require("styled-components"), 1);
19246
- init_colors();
19247
- var StyledTextArea = import_styled_components9.default.textarea`
19248
- ${typographyMixin(typographyTypes.GEIST_BODY_S_REGULAR)};
19249
- color: ${colors["brown-100"]};
19250
- border: none;
19251
- outline: none;
19252
- resize: none;
19253
- width: 100%;
19254
- background: transparent;
19255
- vertical-align: bottom;
19256
- max-height: ${({ $maxHeight }) => $maxHeight ? `${$maxHeight}px` : "none"};
19257
- overflow-y: ${({ $maxHeight }) => $maxHeight ? "auto" : "hidden"};
19258
-
19259
- &::placeholder {
19260
- color: ${colors["brown-50"]};
19261
- }
19262
-
19263
- &:disabled {
19264
- opacity: 0.5;
19265
- cursor: not-allowed;
19266
- }
19267
- `;
19268
-
19269
- // src/components/text-area/text-area.tsx
19270
- var import_jsx_runtime32 = require("react/jsx-runtime");
19271
- var TextArea = (0, import_react23.forwardRef)(function TextArea2({ value: value2, onChange, placeholder, maxHeight, rows = 1, autoFocus, onKeyDown, disabled, className }, externalRef) {
19272
- const internalRef = (0, import_react23.useRef)(null);
19273
- (0, import_react23.useLayoutEffect)(() => {
19274
- const el = internalRef.current;
19275
- if (el) {
19276
- el.style.height = "auto";
19277
- el.style.height = `${el.scrollHeight}px`;
19278
- }
19279
- }, [value2]);
19280
- const handleChange = (0, import_react23.useCallback)(
19281
- (e) => {
19282
- onChange(e.target.value);
19283
- },
19284
- [onChange]
19285
- );
19286
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19287
- StyledTextArea,
19288
- {
19289
- ref: mergeRefs(internalRef, externalRef),
19290
- value: value2,
19291
- onChange: handleChange,
19292
- placeholder,
19293
- $maxHeight: maxHeight,
19294
- rows,
19295
- autoFocus,
19296
- onKeyDown,
19297
- disabled,
19298
- className
19299
- }
19300
- );
19301
- });
19302
-
19303
19789
  // src/utils/parse-markdown-table.ts
19304
19790
  function parseCells(line) {
19305
19791
  const trimmed = line.trim();
@@ -19370,165 +19856,6 @@ function convertTableToCSV(table) {
19370
19856
  const dataRows = table.rows.map((row) => row.map(escapeCsvField).join(","));
19371
19857
  return [headerRow, ...dataRows].join("\r\n");
19372
19858
  }
19373
-
19374
- // src/components/button/button.tsx
19375
- var import_react24 = require("react");
19376
-
19377
- // src/components/button/button-styles.ts
19378
- var import_styled_components10 = __toESM(require("styled-components"), 1);
19379
- init_colors();
19380
-
19381
- // src/components/button/constants.ts
19382
- var BUTTON_VARIANT = {
19383
- SOLID: "solid",
19384
- OUTLINE: "outline",
19385
- GHOST: "ghost"
19386
- };
19387
- var BUTTON_SIZE = {
19388
- XS: "xs",
19389
- S: "s",
19390
- M: "m"
19391
- };
19392
- var BUTTON_INTENT = {
19393
- PRIMARY: "primary",
19394
- ERROR: "error"
19395
- };
19396
- var ICON_POSITION = {
19397
- LEADING: "leading",
19398
- TRAILING: "trailing"
19399
- };
19400
-
19401
- // src/components/button/button-styles.ts
19402
- var intentColors = {
19403
- [BUTTON_INTENT.PRIMARY]: {
19404
- base: colors["brown-100"],
19405
- hover: colors["brown-90"],
19406
- disabledBg: colors["brown-20"],
19407
- disabledText: colors["brown-50"],
19408
- subtleHover: colors["brown-20"],
19409
- border: colors["brown-40"],
19410
- disabledBorder: colors["brown-20"]
19411
- },
19412
- [BUTTON_INTENT.ERROR]: {
19413
- base: colors["red-500"],
19414
- hover: colors["red-600"],
19415
- disabledBg: colors["red-100"],
19416
- disabledText: colors["red-200"],
19417
- subtleHover: colors["red-50"],
19418
- border: colors["red-200"],
19419
- disabledBorder: colors["red-100"]
19420
- }
19421
- };
19422
- var sizeValues = {
19423
- [BUTTON_SIZE.XS]: { padding: "6px 10px", borderRadius: "8px", gap: "4px" },
19424
- [BUTTON_SIZE.S]: { padding: "8px 12px", borderRadius: "10px", gap: "6px" },
19425
- [BUTTON_SIZE.M]: { padding: "10px 14px", borderRadius: "10px", gap: "6px" }
19426
- };
19427
- function sizeMixin({ $size }) {
19428
- const s = sizeValues[$size];
19429
- return import_styled_components10.css`
19430
- padding: ${s.padding};
19431
- border-radius: ${s.borderRadius};
19432
- gap: ${s.gap};
19433
- `;
19434
- }
19435
- var variantColorMap = {
19436
- [BUTTON_VARIANT.SOLID]: (c) => ({
19437
- background: c.base,
19438
- color: colors.white,
19439
- border: "none",
19440
- hoverBg: c.hover,
19441
- disabledBg: c.disabledBg,
19442
- disabledColor: c.disabledText
19443
- }),
19444
- [BUTTON_VARIANT.OUTLINE]: (c) => ({
19445
- background: colors.white,
19446
- color: c.base,
19447
- border: `1px solid ${c.border}`,
19448
- hoverBg: c.subtleHover,
19449
- disabledColor: c.disabledText,
19450
- disabledBorder: c.disabledBorder
19451
- }),
19452
- [BUTTON_VARIANT.GHOST]: (c) => ({
19453
- background: "transparent",
19454
- color: c.base,
19455
- border: "none",
19456
- hoverBg: c.subtleHover,
19457
- disabledColor: c.disabledText
19458
- })
19459
- };
19460
- function variantMixin({
19461
- $variant,
19462
- $intent
19463
- }) {
19464
- const v = variantColorMap[$variant](intentColors[$intent]);
19465
- return import_styled_components10.css`
19466
- background: ${v.background};
19467
- color: ${v.color};
19468
- border: ${v.border};
19469
-
19470
- &:hover:not(:disabled) {
19471
- background: ${v.hoverBg};
19472
- }
19473
-
19474
- &:disabled {
19475
- color: ${v.disabledColor};
19476
- ${v.disabledBg ? `background: ${v.disabledBg};` : ""}
19477
- ${v.disabledBorder ? `border-color: ${v.disabledBorder};` : ""}
19478
- }
19479
- `;
19480
- }
19481
- var StyledButton = import_styled_components10.default.button`
19482
- display: inline-flex;
19483
- align-items: center;
19484
- justify-content: center;
19485
- cursor: pointer;
19486
- ${typographyMixin(typographyTypes.GEIST_BODY_XS_MEDIUM)};
19487
- transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
19488
-
19489
- &:disabled {
19490
- cursor: not-allowed;
19491
- }
19492
-
19493
- ${sizeMixin}
19494
- ${variantMixin}
19495
- `;
19496
-
19497
- // src/components/button/button.tsx
19498
- var import_jsx_runtime33 = require("react/jsx-runtime");
19499
- var Button2 = (0, import_react24.forwardRef)(function Button3({
19500
- children,
19501
- variant = BUTTON_VARIANT.SOLID,
19502
- intent = BUTTON_INTENT.PRIMARY,
19503
- size = BUTTON_SIZE.M,
19504
- icon,
19505
- iconPosition = ICON_POSITION.LEADING,
19506
- disabled = false,
19507
- onClick,
19508
- className,
19509
- "aria-label": ariaLabel
19510
- }, ref) {
19511
- const iconElement = icon ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { icon, size: 16 }) : null;
19512
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
19513
- StyledButton,
19514
- {
19515
- ref,
19516
- type: "button",
19517
- $variant: variant,
19518
- $intent: intent,
19519
- $size: size,
19520
- disabled,
19521
- onClick: disabled ? void 0 : onClick,
19522
- className,
19523
- "aria-label": ariaLabel,
19524
- children: [
19525
- iconPosition === ICON_POSITION.LEADING && iconElement,
19526
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children }),
19527
- iconPosition === ICON_POSITION.TRAILING && iconElement
19528
- ]
19529
- }
19530
- );
19531
- });
19532
19859
  // Annotate the CommonJS export names for ESM import in node:
19533
19860
  0 && (module.exports = {
19534
19861
  ArtifactCopyAsImageButton,
@@ -19544,6 +19871,7 @@ var Button2 = (0, import_react24.forwardRef)(function Button3({
19544
19871
  BlockContext,
19545
19872
  BlockServices,
19546
19873
  Button,
19874
+ CHAT_STATUS,
19547
19875
  ChartArtifact,
19548
19876
  ChatContext,
19549
19877
  ChatMessage,
@@ -19557,6 +19885,14 @@ var Button2 = (0, import_react24.forwardRef)(function Button3({
19557
19885
  KeyboardShortcut,
19558
19886
  Lottie,
19559
19887
  MESSAGE_ROLE,
19888
+ MouseGrid,
19889
+ PromptInput,
19890
+ PromptInputFooter,
19891
+ PromptInputSubmit,
19892
+ PromptInputTextarea,
19893
+ PromptInputTools,
19894
+ Suggestion,
19895
+ Suggestions,
19560
19896
  TableArtifact,
19561
19897
  TextArea,
19562
19898
  TextBlockService,