@ship-it-ui/shipit 0.0.3 → 0.0.5
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 +424 -112
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +167 -12
- package/dist/index.d.ts +167 -12
- package/dist/index.js +416 -111
- 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 cn23 } 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,
|
|
@@ -21,10 +21,12 @@ var AskBar = forwardRef(function AskBar2({
|
|
|
21
21
|
submitLabel = "Ask",
|
|
22
22
|
disabled,
|
|
23
23
|
maxWidth = 620,
|
|
24
|
+
density = "comfortable",
|
|
24
25
|
className,
|
|
25
26
|
children,
|
|
26
27
|
...props
|
|
27
28
|
}, ref) {
|
|
29
|
+
const isTouch = density === "touch";
|
|
28
30
|
const [value, setValue] = useControllableState({
|
|
29
31
|
value: valueProp,
|
|
30
32
|
defaultValue: defaultValue ?? "",
|
|
@@ -52,16 +54,17 @@ var AskBar = forwardRef(function AskBar2({
|
|
|
52
54
|
ref,
|
|
53
55
|
role: "search",
|
|
54
56
|
onSubmit: handleSubmit,
|
|
55
|
-
style: { maxWidth },
|
|
57
|
+
style: { maxWidth: isTouch ? void 0 : maxWidth },
|
|
56
58
|
className: cn(
|
|
57
|
-
"border-border-strong bg-panel w-full
|
|
59
|
+
"border-border-strong bg-panel w-full border",
|
|
60
|
+
isTouch ? "rounded-m-card p-3" : "rounded-xl p-[14px] shadow",
|
|
58
61
|
"focus-within:border-accent focus-within:ring-accent-dim focus-within:ring-[3px]",
|
|
59
62
|
className
|
|
60
63
|
),
|
|
61
64
|
...props,
|
|
62
65
|
children: [
|
|
63
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
64
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-accent text-[16px]", children: "\u2726" }),
|
|
66
|
+
/* @__PURE__ */ jsxs("div", { className: cn("flex items-start gap-[10px]", isTouch ? "mb-2" : "mb-[10px]"), children: [
|
|
67
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("text-accent", isTouch ? "text-[18px]" : "text-[16px]"), children: "\u2726" }),
|
|
65
68
|
/* @__PURE__ */ jsx(
|
|
66
69
|
"textarea",
|
|
67
70
|
{
|
|
@@ -73,8 +76,9 @@ var AskBar = forwardRef(function AskBar2({
|
|
|
73
76
|
"aria-label": placeholder,
|
|
74
77
|
rows: 1,
|
|
75
78
|
className: cn(
|
|
76
|
-
"text-text flex-1 resize-none border-0 bg-transparent
|
|
77
|
-
"placeholder:text-text-dim"
|
|
79
|
+
"text-text flex-1 resize-none border-0 bg-transparent leading-[1.5] outline-none",
|
|
80
|
+
"placeholder:text-text-dim",
|
|
81
|
+
isTouch ? "text-m-body" : "text-[14px]"
|
|
78
82
|
)
|
|
79
83
|
}
|
|
80
84
|
),
|
|
@@ -82,19 +86,23 @@ var AskBar = forwardRef(function AskBar2({
|
|
|
82
86
|
"span",
|
|
83
87
|
{
|
|
84
88
|
"aria-hidden": true,
|
|
85
|
-
className:
|
|
89
|
+
className: cn(
|
|
90
|
+
"bg-accent mt-[3px] inline-block w-px animate-[ship-pulse_1s_infinite]",
|
|
91
|
+
isTouch ? "h-5" : "h-4"
|
|
92
|
+
)
|
|
86
93
|
}
|
|
87
94
|
)
|
|
88
95
|
] }),
|
|
89
96
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-[6px]", children: [
|
|
90
97
|
children,
|
|
91
98
|
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
92
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-text-dim font-mono text-[11px]", children: "\u2318\u21B5" }),
|
|
99
|
+
!isTouch && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-text-dim font-mono text-[11px]", children: "\u2318\u21B5" }),
|
|
93
100
|
/* @__PURE__ */ jsx(
|
|
94
101
|
Button,
|
|
95
102
|
{
|
|
96
103
|
type: "submit",
|
|
97
|
-
size: "sm",
|
|
104
|
+
size: isTouch ? "md" : "sm",
|
|
105
|
+
density: isTouch ? "touch" : void 0,
|
|
98
106
|
variant: "primary",
|
|
99
107
|
disabled: disabled || !(value ?? "").trim(),
|
|
100
108
|
children: submitLabel
|
|
@@ -109,8 +117,8 @@ var AskBar = forwardRef(function AskBar2({
|
|
|
109
117
|
AskBar.displayName = "AskBar";
|
|
110
118
|
|
|
111
119
|
// src/ai/Citation.tsx
|
|
112
|
-
import { forwardRef as forwardRef2 } from "react";
|
|
113
120
|
import { cn as cn2 } from "@ship-it-ui/ui";
|
|
121
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
114
122
|
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
115
123
|
var SUPERSCRIPTS = ["\u2070", "\xB9", "\xB2", "\xB3", "\u2074", "\u2075", "\u2076", "\u2077", "\u2078", "\u2079"];
|
|
116
124
|
function toSuperscript(n) {
|
|
@@ -151,8 +159,8 @@ var Citation = forwardRef2(function Citation2({ index, source, meta, inline, cla
|
|
|
151
159
|
Citation.displayName = "Citation";
|
|
152
160
|
|
|
153
161
|
// src/ai/ConfidenceIndicator.tsx
|
|
154
|
-
import { forwardRef as forwardRef3 } from "react";
|
|
155
162
|
import { cn as cn3 } from "@ship-it-ui/ui";
|
|
163
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
156
164
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
157
165
|
var tierLabel = {
|
|
158
166
|
high: "High",
|
|
@@ -220,12 +228,53 @@ ConfidenceIndicator.displayName = "ConfidenceIndicator";
|
|
|
220
228
|
|
|
221
229
|
// src/ai/CopilotMessage.tsx
|
|
222
230
|
import { Avatar } from "@ship-it-ui/ui";
|
|
223
|
-
import { forwardRef as forwardRef4 } from "react";
|
|
224
231
|
import { cn as cn4 } from "@ship-it-ui/ui";
|
|
232
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
225
233
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
226
234
|
var CopilotMessage = forwardRef4(
|
|
227
|
-
function CopilotMessage2({ role, avatar, streaming, className, children, ...props }, ref) {
|
|
235
|
+
function CopilotMessage2({ role, avatar, streaming, density = "comfortable", className, children, ...props }, ref) {
|
|
228
236
|
const isAssistant = role === "assistant";
|
|
237
|
+
const isTouch = density === "touch";
|
|
238
|
+
if (isTouch) {
|
|
239
|
+
return /* @__PURE__ */ jsxs4(
|
|
240
|
+
"div",
|
|
241
|
+
{
|
|
242
|
+
ref,
|
|
243
|
+
className: cn4(
|
|
244
|
+
"flex flex-col gap-[6px]",
|
|
245
|
+
isAssistant ? "items-start" : "items-end",
|
|
246
|
+
className
|
|
247
|
+
),
|
|
248
|
+
"data-role": role,
|
|
249
|
+
...props,
|
|
250
|
+
children: [
|
|
251
|
+
isAssistant && /* @__PURE__ */ jsxs4("div", { className: "text-m-eyebrow text-accent inline-flex items-center gap-[6px] font-mono tracking-wide uppercase", children: [
|
|
252
|
+
/* @__PURE__ */ jsx4("span", { "aria-hidden": true, children: "\u2726" }),
|
|
253
|
+
streaming ? "thinking" : "ShipIt"
|
|
254
|
+
] }),
|
|
255
|
+
/* @__PURE__ */ jsxs4(
|
|
256
|
+
"div",
|
|
257
|
+
{
|
|
258
|
+
className: cn4(
|
|
259
|
+
"rounded-m-card text-m-body max-w-[85%] px-[14px] py-3 leading-normal",
|
|
260
|
+
isAssistant ? "bg-panel border-border border" : "bg-accent text-on-accent"
|
|
261
|
+
),
|
|
262
|
+
children: [
|
|
263
|
+
children,
|
|
264
|
+
streaming && /* @__PURE__ */ jsx4(
|
|
265
|
+
"span",
|
|
266
|
+
{
|
|
267
|
+
"aria-hidden": true,
|
|
268
|
+
className: "bg-accent ml-[2px] inline-block h-4 w-px animate-[ship-pulse_1s_infinite] align-middle"
|
|
269
|
+
}
|
|
270
|
+
)
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
);
|
|
277
|
+
}
|
|
229
278
|
return /* @__PURE__ */ jsxs4(
|
|
230
279
|
"div",
|
|
231
280
|
{
|
|
@@ -270,8 +319,8 @@ CopilotMessage.displayName = "CopilotMessage";
|
|
|
270
319
|
|
|
271
320
|
// src/ai/ReasoningBlock.tsx
|
|
272
321
|
import { useControllableState as useControllableState2 } from "@ship-it-ui/ui";
|
|
273
|
-
import { Children, forwardRef as forwardRef5 } from "react";
|
|
274
322
|
import { cn as cn5 } from "@ship-it-ui/ui";
|
|
323
|
+
import { Children, forwardRef as forwardRef5 } from "react";
|
|
275
324
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
276
325
|
var ReasoningBlock = forwardRef5(
|
|
277
326
|
function ReasoningBlock2({
|
|
@@ -332,8 +381,8 @@ var ReasoningStep = forwardRef5(function ReasoningStep2({ step, className, child
|
|
|
332
381
|
ReasoningStep.displayName = "ReasoningStep";
|
|
333
382
|
|
|
334
383
|
// src/ai/SuggestionChip.tsx
|
|
335
|
-
import { forwardRef as forwardRef6 } from "react";
|
|
336
384
|
import { cn as cn6 } from "@ship-it-ui/ui";
|
|
385
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
337
386
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
338
387
|
var SuggestionChip = forwardRef6(
|
|
339
388
|
function SuggestionChip2({ glyph = "\u2726", className, children, type, ...props }, ref) {
|
|
@@ -362,8 +411,8 @@ SuggestionChip.displayName = "SuggestionChip";
|
|
|
362
411
|
|
|
363
412
|
// src/ai/ToolCallCard.tsx
|
|
364
413
|
import { Badge } from "@ship-it-ui/ui";
|
|
365
|
-
import { forwardRef as forwardRef7 } from "react";
|
|
366
414
|
import { cn as cn7 } from "@ship-it-ui/ui";
|
|
415
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
367
416
|
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
368
417
|
var ToolCallCard = forwardRef7(function ToolCallCard2({ name, status, running, className, children, ...props }, ref) {
|
|
369
418
|
return /* @__PURE__ */ jsxs7(
|
|
@@ -396,64 +445,140 @@ ToolCallCard.displayName = "ToolCallCard";
|
|
|
396
445
|
|
|
397
446
|
// src/entity/EntityBadge.tsx
|
|
398
447
|
import { Badge as Badge2 } from "@ship-it-ui/ui";
|
|
399
|
-
import { forwardRef as forwardRef8 } from "react";
|
|
400
448
|
import { cn as cn8 } from "@ship-it-ui/ui";
|
|
449
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
401
450
|
|
|
402
451
|
// src/entity/types.ts
|
|
452
|
+
var BUILTIN_META = {
|
|
453
|
+
service: {
|
|
454
|
+
glyph: "\u25C7",
|
|
455
|
+
label: "Service",
|
|
456
|
+
toneClass: "text-accent",
|
|
457
|
+
toneBg: "bg-accent-dim",
|
|
458
|
+
colorVar: "var(--color-accent)",
|
|
459
|
+
badgeVariant: "accent"
|
|
460
|
+
},
|
|
461
|
+
person: {
|
|
462
|
+
glyph: "\u25CB",
|
|
463
|
+
label: "Person",
|
|
464
|
+
toneClass: "text-text-muted",
|
|
465
|
+
toneBg: "bg-panel-2",
|
|
466
|
+
colorVar: "var(--color-purple)",
|
|
467
|
+
badgeVariant: "neutral"
|
|
468
|
+
},
|
|
469
|
+
document: {
|
|
470
|
+
glyph: "\u25A4",
|
|
471
|
+
label: "Document",
|
|
472
|
+
toneClass: "text-purple",
|
|
473
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-purple),transparent_85%)]",
|
|
474
|
+
colorVar: "var(--color-pink)",
|
|
475
|
+
badgeVariant: "purple"
|
|
476
|
+
},
|
|
477
|
+
deployment: {
|
|
478
|
+
glyph: "\u2191",
|
|
479
|
+
label: "Deployment",
|
|
480
|
+
toneClass: "text-ok",
|
|
481
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-ok),transparent_85%)]",
|
|
482
|
+
colorVar: "var(--color-ok)",
|
|
483
|
+
badgeVariant: "ok"
|
|
484
|
+
},
|
|
485
|
+
incident: {
|
|
486
|
+
glyph: "\u25CE",
|
|
487
|
+
label: "Incident",
|
|
488
|
+
toneClass: "text-err",
|
|
489
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-err),transparent_85%)]",
|
|
490
|
+
colorVar: "var(--color-warn)",
|
|
491
|
+
badgeVariant: "err"
|
|
492
|
+
},
|
|
493
|
+
ticket: {
|
|
494
|
+
glyph: "\u25A2",
|
|
495
|
+
label: "Ticket",
|
|
496
|
+
toneClass: "text-warn",
|
|
497
|
+
toneBg: "bg-[color-mix(in_oklab,var(--color-warn),transparent_85%)]",
|
|
498
|
+
colorVar: "var(--color-text-muted)",
|
|
499
|
+
badgeVariant: "warn"
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
var FALLBACK = BUILTIN_META.service;
|
|
503
|
+
var registry = new Map(Object.entries(BUILTIN_META));
|
|
504
|
+
function registerEntityType(type, meta) {
|
|
505
|
+
registry.set(type, meta);
|
|
506
|
+
return meta;
|
|
507
|
+
}
|
|
508
|
+
function registerEntityTypes(map) {
|
|
509
|
+
for (const [key, meta] of Object.entries(map)) {
|
|
510
|
+
registry.set(key, meta);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
function getEntityTypeMeta(type) {
|
|
514
|
+
return registry.get(type) ?? FALLBACK;
|
|
515
|
+
}
|
|
516
|
+
function listEntityTypes() {
|
|
517
|
+
return Array.from(registry.entries());
|
|
518
|
+
}
|
|
519
|
+
function resetEntityTypeRegistry() {
|
|
520
|
+
registry.clear();
|
|
521
|
+
for (const key of Object.keys(BUILTIN_META)) {
|
|
522
|
+
registry.set(key, BUILTIN_META[key]);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
403
525
|
var ENTITY_GLYPH = {
|
|
404
|
-
service:
|
|
405
|
-
person:
|
|
406
|
-
document:
|
|
407
|
-
deployment:
|
|
408
|
-
incident:
|
|
409
|
-
ticket:
|
|
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
|
|
410
532
|
};
|
|
411
533
|
var ENTITY_LABEL = {
|
|
412
|
-
service:
|
|
413
|
-
person:
|
|
414
|
-
document:
|
|
415
|
-
deployment:
|
|
416
|
-
incident:
|
|
417
|
-
ticket:
|
|
534
|
+
service: BUILTIN_META.service.label,
|
|
535
|
+
person: BUILTIN_META.person.label,
|
|
536
|
+
document: BUILTIN_META.document.label,
|
|
537
|
+
deployment: BUILTIN_META.deployment.label,
|
|
538
|
+
incident: BUILTIN_META.incident.label,
|
|
539
|
+
ticket: BUILTIN_META.ticket.label
|
|
418
540
|
};
|
|
419
541
|
var ENTITY_TONE_CLASS = {
|
|
420
|
-
service:
|
|
421
|
-
person:
|
|
422
|
-
document:
|
|
423
|
-
deployment:
|
|
424
|
-
incident:
|
|
425
|
-
ticket:
|
|
542
|
+
service: BUILTIN_META.service.toneClass,
|
|
543
|
+
person: BUILTIN_META.person.toneClass,
|
|
544
|
+
document: BUILTIN_META.document.toneClass,
|
|
545
|
+
deployment: BUILTIN_META.deployment.toneClass,
|
|
546
|
+
incident: BUILTIN_META.incident.toneClass,
|
|
547
|
+
ticket: BUILTIN_META.ticket.toneClass
|
|
426
548
|
};
|
|
427
549
|
var ENTITY_TONE_BG = {
|
|
428
|
-
service:
|
|
429
|
-
person:
|
|
430
|
-
document:
|
|
431
|
-
deployment:
|
|
432
|
-
incident:
|
|
433
|
-
ticket:
|
|
550
|
+
service: BUILTIN_META.service.toneBg,
|
|
551
|
+
person: BUILTIN_META.person.toneBg,
|
|
552
|
+
document: BUILTIN_META.document.toneBg,
|
|
553
|
+
deployment: BUILTIN_META.deployment.toneBg,
|
|
554
|
+
incident: BUILTIN_META.incident.toneBg,
|
|
555
|
+
ticket: BUILTIN_META.ticket.toneBg
|
|
434
556
|
};
|
|
435
557
|
|
|
436
558
|
// src/entity/EntityBadge.tsx
|
|
437
559
|
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
560
|
var EntityBadge = forwardRef8(function EntityBadge2({ type, label, hideGlyph, className, children, ...props }, ref) {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
561
|
+
const meta = getEntityTypeMeta(type);
|
|
562
|
+
return /* @__PURE__ */ jsxs8(
|
|
563
|
+
Badge2,
|
|
564
|
+
{
|
|
565
|
+
ref,
|
|
566
|
+
variant: meta.badgeVariant,
|
|
567
|
+
"data-entity-type": type,
|
|
568
|
+
className: cn8(className),
|
|
569
|
+
...props,
|
|
570
|
+
children: [
|
|
571
|
+
!hideGlyph && /* @__PURE__ */ jsx8("span", { "aria-hidden": true, className: "font-mono", children: meta.glyph }),
|
|
572
|
+
children ?? label ?? meta.label
|
|
573
|
+
]
|
|
574
|
+
}
|
|
575
|
+
);
|
|
451
576
|
});
|
|
452
577
|
EntityBadge.displayName = "EntityBadge";
|
|
453
578
|
|
|
454
579
|
// src/entity/EntityCard.tsx
|
|
455
|
-
import { forwardRef as forwardRef9 } from "react";
|
|
456
580
|
import { cn as cn9 } from "@ship-it-ui/ui";
|
|
581
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
457
582
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
458
583
|
var statToneClass = {
|
|
459
584
|
accent: "text-accent",
|
|
@@ -463,10 +588,12 @@ var statToneClass = {
|
|
|
463
588
|
muted: "text-text-muted"
|
|
464
589
|
};
|
|
465
590
|
var EntityCard = forwardRef9(function EntityCard2({ type, title, subtitle, description, stats, actions, glyph, className, ...props }, ref) {
|
|
591
|
+
const meta = getEntityTypeMeta(type);
|
|
466
592
|
return /* @__PURE__ */ jsxs9(
|
|
467
593
|
"div",
|
|
468
594
|
{
|
|
469
595
|
ref,
|
|
596
|
+
"data-entity-type": type,
|
|
470
597
|
className: cn9(
|
|
471
598
|
"rounded-base border-border bg-panel flex flex-col gap-3 border p-5",
|
|
472
599
|
className
|
|
@@ -480,10 +607,10 @@ var EntityCard = forwardRef9(function EntityCard2({ type, title, subtitle, descr
|
|
|
480
607
|
"aria-hidden": true,
|
|
481
608
|
className: cn9(
|
|
482
609
|
"rounded-base grid h-12 w-12 shrink-0 place-items-center text-[20px]",
|
|
483
|
-
|
|
484
|
-
|
|
610
|
+
meta.toneBg,
|
|
611
|
+
meta.toneClass
|
|
485
612
|
),
|
|
486
|
-
children: glyph ??
|
|
613
|
+
children: glyph ?? meta.glyph
|
|
487
614
|
}
|
|
488
615
|
),
|
|
489
616
|
/* @__PURE__ */ jsxs9("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -523,10 +650,10 @@ var EntityCard = forwardRef9(function EntityCard2({ type, title, subtitle, descr
|
|
|
523
650
|
EntityCard.displayName = "EntityCard";
|
|
524
651
|
|
|
525
652
|
// src/entity/EntityListRow.tsx
|
|
653
|
+
import { cn as cn10 } from "@ship-it-ui/ui";
|
|
526
654
|
import {
|
|
527
655
|
forwardRef as forwardRef10
|
|
528
656
|
} from "react";
|
|
529
|
-
import { cn as cn10 } from "@ship-it-ui/ui";
|
|
530
657
|
import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
531
658
|
var baseClassNames = (interactive, className) => cn10(
|
|
532
659
|
"flex w-full items-center gap-3 border-0 bg-transparent px-2 py-2 text-left",
|
|
@@ -541,15 +668,9 @@ function RowInner({
|
|
|
541
668
|
meta,
|
|
542
669
|
hideGlyph
|
|
543
670
|
}) {
|
|
671
|
+
const typeMeta = getEntityTypeMeta(type);
|
|
544
672
|
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
|
-
),
|
|
673
|
+
!hideGlyph && /* @__PURE__ */ jsx10("span", { "aria-hidden": true, className: cn10("font-mono text-[14px] leading-none", typeMeta.toneClass), children: typeMeta.glyph }),
|
|
553
674
|
/* @__PURE__ */ jsx10("span", { className: "text-text min-w-0 flex-1 truncate font-mono text-[12px]", children: name }),
|
|
554
675
|
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
676
|
meta && /* @__PURE__ */ jsx10("span", { className: "text-text-dim font-mono text-[10px]", children: meta })
|
|
@@ -557,7 +678,16 @@ function RowInner({
|
|
|
557
678
|
}
|
|
558
679
|
var EntityListRowDiv = forwardRef10(
|
|
559
680
|
function EntityListRowDiv2({ type, name, relation, meta, hideGlyph, className, ...props }, ref) {
|
|
560
|
-
return /* @__PURE__ */ jsx10(
|
|
681
|
+
return /* @__PURE__ */ jsx10(
|
|
682
|
+
"div",
|
|
683
|
+
{
|
|
684
|
+
ref,
|
|
685
|
+
"data-entity-type": type,
|
|
686
|
+
className: baseClassNames(false, className),
|
|
687
|
+
...props,
|
|
688
|
+
children: /* @__PURE__ */ jsx10(RowInner, { type, name, relation, meta, hideGlyph })
|
|
689
|
+
}
|
|
690
|
+
);
|
|
561
691
|
}
|
|
562
692
|
);
|
|
563
693
|
EntityListRowDiv.displayName = "EntityListRowDiv";
|
|
@@ -568,6 +698,7 @@ var EntityListRowButton = forwardRef10(
|
|
|
568
698
|
{
|
|
569
699
|
ref,
|
|
570
700
|
type: "button",
|
|
701
|
+
"data-entity-type": type,
|
|
571
702
|
onClick,
|
|
572
703
|
className: baseClassNames(true, className),
|
|
573
704
|
...props,
|
|
@@ -653,8 +784,8 @@ var GraphEdge = forwardRef11(function GraphEdge2({ x1, y1, x2, y2, curve, edgeSt
|
|
|
653
784
|
GraphEdge.displayName = "GraphEdge";
|
|
654
785
|
|
|
655
786
|
// src/graph/GraphInspector.tsx
|
|
656
|
-
import { forwardRef as forwardRef12 } from "react";
|
|
657
787
|
import { cn as cn11 } from "@ship-it-ui/ui";
|
|
788
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
658
789
|
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
659
790
|
var GraphInspector = forwardRef12(
|
|
660
791
|
function GraphInspector2({
|
|
@@ -720,21 +851,13 @@ var GraphInspector = forwardRef12(
|
|
|
720
851
|
GraphInspector.displayName = "GraphInspector";
|
|
721
852
|
|
|
722
853
|
// src/graph/GraphLegend.tsx
|
|
723
|
-
import { forwardRef as forwardRef13 } from "react";
|
|
724
854
|
import { cn as cn12 } from "@ship-it-ui/ui";
|
|
855
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
725
856
|
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
857
|
var DEFAULT_ENTRIES = [
|
|
735
|
-
{ type: "service"
|
|
736
|
-
{ type: "person"
|
|
737
|
-
{ type: "document"
|
|
858
|
+
{ type: "service" },
|
|
859
|
+
{ type: "person" },
|
|
860
|
+
{ type: "document" }
|
|
738
861
|
];
|
|
739
862
|
var GraphLegend = forwardRef13(function GraphLegend2({ entries = DEFAULT_ENTRIES, heading = "Legend", className, children, ...props }, ref) {
|
|
740
863
|
return /* @__PURE__ */ jsxs12(
|
|
@@ -749,10 +872,12 @@ var GraphLegend = forwardRef13(function GraphLegend2({ entries = DEFAULT_ENTRIES
|
|
|
749
872
|
children: [
|
|
750
873
|
heading && /* @__PURE__ */ jsx13("div", { className: "text-text-dim font-mono text-[9px] tracking-[1.4px] uppercase", children: heading }),
|
|
751
874
|
children ?? entries.map((entry, i) => {
|
|
752
|
-
const
|
|
875
|
+
const meta = entry.type ? getEntityTypeMeta(entry.type) : void 0;
|
|
876
|
+
const color = entry.color ?? meta?.colorVar ?? "currentColor";
|
|
877
|
+
const label = entry.label ?? meta?.label ?? "";
|
|
753
878
|
return /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-[6px]", children: [
|
|
754
879
|
/* @__PURE__ */ jsx13("span", { "aria-hidden": true, className: "h-2 w-2 rounded-full", style: { background: color } }),
|
|
755
|
-
/* @__PURE__ */ jsx13("span", { children:
|
|
880
|
+
/* @__PURE__ */ jsx13("span", { children: label })
|
|
756
881
|
] }, i);
|
|
757
882
|
})
|
|
758
883
|
]
|
|
@@ -762,8 +887,8 @@ var GraphLegend = forwardRef13(function GraphLegend2({ entries = DEFAULT_ENTRIES
|
|
|
762
887
|
GraphLegend.displayName = "GraphLegend";
|
|
763
888
|
|
|
764
889
|
// src/graph/GraphMinimap.tsx
|
|
765
|
-
import { forwardRef as forwardRef14 } from "react";
|
|
766
890
|
import { cn as cn13 } from "@ship-it-ui/ui";
|
|
891
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
767
892
|
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
768
893
|
var GraphMinimap = forwardRef14(function GraphMinimap2({ points, viewport, width = 120, height = 72, className, ...props }, ref) {
|
|
769
894
|
return /* @__PURE__ */ jsx14(
|
|
@@ -814,19 +939,12 @@ var GraphMinimap = forwardRef14(function GraphMinimap2({ points, viewport, width
|
|
|
814
939
|
GraphMinimap.displayName = "GraphMinimap";
|
|
815
940
|
|
|
816
941
|
// src/graph/GraphNode.tsx
|
|
817
|
-
import { forwardRef as forwardRef15 } from "react";
|
|
818
942
|
import { cn as cn14 } from "@ship-it-ui/ui";
|
|
943
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
819
944
|
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
945
|
var GraphNode = forwardRef15(function GraphNode2({ type, state = "default", glyph, label, size = 52, pathColor, className, style, ...props }, ref) {
|
|
829
|
-
const
|
|
946
|
+
const meta = getEntityTypeMeta(type);
|
|
947
|
+
const color = state === "path" ? pathColor ?? "var(--color-purple)" : meta.colorVar;
|
|
830
948
|
const glowPct = state === "hover" ? 50 : 25;
|
|
831
949
|
const opacity = state === "dim" ? 0.35 : 1;
|
|
832
950
|
const showRing = state === "selected" || state === "path";
|
|
@@ -857,7 +975,7 @@ var GraphNode = forwardRef15(function GraphNode2({ type, state = "default", glyp
|
|
|
857
975
|
outlineOffset: showRing ? 4 : void 0,
|
|
858
976
|
opacity
|
|
859
977
|
},
|
|
860
|
-
children: glyph ??
|
|
978
|
+
children: glyph ?? meta.glyph
|
|
861
979
|
}
|
|
862
980
|
),
|
|
863
981
|
label && /* @__PURE__ */ jsx15("span", { className: "text-text-dim font-mono text-[10px]", children: label })
|
|
@@ -902,8 +1020,8 @@ var PathOverlay = forwardRef16(function PathOverlay2({ points, color = "var(--co
|
|
|
902
1020
|
PathOverlay.displayName = "PathOverlay";
|
|
903
1021
|
|
|
904
1022
|
// src/marketing/CTAStrip.tsx
|
|
905
|
-
import { forwardRef as forwardRef17 } from "react";
|
|
906
1023
|
import { cn as cn15 } from "@ship-it-ui/ui";
|
|
1024
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
907
1025
|
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
908
1026
|
var CTAStrip = forwardRef17(function CTAStrip2({ title, description, actions, className, ...props }, ref) {
|
|
909
1027
|
return /* @__PURE__ */ jsxs16(
|
|
@@ -927,8 +1045,8 @@ var CTAStrip = forwardRef17(function CTAStrip2({ title, description, actions, cl
|
|
|
927
1045
|
CTAStrip.displayName = "CTAStrip";
|
|
928
1046
|
|
|
929
1047
|
// src/marketing/FeatureGrid.tsx
|
|
930
|
-
import { forwardRef as forwardRef18 } from "react";
|
|
931
1048
|
import { cn as cn16 } from "@ship-it-ui/ui";
|
|
1049
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
932
1050
|
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
933
1051
|
var colsClass = {
|
|
934
1052
|
2: "md:grid-cols-2",
|
|
@@ -953,8 +1071,8 @@ var FeatureGrid = forwardRef18(function FeatureGrid2({ features, columns = 3, cl
|
|
|
953
1071
|
FeatureGrid.displayName = "FeatureGrid";
|
|
954
1072
|
|
|
955
1073
|
// src/marketing/Footer.tsx
|
|
956
|
-
import { forwardRef as forwardRef19 } from "react";
|
|
957
1074
|
import { cn as cn17 } from "@ship-it-ui/ui";
|
|
1075
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
958
1076
|
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
959
1077
|
var Footer = forwardRef19(function Footer2({ brand, columns, copyright, closing, className, ...props }, ref) {
|
|
960
1078
|
return /* @__PURE__ */ jsxs18("footer", { ref, className: cn17("px-7 py-7", className), ...props, children: [
|
|
@@ -982,8 +1100,8 @@ var Footer = forwardRef19(function Footer2({ brand, columns, copyright, closing,
|
|
|
982
1100
|
Footer.displayName = "Footer";
|
|
983
1101
|
|
|
984
1102
|
// src/marketing/Hero.tsx
|
|
985
|
-
import { forwardRef as forwardRef20 } from "react";
|
|
986
1103
|
import { cn as cn18 } from "@ship-it-ui/ui";
|
|
1104
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
987
1105
|
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
988
1106
|
var Hero = forwardRef20(function Hero2({ eyebrow, title, description, actions, visual, className, ...props }, ref) {
|
|
989
1107
|
const hasVisual = visual != null;
|
|
@@ -1021,8 +1139,8 @@ var Hero = forwardRef20(function Hero2({ eyebrow, title, description, actions, v
|
|
|
1021
1139
|
Hero.displayName = "Hero";
|
|
1022
1140
|
|
|
1023
1141
|
// src/marketing/PricingCard.tsx
|
|
1024
|
-
import { forwardRef as forwardRef21 } from "react";
|
|
1025
1142
|
import { cn as cn19 } from "@ship-it-ui/ui";
|
|
1143
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
1026
1144
|
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1027
1145
|
var PricingCard = forwardRef21(function PricingCard2({ tier, price, priceUnit, description, features, action, featured, className, ...props }, ref) {
|
|
1028
1146
|
return /* @__PURE__ */ jsxs20(
|
|
@@ -1060,8 +1178,8 @@ PricingCard.displayName = "PricingCard";
|
|
|
1060
1178
|
|
|
1061
1179
|
// src/marketing/Testimonial.tsx
|
|
1062
1180
|
import { Avatar as Avatar2 } from "@ship-it-ui/ui";
|
|
1063
|
-
import { forwardRef as forwardRef22 } from "react";
|
|
1064
1181
|
import { cn as cn20 } from "@ship-it-ui/ui";
|
|
1182
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
1065
1183
|
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1066
1184
|
var Testimonial = forwardRef22(function Testimonial2({ quote, author, role, avatar, className, ...props }, ref) {
|
|
1067
1185
|
return /* @__PURE__ */ jsxs21(
|
|
@@ -1086,23 +1204,121 @@ var Testimonial = forwardRef22(function Testimonial2({ quote, author, role, avat
|
|
|
1086
1204
|
});
|
|
1087
1205
|
Testimonial.displayName = "Testimonial";
|
|
1088
1206
|
|
|
1207
|
+
// src/data/ConnectorCard.tsx
|
|
1208
|
+
import { IconGlyph } from "@ship-it-ui/icons";
|
|
1209
|
+
import { cn as cn21, formatRelative, StatusDot } from "@ship-it-ui/ui";
|
|
1210
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
1211
|
+
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1212
|
+
var statusDot = {
|
|
1213
|
+
connected: "ok",
|
|
1214
|
+
syncing: "sync",
|
|
1215
|
+
error: "err",
|
|
1216
|
+
disconnected: "off"
|
|
1217
|
+
};
|
|
1218
|
+
var statusLabel = {
|
|
1219
|
+
connected: "Connected",
|
|
1220
|
+
syncing: "Syncing",
|
|
1221
|
+
error: "Error",
|
|
1222
|
+
disconnected: "Disconnected"
|
|
1223
|
+
};
|
|
1224
|
+
var ConnectorCard = forwardRef23(function ConnectorCard2({
|
|
1225
|
+
connector,
|
|
1226
|
+
name,
|
|
1227
|
+
status,
|
|
1228
|
+
lastSyncedAt,
|
|
1229
|
+
relativeNow,
|
|
1230
|
+
summary,
|
|
1231
|
+
actions,
|
|
1232
|
+
onClick,
|
|
1233
|
+
accessibleName,
|
|
1234
|
+
className,
|
|
1235
|
+
...props
|
|
1236
|
+
}, ref) {
|
|
1237
|
+
const interactive = typeof onClick === "function";
|
|
1238
|
+
const time = lastSyncedAt ? formatRelative(lastSyncedAt, relativeNow ?? /* @__PURE__ */ new Date()) : "";
|
|
1239
|
+
const labelBlock = /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
1240
|
+
/* @__PURE__ */ jsx23(
|
|
1241
|
+
"span",
|
|
1242
|
+
{
|
|
1243
|
+
"aria-hidden": true,
|
|
1244
|
+
className: "bg-panel-2 grid h-10 w-10 shrink-0 place-items-center rounded-md font-mono text-[16px]",
|
|
1245
|
+
children: /* @__PURE__ */ jsx23(IconGlyph, { name: connector, kind: "connector" })
|
|
1246
|
+
}
|
|
1247
|
+
),
|
|
1248
|
+
/* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
|
|
1249
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", children: [
|
|
1250
|
+
/* @__PURE__ */ jsx23("span", { className: "truncate text-[14px] font-medium", children: name }),
|
|
1251
|
+
/* @__PURE__ */ jsx23(
|
|
1252
|
+
StatusDot,
|
|
1253
|
+
{
|
|
1254
|
+
state: statusDot[status],
|
|
1255
|
+
pulse: status === "syncing",
|
|
1256
|
+
label: statusLabel[status]
|
|
1257
|
+
}
|
|
1258
|
+
)
|
|
1259
|
+
] }),
|
|
1260
|
+
(summary || time) && /* @__PURE__ */ jsxs22("div", { className: "text-text-muted mt-[2px] flex items-center gap-2 text-[12px]", children: [
|
|
1261
|
+
summary && /* @__PURE__ */ jsx23("span", { className: "truncate", children: summary }),
|
|
1262
|
+
summary && time && /* @__PURE__ */ jsx23("span", { "aria-hidden": true, className: "text-text-dim", children: "\xB7" }),
|
|
1263
|
+
time && /* @__PURE__ */ jsxs22("time", { className: "text-text-dim font-mono text-[11px]", children: [
|
|
1264
|
+
"last synced ",
|
|
1265
|
+
time
|
|
1266
|
+
] })
|
|
1267
|
+
] })
|
|
1268
|
+
] })
|
|
1269
|
+
] });
|
|
1270
|
+
const labelRegionClass = cn21(
|
|
1271
|
+
"flex flex-1 items-start gap-3 rounded-md p-1 text-left transition-colors duration-(--duration-micro)",
|
|
1272
|
+
interactive && "hover:bg-panel-2 focus-visible:ring-accent-dim cursor-pointer outline-none focus-visible:ring-[3px]"
|
|
1273
|
+
);
|
|
1274
|
+
const labelRegion = interactive ? /* @__PURE__ */ jsx23(
|
|
1275
|
+
"button",
|
|
1276
|
+
{
|
|
1277
|
+
type: "button",
|
|
1278
|
+
onClick,
|
|
1279
|
+
"aria-label": accessibleName ?? (typeof name === "string" ? `${name} connector` : statusLabel[status]),
|
|
1280
|
+
className: labelRegionClass,
|
|
1281
|
+
children: labelBlock
|
|
1282
|
+
}
|
|
1283
|
+
) : /* @__PURE__ */ jsx23("div", { className: labelRegionClass, children: labelBlock });
|
|
1284
|
+
return /* @__PURE__ */ jsxs22(
|
|
1285
|
+
"div",
|
|
1286
|
+
{
|
|
1287
|
+
ref,
|
|
1288
|
+
className: cn21(
|
|
1289
|
+
"rounded-base border-border bg-panel flex items-start gap-2 border p-3",
|
|
1290
|
+
className
|
|
1291
|
+
),
|
|
1292
|
+
...props,
|
|
1293
|
+
children: [
|
|
1294
|
+
labelRegion,
|
|
1295
|
+
actions && /* @__PURE__ */ jsx23("div", { className: "shrink-0 self-center pr-1", children: actions })
|
|
1296
|
+
]
|
|
1297
|
+
}
|
|
1298
|
+
);
|
|
1299
|
+
});
|
|
1300
|
+
ConnectorCard.displayName = "ConnectorCard";
|
|
1301
|
+
|
|
1089
1302
|
// src/data/EntityTable.tsx
|
|
1090
1303
|
import { DataTable } from "@ship-it-ui/ui";
|
|
1091
1304
|
import "react";
|
|
1092
|
-
import { jsx as
|
|
1305
|
+
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1093
1306
|
function EntityTable(props) {
|
|
1094
1307
|
const { rowKey, ...rest } = props;
|
|
1095
|
-
return /* @__PURE__ */
|
|
1308
|
+
return /* @__PURE__ */ jsx24(DataTable, { ...rest, rowKey: rowKey ?? ((row) => row.id) });
|
|
1096
1309
|
}
|
|
1097
1310
|
function entityColumn(options = {}) {
|
|
1098
1311
|
return {
|
|
1099
1312
|
key: options.key ?? "name",
|
|
1100
1313
|
header: options.header ?? "Name",
|
|
1101
1314
|
accessor: (row) => row.name,
|
|
1102
|
-
cell: (row) =>
|
|
1103
|
-
|
|
1104
|
-
row.
|
|
1105
|
-
|
|
1315
|
+
cell: (row) => {
|
|
1316
|
+
const meta = getEntityTypeMeta(row.type);
|
|
1317
|
+
return /* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-2 font-mono", "data-entity-type": row.type, children: [
|
|
1318
|
+
/* @__PURE__ */ jsx24("span", { "aria-hidden": true, className: meta.toneClass, children: meta.glyph }),
|
|
1319
|
+
row.name
|
|
1320
|
+
] });
|
|
1321
|
+
}
|
|
1106
1322
|
};
|
|
1107
1323
|
}
|
|
1108
1324
|
function entityTypeColumn(options = {}) {
|
|
@@ -1110,14 +1326,97 @@ function entityTypeColumn(options = {}) {
|
|
|
1110
1326
|
key: options.key ?? "type",
|
|
1111
1327
|
header: options.header ?? "Type",
|
|
1112
1328
|
accessor: (row) => row.type,
|
|
1113
|
-
cell: (row) => /* @__PURE__ */
|
|
1329
|
+
cell: (row) => /* @__PURE__ */ jsx24(EntityBadge, { type: row.type, size: "sm" })
|
|
1114
1330
|
};
|
|
1115
1331
|
}
|
|
1332
|
+
|
|
1333
|
+
// src/notifications/NotifRow.tsx
|
|
1334
|
+
import { cn as cn22 } from "@ship-it-ui/ui";
|
|
1335
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
1336
|
+
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1337
|
+
var toneClass = {
|
|
1338
|
+
ok: "bg-ok",
|
|
1339
|
+
warn: "bg-warn",
|
|
1340
|
+
err: "bg-err",
|
|
1341
|
+
neutral: "bg-accent-text"
|
|
1342
|
+
};
|
|
1343
|
+
var NotifRow = forwardRef24(function NotifRow2({
|
|
1344
|
+
title,
|
|
1345
|
+
body,
|
|
1346
|
+
time,
|
|
1347
|
+
tone = "neutral",
|
|
1348
|
+
unread,
|
|
1349
|
+
isFirst,
|
|
1350
|
+
isLast,
|
|
1351
|
+
href,
|
|
1352
|
+
className,
|
|
1353
|
+
onClick,
|
|
1354
|
+
...props
|
|
1355
|
+
}, ref) {
|
|
1356
|
+
const content = /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
1357
|
+
/* @__PURE__ */ jsx25("div", { className: "pt-1", "aria-hidden": true, children: /* @__PURE__ */ jsx25(
|
|
1358
|
+
"div",
|
|
1359
|
+
{
|
|
1360
|
+
className: cn22("h-2 w-2 rounded-full", unread ? toneClass[tone] : "bg-border-strong")
|
|
1361
|
+
}
|
|
1362
|
+
) }),
|
|
1363
|
+
/* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1", children: [
|
|
1364
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
1365
|
+
/* @__PURE__ */ jsx25("div", { className: "truncate text-[14px] font-medium tracking-tight", children: title }),
|
|
1366
|
+
time != null && /* @__PURE__ */ jsx25("span", { className: "text-text-muted shrink-0 font-mono text-[11px] whitespace-nowrap", children: time })
|
|
1367
|
+
] }),
|
|
1368
|
+
body && /* @__PURE__ */ jsx25("div", { className: "text-text-muted mt-[3px] text-[13px] leading-tight", children: body })
|
|
1369
|
+
] })
|
|
1370
|
+
] });
|
|
1371
|
+
const baseClass = cn22(
|
|
1372
|
+
"flex gap-3 p-[14px] bg-panel border-border border-l border-r",
|
|
1373
|
+
isFirst ? "border-t rounded-t-m-card" : "",
|
|
1374
|
+
"border-b",
|
|
1375
|
+
isLast ? "rounded-b-m-card" : "",
|
|
1376
|
+
href || onClick ? "cursor-pointer hover:bg-panel-2" : "",
|
|
1377
|
+
className
|
|
1378
|
+
);
|
|
1379
|
+
if (href) {
|
|
1380
|
+
return /* @__PURE__ */ jsx25(
|
|
1381
|
+
"a",
|
|
1382
|
+
{
|
|
1383
|
+
ref,
|
|
1384
|
+
href,
|
|
1385
|
+
onClick,
|
|
1386
|
+
className: cn22(
|
|
1387
|
+
baseClass,
|
|
1388
|
+
"text-text focus-visible:ring-accent-dim no-underline outline-none focus-visible:ring-[3px]"
|
|
1389
|
+
),
|
|
1390
|
+
...props,
|
|
1391
|
+
children: content
|
|
1392
|
+
}
|
|
1393
|
+
);
|
|
1394
|
+
}
|
|
1395
|
+
if (onClick) {
|
|
1396
|
+
return /* @__PURE__ */ jsx25(
|
|
1397
|
+
"button",
|
|
1398
|
+
{
|
|
1399
|
+
type: "button",
|
|
1400
|
+
ref,
|
|
1401
|
+
onClick,
|
|
1402
|
+
className: cn22(
|
|
1403
|
+
baseClass,
|
|
1404
|
+
"focus-visible:ring-accent-dim text-left outline-none focus-visible:ring-[3px]"
|
|
1405
|
+
),
|
|
1406
|
+
...props,
|
|
1407
|
+
children: content
|
|
1408
|
+
}
|
|
1409
|
+
);
|
|
1410
|
+
}
|
|
1411
|
+
return /* @__PURE__ */ jsx25("div", { ref, className: baseClass, ...props, children: content });
|
|
1412
|
+
});
|
|
1413
|
+
NotifRow.displayName = "NotifRow";
|
|
1116
1414
|
export {
|
|
1117
1415
|
AskBar,
|
|
1118
1416
|
CTAStrip,
|
|
1119
1417
|
Citation,
|
|
1120
1418
|
ConfidenceIndicator,
|
|
1419
|
+
ConnectorCard,
|
|
1121
1420
|
CopilotMessage,
|
|
1122
1421
|
ENTITY_GLYPH,
|
|
1123
1422
|
ENTITY_LABEL,
|
|
@@ -1137,6 +1436,7 @@ export {
|
|
|
1137
1436
|
GraphMinimap,
|
|
1138
1437
|
GraphNode,
|
|
1139
1438
|
Hero,
|
|
1439
|
+
NotifRow,
|
|
1140
1440
|
PathOverlay,
|
|
1141
1441
|
PricingCard,
|
|
1142
1442
|
ReasoningBlock,
|
|
@@ -1144,8 +1444,13 @@ export {
|
|
|
1144
1444
|
SuggestionChip,
|
|
1145
1445
|
Testimonial,
|
|
1146
1446
|
ToolCallCard,
|
|
1147
|
-
|
|
1447
|
+
cn23 as cn,
|
|
1148
1448
|
entityColumn,
|
|
1149
|
-
entityTypeColumn
|
|
1449
|
+
entityTypeColumn,
|
|
1450
|
+
getEntityTypeMeta,
|
|
1451
|
+
listEntityTypes,
|
|
1452
|
+
registerEntityType,
|
|
1453
|
+
registerEntityTypes,
|
|
1454
|
+
resetEntityTypeRegistry
|
|
1150
1455
|
};
|
|
1151
1456
|
//# sourceMappingURL=index.js.map
|