likec4 1.42.1 → 1.43.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/__app__/src/likec4.js +278 -106
- package/__app__/src/main.js +3 -3
- package/__app__/src/style.css +1 -1
- package/__app__/src/vendors.js +142 -81
- package/config/schema.json +149 -105
- package/dist/cli/index.mjs +234 -233
- package/dist/config/index.d.mts +1 -1
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/shared/{likec4.BCSBNe4z.d.mts → likec4.CQWzqezS.d.mts} +144 -144
- package/dist/shared/{likec4.BEwUtMsL.mjs → likec4.CWfMOOnG.mjs} +1 -1
- package/dist/shared/{likec4.B5Q51Z1F.mjs → likec4.DtL27jG4.mjs} +85 -80
- package/dist/shared/{likec4.D51sTGt6.mjs → likec4.DvPKV9S-.mjs} +2381 -2376
- package/dist/shared/{likec4.CaOUU1HJ.d.mts → likec4.VWjIqhhl.d.mts} +36 -19
- package/dist/vite-plugin/index.d.mts +2 -2
- package/dist/vite-plugin/index.mjs +1 -1
- package/package.json +28 -28
- package/react/index.d.ts +37 -13
- package/react/index.js +477 -211
package/__app__/src/vendors.js
CHANGED
|
@@ -793,9 +793,9 @@ function useClickOutside(callback, events, nodes) {
|
|
|
793
793
|
const listener = (event) => {
|
|
794
794
|
const { target } = event ?? {};
|
|
795
795
|
if (Array.isArray(nodes)) {
|
|
796
|
-
const shouldIgnore = !document.body.contains(target) && target
|
|
797
|
-
nodes.every((node2) => !!node2 && !event.composedPath().includes(node2)) && !shouldIgnore && callback();
|
|
798
|
-
} else ref.current && !ref.current.contains(target) && callback();
|
|
796
|
+
const shouldIgnore = !document.body.contains(target) && target?.tagName !== "HTML";
|
|
797
|
+
nodes.every((node2) => !!node2 && !event.composedPath().includes(node2)) && !shouldIgnore && callback(event);
|
|
798
|
+
} else ref.current && !ref.current.contains(target) && callback(event);
|
|
799
799
|
};
|
|
800
800
|
return eventsList.forEach((fn) => document.addEventListener(fn, listener)), () => {
|
|
801
801
|
eventsList.forEach((fn) => document.removeEventListener(fn, listener));
|
|
@@ -1059,8 +1059,8 @@ function createStorage(type2, hookName) {
|
|
|
1059
1059
|
},
|
|
1060
1060
|
[key2]
|
|
1061
1061
|
), removeStorageValue = useCallback(() => {
|
|
1062
|
-
removeItem2(key2), window.dispatchEvent(new CustomEvent(eventName, { detail: { key: key2, value: defaultValue } }));
|
|
1063
|
-
}, []);
|
|
1062
|
+
removeItem2(key2), setValue(defaultValue), window.dispatchEvent(new CustomEvent(eventName, { detail: { key: key2, value: defaultValue } }));
|
|
1063
|
+
}, [key2, defaultValue]);
|
|
1064
1064
|
return useWindowEvent("storage", (event) => {
|
|
1065
1065
|
sync && event.storageArea === window[type2] && event.key === key2 && setValue(deserialize2(event.newValue ?? void 0));
|
|
1066
1066
|
}), useWindowEvent(eventName, (event) => {
|
|
@@ -6866,7 +6866,6 @@ function getTransitionStyles({
|
|
|
6866
6866
|
}) {
|
|
6867
6867
|
const shared = {
|
|
6868
6868
|
WebkitBackfaceVisibility: "hidden",
|
|
6869
|
-
willChange: "transform, opacity",
|
|
6870
6869
|
transitionDuration: `${duration2}ms`,
|
|
6871
6870
|
transitionTimingFunction: timingFunction
|
|
6872
6871
|
};
|
|
@@ -7326,8 +7325,8 @@ function Popover(_props) {
|
|
|
7326
7325
|
},
|
|
7327
7326
|
[popover.floating.refs.setFloating]
|
|
7328
7327
|
), onExited = useCallback(() => {
|
|
7329
|
-
transitionProps?.onExited?.(), onExitTransitionEnd?.(), setDropdownVisible(!1), positionRef.current = position2;
|
|
7330
|
-
}, [transitionProps?.onExited, onExitTransitionEnd]), onEntered = useCallback(() => {
|
|
7328
|
+
transitionProps?.onExited?.(), onExitTransitionEnd?.(), setDropdownVisible(!1), preventPositionChangeWhenVisible || (positionRef.current = position2);
|
|
7329
|
+
}, [transitionProps?.onExited, onExitTransitionEnd, preventPositionChangeWhenVisible, position2]), onEntered = useCallback(() => {
|
|
7331
7330
|
transitionProps?.onEntered?.(), onEnterTransitionEnd?.();
|
|
7332
7331
|
}, [transitionProps?.onEntered, onEnterTransitionEnd]);
|
|
7333
7332
|
return /* @__PURE__ */ jsxs(
|
|
@@ -8119,7 +8118,7 @@ function InputClearSection({
|
|
|
8119
8118
|
rightSection || __defaultRightSection
|
|
8120
8119
|
]
|
|
8121
8120
|
}
|
|
8122
|
-
) : rightSection || clearSection || __defaultRightSection;
|
|
8121
|
+
) : rightSection === null ? null : rightSection || clearSection || __defaultRightSection;
|
|
8123
8122
|
}
|
|
8124
8123
|
const [InputWrapperProvider, useInputWrapperContext] = createOptionalContext({
|
|
8125
8124
|
offsetBottom: !1,
|
|
@@ -8962,8 +8961,8 @@ const varsResolver$w = (theme, { radius, color: color2, variant, autoContrast })
|
|
|
8962
8961
|
ref,
|
|
8963
8962
|
...others,
|
|
8964
8963
|
role: "alert",
|
|
8965
|
-
"aria-describedby": bodyId,
|
|
8966
|
-
"aria-labelledby": titleId,
|
|
8964
|
+
"aria-describedby": children2 ? bodyId : void 0,
|
|
8965
|
+
"aria-labelledby": title ? titleId : void 0,
|
|
8967
8966
|
children: /* @__PURE__ */ jsxs("div", { ...getStyles2("wrapper"), children: [
|
|
8968
8967
|
icon && /* @__PURE__ */ jsx("div", { ...getStyles2("icon"), children: icon }),
|
|
8969
8968
|
/* @__PURE__ */ jsxs("div", { ...getStyles2("body"), children: [
|
|
@@ -11526,7 +11525,7 @@ function MenuSub(_props) {
|
|
|
11526
11525
|
}, 16),
|
|
11527
11526
|
parentContext: ctx
|
|
11528
11527
|
},
|
|
11529
|
-
children: /* @__PURE__ */ jsx(Popover, { opened,
|
|
11528
|
+
children: /* @__PURE__ */ jsx(Popover, { opened, withinPortal: !1, withArrow: !1, id: id2, ...others, children: children2 })
|
|
11530
11529
|
}
|
|
11531
11530
|
);
|
|
11532
11531
|
}
|
|
@@ -11953,6 +11952,8 @@ const varsResolver$a = (theme, { variant, color: color2, childrenOffset, autoCon
|
|
|
11953
11952
|
autoContrast,
|
|
11954
11953
|
mod,
|
|
11955
11954
|
attributes,
|
|
11955
|
+
onClick,
|
|
11956
|
+
onKeyDown,
|
|
11956
11957
|
...others
|
|
11957
11958
|
} = props2, getStyles2 = useStyles({
|
|
11958
11959
|
name: "NavLink",
|
|
@@ -11972,7 +11973,7 @@ const varsResolver$a = (theme, { variant, color: color2, childrenOffset, autoCon
|
|
|
11972
11973
|
finalValue: !1,
|
|
11973
11974
|
onChange
|
|
11974
11975
|
}), withChildren = !!children2, handleClick = (event) => {
|
|
11975
|
-
|
|
11976
|
+
onClick?.(event), withChildren && (event.preventDefault(), setOpened(!_opened));
|
|
11976
11977
|
};
|
|
11977
11978
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
11978
11979
|
/* @__PURE__ */ jsxs(
|
|
@@ -11983,7 +11984,7 @@ const varsResolver$a = (theme, { variant, color: color2, childrenOffset, autoCon
|
|
|
11983
11984
|
ref,
|
|
11984
11985
|
onClick: handleClick,
|
|
11985
11986
|
onKeyDown: (event) => {
|
|
11986
|
-
|
|
11987
|
+
onKeyDown?.(event), event.nativeEvent.code === "Space" && withChildren && (event.preventDefault(), setOpened(!_opened));
|
|
11987
11988
|
},
|
|
11988
11989
|
unstyled,
|
|
11989
11990
|
mod: [{ disabled, active, expanded: _opened }, mod],
|
|
@@ -13545,7 +13546,6 @@ const TabsTab = factory((_props, ref) => {
|
|
|
13545
13546
|
return /* @__PURE__ */ jsxs(
|
|
13546
13547
|
UnstyledButton,
|
|
13547
13548
|
{
|
|
13548
|
-
...others,
|
|
13549
13549
|
...ctx.getStyles("tab", { className, style: style2, variant: ctx.variant, ...stylesApiProps }),
|
|
13550
13550
|
disabled,
|
|
13551
13551
|
unstyled: ctx.unstyled,
|
|
@@ -13577,6 +13577,7 @@ const TabsTab = factory((_props, ref) => {
|
|
|
13577
13577
|
dir,
|
|
13578
13578
|
onKeyDown
|
|
13579
13579
|
}),
|
|
13580
|
+
...others,
|
|
13580
13581
|
children: [
|
|
13581
13582
|
leftSection && /* @__PURE__ */ jsx("span", { ...ctx.getStyles("tabSection", stylesApiProps), "data-position": "left", children: leftSection }),
|
|
13582
13583
|
children2 && /* @__PURE__ */ jsx("span", { ...ctx.getStyles("tabLabel", stylesApiProps), children: children2 }),
|
|
@@ -20320,15 +20321,10 @@ const isEdgeBase = (element2) => "id" in element2 && "source" in element2 && "ta
|
|
|
20320
20321
|
}, { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 });
|
|
20321
20322
|
return boxToRect(box);
|
|
20322
20323
|
}, getInternalNodesBounds = (nodeLookup, params = {}) => {
|
|
20323
|
-
|
|
20324
|
-
return { x: 0, y: 0, width: 0, height: 0 };
|
|
20325
|
-
let box = { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 };
|
|
20324
|
+
let box = { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 }, hasVisibleNodes = !1;
|
|
20326
20325
|
return nodeLookup.forEach((node2) => {
|
|
20327
|
-
|
|
20328
|
-
|
|
20329
|
-
box = getBoundsOfBoxes(box, nodeBox);
|
|
20330
|
-
}
|
|
20331
|
-
}), boxToRect(box);
|
|
20326
|
+
(params.filter === void 0 || params.filter(node2)) && (box = getBoundsOfBoxes(box, nodeToBox(node2)), hasVisibleNodes = !0);
|
|
20327
|
+
}), hasVisibleNodes ? boxToRect(box) : { x: 0, y: 0, width: 0, height: 0 };
|
|
20332
20328
|
}, getNodesInside = (nodes, rect, [tx, ty, tScale] = [0, 0, 1], partially = !1, excludeNonSelectableNodes = !1) => {
|
|
20333
20329
|
const paneRect = {
|
|
20334
20330
|
...pointToRendererPoint(rect, [tx, ty, tScale]),
|
|
@@ -20869,7 +20865,7 @@ function getNodeToolbarTransform(nodeRect, viewport, position2, offset2, align)
|
|
|
20869
20865
|
}
|
|
20870
20866
|
return `translate(${pos[0]}px, ${pos[1]}px) translate(${shift2[0]}%, ${shift2[1]}%)`;
|
|
20871
20867
|
}
|
|
20872
|
-
const defaultOptions = {
|
|
20868
|
+
const SELECTED_NODE_Z = 1e3, ROOT_PARENT_Z_INCREMENT = 10, defaultOptions = {
|
|
20873
20869
|
nodeOrigin: [0, 0],
|
|
20874
20870
|
nodeExtent: infiniteExtent,
|
|
20875
20871
|
elevateNodesOnSelect: !0,
|
|
@@ -20918,8 +20914,8 @@ function parseHandles(userNode, internalNode) {
|
|
|
20918
20914
|
}
|
|
20919
20915
|
function adoptUserNodes(nodes, nodeLookup, parentLookup, options) {
|
|
20920
20916
|
const _options = mergeObjects(adoptUserNodesDefaultOptions, options);
|
|
20921
|
-
let nodesInitialized = nodes.length > 0;
|
|
20922
|
-
const tmpLookup = new Map(nodeLookup), selectedNodeZ = _options?.elevateNodesOnSelect ?
|
|
20917
|
+
let rootParentIndex = { i: -1 }, nodesInitialized = nodes.length > 0;
|
|
20918
|
+
const tmpLookup = new Map(nodeLookup), selectedNodeZ = _options?.elevateNodesOnSelect ? SELECTED_NODE_Z : 0;
|
|
20923
20919
|
nodeLookup.clear(), parentLookup.clear();
|
|
20924
20920
|
for (const userNode of nodes) {
|
|
20925
20921
|
let internalNode = tmpLookup.get(userNode.id);
|
|
@@ -20943,7 +20939,7 @@ function adoptUserNodes(nodes, nodeLookup, parentLookup, options) {
|
|
|
20943
20939
|
}
|
|
20944
20940
|
}, nodeLookup.set(userNode.id, internalNode);
|
|
20945
20941
|
}
|
|
20946
|
-
(internalNode.measured === void 0 || internalNode.measured.width === void 0 || internalNode.measured.height === void 0) && !internalNode.hidden && (nodesInitialized = !1), userNode.parentId && updateChildNode(internalNode, nodeLookup, parentLookup, options);
|
|
20942
|
+
(internalNode.measured === void 0 || internalNode.measured.width === void 0 || internalNode.measured.height === void 0) && !internalNode.hidden && (nodesInitialized = !1), userNode.parentId && updateChildNode(internalNode, nodeLookup, parentLookup, options, rootParentIndex);
|
|
20947
20943
|
}
|
|
20948
20944
|
return nodesInitialized;
|
|
20949
20945
|
}
|
|
@@ -20953,14 +20949,14 @@ function updateParentLookup(node2, parentLookup) {
|
|
|
20953
20949
|
const childNodes = parentLookup.get(node2.parentId);
|
|
20954
20950
|
childNodes ? childNodes.set(node2.id, node2) : parentLookup.set(node2.parentId, /* @__PURE__ */ new Map([[node2.id, node2]]));
|
|
20955
20951
|
}
|
|
20956
|
-
function updateChildNode(node2, nodeLookup, parentLookup, options) {
|
|
20952
|
+
function updateChildNode(node2, nodeLookup, parentLookup, options, rootParentIndex) {
|
|
20957
20953
|
const { elevateNodesOnSelect, nodeOrigin, nodeExtent } = mergeObjects(defaultOptions, options), parentId = node2.parentId, parentNode = nodeLookup.get(parentId);
|
|
20958
20954
|
if (!parentNode) {
|
|
20959
20955
|
console.warn(`Parent node ${parentId} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);
|
|
20960
20956
|
return;
|
|
20961
20957
|
}
|
|
20962
|
-
updateParentLookup(node2, parentLookup);
|
|
20963
|
-
const selectedNodeZ = elevateNodesOnSelect ?
|
|
20958
|
+
updateParentLookup(node2, parentLookup), rootParentIndex && !parentNode.parentId && parentNode.internals.rootParentIndex === void 0 && (parentNode.internals.rootParentIndex = ++rootParentIndex.i, parentNode.internals.z = parentNode.internals.z + rootParentIndex.i * ROOT_PARENT_Z_INCREMENT), rootParentIndex && parentNode.internals.rootParentIndex !== void 0 && (rootParentIndex.i = parentNode.internals.rootParentIndex);
|
|
20959
|
+
const selectedNodeZ = elevateNodesOnSelect ? SELECTED_NODE_Z : 0, { x: x2, y: y2, z } = calculateChildXYZ(node2, parentNode, nodeOrigin, nodeExtent, selectedNodeZ), { positionAbsolute } = node2.internals, positionChanged = x2 !== positionAbsolute.x || y2 !== positionAbsolute.y;
|
|
20964
20960
|
(positionChanged || z !== node2.internals.z) && nodeLookup.set(node2.id, {
|
|
20965
20961
|
...node2,
|
|
20966
20962
|
internals: {
|
|
@@ -21512,7 +21508,7 @@ function XYMinimap({ domNode, panZoom, getTransform, getViewScale }) {
|
|
|
21512
21508
|
pointer
|
|
21513
21509
|
};
|
|
21514
21510
|
}
|
|
21515
|
-
const
|
|
21511
|
+
const transformToViewport = (transform2) => ({
|
|
21516
21512
|
x: transform2.x,
|
|
21517
21513
|
y: transform2.y,
|
|
21518
21514
|
zoom: transform2.k
|
|
@@ -21545,9 +21541,9 @@ function createPanOnScrollHandler({ zoomPanValues, noWheelClassName, d3Selection
|
|
|
21545
21541
|
{ internal: !0 }
|
|
21546
21542
|
);
|
|
21547
21543
|
const nextViewport = transformToViewport(d3Selection.property("__zoom"));
|
|
21548
|
-
clearTimeout(zoomPanValues.panScrollTimeout), zoomPanValues.isPanScrolling
|
|
21544
|
+
clearTimeout(zoomPanValues.panScrollTimeout), zoomPanValues.isPanScrolling ? (onPanZoom?.(event, nextViewport), zoomPanValues.panScrollTimeout = setTimeout(() => {
|
|
21549
21545
|
onPanZoomEnd?.(event, nextViewport), zoomPanValues.isPanScrolling = !1;
|
|
21550
|
-
}, 150));
|
|
21546
|
+
}, 150)) : (zoomPanValues.isPanScrolling = !0, onPanZoomStart?.(event, nextViewport));
|
|
21551
21547
|
};
|
|
21552
21548
|
}
|
|
21553
21549
|
function createZoomOnScrollHandler({ noWheelClassName, preventScrolling, d3ZoomHandler }) {
|
|
@@ -21573,7 +21569,7 @@ function createPanZoomHandler({ zoomPanValues, panOnDrag, onPaneContextMenu, onT
|
|
|
21573
21569
|
}
|
|
21574
21570
|
function createPanZoomEndHandler({ zoomPanValues, panOnDrag, panOnScroll, onDraggingChange, onPanZoomEnd, onPaneContextMenu }) {
|
|
21575
21571
|
return (event) => {
|
|
21576
|
-
if (!event.sourceEvent?.internal && (zoomPanValues.isZoomingOrPanning = !1, onPaneContextMenu && isRightClickPan(panOnDrag, zoomPanValues.mouseButton ?? 0) && !zoomPanValues.usedRightMouseButton && event.sourceEvent && onPaneContextMenu(event.sourceEvent), zoomPanValues.usedRightMouseButton = !1, onDraggingChange(!1), onPanZoomEnd
|
|
21572
|
+
if (!event.sourceEvent?.internal && (zoomPanValues.isZoomingOrPanning = !1, onPaneContextMenu && isRightClickPan(panOnDrag, zoomPanValues.mouseButton ?? 0) && !zoomPanValues.usedRightMouseButton && event.sourceEvent && onPaneContextMenu(event.sourceEvent), zoomPanValues.usedRightMouseButton = !1, onDraggingChange(!1), onPanZoomEnd)) {
|
|
21577
21573
|
const viewport = transformToViewport(event.transform);
|
|
21578
21574
|
zoomPanValues.prevViewport = viewport, clearTimeout(zoomPanValues.timerId), zoomPanValues.timerId = setTimeout(
|
|
21579
21575
|
() => {
|
|
@@ -21604,7 +21600,7 @@ function XYPanZoom({ domNode, minZoom, maxZoom, paneClickDistance, translateExte
|
|
|
21604
21600
|
const zoomPanValues = {
|
|
21605
21601
|
isZoomingOrPanning: !1,
|
|
21606
21602
|
usedRightMouseButton: !1,
|
|
21607
|
-
prevViewport: {
|
|
21603
|
+
prevViewport: {},
|
|
21608
21604
|
mouseButton: 0,
|
|
21609
21605
|
timerId: void 0,
|
|
21610
21606
|
panScrollTimeout: void 0,
|
|
@@ -21835,9 +21831,25 @@ function nodeToChildExtent(child, parent, nodeOrigin) {
|
|
|
21835
21831
|
}
|
|
21836
21832
|
function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
|
|
21837
21833
|
const selection2 = select(domNode);
|
|
21834
|
+
let params = {
|
|
21835
|
+
controlDirection: getControlDirection("bottom-right"),
|
|
21836
|
+
boundaries: {
|
|
21837
|
+
minWidth: 0,
|
|
21838
|
+
minHeight: 0,
|
|
21839
|
+
maxWidth: Number.MAX_VALUE,
|
|
21840
|
+
maxHeight: Number.MAX_VALUE
|
|
21841
|
+
},
|
|
21842
|
+
resizeDirection: void 0,
|
|
21843
|
+
keepAspectRatio: !1
|
|
21844
|
+
};
|
|
21838
21845
|
function update({ controlPosition, boundaries, keepAspectRatio, resizeDirection, onResizeStart, onResize, onResizeEnd, shouldResize }) {
|
|
21839
21846
|
let prevValues = { ...initPrevValues$1 }, startValues = { ...initStartValues };
|
|
21840
|
-
|
|
21847
|
+
params = {
|
|
21848
|
+
boundaries,
|
|
21849
|
+
resizeDirection,
|
|
21850
|
+
keepAspectRatio,
|
|
21851
|
+
controlDirection: getControlDirection(controlPosition)
|
|
21852
|
+
};
|
|
21841
21853
|
let node2, containerBounds = null, childNodes = [], parentNode, parentExtent, childExtent, resizeDetected = !1;
|
|
21842
21854
|
const dragHandler = drag$1().on("start", (event) => {
|
|
21843
21855
|
const { nodeLookup, transform: transform2, snapGrid, snapToGrid, nodeOrigin, paneDomNode } = getStoreItems();
|
|
@@ -21883,7 +21895,7 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
|
|
|
21883
21895
|
}), childChanges = [];
|
|
21884
21896
|
if (!node2)
|
|
21885
21897
|
return;
|
|
21886
|
-
const { x: prevX, y: prevY, width: prevWidth, height: prevHeight } = prevValues, change2 = {}, nodeOrigin = node2.origin ?? storeNodeOrigin, { width, height, x: x2, y: y2 } = getDimensionsAfterResize(startValues, controlDirection, pointerPosition, boundaries, keepAspectRatio, nodeOrigin, parentExtent, childExtent), isWidthChange = width !== prevWidth, isHeightChange = height !== prevHeight, isXPosChange = x2 !== prevX && isWidthChange, isYPosChange = y2 !== prevY && isHeightChange;
|
|
21898
|
+
const { x: prevX, y: prevY, width: prevWidth, height: prevHeight } = prevValues, change2 = {}, nodeOrigin = node2.origin ?? storeNodeOrigin, { width, height, x: x2, y: y2 } = getDimensionsAfterResize(startValues, params.controlDirection, pointerPosition, params.boundaries, params.keepAspectRatio, nodeOrigin, parentExtent, childExtent), isWidthChange = width !== prevWidth, isHeightChange = height !== prevHeight, isXPosChange = x2 !== prevX && isWidthChange, isYPosChange = y2 !== prevY && isHeightChange;
|
|
21887
21899
|
if (!isXPosChange && !isYPosChange && !isWidthChange && !isHeightChange)
|
|
21888
21900
|
return;
|
|
21889
21901
|
if ((isXPosChange || isYPosChange || nodeOrigin[0] === 1 || nodeOrigin[1] === 1) && (change2.x = isXPosChange ? x2 : prevValues.x, change2.y = isYPosChange ? y2 : prevValues.y, prevValues.x = change2.x, prevValues.y = change2.y, childNodes.length > 0)) {
|
|
@@ -21894,7 +21906,7 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
|
|
|
21894
21906
|
y: childNode.position.y - yChange + nodeOrigin[1] * (height - prevHeight)
|
|
21895
21907
|
}, childChanges.push(childNode);
|
|
21896
21908
|
}
|
|
21897
|
-
if ((isWidthChange || isHeightChange) && (change2.width = isWidthChange && (!resizeDirection || resizeDirection === "horizontal") ? width : prevValues.width, change2.height = isHeightChange && (!resizeDirection || resizeDirection === "vertical") ? height : prevValues.height, prevValues.width = change2.width, prevValues.height = change2.height), parentNode && node2.expandParent) {
|
|
21909
|
+
if ((isWidthChange || isHeightChange) && (change2.width = isWidthChange && (!params.resizeDirection || params.resizeDirection === "horizontal") ? width : prevValues.width, change2.height = isHeightChange && (!params.resizeDirection || params.resizeDirection === "vertical") ? height : prevValues.height, prevValues.width = change2.width, prevValues.height = change2.height), parentNode && node2.expandParent) {
|
|
21898
21910
|
const xLimit = nodeOrigin[0] * (change2.width ?? 0);
|
|
21899
21911
|
change2.x && change2.x < xLimit && (prevValues.x = xLimit, startValues.x = startValues.x - (change2.x - xLimit));
|
|
21900
21912
|
const yLimit = nodeOrigin[1] * (change2.height ?? 0);
|
|
@@ -21905,8 +21917,8 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
|
|
|
21905
21917
|
prevWidth,
|
|
21906
21918
|
height: prevValues.height,
|
|
21907
21919
|
prevHeight,
|
|
21908
|
-
affectsX: controlDirection.affectsX,
|
|
21909
|
-
affectsY: controlDirection.affectsY
|
|
21920
|
+
affectsX: params.controlDirection.affectsX,
|
|
21921
|
+
affectsY: params.controlDirection.affectsY
|
|
21910
21922
|
}), nextValues = { ...prevValues, direction };
|
|
21911
21923
|
shouldResize?.(event, nextValues) !== !1 && (resizeDetected = !0, onResize?.(event, nextValues), onChange(change2, childChanges));
|
|
21912
21924
|
}).on("end", (event) => {
|
|
@@ -22693,11 +22705,15 @@ function Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.
|
|
|
22693
22705
|
return;
|
|
22694
22706
|
}
|
|
22695
22707
|
onPaneContextMenu?.(event);
|
|
22696
|
-
}, onWheel = onPaneScroll ? (event) => onPaneScroll(event) : void 0,
|
|
22708
|
+
}, onWheel = onPaneScroll ? (event) => onPaneScroll(event) : void 0, onClickCapture = (event) => {
|
|
22709
|
+
(selectionOnDrag && container.current === event.target || !selectionOnDrag || selectionKeyPressed) && event.stopPropagation();
|
|
22710
|
+
}, onPointerDownCapture = (event) => {
|
|
22697
22711
|
const { resetSelectedElements, domNode } = store.getState();
|
|
22698
|
-
|
|
22712
|
+
containerBounds.current = domNode?.getBoundingClientRect();
|
|
22713
|
+
const isNoKeyEvent = event.target !== container.current && !!event.target.closest(".nokey"), isSelectionActive = selectionOnDrag && container.current === event.target || !selectionOnDrag || selectionKeyPressed;
|
|
22714
|
+
if (!elementsSelectable || !isSelecting || event.button !== 0 || !containerBounds.current || isNoKeyEvent || !isSelectionActive || !event.isPrimary)
|
|
22699
22715
|
return;
|
|
22700
|
-
event.target?.setPointerCapture?.(event.pointerId), selectionStarted.current = !0, selectionInProgress.current = !1;
|
|
22716
|
+
event.stopPropagation(), event.preventDefault(), event.target?.setPointerCapture?.(event.pointerId), selectionStarted.current = !0, selectionInProgress.current = !1;
|
|
22701
22717
|
const { x: x2, y: y2 } = getEventPosition(event.nativeEvent, containerBounds.current);
|
|
22702
22718
|
resetSelectedElements(), store.setState({
|
|
22703
22719
|
userSelectionRect: {
|
|
@@ -22756,7 +22772,7 @@ function Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.
|
|
|
22756
22772
|
nodesSelectionActive: selectedNodeIds.current.size > 0
|
|
22757
22773
|
}), onSelectionEnd?.(event), (selectionKeyPressed || selectionOnDrag) && (selectionInProgress.current = !1), selectionStarted.current = !1;
|
|
22758
22774
|
}, draggable = panOnDrag === !0 || Array.isArray(panOnDrag) && panOnDrag.includes(0);
|
|
22759
|
-
return jsxs("div", { className: cc(["react-flow__pane", { draggable, dragging, selection: isSelecting }]), onClick: hasActiveSelection ? void 0 : wrapHandler(onClick, container), onContextMenu: wrapHandler(onContextMenu, container), onWheel: wrapHandler(onWheel, container), onPointerEnter: hasActiveSelection ? void 0 : onPaneMouseEnter,
|
|
22775
|
+
return jsxs("div", { className: cc(["react-flow__pane", { draggable, dragging, selection: isSelecting }]), onClick: hasActiveSelection ? void 0 : wrapHandler(onClick, container), onContextMenu: wrapHandler(onContextMenu, container), onWheel: wrapHandler(onWheel, container), onPointerEnter: hasActiveSelection ? void 0 : onPaneMouseEnter, onPointerMove: hasActiveSelection ? onPointerMove : onPaneMouseMove, onPointerUp: hasActiveSelection ? onPointerUp : void 0, onPointerDownCapture: hasActiveSelection ? onPointerDownCapture : void 0, onClickCapture: hasActiveSelection ? onClickCapture : void 0, onPointerLeave: onPaneMouseLeave, ref: container, style: containerStyle, children: [children2, jsx(UserSelection, {})] });
|
|
22760
22776
|
}
|
|
22761
22777
|
function handleNodeClick({ id: id2, store, unselect = !1, nodeRef }) {
|
|
22762
22778
|
const { addSelectedNodes, unselectNodesAndEdges, multiSelectionActive, nodeLookup, onError } = store.getState(), node2 = nodeLookup.get(id2);
|
|
@@ -23140,6 +23156,7 @@ function NodeWrapper({ id: id2, onClick, onMouseEnter, onMouseMove, onMouseLeave
|
|
|
23140
23156
|
...inlineDimensions
|
|
23141
23157
|
}, "data-id": id2, "data-testid": `rf__node-${id2}`, onMouseEnter: onMouseEnterHandler, onMouseMove: onMouseMoveHandler, onMouseLeave: onMouseLeaveHandler, onContextMenu: onContextMenuHandler, onClick: onSelectNodeHandler, onDoubleClick: onDoubleClickHandler, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, onFocus: isFocusable ? onFocus : void 0, role: node2.ariaRole ?? (isFocusable ? "group" : void 0), "aria-roledescription": "node", "aria-describedby": disableKeyboardA11y ? void 0 : `${ARIA_NODE_DESC_KEY}-${rfId}`, "aria-label": node2.ariaLabel, ...node2.domAttributes, children: jsx(Provider, { value: id2, children: jsx(NodeComponent, { id: id2, data: node2.data, type: nodeType, positionAbsoluteX: internals.positionAbsolute.x, positionAbsoluteY: internals.positionAbsolute.y, selected: node2.selected ?? !1, selectable: isSelectable, draggable: isDraggable, deletable: node2.deletable ?? !0, isConnectable, sourcePosition: node2.sourcePosition, targetPosition: node2.targetPosition, dragging, dragHandle: node2.dragHandle, zIndex: internals.z, parentId: node2.parentId, ...nodeDimensions }) }) });
|
|
23142
23158
|
}
|
|
23159
|
+
var NodeWrapper$1 = memo$1(NodeWrapper);
|
|
23143
23160
|
const selector$b = (s2) => ({
|
|
23144
23161
|
nodesDraggable: s2.nodesDraggable,
|
|
23145
23162
|
nodesConnectable: s2.nodesConnectable,
|
|
@@ -23175,7 +23192,7 @@ function NodeRendererComponent(props2) {
|
|
|
23175
23192
|
* memorized – so if `NodeRenderer` *has* to rerender, it only
|
|
23176
23193
|
* needs to regenerate the list of nodes, nothing else.
|
|
23177
23194
|
*/
|
|
23178
|
-
jsx(NodeWrapper, { id: nodeId, nodeTypes: props2.nodeTypes, nodeExtent: props2.nodeExtent, onClick: props2.onNodeClick, onMouseEnter: props2.onNodeMouseEnter, onMouseMove: props2.onNodeMouseMove, onMouseLeave: props2.onNodeMouseLeave, onContextMenu: props2.onNodeContextMenu, onDoubleClick: props2.onNodeDoubleClick, noDragClassName: props2.noDragClassName, noPanClassName: props2.noPanClassName, rfId: props2.rfId, disableKeyboardA11y: props2.disableKeyboardA11y, resizeObserver, nodesDraggable, nodesConnectable, nodesFocusable, elementsSelectable, nodeClickDistance: props2.nodeClickDistance, onError }, nodeId)
|
|
23195
|
+
jsx(NodeWrapper$1, { id: nodeId, nodeTypes: props2.nodeTypes, nodeExtent: props2.nodeExtent, onClick: props2.onNodeClick, onMouseEnter: props2.onNodeMouseEnter, onMouseMove: props2.onNodeMouseMove, onMouseLeave: props2.onNodeMouseLeave, onContextMenu: props2.onNodeContextMenu, onDoubleClick: props2.onNodeDoubleClick, noDragClassName: props2.noDragClassName, noPanClassName: props2.noPanClassName, rfId: props2.rfId, disableKeyboardA11y: props2.disableKeyboardA11y, resizeObserver, nodesDraggable, nodesConnectable, nodesFocusable, elementsSelectable, nodeClickDistance: props2.nodeClickDistance, onError }, nodeId)
|
|
23179
23196
|
)) });
|
|
23180
23197
|
}
|
|
23181
23198
|
NodeRendererComponent.displayName = "NodeRenderer";
|
|
@@ -23478,6 +23495,7 @@ function EdgeWrapper({ id: id2, edgesFocusable, edgesReconnectable, elementsSele
|
|
|
23478
23495
|
}
|
|
23479
23496
|
]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, role: edge.ariaRole ?? (isFocusable ? "group" : "img"), "aria-roledescription": "edge", "data-id": id2, "data-testid": `rf__edge-${id2}`, "aria-label": edge.ariaLabel === null ? void 0 : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : void 0, ref: edgeRef, ...edge.domAttributes, children: [!reconnecting && jsx(EdgeComponent, { id: id2, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.deletable ?? !0, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, data: edge.data, style: edge.style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: "pathOptions" in edge ? edge.pathOptions : void 0, interactionWidth: edge.interactionWidth }), isReconnectable && jsx(EdgeUpdateAnchors, { edge, isReconnectable, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, setUpdateHover, setReconnecting })] }) });
|
|
23480
23497
|
}
|
|
23498
|
+
var EdgeWrapper$1 = memo$1(EdgeWrapper);
|
|
23481
23499
|
const selector$a = (s2) => ({
|
|
23482
23500
|
edgesFocusable: s2.edgesFocusable,
|
|
23483
23501
|
edgesReconnectable: s2.edgesReconnectable,
|
|
@@ -23487,7 +23505,7 @@ const selector$a = (s2) => ({
|
|
|
23487
23505
|
});
|
|
23488
23506
|
function EdgeRendererComponent({ defaultMarkerColor, onlyRenderVisibleElements, rfId, edgeTypes, noPanClassName, onReconnect, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeClick, reconnectRadius, onEdgeDoubleClick, onReconnectStart, onReconnectEnd, disableKeyboardA11y }) {
|
|
23489
23507
|
const { edgesFocusable, edgesReconnectable, elementsSelectable, onError } = useStore$1(selector$a, shallow$1), edgeIds = useVisibleEdgeIds(onlyRenderVisibleElements);
|
|
23490
|
-
return jsxs("div", { className: "react-flow__edges", children: [jsx(MarkerDefinitions$1, { defaultColor: defaultMarkerColor, rfId }), edgeIds.map((id2) => jsx(EdgeWrapper, { id: id2, edgesFocusable, edgesReconnectable, elementsSelectable, noPanClassName, onReconnect, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onClick: onEdgeClick, reconnectRadius, onDoubleClick: onEdgeDoubleClick, onReconnectStart, onReconnectEnd, rfId, onError, edgeTypes, disableKeyboardA11y }, id2))] });
|
|
23508
|
+
return jsxs("div", { className: "react-flow__edges", children: [jsx(MarkerDefinitions$1, { defaultColor: defaultMarkerColor, rfId }), edgeIds.map((id2) => jsx(EdgeWrapper$1, { id: id2, edgesFocusable, edgesReconnectable, elementsSelectable, noPanClassName, onReconnect, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onClick: onEdgeClick, reconnectRadius, onDoubleClick: onEdgeDoubleClick, onReconnectStart, onReconnectEnd, rfId, onError, edgeTypes, disableKeyboardA11y }, id2))] });
|
|
23491
23509
|
}
|
|
23492
23510
|
EdgeRendererComponent.displayName = "EdgeRenderer";
|
|
23493
23511
|
const EdgeRenderer = memo$1(EdgeRendererComponent), selector$9 = (s2) => `translate(${s2.transform[0]}px,${s2.transform[1]}px) scale(${s2.transform[2]})`;
|
|
@@ -24277,6 +24295,9 @@ function createIsCircular(areItemsEqual) {
|
|
|
24277
24295
|
return cache2.delete(a2), cache2.delete(b), result;
|
|
24278
24296
|
};
|
|
24279
24297
|
}
|
|
24298
|
+
function getShortTag(value) {
|
|
24299
|
+
return value?.[Symbol.toStringTag];
|
|
24300
|
+
}
|
|
24280
24301
|
function getStrictProperties(object2) {
|
|
24281
24302
|
return getOwnPropertyNames(object2).concat(getOwnPropertySymbols(object2));
|
|
24282
24303
|
}
|
|
@@ -24391,7 +24412,7 @@ function isPropertyEqual(a2, b, state, property) {
|
|
|
24391
24412
|
}
|
|
24392
24413
|
var ARGUMENTS_TAG = "[object Arguments]", BOOLEAN_TAG = "[object Boolean]", DATE_TAG = "[object Date]", ERROR_TAG = "[object Error]", MAP_TAG = "[object Map]", NUMBER_TAG = "[object Number]", OBJECT_TAG = "[object Object]", REG_EXP_TAG = "[object RegExp]", SET_TAG = "[object Set]", STRING_TAG = "[object String]", URL_TAG = "[object URL]", isArray = Array.isArray, isTypedArray = typeof ArrayBuffer == "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null, assign = Object.assign, getTag = Object.prototype.toString.call.bind(Object.prototype.toString);
|
|
24393
24414
|
function createEqualityComparator(_a2) {
|
|
24394
|
-
var areArraysEqual2 = _a2.areArraysEqual, areDatesEqual2 = _a2.areDatesEqual, areErrorsEqual2 = _a2.areErrorsEqual, areFunctionsEqual2 = _a2.areFunctionsEqual, areMapsEqual2 = _a2.areMapsEqual, areNumbersEqual2 = _a2.areNumbersEqual, areObjectsEqual2 = _a2.areObjectsEqual, arePrimitiveWrappersEqual2 = _a2.arePrimitiveWrappersEqual, areRegExpsEqual2 = _a2.areRegExpsEqual, areSetsEqual2 = _a2.areSetsEqual, areTypedArraysEqual2 = _a2.areTypedArraysEqual, areUrlsEqual2 = _a2.areUrlsEqual;
|
|
24415
|
+
var areArraysEqual2 = _a2.areArraysEqual, areDatesEqual2 = _a2.areDatesEqual, areErrorsEqual2 = _a2.areErrorsEqual, areFunctionsEqual2 = _a2.areFunctionsEqual, areMapsEqual2 = _a2.areMapsEqual, areNumbersEqual2 = _a2.areNumbersEqual, areObjectsEqual2 = _a2.areObjectsEqual, arePrimitiveWrappersEqual2 = _a2.arePrimitiveWrappersEqual, areRegExpsEqual2 = _a2.areRegExpsEqual, areSetsEqual2 = _a2.areSetsEqual, areTypedArraysEqual2 = _a2.areTypedArraysEqual, areUrlsEqual2 = _a2.areUrlsEqual, unknownTagComparators = _a2.unknownTagComparators;
|
|
24395
24416
|
return function(a2, b, state) {
|
|
24396
24417
|
if (a2 === b)
|
|
24397
24418
|
return !0;
|
|
@@ -24420,7 +24441,34 @@ function createEqualityComparator(_a2) {
|
|
|
24420
24441
|
if (constructor === Set)
|
|
24421
24442
|
return areSetsEqual2(a2, b, state);
|
|
24422
24443
|
var tag = getTag(a2);
|
|
24423
|
-
|
|
24444
|
+
if (tag === DATE_TAG)
|
|
24445
|
+
return areDatesEqual2(a2, b, state);
|
|
24446
|
+
if (tag === REG_EXP_TAG)
|
|
24447
|
+
return areRegExpsEqual2(a2, b, state);
|
|
24448
|
+
if (tag === MAP_TAG)
|
|
24449
|
+
return areMapsEqual2(a2, b, state);
|
|
24450
|
+
if (tag === SET_TAG)
|
|
24451
|
+
return areSetsEqual2(a2, b, state);
|
|
24452
|
+
if (tag === OBJECT_TAG)
|
|
24453
|
+
return typeof a2.then != "function" && typeof b.then != "function" && areObjectsEqual2(a2, b, state);
|
|
24454
|
+
if (tag === URL_TAG)
|
|
24455
|
+
return areUrlsEqual2(a2, b, state);
|
|
24456
|
+
if (tag === ERROR_TAG)
|
|
24457
|
+
return areErrorsEqual2(a2, b, state);
|
|
24458
|
+
if (tag === ARGUMENTS_TAG)
|
|
24459
|
+
return areObjectsEqual2(a2, b, state);
|
|
24460
|
+
if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG)
|
|
24461
|
+
return arePrimitiveWrappersEqual2(a2, b, state);
|
|
24462
|
+
if (unknownTagComparators) {
|
|
24463
|
+
var unknownTagComparator = unknownTagComparators[tag];
|
|
24464
|
+
if (!unknownTagComparator) {
|
|
24465
|
+
var shortTag = getShortTag(a2);
|
|
24466
|
+
shortTag && (unknownTagComparator = unknownTagComparators[shortTag]);
|
|
24467
|
+
}
|
|
24468
|
+
if (unknownTagComparator)
|
|
24469
|
+
return unknownTagComparator(a2, b, state);
|
|
24470
|
+
}
|
|
24471
|
+
return !1;
|
|
24424
24472
|
};
|
|
24425
24473
|
}
|
|
24426
24474
|
function createEqualityComparatorConfig(_a2) {
|
|
@@ -24436,7 +24484,8 @@ function createEqualityComparatorConfig(_a2) {
|
|
|
24436
24484
|
areRegExpsEqual,
|
|
24437
24485
|
areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual,
|
|
24438
24486
|
areTypedArraysEqual: strict ? areObjectsEqualStrict : areTypedArraysEqual,
|
|
24439
|
-
areUrlsEqual
|
|
24487
|
+
areUrlsEqual,
|
|
24488
|
+
unknownTagComparators: void 0
|
|
24440
24489
|
};
|
|
24441
24490
|
if (createCustomConfig && (config2 = assign({}, config2, createCustomConfig(config2))), circular) {
|
|
24442
24491
|
var areArraysEqual$1 = createIsCircular(config2.areArraysEqual), areMapsEqual$1 = createIsCircular(config2.areMapsEqual), areObjectsEqual$1 = createIsCircular(config2.areObjectsEqual), areSetsEqual$12 = createIsCircular(config2.areSetsEqual);
|
|
@@ -49784,7 +49833,7 @@ function createAnimationState(visualElement) {
|
|
|
49784
49833
|
setAnimateFunction,
|
|
49785
49834
|
getState: () => state,
|
|
49786
49835
|
reset: () => {
|
|
49787
|
-
state = createState()
|
|
49836
|
+
state = createState();
|
|
49788
49837
|
}
|
|
49789
49838
|
};
|
|
49790
49839
|
}
|
|
@@ -51735,7 +51784,7 @@ function hasArrayChanged() {
|
|
|
51735
51784
|
let a2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
51736
51785
|
return a2.length !== b.length || a2.some((item, index2) => !Object.is(item, b[index2]));
|
|
51737
51786
|
}
|
|
51738
|
-
var xstateReact_cjs = {}, xstate_cjs = {}, xstateActors_cjs = {},
|
|
51787
|
+
var xstateReact_cjs = {}, xstate_cjs = {}, xstateActors_cjs = {}, raiseDa5b247f_cjs = {}, xstateDev_cjs = {}, hasRequiredXstateDev_cjs;
|
|
51739
51788
|
function requireXstateDev_cjs() {
|
|
51740
51789
|
if (hasRequiredXstateDev_cjs) return xstateDev_cjs;
|
|
51741
51790
|
hasRequiredXstateDev_cjs = 1, Object.defineProperty(xstateDev_cjs, "__esModule", { value: !0 });
|
|
@@ -51768,10 +51817,10 @@ function requireXstateDev_cjs() {
|
|
|
51768
51817
|
};
|
|
51769
51818
|
return xstateDev_cjs.devToolsAdapter = devToolsAdapter, xstateDev_cjs.getGlobal = getGlobal, xstateDev_cjs.registerService = registerService, xstateDev_cjs;
|
|
51770
51819
|
}
|
|
51771
|
-
var
|
|
51772
|
-
function
|
|
51773
|
-
if (
|
|
51774
|
-
|
|
51820
|
+
var hasRequiredRaiseDa5b247f_cjs;
|
|
51821
|
+
function requireRaiseDa5b247f_cjs() {
|
|
51822
|
+
if (hasRequiredRaiseDa5b247f_cjs) return raiseDa5b247f_cjs;
|
|
51823
|
+
hasRequiredRaiseDa5b247f_cjs = 1;
|
|
51775
51824
|
var dev_dist_xstateDev = requireXstateDev_cjs();
|
|
51776
51825
|
class Mailbox {
|
|
51777
51826
|
constructor(_process) {
|
|
@@ -51997,6 +52046,7 @@ function requireRaiseB4a670a0_cjs() {
|
|
|
51997
52046
|
systemId !== void 0 && (keyedActors.delete(systemId), reverseKeyedActors.delete(actorRef));
|
|
51998
52047
|
},
|
|
51999
52048
|
get: (systemId) => keyedActors.get(systemId),
|
|
52049
|
+
getAll: () => Object.fromEntries(keyedActors.entries()),
|
|
52000
52050
|
_set: (systemId, actorRef) => {
|
|
52001
52051
|
const existing = keyedActors.get(systemId);
|
|
52002
52052
|
if (existing && existing !== actorRef)
|
|
@@ -52067,7 +52117,7 @@ function requireRaiseB4a670a0_cjs() {
|
|
|
52067
52117
|
* @param options Actor options
|
|
52068
52118
|
*/
|
|
52069
52119
|
constructor(logic, options) {
|
|
52070
|
-
this.logic = logic, this._snapshot = void 0, this.clock = void 0, this.options = void 0, this.id = void 0, this.mailbox = new Mailbox(this._process.bind(this)), this.observers = /* @__PURE__ */ new Set(), this.eventListeners = /* @__PURE__ */ new Map(), this.logger = void 0, this._processingStatus = ProcessingStatus.NotStarted, this._parent = void 0, this._syncSnapshot = void 0, this.ref = void 0, this._actorScope = void 0, this.
|
|
52120
|
+
this.logic = logic, this._snapshot = void 0, this.clock = void 0, this.options = void 0, this.id = void 0, this.mailbox = new Mailbox(this._process.bind(this)), this.observers = /* @__PURE__ */ new Set(), this.eventListeners = /* @__PURE__ */ new Map(), this.logger = void 0, this._processingStatus = ProcessingStatus.NotStarted, this._parent = void 0, this._syncSnapshot = void 0, this.ref = void 0, this._actorScope = void 0, this.systemId = void 0, this.sessionId = void 0, this.system = void 0, this._doneEvent = void 0, this.src = void 0, this._deferred = [];
|
|
52071
52121
|
const resolvedOptions = {
|
|
52072
52122
|
...defaultOptions2,
|
|
52073
52123
|
...options
|
|
@@ -52132,7 +52182,7 @@ function requireRaiseB4a670a0_cjs() {
|
|
|
52132
52182
|
}, this.send = this.send.bind(this), this.system._sendInspectionEvent({
|
|
52133
52183
|
type: "@xstate.actor",
|
|
52134
52184
|
actorRef: this
|
|
52135
|
-
}), systemId && (this.
|
|
52185
|
+
}), systemId && (this.systemId = systemId, this.system._set(systemId, this)), this._initState(options?.snapshot ?? options?.state), systemId && this._snapshot.status !== "active" && this.system._unregister(this);
|
|
52136
52186
|
}
|
|
52137
52187
|
_initState(persistedState) {
|
|
52138
52188
|
try {
|
|
@@ -52301,7 +52351,7 @@ function requireRaiseB4a670a0_cjs() {
|
|
|
52301
52351
|
},
|
|
52302
52352
|
error: () => {
|
|
52303
52353
|
}
|
|
52304
|
-
}), this.system._register(this.sessionId, this), this.
|
|
52354
|
+
}), this.system._register(this.sessionId, this), this.systemId && this.system._set(this.systemId, this), this._processingStatus = ProcessingStatus.Running;
|
|
52305
52355
|
const initEvent = createInitEvent(this.options.input);
|
|
52306
52356
|
switch (this.system._sendInspectionEvent({
|
|
52307
52357
|
type: "@xstate.event",
|
|
@@ -53371,7 +53421,7 @@ ${err.message}`);
|
|
|
53371
53421
|
childrenJson[id2] = {
|
|
53372
53422
|
snapshot: child.getPersistedSnapshot(options),
|
|
53373
53423
|
src: child.src,
|
|
53374
|
-
systemId: child.
|
|
53424
|
+
systemId: child.systemId,
|
|
53375
53425
|
syncSnapshot: child._syncSnapshot
|
|
53376
53426
|
};
|
|
53377
53427
|
}
|
|
@@ -53448,13 +53498,13 @@ ${err.message}`);
|
|
|
53448
53498
|
}
|
|
53449
53499
|
return raise3.type = "xstate.raise", raise3.event = eventOrExpr, raise3.id = options?.id, raise3.delay = options?.delay, raise3.resolve = resolveRaise, raise3.execute = executeRaise, raise3;
|
|
53450
53500
|
}
|
|
53451
|
-
return
|
|
53501
|
+
return raiseDa5b247f_cjs.$$ACTOR_TYPE = $$ACTOR_TYPE, raiseDa5b247f_cjs.Actor = Actor, raiseDa5b247f_cjs.NULL_EVENT = NULL_EVENT, raiseDa5b247f_cjs.ProcessingStatus = ProcessingStatus, raiseDa5b247f_cjs.STATE_DELIMITER = STATE_DELIMITER, raiseDa5b247f_cjs.XSTATE_ERROR = XSTATE_ERROR, raiseDa5b247f_cjs.XSTATE_STOP = XSTATE_STOP, raiseDa5b247f_cjs.and = and, raiseDa5b247f_cjs.cancel = cancel, raiseDa5b247f_cjs.cloneMachineSnapshot = cloneMachineSnapshot, raiseDa5b247f_cjs.createActor = createActor, raiseDa5b247f_cjs.createErrorActorEvent = createErrorActorEvent, raiseDa5b247f_cjs.createInitEvent = createInitEvent, raiseDa5b247f_cjs.createInvokeId = createInvokeId, raiseDa5b247f_cjs.createMachineSnapshot = createMachineSnapshot, raiseDa5b247f_cjs.evaluateGuard = evaluateGuard, raiseDa5b247f_cjs.formatInitialTransition = formatInitialTransition, raiseDa5b247f_cjs.formatTransition = formatTransition, raiseDa5b247f_cjs.formatTransitions = formatTransitions, raiseDa5b247f_cjs.getAllOwnEventDescriptors = getAllOwnEventDescriptors, raiseDa5b247f_cjs.getAllStateNodes = getAllStateNodes, raiseDa5b247f_cjs.getCandidates = getCandidates, raiseDa5b247f_cjs.getDelayedTransitions = getDelayedTransitions, raiseDa5b247f_cjs.getInitialStateNodes = getInitialStateNodes, raiseDa5b247f_cjs.getPersistedSnapshot = getPersistedSnapshot, raiseDa5b247f_cjs.getStateNodeByPath = getStateNodeByPath, raiseDa5b247f_cjs.getStateNodes = getStateNodes, raiseDa5b247f_cjs.interpret = interpret, raiseDa5b247f_cjs.isInFinalState = isInFinalState, raiseDa5b247f_cjs.isMachineSnapshot = isMachineSnapshot, raiseDa5b247f_cjs.isStateId = isStateId, raiseDa5b247f_cjs.macrostep = macrostep, raiseDa5b247f_cjs.mapValues = mapValues, raiseDa5b247f_cjs.matchesState = matchesState, raiseDa5b247f_cjs.microstep = microstep, raiseDa5b247f_cjs.not = not, raiseDa5b247f_cjs.or = or, raiseDa5b247f_cjs.pathToStateValue = pathToStateValue, raiseDa5b247f_cjs.raise = raise2, raiseDa5b247f_cjs.resolveActionsAndContext = resolveActionsAndContext, raiseDa5b247f_cjs.resolveReferencedActor = resolveReferencedActor, raiseDa5b247f_cjs.resolveStateValue = resolveStateValue, raiseDa5b247f_cjs.spawnChild = spawnChild, raiseDa5b247f_cjs.stateIn = stateIn, raiseDa5b247f_cjs.stop = stop, raiseDa5b247f_cjs.stopChild = stopChild, raiseDa5b247f_cjs.toArray = toArray2, raiseDa5b247f_cjs.toObserver = toObserver, raiseDa5b247f_cjs.toStatePath = toStatePath, raiseDa5b247f_cjs.toTransitionConfigArray = toTransitionConfigArray, raiseDa5b247f_cjs.transitionNode = transitionNode, raiseDa5b247f_cjs;
|
|
53452
53502
|
}
|
|
53453
53503
|
var hasRequiredXstateActors_cjs;
|
|
53454
53504
|
function requireXstateActors_cjs() {
|
|
53455
53505
|
if (hasRequiredXstateActors_cjs) return xstateActors_cjs;
|
|
53456
53506
|
hasRequiredXstateActors_cjs = 1, Object.defineProperty(xstateActors_cjs, "__esModule", { value: !0 });
|
|
53457
|
-
var guards_dist_xstateGuards = /* @__PURE__ */
|
|
53507
|
+
var guards_dist_xstateGuards = /* @__PURE__ */ requireRaiseDa5b247f_cjs();
|
|
53458
53508
|
requireXstateDev_cjs();
|
|
53459
53509
|
function fromTransition(transition, initialContext) {
|
|
53460
53510
|
return {
|
|
@@ -53761,11 +53811,11 @@ function requireXstateActors_cjs() {
|
|
|
53761
53811
|
}
|
|
53762
53812
|
return xstateActors_cjs.createEmptyActor = createEmptyActor, xstateActors_cjs.fromCallback = fromCallback, xstateActors_cjs.fromEventObservable = fromEventObservable, xstateActors_cjs.fromObservable = fromObservable, xstateActors_cjs.fromPromise = fromPromise, xstateActors_cjs.fromTransition = fromTransition, xstateActors_cjs;
|
|
53763
53813
|
}
|
|
53764
|
-
var
|
|
53765
|
-
function
|
|
53766
|
-
if (
|
|
53767
|
-
|
|
53768
|
-
var guards_dist_xstateGuards = /* @__PURE__ */
|
|
53814
|
+
var StateMachine30081029_cjs = {}, assignDea9f7c8_cjs = {}, hasRequiredAssignDea9f7c8_cjs;
|
|
53815
|
+
function requireAssignDea9f7c8_cjs() {
|
|
53816
|
+
if (hasRequiredAssignDea9f7c8_cjs) return assignDea9f7c8_cjs;
|
|
53817
|
+
hasRequiredAssignDea9f7c8_cjs = 1;
|
|
53818
|
+
var guards_dist_xstateGuards = /* @__PURE__ */ requireRaiseDa5b247f_cjs();
|
|
53769
53819
|
function createSpawner(actorScope, {
|
|
53770
53820
|
machine,
|
|
53771
53821
|
context
|
|
@@ -53839,13 +53889,13 @@ function requireAssign381d0341_cjs() {
|
|
|
53839
53889
|
}
|
|
53840
53890
|
return assign3.type = "xstate.assign", assign3.assignment = assignment, assign3.resolve = resolveAssign, assign3;
|
|
53841
53891
|
}
|
|
53842
|
-
return
|
|
53892
|
+
return assignDea9f7c8_cjs.assign = assign2, assignDea9f7c8_cjs;
|
|
53843
53893
|
}
|
|
53844
|
-
var
|
|
53845
|
-
function
|
|
53846
|
-
if (
|
|
53847
|
-
|
|
53848
|
-
var guards_dist_xstateGuards = /* @__PURE__ */
|
|
53894
|
+
var hasRequiredStateMachine30081029_cjs;
|
|
53895
|
+
function requireStateMachine30081029_cjs() {
|
|
53896
|
+
if (hasRequiredStateMachine30081029_cjs) return StateMachine30081029_cjs;
|
|
53897
|
+
hasRequiredStateMachine30081029_cjs = 1;
|
|
53898
|
+
var guards_dist_xstateGuards = /* @__PURE__ */ requireRaiseDa5b247f_cjs(), assign2 = /* @__PURE__ */ requireAssignDea9f7c8_cjs();
|
|
53849
53899
|
const cache2 = /* @__PURE__ */ new WeakMap();
|
|
53850
53900
|
function memo2(object2, key2, fn) {
|
|
53851
53901
|
let memoizedData = cache2.get(object2);
|
|
@@ -54212,13 +54262,13 @@ ${err.message}`);
|
|
|
54212
54262
|
return reviveContext(restoredSnapshot.context, children2), restoredSnapshot;
|
|
54213
54263
|
}
|
|
54214
54264
|
}
|
|
54215
|
-
return
|
|
54265
|
+
return StateMachine30081029_cjs.StateMachine = StateMachine, StateMachine30081029_cjs.StateNode = StateNode, StateMachine30081029_cjs;
|
|
54216
54266
|
}
|
|
54217
|
-
var
|
|
54218
|
-
function
|
|
54219
|
-
if (
|
|
54220
|
-
|
|
54221
|
-
var guards_dist_xstateGuards = /* @__PURE__ */
|
|
54267
|
+
var logEc8d4df4_cjs = {}, hasRequiredLogEc8d4df4_cjs;
|
|
54268
|
+
function requireLogEc8d4df4_cjs() {
|
|
54269
|
+
if (hasRequiredLogEc8d4df4_cjs) return logEc8d4df4_cjs;
|
|
54270
|
+
hasRequiredLogEc8d4df4_cjs = 1;
|
|
54271
|
+
var guards_dist_xstateGuards = /* @__PURE__ */ requireRaiseDa5b247f_cjs(), assign2 = /* @__PURE__ */ requireAssignDea9f7c8_cjs();
|
|
54222
54272
|
function resolveEmit(_, snapshot, args, actionParams, {
|
|
54223
54273
|
event: eventOrExpr
|
|
54224
54274
|
}) {
|
|
@@ -54375,13 +54425,13 @@ function requireLog63c8f21f_cjs() {
|
|
|
54375
54425
|
}
|
|
54376
54426
|
return log3.type = "xstate.log", log3.value = value, log3.label = label, log3.resolve = resolveLog, log3.execute = executeLog, log3;
|
|
54377
54427
|
}
|
|
54378
|
-
return
|
|
54428
|
+
return logEc8d4df4_cjs.SpecialTargets = SpecialTargets, logEc8d4df4_cjs.emit = emit2, logEc8d4df4_cjs.enqueueActions = enqueueActions, logEc8d4df4_cjs.forwardTo = forwardTo, logEc8d4df4_cjs.log = log2, logEc8d4df4_cjs.sendParent = sendParent, logEc8d4df4_cjs.sendTo = sendTo, logEc8d4df4_cjs;
|
|
54379
54429
|
}
|
|
54380
54430
|
var hasRequiredXstate_cjs;
|
|
54381
54431
|
function requireXstate_cjs() {
|
|
54382
54432
|
if (hasRequiredXstate_cjs) return xstate_cjs;
|
|
54383
54433
|
hasRequiredXstate_cjs = 1, Object.defineProperty(xstate_cjs, "__esModule", { value: !0 });
|
|
54384
|
-
var actors_dist_xstateActors = requireXstateActors_cjs(), guards_dist_xstateGuards = /* @__PURE__ */
|
|
54434
|
+
var actors_dist_xstateActors = requireXstateActors_cjs(), guards_dist_xstateGuards = /* @__PURE__ */ requireRaiseDa5b247f_cjs(), StateMachine = /* @__PURE__ */ requireStateMachine30081029_cjs(), assign2 = /* @__PURE__ */ requireAssignDea9f7c8_cjs(), log2 = /* @__PURE__ */ requireLogEc8d4df4_cjs();
|
|
54385
54435
|
requireXstateDev_cjs();
|
|
54386
54436
|
function assertEvent(event, type2) {
|
|
54387
54437
|
const types2 = guards_dist_xstateGuards.toArray(type2);
|
|
@@ -54428,6 +54478,17 @@ function requireXstate_cjs() {
|
|
|
54428
54478
|
delays
|
|
54429
54479
|
}) {
|
|
54430
54480
|
return {
|
|
54481
|
+
assign: assign2.assign,
|
|
54482
|
+
sendTo: log2.sendTo,
|
|
54483
|
+
raise: guards_dist_xstateGuards.raise,
|
|
54484
|
+
log: log2.log,
|
|
54485
|
+
cancel: guards_dist_xstateGuards.cancel,
|
|
54486
|
+
stopChild: guards_dist_xstateGuards.stopChild,
|
|
54487
|
+
enqueueActions: log2.enqueueActions,
|
|
54488
|
+
emit: log2.emit,
|
|
54489
|
+
spawnChild: guards_dist_xstateGuards.spawnChild,
|
|
54490
|
+
createStateConfig: (config2) => config2,
|
|
54491
|
+
createAction: (fn) => fn,
|
|
54431
54492
|
createMachine: (config2) => createMachine({
|
|
54432
54493
|
...config2,
|
|
54433
54494
|
schemas
|
|
@@ -54551,7 +54612,7 @@ function requireXstate_cjs() {
|
|
|
54551
54612
|
}), done && sub.unsubscribe());
|
|
54552
54613
|
});
|
|
54553
54614
|
}
|
|
54554
|
-
return xstate_cjs.createEmptyActor = actors_dist_xstateActors.createEmptyActor, xstate_cjs.fromCallback = actors_dist_xstateActors.fromCallback, xstate_cjs.fromEventObservable = actors_dist_xstateActors.fromEventObservable, xstate_cjs.fromObservable = actors_dist_xstateActors.fromObservable, xstate_cjs.fromPromise = actors_dist_xstateActors.fromPromise, xstate_cjs.fromTransition = actors_dist_xstateActors.fromTransition, xstate_cjs.Actor = guards_dist_xstateGuards.Actor, xstate_cjs.__unsafe_getAllOwnEventDescriptors = guards_dist_xstateGuards.getAllOwnEventDescriptors, xstate_cjs.and = guards_dist_xstateGuards.and, xstate_cjs.cancel = guards_dist_xstateGuards.cancel, xstate_cjs.createActor = guards_dist_xstateGuards.createActor, xstate_cjs.getStateNodes = guards_dist_xstateGuards.getStateNodes, xstate_cjs.interpret = guards_dist_xstateGuards.interpret, xstate_cjs.isMachineSnapshot = guards_dist_xstateGuards.isMachineSnapshot, xstate_cjs.matchesState = guards_dist_xstateGuards.matchesState, xstate_cjs.not = guards_dist_xstateGuards.not, xstate_cjs.or = guards_dist_xstateGuards.or, xstate_cjs.pathToStateValue = guards_dist_xstateGuards.pathToStateValue, xstate_cjs.raise = guards_dist_xstateGuards.raise, xstate_cjs.spawnChild = guards_dist_xstateGuards.spawnChild, xstate_cjs.stateIn = guards_dist_xstateGuards.stateIn, xstate_cjs.stop = guards_dist_xstateGuards.stop, xstate_cjs.stopChild = guards_dist_xstateGuards.stopChild, xstate_cjs.toObserver = guards_dist_xstateGuards.toObserver, xstate_cjs.StateMachine = StateMachine.StateMachine, xstate_cjs.StateNode = StateMachine.StateNode, xstate_cjs.SpecialTargets = log2.SpecialTargets, xstate_cjs.emit = log2.emit, xstate_cjs.enqueueActions = log2.enqueueActions, xstate_cjs.forwardTo = log2.forwardTo, xstate_cjs.log = log2.log, xstate_cjs.sendParent = log2.sendParent, xstate_cjs.sendTo = log2.sendTo, xstate_cjs.
|
|
54615
|
+
return xstate_cjs.createEmptyActor = actors_dist_xstateActors.createEmptyActor, xstate_cjs.fromCallback = actors_dist_xstateActors.fromCallback, xstate_cjs.fromEventObservable = actors_dist_xstateActors.fromEventObservable, xstate_cjs.fromObservable = actors_dist_xstateActors.fromObservable, xstate_cjs.fromPromise = actors_dist_xstateActors.fromPromise, xstate_cjs.fromTransition = actors_dist_xstateActors.fromTransition, xstate_cjs.Actor = guards_dist_xstateGuards.Actor, xstate_cjs.__unsafe_getAllOwnEventDescriptors = guards_dist_xstateGuards.getAllOwnEventDescriptors, xstate_cjs.and = guards_dist_xstateGuards.and, xstate_cjs.cancel = guards_dist_xstateGuards.cancel, xstate_cjs.createActor = guards_dist_xstateGuards.createActor, xstate_cjs.getStateNodes = guards_dist_xstateGuards.getStateNodes, xstate_cjs.interpret = guards_dist_xstateGuards.interpret, xstate_cjs.isMachineSnapshot = guards_dist_xstateGuards.isMachineSnapshot, xstate_cjs.matchesState = guards_dist_xstateGuards.matchesState, xstate_cjs.not = guards_dist_xstateGuards.not, xstate_cjs.or = guards_dist_xstateGuards.or, xstate_cjs.pathToStateValue = guards_dist_xstateGuards.pathToStateValue, xstate_cjs.raise = guards_dist_xstateGuards.raise, xstate_cjs.spawnChild = guards_dist_xstateGuards.spawnChild, xstate_cjs.stateIn = guards_dist_xstateGuards.stateIn, xstate_cjs.stop = guards_dist_xstateGuards.stop, xstate_cjs.stopChild = guards_dist_xstateGuards.stopChild, xstate_cjs.toObserver = guards_dist_xstateGuards.toObserver, xstate_cjs.StateMachine = StateMachine.StateMachine, xstate_cjs.StateNode = StateMachine.StateNode, xstate_cjs.assign = assign2.assign, xstate_cjs.SpecialTargets = log2.SpecialTargets, xstate_cjs.emit = log2.emit, xstate_cjs.enqueueActions = log2.enqueueActions, xstate_cjs.forwardTo = log2.forwardTo, xstate_cjs.log = log2.log, xstate_cjs.sendParent = log2.sendParent, xstate_cjs.sendTo = log2.sendTo, xstate_cjs.SimulatedClock = SimulatedClock, xstate_cjs.assertEvent = assertEvent, xstate_cjs.createMachine = createMachine, xstate_cjs.getInitialSnapshot = getInitialSnapshot, xstate_cjs.getNextSnapshot = getNextSnapshot, xstate_cjs.initialTransition = initialTransition, xstate_cjs.setup = setup, xstate_cjs.toPromise = toPromise, xstate_cjs.transition = transition, xstate_cjs.waitFor = waitFor, xstate_cjs;
|
|
54555
54616
|
}
|
|
54556
54617
|
var hasRequiredXstateReact_cjs;
|
|
54557
54618
|
function requireXstateReact_cjs() {
|