@lace-cloud/canvas 0.37.1 → 0.38.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/index.d.mts CHANGED
@@ -1,11 +1,10 @@
1
- import { CanvasView, NodePin, MetaArgument, Diagnostic, RenderNode, deriveSettingsConfig, deriveNodeConfig, SettingsConfig, CanvasArrangement } from '@lace-cloud/proto';
2
- export { CanvasArrangement, CanvasView, Conflict, Diagnostic, NodeConfig, NodePin, ProjectionMeta, RenderEdge, RenderGroup, RenderInput, RenderNode, RenderOutput, SettingsConfig, ViewportIntent, projectCanvasView } from '@lace-cloud/proto';
3
- export { Toast } from '@lace-cloud/ui/feedback';
4
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
2
  import * as React from 'react';
6
- import React__default, { FC, ReactNode } from 'react';
7
- import { aZ as ContributionSet, a_ as PanelSpec, a$ as CanvasCtx, k as CanvasPorts, ab as ResultStore, S as SourcePort, A as ActionContribution, b0 as Badge, b1 as NodeDecoration, b2 as Decorations, b3 as Bundle, $ as PendingForm, h as BoundPath, b4 as CommandRead, J as JsonOf, b5 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ap as SourceEnd, b as ActionRunner, b6 as CanvasSelection, b7 as LayoutHandle } from './registry-D3cL5cfF.mjs';
8
- export { b8 as ActionIcon, c as ActionRunnerOptions, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, i as BridgeEngineCaller, j as Busy, C as COMMANDS, b9 as ClipboardStore, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, ba as ContextKey, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, bb as EditorBinding, bc as EditorEnv, bd as EditorEnvExtras, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, X as Invocation, be as KeySpec, bf as Placement, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as Reason, a5 as ReportEntry, a6 as ReportFold, a7 as ReportPath, a8 as ReportSlot, a9 as ResultKind, aa as ResultSlots, ac as RunCtx, ad as RunOutcome, ae as RunSlot, ah as RunnerPorts, ai as RunningMark, aj as SCHEMAS, ak as Sink, al as SinkInput, am as SlotContext, an as SlotKind, ao as SourceConflict, aq as StackRef, ar as Started, as as ViewStatePort, at as WiringCandidate, au as WiringQuery, av as answering, aw as bridgeCaller, ax as carriesFailure, ay as commandPathOf, az as commandUnderWay, aA as connectCaller, aB as createActionRunner, aC as createResultStore, aD as currentReport, aE as defineCommand, aF as diagnosticsOf, bg as disabledReason, aI as foldReport, aJ as generatedTree, aK as isBoundPath, aM as openEngineCommands, aN as openEngineSession, aO as parseBound, aP as parseCommandFailure, aV as reportDiagnostics, bh as resolveContributions, bi as rowActions, aX as toArgv, aY as uniqueDiagnostics } from './registry-D3cL5cfF.mjs';
3
+ import React__default, { FC, HTMLAttributes, ReactNode } from 'react';
4
+ import { aU as ContributionSet, aV as PanelSpec, aW as CanvasCtx, k as CanvasPorts, aa as ResultStore, S as SourcePort, A as ActionContribution, aX as Badge, aY as Cloud, aZ as NodeDecoration, a_ as Decorations, $ as PendingForm, h as BoundPath, a$ as CommandRead, b0 as ContextKey, J as JsonOf, b1 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ao as SourceEnd, b as ActionRunner, b2 as CanvasSelection, b3 as LayoutHandle } from './registry-BYGzxLKn.mjs';
5
+ export { b4 as ActionIcon, c as ActionRunnerOptions, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, i as BridgeEngineCaller, j as Busy, C as COMMANDS, b5 as ClipboardStore, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, b6 as EditorBinding, b7 as EditorEnv, b8 as EditorEnvExtras, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, X as Invocation, b9 as KeySpec, ba as Placement, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as ReportEntry, a5 as ReportFold, a6 as ReportPath, a7 as ReportSlot, a8 as ResultKind, a9 as ResultSlots, ab as RunCtx, ac as RunOutcome, bb as RunRef, ad as RunSlot, ag as RunnerPorts, ah as RunningMark, bc as SCHEMAS, ai as SelectionPort, aj as Sink, ak as SinkInput, al as SlotContext, am as SlotKind, an as SourceConflict, ap as StackRef, aq as Started, ar as ViewStatePort, as as WiringCandidate, at as WiringQuery, au as answering, av as bridgeCaller, aw as commandPathOf, ax as commandUnderWay, ay as connectCaller, az as createActionRunner, aA as createResultStore, aB as currentReport, aC as defineCommand, aD as diagnosticsOf, bd as disabledReason, aG as foldReport, aH as generatedTree, be as isBoundPath, aJ as openEngineCommands, aK as openEngineSession, aL as parseBound, aM as parseCommandFailure, aS as reportDiagnostics, bf as resolveContributions, bg as rowActions } from './registry-BYGzxLKn.mjs';
6
+ import { CanvasView, NodePin, MetaArgument, Diagnostic, RenderNode, deriveSettingsConfig, deriveNodeConfig, Bundle, SettingsConfig, CanvasArrangement } from '@lace-cloud/proto';
7
+ export { CanvasArrangement, CanvasView, Conflict, Diagnostic, NodeConfig, NodePin, Reason, RenderEdge, RenderGroup, RenderInput, RenderNode, RenderOutput, SettingsConfig, ViewportIntent } from '@lace-cloud/proto';
9
8
  import { NodeProps, Node } from '@xyflow/react';
10
9
  import 'zod';
11
10
  import '@bufbuild/protobuf/wire';
@@ -41,28 +40,13 @@ type AppProps = {
41
40
  declare function App({ ports, contributions, height, results: hostResults, }: AppProps): react_jsx_runtime.JSX.Element | null;
42
41
 
43
42
  type SnapshotSourceInput = {
44
- bundleUrl: string;
45
- /** Fetch impl override — used by tests. Defaults to globalThis.fetch. */
46
- fetch?: typeof fetch;
47
43
  /**
48
- * Extra request headers sent with the bundle GET. Same-origin portal
49
- * fetches carry the session cookie via `credentials: include`, but the
50
- * API still resolves org/team scope from `x-org-slug`/`x-team-slug`
51
- * headers — the caller must supply them here or the read 400s. Embed
52
- * routes authenticate via the token in the URL and omit this.
44
+ * Reads the snapshot's Bundle proto bytes, once. Its rejection is the
45
+ * stream's `failed` end, carrying the error it rejected with, so a host
46
+ * words a failed read by its own error.
53
47
  */
54
- headers?: Record<string, string>;
48
+ read: () => Promise<Uint8Array>;
55
49
  };
56
- /**
57
- * The error of the `failed` end a snapshot source reports when the server
58
- * answered its fetch with a failure: `status` is that answer's HTTP status, as
59
- * data, so a host words the failure by it and never by the message. A fetch no
60
- * response answered ends with the transport's own error.
61
- */
62
- declare class SnapshotFetchError extends Error {
63
- readonly status: number;
64
- constructor(status: number);
65
- }
66
50
  declare function snapshotSource(input: SnapshotSourceInput): SourcePort;
67
51
 
68
52
  type Props$8 = {
@@ -73,6 +57,14 @@ type Props$8 = {
73
57
  };
74
58
  declare function AccordionSection({ title, defaultOpen, badge, children }: Props$8): react_jsx_runtime.JSX.Element;
75
59
 
60
+ /**
61
+ * The canvas's root, the one element that declares its type set: compact in any host, so a host
62
+ * of another set (the portal's comfortable document) never reaches the canvas's text roles.
63
+ * Everything the canvas draws sits inside it, its error state included; a part drawn outside
64
+ * `App` (a story of one panel or node) is drawn under it.
65
+ */
66
+ declare const CanvasRoot: React.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
67
+
76
68
  type ContextMenuState = {
77
69
  x: number;
78
70
  y: number;
@@ -123,6 +115,7 @@ type GroupNodeData = {
123
115
  collapsed: boolean;
124
116
  hasErrors: boolean;
125
117
  badges: readonly Badge[];
118
+ cloud?: Cloud;
126
119
  interfacePins: InterfacePin[];
127
120
  callWired: boolean;
128
121
  metaWired: readonly MetaArgument[];
@@ -137,8 +130,9 @@ type PinFinding = {
137
130
  tone: Badge['tone'];
138
131
  };
139
132
  /** The decorations the canvas draws: each node's badges — the overlays'
140
- * and the engine's — and the engine's findings on its inputs, by input
141
- * name. An overlay hands in badges only (`Decorations`). */
133
+ * and the engine's —, the cloud an overlay draws around it, and the
134
+ * engine's findings on its inputs, by input name. An overlay hands in
135
+ * badges and clouds (`Decorations`). */
142
136
  type DrawnDecorations = {
143
137
  nodes: Readonly<Record<string, NodeDecoration & {
144
138
  pins?: Readonly<Record<string, PinFinding>>;
@@ -153,10 +147,12 @@ type ModuleNodeData = RenderNode & {
153
147
  * `'error'` drives the error border/title. `RenderNode` carries no
154
148
  * error state of its own; a node's error styling comes only from its
155
149
  * decoration badges. The same field GroupNode's own `badges` is, both
156
- * drawn by the badge row every card draws (`BadgeRow`) — a badge
150
+ * drawn by the decoration every card draws (`CardDecoration`) — a badge
157
151
  * addressed to a collapsed group's own id (nodeIdForAddress can return a
158
152
  * group id) is not a ModuleNode concern either way. */
159
153
  badges?: readonly Badge[];
154
+ /** The cloud an overlay draws around the card (`CardDecoration`). */
155
+ cloud?: Cloud;
160
156
  /** What the engine found on this node's inputs, by input name — the
161
157
  * decoration's `pins`. */
162
158
  pins?: Readonly<Record<string, PinFinding>>;
@@ -215,7 +211,6 @@ type ContentProps$3 = {
215
211
  locals: LocalEntry[] | undefined;
216
212
  onSave: (locals: LocalEntry[]) => void | Promise<void>;
217
213
  };
218
- declare function LocalsContent({ moduleKey, locals, onSave }: ContentProps$3): react_jsx_runtime.JSX.Element;
219
214
  type Props$5 = ContentProps$3 & {
220
215
  onClose: () => void;
221
216
  };
@@ -253,7 +248,6 @@ type ContentProps$2 = {
253
248
  settings: SettingsConfig;
254
249
  onSave: (variables: VariableDef[], outputs: OutputDefEntry[]) => void | Promise<void>;
255
250
  };
256
- declare function ModuleInterfaceContent({ moduleKey, settings, onSave }: ContentProps$2): react_jsx_runtime.JSX.Element;
257
251
  type Props$3 = ContentProps$2 & {
258
252
  onClose: () => void;
259
253
  };
@@ -265,7 +259,6 @@ type ContentProps$1 = {
265
259
  providers: ProviderEntry[] | undefined;
266
260
  onSave: (providers: ProviderEntry[]) => void | Promise<void>;
267
261
  };
268
- declare function ProvidersContent({ moduleKey, providers, onSave }: ContentProps$1): react_jsx_runtime.JSX.Element;
269
262
  type Props$2 = ContentProps$1 & {
270
263
  onClose: () => void;
271
264
  };
@@ -296,13 +289,10 @@ declare function CommandArgsForm({ form }: CommandArgsFormProps): react_jsx_runt
296
289
  declare function defineOverlay<P extends BoundPath>(o: {
297
290
  id: string;
298
291
  read: CommandRead<P>;
292
+ requiredContext?: readonly ContextKey[];
299
293
  decorate(v: CanvasView, d: JsonOf<P>): Decorations;
300
294
  }): OverlayContribution;
301
295
 
302
- type DescribeData = JsonOf<'stack describe'>;
303
- declare function decorateDescribe(view: CanvasView, data: DescribeData): Decorations;
304
- declare const describeOverlay: OverlayContribution;
305
-
306
296
  type PanelScopeValue = {
307
297
  ctx: CanvasCtx;
308
298
  target: ActionTarget;
@@ -321,15 +311,6 @@ declare function PanelScope({ ctx, target, paths, tick, onReadError, children, }
321
311
  declare function usePanelScope(): PanelScopeValue;
322
312
 
323
313
  declare function ConflictBanner({ ctx }: PanelProps): react_jsx_runtime.JSX.Element;
324
- declare const conflictPanel: Panel;
325
-
326
- declare function UnsavedMarker(): react_jsx_runtime.JSX.Element;
327
- declare const unsavedMarker: Panel;
328
- declare function UngeneratedMarker(): react_jsx_runtime.JSX.Element;
329
- declare const ungeneratedMarker: Panel;
330
-
331
- declare function SourceRefusedBanner({ ctx }: PanelProps): react_jsx_runtime.JSX.Element;
332
- declare const sourceRefusedPanel: Panel;
333
314
 
334
315
  type SourceState = {
335
316
  source: CanvasSource | null;
@@ -367,5 +348,5 @@ type CanvasContextValue = {
367
348
  declare const CanvasContext: React.Context<CanvasContextValue | null>;
368
349
  declare function useCanvas(): CanvasContextValue;
369
350
 
370
- export { AccordionSection, ActionContribution, ActionRunner, ActionTarget, App, Badge, BoundPath, CanvasContext, CanvasCtx, CanvasPorts, CanvasSelection, CanvasSource, CommandArgsForm, CommandRead, CommandResult, ConflictBanner, ContextMenu, ContributionSet, Decorations, EdgeInspectorPanel, ErrorBoundary, ErrorState, GroupNode, JsonOf, LocalsContent, LocalsPanel, ModuleConfigPanel, ModuleInterfaceContent, ModuleInterfacePanel, ModuleNode, NodeConfigBusProvider, NodeDecoration, OverlayContribution, PanelScope, PanelSpec, PendingForm, ProvidersContent, ProvidersPanel, ResultStore, SnapshotFetchError, SourceEnd, SourcePort, SourceRefusedBanner, TerraformConfigContent, TerraformConfigPanel, UngeneratedMarker, UnifiedSettingsPanel, UnsavedMarker, conflictPanel, createDraftStore, decorate, decorateDescribe, defineOverlay, describeOverlay, snapshotSource, sourceRefusedPanel, ungeneratedMarker, unsavedMarker, useCanvas, useCanvasSource, useCommandRead, useEditing, usePanelScope };
351
+ export { AccordionSection, ActionContribution, ActionRunner, ActionTarget, App, Badge, BoundPath, CanvasContext, CanvasCtx, CanvasPorts, CanvasRoot, CanvasSelection, CanvasSource, Cloud, CommandArgsForm, CommandRead, CommandResult, ConflictBanner, ContextKey, ContextMenu, ContributionSet, Decorations, EdgeInspectorPanel, ErrorBoundary, ErrorState, GroupNode, JsonOf, LayoutHandle, LocalsPanel, ModuleConfigPanel, ModuleInterfacePanel, ModuleNode, NodeConfigBusProvider, NodeDecoration, OverlayContribution, PanelScope, PanelSpec, PendingForm, ProvidersPanel, ResultStore, SourceEnd, SourcePort, TerraformConfigContent, TerraformConfigPanel, UnifiedSettingsPanel, createDraftStore, decorate, defineOverlay, snapshotSource, useCanvas, useCanvasSource, useCommandRead, useEditing, usePanelScope };
371
352
  export type { AppProps, CanvasContextValue, CommandArgsFormProps, CommandReadState, Contributions, DraftStore, GroupNodeData, InterfacePin, ModuleNodeData, Panel, PanelProps, PanelScopeValue, SnapshotSourceInput };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
- import { CanvasView, NodePin, MetaArgument, Diagnostic, RenderNode, deriveSettingsConfig, deriveNodeConfig, SettingsConfig, CanvasArrangement } from '@lace-cloud/proto';
2
- export { CanvasArrangement, CanvasView, Conflict, Diagnostic, NodeConfig, NodePin, ProjectionMeta, RenderEdge, RenderGroup, RenderInput, RenderNode, RenderOutput, SettingsConfig, ViewportIntent, projectCanvasView } from '@lace-cloud/proto';
3
- export { Toast } from '@lace-cloud/ui/feedback';
4
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
2
  import * as React from 'react';
6
- import React__default, { FC, ReactNode } from 'react';
7
- import { aZ as ContributionSet, a_ as PanelSpec, a$ as CanvasCtx, k as CanvasPorts, ab as ResultStore, S as SourcePort, A as ActionContribution, b0 as Badge, b1 as NodeDecoration, b2 as Decorations, b3 as Bundle, $ as PendingForm, h as BoundPath, b4 as CommandRead, J as JsonOf, b5 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ap as SourceEnd, b as ActionRunner, b6 as CanvasSelection, b7 as LayoutHandle } from './registry-D3cL5cfF.js';
8
- export { b8 as ActionIcon, c as ActionRunnerOptions, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, i as BridgeEngineCaller, j as Busy, C as COMMANDS, b9 as ClipboardStore, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, ba as ContextKey, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, bb as EditorBinding, bc as EditorEnv, bd as EditorEnvExtras, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, X as Invocation, be as KeySpec, bf as Placement, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as Reason, a5 as ReportEntry, a6 as ReportFold, a7 as ReportPath, a8 as ReportSlot, a9 as ResultKind, aa as ResultSlots, ac as RunCtx, ad as RunOutcome, ae as RunSlot, ah as RunnerPorts, ai as RunningMark, aj as SCHEMAS, ak as Sink, al as SinkInput, am as SlotContext, an as SlotKind, ao as SourceConflict, aq as StackRef, ar as Started, as as ViewStatePort, at as WiringCandidate, au as WiringQuery, av as answering, aw as bridgeCaller, ax as carriesFailure, ay as commandPathOf, az as commandUnderWay, aA as connectCaller, aB as createActionRunner, aC as createResultStore, aD as currentReport, aE as defineCommand, aF as diagnosticsOf, bg as disabledReason, aI as foldReport, aJ as generatedTree, aK as isBoundPath, aM as openEngineCommands, aN as openEngineSession, aO as parseBound, aP as parseCommandFailure, aV as reportDiagnostics, bh as resolveContributions, bi as rowActions, aX as toArgv, aY as uniqueDiagnostics } from './registry-D3cL5cfF.js';
3
+ import React__default, { FC, HTMLAttributes, ReactNode } from 'react';
4
+ import { aU as ContributionSet, aV as PanelSpec, aW as CanvasCtx, k as CanvasPorts, aa as ResultStore, S as SourcePort, A as ActionContribution, aX as Badge, aY as Cloud, aZ as NodeDecoration, a_ as Decorations, $ as PendingForm, h as BoundPath, a$ as CommandRead, b0 as ContextKey, J as JsonOf, b1 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ao as SourceEnd, b as ActionRunner, b2 as CanvasSelection, b3 as LayoutHandle } from './registry-BYGzxLKn.js';
5
+ export { b4 as ActionIcon, c as ActionRunnerOptions, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, i as BridgeEngineCaller, j as Busy, C as COMMANDS, b5 as ClipboardStore, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, b6 as EditorBinding, b7 as EditorEnv, b8 as EditorEnvExtras, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, X as Invocation, b9 as KeySpec, ba as Placement, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as ReportEntry, a5 as ReportFold, a6 as ReportPath, a7 as ReportSlot, a8 as ResultKind, a9 as ResultSlots, ab as RunCtx, ac as RunOutcome, bb as RunRef, ad as RunSlot, ag as RunnerPorts, ah as RunningMark, bc as SCHEMAS, ai as SelectionPort, aj as Sink, ak as SinkInput, al as SlotContext, am as SlotKind, an as SourceConflict, ap as StackRef, aq as Started, ar as ViewStatePort, as as WiringCandidate, at as WiringQuery, au as answering, av as bridgeCaller, aw as commandPathOf, ax as commandUnderWay, ay as connectCaller, az as createActionRunner, aA as createResultStore, aB as currentReport, aC as defineCommand, aD as diagnosticsOf, bd as disabledReason, aG as foldReport, aH as generatedTree, be as isBoundPath, aJ as openEngineCommands, aK as openEngineSession, aL as parseBound, aM as parseCommandFailure, aS as reportDiagnostics, bf as resolveContributions, bg as rowActions } from './registry-BYGzxLKn.js';
6
+ import { CanvasView, NodePin, MetaArgument, Diagnostic, RenderNode, deriveSettingsConfig, deriveNodeConfig, Bundle, SettingsConfig, CanvasArrangement } from '@lace-cloud/proto';
7
+ export { CanvasArrangement, CanvasView, Conflict, Diagnostic, NodeConfig, NodePin, Reason, RenderEdge, RenderGroup, RenderInput, RenderNode, RenderOutput, SettingsConfig, ViewportIntent } from '@lace-cloud/proto';
9
8
  import { NodeProps, Node } from '@xyflow/react';
10
9
  import 'zod';
11
10
  import '@bufbuild/protobuf/wire';
@@ -41,28 +40,13 @@ type AppProps = {
41
40
  declare function App({ ports, contributions, height, results: hostResults, }: AppProps): react_jsx_runtime.JSX.Element | null;
42
41
 
43
42
  type SnapshotSourceInput = {
44
- bundleUrl: string;
45
- /** Fetch impl override — used by tests. Defaults to globalThis.fetch. */
46
- fetch?: typeof fetch;
47
43
  /**
48
- * Extra request headers sent with the bundle GET. Same-origin portal
49
- * fetches carry the session cookie via `credentials: include`, but the
50
- * API still resolves org/team scope from `x-org-slug`/`x-team-slug`
51
- * headers — the caller must supply them here or the read 400s. Embed
52
- * routes authenticate via the token in the URL and omit this.
44
+ * Reads the snapshot's Bundle proto bytes, once. Its rejection is the
45
+ * stream's `failed` end, carrying the error it rejected with, so a host
46
+ * words a failed read by its own error.
53
47
  */
54
- headers?: Record<string, string>;
48
+ read: () => Promise<Uint8Array>;
55
49
  };
56
- /**
57
- * The error of the `failed` end a snapshot source reports when the server
58
- * answered its fetch with a failure: `status` is that answer's HTTP status, as
59
- * data, so a host words the failure by it and never by the message. A fetch no
60
- * response answered ends with the transport's own error.
61
- */
62
- declare class SnapshotFetchError extends Error {
63
- readonly status: number;
64
- constructor(status: number);
65
- }
66
50
  declare function snapshotSource(input: SnapshotSourceInput): SourcePort;
67
51
 
68
52
  type Props$8 = {
@@ -73,6 +57,14 @@ type Props$8 = {
73
57
  };
74
58
  declare function AccordionSection({ title, defaultOpen, badge, children }: Props$8): react_jsx_runtime.JSX.Element;
75
59
 
60
+ /**
61
+ * The canvas's root, the one element that declares its type set: compact in any host, so a host
62
+ * of another set (the portal's comfortable document) never reaches the canvas's text roles.
63
+ * Everything the canvas draws sits inside it, its error state included; a part drawn outside
64
+ * `App` (a story of one panel or node) is drawn under it.
65
+ */
66
+ declare const CanvasRoot: React.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
67
+
76
68
  type ContextMenuState = {
77
69
  x: number;
78
70
  y: number;
@@ -123,6 +115,7 @@ type GroupNodeData = {
123
115
  collapsed: boolean;
124
116
  hasErrors: boolean;
125
117
  badges: readonly Badge[];
118
+ cloud?: Cloud;
126
119
  interfacePins: InterfacePin[];
127
120
  callWired: boolean;
128
121
  metaWired: readonly MetaArgument[];
@@ -137,8 +130,9 @@ type PinFinding = {
137
130
  tone: Badge['tone'];
138
131
  };
139
132
  /** The decorations the canvas draws: each node's badges — the overlays'
140
- * and the engine's — and the engine's findings on its inputs, by input
141
- * name. An overlay hands in badges only (`Decorations`). */
133
+ * and the engine's —, the cloud an overlay draws around it, and the
134
+ * engine's findings on its inputs, by input name. An overlay hands in
135
+ * badges and clouds (`Decorations`). */
142
136
  type DrawnDecorations = {
143
137
  nodes: Readonly<Record<string, NodeDecoration & {
144
138
  pins?: Readonly<Record<string, PinFinding>>;
@@ -153,10 +147,12 @@ type ModuleNodeData = RenderNode & {
153
147
  * `'error'` drives the error border/title. `RenderNode` carries no
154
148
  * error state of its own; a node's error styling comes only from its
155
149
  * decoration badges. The same field GroupNode's own `badges` is, both
156
- * drawn by the badge row every card draws (`BadgeRow`) — a badge
150
+ * drawn by the decoration every card draws (`CardDecoration`) — a badge
157
151
  * addressed to a collapsed group's own id (nodeIdForAddress can return a
158
152
  * group id) is not a ModuleNode concern either way. */
159
153
  badges?: readonly Badge[];
154
+ /** The cloud an overlay draws around the card (`CardDecoration`). */
155
+ cloud?: Cloud;
160
156
  /** What the engine found on this node's inputs, by input name — the
161
157
  * decoration's `pins`. */
162
158
  pins?: Readonly<Record<string, PinFinding>>;
@@ -215,7 +211,6 @@ type ContentProps$3 = {
215
211
  locals: LocalEntry[] | undefined;
216
212
  onSave: (locals: LocalEntry[]) => void | Promise<void>;
217
213
  };
218
- declare function LocalsContent({ moduleKey, locals, onSave }: ContentProps$3): react_jsx_runtime.JSX.Element;
219
214
  type Props$5 = ContentProps$3 & {
220
215
  onClose: () => void;
221
216
  };
@@ -253,7 +248,6 @@ type ContentProps$2 = {
253
248
  settings: SettingsConfig;
254
249
  onSave: (variables: VariableDef[], outputs: OutputDefEntry[]) => void | Promise<void>;
255
250
  };
256
- declare function ModuleInterfaceContent({ moduleKey, settings, onSave }: ContentProps$2): react_jsx_runtime.JSX.Element;
257
251
  type Props$3 = ContentProps$2 & {
258
252
  onClose: () => void;
259
253
  };
@@ -265,7 +259,6 @@ type ContentProps$1 = {
265
259
  providers: ProviderEntry[] | undefined;
266
260
  onSave: (providers: ProviderEntry[]) => void | Promise<void>;
267
261
  };
268
- declare function ProvidersContent({ moduleKey, providers, onSave }: ContentProps$1): react_jsx_runtime.JSX.Element;
269
262
  type Props$2 = ContentProps$1 & {
270
263
  onClose: () => void;
271
264
  };
@@ -296,13 +289,10 @@ declare function CommandArgsForm({ form }: CommandArgsFormProps): react_jsx_runt
296
289
  declare function defineOverlay<P extends BoundPath>(o: {
297
290
  id: string;
298
291
  read: CommandRead<P>;
292
+ requiredContext?: readonly ContextKey[];
299
293
  decorate(v: CanvasView, d: JsonOf<P>): Decorations;
300
294
  }): OverlayContribution;
301
295
 
302
- type DescribeData = JsonOf<'stack describe'>;
303
- declare function decorateDescribe(view: CanvasView, data: DescribeData): Decorations;
304
- declare const describeOverlay: OverlayContribution;
305
-
306
296
  type PanelScopeValue = {
307
297
  ctx: CanvasCtx;
308
298
  target: ActionTarget;
@@ -321,15 +311,6 @@ declare function PanelScope({ ctx, target, paths, tick, onReadError, children, }
321
311
  declare function usePanelScope(): PanelScopeValue;
322
312
 
323
313
  declare function ConflictBanner({ ctx }: PanelProps): react_jsx_runtime.JSX.Element;
324
- declare const conflictPanel: Panel;
325
-
326
- declare function UnsavedMarker(): react_jsx_runtime.JSX.Element;
327
- declare const unsavedMarker: Panel;
328
- declare function UngeneratedMarker(): react_jsx_runtime.JSX.Element;
329
- declare const ungeneratedMarker: Panel;
330
-
331
- declare function SourceRefusedBanner({ ctx }: PanelProps): react_jsx_runtime.JSX.Element;
332
- declare const sourceRefusedPanel: Panel;
333
314
 
334
315
  type SourceState = {
335
316
  source: CanvasSource | null;
@@ -367,5 +348,5 @@ type CanvasContextValue = {
367
348
  declare const CanvasContext: React.Context<CanvasContextValue | null>;
368
349
  declare function useCanvas(): CanvasContextValue;
369
350
 
370
- export { AccordionSection, ActionContribution, ActionRunner, ActionTarget, App, Badge, BoundPath, CanvasContext, CanvasCtx, CanvasPorts, CanvasSelection, CanvasSource, CommandArgsForm, CommandRead, CommandResult, ConflictBanner, ContextMenu, ContributionSet, Decorations, EdgeInspectorPanel, ErrorBoundary, ErrorState, GroupNode, JsonOf, LocalsContent, LocalsPanel, ModuleConfigPanel, ModuleInterfaceContent, ModuleInterfacePanel, ModuleNode, NodeConfigBusProvider, NodeDecoration, OverlayContribution, PanelScope, PanelSpec, PendingForm, ProvidersContent, ProvidersPanel, ResultStore, SnapshotFetchError, SourceEnd, SourcePort, SourceRefusedBanner, TerraformConfigContent, TerraformConfigPanel, UngeneratedMarker, UnifiedSettingsPanel, UnsavedMarker, conflictPanel, createDraftStore, decorate, decorateDescribe, defineOverlay, describeOverlay, snapshotSource, sourceRefusedPanel, ungeneratedMarker, unsavedMarker, useCanvas, useCanvasSource, useCommandRead, useEditing, usePanelScope };
351
+ export { AccordionSection, ActionContribution, ActionRunner, ActionTarget, App, Badge, BoundPath, CanvasContext, CanvasCtx, CanvasPorts, CanvasRoot, CanvasSelection, CanvasSource, Cloud, CommandArgsForm, CommandRead, CommandResult, ConflictBanner, ContextKey, ContextMenu, ContributionSet, Decorations, EdgeInspectorPanel, ErrorBoundary, ErrorState, GroupNode, JsonOf, LayoutHandle, LocalsPanel, ModuleConfigPanel, ModuleInterfacePanel, ModuleNode, NodeConfigBusProvider, NodeDecoration, OverlayContribution, PanelScope, PanelSpec, PendingForm, ProvidersPanel, ResultStore, SourceEnd, SourcePort, TerraformConfigContent, TerraformConfigPanel, UnifiedSettingsPanel, createDraftStore, decorate, defineOverlay, snapshotSource, useCanvas, useCanvasSource, useCommandRead, useEditing, usePanelScope };
371
352
  export type { AppProps, CanvasContextValue, CommandArgsFormProps, CommandReadState, Contributions, DraftStore, GroupNodeData, InterfacePin, ModuleNodeData, Panel, PanelProps, PanelScopeValue, SnapshotSourceInput };