@shapesos/clay 0.17.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/ai-elements.cjs +3 -1
  2. package/dist/ai-elements.cjs.map +1 -1
  3. package/dist/ai-elements.js +4 -4
  4. package/dist/artifacts.cjs +1010 -60
  5. package/dist/artifacts.cjs.map +1 -1
  6. package/dist/artifacts.d.cts +20 -3
  7. package/dist/artifacts.d.ts +20 -3
  8. package/dist/artifacts.js +15 -6
  9. package/dist/badge.cjs +70 -0
  10. package/dist/badge.cjs.map +1 -0
  11. package/dist/badge.d.cts +28 -0
  12. package/dist/badge.d.ts +28 -0
  13. package/dist/badge.js +9 -0
  14. package/dist/blocks.cjs +981 -96
  15. package/dist/blocks.cjs.map +1 -1
  16. package/dist/blocks.css +1 -1
  17. package/dist/blocks.d.cts +15 -4
  18. package/dist/blocks.d.ts +15 -4
  19. package/dist/blocks.js +20 -8
  20. package/dist/button.cjs +3 -1
  21. package/dist/button.cjs.map +1 -1
  22. package/dist/button.js +2 -2
  23. package/dist/capture.cjs +3 -1
  24. package/dist/capture.cjs.map +1 -1
  25. package/dist/capture.js +2 -2
  26. package/dist/chart.cjs +3 -1
  27. package/dist/chart.cjs.map +1 -1
  28. package/dist/chart.js +2 -2
  29. package/dist/chat.cjs +986 -151
  30. package/dist/chat.cjs.map +1 -1
  31. package/dist/chat.d.cts +2 -2
  32. package/dist/chat.d.ts +2 -2
  33. package/dist/chat.js +13 -8
  34. package/dist/{chunk-JGMN6W72.js → chunk-2X4KUXYP.js} +1 -1
  35. package/dist/chunk-BHHJOG5X.js +1 -0
  36. package/dist/{chunk-B4U37WIH.js → chunk-CFCLVJIO.js} +2 -2
  37. package/dist/chunk-CSTCTO3B.js +161 -0
  38. package/dist/chunk-CSTCTO3B.js.map +1 -0
  39. package/dist/{chunk-6YZ65KPW.js → chunk-DC5KYT2G.js} +669 -171
  40. package/dist/chunk-DC5KYT2G.js.map +1 -0
  41. package/dist/{chunk-PYDVANWI.js → chunk-E36VI2HA.js} +2 -2
  42. package/dist/chunk-EIAWZXE4.js +69 -0
  43. package/dist/chunk-EIAWZXE4.js.map +1 -0
  44. package/dist/chunk-EXRNGIQ2.js +41 -0
  45. package/dist/chunk-EXRNGIQ2.js.map +1 -0
  46. package/dist/{chunk-B6GAPZ2R.js → chunk-FCSYVF4Z.js} +12 -46
  47. package/dist/chunk-FCSYVF4Z.js.map +1 -0
  48. package/dist/{chunk-PUVZ2S3F.js → chunk-G4NXVFXU.js} +2 -2
  49. package/dist/{chunk-JAGNXEWK.js → chunk-GK4XW4BC.js} +2 -2
  50. package/dist/{chunk-4MZZH3WX.js → chunk-HU5W7CGE.js} +37 -2
  51. package/dist/chunk-HU5W7CGE.js.map +1 -0
  52. package/dist/chunk-JMHE3Q5K.js +406 -0
  53. package/dist/chunk-JMHE3Q5K.js.map +1 -0
  54. package/dist/{chunk-4VE6ZXXW.js → chunk-MQP57DOP.js} +3 -3
  55. package/dist/{chunk-JF3P66JF.js → chunk-SN3ORQSJ.js} +4 -2
  56. package/dist/{chunk-JF3P66JF.js.map → chunk-SN3ORQSJ.js.map} +1 -1
  57. package/dist/{chunk-PGR2MDDU.js → chunk-W66OJM55.js} +2 -2
  58. package/dist/{chunk-7OYIDM42.js → chunk-XKURJ72I.js} +2 -2
  59. package/dist/copy-button.cjs +439 -0
  60. package/dist/copy-button.cjs.map +1 -0
  61. package/dist/copy-button.d.cts +20 -0
  62. package/dist/copy-button.d.ts +20 -0
  63. package/dist/copy-button.js +12 -0
  64. package/dist/copy-button.js.map +1 -0
  65. package/dist/{dom-to-image-NATF3446.js → dom-to-image-QB7KMTAE.js} +3 -3
  66. package/dist/dom-to-image-QB7KMTAE.js.map +1 -0
  67. package/dist/icon.cjs +3 -1
  68. package/dist/icon.cjs.map +1 -1
  69. package/dist/icon.js +2 -2
  70. package/dist/index.cjs +1070 -209
  71. package/dist/index.cjs.map +1 -1
  72. package/dist/index.d.cts +6 -4
  73. package/dist/index.d.ts +6 -4
  74. package/dist/index.js +42 -17
  75. package/dist/keyboard-shortcut.cjs +3 -1
  76. package/dist/keyboard-shortcut.cjs.map +1 -1
  77. package/dist/keyboard-shortcut.js +2 -2
  78. package/dist/table.cjs +40 -0
  79. package/dist/table.cjs.map +1 -1
  80. package/dist/table.d.cts +37 -2
  81. package/dist/table.d.ts +37 -2
  82. package/dist/table.js +11 -1
  83. package/dist/text-area.cjs +3 -1
  84. package/dist/text-area.cjs.map +1 -1
  85. package/dist/text-area.js +2 -2
  86. package/dist/tokens.cjs +3 -1
  87. package/dist/tokens.cjs.map +1 -1
  88. package/dist/tokens.d.cts +1 -0
  89. package/dist/tokens.d.ts +1 -0
  90. package/dist/tokens.js +1 -1
  91. package/dist/{types-CW45GBXl.d.cts → types-Bhg0_ES8.d.cts} +75 -3
  92. package/dist/{types-GCkXbyFm.d.ts → types-C8JtnwNY.d.ts} +200 -4
  93. package/dist/{types-BzXPBy6s.d.cts → types-DTdDFU3O.d.cts} +200 -4
  94. package/dist/{types-D1b8v7EY.d.ts → types-orOQcI2z.d.ts} +75 -3
  95. package/package.json +11 -1
  96. package/dist/chunk-46ZYTBX5.js +0 -250
  97. package/dist/chunk-46ZYTBX5.js.map +0 -1
  98. package/dist/chunk-4MZZH3WX.js.map +0 -1
  99. package/dist/chunk-6YZ65KPW.js.map +0 -1
  100. package/dist/chunk-B6GAPZ2R.js.map +0 -1
  101. package/dist/chunk-RSRNSWJN.js +0 -1
  102. /package/dist/{chunk-RSRNSWJN.js.map → badge.js.map} +0 -0
  103. /package/dist/{chunk-JGMN6W72.js.map → chunk-2X4KUXYP.js.map} +0 -0
  104. /package/dist/{dom-to-image-NATF3446.js.map → chunk-BHHJOG5X.js.map} +0 -0
  105. /package/dist/{chunk-B4U37WIH.js.map → chunk-CFCLVJIO.js.map} +0 -0
  106. /package/dist/{chunk-PYDVANWI.js.map → chunk-E36VI2HA.js.map} +0 -0
  107. /package/dist/{chunk-PUVZ2S3F.js.map → chunk-G4NXVFXU.js.map} +0 -0
  108. /package/dist/{chunk-JAGNXEWK.js.map → chunk-GK4XW4BC.js.map} +0 -0
  109. /package/dist/{chunk-4VE6ZXXW.js.map → chunk-MQP57DOP.js.map} +0 -0
  110. /package/dist/{chunk-PGR2MDDU.js.map → chunk-W66OJM55.js.map} +0 -0
  111. /package/dist/{chunk-7OYIDM42.js.map → chunk-XKURJ72I.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { ColorToken, TypographyStyle, TypographyType, colors, fontFamilies, typographyMixin, typographyStyles, typographyTypes } from './tokens.cjs';
2
- export { ArtifactRefBlock, ArtifactRefBlockService, Block, BlockContext, BlockContextValue, BlockServices, TextBlockService, useBlockContext } from './blocks.cjs';
3
- export { A as ArtifactRefBlockRecord, B as BlockComponentProps, a as BlockRecord, b as BlockService, c as BlockType, T as TextBlockRecord, d as blockTypes } from './types-CW45GBXl.cjs';
2
+ export { ArtifactRefBlock, ArtifactRefBlockService, Block, BlockContext, BlockContextValue, BlockServices, NotificationDraftBlock, NotificationDraftBlockService, TextBlockService, useBlockContext } from './blocks.cjs';
3
+ export { A as ArtifactRefBlockRecord, B as BlockComponentProps, a as BlockRecord, b as BlockService, c as BlockType, N as NotificationChannel, d as NotificationDraftBlockRecord, e as NotificationDraftPayload, f as NotificationEmailType, g as NotificationRecipient, T as TextBlockRecord, h as blockTypes, n as notificationChannels, i as notificationEmailTypes } from './types-Bhg0_ES8.cjs';
4
4
  export { CHAT_STATUS, ChatStatus, MouseGrid, MouseGridProps, PromptInput, PromptInputFooter, PromptInputFooterProps, PromptInputMessage, PromptInputProps, PromptInputSubmit, PromptInputSubmitProps, PromptInputTextarea, PromptInputTextareaProps, PromptInputTools, PromptInputToolsProps, Suggestion, SuggestionProps, Suggestions, SuggestionsProps } from './ai-elements.cjs';
5
- export { A as ArtifactCallbacksOf, a as ArtifactDataRow, b as ArtifactLabelsOf, c as ArtifactRecord, d as ArtifactService, e as ArtifactServiceProps, f as ArtifactType, B as BarChartConfig, C as ChartArtifactLabels, g as ChartArtifactRecord, h as ChartConfig, i as ChartStats, D as DEFAULT_CHART_ARTIFACT_LABELS, j as DEFAULT_TABLE_ARTIFACT_LABELS, L as LineChartConfig, P as PieChartConfig, T as TableArtifactLabels, k as TableArtifactRecord, l as TableColumn, m as TableConfig, n as TableRow, o as TableStats, p as artifactTypes } from './types-BzXPBy6s.cjs';
6
- export { ArtifactCopyAsImageButton, ArtifactCopyAsImageButtonProps, ArtifactDownloadButton, ArtifactDownloadButtonProps, ArtifactDownloadMenu, ArtifactDownloadMenuCsvAction, ArtifactDownloadMenuPngAction, ArtifactDownloadMenuProps, ArtifactServices, ChartArtifact, TableArtifact, artifactToClipboardText, isSafeDownloadUrl } from './artifacts.cjs';
5
+ export { A as ArtifactCallbacksOf, a as ArtifactDataRow, b as ArtifactLabelsOf, c as ArtifactRecord, d as ArtifactService, e as ArtifactServiceProps, f as ArtifactType, B as BarChartConfig, C as ChartArtifactLabels, g as ChartArtifactRecord, h as ChartConfig, i as ChartStats, D as DEFAULT_CHART_ARTIFACT_LABELS, j as DEFAULT_DECK_ARTIFACT_LABELS, k as DEFAULT_TABLE_ARTIFACT_LABELS, l as DeckArtifactCallbacks, m as DeckArtifactLabels, n as DeckArtifactRecord, o as DeckBlock, p as DeckChartBlock, q as DeckConfig, r as DeckMeta, s as DeckSlide, t as DeckSlideKind, u as DeckStats, v as DeckTableBlock, w as DeckTextBlock, L as LineChartConfig, P as PieChartConfig, T as TableArtifactLabels, x as TableArtifactRecord, y as TableColumn, z as TableConfig, E as TableRow, F as TableStats, G as artifactTypes, H as deckBlockTypes, I as deckSlideKinds } from './types-DTdDFU3O.cjs';
6
+ export { ArtifactCopyAsImageButton, ArtifactCopyAsImageButtonProps, ArtifactDownloadButton, ArtifactDownloadButtonProps, ArtifactDownloadMenu, ArtifactDownloadMenuCsvAction, ArtifactDownloadMenuPngAction, ArtifactDownloadMenuProps, ArtifactServices, ChartArtifact, DeckArtifact, TableArtifact, artifactToClipboardText, isSafeDownloadUrl } from './artifacts.cjs';
7
7
  export { ChatContext, ChatContextValue, ChatMessage, ChatMessageType, MESSAGE_ROLE, MessageRole, copyMessageText, useChatContext, useCopyToClipboard } from './chat.cjs';
8
8
  export { Icon, IconButton, IconButtonIntent, IconButtonProps, IconButtonSize, IconButtonVariant, IconProps } from './icon.cjs';
9
9
  export { IconCtrl, KEYBOARD_SHORTCUT_VARIANTS, KeyIcon, KeyboardShortcut, KeyboardShortcutProps, KeyboardShortcutVariant } from './keyboard-shortcut.cjs';
@@ -12,6 +12,8 @@ export { TextArea } from './text-area.cjs';
12
12
  export { T as TextAreaProps } from './types-CMzZsL_J.cjs';
13
13
  export { MarkdownTable, convertTableToCSV, escapeCsvField, markdownToPlainText, mergeRefs, parseMarkdownTable } from './utils.cjs';
14
14
  export { BUTTON_INTENT, BUTTON_SIZE, BUTTON_VARIANT, Button, ButtonIntent, ButtonProps, ButtonSize, ButtonVariant, ICON_POSITION, IconPosition } from './button.cjs';
15
+ export { Badge, BadgeProps, BadgeSize, BadgeTone, BadgeVariant } from './badge.cjs';
16
+ export { CopyButton, CopyButtonProps } from './copy-button.cjs';
15
17
  export { C as ChartSeries, a as ChartVariant } from './types-B2aYk82c.cjs';
16
18
  import 'react';
17
19
  import 'react/jsx-runtime';
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { ColorToken, TypographyStyle, TypographyType, colors, fontFamilies, typographyMixin, typographyStyles, typographyTypes } from './tokens.js';
2
- export { ArtifactRefBlock, ArtifactRefBlockService, Block, BlockContext, BlockContextValue, BlockServices, TextBlockService, useBlockContext } from './blocks.js';
3
- export { A as ArtifactRefBlockRecord, B as BlockComponentProps, a as BlockRecord, b as BlockService, c as BlockType, T as TextBlockRecord, d as blockTypes } from './types-D1b8v7EY.js';
2
+ export { ArtifactRefBlock, ArtifactRefBlockService, Block, BlockContext, BlockContextValue, BlockServices, NotificationDraftBlock, NotificationDraftBlockService, TextBlockService, useBlockContext } from './blocks.js';
3
+ export { A as ArtifactRefBlockRecord, B as BlockComponentProps, a as BlockRecord, b as BlockService, c as BlockType, N as NotificationChannel, d as NotificationDraftBlockRecord, e as NotificationDraftPayload, f as NotificationEmailType, g as NotificationRecipient, T as TextBlockRecord, h as blockTypes, n as notificationChannels, i as notificationEmailTypes } from './types-orOQcI2z.js';
4
4
  export { CHAT_STATUS, ChatStatus, MouseGrid, MouseGridProps, PromptInput, PromptInputFooter, PromptInputFooterProps, PromptInputMessage, PromptInputProps, PromptInputSubmit, PromptInputSubmitProps, PromptInputTextarea, PromptInputTextareaProps, PromptInputTools, PromptInputToolsProps, Suggestion, SuggestionProps, Suggestions, SuggestionsProps } from './ai-elements.js';
5
- export { A as ArtifactCallbacksOf, a as ArtifactDataRow, b as ArtifactLabelsOf, c as ArtifactRecord, d as ArtifactService, e as ArtifactServiceProps, f as ArtifactType, B as BarChartConfig, C as ChartArtifactLabels, g as ChartArtifactRecord, h as ChartConfig, i as ChartStats, D as DEFAULT_CHART_ARTIFACT_LABELS, j as DEFAULT_TABLE_ARTIFACT_LABELS, L as LineChartConfig, P as PieChartConfig, T as TableArtifactLabels, k as TableArtifactRecord, l as TableColumn, m as TableConfig, n as TableRow, o as TableStats, p as artifactTypes } from './types-GCkXbyFm.js';
6
- export { ArtifactCopyAsImageButton, ArtifactCopyAsImageButtonProps, ArtifactDownloadButton, ArtifactDownloadButtonProps, ArtifactDownloadMenu, ArtifactDownloadMenuCsvAction, ArtifactDownloadMenuPngAction, ArtifactDownloadMenuProps, ArtifactServices, ChartArtifact, TableArtifact, artifactToClipboardText, isSafeDownloadUrl } from './artifacts.js';
5
+ export { A as ArtifactCallbacksOf, a as ArtifactDataRow, b as ArtifactLabelsOf, c as ArtifactRecord, d as ArtifactService, e as ArtifactServiceProps, f as ArtifactType, B as BarChartConfig, C as ChartArtifactLabels, g as ChartArtifactRecord, h as ChartConfig, i as ChartStats, D as DEFAULT_CHART_ARTIFACT_LABELS, j as DEFAULT_DECK_ARTIFACT_LABELS, k as DEFAULT_TABLE_ARTIFACT_LABELS, l as DeckArtifactCallbacks, m as DeckArtifactLabels, n as DeckArtifactRecord, o as DeckBlock, p as DeckChartBlock, q as DeckConfig, r as DeckMeta, s as DeckSlide, t as DeckSlideKind, u as DeckStats, v as DeckTableBlock, w as DeckTextBlock, L as LineChartConfig, P as PieChartConfig, T as TableArtifactLabels, x as TableArtifactRecord, y as TableColumn, z as TableConfig, E as TableRow, F as TableStats, G as artifactTypes, H as deckBlockTypes, I as deckSlideKinds } from './types-C8JtnwNY.js';
6
+ export { ArtifactCopyAsImageButton, ArtifactCopyAsImageButtonProps, ArtifactDownloadButton, ArtifactDownloadButtonProps, ArtifactDownloadMenu, ArtifactDownloadMenuCsvAction, ArtifactDownloadMenuPngAction, ArtifactDownloadMenuProps, ArtifactServices, ChartArtifact, DeckArtifact, TableArtifact, artifactToClipboardText, isSafeDownloadUrl } from './artifacts.js';
7
7
  export { ChatContext, ChatContextValue, ChatMessage, ChatMessageType, MESSAGE_ROLE, MessageRole, copyMessageText, useChatContext, useCopyToClipboard } from './chat.js';
8
8
  export { Icon, IconButton, IconButtonIntent, IconButtonProps, IconButtonSize, IconButtonVariant, IconProps } from './icon.js';
9
9
  export { IconCtrl, KEYBOARD_SHORTCUT_VARIANTS, KeyIcon, KeyboardShortcut, KeyboardShortcutProps, KeyboardShortcutVariant } from './keyboard-shortcut.js';
@@ -12,6 +12,8 @@ export { TextArea } from './text-area.js';
12
12
  export { T as TextAreaProps } from './types-CMzZsL_J.js';
13
13
  export { MarkdownTable, convertTableToCSV, escapeCsvField, markdownToPlainText, mergeRefs, parseMarkdownTable } from './utils.js';
14
14
  export { BUTTON_INTENT, BUTTON_SIZE, BUTTON_VARIANT, Button, ButtonIntent, ButtonProps, ButtonSize, ButtonVariant, ICON_POSITION, IconPosition } from './button.js';
15
+ export { Badge, BadgeProps, BadgeSize, BadgeTone, BadgeVariant } from './badge.js';
16
+ export { CopyButton, CopyButtonProps } from './copy-button.js';
15
17
  export { C as ChartSeries, a as ChartVariant } from './types-B2aYk82c.js';
16
18
  import 'react';
17
19
  import 'react/jsx-runtime';
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import "./chunk-72TJUKMV.js";
2
1
  import {
3
2
  Lottie
4
3
  } from "./chunk-BIATJTD4.js";
@@ -7,7 +6,7 @@ import {
7
6
  IconCtrl,
8
7
  KEYBOARD_SHORTCUT_VARIANTS,
9
8
  KeyboardShortcut
10
- } from "./chunk-PGR2MDDU.js";
9
+ } from "./chunk-W66OJM55.js";
11
10
  import {
12
11
  convertTableToCSV,
13
12
  escapeCsvField,
@@ -19,24 +18,35 @@ import {
19
18
  ChatMessage,
20
19
  MESSAGE_ROLE,
21
20
  copyMessageText,
22
- useChatContext,
23
- useCopyToClipboard
24
- } from "./chunk-B6GAPZ2R.js";
21
+ useChatContext
22
+ } from "./chunk-FCSYVF4Z.js";
25
23
  import {
26
24
  BlockContext,
27
25
  useBlockContext
28
- } from "./chunk-JGMN6W72.js";
26
+ } from "./chunk-2X4KUXYP.js";
29
27
  import {
30
28
  ArtifactRefBlock,
31
29
  ArtifactRefBlockService,
32
30
  Block,
33
31
  BlockServices,
32
+ NotificationDraftBlock,
33
+ NotificationDraftBlockService,
34
34
  TextBlockService,
35
- blockTypes
36
- } from "./chunk-46ZYTBX5.js";
35
+ blockTypes,
36
+ notificationChannels,
37
+ notificationEmailTypes
38
+ } from "./chunk-JMHE3Q5K.js";
39
+ import {
40
+ CopyButton,
41
+ useCopyToClipboard
42
+ } from "./chunk-EIAWZXE4.js";
43
+ import "./chunk-72TJUKMV.js";
37
44
  import {
38
45
  markdownToPlainText
39
46
  } from "./chunk-NMKKU2UG.js";
47
+ import {
48
+ Badge
49
+ } from "./chunk-EXRNGIQ2.js";
40
50
  import {
41
51
  CHAT_STATUS,
42
52
  MouseGrid,
@@ -47,10 +57,10 @@ import {
47
57
  PromptInputTools,
48
58
  Suggestion,
49
59
  Suggestions
50
- } from "./chunk-4VE6ZXXW.js";
60
+ } from "./chunk-MQP57DOP.js";
51
61
  import {
52
62
  TextArea
53
- } from "./chunk-7OYIDM42.js";
63
+ } from "./chunk-XKURJ72I.js";
54
64
  import {
55
65
  mergeRefs
56
66
  } from "./chunk-KNYB3RL7.js";
@@ -60,8 +70,8 @@ import {
60
70
  BUTTON_VARIANT,
61
71
  Button,
62
72
  ICON_POSITION
63
- } from "./chunk-B4U37WIH.js";
64
- import "./chunk-RSRNSWJN.js";
73
+ } from "./chunk-CFCLVJIO.js";
74
+ import "./chunk-BHHJOG5X.js";
65
75
  import {
66
76
  ArtifactCopyAsImageButton,
67
77
  ArtifactDownloadButton,
@@ -69,20 +79,25 @@ import {
69
79
  ArtifactServices,
70
80
  ChartArtifact,
71
81
  DEFAULT_CHART_ARTIFACT_LABELS,
82
+ DEFAULT_DECK_ARTIFACT_LABELS,
72
83
  DEFAULT_TABLE_ARTIFACT_LABELS,
84
+ DeckArtifact,
73
85
  TableArtifact,
74
86
  artifactToClipboardText,
75
87
  artifactTypes,
88
+ deckBlockTypes,
89
+ deckSlideKinds,
76
90
  isSafeDownloadUrl
77
- } from "./chunk-6YZ65KPW.js";
91
+ } from "./chunk-DC5KYT2G.js";
92
+ import "./chunk-CSTCTO3B.js";
78
93
  import {
79
94
  IconButton
80
- } from "./chunk-PYDVANWI.js";
95
+ } from "./chunk-E36VI2HA.js";
81
96
  import "./chunk-LXYCT4YO.js";
82
97
  import {
83
98
  Icon
84
99
  } from "./chunk-OLJIJYB5.js";
85
- import "./chunk-PUVZ2S3F.js";
100
+ import "./chunk-G4NXVFXU.js";
86
101
  import "./chunk-C77QMQNT.js";
87
102
  import {
88
103
  fontFamilies,
@@ -92,8 +107,8 @@ import {
92
107
  } from "./chunk-UXT2H3FM.js";
93
108
  import {
94
109
  colors
95
- } from "./chunk-JF3P66JF.js";
96
- import "./chunk-4MZZH3WX.js";
110
+ } from "./chunk-SN3ORQSJ.js";
111
+ import "./chunk-HU5W7CGE.js";
97
112
  import "./chunk-P6GUNIAE.js";
98
113
  import "./chunk-5WRI5ZAA.js";
99
114
  export {
@@ -106,6 +121,7 @@ export {
106
121
  BUTTON_INTENT,
107
122
  BUTTON_SIZE,
108
123
  BUTTON_VARIANT,
124
+ Badge,
109
125
  Block,
110
126
  BlockContext,
111
127
  BlockServices,
@@ -114,8 +130,11 @@ export {
114
130
  ChartArtifact,
115
131
  ChatContext,
116
132
  ChatMessage,
133
+ CopyButton,
117
134
  DEFAULT_CHART_ARTIFACT_LABELS,
135
+ DEFAULT_DECK_ARTIFACT_LABELS,
118
136
  DEFAULT_TABLE_ARTIFACT_LABELS,
137
+ DeckArtifact,
119
138
  ICON_POSITION,
120
139
  Icon,
121
140
  IconButton,
@@ -125,6 +144,8 @@ export {
125
144
  Lottie,
126
145
  MESSAGE_ROLE,
127
146
  MouseGrid,
147
+ NotificationDraftBlock,
148
+ NotificationDraftBlockService,
128
149
  PromptInput,
129
150
  PromptInputFooter,
130
151
  PromptInputSubmit,
@@ -141,11 +162,15 @@ export {
141
162
  colors,
142
163
  convertTableToCSV,
143
164
  copyMessageText,
165
+ deckBlockTypes,
166
+ deckSlideKinds,
144
167
  escapeCsvField,
145
168
  fontFamilies,
146
169
  isSafeDownloadUrl,
147
170
  markdownToPlainText,
148
171
  mergeRefs,
172
+ notificationChannels,
173
+ notificationEmailTypes,
149
174
  parseMarkdownTable,
150
175
  typographyMixin,
151
176
  typographyStyles,
@@ -166,7 +166,9 @@ var colors = {
166
166
  "red-200": "#FECACA",
167
167
  "red-400": "#F7776C",
168
168
  "red-500": "#EF4444",
169
- "red-600": "#DC2626"
169
+ "red-600": "#DC2626",
170
+ // Deck
171
+ "deck-canvas": "#faf8f5"
170
172
  };
171
173
 
172
174
  // src/components/keyboard-shortcut/types.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/keyboard-shortcut/index.ts","../src/components/icon/icon.tsx","../src/components/icon/icon-styles.ts","../src/components/keyboard-shortcut/keyboard-shortcut-styles.ts","../src/tokens/colors.ts","../src/components/keyboard-shortcut/types.ts","../src/components/keyboard-shortcut/keyboard-shortcut.tsx","../src/components/keyboard-shortcut/icons/icon-ctrl.tsx"],"sourcesContent":["export { KeyboardShortcut } from \"./keyboard-shortcut\";\nexport { IconCtrl } from \"./icons/icon-ctrl\";\nexport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nexport type { KeyboardShortcutProps, KeyIcon, KeyboardShortcutVariant } from \"./types\";\n","import { forwardRef } from \"react\";\n\nimport { IconWrapper, getStrokeWidth } from \"./icon-styles\";\nimport type { IconProps } from \"./types\";\n\nconst DEFAULT_SIZE = 16;\n\nexport const Icon = forwardRef<HTMLSpanElement, IconProps>(function Icon(\n { icon: IconComponent, size = DEFAULT_SIZE, color, className, \"aria-label\": ariaLabel },\n ref\n) {\n return (\n <IconWrapper\n ref={ref}\n className={className}\n $color={color}\n aria-label={ariaLabel}\n role={ariaLabel ? \"img\" : undefined}\n >\n <IconComponent width={size} height={size} strokeWidth={getStrokeWidth(size)} />\n </IconWrapper>\n );\n});\n","import styled from \"styled-components\";\n\nexport const STROKE_WIDTH_BY_SIZE: Record<number, number> = {\n 12: 1.4,\n 14: 1.4,\n 16: 1.8,\n 18: 1.8,\n 20: 1.8,\n 24: 1.8,\n};\n\nexport const DEFAULT_STROKE_WIDTH = 1.8;\n\nexport function getStrokeWidth(size: number): number {\n return STROKE_WIDTH_BY_SIZE[size] ?? DEFAULT_STROKE_WIDTH;\n}\n\nexport const IconWrapper = styled.span<{ $color?: string }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({ $color }) => $color ?? \"currentColor\"};\n flex-shrink: 0;\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { colors } from \"../../tokens/colors\";\nimport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nimport type { KeyboardShortcutVariant } from \"./types\";\n\n// Fixed-color treatments (default) — tuned for dark surfaces / app chrome.\nconst variantStyles: Record<KeyboardShortcutVariant, ReturnType<typeof css>> = {\n [KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: css`\n border: 1px solid ${colors[\"white-alpha-40\"]};\n color: ${colors[\"brown-10\"]};\n `,\n [KEYBOARD_SHORTCUT_VARIANTS.FILLED]: css`\n background: ${colors[\"brown-80\"]};\n color: ${colors[\"brown-10\"]};\n `,\n};\n\n// `adaptive` treatments — border/fill + glyph follow the surrounding text color (currentColor) so\n// the chip reads on any surface (light or dark). Selected when the `adaptive` prop is set.\nconst adaptiveStyles: Record<KeyboardShortcutVariant, ReturnType<typeof css>> = {\n [KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: css`\n border: 1px solid color-mix(in oklch, currentColor 40%, transparent);\n color: currentColor;\n `,\n [KEYBOARD_SHORTCUT_VARIANTS.FILLED]: css`\n background: color-mix(in oklch, currentColor 12%, transparent);\n color: currentColor;\n `,\n};\n\nexport const Wrapper = styled.div`\n display: inline-flex;\n align-items: center;\n gap: 2px;\n`;\n\nexport const Key = styled.kbd<{ $variant: KeyboardShortcutVariant; $adaptive: boolean }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 2px;\n border-radius: 6px;\n ${({ $variant, $adaptive }) => ($adaptive ? adaptiveStyles : variantStyles)[$variant]};\n`;\n","export const colors = {\n // White\n white: \"#FFFFFF\",\n \"white-alpha-85\": \"rgba(255, 255, 255, 0.85)\",\n \"white-alpha-40\": \"rgba(255, 255, 255, 0.40)\",\n\n // Brown\n \"brown-10\": \"#FAF9F8\",\n \"brown-20\": \"#F5F3F0\",\n \"brown-30\": \"#EEEBE5\",\n \"brown-40\": \"#E6E2DA\",\n \"brown-50\": \"#CFCBC4\",\n \"brown-60\": \"#A19E99\",\n \"brown-70\": \"#73716D\",\n \"brown-80\": \"#5C5A57\",\n \"brown-90\": \"#2E2D2C\",\n \"brown-100\": \"#171716\",\n \"brown-alpha-12\": \"rgba(23, 23, 22, 0.12)\",\n \"brown-alpha-20\": \"rgba(23, 23, 22, 0.20)\",\n \"brown-alpha-55\": \"rgba(23, 23, 22, 0.55)\",\n \"brown-alpha-70\": \"rgba(23, 23, 22, 0.70)\",\n \"brown-alpha-80\": \"rgba(23, 23, 22, 0.80)\",\n \"brown-alpha-90\": \"rgba(23, 23, 22, 0.90)\",\n\n // Fuchsia\n \"fuchsia-50\": \"#FAF5FF\",\n \"fuchsia-300\": \"#F0ABFC\",\n \"fuchsia-500\": \"#D946EF\",\n \"fuchsia-600\": \"#C026D3\",\n \"fuchsia-800\": \"#86198F\",\n\n // Pink\n \"pink-50\": \"#FDF2F8\",\n \"pink-400\": \"#F472B6\",\n \"pink-600\": \"#DB2777\",\n \"pink-800\": \"#9D174D\",\n\n // Violet\n \"violet-50\": \"#F5F3FF\",\n \"violet-400\": \"#A78BFA\",\n \"violet-600\": \"#7C3AED\",\n \"violet-800\": \"#5B21B6\",\n\n // Indigo\n \"indigo-50\": \"#EEF2FF\",\n \"indigo-400\": \"#818CF8\",\n \"indigo-500\": \"#6366F1\",\n \"indigo-600\": \"#4F46E5\",\n \"indigo-800\": \"#3730A3\",\n\n // Cyan\n \"cyan-50\": \"#E7FEFF\",\n \"cyan-300\": \"#67E8F9\",\n \"cyan-600\": \"#0891B2\",\n \"cyan-900\": \"#164E63\",\n\n // Teal\n \"teal-50\": \"#EBFDF9\",\n \"teal-300\": \"#5EEAD4\",\n \"teal-600\": \"#0D9488\",\n\n // Rose\n \"rose-400\": \"#FB7185\",\n\n // Purple\n \"purple-400\": \"#C084FC\",\n\n // Blue\n \"blue-50\": \"#EFF6FF\",\n \"blue-100\": \"#DBEAFE\",\n \"blue-300\": \"#93C5FD\",\n \"blue-400\": \"#60A5FA\",\n \"blue-600\": \"#2563EB\",\n \"blue-800\": \"#1E40AF\",\n\n // Sky\n \"sky-300\": \"#7DD3FC\",\n\n // Green\n \"green-50\": \"#ECF9F0\",\n \"green-100\": \"#D4F1D9\",\n \"green-400\": \"#3DC269\",\n \"green-700\": \"#277C43\",\n \"green-800\": \"#1C5930\",\n\n // Orange\n \"orange-50\": \"#FFF7ED\",\n \"orange-100\": \"#FFEDD5\",\n \"orange-200\": \"#FED7AA\",\n \"orange-500\": \"#F97316\",\n \"orange-600\": \"#EA580C\",\n\n // Red\n \"red-50\": \"#FEF2F2\",\n \"red-100\": \"#FEE2E2\",\n \"red-200\": \"#FECACA\",\n \"red-400\": \"#F7776C\",\n \"red-500\": \"#EF4444\",\n \"red-600\": \"#DC2626\",\n} as const;\n\nexport type ColorToken = keyof typeof colors;\n","import type { ComponentType, SVGProps } from \"react\";\n\n/** An SVG icon component representing a single keyboard key (e.g., Cmd, Shift, a letter). */\nexport type KeyIcon = ComponentType<SVGProps<SVGSVGElement>>;\n\n/** Available visual variants for the keyboard shortcut display. */\nexport const KEYBOARD_SHORTCUT_VARIANTS = {\n /** Outlined keys with a subtle border + light glyph — for dark surfaces / app chrome. Default. */\n OUTLINED: \"outlined\",\n /** Filled keys with a solid background — for emphasis. */\n FILLED: \"filled\",\n} as const;\n\n/** Visual variant for the KeyboardShortcut component. */\nexport type KeyboardShortcutVariant = (typeof KEYBOARD_SHORTCUT_VARIANTS)[keyof typeof KEYBOARD_SHORTCUT_VARIANTS];\n\n/** Props for the KeyboardShortcut display component. */\nexport interface KeyboardShortcutProps {\n /** Ordered array of key icon components representing the shortcut (e.g., `[IconCommand, IconLetterK]` for ⌘K). */\n keys: KeyIcon[];\n /** Visual style variant. @default \"outlined\" */\n variant?: KeyboardShortcutVariant;\n /**\n * When true, the border + glyph (outlined) or fill + glyph (filled) follow the surrounding text\n * color (`currentColor`) instead of fixed tokens, so the chip reads on any surface — light or\n * dark. Use on surfaces where the fixed-color variants wouldn't read (e.g. a prompt-launcher hero\n * on a light backdrop). @default false\n */\n adaptive?: boolean;\n /** Additional CSS class name. */\n className?: string;\n}\n","import type { ReactElement } from \"react\";\n\nimport { Icon } from \"../icon/icon\";\nimport { Key, Wrapper } from \"./keyboard-shortcut-styles\";\nimport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nimport type { KeyboardShortcutProps } from \"./types\";\n\nexport function KeyboardShortcut({\n keys,\n variant = KEYBOARD_SHORTCUT_VARIANTS.OUTLINED,\n adaptive = false,\n className,\n}: KeyboardShortcutProps): ReactElement {\n return (\n <Wrapper className={className}>\n {keys.map((KeyComponent, index) => (\n <Key key={index} $variant={variant} $adaptive={adaptive}>\n <Icon icon={KeyComponent} size={12} />\n </Key>\n ))}\n </Wrapper>\n );\n}\n","import type { ReactElement, SVGProps } from \"react\";\n\nexport function IconCtrl(props: SVGProps<SVGSVGElement>): ReactElement {\n const { width = 24, height = 24, ...rest } = props;\n\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width={width} height={height} fill=\"none\" {...rest}>\n <text\n x=\"50%\"\n y=\"50%\"\n dominantBaseline=\"central\"\n textAnchor=\"middle\"\n fill=\"currentColor\"\n fontFamily=\"Geist, sans-serif\"\n fontWeight={300}\n fontSize={14}\n >\n Ctrl\n </text>\n </svg>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA2B;;;ACA3B,+BAAmB;AAEZ,IAAM,uBAA+C;AAAA,EAC1D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,IAAM,uBAAuB;AAE7B,SAAS,eAAe,MAAsB;AACnD,SAAO,qBAAqB,IAAI,KAAK;AACvC;AAEO,IAAM,cAAc,yBAAAA,QAAO;AAAA;AAAA;AAAA;AAAA,WAIvB,CAAC,EAAE,OAAO,MAAM,UAAU,cAAc;AAAA;AAAA;;;ADF7C;AAdN,IAAM,eAAe;AAEd,IAAM,WAAO,yBAAuC,SAASC,MAClE,EAAE,MAAM,eAAe,OAAO,cAAc,OAAO,WAAW,cAAc,UAAU,GAC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c,UACvB,6CAAC,OAAgB,UAAU,SAAS,WAAW,UAC7C,uDAAC,QAAK,MAAM,cAAc,MAAM,IAAI,KAD5B,KAEV,CACD,GACH;AAEJ;;;ACfM,IAAAC,sBAAA;AALC,SAAS,SAAS,OAA8C;AACrE,QAAM,EAAE,QAAQ,IAAI,SAAS,IAAI,GAAG,KAAK,IAAI;AAE7C,SACE,6CAAC,SAAI,OAAM,8BAA6B,SAAQ,aAAY,OAAc,QAAgB,MAAK,QAAQ,GAAG,MACxG;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,GAAE;AAAA,MACF,kBAAiB;AAAA,MACjB,YAAW;AAAA,MACX,MAAK;AAAA,MACL,YAAW;AAAA,MACX,YAAY;AAAA,MACZ,UAAU;AAAA,MACX;AAAA;AAAA,EAED,GACF;AAEJ;","names":["styled","Icon","import_styled_components","styled","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/components/keyboard-shortcut/index.ts","../src/components/icon/icon.tsx","../src/components/icon/icon-styles.ts","../src/components/keyboard-shortcut/keyboard-shortcut-styles.ts","../src/tokens/colors.ts","../src/components/keyboard-shortcut/types.ts","../src/components/keyboard-shortcut/keyboard-shortcut.tsx","../src/components/keyboard-shortcut/icons/icon-ctrl.tsx"],"sourcesContent":["export { KeyboardShortcut } from \"./keyboard-shortcut\";\nexport { IconCtrl } from \"./icons/icon-ctrl\";\nexport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nexport type { KeyboardShortcutProps, KeyIcon, KeyboardShortcutVariant } from \"./types\";\n","import { forwardRef } from \"react\";\n\nimport { IconWrapper, getStrokeWidth } from \"./icon-styles\";\nimport type { IconProps } from \"./types\";\n\nconst DEFAULT_SIZE = 16;\n\nexport const Icon = forwardRef<HTMLSpanElement, IconProps>(function Icon(\n { icon: IconComponent, size = DEFAULT_SIZE, color, className, \"aria-label\": ariaLabel },\n ref\n) {\n return (\n <IconWrapper\n ref={ref}\n className={className}\n $color={color}\n aria-label={ariaLabel}\n role={ariaLabel ? \"img\" : undefined}\n >\n <IconComponent width={size} height={size} strokeWidth={getStrokeWidth(size)} />\n </IconWrapper>\n );\n});\n","import styled from \"styled-components\";\n\nexport const STROKE_WIDTH_BY_SIZE: Record<number, number> = {\n 12: 1.4,\n 14: 1.4,\n 16: 1.8,\n 18: 1.8,\n 20: 1.8,\n 24: 1.8,\n};\n\nexport const DEFAULT_STROKE_WIDTH = 1.8;\n\nexport function getStrokeWidth(size: number): number {\n return STROKE_WIDTH_BY_SIZE[size] ?? DEFAULT_STROKE_WIDTH;\n}\n\nexport const IconWrapper = styled.span<{ $color?: string }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({ $color }) => $color ?? \"currentColor\"};\n flex-shrink: 0;\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { colors } from \"../../tokens/colors\";\nimport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nimport type { KeyboardShortcutVariant } from \"./types\";\n\n// Fixed-color treatments (default) — tuned for dark surfaces / app chrome.\nconst variantStyles: Record<KeyboardShortcutVariant, ReturnType<typeof css>> = {\n [KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: css`\n border: 1px solid ${colors[\"white-alpha-40\"]};\n color: ${colors[\"brown-10\"]};\n `,\n [KEYBOARD_SHORTCUT_VARIANTS.FILLED]: css`\n background: ${colors[\"brown-80\"]};\n color: ${colors[\"brown-10\"]};\n `,\n};\n\n// `adaptive` treatments — border/fill + glyph follow the surrounding text color (currentColor) so\n// the chip reads on any surface (light or dark). Selected when the `adaptive` prop is set.\nconst adaptiveStyles: Record<KeyboardShortcutVariant, ReturnType<typeof css>> = {\n [KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: css`\n border: 1px solid color-mix(in oklch, currentColor 40%, transparent);\n color: currentColor;\n `,\n [KEYBOARD_SHORTCUT_VARIANTS.FILLED]: css`\n background: color-mix(in oklch, currentColor 12%, transparent);\n color: currentColor;\n `,\n};\n\nexport const Wrapper = styled.div`\n display: inline-flex;\n align-items: center;\n gap: 2px;\n`;\n\nexport const Key = styled.kbd<{ $variant: KeyboardShortcutVariant; $adaptive: boolean }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 2px;\n border-radius: 6px;\n ${({ $variant, $adaptive }) => ($adaptive ? adaptiveStyles : variantStyles)[$variant]};\n`;\n","export const colors = {\n // White\n white: \"#FFFFFF\",\n \"white-alpha-85\": \"rgba(255, 255, 255, 0.85)\",\n \"white-alpha-40\": \"rgba(255, 255, 255, 0.40)\",\n\n // Brown\n \"brown-10\": \"#FAF9F8\",\n \"brown-20\": \"#F5F3F0\",\n \"brown-30\": \"#EEEBE5\",\n \"brown-40\": \"#E6E2DA\",\n \"brown-50\": \"#CFCBC4\",\n \"brown-60\": \"#A19E99\",\n \"brown-70\": \"#73716D\",\n \"brown-80\": \"#5C5A57\",\n \"brown-90\": \"#2E2D2C\",\n \"brown-100\": \"#171716\",\n \"brown-alpha-12\": \"rgba(23, 23, 22, 0.12)\",\n \"brown-alpha-20\": \"rgba(23, 23, 22, 0.20)\",\n \"brown-alpha-55\": \"rgba(23, 23, 22, 0.55)\",\n \"brown-alpha-70\": \"rgba(23, 23, 22, 0.70)\",\n \"brown-alpha-80\": \"rgba(23, 23, 22, 0.80)\",\n \"brown-alpha-90\": \"rgba(23, 23, 22, 0.90)\",\n\n // Fuchsia\n \"fuchsia-50\": \"#FAF5FF\",\n \"fuchsia-300\": \"#F0ABFC\",\n \"fuchsia-500\": \"#D946EF\",\n \"fuchsia-600\": \"#C026D3\",\n \"fuchsia-800\": \"#86198F\",\n\n // Pink\n \"pink-50\": \"#FDF2F8\",\n \"pink-400\": \"#F472B6\",\n \"pink-600\": \"#DB2777\",\n \"pink-800\": \"#9D174D\",\n\n // Violet\n \"violet-50\": \"#F5F3FF\",\n \"violet-400\": \"#A78BFA\",\n \"violet-600\": \"#7C3AED\",\n \"violet-800\": \"#5B21B6\",\n\n // Indigo\n \"indigo-50\": \"#EEF2FF\",\n \"indigo-400\": \"#818CF8\",\n \"indigo-500\": \"#6366F1\",\n \"indigo-600\": \"#4F46E5\",\n \"indigo-800\": \"#3730A3\",\n\n // Cyan\n \"cyan-50\": \"#E7FEFF\",\n \"cyan-300\": \"#67E8F9\",\n \"cyan-600\": \"#0891B2\",\n \"cyan-900\": \"#164E63\",\n\n // Teal\n \"teal-50\": \"#EBFDF9\",\n \"teal-300\": \"#5EEAD4\",\n \"teal-600\": \"#0D9488\",\n\n // Rose\n \"rose-400\": \"#FB7185\",\n\n // Purple\n \"purple-400\": \"#C084FC\",\n\n // Blue\n \"blue-50\": \"#EFF6FF\",\n \"blue-100\": \"#DBEAFE\",\n \"blue-300\": \"#93C5FD\",\n \"blue-400\": \"#60A5FA\",\n \"blue-600\": \"#2563EB\",\n \"blue-800\": \"#1E40AF\",\n\n // Sky\n \"sky-300\": \"#7DD3FC\",\n\n // Green\n \"green-50\": \"#ECF9F0\",\n \"green-100\": \"#D4F1D9\",\n \"green-400\": \"#3DC269\",\n \"green-700\": \"#277C43\",\n \"green-800\": \"#1C5930\",\n\n // Orange\n \"orange-50\": \"#FFF7ED\",\n \"orange-100\": \"#FFEDD5\",\n \"orange-200\": \"#FED7AA\",\n \"orange-500\": \"#F97316\",\n \"orange-600\": \"#EA580C\",\n\n // Red\n \"red-50\": \"#FEF2F2\",\n \"red-100\": \"#FEE2E2\",\n \"red-200\": \"#FECACA\",\n \"red-400\": \"#F7776C\",\n \"red-500\": \"#EF4444\",\n \"red-600\": \"#DC2626\",\n\n // Deck\n \"deck-canvas\": \"#faf8f5\",\n} as const;\n\nexport type ColorToken = keyof typeof colors;\n","import type { ComponentType, SVGProps } from \"react\";\n\n/** An SVG icon component representing a single keyboard key (e.g., Cmd, Shift, a letter). */\nexport type KeyIcon = ComponentType<SVGProps<SVGSVGElement>>;\n\n/** Available visual variants for the keyboard shortcut display. */\nexport const KEYBOARD_SHORTCUT_VARIANTS = {\n /** Outlined keys with a subtle border + light glyph — for dark surfaces / app chrome. Default. */\n OUTLINED: \"outlined\",\n /** Filled keys with a solid background — for emphasis. */\n FILLED: \"filled\",\n} as const;\n\n/** Visual variant for the KeyboardShortcut component. */\nexport type KeyboardShortcutVariant = (typeof KEYBOARD_SHORTCUT_VARIANTS)[keyof typeof KEYBOARD_SHORTCUT_VARIANTS];\n\n/** Props for the KeyboardShortcut display component. */\nexport interface KeyboardShortcutProps {\n /** Ordered array of key icon components representing the shortcut (e.g., `[IconCommand, IconLetterK]` for ⌘K). */\n keys: KeyIcon[];\n /** Visual style variant. @default \"outlined\" */\n variant?: KeyboardShortcutVariant;\n /**\n * When true, the border + glyph (outlined) or fill + glyph (filled) follow the surrounding text\n * color (`currentColor`) instead of fixed tokens, so the chip reads on any surface — light or\n * dark. Use on surfaces where the fixed-color variants wouldn't read (e.g. a prompt-launcher hero\n * on a light backdrop). @default false\n */\n adaptive?: boolean;\n /** Additional CSS class name. */\n className?: string;\n}\n","import type { ReactElement } from \"react\";\n\nimport { Icon } from \"../icon/icon\";\nimport { Key, Wrapper } from \"./keyboard-shortcut-styles\";\nimport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nimport type { KeyboardShortcutProps } from \"./types\";\n\nexport function KeyboardShortcut({\n keys,\n variant = KEYBOARD_SHORTCUT_VARIANTS.OUTLINED,\n adaptive = false,\n className,\n}: KeyboardShortcutProps): ReactElement {\n return (\n <Wrapper className={className}>\n {keys.map((KeyComponent, index) => (\n <Key key={index} $variant={variant} $adaptive={adaptive}>\n <Icon icon={KeyComponent} size={12} />\n </Key>\n ))}\n </Wrapper>\n );\n}\n","import type { ReactElement, SVGProps } from \"react\";\n\nexport function IconCtrl(props: SVGProps<SVGSVGElement>): ReactElement {\n const { width = 24, height = 24, ...rest } = props;\n\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width={width} height={height} fill=\"none\" {...rest}>\n <text\n x=\"50%\"\n y=\"50%\"\n dominantBaseline=\"central\"\n textAnchor=\"middle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led_components","styled","import_jsx_runtime","import_jsx_runtime"]}
@@ -2,9 +2,9 @@ import {
2
2
  IconCtrl,
3
3
  KEYBOARD_SHORTCUT_VARIANTS,
4
4
  KeyboardShortcut
5
- } from "./chunk-PGR2MDDU.js";
5
+ } from "./chunk-W66OJM55.js";
6
6
  import "./chunk-OLJIJYB5.js";
7
- import "./chunk-JF3P66JF.js";
7
+ import "./chunk-SN3ORQSJ.js";
8
8
  import "./chunk-5WRI5ZAA.js";
9
9
  export {
10
10
  IconCtrl,
package/dist/table.cjs CHANGED
@@ -30,6 +30,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/components/table/index.ts
31
31
  var table_exports = {};
32
32
  __export(table_exports, {
33
+ DATA_TABLE_CELL_CLASS: () => DATA_TABLE_CELL_CLASS,
34
+ DATA_TABLE_HEAD_CLASS: () => DATA_TABLE_HEAD_CLASS,
35
+ DATA_TABLE_ROW_CLASS: () => DATA_TABLE_ROW_CLASS,
36
+ DATA_TABLE_SCROLL_SHADOW: () => DATA_TABLE_SCROLL_SHADOW,
37
+ DataTable: () => DataTable,
33
38
  Table: () => Table,
34
39
  TableBody: () => TableBody,
35
40
  TableCaption: () => TableCaption,
@@ -127,8 +132,43 @@ function useScrollShadow() {
127
132
  }, []);
128
133
  return { targetRef, isScrolled };
129
134
  }
135
+
136
+ // src/components/table/data-table.tsx
137
+ var import_jsx_runtime2 = require("react/jsx-runtime");
138
+ var DATA_TABLE_HEAD_CLASS = "h-auto py-2 px-4 text-xs font-medium text-foreground whitespace-nowrap text-left";
139
+ var DATA_TABLE_CELL_CLASS = "p-4 text-sm font-normal text-foreground align-top min-w-[150px] text-left";
140
+ var DATA_TABLE_ROW_CLASS = "border-b-brown-30 bg-background/70 hover:bg-secondary";
141
+ var DATA_TABLE_SCROLL_SHADOW = "0 1px 2px rgb(0 0 0 / 0.01), 0 6px 12px -2px rgb(0 0 0 / 0.03)";
142
+ function DataTable({ header, children, maxBodyHeight, className }) {
143
+ const { targetRef, isScrolled } = useScrollShadow();
144
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
145
+ "div",
146
+ {
147
+ ref: targetRef,
148
+ className: cn("overscroll-none", className),
149
+ style: maxBodyHeight !== void 0 ? { maxHeight: maxBodyHeight, overflowY: "auto" } : void 0,
150
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Table, { containerClassName: "overflow-visible", children: [
151
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
152
+ TableHeader,
153
+ {
154
+ "data-scrolled": isScrolled ? "true" : void 0,
155
+ className: "sticky top-0 z-10 bg-background/70 backdrop-blur-lg transition-shadow",
156
+ style: isScrolled ? { boxShadow: DATA_TABLE_SCROLL_SHADOW } : void 0,
157
+ children: header
158
+ }
159
+ ),
160
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableBody, { children })
161
+ ] })
162
+ }
163
+ );
164
+ }
130
165
  // Annotate the CommonJS export names for ESM import in node:
131
166
  0 && (module.exports = {
167
+ DATA_TABLE_CELL_CLASS,
168
+ DATA_TABLE_HEAD_CLASS,
169
+ DATA_TABLE_ROW_CLASS,
170
+ DATA_TABLE_SCROLL_SHADOW,
171
+ DataTable,
132
172
  Table,
133
173
  TableBody,
134
174
  TableCaption,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/table/index.ts","../src/components/ui/table.tsx","../src/lib/utils.ts","../src/components/table/use-scroll-shadow.ts"],"sourcesContent":["/**\n * Public clay table primitives — shadcn-style compound components.\n *\n * Consumers compose tables at the call site from these parts (no wrapper, no smart `Table`):\n *\n * ```tsx\n * import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from \"@shapesos/clay/table\";\n *\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableHead>Name</TableHead>\n * <TableHead>Count</TableHead>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map((row) => (\n * <TableRow key={row.id}>\n * <TableCell>{row.name}</TableCell>\n * <TableCell>{row.count}</TableCell>\n * </TableRow>\n * ))}\n * </TableBody>\n * </Table>\n * ```\n *\n * `Table` extends shadcn's primitive with a `containerClassName` prop so callers can override the\n * wrapping `<div>`'s `overflow-auto` — needed when the table sits inside an outer scroll container\n * (e.g. an artifact card) and you want the sticky-header containing block to align with that\n * outer container.\n *\n * **Style note:** these primitives use Tailwind v4 + the clay theme tokens (`bg-muted`,\n * `text-muted-foreground`, `border-border`, etc.). Consumers must import the compiled stylesheet\n * alongside the JS:\n *\n * ```ts\n * import \"@shapesos/clay/blocks/styles.css\";\n * ```\n *\n * (The stylesheet name is `blocks/styles.css` for historical reasons — it's the single bundle\n * that compiles all clay-side Tailwind output, including the table primitives.)\n */\nexport {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@/components/ui/table\";\nexport { useScrollShadow } from \"./use-scroll-shadow\";\n","import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\n/** Extension of shadcn's `Table` registry component: exposes `containerClassName` so callers can\n * override the wrapping `<div>`'s default `overflow-auto`. We need this for sticky-header support\n * (sticky uses the nearest overflow ancestor as its containing block — when the actual scroll\n * container is one level out, the inner overflow-auto needs to be neutralised with\n * `overflow-visible` so sticky aligns with the real scrolling parent). */\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement> & { containerClassName?: string }\n>(({ className, containerClassName, ...props }, ref) => (\n <div className={cn(\"relative w-full overflow-auto\", containerClassName)}>\n <table ref={ref} className={cn(\"w-full caption-bottom text-sm\", className)} {...props} />\n </div>\n));\nTable.displayName = \"Table\";\n\nconst TableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n);\nTableHeader.displayName = \"TableHeader\";\n\nconst TableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn(\"[&_tr:last-child]:border-0\", className)} {...props} />\n )\n);\nTableBody.displayName = \"TableBody\";\n\nconst TableFooter = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => (\n <tfoot ref={ref} className={cn(\"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\", className)} {...props} />\n )\n);\nTableFooter.displayName = \"TableFooter\";\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\", className)}\n {...props}\n />\n )\n);\nTableRow.displayName = \"TableRow\";\n\nconst TableHead = React.forwardRef<HTMLTableCellElement, React.ThHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0\",\n className\n )}\n {...props}\n />\n )\n);\nTableHead.displayName = \"TableHead\";\n\nconst TableCell = React.forwardRef<HTMLTableCellElement, React.TdHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <td ref={ref} className={cn(\"p-4 align-middle [&:has([role=checkbox])]:pr-0\", className)} {...props} />\n )\n);\nTableCell.displayName = \"TableCell\";\n\nconst TableCaption = React.forwardRef<HTMLTableCaptionElement, React.HTMLAttributes<HTMLTableCaptionElement>>(\n ({ className, ...props }, ref) => (\n <caption ref={ref} className={cn(\"mt-4 text-sm text-muted-foreground\", className)} {...props} />\n )\n);\nTableCaption.displayName = \"TableCaption\";\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Combines class names using clsx and tailwind-merge — the standard shadcn/ui helper.\n * Tailwind classes that conflict (e.g. `p-2 p-4`) get merged so the last one wins.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","import { useEffect, useRef, useState, type RefObject } from \"react\";\n\n/**\n * Tracks whether a scroll container has scrolled past its top edge, for sticky-header shadow effects.\n *\n * Returns `targetRef` (attach to the scroll container itself or any element inside it) and\n * `isScrolled` (true once the container's `scrollTop > 0`). On mount the hook walks up the DOM\n * from the target to find the nearest overflow ancestor (or uses the target itself if it already\n * has `overflowY: auto | scroll`), then listens to its `scroll` event.\n *\n * Used to surface a subtle \"scroll lift\" shadow under sticky headers so users know there is\n * content hidden above.\n *\n * **Why a scroll listener and not a sentinel + IntersectionObserver:** an earlier version used a\n * 1px sentinel as the first child of the scroll container. The sentinel's height pushed the thead\n * down by one pixel in normal flow, and as soon as the user scrolled the thead snapped up to its\n * sticky position — a visible 1px jitter. A scroll listener has no layout footprint.\n *\n * `passive: true` so the listener doesn't block native scroll smoothness; we never call\n * `preventDefault`.\n */\nexport function useScrollShadow(): {\n targetRef: RefObject<HTMLDivElement | null>;\n isScrolled: boolean;\n} {\n const targetRef = useRef<HTMLDivElement>(null);\n const [isScrolled, setIsScrolled] = useState(false);\n\n useEffect(() => {\n const target = targetRef.current;\n if (!target) return;\n\n let scrollContainer: HTMLElement | null = target;\n while (scrollContainer) {\n const overflowY = getComputedStyle(scrollContainer).overflowY;\n if (overflowY === \"auto\" || overflowY === \"scroll\") break;\n scrollContainer = scrollContainer.parentElement;\n }\n if (!scrollContainer) return;\n\n setIsScrolled(scrollContainer.scrollTop > 0);\n\n const handleScroll = () => {\n if (!scrollContainer) return;\n setIsScrolled(scrollContainer.scrollTop > 0);\n };\n scrollContainer.addEventListener(\"scroll\", handleScroll, { passive: true });\n return () => scrollContainer.removeEventListener(\"scroll\", handleScroll);\n }, []);\n\n return { targetRef, isScrolled };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,UAAU,cAAc;AAExB,IAAM,YAAkB;AAAA,EACtB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,4CAAC,QAAG,KAAU,WAAW,GAAG,kDAAkD,SAAS,GAAI,GAAG,OAAO;AAEzG;AACA,UAAU,cAAc;AAExB,IAAM,eAAqB;AAAA,EACzB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,4CAAC,aAAQ,KAAU,WAAW,GAAG,sCAAsC,SAAS,GAAI,GAAG,OAAO;AAElG;AACA,aAAa,cAAc;;;AE3E3B,mBAA4D;AAqBrD,SAAS,kBAGd;AACA,QAAM,gBAAY,qBAAuB,IAAI;AAC7C,QAAM,CAAC,YAAY,aAAa,QAAI,uBAAS,KAAK;AAElD,8BAAU,MAAM;AACd,UAAM,SAAS,UAAU;AACzB,QAAI,CAAC,OAAQ;AAEb,QAAI,kBAAsC;AAC1C,WAAO,iBAAiB;AACtB,YAAM,YAAY,iBAAiB,eAAe,EAAE;AACpD,UAAI,cAAc,UAAU,cAAc,SAAU;AACpD,wBAAkB,gBAAgB;AAAA,IACpC;AACA,QAAI,CAAC,gBAAiB;AAEtB,kBAAc,gBAAgB,YAAY,CAAC;AAE3C,UAAM,eAAe,MAAM;AACzB,UAAI,CAAC,gBAAiB;AACtB,oBAAc,gBAAgB,YAAY,CAAC;AAAA,IAC7C;AACA,oBAAgB,iBAAiB,UAAU,cAAc,EAAE,SAAS,KAAK,CAAC;AAC1E,WAAO,MAAM,gBAAgB,oBAAoB,UAAU,YAAY;AAAA,EACzE,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,WAAW,WAAW;AACjC;","names":[]}
1
+ {"version":3,"sources":["../src/components/table/index.ts","../src/components/ui/table.tsx","../src/lib/utils.ts","../src/components/table/use-scroll-shadow.ts","../src/components/table/data-table.tsx"],"sourcesContent":["/**\n * Public clay table primitives — shadcn-style compound components.\n *\n * Consumers compose tables at the call site from these parts (no wrapper, no smart `Table`):\n *\n * ```tsx\n * import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from \"@shapesos/clay/table\";\n *\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableHead>Name</TableHead>\n * <TableHead>Count</TableHead>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map((row) => (\n * <TableRow key={row.id}>\n * <TableCell>{row.name}</TableCell>\n * <TableCell>{row.count}</TableCell>\n * </TableRow>\n * ))}\n * </TableBody>\n * </Table>\n * ```\n *\n * `Table` extends shadcn's primitive with a `containerClassName` prop so callers can override the\n * wrapping `<div>`'s `overflow-auto` — needed when the table sits inside an outer scroll container\n * (e.g. an artifact card) and you want the sticky-header containing block to align with that\n * outer container.\n *\n * **Style note:** these primitives use Tailwind v4 + the clay theme tokens (`bg-muted`,\n * `text-muted-foreground`, `border-border`, etc.). Consumers must import the compiled stylesheet\n * alongside the JS:\n *\n * ```ts\n * import \"@shapesos/clay/blocks/styles.css\";\n * ```\n *\n * (The stylesheet name is `blocks/styles.css` for historical reasons — it's the single bundle\n * that compiles all clay-side Tailwind output, including the table primitives.)\n */\nexport {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@/components/ui/table\";\nexport { useScrollShadow } from \"./use-scroll-shadow\";\nexport {\n DataTable,\n DATA_TABLE_CELL_CLASS,\n DATA_TABLE_HEAD_CLASS,\n DATA_TABLE_ROW_CLASS,\n DATA_TABLE_SCROLL_SHADOW,\n} from \"./data-table\";\nexport type { DataTableProps } from \"./data-table\";\n","import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\n/** Extension of shadcn's `Table` registry component: exposes `containerClassName` so callers can\n * override the wrapping `<div>`'s default `overflow-auto`. We need this for sticky-header support\n * (sticky uses the nearest overflow ancestor as its containing block — when the actual scroll\n * container is one level out, the inner overflow-auto needs to be neutralised with\n * `overflow-visible` so sticky aligns with the real scrolling parent). */\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement> & { containerClassName?: string }\n>(({ className, containerClassName, ...props }, ref) => (\n <div className={cn(\"relative w-full overflow-auto\", containerClassName)}>\n <table ref={ref} className={cn(\"w-full caption-bottom text-sm\", className)} {...props} />\n </div>\n));\nTable.displayName = \"Table\";\n\nconst TableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n);\nTableHeader.displayName = \"TableHeader\";\n\nconst TableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn(\"[&_tr:last-child]:border-0\", className)} {...props} />\n )\n);\nTableBody.displayName = \"TableBody\";\n\nconst TableFooter = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => (\n <tfoot ref={ref} className={cn(\"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\", className)} {...props} />\n )\n);\nTableFooter.displayName = \"TableFooter\";\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\", className)}\n {...props}\n />\n )\n);\nTableRow.displayName = \"TableRow\";\n\nconst TableHead = React.forwardRef<HTMLTableCellElement, React.ThHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0\",\n className\n )}\n {...props}\n />\n )\n);\nTableHead.displayName = \"TableHead\";\n\nconst TableCell = React.forwardRef<HTMLTableCellElement, React.TdHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <td ref={ref} className={cn(\"p-4 align-middle [&:has([role=checkbox])]:pr-0\", className)} {...props} />\n )\n);\nTableCell.displayName = \"TableCell\";\n\nconst TableCaption = React.forwardRef<HTMLTableCaptionElement, React.HTMLAttributes<HTMLTableCaptionElement>>(\n ({ className, ...props }, ref) => (\n <caption ref={ref} className={cn(\"mt-4 text-sm text-muted-foreground\", className)} {...props} />\n )\n);\nTableCaption.displayName = \"TableCaption\";\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Combines class names using clsx and tailwind-merge — the standard shadcn/ui helper.\n * Tailwind classes that conflict (e.g. `p-2 p-4`) get merged so the last one wins.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","import { useEffect, useRef, useState, type RefObject } from \"react\";\n\n/**\n * Tracks whether a scroll container has scrolled past its top edge, for sticky-header shadow effects.\n *\n * Returns `targetRef` (attach to the scroll container itself or any element inside it) and\n * `isScrolled` (true once the container's `scrollTop > 0`). On mount the hook walks up the DOM\n * from the target to find the nearest overflow ancestor (or uses the target itself if it already\n * has `overflowY: auto | scroll`), then listens to its `scroll` event.\n *\n * Used to surface a subtle \"scroll lift\" shadow under sticky headers so users know there is\n * content hidden above.\n *\n * **Why a scroll listener and not a sentinel + IntersectionObserver:** an earlier version used a\n * 1px sentinel as the first child of the scroll container. The sentinel's height pushed the thead\n * down by one pixel in normal flow, and as soon as the user scrolled the thead snapped up to its\n * sticky position — a visible 1px jitter. A scroll listener has no layout footprint.\n *\n * `passive: true` so the listener doesn't block native scroll smoothness; we never call\n * `preventDefault`.\n */\nexport function useScrollShadow(): {\n targetRef: RefObject<HTMLDivElement | null>;\n isScrolled: boolean;\n} {\n const targetRef = useRef<HTMLDivElement>(null);\n const [isScrolled, setIsScrolled] = useState(false);\n\n useEffect(() => {\n const target = targetRef.current;\n if (!target) return;\n\n let scrollContainer: HTMLElement | null = target;\n while (scrollContainer) {\n const overflowY = getComputedStyle(scrollContainer).overflowY;\n if (overflowY === \"auto\" || overflowY === \"scroll\") break;\n scrollContainer = scrollContainer.parentElement;\n }\n if (!scrollContainer) return;\n\n setIsScrolled(scrollContainer.scrollTop > 0);\n\n const handleScroll = () => {\n if (!scrollContainer) return;\n setIsScrolled(scrollContainer.scrollTop > 0);\n };\n scrollContainer.addEventListener(\"scroll\", handleScroll, { passive: true });\n return () => scrollContainer.removeEventListener(\"scroll\", handleScroll);\n }, []);\n\n return { targetRef, isScrolled };\n}\n","import type { ReactNode } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Table, TableBody, TableHeader } from \"@/components/ui/table\";\nimport { useScrollShadow } from \"./use-scroll-shadow\";\n\n/**\n * Header cell class — compact, left-aligned, non-wrapping. Apply to each `<TableHead>` composed at\n * the call site so every clay data table shares one header treatment.\n */\nexport const DATA_TABLE_HEAD_CLASS = \"h-auto py-2 px-4 text-xs font-medium text-foreground whitespace-nowrap text-left\";\n\n/** Body cell class — roomy padding, top-aligned, left-aligned, min width so columns don't collapse. */\nexport const DATA_TABLE_CELL_CLASS = \"p-4 text-sm font-normal text-foreground align-top min-w-[150px] text-left\";\n\n/**\n * Data-row class matching the frosted-glass card scheme: `border-b-brown-30` overrides shadcn's\n * default `--color-border` (brown-40) with the lighter brown-30; hover lifts to opaque `bg-secondary`.\n */\nexport const DATA_TABLE_ROW_CLASS = \"border-b-brown-30 bg-background/70 hover:bg-secondary\";\n\n/** Layered drop-shadow for the scroll-lift effect on the sticky header. */\nexport const DATA_TABLE_SCROLL_SHADOW = \"0 1px 2px rgb(0 0 0 / 0.01), 0 6px 12px -2px rgb(0 0 0 / 0.03)\";\n\nexport interface DataTableProps {\n /**\n * Header row content — typically a single `<TableRow>` of `<TableHead>` cells (use\n * `DATA_TABLE_HEAD_CLASS`). Rendered inside the sticky, frosted `<TableHeader>` shell.\n */\n header: ReactNode;\n /** Body rows composed at the call site (`<TableRow>`/`<TableCell>`). */\n children: ReactNode;\n /** Max body height (px) before vertical scroll engages. Omit for no cap (grows to content). */\n maxBodyHeight?: number;\n /** Extra classes for the scroll container. */\n className?: string;\n}\n\n/**\n * Shared styled-table shell — the scroll container, sticky frosted (`bg-background/70\n * backdrop-blur-lg`) header, and scroll-lift shadow (via {@link useScrollShadow}) that give clay\n * data tables (table artifact, notification-draft recipients) one consistent look. Callers compose\n * the header cells and body rows at the call site; this is only the shell.\n */\nexport function DataTable({ header, children, maxBodyHeight, className }: DataTableProps): ReactNode {\n const { targetRef, isScrolled } = useScrollShadow();\n return (\n <div\n ref={targetRef}\n className={cn(\"overscroll-none\", className)}\n style={maxBodyHeight !== undefined ? { maxHeight: maxBodyHeight, overflowY: \"auto\" } : undefined}\n >\n <Table containerClassName=\"overflow-visible\">\n <TableHeader\n data-scrolled={isScrolled ? \"true\" : undefined}\n className=\"sticky top-0 z-10 bg-background/70 backdrop-blur-lg transition-shadow\"\n style={isScrolled ? { boxShadow: DATA_TABLE_SCROLL_SHADOW } : undefined}\n >\n {header}\n </TableHeader>\n <TableBody>{children}</TableBody>\n </Table>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;;;ACAvB,kBAAsC;AACtC,4BAAwB;AAMjB,SAAS,MAAM,QAA8B;AAClD,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADKI;AALJ,IAAM,QAAc,iBAGlB,CAAC,EAAE,WAAW,oBAAoB,GAAG,MAAM,GAAG,QAC9C,4CAAC,SAAI,WAAW,GAAG,iCAAiC,kBAAkB,GACpE,sDAAC,WAAM,KAAU,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OA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;AAAA;AAAA,QACH;AAAA,QACA,6CAAC,aAAW,UAAS;AAAA,SACvB;AAAA;AAAA,EACF;AAEJ;","names":["import_jsx_runtime"]}
package/dist/table.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { RefObject } from 'react';
2
+ import { RefObject, ReactNode } from 'react';
3
3
 
4
4
  /** Extension of shadcn's `Table` registry component: exposes `containerClassName` so callers can
5
5
  * override the wrapping `<div>`'s default `overflow-auto`. We need this for sticky-header support
@@ -41,4 +41,39 @@ declare function useScrollShadow(): {
41
41
  isScrolled: boolean;
42
42
  };
43
43
 
44
- export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, useScrollShadow };
44
+ /**
45
+ * Header cell class — compact, left-aligned, non-wrapping. Apply to each `<TableHead>` composed at
46
+ * the call site so every clay data table shares one header treatment.
47
+ */
48
+ declare const DATA_TABLE_HEAD_CLASS = "h-auto py-2 px-4 text-xs font-medium text-foreground whitespace-nowrap text-left";
49
+ /** Body cell class — roomy padding, top-aligned, left-aligned, min width so columns don't collapse. */
50
+ declare const DATA_TABLE_CELL_CLASS = "p-4 text-sm font-normal text-foreground align-top min-w-[150px] text-left";
51
+ /**
52
+ * Data-row class matching the frosted-glass card scheme: `border-b-brown-30` overrides shadcn's
53
+ * default `--color-border` (brown-40) with the lighter brown-30; hover lifts to opaque `bg-secondary`.
54
+ */
55
+ declare const DATA_TABLE_ROW_CLASS = "border-b-brown-30 bg-background/70 hover:bg-secondary";
56
+ /** Layered drop-shadow for the scroll-lift effect on the sticky header. */
57
+ declare const DATA_TABLE_SCROLL_SHADOW = "0 1px 2px rgb(0 0 0 / 0.01), 0 6px 12px -2px rgb(0 0 0 / 0.03)";
58
+ interface DataTableProps {
59
+ /**
60
+ * Header row content — typically a single `<TableRow>` of `<TableHead>` cells (use
61
+ * `DATA_TABLE_HEAD_CLASS`). Rendered inside the sticky, frosted `<TableHeader>` shell.
62
+ */
63
+ header: ReactNode;
64
+ /** Body rows composed at the call site (`<TableRow>`/`<TableCell>`). */
65
+ children: ReactNode;
66
+ /** Max body height (px) before vertical scroll engages. Omit for no cap (grows to content). */
67
+ maxBodyHeight?: number;
68
+ /** Extra classes for the scroll container. */
69
+ className?: string;
70
+ }
71
+ /**
72
+ * Shared styled-table shell — the scroll container, sticky frosted (`bg-background/70
73
+ * backdrop-blur-lg`) header, and scroll-lift shadow (via {@link useScrollShadow}) that give clay
74
+ * data tables (table artifact, notification-draft recipients) one consistent look. Callers compose
75
+ * the header cells and body rows at the call site; this is only the shell.
76
+ */
77
+ declare function DataTable({ header, children, maxBodyHeight, className }: DataTableProps): ReactNode;
78
+
79
+ export { DATA_TABLE_CELL_CLASS, DATA_TABLE_HEAD_CLASS, DATA_TABLE_ROW_CLASS, DATA_TABLE_SCROLL_SHADOW, DataTable, type DataTableProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, useScrollShadow };
package/dist/table.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { RefObject } from 'react';
2
+ import { RefObject, ReactNode } from 'react';
3
3
 
4
4
  /** Extension of shadcn's `Table` registry component: exposes `containerClassName` so callers can
5
5
  * override the wrapping `<div>`'s default `overflow-auto`. We need this for sticky-header support
@@ -41,4 +41,39 @@ declare function useScrollShadow(): {
41
41
  isScrolled: boolean;
42
42
  };
43
43
 
44
- export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, useScrollShadow };
44
+ /**
45
+ * Header cell class — compact, left-aligned, non-wrapping. Apply to each `<TableHead>` composed at
46
+ * the call site so every clay data table shares one header treatment.
47
+ */
48
+ declare const DATA_TABLE_HEAD_CLASS = "h-auto py-2 px-4 text-xs font-medium text-foreground whitespace-nowrap text-left";
49
+ /** Body cell class — roomy padding, top-aligned, left-aligned, min width so columns don't collapse. */
50
+ declare const DATA_TABLE_CELL_CLASS = "p-4 text-sm font-normal text-foreground align-top min-w-[150px] text-left";
51
+ /**
52
+ * Data-row class matching the frosted-glass card scheme: `border-b-brown-30` overrides shadcn's
53
+ * default `--color-border` (brown-40) with the lighter brown-30; hover lifts to opaque `bg-secondary`.
54
+ */
55
+ declare const DATA_TABLE_ROW_CLASS = "border-b-brown-30 bg-background/70 hover:bg-secondary";
56
+ /** Layered drop-shadow for the scroll-lift effect on the sticky header. */
57
+ declare const DATA_TABLE_SCROLL_SHADOW = "0 1px 2px rgb(0 0 0 / 0.01), 0 6px 12px -2px rgb(0 0 0 / 0.03)";
58
+ interface DataTableProps {
59
+ /**
60
+ * Header row content — typically a single `<TableRow>` of `<TableHead>` cells (use
61
+ * `DATA_TABLE_HEAD_CLASS`). Rendered inside the sticky, frosted `<TableHeader>` shell.
62
+ */
63
+ header: ReactNode;
64
+ /** Body rows composed at the call site (`<TableRow>`/`<TableCell>`). */
65
+ children: ReactNode;
66
+ /** Max body height (px) before vertical scroll engages. Omit for no cap (grows to content). */
67
+ maxBodyHeight?: number;
68
+ /** Extra classes for the scroll container. */
69
+ className?: string;
70
+ }
71
+ /**
72
+ * Shared styled-table shell — the scroll container, sticky frosted (`bg-background/70
73
+ * backdrop-blur-lg`) header, and scroll-lift shadow (via {@link useScrollShadow}) that give clay
74
+ * data tables (table artifact, notification-draft recipients) one consistent look. Callers compose
75
+ * the header cells and body rows at the call site; this is only the shell.
76
+ */
77
+ declare function DataTable({ header, children, maxBodyHeight, className }: DataTableProps): ReactNode;
78
+
79
+ export { DATA_TABLE_CELL_CLASS, DATA_TABLE_HEAD_CLASS, DATA_TABLE_ROW_CLASS, DATA_TABLE_SCROLL_SHADOW, DataTable, type DataTableProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, useScrollShadow };
package/dist/table.js CHANGED
@@ -1,4 +1,9 @@
1
1
  import {
2
+ DATA_TABLE_CELL_CLASS,
3
+ DATA_TABLE_HEAD_CLASS,
4
+ DATA_TABLE_ROW_CLASS,
5
+ DATA_TABLE_SCROLL_SHADOW,
6
+ DataTable,
2
7
  Table,
3
8
  TableBody,
4
9
  TableCaption,
@@ -8,10 +13,15 @@ import {
8
13
  TableHeader,
9
14
  TableRow,
10
15
  useScrollShadow
11
- } from "./chunk-4MZZH3WX.js";
16
+ } from "./chunk-HU5W7CGE.js";
12
17
  import "./chunk-P6GUNIAE.js";
13
18
  import "./chunk-5WRI5ZAA.js";
14
19
  export {
20
+ DATA_TABLE_CELL_CLASS,
21
+ DATA_TABLE_HEAD_CLASS,
22
+ DATA_TABLE_ROW_CLASS,
23
+ DATA_TABLE_SCROLL_SHADOW,
24
+ DataTable,
15
25
  Table,
16
26
  TableBody,
17
27
  TableCaption,
@@ -138,7 +138,9 @@ var colors = {
138
138
  "red-200": "#FECACA",
139
139
  "red-400": "#F7776C",
140
140
  "red-500": "#EF4444",
141
- "red-600": "#DC2626"
141
+ "red-600": "#DC2626",
142
+ // Deck
143
+ "deck-canvas": "#faf8f5"
142
144
  };
143
145
 
144
146
  // src/tokens/typography.ts