@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/dist/index.d.mts
CHANGED
|
@@ -2,9 +2,9 @@ import { CanvasView, Diagnostic, NodeConfig, EdgeConfig, SettingsConfig, RenderE
|
|
|
2
2
|
export { CanvasView, Diagnostic, EdgeConfig, GeneratePhase, HostToWebview, NodeConfig, NodePin, ProjectionMeta, RenderEdge, RenderError, RenderGroup, RenderInput, RenderNode, RenderOutput, SettingsConfig, ViewportIntent, projectCanvasView } from '@lace-cloud/proto';
|
|
3
3
|
export { Toast } from '@lace-cloud/ui/feedback';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
6
5
|
import * as React from 'react';
|
|
7
6
|
import React__default from 'react';
|
|
7
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
8
8
|
import { NodeProps, Node } from '@xyflow/react';
|
|
9
9
|
|
|
10
10
|
interface Bundle {
|
|
@@ -263,7 +263,6 @@ type PolicyConditionTrace = {
|
|
|
263
263
|
*/
|
|
264
264
|
type PolicyResolution = {
|
|
265
265
|
mode: string;
|
|
266
|
-
runnerLocation: string;
|
|
267
266
|
policyId: string;
|
|
268
267
|
rulesFired: string[];
|
|
269
268
|
reason: string;
|
|
@@ -527,6 +526,11 @@ type HostBridge = {
|
|
|
527
526
|
type AppProps = {
|
|
528
527
|
engine: CanvasEngine;
|
|
529
528
|
hostBridge: HostBridge;
|
|
529
|
+
/**
|
|
530
|
+
* Height of the canvas root. Defaults to `100vh`; embedded consumers can
|
|
531
|
+
* pass `100%` when their parent establishes an explicit height.
|
|
532
|
+
*/
|
|
533
|
+
height?: React__default.CSSProperties['height'];
|
|
530
534
|
/**
|
|
531
535
|
* When true, the canvas renders in read-only mode: pan/zoom/drag/inspect
|
|
532
536
|
* still work, but every IR-mutating affordance (save, delete, rename,
|
|
@@ -538,7 +542,7 @@ type AppProps = {
|
|
|
538
542
|
/** API token for registry access. */
|
|
539
543
|
apiToken?: string;
|
|
540
544
|
};
|
|
541
|
-
declare function App({ engine, hostBridge, readOnly, registryBaseUrl, apiToken, }: AppProps): react_jsx_runtime.JSX.Element;
|
|
545
|
+
declare function App({ engine, hostBridge, height, readOnly, registryBaseUrl, apiToken, }: AppProps): react_jsx_runtime.JSX.Element;
|
|
542
546
|
|
|
543
547
|
type Props$a = {
|
|
544
548
|
title: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { CanvasView, Diagnostic, NodeConfig, EdgeConfig, SettingsConfig, RenderE
|
|
|
2
2
|
export { CanvasView, Diagnostic, EdgeConfig, GeneratePhase, HostToWebview, NodeConfig, NodePin, ProjectionMeta, RenderEdge, RenderError, RenderGroup, RenderInput, RenderNode, RenderOutput, SettingsConfig, ViewportIntent, projectCanvasView } from '@lace-cloud/proto';
|
|
3
3
|
export { Toast } from '@lace-cloud/ui/feedback';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
6
5
|
import * as React from 'react';
|
|
7
6
|
import React__default from 'react';
|
|
7
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
8
8
|
import { NodeProps, Node } from '@xyflow/react';
|
|
9
9
|
|
|
10
10
|
interface Bundle {
|
|
@@ -263,7 +263,6 @@ type PolicyConditionTrace = {
|
|
|
263
263
|
*/
|
|
264
264
|
type PolicyResolution = {
|
|
265
265
|
mode: string;
|
|
266
|
-
runnerLocation: string;
|
|
267
266
|
policyId: string;
|
|
268
267
|
rulesFired: string[];
|
|
269
268
|
reason: string;
|
|
@@ -527,6 +526,11 @@ type HostBridge = {
|
|
|
527
526
|
type AppProps = {
|
|
528
527
|
engine: CanvasEngine;
|
|
529
528
|
hostBridge: HostBridge;
|
|
529
|
+
/**
|
|
530
|
+
* Height of the canvas root. Defaults to `100vh`; embedded consumers can
|
|
531
|
+
* pass `100%` when their parent establishes an explicit height.
|
|
532
|
+
*/
|
|
533
|
+
height?: React__default.CSSProperties['height'];
|
|
530
534
|
/**
|
|
531
535
|
* When true, the canvas renders in read-only mode: pan/zoom/drag/inspect
|
|
532
536
|
* still work, but every IR-mutating affordance (save, delete, rename,
|
|
@@ -538,7 +542,7 @@ type AppProps = {
|
|
|
538
542
|
/** API token for registry access. */
|
|
539
543
|
apiToken?: string;
|
|
540
544
|
};
|
|
541
|
-
declare function App({ engine, hostBridge, readOnly, registryBaseUrl, apiToken, }: AppProps): react_jsx_runtime.JSX.Element;
|
|
545
|
+
declare function App({ engine, hostBridge, height, readOnly, registryBaseUrl, apiToken, }: AppProps): react_jsx_runtime.JSX.Element;
|
|
542
546
|
|
|
543
547
|
type Props$a = {
|
|
544
548
|
title: string;
|
package/dist/index.mjs
CHANGED
|
@@ -4,10 +4,11 @@ import { Toast as Toast2 } from "@lace-cloud/ui/feedback";
|
|
|
4
4
|
|
|
5
5
|
// src/App.tsx
|
|
6
6
|
import { ReactFlowProvider } from "@xyflow/react";
|
|
7
|
-
import { useCallback as useCallback21, useEffect as useEffect17, useState as useState24 } from "react";
|
|
7
|
+
import { useCallback as useCallback21, useEffect as useEffect17, useRef as useRef10, useState as useState24 } from "react";
|
|
8
8
|
|
|
9
9
|
// src/Canvas.tsx
|
|
10
|
-
import "
|
|
10
|
+
import "@xyflow/react/dist/style.css";
|
|
11
|
+
import "./Canvas-J6F7YHEK.css";
|
|
11
12
|
import { Toast } from "@lace-cloud/ui/feedback";
|
|
12
13
|
import {
|
|
13
14
|
applyEdgeChanges,
|
|
@@ -4092,6 +4093,7 @@ var nodeTypes = {
|
|
|
4092
4093
|
moduleNode: ModuleNode_default,
|
|
4093
4094
|
groupNode: GroupNode_default
|
|
4094
4095
|
};
|
|
4096
|
+
var FIT_VIEW_OPTIONS = { padding: 0.2, duration: 300 };
|
|
4095
4097
|
function CompositeEditor({
|
|
4096
4098
|
view,
|
|
4097
4099
|
readOnly,
|
|
@@ -4125,11 +4127,6 @@ function CompositeEditor({
|
|
|
4125
4127
|
const nodesInitialized = xyflowInitialized || view.nodes.length === 0;
|
|
4126
4128
|
const selectedIdsRef = useRef8([]);
|
|
4127
4129
|
const pendingSelectIdsRef = useRef8(null);
|
|
4128
|
-
useEffect15(() => {
|
|
4129
|
-
if (view.nodes.length > 0) {
|
|
4130
|
-
requestAnimationFrame(() => fitView({ padding: 0.2, duration: 300 }));
|
|
4131
|
-
}
|
|
4132
|
-
}, []);
|
|
4133
4130
|
useEffect15(() => {
|
|
4134
4131
|
registerGoToNode((nodeId) => {
|
|
4135
4132
|
const n = getNode(nodeId);
|
|
@@ -4154,8 +4151,8 @@ function CompositeEditor({
|
|
|
4154
4151
|
if (viewportIntent.kind === "fit-all") {
|
|
4155
4152
|
if (view.nodes.length > 0) {
|
|
4156
4153
|
fitView({
|
|
4157
|
-
padding: viewportIntent.padding ??
|
|
4158
|
-
duration: viewportIntent.duration ??
|
|
4154
|
+
padding: viewportIntent.padding ?? FIT_VIEW_OPTIONS.padding,
|
|
4155
|
+
duration: viewportIntent.duration ?? FIT_VIEW_OPTIONS.duration
|
|
4159
4156
|
});
|
|
4160
4157
|
}
|
|
4161
4158
|
return;
|
|
@@ -4175,7 +4172,7 @@ function CompositeEditor({
|
|
|
4175
4172
|
}
|
|
4176
4173
|
);
|
|
4177
4174
|
});
|
|
4178
|
-
}, [
|
|
4175
|
+
}, [viewportIntentSeq]);
|
|
4179
4176
|
const groupLogic = useGroupLogic(view.nodes, view.edges, view.groups, newNodeIds, erroredNodeIds);
|
|
4180
4177
|
const rfEdgesFromView = groupLogic.rfEdges;
|
|
4181
4178
|
const [rfEdges, setRfEdges] = useState23(rfEdgesFromView);
|
|
@@ -4331,7 +4328,15 @@ function CompositeEditor({
|
|
|
4331
4328
|
nodeColor: "var(--lace-color-accent)"
|
|
4332
4329
|
}
|
|
4333
4330
|
) : null,
|
|
4334
|
-
/* @__PURE__ */ jsx20(
|
|
4331
|
+
/* @__PURE__ */ jsx20(
|
|
4332
|
+
Controls,
|
|
4333
|
+
{
|
|
4334
|
+
position: "bottom-right",
|
|
4335
|
+
showInteractive: false,
|
|
4336
|
+
fitViewOptions: FIT_VIEW_OPTIONS,
|
|
4337
|
+
style: { bottom: 20, right: 20 }
|
|
4338
|
+
}
|
|
4339
|
+
),
|
|
4335
4340
|
/* @__PURE__ */ jsx20(
|
|
4336
4341
|
ActionBar,
|
|
4337
4342
|
{
|
|
@@ -4358,7 +4363,7 @@ function CompositeEditor({
|
|
|
4358
4363
|
}
|
|
4359
4364
|
);
|
|
4360
4365
|
}
|
|
4361
|
-
function Canvas({ registryBaseUrl, apiToken }
|
|
4366
|
+
function Canvas({ height, registryBaseUrl, apiToken }) {
|
|
4362
4367
|
const { state, readOnly, localGroupCollapseOverrides } = useCanvas();
|
|
4363
4368
|
const engine = useEngine();
|
|
4364
4369
|
const viewRef = useRef8(state.view);
|
|
@@ -4568,7 +4573,7 @@ function Canvas({ registryBaseUrl, apiToken } = {}) {
|
|
|
4568
4573
|
"div",
|
|
4569
4574
|
{
|
|
4570
4575
|
style: {
|
|
4571
|
-
height
|
|
4576
|
+
height,
|
|
4572
4577
|
display: "flex",
|
|
4573
4578
|
alignItems: "center",
|
|
4574
4579
|
justifyContent: "center",
|
|
@@ -4584,118 +4589,112 @@ function Canvas({ registryBaseUrl, apiToken } = {}) {
|
|
|
4584
4589
|
localGroupCollapseOverrides,
|
|
4585
4590
|
readOnly
|
|
4586
4591
|
);
|
|
4587
|
-
return /* @__PURE__ */ jsxs18(
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
nodeIds: erroredNodeIds,
|
|
4610
|
-
onGoToNode: (nodeId) => goToNodeRef.current?.(nodeId),
|
|
4611
|
-
onOpenFile: (relativePath, line, column) => window.dispatchEvent(
|
|
4612
|
-
new CustomEvent(CANVAS_EVENTS.OPEN_FILE, { detail: { relativePath, line, column } })
|
|
4613
|
-
),
|
|
4614
|
-
onDismiss: dismissErrorBanner
|
|
4615
|
-
}
|
|
4592
|
+
return /* @__PURE__ */ jsxs18("div", { style: { position: "relative", display: "flex", flexDirection: "column", height }, children: [
|
|
4593
|
+
/* @__PURE__ */ jsx20(Toast, { toast }),
|
|
4594
|
+
/* @__PURE__ */ jsx20(
|
|
4595
|
+
ContextMenu,
|
|
4596
|
+
{
|
|
4597
|
+
contextMenu,
|
|
4598
|
+
onCopy,
|
|
4599
|
+
onCut,
|
|
4600
|
+
onPaste,
|
|
4601
|
+
onGroupSelected,
|
|
4602
|
+
onUngroup,
|
|
4603
|
+
onDismiss: dismissContextMenu
|
|
4604
|
+
}
|
|
4605
|
+
),
|
|
4606
|
+
!errorBannerDismissed && validationErrors.length > 0 && !toast && /* @__PURE__ */ jsx20(
|
|
4607
|
+
ValidationErrorBanner,
|
|
4608
|
+
{
|
|
4609
|
+
diagnostics: validationErrors,
|
|
4610
|
+
nodeIds: erroredNodeIds,
|
|
4611
|
+
onGoToNode: (nodeId) => goToNodeRef.current?.(nodeId),
|
|
4612
|
+
onOpenFile: (relativePath, line, column) => window.dispatchEvent(
|
|
4613
|
+
new CustomEvent(CANVAS_EVENTS.OPEN_FILE, { detail: { relativePath, line, column } })
|
|
4616
4614
|
),
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
)
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
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
|
-
|
|
4615
|
+
onDismiss: dismissErrorBanner
|
|
4616
|
+
}
|
|
4617
|
+
),
|
|
4618
|
+
/* @__PURE__ */ jsxs18("div", { style: { position: "relative", flex: "1 1 auto", minHeight: 0 }, children: [
|
|
4619
|
+
/* @__PURE__ */ jsx20(
|
|
4620
|
+
CompositeEditor,
|
|
4621
|
+
{
|
|
4622
|
+
view,
|
|
4623
|
+
readOnly,
|
|
4624
|
+
isGenerating: generating,
|
|
4625
|
+
erroredNodeIds,
|
|
4626
|
+
newNodeIds,
|
|
4627
|
+
forcePositionsRef,
|
|
4628
|
+
onDragStop,
|
|
4629
|
+
onConnect,
|
|
4630
|
+
onEdgeClick,
|
|
4631
|
+
onEdgesDelete,
|
|
4632
|
+
onNodesDelete,
|
|
4633
|
+
onSave,
|
|
4634
|
+
onUndo,
|
|
4635
|
+
onRedo,
|
|
4636
|
+
onClearGraph,
|
|
4637
|
+
onGenerate,
|
|
4638
|
+
onOpenSettings,
|
|
4639
|
+
onOpenPolicy: readOnly ? void 0 : onOpenPolicy,
|
|
4640
|
+
onOpenRegistry: canBrowseRegistry ? openRegistry : void 0,
|
|
4641
|
+
showMiniMap,
|
|
4642
|
+
onToggleMiniMap: toggleMiniMap,
|
|
4643
|
+
registerGoToNode,
|
|
4644
|
+
registerGetSelectedIds,
|
|
4645
|
+
registerSelectNodes,
|
|
4646
|
+
viewportIntent: state.viewportIntent,
|
|
4647
|
+
viewportIntentSeq: state.viewportIntentSeq
|
|
4648
|
+
}
|
|
4649
|
+
),
|
|
4650
|
+
/* @__PURE__ */ jsx20(SlidePanel, { open: !!configTarget, children: configTarget && /* @__PURE__ */ jsx20(
|
|
4651
|
+
ModuleConfigPanel,
|
|
4652
|
+
{
|
|
4653
|
+
instance_id: configTarget,
|
|
4654
|
+
engine,
|
|
4655
|
+
onClose: () => setConfigTarget(null),
|
|
4656
|
+
onModified: clearNew
|
|
4657
|
+
}
|
|
4658
|
+
) }),
|
|
4659
|
+
/* @__PURE__ */ jsx20(SlidePanel, { open: !!selectedEdge, zIndex: 40, children: selectedEdge && /* @__PURE__ */ jsx20(
|
|
4660
|
+
EdgeInspectorPanel,
|
|
4661
|
+
{
|
|
4662
|
+
source: selectedEdge.source,
|
|
4663
|
+
target: selectedEdge.target,
|
|
4664
|
+
sourceOutput: selectedEdge.sourceOutput,
|
|
4665
|
+
targetInput: selectedEdge.targetInput,
|
|
4666
|
+
onDelete: onDeleteSelectedEdge,
|
|
4667
|
+
onClose: clearSelectedEdge
|
|
4668
|
+
}
|
|
4669
|
+
) }),
|
|
4670
|
+
/* @__PURE__ */ jsx20(SlidePanel, { open: settingsOpen, children: settingsOpen && /* @__PURE__ */ jsx20(
|
|
4671
|
+
UnifiedSettingsPanel,
|
|
4672
|
+
{
|
|
4673
|
+
engine,
|
|
4674
|
+
onClose: () => setSettingsOpen(false),
|
|
4675
|
+
onSaved: () => showToast("Settings saved", "success")
|
|
4676
|
+
}
|
|
4677
|
+
) }),
|
|
4678
|
+
!readOnly && /* @__PURE__ */ jsx20(SlidePanel, { open: policyOpen, children: policyOpen && /* @__PURE__ */ jsx20(
|
|
4679
|
+
PolicySidebar,
|
|
4680
|
+
{
|
|
4681
|
+
resolution: policyResolution,
|
|
4682
|
+
onPreview: previewPolicy,
|
|
4683
|
+
onClose: () => setPolicyOpen(false)
|
|
4684
|
+
}
|
|
4685
|
+
) }),
|
|
4686
|
+
canBrowseRegistry && /* @__PURE__ */ jsx20(SlidePanel, { open: registryOpen, children: registryOpen && /* @__PURE__ */ jsx20(
|
|
4687
|
+
RegistryBrowser,
|
|
4688
|
+
{
|
|
4689
|
+
engine,
|
|
4690
|
+
registryBaseUrl,
|
|
4691
|
+
apiToken,
|
|
4692
|
+
showToast,
|
|
4693
|
+
onClose: closeRegistry
|
|
4694
|
+
}
|
|
4695
|
+
) })
|
|
4696
|
+
] })
|
|
4697
|
+
] });
|
|
4699
4698
|
}
|
|
4700
4699
|
|
|
4701
4700
|
// src/components/ErrorBoundary.tsx
|
|
@@ -4751,9 +4750,11 @@ function useWindowEvent(eventName, handler, options) {
|
|
|
4751
4750
|
|
|
4752
4751
|
// src/App.tsx
|
|
4753
4752
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
4753
|
+
var FIT_ALL_INTENT = { kind: "fit-all" };
|
|
4754
4754
|
function App({
|
|
4755
4755
|
engine,
|
|
4756
4756
|
hostBridge,
|
|
4757
|
+
height = "100vh",
|
|
4757
4758
|
readOnly = false,
|
|
4758
4759
|
registryBaseUrl,
|
|
4759
4760
|
apiToken
|
|
@@ -4769,15 +4770,20 @@ function App({
|
|
|
4769
4770
|
const toggleLocalGroupCollapse = useCallback21((groupId, currentCollapsed) => {
|
|
4770
4771
|
setLocalGroupCollapseOverrides((prev) => ({ ...prev, [groupId]: !currentCollapsed }));
|
|
4771
4772
|
}, []);
|
|
4773
|
+
const refitOnNextStateRef = useRef10(true);
|
|
4772
4774
|
useEffect17(() => {
|
|
4775
|
+
refitOnNextStateRef.current = true;
|
|
4773
4776
|
return engine.onEvent((event) => {
|
|
4774
4777
|
if (event.type === "stateUpdated") {
|
|
4778
|
+
const refit = refitOnNextStateRef.current;
|
|
4779
|
+
refitOnNextStateRef.current = false;
|
|
4780
|
+
const viewportIntent = event.viewportIntent ?? (refit ? FIT_ALL_INTENT : null);
|
|
4775
4781
|
setState((prev) => ({
|
|
4776
4782
|
view: event.view,
|
|
4777
4783
|
loading: false,
|
|
4778
4784
|
generation: prev.generation + 1,
|
|
4779
|
-
viewportIntent
|
|
4780
|
-
viewportIntentSeq: prev.viewportIntentSeq + (
|
|
4785
|
+
viewportIntent,
|
|
4786
|
+
viewportIntentSeq: prev.viewportIntentSeq + (viewportIntent ? 1 : 0)
|
|
4781
4787
|
}));
|
|
4782
4788
|
}
|
|
4783
4789
|
});
|
|
@@ -4809,7 +4815,7 @@ function App({
|
|
|
4809
4815
|
localGroupCollapseOverrides,
|
|
4810
4816
|
toggleLocalGroupCollapse
|
|
4811
4817
|
},
|
|
4812
|
-
children: /* @__PURE__ */ jsx22(ReactFlowProvider, { children: /* @__PURE__ */ jsx22(Canvas, { registryBaseUrl, apiToken }) })
|
|
4818
|
+
children: /* @__PURE__ */ jsx22(ReactFlowProvider, { children: /* @__PURE__ */ jsx22(Canvas, { height, registryBaseUrl, apiToken }) })
|
|
4813
4819
|
}
|
|
4814
4820
|
) });
|
|
4815
4821
|
}
|
|
@@ -8846,7 +8852,6 @@ var LayoutsMap_LayoutsEntry = {
|
|
|
8846
8852
|
function createBasePolicyResolution() {
|
|
8847
8853
|
return {
|
|
8848
8854
|
mode: "",
|
|
8849
|
-
runner_location: "",
|
|
8850
8855
|
policy_id: "",
|
|
8851
8856
|
rules_fired: [],
|
|
8852
8857
|
reason: "",
|
|
@@ -8860,9 +8865,6 @@ var PolicyResolution = {
|
|
|
8860
8865
|
if (message.mode !== "") {
|
|
8861
8866
|
writer.uint32(10).string(message.mode);
|
|
8862
8867
|
}
|
|
8863
|
-
if (message.runner_location !== "") {
|
|
8864
|
-
writer.uint32(18).string(message.runner_location);
|
|
8865
|
-
}
|
|
8866
8868
|
if (message.policy_id !== "") {
|
|
8867
8869
|
writer.uint32(26).string(message.policy_id);
|
|
8868
8870
|
}
|
|
@@ -8897,13 +8899,6 @@ var PolicyResolution = {
|
|
|
8897
8899
|
message.mode = reader.string();
|
|
8898
8900
|
continue;
|
|
8899
8901
|
}
|
|
8900
|
-
case 2: {
|
|
8901
|
-
if (tag !== 18) {
|
|
8902
|
-
break;
|
|
8903
|
-
}
|
|
8904
|
-
message.runner_location = reader.string();
|
|
8905
|
-
continue;
|
|
8906
|
-
}
|
|
8907
8902
|
case 3: {
|
|
8908
8903
|
if (tag !== 26) {
|
|
8909
8904
|
break;
|
|
@@ -8957,7 +8952,6 @@ var PolicyResolution = {
|
|
|
8957
8952
|
fromJSON(object) {
|
|
8958
8953
|
return {
|
|
8959
8954
|
mode: isSet2(object.mode) ? globalThis.String(object.mode) : "",
|
|
8960
|
-
runner_location: isSet2(object.runnerLocation) ? globalThis.String(object.runnerLocation) : isSet2(object.runner_location) ? globalThis.String(object.runner_location) : "",
|
|
8961
8955
|
policy_id: isSet2(object.policyId) ? globalThis.String(object.policyId) : isSet2(object.policy_id) ? globalThis.String(object.policy_id) : "",
|
|
8962
8956
|
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)) : [],
|
|
8963
8957
|
reason: isSet2(object.reason) ? globalThis.String(object.reason) : "",
|
|
@@ -8971,9 +8965,6 @@ var PolicyResolution = {
|
|
|
8971
8965
|
if (message.mode !== "") {
|
|
8972
8966
|
obj.mode = message.mode;
|
|
8973
8967
|
}
|
|
8974
|
-
if (message.runner_location !== "") {
|
|
8975
|
-
obj.runnerLocation = message.runner_location;
|
|
8976
|
-
}
|
|
8977
8968
|
if (message.policy_id !== "") {
|
|
8978
8969
|
obj.policyId = message.policy_id;
|
|
8979
8970
|
}
|
|
@@ -9000,7 +8991,6 @@ var PolicyResolution = {
|
|
|
9000
8991
|
fromPartial(object) {
|
|
9001
8992
|
const message = createBasePolicyResolution();
|
|
9002
8993
|
message.mode = object.mode ?? "";
|
|
9003
|
-
message.runner_location = object.runner_location ?? "";
|
|
9004
8994
|
message.policy_id = object.policy_id ?? "";
|
|
9005
8995
|
message.rules_fired = object.rules_fired?.map((e) => e) || [];
|
|
9006
8996
|
message.reason = object.reason ?? "";
|
|
@@ -17695,7 +17685,6 @@ var ConnectWebEngine = class {
|
|
|
17695
17685
|
function convertPolicyResolution(p) {
|
|
17696
17686
|
return {
|
|
17697
17687
|
mode: p.mode,
|
|
17698
|
-
runnerLocation: p.runner_location,
|
|
17699
17688
|
policyId: p.policy_id,
|
|
17700
17689
|
rulesFired: [...p.rules_fired],
|
|
17701
17690
|
reason: p.reason,
|
|
@@ -18237,7 +18226,6 @@ var PostMessageEngine = class {
|
|
|
18237
18226
|
function convertPolicyResolution2(p) {
|
|
18238
18227
|
return {
|
|
18239
18228
|
mode: p.mode,
|
|
18240
|
-
runnerLocation: p.runner_location,
|
|
18241
18229
|
policyId: p.policy_id,
|
|
18242
18230
|
rulesFired: [...p.rules_fired],
|
|
18243
18231
|
reason: p.reason,
|
|
@@ -18491,7 +18479,6 @@ var SnapshotCanvasEngine = class {
|
|
|
18491
18479
|
async previewPolicyResolution(_delta, _signal) {
|
|
18492
18480
|
return {
|
|
18493
18481
|
mode: "auto_apply",
|
|
18494
|
-
runnerLocation: "local",
|
|
18495
18482
|
policyId: "",
|
|
18496
18483
|
rulesFired: [],
|
|
18497
18484
|
reason: "",
|