@botiverse/raft-ui 0.10.7 → 0.12.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.
- package/CHANGELOG.md +26 -0
- package/dist/components/combobox-select/combobox-select.css +9 -114
- package/dist/components/virtual-list/styles/virtual-list.css +64 -0
- package/dist/index-epyBg4aG.d.mts +1089 -0
- package/dist/index.d.mts +344 -709
- package/dist/index.mjs +5238 -5068
- package/dist/message-list-CxawdwMF.mjs +3177 -0
- package/dist/style.css +55 -127
- package/dist/styles.css +1 -0
- package/dist/wip.d.mts +9 -22
- package/dist/wip.mjs +53 -357
- package/package.json +1 -1
- package/dist/drawer-yZD16Ybl.mjs +0 -988
- package/dist/index-CDHLWJtB.d.mts +0 -311
|
@@ -0,0 +1,3177 @@
|
|
|
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/components/avatar/avatar.tsx
|
|
1528
|
+
const avatar = tv$1({
|
|
1529
|
+
slots: {
|
|
1530
|
+
root: [
|
|
1531
|
+
"group/avatar relative flex shrink-0 items-center justify-center select-none",
|
|
1532
|
+
"rounded-sticker border-[1.5px] border-sticker-ink",
|
|
1533
|
+
"text-sticker-ink shadow-[0_0_0_1.5px_var(--sticker-edge)]"
|
|
1534
|
+
],
|
|
1535
|
+
image: ["size-full object-cover", "rounded-[2px]"],
|
|
1536
|
+
fallback: [
|
|
1537
|
+
"flex size-full items-center justify-center",
|
|
1538
|
+
"[&>svg]:size-4",
|
|
1539
|
+
"[[data-size='lg']>&]:[&>svg]:size-6",
|
|
1540
|
+
"[[data-size='md']>&]:[&>svg]:size-4.5",
|
|
1541
|
+
"[[data-size='xs']>&]:[&>svg]:size-3",
|
|
1542
|
+
"overflow-hidden rounded-[2px]",
|
|
1543
|
+
"font-sans text-[15px] leading-none font-bold tracking-[-0.01em] text-sticker-ink",
|
|
1544
|
+
"[[data-size='xl']>&]:text-[40px]",
|
|
1545
|
+
"[[data-size='lg']>&]:text-[22px]",
|
|
1546
|
+
"[[data-size='sm']>&]:text-[13px]",
|
|
1547
|
+
"[[data-size='xs']>&]:text-[11px]",
|
|
1548
|
+
"[[data-size='2xs']>&]:text-[11px]",
|
|
1549
|
+
"[[data-size='3xs']>&]:text-[8px]",
|
|
1550
|
+
"[[data-size='xl']>&]:[&>svg]:size-12",
|
|
1551
|
+
"[[data-size='sm']>&]:[&>svg]:size-3.5",
|
|
1552
|
+
"[[data-size='2xs']>&]:[&>svg]:size-3",
|
|
1553
|
+
"[[data-size='3xs']>&]:[&>svg]:size-2"
|
|
1554
|
+
],
|
|
1555
|
+
badge: [
|
|
1556
|
+
"absolute z-10 select-none",
|
|
1557
|
+
"size-[11px] -right-1 -bottom-1 rounded-[2px]",
|
|
1558
|
+
"outline-2 outline-solid outline-layer-canvas",
|
|
1559
|
+
"group-data-[size=xl]/avatar:size-5 group-data-[size=xl]/avatar:-right-2 group-data-[size=xl]/avatar:-bottom-2",
|
|
1560
|
+
"group-data-[size=lg]/avatar:size-3.5 group-data-[size=lg]/avatar:right-[-5px] group-data-[size=lg]/avatar:bottom-[-5px]",
|
|
1561
|
+
"group-data-[size=md]/avatar:size-[11px]",
|
|
1562
|
+
"group-data-[size=sm]/avatar:size-[9px] group-data-[size=sm]/avatar:right-[-3px] group-data-[size=sm]/avatar:bottom-[-3px]",
|
|
1563
|
+
"group-data-[size=xs]/avatar:size-[7px] group-data-[size=xs]/avatar:-right-0.5 group-data-[size=xs]/avatar:-bottom-0.5",
|
|
1564
|
+
"group-data-[size=2xs]/avatar:size-[7px] group-data-[size=2xs]/avatar:-right-0.5 group-data-[size=2xs]/avatar:-bottom-0.5",
|
|
1565
|
+
"group-data-[size=3xs]/avatar:size-1.5 group-data-[size=3xs]/avatar:-right-0.5 group-data-[size=3xs]/avatar:-bottom-0.5"
|
|
1566
|
+
],
|
|
1567
|
+
dot: [
|
|
1568
|
+
"inline-flex items-center justify-center outline-2",
|
|
1569
|
+
"[&>svg]:hidden",
|
|
1570
|
+
"group-data-[size=xl]/avatar:[&>svg]:size-2 group-data-[size=xl]/avatar:[&>svg]:block",
|
|
1571
|
+
"group-data-[size=lg]/avatar:[&>svg]:size-2 group-data-[size=lg]/avatar:[&>svg]:block",
|
|
1572
|
+
"group-data-[size=md]/avatar:[&>svg]:size-1.5 group-data-[size=md]/avatar:[&>svg]:block",
|
|
1573
|
+
"group-data-[size=xs]/avatar:outline group-data-[size=2xs]/avatar:outline group-data-[size=3xs]/avatar:outline",
|
|
1574
|
+
"rounded-[2px] border-[1.5px] border-sticker-ink",
|
|
1575
|
+
"bg-(--status-color) text-sticker-ink outline-layer-canvas",
|
|
1576
|
+
"group-data-[size=xl]/avatar:border-2",
|
|
1577
|
+
"group-data-[size=xs]/avatar:border group-data-[size=2xs]/avatar:border group-data-[size=3xs]/avatar:border"
|
|
1578
|
+
],
|
|
1579
|
+
group: [
|
|
1580
|
+
"group/avatar-group flex items-center",
|
|
1581
|
+
"stack-x-[-5px]",
|
|
1582
|
+
"*:data-[slot=avatar]:shadow-[0_0_0_1.5px_var(--sticker-edge),0_0_0_3px_var(--avatar-group-surface,var(--layer-canvas))]",
|
|
1583
|
+
"*: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))]"
|
|
1584
|
+
]
|
|
1585
|
+
},
|
|
1586
|
+
variants: {
|
|
1587
|
+
type: {
|
|
1588
|
+
agent: { root: ["bg-inactive"] },
|
|
1589
|
+
human: { root: ["bg-palette-lavender"] }
|
|
1590
|
+
},
|
|
1591
|
+
size: {
|
|
1592
|
+
xl: { root: ["size-[99px] shadow-[0_0_0_1.5px_var(--sticker-edge),var(--elevation-sticker)]"] },
|
|
1593
|
+
lg: { root: ["size-[51px]"] },
|
|
1594
|
+
md: { root: ["size-[35px]"] },
|
|
1595
|
+
sm: { root: ["size-[27px]"] },
|
|
1596
|
+
xs: { root: ["size-[19px]"] },
|
|
1597
|
+
"2xs": { root: ["size-[19px]"] },
|
|
1598
|
+
"3xs": { root: "size-3.5" }
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
});
|
|
1602
|
+
function Avatar$1({ size, type, className, children, ...props }) {
|
|
1603
|
+
const { root } = avatar({
|
|
1604
|
+
type,
|
|
1605
|
+
size
|
|
1606
|
+
});
|
|
1607
|
+
return /* @__PURE__ */ jsx(Avatar.Root, {
|
|
1608
|
+
"data-slot": "avatar",
|
|
1609
|
+
"data-size": size,
|
|
1610
|
+
className: root({ className }),
|
|
1611
|
+
...props,
|
|
1612
|
+
children: children ?? /* @__PURE__ */ jsx(AvatarFallback, {})
|
|
1613
|
+
});
|
|
1614
|
+
}
|
|
1615
|
+
function AvatarImage({ className, ...props }) {
|
|
1616
|
+
const { image } = avatar();
|
|
1617
|
+
return /* @__PURE__ */ jsx(Avatar.Image, {
|
|
1618
|
+
"data-slot": "avatar-image",
|
|
1619
|
+
className: image({ className }),
|
|
1620
|
+
...props
|
|
1621
|
+
});
|
|
1622
|
+
}
|
|
1623
|
+
function AvatarFallbackIcon() {
|
|
1624
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
1625
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1626
|
+
width: "18",
|
|
1627
|
+
height: "18",
|
|
1628
|
+
viewBox: "0 0 18 18",
|
|
1629
|
+
"aria-hidden": "true",
|
|
1630
|
+
focusable: "false",
|
|
1631
|
+
children: /* @__PURE__ */ jsxs("g", {
|
|
1632
|
+
fill: "none",
|
|
1633
|
+
strokeLinecap: "round",
|
|
1634
|
+
strokeLinejoin: "round",
|
|
1635
|
+
strokeWidth: "1",
|
|
1636
|
+
stroke: "currentColor",
|
|
1637
|
+
children: [
|
|
1638
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1639
|
+
cx: "9",
|
|
1640
|
+
cy: "7.75",
|
|
1641
|
+
r: "2"
|
|
1642
|
+
}),
|
|
1643
|
+
/* @__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" }),
|
|
1644
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1645
|
+
cx: "1.889",
|
|
1646
|
+
cy: "10.414",
|
|
1647
|
+
r: ".75",
|
|
1648
|
+
fill: "currentColor",
|
|
1649
|
+
"data-stroke": "none",
|
|
1650
|
+
stroke: "none"
|
|
1651
|
+
}),
|
|
1652
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1653
|
+
cx: "2.971",
|
|
1654
|
+
cy: "4.972",
|
|
1655
|
+
r: ".75",
|
|
1656
|
+
fill: "currentColor",
|
|
1657
|
+
"data-stroke": "none",
|
|
1658
|
+
stroke: "none"
|
|
1659
|
+
}),
|
|
1660
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1661
|
+
cx: "2.972",
|
|
1662
|
+
cy: "13.027",
|
|
1663
|
+
r: ".75",
|
|
1664
|
+
fill: "currentColor",
|
|
1665
|
+
"data-stroke": "none",
|
|
1666
|
+
stroke: "none"
|
|
1667
|
+
}),
|
|
1668
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1669
|
+
cx: "1.89",
|
|
1670
|
+
cy: "7.586",
|
|
1671
|
+
r: ".75",
|
|
1672
|
+
fill: "currentColor",
|
|
1673
|
+
"data-stroke": "none",
|
|
1674
|
+
stroke: "none"
|
|
1675
|
+
}),
|
|
1676
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1677
|
+
cx: "4.973",
|
|
1678
|
+
cy: "2.972",
|
|
1679
|
+
r: ".75",
|
|
1680
|
+
fill: "currentColor",
|
|
1681
|
+
"data-stroke": "none",
|
|
1682
|
+
stroke: "none"
|
|
1683
|
+
}),
|
|
1684
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1685
|
+
cx: "7.586",
|
|
1686
|
+
cy: "1.889",
|
|
1687
|
+
r: ".75",
|
|
1688
|
+
fill: "currentColor",
|
|
1689
|
+
"data-stroke": "none",
|
|
1690
|
+
stroke: "none"
|
|
1691
|
+
}),
|
|
1692
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1693
|
+
cx: "15.029",
|
|
1694
|
+
cy: "13.028",
|
|
1695
|
+
r: ".75",
|
|
1696
|
+
fill: "currentColor",
|
|
1697
|
+
"data-stroke": "none",
|
|
1698
|
+
stroke: "none"
|
|
1699
|
+
}),
|
|
1700
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1701
|
+
cx: "16.111",
|
|
1702
|
+
cy: "7.586",
|
|
1703
|
+
r: ".75",
|
|
1704
|
+
fill: "currentColor",
|
|
1705
|
+
"data-stroke": "none",
|
|
1706
|
+
stroke: "none"
|
|
1707
|
+
}),
|
|
1708
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1709
|
+
cx: "13.028",
|
|
1710
|
+
cy: "2.971",
|
|
1711
|
+
r: ".75",
|
|
1712
|
+
fill: "currentColor",
|
|
1713
|
+
"data-stroke": "none",
|
|
1714
|
+
stroke: "none"
|
|
1715
|
+
}),
|
|
1716
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1717
|
+
cx: "16.11",
|
|
1718
|
+
cy: "10.414",
|
|
1719
|
+
r: ".75",
|
|
1720
|
+
fill: "currentColor",
|
|
1721
|
+
"data-stroke": "none",
|
|
1722
|
+
stroke: "none"
|
|
1723
|
+
}),
|
|
1724
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1725
|
+
cx: "15.028",
|
|
1726
|
+
cy: "4.973",
|
|
1727
|
+
r: ".75",
|
|
1728
|
+
fill: "currentColor",
|
|
1729
|
+
"data-stroke": "none",
|
|
1730
|
+
stroke: "none"
|
|
1731
|
+
}),
|
|
1732
|
+
/* @__PURE__ */ jsx("circle", {
|
|
1733
|
+
cx: "10.414",
|
|
1734
|
+
cy: "1.89",
|
|
1735
|
+
r: ".75",
|
|
1736
|
+
fill: "currentColor",
|
|
1737
|
+
"data-stroke": "none",
|
|
1738
|
+
stroke: "none"
|
|
1739
|
+
})
|
|
1740
|
+
]
|
|
1741
|
+
})
|
|
1742
|
+
});
|
|
1743
|
+
}
|
|
1744
|
+
function AvatarFallback({ className, children, ...props }) {
|
|
1745
|
+
const { fallback } = avatar();
|
|
1746
|
+
return /* @__PURE__ */ jsx(Avatar.Fallback, {
|
|
1747
|
+
"data-slot": "avatar-fallback",
|
|
1748
|
+
className: fallback({ className }),
|
|
1749
|
+
...props,
|
|
1750
|
+
children: children ?? /* @__PURE__ */ jsx(AvatarFallbackIcon, {})
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
const toCssLength = (value) => typeof value === "number" ? `${value}px` : value;
|
|
1754
|
+
function AvatarBadge({ className, render, offset, presence = "online", ...props }) {
|
|
1755
|
+
const { badge, dot } = avatar();
|
|
1756
|
+
const offsetStyle = offset ? {
|
|
1757
|
+
top: toCssLength(offset[1]),
|
|
1758
|
+
left: toCssLength(offset[0]),
|
|
1759
|
+
right: "auto",
|
|
1760
|
+
bottom: "auto",
|
|
1761
|
+
translate: "-50% -50%"
|
|
1762
|
+
} : void 0;
|
|
1763
|
+
const defaultProps = {
|
|
1764
|
+
className: badge({ className: render ? className : dot({ className: cn(PRESENCE_COLOR[presence], className) }) }),
|
|
1765
|
+
style: offsetStyle
|
|
1766
|
+
};
|
|
1767
|
+
return useRender({
|
|
1768
|
+
defaultTagName: "span",
|
|
1769
|
+
render,
|
|
1770
|
+
props: mergeProps(defaultProps, props),
|
|
1771
|
+
state: { slot: "avatar-badge" }
|
|
1772
|
+
});
|
|
1773
|
+
}
|
|
1774
|
+
function AvatarGroup({ className, ...props }) {
|
|
1775
|
+
const { group } = avatar();
|
|
1776
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1777
|
+
"data-slot": "avatar-group",
|
|
1778
|
+
className: group({ className }),
|
|
1779
|
+
...props
|
|
1780
|
+
});
|
|
1781
|
+
}
|
|
1782
|
+
function AvatarGroupCount({ size, className, ...props }) {
|
|
1783
|
+
const { root } = avatar({ size });
|
|
1784
|
+
return /* @__PURE__ */ jsx("span", {
|
|
1785
|
+
"data-slot": "avatar-group-count",
|
|
1786
|
+
className: root({ class: ["border-transparent bg-fill-muted font-mono text-mono-meta font-bold tabular-nums text-foreground-muted shadow-none", className] }),
|
|
1787
|
+
...props
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
1790
|
+
//#endregion
|
|
1791
|
+
//#region src/lib/search-hit.ts
|
|
1792
|
+
/**
|
|
1793
|
+
* The DS search hit: what you looked for is a small yellow sticker, like an @
|
|
1794
|
+
* to you. Every place that marks a hit (message text, Markdown, search
|
|
1795
|
+
* results) uses this. The hit keeps the surrounding font (`[font:inherit]`
|
|
1796
|
+
* drops the browser's mark styling) but is always bold, which needs `!` to win
|
|
1797
|
+
* over that shorthand.
|
|
1798
|
+
*/
|
|
1799
|
+
const searchHit = [
|
|
1800
|
+
"[font:inherit] font-bold!",
|
|
1801
|
+
"rounded-sticker bg-brand px-[3px] box-decoration-clone",
|
|
1802
|
+
"text-sticker-ink inset-ring-[1.5px] inset-ring-sticker-ink ring-[1.5px] ring-sticker-edge"
|
|
1803
|
+
];
|
|
1804
|
+
//#endregion
|
|
1805
|
+
//#region src/components/message-item/message-item.recipe.ts
|
|
1806
|
+
const sender = [
|
|
1807
|
+
"min-w-0 truncate",
|
|
1808
|
+
"text-subhead font-bold text-foreground",
|
|
1809
|
+
"rounded-[2px] outline-none focus-visible:shadow-focus"
|
|
1810
|
+
];
|
|
1811
|
+
const messageItem = tv$1({
|
|
1812
|
+
slots: {
|
|
1813
|
+
root: [
|
|
1814
|
+
"group/message relative flex h-fit gap-3",
|
|
1815
|
+
"hover:[--mi-toolbar-opacity:1] hover:[--mi-toolbar-pe:auto] focus-within:[--mi-toolbar-opacity:1] focus-within:[--mi-toolbar-pe:auto]",
|
|
1816
|
+
"has-data-popup-open:[--mi-toolbar-opacity:1] has-data-popup-open:[--mi-toolbar-pe:auto]",
|
|
1817
|
+
"min-h-0 px-2 py-1 border-t-8 border-transparent bg-clip-padding",
|
|
1818
|
+
"hover:[--mi-ct-color:var(--foreground-hint)] has-data-popup-open:[--mi-ct-color:var(--foreground-hint)]",
|
|
1819
|
+
"bg-(--mi-row-fill) [--mi-row-fill:initial]",
|
|
1820
|
+
"hover:[--mi-row-fill:var(--fill-pressed)] data-popup-open:[--mi-row-fill:var(--fill-pressed)] has-data-popup-open:[--mi-row-fill:var(--fill-pressed)]",
|
|
1821
|
+
"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)]",
|
|
1822
|
+
"has-[[data-slot=message-multi-select-checkbox][data-checked]]:[--mi-row-fill:var(--info-soft)]",
|
|
1823
|
+
"has-[[data-slot=message-multi-select-checkbox][data-checked]]:hover:[--mi-row-fill:var(--info-soft)]"
|
|
1824
|
+
],
|
|
1825
|
+
gutter: ["relative shrink-0 self-stretch", "w-[35px]"],
|
|
1826
|
+
avatarSlot: [
|
|
1827
|
+
"relative shrink-0 self-start",
|
|
1828
|
+
"flex w-[35px] justify-center",
|
|
1829
|
+
"[&_[data-slot=avatar][data-size=md]]:size-(--mi-avatar,35px)"
|
|
1830
|
+
],
|
|
1831
|
+
continuationTime: [
|
|
1832
|
+
"absolute right-0 select-none whitespace-nowrap tabular-nums",
|
|
1833
|
+
"top-[calc((var(--text-body--line-height)-var(--text-mono-meta--line-height))/2)]",
|
|
1834
|
+
"font-mono text-mono-meta",
|
|
1835
|
+
"text-(--mi-ct-color,transparent)"
|
|
1836
|
+
],
|
|
1837
|
+
content: ["min-w-0 flex-1", "text-body text-foreground"],
|
|
1838
|
+
header: [
|
|
1839
|
+
"mb-px flex min-w-0 items-baseline gap-1.5 overflow-hidden",
|
|
1840
|
+
"pointer-fine:pe-(--mi-toolbar-reserve,6.5rem)",
|
|
1841
|
+
"has-data-[slot=message-item-delegated-by]:[--mi-owner-basis:3rem] has-data-[slot=message-item-delegated-by]:[--mi-owner-flex:1_0]"
|
|
1842
|
+
],
|
|
1843
|
+
senderGroup: [
|
|
1844
|
+
"flex min-w-0 items-baseline gap-1.5 overflow-hidden",
|
|
1845
|
+
"flex-[var(--mi-owner-flex,0_1)_var(--mi-owner-basis,auto)] max-w-max",
|
|
1846
|
+
"*:data-[slot=message-item-meta]:basis-0 *:data-[slot=message-item-meta]:grow",
|
|
1847
|
+
"*: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-['']"
|
|
1848
|
+
],
|
|
1849
|
+
sender,
|
|
1850
|
+
senderButton: [
|
|
1851
|
+
...sender,
|
|
1852
|
+
"cursor-pointer",
|
|
1853
|
+
"decoration-[1.5px] underline-offset-[3px] hover:underline"
|
|
1854
|
+
],
|
|
1855
|
+
senderBadges: ["inline-flex shrink-0 items-center gap-1"],
|
|
1856
|
+
meta: ["min-w-0 truncate", "text-caption text-foreground-hint"],
|
|
1857
|
+
time: ["shrink-0 whitespace-nowrap", "font-mono text-mono-meta tabular-nums text-foreground-hint"],
|
|
1858
|
+
inlineStatus: ["shrink-0", "text-caption text-foreground-hint"],
|
|
1859
|
+
delegatedBy: [
|
|
1860
|
+
"inline-grid grid-flow-col items-baseline",
|
|
1861
|
+
"min-w-min shrink whitespace-pre-wrap",
|
|
1862
|
+
"has-data-[slot=message-item-delegated-by-name]:max-w-[45%] has-data-[slot=message-item-delegated-by-name]:whitespace-pre",
|
|
1863
|
+
"has-data-[slot=message-item-delegated-by-button]:max-w-[45%] has-data-[slot=message-item-delegated-by-button]:whitespace-pre",
|
|
1864
|
+
"text-caption text-foreground-muted"
|
|
1865
|
+
],
|
|
1866
|
+
delegatedByName: ["min-w-0 truncate"],
|
|
1867
|
+
delegatedByButton: [
|
|
1868
|
+
"min-w-0 truncate",
|
|
1869
|
+
"cursor-pointer decoration-1 underline-offset-[3px] hover:underline",
|
|
1870
|
+
"rounded-[2px] outline-none focus-visible:shadow-focus"
|
|
1871
|
+
],
|
|
1872
|
+
delegatedAvatar: [
|
|
1873
|
+
"size-[19px] group-data-[size=md]/avatar:size-[19px]",
|
|
1874
|
+
"rounded-sticker outline-none",
|
|
1875
|
+
"bg-layer-canvas bg-[linear-gradient(var(--mi-row-fill,transparent),var(--mi-row-fill,transparent))]",
|
|
1876
|
+
"data-deleted:*:data-[slot=avatar]:grayscale data-deleted:*:data-[slot=avatar]:opacity-60",
|
|
1877
|
+
"shadow-[0_0_0_1.5px_var(--mi-row-fill,transparent),0_0_0_1.5px_var(--layer-canvas)]",
|
|
1878
|
+
"dark:shadow-[0_0_0_3px_var(--mi-row-fill,transparent),0_0_0_3px_var(--layer-canvas)]"
|
|
1879
|
+
],
|
|
1880
|
+
edited: ["ms-1 whitespace-nowrap", "text-caption text-foreground-hint"],
|
|
1881
|
+
body: [
|
|
1882
|
+
"wrap-break-word select-text",
|
|
1883
|
+
"**:select-text",
|
|
1884
|
+
"text-body text-foreground",
|
|
1885
|
+
"selection:bg-brand-soft"
|
|
1886
|
+
],
|
|
1887
|
+
searchMatch: searchHit,
|
|
1888
|
+
embedded: ["min-w-0", "mt-2"],
|
|
1889
|
+
attachments: ["stack-y-2", "mt-2"],
|
|
1890
|
+
footer: ["mt-1.5 flex flex-wrap items-center gap-1.5"],
|
|
1891
|
+
toolbar: [
|
|
1892
|
+
"absolute z-20 flex items-center",
|
|
1893
|
+
"opacity-(--mi-toolbar-opacity,0)",
|
|
1894
|
+
"[pointer-events:var(--mi-toolbar-pe,none)]",
|
|
1895
|
+
"top-[-16px] right-3 gap-0.5 overflow-visible rounded-container p-0.5",
|
|
1896
|
+
"bg-layer-popover ring-1 ring-line-seam ring-inset shadow-float"
|
|
1897
|
+
],
|
|
1898
|
+
toolbarButton: [
|
|
1899
|
+
"inline-flex shrink-0 items-center justify-center",
|
|
1900
|
+
"[&_svg]:shrink-0",
|
|
1901
|
+
"size-7 rounded-control border-0 bg-transparent p-0",
|
|
1902
|
+
"text-foreground-muted hover:bg-fill-pressed active:bg-fill-pressed",
|
|
1903
|
+
"data-popup-open:bg-fill-pressed data-active:text-foreground",
|
|
1904
|
+
"outline-none focus-visible:shadow-focus",
|
|
1905
|
+
"[&_svg]:size-4"
|
|
1906
|
+
]
|
|
1907
|
+
},
|
|
1908
|
+
variants: { compact: { true: { root: ["border-t-0"] } } }
|
|
1909
|
+
});
|
|
1910
|
+
//#endregion
|
|
1911
|
+
//#region src/components/message-item/message-item-root.tsx
|
|
1912
|
+
function MessageItem({ className, compact, render, ...props }) {
|
|
1913
|
+
const { root } = messageItem({ compact });
|
|
1914
|
+
const defaultProps = {
|
|
1915
|
+
"data-message-item": "",
|
|
1916
|
+
"data-compact": compact ? "true" : void 0,
|
|
1917
|
+
className: root({ className })
|
|
1918
|
+
};
|
|
1919
|
+
return useRender({
|
|
1920
|
+
defaultTagName: "div",
|
|
1921
|
+
render,
|
|
1922
|
+
props: mergeProps(defaultProps, props),
|
|
1923
|
+
state: { slot: "message-item" }
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1926
|
+
//#endregion
|
|
1927
|
+
//#region src/components/message-item/message-item-gutter.tsx
|
|
1928
|
+
function MessageItemGutter({ className, render, ...props }) {
|
|
1929
|
+
const { gutter } = messageItem();
|
|
1930
|
+
const defaultProps = { className: gutter({ className }) };
|
|
1931
|
+
return useRender({
|
|
1932
|
+
defaultTagName: "div",
|
|
1933
|
+
render,
|
|
1934
|
+
props: mergeProps(defaultProps, props),
|
|
1935
|
+
state: { slot: "message-item-gutter" }
|
|
1936
|
+
});
|
|
1937
|
+
}
|
|
1938
|
+
function MessageItemAvatarSlot({ className, render, ...props }) {
|
|
1939
|
+
const { avatarSlot } = messageItem();
|
|
1940
|
+
const defaultProps = { className: avatarSlot({ className }) };
|
|
1941
|
+
return useRender({
|
|
1942
|
+
defaultTagName: "div",
|
|
1943
|
+
render,
|
|
1944
|
+
props: mergeProps(defaultProps, props),
|
|
1945
|
+
state: { slot: "message-item-avatar-slot" }
|
|
1946
|
+
});
|
|
1947
|
+
}
|
|
1948
|
+
/** 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`). */
|
|
1949
|
+
function MessageItemContinuationTime({ className, render, ...props }) {
|
|
1950
|
+
const { continuationTime } = messageItem();
|
|
1951
|
+
const defaultProps = { className: continuationTime({ className }) };
|
|
1952
|
+
return useRender({
|
|
1953
|
+
defaultTagName: "time",
|
|
1954
|
+
render,
|
|
1955
|
+
props: mergeProps(defaultProps, props),
|
|
1956
|
+
state: { slot: "message-item-continuation-time" }
|
|
1957
|
+
});
|
|
1958
|
+
}
|
|
1959
|
+
//#endregion
|
|
1960
|
+
//#region src/components/message-item/message-item-content.tsx
|
|
1961
|
+
function MessageItemContent({ className, render, ...props }) {
|
|
1962
|
+
const { content } = messageItem();
|
|
1963
|
+
const defaultProps = { className: content({ className }) };
|
|
1964
|
+
return useRender({
|
|
1965
|
+
defaultTagName: "div",
|
|
1966
|
+
render,
|
|
1967
|
+
props: mergeProps(defaultProps, props),
|
|
1968
|
+
state: { slot: "message-item-content" }
|
|
1969
|
+
});
|
|
1970
|
+
}
|
|
1971
|
+
function MessageItemBody({ className, render, ...props }) {
|
|
1972
|
+
const { body } = messageItem();
|
|
1973
|
+
const defaultProps = { className: body({ className }) };
|
|
1974
|
+
return useRender({
|
|
1975
|
+
defaultTagName: "div",
|
|
1976
|
+
render,
|
|
1977
|
+
props: mergeProps(defaultProps, props),
|
|
1978
|
+
state: { slot: "message-item-body" }
|
|
1979
|
+
});
|
|
1980
|
+
}
|
|
1981
|
+
/**
|
|
1982
|
+
* The edited marker, inline at the end of the message text on every row, full
|
|
1983
|
+
* or continuation. Put it inside the last paragraph so it follows the last
|
|
1984
|
+
* word; pass the copy ("(edited)") as children and the edit time as its tooltip.
|
|
1985
|
+
*/
|
|
1986
|
+
function MessageItemEdited({ className, render, ...props }) {
|
|
1987
|
+
const { edited } = messageItem();
|
|
1988
|
+
const defaultProps = { className: edited({ className }) };
|
|
1989
|
+
return useRender({
|
|
1990
|
+
defaultTagName: "span",
|
|
1991
|
+
render,
|
|
1992
|
+
props: mergeProps(defaultProps, props),
|
|
1993
|
+
state: { slot: "message-item-edited" }
|
|
1994
|
+
});
|
|
1995
|
+
}
|
|
1996
|
+
function MessageItemSearchMatch({ className, render, ...props }) {
|
|
1997
|
+
const { searchMatch } = messageItem();
|
|
1998
|
+
const defaultProps = { className: searchMatch({ className }) };
|
|
1999
|
+
return useRender({
|
|
2000
|
+
defaultTagName: "mark",
|
|
2001
|
+
render,
|
|
2002
|
+
props: mergeProps(defaultProps, props),
|
|
2003
|
+
state: { slot: "message-item-search-match" }
|
|
2004
|
+
});
|
|
2005
|
+
}
|
|
2006
|
+
function MessageItemEmbedded({ className, render, ...props }) {
|
|
2007
|
+
const { embedded } = messageItem();
|
|
2008
|
+
const defaultProps = { className: embedded({ className }) };
|
|
2009
|
+
return useRender({
|
|
2010
|
+
defaultTagName: "div",
|
|
2011
|
+
render,
|
|
2012
|
+
props: mergeProps(defaultProps, props),
|
|
2013
|
+
state: { slot: "message-item-embedded" }
|
|
2014
|
+
});
|
|
2015
|
+
}
|
|
2016
|
+
function MessageItemAttachments({ className, render, ...props }) {
|
|
2017
|
+
const { attachments } = messageItem();
|
|
2018
|
+
const defaultProps = { className: attachments({ className }) };
|
|
2019
|
+
return useRender({
|
|
2020
|
+
defaultTagName: "div",
|
|
2021
|
+
render,
|
|
2022
|
+
props: mergeProps(defaultProps, props),
|
|
2023
|
+
state: { slot: "message-item-attachments" }
|
|
2024
|
+
});
|
|
2025
|
+
}
|
|
2026
|
+
function MessageItemFooter({ className, render, ...props }) {
|
|
2027
|
+
const { footer } = messageItem();
|
|
2028
|
+
const defaultProps = { className: footer({ className }) };
|
|
2029
|
+
return useRender({
|
|
2030
|
+
defaultTagName: "div",
|
|
2031
|
+
render,
|
|
2032
|
+
props: mergeProps(defaultProps, props),
|
|
2033
|
+
state: { slot: "message-item-footer" }
|
|
2034
|
+
});
|
|
2035
|
+
}
|
|
2036
|
+
//#endregion
|
|
2037
|
+
//#region src/components/message-item/message-item-header.tsx
|
|
2038
|
+
function MessageItemHeader({ className, render, ...props }) {
|
|
2039
|
+
const { header } = messageItem();
|
|
2040
|
+
const defaultProps = { className: header({ className }) };
|
|
2041
|
+
return useRender({
|
|
2042
|
+
defaultTagName: "div",
|
|
2043
|
+
render,
|
|
2044
|
+
props: mergeProps(defaultProps, props),
|
|
2045
|
+
state: { slot: "message-item-header" }
|
|
2046
|
+
});
|
|
2047
|
+
}
|
|
2048
|
+
/**
|
|
2049
|
+
* Holds the sender, its badges and its role, and decides who gives way when
|
|
2050
|
+
* the header runs out of room: the role truncates first, then the name. The
|
|
2051
|
+
* badges stay whole beside the name, and the time, outside the group, never
|
|
2052
|
+
* truncates.
|
|
2053
|
+
*/
|
|
2054
|
+
function MessageItemSenderGroup({ className, render, ...props }) {
|
|
2055
|
+
const { senderGroup } = messageItem();
|
|
2056
|
+
const defaultProps = { className: senderGroup({ className }) };
|
|
2057
|
+
return useRender({
|
|
2058
|
+
defaultTagName: "span",
|
|
2059
|
+
render,
|
|
2060
|
+
props: mergeProps(defaultProps, props),
|
|
2061
|
+
state: { slot: "message-item-sender-group" }
|
|
2062
|
+
});
|
|
2063
|
+
}
|
|
2064
|
+
function MessageItemSender({ className, render, ...props }) {
|
|
2065
|
+
const { sender } = messageItem();
|
|
2066
|
+
const defaultProps = { className: sender({ className }) };
|
|
2067
|
+
return useRender({
|
|
2068
|
+
defaultTagName: "span",
|
|
2069
|
+
render,
|
|
2070
|
+
props: mergeProps(defaultProps, props),
|
|
2071
|
+
state: { slot: "message-item-sender" }
|
|
2072
|
+
});
|
|
2073
|
+
}
|
|
2074
|
+
function MessageItemSenderButton({ className, render, ...props }) {
|
|
2075
|
+
const { senderButton } = messageItem();
|
|
2076
|
+
const defaultProps = {
|
|
2077
|
+
type: "button",
|
|
2078
|
+
className: senderButton({ className })
|
|
2079
|
+
};
|
|
2080
|
+
return useRender({
|
|
2081
|
+
defaultTagName: "button",
|
|
2082
|
+
render,
|
|
2083
|
+
props: mergeProps(defaultProps, props),
|
|
2084
|
+
state: { slot: "message-item-sender-button" }
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
function MessageItemSenderBadges({ className, render, ...props }) {
|
|
2088
|
+
const { senderBadges } = messageItem();
|
|
2089
|
+
const defaultProps = { className: senderBadges({ className }) };
|
|
2090
|
+
return useRender({
|
|
2091
|
+
defaultTagName: "span",
|
|
2092
|
+
render,
|
|
2093
|
+
props: mergeProps(defaultProps, props),
|
|
2094
|
+
state: { slot: "message-item-sender-badges" }
|
|
2095
|
+
});
|
|
2096
|
+
}
|
|
2097
|
+
function MessageItemMeta({ className, render, ...props }) {
|
|
2098
|
+
const { meta } = messageItem();
|
|
2099
|
+
const defaultProps = { className: meta({ className }) };
|
|
2100
|
+
return useRender({
|
|
2101
|
+
defaultTagName: "span",
|
|
2102
|
+
render,
|
|
2103
|
+
props: mergeProps(defaultProps, props),
|
|
2104
|
+
state: { slot: "message-item-meta" }
|
|
2105
|
+
});
|
|
2106
|
+
}
|
|
2107
|
+
/**
|
|
2108
|
+
* The message's time, right after the sender. A `<time>`: pass the moment in
|
|
2109
|
+
* `dateTime` (ISO 8601) and the full date and time as its tooltip.
|
|
2110
|
+
*/
|
|
2111
|
+
function MessageItemTime({ className, render, ...props }) {
|
|
2112
|
+
const { time } = messageItem();
|
|
2113
|
+
const defaultProps = { className: time({ className }) };
|
|
2114
|
+
return useRender({
|
|
2115
|
+
defaultTagName: "time",
|
|
2116
|
+
render,
|
|
2117
|
+
props: mergeProps(defaultProps, props),
|
|
2118
|
+
state: { slot: "message-item-time" }
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
2121
|
+
function MessageItemInlineStatus({ className, render, ...props }) {
|
|
2122
|
+
const { inlineStatus } = messageItem();
|
|
2123
|
+
const defaultProps = { className: inlineStatus({ className }) };
|
|
2124
|
+
return useRender({
|
|
2125
|
+
defaultTagName: "span",
|
|
2126
|
+
render,
|
|
2127
|
+
props: mergeProps(defaultProps, props),
|
|
2128
|
+
state: { slot: "message-item-inline-status" }
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
//#endregion
|
|
2132
|
+
//#region src/components/message-item/message-item-delegated.tsx
|
|
2133
|
+
/**
|
|
2134
|
+
* Says an assistant sent the message for its owner, the sender: "sent by
|
|
2135
|
+
* Friday". Put it in `MessageItemHeader` after `MessageItemSenderGroup`, and
|
|
2136
|
+
* the assistant's name in `MessageItemDelegatedByName` or
|
|
2137
|
+
* `MessageItemDelegatedByButton`. The words, and the spaces around the name,
|
|
2138
|
+
* come from the product. It takes at most 45% of the line: past that only
|
|
2139
|
+
* the name truncates, never the words.
|
|
2140
|
+
*/
|
|
2141
|
+
function MessageItemDelegatedBy({ className, render, ...props }) {
|
|
2142
|
+
const { delegatedBy } = messageItem();
|
|
2143
|
+
const defaultProps = { className: delegatedBy({ className }) };
|
|
2144
|
+
return useRender({
|
|
2145
|
+
defaultTagName: "span",
|
|
2146
|
+
render,
|
|
2147
|
+
props: mergeProps(defaultProps, props),
|
|
2148
|
+
state: { slot: "message-item-delegated-by" }
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
/** The assistant's name in `MessageItemDelegatedBy`, the part that truncates. */
|
|
2152
|
+
function MessageItemDelegatedByName({ className, render, ...props }) {
|
|
2153
|
+
const { delegatedByName } = messageItem();
|
|
2154
|
+
const defaultProps = { className: delegatedByName({ className }) };
|
|
2155
|
+
return useRender({
|
|
2156
|
+
defaultTagName: "span",
|
|
2157
|
+
render,
|
|
2158
|
+
props: mergeProps(defaultProps, props),
|
|
2159
|
+
state: { slot: "message-item-delegated-by-name" }
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2162
|
+
/**
|
|
2163
|
+
* The assistant's name when it opens the assistant's profile: a `<button>`
|
|
2164
|
+
* (or a link through `render`) that underlines on hover and truncates like
|
|
2165
|
+
* `MessageItemDelegatedByName`.
|
|
2166
|
+
*/
|
|
2167
|
+
function MessageItemDelegatedByButton({ className, render, ...props }) {
|
|
2168
|
+
const { delegatedByButton } = messageItem();
|
|
2169
|
+
const defaultProps = {
|
|
2170
|
+
type: "button",
|
|
2171
|
+
className: delegatedByButton({ className })
|
|
2172
|
+
};
|
|
2173
|
+
return useRender({
|
|
2174
|
+
defaultTagName: "button",
|
|
2175
|
+
render,
|
|
2176
|
+
props: mergeProps(defaultProps, props),
|
|
2177
|
+
state: { slot: "message-item-delegated-by-button" }
|
|
2178
|
+
});
|
|
2179
|
+
}
|
|
2180
|
+
/**
|
|
2181
|
+
* The assistant's face on its owner's avatar, in the corner a presence light
|
|
2182
|
+
* takes: put it inside the owner's `md` `Avatar` with a `2xs` agent `Avatar`
|
|
2183
|
+
* as its child. It is hidden from assistive technology, because
|
|
2184
|
+
* `MessageItemDelegatedBy` already says who sent the message. Only on a
|
|
2185
|
+
* person's avatar: an agent's corner is its presence light.
|
|
2186
|
+
*/
|
|
2187
|
+
function MessageItemDelegatedAvatar({ className, deleted, ...props }) {
|
|
2188
|
+
const { delegatedAvatar } = messageItem();
|
|
2189
|
+
return /* @__PURE__ */ jsx(AvatarBadge, {
|
|
2190
|
+
"aria-hidden": true,
|
|
2191
|
+
"data-deleted": deleted ? "" : void 0,
|
|
2192
|
+
className: delegatedAvatar({ className }),
|
|
2193
|
+
render: /* @__PURE__ */ jsx("span", {}),
|
|
2194
|
+
...props
|
|
2195
|
+
});
|
|
2196
|
+
}
|
|
2197
|
+
//#endregion
|
|
2198
|
+
//#region src/components/message-item/message-item-toolbar.tsx
|
|
2199
|
+
function MessageItemToolbar({ className, render, ...props }) {
|
|
2200
|
+
const { toolbar } = messageItem();
|
|
2201
|
+
const defaultProps = { className: toolbar({ className }) };
|
|
2202
|
+
return useRender({
|
|
2203
|
+
defaultTagName: "div",
|
|
2204
|
+
render,
|
|
2205
|
+
props: mergeProps(defaultProps, props),
|
|
2206
|
+
state: { slot: "message-item-toolbar" }
|
|
2207
|
+
});
|
|
2208
|
+
}
|
|
2209
|
+
function MessageItemToolbarButton({ active = false, className, render, ...props }) {
|
|
2210
|
+
const { toolbarButton } = messageItem();
|
|
2211
|
+
const defaultProps = {
|
|
2212
|
+
type: "button",
|
|
2213
|
+
"data-active": active ? "true" : void 0,
|
|
2214
|
+
className: toolbarButton({ className })
|
|
2215
|
+
};
|
|
2216
|
+
return useRender({
|
|
2217
|
+
defaultTagName: "button",
|
|
2218
|
+
render,
|
|
2219
|
+
props: mergeProps(defaultProps, props),
|
|
2220
|
+
state: { slot: "message-item-toolbar-button" }
|
|
2221
|
+
});
|
|
2222
|
+
}
|
|
2223
|
+
//#endregion
|
|
2224
|
+
//#region src/components/message-item/message-footer.recipe.ts
|
|
2225
|
+
const messageFooter = tv$1({
|
|
2226
|
+
slots: {
|
|
2227
|
+
savedIndicator: [
|
|
2228
|
+
"inline-flex min-w-0 max-w-full items-center gap-1 overflow-hidden whitespace-nowrap select-none",
|
|
2229
|
+
"[&_svg]:shrink-0",
|
|
2230
|
+
"h-[22px] rounded-chip px-1.5",
|
|
2231
|
+
"text-caption font-semibold text-foreground-muted",
|
|
2232
|
+
"bg-fill-muted hover:press-overlay active:press-overlay",
|
|
2233
|
+
"outline-none focus-visible:shadow-focus",
|
|
2234
|
+
"[&_svg]:size-3.5 [&_svg]:text-foreground"
|
|
2235
|
+
],
|
|
2236
|
+
readReceipt: [
|
|
2237
|
+
"ml-auto inline-flex shrink-0 items-center gap-1 whitespace-nowrap",
|
|
2238
|
+
"[&_svg]:shrink-0",
|
|
2239
|
+
"h-[22px] font-mono text-mono-meta text-foreground-hint [&_svg]:size-3"
|
|
2240
|
+
],
|
|
2241
|
+
badge: [
|
|
2242
|
+
"inline-flex min-w-0 max-w-full items-center overflow-hidden whitespace-nowrap select-none",
|
|
2243
|
+
"transition-colors [&_svg]:shrink-0",
|
|
2244
|
+
"h-6 gap-1 rounded-chip border-0 px-2 shadow-none",
|
|
2245
|
+
"text-footnote font-bold text-foreground-muted",
|
|
2246
|
+
"bg-fill-muted hover:press-overlay active:press-overlay",
|
|
2247
|
+
"[&_svg]:size-3.5"
|
|
2248
|
+
],
|
|
2249
|
+
badgeSeparator: ["text-foreground/45"]
|
|
2250
|
+
},
|
|
2251
|
+
variants: {
|
|
2252
|
+
badgeStatus: {
|
|
2253
|
+
read: {},
|
|
2254
|
+
unread: { badge: ["text-foreground"] }
|
|
2255
|
+
},
|
|
2256
|
+
iconOnly: {
|
|
2257
|
+
true: { savedIndicator: [
|
|
2258
|
+
"justify-center p-0",
|
|
2259
|
+
"size-8 rounded-control bg-transparent",
|
|
2260
|
+
"[&_svg]:size-[18px] [&_svg]:text-foreground-muted"
|
|
2261
|
+
] },
|
|
2262
|
+
false: {}
|
|
2263
|
+
}
|
|
2264
|
+
},
|
|
2265
|
+
defaultVariants: { iconOnly: false }
|
|
2266
|
+
});
|
|
2267
|
+
//#endregion
|
|
2268
|
+
//#region src/components/message-item/message-footer.tsx
|
|
2269
|
+
function MessageItemBadge({ className, status = "read", ...props }) {
|
|
2270
|
+
const { badge } = messageFooter({ badgeStatus: status });
|
|
2271
|
+
return /* @__PURE__ */ jsx(Badge, {
|
|
2272
|
+
appearance: "soft",
|
|
2273
|
+
"data-slot": "message-item-badge",
|
|
2274
|
+
variant: "muted",
|
|
2275
|
+
className: badge({ className }),
|
|
2276
|
+
...props
|
|
2277
|
+
});
|
|
2278
|
+
}
|
|
2279
|
+
function MessageItemBadgeSeparator({ className, render, ...props }) {
|
|
2280
|
+
const { badgeSeparator } = messageFooter();
|
|
2281
|
+
const defaultProps = {
|
|
2282
|
+
"aria-hidden": true,
|
|
2283
|
+
className: badgeSeparator({ className })
|
|
2284
|
+
};
|
|
2285
|
+
return useRender({
|
|
2286
|
+
defaultTagName: "span",
|
|
2287
|
+
render,
|
|
2288
|
+
props: mergeProps(defaultProps, props),
|
|
2289
|
+
state: { slot: "message-item-badge-separator" }
|
|
2290
|
+
});
|
|
2291
|
+
}
|
|
2292
|
+
function MessageItemSavedIndicator({ className, iconOnly = false, render, ...props }) {
|
|
2293
|
+
const { savedIndicator } = messageFooter({ iconOnly });
|
|
2294
|
+
const defaultProps = {
|
|
2295
|
+
...iconOnly ? { "data-icon-only": "" } : {},
|
|
2296
|
+
className: savedIndicator({ className })
|
|
2297
|
+
};
|
|
2298
|
+
return useRender({
|
|
2299
|
+
defaultTagName: "span",
|
|
2300
|
+
render,
|
|
2301
|
+
props: mergeProps(defaultProps, props),
|
|
2302
|
+
state: { slot: "message-item-saved-indicator" }
|
|
2303
|
+
});
|
|
2304
|
+
}
|
|
2305
|
+
function MessageItemReadReceipt({ className, render, ...props }) {
|
|
2306
|
+
const { readReceipt } = messageFooter();
|
|
2307
|
+
const defaultProps = { className: readReceipt({ className }) };
|
|
2308
|
+
return useRender({
|
|
2309
|
+
defaultTagName: "span",
|
|
2310
|
+
render,
|
|
2311
|
+
props: mergeProps(defaultProps, props),
|
|
2312
|
+
state: { slot: "message-item-read-receipt" }
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
//#endregion
|
|
2316
|
+
//#region src/components/message-item/message-reaction.recipe.ts
|
|
2317
|
+
const reactionCountKeyframes = [
|
|
2318
|
+
{
|
|
2319
|
+
opacity: .7,
|
|
2320
|
+
transform: "translateY(1px) scale(0.92)",
|
|
2321
|
+
offset: 0
|
|
2322
|
+
},
|
|
2323
|
+
{
|
|
2324
|
+
opacity: 1,
|
|
2325
|
+
transform: "translateY(-1px) scale(1.16)",
|
|
2326
|
+
offset: .45
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
opacity: 1,
|
|
2330
|
+
transform: "translateY(0) scale(1)",
|
|
2331
|
+
offset: 1
|
|
2332
|
+
}
|
|
2333
|
+
];
|
|
2334
|
+
const reactionCountTiming = {
|
|
2335
|
+
duration: 180,
|
|
2336
|
+
easing: "cubic-bezier(0.2, 0, 0.2, 1)"
|
|
2337
|
+
};
|
|
2338
|
+
const messageReaction = tv$1({ slots: {
|
|
2339
|
+
chip: [
|
|
2340
|
+
"inline-flex min-w-0 max-w-full items-center overflow-hidden whitespace-nowrap",
|
|
2341
|
+
"transition-colors",
|
|
2342
|
+
"h-6 gap-1 rounded-chip pr-2 pl-1.5 text-callout text-foreground",
|
|
2343
|
+
"bg-fill-muted hover:press-overlay active:press-overlay",
|
|
2344
|
+
"data-pressed:bg-attention-soft",
|
|
2345
|
+
"has-data-[slot=message-reaction-error-indicator]:bg-warning-soft",
|
|
2346
|
+
"outline-none focus-visible:shadow-focus",
|
|
2347
|
+
"[&_[data-slot=message-reaction-glyph]>svg]:size-4"
|
|
2348
|
+
],
|
|
2349
|
+
errorIndicator: ["sr-only"],
|
|
2350
|
+
glyph: ["inline-flex items-center justify-center leading-none", "[&>svg]:size-[13px] [&>svg]:shrink-0"],
|
|
2351
|
+
count: ["inline-block origin-center font-mono tabular-nums", "text-mono-meta font-bold"],
|
|
2352
|
+
addButton: [
|
|
2353
|
+
"inline-flex min-w-0 items-center justify-center",
|
|
2354
|
+
"transition-colors",
|
|
2355
|
+
"[&_svg]:shrink-0",
|
|
2356
|
+
"h-6 rounded-chip px-1.5 [&_svg]:size-4",
|
|
2357
|
+
"bg-fill-muted text-foreground-muted hover:press-overlay active:press-overlay",
|
|
2358
|
+
"outline-none focus-visible:shadow-focus"
|
|
2359
|
+
],
|
|
2360
|
+
quickRow: [
|
|
2361
|
+
"flex shrink-0 items-center",
|
|
2362
|
+
"justify-between gap-0.5 bg-layer-popover px-0.5 py-0.5",
|
|
2363
|
+
"[&>[role=menuitem]]:size-9 [&>[role=menuitem]]:p-0 *:[[role=menuitem]]:justify-center"
|
|
2364
|
+
],
|
|
2365
|
+
quickButton: [
|
|
2366
|
+
"flex items-center justify-center",
|
|
2367
|
+
"bg-transparent transition-colors",
|
|
2368
|
+
"size-9 rounded-control p-0 text-xl leading-none text-foreground-muted",
|
|
2369
|
+
"hover:bg-brand-soft data-highlighted:bg-brand-soft active:bg-brand-soft",
|
|
2370
|
+
"outline-none focus-visible:shadow-focus"
|
|
2371
|
+
],
|
|
2372
|
+
pickerContent: [
|
|
2373
|
+
"inline-flex items-center",
|
|
2374
|
+
"min-w-0 flex-row gap-0.5 p-1",
|
|
2375
|
+
"[&>[role=menuitem]]:size-9 [&>[role=menuitem]]:p-0"
|
|
2376
|
+
],
|
|
2377
|
+
pickerStatic: [
|
|
2378
|
+
"inline-flex items-center",
|
|
2379
|
+
"min-w-0 flex-row gap-0.5 rounded-container p-1",
|
|
2380
|
+
"bg-layer-popover ring-1 ring-line-seam shadow-float outline-none"
|
|
2381
|
+
],
|
|
2382
|
+
tooltip: ["inline-block max-w-[280px]", "px-2.5 py-1 text-footnote font-medium"],
|
|
2383
|
+
tooltipNames: ["flex max-w-60 flex-wrap items-center gap-y-0.5"],
|
|
2384
|
+
tooltipName: ["inline-flex min-w-0 items-baseline leading-5"],
|
|
2385
|
+
tooltipNameText: ["max-w-28 truncate"],
|
|
2386
|
+
tooltipSeparator: ["shrink-0", "text-foreground-on-hud/70"],
|
|
2387
|
+
tooltipMeta: ["leading-5", "text-foreground-on-hud/70"]
|
|
2388
|
+
} });
|
|
2389
|
+
//#endregion
|
|
2390
|
+
//#region src/components/message-item/message-reaction.tsx
|
|
2391
|
+
function MessageReactionChip({ className, ...props }) {
|
|
2392
|
+
const { chip } = messageReaction();
|
|
2393
|
+
return /* @__PURE__ */ jsx(Toggle, {
|
|
2394
|
+
...props,
|
|
2395
|
+
type: "button",
|
|
2396
|
+
"data-slot": "message-reaction-chip",
|
|
2397
|
+
className: chip({ className })
|
|
2398
|
+
});
|
|
2399
|
+
}
|
|
2400
|
+
function MessageReactionErrorIndicator({ className, render, ...props }) {
|
|
2401
|
+
const { errorIndicator } = messageReaction();
|
|
2402
|
+
const defaultProps = {
|
|
2403
|
+
className: errorIndicator({ className }),
|
|
2404
|
+
role: "status"
|
|
2405
|
+
};
|
|
2406
|
+
return useRender({
|
|
2407
|
+
defaultTagName: "span",
|
|
2408
|
+
render,
|
|
2409
|
+
props: mergeProps(defaultProps, props),
|
|
2410
|
+
state: { slot: "message-reaction-error-indicator" }
|
|
2411
|
+
});
|
|
2412
|
+
}
|
|
2413
|
+
function MessageReactionGlyph({ className, render, ...props }) {
|
|
2414
|
+
const { glyph: glyphSlot } = messageReaction();
|
|
2415
|
+
const defaultProps = { className: glyphSlot({ className }) };
|
|
2416
|
+
return useRender({
|
|
2417
|
+
defaultTagName: "span",
|
|
2418
|
+
render,
|
|
2419
|
+
props: mergeProps(defaultProps, props),
|
|
2420
|
+
state: { slot: "message-reaction-glyph" }
|
|
2421
|
+
});
|
|
2422
|
+
}
|
|
2423
|
+
function MessageReactionCount({ children, className, render, ...props }) {
|
|
2424
|
+
const elementRef = useRef(null);
|
|
2425
|
+
const value = typeof children === "number" && Number.isFinite(children) ? children : null;
|
|
2426
|
+
const previousValue = useRef(value);
|
|
2427
|
+
useEffect(() => {
|
|
2428
|
+
const previous = previousValue.current;
|
|
2429
|
+
previousValue.current = value;
|
|
2430
|
+
if (value === null || previous === null || value === previous) return;
|
|
2431
|
+
const element = elementRef.current;
|
|
2432
|
+
const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
2433
|
+
if (!element?.animate || reducedMotion.matches) return;
|
|
2434
|
+
const animation = element.animate(reactionCountKeyframes, reactionCountTiming);
|
|
2435
|
+
const handleMotionChange = () => {
|
|
2436
|
+
if (reducedMotion.matches) animation.cancel();
|
|
2437
|
+
};
|
|
2438
|
+
reducedMotion.addEventListener("change", handleMotionChange);
|
|
2439
|
+
return () => {
|
|
2440
|
+
animation.cancel();
|
|
2441
|
+
reducedMotion.removeEventListener("change", handleMotionChange);
|
|
2442
|
+
};
|
|
2443
|
+
}, [value]);
|
|
2444
|
+
const { count } = messageReaction();
|
|
2445
|
+
const defaultProps = {
|
|
2446
|
+
className: count({ className }),
|
|
2447
|
+
children,
|
|
2448
|
+
ref: elementRef
|
|
2449
|
+
};
|
|
2450
|
+
return useRender({
|
|
2451
|
+
defaultTagName: "span",
|
|
2452
|
+
render,
|
|
2453
|
+
props: mergeProps(defaultProps, props),
|
|
2454
|
+
state: { slot: "message-reaction-count" }
|
|
2455
|
+
});
|
|
2456
|
+
}
|
|
2457
|
+
function MessageReactionAddButton({ className, render, ...props }) {
|
|
2458
|
+
const { addButton } = messageReaction();
|
|
2459
|
+
const defaultProps = {
|
|
2460
|
+
type: "button",
|
|
2461
|
+
className: addButton({ className })
|
|
2462
|
+
};
|
|
2463
|
+
return useRender({
|
|
2464
|
+
defaultTagName: "button",
|
|
2465
|
+
render,
|
|
2466
|
+
props: mergeProps(defaultProps, props),
|
|
2467
|
+
state: { slot: "message-reaction-add-button" }
|
|
2468
|
+
});
|
|
2469
|
+
}
|
|
2470
|
+
function MessageReactionQuickRow({ className, render, ...props }) {
|
|
2471
|
+
const { quickRow } = messageReaction();
|
|
2472
|
+
const defaultProps = { className: quickRow({ className }) };
|
|
2473
|
+
return useRender({
|
|
2474
|
+
defaultTagName: "div",
|
|
2475
|
+
render,
|
|
2476
|
+
props: mergeProps(defaultProps, props),
|
|
2477
|
+
state: { slot: "message-reaction-quick-row" }
|
|
2478
|
+
});
|
|
2479
|
+
}
|
|
2480
|
+
function MessageReactionQuickButton({ className, render, ...props }) {
|
|
2481
|
+
const { quickButton } = messageReaction();
|
|
2482
|
+
const defaultProps = {
|
|
2483
|
+
type: "button",
|
|
2484
|
+
className: quickButton({ className })
|
|
2485
|
+
};
|
|
2486
|
+
return useRender({
|
|
2487
|
+
defaultTagName: "button",
|
|
2488
|
+
render,
|
|
2489
|
+
props: mergeProps(defaultProps, props),
|
|
2490
|
+
state: { slot: "message-reaction-quick-button" }
|
|
2491
|
+
});
|
|
2492
|
+
}
|
|
2493
|
+
function MessageReactionPickerStatic({ className, render, ...props }) {
|
|
2494
|
+
const { pickerStatic } = messageReaction();
|
|
2495
|
+
const defaultProps = { className: pickerStatic({ className }) };
|
|
2496
|
+
return useRender({
|
|
2497
|
+
defaultTagName: "div",
|
|
2498
|
+
render,
|
|
2499
|
+
props: mergeProps(defaultProps, props),
|
|
2500
|
+
state: { slot: "message-reaction-picker-static" }
|
|
2501
|
+
});
|
|
2502
|
+
}
|
|
2503
|
+
function MessageReactionPickerContent({ className, ...props }) {
|
|
2504
|
+
const { pickerContent } = messageReaction();
|
|
2505
|
+
return /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
2506
|
+
"data-slot": "message-reaction-picker",
|
|
2507
|
+
className: pickerContent({ className }),
|
|
2508
|
+
...props
|
|
2509
|
+
});
|
|
2510
|
+
}
|
|
2511
|
+
function MessageReactionTooltipContent({ className, ...props }) {
|
|
2512
|
+
const { tooltip } = messageReaction();
|
|
2513
|
+
return /* @__PURE__ */ jsx(TooltipContent, {
|
|
2514
|
+
className: tooltip({ className }),
|
|
2515
|
+
...props
|
|
2516
|
+
});
|
|
2517
|
+
}
|
|
2518
|
+
function MessageReactionTooltipNames({ className, render, ...props }) {
|
|
2519
|
+
const { tooltipNames } = messageReaction();
|
|
2520
|
+
const defaultProps = { className: tooltipNames({ className }) };
|
|
2521
|
+
return useRender({
|
|
2522
|
+
defaultTagName: "span",
|
|
2523
|
+
render,
|
|
2524
|
+
props: mergeProps(defaultProps, props),
|
|
2525
|
+
state: { slot: "message-reaction-tooltip-names" }
|
|
2526
|
+
});
|
|
2527
|
+
}
|
|
2528
|
+
function MessageReactionTooltipName({ className, render, ...props }) {
|
|
2529
|
+
const { tooltipName } = messageReaction();
|
|
2530
|
+
const defaultProps = { className: tooltipName({ className }) };
|
|
2531
|
+
return useRender({
|
|
2532
|
+
defaultTagName: "span",
|
|
2533
|
+
render,
|
|
2534
|
+
props: mergeProps(defaultProps, props),
|
|
2535
|
+
state: { slot: "message-reaction-tooltip-name" }
|
|
2536
|
+
});
|
|
2537
|
+
}
|
|
2538
|
+
function MessageReactionTooltipNameText({ className, render, ...props }) {
|
|
2539
|
+
const { tooltipNameText } = messageReaction();
|
|
2540
|
+
const defaultProps = { className: tooltipNameText({ className }) };
|
|
2541
|
+
return useRender({
|
|
2542
|
+
defaultTagName: "span",
|
|
2543
|
+
render,
|
|
2544
|
+
props: mergeProps(defaultProps, props),
|
|
2545
|
+
state: { slot: "message-reaction-tooltip-name-text" }
|
|
2546
|
+
});
|
|
2547
|
+
}
|
|
2548
|
+
function MessageReactionTooltipSeparator({ className, render, ...props }) {
|
|
2549
|
+
const { tooltipSeparator } = messageReaction();
|
|
2550
|
+
const defaultProps = { className: tooltipSeparator({ className }) };
|
|
2551
|
+
return useRender({
|
|
2552
|
+
defaultTagName: "span",
|
|
2553
|
+
render,
|
|
2554
|
+
props: mergeProps(defaultProps, props),
|
|
2555
|
+
state: { slot: "message-reaction-tooltip-separator" }
|
|
2556
|
+
});
|
|
2557
|
+
}
|
|
2558
|
+
function MessageReactionTooltipMeta({ className, render, ...props }) {
|
|
2559
|
+
const { tooltipMeta } = messageReaction();
|
|
2560
|
+
const defaultProps = { className: tooltipMeta({ className }) };
|
|
2561
|
+
return useRender({
|
|
2562
|
+
defaultTagName: "span",
|
|
2563
|
+
render,
|
|
2564
|
+
props: mergeProps(defaultProps, props),
|
|
2565
|
+
state: { slot: "message-reaction-tooltip-meta" }
|
|
2566
|
+
});
|
|
2567
|
+
}
|
|
2568
|
+
//#endregion
|
|
2569
|
+
//#region src/components/message-item/message-reference.recipe.ts
|
|
2570
|
+
const chip = (fill) => [
|
|
2571
|
+
"items-baseline gap-0.5 rounded-sticker px-1.5 py-px has-[>svg]:pl-[3px]",
|
|
2572
|
+
"[font-size:0.875em] leading-5 font-semibold",
|
|
2573
|
+
"[&_svg]:size-3.5 [&_svg]:text-foreground-muted",
|
|
2574
|
+
fill
|
|
2575
|
+
];
|
|
2576
|
+
const linkChip = (fill) => [...chip(fill), "text-foreground cursor-pointer hover:press-overlay active:press-overlay"];
|
|
2577
|
+
const messageReference = tv$1({
|
|
2578
|
+
slots: {
|
|
2579
|
+
root: [
|
|
2580
|
+
"inline-flex items-baseline gap-1",
|
|
2581
|
+
"py-0 align-baseline",
|
|
2582
|
+
"[font-size:inherit] leading-[1.2em]",
|
|
2583
|
+
"max-w-full truncate select-text no-underline",
|
|
2584
|
+
"outline-none focus-visible:shadow-focus",
|
|
2585
|
+
"[&_svg]:size-[0.857em] [&_svg]:shrink-0 [&_svg]:self-center",
|
|
2586
|
+
"has-[>[data-slot=message-reference-indicator]]:relative has-[>[data-slot=message-reference-indicator]]:mr-2",
|
|
2587
|
+
"has-[>[data-slot=message-reference-indicator]]:inline-block",
|
|
2588
|
+
"has-[>[data-slot=message-reference-indicator]]:overflow-visible"
|
|
2589
|
+
],
|
|
2590
|
+
chipLabel: "min-w-0 truncate",
|
|
2591
|
+
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"]
|
|
2592
|
+
},
|
|
2593
|
+
variants: { variant: {
|
|
2594
|
+
primary: { root: [
|
|
2595
|
+
"inline-flex cursor-pointer rounded-sticker px-[3px]",
|
|
2596
|
+
"font-semibold text-sticker-ink no-underline",
|
|
2597
|
+
"bg-brand inset-ring-[1.5px] inset-ring-sticker-ink ring-[1.5px] ring-sticker-edge",
|
|
2598
|
+
"hover:press-overlay-sticker"
|
|
2599
|
+
] },
|
|
2600
|
+
secondary: { root: ["inline cursor-pointer font-bold text-foreground", "decoration-foreground decoration-[1.5px] underline-offset-[3px] hover:underline"] },
|
|
2601
|
+
accent: { root: linkChip("bg-attention-soft") },
|
|
2602
|
+
muted: { root: linkChip("bg-inactive-soft") },
|
|
2603
|
+
info: { root: linkChip("bg-info-soft") },
|
|
2604
|
+
link: { root: linkChip("bg-info-soft") },
|
|
2605
|
+
pending: { root: chip("cursor-wait bg-inactive-soft text-foreground-muted") },
|
|
2606
|
+
unavailable: { root: chip("cursor-default bg-inactive-soft text-foreground-hint") }
|
|
2607
|
+
} },
|
|
2608
|
+
defaultVariants: { variant: "muted" }
|
|
2609
|
+
});
|
|
2610
|
+
//#endregion
|
|
2611
|
+
//#region src/components/message-item/message-reference.tsx
|
|
2612
|
+
function useReferenceRender(className, render, props) {
|
|
2613
|
+
return useRender({
|
|
2614
|
+
defaultTagName: "span",
|
|
2615
|
+
render,
|
|
2616
|
+
props: mergeProps({ className }, props),
|
|
2617
|
+
state: { slot: "message-reference" }
|
|
2618
|
+
});
|
|
2619
|
+
}
|
|
2620
|
+
function MessageReferenceText({ className, render, variant = "secondary", ...props }) {
|
|
2621
|
+
const { root } = messageReference({ variant });
|
|
2622
|
+
return useReferenceRender(root({ className }), render, props);
|
|
2623
|
+
}
|
|
2624
|
+
function MessageReferenceIndicator({ className, render, ...props }) {
|
|
2625
|
+
const { indicator } = messageReference();
|
|
2626
|
+
const defaultProps = { className: indicator({ className }) };
|
|
2627
|
+
return useRender({
|
|
2628
|
+
defaultTagName: "span",
|
|
2629
|
+
render,
|
|
2630
|
+
props: mergeProps(defaultProps, props),
|
|
2631
|
+
state: { slot: "message-reference-indicator" }
|
|
2632
|
+
});
|
|
2633
|
+
}
|
|
2634
|
+
function MessageReferenceChip({ className, render, variant = "muted", ...props }) {
|
|
2635
|
+
const { root } = messageReference({ variant });
|
|
2636
|
+
return useReferenceRender(root({ className }), render, props);
|
|
2637
|
+
}
|
|
2638
|
+
function MessageReferenceLabel({ className, render, ...props }) {
|
|
2639
|
+
const { chipLabel } = messageReference();
|
|
2640
|
+
const defaultProps = { className: chipLabel({ className }) };
|
|
2641
|
+
return useRender({
|
|
2642
|
+
defaultTagName: "span",
|
|
2643
|
+
render,
|
|
2644
|
+
props: mergeProps(defaultProps, props),
|
|
2645
|
+
state: { slot: "message-reference-label" }
|
|
2646
|
+
});
|
|
2647
|
+
}
|
|
2648
|
+
function MessageReferencePending({ className, render, ...props }) {
|
|
2649
|
+
const { root } = messageReference({ variant: "pending" });
|
|
2650
|
+
return useReferenceRender(root({ className }), render, props);
|
|
2651
|
+
}
|
|
2652
|
+
function MessageReferenceUnavailable({ className, render, ...props }) {
|
|
2653
|
+
const { root } = messageReference({ variant: "unavailable" });
|
|
2654
|
+
return useReferenceRender(root({ className }), render, props);
|
|
2655
|
+
}
|
|
2656
|
+
//#endregion
|
|
2657
|
+
//#region src/components/message-item/message-multi-select.recipe.ts
|
|
2658
|
+
const messageMultiSelect = tv$1({ slots: {
|
|
2659
|
+
root: ["flex min-h-0 min-w-0 flex-1 flex-col"],
|
|
2660
|
+
checkbox: [
|
|
2661
|
+
"self-start",
|
|
2662
|
+
"data-checked:shadow-none data-indeterminate:shadow-none",
|
|
2663
|
+
"hover:data-checked:shadow-none hover:data-indeterminate:shadow-none",
|
|
2664
|
+
"mt-2 rounded-sticker"
|
|
2665
|
+
],
|
|
2666
|
+
toolbar: [
|
|
2667
|
+
"flex items-center",
|
|
2668
|
+
"gap-2 rounded-container px-2.5 py-2",
|
|
2669
|
+
"bg-layer-popover ring-1 ring-line-seam shadow-float"
|
|
2670
|
+
]
|
|
2671
|
+
} });
|
|
2672
|
+
//#endregion
|
|
2673
|
+
//#region src/components/message-item/message-multi-select.tsx
|
|
2674
|
+
function MessageMultiSelect({ className, render, ...props }) {
|
|
2675
|
+
const { root } = messageMultiSelect();
|
|
2676
|
+
const defaultProps = { className: root({ className }) };
|
|
2677
|
+
return useRender({
|
|
2678
|
+
defaultTagName: "div",
|
|
2679
|
+
render,
|
|
2680
|
+
props: mergeProps(defaultProps, props),
|
|
2681
|
+
state: { slot: "message-multi-select" }
|
|
2682
|
+
});
|
|
2683
|
+
}
|
|
2684
|
+
/** Shared select-mode toolbar shell. Consumers compose the count and actions as children. */
|
|
2685
|
+
function MessageMultiSelectToolbar({ className, render, ...props }) {
|
|
2686
|
+
const { toolbar } = messageMultiSelect();
|
|
2687
|
+
const defaultProps = { className: toolbar({ className }) };
|
|
2688
|
+
return useRender({
|
|
2689
|
+
defaultTagName: "div",
|
|
2690
|
+
render,
|
|
2691
|
+
props: mergeProps(defaultProps, props),
|
|
2692
|
+
state: { slot: "message-multi-select-toolbar" }
|
|
2693
|
+
});
|
|
2694
|
+
}
|
|
2695
|
+
function MessageMultiSelectCheckbox({ className, ...props }) {
|
|
2696
|
+
const { checkbox } = messageMultiSelect();
|
|
2697
|
+
return /* @__PURE__ */ jsx(Checkbox$1, {
|
|
2698
|
+
"data-slot": "message-multi-select-checkbox",
|
|
2699
|
+
className: checkbox({ className }),
|
|
2700
|
+
shape: "square",
|
|
2701
|
+
...props
|
|
2702
|
+
});
|
|
2703
|
+
}
|
|
2704
|
+
//#endregion
|
|
2705
|
+
//#region src/components/message-item/message-text-selection-toolbar.recipe.ts
|
|
2706
|
+
const messageTextSelectionToolbar = tv$1({ slots: {
|
|
2707
|
+
toolbar: [
|
|
2708
|
+
"flex min-w-0 items-center select-none",
|
|
2709
|
+
"gap-0.5 overflow-visible rounded-container p-0.5 text-control font-bold",
|
|
2710
|
+
"bg-layer-popover ring-1 ring-line-seam ring-inset shadow-float"
|
|
2711
|
+
],
|
|
2712
|
+
button: [
|
|
2713
|
+
"flex shrink-0 items-center gap-1.5 outline-none transition-colors",
|
|
2714
|
+
"h-7 rounded-control px-2.5 whitespace-nowrap text-foreground",
|
|
2715
|
+
"hover:bg-fill-pressed active:bg-fill-pressed",
|
|
2716
|
+
"focus-visible:shadow-focus",
|
|
2717
|
+
"[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-foreground-muted"
|
|
2718
|
+
],
|
|
2719
|
+
separator: ["w-px shrink-0", "mx-0.5 h-5 bg-line-hairline"]
|
|
2720
|
+
} });
|
|
2721
|
+
//#endregion
|
|
2722
|
+
//#region src/components/message-item/message-text-selection-toolbar.tsx
|
|
2723
|
+
function MessageTextSelectionToolbar({ className, ...props }) {
|
|
2724
|
+
const { toolbar } = messageTextSelectionToolbar();
|
|
2725
|
+
return /* @__PURE__ */ jsx(Toolbar.Root, {
|
|
2726
|
+
"data-slot": "message-text-selection-toolbar",
|
|
2727
|
+
className: toolbar({ className }),
|
|
2728
|
+
...props
|
|
2729
|
+
});
|
|
2730
|
+
}
|
|
2731
|
+
function MessageTextSelectionToolbarButton({ className, ...props }) {
|
|
2732
|
+
const { button } = messageTextSelectionToolbar();
|
|
2733
|
+
return /* @__PURE__ */ jsx(Toolbar.Button, {
|
|
2734
|
+
"data-slot": "message-text-selection-toolbar-button",
|
|
2735
|
+
type: "button",
|
|
2736
|
+
className: button({ className }),
|
|
2737
|
+
...props
|
|
2738
|
+
});
|
|
2739
|
+
}
|
|
2740
|
+
function MessageTextSelectionToolbarSeparator({ className, ...props }) {
|
|
2741
|
+
const { separator } = messageTextSelectionToolbar();
|
|
2742
|
+
return /* @__PURE__ */ jsx(Toolbar.Separator, {
|
|
2743
|
+
"data-slot": "message-text-selection-toolbar-separator",
|
|
2744
|
+
className: separator({ className }),
|
|
2745
|
+
...props
|
|
2746
|
+
});
|
|
2747
|
+
}
|
|
2748
|
+
//#endregion
|
|
2749
|
+
//#region src/components/message-embed/message-embed.recipe.ts
|
|
2750
|
+
const messageEmbed = tv$1({ slots: {
|
|
2751
|
+
root: [
|
|
2752
|
+
"group block min-w-0 text-left",
|
|
2753
|
+
"rounded-container border border-line-hairline bg-layer-card",
|
|
2754
|
+
"outline-none focus-visible:shadow-focus"
|
|
2755
|
+
],
|
|
2756
|
+
header: ["min-w-0", "px-3 py-2"],
|
|
2757
|
+
content: ["min-w-0"],
|
|
2758
|
+
footer: ["min-w-0", "px-3 py-2"]
|
|
2759
|
+
} });
|
|
2760
|
+
//#endregion
|
|
2761
|
+
//#region src/components/message-embed/message-embed.tsx
|
|
2762
|
+
function MessageEmbed({ className, render, ...props }) {
|
|
2763
|
+
const { root } = messageEmbed();
|
|
2764
|
+
return useRender({
|
|
2765
|
+
defaultTagName: "div",
|
|
2766
|
+
render,
|
|
2767
|
+
props: mergeProps({ className: root({ className }) }, props),
|
|
2768
|
+
state: { slot: "message-embed" }
|
|
2769
|
+
});
|
|
2770
|
+
}
|
|
2771
|
+
function MessageEmbedHeader({ className, render, ...props }) {
|
|
2772
|
+
const { header } = messageEmbed();
|
|
2773
|
+
return useRender({
|
|
2774
|
+
defaultTagName: "div",
|
|
2775
|
+
render,
|
|
2776
|
+
props: mergeProps({ className: header({ className }) }, props),
|
|
2777
|
+
state: { slot: "message-embed-header" }
|
|
2778
|
+
});
|
|
2779
|
+
}
|
|
2780
|
+
function MessageEmbedContent({ className, render, ...props }) {
|
|
2781
|
+
const { content } = messageEmbed();
|
|
2782
|
+
return useRender({
|
|
2783
|
+
defaultTagName: "div",
|
|
2784
|
+
render,
|
|
2785
|
+
props: mergeProps({ className: content({ className }) }, props),
|
|
2786
|
+
state: { slot: "message-embed-content" }
|
|
2787
|
+
});
|
|
2788
|
+
}
|
|
2789
|
+
function MessageEmbedFooter({ className, render, ...props }) {
|
|
2790
|
+
const { footer } = messageEmbed();
|
|
2791
|
+
return useRender({
|
|
2792
|
+
defaultTagName: "div",
|
|
2793
|
+
render,
|
|
2794
|
+
props: mergeProps({ className: footer({ className }) }, props),
|
|
2795
|
+
state: { slot: "message-embed-footer" }
|
|
2796
|
+
});
|
|
2797
|
+
}
|
|
2798
|
+
//#endregion
|
|
2799
|
+
//#region src/components/message-quoted-preview/message-quoted-preview.recipe.ts
|
|
2800
|
+
const messageQuotedPreview = tv$1({ slots: {
|
|
2801
|
+
root: [
|
|
2802
|
+
"w-full",
|
|
2803
|
+
"rounded-none border-0 border-l-2 border-line-seam bg-transparent pl-2.5",
|
|
2804
|
+
"text-foreground-muted"
|
|
2805
|
+
],
|
|
2806
|
+
content: ["min-w-0", "p-0"],
|
|
2807
|
+
header: [
|
|
2808
|
+
"flex min-w-0 items-center",
|
|
2809
|
+
"has-data-[slot=message-quoted-preview-author-delegated-by]:flex-wrap",
|
|
2810
|
+
"gap-1.5 p-0 pb-0.5"
|
|
2811
|
+
],
|
|
2812
|
+
channel: ["inline-flex items-center", "gap-1 text-footnote font-semibold text-foreground-hint [&_svg]:size-3.5"],
|
|
2813
|
+
thread: ["inline-flex items-center", "gap-1 text-footnote font-semibold text-foreground-hint [&_svg]:size-3.5"],
|
|
2814
|
+
author: ["inline-flex min-w-0 items-center", "gap-1.5"],
|
|
2815
|
+
authorName: ["truncate", "text-footnote font-bold text-foreground-muted"],
|
|
2816
|
+
authorMeta: ["truncate", "text-caption text-foreground-hint"],
|
|
2817
|
+
authorDelegatedBy: ["shrink-0 whitespace-nowrap", "text-footnote text-foreground-muted"],
|
|
2818
|
+
timestamp: ["ml-auto shrink-0", "font-mono text-mono-meta tabular-nums text-foreground-hint"],
|
|
2819
|
+
text: ["line-clamp-2", "text-callout text-foreground-muted"],
|
|
2820
|
+
attachments: ["flex flex-wrap gap-1.5", "mt-1.5"],
|
|
2821
|
+
attachment: [
|
|
2822
|
+
"inline-flex items-center",
|
|
2823
|
+
"h-[22px] gap-1 rounded-chip bg-fill-muted px-1.5",
|
|
2824
|
+
"font-mono text-mono-meta text-foreground-muted [&_svg]:size-3.5"
|
|
2825
|
+
],
|
|
2826
|
+
loading: ["w-full animate-pulse", "rounded-none border-0 border-l-2 border-line-seam bg-transparent pl-2.5"],
|
|
2827
|
+
unavailable: [
|
|
2828
|
+
"block w-full text-left",
|
|
2829
|
+
"border-l-2 border-line-seam pl-2.5",
|
|
2830
|
+
"text-callout text-foreground-hint",
|
|
2831
|
+
"outline-none focus-visible:shadow-focus"
|
|
2832
|
+
]
|
|
2833
|
+
} });
|
|
2834
|
+
//#endregion
|
|
2835
|
+
//#region src/components/message-quoted-preview/message-quoted-preview.tsx
|
|
2836
|
+
function MessageQuotedPreview({ className, render, ...props }) {
|
|
2837
|
+
const { root } = messageQuotedPreview();
|
|
2838
|
+
return /* @__PURE__ */ jsx(MessageEmbed, {
|
|
2839
|
+
className: root({ className }),
|
|
2840
|
+
render,
|
|
2841
|
+
...props
|
|
2842
|
+
});
|
|
2843
|
+
}
|
|
2844
|
+
function MessageQuotedPreviewContent({ className, render, ...props }) {
|
|
2845
|
+
const { content } = messageQuotedPreview();
|
|
2846
|
+
return /* @__PURE__ */ jsx(MessageEmbedContent, {
|
|
2847
|
+
className: content({ className }),
|
|
2848
|
+
render,
|
|
2849
|
+
...props
|
|
2850
|
+
});
|
|
2851
|
+
}
|
|
2852
|
+
function MessageQuotedPreviewHeader({ className, render, ...props }) {
|
|
2853
|
+
const { header } = messageQuotedPreview();
|
|
2854
|
+
return /* @__PURE__ */ jsx(MessageEmbedHeader, {
|
|
2855
|
+
className: header({ className }),
|
|
2856
|
+
render,
|
|
2857
|
+
...props
|
|
2858
|
+
});
|
|
2859
|
+
}
|
|
2860
|
+
function MessageQuotedPreviewChannel({ className, render, ...props }) {
|
|
2861
|
+
const { channel } = messageQuotedPreview();
|
|
2862
|
+
return useRender({
|
|
2863
|
+
defaultTagName: "span",
|
|
2864
|
+
render,
|
|
2865
|
+
props: mergeProps({ className: channel({ className }) }, props),
|
|
2866
|
+
state: { slot: "message-quoted-preview-channel" }
|
|
2867
|
+
});
|
|
2868
|
+
}
|
|
2869
|
+
function MessageQuotedPreviewThread({ className, render, ...props }) {
|
|
2870
|
+
const { thread } = messageQuotedPreview();
|
|
2871
|
+
return useRender({
|
|
2872
|
+
defaultTagName: "span",
|
|
2873
|
+
render,
|
|
2874
|
+
props: mergeProps({ className: thread({ className }) }, props),
|
|
2875
|
+
state: { slot: "message-quoted-preview-thread" }
|
|
2876
|
+
});
|
|
2877
|
+
}
|
|
2878
|
+
function MessageQuotedPreviewAuthor({ className, render, ...props }) {
|
|
2879
|
+
const { author } = messageQuotedPreview();
|
|
2880
|
+
return useRender({
|
|
2881
|
+
defaultTagName: "span",
|
|
2882
|
+
render,
|
|
2883
|
+
props: mergeProps({ className: author({ className }) }, props),
|
|
2884
|
+
state: { slot: "message-quoted-preview-author" }
|
|
2885
|
+
});
|
|
2886
|
+
}
|
|
2887
|
+
function MessageQuotedPreviewAuthorName({ className, render, ...props }) {
|
|
2888
|
+
const { authorName } = messageQuotedPreview();
|
|
2889
|
+
return useRender({
|
|
2890
|
+
defaultTagName: "span",
|
|
2891
|
+
render,
|
|
2892
|
+
props: mergeProps({ className: authorName({ className }) }, props),
|
|
2893
|
+
state: { slot: "message-quoted-preview-author-name" }
|
|
2894
|
+
});
|
|
2895
|
+
}
|
|
2896
|
+
function MessageQuotedPreviewAuthorMeta({ className, render, ...props }) {
|
|
2897
|
+
const { authorMeta } = messageQuotedPreview();
|
|
2898
|
+
return useRender({
|
|
2899
|
+
defaultTagName: "span",
|
|
2900
|
+
render,
|
|
2901
|
+
props: mergeProps({ className: authorMeta({ className }) }, props),
|
|
2902
|
+
state: { slot: "message-quoted-preview-author-meta" }
|
|
2903
|
+
});
|
|
2904
|
+
}
|
|
2905
|
+
/**
|
|
2906
|
+
* "(sent by Friday)" after `MessageQuotedPreviewAuthorName`, when an assistant
|
|
2907
|
+
* sent the quoted message for its author. It never truncates; the author's
|
|
2908
|
+
* name gives way instead.
|
|
2909
|
+
*/
|
|
2910
|
+
function MessageQuotedPreviewAuthorDelegatedBy({ className, render, ...props }) {
|
|
2911
|
+
const { authorDelegatedBy } = messageQuotedPreview();
|
|
2912
|
+
return useRender({
|
|
2913
|
+
defaultTagName: "span",
|
|
2914
|
+
render,
|
|
2915
|
+
props: mergeProps({ className: authorDelegatedBy({ className }) }, props),
|
|
2916
|
+
state: { slot: "message-quoted-preview-author-delegated-by" }
|
|
2917
|
+
});
|
|
2918
|
+
}
|
|
2919
|
+
function MessageQuotedPreviewTimestamp({ className, render, ...props }) {
|
|
2920
|
+
const { timestamp } = messageQuotedPreview();
|
|
2921
|
+
return useRender({
|
|
2922
|
+
defaultTagName: "span",
|
|
2923
|
+
render,
|
|
2924
|
+
props: mergeProps({ className: timestamp({ className }) }, props),
|
|
2925
|
+
state: { slot: "message-quoted-preview-timestamp" }
|
|
2926
|
+
});
|
|
2927
|
+
}
|
|
2928
|
+
function MessageQuotedPreviewText({ className, render, ...props }) {
|
|
2929
|
+
const { text } = messageQuotedPreview();
|
|
2930
|
+
return useRender({
|
|
2931
|
+
defaultTagName: "div",
|
|
2932
|
+
render,
|
|
2933
|
+
props: mergeProps({ className: text({ className }) }, props),
|
|
2934
|
+
state: { slot: "message-quoted-preview-text" }
|
|
2935
|
+
});
|
|
2936
|
+
}
|
|
2937
|
+
function MessageQuotedPreviewAttachments({ className, render, ...props }) {
|
|
2938
|
+
const { attachments } = messageQuotedPreview();
|
|
2939
|
+
return useRender({
|
|
2940
|
+
defaultTagName: "div",
|
|
2941
|
+
render,
|
|
2942
|
+
props: mergeProps({ className: attachments({ className }) }, props),
|
|
2943
|
+
state: { slot: "message-quoted-preview-attachments" }
|
|
2944
|
+
});
|
|
2945
|
+
}
|
|
2946
|
+
function MessageQuotedPreviewAttachment({ className, render, ...props }) {
|
|
2947
|
+
const { attachment } = messageQuotedPreview();
|
|
2948
|
+
return useRender({
|
|
2949
|
+
defaultTagName: "span",
|
|
2950
|
+
render,
|
|
2951
|
+
props: mergeProps({ className: attachment({ className }) }, props),
|
|
2952
|
+
state: { slot: "message-quoted-preview-attachment" }
|
|
2953
|
+
});
|
|
2954
|
+
}
|
|
2955
|
+
function MessageQuotedPreviewLoading({ className, render, ...props }) {
|
|
2956
|
+
const { loading } = messageQuotedPreview();
|
|
2957
|
+
return /* @__PURE__ */ jsx(MessageEmbed, {
|
|
2958
|
+
className: loading({ className }),
|
|
2959
|
+
render,
|
|
2960
|
+
...props
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
function MessageQuotedPreviewUnavailable({ className, render, ...props }) {
|
|
2964
|
+
const { unavailable } = messageQuotedPreview();
|
|
2965
|
+
return useRender({
|
|
2966
|
+
defaultTagName: "div",
|
|
2967
|
+
render,
|
|
2968
|
+
props: mergeProps({ className: unavailable({ className }) }, props),
|
|
2969
|
+
state: { slot: "message-quoted-preview-unavailable" }
|
|
2970
|
+
});
|
|
2971
|
+
}
|
|
2972
|
+
//#endregion
|
|
2973
|
+
//#region src/components/message-list/message-list.recipe.ts
|
|
2974
|
+
const messageList = tv$1({
|
|
2975
|
+
slots: {
|
|
2976
|
+
root: ["relative h-full min-h-0"],
|
|
2977
|
+
viewport: ["min-w-0 overscroll-none"],
|
|
2978
|
+
content: ["flex min-h-full w-full min-w-0 flex-col"],
|
|
2979
|
+
dateDividerRoot: ["flex select-none items-center", "gap-2 px-4 py-3"],
|
|
2980
|
+
dateDividerRule: ["flex-1", "min-w-3 border-t border-line-hairline"],
|
|
2981
|
+
dateDividerChip: ["inline-flex items-center", "font-mono text-mono-meta whitespace-nowrap text-foreground-hint"],
|
|
2982
|
+
notice: ["text-center", "pb-2 font-mono text-mono-meta"],
|
|
2983
|
+
historyLimited: [
|
|
2984
|
+
"inline-flex items-center",
|
|
2985
|
+
"h-[22px] gap-1 rounded-chip px-1.5",
|
|
2986
|
+
"font-mono text-mono-meta text-foreground-muted",
|
|
2987
|
+
"inset-ring inset-ring-line-hairline",
|
|
2988
|
+
"[&_svg]:size-3"
|
|
2989
|
+
]
|
|
2990
|
+
},
|
|
2991
|
+
variants: { tone: {
|
|
2992
|
+
faint: { notice: ["text-foreground-hint"] },
|
|
2993
|
+
muted: { notice: ["text-foreground-muted"] }
|
|
2994
|
+
} },
|
|
2995
|
+
defaultVariants: { tone: "faint" }
|
|
2996
|
+
});
|
|
2997
|
+
const messageListJump = tv$1({
|
|
2998
|
+
slots: {
|
|
2999
|
+
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"],
|
|
3000
|
+
group: ["inline-flex shrink-0 items-stretch", "*:data-[slot=message-list-jump-pill]:rounded-e-none"],
|
|
3001
|
+
dismiss: [
|
|
3002
|
+
"rounded-s-none border-s-0",
|
|
3003
|
+
"text-foreground-muted hover:text-foreground",
|
|
3004
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
3005
|
+
"after:-inset-y-[calc(--spacing(1.5)+1.5px)] after:right-[calc(-0.75rem-1.5px)] after:left-0"
|
|
3006
|
+
]
|
|
3007
|
+
},
|
|
3008
|
+
variants: { side: {
|
|
3009
|
+
bottom: { controls: ["bottom-[calc(--spacing(3)+var(--message-list-bottom-inset,0px))]", "flex-wrap-reverse"] },
|
|
3010
|
+
top: { controls: ["top-3"] }
|
|
3011
|
+
} },
|
|
3012
|
+
defaultVariants: { side: "bottom" }
|
|
3013
|
+
});
|
|
3014
|
+
//#endregion
|
|
3015
|
+
//#region src/components/message-list/message-list.tsx
|
|
3016
|
+
const contentStyle = { minWidth: 0 };
|
|
3017
|
+
function MessageList({ children, className, render, rootClassName, style, ...props }) {
|
|
3018
|
+
const isMobile = useMobileViewport();
|
|
3019
|
+
const { content, root, viewport } = messageList();
|
|
3020
|
+
const viewportStyle = useMemo(() => ({
|
|
3021
|
+
...style,
|
|
3022
|
+
overflowX: "hidden"
|
|
3023
|
+
}), [style]);
|
|
3024
|
+
if (isMobile) return /* @__PURE__ */ jsx("div", {
|
|
3025
|
+
"data-slot": "message-list",
|
|
3026
|
+
className: root({ className: rootClassName }),
|
|
3027
|
+
children: /* @__PURE__ */ jsx(PanelScrollViewport, {
|
|
3028
|
+
...props,
|
|
3029
|
+
render,
|
|
3030
|
+
"data-slot": "message-list-viewport",
|
|
3031
|
+
className: viewport({ className }),
|
|
3032
|
+
style: viewportStyle,
|
|
3033
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
3034
|
+
className: content(),
|
|
3035
|
+
children
|
|
3036
|
+
})
|
|
3037
|
+
})
|
|
3038
|
+
});
|
|
3039
|
+
return /* @__PURE__ */ jsxs(ScrollArea$1, {
|
|
3040
|
+
"data-slot": "message-list",
|
|
3041
|
+
className: root({ className: rootClassName }),
|
|
3042
|
+
children: [/* @__PURE__ */ jsx(ScrollAreaViewport, {
|
|
3043
|
+
...props,
|
|
3044
|
+
render,
|
|
3045
|
+
"data-slot": "message-list-viewport",
|
|
3046
|
+
className: viewport({ className }),
|
|
3047
|
+
style: viewportStyle,
|
|
3048
|
+
children: /* @__PURE__ */ jsx(ScrollAreaContent, {
|
|
3049
|
+
className: content(),
|
|
3050
|
+
style: contentStyle,
|
|
3051
|
+
children
|
|
3052
|
+
})
|
|
3053
|
+
}), /* @__PURE__ */ jsx(ScrollAreaScrollbar, {
|
|
3054
|
+
className: "me-1.5 px-0 py-1",
|
|
3055
|
+
children: /* @__PURE__ */ jsx(ScrollAreaThumb, {})
|
|
3056
|
+
})]
|
|
3057
|
+
});
|
|
3058
|
+
}
|
|
3059
|
+
//#endregion
|
|
3060
|
+
//#region src/components/message-list/message-list-markers.tsx
|
|
3061
|
+
function MessageListDateDivider({ children, className, render, ...props }) {
|
|
3062
|
+
const { dateDividerRoot, dateDividerRule, dateDividerChip } = messageList();
|
|
3063
|
+
const defaultProps = {
|
|
3064
|
+
"data-slot": "message-list-date-divider",
|
|
3065
|
+
className: dateDividerRoot({ className }),
|
|
3066
|
+
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3067
|
+
/* @__PURE__ */ jsx("div", {
|
|
3068
|
+
"aria-hidden": true,
|
|
3069
|
+
className: dateDividerRule()
|
|
3070
|
+
}),
|
|
3071
|
+
/* @__PURE__ */ jsx("span", {
|
|
3072
|
+
className: dateDividerChip(),
|
|
3073
|
+
children
|
|
3074
|
+
}),
|
|
3075
|
+
/* @__PURE__ */ jsx("div", {
|
|
3076
|
+
"aria-hidden": true,
|
|
3077
|
+
className: dateDividerRule()
|
|
3078
|
+
})
|
|
3079
|
+
] })
|
|
3080
|
+
};
|
|
3081
|
+
return useRender({
|
|
3082
|
+
defaultTagName: "div",
|
|
3083
|
+
render,
|
|
3084
|
+
props: mergeProps(defaultProps, props)
|
|
3085
|
+
});
|
|
3086
|
+
}
|
|
3087
|
+
function MessageListNotice({ className, render, tone = "faint", ...props }) {
|
|
3088
|
+
const { notice } = messageList({ tone });
|
|
3089
|
+
const defaultProps = {
|
|
3090
|
+
"data-slot": "message-list-notice",
|
|
3091
|
+
className: notice({ className })
|
|
3092
|
+
};
|
|
3093
|
+
return useRender({
|
|
3094
|
+
defaultTagName: "div",
|
|
3095
|
+
render,
|
|
3096
|
+
props: mergeProps(defaultProps, props)
|
|
3097
|
+
});
|
|
3098
|
+
}
|
|
3099
|
+
function MessageListHistoryLimited({ className, render, ...props }) {
|
|
3100
|
+
const { historyLimited } = messageList();
|
|
3101
|
+
const defaultProps = {
|
|
3102
|
+
"data-slot": "message-list-history-limited",
|
|
3103
|
+
className: historyLimited({ className })
|
|
3104
|
+
};
|
|
3105
|
+
return useRender({
|
|
3106
|
+
defaultTagName: "span",
|
|
3107
|
+
render,
|
|
3108
|
+
props: mergeProps(defaultProps, props)
|
|
3109
|
+
});
|
|
3110
|
+
}
|
|
3111
|
+
//#endregion
|
|
3112
|
+
//#region src/components/message-list/message-list-jump.tsx
|
|
3113
|
+
function MessageListJumpControls({ className, render, side = "bottom", ...props }) {
|
|
3114
|
+
const { controls } = messageListJump({ side });
|
|
3115
|
+
const defaultProps = {
|
|
3116
|
+
"data-slot": "message-list-jump-controls",
|
|
3117
|
+
"data-side": side,
|
|
3118
|
+
className: controls({ className })
|
|
3119
|
+
};
|
|
3120
|
+
return useRender({
|
|
3121
|
+
defaultTagName: "div",
|
|
3122
|
+
render,
|
|
3123
|
+
props: mergeProps(defaultProps, props)
|
|
3124
|
+
});
|
|
3125
|
+
}
|
|
3126
|
+
function MessageListJumpPill({ className, children, render, nativeButton, ...props }) {
|
|
3127
|
+
const { root, content } = buttonVariants({
|
|
3128
|
+
variant: "outline",
|
|
3129
|
+
size: "md"
|
|
3130
|
+
});
|
|
3131
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
3132
|
+
...props,
|
|
3133
|
+
render,
|
|
3134
|
+
nativeButton: nativeButton ?? defaultNativeButton(render),
|
|
3135
|
+
"data-slot": "message-list-jump-pill",
|
|
3136
|
+
className: root({ className }),
|
|
3137
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
3138
|
+
"data-slot": "message-list-jump-pill-content",
|
|
3139
|
+
className: content(),
|
|
3140
|
+
children
|
|
3141
|
+
})
|
|
3142
|
+
});
|
|
3143
|
+
}
|
|
3144
|
+
/** A pill and its dismiss button, joined on one shared edge. */
|
|
3145
|
+
function MessageListJumpPillGroup({ className, render, ...props }) {
|
|
3146
|
+
const { group } = messageListJump();
|
|
3147
|
+
const defaultProps = {
|
|
3148
|
+
"data-slot": "message-list-jump-pill-group",
|
|
3149
|
+
className: group({ className })
|
|
3150
|
+
};
|
|
3151
|
+
return useRender({
|
|
3152
|
+
defaultTagName: "div",
|
|
3153
|
+
render,
|
|
3154
|
+
props: mergeProps(defaultProps, props)
|
|
3155
|
+
});
|
|
3156
|
+
}
|
|
3157
|
+
function MessageListJumpPillDismiss({ className, children, render, nativeButton, ...props }) {
|
|
3158
|
+
const { root, content } = buttonVariants({
|
|
3159
|
+
variant: "outline",
|
|
3160
|
+
size: "icon-md"
|
|
3161
|
+
});
|
|
3162
|
+
const { dismiss } = messageListJump();
|
|
3163
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
3164
|
+
...props,
|
|
3165
|
+
render,
|
|
3166
|
+
nativeButton: nativeButton ?? defaultNativeButton(render),
|
|
3167
|
+
"data-slot": "message-list-jump-pill-dismiss",
|
|
3168
|
+
className: root({ className: dismiss({ className }) }),
|
|
3169
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
3170
|
+
"data-slot": "message-list-jump-pill-dismiss-content",
|
|
3171
|
+
className: content(),
|
|
3172
|
+
children
|
|
3173
|
+
})
|
|
3174
|
+
});
|
|
3175
|
+
}
|
|
3176
|
+
//#endregion
|
|
3177
|
+
export { MessageReactionTooltipNameText as $, DropdownMenuShortcut as $t, MessageTextSelectionToolbarButton as A, DialogClose as An, MessageItem as At, MessageReferenceUnavailable as B, DialogTrigger as Bn, DropdownMenuCheckboxItemIndicator as Bt, MessageQuotedPreviewUnavailable as C, TooltipContent as Cn, MessageItemEdited as Ct, MessageEmbedHeader as D, Badge as Dn, MessageItemAvatarSlot as Dt, MessageEmbedFooter as E, TooltipTrigger as En, MessageItemSearchMatch as Et, MessageReferenceChip as F, DialogNav as Fn, AvatarGroup as Ft, MessageReactionGlyph as G, useParentOverlayKind as Gn, DropdownMenuItemLabel as Gt, MessageReactionChip as H, buttonVariants as Hn, DropdownMenuFooter as Ht, MessageReferenceIndicator as I, DialogOverlay as In, AvatarGroupCount as It, MessageReactionQuickButton as J, useThemeScopeProps as Jn, DropdownMenuPortal as Jt, MessageReactionPickerContent as K, withOverlayLayer as Kn, DropdownMenuLabel as Kt, MessageReferenceLabel as L, DialogPortal as Ln, AvatarImage as Lt, MessageMultiSelect as M, DialogDescription as Mn, Avatar$1 as Mt, MessageMultiSelectCheckbox as N, DialogFooter as Nn, AvatarBadge as Nt, messageEmbed as O, Dialog$1 as On, MessageItemContinuationTime as Ot, MessageMultiSelectToolbar as P, DialogHeader as Pn, AvatarFallback as Pt, MessageReactionTooltipName as Q, DropdownMenuSeparator as Qt, MessageReferencePending as R, DialogSurface as Rn, DropdownMenu as Rt, MessageQuotedPreviewTimestamp as S, Tooltip$1 as Sn, MessageItemContent as St, MessageEmbedContent as T, TooltipProvider as Tn, MessageItemFooter as Tt, MessageReactionCount as U, Spinner as Un, DropdownMenuItem as Ut, MessageReactionAddButton as V, Button$1 as Vn, DropdownMenuContent as Vt, MessageReactionErrorIndicator as W, defaultNativeButton as Wn, DropdownMenuItemCount as Wt, MessageReactionTooltipContent as X, ThemeStateContext as Xn, DropdownMenuRadioItem as Xt, MessageReactionQuickRow as Y, useTheme as Yn, DropdownMenuRadioGroup as Yt, MessageReactionTooltipMeta as Z, tv$1 as Zn, DropdownMenuRadioItemIndicator as Zt, MessageQuotedPreviewContent as _, ScrollAreaViewport as _n, MessageItemSenderButton as _t, MessageListDateDivider as a, Panel as an, MessageItemSavedIndicator as at, MessageQuotedPreviewText as b, CheckboxIndicator as bn, MessageItemAttachments as bt, MessageList as c, PanelHeaderRoot as cn, MessageItemDelegatedAvatar as ct, MessageQuotedPreviewAttachments as d, PanelSection as dn, MessageItemDelegatedByName as dt, DropdownMenuSubmenu as en, MessageReactionTooltipNames as et, MessageQuotedPreviewAuthor as f, ScrollArea$1 as fn, MessageItemHeader as ft, MessageQuotedPreviewChannel as g, ScrollAreaThumb as gn, MessageItemSenderBadges as gt, MessageQuotedPreviewAuthorName as h, ScrollAreaScrollbar as hn, MessageItemSender as ht, MessageListJumpPillGroup as i, KbdGroup as in, MessageItemReadReceipt as it, MessageTextSelectionToolbarSeparator as j, DialogContent as jn, searchHit as jt, MessageTextSelectionToolbar as k, DialogBody as kn, MessageItemGutter as kt, MessageQuotedPreview as l, PanelScrollContent as ln, MessageItemDelegatedBy as lt, MessageQuotedPreviewAuthorMeta as m, ScrollAreaCorner as mn, MessageItemMeta as mt, MessageListJumpPill as n, DropdownMenuTrigger as nn, MessageItemBadge as nt, MessageListHistoryLimited as o, PanelBody as on, MessageItemToolbar as ot, MessageQuotedPreviewAuthorDelegatedBy as p, ScrollAreaContent as pn, MessageItemInlineStatus as pt, MessageReactionPickerStatic as q, resolveThemeScopeProps as qn, DropdownMenuPopup as qt, MessageListJumpPillDismiss as r, Kbd as rn, MessageItemBadgeSeparator as rt, MessageListNotice as s, PanelFooter as sn, MessageItemToolbarButton as st, MessageListJumpControls as t, DropdownMenuSubmenuTrigger as tn, MessageReactionTooltipSeparator as tt, MessageQuotedPreviewAttachment as u, PanelScrollViewport as un, MessageItemDelegatedByButton as ut, MessageQuotedPreviewHeader as v, useMobileViewport as vn, MessageItemSenderGroup as vt, MessageEmbed as w, TooltipPortal as wn, MessageItemEmbedded as wt, MessageQuotedPreviewThread as x, PRESENCE_COLOR as xn, MessageItemBody as xt, MessageQuotedPreviewLoading as y, Checkbox$1 as yn, MessageItemTime as yt, MessageReferenceText as z, DialogTitle as zn, DropdownMenuCheckboxItem as zt };
|