@lace-cloud/canvas 0.34.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -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, $ as PendingForm, h as BoundPath, b3 as CommandRead, J as JsonOf, b4 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ap as SourceEnd, b as ActionRunner, b5 as Bundle, b6 as CanvasSelection, b7 as LayoutHandle } from './registry-BwXo1iVe.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-BwXo1iVe.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, $ as PendingForm, h as BoundPath, b3 as CommandRead, J as JsonOf, b4 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ap as SourceEnd, b as ActionRunner, b5 as Bundle, b6 as CanvasSelection, b7 as LayoutHandle } from './registry-Bflzqecd.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-Bflzqecd.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, $ as PendingForm, h as BoundPath, b3 as CommandRead, J as JsonOf, b4 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ap as SourceEnd, b as ActionRunner, b5 as Bundle, b6 as CanvasSelection, b7 as LayoutHandle } from './registry-BwXo1iVe.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-BwXo1iVe.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, $ as PendingForm, h as BoundPath, b3 as CommandRead, J as JsonOf, b4 as OverlayContribution, d as ActionTarget, r as CommandResult, l as CanvasSource, ap as SourceEnd, b as ActionRunner, b5 as Bundle, b6 as CanvasSelection, b7 as LayoutHandle } from './registry-Bflzqecd.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-Bflzqecd.js';
9
9
  import { NodeProps, Node } from '@xyflow/react';
10
10
  import 'zod';
11
11
  import '@bufbuild/protobuf/wire';
package/dist/index.mjs CHANGED
@@ -46,7 +46,7 @@ import {
46
46
  rowActions,
47
47
  toArgv,
48
48
  uniqueDiagnostics
49
- } from "./chunk-5X3CA44U.mjs";
49
+ } from "./chunk-XPHDFIKV.mjs";
50
50
 
51
51
  // src/index.ts
52
52
  import { projectCanvasView as projectCanvasView2 } from "@lace-cloud/proto";
@@ -2864,6 +2864,16 @@ function CompositeEditor({
2864
2864
  style: { stroke: "var(--lace-canvas-edge-stroke)", strokeWidth: 1.5 },
2865
2865
  animated: false
2866
2866
  };
2867
+ const onNodeContextMenu = (e, node) => {
2868
+ e.preventDefault();
2869
+ if (!editable) return;
2870
+ onContextMenu({
2871
+ instanceId: node.type === "groupNode" ? null : node.id,
2872
+ groupId: node.type === "groupNode" ? node.id : null,
2873
+ x: e.clientX,
2874
+ y: e.clientY
2875
+ });
2876
+ };
2867
2877
  return /* @__PURE__ */ jsxs6(
2868
2878
  ReactFlow,
2869
2879
  {
@@ -2877,15 +2887,11 @@ function CompositeEditor({
2877
2887
  onConnect,
2878
2888
  isValidConnection,
2879
2889
  onNodeDragStop,
2880
- onNodeContextMenu: (e, node) => {
2890
+ onNodeContextMenu,
2891
+ onSelectionContextMenu: (e, nodes) => {
2881
2892
  e.preventDefault();
2882
- if (!editable) return;
2883
- onContextMenu({
2884
- instanceId: node.type === "groupNode" ? null : node.id,
2885
- groupId: node.type === "groupNode" ? node.id : null,
2886
- x: e.clientX,
2887
- y: e.clientY
2888
- });
2893
+ const node = nodes[0];
2894
+ if (node) onNodeContextMenu(e, node);
2889
2895
  },
2890
2896
  onPaneContextMenu: (e) => {
2891
2897
  e.preventDefault();
@@ -3103,7 +3109,7 @@ function Canvas({ height }) {
3103
3109
  decorations
3104
3110
  }
3105
3111
  ),
3106
- view.nodes.length === 0 && view.groups.length === 0 ? /* @__PURE__ */ jsx13(EmptyCanvas, { editable }) : null
3112
+ !ctx.sourceRefused && view.nodes.length === 0 && view.groups.length === 0 ? /* @__PURE__ */ jsx13(EmptyCanvas, { editable }) : null
3107
3113
  ] })
3108
3114
  ]
3109
3115
  }
@@ -3937,7 +3943,7 @@ import "./panels-shared-3HUQC7TC.css";
3937
3943
 
3938
3944
  // src/components/UpdateButton.tsx
3939
3945
  import { Button as Button5 } from "@lace-cloud/ui";
3940
- import "./UpdateButton-TJKSFVBA.css";
3946
+ import "./UpdateButton-VSIHLAZC.css";
3941
3947
  import { jsx as jsx27 } from "react/jsx-runtime";
3942
3948
  var variantByStatus = {
3943
3949
  updating: "primary",