@ship-it-ui/shipit 0.0.3 → 0.0.4
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 +281 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +118 -12
- package/dist/index.d.ts +118 -12
- package/dist/index.js +274 -101
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
package/dist/index.cjs
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
CTAStrip: () => CTAStrip,
|
|
27
27
|
Citation: () => Citation,
|
|
28
28
|
ConfidenceIndicator: () => ConfidenceIndicator,
|
|
29
|
+
ConnectorCard: () => ConnectorCard,
|
|
29
30
|
CopilotMessage: () => CopilotMessage,
|
|
30
31
|
ENTITY_GLYPH: () => ENTITY_GLYPH,
|
|
31
32
|
ENTITY_LABEL: () => ENTITY_LABEL,
|
|
@@ -52,17 +53,22 @@ __export(index_exports, {
|
|
|
52
53
|
SuggestionChip: () => SuggestionChip,
|
|
53
54
|
Testimonial: () => Testimonial,
|
|
54
55
|
ToolCallCard: () => ToolCallCard,
|
|
55
|
-
cn: () =>
|
|
56
|
+
cn: () => import_ui29.cn,
|
|
56
57
|
entityColumn: () => entityColumn,
|
|
57
|
-
entityTypeColumn: () => entityTypeColumn
|
|
58
|
+
entityTypeColumn: () => entityTypeColumn,
|
|
59
|
+
getEntityTypeMeta: () => getEntityTypeMeta,
|
|
60
|
+
listEntityTypes: () => listEntityTypes,
|
|
61
|
+
registerEntityType: () => registerEntityType,
|
|
62
|
+
registerEntityTypes: () => registerEntityTypes,
|
|
63
|
+
resetEntityTypeRegistry: () => resetEntityTypeRegistry
|
|
58
64
|
});
|
|
59
65
|
module.exports = __toCommonJS(index_exports);
|
|
60
|
-
var
|
|
66
|
+
var import_ui29 = require("@ship-it-ui/ui");
|
|
61
67
|
|
|
62
68
|
// src/ai/AskBar.tsx
|
|
63
69
|
var import_ui = require("@ship-it-ui/ui");
|
|
64
|
-
var import_react = require("react");
|
|
65
70
|
var import_ui2 = require("@ship-it-ui/ui");
|
|
71
|
+
var import_react = require("react");
|
|
66
72
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
67
73
|
var AskBar = (0, import_react.forwardRef)(function AskBar2({
|
|
68
74
|
value: valueProp,
|
|
@@ -162,8 +168,8 @@ var AskBar = (0, import_react.forwardRef)(function AskBar2({
|
|
|
162
168
|
AskBar.displayName = "AskBar";
|
|
163
169
|
|
|
164
170
|
// src/ai/Citation.tsx
|
|
165
|
-
var import_react2 = require("react");
|
|
166
171
|
var import_ui3 = require("@ship-it-ui/ui");
|
|
172
|
+
var import_react2 = require("react");
|
|
167
173
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
168
174
|
var SUPERSCRIPTS = ["\u2070", "\xB9", "\xB2", "\xB3", "\u2074", "\u2075", "\u2076", "\u2077", "\u2078", "\u2079"];
|
|
169
175
|
function toSuperscript(n) {
|
|
@@ -204,8 +210,8 @@ var Citation = (0, import_react2.forwardRef)(function Citation2({ index, source,
|
|
|
204
210
|
Citation.displayName = "Citation";
|
|
205
211
|
|
|
206
212
|
// src/ai/ConfidenceIndicator.tsx
|
|
207
|
-
var import_react3 = require("react");
|
|
208
213
|
var import_ui4 = require("@ship-it-ui/ui");
|
|
214
|
+
var import_react3 = require("react");
|
|
209
215
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
210
216
|
var tierLabel = {
|
|
211
217
|
high: "High",
|
|
@@ -273,8 +279,8 @@ ConfidenceIndicator.displayName = "ConfidenceIndicator";
|
|
|
273
279
|
|
|
274
280
|
// src/ai/CopilotMessage.tsx
|
|
275
281
|
var import_ui5 = require("@ship-it-ui/ui");
|
|
276
|
-
var import_react4 = require("react");
|
|
277
282
|
var import_ui6 = require("@ship-it-ui/ui");
|
|
283
|
+
var import_react4 = require("react");
|
|
278
284
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
279
285
|
var CopilotMessage = (0, import_react4.forwardRef)(
|
|
280
286
|
function CopilotMessage2({ role, avatar, streaming, className, children, ...props }, ref) {
|
|
@@ -323,8 +329,8 @@ CopilotMessage.displayName = "CopilotMessage";
|
|
|
323
329
|
|
|
324
330
|
// src/ai/ReasoningBlock.tsx
|
|
325
331
|
var import_ui7 = require("@ship-it-ui/ui");
|
|
326
|
-
var import_react5 = require("react");
|
|
327
332
|
var import_ui8 = require("@ship-it-ui/ui");
|
|
333
|
+
var import_react5 = require("react");
|
|
328
334
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
329
335
|
var ReasoningBlock = (0, import_react5.forwardRef)(
|
|
330
336
|
function ReasoningBlock2({
|
|
@@ -385,8 +391,8 @@ var ReasoningStep = (0, import_react5.forwardRef)(function ReasoningStep2({ step
|
|
|
385
391
|
ReasoningStep.displayName = "ReasoningStep";
|
|
386
392
|
|
|
387
393
|
// src/ai/SuggestionChip.tsx
|
|
388
|
-
var import_react6 = require("react");
|
|
389
394
|
var import_ui9 = require("@ship-it-ui/ui");
|
|
395
|
+
var import_react6 = require("react");
|
|
390
396
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
391
397
|
var SuggestionChip = (0, import_react6.forwardRef)(
|
|
392
398
|
function SuggestionChip2({ glyph = "\u2726", className, children, type, ...props }, ref) {
|
|
@@ -415,8 +421,8 @@ SuggestionChip.displayName = "SuggestionChip";
|
|
|
415
421
|
|
|
416
422
|
// src/ai/ToolCallCard.tsx
|
|
417
423
|
var import_ui10 = require("@ship-it-ui/ui");
|
|
418
|
-
var import_react7 = require("react");
|
|
419
424
|
var import_ui11 = require("@ship-it-ui/ui");
|
|
425
|
+
var import_react7 = require("react");
|
|
420
426
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
421
427
|
var ToolCallCard = (0, import_react7.forwardRef)(function ToolCallCard2({ name, status, running, className, children, ...props }, ref) {
|
|
422
428
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
@@ -449,64 +455,140 @@ ToolCallCard.displayName = "ToolCallCard";
|
|
|
449
455
|
|
|
450
456
|
// src/entity/EntityBadge.tsx
|
|
451
457
|
var import_ui12 = require("@ship-it-ui/ui");
|
|
452
|
-
var import_react8 = require("react");
|
|
453
458
|
var import_ui13 = require("@ship-it-ui/ui");
|
|
459
|
+
var import_react8 = require("react");
|
|
454
460
|
|
|
455
461
|
// src/entity/types.ts
|
|
462
|
+
var BUILTIN_META = {
|
|
463
|
+
service: {
|
|
464
|
+
glyph: "\u25C7",
|
|
465
|
+
label: "Service",
|
|
466
|
+
toneClass: "text-accent",
|
|
467
|
+
toneBg: "bg-accent-dim",
|
|
468
|
+
colorVar: "var(--color-accent)",
|
|
469
|
+
badgeVariant: "accent"
|
|
470
|
+
},
|
|
471
|
+
person: {
|
|
472
|
+
glyph: "\u25CB",
|
|
473
|
+
label: "Person",
|
|
474
|
+
toneClass: "text-text-muted",
|
|
475
|
+
toneBg: "bg-panel-2",
|
|
476
|
+
colorVar: "var(--color-purple)",
|
|
477
|
+
badgeVariant: "neutral"
|
|
478
|
+
},
|
|
479
|
+
document: {
|
|
480
|
+
glyph: "\u25A4",
|
|
481
|
+
label: "Document",
|
|
482
|
+
toneClass: "text-purple",
|
|
483
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-purple),transparent_85%)]",
|
|
484
|
+
colorVar: "var(--color-pink)",
|
|
485
|
+
badgeVariant: "purple"
|
|
486
|
+
},
|
|
487
|
+
deployment: {
|
|
488
|
+
glyph: "\u2191",
|
|
489
|
+
label: "Deployment",
|
|
490
|
+
toneClass: "text-ok",
|
|
491
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-ok),transparent_85%)]",
|
|
492
|
+
colorVar: "var(--color-ok)",
|
|
493
|
+
badgeVariant: "ok"
|
|
494
|
+
},
|
|
495
|
+
incident: {
|
|
496
|
+
glyph: "\u25CE",
|
|
497
|
+
label: "Incident",
|
|
498
|
+
toneClass: "text-err",
|
|
499
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-err),transparent_85%)]",
|
|
500
|
+
colorVar: "var(--color-warn)",
|
|
501
|
+
badgeVariant: "err"
|
|
502
|
+
},
|
|
503
|
+
ticket: {
|
|
504
|
+
glyph: "\u25A2",
|
|
505
|
+
label: "Ticket",
|
|
506
|
+
toneClass: "text-warn",
|
|
507
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-warn),transparent_85%)]",
|
|
508
|
+
colorVar: "var(--color-text-muted)",
|
|
509
|
+
badgeVariant: "warn"
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
var FALLBACK = BUILTIN_META.service;
|
|
513
|
+
var registry = new Map(Object.entries(BUILTIN_META));
|
|
514
|
+
function registerEntityType(type, meta) {
|
|
515
|
+
registry.set(type, meta);
|
|
516
|
+
return meta;
|
|
517
|
+
}
|
|
518
|
+
function registerEntityTypes(map) {
|
|
519
|
+
for (const [key, meta] of Object.entries(map)) {
|
|
520
|
+
registry.set(key, meta);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
function getEntityTypeMeta(type) {
|
|
524
|
+
return registry.get(type) ?? FALLBACK;
|
|
525
|
+
}
|
|
526
|
+
function listEntityTypes() {
|
|
527
|
+
return Array.from(registry.entries());
|
|
528
|
+
}
|
|
529
|
+
function resetEntityTypeRegistry() {
|
|
530
|
+
registry.clear();
|
|
531
|
+
for (const key of Object.keys(BUILTIN_META)) {
|
|
532
|
+
registry.set(key, BUILTIN_META[key]);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
456
535
|
var ENTITY_GLYPH = {
|
|
457
|
-
service:
|
|
458
|
-
person:
|
|
459
|
-
document:
|
|
460
|
-
deployment:
|
|
461
|
-
incident:
|
|
462
|
-
ticket:
|
|
536
|
+
service: BUILTIN_META.service.glyph,
|
|
537
|
+
person: BUILTIN_META.person.glyph,
|
|
538
|
+
document: BUILTIN_META.document.glyph,
|
|
539
|
+
deployment: BUILTIN_META.deployment.glyph,
|
|
540
|
+
incident: BUILTIN_META.incident.glyph,
|
|
541
|
+
ticket: BUILTIN_META.ticket.glyph
|
|
463
542
|
};
|
|
464
543
|
var ENTITY_LABEL = {
|
|
465
|
-
service:
|
|
466
|
-
person:
|
|
467
|
-
document:
|
|
468
|
-
deployment:
|
|
469
|
-
incident:
|
|
470
|
-
ticket:
|
|
544
|
+
service: BUILTIN_META.service.label,
|
|
545
|
+
person: BUILTIN_META.person.label,
|
|
546
|
+
document: BUILTIN_META.document.label,
|
|
547
|
+
deployment: BUILTIN_META.deployment.label,
|
|
548
|
+
incident: BUILTIN_META.incident.label,
|
|
549
|
+
ticket: BUILTIN_META.ticket.label
|
|
471
550
|
};
|
|
472
551
|
var ENTITY_TONE_CLASS = {
|
|
473
|
-
service:
|
|
474
|
-
person:
|
|
475
|
-
document:
|
|
476
|
-
deployment:
|
|
477
|
-
incident:
|
|
478
|
-
ticket:
|
|
552
|
+
service: BUILTIN_META.service.toneClass,
|
|
553
|
+
person: BUILTIN_META.person.toneClass,
|
|
554
|
+
document: BUILTIN_META.document.toneClass,
|
|
555
|
+
deployment: BUILTIN_META.deployment.toneClass,
|
|
556
|
+
incident: BUILTIN_META.incident.toneClass,
|
|
557
|
+
ticket: BUILTIN_META.ticket.toneClass
|
|
479
558
|
};
|
|
480
559
|
var ENTITY_TONE_BG = {
|
|
481
|
-
service:
|
|
482
|
-
person:
|
|
483
|
-
document:
|
|
484
|
-
deployment:
|
|
485
|
-
incident:
|
|
486
|
-
ticket:
|
|
560
|
+
service: BUILTIN_META.service.toneBg,
|
|
561
|
+
person: BUILTIN_META.person.toneBg,
|
|
562
|
+
document: BUILTIN_META.document.toneBg,
|
|
563
|
+
deployment: BUILTIN_META.deployment.toneBg,
|
|
564
|
+
incident: BUILTIN_META.incident.toneBg,
|
|
565
|
+
ticket: BUILTIN_META.ticket.toneBg
|
|
487
566
|
};
|
|
488
567
|
|
|
489
568
|
// src/entity/EntityBadge.tsx
|
|
490
569
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
491
|
-
var typeVariant = {
|
|
492
|
-
service: "accent",
|
|
493
|
-
person: "neutral",
|
|
494
|
-
document: "purple",
|
|
495
|
-
deployment: "ok",
|
|
496
|
-
incident: "err",
|
|
497
|
-
ticket: "warn"
|
|
498
|
-
};
|
|
499
570
|
var EntityBadge = (0, import_react8.forwardRef)(function EntityBadge2({ type, label, hideGlyph, className, children, ...props }, ref) {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
571
|
+
const meta = getEntityTypeMeta(type);
|
|
572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
573
|
+
import_ui12.Badge,
|
|
574
|
+
{
|
|
575
|
+
ref,
|
|
576
|
+
variant: meta.badgeVariant,
|
|
577
|
+
"data-entity-type": type,
|
|
578
|
+
className: (0, import_ui13.cn)(className),
|
|
579
|
+
...props,
|
|
580
|
+
children: [
|
|
581
|
+
!hideGlyph && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "aria-hidden": true, className: "font-mono", children: meta.glyph }),
|
|
582
|
+
children ?? label ?? meta.label
|
|
583
|
+
]
|
|
584
|
+
}
|
|
585
|
+
);
|
|
504
586
|
});
|
|
505
587
|
EntityBadge.displayName = "EntityBadge";
|
|
506
588
|
|
|
507
589
|
// src/entity/EntityCard.tsx
|
|
508
|
-
var import_react9 = require("react");
|
|
509
590
|
var import_ui14 = require("@ship-it-ui/ui");
|
|
591
|
+
var import_react9 = require("react");
|
|
510
592
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
511
593
|
var statToneClass = {
|
|
512
594
|
accent: "text-accent",
|
|
@@ -516,10 +598,12 @@ var statToneClass = {
|
|
|
516
598
|
muted: "text-text-muted"
|
|
517
599
|
};
|
|
518
600
|
var EntityCard = (0, import_react9.forwardRef)(function EntityCard2({ type, title, subtitle, description, stats, actions, glyph, className, ...props }, ref) {
|
|
601
|
+
const meta = getEntityTypeMeta(type);
|
|
519
602
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
520
603
|
"div",
|
|
521
604
|
{
|
|
522
605
|
ref,
|
|
606
|
+
"data-entity-type": type,
|
|
523
607
|
className: (0, import_ui14.cn)(
|
|
524
608
|
"rounded-base border-border bg-panel flex flex-col gap-3 border p-5",
|
|
525
609
|
className
|
|
@@ -533,10 +617,10 @@ var EntityCard = (0, import_react9.forwardRef)(function EntityCard2({ type, titl
|
|
|
533
617
|
"aria-hidden": true,
|
|
534
618
|
className: (0, import_ui14.cn)(
|
|
535
619
|
"rounded-base grid h-12 w-12 shrink-0 place-items-center text-[20px]",
|
|
536
|
-
|
|
537
|
-
|
|
620
|
+
meta.toneBg,
|
|
621
|
+
meta.toneClass
|
|
538
622
|
),
|
|
539
|
-
children: glyph ??
|
|
623
|
+
children: glyph ?? meta.glyph
|
|
540
624
|
}
|
|
541
625
|
),
|
|
542
626
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -576,8 +660,8 @@ var EntityCard = (0, import_react9.forwardRef)(function EntityCard2({ type, titl
|
|
|
576
660
|
EntityCard.displayName = "EntityCard";
|
|
577
661
|
|
|
578
662
|
// src/entity/EntityListRow.tsx
|
|
579
|
-
var import_react10 = require("react");
|
|
580
663
|
var import_ui15 = require("@ship-it-ui/ui");
|
|
664
|
+
var import_react10 = require("react");
|
|
581
665
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
582
666
|
var baseClassNames = (interactive, className) => (0, import_ui15.cn)(
|
|
583
667
|
"flex w-full items-center gap-3 border-0 bg-transparent px-2 py-2 text-left",
|
|
@@ -592,15 +676,9 @@ function RowInner({
|
|
|
592
676
|
meta,
|
|
593
677
|
hideGlyph
|
|
594
678
|
}) {
|
|
679
|
+
const typeMeta = getEntityTypeMeta(type);
|
|
595
680
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
596
|
-
!hideGlyph && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
597
|
-
"span",
|
|
598
|
-
{
|
|
599
|
-
"aria-hidden": true,
|
|
600
|
-
className: (0, import_ui15.cn)("font-mono text-[14px] leading-none", ENTITY_TONE_CLASS[type]),
|
|
601
|
-
children: ENTITY_GLYPH[type]
|
|
602
|
-
}
|
|
603
|
-
),
|
|
681
|
+
!hideGlyph && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { "aria-hidden": true, className: (0, import_ui15.cn)("font-mono text-[14px] leading-none", typeMeta.toneClass), children: typeMeta.glyph }),
|
|
604
682
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-text min-w-0 flex-1 truncate font-mono text-[12px]", children: name }),
|
|
605
683
|
relation && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "border-border bg-panel-2 text-text-muted rounded-full border px-2 py-[2px] font-mono text-[10px]", children: relation }),
|
|
606
684
|
meta && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: meta })
|
|
@@ -608,7 +686,16 @@ function RowInner({
|
|
|
608
686
|
}
|
|
609
687
|
var EntityListRowDiv = (0, import_react10.forwardRef)(
|
|
610
688
|
function EntityListRowDiv2({ type, name, relation, meta, hideGlyph, className, ...props }, ref) {
|
|
611
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
690
|
+
"div",
|
|
691
|
+
{
|
|
692
|
+
ref,
|
|
693
|
+
"data-entity-type": type,
|
|
694
|
+
className: baseClassNames(false, className),
|
|
695
|
+
...props,
|
|
696
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(RowInner, { type, name, relation, meta, hideGlyph })
|
|
697
|
+
}
|
|
698
|
+
);
|
|
612
699
|
}
|
|
613
700
|
);
|
|
614
701
|
EntityListRowDiv.displayName = "EntityListRowDiv";
|
|
@@ -619,6 +706,7 @@ var EntityListRowButton = (0, import_react10.forwardRef)(
|
|
|
619
706
|
{
|
|
620
707
|
ref,
|
|
621
708
|
type: "button",
|
|
709
|
+
"data-entity-type": type,
|
|
622
710
|
onClick,
|
|
623
711
|
className: baseClassNames(true, className),
|
|
624
712
|
...props,
|
|
@@ -704,8 +792,8 @@ var GraphEdge = (0, import_react11.forwardRef)(function GraphEdge2({ x1, y1, x2,
|
|
|
704
792
|
GraphEdge.displayName = "GraphEdge";
|
|
705
793
|
|
|
706
794
|
// src/graph/GraphInspector.tsx
|
|
707
|
-
var import_react12 = require("react");
|
|
708
795
|
var import_ui16 = require("@ship-it-ui/ui");
|
|
796
|
+
var import_react12 = require("react");
|
|
709
797
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
710
798
|
var GraphInspector = (0, import_react12.forwardRef)(
|
|
711
799
|
function GraphInspector2({
|
|
@@ -771,21 +859,13 @@ var GraphInspector = (0, import_react12.forwardRef)(
|
|
|
771
859
|
GraphInspector.displayName = "GraphInspector";
|
|
772
860
|
|
|
773
861
|
// src/graph/GraphLegend.tsx
|
|
774
|
-
var import_react13 = require("react");
|
|
775
862
|
var import_ui17 = require("@ship-it-ui/ui");
|
|
863
|
+
var import_react13 = require("react");
|
|
776
864
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
777
|
-
var typeColorVar = {
|
|
778
|
-
service: "var(--color-accent)",
|
|
779
|
-
person: "var(--color-purple)",
|
|
780
|
-
document: "var(--color-pink)",
|
|
781
|
-
deployment: "var(--color-ok)",
|
|
782
|
-
incident: "var(--color-warn)",
|
|
783
|
-
ticket: "var(--color-text-muted)"
|
|
784
|
-
};
|
|
785
865
|
var DEFAULT_ENTRIES = [
|
|
786
|
-
{ type: "service"
|
|
787
|
-
{ type: "person"
|
|
788
|
-
{ type: "document"
|
|
866
|
+
{ type: "service" },
|
|
867
|
+
{ type: "person" },
|
|
868
|
+
{ type: "document" }
|
|
789
869
|
];
|
|
790
870
|
var GraphLegend = (0, import_react13.forwardRef)(function GraphLegend2({ entries = DEFAULT_ENTRIES, heading = "Legend", className, children, ...props }, ref) {
|
|
791
871
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
@@ -800,10 +880,12 @@ var GraphLegend = (0, import_react13.forwardRef)(function GraphLegend2({ entries
|
|
|
800
880
|
children: [
|
|
801
881
|
heading && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "text-text-dim font-mono text-[9px] tracking-[1.4px] uppercase", children: heading }),
|
|
802
882
|
children ?? entries.map((entry, i) => {
|
|
803
|
-
const
|
|
883
|
+
const meta = entry.type ? getEntityTypeMeta(entry.type) : void 0;
|
|
884
|
+
const color = entry.color ?? meta?.colorVar ?? "currentColor";
|
|
885
|
+
const label = entry.label ?? meta?.label ?? "";
|
|
804
886
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-[6px]", children: [
|
|
805
887
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": true, className: "h-2 w-2 rounded-full", style: { background: color } }),
|
|
806
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children:
|
|
888
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: label })
|
|
807
889
|
] }, i);
|
|
808
890
|
})
|
|
809
891
|
]
|
|
@@ -813,8 +895,8 @@ var GraphLegend = (0, import_react13.forwardRef)(function GraphLegend2({ entries
|
|
|
813
895
|
GraphLegend.displayName = "GraphLegend";
|
|
814
896
|
|
|
815
897
|
// src/graph/GraphMinimap.tsx
|
|
816
|
-
var import_react14 = require("react");
|
|
817
898
|
var import_ui18 = require("@ship-it-ui/ui");
|
|
899
|
+
var import_react14 = require("react");
|
|
818
900
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
819
901
|
var GraphMinimap = (0, import_react14.forwardRef)(function GraphMinimap2({ points, viewport, width = 120, height = 72, className, ...props }, ref) {
|
|
820
902
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
@@ -865,19 +947,12 @@ var GraphMinimap = (0, import_react14.forwardRef)(function GraphMinimap2({ point
|
|
|
865
947
|
GraphMinimap.displayName = "GraphMinimap";
|
|
866
948
|
|
|
867
949
|
// src/graph/GraphNode.tsx
|
|
868
|
-
var import_react15 = require("react");
|
|
869
950
|
var import_ui19 = require("@ship-it-ui/ui");
|
|
951
|
+
var import_react15 = require("react");
|
|
870
952
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
871
|
-
var typeColorVar2 = {
|
|
872
|
-
service: "var(--color-accent)",
|
|
873
|
-
person: "var(--color-purple)",
|
|
874
|
-
document: "var(--color-pink)",
|
|
875
|
-
deployment: "var(--color-ok)",
|
|
876
|
-
incident: "var(--color-warn)",
|
|
877
|
-
ticket: "var(--color-text-muted)"
|
|
878
|
-
};
|
|
879
953
|
var GraphNode = (0, import_react15.forwardRef)(function GraphNode2({ type, state = "default", glyph, label, size = 52, pathColor, className, style, ...props }, ref) {
|
|
880
|
-
const
|
|
954
|
+
const meta = getEntityTypeMeta(type);
|
|
955
|
+
const color = state === "path" ? pathColor ?? "var(--color-purple)" : meta.colorVar;
|
|
881
956
|
const glowPct = state === "hover" ? 50 : 25;
|
|
882
957
|
const opacity = state === "dim" ? 0.35 : 1;
|
|
883
958
|
const showRing = state === "selected" || state === "path";
|
|
@@ -908,7 +983,7 @@ var GraphNode = (0, import_react15.forwardRef)(function GraphNode2({ type, state
|
|
|
908
983
|
outlineOffset: showRing ? 4 : void 0,
|
|
909
984
|
opacity
|
|
910
985
|
},
|
|
911
|
-
children: glyph ??
|
|
986
|
+
children: glyph ?? meta.glyph
|
|
912
987
|
}
|
|
913
988
|
),
|
|
914
989
|
label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: label })
|
|
@@ -953,8 +1028,8 @@ var PathOverlay = (0, import_react16.forwardRef)(function PathOverlay2({ points,
|
|
|
953
1028
|
PathOverlay.displayName = "PathOverlay";
|
|
954
1029
|
|
|
955
1030
|
// src/marketing/CTAStrip.tsx
|
|
956
|
-
var import_react17 = require("react");
|
|
957
1031
|
var import_ui20 = require("@ship-it-ui/ui");
|
|
1032
|
+
var import_react17 = require("react");
|
|
958
1033
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
959
1034
|
var CTAStrip = (0, import_react17.forwardRef)(function CTAStrip2({ title, description, actions, className, ...props }, ref) {
|
|
960
1035
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
@@ -978,8 +1053,8 @@ var CTAStrip = (0, import_react17.forwardRef)(function CTAStrip2({ title, descri
|
|
|
978
1053
|
CTAStrip.displayName = "CTAStrip";
|
|
979
1054
|
|
|
980
1055
|
// src/marketing/FeatureGrid.tsx
|
|
981
|
-
var import_react18 = require("react");
|
|
982
1056
|
var import_ui21 = require("@ship-it-ui/ui");
|
|
1057
|
+
var import_react18 = require("react");
|
|
983
1058
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
984
1059
|
var colsClass = {
|
|
985
1060
|
2: "md:grid-cols-2",
|
|
@@ -1004,8 +1079,8 @@ var FeatureGrid = (0, import_react18.forwardRef)(function FeatureGrid2({ feature
|
|
|
1004
1079
|
FeatureGrid.displayName = "FeatureGrid";
|
|
1005
1080
|
|
|
1006
1081
|
// src/marketing/Footer.tsx
|
|
1007
|
-
var import_react19 = require("react");
|
|
1008
1082
|
var import_ui22 = require("@ship-it-ui/ui");
|
|
1083
|
+
var import_react19 = require("react");
|
|
1009
1084
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1010
1085
|
var Footer = (0, import_react19.forwardRef)(function Footer2({ brand, columns, copyright, closing, className, ...props }, ref) {
|
|
1011
1086
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("footer", { ref, className: (0, import_ui22.cn)("px-7 py-7", className), ...props, children: [
|
|
@@ -1033,8 +1108,8 @@ var Footer = (0, import_react19.forwardRef)(function Footer2({ brand, columns, c
|
|
|
1033
1108
|
Footer.displayName = "Footer";
|
|
1034
1109
|
|
|
1035
1110
|
// src/marketing/Hero.tsx
|
|
1036
|
-
var import_react20 = require("react");
|
|
1037
1111
|
var import_ui23 = require("@ship-it-ui/ui");
|
|
1112
|
+
var import_react20 = require("react");
|
|
1038
1113
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1039
1114
|
var Hero = (0, import_react20.forwardRef)(function Hero2({ eyebrow, title, description, actions, visual, className, ...props }, ref) {
|
|
1040
1115
|
const hasVisual = visual != null;
|
|
@@ -1072,8 +1147,8 @@ var Hero = (0, import_react20.forwardRef)(function Hero2({ eyebrow, title, descr
|
|
|
1072
1147
|
Hero.displayName = "Hero";
|
|
1073
1148
|
|
|
1074
1149
|
// src/marketing/PricingCard.tsx
|
|
1075
|
-
var import_react21 = require("react");
|
|
1076
1150
|
var import_ui24 = require("@ship-it-ui/ui");
|
|
1151
|
+
var import_react21 = require("react");
|
|
1077
1152
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1078
1153
|
var PricingCard = (0, import_react21.forwardRef)(function PricingCard2({ tier, price, priceUnit, description, features, action, featured, className, ...props }, ref) {
|
|
1079
1154
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
@@ -1111,8 +1186,8 @@ PricingCard.displayName = "PricingCard";
|
|
|
1111
1186
|
|
|
1112
1187
|
// src/marketing/Testimonial.tsx
|
|
1113
1188
|
var import_ui25 = require("@ship-it-ui/ui");
|
|
1114
|
-
var import_react22 = require("react");
|
|
1115
1189
|
var import_ui26 = require("@ship-it-ui/ui");
|
|
1190
|
+
var import_react22 = require("react");
|
|
1116
1191
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1117
1192
|
var Testimonial = (0, import_react22.forwardRef)(function Testimonial2({ quote, author, role, avatar, className, ...props }, ref) {
|
|
1118
1193
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
@@ -1137,23 +1212,121 @@ var Testimonial = (0, import_react22.forwardRef)(function Testimonial2({ quote,
|
|
|
1137
1212
|
});
|
|
1138
1213
|
Testimonial.displayName = "Testimonial";
|
|
1139
1214
|
|
|
1140
|
-
// src/data/
|
|
1215
|
+
// src/data/ConnectorCard.tsx
|
|
1216
|
+
var import_icons = require("@ship-it-ui/icons");
|
|
1141
1217
|
var import_ui27 = require("@ship-it-ui/ui");
|
|
1142
1218
|
var import_react23 = require("react");
|
|
1143
1219
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1220
|
+
var statusDot = {
|
|
1221
|
+
connected: "ok",
|
|
1222
|
+
syncing: "sync",
|
|
1223
|
+
error: "err",
|
|
1224
|
+
disconnected: "off"
|
|
1225
|
+
};
|
|
1226
|
+
var statusLabel = {
|
|
1227
|
+
connected: "Connected",
|
|
1228
|
+
syncing: "Syncing",
|
|
1229
|
+
error: "Error",
|
|
1230
|
+
disconnected: "Disconnected"
|
|
1231
|
+
};
|
|
1232
|
+
var ConnectorCard = (0, import_react23.forwardRef)(function ConnectorCard2({
|
|
1233
|
+
connector,
|
|
1234
|
+
name,
|
|
1235
|
+
status,
|
|
1236
|
+
lastSyncedAt,
|
|
1237
|
+
relativeNow,
|
|
1238
|
+
summary,
|
|
1239
|
+
actions,
|
|
1240
|
+
onClick,
|
|
1241
|
+
accessibleName,
|
|
1242
|
+
className,
|
|
1243
|
+
...props
|
|
1244
|
+
}, ref) {
|
|
1245
|
+
const interactive = typeof onClick === "function";
|
|
1246
|
+
const time = lastSyncedAt ? (0, import_ui27.formatRelative)(lastSyncedAt, relativeNow ?? /* @__PURE__ */ new Date()) : "";
|
|
1247
|
+
const labelBlock = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
1248
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1249
|
+
"span",
|
|
1250
|
+
{
|
|
1251
|
+
"aria-hidden": true,
|
|
1252
|
+
className: "bg-panel-2 grid h-10 w-10 shrink-0 place-items-center rounded-md font-mono text-[16px]",
|
|
1253
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons.IconGlyph, { name: connector, kind: "connector" })
|
|
1254
|
+
}
|
|
1255
|
+
),
|
|
1256
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
1257
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1258
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "truncate text-[14px] font-medium", children: name }),
|
|
1259
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1260
|
+
import_ui27.StatusDot,
|
|
1261
|
+
{
|
|
1262
|
+
state: statusDot[status],
|
|
1263
|
+
pulse: status === "syncing",
|
|
1264
|
+
label: statusLabel[status]
|
|
1265
|
+
}
|
|
1266
|
+
)
|
|
1267
|
+
] }),
|
|
1268
|
+
(summary || time) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "text-text-muted mt-[2px] flex items-center gap-2 text-[12px]", children: [
|
|
1269
|
+
summary && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "truncate", children: summary }),
|
|
1270
|
+
summary && time && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { "aria-hidden": true, className: "text-text-dim", children: "\xB7" }),
|
|
1271
|
+
time && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("time", { className: "text-text-dim font-mono text-[11px]", children: [
|
|
1272
|
+
"last synced ",
|
|
1273
|
+
time
|
|
1274
|
+
] })
|
|
1275
|
+
] })
|
|
1276
|
+
] })
|
|
1277
|
+
] });
|
|
1278
|
+
const labelRegionClass = (0, import_ui27.cn)(
|
|
1279
|
+
"flex flex-1 items-start gap-3 rounded-md p-1 text-left transition-colors duration-(--duration-micro)",
|
|
1280
|
+
interactive && "hover:bg-panel-2 focus-visible:ring-accent-dim cursor-pointer outline-none focus-visible:ring-[3px]"
|
|
1281
|
+
);
|
|
1282
|
+
const labelRegion = interactive ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1283
|
+
"button",
|
|
1284
|
+
{
|
|
1285
|
+
type: "button",
|
|
1286
|
+
onClick,
|
|
1287
|
+
"aria-label": accessibleName ?? (typeof name === "string" ? `${name} connector` : statusLabel[status]),
|
|
1288
|
+
className: labelRegionClass,
|
|
1289
|
+
children: labelBlock
|
|
1290
|
+
}
|
|
1291
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: labelRegionClass, children: labelBlock });
|
|
1292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1293
|
+
"div",
|
|
1294
|
+
{
|
|
1295
|
+
ref,
|
|
1296
|
+
className: (0, import_ui27.cn)(
|
|
1297
|
+
"rounded-base border-border bg-panel flex items-start gap-2 border p-3",
|
|
1298
|
+
className
|
|
1299
|
+
),
|
|
1300
|
+
...props,
|
|
1301
|
+
children: [
|
|
1302
|
+
labelRegion,
|
|
1303
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "shrink-0 self-center pr-1", children: actions })
|
|
1304
|
+
]
|
|
1305
|
+
}
|
|
1306
|
+
);
|
|
1307
|
+
});
|
|
1308
|
+
ConnectorCard.displayName = "ConnectorCard";
|
|
1309
|
+
|
|
1310
|
+
// src/data/EntityTable.tsx
|
|
1311
|
+
var import_ui28 = require("@ship-it-ui/ui");
|
|
1312
|
+
var import_react24 = require("react");
|
|
1313
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1144
1314
|
function EntityTable(props) {
|
|
1145
1315
|
const { rowKey, ...rest } = props;
|
|
1146
|
-
return /* @__PURE__ */ (0,
|
|
1316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ui28.DataTable, { ...rest, rowKey: rowKey ?? ((row) => row.id) });
|
|
1147
1317
|
}
|
|
1148
1318
|
function entityColumn(options = {}) {
|
|
1149
1319
|
return {
|
|
1150
1320
|
key: options.key ?? "name",
|
|
1151
1321
|
header: options.header ?? "Name",
|
|
1152
1322
|
accessor: (row) => row.name,
|
|
1153
|
-
cell: (row) =>
|
|
1154
|
-
|
|
1155
|
-
row.
|
|
1156
|
-
|
|
1323
|
+
cell: (row) => {
|
|
1324
|
+
const meta = getEntityTypeMeta(row.type);
|
|
1325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "flex items-center gap-2 font-mono", "data-entity-type": row.type, children: [
|
|
1326
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-hidden": true, className: meta.toneClass, children: meta.glyph }),
|
|
1327
|
+
row.name
|
|
1328
|
+
] });
|
|
1329
|
+
}
|
|
1157
1330
|
};
|
|
1158
1331
|
}
|
|
1159
1332
|
function entityTypeColumn(options = {}) {
|
|
@@ -1161,7 +1334,7 @@ function entityTypeColumn(options = {}) {
|
|
|
1161
1334
|
key: options.key ?? "type",
|
|
1162
1335
|
header: options.header ?? "Type",
|
|
1163
1336
|
accessor: (row) => row.type,
|
|
1164
|
-
cell: (row) => /* @__PURE__ */ (0,
|
|
1337
|
+
cell: (row) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(EntityBadge, { type: row.type, size: "sm" })
|
|
1165
1338
|
};
|
|
1166
1339
|
}
|
|
1167
1340
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1170,6 +1343,7 @@ function entityTypeColumn(options = {}) {
|
|
|
1170
1343
|
CTAStrip,
|
|
1171
1344
|
Citation,
|
|
1172
1345
|
ConfidenceIndicator,
|
|
1346
|
+
ConnectorCard,
|
|
1173
1347
|
CopilotMessage,
|
|
1174
1348
|
ENTITY_GLYPH,
|
|
1175
1349
|
ENTITY_LABEL,
|
|
@@ -1198,6 +1372,11 @@ function entityTypeColumn(options = {}) {
|
|
|
1198
1372
|
ToolCallCard,
|
|
1199
1373
|
cn,
|
|
1200
1374
|
entityColumn,
|
|
1201
|
-
entityTypeColumn
|
|
1375
|
+
entityTypeColumn,
|
|
1376
|
+
getEntityTypeMeta,
|
|
1377
|
+
listEntityTypes,
|
|
1378
|
+
registerEntityType,
|
|
1379
|
+
registerEntityTypes,
|
|
1380
|
+
resetEntityTypeRegistry
|
|
1202
1381
|
});
|
|
1203
1382
|
//# sourceMappingURL=index.cjs.map
|