@tangle-network/sandbox-ui 0.14.0 → 0.15.2

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.
Files changed (106) hide show
  1. package/dist/auth.d.ts +1 -74
  2. package/dist/auth.js +1 -4
  3. package/dist/chat.d.ts +1 -136
  4. package/dist/chat.js +2 -15
  5. package/dist/chunk-2BUPSB7O.js +0 -0
  6. package/dist/chunk-3J6FG3FJ.js +18 -0
  7. package/dist/chunk-76IQLPW2.js +206 -0
  8. package/dist/chunk-7ZA5SEK3.js +239 -0
  9. package/dist/chunk-AZ3AWMTM.js +8 -0
  10. package/dist/chunk-CMY7W45U.js +380 -0
  11. package/dist/chunk-EI44GEQ5.js +6 -0
  12. package/dist/chunk-ENMWGVDL.js +858 -0
  13. package/dist/{chunk-5OQ27N57.js → chunk-GPT7VKK6.js} +34 -38
  14. package/dist/chunk-HLZTKSGT.js +2652 -0
  15. package/dist/chunk-JBGKGLD7.js +16 -0
  16. package/dist/chunk-NJNME4J4.js +14 -0
  17. package/dist/chunk-QPAJR74X.js +20 -0
  18. package/dist/chunk-TK46XFLM.js +28 -0
  19. package/dist/chunk-WID73FPH.js +89 -0
  20. package/dist/chunk-YVXK4XRO.js +30 -0
  21. package/dist/dashboard.d.ts +450 -4
  22. package/dist/dashboard.js +20 -891
  23. package/dist/editor.d.ts +1 -120
  24. package/dist/editor.js +1 -5
  25. package/dist/files.d.ts +1 -129
  26. package/dist/files.js +2 -7
  27. package/dist/globals.css +2 -1265
  28. package/dist/hooks.d.ts +114 -11
  29. package/dist/hooks.js +17 -88
  30. package/dist/index.d.ts +24 -99
  31. package/dist/index.js +251 -256
  32. package/dist/markdown.d.ts +1 -29
  33. package/dist/markdown.js +2 -2
  34. package/dist/openui.d.ts +8 -115
  35. package/dist/openui.js +1 -6
  36. package/dist/pages.d.ts +13 -12
  37. package/dist/pages.js +91 -115
  38. package/dist/primitives.d.ts +14 -49
  39. package/dist/primitives.js +69 -77
  40. package/dist/run.d.ts +1 -14
  41. package/dist/run.js +2 -22
  42. package/dist/sdk-hooks.d.ts +3 -283
  43. package/dist/sdk-hooks.js +10 -14
  44. package/dist/stores.d.ts +2 -14
  45. package/dist/stores.js +11 -39
  46. package/dist/styles.css +2 -1265
  47. package/dist/template-card-DStb8boW.d.ts +183 -0
  48. package/dist/types.d.ts +11 -8
  49. package/dist/types.js +1 -0
  50. package/dist/utils.d.ts +1 -44
  51. package/dist/utils.js +6 -12
  52. package/dist/workspace.d.ts +5 -10
  53. package/dist/workspace.js +3 -19
  54. package/package.json +19 -54
  55. package/dist/active-sessions-store-CeOmXgv5.d.ts +0 -85
  56. package/dist/artifact-pane-Bh45Ssco.d.ts +0 -24
  57. package/dist/branding-DCi5VEik.d.ts +0 -13
  58. package/dist/button-CMQuQEW_.d.ts +0 -17
  59. package/dist/chat-container-f4yEs6KN.d.ts +0 -106
  60. package/dist/chunk-34A66VBG.js +0 -214
  61. package/dist/chunk-34I7UFSX.js +0 -92
  62. package/dist/chunk-36QY2W5G.js +0 -802
  63. package/dist/chunk-4CLN43XT.js +0 -45
  64. package/dist/chunk-54SQQMMM.js +0 -156
  65. package/dist/chunk-66EZOYZR.js +0 -102
  66. package/dist/chunk-BX6AQMUS.js +0 -183
  67. package/dist/chunk-DI3NZ5ZX.js +0 -192
  68. package/dist/chunk-DPGIXDAI.js +0 -220
  69. package/dist/chunk-DXMIEK4K.js +0 -1426
  70. package/dist/chunk-GSZA3TSY.js +0 -79
  71. package/dist/chunk-HB5Y37YU.js +0 -54
  72. package/dist/chunk-LQNEZDRM.js +0 -109
  73. package/dist/chunk-MA7YKRUP.js +0 -131
  74. package/dist/chunk-MKTSMWVD.js +0 -109
  75. package/dist/chunk-MQXABZTB.js +0 -1348
  76. package/dist/chunk-MT5FJ3ZT.js +0 -186
  77. package/dist/chunk-NKUPJC34.js +0 -2070
  78. package/dist/chunk-OEX7NZE3.js +0 -321
  79. package/dist/chunk-OKLQVY3Y.js +0 -139
  80. package/dist/chunk-Q56BYXQF.js +0 -61
  81. package/dist/chunk-QD4QE5P5.js +0 -40
  82. package/dist/chunk-QDH5GEGY.js +0 -630
  83. package/dist/chunk-QID2OOMG.js +0 -133
  84. package/dist/chunk-QMU2PWOU.js +0 -493
  85. package/dist/chunk-RQHJBTEU.js +0 -10
  86. package/dist/chunk-T7HMZEVO.js +0 -216
  87. package/dist/chunk-U6QTHMY6.js +0 -1290
  88. package/dist/chunk-US6JKJKH.js +0 -124
  89. package/dist/chunk-VX3XOUEB.js +0 -63
  90. package/dist/chunk-XLG757B6.js +0 -933
  91. package/dist/chunk-ZMNSRDMH.js +0 -127
  92. package/dist/chunk-ZNCEM5CD.js +0 -316
  93. package/dist/document-editor-pane-A70-EhdQ.d.ts +0 -124
  94. package/dist/document-editor-pane-TLPVRBBU.js +0 -11
  95. package/dist/expanded-tool-detail-Dh99mcbY.d.ts +0 -63
  96. package/dist/file-tabs-BLfxfmAH.d.ts +0 -51
  97. package/dist/parts-CyGkM6Fp.d.ts +0 -50
  98. package/dist/run-CtFZ6s-D.d.ts +0 -41
  99. package/dist/sidebar-drop-zone-tDBsuOH5.d.ts +0 -301
  100. package/dist/sidecar-CFU2W9j1.d.ts +0 -8
  101. package/dist/template-card-BAtvcAkU.d.ts +0 -18
  102. package/dist/tool-call-feed-Bs3MyQMT.d.ts +0 -68
  103. package/dist/tool-display-Ct9nFAzJ.d.ts +0 -32
  104. package/dist/usage-chart-CPTcNlGs.d.ts +0 -73
  105. package/dist/use-sandbox-metrics-DWc0k9Xm.d.ts +0 -153
  106. package/dist/variant-list-BrHYcBCk.d.ts +0 -540
@@ -0,0 +1,183 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ /**
5
+ * Wire-format model entry as returned by `/v1/models` on the Tangle Router
6
+ * (and most OpenAI-compatible gateways). Field names match the upstream
7
+ * response so consumers can pass `data.data` straight through.
8
+ */
9
+ interface ModelInfo {
10
+ /** Provider-local id, e.g. "gpt-5.4" or "anthropic/claude-sonnet-4-6". */
11
+ id: string;
12
+ /** Human label (defaults to id if absent). */
13
+ name?: string;
14
+ /** Provider key, e.g. "openai", "anthropic". Underscored for compat with router. */
15
+ _provider?: string;
16
+ /** Alternative provider field on some gateways. */
17
+ provider?: string;
18
+ /**
19
+ * Per-token prices in USD as decimal strings. Multiply by 1_000_000 for
20
+ * the conventional $/M tokens display.
21
+ */
22
+ pricing?: {
23
+ prompt?: string | null;
24
+ completion?: string | null;
25
+ };
26
+ context_length?: number;
27
+ description?: string | null;
28
+ architecture?: {
29
+ modality?: string;
30
+ input_modalities?: string[];
31
+ output_modalities?: string[];
32
+ };
33
+ }
34
+ /**
35
+ * Curated preset bucket. Three are surfaced by default — they map to typical
36
+ * cost/quality tradeoffs without forcing the consumer to pick a specific
37
+ * model. `match` resolves the preset against the loaded model list.
38
+ */
39
+ interface ModelPreset {
40
+ id: "fast" | "balanced" | "best" | string;
41
+ label: string;
42
+ hint: string;
43
+ icon?: React.ComponentType<{
44
+ className?: string;
45
+ }>;
46
+ /**
47
+ * Pick the canonical model id for this preset given the loaded list.
48
+ * Should return undefined if no acceptable model is loaded yet.
49
+ */
50
+ match: (models: ModelInfo[]) => string | undefined;
51
+ }
52
+ type ModelPickerVariant = "field" | "pill";
53
+ interface ModelPickerProps {
54
+ /** Canonical model id (provider-prefixed, e.g. "openai/gpt-5.4"). */
55
+ value: string;
56
+ onChange: (modelId: string) => void;
57
+ /** Models to choose from. Pass `[]` while loading. */
58
+ models: ModelInfo[];
59
+ /** Show the loading state (overrides empty-list copy). */
60
+ loading?: boolean;
61
+ /** Recently-used canonical ids to surface at the top. */
62
+ recents?: ReadonlyArray<string>;
63
+ /**
64
+ * Curated presets shown above the full list. Defaults to Fast/Balanced/Best
65
+ * resolved against common gpt-5/Claude families.
66
+ */
67
+ presets?: ReadonlyArray<ModelPreset>;
68
+ /** Drop providers from the picker entirely (e.g. "audio", "embedding"). */
69
+ excludeProviders?: ReadonlyArray<string>;
70
+ /** Restrict to these architectures (e.g. ["text"]). Default: all. */
71
+ modalities?: ReadonlyArray<string>;
72
+ /** Trigger appearance. "field" = full-width form field; "pill" = inline chat input pill. */
73
+ variant?: ModelPickerVariant;
74
+ label?: string;
75
+ placeholder?: string;
76
+ className?: string;
77
+ /**
78
+ * Extra classes merged onto the trigger button itself (after the
79
+ * built-in defaults, so callers can override sizing/radius/font to
80
+ * match a surrounding form). Distinct from `className`, which on the
81
+ * "field" variant styles the outer wrapper.
82
+ */
83
+ triggerClassName?: string;
84
+ disabled?: boolean;
85
+ }
86
+ /**
87
+ * Resolve the canonical id for a model. Some upstreams already prefix the
88
+ * provider in the id (e.g. "anthropic/claude-haiku-4.5"); others put it in
89
+ * `_provider` and leave the id bare. Always returns "<provider>/<model>"
90
+ * unless the id is already prefixed.
91
+ */
92
+ declare function canonicalModelId(model: ModelInfo): string;
93
+ /** Format $/M tokens. Returns null if pricing is missing or zero. */
94
+ declare function formatPricing(pricing: ModelInfo["pricing"]): string | null;
95
+ /** Format context length compactly (e.g. 200_000 → "200k"). */
96
+ declare function formatContext(ctx: number | undefined): string | null;
97
+ declare function ModelPicker({ value, onChange, models, loading, recents, presets, excludeProviders, modalities, variant, label, placeholder, className, triggerClassName, disabled, }: ModelPickerProps): react_jsx_runtime.JSX.Element;
98
+
99
+ interface BillingSubscription {
100
+ status: string;
101
+ tierName: string;
102
+ renewsAt: string;
103
+ }
104
+ interface BillingBalance {
105
+ available: number;
106
+ used: number;
107
+ }
108
+ interface BillingUsage {
109
+ period: string;
110
+ total: number;
111
+ byModel: Record<string, number>;
112
+ }
113
+ interface BillingDashboardProps {
114
+ subscription: BillingSubscription | null;
115
+ balance: BillingBalance;
116
+ usage: BillingUsage;
117
+ onManageSubscription: () => void;
118
+ onAddCredits: () => void;
119
+ variant?: "sandbox";
120
+ className?: string;
121
+ cardClassName?: string;
122
+ }
123
+ declare function BillingDashboard({ subscription, balance, usage, onManageSubscription, onAddCredits, variant, className, cardClassName, }: BillingDashboardProps): react_jsx_runtime.JSX.Element;
124
+
125
+ interface PricingTier {
126
+ id: string;
127
+ name: string;
128
+ description: string;
129
+ monthlyPriceCents: number;
130
+ yearlyPriceCents?: number;
131
+ features: string[];
132
+ recommended?: boolean;
133
+ creditsPerMonth?: number;
134
+ monthlyPriceId?: string;
135
+ yearlyPriceId?: string;
136
+ }
137
+ interface PricingPageProps {
138
+ tiers: PricingTier[];
139
+ currentTierId?: string;
140
+ billingPeriod: "monthly" | "yearly";
141
+ onBillingPeriodChange: (period: "monthly" | "yearly") => void;
142
+ onSelectTier: (tierId: string) => void;
143
+ variant?: "sandbox";
144
+ loading?: boolean;
145
+ className?: string;
146
+ cardClassName?: string;
147
+ }
148
+ /**
149
+ * Formats an integer cent amount as a human-readable USD price.
150
+ * Whole-dollar amounts omit decimals ($10), fractional amounts show two ($10.99).
151
+ * Returns "$0" for non-finite or negative inputs.
152
+ * @param cents - Amount in whole US cents (e.g. 1099 for $10.99).
153
+ */
154
+ declare function formatPrice(cents: number): string;
155
+ declare function PricingPage({ tiers, currentTierId, billingPeriod, onBillingPeriodChange, onSelectTier, loading, className, }: PricingPageProps): react_jsx_runtime.JSX.Element;
156
+
157
+ interface UsageDataPoint {
158
+ date: string;
159
+ value: number;
160
+ }
161
+ interface UsageChartProps {
162
+ data: UsageDataPoint[];
163
+ title: string;
164
+ unit: string;
165
+ className?: string;
166
+ }
167
+ declare function UsageChart({ data, title, unit, className }: UsageChartProps): react_jsx_runtime.JSX.Element;
168
+
169
+ interface TemplateCardData {
170
+ id: string;
171
+ name: string;
172
+ description: string;
173
+ icon?: React.ReactNode;
174
+ tags?: string[];
175
+ }
176
+ interface TemplateCardProps {
177
+ template: TemplateCardData;
178
+ onUseTemplate: (templateId: string) => void;
179
+ className?: string;
180
+ }
181
+ declare function TemplateCard({ template, onUseTemplate, className }: TemplateCardProps): react_jsx_runtime.JSX.Element;
182
+
183
+ export { type BillingBalance as B, type ModelInfo as M, PricingPage as P, TemplateCard as T, UsageChart as U, BillingDashboard as a, type BillingDashboardProps as b, type BillingSubscription as c, type BillingUsage as d, ModelPicker as e, type ModelPickerProps as f, type ModelPickerVariant as g, type ModelPreset as h, type PricingPageProps as i, type PricingTier as j, type TemplateCardData as k, type TemplateCardProps as l, type UsageChartProps as m, type UsageDataPoint as n, canonicalModelId as o, formatContext as p, formatPrice as q, formatPricing as r };
package/dist/types.d.ts CHANGED
@@ -1,8 +1,11 @@
1
- export { R as ReasoningPart, S as SessionMessage, a as SessionPart, T as TextPart, b as ToolPart, c as ToolState, d as ToolStatus, e as ToolTime } from './parts-CyGkM6Fp.js';
2
- export { F as FinalTextPart, G as GroupedMessage, M as MessageRun, a as MessageUser, R as Run, b as RunStats, T as ToolCategory } from './run-CtFZ6s-D.js';
3
- export { S as Session } from './sidecar-CFU2W9j1.js';
4
- export { C as CustomToolRenderer, D as DisplayVariant, T as ToolDisplayMetadata } from './tool-display-Ct9nFAzJ.js';
5
- export { A as AgentBranding } from './branding-DCi5VEik.js';
6
- export { A as ActiveProjectActivity, a as ActiveSessionActivityOptions, b as ActiveSessionConnectionOptions, c as ActiveSessionConnectionState, d as ActiveSessionReconnectState, e as ActiveSessionRecord, f as ActiveSessionStatus, g as ActiveSessionTransportMode, h as ActiveSessionsState, R as RegisterActiveSessionOptions, S as SessionProjectKey } from './active-sessions-store-CeOmXgv5.js';
7
- import 'react';
8
- import 'nanostores';
1
+ export { AgentBranding, CustomToolRenderer, DisplayVariant, FinalTextPart, GroupedMessage, MessageRun, MessageUser, ReasoningPart, Run, RunStats, SessionMessage, SessionPart, TextPart, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime } from '@tangle-network/ui/types';
2
+ export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, RegisterActiveSessionOptions, SessionProjectKey } from '@tangle-network/ui/stores';
3
+
4
+ /** A chat session on the sidecar session gateway. */
5
+ interface Session {
6
+ id: string;
7
+ title: string;
8
+ parentID?: string;
9
+ }
10
+
11
+ export type { Session };
package/dist/types.js CHANGED
@@ -0,0 +1 @@
1
+ import "./chunk-2BUPSB7O.js";
package/dist/utils.d.ts CHANGED
@@ -1,44 +1 @@
1
- import { b as ToolPart } from './parts-CyGkM6Fp.js';
2
- import { T as ToolDisplayMetadata } from './tool-display-Ct9nFAzJ.js';
3
- import { T as ToolCategory } from './run-CtFZ6s-D.js';
4
- import { ClassValue } from 'clsx';
5
- import 'react';
6
-
7
- declare function cn(...inputs: ClassValue[]): string;
8
-
9
- /**
10
- * Copy text to clipboard with a non-secure-context fallback.
11
- * Returns true if a copy strategy likely succeeded.
12
- */
13
- declare function copyText(text: string): Promise<boolean>;
14
-
15
- /** Format a duration in milliseconds to a human-readable string. */
16
- declare function formatDuration(ms: number): string;
17
- /** Truncate text to `max` characters, appending "..." if truncated. */
18
- declare function truncateText(text: string, max: number): string;
19
- /**
20
- * Format an uptime duration in milliseconds with progressive
21
- * granularity, so short-lived sandboxes don't render as "0d 0h".
22
- * - < 60s → "Ns"
23
- * - < 60m → "Nm Ss"
24
- * - < 24h → "Nh Mm"
25
- * - otherwise → "Nd Hh"
26
- */
27
- declare function formatUptime(ms: number): string;
28
- /**
29
- * Format a byte count using binary units (KiB/MiB/GiB, surfaced as
30
- * "KB/MB/GB" for readability). KB and MB use one decimal below 10 and
31
- * round above; GB keeps two decimals below 10 so half-GB changes stay
32
- * visible on memory dashboards, and drops to one decimal above.
33
- */
34
- declare function formatBytes(bytes: number): string;
35
-
36
- declare function timeAgo(ts: number): string;
37
-
38
- declare const TOOL_CATEGORY_ICONS: Record<ToolCategory, string>;
39
- declare function getToolCategory(toolName: string): ToolCategory;
40
- declare function getToolDisplayMetadata(part: ToolPart): ToolDisplayMetadata;
41
- /** Extract error text from a tool part, if any. */
42
- declare function getToolErrorText(part: ToolPart, fallback?: string): string | undefined;
43
-
44
- export { TOOL_CATEGORY_ICONS, cn, copyText, formatBytes, formatDuration, formatUptime, getToolCategory, getToolDisplayMetadata, getToolErrorText, timeAgo, truncateText };
1
+ export { TOOL_CATEGORY_ICONS, cn, copyText, formatBytes, formatDuration, formatUptime, getToolCategory, getToolDisplayMetadata, getToolErrorText, timeAgo, truncateText } from '@tangle-network/ui/utils';
package/dist/utils.js CHANGED
@@ -1,22 +1,16 @@
1
1
  import {
2
+ TOOL_CATEGORY_ICONS,
3
+ cn,
2
4
  copyText,
3
- timeAgo
4
- } from "./chunk-QD4QE5P5.js";
5
- import {
6
5
  formatBytes,
7
6
  formatDuration,
8
7
  formatUptime,
9
- truncateText
10
- } from "./chunk-4CLN43XT.js";
11
- import {
12
- TOOL_CATEGORY_ICONS,
13
8
  getToolCategory,
14
9
  getToolDisplayMetadata,
15
- getToolErrorText
16
- } from "./chunk-BX6AQMUS.js";
17
- import {
18
- cn
19
- } from "./chunk-RQHJBTEU.js";
10
+ getToolErrorText,
11
+ timeAgo,
12
+ truncateText
13
+ } from "./chunk-TK46XFLM.js";
20
14
  export {
21
15
  TOOL_CATEGORY_ICONS,
22
16
  cn,
@@ -1,15 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- export { a as ArtifactPane, A as ArtifactPaneProps } from './artifact-pane-Bh45Ssco.js';
4
- import { F as FileNode, f as FileTreeVisibilityOptions, a as FileTabData } from './file-tabs-BLfxfmAH.js';
5
- import { S as SessionProjectKey, f as ActiveSessionStatus, e as ActiveSessionRecord } from './active-sessions-store-CeOmXgv5.js';
6
- import { a as ChatContainerProps } from './chat-container-f4yEs6KN.js';
7
- import { OpenUIComponentNode, OpenUIAction } from './openui.js';
8
- import 'nanostores';
9
- import './parts-CyGkM6Fp.js';
10
- import './branding-DCi5VEik.js';
11
- import './tool-display-Ct9nFAzJ.js';
12
- import './run-CtFZ6s-D.js';
3
+ export { ArtifactPane, ArtifactPaneProps } from '@tangle-network/ui/primitives';
4
+ import { FileNode, FileTreeVisibilityOptions, FileTabData } from '@tangle-network/ui/files';
5
+ import { SessionProjectKey, ActiveSessionStatus, ActiveSessionRecord } from '@tangle-network/ui/stores';
6
+ import { ChatContainerProps } from '@tangle-network/ui/chat';
7
+ import { OpenUIComponentNode, OpenUIAction } from '@tangle-network/ui/openui';
13
8
 
14
9
  interface WorkspaceLayoutProps {
15
10
  /** Left sidebar content (file tree, navigation) */
package/dist/workspace.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  AgentWorkbench,
3
3
  ApprovalQueue,
4
+ ArtifactPane,
4
5
  AuditResults,
5
6
  CalendarView,
6
7
  DirectoryPane,
@@ -13,25 +14,8 @@ import {
13
14
  TaskBoard,
14
15
  TerminalPanel,
15
16
  WorkspaceLayout
16
- } from "./chunk-5OQ27N57.js";
17
- import "./chunk-OEX7NZE3.js";
18
- import "./chunk-MA7YKRUP.js";
19
- import "./chunk-XLG757B6.js";
20
- import "./chunk-54SQQMMM.js";
21
- import "./chunk-MQXABZTB.js";
22
- import "./chunk-4CLN43XT.js";
23
- import "./chunk-MT5FJ3ZT.js";
24
- import "./chunk-BX6AQMUS.js";
25
- import "./chunk-ZNCEM5CD.js";
26
- import "./chunk-34I7UFSX.js";
27
- import "./chunk-QDH5GEGY.js";
28
- import {
29
- ArtifactPane
30
- } from "./chunk-HB5Y37YU.js";
31
- import "./chunk-T7HMZEVO.js";
32
- import "./chunk-ZMNSRDMH.js";
33
- import "./chunk-MKTSMWVD.js";
34
- import "./chunk-RQHJBTEU.js";
17
+ } from "./chunk-GPT7VKK6.js";
18
+ import "./chunk-EI44GEQ5.js";
35
19
  export {
36
20
  AgentWorkbench,
37
21
  ApprovalQueue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.14.0",
3
+ "version": "0.15.2",
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",
@@ -102,10 +102,12 @@
102
102
  "storybook": "storybook dev -p 6006",
103
103
  "build-storybook": "storybook build",
104
104
  "test": "vitest run",
105
- "test:watch": "vitest"
105
+ "test:watch": "vitest",
106
+ "test:bridge": "pnpm build && vitest run src/__tests__/re-export-identity.test.ts"
106
107
  },
107
108
  "peerDependencies": {
108
- "@tangle-network/brand": "^0.2.0",
109
+ "@tangle-network/brand": "^0.3.0",
110
+ "@tangle-network/ui": "^1.0.1",
109
111
  "react": "^18 || ^19",
110
112
  "react-dom": "^18 || ^19"
111
113
  },
@@ -127,58 +129,13 @@
127
129
  },
128
130
  "nanostores": {
129
131
  "optional": true
130
- },
131
- "@nanostores/react": {
132
- "optional": true
133
- },
134
- "@hocuspocus/provider": {
135
- "optional": true
136
- },
137
- "@tiptap/core": {
138
- "optional": true
139
- },
140
- "@tiptap/react": {
141
- "optional": true
142
- },
143
- "@tiptap/starter-kit": {
144
- "optional": true
145
- },
146
- "@tiptap/extension-collaboration": {
147
- "optional": true
148
- },
149
- "@tiptap/extension-collaboration-caret": {
150
- "optional": true
151
- },
152
- "yjs": {
153
- "optional": true
154
132
  }
155
133
  },
156
134
  "dependencies": {
157
- "@nanostores/react": "^1.1.0",
158
- "@pierre/trees": "1.0.0-beta.3",
159
- "@radix-ui/react-avatar": "^1.1.0",
160
- "@radix-ui/react-collapsible": "^1.1.0",
161
- "@radix-ui/react-dialog": "^1.1.0",
162
135
  "@radix-ui/react-dropdown-menu": "^2.1.0",
163
- "@radix-ui/react-label": "^2.1.0",
164
- "@radix-ui/react-progress": "^1.1.0",
165
136
  "@radix-ui/react-select": "^2.1.0",
166
- "@radix-ui/react-slot": "^1.1.0",
167
- "@radix-ui/react-switch": "^1.1.0",
168
- "@radix-ui/react-tabs": "^1.1.0",
169
- "@radix-ui/react-toast": "^1.2.0",
170
- "class-variance-authority": "^0.7.0",
171
- "clsx": "^2.1.1",
172
137
  "lucide-react": "^0.469.0",
173
- "marked": "^17.0.5",
174
- "nanostores": "^1.2.0",
175
- "react-markdown": "^10.1.0",
176
- "react-pdf": "^9.2.1",
177
- "react-syntax-highlighter": "^16.1.1",
178
- "rehype-sanitize": "^6.0.0",
179
- "remark-gfm": "^4.0.1",
180
- "tailwind-merge": "^3.0.2",
181
- "turndown": "^7.2.2"
138
+ "nanostores": "^1.2.0"
182
139
  },
183
140
  "pnpm": {
184
141
  "overrides": {
@@ -187,13 +144,16 @@
187
144
  },
188
145
  "devDependencies": {
189
146
  "@hocuspocus/provider": "^3.4.4",
147
+ "@nanostores/react": "^1.1.0",
148
+ "@pierre/trees": "1.0.0-beta.3",
190
149
  "@storybook/addon-essentials": "^8",
191
150
  "@storybook/addon-mcp": "^0.4.2",
192
151
  "@storybook/react": "^8.6.18",
193
152
  "@storybook/react-vite": "^8.6.18",
194
153
  "@tailwindcss/postcss": "^4.2.2",
195
154
  "@tailwindcss/vite": "^4.2.2",
196
- "@tangle-network/brand": "^0.2.0",
155
+ "@tangle-network/brand": "^0.3.0",
156
+ "@tangle-network/ui": "^1.0.1",
197
157
  "@tanstack/react-query": "^5.91.0",
198
158
  "@testing-library/dom": "^10.4.1",
199
159
  "@testing-library/jest-dom": "^6.9.1",
@@ -205,13 +165,19 @@
205
165
  "@tiptap/react": "^3.20.4",
206
166
  "@tiptap/starter-kit": "^3.20.4",
207
167
  "@types/react": "^19.1.2",
208
- "@types/react-syntax-highlighter": "^15.5.13",
209
- "@types/turndown": "^5.0.6",
210
168
  "@xterm/addon-fit": "^0.11.0",
211
169
  "@xterm/addon-web-links": "^0.12.0",
212
170
  "@xterm/addon-webgl": "^0.19.0",
213
171
  "@xterm/xterm": "^6.0.0",
214
172
  "jsdom": "^29.0.2",
173
+ "marked": "^17.0.5",
174
+ "react-markdown": "^10.1.0",
175
+ "react-pdf": "^9.2.1",
176
+ "react-syntax-highlighter": "^16.1.1",
177
+ "rehype-sanitize": "^6.0.0",
178
+ "remark-gfm": "^4.0.1",
179
+ "turndown": "^7.2.2",
180
+ "yjs": "^13.6.30",
215
181
  "postcss": "^8.5.8",
216
182
  "postcss-import": "^16.1.1",
217
183
  "react": "^19.1.0",
@@ -222,7 +188,6 @@
222
188
  "tsup": "^8.4.0",
223
189
  "typescript": "^5.8.3",
224
190
  "vite": "^8.0.5",
225
- "vitest": "^4.1.3",
226
- "yjs": "^13.6.30"
191
+ "vitest": "^4.1.3"
227
192
  }
228
193
  }
@@ -1,85 +0,0 @@
1
- import * as nanostores from 'nanostores';
2
-
3
- type SessionProjectKey = string | number;
4
- type ActiveSessionStatus = "idle" | "running" | "attention-needed" | "error";
5
- type ActiveSessionReconnectState = "idle" | "reconnecting" | "failed";
6
- type ActiveSessionConnectionState = "disconnected" | "connecting" | "connected" | "reconnecting" | "error";
7
- type ActiveSessionTransportMode = "websocket" | "sse" | "polling" | "custom";
8
- interface ActiveSessionRecord {
9
- sessionId: string;
10
- projectId: SessionProjectKey | null;
11
- projectLabel?: string;
12
- title?: string;
13
- href?: string;
14
- registeredAt: number;
15
- lastActivityAt: number;
16
- lastEventAt: number | null;
17
- status: ActiveSessionStatus;
18
- isRunning: boolean;
19
- isForeground: boolean;
20
- needsAttention: boolean;
21
- connectionState: ActiveSessionConnectionState;
22
- reconnectState: ActiveSessionReconnectState;
23
- transportMode: ActiveSessionTransportMode | null;
24
- lastError: string | null;
25
- metadata?: Record<string, unknown>;
26
- }
27
- interface ActiveSessionsState {
28
- sessions: Record<string, ActiveSessionRecord>;
29
- lastUpdatedAt: number;
30
- }
31
- interface RegisterActiveSessionOptions {
32
- sessionId: string;
33
- projectId?: SessionProjectKey | null;
34
- projectLabel?: string;
35
- title?: string;
36
- href?: string;
37
- metadata?: Record<string, unknown>;
38
- }
39
- interface ActiveSessionConnectionOptions {
40
- connectionState: ActiveSessionConnectionState;
41
- reconnectState?: ActiveSessionReconnectState;
42
- transportMode?: ActiveSessionTransportMode | null;
43
- lastError?: string | null;
44
- lastEventAt?: number | null;
45
- }
46
- interface ActiveSessionActivityOptions {
47
- lastEventAt?: number | null;
48
- }
49
- interface ActiveProjectActivity {
50
- projectId: SessionProjectKey;
51
- projectLabel?: string;
52
- activeSessionCount: number;
53
- runningSessionIds: string[];
54
- lastActivityAt: number;
55
- }
56
- declare const activeSessionsAtom: nanostores.PreinitializedWritableAtom<ActiveSessionsState> & object;
57
- declare function registerActiveSession(options: RegisterActiveSessionOptions): void;
58
- declare function unregisterActiveSession(sessionId: string): void;
59
- declare function setForegroundActiveSession(sessionId: string | null): void;
60
- declare function updateActiveSessionMeta(sessionId: string, meta: Partial<Pick<ActiveSessionRecord, "title" | "href" | "projectId" | "projectLabel" | "metadata">>): void;
61
- declare function setActiveSessionConnection(sessionId: string, options: ActiveSessionConnectionOptions): void;
62
- declare function setActiveSessionRunning(sessionId: string, isRunning: boolean, options?: ActiveSessionActivityOptions): void;
63
- declare function setActiveSessionAttention(sessionId: string, needsAttention: boolean, options?: ActiveSessionActivityOptions): void;
64
- declare function setActiveSessionError(sessionId: string, error: string | null): void;
65
- declare function bumpActiveSessionActivity(sessionId: string, options?: ActiveSessionActivityOptions): void;
66
- declare function resetActiveSessions(): void;
67
- declare function getAllActiveSessions(state: ActiveSessionsState): ActiveSessionRecord[];
68
- declare function getActiveSession(state: ActiveSessionsState, sessionId: string): ActiveSessionRecord | null;
69
- declare function getSessionsForProject(state: ActiveSessionsState, projectId: SessionProjectKey): ActiveSessionRecord[];
70
- declare function getSessionsForNavbar(state: ActiveSessionsState, projectId?: SessionProjectKey | null): ActiveSessionRecord[];
71
- declare function getSessionsByActivity(state: ActiveSessionsState): ActiveSessionRecord[];
72
- declare function getTotalRunningSessionCount(state: ActiveSessionsState): number;
73
- declare function hasBackgroundRunningSessions(state: ActiveSessionsState): boolean;
74
- declare function getAllProjectActivity(state: ActiveSessionsState): ActiveProjectActivity[];
75
- declare function useActiveSessionsState(): ActiveSessionsState;
76
- declare function useActiveSessions(): ActiveSessionRecord[];
77
- declare function useActiveSession(sessionId: string | null): ActiveSessionRecord | null;
78
- declare function useProjectSessions(projectId: SessionProjectKey | null): ActiveSessionRecord[];
79
- declare function useNavbarSessions(projectId?: SessionProjectKey | null): ActiveSessionRecord[];
80
- declare function useSessionsByActivity(): ActiveSessionRecord[];
81
- declare function useProjectActivity(): ActiveProjectActivity[];
82
- declare function useTotalRunningSessions(): number;
83
- declare function useHasBackgroundRunningSessions(): boolean;
84
-
85
- export { type ActiveProjectActivity as A, updateActiveSessionMeta as B, useActiveSession as C, useActiveSessions as D, useActiveSessionsState as E, useHasBackgroundRunningSessions as F, useNavbarSessions as G, useProjectActivity as H, useProjectSessions as I, useSessionsByActivity as J, useTotalRunningSessions as K, type RegisterActiveSessionOptions as R, type SessionProjectKey as S, type ActiveSessionActivityOptions as a, type ActiveSessionConnectionOptions as b, type ActiveSessionConnectionState as c, type ActiveSessionReconnectState as d, type ActiveSessionRecord as e, type ActiveSessionStatus as f, type ActiveSessionTransportMode as g, type ActiveSessionsState as h, activeSessionsAtom as i, bumpActiveSessionActivity as j, getActiveSession as k, getAllActiveSessions as l, getAllProjectActivity as m, getSessionsByActivity as n, getSessionsForNavbar as o, getSessionsForProject as p, getTotalRunningSessionCount as q, hasBackgroundRunningSessions as r, registerActiveSession as s, resetActiveSessions as t, setActiveSessionAttention as u, setActiveSessionConnection as v, setActiveSessionError as w, setActiveSessionRunning as x, setForegroundActiveSession as y, unregisterActiveSession as z };
@@ -1,24 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
-
4
- interface ArtifactPaneProps {
5
- eyebrow?: ReactNode;
6
- title: ReactNode;
7
- subtitle?: ReactNode;
8
- meta?: ReactNode;
9
- headerActions?: ReactNode;
10
- tabs?: ReactNode;
11
- toolbar?: ReactNode;
12
- footer?: ReactNode;
13
- emptyState?: ReactNode;
14
- children?: ReactNode;
15
- className?: string;
16
- contentClassName?: string;
17
- }
18
- /**
19
- * ArtifactPane — shared frame for files, previews, documents, inspectors, and
20
- * other artifact-like surfaces inside sandbox applications.
21
- */
22
- declare function ArtifactPane({ eyebrow, title, subtitle, meta, headerActions, tabs, toolbar, footer, emptyState, children, className, contentClassName, }: ArtifactPaneProps): react_jsx_runtime.JSX.Element;
23
-
24
- export { type ArtifactPaneProps as A, ArtifactPane as a };
@@ -1,13 +0,0 @@
1
- /** Visual branding for a run group header — injected by consuming app. */
2
- interface AgentBranding {
3
- label: string;
4
- accentClass: string;
5
- bgClass: string;
6
- containerBgClass: string;
7
- borderClass: string;
8
- /** CSS class for the agent icon (legacy). Ignored when using lucide-react icons. */
9
- iconClass: string;
10
- textClass: string;
11
- }
12
-
13
- export type { AgentBranding as A };
@@ -1,17 +0,0 @@
1
- import * as class_variance_authority_types from 'class-variance-authority/types';
2
- import * as React from 'react';
3
-
4
- declare const buttonVariants: (props?: ({
5
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "sandbox" | null | undefined;
6
- size?: "default" | "sm" | "lg" | "xl" | "icon" | null | undefined;
7
- } & class_variance_authority_types.ClassProp) | undefined) => string;
8
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
9
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "sandbox" | null;
10
- size?: "default" | "sm" | "lg" | "xl" | "icon" | null;
11
- asChild?: boolean;
12
- loading?: boolean;
13
- children?: React.ReactNode;
14
- }
15
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
16
-
17
- export { Button as B, type ButtonProps as a, buttonVariants as b };