@lace-cloud/canvas 0.9.1 → 0.11.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/README.md +24 -0
- package/dist/{Canvas-IXCFWQNP.css → Canvas-J6F7YHEK.css} +9 -10
- package/dist/index.cjs +132 -145
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.mjs +133 -146
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -47,6 +47,30 @@ createRoot(document.getElementById('root')!).render(
|
|
|
47
47
|
);
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
`App` fills the viewport by default with `height="100vh"`. An embedded
|
|
51
|
+
canvas should live in a parent with an explicit height and opt into that
|
|
52
|
+
containing block with `height="100%"`:
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
<div style={{ height: 460 }}>
|
|
56
|
+
<App engine={engine} hostBridge={browserHostBridge} height="100%" />
|
|
57
|
+
</div>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Viewport fitting
|
|
61
|
+
|
|
62
|
+
Three things fit the whole graph, and all three use the same options
|
|
63
|
+
(`padding: 0.2`, `duration: 300`):
|
|
64
|
+
|
|
65
|
+
- the first frame an engine delivers — including after the host swaps in
|
|
66
|
+
a new engine, so navigating between snapshots re-frames the graph
|
|
67
|
+
without remounting the canvas;
|
|
68
|
+
- xyflow's native **Fit View** control in the bottom-right cluster;
|
|
69
|
+
- a `fit-all` viewport intent that doesn't override padding or duration.
|
|
70
|
+
|
|
71
|
+
A `focus-node` intent frames one node instead (`padding: 1.2`), and any
|
|
72
|
+
intent may override padding and duration per dispatch.
|
|
73
|
+
|
|
50
74
|
## Read-only mode
|
|
51
75
|
|
|
52
76
|
```tsx
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Canvas.css — xyflow (@xyflow/react) customisations for the Lace canvas.
|
|
3
3
|
*
|
|
4
|
-
* Colocated with Canvas.tsx (imported there) so
|
|
5
|
-
* bundle
|
|
6
|
-
* the React import chain. There is no separate global stylesheet for
|
|
7
|
-
* canvas
|
|
4
|
+
* Colocated with Canvas.tsx (imported there) so every consumer — the VS
|
|
5
|
+
* Code webview bundle, the portal SPA, Storybook — picks these rules up
|
|
6
|
+
* via the React import chain. There is no separate global stylesheet for
|
|
7
|
+
* the canvas; a consumer that has to remember to import one gets a canvas
|
|
8
|
+
* that silently renders wrong.
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @layer components (e.g. the edge stroke override that competes with
|
|
14
|
-
* the xyflow default) are placed there.
|
|
10
|
+
* Ordering note:
|
|
11
|
+
* Canvas.tsx imports xyflow's own stylesheet immediately before this
|
|
12
|
+
* one, and neither is layered, so at equal specificity these rules win
|
|
13
|
+
* on source order — no !important needed.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
/* ── Pin handles (Blender-style typed I/O) ──
|
package/dist/index.cjs
CHANGED
|
@@ -72,7 +72,8 @@ var import_react34 = require("@xyflow/react");
|
|
|
72
72
|
var import_react35 = require("react");
|
|
73
73
|
|
|
74
74
|
// src/Canvas.tsx
|
|
75
|
-
var
|
|
75
|
+
var import_style = require("@xyflow/react/dist/style.css");
|
|
76
|
+
var import_Canvas = require("./Canvas-J6F7YHEK.css");
|
|
76
77
|
var import_feedback = require("@lace-cloud/ui/feedback");
|
|
77
78
|
var import_react30 = require("@xyflow/react");
|
|
78
79
|
var import_react31 = require("react");
|
|
@@ -4148,6 +4149,7 @@ var nodeTypes = {
|
|
|
4148
4149
|
moduleNode: ModuleNode_default,
|
|
4149
4150
|
groupNode: GroupNode_default
|
|
4150
4151
|
};
|
|
4152
|
+
var FIT_VIEW_OPTIONS = { padding: 0.2, duration: 300 };
|
|
4151
4153
|
function CompositeEditor({
|
|
4152
4154
|
view,
|
|
4153
4155
|
readOnly,
|
|
@@ -4181,11 +4183,6 @@ function CompositeEditor({
|
|
|
4181
4183
|
const nodesInitialized = xyflowInitialized || view.nodes.length === 0;
|
|
4182
4184
|
const selectedIdsRef = (0, import_react31.useRef)([]);
|
|
4183
4185
|
const pendingSelectIdsRef = (0, import_react31.useRef)(null);
|
|
4184
|
-
(0, import_react31.useEffect)(() => {
|
|
4185
|
-
if (view.nodes.length > 0) {
|
|
4186
|
-
requestAnimationFrame(() => fitView({ padding: 0.2, duration: 300 }));
|
|
4187
|
-
}
|
|
4188
|
-
}, []);
|
|
4189
4186
|
(0, import_react31.useEffect)(() => {
|
|
4190
4187
|
registerGoToNode((nodeId) => {
|
|
4191
4188
|
const n = getNode(nodeId);
|
|
@@ -4210,8 +4207,8 @@ function CompositeEditor({
|
|
|
4210
4207
|
if (viewportIntent.kind === "fit-all") {
|
|
4211
4208
|
if (view.nodes.length > 0) {
|
|
4212
4209
|
fitView({
|
|
4213
|
-
padding: viewportIntent.padding ??
|
|
4214
|
-
duration: viewportIntent.duration ??
|
|
4210
|
+
padding: viewportIntent.padding ?? FIT_VIEW_OPTIONS.padding,
|
|
4211
|
+
duration: viewportIntent.duration ?? FIT_VIEW_OPTIONS.duration
|
|
4215
4212
|
});
|
|
4216
4213
|
}
|
|
4217
4214
|
return;
|
|
@@ -4231,7 +4228,7 @@ function CompositeEditor({
|
|
|
4231
4228
|
}
|
|
4232
4229
|
);
|
|
4233
4230
|
});
|
|
4234
|
-
}, [
|
|
4231
|
+
}, [viewportIntentSeq]);
|
|
4235
4232
|
const groupLogic = useGroupLogic(view.nodes, view.edges, view.groups, newNodeIds, erroredNodeIds);
|
|
4236
4233
|
const rfEdgesFromView = groupLogic.rfEdges;
|
|
4237
4234
|
const [rfEdges, setRfEdges] = (0, import_react31.useState)(rfEdgesFromView);
|
|
@@ -4387,7 +4384,15 @@ function CompositeEditor({
|
|
|
4387
4384
|
nodeColor: "var(--lace-color-accent)"
|
|
4388
4385
|
}
|
|
4389
4386
|
) : null,
|
|
4390
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4387
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4388
|
+
import_react30.Controls,
|
|
4389
|
+
{
|
|
4390
|
+
position: "bottom-right",
|
|
4391
|
+
showInteractive: false,
|
|
4392
|
+
fitViewOptions: FIT_VIEW_OPTIONS,
|
|
4393
|
+
style: { bottom: 20, right: 20 }
|
|
4394
|
+
}
|
|
4395
|
+
),
|
|
4391
4396
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4392
4397
|
ActionBar,
|
|
4393
4398
|
{
|
|
@@ -4414,7 +4419,7 @@ function CompositeEditor({
|
|
|
4414
4419
|
}
|
|
4415
4420
|
);
|
|
4416
4421
|
}
|
|
4417
|
-
function Canvas({ registryBaseUrl, apiToken }
|
|
4422
|
+
function Canvas({ height, registryBaseUrl, apiToken }) {
|
|
4418
4423
|
const { state, readOnly, localGroupCollapseOverrides } = useCanvas();
|
|
4419
4424
|
const engine = useEngine();
|
|
4420
4425
|
const viewRef = (0, import_react31.useRef)(state.view);
|
|
@@ -4624,7 +4629,7 @@ function Canvas({ registryBaseUrl, apiToken } = {}) {
|
|
|
4624
4629
|
"div",
|
|
4625
4630
|
{
|
|
4626
4631
|
style: {
|
|
4627
|
-
height
|
|
4632
|
+
height,
|
|
4628
4633
|
display: "flex",
|
|
4629
4634
|
alignItems: "center",
|
|
4630
4635
|
justifyContent: "center",
|
|
@@ -4640,118 +4645,112 @@ function Canvas({ registryBaseUrl, apiToken } = {}) {
|
|
|
4640
4645
|
localGroupCollapseOverrides,
|
|
4641
4646
|
readOnly
|
|
4642
4647
|
);
|
|
4643
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
nodeIds: erroredNodeIds,
|
|
4666
|
-
onGoToNode: (nodeId) => goToNodeRef.current?.(nodeId),
|
|
4667
|
-
onOpenFile: (relativePath, line, column) => window.dispatchEvent(
|
|
4668
|
-
new CustomEvent(CANVAS_EVENTS.OPEN_FILE, { detail: { relativePath, line, column } })
|
|
4669
|
-
),
|
|
4670
|
-
onDismiss: dismissErrorBanner
|
|
4671
|
-
}
|
|
4648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { position: "relative", display: "flex", flexDirection: "column", height }, children: [
|
|
4649
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_feedback.Toast, { toast }),
|
|
4650
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4651
|
+
ContextMenu,
|
|
4652
|
+
{
|
|
4653
|
+
contextMenu,
|
|
4654
|
+
onCopy,
|
|
4655
|
+
onCut,
|
|
4656
|
+
onPaste,
|
|
4657
|
+
onGroupSelected,
|
|
4658
|
+
onUngroup,
|
|
4659
|
+
onDismiss: dismissContextMenu
|
|
4660
|
+
}
|
|
4661
|
+
),
|
|
4662
|
+
!errorBannerDismissed && validationErrors.length > 0 && !toast && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4663
|
+
ValidationErrorBanner,
|
|
4664
|
+
{
|
|
4665
|
+
diagnostics: validationErrors,
|
|
4666
|
+
nodeIds: erroredNodeIds,
|
|
4667
|
+
onGoToNode: (nodeId) => goToNodeRef.current?.(nodeId),
|
|
4668
|
+
onOpenFile: (relativePath, line, column) => window.dispatchEvent(
|
|
4669
|
+
new CustomEvent(CANVAS_EVENTS.OPEN_FILE, { detail: { relativePath, line, column } })
|
|
4672
4670
|
),
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
)
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
)
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4671
|
+
onDismiss: dismissErrorBanner
|
|
4672
|
+
}
|
|
4673
|
+
),
|
|
4674
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { position: "relative", flex: "1 1 auto", minHeight: 0 }, children: [
|
|
4675
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4676
|
+
CompositeEditor,
|
|
4677
|
+
{
|
|
4678
|
+
view,
|
|
4679
|
+
readOnly,
|
|
4680
|
+
isGenerating: generating,
|
|
4681
|
+
erroredNodeIds,
|
|
4682
|
+
newNodeIds,
|
|
4683
|
+
forcePositionsRef,
|
|
4684
|
+
onDragStop,
|
|
4685
|
+
onConnect,
|
|
4686
|
+
onEdgeClick,
|
|
4687
|
+
onEdgesDelete,
|
|
4688
|
+
onNodesDelete,
|
|
4689
|
+
onSave,
|
|
4690
|
+
onUndo,
|
|
4691
|
+
onRedo,
|
|
4692
|
+
onClearGraph,
|
|
4693
|
+
onGenerate,
|
|
4694
|
+
onOpenSettings,
|
|
4695
|
+
onOpenPolicy: readOnly ? void 0 : onOpenPolicy,
|
|
4696
|
+
onOpenRegistry: canBrowseRegistry ? openRegistry : void 0,
|
|
4697
|
+
showMiniMap,
|
|
4698
|
+
onToggleMiniMap: toggleMiniMap,
|
|
4699
|
+
registerGoToNode,
|
|
4700
|
+
registerGetSelectedIds,
|
|
4701
|
+
registerSelectNodes,
|
|
4702
|
+
viewportIntent: state.viewportIntent,
|
|
4703
|
+
viewportIntentSeq: state.viewportIntentSeq
|
|
4704
|
+
}
|
|
4705
|
+
),
|
|
4706
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SlidePanel, { open: !!configTarget, children: configTarget && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4707
|
+
ModuleConfigPanel,
|
|
4708
|
+
{
|
|
4709
|
+
instance_id: configTarget,
|
|
4710
|
+
engine,
|
|
4711
|
+
onClose: () => setConfigTarget(null),
|
|
4712
|
+
onModified: clearNew
|
|
4713
|
+
}
|
|
4714
|
+
) }),
|
|
4715
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SlidePanel, { open: !!selectedEdge, zIndex: 40, children: selectedEdge && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4716
|
+
EdgeInspectorPanel,
|
|
4717
|
+
{
|
|
4718
|
+
source: selectedEdge.source,
|
|
4719
|
+
target: selectedEdge.target,
|
|
4720
|
+
sourceOutput: selectedEdge.sourceOutput,
|
|
4721
|
+
targetInput: selectedEdge.targetInput,
|
|
4722
|
+
onDelete: onDeleteSelectedEdge,
|
|
4723
|
+
onClose: clearSelectedEdge
|
|
4724
|
+
}
|
|
4725
|
+
) }),
|
|
4726
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SlidePanel, { open: settingsOpen, children: settingsOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4727
|
+
UnifiedSettingsPanel,
|
|
4728
|
+
{
|
|
4729
|
+
engine,
|
|
4730
|
+
onClose: () => setSettingsOpen(false),
|
|
4731
|
+
onSaved: () => showToast("Settings saved", "success")
|
|
4732
|
+
}
|
|
4733
|
+
) }),
|
|
4734
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SlidePanel, { open: policyOpen, children: policyOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4735
|
+
PolicySidebar,
|
|
4736
|
+
{
|
|
4737
|
+
resolution: policyResolution,
|
|
4738
|
+
onPreview: previewPolicy,
|
|
4739
|
+
onClose: () => setPolicyOpen(false)
|
|
4740
|
+
}
|
|
4741
|
+
) }),
|
|
4742
|
+
canBrowseRegistry && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SlidePanel, { open: registryOpen, children: registryOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4743
|
+
RegistryBrowser,
|
|
4744
|
+
{
|
|
4745
|
+
engine,
|
|
4746
|
+
registryBaseUrl,
|
|
4747
|
+
apiToken,
|
|
4748
|
+
showToast,
|
|
4749
|
+
onClose: closeRegistry
|
|
4750
|
+
}
|
|
4751
|
+
) })
|
|
4752
|
+
] })
|
|
4753
|
+
] });
|
|
4755
4754
|
}
|
|
4756
4755
|
|
|
4757
4756
|
// src/components/ErrorBoundary.tsx
|
|
@@ -4807,9 +4806,11 @@ function useWindowEvent(eventName, handler, options) {
|
|
|
4807
4806
|
|
|
4808
4807
|
// src/App.tsx
|
|
4809
4808
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4809
|
+
var FIT_ALL_INTENT = { kind: "fit-all" };
|
|
4810
4810
|
function App({
|
|
4811
4811
|
engine,
|
|
4812
4812
|
hostBridge,
|
|
4813
|
+
height = "100vh",
|
|
4813
4814
|
readOnly = false,
|
|
4814
4815
|
registryBaseUrl,
|
|
4815
4816
|
apiToken
|
|
@@ -4825,15 +4826,20 @@ function App({
|
|
|
4825
4826
|
const toggleLocalGroupCollapse = (0, import_react35.useCallback)((groupId, currentCollapsed) => {
|
|
4826
4827
|
setLocalGroupCollapseOverrides((prev) => ({ ...prev, [groupId]: !currentCollapsed }));
|
|
4827
4828
|
}, []);
|
|
4829
|
+
const refitOnNextStateRef = (0, import_react35.useRef)(true);
|
|
4828
4830
|
(0, import_react35.useEffect)(() => {
|
|
4831
|
+
refitOnNextStateRef.current = true;
|
|
4829
4832
|
return engine.onEvent((event) => {
|
|
4830
4833
|
if (event.type === "stateUpdated") {
|
|
4834
|
+
const refit = refitOnNextStateRef.current;
|
|
4835
|
+
refitOnNextStateRef.current = false;
|
|
4836
|
+
const viewportIntent = event.viewportIntent ?? (refit ? FIT_ALL_INTENT : null);
|
|
4831
4837
|
setState((prev) => ({
|
|
4832
4838
|
view: event.view,
|
|
4833
4839
|
loading: false,
|
|
4834
4840
|
generation: prev.generation + 1,
|
|
4835
|
-
viewportIntent
|
|
4836
|
-
viewportIntentSeq: prev.viewportIntentSeq + (
|
|
4841
|
+
viewportIntent,
|
|
4842
|
+
viewportIntentSeq: prev.viewportIntentSeq + (viewportIntent ? 1 : 0)
|
|
4837
4843
|
}));
|
|
4838
4844
|
}
|
|
4839
4845
|
});
|
|
@@ -4865,7 +4871,7 @@ function App({
|
|
|
4865
4871
|
localGroupCollapseOverrides,
|
|
4866
4872
|
toggleLocalGroupCollapse
|
|
4867
4873
|
},
|
|
4868
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react34.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Canvas, { registryBaseUrl, apiToken }) })
|
|
4874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react34.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Canvas, { height, registryBaseUrl, apiToken }) })
|
|
4869
4875
|
}
|
|
4870
4876
|
) });
|
|
4871
4877
|
}
|
|
@@ -8893,7 +8899,6 @@ var LayoutsMap_LayoutsEntry = {
|
|
|
8893
8899
|
function createBasePolicyResolution() {
|
|
8894
8900
|
return {
|
|
8895
8901
|
mode: "",
|
|
8896
|
-
runner_location: "",
|
|
8897
8902
|
policy_id: "",
|
|
8898
8903
|
rules_fired: [],
|
|
8899
8904
|
reason: "",
|
|
@@ -8907,9 +8912,6 @@ var PolicyResolution = {
|
|
|
8907
8912
|
if (message.mode !== "") {
|
|
8908
8913
|
writer.uint32(10).string(message.mode);
|
|
8909
8914
|
}
|
|
8910
|
-
if (message.runner_location !== "") {
|
|
8911
|
-
writer.uint32(18).string(message.runner_location);
|
|
8912
|
-
}
|
|
8913
8915
|
if (message.policy_id !== "") {
|
|
8914
8916
|
writer.uint32(26).string(message.policy_id);
|
|
8915
8917
|
}
|
|
@@ -8944,13 +8946,6 @@ var PolicyResolution = {
|
|
|
8944
8946
|
message.mode = reader.string();
|
|
8945
8947
|
continue;
|
|
8946
8948
|
}
|
|
8947
|
-
case 2: {
|
|
8948
|
-
if (tag !== 18) {
|
|
8949
|
-
break;
|
|
8950
|
-
}
|
|
8951
|
-
message.runner_location = reader.string();
|
|
8952
|
-
continue;
|
|
8953
|
-
}
|
|
8954
8949
|
case 3: {
|
|
8955
8950
|
if (tag !== 26) {
|
|
8956
8951
|
break;
|
|
@@ -9004,7 +8999,6 @@ var PolicyResolution = {
|
|
|
9004
8999
|
fromJSON(object) {
|
|
9005
9000
|
return {
|
|
9006
9001
|
mode: isSet2(object.mode) ? globalThis.String(object.mode) : "",
|
|
9007
|
-
runner_location: isSet2(object.runnerLocation) ? globalThis.String(object.runnerLocation) : isSet2(object.runner_location) ? globalThis.String(object.runner_location) : "",
|
|
9008
9002
|
policy_id: isSet2(object.policyId) ? globalThis.String(object.policyId) : isSet2(object.policy_id) ? globalThis.String(object.policy_id) : "",
|
|
9009
9003
|
rules_fired: globalThis.Array.isArray(object?.rulesFired) ? object.rulesFired.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.rules_fired) ? object.rules_fired.map((e) => globalThis.String(e)) : [],
|
|
9010
9004
|
reason: isSet2(object.reason) ? globalThis.String(object.reason) : "",
|
|
@@ -9018,9 +9012,6 @@ var PolicyResolution = {
|
|
|
9018
9012
|
if (message.mode !== "") {
|
|
9019
9013
|
obj.mode = message.mode;
|
|
9020
9014
|
}
|
|
9021
|
-
if (message.runner_location !== "") {
|
|
9022
|
-
obj.runnerLocation = message.runner_location;
|
|
9023
|
-
}
|
|
9024
9015
|
if (message.policy_id !== "") {
|
|
9025
9016
|
obj.policyId = message.policy_id;
|
|
9026
9017
|
}
|
|
@@ -9047,7 +9038,6 @@ var PolicyResolution = {
|
|
|
9047
9038
|
fromPartial(object) {
|
|
9048
9039
|
const message = createBasePolicyResolution();
|
|
9049
9040
|
message.mode = object.mode ?? "";
|
|
9050
|
-
message.runner_location = object.runner_location ?? "";
|
|
9051
9041
|
message.policy_id = object.policy_id ?? "";
|
|
9052
9042
|
message.rules_fired = object.rules_fired?.map((e) => e) || [];
|
|
9053
9043
|
message.reason = object.reason ?? "";
|
|
@@ -17742,7 +17732,6 @@ var ConnectWebEngine = class {
|
|
|
17742
17732
|
function convertPolicyResolution(p) {
|
|
17743
17733
|
return {
|
|
17744
17734
|
mode: p.mode,
|
|
17745
|
-
runnerLocation: p.runner_location,
|
|
17746
17735
|
policyId: p.policy_id,
|
|
17747
17736
|
rulesFired: [...p.rules_fired],
|
|
17748
17737
|
reason: p.reason,
|
|
@@ -18284,7 +18273,6 @@ var PostMessageEngine = class {
|
|
|
18284
18273
|
function convertPolicyResolution2(p) {
|
|
18285
18274
|
return {
|
|
18286
18275
|
mode: p.mode,
|
|
18287
|
-
runnerLocation: p.runner_location,
|
|
18288
18276
|
policyId: p.policy_id,
|
|
18289
18277
|
rulesFired: [...p.rules_fired],
|
|
18290
18278
|
reason: p.reason,
|
|
@@ -18538,7 +18526,6 @@ var SnapshotCanvasEngine = class {
|
|
|
18538
18526
|
async previewPolicyResolution(_delta, _signal) {
|
|
18539
18527
|
return {
|
|
18540
18528
|
mode: "auto_apply",
|
|
18541
|
-
runnerLocation: "local",
|
|
18542
18529
|
policyId: "",
|
|
18543
18530
|
rulesFired: [],
|
|
18544
18531
|
reason: "",
|