@tangle-network/sandbox-ui 0.6.1 → 0.9.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/README.md +5 -6
- package/dist/auth.d.ts +10 -6
- package/dist/auth.js +3 -3
- package/dist/{chat-container-Cg-GwyiK.d.ts → chat-container-f4yEs6KN.d.ts} +9 -1
- package/dist/chat.d.ts +12 -2
- package/dist/chat.js +10 -10
- package/dist/{chunk-WBQ7VULC.js → chunk-34A66VBG.js} +7 -7
- package/dist/{chunk-JP725R4W.js → chunk-34I7UFSX.js} +2 -2
- package/dist/{chunk-CNWVHQFY.js → chunk-54SQQMMM.js} +6 -24
- package/dist/{chunk-DLCFZDGX.js → chunk-5UM2XMEJ.js} +39 -14
- package/dist/{chunk-YYGECNZZ.js → chunk-66EZOYZR.js} +3 -3
- package/dist/{chunk-6V4XVKFY.js → chunk-7YWFOGKQ.js} +344 -338
- package/dist/{chunk-DCPYTL4W.js → chunk-D4CZWJCD.js} +72 -148
- package/dist/{chunk-XTPAWK7L.js → chunk-DI3NZ5ZX.js} +15 -51
- package/dist/{chunk-MXRQ4MJE.js → chunk-DXMIEK4K.js} +34 -23
- package/dist/{chunk-ZMWWE5RF.js → chunk-EXSOPXIY.js} +141 -123
- package/dist/{chunk-GW4GRAWJ.js → chunk-GSZA3TSY.js} +18 -12
- package/dist/{chunk-W4LM3QYZ.js → chunk-HB5Y37YU.js} +8 -8
- package/dist/{chunk-RKXIRRKQ.js → chunk-JLKYXLFN.js} +70 -66
- package/dist/{chunk-BRBTD7RH.js → chunk-MA7YKRUP.js} +28 -18
- package/dist/{chunk-TSE423UF.js → chunk-MKTSMWVD.js} +6 -6
- package/dist/{chunk-MJUDMVRU.js → chunk-MT5FJ3ZT.js} +17 -17
- package/dist/{chunk-565V6JTN.js → chunk-OHPW55EV.js} +60 -99
- package/dist/chunk-OKLQVY3Y.js +139 -0
- package/dist/{chunk-OVNLOE3Y.js → chunk-PLTZB5BC.js} +41 -41
- package/dist/{chunk-E2XT3G52.js → chunk-QC4BJEG6.js} +136 -137
- package/dist/{chunk-KH5UDAJ2.js → chunk-QDH5GEGY.js} +58 -54
- package/dist/{chunk-33W2TLUL.js → chunk-QID2OOMG.js} +12 -3
- package/dist/{chunk-FJSVPBKY.js → chunk-S7OXQTST.js} +17 -3
- package/dist/chunk-T7HMZEVO.js +216 -0
- package/dist/{chunk-FNYJFCGU.js → chunk-U6QTHMY6.js} +145 -256
- package/dist/{chunk-YS66Q3RC.js → chunk-US6JKJKH.js} +2 -2
- package/dist/chunk-VX3XOUEB.js +63 -0
- package/dist/{chunk-TDYQBLL5.js → chunk-ZMNSRDMH.js} +6 -6
- package/dist/dashboard.d.ts +156 -4
- package/dist/dashboard.js +885 -8
- package/dist/{document-editor-pane-DWWUTTTZ.js → document-editor-pane-TLPVRBBU.js} +3 -3
- package/dist/editor.d.ts +9 -8
- package/dist/editor.js +3 -3
- package/dist/files.js +3 -3
- package/dist/globals.css +4787 -69
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +7 -7
- package/dist/index.d.ts +4 -4
- package/dist/index.js +28 -28
- package/dist/markdown.js +1 -1
- package/dist/openui.js +5 -5
- package/dist/pages.d.ts +114 -5
- package/dist/pages.js +1978 -365
- package/dist/primitives.d.ts +5 -2
- package/dist/primitives.js +10 -10
- package/dist/run.js +4 -4
- package/dist/sdk-hooks.d.ts +2 -3
- package/dist/sdk-hooks.js +5 -5
- package/dist/styles.css +4787 -69
- package/dist/template-card-BAtvcAkU.d.ts +18 -0
- package/dist/terminal.d.ts +3 -1
- package/dist/terminal.js +66 -32
- package/dist/tokens.css +289 -237
- package/dist/{usage-chart-XCoB_7Xu.d.ts → usage-chart-SSiOgeQI.d.ts} +3 -1
- package/dist/{use-pty-session-COzVkhtc.d.ts → use-pty-session-0AOuwXgq.d.ts} +2 -0
- package/dist/{index-BT_-ecpc.d.ts → variant-list-CsS6ydgm.d.ts} +16 -7
- package/dist/workspace.d.ts +2 -2
- package/dist/workspace.js +13 -13
- package/package.json +18 -3
- package/tailwind.config.cjs +3 -2
- package/dist/chunk-3HW53XTH.js +0 -228
- package/dist/chunk-OKCIKTXQ.js +0 -63
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CodeBlock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T7HMZEVO.js";
|
|
4
4
|
import {
|
|
5
5
|
cn
|
|
6
6
|
} from "./chunk-RQHJBTEU.js";
|
|
@@ -61,10 +61,10 @@ function FilePathChip({ path }) {
|
|
|
61
61
|
const parts = path.replace(/\\/g, "/").split("/");
|
|
62
62
|
const filename = parts.pop() ?? path;
|
|
63
63
|
const dir = parts.length > 0 ? parts.join("/") + "/" : "";
|
|
64
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 rounded-[var(--radius-sm)] border border-
|
|
65
|
-
/* @__PURE__ */ jsx(FileCode, { className: "h-3.5 w-3.5 shrink-0 text-
|
|
66
|
-
dir && /* @__PURE__ */ jsx("span", { className: "truncate text-
|
|
67
|
-
/* @__PURE__ */ jsx("span", { className: "shrink-0 font-semibold text-
|
|
64
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 rounded-[var(--radius-sm)] border border-border bg-background px-2.5 py-1.5 font-mono text-xs min-w-0", children: [
|
|
65
|
+
/* @__PURE__ */ jsx(FileCode, { className: "h-3.5 w-3.5 shrink-0 text-primary" }),
|
|
66
|
+
dir && /* @__PURE__ */ jsx("span", { className: "truncate text-muted-foreground", children: dir }),
|
|
67
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 font-semibold text-foreground", children: filename })
|
|
68
68
|
] });
|
|
69
69
|
}
|
|
70
70
|
var ICONS = {
|
|
@@ -81,7 +81,7 @@ var ICONS = {
|
|
|
81
81
|
unknown: FileCode
|
|
82
82
|
};
|
|
83
83
|
var STATUS_COLORS = {
|
|
84
|
-
running: "text-
|
|
84
|
+
running: "text-primary",
|
|
85
85
|
success: "text-[var(--code-success)]",
|
|
86
86
|
error: "text-[var(--code-error)]"
|
|
87
87
|
};
|
|
@@ -103,9 +103,9 @@ function ToolCallStep({
|
|
|
103
103
|
"div",
|
|
104
104
|
{
|
|
105
105
|
className: cn(
|
|
106
|
-
"group overflow-hidden rounded-[var(--radius-lg)] border bg-
|
|
107
|
-
status === "running" && "border-
|
|
108
|
-
status === "success" && "border-
|
|
106
|
+
"group overflow-hidden rounded-[var(--radius-lg)] border bg-card transition-colors",
|
|
107
|
+
status === "running" && "border-border",
|
|
108
|
+
status === "success" && "border-border hover:border-primary/20",
|
|
109
109
|
status === "error" && "border-[var(--surface-danger-border)]",
|
|
110
110
|
className
|
|
111
111
|
),
|
|
@@ -125,32 +125,32 @@ function ToolCallStep({
|
|
|
125
125
|
{
|
|
126
126
|
className: cn(
|
|
127
127
|
"flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border",
|
|
128
|
-
status === "running" && "border-[var(--border-accent)] bg-[var(--accent-surface-soft)] text-
|
|
128
|
+
status === "running" && "border-[var(--border-accent)] bg-[var(--accent-surface-soft)] text-primary",
|
|
129
129
|
status === "success" && "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]",
|
|
130
130
|
status === "error" && "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]"
|
|
131
131
|
),
|
|
132
132
|
children: status === "running" ? /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin shrink-0" }) : /* @__PURE__ */ jsx(Icon, { className: cn("h-3 w-3 shrink-0", STATUS_COLORS[status]) })
|
|
133
133
|
}
|
|
134
134
|
),
|
|
135
|
-
/* @__PURE__ */ jsx("span", { className: "truncate flex-1 font-
|
|
135
|
+
/* @__PURE__ */ jsx("span", { className: "truncate flex-1 font-sans text-foreground", children: label }),
|
|
136
136
|
/* @__PURE__ */ jsx(
|
|
137
137
|
"span",
|
|
138
138
|
{
|
|
139
139
|
className: cn(
|
|
140
140
|
"rounded-full border px-2 py-0.5 text-[11px] font-semibold uppercase tracking-[0.06em]",
|
|
141
|
-
status === "running" && "border-
|
|
141
|
+
status === "running" && "border-border bg-[var(--accent-surface-soft)] text-primary",
|
|
142
142
|
status === "success" && "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]",
|
|
143
143
|
status === "error" && "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]"
|
|
144
144
|
),
|
|
145
145
|
children: status
|
|
146
146
|
}
|
|
147
147
|
),
|
|
148
|
-
duration !== void 0 && status !== "running" && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs tabular-nums text-
|
|
148
|
+
duration !== void 0 && status !== "running" && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: duration < 1e3 ? `${duration}ms` : `${(duration / 1e3).toFixed(1)}s` }),
|
|
149
149
|
hasExpandable && /* @__PURE__ */ jsx(
|
|
150
150
|
ChevronRight,
|
|
151
151
|
{
|
|
152
152
|
className: cn(
|
|
153
|
-
"h-3 w-3 text-
|
|
153
|
+
"h-3 w-3 text-muted-foreground transition-transform shrink-0",
|
|
154
154
|
expanded && "rotate-90"
|
|
155
155
|
)
|
|
156
156
|
}
|
|
@@ -158,8 +158,8 @@ function ToolCallStep({
|
|
|
158
158
|
]
|
|
159
159
|
}
|
|
160
160
|
),
|
|
161
|
-
expanded && (detail || output) && /* @__PURE__ */ jsxs("div", { className: "space-y-2 border-t border-
|
|
162
|
-
detail && (isFilePath(detail) ? /* @__PURE__ */ jsx(FilePathChip, { path: detail }) : /* @__PURE__ */ jsx("div", { className: "text-xs font-
|
|
161
|
+
expanded && (detail || output) && /* @__PURE__ */ jsxs("div", { className: "space-y-2 border-t border-border bg-muted px-3 py-2.5", children: [
|
|
162
|
+
detail && (isFilePath(detail) ? /* @__PURE__ */ jsx(FilePathChip, { path: detail }) : /* @__PURE__ */ jsx("div", { className: "text-xs font-mono text-muted-foreground", children: detail })),
|
|
163
163
|
output && /* @__PURE__ */ jsx(
|
|
164
164
|
CodeBlock,
|
|
165
165
|
{
|
|
@@ -175,7 +175,7 @@ function ToolCallStep({
|
|
|
175
175
|
}
|
|
176
176
|
function ToolCallGroup({ title, children, className }) {
|
|
177
177
|
return /* @__PURE__ */ jsxs("div", { className: cn("my-2 space-y-2", className), children: [
|
|
178
|
-
title && /* @__PURE__ */ jsx("div", { className: "mb-1 px-1 text-xs font-medium uppercase tracking-wider text-
|
|
178
|
+
title && /* @__PURE__ */ jsx("div", { className: "mb-1 px-1 text-xs font-medium uppercase tracking-wider text-muted-foreground", children: title }),
|
|
179
179
|
children
|
|
180
180
|
] });
|
|
181
181
|
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Progress
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-66EZOYZR.js";
|
|
4
4
|
import {
|
|
5
5
|
Badge,
|
|
6
6
|
Card,
|
|
7
7
|
CardContent,
|
|
8
8
|
CardDescription,
|
|
9
|
-
CardFooter,
|
|
10
9
|
CardHeader,
|
|
11
10
|
CardTitle
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZMNSRDMH.js";
|
|
13
12
|
import {
|
|
14
13
|
Button
|
|
15
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MKTSMWVD.js";
|
|
16
15
|
import {
|
|
17
16
|
cn
|
|
18
17
|
} from "./chunk-RQHJBTEU.js";
|
|
@@ -253,44 +252,10 @@ function BillingDashboard({
|
|
|
253
252
|
}
|
|
254
253
|
|
|
255
254
|
// src/dashboard/pricing-page.tsx
|
|
255
|
+
import { Check, Zap } from "lucide-react";
|
|
256
256
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
257
|
-
var variantColors2 = {
|
|
258
|
-
sandbox: {
|
|
259
|
-
accent: "text-[var(--accent-text)]",
|
|
260
|
-
border: "border-[var(--border-accent)]",
|
|
261
|
-
bg: "bg-[var(--accent-surface-soft)]",
|
|
262
|
-
ring: "ring-[hsl(var(--primary)/0.35)]"
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
257
|
function formatPrice(cents) {
|
|
266
|
-
return (cents / 100)
|
|
267
|
-
style: "currency",
|
|
268
|
-
currency: "USD",
|
|
269
|
-
minimumFractionDigits: 0,
|
|
270
|
-
maximumFractionDigits: 0
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
function CheckIcon({ className }) {
|
|
274
|
-
return /* @__PURE__ */ jsxs2(
|
|
275
|
-
"svg",
|
|
276
|
-
{
|
|
277
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
278
|
-
viewBox: "0 0 20 20",
|
|
279
|
-
fill: "currentColor",
|
|
280
|
-
className: cn("h-5 w-5", className),
|
|
281
|
-
children: [
|
|
282
|
-
/* @__PURE__ */ jsx2("title", { children: "Check icon" }),
|
|
283
|
-
/* @__PURE__ */ jsx2(
|
|
284
|
-
"path",
|
|
285
|
-
{
|
|
286
|
-
fillRule: "evenodd",
|
|
287
|
-
d: "M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",
|
|
288
|
-
clipRule: "evenodd"
|
|
289
|
-
}
|
|
290
|
-
)
|
|
291
|
-
]
|
|
292
|
-
}
|
|
293
|
-
);
|
|
258
|
+
return `$${Math.round(cents / 100)}`;
|
|
294
259
|
}
|
|
295
260
|
function PricingPage({
|
|
296
261
|
tiers,
|
|
@@ -298,22 +263,23 @@ function PricingPage({
|
|
|
298
263
|
billingPeriod,
|
|
299
264
|
onBillingPeriodChange,
|
|
300
265
|
onSelectTier,
|
|
301
|
-
variant = "sandbox",
|
|
302
266
|
loading = false,
|
|
303
|
-
className
|
|
304
|
-
cardClassName
|
|
267
|
+
className
|
|
305
268
|
}) {
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
|
|
269
|
+
const tiersWithRecommended = tiers.map((tier, i) => ({
|
|
270
|
+
...tier,
|
|
271
|
+
recommended: tier.recommended ?? (tiers.length === 3 && i === 1)
|
|
272
|
+
}));
|
|
273
|
+
return /* @__PURE__ */ jsxs2("div", { className: cn("w-full space-y-10", className), children: [
|
|
274
|
+
/* @__PURE__ */ jsx2("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs2("div", { className: "inline-flex items-center rounded-full border border-border bg-muted/50 p-1", children: [
|
|
309
275
|
/* @__PURE__ */ jsx2(
|
|
310
276
|
"button",
|
|
311
277
|
{
|
|
312
278
|
type: "button",
|
|
313
279
|
onClick: () => onBillingPeriodChange("monthly"),
|
|
314
280
|
className: cn(
|
|
315
|
-
"rounded-
|
|
316
|
-
billingPeriod === "monthly" ?
|
|
281
|
+
"rounded-full px-5 py-2 text-sm font-medium transition-all",
|
|
282
|
+
billingPeriod === "monthly" ? "bg-card text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
317
283
|
),
|
|
318
284
|
children: "Monthly"
|
|
319
285
|
}
|
|
@@ -324,77 +290,72 @@ function PricingPage({
|
|
|
324
290
|
type: "button",
|
|
325
291
|
onClick: () => onBillingPeriodChange("yearly"),
|
|
326
292
|
className: cn(
|
|
327
|
-
"rounded-
|
|
328
|
-
billingPeriod === "yearly" ?
|
|
293
|
+
"rounded-full px-5 py-2 text-sm font-medium transition-all",
|
|
294
|
+
billingPeriod === "yearly" ? "bg-card text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
329
295
|
),
|
|
330
296
|
children: [
|
|
331
297
|
"Yearly",
|
|
332
|
-
/* @__PURE__ */ jsx2("span", { className:
|
|
298
|
+
/* @__PURE__ */ jsx2("span", { className: "ml-2 rounded-full bg-[var(--surface-success-bg)] px-2 py-0.5 text-[10px] font-bold text-[var(--surface-success-text)]", children: "Save 20%" })
|
|
333
299
|
]
|
|
334
300
|
}
|
|
335
301
|
)
|
|
336
|
-
] }),
|
|
337
|
-
/* @__PURE__ */ jsx2("div", { className: "grid grid-cols-1 gap-6
|
|
302
|
+
] }) }),
|
|
303
|
+
/* @__PURE__ */ jsx2("div", { className: "grid grid-cols-1 gap-6 lg:grid-cols-3 items-start", children: tiersWithRecommended.map((tier) => {
|
|
338
304
|
const isCurrentTier = tier.id === currentTierId;
|
|
305
|
+
const isRecommended = tier.recommended;
|
|
306
|
+
const isFree = tier.monthlyPriceCents === 0;
|
|
339
307
|
const price = billingPeriod === "yearly" && tier.yearlyPriceCents !== void 0 ? tier.yearlyPriceCents : tier.monthlyPriceCents;
|
|
340
308
|
const displayPrice = billingPeriod === "yearly" ? Math.round(price / 12) : price;
|
|
341
309
|
return /* @__PURE__ */ jsxs2(
|
|
342
|
-
|
|
310
|
+
"div",
|
|
343
311
|
{
|
|
344
|
-
variant,
|
|
345
312
|
className: cn(
|
|
346
|
-
"relative flex flex-col",
|
|
347
|
-
|
|
348
|
-
tier.recommended && cn(colors2.border, "border-2 ring-2", colors2.ring),
|
|
349
|
-
isCurrentTier && "ring-2 ring-offset-2 ring-offset-background",
|
|
350
|
-
isCurrentTier && colors2.ring
|
|
313
|
+
"relative flex flex-col rounded-2xl border transition-all",
|
|
314
|
+
isRecommended ? "border-primary shadow-[var(--shadow-glow)] scale-[1.02] z-10" : "border-border hover:border-primary/30"
|
|
351
315
|
),
|
|
352
316
|
children: [
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
|
|
363
|
-
|
|
317
|
+
isRecommended && /* @__PURE__ */ jsx2("div", { className: "absolute -top-4 left-1/2 -translate-x-1/2", children: /* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-1.5 rounded-full bg-primary px-4 py-1.5 text-xs font-bold text-primary-foreground shadow-sm", children: [
|
|
318
|
+
/* @__PURE__ */ jsx2(Zap, { className: "h-3 w-3" }),
|
|
319
|
+
"Most Popular"
|
|
320
|
+
] }) }),
|
|
321
|
+
isCurrentTier && !isRecommended && /* @__PURE__ */ jsx2("div", { className: "absolute -top-4 left-1/2 -translate-x-1/2", children: /* @__PURE__ */ jsx2("span", { className: "inline-flex items-center rounded-full bg-muted border border-border px-4 py-1.5 text-xs font-bold text-foreground", children: "Current Plan" }) }),
|
|
322
|
+
/* @__PURE__ */ jsxs2("div", { className: cn("flex flex-col p-8", isRecommended && "pt-10"), children: [
|
|
323
|
+
/* @__PURE__ */ jsxs2("div", { className: "mb-6", children: [
|
|
324
|
+
/* @__PURE__ */ jsx2("h3", { className: "text-lg font-bold text-foreground", children: tier.name }),
|
|
325
|
+
/* @__PURE__ */ jsx2("p", { className: "mt-1 text-sm text-muted-foreground", children: tier.description })
|
|
326
|
+
] }),
|
|
327
|
+
/* @__PURE__ */ jsxs2("div", { className: "mb-8", children: [
|
|
328
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-baseline gap-1", children: [
|
|
329
|
+
/* @__PURE__ */ jsx2("span", { className: cn("text-5xl font-extrabold tracking-tight", isRecommended ? "text-primary" : "text-foreground"), children: isFree ? "Free" : formatPrice(displayPrice) }),
|
|
330
|
+
!isFree && /* @__PURE__ */ jsx2("span", { className: "text-muted-foreground text-sm font-medium", children: "/mo" })
|
|
364
331
|
] }),
|
|
365
|
-
billingPeriod === "yearly" && tier.yearlyPriceCents !== void 0 && /* @__PURE__ */ jsxs2("p", { className: "mt-1 text-muted-foreground
|
|
332
|
+
billingPeriod === "yearly" && tier.yearlyPriceCents !== void 0 && !isFree && /* @__PURE__ */ jsxs2("p", { className: "mt-1 text-xs text-muted-foreground", children: [
|
|
366
333
|
formatPrice(tier.yearlyPriceCents),
|
|
367
334
|
" billed annually"
|
|
368
335
|
] })
|
|
369
336
|
] }),
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
337
|
+
/* @__PURE__ */ jsx2(
|
|
338
|
+
"button",
|
|
339
|
+
{
|
|
340
|
+
type: "button",
|
|
341
|
+
onClick: () => onSelectTier(tier.id),
|
|
342
|
+
disabled: isCurrentTier || loading,
|
|
343
|
+
className: cn(
|
|
344
|
+
"w-full rounded-xl py-3 text-sm font-bold transition-all active:scale-[0.98] disabled:opacity-50",
|
|
345
|
+
isRecommended ? "bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm" : isCurrentTier ? "bg-muted text-muted-foreground border border-border cursor-default" : "bg-card text-foreground border border-border hover:border-primary/50 hover:bg-muted"
|
|
346
|
+
),
|
|
347
|
+
children: isCurrentTier ? "Current Plan" : isFree ? "Get Started" : "Subscribe"
|
|
348
|
+
}
|
|
349
|
+
),
|
|
350
|
+
/* @__PURE__ */ jsx2("div", { className: "my-8 border-t border-border" }),
|
|
351
|
+
/* @__PURE__ */ jsx2("ul", { className: "space-y-3.5 flex-1", children: tier.features.map((feature) => /* @__PURE__ */ jsxs2("li", { className: "flex items-start gap-3", children: [
|
|
352
|
+
/* @__PURE__ */ jsx2("div", { className: cn(
|
|
353
|
+
"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full",
|
|
354
|
+
isRecommended ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
|
|
355
|
+
), children: /* @__PURE__ */ jsx2(Check, { className: "h-3 w-3" }) }),
|
|
356
|
+
/* @__PURE__ */ jsx2("span", { className: "text-sm text-foreground/80", children: feature })
|
|
385
357
|
] }, feature)) })
|
|
386
|
-
] })
|
|
387
|
-
/* @__PURE__ */ jsx2(CardFooter, { children: /* @__PURE__ */ jsx2(
|
|
388
|
-
Button,
|
|
389
|
-
{
|
|
390
|
-
variant: isCurrentTier ? "outline" : variant,
|
|
391
|
-
className: "w-full",
|
|
392
|
-
disabled: isCurrentTier || loading,
|
|
393
|
-
loading,
|
|
394
|
-
onClick: () => onSelectTier(tier.id),
|
|
395
|
-
children: isCurrentTier ? "Current Plan" : currentTierId ? "Upgrade" : "Subscribe"
|
|
396
|
-
}
|
|
397
|
-
) })
|
|
358
|
+
] })
|
|
398
359
|
]
|
|
399
360
|
},
|
|
400
361
|
tier.id
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Card
|
|
3
|
+
} from "./chunk-ZMNSRDMH.js";
|
|
4
|
+
import {
|
|
5
|
+
cn
|
|
6
|
+
} from "./chunk-RQHJBTEU.js";
|
|
7
|
+
|
|
8
|
+
// src/primitives/stat-card.tsx
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
var StatCard = React.forwardRef(
|
|
12
|
+
({
|
|
13
|
+
className,
|
|
14
|
+
variant = "default",
|
|
15
|
+
title,
|
|
16
|
+
value,
|
|
17
|
+
subtitle,
|
|
18
|
+
icon,
|
|
19
|
+
trend,
|
|
20
|
+
...props
|
|
21
|
+
}, ref) => {
|
|
22
|
+
const iconColors = {
|
|
23
|
+
default: "text-muted-foreground",
|
|
24
|
+
sandbox: "text-[var(--accent-text)]"
|
|
25
|
+
};
|
|
26
|
+
const trendColors = {
|
|
27
|
+
positive: "text-[var(--surface-success-text)]",
|
|
28
|
+
negative: "text-[var(--surface-danger-text)]",
|
|
29
|
+
neutral: "text-muted-foreground"
|
|
30
|
+
};
|
|
31
|
+
const trendStatus = trend ? trend.value > 0 ? "positive" : trend.value < 0 ? "negative" : "neutral" : null;
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
Card,
|
|
34
|
+
{
|
|
35
|
+
ref,
|
|
36
|
+
variant,
|
|
37
|
+
className: cn("p-6", className),
|
|
38
|
+
...props,
|
|
39
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
41
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: title }),
|
|
42
|
+
/* @__PURE__ */ jsx("p", { className: "font-bold text-3xl tracking-tight", children: value }),
|
|
43
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground opacity-70 text-xs", children: subtitle }),
|
|
44
|
+
trend && trendStatus && /* @__PURE__ */ jsxs(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: cn(
|
|
48
|
+
"flex items-center gap-1 text-sm",
|
|
49
|
+
trendColors[trendStatus]
|
|
50
|
+
),
|
|
51
|
+
children: [
|
|
52
|
+
trend.value > 0 ? "\u2191" : trend.value < 0 ? "\u2193" : "\u2192",
|
|
53
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
54
|
+
Math.abs(trend.value),
|
|
55
|
+
"%"
|
|
56
|
+
] }),
|
|
57
|
+
trend.label && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: trend.label })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] }),
|
|
62
|
+
icon && /* @__PURE__ */ jsx(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: cn(
|
|
66
|
+
"rounded-lg bg-muted/50 p-2",
|
|
67
|
+
variant === "sandbox" && "bg-[var(--accent-surface-soft)]",
|
|
68
|
+
iconColors[variant]
|
|
69
|
+
),
|
|
70
|
+
children: icon
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] })
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
StatCard.displayName = "StatCard";
|
|
79
|
+
|
|
80
|
+
// src/primitives/logo.tsx
|
|
81
|
+
import * as React2 from "react";
|
|
82
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
83
|
+
var sizeConfig = {
|
|
84
|
+
sm: { icon: 24, text: "text-base", suffix: "text-xs", gap: "gap-1.5" },
|
|
85
|
+
md: { icon: 28, text: "text-lg", suffix: "text-sm", gap: "gap-2" },
|
|
86
|
+
lg: { icon: 36, text: "text-2xl", suffix: "text-base", gap: "gap-2.5" },
|
|
87
|
+
xl: { icon: 48, text: "text-3xl", suffix: "text-lg", gap: "gap-3" }
|
|
88
|
+
};
|
|
89
|
+
function TangleKnot({ size, className }) {
|
|
90
|
+
const uid = React2.useId();
|
|
91
|
+
const g1 = `tk-a-${uid}`;
|
|
92
|
+
const g2 = `tk-b-${uid}`;
|
|
93
|
+
return /* @__PURE__ */ jsxs2(
|
|
94
|
+
"svg",
|
|
95
|
+
{
|
|
96
|
+
width: size,
|
|
97
|
+
height: size,
|
|
98
|
+
viewBox: "20 45 156 140",
|
|
99
|
+
fill: "none",
|
|
100
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
101
|
+
className,
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ jsx2("title", { children: "Tangle" }),
|
|
104
|
+
/* @__PURE__ */ jsxs2("defs", { children: [
|
|
105
|
+
/* @__PURE__ */ jsxs2("linearGradient", { id: g1, x1: "36.79", y1: "58.78", x2: "145.99", y2: "183.59", gradientUnits: "userSpaceOnUse", children: [
|
|
106
|
+
/* @__PURE__ */ jsx2("stop", { stopColor: "#8E59FF" }),
|
|
107
|
+
/* @__PURE__ */ jsx2("stop", { offset: "1", stopColor: "#6888F9" })
|
|
108
|
+
] }),
|
|
109
|
+
/* @__PURE__ */ jsxs2("linearGradient", { id: g2, x1: "36.78", y1: "169.38", x2: "145.99", y2: "44.57", gradientUnits: "userSpaceOnUse", children: [
|
|
110
|
+
/* @__PURE__ */ jsx2("stop", { stopColor: "#8E59FF" }),
|
|
111
|
+
/* @__PURE__ */ jsx2("stop", { offset: "1", stopColor: "#6888F9" })
|
|
112
|
+
] })
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ jsx2("path", { d: "M170.74 150.082C170.747 142.848 167.464 135.908 161.612 130.784C155.76 125.66 147.818 122.772 139.528 122.754L104.921 122.754C104.704 119.939 104.567 117.062 104.567 114.078C104.567 111.095 104.429 108.231 104.236 105.403L139.528 105.403C147.746 105.288 155.582 102.359 161.347 97.2467C167.112 92.135 170.343 85.2506 170.343 78.0787C170.343 70.9069 167.112 64.0225 161.347 58.9107C155.582 53.799 147.746 50.8696 139.528 50.7545L56.817 50.7545C48.5993 50.8696 40.7628 53.799 34.9981 58.9107C29.2334 64.0225 26.0025 70.9069 26.0025 78.0787C26.0025 85.2506 29.2334 92.135 34.9981 97.2467C40.7628 102.359 48.5993 105.288 56.817 105.403L89.3238 106.163C91.5854 106.163 91.7785 111.095 91.7785 114.078C91.7785 117.062 91.9156 119.925 92.1091 122.754L56.817 122.754C48.5993 122.869 40.7628 125.798 34.9981 130.91C29.2334 136.022 26.0025 142.906 26.0025 150.078C26.0025 157.25 29.2334 164.134 34.9981 169.246C40.7628 174.358 48.5993 177.287 56.817 177.402L139.528 177.402C147.816 177.384 155.757 174.497 161.609 169.374C167.461 164.252 170.745 157.314 170.74 150.082ZM157.952 78.0752C157.954 82.3443 156.016 86.4397 152.562 89.463C149.108 92.4863 144.42 94.1905 139.528 94.2017L102.881 94.2017C101.554 86.2073 99.0244 78.4005 95.3585 70.9829C93.7421 67.7691 91.6728 64.7438 89.1983 61.9769L139.528 61.9769C144.415 61.988 149.097 63.6884 152.55 66.7056C156.003 69.7228 157.946 73.811 157.952 78.0752ZM56.817 94.2017C51.9157 94.2017 47.2151 92.5027 43.7493 89.4784C40.2835 86.4541 38.3364 82.3522 38.3364 78.0752C38.3364 73.7982 40.2835 69.6964 43.7493 66.6721C47.2151 63.6478 51.9157 61.9487 56.817 61.9487L65.1139 61.9487C72.4433 61.9487 79.3856 67.0146 83.7074 75.5071C86.6658 81.491 88.77 87.7697 89.9724 94.2017L56.817 94.2017ZM38.3929 150.082C38.3907 145.812 40.3293 141.717 43.7834 138.694C47.2374 135.67 51.9248 133.966 56.817 133.955L93.4637 133.955C94.7912 141.949 97.3206 149.756 100.987 157.174C102.603 160.388 104.672 163.413 107.147 166.18L56.817 166.18C51.9304 166.169 47.2479 164.468 43.7948 161.451C40.3416 158.434 38.3993 154.346 38.3929 150.082ZM112.686 152.65C109.728 146.666 107.623 140.387 106.421 133.955L139.528 133.955C144.429 133.955 149.13 135.654 152.596 138.678C156.062 141.703 158.009 145.804 158.009 150.082C158.009 154.359 156.062 158.46 152.596 161.485C149.13 164.509 144.429 166.208 139.528 166.208L131.231 166.208C123.934 166.208 116.992 161.142 112.686 152.65Z", fill: `url(#${g1})` }),
|
|
115
|
+
/* @__PURE__ */ jsx2("path", { opacity: "0.8", d: "M170.74 78.0752C170.747 85.3089 167.463 92.2492 161.612 97.3728C155.76 102.496 147.817 105.384 139.527 105.403L104.92 105.403C104.702 108.217 104.565 111.095 104.565 114.078C104.565 117.062 104.428 119.925 104.235 122.754L139.527 122.754C147.745 122.869 155.582 125.798 161.347 130.91C167.112 136.022 170.342 142.906 170.342 150.078C170.342 157.25 167.112 164.134 161.347 169.246C155.582 174.358 147.745 177.287 139.527 177.402L56.8149 177.402C48.597 177.287 40.7604 174.358 34.9956 169.246C29.2307 164.134 25.9998 157.25 25.9998 150.078C25.9998 142.906 29.2307 136.022 34.9956 130.91C40.7604 125.798 48.597 122.869 56.8149 122.754L89.3223 121.994C91.5839 121.994 91.777 117.062 91.777 114.078C91.777 111.095 91.9141 108.231 92.1076 105.403L56.8149 105.403C48.597 105.288 40.7604 102.359 34.9956 97.2468C29.2307 92.135 25.9998 85.2506 25.9998 78.0788C25.9998 70.9069 29.2307 64.0225 34.9956 58.9108C40.7604 53.799 48.597 50.8696 56.8149 50.7545L139.527 50.7545C147.816 50.7731 155.757 53.6602 161.609 58.7823C167.46 63.9043 170.744 70.8428 170.74 78.0752ZM157.952 150.082C157.954 145.812 156.015 141.717 152.561 138.694C149.107 135.67 144.42 133.966 139.527 133.955L102.88 133.955C101.552 141.949 99.023 149.756 95.3571 157.174C93.7406 160.388 91.6712 163.413 89.1968 166.18L139.527 166.18C144.414 166.169 149.097 164.468 152.55 161.451C156.003 158.434 157.945 154.346 157.952 150.082ZM56.8149 133.955C51.9134 133.955 47.2127 135.654 43.7469 138.678C40.2811 141.703 38.334 145.805 38.334 150.082C38.334 154.359 40.2811 158.46 43.7469 161.485C47.2127 164.509 51.9134 166.208 56.8149 166.208L65.1119 166.208C72.4414 166.208 79.3838 161.142 83.7057 152.65C86.6642 146.666 88.7684 140.387 89.9708 133.955L56.8149 133.955ZM38.3904 78.0752C38.3883 82.3443 40.3269 86.4398 43.781 89.4631C47.2351 92.4863 51.9226 94.1905 56.8149 94.2017L93.4622 94.2017C94.7898 86.2073 97.3192 78.4005 100.985 70.983C102.602 67.7692 104.671 64.7438 107.145 61.9769L56.8149 61.9769C51.9282 61.9881 47.2456 63.6884 43.7924 66.7056C40.3392 69.7228 38.3968 73.8111 38.3904 78.0752ZM112.685 75.5071C109.726 81.491 107.622 87.7697 106.42 94.2017L139.527 94.2017C144.429 94.2017 149.13 92.5027 152.595 89.4784C156.061 86.4541 158.008 82.3522 158.008 78.0752C158.008 73.7982 156.061 69.6964 152.595 66.6721C149.13 63.6478 144.429 61.9488 139.527 61.9488L131.23 61.9488C123.933 61.9488 116.991 67.0147 112.685 75.5071Z", fill: `url(#${g2})` })
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
function Logo({ variant = "sandbox", size = "md", className, iconOnly = false }) {
|
|
121
|
+
const cfg = sizeConfig[size];
|
|
122
|
+
if (iconOnly) {
|
|
123
|
+
return /* @__PURE__ */ jsx2(TangleKnot, { size: cfg.icon, className });
|
|
124
|
+
}
|
|
125
|
+
return /* @__PURE__ */ jsxs2("div", { className: cn("flex items-center", cfg.gap, className), children: [
|
|
126
|
+
/* @__PURE__ */ jsx2(TangleKnot, { size: cfg.icon, className: "shrink-0" }),
|
|
127
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-baseline gap-1", children: [
|
|
128
|
+
/* @__PURE__ */ jsx2("span", { className: cn("font-bold tracking-tight", cfg.text), children: "Tangle" }),
|
|
129
|
+
variant === "sandbox" && /* @__PURE__ */ jsx2("span", { className: cn("font-medium text-gradient-sandbox", cfg.suffix), children: "Sandbox" })
|
|
130
|
+
] })
|
|
131
|
+
] });
|
|
132
|
+
}
|
|
133
|
+
Logo.displayName = "Logo";
|
|
134
|
+
|
|
135
|
+
export {
|
|
136
|
+
StatCard,
|
|
137
|
+
TangleKnot,
|
|
138
|
+
Logo
|
|
139
|
+
};
|