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