@lace-cloud/canvas 0.22.0 → 0.24.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
@@ -4,6 +4,7 @@ import {
4
4
  COMMANDS,
5
5
  CommandDetachedError,
6
6
  CommandExitError,
7
+ CommandUnobservedError,
7
8
  ConnectError,
8
9
  EMPTY_REPORT_FOLD,
9
10
  MODULE_COMMAND_ACTIONS,
@@ -33,7 +34,7 @@ import {
33
34
  rowActions,
34
35
  toArgv,
35
36
  uniqueDiagnostics
36
- } from "./chunk-WNBCPSQJ.mjs";
37
+ } from "./chunk-HZWABSPP.mjs";
37
38
 
38
39
  // src/index.ts
39
40
  import { projectCanvasView as projectCanvasView2 } from "@lace-cloud/proto";
@@ -46,8 +47,8 @@ import {
46
47
  useCallback as useCallback14,
47
48
  useEffect as useEffect11,
48
49
  useMemo as useMemo9,
49
- useRef as useRef11,
50
- useState as useState23,
50
+ useRef as useRef10,
51
+ useState as useState22,
51
52
  useSyncExternalStore
52
53
  } from "react";
53
54
  import "./App-IFIOMNV7.css";
@@ -63,7 +64,7 @@ import {
63
64
  useNodesInitialized,
64
65
  useReactFlow as useReactFlow2
65
66
  } from "@xyflow/react";
66
- import { useCallback as useCallback5, useEffect as useEffect7, useMemo as useMemo3, useRef as useRef7, useState as useState9 } from "react";
67
+ import { useCallback as useCallback5, useEffect as useEffect7, useMemo as useMemo3, useRef as useRef6, useState as useState8 } from "react";
67
68
 
68
69
  // src/components/CanvasControls.tsx
69
70
  import { IconButton } from "@lace-cloud/ui";
@@ -2029,52 +2030,10 @@ var ModuleNode = ({ id, data }) => {
2029
2030
  var ModuleNode_default = ModuleNode;
2030
2031
 
2031
2032
  // src/components/PaperGrid.tsx
2032
- import { useStore as useStore4 } from "@xyflow/react";
2033
- import { useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState6 } from "react";
2034
-
2035
- // src/utils/style-vars.ts
2036
- function readTokenPx(el, name) {
2037
- return Number.parseFloat(getComputedStyle(el).getPropertyValue(name));
2038
- }
2039
-
2040
- // src/components/PaperGrid.tsx
2041
- import "./PaperGrid-WFRL3N4P.css";
2033
+ import "./PaperGrid-JG4GBRDP.css";
2042
2034
  import { jsx as jsx9 } from "react/jsx-runtime";
2043
- var FADE_FROM = 6;
2044
- var FADE_TO = 12;
2045
- function threadStrength(pitch) {
2046
- return Math.min(1, Math.max(0, (pitch - FADE_FROM) / (FADE_TO - FADE_FROM)));
2047
- }
2048
- function readPaperPitch(el) {
2049
- const fine = readTokenPx(el, "--lace-canvas-paper-pitch-fine");
2050
- const major = readTokenPx(el, "--lace-canvas-paper-pitch-major");
2051
- return fine > 0 && major > 0 ? { fine, major } : null;
2052
- }
2053
- var transformOf = (s) => s.transform;
2054
2035
  function PaperGrid() {
2055
- const ref = useRef5(null);
2056
- const [pitch, setPitch] = useState6(null);
2057
- useLayoutEffect2(() => {
2058
- if (ref.current) setPitch(readPaperPitch(ref.current));
2059
- }, []);
2060
- const [x, y, zoom] = useStore4(transformOf);
2061
- const strength = (px) => `${Math.round(threadStrength((px ?? 0) * zoom) * 100)}%`;
2062
- const style = {
2063
- "--paper-x": `${x}px`,
2064
- "--paper-y": `${y}px`,
2065
- "--paper-zoom": zoom,
2066
- "--paper-fine": strength(pitch?.fine),
2067
- "--paper-major": strength(pitch?.major)
2068
- };
2069
- return /* @__PURE__ */ jsx9(
2070
- "div",
2071
- {
2072
- ref,
2073
- className: "lace-paper-layers lace-canvas-paper",
2074
- style,
2075
- "aria-hidden": "true"
2076
- }
2077
- );
2036
+ return /* @__PURE__ */ jsx9("div", { className: "lace-paper-layers lace-canvas-paper", "aria-hidden": "true" });
2078
2037
  }
2079
2038
 
2080
2039
  // src/core/use-action-keys.ts
@@ -2163,9 +2122,9 @@ function useActionKeys(actions, ctx, runner, envExtras) {
2163
2122
  }
2164
2123
 
2165
2124
  // src/hooks/useContextMenu.ts
2166
- import { useCallback as useCallback3, useState as useState7 } from "react";
2125
+ import { useCallback as useCallback3, useState as useState6 } from "react";
2167
2126
  function useContextMenu() {
2168
- const [contextMenu, setContextMenu] = useState7(null);
2127
+ const [contextMenu, setContextMenu] = useState6(null);
2169
2128
  const showContextMenu = useCallback3((request) => {
2170
2129
  setContextMenu({
2171
2130
  x: request.x,
@@ -2296,11 +2255,11 @@ function renderEdgeToRfEdge(e) {
2296
2255
  }
2297
2256
 
2298
2257
  // src/hooks/useNewNodeTracking.ts
2299
- import { useCallback as useCallback4, useEffect as useEffect6, useRef as useRef6, useState as useState8 } from "react";
2258
+ import { useCallback as useCallback4, useEffect as useEffect6, useRef as useRef5, useState as useState7 } from "react";
2300
2259
  function useNewNodeTracking(view) {
2301
- const [newNodeIds, setNewNodeIds] = useState8(/* @__PURE__ */ new Set());
2302
- const prevNodeIdsRef = useRef6(/* @__PURE__ */ new Set());
2303
- const sessionLoadedRef = useRef6(false);
2260
+ const [newNodeIds, setNewNodeIds] = useState7(/* @__PURE__ */ new Set());
2261
+ const prevNodeIdsRef = useRef5(/* @__PURE__ */ new Set());
2262
+ const sessionLoadedRef = useRef5(false);
2304
2263
  useEffect6(() => {
2305
2264
  if (!view) return;
2306
2265
  const currentIds = new Set(view.nodes.map((n) => n.id));
@@ -2412,7 +2371,7 @@ function CompositeEditor({
2412
2371
  layout.panIntoView(withMargin(bounds, REVEAL_MARGIN, getViewport().zoom));
2413
2372
  });
2414
2373
  }, [registerGoToNode, getNode, getNodesBounds, getViewport, layout]);
2415
- const focusRef = useRef7(focusIds);
2374
+ const focusRef = useRef6(focusIds);
2416
2375
  focusRef.current = focusIds;
2417
2376
  useEffect7(() => {
2418
2377
  const pane = paneRef.current;
@@ -2464,7 +2423,7 @@ function CompositeEditor({
2464
2423
  );
2465
2424
  };
2466
2425
  }, [layout, getViewport, setViewport, paneRef]);
2467
- const firedRef = useRef7(false);
2426
+ const firedRef = useRef6(false);
2468
2427
  useEffect7(() => {
2469
2428
  if (firedRef.current || !nodesInitialized || view.nodes.length === 0) return;
2470
2429
  firedRef.current = true;
@@ -2472,7 +2431,7 @@ function CompositeEditor({
2472
2431
  }, [nodesInitialized, view.nodes.length, fitView]);
2473
2432
  const groupLogic = useGroupLogic(view.nodes, view.edges, view.groups, newNodeIds, decorations);
2474
2433
  const rfEdgesFromView = groupLogic.rfEdges;
2475
- const [rfEdges, setRfEdges] = useState9(rfEdgesFromView);
2434
+ const [rfEdges, setRfEdges] = useState8(rfEdgesFromView);
2476
2435
  useEffect7(() => {
2477
2436
  setRfEdges(rfEdgesFromView);
2478
2437
  }, [rfEdgesFromView]);
@@ -2480,7 +2439,7 @@ function CompositeEditor({
2480
2439
  setRfEdges((prev) => applyEdgeChanges(changes, prev));
2481
2440
  }, []);
2482
2441
  const rfNodesFromView = groupLogic.rfNodes;
2483
- const [rfNodes, setRfNodes] = useState9(rfNodesFromView);
2442
+ const [rfNodes, setRfNodes] = useState8(rfNodesFromView);
2484
2443
  useEffect7(() => {
2485
2444
  setRfNodes((prev) => {
2486
2445
  const current = new Map(prev.map((n) => [n.id, n]));
@@ -2593,8 +2552,8 @@ function Canvas({ height }) {
2593
2552
  );
2594
2553
  const { contextMenu, showContextMenu, dismissContextMenu } = useContextMenu();
2595
2554
  const { newNodeIds } = useNewNodeTracking(view);
2596
- const paneRef = useRef7(null);
2597
- const surfaceRef = useRef7(null);
2555
+ const paneRef = useRef6(null);
2556
+ const surfaceRef = useRef6(null);
2598
2557
  useEffect7(() => {
2599
2558
  registerKeyTarget(ctx, "surface", surfaceRef.current);
2600
2559
  return () => registerKeyTarget(ctx, "surface", null);
@@ -2603,7 +2562,7 @@ function Canvas({ height }) {
2603
2562
  if (isFormTarget(e.target)) return;
2604
2563
  surfaceRef.current?.focus();
2605
2564
  }, []);
2606
- const goToNodeRef = useRef7(null);
2565
+ const goToNodeRef = useRef6(null);
2607
2566
  const registerGoToNode = useCallback5((fn) => {
2608
2567
  goToNodeRef.current = fn;
2609
2568
  }, []);
@@ -2763,7 +2722,14 @@ function Canvas({ height }) {
2763
2722
  }
2764
2723
 
2765
2724
  // src/components/Drawer.tsx
2766
- import { useCallback as useCallback6, useLayoutEffect as useLayoutEffect3, useRef as useRef8, useState as useState10 } from "react";
2725
+ import { useCallback as useCallback6, useLayoutEffect as useLayoutEffect2, useRef as useRef7, useState as useState9 } from "react";
2726
+
2727
+ // src/utils/style-vars.ts
2728
+ function readTokenPx(el, name) {
2729
+ return Number.parseFloat(getComputedStyle(el).getPropertyValue(name));
2730
+ }
2731
+
2732
+ // src/components/Drawer.tsx
2767
2733
  import "./Drawer-34ZYTEWE.css";
2768
2734
  import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
2769
2735
  var KEY_STEP = 16;
@@ -2777,15 +2743,15 @@ function clampWidth(width, bounds) {
2777
2743
  return Math.min(bounds.max, Math.max(bounds.min, width));
2778
2744
  }
2779
2745
  function Drawer({ label, children }) {
2780
- const ref = useRef8(null);
2781
- const [bounds, setBounds] = useState10(null);
2782
- const [width, setWidth] = useState10(null);
2783
- const [measured, setMeasured] = useState10(0);
2784
- const drag = useRef8(null);
2785
- useLayoutEffect3(() => {
2746
+ const ref = useRef7(null);
2747
+ const [bounds, setBounds] = useState9(null);
2748
+ const [width, setWidth] = useState9(null);
2749
+ const [measured, setMeasured] = useState9(0);
2750
+ const drag = useRef7(null);
2751
+ useLayoutEffect2(() => {
2786
2752
  if (ref.current) setBounds(readDrawerBounds(ref.current));
2787
2753
  }, []);
2788
- useLayoutEffect3(() => {
2754
+ useLayoutEffect2(() => {
2789
2755
  if (ref.current) setMeasured(Math.round(ref.current.getBoundingClientRect().width));
2790
2756
  }, [width]);
2791
2757
  const onPointerDown = useCallback6((e) => {
@@ -2938,7 +2904,7 @@ function ToolbarAction({ action, disabledReason: disabledReason2, emphasized, bu
2938
2904
  }
2939
2905
 
2940
2906
  // src/core/CommandArgsForm.tsx
2941
- import { useState as useState11 } from "react";
2907
+ import { useState as useState10 } from "react";
2942
2908
  import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
2943
2909
  function isCommandPath(path) {
2944
2910
  return path in COMMANDS;
@@ -2947,7 +2913,7 @@ function flagsOf(path) {
2947
2913
  return COMMANDS[path].flags;
2948
2914
  }
2949
2915
  function CommandArgsForm({ form }) {
2950
- const [values, setValues] = useState11({});
2916
+ const [values, setValues] = useState10({});
2951
2917
  if (!form) return null;
2952
2918
  const flags = isCommandPath(form.path) ? flagsOf(form.path) : {};
2953
2919
  return /* @__PURE__ */ jsxs9(
@@ -2997,7 +2963,7 @@ import { nodeIdForAddress } from "@lace-cloud/proto";
2997
2963
  import { useMemo as useMemo6 } from "react";
2998
2964
 
2999
2965
  // src/core/use-command-read.ts
3000
- import { useEffect as useEffect8, useMemo as useMemo5, useRef as useRef9, useState as useState12 } from "react";
2966
+ import { useEffect as useEffect8, useMemo as useMemo5, useRef as useRef8, useState as useState11 } from "react";
3001
2967
 
3002
2968
  // src/core/panel-scope.tsx
3003
2969
  import { createContext as createContext3, useContext as useContext3, useMemo as useMemo4 } from "react";
@@ -3055,15 +3021,15 @@ function useCommandRead(read, target) {
3055
3021
  const effectiveTarget = target ?? scope.target;
3056
3022
  const args = read.args(scope.ctx, effectiveTarget);
3057
3023
  const key = args === null ? null : stableJson(args);
3058
- const [state, setState] = useState12(INITIAL);
3059
- const prevKeyRef = useRef9(NOT_YET_READ);
3024
+ const [state, setState] = useState11(INITIAL);
3025
+ const prevKeyRef = useRef8(NOT_YET_READ);
3060
3026
  const inputs = {
3061
3027
  path: read.path,
3062
3028
  args,
3063
3029
  commands: scope.ctx.ports.commands,
3064
3030
  reportError: scope.reportError
3065
3031
  };
3066
- const inputsRef = useRef9(inputs);
3032
+ const inputsRef = useRef8(inputs);
3067
3033
  useEffect8(() => {
3068
3034
  inputsRef.current = inputs;
3069
3035
  });
@@ -3165,7 +3131,7 @@ var describeOverlay = defineOverlay({
3165
3131
  decorate: decorateDescribe
3166
3132
  });
3167
3133
 
3168
- // src/core/panels/ConflictBanner.tsx
3134
+ // src/core/panels/RowActionBanner.tsx
3169
3135
  import { Button as Button2 } from "@lace-cloud/ui";
3170
3136
 
3171
3137
  // src/components/Banner.tsx
@@ -3186,25 +3152,30 @@ function Banner({ severity, message, className, actions }) {
3186
3152
  );
3187
3153
  }
3188
3154
 
3189
- // src/core/panels/ConflictBanner.tsx
3155
+ // src/core/panels/RowActionBanner.tsx
3190
3156
  import { jsx as jsx17 } from "react/jsx-runtime";
3191
- function ConflictBanner({ ctx }) {
3157
+ function bannerMessage(opening, actions) {
3158
+ return [opening, ...actions.flatMap((action) => action.choice ? [action.choice] : [])].join(
3159
+ " "
3160
+ );
3161
+ }
3162
+ function RowActionBanner({ ctx, panelId, severity, className, opening }) {
3192
3163
  const { runner } = useCanvas();
3193
3164
  const envExtras = useEditorEnvExtras();
3194
- const actions = rowActionsFor(ctx, "conflict");
3165
+ const actions = rowActionsFor(ctx, panelId);
3195
3166
  return /* @__PURE__ */ jsx17(
3196
3167
  Banner,
3197
3168
  {
3198
- severity: "warning",
3199
- className: "lace-conflict-banner",
3200
- message: "The module's .tf files changed outside the canvas while it held edits of its own.",
3201
- actions: actions.map((action) => /* @__PURE__ */ jsx17(
3169
+ severity,
3170
+ className,
3171
+ message: bannerMessage(opening, actions),
3172
+ actions: actions.length === 0 ? void 0 : actions.map((action) => /* @__PURE__ */ jsx17(
3202
3173
  Button2,
3203
3174
  {
3204
3175
  rung: true,
3205
3176
  size: "sm",
3206
3177
  variant: "secondary",
3207
- className: `lace-conflict-banner__${action.id}`,
3178
+ className: `${className}__${action.id}`,
3208
3179
  onClick: () => void runner.run(action, ctx, {}, envExtras),
3209
3180
  children: action.label
3210
3181
  },
@@ -3213,6 +3184,21 @@ function ConflictBanner({ ctx }) {
3213
3184
  }
3214
3185
  );
3215
3186
  }
3187
+
3188
+ // src/core/panels/ConflictBanner.tsx
3189
+ import { jsx as jsx18 } from "react/jsx-runtime";
3190
+ function ConflictBanner({ ctx }) {
3191
+ return /* @__PURE__ */ jsx18(
3192
+ RowActionBanner,
3193
+ {
3194
+ ctx,
3195
+ panelId: "conflict",
3196
+ severity: "warning",
3197
+ className: "lace-conflict-banner",
3198
+ opening: "The module's .tf files changed outside the canvas while it held edits of its own."
3199
+ }
3200
+ );
3201
+ }
3216
3202
  var conflictPanel = {
3217
3203
  id: "conflict",
3218
3204
  title: "Conflict",
@@ -3228,15 +3214,15 @@ import { Button as Button3 } from "@lace-cloud/ui";
3228
3214
  // src/components/Identifier.tsx
3229
3215
  import { Fragment as Fragment5 } from "react";
3230
3216
  import "./Identifier-V6MZ37EG.css";
3231
- import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
3217
+ import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
3232
3218
  function identifierSegments(text) {
3233
3219
  return text.split(/(?<=[_.])/);
3234
3220
  }
3235
3221
  function Identifier({ text, className }) {
3236
- return /* @__PURE__ */ jsx18("span", { className: className ? `lace-identifier ${className}` : "lace-identifier", children: identifierSegments(text).map((segment, i) => (
3222
+ return /* @__PURE__ */ jsx19("span", { className: className ? `lace-identifier ${className}` : "lace-identifier", children: identifierSegments(text).map((segment, i) => (
3237
3223
  // biome-ignore lint/suspicious/noArrayIndexKey: a segment's place in the name is its identity.
3238
3224
  /* @__PURE__ */ jsxs11(Fragment5, { children: [
3239
- i > 0 ? /* @__PURE__ */ jsx18("wbr", {}) : null,
3225
+ i > 0 ? /* @__PURE__ */ jsx19("wbr", {}) : null,
3240
3226
  segment
3241
3227
  ] }, i)
3242
3228
  )) });
@@ -3244,7 +3230,7 @@ function Identifier({ text, className }) {
3244
3230
 
3245
3231
  // src/core/panels/DiagnosticsPanel.tsx
3246
3232
  import "./DiagnosticsPanel-T6VDHH4A.css";
3247
- import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
3233
+ import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
3248
3234
  function rowKey(d, index) {
3249
3235
  return `${d.severity}:${d.module_key ?? ""}.${d.instance_id ?? ""}:${index}`;
3250
3236
  }
@@ -3252,7 +3238,7 @@ function DiagnosticsPanel({ ctx }) {
3252
3238
  const { runner } = useCanvas();
3253
3239
  const envExtras = useEditorEnvExtras();
3254
3240
  const diagnostics = ctx.diagnostics;
3255
- return /* @__PURE__ */ jsx19("ul", { className: "lace-diagnostics-panel", role: "list", children: diagnostics.map((d, index) => {
3241
+ return /* @__PURE__ */ jsx20("ul", { className: "lace-diagnostics-panel", role: "list", children: diagnostics.map((d, index) => {
3256
3242
  const key = rowKey(d, index);
3257
3243
  const target = { diagnostic: d };
3258
3244
  const actions = rowActionsFor(ctx, "diagnostics", target);
@@ -3261,18 +3247,18 @@ function DiagnosticsPanel({ ctx }) {
3261
3247
  {
3262
3248
  className: `lace-diagnostics-panel__row lace-diagnostics-panel__row--${d.severity}`,
3263
3249
  children: [
3264
- /* @__PURE__ */ jsx19("span", { className: "lace-diagnostics-panel__icon", children: /* @__PURE__ */ jsx19(CanvasIcon, { name: d.severity }) }),
3250
+ /* @__PURE__ */ jsx20("span", { className: "lace-diagnostics-panel__icon", children: /* @__PURE__ */ jsx20(CanvasIcon, { name: d.severity }) }),
3265
3251
  /* @__PURE__ */ jsxs12("span", { className: "lace-diagnostics-panel__body", children: [
3266
- /* @__PURE__ */ jsx19("span", { className: "lace-diagnostics-panel__message", children: d.message }),
3267
- d.instance_id !== void 0 && /* @__PURE__ */ jsx19(
3252
+ /* @__PURE__ */ jsx20("span", { className: "lace-diagnostics-panel__message", children: d.message }),
3253
+ d.instance_id !== void 0 && /* @__PURE__ */ jsx20(
3268
3254
  Identifier,
3269
3255
  {
3270
3256
  className: "lace-diagnostics-panel__where",
3271
3257
  text: d.input_name ? `${d.instance_id}.${d.input_name}` : d.instance_id
3272
3258
  }
3273
3259
  ),
3274
- d.code !== void 0 && /* @__PURE__ */ jsx19(Identifier, { className: "lace-diagnostics-panel__code", text: d.code }),
3275
- actions.map((action) => /* @__PURE__ */ jsx19(
3260
+ d.code !== void 0 && /* @__PURE__ */ jsx20(Identifier, { className: "lace-diagnostics-panel__code", text: d.code }),
3261
+ actions.map((action) => /* @__PURE__ */ jsx20(
3276
3262
  Button3,
3277
3263
  {
3278
3264
  rung: true,
@@ -3311,7 +3297,7 @@ import { createElement } from "react";
3311
3297
  import { callText } from "@lace-cloud/proto";
3312
3298
  import { Button as Button4, Panel } from "@lace-cloud/ui";
3313
3299
  import "./EdgeInspectorPanel-JD6CVUAT.css";
3314
- import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
3300
+ import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
3315
3301
  function EdgeInspectorPanel({
3316
3302
  source,
3317
3303
  target,
@@ -3321,22 +3307,22 @@ function EdgeInspectorPanel({
3321
3307
  onClose
3322
3308
  }) {
3323
3309
  const title = /* @__PURE__ */ jsxs13("div", { children: [
3324
- /* @__PURE__ */ jsx20("div", { className: "lace-edge-panel__title-eyebrow", children: "Connection" }),
3310
+ /* @__PURE__ */ jsx21("div", { className: "lace-edge-panel__title-eyebrow", children: "Connection" }),
3325
3311
  /* @__PURE__ */ jsxs13("div", { className: "lace-edge-panel__title", children: [
3326
- /* @__PURE__ */ jsx20(Identifier, { text: source }),
3312
+ /* @__PURE__ */ jsx21(Identifier, { text: source }),
3327
3313
  " \u2192 ",
3328
- /* @__PURE__ */ jsx20(Identifier, { text: target })
3314
+ /* @__PURE__ */ jsx21(Identifier, { text: target })
3329
3315
  ] })
3330
3316
  ] });
3331
- const footer = onDelete ? /* @__PURE__ */ jsx20(Button4, { rung: true, variant: "danger", fullWidth: true, onClick: onDelete, children: "Delete connection" }) : void 0;
3317
+ const footer = onDelete ? /* @__PURE__ */ jsx21(Button4, { rung: true, variant: "danger", fullWidth: true, onClick: onDelete, children: "Delete connection" }) : void 0;
3332
3318
  return /* @__PURE__ */ jsxs13(Panel, { title, footer, onClose, children: [
3333
- /* @__PURE__ */ jsx20("div", { className: "lace-edge-panel__section-label", children: "Wiring" }),
3319
+ /* @__PURE__ */ jsx21("div", { className: "lace-edge-panel__section-label", children: "Wiring" }),
3334
3320
  /* @__PURE__ */ jsxs13("div", { className: "lace-edge-panel__wiring", children: [
3335
- /* @__PURE__ */ jsx20(Identifier, { text: sourceOutput ? `${source}.outputs.${sourceOutput}` : callText(source) }),
3336
- /* @__PURE__ */ jsx20("div", { className: "lace-edge-panel__wiring-arrow", children: "\u2193" }),
3337
- /* @__PURE__ */ jsx20(Identifier, { text: `${target}.inputs.${targetInput}` })
3321
+ /* @__PURE__ */ jsx21(Identifier, { text: sourceOutput ? `${source}.outputs.${sourceOutput}` : callText(source) }),
3322
+ /* @__PURE__ */ jsx21("div", { className: "lace-edge-panel__wiring-arrow", children: "\u2193" }),
3323
+ /* @__PURE__ */ jsx21(Identifier, { text: `${target}.inputs.${targetInput}` })
3338
3324
  ] }),
3339
- onDelete && /* @__PURE__ */ jsx20("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." })
3325
+ onDelete && /* @__PURE__ */ jsx21("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." })
3340
3326
  ] });
3341
3327
  }
3342
3328
 
@@ -3395,9 +3381,9 @@ var edgeInspectorPanel = {
3395
3381
 
3396
3382
  // src/core/panels/Markers.tsx
3397
3383
  import { Badge } from "@lace-cloud/ui";
3398
- import { jsx as jsx21 } from "react/jsx-runtime";
3384
+ import { jsx as jsx22 } from "react/jsx-runtime";
3399
3385
  function UnsavedMarker() {
3400
- return /* @__PURE__ */ jsx21(Badge, { variant: "warning", dot: true, role: "status", className: "lace-marker lace-marker--unsaved", children: "Unsaved" });
3386
+ return /* @__PURE__ */ jsx22(Badge, { variant: "warning", dot: true, role: "status", className: "lace-marker lace-marker--unsaved", children: "Unsaved" });
3401
3387
  }
3402
3388
  var unsavedMarker = {
3403
3389
  id: "unsaved-marker",
@@ -3409,7 +3395,7 @@ var unsavedMarker = {
3409
3395
  Component: UnsavedMarker
3410
3396
  };
3411
3397
  function UngeneratedMarker() {
3412
- return /* @__PURE__ */ jsx21(Badge, { variant: "neutral", role: "status", className: "lace-marker lace-marker--ungenerated", children: "Not generated" });
3398
+ return /* @__PURE__ */ jsx22(Badge, { variant: "neutral", role: "status", className: "lace-marker lace-marker--ungenerated", children: "Not generated" });
3413
3399
  }
3414
3400
  var ungeneratedMarker = {
3415
3401
  id: "ungenerated-marker",
@@ -3427,7 +3413,7 @@ import { createElement as createElement2 } from "react";
3427
3413
  // src/components/panels/ModuleConfigPanel.tsx
3428
3414
  import { deriveNodeConfig, instanceAddress as instanceAddress6 } from "@lace-cloud/proto";
3429
3415
  import { Button as Button12, IconButton as IconButton9, Input as Input8, ModeToggle, Panel as Panel6, Textarea as Textarea3 } from "@lace-cloud/ui";
3430
- import { useCallback as useCallback13, useEffect as useEffect10, useMemo as useMemo8, useState as useState22 } from "react";
3416
+ import { useCallback as useCallback13, useEffect as useEffect10, useMemo as useMemo8, useState as useState21 } from "react";
3431
3417
 
3432
3418
  // src/exhaustive.ts
3433
3419
  function assertNever(value) {
@@ -3435,11 +3421,11 @@ function assertNever(value) {
3435
3421
  }
3436
3422
 
3437
3423
  // src/hooks/useUpdateState.ts
3438
- import { useCallback as useCallback7, useEffect as useEffect9, useRef as useRef10, useState as useState13 } from "react";
3424
+ import { useCallback as useCallback7, useEffect as useEffect9, useRef as useRef9, useState as useState12 } from "react";
3439
3425
  function useUpdateState(updateFn) {
3440
- const [status, setStatus] = useState13("idle");
3441
- const mountedRef = useRef10(true);
3442
- const resetTimerRef = useRef10(null);
3426
+ const [status, setStatus] = useState12("idle");
3427
+ const mountedRef = useRef9(true);
3428
+ const resetTimerRef = useRef9(null);
3443
3429
  const safeSetStatus = useCallback7((next) => {
3444
3430
  if (mountedRef.current) setStatus(next);
3445
3431
  }, []);
@@ -3477,11 +3463,11 @@ function useUpdateState(updateFn) {
3477
3463
  }
3478
3464
 
3479
3465
  // src/components/AccordionSection.tsx
3480
- import { useState as useState14 } from "react";
3466
+ import { useState as useState13 } from "react";
3481
3467
  import "./AccordionSection-J3ALHB5M.css";
3482
- import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
3468
+ import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
3483
3469
  function AccordionSection({ title, defaultOpen = false, badge, children }) {
3484
- const [open, setOpen] = useState14(defaultOpen);
3470
+ const [open, setOpen] = useState13(defaultOpen);
3485
3471
  return /* @__PURE__ */ jsxs14("div", { className: `lace-accordion${open ? " lace-accordion--open" : ""}`, children: [
3486
3472
  /* @__PURE__ */ jsxs14(
3487
3473
  "button",
@@ -3491,13 +3477,13 @@ function AccordionSection({ title, defaultOpen = false, badge, children }) {
3491
3477
  onClick: () => setOpen((v) => !v),
3492
3478
  "aria-expanded": open,
3493
3479
  children: [
3494
- /* @__PURE__ */ jsx22("span", { className: "lace-accordion__chevron", children: /* @__PURE__ */ jsx22(CanvasIcon, { name: "chevron-right" }) }),
3495
- /* @__PURE__ */ jsx22("span", { className: "lace-accordion__title", children: title }),
3496
- badge && /* @__PURE__ */ jsx22("span", { className: "lace-accordion__badge", children: badge })
3480
+ /* @__PURE__ */ jsx23("span", { className: "lace-accordion__chevron", children: /* @__PURE__ */ jsx23(CanvasIcon, { name: "chevron-right" }) }),
3481
+ /* @__PURE__ */ jsx23("span", { className: "lace-accordion__title", children: title }),
3482
+ badge && /* @__PURE__ */ jsx23("span", { className: "lace-accordion__badge", children: badge })
3497
3483
  ]
3498
3484
  }
3499
3485
  ),
3500
- /* @__PURE__ */ jsx22("div", { className: "lace-accordion__body", children: /* @__PURE__ */ jsx22("div", { className: "lace-accordion__body-inner", children: /* @__PURE__ */ jsx22("div", { className: "lace-accordion__body-content", children }) }) })
3486
+ /* @__PURE__ */ jsx23("div", { className: "lace-accordion__body", children: /* @__PURE__ */ jsx23("div", { className: "lace-accordion__body-inner", children: /* @__PURE__ */ jsx23("div", { className: "lace-accordion__body-content", children }) }) })
3501
3487
  ] });
3502
3488
  }
3503
3489
 
@@ -3508,7 +3494,7 @@ import "./panels-shared-5JFNYXQ7.css";
3508
3494
  // src/components/UpdateButton.tsx
3509
3495
  import { Button as Button5 } from "@lace-cloud/ui";
3510
3496
  import "./UpdateButton-TJKSFVBA.css";
3511
- import { jsx as jsx23 } from "react/jsx-runtime";
3497
+ import { jsx as jsx24 } from "react/jsx-runtime";
3512
3498
  var variantByStatus = {
3513
3499
  idle: "primary",
3514
3500
  updating: "primary",
@@ -3521,7 +3507,7 @@ var labelByStatus = {
3521
3507
  error: "Update failed \u2014 try again"
3522
3508
  };
3523
3509
  function UpdateButton({ status, label, onClick, disabled, disabledTitle }) {
3524
- return /* @__PURE__ */ jsx23("div", { className: "lace-commit-foot", children: /* @__PURE__ */ jsx23(
3510
+ return /* @__PURE__ */ jsx24("div", { className: "lace-commit-foot", children: /* @__PURE__ */ jsx24(
3525
3511
  Button5,
3526
3512
  {
3527
3513
  rung: true,
@@ -3539,13 +3525,13 @@ function UpdateButton({ status, label, onClick, disabled, disabledTitle }) {
3539
3525
  // src/components/panels/ModuleDetails.tsx
3540
3526
  import { deriveSettingsConfig } from "@lace-cloud/proto";
3541
3527
  import { Input as Input7 } from "@lace-cloud/ui";
3542
- import { useMemo as useMemo7, useState as useState21 } from "react";
3528
+ import { useMemo as useMemo7, useState as useState20 } from "react";
3543
3529
 
3544
3530
  // src/components/panels/BlockEditor.tsx
3545
3531
  import { Button as Button6, IconButton as IconButton3, Input } from "@lace-cloud/ui";
3546
- import { useState as useState15 } from "react";
3532
+ import { useState as useState14 } from "react";
3547
3533
  import "./panels-shared-5JFNYXQ7.css";
3548
- import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
3534
+ import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
3549
3535
  function replaceAt(list, index, item) {
3550
3536
  return list.map((x, i) => i === index ? item : x);
3551
3537
  }
@@ -3554,7 +3540,7 @@ function blockTitle(block) {
3554
3540
  }
3555
3541
  function BlockEditor({ blocks, onChange, editable, templates }) {
3556
3542
  return /* @__PURE__ */ jsxs15(Fragment6, { children: [
3557
- blocks.map((block, i) => /* @__PURE__ */ jsx24(
3543
+ blocks.map((block, i) => /* @__PURE__ */ jsx25(
3558
3544
  BlockCard,
3559
3545
  {
3560
3546
  block,
@@ -3564,7 +3550,7 @@ function BlockEditor({ blocks, onChange, editable, templates }) {
3564
3550
  },
3565
3551
  i
3566
3552
  )),
3567
- editable && (templates ? /* @__PURE__ */ jsx24("div", { className: "lace-panel-row-actions", children: templates.map((t) => /* @__PURE__ */ jsxs15(
3553
+ editable && (templates ? /* @__PURE__ */ jsx25("div", { className: "lace-panel-row-actions", children: templates.map((t) => /* @__PURE__ */ jsxs15(
3568
3554
  Button6,
3569
3555
  {
3570
3556
  variant: "secondary",
@@ -3585,7 +3571,7 @@ function BlockEditor({ blocks, onChange, editable, templates }) {
3585
3571
  ]
3586
3572
  },
3587
3573
  t.type
3588
- )) }) : /* @__PURE__ */ jsx24(
3574
+ )) }) : /* @__PURE__ */ jsx25(
3589
3575
  NewBlockRow,
3590
3576
  {
3591
3577
  onAdd: (type, label) => onChange([
@@ -3597,10 +3583,10 @@ function BlockEditor({ blocks, onChange, editable, templates }) {
3597
3583
  ] });
3598
3584
  }
3599
3585
  function NewBlockRow({ onAdd }) {
3600
- const [type, setType] = useState15("");
3601
- const [label, setLabel] = useState15("");
3586
+ const [type, setType] = useState14("");
3587
+ const [label, setLabel] = useState14("");
3602
3588
  return /* @__PURE__ */ jsxs15("div", { className: "lace-panel-row-actions", children: [
3603
- /* @__PURE__ */ jsx24(
3589
+ /* @__PURE__ */ jsx25(
3604
3590
  Input,
3605
3591
  {
3606
3592
  value: type,
@@ -3610,7 +3596,7 @@ function NewBlockRow({ onAdd }) {
3610
3596
  mono: true
3611
3597
  }
3612
3598
  ),
3613
- /* @__PURE__ */ jsx24(
3599
+ /* @__PURE__ */ jsx25(
3614
3600
  Input,
3615
3601
  {
3616
3602
  value: label,
@@ -3620,7 +3606,7 @@ function NewBlockRow({ onAdd }) {
3620
3606
  mono: true
3621
3607
  }
3622
3608
  ),
3623
- /* @__PURE__ */ jsx24(
3609
+ /* @__PURE__ */ jsx25(
3624
3610
  Button6,
3625
3611
  {
3626
3612
  variant: "secondary",
@@ -3646,11 +3632,11 @@ function BlockCard({ block, editable, onChange, onRemove }) {
3646
3632
  });
3647
3633
  return /* @__PURE__ */ jsxs15("div", { className: "lace-panel-validation-block", children: [
3648
3634
  /* @__PURE__ */ jsxs15("div", { className: "lace-panel-row-actions", children: [
3649
- /* @__PURE__ */ jsx24(Identifier, { className: "lace-panel-row-card__name", text: blockTitle(block) }),
3650
- editable && /* @__PURE__ */ jsx24(
3635
+ /* @__PURE__ */ jsx25(Identifier, { className: "lace-panel-row-card__name", text: blockTitle(block) }),
3636
+ editable && /* @__PURE__ */ jsx25(
3651
3637
  IconButton3,
3652
3638
  {
3653
- icon: /* @__PURE__ */ jsx24(CanvasIcon, { name: "close" }),
3639
+ icon: /* @__PURE__ */ jsx25(CanvasIcon, { name: "close" }),
3654
3640
  "aria-label": `Remove the ${block.type} block`,
3655
3641
  size: "md",
3656
3642
  tooltipPlacement: "bottom-end",
@@ -3661,7 +3647,7 @@ function BlockCard({ block, editable, onChange, onRemove }) {
3661
3647
  block.attributes.map((attribute, i) => (
3662
3648
  // biome-ignore lint/suspicious/noArrayIndexKey: attributes are positional; the render keeps their order
3663
3649
  /* @__PURE__ */ jsxs15("div", { className: "lace-panel-row-actions", children: [
3664
- /* @__PURE__ */ jsx24(
3650
+ /* @__PURE__ */ jsx25(
3665
3651
  Input,
3666
3652
  {
3667
3653
  value: attribute.name,
@@ -3672,7 +3658,7 @@ function BlockCard({ block, editable, onChange, onRemove }) {
3672
3658
  readOnly: !editable
3673
3659
  }
3674
3660
  ),
3675
- /* @__PURE__ */ jsx24(
3661
+ /* @__PURE__ */ jsx25(
3676
3662
  Input,
3677
3663
  {
3678
3664
  value: attribute.value,
@@ -3683,10 +3669,10 @@ function BlockCard({ block, editable, onChange, onRemove }) {
3683
3669
  readOnly: !editable
3684
3670
  }
3685
3671
  ),
3686
- editable && /* @__PURE__ */ jsx24(
3672
+ editable && /* @__PURE__ */ jsx25(
3687
3673
  IconButton3,
3688
3674
  {
3689
- icon: /* @__PURE__ */ jsx24(CanvasIcon, { name: "close" }),
3675
+ icon: /* @__PURE__ */ jsx25(CanvasIcon, { name: "close" }),
3690
3676
  "aria-label": `Remove ${attribute.name || "the argument"}`,
3691
3677
  size: "md",
3692
3678
  tooltipPlacement: "bottom-end",
@@ -3695,7 +3681,7 @@ function BlockCard({ block, editable, onChange, onRemove }) {
3695
3681
  )
3696
3682
  ] }, i)
3697
3683
  )),
3698
- editable && /* @__PURE__ */ jsx24(
3684
+ editable && /* @__PURE__ */ jsx25(
3699
3685
  Button6,
3700
3686
  {
3701
3687
  variant: "secondary",
@@ -3704,7 +3690,7 @@ function BlockCard({ block, editable, onChange, onRemove }) {
3704
3690
  children: "+ Add argument"
3705
3691
  }
3706
3692
  ),
3707
- (block.blocks.length > 0 || editable) && /* @__PURE__ */ jsx24(
3693
+ (block.blocks.length > 0 || editable) && /* @__PURE__ */ jsx25(
3708
3694
  BlockEditor,
3709
3695
  {
3710
3696
  blocks: block.blocks,
@@ -3717,7 +3703,7 @@ function BlockCard({ block, editable, onChange, onRemove }) {
3717
3703
 
3718
3704
  // src/components/panels/LocalsPanel.tsx
3719
3705
  import { Button as Button7, IconButton as IconButton4, Input as Input2, Panel as Panel2, Textarea } from "@lace-cloud/ui";
3720
- import { useCallback as useCallback8, useState as useState16 } from "react";
3706
+ import { useCallback as useCallback8, useState as useState15 } from "react";
3721
3707
 
3722
3708
  // src/utils/duplicates.ts
3723
3709
  function findDuplicateIndices(items, keyFn) {
@@ -3737,7 +3723,7 @@ function findDuplicateIndices(items, keyFn) {
3737
3723
 
3738
3724
  // src/components/panels/LocalsPanel.tsx
3739
3725
  import "./panels-shared-5JFNYXQ7.css";
3740
- import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
3726
+ import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
3741
3727
  function toRows(locals) {
3742
3728
  return (locals ?? []).map((l) => ({ id: crypto.randomUUID(), ...l }));
3743
3729
  }
@@ -3746,7 +3732,7 @@ function fromRows(rows) {
3746
3732
  }
3747
3733
  function LocalsContent({ locals, onSave }) {
3748
3734
  const { editable } = useCanvas();
3749
- const [rows, setRows] = useState16(() => toRows(locals));
3735
+ const [rows, setRows] = useState15(() => toRows(locals));
3750
3736
  const addLocal = useCallback8(() => {
3751
3737
  setRows((prev) => [...prev, { id: crypto.randomUUID(), name: "", value: "" }]);
3752
3738
  }, []);
@@ -3767,7 +3753,7 @@ function LocalsContent({ locals, onSave }) {
3767
3753
  return /* @__PURE__ */ jsxs16(Fragment7, { children: [
3768
3754
  rows.map((row, i) => /* @__PURE__ */ jsxs16("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
3769
3755
  /* @__PURE__ */ jsxs16("div", { className: "lace-panel-row-actions", children: [
3770
- /* @__PURE__ */ jsx25(
3756
+ /* @__PURE__ */ jsx26(
3771
3757
  Input2,
3772
3758
  {
3773
3759
  value: row.name,
@@ -3780,10 +3766,10 @@ function LocalsContent({ locals, onSave }) {
3780
3766
  readOnly: !editable
3781
3767
  }
3782
3768
  ),
3783
- editable && /* @__PURE__ */ jsx25(
3769
+ editable && /* @__PURE__ */ jsx26(
3784
3770
  IconButton4,
3785
3771
  {
3786
- icon: /* @__PURE__ */ jsx25(CanvasIcon, { name: "close" }),
3772
+ icon: /* @__PURE__ */ jsx26(CanvasIcon, { name: "close" }),
3787
3773
  "aria-label": "Remove local",
3788
3774
  size: "md",
3789
3775
  tooltipPlacement: "bottom-end",
@@ -3791,8 +3777,8 @@ function LocalsContent({ locals, onSave }) {
3791
3777
  }
3792
3778
  )
3793
3779
  ] }),
3794
- nameDupes.has(i) && /* @__PURE__ */ jsx25("div", { className: "lace-panel-row-error", children: "Duplicate local name" }),
3795
- /* @__PURE__ */ jsx25("div", { className: "lace-panel-row-content", children: /* @__PURE__ */ jsx25(
3780
+ nameDupes.has(i) && /* @__PURE__ */ jsx26("div", { className: "lace-panel-row-error", children: "Duplicate local name" }),
3781
+ /* @__PURE__ */ jsx26("div", { className: "lace-panel-row-content", children: /* @__PURE__ */ jsx26(
3796
3782
  Textarea,
3797
3783
  {
3798
3784
  value: row.value,
@@ -3807,8 +3793,8 @@ function LocalsContent({ locals, onSave }) {
3807
3793
  ) })
3808
3794
  ] }, row.id)),
3809
3795
  editable && /* @__PURE__ */ jsxs16(Fragment7, { children: [
3810
- /* @__PURE__ */ jsx25(Button7, { variant: "secondary", size: "sm", onClick: addLocal, children: "+ Add local" }),
3811
- /* @__PURE__ */ jsx25(
3796
+ /* @__PURE__ */ jsx26(Button7, { variant: "secondary", size: "sm", onClick: addLocal, children: "+ Add local" }),
3797
+ /* @__PURE__ */ jsx26(
3812
3798
  UpdateButton,
3813
3799
  {
3814
3800
  status: updateStatus,
@@ -3822,14 +3808,14 @@ function LocalsContent({ locals, onSave }) {
3822
3808
  ] });
3823
3809
  }
3824
3810
  function LocalsPanel({ locals, onSave, onClose }) {
3825
- return /* @__PURE__ */ jsx25(Panel2, { title: "Locals", onClose, children: /* @__PURE__ */ jsx25(LocalsContent, { locals, onSave }) });
3811
+ return /* @__PURE__ */ jsx26(Panel2, { title: "Locals", onClose, children: /* @__PURE__ */ jsx26(LocalsContent, { locals, onSave }) });
3826
3812
  }
3827
3813
 
3828
3814
  // src/components/panels/ModuleInterfacePanel.tsx
3829
3815
  import { Button as Button8, IconButton as IconButton5, Input as Input3, Panel as Panel3, Select, Textarea as Textarea2 } from "@lace-cloud/ui";
3830
- import { useCallback as useCallback9, useState as useState17 } from "react";
3816
+ import { useCallback as useCallback9, useState as useState16 } from "react";
3831
3817
  import "./panels-shared-5JFNYXQ7.css";
3832
- import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
3818
+ import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
3833
3819
  function variablesToRows(variables) {
3834
3820
  return variables.map((v) => ({
3835
3821
  id: crypto.randomUUID(),
@@ -3867,10 +3853,10 @@ function outputName(text) {
3867
3853
  }
3868
3854
  function ModuleInterfaceContent({ settings, onSave }) {
3869
3855
  const { editable } = useCanvas();
3870
- const [variables, setVariables2] = useState17(
3856
+ const [variables, setVariables2] = useState16(
3871
3857
  () => variablesToRows(settings.variables)
3872
3858
  );
3873
- const [outputs, setOutputs2] = useState17(() => outputsToRows(settings.outputs));
3859
+ const [outputs, setOutputs2] = useState16(() => outputsToRows(settings.outputs));
3874
3860
  const updateVariable = useCallback9(
3875
3861
  (index, field, value) => {
3876
3862
  setVariables2((prev) => prev.map((v, i) => i === index ? { ...v, [field]: value } : v));
@@ -3991,12 +3977,12 @@ function ModuleInterfaceContent({ settings, onSave }) {
3991
3977
  );
3992
3978
  const exposable = settings.call_outputs.filter((text) => !outputs.some((o) => o.value === text));
3993
3979
  return /* @__PURE__ */ jsxs17(Fragment8, { children: [
3994
- /* @__PURE__ */ jsx26("div", { className: "lace-panel-hint", children: "The module's public surface: the variables its callers set and the outputs they read." }),
3995
- /* @__PURE__ */ jsx26("h4", { className: "lace-panel-section-title", children: "Inputs" }),
3996
- variables.length === 0 && /* @__PURE__ */ jsx26("div", { className: "lace-panel-hint", children: "No variables." }),
3980
+ /* @__PURE__ */ jsx27("div", { className: "lace-panel-hint", children: "The module's public surface: the variables its callers set and the outputs they read." }),
3981
+ /* @__PURE__ */ jsx27("h4", { className: "lace-panel-section-title", children: "Inputs" }),
3982
+ variables.length === 0 && /* @__PURE__ */ jsx27("div", { className: "lace-panel-hint", children: "No variables." }),
3997
3983
  variables.map((v, i) => /* @__PURE__ */ jsxs17("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
3998
3984
  /* @__PURE__ */ jsxs17("div", { className: "lace-panel-row-actions", children: [
3999
- v.added ? /* @__PURE__ */ jsx26(
3985
+ v.added ? /* @__PURE__ */ jsx27(
4000
3986
  Input3,
4001
3987
  {
4002
3988
  label: "Name",
@@ -4007,11 +3993,11 @@ function ModuleInterfaceContent({ settings, onSave }) {
4007
3993
  mono: true,
4008
3994
  error: variableDupes.has(i)
4009
3995
  }
4010
- ) : /* @__PURE__ */ jsx26(Identifier, { className: "lace-panel-row-card__name", text: v.name }),
4011
- editable && /* @__PURE__ */ jsx26(
3996
+ ) : /* @__PURE__ */ jsx27(Identifier, { className: "lace-panel-row-card__name", text: v.name }),
3997
+ editable && /* @__PURE__ */ jsx27(
4012
3998
  IconButton5,
4013
3999
  {
4014
- icon: /* @__PURE__ */ jsx26(CanvasIcon, { name: "close" }),
4000
+ icon: /* @__PURE__ */ jsx27(CanvasIcon, { name: "close" }),
4015
4001
  "aria-label": `Remove variable ${v.name}`,
4016
4002
  size: "md",
4017
4003
  tooltipPlacement: "bottom-end",
@@ -4019,8 +4005,8 @@ function ModuleInterfaceContent({ settings, onSave }) {
4019
4005
  }
4020
4006
  )
4021
4007
  ] }),
4022
- variableDupes.has(i) && /* @__PURE__ */ jsx26("div", { className: "lace-panel-row-error", children: "Duplicate variable name" }),
4023
- /* @__PURE__ */ jsx26("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx26(
4008
+ variableDupes.has(i) && /* @__PURE__ */ jsx27("div", { className: "lace-panel-row-error", children: "Duplicate variable name" }),
4009
+ /* @__PURE__ */ jsx27("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx27(
4024
4010
  Input3,
4025
4011
  {
4026
4012
  label: "Type",
@@ -4032,8 +4018,8 @@ function ModuleInterfaceContent({ settings, onSave }) {
4032
4018
  readOnly: !editable
4033
4019
  }
4034
4020
  ) }),
4035
- v.defaultText && /* @__PURE__ */ jsx26("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx26(Input3, { label: "Default", value: v.defaultText, fullWidth: true, mono: true, readOnly: true }) }),
4036
- /* @__PURE__ */ jsx26("div", { className: "lace-panel-row-content", children: /* @__PURE__ */ jsx26(
4021
+ v.defaultText && /* @__PURE__ */ jsx27("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx27(Input3, { label: "Default", value: v.defaultText, fullWidth: true, mono: true, readOnly: true }) }),
4022
+ /* @__PURE__ */ jsx27("div", { className: "lace-panel-row-content", children: /* @__PURE__ */ jsx27(
4037
4023
  Textarea2,
4038
4024
  {
4039
4025
  label: "Description",
@@ -4047,7 +4033,7 @@ function ModuleInterfaceContent({ settings, onSave }) {
4047
4033
  ) }),
4048
4034
  /* @__PURE__ */ jsxs17("div", { className: "lace-panel-row-actions", children: [
4049
4035
  /* @__PURE__ */ jsxs17("label", { className: "lace-panel-checkbox-row", children: [
4050
- /* @__PURE__ */ jsx26(
4036
+ /* @__PURE__ */ jsx27(
4051
4037
  "input",
4052
4038
  {
4053
4039
  type: "checkbox",
@@ -4056,10 +4042,10 @@ function ModuleInterfaceContent({ settings, onSave }) {
4056
4042
  disabled: !editable
4057
4043
  }
4058
4044
  ),
4059
- /* @__PURE__ */ jsx26("span", { children: "Required" })
4045
+ /* @__PURE__ */ jsx27("span", { children: "Required" })
4060
4046
  ] }),
4061
4047
  /* @__PURE__ */ jsxs17("label", { className: "lace-panel-checkbox-row", children: [
4062
- /* @__PURE__ */ jsx26(
4048
+ /* @__PURE__ */ jsx27(
4063
4049
  "input",
4064
4050
  {
4065
4051
  type: "checkbox",
@@ -4068,10 +4054,10 @@ function ModuleInterfaceContent({ settings, onSave }) {
4068
4054
  disabled: !editable
4069
4055
  }
4070
4056
  ),
4071
- /* @__PURE__ */ jsx26("span", { children: "Ephemeral" })
4057
+ /* @__PURE__ */ jsx27("span", { children: "Ephemeral" })
4072
4058
  ] }),
4073
4059
  /* @__PURE__ */ jsxs17("label", { className: "lace-panel-checkbox-row", children: [
4074
- /* @__PURE__ */ jsx26(
4060
+ /* @__PURE__ */ jsx27(
4075
4061
  "input",
4076
4062
  {
4077
4063
  type: "checkbox",
@@ -4080,10 +4066,10 @@ function ModuleInterfaceContent({ settings, onSave }) {
4080
4066
  disabled: !editable
4081
4067
  }
4082
4068
  ),
4083
- /* @__PURE__ */ jsx26("span", { children: "Sensitive" })
4069
+ /* @__PURE__ */ jsx27("span", { children: "Sensitive" })
4084
4070
  ] }),
4085
4071
  /* @__PURE__ */ jsxs17("label", { className: "lace-panel-checkbox-row", children: [
4086
- /* @__PURE__ */ jsx26(
4072
+ /* @__PURE__ */ jsx27(
4087
4073
  "input",
4088
4074
  {
4089
4075
  type: "checkbox",
@@ -4092,13 +4078,13 @@ function ModuleInterfaceContent({ settings, onSave }) {
4092
4078
  disabled: !editable
4093
4079
  }
4094
4080
  ),
4095
- /* @__PURE__ */ jsx26("span", { children: "Nullable" })
4081
+ /* @__PURE__ */ jsx27("span", { children: "Nullable" })
4096
4082
  ] })
4097
4083
  ] }),
4098
4084
  (v.validation.length > 0 || editable) && /* @__PURE__ */ jsxs17("div", { className: "lace-panel-row-content", children: [
4099
- /* @__PURE__ */ jsx26("div", { className: "lace-panel-subsection-label", children: "Validation" }),
4085
+ /* @__PURE__ */ jsx27("div", { className: "lace-panel-subsection-label", children: "Validation" }),
4100
4086
  v.validation.map((block, j) => /* @__PURE__ */ jsxs17("div", { className: "lace-panel-validation-block", children: [
4101
- /* @__PURE__ */ jsx26(
4087
+ /* @__PURE__ */ jsx27(
4102
4088
  Input3,
4103
4089
  {
4104
4090
  value: block.condition,
@@ -4110,7 +4096,7 @@ function ModuleInterfaceContent({ settings, onSave }) {
4110
4096
  readOnly: !editable
4111
4097
  }
4112
4098
  ),
4113
- /* @__PURE__ */ jsx26(
4099
+ /* @__PURE__ */ jsx27(
4114
4100
  Input3,
4115
4101
  {
4116
4102
  value: block.error_message,
@@ -4121,10 +4107,10 @@ function ModuleInterfaceContent({ settings, onSave }) {
4121
4107
  readOnly: !editable
4122
4108
  }
4123
4109
  ),
4124
- editable && /* @__PURE__ */ jsx26(
4110
+ editable && /* @__PURE__ */ jsx27(
4125
4111
  IconButton5,
4126
4112
  {
4127
- icon: /* @__PURE__ */ jsx26(CanvasIcon, { name: "close" }),
4113
+ icon: /* @__PURE__ */ jsx27(CanvasIcon, { name: "close" }),
4128
4114
  "aria-label": "Remove validation rule",
4129
4115
  size: "md",
4130
4116
  tooltipPlacement: "bottom-end",
@@ -4132,15 +4118,15 @@ function ModuleInterfaceContent({ settings, onSave }) {
4132
4118
  }
4133
4119
  )
4134
4120
  ] }, block.id)),
4135
- editable && /* @__PURE__ */ jsx26(Button8, { variant: "secondary", size: "sm", onClick: () => addValidation(i), children: "+ Add validation rule" })
4121
+ editable && /* @__PURE__ */ jsx27(Button8, { variant: "secondary", size: "sm", onClick: () => addValidation(i), children: "+ Add validation rule" })
4136
4122
  ] })
4137
4123
  ] }, v.id)),
4138
- editable && /* @__PURE__ */ jsx26(Button8, { variant: "secondary", size: "sm", onClick: addVariable, children: "+ Add variable" }),
4139
- /* @__PURE__ */ jsx26("h4", { className: "lace-panel-section-title", children: "Outputs" }),
4140
- outputs.length === 0 && /* @__PURE__ */ jsx26("div", { className: "lace-panel-hint", children: "No outputs." }),
4124
+ editable && /* @__PURE__ */ jsx27(Button8, { variant: "secondary", size: "sm", onClick: addVariable, children: "+ Add variable" }),
4125
+ /* @__PURE__ */ jsx27("h4", { className: "lace-panel-section-title", children: "Outputs" }),
4126
+ outputs.length === 0 && /* @__PURE__ */ jsx27("div", { className: "lace-panel-hint", children: "No outputs." }),
4141
4127
  outputs.map((o, i) => /* @__PURE__ */ jsxs17("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
4142
4128
  /* @__PURE__ */ jsxs17("div", { className: "lace-panel-row-actions", children: [
4143
- /* @__PURE__ */ jsx26(
4129
+ /* @__PURE__ */ jsx27(
4144
4130
  Input3,
4145
4131
  {
4146
4132
  label: "Name",
@@ -4153,10 +4139,10 @@ function ModuleInterfaceContent({ settings, onSave }) {
4153
4139
  error: outputDupes.has(i) || editable && !o.name.trim()
4154
4140
  }
4155
4141
  ),
4156
- editable && /* @__PURE__ */ jsx26(
4142
+ editable && /* @__PURE__ */ jsx27(
4157
4143
  IconButton5,
4158
4144
  {
4159
- icon: /* @__PURE__ */ jsx26(CanvasIcon, { name: "close" }),
4145
+ icon: /* @__PURE__ */ jsx27(CanvasIcon, { name: "close" }),
4160
4146
  "aria-label": `Remove output ${o.name}`,
4161
4147
  size: "md",
4162
4148
  tooltipPlacement: "bottom-end",
@@ -4164,7 +4150,7 @@ function ModuleInterfaceContent({ settings, onSave }) {
4164
4150
  }
4165
4151
  )
4166
4152
  ] }),
4167
- /* @__PURE__ */ jsx26("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx26(
4153
+ /* @__PURE__ */ jsx27("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx27(
4168
4154
  Input3,
4169
4155
  {
4170
4156
  label: "Value",
@@ -4177,7 +4163,7 @@ function ModuleInterfaceContent({ settings, onSave }) {
4177
4163
  error: editable && !o.value.trim()
4178
4164
  }
4179
4165
  ) }),
4180
- /* @__PURE__ */ jsx26("div", { className: "lace-panel-row-content", children: /* @__PURE__ */ jsx26(
4166
+ /* @__PURE__ */ jsx27("div", { className: "lace-panel-row-content", children: /* @__PURE__ */ jsx27(
4181
4167
  Textarea2,
4182
4168
  {
4183
4169
  label: "Description",
@@ -4190,7 +4176,7 @@ function ModuleInterfaceContent({ settings, onSave }) {
4190
4176
  }
4191
4177
  ) }),
4192
4178
  /* @__PURE__ */ jsxs17("label", { className: "lace-panel-checkbox-row", children: [
4193
- /* @__PURE__ */ jsx26(
4179
+ /* @__PURE__ */ jsx27(
4194
4180
  "input",
4195
4181
  {
4196
4182
  type: "checkbox",
@@ -4199,12 +4185,12 @@ function ModuleInterfaceContent({ settings, onSave }) {
4199
4185
  disabled: !editable
4200
4186
  }
4201
4187
  ),
4202
- /* @__PURE__ */ jsx26("span", { children: "Sensitive" })
4188
+ /* @__PURE__ */ jsx27("span", { children: "Sensitive" })
4203
4189
  ] }),
4204
4190
  (o.depends_on.length > 0 || editable && settings.dependency_options.length > 0) && /* @__PURE__ */ jsxs17("div", { className: "lace-panel-row-content", children: [
4205
- /* @__PURE__ */ jsx26("div", { className: "lace-panel-subsection-label", children: "Depends on" }),
4206
- !editable ? o.depends_on.map((dep) => /* @__PURE__ */ jsx26("div", { className: "lace-panel-depends-item", children: /* @__PURE__ */ jsx26(Identifier, { text: dep }) }, dep)) : settings.dependency_options.map((dep) => /* @__PURE__ */ jsxs17("label", { className: "lace-panel-checkbox-row", children: [
4207
- /* @__PURE__ */ jsx26(
4191
+ /* @__PURE__ */ jsx27("div", { className: "lace-panel-subsection-label", children: "Depends on" }),
4192
+ !editable ? o.depends_on.map((dep) => /* @__PURE__ */ jsx27("div", { className: "lace-panel-depends-item", children: /* @__PURE__ */ jsx27(Identifier, { text: dep }) }, dep)) : settings.dependency_options.map((dep) => /* @__PURE__ */ jsxs17("label", { className: "lace-panel-checkbox-row", children: [
4193
+ /* @__PURE__ */ jsx27(
4208
4194
  "input",
4209
4195
  {
4210
4196
  type: "checkbox",
@@ -4212,14 +4198,14 @@ function ModuleInterfaceContent({ settings, onSave }) {
4212
4198
  onChange: () => toggleDependsOn(i, dep)
4213
4199
  }
4214
4200
  ),
4215
- /* @__PURE__ */ jsx26(Identifier, { text: dep })
4201
+ /* @__PURE__ */ jsx27(Identifier, { text: dep })
4216
4202
  ] }, dep))
4217
4203
  ] }),
4218
- outputDupes.has(i) && /* @__PURE__ */ jsx26("div", { className: "lace-panel-row-error", children: "Output names must be unique." })
4204
+ outputDupes.has(i) && /* @__PURE__ */ jsx27("div", { className: "lace-panel-row-error", children: "Output names must be unique." })
4219
4205
  ] }, o.id)),
4220
4206
  editable && /* @__PURE__ */ jsxs17("div", { className: "lace-panel-row-actions", children: [
4221
- /* @__PURE__ */ jsx26(Button8, { variant: "secondary", size: "sm", onClick: () => addOutput("", ""), children: "+ Add output" }),
4222
- exposable.length > 0 && /* @__PURE__ */ jsx26(
4207
+ /* @__PURE__ */ jsx27(Button8, { variant: "secondary", size: "sm", onClick: () => addOutput("", ""), children: "+ Add output" }),
4208
+ exposable.length > 0 && /* @__PURE__ */ jsx27(
4223
4209
  Select,
4224
4210
  {
4225
4211
  "aria-label": "Expose a call's output",
@@ -4235,7 +4221,7 @@ function ModuleInterfaceContent({ settings, onSave }) {
4235
4221
  }
4236
4222
  )
4237
4223
  ] }),
4238
- editable && /* @__PURE__ */ jsx26(
4224
+ editable && /* @__PURE__ */ jsx27(
4239
4225
  UpdateButton,
4240
4226
  {
4241
4227
  status: updateStatus,
@@ -4248,7 +4234,7 @@ function ModuleInterfaceContent({ settings, onSave }) {
4248
4234
  ] });
4249
4235
  }
4250
4236
  function ModuleInterfacePanel({ onClose, ...content }) {
4251
- return /* @__PURE__ */ jsx26(Panel3, { title: "Module Interface", onClose, children: /* @__PURE__ */ jsx26(ModuleInterfaceContent, { ...content }) });
4237
+ return /* @__PURE__ */ jsx27(Panel3, { title: "Module Interface", onClose, children: /* @__PURE__ */ jsx27(ModuleInterfaceContent, { ...content }) });
4252
4238
  }
4253
4239
 
4254
4240
  // src/components/panels/module-actions.ts
@@ -4366,9 +4352,9 @@ import "./panels-shared-5JFNYXQ7.css";
4366
4352
 
4367
4353
  // src/components/panels/ProvidersPanel.tsx
4368
4354
  import { Button as Button9, IconButton as IconButton6, Input as Input4, Panel as Panel4 } from "@lace-cloud/ui";
4369
- import { useCallback as useCallback10, useState as useState18 } from "react";
4355
+ import { useCallback as useCallback10, useState as useState17 } from "react";
4370
4356
  import "./panels-shared-5JFNYXQ7.css";
4371
- import { Fragment as Fragment9, jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
4357
+ import { Fragment as Fragment9, jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
4372
4358
  function toRows2(providers) {
4373
4359
  if (!providers || providers.length === 0) return [];
4374
4360
  return providers.map((p) => ({
@@ -4396,7 +4382,7 @@ function fromRows2(rows) {
4396
4382
  }
4397
4383
  function ProvidersContent({ providers, onSave }) {
4398
4384
  const { editable } = useCanvas();
4399
- const [rows, setRows] = useState18(() => toRows2(providers));
4385
+ const [rows, setRows] = useState17(() => toRows2(providers));
4400
4386
  const addProvider = useCallback10(() => {
4401
4387
  setRows((prev) => [
4402
4388
  ...prev,
@@ -4458,7 +4444,7 @@ function ProvidersContent({ providers, onSave }) {
4458
4444
  return /* @__PURE__ */ jsxs18(Fragment9, { children: [
4459
4445
  rows.map((row, pi) => /* @__PURE__ */ jsxs18("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
4460
4446
  /* @__PURE__ */ jsxs18("div", { className: "lace-panel-row-actions", children: [
4461
- /* @__PURE__ */ jsx27(
4447
+ /* @__PURE__ */ jsx28(
4462
4448
  Input4,
4463
4449
  {
4464
4450
  value: row.name,
@@ -4468,7 +4454,7 @@ function ProvidersContent({ providers, onSave }) {
4468
4454
  readOnly: !editable
4469
4455
  }
4470
4456
  ),
4471
- /* @__PURE__ */ jsx27(
4457
+ /* @__PURE__ */ jsx28(
4472
4458
  Input4,
4473
4459
  {
4474
4460
  value: row.alias,
@@ -4478,10 +4464,10 @@ function ProvidersContent({ providers, onSave }) {
4478
4464
  readOnly: !editable
4479
4465
  }
4480
4466
  ),
4481
- editable && /* @__PURE__ */ jsx27(
4467
+ editable && /* @__PURE__ */ jsx28(
4482
4468
  IconButton6,
4483
4469
  {
4484
- icon: /* @__PURE__ */ jsx27(CanvasIcon, { name: "close" }),
4470
+ icon: /* @__PURE__ */ jsx28(CanvasIcon, { name: "close" }),
4485
4471
  "aria-label": "Remove provider",
4486
4472
  size: "md",
4487
4473
  tooltipPlacement: "bottom-end",
@@ -4489,9 +4475,9 @@ function ProvidersContent({ providers, onSave }) {
4489
4475
  }
4490
4476
  )
4491
4477
  ] }),
4492
- /* @__PURE__ */ jsx27("div", { className: "lace-panel-row-sublabel", children: "Config" }),
4478
+ /* @__PURE__ */ jsx28("div", { className: "lace-panel-row-sublabel", children: "Config" }),
4493
4479
  row.configEntries.map((entry, ei) => /* @__PURE__ */ jsxs18("div", { className: "lace-panel-row-actions", children: [
4494
- /* @__PURE__ */ jsx27(
4480
+ /* @__PURE__ */ jsx28(
4495
4481
  Input4,
4496
4482
  {
4497
4483
  value: entry.key,
@@ -4501,7 +4487,7 @@ function ProvidersContent({ providers, onSave }) {
4501
4487
  readOnly: !editable
4502
4488
  }
4503
4489
  ),
4504
- /* @__PURE__ */ jsx27(
4490
+ /* @__PURE__ */ jsx28(
4505
4491
  Input4,
4506
4492
  {
4507
4493
  value: entry.value,
@@ -4511,10 +4497,10 @@ function ProvidersContent({ providers, onSave }) {
4511
4497
  readOnly: !editable
4512
4498
  }
4513
4499
  ),
4514
- editable && /* @__PURE__ */ jsx27(
4500
+ editable && /* @__PURE__ */ jsx28(
4515
4501
  IconButton6,
4516
4502
  {
4517
- icon: /* @__PURE__ */ jsx27(CanvasIcon, { name: "close" }),
4503
+ icon: /* @__PURE__ */ jsx28(CanvasIcon, { name: "close" }),
4518
4504
  "aria-label": "Remove config key",
4519
4505
  size: "md",
4520
4506
  tooltipPlacement: "bottom-end",
@@ -4522,10 +4508,10 @@ function ProvidersContent({ providers, onSave }) {
4522
4508
  }
4523
4509
  )
4524
4510
  ] }, entry.id)),
4525
- editable && /* @__PURE__ */ jsx27(Button9, { variant: "secondary", size: "sm", onClick: () => addConfigEntry(pi), children: "+ Add config key" }),
4511
+ editable && /* @__PURE__ */ jsx28(Button9, { variant: "secondary", size: "sm", onClick: () => addConfigEntry(pi), children: "+ Add config key" }),
4526
4512
  (row.blocks.length > 0 || editable) && /* @__PURE__ */ jsxs18(Fragment9, { children: [
4527
- /* @__PURE__ */ jsx27("div", { className: "lace-panel-row-sublabel", children: "Nested blocks" }),
4528
- /* @__PURE__ */ jsx27(
4513
+ /* @__PURE__ */ jsx28("div", { className: "lace-panel-row-sublabel", children: "Nested blocks" }),
4514
+ /* @__PURE__ */ jsx28(
4529
4515
  BlockEditor,
4530
4516
  {
4531
4517
  blocks: row.blocks,
@@ -4536,20 +4522,20 @@ function ProvidersContent({ providers, onSave }) {
4536
4522
  ] })
4537
4523
  ] }, row.id)),
4538
4524
  editable && /* @__PURE__ */ jsxs18(Fragment9, { children: [
4539
- /* @__PURE__ */ jsx27(Button9, { variant: "secondary", size: "sm", onClick: addProvider, children: "+ Add provider" }),
4540
- /* @__PURE__ */ jsx27(UpdateButton, { status: updateStatus, label: "Update providers", onClick: handleUpdate })
4525
+ /* @__PURE__ */ jsx28(Button9, { variant: "secondary", size: "sm", onClick: addProvider, children: "+ Add provider" }),
4526
+ /* @__PURE__ */ jsx28(UpdateButton, { status: updateStatus, label: "Update providers", onClick: handleUpdate })
4541
4527
  ] })
4542
4528
  ] });
4543
4529
  }
4544
4530
  function ProvidersPanel({ providers, onSave, onClose }) {
4545
- return /* @__PURE__ */ jsx27(Panel4, { title: "Providers", onClose, children: /* @__PURE__ */ jsx27(ProvidersContent, { providers, onSave }) });
4531
+ return /* @__PURE__ */ jsx28(Panel4, { title: "Providers", onClose, children: /* @__PURE__ */ jsx28(ProvidersContent, { providers, onSave }) });
4546
4532
  }
4547
4533
 
4548
4534
  // src/components/panels/ResourcesPanel.tsx
4549
4535
  import { Badge as Badge2, Button as Button10, IconButton as IconButton7, Input as Input5, Select as Select2 } from "@lace-cloud/ui";
4550
- import { useCallback as useCallback11, useState as useState19 } from "react";
4536
+ import { useCallback as useCallback11, useState as useState18 } from "react";
4551
4537
  import "./panels-shared-5JFNYXQ7.css";
4552
- import { Fragment as Fragment10, jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
4538
+ import { Fragment as Fragment10, jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
4553
4539
  function ResourcesContent({
4554
4540
  resources,
4555
4541
  dependencyOptions,
@@ -4560,8 +4546,8 @@ function ResourcesContent({
4560
4546
  }) {
4561
4547
  const { editable } = useCanvas();
4562
4548
  return /* @__PURE__ */ jsxs19(Fragment10, { children: [
4563
- resources.length === 0 && /* @__PURE__ */ jsx28("div", { className: "lace-panel-hint", children: "No resources or data sources." }),
4564
- resources.map((resource) => /* @__PURE__ */ jsx28(
4549
+ resources.length === 0 && /* @__PURE__ */ jsx29("div", { className: "lace-panel-hint", children: "No resources or data sources." }),
4550
+ resources.map((resource) => /* @__PURE__ */ jsx29(
4565
4551
  ResourceCard,
4566
4552
  {
4567
4553
  resource,
@@ -4574,7 +4560,7 @@ function ResourcesContent({
4574
4560
  },
4575
4561
  JSON.stringify(resource)
4576
4562
  )),
4577
- editable && /* @__PURE__ */ jsx28(NewResourceRow, { managed, onAdd })
4563
+ editable && /* @__PURE__ */ jsx29(NewResourceRow, { managed, onAdd })
4578
4564
  ] });
4579
4565
  }
4580
4566
  var MANAGED_OPTION = { value: "resource", label: "Resource" };
@@ -4584,14 +4570,14 @@ function NewResourceRow({
4584
4570
  onAdd
4585
4571
  }) {
4586
4572
  const options = managed ? [MANAGED_OPTION, DATA_OPTION] : [DATA_OPTION];
4587
- const [chosen, setChosen] = useState19("resource");
4573
+ const [chosen, setChosen] = useState18("resource");
4588
4574
  const kind = managed ? chosen : "data";
4589
- const [type, setType] = useState19("");
4590
- const [name, setName] = useState19("");
4575
+ const [type, setType] = useState18("");
4576
+ const [name, setName] = useState18("");
4591
4577
  return /* @__PURE__ */ jsxs19("div", { className: "lace-panel-row-card", children: [
4592
- /* @__PURE__ */ jsx28("div", { className: "lace-panel-subsection-label", children: "Add a resource" }),
4578
+ /* @__PURE__ */ jsx29("div", { className: "lace-panel-subsection-label", children: "Add a resource" }),
4593
4579
  /* @__PURE__ */ jsxs19("div", { className: "lace-panel-row-actions", children: [
4594
- /* @__PURE__ */ jsx28(
4580
+ /* @__PURE__ */ jsx29(
4595
4581
  Select2,
4596
4582
  {
4597
4583
  "aria-label": "New resource kind",
@@ -4600,7 +4586,7 @@ function NewResourceRow({
4600
4586
  onChange: (e) => setChosen(e.target.value === "data" ? "data" : "resource")
4601
4587
  }
4602
4588
  ),
4603
- /* @__PURE__ */ jsx28(
4589
+ /* @__PURE__ */ jsx29(
4604
4590
  Input5,
4605
4591
  {
4606
4592
  value: type,
@@ -4610,7 +4596,7 @@ function NewResourceRow({
4610
4596
  mono: true
4611
4597
  }
4612
4598
  ),
4613
- /* @__PURE__ */ jsx28(
4599
+ /* @__PURE__ */ jsx29(
4614
4600
  Input5,
4615
4601
  {
4616
4602
  value: name,
@@ -4620,7 +4606,7 @@ function NewResourceRow({
4620
4606
  mono: true
4621
4607
  }
4622
4608
  ),
4623
- /* @__PURE__ */ jsx28(
4609
+ /* @__PURE__ */ jsx29(
4624
4610
  Button10,
4625
4611
  {
4626
4612
  variant: "secondary",
@@ -4638,7 +4624,7 @@ function NewResourceRow({
4638
4624
  ] });
4639
4625
  }
4640
4626
  function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemove }) {
4641
- const [draft, setDraft] = useState19(resource);
4627
+ const [draft, setDraft] = useState18(resource);
4642
4628
  const set = useCallback11(
4643
4629
  (field, value) => setDraft((prev) => ({ ...prev, [field]: value })),
4644
4630
  []
@@ -4662,18 +4648,18 @@ function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemov
4662
4648
  ];
4663
4649
  return /* @__PURE__ */ jsxs19("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
4664
4650
  /* @__PURE__ */ jsxs19("div", { className: "lace-panel-row-actions", children: [
4665
- /* @__PURE__ */ jsx28(Badge2, { variant: resource.kind === "data" ? "info" : "neutral", children: resource.kind === "data" ? "data" : "resource" }),
4666
- /* @__PURE__ */ jsx28(
4651
+ /* @__PURE__ */ jsx29(Badge2, { variant: resource.kind === "data" ? "info" : "neutral", children: resource.kind === "data" ? "data" : "resource" }),
4652
+ /* @__PURE__ */ jsx29(
4667
4653
  Identifier,
4668
4654
  {
4669
4655
  className: "lace-panel-row-card__name",
4670
4656
  text: `${resource.type}.${resource.name}`
4671
4657
  }
4672
4658
  ),
4673
- editable && /* @__PURE__ */ jsx28(
4659
+ editable && /* @__PURE__ */ jsx29(
4674
4660
  IconButton7,
4675
4661
  {
4676
- icon: /* @__PURE__ */ jsx28(CanvasIcon, { name: "close" }),
4662
+ icon: /* @__PURE__ */ jsx29(CanvasIcon, { name: "close" }),
4677
4663
  "aria-label": `Remove ${resource.type}.${resource.name}`,
4678
4664
  size: "md",
4679
4665
  tooltipPlacement: "bottom-end",
@@ -4682,7 +4668,7 @@ function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemov
4682
4668
  )
4683
4669
  ] }),
4684
4670
  metaArguments.map(
4685
- ({ field, placeholder }) => draft[field] || editable ? /* @__PURE__ */ jsx28("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx28(
4671
+ ({ field, placeholder }) => draft[field] || editable ? /* @__PURE__ */ jsx29("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx29(
4686
4672
  Input5,
4687
4673
  {
4688
4674
  label: field,
@@ -4695,11 +4681,11 @@ function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemov
4695
4681
  }
4696
4682
  ) }, field) : null
4697
4683
  ),
4698
- /* @__PURE__ */ jsx28("div", { className: "lace-panel-row-sublabel", children: "Arguments" }),
4684
+ /* @__PURE__ */ jsx29("div", { className: "lace-panel-row-sublabel", children: "Arguments" }),
4699
4685
  draft.arguments.map((argument, i) => (
4700
4686
  // biome-ignore lint/suspicious/noArrayIndexKey: argument rows are positional while edited
4701
4687
  /* @__PURE__ */ jsxs19("div", { className: "lace-panel-row-actions", children: [
4702
- /* @__PURE__ */ jsx28(
4688
+ /* @__PURE__ */ jsx29(
4703
4689
  Input5,
4704
4690
  {
4705
4691
  value: argument.name,
@@ -4711,7 +4697,7 @@ function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemov
4711
4697
  error: argumentDupes.has(i)
4712
4698
  }
4713
4699
  ),
4714
- /* @__PURE__ */ jsx28(
4700
+ /* @__PURE__ */ jsx29(
4715
4701
  Input5,
4716
4702
  {
4717
4703
  value: argument.value,
@@ -4722,10 +4708,10 @@ function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemov
4722
4708
  readOnly: !editable
4723
4709
  }
4724
4710
  ),
4725
- editable && /* @__PURE__ */ jsx28(
4711
+ editable && /* @__PURE__ */ jsx29(
4726
4712
  IconButton7,
4727
4713
  {
4728
- icon: /* @__PURE__ */ jsx28(CanvasIcon, { name: "close" }),
4714
+ icon: /* @__PURE__ */ jsx29(CanvasIcon, { name: "close" }),
4729
4715
  "aria-label": `Remove ${argument.name || "the argument"}`,
4730
4716
  size: "md",
4731
4717
  tooltipPlacement: "bottom-end",
@@ -4737,7 +4723,7 @@ function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemov
4737
4723
  )
4738
4724
  ] }, i)
4739
4725
  )),
4740
- editable && /* @__PURE__ */ jsx28(
4726
+ editable && /* @__PURE__ */ jsx29(
4741
4727
  Button10,
4742
4728
  {
4743
4729
  variant: "secondary",
@@ -4747,8 +4733,8 @@ function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemov
4747
4733
  }
4748
4734
  ),
4749
4735
  (draft.blocks.length > 0 || editable) && /* @__PURE__ */ jsxs19(Fragment10, { children: [
4750
- /* @__PURE__ */ jsx28("div", { className: "lace-panel-row-sublabel", children: "Nested blocks" }),
4751
- /* @__PURE__ */ jsx28(
4736
+ /* @__PURE__ */ jsx29("div", { className: "lace-panel-row-sublabel", children: "Nested blocks" }),
4737
+ /* @__PURE__ */ jsx29(
4752
4738
  BlockEditor,
4753
4739
  {
4754
4740
  blocks: draft.blocks,
@@ -4758,9 +4744,9 @@ function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemov
4758
4744
  )
4759
4745
  ] }),
4760
4746
  (draft.depends_on.length > 0 || editable && dependencyOptions.length > 0) && /* @__PURE__ */ jsxs19(Fragment10, { children: [
4761
- /* @__PURE__ */ jsx28("div", { className: "lace-panel-row-sublabel", children: "Depends on" }),
4762
- !editable ? draft.depends_on.map((dep) => /* @__PURE__ */ jsx28("div", { className: "lace-panel-depends-item", children: /* @__PURE__ */ jsx28(Identifier, { text: dep }) }, dep)) : dependencyOptions.map((dep) => /* @__PURE__ */ jsxs19("label", { className: "lace-panel-checkbox-row", children: [
4763
- /* @__PURE__ */ jsx28(
4747
+ /* @__PURE__ */ jsx29("div", { className: "lace-panel-row-sublabel", children: "Depends on" }),
4748
+ !editable ? draft.depends_on.map((dep) => /* @__PURE__ */ jsx29("div", { className: "lace-panel-depends-item", children: /* @__PURE__ */ jsx29(Identifier, { text: dep }) }, dep)) : dependencyOptions.map((dep) => /* @__PURE__ */ jsxs19("label", { className: "lace-panel-checkbox-row", children: [
4749
+ /* @__PURE__ */ jsx29(
4764
4750
  "input",
4765
4751
  {
4766
4752
  type: "checkbox",
@@ -4771,10 +4757,10 @@ function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemov
4771
4757
  )
4772
4758
  }
4773
4759
  ),
4774
- /* @__PURE__ */ jsx28(Identifier, { text: dep })
4760
+ /* @__PURE__ */ jsx29(Identifier, { text: dep })
4775
4761
  ] }, dep))
4776
4762
  ] }),
4777
- editable && /* @__PURE__ */ jsx28(
4763
+ editable && /* @__PURE__ */ jsx29(
4778
4764
  UpdateButton,
4779
4765
  {
4780
4766
  status,
@@ -4789,13 +4775,13 @@ function ResourceCard({ resource, dependencyOptions, editable, onUpdate, onRemov
4789
4775
 
4790
4776
  // src/components/panels/TerraformConfigPanel.tsx
4791
4777
  import { Button as Button11, IconButton as IconButton8, Input as Input6, Panel as Panel5 } from "@lace-cloud/ui";
4792
- import { useCallback as useCallback12, useState as useState20 } from "react";
4778
+ import { useCallback as useCallback12, useState as useState19 } from "react";
4793
4779
  import "./panels-shared-5JFNYXQ7.css";
4794
- import { Fragment as Fragment11, jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
4780
+ import { Fragment as Fragment11, jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
4795
4781
  function TerraformConfigContent({ terraform, onSave }) {
4796
4782
  const { editable } = useCanvas();
4797
- const [requiredVersion, setRequiredVersion] = useState20(terraform?.required_version ?? "");
4798
- const [providers, setProviders2] = useState20(() => {
4783
+ const [requiredVersion, setRequiredVersion] = useState19(terraform?.required_version ?? "");
4784
+ const [providers, setProviders2] = useState19(() => {
4799
4785
  if (!terraform?.required_providers) return [];
4800
4786
  return terraform.required_providers.map((req) => ({
4801
4787
  id: crypto.randomUUID(),
@@ -4835,8 +4821,8 @@ function TerraformConfigContent({ terraform, onSave }) {
4835
4821
  }, [onSave, requiredVersion, providers])
4836
4822
  );
4837
4823
  return /* @__PURE__ */ jsxs20(Fragment11, { children: [
4838
- /* @__PURE__ */ jsx29("h4", { className: "lace-panel-section-title", children: "Required Version" }),
4839
- /* @__PURE__ */ jsx29("div", { className: "lace-panel-field", children: /* @__PURE__ */ jsx29(
4824
+ /* @__PURE__ */ jsx30("h4", { className: "lace-panel-section-title", children: "Required Version" }),
4825
+ /* @__PURE__ */ jsx30("div", { className: "lace-panel-field", children: /* @__PURE__ */ jsx30(
4840
4826
  Input6,
4841
4827
  {
4842
4828
  value: requiredVersion,
@@ -4846,10 +4832,10 @@ function TerraformConfigContent({ terraform, onSave }) {
4846
4832
  readOnly: !editable
4847
4833
  }
4848
4834
  ) }),
4849
- /* @__PURE__ */ jsx29("h4", { className: "lace-panel-section-title", children: "Required Providers" }),
4835
+ /* @__PURE__ */ jsx30("h4", { className: "lace-panel-section-title", children: "Required Providers" }),
4850
4836
  providers.map((p, i) => /* @__PURE__ */ jsxs20("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
4851
4837
  /* @__PURE__ */ jsxs20("div", { className: "lace-panel-row-actions", children: [
4852
- /* @__PURE__ */ jsx29(
4838
+ /* @__PURE__ */ jsx30(
4853
4839
  Input6,
4854
4840
  {
4855
4841
  value: p.name,
@@ -4859,10 +4845,10 @@ function TerraformConfigContent({ terraform, onSave }) {
4859
4845
  readOnly: !editable
4860
4846
  }
4861
4847
  ),
4862
- editable && /* @__PURE__ */ jsx29(
4848
+ editable && /* @__PURE__ */ jsx30(
4863
4849
  IconButton8,
4864
4850
  {
4865
- icon: /* @__PURE__ */ jsx29(CanvasIcon, { name: "close" }),
4851
+ icon: /* @__PURE__ */ jsx30(CanvasIcon, { name: "close" }),
4866
4852
  "aria-label": "Remove provider",
4867
4853
  size: "md",
4868
4854
  tooltipPlacement: "bottom-end",
@@ -4870,7 +4856,7 @@ function TerraformConfigContent({ terraform, onSave }) {
4870
4856
  }
4871
4857
  )
4872
4858
  ] }),
4873
- /* @__PURE__ */ jsx29("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx29(
4859
+ /* @__PURE__ */ jsx30("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx30(
4874
4860
  Input6,
4875
4861
  {
4876
4862
  value: p.source,
@@ -4880,7 +4866,7 @@ function TerraformConfigContent({ terraform, onSave }) {
4880
4866
  readOnly: !editable
4881
4867
  }
4882
4868
  ) }),
4883
- /* @__PURE__ */ jsx29("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx29(
4869
+ /* @__PURE__ */ jsx30("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx30(
4884
4870
  Input6,
4885
4871
  {
4886
4872
  value: p.version,
@@ -4890,7 +4876,7 @@ function TerraformConfigContent({ terraform, onSave }) {
4890
4876
  readOnly: !editable
4891
4877
  }
4892
4878
  ) }),
4893
- (p.aliases || editable) && /* @__PURE__ */ jsx29("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx29(
4879
+ (p.aliases || editable) && /* @__PURE__ */ jsx30("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx30(
4894
4880
  Input6,
4895
4881
  {
4896
4882
  value: p.aliases,
@@ -4903,18 +4889,18 @@ function TerraformConfigContent({ terraform, onSave }) {
4903
4889
  }
4904
4890
  ) })
4905
4891
  ] }, p.id)),
4906
- editable && /* @__PURE__ */ jsx29(Button11, { variant: "secondary", size: "sm", onClick: addProvider, children: "+ Add provider" }),
4907
- /* @__PURE__ */ jsx29("h4", { className: "lace-panel-section-title", children: "Backend" }),
4908
- /* @__PURE__ */ jsx29("div", { className: "lace-panel-hint", children: "Terraform state is managed by Lace Cloud. The HTTP backend is configured automatically during generation." }),
4909
- editable && /* @__PURE__ */ jsx29(UpdateButton, { status: updateStatus, label: "Update terraform block", onClick: handleUpdate })
4892
+ editable && /* @__PURE__ */ jsx30(Button11, { variant: "secondary", size: "sm", onClick: addProvider, children: "+ Add provider" }),
4893
+ /* @__PURE__ */ jsx30("h4", { className: "lace-panel-section-title", children: "Backend" }),
4894
+ /* @__PURE__ */ jsx30("div", { className: "lace-panel-hint", children: "Terraform state is managed by Lace Cloud. The HTTP backend is configured automatically during generation." }),
4895
+ editable && /* @__PURE__ */ jsx30(UpdateButton, { status: updateStatus, label: "Update terraform block", onClick: handleUpdate })
4910
4896
  ] });
4911
4897
  }
4912
4898
  function TerraformConfigPanel({ terraform, onSave, onClose }) {
4913
- return /* @__PURE__ */ jsx29(Panel5, { title: "Terraform Configuration", onClose, children: /* @__PURE__ */ jsx29(TerraformConfigContent, { terraform, onSave }) });
4899
+ return /* @__PURE__ */ jsx30(Panel5, { title: "Terraform Configuration", onClose, children: /* @__PURE__ */ jsx30(TerraformConfigContent, { terraform, onSave }) });
4914
4900
  }
4915
4901
 
4916
4902
  // src/components/panels/ModuleDetails.tsx
4917
- import { Fragment as Fragment12, jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
4903
+ import { Fragment as Fragment12, jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
4918
4904
  function assertApplied(result) {
4919
4905
  if (!result?.success) throw new Error("apply failed");
4920
4906
  }
@@ -4923,19 +4909,19 @@ function ModuleDetails({ moduleKey, open = [] }) {
4923
4909
  const { bundle, runner, editable } = useCanvas();
4924
4910
  const settings = useMemo7(() => deriveSettingsConfig(bundle, moduleKey), [bundle, moduleKey]);
4925
4911
  if (!settings) return null;
4926
- if (settings.reference) return /* @__PURE__ */ jsx30(ReferenceDetails, { settings });
4912
+ if (settings.reference) return /* @__PURE__ */ jsx31(ReferenceDetails, { settings });
4927
4913
  const apply = async (actions) => {
4928
4914
  if (!editable) return;
4929
4915
  assertApplied(await runner.apply(actions));
4930
4916
  };
4931
4917
  return /* @__PURE__ */ jsxs21(Fragment12, { children: [
4932
- /* @__PURE__ */ jsx30(
4918
+ /* @__PURE__ */ jsx31(
4933
4919
  AccordionSection,
4934
4920
  {
4935
4921
  title: "Resources",
4936
4922
  defaultOpen: open.includes("Resources"),
4937
4923
  badge: `(${settings.resources.length})`,
4938
- children: /* @__PURE__ */ jsx30(
4924
+ children: /* @__PURE__ */ jsx31(
4939
4925
  ResourcesContent,
4940
4926
  {
4941
4927
  resources: settings.resources,
@@ -4948,7 +4934,7 @@ function ModuleDetails({ moduleKey, open = [] }) {
4948
4934
  )
4949
4935
  }
4950
4936
  ),
4951
- /* @__PURE__ */ jsx30(AccordionSection, { title: "Interface", defaultOpen: open.includes("Interface"), children: /* @__PURE__ */ jsx30(
4937
+ /* @__PURE__ */ jsx31(AccordionSection, { title: "Interface", defaultOpen: open.includes("Interface"), children: /* @__PURE__ */ jsx31(
4952
4938
  ModuleInterfaceContent,
4953
4939
  {
4954
4940
  settings,
@@ -4956,13 +4942,13 @@ function ModuleDetails({ moduleKey, open = [] }) {
4956
4942
  },
4957
4943
  keyOf([settings.variables, settings.outputs, settings.call_outputs])
4958
4944
  ) }),
4959
- /* @__PURE__ */ jsx30(
4945
+ /* @__PURE__ */ jsx31(
4960
4946
  AccordionSection,
4961
4947
  {
4962
4948
  title: "Moved and import blocks",
4963
4949
  defaultOpen: open.includes("Moved and import blocks"),
4964
4950
  badge: settings.directives.length > 0 ? `(${settings.directives.length})` : void 0,
4965
- children: /* @__PURE__ */ jsx30(
4951
+ children: /* @__PURE__ */ jsx31(
4966
4952
  DirectivesContent,
4967
4953
  {
4968
4954
  directives: settings.directives,
@@ -4972,7 +4958,7 @@ function ModuleDetails({ moduleKey, open = [] }) {
4972
4958
  )
4973
4959
  }
4974
4960
  ),
4975
- /* @__PURE__ */ jsx30(AccordionSection, { title: "Locals", defaultOpen: open.includes("Locals"), children: /* @__PURE__ */ jsx30(
4961
+ /* @__PURE__ */ jsx31(AccordionSection, { title: "Locals", defaultOpen: open.includes("Locals"), children: /* @__PURE__ */ jsx31(
4976
4962
  LocalsContent,
4977
4963
  {
4978
4964
  locals: settings.locals,
@@ -4980,7 +4966,7 @@ function ModuleDetails({ moduleKey, open = [] }) {
4980
4966
  },
4981
4967
  keyOf(settings.locals)
4982
4968
  ) }),
4983
- /* @__PURE__ */ jsx30(AccordionSection, { title: "Providers", defaultOpen: open.includes("Providers"), children: /* @__PURE__ */ jsx30(
4969
+ /* @__PURE__ */ jsx31(AccordionSection, { title: "Providers", defaultOpen: open.includes("Providers"), children: /* @__PURE__ */ jsx31(
4984
4970
  ProvidersContent,
4985
4971
  {
4986
4972
  providers: settings.providers,
@@ -4988,7 +4974,7 @@ function ModuleDetails({ moduleKey, open = [] }) {
4988
4974
  },
4989
4975
  keyOf(settings.providers)
4990
4976
  ) }),
4991
- /* @__PURE__ */ jsx30(AccordionSection, { title: "Terraform Config", defaultOpen: open.includes("Terraform Config"), children: /* @__PURE__ */ jsx30(
4977
+ /* @__PURE__ */ jsx31(AccordionSection, { title: "Terraform Config", defaultOpen: open.includes("Terraform Config"), children: /* @__PURE__ */ jsx31(
4992
4978
  TerraformConfigContent,
4993
4979
  {
4994
4980
  terraform: settings.terraform,
@@ -5003,11 +4989,11 @@ function DirectivesContent({
5003
4989
  onSave
5004
4990
  }) {
5005
4991
  const { editable } = useCanvas();
5006
- const [blocks, setBlocks] = useState21(directives);
4992
+ const [blocks, setBlocks] = useState20(directives);
5007
4993
  const { status, handleUpdate } = useUpdateState(() => onSave(blocks));
5008
4994
  return /* @__PURE__ */ jsxs21(Fragment12, { children: [
5009
- blocks.length === 0 && /* @__PURE__ */ jsx30("div", { className: "lace-panel-hint", children: "No moved or import blocks." }),
5010
- /* @__PURE__ */ jsx30(
4995
+ blocks.length === 0 && /* @__PURE__ */ jsx31("div", { className: "lace-panel-hint", children: "No moved or import blocks." }),
4996
+ /* @__PURE__ */ jsx31(
5011
4997
  BlockEditor,
5012
4998
  {
5013
4999
  blocks,
@@ -5019,7 +5005,7 @@ function DirectivesContent({
5019
5005
  ]
5020
5006
  }
5021
5007
  ),
5022
- editable && /* @__PURE__ */ jsx30(
5008
+ editable && /* @__PURE__ */ jsx31(
5023
5009
  UpdateButton,
5024
5010
  {
5025
5011
  status,
@@ -5034,24 +5020,24 @@ function ReferenceDetails({ settings }) {
5034
5020
  if (!reference) return null;
5035
5021
  return /* @__PURE__ */ jsxs21(Fragment12, { children: [
5036
5022
  /* @__PURE__ */ jsxs21(AccordionSection, { title: "Source", defaultOpen: true, children: [
5037
- /* @__PURE__ */ jsx30("div", { className: "lace-panel-hint", children: "A reference: Lace reads it where its source points and never edits it." }),
5023
+ /* @__PURE__ */ jsx31("div", { className: "lace-panel-hint", children: "A reference: Lace reads it where its source points and never edits it." }),
5038
5024
  /* @__PURE__ */ jsxs21("div", { className: "lace-panel-row-actions lace-panel-row-actions--stacked", children: [
5039
- /* @__PURE__ */ jsx30(Input7, { label: "Source", value: reference.source, fullWidth: true, mono: true, readOnly: true }),
5040
- /* @__PURE__ */ jsx30(Input7, { label: "Version", value: reference.version, fullWidth: true, mono: true, readOnly: true })
5025
+ /* @__PURE__ */ jsx31(Input7, { label: "Source", value: reference.source, fullWidth: true, mono: true, readOnly: true }),
5026
+ /* @__PURE__ */ jsx31(Input7, { label: "Version", value: reference.version, fullWidth: true, mono: true, readOnly: true })
5041
5027
  ] })
5042
5028
  ] }),
5043
5029
  /* @__PURE__ */ jsxs21(AccordionSection, { title: "Interface", defaultOpen: true, children: [
5044
- /* @__PURE__ */ jsx30("h4", { className: "lace-panel-section-title", children: "Inputs" }),
5045
- settings.variables.length === 0 && /* @__PURE__ */ jsx30("div", { className: "lace-panel-hint", children: "The IR holds no interface for this reference." }),
5046
- settings.variables.map((v) => /* @__PURE__ */ jsx30("div", { className: "lace-panel-depends-item", children: /* @__PURE__ */ jsx30(Identifier, { text: `${typedName(v.name, v.type)}${v.required ? " (required)" : ""}` }) }, v.name)),
5047
- /* @__PURE__ */ jsx30("h4", { className: "lace-panel-section-title", children: "Outputs" }),
5048
- settings.outputs.map((o) => /* @__PURE__ */ jsx30("div", { className: "lace-panel-depends-item", children: /* @__PURE__ */ jsx30(Identifier, { text: typedName(o.name, o.type) }) }, o.name))
5030
+ /* @__PURE__ */ jsx31("h4", { className: "lace-panel-section-title", children: "Inputs" }),
5031
+ settings.variables.length === 0 && /* @__PURE__ */ jsx31("div", { className: "lace-panel-hint", children: "The IR holds no interface for this reference." }),
5032
+ settings.variables.map((v) => /* @__PURE__ */ jsx31("div", { className: "lace-panel-depends-item", children: /* @__PURE__ */ jsx31(Identifier, { text: `${typedName(v.name, v.type)}${v.required ? " (required)" : ""}` }) }, v.name)),
5033
+ /* @__PURE__ */ jsx31("h4", { className: "lace-panel-section-title", children: "Outputs" }),
5034
+ settings.outputs.map((o) => /* @__PURE__ */ jsx31("div", { className: "lace-panel-depends-item", children: /* @__PURE__ */ jsx31(Identifier, { text: typedName(o.name, o.type) }) }, o.name))
5049
5035
  ] })
5050
5036
  ] });
5051
5037
  }
5052
5038
 
5053
5039
  // src/components/panels/ModuleConfigPanel.tsx
5054
- import { Fragment as Fragment13, jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
5040
+ import { Fragment as Fragment13, jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
5055
5041
  var MODE_ITEMS = [
5056
5042
  { value: "literal", label: "Lit" },
5057
5043
  { value: "variable", label: "Var" },
@@ -5080,7 +5066,7 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5080
5066
  () => deriveNodeConfig(bundle, instance_id),
5081
5067
  [bundle, instance_id]
5082
5068
  );
5083
- const [inputState, setInputState] = useState22({
5069
+ const [inputState, setInputState] = useState21({
5084
5070
  modes: {},
5085
5071
  values: {},
5086
5072
  variables: {},
@@ -5108,9 +5094,9 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5108
5094
  (fn) => setInputState((s) => ({ ...s, expressions: fn(s.expressions) })),
5109
5095
  []
5110
5096
  );
5111
- const [localDependsOn, setLocalDependsOn] = useState22(/* @__PURE__ */ new Set());
5112
- const [localProviders, setLocalProviders] = useState22([]);
5113
- const [localRepetition, setLocalRepetition] = useState22({ count: "", for_each: "" });
5097
+ const [localDependsOn, setLocalDependsOn] = useState21(/* @__PURE__ */ new Set());
5098
+ const [localProviders, setLocalProviders] = useState21([]);
5099
+ const [localRepetition, setLocalRepetition] = useState21({ count: "", for_each: "" });
5114
5100
  useEffect10(() => {
5115
5101
  if (!config) return;
5116
5102
  const modes = {};
@@ -5252,7 +5238,7 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5252
5238
  ...m,
5253
5239
  disabled: !editable || m.value === "wired" || isWired
5254
5240
  }));
5255
- return /* @__PURE__ */ jsx31(
5241
+ return /* @__PURE__ */ jsx32(
5256
5242
  ModeToggle,
5257
5243
  {
5258
5244
  value: currentMode,
@@ -5266,8 +5252,8 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5266
5252
  const currentMode = localModes[input.name] ?? input.mode;
5267
5253
  return /* @__PURE__ */ jsxs22("div", { className: "lace-panel-field", children: [
5268
5254
  /* @__PURE__ */ jsxs22("label", { className: "lace-panel-row-label", children: [
5269
- /* @__PURE__ */ jsx31(Identifier, { text: input.name }),
5270
- input.required && /* @__PURE__ */ jsx31("span", { className: "lace-mcp__required-star", children: "*" })
5255
+ /* @__PURE__ */ jsx32(Identifier, { text: input.name }),
5256
+ input.required && /* @__PURE__ */ jsx32("span", { className: "lace-mcp__required-star", children: "*" })
5271
5257
  ] }),
5272
5258
  renderModeSelector(input),
5273
5259
  /* @__PURE__ */ jsxs22("div", { className: "lace-panel-row-content", children: [
@@ -5276,17 +5262,17 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5276
5262
  currentMode === "expression" && renderExpressionEditor(input),
5277
5263
  currentMode === "literal" && renderLiteralEditor(input)
5278
5264
  ] }),
5279
- input.description && /* @__PURE__ */ jsx31("div", { className: "lace-panel-field__description", children: input.description })
5265
+ input.description && /* @__PURE__ */ jsx32("div", { className: "lace-panel-field__description", children: input.description })
5280
5266
  ] }, input.name);
5281
5267
  }
5282
5268
  function renderWiredEditor(input) {
5283
5269
  const label = input.wired_source ?? "Not wired";
5284
5270
  return /* @__PURE__ */ jsxs22("div", { className: "lace-mcp__wired-row", children: [
5285
- /* @__PURE__ */ jsx31("div", { className: "lace-mcp__wired-input", children: /* @__PURE__ */ jsx31(Input8, { value: label, readOnly: true, fullWidth: true, mono: true }) }),
5286
- editable && /* @__PURE__ */ jsx31(
5271
+ /* @__PURE__ */ jsx32("div", { className: "lace-mcp__wired-input", children: /* @__PURE__ */ jsx32(Input8, { value: label, readOnly: true, fullWidth: true, mono: true }) }),
5272
+ editable && /* @__PURE__ */ jsx32(
5287
5273
  IconButton9,
5288
5274
  {
5289
- icon: /* @__PURE__ */ jsx31(CanvasIcon, { name: "close" }),
5275
+ icon: /* @__PURE__ */ jsx32(CanvasIcon, { name: "close" }),
5290
5276
  "aria-label": "Disconnect this input",
5291
5277
  size: "md",
5292
5278
  tooltipPlacement: "bottom-end",
@@ -5297,7 +5283,7 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5297
5283
  }
5298
5284
  function renderVariableEditor(input) {
5299
5285
  const currentVar = localVariables[input.name] ?? input.variable ?? "";
5300
- return /* @__PURE__ */ jsx31(
5286
+ return /* @__PURE__ */ jsx32(
5301
5287
  Input8,
5302
5288
  {
5303
5289
  value: currentVar,
@@ -5315,7 +5301,7 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5315
5301
  }
5316
5302
  function renderExpressionEditor(input) {
5317
5303
  const currentExpr = localExpressions[input.name] ?? input.expression ?? "";
5318
- return /* @__PURE__ */ jsx31(
5304
+ return /* @__PURE__ */ jsx32(
5319
5305
  Textarea3,
5320
5306
  {
5321
5307
  value: currentExpr,
@@ -5343,14 +5329,14 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5343
5329
  onChange: (e) => updateValue(e.target.value === "true"),
5344
5330
  disabled: !editable,
5345
5331
  children: [
5346
- /* @__PURE__ */ jsx31("option", { value: "true", children: "True" }),
5347
- /* @__PURE__ */ jsx31("option", { value: "false", children: "False" })
5332
+ /* @__PURE__ */ jsx32("option", { value: "true", children: "True" }),
5333
+ /* @__PURE__ */ jsx32("option", { value: "false", children: "False" })
5348
5334
  ]
5349
5335
  }
5350
5336
  );
5351
5337
  }
5352
5338
  if (type === "number") {
5353
- return /* @__PURE__ */ jsx31(
5339
+ return /* @__PURE__ */ jsx32(
5354
5340
  Input8,
5355
5341
  {
5356
5342
  type: "number",
@@ -5363,7 +5349,7 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5363
5349
  }
5364
5350
  if (type.startsWith("list(") || type.startsWith("map(") || type.startsWith("set(") || type === "object" || type.startsWith("object(")) {
5365
5351
  const jsonStr = typeof value === "string" ? value : JSON.stringify(value ?? null, null, 2);
5366
- return /* @__PURE__ */ jsx31(
5352
+ return /* @__PURE__ */ jsx32(
5367
5353
  Textarea3,
5368
5354
  {
5369
5355
  value: jsonStr,
@@ -5381,7 +5367,7 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5381
5367
  }
5382
5368
  );
5383
5369
  }
5384
- return /* @__PURE__ */ jsx31(
5370
+ return /* @__PURE__ */ jsx32(
5385
5371
  Input8,
5386
5372
  {
5387
5373
  value: String(value ?? ""),
@@ -5404,29 +5390,29 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5404
5390
  instance_id,
5405
5391
  '":'
5406
5392
  ] }),
5407
- /* @__PURE__ */ jsx31("div", { className: "lace-mcp__error-detail", children: "Instance not found in the current Bundle." })
5393
+ /* @__PURE__ */ jsx32("div", { className: "lace-mcp__error-detail", children: "Instance not found in the current Bundle." })
5408
5394
  ] });
5409
5395
  }
5410
5396
  const dependsOnCount = localDependsOn.size;
5411
5397
  const title = /* @__PURE__ */ jsxs22("div", { className: "lace-mcp__title", children: [
5412
- /* @__PURE__ */ jsx31("div", { className: "lace-mcp__title-eyebrow", children: "Module" }),
5413
- /* @__PURE__ */ jsx31("h3", { className: "lace-mcp__title-id", children: /* @__PURE__ */ jsx31(Identifier, { text: instance_id }) })
5398
+ /* @__PURE__ */ jsx32("div", { className: "lace-mcp__title-eyebrow", children: "Module" }),
5399
+ /* @__PURE__ */ jsx32("h3", { className: "lace-mcp__title-id", children: /* @__PURE__ */ jsx32(Identifier, { text: instance_id }) })
5414
5400
  ] });
5415
- const footer = editable ? /* @__PURE__ */ jsx31(UpdateButton, { status: updateStatus, label: "Update configuration", onClick: handleUpdate }) : void 0;
5401
+ const footer = editable ? /* @__PURE__ */ jsx32(UpdateButton, { status: updateStatus, label: "Update configuration", onClick: handleUpdate }) : void 0;
5416
5402
  return /* @__PURE__ */ jsxs22(Panel6, { title, footer, flush: true, onClose, children: [
5417
- requiredInputs.length > 0 && /* @__PURE__ */ jsx31(AccordionSection, { title: "Required Inputs", defaultOpen: true, badge: `(${requiredInputs.length})`, children: requiredInputs.map(renderInputField) }),
5418
- optionalInputs.length > 0 && /* @__PURE__ */ jsx31(AccordionSection, { title: "Optional Inputs", defaultOpen: true, badge: `(${optionalInputs.length})`, children: optionalInputs.map(renderInputField) }),
5403
+ requiredInputs.length > 0 && /* @__PURE__ */ jsx32(AccordionSection, { title: "Required Inputs", defaultOpen: true, badge: `(${requiredInputs.length})`, children: requiredInputs.map(renderInputField) }),
5404
+ optionalInputs.length > 0 && /* @__PURE__ */ jsx32(AccordionSection, { title: "Optional Inputs", defaultOpen: true, badge: `(${optionalInputs.length})`, children: optionalInputs.map(renderInputField) }),
5419
5405
  config.sibling_ids.length > 0 && /* @__PURE__ */ jsxs22(
5420
5406
  AccordionSection,
5421
5407
  {
5422
5408
  title: "Depends On",
5423
5409
  badge: dependsOnCount > 0 ? `(${dependsOnCount})` : void 0,
5424
5410
  children: [
5425
- /* @__PURE__ */ jsx31("div", { className: "lace-mcp__depends-hint", children: "Select sibling instances this module depends on." }),
5411
+ /* @__PURE__ */ jsx32("div", { className: "lace-mcp__depends-hint", children: "Select sibling instances this module depends on." }),
5426
5412
  config.sibling_ids.map((sibId) => {
5427
5413
  const depKey = `module.${sibId}`;
5428
5414
  return /* @__PURE__ */ jsxs22("label", { className: "lace-mcp__depends-item", children: [
5429
- /* @__PURE__ */ jsx31(
5415
+ /* @__PURE__ */ jsx32(
5430
5416
  "input",
5431
5417
  {
5432
5418
  type: "checkbox",
@@ -5443,7 +5429,7 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5443
5429
  }
5444
5430
  }
5445
5431
  ),
5446
- /* @__PURE__ */ jsx31(Identifier, { className: "lace-mcp__depends-label", text: depKey })
5432
+ /* @__PURE__ */ jsx32(Identifier, { className: "lace-mcp__depends-label", text: depKey })
5447
5433
  ] }, sibId);
5448
5434
  })
5449
5435
  ]
@@ -5458,15 +5444,15 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5458
5444
  /* @__PURE__ */ jsxs22("div", { className: "lace-mcp__depends-hint", children: [
5459
5445
  "Map each child-local provider name to the root provider reference passed down (e.g.",
5460
5446
  " ",
5461
- /* @__PURE__ */ jsx31("code", { children: "aws" }),
5447
+ /* @__PURE__ */ jsx32("code", { children: "aws" }),
5462
5448
  " \u2192 ",
5463
- /* @__PURE__ */ jsx31("code", { children: "aws.west" }),
5449
+ /* @__PURE__ */ jsx32("code", { children: "aws.west" }),
5464
5450
  ")."
5465
5451
  ] }),
5466
5452
  localProviders.map((row, i) => (
5467
5453
  // biome-ignore lint/suspicious/noArrayIndexKey: rows are positional and freely editable
5468
5454
  /* @__PURE__ */ jsxs22("div", { className: "lace-mcp__provider-row", children: [
5469
- /* @__PURE__ */ jsx31(
5455
+ /* @__PURE__ */ jsx32(
5470
5456
  Input8,
5471
5457
  {
5472
5458
  value: row.key,
@@ -5478,8 +5464,8 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5478
5464
  readOnly: !editable
5479
5465
  }
5480
5466
  ),
5481
- /* @__PURE__ */ jsx31("span", { className: "lace-mcp__provider-arrow", children: "=" }),
5482
- /* @__PURE__ */ jsx31(
5467
+ /* @__PURE__ */ jsx32("span", { className: "lace-mcp__provider-arrow", children: "=" }),
5468
+ /* @__PURE__ */ jsx32(
5483
5469
  Input8,
5484
5470
  {
5485
5471
  value: row.value,
@@ -5491,10 +5477,10 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5491
5477
  readOnly: !editable
5492
5478
  }
5493
5479
  ),
5494
- editable && /* @__PURE__ */ jsx31(
5480
+ editable && /* @__PURE__ */ jsx32(
5495
5481
  IconButton9,
5496
5482
  {
5497
- icon: /* @__PURE__ */ jsx31(CanvasIcon, { name: "close" }),
5483
+ icon: /* @__PURE__ */ jsx32(CanvasIcon, { name: "close" }),
5498
5484
  "aria-label": "Remove this provider mapping",
5499
5485
  size: "md",
5500
5486
  tooltipPlacement: "bottom-end",
@@ -5503,7 +5489,7 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5503
5489
  )
5504
5490
  ] }, i)
5505
5491
  )),
5506
- editable && /* @__PURE__ */ jsx31(
5492
+ editable && /* @__PURE__ */ jsx32(
5507
5493
  Button12,
5508
5494
  {
5509
5495
  variant: "secondary",
@@ -5518,12 +5504,12 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5518
5504
  (localRepetition.count || localRepetition.for_each || editable) && /* @__PURE__ */ jsxs22(AccordionSection, { title: "Repetition", children: [
5519
5505
  /* @__PURE__ */ jsxs22("div", { className: "lace-mcp__depends-hint", children: [
5520
5506
  "The call's ",
5521
- /* @__PURE__ */ jsx31("code", { children: "count" }),
5507
+ /* @__PURE__ */ jsx32("code", { children: "count" }),
5522
5508
  " or ",
5523
- /* @__PURE__ */ jsx31("code", { children: "for_each" }),
5509
+ /* @__PURE__ */ jsx32("code", { children: "for_each" }),
5524
5510
  ": one module, called once per instance."
5525
5511
  ] }),
5526
- /* @__PURE__ */ jsx31(
5512
+ /* @__PURE__ */ jsx32(
5527
5513
  Input8,
5528
5514
  {
5529
5515
  label: "count",
@@ -5535,7 +5521,7 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5535
5521
  readOnly: !editable
5536
5522
  }
5537
5523
  ),
5538
- /* @__PURE__ */ jsx31(
5524
+ /* @__PURE__ */ jsx32(
5539
5525
  Input8,
5540
5526
  {
5541
5527
  label: "for_each",
@@ -5548,20 +5534,20 @@ function ModuleConfigPanel({ instance_id, onClose, onModified }) {
5548
5534
  }
5549
5535
  )
5550
5536
  ] }),
5551
- config.outputs.length > 0 && /* @__PURE__ */ jsx31(AccordionSection, { title: "Outputs", badge: `(${config.outputs.length})`, children: config.outputs.map((o) => /* @__PURE__ */ jsxs22("div", { className: "lace-mcp__output-card", children: [
5537
+ config.outputs.length > 0 && /* @__PURE__ */ jsx32(AccordionSection, { title: "Outputs", badge: `(${config.outputs.length})`, children: config.outputs.map((o) => /* @__PURE__ */ jsxs22("div", { className: "lace-mcp__output-card", children: [
5552
5538
  /* @__PURE__ */ jsxs22("div", { className: "lace-mcp__output-header", children: [
5553
- /* @__PURE__ */ jsx31(Identifier, { className: "lace-mcp__output-name", text: o.name }),
5554
- /* @__PURE__ */ jsx31(Identifier, { className: "lace-mcp__output-type", text: o.type ?? "" })
5539
+ /* @__PURE__ */ jsx32(Identifier, { className: "lace-mcp__output-name", text: o.name }),
5540
+ /* @__PURE__ */ jsx32(Identifier, { className: "lace-mcp__output-type", text: o.type ?? "" })
5555
5541
  ] }),
5556
- o.description && /* @__PURE__ */ jsx31("div", { className: "lace-mcp__output-description", children: o.description }),
5557
- o.sensitive && /* @__PURE__ */ jsx31("div", { className: "lace-mcp__output-sensitive", children: "sensitive" })
5542
+ o.description && /* @__PURE__ */ jsx32("div", { className: "lace-mcp__output-description", children: o.description }),
5543
+ o.sensitive && /* @__PURE__ */ jsx32("div", { className: "lace-mcp__output-sensitive", children: "sensitive" })
5558
5544
  ] }, o.name)) }),
5559
5545
  config.module_key && /* @__PURE__ */ jsxs22(Fragment13, { children: [
5560
5546
  /* @__PURE__ */ jsxs22("div", { className: "lace-mcp__module-heading", children: [
5561
- /* @__PURE__ */ jsx31("div", { className: "lace-mcp__title-eyebrow", children: "Called module" }),
5562
- /* @__PURE__ */ jsx31(Identifier, { text: config.module_key })
5547
+ /* @__PURE__ */ jsx32("div", { className: "lace-mcp__title-eyebrow", children: "Called module" }),
5548
+ /* @__PURE__ */ jsx32(Identifier, { text: config.module_key })
5563
5549
  ] }),
5564
- /* @__PURE__ */ jsx31(ModuleDetails, { moduleKey: config.module_key }, config.module_key)
5550
+ /* @__PURE__ */ jsx32(ModuleDetails, { moduleKey: config.module_key }, config.module_key)
5565
5551
  ] })
5566
5552
  ] });
5567
5553
  }
@@ -5586,40 +5572,18 @@ var moduleConfigPanel = {
5586
5572
  };
5587
5573
 
5588
5574
  // src/core/panels/SourceRefusedBanner.tsx
5589
- import { Button as Button13 } from "@lace-cloud/ui";
5590
- import { jsx as jsx32 } from "react/jsx-runtime";
5575
+ import { jsx as jsx33 } from "react/jsx-runtime";
5576
+ var LOCKED = "The canvas can't take this module's .tf, so editing, saving and generating are locked until it can; the Diagnostics tab says why.";
5577
+ var OUT_OF_LACE_SHAPE = "This Terraform is not in lace shape yet, so the canvas shows it read-only.";
5591
5578
  function SourceRefusedBanner({ ctx }) {
5592
- const { runner } = useCanvas();
5593
- const envExtras = useEditorEnvExtras();
5594
- if (!keySatisfied(ctx, "needsConversion")) {
5595
- return /* @__PURE__ */ jsx32(
5596
- Banner,
5597
- {
5598
- severity: "error",
5599
- className: "lace-source-refused-banner",
5600
- message: "The canvas can't take this module's .tf, so editing, saving and generating are locked until it can; the Diagnostics tab says why."
5601
- }
5602
- );
5603
- }
5604
- const actions = rowActionsFor(ctx, "source-refused");
5605
- return /* @__PURE__ */ jsx32(
5606
- Banner,
5579
+ return /* @__PURE__ */ jsx33(
5580
+ RowActionBanner,
5607
5581
  {
5582
+ ctx,
5583
+ panelId: "source-refused",
5608
5584
  severity: "error",
5609
- className: "lace-source-refused-banner lace-source-refused-banner--needs-conversion",
5610
- message: "Needs conversion: this module's .tf is not in lace shape, so the canvas shows it read-only. Convert composes each managed resource the Diagnostics tab names into a module of its own.",
5611
- actions: actions.map((action) => /* @__PURE__ */ jsx32(
5612
- Button13,
5613
- {
5614
- rung: true,
5615
- size: "sm",
5616
- variant: "primary",
5617
- className: `lace-source-refused-banner__${action.id}`,
5618
- onClick: () => void runner.run(action, ctx, {}, envExtras),
5619
- children: action.label
5620
- },
5621
- action.id
5622
- ))
5585
+ className: "lace-source-refused-banner",
5586
+ opening: keySatisfied(ctx, "needsConversion") ? OUT_OF_LACE_SHAPE : LOCKED
5623
5587
  }
5624
5588
  );
5625
5589
  }
@@ -5639,10 +5603,10 @@ import { createElement as createElement3 } from "react";
5639
5603
  // src/components/panels/UnifiedSettingsPanel.tsx
5640
5604
  import { Panel as Panel7 } from "@lace-cloud/ui";
5641
5605
  import "./panels-shared-5JFNYXQ7.css";
5642
- import { jsx as jsx33 } from "react/jsx-runtime";
5606
+ import { jsx as jsx34 } from "react/jsx-runtime";
5643
5607
  function UnifiedSettingsPanel({ onClose }) {
5644
5608
  const { bundle } = useCanvas();
5645
- return /* @__PURE__ */ jsx33(Panel7, { title: "Settings", flush: true, onClose, children: /* @__PURE__ */ jsx33(ModuleDetails, { moduleKey: bundle.entry, open: ["Interface"] }, bundle.entry) });
5609
+ return /* @__PURE__ */ jsx34(Panel7, { title: "Settings", flush: true, onClose, children: /* @__PURE__ */ jsx34(ModuleDetails, { moduleKey: bundle.entry, open: ["Interface"] }, bundle.entry) });
5646
5610
  }
5647
5611
 
5648
5612
  // src/core/panels/settings.ts
@@ -5699,7 +5663,7 @@ var CORE_CONTRIBUTIONS = {
5699
5663
  };
5700
5664
 
5701
5665
  // src/App.tsx
5702
- import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
5666
+ import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
5703
5667
  var EMPTY_CONTRIBUTIONS = { overlays: [], panels: [], actions: [] };
5704
5668
  var NO_SELECTION = { nodes: [], edge: null };
5705
5669
  var NO_TARGET = {};
@@ -5709,7 +5673,7 @@ function OverlayRunner({
5709
5673
  tick,
5710
5674
  onDecorations
5711
5675
  }) {
5712
- const lastErrorRef = useRef11(/* @__PURE__ */ new Map());
5676
+ const lastErrorRef = useRef10(/* @__PURE__ */ new Map());
5713
5677
  const onReadError = useCallback14(
5714
5678
  (path, error) => {
5715
5679
  const next = error?.message ?? null;
@@ -5719,7 +5683,7 @@ function OverlayRunner({
5719
5683
  },
5720
5684
  [ctx.ports.presenter]
5721
5685
  );
5722
- return /* @__PURE__ */ jsx34(PanelScope, { ctx, paths: overlay.paths, tick, onReadError, children: /* @__PURE__ */ jsx34(OverlayDecorations, { overlay, ctx, onDecorations }) });
5686
+ return /* @__PURE__ */ jsx35(PanelScope, { ctx, paths: overlay.paths, tick, onReadError, children: /* @__PURE__ */ jsx35(OverlayDecorations, { overlay, ctx, onDecorations }) });
5723
5687
  }
5724
5688
  function OverlayDecorations({
5725
5689
  overlay,
@@ -5733,7 +5697,7 @@ function OverlayDecorations({
5733
5697
  return null;
5734
5698
  }
5735
5699
  function PanelSlot({ panel, ctx, tick }) {
5736
- const [readErrors, setReadErrors] = useState23(/* @__PURE__ */ new Map());
5700
+ const [readErrors, setReadErrors] = useState22(/* @__PURE__ */ new Map());
5737
5701
  const onReadError = useCallback14((path, error) => {
5738
5702
  setReadErrors((prev) => {
5739
5703
  if (error === null) {
@@ -5761,7 +5725,7 @@ function PanelSlot({ panel, ctx, tick }) {
5761
5725
  ": ",
5762
5726
  error.message
5763
5727
  ] }, path)),
5764
- /* @__PURE__ */ jsx34(panel.Component, { ctx })
5728
+ /* @__PURE__ */ jsx35(panel.Component, { ctx })
5765
5729
  ]
5766
5730
  }
5767
5731
  );
@@ -5771,12 +5735,12 @@ function BottomTabs({
5771
5735
  ctx,
5772
5736
  tick
5773
5737
  }) {
5774
- const [manualId, setManualId] = useState23(null);
5738
+ const [manualId, setManualId] = useState22(null);
5775
5739
  const manual = manualId !== null ? panels.find((p) => p.id === manualId) : void 0;
5776
5740
  const active = manual ?? panels[0] ?? null;
5777
5741
  if (panels.length === 0) return null;
5778
5742
  return /* @__PURE__ */ jsxs23("div", { className: "lace-app__bottom", children: [
5779
- /* @__PURE__ */ jsx34("div", { className: "lace-app__bottom-tabs", role: "tablist", children: panels.map((panel) => /* @__PURE__ */ jsx34(
5743
+ /* @__PURE__ */ jsx35("div", { className: "lace-app__bottom-tabs", role: "tablist", children: panels.map((panel) => /* @__PURE__ */ jsx35(
5780
5744
  "button",
5781
5745
  {
5782
5746
  type: "button",
@@ -5788,7 +5752,7 @@ function BottomTabs({
5788
5752
  },
5789
5753
  panel.id
5790
5754
  )) }),
5791
- /* @__PURE__ */ jsx34("div", { className: "lace-app__bottom-content", children: active && /* @__PURE__ */ jsx34(PanelSlot, { panel: active, ctx, tick }) })
5755
+ /* @__PURE__ */ jsx35("div", { className: "lace-app__bottom-content", children: active && /* @__PURE__ */ jsx35(PanelSlot, { panel: active, ctx, tick }) })
5792
5756
  ] });
5793
5757
  }
5794
5758
  function endMessage(end) {
@@ -5814,19 +5778,19 @@ function App({
5814
5778
  );
5815
5779
  const dropReport = useCallback14((session2) => results.detach("report", session2), [results]);
5816
5780
  const { source, end, session } = useCanvasSource(ports.source, writeReport, dropReport);
5817
- const [arrangement, setArrangement] = useState23(() => ports.viewState.load());
5781
+ const [arrangement, setArrangement] = useState22(() => ports.viewState.load());
5818
5782
  const stack = ports.context.stack;
5819
- const [selection, setSelection] = useState23(
5783
+ const [selection, setSelection] = useState22(
5820
5784
  NO_SELECTION
5821
5785
  );
5822
- const [settingsOpen, setSettingsOpen] = useState23(false);
5786
+ const [settingsOpen, setSettingsOpen] = useState22(false);
5823
5787
  const select = useCallback14((next) => {
5824
5788
  setSelection(next);
5825
5789
  if (next.nodes.length > 0 || next.edge !== null) setSettingsOpen(false);
5826
5790
  }, []);
5827
- const [pendingForm, setPendingForm] = useState23(null);
5828
- const [overlayDecorations, setOverlayDecorations] = useState23({});
5829
- const layoutRef = useRef11({ panIntoView: () => {
5791
+ const [pendingForm, setPendingForm] = useState22(null);
5792
+ const [overlayDecorations, setOverlayDecorations] = useState22({});
5793
+ const layoutRef = useRef10({ panIntoView: () => {
5830
5794
  } });
5831
5795
  const { commands, presenter, editor } = ports;
5832
5796
  const runner = useMemo9(
@@ -5848,7 +5812,7 @@ function App({
5848
5812
  },
5849
5813
  [ports.viewState]
5850
5814
  );
5851
- const gcSeenBundle = useRef11(null);
5815
+ const gcSeenBundle = useRef10(null);
5852
5816
  if (source && gcSeenBundle.current !== source.bundle) {
5853
5817
  gcSeenBundle.current = source.bundle;
5854
5818
  const gced = gcArrangement(source.bundle, arrangement);
@@ -5922,7 +5886,7 @@ function App({
5922
5886
  resolved.actions.filter((action) => action.placement === "toolbar"),
5923
5887
  resolved.panels.filter((panel) => panel.slot === "toolbar")
5924
5888
  );
5925
- const rootRef = useRef11(null);
5889
+ const rootRef = useRef10(null);
5926
5890
  useEffect11(() => {
5927
5891
  if (!ctx) return;
5928
5892
  registerKeyTarget(ctx, "app", rootRef.current);
@@ -5931,7 +5895,7 @@ function App({
5931
5895
  useFocusWhenNoneHeld(rootRef, Boolean(ctx && view && source && envExtras));
5932
5896
  useActionKeys(ctx && envExtras ? resolved.actions : [], ctx, runner, envExtras);
5933
5897
  if (!ctx || !view || !source || !envExtras) {
5934
- return end ? /* @__PURE__ */ jsx34(ErrorState, { message: endMessage(end) }) : null;
5898
+ return end ? /* @__PURE__ */ jsx35(ErrorState, { message: endMessage(end) }) : null;
5935
5899
  }
5936
5900
  const contextValue = {
5937
5901
  ports,
@@ -5952,7 +5916,7 @@ function App({
5952
5916
  const bottomPanels = resolved.panels.filter((panel) => panel.slot === "bottom");
5953
5917
  const drawerPanel = resolved.panels.find((panel) => panel.slot === "drawer");
5954
5918
  return /* @__PURE__ */ jsxs23(ErrorBoundary, { children: [
5955
- resolved.overlays.map((overlay) => /* @__PURE__ */ jsx34(
5919
+ resolved.overlays.map((overlay) => /* @__PURE__ */ jsx35(
5956
5920
  OverlayRunner,
5957
5921
  {
5958
5922
  overlay,
@@ -5962,14 +5926,14 @@ function App({
5962
5926
  },
5963
5927
  overlay.id
5964
5928
  )),
5965
- /* @__PURE__ */ jsx34(CanvasContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs23("div", { ref: rootRef, className: "lace-app", style: { height }, tabIndex: -1, children: [
5929
+ /* @__PURE__ */ jsx35(CanvasContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs23("div", { ref: rootRef, className: "lace-app", style: { height }, tabIndex: -1, children: [
5966
5930
  (toolbar.sections.length > 0 || toolbar.trailing.length > 0) && /* @__PURE__ */ jsxs23("div", { className: "lace-app__toolbar", children: [
5967
5931
  toolbar.sections.map((section, index) => /* @__PURE__ */ jsxs23(Fragment14, { children: [
5968
- index > 0 ? /* @__PURE__ */ jsx34("span", { className: "lace-app__toolbar-separator", "aria-hidden": "true" }) : null,
5932
+ index > 0 ? /* @__PURE__ */ jsx35("span", { className: "lace-app__toolbar-separator", "aria-hidden": "true" }) : null,
5969
5933
  /* @__PURE__ */ jsxs23("div", { className: "lace-app__toolbar-section", children: [
5970
5934
  section.actions.map((action) => {
5971
5935
  const commandBusy = action.binding.kind === "command" && results.isBusy(action.binding.resultKind);
5972
- return /* @__PURE__ */ jsx34(
5936
+ return /* @__PURE__ */ jsx35(
5973
5937
  ToolbarAction,
5974
5938
  {
5975
5939
  action,
@@ -5981,20 +5945,20 @@ function App({
5981
5945
  action.id
5982
5946
  );
5983
5947
  }),
5984
- section.panels.map((panel) => /* @__PURE__ */ jsx34(PanelSlot, { panel, ctx, tick }, panel.id))
5948
+ section.panels.map((panel) => /* @__PURE__ */ jsx35(PanelSlot, { panel, ctx, tick }, panel.id))
5985
5949
  ] })
5986
5950
  ] }, section.key ?? "")),
5987
- toolbar.trailing.length > 0 && /* @__PURE__ */ jsx34("div", { className: "lace-app__toolbar-end", children: toolbar.trailing.map((panel) => /* @__PURE__ */ jsx34(PanelSlot, { panel, ctx, tick }, panel.id)) })
5951
+ toolbar.trailing.length > 0 && /* @__PURE__ */ jsx35("div", { className: "lace-app__toolbar-end", children: toolbar.trailing.map((panel) => /* @__PURE__ */ jsx35(PanelSlot, { panel, ctx, tick }, panel.id)) })
5988
5952
  ] }),
5989
- /* @__PURE__ */ jsx34("div", { className: "lace-app__banners", children: bannerPanels.map((panel) => /* @__PURE__ */ jsx34(PanelSlot, { panel, ctx, tick }, panel.id)) }),
5953
+ /* @__PURE__ */ jsx35("div", { className: "lace-app__banners", children: bannerPanels.map((panel) => /* @__PURE__ */ jsx35(PanelSlot, { panel, ctx, tick }, panel.id)) }),
5990
5954
  /* @__PURE__ */ jsxs23("div", { className: "lace-app__body", children: [
5991
5955
  /* @__PURE__ */ jsxs23("div", { className: "lace-app__main", children: [
5992
- /* @__PURE__ */ jsx34("div", { className: "lace-app__canvas", children: /* @__PURE__ */ jsx34(ReactFlowProvider, { children: /* @__PURE__ */ jsx34(Canvas, { height: "100%" }) }) }),
5993
- /* @__PURE__ */ jsx34(BottomTabs, { panels: bottomPanels, ctx, tick })
5956
+ /* @__PURE__ */ jsx35("div", { className: "lace-app__canvas", children: /* @__PURE__ */ jsx35(ReactFlowProvider, { children: /* @__PURE__ */ jsx35(Canvas, { height: "100%" }) }) }),
5957
+ /* @__PURE__ */ jsx35(BottomTabs, { panels: bottomPanels, ctx, tick })
5994
5958
  ] }),
5995
- drawerPanel && /* @__PURE__ */ jsx34(Drawer, { label: drawerPanel.title, children: /* @__PURE__ */ jsx34(PanelSlot, { panel: drawerPanel, ctx, tick }, drawerPanel.id) })
5959
+ drawerPanel && /* @__PURE__ */ jsx35(Drawer, { label: drawerPanel.title, children: /* @__PURE__ */ jsx35(PanelSlot, { panel: drawerPanel, ctx, tick }, drawerPanel.id) })
5996
5960
  ] }),
5997
- /* @__PURE__ */ jsx34(CommandArgsForm, { form: pendingForm })
5961
+ /* @__PURE__ */ jsx35(CommandArgsForm, { form: pendingForm })
5998
5962
  ] }) })
5999
5963
  ] });
6000
5964
  }
@@ -6062,6 +6026,7 @@ export {
6062
6026
  CommandArgsForm,
6063
6027
  CommandDetachedError,
6064
6028
  CommandExitError,
6029
+ CommandUnobservedError,
6065
6030
  ConflictBanner,
6066
6031
  ConnectError,
6067
6032
  ContextMenu,