@lace-cloud/canvas 0.13.0 → 0.14.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.mjs CHANGED
@@ -220,6 +220,41 @@ function ContextMenu({
220
220
  ] });
221
221
  }
222
222
 
223
+ // src/components/ErrorBoundary.tsx
224
+ import React from "react";
225
+ import "./ErrorBoundary-IXSIVZFH.css";
226
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
227
+ function ErrorState({ message }) {
228
+ return /* @__PURE__ */ jsxs3("div", { className: "lace-error-state", role: "alert", children: [
229
+ /* @__PURE__ */ jsx3("h3", { className: "lace-error-state__title", children: "Something went wrong" }),
230
+ /* @__PURE__ */ jsx3("pre", { className: "lace-error-state__message", children: message }),
231
+ /* @__PURE__ */ jsx3(
232
+ "button",
233
+ {
234
+ type: "button",
235
+ className: "lace-error-state__reload",
236
+ onClick: () => window.location.reload(),
237
+ children: "Reload"
238
+ }
239
+ )
240
+ ] });
241
+ }
242
+ var ErrorBoundary = class extends React.Component {
243
+ constructor() {
244
+ super(...arguments);
245
+ this.state = { error: null };
246
+ }
247
+ static getDerivedStateFromError(error) {
248
+ return { error };
249
+ }
250
+ render() {
251
+ if (this.state.error) {
252
+ return /* @__PURE__ */ jsx3(ErrorState, { message: this.state.error.message });
253
+ }
254
+ return this.props.children;
255
+ }
256
+ };
257
+
223
258
  // src/components/nodes/GroupNode.tsx
224
259
  import { Handle, Position } from "@xyflow/react";
225
260
  import { useCallback, useEffect, useRef, useState } from "react";
@@ -232,7 +267,8 @@ var CanvasContext = createContext({
232
267
  loading: true,
233
268
  generation: 0,
234
269
  viewportIntent: null,
235
- viewportIntentSeq: 0
270
+ viewportIntentSeq: 0,
271
+ loadError: null
236
272
  },
237
273
  engine: null,
238
274
  readOnly: false,
@@ -251,7 +287,7 @@ function useEngine() {
251
287
 
252
288
  // src/components/nodes/GroupNode.tsx
253
289
  import "./GroupNode-EY63N53G.css";
254
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
290
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
255
291
  var HEADER_HEIGHT = 32;
256
292
  var ROW_HEIGHT = 22;
257
293
  var COLLAPSED_WIDTH = 220;
@@ -271,13 +307,13 @@ var GroupHeader = ({
271
307
  onEditChange,
272
308
  onEditBlur,
273
309
  onEditKeyDown
274
- }) => /* @__PURE__ */ jsxs3(
310
+ }) => /* @__PURE__ */ jsxs4(
275
311
  "div",
276
312
  {
277
313
  className: `lace-group-node__header lace-group-node__header--${collapsed ? "collapsed" : "expanded"}`,
278
314
  style: { height: HEADER_HEIGHT },
279
315
  children: [
280
- /* @__PURE__ */ jsx3(
316
+ /* @__PURE__ */ jsx4(
281
317
  "button",
282
318
  {
283
319
  type: "button",
@@ -285,10 +321,10 @@ var GroupHeader = ({
285
321
  className: "lace-group-node__collapse-btn",
286
322
  title: collapsed ? "Expand" : "Collapse",
287
323
  "aria-label": collapsed ? "Expand" : "Collapse",
288
- children: /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "10", height: "10", "aria-hidden": "true", children: collapsed ? /* @__PURE__ */ jsx3("path", { d: "M8 5l8 7-8 7V5z" }) : /* @__PURE__ */ jsx3("path", { d: "M5 8l7 8 7-8H5z" }) })
324
+ children: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "10", height: "10", "aria-hidden": "true", children: collapsed ? /* @__PURE__ */ jsx4("path", { d: "M8 5l8 7-8 7V5z" }) : /* @__PURE__ */ jsx4("path", { d: "M5 8l7 8 7-8H5z" }) })
289
325
  }
290
326
  ),
291
- editing ? /* @__PURE__ */ jsx3(
327
+ editing ? /* @__PURE__ */ jsx4(
292
328
  "input",
293
329
  {
294
330
  ref: inputRef,
@@ -299,9 +335,9 @@ var GroupHeader = ({
299
335
  className: "lace-group-node__rename-input",
300
336
  onClick: (e) => e.stopPropagation()
301
337
  }
302
- ) : /* @__PURE__ */ jsx3("span", { className: "lace-group-node__label", onDoubleClick, title: label, children: label }),
303
- /* @__PURE__ */ jsx3("span", { className: "lace-group-node__count", children: collapsed ? `${memberCount} nodes` : memberCount }),
304
- hovered && /* @__PURE__ */ jsx3(
338
+ ) : /* @__PURE__ */ jsx4("span", { className: "lace-group-node__label", onDoubleClick, title: label, children: label }),
339
+ /* @__PURE__ */ jsx4("span", { className: "lace-group-node__count", children: collapsed ? `${memberCount} nodes` : memberCount }),
340
+ hovered && /* @__PURE__ */ jsx4(
305
341
  "button",
306
342
  {
307
343
  type: "button",
@@ -309,7 +345,7 @@ var GroupHeader = ({
309
345
  className: "lace-group-node__ungroup-btn",
310
346
  title: "Ungroup",
311
347
  "aria-label": "Ungroup",
312
- children: /* @__PURE__ */ jsx3(
348
+ children: /* @__PURE__ */ jsx4(
313
349
  "svg",
314
350
  {
315
351
  viewBox: "0 0 24 24",
@@ -319,7 +355,7 @@ var GroupHeader = ({
319
355
  width: "8",
320
356
  height: "8",
321
357
  "aria-hidden": "true",
322
- children: /* @__PURE__ */ jsx3("path", { d: "M18 6L6 18M6 6l12 12" })
358
+ children: /* @__PURE__ */ jsx4("path", { d: "M18 6L6 18M6 6l12 12" })
323
359
  }
324
360
  )
325
361
  }
@@ -329,7 +365,7 @@ var GroupHeader = ({
329
365
  );
330
366
  var AggregatedPinRow = ({ pin, top }) => {
331
367
  const isInput = pin.side === "input";
332
- return /* @__PURE__ */ jsxs3(
368
+ return /* @__PURE__ */ jsxs4(
333
369
  "div",
334
370
  {
335
371
  style: {
@@ -346,7 +382,7 @@ var AggregatedPinRow = ({ pin, top }) => {
346
382
  },
347
383
  title: pin.label,
348
384
  children: [
349
- /* @__PURE__ */ jsx3(
385
+ /* @__PURE__ */ jsx4(
350
386
  Handle,
351
387
  {
352
388
  id: pin.handleId,
@@ -366,7 +402,7 @@ var AggregatedPinRow = ({ pin, top }) => {
366
402
  }
367
403
  }
368
404
  ),
369
- /* @__PURE__ */ jsx3("span", { className: "lace-group-node__pin-label", style: { maxWidth: COLLAPSED_WIDTH - 28 }, children: pin.label })
405
+ /* @__PURE__ */ jsx4("span", { className: "lace-group-node__pin-label", style: { maxWidth: COLLAPSED_WIDTH - 28 }, children: pin.label })
370
406
  ]
371
407
  }
372
408
  );
@@ -459,7 +495,7 @@ var GroupNode = ({ data }) => {
459
495
  const outputPins = data.externalPins.filter((p) => p.side === "output");
460
496
  const rowCount = Math.max(inputPins.length, outputPins.length);
461
497
  const bodyHeight = rowCount * ROW_HEIGHT;
462
- return /* @__PURE__ */ jsxs3(
498
+ return /* @__PURE__ */ jsxs4(
463
499
  "div",
464
500
  {
465
501
  "data-group": data.groupId,
@@ -469,16 +505,16 @@ var GroupNode = ({ data }) => {
469
505
  onMouseEnter: () => setHovered(true),
470
506
  onMouseLeave: () => setHovered(false),
471
507
  children: [
472
- /* @__PURE__ */ jsx3(GroupHeader, { ...headerProps }),
473
- rowCount > 0 && /* @__PURE__ */ jsxs3("div", { style: { position: "relative", height: bodyHeight }, children: [
474
- inputPins.map((pin, i) => /* @__PURE__ */ jsx3(AggregatedPinRow, { pin, top: i * ROW_HEIGHT }, pin.handleId)),
475
- outputPins.map((pin, i) => /* @__PURE__ */ jsx3(AggregatedPinRow, { pin, top: i * ROW_HEIGHT }, pin.handleId))
508
+ /* @__PURE__ */ jsx4(GroupHeader, { ...headerProps }),
509
+ rowCount > 0 && /* @__PURE__ */ jsxs4("div", { style: { position: "relative", height: bodyHeight }, children: [
510
+ inputPins.map((pin, i) => /* @__PURE__ */ jsx4(AggregatedPinRow, { pin, top: i * ROW_HEIGHT }, pin.handleId)),
511
+ outputPins.map((pin, i) => /* @__PURE__ */ jsx4(AggregatedPinRow, { pin, top: i * ROW_HEIGHT }, pin.handleId))
476
512
  ] })
477
513
  ]
478
514
  }
479
515
  );
480
516
  }
481
- return /* @__PURE__ */ jsx3(
517
+ return /* @__PURE__ */ jsx4(
482
518
  "div",
483
519
  {
484
520
  "data-group": data.groupId,
@@ -492,7 +528,7 @@ var GroupNode = ({ data }) => {
492
528
  },
493
529
  onMouseEnter: () => setHovered(true),
494
530
  onMouseLeave: () => setHovered(false),
495
- children: /* @__PURE__ */ jsx3(GroupHeader, { ...headerProps })
531
+ children: /* @__PURE__ */ jsx4(GroupHeader, { ...headerProps })
496
532
  }
497
533
  );
498
534
  };
@@ -570,13 +606,13 @@ function pinColor(pin) {
570
606
  }
571
607
 
572
608
  // src/components/nodes/ModuleNode.tsx
573
- import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
609
+ import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
574
610
  var NODE_WIDTH = 200;
575
611
  var HEADER_HEIGHT2 = 28;
576
612
  var ROW_HEIGHT2 = 22;
577
613
  var ICON_SIZE = 18;
578
614
  function BrokenIcon() {
579
- return /* @__PURE__ */ jsxs4(
615
+ return /* @__PURE__ */ jsxs5(
580
616
  "svg",
581
617
  {
582
618
  width: ICON_SIZE,
@@ -589,9 +625,9 @@ function BrokenIcon() {
589
625
  strokeLinejoin: "round",
590
626
  "aria-hidden": "true",
591
627
  children: [
592
- /* @__PURE__ */ jsx4("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
593
- /* @__PURE__ */ jsx4("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
594
- /* @__PURE__ */ jsx4("polyline", { points: "21 15 16 10 5 21" })
628
+ /* @__PURE__ */ jsx5("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
629
+ /* @__PURE__ */ jsx5("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
630
+ /* @__PURE__ */ jsx5("polyline", { points: "21 15 16 10 5 21" })
595
631
  ]
596
632
  }
597
633
  );
@@ -609,7 +645,7 @@ var PinRow = ({ pin, side, top, isError }) => {
609
645
  [isInput ? "left" : "right"]: -5,
610
646
  top: ROW_HEIGHT2 / 2
611
647
  };
612
- return /* @__PURE__ */ jsxs4(
648
+ return /* @__PURE__ */ jsxs5(
613
649
  "div",
614
650
  {
615
651
  className: "lace-pin-row",
@@ -627,7 +663,7 @@ var PinRow = ({ pin, side, top, isError }) => {
627
663
  },
628
664
  title: `${pin.name}: ${pin.type}${pin.description ? ` \u2014 ${pin.description}` : ""}`,
629
665
  children: [
630
- /* @__PURE__ */ jsx4(
666
+ /* @__PURE__ */ jsx5(
631
667
  Handle2,
632
668
  {
633
669
  id: `${isInput ? "in" : "out"}:${pin.name}`,
@@ -637,7 +673,7 @@ var PinRow = ({ pin, side, top, isError }) => {
637
673
  style: handleStyle
638
674
  }
639
675
  ),
640
- /* @__PURE__ */ jsx4(
676
+ /* @__PURE__ */ jsx5(
641
677
  "span",
642
678
  {
643
679
  className: `lace-module-node__pin-row-label lace-module-node__pin-row-label--${isError ? "error" : "default"}`,
@@ -746,7 +782,7 @@ var ModuleNode = ({ id, data }) => {
746
782
  const bodyHeight = rowCount * ROW_HEIGHT2;
747
783
  const nodeHeight = HEADER_HEIGHT2 + bodyHeight;
748
784
  const stateClass = hasAnyError ? "lace-module-node--error" : isNew ? "lace-module-node--new" : "";
749
- return /* @__PURE__ */ jsxs4(
785
+ return /* @__PURE__ */ jsxs5(
750
786
  "div",
751
787
  {
752
788
  className: `lace-module-node${collapsed ? " lace-module-node--collapsed" : ""}${stateClass ? ` ${stateClass}` : ""}`,
@@ -754,7 +790,7 @@ var ModuleNode = ({ id, data }) => {
754
790
  onMouseEnter: () => setHovered(true),
755
791
  onMouseLeave: () => setHovered(false),
756
792
  children: [
757
- /* @__PURE__ */ jsxs4(
793
+ /* @__PURE__ */ jsxs5(
758
794
  "div",
759
795
  {
760
796
  className: "lace-module-node__header",
@@ -762,7 +798,7 @@ var ModuleNode = ({ id, data }) => {
762
798
  onClick: onHeaderClick,
763
799
  title: hasAnyError ? data.error_messages?.join("\n") : data.label,
764
800
  children: [
765
- /* @__PURE__ */ jsx4(
801
+ /* @__PURE__ */ jsx5(
766
802
  "button",
767
803
  {
768
804
  type: "button",
@@ -770,10 +806,10 @@ var ModuleNode = ({ id, data }) => {
770
806
  className: "lace-module-node__collapse-btn",
771
807
  title: collapsed ? "Expand" : "Collapse",
772
808
  "aria-label": collapsed ? "Expand" : "Collapse",
773
- children: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "10", height: "10", "aria-hidden": "true", children: collapsed ? /* @__PURE__ */ jsx4("path", { d: "M8 5l8 7-8 7V5z" }) : /* @__PURE__ */ jsx4("path", { d: "M5 8l7 8 7-8H5z" }) })
809
+ children: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "10", height: "10", "aria-hidden": "true", children: collapsed ? /* @__PURE__ */ jsx5("path", { d: "M8 5l8 7-8 7V5z" }) : /* @__PURE__ */ jsx5("path", { d: "M5 8l7 8 7-8H5z" }) })
774
810
  }
775
811
  ),
776
- showIcon ? /* @__PURE__ */ jsx4(
812
+ showIcon ? /* @__PURE__ */ jsx5(
777
813
  "img",
778
814
  {
779
815
  src: data.icon_url,
@@ -782,8 +818,8 @@ var ModuleNode = ({ id, data }) => {
782
818
  style: { width: ICON_SIZE, height: ICON_SIZE },
783
819
  onError: () => setImgFailed(true)
784
820
  }
785
- ) : /* @__PURE__ */ jsx4("div", { className: "lace-module-node__icon-fallback", children: /* @__PURE__ */ jsx4(BrokenIcon, {}) }),
786
- editing ? /* @__PURE__ */ jsx4(
821
+ ) : /* @__PURE__ */ jsx5("div", { className: "lace-module-node__icon-fallback", children: /* @__PURE__ */ jsx5(BrokenIcon, {}) }),
822
+ editing ? /* @__PURE__ */ jsx5(
787
823
  "input",
788
824
  {
789
825
  ref: inputRef,
@@ -794,7 +830,7 @@ var ModuleNode = ({ id, data }) => {
794
830
  className: "lace-module-node__rename-input",
795
831
  onClick: (e) => e.stopPropagation()
796
832
  }
797
- ) : /* @__PURE__ */ jsx4(
833
+ ) : /* @__PURE__ */ jsx5(
798
834
  "span",
799
835
  {
800
836
  className: "lace-module-node__label",
@@ -803,7 +839,7 @@ var ModuleNode = ({ id, data }) => {
803
839
  children: data.label
804
840
  }
805
841
  ),
806
- hovered && !readOnly && /* @__PURE__ */ jsx4(
842
+ hovered && !readOnly && /* @__PURE__ */ jsx5(
807
843
  "button",
808
844
  {
809
845
  type: "button",
@@ -811,16 +847,16 @@ var ModuleNode = ({ id, data }) => {
811
847
  className: "lace-module-node__delete-btn",
812
848
  title: "Delete instance",
813
849
  "aria-label": "Delete instance",
814
- children: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", "aria-hidden": "true", children: /* @__PURE__ */ jsx4("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" }) })
850
+ children: /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", "aria-hidden": "true", children: /* @__PURE__ */ jsx5("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" }) })
815
851
  }
816
852
  )
817
853
  ]
818
854
  }
819
855
  ),
820
- !collapsed && /* @__PURE__ */ jsxs4("div", { className: "lace-module-node__body", style: { height: bodyHeight }, children: [
856
+ !collapsed && /* @__PURE__ */ jsxs5("div", { className: "lace-module-node__body", style: { height: bodyHeight }, children: [
821
857
  visibleInputs.map((pin, i) => {
822
858
  const errored = !!pin.required && !pin.wired;
823
- return /* @__PURE__ */ jsx4(
859
+ return /* @__PURE__ */ jsx5(
824
860
  PinRow,
825
861
  {
826
862
  pin,
@@ -831,8 +867,8 @@ var ModuleNode = ({ id, data }) => {
831
867
  `in:${pin.name}`
832
868
  );
833
869
  }),
834
- outputs.map((pin, i) => /* @__PURE__ */ jsx4(PinRow, { pin, side: "output", top: i * ROW_HEIGHT2 }, `out:${pin.name}`)),
835
- hiddenInputCount > 0 && /* @__PURE__ */ jsxs4(
870
+ outputs.map((pin, i) => /* @__PURE__ */ jsx5(PinRow, { pin, side: "output", top: i * ROW_HEIGHT2 }, `out:${pin.name}`)),
871
+ hiddenInputCount > 0 && /* @__PURE__ */ jsxs5(
836
872
  "div",
837
873
  {
838
874
  className: "lace-module-node__hidden-count",
@@ -858,10 +894,10 @@ var ModuleNode = ({ id, data }) => {
858
894
  }
859
895
  )
860
896
  ] }),
861
- collapsed && /* @__PURE__ */ jsxs4(Fragment3, { children: [
897
+ collapsed && /* @__PURE__ */ jsxs5(Fragment3, { children: [
862
898
  inputs.map((pin, i) => {
863
899
  const color = pinColor(pin);
864
- return /* @__PURE__ */ jsx4(
900
+ return /* @__PURE__ */ jsx5(
865
901
  Handle2,
866
902
  {
867
903
  id: `in:${pin.name}`,
@@ -884,7 +920,7 @@ var ModuleNode = ({ id, data }) => {
884
920
  }),
885
921
  outputs.map((pin, i) => {
886
922
  const color = pinColor(pin);
887
- return /* @__PURE__ */ jsx4(
923
+ return /* @__PURE__ */ jsx5(
888
924
  Handle2,
889
925
  {
890
926
  id: `out:${pin.name}`,
@@ -915,7 +951,7 @@ var ModuleNode_default = ModuleNode;
915
951
  // src/components/panels/EdgeInspectorPanel.tsx
916
952
  import { Panel as Panel2 } from "@lace-cloud/ui";
917
953
  import "./EdgeInspectorPanel-D536U5MZ.css";
918
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
954
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
919
955
  function EdgeInspectorPanel({
920
956
  source,
921
957
  target,
@@ -925,27 +961,27 @@ function EdgeInspectorPanel({
925
961
  onClose
926
962
  }) {
927
963
  const { readOnly } = useCanvas();
928
- const title = /* @__PURE__ */ jsxs5("div", { children: [
929
- /* @__PURE__ */ jsx5("div", { className: "lace-edge-panel__title-eyebrow", children: "Connection" }),
930
- /* @__PURE__ */ jsxs5("div", { className: "lace-edge-panel__title", children: [
964
+ const title = /* @__PURE__ */ jsxs6("div", { children: [
965
+ /* @__PURE__ */ jsx6("div", { className: "lace-edge-panel__title-eyebrow", children: "Connection" }),
966
+ /* @__PURE__ */ jsxs6("div", { className: "lace-edge-panel__title", children: [
931
967
  source,
932
968
  " \u2192 ",
933
969
  target
934
970
  ] })
935
971
  ] });
936
- const footer = readOnly ? void 0 : /* @__PURE__ */ jsx5("button", { type: "button", className: "lace-edge-panel__delete-btn", onClick: onDelete, children: "Delete connection" });
937
- return /* @__PURE__ */ jsxs5(Panel2, { title, width: 380, footer, onClose, children: [
938
- /* @__PURE__ */ jsx5("div", { className: "lace-edge-panel__section-label", children: "Wiring" }),
939
- /* @__PURE__ */ jsxs5("div", { className: "lace-edge-panel__wiring", children: [
972
+ const footer = readOnly ? void 0 : /* @__PURE__ */ jsx6("button", { type: "button", className: "lace-edge-panel__delete-btn", onClick: onDelete, children: "Delete connection" });
973
+ return /* @__PURE__ */ jsxs6(Panel2, { title, width: 380, footer, onClose, children: [
974
+ /* @__PURE__ */ jsx6("div", { className: "lace-edge-panel__section-label", children: "Wiring" }),
975
+ /* @__PURE__ */ jsxs6("div", { className: "lace-edge-panel__wiring", children: [
940
976
  source,
941
977
  ".outputs.",
942
978
  sourceOutput,
943
- /* @__PURE__ */ jsx5("div", { className: "lace-edge-panel__wiring-arrow", children: "\u2193" }),
979
+ /* @__PURE__ */ jsx6("div", { className: "lace-edge-panel__wiring-arrow", children: "\u2193" }),
944
980
  target,
945
981
  ".inputs.",
946
982
  targetInput
947
983
  ] }),
948
- !readOnly && /* @__PURE__ */ jsx5("div", { className: "lace-edge-panel__hint", children: "Delete or press Backspace with the edge selected to remove this connection. Create new edges by dragging between the pins on each node's edge." })
984
+ !readOnly && /* @__PURE__ */ jsx6("div", { className: "lace-edge-panel__hint", children: "Delete or press Backspace with the edge selected to remove this connection. Create new edges by dragging between the pins on each node's edge." })
949
985
  ] });
950
986
  }
951
987
 
@@ -961,11 +997,11 @@ function assertNever(value) {
961
997
  // src/components/AccordionSection.tsx
962
998
  import { useState as useState3 } from "react";
963
999
  import "./AccordionSection-RPWRZINZ.css";
964
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1000
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
965
1001
  function AccordionSection({ title, defaultOpen = false, badge, children }) {
966
1002
  const [open, setOpen] = useState3(defaultOpen);
967
- return /* @__PURE__ */ jsxs6("div", { className: `lace-accordion${open ? " lace-accordion--open" : ""}`, children: [
968
- /* @__PURE__ */ jsxs6(
1003
+ return /* @__PURE__ */ jsxs7("div", { className: `lace-accordion${open ? " lace-accordion--open" : ""}`, children: [
1004
+ /* @__PURE__ */ jsxs7(
969
1005
  "button",
970
1006
  {
971
1007
  type: "button",
@@ -973,20 +1009,20 @@ function AccordionSection({ title, defaultOpen = false, badge, children }) {
973
1009
  onClick: () => setOpen((v) => !v),
974
1010
  "aria-expanded": open,
975
1011
  children: [
976
- /* @__PURE__ */ jsx6("svg", { className: "lace-accordion__chevron", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx6("path", { d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z" }) }),
977
- /* @__PURE__ */ jsx6("span", { className: "lace-accordion__title", children: title }),
978
- badge && /* @__PURE__ */ jsx6("span", { className: "lace-accordion__badge", children: badge })
1012
+ /* @__PURE__ */ jsx7("svg", { className: "lace-accordion__chevron", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx7("path", { d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z" }) }),
1013
+ /* @__PURE__ */ jsx7("span", { className: "lace-accordion__title", children: title }),
1014
+ badge && /* @__PURE__ */ jsx7("span", { className: "lace-accordion__badge", children: badge })
979
1015
  ]
980
1016
  }
981
1017
  ),
982
- /* @__PURE__ */ jsx6("div", { className: "lace-accordion__body", children: /* @__PURE__ */ jsx6("div", { className: "lace-accordion__body-inner", children: /* @__PURE__ */ jsx6("div", { className: "lace-accordion__body-content", children }) }) })
1018
+ /* @__PURE__ */ jsx7("div", { className: "lace-accordion__body", children: /* @__PURE__ */ jsx7("div", { className: "lace-accordion__body-inner", children: /* @__PURE__ */ jsx7("div", { className: "lace-accordion__body-content", children }) }) })
983
1019
  ] });
984
1020
  }
985
1021
 
986
1022
  // src/components/panels/ModuleConfigPanel.tsx
987
1023
  import "./ModuleConfigPanel-LZRL4F3Q.css";
988
1024
  import "./panels-shared-LLLB7PR4.css";
989
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1025
+ import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
990
1026
  var MODE_ITEMS = [
991
1027
  { value: "literal", label: "Lit" },
992
1028
  { value: "variable", label: "Var" },
@@ -1154,7 +1190,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1154
1190
  ...m,
1155
1191
  disabled: readOnly || m.value === "wired" || isWired
1156
1192
  }));
1157
- return /* @__PURE__ */ jsx7(
1193
+ return /* @__PURE__ */ jsx8(
1158
1194
  ModeToggle,
1159
1195
  {
1160
1196
  value: currentMode,
@@ -1166,27 +1202,27 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1166
1202
  }
1167
1203
  function renderInputField(input) {
1168
1204
  const currentMode = localModes[input.name] ?? input.mode;
1169
- return /* @__PURE__ */ jsxs7("div", { className: "lace-panel-field", children: [
1170
- /* @__PURE__ */ jsxs7("label", { className: "lace-panel-row-label", children: [
1205
+ return /* @__PURE__ */ jsxs8("div", { className: "lace-panel-field", children: [
1206
+ /* @__PURE__ */ jsxs8("label", { className: "lace-panel-row-label", children: [
1171
1207
  input.name,
1172
- input.required && /* @__PURE__ */ jsx7("span", { className: "lace-mcp__required-star", children: "*" })
1208
+ input.required && /* @__PURE__ */ jsx8("span", { className: "lace-mcp__required-star", children: "*" })
1173
1209
  ] }),
1174
1210
  renderModeSelector(input),
1175
- /* @__PURE__ */ jsxs7("div", { className: "lace-panel-row-content", children: [
1211
+ /* @__PURE__ */ jsxs8("div", { className: "lace-panel-row-content", children: [
1176
1212
  currentMode === "wired" && renderWiredEditor(input),
1177
1213
  currentMode === "variable" && renderVariableEditor(input),
1178
1214
  currentMode === "expression" && renderExpressionEditor(input),
1179
1215
  currentMode === "literal" && renderLiteralEditor(input)
1180
1216
  ] }),
1181
- input.description && /* @__PURE__ */ jsx7("div", { className: "lace-panel-field__description", children: input.description })
1217
+ input.description && /* @__PURE__ */ jsx8("div", { className: "lace-panel-field__description", children: input.description })
1182
1218
  ] }, input.name);
1183
1219
  }
1184
1220
  function renderWiredEditor(input) {
1185
1221
  const label = input.wired_source ?? "Not wired";
1186
- return /* @__PURE__ */ jsxs7("div", { className: "lace-mcp__wired-row", children: [
1187
- /* @__PURE__ */ jsx7("div", { className: "lace-mcp__wired-input", children: /* @__PURE__ */ jsx7(Input, { value: label, readOnly: true, fullWidth: true, mono: true }) }),
1188
- /* @__PURE__ */ jsx7(Badge, { variant: "info", size: "md", children: "Wired" }),
1189
- !readOnly && /* @__PURE__ */ jsx7(
1222
+ return /* @__PURE__ */ jsxs8("div", { className: "lace-mcp__wired-row", children: [
1223
+ /* @__PURE__ */ jsx8("div", { className: "lace-mcp__wired-input", children: /* @__PURE__ */ jsx8(Input, { value: label, readOnly: true, fullWidth: true, mono: true }) }),
1224
+ /* @__PURE__ */ jsx8(Badge, { variant: "info", size: "md", children: "Wired" }),
1225
+ !readOnly && /* @__PURE__ */ jsx8(
1190
1226
  Button,
1191
1227
  {
1192
1228
  variant: "danger",
@@ -1201,7 +1237,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1201
1237
  }
1202
1238
  function renderVariableEditor(input) {
1203
1239
  const currentVar = localVariables[input.name] ?? input.variable ?? "";
1204
- return /* @__PURE__ */ jsx7(
1240
+ return /* @__PURE__ */ jsx8(
1205
1241
  Input,
1206
1242
  {
1207
1243
  value: currentVar,
@@ -1219,7 +1255,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1219
1255
  }
1220
1256
  function renderExpressionEditor(input) {
1221
1257
  const currentExpr = localExpressions[input.name] ?? input.expression ?? "";
1222
- return /* @__PURE__ */ jsx7(
1258
+ return /* @__PURE__ */ jsx8(
1223
1259
  Textarea,
1224
1260
  {
1225
1261
  value: currentExpr,
@@ -1239,7 +1275,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1239
1275
  setLocalValues((prev) => ({ ...prev, [input.name]: val }));
1240
1276
  };
1241
1277
  if (type === "bool") {
1242
- return /* @__PURE__ */ jsxs7(
1278
+ return /* @__PURE__ */ jsxs8(
1243
1279
  "select",
1244
1280
  {
1245
1281
  className: "lace-mcp__select",
@@ -1247,14 +1283,14 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1247
1283
  onChange: (e) => updateValue(e.target.value === "true"),
1248
1284
  disabled: readOnly,
1249
1285
  children: [
1250
- /* @__PURE__ */ jsx7("option", { value: "true", children: "True" }),
1251
- /* @__PURE__ */ jsx7("option", { value: "false", children: "False" })
1286
+ /* @__PURE__ */ jsx8("option", { value: "true", children: "True" }),
1287
+ /* @__PURE__ */ jsx8("option", { value: "false", children: "False" })
1252
1288
  ]
1253
1289
  }
1254
1290
  );
1255
1291
  }
1256
1292
  if (type === "number") {
1257
- return /* @__PURE__ */ jsx7(
1293
+ return /* @__PURE__ */ jsx8(
1258
1294
  Input,
1259
1295
  {
1260
1296
  type: "number",
@@ -1267,7 +1303,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1267
1303
  }
1268
1304
  if (type.startsWith("list(") || type.startsWith("map(") || type.startsWith("set(") || type === "object" || type.startsWith("object(")) {
1269
1305
  const jsonStr = typeof value === "string" ? value : JSON.stringify(value ?? null, null, 2);
1270
- return /* @__PURE__ */ jsx7(
1306
+ return /* @__PURE__ */ jsx8(
1271
1307
  Textarea,
1272
1308
  {
1273
1309
  value: jsonStr,
@@ -1285,7 +1321,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1285
1321
  }
1286
1322
  );
1287
1323
  }
1288
- return /* @__PURE__ */ jsx7(
1324
+ return /* @__PURE__ */ jsx8(
1289
1325
  Input,
1290
1326
  {
1291
1327
  value: String(value ?? ""),
@@ -1302,38 +1338,38 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1302
1338
  );
1303
1339
  }
1304
1340
  if (error) {
1305
- return /* @__PURE__ */ jsxs7(Panel3, { title: "Error", onClose, children: [
1306
- /* @__PURE__ */ jsxs7("div", { className: "lace-mcp__error-title", children: [
1341
+ return /* @__PURE__ */ jsxs8(Panel3, { title: "Error", onClose, children: [
1342
+ /* @__PURE__ */ jsxs8("div", { className: "lace-mcp__error-title", children: [
1307
1343
  'Failed to load configuration for "',
1308
1344
  instance_id,
1309
1345
  '":'
1310
1346
  ] }),
1311
- /* @__PURE__ */ jsx7("div", { className: "lace-mcp__error-detail", children: error })
1347
+ /* @__PURE__ */ jsx8("div", { className: "lace-mcp__error-detail", children: error })
1312
1348
  ] });
1313
1349
  }
1314
1350
  if (loading || !config) {
1315
- return /* @__PURE__ */ jsx7(Panel3, { title: "Loading...", onClose, children: /* @__PURE__ */ jsx7("div", { className: "lace-panel-hint", children: "Loading configuration..." }) });
1351
+ return /* @__PURE__ */ jsx8(Panel3, { title: "Loading...", onClose, children: /* @__PURE__ */ jsx8("div", { className: "lace-panel-hint", children: "Loading configuration..." }) });
1316
1352
  }
1317
1353
  const dependsOnCount = localDependsOn.size;
1318
- const title = /* @__PURE__ */ jsxs7("div", { className: "lace-mcp__title", children: [
1319
- /* @__PURE__ */ jsx7("div", { className: "lace-mcp__title-eyebrow", children: "Module" }),
1320
- /* @__PURE__ */ jsx7("h3", { className: "lace-mcp__title-id", children: instance_id })
1354
+ const title = /* @__PURE__ */ jsxs8("div", { className: "lace-mcp__title", children: [
1355
+ /* @__PURE__ */ jsx8("div", { className: "lace-mcp__title-eyebrow", children: "Module" }),
1356
+ /* @__PURE__ */ jsx8("h3", { className: "lace-mcp__title-id", children: instance_id })
1321
1357
  ] });
1322
- const footer = readOnly ? void 0 : /* @__PURE__ */ jsx7(Button, { variant: "primary", fullWidth: true, onClick: handleSave, children: "Save configuration" });
1323
- return /* @__PURE__ */ jsxs7(Panel3, { title, footer, scrollable: false, onClose, children: [
1324
- requiredInputs.length > 0 && /* @__PURE__ */ jsx7(AccordionSection, { title: "Required Inputs", defaultOpen: true, badge: `(${requiredInputs.length})`, children: requiredInputs.map(renderInputField) }),
1325
- optionalInputs.length > 0 && /* @__PURE__ */ jsx7(AccordionSection, { title: "Optional Inputs", defaultOpen: true, badge: `(${optionalInputs.length})`, children: optionalInputs.map(renderInputField) }),
1326
- config.sibling_ids.length > 0 && /* @__PURE__ */ jsxs7(
1358
+ const footer = readOnly ? void 0 : /* @__PURE__ */ jsx8(Button, { variant: "primary", fullWidth: true, onClick: handleSave, children: "Save configuration" });
1359
+ return /* @__PURE__ */ jsxs8(Panel3, { title, footer, scrollable: false, onClose, children: [
1360
+ requiredInputs.length > 0 && /* @__PURE__ */ jsx8(AccordionSection, { title: "Required Inputs", defaultOpen: true, badge: `(${requiredInputs.length})`, children: requiredInputs.map(renderInputField) }),
1361
+ optionalInputs.length > 0 && /* @__PURE__ */ jsx8(AccordionSection, { title: "Optional Inputs", defaultOpen: true, badge: `(${optionalInputs.length})`, children: optionalInputs.map(renderInputField) }),
1362
+ config.sibling_ids.length > 0 && /* @__PURE__ */ jsxs8(
1327
1363
  AccordionSection,
1328
1364
  {
1329
1365
  title: "Depends On",
1330
1366
  badge: dependsOnCount > 0 ? `(${dependsOnCount})` : void 0,
1331
1367
  children: [
1332
- /* @__PURE__ */ jsx7("div", { className: "lace-mcp__depends-hint", children: "Select sibling instances this module depends on." }),
1368
+ /* @__PURE__ */ jsx8("div", { className: "lace-mcp__depends-hint", children: "Select sibling instances this module depends on." }),
1333
1369
  config.sibling_ids.map((sibId) => {
1334
1370
  const depKey = `module.${sibId}`;
1335
- return /* @__PURE__ */ jsxs7("label", { className: "lace-mcp__depends-item", children: [
1336
- /* @__PURE__ */ jsx7(
1371
+ return /* @__PURE__ */ jsxs8("label", { className: "lace-mcp__depends-item", children: [
1372
+ /* @__PURE__ */ jsx8(
1337
1373
  "input",
1338
1374
  {
1339
1375
  type: "checkbox",
@@ -1350,30 +1386,30 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1350
1386
  }
1351
1387
  }
1352
1388
  ),
1353
- /* @__PURE__ */ jsx7("span", { className: "lace-mcp__depends-label", children: depKey })
1389
+ /* @__PURE__ */ jsx8("span", { className: "lace-mcp__depends-label", children: depKey })
1354
1390
  ] }, sibId);
1355
1391
  })
1356
1392
  ]
1357
1393
  }
1358
1394
  ),
1359
- (localProviders.length > 0 || !readOnly) && /* @__PURE__ */ jsxs7(
1395
+ (localProviders.length > 0 || !readOnly) && /* @__PURE__ */ jsxs8(
1360
1396
  AccordionSection,
1361
1397
  {
1362
1398
  title: "Providers",
1363
1399
  badge: localProviders.length > 0 ? `(${localProviders.length})` : void 0,
1364
1400
  children: [
1365
- /* @__PURE__ */ jsxs7("div", { className: "lace-mcp__depends-hint", children: [
1401
+ /* @__PURE__ */ jsxs8("div", { className: "lace-mcp__depends-hint", children: [
1366
1402
  "Map each child-local provider name to the root provider reference passed down (e.g.",
1367
1403
  " ",
1368
- /* @__PURE__ */ jsx7("code", { children: "aws" }),
1404
+ /* @__PURE__ */ jsx8("code", { children: "aws" }),
1369
1405
  " \u2192 ",
1370
- /* @__PURE__ */ jsx7("code", { children: "aws.west" }),
1406
+ /* @__PURE__ */ jsx8("code", { children: "aws.west" }),
1371
1407
  ")."
1372
1408
  ] }),
1373
1409
  localProviders.map((row, i) => (
1374
1410
  // biome-ignore lint/suspicious/noArrayIndexKey: rows are positional and freely editable
1375
- /* @__PURE__ */ jsxs7("div", { className: "lace-mcp__provider-row", children: [
1376
- /* @__PURE__ */ jsx7(
1411
+ /* @__PURE__ */ jsxs8("div", { className: "lace-mcp__provider-row", children: [
1412
+ /* @__PURE__ */ jsx8(
1377
1413
  Input,
1378
1414
  {
1379
1415
  value: row.key,
@@ -1385,8 +1421,8 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1385
1421
  readOnly
1386
1422
  }
1387
1423
  ),
1388
- /* @__PURE__ */ jsx7("span", { className: "lace-mcp__provider-arrow", children: "=" }),
1389
- /* @__PURE__ */ jsx7(
1424
+ /* @__PURE__ */ jsx8("span", { className: "lace-mcp__provider-arrow", children: "=" }),
1425
+ /* @__PURE__ */ jsx8(
1390
1426
  Input,
1391
1427
  {
1392
1428
  value: row.value,
@@ -1398,7 +1434,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1398
1434
  readOnly
1399
1435
  }
1400
1436
  ),
1401
- !readOnly && /* @__PURE__ */ jsx7(
1437
+ !readOnly && /* @__PURE__ */ jsx8(
1402
1438
  Button,
1403
1439
  {
1404
1440
  variant: "danger",
@@ -1411,7 +1447,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1411
1447
  )
1412
1448
  ] }, i)
1413
1449
  )),
1414
- !readOnly && /* @__PURE__ */ jsx7(
1450
+ !readOnly && /* @__PURE__ */ jsx8(
1415
1451
  Button,
1416
1452
  {
1417
1453
  variant: "secondary",
@@ -1423,13 +1459,13 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1423
1459
  ]
1424
1460
  }
1425
1461
  ),
1426
- config.outputs.length > 0 && /* @__PURE__ */ jsx7(AccordionSection, { title: "Outputs", badge: `(${config.outputs.length})`, children: config.outputs.map((o) => /* @__PURE__ */ jsxs7("div", { className: "lace-mcp__output-card", children: [
1427
- /* @__PURE__ */ jsxs7("div", { className: "lace-mcp__output-header", children: [
1428
- /* @__PURE__ */ jsx7("strong", { className: "lace-mcp__output-name", children: o.name }),
1429
- /* @__PURE__ */ jsx7("span", { className: "lace-mcp__output-type", children: o.type ?? "" })
1462
+ config.outputs.length > 0 && /* @__PURE__ */ jsx8(AccordionSection, { title: "Outputs", badge: `(${config.outputs.length})`, children: config.outputs.map((o) => /* @__PURE__ */ jsxs8("div", { className: "lace-mcp__output-card", children: [
1463
+ /* @__PURE__ */ jsxs8("div", { className: "lace-mcp__output-header", children: [
1464
+ /* @__PURE__ */ jsx8("strong", { className: "lace-mcp__output-name", children: o.name }),
1465
+ /* @__PURE__ */ jsx8("span", { className: "lace-mcp__output-type", children: o.type ?? "" })
1430
1466
  ] }),
1431
- o.description && /* @__PURE__ */ jsx7("div", { className: "lace-mcp__output-description", children: o.description }),
1432
- o.sensitive && /* @__PURE__ */ jsx7("div", { className: "lace-mcp__output-sensitive", children: "sensitive" })
1467
+ o.description && /* @__PURE__ */ jsx8("div", { className: "lace-mcp__output-description", children: o.description }),
1468
+ o.sensitive && /* @__PURE__ */ jsx8("div", { className: "lace-mcp__output-sensitive", children: "sensitive" })
1433
1469
  ] }, o.name)) })
1434
1470
  ] });
1435
1471
  }
@@ -1438,7 +1474,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
1438
1474
  import { Panel as Panel4 } from "@lace-cloud/ui";
1439
1475
  import { useEffect as useEffect4, useState as useState5 } from "react";
1440
1476
  import "./panels-shared-LLLB7PR4.css";
1441
- import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1477
+ import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1442
1478
  var NODE_HOVER_EVENT = "lace:canvas:nodeHover";
1443
1479
  var HOVER_DEBOUNCE_MS = 150;
1444
1480
  var MODE_LABELS = {
@@ -1482,12 +1518,12 @@ function PolicySidebar({ resolution, onPreview, onClose, readOnly }) {
1482
1518
  if (controller) controller.abort();
1483
1519
  };
1484
1520
  }, [readOnly, onPreview]);
1485
- return /* @__PURE__ */ jsxs8(
1521
+ return /* @__PURE__ */ jsxs9(
1486
1522
  Panel4,
1487
1523
  {
1488
- title: /* @__PURE__ */ jsxs8("h3", { className: "lace-panel__title", children: [
1524
+ title: /* @__PURE__ */ jsxs9("h3", { className: "lace-panel__title", children: [
1489
1525
  "Policy",
1490
- resolution?.isAuthoringTimePreview ? /* @__PURE__ */ jsx8(
1526
+ resolution?.isAuthoringTimePreview ? /* @__PURE__ */ jsx9(
1491
1527
  "span",
1492
1528
  {
1493
1529
  style: {
@@ -1505,14 +1541,14 @@ function PolicySidebar({ resolution, onPreview, onClose, readOnly }) {
1505
1541
  ] }),
1506
1542
  onClose,
1507
1543
  children: [
1508
- resolution ? /* @__PURE__ */ jsx8(ResolutionView, { resolution }) : /* @__PURE__ */ jsx8("p", { style: { padding: 12, color: "var(--lace-text-muted)" }, children: "Waiting for first evaluation\u2026" }),
1509
- counterfactual ? /* @__PURE__ */ jsxs8("section", { style: { borderTop: "1px solid var(--lace-policy-section-divider)", padding: 12 }, children: [
1510
- /* @__PURE__ */ jsxs8("h4", { style: { margin: "0 0 6px 0", fontSize: 12, color: "var(--lace-text-description)" }, children: [
1544
+ resolution ? /* @__PURE__ */ jsx9(ResolutionView, { resolution }) : /* @__PURE__ */ jsx9("p", { style: { padding: 12, color: "var(--lace-text-muted)" }, children: "Waiting for first evaluation\u2026" }),
1545
+ counterfactual ? /* @__PURE__ */ jsxs9("section", { style: { borderTop: "1px solid var(--lace-policy-section-divider)", padding: 12 }, children: [
1546
+ /* @__PURE__ */ jsxs9("h4", { style: { margin: "0 0 6px 0", fontSize: 12, color: "var(--lace-text-description)" }, children: [
1511
1547
  "If ",
1512
- /* @__PURE__ */ jsx8("code", { children: counterfactual.nodeId }),
1548
+ /* @__PURE__ */ jsx9("code", { children: counterfactual.nodeId }),
1513
1549
  " were removed"
1514
1550
  ] }),
1515
- /* @__PURE__ */ jsx8(ResolutionView, { resolution: counterfactual.resolution, compact: true })
1551
+ /* @__PURE__ */ jsx9(ResolutionView, { resolution: counterfactual.resolution, compact: true })
1516
1552
  ] }) : null
1517
1553
  ]
1518
1554
  }
@@ -1522,8 +1558,8 @@ function ResolutionView({
1522
1558
  resolution,
1523
1559
  compact
1524
1560
  }) {
1525
- return /* @__PURE__ */ jsxs8("div", { style: { padding: compact ? 0 : 12 }, children: [
1526
- /* @__PURE__ */ jsxs8(
1561
+ return /* @__PURE__ */ jsxs9("div", { style: { padding: compact ? 0 : 12 }, children: [
1562
+ /* @__PURE__ */ jsxs9(
1527
1563
  "div",
1528
1564
  {
1529
1565
  style: {
@@ -1537,16 +1573,16 @@ function ResolutionView({
1537
1573
  ]
1538
1574
  }
1539
1575
  ),
1540
- resolution.reason ? /* @__PURE__ */ jsx8("p", { style: { fontSize: 12, color: "var(--lace-text-description)", margin: "0 0 8px 0" }, children: resolution.reason }) : null,
1541
- resolution.rulesFired.length > 0 ? /* @__PURE__ */ jsxs8("div", { style: { fontSize: 12, color: "var(--lace-text-description)", marginBottom: 8 }, children: [
1542
- /* @__PURE__ */ jsx8("span", { style: { color: "var(--lace-text-muted)" }, children: "Rules fired: " }),
1576
+ resolution.reason ? /* @__PURE__ */ jsx9("p", { style: { fontSize: 12, color: "var(--lace-text-description)", margin: "0 0 8px 0" }, children: resolution.reason }) : null,
1577
+ resolution.rulesFired.length > 0 ? /* @__PURE__ */ jsxs9("div", { style: { fontSize: 12, color: "var(--lace-text-description)", marginBottom: 8 }, children: [
1578
+ /* @__PURE__ */ jsx9("span", { style: { color: "var(--lace-text-muted)" }, children: "Rules fired: " }),
1543
1579
  resolution.rulesFired.join(", ")
1544
1580
  ] }) : null,
1545
- resolution.conditionTrace.length > 0 ? /* @__PURE__ */ jsx8("ul", { style: { listStyle: "none", padding: 0, margin: 0 }, children: resolution.conditionTrace.map((trace) => /* @__PURE__ */ jsx8(ConditionTraceRow, { trace }, `${trace.policyId}-${trace.label}`)) }) : null
1581
+ resolution.conditionTrace.length > 0 ? /* @__PURE__ */ jsx9("ul", { style: { listStyle: "none", padding: 0, margin: 0 }, children: resolution.conditionTrace.map((trace) => /* @__PURE__ */ jsx9(ConditionTraceRow, { trace }, `${trace.policyId}-${trace.label}`)) }) : null
1546
1582
  ] });
1547
1583
  }
1548
1584
  function ConditionTraceRow({ trace }) {
1549
- return /* @__PURE__ */ jsxs8(
1585
+ return /* @__PURE__ */ jsxs9(
1550
1586
  "li",
1551
1587
  {
1552
1588
  style: {
@@ -1556,22 +1592,22 @@ function ConditionTraceRow({ trace }) {
1556
1592
  background: trace.fired ? "var(--lace-policy-rule-fired-bg)" : "var(--lace-policy-rule-default-bg)"
1557
1593
  },
1558
1594
  children: [
1559
- /* @__PURE__ */ jsxs8("div", { style: { fontSize: 12, fontWeight: 500 }, children: [
1595
+ /* @__PURE__ */ jsxs9("div", { style: { fontSize: 12, fontWeight: 500 }, children: [
1560
1596
  trace.label || trace.policyId,
1561
1597
  " ",
1562
- /* @__PURE__ */ jsx8("span", { style: { color: "var(--lace-text-muted)", fontWeight: 400 }, children: trace.fired ? "\u2014 fired" : "\u2014 did not fire" })
1598
+ /* @__PURE__ */ jsx9("span", { style: { color: "var(--lace-text-muted)", fontWeight: 400 }, children: trace.fired ? "\u2014 fired" : "\u2014 did not fire" })
1563
1599
  ] }),
1564
- trace.predicates.length > 0 ? /* @__PURE__ */ jsx8("ul", { style: { listStyle: "none", padding: "4px 0 0 0", margin: 0 }, children: trace.predicates.map((p) => /* @__PURE__ */ jsx8(PredicateRow, { predicate: p }, p.predicate)) }) : null
1600
+ trace.predicates.length > 0 ? /* @__PURE__ */ jsx9("ul", { style: { listStyle: "none", padding: "4px 0 0 0", margin: 0 }, children: trace.predicates.map((p) => /* @__PURE__ */ jsx9(PredicateRow, { predicate: p }, p.predicate)) }) : null
1565
1601
  ]
1566
1602
  }
1567
1603
  );
1568
1604
  }
1569
1605
  function PredicateRow({ predicate }) {
1570
1606
  if (predicate.cannotEvaluate) {
1571
- return /* @__PURE__ */ jsxs8("li", { style: { fontSize: 11, color: "var(--lace-text-muted)", fontFamily: "monospace" }, children: [
1607
+ return /* @__PURE__ */ jsxs9("li", { style: { fontSize: 11, color: "var(--lace-text-muted)", fontFamily: "monospace" }, children: [
1572
1608
  predicate.predicate,
1573
1609
  " ",
1574
- /* @__PURE__ */ jsx8(
1610
+ /* @__PURE__ */ jsx9(
1575
1611
  "span",
1576
1612
  {
1577
1613
  style: {
@@ -1585,7 +1621,7 @@ function PredicateRow({ predicate }) {
1585
1621
  )
1586
1622
  ] });
1587
1623
  }
1588
- return /* @__PURE__ */ jsxs8(
1624
+ return /* @__PURE__ */ jsxs9(
1589
1625
  "li",
1590
1626
  {
1591
1627
  style: {
@@ -1597,7 +1633,7 @@ function PredicateRow({ predicate }) {
1597
1633
  predicate.predicate,
1598
1634
  " ",
1599
1635
  predicate.fired ? "\u2713" : "\xB7",
1600
- predicate.evaluated ? /* @__PURE__ */ jsx8(
1636
+ predicate.evaluated ? /* @__PURE__ */ jsx9(
1601
1637
  "span",
1602
1638
  {
1603
1639
  style: {
@@ -1618,7 +1654,7 @@ function PredicateRow({ predicate }) {
1618
1654
  import { Button as Button2, Input as Input2, Panel as Panel5, Spinner } from "@lace-cloud/ui";
1619
1655
  import { useCallback as useCallback4, useEffect as useEffect5, useMemo as useMemo3, useState as useState6 } from "react";
1620
1656
  import "./RegistryBrowser-3G22I4EO.css";
1621
- import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1657
+ import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1622
1658
  function RegistryBrowser({
1623
1659
  registryBaseUrl,
1624
1660
  apiToken,
@@ -1701,8 +1737,8 @@ function RegistryBrowser({
1701
1737
  },
1702
1738
  [engine, onClose, readOnly, showToast]
1703
1739
  );
1704
- return /* @__PURE__ */ jsx9(Panel5, { title: "Registry", width: 380, onClose, scrollable: true, children: /* @__PURE__ */ jsxs9("div", { className: "lace-registry-browser", children: [
1705
- /* @__PURE__ */ jsx9("div", { className: "lace-registry-browser__search", children: /* @__PURE__ */ jsx9(
1740
+ return /* @__PURE__ */ jsx10(Panel5, { title: "Registry", width: 380, onClose, scrollable: true, children: /* @__PURE__ */ jsxs10("div", { className: "lace-registry-browser", children: [
1741
+ /* @__PURE__ */ jsx10("div", { className: "lace-registry-browser__search", children: /* @__PURE__ */ jsx10(
1706
1742
  Input2,
1707
1743
  {
1708
1744
  value: search,
@@ -1711,19 +1747,19 @@ function RegistryBrowser({
1711
1747
  id: "registry-search"
1712
1748
  }
1713
1749
  ) }),
1714
- loading ? /* @__PURE__ */ jsxs9("div", { className: "lace-registry-browser__state", children: [
1715
- /* @__PURE__ */ jsx9(Spinner, {}),
1716
- /* @__PURE__ */ jsx9("span", { children: "Loading registry..." })
1717
- ] }) : error ? /* @__PURE__ */ jsx9("div", { className: "lace-registry-browser__state lace-registry-browser__state--error", children: /* @__PURE__ */ jsx9("span", { children: error }) }) : filtered.length === 0 ? /* @__PURE__ */ jsx9("div", { className: "lace-registry-browser__state lace-registry-browser__state--empty", children: modules.length === 0 ? "No modules found in the registry." : "No modules match your search." }) : /* @__PURE__ */ jsx9("ul", { className: "lace-registry-browser__list", children: filtered.map((mod) => /* @__PURE__ */ jsxs9("li", { className: "lace-registry-browser__item", children: [
1718
- /* @__PURE__ */ jsxs9("div", { className: "lace-registry-browser__item-info", children: [
1719
- /* @__PURE__ */ jsx9("div", { className: "lace-registry-browser__item-name", children: mod.display_name ?? mod.name }),
1720
- /* @__PURE__ */ jsxs9("div", { className: "lace-registry-browser__item-author", children: [
1750
+ loading ? /* @__PURE__ */ jsxs10("div", { className: "lace-registry-browser__state", children: [
1751
+ /* @__PURE__ */ jsx10(Spinner, {}),
1752
+ /* @__PURE__ */ jsx10("span", { children: "Loading registry..." })
1753
+ ] }) : error ? /* @__PURE__ */ jsx10("div", { className: "lace-registry-browser__state lace-registry-browser__state--error", children: /* @__PURE__ */ jsx10("span", { children: error }) }) : filtered.length === 0 ? /* @__PURE__ */ jsx10("div", { className: "lace-registry-browser__state lace-registry-browser__state--empty", children: modules.length === 0 ? "No modules found in the registry." : "No modules match your search." }) : /* @__PURE__ */ jsx10("ul", { className: "lace-registry-browser__list", children: filtered.map((mod) => /* @__PURE__ */ jsxs10("li", { className: "lace-registry-browser__item", children: [
1754
+ /* @__PURE__ */ jsxs10("div", { className: "lace-registry-browser__item-info", children: [
1755
+ /* @__PURE__ */ jsx10("div", { className: "lace-registry-browser__item-name", children: mod.display_name ?? mod.name }),
1756
+ /* @__PURE__ */ jsxs10("div", { className: "lace-registry-browser__item-author", children: [
1721
1757
  "by ",
1722
1758
  mod.author
1723
1759
  ] }),
1724
- mod.description ? /* @__PURE__ */ jsx9("div", { className: "lace-registry-browser__item-desc", children: mod.description }) : null
1760
+ mod.description ? /* @__PURE__ */ jsx10("div", { className: "lace-registry-browser__item-desc", children: mod.description }) : null
1725
1761
  ] }),
1726
- !readOnly ? /* @__PURE__ */ jsx9(
1762
+ !readOnly ? /* @__PURE__ */ jsx10(
1727
1763
  Button2,
1728
1764
  {
1729
1765
  variant: "primary",
@@ -1805,7 +1841,7 @@ function findDuplicateIndices(items, keyFn) {
1805
1841
 
1806
1842
  // src/components/SaveButton.tsx
1807
1843
  import { Button as Button3 } from "@lace-cloud/ui";
1808
- import { jsx as jsx10 } from "react/jsx-runtime";
1844
+ import { jsx as jsx11 } from "react/jsx-runtime";
1809
1845
  var variantByStatus = {
1810
1846
  idle: "primary",
1811
1847
  saving: "primary",
@@ -1818,7 +1854,7 @@ var labelByStatus = {
1818
1854
  error: "Save failed \u2014 try again"
1819
1855
  };
1820
1856
  function SaveButton({ status, label, onClick, disabled, disabledTitle }) {
1821
- return /* @__PURE__ */ jsx10(
1857
+ return /* @__PURE__ */ jsx11(
1822
1858
  Button3,
1823
1859
  {
1824
1860
  variant: variantByStatus[status],
@@ -1834,7 +1870,7 @@ function SaveButton({ status, label, onClick, disabled, disabledTitle }) {
1834
1870
 
1835
1871
  // src/components/panels/EnvironmentsPanel.tsx
1836
1872
  import "./panels-shared-LLLB7PR4.css";
1837
- import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1873
+ import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1838
1874
  function toEnvRows(envs) {
1839
1875
  if (!envs) return [];
1840
1876
  return Object.entries(envs).map(([name, vars]) => ({
@@ -1922,10 +1958,10 @@ function EnvironmentsContent({ environments, readOnly = false, onSave }) {
1922
1958
  await onSave(fromEnvRows(envRows));
1923
1959
  }, [onSave, envRows, hasDuplicates])
1924
1960
  );
1925
- return /* @__PURE__ */ jsxs10(Fragment4, { children: [
1926
- envRows.map((env, ei) => /* @__PURE__ */ jsxs10("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
1927
- /* @__PURE__ */ jsxs10("div", { className: "lace-panel-row-actions", children: [
1928
- /* @__PURE__ */ jsx11(
1961
+ return /* @__PURE__ */ jsxs11(Fragment4, { children: [
1962
+ envRows.map((env, ei) => /* @__PURE__ */ jsxs11("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
1963
+ /* @__PURE__ */ jsxs11("div", { className: "lace-panel-row-actions", children: [
1964
+ /* @__PURE__ */ jsx12(
1929
1965
  Input3,
1930
1966
  {
1931
1967
  value: env.name,
@@ -1936,7 +1972,7 @@ function EnvironmentsContent({ environments, readOnly = false, onSave }) {
1936
1972
  readOnly
1937
1973
  }
1938
1974
  ),
1939
- !readOnly && /* @__PURE__ */ jsx11(
1975
+ !readOnly && /* @__PURE__ */ jsx12(
1940
1976
  "button",
1941
1977
  {
1942
1978
  type: "button",
@@ -1947,10 +1983,10 @@ function EnvironmentsContent({ environments, readOnly = false, onSave }) {
1947
1983
  }
1948
1984
  )
1949
1985
  ] }),
1950
- envNameDupes.has(ei) && /* @__PURE__ */ jsx11("div", { className: "lace-panel-row-error", children: "Duplicate environment name" }),
1951
- /* @__PURE__ */ jsx11("div", { className: "lace-panel-row-sublabel", children: "Variable overrides" }),
1952
- env.vars.map((v, vi) => /* @__PURE__ */ jsxs10("div", { className: "lace-panel-row-actions", children: [
1953
- /* @__PURE__ */ jsx11(
1986
+ envNameDupes.has(ei) && /* @__PURE__ */ jsx12("div", { className: "lace-panel-row-error", children: "Duplicate environment name" }),
1987
+ /* @__PURE__ */ jsx12("div", { className: "lace-panel-row-sublabel", children: "Variable overrides" }),
1988
+ env.vars.map((v, vi) => /* @__PURE__ */ jsxs11("div", { className: "lace-panel-row-actions", children: [
1989
+ /* @__PURE__ */ jsx12(
1954
1990
  Input3,
1955
1991
  {
1956
1992
  value: v.key,
@@ -1962,7 +1998,7 @@ function EnvironmentsContent({ environments, readOnly = false, onSave }) {
1962
1998
  readOnly
1963
1999
  }
1964
2000
  ),
1965
- /* @__PURE__ */ jsx11(
2001
+ /* @__PURE__ */ jsx12(
1966
2002
  Input3,
1967
2003
  {
1968
2004
  value: v.value,
@@ -1972,7 +2008,7 @@ function EnvironmentsContent({ environments, readOnly = false, onSave }) {
1972
2008
  readOnly
1973
2009
  }
1974
2010
  ),
1975
- !readOnly && /* @__PURE__ */ jsx11(
2011
+ !readOnly && /* @__PURE__ */ jsx12(
1976
2012
  "button",
1977
2013
  {
1978
2014
  type: "button",
@@ -1983,7 +2019,7 @@ function EnvironmentsContent({ environments, readOnly = false, onSave }) {
1983
2019
  }
1984
2020
  )
1985
2021
  ] }, v.id)),
1986
- !readOnly && /* @__PURE__ */ jsx11(
2022
+ !readOnly && /* @__PURE__ */ jsx12(
1987
2023
  "button",
1988
2024
  {
1989
2025
  type: "button",
@@ -1993,9 +2029,9 @@ function EnvironmentsContent({ environments, readOnly = false, onSave }) {
1993
2029
  }
1994
2030
  )
1995
2031
  ] }, env.id)),
1996
- !readOnly && /* @__PURE__ */ jsxs10(Fragment4, { children: [
1997
- /* @__PURE__ */ jsx11("button", { type: "button", onClick: addEnv, className: "lace-panel-add-btn", children: "+ Add environment" }),
1998
- /* @__PURE__ */ jsx11(
2032
+ !readOnly && /* @__PURE__ */ jsxs11(Fragment4, { children: [
2033
+ /* @__PURE__ */ jsx12("button", { type: "button", onClick: addEnv, className: "lace-panel-add-btn", children: "+ Add environment" }),
2034
+ /* @__PURE__ */ jsx12(
1999
2035
  SaveButton,
2000
2036
  {
2001
2037
  status: saveStatus,
@@ -2005,19 +2041,19 @@ function EnvironmentsContent({ environments, readOnly = false, onSave }) {
2005
2041
  disabledTitle: "Fix duplicate names before saving"
2006
2042
  }
2007
2043
  ),
2008
- hasDuplicates && /* @__PURE__ */ jsx11("div", { className: "lace-panel-row-error", children: "Fix duplicate environment or variable names before saving." })
2044
+ hasDuplicates && /* @__PURE__ */ jsx12("div", { className: "lace-panel-row-error", children: "Fix duplicate environment or variable names before saving." })
2009
2045
  ] })
2010
2046
  ] });
2011
2047
  }
2012
2048
  function EnvironmentsPanel({ environments, onSave, onClose }) {
2013
- return /* @__PURE__ */ jsx11(Panel6, { title: "Environments", onClose, children: /* @__PURE__ */ jsx11(EnvironmentsContent, { environments, onSave }) });
2049
+ return /* @__PURE__ */ jsx12(Panel6, { title: "Environments", onClose, children: /* @__PURE__ */ jsx12(EnvironmentsContent, { environments, onSave }) });
2014
2050
  }
2015
2051
 
2016
2052
  // src/components/panels/LocalsPanel.tsx
2017
2053
  import { Input as Input4, ModeToggle as ModeToggle2, Panel as Panel7, Textarea as Textarea2 } from "@lace-cloud/ui";
2018
2054
  import { useCallback as useCallback7, useState as useState9 } from "react";
2019
2055
  import "./panels-shared-LLLB7PR4.css";
2020
- import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
2056
+ import { Fragment as Fragment5, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
2021
2057
  function toRows(locals) {
2022
2058
  if (!locals) return [];
2023
2059
  return locals.map((l) => ({
@@ -2070,10 +2106,10 @@ function LocalsContent({ locals, readOnly = false, onSave }) {
2070
2106
  await onSave(fromRows(rows));
2071
2107
  }, [onSave, rows, hasErrors])
2072
2108
  );
2073
- return /* @__PURE__ */ jsxs11(Fragment5, { children: [
2074
- rows.map((row, i) => /* @__PURE__ */ jsxs11("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
2075
- /* @__PURE__ */ jsxs11("div", { className: "lace-panel-row-actions", children: [
2076
- /* @__PURE__ */ jsx12(
2109
+ return /* @__PURE__ */ jsxs12(Fragment5, { children: [
2110
+ rows.map((row, i) => /* @__PURE__ */ jsxs12("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
2111
+ /* @__PURE__ */ jsxs12("div", { className: "lace-panel-row-actions", children: [
2112
+ /* @__PURE__ */ jsx13(
2077
2113
  Input4,
2078
2114
  {
2079
2115
  value: row.name,
@@ -2085,7 +2121,7 @@ function LocalsContent({ locals, readOnly = false, onSave }) {
2085
2121
  readOnly
2086
2122
  }
2087
2123
  ),
2088
- !readOnly && /* @__PURE__ */ jsx12(
2124
+ !readOnly && /* @__PURE__ */ jsx13(
2089
2125
  "button",
2090
2126
  {
2091
2127
  type: "button",
@@ -2096,8 +2132,8 @@ function LocalsContent({ locals, readOnly = false, onSave }) {
2096
2132
  }
2097
2133
  )
2098
2134
  ] }),
2099
- nameDupes.has(i) && /* @__PURE__ */ jsx12("div", { className: "lace-panel-row-error", children: "Duplicate local name" }),
2100
- /* @__PURE__ */ jsx12("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx12(
2135
+ nameDupes.has(i) && /* @__PURE__ */ jsx13("div", { className: "lace-panel-row-error", children: "Duplicate local name" }),
2136
+ /* @__PURE__ */ jsx13("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx13(
2101
2137
  ModeToggle2,
2102
2138
  {
2103
2139
  value: row.mode,
@@ -2106,7 +2142,7 @@ function LocalsContent({ locals, readOnly = false, onSave }) {
2106
2142
  "aria-label": "Local binding mode"
2107
2143
  }
2108
2144
  ) }),
2109
- /* @__PURE__ */ jsx12("div", { className: "lace-panel-row-content", children: row.mode === "literal" ? /* @__PURE__ */ jsx12(
2145
+ /* @__PURE__ */ jsx13("div", { className: "lace-panel-row-content", children: row.mode === "literal" ? /* @__PURE__ */ jsx13(
2110
2146
  Textarea2,
2111
2147
  {
2112
2148
  value: row.litValue,
@@ -2117,7 +2153,7 @@ function LocalsContent({ locals, readOnly = false, onSave }) {
2117
2153
  mono: true,
2118
2154
  readOnly
2119
2155
  }
2120
- ) : /* @__PURE__ */ jsx12(
2156
+ ) : /* @__PURE__ */ jsx13(
2121
2157
  Textarea2,
2122
2158
  {
2123
2159
  value: row.exprValue,
@@ -2130,9 +2166,9 @@ function LocalsContent({ locals, readOnly = false, onSave }) {
2130
2166
  }
2131
2167
  ) })
2132
2168
  ] }, row.id)),
2133
- !readOnly && /* @__PURE__ */ jsxs11(Fragment5, { children: [
2134
- /* @__PURE__ */ jsx12("button", { type: "button", onClick: addLocal, className: "lace-panel-add-btn", children: "+ Add local" }),
2135
- /* @__PURE__ */ jsx12(
2169
+ !readOnly && /* @__PURE__ */ jsxs12(Fragment5, { children: [
2170
+ /* @__PURE__ */ jsx13("button", { type: "button", onClick: addLocal, className: "lace-panel-add-btn", children: "+ Add local" }),
2171
+ /* @__PURE__ */ jsx13(
2136
2172
  SaveButton,
2137
2173
  {
2138
2174
  status: saveStatus,
@@ -2146,14 +2182,14 @@ function LocalsContent({ locals, readOnly = false, onSave }) {
2146
2182
  ] });
2147
2183
  }
2148
2184
  function LocalsPanel({ locals, onSave, onClose }) {
2149
- return /* @__PURE__ */ jsx12(Panel7, { title: "Locals", onClose, children: /* @__PURE__ */ jsx12(LocalsContent, { locals, onSave }) });
2185
+ return /* @__PURE__ */ jsx13(Panel7, { title: "Locals", onClose, children: /* @__PURE__ */ jsx13(LocalsContent, { locals, onSave }) });
2150
2186
  }
2151
2187
 
2152
2188
  // src/components/panels/ModuleInterfacePanel.tsx
2153
2189
  import { Button as Button4, Input as Input5, Panel as Panel8, Textarea as Textarea3 } from "@lace-cloud/ui";
2154
2190
  import { useCallback as useCallback8, useMemo as useMemo4, useState as useState10 } from "react";
2155
2191
  import "./panels-shared-LLLB7PR4.css";
2156
- import { Fragment as Fragment6, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
2192
+ import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
2157
2193
  function variablesToRows(variables) {
2158
2194
  return variables.map((v) => ({
2159
2195
  id: crypto.randomUUID(),
@@ -2356,17 +2392,17 @@ function ModuleInterfaceContent({
2356
2392
  await onSaveExports(exportDefs, outputDefs);
2357
2393
  }, [variables, outputs, hasErrors, onSaveVariables, onSaveExports])
2358
2394
  );
2359
- return /* @__PURE__ */ jsxs12(Fragment6, { children: [
2360
- /* @__PURE__ */ jsx13("div", { className: "lace-panel-hint", children: "The composition's public surface \u2014 what the registry sees when this module is published." }),
2361
- /* @__PURE__ */ jsx13("h4", { className: "lace-panel-section-title", children: "Inputs" }),
2362
- variables.length === 0 ? /* @__PURE__ */ jsxs12("div", { className: "lace-panel-hint", children: [
2395
+ return /* @__PURE__ */ jsxs13(Fragment6, { children: [
2396
+ /* @__PURE__ */ jsx14("div", { className: "lace-panel-hint", children: "The composition's public surface \u2014 what the registry sees when this module is published." }),
2397
+ /* @__PURE__ */ jsx14("h4", { className: "lace-panel-section-title", children: "Inputs" }),
2398
+ variables.length === 0 ? /* @__PURE__ */ jsxs13("div", { className: "lace-panel-hint", children: [
2363
2399
  "No variables yet. They'll auto-derive on the next Generate from any ",
2364
- /* @__PURE__ */ jsx13("code", { children: "var.xxx" }),
2400
+ /* @__PURE__ */ jsx14("code", { children: "var.xxx" }),
2365
2401
  " ",
2366
2402
  "references in child input bindings."
2367
- ] }) : variables.map((v, i) => /* @__PURE__ */ jsxs12("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
2368
- /* @__PURE__ */ jsx13("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx13(Input5, { value: v.name, placeholder: "Variable name", fullWidth: true, mono: true, readOnly: true }) }),
2369
- /* @__PURE__ */ jsx13("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx13(
2403
+ ] }) : variables.map((v, i) => /* @__PURE__ */ jsxs13("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
2404
+ /* @__PURE__ */ jsx14("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx14(Input5, { value: v.name, placeholder: "Variable name", fullWidth: true, mono: true, readOnly: true }) }),
2405
+ /* @__PURE__ */ jsx14("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx14(
2370
2406
  Input5,
2371
2407
  {
2372
2408
  value: v.type,
@@ -2377,7 +2413,7 @@ function ModuleInterfaceContent({
2377
2413
  readOnly
2378
2414
  }
2379
2415
  ) }),
2380
- /* @__PURE__ */ jsx13("div", { className: "lace-panel-row-content", children: /* @__PURE__ */ jsx13(
2416
+ /* @__PURE__ */ jsx14("div", { className: "lace-panel-row-content", children: /* @__PURE__ */ jsx14(
2381
2417
  Textarea3,
2382
2418
  {
2383
2419
  value: v.description,
@@ -2388,9 +2424,9 @@ function ModuleInterfaceContent({
2388
2424
  readOnly
2389
2425
  }
2390
2426
  ) }),
2391
- /* @__PURE__ */ jsxs12("div", { className: "lace-panel-row-actions", children: [
2392
- /* @__PURE__ */ jsxs12("label", { className: "lace-panel-checkbox-row", children: [
2393
- /* @__PURE__ */ jsx13(
2427
+ /* @__PURE__ */ jsxs13("div", { className: "lace-panel-row-actions", children: [
2428
+ /* @__PURE__ */ jsxs13("label", { className: "lace-panel-checkbox-row", children: [
2429
+ /* @__PURE__ */ jsx14(
2394
2430
  "input",
2395
2431
  {
2396
2432
  type: "checkbox",
@@ -2399,10 +2435,10 @@ function ModuleInterfaceContent({
2399
2435
  disabled: readOnly
2400
2436
  }
2401
2437
  ),
2402
- /* @__PURE__ */ jsx13("span", { children: "Required" })
2438
+ /* @__PURE__ */ jsx14("span", { children: "Required" })
2403
2439
  ] }),
2404
- /* @__PURE__ */ jsxs12("label", { className: "lace-panel-checkbox-row", children: [
2405
- /* @__PURE__ */ jsx13(
2440
+ /* @__PURE__ */ jsxs13("label", { className: "lace-panel-checkbox-row", children: [
2441
+ /* @__PURE__ */ jsx14(
2406
2442
  "input",
2407
2443
  {
2408
2444
  type: "checkbox",
@@ -2411,10 +2447,10 @@ function ModuleInterfaceContent({
2411
2447
  disabled: readOnly
2412
2448
  }
2413
2449
  ),
2414
- /* @__PURE__ */ jsx13("span", { children: "Ephemeral" })
2450
+ /* @__PURE__ */ jsx14("span", { children: "Ephemeral" })
2415
2451
  ] }),
2416
- /* @__PURE__ */ jsxs12("label", { className: "lace-panel-checkbox-row", children: [
2417
- /* @__PURE__ */ jsx13(
2452
+ /* @__PURE__ */ jsxs13("label", { className: "lace-panel-checkbox-row", children: [
2453
+ /* @__PURE__ */ jsx14(
2418
2454
  "input",
2419
2455
  {
2420
2456
  type: "checkbox",
@@ -2423,10 +2459,10 @@ function ModuleInterfaceContent({
2423
2459
  disabled: readOnly
2424
2460
  }
2425
2461
  ),
2426
- /* @__PURE__ */ jsx13("span", { children: "Sensitive" })
2462
+ /* @__PURE__ */ jsx14("span", { children: "Sensitive" })
2427
2463
  ] }),
2428
- /* @__PURE__ */ jsxs12("label", { className: "lace-panel-checkbox-row", children: [
2429
- /* @__PURE__ */ jsx13(
2464
+ /* @__PURE__ */ jsxs13("label", { className: "lace-panel-checkbox-row", children: [
2465
+ /* @__PURE__ */ jsx14(
2430
2466
  "input",
2431
2467
  {
2432
2468
  type: "checkbox",
@@ -2435,13 +2471,13 @@ function ModuleInterfaceContent({
2435
2471
  disabled: readOnly
2436
2472
  }
2437
2473
  ),
2438
- /* @__PURE__ */ jsx13("span", { children: "Nullable" })
2474
+ /* @__PURE__ */ jsx14("span", { children: "Nullable" })
2439
2475
  ] })
2440
2476
  ] }),
2441
- (v.validation.length > 0 || !readOnly) && /* @__PURE__ */ jsxs12("div", { className: "lace-panel-row-content", children: [
2442
- /* @__PURE__ */ jsx13("div", { className: "lace-panel-subsection-label", children: "Validation" }),
2443
- v.validation.map((block, j) => /* @__PURE__ */ jsxs12("div", { className: "lace-panel-validation-block", children: [
2444
- /* @__PURE__ */ jsx13(
2477
+ (v.validation.length > 0 || !readOnly) && /* @__PURE__ */ jsxs13("div", { className: "lace-panel-row-content", children: [
2478
+ /* @__PURE__ */ jsx14("div", { className: "lace-panel-subsection-label", children: "Validation" }),
2479
+ v.validation.map((block, j) => /* @__PURE__ */ jsxs13("div", { className: "lace-panel-validation-block", children: [
2480
+ /* @__PURE__ */ jsx14(
2445
2481
  Input5,
2446
2482
  {
2447
2483
  value: block.condition,
@@ -2453,7 +2489,7 @@ function ModuleInterfaceContent({
2453
2489
  readOnly
2454
2490
  }
2455
2491
  ),
2456
- /* @__PURE__ */ jsx13(
2492
+ /* @__PURE__ */ jsx14(
2457
2493
  Input5,
2458
2494
  {
2459
2495
  value: block.error_message,
@@ -2464,7 +2500,7 @@ function ModuleInterfaceContent({
2464
2500
  readOnly
2465
2501
  }
2466
2502
  ),
2467
- !readOnly && /* @__PURE__ */ jsx13(
2503
+ !readOnly && /* @__PURE__ */ jsx14(
2468
2504
  Button4,
2469
2505
  {
2470
2506
  variant: "danger",
@@ -2476,13 +2512,13 @@ function ModuleInterfaceContent({
2476
2512
  }
2477
2513
  )
2478
2514
  ] }, block.id)),
2479
- !readOnly && /* @__PURE__ */ jsx13(Button4, { variant: "secondary", size: "sm", onClick: () => addValidation(i), children: "+ Add validation rule" })
2515
+ !readOnly && /* @__PURE__ */ jsx14(Button4, { variant: "secondary", size: "sm", onClick: () => addValidation(i), children: "+ Add validation rule" })
2480
2516
  ] })
2481
2517
  ] }, v.id)),
2482
- /* @__PURE__ */ jsx13("h4", { className: "lace-panel-section-title", children: "Outputs" }),
2483
- outputs.length === 0 ? /* @__PURE__ */ jsx13("div", { className: "lace-panel-hint", children: "No child outputs available yet. Drop a module onto the canvas to see its outputs here." }) : outputs.map((o, i) => /* @__PURE__ */ jsxs12("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
2484
- /* @__PURE__ */ jsx13("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsxs12("label", { className: "lace-panel-checkbox-row", children: [
2485
- /* @__PURE__ */ jsx13(
2518
+ /* @__PURE__ */ jsx14("h4", { className: "lace-panel-section-title", children: "Outputs" }),
2519
+ outputs.length === 0 ? /* @__PURE__ */ jsx14("div", { className: "lace-panel-hint", children: "No child outputs available yet. Drop a module onto the canvas to see its outputs here." }) : outputs.map((o, i) => /* @__PURE__ */ jsxs13("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
2520
+ /* @__PURE__ */ jsx14("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsxs13("label", { className: "lace-panel-checkbox-row", children: [
2521
+ /* @__PURE__ */ jsx14(
2486
2522
  "input",
2487
2523
  {
2488
2524
  type: "checkbox",
@@ -2491,13 +2527,13 @@ function ModuleInterfaceContent({
2491
2527
  disabled: readOnly
2492
2528
  }
2493
2529
  ),
2494
- /* @__PURE__ */ jsxs12("span", { className: "lace-panel-checkbox-row__source", children: [
2530
+ /* @__PURE__ */ jsxs13("span", { className: "lace-panel-checkbox-row__source", children: [
2495
2531
  o.source_instance,
2496
2532
  ".",
2497
2533
  o.source_output
2498
2534
  ] })
2499
2535
  ] }) }),
2500
- o.exposed ? /* @__PURE__ */ jsx13("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx13(
2536
+ o.exposed ? /* @__PURE__ */ jsx14("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx14(
2501
2537
  Input5,
2502
2538
  {
2503
2539
  value: o.exposed_name,
@@ -2509,10 +2545,10 @@ function ModuleInterfaceContent({
2509
2545
  error: exposedNameCollisions.has(i)
2510
2546
  }
2511
2547
  ) }) : null,
2512
- o.exposed && (o.depends_on.length > 0 || !readOnly && siblingModuleKeys.length > 0) ? /* @__PURE__ */ jsxs12("div", { className: "lace-panel-row-content", children: [
2513
- /* @__PURE__ */ jsx13("div", { className: "lace-panel-subsection-label", children: "Depends on" }),
2514
- readOnly ? o.depends_on.map((depKey) => /* @__PURE__ */ jsx13("div", { className: "lace-panel-depends-item", children: depKey }, depKey)) : siblingModuleKeys.map((depKey) => /* @__PURE__ */ jsxs12("label", { className: "lace-panel-checkbox-row", children: [
2515
- /* @__PURE__ */ jsx13(
2548
+ o.exposed && (o.depends_on.length > 0 || !readOnly && siblingModuleKeys.length > 0) ? /* @__PURE__ */ jsxs13("div", { className: "lace-panel-row-content", children: [
2549
+ /* @__PURE__ */ jsx14("div", { className: "lace-panel-subsection-label", children: "Depends on" }),
2550
+ readOnly ? o.depends_on.map((depKey) => /* @__PURE__ */ jsx14("div", { className: "lace-panel-depends-item", children: depKey }, depKey)) : siblingModuleKeys.map((depKey) => /* @__PURE__ */ jsxs13("label", { className: "lace-panel-checkbox-row", children: [
2551
+ /* @__PURE__ */ jsx14(
2516
2552
  "input",
2517
2553
  {
2518
2554
  type: "checkbox",
@@ -2520,12 +2556,12 @@ function ModuleInterfaceContent({
2520
2556
  onChange: () => toggleDependsOn(i, depKey)
2521
2557
  }
2522
2558
  ),
2523
- /* @__PURE__ */ jsx13("span", { className: "lace-panel-checkbox-row__source", children: depKey })
2559
+ /* @__PURE__ */ jsx14("span", { className: "lace-panel-checkbox-row__source", children: depKey })
2524
2560
  ] }, depKey))
2525
2561
  ] }) : null,
2526
- exposedNameCollisions.has(i) ? /* @__PURE__ */ jsx13("div", { className: "lace-panel-row-error", children: "Exposed name must be unique and non-empty." }) : null
2562
+ exposedNameCollisions.has(i) ? /* @__PURE__ */ jsx14("div", { className: "lace-panel-row-error", children: "Exposed name must be unique and non-empty." }) : null
2527
2563
  ] }, o.id)),
2528
- !readOnly && /* @__PURE__ */ jsx13(
2564
+ !readOnly && /* @__PURE__ */ jsx14(
2529
2565
  SaveButton,
2530
2566
  {
2531
2567
  status: saveStatus,
@@ -2545,7 +2581,7 @@ function ModuleInterfacePanel({
2545
2581
  onSaveExports,
2546
2582
  onClose
2547
2583
  }) {
2548
- return /* @__PURE__ */ jsx13(Panel8, { title: "Module Interface", onClose, children: /* @__PURE__ */ jsx13(
2584
+ return /* @__PURE__ */ jsx14(Panel8, { title: "Module Interface", onClose, children: /* @__PURE__ */ jsx14(
2549
2585
  ModuleInterfaceContent,
2550
2586
  {
2551
2587
  settings,
@@ -2561,7 +2597,7 @@ function ModuleInterfacePanel({
2561
2597
  import { Input as Input6, Panel as Panel9, Textarea as Textarea4 } from "@lace-cloud/ui";
2562
2598
  import { useCallback as useCallback9, useEffect as useEffect7, useState as useState11 } from "react";
2563
2599
  import "./panels-shared-LLLB7PR4.css";
2564
- import { Fragment as Fragment7, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
2600
+ import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
2565
2601
  var ID_PATTERN = /^[a-z0-9_-]+\/[a-z0-9_-]+\/[a-z0-9_-]+$/;
2566
2602
  var NAME_PATTERN = /^[a-z][a-z0-9_-]*$/;
2567
2603
  var SEMVER_PATTERN = /^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?(?:\+[A-Za-z0-9.-]+)?$/;
@@ -2649,20 +2685,20 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2649
2685
  }, [engine, meta, authors, categoriesInput, hasErrors, onSaved])
2650
2686
  );
2651
2687
  if (loading) {
2652
- return /* @__PURE__ */ jsx14("div", { className: "lace-panel-hint", children: "Loading module metadata\u2026" });
2688
+ return /* @__PURE__ */ jsx15("div", { className: "lace-panel-hint", children: "Loading module metadata\u2026" });
2653
2689
  }
2654
- return /* @__PURE__ */ jsxs13(Fragment7, { children: [
2655
- /* @__PURE__ */ jsxs13("div", { className: "lace-panel-hint", children: [
2690
+ return /* @__PURE__ */ jsxs14(Fragment7, { children: [
2691
+ /* @__PURE__ */ jsxs14("div", { className: "lace-panel-hint", children: [
2656
2692
  "Saved as ",
2657
- /* @__PURE__ */ jsx14("code", { children: "module.yaml" }),
2693
+ /* @__PURE__ */ jsx15("code", { children: "module.yaml" }),
2658
2694
  " at the composition's root, alongside the generated Terraform. Once filled in, the directory is publish-ready via",
2659
- /* @__PURE__ */ jsx14("code", { children: " lace registry register --axis module" }),
2695
+ /* @__PURE__ */ jsx15("code", { children: " lace registry register --axis module" }),
2660
2696
  "."
2661
2697
  ] }),
2662
- /* @__PURE__ */ jsx14("h4", { className: "lace-panel-section-title", children: "Identity" }),
2663
- /* @__PURE__ */ jsxs13("div", { className: "lace-panel-field", children: [
2664
- /* @__PURE__ */ jsx14("label", { className: "lace-panel-row-label", htmlFor: "module-id-input", children: "ID" }),
2665
- /* @__PURE__ */ jsx14(
2698
+ /* @__PURE__ */ jsx15("h4", { className: "lace-panel-section-title", children: "Identity" }),
2699
+ /* @__PURE__ */ jsxs14("div", { className: "lace-panel-field", children: [
2700
+ /* @__PURE__ */ jsx15("label", { className: "lace-panel-row-label", htmlFor: "module-id-input", children: "ID" }),
2701
+ /* @__PURE__ */ jsx15(
2666
2702
  Input6,
2667
2703
  {
2668
2704
  id: "module-id-input",
@@ -2675,15 +2711,15 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2675
2711
  error: Boolean(idError)
2676
2712
  }
2677
2713
  ),
2678
- idError ? /* @__PURE__ */ jsxs13("div", { className: "lace-panel-row-error", children: [
2714
+ idError ? /* @__PURE__ */ jsxs14("div", { className: "lace-panel-row-error", children: [
2679
2715
  "Expected ",
2680
- /* @__PURE__ */ jsx14("code", { children: "<system>/<service>/<name>" }),
2716
+ /* @__PURE__ */ jsx15("code", { children: "<system>/<service>/<name>" }),
2681
2717
  " (lowercase, hyphens or underscores)."
2682
2718
  ] }) : null
2683
2719
  ] }),
2684
- /* @__PURE__ */ jsxs13("div", { className: "lace-panel-field", children: [
2685
- /* @__PURE__ */ jsx14("label", { className: "lace-panel-row-label", htmlFor: "module-name-input", children: "Name" }),
2686
- /* @__PURE__ */ jsx14(
2720
+ /* @__PURE__ */ jsxs14("div", { className: "lace-panel-field", children: [
2721
+ /* @__PURE__ */ jsx15("label", { className: "lace-panel-row-label", htmlFor: "module-name-input", children: "Name" }),
2722
+ /* @__PURE__ */ jsx15(
2687
2723
  Input6,
2688
2724
  {
2689
2725
  id: "module-name-input",
@@ -2696,11 +2732,11 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2696
2732
  error: Boolean(nameError)
2697
2733
  }
2698
2734
  ),
2699
- nameError ? /* @__PURE__ */ jsx14("div", { className: "lace-panel-row-error", children: "Expected kebab-case (lowercase letters, digits, hyphens or underscores; must start with a letter)." }) : null
2735
+ nameError ? /* @__PURE__ */ jsx15("div", { className: "lace-panel-row-error", children: "Expected kebab-case (lowercase letters, digits, hyphens or underscores; must start with a letter)." }) : null
2700
2736
  ] }),
2701
- /* @__PURE__ */ jsxs13("div", { className: "lace-panel-field", children: [
2702
- /* @__PURE__ */ jsx14("label", { className: "lace-panel-row-label", htmlFor: "module-system-input", children: "System" }),
2703
- /* @__PURE__ */ jsx14(
2737
+ /* @__PURE__ */ jsxs14("div", { className: "lace-panel-field", children: [
2738
+ /* @__PURE__ */ jsx15("label", { className: "lace-panel-row-label", htmlFor: "module-system-input", children: "System" }),
2739
+ /* @__PURE__ */ jsx15(
2704
2740
  Input6,
2705
2741
  {
2706
2742
  id: "module-system-input",
@@ -2713,9 +2749,9 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2713
2749
  }
2714
2750
  )
2715
2751
  ] }),
2716
- /* @__PURE__ */ jsxs13("div", { className: "lace-panel-field", children: [
2717
- /* @__PURE__ */ jsx14("label", { className: "lace-panel-row-label", htmlFor: "module-version-input", children: "Version" }),
2718
- /* @__PURE__ */ jsx14(
2752
+ /* @__PURE__ */ jsxs14("div", { className: "lace-panel-field", children: [
2753
+ /* @__PURE__ */ jsx15("label", { className: "lace-panel-row-label", htmlFor: "module-version-input", children: "Version" }),
2754
+ /* @__PURE__ */ jsx15(
2719
2755
  Input6,
2720
2756
  {
2721
2757
  id: "module-version-input",
@@ -2728,10 +2764,10 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2728
2764
  error: Boolean(versionError)
2729
2765
  }
2730
2766
  ),
2731
- versionError ? /* @__PURE__ */ jsx14("div", { className: "lace-panel-row-error", children: "Expected semver (e.g. 1.0.0)." }) : null
2767
+ versionError ? /* @__PURE__ */ jsx15("div", { className: "lace-panel-row-error", children: "Expected semver (e.g. 1.0.0)." }) : null
2732
2768
  ] }),
2733
- /* @__PURE__ */ jsx14("h4", { className: "lace-panel-section-title", children: "Description" }),
2734
- /* @__PURE__ */ jsx14("div", { className: "lace-panel-field", children: /* @__PURE__ */ jsx14(
2769
+ /* @__PURE__ */ jsx15("h4", { className: "lace-panel-section-title", children: "Description" }),
2770
+ /* @__PURE__ */ jsx15("div", { className: "lace-panel-field", children: /* @__PURE__ */ jsx15(
2735
2771
  Textarea4,
2736
2772
  {
2737
2773
  value: meta.description ?? "",
@@ -2742,8 +2778,8 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2742
2778
  readOnly
2743
2779
  }
2744
2780
  ) }),
2745
- /* @__PURE__ */ jsx14("h4", { className: "lace-panel-section-title", children: "Categories" }),
2746
- /* @__PURE__ */ jsx14("div", { className: "lace-panel-field", children: /* @__PURE__ */ jsx14(
2781
+ /* @__PURE__ */ jsx15("h4", { className: "lace-panel-section-title", children: "Categories" }),
2782
+ /* @__PURE__ */ jsx15("div", { className: "lace-panel-field", children: /* @__PURE__ */ jsx15(
2747
2783
  Input6,
2748
2784
  {
2749
2785
  value: categoriesInput,
@@ -2753,10 +2789,10 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2753
2789
  readOnly
2754
2790
  }
2755
2791
  ) }),
2756
- /* @__PURE__ */ jsx14("h4", { className: "lace-panel-section-title", children: "Authors" }),
2757
- authors.map((a, i) => /* @__PURE__ */ jsxs13("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
2758
- /* @__PURE__ */ jsxs13("div", { className: "lace-panel-row-actions", children: [
2759
- /* @__PURE__ */ jsx14(
2792
+ /* @__PURE__ */ jsx15("h4", { className: "lace-panel-section-title", children: "Authors" }),
2793
+ authors.map((a, i) => /* @__PURE__ */ jsxs14("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
2794
+ /* @__PURE__ */ jsxs14("div", { className: "lace-panel-row-actions", children: [
2795
+ /* @__PURE__ */ jsx15(
2760
2796
  Input6,
2761
2797
  {
2762
2798
  value: a.name,
@@ -2766,7 +2802,7 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2766
2802
  readOnly
2767
2803
  }
2768
2804
  ),
2769
- !readOnly && /* @__PURE__ */ jsx14(
2805
+ !readOnly && /* @__PURE__ */ jsx15(
2770
2806
  "button",
2771
2807
  {
2772
2808
  type: "button",
@@ -2777,7 +2813,7 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2777
2813
  }
2778
2814
  )
2779
2815
  ] }),
2780
- /* @__PURE__ */ jsx14("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx14(
2816
+ /* @__PURE__ */ jsx15("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx15(
2781
2817
  Input6,
2782
2818
  {
2783
2819
  value: a.email,
@@ -2788,9 +2824,9 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2788
2824
  }
2789
2825
  ) })
2790
2826
  ] }, a.id)),
2791
- !readOnly && /* @__PURE__ */ jsx14("button", { type: "button", onClick: addAuthor, className: "lace-panel-add-btn", children: "+ Add author" }),
2792
- /* @__PURE__ */ jsx14("h4", { className: "lace-panel-section-title", children: "Example" }),
2793
- /* @__PURE__ */ jsx14("div", { className: "lace-panel-field", children: /* @__PURE__ */ jsx14(
2827
+ !readOnly && /* @__PURE__ */ jsx15("button", { type: "button", onClick: addAuthor, className: "lace-panel-add-btn", children: "+ Add author" }),
2828
+ /* @__PURE__ */ jsx15("h4", { className: "lace-panel-section-title", children: "Example" }),
2829
+ /* @__PURE__ */ jsx15("div", { className: "lace-panel-field", children: /* @__PURE__ */ jsx15(
2794
2830
  Textarea4,
2795
2831
  {
2796
2832
  value: meta.example ?? "",
@@ -2802,7 +2838,7 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
2802
2838
  readOnly
2803
2839
  }
2804
2840
  ) }),
2805
- !readOnly && /* @__PURE__ */ jsx14(
2841
+ !readOnly && /* @__PURE__ */ jsx15(
2806
2842
  SaveButton,
2807
2843
  {
2808
2844
  status: saveStatus,
@@ -2822,7 +2858,7 @@ import "./panels-shared-LLLB7PR4.css";
2822
2858
  import { Input as Input7, Panel as Panel10 } from "@lace-cloud/ui";
2823
2859
  import { useCallback as useCallback10, useState as useState12 } from "react";
2824
2860
  import "./panels-shared-LLLB7PR4.css";
2825
- import { Fragment as Fragment8, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
2861
+ import { Fragment as Fragment8, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2826
2862
  function toRows2(providers) {
2827
2863
  if (!providers || providers.length === 0) return [];
2828
2864
  return providers.map((p) => ({
@@ -2915,10 +2951,10 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
2915
2951
  await onSave(fromRows2(rows));
2916
2952
  }, [onSave, rows])
2917
2953
  );
2918
- return /* @__PURE__ */ jsxs14(Fragment8, { children: [
2919
- rows.map((row, pi) => /* @__PURE__ */ jsxs14("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
2920
- /* @__PURE__ */ jsxs14("div", { className: "lace-panel-row-actions", children: [
2921
- /* @__PURE__ */ jsx15(
2954
+ return /* @__PURE__ */ jsxs15(Fragment8, { children: [
2955
+ rows.map((row, pi) => /* @__PURE__ */ jsxs15("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
2956
+ /* @__PURE__ */ jsxs15("div", { className: "lace-panel-row-actions", children: [
2957
+ /* @__PURE__ */ jsx16(
2922
2958
  Input7,
2923
2959
  {
2924
2960
  value: row.name,
@@ -2928,7 +2964,7 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
2928
2964
  readOnly
2929
2965
  }
2930
2966
  ),
2931
- /* @__PURE__ */ jsx15(
2967
+ /* @__PURE__ */ jsx16(
2932
2968
  Input7,
2933
2969
  {
2934
2970
  value: row.alias,
@@ -2938,7 +2974,7 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
2938
2974
  readOnly
2939
2975
  }
2940
2976
  ),
2941
- !readOnly && /* @__PURE__ */ jsx15(
2977
+ !readOnly && /* @__PURE__ */ jsx16(
2942
2978
  "button",
2943
2979
  {
2944
2980
  type: "button",
@@ -2949,9 +2985,9 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
2949
2985
  }
2950
2986
  )
2951
2987
  ] }),
2952
- /* @__PURE__ */ jsx15("div", { className: "lace-panel-row-sublabel", children: "Config" }),
2953
- row.configEntries.map((entry, ei) => /* @__PURE__ */ jsxs14("div", { className: "lace-panel-row-actions", children: [
2954
- /* @__PURE__ */ jsx15(
2988
+ /* @__PURE__ */ jsx16("div", { className: "lace-panel-row-sublabel", children: "Config" }),
2989
+ row.configEntries.map((entry, ei) => /* @__PURE__ */ jsxs15("div", { className: "lace-panel-row-actions", children: [
2990
+ /* @__PURE__ */ jsx16(
2955
2991
  Input7,
2956
2992
  {
2957
2993
  value: entry.key,
@@ -2961,7 +2997,7 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
2961
2997
  readOnly
2962
2998
  }
2963
2999
  ),
2964
- /* @__PURE__ */ jsx15(
3000
+ /* @__PURE__ */ jsx16(
2965
3001
  Input7,
2966
3002
  {
2967
3003
  value: entry.value,
@@ -2971,7 +3007,7 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
2971
3007
  readOnly
2972
3008
  }
2973
3009
  ),
2974
- !readOnly && /* @__PURE__ */ jsx15(
3010
+ !readOnly && /* @__PURE__ */ jsx16(
2975
3011
  "button",
2976
3012
  {
2977
3013
  type: "button",
@@ -2982,7 +3018,7 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
2982
3018
  }
2983
3019
  )
2984
3020
  ] }, entry.id)),
2985
- !readOnly && /* @__PURE__ */ jsx15(
3021
+ !readOnly && /* @__PURE__ */ jsx16(
2986
3022
  "button",
2987
3023
  {
2988
3024
  type: "button",
@@ -2991,9 +3027,9 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
2991
3027
  children: "+ Add config key"
2992
3028
  }
2993
3029
  ),
2994
- row.blocks.length > 0 ? /* @__PURE__ */ jsxs14(Fragment8, { children: [
2995
- /* @__PURE__ */ jsx15("div", { className: "lace-panel-row-sublabel", children: "Nested blocks (read-only)" }),
2996
- row.blocks.map((block, bi) => /* @__PURE__ */ jsx15(
3030
+ row.blocks.length > 0 ? /* @__PURE__ */ jsxs15(Fragment8, { children: [
3031
+ /* @__PURE__ */ jsx16("div", { className: "lace-panel-row-sublabel", children: "Nested blocks (read-only)" }),
3032
+ row.blocks.map((block, bi) => /* @__PURE__ */ jsx16(
2997
3033
  "div",
2998
3034
  {
2999
3035
  className: "lace-panel-depends-item",
@@ -3003,21 +3039,21 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
3003
3039
  ))
3004
3040
  ] }) : null
3005
3041
  ] }, row.id)),
3006
- !readOnly && /* @__PURE__ */ jsxs14(Fragment8, { children: [
3007
- /* @__PURE__ */ jsx15("button", { type: "button", onClick: addProvider, className: "lace-panel-add-btn", children: "+ Add provider" }),
3008
- /* @__PURE__ */ jsx15(SaveButton, { status: saveStatus, label: "Save providers", onClick: handleSave })
3042
+ !readOnly && /* @__PURE__ */ jsxs15(Fragment8, { children: [
3043
+ /* @__PURE__ */ jsx16("button", { type: "button", onClick: addProvider, className: "lace-panel-add-btn", children: "+ Add provider" }),
3044
+ /* @__PURE__ */ jsx16(SaveButton, { status: saveStatus, label: "Save providers", onClick: handleSave })
3009
3045
  ] })
3010
3046
  ] });
3011
3047
  }
3012
3048
  function ProvidersPanel({ providers, readOnly = false, onSave, onClose }) {
3013
- return /* @__PURE__ */ jsx15(Panel10, { title: "Providers", onClose, children: /* @__PURE__ */ jsx15(ProvidersContent, { providers, readOnly, onSave }) });
3049
+ return /* @__PURE__ */ jsx16(Panel10, { title: "Providers", onClose, children: /* @__PURE__ */ jsx16(ProvidersContent, { providers, readOnly, onSave }) });
3014
3050
  }
3015
3051
 
3016
3052
  // src/components/panels/TerraformConfigPanel.tsx
3017
3053
  import { Input as Input8, Panel as Panel11 } from "@lace-cloud/ui";
3018
3054
  import { useCallback as useCallback11, useState as useState13 } from "react";
3019
3055
  import "./panels-shared-LLLB7PR4.css";
3020
- import { Fragment as Fragment9, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
3056
+ import { Fragment as Fragment9, jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
3021
3057
  function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
3022
3058
  const [requiredVersion, setRequiredVersion] = useState13(terraform?.required_version ?? "");
3023
3059
  const [providers, setProviders] = useState13(() => {
@@ -3059,9 +3095,9 @@ function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
3059
3095
  await onSave(block);
3060
3096
  }, [onSave, requiredVersion, providers])
3061
3097
  );
3062
- return /* @__PURE__ */ jsxs15(Fragment9, { children: [
3063
- /* @__PURE__ */ jsx16("h4", { className: "lace-panel-section-title", children: "Required Version" }),
3064
- /* @__PURE__ */ jsx16("div", { className: "lace-panel-field", children: /* @__PURE__ */ jsx16(
3098
+ return /* @__PURE__ */ jsxs16(Fragment9, { children: [
3099
+ /* @__PURE__ */ jsx17("h4", { className: "lace-panel-section-title", children: "Required Version" }),
3100
+ /* @__PURE__ */ jsx17("div", { className: "lace-panel-field", children: /* @__PURE__ */ jsx17(
3065
3101
  Input8,
3066
3102
  {
3067
3103
  value: requiredVersion,
@@ -3071,10 +3107,10 @@ function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
3071
3107
  readOnly
3072
3108
  }
3073
3109
  ) }),
3074
- /* @__PURE__ */ jsx16("h4", { className: "lace-panel-section-title", children: "Required Providers" }),
3075
- providers.map((p, i) => /* @__PURE__ */ jsxs15("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
3076
- /* @__PURE__ */ jsxs15("div", { className: "lace-panel-row-actions", children: [
3077
- /* @__PURE__ */ jsx16(
3110
+ /* @__PURE__ */ jsx17("h4", { className: "lace-panel-section-title", children: "Required Providers" }),
3111
+ providers.map((p, i) => /* @__PURE__ */ jsxs16("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
3112
+ /* @__PURE__ */ jsxs16("div", { className: "lace-panel-row-actions", children: [
3113
+ /* @__PURE__ */ jsx17(
3078
3114
  Input8,
3079
3115
  {
3080
3116
  value: p.name,
@@ -3084,7 +3120,7 @@ function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
3084
3120
  readOnly
3085
3121
  }
3086
3122
  ),
3087
- !readOnly && /* @__PURE__ */ jsx16(
3123
+ !readOnly && /* @__PURE__ */ jsx17(
3088
3124
  "button",
3089
3125
  {
3090
3126
  type: "button",
@@ -3094,7 +3130,7 @@ function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
3094
3130
  }
3095
3131
  )
3096
3132
  ] }),
3097
- /* @__PURE__ */ jsx16("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx16(
3133
+ /* @__PURE__ */ jsx17("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx17(
3098
3134
  Input8,
3099
3135
  {
3100
3136
  value: p.source,
@@ -3104,7 +3140,7 @@ function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
3104
3140
  readOnly
3105
3141
  }
3106
3142
  ) }),
3107
- /* @__PURE__ */ jsx16("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx16(
3143
+ /* @__PURE__ */ jsx17("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx17(
3108
3144
  Input8,
3109
3145
  {
3110
3146
  value: p.version,
@@ -3114,7 +3150,7 @@ function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
3114
3150
  readOnly
3115
3151
  }
3116
3152
  ) }),
3117
- p.configuration_aliases.length > 0 && /* @__PURE__ */ jsx16("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx16(
3153
+ p.configuration_aliases.length > 0 && /* @__PURE__ */ jsx17("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx17(
3118
3154
  Input8,
3119
3155
  {
3120
3156
  value: p.configuration_aliases.join(", "),
@@ -3125,18 +3161,18 @@ function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
3125
3161
  }
3126
3162
  ) })
3127
3163
  ] }, p.id)),
3128
- !readOnly && /* @__PURE__ */ jsx16("button", { type: "button", onClick: addProvider, className: "lace-panel-add-btn", children: "+ Add provider" }),
3129
- /* @__PURE__ */ jsx16("h4", { className: "lace-panel-section-title", children: "Backend" }),
3130
- /* @__PURE__ */ jsx16("div", { className: "lace-panel-hint", children: "Terraform state is managed by Lace Cloud. The HTTP backend is configured automatically during generation." }),
3131
- !readOnly && /* @__PURE__ */ jsx16(SaveButton, { status: saveStatus, label: "Save configuration", onClick: handleSave })
3164
+ !readOnly && /* @__PURE__ */ jsx17("button", { type: "button", onClick: addProvider, className: "lace-panel-add-btn", children: "+ Add provider" }),
3165
+ /* @__PURE__ */ jsx17("h4", { className: "lace-panel-section-title", children: "Backend" }),
3166
+ /* @__PURE__ */ jsx17("div", { className: "lace-panel-hint", children: "Terraform state is managed by Lace Cloud. The HTTP backend is configured automatically during generation." }),
3167
+ !readOnly && /* @__PURE__ */ jsx17(SaveButton, { status: saveStatus, label: "Save configuration", onClick: handleSave })
3132
3168
  ] });
3133
3169
  }
3134
3170
  function TerraformConfigPanel({ terraform, onSave, onClose }) {
3135
- return /* @__PURE__ */ jsx16(Panel11, { title: "Terraform Configuration", onClose, children: /* @__PURE__ */ jsx16(TerraformConfigContent, { terraform, onSave }) });
3171
+ return /* @__PURE__ */ jsx17(Panel11, { title: "Terraform Configuration", onClose, children: /* @__PURE__ */ jsx17(TerraformConfigContent, { terraform, onSave }) });
3136
3172
  }
3137
3173
 
3138
3174
  // src/components/panels/UnifiedSettingsPanel.tsx
3139
- import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
3175
+ import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
3140
3176
  function UnifiedSettingsPanel({ engine, onClose, onSaved }) {
3141
3177
  const { state, readOnly } = useCanvas();
3142
3178
  const [settings, setSettings] = useState14(null);
@@ -3154,11 +3190,11 @@ function UnifiedSettingsPanel({ engine, onClose, onSaved }) {
3154
3190
  };
3155
3191
  }, [engine]);
3156
3192
  if (loading || !settings) {
3157
- return /* @__PURE__ */ jsx17(Panel12, { title: "Settings", scrollable: false, onClose, children: /* @__PURE__ */ jsx17("div", { className: "lace-panel-hint", children: "Loading settings..." }) });
3193
+ return /* @__PURE__ */ jsx18(Panel12, { title: "Settings", scrollable: false, onClose, children: /* @__PURE__ */ jsx18("div", { className: "lace-panel-hint", children: "Loading settings..." }) });
3158
3194
  }
3159
- return /* @__PURE__ */ jsxs16(Panel12, { title: "Settings", scrollable: false, onClose, children: [
3160
- /* @__PURE__ */ jsx17(AccordionSection, { title: "Module", defaultOpen: true, children: /* @__PURE__ */ jsx17(ModuleMetadataContent, { engine, readOnly, onSaved }) }),
3161
- /* @__PURE__ */ jsx17(AccordionSection, { title: "Interface", children: /* @__PURE__ */ jsx17(
3195
+ return /* @__PURE__ */ jsxs17(Panel12, { title: "Settings", scrollable: false, onClose, children: [
3196
+ /* @__PURE__ */ jsx18(AccordionSection, { title: "Module", defaultOpen: true, children: /* @__PURE__ */ jsx18(ModuleMetadataContent, { engine, readOnly, onSaved }) }),
3197
+ /* @__PURE__ */ jsx18(AccordionSection, { title: "Interface", children: /* @__PURE__ */ jsx18(
3162
3198
  ModuleInterfaceContent,
3163
3199
  {
3164
3200
  settings,
@@ -3174,7 +3210,7 @@ function UnifiedSettingsPanel({ engine, onClose, onSaved }) {
3174
3210
  }
3175
3211
  }
3176
3212
  ) }),
3177
- /* @__PURE__ */ jsx17(AccordionSection, { title: "Terraform Config", children: /* @__PURE__ */ jsx17(
3213
+ /* @__PURE__ */ jsx18(AccordionSection, { title: "Terraform Config", children: /* @__PURE__ */ jsx18(
3178
3214
  TerraformConfigContent,
3179
3215
  {
3180
3216
  terraform: settings.terraform,
@@ -3193,7 +3229,7 @@ function UnifiedSettingsPanel({ engine, onClose, onSaved }) {
3193
3229
  }
3194
3230
  }
3195
3231
  ) }),
3196
- /* @__PURE__ */ jsx17(AccordionSection, { title: "Providers", children: /* @__PURE__ */ jsx17(
3232
+ /* @__PURE__ */ jsx18(AccordionSection, { title: "Providers", children: /* @__PURE__ */ jsx18(
3197
3233
  ProvidersContent,
3198
3234
  {
3199
3235
  providers: settings.providers,
@@ -3211,7 +3247,7 @@ function UnifiedSettingsPanel({ engine, onClose, onSaved }) {
3211
3247
  }
3212
3248
  }
3213
3249
  ) }),
3214
- /* @__PURE__ */ jsx17(AccordionSection, { title: "Locals", children: /* @__PURE__ */ jsx17(
3250
+ /* @__PURE__ */ jsx18(AccordionSection, { title: "Locals", children: /* @__PURE__ */ jsx18(
3215
3251
  LocalsContent,
3216
3252
  {
3217
3253
  locals: settings.locals,
@@ -3234,7 +3270,7 @@ function UnifiedSettingsPanel({ engine, onClose, onSaved }) {
3234
3270
  }
3235
3271
  }
3236
3272
  ) }),
3237
- /* @__PURE__ */ jsx17(AccordionSection, { title: "Environments", children: /* @__PURE__ */ jsx17(
3273
+ /* @__PURE__ */ jsx18(AccordionSection, { title: "Environments", children: /* @__PURE__ */ jsx18(
3238
3274
  EnvironmentsContent,
3239
3275
  {
3240
3276
  environments: settings.environments,
@@ -3250,7 +3286,7 @@ function UnifiedSettingsPanel({ engine, onClose, onSaved }) {
3250
3286
 
3251
3287
  // src/components/SlidePanel.tsx
3252
3288
  import { useEffect as useEffect9, useRef as useRef4, useState as useState15 } from "react";
3253
- import { jsx as jsx18 } from "react/jsx-runtime";
3289
+ import { jsx as jsx19 } from "react/jsx-runtime";
3254
3290
  function SlidePanel({ open, zIndex = 20, children }) {
3255
3291
  const [mounted, setMounted] = useState15(open);
3256
3292
  const [visible, setVisible] = useState15(false);
@@ -3267,7 +3303,7 @@ function SlidePanel({ open, zIndex = 20, children }) {
3267
3303
  return () => clearTimeout(timeoutRef.current);
3268
3304
  }, [open]);
3269
3305
  if (!mounted) return null;
3270
- return /* @__PURE__ */ jsx18(
3306
+ return /* @__PURE__ */ jsx19(
3271
3307
  "div",
3272
3308
  {
3273
3309
  className: "slide-panel",
@@ -3280,7 +3316,7 @@ function SlidePanel({ open, zIndex = 20, children }) {
3280
3316
  // src/components/ValidationErrorBanner.tsx
3281
3317
  import { useState as useState16 } from "react";
3282
3318
  import "./ValidationErrorBanner-G6TBGMK7.css";
3283
- import { Fragment as Fragment10, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
3319
+ import { Fragment as Fragment10, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
3284
3320
  function ValidationErrorDialog({
3285
3321
  diagnostics,
3286
3322
  nodeIds,
@@ -3288,7 +3324,7 @@ function ValidationErrorDialog({
3288
3324
  onOpenFile,
3289
3325
  onClose
3290
3326
  }) {
3291
- return /* @__PURE__ */ jsx19(
3327
+ return /* @__PURE__ */ jsx20(
3292
3328
  "div",
3293
3329
  {
3294
3330
  className: "lace-error-dialog-backdrop",
@@ -3297,7 +3333,7 @@ function ValidationErrorDialog({
3297
3333
  if (e.key === "Escape") onClose();
3298
3334
  },
3299
3335
  role: "presentation",
3300
- children: /* @__PURE__ */ jsxs17(
3336
+ children: /* @__PURE__ */ jsxs18(
3301
3337
  "div",
3302
3338
  {
3303
3339
  className: "lace-error-dialog",
@@ -3307,13 +3343,13 @@ function ValidationErrorDialog({
3307
3343
  onClick: (e) => e.stopPropagation(),
3308
3344
  onKeyDown: (e) => e.stopPropagation(),
3309
3345
  children: [
3310
- /* @__PURE__ */ jsxs17("header", { className: "lace-error-dialog__header", children: [
3311
- /* @__PURE__ */ jsxs17("h2", { id: "lace-error-dialog-title", className: "lace-error-dialog__title", children: [
3346
+ /* @__PURE__ */ jsxs18("header", { className: "lace-error-dialog__header", children: [
3347
+ /* @__PURE__ */ jsxs18("h2", { id: "lace-error-dialog-title", className: "lace-error-dialog__title", children: [
3312
3348
  "Terraform Validation Errors (",
3313
3349
  diagnostics.length,
3314
3350
  ")"
3315
3351
  ] }),
3316
- /* @__PURE__ */ jsx19(
3352
+ /* @__PURE__ */ jsx20(
3317
3353
  "button",
3318
3354
  {
3319
3355
  type: "button",
@@ -3325,7 +3361,7 @@ function ValidationErrorDialog({
3325
3361
  }
3326
3362
  )
3327
3363
  ] }),
3328
- /* @__PURE__ */ jsx19("div", { className: "lace-error-dialog__list", children: diagnostics.map((d, i) => {
3364
+ /* @__PURE__ */ jsx20("div", { className: "lace-error-dialog__list", children: diagnostics.map((d, i) => {
3329
3365
  const nodeId = extractNodeId(d, nodeIds);
3330
3366
  const hasFileLink = !!d.file;
3331
3367
  return (
@@ -3333,9 +3369,9 @@ function ValidationErrorDialog({
3333
3369
  // no reordering, no editing, no per-row state. Index keys
3334
3370
  // are stable for the lifetime of this render.
3335
3371
  // biome-ignore lint/suspicious/noArrayIndexKey: immutable diagnostic snapshot, no row state
3336
- /* @__PURE__ */ jsxs17("div", { className: "lace-error-dialog__item", children: [
3337
- /* @__PURE__ */ jsx19("div", { className: "lace-error-dialog__item-message", children: d.message }),
3338
- hasFileLink && /* @__PURE__ */ jsxs17(
3372
+ /* @__PURE__ */ jsxs18("div", { className: "lace-error-dialog__item", children: [
3373
+ /* @__PURE__ */ jsx20("div", { className: "lace-error-dialog__item-message", children: d.message }),
3374
+ hasFileLink && /* @__PURE__ */ jsxs18(
3339
3375
  "button",
3340
3376
  {
3341
3377
  type: "button",
@@ -3349,7 +3385,7 @@ function ValidationErrorDialog({
3349
3385
  ]
3350
3386
  }
3351
3387
  ),
3352
- nodeId && /* @__PURE__ */ jsx19(
3388
+ nodeId && /* @__PURE__ */ jsx20(
3353
3389
  "button",
3354
3390
  {
3355
3391
  type: "button",
@@ -3376,9 +3412,9 @@ function ValidationErrorBanner({
3376
3412
  }) {
3377
3413
  const [dialogOpen, setDialogOpen] = useState16(false);
3378
3414
  if (diagnostics.length === 0) return null;
3379
- return /* @__PURE__ */ jsxs17(Fragment10, { children: [
3380
- /* @__PURE__ */ jsxs17("div", { className: "lace-error-banner", role: "status", children: [
3381
- /* @__PURE__ */ jsx19(
3415
+ return /* @__PURE__ */ jsxs18(Fragment10, { children: [
3416
+ /* @__PURE__ */ jsxs18("div", { className: "lace-error-banner", role: "status", children: [
3417
+ /* @__PURE__ */ jsx20(
3382
3418
  "svg",
3383
3419
  {
3384
3420
  className: "lace-error-banner__icon",
@@ -3387,11 +3423,11 @@ function ValidationErrorBanner({
3387
3423
  viewBox: "0 0 16 16",
3388
3424
  fill: "currentColor",
3389
3425
  "aria-hidden": "true",
3390
- children: /* @__PURE__ */ jsx19("path", { d: "M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm0 3.5c.28 0 .5.22.5.5v3a.5.5 0 0 1-1 0V5c0-.28.22-.5.5-.5zm0 6a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5z" })
3426
+ children: /* @__PURE__ */ jsx20("path", { d: "M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm0 3.5c.28 0 .5.22.5.5v3a.5.5 0 0 1-1 0V5c0-.28.22-.5.5-.5zm0 6a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5z" })
3391
3427
  }
3392
3428
  ),
3393
- /* @__PURE__ */ jsx19("span", { className: "lace-error-banner__message", children: "Terraform validation failed" }),
3394
- /* @__PURE__ */ jsx19(
3429
+ /* @__PURE__ */ jsx20("span", { className: "lace-error-banner__message", children: "Terraform validation failed" }),
3430
+ /* @__PURE__ */ jsx20(
3395
3431
  "button",
3396
3432
  {
3397
3433
  type: "button",
@@ -3400,7 +3436,7 @@ function ValidationErrorBanner({
3400
3436
  children: "View details"
3401
3437
  }
3402
3438
  ),
3403
- /* @__PURE__ */ jsx19(
3439
+ /* @__PURE__ */ jsx20(
3404
3440
  "button",
3405
3441
  {
3406
3442
  type: "button",
@@ -3412,7 +3448,7 @@ function ValidationErrorBanner({
3412
3448
  }
3413
3449
  )
3414
3450
  ] }),
3415
- dialogOpen && /* @__PURE__ */ jsx19(
3451
+ dialogOpen && /* @__PURE__ */ jsx20(
3416
3452
  ValidationErrorDialog,
3417
3453
  {
3418
3454
  diagnostics,
@@ -3616,6 +3652,7 @@ function useGenerationStatus(showToast) {
3616
3652
  }
3617
3653
  case "stateUpdated":
3618
3654
  case "policyResolution":
3655
+ case "loadError":
3619
3656
  return;
3620
3657
  default:
3621
3658
  assertNever(event);
@@ -4088,7 +4125,7 @@ function applyLocalGroupCollapseOverrides(view, overrides, readOnly) {
4088
4125
  }
4089
4126
 
4090
4127
  // src/Canvas.tsx
4091
- import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
4128
+ import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
4092
4129
  var nodeTypes = {
4093
4130
  moduleNode: ModuleNode_default,
4094
4131
  groupNode: GroupNode_default
@@ -4242,7 +4279,7 @@ function CompositeEditor({
4242
4279
  },
4243
4280
  animated: false
4244
4281
  };
4245
- return /* @__PURE__ */ jsxs18(
4282
+ return /* @__PURE__ */ jsxs19(
4246
4283
  ReactFlow,
4247
4284
  {
4248
4285
  nodes: rfNodes,
@@ -4313,7 +4350,7 @@ function CompositeEditor({
4313
4350
  proOptions: { hideAttribution: true },
4314
4351
  style: { background: "var(--lace-color-bg-canvas)" },
4315
4352
  children: [
4316
- showMiniMap ? /* @__PURE__ */ jsx20(
4353
+ showMiniMap ? /* @__PURE__ */ jsx21(
4317
4354
  MiniMap,
4318
4355
  {
4319
4356
  position: "bottom-left",
@@ -4328,7 +4365,7 @@ function CompositeEditor({
4328
4365
  nodeColor: "var(--lace-color-accent)"
4329
4366
  }
4330
4367
  ) : null,
4331
- /* @__PURE__ */ jsx20(
4368
+ /* @__PURE__ */ jsx21(
4332
4369
  Controls,
4333
4370
  {
4334
4371
  position: "bottom-right",
@@ -4337,7 +4374,7 @@ function CompositeEditor({
4337
4374
  style: { bottom: 20, right: 20 }
4338
4375
  }
4339
4376
  ),
4340
- /* @__PURE__ */ jsx20(
4377
+ /* @__PURE__ */ jsx21(
4341
4378
  ActionBar,
4342
4379
  {
4343
4380
  readOnly,
@@ -4354,11 +4391,11 @@ function CompositeEditor({
4354
4391
  onToggleMiniMap
4355
4392
  }
4356
4393
  ),
4357
- /* @__PURE__ */ jsxs18("svg", { children: [
4358
- /* @__PURE__ */ jsx20("defs", { children: /* @__PURE__ */ jsx20("pattern", { id: "grid", width: "20", height: "20", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx20("circle", { cx: "1", cy: "1", r: "0.5", fill: gridColor }) }) }),
4359
- /* @__PURE__ */ jsx20("rect", { width: "100%", height: "100%", fill: "url(#grid)" })
4394
+ /* @__PURE__ */ jsxs19("svg", { children: [
4395
+ /* @__PURE__ */ jsx21("defs", { children: /* @__PURE__ */ jsx21("pattern", { id: "grid", width: "20", height: "20", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx21("circle", { cx: "1", cy: "1", r: "0.5", fill: gridColor }) }) }),
4396
+ /* @__PURE__ */ jsx21("rect", { width: "100%", height: "100%", fill: "url(#grid)" })
4360
4397
  ] }),
4361
- nodesInitialized ? /* @__PURE__ */ jsx20("div", { hidden: true, "data-rendered": "" }) : null
4398
+ nodesInitialized ? /* @__PURE__ */ jsx21("div", { hidden: true, "data-rendered": "" }) : null
4362
4399
  ]
4363
4400
  }
4364
4401
  );
@@ -4568,8 +4605,11 @@ function Canvas({ height, registryBaseUrl, apiToken }) {
4568
4605
  },
4569
4606
  [engine, dismissContextMenu, showToast]
4570
4607
  );
4608
+ if (state.loadError) {
4609
+ return /* @__PURE__ */ jsx21(ErrorState, { message: state.loadError });
4610
+ }
4571
4611
  if (state.loading || !state.view) {
4572
- return /* @__PURE__ */ jsx20(
4612
+ return /* @__PURE__ */ jsx21(
4573
4613
  "div",
4574
4614
  {
4575
4615
  style: {
@@ -4589,9 +4629,9 @@ function Canvas({ height, registryBaseUrl, apiToken }) {
4589
4629
  localGroupCollapseOverrides,
4590
4630
  readOnly
4591
4631
  );
4592
- return /* @__PURE__ */ jsxs18("div", { style: { position: "relative", display: "flex", flexDirection: "column", height }, children: [
4593
- /* @__PURE__ */ jsx20(Toast, { toast }),
4594
- /* @__PURE__ */ jsx20(
4632
+ return /* @__PURE__ */ jsxs19("div", { style: { position: "relative", display: "flex", flexDirection: "column", height }, children: [
4633
+ /* @__PURE__ */ jsx21(Toast, { toast }),
4634
+ /* @__PURE__ */ jsx21(
4595
4635
  ContextMenu,
4596
4636
  {
4597
4637
  contextMenu,
@@ -4603,7 +4643,7 @@ function Canvas({ height, registryBaseUrl, apiToken }) {
4603
4643
  onDismiss: dismissContextMenu
4604
4644
  }
4605
4645
  ),
4606
- !errorBannerDismissed && validationErrors.length > 0 && !toast && /* @__PURE__ */ jsx20(
4646
+ !errorBannerDismissed && validationErrors.length > 0 && !toast && /* @__PURE__ */ jsx21(
4607
4647
  ValidationErrorBanner,
4608
4648
  {
4609
4649
  diagnostics: validationErrors,
@@ -4615,8 +4655,8 @@ function Canvas({ height, registryBaseUrl, apiToken }) {
4615
4655
  onDismiss: dismissErrorBanner
4616
4656
  }
4617
4657
  ),
4618
- /* @__PURE__ */ jsxs18("div", { style: { position: "relative", flex: "1 1 auto", minHeight: 0 }, children: [
4619
- /* @__PURE__ */ jsx20(
4658
+ /* @__PURE__ */ jsxs19("div", { style: { position: "relative", flex: "1 1 auto", minHeight: 0 }, children: [
4659
+ /* @__PURE__ */ jsx21(
4620
4660
  CompositeEditor,
4621
4661
  {
4622
4662
  view,
@@ -4647,7 +4687,7 @@ function Canvas({ height, registryBaseUrl, apiToken }) {
4647
4687
  viewportIntentSeq: state.viewportIntentSeq
4648
4688
  }
4649
4689
  ),
4650
- /* @__PURE__ */ jsx20(SlidePanel, { open: !!configTarget, children: configTarget && /* @__PURE__ */ jsx20(
4690
+ /* @__PURE__ */ jsx21(SlidePanel, { open: !!configTarget, children: configTarget && /* @__PURE__ */ jsx21(
4651
4691
  ModuleConfigPanel,
4652
4692
  {
4653
4693
  instance_id: configTarget,
@@ -4656,7 +4696,7 @@ function Canvas({ height, registryBaseUrl, apiToken }) {
4656
4696
  onModified: clearNew
4657
4697
  }
4658
4698
  ) }),
4659
- /* @__PURE__ */ jsx20(SlidePanel, { open: !!selectedEdge, zIndex: 40, children: selectedEdge && /* @__PURE__ */ jsx20(
4699
+ /* @__PURE__ */ jsx21(SlidePanel, { open: !!selectedEdge, zIndex: 40, children: selectedEdge && /* @__PURE__ */ jsx21(
4660
4700
  EdgeInspectorPanel,
4661
4701
  {
4662
4702
  source: selectedEdge.source,
@@ -4667,7 +4707,7 @@ function Canvas({ height, registryBaseUrl, apiToken }) {
4667
4707
  onClose: clearSelectedEdge
4668
4708
  }
4669
4709
  ) }),
4670
- /* @__PURE__ */ jsx20(SlidePanel, { open: settingsOpen, children: settingsOpen && /* @__PURE__ */ jsx20(
4710
+ /* @__PURE__ */ jsx21(SlidePanel, { open: settingsOpen, children: settingsOpen && /* @__PURE__ */ jsx21(
4671
4711
  UnifiedSettingsPanel,
4672
4712
  {
4673
4713
  engine,
@@ -4675,7 +4715,7 @@ function Canvas({ height, registryBaseUrl, apiToken }) {
4675
4715
  onSaved: () => showToast("Settings saved", "success")
4676
4716
  }
4677
4717
  ) }),
4678
- !readOnly && /* @__PURE__ */ jsx20(SlidePanel, { open: policyOpen, children: policyOpen && /* @__PURE__ */ jsx20(
4718
+ !readOnly && /* @__PURE__ */ jsx21(SlidePanel, { open: policyOpen, children: policyOpen && /* @__PURE__ */ jsx21(
4679
4719
  PolicySidebar,
4680
4720
  {
4681
4721
  resolution: policyResolution,
@@ -4683,7 +4723,7 @@ function Canvas({ height, registryBaseUrl, apiToken }) {
4683
4723
  onClose: () => setPolicyOpen(false)
4684
4724
  }
4685
4725
  ) }),
4686
- canBrowseRegistry && /* @__PURE__ */ jsx20(SlidePanel, { open: registryOpen, children: registryOpen && /* @__PURE__ */ jsx20(
4726
+ canBrowseRegistry && /* @__PURE__ */ jsx21(SlidePanel, { open: registryOpen, children: registryOpen && /* @__PURE__ */ jsx21(
4687
4727
  RegistryBrowser,
4688
4728
  {
4689
4729
  engine,
@@ -4697,41 +4737,6 @@ function Canvas({ height, registryBaseUrl, apiToken }) {
4697
4737
  ] });
4698
4738
  }
4699
4739
 
4700
- // src/components/ErrorBoundary.tsx
4701
- import React from "react";
4702
- import "./ErrorBoundary-IXSIVZFH.css";
4703
- import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
4704
- function ErrorState({ message }) {
4705
- return /* @__PURE__ */ jsxs19("div", { className: "lace-error-state", role: "alert", children: [
4706
- /* @__PURE__ */ jsx21("h3", { className: "lace-error-state__title", children: "Something went wrong" }),
4707
- /* @__PURE__ */ jsx21("pre", { className: "lace-error-state__message", children: message }),
4708
- /* @__PURE__ */ jsx21(
4709
- "button",
4710
- {
4711
- type: "button",
4712
- className: "lace-error-state__reload",
4713
- onClick: () => window.location.reload(),
4714
- children: "Reload"
4715
- }
4716
- )
4717
- ] });
4718
- }
4719
- var ErrorBoundary = class extends React.Component {
4720
- constructor() {
4721
- super(...arguments);
4722
- this.state = { error: null };
4723
- }
4724
- static getDerivedStateFromError(error) {
4725
- return { error };
4726
- }
4727
- render() {
4728
- if (this.state.error) {
4729
- return /* @__PURE__ */ jsx21(ErrorState, { message: this.state.error.message });
4730
- }
4731
- return this.props.children;
4732
- }
4733
- };
4734
-
4735
4740
  // src/hooks/useWindowEvent.ts
4736
4741
  import { useEffect as useEffect16, useRef as useRef9 } from "react";
4737
4742
  function useWindowEvent(eventName, handler, options) {
@@ -4764,7 +4769,8 @@ function App({
4764
4769
  loading: true,
4765
4770
  generation: 0,
4766
4771
  viewportIntent: null,
4767
- viewportIntentSeq: 0
4772
+ viewportIntentSeq: 0,
4773
+ loadError: null
4768
4774
  });
4769
4775
  const [localGroupCollapseOverrides, setLocalGroupCollapseOverrides] = useState24({});
4770
4776
  const toggleLocalGroupCollapse = useCallback21((groupId, currentCollapsed) => {
@@ -4783,8 +4789,11 @@ function App({
4783
4789
  loading: false,
4784
4790
  generation: prev.generation + 1,
4785
4791
  viewportIntent,
4786
- viewportIntentSeq: prev.viewportIntentSeq + (viewportIntent ? 1 : 0)
4792
+ viewportIntentSeq: prev.viewportIntentSeq + (viewportIntent ? 1 : 0),
4793
+ loadError: null
4787
4794
  }));
4795
+ } else if (event.type === "loadError") {
4796
+ setState((prev) => ({ ...prev, loading: false, loadError: event.message }));
4788
4797
  }
4789
4798
  });
4790
4799
  }, [engine]);
@@ -7927,7 +7936,7 @@ var TerraformBlock_RequiredProvidersEntry = {
7927
7936
  }
7928
7937
  };
7929
7938
  function createBaseProviderRequirement() {
7930
- return { source: "", version: "" };
7939
+ return { source: "", version: "", configuration_aliases: [] };
7931
7940
  }
7932
7941
  var ProviderRequirement = {
7933
7942
  encode(message, writer = new BinaryWriter3()) {
@@ -7937,6 +7946,9 @@ var ProviderRequirement = {
7937
7946
  if (message.version !== "") {
7938
7947
  writer.uint32(18).string(message.version);
7939
7948
  }
7949
+ for (const v of message.configuration_aliases) {
7950
+ writer.uint32(26).string(v);
7951
+ }
7940
7952
  return writer;
7941
7953
  },
7942
7954
  decode(input, length) {
@@ -7960,6 +7972,13 @@ var ProviderRequirement = {
7960
7972
  message.version = reader.string();
7961
7973
  continue;
7962
7974
  }
7975
+ case 3: {
7976
+ if (tag !== 26) {
7977
+ break;
7978
+ }
7979
+ message.configuration_aliases.push(reader.string());
7980
+ continue;
7981
+ }
7963
7982
  }
7964
7983
  if ((tag & 7) === 4 || tag === 0) {
7965
7984
  break;
@@ -7971,7 +7990,8 @@ var ProviderRequirement = {
7971
7990
  fromJSON(object) {
7972
7991
  return {
7973
7992
  source: isSet2(object.source) ? globalThis.String(object.source) : "",
7974
- version: isSet2(object.version) ? globalThis.String(object.version) : ""
7993
+ version: isSet2(object.version) ? globalThis.String(object.version) : "",
7994
+ configuration_aliases: globalThis.Array.isArray(object?.configurationAliases) ? object.configurationAliases.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.configuration_aliases) ? object.configuration_aliases.map((e) => globalThis.String(e)) : []
7975
7995
  };
7976
7996
  },
7977
7997
  toJSON(message) {
@@ -7982,6 +8002,9 @@ var ProviderRequirement = {
7982
8002
  if (message.version !== "") {
7983
8003
  obj.version = message.version;
7984
8004
  }
8005
+ if (message.configuration_aliases?.length) {
8006
+ obj.configurationAliases = message.configuration_aliases;
8007
+ }
7985
8008
  return obj;
7986
8009
  },
7987
8010
  create(base) {
@@ -7991,6 +8014,7 @@ var ProviderRequirement = {
7991
8014
  const message = createBaseProviderRequirement();
7992
8015
  message.source = object.source ?? "";
7993
8016
  message.version = object.version ?? "";
8017
+ message.configuration_aliases = object.configuration_aliases?.map((e) => e) || [];
7994
8018
  return message;
7995
8019
  }
7996
8020
  };
@@ -18428,12 +18452,11 @@ var SnapshotCanvasEngine = class {
18428
18452
  throw new Error("SnapshotCanvasEngine: no view and no URLs to fetch");
18429
18453
  }
18430
18454
  this.loadPromise = (async () => {
18431
- const [bundleBytes, layoutsBytes] = await Promise.all([
18455
+ const [bundleBytes, layouts] = await Promise.all([
18432
18456
  this.fetchBytes(input.bundleUrl, "bundle", input.headers),
18433
- this.fetchBytes(input.layoutsUrl, "layouts", input.headers)
18457
+ this.fetchLayouts(input.layoutsUrl, input.headers)
18434
18458
  ]);
18435
18459
  const bundle = Bundle.decode(bundleBytes);
18436
- const layouts = LayoutsMap.decode(layoutsBytes).layouts ?? {};
18437
18460
  const view = this.projectInput(bundle, layouts, input.meta ?? {});
18438
18461
  this.view = view;
18439
18462
  return view;
@@ -18455,6 +18478,22 @@ var SnapshotCanvasEngine = class {
18455
18478
  }
18456
18479
  return new Uint8Array(await res.arrayBuffer());
18457
18480
  }
18481
+ // Layouts are an optional overlay, not IR — see the comment at the
18482
+ // `Promise.all` call site. A FETCH failure here (most commonly a Run
18483
+ // with no layoutsR2Key, 404) is not an engine-load failure; it degrades
18484
+ // to the same empty layouts map the in-process constructor accepts. A
18485
+ // DECODE failure is different — corrupt or truncated bytes are real
18486
+ // breakage, not an absent-layouts 404 — so `decode` stays outside the
18487
+ // catch and still surfaces as `loadError`.
18488
+ async fetchLayouts(url, headers) {
18489
+ let bytes;
18490
+ try {
18491
+ bytes = await this.fetchBytes(url, "layouts", headers);
18492
+ } catch {
18493
+ return {};
18494
+ }
18495
+ return LayoutsMap.decode(bytes).layouts ?? {};
18496
+ }
18458
18497
  getCurrentView() {
18459
18498
  return this.view;
18460
18499
  }
@@ -18605,7 +18644,12 @@ var SnapshotCanvasEngine = class {
18605
18644
  const view = this.view;
18606
18645
  queueMicrotask(() => deliver(view));
18607
18646
  } else {
18608
- void this.loadView().then(deliver).catch(() => {
18647
+ void this.loadView().then(deliver).catch((err) => {
18648
+ if (cancelled) return;
18649
+ listener({
18650
+ type: "loadError",
18651
+ message: err instanceof Error ? err.message : String(err)
18652
+ });
18609
18653
  });
18610
18654
  }
18611
18655
  return () => {