@tangle-network/sandbox-ui 0.20.3 → 0.21.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.
@@ -0,0 +1,88 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface BillingSubscription {
5
+ status: string;
6
+ tierName: string;
7
+ renewsAt: string;
8
+ }
9
+ interface BillingBalance {
10
+ available: number;
11
+ used: number;
12
+ }
13
+ interface BillingUsage {
14
+ period: string;
15
+ total: number;
16
+ byModel: Record<string, number>;
17
+ }
18
+ interface BillingDashboardProps {
19
+ subscription: BillingSubscription | null;
20
+ balance: BillingBalance;
21
+ usage: BillingUsage;
22
+ onManageSubscription: () => void;
23
+ onAddCredits: () => void;
24
+ variant?: "sandbox";
25
+ className?: string;
26
+ cardClassName?: string;
27
+ }
28
+ declare function BillingDashboard({ subscription, balance, usage, onManageSubscription, onAddCredits, variant, className, cardClassName, }: BillingDashboardProps): react_jsx_runtime.JSX.Element;
29
+
30
+ interface PricingTier {
31
+ id: string;
32
+ name: string;
33
+ description: string;
34
+ monthlyPriceCents: number;
35
+ yearlyPriceCents?: number;
36
+ features: string[];
37
+ recommended?: boolean;
38
+ creditsPerMonth?: number;
39
+ monthlyPriceId?: string;
40
+ yearlyPriceId?: string;
41
+ }
42
+ interface PricingPageProps {
43
+ tiers: PricingTier[];
44
+ currentTierId?: string;
45
+ billingPeriod: "monthly" | "yearly";
46
+ onBillingPeriodChange: (period: "monthly" | "yearly") => void;
47
+ onSelectTier: (tierId: string) => void;
48
+ variant?: "sandbox";
49
+ loading?: boolean;
50
+ className?: string;
51
+ cardClassName?: string;
52
+ }
53
+ /**
54
+ * Formats an integer cent amount as a human-readable USD price.
55
+ * Whole-dollar amounts omit decimals ($10), fractional amounts show two ($10.99).
56
+ * Returns "$0" for non-finite or negative inputs.
57
+ * @param cents - Amount in whole US cents (e.g. 1099 for $10.99).
58
+ */
59
+ declare function formatPrice(cents: number): string;
60
+ declare function PricingPage({ tiers, currentTierId, billingPeriod, onBillingPeriodChange, onSelectTier, loading, className, }: PricingPageProps): react_jsx_runtime.JSX.Element;
61
+
62
+ interface UsageDataPoint {
63
+ date: string;
64
+ value: number;
65
+ }
66
+ interface UsageChartProps {
67
+ data: UsageDataPoint[];
68
+ title: string;
69
+ unit: string;
70
+ className?: string;
71
+ }
72
+ declare function UsageChart({ data, title, unit, className }: UsageChartProps): react_jsx_runtime.JSX.Element;
73
+
74
+ interface TemplateCardData {
75
+ id: string;
76
+ name: string;
77
+ description: string;
78
+ icon?: React.ReactNode;
79
+ tags?: string[];
80
+ }
81
+ interface TemplateCardProps {
82
+ template: TemplateCardData;
83
+ onUseTemplate: (templateId: string) => void;
84
+ className?: string;
85
+ }
86
+ declare function TemplateCard({ template, onUseTemplate, className }: TemplateCardProps): react_jsx_runtime.JSX.Element;
87
+
88
+ export { type BillingBalance as B, PricingPage as P, TemplateCard as T, UsageChart as U, BillingDashboard as a, type BillingDashboardProps as b, type BillingSubscription as c, type BillingUsage as d, type PricingPageProps as e, type PricingTier as f, type TemplateCardData as g, type TemplateCardProps as h, type UsageChartProps as i, type UsageDataPoint as j, formatPrice as k };
@@ -275,6 +275,13 @@ interface SandboxWorkbenchSessionProps extends Omit<ChatContainerProps, "classNa
275
275
  subtitle?: ReactNode;
276
276
  meta?: ReactNode;
277
277
  headerActions?: ReactNode;
278
+ /**
279
+ * Controls rendered as a strip attached beneath the chat composer —
280
+ * harness/model/effort pickers, token meters, etc. Use
281
+ * `AgentSessionControls` from `@tangle-network/sandbox-ui/chat` for the
282
+ * standard set.
283
+ */
284
+ composerControls?: ReactNode;
278
285
  renderRunActions?: ChatContainerProps["renderRunActions"];
279
286
  renderUserMessageActions?: ChatContainerProps["renderUserMessageActions"];
280
287
  renderToolActions?: ChatContainerProps["renderToolActions"];
package/dist/workspace.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  TaskBoard,
15
15
  TerminalPanel,
16
16
  WorkspaceLayout
17
- } from "./chunk-CP2L6B53.js";
17
+ } from "./chunk-R6NONXFC.js";
18
18
  import "./chunk-EI44GEQ5.js";
19
19
  export {
20
20
  AgentWorkbench,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.20.3",
3
+ "version": "0.21.1",
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",
@@ -176,23 +176,23 @@
176
176
  "@xterm/xterm": "^6.0.0",
177
177
  "jsdom": "^29.0.2",
178
178
  "marked": "^17.0.5",
179
+ "postcss": "^8.5.8",
180
+ "postcss-import": "^16.1.1",
181
+ "react": "^19.1.0",
182
+ "react-dom": "^19.1.0",
179
183
  "react-markdown": "^10.1.0",
180
184
  "react-pdf": "^9.2.1",
181
185
  "react-syntax-highlighter": "^16.1.1",
182
186
  "rehype-sanitize": "^6.0.0",
183
187
  "remark-gfm": "^4.0.1",
184
- "turndown": "^7.2.2",
185
- "yjs": "^13.6.30",
186
- "postcss": "^8.5.8",
187
- "postcss-import": "^16.1.1",
188
- "react": "^19.1.0",
189
- "react-dom": "^19.1.0",
190
188
  "storybook": "^8.6.18",
191
189
  "tailwindcss": "^4.1.4",
192
190
  "tailwindcss-animate": "^1.0.7",
193
191
  "tsup": "^8.4.0",
192
+ "turndown": "^7.2.2",
194
193
  "typescript": "^5.8.3",
195
194
  "vite": "^8.0.5",
196
- "vitest": "^4.1.3"
195
+ "vitest": "^4.1.3",
196
+ "yjs": "^13.6.30"
197
197
  }
198
198
  }