@codesweep-ai/ui 0.2.1-dev.20260830023458.856ea8f
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 +202 -0
- package/NOTICE +2 -0
- package/README.md +124 -0
- package/dist/BUILD.json +1 -0
- package/dist/chart.d.ts +3 -0
- package/dist/chart.d.ts.map +1 -0
- package/dist/chart.js +3 -0
- package/dist/code.d.ts +2 -0
- package/dist/code.d.ts.map +1 -0
- package/dist/code.js +2 -0
- package/dist/components/AgentStatus.d.ts +15 -0
- package/dist/components/AgentStatus.d.ts.map +1 -0
- package/dist/components/AgentStatus.js +38 -0
- package/dist/components/AgentTrace.d.ts +42 -0
- package/dist/components/AgentTrace.d.ts.map +1 -0
- package/dist/components/AgentTrace.js +140 -0
- package/dist/components/AppShell.d.ts +29 -0
- package/dist/components/AppShell.d.ts.map +1 -0
- package/dist/components/AppShell.js +71 -0
- package/dist/components/Button.d.ts +10 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +41 -0
- package/dist/components/Card.d.ts +19 -0
- package/dist/components/Card.d.ts.map +1 -0
- package/dist/components/Card.js +96 -0
- package/dist/components/CardGroup.d.ts +16 -0
- package/dist/components/CardGroup.d.ts.map +1 -0
- package/dist/components/CardGroup.js +33 -0
- package/dist/components/CardGroupContext.d.ts +14 -0
- package/dist/components/CardGroupContext.d.ts.map +1 -0
- package/dist/components/CardGroupContext.js +8 -0
- package/dist/components/ChartFrame.d.ts +30 -0
- package/dist/components/ChartFrame.d.ts.map +1 -0
- package/dist/components/ChartFrame.js +96 -0
- package/dist/components/ChartTooltip.d.ts +22 -0
- package/dist/components/ChartTooltip.d.ts.map +1 -0
- package/dist/components/ChartTooltip.js +26 -0
- package/dist/components/CheckboxGroup.d.ts +37 -0
- package/dist/components/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/CheckboxGroup.js +198 -0
- package/dist/components/Chip.d.ts +9 -0
- package/dist/components/Chip.d.ts.map +1 -0
- package/dist/components/Chip.js +31 -0
- package/dist/components/CodeBlock.d.ts +30 -0
- package/dist/components/CodeBlock.d.ts.map +1 -0
- package/dist/components/CodeBlock.js +112 -0
- package/dist/components/Dropdown.d.ts +28 -0
- package/dist/components/Dropdown.d.ts.map +1 -0
- package/dist/components/Dropdown.js +50 -0
- package/dist/components/EventLanes.d.ts +93 -0
- package/dist/components/EventLanes.d.ts.map +1 -0
- package/dist/components/EventLanes.js +445 -0
- package/dist/components/FormGroup.d.ts +29 -0
- package/dist/components/FormGroup.d.ts.map +1 -0
- package/dist/components/FormGroup.js +48 -0
- package/dist/components/HighlightText.d.ts +15 -0
- package/dist/components/HighlightText.d.ts.map +1 -0
- package/dist/components/HighlightText.js +28 -0
- package/dist/components/Input.d.ts +35 -0
- package/dist/components/Input.d.ts.map +1 -0
- package/dist/components/Input.js +61 -0
- package/dist/components/Legend.d.ts +21 -0
- package/dist/components/Legend.d.ts.map +1 -0
- package/dist/components/Legend.js +61 -0
- package/dist/components/LightweightMarkdown.d.ts +3 -0
- package/dist/components/LightweightMarkdown.d.ts.map +1 -0
- package/dist/components/LightweightMarkdown.js +249 -0
- package/dist/components/MarkdownMinimap.d.ts +7 -0
- package/dist/components/MarkdownMinimap.d.ts.map +1 -0
- package/dist/components/MarkdownMinimap.js +84 -0
- package/dist/components/MarkdownViewer.d.ts +51 -0
- package/dist/components/MarkdownViewer.d.ts.map +1 -0
- package/dist/components/MarkdownViewer.js +455 -0
- package/dist/components/MermaidDiagram.d.ts +11 -0
- package/dist/components/MermaidDiagram.d.ts.map +1 -0
- package/dist/components/MermaidDiagram.js +119 -0
- package/dist/components/Modal.d.ts +13 -0
- package/dist/components/Modal.d.ts.map +1 -0
- package/dist/components/Modal.js +91 -0
- package/dist/components/Panel.d.ts +13 -0
- package/dist/components/Panel.d.ts.map +1 -0
- package/dist/components/Panel.js +44 -0
- package/dist/components/PulseBadge.d.ts +15 -0
- package/dist/components/PulseBadge.d.ts.map +1 -0
- package/dist/components/PulseBadge.js +22 -0
- package/dist/components/RadioGroup.d.ts +20 -0
- package/dist/components/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup.js +63 -0
- package/dist/components/RichMarkdownRenderer.d.ts +10 -0
- package/dist/components/RichMarkdownRenderer.d.ts.map +1 -0
- package/dist/components/RichMarkdownRenderer.js +18 -0
- package/dist/components/SearchInput.d.ts +25 -0
- package/dist/components/SearchInput.d.ts.map +1 -0
- package/dist/components/SearchInput.js +92 -0
- package/dist/components/SectionedTree.d.ts +36 -0
- package/dist/components/SectionedTree.d.ts.map +1 -0
- package/dist/components/SectionedTree.js +173 -0
- package/dist/components/SegmentedControl.d.ts +16 -0
- package/dist/components/SegmentedControl.d.ts.map +1 -0
- package/dist/components/SegmentedControl.js +48 -0
- package/dist/components/Skeleton.d.ts +8 -0
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton.js +25 -0
- package/dist/components/SplitPane.d.ts +16 -0
- package/dist/components/SplitPane.d.ts.map +1 -0
- package/dist/components/SplitPane.js +118 -0
- package/dist/components/StatusBadge.d.ts +15 -0
- package/dist/components/StatusBadge.d.ts.map +1 -0
- package/dist/components/StatusBadge.js +40 -0
- package/dist/components/StreamingText.d.ts +20 -0
- package/dist/components/StreamingText.d.ts.map +1 -0
- package/dist/components/StreamingText.js +50 -0
- package/dist/components/Table.d.ts +62 -0
- package/dist/components/Table.d.ts.map +1 -0
- package/dist/components/Table.js +256 -0
- package/dist/components/ThemeToggle.d.ts +11 -0
- package/dist/components/ThemeToggle.d.ts.map +1 -0
- package/dist/components/ThemeToggle.js +55 -0
- package/dist/components/Toast.d.ts +8 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/Toast.js +51 -0
- package/dist/components/ToastContainer.d.ts +5 -0
- package/dist/components/ToastContainer.d.ts.map +1 -0
- package/dist/components/ToastContainer.js +29 -0
- package/dist/components/Tree.d.ts +50 -0
- package/dist/components/Tree.d.ts.map +1 -0
- package/dist/components/Tree.js +528 -0
- package/dist/components/TreeDnd.d.ts +18 -0
- package/dist/components/TreeDnd.d.ts.map +1 -0
- package/dist/components/TreeDnd.js +39 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/lib/accentToken.d.ts +3 -0
- package/dist/lib/accentToken.d.ts.map +1 -0
- package/dist/lib/accentToken.js +12 -0
- package/dist/lib/chartTheme.d.ts +45 -0
- package/dist/lib/chartTheme.d.ts.map +1 -0
- package/dist/lib/chartTheme.js +64 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +11 -0
- package/dist/lib/forwardRefToRoot.d.ts +8 -0
- package/dist/lib/forwardRefToRoot.d.ts.map +1 -0
- package/dist/lib/forwardRefToRoot.js +18 -0
- package/dist/lib/markdownUrl.d.ts +5 -0
- package/dist/lib/markdownUrl.d.ts.map +1 -0
- package/dist/lib/markdownUrl.js +24 -0
- package/dist/lib/toast.d.ts +30 -0
- package/dist/lib/toast.d.ts.map +1 -0
- package/dist/lib/toast.js +34 -0
- package/dist/lib/useTheme.d.ts +22 -0
- package/dist/lib/useTheme.d.ts.map +1 -0
- package/dist/lib/useTheme.js +62 -0
- package/dist/markdown/rich.d.ts +10 -0
- package/dist/markdown/rich.d.ts.map +1 -0
- package/dist/markdown/rich.js +8 -0
- package/dist/markdown.d.ts +3 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +2 -0
- package/dist/mermaid.d.ts +2 -0
- package/dist/mermaid.d.ts.map +1 -0
- package/dist/mermaid.js +2 -0
- package/dist/minimap.d.ts +2 -0
- package/dist/minimap.d.ts.map +1 -0
- package/dist/minimap.js +2 -0
- package/dist/styles/base.css +98 -0
- package/dist/styles/components/agent-status.css +52 -0
- package/dist/styles/components/agent-trace.css +206 -0
- package/dist/styles/components/app-shell.css +195 -0
- package/dist/styles/components/button.css +172 -0
- package/dist/styles/components/card-group.css +20 -0
- package/dist/styles/components/card.css +200 -0
- package/dist/styles/components/chart-frame.css +144 -0
- package/dist/styles/components/chart-tooltip.css +54 -0
- package/dist/styles/components/checkbox-group.css +281 -0
- package/dist/styles/components/chip.css +61 -0
- package/dist/styles/components/code-block.css +215 -0
- package/dist/styles/components/dropdown.css +131 -0
- package/dist/styles/components/event-lanes.css +159 -0
- package/dist/styles/components/form-group.css +34 -0
- package/dist/styles/components/highlight-text.css +17 -0
- package/dist/styles/components/input.css +168 -0
- package/dist/styles/components/legend.css +80 -0
- package/dist/styles/components/markdown-minimap.css +13 -0
- package/dist/styles/components/markdown-viewer.css +354 -0
- package/dist/styles/components/mermaid-diagram.css +8 -0
- package/dist/styles/components/modal.css +167 -0
- package/dist/styles/components/panel.css +126 -0
- package/dist/styles/components/pulse-badge.css +56 -0
- package/dist/styles/components/radio-group.css +89 -0
- package/dist/styles/components/search-input.css +153 -0
- package/dist/styles/components/sectioned-tree.css +183 -0
- package/dist/styles/components/segmented-control.css +54 -0
- package/dist/styles/components/skeleton.css +21 -0
- package/dist/styles/components/split-pane.css +78 -0
- package/dist/styles/components/status-badge.css +94 -0
- package/dist/styles/components/streaming-text.css +38 -0
- package/dist/styles/components/table.css +235 -0
- package/dist/styles/components/theme-toggle.css +123 -0
- package/dist/styles/components/toast-container.css +34 -0
- package/dist/styles/components/toast.css +169 -0
- package/dist/styles/components/tree.css +375 -0
- package/dist/styles/components.css +37 -0
- package/dist/styles/core.css +3 -0
- package/dist/styles/markdown-content.css +368 -0
- package/dist/styles/print.css +55 -0
- package/dist/styles/reset.css +202 -0
- package/dist/styles/syntax.css +62 -0
- package/dist/styles/tokens.css +344 -0
- package/dist/styles/utilities.css +7 -0
- package/dist/testing/index.d.ts +39 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +119 -0
- package/package.json +138 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { forwardRefToRoot as e } from "../lib/forwardRefToRoot.js";
|
|
4
|
+
import { cn as t } from "../lib/cn.js";
|
|
5
|
+
import { Button as n } from "./Button.js";
|
|
6
|
+
import { Skeleton as r } from "./Skeleton.js";
|
|
7
|
+
import { HighlightText as i } from "./HighlightText.js";
|
|
8
|
+
import { Suspense as a, lazy as o, useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
9
|
+
import { AlertCircle as f, ChevronDown as ee, ChevronLeft as p, ChevronRight as m, ChevronUp as h, FileText as g, FoldVertical as _, Folder as te, GripVertical as ne, Inbox as v, List as y, ListTree as b, UnfoldVertical as re, X as ie } from "lucide-react";
|
|
10
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/Tree.tsx
|
|
12
|
+
var ae = 6, w = o(() => import("./TreeDnd.js").then((e) => ({ default: e.SortableRow }))), T = o(() => import("./TreeDnd.js").then((e) => ({ default: e.DndGroup })));
|
|
13
|
+
function E(e, t = "", n = 0, r = []) {
|
|
14
|
+
let i = [];
|
|
15
|
+
for (let a of e) {
|
|
16
|
+
let e = t ? `${t}/${a.name}` : a.name;
|
|
17
|
+
i.push({
|
|
18
|
+
node: a,
|
|
19
|
+
path: e,
|
|
20
|
+
depth: n,
|
|
21
|
+
ancestorIds: [...r]
|
|
22
|
+
}), a.children && a.children.length > 0 && i.push(...E(a.children, e, n + 1, [...r, a.id]));
|
|
23
|
+
}
|
|
24
|
+
return i;
|
|
25
|
+
}
|
|
26
|
+
function D(e, t, n, r = 0, i = []) {
|
|
27
|
+
let a = [];
|
|
28
|
+
for (let o of e) n && !n.has(o.id) || (a.push({
|
|
29
|
+
node: o,
|
|
30
|
+
depth: r,
|
|
31
|
+
ancestorIds: [...i]
|
|
32
|
+
}), o.type === "branch" && t.has(o.id) && o.children && a.push(...D(o.children, t, n, r + 1, [...i, o.id])));
|
|
33
|
+
return a;
|
|
34
|
+
}
|
|
35
|
+
function oe(e) {
|
|
36
|
+
let { sortableId: t, ...n } = e;
|
|
37
|
+
return /* @__PURE__ */ S(a, {
|
|
38
|
+
fallback: /* @__PURE__ */ S(O, { ...n }),
|
|
39
|
+
children: /* @__PURE__ */ S(w, {
|
|
40
|
+
id: t,
|
|
41
|
+
children: ({ setNodeRef: e, style: t, attributes: r, listeners: i }) => /* @__PURE__ */ S(O, {
|
|
42
|
+
...n,
|
|
43
|
+
sortableRef: e,
|
|
44
|
+
sortableStyle: t,
|
|
45
|
+
sortableAttributes: r,
|
|
46
|
+
dragListeners: i
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function se(e) {
|
|
52
|
+
return /* @__PURE__ */ S(O, { ...e });
|
|
53
|
+
}
|
|
54
|
+
function O({ node: e, depth: n, path: r, expandedIds: a, selectedId: o, focusedNodeId: s, onSelect: c, onToggle: l, renderLabel: u, filterText: d, matchNodeIds: f, currentMatchId: h, visibleNodeIds: _, flipped: v, reorderable: y, onReorder: b, sortableRef: re, sortableStyle: ie, sortableAttributes: ae, dragListeners: w }) {
|
|
55
|
+
if (_ && !_.has(e.id)) return null;
|
|
56
|
+
let T = a.has(e.id), E = o === e.id, D = e.type === "branch", O = f?.has(e.id) ?? !1, k = h === e.id, A = s === e.id, j = () => {
|
|
57
|
+
D ? l?.(e.id) : c?.(e);
|
|
58
|
+
}, M = u ? u(e) : d ? /* @__PURE__ */ S(i, {
|
|
59
|
+
text: e.name,
|
|
60
|
+
query: d
|
|
61
|
+
}) : e.name;
|
|
62
|
+
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
63
|
+
ref: re,
|
|
64
|
+
style: {
|
|
65
|
+
...v ? { paddingRight: `calc(${n} * var(--tree-indent-size) + var(--tree-indent-base))` } : { paddingLeft: `calc(${n} * var(--tree-indent-size) + var(--tree-indent-base))` },
|
|
66
|
+
...ie
|
|
67
|
+
},
|
|
68
|
+
role: "treeitem",
|
|
69
|
+
"aria-expanded": D ? T : void 0,
|
|
70
|
+
"aria-selected": E,
|
|
71
|
+
"aria-level": n + 1,
|
|
72
|
+
tabIndex: A ? 0 : -1,
|
|
73
|
+
"data-tree-node-id": e.id,
|
|
74
|
+
className: t("cs-component-tree-23 ", "cs-component-tree-24 ", v && "cs-component-tree-25", k && "cs-component-tree-26 ", !k && O && "cs-component-tree-27", !k && !O && E && "cs-component-tree-28 ", !E && !O && !k && "cs-component-tree-29"),
|
|
75
|
+
onClick: j,
|
|
76
|
+
...ae,
|
|
77
|
+
children: [
|
|
78
|
+
y && /* @__PURE__ */ S("span", {
|
|
79
|
+
className: "cs-component-tree-30 ",
|
|
80
|
+
...w,
|
|
81
|
+
children: /* @__PURE__ */ S(ne, { className: "cs-component-tree-31 " })
|
|
82
|
+
}),
|
|
83
|
+
D ? S(T ? ee : v ? p : m, { className: "cs-component-tree-32 " }) : /* @__PURE__ */ S("span", { className: "cs-component-tree-33" }),
|
|
84
|
+
S(D ? te : g, { className: "cs-component-tree-32 " }),
|
|
85
|
+
/* @__PURE__ */ S("span", {
|
|
86
|
+
className: "cs-component-tree-34",
|
|
87
|
+
children: M
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
}), D && T && e.children && /* @__PURE__ */ S("div", {
|
|
91
|
+
role: "group",
|
|
92
|
+
children: y ? /* @__PURE__ */ S(ce, {
|
|
93
|
+
parentId: e.id,
|
|
94
|
+
nodes: e.children,
|
|
95
|
+
onReorder: b,
|
|
96
|
+
children: e.children.map((e) => {
|
|
97
|
+
let t = `${r} / ${e.name}`;
|
|
98
|
+
return /* @__PURE__ */ S(oe, {
|
|
99
|
+
sortableId: e.id,
|
|
100
|
+
node: e,
|
|
101
|
+
depth: n + 1,
|
|
102
|
+
path: t,
|
|
103
|
+
expandedIds: a,
|
|
104
|
+
selectedId: o,
|
|
105
|
+
focusedNodeId: s,
|
|
106
|
+
onSelect: c,
|
|
107
|
+
onToggle: l,
|
|
108
|
+
renderLabel: u,
|
|
109
|
+
filterText: d,
|
|
110
|
+
matchNodeIds: f,
|
|
111
|
+
currentMatchId: h,
|
|
112
|
+
visibleNodeIds: _,
|
|
113
|
+
flipped: v,
|
|
114
|
+
reorderable: y,
|
|
115
|
+
onReorder: b
|
|
116
|
+
}, e.id);
|
|
117
|
+
})
|
|
118
|
+
}) : e.children.map((e) => {
|
|
119
|
+
let t = `${r} / ${e.name}`;
|
|
120
|
+
return /* @__PURE__ */ S(se, {
|
|
121
|
+
node: e,
|
|
122
|
+
depth: n + 1,
|
|
123
|
+
path: t,
|
|
124
|
+
expandedIds: a,
|
|
125
|
+
selectedId: o,
|
|
126
|
+
focusedNodeId: s,
|
|
127
|
+
onSelect: c,
|
|
128
|
+
onToggle: l,
|
|
129
|
+
renderLabel: u,
|
|
130
|
+
filterText: d,
|
|
131
|
+
matchNodeIds: f,
|
|
132
|
+
currentMatchId: h,
|
|
133
|
+
visibleNodeIds: _,
|
|
134
|
+
flipped: v
|
|
135
|
+
}, e.id);
|
|
136
|
+
})
|
|
137
|
+
})] });
|
|
138
|
+
}
|
|
139
|
+
function k({ entry: e, filterText: n, isCurrentMatch: r, isSelected: a, isFocused: o, onSelect: s, onMatchClick: c, flipped: l }) {
|
|
140
|
+
let u = () => {
|
|
141
|
+
e.node.type === "leaf" && (c?.(), s?.(e.node));
|
|
142
|
+
};
|
|
143
|
+
return /* @__PURE__ */ C("div", {
|
|
144
|
+
role: "option",
|
|
145
|
+
"aria-selected": a,
|
|
146
|
+
tabIndex: o ? 0 : -1,
|
|
147
|
+
"data-tree-node-id": e.node.id,
|
|
148
|
+
className: t("cs-component-tree-44 ", "cs-component-tree-24 ", l && "cs-component-tree-25", r && "cs-component-tree-26 ", !r && a && "cs-component-tree-28 ", !r && !a && "cs-component-tree-29"),
|
|
149
|
+
onClick: u,
|
|
150
|
+
onKeyDown: (e) => {
|
|
151
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), u());
|
|
152
|
+
},
|
|
153
|
+
children: [/* @__PURE__ */ S(g, { className: "cs-component-tree-32 " }), /* @__PURE__ */ S("span", {
|
|
154
|
+
className: "cs-component-tree-34",
|
|
155
|
+
children: /* @__PURE__ */ S(i, {
|
|
156
|
+
text: e.path,
|
|
157
|
+
query: n
|
|
158
|
+
})
|
|
159
|
+
})]
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
function ce({ parentId: e, nodes: t, onReorder: n, children: r }) {
|
|
163
|
+
return /* @__PURE__ */ S(a, {
|
|
164
|
+
fallback: r,
|
|
165
|
+
children: /* @__PURE__ */ S(T, {
|
|
166
|
+
parentId: e,
|
|
167
|
+
ids: t.map((e) => e.id),
|
|
168
|
+
onReorder: n,
|
|
169
|
+
children: r
|
|
170
|
+
})
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function A({ nodes: e, expandedIds: i, selectedId: a, onSelect: o, onToggle: p, className: m, renderLabel: g, filterable: te = !1, filterPlaceholder: ne = "Filter...", onToggleExpandAll: x, allExpanded: w, flipped: T = !1, reorderable: O = !1, onReorder: A, loading: j, error: M, errorMessage: le, onRetry: ue, emptyMessage: de = "No nodes.", emptyHint: fe, emptyAction: N }) {
|
|
174
|
+
let [P, F] = d(""), [I, L] = d(""), [R, pe] = d("tree"), [z, B] = d(0), [V, H] = d(null), U = u(null);
|
|
175
|
+
c(() => {
|
|
176
|
+
if (P.length < 3) {
|
|
177
|
+
L("");
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
let e = setTimeout(() => L(P), 150);
|
|
181
|
+
return () => clearTimeout(e);
|
|
182
|
+
}, [P]);
|
|
183
|
+
let W = l(() => E(e), [e]), G = l(() => {
|
|
184
|
+
if (!I) return [];
|
|
185
|
+
let e = I.toLowerCase();
|
|
186
|
+
return W.filter((t) => t.node.type === "leaf" && t.node.name.toLowerCase().includes(e));
|
|
187
|
+
}, [W, I]), me = l(() => G.length === 0 ? null : new Set(G.map((e) => e.node.id)), [G]), K = l(() => {
|
|
188
|
+
if (!I || G.length === 0) return null;
|
|
189
|
+
let e = /* @__PURE__ */ new Set();
|
|
190
|
+
for (let t of G) {
|
|
191
|
+
e.add(t.node.id);
|
|
192
|
+
for (let n of t.ancestorIds) e.add(n);
|
|
193
|
+
}
|
|
194
|
+
return e;
|
|
195
|
+
}, [I, G]), q = l(() => {
|
|
196
|
+
if (!I || G.length === 0) return null;
|
|
197
|
+
let e = /* @__PURE__ */ new Set();
|
|
198
|
+
for (let t of G) for (let n of t.ancestorIds) e.add(n);
|
|
199
|
+
return e;
|
|
200
|
+
}, [I, G]) ?? i;
|
|
201
|
+
c(() => {
|
|
202
|
+
(G.length === 0 || z >= G.length) && B(0);
|
|
203
|
+
}, [G.length, z]);
|
|
204
|
+
let J = G.length > 0 ? G[z]?.node.id ?? null : null, Y = l(() => R === "tree" ? D(e, q, K) : (I ? G : W).map((e) => ({
|
|
205
|
+
node: e.node,
|
|
206
|
+
depth: e.depth,
|
|
207
|
+
ancestorIds: e.ancestorIds
|
|
208
|
+
})), [
|
|
209
|
+
R,
|
|
210
|
+
e,
|
|
211
|
+
q,
|
|
212
|
+
K,
|
|
213
|
+
I,
|
|
214
|
+
G,
|
|
215
|
+
W
|
|
216
|
+
]);
|
|
217
|
+
c(() => {
|
|
218
|
+
H((e) => e && Y.some(({ node: t }) => t.id === e) ? e : Y[0]?.node.id ?? null);
|
|
219
|
+
}, [Y]);
|
|
220
|
+
let X = s((e) => {
|
|
221
|
+
!e || !U.current || requestAnimationFrame(() => {
|
|
222
|
+
let t = U.current?.querySelector(`[data-tree-node-id="${e}"]`);
|
|
223
|
+
if (!t) return;
|
|
224
|
+
t.scrollIntoView({
|
|
225
|
+
block: "nearest",
|
|
226
|
+
behavior: "smooth"
|
|
227
|
+
});
|
|
228
|
+
let n = t.querySelector("mark");
|
|
229
|
+
if (n && U.current) {
|
|
230
|
+
let e = U.current, t = n.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
231
|
+
if (t.left < r.left || t.right > r.right) {
|
|
232
|
+
let t = n.offsetLeft - e.offsetWidth / 2;
|
|
233
|
+
e.scrollTo({
|
|
234
|
+
left: Math.max(0, t),
|
|
235
|
+
behavior: "smooth"
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}, []);
|
|
241
|
+
c(() => {
|
|
242
|
+
X(J);
|
|
243
|
+
}, [J, X]);
|
|
244
|
+
let he = () => {
|
|
245
|
+
G.length !== 0 && B((e) => (e + 1) % G.length);
|
|
246
|
+
}, ge = () => {
|
|
247
|
+
G.length !== 0 && B((e) => (e - 1 + G.length) % G.length);
|
|
248
|
+
}, _e = (e) => {
|
|
249
|
+
F(e), B(0);
|
|
250
|
+
}, ve = () => {
|
|
251
|
+
F(""), L(""), B(0);
|
|
252
|
+
}, ye = s((e) => {
|
|
253
|
+
if (![
|
|
254
|
+
"ArrowDown",
|
|
255
|
+
"ArrowUp",
|
|
256
|
+
"ArrowRight",
|
|
257
|
+
"ArrowLeft",
|
|
258
|
+
"Home",
|
|
259
|
+
"End",
|
|
260
|
+
"Enter",
|
|
261
|
+
" "
|
|
262
|
+
].includes(e.key) || e.target.tagName === "INPUT") return;
|
|
263
|
+
e.preventDefault();
|
|
264
|
+
let t = Y;
|
|
265
|
+
if (t.length === 0) return;
|
|
266
|
+
let n = t.findIndex((e) => e.node.id === V), r = (e) => {
|
|
267
|
+
H(e), X(e);
|
|
268
|
+
let t = U.current?.querySelector(`[data-tree-node-id="${e}"]`);
|
|
269
|
+
t ? t.focus() : requestAnimationFrame(() => {
|
|
270
|
+
U.current?.querySelector(`[data-tree-node-id="${e}"]`)?.focus();
|
|
271
|
+
});
|
|
272
|
+
};
|
|
273
|
+
if (e.key === "ArrowDown") r((n < t.length - 1 ? t[n + 1] : t[0]).node.id);
|
|
274
|
+
else if (e.key === "ArrowUp") {
|
|
275
|
+
let e = t[Math.max(0, n - 1)];
|
|
276
|
+
r(e.node.id);
|
|
277
|
+
} else if (e.key === "ArrowRight") {
|
|
278
|
+
if (n === -1) return;
|
|
279
|
+
let e = t[n];
|
|
280
|
+
if (e.node.type === "branch") {
|
|
281
|
+
if (!q.has(e.node.id)) p?.(e.node.id);
|
|
282
|
+
else if (e.node.children && e.node.children.length > 0) {
|
|
283
|
+
let t = e.node.children[0];
|
|
284
|
+
r(t.id);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
} else if (e.key === "ArrowLeft") {
|
|
288
|
+
if (n === -1) return;
|
|
289
|
+
let e = t[n];
|
|
290
|
+
if (e.node.type === "branch" && q.has(e.node.id)) p?.(e.node.id);
|
|
291
|
+
else {
|
|
292
|
+
let t = e.ancestorIds.length > 0 ? e.ancestorIds[e.ancestorIds.length - 1] : null;
|
|
293
|
+
t && r(t);
|
|
294
|
+
}
|
|
295
|
+
} else if (e.key === "Home") r(t[0].node.id);
|
|
296
|
+
else if (e.key === "End") r(t[t.length - 1].node.id);
|
|
297
|
+
else if (e.key === "Enter" || e.key === " ") {
|
|
298
|
+
if (n === -1) return;
|
|
299
|
+
let e = t[n];
|
|
300
|
+
e.node.type === "branch" ? p?.(e.node.id) : o?.(e.node);
|
|
301
|
+
}
|
|
302
|
+
}, [
|
|
303
|
+
Y,
|
|
304
|
+
V,
|
|
305
|
+
q,
|
|
306
|
+
p,
|
|
307
|
+
o,
|
|
308
|
+
X
|
|
309
|
+
]), be = s((e) => {
|
|
310
|
+
U.current && !U.current.contains(e.relatedTarget) && !V && Y.length > 0 && H(Y[0].node.id);
|
|
311
|
+
}, [V, Y]), Z = I.length > 0, xe = P.length > 0 && P.length < 3, Q = G.length > 0, $ = s((e) => {
|
|
312
|
+
if (Z && G.length > 0) {
|
|
313
|
+
let t = G.findIndex((t) => t.node.id === e.id);
|
|
314
|
+
t >= 0 && B(t);
|
|
315
|
+
}
|
|
316
|
+
o?.(e);
|
|
317
|
+
}, [
|
|
318
|
+
Z,
|
|
319
|
+
G,
|
|
320
|
+
o
|
|
321
|
+
]);
|
|
322
|
+
return /* @__PURE__ */ C("div", {
|
|
323
|
+
"data-component": "Tree",
|
|
324
|
+
className: t("cs-component-tree-91 ", m),
|
|
325
|
+
children: [te && /* @__PURE__ */ C("div", {
|
|
326
|
+
className: "cs-component-tree-92 ",
|
|
327
|
+
children: [
|
|
328
|
+
/* @__PURE__ */ C("div", {
|
|
329
|
+
className: "cs-component-tree-93 ",
|
|
330
|
+
children: [/* @__PURE__ */ C("div", {
|
|
331
|
+
className: "cs-component-tree-94 ",
|
|
332
|
+
children: [/* @__PURE__ */ S("input", {
|
|
333
|
+
type: "text",
|
|
334
|
+
"aria-label": "Filter tree",
|
|
335
|
+
value: P,
|
|
336
|
+
onChange: (e) => _e(e.target.value),
|
|
337
|
+
placeholder: ne,
|
|
338
|
+
className: t("cs-component-tree-96 ", "cs-component-tree-97 ", "cs-component-tree-98 ", "cs-component-tree-99", "cs-component-tree-100", "cs-component-tree-101 ", "cs-component-tree-102")
|
|
339
|
+
}), P.length > 0 && /* @__PURE__ */ S("button", {
|
|
340
|
+
type: "button",
|
|
341
|
+
onClick: ve,
|
|
342
|
+
className: "cs-component-tree-104 ",
|
|
343
|
+
"aria-label": "Clear filter",
|
|
344
|
+
children: /* @__PURE__ */ S(ie, { className: "cs-component-tree-106 " })
|
|
345
|
+
})]
|
|
346
|
+
}), /* @__PURE__ */ S("button", {
|
|
347
|
+
type: "button",
|
|
348
|
+
onClick: () => pe((e) => e === "tree" ? "flat" : "tree"),
|
|
349
|
+
className: t("cs-component-tree-111 ", "cs-component-tree-112 ", "cs-component-tree-113 "),
|
|
350
|
+
"aria-label": R === "tree" ? "Switch to flat list" : "Switch to tree view",
|
|
351
|
+
title: R === "tree" ? "Flat list view" : "Tree view",
|
|
352
|
+
children: S(R === "tree" ? y : b, { className: "cs-component-tree-31 " })
|
|
353
|
+
})]
|
|
354
|
+
}),
|
|
355
|
+
xe && /* @__PURE__ */ S("div", {
|
|
356
|
+
className: "cs-component-tree-121 ",
|
|
357
|
+
children: /* @__PURE__ */ C("span", {
|
|
358
|
+
role: "status",
|
|
359
|
+
"aria-live": "polite",
|
|
360
|
+
className: "cs-component-tree-89 ",
|
|
361
|
+
children: [
|
|
362
|
+
"Type ",
|
|
363
|
+
3 - P.length,
|
|
364
|
+
" more to search"
|
|
365
|
+
]
|
|
366
|
+
})
|
|
367
|
+
}),
|
|
368
|
+
Z && /* @__PURE__ */ C("div", {
|
|
369
|
+
className: "cs-component-tree-122 ",
|
|
370
|
+
children: [/* @__PURE__ */ S("span", {
|
|
371
|
+
role: "status",
|
|
372
|
+
"aria-live": "polite",
|
|
373
|
+
className: "cs-component-tree-123 ",
|
|
374
|
+
children: Q ? `${z + 1} / ${G.length} matches` : "No matches"
|
|
375
|
+
}), Q && /* @__PURE__ */ C("div", {
|
|
376
|
+
className: "cs-component-tree-128 ",
|
|
377
|
+
children: [/* @__PURE__ */ S("button", {
|
|
378
|
+
type: "button",
|
|
379
|
+
onClick: ge,
|
|
380
|
+
className: "cs-component-tree-130 ",
|
|
381
|
+
"aria-label": "Previous match",
|
|
382
|
+
children: /* @__PURE__ */ S(h, { className: "cs-component-tree-31 " })
|
|
383
|
+
}), /* @__PURE__ */ S("button", {
|
|
384
|
+
type: "button",
|
|
385
|
+
onClick: he,
|
|
386
|
+
className: "cs-component-tree-130 ",
|
|
387
|
+
"aria-label": "Next match",
|
|
388
|
+
children: /* @__PURE__ */ S(ee, { className: "cs-component-tree-31 " })
|
|
389
|
+
})]
|
|
390
|
+
})]
|
|
391
|
+
}),
|
|
392
|
+
x && /* @__PURE__ */ C("button", {
|
|
393
|
+
type: "button",
|
|
394
|
+
onClick: x,
|
|
395
|
+
className: t("cs-component-tree-93 ", "cs-component-tree-135 ", "cs-component-tree-136 ", "cs-component-tree-137 ", T ? "cs-component-tree-138 " : "cs-component-tree-139"),
|
|
396
|
+
children: [S(w ? _ : re, { className: "cs-component-tree-106 " }), w ? "Collapse all" : "Expand all"]
|
|
397
|
+
})
|
|
398
|
+
]
|
|
399
|
+
}), /* @__PURE__ */ S("div", {
|
|
400
|
+
ref: U,
|
|
401
|
+
className: "cs-component-tree-142 ",
|
|
402
|
+
role: R === "tree" ? "tree" : "listbox",
|
|
403
|
+
onKeyDown: ye,
|
|
404
|
+
onFocus: be,
|
|
405
|
+
children: j ? /* @__PURE__ */ S("div", {
|
|
406
|
+
"data-testid": "tree-loading",
|
|
407
|
+
className: "cs-component-tree-147 ",
|
|
408
|
+
children: Array.from({ length: ae }).map((e, t) => /* @__PURE__ */ S("div", {
|
|
409
|
+
className: "cs-component-tree-150 ",
|
|
410
|
+
style: { paddingLeft: `${t % 3 * 16}px` },
|
|
411
|
+
children: /* @__PURE__ */ S(r, {
|
|
412
|
+
variant: "text",
|
|
413
|
+
width: "60%"
|
|
414
|
+
})
|
|
415
|
+
}, `__skeleton-${t}`))
|
|
416
|
+
}) : M ? /* @__PURE__ */ C("div", {
|
|
417
|
+
"data-testid": "tree-error",
|
|
418
|
+
className: "cs-component-tree-156 ",
|
|
419
|
+
children: [
|
|
420
|
+
/* @__PURE__ */ S(f, { className: "cs-component-tree-157 " }),
|
|
421
|
+
/* @__PURE__ */ S("div", {
|
|
422
|
+
className: "cs-component-tree-158 ",
|
|
423
|
+
children: le ?? "Something went wrong"
|
|
424
|
+
}),
|
|
425
|
+
(typeof M == "string" ? M : M?.message) && /* @__PURE__ */ S("div", {
|
|
426
|
+
className: "cs-component-tree-161 ",
|
|
427
|
+
children: typeof M == "string" ? M : M.message
|
|
428
|
+
}),
|
|
429
|
+
ue && /* @__PURE__ */ S(n, {
|
|
430
|
+
variant: "secondary",
|
|
431
|
+
size: "sm",
|
|
432
|
+
onClick: ue,
|
|
433
|
+
children: "Retry"
|
|
434
|
+
})
|
|
435
|
+
]
|
|
436
|
+
}) : e.length === 0 ? /* @__PURE__ */ C("div", {
|
|
437
|
+
"data-testid": "tree-empty",
|
|
438
|
+
className: "cs-component-tree-156 ",
|
|
439
|
+
children: [
|
|
440
|
+
/* @__PURE__ */ S(v, { className: "cs-component-tree-166 " }),
|
|
441
|
+
/* @__PURE__ */ S("div", {
|
|
442
|
+
className: "cs-component-tree-158 ",
|
|
443
|
+
children: de
|
|
444
|
+
}),
|
|
445
|
+
fe && /* @__PURE__ */ S("div", {
|
|
446
|
+
className: "cs-component-tree-161 ",
|
|
447
|
+
children: fe
|
|
448
|
+
}),
|
|
449
|
+
N && /* @__PURE__ */ S(n, {
|
|
450
|
+
variant: "secondary",
|
|
451
|
+
size: "sm",
|
|
452
|
+
onClick: N.onClick,
|
|
453
|
+
children: N.label
|
|
454
|
+
})
|
|
455
|
+
]
|
|
456
|
+
}) : (() => {
|
|
457
|
+
if (R === "tree") {
|
|
458
|
+
if (Z && !Q) return /* @__PURE__ */ S("div", {
|
|
459
|
+
className: "cs-component-tree-88 ",
|
|
460
|
+
children: /* @__PURE__ */ S("span", {
|
|
461
|
+
className: "cs-component-tree-89 ",
|
|
462
|
+
children: "No matches"
|
|
463
|
+
})
|
|
464
|
+
});
|
|
465
|
+
let t = e.map((e) => O ? /* @__PURE__ */ S(oe, {
|
|
466
|
+
sortableId: e.id,
|
|
467
|
+
node: e,
|
|
468
|
+
depth: 0,
|
|
469
|
+
path: e.name,
|
|
470
|
+
expandedIds: q,
|
|
471
|
+
selectedId: a,
|
|
472
|
+
focusedNodeId: V,
|
|
473
|
+
onSelect: $,
|
|
474
|
+
onToggle: p,
|
|
475
|
+
renderLabel: g,
|
|
476
|
+
filterText: I,
|
|
477
|
+
matchNodeIds: me,
|
|
478
|
+
currentMatchId: J,
|
|
479
|
+
visibleNodeIds: K,
|
|
480
|
+
flipped: T,
|
|
481
|
+
reorderable: O,
|
|
482
|
+
onReorder: A
|
|
483
|
+
}, e.id) : /* @__PURE__ */ S(se, {
|
|
484
|
+
node: e,
|
|
485
|
+
depth: 0,
|
|
486
|
+
path: e.name,
|
|
487
|
+
expandedIds: q,
|
|
488
|
+
selectedId: a,
|
|
489
|
+
focusedNodeId: V,
|
|
490
|
+
onSelect: $,
|
|
491
|
+
onToggle: p,
|
|
492
|
+
renderLabel: g,
|
|
493
|
+
filterText: I,
|
|
494
|
+
matchNodeIds: me,
|
|
495
|
+
currentMatchId: J,
|
|
496
|
+
visibleNodeIds: K,
|
|
497
|
+
flipped: T
|
|
498
|
+
}, e.id));
|
|
499
|
+
return O ? /* @__PURE__ */ S(ce, {
|
|
500
|
+
parentId: null,
|
|
501
|
+
nodes: e,
|
|
502
|
+
onReorder: A,
|
|
503
|
+
children: t
|
|
504
|
+
}) : t;
|
|
505
|
+
}
|
|
506
|
+
return Z && !Q ? /* @__PURE__ */ S("div", {
|
|
507
|
+
className: "cs-component-tree-88 ",
|
|
508
|
+
children: /* @__PURE__ */ S("span", {
|
|
509
|
+
className: "cs-component-tree-89 ",
|
|
510
|
+
children: "No matches"
|
|
511
|
+
})
|
|
512
|
+
}) : (Z ? G : W).map((e, t) => /* @__PURE__ */ S(k, {
|
|
513
|
+
entry: e,
|
|
514
|
+
filterText: I,
|
|
515
|
+
isCurrentMatch: J === e.node.id,
|
|
516
|
+
isSelected: a === e.node.id,
|
|
517
|
+
isFocused: V === e.node.id,
|
|
518
|
+
onSelect: $,
|
|
519
|
+
onMatchClick: Z ? () => B(t) : void 0,
|
|
520
|
+
flipped: T
|
|
521
|
+
}, e.node.id));
|
|
522
|
+
})()
|
|
523
|
+
})]
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
var j = e(A);
|
|
527
|
+
//#endregion
|
|
528
|
+
export { j as Tree };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
export interface SortableBindings {
|
|
3
|
+
setNodeRef: (node: HTMLElement | null) => void;
|
|
4
|
+
style: CSSProperties;
|
|
5
|
+
attributes: Record<string, any>;
|
|
6
|
+
listeners: Record<string, any>;
|
|
7
|
+
}
|
|
8
|
+
export declare function SortableRow({ id, children, }: {
|
|
9
|
+
id: string;
|
|
10
|
+
children: (bindings: SortableBindings) => ReactNode;
|
|
11
|
+
}): ReactNode;
|
|
12
|
+
export declare function DndGroup({ parentId, ids, onReorder, children, }: {
|
|
13
|
+
parentId: string | null;
|
|
14
|
+
ids: string[];
|
|
15
|
+
onReorder?: (parentId: string | null, orderedIds: string[]) => void;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=TreeDnd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeDnd.d.ts","sourceRoot":"","sources":["../../src/components/TreeDnd.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBtD,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,QAAQ,GACT,EAAE;IACD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,SAAS,CAAC;CACrD,aAoBA;AAED,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,GAAG,EACH,SAAS,EACT,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpE,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAyBA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { DndContext as t, PointerSensor as n, closestCenter as r, useSensor as i, useSensors as a } from "@dnd-kit/core";
|
|
5
|
+
import { SortableContext as o, arrayMove as s, useSortable as c, verticalListSortingStrategy as l } from "@dnd-kit/sortable";
|
|
6
|
+
import { CSS as u } from "@dnd-kit/utilities";
|
|
7
|
+
//#region src/components/TreeDnd.tsx
|
|
8
|
+
function d({ id: e, children: t }) {
|
|
9
|
+
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } = c({ id: e });
|
|
10
|
+
return t({
|
|
11
|
+
setNodeRef: i,
|
|
12
|
+
style: {
|
|
13
|
+
transform: u.Transform.toString(a),
|
|
14
|
+
transition: o,
|
|
15
|
+
opacity: s ? .5 : void 0
|
|
16
|
+
},
|
|
17
|
+
attributes: n,
|
|
18
|
+
listeners: r ?? {}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function f({ parentId: c, ids: u, onReorder: d, children: f }) {
|
|
22
|
+
return /* @__PURE__ */ e(t, {
|
|
23
|
+
sensors: a(i(n, { activationConstraint: { distance: 5 } })),
|
|
24
|
+
collisionDetection: r,
|
|
25
|
+
onDragEnd: (e) => {
|
|
26
|
+
let { active: t, over: n } = e;
|
|
27
|
+
if (!n || t.id === n.id) return;
|
|
28
|
+
let r = u.indexOf(String(t.id)), i = u.indexOf(String(n.id));
|
|
29
|
+
r === -1 || i === -1 || d?.(c, s(u, r, i));
|
|
30
|
+
},
|
|
31
|
+
children: /* @__PURE__ */ e(o, {
|
|
32
|
+
items: u,
|
|
33
|
+
strategy: l,
|
|
34
|
+
children: f
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { f as DndGroup, d as SortableRow };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export { AgentStatus } from "./components/AgentStatus";
|
|
2
|
+
export { AgentTrace } from "./components/AgentTrace";
|
|
3
|
+
export type { AgentTraceStep, AgentTraceStepStatus } from "./components/AgentTrace";
|
|
4
|
+
export { AppShell, Header, Footer } from "./components/AppShell";
|
|
5
|
+
export { Button } from "./components/Button";
|
|
6
|
+
export { Card } from "./components/Card";
|
|
7
|
+
export { CardGroup } from "./components/CardGroup";
|
|
8
|
+
export { Chip } from "./components/Chip";
|
|
9
|
+
export { CheckboxGroup } from "./components/CheckboxGroup";
|
|
10
|
+
export type { CheckboxOption } from "./components/CheckboxGroup";
|
|
11
|
+
export { Dropdown } from "./components/Dropdown";
|
|
12
|
+
export { EventLanes } from "./components/EventLanes";
|
|
13
|
+
export type { EventLane, EventLaneEvent, EventLaneSpan, EventLanesProps, EventLanesRulerContext, EventShape, EventToken, } from "./components/EventLanes";
|
|
14
|
+
export { FormGroup } from "./components/FormGroup";
|
|
15
|
+
export { HighlightText } from "./components/HighlightText";
|
|
16
|
+
export { Input } from "./components/Input";
|
|
17
|
+
export { Legend } from "./components/Legend";
|
|
18
|
+
export type { LegendItem } from "./components/Legend";
|
|
19
|
+
export { Modal } from "./components/Modal";
|
|
20
|
+
export { Panel } from "./components/Panel";
|
|
21
|
+
export { PulseBadge } from "./components/PulseBadge";
|
|
22
|
+
export { SearchInput } from "./components/SearchInput";
|
|
23
|
+
export { RadioGroup } from "./components/RadioGroup";
|
|
24
|
+
export type { RadioOption } from "./components/RadioGroup";
|
|
25
|
+
export { SegmentedControl } from "./components/SegmentedControl";
|
|
26
|
+
export type { SegmentedControlOption } from "./components/SegmentedControl";
|
|
27
|
+
export { SectionedTree } from "./components/SectionedTree";
|
|
28
|
+
export type { TreeSection } from "./components/SectionedTree";
|
|
29
|
+
export { Skeleton } from "./components/Skeleton";
|
|
30
|
+
export type { SkeletonProps } from "./components/Skeleton";
|
|
31
|
+
export { SplitPane } from "./components/SplitPane";
|
|
32
|
+
export { StatusBadge } from "./components/StatusBadge";
|
|
33
|
+
export { StreamingText } from "./components/StreamingText";
|
|
34
|
+
export { Table } from "./components/Table";
|
|
35
|
+
export { Toast } from "./components/Toast";
|
|
36
|
+
export type { ToastProps } from "./components/Toast";
|
|
37
|
+
export { ToastContainer } from "./components/ToastContainer";
|
|
38
|
+
export type { ToastContainerProps } from "./components/ToastContainer";
|
|
39
|
+
export { toast, subscribeToasts } from "./lib/toast";
|
|
40
|
+
export type { ToastItem, ToastOptions, ToastVariant } from "./lib/toast";
|
|
41
|
+
export type { TableColumn } from "./components/Table";
|
|
42
|
+
export { ThemeToggle } from "./components/ThemeToggle";
|
|
43
|
+
export { Tree } from "./components/Tree";
|
|
44
|
+
export type { TreeNode } from "./components/Tree";
|
|
45
|
+
export { cn } from "./lib/cn";
|
|
46
|
+
export { useChartTheme, styleAxis, assignSeriesColors } from "./lib/chartTheme";
|
|
47
|
+
export type { ChartTheme } from "./lib/chartTheme";
|
|
48
|
+
export { themeBootScript, useTheme } from "./lib/useTheme";
|
|
49
|
+
export type { UseThemeOptions } from "./lib/useTheme";
|
|
50
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cn as e } from "./lib/cn.js";
|
|
2
|
+
import { PulseBadge as t } from "./components/PulseBadge.js";
|
|
3
|
+
import { AgentStatus as n } from "./components/AgentStatus.js";
|
|
4
|
+
import { Button as r } from "./components/Button.js";
|
|
5
|
+
import { Skeleton as i } from "./components/Skeleton.js";
|
|
6
|
+
import { AgentTrace as a } from "./components/AgentTrace.js";
|
|
7
|
+
import { AppShell as o, Footer as s, Header as c } from "./components/AppShell.js";
|
|
8
|
+
import { Card as l } from "./components/Card.js";
|
|
9
|
+
import { CardGroup as u } from "./components/CardGroup.js";
|
|
10
|
+
import { Chip as d } from "./components/Chip.js";
|
|
11
|
+
import { FormGroup as f } from "./components/FormGroup.js";
|
|
12
|
+
import { CheckboxGroup as p } from "./components/CheckboxGroup.js";
|
|
13
|
+
import { Dropdown as m } from "./components/Dropdown.js";
|
|
14
|
+
import { EventLanes as h } from "./components/EventLanes.js";
|
|
15
|
+
import { HighlightText as g } from "./components/HighlightText.js";
|
|
16
|
+
import { Input as _ } from "./components/Input.js";
|
|
17
|
+
import { Legend as v } from "./components/Legend.js";
|
|
18
|
+
import { Modal as y } from "./components/Modal.js";
|
|
19
|
+
import { Panel as b } from "./components/Panel.js";
|
|
20
|
+
import { SearchInput as x } from "./components/SearchInput.js";
|
|
21
|
+
import { RadioGroup as S } from "./components/RadioGroup.js";
|
|
22
|
+
import { SegmentedControl as C } from "./components/SegmentedControl.js";
|
|
23
|
+
import { Tree as w } from "./components/Tree.js";
|
|
24
|
+
import { SectionedTree as T } from "./components/SectionedTree.js";
|
|
25
|
+
import { SplitPane as E } from "./components/SplitPane.js";
|
|
26
|
+
import { StatusBadge as D } from "./components/StatusBadge.js";
|
|
27
|
+
import { StreamingText as O } from "./components/StreamingText.js";
|
|
28
|
+
import { Table as k } from "./components/Table.js";
|
|
29
|
+
import { Toast as A } from "./components/Toast.js";
|
|
30
|
+
import { subscribeToasts as j, toast as M } from "./lib/toast.js";
|
|
31
|
+
import { ToastContainer as N } from "./components/ToastContainer.js";
|
|
32
|
+
import { themeBootScript as P, useTheme as F } from "./lib/useTheme.js";
|
|
33
|
+
import { ThemeToggle as I } from "./components/ThemeToggle.js";
|
|
34
|
+
import { assignSeriesColors as L, styleAxis as R, useChartTheme as z } from "./lib/chartTheme.js";
|
|
35
|
+
export { n as AgentStatus, a as AgentTrace, o as AppShell, r as Button, l as Card, u as CardGroup, p as CheckboxGroup, d as Chip, m as Dropdown, h as EventLanes, s as Footer, f as FormGroup, c as Header, g as HighlightText, _ as Input, v as Legend, y as Modal, b as Panel, t as PulseBadge, S as RadioGroup, x as SearchInput, T as SectionedTree, C as SegmentedControl, i as Skeleton, E as SplitPane, D as StatusBadge, O as StreamingText, k as Table, I as ThemeToggle, A as Toast, N as ToastContainer, w as Tree, L as assignSeriesColors, e as cn, R as styleAxis, j as subscribeToasts, P as themeBootScript, M as toast, z as useChartTheme, F as useTheme };
|