@lace-cloud/canvas 0.8.0 → 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/dist/index.d.mts CHANGED
@@ -2,10 +2,240 @@ import { CanvasView, Diagnostic, NodeConfig, EdgeConfig, SettingsConfig, RenderE
2
2
  export { CanvasView, Diagnostic, EdgeConfig, GeneratePhase, HostToWebview, NodeConfig, NodePin, ProjectionMeta, RenderEdge, RenderError, RenderGroup, RenderInput, RenderNode, RenderOutput, SettingsConfig, ViewportIntent, projectCanvasView } from '@lace-cloud/proto';
3
3
  export { Toast } from '@lace-cloud/ui/feedback';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
5
6
  import * as React from 'react';
6
7
  import React__default from 'react';
7
8
  import { NodeProps, Node } from '@xyflow/react';
8
- import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
9
+
10
+ interface Bundle {
11
+ schema_version: string;
12
+ kind: string;
13
+ entry: string;
14
+ modules: {
15
+ [key: string]: Module;
16
+ };
17
+ environments: {
18
+ [key: string]: {
19
+ [key: string]: any;
20
+ } | undefined;
21
+ };
22
+ environment_backends: {
23
+ [key: string]: BackendConfig;
24
+ };
25
+ }
26
+ declare const Bundle: MessageFns<Bundle>;
27
+ interface Module {
28
+ id: string;
29
+ version: string;
30
+ source: Source | undefined;
31
+ interface: Interface | undefined;
32
+ modules: Use[];
33
+ resources: Resource[];
34
+ locals: Local[];
35
+ exports: Exports | undefined;
36
+ terraform: TerraformBlock | undefined;
37
+ providers: ProviderConfig[];
38
+ /** top-level directives: moved {}, import {} */
39
+ top_level_blocks: Block[];
40
+ }
41
+ declare const Module: MessageFns<Module>;
42
+ interface Interface {
43
+ inputs: InputDef[];
44
+ outputs: OutputDef[];
45
+ }
46
+ declare const Interface: MessageFns<Interface>;
47
+ interface InputDef {
48
+ name: string;
49
+ type: string;
50
+ required: boolean;
51
+ description: string;
52
+ default_value: any | undefined;
53
+ validation: ValidationBlock[];
54
+ sensitive: boolean;
55
+ /** unset = default (true); explicit false is meaningful */
56
+ nullable?: boolean | undefined;
57
+ /** unset = default (false); explicit true is meaningful */
58
+ ephemeral?: boolean | undefined;
59
+ }
60
+ declare const InputDef: MessageFns<InputDef>;
61
+ interface ValidationBlock {
62
+ condition: string;
63
+ error_message: string;
64
+ }
65
+ declare const ValidationBlock: MessageFns<ValidationBlock>;
66
+ interface OutputDef {
67
+ name: string;
68
+ type: string;
69
+ description: string;
70
+ sensitive: boolean;
71
+ depends_on: string[];
72
+ }
73
+ declare const OutputDef: MessageFns<OutputDef>;
74
+ interface Source {
75
+ kind: string;
76
+ repo: string;
77
+ subdir: string;
78
+ ref: string;
79
+ organization: string;
80
+ }
81
+ declare const Source: MessageFns<Source>;
82
+ interface Local {
83
+ name: string;
84
+ value: Binding | undefined;
85
+ }
86
+ declare const Local: MessageFns<Local>;
87
+ interface Use {
88
+ id: string;
89
+ module: string;
90
+ inputs: {
91
+ [key: string]: Binding;
92
+ };
93
+ depends_on: string[];
94
+ /** count meta-argument */
95
+ count: Binding | undefined;
96
+ /** for_each meta-argument */
97
+ for_each: Binding | undefined;
98
+ }
99
+ declare const Use: MessageFns<Use>;
100
+ interface Resource {
101
+ id: string;
102
+ kind: string;
103
+ type: string;
104
+ inputs: {
105
+ [key: string]: Binding;
106
+ };
107
+ depends_on: string[];
108
+ /** nested blocks (ingress, lifecycle, dynamic, …) */
109
+ blocks: Block[];
110
+ /** count meta-argument */
111
+ count: Binding | undefined;
112
+ /** for_each meta-argument */
113
+ for_each: Binding | undefined;
114
+ /** provider meta-argument, e.g. "aws.west" */
115
+ provider_ref: string;
116
+ }
117
+ declare const Resource: MessageFns<Resource>;
118
+ /**
119
+ * Block is a recursive nested block (within a resource, or top-level moved/
120
+ * import). Attributes are ordered (declaration order) so regenerated HCL is
121
+ * byte-deterministic.
122
+ */
123
+ interface Block {
124
+ type: string;
125
+ labels: string[];
126
+ attributes: NamedBinding[];
127
+ blocks: Block[];
128
+ }
129
+ declare const Block: MessageFns<Block>;
130
+ /** NamedBinding is an ordered (name, value) attribute within a Block. */
131
+ interface NamedBinding {
132
+ name: string;
133
+ value: Binding | undefined;
134
+ }
135
+ declare const NamedBinding: MessageFns<NamedBinding>;
136
+ interface Exports {
137
+ outputs: {
138
+ [key: string]: OutputExport;
139
+ };
140
+ }
141
+ declare const Exports: MessageFns<Exports>;
142
+ interface OutputExport {
143
+ out: OutputRef | undefined;
144
+ lit: any | undefined;
145
+ var: string;
146
+ expr: Expression | undefined;
147
+ }
148
+ declare const OutputExport: MessageFns<OutputExport>;
149
+ interface Binding {
150
+ lit?: any | undefined;
151
+ var?: string | undefined;
152
+ out?: OutputRef | undefined;
153
+ expr?: Expression | undefined;
154
+ }
155
+ declare const Binding: MessageFns<Binding>;
156
+ interface OutputRef {
157
+ module: string;
158
+ name: string;
159
+ }
160
+ declare const OutputRef: MessageFns<OutputRef>;
161
+ interface Expression {
162
+ lang: string;
163
+ value: string;
164
+ }
165
+ declare const Expression: MessageFns<Expression>;
166
+ interface TerraformBlock {
167
+ required_version: string;
168
+ required_providers: {
169
+ [key: string]: ProviderRequirement;
170
+ };
171
+ backend: BackendConfig | undefined;
172
+ }
173
+ declare const TerraformBlock: MessageFns<TerraformBlock>;
174
+ interface ProviderRequirement {
175
+ source: string;
176
+ version: string;
177
+ }
178
+ declare const ProviderRequirement: MessageFns<ProviderRequirement>;
179
+ interface BackendConfig {
180
+ type: string;
181
+ config: {
182
+ [key: string]: any | undefined;
183
+ };
184
+ }
185
+ declare const BackendConfig: MessageFns<BackendConfig>;
186
+ interface ProviderConfig {
187
+ name: string;
188
+ alias: string;
189
+ config: {
190
+ [key: string]: Binding;
191
+ };
192
+ /** nested config blocks (default_tags, assume_role, …) */
193
+ blocks: Block[];
194
+ }
195
+ declare const ProviderConfig: MessageFns<ProviderConfig>;
196
+ interface GraphLayout {
197
+ nodes: {
198
+ [key: string]: NodeLayout;
199
+ };
200
+ groups: {
201
+ [key: string]: NodeGroup;
202
+ };
203
+ }
204
+ declare const GraphLayout: MessageFns<GraphLayout>;
205
+ interface NodeGroup {
206
+ id: string;
207
+ label: string;
208
+ node_ids: string[];
209
+ collapsed: boolean;
210
+ }
211
+ declare const NodeGroup: MessageFns<NodeGroup>;
212
+ interface NodeLayout {
213
+ position: Position | undefined;
214
+ }
215
+ declare const NodeLayout: MessageFns<NodeLayout>;
216
+ interface Position {
217
+ x: number;
218
+ y: number;
219
+ }
220
+ declare const Position: MessageFns<Position>;
221
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
222
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
223
+ [K in keyof T]?: DeepPartial<T[K]>;
224
+ } : Partial<T>;
225
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
226
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
227
+ [K in keyof P]: Exact<P[K], I[K]>;
228
+ } & {
229
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
230
+ };
231
+ interface MessageFns<T> {
232
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
233
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
234
+ fromJSON(object: any): T;
235
+ toJSON(message: T): unknown;
236
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
237
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
238
+ }
9
239
 
10
240
  /**
11
241
  * Per-predicate trace shape that mirrors the Go `policy.ConditionPredicateTrace`.
@@ -96,6 +326,13 @@ type VariableDef = {
96
326
  required: boolean;
97
327
  description?: string;
98
328
  default?: unknown;
329
+ validation?: {
330
+ condition: string;
331
+ error_message: string;
332
+ }[];
333
+ ephemeral?: boolean;
334
+ sensitive?: boolean;
335
+ nullable?: boolean;
99
336
  };
100
337
  type OutputExportDef = {
101
338
  name: string;
@@ -107,6 +344,7 @@ type OutputDefEntry = {
107
344
  type: string;
108
345
  description?: string;
109
346
  sensitive?: boolean;
347
+ depends_on?: string[];
110
348
  };
111
349
  type ModuleAuthor = {
112
350
  name: string;
@@ -126,11 +364,13 @@ type ProviderDef = {
126
364
  name: string;
127
365
  source: string;
128
366
  version: string;
367
+ configuration_aliases?: string[];
129
368
  };
130
369
  type ProviderConfigDef = {
131
370
  name: string;
132
371
  alias?: string;
133
372
  config: Record<string, string>;
373
+ blocks?: Block[];
134
374
  };
135
375
  type LocalDef = {
136
376
  name: string;
@@ -201,6 +441,12 @@ interface CanvasEngine {
201
441
  setProviders(providers: ProviderConfigDef[]): Promise<ApplyResult>;
202
442
  setLocals(locals: LocalDef[]): Promise<ApplyResult>;
203
443
  setDependsOn(instanceId: string, dependsOn: string[]): Promise<ApplyResult>;
444
+ /**
445
+ * Set a module call's `providers = {}` map — keys are the child module's
446
+ * local provider names, values the root's provider references passed down.
447
+ * A node-tier edit of the existing module call, mirroring setDependsOn.
448
+ */
449
+ setUseProviders(instanceId: string, providers: Record<string, string>): Promise<ApplyResult>;
204
450
  setEnvironments(environments: Record<string, Record<string, unknown>>): Promise<ApplyResult>;
205
451
  undo(): Promise<ApplyResult>;
206
452
  redo(): Promise<ApplyResult>;
@@ -294,13 +540,13 @@ type AppProps = {
294
540
  };
295
541
  declare function App({ engine, hostBridge, readOnly, registryBaseUrl, apiToken, }: AppProps): react_jsx_runtime.JSX.Element;
296
542
 
297
- type Props$9 = {
543
+ type Props$a = {
298
544
  title: string;
299
545
  defaultOpen?: boolean;
300
546
  badge?: string;
301
547
  children: React__default.ReactNode;
302
548
  };
303
- declare function AccordionSection({ title, defaultOpen, badge, children }: Props$9): react_jsx_runtime.JSX.Element;
549
+ declare function AccordionSection({ title, defaultOpen, badge, children }: Props$a): react_jsx_runtime.JSX.Element;
304
550
 
305
551
  type ActionBarProps = {
306
552
  /**
@@ -337,7 +583,7 @@ type ContextMenuState = {
337
583
  selectedCount: number;
338
584
  } | null;
339
585
 
340
- type Props$8 = {
586
+ type Props$9 = {
341
587
  contextMenu: ContextMenuState;
342
588
  onCopy: () => void;
343
589
  onCut: () => void;
@@ -346,7 +592,7 @@ type Props$8 = {
346
592
  onUngroup: (groupId: string) => void;
347
593
  onDismiss: () => void;
348
594
  };
349
- declare function ContextMenu({ contextMenu, onCopy, onCut, onPaste, onGroupSelected, onUngroup, onDismiss, }: Props$8): react_jsx_runtime.JSX.Element | null;
595
+ declare function ContextMenu({ contextMenu, onCopy, onCut, onPaste, onGroupSelected, onUngroup, onDismiss, }: Props$9): react_jsx_runtime.JSX.Element | null;
350
596
 
351
597
  type ErrorStateProps = {
352
598
  message: string;
@@ -393,7 +639,7 @@ type ModuleNodeData = RenderNode & {
393
639
  type ModuleNodeNode = Node<ModuleNodeData, 'moduleNode'>;
394
640
  declare const ModuleNode: React__default.FC<NodeProps<ModuleNodeNode>>;
395
641
 
396
- type Props$7 = {
642
+ type Props$8 = {
397
643
  source: string;
398
644
  target: string;
399
645
  sourceOutput: string;
@@ -401,42 +647,60 @@ type Props$7 = {
401
647
  onDelete: () => void;
402
648
  onClose: () => void;
403
649
  };
404
- declare function EdgeInspectorPanel({ source, target, sourceOutput, targetInput, onDelete, onClose, }: Props$7): react_jsx_runtime.JSX.Element;
650
+ declare function EdgeInspectorPanel({ source, target, sourceOutput, targetInput, onDelete, onClose, }: Props$8): react_jsx_runtime.JSX.Element;
405
651
 
406
- type ContentProps$3 = {
652
+ type ContentProps$4 = {
407
653
  environments: Record<string, Record<string, unknown>> | undefined;
408
654
  readOnly?: boolean;
409
655
  onSave: (environments: Record<string, Record<string, unknown>>) => void | Promise<void>;
410
656
  };
411
- declare function EnvironmentsContent({ environments, readOnly, onSave }: ContentProps$3): react_jsx_runtime.JSX.Element;
412
- type Props$6 = {
657
+ declare function EnvironmentsContent({ environments, readOnly, onSave }: ContentProps$4): react_jsx_runtime.JSX.Element;
658
+ type Props$7 = {
413
659
  environments: Record<string, Record<string, unknown>> | undefined;
414
660
  onSave: (environments: Record<string, Record<string, unknown>>) => void | Promise<void>;
415
661
  onClose: () => void;
416
662
  };
417
- declare function EnvironmentsPanel({ environments, onSave, onClose }: Props$6): react_jsx_runtime.JSX.Element;
663
+ declare function EnvironmentsPanel({ environments, onSave, onClose }: Props$7): react_jsx_runtime.JSX.Element;
418
664
 
419
665
  type LocalEntry = SettingsConfig['locals'][number];
420
- type ContentProps$2 = {
666
+ type ContentProps$3 = {
421
667
  locals: LocalEntry[] | undefined;
422
668
  readOnly?: boolean;
423
669
  onSave: (locals: LocalEntry[]) => void | Promise<void>;
424
670
  };
425
- declare function LocalsContent({ locals, readOnly, onSave }: ContentProps$2): react_jsx_runtime.JSX.Element;
426
- type Props$5 = {
671
+ declare function LocalsContent({ locals, readOnly, onSave }: ContentProps$3): react_jsx_runtime.JSX.Element;
672
+ type Props$6 = {
427
673
  locals: LocalEntry[] | undefined;
428
674
  onSave: (locals: LocalEntry[]) => void | Promise<void>;
429
675
  onClose: () => void;
430
676
  };
431
- declare function LocalsPanel({ locals, onSave, onClose }: Props$5): react_jsx_runtime.JSX.Element;
677
+ declare function LocalsPanel({ locals, onSave, onClose }: Props$6): react_jsx_runtime.JSX.Element;
432
678
 
433
- type Props$4 = {
679
+ type Props$5 = {
434
680
  instance_id: string;
435
681
  engine: CanvasEngine;
436
682
  onClose: () => void;
437
683
  onModified?: (instanceId: string) => void;
438
684
  };
439
- declare function ModuleConfigPanel({ instance_id, engine, onClose, onModified }: Props$4): react_jsx_runtime.JSX.Element;
685
+ declare function ModuleConfigPanel({ instance_id, engine, onClose, onModified }: Props$5): react_jsx_runtime.JSX.Element;
686
+
687
+ type ContentProps$2 = {
688
+ settings: SettingsConfig;
689
+ view: CanvasView | null;
690
+ readOnly?: boolean;
691
+ onSaveVariables: (variables: VariableDef[]) => void | Promise<void>;
692
+ onSaveExports: (exports: OutputExportDef[], outputDefs: OutputDefEntry[]) => void | Promise<void>;
693
+ };
694
+ declare function ModuleInterfaceContent({ settings, view, readOnly, onSaveVariables, onSaveExports, }: ContentProps$2): react_jsx_runtime.JSX.Element;
695
+ type Props$4 = {
696
+ settings: SettingsConfig;
697
+ view: CanvasView | null;
698
+ readOnly?: boolean;
699
+ onSaveVariables: (variables: VariableDef[]) => void | Promise<void>;
700
+ onSaveExports: (exports: OutputExportDef[], outputDefs: OutputDefEntry[]) => void | Promise<void>;
701
+ onClose: () => void;
702
+ };
703
+ declare function ModuleInterfacePanel({ settings, view, readOnly, onSaveVariables, onSaveExports, onClose, }: Props$4): react_jsx_runtime.JSX.Element;
440
704
 
441
705
  type Props$3 = {
442
706
  /**
@@ -471,10 +735,11 @@ type ContentProps$1 = {
471
735
  declare function ProvidersContent({ providers, readOnly, onSave }: ContentProps$1): react_jsx_runtime.JSX.Element;
472
736
  type Props$2 = {
473
737
  providers: ProviderEntry[] | undefined;
738
+ readOnly?: boolean;
474
739
  onSave: (providers: ProviderEntry[]) => void | Promise<void>;
475
740
  onClose: () => void;
476
741
  };
477
- declare function ProvidersPanel({ providers, onSave, onClose }: Props$2): react_jsx_runtime.JSX.Element;
742
+ declare function ProvidersPanel({ providers, readOnly, onSave, onClose }: Props$2): react_jsx_runtime.JSX.Element;
478
743
 
479
744
  type TerraformConfig = SettingsConfig['terraform'];
480
745
  type ContentProps = {
@@ -605,6 +870,7 @@ declare class ConnectWebEngine implements CanvasEngine {
605
870
  setProviders(providers: ProviderConfigDef[]): Promise<ApplyResult>;
606
871
  setLocals(locals: LocalDef[]): Promise<ApplyResult>;
607
872
  setDependsOn(instanceId: string, dependsOn: string[]): Promise<ApplyResult>;
873
+ setUseProviders(instanceId: string, providers: Record<string, string>): Promise<ApplyResult>;
608
874
  setEnvironments(environments: Record<string, Record<string, unknown>>): Promise<ApplyResult>;
609
875
  undo(): Promise<ApplyResult>;
610
876
  redo(): Promise<ApplyResult>;
@@ -715,6 +981,7 @@ declare class PostMessageEngine implements CanvasEngine {
715
981
  setProviders(providers: ProviderConfigDef[]): Promise<ApplyResult>;
716
982
  setLocals(locals: LocalDef[]): Promise<ApplyResult>;
717
983
  setDependsOn(instanceId: string, dependsOn: string[]): Promise<ApplyResult>;
984
+ setUseProviders(instanceId: string, providers: Record<string, string>): Promise<ApplyResult>;
718
985
  setEnvironments(environments: Record<string, Record<string, unknown>>): Promise<ApplyResult>;
719
986
  undo(): Promise<ApplyResult>;
720
987
  redo(): Promise<ApplyResult>;
@@ -758,236 +1025,6 @@ declare class PostMessageEngine implements CanvasEngine {
758
1025
  previewPolicyResolution(delta: PreviewDelta, signal?: AbortSignal): Promise<PolicyResolution>;
759
1026
  }
760
1027
 
761
- interface Bundle {
762
- schema_version: string;
763
- kind: string;
764
- entry: string;
765
- modules: {
766
- [key: string]: Module;
767
- };
768
- environments: {
769
- [key: string]: {
770
- [key: string]: any;
771
- } | undefined;
772
- };
773
- environment_backends: {
774
- [key: string]: BackendConfig;
775
- };
776
- }
777
- declare const Bundle: MessageFns<Bundle>;
778
- interface Module {
779
- id: string;
780
- version: string;
781
- source: Source | undefined;
782
- interface: Interface | undefined;
783
- modules: Use[];
784
- resources: Resource[];
785
- locals: Local[];
786
- exports: Exports | undefined;
787
- terraform: TerraformBlock | undefined;
788
- providers: ProviderConfig[];
789
- /** top-level directives: moved {}, import {} */
790
- top_level_blocks: Block[];
791
- }
792
- declare const Module: MessageFns<Module>;
793
- interface Interface {
794
- inputs: InputDef[];
795
- outputs: OutputDef[];
796
- }
797
- declare const Interface: MessageFns<Interface>;
798
- interface InputDef {
799
- name: string;
800
- type: string;
801
- required: boolean;
802
- description: string;
803
- default_value: any | undefined;
804
- validation: ValidationBlock[];
805
- sensitive: boolean;
806
- /** unset = default (true); explicit false is meaningful */
807
- nullable?: boolean | undefined;
808
- /** unset = default (false); explicit true is meaningful */
809
- ephemeral?: boolean | undefined;
810
- }
811
- declare const InputDef: MessageFns<InputDef>;
812
- interface ValidationBlock {
813
- condition: string;
814
- error_message: string;
815
- }
816
- declare const ValidationBlock: MessageFns<ValidationBlock>;
817
- interface OutputDef {
818
- name: string;
819
- type: string;
820
- description: string;
821
- sensitive: boolean;
822
- depends_on: string[];
823
- }
824
- declare const OutputDef: MessageFns<OutputDef>;
825
- interface Source {
826
- kind: string;
827
- repo: string;
828
- subdir: string;
829
- ref: string;
830
- organization: string;
831
- }
832
- declare const Source: MessageFns<Source>;
833
- interface Local {
834
- name: string;
835
- value: Binding | undefined;
836
- }
837
- declare const Local: MessageFns<Local>;
838
- interface Use {
839
- id: string;
840
- module: string;
841
- inputs: {
842
- [key: string]: Binding;
843
- };
844
- depends_on: string[];
845
- /** count meta-argument */
846
- count: Binding | undefined;
847
- /** for_each meta-argument */
848
- for_each: Binding | undefined;
849
- }
850
- declare const Use: MessageFns<Use>;
851
- interface Resource {
852
- id: string;
853
- kind: string;
854
- type: string;
855
- inputs: {
856
- [key: string]: Binding;
857
- };
858
- depends_on: string[];
859
- /** nested blocks (ingress, lifecycle, dynamic, …) */
860
- blocks: Block[];
861
- /** count meta-argument */
862
- count: Binding | undefined;
863
- /** for_each meta-argument */
864
- for_each: Binding | undefined;
865
- /** provider meta-argument, e.g. "aws.west" */
866
- provider_ref: string;
867
- }
868
- declare const Resource: MessageFns<Resource>;
869
- /**
870
- * Block is a recursive nested block (within a resource, or top-level moved/
871
- * import). Attributes are ordered (declaration order) so regenerated HCL is
872
- * byte-deterministic.
873
- */
874
- interface Block {
875
- type: string;
876
- labels: string[];
877
- attributes: NamedBinding[];
878
- blocks: Block[];
879
- }
880
- declare const Block: MessageFns<Block>;
881
- /** NamedBinding is an ordered (name, value) attribute within a Block. */
882
- interface NamedBinding {
883
- name: string;
884
- value: Binding | undefined;
885
- }
886
- declare const NamedBinding: MessageFns<NamedBinding>;
887
- interface Exports {
888
- outputs: {
889
- [key: string]: OutputExport;
890
- };
891
- }
892
- declare const Exports: MessageFns<Exports>;
893
- interface OutputExport {
894
- out: OutputRef | undefined;
895
- lit: any | undefined;
896
- var: string;
897
- expr: Expression | undefined;
898
- }
899
- declare const OutputExport: MessageFns<OutputExport>;
900
- interface Binding {
901
- lit?: any | undefined;
902
- var?: string | undefined;
903
- out?: OutputRef | undefined;
904
- expr?: Expression | undefined;
905
- }
906
- declare const Binding: MessageFns<Binding>;
907
- interface OutputRef {
908
- module: string;
909
- name: string;
910
- }
911
- declare const OutputRef: MessageFns<OutputRef>;
912
- interface Expression {
913
- lang: string;
914
- value: string;
915
- }
916
- declare const Expression: MessageFns<Expression>;
917
- interface TerraformBlock {
918
- required_version: string;
919
- required_providers: {
920
- [key: string]: ProviderRequirement;
921
- };
922
- backend: BackendConfig | undefined;
923
- }
924
- declare const TerraformBlock: MessageFns<TerraformBlock>;
925
- interface ProviderRequirement {
926
- source: string;
927
- version: string;
928
- }
929
- declare const ProviderRequirement: MessageFns<ProviderRequirement>;
930
- interface BackendConfig {
931
- type: string;
932
- config: {
933
- [key: string]: any | undefined;
934
- };
935
- }
936
- declare const BackendConfig: MessageFns<BackendConfig>;
937
- interface ProviderConfig {
938
- name: string;
939
- alias: string;
940
- config: {
941
- [key: string]: Binding;
942
- };
943
- /** nested config blocks (default_tags, assume_role, …) */
944
- blocks: Block[];
945
- }
946
- declare const ProviderConfig: MessageFns<ProviderConfig>;
947
- interface GraphLayout {
948
- nodes: {
949
- [key: string]: NodeLayout;
950
- };
951
- groups: {
952
- [key: string]: NodeGroup;
953
- };
954
- }
955
- declare const GraphLayout: MessageFns<GraphLayout>;
956
- interface NodeGroup {
957
- id: string;
958
- label: string;
959
- node_ids: string[];
960
- collapsed: boolean;
961
- }
962
- declare const NodeGroup: MessageFns<NodeGroup>;
963
- interface NodeLayout {
964
- position: Position | undefined;
965
- }
966
- declare const NodeLayout: MessageFns<NodeLayout>;
967
- interface Position {
968
- x: number;
969
- y: number;
970
- }
971
- declare const Position: MessageFns<Position>;
972
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
973
- type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
974
- [K in keyof T]?: DeepPartial<T[K]>;
975
- } : Partial<T>;
976
- type KeysOfUnion<T> = T extends T ? keyof T : never;
977
- type Exact<P, I extends P> = P extends Builtin ? P : P & {
978
- [K in keyof P]: Exact<P[K], I[K]>;
979
- } & {
980
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
981
- };
982
- interface MessageFns<T> {
983
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
984
- decode(input: BinaryReader | Uint8Array, length?: number): T;
985
- fromJSON(object: any): T;
986
- toJSON(message: T): unknown;
987
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
988
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
989
- }
990
-
991
1028
  type SnapshotMeta = {
992
1029
  moduleName?: string;
993
1030
  canUndo?: boolean;
@@ -1057,6 +1094,7 @@ declare class SnapshotCanvasEngine implements CanvasEngine {
1057
1094
  setProviders(_providers: ProviderConfigDef[]): Promise<ApplyResult>;
1058
1095
  setLocals(_locals: LocalDef[]): Promise<ApplyResult>;
1059
1096
  setDependsOn(_instanceId: string, _dependsOn: string[]): Promise<ApplyResult>;
1097
+ setUseProviders(_instanceId: string, _providers: Record<string, string>): Promise<ApplyResult>;
1060
1098
  setEnvironments(_environments: Record<string, Record<string, unknown>>): Promise<ApplyResult>;
1061
1099
  undo(): Promise<ApplyResult>;
1062
1100
  redo(): Promise<ApplyResult>;
@@ -1111,4 +1149,4 @@ declare const CanvasContext: React.Context<CanvasContextValue>;
1111
1149
  declare function useCanvas(): CanvasContextValue;
1112
1150
  declare function useEngine(): CanvasEngine;
1113
1151
 
1114
- export { AccordionSection, ActionBar, App, type ApplyResult, CanvasContext, type CanvasContextValue, type CanvasEngine, type CanvasState, ConnectWebEngine, ContextMenu, EdgeInspectorPanel, type EngineEvent, type EngineEventListener, EnvironmentsContent, EnvironmentsPanel, ErrorBoundary, ErrorState, type ExternalPin, type GenerateResult, type GraphSummary, GroupNode, type GroupNodeData, type HostBridge, type InputUpdate, type LocalDef, LocalsContent, LocalsPanel, type ModuleAuthor, ModuleConfigPanel, type ModuleMetadata, ModuleNode, type ModuleNodeData, type OutputDefEntry, type OutputExportDef, type PolicyConditionTrace, type PolicyPredicateTrace, type PolicyResolution, PolicySidebar, PostMessageEngine, type PreviewDelta, type ProviderConfigDef, type ProviderDef, ProvidersContent, ProvidersPanel, SlidePanel, SnapshotCanvasEngine, type SnapshotCanvasEngineInput, type SnapshotInProcess, type SnapshotMeta, type SnapshotUrls, TerraformConfigContent, TerraformConfigPanel, UnifiedSettingsPanel, ValidationErrorBanner, type VariableDef, useCanvas, useEngine };
1152
+ export { AccordionSection, ActionBar, App, type ApplyResult, CanvasContext, type CanvasContextValue, type CanvasEngine, type CanvasState, ConnectWebEngine, ContextMenu, EdgeInspectorPanel, type EngineEvent, type EngineEventListener, EnvironmentsContent, EnvironmentsPanel, ErrorBoundary, ErrorState, type ExternalPin, type GenerateResult, type GraphSummary, GroupNode, type GroupNodeData, type HostBridge, type InputUpdate, type LocalDef, LocalsContent, LocalsPanel, type ModuleAuthor, ModuleConfigPanel, ModuleInterfaceContent, ModuleInterfacePanel, type ModuleMetadata, ModuleNode, type ModuleNodeData, type OutputDefEntry, type OutputExportDef, type PolicyConditionTrace, type PolicyPredicateTrace, type PolicyResolution, PolicySidebar, PostMessageEngine, type PreviewDelta, type ProviderConfigDef, type ProviderDef, ProvidersContent, ProvidersPanel, SlidePanel, SnapshotCanvasEngine, type SnapshotCanvasEngineInput, type SnapshotInProcess, type SnapshotMeta, type SnapshotUrls, TerraformConfigContent, TerraformConfigPanel, UnifiedSettingsPanel, ValidationErrorBanner, type VariableDef, useCanvas, useEngine };