@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
@@ -0,0 +1,154 @@
1
+ "use client";
2
+ import {
3
+ Collapsible,
4
+ CollapsibleContent,
5
+ CollapsibleTrigger
6
+ } from "./chunk-NBUWGRQO.js";
7
+ import {
8
+ cn
9
+ } from "./chunk-G6SRSWXB.js";
10
+
11
+ // src/primitives/trace.tsx
12
+ import { ChevronRight } from "lucide-react";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
+ function Trace({ className, ...props }) {
15
+ return /* @__PURE__ */ jsx(
16
+ "div",
17
+ {
18
+ "data-slot": "trace",
19
+ className: cn(
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__ */ jsx(
33
+ "span",
34
+ {
35
+ "data-slot": "trace-line",
36
+ "data-status": status,
37
+ className: cn(
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__ */ jsx(
47
+ "span",
48
+ {
49
+ "data-slot": "trace-icon",
50
+ "aria-hidden": "true",
51
+ className: cn(
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__ */ jsx(
61
+ "span",
62
+ {
63
+ "data-slot": "trace-title",
64
+ className: cn("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__ */ jsx(
74
+ "span",
75
+ {
76
+ "data-slot": "trace-description",
77
+ className: cn(
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__ */ jsx(
90
+ Collapsible,
91
+ {
92
+ "data-slot": "trace-collapsible",
93
+ className: cn("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__ */ jsxs(
104
+ CollapsibleTrigger,
105
+ {
106
+ "data-slot": "trace-collapsible-trigger",
107
+ className: cn(
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__ */ jsx(TraceIcon, { className: "transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90", children: /* @__PURE__ */ jsx(ChevronRight, {}) })
115
+ ]
116
+ }
117
+ );
118
+ }
119
+ function TraceCollapsibleContent({
120
+ className,
121
+ children,
122
+ ...props
123
+ }) {
124
+ return /* @__PURE__ */ jsx(
125
+ 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__ */ jsx(
131
+ "div",
132
+ {
133
+ "data-slot": "trace-collapsible-content-inner",
134
+ className: cn(
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
+ export {
146
+ Trace,
147
+ TraceLine,
148
+ TraceIcon,
149
+ TraceTitle,
150
+ TraceDescription,
151
+ TraceCollapsible,
152
+ TraceCollapsibleTrigger,
153
+ TraceCollapsibleContent
154
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunk2KFZQJH5cjs = require('../chunk-2KFZQJH5.cjs');
5
+ require('../chunk-KWLSBTB2.cjs');
6
+
7
+
8
+ exports.ActionDock = _chunk2KFZQJH5cjs.ActionDock;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { HTMLAttributes } from 'react';
3
+
4
+ interface ActionDockProps extends HTMLAttributes<HTMLElement> {
5
+ shrink?: boolean;
6
+ }
7
+ /** In-flow action boundary for the bottom of a panel, drawer, or review card. */
8
+ declare const ActionDock: React.ForwardRefExoticComponent<ActionDockProps & React.RefAttributes<HTMLElement>>;
9
+
10
+ export { ActionDock, type ActionDockProps };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { HTMLAttributes } from 'react';
3
+
4
+ interface ActionDockProps extends HTMLAttributes<HTMLElement> {
5
+ shrink?: boolean;
6
+ }
7
+ /** In-flow action boundary for the bottom of a panel, drawer, or review card. */
8
+ declare const ActionDock: React.ForwardRefExoticComponent<ActionDockProps & React.RefAttributes<HTMLElement>>;
9
+
10
+ export { ActionDock, type ActionDockProps };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import {
3
+ ActionDock
4
+ } from "../chunk-42RTTHND.js";
5
+ import "../chunk-G6SRSWXB.js";
6
+ export {
7
+ ActionDock
8
+ };
@@ -1,203 +1,25 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }"use client";
2
-
3
-
4
- var _chunkL4DH72UFcjs = require('../chunk-L4DH72UF.cjs');
5
-
6
-
7
- var _chunkKWLSBTB2cjs = require('../chunk-KWLSBTB2.cjs');
8
-
9
- // src/primitives/attachment.tsx
10
- var _classvarianceauthority = require('class-variance-authority');
11
- var _radixui = require('radix-ui');
12
- var _jsxruntime = require('react/jsx-runtime');
13
- var attachmentVariants = _classvarianceauthority.cva.call(void 0,
14
- "cn-attachment group/attachment relative flex max-w-full min-w-0 shrink-0 flex-wrap border bg-card text-card-foreground transition-colors has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed",
15
- {
16
- variants: {
17
- size: {
18
- default: "cn-attachment-size-default",
19
- sm: "cn-attachment-size-sm",
20
- xs: "cn-attachment-size-xs"
21
- },
22
- orientation: {
23
- horizontal: "cn-attachment-orientation-horizontal items-center",
24
- vertical: "cn-attachment-orientation-vertical flex-col"
25
- }
26
- }
27
- }
28
- );
29
- function Attachment({
30
- className,
31
- state = "done",
32
- size = "default",
33
- orientation = "horizontal",
34
- ...props
35
- }) {
36
- const resolvedOrientation = _nullishCoalesce(orientation, () => ( "horizontal"));
37
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
38
- "div",
39
- {
40
- "data-slot": "attachment",
41
- "data-state": state,
42
- "data-size": size,
43
- "data-orientation": resolvedOrientation,
44
- className: _chunkKWLSBTB2cjs.cn.call(void 0, attachmentVariants({ size, orientation }), className),
45
- ...props
46
- }
47
- );
48
- }
49
- var attachmentMediaVariants = _classvarianceauthority.cva.call(void 0,
50
- "cn-attachment-media relative flex aspect-square shrink-0 items-center justify-center overflow-hidden group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive [&_svg]:pointer-events-none",
51
- {
52
- variants: {
53
- variant: {
54
- icon: "cn-attachment-media-variant-icon",
55
- image: "cn-attachment-media-variant-image *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
56
- }
57
- },
58
- defaultVariants: {
59
- variant: "icon"
60
- }
61
- }
62
- );
63
- function AttachmentMedia({
64
- className,
65
- variant = "icon",
66
- ...props
67
- }) {
68
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
69
- "div",
70
- {
71
- "data-slot": "attachment-media",
72
- "data-variant": variant,
73
- className: _chunkKWLSBTB2cjs.cn.call(void 0, attachmentMediaVariants({ variant }), className),
74
- ...props
75
- }
76
- );
77
- }
78
- function AttachmentContent({
79
- className,
80
- ...props
81
- }) {
82
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
83
- "div",
84
- {
85
- "data-slot": "attachment-content",
86
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
87
- "cn-attachment-content max-w-full min-w-0 flex-1",
88
- className
89
- ),
90
- ...props
91
- }
92
- );
93
- }
94
- function AttachmentTitle({
95
- className,
96
- ...props
97
- }) {
98
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
99
- "span",
100
- {
101
- "data-slot": "attachment-title",
102
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
103
- "cn-attachment-title block max-w-full min-w-0 truncate group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer",
104
- className
105
- ),
106
- ...props
107
- }
108
- );
109
- }
110
- function AttachmentDescription({
111
- className,
112
- ...props
113
- }) {
114
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
115
- "span",
116
- {
117
- "data-slot": "attachment-description",
118
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
119
- "cn-attachment-description block min-w-0 truncate text-muted-foreground group-data-[state=error]/attachment:text-destructive/80",
120
- "max-w-full",
121
- className
122
- ),
123
- ...props
124
- }
125
- );
126
- }
127
- function AttachmentActions({
128
- className,
129
- ...props
130
- }) {
131
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
132
- "div",
133
- {
134
- "data-slot": "attachment-actions",
135
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
136
- "cn-attachment-actions flex shrink-0 items-center",
137
- className
138
- ),
139
- ...props
140
- }
141
- );
142
- }
143
- function AttachmentAction({
144
- className,
145
- variant,
146
- size = "icon-xs",
147
- ...props
148
- }) {
149
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
150
- _chunkL4DH72UFcjs.Button,
151
- {
152
- "data-slot": "attachment-action",
153
- variant: _nullishCoalesce(variant, () => ( "ghost")),
154
- size,
155
- className: _chunkKWLSBTB2cjs.cn.call(void 0, "cn-attachment-action", className),
156
- ...props
157
- }
158
- );
159
- }
160
- function AttachmentTrigger({
161
- className,
162
- asChild = false,
163
- type,
164
- ...props
165
- }) {
166
- const Comp = asChild ? _radixui.Slot.Root : "button";
167
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
168
- Comp,
169
- {
170
- "data-slot": "attachment-trigger",
171
- type: asChild ? void 0 : _nullishCoalesce(type, () => ( "button")),
172
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
173
- "cn-attachment-trigger absolute inset-0 z-10 outline-none",
174
- className
175
- ),
176
- ...props
177
- }
178
- );
179
- }
180
- function AttachmentGroup({ className, ...props }) {
181
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
182
- "div",
183
- {
184
- "data-slot": "attachment-group",
185
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
186
- "cn-attachment-group flex min-w-0 scroll-fade-x snap-x snap-mandatory scrollbar-none overflow-x-auto overscroll-x-contain *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start",
187
- className
188
- ),
189
- ...props
190
- }
191
- );
192
- }
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
- exports.Attachment = Attachment; exports.AttachmentAction = AttachmentAction; exports.AttachmentActions = AttachmentActions; exports.AttachmentContent = AttachmentContent; exports.AttachmentDescription = AttachmentDescription; exports.AttachmentGroup = AttachmentGroup; exports.AttachmentMedia = AttachmentMedia; exports.AttachmentTitle = AttachmentTitle; exports.AttachmentTrigger = AttachmentTrigger;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+ var _chunk32Q4XOTUcjs = require('../chunk-32Q4XOTU.cjs');
13
+ require('../chunk-L4DH72UF.cjs');
14
+ require('../chunk-KWLSBTB2.cjs');
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+ exports.Attachment = _chunk32Q4XOTUcjs.Attachment; exports.AttachmentAction = _chunk32Q4XOTUcjs.AttachmentAction; exports.AttachmentActions = _chunk32Q4XOTUcjs.AttachmentActions; exports.AttachmentContent = _chunk32Q4XOTUcjs.AttachmentContent; exports.AttachmentDescription = _chunk32Q4XOTUcjs.AttachmentDescription; exports.AttachmentGroup = _chunk32Q4XOTUcjs.AttachmentGroup; exports.AttachmentMedia = _chunk32Q4XOTUcjs.AttachmentMedia; exports.AttachmentTitle = _chunk32Q4XOTUcjs.AttachmentTitle; exports.AttachmentTrigger = _chunk32Q4XOTUcjs.AttachmentTrigger;
@@ -12,7 +12,7 @@ declare function Attachment({ className, state, size, orientation, ...props }: R
12
12
  state?: "idle" | "uploading" | "processing" | "error" | "done";
13
13
  }): react_jsx_runtime.JSX.Element;
14
14
  declare const attachmentMediaVariants: (props?: ({
15
- variant?: "icon" | "image" | null | undefined;
15
+ variant?: "image" | "icon" | null | undefined;
16
16
  } & class_variance_authority_types.ClassProp) | undefined) => string;
17
17
  declare function AttachmentMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof attachmentMediaVariants>): react_jsx_runtime.JSX.Element;
18
18
  declare function AttachmentContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
@@ -12,7 +12,7 @@ declare function Attachment({ className, state, size, orientation, ...props }: R
12
12
  state?: "idle" | "uploading" | "processing" | "error" | "done";
13
13
  }): react_jsx_runtime.JSX.Element;
14
14
  declare const attachmentMediaVariants: (props?: ({
15
- variant?: "icon" | "image" | null | undefined;
15
+ variant?: "image" | "icon" | null | undefined;
16
16
  } & class_variance_authority_types.ClassProp) | undefined) => string;
17
17
  declare function AttachmentMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof attachmentMediaVariants>): react_jsx_runtime.JSX.Element;
18
18
  declare function AttachmentContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
@@ -1,195 +1,17 @@
1
1
  "use client";
2
2
  import {
3
- Button
4
- } from "../chunk-HQRWRRZJ.js";
5
- import {
6
- cn
7
- } from "../chunk-G6SRSWXB.js";
8
-
9
- // src/primitives/attachment.tsx
10
- import { cva } from "class-variance-authority";
11
- import { Slot } from "radix-ui";
12
- import { jsx } from "react/jsx-runtime";
13
- var attachmentVariants = cva(
14
- "cn-attachment group/attachment relative flex max-w-full min-w-0 shrink-0 flex-wrap border bg-card text-card-foreground transition-colors has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed",
15
- {
16
- variants: {
17
- size: {
18
- default: "cn-attachment-size-default",
19
- sm: "cn-attachment-size-sm",
20
- xs: "cn-attachment-size-xs"
21
- },
22
- orientation: {
23
- horizontal: "cn-attachment-orientation-horizontal items-center",
24
- vertical: "cn-attachment-orientation-vertical flex-col"
25
- }
26
- }
27
- }
28
- );
29
- function Attachment({
30
- className,
31
- state = "done",
32
- size = "default",
33
- orientation = "horizontal",
34
- ...props
35
- }) {
36
- const resolvedOrientation = orientation ?? "horizontal";
37
- return /* @__PURE__ */ jsx(
38
- "div",
39
- {
40
- "data-slot": "attachment",
41
- "data-state": state,
42
- "data-size": size,
43
- "data-orientation": resolvedOrientation,
44
- className: cn(attachmentVariants({ size, orientation }), className),
45
- ...props
46
- }
47
- );
48
- }
49
- var attachmentMediaVariants = cva(
50
- "cn-attachment-media relative flex aspect-square shrink-0 items-center justify-center overflow-hidden group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive [&_svg]:pointer-events-none",
51
- {
52
- variants: {
53
- variant: {
54
- icon: "cn-attachment-media-variant-icon",
55
- image: "cn-attachment-media-variant-image *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
56
- }
57
- },
58
- defaultVariants: {
59
- variant: "icon"
60
- }
61
- }
62
- );
63
- function AttachmentMedia({
64
- className,
65
- variant = "icon",
66
- ...props
67
- }) {
68
- return /* @__PURE__ */ jsx(
69
- "div",
70
- {
71
- "data-slot": "attachment-media",
72
- "data-variant": variant,
73
- className: cn(attachmentMediaVariants({ variant }), className),
74
- ...props
75
- }
76
- );
77
- }
78
- function AttachmentContent({
79
- className,
80
- ...props
81
- }) {
82
- return /* @__PURE__ */ jsx(
83
- "div",
84
- {
85
- "data-slot": "attachment-content",
86
- className: cn(
87
- "cn-attachment-content max-w-full min-w-0 flex-1",
88
- className
89
- ),
90
- ...props
91
- }
92
- );
93
- }
94
- function AttachmentTitle({
95
- className,
96
- ...props
97
- }) {
98
- return /* @__PURE__ */ jsx(
99
- "span",
100
- {
101
- "data-slot": "attachment-title",
102
- className: cn(
103
- "cn-attachment-title block max-w-full min-w-0 truncate group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer",
104
- className
105
- ),
106
- ...props
107
- }
108
- );
109
- }
110
- function AttachmentDescription({
111
- className,
112
- ...props
113
- }) {
114
- return /* @__PURE__ */ jsx(
115
- "span",
116
- {
117
- "data-slot": "attachment-description",
118
- className: cn(
119
- "cn-attachment-description block min-w-0 truncate text-muted-foreground group-data-[state=error]/attachment:text-destructive/80",
120
- "max-w-full",
121
- className
122
- ),
123
- ...props
124
- }
125
- );
126
- }
127
- function AttachmentActions({
128
- className,
129
- ...props
130
- }) {
131
- return /* @__PURE__ */ jsx(
132
- "div",
133
- {
134
- "data-slot": "attachment-actions",
135
- className: cn(
136
- "cn-attachment-actions flex shrink-0 items-center",
137
- className
138
- ),
139
- ...props
140
- }
141
- );
142
- }
143
- function AttachmentAction({
144
- className,
145
- variant,
146
- size = "icon-xs",
147
- ...props
148
- }) {
149
- return /* @__PURE__ */ jsx(
150
- Button,
151
- {
152
- "data-slot": "attachment-action",
153
- variant: variant ?? "ghost",
154
- size,
155
- className: cn("cn-attachment-action", className),
156
- ...props
157
- }
158
- );
159
- }
160
- function AttachmentTrigger({
161
- className,
162
- asChild = false,
163
- type,
164
- ...props
165
- }) {
166
- const Comp = asChild ? Slot.Root : "button";
167
- return /* @__PURE__ */ jsx(
168
- Comp,
169
- {
170
- "data-slot": "attachment-trigger",
171
- type: asChild ? void 0 : type ?? "button",
172
- className: cn(
173
- "cn-attachment-trigger absolute inset-0 z-10 outline-none",
174
- className
175
- ),
176
- ...props
177
- }
178
- );
179
- }
180
- function AttachmentGroup({ className, ...props }) {
181
- return /* @__PURE__ */ jsx(
182
- "div",
183
- {
184
- "data-slot": "attachment-group",
185
- className: cn(
186
- "cn-attachment-group flex min-w-0 scroll-fade-x snap-x snap-mandatory scrollbar-none overflow-x-auto overscroll-x-contain *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start",
187
- className
188
- ),
189
- ...props
190
- }
191
- );
192
- }
3
+ Attachment,
4
+ AttachmentAction,
5
+ AttachmentActions,
6
+ AttachmentContent,
7
+ AttachmentDescription,
8
+ AttachmentGroup,
9
+ AttachmentMedia,
10
+ AttachmentTitle,
11
+ AttachmentTrigger
12
+ } from "../chunk-EZCKWTH7.js";
13
+ import "../chunk-HQRWRRZJ.js";
14
+ import "../chunk-G6SRSWXB.js";
193
15
  export {
194
16
  Attachment,
195
17
  AttachmentAction,
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { ElementType } from 'react';
5
5
 
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "error" | "success" | "default" | "secondary" | "destructive" | "outline" | "warning" | "info" | "neutral" | null | undefined;
7
+ variant?: "neutral" | "error" | "success" | "default" | "secondary" | "destructive" | "outline" | "warning" | "info" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
10
10
  weight?: "normal" | "semibold" | "bold";
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { ElementType } from 'react';
5
5
 
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "error" | "success" | "default" | "secondary" | "destructive" | "outline" | "warning" | "info" | "neutral" | null | undefined;
7
+ variant?: "neutral" | "error" | "success" | "default" | "secondary" | "destructive" | "outline" | "warning" | "info" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
10
10
  weight?: "normal" | "semibold" | "bold";