@epicbagel/saas-kit 1.0.0 → 1.2.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 (120) hide show
  1. package/README.md +72 -3
  2. package/THIRD_PARTY_NOTICES.md +230 -7
  3. package/dist/chunk-2AU7ZRGX.cjs +96 -0
  4. package/dist/chunk-2BTDBZYN.cjs +154 -0
  5. package/dist/chunk-2HV2KKOE.cjs +38 -0
  6. package/dist/chunk-2KFZQJH5.cjs +29 -0
  7. package/dist/chunk-32Q4XOTU.cjs +204 -0
  8. package/dist/chunk-42RTTHND.js +29 -0
  9. package/dist/chunk-6FC65AZQ.js +38 -0
  10. package/dist/chunk-B765DSRG.cjs +66 -0
  11. package/dist/chunk-ELPV44S6.cjs +44 -0
  12. package/dist/chunk-EOUO3ORO.cjs +244 -0
  13. package/dist/chunk-EZCKWTH7.js +204 -0
  14. package/dist/chunk-F366BHWH.js +116 -0
  15. package/dist/chunk-GFG2R5BZ.js +132 -0
  16. package/dist/chunk-HAC32ALJ.js +244 -0
  17. package/dist/chunk-INNGGLMZ.js +44 -0
  18. package/dist/chunk-IW4ZIXXG.js +66 -0
  19. package/dist/chunk-JZOBIPFC.js +96 -0
  20. package/dist/chunk-KADJ56AH.cjs +416 -0
  21. package/dist/chunk-KENBU3NV.cjs +27 -0
  22. package/dist/chunk-M7FYGAGO.js +416 -0
  23. package/dist/chunk-MHYAVXOE.js +159 -0
  24. package/dist/chunk-RIWLAMME.cjs +159 -0
  25. package/dist/chunk-SUB4BAYE.cjs +73 -0
  26. package/dist/chunk-THWIJG5C.js +73 -0
  27. package/dist/chunk-V4YWTRLD.cjs +116 -0
  28. package/dist/chunk-VY5U4VGV.js +27 -0
  29. package/dist/chunk-XABXUP6L.cjs +132 -0
  30. package/dist/chunk-Z45YKVAM.js +154 -0
  31. package/dist/primitives/action-dock.cjs +8 -0
  32. package/dist/primitives/action-dock.d.cts +10 -0
  33. package/dist/primitives/action-dock.d.ts +10 -0
  34. package/dist/primitives/action-dock.js +8 -0
  35. package/dist/primitives/attachment.cjs +25 -203
  36. package/dist/primitives/attachment.d.cts +1 -1
  37. package/dist/primitives/attachment.d.ts +1 -1
  38. package/dist/primitives/attachment.js +12 -190
  39. package/dist/primitives/badge.d.cts +1 -1
  40. package/dist/primitives/badge.d.ts +1 -1
  41. package/dist/primitives/board-view.cjs +3 -3
  42. package/dist/primitives/board-view.js +2 -2
  43. package/dist/primitives/bubble.cjs +14 -0
  44. package/dist/primitives/bubble.d.cts +21 -0
  45. package/dist/primitives/bubble.d.ts +21 -0
  46. package/dist/primitives/bubble.js +14 -0
  47. package/dist/primitives/button.d.cts +3 -3
  48. package/dist/primitives/button.d.ts +3 -3
  49. package/dist/primitives/chat.cjs +881 -0
  50. package/dist/primitives/chat.d.cts +345 -0
  51. package/dist/primitives/chat.d.ts +345 -0
  52. package/dist/primitives/chat.js +881 -0
  53. package/dist/primitives/connection.cjs +6 -6
  54. package/dist/primitives/connection.js +7 -7
  55. package/dist/primitives/file-dropzone.cjs +7 -107
  56. package/dist/primitives/file-dropzone.d.cts +66 -3
  57. package/dist/primitives/file-dropzone.d.ts +66 -3
  58. package/dist/primitives/file-dropzone.js +13 -113
  59. package/dist/primitives/input-group.cjs +21 -0
  60. package/dist/primitives/input-group.d.cts +20 -0
  61. package/dist/primitives/input-group.d.ts +20 -0
  62. package/dist/primitives/input-group.js +21 -0
  63. package/dist/primitives/item.cjs +197 -0
  64. package/dist/primitives/item.d.cts +28 -0
  65. package/dist/primitives/item.d.ts +28 -0
  66. package/dist/primitives/item.js +197 -0
  67. package/dist/primitives/lazy-markdown.cjs +10 -0
  68. package/dist/primitives/lazy-markdown.d.cts +20 -0
  69. package/dist/primitives/lazy-markdown.d.ts +20 -0
  70. package/dist/primitives/lazy-markdown.js +10 -0
  71. package/dist/primitives/markdown.cjs +17 -0
  72. package/dist/primitives/markdown.d.cts +32 -0
  73. package/dist/primitives/markdown.d.ts +32 -0
  74. package/dist/primitives/markdown.js +17 -0
  75. package/dist/primitives/marker.cjs +14 -0
  76. package/dist/primitives/marker.d.cts +15 -0
  77. package/dist/primitives/marker.d.ts +15 -0
  78. package/dist/primitives/marker.js +14 -0
  79. package/dist/primitives/message-scroller.cjs +26 -0
  80. package/dist/primitives/message-scroller.d.cts +16 -0
  81. package/dist/primitives/message-scroller.d.ts +16 -0
  82. package/dist/primitives/message-scroller.js +26 -0
  83. package/dist/primitives/message.cjs +7 -84
  84. package/dist/primitives/message.js +8 -85
  85. package/dist/primitives/resource-list.cjs +3 -3
  86. package/dist/primitives/resource-list.js +2 -2
  87. package/dist/primitives/rich-text.cjs +3 -38
  88. package/dist/primitives/rich-text.js +3 -38
  89. package/dist/primitives/section-header.d.cts +1 -1
  90. package/dist/primitives/section-header.d.ts +1 -1
  91. package/dist/primitives/spinner.cjs +23 -0
  92. package/dist/primitives/spinner.d.cts +6 -0
  93. package/dist/primitives/spinner.d.ts +6 -0
  94. package/dist/primitives/spinner.js +23 -0
  95. package/dist/primitives/suggestion.cjs +11 -0
  96. package/dist/primitives/suggestion.d.cts +19 -0
  97. package/dist/primitives/suggestion.d.ts +19 -0
  98. package/dist/primitives/suggestion.js +11 -0
  99. package/dist/primitives/switch-field.cjs +2 -2
  100. package/dist/primitives/switch-field.js +3 -3
  101. package/dist/primitives/textarea.cjs +4 -33
  102. package/dist/primitives/textarea.js +3 -32
  103. package/dist/primitives/toggle-group.d.cts +2 -2
  104. package/dist/primitives/toggle-group.d.ts +2 -2
  105. package/dist/primitives/toggle.d.cts +2 -2
  106. package/dist/primitives/toggle.d.ts +2 -2
  107. package/dist/primitives/trace.cjs +23 -0
  108. package/dist/primitives/trace.d.cts +22 -0
  109. package/dist/primitives/trace.d.ts +22 -0
  110. package/dist/primitives/trace.js +23 -0
  111. package/dist/primitives/voice-dictation-button.cjs +5 -239
  112. package/dist/primitives/voice-dictation-button.js +4 -238
  113. package/package.json +125 -2
  114. package/src/styles/components/bubble.css +81 -0
  115. package/src/styles/components/marker.css +27 -0
  116. package/src/styles/components/message-scroller.css +11 -0
  117. package/src/styles/components.css +3 -0
  118. package/src/styles/utilities.css +3 -2
  119. package/dist/{chunk-UGF2K6NR.js → chunk-HRLP4BHJ.js} +6 -6
  120. package/dist/{chunk-RWWOFWLP.cjs → chunk-IH3COANJ.cjs} +3 -3
package/README.md CHANGED
@@ -12,7 +12,7 @@ npm install @epicbagel/saas-kit
12
12
  ```
13
13
 
14
14
  Peer dependencies: `react` and `react-dom` (18 or 19), `lucide-react`
15
- (`>=0.400.0 <2`), `react-icons` (5) and `tailwindcss` v4.
15
+ (`>=0.400.0 <2`), `react-icons` (5) and `tailwindcss` (4.3 or later).
16
16
 
17
17
  ## Styles
18
18
 
@@ -66,7 +66,76 @@ Components ship as client modules (`"use client"`); the `lib/*` utilities are
66
66
  plain modules that are safe to call from React Server Components. Both ESM and
67
67
  CommonJS builds are included, each with type declarations.
68
68
 
69
+ `primitives/chat` and `primitives/message-scroller` need React 19. They are
70
+ built on `@shadcn/react`, which takes `ref` as a plain prop; on React 18 they
71
+ render, but a ref passed to them is dropped with a warning.
72
+
73
+ ## Chat
74
+
75
+ `primitives/chat` composes the kit's lifts of the shadcn/ui AI Elements parts
76
+ (Message, Bubble, MessageScroller, Trace, Suggestion, InputGroup) into a
77
+ conversation with plain props: no AI SDK, no streaming renderer. It became
78
+ public in 1.1.0, and these were the decisions about its props then:
79
+
80
+ - **Copy.** Every piece of built-in copy can be replaced: `pendingLabel`
81
+ ("Thinking…"), `scrollButtonLabel` ("Scroll to latest message"),
82
+ `uploadingLabel` ("Uploading…"), `voiceHeroLabel` ("Tap to speak"),
83
+ `voiceHeroSwitchLabel` ("or type instead"), `examplePromptsLabel` ("Try"),
84
+ `examplePromptsLoadingLabel` ("Loading suggestions…"), `addFilesLabel`,
85
+ `placeholder` and `activePlaceholder`. The defaults are plain English with
86
+ no product voice, and the empty state has no title unless you pass
87
+ `emptyTitle`. The icon buttons' accessible names ("Send", "Add to
88
+ conversation", "Remove" plus the file name) are fixed for now.
89
+ - **Composer height.** `ChatInput` takes a `size` token (`sm`, `md`, `lg`)
90
+ for the textarea's starting height; there is no class-name or `rows` prop.
91
+ The textarea grows with its text (`field-sizing: content`).
92
+ - **Example prompts.** `examplePromptsVariant` is `chips` (the default: chips
93
+ that wrap onto as many lines as they need), `row` (one line that scrolls
94
+ sideways) or `cards` (a two-column grid).
95
+ - **Failed sends.** When `onSend` rejects, Chat puts the text back in the
96
+ composer and calls `onSendError`; without one it reports the rejection
97
+ through `reportError`, so a failure is never silent.
98
+ - **Removed before 1.1.0,** having no callers: `hideExamples` (pass no
99
+ `examplePrompts`), `emptyFooterVisibility` (the footer always shows),
100
+ `voiceAlign` (the voice hero is centred) and `ChatInput`'s `rows` and
101
+ `minHeightClassName` (use `size`).
102
+ - **Kept** as they were: the `embedded`, `application` and
103
+ `workspace` layouts, the voice-first empty state, the empty-state file drop
104
+ target (`emptyFileDropzone`; since 1.2.0 the whole conversation takes
105
+ drops too, below), `compactEmptyState`, `threadMaxHeight` and the rest.
106
+
107
+ ### File drop (1.2.0)
108
+
109
+ - **Drop anywhere on the conversation.** With `onFilesSelected`, a file
110
+ dragged over a Chat raises a "Drop to attach" overlay, and the drop hands
111
+ every file to `onFilesSelected`, the callback the composer's + menu calls:
112
+ your validation, your staged files, your errors. Nothing is filtered on the
113
+ way. `fileDrop` is `"conversation"` (the default), `"page"` (drops anywhere
114
+ in the document land in this Chat) or `false`; `fileDropLabel` and
115
+ `fileDropDescription` word the overlay. The voice-first hero switches to
116
+ the text composer on a drop, so the staged files show; drops are ignored
117
+ while `emptyPendingContent` stands in for the composer, and still stage
118
+ while a reply is pending, as the + menu does.
119
+ - **A dropped file never opens in the browser.** The guard
120
+ (`primitives/file-dropzone`) cancels any file drop that no drop target
121
+ takes, leaving native file inputs their own drops. `FileDropzone`,
122
+ `FileDropArea` and a Chat with `onFilesSelected` install it while they are
123
+ mounted (`useFileDropGuard`). To cover every page, call
124
+ `installFileDropGuard()` once in your app's entry, before rendering: it
125
+ lives outside React, so it still holds on an error boundary's fallback or
126
+ after a render error unmounts the root.
127
+ - **`FileDropArea`** is the region behind it, for any surface that takes
128
+ files: `onFiles` (the picker's callback), `disabled`, `scope`
129
+ (`"area"` | `"page"`), `label`, `description` and `icon`. Its overlay is
130
+ `aria-hidden`, so keep a picker in the region as the accessible path. The
131
+ label always shows: an area taller than the viewport centres it in the
132
+ part on screen, and `scope="page"` covers the viewport itself. The overlay
133
+ lowers when the drag ends, including a drag cancelled with Escape that
134
+ fires no `dragleave` (after a second without a `dragover`).
135
+ - The drop handling follows AI SDK Elements' `PromptInput` and its
136
+ `globalDrop` (Apache-2.0; see `THIRD_PARTY_NOTICES.md`).
137
+
69
138
  ## License
70
139
 
71
- MIT. Some components and styles are adapted from shadcn/ui; see
72
- `THIRD_PARTY_NOTICES.md`.
140
+ MIT. Some components and styles are adapted from shadcn/ui, and the file
141
+ drop handling from AI SDK Elements (Apache-2.0); see `THIRD_PARTY_NOTICES.md`.
@@ -11,16 +11,22 @@ licenses in their own packages.
11
11
  Source: https://github.com/shadcn-ui/ui
12
12
 
13
13
  These modules are adapted from shadcn/ui components and styles. The compiled
14
- output under `dist/` includes code derived from them.
14
+ output under `dist/` includes code derived from them. The more recent lifts
15
+ name their registry item, style and sync date in a header comment.
15
16
 
16
17
  - `primitives/`: alert, alert-dialog, aspect-ratio, attachment, avatar, badge,
17
- button, calendar, card, checkbox, collapsible, dialog, drawer, dropdown-menu,
18
- field, input, label, message, popover, progress, radio-group, scroll-area,
19
- select, separator, sheet, skeleton, switch, tabs, textarea, toggle,
20
- toggle-group, tooltip
18
+ bubble, button, calendar, card, checkbox, collapsible, dialog, drawer,
19
+ dropdown-menu, field, input, input-group, item, label, marker, message,
20
+ message-scroller, popover, progress, radio-group, scroll-area, select,
21
+ separator, sheet, skeleton, spinner, switch, tabs, textarea, toggle,
22
+ toggle-group, tooltip, trace
23
+ - `primitives/suggestion`, adapted from the shadcn/ui AI Elements "Suggestion"
24
+ pattern (https://ui.shadcn.com/docs/ai-elements)
25
+ - `primitives/chat`, composed after the shadcn/ui AI Elements "Chat",
26
+ "Message", "Prompt Input" and "Suggestion" patterns from the parts above
21
27
  - `lib/utils` (`cn`)
22
- - `src/styles/shadcn.css`, `src/styles/components/attachment.css`,
23
- `src/styles/components/message.css`
28
+ - `src/styles/shadcn.css`, and in `src/styles/components/`: attachment.css,
29
+ bubble.css, marker.css, message.css and message-scroller.css
24
30
 
25
31
  ```
26
32
  MIT License
@@ -45,3 +51,220 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45
51
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
46
52
  SOFTWARE.
47
53
  ```
54
+
55
+ ## AI SDK Elements
56
+
57
+ Source: https://github.com/vercel/ai-elements (`packages/elements/src/prompt-input.tsx`,
58
+ commit `ca8be600`)
59
+
60
+ The file drop handling in these modules follows the `PromptInput` component of
61
+ AI SDK Elements: a drag that carries files is accepted, its drop hands over the
62
+ dropped files, and the `globalDrop` option takes drops anywhere in the
63
+ document. The code was modified: nothing is filtered, a drag shows an overlay,
64
+ drags that start in the page are ignored, and a window-level guard cancels any
65
+ file drop that nothing takes. The compiled output under `dist/` includes code
66
+ derived from it.
67
+
68
+ - `primitives/file-dropzone`: `FileDropArea` (its `scope="page"` is
69
+ `globalDrop`) and `useFileDropGuard`
70
+ - `primitives/chat`: the conversation's file drop (`fileDrop`), built on
71
+ `FileDropArea`
72
+
73
+ AI SDK Elements carries this notice:
74
+
75
+ ```
76
+ Copyright 2023 Vercel, Inc.
77
+
78
+ Licensed under the Apache License, Version 2.0 (the "License");
79
+ you may not use this file except in compliance with the License.
80
+ You may obtain a copy of the License at
81
+
82
+ http://www.apache.org/licenses/LICENSE-2.0
83
+
84
+ Unless required by applicable law or agreed to in writing, software
85
+ distributed under the License is distributed on an "AS IS" BASIS,
86
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
87
+ See the License for the specific language governing permissions and
88
+ limitations under the License.
89
+ ```
90
+
91
+ The Apache License, Version 2.0:
92
+
93
+ ```
94
+ Apache License
95
+ Version 2.0, January 2004
96
+ http://www.apache.org/licenses/
97
+
98
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
99
+
100
+ 1. Definitions.
101
+
102
+ "License" shall mean the terms and conditions for use, reproduction,
103
+ and distribution as defined by Sections 1 through 9 of this document.
104
+
105
+ "Licensor" shall mean the copyright owner or entity authorized by
106
+ the copyright owner that is granting the License.
107
+
108
+ "Legal Entity" shall mean the union of the acting entity and all
109
+ other entities that control, are controlled by, or are under common
110
+ control with that entity. For the purposes of this definition,
111
+ "control" means (i) the power, direct or indirect, to cause the
112
+ direction or management of such entity, whether by contract or
113
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
114
+ outstanding shares, or (iii) beneficial ownership of such entity.
115
+
116
+ "You" (or "Your") shall mean an individual or Legal Entity
117
+ exercising permissions granted by this License.
118
+
119
+ "Source" form shall mean the preferred form for making modifications,
120
+ including but not limited to software source code, documentation
121
+ source, and configuration files.
122
+
123
+ "Object" form shall mean any form resulting from mechanical
124
+ transformation or translation of a Source form, including but
125
+ not limited to compiled object code, generated documentation,
126
+ and conversions to other media types.
127
+
128
+ "Work" shall mean the work of authorship, whether in Source or
129
+ Object form, made available under the License, as indicated by a
130
+ copyright notice that is included in or attached to the work
131
+ (an example is provided in the Appendix below).
132
+
133
+ "Derivative Works" shall mean any work, whether in Source or Object
134
+ form, that is based on (or derived from) the Work and for which the
135
+ editorial revisions, annotations, elaborations, or other modifications
136
+ represent, as a whole, an original work of authorship. For the purposes
137
+ of this License, Derivative Works shall not include works that remain
138
+ separable from, or merely link (or bind by name) to the interfaces of,
139
+ the Work and Derivative Works thereof.
140
+
141
+ "Contribution" shall mean any work of authorship, including
142
+ the original version of the Work and any modifications or additions
143
+ to that Work or Derivative Works thereof, that is intentionally
144
+ submitted to Licensor for inclusion in the Work by the copyright owner
145
+ or by an individual or Legal Entity authorized to submit on behalf of
146
+ the copyright owner. For the purposes of this definition, "submitted"
147
+ means any form of electronic, verbal, or written communication sent
148
+ to the Licensor or its representatives, including but not limited to
149
+ communication on electronic mailing lists, source code control systems,
150
+ and issue tracking systems that are managed by, or on behalf of, the
151
+ Licensor for the purpose of discussing and improving the Work, but
152
+ excluding communication that is conspicuously marked or otherwise
153
+ designated in writing by the copyright owner as "Not a Contribution."
154
+
155
+ "Contributor" shall mean Licensor and any individual or Legal Entity
156
+ on behalf of whom a Contribution has been received by Licensor and
157
+ subsequently incorporated within the Work.
158
+
159
+ 2. Grant of Copyright License. Subject to the terms and conditions of
160
+ this License, each Contributor hereby grants to You a perpetual,
161
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
162
+ copyright license to reproduce, prepare Derivative Works of,
163
+ publicly display, publicly perform, sublicense, and distribute the
164
+ Work and such Derivative Works in Source or Object form.
165
+
166
+ 3. Grant of Patent License. Subject to the terms and conditions of
167
+ this License, each Contributor hereby grants to You a perpetual,
168
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
169
+ (except as stated in this section) patent license to make, have made,
170
+ use, offer to sell, sell, import, and otherwise transfer the Work,
171
+ where such license applies only to those patent claims licensable
172
+ by such Contributor that are necessarily infringed by their
173
+ Contribution(s) alone or by combination of their Contribution(s)
174
+ with the Work to which such Contribution(s) was submitted. If You
175
+ institute patent litigation against any entity (including a
176
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
177
+ or a Contribution incorporated within the Work constitutes direct
178
+ or contributory patent infringement, then any patent licenses
179
+ granted to You under this License for that Work shall terminate
180
+ as of the date such litigation is filed.
181
+
182
+ 4. Redistribution. You may reproduce and distribute copies of the
183
+ Work or Derivative Works thereof in any medium, with or without
184
+ modifications, and in Source or Object form, provided that You
185
+ meet the following conditions:
186
+
187
+ (a) You must give any other recipients of the Work or
188
+ Derivative Works a copy of this License; and
189
+
190
+ (b) You must cause any modified files to carry prominent notices
191
+ stating that You changed the files; and
192
+
193
+ (c) You must retain, in the Source form of any Derivative Works
194
+ that You distribute, all copyright, patent, trademark, and
195
+ attribution notices from the Source form of the Work,
196
+ excluding those notices that do not pertain to any part of
197
+ the Derivative Works; and
198
+
199
+ (d) If the Work includes a "NOTICE" text file as part of its
200
+ distribution, then any Derivative Works that You distribute must
201
+ include a readable copy of the attribution notices contained
202
+ within such NOTICE file, excluding those notices that do not
203
+ pertain to any part of the Derivative Works, in at least one
204
+ of the following places: within a NOTICE text file distributed
205
+ as part of the Derivative Works; within the Source form or
206
+ documentation, if provided along with the Derivative Works; or,
207
+ within a display generated by the Derivative Works, if and
208
+ wherever such third-party notices normally appear. The contents
209
+ of the NOTICE file are for informational purposes only and
210
+ do not modify the License. You may add Your own attribution
211
+ notices within Derivative Works that You distribute, alongside
212
+ or as an addendum to the NOTICE text from the Work, provided
213
+ that such additional attribution notices cannot be construed
214
+ as modifying the License.
215
+
216
+ You may add Your own copyright statement to Your modifications and
217
+ may provide additional or different license terms and conditions
218
+ for use, reproduction, or distribution of Your modifications, or
219
+ for any such Derivative Works as a whole, provided Your use,
220
+ reproduction, and distribution of the Work otherwise complies with
221
+ the conditions stated in this License.
222
+
223
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
224
+ any Contribution intentionally submitted for inclusion in the Work
225
+ by You to the Licensor shall be under the terms and conditions of
226
+ this License, without any additional terms or conditions.
227
+ Notwithstanding the above, nothing herein shall supersede or modify
228
+ the terms of any separate license agreement you may have executed
229
+ with Licensor regarding such Contributions.
230
+
231
+ 6. Trademarks. This License does not grant permission to use the trade
232
+ names, trademarks, service marks, or product names of the Licensor,
233
+ except as required for reasonable and customary use in describing the
234
+ origin of the Work and reproducing the content of the NOTICE file.
235
+
236
+ 7. Disclaimer of Warranty. Unless required by applicable law or
237
+ agreed to in writing, Licensor provides the Work (and each
238
+ Contributor provides its Contributions) on an "AS IS" BASIS,
239
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
240
+ implied, including, without limitation, any warranties or conditions
241
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
242
+ PARTICULAR PURPOSE. You are solely responsible for determining the
243
+ appropriateness of using or redistributing the Work and assume any
244
+ risks associated with Your exercise of permissions under this License.
245
+
246
+ 8. Limitation of Liability. In no event and under no legal theory,
247
+ whether in tort (including negligence), contract, or otherwise,
248
+ unless required by applicable law (such as deliberate and grossly
249
+ negligent acts) or agreed to in writing, shall any Contributor be
250
+ liable to You for damages, including any direct, indirect, special,
251
+ incidental, or consequential damages of any character arising as a
252
+ result of this License or out of the use or inability to use the
253
+ Work (including but not limited to damages for loss of goodwill,
254
+ work stoppage, computer failure or malfunction, or any and all
255
+ other commercial damages or losses), even if such Contributor
256
+ has been advised of the possibility of such damages.
257
+
258
+ 9. Accepting Warranty or Additional Liability. While redistributing
259
+ the Work or Derivative Works thereof, You may choose to offer,
260
+ and charge a fee for, acceptance of support, warranty, indemnity,
261
+ or other liability obligations and/or rights consistent with this
262
+ License. However, in accepting such obligations, You may act only
263
+ on Your own behalf and on Your sole responsibility, not on behalf
264
+ of any other Contributor, and only if You agree to indemnify,
265
+ defend, and hold each Contributor harmless for any liability
266
+ incurred by, or claims asserted against, such Contributor by reason
267
+ of your accepting any such warranty or additional liability.
268
+
269
+ END OF TERMS AND CONDITIONS
270
+ ```
@@ -0,0 +1,96 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
5
+
6
+ // src/primitives/message.tsx
7
+ var _jsxruntime = require('react/jsx-runtime');
8
+ function MessageGroup({ className, ...props }) {
9
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
10
+ "div",
11
+ {
12
+ "data-slot": "message-group",
13
+ className: _chunkKWLSBTB2cjs.cn.call(void 0, "cn-message-group flex min-w-0 flex-col", className),
14
+ ...props
15
+ }
16
+ );
17
+ }
18
+ function Message({
19
+ className,
20
+ align = "start",
21
+ ...props
22
+ }) {
23
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
24
+ "div",
25
+ {
26
+ "data-slot": "message",
27
+ "data-align": align,
28
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
29
+ "cn-message group/message relative flex w-full min-w-0 data-[align=end]:flex-row-reverse",
30
+ className
31
+ ),
32
+ ...props
33
+ }
34
+ );
35
+ }
36
+ function MessageAvatar({ className, ...props }) {
37
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
38
+ "div",
39
+ {
40
+ "data-slot": "message-avatar",
41
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
42
+ "cn-message-avatar flex w-fit shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ );
48
+ }
49
+ function MessageContent({ className, ...props }) {
50
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
51
+ "div",
52
+ {
53
+ "data-slot": "message-content",
54
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
55
+ "cn-message-content flex w-full min-w-0 flex-col wrap-break-word",
56
+ className
57
+ ),
58
+ ...props
59
+ }
60
+ );
61
+ }
62
+ function MessageHeader({ className, ...props }) {
63
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
64
+ "div",
65
+ {
66
+ "data-slot": "message-header",
67
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
68
+ "cn-message-header flex max-w-full min-w-0 items-center",
69
+ className
70
+ ),
71
+ ...props
72
+ }
73
+ );
74
+ }
75
+ function MessageFooter({ className, ...props }) {
76
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
77
+ "div",
78
+ {
79
+ "data-slot": "message-footer",
80
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
81
+ "cn-message-footer flex max-w-full min-w-0 items-center group-data-[align=end]/message:justify-end",
82
+ className
83
+ ),
84
+ ...props
85
+ }
86
+ );
87
+ }
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ exports.MessageGroup = MessageGroup; exports.Message = Message; exports.MessageAvatar = MessageAvatar; exports.MessageContent = MessageContent; exports.MessageHeader = MessageHeader; exports.MessageFooter = MessageFooter;
@@ -0,0 +1,154 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+
5
+
6
+ var _chunkW5HPHEE7cjs = require('./chunk-W5HPHEE7.cjs');
7
+
8
+
9
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
10
+
11
+ // src/primitives/trace.tsx
12
+ var _lucidereact = require('lucide-react');
13
+ var _jsxruntime = require('react/jsx-runtime');
14
+ function Trace({ className, ...props }) {
15
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16
+ "div",
17
+ {
18
+ "data-slot": "trace",
19
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
20
+ "flex w-full min-w-0 flex-col gap-2 *:has-[>[data-slot=trace-line]]:flex *:has-[>[data-slot=trace-line]]:w-fit *:has-[>[data-slot=trace-line]]:max-w-full *:has-[>[data-slot=trace-line]]:min-w-0 *:has-[>[data-slot=trace-line]]:rounded-md *:has-[>[data-slot=trace-line]]:text-left *:has-[>[data-slot=trace-line]]:outline-none *:has-[>[data-slot=trace-line]]:focus-visible:ring-3 *:has-[>[data-slot=trace-line]]:focus-visible:ring-ring/50",
21
+ className
22
+ ),
23
+ ...props
24
+ }
25
+ );
26
+ }
27
+ function TraceLine({
28
+ className,
29
+ status,
30
+ ...props
31
+ }) {
32
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
33
+ "span",
34
+ {
35
+ "data-slot": "trace-line",
36
+ "data-status": status,
37
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
38
+ "flex w-fit max-w-full min-w-0 items-center gap-2 text-sm text-muted-foreground transition-colors in-[a,button]:cursor-pointer in-[a:hover,button:hover]:text-foreground data-[status=error]:text-destructive data-[status=error]:in-[a:hover,button:hover]:text-destructive data-[status=pending]:opacity-60 data-[status=running]:*:data-[slot=trace-title]:shimmer",
39
+ className
40
+ ),
41
+ ...props
42
+ }
43
+ );
44
+ }
45
+ function TraceIcon({ className, ...props }) {
46
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
47
+ "span",
48
+ {
49
+ "data-slot": "trace-icon",
50
+ "aria-hidden": "true",
51
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
52
+ "flex size-4 shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [[data-slot=trace-title]~&]:-ml-1",
53
+ className
54
+ ),
55
+ ...props
56
+ }
57
+ );
58
+ }
59
+ function TraceTitle({ className, ...props }) {
60
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
61
+ "span",
62
+ {
63
+ "data-slot": "trace-title",
64
+ className: _chunkKWLSBTB2cjs.cn.call(void 0, "min-w-0 truncate motion-reduce:shimmer-none", className),
65
+ ...props
66
+ }
67
+ );
68
+ }
69
+ function TraceDescription({
70
+ className,
71
+ ...props
72
+ }) {
73
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
74
+ "span",
75
+ {
76
+ "data-slot": "trace-description",
77
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
78
+ "shrink-0 text-muted-foreground/70 tabular-nums",
79
+ className
80
+ ),
81
+ ...props
82
+ }
83
+ );
84
+ }
85
+ function TraceCollapsible({
86
+ className,
87
+ ...props
88
+ }) {
89
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
90
+ _chunkW5HPHEE7cjs.Collapsible,
91
+ {
92
+ "data-slot": "trace-collapsible",
93
+ className: _chunkKWLSBTB2cjs.cn.call(void 0, "flex w-full min-w-0 flex-col", className),
94
+ ...props
95
+ }
96
+ );
97
+ }
98
+ function TraceCollapsibleTrigger({
99
+ className,
100
+ children,
101
+ ...props
102
+ }) {
103
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
104
+ _chunkW5HPHEE7cjs.CollapsibleTrigger,
105
+ {
106
+ "data-slot": "trace-collapsible-trigger",
107
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
108
+ "group/trace-collapsible-trigger flex w-fit max-w-full min-w-0 cursor-pointer items-center gap-1 rounded-md text-left text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 has-[[data-status=error]]:text-destructive",
109
+ className
110
+ ),
111
+ ...props,
112
+ children: [
113
+ children,
114
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TraceIcon, { className: "transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, {}) })
115
+ ]
116
+ }
117
+ );
118
+ }
119
+ function TraceCollapsibleContent({
120
+ className,
121
+ children,
122
+ ...props
123
+ }) {
124
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
125
+ _chunkW5HPHEE7cjs.CollapsibleContent,
126
+ {
127
+ "data-slot": "trace-collapsible-content",
128
+ className: "min-w-0 overflow-hidden duration-200 [--radix-accordion-content-height:var(--radix-collapsible-content-height)] data-open:animate-accordion-down data-closed:animate-accordion-up",
129
+ ...props,
130
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
131
+ "div",
132
+ {
133
+ "data-slot": "trace-collapsible-content-inner",
134
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
135
+ "mt-2 mb-1 ml-[calc(--spacing(2)-1px)] min-w-0 border-l pr-1 pl-4 leading-relaxed wrap-break-word text-muted-foreground",
136
+ className
137
+ ),
138
+ children
139
+ }
140
+ )
141
+ }
142
+ );
143
+ }
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+ exports.Trace = Trace; exports.TraceLine = TraceLine; exports.TraceIcon = TraceIcon; exports.TraceTitle = TraceTitle; exports.TraceDescription = TraceDescription; exports.TraceCollapsible = TraceCollapsible; exports.TraceCollapsibleTrigger = TraceCollapsibleTrigger; exports.TraceCollapsibleContent = TraceCollapsibleContent;
@@ -0,0 +1,38 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
+
3
+
4
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
5
+
6
+ // src/primitives/textarea.tsx
7
+ var _react = require('react'); var React = _interopRequireWildcard(_react);
8
+ var _jsxruntime = require('react/jsx-runtime');
9
+ var Textarea = React.forwardRef(
10
+ ({ className, textSize = "sm", resize = "vertical", grow = false, font = "sans", height = "auto", ...props }, ref) => {
11
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12
+ "textarea",
13
+ {
14
+ "data-slot": "textarea",
15
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
16
+ "flex min-h-[80px] w-full rounded-md border bg-background px-3 py-2 ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
17
+ // Entered text keeps the iOS-safe floor. The shared stylesheet sizes
18
+ // placeholder copy independently at the compact 14px base scale.
19
+ textSize === "sm" ? "text-[16px] md:text-sm" : "text-[16px] md:text-xs",
20
+ resize === "none" && "resize-none",
21
+ grow && "flex-1",
22
+ font === "mono" && "font-mono",
23
+ height === "panel" && "h-32",
24
+ height === "editor" && "h-72",
25
+ height === "editor-lg" && "h-80",
26
+ className
27
+ ),
28
+ ref,
29
+ ...props
30
+ }
31
+ );
32
+ }
33
+ );
34
+ Textarea.displayName = "Textarea";
35
+
36
+
37
+
38
+ exports.Textarea = Textarea;
@@ -0,0 +1,29 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
5
+
6
+ // src/primitives/action-dock.tsx
7
+ var _react = require('react');
8
+ var _jsxruntime = require('react/jsx-runtime');
9
+ var ActionDock = _react.forwardRef.call(void 0,
10
+ function ActionDock2({ shrink = true, className, ...props }, ref) {
11
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12
+ "aside",
13
+ {
14
+ ref,
15
+ "data-slot": "action-dock",
16
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
17
+ "w-full border-t border-border bg-background/85 backdrop-blur-sm supports-backdrop-filter:bg-background/70 pb-[env(safe-area-inset-bottom)]",
18
+ !shrink && "shrink-0",
19
+ className
20
+ ),
21
+ ...props
22
+ }
23
+ );
24
+ }
25
+ );
26
+
27
+
28
+
29
+ exports.ActionDock = ActionDock;