@ship-it-ui/shipit 0.0.1
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/LICENSE +21 -0
- package/README.md +36 -0
- package/dist/index.cjs +950 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +461 -0
- package/dist/index.d.ts +461 -0
- package/dist/index.js +921 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,950 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var clsx = require('clsx');
|
|
4
|
+
var tailwindMerge = require('tailwind-merge');
|
|
5
|
+
var ui = require('@ship-it-ui/ui');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
// src/utils/cn.ts
|
|
10
|
+
function cn(...inputs) {
|
|
11
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
12
|
+
}
|
|
13
|
+
var AskBar = react.forwardRef(function AskBar2({
|
|
14
|
+
value: valueProp,
|
|
15
|
+
defaultValue,
|
|
16
|
+
onValueChange,
|
|
17
|
+
onSubmit,
|
|
18
|
+
placeholder = "Ask anything\u2026",
|
|
19
|
+
streaming,
|
|
20
|
+
submitLabel = "Ask",
|
|
21
|
+
disabled,
|
|
22
|
+
maxWidth = 620,
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
...props
|
|
26
|
+
}, ref) {
|
|
27
|
+
const [value, setValue] = ui.useControllableState({
|
|
28
|
+
value: valueProp,
|
|
29
|
+
defaultValue: defaultValue ?? "",
|
|
30
|
+
onChange: onValueChange
|
|
31
|
+
});
|
|
32
|
+
const inputRef = react.useRef(null);
|
|
33
|
+
const submit = () => {
|
|
34
|
+
const v = (value ?? "").trim();
|
|
35
|
+
if (!v) return;
|
|
36
|
+
onSubmit?.(v);
|
|
37
|
+
};
|
|
38
|
+
const handleSubmit = (e) => {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
submit();
|
|
41
|
+
};
|
|
42
|
+
const handleKey = (e) => {
|
|
43
|
+
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
submit();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
49
|
+
"form",
|
|
50
|
+
{
|
|
51
|
+
ref,
|
|
52
|
+
role: "search",
|
|
53
|
+
onSubmit: handleSubmit,
|
|
54
|
+
style: { maxWidth },
|
|
55
|
+
className: cn(
|
|
56
|
+
"border-border-strong bg-panel w-full rounded-xl border p-[14px] shadow",
|
|
57
|
+
"focus-within:border-accent focus-within:ring-accent-dim focus-within:ring-[3px]",
|
|
58
|
+
className
|
|
59
|
+
),
|
|
60
|
+
...props,
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-[10px] flex items-start gap-[10px]", children: [
|
|
63
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "text-accent text-[16px]", children: "\u2726" }),
|
|
64
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
65
|
+
"textarea",
|
|
66
|
+
{
|
|
67
|
+
ref: inputRef,
|
|
68
|
+
value: value ?? "",
|
|
69
|
+
onChange: (e) => setValue(e.target.value),
|
|
70
|
+
onKeyDown: handleKey,
|
|
71
|
+
placeholder,
|
|
72
|
+
"aria-label": placeholder,
|
|
73
|
+
rows: 1,
|
|
74
|
+
className: cn(
|
|
75
|
+
"text-text flex-1 resize-none border-0 bg-transparent text-[14px] leading-[1.5] outline-none",
|
|
76
|
+
"placeholder:text-text-dim"
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
streaming && /* @__PURE__ */ jsxRuntime.jsx(
|
|
81
|
+
"span",
|
|
82
|
+
{
|
|
83
|
+
"aria-hidden": true,
|
|
84
|
+
className: "bg-accent mt-[3px] inline-block h-4 w-px animate-[ship-pulse_1s_infinite]"
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
] }),
|
|
88
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-[6px]", children: [
|
|
89
|
+
children,
|
|
90
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "text-text-dim font-mono text-[11px]", children: "\u2318\u21B5" }),
|
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
93
|
+
ui.Button,
|
|
94
|
+
{
|
|
95
|
+
type: "submit",
|
|
96
|
+
size: "sm",
|
|
97
|
+
variant: "primary",
|
|
98
|
+
disabled: disabled || !(value ?? "").trim(),
|
|
99
|
+
children: submitLabel
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] })
|
|
103
|
+
] })
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
AskBar.displayName = "AskBar";
|
|
109
|
+
var SUPERSCRIPTS = ["\u2070", "\xB9", "\xB2", "\xB3", "\u2074", "\u2075", "\u2076", "\u2077", "\u2078", "\u2079"];
|
|
110
|
+
function toSuperscript(n) {
|
|
111
|
+
return String(n).split("").map((d) => SUPERSCRIPTS[Number(d)] ?? d).join("");
|
|
112
|
+
}
|
|
113
|
+
var Citation = react.forwardRef(function Citation2({ index, source, meta, inline, className, ...props }, ref) {
|
|
114
|
+
if (inline) {
|
|
115
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
116
|
+
"sup",
|
|
117
|
+
{
|
|
118
|
+
ref,
|
|
119
|
+
"aria-label": typeof source === "string" ? `Citation ${index}: ${source}` : `Citation ${index}`,
|
|
120
|
+
className: cn("text-accent ml-[2px] font-mono text-[10px]", className),
|
|
121
|
+
...props,
|
|
122
|
+
children: toSuperscript(index)
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { ref, className: cn("inline-flex items-center gap-2", className), ...props, children: [
|
|
127
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
128
|
+
"span",
|
|
129
|
+
{
|
|
130
|
+
"aria-hidden": true,
|
|
131
|
+
className: "bg-accent-dim text-accent rounded-xs px-[6px] py-[2px] font-mono text-[10px]",
|
|
132
|
+
children: toSuperscript(index)
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-text-muted text-[12px]", children: [
|
|
136
|
+
source != null && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
137
|
+
"from ",
|
|
138
|
+
source
|
|
139
|
+
] }),
|
|
140
|
+
source != null && meta != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-dim", children: " \xB7 " }),
|
|
141
|
+
meta
|
|
142
|
+
] })
|
|
143
|
+
] });
|
|
144
|
+
});
|
|
145
|
+
Citation.displayName = "Citation";
|
|
146
|
+
var tierLabel = {
|
|
147
|
+
high: "High",
|
|
148
|
+
medium: "Medium",
|
|
149
|
+
low: "Low \xB7 review",
|
|
150
|
+
unverified: "Unverified"
|
|
151
|
+
};
|
|
152
|
+
var tierBarClass = {
|
|
153
|
+
high: "bg-ok",
|
|
154
|
+
medium: "bg-accent",
|
|
155
|
+
low: "bg-warn",
|
|
156
|
+
unverified: "bg-err"
|
|
157
|
+
};
|
|
158
|
+
var tierTextClass = {
|
|
159
|
+
high: "text-ok",
|
|
160
|
+
medium: "text-accent",
|
|
161
|
+
low: "text-warn",
|
|
162
|
+
unverified: "text-err"
|
|
163
|
+
};
|
|
164
|
+
function deriveTier(value) {
|
|
165
|
+
if (value >= 95) return "high";
|
|
166
|
+
if (value >= 80) return "medium";
|
|
167
|
+
if (value >= 50) return "low";
|
|
168
|
+
return "unverified";
|
|
169
|
+
}
|
|
170
|
+
var ConfidenceIndicator = react.forwardRef(
|
|
171
|
+
function ConfidenceIndicator2({ value, tier: tierProp, label, width = 120, hideValue, className, ...props }, ref) {
|
|
172
|
+
const tier = tierProp ?? deriveTier(value);
|
|
173
|
+
const pct = Math.max(0, Math.min(100, value));
|
|
174
|
+
const display = label ?? tierLabel[tier];
|
|
175
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
176
|
+
"div",
|
|
177
|
+
{
|
|
178
|
+
ref,
|
|
179
|
+
role: "meter",
|
|
180
|
+
"aria-label": props["aria-label"] ?? "Confidence",
|
|
181
|
+
"aria-valuemin": 0,
|
|
182
|
+
"aria-valuemax": 100,
|
|
183
|
+
"aria-valuenow": Math.round(pct),
|
|
184
|
+
"aria-valuetext": `${Math.round(pct)}% \u2014 ${typeof display === "string" ? display : tierLabel[tier]}`,
|
|
185
|
+
className: cn("inline-flex items-center gap-[10px] text-[11px]", className),
|
|
186
|
+
...props,
|
|
187
|
+
children: [
|
|
188
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, style: { width }, className: "bg-panel-2 h-1 overflow-hidden rounded-full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
189
|
+
"span",
|
|
190
|
+
{
|
|
191
|
+
className: cn(
|
|
192
|
+
"block h-full rounded-full transition-[width] duration-(--duration-step)",
|
|
193
|
+
tierBarClass[tier]
|
|
194
|
+
),
|
|
195
|
+
style: { width: `${pct}%` }
|
|
196
|
+
}
|
|
197
|
+
) }),
|
|
198
|
+
!hideValue && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-text min-w-[44px] font-mono tabular-nums", children: [
|
|
199
|
+
pct.toFixed(1),
|
|
200
|
+
"%"
|
|
201
|
+
] }),
|
|
202
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: tierTextClass[tier], children: display })
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
ConfidenceIndicator.displayName = "ConfidenceIndicator";
|
|
209
|
+
var CopilotMessage = react.forwardRef(
|
|
210
|
+
function CopilotMessage2({ role, avatar, streaming, className, children, ...props }, ref) {
|
|
211
|
+
const isAssistant = role === "assistant";
|
|
212
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
ref,
|
|
216
|
+
className: cn("flex items-start gap-[10px]", className),
|
|
217
|
+
"data-role": role,
|
|
218
|
+
...props,
|
|
219
|
+
children: [
|
|
220
|
+
isAssistant ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
221
|
+
"span",
|
|
222
|
+
{
|
|
223
|
+
"aria-hidden": true,
|
|
224
|
+
className: "bg-accent-dim text-accent grid h-6 w-6 shrink-0 place-items-center rounded-full text-[11px] font-semibold",
|
|
225
|
+
children: "\u2726"
|
|
226
|
+
}
|
|
227
|
+
) : typeof avatar === "string" ? /* @__PURE__ */ jsxRuntime.jsx(ui.Avatar, { size: "sm", name: avatar }) : avatar ?? null,
|
|
228
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
229
|
+
"div",
|
|
230
|
+
{
|
|
231
|
+
className: cn(
|
|
232
|
+
"rounded-base min-w-0 flex-1 px-[14px] py-3 text-[13px] leading-[1.6]",
|
|
233
|
+
isAssistant ? "bg-panel border-border border" : "bg-panel-2"
|
|
234
|
+
),
|
|
235
|
+
children: [
|
|
236
|
+
children,
|
|
237
|
+
streaming && /* @__PURE__ */ jsxRuntime.jsx(
|
|
238
|
+
"span",
|
|
239
|
+
{
|
|
240
|
+
"aria-hidden": true,
|
|
241
|
+
className: "bg-accent ml-[2px] inline-block h-[14px] w-px animate-[ship-pulse_1s_infinite] align-middle"
|
|
242
|
+
}
|
|
243
|
+
)
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
);
|
|
252
|
+
CopilotMessage.displayName = "CopilotMessage";
|
|
253
|
+
var ReasoningBlock = react.forwardRef(
|
|
254
|
+
function ReasoningBlock2({
|
|
255
|
+
label,
|
|
256
|
+
stepCount,
|
|
257
|
+
duration,
|
|
258
|
+
open: openProp,
|
|
259
|
+
defaultOpen = false,
|
|
260
|
+
onOpenChange,
|
|
261
|
+
className,
|
|
262
|
+
children,
|
|
263
|
+
...props
|
|
264
|
+
}, ref) {
|
|
265
|
+
const [open, setOpen] = ui.useControllableState({
|
|
266
|
+
value: openProp,
|
|
267
|
+
defaultValue: defaultOpen,
|
|
268
|
+
onChange: onOpenChange
|
|
269
|
+
});
|
|
270
|
+
const inferredCount = stepCount ?? react.Children.count(children);
|
|
271
|
+
const heading = label ?? `Reasoning \xB7 ${inferredCount} step${inferredCount === 1 ? "" : "s"}`;
|
|
272
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
ref,
|
|
276
|
+
className: cn("border-border bg-panel-2 overflow-hidden rounded-md border", className),
|
|
277
|
+
...props,
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
280
|
+
"button",
|
|
281
|
+
{
|
|
282
|
+
type: "button",
|
|
283
|
+
"aria-expanded": open,
|
|
284
|
+
onClick: () => setOpen(!open),
|
|
285
|
+
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]",
|
|
286
|
+
children: [
|
|
287
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "text-text-dim font-mono text-[11px]", children: open ? "\u25BE" : "\u25B8" }),
|
|
288
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] font-medium", children: heading }),
|
|
289
|
+
duration != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-dim ml-auto font-mono text-[10px]", children: duration })
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
),
|
|
293
|
+
open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-border text-text-muted border-t px-[14px] py-[10px] pl-9 text-[11px] leading-[1.7]", children })
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
ReasoningBlock.displayName = "ReasoningBlock";
|
|
300
|
+
var ReasoningStep = react.forwardRef(function ReasoningStep2({ step, className, children, ...props }, ref) {
|
|
301
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("mb-[2px] last:mb-0", className), ...props, children: [
|
|
302
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-accent mr-[6px] font-mono", children: [
|
|
303
|
+
step,
|
|
304
|
+
"."
|
|
305
|
+
] }),
|
|
306
|
+
children
|
|
307
|
+
] });
|
|
308
|
+
});
|
|
309
|
+
ReasoningStep.displayName = "ReasoningStep";
|
|
310
|
+
var SuggestionChip = react.forwardRef(
|
|
311
|
+
function SuggestionChip2({ glyph = "\u2726", className, children, type, ...props }, ref) {
|
|
312
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
313
|
+
"button",
|
|
314
|
+
{
|
|
315
|
+
ref,
|
|
316
|
+
type: type ?? "button",
|
|
317
|
+
className: cn(
|
|
318
|
+
"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",
|
|
319
|
+
"transition-colors duration-(--duration-micro)",
|
|
320
|
+
"hover:border-border-strong hover:bg-panel-2",
|
|
321
|
+
"focus-visible:ring-accent-dim focus-visible:ring-[3px]",
|
|
322
|
+
className
|
|
323
|
+
),
|
|
324
|
+
...props,
|
|
325
|
+
children: [
|
|
326
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "text-accent", children: glyph }),
|
|
327
|
+
children
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
SuggestionChip.displayName = "SuggestionChip";
|
|
334
|
+
var ToolCallCard = react.forwardRef(function ToolCallCard2({ name, status, running, className, children, ...props }, ref) {
|
|
335
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
336
|
+
"div",
|
|
337
|
+
{
|
|
338
|
+
ref,
|
|
339
|
+
className: cn("border-border bg-panel rounded-md border px-[14px] py-[10px]", className),
|
|
340
|
+
...props,
|
|
341
|
+
children: [
|
|
342
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[10px]", children: [
|
|
343
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { size: "sm", variant: "accent", children: "TOOL" }),
|
|
344
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-[12px] font-medium", children: name }),
|
|
345
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-dim ml-auto inline-flex items-center font-mono text-[10px]", children: running ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
346
|
+
"running",
|
|
347
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
348
|
+
"span",
|
|
349
|
+
{
|
|
350
|
+
"aria-hidden": true,
|
|
351
|
+
className: "bg-accent ml-1 inline-block h-3 w-px animate-[ship-pulse_1s_infinite] align-middle"
|
|
352
|
+
}
|
|
353
|
+
)
|
|
354
|
+
] }) : status })
|
|
355
|
+
] }),
|
|
356
|
+
children && /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-text-muted m-0 mt-[6px] font-mono text-[11px] leading-[1.6] break-words whitespace-pre-wrap", children })
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
);
|
|
360
|
+
});
|
|
361
|
+
ToolCallCard.displayName = "ToolCallCard";
|
|
362
|
+
|
|
363
|
+
// src/entity/types.ts
|
|
364
|
+
var ENTITY_GLYPH = {
|
|
365
|
+
service: "\u25C7",
|
|
366
|
+
person: "\u25CB",
|
|
367
|
+
document: "\u25A4",
|
|
368
|
+
deployment: "\u2191",
|
|
369
|
+
incident: "\u25CE",
|
|
370
|
+
ticket: "\u25A2"
|
|
371
|
+
};
|
|
372
|
+
var ENTITY_LABEL = {
|
|
373
|
+
service: "Service",
|
|
374
|
+
person: "Person",
|
|
375
|
+
document: "Document",
|
|
376
|
+
deployment: "Deployment",
|
|
377
|
+
incident: "Incident",
|
|
378
|
+
ticket: "Ticket"
|
|
379
|
+
};
|
|
380
|
+
var ENTITY_TONE_CLASS = {
|
|
381
|
+
service: "text-accent",
|
|
382
|
+
person: "text-text-muted",
|
|
383
|
+
document: "text-purple",
|
|
384
|
+
deployment: "text-ok",
|
|
385
|
+
incident: "text-err",
|
|
386
|
+
ticket: "text-warn"
|
|
387
|
+
};
|
|
388
|
+
var ENTITY_TONE_BG = {
|
|
389
|
+
service: "bg-accent-dim",
|
|
390
|
+
person: "bg-panel-2",
|
|
391
|
+
document: "bg-[color-mix(in_oklab,var(--color-purple),transparent_85%)]",
|
|
392
|
+
deployment: "bg-[color-mix(in_oklab,var(--color-ok),transparent_85%)]",
|
|
393
|
+
incident: "bg-[color-mix(in_oklab,var(--color-err),transparent_85%)]",
|
|
394
|
+
ticket: "bg-[color-mix(in_oklab,var(--color-warn),transparent_85%)]"
|
|
395
|
+
};
|
|
396
|
+
var typeVariant = {
|
|
397
|
+
service: "accent",
|
|
398
|
+
person: "neutral",
|
|
399
|
+
document: "purple",
|
|
400
|
+
deployment: "ok",
|
|
401
|
+
incident: "err",
|
|
402
|
+
ticket: "warn"
|
|
403
|
+
};
|
|
404
|
+
var EntityBadge = react.forwardRef(function EntityBadge2({ type, label, hideGlyph, className, children, ...props }, ref) {
|
|
405
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Badge, { ref, variant: typeVariant[type], className: cn(className), ...props, children: [
|
|
406
|
+
!hideGlyph && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "font-mono", children: ENTITY_GLYPH[type] }),
|
|
407
|
+
children ?? label ?? ENTITY_LABEL[type]
|
|
408
|
+
] });
|
|
409
|
+
});
|
|
410
|
+
EntityBadge.displayName = "EntityBadge";
|
|
411
|
+
var statToneClass = {
|
|
412
|
+
accent: "text-accent",
|
|
413
|
+
ok: "text-ok",
|
|
414
|
+
warn: "text-warn",
|
|
415
|
+
err: "text-err",
|
|
416
|
+
muted: "text-text-muted"
|
|
417
|
+
};
|
|
418
|
+
var EntityCard = react.forwardRef(function EntityCard2({ type, title, subtitle, description, stats, actions, glyph, className, ...props }, ref) {
|
|
419
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
420
|
+
"div",
|
|
421
|
+
{
|
|
422
|
+
ref,
|
|
423
|
+
className: cn(
|
|
424
|
+
"rounded-base border-border bg-panel flex flex-col gap-3 border p-5",
|
|
425
|
+
className
|
|
426
|
+
),
|
|
427
|
+
...props,
|
|
428
|
+
children: [
|
|
429
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
430
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
431
|
+
"span",
|
|
432
|
+
{
|
|
433
|
+
"aria-hidden": true,
|
|
434
|
+
className: cn(
|
|
435
|
+
"rounded-base grid h-12 w-12 shrink-0 place-items-center text-[20px]",
|
|
436
|
+
ENTITY_TONE_BG[type],
|
|
437
|
+
ENTITY_TONE_CLASS[type]
|
|
438
|
+
),
|
|
439
|
+
children: glyph ?? ENTITY_GLYPH[type]
|
|
440
|
+
}
|
|
441
|
+
),
|
|
442
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
443
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
444
|
+
/* @__PURE__ */ jsxRuntime.jsx(EntityBadge, { type, size: "sm" }),
|
|
445
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-dim font-mono text-[11px]", children: subtitle })
|
|
446
|
+
] }),
|
|
447
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 truncate font-mono text-[18px] font-medium tracking-tight", children: title }),
|
|
448
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-muted mt-1 text-[13px] leading-[1.5]", children: description })
|
|
449
|
+
] }),
|
|
450
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: actions })
|
|
451
|
+
] }),
|
|
452
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
453
|
+
"div",
|
|
454
|
+
{
|
|
455
|
+
className: "divide-border border-border bg-panel-2 grid divide-x rounded-md border",
|
|
456
|
+
style: { gridTemplateColumns: `repeat(${Math.min(stats.length, 6)}, 1fr)` },
|
|
457
|
+
children: stats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-3", children: [
|
|
458
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-dim font-mono text-[10px] tracking-[1.3px] uppercase", children: stat.label }),
|
|
459
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
460
|
+
"div",
|
|
461
|
+
{
|
|
462
|
+
className: cn(
|
|
463
|
+
"mt-1 text-[16px] font-medium tracking-tight",
|
|
464
|
+
stat.tone ? statToneClass[stat.tone] : "text-text"
|
|
465
|
+
),
|
|
466
|
+
children: stat.value
|
|
467
|
+
}
|
|
468
|
+
)
|
|
469
|
+
] }, i))
|
|
470
|
+
}
|
|
471
|
+
)
|
|
472
|
+
]
|
|
473
|
+
}
|
|
474
|
+
);
|
|
475
|
+
});
|
|
476
|
+
EntityCard.displayName = "EntityCard";
|
|
477
|
+
var EntityListRow = react.forwardRef(function EntityListRow2({ type, name, relation, meta, onClick, hideGlyph, className, ...props }, ref) {
|
|
478
|
+
const interactive = typeof onClick === "function";
|
|
479
|
+
const baseClass = cn(
|
|
480
|
+
"flex w-full items-center gap-3 border-0 bg-transparent px-2 py-2 text-left",
|
|
481
|
+
"border-b border-border last:border-0",
|
|
482
|
+
interactive && "cursor-pointer outline-none transition-colors duration-(--duration-micro) hover:bg-panel-2 focus-visible:ring-[3px] focus-visible:ring-accent-dim",
|
|
483
|
+
className
|
|
484
|
+
);
|
|
485
|
+
const inner = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
486
|
+
!hideGlyph && /* @__PURE__ */ jsxRuntime.jsx(
|
|
487
|
+
"span",
|
|
488
|
+
{
|
|
489
|
+
"aria-hidden": true,
|
|
490
|
+
className: cn("font-mono text-[14px] leading-none", ENTITY_TONE_CLASS[type]),
|
|
491
|
+
children: ENTITY_GLYPH[type]
|
|
492
|
+
}
|
|
493
|
+
),
|
|
494
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text min-w-0 flex-1 truncate font-mono text-[12px]", children: name }),
|
|
495
|
+
relation && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "border-border bg-panel-2 text-text-muted rounded-full border px-2 py-[2px] font-mono text-[10px]", children: relation }),
|
|
496
|
+
meta && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-dim font-mono text-[10px]", children: meta })
|
|
497
|
+
] });
|
|
498
|
+
if (interactive) {
|
|
499
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
500
|
+
"button",
|
|
501
|
+
{
|
|
502
|
+
ref,
|
|
503
|
+
type: "button",
|
|
504
|
+
onClick,
|
|
505
|
+
className: baseClass,
|
|
506
|
+
...props,
|
|
507
|
+
children: inner
|
|
508
|
+
}
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: baseClass, ...props, children: inner });
|
|
512
|
+
});
|
|
513
|
+
EntityListRow.displayName = "EntityListRow";
|
|
514
|
+
var styleProps = {
|
|
515
|
+
solid: { stroke: "var(--color-accent)", strokeWidth: 1.5 },
|
|
516
|
+
dashed: { stroke: "var(--color-accent)", strokeWidth: 1.5, strokeDasharray: "4 3" },
|
|
517
|
+
highlighted: { stroke: "var(--color-purple)", strokeWidth: 2.5 },
|
|
518
|
+
dim: { stroke: "var(--color-text-dim)", strokeWidth: 1, opacity: 0.4 }
|
|
519
|
+
};
|
|
520
|
+
var GraphEdge = react.forwardRef(function GraphEdge2({ x1, y1, x2, y2, curve, edgeStyle = "solid", color, arrowheadId, ...props }, ref) {
|
|
521
|
+
const base = styleProps[edgeStyle];
|
|
522
|
+
const stroke = color ?? base.stroke;
|
|
523
|
+
const sharedProps = {
|
|
524
|
+
fill: "none",
|
|
525
|
+
stroke,
|
|
526
|
+
strokeWidth: base.strokeWidth,
|
|
527
|
+
strokeDasharray: base.strokeDasharray,
|
|
528
|
+
opacity: base.opacity,
|
|
529
|
+
markerEnd: arrowheadId ? `url(#${arrowheadId})` : void 0,
|
|
530
|
+
...props
|
|
531
|
+
};
|
|
532
|
+
if (curve) {
|
|
533
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
534
|
+
"path",
|
|
535
|
+
{
|
|
536
|
+
ref,
|
|
537
|
+
d: `M${x1},${y1} Q${curve.cx},${curve.cy} ${x2},${y2}`,
|
|
538
|
+
...sharedProps
|
|
539
|
+
}
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
return /* @__PURE__ */ jsxRuntime.jsx("line", { ref, x1, y1, x2, y2, ...sharedProps });
|
|
543
|
+
});
|
|
544
|
+
GraphEdge.displayName = "GraphEdge";
|
|
545
|
+
var GraphInspector = react.forwardRef(
|
|
546
|
+
function GraphInspector2({
|
|
547
|
+
type,
|
|
548
|
+
entityId,
|
|
549
|
+
title,
|
|
550
|
+
description,
|
|
551
|
+
properties,
|
|
552
|
+
relations,
|
|
553
|
+
relationCount,
|
|
554
|
+
className,
|
|
555
|
+
...props
|
|
556
|
+
}, ref) {
|
|
557
|
+
const total = relationCount ?? relations?.length ?? 0;
|
|
558
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
559
|
+
"aside",
|
|
560
|
+
{
|
|
561
|
+
ref,
|
|
562
|
+
"aria-label": typeof title === "string" ? `${title} inspector` : "Node inspector",
|
|
563
|
+
className: cn(
|
|
564
|
+
"rounded-base border-border bg-panel flex w-[340px] flex-col gap-3 border p-4",
|
|
565
|
+
className
|
|
566
|
+
),
|
|
567
|
+
...props,
|
|
568
|
+
children: [
|
|
569
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
570
|
+
/* @__PURE__ */ jsxRuntime.jsx(EntityBadge, { type, size: "sm" }),
|
|
571
|
+
entityId && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-dim ml-auto font-mono text-[10px]", children: entityId })
|
|
572
|
+
] }),
|
|
573
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
574
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[17px] font-medium", children: title }),
|
|
575
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-muted mt-[2px] text-[12px]", children: description })
|
|
576
|
+
] }),
|
|
577
|
+
properties && properties.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
578
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-dim mb-2 font-mono text-[9px] tracking-[1.4px] uppercase", children: "Properties" }),
|
|
579
|
+
/* @__PURE__ */ jsxRuntime.jsx("dl", { className: "m-0 flex flex-col gap-1 font-mono text-[11px]", children: properties.map((p, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
580
|
+
"div",
|
|
581
|
+
{
|
|
582
|
+
className: cn("border-border flex py-1", i < properties.length - 1 && "border-b"),
|
|
583
|
+
children: [
|
|
584
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-text-dim w-[70px]", children: p.key }),
|
|
585
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "m-0 flex-1", children: p.value })
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
i
|
|
589
|
+
)) })
|
|
590
|
+
] }),
|
|
591
|
+
relations && relations.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
592
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-dim mb-2 font-mono text-[9px] tracking-[1.4px] uppercase", children: [
|
|
593
|
+
"Relations \xB7 ",
|
|
594
|
+
total
|
|
595
|
+
] }),
|
|
596
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-col gap-1 p-0 text-[11px]", children: relations.map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex gap-2", children: [
|
|
597
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-dim w-[100px] font-mono", children: r.relation }),
|
|
598
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: r.entity })
|
|
599
|
+
] }, i)) })
|
|
600
|
+
] })
|
|
601
|
+
]
|
|
602
|
+
}
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
);
|
|
606
|
+
GraphInspector.displayName = "GraphInspector";
|
|
607
|
+
var typeColorVar = {
|
|
608
|
+
service: "var(--color-accent)",
|
|
609
|
+
person: "var(--color-purple)",
|
|
610
|
+
document: "var(--color-pink)",
|
|
611
|
+
deployment: "var(--color-ok)",
|
|
612
|
+
incident: "var(--color-warn)",
|
|
613
|
+
ticket: "var(--color-text-muted)"
|
|
614
|
+
};
|
|
615
|
+
var DEFAULT_ENTRIES = [
|
|
616
|
+
{ type: "service", label: ENTITY_LABEL.service },
|
|
617
|
+
{ type: "person", label: ENTITY_LABEL.person },
|
|
618
|
+
{ type: "document", label: ENTITY_LABEL.document }
|
|
619
|
+
];
|
|
620
|
+
var GraphLegend = react.forwardRef(function GraphLegend2({ entries = DEFAULT_ENTRIES, heading = "Legend", className, children, ...props }, ref) {
|
|
621
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
622
|
+
"div",
|
|
623
|
+
{
|
|
624
|
+
ref,
|
|
625
|
+
className: cn(
|
|
626
|
+
"rounded-base border-border bg-panel/85 inline-flex flex-col gap-[6px] border p-[10px] text-[11px] backdrop-blur-[8px]",
|
|
627
|
+
className
|
|
628
|
+
),
|
|
629
|
+
...props,
|
|
630
|
+
children: [
|
|
631
|
+
heading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-dim font-mono text-[9px] tracking-[1.4px] uppercase", children: heading }),
|
|
632
|
+
children ?? entries.map((entry, i) => {
|
|
633
|
+
const color = entry.color ?? (entry.type ? typeColorVar[entry.type] : "currentColor");
|
|
634
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[6px]", children: [
|
|
635
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "h-2 w-2 rounded-full", style: { background: color } }),
|
|
636
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: entry.label })
|
|
637
|
+
] }, i);
|
|
638
|
+
})
|
|
639
|
+
]
|
|
640
|
+
}
|
|
641
|
+
);
|
|
642
|
+
});
|
|
643
|
+
GraphLegend.displayName = "GraphLegend";
|
|
644
|
+
var GraphMinimap = react.forwardRef(function GraphMinimap2({ points, viewport, width = 120, height = 72, className, ...props }, ref) {
|
|
645
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
646
|
+
"div",
|
|
647
|
+
{
|
|
648
|
+
ref,
|
|
649
|
+
role: "img",
|
|
650
|
+
"aria-label": "Graph minimap",
|
|
651
|
+
className: cn(
|
|
652
|
+
"border-border bg-panel/85 relative rounded-md border p-1 backdrop-blur-[8px]",
|
|
653
|
+
className
|
|
654
|
+
),
|
|
655
|
+
style: { width, height },
|
|
656
|
+
...props,
|
|
657
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative h-full w-full", children: [
|
|
658
|
+
points.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
659
|
+
"span",
|
|
660
|
+
{
|
|
661
|
+
"aria-hidden": true,
|
|
662
|
+
className: "absolute h-[2px] w-[2px] rounded-full",
|
|
663
|
+
style: {
|
|
664
|
+
left: `${p.x * 100}%`,
|
|
665
|
+
top: `${p.y * 100}%`,
|
|
666
|
+
background: p.color ?? "var(--color-accent)"
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
i
|
|
670
|
+
)),
|
|
671
|
+
viewport && /* @__PURE__ */ jsxRuntime.jsx(
|
|
672
|
+
"span",
|
|
673
|
+
{
|
|
674
|
+
"aria-hidden": true,
|
|
675
|
+
className: "border-accent absolute rounded-[2px] border",
|
|
676
|
+
style: {
|
|
677
|
+
left: `${viewport.x * 100}%`,
|
|
678
|
+
top: `${viewport.y * 100}%`,
|
|
679
|
+
width: `${viewport.width * 100}%`,
|
|
680
|
+
height: `${viewport.height * 100}%`,
|
|
681
|
+
background: "oklch(0.8 0.12 200 / 0.12)"
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
)
|
|
685
|
+
] })
|
|
686
|
+
}
|
|
687
|
+
);
|
|
688
|
+
});
|
|
689
|
+
GraphMinimap.displayName = "GraphMinimap";
|
|
690
|
+
var typeColorVar2 = {
|
|
691
|
+
service: "var(--color-accent)",
|
|
692
|
+
person: "var(--color-purple)",
|
|
693
|
+
document: "var(--color-pink)",
|
|
694
|
+
deployment: "var(--color-ok)",
|
|
695
|
+
incident: "var(--color-warn)",
|
|
696
|
+
ticket: "var(--color-text-muted)"
|
|
697
|
+
};
|
|
698
|
+
var GraphNode = react.forwardRef(function GraphNode2({ type, state = "default", glyph, label, size = 52, pathColor, className, style, ...props }, ref) {
|
|
699
|
+
const color = state === "path" ? pathColor ?? "var(--color-purple)" : typeColorVar2[type];
|
|
700
|
+
const glowAlpha = state === "hover" ? "80" : "40";
|
|
701
|
+
const opacity = state === "dim" ? 0.35 : 1;
|
|
702
|
+
const showRing = state === "selected" || state === "path";
|
|
703
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
704
|
+
"div",
|
|
705
|
+
{
|
|
706
|
+
ref,
|
|
707
|
+
role: "img",
|
|
708
|
+
"aria-label": typeof label === "string" ? label : `${type} node`,
|
|
709
|
+
"data-state": state,
|
|
710
|
+
"data-entity-type": type,
|
|
711
|
+
className: cn("inline-flex flex-col items-center gap-[6px]", className),
|
|
712
|
+
style,
|
|
713
|
+
...props,
|
|
714
|
+
children: [
|
|
715
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
716
|
+
"div",
|
|
717
|
+
{
|
|
718
|
+
className: "bg-panel grid place-items-center rounded-[14px] border-[1.5px] transition-all duration-(--duration-micro)",
|
|
719
|
+
style: {
|
|
720
|
+
width: size,
|
|
721
|
+
height: size,
|
|
722
|
+
borderColor: color,
|
|
723
|
+
color,
|
|
724
|
+
fontSize: Math.round(size * 0.42),
|
|
725
|
+
boxShadow: `0 0 ${state === "hover" ? 30 : 20}px ${color}${glowAlpha}`,
|
|
726
|
+
outline: showRing ? `2px solid ${color}` : void 0,
|
|
727
|
+
outlineOffset: showRing ? 4 : void 0,
|
|
728
|
+
opacity
|
|
729
|
+
},
|
|
730
|
+
children: glyph ?? ENTITY_GLYPH[type]
|
|
731
|
+
}
|
|
732
|
+
),
|
|
733
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-dim font-mono text-[10px]", children: label })
|
|
734
|
+
]
|
|
735
|
+
}
|
|
736
|
+
);
|
|
737
|
+
});
|
|
738
|
+
GraphNode.displayName = "GraphNode";
|
|
739
|
+
var PathOverlay = react.forwardRef(function PathOverlay2({ points, color = "var(--color-purple)", width = 2.5, halo = true, ...props }, ref) {
|
|
740
|
+
if (points.length < 2) return null;
|
|
741
|
+
const coords = points.map((p) => `${p.x},${p.y}`).join(" ");
|
|
742
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("g", { ref, ...props, children: [
|
|
743
|
+
halo && /* @__PURE__ */ jsxRuntime.jsx(
|
|
744
|
+
"polyline",
|
|
745
|
+
{
|
|
746
|
+
points: coords,
|
|
747
|
+
fill: "none",
|
|
748
|
+
stroke: "var(--color-bg)",
|
|
749
|
+
strokeWidth: width + 4,
|
|
750
|
+
strokeLinecap: "round",
|
|
751
|
+
strokeLinejoin: "round",
|
|
752
|
+
opacity: 0.65
|
|
753
|
+
}
|
|
754
|
+
),
|
|
755
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
756
|
+
"polyline",
|
|
757
|
+
{
|
|
758
|
+
points: coords,
|
|
759
|
+
fill: "none",
|
|
760
|
+
stroke: color,
|
|
761
|
+
strokeWidth: width,
|
|
762
|
+
strokeLinecap: "round",
|
|
763
|
+
strokeLinejoin: "round"
|
|
764
|
+
}
|
|
765
|
+
)
|
|
766
|
+
] });
|
|
767
|
+
});
|
|
768
|
+
PathOverlay.displayName = "PathOverlay";
|
|
769
|
+
var CTAStrip = react.forwardRef(function CTAStrip2({ title, description, actions, className, ...props }, ref) {
|
|
770
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
771
|
+
"section",
|
|
772
|
+
{
|
|
773
|
+
ref,
|
|
774
|
+
className: cn(
|
|
775
|
+
"rounded-xl px-10 py-12 text-center",
|
|
776
|
+
"bg-[linear-gradient(135deg,oklch(0.2_0.08_260),oklch(0.16_0.06_300))]",
|
|
777
|
+
className
|
|
778
|
+
),
|
|
779
|
+
...props,
|
|
780
|
+
children: [
|
|
781
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "m-0 mb-[10px] text-[28px] font-medium tracking-[-0.4px]", children: title }),
|
|
782
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-text-muted m-0 mb-5 text-[13px]", children: description }),
|
|
783
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap justify-center gap-2", children: actions })
|
|
784
|
+
]
|
|
785
|
+
}
|
|
786
|
+
);
|
|
787
|
+
});
|
|
788
|
+
CTAStrip.displayName = "CTAStrip";
|
|
789
|
+
var colsClass = {
|
|
790
|
+
2: "md:grid-cols-2",
|
|
791
|
+
3: "md:grid-cols-3",
|
|
792
|
+
4: "md:grid-cols-2 lg:grid-cols-4"
|
|
793
|
+
};
|
|
794
|
+
var FeatureGrid = react.forwardRef(function FeatureGrid2({ features, columns = 3, className, ...props }, ref) {
|
|
795
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
796
|
+
"div",
|
|
797
|
+
{
|
|
798
|
+
ref,
|
|
799
|
+
className: cn("grid grid-cols-1 gap-3", colsClass[columns], className),
|
|
800
|
+
...props,
|
|
801
|
+
children: features.map((f, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-base border-border bg-panel border p-5", children: [
|
|
802
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": true, className: "text-accent mb-3 text-[22px]", children: f.glyph }),
|
|
803
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-[6px] text-[14px] font-medium", children: f.title }),
|
|
804
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-muted text-[12px] leading-[1.55]", children: f.description })
|
|
805
|
+
] }, i))
|
|
806
|
+
}
|
|
807
|
+
);
|
|
808
|
+
});
|
|
809
|
+
FeatureGrid.displayName = "FeatureGrid";
|
|
810
|
+
var Footer = react.forwardRef(function Footer2({ brand, columns, copyright, closing, className, ...props }, ref) {
|
|
811
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("footer", { ref, className: cn("px-7 py-7", className), ...props, children: [
|
|
812
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-7 flex flex-wrap gap-8", children: [
|
|
813
|
+
brand && /* @__PURE__ */ jsxRuntime.jsx("div", { children: brand }),
|
|
814
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-muted ml-auto flex flex-wrap gap-6 text-[12px]", children: columns.map((col, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[6px]", children: [
|
|
815
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-dim font-mono text-[10px] tracking-[1.2px] uppercase", children: col.heading }),
|
|
816
|
+
col.links.map((link, j) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
817
|
+
"a",
|
|
818
|
+
{
|
|
819
|
+
href: link.href,
|
|
820
|
+
className: "text-text-muted hover:text-text no-underline",
|
|
821
|
+
children: link.label
|
|
822
|
+
},
|
|
823
|
+
j
|
|
824
|
+
))
|
|
825
|
+
] }, i)) })
|
|
826
|
+
] }),
|
|
827
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-border text-text-dim flex border-t pt-4 font-mono text-[11px]", children: [
|
|
828
|
+
copyright && /* @__PURE__ */ jsxRuntime.jsx("span", { children: copyright }),
|
|
829
|
+
closing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto", children: closing })
|
|
830
|
+
] })
|
|
831
|
+
] });
|
|
832
|
+
});
|
|
833
|
+
Footer.displayName = "Footer";
|
|
834
|
+
var Hero = react.forwardRef(function Hero2({ eyebrow, title, description, actions, visual, className, ...props }, ref) {
|
|
835
|
+
const hasVisual = visual != null;
|
|
836
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
837
|
+
"section",
|
|
838
|
+
{
|
|
839
|
+
ref,
|
|
840
|
+
className: cn(
|
|
841
|
+
"flex flex-col items-center justify-between gap-10 px-6 py-16 md:py-24",
|
|
842
|
+
hasVisual && "md:flex-row md:items-center md:gap-16",
|
|
843
|
+
className
|
|
844
|
+
),
|
|
845
|
+
...props,
|
|
846
|
+
children: [
|
|
847
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("max-w-[680px]", !hasVisual && "mx-auto text-center"), children: [
|
|
848
|
+
eyebrow,
|
|
849
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
850
|
+
"h1",
|
|
851
|
+
{
|
|
852
|
+
className: cn(
|
|
853
|
+
"mb-4 text-[44px] leading-[1.05] font-medium tracking-[-1.6px] md:text-[56px]",
|
|
854
|
+
eyebrow && "mt-5"
|
|
855
|
+
),
|
|
856
|
+
children: title
|
|
857
|
+
}
|
|
858
|
+
),
|
|
859
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-text-muted mb-7 text-[17px] leading-[1.6]", children: description }),
|
|
860
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-wrap gap-2", !hasVisual && "justify-center"), children: actions })
|
|
861
|
+
] }),
|
|
862
|
+
visual && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: visual })
|
|
863
|
+
]
|
|
864
|
+
}
|
|
865
|
+
);
|
|
866
|
+
});
|
|
867
|
+
Hero.displayName = "Hero";
|
|
868
|
+
var PricingCard = react.forwardRef(function PricingCard2({ tier, price, description, features, action, featured, className, ...props }, ref) {
|
|
869
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
870
|
+
"div",
|
|
871
|
+
{
|
|
872
|
+
ref,
|
|
873
|
+
className: cn(
|
|
874
|
+
"bg-panel flex flex-col gap-5 rounded-lg border p-6",
|
|
875
|
+
featured ? "border-accent shadow-lg" : "border-border",
|
|
876
|
+
className
|
|
877
|
+
),
|
|
878
|
+
...props,
|
|
879
|
+
children: [
|
|
880
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
881
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1 flex items-center gap-2", children: [
|
|
882
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[14px] font-medium", children: tier }),
|
|
883
|
+
featured && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-accent-dim text-accent rounded-full px-[6px] py-[1px] font-mono text-[10px]", children: "recommended" })
|
|
884
|
+
] }),
|
|
885
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-muted text-[12px]", children: description })
|
|
886
|
+
] }),
|
|
887
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-mono text-[28px] font-medium tracking-[-0.5px]", children: price }),
|
|
888
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-col gap-2 p-0", children: features.map((f, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-[13px]", children: [
|
|
889
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "text-accent", children: "\u2713" }),
|
|
890
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: f })
|
|
891
|
+
] }, i)) }),
|
|
892
|
+
action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto", children: action })
|
|
893
|
+
]
|
|
894
|
+
}
|
|
895
|
+
);
|
|
896
|
+
});
|
|
897
|
+
PricingCard.displayName = "PricingCard";
|
|
898
|
+
var Testimonial = react.forwardRef(function Testimonial2({ quote, author, role, avatar, className, ...props }, ref) {
|
|
899
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
900
|
+
"figure",
|
|
901
|
+
{
|
|
902
|
+
ref,
|
|
903
|
+
className: cn("mx-auto max-w-[620px] px-6 py-10 text-center", className),
|
|
904
|
+
...props,
|
|
905
|
+
children: [
|
|
906
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": true, className: "text-accent mb-4 text-[40px] leading-none", children: "\u201C" }),
|
|
907
|
+
/* @__PURE__ */ jsxRuntime.jsx("blockquote", { className: "m-0 text-[22px] leading-[1.45] font-medium tracking-[-0.3px]", children: quote }),
|
|
908
|
+
/* @__PURE__ */ jsxRuntime.jsxs("figcaption", { className: "mt-5 flex items-center justify-center gap-[10px]", children: [
|
|
909
|
+
typeof avatar === "string" ? /* @__PURE__ */ jsxRuntime.jsx(ui.Avatar, { size: "md", name: avatar }) : avatar,
|
|
910
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-left", children: [
|
|
911
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[13px] font-medium", children: author }),
|
|
912
|
+
role && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-dim text-[11px]", children: role })
|
|
913
|
+
] })
|
|
914
|
+
] })
|
|
915
|
+
]
|
|
916
|
+
}
|
|
917
|
+
);
|
|
918
|
+
});
|
|
919
|
+
Testimonial.displayName = "Testimonial";
|
|
920
|
+
|
|
921
|
+
exports.AskBar = AskBar;
|
|
922
|
+
exports.CTAStrip = CTAStrip;
|
|
923
|
+
exports.Citation = Citation;
|
|
924
|
+
exports.ConfidenceIndicator = ConfidenceIndicator;
|
|
925
|
+
exports.CopilotMessage = CopilotMessage;
|
|
926
|
+
exports.ENTITY_GLYPH = ENTITY_GLYPH;
|
|
927
|
+
exports.ENTITY_LABEL = ENTITY_LABEL;
|
|
928
|
+
exports.ENTITY_TONE_BG = ENTITY_TONE_BG;
|
|
929
|
+
exports.ENTITY_TONE_CLASS = ENTITY_TONE_CLASS;
|
|
930
|
+
exports.EntityBadge = EntityBadge;
|
|
931
|
+
exports.EntityCard = EntityCard;
|
|
932
|
+
exports.EntityListRow = EntityListRow;
|
|
933
|
+
exports.FeatureGrid = FeatureGrid;
|
|
934
|
+
exports.Footer = Footer;
|
|
935
|
+
exports.GraphEdge = GraphEdge;
|
|
936
|
+
exports.GraphInspector = GraphInspector;
|
|
937
|
+
exports.GraphLegend = GraphLegend;
|
|
938
|
+
exports.GraphMinimap = GraphMinimap;
|
|
939
|
+
exports.GraphNode = GraphNode;
|
|
940
|
+
exports.Hero = Hero;
|
|
941
|
+
exports.PathOverlay = PathOverlay;
|
|
942
|
+
exports.PricingCard = PricingCard;
|
|
943
|
+
exports.ReasoningBlock = ReasoningBlock;
|
|
944
|
+
exports.ReasoningStep = ReasoningStep;
|
|
945
|
+
exports.SuggestionChip = SuggestionChip;
|
|
946
|
+
exports.Testimonial = Testimonial;
|
|
947
|
+
exports.ToolCallCard = ToolCallCard;
|
|
948
|
+
exports.cn = cn;
|
|
949
|
+
//# sourceMappingURL=index.cjs.map
|
|
950
|
+
//# sourceMappingURL=index.cjs.map
|