@invana/ui 0.0.27 → 0.0.29
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 +101 -0
- package/dist/index.cjs +722 -95
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +683 -114
- package/dist/index.d.ts +683 -114
- package/dist/index.js +706 -96
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2744,6 +2744,62 @@ var ToggleGroupItem = React23.forwardRef(({ className, children, variant, size,
|
|
|
2744
2744
|
);
|
|
2745
2745
|
});
|
|
2746
2746
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
2747
|
+
var TONE = {
|
|
2748
|
+
allowed: "text-foreground",
|
|
2749
|
+
denied: "text-destructive",
|
|
2750
|
+
refused: "text-destructive line-through decoration-destructive/50",
|
|
2751
|
+
untouched: "text-muted-foreground/70"
|
|
2752
|
+
};
|
|
2753
|
+
function split(address) {
|
|
2754
|
+
const cut = address.lastIndexOf("/");
|
|
2755
|
+
if (cut < 0) return { head: "", tail: address };
|
|
2756
|
+
return { head: address.slice(0, cut + 1), tail: address.slice(cut + 1) };
|
|
2757
|
+
}
|
|
2758
|
+
var AddressChip = React23.forwardRef(
|
|
2759
|
+
({ address, tone = "allowed", onOpen, className, ...props }, ref) => {
|
|
2760
|
+
const { head, tail } = split(address);
|
|
2761
|
+
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2762
|
+
head ? (
|
|
2763
|
+
// `shrink-[999]` makes the head absorb essentially all the shrink, so
|
|
2764
|
+
// the kind gives way before the participant does — but the floor is
|
|
2765
|
+
// `2ch`, never `0`. A head that collapses to nothing renders
|
|
2766
|
+
// `graph_data/stitch/route_airport@…` as `route_airport@…`, which
|
|
2767
|
+
// reads as a whole address, and two different participants can come
|
|
2768
|
+
// out identical.
|
|
2769
|
+
//
|
|
2770
|
+
// Exactly two: `text-overflow` draws the ellipsis only when it fits,
|
|
2771
|
+
// so at `1ch` the browser keeps the raw first character and drops the
|
|
2772
|
+
// marker — `groute_airport@…`, a word that was never there. Two is
|
|
2773
|
+
// one character plus the ellipsis, which is the narrowest honest
|
|
2774
|
+
// truncation. Every `ch` above that is one the participant loses.
|
|
2775
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-[2ch] shrink-[999] truncate opacity-60", children: head })
|
|
2776
|
+
) : null,
|
|
2777
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 shrink truncate", children: tail })
|
|
2778
|
+
] });
|
|
2779
|
+
const shell = cn(
|
|
2780
|
+
"inline-flex min-w-0 max-w-full items-baseline font-mono text-meta",
|
|
2781
|
+
TONE[tone],
|
|
2782
|
+
className
|
|
2783
|
+
);
|
|
2784
|
+
if (onOpen) {
|
|
2785
|
+
return /* @__PURE__ */ jsx("span", { ref, className: cn(shell, "min-w-0"), ...props, children: /* @__PURE__ */ jsx(
|
|
2786
|
+
"button",
|
|
2787
|
+
{
|
|
2788
|
+
type: "button",
|
|
2789
|
+
title: address,
|
|
2790
|
+
onClick: () => onOpen(address),
|
|
2791
|
+
className: cn(
|
|
2792
|
+
"inline-flex min-w-0 max-w-full cursor-pointer items-baseline rounded-control",
|
|
2793
|
+
"hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
2794
|
+
),
|
|
2795
|
+
children: body
|
|
2796
|
+
}
|
|
2797
|
+
) });
|
|
2798
|
+
}
|
|
2799
|
+
return /* @__PURE__ */ jsx("span", { ref, title: address, className: shell, ...props, children: body });
|
|
2800
|
+
}
|
|
2801
|
+
);
|
|
2802
|
+
AddressChip.displayName = "AddressChip";
|
|
2747
2803
|
var agentChipVariants = cva(
|
|
2748
2804
|
"inline-flex max-w-full shrink-0 items-center gap-1 rounded-control border px-1.5 text-meta [&_svg]:size-3 [&_svg]:shrink-0",
|
|
2749
2805
|
{
|
|
@@ -2781,36 +2837,6 @@ var AgentChip = React23.forwardRef(
|
|
|
2781
2837
|
)
|
|
2782
2838
|
);
|
|
2783
2839
|
AgentChip.displayName = "AgentChip";
|
|
2784
|
-
var SWATCH = {
|
|
2785
|
-
none: "bg-muted-foreground",
|
|
2786
|
-
network: "bg-warning",
|
|
2787
|
-
graph_read: "bg-success",
|
|
2788
|
-
graph_write: "bg-data-2",
|
|
2789
|
-
schema_write: "bg-data-4",
|
|
2790
|
-
ingest: "bg-info",
|
|
2791
|
-
llm: "bg-data-7",
|
|
2792
|
-
plan_write: "bg-data-5",
|
|
2793
|
-
work_write: "bg-destructive"
|
|
2794
|
-
};
|
|
2795
|
-
var BoundChip = React23.forwardRef(
|
|
2796
|
-
({ bound, swatchOnly, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2797
|
-
"span",
|
|
2798
|
-
{
|
|
2799
|
-
ref,
|
|
2800
|
-
className: cn(
|
|
2801
|
-
"inline-flex max-w-full shrink-0 items-center gap-1.5 font-mono text-meta text-muted-foreground",
|
|
2802
|
-
className
|
|
2803
|
-
),
|
|
2804
|
-
"aria-label": swatchOnly ? `bound: ${bound}` : void 0,
|
|
2805
|
-
...props,
|
|
2806
|
-
children: [
|
|
2807
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("size-1.5 shrink-0", SWATCH[bound]) }),
|
|
2808
|
-
swatchOnly ? null : /* @__PURE__ */ jsx("span", { className: "truncate", children: bound })
|
|
2809
|
-
]
|
|
2810
|
-
}
|
|
2811
|
-
)
|
|
2812
|
-
);
|
|
2813
|
-
BoundChip.displayName = "BoundChip";
|
|
2814
2840
|
var stateVariants = cva("inline-flex shrink-0 items-center gap-1.5 font-medium", {
|
|
2815
2841
|
variants: {
|
|
2816
2842
|
tone: {
|
|
@@ -2956,6 +2982,36 @@ var BarChartV = React23.forwardRef(
|
|
|
2956
2982
|
}
|
|
2957
2983
|
);
|
|
2958
2984
|
BarChartV.displayName = "BarChartV";
|
|
2985
|
+
var SWATCH = {
|
|
2986
|
+
none: "bg-muted-foreground",
|
|
2987
|
+
network: "bg-warning",
|
|
2988
|
+
graph_read: "bg-success",
|
|
2989
|
+
graph_write: "bg-data-2",
|
|
2990
|
+
schema_write: "bg-data-4",
|
|
2991
|
+
ingest: "bg-info",
|
|
2992
|
+
llm: "bg-data-7",
|
|
2993
|
+
plan_write: "bg-data-5",
|
|
2994
|
+
work_write: "bg-destructive"
|
|
2995
|
+
};
|
|
2996
|
+
var BoundChip = React23.forwardRef(
|
|
2997
|
+
({ bound, swatchOnly, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2998
|
+
"span",
|
|
2999
|
+
{
|
|
3000
|
+
ref,
|
|
3001
|
+
className: cn(
|
|
3002
|
+
"inline-flex max-w-full shrink-0 items-center gap-1.5 font-mono text-meta text-muted-foreground",
|
|
3003
|
+
className
|
|
3004
|
+
),
|
|
3005
|
+
"aria-label": swatchOnly ? `bound: ${bound}` : void 0,
|
|
3006
|
+
...props,
|
|
3007
|
+
children: [
|
|
3008
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("size-1.5 shrink-0", SWATCH[bound]) }),
|
|
3009
|
+
swatchOnly ? null : /* @__PURE__ */ jsx("span", { className: "truncate", children: bound })
|
|
3010
|
+
]
|
|
3011
|
+
}
|
|
3012
|
+
)
|
|
3013
|
+
);
|
|
3014
|
+
BoundChip.displayName = "BoundChip";
|
|
2959
3015
|
function ButtonWithTooltip(props) {
|
|
2960
3016
|
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { delayDuration: 0, children: [
|
|
2961
3017
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", className: cn("hover:bg-transparent", props.className), ...props, children: props.children }) }),
|
|
@@ -2979,6 +3035,53 @@ var CannotAnswerCard = React23.forwardRef(({ label = "cannot answer", remedy, cl
|
|
|
2979
3035
|
}
|
|
2980
3036
|
));
|
|
2981
3037
|
CannotAnswerCard.displayName = "CannotAnswerCard";
|
|
3038
|
+
var CAST_ROLES = ["extract", "decide", "judge", "embed"];
|
|
3039
|
+
var PURPOSE = {
|
|
3040
|
+
extract: "prose in, structure out \u2014 the cheap one",
|
|
3041
|
+
decide: "writes the number a person acts on",
|
|
3042
|
+
judge: "scores an output \u2014 often local",
|
|
3043
|
+
embed: "text in, vector out"
|
|
3044
|
+
};
|
|
3045
|
+
var CastTable = React23.forwardRef(
|
|
3046
|
+
({ cast = {}, resolved, readOnly, className, ...props }, ref) => {
|
|
3047
|
+
const byRole = new Map((resolved ?? []).map((r) => [r.role, r]));
|
|
3048
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn("min-w-0", className), ...props, children: [
|
|
3049
|
+
/* @__PURE__ */ jsxs(Table, { density: "compact", children: [
|
|
3050
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
3051
|
+
/* @__PURE__ */ jsx(TableHead, { className: "w-[5.5rem]", children: "role" }),
|
|
3052
|
+
/* @__PURE__ */ jsx(TableHead, { children: "resolves to" }),
|
|
3053
|
+
/* @__PURE__ */ jsx(TableHead, { children: "why this one" })
|
|
3054
|
+
] }) }),
|
|
3055
|
+
/* @__PURE__ */ jsx(TableBody, { children: CAST_ROLES.map((role) => {
|
|
3056
|
+
const hit = byRole.get(role);
|
|
3057
|
+
const address = hit ? hit.address : cast[role] ?? null;
|
|
3058
|
+
const denied = hit ? !hit.allowed : false;
|
|
3059
|
+
return /* @__PURE__ */ jsxs(TableRow, { "data-role": role, children: [
|
|
3060
|
+
/* @__PURE__ */ jsx(TableCell, { className: "font-mono text-meta text-muted-foreground", children: role }),
|
|
3061
|
+
/* @__PURE__ */ jsx(TableCell, { className: "min-w-0", children: address ? /* @__PURE__ */ jsx(
|
|
3062
|
+
AddressChip,
|
|
3063
|
+
{
|
|
3064
|
+
address,
|
|
3065
|
+
tone: denied ? "denied" : "allowed"
|
|
3066
|
+
}
|
|
3067
|
+
) : /* @__PURE__ */ jsx("span", { className: "text-meta text-muted-foreground/70", children: "nothing casts it" }) }),
|
|
3068
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-meta text-muted-foreground", children: denied ? /* @__PURE__ */ jsxs("span", { className: "text-destructive", children: [
|
|
3069
|
+
"denied by ",
|
|
3070
|
+
hit?.ruleMatched ?? "this world"
|
|
3071
|
+
] }) : hit?.source ? /* @__PURE__ */ jsx("span", { children: hit.source !== "shipped" ? `set on the ${hit.source}` : address ? "shipped default" : (
|
|
3072
|
+
// No address *and* nothing shipped resolves it —
|
|
3073
|
+
// the one row that says the run may open on a
|
|
3074
|
+
// model this Graph never chose.
|
|
3075
|
+
"nothing casts it, and no shipped default resolves it"
|
|
3076
|
+
) }) : PURPOSE[role] })
|
|
3077
|
+
] }, role);
|
|
3078
|
+
}) })
|
|
3079
|
+
] }),
|
|
3080
|
+
readOnly ? null : /* @__PURE__ */ jsx("p", { className: "px-2 pt-1 text-meta text-muted-foreground/70", children: "A cast picks within the rules \u2014 it never widens them." })
|
|
3081
|
+
] });
|
|
3082
|
+
}
|
|
3083
|
+
);
|
|
3084
|
+
CastTable.displayName = "CastTable";
|
|
2982
3085
|
function ChatSession({
|
|
2983
3086
|
children,
|
|
2984
3087
|
footer,
|
|
@@ -4230,6 +4333,44 @@ var DivergingBar = React23.forwardRef(
|
|
|
4230
4333
|
}
|
|
4231
4334
|
);
|
|
4232
4335
|
DivergingBar.displayName = "DivergingBar";
|
|
4336
|
+
var EgressList = React23.forwardRef(
|
|
4337
|
+
({ to, classes = [], cut = [], className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
4338
|
+
"div",
|
|
4339
|
+
{
|
|
4340
|
+
ref,
|
|
4341
|
+
className: cn("flex min-w-0 flex-col gap-1", className),
|
|
4342
|
+
...props,
|
|
4343
|
+
children: [
|
|
4344
|
+
/* @__PURE__ */ jsx(AddressChip, { address: to }),
|
|
4345
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-0.5 pl-3", children: [
|
|
4346
|
+
classes.length === 0 ? /* @__PURE__ */ jsx("span", { className: "text-meta text-destructive", children: "nothing may be sent" }) : /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-wrap items-center gap-1 text-meta text-muted-foreground", children: [
|
|
4347
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0", children: "may send" }),
|
|
4348
|
+
classes.map((c) => /* @__PURE__ */ jsx(
|
|
4349
|
+
"span",
|
|
4350
|
+
{
|
|
4351
|
+
className: "rounded-control bg-muted px-1 font-mono text-foreground",
|
|
4352
|
+
children: c
|
|
4353
|
+
},
|
|
4354
|
+
c
|
|
4355
|
+
))
|
|
4356
|
+
] }),
|
|
4357
|
+
cut.length ? /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-wrap items-center gap-1 text-meta text-muted-foreground", children: [
|
|
4358
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0", children: "cut" }),
|
|
4359
|
+
cut.map((c) => /* @__PURE__ */ jsx(
|
|
4360
|
+
"span",
|
|
4361
|
+
{
|
|
4362
|
+
className: "rounded-control bg-muted px-1 font-mono text-destructive line-through decoration-destructive/50",
|
|
4363
|
+
children: c
|
|
4364
|
+
},
|
|
4365
|
+
c
|
|
4366
|
+
))
|
|
4367
|
+
] }) : null
|
|
4368
|
+
] })
|
|
4369
|
+
]
|
|
4370
|
+
}
|
|
4371
|
+
)
|
|
4372
|
+
);
|
|
4373
|
+
EgressList.displayName = "EgressList";
|
|
4233
4374
|
var EmissionHeader = React23.forwardRef(({ kind, template, citation, note, actions, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
4234
4375
|
"div",
|
|
4235
4376
|
{
|
|
@@ -4353,6 +4494,27 @@ var ErrorBoundary = class extends Component {
|
|
|
4353
4494
|
return this.props.children;
|
|
4354
4495
|
}
|
|
4355
4496
|
};
|
|
4497
|
+
var Eyebrow = React23.forwardRef(
|
|
4498
|
+
({ aside, tone = "muted", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
4499
|
+
"div",
|
|
4500
|
+
{
|
|
4501
|
+
ref,
|
|
4502
|
+
className: cn(
|
|
4503
|
+
"flex items-baseline gap-2 text-meta font-semibold uppercase tracking-wide",
|
|
4504
|
+
tone === "muted" && "text-muted-foreground",
|
|
4505
|
+
tone === "foreground" && "text-foreground",
|
|
4506
|
+
tone === "accent" && "text-primary",
|
|
4507
|
+
className
|
|
4508
|
+
),
|
|
4509
|
+
...props,
|
|
4510
|
+
children: [
|
|
4511
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children }),
|
|
4512
|
+
aside != null ? /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 font-normal normal-case tracking-normal text-muted-foreground", children: aside }) : null
|
|
4513
|
+
]
|
|
4514
|
+
}
|
|
4515
|
+
)
|
|
4516
|
+
);
|
|
4517
|
+
Eyebrow.displayName = "Eyebrow";
|
|
4356
4518
|
var FilterBar = React23.forwardRef(
|
|
4357
4519
|
({ summary, className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
4358
4520
|
"div",
|
|
@@ -4450,6 +4612,186 @@ var HeatStrip = React23.forwardRef(
|
|
|
4450
4612
|
}
|
|
4451
4613
|
);
|
|
4452
4614
|
HeatStrip.displayName = "HeatStrip";
|
|
4615
|
+
var LABEL = {
|
|
4616
|
+
graph_data: "graph data",
|
|
4617
|
+
llm: "llm",
|
|
4618
|
+
third_party: "third party",
|
|
4619
|
+
cache: "cache",
|
|
4620
|
+
human: "human",
|
|
4621
|
+
agent: "agent"
|
|
4622
|
+
};
|
|
4623
|
+
var SWATCH2 = {
|
|
4624
|
+
graph_data: "bg-data-1",
|
|
4625
|
+
llm: "bg-data-7",
|
|
4626
|
+
third_party: "bg-data-8",
|
|
4627
|
+
cache: "bg-data-3",
|
|
4628
|
+
human: "bg-data-6",
|
|
4629
|
+
agent: "bg-muted-foreground"
|
|
4630
|
+
};
|
|
4631
|
+
var LayerChip = React23.forwardRef(
|
|
4632
|
+
({ layer, count, dim, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
4633
|
+
"span",
|
|
4634
|
+
{
|
|
4635
|
+
ref,
|
|
4636
|
+
className: cn(
|
|
4637
|
+
"inline-flex max-w-full shrink-0 items-center gap-1.5 font-mono text-meta",
|
|
4638
|
+
dim ? "text-muted-foreground/70" : "text-muted-foreground",
|
|
4639
|
+
className
|
|
4640
|
+
),
|
|
4641
|
+
...props,
|
|
4642
|
+
children: [
|
|
4643
|
+
/* @__PURE__ */ jsx(
|
|
4644
|
+
"span",
|
|
4645
|
+
{
|
|
4646
|
+
"aria-hidden": true,
|
|
4647
|
+
className: cn(
|
|
4648
|
+
"size-1.5 shrink-0",
|
|
4649
|
+
dim ? "bg-muted-foreground/50" : SWATCH2[layer]
|
|
4650
|
+
)
|
|
4651
|
+
}
|
|
4652
|
+
),
|
|
4653
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: LABEL[layer] }),
|
|
4654
|
+
count != null ? /* @__PURE__ */ jsx("span", { className: "shrink-0 tabular-nums opacity-70", children: count }) : null
|
|
4655
|
+
]
|
|
4656
|
+
}
|
|
4657
|
+
)
|
|
4658
|
+
);
|
|
4659
|
+
LayerChip.displayName = "LayerChip";
|
|
4660
|
+
var LayerSection = React23.forwardRef(
|
|
4661
|
+
({ layer, summary, count, dim, className, children, ...props }, ref) => {
|
|
4662
|
+
const empty = React23.Children.count(children) === 0;
|
|
4663
|
+
return /* @__PURE__ */ jsxs(
|
|
4664
|
+
"section",
|
|
4665
|
+
{
|
|
4666
|
+
ref,
|
|
4667
|
+
className: cn("flex min-w-0 flex-col gap-1", className),
|
|
4668
|
+
...props,
|
|
4669
|
+
children: [
|
|
4670
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-baseline gap-2 border-b border-border pb-1", children: [
|
|
4671
|
+
/* @__PURE__ */ jsx(LayerChip, { layer, count, dim }),
|
|
4672
|
+
summary != null ? /* @__PURE__ */ jsx("span", { className: "ml-auto min-w-0 shrink truncate text-meta text-muted-foreground", children: summary }) : null
|
|
4673
|
+
] }),
|
|
4674
|
+
empty ? /* @__PURE__ */ jsx("p", { className: "px-1 py-1 text-meta text-muted-foreground/70", children: "no rules in this layer" }) : /* @__PURE__ */ jsx("div", { className: cn("flex min-w-0 flex-col", dim && "opacity-60"), children })
|
|
4675
|
+
]
|
|
4676
|
+
}
|
|
4677
|
+
);
|
|
4678
|
+
}
|
|
4679
|
+
);
|
|
4680
|
+
LayerSection.displayName = "LayerSection";
|
|
4681
|
+
var MARK = {
|
|
4682
|
+
out: "bg-primary",
|
|
4683
|
+
in: "bg-data-1",
|
|
4684
|
+
refused: "bg-destructive",
|
|
4685
|
+
skipped: "bg-muted-foreground/30"
|
|
4686
|
+
};
|
|
4687
|
+
var MARK_LABEL = {
|
|
4688
|
+
out: "sent",
|
|
4689
|
+
in: "read",
|
|
4690
|
+
refused: "refused",
|
|
4691
|
+
skipped: "skipped"
|
|
4692
|
+
};
|
|
4693
|
+
var LayerStrip = React23.forwardRef(
|
|
4694
|
+
({
|
|
4695
|
+
bands,
|
|
4696
|
+
steps,
|
|
4697
|
+
onSelectStep,
|
|
4698
|
+
selectedStep,
|
|
4699
|
+
frozenLabels = true,
|
|
4700
|
+
className,
|
|
4701
|
+
...props
|
|
4702
|
+
}, ref) => {
|
|
4703
|
+
const byBand = (layer) => steps.map((step) => ({
|
|
4704
|
+
step,
|
|
4705
|
+
touch: step.touches.find((t) => t.layer === layer)
|
|
4706
|
+
}));
|
|
4707
|
+
return /* @__PURE__ */ jsx(
|
|
4708
|
+
"div",
|
|
4709
|
+
{
|
|
4710
|
+
ref,
|
|
4711
|
+
className: cn(
|
|
4712
|
+
"min-w-0 overflow-x-auto rounded-control border border-border",
|
|
4713
|
+
className
|
|
4714
|
+
),
|
|
4715
|
+
...props,
|
|
4716
|
+
children: /* @__PURE__ */ jsxs(
|
|
4717
|
+
"div",
|
|
4718
|
+
{
|
|
4719
|
+
className: "grid min-w-max",
|
|
4720
|
+
style: {
|
|
4721
|
+
gridTemplateColumns: `9rem repeat(${steps.length}, minmax(2.5rem, 1fr))`
|
|
4722
|
+
},
|
|
4723
|
+
children: [
|
|
4724
|
+
/* @__PURE__ */ jsx(
|
|
4725
|
+
"div",
|
|
4726
|
+
{
|
|
4727
|
+
className: cn(
|
|
4728
|
+
"border-b border-border bg-background px-2 py-1",
|
|
4729
|
+
frozenLabels && "sticky left-0 z-20"
|
|
4730
|
+
),
|
|
4731
|
+
children: /* @__PURE__ */ jsx("span", { className: "text-meta text-muted-foreground", children: "layer" })
|
|
4732
|
+
}
|
|
4733
|
+
),
|
|
4734
|
+
steps.map((step) => /* @__PURE__ */ jsx(
|
|
4735
|
+
"button",
|
|
4736
|
+
{
|
|
4737
|
+
type: "button",
|
|
4738
|
+
onClick: () => onSelectStep?.(step.id),
|
|
4739
|
+
title: step.seq != null ? `${step.label} \xB7 seq ${step.seq}` : step.label,
|
|
4740
|
+
className: cn(
|
|
4741
|
+
"border-b border-l border-border px-1 py-1 text-meta",
|
|
4742
|
+
"truncate text-muted-foreground",
|
|
4743
|
+
onSelectStep && "cursor-pointer hover:bg-accent",
|
|
4744
|
+
selectedStep === step.id && "bg-accent text-foreground",
|
|
4745
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
4746
|
+
),
|
|
4747
|
+
children: step.label
|
|
4748
|
+
},
|
|
4749
|
+
step.id
|
|
4750
|
+
)),
|
|
4751
|
+
bands.map((band) => /* @__PURE__ */ jsxs(React23.Fragment, { children: [
|
|
4752
|
+
/* @__PURE__ */ jsx(
|
|
4753
|
+
"div",
|
|
4754
|
+
{
|
|
4755
|
+
className: cn(
|
|
4756
|
+
"flex items-center border-b border-border bg-background px-2 py-1",
|
|
4757
|
+
frozenLabels && "sticky left-0 z-10"
|
|
4758
|
+
),
|
|
4759
|
+
children: band.label ?? /* @__PURE__ */ jsx(LayerChip, { layer: band.layer })
|
|
4760
|
+
}
|
|
4761
|
+
),
|
|
4762
|
+
byBand(band.layer).map(({ step, touch }) => /* @__PURE__ */ jsx(
|
|
4763
|
+
"div",
|
|
4764
|
+
{
|
|
4765
|
+
title: touch ? `${step.label} \xB7 ${MARK_LABEL[touch.direction]}${touch.address ? ` \xB7 ${touch.address}` : ""}${touch.ruleMatched ? ` \xB7 ${touch.ruleMatched}` : ""}` : void 0,
|
|
4766
|
+
className: cn(
|
|
4767
|
+
"flex items-center justify-center border-b border-l border-border px-1 py-1",
|
|
4768
|
+
selectedStep === step.id && "bg-accent"
|
|
4769
|
+
),
|
|
4770
|
+
children: touch ? /* @__PURE__ */ jsx(
|
|
4771
|
+
"span",
|
|
4772
|
+
{
|
|
4773
|
+
"aria-label": MARK_LABEL[touch.direction],
|
|
4774
|
+
className: cn(
|
|
4775
|
+
"h-1.5 w-full max-w-6 rounded-full",
|
|
4776
|
+
MARK[touch.direction],
|
|
4777
|
+
// Struck in place: the mark stays so the cell is not
|
|
4778
|
+
// mistaken for a step that never reached here.
|
|
4779
|
+
touch.direction === "refused" && "relative after:absolute after:inset-x-0 after:top-1/2 after:h-px after:-translate-y-1/2 after:bg-destructive-foreground/70"
|
|
4780
|
+
)
|
|
4781
|
+
}
|
|
4782
|
+
) : /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-muted-foreground/25", children: "\xB7" })
|
|
4783
|
+
},
|
|
4784
|
+
`${band.layer}-${step.id}`
|
|
4785
|
+
))
|
|
4786
|
+
] }, band.layer))
|
|
4787
|
+
]
|
|
4788
|
+
}
|
|
4789
|
+
)
|
|
4790
|
+
}
|
|
4791
|
+
);
|
|
4792
|
+
}
|
|
4793
|
+
);
|
|
4794
|
+
LayerStrip.displayName = "LayerStrip";
|
|
4453
4795
|
function Swatch({ kind = "dot", color }) {
|
|
4454
4796
|
const style = { color };
|
|
4455
4797
|
if (kind === "dot")
|
|
@@ -4531,6 +4873,163 @@ var LegendItem = React23.forwardRef(
|
|
|
4531
4873
|
)
|
|
4532
4874
|
);
|
|
4533
4875
|
LegendItem.displayName = "LegendItem";
|
|
4876
|
+
var LensChip = React23.forwardRef(
|
|
4877
|
+
({ lens, onPick, className, ...props }, ref) => {
|
|
4878
|
+
const label = lens?.name ?? "Everything";
|
|
4879
|
+
const unset = lens == null;
|
|
4880
|
+
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4881
|
+
/* @__PURE__ */ jsx(
|
|
4882
|
+
"span",
|
|
4883
|
+
{
|
|
4884
|
+
"aria-hidden": true,
|
|
4885
|
+
className: cn(
|
|
4886
|
+
"size-1.5 shrink-0 rounded-full",
|
|
4887
|
+
unset ? "bg-muted-foreground" : "bg-primary"
|
|
4888
|
+
)
|
|
4889
|
+
}
|
|
4890
|
+
),
|
|
4891
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: label })
|
|
4892
|
+
] });
|
|
4893
|
+
const shell = cn(
|
|
4894
|
+
"inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-control",
|
|
4895
|
+
"border border-border px-1.5 py-0.5 text-meta",
|
|
4896
|
+
unset ? "text-muted-foreground" : "text-foreground",
|
|
4897
|
+
className
|
|
4898
|
+
);
|
|
4899
|
+
if (onPick) {
|
|
4900
|
+
return /* @__PURE__ */ jsx("span", { ref, className: "inline-flex min-w-0", ...props, children: /* @__PURE__ */ jsx(
|
|
4901
|
+
"button",
|
|
4902
|
+
{
|
|
4903
|
+
type: "button",
|
|
4904
|
+
onClick: onPick,
|
|
4905
|
+
title: unset ? "Everything \u2014 the whole model, inside the guardrails" : label,
|
|
4906
|
+
className: cn(
|
|
4907
|
+
shell,
|
|
4908
|
+
"cursor-pointer hover:bg-accent",
|
|
4909
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
4910
|
+
),
|
|
4911
|
+
children: body
|
|
4912
|
+
}
|
|
4913
|
+
) });
|
|
4914
|
+
}
|
|
4915
|
+
return /* @__PURE__ */ jsx("span", { ref, className: shell, title: label, ...props, children: body });
|
|
4916
|
+
}
|
|
4917
|
+
);
|
|
4918
|
+
LensChip.displayName = "LensChip";
|
|
4919
|
+
function describe(n) {
|
|
4920
|
+
switch (n.kind) {
|
|
4921
|
+
case "allow":
|
|
4922
|
+
return `${n.count} allow`;
|
|
4923
|
+
case "deny":
|
|
4924
|
+
return `${n.count} deny`;
|
|
4925
|
+
case "sliced":
|
|
4926
|
+
return "sliced";
|
|
4927
|
+
case "excludes":
|
|
4928
|
+
return `excludes ${n.properties.join(", ")}`;
|
|
4929
|
+
case "casts":
|
|
4930
|
+
return `casts ${n.roles.join(", ")}`;
|
|
4931
|
+
case "closes":
|
|
4932
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1", children: [
|
|
4933
|
+
"closes",
|
|
4934
|
+
n.layers.map((layer) => /* @__PURE__ */ jsx(LayerChip, { layer }, layer))
|
|
4935
|
+
] });
|
|
4936
|
+
}
|
|
4937
|
+
}
|
|
4938
|
+
var LensRow = React23.forwardRef(
|
|
4939
|
+
({ name, narrows = [], usage, selected, onSelect, className, ...props }, ref) => {
|
|
4940
|
+
const interactive = Boolean(onSelect);
|
|
4941
|
+
return /* @__PURE__ */ jsxs(
|
|
4942
|
+
"div",
|
|
4943
|
+
{
|
|
4944
|
+
ref,
|
|
4945
|
+
role: interactive ? "button" : void 0,
|
|
4946
|
+
tabIndex: interactive ? 0 : void 0,
|
|
4947
|
+
"aria-pressed": interactive ? Boolean(selected) : void 0,
|
|
4948
|
+
onClick: interactive ? () => onSelect?.(name) : void 0,
|
|
4949
|
+
onKeyDown: interactive ? (event) => {
|
|
4950
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
4951
|
+
event.preventDefault();
|
|
4952
|
+
onSelect?.(name);
|
|
4953
|
+
}
|
|
4954
|
+
} : void 0,
|
|
4955
|
+
className: cn(
|
|
4956
|
+
"flex min-w-0 flex-col gap-0.5 rounded-control px-2 py-1.5",
|
|
4957
|
+
interactive && "cursor-pointer hover:bg-accent",
|
|
4958
|
+
selected && "bg-accent",
|
|
4959
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
4960
|
+
className
|
|
4961
|
+
),
|
|
4962
|
+
...props,
|
|
4963
|
+
children: [
|
|
4964
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
4965
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-sm font-medium text-foreground", children: name }),
|
|
4966
|
+
usage ? /* @__PURE__ */ jsxs("span", { className: "ml-auto shrink-0 text-meta text-muted-foreground", children: [
|
|
4967
|
+
"used in ",
|
|
4968
|
+
usage.runs,
|
|
4969
|
+
" run",
|
|
4970
|
+
usage.runs === 1 ? "" : "s",
|
|
4971
|
+
usage.lastUsed ? ` \xB7 last ${usage.lastUsed}` : ""
|
|
4972
|
+
] }) : null
|
|
4973
|
+
] }),
|
|
4974
|
+
narrows.length ? /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-meta text-muted-foreground", children: narrows.map((n, i) => /* @__PURE__ */ jsxs(React23.Fragment, { children: [
|
|
4975
|
+
i > 0 ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "opacity-40", children: "\xB7" }) : null,
|
|
4976
|
+
/* @__PURE__ */ jsx("span", { className: "inline-flex items-center", children: describe(n) })
|
|
4977
|
+
] }, `${n.kind}-${i}`)) }) : /* @__PURE__ */ jsx("span", { className: "text-meta text-muted-foreground/70", children: "narrows nothing \u2014 the whole model, inside the guardrails" })
|
|
4978
|
+
]
|
|
4979
|
+
}
|
|
4980
|
+
);
|
|
4981
|
+
}
|
|
4982
|
+
);
|
|
4983
|
+
LensRow.displayName = "LensRow";
|
|
4984
|
+
var MatchPreview = React23.forwardRef(
|
|
4985
|
+
({ pattern, matches = [], loading, limit = 8, className, ...props }, ref) => {
|
|
4986
|
+
const hits = matches.filter((m) => m.matched);
|
|
4987
|
+
const misses = matches.filter((m) => !m.matched);
|
|
4988
|
+
const shown = [...hits, ...misses].slice(0, limit);
|
|
4989
|
+
const hidden = matches.length - shown.length;
|
|
4990
|
+
return /* @__PURE__ */ jsxs(
|
|
4991
|
+
"div",
|
|
4992
|
+
{
|
|
4993
|
+
ref,
|
|
4994
|
+
className: cn(
|
|
4995
|
+
"flex min-w-0 flex-col gap-1 rounded-control border border-border p-2",
|
|
4996
|
+
className
|
|
4997
|
+
),
|
|
4998
|
+
...props,
|
|
4999
|
+
children: [
|
|
5000
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
5001
|
+
/* @__PURE__ */ jsx("span", { className: "text-meta text-muted-foreground", children: "what this matches" }),
|
|
5002
|
+
/* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 text-meta tabular-nums text-muted-foreground", children: loading ? "\u2026" : `${hits.length} of ${matches.length}` })
|
|
5003
|
+
] }),
|
|
5004
|
+
loading ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 py-0.5", children: [
|
|
5005
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-3/5" }),
|
|
5006
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-2/5" }),
|
|
5007
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-1/2" })
|
|
5008
|
+
] }) : matches.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-meta text-muted-foreground/70", children: "nothing in this Graph to match \u2014 the layer has no participants yet" }) : hits.length === 0 ? /* @__PURE__ */ jsxs("p", { className: "text-meta text-destructive", children: [
|
|
5009
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: pattern }),
|
|
5010
|
+
" matches nothing here"
|
|
5011
|
+
] }) : null,
|
|
5012
|
+
!loading && shown.length ? /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
5013
|
+
shown.map((m) => /* @__PURE__ */ jsx(
|
|
5014
|
+
AddressChip,
|
|
5015
|
+
{
|
|
5016
|
+
address: m.address,
|
|
5017
|
+
tone: m.matched ? "allowed" : "untouched"
|
|
5018
|
+
},
|
|
5019
|
+
m.address
|
|
5020
|
+
)),
|
|
5021
|
+
hidden > 0 ? /* @__PURE__ */ jsxs("span", { className: "pt-0.5 text-meta text-muted-foreground/70", children: [
|
|
5022
|
+
"and ",
|
|
5023
|
+
hidden,
|
|
5024
|
+
" more"
|
|
5025
|
+
] }) : null
|
|
5026
|
+
] }) : null
|
|
5027
|
+
]
|
|
5028
|
+
}
|
|
5029
|
+
);
|
|
5030
|
+
}
|
|
5031
|
+
);
|
|
5032
|
+
MatchPreview.displayName = "MatchPreview";
|
|
4534
5033
|
var MenuItem = ({
|
|
4535
5034
|
label,
|
|
4536
5035
|
icon: Icon,
|
|
@@ -4591,7 +5090,7 @@ var MenuItem = ({
|
|
|
4591
5090
|
)
|
|
4592
5091
|
] });
|
|
4593
5092
|
};
|
|
4594
|
-
var
|
|
5093
|
+
var TONE2 = {
|
|
4595
5094
|
running: "text-info",
|
|
4596
5095
|
success: "text-success",
|
|
4597
5096
|
warning: "text-warning",
|
|
@@ -4618,7 +5117,7 @@ var MetricTile = React23.forwardRef(
|
|
|
4618
5117
|
// `1,880` and `2 / 5` in adjacent tiles sit at different widths, and
|
|
4619
5118
|
// a strip of six stops reading as one row of numbers.
|
|
4620
5119
|
"font-mono text-lg font-semibold leading-tight",
|
|
4621
|
-
tone ?
|
|
5120
|
+
tone ? TONE2[tone] : void 0
|
|
4622
5121
|
),
|
|
4623
5122
|
children: value
|
|
4624
5123
|
}
|
|
@@ -4637,7 +5136,7 @@ var MetricTile = React23.forwardRef(
|
|
|
4637
5136
|
children: /* @__PURE__ */ jsx(
|
|
4638
5137
|
"div",
|
|
4639
5138
|
{
|
|
4640
|
-
className: cn("h-full", tone ?
|
|
5139
|
+
className: cn("h-full", tone ? TONE2[tone] : "text-primary", "bg-current"),
|
|
4641
5140
|
style: { width: `${Math.min(Math.max(meter, 0), 1) * 100}%` }
|
|
4642
5141
|
}
|
|
4643
5142
|
)
|
|
@@ -4709,27 +5208,6 @@ var NestedMenu = (props) => {
|
|
|
4709
5208
|
}
|
|
4710
5209
|
);
|
|
4711
5210
|
};
|
|
4712
|
-
var Eyebrow = React23.forwardRef(
|
|
4713
|
-
({ aside, tone = "muted", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
4714
|
-
"div",
|
|
4715
|
-
{
|
|
4716
|
-
ref,
|
|
4717
|
-
className: cn(
|
|
4718
|
-
"flex items-baseline gap-2 text-meta font-semibold uppercase tracking-wide",
|
|
4719
|
-
tone === "muted" && "text-muted-foreground",
|
|
4720
|
-
tone === "foreground" && "text-foreground",
|
|
4721
|
-
tone === "accent" && "text-primary",
|
|
4722
|
-
className
|
|
4723
|
-
),
|
|
4724
|
-
...props,
|
|
4725
|
-
children: [
|
|
4726
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children }),
|
|
4727
|
-
aside != null ? /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 font-normal normal-case tracking-normal text-muted-foreground", children: aside }) : null
|
|
4728
|
-
]
|
|
4729
|
-
}
|
|
4730
|
-
)
|
|
4731
|
-
);
|
|
4732
|
-
Eyebrow.displayName = "Eyebrow";
|
|
4733
5211
|
var PanelBox = React23.forwardRef(
|
|
4734
5212
|
({ title, aside, flush, className, headerClassName, bodyClassName, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
4735
5213
|
Card,
|
|
@@ -5048,47 +5526,6 @@ var PropertyRow = React23.forwardRef(
|
|
|
5048
5526
|
)
|
|
5049
5527
|
);
|
|
5050
5528
|
PropertyRow.displayName = "PropertyRow";
|
|
5051
|
-
var RecordHeader = React23.forwardRef(
|
|
5052
|
-
({ tone, crumbs, chips, actions, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5053
|
-
"div",
|
|
5054
|
-
{
|
|
5055
|
-
ref,
|
|
5056
|
-
className: cn(
|
|
5057
|
-
"flex shrink-0 items-center gap-2.5 border-b border-border bg-card px-4 py-2.5",
|
|
5058
|
-
className
|
|
5059
|
-
),
|
|
5060
|
-
...props,
|
|
5061
|
-
children: [
|
|
5062
|
-
tone ? /* @__PURE__ */ jsx(StatusDot, { tone, size: "lg" }) : null,
|
|
5063
|
-
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-1.5", children: crumbs.map((crumb, i) => {
|
|
5064
|
-
const last = i === crumbs.length - 1;
|
|
5065
|
-
return /* @__PURE__ */ jsxs(React23.Fragment, { children: [
|
|
5066
|
-
i > 0 ? /* @__PURE__ */ jsx(
|
|
5067
|
-
ChevronRight,
|
|
5068
|
-
{
|
|
5069
|
-
"aria-hidden": true,
|
|
5070
|
-
className: "size-3.5 shrink-0 text-muted-foreground/60"
|
|
5071
|
-
}
|
|
5072
|
-
) : null,
|
|
5073
|
-
/* @__PURE__ */ jsx(
|
|
5074
|
-
"span",
|
|
5075
|
-
{
|
|
5076
|
-
className: cn(
|
|
5077
|
-
"min-w-0 truncate font-mono",
|
|
5078
|
-
last ? "text-base font-semibold text-foreground" : "text-muted-foreground"
|
|
5079
|
-
),
|
|
5080
|
-
children: crumb
|
|
5081
|
-
}
|
|
5082
|
-
)
|
|
5083
|
-
] }, i);
|
|
5084
|
-
}) }),
|
|
5085
|
-
chips ? /* @__PURE__ */ jsx("span", { className: "flex shrink-0 items-center gap-1.5", children: chips }) : null,
|
|
5086
|
-
actions ? /* @__PURE__ */ jsx("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: actions }) : null
|
|
5087
|
-
]
|
|
5088
|
-
}
|
|
5089
|
-
)
|
|
5090
|
-
);
|
|
5091
|
-
RecordHeader.displayName = "RecordHeader";
|
|
5092
5529
|
var ProposalCard = React23.forwardRef(
|
|
5093
5530
|
({
|
|
5094
5531
|
title,
|
|
@@ -5223,6 +5660,47 @@ var RatingControl = React23.forwardRef(
|
|
|
5223
5660
|
)
|
|
5224
5661
|
);
|
|
5225
5662
|
RatingControl.displayName = "RatingControl";
|
|
5663
|
+
var RecordHeader = React23.forwardRef(
|
|
5664
|
+
({ tone, crumbs, chips, actions, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5665
|
+
"div",
|
|
5666
|
+
{
|
|
5667
|
+
ref,
|
|
5668
|
+
className: cn(
|
|
5669
|
+
"flex shrink-0 items-center gap-2.5 border-b border-border bg-card px-4 py-2.5",
|
|
5670
|
+
className
|
|
5671
|
+
),
|
|
5672
|
+
...props,
|
|
5673
|
+
children: [
|
|
5674
|
+
tone ? /* @__PURE__ */ jsx(StatusDot, { tone, size: "lg" }) : null,
|
|
5675
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-1.5", children: crumbs.map((crumb, i) => {
|
|
5676
|
+
const last = i === crumbs.length - 1;
|
|
5677
|
+
return /* @__PURE__ */ jsxs(React23.Fragment, { children: [
|
|
5678
|
+
i > 0 ? /* @__PURE__ */ jsx(
|
|
5679
|
+
ChevronRight,
|
|
5680
|
+
{
|
|
5681
|
+
"aria-hidden": true,
|
|
5682
|
+
className: "size-3.5 shrink-0 text-muted-foreground/60"
|
|
5683
|
+
}
|
|
5684
|
+
) : null,
|
|
5685
|
+
/* @__PURE__ */ jsx(
|
|
5686
|
+
"span",
|
|
5687
|
+
{
|
|
5688
|
+
className: cn(
|
|
5689
|
+
"min-w-0 truncate font-mono",
|
|
5690
|
+
last ? "text-base font-semibold text-foreground" : "text-muted-foreground"
|
|
5691
|
+
),
|
|
5692
|
+
children: crumb
|
|
5693
|
+
}
|
|
5694
|
+
)
|
|
5695
|
+
] }, i);
|
|
5696
|
+
}) }),
|
|
5697
|
+
chips ? /* @__PURE__ */ jsx("span", { className: "flex shrink-0 items-center gap-1.5", children: chips }) : null,
|
|
5698
|
+
actions ? /* @__PURE__ */ jsx("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: actions }) : null
|
|
5699
|
+
]
|
|
5700
|
+
}
|
|
5701
|
+
)
|
|
5702
|
+
);
|
|
5703
|
+
RecordHeader.displayName = "RecordHeader";
|
|
5226
5704
|
var RepairNote = React23.forwardRef(
|
|
5227
5705
|
({ from, to, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5228
5706
|
"div",
|
|
@@ -5382,6 +5860,138 @@ function RichSelect({
|
|
|
5382
5860
|
)
|
|
5383
5861
|
] });
|
|
5384
5862
|
}
|
|
5863
|
+
function describeSlice(select, declared) {
|
|
5864
|
+
const out = [];
|
|
5865
|
+
if (select.time) {
|
|
5866
|
+
const { axis, from, to } = select.time;
|
|
5867
|
+
out.push({
|
|
5868
|
+
axisKind: "time",
|
|
5869
|
+
text: `time ${from ?? "\u2026"} \u2192 ${to ?? "\u2026"} \xB7 axis ${axis}`,
|
|
5870
|
+
undeclared: declared ? declared.time == null : void 0
|
|
5871
|
+
});
|
|
5872
|
+
}
|
|
5873
|
+
if (select.geo) {
|
|
5874
|
+
const { axis, vocab, in: values } = select.geo;
|
|
5875
|
+
out.push({
|
|
5876
|
+
axisKind: "geo",
|
|
5877
|
+
text: `geo ${values.join(", ")} \xB7 axis ${axis}${vocab ? ` \xB7 ${vocab}` : ""}`,
|
|
5878
|
+
undeclared: declared ? declared.geo == null : void 0
|
|
5879
|
+
});
|
|
5880
|
+
}
|
|
5881
|
+
for (const [dim, values] of Object.entries(select.dims ?? {})) {
|
|
5882
|
+
out.push({
|
|
5883
|
+
axisKind: dim,
|
|
5884
|
+
text: `${dim} ${values.join(", ")}`,
|
|
5885
|
+
undeclared: declared ? !(declared.dims ?? []).includes(dim) : void 0
|
|
5886
|
+
});
|
|
5887
|
+
}
|
|
5888
|
+
return out;
|
|
5889
|
+
}
|
|
5890
|
+
var SliceSummary = React23.forwardRef(
|
|
5891
|
+
({ select, declaredAxes, modelLabel, variant = "line", className, ...props }, ref) => {
|
|
5892
|
+
const lines = select ? describeSlice(select, declaredAxes) : [];
|
|
5893
|
+
if (!lines.length) {
|
|
5894
|
+
return /* @__PURE__ */ jsx(
|
|
5895
|
+
"div",
|
|
5896
|
+
{
|
|
5897
|
+
ref,
|
|
5898
|
+
className: cn("text-meta text-muted-foreground/70", className),
|
|
5899
|
+
...props,
|
|
5900
|
+
children: "not sliced \u2014 the whole model"
|
|
5901
|
+
}
|
|
5902
|
+
);
|
|
5903
|
+
}
|
|
5904
|
+
return /* @__PURE__ */ jsx(
|
|
5905
|
+
"div",
|
|
5906
|
+
{
|
|
5907
|
+
ref,
|
|
5908
|
+
className: cn(
|
|
5909
|
+
"flex min-w-0 flex-col gap-0.5",
|
|
5910
|
+
variant === "block" && "rounded-control border border-border p-2",
|
|
5911
|
+
className
|
|
5912
|
+
),
|
|
5913
|
+
...props,
|
|
5914
|
+
children: lines.map((line) => /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
5915
|
+
/* @__PURE__ */ jsx(
|
|
5916
|
+
"span",
|
|
5917
|
+
{
|
|
5918
|
+
className: cn(
|
|
5919
|
+
"truncate text-meta",
|
|
5920
|
+
line.undeclared ? "text-destructive line-through decoration-destructive/50" : "text-muted-foreground"
|
|
5921
|
+
),
|
|
5922
|
+
children: line.text
|
|
5923
|
+
}
|
|
5924
|
+
),
|
|
5925
|
+
line.undeclared ? /* @__PURE__ */ jsxs("span", { className: "text-meta text-destructive", children: [
|
|
5926
|
+
modelLabel ?? "this model",
|
|
5927
|
+
" declares no ",
|
|
5928
|
+
line.axisKind,
|
|
5929
|
+
" axis, so it cannot be sliced by one. Declaring one is a modelling act."
|
|
5930
|
+
] }) : null
|
|
5931
|
+
] }, line.axisKind))
|
|
5932
|
+
}
|
|
5933
|
+
);
|
|
5934
|
+
}
|
|
5935
|
+
);
|
|
5936
|
+
SliceSummary.displayName = "SliceSummary";
|
|
5937
|
+
var RuleRow = React23.forwardRef(
|
|
5938
|
+
({ match, allow, properties, select, egress, readOnly, className, ...props }, ref) => {
|
|
5939
|
+
const excluded = properties?.exclude ?? [];
|
|
5940
|
+
const sends = egress?.may_send ?? [];
|
|
5941
|
+
const sliced = Boolean(
|
|
5942
|
+
select?.time || select?.geo || Object.keys(select?.dims ?? {}).length
|
|
5943
|
+
);
|
|
5944
|
+
return /* @__PURE__ */ jsxs(
|
|
5945
|
+
"div",
|
|
5946
|
+
{
|
|
5947
|
+
ref,
|
|
5948
|
+
className: cn(
|
|
5949
|
+
// The verb column is `5ch` — the width of `allow` in the mono face it
|
|
5950
|
+
// is set in. A character unit rather than a pixel one, so the indent
|
|
5951
|
+
// holds when `data-density` moves the font size, and so every row
|
|
5952
|
+
// aligns whether its verb is `allow` or `deny`.
|
|
5953
|
+
"grid min-w-0 grid-cols-[5ch_minmax(0,1fr)] items-baseline gap-x-2 gap-y-0.5",
|
|
5954
|
+
"rounded-control px-1 py-1",
|
|
5955
|
+
!readOnly && "hover:bg-accent",
|
|
5956
|
+
className
|
|
5957
|
+
),
|
|
5958
|
+
...props,
|
|
5959
|
+
children: [
|
|
5960
|
+
/* @__PURE__ */ jsx(
|
|
5961
|
+
"span",
|
|
5962
|
+
{
|
|
5963
|
+
className: cn(
|
|
5964
|
+
"font-mono text-meta",
|
|
5965
|
+
allow ? "text-muted-foreground" : "font-semibold text-destructive"
|
|
5966
|
+
),
|
|
5967
|
+
children: allow ? "allow" : "deny"
|
|
5968
|
+
}
|
|
5969
|
+
),
|
|
5970
|
+
/* @__PURE__ */ jsx(
|
|
5971
|
+
AddressChip,
|
|
5972
|
+
{
|
|
5973
|
+
address: match,
|
|
5974
|
+
tone: allow ? "allowed" : "denied",
|
|
5975
|
+
className: "min-w-0"
|
|
5976
|
+
}
|
|
5977
|
+
),
|
|
5978
|
+
excluded.length || sliced || sends.length ? /* @__PURE__ */ jsxs("div", { className: "col-start-2 flex min-w-0 flex-col gap-0.5", children: [
|
|
5979
|
+
excluded.length ? /* @__PURE__ */ jsxs("span", { className: "truncate text-meta text-muted-foreground", children: [
|
|
5980
|
+
"excludes ",
|
|
5981
|
+
excluded.join(", ")
|
|
5982
|
+
] }) : null,
|
|
5983
|
+
sliced ? /* @__PURE__ */ jsx(SliceSummary, { select, variant: "line" }) : null,
|
|
5984
|
+
sends.length ? /* @__PURE__ */ jsxs("span", { className: "truncate text-meta text-muted-foreground", children: [
|
|
5985
|
+
"may send ",
|
|
5986
|
+
sends.join(", ")
|
|
5987
|
+
] }) : null
|
|
5988
|
+
] }) : null
|
|
5989
|
+
]
|
|
5990
|
+
}
|
|
5991
|
+
);
|
|
5992
|
+
}
|
|
5993
|
+
);
|
|
5994
|
+
RuleRow.displayName = "RuleRow";
|
|
5385
5995
|
var SearchInput = ({
|
|
5386
5996
|
value,
|
|
5387
5997
|
onChange,
|
|
@@ -6744,6 +7354,6 @@ var Typography = {
|
|
|
6744
7354
|
Pre: TypographyPre
|
|
6745
7355
|
};
|
|
6746
7356
|
|
|
6747
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgentChip, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppStatusBar, Avatar, AvatarFallback, AvatarImage, Badge, BarChartH, BarChartV, BoundChip, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, ButtonWithTooltip, CannotAnswerCard, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChatSession, ChatSessionActivityRow, ChatSessionActivitySubLine, ChatSessionComposer, ChatSessionContextChip, ChatSessionDisclosure, ChatSessionMessage, ChatSessionMessageOptions, ChatSessionProgressLine, ChatSessionPromptRow, ChatSessionStatusBar, ChatSessionTaskGroup, ChatSessionTaskRow, CitationList, CitationMarker, CitationRow, ClampedText, ClarifyCard, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextBar, DiagnosisCard, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffList, DiffRow, DivergingBar, DotRating, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmissionCard, EmissionHeader, EmptyState, EmptyStateLock, ErrorBoundary, Eyebrow, FilterBar, FilterChip, HeatStrip, HoverCard, HoverCardContent, HoverCardTrigger, Item3 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Legend, LegendItem, MenuItem, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MetricGrid, MetricTile, NavBase, NavHorizontal, NavHorizontalItems, NavItems, NavVertical, NavVerticalItems, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelBox, PanelContent, PanelStack, Popover, PopoverContent, PopoverTrigger, Progress, PropertyList, PropertyRow, ProposalCard, RatingControl, RecordHeader, RepairNote, ResizableHandle, ResizablePanel, ResizablePanelGroup, RetryNote, RichSelect, ScrollArea, ScrollBar, SearchInput, SectionHeader, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Sparkline, Spinner, StatusDot, TabbedPanel, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TaskGantt, TaskGanttDetailCard, TaskNode, TemplatePicker, Terminal, TerminalLine, TimelineEntry, TimelineFooter, TimelineList, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, TreeItem, TreeView, Typography, TypographyBlockquote, TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyH5, TypographyH6, TypographyInlineCode, TypographyLarge, TypographyLead, TypographyList, TypographyMuted, TypographyP, TypographyPre, TypographySmall, UnderDevelopment, agentChipVariants, badgeVariants, SWATCH as boundSwatch, buttonGroupVariants, buttonVariants, chatSessionGutterClass, cn, navigationMenuTriggerStyle, statusDotVariants, toggleVariants, useOverflowItems, useSidebar, useTour };
|
|
7357
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AddressChip, AgentChip, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppStatusBar, Avatar, AvatarFallback, AvatarImage, Badge, BarChartH, BarChartV, BoundChip, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, ButtonWithTooltip, CAST_ROLES, CannotAnswerCard, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CastTable, ChatSession, ChatSessionActivityRow, ChatSessionActivitySubLine, ChatSessionComposer, ChatSessionContextChip, ChatSessionDisclosure, ChatSessionMessage, ChatSessionMessageOptions, ChatSessionProgressLine, ChatSessionPromptRow, ChatSessionStatusBar, ChatSessionTaskGroup, ChatSessionTaskRow, CitationList, CitationMarker, CitationRow, ClampedText, ClarifyCard, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextBar, DiagnosisCard, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffList, DiffRow, DivergingBar, DotRating, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EgressList, EmissionCard, EmissionHeader, EmptyState, EmptyStateLock, ErrorBoundary, Eyebrow, FilterBar, FilterChip, HeatStrip, HoverCard, HoverCardContent, HoverCardTrigger, Item3 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, LayerChip, LayerSection, LayerStrip, Legend, LegendItem, LensChip, LensRow, MatchPreview, MenuItem, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MetricGrid, MetricTile, NavBase, NavHorizontal, NavHorizontalItems, NavItems, NavVertical, NavVerticalItems, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelBox, PanelContent, PanelStack, Popover, PopoverContent, PopoverTrigger, Progress, PropertyList, PropertyRow, ProposalCard, RatingControl, RecordHeader, RepairNote, ResizableHandle, ResizablePanel, ResizablePanelGroup, RetryNote, RichSelect, RuleRow, ScrollArea, ScrollBar, SearchInput, SectionHeader, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SliceSummary, Sparkline, Spinner, StatusDot, TabbedPanel, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TaskGantt, TaskGanttDetailCard, TaskNode, TemplatePicker, Terminal, TerminalLine, TimelineEntry, TimelineFooter, TimelineList, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, TreeItem, TreeView, Typography, TypographyBlockquote, TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyH5, TypographyH6, TypographyInlineCode, TypographyLarge, TypographyLead, TypographyList, TypographyMuted, TypographyP, TypographyPre, TypographySmall, UnderDevelopment, agentChipVariants, badgeVariants, SWATCH as boundSwatch, buttonGroupVariants, buttonVariants, chatSessionGutterClass, cn, describeSlice, LABEL as layerLabel, SWATCH2 as layerSwatch, navigationMenuTriggerStyle, split as splitAddress, statusDotVariants, toggleVariants, MARK_LABEL as touchLabel, useOverflowItems, useSidebar, useTour };
|
|
6748
7358
|
//# sourceMappingURL=index.js.map
|
|
6749
7359
|
//# sourceMappingURL=index.js.map
|