@qball-inc/react 1.0.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/LICENSE +201 -0
- package/MARKS.md +45 -0
- package/dist/index.cjs +3899 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2424 -0
- package/dist/index.d.ts +2424 -0
- package/dist/index.js +3678 -0
- package/dist/index.js.map +1 -0
- package/package.json +107 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3678 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
+
import { forwardRef, createContext, useContext, useState, useId, useEffect, useRef, useMemo, useCallback, cloneElement, Children } from 'react';
|
|
4
|
+
import * as RSelect from '@radix-ui/react-select';
|
|
5
|
+
import { Command } from 'cmdk';
|
|
6
|
+
import * as AlertDialog from '@radix-ui/react-alert-dialog';
|
|
7
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
8
|
+
import { toast as toast$1, Toaster as Toaster$1 } from 'sonner';
|
|
9
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
10
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
11
|
+
import { useReactTable, getCoreRowModel, flexRender } from '@tanstack/react-table';
|
|
12
|
+
import * as d3 from 'd3';
|
|
13
|
+
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
14
|
+
import * as Popover from '@radix-ui/react-popover';
|
|
15
|
+
import Markdown, { defaultUrlTransform } from 'react-markdown';
|
|
16
|
+
|
|
17
|
+
// src/smoke/Surface.tsx
|
|
18
|
+
function Surface({ children, style }) {
|
|
19
|
+
const base = {
|
|
20
|
+
background: "var(--bg-surface)",
|
|
21
|
+
color: "var(--text-primary)",
|
|
22
|
+
border: "1px solid var(--border-default)"
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ jsx("div", { style: { ...base, ...style }, children });
|
|
25
|
+
}
|
|
26
|
+
var Button = forwardRef(function Button2({ variant = "primary", icon, loading, asChild, disabled, type, className, children, ...rest }, ref) {
|
|
27
|
+
const isDisabled = disabled === true || loading === true;
|
|
28
|
+
const cls = [
|
|
29
|
+
"btn",
|
|
30
|
+
`btn--${variant}`,
|
|
31
|
+
icon === true ? "btn--icon" : "",
|
|
32
|
+
loading === true ? "btn--loading" : "",
|
|
33
|
+
className ?? ""
|
|
34
|
+
].filter(Boolean).join(" ");
|
|
35
|
+
if (asChild === true) {
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
Slot,
|
|
38
|
+
{
|
|
39
|
+
ref,
|
|
40
|
+
className: cls,
|
|
41
|
+
"aria-busy": loading === true ? true : void 0,
|
|
42
|
+
"aria-disabled": isDisabled ? true : void 0,
|
|
43
|
+
...rest,
|
|
44
|
+
children
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
"button",
|
|
50
|
+
{
|
|
51
|
+
ref,
|
|
52
|
+
type: type ?? "button",
|
|
53
|
+
className: cls,
|
|
54
|
+
disabled: isDisabled,
|
|
55
|
+
"aria-busy": loading === true ? true : void 0,
|
|
56
|
+
...rest,
|
|
57
|
+
children
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
var Input = forwardRef(function Input2({ numeric, type, inputMode, className, "aria-invalid": ariaInvalid, ...rest }, ref) {
|
|
62
|
+
const invalid = ariaInvalid === true || ariaInvalid === "true";
|
|
63
|
+
const cls = [
|
|
64
|
+
"input",
|
|
65
|
+
numeric === true ? "num" : "",
|
|
66
|
+
invalid ? "input--error" : "",
|
|
67
|
+
className ?? ""
|
|
68
|
+
].filter(Boolean).join(" ");
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
"input",
|
|
71
|
+
{
|
|
72
|
+
ref,
|
|
73
|
+
type: type ?? "text",
|
|
74
|
+
inputMode: inputMode ?? (numeric === true ? "decimal" : void 0),
|
|
75
|
+
className: cls,
|
|
76
|
+
"aria-invalid": ariaInvalid,
|
|
77
|
+
...rest
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
});
|
|
81
|
+
function Field({ label, helpText, errorText, required, children }) {
|
|
82
|
+
const baseId = useId();
|
|
83
|
+
const controlId = `${baseId}-control`;
|
|
84
|
+
const helpId = helpText !== void 0 ? `${baseId}-help` : void 0;
|
|
85
|
+
const errorId = errorText !== void 0 ? `${baseId}-error` : void 0;
|
|
86
|
+
const ownDescribedBy = [errorId, helpId].filter((v) => v !== void 0 && v !== "").join(" ");
|
|
87
|
+
const childDescribedBy = children.props["aria-describedby"];
|
|
88
|
+
const describedBy = [childDescribedBy, ownDescribedBy].filter((v) => v !== void 0 && v !== "").join(" ") || void 0;
|
|
89
|
+
const control = cloneElement(children, {
|
|
90
|
+
id: controlId,
|
|
91
|
+
"aria-invalid": errorText !== void 0 ? true : children.props["aria-invalid"],
|
|
92
|
+
"aria-describedby": describedBy
|
|
93
|
+
});
|
|
94
|
+
return /* @__PURE__ */ jsxs("div", { className: "field", children: [
|
|
95
|
+
/* @__PURE__ */ jsxs("label", { className: "field__label", htmlFor: controlId, children: [
|
|
96
|
+
label,
|
|
97
|
+
required === true ? /* @__PURE__ */ jsx("span", { className: "field__req", children: " *" }) : null
|
|
98
|
+
] }),
|
|
99
|
+
control,
|
|
100
|
+
helpText !== void 0 ? /* @__PURE__ */ jsx("span", { className: "field__help", id: helpId, children: helpText }) : null,
|
|
101
|
+
errorText !== void 0 ? /* @__PURE__ */ jsxs("span", { className: "field__error", id: errorId, role: "alert", children: [
|
|
102
|
+
/* @__PURE__ */ jsxs(
|
|
103
|
+
"svg",
|
|
104
|
+
{
|
|
105
|
+
width: "13",
|
|
106
|
+
height: "13",
|
|
107
|
+
viewBox: "0 0 24 24",
|
|
108
|
+
fill: "none",
|
|
109
|
+
stroke: "currentColor",
|
|
110
|
+
strokeWidth: "1.8",
|
|
111
|
+
strokeLinecap: "round",
|
|
112
|
+
strokeLinejoin: "round",
|
|
113
|
+
"aria-hidden": "true",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
116
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8v4" }),
|
|
117
|
+
/* @__PURE__ */ jsx("path", { d: "M12 16h.01" })
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
errorText
|
|
122
|
+
] }) : null
|
|
123
|
+
] });
|
|
124
|
+
}
|
|
125
|
+
var Select = forwardRef(function Select2({ value, defaultValue, onValueChange, placeholder, disabled, children, className, ...rest }, ref) {
|
|
126
|
+
const triggerCls = ["select", className ?? ""].filter(Boolean).join(" ");
|
|
127
|
+
return /* @__PURE__ */ jsxs(
|
|
128
|
+
RSelect.Root,
|
|
129
|
+
{
|
|
130
|
+
...value !== void 0 ? { value } : {},
|
|
131
|
+
...defaultValue !== void 0 ? { defaultValue } : {},
|
|
132
|
+
...onValueChange !== void 0 ? { onValueChange } : {},
|
|
133
|
+
...disabled !== void 0 ? { disabled } : {},
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ jsx(RSelect.Trigger, { ref, className: triggerCls, ...rest, children: /* @__PURE__ */ jsx(RSelect.Value, { placeholder }) }),
|
|
136
|
+
/* @__PURE__ */ jsx(RSelect.Portal, { children: /* @__PURE__ */ jsx(RSelect.Content, { className: "menu", position: "popper", sideOffset: 4, children: /* @__PURE__ */ jsx(RSelect.Viewport, { children }) }) })
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
});
|
|
141
|
+
var SelectItem = forwardRef(function SelectItem2({ value, disabled, children, className }, ref) {
|
|
142
|
+
const itemCls = ["menu__item", className ?? ""].filter(Boolean).join(" ");
|
|
143
|
+
return /* @__PURE__ */ jsxs(
|
|
144
|
+
RSelect.Item,
|
|
145
|
+
{
|
|
146
|
+
ref,
|
|
147
|
+
className: itemCls,
|
|
148
|
+
value,
|
|
149
|
+
...disabled !== void 0 ? { disabled } : {},
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ jsx(RSelect.ItemText, { children }),
|
|
152
|
+
/* @__PURE__ */ jsx(RSelect.ItemIndicator, { className: "menu__check", children: /* @__PURE__ */ jsx(
|
|
153
|
+
"svg",
|
|
154
|
+
{
|
|
155
|
+
width: "15",
|
|
156
|
+
height: "15",
|
|
157
|
+
viewBox: "0 0 24 24",
|
|
158
|
+
fill: "none",
|
|
159
|
+
stroke: "currentColor",
|
|
160
|
+
strokeWidth: "2",
|
|
161
|
+
strokeLinecap: "round",
|
|
162
|
+
strokeLinejoin: "round",
|
|
163
|
+
"aria-hidden": "true",
|
|
164
|
+
children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
165
|
+
}
|
|
166
|
+
) })
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
});
|
|
171
|
+
var Switch = forwardRef(function Switch2({ checked, onCheckedChange, onChange, disabled, className, children, ...rest }, ref) {
|
|
172
|
+
const labelCls = ["switch", className ?? ""].filter(Boolean).join(" ");
|
|
173
|
+
return /* @__PURE__ */ jsxs("label", { className: labelCls, children: [
|
|
174
|
+
/* @__PURE__ */ jsx(
|
|
175
|
+
"input",
|
|
176
|
+
{
|
|
177
|
+
ref,
|
|
178
|
+
type: "checkbox",
|
|
179
|
+
role: "switch",
|
|
180
|
+
checked,
|
|
181
|
+
disabled,
|
|
182
|
+
onChange: (event) => {
|
|
183
|
+
onCheckedChange?.(event.target.checked);
|
|
184
|
+
onChange?.(event);
|
|
185
|
+
},
|
|
186
|
+
...rest
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
/* @__PURE__ */ jsx("span", { className: "switch__ui", "aria-hidden": "true" }),
|
|
190
|
+
children
|
|
191
|
+
] });
|
|
192
|
+
});
|
|
193
|
+
var SegmentedContext = createContext(null);
|
|
194
|
+
function Segmented({
|
|
195
|
+
value,
|
|
196
|
+
defaultValue,
|
|
197
|
+
onValueChange,
|
|
198
|
+
children,
|
|
199
|
+
className,
|
|
200
|
+
"aria-label": ariaLabel
|
|
201
|
+
}) {
|
|
202
|
+
const [internal, setInternal] = useState(defaultValue);
|
|
203
|
+
const isControlled = value !== void 0;
|
|
204
|
+
const current = isControlled ? value : internal;
|
|
205
|
+
const onSelect = (next) => {
|
|
206
|
+
if (next === current) return;
|
|
207
|
+
if (!isControlled) setInternal(next);
|
|
208
|
+
onValueChange?.(next);
|
|
209
|
+
};
|
|
210
|
+
const groupCls = ["segmented", className ?? ""].filter(Boolean).join(" ");
|
|
211
|
+
return /* @__PURE__ */ jsx("div", { className: groupCls, role: "group", "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(SegmentedContext.Provider, { value: { value: current, onSelect }, children }) });
|
|
212
|
+
}
|
|
213
|
+
var SegmentedItem = forwardRef(
|
|
214
|
+
function SegmentedItem2({ value, children, onClick, ...rest }, ref) {
|
|
215
|
+
const ctx = useContext(SegmentedContext);
|
|
216
|
+
if (ctx === null) {
|
|
217
|
+
throw new Error("SegmentedItem must be rendered inside a <Segmented>.");
|
|
218
|
+
}
|
|
219
|
+
const pressed = ctx.value === value;
|
|
220
|
+
return /* @__PURE__ */ jsx(
|
|
221
|
+
"button",
|
|
222
|
+
{
|
|
223
|
+
ref,
|
|
224
|
+
type: "button",
|
|
225
|
+
"aria-pressed": pressed,
|
|
226
|
+
onClick: (event) => {
|
|
227
|
+
ctx.onSelect(value);
|
|
228
|
+
onClick?.(event);
|
|
229
|
+
},
|
|
230
|
+
...rest,
|
|
231
|
+
children
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
function IconBase({
|
|
237
|
+
size = 24,
|
|
238
|
+
strokeWidth = 1.5,
|
|
239
|
+
className,
|
|
240
|
+
title,
|
|
241
|
+
children,
|
|
242
|
+
filled = false,
|
|
243
|
+
...rest
|
|
244
|
+
}) {
|
|
245
|
+
const titleId = useId();
|
|
246
|
+
const labelled = title !== void 0 || rest["aria-label"] !== void 0;
|
|
247
|
+
const cls = ["ic", className].filter(Boolean).join(" ");
|
|
248
|
+
return /* @__PURE__ */ jsxs(
|
|
249
|
+
"svg",
|
|
250
|
+
{
|
|
251
|
+
viewBox: "0 0 24 24",
|
|
252
|
+
width: size,
|
|
253
|
+
height: size,
|
|
254
|
+
fill: filled ? "currentColor" : "none",
|
|
255
|
+
stroke: filled ? void 0 : "currentColor",
|
|
256
|
+
strokeWidth: filled ? void 0 : strokeWidth,
|
|
257
|
+
strokeLinecap: filled ? void 0 : "round",
|
|
258
|
+
strokeLinejoin: filled ? void 0 : "round",
|
|
259
|
+
className: cls,
|
|
260
|
+
...rest,
|
|
261
|
+
role: labelled ? "img" : void 0,
|
|
262
|
+
"aria-hidden": labelled ? void 0 : true,
|
|
263
|
+
"aria-labelledby": title !== void 0 ? titleId : void 0,
|
|
264
|
+
children: [
|
|
265
|
+
title !== void 0 ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
266
|
+
children
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
function ChevronUp(props) {
|
|
272
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "m18 15-6-6-6 6" }) });
|
|
273
|
+
}
|
|
274
|
+
function ChevronDown(props) {
|
|
275
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }) });
|
|
276
|
+
}
|
|
277
|
+
function ChevronLeft(props) {
|
|
278
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" }) });
|
|
279
|
+
}
|
|
280
|
+
function ChevronRight(props) {
|
|
281
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" }) });
|
|
282
|
+
}
|
|
283
|
+
function ArrowUp(props) {
|
|
284
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
285
|
+
/* @__PURE__ */ jsx("path", { d: "m5 12 7-7 7 7" }),
|
|
286
|
+
/* @__PURE__ */ jsx("path", { d: "M12 19V5" })
|
|
287
|
+
] });
|
|
288
|
+
}
|
|
289
|
+
function ArrowDown(props) {
|
|
290
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
291
|
+
/* @__PURE__ */ jsx("path", { d: "M12 5v14" }),
|
|
292
|
+
/* @__PURE__ */ jsx("path", { d: "m19 12-7 7-7-7" })
|
|
293
|
+
] });
|
|
294
|
+
}
|
|
295
|
+
function ArrowLeft(props) {
|
|
296
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
297
|
+
/* @__PURE__ */ jsx("path", { d: "m12 19-7-7 7-7" }),
|
|
298
|
+
/* @__PURE__ */ jsx("path", { d: "M19 12H5" })
|
|
299
|
+
] });
|
|
300
|
+
}
|
|
301
|
+
function ArrowRight(props) {
|
|
302
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
303
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12h14" }),
|
|
304
|
+
/* @__PURE__ */ jsx("path", { d: "m12 5 7 7-7 7" })
|
|
305
|
+
] });
|
|
306
|
+
}
|
|
307
|
+
function ArrowUpRight(props) {
|
|
308
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
309
|
+
/* @__PURE__ */ jsx("path", { d: "M7 7h10v10" }),
|
|
310
|
+
/* @__PURE__ */ jsx("path", { d: "M7 17 17 7" })
|
|
311
|
+
] });
|
|
312
|
+
}
|
|
313
|
+
function ArrowUpLeft(props) {
|
|
314
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
315
|
+
/* @__PURE__ */ jsx("path", { d: "M7 17V7h10" }),
|
|
316
|
+
/* @__PURE__ */ jsx("path", { d: "M17 17 7 7" })
|
|
317
|
+
] });
|
|
318
|
+
}
|
|
319
|
+
function ArrowDownRight(props) {
|
|
320
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
321
|
+
/* @__PURE__ */ jsx("path", { d: "m7 7 10 10" }),
|
|
322
|
+
/* @__PURE__ */ jsx("path", { d: "M17 7v10H7" })
|
|
323
|
+
] });
|
|
324
|
+
}
|
|
325
|
+
function ArrowDownLeft(props) {
|
|
326
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
327
|
+
/* @__PURE__ */ jsx("path", { d: "M17 7 7 17" }),
|
|
328
|
+
/* @__PURE__ */ jsx("path", { d: "M17 17H7V7" })
|
|
329
|
+
] });
|
|
330
|
+
}
|
|
331
|
+
function ExternalLink(props) {
|
|
332
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
333
|
+
/* @__PURE__ */ jsx("path", { d: "M15 3h6v6" }),
|
|
334
|
+
/* @__PURE__ */ jsx("path", { d: "M10 14 21 3" }),
|
|
335
|
+
/* @__PURE__ */ jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" })
|
|
336
|
+
] });
|
|
337
|
+
}
|
|
338
|
+
function Menu(props) {
|
|
339
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
340
|
+
/* @__PURE__ */ jsx("path", { d: "M4 5h16" }),
|
|
341
|
+
/* @__PURE__ */ jsx("path", { d: "M4 12h16" }),
|
|
342
|
+
/* @__PURE__ */ jsx("path", { d: "M4 19h16" })
|
|
343
|
+
] });
|
|
344
|
+
}
|
|
345
|
+
function X(props) {
|
|
346
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
347
|
+
/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }),
|
|
348
|
+
/* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
|
|
349
|
+
] });
|
|
350
|
+
}
|
|
351
|
+
function SearchIcon(props) {
|
|
352
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
353
|
+
/* @__PURE__ */ jsx("path", { d: "m21 21-4.34-4.34" }),
|
|
354
|
+
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" })
|
|
355
|
+
] });
|
|
356
|
+
}
|
|
357
|
+
function Plus(props) {
|
|
358
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
359
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12h14" }),
|
|
360
|
+
/* @__PURE__ */ jsx("path", { d: "M12 5v14" })
|
|
361
|
+
] });
|
|
362
|
+
}
|
|
363
|
+
function Minus(props) {
|
|
364
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M5 12h14" }) });
|
|
365
|
+
}
|
|
366
|
+
function SquarePen(props) {
|
|
367
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
368
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
369
|
+
/* @__PURE__ */ jsx("path", { d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" })
|
|
370
|
+
] });
|
|
371
|
+
}
|
|
372
|
+
function Trash2(props) {
|
|
373
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
374
|
+
/* @__PURE__ */ jsx("path", { d: "M10 11v6" }),
|
|
375
|
+
/* @__PURE__ */ jsx("path", { d: "M14 11v6" }),
|
|
376
|
+
/* @__PURE__ */ jsx("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
377
|
+
/* @__PURE__ */ jsx("path", { d: "M3 6h18" }),
|
|
378
|
+
/* @__PURE__ */ jsx("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
379
|
+
] });
|
|
380
|
+
}
|
|
381
|
+
function Download(props) {
|
|
382
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
383
|
+
/* @__PURE__ */ jsx("path", { d: "M12 15V3" }),
|
|
384
|
+
/* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
385
|
+
/* @__PURE__ */ jsx("path", { d: "m7 10 5 5 5-5" })
|
|
386
|
+
] });
|
|
387
|
+
}
|
|
388
|
+
function Upload(props) {
|
|
389
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
390
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3v12" }),
|
|
391
|
+
/* @__PURE__ */ jsx("path", { d: "m17 8-5-5-5 5" }),
|
|
392
|
+
/* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" })
|
|
393
|
+
] });
|
|
394
|
+
}
|
|
395
|
+
function Copy(props) {
|
|
396
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
397
|
+
/* @__PURE__ */ jsx("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
398
|
+
/* @__PURE__ */ jsx("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
399
|
+
] });
|
|
400
|
+
}
|
|
401
|
+
function Share2(props) {
|
|
402
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
403
|
+
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "5", r: "3" }),
|
|
404
|
+
/* @__PURE__ */ jsx("circle", { cx: "6", cy: "12", r: "3" }),
|
|
405
|
+
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "19", r: "3" }),
|
|
406
|
+
/* @__PURE__ */ jsx("line", { x1: "8.59", x2: "15.42", y1: "13.51", y2: "17.49" }),
|
|
407
|
+
/* @__PURE__ */ jsx("line", { x1: "15.41", x2: "8.59", y1: "6.51", y2: "10.49" })
|
|
408
|
+
] });
|
|
409
|
+
}
|
|
410
|
+
function Funnel(props) {
|
|
411
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }) });
|
|
412
|
+
}
|
|
413
|
+
function ArrowUpDown(props) {
|
|
414
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
415
|
+
/* @__PURE__ */ jsx("path", { d: "m21 16-4 4-4-4" }),
|
|
416
|
+
/* @__PURE__ */ jsx("path", { d: "M17 20V4" }),
|
|
417
|
+
/* @__PURE__ */ jsx("path", { d: "m3 8 4-4 4 4" }),
|
|
418
|
+
/* @__PURE__ */ jsx("path", { d: "M7 4v16" })
|
|
419
|
+
] });
|
|
420
|
+
}
|
|
421
|
+
function Settings(props) {
|
|
422
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
423
|
+
/* @__PURE__ */ jsx("path", { d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }),
|
|
424
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" })
|
|
425
|
+
] });
|
|
426
|
+
}
|
|
427
|
+
function RefreshCw(props) {
|
|
428
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
429
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
430
|
+
/* @__PURE__ */ jsx("path", { d: "M21 3v5h-5" }),
|
|
431
|
+
/* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
|
|
432
|
+
/* @__PURE__ */ jsx("path", { d: "M8 16H3v5" })
|
|
433
|
+
] });
|
|
434
|
+
}
|
|
435
|
+
function Check(props) {
|
|
436
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
|
|
437
|
+
}
|
|
438
|
+
function Send(props) {
|
|
439
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
440
|
+
/* @__PURE__ */ jsx("path", { d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" }),
|
|
441
|
+
/* @__PURE__ */ jsx("path", { d: "m21.854 2.147-10.94 10.939" })
|
|
442
|
+
] });
|
|
443
|
+
}
|
|
444
|
+
function Eye(props) {
|
|
445
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
446
|
+
/* @__PURE__ */ jsx("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }),
|
|
447
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" })
|
|
448
|
+
] });
|
|
449
|
+
}
|
|
450
|
+
function EyeOff(props) {
|
|
451
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
452
|
+
/* @__PURE__ */ jsx("path", { d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }),
|
|
453
|
+
/* @__PURE__ */ jsx("path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }),
|
|
454
|
+
/* @__PURE__ */ jsx("path", { d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }),
|
|
455
|
+
/* @__PURE__ */ jsx("path", { d: "m2 2 20 20" })
|
|
456
|
+
] });
|
|
457
|
+
}
|
|
458
|
+
function Bell(props) {
|
|
459
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
460
|
+
/* @__PURE__ */ jsx("path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }),
|
|
461
|
+
/* @__PURE__ */ jsx("path", { d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" })
|
|
462
|
+
] });
|
|
463
|
+
}
|
|
464
|
+
function BellOff(props) {
|
|
465
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
466
|
+
/* @__PURE__ */ jsx("path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }),
|
|
467
|
+
/* @__PURE__ */ jsx("path", { d: "M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742" }),
|
|
468
|
+
/* @__PURE__ */ jsx("path", { d: "m2 2 20 20" }),
|
|
469
|
+
/* @__PURE__ */ jsx("path", { d: "M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05" })
|
|
470
|
+
] });
|
|
471
|
+
}
|
|
472
|
+
function Ellipsis(props) {
|
|
473
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
474
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1" }),
|
|
475
|
+
/* @__PURE__ */ jsx("circle", { cx: "19", cy: "12", r: "1" }),
|
|
476
|
+
/* @__PURE__ */ jsx("circle", { cx: "5", cy: "12", r: "1" })
|
|
477
|
+
] });
|
|
478
|
+
}
|
|
479
|
+
function EllipsisVertical(props) {
|
|
480
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
481
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1" }),
|
|
482
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "5", r: "1" }),
|
|
483
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "19", r: "1" })
|
|
484
|
+
] });
|
|
485
|
+
}
|
|
486
|
+
function Save(props) {
|
|
487
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
488
|
+
/* @__PURE__ */ jsx("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
|
|
489
|
+
/* @__PURE__ */ jsx("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }),
|
|
490
|
+
/* @__PURE__ */ jsx("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
|
|
491
|
+
] });
|
|
492
|
+
}
|
|
493
|
+
function Info(props) {
|
|
494
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
495
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
496
|
+
/* @__PURE__ */ jsx("path", { d: "M12 16v-4" }),
|
|
497
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8h.01" })
|
|
498
|
+
] });
|
|
499
|
+
}
|
|
500
|
+
function TriangleAlert(props) {
|
|
501
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
502
|
+
/* @__PURE__ */ jsx("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
503
|
+
/* @__PURE__ */ jsx("path", { d: "M12 9v4" }),
|
|
504
|
+
/* @__PURE__ */ jsx("path", { d: "M12 17h.01" })
|
|
505
|
+
] });
|
|
506
|
+
}
|
|
507
|
+
function CircleX(props) {
|
|
508
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
509
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
510
|
+
/* @__PURE__ */ jsx("path", { d: "m15 9-6 6" }),
|
|
511
|
+
/* @__PURE__ */ jsx("path", { d: "m9 9 6 6" })
|
|
512
|
+
] });
|
|
513
|
+
}
|
|
514
|
+
function CircleCheck(props) {
|
|
515
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
516
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
517
|
+
/* @__PURE__ */ jsx("path", { d: "m9 12 2 2 4-4" })
|
|
518
|
+
] });
|
|
519
|
+
}
|
|
520
|
+
function CircleCheckBig(props) {
|
|
521
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
522
|
+
/* @__PURE__ */ jsx("path", { d: "M21.801 10A10 10 0 1 1 17 3.335" }),
|
|
523
|
+
/* @__PURE__ */ jsx("path", { d: "m9 11 3 3L22 4" })
|
|
524
|
+
] });
|
|
525
|
+
}
|
|
526
|
+
function Clock(props) {
|
|
527
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
528
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
529
|
+
/* @__PURE__ */ jsx("path", { d: "M12 6v6l4 2" })
|
|
530
|
+
] });
|
|
531
|
+
}
|
|
532
|
+
function Loader(props) {
|
|
533
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
534
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2v4" }),
|
|
535
|
+
/* @__PURE__ */ jsx("path", { d: "m16.2 7.8 2.9-2.9" }),
|
|
536
|
+
/* @__PURE__ */ jsx("path", { d: "M18 12h4" }),
|
|
537
|
+
/* @__PURE__ */ jsx("path", { d: "m16.2 16.2 2.9 2.9" }),
|
|
538
|
+
/* @__PURE__ */ jsx("path", { d: "M12 18v4" }),
|
|
539
|
+
/* @__PURE__ */ jsx("path", { d: "m4.9 19.1 2.9-2.9" }),
|
|
540
|
+
/* @__PURE__ */ jsx("path", { d: "M2 12h4" }),
|
|
541
|
+
/* @__PURE__ */ jsx("path", { d: "m4.9 4.9 2.9 2.9" })
|
|
542
|
+
] });
|
|
543
|
+
}
|
|
544
|
+
function Sun(props) {
|
|
545
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
546
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4" }),
|
|
547
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2v2" }),
|
|
548
|
+
/* @__PURE__ */ jsx("path", { d: "M12 20v2" }),
|
|
549
|
+
/* @__PURE__ */ jsx("path", { d: "m4.93 4.93 1.41 1.41" }),
|
|
550
|
+
/* @__PURE__ */ jsx("path", { d: "m17.66 17.66 1.41 1.41" }),
|
|
551
|
+
/* @__PURE__ */ jsx("path", { d: "M2 12h2" }),
|
|
552
|
+
/* @__PURE__ */ jsx("path", { d: "M20 12h2" }),
|
|
553
|
+
/* @__PURE__ */ jsx("path", { d: "m6.34 17.66-1.41 1.41" }),
|
|
554
|
+
/* @__PURE__ */ jsx("path", { d: "m19.07 4.93-1.41 1.41" })
|
|
555
|
+
] });
|
|
556
|
+
}
|
|
557
|
+
function Moon(props) {
|
|
558
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }) });
|
|
559
|
+
}
|
|
560
|
+
function Lock(props) {
|
|
561
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
562
|
+
/* @__PURE__ */ jsx("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
563
|
+
/* @__PURE__ */ jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
564
|
+
] });
|
|
565
|
+
}
|
|
566
|
+
function LockOpen(props) {
|
|
567
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
568
|
+
/* @__PURE__ */ jsx("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
569
|
+
/* @__PURE__ */ jsx("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })
|
|
570
|
+
] });
|
|
571
|
+
}
|
|
572
|
+
function CircleQuestionMark(props) {
|
|
573
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
574
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
575
|
+
/* @__PURE__ */ jsx("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
576
|
+
/* @__PURE__ */ jsx("path", { d: "M12 17h.01" })
|
|
577
|
+
] });
|
|
578
|
+
}
|
|
579
|
+
function Ban(props) {
|
|
580
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
581
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
582
|
+
/* @__PURE__ */ jsx("path", { d: "M4.929 4.929 19.07 19.071" })
|
|
583
|
+
] });
|
|
584
|
+
}
|
|
585
|
+
function CheckCheck(props) {
|
|
586
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
587
|
+
/* @__PURE__ */ jsx("path", { d: "M18 6 7 17l-5-5" }),
|
|
588
|
+
/* @__PURE__ */ jsx("path", { d: "m22 10-7.5 7.5L13 16" })
|
|
589
|
+
] });
|
|
590
|
+
}
|
|
591
|
+
function OctagonAlert(props) {
|
|
592
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
593
|
+
/* @__PURE__ */ jsx("path", { d: "M12 16h.01" }),
|
|
594
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8v4" }),
|
|
595
|
+
/* @__PURE__ */ jsx("path", { d: "M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z" })
|
|
596
|
+
] });
|
|
597
|
+
}
|
|
598
|
+
function Play(props) {
|
|
599
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" }) });
|
|
600
|
+
}
|
|
601
|
+
function Pause(props) {
|
|
602
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
603
|
+
/* @__PURE__ */ jsx("rect", { x: "14", y: "3", width: "5", height: "18", rx: "1" }),
|
|
604
|
+
/* @__PURE__ */ jsx("rect", { x: "5", y: "3", width: "5", height: "18", rx: "1" })
|
|
605
|
+
] });
|
|
606
|
+
}
|
|
607
|
+
function Square(props) {
|
|
608
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }) });
|
|
609
|
+
}
|
|
610
|
+
function Globe(props) {
|
|
611
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
612
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
613
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }),
|
|
614
|
+
/* @__PURE__ */ jsx("path", { d: "M2 12h20" })
|
|
615
|
+
] });
|
|
616
|
+
}
|
|
617
|
+
function Image(props) {
|
|
618
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
619
|
+
/* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }),
|
|
620
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "9", r: "2" }),
|
|
621
|
+
/* @__PURE__ */ jsx("path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" })
|
|
622
|
+
] });
|
|
623
|
+
}
|
|
624
|
+
function File(props) {
|
|
625
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
626
|
+
/* @__PURE__ */ jsx("path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }),
|
|
627
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5a1 1 0 0 0 1 1h5" })
|
|
628
|
+
] });
|
|
629
|
+
}
|
|
630
|
+
function Link(props) {
|
|
631
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
632
|
+
/* @__PURE__ */ jsx("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
|
|
633
|
+
/* @__PURE__ */ jsx("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
|
|
634
|
+
] });
|
|
635
|
+
}
|
|
636
|
+
function Package(props) {
|
|
637
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
638
|
+
/* @__PURE__ */ jsx("path", { d: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z" }),
|
|
639
|
+
/* @__PURE__ */ jsx("path", { d: "M12 22V12" }),
|
|
640
|
+
/* @__PURE__ */ jsx("polyline", { points: "3.29 7 12 12 20.71 7" }),
|
|
641
|
+
/* @__PURE__ */ jsx("path", { d: "m7.5 4.27 9 5.15" })
|
|
642
|
+
] });
|
|
643
|
+
}
|
|
644
|
+
function Rocket(props) {
|
|
645
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
646
|
+
/* @__PURE__ */ jsx("path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" }),
|
|
647
|
+
/* @__PURE__ */ jsx("path", { d: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09" }),
|
|
648
|
+
/* @__PURE__ */ jsx("path", { d: "M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z" }),
|
|
649
|
+
/* @__PURE__ */ jsx("path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05" })
|
|
650
|
+
] });
|
|
651
|
+
}
|
|
652
|
+
function Grid3x3(props) {
|
|
653
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
654
|
+
/* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
655
|
+
/* @__PURE__ */ jsx("path", { d: "M3 9h18" }),
|
|
656
|
+
/* @__PURE__ */ jsx("path", { d: "M3 15h18" }),
|
|
657
|
+
/* @__PURE__ */ jsx("path", { d: "M9 3v18" }),
|
|
658
|
+
/* @__PURE__ */ jsx("path", { d: "M15 3v18" })
|
|
659
|
+
] });
|
|
660
|
+
}
|
|
661
|
+
function NotebookPen(props) {
|
|
662
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
663
|
+
/* @__PURE__ */ jsx("path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4" }),
|
|
664
|
+
/* @__PURE__ */ jsx("path", { d: "M2 6h4" }),
|
|
665
|
+
/* @__PURE__ */ jsx("path", { d: "M2 10h4" }),
|
|
666
|
+
/* @__PURE__ */ jsx("path", { d: "M2 14h4" }),
|
|
667
|
+
/* @__PURE__ */ jsx("path", { d: "M2 18h4" }),
|
|
668
|
+
/* @__PURE__ */ jsx("path", { d: "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" })
|
|
669
|
+
] });
|
|
670
|
+
}
|
|
671
|
+
function CodeXml(props) {
|
|
672
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
673
|
+
/* @__PURE__ */ jsx("path", { d: "m18 16 4-4-4-4" }),
|
|
674
|
+
/* @__PURE__ */ jsx("path", { d: "m6 8-4 4 4 4" }),
|
|
675
|
+
/* @__PURE__ */ jsx("path", { d: "m14.5 4-5 16" })
|
|
676
|
+
] });
|
|
677
|
+
}
|
|
678
|
+
function TrendingUp(props) {
|
|
679
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
680
|
+
/* @__PURE__ */ jsx("path", { d: "M16 7h6v6" }),
|
|
681
|
+
/* @__PURE__ */ jsx("path", { d: "m22 7-8.5 8.5-5-5L2 17" })
|
|
682
|
+
] });
|
|
683
|
+
}
|
|
684
|
+
function TrendingDown(props) {
|
|
685
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
686
|
+
/* @__PURE__ */ jsx("path", { d: "M16 17h6v-6" }),
|
|
687
|
+
/* @__PURE__ */ jsx("path", { d: "m22 17-8.5-8.5-5 5L2 7" })
|
|
688
|
+
] });
|
|
689
|
+
}
|
|
690
|
+
function ChartLine(props) {
|
|
691
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
692
|
+
/* @__PURE__ */ jsx("path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }),
|
|
693
|
+
/* @__PURE__ */ jsx("path", { d: "m19 9-5 5-4-4-3 3" })
|
|
694
|
+
] });
|
|
695
|
+
}
|
|
696
|
+
function ChartColumn(props) {
|
|
697
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
698
|
+
/* @__PURE__ */ jsx("path", { d: "M3 3v16a2 2 0 0 0 2 2h16" }),
|
|
699
|
+
/* @__PURE__ */ jsx("path", { d: "M18 17V9" }),
|
|
700
|
+
/* @__PURE__ */ jsx("path", { d: "M13 17V5" }),
|
|
701
|
+
/* @__PURE__ */ jsx("path", { d: "M8 17v-3" })
|
|
702
|
+
] });
|
|
703
|
+
}
|
|
704
|
+
function ChartCandlestick(props) {
|
|
705
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
706
|
+
/* @__PURE__ */ jsx("path", { d: "M9 5v4" }),
|
|
707
|
+
/* @__PURE__ */ jsx("rect", { width: "4", height: "6", x: "7", y: "9", rx: "1" }),
|
|
708
|
+
/* @__PURE__ */ jsx("path", { d: "M9 15v2" }),
|
|
709
|
+
/* @__PURE__ */ jsx("path", { d: "M17 3v2" }),
|
|
710
|
+
/* @__PURE__ */ jsx("rect", { width: "4", height: "8", x: "15", y: "5", rx: "1" }),
|
|
711
|
+
/* @__PURE__ */ jsx("path", { d: "M17 13v3" }),
|
|
712
|
+
/* @__PURE__ */ jsx("path", { d: "M3 3v16a2 2 0 0 0 2 2h16" })
|
|
713
|
+
] });
|
|
714
|
+
}
|
|
715
|
+
function ChartPie(props) {
|
|
716
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
717
|
+
/* @__PURE__ */ jsx("path", { d: "M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" }),
|
|
718
|
+
/* @__PURE__ */ jsx("path", { d: "M21.21 15.89A10 10 0 1 1 8 2.83" })
|
|
719
|
+
] });
|
|
720
|
+
}
|
|
721
|
+
function Wallet(props) {
|
|
722
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
723
|
+
/* @__PURE__ */ jsx("path", { d: "M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" }),
|
|
724
|
+
/* @__PURE__ */ jsx("path", { d: "M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4" })
|
|
725
|
+
] });
|
|
726
|
+
}
|
|
727
|
+
function Briefcase(props) {
|
|
728
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
729
|
+
/* @__PURE__ */ jsx("path", { d: "M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" }),
|
|
730
|
+
/* @__PURE__ */ jsx("rect", { width: "20", height: "14", x: "2", y: "6", rx: "2" })
|
|
731
|
+
] });
|
|
732
|
+
}
|
|
733
|
+
function Calendar(props) {
|
|
734
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
735
|
+
/* @__PURE__ */ jsx("path", { d: "M8 2v4" }),
|
|
736
|
+
/* @__PURE__ */ jsx("path", { d: "M16 2v4" }),
|
|
737
|
+
/* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }),
|
|
738
|
+
/* @__PURE__ */ jsx("path", { d: "M3 10h18" })
|
|
739
|
+
] });
|
|
740
|
+
}
|
|
741
|
+
function Bookmark(props) {
|
|
742
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z" }) });
|
|
743
|
+
}
|
|
744
|
+
function Percent(props) {
|
|
745
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
746
|
+
/* @__PURE__ */ jsx("line", { x1: "19", x2: "5", y1: "5", y2: "19" }),
|
|
747
|
+
/* @__PURE__ */ jsx("circle", { cx: "6.5", cy: "6.5", r: "2.5" }),
|
|
748
|
+
/* @__PURE__ */ jsx("circle", { cx: "17.5", cy: "17.5", r: "2.5" })
|
|
749
|
+
] });
|
|
750
|
+
}
|
|
751
|
+
function DollarSign(props) {
|
|
752
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
753
|
+
/* @__PURE__ */ jsx("line", { x1: "12", x2: "12", y1: "2", y2: "22" }),
|
|
754
|
+
/* @__PURE__ */ jsx("path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" })
|
|
755
|
+
] });
|
|
756
|
+
}
|
|
757
|
+
function Activity(props) {
|
|
758
|
+
return /* @__PURE__ */ jsx(IconBase, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" }) });
|
|
759
|
+
}
|
|
760
|
+
function Target(props) {
|
|
761
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
762
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
763
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "6" }),
|
|
764
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2" })
|
|
765
|
+
] });
|
|
766
|
+
}
|
|
767
|
+
function Scale(props) {
|
|
768
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
769
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3v18" }),
|
|
770
|
+
/* @__PURE__ */ jsx("path", { d: "m19 8 3 8a5 5 0 0 1-6 0zV7" }),
|
|
771
|
+
/* @__PURE__ */ jsx("path", { d: "M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1" }),
|
|
772
|
+
/* @__PURE__ */ jsx("path", { d: "m5 8 3 8a5 5 0 0 1-6 0zV7" }),
|
|
773
|
+
/* @__PURE__ */ jsx("path", { d: "M7 21h10" })
|
|
774
|
+
] });
|
|
775
|
+
}
|
|
776
|
+
function Banknote(props) {
|
|
777
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
778
|
+
/* @__PURE__ */ jsx("rect", { width: "20", height: "12", x: "2", y: "6", rx: "2" }),
|
|
779
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2" }),
|
|
780
|
+
/* @__PURE__ */ jsx("path", { d: "M6 12h.01M18 12h.01" })
|
|
781
|
+
] });
|
|
782
|
+
}
|
|
783
|
+
function AiSparkle(props) {
|
|
784
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
785
|
+
/* @__PURE__ */ jsx("path", { d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" }),
|
|
786
|
+
/* @__PURE__ */ jsx("path", { d: "M20 2v4" }),
|
|
787
|
+
/* @__PURE__ */ jsx("path", { d: "M22 4h-4" }),
|
|
788
|
+
/* @__PURE__ */ jsx("circle", { cx: "4", cy: "20", r: "2" })
|
|
789
|
+
] });
|
|
790
|
+
}
|
|
791
|
+
function Bot(props) {
|
|
792
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
793
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8V4H8" }),
|
|
794
|
+
/* @__PURE__ */ jsx("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
|
|
795
|
+
/* @__PURE__ */ jsx("path", { d: "M2 14h2" }),
|
|
796
|
+
/* @__PURE__ */ jsx("path", { d: "M20 14h2" }),
|
|
797
|
+
/* @__PURE__ */ jsx("path", { d: "M15 13v2" }),
|
|
798
|
+
/* @__PURE__ */ jsx("path", { d: "M9 13v2" })
|
|
799
|
+
] });
|
|
800
|
+
}
|
|
801
|
+
function BotMessageSquare(props) {
|
|
802
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
803
|
+
/* @__PURE__ */ jsx("path", { d: "M12 6V2H8" }),
|
|
804
|
+
/* @__PURE__ */ jsx("path", { d: "M15 11v2" }),
|
|
805
|
+
/* @__PURE__ */ jsx("path", { d: "M2 12h2" }),
|
|
806
|
+
/* @__PURE__ */ jsx("path", { d: "M20 12h2" }),
|
|
807
|
+
/* @__PURE__ */ jsx("path", { d: "M20 16a2 2 0 0 1-2 2H8.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 4 20.286V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z" }),
|
|
808
|
+
/* @__PURE__ */ jsx("path", { d: "M9 11v2" })
|
|
809
|
+
] });
|
|
810
|
+
}
|
|
811
|
+
function Cpu(props) {
|
|
812
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
813
|
+
/* @__PURE__ */ jsx("path", { d: "M12 20v2" }),
|
|
814
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2v2" }),
|
|
815
|
+
/* @__PURE__ */ jsx("path", { d: "M17 20v2" }),
|
|
816
|
+
/* @__PURE__ */ jsx("path", { d: "M17 2v2" }),
|
|
817
|
+
/* @__PURE__ */ jsx("path", { d: "M2 12h2" }),
|
|
818
|
+
/* @__PURE__ */ jsx("path", { d: "M2 17h2" }),
|
|
819
|
+
/* @__PURE__ */ jsx("path", { d: "M2 7h2" }),
|
|
820
|
+
/* @__PURE__ */ jsx("path", { d: "M20 12h2" }),
|
|
821
|
+
/* @__PURE__ */ jsx("path", { d: "M20 17h2" }),
|
|
822
|
+
/* @__PURE__ */ jsx("path", { d: "M20 7h2" }),
|
|
823
|
+
/* @__PURE__ */ jsx("path", { d: "M7 20v2" }),
|
|
824
|
+
/* @__PURE__ */ jsx("path", { d: "M7 2v2" }),
|
|
825
|
+
/* @__PURE__ */ jsx("rect", { x: "4", y: "4", width: "16", height: "16", rx: "2" }),
|
|
826
|
+
/* @__PURE__ */ jsx("rect", { x: "8", y: "8", width: "8", height: "8", rx: "1" })
|
|
827
|
+
] });
|
|
828
|
+
}
|
|
829
|
+
function AgentStocky(props) {
|
|
830
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
831
|
+
/* @__PURE__ */ jsx("path", { d: "M12 6 8.6 2.25" }),
|
|
832
|
+
/* @__PURE__ */ jsx("path", { d: "M12 6 15.4 2.25" }),
|
|
833
|
+
/* @__PURE__ */ jsx("circle", { cx: "8.6", cy: "2.25", r: "1.05", fill: "currentColor" }),
|
|
834
|
+
/* @__PURE__ */ jsx("circle", { cx: "15.4", cy: "2.25", r: "1.05", fill: "currentColor" }),
|
|
835
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "6", width: "18", height: "15", rx: "3.4" }),
|
|
836
|
+
/* @__PURE__ */ jsx(
|
|
837
|
+
"rect",
|
|
838
|
+
{
|
|
839
|
+
x: "5.25",
|
|
840
|
+
y: "8.25",
|
|
841
|
+
width: "13.5",
|
|
842
|
+
height: "10.1",
|
|
843
|
+
rx: "1.9",
|
|
844
|
+
fill: "currentColor",
|
|
845
|
+
opacity: "0.12"
|
|
846
|
+
}
|
|
847
|
+
),
|
|
848
|
+
/* @__PURE__ */ jsx("circle", { cx: "9.45", cy: "13.2", r: "1.46", fill: "currentColor" }),
|
|
849
|
+
/* @__PURE__ */ jsx("circle", { cx: "14.55", cy: "13.2", r: "1.46", fill: "currentColor" }),
|
|
850
|
+
/* @__PURE__ */ jsx("path", { d: "M7.1 21v1.5M16.9 21v1.5" })
|
|
851
|
+
] });
|
|
852
|
+
}
|
|
853
|
+
function AgentOrb(props) {
|
|
854
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
855
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" }),
|
|
856
|
+
/* @__PURE__ */ jsx("path", { d: "M6.6 7.6a8 8 0 0 0 0 8.8" }),
|
|
857
|
+
/* @__PURE__ */ jsx("path", { d: "M17.4 7.6a8 8 0 0 1 0 8.8" }),
|
|
858
|
+
/* @__PURE__ */ jsx("path", { d: "M3.8 5a12 12 0 0 0 0 14" }),
|
|
859
|
+
/* @__PURE__ */ jsx("path", { d: "M20.2 5a12 12 0 0 1 0 14" })
|
|
860
|
+
] });
|
|
861
|
+
}
|
|
862
|
+
function AgentDroid(props) {
|
|
863
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
864
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12a7 7 0 0 1 14 0v5a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z" }),
|
|
865
|
+
/* @__PURE__ */ jsx("path", { d: "M12 5V3.5" }),
|
|
866
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "2.6", r: "1" }),
|
|
867
|
+
/* @__PURE__ */ jsx("rect", { x: "8", y: "11.5", width: "8", height: "3.6", rx: "1.8" })
|
|
868
|
+
] });
|
|
869
|
+
}
|
|
870
|
+
function AgentHex(props) {
|
|
871
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
872
|
+
/* @__PURE__ */ jsx("path", { d: "m12 3 7.5 4.3v8.6L12 20.2 4.5 15.9V7.3z" }),
|
|
873
|
+
/* @__PURE__ */ jsx("circle", { cx: "9.6", cy: "11.4", r: "1" }),
|
|
874
|
+
/* @__PURE__ */ jsx("circle", { cx: "14.4", cy: "11.4", r: "1" }),
|
|
875
|
+
/* @__PURE__ */ jsx("path", { d: "M9.6 15h4.8" })
|
|
876
|
+
] });
|
|
877
|
+
}
|
|
878
|
+
function GitHub(props) {
|
|
879
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" }) });
|
|
880
|
+
}
|
|
881
|
+
function NPM(props) {
|
|
882
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z" }) });
|
|
883
|
+
}
|
|
884
|
+
function Figma(props) {
|
|
885
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M15.852 8.981h-4.588V0h4.588c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.491-4.49 4.491zM12.735 7.51h3.117c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-3.117V7.51zm0 1.471H8.148c-2.476 0-4.49-2.014-4.49-4.49S5.672 0 8.148 0h4.588v8.981zm-4.587-7.51c-1.665 0-3.019 1.355-3.019 3.019s1.354 3.02 3.019 3.02h3.117V1.471H8.148zm4.587 15.019H8.148c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h4.588v8.98zM8.148 8.981c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h3.117V8.981H8.148zM8.172 24c-2.489 0-4.515-2.014-4.515-4.49s2.014-4.49 4.49-4.49h4.588v4.441c0 2.503-2.047 4.539-4.563 4.539zm-.024-7.51a3.023 3.023 0 0 0-3.019 3.019c0 1.665 1.365 3.019 3.044 3.019 1.705 0 3.093-1.376 3.093-3.068v-2.97H8.148zm7.704 0h-.098c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h.098c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.49-4.49 4.49zm-.097-7.509c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h.098c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-.098z" }) });
|
|
886
|
+
}
|
|
887
|
+
function Notion(props) {
|
|
888
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z" }) });
|
|
889
|
+
}
|
|
890
|
+
function Vercel(props) {
|
|
891
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "m12 1.608 12 20.784H0Z" }) });
|
|
892
|
+
}
|
|
893
|
+
function ChromeWebStore(props) {
|
|
894
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M0 1.637v19.09c0 .9.736 1.636 1.636 1.636h.131a10.4 10.4 0 0 1-.13-1.636 10.3 10.3 0 0 1 1.667-5.64l4.202 7.276h1.128A3.77 3.77 0 0 1 12 16.958a3.77 3.77 0 0 1 3.366 5.406h1.048a4.7 4.7 0 0 0-1.587-5.406h6.83a10.34 10.34 0 0 1 .577 5.406h.13c.9 0 1.636-.737 1.636-1.637V1.637Zm9.273 2.181h5.454a1.09 1.09 0 1 1 0 2.182H9.273a1.09 1.09 0 1 1 0-2.182M12 10.364a10.36 10.36 0 0 1 9.233 5.652H12a4.71 4.71 0 0 0-4.677 4.149L3.91 14.25A10.34 10.34 0 0 1 12 10.364" }) });
|
|
895
|
+
}
|
|
896
|
+
function VSCode(props) {
|
|
897
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M11.583.54a1.467 1.467 0 0 0-.441 2.032c2.426 3.758 2.999 6.592 2.75 9.075-1.004 4.756-3.187 5.721-5.094 5.721-1.863 0-1.364-3.065.036-3.962.836-.522 1.906-.861 2.728-.861.814 0 1.474-.658 1.474-1.47 0-.812-.66-1.47-1.474-1.47-.96 0-1.901.202-2.78.545.18-.847.246-1.762.014-2.735-.352-1.477-1.367-2.889-3.128-4.257a1.476 1.476 0 0 0-2.069.256c-.5.64-.384 1.564.259 2.063 1.435 1.114 1.908 1.939 2.07 2.618.162.679.032 1.407-.293 2.408-.416 1.349-.9 2.553-1.11 3.708-.105.568-.114 1.187-.14 1.68-1.034-1.006-1.438-2.336-1.438-4.279 0-.811-.66-1.47-1.474-1.47-.814.001-1.473.659-1.473 1.47 0 2.654.776 5.179 2.855 6.863 1.883 1.793 6.67 1.13 6.67 4.01 0 .812 1.19 1.208 2.004 1.208.834 0 1.885-.558 1.885-1.208 0-3.267 3.443-5.253 9.11-5.244A1.472 1.472 0 0 0 24 15.773 1.472 1.472 0 0 0 22.53 14.3c-.388 0-.765.013-1.138.035.634-1.49.915-3.13.857-4.903a1.473 1.473 0 0 0-1.522-1.42 1.472 1.472 0 0 0-1.425 1.517c.076 2.32-.01 4.393-1.74 5.485-.49.31-1.062.58-1.604.58.42-1.145.738-2.353.869-3.655.083-.83.091-1.818-.003-2.585-.148-1.188-.325-2.535.126-3.55.405-.874 1.313-1.24 2.645-1.24.814 0 1.473-.659 1.473-1.47 0-.811-.659-1.47-1.473-1.47-1.98 0-3.481 1.042-4.332 2.3-.445-.95-.987-1.929-1.642-2.943a1.474 1.474 0 0 0-2.037-.44z" }) });
|
|
898
|
+
}
|
|
899
|
+
function Linear(props) {
|
|
900
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z" }) });
|
|
901
|
+
}
|
|
902
|
+
function LinkedIn(props) {
|
|
903
|
+
return /* @__PURE__ */ jsxs(IconBase, { ...props, children: [
|
|
904
|
+
/* @__PURE__ */ jsx("path", { d: "M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-4 0v7h-4v-7a6 6 0 0 1 6-6z" }),
|
|
905
|
+
/* @__PURE__ */ jsx("rect", { width: "4", height: "12", x: "2", y: "9" }),
|
|
906
|
+
/* @__PURE__ */ jsx("circle", { cx: "4", cy: "4", r: "2" })
|
|
907
|
+
] });
|
|
908
|
+
}
|
|
909
|
+
function XTwitter(props) {
|
|
910
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z" }) });
|
|
911
|
+
}
|
|
912
|
+
function YouTube(props) {
|
|
913
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" }) });
|
|
914
|
+
}
|
|
915
|
+
function Google(props) {
|
|
916
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z" }) });
|
|
917
|
+
}
|
|
918
|
+
function Reddit(props) {
|
|
919
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z" }) });
|
|
920
|
+
}
|
|
921
|
+
function OpenAI(props) {
|
|
922
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z" }) });
|
|
923
|
+
}
|
|
924
|
+
function Anthropic(props) {
|
|
925
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z" }) });
|
|
926
|
+
}
|
|
927
|
+
function Claude(props) {
|
|
928
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z" }) });
|
|
929
|
+
}
|
|
930
|
+
function Gemini(props) {
|
|
931
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81" }) });
|
|
932
|
+
}
|
|
933
|
+
function DeepSeek(props) {
|
|
934
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M23.748 4.651c-.254-.124-.364.113-.512.233-.051.04-.094.09-.137.137-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.155-.708-.311-.955-.65-.172-.24-.219-.509-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.094.172.187.129.323-.082.28-.18.553-.266.833-.055.179-.137.218-.328.14a5.5 5.5 0 0 1-1.737-1.179c-.857-.828-1.631-1.743-2.597-2.46a12 12 0 0 0-.689-.47c-.985-.957.13-1.743.387-1.836.27-.098.094-.433-.778-.428-.872.003-1.67.295-2.687.685a3 3 0 0 1-.465.136 9.6 9.6 0 0 0-2.883-.101c-1.885.21-3.39 1.1-4.497 2.622C.082 8.776-.231 10.854.152 13.02c.403 2.284 1.568 4.175 3.36 5.653 1.857 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.132-.284 4.994-1.86.47.234.962.328 1.78.398.629.058 1.235-.031 1.705-.129.735-.155.684-.836.418-.961-2.155-1.004-1.682-.595-2.112-.926 1.095-1.295 2.768-3.598 3.284-6.733.05-.346.115-.834.108-1.114-.004-.171.035-.238.23-.257a4.2 4.2 0 0 0 1.545-.475c1.397-.763 1.96-2.016 2.093-3.517.02-.23-.004-.467-.247-.588M11.58 18.168c-2.088-1.642-3.101-2.183-3.52-2.16-.39.024-.32.472-.234.763.09.288.207.487.371.74.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.168-1.361-.801-2.5-1.86-3.301-3.306-.775-1.393-1.225-2.888-1.299-4.482-.02-.385.094-.522.477-.592a4.7 4.7 0 0 1 1.53-.038c2.131.311 3.946 1.264 5.467 2.774.868.86 1.525 1.887 2.202 2.89.72 1.066 1.494 2.082 2.48 2.915.348.291.626.513.892.677-.802.09-2.14.109-3.055-.615zm1.001-6.44a.306.306 0 0 1 .415-.287.3.3 0 0 1 .113.074.3.3 0 0 1 .086.214c0 .17-.136.307-.308.307a.303.303 0 0 1-.306-.307m3.11 1.596c-.2.081-.4.151-.591.16a1.25 1.25 0 0 1-.798-.254c-.274-.23-.47-.358-.551-.758a1.7 1.7 0 0 1 .015-.588c.07-.327-.007-.537-.238-.727-.188-.156-.426-.199-.689-.199a.6.6 0 0 1-.254-.078.253.253 0 0 1-.114-.358 1 1 0 0 1 .192-.21c.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.392.451.462.576.685.915.176.264.336.536.446.848.066.194-.02.353-.25.45" }) });
|
|
935
|
+
}
|
|
936
|
+
function Moonshot(props) {
|
|
937
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "m1.053 16.91 9.538 2.55a21 20.981 0 0 0 .06 2.031l5.956 1.592a12 11.99 0 0 1-15.554-6.172m-1.02-5.79 11.352 3.035a21 20.981 0 0 0-.469 2.01l10.817 2.89a12 11.99 0 0 1-1.845 2.004L.658 15.918a12 11.99 0 0 1-.625-4.796m1.593-5.146L13.573 9.17a21 20.981 0 0 0-1.01 1.874l11.297 3.02a21 20.981 0 0 1-.67 2.362l-11.55-3.087L.125 10.26a12 11.99 0 0 1 1.499-4.285ZM6.067 1.58l11.285 3.016a21 20.981 0 0 0-1.688 1.719l7.824 2.091a21 20.981 0 0 1 .513 2.664L2.107 5.218a12 11.99 0 0 1 3.96-3.638M21.68 4.866 7.222 1.003A12 11.99 0 0 1 21.68 4.866" }) });
|
|
938
|
+
}
|
|
939
|
+
function GLM(props) {
|
|
940
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsxs("g", { fillRule: "evenodd", children: [
|
|
941
|
+
/* @__PURE__ */ jsx("path", { d: "M19.028 3.853a1.31 1.31 0 101.309 1.309 1.31 1.31 0 00-1.31-1.31zm.594 1.987a.664.664 0 11.001-1.329.664.664 0 01-.001 1.329z" }),
|
|
942
|
+
/* @__PURE__ */ jsx("path", { d: "M19.67 4.814a.348.348 0 000 .695.348.348 0 000-.695zM14.117 16.317a.037.037 0 00-.027-.061c-.314-.005-1.499-.093-2.105-1.082a2.088 2.088 0 01-.089-2.027.04.04 0 000-.033l-1.005-1.81c-.008-.016-.027-.02-.044-.017-2.018.396-3.194 2.104-2.838 3.788.096.458.285.864.578 1.237.748.95 1.859 1.26 2.675 1.235 1.69-.05 2.63-.977 2.856-1.23zM4.766 6.906a9.903 9.903 0 012.487-2.153L5.63 1.829a.58.58 0 00-.514-.298l-4.809.04a.31.31 0 00-.268.46l3.62 6.525c.41-.756.823-1.311 1.106-1.65zM17.52 10.93c-.422.01-.824-.01-1.044.027-.183.031-.657.121-1.14.574a.037.037 0 00.016.062c.329.087.633.237.928.416.63.383 1.205 1.346 1.383 1.8.01.03.051.032.066.004l1.72-3.27c.015-.03-.015-.064-.047-.051-.806.328-1.476.43-1.883.439h.001zM23.687 1.512l-4.546.037a.58.58 0 00-.507.306l-.126.27c.364-.009 2.426.152 4.158 2.308l1.298-2.467a.31.31 0 00-.277-.455v.001zM10.846 21.497l.843 1.517a.31.31 0 00.533.016l1.31-2.064a8.27 8.27 0 01-2.686.53z" }),
|
|
943
|
+
/* @__PURE__ */ jsx("path", { d: "M22.327 5.379c-1.461-2.435-3.529-2.393-3.529-2.393-.951-.186-1.436-1.263-3.626-1.797-2.046-.5-3.188.112-2.368.451 1.322.548 2.075 2.73 2.462 4.374.494 2.1 1.569 2.14 2.758 2.011.924-.098 2.775-1.058 3.721-1.256 1.03-.216 1.353-.101.58-1.39h.002zm-3.373 1.538a1.757 1.757 0 11.001-3.514 1.757 1.757 0 010 3.514zM12.756 13.364c-.261.623.032 1.57 1.316 1.656.08 0 .12-.053.12-.12 0-.065-.058-.097-.12-.119-.062-.022-.654-.226-.524-.918.042-.23.248-.438.5-.533-.142-.265-.143-.622.06-.965-.343 0-1.015.194-1.353 1v-.001zM16.836 14.624c0-.684-.451-1.41-.805-1.64-.307-.107-.816.06-1.103.487.337.22.553.572.59 1.48.046 1.174-.844 2.184-2.035 2.76 1.764-.34 3.353-1.79 3.353-3.087zM6.201 16.591C2.802 12.248 4.841 6.44 9.795 4.472c-6.168 2.08-8.01 8.89-4.547 13.168 2.299 2.84 6.254 2.937 8.373 2.2-2.571-.213-5.33-.578-7.42-3.248zM15.09 10.445c.03-.012.03-.054 0-.067-.06-.028-.175-.05-.387.004-.411.102-1.42.264-1.34-.226.055-.349.614-.46 1.023-1.128.202-.33-.06-.875-.59-.875-.408 0-.828.186-1.285.67-.64.676-.766 1.31-.518 1.776.234.442.784.633 1.702.48.628-.103.82-.381 1.396-.635v.001z" }),
|
|
944
|
+
/* @__PURE__ */ jsx("path", { d: "M14.685 12.364s-.492.177-.436.934c.183-.046.239-.028.488.092.114-.338.407-.623.84-.623.078 0 .155.009.23.024-.29-.219-.591-.4-1.12-.427h-.002zM18.253 9.573c-2.444.515-2.48-1.58-4.28-1.985-2.423-.544-5.526.905-6.888 3.545-.554 1.074-1.076 3.178.283 4.97-.854-2.323.434-4.032 1.264-4.702.782-.629 1.738-1.026 2.682-1.267a.035.035 0 00.027-.034c.016-.51.276-1.055.767-1.574.521-.552 1.055-.819 1.631-.819.422 0 .793.215.994.573.185.33.185.725 0 1.026-.11.18-.228.326-.345.447-.022.021-.006.06.024.06 1.132.071 2.063.347 2.893.284 3.134-.24 4.25-1.91 4.652-2.217.365-.278-2.385 1.413-3.706 1.69l.002.003z" }),
|
|
945
|
+
/* @__PURE__ */ jsx("path", { d: "M15.159 16.452c-.916.916-2.416 2.208-5.318 1.665-2.105-.394-3.719-3.312-3.25-6.832.252-1.883 1.712-3.64 3.082-4.206 2.995-1.24 4.57.081 5.298.897.516.579 1.106 1.773 3.014 1.757 1.456-.012 3.978-1.726 4.678-2.372.24-.221-.021-.343-.418-.308-1.514.136-2.916 1.752-4.976 1.664-1.017-.043-2.298-.742-2.75-2.25-.542-1.812-.553-2.19-1.176-2.297-.653-.112-1.648-.173-3.087.275-1.863.583-4.784 3.436-4.97 6.84-.324 5.884 2.306 8.243 6.36 8.743.459.056 1.462-.066 1.909-.162a5.727 5.727 0 001.565-.967c1.01-.908 1.626-1.918 1.77-3.376.05-.49-.069-1.14-.135-1.425-.023.302-.623 1.376-1.597 2.35v.004z" })
|
|
946
|
+
] }) });
|
|
947
|
+
}
|
|
948
|
+
function Mistral(props) {
|
|
949
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z" }) });
|
|
950
|
+
}
|
|
951
|
+
function Perplexity(props) {
|
|
952
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M22.3977 7.0896h-2.3106V.0676l-7.5094 6.3542V.1577h-1.1554v6.1966L4.4904 0v7.0896H1.6023v10.3976h2.8882V24l6.932-6.3591v6.2005h1.1554v-6.0469l6.9318 6.1807v-6.4879h2.8882V7.0896zm-3.4657-4.531v4.531h-5.355l5.355-4.531zm-13.2862.0676 4.8691 4.4634H5.6458V2.6262zM2.7576 16.332V8.245h7.8476l-6.1149 6.1147v1.9723H2.7576zm2.8882 5.0404v-3.8852h.0001v-2.6488l5.7763-5.7764v7.0111l-5.7764 5.2993zm12.7086.0248-5.7766-5.1509V9.0618l5.7766 5.7766v6.5588zm2.8882-5.0652h-1.733v-1.9723L13.3948 8.245h7.8478v8.087z" }) });
|
|
953
|
+
}
|
|
954
|
+
function HuggingFace(props) {
|
|
955
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378 0 1.112.178 2.181.503 3.185.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284.278.173.48.408.71.694.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542.01.026.653 1.552 1.657 2.54.616.605 1.01 1.223 1.082 1.912.055.537-.096 1.059-.38 1.572.637.121 1.294.187 1.967.187.657 0 1.298-.063 1.921-.178-.287-.517-.44-1.041-.384-1.581.07-.69.465-1.307 1.081-1.913 1.004-.987 1.647-2.513 1.657-2.539.021-.074.083-.285.233-.542.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952.23-.286.432-.52.71-.694.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174 1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013 1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164 1.607-.007 2.984-1.155 3.572-1.164.196-.003.305.12.305.454 0 .886-.424 2.328-1.563 3.202-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026-.01.008-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116 1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243 1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444-.034-.016-.104-.008-.2.022q-.094.03-.216.087-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096 3 3 0 0 0-.26.219 2 2 0 0 0-.12.121 2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203 0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647 2.822 2.813 2.562 3.244-1.176-.506-1.176-.506-2.866-2.567-3.49-1.898.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405-.238.839-2.71-1.587-3.216-.642-.506.946 3.49 2.056 3.522 2.064 1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194 1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647-2.822 2.813-2.562 3.244 1.176-.506 1.176-.506 2.866-2.567 3.49-1.898-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405.238.839 2.71-1.587 3.216-.642.506.946-3.49 2.056-3.522 2.064-1.29.33-4.568 1.028-5.713-.624" }) });
|
|
956
|
+
}
|
|
957
|
+
function Ollama(props) {
|
|
958
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M16.361 10.26a.894.894 0 0 0-.558.47l-.072.148.001.207c0 .193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86 0 0 0 .517-.436.752.752 0 0 0 .08-.498c-.064-.453-.33-.782-.724-.897a1.06 1.06 0 0 0-.466 0zm-9.203.005c-.305.096-.533.32-.65.639a1.187 1.187 0 0 0-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894 0 0 0-.565-.472 1.02 1.02 0 0 0-.474.007Zm4.184 2c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365 0 0 0-.175-.48.394.394 0 0 0-.181-.033c-.126 0-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396 0 0 0-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589 1.226-1.787 2.114-.04.176-.045.234-.045.53 0 .294.005.357.043.524.264 1.16 1.332 2.017 2.714 2.173.3.033 1.596.033 1.896 0 1.11-.125 2.064-.727 2.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523 0-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873 6.873 0 0 0-.855-.031zm.645.937a3.283 3.283 0 0 1 1.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115 3.115 0 0 1-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46 1.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653 1.653 0 0 0-.683.298C5.617.74 5.173 1.666 4.985 2.819c-.07.436-.119 1.04-.119 1.503 0 .544.064 1.24.155 1.721.02.107.031.202.023.208a8.12 8.12 0 0 1-.187.152 5.324 5.324 0 0 0-.949 1.02 5.49 5.49 0 0 0-.94 2.339 6.625 6.625 0 0 0-.023 1.357c.091.78.325 1.438.727 2.04l.13.195-.037.064c-.269.452-.498 1.105-.605 1.732-.084.496-.095.629-.095 1.294 0 .67.009.803.088 1.266.095.555.288 1.143.503 1.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405 7.405 0 0 0-.548 1.873c-.062.417-.071.552-.071.991 0 .56.031.832.148 1.279L3.42 24h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915 0 0 0-.194-.25 1.74 1.74 0 0 1-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787 0 0 0 .223-.531c0-.195-.07-.355-.224-.522a3.136 3.136 0 0 1-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814 1.353-1.336 2.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467 1.352-.561.17-.035.25-.04.569-.04.319 0 .398.005.569.04a4.07 4.07 0 0 1 1.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016 1.144.23 2.14 1.173 2.581 2.437.385 1.108.276 2.267-.296 3.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001 1.053.493.539.801 1.866.708 3.036-.062.772-.26 1.463-.533 1.854a2.096 2.096 0 0 1-.224.258.916.916 0 0 0-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498 1.295.253 1.008.231 2.01-.059 2.581a.845.845 0 0 0-.044.098c0 .006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016 0-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378 0-1.628-.083-.645-.182-1.082-.348-1.525a6.083 6.083 0 0 0-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625 6.625 0 0 0-.024-1.358 5.512 5.512 0 0 0-.939-2.339 5.325 5.325 0 0 0-.95-1.02 8.097 8.097 0 0 1-.186-.152.692.692 0 0 1 .023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8 1.205-2.116 3.01a6.805 6.805 0 0 0-.097.726c0 .036-.007.066-.015.066a.96.96 0 0 1-.149-.078A4.857 4.857 0 0 0 12 3.03c-.832 0-1.687.243-2.456.698a.958.958 0 0 1-.148.078c-.008 0-.015-.03-.015-.066a6.71 6.71 0 0 0-.097-.725C8.997 1.392 8.337.319 7.46.048a2.096 2.096 0 0 0-.585-.041Zm.293 1.402c.248.197.523.759.682 1.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102 1.24l.002.475-.12.175-.118.178h-.278c-.324 0-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438 8.438 0 0 1 .016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36 2.028.212 3.145-.019.14-.024.151-.057.144l-.238-.06a3.693 3.693 0 0 0-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z" }) });
|
|
959
|
+
}
|
|
960
|
+
function Qwen(props) {
|
|
961
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M23.919 14.545 20.817 9.17l1.47-2.544a.56.56 0 0 0 0-.566l-1.633-2.83a.57.57 0 0 0-.49-.283h-6.207L12.487.402a.57.57 0 0 0-.49-.284H8.732a.56.56 0 0 0-.49.284L5.139 5.775h-2.94a.56.56 0 0 0-.49.284L.077 8.887a.56.56 0 0 0 0 .567L3.18 14.83l-1.47 2.545a.56.56 0 0 0 0 .566l1.634 2.83a.57.57 0 0 0 .49.283h6.205l1.47 2.545a.57.57 0 0 0 .49.284h3.266a.57.57 0 0 0 .49-.284l3.104-5.375h2.94a.57.57 0 0 0 .49-.283l1.634-2.828a.55.55 0 0 0-.004-.568M8.733.686l1.634 2.828-1.634 2.828H21.8L20.164 9.17H7.425L5.63 6.06Zm1.306 19.801-6.205-.002 1.634-2.83h3.265L2.201 6.344h3.267q3.182 5.517 6.367 11.032zm10.124-5.66L18.53 12l-6.532 11.315-1.634-2.83c2.129-3.673 4.25-7.351 6.373-11.028h3.592l3.102 5.374z" }) });
|
|
962
|
+
}
|
|
963
|
+
function Meta(props) {
|
|
964
|
+
return /* @__PURE__ */ jsx(IconBase, { filled: true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z" }) });
|
|
965
|
+
}
|
|
966
|
+
var SecretInput = forwardRef(function SecretInput2({
|
|
967
|
+
value,
|
|
968
|
+
onChange,
|
|
969
|
+
onSet,
|
|
970
|
+
onRemove,
|
|
971
|
+
label,
|
|
972
|
+
isSet = false,
|
|
973
|
+
disabled = false,
|
|
974
|
+
placeholder,
|
|
975
|
+
name,
|
|
976
|
+
helpText,
|
|
977
|
+
required = false,
|
|
978
|
+
setLabel = "Set",
|
|
979
|
+
updateLabel = "Update",
|
|
980
|
+
rotateLabel = "Rotate",
|
|
981
|
+
removeLabel = "Remove",
|
|
982
|
+
cancelLabel = "Cancel",
|
|
983
|
+
showSecretLabel = "Show secret",
|
|
984
|
+
hideSecretLabel = "Hide secret"
|
|
985
|
+
}, ref) {
|
|
986
|
+
const [showSecret, setShowSecret] = useState(false);
|
|
987
|
+
const [editing, setEditing] = useState(false);
|
|
988
|
+
const baseId = useId();
|
|
989
|
+
const inputId = `${baseId}-secret`;
|
|
990
|
+
const helpId = helpText !== void 0 ? `${baseId}-help` : void 0;
|
|
991
|
+
const editable = isSet !== true || editing;
|
|
992
|
+
const canCommit = value.trim().length > 0;
|
|
993
|
+
const commit = () => {
|
|
994
|
+
if (!canCommit) return;
|
|
995
|
+
onSet(value);
|
|
996
|
+
setEditing(false);
|
|
997
|
+
setShowSecret(false);
|
|
998
|
+
};
|
|
999
|
+
const cancelRotate = () => {
|
|
1000
|
+
setEditing(false);
|
|
1001
|
+
setShowSecret(false);
|
|
1002
|
+
};
|
|
1003
|
+
const remove = () => {
|
|
1004
|
+
onRemove();
|
|
1005
|
+
setShowSecret(false);
|
|
1006
|
+
};
|
|
1007
|
+
const handleKeyDown = (event) => {
|
|
1008
|
+
if (event.key === "Enter" && editable && canCommit) {
|
|
1009
|
+
event.preventDefault();
|
|
1010
|
+
commit();
|
|
1011
|
+
}
|
|
1012
|
+
};
|
|
1013
|
+
return /* @__PURE__ */ jsxs("div", { className: "field", children: [
|
|
1014
|
+
/* @__PURE__ */ jsxs("label", { className: "field__label", htmlFor: inputId, children: [
|
|
1015
|
+
label,
|
|
1016
|
+
required ? /* @__PURE__ */ jsx("span", { className: "field__req", children: " *" }) : null
|
|
1017
|
+
] }),
|
|
1018
|
+
/* @__PURE__ */ jsxs("div", { className: "input-wrap", children: [
|
|
1019
|
+
/* @__PURE__ */ jsx(
|
|
1020
|
+
"input",
|
|
1021
|
+
{
|
|
1022
|
+
ref,
|
|
1023
|
+
id: inputId,
|
|
1024
|
+
name,
|
|
1025
|
+
className: "input num",
|
|
1026
|
+
type: showSecret ? "text" : "password",
|
|
1027
|
+
value,
|
|
1028
|
+
placeholder,
|
|
1029
|
+
disabled,
|
|
1030
|
+
readOnly: !editable,
|
|
1031
|
+
autoComplete: "new-password",
|
|
1032
|
+
"aria-describedby": helpId,
|
|
1033
|
+
onChange: (event) => {
|
|
1034
|
+
onChange(event.target.value);
|
|
1035
|
+
},
|
|
1036
|
+
onKeyDown: handleKeyDown
|
|
1037
|
+
}
|
|
1038
|
+
),
|
|
1039
|
+
/* @__PURE__ */ jsx(
|
|
1040
|
+
"button",
|
|
1041
|
+
{
|
|
1042
|
+
type: "button",
|
|
1043
|
+
className: "input-wrap__affix",
|
|
1044
|
+
"aria-label": showSecret ? hideSecretLabel : showSecretLabel,
|
|
1045
|
+
"aria-pressed": showSecret,
|
|
1046
|
+
disabled,
|
|
1047
|
+
onClick: () => {
|
|
1048
|
+
setShowSecret((shown) => !shown);
|
|
1049
|
+
},
|
|
1050
|
+
children: showSecret ? /* @__PURE__ */ jsx(EyeOff, { size: 16 }) : /* @__PURE__ */ jsx(Eye, { size: 16 })
|
|
1051
|
+
}
|
|
1052
|
+
)
|
|
1053
|
+
] }),
|
|
1054
|
+
helpText !== void 0 ? /* @__PURE__ */ jsx("span", { className: "field__help", id: helpId, children: helpText }) : null,
|
|
1055
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "var(--space-sm)" }, children: editable ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1056
|
+
/* @__PURE__ */ jsx(
|
|
1057
|
+
"button",
|
|
1058
|
+
{
|
|
1059
|
+
type: "button",
|
|
1060
|
+
className: "btn btn--primary",
|
|
1061
|
+
disabled: disabled || !canCommit,
|
|
1062
|
+
onClick: commit,
|
|
1063
|
+
children: isSet ? updateLabel : setLabel
|
|
1064
|
+
}
|
|
1065
|
+
),
|
|
1066
|
+
isSet && editing ? /* @__PURE__ */ jsx(
|
|
1067
|
+
"button",
|
|
1068
|
+
{
|
|
1069
|
+
type: "button",
|
|
1070
|
+
className: "btn btn--ghost",
|
|
1071
|
+
disabled,
|
|
1072
|
+
onClick: cancelRotate,
|
|
1073
|
+
children: cancelLabel
|
|
1074
|
+
}
|
|
1075
|
+
) : null
|
|
1076
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1077
|
+
/* @__PURE__ */ jsx(
|
|
1078
|
+
"button",
|
|
1079
|
+
{
|
|
1080
|
+
type: "button",
|
|
1081
|
+
className: "btn btn--secondary",
|
|
1082
|
+
disabled,
|
|
1083
|
+
onClick: () => {
|
|
1084
|
+
setEditing(true);
|
|
1085
|
+
},
|
|
1086
|
+
children: rotateLabel
|
|
1087
|
+
}
|
|
1088
|
+
),
|
|
1089
|
+
/* @__PURE__ */ jsx(
|
|
1090
|
+
"button",
|
|
1091
|
+
{
|
|
1092
|
+
type: "button",
|
|
1093
|
+
className: "btn btn--ghost",
|
|
1094
|
+
style: { color: "var(--data-down)" },
|
|
1095
|
+
disabled,
|
|
1096
|
+
onClick: remove,
|
|
1097
|
+
children: removeLabel
|
|
1098
|
+
}
|
|
1099
|
+
)
|
|
1100
|
+
] }) })
|
|
1101
|
+
] });
|
|
1102
|
+
});
|
|
1103
|
+
var mutedRowStyle = { padding: "var(--space-sm)", color: "var(--text-muted)" };
|
|
1104
|
+
function Search({
|
|
1105
|
+
items,
|
|
1106
|
+
onSelect,
|
|
1107
|
+
placeholder,
|
|
1108
|
+
emptyText = "No results found.",
|
|
1109
|
+
isLoading = false,
|
|
1110
|
+
disabled = false,
|
|
1111
|
+
label = "Search"
|
|
1112
|
+
}) {
|
|
1113
|
+
const { ungrouped, groups } = useMemo(() => {
|
|
1114
|
+
const ungroupedItems = [];
|
|
1115
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
1116
|
+
for (const item of items) {
|
|
1117
|
+
if (item.group === void 0 || item.group === "") {
|
|
1118
|
+
ungroupedItems.push(item);
|
|
1119
|
+
} else {
|
|
1120
|
+
const bucket = grouped.get(item.group) ?? [];
|
|
1121
|
+
bucket.push(item);
|
|
1122
|
+
grouped.set(item.group, bucket);
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
return { ungrouped: ungroupedItems, groups: grouped };
|
|
1126
|
+
}, [items]);
|
|
1127
|
+
const renderItem = (item) => (
|
|
1128
|
+
// cmdk keys an item's selection/highlight identity on `value`; using the
|
|
1129
|
+
// unique `id` (not `label`) keeps two same-label items distinct, while
|
|
1130
|
+
// `keywords` preserves label-based filtering through cmdk's default matcher.
|
|
1131
|
+
/* @__PURE__ */ jsx(
|
|
1132
|
+
Command.Item,
|
|
1133
|
+
{
|
|
1134
|
+
value: item.id,
|
|
1135
|
+
keywords: [item.label],
|
|
1136
|
+
disabled,
|
|
1137
|
+
className: "menu__item",
|
|
1138
|
+
onSelect: () => {
|
|
1139
|
+
onSelect(item);
|
|
1140
|
+
},
|
|
1141
|
+
children: item.label
|
|
1142
|
+
},
|
|
1143
|
+
item.id
|
|
1144
|
+
)
|
|
1145
|
+
);
|
|
1146
|
+
return /* @__PURE__ */ jsxs(Command, { label, children: [
|
|
1147
|
+
/* @__PURE__ */ jsx(
|
|
1148
|
+
Command.Input,
|
|
1149
|
+
{
|
|
1150
|
+
className: "input",
|
|
1151
|
+
placeholder,
|
|
1152
|
+
"aria-label": label,
|
|
1153
|
+
disabled
|
|
1154
|
+
}
|
|
1155
|
+
),
|
|
1156
|
+
/* @__PURE__ */ jsxs(Command.List, { className: "menu", children: [
|
|
1157
|
+
isLoading ? /* @__PURE__ */ jsx(Command.Loading, { children: /* @__PURE__ */ jsx("div", { style: mutedRowStyle, children: "Loading\u2026" }) }) : null,
|
|
1158
|
+
/* @__PURE__ */ jsx(Command.Empty, { children: /* @__PURE__ */ jsx("div", { style: mutedRowStyle, children: emptyText }) }),
|
|
1159
|
+
ungrouped.map(renderItem),
|
|
1160
|
+
[...groups.entries()].map(([groupName, groupItems]) => /* @__PURE__ */ jsx(Command.Group, { heading: groupName, children: groupItems.map(renderItem) }, groupName))
|
|
1161
|
+
] })
|
|
1162
|
+
] });
|
|
1163
|
+
}
|
|
1164
|
+
var CONTENT_STYLE = {
|
|
1165
|
+
position: "fixed",
|
|
1166
|
+
top: "50%",
|
|
1167
|
+
left: "50%",
|
|
1168
|
+
transform: "translate(-50%, -50%)",
|
|
1169
|
+
width: "100%",
|
|
1170
|
+
maxWidth: "min(92vw, 440px)"
|
|
1171
|
+
};
|
|
1172
|
+
var ALERT_HEAD_STYLE = {
|
|
1173
|
+
paddingBottom: "18px"
|
|
1174
|
+
};
|
|
1175
|
+
var WARN_BADGE_STYLE = {
|
|
1176
|
+
flex: "none",
|
|
1177
|
+
width: "30px",
|
|
1178
|
+
height: "30px",
|
|
1179
|
+
display: "grid",
|
|
1180
|
+
placeItems: "center",
|
|
1181
|
+
borderRadius: "var(--radius-sm)",
|
|
1182
|
+
background: "var(--data-down-bg)",
|
|
1183
|
+
color: "var(--data-down)"
|
|
1184
|
+
};
|
|
1185
|
+
var ALERT_HEAD_ROW_STYLE = {
|
|
1186
|
+
display: "flex",
|
|
1187
|
+
gap: "12px",
|
|
1188
|
+
alignItems: "flex-start"
|
|
1189
|
+
};
|
|
1190
|
+
var Modal = Dialog.Root;
|
|
1191
|
+
var ModalTrigger = Dialog.Trigger;
|
|
1192
|
+
var ModalContent = forwardRef(
|
|
1193
|
+
function ModalContent2({
|
|
1194
|
+
className,
|
|
1195
|
+
style,
|
|
1196
|
+
children,
|
|
1197
|
+
closeOnEscape = true,
|
|
1198
|
+
closeOnOverlayClick = true,
|
|
1199
|
+
onEscapeKeyDown,
|
|
1200
|
+
onPointerDownOutside,
|
|
1201
|
+
...rest
|
|
1202
|
+
}, ref) {
|
|
1203
|
+
return /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
|
|
1204
|
+
/* @__PURE__ */ jsx(Dialog.Overlay, { className: "scrim" }),
|
|
1205
|
+
/* @__PURE__ */ jsx(
|
|
1206
|
+
Dialog.Content,
|
|
1207
|
+
{
|
|
1208
|
+
ref,
|
|
1209
|
+
className: ["modal", className].filter(Boolean).join(" "),
|
|
1210
|
+
style: { ...CONTENT_STYLE, ...style },
|
|
1211
|
+
onEscapeKeyDown: (event) => {
|
|
1212
|
+
if (!closeOnEscape) event.preventDefault();
|
|
1213
|
+
onEscapeKeyDown?.(event);
|
|
1214
|
+
},
|
|
1215
|
+
onPointerDownOutside: (event) => {
|
|
1216
|
+
if (!closeOnOverlayClick) event.preventDefault();
|
|
1217
|
+
onPointerDownOutside?.(event);
|
|
1218
|
+
},
|
|
1219
|
+
...rest,
|
|
1220
|
+
children
|
|
1221
|
+
}
|
|
1222
|
+
)
|
|
1223
|
+
] });
|
|
1224
|
+
}
|
|
1225
|
+
);
|
|
1226
|
+
var ModalTitle = forwardRef(function ModalTitle2({ className, ...rest }, ref) {
|
|
1227
|
+
return /* @__PURE__ */ jsx(
|
|
1228
|
+
Dialog.Title,
|
|
1229
|
+
{
|
|
1230
|
+
ref,
|
|
1231
|
+
className: ["modal__title", className].filter(Boolean).join(" "),
|
|
1232
|
+
...rest
|
|
1233
|
+
}
|
|
1234
|
+
);
|
|
1235
|
+
});
|
|
1236
|
+
var ModalDescription = forwardRef(function ModalDescription2({ className, ...rest }, ref) {
|
|
1237
|
+
return /* @__PURE__ */ jsx(
|
|
1238
|
+
Dialog.Description,
|
|
1239
|
+
{
|
|
1240
|
+
ref,
|
|
1241
|
+
className: ["modal__sub", className].filter(Boolean).join(" "),
|
|
1242
|
+
...rest
|
|
1243
|
+
}
|
|
1244
|
+
);
|
|
1245
|
+
});
|
|
1246
|
+
var ModalClose = forwardRef(function ModalClose2({ className, children, asChild, "aria-label": ariaLabel, ...rest }, ref) {
|
|
1247
|
+
if (asChild === true) {
|
|
1248
|
+
return /* @__PURE__ */ jsx(Dialog.Close, { ref, asChild: true, ...rest, children });
|
|
1249
|
+
}
|
|
1250
|
+
return /* @__PURE__ */ jsx(
|
|
1251
|
+
Dialog.Close,
|
|
1252
|
+
{
|
|
1253
|
+
ref,
|
|
1254
|
+
className: ["modal__x", className].filter(Boolean).join(" "),
|
|
1255
|
+
"aria-label": ariaLabel ?? "Close",
|
|
1256
|
+
...rest,
|
|
1257
|
+
children: children ?? /* @__PURE__ */ jsx(X, { size: 16 })
|
|
1258
|
+
}
|
|
1259
|
+
);
|
|
1260
|
+
});
|
|
1261
|
+
function AlertModal({
|
|
1262
|
+
open,
|
|
1263
|
+
defaultOpen,
|
|
1264
|
+
onOpenChange,
|
|
1265
|
+
trigger,
|
|
1266
|
+
title,
|
|
1267
|
+
description,
|
|
1268
|
+
children,
|
|
1269
|
+
confirmLabel = "Confirm",
|
|
1270
|
+
cancelLabel = "Cancel",
|
|
1271
|
+
onConfirm,
|
|
1272
|
+
destructive = true,
|
|
1273
|
+
"aria-label": ariaLabel,
|
|
1274
|
+
style
|
|
1275
|
+
}) {
|
|
1276
|
+
return (
|
|
1277
|
+
// Conditional spread omits undefined props under exactOptionalPropertyTypes
|
|
1278
|
+
// (same idiom as Select's optional passthrough).
|
|
1279
|
+
/* @__PURE__ */ jsxs(
|
|
1280
|
+
AlertDialog.Root,
|
|
1281
|
+
{
|
|
1282
|
+
...open !== void 0 ? { open } : {},
|
|
1283
|
+
...defaultOpen !== void 0 ? { defaultOpen } : {},
|
|
1284
|
+
...onOpenChange !== void 0 ? { onOpenChange } : {},
|
|
1285
|
+
children: [
|
|
1286
|
+
trigger !== void 0 ? /* @__PURE__ */ jsx(AlertDialog.Trigger, { asChild: true, children: trigger }) : null,
|
|
1287
|
+
/* @__PURE__ */ jsxs(AlertDialog.Portal, { children: [
|
|
1288
|
+
/* @__PURE__ */ jsx(AlertDialog.Overlay, { className: "scrim" }),
|
|
1289
|
+
/* @__PURE__ */ jsxs(
|
|
1290
|
+
AlertDialog.Content,
|
|
1291
|
+
{
|
|
1292
|
+
className: "modal",
|
|
1293
|
+
style: { ...CONTENT_STYLE, maxWidth: "min(92vw, 360px)", ...style },
|
|
1294
|
+
"aria-label": ariaLabel,
|
|
1295
|
+
children: [
|
|
1296
|
+
/* @__PURE__ */ jsx("div", { className: "modal__head", style: ALERT_HEAD_STYLE, children: /* @__PURE__ */ jsxs("div", { style: ALERT_HEAD_ROW_STYLE, children: [
|
|
1297
|
+
destructive ? /* @__PURE__ */ jsx("span", { style: WARN_BADGE_STYLE, "aria-hidden": "true", children: /* @__PURE__ */ jsx(TriangleAlert, { size: 17, strokeWidth: 1.6 }) }) : null,
|
|
1298
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1299
|
+
/* @__PURE__ */ jsx(AlertDialog.Title, { className: "modal__title", children: title }),
|
|
1300
|
+
description !== void 0 ? /* @__PURE__ */ jsx(AlertDialog.Description, { className: "modal__sub", children: description }) : null
|
|
1301
|
+
] })
|
|
1302
|
+
] }) }),
|
|
1303
|
+
children !== void 0 ? /* @__PURE__ */ jsx("div", { className: "modal__body", children }) : null,
|
|
1304
|
+
/* @__PURE__ */ jsxs("div", { className: "modal__foot", children: [
|
|
1305
|
+
/* @__PURE__ */ jsx(AlertDialog.Cancel, { asChild: true, children: /* @__PURE__ */ jsx("button", { type: "button", className: "btn btn--ghost", children: cancelLabel }) }),
|
|
1306
|
+
/* @__PURE__ */ jsx(AlertDialog.Action, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1307
|
+
"button",
|
|
1308
|
+
{
|
|
1309
|
+
type: "button",
|
|
1310
|
+
className: destructive ? "btn btn--destructive" : "btn btn--primary",
|
|
1311
|
+
onClick: onConfirm,
|
|
1312
|
+
children: confirmLabel
|
|
1313
|
+
}
|
|
1314
|
+
) })
|
|
1315
|
+
] })
|
|
1316
|
+
]
|
|
1317
|
+
}
|
|
1318
|
+
)
|
|
1319
|
+
] })
|
|
1320
|
+
]
|
|
1321
|
+
}
|
|
1322
|
+
)
|
|
1323
|
+
);
|
|
1324
|
+
}
|
|
1325
|
+
var DEFAULT_DURATION_MS = 4e3;
|
|
1326
|
+
function VariantIcon({ variant }) {
|
|
1327
|
+
switch (variant) {
|
|
1328
|
+
case "success":
|
|
1329
|
+
return /* @__PURE__ */ jsx(CircleCheckBig, { size: 17, strokeWidth: 1.6 });
|
|
1330
|
+
case "warning":
|
|
1331
|
+
return /* @__PURE__ */ jsx(TriangleAlert, { size: 17, strokeWidth: 1.6 });
|
|
1332
|
+
case "error":
|
|
1333
|
+
return /* @__PURE__ */ jsx(CircleX, { size: 17, strokeWidth: 1.6 });
|
|
1334
|
+
case "info":
|
|
1335
|
+
default:
|
|
1336
|
+
return /* @__PURE__ */ jsx(Info, { size: 17, strokeWidth: 1.6 });
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
function ToastCard({
|
|
1340
|
+
variant,
|
|
1341
|
+
title,
|
|
1342
|
+
description,
|
|
1343
|
+
onDismiss,
|
|
1344
|
+
dismissLabel = "Dismiss"
|
|
1345
|
+
}) {
|
|
1346
|
+
const role = variant === "error" ? "alert" : "status";
|
|
1347
|
+
return /* @__PURE__ */ jsxs("div", { className: `toast toast--${variant}`, role, children: [
|
|
1348
|
+
/* @__PURE__ */ jsx("span", { className: "toast__icon", children: /* @__PURE__ */ jsx(VariantIcon, { variant }) }),
|
|
1349
|
+
/* @__PURE__ */ jsxs("div", { className: "toast__body", children: [
|
|
1350
|
+
/* @__PURE__ */ jsx("p", { className: "toast__title", children: title }),
|
|
1351
|
+
description !== void 0 ? /* @__PURE__ */ jsx("p", { className: "toast__msg", children: description }) : null
|
|
1352
|
+
] }),
|
|
1353
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "toast__x", "aria-label": dismissLabel, onClick: onDismiss, children: /* @__PURE__ */ jsx(X, { size: 14, strokeWidth: 1.6 }) })
|
|
1354
|
+
] });
|
|
1355
|
+
}
|
|
1356
|
+
function show(variant, title, options) {
|
|
1357
|
+
return toast$1.custom(
|
|
1358
|
+
(id) => /* @__PURE__ */ jsx(
|
|
1359
|
+
ToastCard,
|
|
1360
|
+
{
|
|
1361
|
+
variant,
|
|
1362
|
+
title,
|
|
1363
|
+
...options?.description !== void 0 ? { description: options.description } : {},
|
|
1364
|
+
...options?.dismissLabel !== void 0 ? { dismissLabel: options.dismissLabel } : {},
|
|
1365
|
+
onDismiss: () => {
|
|
1366
|
+
toast$1.dismiss(id);
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
),
|
|
1370
|
+
{ duration: options?.duration ?? DEFAULT_DURATION_MS }
|
|
1371
|
+
);
|
|
1372
|
+
}
|
|
1373
|
+
var toast = {
|
|
1374
|
+
info: (title, options) => show("info", title, options),
|
|
1375
|
+
success: (title, options) => show("success", title, options),
|
|
1376
|
+
warning: (title, options) => show("warning", title, options),
|
|
1377
|
+
error: (title, options) => show("error", title, options),
|
|
1378
|
+
/** Dismiss a specific toast by id, or all toasts when called with no id. */
|
|
1379
|
+
dismiss: (id) => toast$1.dismiss(id)
|
|
1380
|
+
};
|
|
1381
|
+
function Toaster({ position = "top-center", toastOptions, ...rest }) {
|
|
1382
|
+
return /* @__PURE__ */ jsx(
|
|
1383
|
+
Toaster$1,
|
|
1384
|
+
{
|
|
1385
|
+
position,
|
|
1386
|
+
toastOptions: { unstyled: true, ...toastOptions },
|
|
1387
|
+
...rest
|
|
1388
|
+
}
|
|
1389
|
+
);
|
|
1390
|
+
}
|
|
1391
|
+
var VARIANT_CLASS = {
|
|
1392
|
+
warning: "callout--warn",
|
|
1393
|
+
error: "callout--error",
|
|
1394
|
+
neutral: "callout--neutral"
|
|
1395
|
+
};
|
|
1396
|
+
var VARIANT_ROLE = {
|
|
1397
|
+
info: "status",
|
|
1398
|
+
warning: "status",
|
|
1399
|
+
error: "alert",
|
|
1400
|
+
neutral: "note"
|
|
1401
|
+
};
|
|
1402
|
+
function CalloutIcon({ variant }) {
|
|
1403
|
+
if (variant === "warning") return /* @__PURE__ */ jsx(TriangleAlert, { size: 17, strokeWidth: 1.6 });
|
|
1404
|
+
if (variant === "error") return /* @__PURE__ */ jsx(CircleX, { size: 17, strokeWidth: 1.6 });
|
|
1405
|
+
return /* @__PURE__ */ jsx(Info, { size: 17, strokeWidth: 1.6 });
|
|
1406
|
+
}
|
|
1407
|
+
function Callout({
|
|
1408
|
+
variant = "info",
|
|
1409
|
+
title,
|
|
1410
|
+
children,
|
|
1411
|
+
dismissible = false,
|
|
1412
|
+
onDismiss,
|
|
1413
|
+
dismissLabel = "Dismiss",
|
|
1414
|
+
icon = true,
|
|
1415
|
+
className
|
|
1416
|
+
}) {
|
|
1417
|
+
const cls = ["callout", VARIANT_CLASS[variant], className].filter(Boolean).join(" ");
|
|
1418
|
+
return /* @__PURE__ */ jsxs("div", { className: cls, role: VARIANT_ROLE[variant], children: [
|
|
1419
|
+
icon ? /* @__PURE__ */ jsx("span", { className: "callout__icon", children: /* @__PURE__ */ jsx(CalloutIcon, { variant }) }) : null,
|
|
1420
|
+
/* @__PURE__ */ jsxs("div", { className: "callout__body", children: [
|
|
1421
|
+
title !== void 0 ? /* @__PURE__ */ jsx("p", { className: "callout__title", children: title }) : null,
|
|
1422
|
+
children !== void 0 ? /* @__PURE__ */ jsx("p", { className: "callout__msg", children }) : null
|
|
1423
|
+
] }),
|
|
1424
|
+
dismissible ? /* @__PURE__ */ jsx("button", { type: "button", className: "callout__x", "aria-label": dismissLabel, onClick: onDismiss, children: /* @__PURE__ */ jsx(X, { size: 14, strokeWidth: 1.6 }) }) : null
|
|
1425
|
+
] });
|
|
1426
|
+
}
|
|
1427
|
+
var SHAPE_CLASS = {
|
|
1428
|
+
text: "skel--text",
|
|
1429
|
+
line: "skel--line",
|
|
1430
|
+
title: "skel--title",
|
|
1431
|
+
block: "skel--block",
|
|
1432
|
+
circle: "skel--circle"
|
|
1433
|
+
};
|
|
1434
|
+
function Skeleton({
|
|
1435
|
+
shape = "line",
|
|
1436
|
+
width,
|
|
1437
|
+
height,
|
|
1438
|
+
className,
|
|
1439
|
+
style,
|
|
1440
|
+
...rest
|
|
1441
|
+
}) {
|
|
1442
|
+
const cls = ["skel", SHAPE_CLASS[shape], className].filter(Boolean).join(" ");
|
|
1443
|
+
const mergedStyle = {
|
|
1444
|
+
...style,
|
|
1445
|
+
...width !== void 0 ? { width } : {},
|
|
1446
|
+
...height !== void 0 ? { height } : {}
|
|
1447
|
+
};
|
|
1448
|
+
return /* @__PURE__ */ jsx("span", { "aria-hidden": true, ...rest, className: cls, style: mergedStyle });
|
|
1449
|
+
}
|
|
1450
|
+
var SIZE_CLASS = {
|
|
1451
|
+
sm: "spinner--sm",
|
|
1452
|
+
lg: "spinner--lg"
|
|
1453
|
+
};
|
|
1454
|
+
function Spinner({ size = "md", label = "Loading", className, ...rest }) {
|
|
1455
|
+
const cls = ["spinner", SIZE_CLASS[size], className].filter(Boolean).join(" ");
|
|
1456
|
+
return /* @__PURE__ */ jsx("span", { role: "status", "aria-label": label, ...rest, className: cls });
|
|
1457
|
+
}
|
|
1458
|
+
function StateFigBody({ icon, title, body }) {
|
|
1459
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1460
|
+
icon !== void 0 ? /* @__PURE__ */ jsx("span", { className: "state-fig__icon", children: icon }) : null,
|
|
1461
|
+
/* @__PURE__ */ jsx("p", { className: "state-fig__title", children: title }),
|
|
1462
|
+
body !== void 0 ? /* @__PURE__ */ jsx("p", { className: "state-fig__msg", children: body }) : null
|
|
1463
|
+
] });
|
|
1464
|
+
}
|
|
1465
|
+
function EmptyStateFig({ icon, title, body, action, className }) {
|
|
1466
|
+
const cls = ["state-fig", className].filter(Boolean).join(" ");
|
|
1467
|
+
return /* @__PURE__ */ jsxs("div", { className: cls, children: [
|
|
1468
|
+
/* @__PURE__ */ jsx(StateFigBody, { icon, title, body }),
|
|
1469
|
+
action !== void 0 ? /* @__PURE__ */ jsx("div", { className: "state-fig__actions", children: action }) : null
|
|
1470
|
+
] });
|
|
1471
|
+
}
|
|
1472
|
+
function ErrorStateFig({
|
|
1473
|
+
icon,
|
|
1474
|
+
title,
|
|
1475
|
+
body,
|
|
1476
|
+
retry,
|
|
1477
|
+
retryLabel = "Retry",
|
|
1478
|
+
onDismiss,
|
|
1479
|
+
dismissLabel = "Dismiss",
|
|
1480
|
+
className
|
|
1481
|
+
}) {
|
|
1482
|
+
const cls = ["state-fig", "state-fig--error", className].filter(Boolean).join(" ");
|
|
1483
|
+
return /* @__PURE__ */ jsxs("div", { className: cls, children: [
|
|
1484
|
+
/* @__PURE__ */ jsx(StateFigBody, { icon, title, body }),
|
|
1485
|
+
/* @__PURE__ */ jsxs("div", { className: "state-fig__actions", children: [
|
|
1486
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: retry, children: retryLabel }),
|
|
1487
|
+
onDismiss !== void 0 ? /* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: onDismiss, children: dismissLabel }) : null
|
|
1488
|
+
] })
|
|
1489
|
+
] });
|
|
1490
|
+
}
|
|
1491
|
+
var DELTA_CUE = { up: "\u25B2", down: "\u25BC", flat: "\u2014" };
|
|
1492
|
+
var EM_DASH = "\u2014";
|
|
1493
|
+
function Stat({ label, value, unit, direction, delta, foot, spark, className }) {
|
|
1494
|
+
const cls = ["stat", className].filter(Boolean).join(" ");
|
|
1495
|
+
return /* @__PURE__ */ jsxs("div", { className: cls, children: [
|
|
1496
|
+
label !== void 0 ? /* @__PURE__ */ jsx("span", { className: "stat__label", children: label }) : null,
|
|
1497
|
+
/* @__PURE__ */ jsxs("div", { className: "stat__row", children: [
|
|
1498
|
+
/* @__PURE__ */ jsx("span", { className: "stat__value", children: value == null ? EM_DASH : value }),
|
|
1499
|
+
unit !== void 0 ? /* @__PURE__ */ jsx("span", { className: "stat__unit", children: unit }) : null,
|
|
1500
|
+
direction !== void 0 ? /* @__PURE__ */ jsxs("span", { className: `stat__delta stat__delta--${direction}`, children: [
|
|
1501
|
+
/* @__PURE__ */ jsx("span", { children: DELTA_CUE[direction] }),
|
|
1502
|
+
delta !== void 0 ? /* @__PURE__ */ jsx("span", { children: delta }) : null
|
|
1503
|
+
] }) : null
|
|
1504
|
+
] }),
|
|
1505
|
+
spark !== void 0 ? /* @__PURE__ */ jsx("span", { className: "stat__spark", children: spark }) : null,
|
|
1506
|
+
foot !== void 0 ? /* @__PURE__ */ jsx("span", { className: "stat__foot", children: foot }) : null
|
|
1507
|
+
] });
|
|
1508
|
+
}
|
|
1509
|
+
var VARIANT_CLASS2 = {
|
|
1510
|
+
warn: "meter--warn",
|
|
1511
|
+
over: "meter--over"
|
|
1512
|
+
};
|
|
1513
|
+
function Meter({
|
|
1514
|
+
value,
|
|
1515
|
+
max: max2 = 100,
|
|
1516
|
+
label,
|
|
1517
|
+
readout,
|
|
1518
|
+
variant = "normal",
|
|
1519
|
+
ariaLabel,
|
|
1520
|
+
className
|
|
1521
|
+
}) {
|
|
1522
|
+
const cls = ["meter", VARIANT_CLASS2[variant], className].filter(Boolean).join(" ");
|
|
1523
|
+
const raw = max2 > 0 ? value / max2 * 100 : 0;
|
|
1524
|
+
const pct = Math.round(Math.max(0, Math.min(100, raw)) * 100) / 100;
|
|
1525
|
+
const name = ariaLabel ?? (typeof label === "string" ? label : void 0);
|
|
1526
|
+
return /* @__PURE__ */ jsxs("div", { className: cls, children: [
|
|
1527
|
+
/* @__PURE__ */ jsxs("div", { className: "meter__head", children: [
|
|
1528
|
+
label !== void 0 ? /* @__PURE__ */ jsx("span", { className: "meter__label", children: label }) : null,
|
|
1529
|
+
/* @__PURE__ */ jsx("span", { className: "meter__val", children: readout !== void 0 ? readout : `${value} / ${max2}` })
|
|
1530
|
+
] }),
|
|
1531
|
+
/* @__PURE__ */ jsx(
|
|
1532
|
+
"div",
|
|
1533
|
+
{
|
|
1534
|
+
className: "meter__track",
|
|
1535
|
+
role: "meter",
|
|
1536
|
+
"aria-valuenow": value,
|
|
1537
|
+
"aria-valuemin": 0,
|
|
1538
|
+
"aria-valuemax": max2,
|
|
1539
|
+
"aria-label": name,
|
|
1540
|
+
children: /* @__PURE__ */ jsx("div", { className: "meter__fill", style: { width: `${pct}%` } })
|
|
1541
|
+
}
|
|
1542
|
+
)
|
|
1543
|
+
] });
|
|
1544
|
+
}
|
|
1545
|
+
var VARIANT_CLASS3 = {
|
|
1546
|
+
info: "badge--info",
|
|
1547
|
+
success: "badge--success",
|
|
1548
|
+
warning: "badge--warn",
|
|
1549
|
+
error: "badge--error",
|
|
1550
|
+
up: "badge--up",
|
|
1551
|
+
down: "badge--down",
|
|
1552
|
+
flat: "badge--flat"
|
|
1553
|
+
};
|
|
1554
|
+
var FINANCE_CUE = {
|
|
1555
|
+
up: "\u25B2",
|
|
1556
|
+
down: "\u25BC",
|
|
1557
|
+
flat: "\u2014"
|
|
1558
|
+
};
|
|
1559
|
+
function Badge({ variant = "neutral", children, dot = false, className }) {
|
|
1560
|
+
const cls = ["badge", VARIANT_CLASS3[variant], className].filter(Boolean).join(" ");
|
|
1561
|
+
const cue = FINANCE_CUE[variant];
|
|
1562
|
+
return /* @__PURE__ */ jsxs("span", { className: cls, children: [
|
|
1563
|
+
dot ? /* @__PURE__ */ jsx("span", { className: "badge__dot" }) : null,
|
|
1564
|
+
cue !== void 0 ? /* @__PURE__ */ jsx("span", { children: cue }) : null,
|
|
1565
|
+
children
|
|
1566
|
+
] });
|
|
1567
|
+
}
|
|
1568
|
+
function Card({
|
|
1569
|
+
children,
|
|
1570
|
+
interactive = false,
|
|
1571
|
+
selected = false,
|
|
1572
|
+
className,
|
|
1573
|
+
...rest
|
|
1574
|
+
}) {
|
|
1575
|
+
const cls = [
|
|
1576
|
+
"card",
|
|
1577
|
+
interactive ? "card--interactive" : null,
|
|
1578
|
+
selected ? "card--selected" : null,
|
|
1579
|
+
className
|
|
1580
|
+
].filter(Boolean).join(" ");
|
|
1581
|
+
return /* @__PURE__ */ jsx("div", { className: cls, ...rest, children });
|
|
1582
|
+
}
|
|
1583
|
+
function Divider({ className, ...rest }) {
|
|
1584
|
+
const cls = ["rule", className].filter(Boolean).join(" ");
|
|
1585
|
+
return /* @__PURE__ */ jsx("hr", { className: cls, ...rest });
|
|
1586
|
+
}
|
|
1587
|
+
var Tabs = forwardRef(function Tabs2({ className, ...rest }, ref) {
|
|
1588
|
+
return /* @__PURE__ */ jsx(
|
|
1589
|
+
TabsPrimitive.Root,
|
|
1590
|
+
{
|
|
1591
|
+
ref,
|
|
1592
|
+
className: ["tabs", className].filter(Boolean).join(" "),
|
|
1593
|
+
...rest
|
|
1594
|
+
}
|
|
1595
|
+
);
|
|
1596
|
+
});
|
|
1597
|
+
var TabsList = forwardRef(
|
|
1598
|
+
function TabsList2({ className, ...rest }, ref) {
|
|
1599
|
+
return /* @__PURE__ */ jsx(
|
|
1600
|
+
TabsPrimitive.List,
|
|
1601
|
+
{
|
|
1602
|
+
ref,
|
|
1603
|
+
className: ["tab-list", className].filter(Boolean).join(" "),
|
|
1604
|
+
...rest
|
|
1605
|
+
}
|
|
1606
|
+
);
|
|
1607
|
+
}
|
|
1608
|
+
);
|
|
1609
|
+
var TabsTrigger = forwardRef(
|
|
1610
|
+
function TabsTrigger2({ className, ...rest }, ref) {
|
|
1611
|
+
return /* @__PURE__ */ jsx(
|
|
1612
|
+
TabsPrimitive.Trigger,
|
|
1613
|
+
{
|
|
1614
|
+
ref,
|
|
1615
|
+
className: ["tab", className].filter(Boolean).join(" "),
|
|
1616
|
+
...rest
|
|
1617
|
+
}
|
|
1618
|
+
);
|
|
1619
|
+
}
|
|
1620
|
+
);
|
|
1621
|
+
var TabsContent = forwardRef(
|
|
1622
|
+
function TabsContent2({ className, ...rest }, ref) {
|
|
1623
|
+
return /* @__PURE__ */ jsx(
|
|
1624
|
+
TabsPrimitive.Content,
|
|
1625
|
+
{
|
|
1626
|
+
ref,
|
|
1627
|
+
className: ["tab-panel", className].filter(Boolean).join(" "),
|
|
1628
|
+
...rest
|
|
1629
|
+
}
|
|
1630
|
+
);
|
|
1631
|
+
}
|
|
1632
|
+
);
|
|
1633
|
+
var PAD = 2;
|
|
1634
|
+
var STROKE_WIDTH = 1.6;
|
|
1635
|
+
function round(n) {
|
|
1636
|
+
return (Math.round(n * 100) / 100).toString();
|
|
1637
|
+
}
|
|
1638
|
+
function buildPoints(data, width, height) {
|
|
1639
|
+
const midY = height / 2;
|
|
1640
|
+
const flat = `${round(PAD)},${round(midY)} ${round(width - PAD)},${round(midY)}`;
|
|
1641
|
+
const finite = data.filter((n) => Number.isFinite(n));
|
|
1642
|
+
if (finite.length < 2) return flat;
|
|
1643
|
+
const min2 = Math.min(...finite);
|
|
1644
|
+
const max2 = Math.max(...finite);
|
|
1645
|
+
const range2 = max2 - min2;
|
|
1646
|
+
if (range2 === 0) return flat;
|
|
1647
|
+
const usableW = width - PAD * 2;
|
|
1648
|
+
const usableH = height - PAD * 2;
|
|
1649
|
+
return finite.map((v, i) => {
|
|
1650
|
+
const x = PAD + i / (finite.length - 1) * usableW;
|
|
1651
|
+
const y = PAD + (1 - (v - min2) / range2) * usableH;
|
|
1652
|
+
return `${round(x)},${round(y)}`;
|
|
1653
|
+
}).join(" ");
|
|
1654
|
+
}
|
|
1655
|
+
function Sparkline({
|
|
1656
|
+
data,
|
|
1657
|
+
direction,
|
|
1658
|
+
ariaLabel,
|
|
1659
|
+
caption,
|
|
1660
|
+
width = 64,
|
|
1661
|
+
height = 20,
|
|
1662
|
+
className
|
|
1663
|
+
}) {
|
|
1664
|
+
const wrapCls = ["sparkline", className].filter(Boolean).join(" ");
|
|
1665
|
+
const points = buildPoints(data, width, height);
|
|
1666
|
+
return /* @__PURE__ */ jsxs("span", { className: wrapCls, children: [
|
|
1667
|
+
/* @__PURE__ */ jsx(
|
|
1668
|
+
"svg",
|
|
1669
|
+
{
|
|
1670
|
+
className: `trend-${direction}`,
|
|
1671
|
+
role: "img",
|
|
1672
|
+
"aria-label": ariaLabel,
|
|
1673
|
+
width,
|
|
1674
|
+
height,
|
|
1675
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
1676
|
+
fill: "none",
|
|
1677
|
+
children: /* @__PURE__ */ jsx(
|
|
1678
|
+
"polyline",
|
|
1679
|
+
{
|
|
1680
|
+
points,
|
|
1681
|
+
fill: "none",
|
|
1682
|
+
stroke: "currentColor",
|
|
1683
|
+
strokeWidth: STROKE_WIDTH,
|
|
1684
|
+
strokeLinecap: "round",
|
|
1685
|
+
strokeLinejoin: "round"
|
|
1686
|
+
}
|
|
1687
|
+
)
|
|
1688
|
+
}
|
|
1689
|
+
),
|
|
1690
|
+
caption !== void 0 ? /* @__PURE__ */ jsx("span", { className: "sparkline__cap", children: caption }) : null
|
|
1691
|
+
] });
|
|
1692
|
+
}
|
|
1693
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
1694
|
+
var Tooltip = TooltipPrimitive.Root;
|
|
1695
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
1696
|
+
var TooltipContent = forwardRef(function TooltipContent2({ className, children, sideOffset = 8, ...rest }, ref) {
|
|
1697
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
1698
|
+
TooltipPrimitive.Content,
|
|
1699
|
+
{
|
|
1700
|
+
ref,
|
|
1701
|
+
sideOffset,
|
|
1702
|
+
className: ["tip-pop", className].filter(Boolean).join(" "),
|
|
1703
|
+
...rest,
|
|
1704
|
+
children: [
|
|
1705
|
+
children,
|
|
1706
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "tip-pop__arrow" })
|
|
1707
|
+
]
|
|
1708
|
+
}
|
|
1709
|
+
) });
|
|
1710
|
+
});
|
|
1711
|
+
var SIZE_CLASS2 = {
|
|
1712
|
+
sm: "avatar--sm",
|
|
1713
|
+
lg: "avatar--lg",
|
|
1714
|
+
xl: "avatar--xl"
|
|
1715
|
+
};
|
|
1716
|
+
var STATUS_CLASS = {
|
|
1717
|
+
offline: "avatar__status--offline",
|
|
1718
|
+
busy: "avatar__status--busy",
|
|
1719
|
+
away: "avatar__status--away"
|
|
1720
|
+
};
|
|
1721
|
+
var INITIALS_PALETTE = [
|
|
1722
|
+
{ background: "var(--signal-bg)", color: "var(--color-signal)" },
|
|
1723
|
+
{ background: "var(--data-info-bg)", color: "var(--data-info)" },
|
|
1724
|
+
{ background: "var(--data-up-bg)", color: "var(--data-up)" },
|
|
1725
|
+
{ background: "var(--data-warn-bg)", color: "var(--data-warn)" },
|
|
1726
|
+
{ background: "var(--bg-surface)", color: "var(--text-secondary)" }
|
|
1727
|
+
];
|
|
1728
|
+
var OVERFLOW_STYLE = {
|
|
1729
|
+
background: "var(--data-info-bg)",
|
|
1730
|
+
color: "var(--data-info)"
|
|
1731
|
+
};
|
|
1732
|
+
var SAFE_SRC_RE = /^(?:https?:\/\/|\/|\.\.?\/|data:image\/)/i;
|
|
1733
|
+
function initialsFrom(name) {
|
|
1734
|
+
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
1735
|
+
if (parts.length === 0) return "";
|
|
1736
|
+
const first = parts[0] ?? "";
|
|
1737
|
+
if (parts.length === 1) return first.charAt(0).toUpperCase();
|
|
1738
|
+
const last = parts[parts.length - 1] ?? "";
|
|
1739
|
+
return (first.charAt(0) + last.charAt(0)).toUpperCase();
|
|
1740
|
+
}
|
|
1741
|
+
function paletteIndex(name) {
|
|
1742
|
+
let sum = 0;
|
|
1743
|
+
for (let i = 0; i < name.length; i += 1) sum += name.charCodeAt(i);
|
|
1744
|
+
return sum % INITIALS_PALETTE.length;
|
|
1745
|
+
}
|
|
1746
|
+
function Avatar({
|
|
1747
|
+
src,
|
|
1748
|
+
alt,
|
|
1749
|
+
name,
|
|
1750
|
+
size = "md",
|
|
1751
|
+
status,
|
|
1752
|
+
round: round2 = false,
|
|
1753
|
+
className
|
|
1754
|
+
}) {
|
|
1755
|
+
const [imgFailed, setImgFailed] = useState(false);
|
|
1756
|
+
const showImage = src !== void 0 && src !== "" && SAFE_SRC_RE.test(src) && !imgFailed;
|
|
1757
|
+
const cls = ["avatar", SIZE_CLASS2[size], round2 ? "avatar--round" : null, className].filter(Boolean).join(" ");
|
|
1758
|
+
const tileStyle = !showImage && name !== void 0 ? INITIALS_PALETTE[paletteIndex(name)] : void 0;
|
|
1759
|
+
const statusCls = status !== void 0 ? ["avatar__status", STATUS_CLASS[status]].filter(Boolean).join(" ") : null;
|
|
1760
|
+
const labelProps = !showImage && name !== void 0 ? { role: "img", "aria-label": status !== void 0 ? `${name} (${status})` : name } : {};
|
|
1761
|
+
return /* @__PURE__ */ jsxs("span", { className: cls, style: tileStyle, ...labelProps, children: [
|
|
1762
|
+
showImage ? /* @__PURE__ */ jsx("img", { src, alt: alt ?? name ?? "", onError: () => setImgFailed(true) }) : initialsFrom(name ?? ""),
|
|
1763
|
+
statusCls !== null ? /* @__PURE__ */ jsx("span", { className: statusCls, "aria-hidden": "true" }) : null
|
|
1764
|
+
] });
|
|
1765
|
+
}
|
|
1766
|
+
function AvatarGroup({ children, max: max2, round: round2 = false, className }) {
|
|
1767
|
+
const items = Children.toArray(children);
|
|
1768
|
+
const visible = max2 !== void 0 && items.length > max2 ? items.slice(0, max2) : items;
|
|
1769
|
+
const overflow = items.length - visible.length;
|
|
1770
|
+
const cls = ["avatar-group", className].filter(Boolean).join(" ");
|
|
1771
|
+
const tileCls = ["avatar", round2 ? "avatar--round" : null].filter(Boolean).join(" ");
|
|
1772
|
+
return /* @__PURE__ */ jsxs("span", { className: cls, children: [
|
|
1773
|
+
visible,
|
|
1774
|
+
overflow > 0 ? /* @__PURE__ */ jsxs("span", { className: tileCls, style: OVERFLOW_STYLE, role: "img", "aria-label": `${overflow} more`, children: [
|
|
1775
|
+
"+",
|
|
1776
|
+
overflow
|
|
1777
|
+
] }) : null
|
|
1778
|
+
] });
|
|
1779
|
+
}
|
|
1780
|
+
var FINANCE_EPSILON = 0.05;
|
|
1781
|
+
function financeDirection(value) {
|
|
1782
|
+
if (value > FINANCE_EPSILON) return "up";
|
|
1783
|
+
if (value < -FINANCE_EPSILON) return "down";
|
|
1784
|
+
return "flat";
|
|
1785
|
+
}
|
|
1786
|
+
function defaultFinanceFormat(value) {
|
|
1787
|
+
return `${value > 0 ? "+" : ""}${value.toFixed(2)}%`;
|
|
1788
|
+
}
|
|
1789
|
+
var ACTIONS_COLUMN_ID = "__actions";
|
|
1790
|
+
var NOOP = () => void 0;
|
|
1791
|
+
function DataTable({
|
|
1792
|
+
columns,
|
|
1793
|
+
data,
|
|
1794
|
+
loading = false,
|
|
1795
|
+
skeletonRowCount = 4,
|
|
1796
|
+
error,
|
|
1797
|
+
errorTitle = "Couldn't load data",
|
|
1798
|
+
onRetry,
|
|
1799
|
+
emptyMessage,
|
|
1800
|
+
actions,
|
|
1801
|
+
actionsAlwaysVisible = false,
|
|
1802
|
+
enableRowSelection,
|
|
1803
|
+
rowSelection,
|
|
1804
|
+
onRowSelectionChange,
|
|
1805
|
+
getRowId,
|
|
1806
|
+
className
|
|
1807
|
+
}) {
|
|
1808
|
+
const allColumns = useMemo(() => {
|
|
1809
|
+
if (!actions) return columns;
|
|
1810
|
+
const actionsColumn = {
|
|
1811
|
+
id: ACTIONS_COLUMN_ID,
|
|
1812
|
+
header: "",
|
|
1813
|
+
cell: ({ row }) => actions(row.original),
|
|
1814
|
+
meta: { numeric: true },
|
|
1815
|
+
enableSorting: false
|
|
1816
|
+
};
|
|
1817
|
+
return [...columns, actionsColumn];
|
|
1818
|
+
}, [columns, actions]);
|
|
1819
|
+
const table = useReactTable({
|
|
1820
|
+
data,
|
|
1821
|
+
columns: allColumns,
|
|
1822
|
+
getCoreRowModel: getCoreRowModel(),
|
|
1823
|
+
...enableRowSelection !== void 0 ? { enableRowSelection } : {},
|
|
1824
|
+
...getRowId !== void 0 ? { getRowId } : {},
|
|
1825
|
+
...rowSelection !== void 0 ? { state: { rowSelection } } : {},
|
|
1826
|
+
...onRowSelectionChange !== void 0 ? { onRowSelectionChange } : {}
|
|
1827
|
+
});
|
|
1828
|
+
const leafColumns = table.getAllLeafColumns();
|
|
1829
|
+
const colCount = leafColumns.length;
|
|
1830
|
+
const selectable = enableRowSelection !== void 0 && enableRowSelection !== false;
|
|
1831
|
+
const tableClass = ["dt", actionsAlwaysVisible ? "dt--actions-visible" : null, className].filter(Boolean).join(" ");
|
|
1832
|
+
const columnIsNumeric = leafColumns.map(
|
|
1833
|
+
(col) => col.columnDef.meta?.numeric === true || col.columnDef.meta?.finance === true
|
|
1834
|
+
);
|
|
1835
|
+
function renderBody() {
|
|
1836
|
+
if (loading) {
|
|
1837
|
+
return Array.from({ length: skeletonRowCount }, (_, rowIndex) => /* @__PURE__ */ jsx("tr", { children: leafColumns.map((col, colIndex) => /* @__PURE__ */ jsx("td", { className: columnIsNumeric[colIndex] ? "num" : void 0, children: /* @__PURE__ */ jsx(Skeleton, {}) }, col.id)) }, `skeleton-${String(rowIndex)}`));
|
|
1838
|
+
}
|
|
1839
|
+
if (error !== void 0) {
|
|
1840
|
+
const message = typeof error === "string" ? error : error.message;
|
|
1841
|
+
return /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: colCount, children: /* @__PURE__ */ jsx(ErrorStateFig, { title: errorTitle, body: message, retry: onRetry ?? NOOP }) }) });
|
|
1842
|
+
}
|
|
1843
|
+
if (data.length === 0) {
|
|
1844
|
+
return /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: colCount, children: /* @__PURE__ */ jsx(EmptyStateFig, { title: emptyMessage ?? "No data" }) }) });
|
|
1845
|
+
}
|
|
1846
|
+
return table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx("tr", { "aria-selected": selectable ? row.getIsSelected() : void 0, children: row.getVisibleCells().map((cell) => {
|
|
1847
|
+
const { columnDef } = cell.column;
|
|
1848
|
+
const meta = columnDef.meta;
|
|
1849
|
+
const headerLabel = typeof columnDef.header === "string" ? columnDef.header : meta?.label;
|
|
1850
|
+
const dataLabel = headerLabel || void 0;
|
|
1851
|
+
if (meta?.finance) {
|
|
1852
|
+
const raw = cell.getValue();
|
|
1853
|
+
if (typeof raw === "number") {
|
|
1854
|
+
const direction = financeDirection(raw);
|
|
1855
|
+
const format2 = meta.financeFormat ?? defaultFinanceFormat;
|
|
1856
|
+
return /* @__PURE__ */ jsx("td", { "data-label": dataLabel, className: `num ${direction}`, children: format2(raw) }, cell.id);
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
return /* @__PURE__ */ jsx(
|
|
1860
|
+
"td",
|
|
1861
|
+
{
|
|
1862
|
+
"data-label": dataLabel,
|
|
1863
|
+
className: meta?.numeric || meta?.finance ? "num" : void 0,
|
|
1864
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
1865
|
+
},
|
|
1866
|
+
cell.id
|
|
1867
|
+
);
|
|
1868
|
+
}) }, row.id));
|
|
1869
|
+
}
|
|
1870
|
+
return /* @__PURE__ */ jsx("div", { className: "dt-wrap", children: /* @__PURE__ */ jsxs("table", { className: tableClass, "aria-busy": loading || void 0, children: [
|
|
1871
|
+
/* @__PURE__ */ jsx("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", { children: headerGroup.headers.map((header, colIndex) => /* @__PURE__ */ jsx("th", { className: columnIsNumeric[colIndex] ? "num" : void 0, children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }, headerGroup.id)) }),
|
|
1872
|
+
/* @__PURE__ */ jsx("tbody", { children: renderBody() })
|
|
1873
|
+
] }) });
|
|
1874
|
+
}
|
|
1875
|
+
var DEFAULT_WIDTH = 480;
|
|
1876
|
+
var DEFAULT_HEIGHT = 300;
|
|
1877
|
+
var ALL_RANGES = ["1D", "5D", "1M", "3M", "1Y"];
|
|
1878
|
+
var MARGIN = { top: 14, right: 10, bottom: 22, left: 34 };
|
|
1879
|
+
var MIN_BODY_HEIGHT = 1.2;
|
|
1880
|
+
function normalize(data) {
|
|
1881
|
+
const out = [];
|
|
1882
|
+
for (const d of data) {
|
|
1883
|
+
const date = d.date instanceof Date ? d.date : new Date(d.date);
|
|
1884
|
+
if (Number.isNaN(date.getTime())) continue;
|
|
1885
|
+
if (![d.open, d.high, d.low, d.close].every((n) => Number.isFinite(n))) continue;
|
|
1886
|
+
out.push({ date, open: d.open, high: d.high, low: d.low, close: d.close });
|
|
1887
|
+
}
|
|
1888
|
+
return out;
|
|
1889
|
+
}
|
|
1890
|
+
function Candlestick({
|
|
1891
|
+
data,
|
|
1892
|
+
range: range2,
|
|
1893
|
+
ranges = ALL_RANGES,
|
|
1894
|
+
onRangeChange,
|
|
1895
|
+
theme,
|
|
1896
|
+
width: widthProp,
|
|
1897
|
+
height: heightProp,
|
|
1898
|
+
interactive = true,
|
|
1899
|
+
showGrid,
|
|
1900
|
+
showAxis = true,
|
|
1901
|
+
ariaLabel = "Candlestick chart",
|
|
1902
|
+
onDraw,
|
|
1903
|
+
className
|
|
1904
|
+
}) {
|
|
1905
|
+
const containerRef = useRef(null);
|
|
1906
|
+
const svgRef = useRef(null);
|
|
1907
|
+
const [measuredWidth, setMeasuredWidth] = useState(null);
|
|
1908
|
+
const [hover, setHover] = useState(null);
|
|
1909
|
+
const bars = useMemo(() => normalize(data), [data]);
|
|
1910
|
+
const fmt = useMemo(
|
|
1911
|
+
() => ({ date: d3.timeFormat("%b %d"), price: d3.format(".2f"), axis: d3.format("~s") }),
|
|
1912
|
+
[]
|
|
1913
|
+
);
|
|
1914
|
+
const onDrawRef = useRef(onDraw);
|
|
1915
|
+
useEffect(() => {
|
|
1916
|
+
onDrawRef.current = onDraw;
|
|
1917
|
+
}, [onDraw]);
|
|
1918
|
+
const width = widthProp ?? measuredWidth ?? DEFAULT_WIDTH;
|
|
1919
|
+
const height = heightProp ?? DEFAULT_HEIGHT;
|
|
1920
|
+
const grid = showGrid ?? interactive;
|
|
1921
|
+
useEffect(() => {
|
|
1922
|
+
if (widthProp != null) return;
|
|
1923
|
+
const el = containerRef.current;
|
|
1924
|
+
if (!el) return;
|
|
1925
|
+
const ro = new ResizeObserver((entries) => {
|
|
1926
|
+
const cr = entries[0]?.contentRect;
|
|
1927
|
+
if (cr && cr.width > 0) setMeasuredWidth(cr.width);
|
|
1928
|
+
});
|
|
1929
|
+
ro.observe(el);
|
|
1930
|
+
return () => {
|
|
1931
|
+
ro.disconnect();
|
|
1932
|
+
};
|
|
1933
|
+
}, [widthProp]);
|
|
1934
|
+
useEffect(() => {
|
|
1935
|
+
const svgEl = svgRef.current;
|
|
1936
|
+
if (!svgEl) return;
|
|
1937
|
+
const svg = d3.select(svgEl).attr("viewBox", `0 0 ${width} ${height}`).attr("preserveAspectRatio", "xMidYMid meet");
|
|
1938
|
+
svg.selectAll("*").remove();
|
|
1939
|
+
let overlay = null;
|
|
1940
|
+
if (bars.length > 0) {
|
|
1941
|
+
const plotBottom = height - MARGIN.bottom;
|
|
1942
|
+
const x = d3.scaleBand().domain(d3.range(bars.length)).range([MARGIN.left, width - MARGIN.right]).padding(0.3);
|
|
1943
|
+
const lo = d3.min(bars, (d) => d.low) ?? 0;
|
|
1944
|
+
const hi = d3.max(bars, (d) => d.high) ?? 1;
|
|
1945
|
+
const pad = lo === hi ? Math.abs(lo) * 0.05 || 1 : 0;
|
|
1946
|
+
const y = d3.scaleLinear().domain([lo - pad, hi + pad]).nice().range([plotBottom, MARGIN.top]);
|
|
1947
|
+
const bw = x.bandwidth();
|
|
1948
|
+
const cxOf = (i) => (x(i) ?? 0) + bw / 2;
|
|
1949
|
+
if (grid) {
|
|
1950
|
+
svg.append("g").selectAll("line").data(y.ticks(4)).join("line").attr("x1", MARGIN.left).attr("x2", width - MARGIN.right).attr("y1", (d) => y(d)).attr("y2", (d) => y(d)).style("stroke", "var(--border-default)").style("stroke-dasharray", "2 3");
|
|
1951
|
+
}
|
|
1952
|
+
if (showAxis) {
|
|
1953
|
+
const everyN = Math.max(1, Math.ceil(bars.length / 5));
|
|
1954
|
+
const ay = svg.append("g").attr("transform", `translate(${MARGIN.left},0)`).call(
|
|
1955
|
+
d3.axisLeft(y).ticks(5).tickSize(0).tickFormat((v) => fmt.axis(v))
|
|
1956
|
+
);
|
|
1957
|
+
ay.select(".domain").remove();
|
|
1958
|
+
const ax = svg.append("g").attr("transform", `translate(0,${plotBottom})`).call(
|
|
1959
|
+
d3.axisBottom(x).tickValues(x.domain().filter((_, i) => i % everyN === 0)).tickSize(0).tickFormat((i) => {
|
|
1960
|
+
const b = bars[i];
|
|
1961
|
+
return b ? fmt.date(b.date) : "";
|
|
1962
|
+
})
|
|
1963
|
+
);
|
|
1964
|
+
ax.select(".domain").remove();
|
|
1965
|
+
svg.selectAll(".tick text").style("fill", "var(--text-muted)").style("font-family", "var(--font-display)").style("font-size", "9.5px");
|
|
1966
|
+
svg.selectAll(".tick line").style("stroke", "var(--border-default)");
|
|
1967
|
+
}
|
|
1968
|
+
const candle = svg.append("g").selectAll("g").data(bars).join("g").attr("class", (d) => d.close >= d.open ? "trend-up" : "trend-down");
|
|
1969
|
+
candle.append("line").attr("x1", (_, i) => cxOf(i)).attr("x2", (_, i) => cxOf(i)).attr("y1", (d) => y(d.high)).attr("y2", (d) => y(d.low)).attr("stroke", "currentColor").attr("stroke-width", 1);
|
|
1970
|
+
candle.append("rect").attr("x", (_, i) => x(i) ?? 0).attr("y", (d) => y(Math.max(d.open, d.close))).attr("width", bw).attr("height", (d) => Math.max(MIN_BODY_HEIGHT, Math.abs(y(d.open) - y(d.close)))).attr("fill", "currentColor").attr("stroke", "currentColor").attr("stroke-width", 1);
|
|
1971
|
+
if (interactive) {
|
|
1972
|
+
const crosshair = svg.append("g").attr("class", "crosshair").style("opacity", 0);
|
|
1973
|
+
const vline = crosshair.append("line").attr("y1", MARGIN.top).attr("y2", plotBottom).style("stroke", "var(--text-muted)").style("stroke-width", 1).style("stroke-dasharray", "3 3");
|
|
1974
|
+
const hline = crosshair.append("line").attr("x1", MARGIN.left).attr("x2", width - MARGIN.right).style("stroke", "var(--text-muted)").style("stroke-width", 1).style("stroke-dasharray", "3 3");
|
|
1975
|
+
const dot = crosshair.append("circle").attr("r", 3.5).style("fill", "none").style("stroke", "var(--text-primary)").style("stroke-width", 1.5);
|
|
1976
|
+
const nearestIndex = (mx) => {
|
|
1977
|
+
const raw = Math.round((mx - MARGIN.left - bw / 2) / x.step());
|
|
1978
|
+
return Math.max(0, Math.min(bars.length - 1, raw));
|
|
1979
|
+
};
|
|
1980
|
+
overlay = svg.append("rect").attr("x", MARGIN.left).attr("y", MARGIN.top).attr("width", Math.max(0, width - MARGIN.right - MARGIN.left)).attr("height", Math.max(0, plotBottom - MARGIN.top)).attr("fill", "transparent").style("cursor", "crosshair");
|
|
1981
|
+
overlay.on("pointermove", (event) => {
|
|
1982
|
+
const [mx] = d3.pointer(event, svgEl);
|
|
1983
|
+
const index = nearestIndex(mx);
|
|
1984
|
+
const d = bars[index];
|
|
1985
|
+
if (!d) return;
|
|
1986
|
+
const cx = cxOf(index);
|
|
1987
|
+
const cy = y(d.close);
|
|
1988
|
+
crosshair.style("opacity", 1);
|
|
1989
|
+
vline.attr("x1", cx).attr("x2", cx);
|
|
1990
|
+
hline.attr("y1", cy).attr("y2", cy);
|
|
1991
|
+
dot.attr("cx", cx).attr("cy", cy);
|
|
1992
|
+
setHover((prev) => prev?.index === index ? prev : { index, cx, cy });
|
|
1993
|
+
}).on("pointerleave", () => {
|
|
1994
|
+
crosshair.style("opacity", 0);
|
|
1995
|
+
setHover(null);
|
|
1996
|
+
});
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
onDrawRef.current?.();
|
|
2000
|
+
return () => {
|
|
2001
|
+
setHover(null);
|
|
2002
|
+
overlay?.on("pointermove", null).on("pointerleave", null);
|
|
2003
|
+
svg.selectAll("*").interrupt();
|
|
2004
|
+
svg.selectAll("*").remove();
|
|
2005
|
+
};
|
|
2006
|
+
}, [bars, range2, theme, width, height, interactive, grid, showAxis, fmt]);
|
|
2007
|
+
const hoverBar = hover ? bars[hover.index] : null;
|
|
2008
|
+
const change = hoverBar ? hoverBar.close - hoverBar.open : 0;
|
|
2009
|
+
const up = change >= 0;
|
|
2010
|
+
const pct = hoverBar && hoverBar.open !== 0 ? change / hoverBar.open * 100 : 0;
|
|
2011
|
+
const leftPct = hover ? hover.cx / width * 100 : 0;
|
|
2012
|
+
const flip = leftPct > 60;
|
|
2013
|
+
const wrapCls = ["candlestick", className].filter(Boolean).join(" ");
|
|
2014
|
+
return /* @__PURE__ */ jsxs(
|
|
2015
|
+
"figure",
|
|
2016
|
+
{
|
|
2017
|
+
ref: containerRef,
|
|
2018
|
+
className: wrapCls,
|
|
2019
|
+
style: {
|
|
2020
|
+
position: "relative",
|
|
2021
|
+
margin: 0,
|
|
2022
|
+
display: "flex",
|
|
2023
|
+
flexDirection: "column",
|
|
2024
|
+
gap: "10px"
|
|
2025
|
+
},
|
|
2026
|
+
children: [
|
|
2027
|
+
ranges.length > 0 ? /* @__PURE__ */ jsx("div", { className: "segmented", role: "group", "aria-label": "Time range", children: ranges.map((r) => /* @__PURE__ */ jsx(
|
|
2028
|
+
"button",
|
|
2029
|
+
{
|
|
2030
|
+
type: "button",
|
|
2031
|
+
"aria-pressed": r === range2,
|
|
2032
|
+
onClick: () => onRangeChange?.(r),
|
|
2033
|
+
children: r
|
|
2034
|
+
},
|
|
2035
|
+
r
|
|
2036
|
+
)) }) : null,
|
|
2037
|
+
/* @__PURE__ */ jsx(
|
|
2038
|
+
"svg",
|
|
2039
|
+
{
|
|
2040
|
+
ref: svgRef,
|
|
2041
|
+
role: "img",
|
|
2042
|
+
"aria-label": ariaLabel,
|
|
2043
|
+
style: {
|
|
2044
|
+
width: "100%",
|
|
2045
|
+
height: "auto",
|
|
2046
|
+
display: "block",
|
|
2047
|
+
border: ".5px solid var(--border-default)",
|
|
2048
|
+
borderRadius: "var(--radius-md)",
|
|
2049
|
+
background: "var(--bg-surface)"
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
),
|
|
2053
|
+
interactive && hover && hoverBar ? /* @__PURE__ */ jsxs(
|
|
2054
|
+
"div",
|
|
2055
|
+
{
|
|
2056
|
+
role: "tooltip",
|
|
2057
|
+
"aria-hidden": "true",
|
|
2058
|
+
style: {
|
|
2059
|
+
position: "absolute",
|
|
2060
|
+
left: `${leftPct}%`,
|
|
2061
|
+
top: "8px",
|
|
2062
|
+
transform: flip ? "translateX(calc(-100% - 12px))" : "translateX(12px)",
|
|
2063
|
+
pointerEvents: "none",
|
|
2064
|
+
minWidth: "118px",
|
|
2065
|
+
padding: "8px 10px",
|
|
2066
|
+
background: "var(--bg-primary)",
|
|
2067
|
+
border: "1px solid var(--border-strong)",
|
|
2068
|
+
borderRadius: "var(--radius-sm)",
|
|
2069
|
+
fontFamily: "var(--font-display)",
|
|
2070
|
+
fontSize: "11px",
|
|
2071
|
+
lineHeight: 1.5,
|
|
2072
|
+
color: "var(--text-secondary)",
|
|
2073
|
+
zIndex: 5
|
|
2074
|
+
},
|
|
2075
|
+
children: [
|
|
2076
|
+
/* @__PURE__ */ jsx(
|
|
2077
|
+
"div",
|
|
2078
|
+
{
|
|
2079
|
+
style: {
|
|
2080
|
+
fontFamily: "var(--font-ui)",
|
|
2081
|
+
fontSize: "9.5px",
|
|
2082
|
+
letterSpacing: "1px",
|
|
2083
|
+
textTransform: "uppercase",
|
|
2084
|
+
color: "var(--text-muted)",
|
|
2085
|
+
marginBottom: "4px"
|
|
2086
|
+
},
|
|
2087
|
+
children: fmt.date(hoverBar.date)
|
|
2088
|
+
}
|
|
2089
|
+
),
|
|
2090
|
+
["open", "high", "low", "close"].map((k) => /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", gap: "14px" }, children: [
|
|
2091
|
+
/* @__PURE__ */ jsx("span", { style: { color: "var(--text-muted)" }, children: k.charAt(0).toUpperCase() }),
|
|
2092
|
+
/* @__PURE__ */ jsx("b", { style: { color: "var(--text-primary)", fontVariantNumeric: "tabular-nums" }, children: fmt.price(hoverBar[k]) })
|
|
2093
|
+
] }, k)),
|
|
2094
|
+
/* @__PURE__ */ jsxs(
|
|
2095
|
+
"div",
|
|
2096
|
+
{
|
|
2097
|
+
style: {
|
|
2098
|
+
marginTop: "4px",
|
|
2099
|
+
fontWeight: 600,
|
|
2100
|
+
fontVariantNumeric: "tabular-nums",
|
|
2101
|
+
color: up ? "var(--data-up)" : "var(--data-down)"
|
|
2102
|
+
},
|
|
2103
|
+
children: [
|
|
2104
|
+
up ? "\u25B2" : "\u25BC",
|
|
2105
|
+
" ",
|
|
2106
|
+
up ? "+" : "",
|
|
2107
|
+
fmt.price(change),
|
|
2108
|
+
" (",
|
|
2109
|
+
up ? "+" : "",
|
|
2110
|
+
pct.toFixed(2),
|
|
2111
|
+
"%)"
|
|
2112
|
+
]
|
|
2113
|
+
}
|
|
2114
|
+
)
|
|
2115
|
+
]
|
|
2116
|
+
}
|
|
2117
|
+
) : null
|
|
2118
|
+
]
|
|
2119
|
+
}
|
|
2120
|
+
);
|
|
2121
|
+
}
|
|
2122
|
+
var NotificationBell = forwardRef(
|
|
2123
|
+
function NotificationBell2({ className, unreadCount, children, "aria-label": ariaLabel, ...rest }, ref) {
|
|
2124
|
+
return /* @__PURE__ */ jsxs(
|
|
2125
|
+
"button",
|
|
2126
|
+
{
|
|
2127
|
+
ref,
|
|
2128
|
+
type: "button",
|
|
2129
|
+
className: ["iconbtn", className].filter(Boolean).join(" "),
|
|
2130
|
+
"aria-label": ariaLabel ?? "Notifications",
|
|
2131
|
+
...rest,
|
|
2132
|
+
children: [
|
|
2133
|
+
children ?? /* @__PURE__ */ jsx(Bell, { size: 19 }),
|
|
2134
|
+
unreadCount !== void 0 && unreadCount >= 1 ? /* @__PURE__ */ jsx("span", { className: "badge-count", children: unreadCount }) : null
|
|
2135
|
+
]
|
|
2136
|
+
}
|
|
2137
|
+
);
|
|
2138
|
+
}
|
|
2139
|
+
);
|
|
2140
|
+
var AppBar = forwardRef(function AppBar2({
|
|
2141
|
+
brand,
|
|
2142
|
+
nav,
|
|
2143
|
+
actions,
|
|
2144
|
+
floating,
|
|
2145
|
+
hidden,
|
|
2146
|
+
hideOnScroll,
|
|
2147
|
+
scrollContainer,
|
|
2148
|
+
className,
|
|
2149
|
+
style,
|
|
2150
|
+
...rest
|
|
2151
|
+
}, ref) {
|
|
2152
|
+
const [scrolling, setScrolling] = useState(false);
|
|
2153
|
+
useEffect(() => {
|
|
2154
|
+
if (hideOnScroll !== true) return;
|
|
2155
|
+
const target = scrollContainer ?? window;
|
|
2156
|
+
let timer;
|
|
2157
|
+
function onScroll() {
|
|
2158
|
+
setScrolling(true);
|
|
2159
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
2160
|
+
timer = setTimeout(() => setScrolling(false), 220);
|
|
2161
|
+
}
|
|
2162
|
+
target.addEventListener("scroll", onScroll, { passive: true });
|
|
2163
|
+
return () => {
|
|
2164
|
+
target.removeEventListener("scroll", onScroll);
|
|
2165
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
2166
|
+
};
|
|
2167
|
+
}, [hideOnScroll, scrollContainer]);
|
|
2168
|
+
const isFloating = floating === true || hideOnScroll === true;
|
|
2169
|
+
const isHidden = hidden === true || scrolling;
|
|
2170
|
+
const floatStyle = isFloating ? {
|
|
2171
|
+
position: "absolute",
|
|
2172
|
+
top: 0,
|
|
2173
|
+
left: 0,
|
|
2174
|
+
right: 0,
|
|
2175
|
+
zIndex: 30,
|
|
2176
|
+
background: "color-mix(in oklab, var(--bg-primary) 80%, transparent)",
|
|
2177
|
+
backdropFilter: "blur(14px) saturate(1.15)",
|
|
2178
|
+
WebkitBackdropFilter: "blur(14px) saturate(1.15)",
|
|
2179
|
+
transition: "transform 0.34s var(--ease-out), opacity 0.28s var(--ease-out)"
|
|
2180
|
+
} : {};
|
|
2181
|
+
const hiddenStyle = isHidden ? { transform: "translateY(-130%)", opacity: 0, pointerEvents: "none" } : {};
|
|
2182
|
+
return /* @__PURE__ */ jsxs(
|
|
2183
|
+
"header",
|
|
2184
|
+
{
|
|
2185
|
+
ref,
|
|
2186
|
+
className: ["appbar", className].filter(Boolean).join(" "),
|
|
2187
|
+
style: { ...floatStyle, ...hiddenStyle, ...style },
|
|
2188
|
+
"data-hidden": isHidden ? "true" : void 0,
|
|
2189
|
+
...rest,
|
|
2190
|
+
children: [
|
|
2191
|
+
brand !== void 0 ? /* @__PURE__ */ jsx("div", { className: "appbar__brand", children: brand }) : null,
|
|
2192
|
+
nav !== void 0 ? /* @__PURE__ */ jsx("nav", { className: "appnav", children: nav }) : null,
|
|
2193
|
+
/* @__PURE__ */ jsx("span", { className: "appbar__spacer" }),
|
|
2194
|
+
actions !== void 0 ? /* @__PURE__ */ jsx("div", { className: "appbar__right", children: actions }) : null
|
|
2195
|
+
]
|
|
2196
|
+
}
|
|
2197
|
+
);
|
|
2198
|
+
});
|
|
2199
|
+
var UserMenu = DropdownMenu.Root;
|
|
2200
|
+
var UserMenuTrigger = forwardRef(function UserMenuTrigger2({ className, asChild, children, ...rest }, ref) {
|
|
2201
|
+
if (asChild === true) {
|
|
2202
|
+
return /* @__PURE__ */ jsx(DropdownMenu.Trigger, { ref, asChild: true, ...rest, children });
|
|
2203
|
+
}
|
|
2204
|
+
return /* @__PURE__ */ jsx(
|
|
2205
|
+
DropdownMenu.Trigger,
|
|
2206
|
+
{
|
|
2207
|
+
ref,
|
|
2208
|
+
className: ["usermenu", className].filter(Boolean).join(" "),
|
|
2209
|
+
...rest,
|
|
2210
|
+
children
|
|
2211
|
+
}
|
|
2212
|
+
);
|
|
2213
|
+
});
|
|
2214
|
+
var UserMenuContent = forwardRef(function UserMenuContent2({ className, children, sideOffset = 6, align = "end", ...rest }, ref) {
|
|
2215
|
+
return /* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx(
|
|
2216
|
+
DropdownMenu.Content,
|
|
2217
|
+
{
|
|
2218
|
+
ref,
|
|
2219
|
+
className: ["dropdown", className].filter(Boolean).join(" "),
|
|
2220
|
+
sideOffset,
|
|
2221
|
+
align,
|
|
2222
|
+
...rest,
|
|
2223
|
+
children
|
|
2224
|
+
}
|
|
2225
|
+
) });
|
|
2226
|
+
});
|
|
2227
|
+
function UserMenuHeader({ avatar, name, email }) {
|
|
2228
|
+
return /* @__PURE__ */ jsxs(DropdownMenu.Label, { className: "dropdown__head", children: [
|
|
2229
|
+
avatar,
|
|
2230
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2231
|
+
/* @__PURE__ */ jsx("div", { className: "dropdown__name", children: name }),
|
|
2232
|
+
email !== void 0 ? /* @__PURE__ */ jsx("div", { className: "dropdown__mail", children: email }) : null
|
|
2233
|
+
] })
|
|
2234
|
+
] });
|
|
2235
|
+
}
|
|
2236
|
+
var UserMenuGroup = forwardRef(
|
|
2237
|
+
function UserMenuGroup2({ className, ...rest }, ref) {
|
|
2238
|
+
return /* @__PURE__ */ jsx(
|
|
2239
|
+
DropdownMenu.Group,
|
|
2240
|
+
{
|
|
2241
|
+
ref,
|
|
2242
|
+
className: ["dropdown__sec", className].filter(Boolean).join(" "),
|
|
2243
|
+
...rest
|
|
2244
|
+
}
|
|
2245
|
+
);
|
|
2246
|
+
}
|
|
2247
|
+
);
|
|
2248
|
+
var UserMenuItem = forwardRef(
|
|
2249
|
+
function UserMenuItem2({ className, danger, icon, children, ...rest }, ref) {
|
|
2250
|
+
const cls = ["dropdown__row", danger === true ? "dropdown__row--danger" : "", className].filter(Boolean).join(" ");
|
|
2251
|
+
return /* @__PURE__ */ jsxs(DropdownMenu.Item, { ref, className: cls, ...rest, children: [
|
|
2252
|
+
icon,
|
|
2253
|
+
children
|
|
2254
|
+
] });
|
|
2255
|
+
}
|
|
2256
|
+
);
|
|
2257
|
+
var UserMenuSeparator = forwardRef(function UserMenuSeparator2({ className, ...rest }, ref) {
|
|
2258
|
+
return /* @__PURE__ */ jsx(
|
|
2259
|
+
DropdownMenu.Separator,
|
|
2260
|
+
{
|
|
2261
|
+
ref,
|
|
2262
|
+
className: ["dropdown__rule", className].filter(Boolean).join(" "),
|
|
2263
|
+
...rest
|
|
2264
|
+
}
|
|
2265
|
+
);
|
|
2266
|
+
});
|
|
2267
|
+
function readTheme() {
|
|
2268
|
+
return document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light";
|
|
2269
|
+
}
|
|
2270
|
+
var ThemeToggle = forwardRef(function ThemeToggle2({ className, onClick, onThemeChange, "aria-label": ariaLabel, ...rest }, ref) {
|
|
2271
|
+
function handleClick(event) {
|
|
2272
|
+
onClick?.(event);
|
|
2273
|
+
if (event.defaultPrevented) return;
|
|
2274
|
+
const next = readTheme() === "dark" ? "light" : "dark";
|
|
2275
|
+
document.documentElement.setAttribute("data-theme", next);
|
|
2276
|
+
onThemeChange?.(next);
|
|
2277
|
+
}
|
|
2278
|
+
return /* @__PURE__ */ jsxs(
|
|
2279
|
+
"button",
|
|
2280
|
+
{
|
|
2281
|
+
ref,
|
|
2282
|
+
type: "button",
|
|
2283
|
+
className: ["iconbtn", "theme-toggle", className].filter(Boolean).join(" "),
|
|
2284
|
+
"aria-label": ariaLabel ?? "Toggle theme",
|
|
2285
|
+
onClick: handleClick,
|
|
2286
|
+
...rest,
|
|
2287
|
+
children: [
|
|
2288
|
+
/* @__PURE__ */ jsx("span", { className: "ic-sun", children: /* @__PURE__ */ jsx(Sun, { size: 19 }) }),
|
|
2289
|
+
/* @__PURE__ */ jsx("span", { className: "ic-moon", children: /* @__PURE__ */ jsx(Moon, { size: 19 }) })
|
|
2290
|
+
]
|
|
2291
|
+
}
|
|
2292
|
+
);
|
|
2293
|
+
});
|
|
2294
|
+
var Scrim = forwardRef(function Scrim2({ open, className, ...rest }, ref) {
|
|
2295
|
+
useEffect(() => {
|
|
2296
|
+
if (!open) return;
|
|
2297
|
+
const previousOverflow = document.body.style.overflow;
|
|
2298
|
+
document.body.style.overflow = "hidden";
|
|
2299
|
+
return () => {
|
|
2300
|
+
document.body.style.overflow = previousOverflow;
|
|
2301
|
+
};
|
|
2302
|
+
}, [open]);
|
|
2303
|
+
if (!open) return null;
|
|
2304
|
+
return /* @__PURE__ */ jsx("div", { ref, className: ["scrim", className].filter(Boolean).join(" "), ...rest });
|
|
2305
|
+
});
|
|
2306
|
+
function StockyIcon() {
|
|
2307
|
+
return /* @__PURE__ */ jsx("span", { className: "stocky-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 32 32", fill: "none", children: [
|
|
2308
|
+
/* @__PURE__ */ jsxs("g", { stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
|
|
2309
|
+
/* @__PURE__ */ jsx("path", { d: "M16 8 11.5 3" }),
|
|
2310
|
+
/* @__PURE__ */ jsx("path", { d: "M16 8 20.5 3" })
|
|
2311
|
+
] }),
|
|
2312
|
+
/* @__PURE__ */ jsx("circle", { cx: "11.5", cy: "3", r: "1.4", fill: "currentColor" }),
|
|
2313
|
+
/* @__PURE__ */ jsx("circle", { cx: "20.5", cy: "3", r: "1.4", fill: "currentColor" }),
|
|
2314
|
+
/* @__PURE__ */ jsx("rect", { x: "4", y: "8", width: "24", height: "20", rx: "4.5", stroke: "currentColor", strokeWidth: "1.6" }),
|
|
2315
|
+
/* @__PURE__ */ jsx("rect", { className: "stocky-screen", x: "7", y: "11", width: "18", height: "13.5", rx: "2.5" }),
|
|
2316
|
+
/* @__PURE__ */ jsx("rect", { className: "stocky-scan", x: "7.6", y: "11.4", width: "16.8", height: "1.3", rx: "0.6" }),
|
|
2317
|
+
/* @__PURE__ */ jsx("circle", { className: "stocky-eye", cx: "12.6", cy: "17.6", r: "1.95" }),
|
|
2318
|
+
/* @__PURE__ */ jsx("circle", { className: "stocky-eye stocky-eye--r", cx: "19.4", cy: "17.6", r: "1.95" }),
|
|
2319
|
+
/* @__PURE__ */ jsx(
|
|
2320
|
+
"path",
|
|
2321
|
+
{
|
|
2322
|
+
d: "M9.5 28v2M22.5 28v2",
|
|
2323
|
+
stroke: "currentColor",
|
|
2324
|
+
strokeWidth: "1.6",
|
|
2325
|
+
strokeLinecap: "round"
|
|
2326
|
+
}
|
|
2327
|
+
)
|
|
2328
|
+
] }) });
|
|
2329
|
+
}
|
|
2330
|
+
var POP_SIDE_OFFSET = 14;
|
|
2331
|
+
var CommandDock = forwardRef(function CommandDock2({
|
|
2332
|
+
actions = [],
|
|
2333
|
+
searchPlaceholder = "Search symbols & briefings\u2026",
|
|
2334
|
+
noResultsLabel = "No results",
|
|
2335
|
+
aiEnabled = false,
|
|
2336
|
+
onAiSubmit,
|
|
2337
|
+
aiPlaceholder = "type a question\u2026",
|
|
2338
|
+
aiDisabledLabel = "Add your API key to enable AI",
|
|
2339
|
+
addSuggestions = [],
|
|
2340
|
+
addPlaceholder = "Add a ticker \u2014 name or symbol\u2026",
|
|
2341
|
+
onAddQueryChange,
|
|
2342
|
+
hideOnScroll,
|
|
2343
|
+
scrollContainer,
|
|
2344
|
+
hidden,
|
|
2345
|
+
className,
|
|
2346
|
+
...rest
|
|
2347
|
+
}, ref) {
|
|
2348
|
+
const [openId, setOpenId] = useState(null);
|
|
2349
|
+
const [scrolling, setScrolling] = useState(false);
|
|
2350
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
2351
|
+
const [addQuery, setAddQuery] = useState("");
|
|
2352
|
+
const [prompt, setPrompt] = useState("");
|
|
2353
|
+
const searchInputRef = useRef(null);
|
|
2354
|
+
useEffect(() => {
|
|
2355
|
+
if (hideOnScroll !== true) return;
|
|
2356
|
+
const target = scrollContainer ?? window;
|
|
2357
|
+
let timer;
|
|
2358
|
+
function onScroll() {
|
|
2359
|
+
setScrolling(true);
|
|
2360
|
+
setOpenId(null);
|
|
2361
|
+
setSearchQuery("");
|
|
2362
|
+
setAddQuery("");
|
|
2363
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
2364
|
+
timer = setTimeout(() => setScrolling(false), 220);
|
|
2365
|
+
}
|
|
2366
|
+
target.addEventListener("scroll", onScroll, { passive: true });
|
|
2367
|
+
return () => {
|
|
2368
|
+
target.removeEventListener("scroll", onScroll);
|
|
2369
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
2370
|
+
};
|
|
2371
|
+
}, [hideOnScroll, scrollContainer]);
|
|
2372
|
+
const isHidden = hidden === true || scrolling;
|
|
2373
|
+
const filteredActions = useMemo(() => {
|
|
2374
|
+
const q = searchQuery.trim().toLowerCase();
|
|
2375
|
+
if (q === "") return actions;
|
|
2376
|
+
return actions.filter((a) => a.label.toLowerCase().includes(q));
|
|
2377
|
+
}, [actions, searchQuery]);
|
|
2378
|
+
const filteredAdd = useMemo(() => {
|
|
2379
|
+
const q = addQuery.trim().toLowerCase();
|
|
2380
|
+
if (q === "") return addSuggestions;
|
|
2381
|
+
return addSuggestions.filter((a) => a.label.toLowerCase().includes(q));
|
|
2382
|
+
}, [addSuggestions, addQuery]);
|
|
2383
|
+
const handleOpenChange = useCallback((id, open) => {
|
|
2384
|
+
setOpenId(open ? id : null);
|
|
2385
|
+
if (!open && id === "search") setSearchQuery("");
|
|
2386
|
+
if (!open && id === "add") setAddQuery("");
|
|
2387
|
+
}, []);
|
|
2388
|
+
function runAction(action) {
|
|
2389
|
+
action.onSelect();
|
|
2390
|
+
setOpenId(null);
|
|
2391
|
+
}
|
|
2392
|
+
function handleAiSubmit(event) {
|
|
2393
|
+
event.preventDefault();
|
|
2394
|
+
if (!aiEnabled) return;
|
|
2395
|
+
const text = prompt.trim();
|
|
2396
|
+
if (text === "") return;
|
|
2397
|
+
onAiSubmit?.(text);
|
|
2398
|
+
setPrompt("");
|
|
2399
|
+
}
|
|
2400
|
+
return /* @__PURE__ */ jsxs(
|
|
2401
|
+
"div",
|
|
2402
|
+
{
|
|
2403
|
+
ref,
|
|
2404
|
+
className: ["dock", isHidden ? "dock--hidden" : "", className].filter(Boolean).join(" "),
|
|
2405
|
+
"data-hidden": isHidden ? "true" : void 0,
|
|
2406
|
+
...rest,
|
|
2407
|
+
children: [
|
|
2408
|
+
/* @__PURE__ */ jsxs(Popover.Root, { open: openId === "search", onOpenChange: (o) => handleOpenChange("search", o), children: [
|
|
2409
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { className: "btn btn--ghost btn--icon", "aria-label": "Search", children: /* @__PURE__ */ jsx(SearchIcon, { size: 21 }) }),
|
|
2410
|
+
/* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(
|
|
2411
|
+
Popover.Content,
|
|
2412
|
+
{
|
|
2413
|
+
className: "dock-pop",
|
|
2414
|
+
side: "top",
|
|
2415
|
+
sideOffset: POP_SIDE_OFFSET,
|
|
2416
|
+
onOpenAutoFocus: (e) => {
|
|
2417
|
+
e.preventDefault();
|
|
2418
|
+
searchInputRef.current?.focus();
|
|
2419
|
+
},
|
|
2420
|
+
children: /* @__PURE__ */ jsxs("div", { className: "dropdown", style: { width: "min(440px, 86vw)" }, children: [
|
|
2421
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "12px 14px" }, children: /* @__PURE__ */ jsxs("div", { className: "input-wrap", children: [
|
|
2422
|
+
/* @__PURE__ */ jsx(
|
|
2423
|
+
"input",
|
|
2424
|
+
{
|
|
2425
|
+
ref: searchInputRef,
|
|
2426
|
+
className: "input",
|
|
2427
|
+
type: "text",
|
|
2428
|
+
placeholder: searchPlaceholder,
|
|
2429
|
+
value: searchQuery,
|
|
2430
|
+
"aria-label": "Search",
|
|
2431
|
+
onChange: (e) => setSearchQuery(e.target.value)
|
|
2432
|
+
}
|
|
2433
|
+
),
|
|
2434
|
+
/* @__PURE__ */ jsx("span", { className: "input-wrap__affix", "aria-hidden": "true", children: /* @__PURE__ */ jsx(SearchIcon, { size: 21 }) })
|
|
2435
|
+
] }) }),
|
|
2436
|
+
actions.length > 0 ? filteredActions.length > 0 ? /* @__PURE__ */ jsx("div", { className: "dropdown__sec", children: filteredActions.map((a) => /* @__PURE__ */ jsxs(
|
|
2437
|
+
"button",
|
|
2438
|
+
{
|
|
2439
|
+
type: "button",
|
|
2440
|
+
className: "dropdown__row",
|
|
2441
|
+
onClick: () => runAction(a),
|
|
2442
|
+
children: [
|
|
2443
|
+
a.icon,
|
|
2444
|
+
a.label
|
|
2445
|
+
]
|
|
2446
|
+
},
|
|
2447
|
+
a.id
|
|
2448
|
+
)) }) : /* @__PURE__ */ jsx("div", { className: "dropdown__sec", children: /* @__PURE__ */ jsx(
|
|
2449
|
+
"div",
|
|
2450
|
+
{
|
|
2451
|
+
className: "dropdown__row",
|
|
2452
|
+
role: "status",
|
|
2453
|
+
style: { color: "var(--text-muted)", cursor: "default" },
|
|
2454
|
+
children: noResultsLabel
|
|
2455
|
+
}
|
|
2456
|
+
) }) : null
|
|
2457
|
+
] })
|
|
2458
|
+
}
|
|
2459
|
+
) })
|
|
2460
|
+
] }),
|
|
2461
|
+
/* @__PURE__ */ jsxs(Popover.Root, { open: openId === "ai", onOpenChange: (o) => handleOpenChange("ai", o), children: [
|
|
2462
|
+
/* @__PURE__ */ jsx(
|
|
2463
|
+
Popover.Trigger,
|
|
2464
|
+
{
|
|
2465
|
+
className: "btn btn--ghost btn--icon iconbtn--stocky",
|
|
2466
|
+
"aria-label": "Ask Stocky",
|
|
2467
|
+
children: /* @__PURE__ */ jsx(StockyIcon, {})
|
|
2468
|
+
}
|
|
2469
|
+
),
|
|
2470
|
+
/* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Content, { className: "dock-pop", side: "top", sideOffset: POP_SIDE_OFFSET, children: /* @__PURE__ */ jsxs(
|
|
2471
|
+
"form",
|
|
2472
|
+
{
|
|
2473
|
+
className: "dropdown",
|
|
2474
|
+
style: {
|
|
2475
|
+
width: "min(440px, 86vw)",
|
|
2476
|
+
padding: "12px 14px",
|
|
2477
|
+
display: "grid",
|
|
2478
|
+
gap: "10px"
|
|
2479
|
+
},
|
|
2480
|
+
onSubmit: handleAiSubmit,
|
|
2481
|
+
children: [
|
|
2482
|
+
/* @__PURE__ */ jsx(
|
|
2483
|
+
"textarea",
|
|
2484
|
+
{
|
|
2485
|
+
className: "input",
|
|
2486
|
+
rows: 2,
|
|
2487
|
+
placeholder: aiPlaceholder,
|
|
2488
|
+
"aria-label": "Ask Stocky",
|
|
2489
|
+
value: prompt,
|
|
2490
|
+
disabled: !aiEnabled,
|
|
2491
|
+
onChange: (e) => setPrompt(e.target.value),
|
|
2492
|
+
style: { resize: "none" }
|
|
2493
|
+
}
|
|
2494
|
+
),
|
|
2495
|
+
!aiEnabled ? /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: "11.5px", color: "var(--text-muted)" }, children: aiDisabledLabel }) : null,
|
|
2496
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx("button", { type: "submit", className: "btn btn--primary", disabled: !aiEnabled, children: "Ask" }) })
|
|
2497
|
+
]
|
|
2498
|
+
}
|
|
2499
|
+
) }) })
|
|
2500
|
+
] }),
|
|
2501
|
+
/* @__PURE__ */ jsx("span", { className: "dock__div" }),
|
|
2502
|
+
/* @__PURE__ */ jsxs(Popover.Root, { open: openId === "add", onOpenChange: (o) => handleOpenChange("add", o), children: [
|
|
2503
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { className: "btn btn--primary btn--icon", "aria-label": "Add stock", children: /* @__PURE__ */ jsx(Plus, { size: 22, strokeWidth: 1.8 }) }),
|
|
2504
|
+
/* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Content, { className: "dock-pop", side: "top", sideOffset: POP_SIDE_OFFSET, children: /* @__PURE__ */ jsxs("div", { className: "dropdown", style: { width: "min(440px, 86vw)" }, children: [
|
|
2505
|
+
/* @__PURE__ */ jsx(
|
|
2506
|
+
"div",
|
|
2507
|
+
{
|
|
2508
|
+
style: {
|
|
2509
|
+
padding: "12px 14px",
|
|
2510
|
+
borderBottom: filteredAdd.length > 0 ? "0.5px solid var(--border-default)" : void 0
|
|
2511
|
+
},
|
|
2512
|
+
children: /* @__PURE__ */ jsxs("div", { className: "input-wrap", children: [
|
|
2513
|
+
/* @__PURE__ */ jsx(
|
|
2514
|
+
"input",
|
|
2515
|
+
{
|
|
2516
|
+
className: "input",
|
|
2517
|
+
type: "text",
|
|
2518
|
+
placeholder: addPlaceholder,
|
|
2519
|
+
value: addQuery,
|
|
2520
|
+
"aria-label": "Add stock",
|
|
2521
|
+
onChange: (e) => {
|
|
2522
|
+
setAddQuery(e.target.value);
|
|
2523
|
+
onAddQueryChange?.(e.target.value);
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
),
|
|
2527
|
+
/* @__PURE__ */ jsx("span", { className: "input-wrap__affix", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Plus, { size: 22, strokeWidth: 1.8 }) })
|
|
2528
|
+
] })
|
|
2529
|
+
}
|
|
2530
|
+
),
|
|
2531
|
+
filteredAdd.length > 0 ? /* @__PURE__ */ jsx("div", { className: "dropdown__sec", children: filteredAdd.map((a) => /* @__PURE__ */ jsxs(
|
|
2532
|
+
"button",
|
|
2533
|
+
{
|
|
2534
|
+
type: "button",
|
|
2535
|
+
className: "dropdown__row",
|
|
2536
|
+
onClick: () => runAction(a),
|
|
2537
|
+
children: [
|
|
2538
|
+
a.icon,
|
|
2539
|
+
a.label
|
|
2540
|
+
]
|
|
2541
|
+
},
|
|
2542
|
+
a.id
|
|
2543
|
+
)) }) : null
|
|
2544
|
+
] }) }) })
|
|
2545
|
+
] })
|
|
2546
|
+
]
|
|
2547
|
+
}
|
|
2548
|
+
);
|
|
2549
|
+
});
|
|
2550
|
+
function MarkIcon({ kind }) {
|
|
2551
|
+
if (kind === "up") return /* @__PURE__ */ jsx(ArrowUpRight, { size: 15, strokeWidth: 1.8 });
|
|
2552
|
+
if (kind === "down") return /* @__PURE__ */ jsx(ArrowDownRight, { size: 15, strokeWidth: 1.8 });
|
|
2553
|
+
if (kind === "warn") return /* @__PURE__ */ jsx(TriangleAlert, { size: 15, strokeWidth: 1.7 });
|
|
2554
|
+
return /* @__PURE__ */ jsx(Info, { size: 15, strokeWidth: 1.7 });
|
|
2555
|
+
}
|
|
2556
|
+
function NotificationRow({ item }) {
|
|
2557
|
+
const { id, kind, title, body, timestamp, read, onMarkRead } = item;
|
|
2558
|
+
const markClass = kind !== void 0 ? `notif__mark notif__mark--${kind}` : "notif__mark";
|
|
2559
|
+
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2560
|
+
/* @__PURE__ */ jsx("span", { className: markClass, "aria-hidden": "true", children: /* @__PURE__ */ jsx(MarkIcon, { kind }) }),
|
|
2561
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2562
|
+
/* @__PURE__ */ jsxs("div", { className: "notif__txt", children: [
|
|
2563
|
+
title,
|
|
2564
|
+
body !== void 0 && body !== null ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2565
|
+
" ",
|
|
2566
|
+
body
|
|
2567
|
+
] }) : null
|
|
2568
|
+
] }),
|
|
2569
|
+
/* @__PURE__ */ jsx("span", { className: "notif__time", children: timestamp })
|
|
2570
|
+
] })
|
|
2571
|
+
] });
|
|
2572
|
+
if (read) {
|
|
2573
|
+
return /* @__PURE__ */ jsx("div", { className: "notif__item", children: inner });
|
|
2574
|
+
}
|
|
2575
|
+
function onKeyDown(event) {
|
|
2576
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
2577
|
+
event.preventDefault();
|
|
2578
|
+
onMarkRead(id);
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
const ariaLabel = typeof title === "string" ? `Mark read: ${title}` : "Mark notification read";
|
|
2582
|
+
return /* @__PURE__ */ jsx(
|
|
2583
|
+
"div",
|
|
2584
|
+
{
|
|
2585
|
+
className: "notif__item notif__item--unread",
|
|
2586
|
+
role: "button",
|
|
2587
|
+
tabIndex: 0,
|
|
2588
|
+
"aria-label": ariaLabel,
|
|
2589
|
+
onClick: () => onMarkRead(id),
|
|
2590
|
+
onKeyDown,
|
|
2591
|
+
children: inner
|
|
2592
|
+
}
|
|
2593
|
+
);
|
|
2594
|
+
}
|
|
2595
|
+
function NotificationCenter({
|
|
2596
|
+
items,
|
|
2597
|
+
title = "Notifications",
|
|
2598
|
+
onMarkAllRead,
|
|
2599
|
+
markAllLabel = "Mark all read",
|
|
2600
|
+
emptyLabel = "No notifications",
|
|
2601
|
+
viewAllHref,
|
|
2602
|
+
viewAllLabel = "View all",
|
|
2603
|
+
bellLabel,
|
|
2604
|
+
align = "end",
|
|
2605
|
+
sideOffset = 6
|
|
2606
|
+
}) {
|
|
2607
|
+
const unreadCount = items.filter((i) => !i.read).length;
|
|
2608
|
+
return /* @__PURE__ */ jsxs(Popover.Root, { children: [
|
|
2609
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(NotificationBell, { unreadCount, "aria-label": bellLabel }) }),
|
|
2610
|
+
/* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsxs(Popover.Content, { className: "dropdown notif", align, sideOffset, children: [
|
|
2611
|
+
/* @__PURE__ */ jsxs("div", { className: "notif__head", children: [
|
|
2612
|
+
/* @__PURE__ */ jsx("span", { className: "notif__title", children: title }),
|
|
2613
|
+
onMarkAllRead !== void 0 ? /* @__PURE__ */ jsx("button", { type: "button", className: "notif__clear", onClick: onMarkAllRead, children: markAllLabel }) : null
|
|
2614
|
+
] }),
|
|
2615
|
+
/* @__PURE__ */ jsx("div", { className: "notif__list", children: items.length === 0 ? /* @__PURE__ */ jsxs(
|
|
2616
|
+
"div",
|
|
2617
|
+
{
|
|
2618
|
+
style: {
|
|
2619
|
+
display: "grid",
|
|
2620
|
+
placeItems: "center",
|
|
2621
|
+
gap: "10px",
|
|
2622
|
+
padding: "34px 16px",
|
|
2623
|
+
color: "var(--text-muted)"
|
|
2624
|
+
},
|
|
2625
|
+
children: [
|
|
2626
|
+
/* @__PURE__ */ jsx(BellOff, { size: 26, strokeWidth: 1.4 }),
|
|
2627
|
+
/* @__PURE__ */ jsx("span", { style: { fontSize: "12.5px" }, children: emptyLabel })
|
|
2628
|
+
]
|
|
2629
|
+
}
|
|
2630
|
+
) : items.map((item) => /* @__PURE__ */ jsx(NotificationRow, { item }, item.id)) }),
|
|
2631
|
+
viewAllHref !== void 0 ? /* @__PURE__ */ jsx("div", { className: "notif__foot", children: /* @__PURE__ */ jsx("a", { href: viewAllHref, children: viewAllLabel }) }) : null
|
|
2632
|
+
] }) })
|
|
2633
|
+
] });
|
|
2634
|
+
}
|
|
2635
|
+
var DEFAULT_DISCLAIMER = "Stocky is AI and can get things wrong \u2014 not financial advice. Double-check before you trade.";
|
|
2636
|
+
var ROLE_PREFIX = {
|
|
2637
|
+
user: { label: "you \u203A", preClass: "term__pre--you", txtClass: "term__txt--you" },
|
|
2638
|
+
assistant: { label: "stocky \u203A", preClass: "term__pre--bot", txtClass: "term__txt--bot" }
|
|
2639
|
+
};
|
|
2640
|
+
function toText(content) {
|
|
2641
|
+
return typeof content === "string" ? content : content.map((t) => t.text).join("");
|
|
2642
|
+
}
|
|
2643
|
+
function Terminal({
|
|
2644
|
+
messages,
|
|
2645
|
+
streaming = false,
|
|
2646
|
+
error = null,
|
|
2647
|
+
onRetry,
|
|
2648
|
+
composer,
|
|
2649
|
+
disclaimer = DEFAULT_DISCLAIMER,
|
|
2650
|
+
title = "stocky",
|
|
2651
|
+
maxHeight,
|
|
2652
|
+
className
|
|
2653
|
+
}) {
|
|
2654
|
+
const endRef = useRef(null);
|
|
2655
|
+
useEffect(() => {
|
|
2656
|
+
endRef.current?.scrollIntoView({ block: "end" });
|
|
2657
|
+
}, [messages, streaming, error]);
|
|
2658
|
+
const lastIndex = messages.length - 1;
|
|
2659
|
+
const bodyStyle = maxHeight === void 0 ? void 0 : { maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight };
|
|
2660
|
+
return /* @__PURE__ */ jsxs("div", { className: ["term", className].filter(Boolean).join(" "), children: [
|
|
2661
|
+
/* @__PURE__ */ jsxs("div", { className: "term__head", children: [
|
|
2662
|
+
/* @__PURE__ */ jsx("span", { className: "term__caret", "aria-hidden": "true", children: "\u203A_" }),
|
|
2663
|
+
/* @__PURE__ */ jsx("span", { className: "term__title", children: title })
|
|
2664
|
+
] }),
|
|
2665
|
+
/* @__PURE__ */ jsxs("div", { className: "term__body", style: bodyStyle, "aria-live": "polite", "aria-atomic": "false", children: [
|
|
2666
|
+
messages.map((m, i) => {
|
|
2667
|
+
const { label, preClass, txtClass } = ROLE_PREFIX[m.role];
|
|
2668
|
+
const showCursor = streaming && i === lastIndex && m.role === "assistant";
|
|
2669
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
2670
|
+
i > 0 ? /* @__PURE__ */ jsx("hr", { className: "term__sep" }) : null,
|
|
2671
|
+
/* @__PURE__ */ jsxs("div", { className: "term__turn", children: [
|
|
2672
|
+
/* @__PURE__ */ jsx("span", { className: preClass, children: label }),
|
|
2673
|
+
/* @__PURE__ */ jsxs("span", { className: txtClass, children: [
|
|
2674
|
+
toText(m.content),
|
|
2675
|
+
showCursor ? /* @__PURE__ */ jsx("span", { className: "term__cursor", "data-testid": "term-cursor", "aria-hidden": "true" }) : null
|
|
2676
|
+
] })
|
|
2677
|
+
] })
|
|
2678
|
+
] }, m.id ?? i);
|
|
2679
|
+
}),
|
|
2680
|
+
error ? /* @__PURE__ */ jsxs(
|
|
2681
|
+
Callout,
|
|
2682
|
+
{
|
|
2683
|
+
variant: error.retryable ? "warning" : "error",
|
|
2684
|
+
title: error.retryable ? "Retrying\u2026" : "Error",
|
|
2685
|
+
className: "term__errrow",
|
|
2686
|
+
children: [
|
|
2687
|
+
error.message,
|
|
2688
|
+
!error.retryable && onRetry !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2689
|
+
" ",
|
|
2690
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onRetry, children: "Try again" })
|
|
2691
|
+
] }) : null
|
|
2692
|
+
]
|
|
2693
|
+
}
|
|
2694
|
+
) : null,
|
|
2695
|
+
/* @__PURE__ */ jsx("div", { ref: endRef })
|
|
2696
|
+
] }),
|
|
2697
|
+
composer,
|
|
2698
|
+
/* @__PURE__ */ jsx(Callout, { variant: "neutral", icon: false, className: "term__disc", children: disclaimer })
|
|
2699
|
+
] });
|
|
2700
|
+
}
|
|
2701
|
+
function Composer({
|
|
2702
|
+
onSend,
|
|
2703
|
+
keyProvided = true,
|
|
2704
|
+
placeholder = "type a question\u2026",
|
|
2705
|
+
prompt = "you \u203A",
|
|
2706
|
+
keyPrompt = "Add your key to start chatting.",
|
|
2707
|
+
sendLabel = "Send",
|
|
2708
|
+
inputLabel = "Message",
|
|
2709
|
+
className
|
|
2710
|
+
}) {
|
|
2711
|
+
const [value, setValue] = useState("");
|
|
2712
|
+
const taRef = useRef(null);
|
|
2713
|
+
const disabled = !keyProvided;
|
|
2714
|
+
function grow() {
|
|
2715
|
+
const ta = taRef.current;
|
|
2716
|
+
if (ta === null) return;
|
|
2717
|
+
ta.style.height = "auto";
|
|
2718
|
+
ta.style.height = `${ta.scrollHeight}px`;
|
|
2719
|
+
}
|
|
2720
|
+
function send() {
|
|
2721
|
+
if (disabled) return;
|
|
2722
|
+
const text = value.trim();
|
|
2723
|
+
if (text === "") return;
|
|
2724
|
+
onSend(text);
|
|
2725
|
+
setValue("");
|
|
2726
|
+
const ta = taRef.current;
|
|
2727
|
+
if (ta !== null) ta.style.height = "auto";
|
|
2728
|
+
}
|
|
2729
|
+
function handleChange(e) {
|
|
2730
|
+
setValue(e.target.value);
|
|
2731
|
+
grow();
|
|
2732
|
+
}
|
|
2733
|
+
function handleKeyDown(e) {
|
|
2734
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
2735
|
+
e.preventDefault();
|
|
2736
|
+
send();
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
return /* @__PURE__ */ jsxs("div", { className: ["term__composer", className].filter(Boolean).join(" "), children: [
|
|
2740
|
+
/* @__PURE__ */ jsx("span", { className: "term__prompt", children: prompt }),
|
|
2741
|
+
/* @__PURE__ */ jsx(
|
|
2742
|
+
"textarea",
|
|
2743
|
+
{
|
|
2744
|
+
ref: taRef,
|
|
2745
|
+
className: "term__input",
|
|
2746
|
+
rows: 1,
|
|
2747
|
+
value,
|
|
2748
|
+
placeholder,
|
|
2749
|
+
disabled,
|
|
2750
|
+
onChange: handleChange,
|
|
2751
|
+
onKeyDown: handleKeyDown,
|
|
2752
|
+
"aria-label": inputLabel
|
|
2753
|
+
}
|
|
2754
|
+
),
|
|
2755
|
+
/* @__PURE__ */ jsx(
|
|
2756
|
+
"button",
|
|
2757
|
+
{
|
|
2758
|
+
type: "button",
|
|
2759
|
+
className: "iconbtn term__send",
|
|
2760
|
+
onClick: send,
|
|
2761
|
+
disabled,
|
|
2762
|
+
"aria-label": sendLabel,
|
|
2763
|
+
children: /* @__PURE__ */ jsx(ArrowRight, { size: 16, strokeWidth: 1.6 })
|
|
2764
|
+
}
|
|
2765
|
+
),
|
|
2766
|
+
disabled ? /* @__PURE__ */ jsx("p", { className: "term__keyhint", children: keyPrompt }) : null
|
|
2767
|
+
] });
|
|
2768
|
+
}
|
|
2769
|
+
function parseStreamFrame(frame) {
|
|
2770
|
+
let event = "message";
|
|
2771
|
+
const dataLines = [];
|
|
2772
|
+
for (const raw of frame.split("\n")) {
|
|
2773
|
+
const line = raw.replace(/\r$/, "");
|
|
2774
|
+
if (line.startsWith("event:")) {
|
|
2775
|
+
event = line.slice("event:".length).trim();
|
|
2776
|
+
} else if (line.startsWith("data:")) {
|
|
2777
|
+
dataLines.push(line.slice("data:".length).trim());
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
if (dataLines.length === 0) return null;
|
|
2781
|
+
const data = dataLines.join("\n");
|
|
2782
|
+
if (data === "[DONE]") return { type: "done" };
|
|
2783
|
+
if (event === "error") {
|
|
2784
|
+
try {
|
|
2785
|
+
const parsed = JSON.parse(data);
|
|
2786
|
+
return {
|
|
2787
|
+
type: "error",
|
|
2788
|
+
retryable: parsed.retryable === true,
|
|
2789
|
+
message: typeof parsed.message === "string" ? parsed.message : "Stream error"
|
|
2790
|
+
};
|
|
2791
|
+
} catch {
|
|
2792
|
+
return { type: "error", retryable: false, message: data };
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
return { type: "token", text: data };
|
|
2796
|
+
}
|
|
2797
|
+
async function* streamFromResponse(response) {
|
|
2798
|
+
const body = response.body;
|
|
2799
|
+
if (body === null) return;
|
|
2800
|
+
const reader = body.getReader();
|
|
2801
|
+
const decoder = new TextDecoder();
|
|
2802
|
+
let buffer = "";
|
|
2803
|
+
try {
|
|
2804
|
+
for (; ; ) {
|
|
2805
|
+
const { done, value } = await reader.read();
|
|
2806
|
+
if (done) break;
|
|
2807
|
+
buffer += decoder.decode(value, { stream: true });
|
|
2808
|
+
let sep = buffer.indexOf("\n\n");
|
|
2809
|
+
while (sep !== -1) {
|
|
2810
|
+
const frame = buffer.slice(0, sep);
|
|
2811
|
+
buffer = buffer.slice(sep + 2);
|
|
2812
|
+
const ev = parseStreamFrame(frame);
|
|
2813
|
+
if (ev !== null) yield ev;
|
|
2814
|
+
sep = buffer.indexOf("\n\n");
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
buffer += decoder.decode();
|
|
2818
|
+
const tail = parseStreamFrame(buffer);
|
|
2819
|
+
if (tail !== null) yield tail;
|
|
2820
|
+
} finally {
|
|
2821
|
+
reader.releaseLock();
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2824
|
+
function updateLastAssistant(prev, text) {
|
|
2825
|
+
const next = prev.slice();
|
|
2826
|
+
for (let i = next.length - 1; i >= 0; i -= 1) {
|
|
2827
|
+
const m = next[i];
|
|
2828
|
+
if (m !== void 0 && m.role === "assistant") {
|
|
2829
|
+
next[i] = { role: "assistant", content: text };
|
|
2830
|
+
return next;
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
return next;
|
|
2834
|
+
}
|
|
2835
|
+
function useStreaming(initial = []) {
|
|
2836
|
+
const [messages, setMessages] = useState(initial);
|
|
2837
|
+
const [streaming, setStreaming] = useState(false);
|
|
2838
|
+
const [error, setError] = useState(null);
|
|
2839
|
+
const activeRef = useRef(false);
|
|
2840
|
+
const send = useCallback((text) => {
|
|
2841
|
+
setMessages((prev) => [...prev, { role: "user", content: text }]);
|
|
2842
|
+
}, []);
|
|
2843
|
+
const reset = useCallback(() => {
|
|
2844
|
+
setError(null);
|
|
2845
|
+
}, []);
|
|
2846
|
+
const start = useCallback(async (events) => {
|
|
2847
|
+
if (activeRef.current) return;
|
|
2848
|
+
activeRef.current = true;
|
|
2849
|
+
setError(null);
|
|
2850
|
+
setStreaming(true);
|
|
2851
|
+
setMessages((prev) => [...prev, { role: "assistant", content: "" }]);
|
|
2852
|
+
let acc = "";
|
|
2853
|
+
try {
|
|
2854
|
+
for await (const ev of events) {
|
|
2855
|
+
if (ev.type === "token") {
|
|
2856
|
+
acc += ev.text;
|
|
2857
|
+
setError(null);
|
|
2858
|
+
setMessages((prev) => updateLastAssistant(prev, acc));
|
|
2859
|
+
} else if (ev.type === "error") {
|
|
2860
|
+
setError({ kind: "error", retryable: ev.retryable, message: ev.message });
|
|
2861
|
+
if (!ev.retryable) return;
|
|
2862
|
+
} else {
|
|
2863
|
+
return;
|
|
2864
|
+
}
|
|
2865
|
+
}
|
|
2866
|
+
} finally {
|
|
2867
|
+
setStreaming(false);
|
|
2868
|
+
activeRef.current = false;
|
|
2869
|
+
if (acc === "") {
|
|
2870
|
+
setMessages((prev) => {
|
|
2871
|
+
const last = prev[prev.length - 1];
|
|
2872
|
+
return last !== void 0 && last.role === "assistant" && last.content === "" ? prev.slice(0, -1) : prev;
|
|
2873
|
+
});
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
}, []);
|
|
2877
|
+
return { messages, streaming, error, send, start, reset };
|
|
2878
|
+
}
|
|
2879
|
+
var HOVER_DELAY_MS = 200;
|
|
2880
|
+
var DEFAULT_LABEL = {
|
|
2881
|
+
source: "[source]",
|
|
2882
|
+
unverified: "[unverified]"
|
|
2883
|
+
};
|
|
2884
|
+
var KICKER = {
|
|
2885
|
+
source: "Source",
|
|
2886
|
+
unverified: "Unverified"
|
|
2887
|
+
};
|
|
2888
|
+
var TIP_MODIFIER = {
|
|
2889
|
+
source: "gtip--cited",
|
|
2890
|
+
unverified: "gtip--unverified"
|
|
2891
|
+
};
|
|
2892
|
+
function GroundingFlag({ variant, explainer, children, defaultOpen }) {
|
|
2893
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, { delayDuration: HOVER_DELAY_MS, children: /* @__PURE__ */ jsxs(TooltipPrimitive.Root, { defaultOpen: defaultOpen ?? false, children: [
|
|
2894
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "gwrap", tabIndex: 0, children: /* @__PURE__ */ jsx("span", { className: `ground-wave ground-wave--${variant}`, children: children ?? DEFAULT_LABEL[variant] }) }) }),
|
|
2895
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
2896
|
+
TooltipPrimitive.Content,
|
|
2897
|
+
{
|
|
2898
|
+
className: `gtip-pop ${TIP_MODIFIER[variant]}`,
|
|
2899
|
+
side: "top",
|
|
2900
|
+
sideOffset: 8,
|
|
2901
|
+
collisionPadding: 8,
|
|
2902
|
+
children: [
|
|
2903
|
+
/* @__PURE__ */ jsx("span", { className: "gtip__k", children: KICKER[variant] }),
|
|
2904
|
+
explainer
|
|
2905
|
+
]
|
|
2906
|
+
}
|
|
2907
|
+
) })
|
|
2908
|
+
] }) });
|
|
2909
|
+
}
|
|
2910
|
+
var ALLOWED_ELEMENTS = [
|
|
2911
|
+
"h1",
|
|
2912
|
+
"h2",
|
|
2913
|
+
"h3",
|
|
2914
|
+
"h4",
|
|
2915
|
+
"p",
|
|
2916
|
+
"code",
|
|
2917
|
+
"pre",
|
|
2918
|
+
"blockquote",
|
|
2919
|
+
"a",
|
|
2920
|
+
"em",
|
|
2921
|
+
"strong",
|
|
2922
|
+
"ol",
|
|
2923
|
+
"ul",
|
|
2924
|
+
"li",
|
|
2925
|
+
"hr"
|
|
2926
|
+
];
|
|
2927
|
+
var MD_COMPONENTS = {
|
|
2928
|
+
a: ({ children, href }) => (
|
|
2929
|
+
// `urlTransform` (defaultUrlTransform) already ran on this href upstream; we
|
|
2930
|
+
// re-apply it here so the anchor stays safe even if that prop is ever removed or
|
|
2931
|
+
// its contract changes — a self-contained second barrier on the link sink.
|
|
2932
|
+
/* @__PURE__ */ jsx(
|
|
2933
|
+
"a",
|
|
2934
|
+
{
|
|
2935
|
+
className: "link",
|
|
2936
|
+
href: href === void 0 ? void 0 : defaultUrlTransform(href),
|
|
2937
|
+
rel: "noopener noreferrer",
|
|
2938
|
+
children
|
|
2939
|
+
}
|
|
2940
|
+
)
|
|
2941
|
+
)
|
|
2942
|
+
};
|
|
2943
|
+
function MarkdownRenderer({ content, streaming = false, className }) {
|
|
2944
|
+
return /* @__PURE__ */ jsxs("div", { className, children: [
|
|
2945
|
+
/* @__PURE__ */ jsx(
|
|
2946
|
+
Markdown,
|
|
2947
|
+
{
|
|
2948
|
+
allowedElements: ALLOWED_ELEMENTS,
|
|
2949
|
+
unwrapDisallowed: true,
|
|
2950
|
+
skipHtml: true,
|
|
2951
|
+
urlTransform: defaultUrlTransform,
|
|
2952
|
+
components: MD_COMPONENTS,
|
|
2953
|
+
children: content
|
|
2954
|
+
}
|
|
2955
|
+
),
|
|
2956
|
+
streaming ? /* @__PURE__ */ jsx("span", { className: "term__cursor", "aria-hidden": "true", "data-testid": "md-cursor" }) : null
|
|
2957
|
+
] });
|
|
2958
|
+
}
|
|
2959
|
+
var DEFAULT_VERB = {
|
|
2960
|
+
pending: "queued",
|
|
2961
|
+
running: "running",
|
|
2962
|
+
success: "done",
|
|
2963
|
+
error: "failed",
|
|
2964
|
+
partial: "partial"
|
|
2965
|
+
};
|
|
2966
|
+
function leadingGlyph(state, streaming) {
|
|
2967
|
+
switch (state) {
|
|
2968
|
+
case "pending":
|
|
2969
|
+
return /* @__PURE__ */ jsx(Clock, { size: 16 });
|
|
2970
|
+
case "running":
|
|
2971
|
+
return streaming ? null : /* @__PURE__ */ jsx("span", { className: "spinner spinner--sm", "aria-hidden": true });
|
|
2972
|
+
case "success":
|
|
2973
|
+
return /* @__PURE__ */ jsx(Check, { size: 16 });
|
|
2974
|
+
case "error":
|
|
2975
|
+
return /* @__PURE__ */ jsx(CircleX, { size: 16 });
|
|
2976
|
+
case "partial":
|
|
2977
|
+
return /* @__PURE__ */ jsx(TriangleAlert, { size: 16 });
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
function ToolUseIndicator({
|
|
2981
|
+
state,
|
|
2982
|
+
skill,
|
|
2983
|
+
verb,
|
|
2984
|
+
meta,
|
|
2985
|
+
streaming = false,
|
|
2986
|
+
children,
|
|
2987
|
+
className
|
|
2988
|
+
}) {
|
|
2989
|
+
if (state === "idle") return null;
|
|
2990
|
+
const glyph = leadingGlyph(state, streaming);
|
|
2991
|
+
const resolvedVerb = verb ?? DEFAULT_VERB[state];
|
|
2992
|
+
const cls = ["tuf", className].filter(Boolean).join(" ");
|
|
2993
|
+
return (
|
|
2994
|
+
// role=status: announce the async tool call's lifecycle politely to assistive
|
|
2995
|
+
// tech (pending → running → success/error) from the visible text label.
|
|
2996
|
+
// (aria-busy is intentionally not on the chip — it lives on the parent
|
|
2997
|
+
// Terminal region, which owns the "a response is in progress" state.)
|
|
2998
|
+
/* @__PURE__ */ jsxs("span", { className: cls, "data-state": state, role: "status", children: [
|
|
2999
|
+
glyph !== null ? /* @__PURE__ */ jsx("span", { className: "tuf__glyph", children: glyph }) : null,
|
|
3000
|
+
/* @__PURE__ */ jsxs("span", { className: "tuf__label", children: [
|
|
3001
|
+
children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3002
|
+
skill !== void 0 && skill !== "" ? `${skill} \xB7 ` : null,
|
|
3003
|
+
/* @__PURE__ */ jsx("span", { className: "tuf__verb", children: resolvedVerb })
|
|
3004
|
+
] }),
|
|
3005
|
+
state === "running" && streaming ? /* @__PURE__ */ jsx("span", { className: "term__cursor", "aria-hidden": true }) : null
|
|
3006
|
+
] }),
|
|
3007
|
+
meta !== void 0 ? /* @__PURE__ */ jsx("span", { className: "tuf__meta", children: meta }) : null
|
|
3008
|
+
] })
|
|
3009
|
+
);
|
|
3010
|
+
}
|
|
3011
|
+
function join(...parts) {
|
|
3012
|
+
return parts.filter(Boolean).join(" ");
|
|
3013
|
+
}
|
|
3014
|
+
function DigestCard({
|
|
3015
|
+
state,
|
|
3016
|
+
period,
|
|
3017
|
+
title,
|
|
3018
|
+
children,
|
|
3019
|
+
time,
|
|
3020
|
+
actions,
|
|
3021
|
+
emptyIcon,
|
|
3022
|
+
emptyTitle,
|
|
3023
|
+
emptyBody,
|
|
3024
|
+
emptyAction,
|
|
3025
|
+
className
|
|
3026
|
+
}) {
|
|
3027
|
+
if (state === "loading") {
|
|
3028
|
+
return /* @__PURE__ */ jsxs("article", { className: join("digest", className), "aria-busy": true, children: [
|
|
3029
|
+
/* @__PURE__ */ jsxs("div", { className: "digest__head", children: [
|
|
3030
|
+
/* @__PURE__ */ jsx(Skeleton, { shape: "circle", width: 7, height: 7 }),
|
|
3031
|
+
/* @__PURE__ */ jsx(Skeleton, { width: 140, height: 9 })
|
|
3032
|
+
] }),
|
|
3033
|
+
/* @__PURE__ */ jsx(Skeleton, { shape: "title", width: "70%" }),
|
|
3034
|
+
/* @__PURE__ */ jsxs("div", { className: "digest__skel", children: [
|
|
3035
|
+
/* @__PURE__ */ jsx(Skeleton, { shape: "text", width: "100%" }),
|
|
3036
|
+
/* @__PURE__ */ jsx(Skeleton, { shape: "text", width: "96%" }),
|
|
3037
|
+
/* @__PURE__ */ jsx(Skeleton, { shape: "text", width: "62%" })
|
|
3038
|
+
] }),
|
|
3039
|
+
/* @__PURE__ */ jsx(Skeleton, { width: 120, height: 9, style: { marginTop: 2 } })
|
|
3040
|
+
] });
|
|
3041
|
+
}
|
|
3042
|
+
if (state === "empty") {
|
|
3043
|
+
return /* @__PURE__ */ jsx("article", { className: join("digest", className), children: /* @__PURE__ */ jsx(
|
|
3044
|
+
EmptyStateFig,
|
|
3045
|
+
{
|
|
3046
|
+
icon: emptyIcon,
|
|
3047
|
+
title: emptyTitle ?? "No briefings yet",
|
|
3048
|
+
body: emptyBody,
|
|
3049
|
+
action: emptyAction
|
|
3050
|
+
}
|
|
3051
|
+
) });
|
|
3052
|
+
}
|
|
3053
|
+
const isUnread = state === "unread";
|
|
3054
|
+
const hasFoot = time !== void 0 || actions !== void 0;
|
|
3055
|
+
return /* @__PURE__ */ jsxs("article", { className: join("digest", isUnread ? "digest--unread" : "digest--read", className), children: [
|
|
3056
|
+
/* @__PURE__ */ jsxs("div", { className: "digest__head", children: [
|
|
3057
|
+
isUnread ? /* @__PURE__ */ jsx("span", { className: "digest__dot", "data-testid": "digest-dot", "aria-hidden": true }) : null,
|
|
3058
|
+
period !== void 0 ? /* @__PURE__ */ jsx("span", { className: "digest__period", children: period }) : null
|
|
3059
|
+
] }),
|
|
3060
|
+
title !== void 0 ? /* @__PURE__ */ jsx("p", { className: "digest__title", children: title }) : null,
|
|
3061
|
+
children !== void 0 ? /* @__PURE__ */ jsx("p", { className: "digest__body", children }) : null,
|
|
3062
|
+
hasFoot ? /* @__PURE__ */ jsxs("div", { className: "digest__foot", children: [
|
|
3063
|
+
time !== void 0 ? /* @__PURE__ */ jsx("span", { className: "digest__time", children: time }) : null,
|
|
3064
|
+
actions !== void 0 ? /* @__PURE__ */ jsx("div", { className: "digest__actions", children: actions }) : null
|
|
3065
|
+
] }) : null
|
|
3066
|
+
] });
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3069
|
+
// src/primitives/backgrounds/tokens.ts
|
|
3070
|
+
function readBackgroundStyles() {
|
|
3071
|
+
const cs = getComputedStyle(document.documentElement);
|
|
3072
|
+
const read = (name) => cs.getPropertyValue(name).trim();
|
|
3073
|
+
return {
|
|
3074
|
+
signal: read("--color-signal"),
|
|
3075
|
+
highlight: read("--color-highlight"),
|
|
3076
|
+
font: read("--font-display") || '"Fira Code", monospace'
|
|
3077
|
+
};
|
|
3078
|
+
}
|
|
3079
|
+
function useCanvas2D(draw, deps = []) {
|
|
3080
|
+
const ref = useRef(null);
|
|
3081
|
+
useEffect(() => {
|
|
3082
|
+
const canvas = ref.current;
|
|
3083
|
+
if (!canvas) return;
|
|
3084
|
+
const ctx = canvas.getContext("2d");
|
|
3085
|
+
if (!ctx) return;
|
|
3086
|
+
let rafId = 0;
|
|
3087
|
+
let running = true;
|
|
3088
|
+
const t0 = performance.now();
|
|
3089
|
+
const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
3090
|
+
const renderFrame = (now) => {
|
|
3091
|
+
const { width, height } = canvas.getBoundingClientRect();
|
|
3092
|
+
ctx.save();
|
|
3093
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
3094
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
3095
|
+
ctx.restore();
|
|
3096
|
+
draw(ctx, { t: (now - t0) / 1e3, w: width, h: height, reduceMotion });
|
|
3097
|
+
};
|
|
3098
|
+
const fit = () => {
|
|
3099
|
+
const dpr = Math.min(window.devicePixelRatio || 1, 2);
|
|
3100
|
+
const { width, height } = canvas.getBoundingClientRect();
|
|
3101
|
+
canvas.width = Math.max(1, Math.floor(width * dpr));
|
|
3102
|
+
canvas.height = Math.max(1, Math.floor(height * dpr));
|
|
3103
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
3104
|
+
};
|
|
3105
|
+
fit();
|
|
3106
|
+
const ro = new ResizeObserver(() => {
|
|
3107
|
+
fit();
|
|
3108
|
+
if (reduceMotion) renderFrame(performance.now());
|
|
3109
|
+
});
|
|
3110
|
+
ro.observe(canvas);
|
|
3111
|
+
if (reduceMotion) {
|
|
3112
|
+
renderFrame(performance.now());
|
|
3113
|
+
} else {
|
|
3114
|
+
const loop = (now) => {
|
|
3115
|
+
if (!running) return;
|
|
3116
|
+
renderFrame(now);
|
|
3117
|
+
rafId = requestAnimationFrame(loop);
|
|
3118
|
+
};
|
|
3119
|
+
rafId = requestAnimationFrame(loop);
|
|
3120
|
+
}
|
|
3121
|
+
return () => {
|
|
3122
|
+
running = false;
|
|
3123
|
+
cancelAnimationFrame(rafId);
|
|
3124
|
+
ro.disconnect();
|
|
3125
|
+
};
|
|
3126
|
+
}, deps);
|
|
3127
|
+
return ref;
|
|
3128
|
+
}
|
|
3129
|
+
function GridBg(props) {
|
|
3130
|
+
const ref = useCanvas2D((ctx, { t, w, h, reduceMotion }) => {
|
|
3131
|
+
const { signal } = readBackgroundStyles();
|
|
3132
|
+
if (!signal) return;
|
|
3133
|
+
ctx.fillStyle = signal;
|
|
3134
|
+
const step = 28;
|
|
3135
|
+
const cols = Math.ceil(w / step);
|
|
3136
|
+
const rows = Math.ceil(h / step);
|
|
3137
|
+
const offX = (w - cols * step) / 2;
|
|
3138
|
+
const offY = (h - rows * step) / 2;
|
|
3139
|
+
for (let i = 0; i < cols; i++) {
|
|
3140
|
+
for (let j = 0; j < rows; j++) {
|
|
3141
|
+
const x = offX + i * step + step / 2;
|
|
3142
|
+
const y = offY + j * step + step / 2;
|
|
3143
|
+
const tt = reduceMotion ? 0 : t * 0.15;
|
|
3144
|
+
const n = Math.sin(i * 0.31 + j * 0.21 + tt) * 0.5 + Math.sin(i * 0.13 - j * 0.41 + tt * 0.7) * 0.5;
|
|
3145
|
+
const focal = 1 - Math.min(1, Math.max(0, (1 - x / w) * 0.7 + (1 - y / h) * 0.7));
|
|
3146
|
+
const a = Math.max(0, n * 0.5 + 0.5) * 0.35 * focal;
|
|
3147
|
+
if (a < 0.02) continue;
|
|
3148
|
+
ctx.globalAlpha = a;
|
|
3149
|
+
const r = 1.1 + Math.max(0, n) * 0.9;
|
|
3150
|
+
ctx.beginPath();
|
|
3151
|
+
ctx.arc(x, y, r, 0, Math.PI * 2);
|
|
3152
|
+
ctx.fill();
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3155
|
+
ctx.globalAlpha = 1;
|
|
3156
|
+
});
|
|
3157
|
+
return /* @__PURE__ */ jsx("canvas", { ...props, ref, "aria-hidden": "true" });
|
|
3158
|
+
}
|
|
3159
|
+
var ASCII_CHARS = "01\xB7\u2192/\\><+=-:.";
|
|
3160
|
+
function AsciiBg(props) {
|
|
3161
|
+
const stateRef = useRef(null);
|
|
3162
|
+
const ref = useCanvas2D((ctx, { t, w, h, reduceMotion }) => {
|
|
3163
|
+
const { signal, highlight, font } = readBackgroundStyles();
|
|
3164
|
+
if (!signal || !highlight) return;
|
|
3165
|
+
const colW = 14;
|
|
3166
|
+
const lineH = 20;
|
|
3167
|
+
if (!stateRef.current || Math.abs(stateRef.current.w - w) > colW) {
|
|
3168
|
+
const nCols = Math.floor(w / colW);
|
|
3169
|
+
const cols = [];
|
|
3170
|
+
for (let i = 0; i < nCols; i++) {
|
|
3171
|
+
if (Math.random() > 0.85) continue;
|
|
3172
|
+
cols.push({
|
|
3173
|
+
x: i * colW + colW / 2,
|
|
3174
|
+
head: Math.random() * h,
|
|
3175
|
+
speed: 10 + Math.random() * 22,
|
|
3176
|
+
// px/sec — slow but varied
|
|
3177
|
+
len: 10 + Math.floor(Math.random() * 18),
|
|
3178
|
+
glyphs: Array.from(
|
|
3179
|
+
{ length: 30 },
|
|
3180
|
+
() => ASCII_CHARS.charAt(Math.floor(Math.random() * ASCII_CHARS.length))
|
|
3181
|
+
)
|
|
3182
|
+
});
|
|
3183
|
+
}
|
|
3184
|
+
stateRef.current = { w, cols, lastT: t };
|
|
3185
|
+
}
|
|
3186
|
+
const dt = reduceMotion ? 0 : Math.min(0.05, t - stateRef.current.lastT);
|
|
3187
|
+
stateRef.current.lastT = t;
|
|
3188
|
+
const cycle = reduceMotion ? 0 : Math.floor(t * 2);
|
|
3189
|
+
ctx.font = `400 13px ${font}`;
|
|
3190
|
+
ctx.textBaseline = "top";
|
|
3191
|
+
for (const col of stateRef.current.cols) {
|
|
3192
|
+
col.head += col.speed * dt;
|
|
3193
|
+
if (col.head - col.len * lineH > h) {
|
|
3194
|
+
col.head = -Math.random() * 200;
|
|
3195
|
+
}
|
|
3196
|
+
for (let k = 0; k < col.len; k++) {
|
|
3197
|
+
const y = col.head - k * lineH;
|
|
3198
|
+
if (y < -lineH || y > h) continue;
|
|
3199
|
+
const fade = 1 - k / col.len;
|
|
3200
|
+
const focal = 0.45 + 0.55 * Math.min(1, y / h);
|
|
3201
|
+
ctx.globalAlpha = 0.55 * fade * focal;
|
|
3202
|
+
ctx.fillStyle = k === 0 ? highlight : signal;
|
|
3203
|
+
const g = col.glyphs[(k + cycle) % col.glyphs.length] ?? "";
|
|
3204
|
+
ctx.fillText(g, col.x, y);
|
|
3205
|
+
}
|
|
3206
|
+
}
|
|
3207
|
+
ctx.globalAlpha = 1;
|
|
3208
|
+
});
|
|
3209
|
+
return /* @__PURE__ */ jsx("canvas", { ...props, ref, "aria-hidden": "true" });
|
|
3210
|
+
}
|
|
3211
|
+
var GLYPHS = ["\u2192", "\u21B3", "/", "\\", "\xB7", "<", ">", "+", "*", "\u221E", "\u25C7"];
|
|
3212
|
+
function GlyphsBg(props) {
|
|
3213
|
+
const stateRef = useRef(null);
|
|
3214
|
+
const ref = useCanvas2D((ctx, { t, w, h, reduceMotion }) => {
|
|
3215
|
+
const { signal, highlight, font } = readBackgroundStyles();
|
|
3216
|
+
if (!signal || !highlight) return;
|
|
3217
|
+
if (!stateRef.current || Math.abs(stateRef.current.w - w) > 8) {
|
|
3218
|
+
const n = Math.min(28, Math.max(14, Math.floor(w * h / 6e4)));
|
|
3219
|
+
const items = [];
|
|
3220
|
+
for (let i = 0; i < n; i++) {
|
|
3221
|
+
items.push({
|
|
3222
|
+
g: GLYPHS[Math.floor(Math.random() * GLYPHS.length)] ?? "\xB7",
|
|
3223
|
+
x: Math.random() * w,
|
|
3224
|
+
y: Math.random() * h,
|
|
3225
|
+
vx: (Math.random() - 0.5) * 4,
|
|
3226
|
+
// very slow drift, px/sec
|
|
3227
|
+
vy: (Math.random() - 0.5) * 4,
|
|
3228
|
+
size: 14 + Math.random() * 36,
|
|
3229
|
+
highlight: Math.random() < 0.18,
|
|
3230
|
+
// ~1 in 6 is amber
|
|
3231
|
+
base: 0.18 + Math.random() * 0.22,
|
|
3232
|
+
phase: Math.random() * Math.PI * 2
|
|
3233
|
+
});
|
|
3234
|
+
}
|
|
3235
|
+
stateRef.current = { w, items, lastT: t };
|
|
3236
|
+
}
|
|
3237
|
+
const dt = reduceMotion ? 0 : Math.min(0.05, t - stateRef.current.lastT);
|
|
3238
|
+
stateRef.current.lastT = t;
|
|
3239
|
+
const tt = reduceMotion ? 0 : t;
|
|
3240
|
+
ctx.textBaseline = "middle";
|
|
3241
|
+
ctx.textAlign = "center";
|
|
3242
|
+
for (const it of stateRef.current.items) {
|
|
3243
|
+
it.x += it.vx * dt;
|
|
3244
|
+
it.y += it.vy * dt;
|
|
3245
|
+
const m = 60;
|
|
3246
|
+
if (it.x < -m) it.x = w + m;
|
|
3247
|
+
if (it.x > w + m) it.x = -m;
|
|
3248
|
+
if (it.y < -m) it.y = h + m;
|
|
3249
|
+
if (it.y > h + m) it.y = -m;
|
|
3250
|
+
ctx.globalAlpha = it.base * (0.6 + 0.4 * Math.sin(tt * 0.4 + it.phase));
|
|
3251
|
+
ctx.fillStyle = it.highlight ? highlight : signal;
|
|
3252
|
+
ctx.font = `300 ${it.size}px ${font}`;
|
|
3253
|
+
ctx.fillText(it.g, it.x, it.y);
|
|
3254
|
+
}
|
|
3255
|
+
ctx.globalAlpha = 1;
|
|
3256
|
+
});
|
|
3257
|
+
return /* @__PURE__ */ jsx("canvas", { ...props, ref, "aria-hidden": "true" });
|
|
3258
|
+
}
|
|
3259
|
+
|
|
3260
|
+
// src/icons/generated/registry.ts
|
|
3261
|
+
var ICON_NAMES = [
|
|
3262
|
+
"chevron-up",
|
|
3263
|
+
"chevron-down",
|
|
3264
|
+
"chevron-left",
|
|
3265
|
+
"chevron-right",
|
|
3266
|
+
"arrow-up",
|
|
3267
|
+
"arrow-down",
|
|
3268
|
+
"arrow-left",
|
|
3269
|
+
"arrow-right",
|
|
3270
|
+
"arrow-up-right",
|
|
3271
|
+
"arrow-up-left",
|
|
3272
|
+
"arrow-down-right",
|
|
3273
|
+
"arrow-down-left",
|
|
3274
|
+
"external-link",
|
|
3275
|
+
"menu",
|
|
3276
|
+
"x",
|
|
3277
|
+
"search",
|
|
3278
|
+
"plus",
|
|
3279
|
+
"minus",
|
|
3280
|
+
"square-pen",
|
|
3281
|
+
"trash-2",
|
|
3282
|
+
"download",
|
|
3283
|
+
"upload",
|
|
3284
|
+
"copy",
|
|
3285
|
+
"share-2",
|
|
3286
|
+
"funnel",
|
|
3287
|
+
"filter",
|
|
3288
|
+
"arrow-up-down",
|
|
3289
|
+
"settings",
|
|
3290
|
+
"refresh-cw",
|
|
3291
|
+
"check",
|
|
3292
|
+
"send",
|
|
3293
|
+
"eye",
|
|
3294
|
+
"eye-off",
|
|
3295
|
+
"bell",
|
|
3296
|
+
"bell-off",
|
|
3297
|
+
"ellipsis",
|
|
3298
|
+
"ellipsis-vertical",
|
|
3299
|
+
"save",
|
|
3300
|
+
"info",
|
|
3301
|
+
"triangle-alert",
|
|
3302
|
+
"circle-x",
|
|
3303
|
+
"circle-check",
|
|
3304
|
+
"circle-check-big",
|
|
3305
|
+
"clock",
|
|
3306
|
+
"loader",
|
|
3307
|
+
"sun",
|
|
3308
|
+
"moon",
|
|
3309
|
+
"lock",
|
|
3310
|
+
"lock-open",
|
|
3311
|
+
"circle-question-mark",
|
|
3312
|
+
"circle-help",
|
|
3313
|
+
"ban",
|
|
3314
|
+
"check-check",
|
|
3315
|
+
"octagon-alert",
|
|
3316
|
+
"play",
|
|
3317
|
+
"pause",
|
|
3318
|
+
"square",
|
|
3319
|
+
"globe",
|
|
3320
|
+
"image",
|
|
3321
|
+
"file",
|
|
3322
|
+
"link",
|
|
3323
|
+
"package",
|
|
3324
|
+
"rocket",
|
|
3325
|
+
"grid-3x3",
|
|
3326
|
+
"notebook-pen",
|
|
3327
|
+
"code-xml",
|
|
3328
|
+
"trending-up",
|
|
3329
|
+
"trending-down",
|
|
3330
|
+
"chart-line",
|
|
3331
|
+
"chart-column",
|
|
3332
|
+
"chart-candlestick",
|
|
3333
|
+
"chart-pie",
|
|
3334
|
+
"wallet",
|
|
3335
|
+
"briefcase",
|
|
3336
|
+
"calendar",
|
|
3337
|
+
"bookmark",
|
|
3338
|
+
"percent",
|
|
3339
|
+
"dollar-sign",
|
|
3340
|
+
"activity",
|
|
3341
|
+
"target",
|
|
3342
|
+
"scale",
|
|
3343
|
+
"banknote",
|
|
3344
|
+
"ai-sparkle",
|
|
3345
|
+
"bot",
|
|
3346
|
+
"bot-message-square",
|
|
3347
|
+
"cpu",
|
|
3348
|
+
"agent-stocky",
|
|
3349
|
+
"agent-orb",
|
|
3350
|
+
"agent-droid",
|
|
3351
|
+
"agent-hex"
|
|
3352
|
+
];
|
|
3353
|
+
var ICON_REGISTRY = {
|
|
3354
|
+
"chevron-up": ChevronUp,
|
|
3355
|
+
"chevron-down": ChevronDown,
|
|
3356
|
+
"chevron-left": ChevronLeft,
|
|
3357
|
+
"chevron-right": ChevronRight,
|
|
3358
|
+
"arrow-up": ArrowUp,
|
|
3359
|
+
"arrow-down": ArrowDown,
|
|
3360
|
+
"arrow-left": ArrowLeft,
|
|
3361
|
+
"arrow-right": ArrowRight,
|
|
3362
|
+
"arrow-up-right": ArrowUpRight,
|
|
3363
|
+
"arrow-up-left": ArrowUpLeft,
|
|
3364
|
+
"arrow-down-right": ArrowDownRight,
|
|
3365
|
+
"arrow-down-left": ArrowDownLeft,
|
|
3366
|
+
"external-link": ExternalLink,
|
|
3367
|
+
menu: Menu,
|
|
3368
|
+
x: X,
|
|
3369
|
+
search: SearchIcon,
|
|
3370
|
+
plus: Plus,
|
|
3371
|
+
minus: Minus,
|
|
3372
|
+
"square-pen": SquarePen,
|
|
3373
|
+
"trash-2": Trash2,
|
|
3374
|
+
download: Download,
|
|
3375
|
+
upload: Upload,
|
|
3376
|
+
copy: Copy,
|
|
3377
|
+
"share-2": Share2,
|
|
3378
|
+
funnel: Funnel,
|
|
3379
|
+
filter: Funnel,
|
|
3380
|
+
"arrow-up-down": ArrowUpDown,
|
|
3381
|
+
settings: Settings,
|
|
3382
|
+
"refresh-cw": RefreshCw,
|
|
3383
|
+
check: Check,
|
|
3384
|
+
send: Send,
|
|
3385
|
+
eye: Eye,
|
|
3386
|
+
"eye-off": EyeOff,
|
|
3387
|
+
bell: Bell,
|
|
3388
|
+
"bell-off": BellOff,
|
|
3389
|
+
ellipsis: Ellipsis,
|
|
3390
|
+
"ellipsis-vertical": EllipsisVertical,
|
|
3391
|
+
save: Save,
|
|
3392
|
+
info: Info,
|
|
3393
|
+
"triangle-alert": TriangleAlert,
|
|
3394
|
+
"circle-x": CircleX,
|
|
3395
|
+
"circle-check": CircleCheck,
|
|
3396
|
+
"circle-check-big": CircleCheckBig,
|
|
3397
|
+
clock: Clock,
|
|
3398
|
+
loader: Loader,
|
|
3399
|
+
sun: Sun,
|
|
3400
|
+
moon: Moon,
|
|
3401
|
+
lock: Lock,
|
|
3402
|
+
"lock-open": LockOpen,
|
|
3403
|
+
"circle-question-mark": CircleQuestionMark,
|
|
3404
|
+
"circle-help": CircleQuestionMark,
|
|
3405
|
+
ban: Ban,
|
|
3406
|
+
"check-check": CheckCheck,
|
|
3407
|
+
"octagon-alert": OctagonAlert,
|
|
3408
|
+
play: Play,
|
|
3409
|
+
pause: Pause,
|
|
3410
|
+
square: Square,
|
|
3411
|
+
globe: Globe,
|
|
3412
|
+
image: Image,
|
|
3413
|
+
file: File,
|
|
3414
|
+
link: Link,
|
|
3415
|
+
package: Package,
|
|
3416
|
+
rocket: Rocket,
|
|
3417
|
+
"grid-3x3": Grid3x3,
|
|
3418
|
+
"notebook-pen": NotebookPen,
|
|
3419
|
+
"code-xml": CodeXml,
|
|
3420
|
+
"trending-up": TrendingUp,
|
|
3421
|
+
"trending-down": TrendingDown,
|
|
3422
|
+
"chart-line": ChartLine,
|
|
3423
|
+
"chart-column": ChartColumn,
|
|
3424
|
+
"chart-candlestick": ChartCandlestick,
|
|
3425
|
+
"chart-pie": ChartPie,
|
|
3426
|
+
wallet: Wallet,
|
|
3427
|
+
briefcase: Briefcase,
|
|
3428
|
+
calendar: Calendar,
|
|
3429
|
+
bookmark: Bookmark,
|
|
3430
|
+
percent: Percent,
|
|
3431
|
+
"dollar-sign": DollarSign,
|
|
3432
|
+
activity: Activity,
|
|
3433
|
+
target: Target,
|
|
3434
|
+
scale: Scale,
|
|
3435
|
+
banknote: Banknote,
|
|
3436
|
+
"ai-sparkle": AiSparkle,
|
|
3437
|
+
bot: Bot,
|
|
3438
|
+
"bot-message-square": BotMessageSquare,
|
|
3439
|
+
cpu: Cpu,
|
|
3440
|
+
"agent-stocky": AgentStocky,
|
|
3441
|
+
"agent-orb": AgentOrb,
|
|
3442
|
+
"agent-droid": AgentDroid,
|
|
3443
|
+
"agent-hex": AgentHex
|
|
3444
|
+
};
|
|
3445
|
+
var BRAND_ICON_NAMES = [
|
|
3446
|
+
"github",
|
|
3447
|
+
"npm",
|
|
3448
|
+
"figma",
|
|
3449
|
+
"notion",
|
|
3450
|
+
"vercel",
|
|
3451
|
+
"chromestore",
|
|
3452
|
+
"vscode",
|
|
3453
|
+
"linear",
|
|
3454
|
+
"linkedin",
|
|
3455
|
+
"x-twitter",
|
|
3456
|
+
"youtube",
|
|
3457
|
+
"google",
|
|
3458
|
+
"reddit",
|
|
3459
|
+
"openai",
|
|
3460
|
+
"anthropic",
|
|
3461
|
+
"claude",
|
|
3462
|
+
"gemini",
|
|
3463
|
+
"deepseek",
|
|
3464
|
+
"moonshot",
|
|
3465
|
+
"glm",
|
|
3466
|
+
"mistral",
|
|
3467
|
+
"perplexity",
|
|
3468
|
+
"huggingface",
|
|
3469
|
+
"ollama",
|
|
3470
|
+
"qwen",
|
|
3471
|
+
"meta"
|
|
3472
|
+
];
|
|
3473
|
+
function Icon({ name, ...props }) {
|
|
3474
|
+
const Glyph = ICON_REGISTRY[name];
|
|
3475
|
+
if (!Glyph) return null;
|
|
3476
|
+
return /* @__PURE__ */ jsx(Glyph, { ...props });
|
|
3477
|
+
}
|
|
3478
|
+
var SAFE_MEDIA_SRC = /^(?:https?:\/\/|\/|\.\.?\/|data:(?:image|video)\/|blob:)/i;
|
|
3479
|
+
var SAFE_EMBED_SRC = /^https:\/\//i;
|
|
3480
|
+
var YOUTUBE_RE = /(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{11})/;
|
|
3481
|
+
var VIMEO_RE = /vimeo\.com\/(?:video\/)?(\d+)/;
|
|
3482
|
+
function safeMediaUrl(url) {
|
|
3483
|
+
return url !== void 0 && SAFE_MEDIA_SRC.test(url) ? url : void 0;
|
|
3484
|
+
}
|
|
3485
|
+
function resolveEmbed(src, provider, thumbnail) {
|
|
3486
|
+
const yt = YOUTUBE_RE.exec(src);
|
|
3487
|
+
if ((provider === void 0 || provider === "youtube") && yt?.[1] !== void 0) {
|
|
3488
|
+
const id = yt[1];
|
|
3489
|
+
return {
|
|
3490
|
+
iframeSrc: `https://www.youtube.com/embed/${id}?autoplay=1`,
|
|
3491
|
+
poster: thumbnail ?? `https://img.youtube.com/vi/${id}/maxresdefault.jpg`,
|
|
3492
|
+
// Only the derived maxres thumbnail has an hqdefault fallback; an explicit
|
|
3493
|
+
// thumbnail does not (and is honored as-is).
|
|
3494
|
+
...thumbnail === void 0 ? { posterFallback: `https://img.youtube.com/vi/${id}/hqdefault.jpg` } : {}
|
|
3495
|
+
};
|
|
3496
|
+
}
|
|
3497
|
+
const vm = VIMEO_RE.exec(src);
|
|
3498
|
+
if ((provider === void 0 || provider === "vimeo") && vm?.[1] !== void 0) {
|
|
3499
|
+
return {
|
|
3500
|
+
iframeSrc: `https://player.vimeo.com/video/${vm[1]}?autoplay=1`,
|
|
3501
|
+
...thumbnail !== void 0 ? { poster: thumbnail } : {}
|
|
3502
|
+
};
|
|
3503
|
+
}
|
|
3504
|
+
return { iframeSrc: src, ...thumbnail !== void 0 ? { poster: thumbnail } : {} };
|
|
3505
|
+
}
|
|
3506
|
+
function usePrefersReducedMotion() {
|
|
3507
|
+
const [reduced, setReduced] = useState(false);
|
|
3508
|
+
useEffect(() => {
|
|
3509
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
3510
|
+
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
3511
|
+
const update = () => {
|
|
3512
|
+
setReduced(mq.matches);
|
|
3513
|
+
};
|
|
3514
|
+
update();
|
|
3515
|
+
mq.addEventListener("change", update);
|
|
3516
|
+
return () => {
|
|
3517
|
+
mq.removeEventListener("change", update);
|
|
3518
|
+
};
|
|
3519
|
+
}, []);
|
|
3520
|
+
return reduced;
|
|
3521
|
+
}
|
|
3522
|
+
function DefaultMediaGlyph() {
|
|
3523
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
3524
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
3525
|
+
/* @__PURE__ */ jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
|
|
3526
|
+
/* @__PURE__ */ jsx("path", { d: "M21 15l-5-5L5 21" })
|
|
3527
|
+
] });
|
|
3528
|
+
}
|
|
3529
|
+
function MediaSlot({
|
|
3530
|
+
src,
|
|
3531
|
+
type,
|
|
3532
|
+
shape = "rounded",
|
|
3533
|
+
radius,
|
|
3534
|
+
mask,
|
|
3535
|
+
fit = "cover",
|
|
3536
|
+
position = "50% 50%",
|
|
3537
|
+
aspectRatio,
|
|
3538
|
+
lazy = true,
|
|
3539
|
+
poster,
|
|
3540
|
+
placeholder,
|
|
3541
|
+
controls,
|
|
3542
|
+
autoPlay = false,
|
|
3543
|
+
muted = true,
|
|
3544
|
+
loop = false,
|
|
3545
|
+
provider,
|
|
3546
|
+
thumbnail,
|
|
3547
|
+
alt,
|
|
3548
|
+
badge,
|
|
3549
|
+
className
|
|
3550
|
+
}) {
|
|
3551
|
+
const reducedMotion = usePrefersReducedMotion();
|
|
3552
|
+
const [activated, setActivated] = useState(false);
|
|
3553
|
+
const [posterErrored, setPosterErrored] = useState(false);
|
|
3554
|
+
const identity = `${src ?? ""}|${provider ?? ""}`;
|
|
3555
|
+
const [prevIdentity, setPrevIdentity] = useState(identity);
|
|
3556
|
+
if (identity !== prevIdentity) {
|
|
3557
|
+
setPrevIdentity(identity);
|
|
3558
|
+
setActivated(false);
|
|
3559
|
+
setPosterErrored(false);
|
|
3560
|
+
}
|
|
3561
|
+
function renderPlaceholder() {
|
|
3562
|
+
if (placeholder !== void 0) {
|
|
3563
|
+
return /* @__PURE__ */ jsx("div", { className: "media-slot__placeholder", children: placeholder });
|
|
3564
|
+
}
|
|
3565
|
+
const iconOnly = shape === "circle";
|
|
3566
|
+
return /* @__PURE__ */ jsxs(
|
|
3567
|
+
"div",
|
|
3568
|
+
{
|
|
3569
|
+
className: iconOnly ? "media-slot__placeholder media-slot__placeholder--icon" : "media-slot__placeholder",
|
|
3570
|
+
children: [
|
|
3571
|
+
/* @__PURE__ */ jsx(DefaultMediaGlyph, {}),
|
|
3572
|
+
iconOnly ? null : /* @__PURE__ */ jsx("span", { children: "No media" })
|
|
3573
|
+
]
|
|
3574
|
+
}
|
|
3575
|
+
);
|
|
3576
|
+
}
|
|
3577
|
+
function renderImageOrGif() {
|
|
3578
|
+
const safeSrc = safeMediaUrl(src);
|
|
3579
|
+
if (safeSrc === void 0) return { node: renderPlaceholder(), empty: true };
|
|
3580
|
+
return {
|
|
3581
|
+
node: /* @__PURE__ */ jsx("img", { src: safeSrc, alt: alt ?? "", loading: lazy ? "lazy" : void 0 }),
|
|
3582
|
+
empty: false
|
|
3583
|
+
};
|
|
3584
|
+
}
|
|
3585
|
+
function renderVideo() {
|
|
3586
|
+
const safeSrc = safeMediaUrl(src);
|
|
3587
|
+
if (safeSrc === void 0) return { node: renderPlaceholder(), empty: true };
|
|
3588
|
+
const gifAsVideo = autoPlay && loop && muted;
|
|
3589
|
+
return {
|
|
3590
|
+
node: /* @__PURE__ */ jsx(
|
|
3591
|
+
"video",
|
|
3592
|
+
{
|
|
3593
|
+
src: safeSrc,
|
|
3594
|
+
poster: safeMediaUrl(poster),
|
|
3595
|
+
preload: lazy ? "none" : "metadata",
|
|
3596
|
+
muted,
|
|
3597
|
+
controls: controls ?? !gifAsVideo,
|
|
3598
|
+
autoPlay: autoPlay && !reducedMotion,
|
|
3599
|
+
loop,
|
|
3600
|
+
playsInline: gifAsVideo
|
|
3601
|
+
}
|
|
3602
|
+
),
|
|
3603
|
+
empty: false
|
|
3604
|
+
};
|
|
3605
|
+
}
|
|
3606
|
+
function renderEmbed() {
|
|
3607
|
+
if (src === void 0 || src === "") return { node: renderPlaceholder(), empty: true };
|
|
3608
|
+
const resolved = resolveEmbed(src, provider, thumbnail);
|
|
3609
|
+
if (resolved === null || !SAFE_EMBED_SRC.test(resolved.iframeSrc)) {
|
|
3610
|
+
return { node: renderPlaceholder(), empty: true };
|
|
3611
|
+
}
|
|
3612
|
+
if (activated) {
|
|
3613
|
+
return {
|
|
3614
|
+
node: /* @__PURE__ */ jsx(
|
|
3615
|
+
"iframe",
|
|
3616
|
+
{
|
|
3617
|
+
src: resolved.iframeSrc,
|
|
3618
|
+
title: alt !== void 0 && alt !== "" ? alt : "Embedded video",
|
|
3619
|
+
allow: "autoplay; fullscreen; encrypted-media; picture-in-picture",
|
|
3620
|
+
referrerPolicy: "strict-origin-when-cross-origin",
|
|
3621
|
+
allowFullScreen: true
|
|
3622
|
+
}
|
|
3623
|
+
),
|
|
3624
|
+
empty: false
|
|
3625
|
+
};
|
|
3626
|
+
}
|
|
3627
|
+
const rawPoster = posterErrored && resolved.posterFallback !== void 0 ? resolved.posterFallback : resolved.poster;
|
|
3628
|
+
const posterSrc = safeMediaUrl(rawPoster);
|
|
3629
|
+
return {
|
|
3630
|
+
node: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3631
|
+
posterSrc !== void 0 ? /* @__PURE__ */ jsx(
|
|
3632
|
+
"img",
|
|
3633
|
+
{
|
|
3634
|
+
className: "media-slot__poster",
|
|
3635
|
+
src: posterSrc,
|
|
3636
|
+
alt: alt ?? "",
|
|
3637
|
+
loading: lazy ? "lazy" : void 0,
|
|
3638
|
+
onError: resolved.posterFallback !== void 0 ? () => {
|
|
3639
|
+
setPosterErrored(true);
|
|
3640
|
+
} : void 0
|
|
3641
|
+
}
|
|
3642
|
+
) : null,
|
|
3643
|
+
/* @__PURE__ */ jsx(
|
|
3644
|
+
"button",
|
|
3645
|
+
{
|
|
3646
|
+
type: "button",
|
|
3647
|
+
className: "media-slot__play",
|
|
3648
|
+
"aria-label": alt !== void 0 && alt !== "" ? `Play: ${alt}` : "Play video",
|
|
3649
|
+
onClick: () => {
|
|
3650
|
+
setActivated(true);
|
|
3651
|
+
},
|
|
3652
|
+
children: /* @__PURE__ */ jsx("span", { className: "tri", "aria-hidden": "true" })
|
|
3653
|
+
}
|
|
3654
|
+
)
|
|
3655
|
+
] }),
|
|
3656
|
+
empty: false
|
|
3657
|
+
};
|
|
3658
|
+
}
|
|
3659
|
+
const { node: inner, empty } = type === "embed" ? renderEmbed() : type === "video" ? renderVideo() : renderImageOrGif();
|
|
3660
|
+
const shapeClass = mask !== void 0 ? null : `media-slot--${shape}`;
|
|
3661
|
+
const emptyClass = empty ? "media-slot--empty" : null;
|
|
3662
|
+
const cls = ["media-slot", shapeClass, emptyClass, className].filter(Boolean).join(" ");
|
|
3663
|
+
const slotStyle = {
|
|
3664
|
+
"--ms-fit": fit,
|
|
3665
|
+
"--ms-pos": position,
|
|
3666
|
+
...aspectRatio !== void 0 || shape === "circle" ? { "--ms-aspect": aspectRatio ?? "1 / 1" } : {},
|
|
3667
|
+
...shape === "rounded" && radius !== void 0 ? { "--ms-radius": `${radius}px` } : {},
|
|
3668
|
+
...mask !== void 0 ? { clipPath: mask } : {}
|
|
3669
|
+
};
|
|
3670
|
+
return /* @__PURE__ */ jsxs("div", { className: cls, style: slotStyle, "data-media-type": type, children: [
|
|
3671
|
+
inner,
|
|
3672
|
+
badge !== void 0 ? /* @__PURE__ */ jsx("span", { className: "media-slot__badge", children: badge }) : null
|
|
3673
|
+
] });
|
|
3674
|
+
}
|
|
3675
|
+
|
|
3676
|
+
export { ALLOWED_ELEMENTS, Activity, AgentDroid, AgentHex, AgentOrb, AgentStocky, AiSparkle, AlertModal, Anthropic, AppBar, ArrowDown, ArrowDownLeft, ArrowDownRight, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, ArrowUpLeft, ArrowUpRight, AsciiBg, Avatar, AvatarGroup, BRAND_ICON_NAMES, Badge, Ban, Banknote, Bell, BellOff, Bookmark, Bot, BotMessageSquare, Briefcase, Button, Calendar, Callout, Candlestick, Card, ChartCandlestick, ChartColumn, ChartLine, ChartPie, Check, CheckCheck, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChromeWebStore, CircleCheck, CircleCheckBig, CircleQuestionMark as CircleHelp, CircleQuestionMark, CircleX, Claude, Clock, CodeXml, CommandDock, Composer, Copy, Cpu, DataTable, DeepSeek, DigestCard, Divider, DollarSign, Download, Ellipsis, EllipsisVertical, EmptyStateFig, ErrorStateFig, ExternalLink, Eye, EyeOff, Field, Figma, File, Funnel as Filter, Funnel, GLM, Gemini, GitHub, Globe, GlyphsBg, Google, Grid3x3, GridBg, GroundingFlag, HuggingFace, ICON_NAMES, Icon, Image, Info, Input, Linear, Link, LinkedIn, Loader, Lock, LockOpen, MarkdownRenderer, MediaSlot, Menu, Meta, Meter, Minus, Mistral, Modal, ModalClose, ModalContent, ModalDescription, ModalTitle, ModalTrigger, Moon, Moonshot, NPM, NotebookPen, NotificationBell, NotificationCenter, Notion, OctagonAlert, Ollama, OpenAI, Package, Pause, Percent, Perplexity, Play, Plus, Qwen, Reddit, RefreshCw, Rocket, Save, Scale, Scrim, Search, SearchIcon, SecretInput, Segmented, SegmentedItem, Select, SelectItem, Send, Settings, Share2, Skeleton, Sparkline, Spinner, Square, SquarePen, Stat, Sun, Surface, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Target, Terminal, ThemeToggle, Toaster, ToolUseIndicator, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Trash2, TrendingDown, TrendingUp, TriangleAlert, Upload, UserMenu, UserMenuContent, UserMenuGroup, UserMenuHeader, UserMenuItem, UserMenuSeparator, UserMenuTrigger, VSCode, Vercel, Wallet, X, XTwitter, YouTube, parseStreamFrame, streamFromResponse, toast, useCanvas2D, useStreaming };
|
|
3677
|
+
//# sourceMappingURL=index.js.map
|
|
3678
|
+
//# sourceMappingURL=index.js.map
|