@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
@@ -1,29 +1 @@
1
- import * as React from 'react';
2
- import { HTMLAttributes, ReactNode } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
-
5
- interface CodeBlockProps extends HTMLAttributes<HTMLDivElement> {
6
- code: string;
7
- language?: string;
8
- showLineNumbers?: boolean;
9
- /** Force light theme; defaults to dark */
10
- light?: boolean;
11
- children?: ReactNode;
12
- }
13
- declare const CodeBlock: React.MemoExoticComponent<({ code, language, showLineNumbers, light: lightProp, className, children, ...props }: CodeBlockProps) => react_jsx_runtime.JSX.Element>;
14
- /** Copy-to-clipboard button for use inside CodeBlock. */
15
- declare const CopyButton: React.MemoExoticComponent<({ text }: {
16
- text: string;
17
- }) => react_jsx_runtime.JSX.Element>;
18
-
19
- interface MarkdownProps {
20
- children: string;
21
- className?: string;
22
- }
23
- /**
24
- * Renders Markdown content with GFM support, XSS sanitisation, and
25
- * custom code block rendering via our CodeBlock component.
26
- */
27
- declare const Markdown: React.MemoExoticComponent<({ children, className }: MarkdownProps) => react_jsx_runtime.JSX.Element>;
28
-
29
- export { CodeBlock, type CodeBlockProps, CopyButton, Markdown, type MarkdownProps };
1
+ export { CodeBlock, CodeBlockProps, CopyButton, Markdown, MarkdownProps } from '@tangle-network/ui/markdown';
package/dist/markdown.js CHANGED
@@ -1,9 +1,9 @@
1
+ // src/markdown/index.ts
1
2
  import {
2
3
  CodeBlock,
3
4
  CopyButton,
4
5
  Markdown
5
- } from "./chunk-T7HMZEVO.js";
6
- import "./chunk-RQHJBTEU.js";
6
+ } from "@tangle-network/ui/markdown";
7
7
  export {
8
8
  CodeBlock,
9
9
  CopyButton,
package/dist/openui.d.ts CHANGED
@@ -1,115 +1,8 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
-
4
- type OpenUIPrimitive = string | number | boolean | null | undefined;
5
- interface OpenUIAction {
6
- id: string;
7
- label: string;
8
- tone?: "default" | "secondary" | "outline" | "ghost" | "destructive";
9
- disabled?: boolean;
10
- onPress?: () => void;
11
- }
12
- interface OpenUIBaseNode {
13
- id?: string;
14
- }
15
- interface OpenUIHeadingNode extends OpenUIBaseNode {
16
- type: "heading";
17
- text: string;
18
- level?: 1 | 2 | 3 | 4;
19
- kicker?: string;
20
- meta?: string;
21
- }
22
- interface OpenUITextNode extends OpenUIBaseNode {
23
- type: "text";
24
- text: string;
25
- tone?: "default" | "muted" | "success" | "warning" | "error";
26
- mono?: boolean;
27
- }
28
- interface OpenUIBadgeNode extends OpenUIBaseNode {
29
- type: "badge";
30
- label: string;
31
- tone?: "default" | "secondary" | "success" | "warning" | "error" | "info" | "sandbox";
32
- }
33
- interface OpenUIStatNode extends OpenUIBaseNode {
34
- type: "stat";
35
- label: string;
36
- value: string;
37
- change?: string;
38
- tone?: "default" | "success" | "warning" | "error" | "info";
39
- }
40
- interface OpenUIKeyValueNode extends OpenUIBaseNode {
41
- type: "key_value";
42
- items: Array<{
43
- id?: string;
44
- label: string;
45
- value: ReactNode | OpenUIPrimitive;
46
- tone?: "default" | "muted";
47
- }>;
48
- }
49
- interface OpenUICodeNode extends OpenUIBaseNode {
50
- type: "code";
51
- code: string;
52
- language?: string;
53
- title?: string;
54
- showLineNumbers?: boolean;
55
- }
56
- interface OpenUIMarkdownNode extends OpenUIBaseNode {
57
- type: "markdown";
58
- content: string;
59
- }
60
- interface OpenUITableNode extends OpenUIBaseNode {
61
- type: "table";
62
- columns: Array<{
63
- key: string;
64
- header: string;
65
- align?: "left" | "right";
66
- }>;
67
- rows: Array<Record<string, ReactNode | OpenUIPrimitive>>;
68
- caption?: string;
69
- }
70
- interface OpenUIActionsNode extends OpenUIBaseNode {
71
- type: "actions";
72
- actions: OpenUIAction[];
73
- }
74
- interface OpenUISeparatorNode extends OpenUIBaseNode {
75
- type: "separator";
76
- label?: string;
77
- }
78
- interface OpenUIStackNode extends OpenUIBaseNode {
79
- type: "stack";
80
- direction?: "row" | "column";
81
- gap?: "sm" | "md" | "lg";
82
- align?: "start" | "center" | "end" | "stretch";
83
- wrap?: boolean;
84
- children: OpenUIComponentNode[];
85
- }
86
- interface OpenUIGridNode extends OpenUIBaseNode {
87
- type: "grid";
88
- columns?: 1 | 2 | 3 | 4;
89
- gap?: "sm" | "md" | "lg";
90
- children: OpenUIComponentNode[];
91
- }
92
- interface OpenUICardNode extends OpenUIBaseNode {
93
- type: "card";
94
- title?: string;
95
- description?: string;
96
- eyebrow?: string;
97
- badge?: OpenUIBadgeNode;
98
- actions?: OpenUIAction[];
99
- children?: OpenUIComponentNode[];
100
- }
101
- type OpenUIComponentNode = OpenUIActionsNode | OpenUIBadgeNode | OpenUICardNode | OpenUICodeNode | OpenUIGridNode | OpenUIHeadingNode | OpenUIKeyValueNode | OpenUIMarkdownNode | OpenUISeparatorNode | OpenUIStackNode | OpenUIStatNode | OpenUITableNode | OpenUITextNode;
102
- interface OpenUIArtifactRendererProps {
103
- schema: OpenUIComponentNode | OpenUIComponentNode[];
104
- onAction?: (action: OpenUIAction) => void;
105
- className?: string;
106
- }
107
- /**
108
- * OpenUIArtifactRenderer — contained renderer for OpenUI-like structured
109
- * artifact payloads using sandbox-ui primitives and theme tokens. This is an
110
- * extension surface for generated inspectors/results, not a replacement for
111
- * the sandbox shell.
112
- */
113
- declare function OpenUIArtifactRenderer({ schema, onAction, className, }: OpenUIArtifactRendererProps): react_jsx_runtime.JSX.Element;
114
-
115
- export { type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode };
1
+ export { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from '@tangle-network/ui/openui';
2
+ import '@tangle-network/ui/chat';
3
+ import '@tangle-network/ui/editor';
4
+ import '@tangle-network/ui/run';
5
+ import '@tangle-network/ui/files';
6
+ import '@tangle-network/ui/auth';
7
+ import '@tangle-network/ui/utils';
8
+ import '@tangle-network/ui/markdown';
package/dist/openui.js CHANGED
@@ -1,11 +1,6 @@
1
1
  import {
2
2
  OpenUIArtifactRenderer
3
- } from "./chunk-ZNCEM5CD.js";
4
- import "./chunk-34I7UFSX.js";
5
- import "./chunk-T7HMZEVO.js";
6
- import "./chunk-ZMNSRDMH.js";
7
- import "./chunk-MKTSMWVD.js";
8
- import "./chunk-RQHJBTEU.js";
3
+ } from "./chunk-AZ3AWMTM.js";
9
4
  export {
10
5
  OpenUIArtifactRenderer
11
6
  };
package/dist/pages.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { B as BillingSubscription, a as BillingBalance, b as BillingUsage, U as UsageDataPoint, P as PricingTier } from './usage-chart-CPTcNlGs.js';
2
+ import { c as BillingSubscription, B as BillingBalance, d as BillingUsage, n as UsageDataPoint, j as PricingTier, M as ModelInfo, k as TemplateCardData } from './template-card-DStb8boW.js';
3
3
  import * as React from 'react';
4
- import { T as TemplateCardData } from './template-card-BAtvcAkU.js';
5
4
 
6
5
  type ProductVariant$1 = "sandbox";
7
6
  interface BillingPageData {
@@ -39,11 +38,6 @@ interface ResourceLimits {
39
38
  ramMaxGB?: number;
40
39
  storageMaxGB?: number;
41
40
  }
42
- interface ModelOption {
43
- value: string;
44
- label: string;
45
- disabled?: boolean;
46
- }
47
41
  interface PricingRates {
48
42
  cpuPerHr: number;
49
43
  ramPerGbHr: number;
@@ -82,8 +76,15 @@ interface ProvisioningWizardProps {
82
76
  onLoadStartupScripts?: () => Promise<StartupScriptEntry[]>;
83
77
  /** Plan-based resource limits — caps the slider maximums */
84
78
  resourceLimits?: ResourceLimits;
85
- /** Override the list of model engines shown in step 3 */
86
- modelOptions?: ModelOption[];
79
+ /**
80
+ * Models to surface in step 3, typically the wire-format payload from
81
+ * Tangle Router's `/v1/models`. The wizard stores the canonical id
82
+ * (`<provider>/<model>`) on `ProvisioningConfig.modelTier`, which is
83
+ * the same shape the API expects for `backend.model.model`. While the
84
+ * list is empty (e.g. router fetch in flight) the picker renders a
85
+ * disabled trigger with "no models available" copy.
86
+ */
87
+ models?: ModelInfo[];
87
88
  /** Real pricing rates from the API for accurate cost calculation */
88
89
  pricingRates?: PricingRates;
89
90
  /**
@@ -118,7 +119,7 @@ interface ProvisioningConfig {
118
119
  startupScriptIds?: string[];
119
120
  }
120
121
  declare function resolveEnvironment(env: EnvironmentEntry): EnvironmentOption;
121
- declare function ProvisioningWizard({ environments: environmentsProp, onLoadEnvironments, onSubmit, onBack, className, variant, defaultEnvironment, defaultConfig, skipToReview, onLoadStartupScripts, resourceLimits, modelOptions, pricingRates, planTiers, }: ProvisioningWizardProps): react_jsx_runtime.JSX.Element;
122
+ declare function ProvisioningWizard({ environments: environmentsProp, onLoadEnvironments, onSubmit, onBack, className, variant, defaultEnvironment, defaultConfig, skipToReview, onLoadStartupScripts, resourceLimits, models, pricingRates, planTiers, }: ProvisioningWizardProps): react_jsx_runtime.JSX.Element;
122
123
 
123
124
  type ProductVariant = "sandbox";
124
125
  interface StandalonePricingPageProps {
@@ -281,7 +282,7 @@ interface StartupScriptsPageProps {
281
282
  declare function StartupScriptsPage({ apiClient, className }: StartupScriptsPageProps): react_jsx_runtime.JSX.Element;
282
283
 
283
284
  type TemplateCategory = "blockchain" | "ai-ml" | "frontend" | "infrastructure" | "general";
284
- type TemplatePreset = Omit<ProvisioningConfig, "name" | "gitUrl" | "envVars" | "driver" | "startupScriptIds">;
285
+ type TemplatePreset = Omit<ProvisioningConfig, "name" | "gitUrl" | "envVars" | "driver" | "startupScriptIds" | "modelTier">;
285
286
  declare function getPresetForTemplate(id: string): TemplatePreset;
286
287
 
287
- export { BillingPage, type BillingPageData, type BillingPageProps, type EnvironmentEntry, type EnvironmentOption, type ModelOption, type PlanTierInfo, type PricingRates, PricingTier, type ProductVariant$1 as ProductVariant, type Profile, type ProfileFormData, type ProfileMetrics, ProfilesPage, type ProfilesPageProps, type ProvisioningConfig, ProvisioningWizard, type ProvisioningWizardProps, type ResourceLimits, type ScriptType, type Secret, type SecretsApiClient, SecretsPage, type SecretsPageProps, StandalonePricingPage, type StandalonePricingPageProps, type StartupScript, type StartupScriptEntry, type StartupScriptFormData, type StartupScriptsApiClient, StartupScriptsPage, type StartupScriptsPageProps, type TemplateCategory, type TemplatePreset, TemplatesPage, type TemplatesPageProps, getPresetForTemplate, resolveEnvironment };
288
+ export { BillingPage, type BillingPageData, type BillingPageProps, type EnvironmentEntry, type EnvironmentOption, ModelInfo, type PlanTierInfo, type PricingRates, PricingTier, type ProductVariant$1 as ProductVariant, type Profile, type ProfileFormData, type ProfileMetrics, ProfilesPage, type ProfilesPageProps, type ProvisioningConfig, ProvisioningWizard, type ProvisioningWizardProps, type ResourceLimits, type ScriptType, type Secret, type SecretsApiClient, SecretsPage, type SecretsPageProps, StandalonePricingPage, type StandalonePricingPageProps, type StartupScript, type StartupScriptEntry, type StartupScriptFormData, type StartupScriptsApiClient, StartupScriptsPage, type StartupScriptsPageProps, type TemplateCategory, type TemplatePreset, TemplatesPage, type TemplatesPageProps, getPresetForTemplate, resolveEnvironment };