@botiverse/raft-ui 0.11.0 → 0.13.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.
@@ -0,0 +1,3224 @@
1
+ import { cn } from "./cn.mjs";
2
+ import { Dialog } from "@base-ui/react/dialog";
3
+ import { Check, Minus, X } from "lucide-react";
4
+ import { tv } from "tailwind-variants/lite";
5
+ import { Children, Fragment, createContext, isValidElement, use, useCallback, useContext, useEffect, useMemo, useRef, useSyncExternalStore } from "react";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
+ import { Button } from "@base-ui/react/button";
8
+ import { mergeProps } from "@base-ui/react/merge-props";
9
+ import { useRender } from "@base-ui/react/use-render";
10
+ import { Tooltip } from "@base-ui/react/tooltip";
11
+ import { Checkbox } from "@base-ui/react/checkbox";
12
+ import { ScrollArea } from "@base-ui/react/scroll-area";
13
+ import { Avatar } from "@base-ui/react";
14
+ import { Menu } from "@base-ui/react/menu";
15
+ import { Toggle } from "@base-ui/react/toggle";
16
+ import { Toolbar } from "@base-ui/react/toolbar";
17
+ //#region src/lib/tv.ts
18
+ const tv$1 = ((options) => {
19
+ const recipe = tv(options);
20
+ const wrappedRecipe = ((props) => {
21
+ const result = recipe(props);
22
+ if (result == null || typeof result === "string") return cn(result);
23
+ return Object.fromEntries(Object.entries(result).map(([slotName, slot]) => [slotName, (slotProps) => cn(slot(slotProps))]));
24
+ });
25
+ return Object.assign(wrappedRecipe, recipe);
26
+ });
27
+ //#endregion
28
+ //#region src/lib/theme/theme-context.ts
29
+ const ThemeStateContext = createContext({
30
+ mode: "light",
31
+ resolvedMode: "light",
32
+ setMode: () => void 0
33
+ });
34
+ //#endregion
35
+ //#region src/lib/theme/use-theme.ts
36
+ /** Read and update the colour mode. */
37
+ function useTheme() {
38
+ return use(ThemeStateContext);
39
+ }
40
+ //#endregion
41
+ //#region src/lib/theme/theme-scope.ts
42
+ /**
43
+ * Carry the provider's resolved mode (`light` / `dark`) onto content that
44
+ * renders outside its subtree (a portal), so a dark island's popup stays dark.
45
+ */
46
+ function resolveThemeScopeProps({ className, ...props }, { resolvedMode }) {
47
+ const resolvedClassName = typeof className === "function" ? (state) => cn(className(state), resolvedMode) : typeof className === "string" ? cn(className, resolvedMode) : className ?? resolvedMode;
48
+ return {
49
+ ...props,
50
+ className: resolvedClassName
51
+ };
52
+ }
53
+ function useThemeScopeProps(props) {
54
+ return resolveThemeScopeProps(props, useTheme());
55
+ }
56
+ //#endregion
57
+ //#region src/lib/overlay-depth.tsx
58
+ const OverlayStackContext = createContext([]);
59
+ function OverlayLayerProvider({ kind, modal, children }) {
60
+ const stack = useContext(OverlayStackContext);
61
+ const value = useMemo(() => modal ? [...stack, kind] : stack, [
62
+ stack,
63
+ kind,
64
+ modal
65
+ ]);
66
+ return /* @__PURE__ */ jsx(OverlayStackContext.Provider, {
67
+ value,
68
+ children
69
+ });
70
+ }
71
+ /**
72
+ * The modal surface this overlay's own surface was opened from, or null when
73
+ * it is the first. Called inside a surface, so the last entry is the surface
74
+ * itself and the one before it is its parent.
75
+ */
76
+ function useParentOverlayKind() {
77
+ const stack = useContext(OverlayStackContext);
78
+ return stack.length >= 2 ? stack[stack.length - 2] : null;
79
+ }
80
+ /**
81
+ * Wraps a dialog or drawer root's children in its layer. Base UI lets those
82
+ * children be a render function (`({ payload }) => …`), so keep that shape.
83
+ */
84
+ function withOverlayLayer(kind, modal, children) {
85
+ if (typeof children === "function") return (...args) => /* @__PURE__ */ jsx(OverlayLayerProvider, {
86
+ kind,
87
+ modal,
88
+ children: children(...args)
89
+ });
90
+ return /* @__PURE__ */ jsx(OverlayLayerProvider, {
91
+ kind,
92
+ modal,
93
+ children
94
+ });
95
+ }
96
+ //#endregion
97
+ //#region src/lib/default-native-button.ts
98
+ function defaultNativeButton(render) {
99
+ if (!render || typeof render !== "object" || !("type" in render)) return;
100
+ const element = render;
101
+ if (typeof element.type === "string") return element.type === "button";
102
+ }
103
+ //#endregion
104
+ //#region src/components/spinner/spinner.tsx
105
+ const SPINNER_STYLE = `
106
+ @keyframes raft-spinner-pixel {
107
+ 0%,
108
+ 24% {
109
+ opacity: 1;
110
+ }
111
+ 25%,
112
+ 100% {
113
+ opacity: 0.2;
114
+ }
115
+ }
116
+
117
+ [data-slot="spinner"] [data-spinner-pixel] {
118
+ animation: raft-spinner-pixel 1s steps(1) infinite;
119
+ }
120
+
121
+ [data-slot="spinner"] [data-spinner-pixel]:nth-child(2) {
122
+ animation-delay: 0.25s;
123
+ }
124
+
125
+ [data-slot="spinner"] [data-spinner-pixel]:nth-child(4) {
126
+ animation-delay: 0.5s;
127
+ }
128
+
129
+ [data-slot="spinner"] [data-spinner-pixel]:nth-child(3) {
130
+ animation-delay: 0.75s;
131
+ }
132
+
133
+ @media (prefers-reduced-motion: reduce) {
134
+ [data-slot="spinner"] [data-spinner-pixel] {
135
+ animation: none;
136
+ }
137
+
138
+ [data-slot="spinner"] [data-spinner-pixel]:first-child {
139
+ opacity: 1;
140
+ }
141
+ }
142
+ `;
143
+ const spinner = tv$1({
144
+ slots: {
145
+ root: [
146
+ "relative inline-flex shrink-0 items-center justify-center",
147
+ "leading-none text-current",
148
+ "[--spinner-pixel:5px] [--spinner-gap:2px]"
149
+ ],
150
+ ring: ["shrink-0", "grid size-auto grid-cols-[repeat(2,var(--spinner-pixel))] gap-(--spinner-gap)"],
151
+ pixel: ["block size-(--spinner-pixel) rounded-[1px] bg-current opacity-20"]
152
+ },
153
+ variants: {
154
+ size: {
155
+ xs: { root: ["[--spinner-pixel:4px] [--spinner-gap:1.5px]"] },
156
+ sm: {},
157
+ md: { root: ["[--spinner-pixel:6px] [--spinner-gap:2px]"] },
158
+ lg: { root: ["[--spinner-pixel:8px] [--spinner-gap:3px]"] }
159
+ },
160
+ variant: {
161
+ default: {},
162
+ inverse: { root: ["text-foreground-inverse"] }
163
+ }
164
+ },
165
+ defaultVariants: { size: "sm" }
166
+ });
167
+ const spinnerStyle = /* @__PURE__ */ jsx("style", {
168
+ href: "raft-ui-spinner",
169
+ precedence: "default",
170
+ children: SPINNER_STYLE
171
+ });
172
+ function Spinner({ size = "sm", variant = "default", className, render, ...props }) {
173
+ const { root, ring, pixel } = spinner({
174
+ size,
175
+ variant
176
+ });
177
+ const children = /* @__PURE__ */ jsxs(Fragment$1, { children: [spinnerStyle, /* @__PURE__ */ jsxs("span", {
178
+ "data-spinner-grid": "",
179
+ "aria-hidden": "true",
180
+ className: ring(),
181
+ children: [
182
+ /* @__PURE__ */ jsx("span", {
183
+ "data-spinner-pixel": "",
184
+ className: pixel()
185
+ }),
186
+ /* @__PURE__ */ jsx("span", {
187
+ "data-spinner-pixel": "",
188
+ className: pixel()
189
+ }),
190
+ /* @__PURE__ */ jsx("span", {
191
+ "data-spinner-pixel": "",
192
+ className: pixel()
193
+ }),
194
+ /* @__PURE__ */ jsx("span", {
195
+ "data-spinner-pixel": "",
196
+ className: pixel()
197
+ })
198
+ ]
199
+ })] });
200
+ const defaultProps = {
201
+ role: "status",
202
+ "aria-label": "Loading",
203
+ className: root({ className }),
204
+ children
205
+ };
206
+ return useRender({
207
+ defaultTagName: "span",
208
+ render,
209
+ props: mergeProps(defaultProps, props),
210
+ state: {
211
+ slot: "spinner",
212
+ size
213
+ }
214
+ });
215
+ }
216
+ //#endregion
217
+ //#region src/components/button/button.tsx
218
+ const sticker = (fill) => [`border-sticker-ink ${fill} text-sticker-ink ring-[1.5px] ring-sticker-edge`, "hover:press-overlay-sticker active:press-overlay-sticker"];
219
+ const outline = (ink) => [`border-line-strong bg-layer-card ${ink}`, "hover:press-overlay active:press-overlay"];
220
+ const textMd = [
221
+ "h-8 gap-2 rounded-control px-3 py-0 text-control",
222
+ "has-data-[icon=inline-start]:pl-2.5 has-data-[icon=inline-end]:pr-2.5",
223
+ "[&_svg:not([class*='size-'])]:size-4 **:data-icon:size-[1em]",
224
+ "after:absolute after:inset-x-0 after:-inset-y-[calc(--spacing(1.5)+1.5px)]"
225
+ ];
226
+ const iconMd = ["size-8 rounded-control p-0 [&_svg:not([class*='size-'])]:size-[18px]", "after:absolute after:-inset-[calc(--spacing(1.5)+1.5px)]"];
227
+ const buttonVariants = tv$1({
228
+ slots: {
229
+ root: [
230
+ "relative inline-flex shrink-0 items-center justify-center",
231
+ "whitespace-nowrap select-none",
232
+ "rounded-none border-[1.5px] font-sans font-bold shadow-none",
233
+ "transition-colors duration-100",
234
+ "outline-[1px] outline-offset-2 outline-transparent focus-visible:outline-transparent",
235
+ "focus-visible:shadow-focus",
236
+ "data-[loading=true]:cursor-wait data-[loading=true]:opacity-100",
237
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
238
+ "disabled:pointer-events-none aria-disabled:cursor-not-allowed",
239
+ "disabled:transform-none aria-disabled:transform-none",
240
+ "aria-disabled:hover:translate-none",
241
+ "aria-disabled:active:translate-none aria-disabled:active:scale-none",
242
+ "disabled:opacity-100 aria-disabled:opacity-100",
243
+ "disabled:border-line-hairline disabled:bg-fill-muted disabled:bg-none disabled:text-foreground-disabled disabled:ring-0",
244
+ "aria-disabled:border-line-hairline aria-disabled:bg-fill-muted aria-disabled:bg-none aria-disabled:text-foreground-disabled aria-disabled:ring-0"
245
+ ],
246
+ content: "relative z-10 inline-flex items-center justify-center gap-[inherit] data-[loading=true]:invisible",
247
+ loadingIndicator: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center"
248
+ },
249
+ variants: {
250
+ variant: {
251
+ primary: { root: sticker("bg-attention-400") },
252
+ accent: { root: sticker("bg-attention-400") },
253
+ warning: { root: sticker("bg-warning") },
254
+ danger: { root: sticker("bg-danger") },
255
+ default: { root: outline("text-foreground") },
256
+ outline: { root: outline("text-foreground") },
257
+ information: { root: outline("text-foreground") },
258
+ muted: { root: outline("text-foreground") },
259
+ success: { root: outline("text-foreground") },
260
+ "danger-secondary": { root: outline("text-danger-strong") },
261
+ "danger-outline": { root: outline("text-danger-strong") },
262
+ ghost: { root: ["border-transparent bg-transparent text-foreground", "hover:bg-fill-pressed active:bg-fill-pressed"] },
263
+ "on-frame": { root: [
264
+ "border-transparent bg-transparent text-foreground-on-frame",
265
+ "hover:bg-fill-frame-pressed active:bg-fill-frame-pressed",
266
+ "aria-expanded:bg-fill-frame-pressed data-popup-open:bg-fill-frame-pressed",
267
+ "disabled:border-transparent disabled:bg-transparent",
268
+ "aria-disabled:border-transparent aria-disabled:bg-transparent"
269
+ ] }
270
+ },
271
+ size: {
272
+ xs: { root: textMd },
273
+ sm: { root: textMd },
274
+ md: { root: textMd },
275
+ lg: { root: [
276
+ "h-control gap-2 rounded-control px-4 py-0 text-subhead",
277
+ "has-data-[icon=inline-start]:pl-3.5 has-data-[icon=inline-end]:pr-3.5",
278
+ "[&_svg:not([class*='size-'])]:size-[18px] **:data-icon:size-[1em]",
279
+ "after:absolute after:inset-x-0 after:-inset-y-[calc(var(--spacing-control-hit)+1.5px)]"
280
+ ] },
281
+ xl: { root: ["h-control-cta gap-2 rounded-control px-5 py-0 text-body", "[&_svg:not([class*='size-'])]:size-[18px] **:data-icon:size-[1em]"] },
282
+ "icon-xs": { root: iconMd },
283
+ "icon-sm": { root: iconMd },
284
+ "icon-md": { root: iconMd },
285
+ "icon-lg": { root: ["size-control rounded-control p-0 [&_svg:not([class*='size-'])]:size-control-icon", "after:absolute after:-inset-[calc(var(--spacing-control-hit)+1.5px)]"] }
286
+ }
287
+ },
288
+ defaultVariants: {
289
+ variant: "default",
290
+ size: "md"
291
+ },
292
+ compoundVariants: [
293
+ {
294
+ variant: "ghost",
295
+ size: [
296
+ "icon-xs",
297
+ "icon-sm",
298
+ "icon-md",
299
+ "icon-lg"
300
+ ],
301
+ class: { root: ["disabled:border-transparent disabled:bg-transparent", "aria-disabled:border-transparent aria-disabled:bg-transparent"] }
302
+ },
303
+ {
304
+ variant: "on-frame",
305
+ size: [
306
+ "xs",
307
+ "sm",
308
+ "md"
309
+ ],
310
+ class: { root: "h-9 px-2.5 text-subhead after:-inset-y-[calc(--spacing(1)+1.5px)]" }
311
+ },
312
+ {
313
+ variant: "on-frame",
314
+ size: [
315
+ "icon-xs",
316
+ "icon-sm",
317
+ "icon-md"
318
+ ],
319
+ class: { root: "size-9 after:-inset-[calc(--spacing(1)+1.5px)] [&_svg:not([class*='size-'])]:size-5" }
320
+ }
321
+ ]
322
+ });
323
+ function Button$1({ variant, size, loading = false, loadingLabel = "Loading", disabled, className, children, render, nativeButton, ...props }) {
324
+ const { root, content, loadingIndicator } = buttonVariants({
325
+ variant,
326
+ size
327
+ });
328
+ return /* @__PURE__ */ jsxs(Button, {
329
+ ...props,
330
+ render,
331
+ nativeButton: nativeButton ?? defaultNativeButton(render),
332
+ "data-slot": "button",
333
+ className: root({ className }),
334
+ "data-loading": loading ? "true" : void 0,
335
+ disabled: disabled || loading,
336
+ ...loading ? { "aria-disabled": true } : {},
337
+ children: [loading ? /* @__PURE__ */ jsx("span", {
338
+ "data-slot": "button-loading-indicator",
339
+ className: loadingIndicator(),
340
+ children: /* @__PURE__ */ jsx(Spinner, { "aria-label": loadingLabel })
341
+ }) : null, /* @__PURE__ */ jsx("span", {
342
+ "data-slot": "button-content",
343
+ "data-loading": loading ? "true" : void 0,
344
+ className: content(),
345
+ children
346
+ })]
347
+ });
348
+ }
349
+ //#endregion
350
+ //#region src/components/dialog/dialog.tsx
351
+ const dialog = tv$1({
352
+ slots: {
353
+ overlay: ["fixed inset-0 z-50 bg-layer-backdrop"],
354
+ content: [
355
+ "fixed top-1/2 left-1/2 z-50 flex w-[calc(100%-2rem)] -translate-1/2 flex-col",
356
+ "max-h-[calc(100dvh-2rem)] outline-none",
357
+ "overflow-clip rounded-dialog bg-layer-popover text-foreground",
358
+ "shadow-float ring-1 ring-line-seam"
359
+ ],
360
+ header: ["grid shrink-0 grid-cols-[minmax(0,1fr)_max-content] items-center min-w-0", "gap-2 px-5 pt-5"],
361
+ body: [
362
+ "min-w-0 flex-1 overflow-y-auto",
363
+ "px-5 pt-1.5 pb-5 first:pt-5",
364
+ "font-sans text-subhead text-foreground-muted"
365
+ ],
366
+ footer: ["flex shrink-0 items-center justify-end", "gap-2 px-5 pb-5 first:pt-5 [[data-slot=dialog-header]+&]:pt-5"],
367
+ title: ["m-0 min-w-0 text-foreground", "font-sans text-headline font-bold"],
368
+ description: ["m-0", "font-sans text-subhead text-foreground-muted"]
369
+ },
370
+ variants: {
371
+ size: {
372
+ sm: { content: ["max-w-sm"] },
373
+ md: { content: ["max-w-md"] },
374
+ lg: { content: ["max-w-lg"] },
375
+ wide: { content: ["max-w-4xl h-[min(760px,calc(100dvh-2rem))]"] }
376
+ },
377
+ bar: {
378
+ false: {},
379
+ true: {
380
+ header: ["flex h-14 shrink-0 items-center gap-2 border-b px-5 py-0", "border-line-seam pt-0 [&>[data-slot=dialog-close]]:my-0"],
381
+ body: ["flex min-h-0 flex-1 overflow-hidden p-0", "px-0 pt-0 pb-0 first:pt-0 text-foreground"],
382
+ footer: ["shrink-0 border-t px-5 py-3", "border-line-seam pt-3 pb-3 first:pt-3 [[data-slot=dialog-header]+&]:pt-3"]
383
+ }
384
+ },
385
+ layer: {
386
+ 0: {
387
+ overlay: [],
388
+ content: []
389
+ },
390
+ 1: {
391
+ overlay: ["z-60"],
392
+ content: ["z-60"]
393
+ }
394
+ },
395
+ nested: {
396
+ false: {},
397
+ true: { overlay: ["bg-layer-backdrop-nested"] }
398
+ }
399
+ },
400
+ defaultVariants: {
401
+ size: "md",
402
+ bar: false
403
+ }
404
+ });
405
+ function Dialog$1({ children, ...props }) {
406
+ return /* @__PURE__ */ jsx(Dialog.Root, {
407
+ "data-slot": "dialog",
408
+ ...props,
409
+ children: withOverlayLayer("dialog", props.modal !== false, children)
410
+ });
411
+ }
412
+ function DialogTrigger(props) {
413
+ return /* @__PURE__ */ jsx(Dialog.Trigger, {
414
+ "data-slot": "dialog-trigger",
415
+ ...props
416
+ });
417
+ }
418
+ function DialogPortal(props) {
419
+ return /* @__PURE__ */ jsx(Dialog.Portal, {
420
+ "data-slot": "dialog-portal",
421
+ ...useThemeScopeProps(props)
422
+ });
423
+ }
424
+ function DialogOverlay({ className, layer, ...props }) {
425
+ const nested = useParentOverlayKind() != null;
426
+ const { overlay } = dialog({
427
+ layer,
428
+ nested
429
+ });
430
+ return /* @__PURE__ */ jsx(Dialog.Backdrop, {
431
+ "data-slot": "dialog-overlay",
432
+ "data-nested": nested ? "" : void 0,
433
+ forceRender: true,
434
+ className: overlay({ className }),
435
+ ...props
436
+ });
437
+ }
438
+ function DialogContent({ className, children, portalProps, overlay, size, layer, ...props }) {
439
+ const { content } = dialog({
440
+ size,
441
+ layer
442
+ });
443
+ const overlayProps = typeof overlay === "object" ? overlay : {};
444
+ return /* @__PURE__ */ jsxs(DialogPortal, {
445
+ ...portalProps,
446
+ children: [overlay === false ? null : /* @__PURE__ */ jsx(DialogOverlay, {
447
+ layer,
448
+ ...overlayProps
449
+ }), /* @__PURE__ */ jsx(Dialog.Popup, {
450
+ "data-slot": "dialog-content",
451
+ className: content({ className }),
452
+ ...props,
453
+ children
454
+ })]
455
+ });
456
+ }
457
+ function DialogClose({ className, variant, size, children, render, "aria-label": ariaLabel, ...props }) {
458
+ if (render) return /* @__PURE__ */ jsx(Dialog.Close, {
459
+ "data-slot": "dialog-close",
460
+ render,
461
+ "aria-label": ariaLabel,
462
+ ...props,
463
+ children
464
+ });
465
+ return /* @__PURE__ */ jsx(Dialog.Close, {
466
+ "data-slot": "dialog-close",
467
+ render: /* @__PURE__ */ jsx(Button$1, {
468
+ variant: variant ?? "ghost",
469
+ size: size ?? "icon-md",
470
+ "aria-label": ariaLabel ?? "Close",
471
+ className: cn("-my-1.5 -mr-1.5", className)
472
+ }),
473
+ ...props,
474
+ children: children ?? /* @__PURE__ */ jsx(X, { className: "size-4.5" })
475
+ });
476
+ }
477
+ function DialogHeader({ className, bar = false, ...props }) {
478
+ const { header } = dialog({ bar });
479
+ return /* @__PURE__ */ jsx("div", {
480
+ "data-slot": "dialog-header",
481
+ className: header({ className }),
482
+ ...props
483
+ });
484
+ }
485
+ function DialogBody({ className, bar = false, ...props }) {
486
+ const { body } = dialog({ bar });
487
+ return /* @__PURE__ */ jsx("div", {
488
+ "data-slot": "dialog-body",
489
+ className: body({ className }),
490
+ ...props
491
+ });
492
+ }
493
+ function DialogFooter({ className, bar = false, ...props }) {
494
+ const { footer } = dialog({ bar });
495
+ return /* @__PURE__ */ jsx("div", {
496
+ "data-slot": "dialog-footer",
497
+ className: footer({ className }),
498
+ ...props
499
+ });
500
+ }
501
+ function DialogTitle({ className, ...props }) {
502
+ const { title } = dialog();
503
+ return /* @__PURE__ */ jsx(Dialog.Title, {
504
+ "data-slot": "dialog-title",
505
+ className: title({ className }),
506
+ ...props
507
+ });
508
+ }
509
+ function DialogDescription({ className, ...props }) {
510
+ const { description } = dialog();
511
+ return /* @__PURE__ */ jsx(Dialog.Description, {
512
+ "data-slot": "dialog-description",
513
+ className: description({ className }),
514
+ ...props
515
+ });
516
+ }
517
+ const dialogSurface = tv$1({ slots: { root: [
518
+ "flex min-w-0 flex-col outline-none",
519
+ "overflow-clip rounded-dialog bg-layer-popover text-foreground",
520
+ "shadow-float ring-1 ring-line-seam"
521
+ ] } });
522
+ /**
523
+ * The dialog's frame — the popover layer, the dialog radius, the seam ring
524
+ * and the float shadow — for a centred modal whose lifecycle the app owns
525
+ * (its own backdrop, Escape and focus handling). It neither positions nor
526
+ * animates itself: the host centres it, and a centred modal has no motion.
527
+ * DialogContent draws the same frame for a Base UI dialog.
528
+ */
529
+ function DialogSurface({ className, render, ...props }) {
530
+ const { root } = dialogSurface();
531
+ return useRender({
532
+ defaultTagName: "div",
533
+ render,
534
+ props: mergeProps({
535
+ "data-slot": "dialog-surface",
536
+ className: root({ className })
537
+ }, props)
538
+ });
539
+ }
540
+ const dialogNav = tv$1({ slots: { root: ["flex shrink-0 flex-col overflow-y-auto", "w-52 gap-0.5 border-r border-line-seam p-2 max-md:hidden"] } });
541
+ /** The section list of a wide (`size="wide"`) dialog, inside a `bar` body. */
542
+ function DialogNav({ className, render, ...props }) {
543
+ const { root } = dialogNav();
544
+ return useRender({
545
+ defaultTagName: "nav",
546
+ render,
547
+ props: mergeProps({
548
+ "data-slot": "dialog-nav",
549
+ className: root({ className })
550
+ }, props)
551
+ });
552
+ }
553
+ //#endregion
554
+ //#region src/components/badge/badge.tsx
555
+ const badge = tv$1({
556
+ slots: { root: [
557
+ "inline-flex h-[22px] w-fit min-w-0 max-w-full shrink-0 items-center gap-1 overflow-hidden whitespace-nowrap rounded-chip px-1.5",
558
+ "font-sans text-caption font-semibold normal-case tracking-normal",
559
+ "transition-[filter,opacity] duration-100",
560
+ "[&_svg]:size-3.5 [&_svg]:shrink-0 [&_[data-slot='spinner']]:size-3 [&_[data-slot='spinner']]:text-xs",
561
+ "disabled:cursor-not-allowed disabled:bg-fill-muted disabled:text-foreground-disabled disabled:opacity-100 disabled:inset-ring-0"
562
+ ] },
563
+ variants: {
564
+ appearance: {
565
+ solid: { root: [
566
+ "h-5 min-w-5 justify-center rounded-sticker",
567
+ "font-bold tabular-nums",
568
+ "text-sticker-ink inset-ring-[1.5px] inset-ring-sticker-ink ring-[1.5px] ring-sticker-edge",
569
+ "[&_svg]:size-[13px]",
570
+ "enabled:hover:press-overlay-sticker"
571
+ ] },
572
+ soft: { root: ["text-foreground", "enabled:hover:press-overlay"] },
573
+ outline: { root: [
574
+ "font-mono text-mono-meta font-normal",
575
+ "bg-transparent text-foreground-muted inset-ring inset-ring-line-hairline",
576
+ "enabled:hover:bg-fill-pressed"
577
+ ] }
578
+ },
579
+ variant: {
580
+ default: "",
581
+ primary: "",
582
+ information: "",
583
+ muted: "",
584
+ accent: "",
585
+ success: "",
586
+ warning: "",
587
+ danger: ""
588
+ }
589
+ },
590
+ defaultVariants: {
591
+ appearance: "solid",
592
+ variant: "default"
593
+ },
594
+ compoundVariants: [
595
+ {
596
+ appearance: "solid",
597
+ variant: "default",
598
+ class: { root: "bg-sticker-paper" }
599
+ },
600
+ {
601
+ appearance: "solid",
602
+ variant: "muted",
603
+ class: { root: "bg-inactive" }
604
+ },
605
+ {
606
+ appearance: "solid",
607
+ variant: "primary",
608
+ class: { root: "bg-brand" }
609
+ },
610
+ {
611
+ appearance: "solid",
612
+ variant: "information",
613
+ class: { root: "bg-info" }
614
+ },
615
+ {
616
+ appearance: "solid",
617
+ variant: "accent",
618
+ class: { root: "bg-attention font-mono text-mono-meta" }
619
+ },
620
+ {
621
+ appearance: "solid",
622
+ variant: "success",
623
+ class: { root: "bg-success" }
624
+ },
625
+ {
626
+ appearance: "solid",
627
+ variant: "warning",
628
+ class: { root: "bg-warning" }
629
+ },
630
+ {
631
+ appearance: "solid",
632
+ variant: "danger",
633
+ class: { root: "bg-danger" }
634
+ },
635
+ {
636
+ appearance: "soft",
637
+ variant: "default",
638
+ class: { root: "bg-fill-muted" }
639
+ },
640
+ {
641
+ appearance: "soft",
642
+ variant: "muted",
643
+ class: { root: "bg-inactive-soft" }
644
+ },
645
+ {
646
+ appearance: "soft",
647
+ variant: "primary",
648
+ class: { root: "bg-brand-soft" }
649
+ },
650
+ {
651
+ appearance: "soft",
652
+ variant: "information",
653
+ class: { root: "bg-info-soft" }
654
+ },
655
+ {
656
+ appearance: "soft",
657
+ variant: "accent",
658
+ class: { root: "bg-attention-soft" }
659
+ },
660
+ {
661
+ appearance: "soft",
662
+ variant: "success",
663
+ class: { root: "bg-success-soft" }
664
+ },
665
+ {
666
+ appearance: "soft",
667
+ variant: "warning",
668
+ class: { root: "bg-warning-soft" }
669
+ },
670
+ {
671
+ appearance: "soft",
672
+ variant: "danger",
673
+ class: { root: "bg-danger-soft" }
674
+ },
675
+ {
676
+ appearance: "outline",
677
+ variant: "primary",
678
+ class: { root: "text-brand-strong" }
679
+ },
680
+ {
681
+ appearance: "outline",
682
+ variant: "information",
683
+ class: { root: "text-info-strong" }
684
+ },
685
+ {
686
+ appearance: "outline",
687
+ variant: "accent",
688
+ class: { root: "text-attention-strong" }
689
+ },
690
+ {
691
+ appearance: "outline",
692
+ variant: "success",
693
+ class: { root: "text-success-strong" }
694
+ },
695
+ {
696
+ appearance: "outline",
697
+ variant: "warning",
698
+ class: { root: "text-warning-strong" }
699
+ },
700
+ {
701
+ appearance: "outline",
702
+ variant: "danger",
703
+ class: { root: "text-danger-strong" }
704
+ }
705
+ ]
706
+ });
707
+ function BadgeRoot({ appearance, variant, className, render, ...props }) {
708
+ const resolvedAppearance = appearance ?? "solid";
709
+ const { root } = badge({
710
+ appearance: resolvedAppearance,
711
+ variant
712
+ });
713
+ const defaultProps = { className: root({ className }) };
714
+ return useRender({
715
+ defaultTagName: "span",
716
+ render,
717
+ props: mergeProps(defaultProps, props),
718
+ state: {
719
+ slot: "badge",
720
+ appearance: resolvedAppearance,
721
+ variant
722
+ }
723
+ });
724
+ }
725
+ function Experimental(props) {
726
+ return /* @__PURE__ */ jsx(BadgeRoot, {
727
+ variant: "success",
728
+ ...props,
729
+ children: "Experimental"
730
+ });
731
+ }
732
+ const Badge = Object.assign(BadgeRoot, { Experimental });
733
+ //#endregion
734
+ //#region src/components/tooltip/tooltip.tsx
735
+ const tooltip = tv$1({
736
+ slots: {
737
+ trigger: ["select-none"],
738
+ positioner: ["isolate z-50 pointer-events-none outline-none"],
739
+ content: [
740
+ "pointer-events-none relative inline-block max-w-[min(20rem,var(--available-width,20rem))] min-w-0 px-2.5 py-1",
741
+ "origin-(--transform-origin) outline-none",
742
+ "transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)]",
743
+ "data-starting-style:scale-[0.97] data-starting-style:opacity-0",
744
+ "data-ending-style:scale-[0.99] data-ending-style:opacity-0",
745
+ "data-instant:transition-none",
746
+ "motion-reduce:transition-none",
747
+ "rounded-chip bg-layer-hud text-foreground-on-hud",
748
+ "font-sans font-medium",
749
+ "shadow-float",
750
+ "has-[[data-slot=kbd]]:py-1 has-[[data-slot=kbd]]:pr-2.5"
751
+ ],
752
+ body: [
753
+ "block min-w-0 text-footnote whitespace-normal wrap-break-word",
754
+ "**:data-[slot=kbd]:relative **:data-[slot=kbd]:z-10 [&_[data-slot=kbd]]:ml-1.5",
755
+ "[&_[data-slot=kbd]]:h-4 [&_[data-slot=kbd]]:min-w-4 [&_[data-slot=kbd]]:px-1 [&_[data-slot=kbd]]:py-0",
756
+ "**:data-[slot=kbd]:text-[12px] **:data-[slot=kbd]:leading-4 [&_[data-slot=kbd]]:font-normal"
757
+ ],
758
+ bodyIcon: ["shrink-0 [&>svg]:block [&>svg]:size-3.5 [&>svg]:shrink-0"],
759
+ bodyText: ["min-w-0 flex-1"],
760
+ arrow: [
761
+ "pointer-events-none flex overflow-visible",
762
+ "data-[side=top]:bottom-[-5px]",
763
+ "data-[side=bottom]:top-[-5px] data-[side=bottom]:rotate-180",
764
+ "data-[side=left]:right-[-8px] data-[side=left]:-rotate-90",
765
+ "data-[side=right]:left-[-8px] data-[side=right]:rotate-90",
766
+ "data-[side=inline-start]:right-[-8px] data-[side=inline-start]:-rotate-90",
767
+ "data-[side=inline-end]:left-[-8px] data-[side=inline-end]:rotate-90"
768
+ ]
769
+ },
770
+ variants: { hasLeadingIcon: {
771
+ true: { body: ["flex items-center gap-x-1.5"] },
772
+ false: {}
773
+ } }
774
+ });
775
+ function TooltipProvider({ delay = 0, ...props }) {
776
+ return /* @__PURE__ */ jsx(Tooltip.Provider, {
777
+ delay,
778
+ ...props
779
+ });
780
+ }
781
+ function Tooltip$1(props) {
782
+ return /* @__PURE__ */ jsx(Tooltip.Root, { ...props });
783
+ }
784
+ function TooltipTrigger({ className, ...props }) {
785
+ const { trigger } = tooltip();
786
+ const childSlot = isValidElement(props.render) ? props.render.props["data-slot"] : void 0;
787
+ const slot = props["data-slot"] ?? childSlot ?? "tooltip-trigger";
788
+ return /* @__PURE__ */ jsx(Tooltip.Trigger, {
789
+ "data-slot": slot,
790
+ className: trigger({ className }),
791
+ ...props
792
+ });
793
+ }
794
+ function TooltipPortal(props) {
795
+ return /* @__PURE__ */ jsx(Tooltip.Portal, {
796
+ "data-slot": "tooltip-portal",
797
+ ...useThemeScopeProps(props)
798
+ });
799
+ }
800
+ function TooltipArrow({ className, ...props }) {
801
+ const { arrow } = tooltip();
802
+ return /* @__PURE__ */ jsx(Tooltip.Arrow, {
803
+ "data-slot": "tooltip-arrow",
804
+ className: arrow({ className }),
805
+ ...props,
806
+ children: /* @__PURE__ */ jsx(TooltipArrowSvg, {})
807
+ });
808
+ }
809
+ function TooltipArrowSvg(props) {
810
+ return /* @__PURE__ */ jsx("svg", {
811
+ width: "12",
812
+ height: "6",
813
+ viewBox: "0 0 12 6",
814
+ fill: "none",
815
+ ...props,
816
+ children: /* @__PURE__ */ jsx("path", {
817
+ d: "M1 0H11L6 5.25Z",
818
+ className: "fill-layer-hud"
819
+ })
820
+ });
821
+ }
822
+ function flattenTooltipChildren(children) {
823
+ return Children.toArray(children).flatMap((child) => {
824
+ if (isValidElement(child) && child.type === Fragment) return flattenTooltipChildren(child.props.children);
825
+ return [child];
826
+ });
827
+ }
828
+ function isTooltipLeadingIcon(child) {
829
+ if (!isValidElement(child)) return false;
830
+ if (child.props["data-slot"] === "kbd") return false;
831
+ if (child.type === "svg") return true;
832
+ return typeof child.type !== "string";
833
+ }
834
+ function partitionTooltipBodyChildren(children) {
835
+ const items = flattenTooltipChildren(children);
836
+ const icons = [];
837
+ const rest = [];
838
+ let seenNonIcon = false;
839
+ for (const item of items) {
840
+ if (!seenNonIcon && isTooltipLeadingIcon(item)) {
841
+ icons.push(item);
842
+ continue;
843
+ }
844
+ seenNonIcon = true;
845
+ rest.push(item);
846
+ }
847
+ return {
848
+ icons,
849
+ rest
850
+ };
851
+ }
852
+ function TooltipBodyContent({ children }) {
853
+ const { icons, rest } = partitionTooltipBodyChildren(children);
854
+ const { body, bodyIcon, bodyText } = tooltip({ hasLeadingIcon: icons.length > 0 });
855
+ if (icons.length === 0) return /* @__PURE__ */ jsx("span", {
856
+ "data-slot": "tooltip-body",
857
+ className: body(),
858
+ children
859
+ });
860
+ return /* @__PURE__ */ jsxs("span", {
861
+ "data-slot": "tooltip-body",
862
+ className: body(),
863
+ children: [/* @__PURE__ */ jsx("span", {
864
+ "data-slot": "tooltip-body-icon",
865
+ className: bodyIcon(),
866
+ children: icons
867
+ }), /* @__PURE__ */ jsx("span", {
868
+ "data-slot": "tooltip-body-text",
869
+ className: bodyText(),
870
+ children: rest
871
+ })]
872
+ });
873
+ }
874
+ const CONTENT_COLLISION_AVOIDANCE = {
875
+ side: "flip",
876
+ align: "shift",
877
+ fallbackAxisSide: "none"
878
+ };
879
+ function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPadding, collisionAvoidance = CONTENT_COLLISION_AVOIDANCE, collisionBoundary, collisionPadding, disableAnchorTracking = false, positionMethod = "fixed", side = "top", sideOffset, sticky, container, portalProps, className, children, ...props }) {
880
+ const { positioner, content } = tooltip();
881
+ const portalContainer = container !== void 0 ? container : portalProps?.container;
882
+ return /* @__PURE__ */ jsx(TooltipPortal, {
883
+ ...portalProps,
884
+ container: portalContainer,
885
+ children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
886
+ align,
887
+ alignOffset,
888
+ anchor,
889
+ arrowPadding,
890
+ collisionAvoidance,
891
+ collisionBoundary,
892
+ collisionPadding,
893
+ disableAnchorTracking,
894
+ positionMethod,
895
+ side,
896
+ sideOffset: sideOffset ?? 8,
897
+ sticky,
898
+ className: positioner(),
899
+ children: /* @__PURE__ */ jsxs(Tooltip.Popup, {
900
+ "data-slot": "tooltip-content",
901
+ className: content({ className }),
902
+ ...props,
903
+ children: [/* @__PURE__ */ jsx(TooltipBodyContent, { children }), /* @__PURE__ */ jsx(TooltipArrow, {})]
904
+ })
905
+ })
906
+ });
907
+ }
908
+ //#endregion
909
+ //#region src/lib/presence.ts
910
+ /**
911
+ * The five status lights of the design system. Each colour is a fixed
912
+ * meaning: online green, busy (an agent at work) yellow, error orange,
913
+ * offline stone, an external agent cyan. One map, read by Status and by the
914
+ * avatar's dot through the same `--status-color`.
915
+ */
916
+ const PRESENCE_COLOR = {
917
+ online: "[--status-color:var(--presence-online)]",
918
+ busy: "[--status-color:var(--presence-busy)]",
919
+ error: "[--status-color:var(--presence-error)]",
920
+ offline: "[--status-color:var(--presence-offline)]",
921
+ external: "[--status-color:var(--presence-external)]"
922
+ };
923
+ //#endregion
924
+ //#region src/components/checkbox/checkbox-indicator.tsx
925
+ const checkboxIndicator = tv$1({
926
+ slots: { root: [
927
+ "inline-flex size-5 shrink-0 items-center justify-center",
928
+ "rounded-sticker border-[1.5px] border-line-strong transition-colors",
929
+ "[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:stroke-2"
930
+ ] },
931
+ variants: {
932
+ shape: {
933
+ square: "",
934
+ circle: { root: "rounded-full" }
935
+ },
936
+ checked: {
937
+ true: { root: "border-foreground bg-foreground text-foreground-inverse" },
938
+ false: { root: "bg-layer-card text-transparent" }
939
+ },
940
+ disabled: {
941
+ true: { root: "border-foreground-disabled bg-fill-muted" },
942
+ false: ""
943
+ },
944
+ previewOnHover: {
945
+ true: "",
946
+ false: ""
947
+ }
948
+ },
949
+ compoundVariants: [{
950
+ checked: false,
951
+ previewOnHover: true,
952
+ class: { root: "group-hover:text-foreground/20" }
953
+ }, {
954
+ checked: true,
955
+ disabled: true,
956
+ class: { root: "bg-foreground-disabled text-layer-card" }
957
+ }],
958
+ defaultVariants: {
959
+ shape: "square",
960
+ disabled: false,
961
+ previewOnHover: false
962
+ }
963
+ });
964
+ function CheckboxIndicator({ checked, mark = "check", shape, disabled, previewOnHover, className, ...props }) {
965
+ const { root } = checkboxIndicator({
966
+ shape,
967
+ checked,
968
+ disabled,
969
+ previewOnHover
970
+ });
971
+ const Icon = mark === "minus" ? Minus : Check;
972
+ return /* @__PURE__ */ jsx("span", {
973
+ ...props,
974
+ "data-slot": "checkbox-indicator-graphic",
975
+ "aria-hidden": true,
976
+ className: root({ className }),
977
+ children: (checked || previewOnHover) && /* @__PURE__ */ jsx(Icon, {})
978
+ });
979
+ }
980
+ //#endregion
981
+ //#region src/components/checkbox/checkbox.tsx
982
+ const checkbox = tv$1({ slots: {
983
+ root: [
984
+ "relative inline-flex size-5 shrink-0 touch-manipulation items-center justify-center outline-none",
985
+ "rounded-sticker focus-visible:shadow-focus",
986
+ "data-disabled:cursor-not-allowed",
987
+ "after:absolute after:-inset-x-3 after:-inset-y-2 after:content-['']"
988
+ ],
989
+ indicator: "pointer-events-none"
990
+ } });
991
+ function Checkbox$1({ shape = "square", className, ...props }) {
992
+ const { root, indicator } = checkbox();
993
+ const renderIndicator = useCallback((indicatorProps, state) => /* @__PURE__ */ jsx(CheckboxIndicator, {
994
+ ...indicatorProps,
995
+ checked: state.checked || state.indeterminate,
996
+ disabled: state.disabled,
997
+ mark: state.indeterminate ? "minus" : "check",
998
+ shape
999
+ }), [shape]);
1000
+ return /* @__PURE__ */ jsx(Checkbox.Root, {
1001
+ "data-slot": "checkbox",
1002
+ className: root({ className }),
1003
+ ...props,
1004
+ children: /* @__PURE__ */ jsx(Checkbox.Indicator, {
1005
+ keepMounted: true,
1006
+ "data-slot": "checkbox-indicator",
1007
+ className: indicator(),
1008
+ render: renderIndicator
1009
+ })
1010
+ });
1011
+ }
1012
+ //#endregion
1013
+ //#region src/lib/use-mobile-viewport.ts
1014
+ const MOBILE_QUERY = "(max-width: 767px)";
1015
+ function subscribeMobileViewport(onStoreChange) {
1016
+ if (typeof window === "undefined") return () => void 0;
1017
+ const media = window.matchMedia(MOBILE_QUERY);
1018
+ media.addEventListener("change", onStoreChange);
1019
+ return () => media.removeEventListener("change", onStoreChange);
1020
+ }
1021
+ function getMobileViewportSnapshot() {
1022
+ return typeof window !== "undefined" && window.matchMedia(MOBILE_QUERY).matches;
1023
+ }
1024
+ function useMobileViewport() {
1025
+ return useSyncExternalStore(subscribeMobileViewport, getMobileViewportSnapshot, () => false);
1026
+ }
1027
+ //#endregion
1028
+ //#region src/components/scroll-area/scroll-area.recipe.ts
1029
+ const scrollArea = tv$1({ slots: {
1030
+ root: ["relative min-h-0"],
1031
+ viewport: ["size-full min-h-0 overscroll-contain outline-none", "[overflow-anchor:auto] [-webkit-overflow-scrolling:touch]"],
1032
+ content: ["min-h-full"],
1033
+ scrollbar: [
1034
+ "group/scroll-area-scrollbar z-50 flex touch-none select-none p-1",
1035
+ "opacity-0 transition-opacity duration-150 pointer-events-none",
1036
+ "data-scrolling:pointer-events-auto data-scrolling:opacity-100 data-scrolling:duration-0",
1037
+ "data-[orientation=vertical]:w-3 data-[orientation=vertical]:justify-center",
1038
+ "data-[orientation=horizontal]:h-3 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:justify-center"
1039
+ ],
1040
+ thumb: [
1041
+ "relative",
1042
+ "group-data-[orientation=vertical]/scroll-area-scrollbar:w-1.5",
1043
+ "group-data-[orientation=horizontal]/scroll-area-scrollbar:h-1.5",
1044
+ "rounded-[2px] bg-foreground/30 hover:bg-foreground/45"
1045
+ ],
1046
+ corner: ["bg-transparent"]
1047
+ } });
1048
+ //#endregion
1049
+ //#region src/components/scroll-area/scroll-area.tsx
1050
+ function ScrollArea$1({ className, ...props }) {
1051
+ const { root } = scrollArea();
1052
+ return /* @__PURE__ */ jsx(ScrollArea.Root, {
1053
+ "data-slot": "scroll-area",
1054
+ className: root({ className }),
1055
+ ...props
1056
+ });
1057
+ }
1058
+ function ScrollAreaViewport({ className, ...props }) {
1059
+ const { viewport } = scrollArea();
1060
+ return /* @__PURE__ */ jsx(ScrollArea.Viewport, {
1061
+ "data-slot": "scroll-area-viewport",
1062
+ className: viewport({ className }),
1063
+ ...props
1064
+ });
1065
+ }
1066
+ function ScrollAreaContent({ className, ...props }) {
1067
+ const { content } = scrollArea();
1068
+ return /* @__PURE__ */ jsx(ScrollArea.Content, {
1069
+ "data-slot": "scroll-area-content",
1070
+ className: content({ className }),
1071
+ ...props
1072
+ });
1073
+ }
1074
+ function ScrollAreaScrollbar({ className, orientation = "vertical", ...props }) {
1075
+ const { scrollbar } = scrollArea();
1076
+ return /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
1077
+ "data-slot": "scroll-area-scrollbar",
1078
+ orientation,
1079
+ className: scrollbar({ className }),
1080
+ ...props
1081
+ });
1082
+ }
1083
+ function ScrollAreaThumb({ className, ...props }) {
1084
+ const { thumb } = scrollArea();
1085
+ return /* @__PURE__ */ jsx(ScrollArea.Thumb, {
1086
+ "data-slot": "scroll-area-thumb",
1087
+ className: thumb({ className }),
1088
+ ...props
1089
+ });
1090
+ }
1091
+ function ScrollAreaCorner({ className, ...props }) {
1092
+ const { corner } = scrollArea();
1093
+ return /* @__PURE__ */ jsx(ScrollArea.Corner, {
1094
+ "data-slot": "scroll-area-corner",
1095
+ className: corner({ className }),
1096
+ ...props
1097
+ });
1098
+ }
1099
+ //#endregion
1100
+ //#region src/components/panel/panel.recipe.ts
1101
+ const panel = tv$1({
1102
+ slots: {
1103
+ root: ["[--panel-footer-clearance:10rem]", "bg-layer-canvas text-foreground"],
1104
+ header: ["[@media(max-height:600px)]:h-12"],
1105
+ body: ["relative min-h-0 flex-1 overflow-hidden"],
1106
+ scrollViewport: ["h-full min-h-0 overflow-y-auto overscroll-contain", "[overflow-anchor:auto] [-webkit-overflow-scrolling:touch]"],
1107
+ scrollContent: ["min-h-full"],
1108
+ section: ["border-t px-5 py-4", "border-line-hairline"],
1109
+ footer: [
1110
+ "relative flex shrink-0 items-center pt-3",
1111
+ "bg-layer-canvas",
1112
+ "px-5 max-md:px-4",
1113
+ "pb-[calc(env(safe-area-inset-bottom)+1rem)] max-md:pb-[calc(env(safe-area-inset-bottom)+0.5rem)]"
1114
+ ]
1115
+ },
1116
+ variants: { edge: {
1117
+ inset: { root: "group/panel-frame" },
1118
+ attached: { root: ["group/panel-frame", "border-l border-line-seam max-md:border-l-0"] }
1119
+ } }
1120
+ });
1121
+ //#endregion
1122
+ //#region src/components/panel/panel.tsx
1123
+ function Panel({ className, edge, render, ...props }) {
1124
+ const { root } = panel({ edge });
1125
+ const defaultProps = {
1126
+ "data-edge": edge,
1127
+ "data-slot": "panel",
1128
+ className: root({ className })
1129
+ };
1130
+ return useRender({
1131
+ defaultTagName: "section",
1132
+ render,
1133
+ props: mergeProps(defaultProps, props)
1134
+ });
1135
+ }
1136
+ /**
1137
+ * Bare header bar: fixed height and centered flex row, no border, fill, or padding.
1138
+ * Shared base for `PanelHeader`, `PanelSectionHeader`, and panel-specific headers
1139
+ * such as `ThreadPanelHeader` — it is not exclusive to `PanelHeader`.
1140
+ */
1141
+ function PanelHeaderRoot({ className, render, ...props }) {
1142
+ const { header } = panel();
1143
+ const defaultProps = {
1144
+ "data-slot": "panel-header-root",
1145
+ className: header({ className })
1146
+ };
1147
+ return useRender({
1148
+ defaultTagName: "div",
1149
+ render,
1150
+ props: mergeProps(defaultProps, props)
1151
+ });
1152
+ }
1153
+ function PanelBody({ className, render, ...props }) {
1154
+ const { body } = panel();
1155
+ const defaultProps = {
1156
+ "data-slot": "panel-body",
1157
+ className: body({ className })
1158
+ };
1159
+ return useRender({
1160
+ defaultTagName: "div",
1161
+ render,
1162
+ props: mergeProps(defaultProps, props)
1163
+ });
1164
+ }
1165
+ function PanelScrollViewport({ className, render, ...props }) {
1166
+ const { scrollViewport } = panel();
1167
+ const defaultProps = {
1168
+ "data-slot": "panel-scroll-viewport",
1169
+ className: scrollViewport({ className })
1170
+ };
1171
+ return useRender({
1172
+ defaultTagName: "div",
1173
+ render,
1174
+ props: mergeProps(defaultProps, props)
1175
+ });
1176
+ }
1177
+ function PanelScrollContent({ className, render, ...props }) {
1178
+ const { scrollContent } = panel();
1179
+ const defaultProps = {
1180
+ "data-slot": "panel-scroll-content",
1181
+ className: scrollContent({ className })
1182
+ };
1183
+ return useRender({
1184
+ defaultTagName: "div",
1185
+ render,
1186
+ props: mergeProps(defaultProps, props)
1187
+ });
1188
+ }
1189
+ function PanelSection({ className, render, ...props }) {
1190
+ const { section } = panel();
1191
+ const defaultProps = {
1192
+ "data-slot": "panel-section",
1193
+ className: section({ className })
1194
+ };
1195
+ return useRender({
1196
+ defaultTagName: "section",
1197
+ render,
1198
+ props: mergeProps(defaultProps, props)
1199
+ });
1200
+ }
1201
+ function PanelFooter({ className, render, ...props }) {
1202
+ const { footer } = panel();
1203
+ const defaultProps = {
1204
+ "data-slot": "panel-footer",
1205
+ className: footer({ className })
1206
+ };
1207
+ return useRender({
1208
+ defaultTagName: "div",
1209
+ render,
1210
+ props: mergeProps(defaultProps, props)
1211
+ });
1212
+ }
1213
+ //#endregion
1214
+ //#region src/components/kbd/kbd.tsx
1215
+ const kbd = tv$1({ slots: {
1216
+ root: [
1217
+ "pointer-events-none inline-flex w-fit shrink-0 items-center justify-center gap-1",
1218
+ "whitespace-nowrap select-none",
1219
+ "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3",
1220
+ "min-w-4 rounded-[3px] px-1",
1221
+ "font-mono text-mono-meta font-normal text-foreground-hint",
1222
+ "inset-ring inset-ring-line-hairline",
1223
+ "in-data-[slot=tooltip-content]:text-foreground-on-hud/70",
1224
+ "in-data-[slot=tooltip-content]:shadow-[inset_0_0_0_1px_color-mix(in_oklch,var(--foreground-on-hud)_70%,transparent)]"
1225
+ ],
1226
+ group: ["inline-flex items-center gap-1"]
1227
+ } });
1228
+ function Kbd({ className, ...props }) {
1229
+ const { root } = kbd();
1230
+ return /* @__PURE__ */ jsx("kbd", {
1231
+ "data-slot": "kbd",
1232
+ className: root({ className }),
1233
+ ...props
1234
+ });
1235
+ }
1236
+ function KbdGroup({ className, ...props }) {
1237
+ const { group } = kbd();
1238
+ return /* @__PURE__ */ jsx("span", {
1239
+ "data-slot": "kbd-group",
1240
+ className: group({ className }),
1241
+ ...props
1242
+ });
1243
+ }
1244
+ //#endregion
1245
+ //#region src/components/dropdown-menu/dropdown-menu.tsx
1246
+ const dropdownMenu = tv$1({ slots: {
1247
+ trigger: ["select-none"],
1248
+ positioner: ["isolate z-50 outline-none"],
1249
+ content: [
1250
+ "max-h-(--available-height) overflow-hidden",
1251
+ "outline-none",
1252
+ "flex min-w-60 flex-col gap-0 rounded-container bg-layer-popover p-1.5 text-foreground",
1253
+ "shadow-float ring-1 ring-line-seam"
1254
+ ],
1255
+ item: [
1256
+ "flex w-full cursor-default select-none items-center [@media(max-height:600px)]:py-1",
1257
+ "text-left outline-none transition-colors",
1258
+ "min-h-9 gap-2.5 rounded-control px-2.5 py-1.5",
1259
+ "font-sans text-callout font-medium text-foreground",
1260
+ "hover:bg-brand-soft data-highlighted:bg-brand-soft",
1261
+ "data-checked:font-bold data-[selected]:font-bold data-[emphasis=strong]:font-bold",
1262
+ "data-disabled:pointer-events-none data-disabled:text-foreground-disabled",
1263
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4",
1264
+ "[&>svg]:text-foreground-muted data-disabled:[&>svg]:text-foreground-disabled"
1265
+ ],
1266
+ radioItem: [
1267
+ "flex w-full cursor-default select-none items-center",
1268
+ "text-left outline-none transition-colors",
1269
+ "min-h-9 gap-2.5 rounded-control px-2.5 py-1.5",
1270
+ "font-sans text-callout font-medium text-foreground",
1271
+ "hover:bg-brand-soft data-highlighted:bg-brand-soft",
1272
+ "data-checked:font-bold",
1273
+ "data-disabled:pointer-events-none data-disabled:text-foreground-disabled",
1274
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4",
1275
+ "[&>svg]:text-foreground-muted data-disabled:[&>svg]:text-foreground-disabled"
1276
+ ],
1277
+ submenuTrigger: [
1278
+ "flex w-full cursor-default select-none items-center [@media(max-height:600px)]:py-1",
1279
+ "text-left outline-none transition-colors",
1280
+ "min-h-9 gap-2.5 rounded-control px-2.5 py-1.5",
1281
+ "font-sans text-callout font-medium text-foreground",
1282
+ "hover:bg-brand-soft data-highlighted:bg-brand-soft data-popup-open:bg-brand-soft",
1283
+ "data-disabled:pointer-events-none data-disabled:text-foreground-disabled",
1284
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4",
1285
+ "[&>svg]:text-foreground-muted data-disabled:[&>svg]:text-foreground-disabled"
1286
+ ],
1287
+ itemLabel: ["min-w-0 flex-1 truncate text-left"],
1288
+ footer: ["px-3 py-2 text-xs text-foreground-muted tabular-nums"],
1289
+ label: ["px-2.5 pt-2 pb-1", "font-sans text-caption font-bold text-foreground-hint"],
1290
+ shortcut: [
1291
+ "ml-auto",
1292
+ "h-auto min-w-0 rounded-none bg-transparent p-0 shadow-none ring-0",
1293
+ "font-mono text-mono-meta font-normal text-foreground-hint"
1294
+ ],
1295
+ itemCount: ["ml-auto inline-flex min-w-5 justify-center gap-0 px-1 tabular-nums"],
1296
+ separator: ["-mx-1.5 my-1.5 h-px border-0 bg-line-hairline"],
1297
+ indicator: ["pointer-events-none ml-auto flex shrink-0 items-center justify-center", "size-4 text-foreground [&_svg]:size-4"],
1298
+ radioLabel: ["min-w-0 flex-1 truncate"]
1299
+ } });
1300
+ function DropdownMenu(props) {
1301
+ return /* @__PURE__ */ jsx(Menu.Root, {
1302
+ "data-slot": "dropdown-menu",
1303
+ ...props
1304
+ });
1305
+ }
1306
+ function DropdownMenuSubmenu(props) {
1307
+ return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
1308
+ "data-slot": "dropdown-menu-submenu",
1309
+ ...props
1310
+ });
1311
+ }
1312
+ function DropdownMenuTrigger({ className, render = /* @__PURE__ */ jsx(Button$1, {
1313
+ variant: "outline",
1314
+ size: "md"
1315
+ }), ...props }) {
1316
+ const { trigger } = dropdownMenu();
1317
+ return /* @__PURE__ */ jsx(Menu.Trigger, {
1318
+ "data-slot": "dropdown-menu-trigger",
1319
+ render,
1320
+ className: trigger({ className }),
1321
+ ...props
1322
+ });
1323
+ }
1324
+ function DropdownMenuPortal(props) {
1325
+ return /* @__PURE__ */ jsx(Menu.Portal, {
1326
+ "data-slot": "dropdown-menu-portal",
1327
+ ...useThemeScopeProps(props)
1328
+ });
1329
+ }
1330
+ function DropdownMenuPopup({ className, ...props }) {
1331
+ const { content } = dropdownMenu();
1332
+ return /* @__PURE__ */ jsx("div", {
1333
+ "data-slot": "dropdown-menu-content",
1334
+ className: content({ className }),
1335
+ ...props
1336
+ });
1337
+ }
1338
+ function DropdownMenuContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = false, positionMethod = "fixed", side = "bottom", sideOffset, sticky, portalProps, className, ...props }) {
1339
+ const resolvedSideOffset = sideOffset ?? 6;
1340
+ const { positioner, content } = dropdownMenu();
1341
+ return /* @__PURE__ */ jsx(DropdownMenuPortal, {
1342
+ ...portalProps,
1343
+ children: /* @__PURE__ */ jsx(Menu.Positioner, {
1344
+ align,
1345
+ alignOffset,
1346
+ anchor,
1347
+ arrowPadding,
1348
+ collisionAvoidance,
1349
+ collisionBoundary,
1350
+ collisionPadding,
1351
+ disableAnchorTracking,
1352
+ positionMethod,
1353
+ side,
1354
+ sideOffset: resolvedSideOffset,
1355
+ sticky,
1356
+ className: positioner(),
1357
+ children: /* @__PURE__ */ jsx(Menu.Popup, {
1358
+ "data-slot": "dropdown-menu-content",
1359
+ className: content({ className }),
1360
+ ...props
1361
+ })
1362
+ })
1363
+ });
1364
+ }
1365
+ function DropdownMenuItem({ className, ...props }) {
1366
+ const { item } = dropdownMenu();
1367
+ return /* @__PURE__ */ jsx(Menu.Item, {
1368
+ "data-slot": "dropdown-menu-item",
1369
+ className: item({ className }),
1370
+ ...props
1371
+ });
1372
+ }
1373
+ function DropdownMenuItemLabel({ className, ...props }) {
1374
+ const { itemLabel } = dropdownMenu();
1375
+ return /* @__PURE__ */ jsx("span", {
1376
+ "data-slot": "dropdown-menu-item-label",
1377
+ className: itemLabel({ className }),
1378
+ ...props
1379
+ });
1380
+ }
1381
+ function DropdownMenuFooter({ className, ...props }) {
1382
+ const { footer } = dropdownMenu();
1383
+ return /* @__PURE__ */ jsx("div", {
1384
+ "data-slot": "dropdown-menu-footer",
1385
+ className: footer({ className }),
1386
+ ...props
1387
+ });
1388
+ }
1389
+ function DropdownMenuSubmenuTrigger({ children, className, ...props }) {
1390
+ const { submenuTrigger, indicator } = dropdownMenu();
1391
+ return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
1392
+ "data-slot": "dropdown-menu-submenu-trigger",
1393
+ className: submenuTrigger({ className }),
1394
+ ...props,
1395
+ children: [children, /* @__PURE__ */ jsx("span", {
1396
+ className: indicator(),
1397
+ "data-slot": "dropdown-menu-submenu-trigger-indicator",
1398
+ "aria-hidden": "true",
1399
+ children: /* @__PURE__ */ jsx(DropdownMenuSubmenuChevronIcon, {})
1400
+ })]
1401
+ });
1402
+ }
1403
+ function DropdownMenuLabel({ className, ...props }) {
1404
+ const { label } = dropdownMenu();
1405
+ return /* @__PURE__ */ jsx("div", {
1406
+ "data-slot": "dropdown-menu-label",
1407
+ className: label({ className }),
1408
+ ...props
1409
+ });
1410
+ }
1411
+ function DropdownMenuShortcut({ className, ...props }) {
1412
+ const { shortcut } = dropdownMenu();
1413
+ return /* @__PURE__ */ jsx(Kbd, {
1414
+ "data-slot": "dropdown-menu-shortcut",
1415
+ className: shortcut({ className }),
1416
+ ...props
1417
+ });
1418
+ }
1419
+ function DropdownMenuItemCount({ className, ...props }) {
1420
+ const { itemCount } = dropdownMenu();
1421
+ return /* @__PURE__ */ jsx(Badge, {
1422
+ "data-slot": "dropdown-menu-item-count",
1423
+ className: itemCount({ className }),
1424
+ ...props
1425
+ });
1426
+ }
1427
+ function DropdownMenuSeparator({ className, ...props }) {
1428
+ const { separator } = dropdownMenu();
1429
+ return /* @__PURE__ */ jsx(Menu.Separator, {
1430
+ "data-slot": "dropdown-menu-separator",
1431
+ className: separator({ className }),
1432
+ ...props
1433
+ });
1434
+ }
1435
+ function DropdownMenuSubmenuChevronIcon() {
1436
+ return /* @__PURE__ */ jsx("svg", {
1437
+ width: "12",
1438
+ height: "12",
1439
+ viewBox: "0 0 12 12",
1440
+ "aria-hidden": true,
1441
+ className: "size-3 shrink-0",
1442
+ children: /* @__PURE__ */ jsx("g", {
1443
+ fill: "none",
1444
+ strokeLinecap: "round",
1445
+ strokeLinejoin: "round",
1446
+ strokeWidth: "1",
1447
+ stroke: "currentColor",
1448
+ children: /* @__PURE__ */ jsx("path", { d: "M4.25 2.5L7.75 6l-3.5 3.5" })
1449
+ })
1450
+ });
1451
+ }
1452
+ function DropdownMenuCheckIcon() {
1453
+ return /* @__PURE__ */ jsx("svg", {
1454
+ width: "12",
1455
+ height: "12",
1456
+ viewBox: "0 0 12 12",
1457
+ "aria-hidden": true,
1458
+ className: "size-3 shrink-0",
1459
+ children: /* @__PURE__ */ jsx("g", {
1460
+ fill: "none",
1461
+ strokeLinecap: "round",
1462
+ strokeLinejoin: "round",
1463
+ strokeWidth: "1",
1464
+ stroke: "currentColor",
1465
+ children: /* @__PURE__ */ jsx("path", { d: "M1.75 6.41L4.4 9.25L10.25 2.99" })
1466
+ })
1467
+ });
1468
+ }
1469
+ function DropdownMenuRadioGroup({ ...props }) {
1470
+ return /* @__PURE__ */ jsx(Menu.RadioGroup, {
1471
+ "data-slot": "dropdown-menu-radio-group",
1472
+ ...props
1473
+ });
1474
+ }
1475
+ function DropdownMenuRadioItem({ className, children, ...props }) {
1476
+ const { radioItem, radioLabel, indicator } = dropdownMenu();
1477
+ return /* @__PURE__ */ jsxs(Menu.RadioItem, {
1478
+ "data-slot": "dropdown-menu-radio-item",
1479
+ className: radioItem({ className }),
1480
+ ...props,
1481
+ children: [renderRadioItemChildren(children, radioLabel()), /* @__PURE__ */ jsx("span", {
1482
+ className: indicator(),
1483
+ children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(DropdownMenuCheckIcon, {}) })
1484
+ })]
1485
+ });
1486
+ }
1487
+ function renderRadioItemChildren(children, className) {
1488
+ if (typeof children === "string" || typeof children === "number") return /* @__PURE__ */ jsx("span", {
1489
+ "data-slot": "dropdown-menu-radio-item-label",
1490
+ className,
1491
+ children
1492
+ });
1493
+ if (Array.isArray(children) && children.every((child) => typeof child === "string")) return /* @__PURE__ */ jsx("span", {
1494
+ "data-slot": "dropdown-menu-radio-item-label",
1495
+ className,
1496
+ children
1497
+ });
1498
+ return children;
1499
+ }
1500
+ function DropdownMenuRadioItemIndicator({ className, ...props }) {
1501
+ return /* @__PURE__ */ jsx(Menu.RadioItemIndicator, {
1502
+ "data-slot": "dropdown-menu-radio-item-indicator",
1503
+ className,
1504
+ ...props
1505
+ });
1506
+ }
1507
+ function DropdownMenuCheckboxItem({ className, children, ...props }) {
1508
+ const { item, indicator } = dropdownMenu();
1509
+ return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
1510
+ "data-slot": "dropdown-menu-checkbox-item",
1511
+ className: item({ className }),
1512
+ ...props,
1513
+ children: [children, /* @__PURE__ */ jsx("span", {
1514
+ className: indicator(),
1515
+ children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(DropdownMenuCheckIcon, {}) })
1516
+ })]
1517
+ });
1518
+ }
1519
+ function DropdownMenuCheckboxItemIndicator({ className, ...props }) {
1520
+ return /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, {
1521
+ "data-slot": "dropdown-menu-checkbox-item-indicator",
1522
+ className,
1523
+ ...props
1524
+ });
1525
+ }
1526
+ //#endregion
1527
+ //#region src/lib/use-overflow-title.ts
1528
+ function cut(element) {
1529
+ return element.scrollWidth > element.clientWidth + 1 || element.scrollHeight > element.clientHeight + 1;
1530
+ }
1531
+ function assign(ref, node) {
1532
+ if (typeof ref === "function") ref(node);
1533
+ else if (ref) ref.current = node;
1534
+ }
1535
+ /**
1536
+ * Gives a value that is cut off (an ellipsis, a clamp) its whole text as its
1537
+ * `title`, and takes it away again when the value fits: a value that shows in
1538
+ * full needs no tooltip repeating it (design/patterns/forms.md#long-values-in-fields).
1539
+ * It watches the element and its children, so a part whose text sits in a
1540
+ * child that truncates (a chip's label) is covered too. A `title` the caller
1541
+ * passes wins, and is never touched.
1542
+ */
1543
+ function useOverflowTitle(ref, title) {
1544
+ const cleanup = useRef(void 0);
1545
+ const own = title !== void 0;
1546
+ return useCallback((node) => {
1547
+ cleanup.current?.();
1548
+ cleanup.current = void 0;
1549
+ assign(ref, node);
1550
+ const view = node?.ownerDocument.defaultView;
1551
+ if (!node || own || !view || !("ResizeObserver" in view)) return;
1552
+ const update = () => {
1553
+ const text = node.textContent?.trim() ?? "";
1554
+ if (text && (cut(node) || Array.from(node.children).some(cut))) node.title = text;
1555
+ else node.removeAttribute("title");
1556
+ };
1557
+ const resize = new view.ResizeObserver(update);
1558
+ resize.observe(node);
1559
+ for (const child of Array.from(node.children)) resize.observe(child);
1560
+ const mutation = new view.MutationObserver(update);
1561
+ mutation.observe(node, {
1562
+ childList: true,
1563
+ characterData: true,
1564
+ subtree: true
1565
+ });
1566
+ cleanup.current = () => {
1567
+ resize.disconnect();
1568
+ mutation.disconnect();
1569
+ };
1570
+ }, [own, ref]);
1571
+ }
1572
+ //#endregion
1573
+ //#region src/components/avatar/avatar.tsx
1574
+ const avatar = tv$1({
1575
+ slots: {
1576
+ root: [
1577
+ "group/avatar relative flex shrink-0 items-center justify-center select-none",
1578
+ "rounded-sticker border-[1.5px] border-sticker-ink",
1579
+ "text-sticker-ink shadow-[0_0_0_1.5px_var(--sticker-edge)]"
1580
+ ],
1581
+ image: ["size-full object-cover", "rounded-[2px]"],
1582
+ fallback: [
1583
+ "flex size-full items-center justify-center",
1584
+ "[&>svg]:size-4",
1585
+ "[[data-size='lg']>&]:[&>svg]:size-6",
1586
+ "[[data-size='md']>&]:[&>svg]:size-4.5",
1587
+ "[[data-size='xs']>&]:[&>svg]:size-3",
1588
+ "overflow-hidden rounded-[2px]",
1589
+ "font-sans text-[15px] leading-none font-bold tracking-[-0.01em] text-sticker-ink",
1590
+ "[[data-size='xl']>&]:text-[40px]",
1591
+ "[[data-size='lg']>&]:text-[22px]",
1592
+ "[[data-size='sm']>&]:text-[13px]",
1593
+ "[[data-size='xs']>&]:text-[11px]",
1594
+ "[[data-size='2xs']>&]:text-[11px]",
1595
+ "[[data-size='3xs']>&]:text-[8px]",
1596
+ "[[data-size='xl']>&]:[&>svg]:size-12",
1597
+ "[[data-size='sm']>&]:[&>svg]:size-3.5",
1598
+ "[[data-size='2xs']>&]:[&>svg]:size-3",
1599
+ "[[data-size='3xs']>&]:[&>svg]:size-2"
1600
+ ],
1601
+ badge: [
1602
+ "absolute z-10 select-none",
1603
+ "size-[11px] -right-1 -bottom-1 rounded-[2px]",
1604
+ "outline-2 outline-solid outline-layer-canvas",
1605
+ "group-data-[size=xl]/avatar:size-5 group-data-[size=xl]/avatar:-right-2 group-data-[size=xl]/avatar:-bottom-2",
1606
+ "group-data-[size=lg]/avatar:size-3.5 group-data-[size=lg]/avatar:right-[-5px] group-data-[size=lg]/avatar:bottom-[-5px]",
1607
+ "group-data-[size=md]/avatar:size-[11px]",
1608
+ "group-data-[size=sm]/avatar:size-[9px] group-data-[size=sm]/avatar:right-[-3px] group-data-[size=sm]/avatar:bottom-[-3px]",
1609
+ "group-data-[size=xs]/avatar:size-[7px] group-data-[size=xs]/avatar:-right-0.5 group-data-[size=xs]/avatar:-bottom-0.5",
1610
+ "group-data-[size=2xs]/avatar:size-[7px] group-data-[size=2xs]/avatar:-right-0.5 group-data-[size=2xs]/avatar:-bottom-0.5",
1611
+ "group-data-[size=3xs]/avatar:size-1.5 group-data-[size=3xs]/avatar:-right-0.5 group-data-[size=3xs]/avatar:-bottom-0.5"
1612
+ ],
1613
+ dot: [
1614
+ "inline-flex items-center justify-center outline-2",
1615
+ "[&>svg]:hidden",
1616
+ "group-data-[size=xl]/avatar:[&>svg]:size-2 group-data-[size=xl]/avatar:[&>svg]:block",
1617
+ "group-data-[size=lg]/avatar:[&>svg]:size-2 group-data-[size=lg]/avatar:[&>svg]:block",
1618
+ "group-data-[size=md]/avatar:[&>svg]:size-1.5 group-data-[size=md]/avatar:[&>svg]:block",
1619
+ "group-data-[size=xs]/avatar:outline group-data-[size=2xs]/avatar:outline group-data-[size=3xs]/avatar:outline",
1620
+ "rounded-[2px] border-[1.5px] border-sticker-ink",
1621
+ "bg-(--status-color) text-sticker-ink outline-layer-canvas",
1622
+ "group-data-[size=xl]/avatar:border-2",
1623
+ "group-data-[size=xs]/avatar:border group-data-[size=2xs]/avatar:border group-data-[size=3xs]/avatar:border"
1624
+ ],
1625
+ group: [
1626
+ "group/avatar-group flex items-center",
1627
+ "stack-x-[-5px]",
1628
+ "*:data-[slot=avatar]:shadow-[0_0_0_1.5px_var(--sticker-edge),0_0_0_3px_var(--avatar-group-surface,var(--layer-canvas))]",
1629
+ "*:data-[slot=avatar-group-count]:shadow-[0_0_0_1.5px_var(--sticker-edge),0_0_0_3px_var(--avatar-group-surface,var(--layer-canvas))]"
1630
+ ]
1631
+ },
1632
+ variants: {
1633
+ type: {
1634
+ agent: { root: ["bg-inactive"] },
1635
+ human: { root: ["bg-palette-lavender"] }
1636
+ },
1637
+ size: {
1638
+ xl: { root: ["size-[99px] shadow-[0_0_0_1.5px_var(--sticker-edge),var(--elevation-sticker)]"] },
1639
+ lg: { root: ["size-[51px]"] },
1640
+ md: { root: ["size-[35px]"] },
1641
+ sm: { root: ["size-[27px]"] },
1642
+ xs: { root: ["size-[19px]"] },
1643
+ "2xs": { root: ["size-[19px]"] },
1644
+ "3xs": { root: "size-3.5" }
1645
+ }
1646
+ }
1647
+ });
1648
+ function Avatar$1({ size, type, className, children, ...props }) {
1649
+ const { root } = avatar({
1650
+ type,
1651
+ size
1652
+ });
1653
+ return /* @__PURE__ */ jsx(Avatar.Root, {
1654
+ "data-slot": "avatar",
1655
+ "data-size": size,
1656
+ className: root({ className }),
1657
+ ...props,
1658
+ children: children ?? /* @__PURE__ */ jsx(AvatarFallback, {})
1659
+ });
1660
+ }
1661
+ function AvatarImage({ className, ...props }) {
1662
+ const { image } = avatar();
1663
+ return /* @__PURE__ */ jsx(Avatar.Image, {
1664
+ "data-slot": "avatar-image",
1665
+ className: image({ className }),
1666
+ ...props
1667
+ });
1668
+ }
1669
+ function AvatarFallbackIcon() {
1670
+ return /* @__PURE__ */ jsx("svg", {
1671
+ xmlns: "http://www.w3.org/2000/svg",
1672
+ width: "18",
1673
+ height: "18",
1674
+ viewBox: "0 0 18 18",
1675
+ "aria-hidden": "true",
1676
+ focusable: "false",
1677
+ children: /* @__PURE__ */ jsxs("g", {
1678
+ fill: "none",
1679
+ strokeLinecap: "round",
1680
+ strokeLinejoin: "round",
1681
+ strokeWidth: "1",
1682
+ stroke: "currentColor",
1683
+ children: [
1684
+ /* @__PURE__ */ jsx("circle", {
1685
+ cx: "9",
1686
+ cy: "7.75",
1687
+ r: "2"
1688
+ }),
1689
+ /* @__PURE__ */ jsx("path", { d: "M9,16.25c1.407,0,2.716-.407,3.827-1.101-.481-1.67-2.003-2.899-3.827-2.899s-3.347,1.229-3.827,2.899c1.112,.694,2.42,1.101,3.827,1.101Z" }),
1690
+ /* @__PURE__ */ jsx("circle", {
1691
+ cx: "1.889",
1692
+ cy: "10.414",
1693
+ r: ".75",
1694
+ fill: "currentColor",
1695
+ "data-stroke": "none",
1696
+ stroke: "none"
1697
+ }),
1698
+ /* @__PURE__ */ jsx("circle", {
1699
+ cx: "2.971",
1700
+ cy: "4.972",
1701
+ r: ".75",
1702
+ fill: "currentColor",
1703
+ "data-stroke": "none",
1704
+ stroke: "none"
1705
+ }),
1706
+ /* @__PURE__ */ jsx("circle", {
1707
+ cx: "2.972",
1708
+ cy: "13.027",
1709
+ r: ".75",
1710
+ fill: "currentColor",
1711
+ "data-stroke": "none",
1712
+ stroke: "none"
1713
+ }),
1714
+ /* @__PURE__ */ jsx("circle", {
1715
+ cx: "1.89",
1716
+ cy: "7.586",
1717
+ r: ".75",
1718
+ fill: "currentColor",
1719
+ "data-stroke": "none",
1720
+ stroke: "none"
1721
+ }),
1722
+ /* @__PURE__ */ jsx("circle", {
1723
+ cx: "4.973",
1724
+ cy: "2.972",
1725
+ r: ".75",
1726
+ fill: "currentColor",
1727
+ "data-stroke": "none",
1728
+ stroke: "none"
1729
+ }),
1730
+ /* @__PURE__ */ jsx("circle", {
1731
+ cx: "7.586",
1732
+ cy: "1.889",
1733
+ r: ".75",
1734
+ fill: "currentColor",
1735
+ "data-stroke": "none",
1736
+ stroke: "none"
1737
+ }),
1738
+ /* @__PURE__ */ jsx("circle", {
1739
+ cx: "15.029",
1740
+ cy: "13.028",
1741
+ r: ".75",
1742
+ fill: "currentColor",
1743
+ "data-stroke": "none",
1744
+ stroke: "none"
1745
+ }),
1746
+ /* @__PURE__ */ jsx("circle", {
1747
+ cx: "16.111",
1748
+ cy: "7.586",
1749
+ r: ".75",
1750
+ fill: "currentColor",
1751
+ "data-stroke": "none",
1752
+ stroke: "none"
1753
+ }),
1754
+ /* @__PURE__ */ jsx("circle", {
1755
+ cx: "13.028",
1756
+ cy: "2.971",
1757
+ r: ".75",
1758
+ fill: "currentColor",
1759
+ "data-stroke": "none",
1760
+ stroke: "none"
1761
+ }),
1762
+ /* @__PURE__ */ jsx("circle", {
1763
+ cx: "16.11",
1764
+ cy: "10.414",
1765
+ r: ".75",
1766
+ fill: "currentColor",
1767
+ "data-stroke": "none",
1768
+ stroke: "none"
1769
+ }),
1770
+ /* @__PURE__ */ jsx("circle", {
1771
+ cx: "15.028",
1772
+ cy: "4.973",
1773
+ r: ".75",
1774
+ fill: "currentColor",
1775
+ "data-stroke": "none",
1776
+ stroke: "none"
1777
+ }),
1778
+ /* @__PURE__ */ jsx("circle", {
1779
+ cx: "10.414",
1780
+ cy: "1.89",
1781
+ r: ".75",
1782
+ fill: "currentColor",
1783
+ "data-stroke": "none",
1784
+ stroke: "none"
1785
+ })
1786
+ ]
1787
+ })
1788
+ });
1789
+ }
1790
+ function AvatarFallback({ className, children, ...props }) {
1791
+ const { fallback } = avatar();
1792
+ return /* @__PURE__ */ jsx(Avatar.Fallback, {
1793
+ "data-slot": "avatar-fallback",
1794
+ className: fallback({ className }),
1795
+ ...props,
1796
+ children: children ?? /* @__PURE__ */ jsx(AvatarFallbackIcon, {})
1797
+ });
1798
+ }
1799
+ const toCssLength = (value) => typeof value === "number" ? `${value}px` : value;
1800
+ function AvatarBadge({ className, render, offset, presence = "online", ...props }) {
1801
+ const { badge, dot } = avatar();
1802
+ const offsetStyle = offset ? {
1803
+ top: toCssLength(offset[1]),
1804
+ left: toCssLength(offset[0]),
1805
+ right: "auto",
1806
+ bottom: "auto",
1807
+ translate: "-50% -50%"
1808
+ } : void 0;
1809
+ const defaultProps = {
1810
+ className: badge({ className: render ? className : dot({ className: cn(PRESENCE_COLOR[presence], className) }) }),
1811
+ style: offsetStyle
1812
+ };
1813
+ return useRender({
1814
+ defaultTagName: "span",
1815
+ render,
1816
+ props: mergeProps(defaultProps, props),
1817
+ state: { slot: "avatar-badge" }
1818
+ });
1819
+ }
1820
+ function AvatarGroup({ className, ...props }) {
1821
+ const { group } = avatar();
1822
+ return /* @__PURE__ */ jsx("div", {
1823
+ "data-slot": "avatar-group",
1824
+ className: group({ className }),
1825
+ ...props
1826
+ });
1827
+ }
1828
+ function AvatarGroupCount({ size, className, ...props }) {
1829
+ const { root } = avatar({ size });
1830
+ return /* @__PURE__ */ jsx("span", {
1831
+ "data-slot": "avatar-group-count",
1832
+ className: root({ class: ["border-transparent bg-fill-muted font-mono text-mono-meta font-bold tabular-nums text-foreground-muted shadow-none", className] }),
1833
+ ...props
1834
+ });
1835
+ }
1836
+ //#endregion
1837
+ //#region src/lib/search-hit.ts
1838
+ /**
1839
+ * The DS search hit: what you looked for is a small yellow sticker, like an @
1840
+ * to you. Every place that marks a hit (message text, Markdown, search
1841
+ * results) uses this. The hit keeps the surrounding font (`[font:inherit]`
1842
+ * drops the browser's mark styling) but is always bold, which needs `!` to win
1843
+ * over that shorthand.
1844
+ */
1845
+ const searchHit = [
1846
+ "[font:inherit] font-bold!",
1847
+ "rounded-sticker bg-brand px-[3px] box-decoration-clone",
1848
+ "text-sticker-ink inset-ring-[1.5px] inset-ring-sticker-ink ring-[1.5px] ring-sticker-edge"
1849
+ ];
1850
+ //#endregion
1851
+ //#region src/components/message-item/message-item.recipe.ts
1852
+ const sender = [
1853
+ "min-w-0 truncate",
1854
+ "text-subhead font-bold text-foreground",
1855
+ "rounded-[2px] outline-none focus-visible:shadow-focus"
1856
+ ];
1857
+ const messageItem = tv$1({
1858
+ slots: {
1859
+ root: [
1860
+ "group/message relative flex h-fit gap-3",
1861
+ "hover:[--mi-toolbar-opacity:1] hover:[--mi-toolbar-pe:auto] focus-within:[--mi-toolbar-opacity:1] focus-within:[--mi-toolbar-pe:auto]",
1862
+ "has-data-popup-open:[--mi-toolbar-opacity:1] has-data-popup-open:[--mi-toolbar-pe:auto]",
1863
+ "min-h-0 px-2 py-1 border-t-8 border-transparent bg-clip-padding",
1864
+ "hover:[--mi-ct-color:var(--foreground-hint)] has-data-popup-open:[--mi-ct-color:var(--foreground-hint)]",
1865
+ "bg-(--mi-row-fill) [--mi-row-fill:initial]",
1866
+ "hover:[--mi-row-fill:var(--fill-message-hover)]",
1867
+ "data-popup-open:[--mi-row-fill:var(--fill-row-open)] has-data-popup-open:[--mi-row-fill:var(--fill-row-open)]",
1868
+ "has-data-[slot=message-item-search-match]:[--mi-row-fill:var(--info-soft)] has-data-[slot=message-item-search-match]:hover:[--mi-row-fill:var(--info-soft)]",
1869
+ "has-[[data-slot=message-multi-select-checkbox][data-checked]]:[--mi-row-fill:var(--info-soft)]",
1870
+ "has-[[data-slot=message-multi-select-checkbox][data-checked]]:hover:[--mi-row-fill:var(--info-soft)]"
1871
+ ],
1872
+ gutter: ["relative shrink-0 self-stretch", "w-[35px]"],
1873
+ avatarSlot: [
1874
+ "relative shrink-0 self-start",
1875
+ "flex w-[35px] justify-center",
1876
+ "[&_[data-slot=avatar][data-size=md]]:size-(--mi-avatar,35px)"
1877
+ ],
1878
+ continuationTime: [
1879
+ "absolute right-0 select-none whitespace-nowrap tabular-nums",
1880
+ "top-[calc((var(--text-body--line-height)-var(--text-mono-meta--line-height))/2)]",
1881
+ "font-mono text-mono-meta",
1882
+ "text-(--mi-ct-color,transparent)"
1883
+ ],
1884
+ content: ["min-w-0 flex-1", "text-body text-foreground"],
1885
+ header: [
1886
+ "mb-px flex min-w-0 items-baseline gap-1.5 overflow-hidden",
1887
+ "pointer-fine:pe-(--mi-toolbar-reserve,6.5rem)",
1888
+ "has-data-[slot=message-item-delegated-by]:[--mi-owner-basis:3rem] has-data-[slot=message-item-delegated-by]:[--mi-owner-flex:1_0]"
1889
+ ],
1890
+ senderGroup: [
1891
+ "flex min-w-0 items-baseline gap-1.5 overflow-hidden",
1892
+ "flex-[var(--mi-owner-flex,0_1)_var(--mi-owner-basis,auto)] max-w-max",
1893
+ "*:data-[slot=message-item-meta]:basis-0 *:data-[slot=message-item-meta]:grow",
1894
+ "*:data-[slot=message-item-meta]:-ms-1.5 *:data-[slot=message-item-meta]:before:inline-block *:data-[slot=message-item-meta]:before:w-1.5 *:data-[slot=message-item-meta]:before:content-['']"
1895
+ ],
1896
+ sender,
1897
+ senderButton: [
1898
+ ...sender,
1899
+ "cursor-pointer",
1900
+ "decoration-[1.5px] underline-offset-[3px] hover:underline"
1901
+ ],
1902
+ senderBadges: ["inline-flex shrink-0 items-center gap-1"],
1903
+ meta: ["min-w-0 truncate", "text-caption text-foreground-hint"],
1904
+ time: ["shrink-0 whitespace-nowrap", "font-mono text-mono-meta tabular-nums text-foreground-hint"],
1905
+ inlineStatus: ["shrink-0", "text-caption text-foreground-hint"],
1906
+ delegatedBy: [
1907
+ "inline-grid grid-flow-col items-baseline",
1908
+ "min-w-min shrink whitespace-pre-wrap",
1909
+ "has-data-[slot=message-item-delegated-by-name]:max-w-[45%] has-data-[slot=message-item-delegated-by-name]:whitespace-pre",
1910
+ "has-data-[slot=message-item-delegated-by-button]:max-w-[45%] has-data-[slot=message-item-delegated-by-button]:whitespace-pre",
1911
+ "text-caption text-foreground-muted"
1912
+ ],
1913
+ delegatedByName: ["min-w-0 truncate"],
1914
+ delegatedByButton: [
1915
+ "min-w-0 truncate",
1916
+ "cursor-pointer decoration-1 underline-offset-[3px] hover:underline",
1917
+ "rounded-[2px] outline-none focus-visible:shadow-focus"
1918
+ ],
1919
+ delegatedAvatar: [
1920
+ "size-[19px] group-data-[size=md]/avatar:size-[19px]",
1921
+ "rounded-sticker outline-none",
1922
+ "bg-layer-canvas bg-[linear-gradient(var(--mi-row-fill,transparent),var(--mi-row-fill,transparent))]",
1923
+ "data-deleted:*:data-[slot=avatar]:grayscale data-deleted:*:data-[slot=avatar]:opacity-60",
1924
+ "shadow-[0_0_0_1.5px_var(--mi-row-fill,transparent),0_0_0_1.5px_var(--layer-canvas)]",
1925
+ "dark:shadow-[0_0_0_3px_var(--mi-row-fill,transparent),0_0_0_3px_var(--layer-canvas)]"
1926
+ ],
1927
+ edited: ["ms-1 whitespace-nowrap", "text-caption text-foreground-hint"],
1928
+ body: [
1929
+ "wrap-break-word select-text",
1930
+ "**:select-text",
1931
+ "text-body text-foreground",
1932
+ "selection:bg-brand-soft"
1933
+ ],
1934
+ searchMatch: searchHit,
1935
+ embedded: ["min-w-0", "mt-2"],
1936
+ attachments: ["stack-y-2", "mt-2"],
1937
+ footer: ["mt-1.5 flex flex-wrap items-center gap-1.5"],
1938
+ toolbar: [
1939
+ "absolute z-20 flex items-center",
1940
+ "opacity-(--mi-toolbar-opacity,0)",
1941
+ "[pointer-events:var(--mi-toolbar-pe,none)]",
1942
+ "top-[-16px] right-3 gap-0.5 overflow-visible rounded-container p-0.5",
1943
+ "bg-layer-popover ring-1 ring-line-seam ring-inset shadow-float"
1944
+ ],
1945
+ toolbarButton: [
1946
+ "inline-flex shrink-0 items-center justify-center",
1947
+ "[&_svg]:shrink-0",
1948
+ "size-7 rounded-control border-0 bg-transparent p-0",
1949
+ "text-foreground-muted hover:bg-fill-pressed active:bg-fill-pressed",
1950
+ "data-popup-open:bg-fill-pressed data-active:text-foreground",
1951
+ "outline-none focus-visible:shadow-focus",
1952
+ "[&_svg]:size-4"
1953
+ ]
1954
+ },
1955
+ variants: { compact: { true: { root: ["border-t-0"] } } }
1956
+ });
1957
+ //#endregion
1958
+ //#region src/components/message-item/message-item-root.tsx
1959
+ function MessageItem({ className, compact, render, ...props }) {
1960
+ const { root } = messageItem({ compact });
1961
+ const defaultProps = {
1962
+ "data-message-item": "",
1963
+ "data-compact": compact ? "true" : void 0,
1964
+ className: root({ className })
1965
+ };
1966
+ return useRender({
1967
+ defaultTagName: "div",
1968
+ render,
1969
+ props: mergeProps(defaultProps, props),
1970
+ state: { slot: "message-item" }
1971
+ });
1972
+ }
1973
+ //#endregion
1974
+ //#region src/components/message-item/message-item-gutter.tsx
1975
+ function MessageItemGutter({ className, render, ...props }) {
1976
+ const { gutter } = messageItem();
1977
+ const defaultProps = { className: gutter({ className }) };
1978
+ return useRender({
1979
+ defaultTagName: "div",
1980
+ render,
1981
+ props: mergeProps(defaultProps, props),
1982
+ state: { slot: "message-item-gutter" }
1983
+ });
1984
+ }
1985
+ function MessageItemAvatarSlot({ className, render, ...props }) {
1986
+ const { avatarSlot } = messageItem();
1987
+ const defaultProps = { className: avatarSlot({ className }) };
1988
+ return useRender({
1989
+ defaultTagName: "div",
1990
+ render,
1991
+ props: mergeProps(defaultProps, props),
1992
+ state: { slot: "message-item-avatar-slot" }
1993
+ });
1994
+ }
1995
+ /** Left-gutter hover clock for continuation rows, a `<time>`: pass the moment in `dateTime`. Show the hour and minute only, in the person's 12h/24h format, with no AM/PM (`6:35`, `18:35`). */
1996
+ function MessageItemContinuationTime({ className, render, ...props }) {
1997
+ const { continuationTime } = messageItem();
1998
+ const defaultProps = { className: continuationTime({ className }) };
1999
+ return useRender({
2000
+ defaultTagName: "time",
2001
+ render,
2002
+ props: mergeProps(defaultProps, props),
2003
+ state: { slot: "message-item-continuation-time" }
2004
+ });
2005
+ }
2006
+ //#endregion
2007
+ //#region src/components/message-item/message-item-content.tsx
2008
+ function MessageItemContent({ className, render, ...props }) {
2009
+ const { content } = messageItem();
2010
+ const defaultProps = { className: content({ className }) };
2011
+ return useRender({
2012
+ defaultTagName: "div",
2013
+ render,
2014
+ props: mergeProps(defaultProps, props),
2015
+ state: { slot: "message-item-content" }
2016
+ });
2017
+ }
2018
+ function MessageItemBody({ className, render, ...props }) {
2019
+ const { body } = messageItem();
2020
+ const defaultProps = { className: body({ className }) };
2021
+ return useRender({
2022
+ defaultTagName: "div",
2023
+ render,
2024
+ props: mergeProps(defaultProps, props),
2025
+ state: { slot: "message-item-body" }
2026
+ });
2027
+ }
2028
+ /**
2029
+ * The edited marker, inline at the end of the message text on every row, full
2030
+ * or continuation. Put it inside the last paragraph so it follows the last
2031
+ * word; pass the copy ("(edited)") as children and the edit time as its tooltip.
2032
+ */
2033
+ function MessageItemEdited({ className, render, ...props }) {
2034
+ const { edited } = messageItem();
2035
+ const defaultProps = { className: edited({ className }) };
2036
+ return useRender({
2037
+ defaultTagName: "span",
2038
+ render,
2039
+ props: mergeProps(defaultProps, props),
2040
+ state: { slot: "message-item-edited" }
2041
+ });
2042
+ }
2043
+ function MessageItemSearchMatch({ className, render, ...props }) {
2044
+ const { searchMatch } = messageItem();
2045
+ const defaultProps = { className: searchMatch({ className }) };
2046
+ return useRender({
2047
+ defaultTagName: "mark",
2048
+ render,
2049
+ props: mergeProps(defaultProps, props),
2050
+ state: { slot: "message-item-search-match" }
2051
+ });
2052
+ }
2053
+ function MessageItemEmbedded({ className, render, ...props }) {
2054
+ const { embedded } = messageItem();
2055
+ const defaultProps = { className: embedded({ className }) };
2056
+ return useRender({
2057
+ defaultTagName: "div",
2058
+ render,
2059
+ props: mergeProps(defaultProps, props),
2060
+ state: { slot: "message-item-embedded" }
2061
+ });
2062
+ }
2063
+ function MessageItemAttachments({ className, render, ...props }) {
2064
+ const { attachments } = messageItem();
2065
+ const defaultProps = { className: attachments({ className }) };
2066
+ return useRender({
2067
+ defaultTagName: "div",
2068
+ render,
2069
+ props: mergeProps(defaultProps, props),
2070
+ state: { slot: "message-item-attachments" }
2071
+ });
2072
+ }
2073
+ function MessageItemFooter({ className, render, ...props }) {
2074
+ const { footer } = messageItem();
2075
+ const defaultProps = { className: footer({ className }) };
2076
+ return useRender({
2077
+ defaultTagName: "div",
2078
+ render,
2079
+ props: mergeProps(defaultProps, props),
2080
+ state: { slot: "message-item-footer" }
2081
+ });
2082
+ }
2083
+ //#endregion
2084
+ //#region src/components/message-item/message-item-header.tsx
2085
+ function MessageItemHeader({ className, render, ...props }) {
2086
+ const { header } = messageItem();
2087
+ const defaultProps = { className: header({ className }) };
2088
+ return useRender({
2089
+ defaultTagName: "div",
2090
+ render,
2091
+ props: mergeProps(defaultProps, props),
2092
+ state: { slot: "message-item-header" }
2093
+ });
2094
+ }
2095
+ /**
2096
+ * Holds the sender, its badges and its role, and decides who gives way when
2097
+ * the header runs out of room: the role truncates first, then the name. The
2098
+ * badges stay whole beside the name, and the time, outside the group, never
2099
+ * truncates.
2100
+ */
2101
+ function MessageItemSenderGroup({ className, render, ...props }) {
2102
+ const { senderGroup } = messageItem();
2103
+ const defaultProps = { className: senderGroup({ className }) };
2104
+ return useRender({
2105
+ defaultTagName: "span",
2106
+ render,
2107
+ props: mergeProps(defaultProps, props),
2108
+ state: { slot: "message-item-sender-group" }
2109
+ });
2110
+ }
2111
+ function MessageItemSender({ className, render, ...props }) {
2112
+ const { sender } = messageItem();
2113
+ const defaultProps = { className: sender({ className }) };
2114
+ return useRender({
2115
+ defaultTagName: "span",
2116
+ render,
2117
+ props: mergeProps(defaultProps, props),
2118
+ state: { slot: "message-item-sender" }
2119
+ });
2120
+ }
2121
+ function MessageItemSenderButton({ className, render, ...props }) {
2122
+ const { senderButton } = messageItem();
2123
+ const defaultProps = {
2124
+ type: "button",
2125
+ className: senderButton({ className })
2126
+ };
2127
+ return useRender({
2128
+ defaultTagName: "button",
2129
+ render,
2130
+ props: mergeProps(defaultProps, props),
2131
+ state: { slot: "message-item-sender-button" }
2132
+ });
2133
+ }
2134
+ function MessageItemSenderBadges({ className, render, ...props }) {
2135
+ const { senderBadges } = messageItem();
2136
+ const defaultProps = { className: senderBadges({ className }) };
2137
+ return useRender({
2138
+ defaultTagName: "span",
2139
+ render,
2140
+ props: mergeProps(defaultProps, props),
2141
+ state: { slot: "message-item-sender-badges" }
2142
+ });
2143
+ }
2144
+ function MessageItemMeta({ className, render, ...props }) {
2145
+ const { meta } = messageItem();
2146
+ const defaultProps = { className: meta({ className }) };
2147
+ return useRender({
2148
+ defaultTagName: "span",
2149
+ render,
2150
+ props: mergeProps(defaultProps, props),
2151
+ state: { slot: "message-item-meta" }
2152
+ });
2153
+ }
2154
+ /**
2155
+ * The message's time, right after the sender. A `<time>`: pass the moment in
2156
+ * `dateTime` (ISO 8601) and the full date and time as its tooltip.
2157
+ */
2158
+ function MessageItemTime({ className, render, ...props }) {
2159
+ const { time } = messageItem();
2160
+ const defaultProps = { className: time({ className }) };
2161
+ return useRender({
2162
+ defaultTagName: "time",
2163
+ render,
2164
+ props: mergeProps(defaultProps, props),
2165
+ state: { slot: "message-item-time" }
2166
+ });
2167
+ }
2168
+ function MessageItemInlineStatus({ className, render, ...props }) {
2169
+ const { inlineStatus } = messageItem();
2170
+ const defaultProps = { className: inlineStatus({ className }) };
2171
+ return useRender({
2172
+ defaultTagName: "span",
2173
+ render,
2174
+ props: mergeProps(defaultProps, props),
2175
+ state: { slot: "message-item-inline-status" }
2176
+ });
2177
+ }
2178
+ //#endregion
2179
+ //#region src/components/message-item/message-item-delegated.tsx
2180
+ /**
2181
+ * Says an assistant sent the message for its owner, the sender: "sent by
2182
+ * Friday". Put it in `MessageItemHeader` after `MessageItemSenderGroup`, and
2183
+ * the assistant's name in `MessageItemDelegatedByName` or
2184
+ * `MessageItemDelegatedByButton`. The words, and the spaces around the name,
2185
+ * come from the product. It takes at most 45% of the line: past that only
2186
+ * the name truncates, never the words.
2187
+ */
2188
+ function MessageItemDelegatedBy({ className, render, ...props }) {
2189
+ const { delegatedBy } = messageItem();
2190
+ const defaultProps = { className: delegatedBy({ className }) };
2191
+ return useRender({
2192
+ defaultTagName: "span",
2193
+ render,
2194
+ props: mergeProps(defaultProps, props),
2195
+ state: { slot: "message-item-delegated-by" }
2196
+ });
2197
+ }
2198
+ /** The assistant's name in `MessageItemDelegatedBy`, the part that truncates. */
2199
+ function MessageItemDelegatedByName({ className, render, ...props }) {
2200
+ const { delegatedByName } = messageItem();
2201
+ const defaultProps = { className: delegatedByName({ className }) };
2202
+ return useRender({
2203
+ defaultTagName: "span",
2204
+ render,
2205
+ props: mergeProps(defaultProps, props),
2206
+ state: { slot: "message-item-delegated-by-name" }
2207
+ });
2208
+ }
2209
+ /**
2210
+ * The assistant's name when it opens the assistant's profile: a `<button>`
2211
+ * (or a link through `render`) that underlines on hover and truncates like
2212
+ * `MessageItemDelegatedByName`.
2213
+ */
2214
+ function MessageItemDelegatedByButton({ className, render, ...props }) {
2215
+ const { delegatedByButton } = messageItem();
2216
+ const defaultProps = {
2217
+ type: "button",
2218
+ className: delegatedByButton({ className })
2219
+ };
2220
+ return useRender({
2221
+ defaultTagName: "button",
2222
+ render,
2223
+ props: mergeProps(defaultProps, props),
2224
+ state: { slot: "message-item-delegated-by-button" }
2225
+ });
2226
+ }
2227
+ /**
2228
+ * The assistant's face on its owner's avatar, in the corner a presence light
2229
+ * takes: put it inside the owner's `md` `Avatar` with a `2xs` agent `Avatar`
2230
+ * as its child. It is hidden from assistive technology, because
2231
+ * `MessageItemDelegatedBy` already says who sent the message. Only on a
2232
+ * person's avatar: an agent's corner is its presence light.
2233
+ */
2234
+ function MessageItemDelegatedAvatar({ className, deleted, ...props }) {
2235
+ const { delegatedAvatar } = messageItem();
2236
+ return /* @__PURE__ */ jsx(AvatarBadge, {
2237
+ "aria-hidden": true,
2238
+ "data-deleted": deleted ? "" : void 0,
2239
+ className: delegatedAvatar({ className }),
2240
+ render: /* @__PURE__ */ jsx("span", {}),
2241
+ ...props
2242
+ });
2243
+ }
2244
+ //#endregion
2245
+ //#region src/components/message-item/message-item-toolbar.tsx
2246
+ function MessageItemToolbar({ className, render, ...props }) {
2247
+ const { toolbar } = messageItem();
2248
+ const defaultProps = { className: toolbar({ className }) };
2249
+ return useRender({
2250
+ defaultTagName: "div",
2251
+ render,
2252
+ props: mergeProps(defaultProps, props),
2253
+ state: { slot: "message-item-toolbar" }
2254
+ });
2255
+ }
2256
+ function MessageItemToolbarButton({ active = false, className, render, ...props }) {
2257
+ const { toolbarButton } = messageItem();
2258
+ const defaultProps = {
2259
+ type: "button",
2260
+ "data-active": active ? "true" : void 0,
2261
+ className: toolbarButton({ className })
2262
+ };
2263
+ return useRender({
2264
+ defaultTagName: "button",
2265
+ render,
2266
+ props: mergeProps(defaultProps, props),
2267
+ state: { slot: "message-item-toolbar-button" }
2268
+ });
2269
+ }
2270
+ //#endregion
2271
+ //#region src/components/message-item/message-footer.recipe.ts
2272
+ const messageFooter = tv$1({
2273
+ slots: {
2274
+ savedIndicator: [
2275
+ "inline-flex min-w-0 max-w-full items-center gap-1 overflow-hidden whitespace-nowrap select-none",
2276
+ "[&_svg]:shrink-0",
2277
+ "h-[22px] rounded-chip px-1.5",
2278
+ "text-caption font-semibold text-foreground-muted",
2279
+ "bg-fill-muted hover:press-overlay active:press-overlay",
2280
+ "outline-none focus-visible:shadow-focus",
2281
+ "[&_svg]:size-3.5 [&_svg]:text-foreground"
2282
+ ],
2283
+ readReceipt: [
2284
+ "ml-auto inline-flex shrink-0 items-center gap-1 whitespace-nowrap",
2285
+ "[&_svg]:shrink-0",
2286
+ "h-[22px] font-mono text-mono-meta text-foreground-hint [&_svg]:size-3"
2287
+ ],
2288
+ badge: [
2289
+ "inline-flex min-w-0 max-w-full items-center overflow-hidden whitespace-nowrap select-none",
2290
+ "transition-colors [&_svg]:shrink-0",
2291
+ "h-6 gap-1 rounded-chip border-0 px-2 shadow-none",
2292
+ "text-footnote font-bold text-foreground-muted",
2293
+ "bg-fill-muted hover:press-overlay active:press-overlay",
2294
+ "[&_svg]:size-3.5"
2295
+ ],
2296
+ badgeSeparator: ["text-foreground/45"]
2297
+ },
2298
+ variants: {
2299
+ badgeStatus: {
2300
+ read: {},
2301
+ unread: { badge: ["text-foreground"] }
2302
+ },
2303
+ iconOnly: {
2304
+ true: { savedIndicator: [
2305
+ "justify-center p-0",
2306
+ "size-8 rounded-control bg-transparent",
2307
+ "[&_svg]:size-[18px] [&_svg]:text-foreground-muted"
2308
+ ] },
2309
+ false: {}
2310
+ }
2311
+ },
2312
+ defaultVariants: { iconOnly: false }
2313
+ });
2314
+ //#endregion
2315
+ //#region src/components/message-item/message-footer.tsx
2316
+ function MessageItemBadge({ className, status = "read", ...props }) {
2317
+ const { badge } = messageFooter({ badgeStatus: status });
2318
+ return /* @__PURE__ */ jsx(Badge, {
2319
+ appearance: "soft",
2320
+ "data-slot": "message-item-badge",
2321
+ variant: "muted",
2322
+ className: badge({ className }),
2323
+ ...props
2324
+ });
2325
+ }
2326
+ function MessageItemBadgeSeparator({ className, render, ...props }) {
2327
+ const { badgeSeparator } = messageFooter();
2328
+ const defaultProps = {
2329
+ "aria-hidden": true,
2330
+ className: badgeSeparator({ className })
2331
+ };
2332
+ return useRender({
2333
+ defaultTagName: "span",
2334
+ render,
2335
+ props: mergeProps(defaultProps, props),
2336
+ state: { slot: "message-item-badge-separator" }
2337
+ });
2338
+ }
2339
+ function MessageItemSavedIndicator({ className, iconOnly = false, render, ...props }) {
2340
+ const { savedIndicator } = messageFooter({ iconOnly });
2341
+ const defaultProps = {
2342
+ ...iconOnly ? { "data-icon-only": "" } : {},
2343
+ className: savedIndicator({ className })
2344
+ };
2345
+ return useRender({
2346
+ defaultTagName: "span",
2347
+ render,
2348
+ props: mergeProps(defaultProps, props),
2349
+ state: { slot: "message-item-saved-indicator" }
2350
+ });
2351
+ }
2352
+ function MessageItemReadReceipt({ className, render, ...props }) {
2353
+ const { readReceipt } = messageFooter();
2354
+ const defaultProps = { className: readReceipt({ className }) };
2355
+ return useRender({
2356
+ defaultTagName: "span",
2357
+ render,
2358
+ props: mergeProps(defaultProps, props),
2359
+ state: { slot: "message-item-read-receipt" }
2360
+ });
2361
+ }
2362
+ //#endregion
2363
+ //#region src/components/message-item/message-reaction.recipe.ts
2364
+ const reactionCountKeyframes = [
2365
+ {
2366
+ opacity: .7,
2367
+ transform: "translateY(1px) scale(0.92)",
2368
+ offset: 0
2369
+ },
2370
+ {
2371
+ opacity: 1,
2372
+ transform: "translateY(-1px) scale(1.16)",
2373
+ offset: .45
2374
+ },
2375
+ {
2376
+ opacity: 1,
2377
+ transform: "translateY(0) scale(1)",
2378
+ offset: 1
2379
+ }
2380
+ ];
2381
+ const reactionCountTiming = {
2382
+ duration: 180,
2383
+ easing: "cubic-bezier(0.2, 0, 0.2, 1)"
2384
+ };
2385
+ const messageReaction = tv$1({ slots: {
2386
+ chip: [
2387
+ "inline-flex min-w-0 max-w-full items-center overflow-hidden whitespace-nowrap",
2388
+ "transition-colors",
2389
+ "h-6 gap-1 rounded-chip pr-2 pl-1.5 text-callout text-foreground",
2390
+ "bg-fill-muted hover:press-overlay active:press-overlay",
2391
+ "data-pressed:bg-attention-soft",
2392
+ "has-data-[slot=message-reaction-error-indicator]:bg-warning-soft",
2393
+ "outline-none focus-visible:shadow-focus",
2394
+ "[&_[data-slot=message-reaction-glyph]>svg]:size-4"
2395
+ ],
2396
+ errorIndicator: ["sr-only"],
2397
+ glyph: ["inline-flex items-center justify-center leading-none", "[&>svg]:size-[13px] [&>svg]:shrink-0"],
2398
+ count: ["inline-block origin-center font-mono tabular-nums", "text-mono-meta font-bold"],
2399
+ addButton: [
2400
+ "inline-flex min-w-0 items-center justify-center",
2401
+ "transition-colors",
2402
+ "[&_svg]:shrink-0",
2403
+ "h-6 rounded-chip px-1.5 [&_svg]:size-4",
2404
+ "bg-fill-muted text-foreground-muted hover:press-overlay active:press-overlay",
2405
+ "outline-none focus-visible:shadow-focus"
2406
+ ],
2407
+ quickRow: [
2408
+ "flex shrink-0 items-center",
2409
+ "justify-between gap-0.5 bg-layer-popover px-0.5 py-0.5",
2410
+ "[&>[role=menuitem]]:size-9 [&>[role=menuitem]]:p-0 *:[[role=menuitem]]:justify-center"
2411
+ ],
2412
+ quickButton: [
2413
+ "flex items-center justify-center",
2414
+ "bg-transparent transition-colors",
2415
+ "size-9 rounded-control p-0 text-xl leading-none text-foreground-muted",
2416
+ "hover:bg-brand-soft data-highlighted:bg-brand-soft active:bg-brand-soft",
2417
+ "outline-none focus-visible:shadow-focus"
2418
+ ],
2419
+ pickerContent: [
2420
+ "inline-flex items-center",
2421
+ "min-w-0 flex-row gap-0.5 p-1",
2422
+ "[&>[role=menuitem]]:size-9 [&>[role=menuitem]]:p-0"
2423
+ ],
2424
+ pickerStatic: [
2425
+ "inline-flex items-center",
2426
+ "min-w-0 flex-row gap-0.5 rounded-container p-1",
2427
+ "bg-layer-popover ring-1 ring-line-seam shadow-float outline-none"
2428
+ ],
2429
+ tooltip: ["inline-block max-w-[280px]", "px-2.5 py-1 text-footnote font-medium"],
2430
+ tooltipNames: ["flex max-w-60 flex-wrap items-center gap-y-0.5"],
2431
+ tooltipName: ["inline-flex min-w-0 items-baseline leading-5"],
2432
+ tooltipNameText: ["max-w-28 truncate"],
2433
+ tooltipSeparator: ["shrink-0", "text-foreground-on-hud/70"],
2434
+ tooltipMeta: ["leading-5", "text-foreground-on-hud/70"]
2435
+ } });
2436
+ //#endregion
2437
+ //#region src/components/message-item/message-reaction.tsx
2438
+ function MessageReactionChip({ className, ...props }) {
2439
+ const { chip } = messageReaction();
2440
+ return /* @__PURE__ */ jsx(Toggle, {
2441
+ ...props,
2442
+ type: "button",
2443
+ "data-slot": "message-reaction-chip",
2444
+ className: chip({ className })
2445
+ });
2446
+ }
2447
+ function MessageReactionErrorIndicator({ className, render, ...props }) {
2448
+ const { errorIndicator } = messageReaction();
2449
+ const defaultProps = {
2450
+ className: errorIndicator({ className }),
2451
+ role: "status"
2452
+ };
2453
+ return useRender({
2454
+ defaultTagName: "span",
2455
+ render,
2456
+ props: mergeProps(defaultProps, props),
2457
+ state: { slot: "message-reaction-error-indicator" }
2458
+ });
2459
+ }
2460
+ function MessageReactionGlyph({ className, render, ...props }) {
2461
+ const { glyph: glyphSlot } = messageReaction();
2462
+ const defaultProps = { className: glyphSlot({ className }) };
2463
+ return useRender({
2464
+ defaultTagName: "span",
2465
+ render,
2466
+ props: mergeProps(defaultProps, props),
2467
+ state: { slot: "message-reaction-glyph" }
2468
+ });
2469
+ }
2470
+ function MessageReactionCount({ children, className, render, ...props }) {
2471
+ const elementRef = useRef(null);
2472
+ const value = typeof children === "number" && Number.isFinite(children) ? children : null;
2473
+ const previousValue = useRef(value);
2474
+ useEffect(() => {
2475
+ const previous = previousValue.current;
2476
+ previousValue.current = value;
2477
+ if (value === null || previous === null || value === previous) return;
2478
+ const element = elementRef.current;
2479
+ const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
2480
+ if (!element?.animate || reducedMotion.matches) return;
2481
+ const animation = element.animate(reactionCountKeyframes, reactionCountTiming);
2482
+ const handleMotionChange = () => {
2483
+ if (reducedMotion.matches) animation.cancel();
2484
+ };
2485
+ reducedMotion.addEventListener("change", handleMotionChange);
2486
+ return () => {
2487
+ animation.cancel();
2488
+ reducedMotion.removeEventListener("change", handleMotionChange);
2489
+ };
2490
+ }, [value]);
2491
+ const { count } = messageReaction();
2492
+ const defaultProps = {
2493
+ className: count({ className }),
2494
+ children,
2495
+ ref: elementRef
2496
+ };
2497
+ return useRender({
2498
+ defaultTagName: "span",
2499
+ render,
2500
+ props: mergeProps(defaultProps, props),
2501
+ state: { slot: "message-reaction-count" }
2502
+ });
2503
+ }
2504
+ function MessageReactionAddButton({ className, render, ...props }) {
2505
+ const { addButton } = messageReaction();
2506
+ const defaultProps = {
2507
+ type: "button",
2508
+ className: addButton({ className })
2509
+ };
2510
+ return useRender({
2511
+ defaultTagName: "button",
2512
+ render,
2513
+ props: mergeProps(defaultProps, props),
2514
+ state: { slot: "message-reaction-add-button" }
2515
+ });
2516
+ }
2517
+ function MessageReactionQuickRow({ className, render, ...props }) {
2518
+ const { quickRow } = messageReaction();
2519
+ const defaultProps = { className: quickRow({ className }) };
2520
+ return useRender({
2521
+ defaultTagName: "div",
2522
+ render,
2523
+ props: mergeProps(defaultProps, props),
2524
+ state: { slot: "message-reaction-quick-row" }
2525
+ });
2526
+ }
2527
+ function MessageReactionQuickButton({ className, render, ...props }) {
2528
+ const { quickButton } = messageReaction();
2529
+ const defaultProps = {
2530
+ type: "button",
2531
+ className: quickButton({ className })
2532
+ };
2533
+ return useRender({
2534
+ defaultTagName: "button",
2535
+ render,
2536
+ props: mergeProps(defaultProps, props),
2537
+ state: { slot: "message-reaction-quick-button" }
2538
+ });
2539
+ }
2540
+ function MessageReactionPickerStatic({ className, render, ...props }) {
2541
+ const { pickerStatic } = messageReaction();
2542
+ const defaultProps = { className: pickerStatic({ className }) };
2543
+ return useRender({
2544
+ defaultTagName: "div",
2545
+ render,
2546
+ props: mergeProps(defaultProps, props),
2547
+ state: { slot: "message-reaction-picker-static" }
2548
+ });
2549
+ }
2550
+ function MessageReactionPickerContent({ className, ...props }) {
2551
+ const { pickerContent } = messageReaction();
2552
+ return /* @__PURE__ */ jsx(DropdownMenuContent, {
2553
+ "data-slot": "message-reaction-picker",
2554
+ className: pickerContent({ className }),
2555
+ ...props
2556
+ });
2557
+ }
2558
+ function MessageReactionTooltipContent({ className, ...props }) {
2559
+ const { tooltip } = messageReaction();
2560
+ return /* @__PURE__ */ jsx(TooltipContent, {
2561
+ className: tooltip({ className }),
2562
+ ...props
2563
+ });
2564
+ }
2565
+ function MessageReactionTooltipNames({ className, render, ...props }) {
2566
+ const { tooltipNames } = messageReaction();
2567
+ const defaultProps = { className: tooltipNames({ className }) };
2568
+ return useRender({
2569
+ defaultTagName: "span",
2570
+ render,
2571
+ props: mergeProps(defaultProps, props),
2572
+ state: { slot: "message-reaction-tooltip-names" }
2573
+ });
2574
+ }
2575
+ function MessageReactionTooltipName({ className, render, ...props }) {
2576
+ const { tooltipName } = messageReaction();
2577
+ const defaultProps = { className: tooltipName({ className }) };
2578
+ return useRender({
2579
+ defaultTagName: "span",
2580
+ render,
2581
+ props: mergeProps(defaultProps, props),
2582
+ state: { slot: "message-reaction-tooltip-name" }
2583
+ });
2584
+ }
2585
+ function MessageReactionTooltipNameText({ className, render, ...props }) {
2586
+ const { tooltipNameText } = messageReaction();
2587
+ const defaultProps = { className: tooltipNameText({ className }) };
2588
+ return useRender({
2589
+ defaultTagName: "span",
2590
+ render,
2591
+ props: mergeProps(defaultProps, props),
2592
+ state: { slot: "message-reaction-tooltip-name-text" }
2593
+ });
2594
+ }
2595
+ function MessageReactionTooltipSeparator({ className, render, ...props }) {
2596
+ const { tooltipSeparator } = messageReaction();
2597
+ const defaultProps = { className: tooltipSeparator({ className }) };
2598
+ return useRender({
2599
+ defaultTagName: "span",
2600
+ render,
2601
+ props: mergeProps(defaultProps, props),
2602
+ state: { slot: "message-reaction-tooltip-separator" }
2603
+ });
2604
+ }
2605
+ function MessageReactionTooltipMeta({ className, render, ...props }) {
2606
+ const { tooltipMeta } = messageReaction();
2607
+ const defaultProps = { className: tooltipMeta({ className }) };
2608
+ return useRender({
2609
+ defaultTagName: "span",
2610
+ render,
2611
+ props: mergeProps(defaultProps, props),
2612
+ state: { slot: "message-reaction-tooltip-meta" }
2613
+ });
2614
+ }
2615
+ //#endregion
2616
+ //#region src/components/message-item/message-reference.recipe.ts
2617
+ const chip = (fill) => [
2618
+ "items-baseline gap-0.5 rounded-sticker px-1.5 py-px has-[>svg]:pl-[3px]",
2619
+ "[font-size:0.875em] leading-5 font-semibold",
2620
+ "[&_svg]:size-3.5 [&_svg]:text-foreground-muted",
2621
+ fill
2622
+ ];
2623
+ const linkChip = (fill) => [...chip(fill), "text-foreground cursor-pointer hover:press-overlay active:press-overlay"];
2624
+ const messageReference = tv$1({
2625
+ slots: {
2626
+ root: [
2627
+ "inline-flex items-baseline gap-1",
2628
+ "py-0 align-baseline",
2629
+ "[font-size:inherit] leading-[1.2em]",
2630
+ "max-w-full truncate select-text no-underline",
2631
+ "outline-none focus-visible:shadow-focus",
2632
+ "[&_svg]:size-[0.857em] [&_svg]:shrink-0 [&_svg]:self-center",
2633
+ "has-[>[data-slot=message-reference-indicator]]:relative has-[>[data-slot=message-reference-indicator]]:mr-2",
2634
+ "has-[>[data-slot=message-reference-indicator]]:inline-block",
2635
+ "has-[>[data-slot=message-reference-indicator]]:overflow-visible"
2636
+ ],
2637
+ chipLabel: "min-w-0 truncate",
2638
+ indicator: ["pointer-events-none absolute -right-1.5 top-0 inline-flex size-2 shrink-0 items-center justify-center", "*:data-[slot=status]:size-full"]
2639
+ },
2640
+ variants: { variant: {
2641
+ primary: { root: [
2642
+ "inline-flex cursor-pointer rounded-sticker px-[3px]",
2643
+ "font-semibold text-sticker-ink no-underline",
2644
+ "bg-brand inset-ring-[1.5px] inset-ring-sticker-ink ring-[1.5px] ring-sticker-edge",
2645
+ "hover:press-overlay-sticker"
2646
+ ] },
2647
+ secondary: { root: ["inline cursor-pointer font-bold text-foreground", "decoration-foreground decoration-[1.5px] underline-offset-[3px] hover:underline"] },
2648
+ accent: { root: linkChip("bg-attention-soft") },
2649
+ muted: { root: linkChip("bg-inactive-soft") },
2650
+ info: { root: linkChip("bg-info-soft") },
2651
+ link: { root: linkChip("bg-info-soft") },
2652
+ pending: { root: chip("cursor-wait bg-inactive-soft text-foreground-muted") },
2653
+ unavailable: { root: chip("cursor-default bg-inactive-soft text-foreground-hint") }
2654
+ } },
2655
+ defaultVariants: { variant: "muted" }
2656
+ });
2657
+ //#endregion
2658
+ //#region src/components/message-item/message-reference.tsx
2659
+ function useReferenceRender(className, render, props) {
2660
+ return useRender({
2661
+ defaultTagName: "span",
2662
+ render,
2663
+ props: mergeProps({ className }, props),
2664
+ state: { slot: "message-reference" }
2665
+ });
2666
+ }
2667
+ function MessageReferenceText({ className, render, variant = "secondary", ...props }) {
2668
+ const { root } = messageReference({ variant });
2669
+ return useReferenceRender(root({ className }), render, props);
2670
+ }
2671
+ function MessageReferenceIndicator({ className, render, ...props }) {
2672
+ const { indicator } = messageReference();
2673
+ const defaultProps = { className: indicator({ className }) };
2674
+ return useRender({
2675
+ defaultTagName: "span",
2676
+ render,
2677
+ props: mergeProps(defaultProps, props),
2678
+ state: { slot: "message-reference-indicator" }
2679
+ });
2680
+ }
2681
+ function MessageReferenceChip({ className, render, variant = "muted", ...props }) {
2682
+ const { root } = messageReference({ variant });
2683
+ return useReferenceRender(root({ className }), render, props);
2684
+ }
2685
+ function MessageReferenceLabel({ className, render, ...props }) {
2686
+ const { chipLabel } = messageReference();
2687
+ const defaultProps = { className: chipLabel({ className }) };
2688
+ return useRender({
2689
+ defaultTagName: "span",
2690
+ render,
2691
+ props: mergeProps(defaultProps, props),
2692
+ state: { slot: "message-reference-label" }
2693
+ });
2694
+ }
2695
+ function MessageReferencePending({ className, render, ...props }) {
2696
+ const { root } = messageReference({ variant: "pending" });
2697
+ return useReferenceRender(root({ className }), render, props);
2698
+ }
2699
+ function MessageReferenceUnavailable({ className, render, ...props }) {
2700
+ const { root } = messageReference({ variant: "unavailable" });
2701
+ return useReferenceRender(root({ className }), render, props);
2702
+ }
2703
+ //#endregion
2704
+ //#region src/components/message-item/message-multi-select.recipe.ts
2705
+ const messageMultiSelect = tv$1({ slots: {
2706
+ root: ["flex min-h-0 min-w-0 flex-1 flex-col"],
2707
+ checkbox: [
2708
+ "self-start",
2709
+ "data-checked:shadow-none data-indeterminate:shadow-none",
2710
+ "hover:data-checked:shadow-none hover:data-indeterminate:shadow-none",
2711
+ "mt-2 rounded-sticker"
2712
+ ],
2713
+ toolbar: [
2714
+ "flex items-center",
2715
+ "gap-2 rounded-container px-2.5 py-2",
2716
+ "bg-layer-popover ring-1 ring-line-seam shadow-float"
2717
+ ]
2718
+ } });
2719
+ //#endregion
2720
+ //#region src/components/message-item/message-multi-select.tsx
2721
+ function MessageMultiSelect({ className, render, ...props }) {
2722
+ const { root } = messageMultiSelect();
2723
+ const defaultProps = { className: root({ className }) };
2724
+ return useRender({
2725
+ defaultTagName: "div",
2726
+ render,
2727
+ props: mergeProps(defaultProps, props),
2728
+ state: { slot: "message-multi-select" }
2729
+ });
2730
+ }
2731
+ /** Shared select-mode toolbar shell. Consumers compose the count and actions as children. */
2732
+ function MessageMultiSelectToolbar({ className, render, ...props }) {
2733
+ const { toolbar } = messageMultiSelect();
2734
+ const defaultProps = { className: toolbar({ className }) };
2735
+ return useRender({
2736
+ defaultTagName: "div",
2737
+ render,
2738
+ props: mergeProps(defaultProps, props),
2739
+ state: { slot: "message-multi-select-toolbar" }
2740
+ });
2741
+ }
2742
+ function MessageMultiSelectCheckbox({ className, ...props }) {
2743
+ const { checkbox } = messageMultiSelect();
2744
+ return /* @__PURE__ */ jsx(Checkbox$1, {
2745
+ "data-slot": "message-multi-select-checkbox",
2746
+ className: checkbox({ className }),
2747
+ shape: "square",
2748
+ ...props
2749
+ });
2750
+ }
2751
+ //#endregion
2752
+ //#region src/components/message-item/message-text-selection-toolbar.recipe.ts
2753
+ const messageTextSelectionToolbar = tv$1({ slots: {
2754
+ toolbar: [
2755
+ "flex min-w-0 items-center select-none",
2756
+ "gap-0.5 overflow-visible rounded-container p-0.5 text-control font-bold",
2757
+ "bg-layer-popover ring-1 ring-line-seam ring-inset shadow-float"
2758
+ ],
2759
+ button: [
2760
+ "flex shrink-0 items-center gap-1.5 outline-none transition-colors",
2761
+ "h-7 rounded-control px-2.5 whitespace-nowrap text-foreground",
2762
+ "hover:bg-fill-pressed active:bg-fill-pressed",
2763
+ "focus-visible:shadow-focus",
2764
+ "[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-foreground-muted"
2765
+ ],
2766
+ separator: ["w-px shrink-0", "mx-0.5 h-5 bg-line-hairline"]
2767
+ } });
2768
+ //#endregion
2769
+ //#region src/components/message-item/message-text-selection-toolbar.tsx
2770
+ function MessageTextSelectionToolbar({ className, ...props }) {
2771
+ const { toolbar } = messageTextSelectionToolbar();
2772
+ return /* @__PURE__ */ jsx(Toolbar.Root, {
2773
+ "data-slot": "message-text-selection-toolbar",
2774
+ className: toolbar({ className }),
2775
+ ...props
2776
+ });
2777
+ }
2778
+ function MessageTextSelectionToolbarButton({ className, ...props }) {
2779
+ const { button } = messageTextSelectionToolbar();
2780
+ return /* @__PURE__ */ jsx(Toolbar.Button, {
2781
+ "data-slot": "message-text-selection-toolbar-button",
2782
+ type: "button",
2783
+ className: button({ className }),
2784
+ ...props
2785
+ });
2786
+ }
2787
+ function MessageTextSelectionToolbarSeparator({ className, ...props }) {
2788
+ const { separator } = messageTextSelectionToolbar();
2789
+ return /* @__PURE__ */ jsx(Toolbar.Separator, {
2790
+ "data-slot": "message-text-selection-toolbar-separator",
2791
+ className: separator({ className }),
2792
+ ...props
2793
+ });
2794
+ }
2795
+ //#endregion
2796
+ //#region src/components/message-embed/message-embed.recipe.ts
2797
+ const messageEmbed = tv$1({ slots: {
2798
+ root: [
2799
+ "group block min-w-0 text-left",
2800
+ "rounded-container border border-line-hairline bg-layer-card",
2801
+ "outline-none focus-visible:shadow-focus"
2802
+ ],
2803
+ header: ["min-w-0", "px-3 py-2"],
2804
+ content: ["min-w-0"],
2805
+ footer: ["min-w-0", "px-3 py-2"]
2806
+ } });
2807
+ //#endregion
2808
+ //#region src/components/message-embed/message-embed.tsx
2809
+ function MessageEmbed({ className, render, ...props }) {
2810
+ const { root } = messageEmbed();
2811
+ return useRender({
2812
+ defaultTagName: "div",
2813
+ render,
2814
+ props: mergeProps({ className: root({ className }) }, props),
2815
+ state: { slot: "message-embed" }
2816
+ });
2817
+ }
2818
+ function MessageEmbedHeader({ className, render, ...props }) {
2819
+ const { header } = messageEmbed();
2820
+ return useRender({
2821
+ defaultTagName: "div",
2822
+ render,
2823
+ props: mergeProps({ className: header({ className }) }, props),
2824
+ state: { slot: "message-embed-header" }
2825
+ });
2826
+ }
2827
+ function MessageEmbedContent({ className, render, ...props }) {
2828
+ const { content } = messageEmbed();
2829
+ return useRender({
2830
+ defaultTagName: "div",
2831
+ render,
2832
+ props: mergeProps({ className: content({ className }) }, props),
2833
+ state: { slot: "message-embed-content" }
2834
+ });
2835
+ }
2836
+ function MessageEmbedFooter({ className, render, ...props }) {
2837
+ const { footer } = messageEmbed();
2838
+ return useRender({
2839
+ defaultTagName: "div",
2840
+ render,
2841
+ props: mergeProps({ className: footer({ className }) }, props),
2842
+ state: { slot: "message-embed-footer" }
2843
+ });
2844
+ }
2845
+ //#endregion
2846
+ //#region src/components/message-quoted-preview/message-quoted-preview.recipe.ts
2847
+ const messageQuotedPreview = tv$1({ slots: {
2848
+ root: [
2849
+ "w-full",
2850
+ "rounded-none border-0 border-l-2 border-line-seam bg-transparent pl-2.5",
2851
+ "text-foreground-muted"
2852
+ ],
2853
+ content: ["min-w-0", "p-0"],
2854
+ header: [
2855
+ "flex min-w-0 items-center",
2856
+ "has-data-[slot=message-quoted-preview-author-delegated-by]:flex-wrap",
2857
+ "gap-1.5 p-0 pb-0.5"
2858
+ ],
2859
+ channel: ["inline-flex items-center", "gap-1 text-footnote font-semibold text-foreground-hint [&_svg]:size-3.5"],
2860
+ thread: ["inline-flex items-center", "gap-1 text-footnote font-semibold text-foreground-hint [&_svg]:size-3.5"],
2861
+ author: ["inline-flex min-w-0 items-center", "gap-1.5"],
2862
+ authorName: ["truncate", "text-footnote font-bold text-foreground-muted"],
2863
+ authorMeta: ["truncate", "text-caption text-foreground-hint"],
2864
+ authorDelegatedBy: ["shrink-0 whitespace-nowrap", "text-footnote text-foreground-muted"],
2865
+ timestamp: ["ml-auto shrink-0", "font-mono text-mono-meta tabular-nums text-foreground-hint"],
2866
+ text: ["line-clamp-2", "text-callout text-foreground-muted"],
2867
+ attachments: ["flex flex-wrap gap-1.5", "mt-1.5"],
2868
+ attachment: [
2869
+ "inline-flex items-center",
2870
+ "h-[22px] gap-1 rounded-chip bg-fill-muted px-1.5",
2871
+ "font-mono text-mono-meta text-foreground-muted [&_svg]:size-3.5"
2872
+ ],
2873
+ loading: ["w-full animate-pulse", "rounded-none border-0 border-l-2 border-line-seam bg-transparent pl-2.5"],
2874
+ unavailable: [
2875
+ "block w-full text-left",
2876
+ "border-l-2 border-line-seam pl-2.5",
2877
+ "text-callout text-foreground-hint",
2878
+ "outline-none focus-visible:shadow-focus"
2879
+ ]
2880
+ } });
2881
+ //#endregion
2882
+ //#region src/components/message-quoted-preview/message-quoted-preview.tsx
2883
+ function MessageQuotedPreview({ className, render, ...props }) {
2884
+ const { root } = messageQuotedPreview();
2885
+ return /* @__PURE__ */ jsx(MessageEmbed, {
2886
+ className: root({ className }),
2887
+ render,
2888
+ ...props
2889
+ });
2890
+ }
2891
+ function MessageQuotedPreviewContent({ className, render, ...props }) {
2892
+ const { content } = messageQuotedPreview();
2893
+ return /* @__PURE__ */ jsx(MessageEmbedContent, {
2894
+ className: content({ className }),
2895
+ render,
2896
+ ...props
2897
+ });
2898
+ }
2899
+ function MessageQuotedPreviewHeader({ className, render, ...props }) {
2900
+ const { header } = messageQuotedPreview();
2901
+ return /* @__PURE__ */ jsx(MessageEmbedHeader, {
2902
+ className: header({ className }),
2903
+ render,
2904
+ ...props
2905
+ });
2906
+ }
2907
+ function MessageQuotedPreviewChannel({ className, render, ...props }) {
2908
+ const { channel } = messageQuotedPreview();
2909
+ return useRender({
2910
+ defaultTagName: "span",
2911
+ render,
2912
+ props: mergeProps({ className: channel({ className }) }, props),
2913
+ state: { slot: "message-quoted-preview-channel" }
2914
+ });
2915
+ }
2916
+ function MessageQuotedPreviewThread({ className, render, ...props }) {
2917
+ const { thread } = messageQuotedPreview();
2918
+ return useRender({
2919
+ defaultTagName: "span",
2920
+ render,
2921
+ props: mergeProps({ className: thread({ className }) }, props),
2922
+ state: { slot: "message-quoted-preview-thread" }
2923
+ });
2924
+ }
2925
+ function MessageQuotedPreviewAuthor({ className, render, ...props }) {
2926
+ const { author } = messageQuotedPreview();
2927
+ return useRender({
2928
+ defaultTagName: "span",
2929
+ render,
2930
+ props: mergeProps({ className: author({ className }) }, props),
2931
+ state: { slot: "message-quoted-preview-author" }
2932
+ });
2933
+ }
2934
+ function MessageQuotedPreviewAuthorName({ className, render, ...props }) {
2935
+ const { authorName } = messageQuotedPreview();
2936
+ return useRender({
2937
+ defaultTagName: "span",
2938
+ render,
2939
+ props: mergeProps({ className: authorName({ className }) }, props),
2940
+ state: { slot: "message-quoted-preview-author-name" }
2941
+ });
2942
+ }
2943
+ function MessageQuotedPreviewAuthorMeta({ className, render, ...props }) {
2944
+ const { authorMeta } = messageQuotedPreview();
2945
+ return useRender({
2946
+ defaultTagName: "span",
2947
+ render,
2948
+ props: mergeProps({ className: authorMeta({ className }) }, props),
2949
+ state: { slot: "message-quoted-preview-author-meta" }
2950
+ });
2951
+ }
2952
+ /**
2953
+ * "(sent by Friday)" after `MessageQuotedPreviewAuthorName`, when an assistant
2954
+ * sent the quoted message for its author. It never truncates; the author's
2955
+ * name gives way instead.
2956
+ */
2957
+ function MessageQuotedPreviewAuthorDelegatedBy({ className, render, ...props }) {
2958
+ const { authorDelegatedBy } = messageQuotedPreview();
2959
+ return useRender({
2960
+ defaultTagName: "span",
2961
+ render,
2962
+ props: mergeProps({ className: authorDelegatedBy({ className }) }, props),
2963
+ state: { slot: "message-quoted-preview-author-delegated-by" }
2964
+ });
2965
+ }
2966
+ function MessageQuotedPreviewTimestamp({ className, render, ...props }) {
2967
+ const { timestamp } = messageQuotedPreview();
2968
+ return useRender({
2969
+ defaultTagName: "span",
2970
+ render,
2971
+ props: mergeProps({ className: timestamp({ className }) }, props),
2972
+ state: { slot: "message-quoted-preview-timestamp" }
2973
+ });
2974
+ }
2975
+ function MessageQuotedPreviewText({ className, render, ...props }) {
2976
+ const { text } = messageQuotedPreview();
2977
+ return useRender({
2978
+ defaultTagName: "div",
2979
+ render,
2980
+ props: mergeProps({ className: text({ className }) }, props),
2981
+ state: { slot: "message-quoted-preview-text" }
2982
+ });
2983
+ }
2984
+ function MessageQuotedPreviewAttachments({ className, render, ...props }) {
2985
+ const { attachments } = messageQuotedPreview();
2986
+ return useRender({
2987
+ defaultTagName: "div",
2988
+ render,
2989
+ props: mergeProps({ className: attachments({ className }) }, props),
2990
+ state: { slot: "message-quoted-preview-attachments" }
2991
+ });
2992
+ }
2993
+ function MessageQuotedPreviewAttachment({ className, render, ...props }) {
2994
+ const { attachment } = messageQuotedPreview();
2995
+ return useRender({
2996
+ defaultTagName: "span",
2997
+ render,
2998
+ props: mergeProps({ className: attachment({ className }) }, props),
2999
+ state: { slot: "message-quoted-preview-attachment" }
3000
+ });
3001
+ }
3002
+ function MessageQuotedPreviewLoading({ className, render, ...props }) {
3003
+ const { loading } = messageQuotedPreview();
3004
+ return /* @__PURE__ */ jsx(MessageEmbed, {
3005
+ className: loading({ className }),
3006
+ render,
3007
+ ...props
3008
+ });
3009
+ }
3010
+ function MessageQuotedPreviewUnavailable({ className, render, ...props }) {
3011
+ const { unavailable } = messageQuotedPreview();
3012
+ return useRender({
3013
+ defaultTagName: "div",
3014
+ render,
3015
+ props: mergeProps({ className: unavailable({ className }) }, props),
3016
+ state: { slot: "message-quoted-preview-unavailable" }
3017
+ });
3018
+ }
3019
+ //#endregion
3020
+ //#region src/components/message-list/message-list.recipe.ts
3021
+ const messageList = tv$1({
3022
+ slots: {
3023
+ root: ["relative h-full min-h-0"],
3024
+ viewport: ["min-w-0 overscroll-none"],
3025
+ content: ["flex min-h-full w-full min-w-0 flex-col"],
3026
+ dateDividerRoot: ["flex select-none items-center", "gap-2 px-4 py-3"],
3027
+ dateDividerRule: ["flex-1", "min-w-3 border-t border-line-hairline"],
3028
+ dateDividerChip: ["inline-flex items-center", "font-mono text-mono-meta whitespace-nowrap text-foreground-hint"],
3029
+ notice: ["text-center", "pb-2 font-mono text-mono-meta"],
3030
+ historyLimited: [
3031
+ "inline-flex items-center",
3032
+ "h-[22px] gap-1 rounded-chip px-1.5",
3033
+ "font-mono text-mono-meta text-foreground-muted",
3034
+ "inset-ring inset-ring-line-hairline",
3035
+ "[&_svg]:size-3"
3036
+ ]
3037
+ },
3038
+ variants: { tone: {
3039
+ faint: { notice: ["text-foreground-hint"] },
3040
+ muted: { notice: ["text-foreground-muted"] }
3041
+ } },
3042
+ defaultVariants: { tone: "faint" }
3043
+ });
3044
+ const messageListJump = tv$1({
3045
+ slots: {
3046
+ controls: ["absolute inset-x-0 z-10 mx-auto", "flex w-fit max-w-[calc(100%-1.5rem)] flex-wrap items-center justify-center gap-x-2 gap-y-3"],
3047
+ group: ["inline-flex shrink-0 items-stretch", "*:data-[slot=message-list-jump-pill]:rounded-e-none"],
3048
+ dismiss: [
3049
+ "rounded-s-none border-s-0",
3050
+ "text-foreground-muted hover:text-foreground",
3051
+ "[&_svg:not([class*='size-'])]:size-4",
3052
+ "after:-inset-y-[calc(--spacing(1.5)+1.5px)] after:right-[calc(-0.75rem-1.5px)] after:left-0"
3053
+ ]
3054
+ },
3055
+ variants: { side: {
3056
+ bottom: { controls: ["bottom-[calc(--spacing(3)+var(--message-list-bottom-inset,0px))]", "flex-wrap-reverse"] },
3057
+ top: { controls: ["top-3"] }
3058
+ } },
3059
+ defaultVariants: { side: "bottom" }
3060
+ });
3061
+ //#endregion
3062
+ //#region src/components/message-list/message-list.tsx
3063
+ const contentStyle = { minWidth: 0 };
3064
+ function MessageList({ children, className, render, rootClassName, style, ...props }) {
3065
+ const isMobile = useMobileViewport();
3066
+ const { content, root, viewport } = messageList();
3067
+ const viewportStyle = useMemo(() => ({
3068
+ ...style,
3069
+ overflowX: "hidden"
3070
+ }), [style]);
3071
+ if (isMobile) return /* @__PURE__ */ jsx("div", {
3072
+ "data-slot": "message-list",
3073
+ className: root({ className: rootClassName }),
3074
+ children: /* @__PURE__ */ jsx(PanelScrollViewport, {
3075
+ ...props,
3076
+ render,
3077
+ "data-slot": "message-list-viewport",
3078
+ className: viewport({ className }),
3079
+ style: viewportStyle,
3080
+ children: /* @__PURE__ */ jsx("div", {
3081
+ className: content(),
3082
+ children
3083
+ })
3084
+ })
3085
+ });
3086
+ return /* @__PURE__ */ jsxs(ScrollArea$1, {
3087
+ "data-slot": "message-list",
3088
+ className: root({ className: rootClassName }),
3089
+ children: [/* @__PURE__ */ jsx(ScrollAreaViewport, {
3090
+ ...props,
3091
+ render,
3092
+ "data-slot": "message-list-viewport",
3093
+ className: viewport({ className }),
3094
+ style: viewportStyle,
3095
+ children: /* @__PURE__ */ jsx(ScrollAreaContent, {
3096
+ className: content(),
3097
+ style: contentStyle,
3098
+ children
3099
+ })
3100
+ }), /* @__PURE__ */ jsx(ScrollAreaScrollbar, {
3101
+ className: "me-1.5 px-0 py-1",
3102
+ children: /* @__PURE__ */ jsx(ScrollAreaThumb, {})
3103
+ })]
3104
+ });
3105
+ }
3106
+ //#endregion
3107
+ //#region src/components/message-list/message-list-markers.tsx
3108
+ function MessageListDateDivider({ children, className, render, ...props }) {
3109
+ const { dateDividerRoot, dateDividerRule, dateDividerChip } = messageList();
3110
+ const defaultProps = {
3111
+ "data-slot": "message-list-date-divider",
3112
+ className: dateDividerRoot({ className }),
3113
+ children: /* @__PURE__ */ jsxs(Fragment$1, { children: [
3114
+ /* @__PURE__ */ jsx("div", {
3115
+ "aria-hidden": true,
3116
+ className: dateDividerRule()
3117
+ }),
3118
+ /* @__PURE__ */ jsx("span", {
3119
+ className: dateDividerChip(),
3120
+ children
3121
+ }),
3122
+ /* @__PURE__ */ jsx("div", {
3123
+ "aria-hidden": true,
3124
+ className: dateDividerRule()
3125
+ })
3126
+ ] })
3127
+ };
3128
+ return useRender({
3129
+ defaultTagName: "div",
3130
+ render,
3131
+ props: mergeProps(defaultProps, props)
3132
+ });
3133
+ }
3134
+ function MessageListNotice({ className, render, tone = "faint", ...props }) {
3135
+ const { notice } = messageList({ tone });
3136
+ const defaultProps = {
3137
+ "data-slot": "message-list-notice",
3138
+ className: notice({ className })
3139
+ };
3140
+ return useRender({
3141
+ defaultTagName: "div",
3142
+ render,
3143
+ props: mergeProps(defaultProps, props)
3144
+ });
3145
+ }
3146
+ function MessageListHistoryLimited({ className, render, ...props }) {
3147
+ const { historyLimited } = messageList();
3148
+ const defaultProps = {
3149
+ "data-slot": "message-list-history-limited",
3150
+ className: historyLimited({ className })
3151
+ };
3152
+ return useRender({
3153
+ defaultTagName: "span",
3154
+ render,
3155
+ props: mergeProps(defaultProps, props)
3156
+ });
3157
+ }
3158
+ //#endregion
3159
+ //#region src/components/message-list/message-list-jump.tsx
3160
+ function MessageListJumpControls({ className, render, side = "bottom", ...props }) {
3161
+ const { controls } = messageListJump({ side });
3162
+ const defaultProps = {
3163
+ "data-slot": "message-list-jump-controls",
3164
+ "data-side": side,
3165
+ className: controls({ className })
3166
+ };
3167
+ return useRender({
3168
+ defaultTagName: "div",
3169
+ render,
3170
+ props: mergeProps(defaultProps, props)
3171
+ });
3172
+ }
3173
+ function MessageListJumpPill({ className, children, render, nativeButton, ...props }) {
3174
+ const { root, content } = buttonVariants({
3175
+ variant: "outline",
3176
+ size: "md"
3177
+ });
3178
+ return /* @__PURE__ */ jsx(Button, {
3179
+ ...props,
3180
+ render,
3181
+ nativeButton: nativeButton ?? defaultNativeButton(render),
3182
+ "data-slot": "message-list-jump-pill",
3183
+ className: root({ className }),
3184
+ children: /* @__PURE__ */ jsx("span", {
3185
+ "data-slot": "message-list-jump-pill-content",
3186
+ className: content(),
3187
+ children
3188
+ })
3189
+ });
3190
+ }
3191
+ /** A pill and its dismiss button, joined on one shared edge. */
3192
+ function MessageListJumpPillGroup({ className, render, ...props }) {
3193
+ const { group } = messageListJump();
3194
+ const defaultProps = {
3195
+ "data-slot": "message-list-jump-pill-group",
3196
+ className: group({ className })
3197
+ };
3198
+ return useRender({
3199
+ defaultTagName: "div",
3200
+ render,
3201
+ props: mergeProps(defaultProps, props)
3202
+ });
3203
+ }
3204
+ function MessageListJumpPillDismiss({ className, children, render, nativeButton, ...props }) {
3205
+ const { root, content } = buttonVariants({
3206
+ variant: "outline",
3207
+ size: "icon-md"
3208
+ });
3209
+ const { dismiss } = messageListJump();
3210
+ return /* @__PURE__ */ jsx(Button, {
3211
+ ...props,
3212
+ render,
3213
+ nativeButton: nativeButton ?? defaultNativeButton(render),
3214
+ "data-slot": "message-list-jump-pill-dismiss",
3215
+ className: root({ className: dismiss({ className }) }),
3216
+ children: /* @__PURE__ */ jsx("span", {
3217
+ "data-slot": "message-list-jump-pill-dismiss-content",
3218
+ className: content(),
3219
+ children
3220
+ })
3221
+ });
3222
+ }
3223
+ //#endregion
3224
+ export { MessageReactionTooltipNameText as $, DropdownMenuSeparator as $t, MessageTextSelectionToolbarButton as A, DialogBody as An, MessageItem as At, MessageReferenceUnavailable as B, DialogTitle as Bn, DropdownMenuCheckboxItem as Bt, MessageQuotedPreviewUnavailable as C, Tooltip$1 as Cn, MessageItemEdited as Ct, MessageEmbedHeader as D, TooltipTrigger as Dn, MessageItemAvatarSlot as Dt, MessageEmbedFooter as E, TooltipProvider as En, MessageItemSearchMatch as Et, MessageReferenceChip as F, DialogHeader as Fn, AvatarGroup as Ft, MessageReactionGlyph as G, defaultNativeButton as Gn, DropdownMenuItemCount as Gt, MessageReactionChip as H, Button$1 as Hn, DropdownMenuContent as Ht, MessageReferenceIndicator as I, DialogNav as In, AvatarGroupCount as It, MessageReactionQuickButton as J, resolveThemeScopeProps as Jn, DropdownMenuPopup as Jt, MessageReactionPickerContent as K, useParentOverlayKind as Kn, DropdownMenuItemLabel as Kt, MessageReferenceLabel as L, DialogOverlay as Ln, AvatarImage as Lt, MessageMultiSelect as M, DialogContent as Mn, Avatar$1 as Mt, MessageMultiSelectCheckbox as N, DialogDescription as Nn, AvatarBadge as Nt, messageEmbed as O, Badge as On, MessageItemContinuationTime as Ot, MessageMultiSelectToolbar as P, DialogFooter as Pn, AvatarFallback as Pt, MessageReactionTooltipName as Q, tv$1 as Qn, DropdownMenuRadioItemIndicator as Qt, MessageReferencePending as R, DialogPortal as Rn, useOverflowTitle as Rt, MessageQuotedPreviewTimestamp as S, PRESENCE_COLOR as Sn, MessageItemContent as St, MessageEmbedContent as T, TooltipPortal as Tn, MessageItemFooter as Tt, MessageReactionCount as U, buttonVariants as Un, DropdownMenuFooter as Ut, MessageReactionAddButton as V, DialogTrigger as Vn, DropdownMenuCheckboxItemIndicator as Vt, MessageReactionErrorIndicator as W, Spinner as Wn, DropdownMenuItem as Wt, MessageReactionTooltipContent as X, useTheme as Xn, DropdownMenuRadioGroup as Xt, MessageReactionQuickRow as Y, useThemeScopeProps as Yn, DropdownMenuPortal as Yt, MessageReactionTooltipMeta as Z, ThemeStateContext as Zn, DropdownMenuRadioItem as Zt, MessageQuotedPreviewContent as _, ScrollAreaThumb as _n, MessageItemSenderButton as _t, MessageListDateDivider as a, KbdGroup as an, MessageItemSavedIndicator as at, MessageQuotedPreviewText as b, Checkbox$1 as bn, MessageItemAttachments as bt, MessageList as c, PanelFooter as cn, MessageItemDelegatedAvatar as ct, MessageQuotedPreviewAttachments as d, PanelScrollViewport as dn, MessageItemDelegatedByName as dt, DropdownMenuShortcut as en, MessageReactionTooltipNames as et, MessageQuotedPreviewAuthor as f, PanelSection as fn, MessageItemHeader as ft, MessageQuotedPreviewChannel as g, ScrollAreaScrollbar as gn, MessageItemSenderBadges as gt, MessageQuotedPreviewAuthorName as h, ScrollAreaCorner as hn, MessageItemSender as ht, MessageListJumpPillGroup as i, Kbd as in, MessageItemReadReceipt as it, MessageTextSelectionToolbarSeparator as j, DialogClose as jn, searchHit as jt, MessageTextSelectionToolbar as k, Dialog$1 as kn, MessageItemGutter as kt, MessageQuotedPreview as l, PanelHeaderRoot as ln, MessageItemDelegatedBy as lt, MessageQuotedPreviewAuthorMeta as m, ScrollAreaContent as mn, MessageItemMeta as mt, MessageListJumpPill as n, DropdownMenuSubmenuTrigger as nn, MessageItemBadge as nt, MessageListHistoryLimited as o, Panel as on, MessageItemToolbar as ot, MessageQuotedPreviewAuthorDelegatedBy as p, ScrollArea$1 as pn, MessageItemInlineStatus as pt, MessageReactionPickerStatic as q, withOverlayLayer as qn, DropdownMenuLabel as qt, MessageListJumpPillDismiss as r, DropdownMenuTrigger as rn, MessageItemBadgeSeparator as rt, MessageListNotice as s, PanelBody as sn, MessageItemToolbarButton as st, MessageListJumpControls as t, DropdownMenuSubmenu as tn, MessageReactionTooltipSeparator as tt, MessageQuotedPreviewAttachment as u, PanelScrollContent as un, MessageItemDelegatedByButton as ut, MessageQuotedPreviewHeader as v, ScrollAreaViewport as vn, MessageItemSenderGroup as vt, MessageEmbed as w, TooltipContent as wn, MessageItemEmbedded as wt, MessageQuotedPreviewThread as x, CheckboxIndicator as xn, MessageItemBody as xt, MessageQuotedPreviewLoading as y, useMobileViewport as yn, MessageItemTime as yt, MessageReferenceText as z, DialogSurface as zn, DropdownMenu as zt };