@invana/ui 0.0.28 → 0.0.30
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/README.md +11 -5
- package/dist/index.cjs +1679 -577
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1097 -118
- package/dist/index.d.ts +1097 -118
- package/dist/index.js +1660 -576
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var clsx = require('clsx');
|
|
4
4
|
var tailwindMerge = require('tailwind-merge');
|
|
5
|
-
var
|
|
5
|
+
var React24 = require('react');
|
|
6
6
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
7
7
|
var lucideReact = require('lucide-react');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -48,7 +48,7 @@ function _interopNamespace(e) {
|
|
|
48
48
|
return Object.freeze(n);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var React24__namespace = /*#__PURE__*/_interopNamespace(React24);
|
|
52
52
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
53
53
|
var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
|
|
54
54
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
@@ -68,18 +68,11 @@ var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespace(TogglePrimitive)
|
|
|
68
68
|
var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
|
|
69
69
|
|
|
70
70
|
// src/lib/utils.ts
|
|
71
|
-
var twMerge = tailwindMerge.extendTailwindMerge({
|
|
72
|
-
extend: {
|
|
73
|
-
classGroups: {
|
|
74
|
-
"font-size": [{ text: ["meta"] }]
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
71
|
function cn(...inputs) {
|
|
79
|
-
return twMerge(clsx.clsx(inputs));
|
|
72
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
80
73
|
}
|
|
81
74
|
var Accordion = AccordionPrimitive__namespace.Root;
|
|
82
|
-
var AccordionItem =
|
|
75
|
+
var AccordionItem = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
83
76
|
AccordionPrimitive__namespace.Item,
|
|
84
77
|
{
|
|
85
78
|
ref,
|
|
@@ -88,7 +81,7 @@ var AccordionItem = React23__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
88
81
|
}
|
|
89
82
|
));
|
|
90
83
|
AccordionItem.displayName = "AccordionItem";
|
|
91
|
-
var AccordionTrigger =
|
|
84
|
+
var AccordionTrigger = React24__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
92
85
|
AccordionPrimitive__namespace.Trigger,
|
|
93
86
|
{
|
|
94
87
|
ref,
|
|
@@ -104,7 +97,7 @@ var AccordionTrigger = React23__namespace.forwardRef(({ className, children, ...
|
|
|
104
97
|
}
|
|
105
98
|
) }));
|
|
106
99
|
AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
|
|
107
|
-
var AccordionContent =
|
|
100
|
+
var AccordionContent = React24__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
108
101
|
AccordionPrimitive__namespace.Content,
|
|
109
102
|
{
|
|
110
103
|
ref,
|
|
@@ -128,7 +121,7 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
128
121
|
}
|
|
129
122
|
}
|
|
130
123
|
);
|
|
131
|
-
var Alert =
|
|
124
|
+
var Alert = React24__namespace.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
132
125
|
"div",
|
|
133
126
|
{
|
|
134
127
|
ref,
|
|
@@ -138,7 +131,7 @@ var Alert = React23__namespace.forwardRef(({ className, variant, ...props }, ref
|
|
|
138
131
|
}
|
|
139
132
|
));
|
|
140
133
|
Alert.displayName = "Alert";
|
|
141
|
-
var AlertTitle =
|
|
134
|
+
var AlertTitle = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
142
135
|
"h5",
|
|
143
136
|
{
|
|
144
137
|
ref,
|
|
@@ -147,7 +140,7 @@ var AlertTitle = React23__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
147
140
|
}
|
|
148
141
|
));
|
|
149
142
|
AlertTitle.displayName = "AlertTitle";
|
|
150
|
-
var AlertDescription =
|
|
143
|
+
var AlertDescription = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
151
144
|
"div",
|
|
152
145
|
{
|
|
153
146
|
ref,
|
|
@@ -177,7 +170,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
177
170
|
* size-5, which at h-6 leaves no padding at all.
|
|
178
171
|
*/
|
|
179
172
|
size: {
|
|
180
|
-
xs: "h-6 rounded-control px-2 text-
|
|
173
|
+
xs: "h-6 rounded-control px-2 text-sm gap-1 [&_svg]:size-4",
|
|
181
174
|
default: "h-9 px-4 py-2",
|
|
182
175
|
sm: "h-8 rounded-control px-3 py-2",
|
|
183
176
|
lg: "h-12 rounded-control px-8 py-3",
|
|
@@ -192,7 +185,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
192
185
|
}
|
|
193
186
|
}
|
|
194
187
|
);
|
|
195
|
-
var Button =
|
|
188
|
+
var Button = React24__namespace.forwardRef(
|
|
196
189
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
197
190
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
198
191
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -209,7 +202,7 @@ Button.displayName = "Button";
|
|
|
209
202
|
var AlertDialog = AlertDialogPrimitive__namespace.Root;
|
|
210
203
|
var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
|
|
211
204
|
var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
|
|
212
|
-
var AlertDialogOverlay =
|
|
205
|
+
var AlertDialogOverlay = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
213
206
|
AlertDialogPrimitive__namespace.Overlay,
|
|
214
207
|
{
|
|
215
208
|
className: cn(
|
|
@@ -221,7 +214,7 @@ var AlertDialogOverlay = React23__namespace.forwardRef(({ className, ...props },
|
|
|
221
214
|
}
|
|
222
215
|
));
|
|
223
216
|
AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
|
|
224
|
-
var AlertDialogContent =
|
|
217
|
+
var AlertDialogContent = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
|
|
225
218
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
226
219
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
227
220
|
AlertDialogPrimitive__namespace.Content,
|
|
@@ -264,7 +257,7 @@ var AlertDialogFooter = ({
|
|
|
264
257
|
}
|
|
265
258
|
);
|
|
266
259
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
267
|
-
var AlertDialogTitle =
|
|
260
|
+
var AlertDialogTitle = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
268
261
|
AlertDialogPrimitive__namespace.Title,
|
|
269
262
|
{
|
|
270
263
|
ref,
|
|
@@ -273,7 +266,7 @@ var AlertDialogTitle = React23__namespace.forwardRef(({ className, ...props }, r
|
|
|
273
266
|
}
|
|
274
267
|
));
|
|
275
268
|
AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
|
|
276
|
-
var AlertDialogDescription =
|
|
269
|
+
var AlertDialogDescription = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
277
270
|
AlertDialogPrimitive__namespace.Description,
|
|
278
271
|
{
|
|
279
272
|
ref,
|
|
@@ -282,7 +275,7 @@ var AlertDialogDescription = React23__namespace.forwardRef(({ className, ...prop
|
|
|
282
275
|
}
|
|
283
276
|
));
|
|
284
277
|
AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
|
|
285
|
-
var AlertDialogAction =
|
|
278
|
+
var AlertDialogAction = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
286
279
|
AlertDialogPrimitive__namespace.Action,
|
|
287
280
|
{
|
|
288
281
|
ref,
|
|
@@ -291,7 +284,7 @@ var AlertDialogAction = React23__namespace.forwardRef(({ className, ...props },
|
|
|
291
284
|
}
|
|
292
285
|
));
|
|
293
286
|
AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
|
|
294
|
-
var AlertDialogCancel =
|
|
287
|
+
var AlertDialogCancel = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
295
288
|
AlertDialogPrimitive__namespace.Cancel,
|
|
296
289
|
{
|
|
297
290
|
ref,
|
|
@@ -304,7 +297,7 @@ var AlertDialogCancel = React23__namespace.forwardRef(({ className, ...props },
|
|
|
304
297
|
}
|
|
305
298
|
));
|
|
306
299
|
AlertDialogCancel.displayName = AlertDialogPrimitive__namespace.Cancel.displayName;
|
|
307
|
-
var Avatar =
|
|
300
|
+
var Avatar = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
308
301
|
AvatarPrimitive__namespace.Root,
|
|
309
302
|
{
|
|
310
303
|
ref,
|
|
@@ -317,7 +310,7 @@ var Avatar = React23__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
317
310
|
}
|
|
318
311
|
));
|
|
319
312
|
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
320
|
-
var AvatarImage =
|
|
313
|
+
var AvatarImage = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
321
314
|
AvatarPrimitive__namespace.Image,
|
|
322
315
|
{
|
|
323
316
|
ref,
|
|
@@ -326,7 +319,7 @@ var AvatarImage = React23__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
326
319
|
}
|
|
327
320
|
));
|
|
328
321
|
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
329
|
-
var AvatarFallback =
|
|
322
|
+
var AvatarFallback = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
330
323
|
AvatarPrimitive__namespace.Fallback,
|
|
331
324
|
{
|
|
332
325
|
ref,
|
|
@@ -358,15 +351,15 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
358
351
|
},
|
|
359
352
|
size: {
|
|
360
353
|
/** 18px — inline in a title, or a count against a label. */
|
|
361
|
-
xs: "h-[18px] px-1.5 text-
|
|
354
|
+
xs: "h-[18px] px-1.5 text-sm",
|
|
362
355
|
/** 22px — the row chip: a status beside an entity name. */
|
|
363
|
-
sm: "h-[22px] px-2 text-
|
|
356
|
+
sm: "h-[22px] px-2 text-sm",
|
|
364
357
|
/**
|
|
365
358
|
* Unchanged from before `size` existed: no explicit height, so it sizes
|
|
366
359
|
* from its text. Every badge already written keeps rendering exactly as
|
|
367
360
|
* it did — the two tiers above are additions, not a re-baseline.
|
|
368
361
|
*/
|
|
369
|
-
default: "px-2.5 py-0.5 text-
|
|
362
|
+
default: "px-2.5 py-0.5 text-sm"
|
|
370
363
|
}
|
|
371
364
|
},
|
|
372
365
|
defaultVariants: {
|
|
@@ -385,9 +378,9 @@ function Badge({ className, variant, tone, size, ...props }) {
|
|
|
385
378
|
}
|
|
386
379
|
);
|
|
387
380
|
}
|
|
388
|
-
var Breadcrumb =
|
|
381
|
+
var Breadcrumb = React24__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
389
382
|
Breadcrumb.displayName = "Breadcrumb";
|
|
390
|
-
var BreadcrumbList =
|
|
383
|
+
var BreadcrumbList = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
391
384
|
"ol",
|
|
392
385
|
{
|
|
393
386
|
ref,
|
|
@@ -399,7 +392,7 @@ var BreadcrumbList = React23__namespace.forwardRef(({ className, ...props }, ref
|
|
|
399
392
|
}
|
|
400
393
|
));
|
|
401
394
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
402
|
-
var BreadcrumbItem =
|
|
395
|
+
var BreadcrumbItem = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
403
396
|
"li",
|
|
404
397
|
{
|
|
405
398
|
ref,
|
|
@@ -408,7 +401,7 @@ var BreadcrumbItem = React23__namespace.forwardRef(({ className, ...props }, ref
|
|
|
408
401
|
}
|
|
409
402
|
));
|
|
410
403
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
411
|
-
var BreadcrumbLink =
|
|
404
|
+
var BreadcrumbLink = React24__namespace.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
412
405
|
const Comp = asChild ? reactSlot.Slot : "a";
|
|
413
406
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
414
407
|
Comp,
|
|
@@ -420,7 +413,7 @@ var BreadcrumbLink = React23__namespace.forwardRef(({ asChild, className, ...pro
|
|
|
420
413
|
);
|
|
421
414
|
});
|
|
422
415
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
423
|
-
var BreadcrumbPage =
|
|
416
|
+
var BreadcrumbPage = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
424
417
|
"span",
|
|
425
418
|
{
|
|
426
419
|
ref,
|
|
@@ -464,7 +457,7 @@ var BreadcrumbEllipsis = ({
|
|
|
464
457
|
}
|
|
465
458
|
);
|
|
466
459
|
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
467
|
-
var Separator =
|
|
460
|
+
var Separator = React24__namespace.forwardRef(
|
|
468
461
|
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
469
462
|
SeparatorPrimitive__namespace.Root,
|
|
470
463
|
{
|
|
@@ -546,7 +539,7 @@ function ButtonGroupSeparator({
|
|
|
546
539
|
}
|
|
547
540
|
);
|
|
548
541
|
}
|
|
549
|
-
var Card =
|
|
542
|
+
var Card = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
550
543
|
"div",
|
|
551
544
|
{
|
|
552
545
|
ref,
|
|
@@ -558,7 +551,7 @@ var Card = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
558
551
|
}
|
|
559
552
|
));
|
|
560
553
|
Card.displayName = "Card";
|
|
561
|
-
var CardHeader =
|
|
554
|
+
var CardHeader = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
562
555
|
"div",
|
|
563
556
|
{
|
|
564
557
|
ref,
|
|
@@ -567,7 +560,7 @@ var CardHeader = React23__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
567
560
|
}
|
|
568
561
|
));
|
|
569
562
|
CardHeader.displayName = "CardHeader";
|
|
570
|
-
var CardTitle =
|
|
563
|
+
var CardTitle = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
571
564
|
"div",
|
|
572
565
|
{
|
|
573
566
|
ref,
|
|
@@ -576,7 +569,7 @@ var CardTitle = React23__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
576
569
|
}
|
|
577
570
|
));
|
|
578
571
|
CardTitle.displayName = "CardTitle";
|
|
579
|
-
var CardDescription =
|
|
572
|
+
var CardDescription = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
580
573
|
"div",
|
|
581
574
|
{
|
|
582
575
|
ref,
|
|
@@ -585,9 +578,9 @@ var CardDescription = React23__namespace.forwardRef(({ className, ...props }, re
|
|
|
585
578
|
}
|
|
586
579
|
));
|
|
587
580
|
CardDescription.displayName = "CardDescription";
|
|
588
|
-
var CardContent =
|
|
581
|
+
var CardContent = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-3 flex-1 overflow-y-auto", className), ...props }));
|
|
589
582
|
CardContent.displayName = "CardContent";
|
|
590
|
-
var CardFooter =
|
|
583
|
+
var CardFooter = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
591
584
|
"div",
|
|
592
585
|
{
|
|
593
586
|
ref,
|
|
@@ -596,7 +589,7 @@ var CardFooter = React23__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
596
589
|
}
|
|
597
590
|
));
|
|
598
591
|
CardFooter.displayName = "CardFooter";
|
|
599
|
-
var CardWithHeader =
|
|
592
|
+
var CardWithHeader = React24__namespace.forwardRef(
|
|
600
593
|
({ className, title, description, headerClassName, contentClassName, footerClassName, footer, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { ref, className, ...props, children: [
|
|
601
594
|
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: `${headerClassName} rounded-t-md`, children: [
|
|
602
595
|
typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: title }) : title,
|
|
@@ -607,15 +600,15 @@ var CardWithHeader = React23__namespace.forwardRef(
|
|
|
607
600
|
] })
|
|
608
601
|
);
|
|
609
602
|
CardWithHeader.displayName = "CardWithHeader";
|
|
610
|
-
var CarouselContext =
|
|
603
|
+
var CarouselContext = React24__namespace.createContext(null);
|
|
611
604
|
function useCarousel() {
|
|
612
|
-
const context =
|
|
605
|
+
const context = React24__namespace.useContext(CarouselContext);
|
|
613
606
|
if (!context) {
|
|
614
607
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
615
608
|
}
|
|
616
609
|
return context;
|
|
617
610
|
}
|
|
618
|
-
var Carousel =
|
|
611
|
+
var Carousel = React24__namespace.forwardRef(
|
|
619
612
|
({
|
|
620
613
|
orientation = "horizontal",
|
|
621
614
|
opts,
|
|
@@ -632,22 +625,22 @@ var Carousel = React23__namespace.forwardRef(
|
|
|
632
625
|
},
|
|
633
626
|
plugins
|
|
634
627
|
);
|
|
635
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
636
|
-
const [canScrollNext, setCanScrollNext] =
|
|
637
|
-
const onSelect =
|
|
628
|
+
const [canScrollPrev, setCanScrollPrev] = React24__namespace.useState(false);
|
|
629
|
+
const [canScrollNext, setCanScrollNext] = React24__namespace.useState(false);
|
|
630
|
+
const onSelect = React24__namespace.useCallback((api2) => {
|
|
638
631
|
if (!api2) {
|
|
639
632
|
return;
|
|
640
633
|
}
|
|
641
634
|
setCanScrollPrev(api2.canScrollPrev());
|
|
642
635
|
setCanScrollNext(api2.canScrollNext());
|
|
643
636
|
}, []);
|
|
644
|
-
const scrollPrev =
|
|
637
|
+
const scrollPrev = React24__namespace.useCallback(() => {
|
|
645
638
|
api?.scrollPrev();
|
|
646
639
|
}, [api]);
|
|
647
|
-
const scrollNext =
|
|
640
|
+
const scrollNext = React24__namespace.useCallback(() => {
|
|
648
641
|
api?.scrollNext();
|
|
649
642
|
}, [api]);
|
|
650
|
-
const handleKeyDown =
|
|
643
|
+
const handleKeyDown = React24__namespace.useCallback(
|
|
651
644
|
(event) => {
|
|
652
645
|
if (event.key === "ArrowLeft") {
|
|
653
646
|
event.preventDefault();
|
|
@@ -659,13 +652,13 @@ var Carousel = React23__namespace.forwardRef(
|
|
|
659
652
|
},
|
|
660
653
|
[scrollPrev, scrollNext]
|
|
661
654
|
);
|
|
662
|
-
|
|
655
|
+
React24__namespace.useEffect(() => {
|
|
663
656
|
if (!api || !setApi) {
|
|
664
657
|
return;
|
|
665
658
|
}
|
|
666
659
|
setApi(api);
|
|
667
660
|
}, [api, setApi]);
|
|
668
|
-
|
|
661
|
+
React24__namespace.useEffect(() => {
|
|
669
662
|
if (!api) {
|
|
670
663
|
return;
|
|
671
664
|
}
|
|
@@ -706,7 +699,7 @@ var Carousel = React23__namespace.forwardRef(
|
|
|
706
699
|
}
|
|
707
700
|
);
|
|
708
701
|
Carousel.displayName = "Carousel";
|
|
709
|
-
var CarouselContent =
|
|
702
|
+
var CarouselContent = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
710
703
|
const { carouselRef, orientation } = useCarousel();
|
|
711
704
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
712
705
|
"div",
|
|
@@ -722,7 +715,7 @@ var CarouselContent = React23__namespace.forwardRef(({ className, ...props }, re
|
|
|
722
715
|
) });
|
|
723
716
|
});
|
|
724
717
|
CarouselContent.displayName = "CarouselContent";
|
|
725
|
-
var CarouselItem =
|
|
718
|
+
var CarouselItem = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
726
719
|
const { orientation } = useCarousel();
|
|
727
720
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
728
721
|
"div",
|
|
@@ -740,7 +733,7 @@ var CarouselItem = React23__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
740
733
|
);
|
|
741
734
|
});
|
|
742
735
|
CarouselItem.displayName = "CarouselItem";
|
|
743
|
-
var CarouselPrevious =
|
|
736
|
+
var CarouselPrevious = React24__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
744
737
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
745
738
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
746
739
|
Button,
|
|
@@ -764,7 +757,7 @@ var CarouselPrevious = React23__namespace.forwardRef(({ className, variant = "ou
|
|
|
764
757
|
);
|
|
765
758
|
});
|
|
766
759
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
767
|
-
var CarouselNext =
|
|
760
|
+
var CarouselNext = React24__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
768
761
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
769
762
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
770
763
|
Button,
|
|
@@ -792,7 +785,7 @@ var Dialog = DialogPrimitive__namespace.Root;
|
|
|
792
785
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
793
786
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
794
787
|
var DialogClose = DialogPrimitive__namespace.Close;
|
|
795
|
-
var DialogOverlay =
|
|
788
|
+
var DialogOverlay = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
796
789
|
DialogPrimitive__namespace.Overlay,
|
|
797
790
|
{
|
|
798
791
|
ref,
|
|
@@ -804,7 +797,7 @@ var DialogOverlay = React23__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
804
797
|
}
|
|
805
798
|
));
|
|
806
799
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
807
|
-
var DialogContent =
|
|
800
|
+
var DialogContent = React24__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
808
801
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
809
802
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
810
803
|
DialogPrimitive__namespace.Content,
|
|
@@ -854,7 +847,7 @@ var DialogFooter = ({
|
|
|
854
847
|
}
|
|
855
848
|
);
|
|
856
849
|
DialogFooter.displayName = "DialogFooter";
|
|
857
|
-
var DialogTitle =
|
|
850
|
+
var DialogTitle = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
858
851
|
DialogPrimitive__namespace.Title,
|
|
859
852
|
{
|
|
860
853
|
ref,
|
|
@@ -866,7 +859,7 @@ var DialogTitle = React23__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
866
859
|
}
|
|
867
860
|
));
|
|
868
861
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
869
|
-
var DialogDescription =
|
|
862
|
+
var DialogDescription = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
870
863
|
DialogPrimitive__namespace.Description,
|
|
871
864
|
{
|
|
872
865
|
ref,
|
|
@@ -875,7 +868,7 @@ var DialogDescription = React23__namespace.forwardRef(({ className, ...props },
|
|
|
875
868
|
}
|
|
876
869
|
));
|
|
877
870
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
878
|
-
var Command =
|
|
871
|
+
var Command = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
879
872
|
cmdk.Command,
|
|
880
873
|
{
|
|
881
874
|
ref,
|
|
@@ -890,7 +883,7 @@ Command.displayName = cmdk.Command.displayName;
|
|
|
890
883
|
var CommandDialog = ({ children, ...props }) => {
|
|
891
884
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
892
885
|
};
|
|
893
|
-
var CommandInput =
|
|
886
|
+
var CommandInput = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
894
887
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
895
888
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
896
889
|
cmdk.Command.Input,
|
|
@@ -905,7 +898,7 @@ var CommandInput = React23__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
905
898
|
)
|
|
906
899
|
] }));
|
|
907
900
|
CommandInput.displayName = cmdk.Command.Input.displayName;
|
|
908
|
-
var CommandList =
|
|
901
|
+
var CommandList = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
909
902
|
cmdk.Command.List,
|
|
910
903
|
{
|
|
911
904
|
ref,
|
|
@@ -914,7 +907,7 @@ var CommandList = React23__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
914
907
|
}
|
|
915
908
|
));
|
|
916
909
|
CommandList.displayName = cmdk.Command.List.displayName;
|
|
917
|
-
var CommandEmpty =
|
|
910
|
+
var CommandEmpty = React24__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
918
911
|
cmdk.Command.Empty,
|
|
919
912
|
{
|
|
920
913
|
ref,
|
|
@@ -923,19 +916,19 @@ var CommandEmpty = React23__namespace.forwardRef((props, ref) => /* @__PURE__ */
|
|
|
923
916
|
}
|
|
924
917
|
));
|
|
925
918
|
CommandEmpty.displayName = cmdk.Command.Empty.displayName;
|
|
926
|
-
var CommandGroup =
|
|
919
|
+
var CommandGroup = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
927
920
|
cmdk.Command.Group,
|
|
928
921
|
{
|
|
929
922
|
ref,
|
|
930
923
|
className: cn(
|
|
931
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-
|
|
924
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
932
925
|
className
|
|
933
926
|
),
|
|
934
927
|
...props
|
|
935
928
|
}
|
|
936
929
|
));
|
|
937
930
|
CommandGroup.displayName = cmdk.Command.Group.displayName;
|
|
938
|
-
var CommandSeparator =
|
|
931
|
+
var CommandSeparator = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
939
932
|
cmdk.Command.Separator,
|
|
940
933
|
{
|
|
941
934
|
ref,
|
|
@@ -944,7 +937,7 @@ var CommandSeparator = React23__namespace.forwardRef(({ className, ...props }, r
|
|
|
944
937
|
}
|
|
945
938
|
));
|
|
946
939
|
CommandSeparator.displayName = cmdk.Command.Separator.displayName;
|
|
947
|
-
var CommandItem =
|
|
940
|
+
var CommandItem = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
948
941
|
cmdk.Command.Item,
|
|
949
942
|
{
|
|
950
943
|
ref,
|
|
@@ -964,7 +957,7 @@ var CommandShortcut = ({
|
|
|
964
957
|
"span",
|
|
965
958
|
{
|
|
966
959
|
className: cn(
|
|
967
|
-
"ml-auto text-
|
|
960
|
+
"ml-auto text-sm tracking-widest text-muted-foreground",
|
|
968
961
|
className
|
|
969
962
|
),
|
|
970
963
|
...props
|
|
@@ -978,7 +971,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
|
978
971
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
979
972
|
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
980
973
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
981
|
-
var DropdownMenuSubTrigger =
|
|
974
|
+
var DropdownMenuSubTrigger = React24__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
982
975
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
983
976
|
{
|
|
984
977
|
ref,
|
|
@@ -995,7 +988,7 @@ var DropdownMenuSubTrigger = React23__namespace.forwardRef(({ className, inset,
|
|
|
995
988
|
}
|
|
996
989
|
));
|
|
997
990
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
998
|
-
var DropdownMenuSubContent =
|
|
991
|
+
var DropdownMenuSubContent = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
999
992
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
1000
993
|
{
|
|
1001
994
|
ref,
|
|
@@ -1007,7 +1000,7 @@ var DropdownMenuSubContent = React23__namespace.forwardRef(({ className, ...prop
|
|
|
1007
1000
|
}
|
|
1008
1001
|
));
|
|
1009
1002
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
1010
|
-
var DropdownMenuContent =
|
|
1003
|
+
var DropdownMenuContent = React24__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1011
1004
|
DropdownMenuPrimitive__namespace.Content,
|
|
1012
1005
|
{
|
|
1013
1006
|
ref,
|
|
@@ -1021,7 +1014,7 @@ var DropdownMenuContent = React23__namespace.forwardRef(({ className, sideOffset
|
|
|
1021
1014
|
}
|
|
1022
1015
|
) }));
|
|
1023
1016
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
1024
|
-
var DropdownMenuItem =
|
|
1017
|
+
var DropdownMenuItem = React24__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1025
1018
|
DropdownMenuPrimitive__namespace.Item,
|
|
1026
1019
|
{
|
|
1027
1020
|
ref,
|
|
@@ -1034,7 +1027,7 @@ var DropdownMenuItem = React23__namespace.forwardRef(({ className, inset, ...pro
|
|
|
1034
1027
|
}
|
|
1035
1028
|
));
|
|
1036
1029
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
1037
|
-
var DropdownMenuCheckboxItem =
|
|
1030
|
+
var DropdownMenuCheckboxItem = React24__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1038
1031
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
1039
1032
|
{
|
|
1040
1033
|
ref,
|
|
@@ -1051,7 +1044,7 @@ var DropdownMenuCheckboxItem = React23__namespace.forwardRef(({ className, child
|
|
|
1051
1044
|
}
|
|
1052
1045
|
));
|
|
1053
1046
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
1054
|
-
var DropdownMenuRadioItem =
|
|
1047
|
+
var DropdownMenuRadioItem = React24__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1055
1048
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
1056
1049
|
{
|
|
1057
1050
|
ref,
|
|
@@ -1067,7 +1060,7 @@ var DropdownMenuRadioItem = React23__namespace.forwardRef(({ className, children
|
|
|
1067
1060
|
}
|
|
1068
1061
|
));
|
|
1069
1062
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
1070
|
-
var DropdownMenuLabel =
|
|
1063
|
+
var DropdownMenuLabel = React24__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1071
1064
|
DropdownMenuPrimitive__namespace.Label,
|
|
1072
1065
|
{
|
|
1073
1066
|
ref,
|
|
@@ -1080,7 +1073,7 @@ var DropdownMenuLabel = React23__namespace.forwardRef(({ className, inset, ...pr
|
|
|
1080
1073
|
}
|
|
1081
1074
|
));
|
|
1082
1075
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
1083
|
-
var DropdownMenuSeparator =
|
|
1076
|
+
var DropdownMenuSeparator = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1084
1077
|
DropdownMenuPrimitive__namespace.Separator,
|
|
1085
1078
|
{
|
|
1086
1079
|
ref,
|
|
@@ -1096,7 +1089,7 @@ var DropdownMenuShortcut = ({
|
|
|
1096
1089
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1097
1090
|
"span",
|
|
1098
1091
|
{
|
|
1099
|
-
className: cn("ml-auto text-
|
|
1092
|
+
className: cn("ml-auto text-sm tracking-widest opacity-60", className),
|
|
1100
1093
|
...props
|
|
1101
1094
|
}
|
|
1102
1095
|
);
|
|
@@ -1104,7 +1097,7 @@ var DropdownMenuShortcut = ({
|
|
|
1104
1097
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1105
1098
|
var HoverCard = HoverCardPrimitive__namespace.Root;
|
|
1106
1099
|
var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
|
|
1107
|
-
var HoverCardContent =
|
|
1100
|
+
var HoverCardContent = React24__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1108
1101
|
HoverCardPrimitive__namespace.Content,
|
|
1109
1102
|
{
|
|
1110
1103
|
ref,
|
|
@@ -1265,7 +1258,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
1265
1258
|
className: cn(
|
|
1266
1259
|
"text-muted-foreground line-clamp-2 text-balance font-normal leading-normal",
|
|
1267
1260
|
// A dense row's subtitle is one line of meta, not a wrapped paragraph.
|
|
1268
|
-
"group-data-[size=xs]/item:line-clamp-1 group-data-[size=xs]/item:text-
|
|
1261
|
+
"group-data-[size=xs]/item:line-clamp-1 group-data-[size=xs]/item:text-sm",
|
|
1269
1262
|
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
1270
1263
|
className
|
|
1271
1264
|
),
|
|
@@ -1315,7 +1308,7 @@ function Kbd({ className, ...props }) {
|
|
|
1315
1308
|
{
|
|
1316
1309
|
"data-slot": "kbd",
|
|
1317
1310
|
className: cn(
|
|
1318
|
-
"bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-control px-1 font-sans text-
|
|
1311
|
+
"bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-control px-1 font-sans text-sm font-medium",
|
|
1319
1312
|
"[&_svg:not([class*='size-'])]:size-3",
|
|
1320
1313
|
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
|
|
1321
1314
|
className
|
|
@@ -1334,6 +1327,32 @@ function KbdGroup({ className, ...props }) {
|
|
|
1334
1327
|
}
|
|
1335
1328
|
);
|
|
1336
1329
|
}
|
|
1330
|
+
var linkVariants = classVarianceAuthority.cva(
|
|
1331
|
+
"underline-offset-4 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-[2px]",
|
|
1332
|
+
{
|
|
1333
|
+
variants: {
|
|
1334
|
+
variant: {
|
|
1335
|
+
default: "text-primary hover:underline",
|
|
1336
|
+
underlined: "text-primary underline",
|
|
1337
|
+
quiet: "text-muted-foreground hover:text-foreground hover:underline"
|
|
1338
|
+
}
|
|
1339
|
+
},
|
|
1340
|
+
defaultVariants: { variant: "default" }
|
|
1341
|
+
}
|
|
1342
|
+
);
|
|
1343
|
+
var Link = React24__namespace.forwardRef(
|
|
1344
|
+
({ className, variant, external, target, rel, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1345
|
+
"a",
|
|
1346
|
+
{
|
|
1347
|
+
ref,
|
|
1348
|
+
className: cn(linkVariants({ variant }), className),
|
|
1349
|
+
target: external ? "_blank" : target,
|
|
1350
|
+
rel: external ? "noreferrer noopener" : rel,
|
|
1351
|
+
...props
|
|
1352
|
+
}
|
|
1353
|
+
)
|
|
1354
|
+
);
|
|
1355
|
+
Link.displayName = "Link";
|
|
1337
1356
|
function MenubarMenu({
|
|
1338
1357
|
...props
|
|
1339
1358
|
}) {
|
|
@@ -1359,7 +1378,7 @@ function MenubarSub({
|
|
|
1359
1378
|
}) {
|
|
1360
1379
|
return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Sub, { "data-slot": "menubar-sub", ...props });
|
|
1361
1380
|
}
|
|
1362
|
-
var Menubar =
|
|
1381
|
+
var Menubar = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1363
1382
|
MenubarPrimitive__namespace.Root,
|
|
1364
1383
|
{
|
|
1365
1384
|
ref,
|
|
@@ -1371,7 +1390,7 @@ var Menubar = React23__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1371
1390
|
}
|
|
1372
1391
|
));
|
|
1373
1392
|
Menubar.displayName = MenubarPrimitive__namespace.Root.displayName;
|
|
1374
|
-
var MenubarTrigger =
|
|
1393
|
+
var MenubarTrigger = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1375
1394
|
MenubarPrimitive__namespace.Trigger,
|
|
1376
1395
|
{
|
|
1377
1396
|
ref,
|
|
@@ -1383,7 +1402,7 @@ var MenubarTrigger = React23__namespace.forwardRef(({ className, ...props }, ref
|
|
|
1383
1402
|
}
|
|
1384
1403
|
));
|
|
1385
1404
|
MenubarTrigger.displayName = MenubarPrimitive__namespace.Trigger.displayName;
|
|
1386
|
-
var MenubarSubTrigger =
|
|
1405
|
+
var MenubarSubTrigger = React24__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1387
1406
|
MenubarPrimitive__namespace.SubTrigger,
|
|
1388
1407
|
{
|
|
1389
1408
|
ref,
|
|
@@ -1400,7 +1419,7 @@ var MenubarSubTrigger = React23__namespace.forwardRef(({ className, inset, child
|
|
|
1400
1419
|
}
|
|
1401
1420
|
));
|
|
1402
1421
|
MenubarSubTrigger.displayName = MenubarPrimitive__namespace.SubTrigger.displayName;
|
|
1403
|
-
var MenubarSubContent =
|
|
1422
|
+
var MenubarSubContent = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1404
1423
|
MenubarPrimitive__namespace.SubContent,
|
|
1405
1424
|
{
|
|
1406
1425
|
ref,
|
|
@@ -1412,7 +1431,7 @@ var MenubarSubContent = React23__namespace.forwardRef(({ className, ...props },
|
|
|
1412
1431
|
}
|
|
1413
1432
|
));
|
|
1414
1433
|
MenubarSubContent.displayName = MenubarPrimitive__namespace.SubContent.displayName;
|
|
1415
|
-
var MenubarContent =
|
|
1434
|
+
var MenubarContent = React24__namespace.forwardRef(
|
|
1416
1435
|
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1417
1436
|
MenubarPrimitive__namespace.Content,
|
|
1418
1437
|
{
|
|
@@ -1429,7 +1448,7 @@ var MenubarContent = React23__namespace.forwardRef(
|
|
|
1429
1448
|
) })
|
|
1430
1449
|
);
|
|
1431
1450
|
MenubarContent.displayName = MenubarPrimitive__namespace.Content.displayName;
|
|
1432
|
-
var MenubarItem =
|
|
1451
|
+
var MenubarItem = React24__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1433
1452
|
MenubarPrimitive__namespace.Item,
|
|
1434
1453
|
{
|
|
1435
1454
|
ref,
|
|
@@ -1442,7 +1461,7 @@ var MenubarItem = React23__namespace.forwardRef(({ className, inset, ...props },
|
|
|
1442
1461
|
}
|
|
1443
1462
|
));
|
|
1444
1463
|
MenubarItem.displayName = MenubarPrimitive__namespace.Item.displayName;
|
|
1445
|
-
var MenubarCheckboxItem =
|
|
1464
|
+
var MenubarCheckboxItem = React24__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1446
1465
|
MenubarPrimitive__namespace.CheckboxItem,
|
|
1447
1466
|
{
|
|
1448
1467
|
ref,
|
|
@@ -1459,7 +1478,7 @@ var MenubarCheckboxItem = React23__namespace.forwardRef(({ className, children,
|
|
|
1459
1478
|
}
|
|
1460
1479
|
));
|
|
1461
1480
|
MenubarCheckboxItem.displayName = MenubarPrimitive__namespace.CheckboxItem.displayName;
|
|
1462
|
-
var MenubarRadioItem =
|
|
1481
|
+
var MenubarRadioItem = React24__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1463
1482
|
MenubarPrimitive__namespace.RadioItem,
|
|
1464
1483
|
{
|
|
1465
1484
|
ref,
|
|
@@ -1475,7 +1494,7 @@ var MenubarRadioItem = React23__namespace.forwardRef(({ className, children, ...
|
|
|
1475
1494
|
}
|
|
1476
1495
|
));
|
|
1477
1496
|
MenubarRadioItem.displayName = MenubarPrimitive__namespace.RadioItem.displayName;
|
|
1478
|
-
var MenubarLabel =
|
|
1497
|
+
var MenubarLabel = React24__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1479
1498
|
MenubarPrimitive__namespace.Label,
|
|
1480
1499
|
{
|
|
1481
1500
|
ref,
|
|
@@ -1488,7 +1507,7 @@ var MenubarLabel = React23__namespace.forwardRef(({ className, inset, ...props }
|
|
|
1488
1507
|
}
|
|
1489
1508
|
));
|
|
1490
1509
|
MenubarLabel.displayName = MenubarPrimitive__namespace.Label.displayName;
|
|
1491
|
-
var MenubarSeparator =
|
|
1510
|
+
var MenubarSeparator = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1492
1511
|
MenubarPrimitive__namespace.Separator,
|
|
1493
1512
|
{
|
|
1494
1513
|
ref,
|
|
@@ -1505,7 +1524,7 @@ var MenubarShortcut = ({
|
|
|
1505
1524
|
"span",
|
|
1506
1525
|
{
|
|
1507
1526
|
className: cn(
|
|
1508
|
-
"ml-auto text-
|
|
1527
|
+
"ml-auto text-sm tracking-widest text-muted-foreground",
|
|
1509
1528
|
className
|
|
1510
1529
|
),
|
|
1511
1530
|
...props
|
|
@@ -1513,7 +1532,7 @@ var MenubarShortcut = ({
|
|
|
1513
1532
|
);
|
|
1514
1533
|
};
|
|
1515
1534
|
MenubarShortcut.displayname = "MenubarShortcut";
|
|
1516
|
-
var NavigationMenu =
|
|
1535
|
+
var NavigationMenu = React24__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1517
1536
|
NavigationMenuPrimitive__namespace.Root,
|
|
1518
1537
|
{
|
|
1519
1538
|
ref,
|
|
@@ -1529,7 +1548,7 @@ var NavigationMenu = React23__namespace.forwardRef(({ className, children, ...pr
|
|
|
1529
1548
|
}
|
|
1530
1549
|
));
|
|
1531
1550
|
NavigationMenu.displayName = NavigationMenuPrimitive__namespace.Root.displayName;
|
|
1532
|
-
var NavigationMenuList =
|
|
1551
|
+
var NavigationMenuList = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1533
1552
|
NavigationMenuPrimitive__namespace.List,
|
|
1534
1553
|
{
|
|
1535
1554
|
ref,
|
|
@@ -1545,7 +1564,7 @@ var NavigationMenuItem = NavigationMenuPrimitive__namespace.Item;
|
|
|
1545
1564
|
var navigationMenuTriggerStyle = classVarianceAuthority.cva(
|
|
1546
1565
|
"group inline-flex h-10 w-max items-center justify-center rounded-control bg-background px-4 py-2 font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"
|
|
1547
1566
|
);
|
|
1548
|
-
var NavigationMenuTrigger =
|
|
1567
|
+
var NavigationMenuTrigger = React24__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1549
1568
|
NavigationMenuPrimitive__namespace.Trigger,
|
|
1550
1569
|
{
|
|
1551
1570
|
ref,
|
|
@@ -1565,7 +1584,7 @@ var NavigationMenuTrigger = React23__namespace.forwardRef(({ className, children
|
|
|
1565
1584
|
}
|
|
1566
1585
|
));
|
|
1567
1586
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive__namespace.Trigger.displayName;
|
|
1568
|
-
var NavigationMenuContent =
|
|
1587
|
+
var NavigationMenuContent = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1569
1588
|
NavigationMenuPrimitive__namespace.Content,
|
|
1570
1589
|
{
|
|
1571
1590
|
ref,
|
|
@@ -1578,7 +1597,7 @@ var NavigationMenuContent = React23__namespace.forwardRef(({ className, ...props
|
|
|
1578
1597
|
));
|
|
1579
1598
|
NavigationMenuContent.displayName = NavigationMenuPrimitive__namespace.Content.displayName;
|
|
1580
1599
|
var NavigationMenuLink = NavigationMenuPrimitive__namespace.Link;
|
|
1581
|
-
var NavigationMenuViewport =
|
|
1600
|
+
var NavigationMenuViewport = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1582
1601
|
NavigationMenuPrimitive__namespace.Viewport,
|
|
1583
1602
|
{
|
|
1584
1603
|
className: cn(
|
|
@@ -1590,7 +1609,7 @@ var NavigationMenuViewport = React23__namespace.forwardRef(({ className, ...prop
|
|
|
1590
1609
|
}
|
|
1591
1610
|
) }));
|
|
1592
1611
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive__namespace.Viewport.displayName;
|
|
1593
|
-
var NavigationMenuIndicator =
|
|
1612
|
+
var NavigationMenuIndicator = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1594
1613
|
NavigationMenuPrimitive__namespace.Indicator,
|
|
1595
1614
|
{
|
|
1596
1615
|
ref,
|
|
@@ -1613,7 +1632,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
1613
1632
|
}
|
|
1614
1633
|
);
|
|
1615
1634
|
Pagination.displayName = "Pagination";
|
|
1616
|
-
var PaginationContent =
|
|
1635
|
+
var PaginationContent = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1617
1636
|
"ul",
|
|
1618
1637
|
{
|
|
1619
1638
|
ref,
|
|
@@ -1622,7 +1641,7 @@ var PaginationContent = React23__namespace.forwardRef(({ className, ...props },
|
|
|
1622
1641
|
}
|
|
1623
1642
|
));
|
|
1624
1643
|
PaginationContent.displayName = "PaginationContent";
|
|
1625
|
-
var PaginationItem =
|
|
1644
|
+
var PaginationItem = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("", className), ...props }));
|
|
1626
1645
|
PaginationItem.displayName = "PaginationItem";
|
|
1627
1646
|
var PaginationLink = ({
|
|
1628
1647
|
className,
|
|
@@ -1696,7 +1715,7 @@ var PaginationEllipsis = ({
|
|
|
1696
1715
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
1697
1716
|
var Popover = PopoverPrimitive__namespace.Root;
|
|
1698
1717
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
1699
|
-
var PopoverContent =
|
|
1718
|
+
var PopoverContent = React24__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1700
1719
|
PopoverPrimitive__namespace.Content,
|
|
1701
1720
|
{
|
|
1702
1721
|
ref,
|
|
@@ -1710,7 +1729,7 @@ var PopoverContent = React23__namespace.forwardRef(({ className, align = "center
|
|
|
1710
1729
|
}
|
|
1711
1730
|
) }));
|
|
1712
1731
|
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
1713
|
-
var Progress =
|
|
1732
|
+
var Progress = React24__namespace.forwardRef(({ className, value, size = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1714
1733
|
ProgressPrimitive__namespace.Root,
|
|
1715
1734
|
{
|
|
1716
1735
|
ref,
|
|
@@ -1754,7 +1773,7 @@ var ResizableHandle = ({
|
|
|
1754
1773
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-10 h-6 w-[3px] rounded-full bg-muted-foreground/40" })
|
|
1755
1774
|
}
|
|
1756
1775
|
);
|
|
1757
|
-
var ScrollArea =
|
|
1776
|
+
var ScrollArea = React24__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1758
1777
|
ScrollAreaPrimitive__namespace.Root,
|
|
1759
1778
|
{
|
|
1760
1779
|
ref,
|
|
@@ -1768,7 +1787,7 @@ var ScrollArea = React23__namespace.forwardRef(({ className, children, ...props
|
|
|
1768
1787
|
}
|
|
1769
1788
|
));
|
|
1770
1789
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
1771
|
-
var ScrollBar =
|
|
1790
|
+
var ScrollBar = React24__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1772
1791
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
1773
1792
|
{
|
|
1774
1793
|
ref,
|
|
@@ -1788,7 +1807,7 @@ var Sheet = DialogPrimitive__namespace.Root;
|
|
|
1788
1807
|
var SheetTrigger = DialogPrimitive__namespace.Trigger;
|
|
1789
1808
|
var SheetClose = DialogPrimitive__namespace.Close;
|
|
1790
1809
|
var SheetPortal = DialogPrimitive__namespace.Portal;
|
|
1791
|
-
var SheetOverlay =
|
|
1810
|
+
var SheetOverlay = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1792
1811
|
DialogPrimitive__namespace.Overlay,
|
|
1793
1812
|
{
|
|
1794
1813
|
className: cn(
|
|
@@ -1816,7 +1835,7 @@ var sheetVariants = classVarianceAuthority.cva(
|
|
|
1816
1835
|
}
|
|
1817
1836
|
}
|
|
1818
1837
|
);
|
|
1819
|
-
var SheetContent =
|
|
1838
|
+
var SheetContent = React24__namespace.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
1820
1839
|
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
1821
1840
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1822
1841
|
DialogPrimitive__namespace.Content,
|
|
@@ -1863,7 +1882,7 @@ var SheetFooter = ({
|
|
|
1863
1882
|
}
|
|
1864
1883
|
);
|
|
1865
1884
|
SheetFooter.displayName = "SheetFooter";
|
|
1866
|
-
var SheetTitle =
|
|
1885
|
+
var SheetTitle = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1867
1886
|
DialogPrimitive__namespace.Title,
|
|
1868
1887
|
{
|
|
1869
1888
|
ref,
|
|
@@ -1872,7 +1891,7 @@ var SheetTitle = React23__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1872
1891
|
}
|
|
1873
1892
|
));
|
|
1874
1893
|
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
1875
|
-
var SheetDescription =
|
|
1894
|
+
var SheetDescription = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1876
1895
|
DialogPrimitive__namespace.Description,
|
|
1877
1896
|
{
|
|
1878
1897
|
ref,
|
|
@@ -1883,8 +1902,8 @@ var SheetDescription = React23__namespace.forwardRef(({ className, ...props }, r
|
|
|
1883
1902
|
SheetDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
1884
1903
|
var MOBILE_BREAKPOINT = 768;
|
|
1885
1904
|
function useIsMobile() {
|
|
1886
|
-
const [isMobile, setIsMobile] =
|
|
1887
|
-
|
|
1905
|
+
const [isMobile, setIsMobile] = React24__namespace.useState(void 0);
|
|
1906
|
+
React24__namespace.useEffect(() => {
|
|
1888
1907
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
1889
1908
|
const onChange = () => {
|
|
1890
1909
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -1910,7 +1929,7 @@ function Skeleton({
|
|
|
1910
1929
|
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
1911
1930
|
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
1912
1931
|
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
1913
|
-
var TooltipContent =
|
|
1932
|
+
var TooltipContent = React24__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1914
1933
|
TooltipPrimitive__namespace.Content,
|
|
1915
1934
|
{
|
|
1916
1935
|
ref,
|
|
@@ -1929,15 +1948,15 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
1929
1948
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
1930
1949
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
1931
1950
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
1932
|
-
var SidebarContext =
|
|
1951
|
+
var SidebarContext = React24__namespace.createContext(null);
|
|
1933
1952
|
function useSidebar() {
|
|
1934
|
-
const context =
|
|
1953
|
+
const context = React24__namespace.useContext(SidebarContext);
|
|
1935
1954
|
if (!context) {
|
|
1936
1955
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1937
1956
|
}
|
|
1938
1957
|
return context;
|
|
1939
1958
|
}
|
|
1940
|
-
var SidebarProvider =
|
|
1959
|
+
var SidebarProvider = React24__namespace.forwardRef(
|
|
1941
1960
|
({
|
|
1942
1961
|
defaultOpen = true,
|
|
1943
1962
|
open: openProp,
|
|
@@ -1948,10 +1967,10 @@ var SidebarProvider = React23__namespace.forwardRef(
|
|
|
1948
1967
|
...props
|
|
1949
1968
|
}, ref) => {
|
|
1950
1969
|
const isMobile = useIsMobile();
|
|
1951
|
-
const [openMobile, setOpenMobile] =
|
|
1952
|
-
const [_open, _setOpen] =
|
|
1970
|
+
const [openMobile, setOpenMobile] = React24__namespace.useState(false);
|
|
1971
|
+
const [_open, _setOpen] = React24__namespace.useState(defaultOpen);
|
|
1953
1972
|
const open = openProp ?? _open;
|
|
1954
|
-
const setOpen =
|
|
1973
|
+
const setOpen = React24__namespace.useCallback(
|
|
1955
1974
|
(value) => {
|
|
1956
1975
|
const openState = typeof value === "function" ? value(open) : value;
|
|
1957
1976
|
if (setOpenProp) {
|
|
@@ -1963,10 +1982,10 @@ var SidebarProvider = React23__namespace.forwardRef(
|
|
|
1963
1982
|
},
|
|
1964
1983
|
[setOpenProp, open]
|
|
1965
1984
|
);
|
|
1966
|
-
const toggleSidebar =
|
|
1985
|
+
const toggleSidebar = React24__namespace.useCallback(() => {
|
|
1967
1986
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
1968
1987
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
1969
|
-
|
|
1988
|
+
React24__namespace.useEffect(() => {
|
|
1970
1989
|
const handleKeyDown = (event) => {
|
|
1971
1990
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
1972
1991
|
event.preventDefault();
|
|
@@ -1977,7 +1996,7 @@ var SidebarProvider = React23__namespace.forwardRef(
|
|
|
1977
1996
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
1978
1997
|
}, [toggleSidebar]);
|
|
1979
1998
|
const state = open ? "expanded" : "collapsed";
|
|
1980
|
-
const contextValue =
|
|
1999
|
+
const contextValue = React24__namespace.useMemo(
|
|
1981
2000
|
() => ({
|
|
1982
2001
|
state,
|
|
1983
2002
|
open,
|
|
@@ -2009,7 +2028,7 @@ var SidebarProvider = React23__namespace.forwardRef(
|
|
|
2009
2028
|
}
|
|
2010
2029
|
);
|
|
2011
2030
|
SidebarProvider.displayName = "SidebarProvider";
|
|
2012
|
-
var Sidebar =
|
|
2031
|
+
var Sidebar = React24__namespace.forwardRef(
|
|
2013
2032
|
({
|
|
2014
2033
|
side = "left",
|
|
2015
2034
|
variant = "sidebar",
|
|
@@ -2102,7 +2121,7 @@ var Sidebar = React23__namespace.forwardRef(
|
|
|
2102
2121
|
}
|
|
2103
2122
|
);
|
|
2104
2123
|
Sidebar.displayName = "Sidebar";
|
|
2105
|
-
var SidebarTrigger =
|
|
2124
|
+
var SidebarTrigger = React24__namespace.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
2106
2125
|
const { toggleSidebar } = useSidebar();
|
|
2107
2126
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2108
2127
|
Button,
|
|
@@ -2125,7 +2144,7 @@ var SidebarTrigger = React23__namespace.forwardRef(({ className, onClick, ...pro
|
|
|
2125
2144
|
);
|
|
2126
2145
|
});
|
|
2127
2146
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
2128
|
-
var SidebarRail =
|
|
2147
|
+
var SidebarRail = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2129
2148
|
const { toggleSidebar } = useSidebar();
|
|
2130
2149
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2131
2150
|
"button",
|
|
@@ -2150,7 +2169,7 @@ var SidebarRail = React23__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
2150
2169
|
);
|
|
2151
2170
|
});
|
|
2152
2171
|
SidebarRail.displayName = "SidebarRail";
|
|
2153
|
-
var SidebarInset =
|
|
2172
|
+
var SidebarInset = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2154
2173
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2155
2174
|
"main",
|
|
2156
2175
|
{
|
|
@@ -2165,7 +2184,7 @@ var SidebarInset = React23__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
2165
2184
|
);
|
|
2166
2185
|
});
|
|
2167
2186
|
SidebarInset.displayName = "SidebarInset";
|
|
2168
|
-
var SidebarInput =
|
|
2187
|
+
var SidebarInput = React24__namespace.forwardRef(({ className, type, ...props }, ref) => {
|
|
2169
2188
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2170
2189
|
"input",
|
|
2171
2190
|
{
|
|
@@ -2183,7 +2202,7 @@ var SidebarInput = React23__namespace.forwardRef(({ className, type, ...props },
|
|
|
2183
2202
|
);
|
|
2184
2203
|
});
|
|
2185
2204
|
SidebarInput.displayName = "SidebarInput";
|
|
2186
|
-
var SidebarHeader =
|
|
2205
|
+
var SidebarHeader = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2187
2206
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2188
2207
|
"div",
|
|
2189
2208
|
{
|
|
@@ -2195,7 +2214,7 @@ var SidebarHeader = React23__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
2195
2214
|
);
|
|
2196
2215
|
});
|
|
2197
2216
|
SidebarHeader.displayName = "SidebarHeader";
|
|
2198
|
-
var SidebarFooter =
|
|
2217
|
+
var SidebarFooter = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2199
2218
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2200
2219
|
"div",
|
|
2201
2220
|
{
|
|
@@ -2207,7 +2226,7 @@ var SidebarFooter = React23__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
2207
2226
|
);
|
|
2208
2227
|
});
|
|
2209
2228
|
SidebarFooter.displayName = "SidebarFooter";
|
|
2210
|
-
var SidebarSeparator =
|
|
2229
|
+
var SidebarSeparator = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2211
2230
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2212
2231
|
Separator,
|
|
2213
2232
|
{
|
|
@@ -2219,7 +2238,7 @@ var SidebarSeparator = React23__namespace.forwardRef(({ className, ...props }, r
|
|
|
2219
2238
|
);
|
|
2220
2239
|
});
|
|
2221
2240
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
2222
|
-
var SidebarContent =
|
|
2241
|
+
var SidebarContent = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2223
2242
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2224
2243
|
"div",
|
|
2225
2244
|
{
|
|
@@ -2234,7 +2253,7 @@ var SidebarContent = React23__namespace.forwardRef(({ className, ...props }, ref
|
|
|
2234
2253
|
);
|
|
2235
2254
|
});
|
|
2236
2255
|
SidebarContent.displayName = "SidebarContent";
|
|
2237
|
-
var SidebarGroup =
|
|
2256
|
+
var SidebarGroup = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2238
2257
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2239
2258
|
"div",
|
|
2240
2259
|
{
|
|
@@ -2246,7 +2265,7 @@ var SidebarGroup = React23__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
2246
2265
|
);
|
|
2247
2266
|
});
|
|
2248
2267
|
SidebarGroup.displayName = "SidebarGroup";
|
|
2249
|
-
var SidebarGroupLabel =
|
|
2268
|
+
var SidebarGroupLabel = React24__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2250
2269
|
const Comp = asChild ? reactSlot.Slot : "div";
|
|
2251
2270
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2252
2271
|
Comp,
|
|
@@ -2254,7 +2273,7 @@ var SidebarGroupLabel = React23__namespace.forwardRef(({ className, asChild = fa
|
|
|
2254
2273
|
ref,
|
|
2255
2274
|
"data-sidebar": "group-label",
|
|
2256
2275
|
className: cn(
|
|
2257
|
-
"flex h-8 shrink-0 items-center rounded-md px-2 text-
|
|
2276
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-sm font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2258
2277
|
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
2259
2278
|
className
|
|
2260
2279
|
),
|
|
@@ -2263,7 +2282,7 @@ var SidebarGroupLabel = React23__namespace.forwardRef(({ className, asChild = fa
|
|
|
2263
2282
|
);
|
|
2264
2283
|
});
|
|
2265
2284
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
2266
|
-
var SidebarGroupAction =
|
|
2285
|
+
var SidebarGroupAction = React24__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2267
2286
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
2268
2287
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2269
2288
|
Comp,
|
|
@@ -2282,7 +2301,7 @@ var SidebarGroupAction = React23__namespace.forwardRef(({ className, asChild = f
|
|
|
2282
2301
|
);
|
|
2283
2302
|
});
|
|
2284
2303
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
2285
|
-
var SidebarGroupContent =
|
|
2304
|
+
var SidebarGroupContent = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2286
2305
|
"div",
|
|
2287
2306
|
{
|
|
2288
2307
|
ref,
|
|
@@ -2292,7 +2311,7 @@ var SidebarGroupContent = React23__namespace.forwardRef(({ className, ...props }
|
|
|
2292
2311
|
}
|
|
2293
2312
|
));
|
|
2294
2313
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
2295
|
-
var SidebarMenu =
|
|
2314
|
+
var SidebarMenu = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2296
2315
|
"ul",
|
|
2297
2316
|
{
|
|
2298
2317
|
ref,
|
|
@@ -2302,7 +2321,7 @@ var SidebarMenu = React23__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
2302
2321
|
}
|
|
2303
2322
|
));
|
|
2304
2323
|
SidebarMenu.displayName = "SidebarMenu";
|
|
2305
|
-
var SidebarMenuItem =
|
|
2324
|
+
var SidebarMenuItem = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2306
2325
|
"li",
|
|
2307
2326
|
{
|
|
2308
2327
|
ref,
|
|
@@ -2332,7 +2351,7 @@ var sidebarMenuButtonVariants = classVarianceAuthority.cva(
|
|
|
2332
2351
|
}
|
|
2333
2352
|
}
|
|
2334
2353
|
);
|
|
2335
|
-
var SidebarMenuButton =
|
|
2354
|
+
var SidebarMenuButton = React24__namespace.forwardRef(
|
|
2336
2355
|
({
|
|
2337
2356
|
asChild = false,
|
|
2338
2357
|
isActive = false,
|
|
@@ -2378,7 +2397,7 @@ var SidebarMenuButton = React23__namespace.forwardRef(
|
|
|
2378
2397
|
}
|
|
2379
2398
|
);
|
|
2380
2399
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
2381
|
-
var SidebarMenuAction =
|
|
2400
|
+
var SidebarMenuAction = React24__namespace.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
2382
2401
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
2383
2402
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2384
2403
|
Comp,
|
|
@@ -2401,13 +2420,13 @@ var SidebarMenuAction = React23__namespace.forwardRef(({ className, asChild = fa
|
|
|
2401
2420
|
);
|
|
2402
2421
|
});
|
|
2403
2422
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
2404
|
-
var SidebarMenuBadge =
|
|
2423
|
+
var SidebarMenuBadge = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2405
2424
|
"div",
|
|
2406
2425
|
{
|
|
2407
2426
|
ref,
|
|
2408
2427
|
"data-sidebar": "menu-badge",
|
|
2409
2428
|
className: cn(
|
|
2410
|
-
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-
|
|
2429
|
+
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-sm font-medium tabular-nums text-sidebar-foreground",
|
|
2411
2430
|
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
2412
2431
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
2413
2432
|
"peer-data-[size=default]/menu-button:top-1.5",
|
|
@@ -2419,8 +2438,8 @@ var SidebarMenuBadge = React23__namespace.forwardRef(({ className, ...props }, r
|
|
|
2419
2438
|
}
|
|
2420
2439
|
));
|
|
2421
2440
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
2422
|
-
var SidebarMenuSkeleton =
|
|
2423
|
-
const width =
|
|
2441
|
+
var SidebarMenuSkeleton = React24__namespace.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
2442
|
+
const width = React24__namespace.useMemo(() => {
|
|
2424
2443
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2425
2444
|
}, []);
|
|
2426
2445
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2453,7 +2472,7 @@ var SidebarMenuSkeleton = React23__namespace.forwardRef(({ className, showIcon =
|
|
|
2453
2472
|
);
|
|
2454
2473
|
});
|
|
2455
2474
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
2456
|
-
var SidebarMenuSub =
|
|
2475
|
+
var SidebarMenuSub = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2457
2476
|
"ul",
|
|
2458
2477
|
{
|
|
2459
2478
|
ref,
|
|
@@ -2467,9 +2486,9 @@ var SidebarMenuSub = React23__namespace.forwardRef(({ className, ...props }, ref
|
|
|
2467
2486
|
}
|
|
2468
2487
|
));
|
|
2469
2488
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
2470
|
-
var SidebarMenuSubItem =
|
|
2489
|
+
var SidebarMenuSubItem = React24__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, ...props }));
|
|
2471
2490
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
2472
|
-
var SidebarMenuSubButton =
|
|
2491
|
+
var SidebarMenuSubButton = React24__namespace.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
2473
2492
|
const Comp = asChild ? reactSlot.Slot : "a";
|
|
2474
2493
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2475
2494
|
Comp,
|
|
@@ -2571,7 +2590,7 @@ var statusDotVariants = classVarianceAuthority.cva("inline-block shrink-0 rounde
|
|
|
2571
2590
|
size: "sm"
|
|
2572
2591
|
}
|
|
2573
2592
|
});
|
|
2574
|
-
var StatusDot =
|
|
2593
|
+
var StatusDot = React24__namespace.forwardRef(
|
|
2575
2594
|
({ className, tone, size, label, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2576
2595
|
"span",
|
|
2577
2596
|
{
|
|
@@ -2585,7 +2604,7 @@ var StatusDot = React23__namespace.forwardRef(
|
|
|
2585
2604
|
)
|
|
2586
2605
|
);
|
|
2587
2606
|
StatusDot.displayName = "StatusDot";
|
|
2588
|
-
var Table =
|
|
2607
|
+
var Table = React24__namespace.forwardRef(({ className, density = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2589
2608
|
"div",
|
|
2590
2609
|
{
|
|
2591
2610
|
"data-density": density,
|
|
@@ -2601,9 +2620,9 @@ var Table = React23__namespace.forwardRef(({ className, density = "default", ...
|
|
|
2601
2620
|
}
|
|
2602
2621
|
));
|
|
2603
2622
|
Table.displayName = "Table";
|
|
2604
|
-
var TableHeader =
|
|
2623
|
+
var TableHeader = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2605
2624
|
TableHeader.displayName = "TableHeader";
|
|
2606
|
-
var TableBody =
|
|
2625
|
+
var TableBody = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2607
2626
|
"tbody",
|
|
2608
2627
|
{
|
|
2609
2628
|
ref,
|
|
@@ -2612,7 +2631,7 @@ var TableBody = React23__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
2612
2631
|
}
|
|
2613
2632
|
));
|
|
2614
2633
|
TableBody.displayName = "TableBody";
|
|
2615
|
-
var TableFooter =
|
|
2634
|
+
var TableFooter = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2616
2635
|
"tfoot",
|
|
2617
2636
|
{
|
|
2618
2637
|
ref,
|
|
@@ -2624,7 +2643,7 @@ var TableFooter = React23__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
2624
2643
|
}
|
|
2625
2644
|
));
|
|
2626
2645
|
TableFooter.displayName = "TableFooter";
|
|
2627
|
-
var TableRow =
|
|
2646
|
+
var TableRow = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2628
2647
|
"tr",
|
|
2629
2648
|
{
|
|
2630
2649
|
ref,
|
|
@@ -2636,7 +2655,7 @@ var TableRow = React23__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
2636
2655
|
}
|
|
2637
2656
|
));
|
|
2638
2657
|
TableRow.displayName = "TableRow";
|
|
2639
|
-
var TableHead =
|
|
2658
|
+
var TableHead = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2640
2659
|
"th",
|
|
2641
2660
|
{
|
|
2642
2661
|
ref,
|
|
@@ -2646,14 +2665,14 @@ var TableHead = React23__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
2646
2665
|
// every cell follows from there. One prop on the table rather than a
|
|
2647
2666
|
// size on <TableHead> and <TableCell> individually — four places to
|
|
2648
2667
|
// forget, and a table with two densities in it is always a mistake.
|
|
2649
|
-
"group-data-[density=compact]/table:h-[26px] group-data-[density=compact]/table:text-
|
|
2668
|
+
"group-data-[density=compact]/table:h-[26px] group-data-[density=compact]/table:text-sm",
|
|
2650
2669
|
className
|
|
2651
2670
|
),
|
|
2652
2671
|
...props
|
|
2653
2672
|
}
|
|
2654
2673
|
));
|
|
2655
2674
|
TableHead.displayName = "TableHead";
|
|
2656
|
-
var TableCell =
|
|
2675
|
+
var TableCell = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2657
2676
|
"td",
|
|
2658
2677
|
{
|
|
2659
2678
|
ref,
|
|
@@ -2666,7 +2685,7 @@ var TableCell = React23__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
2666
2685
|
}
|
|
2667
2686
|
));
|
|
2668
2687
|
TableCell.displayName = "TableCell";
|
|
2669
|
-
var TableCaption =
|
|
2688
|
+
var TableCaption = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2670
2689
|
"caption",
|
|
2671
2690
|
{
|
|
2672
2691
|
ref,
|
|
@@ -2675,11 +2694,11 @@ var TableCaption = React23__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
2675
2694
|
}
|
|
2676
2695
|
));
|
|
2677
2696
|
TableCaption.displayName = "TableCaption";
|
|
2678
|
-
var TabsSizeContext =
|
|
2679
|
-
var Tabs =
|
|
2697
|
+
var TabsSizeContext = React24__namespace.createContext("default");
|
|
2698
|
+
var Tabs = React24__namespace.forwardRef(({ size = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TabsSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { ref, ...props }) }));
|
|
2680
2699
|
Tabs.displayName = TabsPrimitive__namespace.Root.displayName;
|
|
2681
|
-
var TabsList =
|
|
2682
|
-
const size =
|
|
2700
|
+
var TabsList = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2701
|
+
const size = React24__namespace.useContext(TabsSizeContext);
|
|
2683
2702
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2684
2703
|
TabsPrimitive__namespace.List,
|
|
2685
2704
|
{
|
|
@@ -2694,14 +2713,14 @@ var TabsList = React23__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
|
2694
2713
|
);
|
|
2695
2714
|
});
|
|
2696
2715
|
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
2697
|
-
var TabsTrigger =
|
|
2698
|
-
const size =
|
|
2716
|
+
var TabsTrigger = React24__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2717
|
+
const size = React24__namespace.useContext(TabsSizeContext);
|
|
2699
2718
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2700
2719
|
TabsPrimitive__namespace.Trigger,
|
|
2701
2720
|
{
|
|
2702
2721
|
ref,
|
|
2703
2722
|
className: cn(
|
|
2704
|
-
size === "sm" ? "h-[26px] px-2 text-
|
|
2723
|
+
size === "sm" ? "h-[26px] px-2 text-sm" : "px-3 py-1",
|
|
2705
2724
|
"inline-flex items-center justify-center whitespace-nowrap rounded-control font-medium ring-offset-background transition-colors text-muted-foreground hover:text-foreground hover:bg-background/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary/15 data-[state=active]:text-primary data-[state=active]:ring-1 data-[state=active]:ring-primary/25 data-[state=active]:shadow-sm",
|
|
2706
2725
|
className
|
|
2707
2726
|
),
|
|
@@ -2710,7 +2729,7 @@ var TabsTrigger = React23__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
2710
2729
|
);
|
|
2711
2730
|
});
|
|
2712
2731
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
2713
|
-
var TabsContent =
|
|
2732
|
+
var TabsContent = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2714
2733
|
TabsPrimitive__namespace.Content,
|
|
2715
2734
|
{
|
|
2716
2735
|
ref,
|
|
@@ -2742,7 +2761,7 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
2742
2761
|
}
|
|
2743
2762
|
}
|
|
2744
2763
|
);
|
|
2745
|
-
var Toggle =
|
|
2764
|
+
var Toggle = React24__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2746
2765
|
TogglePrimitive__namespace.Root,
|
|
2747
2766
|
{
|
|
2748
2767
|
ref,
|
|
@@ -2751,11 +2770,11 @@ var Toggle = React23__namespace.forwardRef(({ className, variant, size, ...props
|
|
|
2751
2770
|
}
|
|
2752
2771
|
));
|
|
2753
2772
|
Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
|
|
2754
|
-
var ToggleGroupContext =
|
|
2773
|
+
var ToggleGroupContext = React24__namespace.createContext({
|
|
2755
2774
|
size: "default",
|
|
2756
2775
|
variant: "default"
|
|
2757
2776
|
});
|
|
2758
|
-
var ToggleGroup =
|
|
2777
|
+
var ToggleGroup = React24__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2759
2778
|
ToggleGroupPrimitive__namespace.Root,
|
|
2760
2779
|
{
|
|
2761
2780
|
ref,
|
|
@@ -2765,8 +2784,8 @@ var ToggleGroup = React23__namespace.forwardRef(({ className, variant, size, chi
|
|
|
2765
2784
|
}
|
|
2766
2785
|
));
|
|
2767
2786
|
ToggleGroup.displayName = ToggleGroupPrimitive__namespace.Root.displayName;
|
|
2768
|
-
var ToggleGroupItem =
|
|
2769
|
-
const context =
|
|
2787
|
+
var ToggleGroupItem = React24__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
2788
|
+
const context = React24__namespace.useContext(ToggleGroupContext);
|
|
2770
2789
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2771
2790
|
ToggleGroupPrimitive__namespace.Item,
|
|
2772
2791
|
{
|
|
@@ -2784,8 +2803,64 @@ var ToggleGroupItem = React23__namespace.forwardRef(({ className, children, vari
|
|
|
2784
2803
|
);
|
|
2785
2804
|
});
|
|
2786
2805
|
ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
|
|
2806
|
+
var TONE = {
|
|
2807
|
+
allowed: "text-foreground",
|
|
2808
|
+
denied: "text-destructive",
|
|
2809
|
+
refused: "text-destructive line-through decoration-destructive/50",
|
|
2810
|
+
untouched: "text-muted-foreground/70"
|
|
2811
|
+
};
|
|
2812
|
+
function split(address) {
|
|
2813
|
+
const cut = address.lastIndexOf("/");
|
|
2814
|
+
if (cut < 0) return { head: "", tail: address };
|
|
2815
|
+
return { head: address.slice(0, cut + 1), tail: address.slice(cut + 1) };
|
|
2816
|
+
}
|
|
2817
|
+
var AddressChip = React24__namespace.forwardRef(
|
|
2818
|
+
({ address, tone = "allowed", onOpen, className, ...props }, ref) => {
|
|
2819
|
+
const { head, tail } = split(address);
|
|
2820
|
+
const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2821
|
+
head ? (
|
|
2822
|
+
// `shrink-[999]` makes the head absorb essentially all the shrink, so
|
|
2823
|
+
// the kind gives way before the participant does — but the floor is
|
|
2824
|
+
// `2ch`, never `0`. A head that collapses to nothing renders
|
|
2825
|
+
// `graph_data/stitch/route_airport@…` as `route_airport@…`, which
|
|
2826
|
+
// reads as a whole address, and two different participants can come
|
|
2827
|
+
// out identical.
|
|
2828
|
+
//
|
|
2829
|
+
// Exactly two: `text-overflow` draws the ellipsis only when it fits,
|
|
2830
|
+
// so at `1ch` the browser keeps the raw first character and drops the
|
|
2831
|
+
// marker — `groute_airport@…`, a word that was never there. Two is
|
|
2832
|
+
// one character plus the ellipsis, which is the narrowest honest
|
|
2833
|
+
// truncation. Every `ch` above that is one the participant loses.
|
|
2834
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-[2ch] shrink-[999] truncate opacity-60", children: head })
|
|
2835
|
+
) : null,
|
|
2836
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 shrink truncate", children: tail })
|
|
2837
|
+
] });
|
|
2838
|
+
const shell = cn(
|
|
2839
|
+
"inline-flex min-w-0 max-w-full items-baseline font-mono text-sm",
|
|
2840
|
+
TONE[tone] ?? "text-foreground",
|
|
2841
|
+
className
|
|
2842
|
+
);
|
|
2843
|
+
if (onOpen) {
|
|
2844
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, className: cn(shell, "min-w-0"), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2845
|
+
"button",
|
|
2846
|
+
{
|
|
2847
|
+
type: "button",
|
|
2848
|
+
title: address,
|
|
2849
|
+
onClick: () => onOpen(address),
|
|
2850
|
+
className: cn(
|
|
2851
|
+
"inline-flex min-w-0 max-w-full cursor-pointer items-baseline rounded-control",
|
|
2852
|
+
"hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
2853
|
+
),
|
|
2854
|
+
children: body
|
|
2855
|
+
}
|
|
2856
|
+
) });
|
|
2857
|
+
}
|
|
2858
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, title: address, className: shell, ...props, children: body });
|
|
2859
|
+
}
|
|
2860
|
+
);
|
|
2861
|
+
AddressChip.displayName = "AddressChip";
|
|
2787
2862
|
var agentChipVariants = classVarianceAuthority.cva(
|
|
2788
|
-
"inline-flex max-w-full shrink-0 items-center gap-1 rounded-control border px-1.5 text-
|
|
2863
|
+
"inline-flex max-w-full shrink-0 items-center gap-1 rounded-control border px-1.5 text-sm [&_svg]:size-3 [&_svg]:shrink-0",
|
|
2789
2864
|
{
|
|
2790
2865
|
variants: {
|
|
2791
2866
|
/**
|
|
@@ -2806,7 +2881,7 @@ var agentChipVariants = classVarianceAuthority.cva(
|
|
|
2806
2881
|
defaultVariants: { kind: "agent", inactive: false }
|
|
2807
2882
|
}
|
|
2808
2883
|
);
|
|
2809
|
-
var AgentChip =
|
|
2884
|
+
var AgentChip = React24__namespace.forwardRef(
|
|
2810
2885
|
({ icon, name, kind, inactive, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2811
2886
|
"span",
|
|
2812
2887
|
{
|
|
@@ -2821,36 +2896,6 @@ var AgentChip = React23__namespace.forwardRef(
|
|
|
2821
2896
|
)
|
|
2822
2897
|
);
|
|
2823
2898
|
AgentChip.displayName = "AgentChip";
|
|
2824
|
-
var SWATCH = {
|
|
2825
|
-
none: "bg-muted-foreground",
|
|
2826
|
-
network: "bg-warning",
|
|
2827
|
-
graph_read: "bg-success",
|
|
2828
|
-
graph_write: "bg-data-2",
|
|
2829
|
-
schema_write: "bg-data-4",
|
|
2830
|
-
ingest: "bg-info",
|
|
2831
|
-
llm: "bg-data-7",
|
|
2832
|
-
plan_write: "bg-data-5",
|
|
2833
|
-
work_write: "bg-destructive"
|
|
2834
|
-
};
|
|
2835
|
-
var BoundChip = React23__namespace.forwardRef(
|
|
2836
|
-
({ bound, swatchOnly, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2837
|
-
"span",
|
|
2838
|
-
{
|
|
2839
|
-
ref,
|
|
2840
|
-
className: cn(
|
|
2841
|
-
"inline-flex max-w-full shrink-0 items-center gap-1.5 font-mono text-meta text-muted-foreground",
|
|
2842
|
-
className
|
|
2843
|
-
),
|
|
2844
|
-
"aria-label": swatchOnly ? `bound: ${bound}` : void 0,
|
|
2845
|
-
...props,
|
|
2846
|
-
children: [
|
|
2847
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: cn("size-1.5 shrink-0", SWATCH[bound]) }),
|
|
2848
|
-
swatchOnly ? null : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: bound })
|
|
2849
|
-
]
|
|
2850
|
-
}
|
|
2851
|
-
)
|
|
2852
|
-
);
|
|
2853
|
-
BoundChip.displayName = "BoundChip";
|
|
2854
2899
|
var stateVariants = classVarianceAuthority.cva("inline-flex shrink-0 items-center gap-1.5 font-medium", {
|
|
2855
2900
|
variants: {
|
|
2856
2901
|
tone: {
|
|
@@ -2863,13 +2908,13 @@ var stateVariants = classVarianceAuthority.cva("inline-flex shrink-0 items-cente
|
|
|
2863
2908
|
},
|
|
2864
2909
|
defaultVariants: { tone: "active" }
|
|
2865
2910
|
});
|
|
2866
|
-
var AppStatusBar =
|
|
2911
|
+
var AppStatusBar = React24__namespace.forwardRef(
|
|
2867
2912
|
({ state, tone, end, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2868
2913
|
"div",
|
|
2869
2914
|
{
|
|
2870
2915
|
ref,
|
|
2871
2916
|
className: cn(
|
|
2872
|
-
"flex h-[25px] shrink-0 items-center gap-2 border-t border-border px-2 text-
|
|
2917
|
+
"flex h-[25px] shrink-0 items-center gap-2 border-t border-border px-2 text-sm text-muted-foreground",
|
|
2873
2918
|
className
|
|
2874
2919
|
),
|
|
2875
2920
|
...props,
|
|
@@ -2891,7 +2936,7 @@ var AppStatusBar = React23__namespace.forwardRef(
|
|
|
2891
2936
|
)
|
|
2892
2937
|
);
|
|
2893
2938
|
AppStatusBar.displayName = "AppStatusBar";
|
|
2894
|
-
var BarChartH =
|
|
2939
|
+
var BarChartH = React24__namespace.forwardRef(
|
|
2895
2940
|
({
|
|
2896
2941
|
data,
|
|
2897
2942
|
max,
|
|
@@ -2903,12 +2948,12 @@ var BarChartH = React23__namespace.forwardRef(
|
|
|
2903
2948
|
}, ref) => {
|
|
2904
2949
|
const ceiling = max ?? (Math.max(...data.map((d) => d.value), 0) || 1);
|
|
2905
2950
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
2906
|
-
caption != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
2951
|
+
caption != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: caption }) : null,
|
|
2907
2952
|
data.map((d, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-4 items-center gap-2", children: [
|
|
2908
2953
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2909
2954
|
"span",
|
|
2910
2955
|
{
|
|
2911
|
-
className: "shrink-0 truncate text-
|
|
2956
|
+
className: "shrink-0 truncate text-sm text-muted-foreground",
|
|
2912
2957
|
style: { width: labelWidth },
|
|
2913
2958
|
children: d.label
|
|
2914
2959
|
}
|
|
@@ -2925,14 +2970,14 @@ var BarChartH = React23__namespace.forwardRef(
|
|
|
2925
2970
|
}
|
|
2926
2971
|
}
|
|
2927
2972
|
),
|
|
2928
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-
|
|
2973
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-sm tabular-nums", children: d.display ?? d.value })
|
|
2929
2974
|
] })
|
|
2930
2975
|
] }, i))
|
|
2931
2976
|
] });
|
|
2932
2977
|
}
|
|
2933
2978
|
);
|
|
2934
2979
|
BarChartH.displayName = "BarChartH";
|
|
2935
|
-
var BarChartV =
|
|
2980
|
+
var BarChartV = React24__namespace.forwardRef(
|
|
2936
2981
|
({
|
|
2937
2982
|
data,
|
|
2938
2983
|
max,
|
|
@@ -2950,7 +2995,7 @@ var BarChartV = React23__namespace.forwardRef(
|
|
|
2950
2995
|
const emphasis = highlightIndex ?? data.length - 1;
|
|
2951
2996
|
const labelled = (i) => labelMode === "all" || labelMode === "last" && i === emphasis;
|
|
2952
2997
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
2953
|
-
caption != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
2998
|
+
caption != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: caption }) : null,
|
|
2954
2999
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative mt-2", style: { height }, children: [
|
|
2955
3000
|
gridlines.map((g) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2956
3001
|
"div",
|
|
@@ -2960,7 +3005,7 @@ var BarChartV = React23__namespace.forwardRef(
|
|
|
2960
3005
|
style: { bottom: `${g / ceiling * 100}%` },
|
|
2961
3006
|
children: [
|
|
2962
3007
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-px flex-1 bg-border" }),
|
|
2963
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pl-1 text-
|
|
3008
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pl-1 text-sm tabular-nums text-muted-foreground", children: g })
|
|
2964
3009
|
]
|
|
2965
3010
|
},
|
|
2966
3011
|
g
|
|
@@ -2970,7 +3015,7 @@ var BarChartV = React23__namespace.forwardRef(
|
|
|
2970
3015
|
{
|
|
2971
3016
|
className: "flex h-full min-w-0 flex-1 flex-col items-center justify-end gap-1",
|
|
2972
3017
|
children: [
|
|
2973
|
-
labelled(i) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
3018
|
+
labelled(i) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm tabular-nums", children: d.display ?? d.value }) : null,
|
|
2974
3019
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2975
3020
|
"span",
|
|
2976
3021
|
{
|
|
@@ -2989,20 +3034,46 @@ var BarChartV = React23__namespace.forwardRef(
|
|
|
2989
3034
|
)) })
|
|
2990
3035
|
] }),
|
|
2991
3036
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-between gap-2", children: data.map((d, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col items-center", children: [
|
|
2992
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-
|
|
2993
|
-
d.sublabel != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-
|
|
3037
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm text-muted-foreground", children: d.label }),
|
|
3038
|
+
d.sublabel != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm text-muted-foreground/70", children: d.sublabel }) : null
|
|
2994
3039
|
] }, i)) })
|
|
2995
3040
|
] });
|
|
2996
3041
|
}
|
|
2997
3042
|
);
|
|
2998
3043
|
BarChartV.displayName = "BarChartV";
|
|
3044
|
+
var UNPAINTED = "bg-muted-foreground";
|
|
3045
|
+
var BoundChip = React24__namespace.forwardRef(
|
|
3046
|
+
({ bound, swatchOnly, label, swatch, palette, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3047
|
+
"span",
|
|
3048
|
+
{
|
|
3049
|
+
ref,
|
|
3050
|
+
className: cn(
|
|
3051
|
+
"inline-flex max-w-full shrink-0 items-center gap-1.5 font-mono text-sm text-muted-foreground",
|
|
3052
|
+
className
|
|
3053
|
+
),
|
|
3054
|
+
"aria-label": swatchOnly ? `bound: ${bound}` : void 0,
|
|
3055
|
+
...props,
|
|
3056
|
+
children: [
|
|
3057
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3058
|
+
"span",
|
|
3059
|
+
{
|
|
3060
|
+
"aria-hidden": true,
|
|
3061
|
+
className: cn("size-1.5 shrink-0", swatch ?? palette?.[bound] ?? UNPAINTED)
|
|
3062
|
+
}
|
|
3063
|
+
),
|
|
3064
|
+
swatchOnly ? null : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: label ?? bound })
|
|
3065
|
+
]
|
|
3066
|
+
}
|
|
3067
|
+
)
|
|
3068
|
+
);
|
|
3069
|
+
BoundChip.displayName = "BoundChip";
|
|
2999
3070
|
function ButtonWithTooltip(props) {
|
|
3000
3071
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { delayDuration: 0, children: [
|
|
3001
3072
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", className: cn("hover:bg-transparent", props.className), ...props, children: props.children }) }),
|
|
3002
3073
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: props.tooltip })
|
|
3003
3074
|
] }) });
|
|
3004
3075
|
}
|
|
3005
|
-
var CannotAnswerCard =
|
|
3076
|
+
var CannotAnswerCard = React24__namespace.forwardRef(({ label = "cannot answer", remedy, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3006
3077
|
"div",
|
|
3007
3078
|
{
|
|
3008
3079
|
ref,
|
|
@@ -3012,13 +3083,60 @@ var CannotAnswerCard = React23__namespace.forwardRef(({ label = "cannot answer",
|
|
|
3012
3083
|
),
|
|
3013
3084
|
...props,
|
|
3014
3085
|
children: [
|
|
3015
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
3086
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
|
|
3016
3087
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children }),
|
|
3017
|
-
remedy != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
3088
|
+
remedy != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: remedy }) : null
|
|
3018
3089
|
]
|
|
3019
3090
|
}
|
|
3020
3091
|
));
|
|
3021
3092
|
CannotAnswerCard.displayName = "CannotAnswerCard";
|
|
3093
|
+
var CAST_ROLES = ["extract", "decide", "judge", "embed"];
|
|
3094
|
+
var PURPOSE = {
|
|
3095
|
+
extract: "prose in, structure out \u2014 the cheap one",
|
|
3096
|
+
decide: "writes the number a person acts on",
|
|
3097
|
+
judge: "scores an output \u2014 often local",
|
|
3098
|
+
embed: "text in, vector out"
|
|
3099
|
+
};
|
|
3100
|
+
var CastTable = React24__namespace.forwardRef(
|
|
3101
|
+
({ cast = {}, resolved, readOnly, className, ...props }, ref) => {
|
|
3102
|
+
const byRole = new Map((resolved ?? []).map((r) => [r.role, r]));
|
|
3103
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("min-w-0", className), ...props, children: [
|
|
3104
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Table, { density: "compact", children: [
|
|
3105
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
|
|
3106
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: "w-[5.5rem]", children: "role" }),
|
|
3107
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: "resolves to" }),
|
|
3108
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: "why this one" })
|
|
3109
|
+
] }) }),
|
|
3110
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: CAST_ROLES.map((role) => {
|
|
3111
|
+
const hit = byRole.get(role);
|
|
3112
|
+
const address = hit ? hit.address : cast[role] ?? null;
|
|
3113
|
+
const denied = hit ? !hit.allowed : false;
|
|
3114
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { "data-role": role, children: [
|
|
3115
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "font-mono text-sm text-muted-foreground", children: role }),
|
|
3116
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "min-w-0", children: address ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3117
|
+
AddressChip,
|
|
3118
|
+
{
|
|
3119
|
+
address,
|
|
3120
|
+
tone: denied ? "denied" : "allowed"
|
|
3121
|
+
}
|
|
3122
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground/70", children: "nothing casts it" }) }),
|
|
3123
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "text-sm text-muted-foreground", children: denied ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-destructive", children: [
|
|
3124
|
+
"denied by ",
|
|
3125
|
+
hit?.ruleMatched ?? "this world"
|
|
3126
|
+
] }) : hit?.source ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: hit.source !== "shipped" ? `set on the ${hit.source}` : address ? "shipped default" : (
|
|
3127
|
+
// No address *and* nothing shipped resolves it —
|
|
3128
|
+
// the one row that says the run may open on a
|
|
3129
|
+
// model this Graph never chose.
|
|
3130
|
+
"nothing casts it, and no shipped default resolves it"
|
|
3131
|
+
) }) : PURPOSE[role] })
|
|
3132
|
+
] }, role);
|
|
3133
|
+
}) })
|
|
3134
|
+
] }),
|
|
3135
|
+
readOnly ? null : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-2 pt-1 text-sm text-muted-foreground/70", children: "A cast picks within the rules \u2014 it never widens them." })
|
|
3136
|
+
] });
|
|
3137
|
+
}
|
|
3138
|
+
);
|
|
3139
|
+
CastTable.displayName = "CastTable";
|
|
3022
3140
|
function ChatSession({
|
|
3023
3141
|
children,
|
|
3024
3142
|
footer,
|
|
@@ -3028,20 +3146,20 @@ function ChatSession({
|
|
|
3028
3146
|
className,
|
|
3029
3147
|
bodyClassName
|
|
3030
3148
|
}) {
|
|
3031
|
-
const rootRef =
|
|
3032
|
-
const contentRef =
|
|
3033
|
-
const pinnedRef =
|
|
3034
|
-
const getViewport =
|
|
3149
|
+
const rootRef = React24__namespace.useRef(null);
|
|
3150
|
+
const contentRef = React24__namespace.useRef(null);
|
|
3151
|
+
const pinnedRef = React24__namespace.useRef(true);
|
|
3152
|
+
const getViewport = React24__namespace.useCallback(
|
|
3035
3153
|
() => rootRef.current?.querySelector(
|
|
3036
3154
|
"[data-radix-scroll-area-viewport]"
|
|
3037
3155
|
) ?? null,
|
|
3038
3156
|
[]
|
|
3039
3157
|
);
|
|
3040
|
-
const scrollToBottom =
|
|
3158
|
+
const scrollToBottom = React24__namespace.useCallback(() => {
|
|
3041
3159
|
const viewport = getViewport();
|
|
3042
3160
|
if (viewport) viewport.scrollTop = viewport.scrollHeight;
|
|
3043
3161
|
}, [getViewport]);
|
|
3044
|
-
|
|
3162
|
+
React24__namespace.useEffect(() => {
|
|
3045
3163
|
const viewport = getViewport();
|
|
3046
3164
|
if (!viewport) return;
|
|
3047
3165
|
const handleScroll = () => {
|
|
@@ -3051,7 +3169,7 @@ function ChatSession({
|
|
|
3051
3169
|
viewport.addEventListener("scroll", handleScroll, { passive: true });
|
|
3052
3170
|
return () => viewport.removeEventListener("scroll", handleScroll);
|
|
3053
3171
|
}, [getViewport, followThreshold]);
|
|
3054
|
-
|
|
3172
|
+
React24__namespace.useEffect(() => {
|
|
3055
3173
|
const content = contentRef.current;
|
|
3056
3174
|
if (!content || typeof ResizeObserver === "undefined") return;
|
|
3057
3175
|
const observer = new ResizeObserver(() => {
|
|
@@ -3060,11 +3178,11 @@ function ChatSession({
|
|
|
3060
3178
|
observer.observe(content);
|
|
3061
3179
|
return () => observer.disconnect();
|
|
3062
3180
|
}, [scrollToBottom]);
|
|
3063
|
-
|
|
3181
|
+
React24__namespace.useEffect(() => {
|
|
3064
3182
|
pinnedRef.current = true;
|
|
3065
3183
|
scrollToBottom();
|
|
3066
3184
|
}, [autoScrollKey, scrollToBottom]);
|
|
3067
|
-
const isEmpty =
|
|
3185
|
+
const isEmpty = React24__namespace.Children.count(children) === 0;
|
|
3068
3186
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col h-full min-h-0", className), children: [
|
|
3069
3187
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3070
3188
|
ScrollArea,
|
|
@@ -3157,12 +3275,12 @@ function useOverflowItems({
|
|
|
3157
3275
|
pinnedIndex,
|
|
3158
3276
|
reserve = 32
|
|
3159
3277
|
}) {
|
|
3160
|
-
const containerEl =
|
|
3161
|
-
const itemEls =
|
|
3162
|
-
const widths =
|
|
3163
|
-
const itemRefs =
|
|
3164
|
-
const [hidden, setHidden] =
|
|
3165
|
-
const fit =
|
|
3278
|
+
const containerEl = React24__namespace.useRef(null);
|
|
3279
|
+
const itemEls = React24__namespace.useRef([]);
|
|
3280
|
+
const widths = React24__namespace.useRef([]);
|
|
3281
|
+
const itemRefs = React24__namespace.useRef([]);
|
|
3282
|
+
const [hidden, setHidden] = React24__namespace.useState(NONE);
|
|
3283
|
+
const fit = React24__namespace.useCallback(() => {
|
|
3166
3284
|
const el = containerEl.current;
|
|
3167
3285
|
if (!el || !enabled) {
|
|
3168
3286
|
setHidden((prev) => prev === NONE ? prev : NONE);
|
|
@@ -3191,12 +3309,12 @@ function useOverflowItems({
|
|
|
3191
3309
|
}
|
|
3192
3310
|
setHidden((prev) => same(prev, next) ? prev : next);
|
|
3193
3311
|
}, [count, enabled, pinnedIndex, reserve]);
|
|
3194
|
-
|
|
3312
|
+
React24__namespace.useLayoutEffect(() => {
|
|
3195
3313
|
widths.current = [];
|
|
3196
3314
|
itemEls.current.length = count;
|
|
3197
3315
|
setHidden((prev) => prev === NONE ? prev : NONE);
|
|
3198
3316
|
}, [count]);
|
|
3199
|
-
|
|
3317
|
+
React24__namespace.useLayoutEffect(() => {
|
|
3200
3318
|
fit();
|
|
3201
3319
|
if (!enabled || typeof ResizeObserver === "undefined") return;
|
|
3202
3320
|
const observer = new ResizeObserver(() => fit());
|
|
@@ -3204,10 +3322,10 @@ function useOverflowItems({
|
|
|
3204
3322
|
for (const item of itemEls.current) if (item) observer.observe(item);
|
|
3205
3323
|
return () => observer.disconnect();
|
|
3206
3324
|
}, [fit, enabled, hidden]);
|
|
3207
|
-
const containerRef =
|
|
3325
|
+
const containerRef = React24__namespace.useCallback((el) => {
|
|
3208
3326
|
containerEl.current = el;
|
|
3209
3327
|
}, []);
|
|
3210
|
-
const itemRef =
|
|
3328
|
+
const itemRef = React24__namespace.useCallback((index) => {
|
|
3211
3329
|
let fn = itemRefs.current[index];
|
|
3212
3330
|
if (!fn) {
|
|
3213
3331
|
fn = (el) => {
|
|
@@ -3217,7 +3335,7 @@ function useOverflowItems({
|
|
|
3217
3335
|
}
|
|
3218
3336
|
return fn;
|
|
3219
3337
|
}, []);
|
|
3220
|
-
const isHidden =
|
|
3338
|
+
const isHidden = React24__namespace.useCallback(
|
|
3221
3339
|
(index) => hidden.includes(index),
|
|
3222
3340
|
[hidden]
|
|
3223
3341
|
);
|
|
@@ -3270,15 +3388,15 @@ var NavItems = ({
|
|
|
3270
3388
|
const isVertical = orientation === "vertical";
|
|
3271
3389
|
const isTabs = selectionMode === "tabs";
|
|
3272
3390
|
const V = VARIANT[variant];
|
|
3273
|
-
const [internalActive, setInternalActive] =
|
|
3391
|
+
const [internalActive, setInternalActive] = React24__namespace.default.useState(
|
|
3274
3392
|
null
|
|
3275
3393
|
);
|
|
3276
3394
|
const isControlled = activeKey !== void 0;
|
|
3277
3395
|
const currentKey = isControlled ? activeKey : internalActive;
|
|
3278
3396
|
const activeIndex = items.findIndex((item) => keyOf(item) === currentKey);
|
|
3279
|
-
const nodes =
|
|
3280
|
-
const pendingFocus =
|
|
3281
|
-
|
|
3397
|
+
const nodes = React24__namespace.default.useRef({});
|
|
3398
|
+
const pendingFocus = React24__namespace.default.useRef(null);
|
|
3399
|
+
React24__namespace.default.useEffect(() => {
|
|
3282
3400
|
const key = pendingFocus.current;
|
|
3283
3401
|
if (!key) return;
|
|
3284
3402
|
const node = nodes.current[key];
|
|
@@ -3291,7 +3409,7 @@ var NavItems = ({
|
|
|
3291
3409
|
enabled: overflow && !isVertical,
|
|
3292
3410
|
pinnedIndex: activeIndex >= 0 ? activeIndex : void 0
|
|
3293
3411
|
});
|
|
3294
|
-
const select =
|
|
3412
|
+
const select = React24__namespace.default.useCallback(
|
|
3295
3413
|
(item) => {
|
|
3296
3414
|
if (item.disabled) return;
|
|
3297
3415
|
const key = keyOf(item);
|
|
@@ -3361,6 +3479,7 @@ var NavItems = ({
|
|
|
3361
3479
|
}
|
|
3362
3480
|
);
|
|
3363
3481
|
const label = item.label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: item.labelClassName, children: item.label });
|
|
3482
|
+
const a11y = label ? {} : { "aria-label": item.name };
|
|
3364
3483
|
const badge = item.badge != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3365
3484
|
"span",
|
|
3366
3485
|
{
|
|
@@ -3400,6 +3519,7 @@ var NavItems = ({
|
|
|
3400
3519
|
{
|
|
3401
3520
|
ref: setNode,
|
|
3402
3521
|
...tabProps,
|
|
3522
|
+
...a11y,
|
|
3403
3523
|
style: item.style,
|
|
3404
3524
|
onClick: () => select(item),
|
|
3405
3525
|
className: itemClass,
|
|
@@ -3410,6 +3530,7 @@ var NavItems = ({
|
|
|
3410
3530
|
{
|
|
3411
3531
|
ref: setNode,
|
|
3412
3532
|
href: item.href,
|
|
3533
|
+
...a11y,
|
|
3413
3534
|
style: item.style,
|
|
3414
3535
|
onClick: () => select(item),
|
|
3415
3536
|
className: itemClass,
|
|
@@ -3422,6 +3543,7 @@ var NavItems = ({
|
|
|
3422
3543
|
type: "button",
|
|
3423
3544
|
disabled: item.disabled,
|
|
3424
3545
|
...tabProps,
|
|
3546
|
+
...a11y,
|
|
3425
3547
|
style: item.style,
|
|
3426
3548
|
onClick: () => {
|
|
3427
3549
|
if (hasMenu) item.onClick?.();
|
|
@@ -3435,7 +3557,7 @@ var NavItems = ({
|
|
|
3435
3557
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: hasMenu && !asCaret ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: control }) : control }),
|
|
3436
3558
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { side: item.tooltipSide || tooltipSide, children: item.tooltip || item.name })
|
|
3437
3559
|
] });
|
|
3438
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3560
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React24__namespace.default.Fragment, { children: [
|
|
3439
3561
|
hasMenu ? /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
3440
3562
|
withTooltip,
|
|
3441
3563
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3525,7 +3647,7 @@ function renderMenuRows(menuItems) {
|
|
|
3525
3647
|
const gutter = menuItems?.some((m) => m.icon);
|
|
3526
3648
|
return menuItems?.map((menuItem) => {
|
|
3527
3649
|
const MenuIcon = menuItem.icon;
|
|
3528
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3650
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React24__namespace.default.Fragment, { children: [
|
|
3529
3651
|
menuItem.separatorBefore && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
3530
3652
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3531
3653
|
DropdownMenuItem,
|
|
@@ -3844,7 +3966,7 @@ function ChatSessionDisclosure({
|
|
|
3844
3966
|
className,
|
|
3845
3967
|
contentClassName
|
|
3846
3968
|
}) {
|
|
3847
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
3969
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React24__namespace.useState(defaultOpen);
|
|
3848
3970
|
const isOpen = open ?? uncontrolledOpen;
|
|
3849
3971
|
const toggle = () => {
|
|
3850
3972
|
const next = !isOpen;
|
|
@@ -3975,7 +4097,7 @@ function ChatSessionContextChip({
|
|
|
3975
4097
|
"div",
|
|
3976
4098
|
{
|
|
3977
4099
|
className: cn(
|
|
3978
|
-
"flex min-h-[26px] items-center gap-1.5 border border-border bg-muted/40 px-1.5 text-
|
|
4100
|
+
"flex min-h-[26px] items-center gap-1.5 border border-border bg-muted/40 px-1.5 text-sm",
|
|
3979
4101
|
className
|
|
3980
4102
|
),
|
|
3981
4103
|
...props,
|
|
@@ -3996,9 +4118,9 @@ function ChatSessionContextChip({
|
|
|
3996
4118
|
}
|
|
3997
4119
|
);
|
|
3998
4120
|
}
|
|
3999
|
-
var CitationList =
|
|
4121
|
+
var CitationList = React24__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("ul", { ref, className: cn("flex flex-col", className), ...props, children }));
|
|
4000
4122
|
CitationList.displayName = "CitationList";
|
|
4001
|
-
var CitationRow =
|
|
4123
|
+
var CitationRow = React24__namespace.forwardRef(
|
|
4002
4124
|
({ kind, source, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4003
4125
|
"li",
|
|
4004
4126
|
{
|
|
@@ -4006,15 +4128,15 @@ var CitationRow = React23__namespace.forwardRef(
|
|
|
4006
4128
|
className: cn("flex min-h-[26px] items-center gap-2 py-0.5", className),
|
|
4007
4129
|
...props,
|
|
4008
4130
|
children: [
|
|
4009
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 border border-border px-1 text-
|
|
4131
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 border border-border px-1 text-sm text-muted-foreground", children: kind }),
|
|
4010
4132
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", children }),
|
|
4011
|
-
source != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-
|
|
4133
|
+
source != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: source }) : null
|
|
4012
4134
|
]
|
|
4013
4135
|
}
|
|
4014
4136
|
)
|
|
4015
4137
|
);
|
|
4016
4138
|
CitationRow.displayName = "CitationRow";
|
|
4017
|
-
var ClampedText =
|
|
4139
|
+
var ClampedText = React24__namespace.forwardRef(
|
|
4018
4140
|
({
|
|
4019
4141
|
lines = 3,
|
|
4020
4142
|
moreLabel = "Show more",
|
|
@@ -4023,10 +4145,10 @@ var ClampedText = React23__namespace.forwardRef(
|
|
|
4023
4145
|
children,
|
|
4024
4146
|
...props
|
|
4025
4147
|
}, ref) => {
|
|
4026
|
-
const [expanded, setExpanded] =
|
|
4027
|
-
const [clipped, setClipped] =
|
|
4028
|
-
const bodyRef =
|
|
4029
|
-
|
|
4148
|
+
const [expanded, setExpanded] = React24__namespace.useState(false);
|
|
4149
|
+
const [clipped, setClipped] = React24__namespace.useState(false);
|
|
4150
|
+
const bodyRef = React24__namespace.useRef(null);
|
|
4151
|
+
React24__namespace.useLayoutEffect(() => {
|
|
4030
4152
|
const el = bodyRef.current;
|
|
4031
4153
|
if (!el || expanded) return;
|
|
4032
4154
|
const measure = () => setClipped(el.scrollHeight - el.clientHeight > 1);
|
|
@@ -4064,7 +4186,7 @@ var ClampedText = React23__namespace.forwardRef(
|
|
|
4064
4186
|
}
|
|
4065
4187
|
);
|
|
4066
4188
|
ClampedText.displayName = "ClampedText";
|
|
4067
|
-
var ClarifyCard =
|
|
4189
|
+
var ClarifyCard = React24__namespace.forwardRef(
|
|
4068
4190
|
({
|
|
4069
4191
|
step,
|
|
4070
4192
|
waiting,
|
|
@@ -4077,7 +4199,7 @@ var ClarifyCard = React23__namespace.forwardRef(
|
|
|
4077
4199
|
className,
|
|
4078
4200
|
...props
|
|
4079
4201
|
}, ref) => {
|
|
4080
|
-
const name =
|
|
4202
|
+
const name = React24__namespace.useId();
|
|
4081
4203
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4082
4204
|
"div",
|
|
4083
4205
|
{
|
|
@@ -4085,7 +4207,7 @@ var ClarifyCard = React23__namespace.forwardRef(
|
|
|
4085
4207
|
className: cn("flex flex-col overflow-hidden border border-border bg-card", className),
|
|
4086
4208
|
...props,
|
|
4087
4209
|
children: [
|
|
4088
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-6 shrink-0 items-center gap-2 border-b border-border bg-muted/40 px-2 text-
|
|
4210
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-6 shrink-0 items-center gap-2 border-b border-border bg-muted/40 px-2 text-sm", children: [
|
|
4089
4211
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-medium", children: "question" }),
|
|
4090
4212
|
step != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-muted-foreground", children: step }) : null,
|
|
4091
4213
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1" }),
|
|
@@ -4128,7 +4250,7 @@ var ClarifyCard = React23__namespace.forwardRef(
|
|
|
4128
4250
|
}
|
|
4129
4251
|
),
|
|
4130
4252
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate", children: o.label }),
|
|
4131
|
-
o.detail != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-mono text-
|
|
4253
|
+
o.detail != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-mono text-sm text-muted-foreground", children: o.detail }) : null
|
|
4132
4254
|
]
|
|
4133
4255
|
},
|
|
4134
4256
|
o.value
|
|
@@ -4136,7 +4258,7 @@ var ClarifyCard = React23__namespace.forwardRef(
|
|
|
4136
4258
|
}) }),
|
|
4137
4259
|
actions || footnote != null ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
4138
4260
|
actions,
|
|
4139
|
-
footnote != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-
|
|
4261
|
+
footnote != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm text-muted-foreground", children: footnote }) : null
|
|
4140
4262
|
] }) : null
|
|
4141
4263
|
] })
|
|
4142
4264
|
]
|
|
@@ -4145,13 +4267,13 @@ var ClarifyCard = React23__namespace.forwardRef(
|
|
|
4145
4267
|
}
|
|
4146
4268
|
);
|
|
4147
4269
|
ClarifyCard.displayName = "ClarifyCard";
|
|
4148
|
-
var ContextBar =
|
|
4270
|
+
var ContextBar = React24__namespace.forwardRef(
|
|
4149
4271
|
({ counters, hint, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4150
4272
|
"div",
|
|
4151
4273
|
{
|
|
4152
4274
|
ref,
|
|
4153
4275
|
className: cn(
|
|
4154
|
-
"flex h-7 shrink-0 items-center gap-3 border-t border-border px-2 text-
|
|
4276
|
+
"flex h-7 shrink-0 items-center gap-3 border-t border-border px-2 text-sm",
|
|
4155
4277
|
className
|
|
4156
4278
|
),
|
|
4157
4279
|
...props,
|
|
@@ -4164,22 +4286,22 @@ var ContextBar = React23__namespace.forwardRef(
|
|
|
4164
4286
|
)
|
|
4165
4287
|
);
|
|
4166
4288
|
ContextBar.displayName = "ContextBar";
|
|
4167
|
-
var DiagnosisCard =
|
|
4289
|
+
var DiagnosisCard = React24__namespace.forwardRef(({ code, attempted, target, actions, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4168
4290
|
"div",
|
|
4169
4291
|
{
|
|
4170
4292
|
ref,
|
|
4171
4293
|
className: cn("flex flex-col gap-2 border border-destructive/40 bg-card p-2", className),
|
|
4172
4294
|
...props,
|
|
4173
4295
|
children: [
|
|
4174
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-
|
|
4296
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
4175
4297
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-medium text-destructive", children: "diagnosis" }),
|
|
4176
4298
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-mono text-muted-foreground", children: code })
|
|
4177
4299
|
] }),
|
|
4178
4300
|
children != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { children }) : null,
|
|
4179
4301
|
attempted != null || target != null ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 border border-border bg-muted/40 p-1.5", children: [
|
|
4180
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
4181
|
-
attempted != null ? /* @__PURE__ */ jsxRuntime.jsx("code", { className: "whitespace-pre-wrap break-all font-mono text-
|
|
4182
|
-
target != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
4302
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "what was tried" }),
|
|
4303
|
+
attempted != null ? /* @__PURE__ */ jsxRuntime.jsx("code", { className: "whitespace-pre-wrap break-all font-mono text-sm", children: attempted }) : null,
|
|
4304
|
+
target != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: target }) : null
|
|
4183
4305
|
] }) : null,
|
|
4184
4306
|
actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5", children: actions }) : null
|
|
4185
4307
|
]
|
|
@@ -4192,19 +4314,19 @@ var OP_CLASS = {
|
|
|
4192
4314
|
remove: "text-destructive",
|
|
4193
4315
|
change: "text-warning"
|
|
4194
4316
|
};
|
|
4195
|
-
var DiffList =
|
|
4317
|
+
var DiffList = React24__namespace.forwardRef(
|
|
4196
4318
|
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("ul", { ref, className: cn("flex flex-col", className), ...props, children })
|
|
4197
4319
|
);
|
|
4198
4320
|
DiffList.displayName = "DiffList";
|
|
4199
|
-
var DiffRow =
|
|
4321
|
+
var DiffRow = React24__namespace.forwardRef(
|
|
4200
4322
|
({ op = "add", kind, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4201
4323
|
"li",
|
|
4202
4324
|
{
|
|
4203
4325
|
ref,
|
|
4204
|
-
className: cn("flex items-baseline gap-2 py-0.5 text-
|
|
4326
|
+
className: cn("flex items-baseline gap-2 py-0.5 text-sm", className),
|
|
4205
4327
|
...props,
|
|
4206
4328
|
children: [
|
|
4207
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("w-3 shrink-0 text-center font-mono", OP_CLASS[op]), children: OP_SIGN[op] }),
|
|
4329
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("w-3 shrink-0 text-center font-mono", OP_CLASS[op] ?? "text-muted-foreground"), children: OP_SIGN[op] }),
|
|
4208
4330
|
kind != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-muted-foreground", children: kind }) : null,
|
|
4209
4331
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1", children })
|
|
4210
4332
|
]
|
|
@@ -4212,7 +4334,7 @@ var DiffRow = React23__namespace.forwardRef(
|
|
|
4212
4334
|
)
|
|
4213
4335
|
);
|
|
4214
4336
|
DiffRow.displayName = "DiffRow";
|
|
4215
|
-
var DivergingBar =
|
|
4337
|
+
var DivergingBar = React24__namespace.forwardRef(
|
|
4216
4338
|
({
|
|
4217
4339
|
data,
|
|
4218
4340
|
max,
|
|
@@ -4225,7 +4347,7 @@ var DivergingBar = React23__namespace.forwardRef(
|
|
|
4225
4347
|
}, ref) => {
|
|
4226
4348
|
const ceiling = max ?? (Math.max(...data.map((d) => Math.abs(d.value)), 0) || 1);
|
|
4227
4349
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
4228
|
-
caption != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
4350
|
+
caption != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: caption }) : null,
|
|
4229
4351
|
data.map((d, i) => {
|
|
4230
4352
|
const positive = d.value >= 0;
|
|
4231
4353
|
const width = `${Math.abs(d.value) / ceiling * 50}%`;
|
|
@@ -4233,7 +4355,7 @@ var DivergingBar = React23__namespace.forwardRef(
|
|
|
4233
4355
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4234
4356
|
"span",
|
|
4235
4357
|
{
|
|
4236
|
-
className: "shrink-0 truncate text-
|
|
4358
|
+
className: "shrink-0 truncate text-sm text-muted-foreground",
|
|
4237
4359
|
style: { width: labelWidth },
|
|
4238
4360
|
children: d.label
|
|
4239
4361
|
}
|
|
@@ -4263,19 +4385,57 @@ var DivergingBar = React23__namespace.forwardRef(
|
|
|
4263
4385
|
}
|
|
4264
4386
|
) : null })
|
|
4265
4387
|
] }),
|
|
4266
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-8 shrink-0 text-right text-
|
|
4388
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-8 shrink-0 text-right text-sm tabular-nums", children: d.display ?? (d.value > 0 ? `+${d.value}` : d.value) })
|
|
4267
4389
|
] }, i);
|
|
4268
4390
|
})
|
|
4269
4391
|
] });
|
|
4270
4392
|
}
|
|
4271
4393
|
);
|
|
4272
4394
|
DivergingBar.displayName = "DivergingBar";
|
|
4273
|
-
var
|
|
4395
|
+
var EgressList = React24__namespace.forwardRef(
|
|
4396
|
+
({ to, classes = [], cut = [], className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4397
|
+
"div",
|
|
4398
|
+
{
|
|
4399
|
+
ref,
|
|
4400
|
+
className: cn("flex min-w-0 flex-col gap-1", className),
|
|
4401
|
+
...props,
|
|
4402
|
+
children: [
|
|
4403
|
+
/* @__PURE__ */ jsxRuntime.jsx(AddressChip, { address: to }),
|
|
4404
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5 pl-3", children: [
|
|
4405
|
+
classes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-destructive", children: "nothing may be sent" }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-wrap items-center gap-1 text-sm text-muted-foreground", children: [
|
|
4406
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: "may send" }),
|
|
4407
|
+
classes.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4408
|
+
"span",
|
|
4409
|
+
{
|
|
4410
|
+
className: "rounded-control bg-muted px-1 font-mono text-foreground",
|
|
4411
|
+
children: c
|
|
4412
|
+
},
|
|
4413
|
+
c
|
|
4414
|
+
))
|
|
4415
|
+
] }),
|
|
4416
|
+
cut.length ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-wrap items-center gap-1 text-sm text-muted-foreground", children: [
|
|
4417
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: "cut" }),
|
|
4418
|
+
cut.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4419
|
+
"span",
|
|
4420
|
+
{
|
|
4421
|
+
className: "rounded-control bg-muted px-1 font-mono text-destructive line-through decoration-destructive/50",
|
|
4422
|
+
children: c
|
|
4423
|
+
},
|
|
4424
|
+
c
|
|
4425
|
+
))
|
|
4426
|
+
] }) : null
|
|
4427
|
+
] })
|
|
4428
|
+
]
|
|
4429
|
+
}
|
|
4430
|
+
)
|
|
4431
|
+
);
|
|
4432
|
+
EgressList.displayName = "EgressList";
|
|
4433
|
+
var EmissionHeader = React24__namespace.forwardRef(({ kind, template, citation, note, actions, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4274
4434
|
"div",
|
|
4275
4435
|
{
|
|
4276
4436
|
ref,
|
|
4277
4437
|
className: cn(
|
|
4278
|
-
"flex h-6 shrink-0 items-center gap-2 border-b border-border bg-muted/40 px-2 text-
|
|
4438
|
+
"flex h-6 shrink-0 items-center gap-2 border-b border-border bg-muted/40 px-2 text-sm",
|
|
4279
4439
|
className
|
|
4280
4440
|
),
|
|
4281
4441
|
...props,
|
|
@@ -4290,7 +4450,7 @@ var EmissionHeader = React23__namespace.forwardRef(({ kind, template, citation,
|
|
|
4290
4450
|
}
|
|
4291
4451
|
));
|
|
4292
4452
|
EmissionHeader.displayName = "EmissionHeader";
|
|
4293
|
-
var EmissionCard =
|
|
4453
|
+
var EmissionCard = React24__namespace.forwardRef(
|
|
4294
4454
|
({
|
|
4295
4455
|
kind,
|
|
4296
4456
|
template,
|
|
@@ -4325,7 +4485,7 @@ var EmissionCard = React23__namespace.forwardRef(
|
|
|
4325
4485
|
)
|
|
4326
4486
|
);
|
|
4327
4487
|
EmissionCard.displayName = "EmissionCard";
|
|
4328
|
-
var CitationMarker =
|
|
4488
|
+
var CitationMarker = React24__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4329
4489
|
"sup",
|
|
4330
4490
|
{
|
|
4331
4491
|
ref,
|
|
@@ -4335,7 +4495,7 @@ var CitationMarker = React23__namespace.forwardRef(({ className, children, ...pr
|
|
|
4335
4495
|
}
|
|
4336
4496
|
));
|
|
4337
4497
|
CitationMarker.displayName = "CitationMarker";
|
|
4338
|
-
var EmptyState =
|
|
4498
|
+
var EmptyState = React24__namespace.forwardRef(
|
|
4339
4499
|
({ icon, title, description, actions, locks, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4340
4500
|
"div",
|
|
4341
4501
|
{
|
|
@@ -4356,12 +4516,12 @@ var EmptyState = React23__namespace.forwardRef(
|
|
|
4356
4516
|
)
|
|
4357
4517
|
);
|
|
4358
4518
|
EmptyState.displayName = "EmptyState";
|
|
4359
|
-
var EmptyStateLock =
|
|
4519
|
+
var EmptyStateLock = React24__namespace.forwardRef(({ icon, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4360
4520
|
"span",
|
|
4361
4521
|
{
|
|
4362
4522
|
ref,
|
|
4363
4523
|
className: cn(
|
|
4364
|
-
"inline-flex h-6 items-center gap-1.5 border border-dashed border-border px-2 text-
|
|
4524
|
+
"inline-flex h-6 items-center gap-1.5 border border-dashed border-border px-2 text-sm text-muted-foreground [&_svg]:size-3",
|
|
4365
4525
|
className
|
|
4366
4526
|
),
|
|
4367
4527
|
...props,
|
|
@@ -4372,7 +4532,7 @@ var EmptyStateLock = React23__namespace.forwardRef(({ icon, className, children,
|
|
|
4372
4532
|
}
|
|
4373
4533
|
));
|
|
4374
4534
|
EmptyStateLock.displayName = "EmptyStateLock";
|
|
4375
|
-
var ErrorBoundary = class extends
|
|
4535
|
+
var ErrorBoundary = class extends React24.Component {
|
|
4376
4536
|
constructor(props) {
|
|
4377
4537
|
super(props);
|
|
4378
4538
|
this.state = { hasError: false };
|
|
@@ -4393,7 +4553,28 @@ var ErrorBoundary = class extends React23.Component {
|
|
|
4393
4553
|
return this.props.children;
|
|
4394
4554
|
}
|
|
4395
4555
|
};
|
|
4396
|
-
var
|
|
4556
|
+
var Eyebrow = React24__namespace.forwardRef(
|
|
4557
|
+
({ aside, tone = "muted", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4558
|
+
"div",
|
|
4559
|
+
{
|
|
4560
|
+
ref,
|
|
4561
|
+
className: cn(
|
|
4562
|
+
"flex items-baseline gap-2 text-sm font-semibold uppercase tracking-wide",
|
|
4563
|
+
tone === "muted" && "text-muted-foreground",
|
|
4564
|
+
tone === "foreground" && "text-foreground",
|
|
4565
|
+
tone === "accent" && "text-primary",
|
|
4566
|
+
className
|
|
4567
|
+
),
|
|
4568
|
+
...props,
|
|
4569
|
+
children: [
|
|
4570
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children }),
|
|
4571
|
+
aside != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto shrink-0 font-normal normal-case tracking-normal text-muted-foreground", children: aside }) : null
|
|
4572
|
+
]
|
|
4573
|
+
}
|
|
4574
|
+
)
|
|
4575
|
+
);
|
|
4576
|
+
Eyebrow.displayName = "Eyebrow";
|
|
4577
|
+
var FilterBar = React24__namespace.forwardRef(
|
|
4397
4578
|
({ summary, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4398
4579
|
"div",
|
|
4399
4580
|
{
|
|
@@ -4406,13 +4587,13 @@ var FilterBar = React23__namespace.forwardRef(
|
|
|
4406
4587
|
children: [
|
|
4407
4588
|
children,
|
|
4408
4589
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1" }),
|
|
4409
|
-
summary != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-
|
|
4590
|
+
summary != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: summary }) : null
|
|
4410
4591
|
]
|
|
4411
4592
|
}
|
|
4412
4593
|
)
|
|
4413
4594
|
);
|
|
4414
4595
|
FilterBar.displayName = "FilterBar";
|
|
4415
|
-
var FilterChip =
|
|
4596
|
+
var FilterChip = React24__namespace.forwardRef(
|
|
4416
4597
|
({ label, value, active, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4417
4598
|
Button,
|
|
4418
4599
|
{
|
|
@@ -4436,9 +4617,9 @@ var FilterChip = React23__namespace.forwardRef(
|
|
|
4436
4617
|
)
|
|
4437
4618
|
);
|
|
4438
4619
|
FilterChip.displayName = "FilterChip";
|
|
4439
|
-
var HeatStrip =
|
|
4620
|
+
var HeatStrip = React24__namespace.forwardRef(
|
|
4440
4621
|
({ cells, states, ticks, cellSize = 14, className, ...props }, ref) => {
|
|
4441
|
-
const byKey =
|
|
4622
|
+
const byKey = React24__namespace.useMemo(
|
|
4442
4623
|
() => new Map(states.map((s) => [s.key, s])),
|
|
4443
4624
|
[states]
|
|
4444
4625
|
);
|
|
@@ -4465,14 +4646,14 @@ var HeatStrip = React23__namespace.forwardRef(
|
|
|
4465
4646
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4466
4647
|
"span",
|
|
4467
4648
|
{
|
|
4468
|
-
className: "shrink-0 text-
|
|
4649
|
+
className: "shrink-0 text-sm tabular-nums text-muted-foreground",
|
|
4469
4650
|
style: { width: cellSize },
|
|
4470
4651
|
children: tick ? tick.label : ""
|
|
4471
4652
|
},
|
|
4472
4653
|
i
|
|
4473
4654
|
);
|
|
4474
4655
|
}) }) : null,
|
|
4475
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-
|
|
4656
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm", children: states.map((s) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1.5", children: [
|
|
4476
4657
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4477
4658
|
"span",
|
|
4478
4659
|
{
|
|
@@ -4490,125 +4671,903 @@ var HeatStrip = React23__namespace.forwardRef(
|
|
|
4490
4671
|
}
|
|
4491
4672
|
);
|
|
4492
4673
|
HeatStrip.displayName = "HeatStrip";
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4674
|
+
var layerLabel = (layer) => layer.replace(/_/g, " ");
|
|
4675
|
+
var UNPAINTED2 = {
|
|
4676
|
+
swatch: "bg-muted-foreground",
|
|
4677
|
+
// Edge only, no ground: a bar's identity is its rail and its address, and a
|
|
4678
|
+
// wash under every bar turns a track into a stack of coloured blocks. A
|
|
4679
|
+
// consumer that wants the ground says so in its own `tint`.
|
|
4680
|
+
tint: "border-border",
|
|
4681
|
+
// Unpainted type is ordinary type. A muted address would say *subordinate*,
|
|
4682
|
+
// which is not what "nobody gave this layer a colour" means.
|
|
4683
|
+
text: "text-foreground"
|
|
4684
|
+
};
|
|
4685
|
+
var layerPaint = (palette, layer) => ({ ...UNPAINTED2, ...palette?.[layer] });
|
|
4686
|
+
var LayerChip = React24__namespace.forwardRef(
|
|
4687
|
+
({ layer, count, label, dim, swatch, palette, className, ...props }, ref) => {
|
|
4688
|
+
const paint = layerPaint(palette, layer);
|
|
4689
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4497
4690
|
"span",
|
|
4498
4691
|
{
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4692
|
+
ref,
|
|
4693
|
+
className: cn(
|
|
4694
|
+
// A layer is a **name**, not an address. `graph data` has a space in
|
|
4695
|
+
// it — it is already prose — so it takes the body face at the root
|
|
4696
|
+
// size, and mono is reserved for the thing that really is an address
|
|
4697
|
+
// (`model/Orders@v2` on the row below it). Small muted bold mono made
|
|
4698
|
+
// a row heading look like a technical footnote.
|
|
4699
|
+
"inline-flex max-w-full shrink-0 items-center gap-1.5",
|
|
4700
|
+
dim ? "text-muted-foreground/70" : "text-foreground",
|
|
4701
|
+
className
|
|
4702
|
+
),
|
|
4703
|
+
...props,
|
|
4704
|
+
children: [
|
|
4705
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4706
|
+
"span",
|
|
4707
|
+
{
|
|
4708
|
+
"aria-hidden": true,
|
|
4709
|
+
className: cn(
|
|
4710
|
+
"size-1.5 shrink-0",
|
|
4711
|
+
dim ? "bg-muted-foreground/50" : swatch ?? paint.swatch
|
|
4712
|
+
)
|
|
4713
|
+
}
|
|
4714
|
+
),
|
|
4715
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: label ?? layerLabel(layer) }),
|
|
4716
|
+
count != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-sm tabular-nums text-muted-foreground", children: count }) : null
|
|
4717
|
+
]
|
|
4502
4718
|
}
|
|
4503
4719
|
);
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4720
|
+
}
|
|
4721
|
+
);
|
|
4722
|
+
LayerChip.displayName = "LayerChip";
|
|
4723
|
+
var LayerSection = React24__namespace.forwardRef(
|
|
4724
|
+
({ layer, summary, count, dim, palette, className, children, ...props }, ref) => {
|
|
4725
|
+
const empty = React24__namespace.Children.count(children) === 0;
|
|
4726
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4727
|
+
"section",
|
|
4507
4728
|
{
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4729
|
+
ref,
|
|
4730
|
+
className: cn("flex min-w-0 flex-col gap-1", className),
|
|
4731
|
+
...props,
|
|
4732
|
+
children: [
|
|
4733
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-baseline gap-2 border-b border-border pb-1", children: [
|
|
4734
|
+
/* @__PURE__ */ jsxRuntime.jsx(LayerChip, { layer, count, dim, palette }),
|
|
4735
|
+
summary != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto min-w-0 shrink truncate text-sm text-muted-foreground", children: summary }) : null
|
|
4736
|
+
] }),
|
|
4737
|
+
empty ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 py-1 text-sm text-muted-foreground/70", children: "no rules in this layer" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex min-w-0 flex-col", dim && "opacity-60"), children })
|
|
4738
|
+
]
|
|
4511
4739
|
}
|
|
4512
4740
|
);
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4741
|
+
}
|
|
4742
|
+
);
|
|
4743
|
+
LayerSection.displayName = "LayerSection";
|
|
4744
|
+
var STATE_LABEL = {
|
|
4745
|
+
declared: "declared",
|
|
4746
|
+
out: "sent",
|
|
4747
|
+
in: "read",
|
|
4748
|
+
refused: "refused",
|
|
4749
|
+
skipped: "skipped"
|
|
4750
|
+
};
|
|
4751
|
+
var STATE_BAR = {
|
|
4752
|
+
declared: "border-dashed",
|
|
4753
|
+
out: "",
|
|
4754
|
+
in: "",
|
|
4755
|
+
refused: "border-destructive bg-background",
|
|
4756
|
+
skipped: "border-dashed opacity-60"
|
|
4757
|
+
};
|
|
4758
|
+
var stateLabel = (state) => STATE_LABEL[state] ?? state;
|
|
4759
|
+
var formatElapsed = (ms) => {
|
|
4760
|
+
if (ms < 1e3) return `${Math.round(ms)}ms`;
|
|
4761
|
+
if (ms < 6e4) return `${(ms / 1e3).toFixed(ms < 1e4 ? 1 : 0)}s`;
|
|
4762
|
+
const m = Math.floor(ms / 6e4);
|
|
4763
|
+
return `${m}m ${Math.round(ms % 6e4 / 1e3)}s`;
|
|
4764
|
+
};
|
|
4765
|
+
var LayerStrip = React24__namespace.forwardRef(
|
|
4766
|
+
({
|
|
4767
|
+
bands,
|
|
4768
|
+
items,
|
|
4769
|
+
scale = "seq",
|
|
4770
|
+
domain,
|
|
4771
|
+
ticks,
|
|
4772
|
+
formatTick,
|
|
4773
|
+
brackets,
|
|
4774
|
+
seams,
|
|
4775
|
+
onSelectItem,
|
|
4776
|
+
selectedItem,
|
|
4777
|
+
hoverDetail = true,
|
|
4778
|
+
itemDetail,
|
|
4779
|
+
defaultCollapsed,
|
|
4780
|
+
collapsed,
|
|
4781
|
+
onCollapsedChange,
|
|
4782
|
+
collapsible = true,
|
|
4783
|
+
frozenLabels = true,
|
|
4784
|
+
labelWidth = 15.5,
|
|
4785
|
+
minTrackWidth = 26,
|
|
4786
|
+
minSlotWidth = 6,
|
|
4787
|
+
palette,
|
|
4788
|
+
className,
|
|
4789
|
+
...props
|
|
4790
|
+
}, ref) => {
|
|
4791
|
+
const [ownCollapsed, setOwnCollapsed] = React24__namespace.useState(
|
|
4792
|
+
defaultCollapsed ?? []
|
|
4793
|
+
);
|
|
4794
|
+
const shut = collapsed ?? ownCollapsed;
|
|
4795
|
+
const setShut = (next) => {
|
|
4796
|
+
if (collapsed == null) setOwnCollapsed(next);
|
|
4797
|
+
onCollapsedChange?.(next);
|
|
4798
|
+
};
|
|
4799
|
+
const withParts = bands.filter((b) => (b.parts?.length ?? 0) > 0);
|
|
4800
|
+
const allShut = withParts.length > 0 && withParts.every((b) => shut.includes(b.layer));
|
|
4801
|
+
const ends = items.map((i) => i.end ?? i.start + (scale === "seq" ? 1 : 0));
|
|
4802
|
+
const starts = items.map((i) => i.start);
|
|
4803
|
+
const d0 = domain?.[0] ?? (starts.length ? Math.min(...starts) : 0);
|
|
4804
|
+
const d1 = domain?.[1] ?? (ends.length ? Math.max(...ends) : d0 + 1);
|
|
4805
|
+
const span = d1 - d0 || 1;
|
|
4806
|
+
const pct = (value) => (value - d0) / span * 100;
|
|
4807
|
+
const axisTicks = ticks ?? (scale === "seq" ? Array.from({ length: Math.ceil(span) }, (_, n) => d0 + n) : Array.from({ length: 5 }, (_, n) => d0 + span / 4 * n));
|
|
4808
|
+
const tickLabel = formatTick ?? ((value) => scale === "seq" ? `${Math.round(value)}` : formatElapsed(value - d0));
|
|
4809
|
+
const label = (content, extra, indent, dim) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4810
|
+
"div",
|
|
4518
4811
|
{
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4812
|
+
style: { width: `${labelWidth}rem` },
|
|
4813
|
+
className: cn(
|
|
4814
|
+
"flex shrink-0 items-center gap-2 border-border border-r px-2.5 py-1.5",
|
|
4815
|
+
// A frozen label is normally opaque, or the bars it is parked over
|
|
4816
|
+
// would scroll through it. A dim row has no bars — that is what dim
|
|
4817
|
+
// means — so it can go transparent and let the row's own muted ground
|
|
4818
|
+
// run the full width. Without this the label column paints `bg-card`
|
|
4819
|
+
// straight over the tint and only the empty track reads as unspent,
|
|
4820
|
+
// which is the half a reader is least likely to look at.
|
|
4821
|
+
dim ? "bg-transparent" : "bg-card",
|
|
4822
|
+
indent && "pl-5",
|
|
4823
|
+
frozenLabels && "sticky left-0 z-10",
|
|
4824
|
+
extra
|
|
4825
|
+
),
|
|
4826
|
+
children: content
|
|
4522
4827
|
}
|
|
4523
4828
|
);
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
"aria-hidden": true,
|
|
4528
|
-
style,
|
|
4529
|
-
className: "w-4 shrink-0 overflow-visible",
|
|
4530
|
-
viewBox: "0 0 16 6",
|
|
4531
|
-
height: "6",
|
|
4532
|
-
fill: "none",
|
|
4533
|
-
children: [
|
|
4534
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 3h11", stroke: "currentColor", strokeWidth: "2" }),
|
|
4535
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 0l6 3-6 3z", fill: "currentColor" })
|
|
4536
|
-
]
|
|
4537
|
-
}
|
|
4538
|
-
);
|
|
4539
|
-
}
|
|
4540
|
-
var Legend = React23__namespace.forwardRef(
|
|
4541
|
-
({ orientation = "row", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4542
|
-
"div",
|
|
4543
|
-
{
|
|
4544
|
-
ref,
|
|
4545
|
-
role: "list",
|
|
4546
|
-
className: cn(
|
|
4547
|
-
"flex gap-x-3 gap-y-1 text-meta",
|
|
4548
|
-
orientation === "row" ? "flex-wrap items-center" : "flex-col",
|
|
4549
|
-
className
|
|
4550
|
-
),
|
|
4551
|
-
...props,
|
|
4552
|
-
children
|
|
4553
|
-
}
|
|
4554
|
-
)
|
|
4555
|
-
);
|
|
4556
|
-
Legend.displayName = "Legend";
|
|
4557
|
-
var LegendItem = React23__namespace.forwardRef(
|
|
4558
|
-
({ kind, color, label, count, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4559
|
-
"div",
|
|
4560
|
-
{
|
|
4561
|
-
ref,
|
|
4562
|
-
role: "listitem",
|
|
4563
|
-
className: cn("flex min-w-0 items-center gap-1.5", className),
|
|
4564
|
-
...props,
|
|
4565
|
-
children: [
|
|
4566
|
-
/* @__PURE__ */ jsxRuntime.jsx(Swatch, { kind, color }),
|
|
4567
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: label }),
|
|
4568
|
-
count != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-muted-foreground", children: count }) : null
|
|
4569
|
-
]
|
|
4570
|
-
}
|
|
4571
|
-
)
|
|
4572
|
-
);
|
|
4573
|
-
LegendItem.displayName = "LegendItem";
|
|
4574
|
-
var MenuItem = ({
|
|
4575
|
-
label,
|
|
4576
|
-
icon: Icon,
|
|
4577
|
-
shortcut,
|
|
4578
|
-
children,
|
|
4579
|
-
className,
|
|
4580
|
-
level = 0,
|
|
4581
|
-
href,
|
|
4582
|
-
onClick
|
|
4583
|
-
}) => {
|
|
4584
|
-
const hasChildren = children && children.length > 0;
|
|
4585
|
-
const ButtonOrLink = href ? "a" : "button";
|
|
4586
|
-
const clickTrigger = href ? { href } : { onClick };
|
|
4587
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "relative group/item", children: [
|
|
4588
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4589
|
-
ButtonOrLink,
|
|
4829
|
+
const trackFloor = Math.max(minTrackWidth, axisTicks.length * minSlotWidth);
|
|
4830
|
+
const row = (key, head, track, dim) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4831
|
+
"div",
|
|
4590
4832
|
{
|
|
4591
|
-
...clickTrigger,
|
|
4592
4833
|
className: cn(
|
|
4593
|
-
"flex
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
level === 0 ? "font-medium" : "font-normal"
|
|
4598
|
-
// "group-hover/item:bg-accent/50"
|
|
4834
|
+
"flex min-h-12 border-border border-b last:border-b-0",
|
|
4835
|
+
// Muting the text alone said *this row is quiet*; the row has to say
|
|
4836
|
+
// *nothing spends this layer*, which is a band, not a weight.
|
|
4837
|
+
dim && "bg-muted/60"
|
|
4599
4838
|
),
|
|
4600
|
-
role: hasChildren ? "menuitem" : void 0,
|
|
4601
|
-
"aria-haspopup": hasChildren ? "true" : void 0,
|
|
4602
|
-
"aria-expanded": hasChildren ? "true" : void 0,
|
|
4603
4839
|
children: [
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4840
|
+
head,
|
|
4841
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4842
|
+
"div",
|
|
4843
|
+
{
|
|
4844
|
+
style: { minWidth: `${trackFloor}rem` },
|
|
4845
|
+
className: "relative min-w-0 flex-1",
|
|
4846
|
+
children: track
|
|
4847
|
+
}
|
|
4848
|
+
)
|
|
4849
|
+
]
|
|
4850
|
+
},
|
|
4851
|
+
key
|
|
4852
|
+
);
|
|
4853
|
+
const partOf = (item) => item.part ? bands.find((b) => b.layer === item.layer)?.parts?.find((p) => p.id === item.part) : void 0;
|
|
4854
|
+
const spanLabel = (item) => {
|
|
4855
|
+
const end = item.end ?? item.start + (scale === "seq" ? 1 : 0);
|
|
4856
|
+
if (scale === "seq") {
|
|
4857
|
+
return end - item.start <= 1 ? `step ${item.start}` : `steps ${item.start}\u2013${end - 1}`;
|
|
4858
|
+
}
|
|
4859
|
+
return `${formatElapsed(item.start - d0)} \u2192 ${formatElapsed(
|
|
4860
|
+
end - d0
|
|
4861
|
+
)} \xB7 ${formatElapsed(end - item.start)}`;
|
|
4862
|
+
};
|
|
4863
|
+
const detail = (item) => {
|
|
4864
|
+
if (itemDetail) return itemDetail(item);
|
|
4865
|
+
const state = item.state ?? "declared";
|
|
4866
|
+
const part = partOf(item);
|
|
4867
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
4868
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
4869
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4870
|
+
"span",
|
|
4871
|
+
{
|
|
4872
|
+
className: cn(
|
|
4873
|
+
"min-w-0 flex-1 truncate font-mono text-base",
|
|
4874
|
+
state === "refused" && "text-destructive line-through"
|
|
4875
|
+
),
|
|
4876
|
+
children: item.label
|
|
4877
|
+
}
|
|
4878
|
+
),
|
|
4879
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4880
|
+
"span",
|
|
4881
|
+
{
|
|
4882
|
+
className: cn(
|
|
4883
|
+
"shrink-0 text-sm",
|
|
4884
|
+
state === "refused" ? "text-destructive" : "text-muted-foreground"
|
|
4885
|
+
),
|
|
4886
|
+
children: stateLabel(state)
|
|
4887
|
+
}
|
|
4888
|
+
)
|
|
4889
|
+
] }),
|
|
4890
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-[auto_1fr] gap-x-2 gap-y-1 text-sm", children: [
|
|
4891
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: "layer" }),
|
|
4892
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(LayerChip, { layer: item.layer, palette }) }),
|
|
4893
|
+
part ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4894
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: "participant" }),
|
|
4895
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "min-w-0 break-all font-mono", children: part.label })
|
|
4896
|
+
] }) : null,
|
|
4897
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: "when" }),
|
|
4898
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "min-w-0 tabular-nums", children: spanLabel(item) }),
|
|
4899
|
+
item.note ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4900
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: "what it does" }),
|
|
4901
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "min-w-0 font-mono", children: item.note })
|
|
4902
|
+
] }) : null,
|
|
4903
|
+
item.ruleMatched ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4904
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: "refused by" }),
|
|
4905
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "min-w-0 break-all font-mono text-destructive", children: item.ruleMatched })
|
|
4906
|
+
] }) : null
|
|
4907
|
+
] })
|
|
4908
|
+
] });
|
|
4909
|
+
};
|
|
4910
|
+
const bar = (item, compact = false) => {
|
|
4911
|
+
const state = item.state ?? "declared";
|
|
4912
|
+
const end = item.end ?? item.start + (scale === "seq" ? 1 : 0);
|
|
4913
|
+
const min = compact ? "0.75rem" : "4.5rem";
|
|
4914
|
+
const Tag = onSelectItem ? "button" : "div";
|
|
4915
|
+
const drawn = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4916
|
+
Tag,
|
|
4917
|
+
{
|
|
4918
|
+
...onSelectItem ? { type: "button", onClick: () => onSelectItem(item.id) } : {},
|
|
4919
|
+
title: hoverDetail ? void 0 : [item.label, stateLabel(state), item.note, item.ruleMatched].filter(Boolean).join(" \xB7 "),
|
|
4920
|
+
style: (
|
|
4921
|
+
// A bar is at least readable-wide, and one near the end grows
|
|
4922
|
+
// inwards rather than off the track: anchor whichever edge is
|
|
4923
|
+
// nearer its own end of the axis, so the moment it names stays
|
|
4924
|
+
// true where the reader is looking.
|
|
4925
|
+
pct(item.start) > 50 ? {
|
|
4926
|
+
right: `${100 - pct(end)}%`,
|
|
4927
|
+
width: `max(${min}, calc(${pct(end) - pct(item.start)}% - 3px))`
|
|
4928
|
+
} : {
|
|
4929
|
+
left: `${pct(item.start)}%`,
|
|
4930
|
+
width: `max(${min}, calc(${pct(end) - pct(item.start)}% - 3px))`
|
|
4931
|
+
}
|
|
4932
|
+
),
|
|
4933
|
+
className: cn(
|
|
4934
|
+
"-translate-y-1/2 absolute top-1/2 flex min-w-0 items-stretch overflow-hidden rounded-xs border py-0.5 text-left",
|
|
4935
|
+
compact ? "gap-1 pr-1" : "gap-1.5 pr-1.5",
|
|
4936
|
+
// Chosen, not merged. `twMerge` would resolve the kit's own tints
|
|
4937
|
+
// against `border-destructive` correctly, but the tint is a
|
|
4938
|
+
// consumer's string now: a project that paints a layer with its own
|
|
4939
|
+
// utility class (`layer-llm`, a plugin's output) hands `cn` two
|
|
4940
|
+
// classes it cannot see a conflict between, and stylesheet order
|
|
4941
|
+
// would decide whether a refusal reads as refused.
|
|
4942
|
+
state === "refused" ? null : layerPaint(palette, item.layer).tint,
|
|
4943
|
+
STATE_BAR[state] ?? "",
|
|
4944
|
+
onSelectItem && "cursor-pointer hover:bg-accent",
|
|
4945
|
+
selectedItem === item.id && "ring-1 ring-ring",
|
|
4946
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
4947
|
+
),
|
|
4948
|
+
children: [
|
|
4949
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4950
|
+
"span",
|
|
4951
|
+
{
|
|
4952
|
+
"aria-hidden": true,
|
|
4953
|
+
className: cn(
|
|
4954
|
+
"w-1 shrink-0",
|
|
4955
|
+
layerPaint(palette, item.layer).swatch
|
|
4956
|
+
)
|
|
4957
|
+
}
|
|
4958
|
+
),
|
|
4959
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-col justify-center", children: [
|
|
4960
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4961
|
+
"span",
|
|
4962
|
+
{
|
|
4963
|
+
className: cn(
|
|
4964
|
+
"truncate font-mono text-sm",
|
|
4965
|
+
state === "refused" && "text-destructive line-through"
|
|
4966
|
+
),
|
|
4967
|
+
children: item.label
|
|
4968
|
+
}
|
|
4969
|
+
),
|
|
4970
|
+
compact ? null : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-muted-foreground", children: item.note ?? (state === "declared" ? null : stateLabel(state)) })
|
|
4971
|
+
] })
|
|
4972
|
+
]
|
|
4973
|
+
},
|
|
4974
|
+
item.id
|
|
4975
|
+
);
|
|
4976
|
+
if (!hoverDetail) return drawn;
|
|
4977
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(HoverCard, { openDelay: 140, closeDelay: 80, children: [
|
|
4978
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoverCardTrigger, { asChild: true, children: drawn }),
|
|
4979
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4980
|
+
HoverCardContent,
|
|
4981
|
+
{
|
|
4982
|
+
align: "start",
|
|
4983
|
+
side: "top",
|
|
4984
|
+
className: "w-auto max-w-80 p-3",
|
|
4985
|
+
children: detail(item)
|
|
4986
|
+
}
|
|
4987
|
+
)
|
|
4988
|
+
] }, item.id);
|
|
4989
|
+
};
|
|
4990
|
+
const bracketLanes = React24__namespace.useMemo(() => {
|
|
4991
|
+
const lanes = [];
|
|
4992
|
+
const ordered = [...brackets ?? []].sort(
|
|
4993
|
+
(a, b) => b.end - b.start - (a.end - a.start)
|
|
4994
|
+
);
|
|
4995
|
+
for (const bracket of ordered) {
|
|
4996
|
+
const lane = lanes.find(
|
|
4997
|
+
(existing) => existing.every(
|
|
4998
|
+
(other) => bracket.end <= other.start || bracket.start >= other.end
|
|
4999
|
+
)
|
|
5000
|
+
);
|
|
5001
|
+
if (lane) lane.push(bracket);
|
|
5002
|
+
else lanes.push([bracket]);
|
|
5003
|
+
}
|
|
5004
|
+
return lanes;
|
|
5005
|
+
}, [brackets]);
|
|
5006
|
+
const seamLines = React24__namespace.useMemo(() => {
|
|
5007
|
+
const placed = (seams ?? []).filter((seam) => seam.at != null);
|
|
5008
|
+
const loose = (seams ?? []).filter((seam) => seam.at == null);
|
|
5009
|
+
return [...placed.length ? [placed] : [], ...loose.map((s2) => [s2])];
|
|
5010
|
+
}, [seams]);
|
|
5011
|
+
const itemsOf = (layer, part) => items.filter(
|
|
5012
|
+
(i) => i.layer === layer && (part ? i.part === part : !i.part)
|
|
5013
|
+
);
|
|
5014
|
+
const allOf = (layer) => items.filter((i) => i.layer === layer);
|
|
5015
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5016
|
+
"div",
|
|
5017
|
+
{
|
|
5018
|
+
ref,
|
|
5019
|
+
className: cn(
|
|
5020
|
+
"min-w-0 overflow-x-auto rounded-control border border-border bg-card",
|
|
5021
|
+
className
|
|
5022
|
+
),
|
|
5023
|
+
...props,
|
|
5024
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative min-w-max", children: [
|
|
5025
|
+
seams?.length ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5026
|
+
"div",
|
|
5027
|
+
{
|
|
5028
|
+
"aria-hidden": true,
|
|
5029
|
+
style: { left: `${labelWidth}rem` },
|
|
5030
|
+
className: "pointer-events-none absolute inset-y-0 right-0",
|
|
5031
|
+
children: seams.map(
|
|
5032
|
+
(seam) => seam.at == null ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5033
|
+
"span",
|
|
5034
|
+
{
|
|
5035
|
+
style: { left: `${pct(seam.at)}%` },
|
|
5036
|
+
className: cn(
|
|
5037
|
+
"absolute inset-y-0 border-l",
|
|
5038
|
+
seam.conditional ? "border-dashed border-muted-foreground/45" : "border-muted-foreground/60"
|
|
5039
|
+
)
|
|
5040
|
+
},
|
|
5041
|
+
seam.id
|
|
5042
|
+
)
|
|
5043
|
+
)
|
|
5044
|
+
}
|
|
5045
|
+
) : null,
|
|
5046
|
+
row(
|
|
5047
|
+
"axis",
|
|
5048
|
+
label(
|
|
5049
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5050
|
+
collapsible && withParts.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5051
|
+
"button",
|
|
5052
|
+
{
|
|
5053
|
+
type: "button",
|
|
5054
|
+
onClick: () => setShut(allShut ? [] : withParts.map((b) => b.layer)),
|
|
5055
|
+
className: "-ml-1 flex items-center gap-0.5 rounded-xs px-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
5056
|
+
children: [
|
|
5057
|
+
allShut ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { "aria-hidden": true, className: "size-3 shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { "aria-hidden": true, className: "size-3 shrink-0" }),
|
|
5058
|
+
allShut ? "expand all" : "collapse all"
|
|
5059
|
+
]
|
|
5060
|
+
}
|
|
5061
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "layer" }),
|
|
5062
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-sm text-muted-foreground/70", children: scale === "seq" ? "step" : "elapsed" })
|
|
5063
|
+
] }),
|
|
5064
|
+
"min-h-0 py-1"
|
|
5065
|
+
),
|
|
5066
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0", children: axisTicks.map((value) => {
|
|
5067
|
+
const atEnd = pct(value) > 99;
|
|
5068
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5069
|
+
"span",
|
|
5070
|
+
{
|
|
5071
|
+
style: atEnd ? { right: 0 } : { left: `${pct(value)}%` },
|
|
5072
|
+
className: cn(
|
|
5073
|
+
"absolute inset-y-0 text-sm text-muted-foreground",
|
|
5074
|
+
atEnd ? "border-border/60 border-r pr-1" : "border-border/60 border-l pl-1"
|
|
5075
|
+
),
|
|
5076
|
+
children: tickLabel(value)
|
|
5077
|
+
},
|
|
5078
|
+
value
|
|
5079
|
+
);
|
|
5080
|
+
}) })
|
|
5081
|
+
),
|
|
5082
|
+
bracketLanes.map(
|
|
5083
|
+
(lane, laneIndex) => row(
|
|
5084
|
+
`brackets-${laneIndex}`,
|
|
5085
|
+
label(
|
|
5086
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: laneIndex === 0 ? "its bound" : "" }),
|
|
5087
|
+
"min-h-0 py-1"
|
|
5088
|
+
),
|
|
5089
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 py-1", children: lane.map((bracket) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5090
|
+
"span",
|
|
5091
|
+
{
|
|
5092
|
+
style: {
|
|
5093
|
+
left: `${pct(bracket.start)}%`,
|
|
5094
|
+
width: `${pct(bracket.end) - pct(bracket.start)}%`
|
|
5095
|
+
},
|
|
5096
|
+
className: "absolute inset-y-1 flex items-center justify-center truncate rounded-xs border border-border border-dashed px-1 text-sm text-muted-foreground",
|
|
5097
|
+
children: bracket.label
|
|
5098
|
+
},
|
|
5099
|
+
bracket.id
|
|
5100
|
+
)) })
|
|
5101
|
+
)
|
|
5102
|
+
),
|
|
5103
|
+
seamLines.map(
|
|
5104
|
+
(line, lineIndex) => row(
|
|
5105
|
+
`seams-${lineIndex}`,
|
|
5106
|
+
label(
|
|
5107
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: lineIndex === 0 ? "its gates" : "" })
|
|
5108
|
+
),
|
|
5109
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0", children: line.map((seam) => {
|
|
5110
|
+
const named = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-col justify-center", children: [
|
|
5111
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm", children: seam.label }),
|
|
5112
|
+
seam.note ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-muted-foreground", children: seam.note }) : null
|
|
5113
|
+
] });
|
|
5114
|
+
if (seam.at == null)
|
|
5115
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5116
|
+
"span",
|
|
5117
|
+
{
|
|
5118
|
+
className: "absolute inset-x-0 inset-y-1.5 flex items-center justify-center rounded-xs border border-dotted border-muted-foreground/45 px-1.5 text-muted-foreground",
|
|
5119
|
+
children: named
|
|
5120
|
+
},
|
|
5121
|
+
seam.id
|
|
5122
|
+
);
|
|
5123
|
+
const after = seam.edge === "after";
|
|
5124
|
+
const neighbours = line.map((other) => other.at).filter((value) => value != null);
|
|
5125
|
+
const bound = after ? pct(seam.at) - Math.max(
|
|
5126
|
+
...neighbours.filter((v) => v < (seam.at ?? 0)).map(pct),
|
|
5127
|
+
0
|
|
5128
|
+
) : Math.min(
|
|
5129
|
+
...neighbours.filter((v) => v > (seam.at ?? 0)).map(pct),
|
|
5130
|
+
100
|
|
5131
|
+
) - pct(seam.at);
|
|
5132
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5133
|
+
"span",
|
|
5134
|
+
{
|
|
5135
|
+
style: {
|
|
5136
|
+
maxWidth: `${Math.max(bound, 12)}%`,
|
|
5137
|
+
...after ? { right: `${100 - pct(seam.at)}%` } : { left: `${pct(seam.at)}%` }
|
|
5138
|
+
},
|
|
5139
|
+
className: cn(
|
|
5140
|
+
// The label hangs off the side the cost falls on:
|
|
5141
|
+
// before the line, nothing is spent; after it, the
|
|
5142
|
+
// pass is already paid for.
|
|
5143
|
+
"absolute inset-y-1.5 flex items-center bg-card px-1.5 text-muted-foreground",
|
|
5144
|
+
after ? "border-r-2 text-right" : "border-l-2",
|
|
5145
|
+
seam.conditional ? "border-dashed border-muted-foreground/45" : "border-muted-foreground/70"
|
|
5146
|
+
),
|
|
5147
|
+
children: named
|
|
5148
|
+
},
|
|
5149
|
+
seam.id
|
|
5150
|
+
);
|
|
5151
|
+
}) })
|
|
5152
|
+
)
|
|
5153
|
+
),
|
|
5154
|
+
bands.map((band) => {
|
|
5155
|
+
const own = itemsOf(band.layer);
|
|
5156
|
+
const parts = band.parts ?? [];
|
|
5157
|
+
const dim = allOf(band.layer).length === 0;
|
|
5158
|
+
const spine = band.spine ?? false;
|
|
5159
|
+
const foldable = collapsible && parts.length > 0;
|
|
5160
|
+
const isShut = foldable && shut.includes(band.layer);
|
|
5161
|
+
const onLine = isShut ? allOf(band.layer) : own;
|
|
5162
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React24__namespace.Fragment, { children: [
|
|
5163
|
+
row(
|
|
5164
|
+
band.layer,
|
|
5165
|
+
label(
|
|
5166
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5167
|
+
foldable ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5168
|
+
"button",
|
|
5169
|
+
{
|
|
5170
|
+
type: "button",
|
|
5171
|
+
"aria-expanded": !isShut,
|
|
5172
|
+
"aria-label": `${isShut ? "Show" : "Hide"} the ${parts.length} participants under ${band.layer}`,
|
|
5173
|
+
onClick: () => setShut(
|
|
5174
|
+
isShut ? shut.filter((l) => l !== band.layer) : [...shut, band.layer]
|
|
5175
|
+
),
|
|
5176
|
+
className: "-ml-1 flex shrink-0 items-center gap-1 rounded-xs px-1 hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
5177
|
+
children: [
|
|
5178
|
+
isShut ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5179
|
+
lucideReact.ChevronRight,
|
|
5180
|
+
{
|
|
5181
|
+
"aria-hidden": true,
|
|
5182
|
+
className: "size-3 shrink-0 text-muted-foreground"
|
|
5183
|
+
}
|
|
5184
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5185
|
+
lucideReact.ChevronDown,
|
|
5186
|
+
{
|
|
5187
|
+
"aria-hidden": true,
|
|
5188
|
+
className: "size-3 shrink-0 text-muted-foreground"
|
|
5189
|
+
}
|
|
5190
|
+
),
|
|
5191
|
+
band.label ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5192
|
+
LayerChip,
|
|
5193
|
+
{
|
|
5194
|
+
layer: band.layer,
|
|
5195
|
+
dim,
|
|
5196
|
+
palette
|
|
5197
|
+
}
|
|
5198
|
+
)
|
|
5199
|
+
]
|
|
5200
|
+
}
|
|
5201
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 pl-4", children: band.label ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5202
|
+
LayerChip,
|
|
5203
|
+
{
|
|
5204
|
+
layer: band.layer,
|
|
5205
|
+
dim,
|
|
5206
|
+
palette
|
|
5207
|
+
}
|
|
5208
|
+
) }),
|
|
5209
|
+
band.note ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5210
|
+
"span",
|
|
5211
|
+
{
|
|
5212
|
+
title: band.note,
|
|
5213
|
+
className: cn(
|
|
5214
|
+
"ml-auto min-w-0 truncate text-sm",
|
|
5215
|
+
dim ? "text-muted-foreground/70" : "text-muted-foreground"
|
|
5216
|
+
),
|
|
5217
|
+
children: band.note
|
|
5218
|
+
}
|
|
5219
|
+
) : null
|
|
5220
|
+
] }),
|
|
5221
|
+
void 0,
|
|
5222
|
+
false,
|
|
5223
|
+
dim
|
|
5224
|
+
),
|
|
5225
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5226
|
+
spine ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5227
|
+
"span",
|
|
5228
|
+
{
|
|
5229
|
+
"aria-hidden": true,
|
|
5230
|
+
className: "-translate-y-1/2 absolute inset-x-0 top-1/2 border-border border-t"
|
|
5231
|
+
}
|
|
5232
|
+
) : null,
|
|
5233
|
+
onLine.map((item) => bar(item, isShut))
|
|
5234
|
+
] }),
|
|
5235
|
+
dim
|
|
5236
|
+
),
|
|
5237
|
+
(isShut ? [] : parts).map((part) => {
|
|
5238
|
+
const spent = itemsOf(band.layer, part.id);
|
|
5239
|
+
const unspent = spent.length === 0;
|
|
5240
|
+
return row(
|
|
5241
|
+
`${band.layer}-${part.id}`,
|
|
5242
|
+
label(
|
|
5243
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5244
|
+
"span",
|
|
5245
|
+
{
|
|
5246
|
+
className: "flex min-w-0 flex-col",
|
|
5247
|
+
title: part.label,
|
|
5248
|
+
children: [
|
|
5249
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5250
|
+
"span",
|
|
5251
|
+
{
|
|
5252
|
+
className: cn(
|
|
5253
|
+
"truncate font-mono text-sm",
|
|
5254
|
+
// The address wears its layer, so the row and the
|
|
5255
|
+
// band's dot are visibly one thing. Unspent
|
|
5256
|
+
// overrides it: *this was never reached* outranks
|
|
5257
|
+
// *this is graph data*.
|
|
5258
|
+
unspent ? "text-muted-foreground/70" : layerPaint(palette, band.layer).text
|
|
5259
|
+
),
|
|
5260
|
+
children: part.label
|
|
5261
|
+
}
|
|
5262
|
+
),
|
|
5263
|
+
part.note ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5264
|
+
"span",
|
|
5265
|
+
{
|
|
5266
|
+
className: cn(
|
|
5267
|
+
// What the participant owes sits a rung under the
|
|
5268
|
+
// address that owes it. At the same size the two
|
|
5269
|
+
// lines read as one wrapped label.
|
|
5270
|
+
"truncate text-xs",
|
|
5271
|
+
unspent ? "text-muted-foreground/70" : "text-muted-foreground"
|
|
5272
|
+
),
|
|
5273
|
+
children: part.note
|
|
5274
|
+
}
|
|
5275
|
+
) : null
|
|
5276
|
+
]
|
|
5277
|
+
}
|
|
5278
|
+
),
|
|
5279
|
+
void 0,
|
|
5280
|
+
true,
|
|
5281
|
+
unspent
|
|
5282
|
+
),
|
|
5283
|
+
spent.map((item) => bar(item)),
|
|
5284
|
+
unspent
|
|
5285
|
+
);
|
|
5286
|
+
})
|
|
5287
|
+
] }, band.layer);
|
|
5288
|
+
})
|
|
5289
|
+
] })
|
|
5290
|
+
}
|
|
5291
|
+
);
|
|
5292
|
+
}
|
|
5293
|
+
);
|
|
5294
|
+
LayerStrip.displayName = "LayerStrip";
|
|
5295
|
+
function Swatch({ kind = "dot", color }) {
|
|
5296
|
+
const style = { color };
|
|
5297
|
+
if (kind === "dot")
|
|
5298
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5299
|
+
"span",
|
|
5300
|
+
{
|
|
5301
|
+
"aria-hidden": true,
|
|
5302
|
+
style,
|
|
5303
|
+
className: "size-2 shrink-0 rounded-full bg-current"
|
|
5304
|
+
}
|
|
5305
|
+
);
|
|
5306
|
+
if (kind === "ring")
|
|
5307
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5308
|
+
"span",
|
|
5309
|
+
{
|
|
5310
|
+
"aria-hidden": true,
|
|
5311
|
+
style,
|
|
5312
|
+
className: "size-2 shrink-0 rounded-full border-[1.5px] border-current"
|
|
5313
|
+
}
|
|
5314
|
+
);
|
|
5315
|
+
if (kind === "line")
|
|
5316
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, style, className: "h-0.5 w-4 shrink-0 bg-current" });
|
|
5317
|
+
if (kind === "dashed")
|
|
5318
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5319
|
+
"span",
|
|
5320
|
+
{
|
|
5321
|
+
"aria-hidden": true,
|
|
5322
|
+
style,
|
|
5323
|
+
className: "h-0 w-4 shrink-0 border-t-[1.5px] border-dashed border-current"
|
|
5324
|
+
}
|
|
5325
|
+
);
|
|
5326
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5327
|
+
"svg",
|
|
5328
|
+
{
|
|
5329
|
+
"aria-hidden": true,
|
|
5330
|
+
style,
|
|
5331
|
+
className: "w-4 shrink-0 overflow-visible",
|
|
5332
|
+
viewBox: "0 0 16 6",
|
|
5333
|
+
height: "6",
|
|
5334
|
+
fill: "none",
|
|
5335
|
+
children: [
|
|
5336
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 3h11", stroke: "currentColor", strokeWidth: "2" }),
|
|
5337
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 0l6 3-6 3z", fill: "currentColor" })
|
|
5338
|
+
]
|
|
5339
|
+
}
|
|
5340
|
+
);
|
|
5341
|
+
}
|
|
5342
|
+
var Legend = React24__namespace.forwardRef(
|
|
5343
|
+
({ orientation = "row", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5344
|
+
"div",
|
|
5345
|
+
{
|
|
5346
|
+
ref,
|
|
5347
|
+
role: "list",
|
|
5348
|
+
className: cn(
|
|
5349
|
+
"flex gap-x-3 gap-y-1 text-sm",
|
|
5350
|
+
orientation === "row" ? "flex-wrap items-center" : "flex-col",
|
|
5351
|
+
className
|
|
5352
|
+
),
|
|
5353
|
+
...props,
|
|
5354
|
+
children
|
|
5355
|
+
}
|
|
5356
|
+
)
|
|
5357
|
+
);
|
|
5358
|
+
Legend.displayName = "Legend";
|
|
5359
|
+
var LegendItem = React24__namespace.forwardRef(
|
|
5360
|
+
({ kind, color, label, count, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5361
|
+
"div",
|
|
5362
|
+
{
|
|
5363
|
+
ref,
|
|
5364
|
+
role: "listitem",
|
|
5365
|
+
className: cn("flex min-w-0 items-center gap-1.5", className),
|
|
5366
|
+
...props,
|
|
5367
|
+
children: [
|
|
5368
|
+
/* @__PURE__ */ jsxRuntime.jsx(Swatch, { kind, color }),
|
|
5369
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: label }),
|
|
5370
|
+
count != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-muted-foreground", children: count }) : null
|
|
5371
|
+
]
|
|
5372
|
+
}
|
|
5373
|
+
)
|
|
5374
|
+
);
|
|
5375
|
+
LegendItem.displayName = "LegendItem";
|
|
5376
|
+
var LensChip = React24__namespace.forwardRef(
|
|
5377
|
+
({ lens, onPick, className, ...props }, ref) => {
|
|
5378
|
+
const label = lens?.name ?? "Everything";
|
|
5379
|
+
const unset = lens == null;
|
|
5380
|
+
const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5381
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5382
|
+
"span",
|
|
5383
|
+
{
|
|
5384
|
+
"aria-hidden": true,
|
|
5385
|
+
className: cn(
|
|
5386
|
+
"size-1.5 shrink-0 rounded-full",
|
|
5387
|
+
unset ? "bg-muted-foreground" : "bg-primary"
|
|
5388
|
+
)
|
|
5389
|
+
}
|
|
5390
|
+
),
|
|
5391
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children: label })
|
|
5392
|
+
] });
|
|
5393
|
+
const shell = cn(
|
|
5394
|
+
"inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-control",
|
|
5395
|
+
"border border-border px-1.5 py-0.5 text-sm",
|
|
5396
|
+
unset ? "text-muted-foreground" : "text-foreground",
|
|
5397
|
+
className
|
|
5398
|
+
);
|
|
5399
|
+
if (onPick) {
|
|
5400
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, className: "inline-flex min-w-0", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5401
|
+
"button",
|
|
5402
|
+
{
|
|
5403
|
+
type: "button",
|
|
5404
|
+
onClick: onPick,
|
|
5405
|
+
title: unset ? "Everything \u2014 the whole model, inside the guardrails" : label,
|
|
5406
|
+
className: cn(
|
|
5407
|
+
shell,
|
|
5408
|
+
"cursor-pointer hover:bg-accent",
|
|
5409
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
5410
|
+
),
|
|
5411
|
+
children: body
|
|
5412
|
+
}
|
|
5413
|
+
) });
|
|
5414
|
+
}
|
|
5415
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, className: shell, title: label, ...props, children: body });
|
|
5416
|
+
}
|
|
5417
|
+
);
|
|
5418
|
+
LensChip.displayName = "LensChip";
|
|
5419
|
+
function describe(n, palette) {
|
|
5420
|
+
switch (n.kind) {
|
|
5421
|
+
case "allow":
|
|
5422
|
+
return `${n.count} allow`;
|
|
5423
|
+
case "deny":
|
|
5424
|
+
return `${n.count} deny`;
|
|
5425
|
+
case "sliced":
|
|
5426
|
+
return "sliced";
|
|
5427
|
+
case "excludes":
|
|
5428
|
+
return `excludes ${n.properties.join(", ")}`;
|
|
5429
|
+
case "casts":
|
|
5430
|
+
return `casts ${n.roles.join(", ")}`;
|
|
5431
|
+
case "closes":
|
|
5432
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1", children: [
|
|
5433
|
+
"closes",
|
|
5434
|
+
n.layers.map((layer) => /* @__PURE__ */ jsxRuntime.jsx(LayerChip, { layer, palette }, layer))
|
|
5435
|
+
] });
|
|
5436
|
+
}
|
|
5437
|
+
}
|
|
5438
|
+
var LensRow = React24__namespace.forwardRef(
|
|
5439
|
+
({ name, narrows = [], usage, selected, onSelect, palette, className, ...props }, ref) => {
|
|
5440
|
+
const interactive = Boolean(onSelect);
|
|
5441
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5442
|
+
"div",
|
|
5443
|
+
{
|
|
5444
|
+
ref,
|
|
5445
|
+
role: interactive ? "button" : void 0,
|
|
5446
|
+
tabIndex: interactive ? 0 : void 0,
|
|
5447
|
+
"aria-pressed": interactive ? Boolean(selected) : void 0,
|
|
5448
|
+
onClick: interactive ? () => onSelect?.(name) : void 0,
|
|
5449
|
+
onKeyDown: interactive ? (event) => {
|
|
5450
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
5451
|
+
event.preventDefault();
|
|
5452
|
+
onSelect?.(name);
|
|
5453
|
+
}
|
|
5454
|
+
} : void 0,
|
|
5455
|
+
className: cn(
|
|
5456
|
+
"flex min-w-0 flex-col gap-0.5 rounded-control px-2 py-1.5",
|
|
5457
|
+
interactive && "cursor-pointer hover:bg-accent",
|
|
5458
|
+
selected && "bg-accent",
|
|
5459
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
5460
|
+
className
|
|
5461
|
+
),
|
|
5462
|
+
...props,
|
|
5463
|
+
children: [
|
|
5464
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
5465
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate text-base font-medium text-foreground", children: name }),
|
|
5466
|
+
usage ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-auto shrink-0 text-sm text-muted-foreground", children: [
|
|
5467
|
+
"used in ",
|
|
5468
|
+
usage.runs,
|
|
5469
|
+
" run",
|
|
5470
|
+
usage.runs === 1 ? "" : "s",
|
|
5471
|
+
usage.lastUsed ? ` \xB7 last ${usage.lastUsed}` : ""
|
|
5472
|
+
] }) : null
|
|
5473
|
+
] }),
|
|
5474
|
+
narrows.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground", children: narrows.map((n, i) => /* @__PURE__ */ jsxRuntime.jsxs(React24__namespace.Fragment, { children: [
|
|
5475
|
+
i > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "opacity-40", children: "\xB7" }) : null,
|
|
5476
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center", children: describe(n, palette) })
|
|
5477
|
+
] }, `${n.kind}-${i}`)) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground/70", children: "narrows nothing \u2014 the whole model, inside the guardrails" })
|
|
5478
|
+
]
|
|
5479
|
+
}
|
|
5480
|
+
);
|
|
5481
|
+
}
|
|
5482
|
+
);
|
|
5483
|
+
LensRow.displayName = "LensRow";
|
|
5484
|
+
var MatchPreview = React24__namespace.forwardRef(
|
|
5485
|
+
({ pattern, matches = [], loading, limit = 8, className, ...props }, ref) => {
|
|
5486
|
+
const hits = matches.filter((m) => m.matched);
|
|
5487
|
+
const misses = matches.filter((m) => !m.matched);
|
|
5488
|
+
const shown = [...hits, ...misses].slice(0, limit);
|
|
5489
|
+
const hidden = matches.length - shown.length;
|
|
5490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5491
|
+
"div",
|
|
5492
|
+
{
|
|
5493
|
+
ref,
|
|
5494
|
+
className: cn(
|
|
5495
|
+
"flex min-w-0 flex-col gap-1 rounded-control border border-border p-2",
|
|
5496
|
+
className
|
|
5497
|
+
),
|
|
5498
|
+
...props,
|
|
5499
|
+
children: [
|
|
5500
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
5501
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "what this matches" }),
|
|
5502
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto shrink-0 text-sm tabular-nums text-muted-foreground", children: loading ? "\u2026" : `${hits.length} of ${matches.length}` })
|
|
5503
|
+
] }),
|
|
5504
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 py-0.5", children: [
|
|
5505
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-3 w-3/5" }),
|
|
5506
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-3 w-2/5" }),
|
|
5507
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-3 w-1/2" })
|
|
5508
|
+
] }) : matches.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground/70", children: "nothing in this Graph to match \u2014 the layer has no participants yet" }) : hits.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-destructive", children: [
|
|
5509
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono", children: pattern }),
|
|
5510
|
+
" matches nothing here"
|
|
5511
|
+
] }) : null,
|
|
5512
|
+
!loading && shown.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
5513
|
+
shown.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5514
|
+
AddressChip,
|
|
5515
|
+
{
|
|
5516
|
+
address: m.address,
|
|
5517
|
+
tone: m.matched ? "allowed" : "untouched"
|
|
5518
|
+
},
|
|
5519
|
+
m.address
|
|
5520
|
+
)),
|
|
5521
|
+
hidden > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "pt-0.5 text-sm text-muted-foreground/70", children: [
|
|
5522
|
+
"and ",
|
|
5523
|
+
hidden,
|
|
5524
|
+
" more"
|
|
5525
|
+
] }) : null
|
|
5526
|
+
] }) : null
|
|
5527
|
+
]
|
|
5528
|
+
}
|
|
5529
|
+
);
|
|
5530
|
+
}
|
|
5531
|
+
);
|
|
5532
|
+
MatchPreview.displayName = "MatchPreview";
|
|
5533
|
+
var MenuItem = ({
|
|
5534
|
+
label,
|
|
5535
|
+
icon: Icon,
|
|
5536
|
+
shortcut,
|
|
5537
|
+
children,
|
|
5538
|
+
className,
|
|
5539
|
+
level = 0,
|
|
5540
|
+
href,
|
|
5541
|
+
onClick
|
|
5542
|
+
}) => {
|
|
5543
|
+
const hasChildren = children && children.length > 0;
|
|
5544
|
+
const ButtonOrLink = href ? "a" : "button";
|
|
5545
|
+
const clickTrigger = href ? { href } : { onClick };
|
|
5546
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "relative group/item", children: [
|
|
5547
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5548
|
+
ButtonOrLink,
|
|
5549
|
+
{
|
|
5550
|
+
...clickTrigger,
|
|
5551
|
+
className: cn(
|
|
5552
|
+
"flex w-full items-center justify-between px-4 py-2 ",
|
|
5553
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
5554
|
+
"focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:outline-none",
|
|
5555
|
+
className,
|
|
5556
|
+
level === 0 ? "font-medium" : "font-normal"
|
|
5557
|
+
// "group-hover/item:bg-accent/50"
|
|
5558
|
+
),
|
|
5559
|
+
role: hasChildren ? "menuitem" : void 0,
|
|
5560
|
+
"aria-haspopup": hasChildren ? "true" : void 0,
|
|
5561
|
+
"aria-expanded": hasChildren ? "true" : void 0,
|
|
5562
|
+
children: [
|
|
5563
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
5564
|
+
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4" }),
|
|
5565
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
5566
|
+
] }),
|
|
5567
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
5568
|
+
shortcut && /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100", children: shortcut }),
|
|
5569
|
+
hasChildren && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
|
|
5570
|
+
] })
|
|
4612
5571
|
]
|
|
4613
5572
|
}
|
|
4614
5573
|
),
|
|
@@ -4631,14 +5590,14 @@ var MenuItem = ({
|
|
|
4631
5590
|
)
|
|
4632
5591
|
] });
|
|
4633
5592
|
};
|
|
4634
|
-
var
|
|
5593
|
+
var TONE2 = {
|
|
4635
5594
|
running: "text-info",
|
|
4636
5595
|
success: "text-success",
|
|
4637
5596
|
warning: "text-warning",
|
|
4638
5597
|
error: "text-destructive",
|
|
4639
5598
|
info: "text-info"
|
|
4640
5599
|
};
|
|
4641
|
-
var MetricTile =
|
|
5600
|
+
var MetricTile = React24__namespace.forwardRef(
|
|
4642
5601
|
({ label, value, caption, tone, meter, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4643
5602
|
"div",
|
|
4644
5603
|
{
|
|
@@ -4649,7 +5608,7 @@ var MetricTile = React23__namespace.forwardRef(
|
|
|
4649
5608
|
),
|
|
4650
5609
|
...props,
|
|
4651
5610
|
children: [
|
|
4652
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-
|
|
5611
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm font-semibold uppercase tracking-wide text-muted-foreground", children: label }),
|
|
4653
5612
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4654
5613
|
"span",
|
|
4655
5614
|
{
|
|
@@ -4658,12 +5617,12 @@ var MetricTile = React23__namespace.forwardRef(
|
|
|
4658
5617
|
// `1,880` and `2 / 5` in adjacent tiles sit at different widths, and
|
|
4659
5618
|
// a strip of six stops reading as one row of numbers.
|
|
4660
5619
|
"font-mono text-lg font-semibold leading-tight",
|
|
4661
|
-
tone ?
|
|
5620
|
+
tone ? TONE2[tone] ?? "text-foreground" : void 0
|
|
4662
5621
|
),
|
|
4663
5622
|
children: value
|
|
4664
5623
|
}
|
|
4665
5624
|
),
|
|
4666
|
-
caption != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5625
|
+
caption != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: caption }) : null,
|
|
4667
5626
|
meter != null ? (
|
|
4668
5627
|
// Not a <Progress>: that is a control-sized, rounded, animated bar for
|
|
4669
5628
|
// work in flight. This is a 4px rule that says how much of a ceiling is
|
|
@@ -4677,7 +5636,7 @@ var MetricTile = React23__namespace.forwardRef(
|
|
|
4677
5636
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4678
5637
|
"div",
|
|
4679
5638
|
{
|
|
4680
|
-
className: cn("h-full", tone ?
|
|
5639
|
+
className: cn("h-full", tone ? TONE2[tone] ?? "text-foreground" : "text-primary", "bg-current"),
|
|
4681
5640
|
style: { width: `${Math.min(Math.max(meter, 0), 1) * 100}%` }
|
|
4682
5641
|
}
|
|
4683
5642
|
)
|
|
@@ -4690,7 +5649,7 @@ var MetricTile = React23__namespace.forwardRef(
|
|
|
4690
5649
|
)
|
|
4691
5650
|
);
|
|
4692
5651
|
MetricTile.displayName = "MetricTile";
|
|
4693
|
-
var MetricGrid =
|
|
5652
|
+
var MetricGrid = React24__namespace.forwardRef(
|
|
4694
5653
|
({ minTileWidth = 120, gap = 6, className, style, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4695
5654
|
"div",
|
|
4696
5655
|
{
|
|
@@ -4749,28 +5708,7 @@ var NestedMenu = (props) => {
|
|
|
4749
5708
|
}
|
|
4750
5709
|
);
|
|
4751
5710
|
};
|
|
4752
|
-
var
|
|
4753
|
-
({ aside, tone = "muted", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4754
|
-
"div",
|
|
4755
|
-
{
|
|
4756
|
-
ref,
|
|
4757
|
-
className: cn(
|
|
4758
|
-
"flex items-baseline gap-2 text-meta font-semibold uppercase tracking-wide",
|
|
4759
|
-
tone === "muted" && "text-muted-foreground",
|
|
4760
|
-
tone === "foreground" && "text-foreground",
|
|
4761
|
-
tone === "accent" && "text-primary",
|
|
4762
|
-
className
|
|
4763
|
-
),
|
|
4764
|
-
...props,
|
|
4765
|
-
children: [
|
|
4766
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children }),
|
|
4767
|
-
aside != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto shrink-0 font-normal normal-case tracking-normal text-muted-foreground", children: aside }) : null
|
|
4768
|
-
]
|
|
4769
|
-
}
|
|
4770
|
-
)
|
|
4771
|
-
);
|
|
4772
|
-
Eyebrow.displayName = "Eyebrow";
|
|
4773
|
-
var PanelBox = React23__namespace.forwardRef(
|
|
5711
|
+
var PanelBox = React24__namespace.forwardRef(
|
|
4774
5712
|
({ title, aside, flush, className, headerClassName, bodyClassName, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4775
5713
|
Card,
|
|
4776
5714
|
{
|
|
@@ -4861,13 +5799,13 @@ function PanelStack({
|
|
|
4861
5799
|
headerClassName,
|
|
4862
5800
|
bodyClassName
|
|
4863
5801
|
}) {
|
|
4864
|
-
const groupRef =
|
|
4865
|
-
const refs =
|
|
4866
|
-
const [collapsed, setCollapsed] =
|
|
5802
|
+
const groupRef = React24__namespace.useRef(null);
|
|
5803
|
+
const refs = React24__namespace.useRef({});
|
|
5804
|
+
const [collapsed, setCollapsed] = React24__namespace.useState(
|
|
4867
5805
|
() => Object.fromEntries(sections.map((s) => [s.id, !!s.defaultCollapsed]))
|
|
4868
5806
|
);
|
|
4869
|
-
const didInit =
|
|
4870
|
-
|
|
5807
|
+
const didInit = React24__namespace.useRef(false);
|
|
5808
|
+
React24__namespace.useLayoutEffect(() => {
|
|
4871
5809
|
if (didInit.current) return;
|
|
4872
5810
|
didInit.current = true;
|
|
4873
5811
|
const targets = sections.filter((s) => s.defaultCollapsed);
|
|
@@ -4899,18 +5837,18 @@ function PanelStack({
|
|
|
4899
5837
|
for (const s of targets) refs.current[s.id]?.collapse();
|
|
4900
5838
|
group.setLayout(next);
|
|
4901
5839
|
}, []);
|
|
4902
|
-
const notify =
|
|
4903
|
-
|
|
5840
|
+
const notify = React24__namespace.useRef(onCollapsedChange);
|
|
5841
|
+
React24__namespace.useEffect(() => {
|
|
4904
5842
|
notify.current = onCollapsedChange;
|
|
4905
5843
|
}, [onCollapsedChange]);
|
|
4906
|
-
const collapsedRef =
|
|
5844
|
+
const collapsedRef = React24__namespace.useRef(collapsed);
|
|
4907
5845
|
collapsedRef.current = collapsed;
|
|
4908
|
-
const collapsePanel =
|
|
5846
|
+
const collapsePanel = React24__namespace.useCallback((id) => {
|
|
4909
5847
|
const ref = refs.current[id];
|
|
4910
5848
|
if (!ref || ref.isCollapsed()) return;
|
|
4911
5849
|
ref.collapse();
|
|
4912
5850
|
}, []);
|
|
4913
|
-
const expandPanel =
|
|
5851
|
+
const expandPanel = React24__namespace.useCallback((id) => {
|
|
4914
5852
|
const ref = refs.current[id];
|
|
4915
5853
|
if (!ref || !ref.isCollapsed()) return;
|
|
4916
5854
|
ref.expand();
|
|
@@ -4928,7 +5866,7 @@ function PanelStack({
|
|
|
4928
5866
|
[donorId]: donorPct - share
|
|
4929
5867
|
});
|
|
4930
5868
|
}, []);
|
|
4931
|
-
const toggle =
|
|
5869
|
+
const toggle = React24__namespace.useCallback(
|
|
4932
5870
|
(id) => {
|
|
4933
5871
|
const ref = refs.current[id];
|
|
4934
5872
|
if (!ref) return;
|
|
@@ -4937,7 +5875,7 @@ function PanelStack({
|
|
|
4937
5875
|
},
|
|
4938
5876
|
[expandPanel, collapsePanel]
|
|
4939
5877
|
);
|
|
4940
|
-
|
|
5878
|
+
React24__namespace.useImperativeHandle(
|
|
4941
5879
|
stackRef,
|
|
4942
5880
|
() => ({
|
|
4943
5881
|
expand: expandPanel,
|
|
@@ -4961,7 +5899,7 @@ function PanelStack({
|
|
|
4961
5899
|
const Icon = section.icon;
|
|
4962
5900
|
const isCollapsed = collapsed[section.id];
|
|
4963
5901
|
const flush = index > 0 && (isCollapsed || collapsed[sections[index - 1].id]);
|
|
4964
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5902
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React24__namespace.Fragment, { children: [
|
|
4965
5903
|
index > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4966
5904
|
ResizableHandle,
|
|
4967
5905
|
{
|
|
@@ -5015,7 +5953,7 @@ function PanelStack({
|
|
|
5015
5953
|
children: [
|
|
5016
5954
|
isCollapsed ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-5 w-5 shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-5 w-5 shrink-0" }),
|
|
5017
5955
|
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
5018
|
-
typeof section.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-
|
|
5956
|
+
typeof section.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm font-semibold uppercase tracking-wide", children: section.title }) : (
|
|
5019
5957
|
// Custom node: rendered as-is so the consumer owns the
|
|
5020
5958
|
// styling (icon, casing, colour, badges…).
|
|
5021
5959
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex min-w-0 flex-1 items-center", children: section.title })
|
|
@@ -5057,7 +5995,7 @@ function PanelStack({
|
|
|
5057
5995
|
) })
|
|
5058
5996
|
);
|
|
5059
5997
|
}
|
|
5060
|
-
var PropertyList =
|
|
5998
|
+
var PropertyList = React24__namespace.forwardRef(
|
|
5061
5999
|
({ labelWidth = 78, className, style, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5062
6000
|
"dl",
|
|
5063
6001
|
{
|
|
@@ -5073,7 +6011,7 @@ var PropertyList = React23__namespace.forwardRef(
|
|
|
5073
6011
|
)
|
|
5074
6012
|
);
|
|
5075
6013
|
PropertyList.displayName = "PropertyList";
|
|
5076
|
-
var PropertyRow =
|
|
6014
|
+
var PropertyRow = React24__namespace.forwardRef(
|
|
5077
6015
|
({ label, mono, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5078
6016
|
"div",
|
|
5079
6017
|
{
|
|
@@ -5081,55 +6019,14 @@ var PropertyRow = React23__namespace.forwardRef(
|
|
|
5081
6019
|
className: cn("flex items-baseline gap-2 py-1", className),
|
|
5082
6020
|
...props,
|
|
5083
6021
|
children: [
|
|
5084
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "shrink-0 truncate text-
|
|
5085
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: cn("min-w-0 flex-1", mono && "font-mono text-
|
|
6022
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "shrink-0 truncate text-sm text-muted-foreground [width:var(--property-label-width,78px)]", children: label }),
|
|
6023
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: cn("min-w-0 flex-1", mono && "font-mono text-sm"), children })
|
|
5086
6024
|
]
|
|
5087
6025
|
}
|
|
5088
6026
|
)
|
|
5089
6027
|
);
|
|
5090
6028
|
PropertyRow.displayName = "PropertyRow";
|
|
5091
|
-
var
|
|
5092
|
-
({ tone, crumbs, chips, actions, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5093
|
-
"div",
|
|
5094
|
-
{
|
|
5095
|
-
ref,
|
|
5096
|
-
className: cn(
|
|
5097
|
-
"flex shrink-0 items-center gap-2.5 border-b border-border bg-card px-4 py-2.5",
|
|
5098
|
-
className
|
|
5099
|
-
),
|
|
5100
|
-
...props,
|
|
5101
|
-
children: [
|
|
5102
|
-
tone ? /* @__PURE__ */ jsxRuntime.jsx(StatusDot, { tone, size: "lg" }) : null,
|
|
5103
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center gap-1.5", children: crumbs.map((crumb, i) => {
|
|
5104
|
-
const last = i === crumbs.length - 1;
|
|
5105
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(React23__namespace.Fragment, { children: [
|
|
5106
|
-
i > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5107
|
-
lucideReact.ChevronRight,
|
|
5108
|
-
{
|
|
5109
|
-
"aria-hidden": true,
|
|
5110
|
-
className: "size-3.5 shrink-0 text-muted-foreground/60"
|
|
5111
|
-
}
|
|
5112
|
-
) : null,
|
|
5113
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5114
|
-
"span",
|
|
5115
|
-
{
|
|
5116
|
-
className: cn(
|
|
5117
|
-
"min-w-0 truncate font-mono",
|
|
5118
|
-
last ? "text-base font-semibold text-foreground" : "text-muted-foreground"
|
|
5119
|
-
),
|
|
5120
|
-
children: crumb
|
|
5121
|
-
}
|
|
5122
|
-
)
|
|
5123
|
-
] }, i);
|
|
5124
|
-
}) }),
|
|
5125
|
-
chips ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center gap-1.5", children: chips }) : null,
|
|
5126
|
-
actions ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: actions }) : null
|
|
5127
|
-
]
|
|
5128
|
-
}
|
|
5129
|
-
)
|
|
5130
|
-
);
|
|
5131
|
-
RecordHeader.displayName = "RecordHeader";
|
|
5132
|
-
var ProposalCard = React23__namespace.forwardRef(
|
|
6029
|
+
var ProposalCard = React24__namespace.forwardRef(
|
|
5133
6030
|
({
|
|
5134
6031
|
title,
|
|
5135
6032
|
source,
|
|
@@ -5145,23 +6042,23 @@ var ProposalCard = React23__namespace.forwardRef(
|
|
|
5145
6042
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-1", children: [
|
|
5146
6043
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
5147
6044
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-medium", children: title }),
|
|
5148
|
-
source != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
6045
|
+
source != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: source }) : null
|
|
5149
6046
|
] }),
|
|
5150
6047
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border border-border bg-muted/30 p-2", children })
|
|
5151
6048
|
] }),
|
|
5152
6049
|
evidence ? /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-1", children: [
|
|
5153
6050
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
5154
6051
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-medium", children: evidenceTitle }),
|
|
5155
|
-
evidenceMeta != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
6052
|
+
evidenceMeta != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: evidenceMeta }) : null
|
|
5156
6053
|
] }),
|
|
5157
6054
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden border border-border", children: evidence })
|
|
5158
6055
|
] }) : null,
|
|
5159
|
-
consequence != null ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
6056
|
+
consequence != null ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: consequence }) : null,
|
|
5160
6057
|
actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-1.5", children: actions }) : null
|
|
5161
6058
|
] })
|
|
5162
6059
|
);
|
|
5163
6060
|
ProposalCard.displayName = "ProposalCard";
|
|
5164
|
-
var DotRating =
|
|
6061
|
+
var DotRating = React24__namespace.forwardRef(
|
|
5165
6062
|
({ value, max = 3, onChange, readOnly, label, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5166
6063
|
"div",
|
|
5167
6064
|
{
|
|
@@ -5206,7 +6103,7 @@ var DotRating = React23__namespace.forwardRef(
|
|
|
5206
6103
|
)
|
|
5207
6104
|
);
|
|
5208
6105
|
DotRating.displayName = "DotRating";
|
|
5209
|
-
var RatingControl =
|
|
6106
|
+
var RatingControl = React24__namespace.forwardRef(
|
|
5210
6107
|
({
|
|
5211
6108
|
verdict,
|
|
5212
6109
|
onVerdictChange,
|
|
@@ -5225,7 +6122,7 @@ var RatingControl = React23__namespace.forwardRef(
|
|
|
5225
6122
|
className: cn("flex flex-col gap-2 border border-border bg-card p-2", className),
|
|
5226
6123
|
...props,
|
|
5227
6124
|
children: [
|
|
5228
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-
|
|
6125
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
5229
6126
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "Your verdict" }),
|
|
5230
6127
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "becomes a Learning" }),
|
|
5231
6128
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1" }),
|
|
@@ -5240,7 +6137,7 @@ var RatingControl = React23__namespace.forwardRef(
|
|
|
5240
6137
|
"aria-checked": verdict === v,
|
|
5241
6138
|
onClick: () => onVerdictChange?.(v),
|
|
5242
6139
|
className: cn(
|
|
5243
|
-
"h-[22px] px-2 text-
|
|
6140
|
+
"h-[22px] px-2 text-sm capitalize",
|
|
5244
6141
|
verdict === v ? v === "appreciate" ? "bg-success text-success-foreground" : "bg-warning text-warning-foreground" : "text-muted-foreground hover:bg-accent"
|
|
5245
6142
|
),
|
|
5246
6143
|
children: v
|
|
@@ -5248,11 +6145,11 @@ var RatingControl = React23__namespace.forwardRef(
|
|
|
5248
6145
|
v
|
|
5249
6146
|
)) }),
|
|
5250
6147
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
5251
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
6148
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "weight" }),
|
|
5252
6149
|
/* @__PURE__ */ jsxRuntime.jsx(DotRating, { value: weight, max: maxWeight, onChange: onWeightChange }),
|
|
5253
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
6150
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm tabular-nums", children: weight })
|
|
5254
6151
|
] }),
|
|
5255
|
-
refines != null ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
6152
|
+
refines != null ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
5256
6153
|
"refines ",
|
|
5257
6154
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: refines })
|
|
5258
6155
|
] }) : null
|
|
@@ -5263,13 +6160,54 @@ var RatingControl = React23__namespace.forwardRef(
|
|
|
5263
6160
|
)
|
|
5264
6161
|
);
|
|
5265
6162
|
RatingControl.displayName = "RatingControl";
|
|
5266
|
-
var
|
|
6163
|
+
var RecordHeader = React24__namespace.forwardRef(
|
|
6164
|
+
({ tone, crumbs, chips, actions, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6165
|
+
"div",
|
|
6166
|
+
{
|
|
6167
|
+
ref,
|
|
6168
|
+
className: cn(
|
|
6169
|
+
"flex shrink-0 items-center gap-2.5 border-b border-border bg-card px-4 py-2.5",
|
|
6170
|
+
className
|
|
6171
|
+
),
|
|
6172
|
+
...props,
|
|
6173
|
+
children: [
|
|
6174
|
+
tone ? /* @__PURE__ */ jsxRuntime.jsx(StatusDot, { tone, size: "lg" }) : null,
|
|
6175
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center gap-1.5", children: crumbs.map((crumb, i) => {
|
|
6176
|
+
const last = i === crumbs.length - 1;
|
|
6177
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React24__namespace.Fragment, { children: [
|
|
6178
|
+
i > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6179
|
+
lucideReact.ChevronRight,
|
|
6180
|
+
{
|
|
6181
|
+
"aria-hidden": true,
|
|
6182
|
+
className: "size-3.5 shrink-0 text-muted-foreground/60"
|
|
6183
|
+
}
|
|
6184
|
+
) : null,
|
|
6185
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6186
|
+
"span",
|
|
6187
|
+
{
|
|
6188
|
+
className: cn(
|
|
6189
|
+
"min-w-0 truncate font-mono",
|
|
6190
|
+
last ? "text-base font-semibold text-foreground" : "text-muted-foreground"
|
|
6191
|
+
),
|
|
6192
|
+
children: crumb
|
|
6193
|
+
}
|
|
6194
|
+
)
|
|
6195
|
+
] }, i);
|
|
6196
|
+
}) }),
|
|
6197
|
+
chips ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center gap-1.5", children: chips }) : null,
|
|
6198
|
+
actions ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: actions }) : null
|
|
6199
|
+
]
|
|
6200
|
+
}
|
|
6201
|
+
)
|
|
6202
|
+
);
|
|
6203
|
+
RecordHeader.displayName = "RecordHeader";
|
|
6204
|
+
var RepairNote = React24__namespace.forwardRef(
|
|
5267
6205
|
({ from, to, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5268
6206
|
"div",
|
|
5269
6207
|
{
|
|
5270
6208
|
ref,
|
|
5271
6209
|
className: cn(
|
|
5272
|
-
"flex flex-wrap items-center gap-1 py-0.5 pl-4 text-
|
|
6210
|
+
"flex flex-wrap items-center gap-1 py-0.5 pl-4 text-sm text-muted-foreground",
|
|
5273
6211
|
className
|
|
5274
6212
|
),
|
|
5275
6213
|
...props,
|
|
@@ -5282,13 +6220,13 @@ var RepairNote = React23__namespace.forwardRef(
|
|
|
5282
6220
|
)
|
|
5283
6221
|
);
|
|
5284
6222
|
RepairNote.displayName = "RepairNote";
|
|
5285
|
-
var RetryNote =
|
|
6223
|
+
var RetryNote = React24__namespace.forwardRef(
|
|
5286
6224
|
({ attempt, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5287
6225
|
"div",
|
|
5288
6226
|
{
|
|
5289
6227
|
ref,
|
|
5290
6228
|
className: cn(
|
|
5291
|
-
"flex flex-wrap items-baseline gap-1.5 py-0.5 pl-4 text-
|
|
6229
|
+
"flex flex-wrap items-baseline gap-1.5 py-0.5 pl-4 text-sm text-muted-foreground",
|
|
5292
6230
|
className
|
|
5293
6231
|
),
|
|
5294
6232
|
...props,
|
|
@@ -5308,7 +6246,7 @@ function OptionRow({ option }) {
|
|
|
5308
6246
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: option.label }),
|
|
5309
6247
|
option.badge != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto pl-2", children: option.badge })
|
|
5310
6248
|
] }),
|
|
5311
|
-
option.description != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
6249
|
+
option.description != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: option.description })
|
|
5312
6250
|
] });
|
|
5313
6251
|
}
|
|
5314
6252
|
function RichSelect({
|
|
@@ -5422,6 +6360,138 @@ function RichSelect({
|
|
|
5422
6360
|
)
|
|
5423
6361
|
] });
|
|
5424
6362
|
}
|
|
6363
|
+
function describeSlice(select, declared) {
|
|
6364
|
+
const out = [];
|
|
6365
|
+
if (select.time) {
|
|
6366
|
+
const { axis, from, to } = select.time;
|
|
6367
|
+
out.push({
|
|
6368
|
+
axisKind: "time",
|
|
6369
|
+
text: `time ${from ?? "\u2026"} \u2192 ${to ?? "\u2026"} \xB7 axis ${axis}`,
|
|
6370
|
+
undeclared: declared ? declared.time == null : void 0
|
|
6371
|
+
});
|
|
6372
|
+
}
|
|
6373
|
+
if (select.geo) {
|
|
6374
|
+
const { axis, vocab, in: values } = select.geo;
|
|
6375
|
+
out.push({
|
|
6376
|
+
axisKind: "geo",
|
|
6377
|
+
text: `geo ${values.join(", ")} \xB7 axis ${axis}${vocab ? ` \xB7 ${vocab}` : ""}`,
|
|
6378
|
+
undeclared: declared ? declared.geo == null : void 0
|
|
6379
|
+
});
|
|
6380
|
+
}
|
|
6381
|
+
for (const [dim, values] of Object.entries(select.dims ?? {})) {
|
|
6382
|
+
out.push({
|
|
6383
|
+
axisKind: dim,
|
|
6384
|
+
text: `${dim} ${values.join(", ")}`,
|
|
6385
|
+
undeclared: declared ? !(declared.dims ?? []).includes(dim) : void 0
|
|
6386
|
+
});
|
|
6387
|
+
}
|
|
6388
|
+
return out;
|
|
6389
|
+
}
|
|
6390
|
+
var SliceSummary = React24__namespace.forwardRef(
|
|
6391
|
+
({ select, declaredAxes, modelLabel, variant = "line", className, ...props }, ref) => {
|
|
6392
|
+
const lines = select ? describeSlice(select, declaredAxes) : [];
|
|
6393
|
+
if (!lines.length) {
|
|
6394
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6395
|
+
"div",
|
|
6396
|
+
{
|
|
6397
|
+
ref,
|
|
6398
|
+
className: cn("text-sm text-muted-foreground/70", className),
|
|
6399
|
+
...props,
|
|
6400
|
+
children: "not sliced \u2014 the whole model"
|
|
6401
|
+
}
|
|
6402
|
+
);
|
|
6403
|
+
}
|
|
6404
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6405
|
+
"div",
|
|
6406
|
+
{
|
|
6407
|
+
ref,
|
|
6408
|
+
className: cn(
|
|
6409
|
+
"flex min-w-0 flex-col gap-0.5",
|
|
6410
|
+
variant === "block" && "rounded-control border border-border p-2",
|
|
6411
|
+
className
|
|
6412
|
+
),
|
|
6413
|
+
...props,
|
|
6414
|
+
children: lines.map((line) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
6415
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6416
|
+
"span",
|
|
6417
|
+
{
|
|
6418
|
+
className: cn(
|
|
6419
|
+
"truncate text-sm",
|
|
6420
|
+
line.undeclared ? "text-destructive line-through decoration-destructive/50" : "text-muted-foreground"
|
|
6421
|
+
),
|
|
6422
|
+
children: line.text
|
|
6423
|
+
}
|
|
6424
|
+
),
|
|
6425
|
+
line.undeclared ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-destructive", children: [
|
|
6426
|
+
modelLabel ?? "this model",
|
|
6427
|
+
" declares no ",
|
|
6428
|
+
line.axisKind,
|
|
6429
|
+
" axis, so it cannot be sliced by one. Declaring one is a modelling act."
|
|
6430
|
+
] }) : null
|
|
6431
|
+
] }, line.axisKind))
|
|
6432
|
+
}
|
|
6433
|
+
);
|
|
6434
|
+
}
|
|
6435
|
+
);
|
|
6436
|
+
SliceSummary.displayName = "SliceSummary";
|
|
6437
|
+
var RuleRow = React24__namespace.forwardRef(
|
|
6438
|
+
({ match, allow, properties, select, egress, readOnly, className, ...props }, ref) => {
|
|
6439
|
+
const excluded = properties?.exclude ?? [];
|
|
6440
|
+
const sends = egress?.may_send ?? [];
|
|
6441
|
+
const sliced = Boolean(
|
|
6442
|
+
select?.time || select?.geo || Object.keys(select?.dims ?? {}).length
|
|
6443
|
+
);
|
|
6444
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6445
|
+
"div",
|
|
6446
|
+
{
|
|
6447
|
+
ref,
|
|
6448
|
+
className: cn(
|
|
6449
|
+
// The verb column is `5ch` — the width of `allow` in the mono face it
|
|
6450
|
+
// is set in. A character unit rather than a pixel one, so the indent
|
|
6451
|
+
// holds when `data-density` moves the font size, and so every row
|
|
6452
|
+
// aligns whether its verb is `allow` or `deny`.
|
|
6453
|
+
"grid min-w-0 grid-cols-[5ch_minmax(0,1fr)] items-baseline gap-x-2 gap-y-0.5",
|
|
6454
|
+
"rounded-control px-1 py-1",
|
|
6455
|
+
!readOnly && "hover:bg-accent",
|
|
6456
|
+
className
|
|
6457
|
+
),
|
|
6458
|
+
...props,
|
|
6459
|
+
children: [
|
|
6460
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6461
|
+
"span",
|
|
6462
|
+
{
|
|
6463
|
+
className: cn(
|
|
6464
|
+
"font-mono text-sm",
|
|
6465
|
+
allow ? "text-muted-foreground" : "font-semibold text-destructive"
|
|
6466
|
+
),
|
|
6467
|
+
children: allow ? "allow" : "deny"
|
|
6468
|
+
}
|
|
6469
|
+
),
|
|
6470
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6471
|
+
AddressChip,
|
|
6472
|
+
{
|
|
6473
|
+
address: match,
|
|
6474
|
+
tone: allow ? "allowed" : "denied",
|
|
6475
|
+
className: "min-w-0"
|
|
6476
|
+
}
|
|
6477
|
+
),
|
|
6478
|
+
excluded.length || sliced || sends.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-start-2 flex min-w-0 flex-col gap-0.5", children: [
|
|
6479
|
+
excluded.length ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "truncate text-sm text-muted-foreground", children: [
|
|
6480
|
+
"excludes ",
|
|
6481
|
+
excluded.join(", ")
|
|
6482
|
+
] }) : null,
|
|
6483
|
+
sliced ? /* @__PURE__ */ jsxRuntime.jsx(SliceSummary, { select, variant: "line" }) : null,
|
|
6484
|
+
sends.length ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "truncate text-sm text-muted-foreground", children: [
|
|
6485
|
+
"may send ",
|
|
6486
|
+
sends.join(", ")
|
|
6487
|
+
] }) : null
|
|
6488
|
+
] }) : null
|
|
6489
|
+
]
|
|
6490
|
+
}
|
|
6491
|
+
);
|
|
6492
|
+
}
|
|
6493
|
+
);
|
|
6494
|
+
RuleRow.displayName = "RuleRow";
|
|
5425
6495
|
var SearchInput = ({
|
|
5426
6496
|
value,
|
|
5427
6497
|
onChange,
|
|
@@ -5441,14 +6511,14 @@ var SearchInput = ({
|
|
|
5441
6511
|
"flex w-full rounded-control border border-input bg-background ring-offset-background",
|
|
5442
6512
|
"placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2",
|
|
5443
6513
|
"focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
5444
|
-
inputSize === "sm" ? "h-[26px] px-2 py-0 text-
|
|
6514
|
+
inputSize === "sm" ? "h-[26px] px-2 py-0 text-sm" : "h-10 px-3 py-2 text-base",
|
|
5445
6515
|
className
|
|
5446
6516
|
),
|
|
5447
6517
|
...props
|
|
5448
6518
|
}
|
|
5449
6519
|
);
|
|
5450
6520
|
};
|
|
5451
|
-
var SectionHeader =
|
|
6521
|
+
var SectionHeader = React24__namespace.forwardRef(({ icon, title, count, actions, bare, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5452
6522
|
"div",
|
|
5453
6523
|
{
|
|
5454
6524
|
ref,
|
|
@@ -5461,13 +6531,13 @@ var SectionHeader = React23__namespace.forwardRef(({ icon, title, count, actions
|
|
|
5461
6531
|
children: [
|
|
5462
6532
|
icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center text-muted-foreground [&_svg]:size-3.5", children: icon }) : null,
|
|
5463
6533
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate font-medium", children: title }),
|
|
5464
|
-
count != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-
|
|
6534
|
+
count != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: count }) : null,
|
|
5465
6535
|
actions ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center gap-1", children: actions }) : null
|
|
5466
6536
|
]
|
|
5467
6537
|
}
|
|
5468
6538
|
));
|
|
5469
6539
|
SectionHeader.displayName = "SectionHeader";
|
|
5470
|
-
var Sparkline =
|
|
6540
|
+
var Sparkline = React24__namespace.forwardRef(
|
|
5471
6541
|
({
|
|
5472
6542
|
values,
|
|
5473
6543
|
width = 72,
|
|
@@ -5554,7 +6624,7 @@ function TabbedPanel({
|
|
|
5554
6624
|
footerClassName,
|
|
5555
6625
|
footerContent
|
|
5556
6626
|
}) {
|
|
5557
|
-
const [internalTab, setInternalTab] =
|
|
6627
|
+
const [internalTab, setInternalTab] = React24__namespace.default.useState(defaultTab || tabs[0]?.value);
|
|
5558
6628
|
const currentTab = activeTab !== void 0 ? activeTab : internalTab;
|
|
5559
6629
|
const handleTabChange = (value) => {
|
|
5560
6630
|
if (activeTab === void 0) {
|
|
@@ -5562,9 +6632,9 @@ function TabbedPanel({
|
|
|
5562
6632
|
}
|
|
5563
6633
|
onTabChange?.(value);
|
|
5564
6634
|
};
|
|
5565
|
-
const uid =
|
|
6635
|
+
const uid = React24__namespace.default.useId();
|
|
5566
6636
|
const panelId = (value) => `${uid}-panel-${value}`;
|
|
5567
|
-
const items =
|
|
6637
|
+
const items = React24__namespace.default.useMemo(
|
|
5568
6638
|
() => tabs.map((tab) => ({
|
|
5569
6639
|
key: tab.value,
|
|
5570
6640
|
name: tab.name ?? (typeof tab.label === "string" ? tab.label : tab.value),
|
|
@@ -5650,9 +6720,9 @@ var STATUS_LABEL = {
|
|
|
5650
6720
|
};
|
|
5651
6721
|
function renderResult(result) {
|
|
5652
6722
|
if (result == null) return null;
|
|
5653
|
-
if (
|
|
6723
|
+
if (React24__namespace.isValidElement(result)) return result;
|
|
5654
6724
|
if (typeof result !== "object") {
|
|
5655
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-
|
|
6725
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-sm", children: String(result) });
|
|
5656
6726
|
}
|
|
5657
6727
|
const entries = Object.entries(result);
|
|
5658
6728
|
const scalars = entries.filter(([, v]) => v == null || typeof v !== "object");
|
|
@@ -5660,12 +6730,12 @@ function renderResult(result) {
|
|
|
5660
6730
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5661
6731
|
scalars.length ? /* @__PURE__ */ jsxRuntime.jsx(PropertyList, { labelWidth: 96, children: scalars.map(([k, v]) => /* @__PURE__ */ jsxRuntime.jsx(PropertyRow, { label: k, mono: true, className: "py-0.5", children: v == null ? "\u2014" : String(v) }, k)) }) : null,
|
|
5662
6732
|
nested.map(([k, v]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
5663
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5664
|
-
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "max-h-40 overflow-auto border border-border bg-muted/40 p-1.5 font-mono text-
|
|
6733
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: k }),
|
|
6734
|
+
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "max-h-40 overflow-auto border border-border bg-muted/40 p-1.5 font-mono text-sm", children: JSON.stringify(v, null, 2) })
|
|
5665
6735
|
] }, k))
|
|
5666
6736
|
] });
|
|
5667
6737
|
}
|
|
5668
|
-
var TaskGanttDetailCard =
|
|
6738
|
+
var TaskGanttDetailCard = React24__namespace.forwardRef(({ task, elapsedMs, formatDuration = defaultFormatDuration, className, ...props }, ref) => {
|
|
5669
6739
|
const status = task.status ?? "succeeded";
|
|
5670
6740
|
const ms = task.durationMs ?? elapsedMs;
|
|
5671
6741
|
const duration = task.duration ?? (ms != null ? formatDuration(ms) : "\u2014");
|
|
@@ -5673,17 +6743,17 @@ var TaskGanttDetailCard = React23__namespace.forwardRef(({ task, elapsedMs, form
|
|
|
5673
6743
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex flex-col gap-2", className), ...props, children: [
|
|
5674
6744
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
5675
6745
|
/* @__PURE__ */ jsxRuntime.jsx(StatusDot, { tone: DOT[status], size: "md", className: "translate-y-px" }),
|
|
5676
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate font-mono text-
|
|
5677
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-mono text-
|
|
6746
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate font-mono text-sm font-medium", children: task.key }),
|
|
6747
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-mono text-sm text-muted-foreground tabular-nums", children: duration })
|
|
5678
6748
|
] }),
|
|
5679
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-
|
|
6749
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-muted-foreground", children: [
|
|
5680
6750
|
STATUS_LABEL[status],
|
|
5681
6751
|
task.summary != null ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5682
6752
|
" \xB7 ",
|
|
5683
6753
|
task.summary
|
|
5684
6754
|
] }) : null
|
|
5685
6755
|
] }),
|
|
5686
|
-
attempts.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5", children: attempts.map((a, i) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
6756
|
+
attempts.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5", children: attempts.map((a, i) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
5687
6757
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium text-warning", children: [
|
|
5688
6758
|
"attempt ",
|
|
5689
6759
|
i + 1
|
|
@@ -5697,14 +6767,14 @@ var TaskGanttDetailCard = React23__namespace.forwardRef(({ task, elapsedMs, form
|
|
|
5697
6767
|
style: { borderColor: "var(--color-destructive)" },
|
|
5698
6768
|
className: "border-l-2 bg-destructive/10 px-2 py-1.5",
|
|
5699
6769
|
children: [
|
|
5700
|
-
task.error.code != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-
|
|
5701
|
-
task.error.message != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-
|
|
5702
|
-
task.error.detail != null ? /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "mt-1 max-h-32 overflow-auto whitespace-pre-wrap font-mono text-
|
|
6770
|
+
task.error.code != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-sm font-medium text-destructive", children: task.error.code }) : null,
|
|
6771
|
+
task.error.message != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm", children: task.error.message }) : null,
|
|
6772
|
+
task.error.detail != null ? /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "mt-1 max-h-32 overflow-auto whitespace-pre-wrap font-mono text-sm text-muted-foreground", children: task.error.detail }) : null
|
|
5703
6773
|
]
|
|
5704
6774
|
}
|
|
5705
6775
|
) : null,
|
|
5706
6776
|
task.result != null ? renderResult(task.result) : null,
|
|
5707
|
-
task.log != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border pt-1.5 font-mono text-
|
|
6777
|
+
task.log != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border pt-1.5 font-mono text-sm text-muted-foreground", children: task.log }) : null
|
|
5708
6778
|
] });
|
|
5709
6779
|
});
|
|
5710
6780
|
TaskGanttDetailCard.displayName = "TaskGanttDetailCard";
|
|
@@ -5731,7 +6801,7 @@ function place(seg, origin) {
|
|
|
5731
6801
|
}
|
|
5732
6802
|
return { start, duration: duration != null && duration > 0 ? duration : 0 };
|
|
5733
6803
|
}
|
|
5734
|
-
var TaskGantt =
|
|
6804
|
+
var TaskGantt = React24__namespace.forwardRef(
|
|
5735
6805
|
({
|
|
5736
6806
|
tasks,
|
|
5737
6807
|
origin,
|
|
@@ -5753,7 +6823,7 @@ var TaskGantt = React23__namespace.forwardRef(
|
|
|
5753
6823
|
}, ref) => {
|
|
5754
6824
|
const barHeight = density === "compact" ? 11 : 13;
|
|
5755
6825
|
const durationWidth = 40;
|
|
5756
|
-
const rows =
|
|
6826
|
+
const rows = React24__namespace.useMemo(() => {
|
|
5757
6827
|
const stamps = [];
|
|
5758
6828
|
for (const t of [...tasks, ...tasks.flatMap((t2) => t2.attempts ?? [])]) {
|
|
5759
6829
|
if (t.startedAt != null) stamps.push(toMs(t.startedAt));
|
|
@@ -5799,7 +6869,7 @@ var TaskGantt = React23__namespace.forwardRef(
|
|
|
5799
6869
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex flex-1", children: axis.slice(0, -1).map((label, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5800
6870
|
"span",
|
|
5801
6871
|
{
|
|
5802
|
-
className: "flex-1 border-l border-border pl-1 text-
|
|
6872
|
+
className: "flex-1 border-l border-border pl-1 text-sm text-muted-foreground tabular-nums",
|
|
5803
6873
|
children: label
|
|
5804
6874
|
},
|
|
5805
6875
|
i
|
|
@@ -5807,7 +6877,7 @@ var TaskGantt = React23__namespace.forwardRef(
|
|
|
5807
6877
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5808
6878
|
"span",
|
|
5809
6879
|
{
|
|
5810
|
-
className: "shrink-0 text-right text-
|
|
6880
|
+
className: "shrink-0 text-right text-sm text-muted-foreground tabular-nums",
|
|
5811
6881
|
style: { width: durationWidth },
|
|
5812
6882
|
children: lastLabel
|
|
5813
6883
|
}
|
|
@@ -5825,7 +6895,7 @@ var TaskGantt = React23__namespace.forwardRef(
|
|
|
5825
6895
|
"span",
|
|
5826
6896
|
{
|
|
5827
6897
|
className: cn(
|
|
5828
|
-
"shrink-0 truncate font-mono text-
|
|
6898
|
+
"shrink-0 truncate font-mono text-sm",
|
|
5829
6899
|
neverRan && "text-muted-foreground"
|
|
5830
6900
|
),
|
|
5831
6901
|
style: { width: labelWidth },
|
|
@@ -5866,7 +6936,7 @@ var TaskGantt = React23__namespace.forwardRef(
|
|
|
5866
6936
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5867
6937
|
"span",
|
|
5868
6938
|
{
|
|
5869
|
-
className: "shrink-0 text-right font-mono text-
|
|
6939
|
+
className: "shrink-0 text-right font-mono text-sm text-muted-foreground tabular-nums",
|
|
5870
6940
|
style: { width: durationWidth },
|
|
5871
6941
|
children: duration
|
|
5872
6942
|
}
|
|
@@ -5914,8 +6984,22 @@ var TaskGantt = React23__namespace.forwardRef(
|
|
|
5914
6984
|
}
|
|
5915
6985
|
);
|
|
5916
6986
|
TaskGantt.displayName = "TaskGantt";
|
|
5917
|
-
var TaskNode =
|
|
5918
|
-
({
|
|
6987
|
+
var TaskNode = React24__namespace.forwardRef(
|
|
6988
|
+
({
|
|
6989
|
+
taskKey,
|
|
6990
|
+
bound,
|
|
6991
|
+
boundSwatch,
|
|
6992
|
+
boundPalette,
|
|
6993
|
+
status,
|
|
6994
|
+
tags,
|
|
6995
|
+
meta,
|
|
6996
|
+
selected,
|
|
6997
|
+
gate,
|
|
6998
|
+
dim,
|
|
6999
|
+
ghost,
|
|
7000
|
+
className,
|
|
7001
|
+
...props
|
|
7002
|
+
}, ref) => {
|
|
5919
7003
|
if (ghost) {
|
|
5920
7004
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5921
7005
|
"div",
|
|
@@ -5923,7 +7007,7 @@ var TaskNode = React23__namespace.forwardRef(
|
|
|
5923
7007
|
ref,
|
|
5924
7008
|
className: cn(
|
|
5925
7009
|
"flex w-[146px] flex-col gap-1 border border-dashed border-border p-2",
|
|
5926
|
-
"text-
|
|
7010
|
+
"text-sm text-muted-foreground",
|
|
5927
7011
|
className
|
|
5928
7012
|
),
|
|
5929
7013
|
...props,
|
|
@@ -5964,12 +7048,12 @@ var TaskNode = React23__namespace.forwardRef(
|
|
|
5964
7048
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate font-mono", children: taskKey })
|
|
5965
7049
|
] }),
|
|
5966
7050
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
5967
|
-
/* @__PURE__ */ jsxRuntime.jsx(BoundChip, { bound }),
|
|
7051
|
+
/* @__PURE__ */ jsxRuntime.jsx(BoundChip, { bound, swatch: boundSwatch, palette: boundPalette }),
|
|
5968
7052
|
tags?.map((tag, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5969
7053
|
"span",
|
|
5970
7054
|
{
|
|
5971
7055
|
className: cn(
|
|
5972
|
-
"shrink-0 border px-1 text-
|
|
7056
|
+
"shrink-0 border px-1 text-sm",
|
|
5973
7057
|
tag.tone === "warning" ? "border-warning/40 text-warning" : "border-border text-muted-foreground"
|
|
5974
7058
|
),
|
|
5975
7059
|
children: tag.label
|
|
@@ -5981,7 +7065,7 @@ var TaskNode = React23__namespace.forwardRef(
|
|
|
5981
7065
|
"div",
|
|
5982
7066
|
{
|
|
5983
7067
|
className: cn(
|
|
5984
|
-
"truncate text-
|
|
7068
|
+
"truncate text-sm",
|
|
5985
7069
|
gate ? "text-warning" : "text-muted-foreground"
|
|
5986
7070
|
),
|
|
5987
7071
|
children: meta
|
|
@@ -5993,14 +7077,14 @@ var TaskNode = React23__namespace.forwardRef(
|
|
|
5993
7077
|
}
|
|
5994
7078
|
);
|
|
5995
7079
|
TaskNode.displayName = "TaskNode";
|
|
5996
|
-
var TemplatePicker =
|
|
7080
|
+
var TemplatePicker = React24__namespace.forwardRef(({ heading, options, value, onSelect, footnote, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5997
7081
|
"div",
|
|
5998
7082
|
{
|
|
5999
7083
|
ref,
|
|
6000
7084
|
className: cn("flex w-full flex-col border border-border bg-card", className),
|
|
6001
7085
|
...props,
|
|
6002
7086
|
children: [
|
|
6003
|
-
heading != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 shrink-0 items-center border-b border-border px-2 text-
|
|
7087
|
+
heading != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 shrink-0 items-center border-b border-border px-2 text-sm text-muted-foreground", children: heading }) : null,
|
|
6004
7088
|
/* @__PURE__ */ jsxRuntime.jsx("div", { role: "listbox", className: "flex flex-col", children: options.map((o) => {
|
|
6005
7089
|
const disabled = o.unavailable != null;
|
|
6006
7090
|
const selected = value === o.id;
|
|
@@ -6019,16 +7103,16 @@ var TemplatePicker = React23__namespace.forwardRef(({ heading, options, value, o
|
|
|
6019
7103
|
),
|
|
6020
7104
|
children: [
|
|
6021
7105
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-3 shrink-0 text-primary", children: selected ? "\u2022" : "" }),
|
|
6022
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-mono text-
|
|
6023
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-
|
|
7106
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-mono text-sm", children: o.id }),
|
|
7107
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: o.kind }),
|
|
6024
7108
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1" }),
|
|
6025
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 truncate text-
|
|
7109
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 truncate text-sm text-muted-foreground", children: o.unavailable ?? o.note })
|
|
6026
7110
|
]
|
|
6027
7111
|
},
|
|
6028
7112
|
o.id
|
|
6029
7113
|
);
|
|
6030
7114
|
}) }),
|
|
6031
|
-
footnote != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border px-2 py-1 text-
|
|
7115
|
+
footnote != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border px-2 py-1 text-sm text-muted-foreground", children: footnote }) : null
|
|
6032
7116
|
]
|
|
6033
7117
|
}
|
|
6034
7118
|
));
|
|
@@ -6044,14 +7128,14 @@ var MARKER = {
|
|
|
6044
7128
|
output: "\u2192",
|
|
6045
7129
|
comment: "#"
|
|
6046
7130
|
};
|
|
6047
|
-
var Terminal =
|
|
7131
|
+
var Terminal = React24__namespace.forwardRef(
|
|
6048
7132
|
({ cursor, columnTemplate = "150px minmax(0,1fr) auto auto", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6049
7133
|
"div",
|
|
6050
7134
|
{
|
|
6051
7135
|
ref,
|
|
6052
7136
|
style: { "--terminal-cols": columnTemplate },
|
|
6053
7137
|
className: cn(
|
|
6054
|
-
"overflow-x-auto border border-border bg-muted/40 p-2 font-mono text-
|
|
7138
|
+
"overflow-x-auto border border-border bg-muted/40 p-2 font-mono text-sm",
|
|
6055
7139
|
className
|
|
6056
7140
|
),
|
|
6057
7141
|
...props,
|
|
@@ -6069,7 +7153,7 @@ var Terminal = React23__namespace.forwardRef(
|
|
|
6069
7153
|
)
|
|
6070
7154
|
);
|
|
6071
7155
|
Terminal.displayName = "Terminal";
|
|
6072
|
-
var TerminalLine =
|
|
7156
|
+
var TerminalLine = React24__namespace.forwardRef(
|
|
6073
7157
|
({ kind = "output", level, levelColumn = 1, columns, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6074
7158
|
"div",
|
|
6075
7159
|
{
|
|
@@ -6100,7 +7184,7 @@ var TerminalLine = React23__namespace.forwardRef(
|
|
|
6100
7184
|
"min-w-0 truncate",
|
|
6101
7185
|
// A log tints its level cell and greys everything that is not the
|
|
6102
7186
|
// message; a transcript greys only its trailing cell.
|
|
6103
|
-
level ? i === levelColumn ? LEVEL[level] : i === columns.length - 1 ? void 0 : "text-muted-foreground" : i === columns.length - 1 && "text-muted-foreground"
|
|
7187
|
+
level ? i === levelColumn ? LEVEL[level] ?? "text-muted-foreground" : i === columns.length - 1 ? void 0 : "text-muted-foreground" : i === columns.length - 1 && "text-muted-foreground"
|
|
6104
7188
|
),
|
|
6105
7189
|
children: c
|
|
6106
7190
|
},
|
|
@@ -6111,10 +7195,10 @@ var TerminalLine = React23__namespace.forwardRef(
|
|
|
6111
7195
|
)
|
|
6112
7196
|
);
|
|
6113
7197
|
TerminalLine.displayName = "TerminalLine";
|
|
6114
|
-
var TimelineVariantContext =
|
|
7198
|
+
var TimelineVariantContext = React24__namespace.createContext("columns");
|
|
6115
7199
|
var RAIL_MARKER_OFFSET = "h-[0.692rem]";
|
|
6116
7200
|
var RAIL_FOOTER_TAIL = "h-[1.067rem]";
|
|
6117
|
-
var TimelineList =
|
|
7201
|
+
var TimelineList = React24__namespace.forwardRef(({ className, variant = "columns", children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TimelineVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { ref, className: cn("flex flex-col", className), ...props, children }) }));
|
|
6118
7202
|
TimelineList.displayName = "TimelineList";
|
|
6119
7203
|
function RailGutter({ marker }) {
|
|
6120
7204
|
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex w-2.5 shrink-0 flex-col items-center", children: [
|
|
@@ -6138,8 +7222,8 @@ function RailGutter({ marker }) {
|
|
|
6138
7222
|
)
|
|
6139
7223
|
] });
|
|
6140
7224
|
}
|
|
6141
|
-
var TimelineEntry =
|
|
6142
|
-
const variant =
|
|
7225
|
+
var TimelineEntry = React24__namespace.forwardRef(({ when, title, marker, className, children, ...props }, ref) => {
|
|
7226
|
+
const variant = React24__namespace.useContext(TimelineVariantContext);
|
|
6143
7227
|
if (variant === "rail") {
|
|
6144
7228
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6145
7229
|
"li",
|
|
@@ -6150,7 +7234,7 @@ var TimelineEntry = React23__namespace.forwardRef(({ when, title, marker, classN
|
|
|
6150
7234
|
children: [
|
|
6151
7235
|
/* @__PURE__ */ jsxRuntime.jsx(RailGutter, { marker }),
|
|
6152
7236
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 pb-4 group-last/entry:pb-0", children: [
|
|
6153
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
7237
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: when }),
|
|
6154
7238
|
title != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: title }) : null,
|
|
6155
7239
|
children
|
|
6156
7240
|
] })
|
|
@@ -6165,7 +7249,7 @@ var TimelineEntry = React23__namespace.forwardRef(({ when, title, marker, classN
|
|
|
6165
7249
|
className: cn("flex gap-2 border-b border-border py-1.5 last:border-b-0", className),
|
|
6166
7250
|
...props,
|
|
6167
7251
|
children: [
|
|
6168
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex w-[72px] shrink-0 items-baseline gap-1.5 text-
|
|
7252
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex w-[72px] shrink-0 items-baseline gap-1.5 text-sm text-muted-foreground", children: [
|
|
6169
7253
|
marker ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "translate-y-1", children: marker }) : null,
|
|
6170
7254
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: when })
|
|
6171
7255
|
] }),
|
|
@@ -6178,8 +7262,8 @@ var TimelineEntry = React23__namespace.forwardRef(({ when, title, marker, classN
|
|
|
6178
7262
|
);
|
|
6179
7263
|
});
|
|
6180
7264
|
TimelineEntry.displayName = "TimelineEntry";
|
|
6181
|
-
var TimelineFooter =
|
|
6182
|
-
const variant =
|
|
7265
|
+
var TimelineFooter = React24__namespace.forwardRef(({ className, children, ...props }, ref) => {
|
|
7266
|
+
const variant = React24__namespace.useContext(TimelineVariantContext);
|
|
6183
7267
|
if (variant === "rail") {
|
|
6184
7268
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6185
7269
|
"li",
|
|
@@ -6225,11 +7309,11 @@ function useTour(options) {
|
|
|
6225
7309
|
onComplete,
|
|
6226
7310
|
onExit
|
|
6227
7311
|
} = options;
|
|
6228
|
-
const [current, setCurrent] =
|
|
7312
|
+
const [current, setCurrent] = React24__namespace.useState(initialStep);
|
|
6229
7313
|
const total = steps.length;
|
|
6230
7314
|
const lastIndex = Math.max(total - 1, 0);
|
|
6231
7315
|
const clamped = Math.min(Math.max(current, 0), lastIndex);
|
|
6232
|
-
const goTo =
|
|
7316
|
+
const goTo = React24__namespace.useCallback(
|
|
6233
7317
|
(index) => {
|
|
6234
7318
|
setCurrent((prev2) => {
|
|
6235
7319
|
const next2 = Math.min(Math.max(index, 0), lastIndex);
|
|
@@ -6239,7 +7323,7 @@ function useTour(options) {
|
|
|
6239
7323
|
},
|
|
6240
7324
|
[lastIndex, onStepChange]
|
|
6241
7325
|
);
|
|
6242
|
-
const next =
|
|
7326
|
+
const next = React24__namespace.useCallback(() => {
|
|
6243
7327
|
setCurrent((prev2) => {
|
|
6244
7328
|
if (prev2 >= lastIndex) {
|
|
6245
7329
|
if (loop && total > 0) {
|
|
@@ -6253,7 +7337,7 @@ function useTour(options) {
|
|
|
6253
7337
|
return prev2 + 1;
|
|
6254
7338
|
});
|
|
6255
7339
|
}, [lastIndex, total, loop, onComplete, onStepChange]);
|
|
6256
|
-
const prev =
|
|
7340
|
+
const prev = React24__namespace.useCallback(() => {
|
|
6257
7341
|
setCurrent((p) => {
|
|
6258
7342
|
if (p <= 0) {
|
|
6259
7343
|
if (loop && total > 0) {
|
|
@@ -6266,10 +7350,10 @@ function useTour(options) {
|
|
|
6266
7350
|
return p - 1;
|
|
6267
7351
|
});
|
|
6268
7352
|
}, [lastIndex, total, loop, onStepChange]);
|
|
6269
|
-
const exit =
|
|
7353
|
+
const exit = React24__namespace.useCallback(() => {
|
|
6270
7354
|
onExit?.();
|
|
6271
7355
|
}, [onExit]);
|
|
6272
|
-
return
|
|
7356
|
+
return React24__namespace.useMemo(
|
|
6273
7357
|
() => ({
|
|
6274
7358
|
step: steps[clamped],
|
|
6275
7359
|
current: clamped,
|
|
@@ -6327,7 +7411,7 @@ function Tour({
|
|
|
6327
7411
|
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 p-3", children: [
|
|
6328
7412
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6329
7413
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "soft", className: "tracking-wider", children: badgeLabel }),
|
|
6330
|
-
showCounter && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
7414
|
+
showCounter && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
6331
7415
|
current + 1,
|
|
6332
7416
|
" / ",
|
|
6333
7417
|
total
|
|
@@ -6338,7 +7422,7 @@ function Tour({
|
|
|
6338
7422
|
{
|
|
6339
7423
|
variant: "ghost",
|
|
6340
7424
|
size: "sm",
|
|
6341
|
-
className: "-mr-1 h-7 gap-1 px-2 text-
|
|
7425
|
+
className: "-mr-1 h-7 gap-1 px-2 text-sm text-muted-foreground [&_svg]:size-3.5",
|
|
6342
7426
|
onClick: ctrl.exit,
|
|
6343
7427
|
children: [
|
|
6344
7428
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}),
|
|
@@ -6432,7 +7516,7 @@ function Tour({
|
|
|
6432
7516
|
) });
|
|
6433
7517
|
}
|
|
6434
7518
|
var TreeView = ({ searchable = false, ...props }) => {
|
|
6435
|
-
const [searchQuery, setSearchQuery] =
|
|
7519
|
+
const [searchQuery, setSearchQuery] = React24__namespace.useState("");
|
|
6436
7520
|
const filterItems = (items, query) => {
|
|
6437
7521
|
if (!query) return items;
|
|
6438
7522
|
return items.map((item) => ({
|
|
@@ -6455,7 +7539,7 @@ var TreeView = ({ searchable = false, ...props }) => {
|
|
|
6455
7539
|
);
|
|
6456
7540
|
};
|
|
6457
7541
|
var TreeItem = ({ item }) => {
|
|
6458
|
-
const [isExpanded, setIsExpanded] =
|
|
7542
|
+
const [isExpanded, setIsExpanded] = React24__namespace.useState(item.isExpanded || true);
|
|
6459
7543
|
const hasChildren = item.children && item.children.length > 0;
|
|
6460
7544
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
6461
7545
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6524,7 +7608,7 @@ function UnderDevelopment({
|
|
|
6524
7608
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-4 px-3 py-1 bg-yellow-100 text-yellow-800", children: "Coming Soon" })
|
|
6525
7609
|
] });
|
|
6526
7610
|
}
|
|
6527
|
-
var TypographyH1 =
|
|
7611
|
+
var TypographyH1 = React24__namespace.forwardRef(
|
|
6528
7612
|
({ className, ...props }, ref) => {
|
|
6529
7613
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6530
7614
|
"h1",
|
|
@@ -6540,7 +7624,7 @@ var TypographyH1 = React23__namespace.forwardRef(
|
|
|
6540
7624
|
}
|
|
6541
7625
|
);
|
|
6542
7626
|
TypographyH1.displayName = "TypographyH1";
|
|
6543
|
-
var TypographyH2 =
|
|
7627
|
+
var TypographyH2 = React24__namespace.forwardRef(
|
|
6544
7628
|
({ className, ...props }, ref) => {
|
|
6545
7629
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6546
7630
|
"h2",
|
|
@@ -6556,7 +7640,7 @@ var TypographyH2 = React23__namespace.forwardRef(
|
|
|
6556
7640
|
}
|
|
6557
7641
|
);
|
|
6558
7642
|
TypographyH2.displayName = "TypographyH2";
|
|
6559
|
-
var TypographyH3 =
|
|
7643
|
+
var TypographyH3 = React24__namespace.forwardRef(
|
|
6560
7644
|
({ className, ...props }, ref) => {
|
|
6561
7645
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6562
7646
|
"h3",
|
|
@@ -6572,7 +7656,7 @@ var TypographyH3 = React23__namespace.forwardRef(
|
|
|
6572
7656
|
}
|
|
6573
7657
|
);
|
|
6574
7658
|
TypographyH3.displayName = "TypographyH3";
|
|
6575
|
-
var TypographyH4 =
|
|
7659
|
+
var TypographyH4 = React24__namespace.forwardRef(
|
|
6576
7660
|
({ className, ...props }, ref) => {
|
|
6577
7661
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6578
7662
|
"h4",
|
|
@@ -6588,7 +7672,7 @@ var TypographyH4 = React23__namespace.forwardRef(
|
|
|
6588
7672
|
}
|
|
6589
7673
|
);
|
|
6590
7674
|
TypographyH4.displayName = "TypographyH4";
|
|
6591
|
-
var TypographyH5 =
|
|
7675
|
+
var TypographyH5 = React24__namespace.forwardRef(
|
|
6592
7676
|
({ className, ...props }, ref) => {
|
|
6593
7677
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6594
7678
|
"h5",
|
|
@@ -6604,7 +7688,7 @@ var TypographyH5 = React23__namespace.forwardRef(
|
|
|
6604
7688
|
}
|
|
6605
7689
|
);
|
|
6606
7690
|
TypographyH5.displayName = "TypographyH5";
|
|
6607
|
-
var TypographyH6 =
|
|
7691
|
+
var TypographyH6 = React24__namespace.forwardRef(
|
|
6608
7692
|
({ className, ...props }, ref) => {
|
|
6609
7693
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6610
7694
|
"h6",
|
|
@@ -6620,7 +7704,7 @@ var TypographyH6 = React23__namespace.forwardRef(
|
|
|
6620
7704
|
}
|
|
6621
7705
|
);
|
|
6622
7706
|
TypographyH6.displayName = "TypographyH6";
|
|
6623
|
-
var TypographyP =
|
|
7707
|
+
var TypographyP = React24__namespace.forwardRef(
|
|
6624
7708
|
({ className, ...props }, ref) => {
|
|
6625
7709
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6626
7710
|
"p",
|
|
@@ -6636,7 +7720,7 @@ var TypographyP = React23__namespace.forwardRef(
|
|
|
6636
7720
|
}
|
|
6637
7721
|
);
|
|
6638
7722
|
TypographyP.displayName = "TypographyP";
|
|
6639
|
-
var TypographyBlockquote =
|
|
7723
|
+
var TypographyBlockquote = React24__namespace.forwardRef(
|
|
6640
7724
|
({ className, ...props }, ref) => {
|
|
6641
7725
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6642
7726
|
"blockquote",
|
|
@@ -6652,14 +7736,14 @@ var TypographyBlockquote = React23__namespace.forwardRef(
|
|
|
6652
7736
|
}
|
|
6653
7737
|
);
|
|
6654
7738
|
TypographyBlockquote.displayName = "TypographyBlockquote";
|
|
6655
|
-
var TypographyInlineCode =
|
|
7739
|
+
var TypographyInlineCode = React24__namespace.forwardRef(
|
|
6656
7740
|
({ className, ...props }, ref) => {
|
|
6657
7741
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6658
7742
|
"code",
|
|
6659
7743
|
{
|
|
6660
7744
|
ref,
|
|
6661
7745
|
className: cn(
|
|
6662
|
-
"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-
|
|
7746
|
+
"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",
|
|
6663
7747
|
className
|
|
6664
7748
|
),
|
|
6665
7749
|
...props
|
|
@@ -6668,7 +7752,7 @@ var TypographyInlineCode = React23__namespace.forwardRef(
|
|
|
6668
7752
|
}
|
|
6669
7753
|
);
|
|
6670
7754
|
TypographyInlineCode.displayName = "TypographyInlineCode";
|
|
6671
|
-
var TypographyLead =
|
|
7755
|
+
var TypographyLead = React24__namespace.forwardRef(
|
|
6672
7756
|
({ className, ...props }, ref) => {
|
|
6673
7757
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6674
7758
|
"p",
|
|
@@ -6684,7 +7768,7 @@ var TypographyLead = React23__namespace.forwardRef(
|
|
|
6684
7768
|
}
|
|
6685
7769
|
);
|
|
6686
7770
|
TypographyLead.displayName = "TypographyLead";
|
|
6687
|
-
var TypographyLarge =
|
|
7771
|
+
var TypographyLarge = React24__namespace.forwardRef(
|
|
6688
7772
|
({ className, ...props }, ref) => {
|
|
6689
7773
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6690
7774
|
"div",
|
|
@@ -6700,14 +7784,14 @@ var TypographyLarge = React23__namespace.forwardRef(
|
|
|
6700
7784
|
}
|
|
6701
7785
|
);
|
|
6702
7786
|
TypographyLarge.displayName = "TypographyLarge";
|
|
6703
|
-
var TypographySmall =
|
|
7787
|
+
var TypographySmall = React24__namespace.forwardRef(
|
|
6704
7788
|
({ className, ...props }, ref) => {
|
|
6705
7789
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6706
7790
|
"small",
|
|
6707
7791
|
{
|
|
6708
7792
|
ref,
|
|
6709
7793
|
className: cn(
|
|
6710
|
-
"text-
|
|
7794
|
+
"text-sm font-medium leading-none",
|
|
6711
7795
|
className
|
|
6712
7796
|
),
|
|
6713
7797
|
...props
|
|
@@ -6716,7 +7800,7 @@ var TypographySmall = React23__namespace.forwardRef(
|
|
|
6716
7800
|
}
|
|
6717
7801
|
);
|
|
6718
7802
|
TypographySmall.displayName = "TypographySmall";
|
|
6719
|
-
var TypographyMuted =
|
|
7803
|
+
var TypographyMuted = React24__namespace.forwardRef(
|
|
6720
7804
|
({ className, ...props }, ref) => {
|
|
6721
7805
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6722
7806
|
"p",
|
|
@@ -6732,7 +7816,7 @@ var TypographyMuted = React23__namespace.forwardRef(
|
|
|
6732
7816
|
}
|
|
6733
7817
|
);
|
|
6734
7818
|
TypographyMuted.displayName = "TypographyMuted";
|
|
6735
|
-
var TypographyList =
|
|
7819
|
+
var TypographyList = React24__namespace.forwardRef(
|
|
6736
7820
|
({ className, ...props }, ref) => {
|
|
6737
7821
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6738
7822
|
"ul",
|
|
@@ -6748,7 +7832,7 @@ var TypographyList = React23__namespace.forwardRef(
|
|
|
6748
7832
|
}
|
|
6749
7833
|
);
|
|
6750
7834
|
TypographyList.displayName = "TypographyList";
|
|
6751
|
-
var TypographyPre =
|
|
7835
|
+
var TypographyPre = React24__namespace.forwardRef(
|
|
6752
7836
|
({ className, ...props }, ref) => {
|
|
6753
7837
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6754
7838
|
"pre",
|
|
@@ -6788,6 +7872,7 @@ exports.Accordion = Accordion;
|
|
|
6788
7872
|
exports.AccordionContent = AccordionContent;
|
|
6789
7873
|
exports.AccordionItem = AccordionItem;
|
|
6790
7874
|
exports.AccordionTrigger = AccordionTrigger;
|
|
7875
|
+
exports.AddressChip = AddressChip;
|
|
6791
7876
|
exports.AgentChip = AgentChip;
|
|
6792
7877
|
exports.Alert = Alert;
|
|
6793
7878
|
exports.AlertDescription = AlertDescription;
|
|
@@ -6823,6 +7908,7 @@ exports.ButtonGroup = ButtonGroup;
|
|
|
6823
7908
|
exports.ButtonGroupSeparator = ButtonGroupSeparator;
|
|
6824
7909
|
exports.ButtonGroupText = ButtonGroupText;
|
|
6825
7910
|
exports.ButtonWithTooltip = ButtonWithTooltip;
|
|
7911
|
+
exports.CAST_ROLES = CAST_ROLES;
|
|
6826
7912
|
exports.CannotAnswerCard = CannotAnswerCard;
|
|
6827
7913
|
exports.Card = Card;
|
|
6828
7914
|
exports.CardContent = CardContent;
|
|
@@ -6836,6 +7922,7 @@ exports.CarouselContent = CarouselContent;
|
|
|
6836
7922
|
exports.CarouselItem = CarouselItem;
|
|
6837
7923
|
exports.CarouselNext = CarouselNext;
|
|
6838
7924
|
exports.CarouselPrevious = CarouselPrevious;
|
|
7925
|
+
exports.CastTable = CastTable;
|
|
6839
7926
|
exports.ChatSession = ChatSession;
|
|
6840
7927
|
exports.ChatSessionActivityRow = ChatSessionActivityRow;
|
|
6841
7928
|
exports.ChatSessionActivitySubLine = ChatSessionActivitySubLine;
|
|
@@ -6894,6 +7981,7 @@ exports.DropdownMenuSub = DropdownMenuSub;
|
|
|
6894
7981
|
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
6895
7982
|
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
6896
7983
|
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
7984
|
+
exports.EgressList = EgressList;
|
|
6897
7985
|
exports.EmissionCard = EmissionCard;
|
|
6898
7986
|
exports.EmissionHeader = EmissionHeader;
|
|
6899
7987
|
exports.EmptyState = EmptyState;
|
|
@@ -6918,8 +8006,15 @@ exports.ItemSeparator = ItemSeparator;
|
|
|
6918
8006
|
exports.ItemTitle = ItemTitle;
|
|
6919
8007
|
exports.Kbd = Kbd;
|
|
6920
8008
|
exports.KbdGroup = KbdGroup;
|
|
8009
|
+
exports.LayerChip = LayerChip;
|
|
8010
|
+
exports.LayerSection = LayerSection;
|
|
8011
|
+
exports.LayerStrip = LayerStrip;
|
|
6921
8012
|
exports.Legend = Legend;
|
|
6922
8013
|
exports.LegendItem = LegendItem;
|
|
8014
|
+
exports.LensChip = LensChip;
|
|
8015
|
+
exports.LensRow = LensRow;
|
|
8016
|
+
exports.Link = Link;
|
|
8017
|
+
exports.MatchPreview = MatchPreview;
|
|
6923
8018
|
exports.MenuItem = MenuItem;
|
|
6924
8019
|
exports.Menubar = Menubar;
|
|
6925
8020
|
exports.MenubarCheckboxItem = MenubarCheckboxItem;
|
|
@@ -6979,6 +8074,7 @@ exports.ResizablePanel = ResizablePanel;
|
|
|
6979
8074
|
exports.ResizablePanelGroup = ResizablePanelGroup;
|
|
6980
8075
|
exports.RetryNote = RetryNote;
|
|
6981
8076
|
exports.RichSelect = RichSelect;
|
|
8077
|
+
exports.RuleRow = RuleRow;
|
|
6982
8078
|
exports.ScrollArea = ScrollArea;
|
|
6983
8079
|
exports.ScrollBar = ScrollBar;
|
|
6984
8080
|
exports.SearchInput = SearchInput;
|
|
@@ -7018,6 +8114,7 @@ exports.SidebarRail = SidebarRail;
|
|
|
7018
8114
|
exports.SidebarSeparator = SidebarSeparator;
|
|
7019
8115
|
exports.SidebarTrigger = SidebarTrigger;
|
|
7020
8116
|
exports.Skeleton = Skeleton;
|
|
8117
|
+
exports.SliceSummary = SliceSummary;
|
|
7021
8118
|
exports.Sparkline = Sparkline;
|
|
7022
8119
|
exports.Spinner = Spinner;
|
|
7023
8120
|
exports.StatusDot = StatusDot;
|
|
@@ -7074,12 +8171,17 @@ exports.TypographySmall = TypographySmall;
|
|
|
7074
8171
|
exports.UnderDevelopment = UnderDevelopment;
|
|
7075
8172
|
exports.agentChipVariants = agentChipVariants;
|
|
7076
8173
|
exports.badgeVariants = badgeVariants;
|
|
7077
|
-
exports.boundSwatch = SWATCH;
|
|
7078
8174
|
exports.buttonGroupVariants = buttonGroupVariants;
|
|
7079
8175
|
exports.buttonVariants = buttonVariants;
|
|
7080
8176
|
exports.chatSessionGutterClass = chatSessionGutterClass;
|
|
7081
8177
|
exports.cn = cn;
|
|
8178
|
+
exports.describeSlice = describeSlice;
|
|
8179
|
+
exports.layerItemLabel = stateLabel;
|
|
8180
|
+
exports.layerLabel = layerLabel;
|
|
8181
|
+
exports.layerPaint = layerPaint;
|
|
8182
|
+
exports.linkVariants = linkVariants;
|
|
7082
8183
|
exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
|
|
8184
|
+
exports.splitAddress = split;
|
|
7083
8185
|
exports.statusDotVariants = statusDotVariants;
|
|
7084
8186
|
exports.toggleVariants = toggleVariants;
|
|
7085
8187
|
exports.useOverflowItems = useOverflowItems;
|