@tangle-network/sandbox-ui 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.js +3 -3
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +11 -9
- package/dist/{chunk-ZP6GSX4D.js → chunk-565V6JTN.js} +26 -50
- package/dist/chunk-5CEMHKBP.js +72 -0
- package/dist/{chunk-FOQTE67I.js → chunk-5F4NX5R2.js} +10 -5
- package/dist/{chunk-MUOL44AE.js → chunk-BRBTD7RH.js} +6 -6
- package/dist/{chunk-SSKVYXCR.js → chunk-DCPYTL4W.js} +62 -79
- package/dist/chunk-DLCFZDGX.js +182 -0
- package/dist/{chunk-HXEA7L2T.js → chunk-FFOXUHOF.js} +10 -10
- package/dist/chunk-H5XYSFYE.js +228 -0
- package/dist/{chunk-TQN3VR4F.js → chunk-JP725R4W.js} +2 -2
- package/dist/{chunk-CJ2RYVZH.js → chunk-NTSRY4GW.js} +68 -10
- package/dist/{chunk-DQYODCBN.js → chunk-P24K22CV.js} +57 -66
- package/dist/{chunk-GVUW4VDD.js → chunk-R3IU37AW.js} +161 -229
- package/dist/chunk-TDYQBLL5.js +127 -0
- package/dist/{chunk-HWLX5NME.js → chunk-TSE423UF.js} +12 -12
- package/dist/{chunk-YDBXQQLC.js → chunk-VBWY44UU.js} +30 -76
- package/dist/{chunk-IW2JZCOC.js → chunk-WBQ7VULC.js} +7 -7
- package/dist/{chunk-72UEKFZ2.js → chunk-WC7QTWPN.js} +65 -42
- package/dist/{chunk-HYLTXGOI.js → chunk-WQH233GF.js} +5 -5
- package/dist/{chunk-CCKNIAS7.js → chunk-XBR3IP7B.js} +2 -2
- package/dist/{chunk-OHMO7NUX.js → chunk-XTPAWK7L.js} +20 -31
- package/dist/{chunk-SULQQJPB.js → chunk-YS66Q3RC.js} +1 -1
- package/dist/{chunk-FRGMMANX.js → chunk-YYGECNZZ.js} +3 -3
- package/dist/{chunk-MVYFNPAH.js → chunk-ZOZX2U6I.js} +285 -271
- package/dist/dashboard.d.ts +2 -2
- package/dist/dashboard.js +6 -6
- package/dist/{document-editor-pane-5TN2VWGZ.js → document-editor-pane-JNXPANWM.js} +2 -2
- package/dist/editor.js +2 -2
- package/dist/files.js +2 -2
- package/dist/globals.css +129 -95
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +5 -5
- package/dist/{index-tTfThG0n.d.ts → index-CDt0GE4A.d.ts} +7 -8
- package/dist/index.d.ts +16 -23
- package/dist/index.js +27 -26
- package/dist/markdown.d.ts +14 -17
- package/dist/markdown.js +1 -1
- package/dist/openui.js +5 -5
- package/dist/pages.d.ts +10 -3
- package/dist/pages.js +147 -184
- package/dist/primitives.d.ts +8 -5
- package/dist/primitives.js +8 -8
- package/dist/run.d.ts +1 -1
- package/dist/run.js +4 -4
- package/dist/sdk-hooks.d.ts +1 -1
- package/dist/sdk-hooks.js +4 -4
- package/dist/styles.css +129 -95
- package/dist/terminal.d.ts +2 -2
- package/dist/terminal.js +13 -43
- package/dist/tokens.css +299 -179
- package/dist/{tool-call-feed-D5Ume-Pt.d.ts → tool-call-feed-Bs3MyQMT.d.ts} +3 -1
- package/dist/{usage-chart-CY9xo3KX.d.ts → usage-chart-XCoB_7Xu.d.ts} +1 -2
- package/dist/{use-pty-session-DeZSxOCN.d.ts → use-pty-session-COzVkhtc.d.ts} +1 -1
- package/dist/workspace.d.ts +3 -1
- package/dist/workspace.js +11 -11
- package/package.json +14 -2
- package/dist/chunk-GRYHFH5O.js +0 -110
- package/dist/chunk-LTFK464G.js +0 -103
- package/dist/chunk-MXCSSOGH.js +0 -105
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -97,7 +97,9 @@
|
|
|
97
97
|
"scripts": {
|
|
98
98
|
"build": "tsup",
|
|
99
99
|
"dev": "tsup --watch",
|
|
100
|
-
"typecheck": "tsc --noEmit"
|
|
100
|
+
"typecheck": "tsc --noEmit",
|
|
101
|
+
"storybook": "storybook dev -p 6006",
|
|
102
|
+
"build-storybook": "storybook build"
|
|
101
103
|
},
|
|
102
104
|
"peerDependencies": {
|
|
103
105
|
"react": "^18 || ^19",
|
|
@@ -164,6 +166,7 @@
|
|
|
164
166
|
"nanostores": "^1.2.0",
|
|
165
167
|
"react-markdown": "^10.1.0",
|
|
166
168
|
"react-pdf": "^9.2.1",
|
|
169
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
167
170
|
"rehype-sanitize": "^6.0.0",
|
|
168
171
|
"remark-gfm": "^4.0.1",
|
|
169
172
|
"tailwind-merge": "^3.0.2",
|
|
@@ -171,6 +174,12 @@
|
|
|
171
174
|
},
|
|
172
175
|
"devDependencies": {
|
|
173
176
|
"@hocuspocus/provider": "^3.4.4",
|
|
177
|
+
"@storybook/addon-essentials": "^8",
|
|
178
|
+
"@storybook/addon-mcp": "^0.4.2",
|
|
179
|
+
"@storybook/react": "^8.6.18",
|
|
180
|
+
"@storybook/react-vite": "^8.6.18",
|
|
181
|
+
"@tailwindcss/postcss": "^4.2.2",
|
|
182
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
174
183
|
"@tanstack/react-query": "^5.91.0",
|
|
175
184
|
"@tiptap/core": "^3.20.4",
|
|
176
185
|
"@tiptap/extension-collaboration": "^3.20.4",
|
|
@@ -178,15 +187,18 @@
|
|
|
178
187
|
"@tiptap/react": "^3.20.4",
|
|
179
188
|
"@tiptap/starter-kit": "^3.20.4",
|
|
180
189
|
"@types/react": "^19.1.2",
|
|
190
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
181
191
|
"@types/turndown": "^5.0.6",
|
|
182
192
|
"@xterm/addon-fit": "^0.11.0",
|
|
183
193
|
"@xterm/addon-web-links": "^0.12.0",
|
|
184
194
|
"@xterm/xterm": "^6.0.0",
|
|
185
195
|
"react": "^19.1.0",
|
|
186
196
|
"react-dom": "^19.1.0",
|
|
197
|
+
"storybook": "^8.6.18",
|
|
187
198
|
"tailwindcss": "^4.1.4",
|
|
188
199
|
"tsup": "^8.4.0",
|
|
189
200
|
"typescript": "^5.8.3",
|
|
201
|
+
"vite": "^8.0.3",
|
|
190
202
|
"yjs": "^13.6.30"
|
|
191
203
|
}
|
|
192
204
|
}
|
package/dist/chunk-GRYHFH5O.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
// src/hooks/use-pty-session.ts
|
|
2
|
-
import { useState, useEffect, useRef, useCallback } from "react";
|
|
3
|
-
function usePtySession({ apiUrl, token, onData }) {
|
|
4
|
-
const [isConnected, setIsConnected] = useState(false);
|
|
5
|
-
const [error, setError] = useState(null);
|
|
6
|
-
const sessionIdRef = useRef(null);
|
|
7
|
-
const eventSourceRef = useRef(null);
|
|
8
|
-
const retryTimerRef = useRef(void 0);
|
|
9
|
-
const mountedRef = useRef(true);
|
|
10
|
-
const onDataRef = useRef(onData);
|
|
11
|
-
onDataRef.current = onData;
|
|
12
|
-
const cleanup = useCallback(() => {
|
|
13
|
-
if (retryTimerRef.current) {
|
|
14
|
-
clearTimeout(retryTimerRef.current);
|
|
15
|
-
retryTimerRef.current = void 0;
|
|
16
|
-
}
|
|
17
|
-
if (eventSourceRef.current) {
|
|
18
|
-
eventSourceRef.current.close();
|
|
19
|
-
eventSourceRef.current = null;
|
|
20
|
-
}
|
|
21
|
-
if (sessionIdRef.current) {
|
|
22
|
-
const sid = sessionIdRef.current;
|
|
23
|
-
sessionIdRef.current = null;
|
|
24
|
-
fetch(`${apiUrl}/terminals/${sid}`, {
|
|
25
|
-
method: "DELETE",
|
|
26
|
-
headers: { Authorization: `Bearer ${token}` }
|
|
27
|
-
}).catch(() => {
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
setIsConnected(false);
|
|
31
|
-
}, [apiUrl, token]);
|
|
32
|
-
const connect = useCallback(async () => {
|
|
33
|
-
cleanup();
|
|
34
|
-
setError(null);
|
|
35
|
-
try {
|
|
36
|
-
const res = await fetch(`${apiUrl}/terminals`, {
|
|
37
|
-
method: "POST",
|
|
38
|
-
headers: {
|
|
39
|
-
Authorization: `Bearer ${token}`,
|
|
40
|
-
"Content-Type": "application/json"
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
if (!res.ok) {
|
|
44
|
-
throw new Error(`Failed to create terminal: ${res.status}`);
|
|
45
|
-
}
|
|
46
|
-
const body = await res.json();
|
|
47
|
-
const sessionId = body.data?.sessionId ?? body.sessionId;
|
|
48
|
-
if (!sessionId) throw new Error("No sessionId in response");
|
|
49
|
-
if (!mountedRef.current) return;
|
|
50
|
-
sessionIdRef.current = sessionId;
|
|
51
|
-
const streamUrl = `${apiUrl}/terminals/${sessionId}/stream?token=${encodeURIComponent(token)}`;
|
|
52
|
-
const es = new EventSource(streamUrl);
|
|
53
|
-
eventSourceRef.current = es;
|
|
54
|
-
es.onopen = () => {
|
|
55
|
-
if (mountedRef.current) {
|
|
56
|
-
setIsConnected(true);
|
|
57
|
-
setError(null);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
es.onmessage = (event) => {
|
|
61
|
-
if (mountedRef.current && event.data) {
|
|
62
|
-
onDataRef.current(event.data);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
es.onerror = () => {
|
|
66
|
-
if (!mountedRef.current) return;
|
|
67
|
-
es.close();
|
|
68
|
-
eventSourceRef.current = null;
|
|
69
|
-
setIsConnected(false);
|
|
70
|
-
retryTimerRef.current = setTimeout(() => {
|
|
71
|
-
if (mountedRef.current) connect();
|
|
72
|
-
}, 3e3);
|
|
73
|
-
};
|
|
74
|
-
} catch (err) {
|
|
75
|
-
if (mountedRef.current) {
|
|
76
|
-
setError(err instanceof Error ? err.message : "Terminal connection failed");
|
|
77
|
-
setIsConnected(false);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}, [apiUrl, token, cleanup]);
|
|
81
|
-
const sendCommand = useCallback(async (command) => {
|
|
82
|
-
const sid = sessionIdRef.current;
|
|
83
|
-
if (!sid) return;
|
|
84
|
-
const res = await fetch(`${apiUrl}/terminals/${sid}/execute`, {
|
|
85
|
-
method: "POST",
|
|
86
|
-
headers: {
|
|
87
|
-
Authorization: `Bearer ${token}`,
|
|
88
|
-
"Content-Type": "application/json"
|
|
89
|
-
},
|
|
90
|
-
body: JSON.stringify({ command })
|
|
91
|
-
});
|
|
92
|
-
if (!res.ok) {
|
|
93
|
-
const text = await res.text();
|
|
94
|
-
throw new Error(text || `Execute failed: ${res.status}`);
|
|
95
|
-
}
|
|
96
|
-
}, [apiUrl, token]);
|
|
97
|
-
useEffect(() => {
|
|
98
|
-
mountedRef.current = true;
|
|
99
|
-
connect();
|
|
100
|
-
return () => {
|
|
101
|
-
mountedRef.current = false;
|
|
102
|
-
cleanup();
|
|
103
|
-
};
|
|
104
|
-
}, [connect, cleanup]);
|
|
105
|
-
return { isConnected, error, sendCommand, reconnect: connect };
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export {
|
|
109
|
-
usePtySession
|
|
110
|
-
};
|
package/dist/chunk-LTFK464G.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-RQHJBTEU.js";
|
|
4
|
-
|
|
5
|
-
// src/markdown/code-block.tsx
|
|
6
|
-
import {
|
|
7
|
-
memo,
|
|
8
|
-
useCallback,
|
|
9
|
-
useState
|
|
10
|
-
} from "react";
|
|
11
|
-
import { Check, Copy } from "lucide-react";
|
|
12
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
var CodeBlock = memo(
|
|
14
|
-
({ code, language, className, children, ...props }) => {
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
"div",
|
|
17
|
-
{
|
|
18
|
-
className: cn("relative overflow-hidden rounded-lg", className),
|
|
19
|
-
...props,
|
|
20
|
-
children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
21
|
-
/* @__PURE__ */ jsx("pre", { className: "m-0 p-4 overflow-x-auto text-sm font-mono bg-neutral-100 text-neutral-800 dark:bg-neutral-900 dark:text-neutral-100", children: /* @__PURE__ */ jsx("code", { className: language ? `language-${language}` : void 0, children: code }) }),
|
|
22
|
-
children && /* @__PURE__ */ jsx("div", { className: "absolute top-2 right-2 flex items-center gap-2", children })
|
|
23
|
-
] })
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
CodeBlock.displayName = "CodeBlock";
|
|
29
|
-
var CopyButton = memo(({ text }) => {
|
|
30
|
-
const [copied, setCopied] = useState(false);
|
|
31
|
-
const handleCopy = useCallback(async () => {
|
|
32
|
-
try {
|
|
33
|
-
await navigator.clipboard.writeText(text);
|
|
34
|
-
setCopied(true);
|
|
35
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
36
|
-
} catch {
|
|
37
|
-
}
|
|
38
|
-
}, [text]);
|
|
39
|
-
return /* @__PURE__ */ jsx(
|
|
40
|
-
"button",
|
|
41
|
-
{
|
|
42
|
-
onClick: handleCopy,
|
|
43
|
-
className: "flex items-center justify-center w-7 h-7 rounded-md bg-black/10 dark:bg-white/10 hover:bg-black/20 dark:hover:bg-white/20 transition-colors",
|
|
44
|
-
title: "Copy to clipboard",
|
|
45
|
-
children: copied ? /* @__PURE__ */ jsx(Check, { className: "w-3.5 h-3.5 text-green-500 dark:text-green-400" }) : /* @__PURE__ */ jsx(Copy, { className: "w-3.5 h-3.5 text-neutral-400" })
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
});
|
|
49
|
-
CopyButton.displayName = "CopyButton";
|
|
50
|
-
|
|
51
|
-
// src/markdown/markdown.tsx
|
|
52
|
-
import { memo as memo2 } from "react";
|
|
53
|
-
import ReactMarkdown from "react-markdown";
|
|
54
|
-
import remarkGfm from "remark-gfm";
|
|
55
|
-
import rehypeSanitize from "rehype-sanitize";
|
|
56
|
-
import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
|
|
57
|
-
var Markdown = memo2(({ children, className }) => {
|
|
58
|
-
return /* @__PURE__ */ jsx2(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
className: cn("prose prose-sm dark:prose-invert max-w-none", className),
|
|
62
|
-
children: /* @__PURE__ */ jsx2(
|
|
63
|
-
ReactMarkdown,
|
|
64
|
-
{
|
|
65
|
-
remarkPlugins: [remarkGfm],
|
|
66
|
-
rehypePlugins: [rehypeSanitize],
|
|
67
|
-
components: {
|
|
68
|
-
pre({ children: preChildren }) {
|
|
69
|
-
return /* @__PURE__ */ jsx2(Fragment, { children: preChildren });
|
|
70
|
-
},
|
|
71
|
-
code({ className: codeClass, children: codeChildren, ...rest }) {
|
|
72
|
-
const match = /language-(\w+)/.exec(codeClass || "");
|
|
73
|
-
const language = match?.[1];
|
|
74
|
-
const code = String(codeChildren).replace(/\n$/, "");
|
|
75
|
-
if (!language && !code.includes("\n")) {
|
|
76
|
-
return /* @__PURE__ */ jsx2(
|
|
77
|
-
"code",
|
|
78
|
-
{
|
|
79
|
-
className: cn(
|
|
80
|
-
"px-1.5 py-0.5 rounded bg-neutral-200/50 dark:bg-neutral-800/50 text-sm font-mono",
|
|
81
|
-
codeClass
|
|
82
|
-
),
|
|
83
|
-
...rest,
|
|
84
|
-
children: codeChildren
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
return /* @__PURE__ */ jsx2(CodeBlock, { code, language, children: /* @__PURE__ */ jsx2(CopyButton, { text: code }) });
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
children
|
|
92
|
-
}
|
|
93
|
-
)
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
});
|
|
97
|
-
Markdown.displayName = "Markdown";
|
|
98
|
-
|
|
99
|
-
export {
|
|
100
|
-
CodeBlock,
|
|
101
|
-
CopyButton,
|
|
102
|
-
Markdown
|
|
103
|
-
};
|
package/dist/chunk-MXCSSOGH.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-RQHJBTEU.js";
|
|
4
|
-
|
|
5
|
-
// src/primitives/card.tsx
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
var Card = React.forwardRef(({ className, variant = "default", hover = false, ...props }, ref) => {
|
|
9
|
-
const variants = {
|
|
10
|
-
default: "bg-card border-border",
|
|
11
|
-
glass: "bg-card/60 backdrop-blur-xl border-border/50",
|
|
12
|
-
sandbox: "bg-card/80 backdrop-blur-xl border-[var(--border-accent)] shadow-[var(--shadow-accent)]"
|
|
13
|
-
};
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
15
|
-
"div",
|
|
16
|
-
{
|
|
17
|
-
ref,
|
|
18
|
-
className: cn(
|
|
19
|
-
"rounded-xl border text-card-foreground transition-all duration-300",
|
|
20
|
-
variants[variant],
|
|
21
|
-
hover && "cursor-pointer hover:border-muted-foreground/50 hover:shadow-xl",
|
|
22
|
-
className
|
|
23
|
-
),
|
|
24
|
-
...props
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
});
|
|
28
|
-
Card.displayName = "Card";
|
|
29
|
-
var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
30
|
-
"div",
|
|
31
|
-
{
|
|
32
|
-
ref,
|
|
33
|
-
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
34
|
-
...props
|
|
35
|
-
}
|
|
36
|
-
));
|
|
37
|
-
CardHeader.displayName = "CardHeader";
|
|
38
|
-
var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
39
|
-
"h3",
|
|
40
|
-
{
|
|
41
|
-
ref,
|
|
42
|
-
className: cn("font-semibold leading-none tracking-tight", className),
|
|
43
|
-
...props
|
|
44
|
-
}
|
|
45
|
-
));
|
|
46
|
-
CardTitle.displayName = "CardTitle";
|
|
47
|
-
var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
48
|
-
"p",
|
|
49
|
-
{
|
|
50
|
-
ref,
|
|
51
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
52
|
-
...props
|
|
53
|
-
}
|
|
54
|
-
));
|
|
55
|
-
CardDescription.displayName = "CardDescription";
|
|
56
|
-
var CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
57
|
-
CardContent.displayName = "CardContent";
|
|
58
|
-
var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
ref,
|
|
62
|
-
className: cn("flex items-center p-6 pt-0", className),
|
|
63
|
-
...props
|
|
64
|
-
}
|
|
65
|
-
));
|
|
66
|
-
CardFooter.displayName = "CardFooter";
|
|
67
|
-
|
|
68
|
-
// src/primitives/badge.tsx
|
|
69
|
-
import { cva } from "class-variance-authority";
|
|
70
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
71
|
-
var badgeVariants = cva(
|
|
72
|
-
"inline-flex items-center rounded-full border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
73
|
-
{
|
|
74
|
-
variants: {
|
|
75
|
-
variant: {
|
|
76
|
-
default: "border-transparent bg-primary text-primary-foreground",
|
|
77
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
78
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground",
|
|
79
|
-
outline: "text-foreground",
|
|
80
|
-
success: "border-green-500/20 border-transparent bg-green-500/10 text-green-400",
|
|
81
|
-
warning: "border-transparent border-yellow-500/20 bg-yellow-500/10 text-yellow-400",
|
|
82
|
-
error: "border-red-500/20 border-transparent bg-red-500/10 text-red-400",
|
|
83
|
-
info: "border-blue-500/20 border-transparent bg-blue-500/10 text-blue-400",
|
|
84
|
-
sandbox: "border-[var(--border-accent)] bg-[var(--accent-surface-soft)] text-[var(--accent-text)]"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
defaultVariants: {
|
|
88
|
-
variant: "default"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
function Badge({ className, variant, ...props }) {
|
|
93
|
-
return /* @__PURE__ */ jsx2("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export {
|
|
97
|
-
Card,
|
|
98
|
-
CardHeader,
|
|
99
|
-
CardTitle,
|
|
100
|
-
CardDescription,
|
|
101
|
-
CardContent,
|
|
102
|
-
CardFooter,
|
|
103
|
-
badgeVariants,
|
|
104
|
-
Badge
|
|
105
|
-
};
|