@locusgraph/components 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action/button-group.js +148 -17
- package/dist/action/button.js +91 -27
- package/dist/action/toggle-group.js +176 -12
- package/dist/action/toggle.js +71 -18
- package/dist/display/avatar.js +118 -7
- package/dist/display/badge.d.ts +1 -1
- package/dist/display/badge.js +74 -17
- package/dist/display/chart/chart-container.js +205 -45
- package/dist/display/chart/chart-legend.js +79 -14
- package/dist/display/chart/chart-tooltip.js +211 -40
- package/dist/display/chat/attachment/attachment-parts.js +222 -13
- package/dist/display/chat/attachment/attachment.js +210 -28
- package/dist/display/chat/bubble.js +225 -37
- package/dist/display/chat/marker.js +143 -15
- package/dist/display/chat/message-scroller.js +277 -15
- package/dist/display/chat/message.js +238 -13
- package/dist/display/content/item.js +448 -47
- package/dist/display/content/kbd.js +78 -5
- package/dist/display/media/aspect-ratio.js +27 -3
- package/dist/display/media/carousel-controls.js +163 -12
- package/dist/display/media/carousel.js +325 -65
- package/dist/display/rule-grid/rule-grid.d.ts +3 -1
- package/dist/display/rule-grid/rule-grid.js +311 -25
- package/dist/display/separator.js +56 -3
- package/dist/display/skeletons/layouts/skeleton-rule-grid.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +83 -0
- package/dist/display/skeletons/layouts/skeleton-table.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-table.js +174 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.js +102 -0
- package/dist/display/skeletons/shapes/skeleton-button.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-button.js +102 -0
- package/dist/display/skeletons/shapes/skeleton-text.d.ts +7 -0
- package/dist/display/skeletons/shapes/skeleton-text.js +84 -0
- package/dist/display/skeletons/skeleton-parts.d.ts +11 -0
- package/dist/display/skeletons/skeleton-parts.js +68 -0
- package/dist/display/status/alert.d.ts +1 -1
- package/dist/display/status/alert.js +137 -17
- package/dist/display/status/empty.js +250 -22
- package/dist/display/status/progress.d.ts +5 -1
- package/dist/display/status/progress.js +120 -3
- package/dist/display/status/skeleton.js +40 -3
- package/dist/display/status/spinner.js +42 -4
- package/dist/display/table.js +310 -17
- package/dist/feedback/toaster.d.ts +1 -1
- package/dist/feedback/toaster.js +100 -25
- package/dist/form/advanced/calendar-day-button.js +89 -12
- package/dist/form/advanced/calendar.js +349 -56
- package/dist/form/advanced/combobox/combobox-chips.js +152 -9
- package/dist/form/advanced/combobox/combobox-items.js +240 -15
- package/dist/form/advanced/combobox/combobox.js +387 -14
- package/dist/form/advanced/input-otp.js +202 -12
- package/dist/form/choice/checkbox.js +59 -4
- package/dist/form/choice/radio-group.js +95 -6
- package/dist/form/choice/select.js +479 -25
- package/dist/form/choice/slider.js +118 -4
- package/dist/form/choice/switch.js +53 -3
- package/dist/form/field/field-error.js +117 -14
- package/dist/form/field/field-separator.js +70 -3
- package/dist/form/field/field-set.js +85 -5
- package/dist/form/field/field-text.js +116 -7
- package/dist/form/field/field.js +138 -26
- package/dist/form/hook-form/form.js +338 -40
- package/dist/form/input-group.js +297 -47
- package/dist/form/input.js +47 -3
- package/dist/form/label.js +42 -3
- package/dist/form/native-select.js +148 -8
- package/dist/form/textarea.js +41 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/layout/accordion.js +166 -9
- package/dist/layout/collapsible.js +75 -7
- package/dist/layout/resizable.js +123 -8
- package/dist/layout/scroll/direction.js +25 -3
- package/dist/layout/scroll/scroll-area.d.ts +1 -1
- package/dist/layout/scroll/scroll-area.js +138 -5
- package/dist/layout/sidebar/sidebar-context.js +184 -51
- package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
- package/dist/layout/sidebar/sidebar-menu.js +319 -38
- package/dist/layout/sidebar/sidebar-sections.js +369 -22
- package/dist/layout/sidebar/sidebar.js +385 -29
- package/dist/layout/tabs.js +183 -18
- package/dist/layout/use-mobile.js +23 -10
- package/dist/navigation/breadcrumb.js +302 -18
- package/dist/navigation/menubar/menubar-items.js +323 -17
- package/dist/navigation/menubar/menubar-sub.js +126 -8
- package/dist/navigation/menubar/menubar.js +213 -13
- package/dist/navigation/navigation-menu.js +367 -19
- package/dist/navigation/pagination.js +329 -20
- package/dist/overlay/alert-dialog.js +485 -26
- package/dist/overlay/context-menu/context-menu-items.js +323 -17
- package/dist/overlay/context-menu/context-menu-sub.js +126 -8
- package/dist/overlay/context-menu/context-menu.js +140 -11
- package/dist/overlay/dialog.js +406 -25
- package/dist/overlay/floating/command.js +424 -21
- package/dist/overlay/floating/drawer.js +354 -22
- package/dist/overlay/floating/hover-card.js +107 -7
- package/dist/overlay/menu/dropdown-menu-choice.js +150 -8
- package/dist/overlay/menu/dropdown-menu-item.js +174 -9
- package/dist/overlay/menu/dropdown-menu-sub.js +125 -8
- package/dist/overlay/menu/dropdown-menu.js +147 -12
- package/dist/overlay/popover.js +106 -7
- package/dist/overlay/sheet.js +380 -27
- package/dist/overlay/tooltip.js +145 -9
- package/dist/shell/app-header.js +81 -5
- package/dist/shell/app-shell.js +58 -3
- package/dist/shell/breadcrumbs.js +102 -12
- package/dist/shell/docs/docs-header.js +211 -11
- package/dist/shell/docs/docs-shell.js +100 -3
- package/dist/shell/docs/docs-sidebar.js +88 -7
- package/dist/shell/docs/on-this-page.js +78 -7
- package/dist/shell/docs/use-active-section.js +88 -42
- package/dist/shell/navigation/app-sidebar.js +188 -6
- package/dist/shell/navigation/nav-group.js +161 -10
- package/dist/shell/theme-toggle.js +52 -5
- package/package.json +5 -5
|
@@ -1,25 +1,287 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { ArrowDown as ArrowDownIcon } from "@carbon/icons-react";
|
|
5
|
+
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
4
6
|
import { cn } from "cn";
|
|
5
|
-
import
|
|
7
|
+
import * as React from "react";
|
|
6
8
|
import { Button } from "../../action/button.js";
|
|
9
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
10
|
function MessageScrollerProvider(props) {
|
|
8
|
-
|
|
11
|
+
const $ = _c(2);
|
|
12
|
+
let t0;
|
|
13
|
+
if ($[0] !== props) {
|
|
14
|
+
t0 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Provider, {
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
$[0] = props;
|
|
18
|
+
$[1] = t0;
|
|
19
|
+
} else {
|
|
20
|
+
t0 = $[1];
|
|
21
|
+
}
|
|
22
|
+
return t0;
|
|
9
23
|
}
|
|
10
|
-
function MessageScroller(
|
|
11
|
-
|
|
24
|
+
function MessageScroller(t0) {
|
|
25
|
+
const $ = _c(8);
|
|
26
|
+
let className;
|
|
27
|
+
let props;
|
|
28
|
+
if ($[0] !== t0) {
|
|
29
|
+
({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
} = t0);
|
|
33
|
+
$[0] = t0;
|
|
34
|
+
$[1] = className;
|
|
35
|
+
$[2] = props;
|
|
36
|
+
} else {
|
|
37
|
+
className = $[1];
|
|
38
|
+
props = $[2];
|
|
39
|
+
}
|
|
40
|
+
let t1;
|
|
41
|
+
if ($[3] !== className) {
|
|
42
|
+
t1 = cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className);
|
|
43
|
+
$[3] = className;
|
|
44
|
+
$[4] = t1;
|
|
45
|
+
} else {
|
|
46
|
+
t1 = $[4];
|
|
47
|
+
}
|
|
48
|
+
let t2;
|
|
49
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
50
|
+
t2 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Root, {
|
|
51
|
+
"data-slot": "message-scroller",
|
|
52
|
+
className: t1,
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
$[5] = props;
|
|
56
|
+
$[6] = t1;
|
|
57
|
+
$[7] = t2;
|
|
58
|
+
} else {
|
|
59
|
+
t2 = $[7];
|
|
60
|
+
}
|
|
61
|
+
return t2;
|
|
12
62
|
}
|
|
13
|
-
function MessageScrollerViewport(
|
|
14
|
-
|
|
63
|
+
function MessageScrollerViewport(t0) {
|
|
64
|
+
const $ = _c(8);
|
|
65
|
+
let className;
|
|
66
|
+
let props;
|
|
67
|
+
if ($[0] !== t0) {
|
|
68
|
+
({
|
|
69
|
+
className,
|
|
70
|
+
...props
|
|
71
|
+
} = t0);
|
|
72
|
+
$[0] = t0;
|
|
73
|
+
$[1] = className;
|
|
74
|
+
$[2] = props;
|
|
75
|
+
} else {
|
|
76
|
+
className = $[1];
|
|
77
|
+
props = $[2];
|
|
78
|
+
}
|
|
79
|
+
let t1;
|
|
80
|
+
if ($[3] !== className) {
|
|
81
|
+
t1 = cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-none data-pending-scroll:invisible", className);
|
|
82
|
+
$[3] = className;
|
|
83
|
+
$[4] = t1;
|
|
84
|
+
} else {
|
|
85
|
+
t1 = $[4];
|
|
86
|
+
}
|
|
87
|
+
let t2;
|
|
88
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
89
|
+
t2 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Viewport, {
|
|
90
|
+
"data-slot": "message-scroller-viewport",
|
|
91
|
+
className: t1,
|
|
92
|
+
...props
|
|
93
|
+
});
|
|
94
|
+
$[5] = props;
|
|
95
|
+
$[6] = t1;
|
|
96
|
+
$[7] = t2;
|
|
97
|
+
} else {
|
|
98
|
+
t2 = $[7];
|
|
99
|
+
}
|
|
100
|
+
return t2;
|
|
15
101
|
}
|
|
16
|
-
function MessageScrollerContent(
|
|
17
|
-
|
|
102
|
+
function MessageScrollerContent(t0) {
|
|
103
|
+
const $ = _c(8);
|
|
104
|
+
let className;
|
|
105
|
+
let props;
|
|
106
|
+
if ($[0] !== t0) {
|
|
107
|
+
({
|
|
108
|
+
className,
|
|
109
|
+
...props
|
|
110
|
+
} = t0);
|
|
111
|
+
$[0] = t0;
|
|
112
|
+
$[1] = className;
|
|
113
|
+
$[2] = props;
|
|
114
|
+
} else {
|
|
115
|
+
className = $[1];
|
|
116
|
+
props = $[2];
|
|
117
|
+
}
|
|
118
|
+
let t1;
|
|
119
|
+
if ($[3] !== className) {
|
|
120
|
+
t1 = cn("flex h-max min-h-full flex-col gap-8", className);
|
|
121
|
+
$[3] = className;
|
|
122
|
+
$[4] = t1;
|
|
123
|
+
} else {
|
|
124
|
+
t1 = $[4];
|
|
125
|
+
}
|
|
126
|
+
let t2;
|
|
127
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
128
|
+
t2 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Content, {
|
|
129
|
+
"data-slot": "message-scroller-content",
|
|
130
|
+
className: t1,
|
|
131
|
+
...props
|
|
132
|
+
});
|
|
133
|
+
$[5] = props;
|
|
134
|
+
$[6] = t1;
|
|
135
|
+
$[7] = t2;
|
|
136
|
+
} else {
|
|
137
|
+
t2 = $[7];
|
|
138
|
+
}
|
|
139
|
+
return t2;
|
|
18
140
|
}
|
|
19
|
-
function MessageScrollerItem(
|
|
20
|
-
|
|
141
|
+
function MessageScrollerItem(t0) {
|
|
142
|
+
const $ = _c(10);
|
|
143
|
+
let className;
|
|
144
|
+
let props;
|
|
145
|
+
let t1;
|
|
146
|
+
if ($[0] !== t0) {
|
|
147
|
+
({
|
|
148
|
+
className,
|
|
149
|
+
scrollAnchor: t1,
|
|
150
|
+
...props
|
|
151
|
+
} = t0);
|
|
152
|
+
$[0] = t0;
|
|
153
|
+
$[1] = className;
|
|
154
|
+
$[2] = props;
|
|
155
|
+
$[3] = t1;
|
|
156
|
+
} else {
|
|
157
|
+
className = $[1];
|
|
158
|
+
props = $[2];
|
|
159
|
+
t1 = $[3];
|
|
160
|
+
}
|
|
161
|
+
const scrollAnchor = t1 === undefined ? false : t1;
|
|
162
|
+
let t2;
|
|
163
|
+
if ($[4] !== className) {
|
|
164
|
+
t2 = cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className);
|
|
165
|
+
$[4] = className;
|
|
166
|
+
$[5] = t2;
|
|
167
|
+
} else {
|
|
168
|
+
t2 = $[5];
|
|
169
|
+
}
|
|
170
|
+
let t3;
|
|
171
|
+
if ($[6] !== props || $[7] !== scrollAnchor || $[8] !== t2) {
|
|
172
|
+
t3 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Item, {
|
|
173
|
+
"data-slot": "message-scroller-item",
|
|
174
|
+
scrollAnchor: scrollAnchor,
|
|
175
|
+
className: t2,
|
|
176
|
+
...props
|
|
177
|
+
});
|
|
178
|
+
$[6] = props;
|
|
179
|
+
$[7] = scrollAnchor;
|
|
180
|
+
$[8] = t2;
|
|
181
|
+
$[9] = t3;
|
|
182
|
+
} else {
|
|
183
|
+
t3 = $[9];
|
|
184
|
+
}
|
|
185
|
+
return t3;
|
|
21
186
|
}
|
|
22
|
-
function MessageScrollerButton(
|
|
23
|
-
|
|
187
|
+
function MessageScrollerButton(t0) {
|
|
188
|
+
const $ = _c(25);
|
|
189
|
+
let children;
|
|
190
|
+
let className;
|
|
191
|
+
let props;
|
|
192
|
+
let render;
|
|
193
|
+
let t1;
|
|
194
|
+
let t2;
|
|
195
|
+
let t3;
|
|
196
|
+
if ($[0] !== t0) {
|
|
197
|
+
({
|
|
198
|
+
direction: t1,
|
|
199
|
+
className,
|
|
200
|
+
children,
|
|
201
|
+
render,
|
|
202
|
+
variant: t2,
|
|
203
|
+
size: t3,
|
|
204
|
+
...props
|
|
205
|
+
} = t0);
|
|
206
|
+
$[0] = t0;
|
|
207
|
+
$[1] = children;
|
|
208
|
+
$[2] = className;
|
|
209
|
+
$[3] = props;
|
|
210
|
+
$[4] = render;
|
|
211
|
+
$[5] = t1;
|
|
212
|
+
$[6] = t2;
|
|
213
|
+
$[7] = t3;
|
|
214
|
+
} else {
|
|
215
|
+
children = $[1];
|
|
216
|
+
className = $[2];
|
|
217
|
+
props = $[3];
|
|
218
|
+
render = $[4];
|
|
219
|
+
t1 = $[5];
|
|
220
|
+
t2 = $[6];
|
|
221
|
+
t3 = $[7];
|
|
222
|
+
}
|
|
223
|
+
const direction = t1 === undefined ? "end" : t1;
|
|
224
|
+
const variant = t2 === undefined ? "secondary" : t2;
|
|
225
|
+
const size = t3 === undefined ? "icon-sm" : t3;
|
|
226
|
+
let t4;
|
|
227
|
+
if ($[8] !== className) {
|
|
228
|
+
t4 = cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className);
|
|
229
|
+
$[8] = className;
|
|
230
|
+
$[9] = t4;
|
|
231
|
+
} else {
|
|
232
|
+
t4 = $[9];
|
|
233
|
+
}
|
|
234
|
+
let t5;
|
|
235
|
+
if ($[10] !== render || $[11] !== size || $[12] !== variant) {
|
|
236
|
+
t5 = render ?? /*#__PURE__*/_jsx(Button, {
|
|
237
|
+
variant: variant,
|
|
238
|
+
size: size
|
|
239
|
+
});
|
|
240
|
+
$[10] = render;
|
|
241
|
+
$[11] = size;
|
|
242
|
+
$[12] = variant;
|
|
243
|
+
$[13] = t5;
|
|
244
|
+
} else {
|
|
245
|
+
t5 = $[13];
|
|
246
|
+
}
|
|
247
|
+
let t6;
|
|
248
|
+
if ($[14] !== children || $[15] !== direction) {
|
|
249
|
+
t6 = children ?? /*#__PURE__*/_jsxs(_Fragment, {
|
|
250
|
+
children: [/*#__PURE__*/_jsx(ArrowDownIcon, {}), /*#__PURE__*/_jsx("span", {
|
|
251
|
+
className: "sr-only",
|
|
252
|
+
children: direction === "end" ? "Scroll to end" : "Scroll to start"
|
|
253
|
+
})]
|
|
254
|
+
});
|
|
255
|
+
$[14] = children;
|
|
256
|
+
$[15] = direction;
|
|
257
|
+
$[16] = t6;
|
|
258
|
+
} else {
|
|
259
|
+
t6 = $[16];
|
|
260
|
+
}
|
|
261
|
+
let t7;
|
|
262
|
+
if ($[17] !== direction || $[18] !== props || $[19] !== size || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== variant) {
|
|
263
|
+
t7 = /*#__PURE__*/_jsx(MessageScrollerPrimitive.Button, {
|
|
264
|
+
"data-slot": "message-scroller-button",
|
|
265
|
+
"data-direction": direction,
|
|
266
|
+
"data-variant": variant,
|
|
267
|
+
"data-size": size,
|
|
268
|
+
direction: direction,
|
|
269
|
+
className: t4,
|
|
270
|
+
render: t5,
|
|
271
|
+
...props,
|
|
272
|
+
children: t6
|
|
273
|
+
});
|
|
274
|
+
$[17] = direction;
|
|
275
|
+
$[18] = props;
|
|
276
|
+
$[19] = size;
|
|
277
|
+
$[20] = t4;
|
|
278
|
+
$[21] = t5;
|
|
279
|
+
$[22] = t6;
|
|
280
|
+
$[23] = variant;
|
|
281
|
+
$[24] = t7;
|
|
282
|
+
} else {
|
|
283
|
+
t7 = $[24];
|
|
284
|
+
}
|
|
285
|
+
return t7;
|
|
24
286
|
}
|
|
25
|
-
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility
|
|
287
|
+
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility };
|
|
@@ -1,21 +1,246 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { cn } from "cn";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
function MessageGroup(t0) {
|
|
6
|
+
const $ = _c(8);
|
|
7
|
+
let className;
|
|
8
|
+
let props;
|
|
9
|
+
if ($[0] !== t0) {
|
|
10
|
+
({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = className;
|
|
16
|
+
$[2] = props;
|
|
17
|
+
} else {
|
|
18
|
+
className = $[1];
|
|
19
|
+
props = $[2];
|
|
20
|
+
}
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[3] !== className) {
|
|
23
|
+
t1 = cn("flex min-w-0 flex-col gap-2", className);
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t1 = $[4];
|
|
28
|
+
}
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
31
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
32
|
+
"data-slot": "message-group",
|
|
33
|
+
className: t1,
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
$[5] = props;
|
|
37
|
+
$[6] = t1;
|
|
38
|
+
$[7] = t2;
|
|
39
|
+
} else {
|
|
40
|
+
t2 = $[7];
|
|
41
|
+
}
|
|
42
|
+
return t2;
|
|
5
43
|
}
|
|
6
|
-
function Message(
|
|
7
|
-
|
|
44
|
+
function Message(t0) {
|
|
45
|
+
const $ = _c(10);
|
|
46
|
+
let className;
|
|
47
|
+
let props;
|
|
48
|
+
let t1;
|
|
49
|
+
if ($[0] !== t0) {
|
|
50
|
+
({
|
|
51
|
+
className,
|
|
52
|
+
align: t1,
|
|
53
|
+
...props
|
|
54
|
+
} = t0);
|
|
55
|
+
$[0] = t0;
|
|
56
|
+
$[1] = className;
|
|
57
|
+
$[2] = props;
|
|
58
|
+
$[3] = t1;
|
|
59
|
+
} else {
|
|
60
|
+
className = $[1];
|
|
61
|
+
props = $[2];
|
|
62
|
+
t1 = $[3];
|
|
63
|
+
}
|
|
64
|
+
const align = t1 === undefined ? "start" : t1;
|
|
65
|
+
let t2;
|
|
66
|
+
if ($[4] !== className) {
|
|
67
|
+
t2 = cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className);
|
|
68
|
+
$[4] = className;
|
|
69
|
+
$[5] = t2;
|
|
70
|
+
} else {
|
|
71
|
+
t2 = $[5];
|
|
72
|
+
}
|
|
73
|
+
let t3;
|
|
74
|
+
if ($[6] !== align || $[7] !== props || $[8] !== t2) {
|
|
75
|
+
t3 = /*#__PURE__*/_jsx("div", {
|
|
76
|
+
"data-slot": "message",
|
|
77
|
+
"data-align": align,
|
|
78
|
+
className: t2,
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
$[6] = align;
|
|
82
|
+
$[7] = props;
|
|
83
|
+
$[8] = t2;
|
|
84
|
+
$[9] = t3;
|
|
85
|
+
} else {
|
|
86
|
+
t3 = $[9];
|
|
87
|
+
}
|
|
88
|
+
return t3;
|
|
8
89
|
}
|
|
9
|
-
function MessageAvatar(
|
|
10
|
-
|
|
90
|
+
function MessageAvatar(t0) {
|
|
91
|
+
const $ = _c(8);
|
|
92
|
+
let className;
|
|
93
|
+
let props;
|
|
94
|
+
if ($[0] !== t0) {
|
|
95
|
+
({
|
|
96
|
+
className,
|
|
97
|
+
...props
|
|
98
|
+
} = t0);
|
|
99
|
+
$[0] = t0;
|
|
100
|
+
$[1] = className;
|
|
101
|
+
$[2] = props;
|
|
102
|
+
} else {
|
|
103
|
+
className = $[1];
|
|
104
|
+
props = $[2];
|
|
105
|
+
}
|
|
106
|
+
let t1;
|
|
107
|
+
if ($[3] !== className) {
|
|
108
|
+
t1 = cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className);
|
|
109
|
+
$[3] = className;
|
|
110
|
+
$[4] = t1;
|
|
111
|
+
} else {
|
|
112
|
+
t1 = $[4];
|
|
113
|
+
}
|
|
114
|
+
let t2;
|
|
115
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
116
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
117
|
+
"data-slot": "message-avatar",
|
|
118
|
+
className: t1,
|
|
119
|
+
...props
|
|
120
|
+
});
|
|
121
|
+
$[5] = props;
|
|
122
|
+
$[6] = t1;
|
|
123
|
+
$[7] = t2;
|
|
124
|
+
} else {
|
|
125
|
+
t2 = $[7];
|
|
126
|
+
}
|
|
127
|
+
return t2;
|
|
11
128
|
}
|
|
12
|
-
function MessageContent(
|
|
13
|
-
|
|
129
|
+
function MessageContent(t0) {
|
|
130
|
+
const $ = _c(8);
|
|
131
|
+
let className;
|
|
132
|
+
let props;
|
|
133
|
+
if ($[0] !== t0) {
|
|
134
|
+
({
|
|
135
|
+
className,
|
|
136
|
+
...props
|
|
137
|
+
} = t0);
|
|
138
|
+
$[0] = t0;
|
|
139
|
+
$[1] = className;
|
|
140
|
+
$[2] = props;
|
|
141
|
+
} else {
|
|
142
|
+
className = $[1];
|
|
143
|
+
props = $[2];
|
|
144
|
+
}
|
|
145
|
+
let t1;
|
|
146
|
+
if ($[3] !== className) {
|
|
147
|
+
t1 = cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className);
|
|
148
|
+
$[3] = className;
|
|
149
|
+
$[4] = t1;
|
|
150
|
+
} else {
|
|
151
|
+
t1 = $[4];
|
|
152
|
+
}
|
|
153
|
+
let t2;
|
|
154
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
155
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
156
|
+
"data-slot": "message-content",
|
|
157
|
+
className: t1,
|
|
158
|
+
...props
|
|
159
|
+
});
|
|
160
|
+
$[5] = props;
|
|
161
|
+
$[6] = t1;
|
|
162
|
+
$[7] = t2;
|
|
163
|
+
} else {
|
|
164
|
+
t2 = $[7];
|
|
165
|
+
}
|
|
166
|
+
return t2;
|
|
14
167
|
}
|
|
15
|
-
function MessageHeader(
|
|
16
|
-
|
|
168
|
+
function MessageHeader(t0) {
|
|
169
|
+
const $ = _c(8);
|
|
170
|
+
let className;
|
|
171
|
+
let props;
|
|
172
|
+
if ($[0] !== t0) {
|
|
173
|
+
({
|
|
174
|
+
className,
|
|
175
|
+
...props
|
|
176
|
+
} = t0);
|
|
177
|
+
$[0] = t0;
|
|
178
|
+
$[1] = className;
|
|
179
|
+
$[2] = props;
|
|
180
|
+
} else {
|
|
181
|
+
className = $[1];
|
|
182
|
+
props = $[2];
|
|
183
|
+
}
|
|
184
|
+
let t1;
|
|
185
|
+
if ($[3] !== className) {
|
|
186
|
+
t1 = cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground", className);
|
|
187
|
+
$[3] = className;
|
|
188
|
+
$[4] = t1;
|
|
189
|
+
} else {
|
|
190
|
+
t1 = $[4];
|
|
191
|
+
}
|
|
192
|
+
let t2;
|
|
193
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
194
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
195
|
+
"data-slot": "message-header",
|
|
196
|
+
className: t1,
|
|
197
|
+
...props
|
|
198
|
+
});
|
|
199
|
+
$[5] = props;
|
|
200
|
+
$[6] = t1;
|
|
201
|
+
$[7] = t2;
|
|
202
|
+
} else {
|
|
203
|
+
t2 = $[7];
|
|
204
|
+
}
|
|
205
|
+
return t2;
|
|
17
206
|
}
|
|
18
|
-
function MessageFooter(
|
|
19
|
-
|
|
207
|
+
function MessageFooter(t0) {
|
|
208
|
+
const $ = _c(8);
|
|
209
|
+
let className;
|
|
210
|
+
let props;
|
|
211
|
+
if ($[0] !== t0) {
|
|
212
|
+
({
|
|
213
|
+
className,
|
|
214
|
+
...props
|
|
215
|
+
} = t0);
|
|
216
|
+
$[0] = t0;
|
|
217
|
+
$[1] = className;
|
|
218
|
+
$[2] = props;
|
|
219
|
+
} else {
|
|
220
|
+
className = $[1];
|
|
221
|
+
props = $[2];
|
|
222
|
+
}
|
|
223
|
+
let t1;
|
|
224
|
+
if ($[3] !== className) {
|
|
225
|
+
t1 = cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-data-[align=end]/message:justify-end", className);
|
|
226
|
+
$[3] = className;
|
|
227
|
+
$[4] = t1;
|
|
228
|
+
} else {
|
|
229
|
+
t1 = $[4];
|
|
230
|
+
}
|
|
231
|
+
let t2;
|
|
232
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
233
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
234
|
+
"data-slot": "message-footer",
|
|
235
|
+
className: t1,
|
|
236
|
+
...props
|
|
237
|
+
});
|
|
238
|
+
$[5] = props;
|
|
239
|
+
$[6] = t1;
|
|
240
|
+
$[7] = t2;
|
|
241
|
+
} else {
|
|
242
|
+
t2 = $[7];
|
|
243
|
+
}
|
|
244
|
+
return t2;
|
|
20
245
|
}
|
|
21
246
|
export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
|