@lace-cloud/canvas 0.37.0 → 0.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -4,8 +4,8 @@ export { Toast } from '@lace-cloud/ui/feedback';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as React from 'react';
6
6
  import React__default, { FC, ReactNode } from 'react';
7
- import { aZ as ContributionSet, a_ as PanelSpec, a$ as CanvasCtx, k as CanvasPorts, ab as ResultStore, S as SourcePort, A as ActionContribution, b0 as Badge, b1 as NodeDecoration, b2 as Decorations, b3 as Bundle, $ as PendingForm, h as BoundPath, b4 as CommandRead, J as JsonOf, b5 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ap as SourceEnd, b as ActionRunner, b6 as CanvasSelection, b7 as LayoutHandle } from './registry-4-XX1MRe.mjs';
8
- export { b8 as ActionIcon, c as ActionRunnerOptions, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, i as BridgeEngineCaller, j as Busy, C as COMMANDS, b9 as ClipboardStore, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, ba as ContextKey, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, bb as EditorBinding, bc as EditorEnv, bd as EditorEnvExtras, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, X as Invocation, be as KeySpec, bf as Placement, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as Reason, a5 as ReportEntry, a6 as ReportFold, a7 as ReportPath, a8 as ReportSlot, a9 as ResultKind, aa as ResultSlots, ac as RunCtx, ad as RunOutcome, ae as RunSlot, ah as RunnerPorts, ai as RunningMark, aj as SCHEMAS, ak as Sink, al as SinkInput, am as SlotContext, an as SlotKind, ao as SourceConflict, aq as StackRef, ar as Started, as as ViewStatePort, at as WiringCandidate, au as WiringQuery, av as answering, aw as bridgeCaller, ax as carriesFailure, ay as commandPathOf, az as commandUnderWay, aA as connectCaller, aB as createActionRunner, aC as createResultStore, aD as currentReport, aE as defineCommand, aF as diagnosticsOf, bg as disabledReason, aI as foldReport, aJ as generatedTree, aK as isBoundPath, aM as openEngineCommands, aN as openEngineSession, aO as parseBound, aP as parseCommandFailure, aV as reportDiagnostics, bh as resolveContributions, bi as rowActions, aX as toArgv, aY as uniqueDiagnostics } from './registry-4-XX1MRe.mjs';
7
+ import { aZ as ContributionSet, a_ as PanelSpec, a$ as CanvasCtx, k as CanvasPorts, ab as ResultStore, S as SourcePort, A as ActionContribution, b0 as Badge, b1 as NodeDecoration, b2 as Decorations, b3 as Bundle, $ as PendingForm, h as BoundPath, b4 as CommandRead, J as JsonOf, b5 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ap as SourceEnd, b as ActionRunner, b6 as CanvasSelection, b7 as LayoutHandle } from './registry-D3cL5cfF.mjs';
8
+ export { b8 as ActionIcon, c as ActionRunnerOptions, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, i as BridgeEngineCaller, j as Busy, C as COMMANDS, b9 as ClipboardStore, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, ba as ContextKey, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, bb as EditorBinding, bc as EditorEnv, bd as EditorEnvExtras, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, X as Invocation, be as KeySpec, bf as Placement, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as Reason, a5 as ReportEntry, a6 as ReportFold, a7 as ReportPath, a8 as ReportSlot, a9 as ResultKind, aa as ResultSlots, ac as RunCtx, ad as RunOutcome, ae as RunSlot, ah as RunnerPorts, ai as RunningMark, aj as SCHEMAS, ak as Sink, al as SinkInput, am as SlotContext, an as SlotKind, ao as SourceConflict, aq as StackRef, ar as Started, as as ViewStatePort, at as WiringCandidate, au as WiringQuery, av as answering, aw as bridgeCaller, ax as carriesFailure, ay as commandPathOf, az as commandUnderWay, aA as connectCaller, aB as createActionRunner, aC as createResultStore, aD as currentReport, aE as defineCommand, aF as diagnosticsOf, bg as disabledReason, aI as foldReport, aJ as generatedTree, aK as isBoundPath, aM as openEngineCommands, aN as openEngineSession, aO as parseBound, aP as parseCommandFailure, aV as reportDiagnostics, bh as resolveContributions, bi as rowActions, aX as toArgv, aY as uniqueDiagnostics } from './registry-D3cL5cfF.mjs';
9
9
  import { NodeProps, Node } from '@xyflow/react';
10
10
  import 'zod';
11
11
  import '@bufbuild/protobuf/wire';
package/dist/index.d.ts CHANGED
@@ -4,8 +4,8 @@ export { Toast } from '@lace-cloud/ui/feedback';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as React from 'react';
6
6
  import React__default, { FC, ReactNode } from 'react';
7
- import { aZ as ContributionSet, a_ as PanelSpec, a$ as CanvasCtx, k as CanvasPorts, ab as ResultStore, S as SourcePort, A as ActionContribution, b0 as Badge, b1 as NodeDecoration, b2 as Decorations, b3 as Bundle, $ as PendingForm, h as BoundPath, b4 as CommandRead, J as JsonOf, b5 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ap as SourceEnd, b as ActionRunner, b6 as CanvasSelection, b7 as LayoutHandle } from './registry-4-XX1MRe.js';
8
- export { b8 as ActionIcon, c as ActionRunnerOptions, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, i as BridgeEngineCaller, j as Busy, C as COMMANDS, b9 as ClipboardStore, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, ba as ContextKey, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, bb as EditorBinding, bc as EditorEnv, bd as EditorEnvExtras, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, X as Invocation, be as KeySpec, bf as Placement, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as Reason, a5 as ReportEntry, a6 as ReportFold, a7 as ReportPath, a8 as ReportSlot, a9 as ResultKind, aa as ResultSlots, ac as RunCtx, ad as RunOutcome, ae as RunSlot, ah as RunnerPorts, ai as RunningMark, aj as SCHEMAS, ak as Sink, al as SinkInput, am as SlotContext, an as SlotKind, ao as SourceConflict, aq as StackRef, ar as Started, as as ViewStatePort, at as WiringCandidate, au as WiringQuery, av as answering, aw as bridgeCaller, ax as carriesFailure, ay as commandPathOf, az as commandUnderWay, aA as connectCaller, aB as createActionRunner, aC as createResultStore, aD as currentReport, aE as defineCommand, aF as diagnosticsOf, bg as disabledReason, aI as foldReport, aJ as generatedTree, aK as isBoundPath, aM as openEngineCommands, aN as openEngineSession, aO as parseBound, aP as parseCommandFailure, aV as reportDiagnostics, bh as resolveContributions, bi as rowActions, aX as toArgv, aY as uniqueDiagnostics } from './registry-4-XX1MRe.js';
7
+ import { aZ as ContributionSet, a_ as PanelSpec, a$ as CanvasCtx, k as CanvasPorts, ab as ResultStore, S as SourcePort, A as ActionContribution, b0 as Badge, b1 as NodeDecoration, b2 as Decorations, b3 as Bundle, $ as PendingForm, h as BoundPath, b4 as CommandRead, J as JsonOf, b5 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ap as SourceEnd, b as ActionRunner, b6 as CanvasSelection, b7 as LayoutHandle } from './registry-D3cL5cfF.js';
8
+ export { b8 as ActionIcon, c as ActionRunnerOptions, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, i as BridgeEngineCaller, j as Busy, C as COMMANDS, b9 as ClipboardStore, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, ba as ContextKey, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, bb as EditorBinding, bc as EditorEnv, bd as EditorEnvExtras, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, X as Invocation, be as KeySpec, bf as Placement, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as Reason, a5 as ReportEntry, a6 as ReportFold, a7 as ReportPath, a8 as ReportSlot, a9 as ResultKind, aa as ResultSlots, ac as RunCtx, ad as RunOutcome, ae as RunSlot, ah as RunnerPorts, ai as RunningMark, aj as SCHEMAS, ak as Sink, al as SinkInput, am as SlotContext, an as SlotKind, ao as SourceConflict, aq as StackRef, ar as Started, as as ViewStatePort, at as WiringCandidate, au as WiringQuery, av as answering, aw as bridgeCaller, ax as carriesFailure, ay as commandPathOf, az as commandUnderWay, aA as connectCaller, aB as createActionRunner, aC as createResultStore, aD as currentReport, aE as defineCommand, aF as diagnosticsOf, bg as disabledReason, aI as foldReport, aJ as generatedTree, aK as isBoundPath, aM as openEngineCommands, aN as openEngineSession, aO as parseBound, aP as parseCommandFailure, aV as reportDiagnostics, bh as resolveContributions, bi as rowActions, aX as toArgv, aY as uniqueDiagnostics } from './registry-D3cL5cfF.js';
9
9
  import { NodeProps, Node } from '@xyflow/react';
10
10
  import 'zod';
11
11
  import '@bufbuild/protobuf/wire';
package/dist/index.mjs CHANGED
@@ -54,7 +54,7 @@ import {
54
54
  toArgv,
55
55
  uniqueDiagnostics,
56
56
  wireEndText
57
- } from "./chunk-45ZS7XCZ.mjs";
57
+ } from "./chunk-323MYV3H.mjs";
58
58
 
59
59
  // src/index.ts
60
60
  import { projectCanvasView as projectCanvasView2 } from "@lace-cloud/proto";
@@ -3058,12 +3058,7 @@ function CompositeEditor({
3058
3058
  const selectedEdgeIds = useMemo6(() => new Set(selection.edges), [selection.edges]);
3059
3059
  const [rfEdges, setRfEdges] = useState8(rfEdgesFromView);
3060
3060
  useEffect9(() => {
3061
- setRfEdges((prev) => {
3062
- const held = new Set(prev.filter((e) => e.selected).map((e) => e.id));
3063
- return rfEdgesFromView.map(
3064
- (e) => held.has(e.id) || selectedEdgeIds.has(e.id) ? { ...e, selected: true } : e
3065
- );
3066
- });
3061
+ setRfEdges(rfEdgesFromView.map((e) => ({ ...e, selected: selectedEdgeIds.has(e.id) })));
3067
3062
  }, [rfEdgesFromView, selectedEdgeIds]);
3068
3063
  const onEdgesChange = useCallback8(
3069
3064
  (changes) => {
@@ -5033,6 +5028,15 @@ function resourceActions(scope, before, after) {
5033
5028
  set_depends_on: { scope, instance_id: before.id, depends_on: after.depends_on }
5034
5029
  });
5035
5030
  }
5031
+ if (before.name !== after.name) {
5032
+ actions.push({
5033
+ rename_instance: {
5034
+ scope,
5035
+ old_id: before.id,
5036
+ new_id: `${before.kind}.${before.type}.${after.name}`
5037
+ }
5038
+ });
5039
+ }
5036
5040
  return actions;
5037
5041
  }
5038
5042
 
@@ -5357,6 +5361,17 @@ function ResourceCard({
5357
5361
  }
5358
5362
  )
5359
5363
  ] }),
5364
+ editable && /* @__PURE__ */ jsx33("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx33(
5365
+ Input5,
5366
+ {
5367
+ label: "Name",
5368
+ "aria-label": `Name of ${resource.type}.${resource.name}`,
5369
+ value: draft.name,
5370
+ onChange: (e) => set("name", e.target.value),
5371
+ fullWidth: true,
5372
+ mono: true
5373
+ }
5374
+ ) }),
5360
5375
  metaArguments.map(
5361
5376
  ({ field, placeholder }) => draft[field] || editable ? /* @__PURE__ */ jsx33("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ jsx33(
5362
5377
  Input5,
@@ -5455,7 +5470,7 @@ function ResourceCard({
5455
5470
  {
5456
5471
  draft: card,
5457
5472
  label: "Update resource",
5458
- blocked: argumentsBlocker(draft.arguments)
5473
+ blocked: !draft.name.trim() ? "Enter a name" : argumentsBlocker(draft.arguments)
5459
5474
  }
5460
5475
  )
5461
5476
  ] });
@@ -6711,6 +6726,8 @@ function snapshotSource(input) {
6711
6726
  canUndo: false,
6712
6727
  canRedo: false,
6713
6728
  unsaved: false,
6729
+ workingDigest: "",
6730
+ savedDigest: "",
6714
6731
  ungenerated: false,
6715
6732
  conflict: null,
6716
6733
  sourceRefused: false,