@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.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as cn22 } from "@ship-it-ui/ui";
|
|
5
5
|
|
|
6
6
|
// src/ai/AskBar.tsx
|
|
7
7
|
import { Button, useControllableState } from "@ship-it-ui/ui";
|
|
8
|
+
import { cn } from "@ship-it-ui/ui";
|
|
8
9
|
import {
|
|
9
10
|
forwardRef,
|
|
10
11
|
useRef
|
|
11
12
|
} from "react";
|
|
12
|
-
import { cn } from "@ship-it-ui/ui";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
var AskBar = forwardRef(function AskBar2({
|
|
15
15
|
value: valueProp,
|
|
@@ -109,8 +109,8 @@ var AskBar = forwardRef(function AskBar2({
|
|
|
109
109
|
AskBar.displayName = "AskBar";
|
|
110
110
|
|
|
111
111
|
// src/ai/Citation.tsx
|
|
112
|
-
import { forwardRef as forwardRef2 } from "react";
|
|
113
112
|
import { cn as cn2 } from "@ship-it-ui/ui";
|
|
113
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
114
114
|
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
115
115
|
var SUPERSCRIPTS = ["\u2070", "\xB9", "\xB2", "\xB3", "\u2074", "\u2075", "\u2076", "\u2077", "\u2078", "\u2079"];
|
|
116
116
|
function toSuperscript(n) {
|
|
@@ -151,8 +151,8 @@ var Citation = forwardRef2(function Citation2({ index, source, meta, inline, cla
|
|
|
151
151
|
Citation.displayName = "Citation";
|
|
152
152
|
|
|
153
153
|
// src/ai/ConfidenceIndicator.tsx
|
|
154
|
-
import { forwardRef as forwardRef3 } from "react";
|
|
155
154
|
import { cn as cn3 } from "@ship-it-ui/ui";
|
|
155
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
156
156
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
157
157
|
var tierLabel = {
|
|
158
158
|
high: "High",
|
|
@@ -220,8 +220,8 @@ ConfidenceIndicator.displayName = "ConfidenceIndicator";
|
|
|
220
220
|
|
|
221
221
|
// src/ai/CopilotMessage.tsx
|
|
222
222
|
import { Avatar } from "@ship-it-ui/ui";
|
|
223
|
-
import { forwardRef as forwardRef4 } from "react";
|
|
224
223
|
import { cn as cn4 } from "@ship-it-ui/ui";
|
|
224
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
225
225
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
226
226
|
var CopilotMessage = forwardRef4(
|
|
227
227
|
function CopilotMessage2({ role, avatar, streaming, className, children, ...props }, ref) {
|
|
@@ -270,8 +270,8 @@ CopilotMessage.displayName = "CopilotMessage";
|
|
|
270
270
|
|
|
271
271
|
// src/ai/ReasoningBlock.tsx
|
|
272
272
|
import { useControllableState as useControllableState2 } from "@ship-it-ui/ui";
|
|
273
|
-
import { Children, forwardRef as forwardRef5 } from "react";
|
|
274
273
|
import { cn as cn5 } from "@ship-it-ui/ui";
|
|
274
|
+
import { Children, forwardRef as forwardRef5 } from "react";
|
|
275
275
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
276
276
|
var ReasoningBlock = forwardRef5(
|
|
277
277
|
function ReasoningBlock2({
|
|
@@ -332,8 +332,8 @@ var ReasoningStep = forwardRef5(function ReasoningStep2({ step, className, child
|
|
|
332
332
|
ReasoningStep.displayName = "ReasoningStep";
|
|
333
333
|
|
|
334
334
|
// src/ai/SuggestionChip.tsx
|
|
335
|
-
import { forwardRef as forwardRef6 } from "react";
|
|
336
335
|
import { cn as cn6 } from "@ship-it-ui/ui";
|
|
336
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
337
337
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
338
338
|
var SuggestionChip = forwardRef6(
|
|
339
339
|
function SuggestionChip2({ glyph = "\u2726", className, children, type, ...props }, ref) {
|
|
@@ -362,8 +362,8 @@ SuggestionChip.displayName = "SuggestionChip";
|
|
|
362
362
|
|
|
363
363
|
// src/ai/ToolCallCard.tsx
|
|
364
364
|
import { Badge } from "@ship-it-ui/ui";
|
|
365
|
-
import { forwardRef as forwardRef7 } from "react";
|
|
366
365
|
import { cn as cn7 } from "@ship-it-ui/ui";
|
|
366
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
367
367
|
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
368
368
|
var ToolCallCard = forwardRef7(function ToolCallCard2({ name, status, running, className, children, ...props }, ref) {
|
|
369
369
|
return /* @__PURE__ */ jsxs7(
|
|
@@ -396,64 +396,140 @@ ToolCallCard.displayName = "ToolCallCard";
|
|
|
396
396
|
|
|
397
397
|
// src/entity/EntityBadge.tsx
|
|
398
398
|
import { Badge as Badge2 } from "@ship-it-ui/ui";
|
|
399
|
-
import { forwardRef as forwardRef8 } from "react";
|
|
400
399
|
import { cn as cn8 } from "@ship-it-ui/ui";
|
|
400
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
401
401
|
|
|
402
402
|
// src/entity/types.ts
|
|
403
|
+
var BUILTIN_META = {
|
|
404
|
+
service: {
|
|
405
|
+
glyph: "\u25C7",
|
|
406
|
+
label: "Service",
|
|
407
|
+
toneClass: "text-accent",
|
|
408
|
+
toneBg: "bg-accent-dim",
|
|
409
|
+
colorVar: "var(--color-accent)",
|
|
410
|
+
badgeVariant: "accent"
|
|
411
|
+
},
|
|
412
|
+
person: {
|
|
413
|
+
glyph: "\u25CB",
|
|
414
|
+
label: "Person",
|
|
415
|
+
toneClass: "text-text-muted",
|
|
416
|
+
toneBg: "bg-panel-2",
|
|
417
|
+
colorVar: "var(--color-purple)",
|
|
418
|
+
badgeVariant: "neutral"
|
|
419
|
+
},
|
|
420
|
+
document: {
|
|
421
|
+
glyph: "\u25A4",
|
|
422
|
+
label: "Document",
|
|
423
|
+
toneClass: "text-purple",
|
|
424
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-purple),transparent_85%)]",
|
|
425
|
+
colorVar: "var(--color-pink)",
|
|
426
|
+
badgeVariant: "purple"
|
|
427
|
+
},
|
|
428
|
+
deployment: {
|
|
429
|
+
glyph: "\u2191",
|
|
430
|
+
label: "Deployment",
|
|
431
|
+
toneClass: "text-ok",
|
|
432
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-ok),transparent_85%)]",
|
|
433
|
+
colorVar: "var(--color-ok)",
|
|
434
|
+
badgeVariant: "ok"
|
|
435
|
+
},
|
|
436
|
+
incident: {
|
|
437
|
+
glyph: "\u25CE",
|
|
438
|
+
label: "Incident",
|
|
439
|
+
toneClass: "text-err",
|
|
440
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-err),transparent_85%)]",
|
|
441
|
+
colorVar: "var(--color-warn)",
|
|
442
|
+
badgeVariant: "err"
|
|
443
|
+
},
|
|
444
|
+
ticket: {
|
|
445
|
+
glyph: "\u25A2",
|
|
446
|
+
label: "Ticket",
|
|
447
|
+
toneClass: "text-warn",
|
|
448
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-warn),transparent_85%)]",
|
|
449
|
+
colorVar: "var(--color-text-muted)",
|
|
450
|
+
badgeVariant: "warn"
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
var FALLBACK = BUILTIN_META.service;
|
|
454
|
+
var registry = new Map(Object.entries(BUILTIN_META));
|
|
455
|
+
function registerEntityType(type, meta) {
|
|
456
|
+
registry.set(type, meta);
|
|
457
|
+
return meta;
|
|
458
|
+
}
|
|
459
|
+
function registerEntityTypes(map) {
|
|
460
|
+
for (const [key, meta] of Object.entries(map)) {
|
|
461
|
+
registry.set(key, meta);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
function getEntityTypeMeta(type) {
|
|
465
|
+
return registry.get(type) ?? FALLBACK;
|
|
466
|
+
}
|
|
467
|
+
function listEntityTypes() {
|
|
468
|
+
return Array.from(registry.entries());
|
|
469
|
+
}
|
|
470
|
+
function resetEntityTypeRegistry() {
|
|
471
|
+
registry.clear();
|
|
472
|
+
for (const key of Object.keys(BUILTIN_META)) {
|
|
473
|
+
registry.set(key, BUILTIN_META[key]);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
403
476
|
var ENTITY_GLYPH = {
|
|
404
|
-
service:
|
|
405
|
-
person:
|
|
406
|
-
document:
|
|
407
|
-
deployment:
|
|
408
|
-
incident:
|
|
409
|
-
ticket:
|
|
477
|
+
service: BUILTIN_META.service.glyph,
|
|
478
|
+
person: BUILTIN_META.person.glyph,
|
|
479
|
+
document: BUILTIN_META.document.glyph,
|
|
480
|
+
deployment: BUILTIN_META.deployment.glyph,
|
|
481
|
+
incident: BUILTIN_META.incident.glyph,
|
|
482
|
+
ticket: BUILTIN_META.ticket.glyph
|
|
410
483
|
};
|
|
411
484
|
var ENTITY_LABEL = {
|
|
412
|
-
service:
|
|
413
|
-
person:
|
|
414
|
-
document:
|
|
415
|
-
deployment:
|
|
416
|
-
incident:
|
|
417
|
-
ticket:
|
|
485
|
+
service: BUILTIN_META.service.label,
|
|
486
|
+
person: BUILTIN_META.person.label,
|
|
487
|
+
document: BUILTIN_META.document.label,
|
|
488
|
+
deployment: BUILTIN_META.deployment.label,
|
|
489
|
+
incident: BUILTIN_META.incident.label,
|
|
490
|
+
ticket: BUILTIN_META.ticket.label
|
|
418
491
|
};
|
|
419
492
|
var ENTITY_TONE_CLASS = {
|
|
420
|
-
service:
|
|
421
|
-
person:
|
|
422
|
-
document:
|
|
423
|
-
deployment:
|
|
424
|
-
incident:
|
|
425
|
-
ticket:
|
|
493
|
+
service: BUILTIN_META.service.toneClass,
|
|
494
|
+
person: BUILTIN_META.person.toneClass,
|
|
495
|
+
document: BUILTIN_META.document.toneClass,
|
|
496
|
+
deployment: BUILTIN_META.deployment.toneClass,
|
|
497
|
+
incident: BUILTIN_META.incident.toneClass,
|
|
498
|
+
ticket: BUILTIN_META.ticket.toneClass
|
|
426
499
|
};
|
|
427
500
|
var ENTITY_TONE_BG = {
|
|
428
|
-
service:
|
|
429
|
-
person:
|
|
430
|
-
document:
|
|
431
|
-
deployment:
|
|
432
|
-
incident:
|
|
433
|
-
ticket:
|
|
501
|
+
service: BUILTIN_META.service.toneBg,
|
|
502
|
+
person: BUILTIN_META.person.toneBg,
|
|
503
|
+
document: BUILTIN_META.document.toneBg,
|
|
504
|
+
deployment: BUILTIN_META.deployment.toneBg,
|
|
505
|
+
incident: BUILTIN_META.incident.toneBg,
|
|
506
|
+
ticket: BUILTIN_META.ticket.toneBg
|
|
434
507
|
};
|
|
435
508
|
|
|
436
509
|
// src/entity/EntityBadge.tsx
|
|
437
510
|
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
438
|
-
var typeVariant = {
|
|
439
|
-
service: "accent",
|
|
440
|
-
person: "neutral",
|
|
441
|
-
document: "purple",
|
|
442
|
-
deployment: "ok",
|
|
443
|
-
incident: "err",
|
|
444
|
-
ticket: "warn"
|
|
445
|
-
};
|
|
446
511
|
var EntityBadge = forwardRef8(function EntityBadge2({ type, label, hideGlyph, className, children, ...props }, ref) {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
512
|
+
const meta = getEntityTypeMeta(type);
|
|
513
|
+
return /* @__PURE__ */ jsxs8(
|
|
514
|
+
Badge2,
|
|
515
|
+
{
|
|
516
|
+
ref,
|
|
517
|
+
variant: meta.badgeVariant,
|
|
518
|
+
"data-entity-type": type,
|
|
519
|
+
className: cn8(className),
|
|
520
|
+
...props,
|
|
521
|
+
children: [
|
|
522
|
+
!hideGlyph && /* @__PURE__ */ jsx8("span", { "aria-hidden": true, className: "font-mono", children: meta.glyph }),
|
|
523
|
+
children ?? label ?? meta.label
|
|
524
|
+
]
|
|
525
|
+
}
|
|
526
|
+
);
|
|
451
527
|
});
|
|
452
528
|
EntityBadge.displayName = "EntityBadge";
|
|
453
529
|
|
|
454
530
|
// src/entity/EntityCard.tsx
|
|
455
|
-
import { forwardRef as forwardRef9 } from "react";
|
|
456
531
|
import { cn as cn9 } from "@ship-it-ui/ui";
|
|
532
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
457
533
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
458
534
|
var statToneClass = {
|
|
459
535
|
accent: "text-accent",
|
|
@@ -463,10 +539,12 @@ var statToneClass = {
|
|
|
463
539
|
muted: "text-text-muted"
|
|
464
540
|
};
|
|
465
541
|
var EntityCard = forwardRef9(function EntityCard2({ type, title, subtitle, description, stats, actions, glyph, className, ...props }, ref) {
|
|
542
|
+
const meta = getEntityTypeMeta(type);
|
|
466
543
|
return /* @__PURE__ */ jsxs9(
|
|
467
544
|
"div",
|
|
468
545
|
{
|
|
469
546
|
ref,
|
|
547
|
+
"data-entity-type": type,
|
|
470
548
|
className: cn9(
|
|
471
549
|
"rounded-base border-border bg-panel flex flex-col gap-3 border p-5",
|
|
472
550
|
className
|
|
@@ -480,10 +558,10 @@ var EntityCard = forwardRef9(function EntityCard2({ type, title, subtitle, descr
|
|
|
480
558
|
"aria-hidden": true,
|
|
481
559
|
className: cn9(
|
|
482
560
|
"rounded-base grid h-12 w-12 shrink-0 place-items-center text-[20px]",
|
|
483
|
-
|
|
484
|
-
|
|
561
|
+
meta.toneBg,
|
|
562
|
+
meta.toneClass
|
|
485
563
|
),
|
|
486
|
-
children: glyph ??
|
|
564
|
+
children: glyph ?? meta.glyph
|
|
487
565
|
}
|
|
488
566
|
),
|
|
489
567
|
/* @__PURE__ */ jsxs9("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -523,10 +601,10 @@ var EntityCard = forwardRef9(function EntityCard2({ type, title, subtitle, descr
|
|
|
523
601
|
EntityCard.displayName = "EntityCard";
|
|
524
602
|
|
|
525
603
|
// src/entity/EntityListRow.tsx
|
|
604
|
+
import { cn as cn10 } from "@ship-it-ui/ui";
|
|
526
605
|
import {
|
|
527
606
|
forwardRef as forwardRef10
|
|
528
607
|
} from "react";
|
|
529
|
-
import { cn as cn10 } from "@ship-it-ui/ui";
|
|
530
608
|
import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
531
609
|
var baseClassNames = (interactive, className) => cn10(
|
|
532
610
|
"flex w-full items-center gap-3 border-0 bg-transparent px-2 py-2 text-left",
|
|
@@ -541,15 +619,9 @@ function RowInner({
|
|
|
541
619
|
meta,
|
|
542
620
|
hideGlyph
|
|
543
621
|
}) {
|
|
622
|
+
const typeMeta = getEntityTypeMeta(type);
|
|
544
623
|
return /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
545
|
-
!hideGlyph && /* @__PURE__ */ jsx10(
|
|
546
|
-
"span",
|
|
547
|
-
{
|
|
548
|
-
"aria-hidden": true,
|
|
549
|
-
className: cn10("font-mono text-[14px] leading-none", ENTITY_TONE_CLASS[type]),
|
|
550
|
-
children: ENTITY_GLYPH[type]
|
|
551
|
-
}
|
|
552
|
-
),
|
|
624
|
+
!hideGlyph && /* @__PURE__ */ jsx10("span", { "aria-hidden": true, className: cn10("font-mono text-[14px] leading-none", typeMeta.toneClass), children: typeMeta.glyph }),
|
|
553
625
|
/* @__PURE__ */ jsx10("span", { className: "text-text min-w-0 flex-1 truncate font-mono text-[12px]", children: name }),
|
|
554
626
|
relation && /* @__PURE__ */ jsx10("span", { className: "border-border bg-panel-2 text-text-muted rounded-full border px-2 py-[2px] font-mono text-[10px]", children: relation }),
|
|
555
627
|
meta && /* @__PURE__ */ jsx10("span", { className: "text-text-dim font-mono text-[10px]", children: meta })
|
|
@@ -557,7 +629,16 @@ function RowInner({
|
|
|
557
629
|
}
|
|
558
630
|
var EntityListRowDiv = forwardRef10(
|
|
559
631
|
function EntityListRowDiv2({ type, name, relation, meta, hideGlyph, className, ...props }, ref) {
|
|
560
|
-
return /* @__PURE__ */ jsx10(
|
|
632
|
+
return /* @__PURE__ */ jsx10(
|
|
633
|
+
"div",
|
|
634
|
+
{
|
|
635
|
+
ref,
|
|
636
|
+
"data-entity-type": type,
|
|
637
|
+
className: baseClassNames(false, className),
|
|
638
|
+
...props,
|
|
639
|
+
children: /* @__PURE__ */ jsx10(RowInner, { type, name, relation, meta, hideGlyph })
|
|
640
|
+
}
|
|
641
|
+
);
|
|
561
642
|
}
|
|
562
643
|
);
|
|
563
644
|
EntityListRowDiv.displayName = "EntityListRowDiv";
|
|
@@ -568,6 +649,7 @@ var EntityListRowButton = forwardRef10(
|
|
|
568
649
|
{
|
|
569
650
|
ref,
|
|
570
651
|
type: "button",
|
|
652
|
+
"data-entity-type": type,
|
|
571
653
|
onClick,
|
|
572
654
|
className: baseClassNames(true, className),
|
|
573
655
|
...props,
|
|
@@ -653,8 +735,8 @@ var GraphEdge = forwardRef11(function GraphEdge2({ x1, y1, x2, y2, curve, edgeSt
|
|
|
653
735
|
GraphEdge.displayName = "GraphEdge";
|
|
654
736
|
|
|
655
737
|
// src/graph/GraphInspector.tsx
|
|
656
|
-
import { forwardRef as forwardRef12 } from "react";
|
|
657
738
|
import { cn as cn11 } from "@ship-it-ui/ui";
|
|
739
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
658
740
|
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
659
741
|
var GraphInspector = forwardRef12(
|
|
660
742
|
function GraphInspector2({
|
|
@@ -720,21 +802,13 @@ var GraphInspector = forwardRef12(
|
|
|
720
802
|
GraphInspector.displayName = "GraphInspector";
|
|
721
803
|
|
|
722
804
|
// src/graph/GraphLegend.tsx
|
|
723
|
-
import { forwardRef as forwardRef13 } from "react";
|
|
724
805
|
import { cn as cn12 } from "@ship-it-ui/ui";
|
|
806
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
725
807
|
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
726
|
-
var typeColorVar = {
|
|
727
|
-
service: "var(--color-accent)",
|
|
728
|
-
person: "var(--color-purple)",
|
|
729
|
-
document: "var(--color-pink)",
|
|
730
|
-
deployment: "var(--color-ok)",
|
|
731
|
-
incident: "var(--color-warn)",
|
|
732
|
-
ticket: "var(--color-text-muted)"
|
|
733
|
-
};
|
|
734
808
|
var DEFAULT_ENTRIES = [
|
|
735
|
-
{ type: "service"
|
|
736
|
-
{ type: "person"
|
|
737
|
-
{ type: "document"
|
|
809
|
+
{ type: "service" },
|
|
810
|
+
{ type: "person" },
|
|
811
|
+
{ type: "document" }
|
|
738
812
|
];
|
|
739
813
|
var GraphLegend = forwardRef13(function GraphLegend2({ entries = DEFAULT_ENTRIES, heading = "Legend", className, children, ...props }, ref) {
|
|
740
814
|
return /* @__PURE__ */ jsxs12(
|
|
@@ -749,10 +823,12 @@ var GraphLegend = forwardRef13(function GraphLegend2({ entries = DEFAULT_ENTRIES
|
|
|
749
823
|
children: [
|
|
750
824
|
heading && /* @__PURE__ */ jsx13("div", { className: "text-text-dim font-mono text-[9px] tracking-[1.4px] uppercase", children: heading }),
|
|
751
825
|
children ?? entries.map((entry, i) => {
|
|
752
|
-
const
|
|
826
|
+
const meta = entry.type ? getEntityTypeMeta(entry.type) : void 0;
|
|
827
|
+
const color = entry.color ?? meta?.colorVar ?? "currentColor";
|
|
828
|
+
const label = entry.label ?? meta?.label ?? "";
|
|
753
829
|
return /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-[6px]", children: [
|
|
754
830
|
/* @__PURE__ */ jsx13("span", { "aria-hidden": true, className: "h-2 w-2 rounded-full", style: { background: color } }),
|
|
755
|
-
/* @__PURE__ */ jsx13("span", { children:
|
|
831
|
+
/* @__PURE__ */ jsx13("span", { children: label })
|
|
756
832
|
] }, i);
|
|
757
833
|
})
|
|
758
834
|
]
|
|
@@ -762,8 +838,8 @@ var GraphLegend = forwardRef13(function GraphLegend2({ entries = DEFAULT_ENTRIES
|
|
|
762
838
|
GraphLegend.displayName = "GraphLegend";
|
|
763
839
|
|
|
764
840
|
// src/graph/GraphMinimap.tsx
|
|
765
|
-
import { forwardRef as forwardRef14 } from "react";
|
|
766
841
|
import { cn as cn13 } from "@ship-it-ui/ui";
|
|
842
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
767
843
|
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
768
844
|
var GraphMinimap = forwardRef14(function GraphMinimap2({ points, viewport, width = 120, height = 72, className, ...props }, ref) {
|
|
769
845
|
return /* @__PURE__ */ jsx14(
|
|
@@ -814,19 +890,12 @@ var GraphMinimap = forwardRef14(function GraphMinimap2({ points, viewport, width
|
|
|
814
890
|
GraphMinimap.displayName = "GraphMinimap";
|
|
815
891
|
|
|
816
892
|
// src/graph/GraphNode.tsx
|
|
817
|
-
import { forwardRef as forwardRef15 } from "react";
|
|
818
893
|
import { cn as cn14 } from "@ship-it-ui/ui";
|
|
894
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
819
895
|
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
820
|
-
var typeColorVar2 = {
|
|
821
|
-
service: "var(--color-accent)",
|
|
822
|
-
person: "var(--color-purple)",
|
|
823
|
-
document: "var(--color-pink)",
|
|
824
|
-
deployment: "var(--color-ok)",
|
|
825
|
-
incident: "var(--color-warn)",
|
|
826
|
-
ticket: "var(--color-text-muted)"
|
|
827
|
-
};
|
|
828
896
|
var GraphNode = forwardRef15(function GraphNode2({ type, state = "default", glyph, label, size = 52, pathColor, className, style, ...props }, ref) {
|
|
829
|
-
const
|
|
897
|
+
const meta = getEntityTypeMeta(type);
|
|
898
|
+
const color = state === "path" ? pathColor ?? "var(--color-purple)" : meta.colorVar;
|
|
830
899
|
const glowPct = state === "hover" ? 50 : 25;
|
|
831
900
|
const opacity = state === "dim" ? 0.35 : 1;
|
|
832
901
|
const showRing = state === "selected" || state === "path";
|
|
@@ -857,7 +926,7 @@ var GraphNode = forwardRef15(function GraphNode2({ type, state = "default", glyp
|
|
|
857
926
|
outlineOffset: showRing ? 4 : void 0,
|
|
858
927
|
opacity
|
|
859
928
|
},
|
|
860
|
-
children: glyph ??
|
|
929
|
+
children: glyph ?? meta.glyph
|
|
861
930
|
}
|
|
862
931
|
),
|
|
863
932
|
label && /* @__PURE__ */ jsx15("span", { className: "text-text-dim font-mono text-[10px]", children: label })
|
|
@@ -902,8 +971,8 @@ var PathOverlay = forwardRef16(function PathOverlay2({ points, color = "var(--co
|
|
|
902
971
|
PathOverlay.displayName = "PathOverlay";
|
|
903
972
|
|
|
904
973
|
// src/marketing/CTAStrip.tsx
|
|
905
|
-
import { forwardRef as forwardRef17 } from "react";
|
|
906
974
|
import { cn as cn15 } from "@ship-it-ui/ui";
|
|
975
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
907
976
|
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
908
977
|
var CTAStrip = forwardRef17(function CTAStrip2({ title, description, actions, className, ...props }, ref) {
|
|
909
978
|
return /* @__PURE__ */ jsxs16(
|
|
@@ -927,8 +996,8 @@ var CTAStrip = forwardRef17(function CTAStrip2({ title, description, actions, cl
|
|
|
927
996
|
CTAStrip.displayName = "CTAStrip";
|
|
928
997
|
|
|
929
998
|
// src/marketing/FeatureGrid.tsx
|
|
930
|
-
import { forwardRef as forwardRef18 } from "react";
|
|
931
999
|
import { cn as cn16 } from "@ship-it-ui/ui";
|
|
1000
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
932
1001
|
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
933
1002
|
var colsClass = {
|
|
934
1003
|
2: "md:grid-cols-2",
|
|
@@ -953,8 +1022,8 @@ var FeatureGrid = forwardRef18(function FeatureGrid2({ features, columns = 3, cl
|
|
|
953
1022
|
FeatureGrid.displayName = "FeatureGrid";
|
|
954
1023
|
|
|
955
1024
|
// src/marketing/Footer.tsx
|
|
956
|
-
import { forwardRef as forwardRef19 } from "react";
|
|
957
1025
|
import { cn as cn17 } from "@ship-it-ui/ui";
|
|
1026
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
958
1027
|
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
959
1028
|
var Footer = forwardRef19(function Footer2({ brand, columns, copyright, closing, className, ...props }, ref) {
|
|
960
1029
|
return /* @__PURE__ */ jsxs18("footer", { ref, className: cn17("px-7 py-7", className), ...props, children: [
|
|
@@ -982,8 +1051,8 @@ var Footer = forwardRef19(function Footer2({ brand, columns, copyright, closing,
|
|
|
982
1051
|
Footer.displayName = "Footer";
|
|
983
1052
|
|
|
984
1053
|
// src/marketing/Hero.tsx
|
|
985
|
-
import { forwardRef as forwardRef20 } from "react";
|
|
986
1054
|
import { cn as cn18 } from "@ship-it-ui/ui";
|
|
1055
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
987
1056
|
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
988
1057
|
var Hero = forwardRef20(function Hero2({ eyebrow, title, description, actions, visual, className, ...props }, ref) {
|
|
989
1058
|
const hasVisual = visual != null;
|
|
@@ -1021,8 +1090,8 @@ var Hero = forwardRef20(function Hero2({ eyebrow, title, description, actions, v
|
|
|
1021
1090
|
Hero.displayName = "Hero";
|
|
1022
1091
|
|
|
1023
1092
|
// src/marketing/PricingCard.tsx
|
|
1024
|
-
import { forwardRef as forwardRef21 } from "react";
|
|
1025
1093
|
import { cn as cn19 } from "@ship-it-ui/ui";
|
|
1094
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
1026
1095
|
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1027
1096
|
var PricingCard = forwardRef21(function PricingCard2({ tier, price, priceUnit, description, features, action, featured, className, ...props }, ref) {
|
|
1028
1097
|
return /* @__PURE__ */ jsxs20(
|
|
@@ -1060,8 +1129,8 @@ PricingCard.displayName = "PricingCard";
|
|
|
1060
1129
|
|
|
1061
1130
|
// src/marketing/Testimonial.tsx
|
|
1062
1131
|
import { Avatar as Avatar2 } from "@ship-it-ui/ui";
|
|
1063
|
-
import { forwardRef as forwardRef22 } from "react";
|
|
1064
1132
|
import { cn as cn20 } from "@ship-it-ui/ui";
|
|
1133
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
1065
1134
|
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1066
1135
|
var Testimonial = forwardRef22(function Testimonial2({ quote, author, role, avatar, className, ...props }, ref) {
|
|
1067
1136
|
return /* @__PURE__ */ jsxs21(
|
|
@@ -1086,23 +1155,121 @@ var Testimonial = forwardRef22(function Testimonial2({ quote, author, role, avat
|
|
|
1086
1155
|
});
|
|
1087
1156
|
Testimonial.displayName = "Testimonial";
|
|
1088
1157
|
|
|
1158
|
+
// src/data/ConnectorCard.tsx
|
|
1159
|
+
import { IconGlyph } from "@ship-it-ui/icons";
|
|
1160
|
+
import { cn as cn21, formatRelative, StatusDot } from "@ship-it-ui/ui";
|
|
1161
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
1162
|
+
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1163
|
+
var statusDot = {
|
|
1164
|
+
connected: "ok",
|
|
1165
|
+
syncing: "sync",
|
|
1166
|
+
error: "err",
|
|
1167
|
+
disconnected: "off"
|
|
1168
|
+
};
|
|
1169
|
+
var statusLabel = {
|
|
1170
|
+
connected: "Connected",
|
|
1171
|
+
syncing: "Syncing",
|
|
1172
|
+
error: "Error",
|
|
1173
|
+
disconnected: "Disconnected"
|
|
1174
|
+
};
|
|
1175
|
+
var ConnectorCard = forwardRef23(function ConnectorCard2({
|
|
1176
|
+
connector,
|
|
1177
|
+
name,
|
|
1178
|
+
status,
|
|
1179
|
+
lastSyncedAt,
|
|
1180
|
+
relativeNow,
|
|
1181
|
+
summary,
|
|
1182
|
+
actions,
|
|
1183
|
+
onClick,
|
|
1184
|
+
accessibleName,
|
|
1185
|
+
className,
|
|
1186
|
+
...props
|
|
1187
|
+
}, ref) {
|
|
1188
|
+
const interactive = typeof onClick === "function";
|
|
1189
|
+
const time = lastSyncedAt ? formatRelative(lastSyncedAt, relativeNow ?? /* @__PURE__ */ new Date()) : "";
|
|
1190
|
+
const labelBlock = /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
1191
|
+
/* @__PURE__ */ jsx23(
|
|
1192
|
+
"span",
|
|
1193
|
+
{
|
|
1194
|
+
"aria-hidden": true,
|
|
1195
|
+
className: "bg-panel-2 grid h-10 w-10 shrink-0 place-items-center rounded-md font-mono text-[16px]",
|
|
1196
|
+
children: /* @__PURE__ */ jsx23(IconGlyph, { name: connector, kind: "connector" })
|
|
1197
|
+
}
|
|
1198
|
+
),
|
|
1199
|
+
/* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
|
|
1200
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", children: [
|
|
1201
|
+
/* @__PURE__ */ jsx23("span", { className: "truncate text-[14px] font-medium", children: name }),
|
|
1202
|
+
/* @__PURE__ */ jsx23(
|
|
1203
|
+
StatusDot,
|
|
1204
|
+
{
|
|
1205
|
+
state: statusDot[status],
|
|
1206
|
+
pulse: status === "syncing",
|
|
1207
|
+
label: statusLabel[status]
|
|
1208
|
+
}
|
|
1209
|
+
)
|
|
1210
|
+
] }),
|
|
1211
|
+
(summary || time) && /* @__PURE__ */ jsxs22("div", { className: "text-text-muted mt-[2px] flex items-center gap-2 text-[12px]", children: [
|
|
1212
|
+
summary && /* @__PURE__ */ jsx23("span", { className: "truncate", children: summary }),
|
|
1213
|
+
summary && time && /* @__PURE__ */ jsx23("span", { "aria-hidden": true, className: "text-text-dim", children: "\xB7" }),
|
|
1214
|
+
time && /* @__PURE__ */ jsxs22("time", { className: "text-text-dim font-mono text-[11px]", children: [
|
|
1215
|
+
"last synced ",
|
|
1216
|
+
time
|
|
1217
|
+
] })
|
|
1218
|
+
] })
|
|
1219
|
+
] })
|
|
1220
|
+
] });
|
|
1221
|
+
const labelRegionClass = cn21(
|
|
1222
|
+
"flex flex-1 items-start gap-3 rounded-md p-1 text-left transition-colors duration-(--duration-micro)",
|
|
1223
|
+
interactive && "hover:bg-panel-2 focus-visible:ring-accent-dim cursor-pointer outline-none focus-visible:ring-[3px]"
|
|
1224
|
+
);
|
|
1225
|
+
const labelRegion = interactive ? /* @__PURE__ */ jsx23(
|
|
1226
|
+
"button",
|
|
1227
|
+
{
|
|
1228
|
+
type: "button",
|
|
1229
|
+
onClick,
|
|
1230
|
+
"aria-label": accessibleName ?? (typeof name === "string" ? `${name} connector` : statusLabel[status]),
|
|
1231
|
+
className: labelRegionClass,
|
|
1232
|
+
children: labelBlock
|
|
1233
|
+
}
|
|
1234
|
+
) : /* @__PURE__ */ jsx23("div", { className: labelRegionClass, children: labelBlock });
|
|
1235
|
+
return /* @__PURE__ */ jsxs22(
|
|
1236
|
+
"div",
|
|
1237
|
+
{
|
|
1238
|
+
ref,
|
|
1239
|
+
className: cn21(
|
|
1240
|
+
"rounded-base border-border bg-panel flex items-start gap-2 border p-3",
|
|
1241
|
+
className
|
|
1242
|
+
),
|
|
1243
|
+
...props,
|
|
1244
|
+
children: [
|
|
1245
|
+
labelRegion,
|
|
1246
|
+
actions && /* @__PURE__ */ jsx23("div", { className: "shrink-0 self-center pr-1", children: actions })
|
|
1247
|
+
]
|
|
1248
|
+
}
|
|
1249
|
+
);
|
|
1250
|
+
});
|
|
1251
|
+
ConnectorCard.displayName = "ConnectorCard";
|
|
1252
|
+
|
|
1089
1253
|
// src/data/EntityTable.tsx
|
|
1090
1254
|
import { DataTable } from "@ship-it-ui/ui";
|
|
1091
1255
|
import "react";
|
|
1092
|
-
import { jsx as
|
|
1256
|
+
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1093
1257
|
function EntityTable(props) {
|
|
1094
1258
|
const { rowKey, ...rest } = props;
|
|
1095
|
-
return /* @__PURE__ */
|
|
1259
|
+
return /* @__PURE__ */ jsx24(DataTable, { ...rest, rowKey: rowKey ?? ((row) => row.id) });
|
|
1096
1260
|
}
|
|
1097
1261
|
function entityColumn(options = {}) {
|
|
1098
1262
|
return {
|
|
1099
1263
|
key: options.key ?? "name",
|
|
1100
1264
|
header: options.header ?? "Name",
|
|
1101
1265
|
accessor: (row) => row.name,
|
|
1102
|
-
cell: (row) =>
|
|
1103
|
-
|
|
1104
|
-
row.
|
|
1105
|
-
|
|
1266
|
+
cell: (row) => {
|
|
1267
|
+
const meta = getEntityTypeMeta(row.type);
|
|
1268
|
+
return /* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-2 font-mono", "data-entity-type": row.type, children: [
|
|
1269
|
+
/* @__PURE__ */ jsx24("span", { "aria-hidden": true, className: meta.toneClass, children: meta.glyph }),
|
|
1270
|
+
row.name
|
|
1271
|
+
] });
|
|
1272
|
+
}
|
|
1106
1273
|
};
|
|
1107
1274
|
}
|
|
1108
1275
|
function entityTypeColumn(options = {}) {
|
|
@@ -1110,7 +1277,7 @@ function entityTypeColumn(options = {}) {
|
|
|
1110
1277
|
key: options.key ?? "type",
|
|
1111
1278
|
header: options.header ?? "Type",
|
|
1112
1279
|
accessor: (row) => row.type,
|
|
1113
|
-
cell: (row) => /* @__PURE__ */
|
|
1280
|
+
cell: (row) => /* @__PURE__ */ jsx24(EntityBadge, { type: row.type, size: "sm" })
|
|
1114
1281
|
};
|
|
1115
1282
|
}
|
|
1116
1283
|
export {
|
|
@@ -1118,6 +1285,7 @@ export {
|
|
|
1118
1285
|
CTAStrip,
|
|
1119
1286
|
Citation,
|
|
1120
1287
|
ConfidenceIndicator,
|
|
1288
|
+
ConnectorCard,
|
|
1121
1289
|
CopilotMessage,
|
|
1122
1290
|
ENTITY_GLYPH,
|
|
1123
1291
|
ENTITY_LABEL,
|
|
@@ -1144,8 +1312,13 @@ export {
|
|
|
1144
1312
|
SuggestionChip,
|
|
1145
1313
|
Testimonial,
|
|
1146
1314
|
ToolCallCard,
|
|
1147
|
-
|
|
1315
|
+
cn22 as cn,
|
|
1148
1316
|
entityColumn,
|
|
1149
|
-
entityTypeColumn
|
|
1317
|
+
entityTypeColumn,
|
|
1318
|
+
getEntityTypeMeta,
|
|
1319
|
+
listEntityTypes,
|
|
1320
|
+
registerEntityType,
|
|
1321
|
+
registerEntityTypes,
|
|
1322
|
+
resetEntityTypeRegistry
|
|
1150
1323
|
};
|
|
1151
1324
|
//# sourceMappingURL=index.js.map
|