@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.cjs
CHANGED
|
@@ -2784,6 +2784,62 @@ var ToggleGroupItem = React23__namespace.forwardRef(({ className, children, vari
|
|
|
2784
2784
|
);
|
|
2785
2785
|
});
|
|
2786
2786
|
ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
|
|
2787
|
+
var TONE = {
|
|
2788
|
+
allowed: "text-foreground",
|
|
2789
|
+
denied: "text-destructive",
|
|
2790
|
+
refused: "text-destructive line-through decoration-destructive/50",
|
|
2791
|
+
untouched: "text-muted-foreground/70"
|
|
2792
|
+
};
|
|
2793
|
+
function split(address) {
|
|
2794
|
+
const cut = address.lastIndexOf("/");
|
|
2795
|
+
if (cut < 0) return { head: "", tail: address };
|
|
2796
|
+
return { head: address.slice(0, cut + 1), tail: address.slice(cut + 1) };
|
|
2797
|
+
}
|
|
2798
|
+
var AddressChip = React23__namespace.forwardRef(
|
|
2799
|
+
({ address, tone = "allowed", onOpen, className, ...props }, ref) => {
|
|
2800
|
+
const { head, tail } = split(address);
|
|
2801
|
+
const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2802
|
+
head ? (
|
|
2803
|
+
// `shrink-[999]` makes the head absorb essentially all the shrink, so
|
|
2804
|
+
// the kind gives way before the participant does — but the floor is
|
|
2805
|
+
// `2ch`, never `0`. A head that collapses to nothing renders
|
|
2806
|
+
// `graph_data/stitch/route_airport@…` as `route_airport@…`, which
|
|
2807
|
+
// reads as a whole address, and two different participants can come
|
|
2808
|
+
// out identical.
|
|
2809
|
+
//
|
|
2810
|
+
// Exactly two: `text-overflow` draws the ellipsis only when it fits,
|
|
2811
|
+
// so at `1ch` the browser keeps the raw first character and drops the
|
|
2812
|
+
// marker — `groute_airport@…`, a word that was never there. Two is
|
|
2813
|
+
// one character plus the ellipsis, which is the narrowest honest
|
|
2814
|
+
// truncation. Every `ch` above that is one the participant loses.
|
|
2815
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-[2ch] shrink-[999] truncate opacity-60", children: head })
|
|
2816
|
+
) : null,
|
|
2817
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 shrink truncate", children: tail })
|
|
2818
|
+
] });
|
|
2819
|
+
const shell = cn(
|
|
2820
|
+
"inline-flex min-w-0 max-w-full items-baseline font-mono text-meta",
|
|
2821
|
+
TONE[tone],
|
|
2822
|
+
className
|
|
2823
|
+
);
|
|
2824
|
+
if (onOpen) {
|
|
2825
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, className: cn(shell, "min-w-0"), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2826
|
+
"button",
|
|
2827
|
+
{
|
|
2828
|
+
type: "button",
|
|
2829
|
+
title: address,
|
|
2830
|
+
onClick: () => onOpen(address),
|
|
2831
|
+
className: cn(
|
|
2832
|
+
"inline-flex min-w-0 max-w-full cursor-pointer items-baseline rounded-control",
|
|
2833
|
+
"hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
2834
|
+
),
|
|
2835
|
+
children: body
|
|
2836
|
+
}
|
|
2837
|
+
) });
|
|
2838
|
+
}
|
|
2839
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, title: address, className: shell, ...props, children: body });
|
|
2840
|
+
}
|
|
2841
|
+
);
|
|
2842
|
+
AddressChip.displayName = "AddressChip";
|
|
2787
2843
|
var agentChipVariants = classVarianceAuthority.cva(
|
|
2788
2844
|
"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",
|
|
2789
2845
|
{
|
|
@@ -2821,36 +2877,6 @@ var AgentChip = React23__namespace.forwardRef(
|
|
|
2821
2877
|
)
|
|
2822
2878
|
);
|
|
2823
2879
|
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
2880
|
var stateVariants = classVarianceAuthority.cva("inline-flex shrink-0 items-center gap-1.5 font-medium", {
|
|
2855
2881
|
variants: {
|
|
2856
2882
|
tone: {
|
|
@@ -2996,6 +3022,36 @@ var BarChartV = React23__namespace.forwardRef(
|
|
|
2996
3022
|
}
|
|
2997
3023
|
);
|
|
2998
3024
|
BarChartV.displayName = "BarChartV";
|
|
3025
|
+
var SWATCH = {
|
|
3026
|
+
none: "bg-muted-foreground",
|
|
3027
|
+
network: "bg-warning",
|
|
3028
|
+
graph_read: "bg-success",
|
|
3029
|
+
graph_write: "bg-data-2",
|
|
3030
|
+
schema_write: "bg-data-4",
|
|
3031
|
+
ingest: "bg-info",
|
|
3032
|
+
llm: "bg-data-7",
|
|
3033
|
+
plan_write: "bg-data-5",
|
|
3034
|
+
work_write: "bg-destructive"
|
|
3035
|
+
};
|
|
3036
|
+
var BoundChip = React23__namespace.forwardRef(
|
|
3037
|
+
({ bound, swatchOnly, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3038
|
+
"span",
|
|
3039
|
+
{
|
|
3040
|
+
ref,
|
|
3041
|
+
className: cn(
|
|
3042
|
+
"inline-flex max-w-full shrink-0 items-center gap-1.5 font-mono text-meta text-muted-foreground",
|
|
3043
|
+
className
|
|
3044
|
+
),
|
|
3045
|
+
"aria-label": swatchOnly ? `bound: ${bound}` : void 0,
|
|
3046
|
+
...props,
|
|
3047
|
+
children: [
|
|
3048
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: cn("size-1.5 shrink-0", SWATCH[bound]) }),
|
|
3049
|
+
swatchOnly ? null : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: bound })
|
|
3050
|
+
]
|
|
3051
|
+
}
|
|
3052
|
+
)
|
|
3053
|
+
);
|
|
3054
|
+
BoundChip.displayName = "BoundChip";
|
|
2999
3055
|
function ButtonWithTooltip(props) {
|
|
3000
3056
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { delayDuration: 0, children: [
|
|
3001
3057
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", className: cn("hover:bg-transparent", props.className), ...props, children: props.children }) }),
|
|
@@ -3019,6 +3075,53 @@ var CannotAnswerCard = React23__namespace.forwardRef(({ label = "cannot answer",
|
|
|
3019
3075
|
}
|
|
3020
3076
|
));
|
|
3021
3077
|
CannotAnswerCard.displayName = "CannotAnswerCard";
|
|
3078
|
+
var CAST_ROLES = ["extract", "decide", "judge", "embed"];
|
|
3079
|
+
var PURPOSE = {
|
|
3080
|
+
extract: "prose in, structure out \u2014 the cheap one",
|
|
3081
|
+
decide: "writes the number a person acts on",
|
|
3082
|
+
judge: "scores an output \u2014 often local",
|
|
3083
|
+
embed: "text in, vector out"
|
|
3084
|
+
};
|
|
3085
|
+
var CastTable = React23__namespace.forwardRef(
|
|
3086
|
+
({ cast = {}, resolved, readOnly, className, ...props }, ref) => {
|
|
3087
|
+
const byRole = new Map((resolved ?? []).map((r) => [r.role, r]));
|
|
3088
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("min-w-0", className), ...props, children: [
|
|
3089
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Table, { density: "compact", children: [
|
|
3090
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
|
|
3091
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: "w-[5.5rem]", children: "role" }),
|
|
3092
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: "resolves to" }),
|
|
3093
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: "why this one" })
|
|
3094
|
+
] }) }),
|
|
3095
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: CAST_ROLES.map((role) => {
|
|
3096
|
+
const hit = byRole.get(role);
|
|
3097
|
+
const address = hit ? hit.address : cast[role] ?? null;
|
|
3098
|
+
const denied = hit ? !hit.allowed : false;
|
|
3099
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { "data-role": role, children: [
|
|
3100
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "font-mono text-meta text-muted-foreground", children: role }),
|
|
3101
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "min-w-0", children: address ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3102
|
+
AddressChip,
|
|
3103
|
+
{
|
|
3104
|
+
address,
|
|
3105
|
+
tone: denied ? "denied" : "allowed"
|
|
3106
|
+
}
|
|
3107
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-meta text-muted-foreground/70", children: "nothing casts it" }) }),
|
|
3108
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "text-meta text-muted-foreground", children: denied ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-destructive", children: [
|
|
3109
|
+
"denied by ",
|
|
3110
|
+
hit?.ruleMatched ?? "this world"
|
|
3111
|
+
] }) : hit?.source ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: hit.source !== "shipped" ? `set on the ${hit.source}` : address ? "shipped default" : (
|
|
3112
|
+
// No address *and* nothing shipped resolves it —
|
|
3113
|
+
// the one row that says the run may open on a
|
|
3114
|
+
// model this Graph never chose.
|
|
3115
|
+
"nothing casts it, and no shipped default resolves it"
|
|
3116
|
+
) }) : PURPOSE[role] })
|
|
3117
|
+
] }, role);
|
|
3118
|
+
}) })
|
|
3119
|
+
] }),
|
|
3120
|
+
readOnly ? null : /* @__PURE__ */ jsxRuntime.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." })
|
|
3121
|
+
] });
|
|
3122
|
+
}
|
|
3123
|
+
);
|
|
3124
|
+
CastTable.displayName = "CastTable";
|
|
3022
3125
|
function ChatSession({
|
|
3023
3126
|
children,
|
|
3024
3127
|
footer,
|
|
@@ -4270,6 +4373,44 @@ var DivergingBar = React23__namespace.forwardRef(
|
|
|
4270
4373
|
}
|
|
4271
4374
|
);
|
|
4272
4375
|
DivergingBar.displayName = "DivergingBar";
|
|
4376
|
+
var EgressList = React23__namespace.forwardRef(
|
|
4377
|
+
({ to, classes = [], cut = [], className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4378
|
+
"div",
|
|
4379
|
+
{
|
|
4380
|
+
ref,
|
|
4381
|
+
className: cn("flex min-w-0 flex-col gap-1", className),
|
|
4382
|
+
...props,
|
|
4383
|
+
children: [
|
|
4384
|
+
/* @__PURE__ */ jsxRuntime.jsx(AddressChip, { address: to }),
|
|
4385
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5 pl-3", children: [
|
|
4386
|
+
classes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-meta text-destructive", children: "nothing may be sent" }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-wrap items-center gap-1 text-meta text-muted-foreground", children: [
|
|
4387
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: "may send" }),
|
|
4388
|
+
classes.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4389
|
+
"span",
|
|
4390
|
+
{
|
|
4391
|
+
className: "rounded-control bg-muted px-1 font-mono text-foreground",
|
|
4392
|
+
children: c
|
|
4393
|
+
},
|
|
4394
|
+
c
|
|
4395
|
+
))
|
|
4396
|
+
] }),
|
|
4397
|
+
cut.length ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-wrap items-center gap-1 text-meta text-muted-foreground", children: [
|
|
4398
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: "cut" }),
|
|
4399
|
+
cut.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4400
|
+
"span",
|
|
4401
|
+
{
|
|
4402
|
+
className: "rounded-control bg-muted px-1 font-mono text-destructive line-through decoration-destructive/50",
|
|
4403
|
+
children: c
|
|
4404
|
+
},
|
|
4405
|
+
c
|
|
4406
|
+
))
|
|
4407
|
+
] }) : null
|
|
4408
|
+
] })
|
|
4409
|
+
]
|
|
4410
|
+
}
|
|
4411
|
+
)
|
|
4412
|
+
);
|
|
4413
|
+
EgressList.displayName = "EgressList";
|
|
4273
4414
|
var EmissionHeader = React23__namespace.forwardRef(({ kind, template, citation, note, actions, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4274
4415
|
"div",
|
|
4275
4416
|
{
|
|
@@ -4393,6 +4534,27 @@ var ErrorBoundary = class extends React23.Component {
|
|
|
4393
4534
|
return this.props.children;
|
|
4394
4535
|
}
|
|
4395
4536
|
};
|
|
4537
|
+
var Eyebrow = React23__namespace.forwardRef(
|
|
4538
|
+
({ aside, tone = "muted", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4539
|
+
"div",
|
|
4540
|
+
{
|
|
4541
|
+
ref,
|
|
4542
|
+
className: cn(
|
|
4543
|
+
"flex items-baseline gap-2 text-meta font-semibold uppercase tracking-wide",
|
|
4544
|
+
tone === "muted" && "text-muted-foreground",
|
|
4545
|
+
tone === "foreground" && "text-foreground",
|
|
4546
|
+
tone === "accent" && "text-primary",
|
|
4547
|
+
className
|
|
4548
|
+
),
|
|
4549
|
+
...props,
|
|
4550
|
+
children: [
|
|
4551
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children }),
|
|
4552
|
+
aside != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto shrink-0 font-normal normal-case tracking-normal text-muted-foreground", children: aside }) : null
|
|
4553
|
+
]
|
|
4554
|
+
}
|
|
4555
|
+
)
|
|
4556
|
+
);
|
|
4557
|
+
Eyebrow.displayName = "Eyebrow";
|
|
4396
4558
|
var FilterBar = React23__namespace.forwardRef(
|
|
4397
4559
|
({ summary, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4398
4560
|
"div",
|
|
@@ -4490,6 +4652,186 @@ var HeatStrip = React23__namespace.forwardRef(
|
|
|
4490
4652
|
}
|
|
4491
4653
|
);
|
|
4492
4654
|
HeatStrip.displayName = "HeatStrip";
|
|
4655
|
+
var LABEL = {
|
|
4656
|
+
graph_data: "graph data",
|
|
4657
|
+
llm: "llm",
|
|
4658
|
+
third_party: "third party",
|
|
4659
|
+
cache: "cache",
|
|
4660
|
+
human: "human",
|
|
4661
|
+
agent: "agent"
|
|
4662
|
+
};
|
|
4663
|
+
var SWATCH2 = {
|
|
4664
|
+
graph_data: "bg-data-1",
|
|
4665
|
+
llm: "bg-data-7",
|
|
4666
|
+
third_party: "bg-data-8",
|
|
4667
|
+
cache: "bg-data-3",
|
|
4668
|
+
human: "bg-data-6",
|
|
4669
|
+
agent: "bg-muted-foreground"
|
|
4670
|
+
};
|
|
4671
|
+
var LayerChip = React23__namespace.forwardRef(
|
|
4672
|
+
({ layer, count, dim, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4673
|
+
"span",
|
|
4674
|
+
{
|
|
4675
|
+
ref,
|
|
4676
|
+
className: cn(
|
|
4677
|
+
"inline-flex max-w-full shrink-0 items-center gap-1.5 font-mono text-meta",
|
|
4678
|
+
dim ? "text-muted-foreground/70" : "text-muted-foreground",
|
|
4679
|
+
className
|
|
4680
|
+
),
|
|
4681
|
+
...props,
|
|
4682
|
+
children: [
|
|
4683
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4684
|
+
"span",
|
|
4685
|
+
{
|
|
4686
|
+
"aria-hidden": true,
|
|
4687
|
+
className: cn(
|
|
4688
|
+
"size-1.5 shrink-0",
|
|
4689
|
+
dim ? "bg-muted-foreground/50" : SWATCH2[layer]
|
|
4690
|
+
)
|
|
4691
|
+
}
|
|
4692
|
+
),
|
|
4693
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: LABEL[layer] }),
|
|
4694
|
+
count != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 tabular-nums opacity-70", children: count }) : null
|
|
4695
|
+
]
|
|
4696
|
+
}
|
|
4697
|
+
)
|
|
4698
|
+
);
|
|
4699
|
+
LayerChip.displayName = "LayerChip";
|
|
4700
|
+
var LayerSection = React23__namespace.forwardRef(
|
|
4701
|
+
({ layer, summary, count, dim, className, children, ...props }, ref) => {
|
|
4702
|
+
const empty = React23__namespace.Children.count(children) === 0;
|
|
4703
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4704
|
+
"section",
|
|
4705
|
+
{
|
|
4706
|
+
ref,
|
|
4707
|
+
className: cn("flex min-w-0 flex-col gap-1", className),
|
|
4708
|
+
...props,
|
|
4709
|
+
children: [
|
|
4710
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-baseline gap-2 border-b border-border pb-1", children: [
|
|
4711
|
+
/* @__PURE__ */ jsxRuntime.jsx(LayerChip, { layer, count, dim }),
|
|
4712
|
+
summary != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto min-w-0 shrink truncate text-meta text-muted-foreground", children: summary }) : null
|
|
4713
|
+
] }),
|
|
4714
|
+
empty ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 py-1 text-meta 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 })
|
|
4715
|
+
]
|
|
4716
|
+
}
|
|
4717
|
+
);
|
|
4718
|
+
}
|
|
4719
|
+
);
|
|
4720
|
+
LayerSection.displayName = "LayerSection";
|
|
4721
|
+
var MARK = {
|
|
4722
|
+
out: "bg-primary",
|
|
4723
|
+
in: "bg-data-1",
|
|
4724
|
+
refused: "bg-destructive",
|
|
4725
|
+
skipped: "bg-muted-foreground/30"
|
|
4726
|
+
};
|
|
4727
|
+
var MARK_LABEL = {
|
|
4728
|
+
out: "sent",
|
|
4729
|
+
in: "read",
|
|
4730
|
+
refused: "refused",
|
|
4731
|
+
skipped: "skipped"
|
|
4732
|
+
};
|
|
4733
|
+
var LayerStrip = React23__namespace.forwardRef(
|
|
4734
|
+
({
|
|
4735
|
+
bands,
|
|
4736
|
+
steps,
|
|
4737
|
+
onSelectStep,
|
|
4738
|
+
selectedStep,
|
|
4739
|
+
frozenLabels = true,
|
|
4740
|
+
className,
|
|
4741
|
+
...props
|
|
4742
|
+
}, ref) => {
|
|
4743
|
+
const byBand = (layer) => steps.map((step) => ({
|
|
4744
|
+
step,
|
|
4745
|
+
touch: step.touches.find((t) => t.layer === layer)
|
|
4746
|
+
}));
|
|
4747
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4748
|
+
"div",
|
|
4749
|
+
{
|
|
4750
|
+
ref,
|
|
4751
|
+
className: cn(
|
|
4752
|
+
"min-w-0 overflow-x-auto rounded-control border border-border",
|
|
4753
|
+
className
|
|
4754
|
+
),
|
|
4755
|
+
...props,
|
|
4756
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4757
|
+
"div",
|
|
4758
|
+
{
|
|
4759
|
+
className: "grid min-w-max",
|
|
4760
|
+
style: {
|
|
4761
|
+
gridTemplateColumns: `9rem repeat(${steps.length}, minmax(2.5rem, 1fr))`
|
|
4762
|
+
},
|
|
4763
|
+
children: [
|
|
4764
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4765
|
+
"div",
|
|
4766
|
+
{
|
|
4767
|
+
className: cn(
|
|
4768
|
+
"border-b border-border bg-background px-2 py-1",
|
|
4769
|
+
frozenLabels && "sticky left-0 z-20"
|
|
4770
|
+
),
|
|
4771
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-meta text-muted-foreground", children: "layer" })
|
|
4772
|
+
}
|
|
4773
|
+
),
|
|
4774
|
+
steps.map((step) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4775
|
+
"button",
|
|
4776
|
+
{
|
|
4777
|
+
type: "button",
|
|
4778
|
+
onClick: () => onSelectStep?.(step.id),
|
|
4779
|
+
title: step.seq != null ? `${step.label} \xB7 seq ${step.seq}` : step.label,
|
|
4780
|
+
className: cn(
|
|
4781
|
+
"border-b border-l border-border px-1 py-1 text-meta",
|
|
4782
|
+
"truncate text-muted-foreground",
|
|
4783
|
+
onSelectStep && "cursor-pointer hover:bg-accent",
|
|
4784
|
+
selectedStep === step.id && "bg-accent text-foreground",
|
|
4785
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
4786
|
+
),
|
|
4787
|
+
children: step.label
|
|
4788
|
+
},
|
|
4789
|
+
step.id
|
|
4790
|
+
)),
|
|
4791
|
+
bands.map((band) => /* @__PURE__ */ jsxRuntime.jsxs(React23__namespace.Fragment, { children: [
|
|
4792
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4793
|
+
"div",
|
|
4794
|
+
{
|
|
4795
|
+
className: cn(
|
|
4796
|
+
"flex items-center border-b border-border bg-background px-2 py-1",
|
|
4797
|
+
frozenLabels && "sticky left-0 z-10"
|
|
4798
|
+
),
|
|
4799
|
+
children: band.label ?? /* @__PURE__ */ jsxRuntime.jsx(LayerChip, { layer: band.layer })
|
|
4800
|
+
}
|
|
4801
|
+
),
|
|
4802
|
+
byBand(band.layer).map(({ step, touch }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4803
|
+
"div",
|
|
4804
|
+
{
|
|
4805
|
+
title: touch ? `${step.label} \xB7 ${MARK_LABEL[touch.direction]}${touch.address ? ` \xB7 ${touch.address}` : ""}${touch.ruleMatched ? ` \xB7 ${touch.ruleMatched}` : ""}` : void 0,
|
|
4806
|
+
className: cn(
|
|
4807
|
+
"flex items-center justify-center border-b border-l border-border px-1 py-1",
|
|
4808
|
+
selectedStep === step.id && "bg-accent"
|
|
4809
|
+
),
|
|
4810
|
+
children: touch ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4811
|
+
"span",
|
|
4812
|
+
{
|
|
4813
|
+
"aria-label": MARK_LABEL[touch.direction],
|
|
4814
|
+
className: cn(
|
|
4815
|
+
"h-1.5 w-full max-w-6 rounded-full",
|
|
4816
|
+
MARK[touch.direction],
|
|
4817
|
+
// Struck in place: the mark stays so the cell is not
|
|
4818
|
+
// mistaken for a step that never reached here.
|
|
4819
|
+
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"
|
|
4820
|
+
)
|
|
4821
|
+
}
|
|
4822
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "text-muted-foreground/25", children: "\xB7" })
|
|
4823
|
+
},
|
|
4824
|
+
`${band.layer}-${step.id}`
|
|
4825
|
+
))
|
|
4826
|
+
] }, band.layer))
|
|
4827
|
+
]
|
|
4828
|
+
}
|
|
4829
|
+
)
|
|
4830
|
+
}
|
|
4831
|
+
);
|
|
4832
|
+
}
|
|
4833
|
+
);
|
|
4834
|
+
LayerStrip.displayName = "LayerStrip";
|
|
4493
4835
|
function Swatch({ kind = "dot", color }) {
|
|
4494
4836
|
const style = { color };
|
|
4495
4837
|
if (kind === "dot")
|
|
@@ -4571,6 +4913,163 @@ var LegendItem = React23__namespace.forwardRef(
|
|
|
4571
4913
|
)
|
|
4572
4914
|
);
|
|
4573
4915
|
LegendItem.displayName = "LegendItem";
|
|
4916
|
+
var LensChip = React23__namespace.forwardRef(
|
|
4917
|
+
({ lens, onPick, className, ...props }, ref) => {
|
|
4918
|
+
const label = lens?.name ?? "Everything";
|
|
4919
|
+
const unset = lens == null;
|
|
4920
|
+
const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4921
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4922
|
+
"span",
|
|
4923
|
+
{
|
|
4924
|
+
"aria-hidden": true,
|
|
4925
|
+
className: cn(
|
|
4926
|
+
"size-1.5 shrink-0 rounded-full",
|
|
4927
|
+
unset ? "bg-muted-foreground" : "bg-primary"
|
|
4928
|
+
)
|
|
4929
|
+
}
|
|
4930
|
+
),
|
|
4931
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children: label })
|
|
4932
|
+
] });
|
|
4933
|
+
const shell = cn(
|
|
4934
|
+
"inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-control",
|
|
4935
|
+
"border border-border px-1.5 py-0.5 text-meta",
|
|
4936
|
+
unset ? "text-muted-foreground" : "text-foreground",
|
|
4937
|
+
className
|
|
4938
|
+
);
|
|
4939
|
+
if (onPick) {
|
|
4940
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, className: "inline-flex min-w-0", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4941
|
+
"button",
|
|
4942
|
+
{
|
|
4943
|
+
type: "button",
|
|
4944
|
+
onClick: onPick,
|
|
4945
|
+
title: unset ? "Everything \u2014 the whole model, inside the guardrails" : label,
|
|
4946
|
+
className: cn(
|
|
4947
|
+
shell,
|
|
4948
|
+
"cursor-pointer hover:bg-accent",
|
|
4949
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
4950
|
+
),
|
|
4951
|
+
children: body
|
|
4952
|
+
}
|
|
4953
|
+
) });
|
|
4954
|
+
}
|
|
4955
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, className: shell, title: label, ...props, children: body });
|
|
4956
|
+
}
|
|
4957
|
+
);
|
|
4958
|
+
LensChip.displayName = "LensChip";
|
|
4959
|
+
function describe(n) {
|
|
4960
|
+
switch (n.kind) {
|
|
4961
|
+
case "allow":
|
|
4962
|
+
return `${n.count} allow`;
|
|
4963
|
+
case "deny":
|
|
4964
|
+
return `${n.count} deny`;
|
|
4965
|
+
case "sliced":
|
|
4966
|
+
return "sliced";
|
|
4967
|
+
case "excludes":
|
|
4968
|
+
return `excludes ${n.properties.join(", ")}`;
|
|
4969
|
+
case "casts":
|
|
4970
|
+
return `casts ${n.roles.join(", ")}`;
|
|
4971
|
+
case "closes":
|
|
4972
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1", children: [
|
|
4973
|
+
"closes",
|
|
4974
|
+
n.layers.map((layer) => /* @__PURE__ */ jsxRuntime.jsx(LayerChip, { layer }, layer))
|
|
4975
|
+
] });
|
|
4976
|
+
}
|
|
4977
|
+
}
|
|
4978
|
+
var LensRow = React23__namespace.forwardRef(
|
|
4979
|
+
({ name, narrows = [], usage, selected, onSelect, className, ...props }, ref) => {
|
|
4980
|
+
const interactive = Boolean(onSelect);
|
|
4981
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4982
|
+
"div",
|
|
4983
|
+
{
|
|
4984
|
+
ref,
|
|
4985
|
+
role: interactive ? "button" : void 0,
|
|
4986
|
+
tabIndex: interactive ? 0 : void 0,
|
|
4987
|
+
"aria-pressed": interactive ? Boolean(selected) : void 0,
|
|
4988
|
+
onClick: interactive ? () => onSelect?.(name) : void 0,
|
|
4989
|
+
onKeyDown: interactive ? (event) => {
|
|
4990
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
4991
|
+
event.preventDefault();
|
|
4992
|
+
onSelect?.(name);
|
|
4993
|
+
}
|
|
4994
|
+
} : void 0,
|
|
4995
|
+
className: cn(
|
|
4996
|
+
"flex min-w-0 flex-col gap-0.5 rounded-control px-2 py-1.5",
|
|
4997
|
+
interactive && "cursor-pointer hover:bg-accent",
|
|
4998
|
+
selected && "bg-accent",
|
|
4999
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
5000
|
+
className
|
|
5001
|
+
),
|
|
5002
|
+
...props,
|
|
5003
|
+
children: [
|
|
5004
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
5005
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate text-sm font-medium text-foreground", children: name }),
|
|
5006
|
+
usage ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-auto shrink-0 text-meta text-muted-foreground", children: [
|
|
5007
|
+
"used in ",
|
|
5008
|
+
usage.runs,
|
|
5009
|
+
" run",
|
|
5010
|
+
usage.runs === 1 ? "" : "s",
|
|
5011
|
+
usage.lastUsed ? ` \xB7 last ${usage.lastUsed}` : ""
|
|
5012
|
+
] }) : null
|
|
5013
|
+
] }),
|
|
5014
|
+
narrows.length ? /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs(React23__namespace.Fragment, { children: [
|
|
5015
|
+
i > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "opacity-40", children: "\xB7" }) : null,
|
|
5016
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center", children: describe(n) })
|
|
5017
|
+
] }, `${n.kind}-${i}`)) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-meta text-muted-foreground/70", children: "narrows nothing \u2014 the whole model, inside the guardrails" })
|
|
5018
|
+
]
|
|
5019
|
+
}
|
|
5020
|
+
);
|
|
5021
|
+
}
|
|
5022
|
+
);
|
|
5023
|
+
LensRow.displayName = "LensRow";
|
|
5024
|
+
var MatchPreview = React23__namespace.forwardRef(
|
|
5025
|
+
({ pattern, matches = [], loading, limit = 8, className, ...props }, ref) => {
|
|
5026
|
+
const hits = matches.filter((m) => m.matched);
|
|
5027
|
+
const misses = matches.filter((m) => !m.matched);
|
|
5028
|
+
const shown = [...hits, ...misses].slice(0, limit);
|
|
5029
|
+
const hidden = matches.length - shown.length;
|
|
5030
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5031
|
+
"div",
|
|
5032
|
+
{
|
|
5033
|
+
ref,
|
|
5034
|
+
className: cn(
|
|
5035
|
+
"flex min-w-0 flex-col gap-1 rounded-control border border-border p-2",
|
|
5036
|
+
className
|
|
5037
|
+
),
|
|
5038
|
+
...props,
|
|
5039
|
+
children: [
|
|
5040
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
5041
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-meta text-muted-foreground", children: "what this matches" }),
|
|
5042
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto shrink-0 text-meta tabular-nums text-muted-foreground", children: loading ? "\u2026" : `${hits.length} of ${matches.length}` })
|
|
5043
|
+
] }),
|
|
5044
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 py-0.5", children: [
|
|
5045
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-3 w-3/5" }),
|
|
5046
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-3 w-2/5" }),
|
|
5047
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-3 w-1/2" })
|
|
5048
|
+
] }) : matches.length === 0 ? /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("p", { className: "text-meta text-destructive", children: [
|
|
5049
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono", children: pattern }),
|
|
5050
|
+
" matches nothing here"
|
|
5051
|
+
] }) : null,
|
|
5052
|
+
!loading && shown.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
5053
|
+
shown.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5054
|
+
AddressChip,
|
|
5055
|
+
{
|
|
5056
|
+
address: m.address,
|
|
5057
|
+
tone: m.matched ? "allowed" : "untouched"
|
|
5058
|
+
},
|
|
5059
|
+
m.address
|
|
5060
|
+
)),
|
|
5061
|
+
hidden > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "pt-0.5 text-meta text-muted-foreground/70", children: [
|
|
5062
|
+
"and ",
|
|
5063
|
+
hidden,
|
|
5064
|
+
" more"
|
|
5065
|
+
] }) : null
|
|
5066
|
+
] }) : null
|
|
5067
|
+
]
|
|
5068
|
+
}
|
|
5069
|
+
);
|
|
5070
|
+
}
|
|
5071
|
+
);
|
|
5072
|
+
MatchPreview.displayName = "MatchPreview";
|
|
4574
5073
|
var MenuItem = ({
|
|
4575
5074
|
label,
|
|
4576
5075
|
icon: Icon,
|
|
@@ -4631,7 +5130,7 @@ var MenuItem = ({
|
|
|
4631
5130
|
)
|
|
4632
5131
|
] });
|
|
4633
5132
|
};
|
|
4634
|
-
var
|
|
5133
|
+
var TONE2 = {
|
|
4635
5134
|
running: "text-info",
|
|
4636
5135
|
success: "text-success",
|
|
4637
5136
|
warning: "text-warning",
|
|
@@ -4658,7 +5157,7 @@ var MetricTile = React23__namespace.forwardRef(
|
|
|
4658
5157
|
// `1,880` and `2 / 5` in adjacent tiles sit at different widths, and
|
|
4659
5158
|
// a strip of six stops reading as one row of numbers.
|
|
4660
5159
|
"font-mono text-lg font-semibold leading-tight",
|
|
4661
|
-
tone ?
|
|
5160
|
+
tone ? TONE2[tone] : void 0
|
|
4662
5161
|
),
|
|
4663
5162
|
children: value
|
|
4664
5163
|
}
|
|
@@ -4677,7 +5176,7 @@ var MetricTile = React23__namespace.forwardRef(
|
|
|
4677
5176
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4678
5177
|
"div",
|
|
4679
5178
|
{
|
|
4680
|
-
className: cn("h-full", tone ?
|
|
5179
|
+
className: cn("h-full", tone ? TONE2[tone] : "text-primary", "bg-current"),
|
|
4681
5180
|
style: { width: `${Math.min(Math.max(meter, 0), 1) * 100}%` }
|
|
4682
5181
|
}
|
|
4683
5182
|
)
|
|
@@ -4749,27 +5248,6 @@ var NestedMenu = (props) => {
|
|
|
4749
5248
|
}
|
|
4750
5249
|
);
|
|
4751
5250
|
};
|
|
4752
|
-
var Eyebrow = React23__namespace.forwardRef(
|
|
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
5251
|
var PanelBox = React23__namespace.forwardRef(
|
|
4774
5252
|
({ title, aside, flush, className, headerClassName, bodyClassName, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4775
5253
|
Card,
|
|
@@ -5088,47 +5566,6 @@ var PropertyRow = React23__namespace.forwardRef(
|
|
|
5088
5566
|
)
|
|
5089
5567
|
);
|
|
5090
5568
|
PropertyRow.displayName = "PropertyRow";
|
|
5091
|
-
var RecordHeader = React23__namespace.forwardRef(
|
|
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
5569
|
var ProposalCard = React23__namespace.forwardRef(
|
|
5133
5570
|
({
|
|
5134
5571
|
title,
|
|
@@ -5263,6 +5700,47 @@ var RatingControl = React23__namespace.forwardRef(
|
|
|
5263
5700
|
)
|
|
5264
5701
|
);
|
|
5265
5702
|
RatingControl.displayName = "RatingControl";
|
|
5703
|
+
var RecordHeader = React23__namespace.forwardRef(
|
|
5704
|
+
({ tone, crumbs, chips, actions, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5705
|
+
"div",
|
|
5706
|
+
{
|
|
5707
|
+
ref,
|
|
5708
|
+
className: cn(
|
|
5709
|
+
"flex shrink-0 items-center gap-2.5 border-b border-border bg-card px-4 py-2.5",
|
|
5710
|
+
className
|
|
5711
|
+
),
|
|
5712
|
+
...props,
|
|
5713
|
+
children: [
|
|
5714
|
+
tone ? /* @__PURE__ */ jsxRuntime.jsx(StatusDot, { tone, size: "lg" }) : null,
|
|
5715
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center gap-1.5", children: crumbs.map((crumb, i) => {
|
|
5716
|
+
const last = i === crumbs.length - 1;
|
|
5717
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React23__namespace.Fragment, { children: [
|
|
5718
|
+
i > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5719
|
+
lucideReact.ChevronRight,
|
|
5720
|
+
{
|
|
5721
|
+
"aria-hidden": true,
|
|
5722
|
+
className: "size-3.5 shrink-0 text-muted-foreground/60"
|
|
5723
|
+
}
|
|
5724
|
+
) : null,
|
|
5725
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5726
|
+
"span",
|
|
5727
|
+
{
|
|
5728
|
+
className: cn(
|
|
5729
|
+
"min-w-0 truncate font-mono",
|
|
5730
|
+
last ? "text-base font-semibold text-foreground" : "text-muted-foreground"
|
|
5731
|
+
),
|
|
5732
|
+
children: crumb
|
|
5733
|
+
}
|
|
5734
|
+
)
|
|
5735
|
+
] }, i);
|
|
5736
|
+
}) }),
|
|
5737
|
+
chips ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center gap-1.5", children: chips }) : null,
|
|
5738
|
+
actions ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: actions }) : null
|
|
5739
|
+
]
|
|
5740
|
+
}
|
|
5741
|
+
)
|
|
5742
|
+
);
|
|
5743
|
+
RecordHeader.displayName = "RecordHeader";
|
|
5266
5744
|
var RepairNote = React23__namespace.forwardRef(
|
|
5267
5745
|
({ from, to, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5268
5746
|
"div",
|
|
@@ -5422,6 +5900,138 @@ function RichSelect({
|
|
|
5422
5900
|
)
|
|
5423
5901
|
] });
|
|
5424
5902
|
}
|
|
5903
|
+
function describeSlice(select, declared) {
|
|
5904
|
+
const out = [];
|
|
5905
|
+
if (select.time) {
|
|
5906
|
+
const { axis, from, to } = select.time;
|
|
5907
|
+
out.push({
|
|
5908
|
+
axisKind: "time",
|
|
5909
|
+
text: `time ${from ?? "\u2026"} \u2192 ${to ?? "\u2026"} \xB7 axis ${axis}`,
|
|
5910
|
+
undeclared: declared ? declared.time == null : void 0
|
|
5911
|
+
});
|
|
5912
|
+
}
|
|
5913
|
+
if (select.geo) {
|
|
5914
|
+
const { axis, vocab, in: values } = select.geo;
|
|
5915
|
+
out.push({
|
|
5916
|
+
axisKind: "geo",
|
|
5917
|
+
text: `geo ${values.join(", ")} \xB7 axis ${axis}${vocab ? ` \xB7 ${vocab}` : ""}`,
|
|
5918
|
+
undeclared: declared ? declared.geo == null : void 0
|
|
5919
|
+
});
|
|
5920
|
+
}
|
|
5921
|
+
for (const [dim, values] of Object.entries(select.dims ?? {})) {
|
|
5922
|
+
out.push({
|
|
5923
|
+
axisKind: dim,
|
|
5924
|
+
text: `${dim} ${values.join(", ")}`,
|
|
5925
|
+
undeclared: declared ? !(declared.dims ?? []).includes(dim) : void 0
|
|
5926
|
+
});
|
|
5927
|
+
}
|
|
5928
|
+
return out;
|
|
5929
|
+
}
|
|
5930
|
+
var SliceSummary = React23__namespace.forwardRef(
|
|
5931
|
+
({ select, declaredAxes, modelLabel, variant = "line", className, ...props }, ref) => {
|
|
5932
|
+
const lines = select ? describeSlice(select, declaredAxes) : [];
|
|
5933
|
+
if (!lines.length) {
|
|
5934
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5935
|
+
"div",
|
|
5936
|
+
{
|
|
5937
|
+
ref,
|
|
5938
|
+
className: cn("text-meta text-muted-foreground/70", className),
|
|
5939
|
+
...props,
|
|
5940
|
+
children: "not sliced \u2014 the whole model"
|
|
5941
|
+
}
|
|
5942
|
+
);
|
|
5943
|
+
}
|
|
5944
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5945
|
+
"div",
|
|
5946
|
+
{
|
|
5947
|
+
ref,
|
|
5948
|
+
className: cn(
|
|
5949
|
+
"flex min-w-0 flex-col gap-0.5",
|
|
5950
|
+
variant === "block" && "rounded-control border border-border p-2",
|
|
5951
|
+
className
|
|
5952
|
+
),
|
|
5953
|
+
...props,
|
|
5954
|
+
children: lines.map((line) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
5955
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5956
|
+
"span",
|
|
5957
|
+
{
|
|
5958
|
+
className: cn(
|
|
5959
|
+
"truncate text-meta",
|
|
5960
|
+
line.undeclared ? "text-destructive line-through decoration-destructive/50" : "text-muted-foreground"
|
|
5961
|
+
),
|
|
5962
|
+
children: line.text
|
|
5963
|
+
}
|
|
5964
|
+
),
|
|
5965
|
+
line.undeclared ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-meta text-destructive", children: [
|
|
5966
|
+
modelLabel ?? "this model",
|
|
5967
|
+
" declares no ",
|
|
5968
|
+
line.axisKind,
|
|
5969
|
+
" axis, so it cannot be sliced by one. Declaring one is a modelling act."
|
|
5970
|
+
] }) : null
|
|
5971
|
+
] }, line.axisKind))
|
|
5972
|
+
}
|
|
5973
|
+
);
|
|
5974
|
+
}
|
|
5975
|
+
);
|
|
5976
|
+
SliceSummary.displayName = "SliceSummary";
|
|
5977
|
+
var RuleRow = React23__namespace.forwardRef(
|
|
5978
|
+
({ match, allow, properties, select, egress, readOnly, className, ...props }, ref) => {
|
|
5979
|
+
const excluded = properties?.exclude ?? [];
|
|
5980
|
+
const sends = egress?.may_send ?? [];
|
|
5981
|
+
const sliced = Boolean(
|
|
5982
|
+
select?.time || select?.geo || Object.keys(select?.dims ?? {}).length
|
|
5983
|
+
);
|
|
5984
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5985
|
+
"div",
|
|
5986
|
+
{
|
|
5987
|
+
ref,
|
|
5988
|
+
className: cn(
|
|
5989
|
+
// The verb column is `5ch` — the width of `allow` in the mono face it
|
|
5990
|
+
// is set in. A character unit rather than a pixel one, so the indent
|
|
5991
|
+
// holds when `data-density` moves the font size, and so every row
|
|
5992
|
+
// aligns whether its verb is `allow` or `deny`.
|
|
5993
|
+
"grid min-w-0 grid-cols-[5ch_minmax(0,1fr)] items-baseline gap-x-2 gap-y-0.5",
|
|
5994
|
+
"rounded-control px-1 py-1",
|
|
5995
|
+
!readOnly && "hover:bg-accent",
|
|
5996
|
+
className
|
|
5997
|
+
),
|
|
5998
|
+
...props,
|
|
5999
|
+
children: [
|
|
6000
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6001
|
+
"span",
|
|
6002
|
+
{
|
|
6003
|
+
className: cn(
|
|
6004
|
+
"font-mono text-meta",
|
|
6005
|
+
allow ? "text-muted-foreground" : "font-semibold text-destructive"
|
|
6006
|
+
),
|
|
6007
|
+
children: allow ? "allow" : "deny"
|
|
6008
|
+
}
|
|
6009
|
+
),
|
|
6010
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6011
|
+
AddressChip,
|
|
6012
|
+
{
|
|
6013
|
+
address: match,
|
|
6014
|
+
tone: allow ? "allowed" : "denied",
|
|
6015
|
+
className: "min-w-0"
|
|
6016
|
+
}
|
|
6017
|
+
),
|
|
6018
|
+
excluded.length || sliced || sends.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-start-2 flex min-w-0 flex-col gap-0.5", children: [
|
|
6019
|
+
excluded.length ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "truncate text-meta text-muted-foreground", children: [
|
|
6020
|
+
"excludes ",
|
|
6021
|
+
excluded.join(", ")
|
|
6022
|
+
] }) : null,
|
|
6023
|
+
sliced ? /* @__PURE__ */ jsxRuntime.jsx(SliceSummary, { select, variant: "line" }) : null,
|
|
6024
|
+
sends.length ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "truncate text-meta text-muted-foreground", children: [
|
|
6025
|
+
"may send ",
|
|
6026
|
+
sends.join(", ")
|
|
6027
|
+
] }) : null
|
|
6028
|
+
] }) : null
|
|
6029
|
+
]
|
|
6030
|
+
}
|
|
6031
|
+
);
|
|
6032
|
+
}
|
|
6033
|
+
);
|
|
6034
|
+
RuleRow.displayName = "RuleRow";
|
|
5425
6035
|
var SearchInput = ({
|
|
5426
6036
|
value,
|
|
5427
6037
|
onChange,
|
|
@@ -6788,6 +7398,7 @@ exports.Accordion = Accordion;
|
|
|
6788
7398
|
exports.AccordionContent = AccordionContent;
|
|
6789
7399
|
exports.AccordionItem = AccordionItem;
|
|
6790
7400
|
exports.AccordionTrigger = AccordionTrigger;
|
|
7401
|
+
exports.AddressChip = AddressChip;
|
|
6791
7402
|
exports.AgentChip = AgentChip;
|
|
6792
7403
|
exports.Alert = Alert;
|
|
6793
7404
|
exports.AlertDescription = AlertDescription;
|
|
@@ -6823,6 +7434,7 @@ exports.ButtonGroup = ButtonGroup;
|
|
|
6823
7434
|
exports.ButtonGroupSeparator = ButtonGroupSeparator;
|
|
6824
7435
|
exports.ButtonGroupText = ButtonGroupText;
|
|
6825
7436
|
exports.ButtonWithTooltip = ButtonWithTooltip;
|
|
7437
|
+
exports.CAST_ROLES = CAST_ROLES;
|
|
6826
7438
|
exports.CannotAnswerCard = CannotAnswerCard;
|
|
6827
7439
|
exports.Card = Card;
|
|
6828
7440
|
exports.CardContent = CardContent;
|
|
@@ -6836,6 +7448,7 @@ exports.CarouselContent = CarouselContent;
|
|
|
6836
7448
|
exports.CarouselItem = CarouselItem;
|
|
6837
7449
|
exports.CarouselNext = CarouselNext;
|
|
6838
7450
|
exports.CarouselPrevious = CarouselPrevious;
|
|
7451
|
+
exports.CastTable = CastTable;
|
|
6839
7452
|
exports.ChatSession = ChatSession;
|
|
6840
7453
|
exports.ChatSessionActivityRow = ChatSessionActivityRow;
|
|
6841
7454
|
exports.ChatSessionActivitySubLine = ChatSessionActivitySubLine;
|
|
@@ -6894,6 +7507,7 @@ exports.DropdownMenuSub = DropdownMenuSub;
|
|
|
6894
7507
|
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
6895
7508
|
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
6896
7509
|
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
7510
|
+
exports.EgressList = EgressList;
|
|
6897
7511
|
exports.EmissionCard = EmissionCard;
|
|
6898
7512
|
exports.EmissionHeader = EmissionHeader;
|
|
6899
7513
|
exports.EmptyState = EmptyState;
|
|
@@ -6918,8 +7532,14 @@ exports.ItemSeparator = ItemSeparator;
|
|
|
6918
7532
|
exports.ItemTitle = ItemTitle;
|
|
6919
7533
|
exports.Kbd = Kbd;
|
|
6920
7534
|
exports.KbdGroup = KbdGroup;
|
|
7535
|
+
exports.LayerChip = LayerChip;
|
|
7536
|
+
exports.LayerSection = LayerSection;
|
|
7537
|
+
exports.LayerStrip = LayerStrip;
|
|
6921
7538
|
exports.Legend = Legend;
|
|
6922
7539
|
exports.LegendItem = LegendItem;
|
|
7540
|
+
exports.LensChip = LensChip;
|
|
7541
|
+
exports.LensRow = LensRow;
|
|
7542
|
+
exports.MatchPreview = MatchPreview;
|
|
6923
7543
|
exports.MenuItem = MenuItem;
|
|
6924
7544
|
exports.Menubar = Menubar;
|
|
6925
7545
|
exports.MenubarCheckboxItem = MenubarCheckboxItem;
|
|
@@ -6979,6 +7599,7 @@ exports.ResizablePanel = ResizablePanel;
|
|
|
6979
7599
|
exports.ResizablePanelGroup = ResizablePanelGroup;
|
|
6980
7600
|
exports.RetryNote = RetryNote;
|
|
6981
7601
|
exports.RichSelect = RichSelect;
|
|
7602
|
+
exports.RuleRow = RuleRow;
|
|
6982
7603
|
exports.ScrollArea = ScrollArea;
|
|
6983
7604
|
exports.ScrollBar = ScrollBar;
|
|
6984
7605
|
exports.SearchInput = SearchInput;
|
|
@@ -7018,6 +7639,7 @@ exports.SidebarRail = SidebarRail;
|
|
|
7018
7639
|
exports.SidebarSeparator = SidebarSeparator;
|
|
7019
7640
|
exports.SidebarTrigger = SidebarTrigger;
|
|
7020
7641
|
exports.Skeleton = Skeleton;
|
|
7642
|
+
exports.SliceSummary = SliceSummary;
|
|
7021
7643
|
exports.Sparkline = Sparkline;
|
|
7022
7644
|
exports.Spinner = Spinner;
|
|
7023
7645
|
exports.StatusDot = StatusDot;
|
|
@@ -7079,9 +7701,14 @@ exports.buttonGroupVariants = buttonGroupVariants;
|
|
|
7079
7701
|
exports.buttonVariants = buttonVariants;
|
|
7080
7702
|
exports.chatSessionGutterClass = chatSessionGutterClass;
|
|
7081
7703
|
exports.cn = cn;
|
|
7704
|
+
exports.describeSlice = describeSlice;
|
|
7705
|
+
exports.layerLabel = LABEL;
|
|
7706
|
+
exports.layerSwatch = SWATCH2;
|
|
7082
7707
|
exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
|
|
7708
|
+
exports.splitAddress = split;
|
|
7083
7709
|
exports.statusDotVariants = statusDotVariants;
|
|
7084
7710
|
exports.toggleVariants = toggleVariants;
|
|
7711
|
+
exports.touchLabel = MARK_LABEL;
|
|
7085
7712
|
exports.useOverflowItems = useOverflowItems;
|
|
7086
7713
|
exports.useSidebar = useSidebar;
|
|
7087
7714
|
exports.useTour = useTour;
|