@ship-it-ui/shipit 0.0.1 → 0.0.3
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/README.md +6 -0
- package/dist/index.cjs +502 -249
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -13
- package/dist/index.d.ts +87 -13
- package/dist/index.js +435 -205
- package/dist/index.js.map +1 -1
- package/package.json +19 -11
package/dist/index.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
import { useControllableState, Button, Avatar, Badge } from '@ship-it-ui/ui';
|
|
4
|
-
import { forwardRef, useRef, Children } from 'react';
|
|
5
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
1
|
+
'use client';
|
|
6
2
|
|
|
7
|
-
// src/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { cn as cn21 } from "@ship-it-ui/ui";
|
|
5
|
+
|
|
6
|
+
// src/ai/AskBar.tsx
|
|
7
|
+
import { Button, useControllableState } from "@ship-it-ui/ui";
|
|
8
|
+
import {
|
|
9
|
+
forwardRef,
|
|
10
|
+
useRef
|
|
11
|
+
} from "react";
|
|
12
|
+
import { cn } from "@ship-it-ui/ui";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
14
|
var AskBar = forwardRef(function AskBar2({
|
|
12
15
|
value: valueProp,
|
|
13
16
|
defaultValue,
|
|
@@ -104,25 +107,30 @@ var AskBar = forwardRef(function AskBar2({
|
|
|
104
107
|
);
|
|
105
108
|
});
|
|
106
109
|
AskBar.displayName = "AskBar";
|
|
110
|
+
|
|
111
|
+
// src/ai/Citation.tsx
|
|
112
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
113
|
+
import { cn as cn2 } from "@ship-it-ui/ui";
|
|
114
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
107
115
|
var SUPERSCRIPTS = ["\u2070", "\xB9", "\xB2", "\xB3", "\u2074", "\u2075", "\u2076", "\u2077", "\u2078", "\u2079"];
|
|
108
116
|
function toSuperscript(n) {
|
|
109
117
|
return String(n).split("").map((d) => SUPERSCRIPTS[Number(d)] ?? d).join("");
|
|
110
118
|
}
|
|
111
|
-
var Citation =
|
|
119
|
+
var Citation = forwardRef2(function Citation2({ index, source, meta, inline, className, ...props }, ref) {
|
|
112
120
|
if (inline) {
|
|
113
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ jsx2(
|
|
114
122
|
"sup",
|
|
115
123
|
{
|
|
116
124
|
ref,
|
|
117
125
|
"aria-label": typeof source === "string" ? `Citation ${index}: ${source}` : `Citation ${index}`,
|
|
118
|
-
className:
|
|
126
|
+
className: cn2("text-accent ml-[2px] font-mono text-[10px]", className),
|
|
119
127
|
...props,
|
|
120
128
|
children: toSuperscript(index)
|
|
121
129
|
}
|
|
122
130
|
);
|
|
123
131
|
}
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ jsxs2("span", { ref, className: cn2("inline-flex items-center gap-2", className), ...props, children: [
|
|
133
|
+
/* @__PURE__ */ jsx2(
|
|
126
134
|
"span",
|
|
127
135
|
{
|
|
128
136
|
"aria-hidden": true,
|
|
@@ -130,17 +138,22 @@ var Citation = forwardRef(function Citation2({ index, source, meta, inline, clas
|
|
|
130
138
|
children: toSuperscript(index)
|
|
131
139
|
}
|
|
132
140
|
),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
source != null && /* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ jsxs2("span", { className: "text-text-muted text-[12px]", children: [
|
|
142
|
+
source != null && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
135
143
|
"from ",
|
|
136
144
|
source
|
|
137
145
|
] }),
|
|
138
|
-
source != null && meta != null && /* @__PURE__ */
|
|
146
|
+
source != null && meta != null && /* @__PURE__ */ jsx2("span", { className: "text-text-dim", children: " \xB7 " }),
|
|
139
147
|
meta
|
|
140
148
|
] })
|
|
141
149
|
] });
|
|
142
150
|
});
|
|
143
151
|
Citation.displayName = "Citation";
|
|
152
|
+
|
|
153
|
+
// src/ai/ConfidenceIndicator.tsx
|
|
154
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
155
|
+
import { cn as cn3 } from "@ship-it-ui/ui";
|
|
156
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
144
157
|
var tierLabel = {
|
|
145
158
|
high: "High",
|
|
146
159
|
medium: "Medium",
|
|
@@ -165,12 +178,12 @@ function deriveTier(value) {
|
|
|
165
178
|
if (value >= 50) return "low";
|
|
166
179
|
return "unverified";
|
|
167
180
|
}
|
|
168
|
-
var ConfidenceIndicator =
|
|
181
|
+
var ConfidenceIndicator = forwardRef3(
|
|
169
182
|
function ConfidenceIndicator2({ value, tier: tierProp, label, width = 120, hideValue, className, ...props }, ref) {
|
|
170
183
|
const tier = tierProp ?? deriveTier(value);
|
|
171
184
|
const pct = Math.max(0, Math.min(100, value));
|
|
172
185
|
const display = label ?? tierLabel[tier];
|
|
173
|
-
return /* @__PURE__ */
|
|
186
|
+
return /* @__PURE__ */ jsxs3(
|
|
174
187
|
"div",
|
|
175
188
|
{
|
|
176
189
|
ref,
|
|
@@ -180,59 +193,65 @@ var ConfidenceIndicator = forwardRef(
|
|
|
180
193
|
"aria-valuemax": 100,
|
|
181
194
|
"aria-valuenow": Math.round(pct),
|
|
182
195
|
"aria-valuetext": `${Math.round(pct)}% \u2014 ${typeof display === "string" ? display : tierLabel[tier]}`,
|
|
183
|
-
className:
|
|
196
|
+
className: cn3("inline-flex items-center gap-[10px] text-[11px]", className),
|
|
184
197
|
...props,
|
|
185
198
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ jsx3("span", { "aria-hidden": true, style: { width }, className: "bg-panel-2 h-1 overflow-hidden rounded-full", children: /* @__PURE__ */ jsx3(
|
|
187
200
|
"span",
|
|
188
201
|
{
|
|
189
|
-
className:
|
|
202
|
+
className: cn3(
|
|
190
203
|
"block h-full rounded-full transition-[width] duration-(--duration-step)",
|
|
191
204
|
tierBarClass[tier]
|
|
192
205
|
),
|
|
193
206
|
style: { width: `${pct}%` }
|
|
194
207
|
}
|
|
195
208
|
) }),
|
|
196
|
-
!hideValue && /* @__PURE__ */
|
|
209
|
+
!hideValue && /* @__PURE__ */ jsxs3("span", { className: "text-text min-w-[44px] font-mono tabular-nums", children: [
|
|
197
210
|
pct.toFixed(1),
|
|
198
211
|
"%"
|
|
199
212
|
] }),
|
|
200
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ jsx3("span", { className: tierTextClass[tier], children: display })
|
|
201
214
|
]
|
|
202
215
|
}
|
|
203
216
|
);
|
|
204
217
|
}
|
|
205
218
|
);
|
|
206
219
|
ConfidenceIndicator.displayName = "ConfidenceIndicator";
|
|
207
|
-
|
|
220
|
+
|
|
221
|
+
// src/ai/CopilotMessage.tsx
|
|
222
|
+
import { Avatar } from "@ship-it-ui/ui";
|
|
223
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
224
|
+
import { cn as cn4 } from "@ship-it-ui/ui";
|
|
225
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
226
|
+
var CopilotMessage = forwardRef4(
|
|
208
227
|
function CopilotMessage2({ role, avatar, streaming, className, children, ...props }, ref) {
|
|
209
228
|
const isAssistant = role === "assistant";
|
|
210
|
-
return /* @__PURE__ */
|
|
229
|
+
return /* @__PURE__ */ jsxs4(
|
|
211
230
|
"div",
|
|
212
231
|
{
|
|
213
232
|
ref,
|
|
214
|
-
className:
|
|
233
|
+
className: cn4("flex items-start gap-[10px]", className),
|
|
215
234
|
"data-role": role,
|
|
216
235
|
...props,
|
|
217
236
|
children: [
|
|
218
|
-
isAssistant ? /* @__PURE__ */
|
|
237
|
+
isAssistant ? /* @__PURE__ */ jsx4(
|
|
219
238
|
"span",
|
|
220
239
|
{
|
|
221
240
|
"aria-hidden": true,
|
|
222
241
|
className: "bg-accent-dim text-accent grid h-6 w-6 shrink-0 place-items-center rounded-full text-[11px] font-semibold",
|
|
223
242
|
children: "\u2726"
|
|
224
243
|
}
|
|
225
|
-
) : typeof avatar === "string" ? /* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
244
|
+
) : typeof avatar === "string" ? /* @__PURE__ */ jsx4(Avatar, { size: "sm", name: avatar }) : avatar ?? null,
|
|
245
|
+
/* @__PURE__ */ jsxs4(
|
|
227
246
|
"div",
|
|
228
247
|
{
|
|
229
|
-
className:
|
|
248
|
+
className: cn4(
|
|
230
249
|
"rounded-base min-w-0 flex-1 px-[14px] py-3 text-[13px] leading-[1.6]",
|
|
231
250
|
isAssistant ? "bg-panel border-border border" : "bg-panel-2"
|
|
232
251
|
),
|
|
233
252
|
children: [
|
|
234
253
|
children,
|
|
235
|
-
streaming && /* @__PURE__ */
|
|
254
|
+
streaming && /* @__PURE__ */ jsx4(
|
|
236
255
|
"span",
|
|
237
256
|
{
|
|
238
257
|
"aria-hidden": true,
|
|
@@ -248,7 +267,13 @@ var CopilotMessage = forwardRef(
|
|
|
248
267
|
}
|
|
249
268
|
);
|
|
250
269
|
CopilotMessage.displayName = "CopilotMessage";
|
|
251
|
-
|
|
270
|
+
|
|
271
|
+
// src/ai/ReasoningBlock.tsx
|
|
272
|
+
import { useControllableState as useControllableState2 } from "@ship-it-ui/ui";
|
|
273
|
+
import { Children, forwardRef as forwardRef5 } from "react";
|
|
274
|
+
import { cn as cn5 } from "@ship-it-ui/ui";
|
|
275
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
276
|
+
var ReasoningBlock = forwardRef5(
|
|
252
277
|
function ReasoningBlock2({
|
|
253
278
|
label,
|
|
254
279
|
stepCount,
|
|
@@ -260,21 +285,21 @@ var ReasoningBlock = forwardRef(
|
|
|
260
285
|
children,
|
|
261
286
|
...props
|
|
262
287
|
}, ref) {
|
|
263
|
-
const [open, setOpen] =
|
|
288
|
+
const [open, setOpen] = useControllableState2({
|
|
264
289
|
value: openProp,
|
|
265
290
|
defaultValue: defaultOpen,
|
|
266
291
|
onChange: onOpenChange
|
|
267
292
|
});
|
|
268
293
|
const inferredCount = stepCount ?? Children.count(children);
|
|
269
294
|
const heading = label ?? `Reasoning \xB7 ${inferredCount} step${inferredCount === 1 ? "" : "s"}`;
|
|
270
|
-
return /* @__PURE__ */
|
|
295
|
+
return /* @__PURE__ */ jsxs5(
|
|
271
296
|
"div",
|
|
272
297
|
{
|
|
273
298
|
ref,
|
|
274
|
-
className:
|
|
299
|
+
className: cn5("border-border bg-panel-2 overflow-hidden rounded-md border", className),
|
|
275
300
|
...props,
|
|
276
301
|
children: [
|
|
277
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ jsxs5(
|
|
278
303
|
"button",
|
|
279
304
|
{
|
|
280
305
|
type: "button",
|
|
@@ -282,22 +307,22 @@ var ReasoningBlock = forwardRef(
|
|
|
282
307
|
onClick: () => setOpen(!open),
|
|
283
308
|
className: "focus-visible:ring-accent-dim flex w-full cursor-pointer items-center gap-[10px] border-0 bg-transparent px-[14px] py-[10px] text-left outline-none focus-visible:ring-[3px]",
|
|
284
309
|
children: [
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
duration != null && /* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ jsx5("span", { "aria-hidden": true, className: "text-text-dim font-mono text-[11px]", children: open ? "\u25BE" : "\u25B8" }),
|
|
311
|
+
/* @__PURE__ */ jsx5("span", { className: "text-[12px] font-medium", children: heading }),
|
|
312
|
+
duration != null && /* @__PURE__ */ jsx5("span", { className: "text-text-dim ml-auto font-mono text-[10px]", children: duration })
|
|
288
313
|
]
|
|
289
314
|
}
|
|
290
315
|
),
|
|
291
|
-
open && /* @__PURE__ */
|
|
316
|
+
open && /* @__PURE__ */ jsx5("div", { className: "border-border text-text-muted border-t px-[14px] py-[10px] pl-9 text-[11px] leading-[1.7]", children })
|
|
292
317
|
]
|
|
293
318
|
}
|
|
294
319
|
);
|
|
295
320
|
}
|
|
296
321
|
);
|
|
297
322
|
ReasoningBlock.displayName = "ReasoningBlock";
|
|
298
|
-
var ReasoningStep =
|
|
299
|
-
return /* @__PURE__ */
|
|
300
|
-
/* @__PURE__ */
|
|
323
|
+
var ReasoningStep = forwardRef5(function ReasoningStep2({ step, className, children, ...props }, ref) {
|
|
324
|
+
return /* @__PURE__ */ jsxs5("div", { ref, className: cn5("mb-[2px] last:mb-0", className), ...props, children: [
|
|
325
|
+
/* @__PURE__ */ jsxs5("span", { className: "text-accent mr-[6px] font-mono", children: [
|
|
301
326
|
step,
|
|
302
327
|
"."
|
|
303
328
|
] }),
|
|
@@ -305,14 +330,19 @@ var ReasoningStep = forwardRef(function ReasoningStep2({ step, className, childr
|
|
|
305
330
|
] });
|
|
306
331
|
});
|
|
307
332
|
ReasoningStep.displayName = "ReasoningStep";
|
|
308
|
-
|
|
333
|
+
|
|
334
|
+
// src/ai/SuggestionChip.tsx
|
|
335
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
336
|
+
import { cn as cn6 } from "@ship-it-ui/ui";
|
|
337
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
338
|
+
var SuggestionChip = forwardRef6(
|
|
309
339
|
function SuggestionChip2({ glyph = "\u2726", className, children, type, ...props }, ref) {
|
|
310
|
-
return /* @__PURE__ */
|
|
340
|
+
return /* @__PURE__ */ jsxs6(
|
|
311
341
|
"button",
|
|
312
342
|
{
|
|
313
343
|
ref,
|
|
314
344
|
type: type ?? "button",
|
|
315
|
-
className:
|
|
345
|
+
className: cn6(
|
|
316
346
|
"border-border bg-panel text-text inline-flex cursor-pointer items-center gap-[6px] rounded-full border px-[10px] py-[6px] text-[12px] outline-none",
|
|
317
347
|
"transition-colors duration-(--duration-micro)",
|
|
318
348
|
"hover:border-border-strong hover:bg-panel-2",
|
|
@@ -321,7 +351,7 @@ var SuggestionChip = forwardRef(
|
|
|
321
351
|
),
|
|
322
352
|
...props,
|
|
323
353
|
children: [
|
|
324
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ jsx6("span", { "aria-hidden": true, className: "text-accent", children: glyph }),
|
|
325
355
|
children
|
|
326
356
|
]
|
|
327
357
|
}
|
|
@@ -329,20 +359,26 @@ var SuggestionChip = forwardRef(
|
|
|
329
359
|
}
|
|
330
360
|
);
|
|
331
361
|
SuggestionChip.displayName = "SuggestionChip";
|
|
332
|
-
|
|
333
|
-
|
|
362
|
+
|
|
363
|
+
// src/ai/ToolCallCard.tsx
|
|
364
|
+
import { Badge } from "@ship-it-ui/ui";
|
|
365
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
366
|
+
import { cn as cn7 } from "@ship-it-ui/ui";
|
|
367
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
368
|
+
var ToolCallCard = forwardRef7(function ToolCallCard2({ name, status, running, className, children, ...props }, ref) {
|
|
369
|
+
return /* @__PURE__ */ jsxs7(
|
|
334
370
|
"div",
|
|
335
371
|
{
|
|
336
372
|
ref,
|
|
337
|
-
className:
|
|
373
|
+
className: cn7("border-border bg-panel rounded-md border px-[14px] py-[10px]", className),
|
|
338
374
|
...props,
|
|
339
375
|
children: [
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-[10px]", children: [
|
|
377
|
+
/* @__PURE__ */ jsx7(Badge, { size: "sm", variant: "accent", children: "TOOL" }),
|
|
378
|
+
/* @__PURE__ */ jsx7("span", { className: "font-mono text-[12px] font-medium", children: name }),
|
|
379
|
+
/* @__PURE__ */ jsx7("span", { className: "text-text-dim ml-auto inline-flex items-center font-mono text-[10px]", children: running ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
344
380
|
"running",
|
|
345
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ jsx7(
|
|
346
382
|
"span",
|
|
347
383
|
{
|
|
348
384
|
"aria-hidden": true,
|
|
@@ -351,13 +387,18 @@ var ToolCallCard = forwardRef(function ToolCallCard2({ name, status, running, cl
|
|
|
351
387
|
)
|
|
352
388
|
] }) : status })
|
|
353
389
|
] }),
|
|
354
|
-
children && /* @__PURE__ */
|
|
390
|
+
children && /* @__PURE__ */ jsx7("pre", { className: "text-text-muted m-0 mt-[6px] font-mono text-[11px] leading-[1.6] break-words whitespace-pre-wrap", children })
|
|
355
391
|
]
|
|
356
392
|
}
|
|
357
393
|
);
|
|
358
394
|
});
|
|
359
395
|
ToolCallCard.displayName = "ToolCallCard";
|
|
360
396
|
|
|
397
|
+
// src/entity/EntityBadge.tsx
|
|
398
|
+
import { Badge as Badge2 } from "@ship-it-ui/ui";
|
|
399
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
400
|
+
import { cn as cn8 } from "@ship-it-ui/ui";
|
|
401
|
+
|
|
361
402
|
// src/entity/types.ts
|
|
362
403
|
var ENTITY_GLYPH = {
|
|
363
404
|
service: "\u25C7",
|
|
@@ -391,6 +432,9 @@ var ENTITY_TONE_BG = {
|
|
|
391
432
|
incident: "bg-[color-mix(in_oklab,var(--color-err),transparent_85%)]",
|
|
392
433
|
ticket: "bg-[color-mix(in_oklab,var(--color-warn),transparent_85%)]"
|
|
393
434
|
};
|
|
435
|
+
|
|
436
|
+
// src/entity/EntityBadge.tsx
|
|
437
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
394
438
|
var typeVariant = {
|
|
395
439
|
service: "accent",
|
|
396
440
|
person: "neutral",
|
|
@@ -399,13 +443,18 @@ var typeVariant = {
|
|
|
399
443
|
incident: "err",
|
|
400
444
|
ticket: "warn"
|
|
401
445
|
};
|
|
402
|
-
var EntityBadge =
|
|
403
|
-
return /* @__PURE__ */
|
|
404
|
-
!hideGlyph && /* @__PURE__ */
|
|
446
|
+
var EntityBadge = forwardRef8(function EntityBadge2({ type, label, hideGlyph, className, children, ...props }, ref) {
|
|
447
|
+
return /* @__PURE__ */ jsxs8(Badge2, { ref, variant: typeVariant[type], className: cn8(className), ...props, children: [
|
|
448
|
+
!hideGlyph && /* @__PURE__ */ jsx8("span", { "aria-hidden": true, className: "font-mono", children: ENTITY_GLYPH[type] }),
|
|
405
449
|
children ?? label ?? ENTITY_LABEL[type]
|
|
406
450
|
] });
|
|
407
451
|
});
|
|
408
452
|
EntityBadge.displayName = "EntityBadge";
|
|
453
|
+
|
|
454
|
+
// src/entity/EntityCard.tsx
|
|
455
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
456
|
+
import { cn as cn9 } from "@ship-it-ui/ui";
|
|
457
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
409
458
|
var statToneClass = {
|
|
410
459
|
accent: "text-accent",
|
|
411
460
|
ok: "text-ok",
|
|
@@ -413,23 +462,23 @@ var statToneClass = {
|
|
|
413
462
|
err: "text-err",
|
|
414
463
|
muted: "text-text-muted"
|
|
415
464
|
};
|
|
416
|
-
var EntityCard =
|
|
417
|
-
return /* @__PURE__ */
|
|
465
|
+
var EntityCard = forwardRef9(function EntityCard2({ type, title, subtitle, description, stats, actions, glyph, className, ...props }, ref) {
|
|
466
|
+
return /* @__PURE__ */ jsxs9(
|
|
418
467
|
"div",
|
|
419
468
|
{
|
|
420
469
|
ref,
|
|
421
|
-
className:
|
|
470
|
+
className: cn9(
|
|
422
471
|
"rounded-base border-border bg-panel flex flex-col gap-3 border p-5",
|
|
423
472
|
className
|
|
424
473
|
),
|
|
425
474
|
...props,
|
|
426
475
|
children: [
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-start gap-3", children: [
|
|
477
|
+
/* @__PURE__ */ jsx9(
|
|
429
478
|
"span",
|
|
430
479
|
{
|
|
431
480
|
"aria-hidden": true,
|
|
432
|
-
className:
|
|
481
|
+
className: cn9(
|
|
433
482
|
"rounded-base grid h-12 w-12 shrink-0 place-items-center text-[20px]",
|
|
434
483
|
ENTITY_TONE_BG[type],
|
|
435
484
|
ENTITY_TONE_CLASS[type]
|
|
@@ -437,27 +486,27 @@ var EntityCard = forwardRef(function EntityCard2({ type, title, subtitle, descri
|
|
|
437
486
|
children: glyph ?? ENTITY_GLYPH[type]
|
|
438
487
|
}
|
|
439
488
|
),
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
subtitle && /* @__PURE__ */
|
|
489
|
+
/* @__PURE__ */ jsxs9("div", { className: "min-w-0 flex-1", children: [
|
|
490
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
491
|
+
/* @__PURE__ */ jsx9(EntityBadge, { type, size: "sm" }),
|
|
492
|
+
subtitle && /* @__PURE__ */ jsx9("span", { className: "text-text-dim font-mono text-[11px]", children: subtitle })
|
|
444
493
|
] }),
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
description && /* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ jsx9("div", { className: "mt-1 truncate font-mono text-[18px] font-medium tracking-tight", children: title }),
|
|
495
|
+
description && /* @__PURE__ */ jsx9("div", { className: "text-text-muted mt-1 text-[13px] leading-[1.5]", children: description })
|
|
447
496
|
] }),
|
|
448
|
-
actions && /* @__PURE__ */
|
|
497
|
+
actions && /* @__PURE__ */ jsx9("div", { className: "shrink-0", children: actions })
|
|
449
498
|
] }),
|
|
450
|
-
stats && stats.length > 0 && /* @__PURE__ */
|
|
499
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx9(
|
|
451
500
|
"div",
|
|
452
501
|
{
|
|
453
502
|
className: "divide-border border-border bg-panel-2 grid divide-x rounded-md border",
|
|
454
503
|
style: { gridTemplateColumns: `repeat(${Math.min(stats.length, 6)}, 1fr)` },
|
|
455
|
-
children: stats.map((stat, i) => /* @__PURE__ */
|
|
456
|
-
/* @__PURE__ */
|
|
457
|
-
/* @__PURE__ */
|
|
504
|
+
children: stats.map((stat, i) => /* @__PURE__ */ jsxs9("div", { className: "px-4 py-3", children: [
|
|
505
|
+
/* @__PURE__ */ jsx9("div", { className: "text-text-dim font-mono text-[10px] tracking-[1.3px] uppercase", children: stat.label }),
|
|
506
|
+
/* @__PURE__ */ jsx9(
|
|
458
507
|
"div",
|
|
459
508
|
{
|
|
460
|
-
className:
|
|
509
|
+
className: cn9(
|
|
461
510
|
"mt-1 text-[16px] font-medium tracking-tight",
|
|
462
511
|
stat.tone ? statToneClass[stat.tone] : "text-text"
|
|
463
512
|
),
|
|
@@ -472,50 +521,112 @@ var EntityCard = forwardRef(function EntityCard2({ type, title, subtitle, descri
|
|
|
472
521
|
);
|
|
473
522
|
});
|
|
474
523
|
EntityCard.displayName = "EntityCard";
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
524
|
+
|
|
525
|
+
// src/entity/EntityListRow.tsx
|
|
526
|
+
import {
|
|
527
|
+
forwardRef as forwardRef10
|
|
528
|
+
} from "react";
|
|
529
|
+
import { cn as cn10 } from "@ship-it-ui/ui";
|
|
530
|
+
import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
531
|
+
var baseClassNames = (interactive, className) => cn10(
|
|
532
|
+
"flex w-full items-center gap-3 border-0 bg-transparent px-2 py-2 text-left",
|
|
533
|
+
"border-b border-border last:border-0",
|
|
534
|
+
interactive && "cursor-pointer outline-none transition-colors duration-(--duration-micro) hover:bg-panel-2 focus-visible:ring-[3px] focus-visible:ring-accent-dim",
|
|
535
|
+
className
|
|
536
|
+
);
|
|
537
|
+
function RowInner({
|
|
538
|
+
type,
|
|
539
|
+
name,
|
|
540
|
+
relation,
|
|
541
|
+
meta,
|
|
542
|
+
hideGlyph
|
|
543
|
+
}) {
|
|
544
|
+
return /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
545
|
+
!hideGlyph && /* @__PURE__ */ jsx10(
|
|
485
546
|
"span",
|
|
486
547
|
{
|
|
487
548
|
"aria-hidden": true,
|
|
488
|
-
className:
|
|
549
|
+
className: cn10("font-mono text-[14px] leading-none", ENTITY_TONE_CLASS[type]),
|
|
489
550
|
children: ENTITY_GLYPH[type]
|
|
490
551
|
}
|
|
491
552
|
),
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
relation && /* @__PURE__ */
|
|
494
|
-
meta && /* @__PURE__ */
|
|
553
|
+
/* @__PURE__ */ jsx10("span", { className: "text-text min-w-0 flex-1 truncate font-mono text-[12px]", children: name }),
|
|
554
|
+
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
|
+
meta && /* @__PURE__ */ jsx10("span", { className: "text-text-dim font-mono text-[10px]", children: meta })
|
|
495
556
|
] });
|
|
496
|
-
|
|
497
|
-
|
|
557
|
+
}
|
|
558
|
+
var EntityListRowDiv = forwardRef10(
|
|
559
|
+
function EntityListRowDiv2({ type, name, relation, meta, hideGlyph, className, ...props }, ref) {
|
|
560
|
+
return /* @__PURE__ */ jsx10("div", { ref, className: baseClassNames(false, className), ...props, children: /* @__PURE__ */ jsx10(RowInner, { type, name, relation, meta, hideGlyph }) });
|
|
561
|
+
}
|
|
562
|
+
);
|
|
563
|
+
EntityListRowDiv.displayName = "EntityListRowDiv";
|
|
564
|
+
var EntityListRowButton = forwardRef10(
|
|
565
|
+
function EntityListRowButton2({ type, name, relation, meta, hideGlyph, className, onClick, ...props }, ref) {
|
|
566
|
+
return /* @__PURE__ */ jsx10(
|
|
498
567
|
"button",
|
|
499
568
|
{
|
|
500
569
|
ref,
|
|
501
570
|
type: "button",
|
|
502
571
|
onClick,
|
|
503
|
-
className:
|
|
572
|
+
className: baseClassNames(true, className),
|
|
504
573
|
...props,
|
|
505
|
-
children:
|
|
574
|
+
children: /* @__PURE__ */ jsx10(RowInner, { type, name, relation, meta, hideGlyph })
|
|
506
575
|
}
|
|
507
576
|
);
|
|
508
577
|
}
|
|
509
|
-
|
|
510
|
-
|
|
578
|
+
);
|
|
579
|
+
EntityListRowButton.displayName = "EntityListRowButton";
|
|
580
|
+
function EntityListRow({
|
|
581
|
+
type,
|
|
582
|
+
name,
|
|
583
|
+
relation,
|
|
584
|
+
meta,
|
|
585
|
+
hideGlyph,
|
|
586
|
+
onClick,
|
|
587
|
+
className,
|
|
588
|
+
...props
|
|
589
|
+
}) {
|
|
590
|
+
if (typeof onClick === "function") {
|
|
591
|
+
return /* @__PURE__ */ jsx10(
|
|
592
|
+
EntityListRowButton,
|
|
593
|
+
{
|
|
594
|
+
type,
|
|
595
|
+
name,
|
|
596
|
+
relation,
|
|
597
|
+
meta,
|
|
598
|
+
hideGlyph,
|
|
599
|
+
onClick,
|
|
600
|
+
className,
|
|
601
|
+
...props
|
|
602
|
+
}
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
return /* @__PURE__ */ jsx10(
|
|
606
|
+
EntityListRowDiv,
|
|
607
|
+
{
|
|
608
|
+
type,
|
|
609
|
+
name,
|
|
610
|
+
relation,
|
|
611
|
+
meta,
|
|
612
|
+
hideGlyph,
|
|
613
|
+
className,
|
|
614
|
+
...props
|
|
615
|
+
}
|
|
616
|
+
);
|
|
617
|
+
}
|
|
511
618
|
EntityListRow.displayName = "EntityListRow";
|
|
619
|
+
|
|
620
|
+
// src/graph/GraphEdge.tsx
|
|
621
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
622
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
512
623
|
var styleProps = {
|
|
513
624
|
solid: { stroke: "var(--color-accent)", strokeWidth: 1.5 },
|
|
514
625
|
dashed: { stroke: "var(--color-accent)", strokeWidth: 1.5, strokeDasharray: "4 3" },
|
|
515
626
|
highlighted: { stroke: "var(--color-purple)", strokeWidth: 2.5 },
|
|
516
627
|
dim: { stroke: "var(--color-text-dim)", strokeWidth: 1, opacity: 0.4 }
|
|
517
628
|
};
|
|
518
|
-
var GraphEdge =
|
|
629
|
+
var GraphEdge = forwardRef11(function GraphEdge2({ x1, y1, x2, y2, curve, edgeStyle = "solid", color, arrowheadId, ...props }, ref) {
|
|
519
630
|
const base = styleProps[edgeStyle];
|
|
520
631
|
const stroke = color ?? base.stroke;
|
|
521
632
|
const sharedProps = {
|
|
@@ -528,7 +639,7 @@ var GraphEdge = forwardRef(function GraphEdge2({ x1, y1, x2, y2, curve, edgeStyl
|
|
|
528
639
|
...props
|
|
529
640
|
};
|
|
530
641
|
if (curve) {
|
|
531
|
-
return /* @__PURE__ */
|
|
642
|
+
return /* @__PURE__ */ jsx11(
|
|
532
643
|
"path",
|
|
533
644
|
{
|
|
534
645
|
ref,
|
|
@@ -537,10 +648,15 @@ var GraphEdge = forwardRef(function GraphEdge2({ x1, y1, x2, y2, curve, edgeStyl
|
|
|
537
648
|
}
|
|
538
649
|
);
|
|
539
650
|
}
|
|
540
|
-
return /* @__PURE__ */
|
|
651
|
+
return /* @__PURE__ */ jsx11("line", { ref, x1, y1, x2, y2, ...sharedProps });
|
|
541
652
|
});
|
|
542
653
|
GraphEdge.displayName = "GraphEdge";
|
|
543
|
-
|
|
654
|
+
|
|
655
|
+
// src/graph/GraphInspector.tsx
|
|
656
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
657
|
+
import { cn as cn11 } from "@ship-it-ui/ui";
|
|
658
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
659
|
+
var GraphInspector = forwardRef12(
|
|
544
660
|
function GraphInspector2({
|
|
545
661
|
type,
|
|
546
662
|
entityId,
|
|
@@ -553,47 +669,47 @@ var GraphInspector = forwardRef(
|
|
|
553
669
|
...props
|
|
554
670
|
}, ref) {
|
|
555
671
|
const total = relationCount ?? relations?.length ?? 0;
|
|
556
|
-
return /* @__PURE__ */
|
|
672
|
+
return /* @__PURE__ */ jsxs11(
|
|
557
673
|
"aside",
|
|
558
674
|
{
|
|
559
675
|
ref,
|
|
560
676
|
"aria-label": typeof title === "string" ? `${title} inspector` : "Node inspector",
|
|
561
|
-
className:
|
|
677
|
+
className: cn11(
|
|
562
678
|
"rounded-base border-border bg-panel flex w-[340px] flex-col gap-3 border p-4",
|
|
563
679
|
className
|
|
564
680
|
),
|
|
565
681
|
...props,
|
|
566
682
|
children: [
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
entityId && /* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center", children: [
|
|
684
|
+
/* @__PURE__ */ jsx12(EntityBadge, { type, size: "sm" }),
|
|
685
|
+
entityId && /* @__PURE__ */ jsx12("span", { className: "text-text-dim ml-auto font-mono text-[10px]", children: entityId })
|
|
570
686
|
] }),
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
-
description && /* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ jsxs11("div", { children: [
|
|
688
|
+
/* @__PURE__ */ jsx12("div", { className: "text-[17px] font-medium", children: title }),
|
|
689
|
+
description && /* @__PURE__ */ jsx12("div", { className: "text-text-muted mt-[2px] text-[12px]", children: description })
|
|
574
690
|
] }),
|
|
575
|
-
properties && properties.length > 0 && /* @__PURE__ */
|
|
576
|
-
/* @__PURE__ */
|
|
577
|
-
/* @__PURE__ */
|
|
691
|
+
properties && properties.length > 0 && /* @__PURE__ */ jsxs11("section", { children: [
|
|
692
|
+
/* @__PURE__ */ jsx12("div", { className: "text-text-dim mb-2 font-mono text-[9px] tracking-[1.4px] uppercase", children: "Properties" }),
|
|
693
|
+
/* @__PURE__ */ jsx12("dl", { className: "m-0 flex flex-col gap-1 font-mono text-[11px]", children: properties.map((p, i) => /* @__PURE__ */ jsxs11(
|
|
578
694
|
"div",
|
|
579
695
|
{
|
|
580
|
-
className:
|
|
696
|
+
className: cn11("border-border flex py-1", i < properties.length - 1 && "border-b"),
|
|
581
697
|
children: [
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ jsx12("dt", { className: "text-text-dim w-[70px]", children: p.key }),
|
|
699
|
+
/* @__PURE__ */ jsx12("dd", { className: "m-0 flex-1", children: p.value })
|
|
584
700
|
]
|
|
585
701
|
},
|
|
586
702
|
i
|
|
587
703
|
)) })
|
|
588
704
|
] }),
|
|
589
|
-
relations && relations.length > 0 && /* @__PURE__ */
|
|
590
|
-
/* @__PURE__ */
|
|
705
|
+
relations && relations.length > 0 && /* @__PURE__ */ jsxs11("section", { children: [
|
|
706
|
+
/* @__PURE__ */ jsxs11("div", { className: "text-text-dim mb-2 font-mono text-[9px] tracking-[1.4px] uppercase", children: [
|
|
591
707
|
"Relations \xB7 ",
|
|
592
708
|
total
|
|
593
709
|
] }),
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
/* @__PURE__ */
|
|
596
|
-
/* @__PURE__ */
|
|
710
|
+
/* @__PURE__ */ jsx12("ul", { className: "m-0 flex list-none flex-col gap-1 p-0 text-[11px]", children: relations.map((r, i) => /* @__PURE__ */ jsxs11("li", { className: "flex gap-2", children: [
|
|
711
|
+
/* @__PURE__ */ jsx12("span", { className: "text-text-dim w-[100px] font-mono", children: r.relation }),
|
|
712
|
+
/* @__PURE__ */ jsx12("span", { children: r.entity })
|
|
597
713
|
] }, i)) })
|
|
598
714
|
] })
|
|
599
715
|
]
|
|
@@ -602,6 +718,11 @@ var GraphInspector = forwardRef(
|
|
|
602
718
|
}
|
|
603
719
|
);
|
|
604
720
|
GraphInspector.displayName = "GraphInspector";
|
|
721
|
+
|
|
722
|
+
// src/graph/GraphLegend.tsx
|
|
723
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
724
|
+
import { cn as cn12 } from "@ship-it-ui/ui";
|
|
725
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
605
726
|
var typeColorVar = {
|
|
606
727
|
service: "var(--color-accent)",
|
|
607
728
|
person: "var(--color-purple)",
|
|
@@ -615,23 +736,23 @@ var DEFAULT_ENTRIES = [
|
|
|
615
736
|
{ type: "person", label: ENTITY_LABEL.person },
|
|
616
737
|
{ type: "document", label: ENTITY_LABEL.document }
|
|
617
738
|
];
|
|
618
|
-
var GraphLegend =
|
|
619
|
-
return /* @__PURE__ */
|
|
739
|
+
var GraphLegend = forwardRef13(function GraphLegend2({ entries = DEFAULT_ENTRIES, heading = "Legend", className, children, ...props }, ref) {
|
|
740
|
+
return /* @__PURE__ */ jsxs12(
|
|
620
741
|
"div",
|
|
621
742
|
{
|
|
622
743
|
ref,
|
|
623
|
-
className:
|
|
744
|
+
className: cn12(
|
|
624
745
|
"rounded-base border-border bg-panel/85 inline-flex flex-col gap-[6px] border p-[10px] text-[11px] backdrop-blur-[8px]",
|
|
625
746
|
className
|
|
626
747
|
),
|
|
627
748
|
...props,
|
|
628
749
|
children: [
|
|
629
|
-
heading && /* @__PURE__ */
|
|
750
|
+
heading && /* @__PURE__ */ jsx13("div", { className: "text-text-dim font-mono text-[9px] tracking-[1.4px] uppercase", children: heading }),
|
|
630
751
|
children ?? entries.map((entry, i) => {
|
|
631
752
|
const color = entry.color ?? (entry.type ? typeColorVar[entry.type] : "currentColor");
|
|
632
|
-
return /* @__PURE__ */
|
|
633
|
-
/* @__PURE__ */
|
|
634
|
-
/* @__PURE__ */
|
|
753
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-[6px]", children: [
|
|
754
|
+
/* @__PURE__ */ jsx13("span", { "aria-hidden": true, className: "h-2 w-2 rounded-full", style: { background: color } }),
|
|
755
|
+
/* @__PURE__ */ jsx13("span", { children: entry.label })
|
|
635
756
|
] }, i);
|
|
636
757
|
})
|
|
637
758
|
]
|
|
@@ -639,21 +760,26 @@ var GraphLegend = forwardRef(function GraphLegend2({ entries = DEFAULT_ENTRIES,
|
|
|
639
760
|
);
|
|
640
761
|
});
|
|
641
762
|
GraphLegend.displayName = "GraphLegend";
|
|
642
|
-
|
|
643
|
-
|
|
763
|
+
|
|
764
|
+
// src/graph/GraphMinimap.tsx
|
|
765
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
766
|
+
import { cn as cn13 } from "@ship-it-ui/ui";
|
|
767
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
768
|
+
var GraphMinimap = forwardRef14(function GraphMinimap2({ points, viewport, width = 120, height = 72, className, ...props }, ref) {
|
|
769
|
+
return /* @__PURE__ */ jsx14(
|
|
644
770
|
"div",
|
|
645
771
|
{
|
|
646
772
|
ref,
|
|
647
773
|
role: "img",
|
|
648
774
|
"aria-label": "Graph minimap",
|
|
649
|
-
className:
|
|
775
|
+
className: cn13(
|
|
650
776
|
"border-border bg-panel/85 relative rounded-md border p-1 backdrop-blur-[8px]",
|
|
651
777
|
className
|
|
652
778
|
),
|
|
653
779
|
style: { width, height },
|
|
654
780
|
...props,
|
|
655
|
-
children: /* @__PURE__ */
|
|
656
|
-
points.map((p, i) => /* @__PURE__ */
|
|
781
|
+
children: /* @__PURE__ */ jsxs13("div", { className: "relative h-full w-full", children: [
|
|
782
|
+
points.map((p, i) => /* @__PURE__ */ jsx14(
|
|
657
783
|
"span",
|
|
658
784
|
{
|
|
659
785
|
"aria-hidden": true,
|
|
@@ -666,17 +792,18 @@ var GraphMinimap = forwardRef(function GraphMinimap2({ points, viewport, width =
|
|
|
666
792
|
},
|
|
667
793
|
i
|
|
668
794
|
)),
|
|
669
|
-
viewport && /* @__PURE__ */
|
|
795
|
+
viewport && /* @__PURE__ */ jsx14(
|
|
670
796
|
"span",
|
|
671
797
|
{
|
|
672
798
|
"aria-hidden": true,
|
|
799
|
+
"data-testid": "minimap-viewport",
|
|
673
800
|
className: "border-accent absolute rounded-[2px] border",
|
|
674
801
|
style: {
|
|
675
802
|
left: `${viewport.x * 100}%`,
|
|
676
803
|
top: `${viewport.y * 100}%`,
|
|
677
804
|
width: `${viewport.width * 100}%`,
|
|
678
805
|
height: `${viewport.height * 100}%`,
|
|
679
|
-
background: "
|
|
806
|
+
background: "var(--color-accent-glow)"
|
|
680
807
|
}
|
|
681
808
|
}
|
|
682
809
|
)
|
|
@@ -685,6 +812,11 @@ var GraphMinimap = forwardRef(function GraphMinimap2({ points, viewport, width =
|
|
|
685
812
|
);
|
|
686
813
|
});
|
|
687
814
|
GraphMinimap.displayName = "GraphMinimap";
|
|
815
|
+
|
|
816
|
+
// src/graph/GraphNode.tsx
|
|
817
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
818
|
+
import { cn as cn14 } from "@ship-it-ui/ui";
|
|
819
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
688
820
|
var typeColorVar2 = {
|
|
689
821
|
service: "var(--color-accent)",
|
|
690
822
|
person: "var(--color-purple)",
|
|
@@ -693,12 +825,12 @@ var typeColorVar2 = {
|
|
|
693
825
|
incident: "var(--color-warn)",
|
|
694
826
|
ticket: "var(--color-text-muted)"
|
|
695
827
|
};
|
|
696
|
-
var GraphNode =
|
|
828
|
+
var GraphNode = forwardRef15(function GraphNode2({ type, state = "default", glyph, label, size = 52, pathColor, className, style, ...props }, ref) {
|
|
697
829
|
const color = state === "path" ? pathColor ?? "var(--color-purple)" : typeColorVar2[type];
|
|
698
|
-
const
|
|
830
|
+
const glowPct = state === "hover" ? 50 : 25;
|
|
699
831
|
const opacity = state === "dim" ? 0.35 : 1;
|
|
700
832
|
const showRing = state === "selected" || state === "path";
|
|
701
|
-
return /* @__PURE__ */
|
|
833
|
+
return /* @__PURE__ */ jsxs14(
|
|
702
834
|
"div",
|
|
703
835
|
{
|
|
704
836
|
ref,
|
|
@@ -706,11 +838,11 @@ var GraphNode = forwardRef(function GraphNode2({ type, state = "default", glyph,
|
|
|
706
838
|
"aria-label": typeof label === "string" ? label : `${type} node`,
|
|
707
839
|
"data-state": state,
|
|
708
840
|
"data-entity-type": type,
|
|
709
|
-
className:
|
|
841
|
+
className: cn14("inline-flex flex-col items-center gap-[6px]", className),
|
|
710
842
|
style,
|
|
711
843
|
...props,
|
|
712
844
|
children: [
|
|
713
|
-
/* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ jsx15(
|
|
714
846
|
"div",
|
|
715
847
|
{
|
|
716
848
|
className: "bg-panel grid place-items-center rounded-[14px] border-[1.5px] transition-all duration-(--duration-micro)",
|
|
@@ -720,7 +852,7 @@ var GraphNode = forwardRef(function GraphNode2({ type, state = "default", glyph,
|
|
|
720
852
|
borderColor: color,
|
|
721
853
|
color,
|
|
722
854
|
fontSize: Math.round(size * 0.42),
|
|
723
|
-
boxShadow: `0 0 ${state === "hover" ? 30 : 20}px ${color}${
|
|
855
|
+
boxShadow: `0 0 ${state === "hover" ? 30 : 20}px color-mix(in oklab, ${color} ${glowPct}%, transparent)`,
|
|
724
856
|
outline: showRing ? `2px solid ${color}` : void 0,
|
|
725
857
|
outlineOffset: showRing ? 4 : void 0,
|
|
726
858
|
opacity
|
|
@@ -728,17 +860,21 @@ var GraphNode = forwardRef(function GraphNode2({ type, state = "default", glyph,
|
|
|
728
860
|
children: glyph ?? ENTITY_GLYPH[type]
|
|
729
861
|
}
|
|
730
862
|
),
|
|
731
|
-
label && /* @__PURE__ */
|
|
863
|
+
label && /* @__PURE__ */ jsx15("span", { className: "text-text-dim font-mono text-[10px]", children: label })
|
|
732
864
|
]
|
|
733
865
|
}
|
|
734
866
|
);
|
|
735
867
|
});
|
|
736
868
|
GraphNode.displayName = "GraphNode";
|
|
737
|
-
|
|
869
|
+
|
|
870
|
+
// src/graph/PathOverlay.tsx
|
|
871
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
872
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
873
|
+
var PathOverlay = forwardRef16(function PathOverlay2({ points, color = "var(--color-purple)", width = 2.5, halo = true, ...props }, ref) {
|
|
738
874
|
if (points.length < 2) return null;
|
|
739
875
|
const coords = points.map((p) => `${p.x},${p.y}`).join(" ");
|
|
740
|
-
return /* @__PURE__ */
|
|
741
|
-
halo && /* @__PURE__ */
|
|
876
|
+
return /* @__PURE__ */ jsxs15("g", { ref, ...props, children: [
|
|
877
|
+
halo && /* @__PURE__ */ jsx16(
|
|
742
878
|
"polyline",
|
|
743
879
|
{
|
|
744
880
|
points: coords,
|
|
@@ -750,7 +886,7 @@ var PathOverlay = forwardRef(function PathOverlay2({ points, color = "var(--colo
|
|
|
750
886
|
opacity: 0.65
|
|
751
887
|
}
|
|
752
888
|
),
|
|
753
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ jsx16(
|
|
754
890
|
"polyline",
|
|
755
891
|
{
|
|
756
892
|
points: coords,
|
|
@@ -764,54 +900,69 @@ var PathOverlay = forwardRef(function PathOverlay2({ points, color = "var(--colo
|
|
|
764
900
|
] });
|
|
765
901
|
});
|
|
766
902
|
PathOverlay.displayName = "PathOverlay";
|
|
767
|
-
|
|
768
|
-
|
|
903
|
+
|
|
904
|
+
// src/marketing/CTAStrip.tsx
|
|
905
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
906
|
+
import { cn as cn15 } from "@ship-it-ui/ui";
|
|
907
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
908
|
+
var CTAStrip = forwardRef17(function CTAStrip2({ title, description, actions, className, ...props }, ref) {
|
|
909
|
+
return /* @__PURE__ */ jsxs16(
|
|
769
910
|
"section",
|
|
770
911
|
{
|
|
771
912
|
ref,
|
|
772
|
-
className:
|
|
913
|
+
className: cn15(
|
|
773
914
|
"rounded-xl px-10 py-12 text-center",
|
|
774
|
-
"bg-[linear-gradient(135deg,
|
|
915
|
+
"bg-[linear-gradient(135deg,var(--color-cta-from),var(--color-cta-to))]",
|
|
775
916
|
className
|
|
776
917
|
),
|
|
777
918
|
...props,
|
|
778
919
|
children: [
|
|
779
|
-
/* @__PURE__ */
|
|
780
|
-
description && /* @__PURE__ */
|
|
781
|
-
actions && /* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ jsx17("h2", { className: "m-0 mb-[10px] text-[28px] font-medium tracking-[-0.4px]", children: title }),
|
|
921
|
+
description && /* @__PURE__ */ jsx17("p", { className: "text-text-muted m-0 mb-5 text-[13px]", children: description }),
|
|
922
|
+
actions && /* @__PURE__ */ jsx17("div", { className: "flex flex-wrap justify-center gap-2", children: actions })
|
|
782
923
|
]
|
|
783
924
|
}
|
|
784
925
|
);
|
|
785
926
|
});
|
|
786
927
|
CTAStrip.displayName = "CTAStrip";
|
|
928
|
+
|
|
929
|
+
// src/marketing/FeatureGrid.tsx
|
|
930
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
931
|
+
import { cn as cn16 } from "@ship-it-ui/ui";
|
|
932
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
787
933
|
var colsClass = {
|
|
788
934
|
2: "md:grid-cols-2",
|
|
789
935
|
3: "md:grid-cols-3",
|
|
790
936
|
4: "md:grid-cols-2 lg:grid-cols-4"
|
|
791
937
|
};
|
|
792
|
-
var FeatureGrid =
|
|
793
|
-
return /* @__PURE__ */
|
|
938
|
+
var FeatureGrid = forwardRef18(function FeatureGrid2({ features, columns = 3, className, ...props }, ref) {
|
|
939
|
+
return /* @__PURE__ */ jsx18(
|
|
794
940
|
"div",
|
|
795
941
|
{
|
|
796
942
|
ref,
|
|
797
|
-
className:
|
|
943
|
+
className: cn16("grid grid-cols-1 gap-3", colsClass[columns], className),
|
|
798
944
|
...props,
|
|
799
|
-
children: features.map((f, i) => /* @__PURE__ */
|
|
800
|
-
/* @__PURE__ */
|
|
801
|
-
/* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
945
|
+
children: features.map((f, i) => /* @__PURE__ */ jsxs17("div", { className: "rounded-base border-border bg-panel border p-5", children: [
|
|
946
|
+
/* @__PURE__ */ jsx18("div", { "aria-hidden": true, className: "text-accent mb-3 text-[22px]", children: f.glyph }),
|
|
947
|
+
/* @__PURE__ */ jsx18("div", { className: "mb-[6px] text-[14px] font-medium", children: f.title }),
|
|
948
|
+
/* @__PURE__ */ jsx18("div", { className: "text-text-muted text-[12px] leading-[1.55]", children: f.description })
|
|
803
949
|
] }, i))
|
|
804
950
|
}
|
|
805
951
|
);
|
|
806
952
|
});
|
|
807
953
|
FeatureGrid.displayName = "FeatureGrid";
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
954
|
+
|
|
955
|
+
// src/marketing/Footer.tsx
|
|
956
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
957
|
+
import { cn as cn17 } from "@ship-it-ui/ui";
|
|
958
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
959
|
+
var Footer = forwardRef19(function Footer2({ brand, columns, copyright, closing, className, ...props }, ref) {
|
|
960
|
+
return /* @__PURE__ */ jsxs18("footer", { ref, className: cn17("px-7 py-7", className), ...props, children: [
|
|
961
|
+
/* @__PURE__ */ jsxs18("div", { className: "mb-7 flex flex-wrap gap-8", children: [
|
|
962
|
+
brand && /* @__PURE__ */ jsx19("div", { children: brand }),
|
|
963
|
+
/* @__PURE__ */ jsx19("div", { className: "text-text-muted ml-auto flex flex-wrap gap-6 text-[12px]", children: columns.map((col, i) => /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-[6px]", children: [
|
|
964
|
+
/* @__PURE__ */ jsx19("div", { className: "text-text-dim font-mono text-[10px] tracking-[1.2px] uppercase", children: col.heading }),
|
|
965
|
+
col.links.map((link, j) => /* @__PURE__ */ jsx19(
|
|
815
966
|
"a",
|
|
816
967
|
{
|
|
817
968
|
href: link.href,
|
|
@@ -822,92 +973,111 @@ var Footer = forwardRef(function Footer2({ brand, columns, copyright, closing, c
|
|
|
822
973
|
))
|
|
823
974
|
] }, i)) })
|
|
824
975
|
] }),
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
copyright && /* @__PURE__ */
|
|
827
|
-
closing && /* @__PURE__ */
|
|
976
|
+
/* @__PURE__ */ jsxs18("div", { className: "border-border text-text-dim flex border-t pt-4 font-mono text-[11px]", children: [
|
|
977
|
+
copyright && /* @__PURE__ */ jsx19("span", { children: copyright }),
|
|
978
|
+
closing && /* @__PURE__ */ jsx19("span", { className: "ml-auto", children: closing })
|
|
828
979
|
] })
|
|
829
980
|
] });
|
|
830
981
|
});
|
|
831
982
|
Footer.displayName = "Footer";
|
|
832
|
-
|
|
983
|
+
|
|
984
|
+
// src/marketing/Hero.tsx
|
|
985
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
986
|
+
import { cn as cn18 } from "@ship-it-ui/ui";
|
|
987
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
988
|
+
var Hero = forwardRef20(function Hero2({ eyebrow, title, description, actions, visual, className, ...props }, ref) {
|
|
833
989
|
const hasVisual = visual != null;
|
|
834
|
-
return /* @__PURE__ */
|
|
990
|
+
return /* @__PURE__ */ jsxs19(
|
|
835
991
|
"section",
|
|
836
992
|
{
|
|
837
993
|
ref,
|
|
838
|
-
className:
|
|
994
|
+
className: cn18(
|
|
839
995
|
"flex flex-col items-center justify-between gap-10 px-6 py-16 md:py-24",
|
|
840
996
|
hasVisual && "md:flex-row md:items-center md:gap-16",
|
|
841
997
|
className
|
|
842
998
|
),
|
|
843
999
|
...props,
|
|
844
1000
|
children: [
|
|
845
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ jsxs19("div", { className: cn18("max-w-[680px]", !hasVisual && "mx-auto text-center"), children: [
|
|
846
1002
|
eyebrow,
|
|
847
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ jsx20(
|
|
848
1004
|
"h1",
|
|
849
1005
|
{
|
|
850
|
-
className:
|
|
1006
|
+
className: cn18(
|
|
851
1007
|
"mb-4 text-[44px] leading-[1.05] font-medium tracking-[-1.6px] md:text-[56px]",
|
|
852
1008
|
eyebrow && "mt-5"
|
|
853
1009
|
),
|
|
854
1010
|
children: title
|
|
855
1011
|
}
|
|
856
1012
|
),
|
|
857
|
-
description && /* @__PURE__ */
|
|
858
|
-
actions && /* @__PURE__ */
|
|
1013
|
+
description && /* @__PURE__ */ jsx20("p", { className: "text-text-muted mb-7 text-[17px] leading-[1.6]", children: description }),
|
|
1014
|
+
actions && /* @__PURE__ */ jsx20("div", { className: cn18("flex flex-wrap gap-2", !hasVisual && "justify-center"), children: actions })
|
|
859
1015
|
] }),
|
|
860
|
-
visual && /* @__PURE__ */
|
|
1016
|
+
visual && /* @__PURE__ */ jsx20("div", { className: "flex-1", children: visual })
|
|
861
1017
|
]
|
|
862
1018
|
}
|
|
863
1019
|
);
|
|
864
1020
|
});
|
|
865
1021
|
Hero.displayName = "Hero";
|
|
866
|
-
|
|
867
|
-
|
|
1022
|
+
|
|
1023
|
+
// src/marketing/PricingCard.tsx
|
|
1024
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
1025
|
+
import { cn as cn19 } from "@ship-it-ui/ui";
|
|
1026
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1027
|
+
var PricingCard = forwardRef21(function PricingCard2({ tier, price, priceUnit, description, features, action, featured, className, ...props }, ref) {
|
|
1028
|
+
return /* @__PURE__ */ jsxs20(
|
|
868
1029
|
"div",
|
|
869
1030
|
{
|
|
870
1031
|
ref,
|
|
871
|
-
className:
|
|
872
|
-
"bg-panel flex flex-col gap-5 rounded-lg border p-6",
|
|
1032
|
+
className: cn19(
|
|
1033
|
+
"bg-panel @container flex flex-col gap-5 rounded-lg border p-5 @sm:p-6",
|
|
873
1034
|
featured ? "border-accent shadow-lg" : "border-border",
|
|
874
1035
|
className
|
|
875
1036
|
),
|
|
876
1037
|
...props,
|
|
877
1038
|
children: [
|
|
878
|
-
/* @__PURE__ */
|
|
879
|
-
/* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
881
|
-
featured && /* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
1040
|
+
/* @__PURE__ */ jsxs20("div", { className: "mb-1 flex flex-wrap items-center gap-2", children: [
|
|
1041
|
+
/* @__PURE__ */ jsx21("span", { className: "text-[14px] font-medium", children: tier }),
|
|
1042
|
+
featured && /* @__PURE__ */ jsx21("span", { className: "bg-accent-dim text-accent rounded-full px-[6px] py-[1px] font-mono text-[10px]", children: "recommended" })
|
|
882
1043
|
] }),
|
|
883
|
-
description && /* @__PURE__ */
|
|
1044
|
+
description && /* @__PURE__ */ jsx21("div", { className: "text-text-muted text-[12px]", children: description })
|
|
884
1045
|
] }),
|
|
885
|
-
/* @__PURE__ */
|
|
886
|
-
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
-
|
|
1046
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap items-baseline justify-center gap-x-2 gap-y-1", children: [
|
|
1047
|
+
/* @__PURE__ */ jsx21("span", { className: "font-mono text-[22px] font-medium tracking-[-0.5px] text-balance @sm:text-[28px]", children: price }),
|
|
1048
|
+
priceUnit != null && /* @__PURE__ */ jsx21("span", { className: "text-text-dim text-[12px] whitespace-nowrap @sm:text-[13px]", children: priceUnit })
|
|
1049
|
+
] }),
|
|
1050
|
+
/* @__PURE__ */ jsx21("ul", { className: "m-0 flex list-none flex-col gap-2 p-0", children: features.map((f, i) => /* @__PURE__ */ jsxs20("li", { className: "flex items-start gap-2 text-[13px]", children: [
|
|
1051
|
+
/* @__PURE__ */ jsx21("span", { "aria-hidden": true, className: "text-accent", children: "\u2713" }),
|
|
1052
|
+
/* @__PURE__ */ jsx21("span", { children: f })
|
|
889
1053
|
] }, i)) }),
|
|
890
|
-
action && /* @__PURE__ */
|
|
1054
|
+
action && /* @__PURE__ */ jsx21("div", { className: "mt-auto", children: action })
|
|
891
1055
|
]
|
|
892
1056
|
}
|
|
893
1057
|
);
|
|
894
1058
|
});
|
|
895
1059
|
PricingCard.displayName = "PricingCard";
|
|
896
|
-
|
|
897
|
-
|
|
1060
|
+
|
|
1061
|
+
// src/marketing/Testimonial.tsx
|
|
1062
|
+
import { Avatar as Avatar2 } from "@ship-it-ui/ui";
|
|
1063
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
1064
|
+
import { cn as cn20 } from "@ship-it-ui/ui";
|
|
1065
|
+
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1066
|
+
var Testimonial = forwardRef22(function Testimonial2({ quote, author, role, avatar, className, ...props }, ref) {
|
|
1067
|
+
return /* @__PURE__ */ jsxs21(
|
|
898
1068
|
"figure",
|
|
899
1069
|
{
|
|
900
1070
|
ref,
|
|
901
|
-
className:
|
|
1071
|
+
className: cn20("mx-auto max-w-[620px] px-6 py-10 text-center", className),
|
|
902
1072
|
...props,
|
|
903
1073
|
children: [
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
/* @__PURE__ */
|
|
907
|
-
typeof avatar === "string" ? /* @__PURE__ */
|
|
908
|
-
/* @__PURE__ */
|
|
909
|
-
/* @__PURE__ */
|
|
910
|
-
role && /* @__PURE__ */
|
|
1074
|
+
/* @__PURE__ */ jsx22("div", { "aria-hidden": true, className: "text-accent mb-4 text-[40px] leading-none", children: "\u201C" }),
|
|
1075
|
+
/* @__PURE__ */ jsx22("blockquote", { className: "m-0 text-[22px] leading-[1.45] font-medium tracking-[-0.3px]", children: quote }),
|
|
1076
|
+
/* @__PURE__ */ jsxs21("figcaption", { className: "mt-5 flex items-center justify-center gap-[10px]", children: [
|
|
1077
|
+
typeof avatar === "string" ? /* @__PURE__ */ jsx22(Avatar2, { size: "md", name: avatar }) : avatar,
|
|
1078
|
+
/* @__PURE__ */ jsxs21("div", { className: "text-left", children: [
|
|
1079
|
+
/* @__PURE__ */ jsx22("div", { className: "text-[13px] font-medium", children: author }),
|
|
1080
|
+
role && /* @__PURE__ */ jsx22("div", { className: "text-text-dim text-[11px]", children: role })
|
|
911
1081
|
] })
|
|
912
1082
|
] })
|
|
913
1083
|
]
|
|
@@ -916,6 +1086,66 @@ var Testimonial = forwardRef(function Testimonial2({ quote, author, role, avatar
|
|
|
916
1086
|
});
|
|
917
1087
|
Testimonial.displayName = "Testimonial";
|
|
918
1088
|
|
|
919
|
-
|
|
920
|
-
|
|
1089
|
+
// src/data/EntityTable.tsx
|
|
1090
|
+
import { DataTable } from "@ship-it-ui/ui";
|
|
1091
|
+
import "react";
|
|
1092
|
+
import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1093
|
+
function EntityTable(props) {
|
|
1094
|
+
const { rowKey, ...rest } = props;
|
|
1095
|
+
return /* @__PURE__ */ jsx23(DataTable, { ...rest, rowKey: rowKey ?? ((row) => row.id) });
|
|
1096
|
+
}
|
|
1097
|
+
function entityColumn(options = {}) {
|
|
1098
|
+
return {
|
|
1099
|
+
key: options.key ?? "name",
|
|
1100
|
+
header: options.header ?? "Name",
|
|
1101
|
+
accessor: (row) => row.name,
|
|
1102
|
+
cell: (row) => /* @__PURE__ */ jsxs22("span", { className: "flex items-center gap-2 font-mono", children: [
|
|
1103
|
+
/* @__PURE__ */ jsx23("span", { "aria-hidden": true, className: ENTITY_TONE_CLASS[row.type], children: ENTITY_GLYPH[row.type] }),
|
|
1104
|
+
row.name
|
|
1105
|
+
] })
|
|
1106
|
+
};
|
|
1107
|
+
}
|
|
1108
|
+
function entityTypeColumn(options = {}) {
|
|
1109
|
+
return {
|
|
1110
|
+
key: options.key ?? "type",
|
|
1111
|
+
header: options.header ?? "Type",
|
|
1112
|
+
accessor: (row) => row.type,
|
|
1113
|
+
cell: (row) => /* @__PURE__ */ jsx23(EntityBadge, { type: row.type, size: "sm" })
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
export {
|
|
1117
|
+
AskBar,
|
|
1118
|
+
CTAStrip,
|
|
1119
|
+
Citation,
|
|
1120
|
+
ConfidenceIndicator,
|
|
1121
|
+
CopilotMessage,
|
|
1122
|
+
ENTITY_GLYPH,
|
|
1123
|
+
ENTITY_LABEL,
|
|
1124
|
+
ENTITY_TONE_BG,
|
|
1125
|
+
ENTITY_TONE_CLASS,
|
|
1126
|
+
EntityBadge,
|
|
1127
|
+
EntityCard,
|
|
1128
|
+
EntityListRow,
|
|
1129
|
+
EntityListRowButton,
|
|
1130
|
+
EntityListRowDiv,
|
|
1131
|
+
EntityTable,
|
|
1132
|
+
FeatureGrid,
|
|
1133
|
+
Footer,
|
|
1134
|
+
GraphEdge,
|
|
1135
|
+
GraphInspector,
|
|
1136
|
+
GraphLegend,
|
|
1137
|
+
GraphMinimap,
|
|
1138
|
+
GraphNode,
|
|
1139
|
+
Hero,
|
|
1140
|
+
PathOverlay,
|
|
1141
|
+
PricingCard,
|
|
1142
|
+
ReasoningBlock,
|
|
1143
|
+
ReasoningStep,
|
|
1144
|
+
SuggestionChip,
|
|
1145
|
+
Testimonial,
|
|
1146
|
+
ToolCallCard,
|
|
1147
|
+
cn21 as cn,
|
|
1148
|
+
entityColumn,
|
|
1149
|
+
entityTypeColumn
|
|
1150
|
+
};
|
|
921
1151
|
//# sourceMappingURL=index.js.map
|