@ship-it-ui/shipit 0.0.6 → 0.0.7
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 +450 -274
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +108 -10
- package/dist/index.d.ts +108 -10
- package/dist/index.js +436 -262
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as cn24 } from "@ship-it-ui/ui";
|
|
5
5
|
|
|
6
6
|
// src/ai/AskBar.tsx
|
|
7
7
|
import { Button, useControllableState } from "@ship-it-ui/ui";
|
|
@@ -380,13 +380,45 @@ var ReasoningStep = forwardRef5(function ReasoningStep2({ step, className, child
|
|
|
380
380
|
});
|
|
381
381
|
ReasoningStep.displayName = "ReasoningStep";
|
|
382
382
|
|
|
383
|
-
// src/ai/
|
|
384
|
-
import {
|
|
383
|
+
// src/ai/StalenessChip.tsx
|
|
384
|
+
import { Badge, SimpleTooltip } from "@ship-it-ui/ui";
|
|
385
385
|
import { forwardRef as forwardRef6 } from "react";
|
|
386
386
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
387
|
-
var
|
|
387
|
+
var DEFAULT_THRESHOLDS = [3600, 86400];
|
|
388
|
+
function formatAge(ageSeconds) {
|
|
389
|
+
const age = Math.max(0, Math.floor(ageSeconds));
|
|
390
|
+
if (age < 60) return "just now";
|
|
391
|
+
if (age < 3600) return `${Math.floor(age / 60)}m`;
|
|
392
|
+
if (age < 86400) return `${Math.floor(age / 3600)}h`;
|
|
393
|
+
return `${Math.floor(age / 86400)}d`;
|
|
394
|
+
}
|
|
395
|
+
function deriveTier2(ageSeconds, [okMax, warnMax]) {
|
|
396
|
+
if (ageSeconds <= okMax) return "ok";
|
|
397
|
+
if (ageSeconds <= warnMax) return "warn";
|
|
398
|
+
return "err";
|
|
399
|
+
}
|
|
400
|
+
var StalenessChip = forwardRef6(function StalenessChip2({ ageSeconds, thresholds = DEFAULT_THRESHOLDS, prefix, tooltip, ...props }, ref) {
|
|
401
|
+
const tier = deriveTier2(ageSeconds, thresholds);
|
|
402
|
+
const humanised = formatAge(ageSeconds);
|
|
403
|
+
const isInstant = humanised === "just now";
|
|
404
|
+
const chip = /* @__PURE__ */ jsxs6(Badge, { ref, variant: tier, size: "sm", dot: true, ...props, children: [
|
|
405
|
+
prefix && /* @__PURE__ */ jsx6("span", { children: prefix }),
|
|
406
|
+
/* @__PURE__ */ jsx6("span", { className: "font-mono tabular-nums", children: isInstant ? humanised : `${humanised} ago` })
|
|
407
|
+
] });
|
|
408
|
+
if (tooltip) {
|
|
409
|
+
return /* @__PURE__ */ jsx6(SimpleTooltip, { content: tooltip, children: chip });
|
|
410
|
+
}
|
|
411
|
+
return chip;
|
|
412
|
+
});
|
|
413
|
+
StalenessChip.displayName = "StalenessChip";
|
|
414
|
+
|
|
415
|
+
// src/ai/SuggestionChip.tsx
|
|
416
|
+
import { cn as cn6 } from "@ship-it-ui/ui";
|
|
417
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
418
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
419
|
+
var SuggestionChip = forwardRef7(
|
|
388
420
|
function SuggestionChip2({ glyph = "\u2726", className, children, type, ...props }, ref) {
|
|
389
|
-
return /* @__PURE__ */
|
|
421
|
+
return /* @__PURE__ */ jsxs7(
|
|
390
422
|
"button",
|
|
391
423
|
{
|
|
392
424
|
ref,
|
|
@@ -400,7 +432,7 @@ var SuggestionChip = forwardRef6(
|
|
|
400
432
|
),
|
|
401
433
|
...props,
|
|
402
434
|
children: [
|
|
403
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ jsx7("span", { "aria-hidden": true, className: "text-accent", children: glyph }),
|
|
404
436
|
children
|
|
405
437
|
]
|
|
406
438
|
}
|
|
@@ -410,24 +442,24 @@ var SuggestionChip = forwardRef6(
|
|
|
410
442
|
SuggestionChip.displayName = "SuggestionChip";
|
|
411
443
|
|
|
412
444
|
// src/ai/ToolCallCard.tsx
|
|
413
|
-
import { Badge } from "@ship-it-ui/ui";
|
|
445
|
+
import { Badge as Badge2 } from "@ship-it-ui/ui";
|
|
414
446
|
import { cn as cn7 } from "@ship-it-ui/ui";
|
|
415
|
-
import { forwardRef as
|
|
416
|
-
import { Fragment as Fragment2, jsx as
|
|
417
|
-
var ToolCallCard =
|
|
418
|
-
return /* @__PURE__ */
|
|
447
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
448
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
449
|
+
var ToolCallCard = forwardRef8(function ToolCallCard2({ name, status, running, className, children, ...props }, ref) {
|
|
450
|
+
return /* @__PURE__ */ jsxs8(
|
|
419
451
|
"div",
|
|
420
452
|
{
|
|
421
453
|
ref,
|
|
422
454
|
className: cn7("border-border bg-panel rounded-md border px-[14px] py-[10px]", className),
|
|
423
455
|
...props,
|
|
424
456
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-[10px]", children: [
|
|
458
|
+
/* @__PURE__ */ jsx8(Badge2, { size: "sm", variant: "accent", children: "TOOL" }),
|
|
459
|
+
/* @__PURE__ */ jsx8("span", { className: "font-mono text-[12px] font-medium", children: name }),
|
|
460
|
+
/* @__PURE__ */ jsx8("span", { className: "text-text-dim ml-auto inline-flex items-center font-mono text-[10px]", children: running ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
429
461
|
"running",
|
|
430
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ jsx8(
|
|
431
463
|
"span",
|
|
432
464
|
{
|
|
433
465
|
"aria-hidden": true,
|
|
@@ -436,7 +468,7 @@ var ToolCallCard = forwardRef7(function ToolCallCard2({ name, status, running, c
|
|
|
436
468
|
)
|
|
437
469
|
] }) : status })
|
|
438
470
|
] }),
|
|
439
|
-
children && /* @__PURE__ */
|
|
471
|
+
children && /* @__PURE__ */ jsx8("pre", { className: "text-text-muted m-0 mt-[6px] font-mono text-[11px] leading-[1.6] break-words whitespace-pre-wrap", children })
|
|
440
472
|
]
|
|
441
473
|
}
|
|
442
474
|
);
|
|
@@ -444,14 +476,15 @@ var ToolCallCard = forwardRef7(function ToolCallCard2({ name, status, running, c
|
|
|
444
476
|
ToolCallCard.displayName = "ToolCallCard";
|
|
445
477
|
|
|
446
478
|
// src/entity/EntityBadge.tsx
|
|
447
|
-
import {
|
|
479
|
+
import { DynamicIconGlyph } from "@ship-it-ui/icons";
|
|
480
|
+
import { Badge as Badge3 } from "@ship-it-ui/ui";
|
|
448
481
|
import { cn as cn8 } from "@ship-it-ui/ui";
|
|
449
|
-
import { forwardRef as
|
|
482
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
450
483
|
|
|
451
484
|
// src/entity/types.ts
|
|
452
485
|
var BUILTIN_META = {
|
|
453
486
|
service: {
|
|
454
|
-
|
|
487
|
+
iconName: "service",
|
|
455
488
|
label: "Service",
|
|
456
489
|
toneClass: "text-accent",
|
|
457
490
|
toneBg: "bg-accent-dim",
|
|
@@ -459,7 +492,7 @@ var BUILTIN_META = {
|
|
|
459
492
|
badgeVariant: "accent"
|
|
460
493
|
},
|
|
461
494
|
person: {
|
|
462
|
-
|
|
495
|
+
iconName: "person",
|
|
463
496
|
label: "Person",
|
|
464
497
|
toneClass: "text-text-muted",
|
|
465
498
|
toneBg: "bg-panel-2",
|
|
@@ -467,7 +500,7 @@ var BUILTIN_META = {
|
|
|
467
500
|
badgeVariant: "neutral"
|
|
468
501
|
},
|
|
469
502
|
document: {
|
|
470
|
-
|
|
503
|
+
iconName: "document",
|
|
471
504
|
label: "Document",
|
|
472
505
|
toneClass: "text-purple",
|
|
473
506
|
toneBg: "bg-[color-mix(in_oklab,var(--color-purple),transparent_85%)]",
|
|
@@ -475,7 +508,7 @@ var BUILTIN_META = {
|
|
|
475
508
|
badgeVariant: "purple"
|
|
476
509
|
},
|
|
477
510
|
deployment: {
|
|
478
|
-
|
|
511
|
+
iconName: "deployment",
|
|
479
512
|
label: "Deployment",
|
|
480
513
|
toneClass: "text-ok",
|
|
481
514
|
toneBg: "bg-[color-mix(in_oklab,var(--color-ok),transparent_85%)]",
|
|
@@ -483,7 +516,7 @@ var BUILTIN_META = {
|
|
|
483
516
|
badgeVariant: "ok"
|
|
484
517
|
},
|
|
485
518
|
incident: {
|
|
486
|
-
|
|
519
|
+
iconName: "incident",
|
|
487
520
|
label: "Incident",
|
|
488
521
|
toneClass: "text-err",
|
|
489
522
|
toneBg: "bg-[color-mix(in_oklab,var(--color-err),transparent_85%)]",
|
|
@@ -491,7 +524,7 @@ var BUILTIN_META = {
|
|
|
491
524
|
badgeVariant: "err"
|
|
492
525
|
},
|
|
493
526
|
ticket: {
|
|
494
|
-
|
|
527
|
+
iconName: "ticket",
|
|
495
528
|
label: "Ticket",
|
|
496
529
|
toneClass: "text-warn",
|
|
497
530
|
toneBg: "bg-[color-mix(in_oklab,var(--color-warn),transparent_85%)]",
|
|
@@ -522,14 +555,6 @@ function resetEntityTypeRegistry() {
|
|
|
522
555
|
registry.set(key, BUILTIN_META[key]);
|
|
523
556
|
}
|
|
524
557
|
}
|
|
525
|
-
var ENTITY_GLYPH = {
|
|
526
|
-
service: BUILTIN_META.service.glyph,
|
|
527
|
-
person: BUILTIN_META.person.glyph,
|
|
528
|
-
document: BUILTIN_META.document.glyph,
|
|
529
|
-
deployment: BUILTIN_META.deployment.glyph,
|
|
530
|
-
incident: BUILTIN_META.incident.glyph,
|
|
531
|
-
ticket: BUILTIN_META.ticket.glyph
|
|
532
|
-
};
|
|
533
558
|
var ENTITY_LABEL = {
|
|
534
559
|
service: BUILTIN_META.service.label,
|
|
535
560
|
person: BUILTIN_META.person.label,
|
|
@@ -556,11 +581,11 @@ var ENTITY_TONE_BG = {
|
|
|
556
581
|
};
|
|
557
582
|
|
|
558
583
|
// src/entity/EntityBadge.tsx
|
|
559
|
-
import { jsx as
|
|
560
|
-
var EntityBadge =
|
|
584
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
585
|
+
var EntityBadge = forwardRef9(function EntityBadge2({ type, label, hideGlyph, className, children, ...props }, ref) {
|
|
561
586
|
const meta = getEntityTypeMeta(type);
|
|
562
|
-
return /* @__PURE__ */
|
|
563
|
-
|
|
587
|
+
return /* @__PURE__ */ jsxs9(
|
|
588
|
+
Badge3,
|
|
564
589
|
{
|
|
565
590
|
ref,
|
|
566
591
|
variant: meta.badgeVariant,
|
|
@@ -568,7 +593,7 @@ var EntityBadge = forwardRef8(function EntityBadge2({ type, label, hideGlyph, cl
|
|
|
568
593
|
className: cn8(className),
|
|
569
594
|
...props,
|
|
570
595
|
children: [
|
|
571
|
-
!hideGlyph && /* @__PURE__ */
|
|
596
|
+
!hideGlyph && /* @__PURE__ */ jsx9(DynamicIconGlyph, { name: meta.iconName, size: 11 }),
|
|
572
597
|
children ?? label ?? meta.label
|
|
573
598
|
]
|
|
574
599
|
}
|
|
@@ -577,9 +602,10 @@ var EntityBadge = forwardRef8(function EntityBadge2({ type, label, hideGlyph, cl
|
|
|
577
602
|
EntityBadge.displayName = "EntityBadge";
|
|
578
603
|
|
|
579
604
|
// src/entity/EntityCard.tsx
|
|
605
|
+
import { DynamicIconGlyph as DynamicIconGlyph2 } from "@ship-it-ui/icons";
|
|
580
606
|
import { cn as cn9 } from "@ship-it-ui/ui";
|
|
581
|
-
import { forwardRef as
|
|
582
|
-
import { jsx as
|
|
607
|
+
import { forwardRef as forwardRef10 } from "react";
|
|
608
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
583
609
|
var statToneClass = {
|
|
584
610
|
accent: "text-accent",
|
|
585
611
|
ok: "text-ok",
|
|
@@ -587,9 +613,9 @@ var statToneClass = {
|
|
|
587
613
|
err: "text-err",
|
|
588
614
|
muted: "text-text-muted"
|
|
589
615
|
};
|
|
590
|
-
var EntityCard =
|
|
616
|
+
var EntityCard = forwardRef10(function EntityCard2({ type, title, subtitle, description, stats, actions, glyph, className, ...props }, ref) {
|
|
591
617
|
const meta = getEntityTypeMeta(type);
|
|
592
|
-
return /* @__PURE__ */
|
|
618
|
+
return /* @__PURE__ */ jsxs10(
|
|
593
619
|
"div",
|
|
594
620
|
{
|
|
595
621
|
ref,
|
|
@@ -600,8 +626,8 @@ var EntityCard = forwardRef9(function EntityCard2({ type, title, subtitle, descr
|
|
|
600
626
|
),
|
|
601
627
|
...props,
|
|
602
628
|
children: [
|
|
603
|
-
/* @__PURE__ */
|
|
604
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex items-start gap-3", children: [
|
|
630
|
+
/* @__PURE__ */ jsx10(
|
|
605
631
|
"span",
|
|
606
632
|
{
|
|
607
633
|
"aria-hidden": true,
|
|
@@ -610,27 +636,27 @@ var EntityCard = forwardRef9(function EntityCard2({ type, title, subtitle, descr
|
|
|
610
636
|
meta.toneBg,
|
|
611
637
|
meta.toneClass
|
|
612
638
|
),
|
|
613
|
-
children: glyph ?? meta.
|
|
639
|
+
children: glyph ?? /* @__PURE__ */ jsx10(DynamicIconGlyph2, { name: meta.iconName, size: 20 })
|
|
614
640
|
}
|
|
615
641
|
),
|
|
616
|
-
/* @__PURE__ */
|
|
617
|
-
/* @__PURE__ */
|
|
618
|
-
/* @__PURE__ */
|
|
619
|
-
subtitle && /* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ jsxs10("div", { className: "min-w-0 flex-1", children: [
|
|
643
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
644
|
+
/* @__PURE__ */ jsx10(EntityBadge, { type, size: "sm" }),
|
|
645
|
+
subtitle && /* @__PURE__ */ jsx10("span", { className: "text-text-dim font-mono text-[11px]", children: subtitle })
|
|
620
646
|
] }),
|
|
621
|
-
/* @__PURE__ */
|
|
622
|
-
description && /* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ jsx10("div", { className: "mt-1 truncate font-mono text-[18px] font-medium tracking-tight", children: title }),
|
|
648
|
+
description && /* @__PURE__ */ jsx10("div", { className: "text-text-muted mt-1 text-[13px] leading-[1.5]", children: description })
|
|
623
649
|
] }),
|
|
624
|
-
actions && /* @__PURE__ */
|
|
650
|
+
actions && /* @__PURE__ */ jsx10("div", { className: "shrink-0", children: actions })
|
|
625
651
|
] }),
|
|
626
|
-
stats && stats.length > 0 && /* @__PURE__ */
|
|
652
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx10(
|
|
627
653
|
"div",
|
|
628
654
|
{
|
|
629
655
|
className: "divide-border border-border bg-panel-2 grid divide-x rounded-md border",
|
|
630
656
|
style: { gridTemplateColumns: `repeat(${Math.min(stats.length, 6)}, 1fr)` },
|
|
631
|
-
children: stats.map((stat, i) => /* @__PURE__ */
|
|
632
|
-
/* @__PURE__ */
|
|
633
|
-
/* @__PURE__ */
|
|
657
|
+
children: stats.map((stat, i) => /* @__PURE__ */ jsxs10("div", { className: "px-4 py-3", children: [
|
|
658
|
+
/* @__PURE__ */ jsx10("div", { className: "text-text-dim font-mono text-[10px] tracking-[1.3px] uppercase", children: stat.label }),
|
|
659
|
+
/* @__PURE__ */ jsx10(
|
|
634
660
|
"div",
|
|
635
661
|
{
|
|
636
662
|
className: cn9(
|
|
@@ -649,15 +675,103 @@ var EntityCard = forwardRef9(function EntityCard2({ type, title, subtitle, descr
|
|
|
649
675
|
});
|
|
650
676
|
EntityCard.displayName = "EntityCard";
|
|
651
677
|
|
|
652
|
-
// src/entity/
|
|
678
|
+
// src/entity/EntityList.tsx
|
|
679
|
+
import { IconGlyph } from "@ship-it-ui/icons";
|
|
653
680
|
import { cn as cn10 } from "@ship-it-ui/ui";
|
|
681
|
+
import { forwardRef as forwardRef11, useState } from "react";
|
|
682
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
683
|
+
var framedClasses = "rounded-base border-border bg-panel overflow-hidden border";
|
|
684
|
+
var dividerWrapperClasses = "[&>*+*]:border-t [&>*+*]:border-border";
|
|
685
|
+
function Header({ title, subtitle }) {
|
|
686
|
+
if (!title && !subtitle) return null;
|
|
687
|
+
return /* @__PURE__ */ jsxs11("div", { className: "border-border flex flex-col gap-[2px] border-b px-3 py-2", children: [
|
|
688
|
+
title && /* @__PURE__ */ jsx11("div", { className: "text-text text-[12px] font-medium", children: title }),
|
|
689
|
+
subtitle && /* @__PURE__ */ jsx11("div", { className: "text-text-muted text-[11px]", children: subtitle })
|
|
690
|
+
] });
|
|
691
|
+
}
|
|
692
|
+
function Rows({ dividers, children }) {
|
|
693
|
+
return /* @__PURE__ */ jsx11("div", { className: cn10("flex flex-col", dividers && dividerWrapperClasses), children });
|
|
694
|
+
}
|
|
695
|
+
var EntityList = forwardRef11(function EntityList2({
|
|
696
|
+
title,
|
|
697
|
+
subtitle,
|
|
698
|
+
framed = true,
|
|
699
|
+
dividers = true,
|
|
700
|
+
collapsible,
|
|
701
|
+
defaultCollapsed = false,
|
|
702
|
+
className,
|
|
703
|
+
children,
|
|
704
|
+
...props
|
|
705
|
+
}, ref) {
|
|
706
|
+
const [open, setOpen] = useState(!defaultCollapsed);
|
|
707
|
+
if (collapsible) {
|
|
708
|
+
const fallbackLabel = !title && !subtitle ? "Toggle section" : void 0;
|
|
709
|
+
return /* @__PURE__ */ jsxs11(
|
|
710
|
+
"details",
|
|
711
|
+
{
|
|
712
|
+
ref,
|
|
713
|
+
open,
|
|
714
|
+
onToggle: (e) => setOpen(e.currentTarget.open),
|
|
715
|
+
className: cn10(framed && framedClasses, "group", className),
|
|
716
|
+
...props,
|
|
717
|
+
children: [
|
|
718
|
+
/* @__PURE__ */ jsxs11(
|
|
719
|
+
"summary",
|
|
720
|
+
{
|
|
721
|
+
"aria-label": fallbackLabel,
|
|
722
|
+
className: cn10(
|
|
723
|
+
"border-border flex cursor-pointer list-none items-center gap-2 border-b px-3 py-2",
|
|
724
|
+
"focus-visible:ring-accent-dim outline-none focus-visible:ring-[3px]",
|
|
725
|
+
// Hide the default disclosure marker on WebKit.
|
|
726
|
+
"[&::-webkit-details-marker]:hidden"
|
|
727
|
+
),
|
|
728
|
+
children: [
|
|
729
|
+
/* @__PURE__ */ jsx11(
|
|
730
|
+
IconGlyph,
|
|
731
|
+
{
|
|
732
|
+
name: "caretDown",
|
|
733
|
+
size: 12,
|
|
734
|
+
className: "text-text-muted -rotate-90 transition-transform group-open:rotate-0",
|
|
735
|
+
"aria-hidden": true
|
|
736
|
+
}
|
|
737
|
+
),
|
|
738
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
|
|
739
|
+
title && /* @__PURE__ */ jsx11("div", { className: "text-text text-[12px] font-medium", children: title }),
|
|
740
|
+
subtitle && /* @__PURE__ */ jsx11("div", { className: "text-text-muted text-[11px]", children: subtitle })
|
|
741
|
+
] })
|
|
742
|
+
]
|
|
743
|
+
}
|
|
744
|
+
),
|
|
745
|
+
/* @__PURE__ */ jsx11(Rows, { dividers, children })
|
|
746
|
+
]
|
|
747
|
+
}
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
return /* @__PURE__ */ jsxs11(
|
|
751
|
+
"section",
|
|
752
|
+
{
|
|
753
|
+
ref,
|
|
754
|
+
className: cn10(framed && framedClasses, className),
|
|
755
|
+
...props,
|
|
756
|
+
children: [
|
|
757
|
+
/* @__PURE__ */ jsx11(Header, { title, subtitle }),
|
|
758
|
+
/* @__PURE__ */ jsx11(Rows, { dividers, children })
|
|
759
|
+
]
|
|
760
|
+
}
|
|
761
|
+
);
|
|
762
|
+
});
|
|
763
|
+
EntityList.displayName = "EntityList";
|
|
764
|
+
|
|
765
|
+
// src/entity/EntityListRow.tsx
|
|
766
|
+
import { DynamicIconGlyph as DynamicIconGlyph3 } from "@ship-it-ui/icons";
|
|
767
|
+
import { cn as cn11 } from "@ship-it-ui/ui";
|
|
654
768
|
import {
|
|
655
|
-
forwardRef as
|
|
769
|
+
forwardRef as forwardRef12
|
|
656
770
|
} from "react";
|
|
657
|
-
import { Fragment as Fragment3, jsx as
|
|
658
|
-
var
|
|
771
|
+
import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
772
|
+
var dividerClass = "border-b border-border last:border-0";
|
|
773
|
+
var labelClass = (interactive, className) => cn11(
|
|
659
774
|
"flex w-full items-center gap-3 border-0 bg-transparent px-2 py-2 text-left",
|
|
660
|
-
"border-b border-border last:border-0",
|
|
661
775
|
interactive && "cursor-pointer outline-none transition-colors duration-(--duration-micro) hover:bg-panel-2 focus-visible:ring-[3px] focus-visible:ring-accent-dim",
|
|
662
776
|
className
|
|
663
777
|
);
|
|
@@ -669,40 +783,93 @@ function RowInner({
|
|
|
669
783
|
hideGlyph
|
|
670
784
|
}) {
|
|
671
785
|
const typeMeta = getEntityTypeMeta(type);
|
|
672
|
-
return /* @__PURE__ */
|
|
673
|
-
!hideGlyph && /* @__PURE__ */
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
786
|
+
return /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
787
|
+
!hideGlyph && /* @__PURE__ */ jsx12(
|
|
788
|
+
DynamicIconGlyph3,
|
|
789
|
+
{
|
|
790
|
+
name: typeMeta.iconName,
|
|
791
|
+
size: 14,
|
|
792
|
+
className: cn11("shrink-0", typeMeta.toneClass)
|
|
793
|
+
}
|
|
794
|
+
),
|
|
795
|
+
/* @__PURE__ */ jsx12("span", { className: "text-text min-w-0 flex-1 truncate font-mono text-[12px]", children: name }),
|
|
796
|
+
relation && /* @__PURE__ */ jsx12("span", { className: "border-border bg-panel-2 text-text-muted rounded-full border px-2 py-[2px] font-mono text-[10px]", children: relation }),
|
|
797
|
+
meta && /* @__PURE__ */ jsx12("span", { className: "text-text-dim font-mono text-[10px]", children: meta })
|
|
677
798
|
] });
|
|
678
799
|
}
|
|
679
|
-
var EntityListRowDiv =
|
|
680
|
-
function EntityListRowDiv2({ type, name, relation, meta, hideGlyph, className, ...props }, ref) {
|
|
681
|
-
|
|
800
|
+
var EntityListRowDiv = forwardRef12(
|
|
801
|
+
function EntityListRowDiv2({ type, name, relation, meta, hideGlyph, actions, className, ...props }, ref) {
|
|
802
|
+
if (actions) {
|
|
803
|
+
return /* @__PURE__ */ jsxs12(
|
|
804
|
+
"div",
|
|
805
|
+
{
|
|
806
|
+
ref,
|
|
807
|
+
"data-entity-type": type,
|
|
808
|
+
className: cn11("flex w-full items-center gap-1", dividerClass, className),
|
|
809
|
+
...props,
|
|
810
|
+
children: [
|
|
811
|
+
/* @__PURE__ */ jsx12("div", { className: labelClass(false), children: /* @__PURE__ */ jsx12(
|
|
812
|
+
RowInner,
|
|
813
|
+
{
|
|
814
|
+
type,
|
|
815
|
+
name,
|
|
816
|
+
relation,
|
|
817
|
+
meta,
|
|
818
|
+
hideGlyph
|
|
819
|
+
}
|
|
820
|
+
) }),
|
|
821
|
+
/* @__PURE__ */ jsx12("div", { className: "shrink-0 self-center pr-1", children: actions })
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
);
|
|
825
|
+
}
|
|
826
|
+
return /* @__PURE__ */ jsx12(
|
|
682
827
|
"div",
|
|
683
828
|
{
|
|
684
829
|
ref,
|
|
685
830
|
"data-entity-type": type,
|
|
686
|
-
className:
|
|
831
|
+
className: cn11(labelClass(false), dividerClass, className),
|
|
687
832
|
...props,
|
|
688
|
-
children: /* @__PURE__ */
|
|
833
|
+
children: /* @__PURE__ */ jsx12(RowInner, { type, name, relation, meta, hideGlyph })
|
|
689
834
|
}
|
|
690
835
|
);
|
|
691
836
|
}
|
|
692
837
|
);
|
|
693
838
|
EntityListRowDiv.displayName = "EntityListRowDiv";
|
|
694
|
-
var EntityListRowButton =
|
|
695
|
-
function EntityListRowButton2({ type, name, relation, meta, hideGlyph, className, onClick, ...props }, ref) {
|
|
696
|
-
|
|
839
|
+
var EntityListRowButton = forwardRef12(
|
|
840
|
+
function EntityListRowButton2({ type, name, relation, meta, hideGlyph, actions, className, onClick, ...props }, ref) {
|
|
841
|
+
if (actions) {
|
|
842
|
+
return /* @__PURE__ */ jsxs12(
|
|
843
|
+
"div",
|
|
844
|
+
{
|
|
845
|
+
"data-entity-type": type,
|
|
846
|
+
className: cn11("flex w-full items-stretch gap-1", dividerClass, className),
|
|
847
|
+
children: [
|
|
848
|
+
/* @__PURE__ */ jsx12("button", { ref, type: "button", onClick, className: labelClass(true), ...props, children: /* @__PURE__ */ jsx12(
|
|
849
|
+
RowInner,
|
|
850
|
+
{
|
|
851
|
+
type,
|
|
852
|
+
name,
|
|
853
|
+
relation,
|
|
854
|
+
meta,
|
|
855
|
+
hideGlyph
|
|
856
|
+
}
|
|
857
|
+
) }),
|
|
858
|
+
/* @__PURE__ */ jsx12("div", { className: "shrink-0 self-center pr-1", children: actions })
|
|
859
|
+
]
|
|
860
|
+
}
|
|
861
|
+
);
|
|
862
|
+
}
|
|
863
|
+
return /* @__PURE__ */ jsx12(
|
|
697
864
|
"button",
|
|
698
865
|
{
|
|
699
866
|
ref,
|
|
700
867
|
type: "button",
|
|
701
868
|
"data-entity-type": type,
|
|
702
869
|
onClick,
|
|
703
|
-
className:
|
|
870
|
+
className: cn11(labelClass(true), dividerClass, className),
|
|
704
871
|
...props,
|
|
705
|
-
children: /* @__PURE__ */
|
|
872
|
+
children: /* @__PURE__ */ jsx12(RowInner, { type, name, relation, meta, hideGlyph })
|
|
706
873
|
}
|
|
707
874
|
);
|
|
708
875
|
}
|
|
@@ -714,12 +881,13 @@ function EntityListRow({
|
|
|
714
881
|
relation,
|
|
715
882
|
meta,
|
|
716
883
|
hideGlyph,
|
|
884
|
+
actions,
|
|
717
885
|
onClick,
|
|
718
886
|
className,
|
|
719
887
|
...props
|
|
720
888
|
}) {
|
|
721
889
|
if (typeof onClick === "function") {
|
|
722
|
-
return /* @__PURE__ */
|
|
890
|
+
return /* @__PURE__ */ jsx12(
|
|
723
891
|
EntityListRowButton,
|
|
724
892
|
{
|
|
725
893
|
type,
|
|
@@ -727,13 +895,14 @@ function EntityListRow({
|
|
|
727
895
|
relation,
|
|
728
896
|
meta,
|
|
729
897
|
hideGlyph,
|
|
898
|
+
actions,
|
|
730
899
|
onClick,
|
|
731
900
|
className,
|
|
732
901
|
...props
|
|
733
902
|
}
|
|
734
903
|
);
|
|
735
904
|
}
|
|
736
|
-
return /* @__PURE__ */
|
|
905
|
+
return /* @__PURE__ */ jsx12(
|
|
737
906
|
EntityListRowDiv,
|
|
738
907
|
{
|
|
739
908
|
type,
|
|
@@ -741,6 +910,7 @@ function EntityListRow({
|
|
|
741
910
|
relation,
|
|
742
911
|
meta,
|
|
743
912
|
hideGlyph,
|
|
913
|
+
actions,
|
|
744
914
|
className,
|
|
745
915
|
...props
|
|
746
916
|
}
|
|
@@ -749,15 +919,15 @@ function EntityListRow({
|
|
|
749
919
|
EntityListRow.displayName = "EntityListRow";
|
|
750
920
|
|
|
751
921
|
// src/graph/GraphEdge.tsx
|
|
752
|
-
import { forwardRef as
|
|
753
|
-
import { jsx as
|
|
922
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
923
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
754
924
|
var styleProps = {
|
|
755
925
|
solid: { stroke: "var(--color-accent)", strokeWidth: 1.5 },
|
|
756
926
|
dashed: { stroke: "var(--color-accent)", strokeWidth: 1.5, strokeDasharray: "4 3" },
|
|
757
927
|
highlighted: { stroke: "var(--color-purple)", strokeWidth: 2.5 },
|
|
758
928
|
dim: { stroke: "var(--color-text-dim)", strokeWidth: 1, opacity: 0.4 }
|
|
759
929
|
};
|
|
760
|
-
var GraphEdge =
|
|
930
|
+
var GraphEdge = forwardRef13(function GraphEdge2({ x1, y1, x2, y2, curve, edgeStyle = "solid", color, arrowheadId, ...props }, ref) {
|
|
761
931
|
const base = styleProps[edgeStyle];
|
|
762
932
|
const stroke = color ?? base.stroke;
|
|
763
933
|
const sharedProps = {
|
|
@@ -770,7 +940,7 @@ var GraphEdge = forwardRef11(function GraphEdge2({ x1, y1, x2, y2, curve, edgeSt
|
|
|
770
940
|
...props
|
|
771
941
|
};
|
|
772
942
|
if (curve) {
|
|
773
|
-
return /* @__PURE__ */
|
|
943
|
+
return /* @__PURE__ */ jsx13(
|
|
774
944
|
"path",
|
|
775
945
|
{
|
|
776
946
|
ref,
|
|
@@ -779,15 +949,15 @@ var GraphEdge = forwardRef11(function GraphEdge2({ x1, y1, x2, y2, curve, edgeSt
|
|
|
779
949
|
}
|
|
780
950
|
);
|
|
781
951
|
}
|
|
782
|
-
return /* @__PURE__ */
|
|
952
|
+
return /* @__PURE__ */ jsx13("line", { ref, x1, y1, x2, y2, ...sharedProps });
|
|
783
953
|
});
|
|
784
954
|
GraphEdge.displayName = "GraphEdge";
|
|
785
955
|
|
|
786
956
|
// src/graph/GraphInspector.tsx
|
|
787
|
-
import { cn as
|
|
788
|
-
import { forwardRef as
|
|
789
|
-
import { jsx as
|
|
790
|
-
var GraphInspector =
|
|
957
|
+
import { cn as cn12 } from "@ship-it-ui/ui";
|
|
958
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
959
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
960
|
+
var GraphInspector = forwardRef14(
|
|
791
961
|
function GraphInspector2({
|
|
792
962
|
type,
|
|
793
963
|
entityId,
|
|
@@ -800,47 +970,47 @@ var GraphInspector = forwardRef12(
|
|
|
800
970
|
...props
|
|
801
971
|
}, ref) {
|
|
802
972
|
const total = relationCount ?? relations?.length ?? 0;
|
|
803
|
-
return /* @__PURE__ */
|
|
973
|
+
return /* @__PURE__ */ jsxs13(
|
|
804
974
|
"aside",
|
|
805
975
|
{
|
|
806
976
|
ref,
|
|
807
977
|
"aria-label": typeof title === "string" ? `${title} inspector` : "Node inspector",
|
|
808
|
-
className:
|
|
978
|
+
className: cn12(
|
|
809
979
|
"rounded-base border-border bg-panel flex w-[340px] flex-col gap-3 border p-4",
|
|
810
980
|
className
|
|
811
981
|
),
|
|
812
982
|
...props,
|
|
813
983
|
children: [
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
/* @__PURE__ */
|
|
816
|
-
entityId && /* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center", children: [
|
|
985
|
+
/* @__PURE__ */ jsx14(EntityBadge, { type, size: "sm" }),
|
|
986
|
+
entityId && /* @__PURE__ */ jsx14("span", { className: "text-text-dim ml-auto font-mono text-[10px]", children: entityId })
|
|
817
987
|
] }),
|
|
818
|
-
/* @__PURE__ */
|
|
819
|
-
/* @__PURE__ */
|
|
820
|
-
description && /* @__PURE__ */
|
|
988
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
989
|
+
/* @__PURE__ */ jsx14("div", { className: "text-[17px] font-medium", children: title }),
|
|
990
|
+
description && /* @__PURE__ */ jsx14("div", { className: "text-text-muted mt-[2px] text-[12px]", children: description })
|
|
821
991
|
] }),
|
|
822
|
-
properties && properties.length > 0 && /* @__PURE__ */
|
|
823
|
-
/* @__PURE__ */
|
|
824
|
-
/* @__PURE__ */
|
|
992
|
+
properties && properties.length > 0 && /* @__PURE__ */ jsxs13("section", { children: [
|
|
993
|
+
/* @__PURE__ */ jsx14("div", { className: "text-text-dim mb-2 font-mono text-[9px] tracking-[1.4px] uppercase", children: "Properties" }),
|
|
994
|
+
/* @__PURE__ */ jsx14("dl", { className: "m-0 flex flex-col gap-1 font-mono text-[11px]", children: properties.map((p, i) => /* @__PURE__ */ jsxs13(
|
|
825
995
|
"div",
|
|
826
996
|
{
|
|
827
|
-
className:
|
|
997
|
+
className: cn12("border-border flex py-1", i < properties.length - 1 && "border-b"),
|
|
828
998
|
children: [
|
|
829
|
-
/* @__PURE__ */
|
|
830
|
-
/* @__PURE__ */
|
|
999
|
+
/* @__PURE__ */ jsx14("dt", { className: "text-text-dim w-[70px]", children: p.key }),
|
|
1000
|
+
/* @__PURE__ */ jsx14("dd", { className: "m-0 flex-1", children: p.value })
|
|
831
1001
|
]
|
|
832
1002
|
},
|
|
833
1003
|
i
|
|
834
1004
|
)) })
|
|
835
1005
|
] }),
|
|
836
|
-
relations && relations.length > 0 && /* @__PURE__ */
|
|
837
|
-
/* @__PURE__ */
|
|
1006
|
+
relations && relations.length > 0 && /* @__PURE__ */ jsxs13("section", { children: [
|
|
1007
|
+
/* @__PURE__ */ jsxs13("div", { className: "text-text-dim mb-2 font-mono text-[9px] tracking-[1.4px] uppercase", children: [
|
|
838
1008
|
"Relations \xB7 ",
|
|
839
1009
|
total
|
|
840
1010
|
] }),
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
843
|
-
/* @__PURE__ */
|
|
1011
|
+
/* @__PURE__ */ jsx14("ul", { className: "m-0 flex list-none flex-col gap-1 p-0 text-[11px]", children: relations.map((r, i) => /* @__PURE__ */ jsxs13("li", { className: "flex gap-2", children: [
|
|
1012
|
+
/* @__PURE__ */ jsx14("span", { className: "text-text-dim w-[100px] font-mono", children: r.relation }),
|
|
1013
|
+
/* @__PURE__ */ jsx14("span", { children: r.entity })
|
|
844
1014
|
] }, i)) })
|
|
845
1015
|
] })
|
|
846
1016
|
]
|
|
@@ -851,33 +1021,33 @@ var GraphInspector = forwardRef12(
|
|
|
851
1021
|
GraphInspector.displayName = "GraphInspector";
|
|
852
1022
|
|
|
853
1023
|
// src/graph/GraphLegend.tsx
|
|
854
|
-
import { cn as
|
|
855
|
-
import { forwardRef as
|
|
856
|
-
import { jsx as
|
|
1024
|
+
import { cn as cn13 } from "@ship-it-ui/ui";
|
|
1025
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
1026
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
857
1027
|
var DEFAULT_ENTRIES = [
|
|
858
1028
|
{ type: "service" },
|
|
859
1029
|
{ type: "person" },
|
|
860
1030
|
{ type: "document" }
|
|
861
1031
|
];
|
|
862
|
-
var GraphLegend =
|
|
863
|
-
return /* @__PURE__ */
|
|
1032
|
+
var GraphLegend = forwardRef15(function GraphLegend2({ entries = DEFAULT_ENTRIES, heading = "Legend", className, children, ...props }, ref) {
|
|
1033
|
+
return /* @__PURE__ */ jsxs14(
|
|
864
1034
|
"div",
|
|
865
1035
|
{
|
|
866
1036
|
ref,
|
|
867
|
-
className:
|
|
1037
|
+
className: cn13(
|
|
868
1038
|
"rounded-base border-border bg-panel/85 inline-flex flex-col gap-[6px] border p-[10px] text-[11px] backdrop-blur-[8px]",
|
|
869
1039
|
className
|
|
870
1040
|
),
|
|
871
1041
|
...props,
|
|
872
1042
|
children: [
|
|
873
|
-
heading && /* @__PURE__ */
|
|
1043
|
+
heading && /* @__PURE__ */ jsx15("div", { className: "text-text-dim font-mono text-[9px] tracking-[1.4px] uppercase", children: heading }),
|
|
874
1044
|
children ?? entries.map((entry, i) => {
|
|
875
1045
|
const meta = entry.type ? getEntityTypeMeta(entry.type) : void 0;
|
|
876
1046
|
const color = entry.color ?? meta?.colorVar ?? "currentColor";
|
|
877
1047
|
const label = entry.label ?? meta?.label ?? "";
|
|
878
|
-
return /* @__PURE__ */
|
|
879
|
-
/* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
1048
|
+
return /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-[6px]", children: [
|
|
1049
|
+
/* @__PURE__ */ jsx15("span", { "aria-hidden": true, className: "h-2 w-2 rounded-full", style: { background: color } }),
|
|
1050
|
+
/* @__PURE__ */ jsx15("span", { children: label })
|
|
881
1051
|
] }, i);
|
|
882
1052
|
})
|
|
883
1053
|
]
|
|
@@ -887,24 +1057,24 @@ var GraphLegend = forwardRef13(function GraphLegend2({ entries = DEFAULT_ENTRIES
|
|
|
887
1057
|
GraphLegend.displayName = "GraphLegend";
|
|
888
1058
|
|
|
889
1059
|
// src/graph/GraphMinimap.tsx
|
|
890
|
-
import { cn as
|
|
891
|
-
import { forwardRef as
|
|
892
|
-
import { jsx as
|
|
893
|
-
var GraphMinimap =
|
|
894
|
-
return /* @__PURE__ */
|
|
1060
|
+
import { cn as cn14 } from "@ship-it-ui/ui";
|
|
1061
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
1062
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1063
|
+
var GraphMinimap = forwardRef16(function GraphMinimap2({ points, viewport, width = 120, height = 72, className, ...props }, ref) {
|
|
1064
|
+
return /* @__PURE__ */ jsx16(
|
|
895
1065
|
"div",
|
|
896
1066
|
{
|
|
897
1067
|
ref,
|
|
898
1068
|
role: "img",
|
|
899
1069
|
"aria-label": "Graph minimap",
|
|
900
|
-
className:
|
|
1070
|
+
className: cn14(
|
|
901
1071
|
"border-border bg-panel/85 relative rounded-md border p-1 backdrop-blur-[8px]",
|
|
902
1072
|
className
|
|
903
1073
|
),
|
|
904
1074
|
style: { width, height },
|
|
905
1075
|
...props,
|
|
906
|
-
children: /* @__PURE__ */
|
|
907
|
-
points.map((p, i) => /* @__PURE__ */
|
|
1076
|
+
children: /* @__PURE__ */ jsxs15("div", { className: "relative h-full w-full", children: [
|
|
1077
|
+
points.map((p, i) => /* @__PURE__ */ jsx16(
|
|
908
1078
|
"span",
|
|
909
1079
|
{
|
|
910
1080
|
"aria-hidden": true,
|
|
@@ -917,7 +1087,7 @@ var GraphMinimap = forwardRef14(function GraphMinimap2({ points, viewport, width
|
|
|
917
1087
|
},
|
|
918
1088
|
i
|
|
919
1089
|
)),
|
|
920
|
-
viewport && /* @__PURE__ */
|
|
1090
|
+
viewport && /* @__PURE__ */ jsx16(
|
|
921
1091
|
"span",
|
|
922
1092
|
{
|
|
923
1093
|
"aria-hidden": true,
|
|
@@ -939,16 +1109,17 @@ var GraphMinimap = forwardRef14(function GraphMinimap2({ points, viewport, width
|
|
|
939
1109
|
GraphMinimap.displayName = "GraphMinimap";
|
|
940
1110
|
|
|
941
1111
|
// src/graph/GraphNode.tsx
|
|
942
|
-
import {
|
|
943
|
-
import {
|
|
944
|
-
import {
|
|
945
|
-
|
|
1112
|
+
import { DynamicIconGlyph as DynamicIconGlyph4 } from "@ship-it-ui/icons";
|
|
1113
|
+
import { cn as cn15 } from "@ship-it-ui/ui";
|
|
1114
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
1115
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1116
|
+
var GraphNode = forwardRef17(function GraphNode2({ type, state = "default", glyph, label, size = 52, pathColor, className, style, ...props }, ref) {
|
|
946
1117
|
const meta = getEntityTypeMeta(type);
|
|
947
1118
|
const color = state === "path" ? pathColor ?? "var(--color-purple)" : meta.colorVar;
|
|
948
1119
|
const glowPct = state === "hover" ? 50 : 25;
|
|
949
1120
|
const opacity = state === "dim" ? 0.35 : 1;
|
|
950
1121
|
const showRing = state === "selected" || state === "path";
|
|
951
|
-
return /* @__PURE__ */
|
|
1122
|
+
return /* @__PURE__ */ jsxs16(
|
|
952
1123
|
"div",
|
|
953
1124
|
{
|
|
954
1125
|
ref,
|
|
@@ -956,11 +1127,11 @@ var GraphNode = forwardRef15(function GraphNode2({ type, state = "default", glyp
|
|
|
956
1127
|
"aria-label": typeof label === "string" ? label : `${type} node`,
|
|
957
1128
|
"data-state": state,
|
|
958
1129
|
"data-entity-type": type,
|
|
959
|
-
className:
|
|
1130
|
+
className: cn15("inline-flex flex-col items-center gap-[6px]", className),
|
|
960
1131
|
style,
|
|
961
1132
|
...props,
|
|
962
1133
|
children: [
|
|
963
|
-
/* @__PURE__ */
|
|
1134
|
+
/* @__PURE__ */ jsx17(
|
|
964
1135
|
"div",
|
|
965
1136
|
{
|
|
966
1137
|
className: "bg-panel grid place-items-center rounded-[14px] border-[1.5px] transition-all duration-(--duration-micro)",
|
|
@@ -975,10 +1146,10 @@ var GraphNode = forwardRef15(function GraphNode2({ type, state = "default", glyp
|
|
|
975
1146
|
outlineOffset: showRing ? 4 : void 0,
|
|
976
1147
|
opacity
|
|
977
1148
|
},
|
|
978
|
-
children: glyph ?? meta.
|
|
1149
|
+
children: glyph ?? /* @__PURE__ */ jsx17(DynamicIconGlyph4, { name: meta.iconName, size: Math.round(size * 0.42) })
|
|
979
1150
|
}
|
|
980
1151
|
),
|
|
981
|
-
label && /* @__PURE__ */
|
|
1152
|
+
label && /* @__PURE__ */ jsx17("span", { className: "text-text-dim font-mono text-[10px]", children: label })
|
|
982
1153
|
]
|
|
983
1154
|
}
|
|
984
1155
|
);
|
|
@@ -986,13 +1157,13 @@ var GraphNode = forwardRef15(function GraphNode2({ type, state = "default", glyp
|
|
|
986
1157
|
GraphNode.displayName = "GraphNode";
|
|
987
1158
|
|
|
988
1159
|
// src/graph/PathOverlay.tsx
|
|
989
|
-
import { forwardRef as
|
|
990
|
-
import { jsx as
|
|
991
|
-
var PathOverlay =
|
|
1160
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
1161
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1162
|
+
var PathOverlay = forwardRef18(function PathOverlay2({ points, color = "var(--color-purple)", width = 2.5, halo = true, ...props }, ref) {
|
|
992
1163
|
if (points.length < 2) return null;
|
|
993
1164
|
const coords = points.map((p) => `${p.x},${p.y}`).join(" ");
|
|
994
|
-
return /* @__PURE__ */
|
|
995
|
-
halo && /* @__PURE__ */
|
|
1165
|
+
return /* @__PURE__ */ jsxs17("g", { ref, ...props, children: [
|
|
1166
|
+
halo && /* @__PURE__ */ jsx18(
|
|
996
1167
|
"polyline",
|
|
997
1168
|
{
|
|
998
1169
|
points: coords,
|
|
@@ -1004,7 +1175,7 @@ var PathOverlay = forwardRef16(function PathOverlay2({ points, color = "var(--co
|
|
|
1004
1175
|
opacity: 0.65
|
|
1005
1176
|
}
|
|
1006
1177
|
),
|
|
1007
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ jsx18(
|
|
1008
1179
|
"polyline",
|
|
1009
1180
|
{
|
|
1010
1181
|
points: coords,
|
|
@@ -1020,24 +1191,24 @@ var PathOverlay = forwardRef16(function PathOverlay2({ points, color = "var(--co
|
|
|
1020
1191
|
PathOverlay.displayName = "PathOverlay";
|
|
1021
1192
|
|
|
1022
1193
|
// src/marketing/CTAStrip.tsx
|
|
1023
|
-
import { cn as
|
|
1024
|
-
import { forwardRef as
|
|
1025
|
-
import { jsx as
|
|
1026
|
-
var CTAStrip =
|
|
1027
|
-
return /* @__PURE__ */
|
|
1194
|
+
import { cn as cn16 } from "@ship-it-ui/ui";
|
|
1195
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
1196
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1197
|
+
var CTAStrip = forwardRef19(function CTAStrip2({ title, description, actions, className, ...props }, ref) {
|
|
1198
|
+
return /* @__PURE__ */ jsxs18(
|
|
1028
1199
|
"section",
|
|
1029
1200
|
{
|
|
1030
1201
|
ref,
|
|
1031
|
-
className:
|
|
1202
|
+
className: cn16(
|
|
1032
1203
|
"rounded-xl px-10 py-12 text-center",
|
|
1033
1204
|
"bg-[linear-gradient(135deg,var(--color-cta-from),var(--color-cta-to))]",
|
|
1034
1205
|
className
|
|
1035
1206
|
),
|
|
1036
1207
|
...props,
|
|
1037
1208
|
children: [
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
description && /* @__PURE__ */
|
|
1040
|
-
actions && /* @__PURE__ */
|
|
1209
|
+
/* @__PURE__ */ jsx19("h2", { className: "m-0 mb-[10px] text-[28px] font-medium tracking-[-0.4px]", children: title }),
|
|
1210
|
+
description && /* @__PURE__ */ jsx19("p", { className: "text-text-muted m-0 mb-5 text-[13px]", children: description }),
|
|
1211
|
+
actions && /* @__PURE__ */ jsx19("div", { className: "flex flex-wrap justify-center gap-2", children: actions })
|
|
1041
1212
|
]
|
|
1042
1213
|
}
|
|
1043
1214
|
);
|
|
@@ -1045,25 +1216,25 @@ var CTAStrip = forwardRef17(function CTAStrip2({ title, description, actions, cl
|
|
|
1045
1216
|
CTAStrip.displayName = "CTAStrip";
|
|
1046
1217
|
|
|
1047
1218
|
// src/marketing/FeatureGrid.tsx
|
|
1048
|
-
import { cn as
|
|
1049
|
-
import { forwardRef as
|
|
1050
|
-
import { jsx as
|
|
1219
|
+
import { cn as cn17 } from "@ship-it-ui/ui";
|
|
1220
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
1221
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1051
1222
|
var colsClass = {
|
|
1052
1223
|
2: "md:grid-cols-2",
|
|
1053
1224
|
3: "md:grid-cols-3",
|
|
1054
1225
|
4: "md:grid-cols-2 lg:grid-cols-4"
|
|
1055
1226
|
};
|
|
1056
|
-
var FeatureGrid =
|
|
1057
|
-
return /* @__PURE__ */
|
|
1227
|
+
var FeatureGrid = forwardRef20(function FeatureGrid2({ features, columns = 3, className, ...props }, ref) {
|
|
1228
|
+
return /* @__PURE__ */ jsx20(
|
|
1058
1229
|
"div",
|
|
1059
1230
|
{
|
|
1060
1231
|
ref,
|
|
1061
|
-
className:
|
|
1232
|
+
className: cn17("grid grid-cols-1 gap-3", colsClass[columns], className),
|
|
1062
1233
|
...props,
|
|
1063
|
-
children: features.map((f, i) => /* @__PURE__ */
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
/* @__PURE__ */
|
|
1066
|
-
/* @__PURE__ */
|
|
1234
|
+
children: features.map((f, i) => /* @__PURE__ */ jsxs19("div", { className: "rounded-base border-border bg-panel border p-5", children: [
|
|
1235
|
+
/* @__PURE__ */ jsx20("div", { "aria-hidden": true, className: "text-accent mb-3 text-[22px]", children: f.glyph }),
|
|
1236
|
+
/* @__PURE__ */ jsx20("div", { className: "mb-[6px] text-[14px] font-medium", children: f.title }),
|
|
1237
|
+
/* @__PURE__ */ jsx20("div", { className: "text-text-muted text-[12px] leading-[1.55]", children: f.description })
|
|
1067
1238
|
] }, i))
|
|
1068
1239
|
}
|
|
1069
1240
|
);
|
|
@@ -1071,16 +1242,16 @@ var FeatureGrid = forwardRef18(function FeatureGrid2({ features, columns = 3, cl
|
|
|
1071
1242
|
FeatureGrid.displayName = "FeatureGrid";
|
|
1072
1243
|
|
|
1073
1244
|
// src/marketing/Footer.tsx
|
|
1074
|
-
import { cn as
|
|
1075
|
-
import { forwardRef as
|
|
1076
|
-
import { jsx as
|
|
1077
|
-
var Footer =
|
|
1078
|
-
return /* @__PURE__ */
|
|
1079
|
-
/* @__PURE__ */
|
|
1080
|
-
brand && /* @__PURE__ */
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1083
|
-
col.links.map((link, j) => /* @__PURE__ */
|
|
1245
|
+
import { cn as cn18 } from "@ship-it-ui/ui";
|
|
1246
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
1247
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1248
|
+
var Footer = forwardRef21(function Footer2({ brand, columns, copyright, closing, className, ...props }, ref) {
|
|
1249
|
+
return /* @__PURE__ */ jsxs20("footer", { ref, className: cn18("px-7 py-7", className), ...props, children: [
|
|
1250
|
+
/* @__PURE__ */ jsxs20("div", { className: "mb-7 flex flex-wrap gap-8", children: [
|
|
1251
|
+
brand && /* @__PURE__ */ jsx21("div", { children: brand }),
|
|
1252
|
+
/* @__PURE__ */ jsx21("div", { className: "text-text-muted ml-auto flex flex-wrap gap-6 text-[12px]", children: columns.map((col, i) => /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-[6px]", children: [
|
|
1253
|
+
/* @__PURE__ */ jsx21("div", { className: "text-text-dim font-mono text-[10px] tracking-[1.2px] uppercase", children: col.heading }),
|
|
1254
|
+
col.links.map((link, j) => /* @__PURE__ */ jsx21(
|
|
1084
1255
|
"a",
|
|
1085
1256
|
{
|
|
1086
1257
|
href: link.href,
|
|
@@ -1091,47 +1262,47 @@ var Footer = forwardRef19(function Footer2({ brand, columns, copyright, closing,
|
|
|
1091
1262
|
))
|
|
1092
1263
|
] }, i)) })
|
|
1093
1264
|
] }),
|
|
1094
|
-
/* @__PURE__ */
|
|
1095
|
-
copyright && /* @__PURE__ */
|
|
1096
|
-
closing && /* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ jsxs20("div", { className: "border-border text-text-dim flex border-t pt-4 font-mono text-[11px]", children: [
|
|
1266
|
+
copyright && /* @__PURE__ */ jsx21("span", { children: copyright }),
|
|
1267
|
+
closing && /* @__PURE__ */ jsx21("span", { className: "ml-auto", children: closing })
|
|
1097
1268
|
] })
|
|
1098
1269
|
] });
|
|
1099
1270
|
});
|
|
1100
1271
|
Footer.displayName = "Footer";
|
|
1101
1272
|
|
|
1102
1273
|
// src/marketing/Hero.tsx
|
|
1103
|
-
import { cn as
|
|
1104
|
-
import { forwardRef as
|
|
1105
|
-
import { jsx as
|
|
1106
|
-
var Hero =
|
|
1274
|
+
import { cn as cn19 } from "@ship-it-ui/ui";
|
|
1275
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
1276
|
+
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1277
|
+
var Hero = forwardRef22(function Hero2({ eyebrow, title, description, actions, visual, className, ...props }, ref) {
|
|
1107
1278
|
const hasVisual = visual != null;
|
|
1108
|
-
return /* @__PURE__ */
|
|
1279
|
+
return /* @__PURE__ */ jsxs21(
|
|
1109
1280
|
"section",
|
|
1110
1281
|
{
|
|
1111
1282
|
ref,
|
|
1112
|
-
className:
|
|
1283
|
+
className: cn19(
|
|
1113
1284
|
"flex flex-col items-center justify-between gap-10 px-6 py-16 md:py-24",
|
|
1114
1285
|
hasVisual && "md:flex-row md:items-center md:gap-16",
|
|
1115
1286
|
className
|
|
1116
1287
|
),
|
|
1117
1288
|
...props,
|
|
1118
1289
|
children: [
|
|
1119
|
-
/* @__PURE__ */
|
|
1290
|
+
/* @__PURE__ */ jsxs21("div", { className: cn19("max-w-[680px]", !hasVisual && "mx-auto text-center"), children: [
|
|
1120
1291
|
eyebrow,
|
|
1121
|
-
/* @__PURE__ */
|
|
1292
|
+
/* @__PURE__ */ jsx22(
|
|
1122
1293
|
"h1",
|
|
1123
1294
|
{
|
|
1124
|
-
className:
|
|
1295
|
+
className: cn19(
|
|
1125
1296
|
"mb-4 text-[44px] leading-[1.05] font-medium tracking-[-1.6px] md:text-[56px]",
|
|
1126
1297
|
eyebrow && "mt-5"
|
|
1127
1298
|
),
|
|
1128
1299
|
children: title
|
|
1129
1300
|
}
|
|
1130
1301
|
),
|
|
1131
|
-
description && /* @__PURE__ */
|
|
1132
|
-
actions && /* @__PURE__ */
|
|
1302
|
+
description && /* @__PURE__ */ jsx22("p", { className: "text-text-muted mb-7 text-[17px] leading-[1.6]", children: description }),
|
|
1303
|
+
actions && /* @__PURE__ */ jsx22("div", { className: cn19("flex flex-wrap gap-2", !hasVisual && "justify-center"), children: actions })
|
|
1133
1304
|
] }),
|
|
1134
|
-
visual && /* @__PURE__ */
|
|
1305
|
+
visual && /* @__PURE__ */ jsx22("div", { className: "flex-1", children: visual })
|
|
1135
1306
|
]
|
|
1136
1307
|
}
|
|
1137
1308
|
);
|
|
@@ -1139,37 +1310,37 @@ var Hero = forwardRef20(function Hero2({ eyebrow, title, description, actions, v
|
|
|
1139
1310
|
Hero.displayName = "Hero";
|
|
1140
1311
|
|
|
1141
1312
|
// src/marketing/PricingCard.tsx
|
|
1142
|
-
import { cn as
|
|
1143
|
-
import { forwardRef as
|
|
1144
|
-
import { jsx as
|
|
1145
|
-
var PricingCard =
|
|
1146
|
-
return /* @__PURE__ */
|
|
1313
|
+
import { cn as cn20 } from "@ship-it-ui/ui";
|
|
1314
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
1315
|
+
import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1316
|
+
var PricingCard = forwardRef23(function PricingCard2({ tier, price, priceUnit, description, features, action, featured, className, ...props }, ref) {
|
|
1317
|
+
return /* @__PURE__ */ jsxs22(
|
|
1147
1318
|
"div",
|
|
1148
1319
|
{
|
|
1149
1320
|
ref,
|
|
1150
|
-
className:
|
|
1321
|
+
className: cn20(
|
|
1151
1322
|
"bg-panel @container flex flex-col gap-5 rounded-lg border p-5 @sm:p-6",
|
|
1152
1323
|
featured ? "border-accent shadow-lg" : "border-border",
|
|
1153
1324
|
className
|
|
1154
1325
|
),
|
|
1155
1326
|
...props,
|
|
1156
1327
|
children: [
|
|
1157
|
-
/* @__PURE__ */
|
|
1158
|
-
/* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
featured && /* @__PURE__ */
|
|
1328
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
1329
|
+
/* @__PURE__ */ jsxs22("div", { className: "mb-1 flex flex-wrap items-center gap-2", children: [
|
|
1330
|
+
/* @__PURE__ */ jsx23("span", { className: "text-[14px] font-medium", children: tier }),
|
|
1331
|
+
featured && /* @__PURE__ */ jsx23("span", { className: "bg-accent-dim text-accent rounded-full px-[6px] py-[1px] font-mono text-[10px]", children: "recommended" })
|
|
1161
1332
|
] }),
|
|
1162
|
-
description && /* @__PURE__ */
|
|
1333
|
+
description && /* @__PURE__ */ jsx23("div", { className: "text-text-muted text-[12px]", children: description })
|
|
1163
1334
|
] }),
|
|
1164
|
-
/* @__PURE__ */
|
|
1165
|
-
/* @__PURE__ */
|
|
1166
|
-
priceUnit != null && /* @__PURE__ */
|
|
1335
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex flex-wrap items-baseline justify-center gap-x-2 gap-y-1", children: [
|
|
1336
|
+
/* @__PURE__ */ jsx23("span", { className: "font-mono text-[22px] font-medium tracking-[-0.5px] text-balance @sm:text-[28px]", children: price }),
|
|
1337
|
+
priceUnit != null && /* @__PURE__ */ jsx23("span", { className: "text-text-dim text-[12px] whitespace-nowrap @sm:text-[13px]", children: priceUnit })
|
|
1167
1338
|
] }),
|
|
1168
|
-
/* @__PURE__ */
|
|
1169
|
-
/* @__PURE__ */
|
|
1170
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ jsx23("ul", { className: "m-0 flex list-none flex-col gap-2 p-0", children: features.map((f, i) => /* @__PURE__ */ jsxs22("li", { className: "flex items-start gap-2 text-[13px]", children: [
|
|
1340
|
+
/* @__PURE__ */ jsx23("span", { "aria-hidden": true, className: "text-accent", children: "\u2713" }),
|
|
1341
|
+
/* @__PURE__ */ jsx23("span", { children: f })
|
|
1171
1342
|
] }, i)) }),
|
|
1172
|
-
action && /* @__PURE__ */
|
|
1343
|
+
action && /* @__PURE__ */ jsx23("div", { className: "mt-auto", children: action })
|
|
1173
1344
|
]
|
|
1174
1345
|
}
|
|
1175
1346
|
);
|
|
@@ -1178,24 +1349,24 @@ PricingCard.displayName = "PricingCard";
|
|
|
1178
1349
|
|
|
1179
1350
|
// src/marketing/Testimonial.tsx
|
|
1180
1351
|
import { Avatar as Avatar2 } from "@ship-it-ui/ui";
|
|
1181
|
-
import { cn as
|
|
1182
|
-
import { forwardRef as
|
|
1183
|
-
import { jsx as
|
|
1184
|
-
var Testimonial =
|
|
1185
|
-
return /* @__PURE__ */
|
|
1352
|
+
import { cn as cn21 } from "@ship-it-ui/ui";
|
|
1353
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
1354
|
+
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1355
|
+
var Testimonial = forwardRef24(function Testimonial2({ quote, author, role, avatar, className, ...props }, ref) {
|
|
1356
|
+
return /* @__PURE__ */ jsxs23(
|
|
1186
1357
|
"figure",
|
|
1187
1358
|
{
|
|
1188
1359
|
ref,
|
|
1189
|
-
className:
|
|
1360
|
+
className: cn21("mx-auto max-w-[620px] px-6 py-10 text-center", className),
|
|
1190
1361
|
...props,
|
|
1191
1362
|
children: [
|
|
1192
|
-
/* @__PURE__ */
|
|
1193
|
-
/* @__PURE__ */
|
|
1194
|
-
/* @__PURE__ */
|
|
1195
|
-
typeof avatar === "string" ? /* @__PURE__ */
|
|
1196
|
-
/* @__PURE__ */
|
|
1197
|
-
/* @__PURE__ */
|
|
1198
|
-
role && /* @__PURE__ */
|
|
1363
|
+
/* @__PURE__ */ jsx24("div", { "aria-hidden": true, className: "text-accent mb-4 text-[40px] leading-none", children: "\u201C" }),
|
|
1364
|
+
/* @__PURE__ */ jsx24("blockquote", { className: "m-0 text-[22px] leading-[1.45] font-medium tracking-[-0.3px]", children: quote }),
|
|
1365
|
+
/* @__PURE__ */ jsxs23("figcaption", { className: "mt-5 flex items-center justify-center gap-[10px]", children: [
|
|
1366
|
+
typeof avatar === "string" ? /* @__PURE__ */ jsx24(Avatar2, { size: "md", name: avatar }) : avatar,
|
|
1367
|
+
/* @__PURE__ */ jsxs23("div", { className: "text-left", children: [
|
|
1368
|
+
/* @__PURE__ */ jsx24("div", { className: "text-[13px] font-medium", children: author }),
|
|
1369
|
+
role && /* @__PURE__ */ jsx24("div", { className: "text-text-dim text-[11px]", children: role })
|
|
1199
1370
|
] })
|
|
1200
1371
|
] })
|
|
1201
1372
|
]
|
|
@@ -1205,10 +1376,10 @@ var Testimonial = forwardRef22(function Testimonial2({ quote, author, role, avat
|
|
|
1205
1376
|
Testimonial.displayName = "Testimonial";
|
|
1206
1377
|
|
|
1207
1378
|
// src/data/ConnectorCard.tsx
|
|
1208
|
-
import {
|
|
1209
|
-
import { cn as
|
|
1210
|
-
import { forwardRef as
|
|
1211
|
-
import { Fragment as Fragment4, jsx as
|
|
1379
|
+
import { DynamicIconGlyph as DynamicIconGlyph5 } from "@ship-it-ui/icons";
|
|
1380
|
+
import { cn as cn22, formatRelative, StatusDot } from "@ship-it-ui/ui";
|
|
1381
|
+
import { forwardRef as forwardRef25 } from "react";
|
|
1382
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1212
1383
|
var statusDot = {
|
|
1213
1384
|
connected: "ok",
|
|
1214
1385
|
syncing: "sync",
|
|
@@ -1221,7 +1392,7 @@ var statusLabel = {
|
|
|
1221
1392
|
error: "Error",
|
|
1222
1393
|
disconnected: "Disconnected"
|
|
1223
1394
|
};
|
|
1224
|
-
var ConnectorCard =
|
|
1395
|
+
var ConnectorCard = forwardRef25(function ConnectorCard2({
|
|
1225
1396
|
connector,
|
|
1226
1397
|
name,
|
|
1227
1398
|
status,
|
|
@@ -1236,19 +1407,19 @@ var ConnectorCard = forwardRef23(function ConnectorCard2({
|
|
|
1236
1407
|
}, ref) {
|
|
1237
1408
|
const interactive = typeof onClick === "function";
|
|
1238
1409
|
const time = lastSyncedAt ? formatRelative(lastSyncedAt, relativeNow ?? /* @__PURE__ */ new Date()) : "";
|
|
1239
|
-
const labelBlock = /* @__PURE__ */
|
|
1240
|
-
/* @__PURE__ */
|
|
1410
|
+
const labelBlock = /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
1411
|
+
/* @__PURE__ */ jsx25(
|
|
1241
1412
|
"span",
|
|
1242
1413
|
{
|
|
1243
1414
|
"aria-hidden": true,
|
|
1244
1415
|
className: "bg-panel-2 grid h-10 w-10 shrink-0 place-items-center rounded-md font-mono text-[16px]",
|
|
1245
|
-
children: /* @__PURE__ */
|
|
1416
|
+
children: /* @__PURE__ */ jsx25(DynamicIconGlyph5, { name: connector, kind: "connector" })
|
|
1246
1417
|
}
|
|
1247
1418
|
),
|
|
1248
|
-
/* @__PURE__ */
|
|
1249
|
-
/* @__PURE__ */
|
|
1250
|
-
/* @__PURE__ */
|
|
1251
|
-
/* @__PURE__ */
|
|
1419
|
+
/* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1", children: [
|
|
1420
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2", children: [
|
|
1421
|
+
/* @__PURE__ */ jsx25("span", { className: "truncate text-[14px] font-medium", children: name }),
|
|
1422
|
+
/* @__PURE__ */ jsx25(
|
|
1252
1423
|
StatusDot,
|
|
1253
1424
|
{
|
|
1254
1425
|
state: statusDot[status],
|
|
@@ -1257,21 +1428,21 @@ var ConnectorCard = forwardRef23(function ConnectorCard2({
|
|
|
1257
1428
|
}
|
|
1258
1429
|
)
|
|
1259
1430
|
] }),
|
|
1260
|
-
(summary || time) && /* @__PURE__ */
|
|
1261
|
-
summary && /* @__PURE__ */
|
|
1262
|
-
summary && time && /* @__PURE__ */
|
|
1263
|
-
time && /* @__PURE__ */
|
|
1431
|
+
(summary || time) && /* @__PURE__ */ jsxs24("div", { className: "text-text-muted mt-[2px] flex items-center gap-2 text-[12px]", children: [
|
|
1432
|
+
summary && /* @__PURE__ */ jsx25("span", { className: "truncate", children: summary }),
|
|
1433
|
+
summary && time && /* @__PURE__ */ jsx25("span", { "aria-hidden": true, className: "text-text-dim", children: "\xB7" }),
|
|
1434
|
+
time && /* @__PURE__ */ jsxs24("time", { className: "text-text-dim font-mono text-[11px]", children: [
|
|
1264
1435
|
"last synced ",
|
|
1265
1436
|
time
|
|
1266
1437
|
] })
|
|
1267
1438
|
] })
|
|
1268
1439
|
] })
|
|
1269
1440
|
] });
|
|
1270
|
-
const labelRegionClass =
|
|
1441
|
+
const labelRegionClass = cn22(
|
|
1271
1442
|
"flex flex-1 items-start gap-3 rounded-md p-1 text-left transition-colors duration-(--duration-micro)",
|
|
1272
1443
|
interactive && "hover:bg-panel-2 focus-visible:ring-accent-dim cursor-pointer outline-none focus-visible:ring-[3px]"
|
|
1273
1444
|
);
|
|
1274
|
-
const labelRegion = interactive ? /* @__PURE__ */
|
|
1445
|
+
const labelRegion = interactive ? /* @__PURE__ */ jsx25(
|
|
1275
1446
|
"button",
|
|
1276
1447
|
{
|
|
1277
1448
|
type: "button",
|
|
@@ -1280,19 +1451,19 @@ var ConnectorCard = forwardRef23(function ConnectorCard2({
|
|
|
1280
1451
|
className: labelRegionClass,
|
|
1281
1452
|
children: labelBlock
|
|
1282
1453
|
}
|
|
1283
|
-
) : /* @__PURE__ */
|
|
1284
|
-
return /* @__PURE__ */
|
|
1454
|
+
) : /* @__PURE__ */ jsx25("div", { className: labelRegionClass, children: labelBlock });
|
|
1455
|
+
return /* @__PURE__ */ jsxs24(
|
|
1285
1456
|
"div",
|
|
1286
1457
|
{
|
|
1287
1458
|
ref,
|
|
1288
|
-
className:
|
|
1459
|
+
className: cn22(
|
|
1289
1460
|
"rounded-base border-border bg-panel flex items-start gap-2 border p-3",
|
|
1290
1461
|
className
|
|
1291
1462
|
),
|
|
1292
1463
|
...props,
|
|
1293
1464
|
children: [
|
|
1294
1465
|
labelRegion,
|
|
1295
|
-
actions && /* @__PURE__ */
|
|
1466
|
+
actions && /* @__PURE__ */ jsx25("div", { className: "shrink-0 self-center pr-1", children: actions })
|
|
1296
1467
|
]
|
|
1297
1468
|
}
|
|
1298
1469
|
);
|
|
@@ -1300,12 +1471,13 @@ var ConnectorCard = forwardRef23(function ConnectorCard2({
|
|
|
1300
1471
|
ConnectorCard.displayName = "ConnectorCard";
|
|
1301
1472
|
|
|
1302
1473
|
// src/data/EntityTable.tsx
|
|
1474
|
+
import { DynamicIconGlyph as DynamicIconGlyph6 } from "@ship-it-ui/icons";
|
|
1303
1475
|
import { DataTable } from "@ship-it-ui/ui";
|
|
1304
1476
|
import "react";
|
|
1305
|
-
import { jsx as
|
|
1477
|
+
import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1306
1478
|
function EntityTable(props) {
|
|
1307
1479
|
const { rowKey, ...rest } = props;
|
|
1308
|
-
return /* @__PURE__ */
|
|
1480
|
+
return /* @__PURE__ */ jsx26(DataTable, { ...rest, rowKey: rowKey ?? ((row) => row.id) });
|
|
1309
1481
|
}
|
|
1310
1482
|
function entityColumn(options = {}) {
|
|
1311
1483
|
return {
|
|
@@ -1314,8 +1486,8 @@ function entityColumn(options = {}) {
|
|
|
1314
1486
|
accessor: (row) => row.name,
|
|
1315
1487
|
cell: (row) => {
|
|
1316
1488
|
const meta = getEntityTypeMeta(row.type);
|
|
1317
|
-
return /* @__PURE__ */
|
|
1318
|
-
/* @__PURE__ */
|
|
1489
|
+
return /* @__PURE__ */ jsxs25("span", { className: "flex items-center gap-2 font-mono", "data-entity-type": row.type, children: [
|
|
1490
|
+
/* @__PURE__ */ jsx26(DynamicIconGlyph6, { name: meta.iconName, size: 14, className: meta.toneClass }),
|
|
1319
1491
|
row.name
|
|
1320
1492
|
] });
|
|
1321
1493
|
}
|
|
@@ -1326,21 +1498,21 @@ function entityTypeColumn(options = {}) {
|
|
|
1326
1498
|
key: options.key ?? "type",
|
|
1327
1499
|
header: options.header ?? "Type",
|
|
1328
1500
|
accessor: (row) => row.type,
|
|
1329
|
-
cell: (row) => /* @__PURE__ */
|
|
1501
|
+
cell: (row) => /* @__PURE__ */ jsx26(EntityBadge, { type: row.type, size: "sm" })
|
|
1330
1502
|
};
|
|
1331
1503
|
}
|
|
1332
1504
|
|
|
1333
1505
|
// src/notifications/NotifRow.tsx
|
|
1334
|
-
import { cn as
|
|
1335
|
-
import { forwardRef as
|
|
1336
|
-
import { Fragment as Fragment5, jsx as
|
|
1506
|
+
import { cn as cn23 } from "@ship-it-ui/ui";
|
|
1507
|
+
import { forwardRef as forwardRef26 } from "react";
|
|
1508
|
+
import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1337
1509
|
var toneClass = {
|
|
1338
1510
|
ok: "bg-ok",
|
|
1339
1511
|
warn: "bg-warn",
|
|
1340
1512
|
err: "bg-err",
|
|
1341
1513
|
neutral: "bg-accent-text"
|
|
1342
1514
|
};
|
|
1343
|
-
var NotifRow =
|
|
1515
|
+
var NotifRow = forwardRef26(function NotifRow2({
|
|
1344
1516
|
title,
|
|
1345
1517
|
body,
|
|
1346
1518
|
time,
|
|
@@ -1353,22 +1525,22 @@ var NotifRow = forwardRef24(function NotifRow2({
|
|
|
1353
1525
|
onClick,
|
|
1354
1526
|
...props
|
|
1355
1527
|
}, ref) {
|
|
1356
|
-
const content = /* @__PURE__ */
|
|
1357
|
-
/* @__PURE__ */
|
|
1528
|
+
const content = /* @__PURE__ */ jsxs26(Fragment5, { children: [
|
|
1529
|
+
/* @__PURE__ */ jsx27("div", { className: "pt-1", "aria-hidden": true, children: /* @__PURE__ */ jsx27(
|
|
1358
1530
|
"div",
|
|
1359
1531
|
{
|
|
1360
|
-
className:
|
|
1532
|
+
className: cn23("h-2 w-2 rounded-full", unread ? toneClass[tone] : "bg-border-strong")
|
|
1361
1533
|
}
|
|
1362
1534
|
) }),
|
|
1363
|
-
/* @__PURE__ */
|
|
1364
|
-
/* @__PURE__ */
|
|
1365
|
-
/* @__PURE__ */
|
|
1366
|
-
time != null && /* @__PURE__ */
|
|
1535
|
+
/* @__PURE__ */ jsxs26("div", { className: "min-w-0 flex-1", children: [
|
|
1536
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
1537
|
+
/* @__PURE__ */ jsx27("div", { className: "truncate text-[14px] font-medium tracking-tight", children: title }),
|
|
1538
|
+
time != null && /* @__PURE__ */ jsx27("span", { className: "text-text-muted shrink-0 font-mono text-[11px] whitespace-nowrap", children: time })
|
|
1367
1539
|
] }),
|
|
1368
|
-
body && /* @__PURE__ */
|
|
1540
|
+
body && /* @__PURE__ */ jsx27("div", { className: "text-text-muted mt-[3px] text-[13px] leading-tight", children: body })
|
|
1369
1541
|
] })
|
|
1370
1542
|
] });
|
|
1371
|
-
const baseClass =
|
|
1543
|
+
const baseClass = cn23(
|
|
1372
1544
|
"flex gap-3 p-[14px] bg-panel border-border border-l border-r",
|
|
1373
1545
|
isFirst ? "border-t rounded-t-m-card" : "",
|
|
1374
1546
|
"border-b",
|
|
@@ -1377,13 +1549,13 @@ var NotifRow = forwardRef24(function NotifRow2({
|
|
|
1377
1549
|
className
|
|
1378
1550
|
);
|
|
1379
1551
|
if (href) {
|
|
1380
|
-
return /* @__PURE__ */
|
|
1552
|
+
return /* @__PURE__ */ jsx27(
|
|
1381
1553
|
"a",
|
|
1382
1554
|
{
|
|
1383
1555
|
ref,
|
|
1384
1556
|
href,
|
|
1385
1557
|
onClick,
|
|
1386
|
-
className:
|
|
1558
|
+
className: cn23(
|
|
1387
1559
|
baseClass,
|
|
1388
1560
|
"text-text focus-visible:ring-accent-dim no-underline outline-none focus-visible:ring-[3px]"
|
|
1389
1561
|
),
|
|
@@ -1393,13 +1565,13 @@ var NotifRow = forwardRef24(function NotifRow2({
|
|
|
1393
1565
|
);
|
|
1394
1566
|
}
|
|
1395
1567
|
if (onClick) {
|
|
1396
|
-
return /* @__PURE__ */
|
|
1568
|
+
return /* @__PURE__ */ jsx27(
|
|
1397
1569
|
"button",
|
|
1398
1570
|
{
|
|
1399
1571
|
type: "button",
|
|
1400
1572
|
ref,
|
|
1401
1573
|
onClick,
|
|
1402
|
-
className:
|
|
1574
|
+
className: cn23(
|
|
1403
1575
|
baseClass,
|
|
1404
1576
|
"focus-visible:ring-accent-dim text-left outline-none focus-visible:ring-[3px]"
|
|
1405
1577
|
),
|
|
@@ -1408,7 +1580,7 @@ var NotifRow = forwardRef24(function NotifRow2({
|
|
|
1408
1580
|
}
|
|
1409
1581
|
);
|
|
1410
1582
|
}
|
|
1411
|
-
return /* @__PURE__ */
|
|
1583
|
+
return /* @__PURE__ */ jsx27("div", { ref, className: baseClass, ...props, children: content });
|
|
1412
1584
|
});
|
|
1413
1585
|
NotifRow.displayName = "NotifRow";
|
|
1414
1586
|
export {
|
|
@@ -1418,12 +1590,12 @@ export {
|
|
|
1418
1590
|
ConfidenceIndicator,
|
|
1419
1591
|
ConnectorCard,
|
|
1420
1592
|
CopilotMessage,
|
|
1421
|
-
ENTITY_GLYPH,
|
|
1422
1593
|
ENTITY_LABEL,
|
|
1423
1594
|
ENTITY_TONE_BG,
|
|
1424
1595
|
ENTITY_TONE_CLASS,
|
|
1425
1596
|
EntityBadge,
|
|
1426
1597
|
EntityCard,
|
|
1598
|
+
EntityList,
|
|
1427
1599
|
EntityListRow,
|
|
1428
1600
|
EntityListRowButton,
|
|
1429
1601
|
EntityListRowDiv,
|
|
@@ -1441,12 +1613,14 @@ export {
|
|
|
1441
1613
|
PricingCard,
|
|
1442
1614
|
ReasoningBlock,
|
|
1443
1615
|
ReasoningStep,
|
|
1616
|
+
StalenessChip,
|
|
1444
1617
|
SuggestionChip,
|
|
1445
1618
|
Testimonial,
|
|
1446
1619
|
ToolCallCard,
|
|
1447
|
-
|
|
1620
|
+
cn24 as cn,
|
|
1448
1621
|
entityColumn,
|
|
1449
1622
|
entityTypeColumn,
|
|
1623
|
+
formatAge,
|
|
1450
1624
|
getEntityTypeMeta,
|
|
1451
1625
|
listEntityTypes,
|
|
1452
1626
|
registerEntityType,
|