@invana/ui 0.0.24 → 0.0.26
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/dist/index.cjs +410 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +247 -2
- package/dist/index.d.ts +247 -2
- package/dist/index.js +407 -12
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3944,6 +3944,56 @@ var CitationRow = React23.forwardRef(
|
|
|
3944
3944
|
)
|
|
3945
3945
|
);
|
|
3946
3946
|
CitationRow.displayName = "CitationRow";
|
|
3947
|
+
var ClampedText = React23.forwardRef(
|
|
3948
|
+
({
|
|
3949
|
+
lines = 3,
|
|
3950
|
+
moreLabel = "Show more",
|
|
3951
|
+
lessLabel = "Show less",
|
|
3952
|
+
className,
|
|
3953
|
+
children,
|
|
3954
|
+
...props
|
|
3955
|
+
}, ref) => {
|
|
3956
|
+
const [expanded, setExpanded] = React23.useState(false);
|
|
3957
|
+
const [clipped, setClipped] = React23.useState(false);
|
|
3958
|
+
const bodyRef = React23.useRef(null);
|
|
3959
|
+
React23.useLayoutEffect(() => {
|
|
3960
|
+
const el = bodyRef.current;
|
|
3961
|
+
if (!el || expanded) return;
|
|
3962
|
+
const measure = () => setClipped(el.scrollHeight - el.clientHeight > 1);
|
|
3963
|
+
measure();
|
|
3964
|
+
const observer = new ResizeObserver(measure);
|
|
3965
|
+
observer.observe(el);
|
|
3966
|
+
return () => observer.disconnect();
|
|
3967
|
+
}, [expanded, children, lines]);
|
|
3968
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn("min-w-0", className), ...props, children: [
|
|
3969
|
+
/* @__PURE__ */ jsx(
|
|
3970
|
+
"p",
|
|
3971
|
+
{
|
|
3972
|
+
ref: bodyRef,
|
|
3973
|
+
className: cn(
|
|
3974
|
+
"whitespace-pre-line",
|
|
3975
|
+
!expanded && "overflow-hidden [-webkit-box-orient:vertical] [-webkit-line-clamp:var(--clamped-lines)] [display:-webkit-box]"
|
|
3976
|
+
),
|
|
3977
|
+
style: { "--clamped-lines": lines },
|
|
3978
|
+
children
|
|
3979
|
+
}
|
|
3980
|
+
),
|
|
3981
|
+
clipped ? /* @__PURE__ */ jsx(
|
|
3982
|
+
Button,
|
|
3983
|
+
{
|
|
3984
|
+
type: "button",
|
|
3985
|
+
variant: "link",
|
|
3986
|
+
size: "sm",
|
|
3987
|
+
className: "h-auto p-0",
|
|
3988
|
+
"aria-expanded": expanded,
|
|
3989
|
+
onClick: () => setExpanded((open) => !open),
|
|
3990
|
+
children: expanded ? lessLabel : moreLabel
|
|
3991
|
+
}
|
|
3992
|
+
) : null
|
|
3993
|
+
] });
|
|
3994
|
+
}
|
|
3995
|
+
);
|
|
3996
|
+
ClampedText.displayName = "ClampedText";
|
|
3947
3997
|
var ClarifyCard = React23.forwardRef(
|
|
3948
3998
|
({
|
|
3949
3999
|
step,
|
|
@@ -4629,6 +4679,8 @@ function PanelContent({
|
|
|
4629
4679
|
}
|
|
4630
4680
|
function PanelStack({
|
|
4631
4681
|
sections,
|
|
4682
|
+
stackRef,
|
|
4683
|
+
onCollapsedChange,
|
|
4632
4684
|
headerHeight = 35,
|
|
4633
4685
|
withHandle = false,
|
|
4634
4686
|
className,
|
|
@@ -4673,19 +4725,26 @@ function PanelStack({
|
|
|
4673
4725
|
for (const s of targets) refs.current[s.id]?.collapse();
|
|
4674
4726
|
group.setLayout(next);
|
|
4675
4727
|
}, []);
|
|
4676
|
-
const
|
|
4728
|
+
const notify = React23.useRef(onCollapsedChange);
|
|
4729
|
+
React23.useEffect(() => {
|
|
4730
|
+
notify.current = onCollapsedChange;
|
|
4731
|
+
}, [onCollapsedChange]);
|
|
4732
|
+
const collapsedRef = React23.useRef(collapsed);
|
|
4733
|
+
collapsedRef.current = collapsed;
|
|
4734
|
+
const collapsePanel = React23.useCallback((id) => {
|
|
4677
4735
|
const ref = refs.current[id];
|
|
4678
|
-
if (!ref) return;
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4736
|
+
if (!ref || ref.isCollapsed()) return;
|
|
4737
|
+
ref.collapse();
|
|
4738
|
+
}, []);
|
|
4739
|
+
const expandPanel = React23.useCallback((id) => {
|
|
4740
|
+
const ref = refs.current[id];
|
|
4741
|
+
if (!ref || !ref.isCollapsed()) return;
|
|
4683
4742
|
ref.expand();
|
|
4684
4743
|
if (!ref.isCollapsed()) return;
|
|
4685
4744
|
const group = groupRef.current;
|
|
4686
4745
|
if (!group) return;
|
|
4687
4746
|
const layout = group.getLayout();
|
|
4688
|
-
const donor = Object.entries(layout).filter(([panelId]) => panelId !== id && !
|
|
4747
|
+
const donor = Object.entries(layout).filter(([panelId]) => panelId !== id && !collapsedRef.current[panelId]).sort((a, b) => b[1] - a[1])[0];
|
|
4689
4748
|
if (!donor) return;
|
|
4690
4749
|
const [donorId, donorPct] = donor;
|
|
4691
4750
|
const share = donorPct / 2;
|
|
@@ -4694,7 +4753,26 @@ function PanelStack({
|
|
|
4694
4753
|
[id]: (layout[id] ?? 0) + share,
|
|
4695
4754
|
[donorId]: donorPct - share
|
|
4696
4755
|
});
|
|
4697
|
-
};
|
|
4756
|
+
}, []);
|
|
4757
|
+
const toggle = React23.useCallback(
|
|
4758
|
+
(id) => {
|
|
4759
|
+
const ref = refs.current[id];
|
|
4760
|
+
if (!ref) return;
|
|
4761
|
+
if (ref.isCollapsed()) expandPanel(id);
|
|
4762
|
+
else collapsePanel(id);
|
|
4763
|
+
},
|
|
4764
|
+
[expandPanel, collapsePanel]
|
|
4765
|
+
);
|
|
4766
|
+
React23.useImperativeHandle(
|
|
4767
|
+
stackRef,
|
|
4768
|
+
() => ({
|
|
4769
|
+
expand: expandPanel,
|
|
4770
|
+
collapse: collapsePanel,
|
|
4771
|
+
toggle,
|
|
4772
|
+
isCollapsed: (id) => !!collapsedRef.current[id]
|
|
4773
|
+
}),
|
|
4774
|
+
[expandPanel, collapsePanel, toggle]
|
|
4775
|
+
);
|
|
4698
4776
|
return (
|
|
4699
4777
|
// Header actions are nav items, and those carry tooltips — provide the
|
|
4700
4778
|
// context here so a `PanelStack` works outside an app shell too. Nesting
|
|
@@ -4732,9 +4810,12 @@ function PanelStack({
|
|
|
4732
4810
|
},
|
|
4733
4811
|
onResize: (size) => {
|
|
4734
4812
|
const next = size.inPixels <= headerHeight + 1;
|
|
4735
|
-
setCollapsed(
|
|
4736
|
-
(prev
|
|
4737
|
-
|
|
4813
|
+
setCollapsed((prev) => {
|
|
4814
|
+
if (prev[section.id] === next) return prev;
|
|
4815
|
+
const map = { ...prev, [section.id]: next };
|
|
4816
|
+
notify.current?.(map);
|
|
4817
|
+
return map;
|
|
4818
|
+
});
|
|
4738
4819
|
},
|
|
4739
4820
|
className: "flex flex-col overflow-hidden",
|
|
4740
4821
|
children: [
|
|
@@ -5152,6 +5233,27 @@ var SearchInput = ({
|
|
|
5152
5233
|
}
|
|
5153
5234
|
);
|
|
5154
5235
|
};
|
|
5236
|
+
var Eyebrow = React23.forwardRef(
|
|
5237
|
+
({ aside, tone = "muted", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5238
|
+
"div",
|
|
5239
|
+
{
|
|
5240
|
+
ref,
|
|
5241
|
+
className: cn(
|
|
5242
|
+
"flex items-baseline gap-2 text-meta font-semibold uppercase tracking-wide",
|
|
5243
|
+
tone === "muted" && "text-muted-foreground",
|
|
5244
|
+
tone === "foreground" && "text-foreground",
|
|
5245
|
+
tone === "accent" && "text-primary",
|
|
5246
|
+
className
|
|
5247
|
+
),
|
|
5248
|
+
...props,
|
|
5249
|
+
children: [
|
|
5250
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children }),
|
|
5251
|
+
aside != null ? /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 font-normal normal-case tracking-normal text-muted-foreground", children: aside }) : null
|
|
5252
|
+
]
|
|
5253
|
+
}
|
|
5254
|
+
)
|
|
5255
|
+
);
|
|
5256
|
+
Eyebrow.displayName = "Eyebrow";
|
|
5155
5257
|
var SectionHeader = React23.forwardRef(({ icon, title, count, actions, bare, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5156
5258
|
"div",
|
|
5157
5259
|
{
|
|
@@ -5325,6 +5427,299 @@ function TabbedPanel({
|
|
|
5325
5427
|
footerContent && /* @__PURE__ */ jsx(CardFooter, { className: cn("shrink-0", footerClassName), children: footerContent })
|
|
5326
5428
|
] }) }) });
|
|
5327
5429
|
}
|
|
5430
|
+
var BAR = {
|
|
5431
|
+
succeeded: "bg-success",
|
|
5432
|
+
running: "bg-info",
|
|
5433
|
+
failed: "bg-destructive",
|
|
5434
|
+
needs_input: "bg-warning",
|
|
5435
|
+
stopped: "bg-muted-foreground",
|
|
5436
|
+
skipped: "bg-transparent",
|
|
5437
|
+
queued: "bg-transparent"
|
|
5438
|
+
};
|
|
5439
|
+
var DOT = {
|
|
5440
|
+
succeeded: "success",
|
|
5441
|
+
running: "running",
|
|
5442
|
+
failed: "error",
|
|
5443
|
+
needs_input: "warning",
|
|
5444
|
+
stopped: "muted",
|
|
5445
|
+
skipped: "muted",
|
|
5446
|
+
queued: "queued"
|
|
5447
|
+
};
|
|
5448
|
+
var STATUS_LABEL = {
|
|
5449
|
+
succeeded: "succeeded",
|
|
5450
|
+
running: "running",
|
|
5451
|
+
failed: "failed",
|
|
5452
|
+
needs_input: "needs input",
|
|
5453
|
+
stopped: "stopped",
|
|
5454
|
+
skipped: "never ran",
|
|
5455
|
+
queued: "not started"
|
|
5456
|
+
};
|
|
5457
|
+
function renderResult(result) {
|
|
5458
|
+
if (result == null) return null;
|
|
5459
|
+
if (React23.isValidElement(result)) return result;
|
|
5460
|
+
if (typeof result !== "object") {
|
|
5461
|
+
return /* @__PURE__ */ jsx("span", { className: "font-mono text-meta", children: String(result) });
|
|
5462
|
+
}
|
|
5463
|
+
const entries = Object.entries(result);
|
|
5464
|
+
const scalars = entries.filter(([, v]) => v == null || typeof v !== "object");
|
|
5465
|
+
const nested = entries.filter(([, v]) => v != null && typeof v === "object");
|
|
5466
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5467
|
+
scalars.length ? /* @__PURE__ */ jsx(PropertyList, { labelWidth: 96, children: scalars.map(([k, v]) => /* @__PURE__ */ jsx(PropertyRow, { label: k, mono: true, className: "py-0.5", children: v == null ? "\u2014" : String(v) }, k)) }) : null,
|
|
5468
|
+
nested.map(([k, v]) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
5469
|
+
/* @__PURE__ */ jsx("span", { className: "text-meta text-muted-foreground", children: k }),
|
|
5470
|
+
/* @__PURE__ */ jsx("pre", { className: "max-h-40 overflow-auto border border-border bg-muted/40 p-1.5 font-mono text-meta", children: JSON.stringify(v, null, 2) })
|
|
5471
|
+
] }, k))
|
|
5472
|
+
] });
|
|
5473
|
+
}
|
|
5474
|
+
var TaskGanttDetailCard = React23.forwardRef(({ task, elapsedMs, formatDuration = defaultFormatDuration, className, ...props }, ref) => {
|
|
5475
|
+
const status = task.status ?? "succeeded";
|
|
5476
|
+
const ms = task.durationMs ?? elapsedMs;
|
|
5477
|
+
const duration = task.duration ?? (ms != null ? formatDuration(ms) : "\u2014");
|
|
5478
|
+
const attempts = task.attempts ?? [];
|
|
5479
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-col gap-2", className), ...props, children: [
|
|
5480
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
5481
|
+
/* @__PURE__ */ jsx(StatusDot, { tone: DOT[status], size: "md", className: "translate-y-px" }),
|
|
5482
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate font-mono text-meta font-medium", children: task.key }),
|
|
5483
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 font-mono text-meta text-muted-foreground tabular-nums", children: duration })
|
|
5484
|
+
] }),
|
|
5485
|
+
/* @__PURE__ */ jsxs("div", { className: "text-meta text-muted-foreground", children: [
|
|
5486
|
+
STATUS_LABEL[status],
|
|
5487
|
+
task.summary != null ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5488
|
+
" \xB7 ",
|
|
5489
|
+
task.summary
|
|
5490
|
+
] }) : null
|
|
5491
|
+
] }),
|
|
5492
|
+
attempts.length ? /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children: attempts.map((a, i) => /* @__PURE__ */ jsxs("span", { className: "text-meta text-muted-foreground", children: [
|
|
5493
|
+
/* @__PURE__ */ jsxs("span", { className: "font-medium text-warning", children: [
|
|
5494
|
+
"attempt ",
|
|
5495
|
+
i + 1
|
|
5496
|
+
] }),
|
|
5497
|
+
" ",
|
|
5498
|
+
a.title ?? `${a.status ?? "failed"}${a.durationMs != null ? ` \xB7 ${formatDuration(a.durationMs)}` : ""}`
|
|
5499
|
+
] }, i)) }) : null,
|
|
5500
|
+
task.error != null ? /* @__PURE__ */ jsxs(
|
|
5501
|
+
"div",
|
|
5502
|
+
{
|
|
5503
|
+
style: { borderColor: "var(--color-destructive)" },
|
|
5504
|
+
className: "border-l-2 bg-destructive/10 px-2 py-1.5",
|
|
5505
|
+
children: [
|
|
5506
|
+
task.error.code != null ? /* @__PURE__ */ jsx("div", { className: "font-mono text-meta font-medium text-destructive", children: task.error.code }) : null,
|
|
5507
|
+
task.error.message != null ? /* @__PURE__ */ jsx("div", { className: "text-meta", children: task.error.message }) : null,
|
|
5508
|
+
task.error.detail != null ? /* @__PURE__ */ jsx("pre", { className: "mt-1 max-h-32 overflow-auto whitespace-pre-wrap font-mono text-meta text-muted-foreground", children: task.error.detail }) : null
|
|
5509
|
+
]
|
|
5510
|
+
}
|
|
5511
|
+
) : null,
|
|
5512
|
+
task.result != null ? renderResult(task.result) : null,
|
|
5513
|
+
task.log != null ? /* @__PURE__ */ jsx("div", { className: "border-t border-border pt-1.5 font-mono text-meta text-muted-foreground", children: task.log }) : null
|
|
5514
|
+
] });
|
|
5515
|
+
});
|
|
5516
|
+
TaskGanttDetailCard.displayName = "TaskGanttDetailCard";
|
|
5517
|
+
var toMs = (t) => t instanceof Date ? t.getTime() : typeof t === "number" ? t : Date.parse(t);
|
|
5518
|
+
var defaultFormatDuration = (ms) => {
|
|
5519
|
+
if (ms < 100) return `${Math.round(ms)}ms`;
|
|
5520
|
+
const s = ms / 1e3;
|
|
5521
|
+
return s < 10 ? `${(Math.round(s * 10) / 10).toFixed(1)}s` : `${Math.round(s)}s`;
|
|
5522
|
+
};
|
|
5523
|
+
var defaultFormatTick = (ms) => {
|
|
5524
|
+
if (ms === 0) return "0s";
|
|
5525
|
+
const s = ms / 1e3;
|
|
5526
|
+
return Number.isInteger(s) ? `${s}s` : `${(Math.round(s * 10) / 10).toFixed(1)}s`;
|
|
5527
|
+
};
|
|
5528
|
+
function place(seg, origin) {
|
|
5529
|
+
let start = seg.startMs;
|
|
5530
|
+
if (start == null && seg.startedAt != null && origin != null) {
|
|
5531
|
+
start = toMs(seg.startedAt) - origin;
|
|
5532
|
+
}
|
|
5533
|
+
if (start == null || Number.isNaN(start)) return null;
|
|
5534
|
+
let duration = seg.durationMs;
|
|
5535
|
+
if (duration == null && seg.startedAt != null && seg.finishedAt != null) {
|
|
5536
|
+
duration = toMs(seg.finishedAt) - toMs(seg.startedAt);
|
|
5537
|
+
}
|
|
5538
|
+
return { start, duration: duration != null && duration > 0 ? duration : 0 };
|
|
5539
|
+
}
|
|
5540
|
+
var TaskGantt = React23.forwardRef(
|
|
5541
|
+
({
|
|
5542
|
+
tasks,
|
|
5543
|
+
origin,
|
|
5544
|
+
spanMs,
|
|
5545
|
+
nowMs,
|
|
5546
|
+
openEnded,
|
|
5547
|
+
ticks = 4,
|
|
5548
|
+
formatTick = defaultFormatTick,
|
|
5549
|
+
formatDuration = defaultFormatDuration,
|
|
5550
|
+
labelWidth = 112,
|
|
5551
|
+
density = "comfortable",
|
|
5552
|
+
showDetail = true,
|
|
5553
|
+
renderDetail,
|
|
5554
|
+
detailProps,
|
|
5555
|
+
selectedKey,
|
|
5556
|
+
onSelectTask,
|
|
5557
|
+
className,
|
|
5558
|
+
...props
|
|
5559
|
+
}, ref) => {
|
|
5560
|
+
const barHeight = density === "compact" ? 11 : 13;
|
|
5561
|
+
const durationWidth = 40;
|
|
5562
|
+
const rows = React23.useMemo(() => {
|
|
5563
|
+
const stamps = [];
|
|
5564
|
+
for (const t of [...tasks, ...tasks.flatMap((t2) => t2.attempts ?? [])]) {
|
|
5565
|
+
if (t.startedAt != null) stamps.push(toMs(t.startedAt));
|
|
5566
|
+
}
|
|
5567
|
+
const zero = origin != null ? toMs(origin) : stamps.length ? Math.min(...stamps) : void 0;
|
|
5568
|
+
return tasks.map((task) => {
|
|
5569
|
+
const segments = [...task.attempts ?? [], task].map((seg) => {
|
|
5570
|
+
const at = place(seg, zero);
|
|
5571
|
+
return at ? { ...at, status: seg.status ?? task.status ?? "succeeded", title: seg.title } : null;
|
|
5572
|
+
}).filter((s) => s !== null);
|
|
5573
|
+
const last = segments[segments.length - 1];
|
|
5574
|
+
return { task, segments, end: last ? last.start + last.duration : 0 };
|
|
5575
|
+
});
|
|
5576
|
+
}, [tasks, origin]);
|
|
5577
|
+
const span = Math.max(
|
|
5578
|
+
spanMs ?? Math.max(nowMs ?? 0, ...rows.map((r) => r.end)),
|
|
5579
|
+
1
|
|
5580
|
+
);
|
|
5581
|
+
const pct = (ms) => `${Math.max(0, Math.min(100, ms / span * 100))}%`;
|
|
5582
|
+
const axis = Array.from(
|
|
5583
|
+
{ length: ticks + 1 },
|
|
5584
|
+
(_, i) => formatTick(span / ticks * i)
|
|
5585
|
+
);
|
|
5586
|
+
const lastLabel = openEnded ? `${axis[axis.length - 1]}+` : axis[axis.length - 1];
|
|
5587
|
+
const detailFor = (task, elapsedMs) => {
|
|
5588
|
+
if (!showDetail) return null;
|
|
5589
|
+
if (renderDetail) return renderDetail(task);
|
|
5590
|
+
if (task.detail != null) return task.detail;
|
|
5591
|
+
const hasBody = task.result != null || task.error != null || task.log != null || task.summary != null || (task.attempts?.length ?? 0) > 0;
|
|
5592
|
+
if (!hasBody) return null;
|
|
5593
|
+
return /* @__PURE__ */ jsx(
|
|
5594
|
+
TaskGanttDetailCard,
|
|
5595
|
+
{
|
|
5596
|
+
task,
|
|
5597
|
+
elapsedMs,
|
|
5598
|
+
formatDuration
|
|
5599
|
+
}
|
|
5600
|
+
);
|
|
5601
|
+
};
|
|
5602
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-col", className), ...props, children: [
|
|
5603
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pt-0.5 pb-1", "aria-hidden": true, children: [
|
|
5604
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0", style: { width: labelWidth } }),
|
|
5605
|
+
/* @__PURE__ */ jsx("span", { className: "flex flex-1", children: axis.slice(0, -1).map((label, i) => /* @__PURE__ */ jsx(
|
|
5606
|
+
"span",
|
|
5607
|
+
{
|
|
5608
|
+
className: "flex-1 border-l border-border pl-1 text-meta text-muted-foreground tabular-nums",
|
|
5609
|
+
children: label
|
|
5610
|
+
},
|
|
5611
|
+
i
|
|
5612
|
+
)) }),
|
|
5613
|
+
/* @__PURE__ */ jsx(
|
|
5614
|
+
"span",
|
|
5615
|
+
{
|
|
5616
|
+
className: "shrink-0 text-right text-meta text-muted-foreground tabular-nums",
|
|
5617
|
+
style: { width: durationWidth },
|
|
5618
|
+
children: lastLabel
|
|
5619
|
+
}
|
|
5620
|
+
)
|
|
5621
|
+
] }),
|
|
5622
|
+
rows.map(({ task, segments }) => {
|
|
5623
|
+
const neverRan = segments.length === 0;
|
|
5624
|
+
const selected = selectedKey != null && selectedKey === task.key;
|
|
5625
|
+
const pickable = onSelectTask != null;
|
|
5626
|
+
const elapsed = task.durationMs ?? segments[segments.length - 1]?.duration;
|
|
5627
|
+
const duration = task.duration ?? (neverRan || elapsed == null ? "\u2014" : formatDuration(elapsed));
|
|
5628
|
+
const detail = detailFor(task, elapsed);
|
|
5629
|
+
const row = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 py-[3px]", children: [
|
|
5630
|
+
/* @__PURE__ */ jsx(
|
|
5631
|
+
"span",
|
|
5632
|
+
{
|
|
5633
|
+
className: cn(
|
|
5634
|
+
"shrink-0 truncate font-mono text-meta",
|
|
5635
|
+
neverRan && "text-muted-foreground"
|
|
5636
|
+
),
|
|
5637
|
+
style: { width: labelWidth },
|
|
5638
|
+
title: task.key,
|
|
5639
|
+
children: task.label ?? task.key
|
|
5640
|
+
}
|
|
5641
|
+
),
|
|
5642
|
+
/* @__PURE__ */ jsxs(
|
|
5643
|
+
"span",
|
|
5644
|
+
{
|
|
5645
|
+
className: "relative min-w-0 flex-1 bg-muted/55",
|
|
5646
|
+
style: { height: barHeight },
|
|
5647
|
+
children: [
|
|
5648
|
+
neverRan ? /* @__PURE__ */ jsx("span", { className: "absolute inset-0 border border-dashed border-border" }) : segments.map((seg, i) => /* @__PURE__ */ jsx(
|
|
5649
|
+
"span",
|
|
5650
|
+
{
|
|
5651
|
+
title: seg.title ?? `${task.key} \xB7 ${seg.status} \xB7 ${formatDuration(seg.duration)}`,
|
|
5652
|
+
className: cn("absolute inset-y-0 rounded-[1px]", BAR[seg.status]),
|
|
5653
|
+
style: {
|
|
5654
|
+
left: pct(seg.start),
|
|
5655
|
+
width: pct(seg.duration),
|
|
5656
|
+
minWidth: 2
|
|
5657
|
+
}
|
|
5658
|
+
},
|
|
5659
|
+
i
|
|
5660
|
+
)),
|
|
5661
|
+
nowMs != null ? /* @__PURE__ */ jsx(
|
|
5662
|
+
"span",
|
|
5663
|
+
{
|
|
5664
|
+
className: "absolute -top-0.5 -bottom-0.5 w-px bg-info/70",
|
|
5665
|
+
style: { left: pct(nowMs) },
|
|
5666
|
+
"aria-hidden": true
|
|
5667
|
+
}
|
|
5668
|
+
) : null
|
|
5669
|
+
]
|
|
5670
|
+
}
|
|
5671
|
+
),
|
|
5672
|
+
/* @__PURE__ */ jsx(
|
|
5673
|
+
"span",
|
|
5674
|
+
{
|
|
5675
|
+
className: "shrink-0 text-right font-mono text-meta text-muted-foreground tabular-nums",
|
|
5676
|
+
style: { width: durationWidth },
|
|
5677
|
+
children: duration
|
|
5678
|
+
}
|
|
5679
|
+
)
|
|
5680
|
+
] }) });
|
|
5681
|
+
const trigger = pickable ? /* @__PURE__ */ jsx(
|
|
5682
|
+
"button",
|
|
5683
|
+
{
|
|
5684
|
+
type: "button",
|
|
5685
|
+
"aria-pressed": selected,
|
|
5686
|
+
onClick: () => onSelectTask(task.key),
|
|
5687
|
+
className: cn(
|
|
5688
|
+
"w-full cursor-pointer text-left focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
5689
|
+
"hover:bg-accent/60",
|
|
5690
|
+
selected && "bg-accent"
|
|
5691
|
+
),
|
|
5692
|
+
children: row
|
|
5693
|
+
}
|
|
5694
|
+
) : /* @__PURE__ */ jsx("div", { className: cn(detail != null && "hover:bg-accent/60"), children: row });
|
|
5695
|
+
if (detail == null) return /* @__PURE__ */ jsx("div", { children: trigger }, task.key);
|
|
5696
|
+
return /* @__PURE__ */ jsxs(
|
|
5697
|
+
HoverCard,
|
|
5698
|
+
{
|
|
5699
|
+
openDelay: detailProps?.openDelay ?? 200,
|
|
5700
|
+
closeDelay: detailProps?.closeDelay ?? 80,
|
|
5701
|
+
children: [
|
|
5702
|
+
/* @__PURE__ */ jsx(HoverCardTrigger, { asChild: true, children: trigger }),
|
|
5703
|
+
/* @__PURE__ */ jsx(
|
|
5704
|
+
HoverCardContent,
|
|
5705
|
+
{
|
|
5706
|
+
side: detailProps?.side ?? "right",
|
|
5707
|
+
align: detailProps?.align ?? "start",
|
|
5708
|
+
sideOffset: detailProps?.sideOffset ?? 8,
|
|
5709
|
+
style: detailProps?.width != null ? { width: detailProps.width } : void 0,
|
|
5710
|
+
className: cn("w-72 p-3", detailProps?.className),
|
|
5711
|
+
children: detail
|
|
5712
|
+
}
|
|
5713
|
+
)
|
|
5714
|
+
]
|
|
5715
|
+
},
|
|
5716
|
+
task.key
|
|
5717
|
+
);
|
|
5718
|
+
})
|
|
5719
|
+
] });
|
|
5720
|
+
}
|
|
5721
|
+
);
|
|
5722
|
+
TaskGantt.displayName = "TaskGantt";
|
|
5328
5723
|
var TemplatePicker = React23.forwardRef(({ heading, options, value, onSelect, footnote, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5329
5724
|
"div",
|
|
5330
5725
|
{
|
|
@@ -6108,6 +6503,6 @@ var Typography = {
|
|
|
6108
6503
|
Pre: TypographyPre
|
|
6109
6504
|
};
|
|
6110
6505
|
|
|
6111
|
-
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, 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, 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, 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, PanelContent, PanelStack, Popover, PopoverContent, PopoverTrigger, Progress, PropertyList, PropertyRow, ProposalCard, RatingControl, 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, 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, buttonGroupVariants, buttonVariants, chatSessionGutterClass, cn, navigationMenuTriggerStyle, statusDotVariants, toggleVariants, useOverflowItems, useSidebar, useTour };
|
|
6506
|
+
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, 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, PanelContent, PanelStack, Popover, PopoverContent, PopoverTrigger, Progress, PropertyList, PropertyRow, ProposalCard, RatingControl, 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, 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, buttonGroupVariants, buttonVariants, chatSessionGutterClass, cn, navigationMenuTriggerStyle, statusDotVariants, toggleVariants, useOverflowItems, useSidebar, useTour };
|
|
6112
6507
|
//# sourceMappingURL=index.js.map
|
|
6113
6508
|
//# sourceMappingURL=index.js.map
|