@pixerate/editor 0.140.4 → 0.141.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/canvasPlayback.d.cts +15 -0
- package/dist/agent/canvasPlayback.d.ts +15 -0
- package/dist/agent/index.cjs +144 -23
- package/dist/agent/index.d.cts +1 -0
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.js +125 -4
- package/dist/agent/providers.d.cts +8 -0
- package/dist/agent/providers.d.ts +8 -0
- package/dist/agent/types.d.cts +3 -0
- package/dist/agent/types.d.ts +3 -0
- package/dist/animation/index.cjs +2 -2
- package/dist/animation/index.js +1 -1
- package/dist/animation/presence.d.cts +1 -75
- package/dist/animation/presence.d.ts +1 -75
- package/dist/bridge/cli.cjs +3 -3
- package/dist/bridge/cli.js +2 -2
- package/dist/bridge/index.cjs +3 -3
- package/dist/bridge/index.js +2 -2
- package/dist/canvas/index.cjs +336 -646
- package/dist/canvas/index.d.cts +1 -0
- package/dist/canvas/index.d.ts +1 -0
- package/dist/canvas/index.js +44 -354
- package/dist/canvas/playback.d.cts +14 -0
- package/dist/canvas/playback.d.ts +14 -0
- package/dist/chart/index.cjs +7 -7
- package/dist/chart/index.js +1 -1
- package/dist/chunk-6SFREX6H.cjs +406 -0
- package/dist/chunk-DW4CV5H4.js +591 -0
- package/dist/{chunk-UMS6YFA6.js → chunk-EAQ4BGNS.js} +1 -1
- package/dist/{chunk-AGCD3EHB.cjs → chunk-ENIZYNEF.cjs} +7 -7
- package/dist/chunk-MFFE55CS.js +406 -0
- package/dist/{chunk-BSGPXPTW.js → chunk-PEEP2YR7.js} +1 -1
- package/dist/{chunk-RB62U6MS.js → chunk-RFBFTLVN.js} +27 -5
- package/dist/chunk-UBRYHNRU.cjs +591 -0
- package/dist/{chunk-GEY73RUW.cjs → chunk-UJGAA6AK.cjs} +1 -1
- package/dist/{chunk-HDK3T2QS.cjs → chunk-Y4BWZB6J.cjs} +29 -7
- package/dist/commands/index.cjs +37 -1
- package/dist/commands/index.js +36 -0
- package/dist/commands/registry.d.cts +11 -0
- package/dist/commands/registry.d.ts +11 -0
- package/dist/diagram/index.cjs +7 -7
- package/dist/diagram/index.js +1 -1
- package/dist/image-editor/index.cjs +108 -16
- package/dist/image-editor/index.d.cts +1 -0
- package/dist/image-editor/index.d.ts +1 -0
- package/dist/image-editor/index.js +107 -15
- package/dist/image-editor/playback.d.cts +22 -0
- package/dist/image-editor/playback.d.ts +22 -0
- package/dist/paint-editor/index.cjs +6 -6
- package/dist/paint-editor/index.js +1 -1
- package/dist/tools/index.cjs +33 -3
- package/dist/tools/index.d.cts +2 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +32 -2
- package/dist/tools/playback.d.cts +205 -0
- package/dist/tools/playback.d.ts +205 -0
- package/dist/tools/presence.d.cts +82 -0
- package/dist/tools/presence.d.ts +82 -0
- package/dist/tools/registry.d.cts +45 -6
- package/dist/tools/registry.d.ts +45 -6
- package/dist/tools/view.d.cts +2 -4
- package/dist/tools/view.d.ts +2 -4
- package/dist/vector/index.cjs +217 -100
- package/dist/vector/index.d.cts +1 -0
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.js +140 -23
- package/dist/vector/playback.d.cts +13 -0
- package/dist/vector/playback.d.ts +13 -0
- package/package.json +1 -1
- package/skills/pixerate-agent-tools/SKILL.md +13 -0
- package/skills/pixerate-canvas/SKILL.md +3 -0
- package/skills/pixerate-image-editor/SKILL.md +2 -2
- package/skills/pixerate-vector/SKILL.md +5 -0
- package/dist/chunk-BTZS3KZY.js +0 -221
- package/dist/chunk-MRD3NXKR.cjs +0 -221
- /package/dist/{chunk-K73HMKQP.js → chunk-PLKIYNJZ.js} +0 -0
- /package/dist/{chunk-LACYURUW.cjs → chunk-TNCWKC5M.cjs} +0 -0
package/dist/canvas/index.cjs
CHANGED
|
@@ -75,7 +75,25 @@ var _chunk2ZO4RSDScjs = require('../chunk-2ZO4RSDS.cjs');
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
var _chunkUBRYHNRUcjs = require('../chunk-UBRYHNRU.cjs');
|
|
79
97
|
|
|
80
98
|
|
|
81
99
|
|
|
@@ -810,7 +828,7 @@ var StreamingLayoutManager = (_class = class {
|
|
|
810
828
|
this.activeTransitionCancel();
|
|
811
829
|
this.activeTransitionCancel = null;
|
|
812
830
|
}
|
|
813
|
-
const layouted =
|
|
831
|
+
const layouted = _chunkUBRYHNRUcjs.ensureLayout.call(void 0, targetNodes, edges, this.layoutOptions);
|
|
814
832
|
const nextPositions = /* @__PURE__ */ new Map();
|
|
815
833
|
const transitions = [];
|
|
816
834
|
for (const node of layouted) {
|
|
@@ -869,358 +887,6 @@ var StreamingLayoutManager = (_class = class {
|
|
|
869
887
|
}
|
|
870
888
|
}, _class);
|
|
871
889
|
|
|
872
|
-
// src/canvas/arrange.ts
|
|
873
|
-
var LOCKED_DATA_KEY = "locked";
|
|
874
|
-
var LOCKED_PREVIOUS_FLAGS_KEY = "lockedPrevious";
|
|
875
|
-
function parsePx(value) {
|
|
876
|
-
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
877
|
-
if (typeof value === "string") {
|
|
878
|
-
const match = /^\s*(-?\d+(?:\.\d+)?)(px)?\s*$/i.exec(value);
|
|
879
|
-
if (match) return Number(match[1]);
|
|
880
|
-
}
|
|
881
|
-
return void 0;
|
|
882
|
-
}
|
|
883
|
-
function readStyleSize(style) {
|
|
884
|
-
if (!style) return {};
|
|
885
|
-
if (typeof style === "object") {
|
|
886
|
-
return { width: parsePx(style.width), height: parsePx(style.height) };
|
|
887
|
-
}
|
|
888
|
-
const read = (prop) => {
|
|
889
|
-
const match = new RegExp(`(?:^|;)\\s*${prop}\\s*:\\s*([^;]+)`, "i").exec(style);
|
|
890
|
-
return match ? parsePx(match[1]) : void 0;
|
|
891
|
-
};
|
|
892
|
-
return { width: read("width"), height: read("height") };
|
|
893
|
-
}
|
|
894
|
-
function withStyleSize(style, size2) {
|
|
895
|
-
if (!style) return _nullishCoalesce(style, () => ( void 0));
|
|
896
|
-
if (typeof style === "object") {
|
|
897
|
-
const next2 = { ...style };
|
|
898
|
-
if (size2.width !== void 0 && "width" in next2) next2.width = size2.width;
|
|
899
|
-
if (size2.height !== void 0 && "height" in next2) next2.height = size2.height;
|
|
900
|
-
return next2;
|
|
901
|
-
}
|
|
902
|
-
let next = style;
|
|
903
|
-
for (const prop of ["width", "height"]) {
|
|
904
|
-
const value = size2[prop];
|
|
905
|
-
if (value === void 0) continue;
|
|
906
|
-
next = next.replace(
|
|
907
|
-
new RegExp(`((?:^|;)\\s*${prop}\\s*:\\s*)[^;]+`, "i"),
|
|
908
|
-
`$1${value}px`
|
|
909
|
-
);
|
|
910
|
-
}
|
|
911
|
-
return next;
|
|
912
|
-
}
|
|
913
|
-
function getNodeSize(node, options = {}) {
|
|
914
|
-
const styleSize = readStyleSize(node.style);
|
|
915
|
-
let width = _nullishCoalesce(_nullishCoalesce(_optionalChain([node, 'access', _40 => _40.measured, 'optionalAccess', _41 => _41.width]), () => ( node.width)), () => ( styleSize.width));
|
|
916
|
-
let height = _nullishCoalesce(_nullishCoalesce(_optionalChain([node, 'access', _42 => _42.measured, 'optionalAccess', _43 => _43.height]), () => ( node.height)), () => ( styleSize.height));
|
|
917
|
-
if (width === void 0 || height === void 0) {
|
|
918
|
-
const fallback = options.estimate === false ? { width: _nullishCoalesce(options.defaultWidth, () => ( 200)), height: _nullishCoalesce(options.defaultHeight, () => ( 60)) } : _chunkMRD3NXKRcjs.estimateNodeSize.call(void 0, node, options.defaultWidth, options.defaultHeight);
|
|
919
|
-
width ??= fallback.width;
|
|
920
|
-
height ??= fallback.height;
|
|
921
|
-
}
|
|
922
|
-
return { width, height };
|
|
923
|
-
}
|
|
924
|
-
function getAbsolutePosition(node, lookup) {
|
|
925
|
-
let x = node.position.x;
|
|
926
|
-
let y = node.position.y;
|
|
927
|
-
const seen = /* @__PURE__ */ new Set([node.id]);
|
|
928
|
-
let parentId = node.parentId;
|
|
929
|
-
while (parentId && !seen.has(parentId)) {
|
|
930
|
-
const parent = lookup.get(parentId);
|
|
931
|
-
if (!parent) break;
|
|
932
|
-
seen.add(parentId);
|
|
933
|
-
x += parent.position.x;
|
|
934
|
-
y += parent.position.y;
|
|
935
|
-
parentId = parent.parentId;
|
|
936
|
-
}
|
|
937
|
-
return { x, y };
|
|
938
|
-
}
|
|
939
|
-
function createNodeLookup(nodes) {
|
|
940
|
-
return new Map(nodes.map((n3) => [n3.id, n3]));
|
|
941
|
-
}
|
|
942
|
-
function getNodeRect(node, lookup, options) {
|
|
943
|
-
const { x, y } = node.parentId && lookup ? getAbsolutePosition(node, lookup) : node.position;
|
|
944
|
-
return { x, y, ...getNodeSize(node, options) };
|
|
945
|
-
}
|
|
946
|
-
function isLocked(node) {
|
|
947
|
-
return _optionalChain([node, 'optionalAccess', _44 => _44.data, 'optionalAccess', _45 => _45[LOCKED_DATA_KEY]]) === true;
|
|
948
|
-
}
|
|
949
|
-
function lockNodes(nodes, ids) {
|
|
950
|
-
const idSet = new Set(ids);
|
|
951
|
-
return nodes.map((node) => {
|
|
952
|
-
if (!idSet.has(node.id) || isLocked(node)) return node;
|
|
953
|
-
const previous = {};
|
|
954
|
-
if (node.draggable !== void 0) previous.draggable = node.draggable;
|
|
955
|
-
if (node.deletable !== void 0) previous.deletable = node.deletable;
|
|
956
|
-
return {
|
|
957
|
-
...node,
|
|
958
|
-
draggable: false,
|
|
959
|
-
deletable: false,
|
|
960
|
-
data: { ...node.data, [LOCKED_DATA_KEY]: true, [LOCKED_PREVIOUS_FLAGS_KEY]: previous }
|
|
961
|
-
};
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
function unlockNodes(nodes, ids) {
|
|
965
|
-
const idSet = new Set(ids);
|
|
966
|
-
return nodes.map((node) => {
|
|
967
|
-
if (!idSet.has(node.id) || !isLocked(node)) return node;
|
|
968
|
-
const {
|
|
969
|
-
[LOCKED_DATA_KEY]: _locked,
|
|
970
|
-
[LOCKED_PREVIOUS_FLAGS_KEY]: previous = {},
|
|
971
|
-
...data
|
|
972
|
-
} = node.data;
|
|
973
|
-
const next = { ...node, data };
|
|
974
|
-
delete next.draggable;
|
|
975
|
-
delete next.deletable;
|
|
976
|
-
if (previous.draggable !== void 0) next.draggable = previous.draggable;
|
|
977
|
-
if (previous.deletable !== void 0) next.deletable = previous.deletable;
|
|
978
|
-
return next;
|
|
979
|
-
});
|
|
980
|
-
}
|
|
981
|
-
function toggleLockNodes(nodes, ids) {
|
|
982
|
-
const idSet = new Set(ids);
|
|
983
|
-
const anyUnlocked = nodes.some((n3) => idSet.has(n3.id) && !isLocked(n3));
|
|
984
|
-
return anyUnlocked ? lockNodes(nodes, idSet) : unlockNodes(nodes, idSet);
|
|
985
|
-
}
|
|
986
|
-
function collect(nodes, ids, options) {
|
|
987
|
-
const lookup = createNodeLookup(nodes);
|
|
988
|
-
const items = [];
|
|
989
|
-
const seen = /* @__PURE__ */ new Set();
|
|
990
|
-
for (const id of ids) {
|
|
991
|
-
const node = lookup.get(id);
|
|
992
|
-
if (!node || seen.has(id)) continue;
|
|
993
|
-
seen.add(id);
|
|
994
|
-
items.push({ node, rect: getNodeRect(node, lookup, options), locked: isLocked(node) });
|
|
995
|
-
}
|
|
996
|
-
return { lookup, items };
|
|
997
|
-
}
|
|
998
|
-
function toPositionUpdates(lookup, targets) {
|
|
999
|
-
const updates = [];
|
|
1000
|
-
for (const [id, abs] of targets) {
|
|
1001
|
-
const node = lookup.get(id);
|
|
1002
|
-
let position = abs;
|
|
1003
|
-
if (node.parentId && lookup.has(node.parentId)) {
|
|
1004
|
-
const parent = lookup.get(node.parentId);
|
|
1005
|
-
const parentAbs = _nullishCoalesce(targets.get(parent.id), () => ( getAbsolutePosition(parent, lookup)));
|
|
1006
|
-
position = { x: abs.x - parentAbs.x, y: abs.y - parentAbs.y };
|
|
1007
|
-
}
|
|
1008
|
-
if (position.x !== node.position.x || position.y !== node.position.y) {
|
|
1009
|
-
updates.push({ id, position });
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
return updates;
|
|
1013
|
-
}
|
|
1014
|
-
function alignNodes(nodes, ids, edge, options = {}) {
|
|
1015
|
-
const { lookup, items } = collect(nodes, ids, options);
|
|
1016
|
-
const fixed = typeof options.to === "object" ? options.to : null;
|
|
1017
|
-
if (items.length === 0 || !fixed && items.length < 2) return [];
|
|
1018
|
-
const bounds = _nullishCoalesce(fixed, () => ( _chunkMRD3NXKRcjs.boundsOf.call(void 0, items.map((i) => i.rect))));
|
|
1019
|
-
const targets = /* @__PURE__ */ new Map();
|
|
1020
|
-
for (const { node, rect: rect2, locked } of items) {
|
|
1021
|
-
if (locked) continue;
|
|
1022
|
-
let { x, y } = rect2;
|
|
1023
|
-
switch (edge) {
|
|
1024
|
-
case "left":
|
|
1025
|
-
x = bounds.x;
|
|
1026
|
-
break;
|
|
1027
|
-
case "center":
|
|
1028
|
-
x = bounds.x + bounds.width / 2 - rect2.width / 2;
|
|
1029
|
-
break;
|
|
1030
|
-
case "right":
|
|
1031
|
-
x = bounds.x + bounds.width - rect2.width;
|
|
1032
|
-
break;
|
|
1033
|
-
case "top":
|
|
1034
|
-
y = bounds.y;
|
|
1035
|
-
break;
|
|
1036
|
-
case "middle":
|
|
1037
|
-
y = bounds.y + bounds.height / 2 - rect2.height / 2;
|
|
1038
|
-
break;
|
|
1039
|
-
case "bottom":
|
|
1040
|
-
y = bounds.y + bounds.height - rect2.height;
|
|
1041
|
-
break;
|
|
1042
|
-
}
|
|
1043
|
-
targets.set(node.id, { x, y });
|
|
1044
|
-
}
|
|
1045
|
-
return toPositionUpdates(lookup, targets);
|
|
1046
|
-
}
|
|
1047
|
-
function distributeAxis(items, horizontal, mode, gapOverride, targets) {
|
|
1048
|
-
const start = (r) => horizontal ? r.x : r.y;
|
|
1049
|
-
const size2 = (r) => horizontal ? r.width : r.height;
|
|
1050
|
-
const sorted = [...items].sort(
|
|
1051
|
-
(a, b) => start(a.rect) + size2(a.rect) / 2 - (start(b.rect) + size2(b.rect) / 2)
|
|
1052
|
-
);
|
|
1053
|
-
const first = sorted[0].rect;
|
|
1054
|
-
const last = sorted[sorted.length - 1].rect;
|
|
1055
|
-
const n3 = sorted.length;
|
|
1056
|
-
const set = (item, value) => {
|
|
1057
|
-
if (item.locked) return;
|
|
1058
|
-
const current = _nullishCoalesce(targets.get(item.node.id), () => ( { x: item.rect.x, y: item.rect.y }));
|
|
1059
|
-
targets.set(item.node.id, horizontal ? { ...current, x: value } : { ...current, y: value });
|
|
1060
|
-
};
|
|
1061
|
-
if (mode === "centres") {
|
|
1062
|
-
const c0 = start(first) + size2(first) / 2;
|
|
1063
|
-
const c1 = start(last) + size2(last) / 2;
|
|
1064
|
-
const step = (c1 - c0) / (n3 - 1);
|
|
1065
|
-
sorted.forEach((item, i) => set(item, c0 + step * i - size2(item.rect) / 2));
|
|
1066
|
-
return;
|
|
1067
|
-
}
|
|
1068
|
-
const span = start(last) + size2(last) - start(first);
|
|
1069
|
-
const total = sorted.reduce((sum, item) => sum + size2(item.rect), 0);
|
|
1070
|
-
const gap = _nullishCoalesce(gapOverride, () => ( (span - total) / (n3 - 1)));
|
|
1071
|
-
let cursor = start(first);
|
|
1072
|
-
for (const item of sorted) {
|
|
1073
|
-
set(item, cursor);
|
|
1074
|
-
cursor += size2(item.rect) + gap;
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
function distributeNodes(nodes, ids, axis, mode = "gaps", options = {}) {
|
|
1078
|
-
const { lookup, items } = collect(nodes, ids, options);
|
|
1079
|
-
const minimum = options.gap !== void 0 && mode === "gaps" ? 2 : 3;
|
|
1080
|
-
if (items.length < minimum) return [];
|
|
1081
|
-
const targets = /* @__PURE__ */ new Map();
|
|
1082
|
-
if (axis !== "vertical") distributeAxis(items, true, mode, options.gap, targets);
|
|
1083
|
-
if (axis !== "horizontal") distributeAxis(items, false, mode, options.gap, targets);
|
|
1084
|
-
return toPositionUpdates(lookup, targets);
|
|
1085
|
-
}
|
|
1086
|
-
function matchSize(nodes, ids, dimension, options = {}) {
|
|
1087
|
-
const { items } = collect(nodes, ids, options);
|
|
1088
|
-
if (items.length < 2) return [];
|
|
1089
|
-
const reference = _nullishCoalesce(options.reference, () => ( "largest"));
|
|
1090
|
-
const pick = (dim) => {
|
|
1091
|
-
if (typeof reference === "object") {
|
|
1092
|
-
const item = items.find((i) => i.node.id === reference.id);
|
|
1093
|
-
if (item) return item.rect[dim];
|
|
1094
|
-
}
|
|
1095
|
-
if (reference === "first") return items[0].rect[dim];
|
|
1096
|
-
const values = items.map((i) => i.rect[dim]);
|
|
1097
|
-
return reference === "smallest" ? Math.min(...values) : Math.max(...values);
|
|
1098
|
-
};
|
|
1099
|
-
const width = dimension !== "height" ? pick("width") : void 0;
|
|
1100
|
-
const height = dimension !== "width" ? pick("height") : void 0;
|
|
1101
|
-
const updates = [];
|
|
1102
|
-
for (const { node, rect: rect2, locked } of items) {
|
|
1103
|
-
if (locked) continue;
|
|
1104
|
-
const update = { id: node.id };
|
|
1105
|
-
if (width !== void 0 && width !== rect2.width) update.width = width;
|
|
1106
|
-
if (height !== void 0 && height !== rect2.height) update.height = height;
|
|
1107
|
-
if (update.width === void 0 && update.height === void 0) continue;
|
|
1108
|
-
if (options.keepCentre) {
|
|
1109
|
-
update.position = {
|
|
1110
|
-
x: node.position.x - ((_nullishCoalesce(update.width, () => ( rect2.width))) - rect2.width) / 2,
|
|
1111
|
-
y: node.position.y - ((_nullishCoalesce(update.height, () => ( rect2.height))) - rect2.height) / 2
|
|
1112
|
-
};
|
|
1113
|
-
}
|
|
1114
|
-
updates.push(update);
|
|
1115
|
-
}
|
|
1116
|
-
return updates;
|
|
1117
|
-
}
|
|
1118
|
-
function reorderNodes(nodes, ids, operation, options = {}) {
|
|
1119
|
-
const lookup = createNodeLookup(nodes);
|
|
1120
|
-
const targetIds = new Set(
|
|
1121
|
-
[...ids].filter((id) => lookup.has(id) && !isLocked(lookup.get(id)))
|
|
1122
|
-
);
|
|
1123
|
-
if (targetIds.size === 0) return [];
|
|
1124
|
-
const groups = /* @__PURE__ */ new Map();
|
|
1125
|
-
for (const node of nodes) {
|
|
1126
|
-
const key = _nullishCoalesce(node.parentId, () => ( ""));
|
|
1127
|
-
if (!groups.has(key)) groups.set(key, []);
|
|
1128
|
-
groups.get(key).push(node);
|
|
1129
|
-
}
|
|
1130
|
-
const updates = [];
|
|
1131
|
-
for (const siblings of groups.values()) {
|
|
1132
|
-
if (!siblings.some((n3) => targetIds.has(n3.id))) continue;
|
|
1133
|
-
const order = siblings.map((node, index) => ({ node, index, z: typeof node.zIndex === "number" ? node.zIndex : 0 })).sort((a, b) => a.z - b.z || a.index - b.index).map((entry) => entry.node);
|
|
1134
|
-
const isTarget = (n3) => targetIds.has(n3.id);
|
|
1135
|
-
let next;
|
|
1136
|
-
if (operation === "bringToFront") {
|
|
1137
|
-
next = [...order.filter((n3) => !isTarget(n3)), ...order.filter(isTarget)];
|
|
1138
|
-
} else if (operation === "sendToBack") {
|
|
1139
|
-
next = [...order.filter(isTarget), ...order.filter((n3) => !isTarget(n3))];
|
|
1140
|
-
} else {
|
|
1141
|
-
next = [...order];
|
|
1142
|
-
const forward = operation === "bringForward";
|
|
1143
|
-
const rects = new Map(next.map((n3) => [n3.id, getNodeRect(n3, lookup, options)]));
|
|
1144
|
-
const intersects = (a, b) => a.x < b.x + b.width && a.x + a.width > b.x && a.y < b.y + b.height && a.y + a.height > b.y;
|
|
1145
|
-
const indices = next.map((_, i) => i);
|
|
1146
|
-
if (forward) indices.reverse();
|
|
1147
|
-
for (const i of indices) {
|
|
1148
|
-
const node = next[i];
|
|
1149
|
-
if (!isTarget(node)) continue;
|
|
1150
|
-
const step = forward ? 1 : -1;
|
|
1151
|
-
let j = i + step;
|
|
1152
|
-
let swapWith = -1;
|
|
1153
|
-
let firstNonTarget = -1;
|
|
1154
|
-
while (j >= 0 && j < next.length) {
|
|
1155
|
-
if (!isTarget(next[j])) {
|
|
1156
|
-
if (firstNonTarget === -1) firstNonTarget = j;
|
|
1157
|
-
if (intersects(rects.get(node.id), rects.get(next[j].id))) {
|
|
1158
|
-
swapWith = j;
|
|
1159
|
-
break;
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
j += step;
|
|
1163
|
-
}
|
|
1164
|
-
if (swapWith === -1) swapWith = firstNonTarget;
|
|
1165
|
-
if (swapWith === -1) continue;
|
|
1166
|
-
next.splice(i, 1);
|
|
1167
|
-
next.splice(swapWith, 0, node);
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
if (next.every((node, i) => node === order[i])) continue;
|
|
1171
|
-
next.forEach((node, rank) => {
|
|
1172
|
-
const current = typeof node.zIndex === "number" ? node.zIndex : 0;
|
|
1173
|
-
if (current !== rank) updates.push({ id: node.id, zIndex: rank });
|
|
1174
|
-
});
|
|
1175
|
-
}
|
|
1176
|
-
return updates;
|
|
1177
|
-
}
|
|
1178
|
-
function applyNodeUpdates(nodes, updates) {
|
|
1179
|
-
if (updates.length === 0) return nodes;
|
|
1180
|
-
const byId = /* @__PURE__ */ new Map();
|
|
1181
|
-
for (const update of updates) {
|
|
1182
|
-
byId.set(update.id, { ...byId.get(update.id), ...update });
|
|
1183
|
-
}
|
|
1184
|
-
return nodes.map((node) => {
|
|
1185
|
-
const update = byId.get(node.id);
|
|
1186
|
-
if (!update) return node;
|
|
1187
|
-
const next = { ...node };
|
|
1188
|
-
if (update.position) next.position = { ...update.position };
|
|
1189
|
-
if (update.zIndex !== void 0) next.zIndex = update.zIndex;
|
|
1190
|
-
if (update.width !== void 0 || update.height !== void 0) {
|
|
1191
|
-
if (update.width !== void 0) next.width = update.width;
|
|
1192
|
-
if (update.height !== void 0) next.height = update.height;
|
|
1193
|
-
if (node.style) next.style = withStyleSize(node.style, update);
|
|
1194
|
-
if (node.measured) {
|
|
1195
|
-
next.measured = {
|
|
1196
|
-
...node.measured,
|
|
1197
|
-
...update.width !== void 0 ? { width: update.width } : {},
|
|
1198
|
-
...update.height !== void 0 ? { height: update.height } : {}
|
|
1199
|
-
};
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
return next;
|
|
1203
|
-
});
|
|
1204
|
-
}
|
|
1205
|
-
function invertNodeUpdates(nodes, updates) {
|
|
1206
|
-
const lookup = createNodeLookup(nodes);
|
|
1207
|
-
const inverse = [];
|
|
1208
|
-
for (const update of updates) {
|
|
1209
|
-
const node = lookup.get(update.id);
|
|
1210
|
-
if (!node) continue;
|
|
1211
|
-
const back = { id: node.id };
|
|
1212
|
-
if (update.position) back.position = { ...node.position };
|
|
1213
|
-
if (update.zIndex !== void 0) back.zIndex = typeof node.zIndex === "number" ? node.zIndex : 0;
|
|
1214
|
-
if (update.width !== void 0 || update.height !== void 0) {
|
|
1215
|
-
const size2 = getNodeSize(node);
|
|
1216
|
-
if (update.width !== void 0) back.width = size2.width;
|
|
1217
|
-
if (update.height !== void 0) back.height = size2.height;
|
|
1218
|
-
}
|
|
1219
|
-
inverse.push(back);
|
|
1220
|
-
}
|
|
1221
|
-
return inverse;
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
890
|
// src/canvas/guides.ts
|
|
1225
891
|
function snapToGrid(value, spacing, origin = 0) {
|
|
1226
892
|
if (!(spacing > 0) || !Number.isFinite(spacing)) return value;
|
|
@@ -1384,8 +1050,8 @@ function computeSnapGuides(moving, targets, options = {}) {
|
|
|
1384
1050
|
const sy = snapAxis(false);
|
|
1385
1051
|
const grid = _nullishCoalesce(options.gridSize, () => ( 0));
|
|
1386
1052
|
const gridDelta = (v, origin) => snapToGrid(v, grid, origin) - v;
|
|
1387
|
-
const dx = _nullishCoalesce(sx.delta, () => ( (grid > 0 ? gridDelta(moving.x, _nullishCoalesce(_optionalChain([options, 'access',
|
|
1388
|
-
const dy = _nullishCoalesce(sy.delta, () => ( (grid > 0 ? gridDelta(moving.y, _nullishCoalesce(_optionalChain([options, 'access',
|
|
1053
|
+
const dx = _nullishCoalesce(sx.delta, () => ( (grid > 0 ? gridDelta(moving.x, _nullishCoalesce(_optionalChain([options, 'access', _40 => _40.gridOrigin, 'optionalAccess', _41 => _41.x]), () => ( 0))) : 0)));
|
|
1054
|
+
const dy = _nullishCoalesce(sy.delta, () => ( (grid > 0 ? gridDelta(moving.y, _nullishCoalesce(_optionalChain([options, 'access', _42 => _42.gridOrigin, 'optionalAccess', _43 => _43.y]), () => ( 0))) : 0)));
|
|
1389
1055
|
const snapped = { x: moving.x + dx, y: moving.y + dy, width: moving.width, height: moving.height };
|
|
1390
1056
|
const guides = [];
|
|
1391
1057
|
const alignmentGuides = (horizontal) => {
|
|
@@ -1402,7 +1068,7 @@ function computeSnapGuides(moving, targets, options = {}) {
|
|
|
1402
1068
|
for (const line4 of lines) {
|
|
1403
1069
|
const aligned = matches(line4.axis, line4.value, eps);
|
|
1404
1070
|
if (aligned.length === 0) continue;
|
|
1405
|
-
const span =
|
|
1071
|
+
const span = _chunkUBRYHNRUcjs.boundsOf.call(void 0, [snapped, ...aligned]);
|
|
1406
1072
|
guides.push(
|
|
1407
1073
|
horizontal ? { orientation: "vertical", kind: line4.kind, x1: line4.value, y1: span.y, x2: line4.value, y2: span.y + span.height } : { orientation: "horizontal", kind: line4.kind, x1: span.x, y1: line4.value, x2: span.x + span.width, y2: line4.value }
|
|
1408
1074
|
);
|
|
@@ -1445,18 +1111,18 @@ function collectDescendantIds(nodes, ids) {
|
|
|
1445
1111
|
}
|
|
1446
1112
|
function createNodeGuideIndex(nodes, draggingIds, options = {}) {
|
|
1447
1113
|
const exclude = collectDescendantIds(nodes, draggingIds);
|
|
1448
|
-
const lookup = createNodeLookup(nodes);
|
|
1114
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
1449
1115
|
const rects = [];
|
|
1450
1116
|
for (const node of nodes) {
|
|
1451
1117
|
if (exclude.has(node.id) || node.hidden === true) continue;
|
|
1452
1118
|
if (options.filter && !options.filter(node)) continue;
|
|
1453
|
-
rects.push(getNodeRect(node, lookup, options));
|
|
1119
|
+
rects.push(_chunkUBRYHNRUcjs.getNodeRect.call(void 0, node, lookup, options));
|
|
1454
1120
|
}
|
|
1455
1121
|
return createGuideIndex(rects);
|
|
1456
1122
|
}
|
|
1457
1123
|
function snapNodeDrag(nodes, draggingIds, options = {}) {
|
|
1458
1124
|
const ids = new Set(draggingIds);
|
|
1459
|
-
const lookup = createNodeLookup(nodes);
|
|
1125
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
1460
1126
|
const dragged = [...ids].map((id) => lookup.get(id)).filter((n3) => !!n3);
|
|
1461
1127
|
const empty = {
|
|
1462
1128
|
position: { x: 0, y: 0 },
|
|
@@ -1467,7 +1133,7 @@ function snapNodeDrag(nodes, draggingIds, options = {}) {
|
|
|
1467
1133
|
updates: []
|
|
1468
1134
|
};
|
|
1469
1135
|
if (dragged.length === 0) return empty;
|
|
1470
|
-
const bounds =
|
|
1136
|
+
const bounds = _chunkUBRYHNRUcjs.boundsOf.call(void 0, dragged.map((n3) => _chunkUBRYHNRUcjs.getNodeRect.call(void 0, n3, lookup, options)));
|
|
1471
1137
|
const index = _nullishCoalesce(options.index, () => ( createNodeGuideIndex(nodes, ids, options)));
|
|
1472
1138
|
const result = computeSnapGuides(bounds, index, options);
|
|
1473
1139
|
const { x: dx, y: dy } = result.offset;
|
|
@@ -1577,8 +1243,8 @@ function closestPointOnSide(rect2, position, p) {
|
|
|
1577
1243
|
}
|
|
1578
1244
|
}
|
|
1579
1245
|
function nearestHandlePositions(source, target) {
|
|
1580
|
-
const a =
|
|
1581
|
-
const b =
|
|
1246
|
+
const a = _chunkUBRYHNRUcjs.centre.call(void 0, source);
|
|
1247
|
+
const b = _chunkUBRYHNRUcjs.centre.call(void 0, target);
|
|
1582
1248
|
const dx = b.x - a.x;
|
|
1583
1249
|
const dy = b.y - a.y;
|
|
1584
1250
|
if (Math.abs(dx) >= Math.abs(dy)) {
|
|
@@ -1662,7 +1328,7 @@ var CanvasScenesStore = (_class2 = class {
|
|
|
1662
1328
|
this.scenes = scenes2;
|
|
1663
1329
|
if (this.currentId && !scenes2.some((s) => s.id === this.currentId)) this.currentId = null;
|
|
1664
1330
|
this.cached = this.snapshot();
|
|
1665
|
-
_optionalChain([this, 'access',
|
|
1331
|
+
_optionalChain([this, 'access', _44 => _44.onChange, 'optionalCall', _45 => _45(this.cached)]);
|
|
1666
1332
|
for (const listener of this.listeners) listener(this.cached);
|
|
1667
1333
|
}
|
|
1668
1334
|
getState() {
|
|
@@ -1690,7 +1356,7 @@ var CanvasScenesStore = (_class2 = class {
|
|
|
1690
1356
|
add(input, index) {
|
|
1691
1357
|
const scene = cloneScene({
|
|
1692
1358
|
id: input.id && !this.getScene(input.id) ? input.id : this.createId(),
|
|
1693
|
-
name: _optionalChain([input, 'access',
|
|
1359
|
+
name: _optionalChain([input, 'access', _46 => _46.name, 'optionalAccess', _47 => _47.trim, 'call', _48 => _48()]) || this.nextDefaultName(),
|
|
1694
1360
|
viewport: input.viewport,
|
|
1695
1361
|
nodeIds: input.nodeIds
|
|
1696
1362
|
});
|
|
@@ -1812,10 +1478,10 @@ function fitViewportToRect(rect2, size2, options = {}) {
|
|
|
1812
1478
|
return { x: size2.width / 2 - cx * zoom, y: size2.height / 2 - cy * zoom, zoom };
|
|
1813
1479
|
}
|
|
1814
1480
|
function fitViewportToNodes(nodes, size2, ids, options = {}) {
|
|
1815
|
-
const lookup = createNodeLookup(nodes);
|
|
1481
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
1816
1482
|
const wanted = ids ? new Set(ids) : null;
|
|
1817
|
-
const rects = nodes.filter((n3) => wanted ? wanted.has(n3.id) : true).map((n3) => getNodeRect(n3, lookup, options));
|
|
1818
|
-
const bounds =
|
|
1483
|
+
const rects = nodes.filter((n3) => wanted ? wanted.has(n3.id) : true).map((n3) => _chunkUBRYHNRUcjs.getNodeRect.call(void 0, n3, lookup, options));
|
|
1484
|
+
const bounds = _chunkUBRYHNRUcjs.boundsOf.call(void 0, rects);
|
|
1819
1485
|
return bounds ? fitViewportToRect(bounds, size2, options) : null;
|
|
1820
1486
|
}
|
|
1821
1487
|
|
|
@@ -1830,17 +1496,17 @@ var BOOLEAN_FOR = {
|
|
|
1830
1496
|
exclude: "xor"
|
|
1831
1497
|
};
|
|
1832
1498
|
function isShapeNode(node) {
|
|
1833
|
-
return !!node && _chunkNM3G4VQTcjs.isShapeDescription.call(void 0, _optionalChain([node, 'access',
|
|
1499
|
+
return !!node && _chunkNM3G4VQTcjs.isShapeDescription.call(void 0, _optionalChain([node, 'access', _49 => _49.data, 'optionalAccess', _50 => _50[SHAPE_DATA_KEY]]));
|
|
1834
1500
|
}
|
|
1835
1501
|
function getNodeShape(node) {
|
|
1836
|
-
const shape = _optionalChain([node, 'optionalAccess',
|
|
1502
|
+
const shape = _optionalChain([node, 'optionalAccess', _51 => _51.data, 'optionalAccess', _52 => _52[SHAPE_DATA_KEY]]);
|
|
1837
1503
|
return _chunkNM3G4VQTcjs.isShapeDescription.call(void 0, shape) ? shape : null;
|
|
1838
1504
|
}
|
|
1839
1505
|
function shapeNodeToPolygon(node, lookup, options = {}) {
|
|
1840
1506
|
const shape = getNodeShape(node);
|
|
1841
1507
|
if (!shape) return null;
|
|
1842
|
-
const size2 = getNodeSize(node, options);
|
|
1843
|
-
const origin = node.parentId && lookup ? getAbsolutePosition(node, lookup) : node.position;
|
|
1508
|
+
const size2 = _chunkUBRYHNRUcjs.getNodeSize.call(void 0, node, options);
|
|
1509
|
+
const origin = node.parentId && lookup ? _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, node, lookup) : node.position;
|
|
1844
1510
|
const { rings, fillRule } = _chunkNM3G4VQTcjs.shapeToPolygon.call(void 0, shape, size2, { tolerance: options.tolerance });
|
|
1845
1511
|
return {
|
|
1846
1512
|
rings: rings.map((ring) => ring.map(([x, y]) => [x + origin.x, y + origin.y])),
|
|
@@ -1875,8 +1541,8 @@ function shapeToBezierPath(shape, size2) {
|
|
|
1875
1541
|
function shapeNodeToBezierPath(node, lookup, options = {}) {
|
|
1876
1542
|
const shape = getNodeShape(node);
|
|
1877
1543
|
if (!shape) return null;
|
|
1878
|
-
const size2 = getNodeSize(node, options);
|
|
1879
|
-
const origin = node.parentId && lookup ? getAbsolutePosition(node, lookup) : node.position;
|
|
1544
|
+
const size2 = _chunkUBRYHNRUcjs.getNodeSize.call(void 0, node, options);
|
|
1545
|
+
const origin = node.parentId && lookup ? _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, node, lookup) : node.position;
|
|
1880
1546
|
const { path, fillRule } = shapeToBezierPath(shape, size2);
|
|
1881
1547
|
return { path: _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, path, [1, 0, 0, 1, origin.x, origin.y]), fillRule };
|
|
1882
1548
|
}
|
|
@@ -1892,7 +1558,7 @@ function stackOrder(nodes, ids) {
|
|
|
1892
1558
|
function canCombineShapeNodes(nodes, ids) {
|
|
1893
1559
|
const idSet = new Set(ids);
|
|
1894
1560
|
const shapes = nodes.filter((n3) => idSet.has(n3.id) && isShapeNode(n3));
|
|
1895
|
-
if (shapes.some((n3) => isLocked(n3))) return { ok: false, reason: "locked" };
|
|
1561
|
+
if (shapes.some((n3) => _chunkUBRYHNRUcjs.isLocked.call(void 0, n3))) return { ok: false, reason: "locked" };
|
|
1896
1562
|
if (shapes.length < 2) return { ok: false, reason: "too-few" };
|
|
1897
1563
|
return { ok: true, shapeIds: shapes.map((n3) => n3.id) };
|
|
1898
1564
|
}
|
|
@@ -1900,12 +1566,12 @@ function combineShapeNodes(nodes, ids, operation, options = {}) {
|
|
|
1900
1566
|
const idList = [...ids];
|
|
1901
1567
|
const check = canCombineShapeNodes(nodes, idList);
|
|
1902
1568
|
if (!check.ok) return { ok: false, operation, reason: check.reason };
|
|
1903
|
-
const lookup = createNodeLookup(nodes);
|
|
1569
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
1904
1570
|
const shapeIds = new Set(check.shapeIds);
|
|
1905
1571
|
const ordered = stackOrder(nodes, shapeIds);
|
|
1906
1572
|
const parentIds = new Set(ordered.map((n3) => _nullishCoalesce(n3.parentId, () => ( ""))));
|
|
1907
1573
|
const sharedParent = parentIds.size === 1 ? ordered[0].parentId : void 0;
|
|
1908
|
-
const parentOrigin = sharedParent && lookup.get(sharedParent) ? getAbsolutePosition(lookup.get(sharedParent), lookup) : { x: 0, y: 0 };
|
|
1574
|
+
const parentOrigin = sharedParent && lookup.get(sharedParent) ? _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, lookup.get(sharedParent), lookup) : { x: 0, y: 0 };
|
|
1909
1575
|
const pickSource = () => {
|
|
1910
1576
|
const style = _nullishCoalesce(options.styleFrom, () => ( "bottom"));
|
|
1911
1577
|
if (style === "top") return ordered[ordered.length - 1];
|
|
@@ -2002,8 +1668,8 @@ function buildPathNode(path, source, id, options) {
|
|
|
2002
1668
|
else if (value !== void 0) shape[key] = value;
|
|
2003
1669
|
}
|
|
2004
1670
|
const {
|
|
2005
|
-
[LOCKED_DATA_KEY]: _locked,
|
|
2006
|
-
[LOCKED_PREVIOUS_FLAGS_KEY]: _previous,
|
|
1671
|
+
[_chunkUBRYHNRUcjs.LOCKED_DATA_KEY]: _locked,
|
|
1672
|
+
[_chunkUBRYHNRUcjs.LOCKED_PREVIOUS_FLAGS_KEY]: _previous,
|
|
2007
1673
|
...data
|
|
2008
1674
|
} = _nullishCoalesce(source.data, () => ( {}));
|
|
2009
1675
|
const {
|
|
@@ -2025,7 +1691,7 @@ function buildPathNode(path, source, id, options) {
|
|
|
2025
1691
|
};
|
|
2026
1692
|
if (options.sharedParent) node.parentId = options.sharedParent;
|
|
2027
1693
|
if (options.nodeType !== void 0) node.type = options.nodeType;
|
|
2028
|
-
if (source.style) node.style = withStyleSize(source.style, { width, height });
|
|
1694
|
+
if (source.style) node.style = _chunkUBRYHNRUcjs.withStyleSize.call(void 0, source.style, { width, height });
|
|
2029
1695
|
if (options.select !== false) node.selected = true;
|
|
2030
1696
|
return node;
|
|
2031
1697
|
}
|
|
@@ -2076,13 +1742,13 @@ function shapeTargets(nodes, ids) {
|
|
|
2076
1742
|
}
|
|
2077
1743
|
function canOffsetShapeNodes(nodes, ids) {
|
|
2078
1744
|
const shapes = shapeTargets(nodes, ids);
|
|
2079
|
-
if (shapes.some((n3) => isLocked(n3))) return { ok: false, reason: "locked" };
|
|
1745
|
+
if (shapes.some((n3) => _chunkUBRYHNRUcjs.isLocked.call(void 0, n3))) return { ok: false, reason: "locked" };
|
|
2080
1746
|
if (shapes.length === 0) return { ok: false, reason: "no-shapes" };
|
|
2081
1747
|
return { ok: true, shapeIds: shapes.map((n3) => n3.id) };
|
|
2082
1748
|
}
|
|
2083
1749
|
function canOutlineShapeNodeStrokes(nodes, ids) {
|
|
2084
1750
|
const shapes = shapeTargets(nodes, ids);
|
|
2085
|
-
if (shapes.some((n3) => isLocked(n3))) return { ok: false, reason: "locked" };
|
|
1751
|
+
if (shapes.some((n3) => _chunkUBRYHNRUcjs.isLocked.call(void 0, n3))) return { ok: false, reason: "locked" };
|
|
2086
1752
|
if (shapes.length === 0) return { ok: false, reason: "no-shapes" };
|
|
2087
1753
|
const stroked = shapes.filter((n3) => hasVisibleStroke(getNodeShape(n3)));
|
|
2088
1754
|
if (stroked.length === 0) return { ok: false, reason: "no-stroke" };
|
|
@@ -2091,7 +1757,7 @@ function canOutlineShapeNodeStrokes(nodes, ids) {
|
|
|
2091
1757
|
function editPlacement(node, lookup) {
|
|
2092
1758
|
const parent = node.parentId ? lookup.get(node.parentId) : void 0;
|
|
2093
1759
|
return {
|
|
2094
|
-
parentOrigin: parent ? getAbsolutePosition(parent, lookup) : { x: 0, y: 0 },
|
|
1760
|
+
parentOrigin: parent ? _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, parent, lookup) : { x: 0, y: 0 },
|
|
2095
1761
|
sharedParent: parent ? node.parentId : void 0
|
|
2096
1762
|
};
|
|
2097
1763
|
}
|
|
@@ -2110,7 +1776,7 @@ function offsetShapeNodes(nodes, ids, distance, options = {}) {
|
|
|
2110
1776
|
if (!Number.isFinite(distance)) return { ok: false, operation, reason: "invalid" };
|
|
2111
1777
|
const check = canOffsetShapeNodes(nodes, ids);
|
|
2112
1778
|
if (!check.ok) return { ok: false, operation, reason: check.reason };
|
|
2113
|
-
const lookup = createNodeLookup(nodes);
|
|
1779
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
2114
1780
|
const createId = _nullishCoalesce(options.createId, () => ( defaultId2));
|
|
2115
1781
|
let index = 0;
|
|
2116
1782
|
const replacements = [];
|
|
@@ -2145,7 +1811,7 @@ function outlineShapeNodeStrokes(nodes, ids, options = {}) {
|
|
|
2145
1811
|
}
|
|
2146
1812
|
const check = canOutlineShapeNodeStrokes(nodes, ids);
|
|
2147
1813
|
if (!check.ok) return { ok: false, operation, reason: check.reason };
|
|
2148
|
-
const lookup = createNodeLookup(nodes);
|
|
1814
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
2149
1815
|
const createId = _nullishCoalesce(options.createId, () => ( defaultId2));
|
|
2150
1816
|
let index = 0;
|
|
2151
1817
|
const replacements = [];
|
|
@@ -2285,7 +1951,7 @@ function snapResize(rect2, handle, targets, options = {}) {
|
|
|
2285
1951
|
if (useEdges) consider(within(horizontal ? index.edgeX : index.edgeY, moving, tolerance), "edge");
|
|
2286
1952
|
if (useCentres) consider(within(horizontal ? index.centreX : index.centreY, moving, tolerance), "centre");
|
|
2287
1953
|
if (!best && grid > 0) {
|
|
2288
|
-
const origin = horizontal ? _nullishCoalesce(_optionalChain([options, 'access',
|
|
1954
|
+
const origin = horizontal ? _nullishCoalesce(_optionalChain([options, 'access', _53 => _53.gridOrigin, 'optionalAccess', _54 => _54.x]), () => ( 0)) : _nullishCoalesce(_optionalChain([options, 'access', _55 => _55.gridOrigin, 'optionalAccess', _56 => _56.y]), () => ( 0));
|
|
2289
1955
|
consider([snapToGrid(moving, grid, origin)], "grid");
|
|
2290
1956
|
}
|
|
2291
1957
|
return best;
|
|
@@ -2349,7 +2015,7 @@ function snapResize(rect2, handle, targets, options = {}) {
|
|
|
2349
2015
|
if (!hit || hit.kind === "grid") return;
|
|
2350
2016
|
const axis = hit.kind === "edge" ? horizontal ? index.edgeX : index.edgeY : horizontal ? index.centreX : index.centreY;
|
|
2351
2017
|
const aligned = matching(axis, hit.value, eps);
|
|
2352
|
-
const span =
|
|
2018
|
+
const span = _chunkUBRYHNRUcjs.boundsOf.call(void 0, [out, ...aligned]);
|
|
2353
2019
|
guides.push(
|
|
2354
2020
|
horizontal ? { orientation: "vertical", kind: hit.kind, x1: hit.value, y1: span.y, x2: hit.value, y2: span.y + span.height } : { orientation: "horizontal", kind: hit.kind, x1: span.x, y1: hit.value, x2: span.x + span.width, y2: hit.value }
|
|
2355
2021
|
);
|
|
@@ -2366,16 +2032,16 @@ function snapResize(rect2, handle, targets, options = {}) {
|
|
|
2366
2032
|
};
|
|
2367
2033
|
}
|
|
2368
2034
|
function snapNodeResize(nodes, id, rect2, handle, options = {}) {
|
|
2369
|
-
const lookup = createNodeLookup(nodes);
|
|
2035
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
2370
2036
|
const node = lookup.get(id);
|
|
2371
|
-
if (!node || isLocked(node)) {
|
|
2037
|
+
if (!node || _chunkUBRYHNRUcjs.isLocked.call(void 0, node)) {
|
|
2372
2038
|
return { rect: { ...rect2 }, guides: [], snappedX: false, snappedY: false, changed: false, updates: [] };
|
|
2373
2039
|
}
|
|
2374
2040
|
const index = _nullishCoalesce(options.index, () => ( createNodeGuideIndex(nodes, [id], options)));
|
|
2375
2041
|
const result = snapResize(rect2, handle, index, options);
|
|
2376
2042
|
if (!result.changed) return { ...result, updates: [] };
|
|
2377
2043
|
const parent = node.parentId ? lookup.get(node.parentId) : void 0;
|
|
2378
|
-
const origin = parent ? getAbsolutePosition(parent, lookup) : { x: 0, y: 0 };
|
|
2044
|
+
const origin = parent ? _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, parent, lookup) : { x: 0, y: 0 };
|
|
2379
2045
|
return {
|
|
2380
2046
|
...result,
|
|
2381
2047
|
updates: [
|
|
@@ -2389,8 +2055,8 @@ function snapNodeResize(nodes, id, rect2, handle, options = {}) {
|
|
|
2389
2055
|
};
|
|
2390
2056
|
}
|
|
2391
2057
|
function getResizingNodeRect(node, lookup, options = {}) {
|
|
2392
|
-
const { x, y } = node.parentId ? getAbsolutePosition(node, lookup) : node.position;
|
|
2393
|
-
const size2 = getNodeSize(node, options);
|
|
2058
|
+
const { x, y } = node.parentId ? _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, node, lookup) : node.position;
|
|
2059
|
+
const size2 = _chunkUBRYHNRUcjs.getNodeSize.call(void 0, node, options);
|
|
2394
2060
|
return { x, y, width: _nullishCoalesce(node.width, () => ( size2.width)), height: _nullishCoalesce(node.height, () => ( size2.height)) };
|
|
2395
2061
|
}
|
|
2396
2062
|
|
|
@@ -2409,25 +2075,25 @@ function clampLayoutSize(value, min, max) {
|
|
|
2409
2075
|
}
|
|
2410
2076
|
var finite = (v) => typeof v === "number" && Number.isFinite(v) ? v : 0;
|
|
2411
2077
|
function getAutoLayout(node) {
|
|
2412
|
-
const layout2 = _optionalChain([node, 'optionalAccess',
|
|
2078
|
+
const layout2 = _optionalChain([node, 'optionalAccess', _57 => _57.data, 'optionalAccess', _58 => _58[AUTO_LAYOUT_DATA_KEY]]);
|
|
2413
2079
|
return layout2 && typeof layout2 === "object" && MODES.has(layout2.mode) ? layout2 : void 0;
|
|
2414
2080
|
}
|
|
2415
2081
|
function isAutoLayoutFrame(node) {
|
|
2416
2082
|
return getAutoLayout(node) !== void 0;
|
|
2417
2083
|
}
|
|
2418
2084
|
function getChildLayout(node) {
|
|
2419
|
-
const child = _optionalChain([node, 'optionalAccess',
|
|
2085
|
+
const child = _optionalChain([node, 'optionalAccess', _59 => _59.data, 'optionalAccess', _60 => _60[CHILD_LAYOUT_DATA_KEY]]);
|
|
2420
2086
|
return child && typeof child === "object" ? child : {};
|
|
2421
2087
|
}
|
|
2422
2088
|
function getLayoutSizing(node, axis) {
|
|
2423
|
-
const value = _nullishCoalesce(_optionalChain([getChildLayout, 'call',
|
|
2089
|
+
const value = _nullishCoalesce(_optionalChain([getChildLayout, 'call', _61 => _61(node), 'access', _62 => _62.sizing, 'optionalAccess', _63 => _63[axis]]), () => ( _optionalChain([getAutoLayout, 'call', _64 => _64(node), 'optionalAccess', _65 => _65.sizing, 'optionalAccess', _66 => _66[axis]])));
|
|
2424
2090
|
return value === "hug" || value === "fill" ? value : "fixed";
|
|
2425
2091
|
}
|
|
2426
2092
|
function limitsOf(node) {
|
|
2427
2093
|
const child = getChildLayout(node);
|
|
2428
2094
|
const layout2 = getAutoLayout(node);
|
|
2429
|
-
const min = _nullishCoalesce(_nullishCoalesce(child.min, () => ( _optionalChain([layout2, 'optionalAccess',
|
|
2430
|
-
const max = _nullishCoalesce(_nullishCoalesce(child.max, () => ( _optionalChain([layout2, 'optionalAccess',
|
|
2095
|
+
const min = _nullishCoalesce(_nullishCoalesce(child.min, () => ( _optionalChain([layout2, 'optionalAccess', _67 => _67.min]))), () => ( {}));
|
|
2096
|
+
const max = _nullishCoalesce(_nullishCoalesce(child.max, () => ( _optionalChain([layout2, 'optionalAccess', _68 => _68.max]))), () => ( {}));
|
|
2431
2097
|
return { minW: min.width, maxW: max.width, minH: min.height, maxH: max.height };
|
|
2432
2098
|
}
|
|
2433
2099
|
function resolvePadding(padding) {
|
|
@@ -2447,13 +2113,13 @@ var LayoutState = (_class3 = class {
|
|
|
2447
2113
|
constructor(nodes, options = {}) {;_class3.prototype.__init8.call(this);_class3.prototype.__init9.call(this);_class3.prototype.__init10.call(this);
|
|
2448
2114
|
this.measure = _nullishCoalesce(options.measure, () => ( {}));
|
|
2449
2115
|
for (const node of nodes) {
|
|
2450
|
-
const size2 = _nullishCoalesce(_optionalChain([this, 'access',
|
|
2116
|
+
const size2 = _nullishCoalesce(_optionalChain([this, 'access', _69 => _69.measure, 'access', _70 => _70.size, 'optionalCall', _71 => _71(node)]), () => ( _chunkUBRYHNRUcjs.getNodeSize.call(void 0, node, options.rectOptions)));
|
|
2451
2117
|
const box = {
|
|
2452
2118
|
id: node.id,
|
|
2453
2119
|
node,
|
|
2454
2120
|
parent: node.parentId,
|
|
2455
|
-
x: finite(_optionalChain([node, 'access',
|
|
2456
|
-
y: finite(_optionalChain([node, 'access',
|
|
2121
|
+
x: finite(_optionalChain([node, 'access', _72 => _72.position, 'optionalAccess', _73 => _73.x])),
|
|
2122
|
+
y: finite(_optionalChain([node, 'access', _74 => _74.position, 'optionalAccess', _75 => _75.y])),
|
|
2457
2123
|
w: finite(size2.width),
|
|
2458
2124
|
h: finite(size2.height),
|
|
2459
2125
|
kids: []
|
|
@@ -2462,7 +2128,7 @@ var LayoutState = (_class3 = class {
|
|
|
2462
2128
|
this.original.set(node.id, { x: box.x, y: box.y, w: box.w, h: box.h });
|
|
2463
2129
|
}
|
|
2464
2130
|
for (const node of nodes) {
|
|
2465
|
-
if (node.parentId && node.parentId !== node.id) _optionalChain([this, 'access',
|
|
2131
|
+
if (node.parentId && node.parentId !== node.id) _optionalChain([this, 'access', _76 => _76.boxes, 'access', _77 => _77.get, 'call', _78 => _78(node.parentId), 'optionalAccess', _79 => _79.kids, 'access', _80 => _80.push, 'call', _81 => _81(node.id)]);
|
|
2466
2132
|
}
|
|
2467
2133
|
}
|
|
2468
2134
|
updates() {
|
|
@@ -2490,7 +2156,7 @@ var LayoutState = (_class3 = class {
|
|
|
2490
2156
|
ancestors(id) {
|
|
2491
2157
|
const out = [];
|
|
2492
2158
|
const seen = /* @__PURE__ */ new Set([id]);
|
|
2493
|
-
let parent = _optionalChain([this, 'access',
|
|
2159
|
+
let parent = _optionalChain([this, 'access', _82 => _82.boxes, 'access', _83 => _83.get, 'call', _84 => _84(id), 'optionalAccess', _85 => _85.parent]);
|
|
2494
2160
|
while (parent && !seen.has(parent) && this.boxes.has(parent)) {
|
|
2495
2161
|
out.push(parent);
|
|
2496
2162
|
seen.add(parent);
|
|
@@ -2528,10 +2194,10 @@ function fitHugText(s, id) {
|
|
|
2528
2194
|
if (getLayoutSizing(b.node, "width") === "hug") {
|
|
2529
2195
|
const w = clampLayoutSize(natural.width, minW, maxW);
|
|
2530
2196
|
const limited = Math.abs(w - natural.width) > EPS;
|
|
2531
|
-
const h = limited ? _nullishCoalesce(_optionalChain([s, 'access',
|
|
2197
|
+
const h = limited ? _nullishCoalesce(_optionalChain([s, 'access', _86 => _86.measure, 'access', _87 => _87.textHeight, 'optionalCall', _88 => _88(b.node, w)]), () => ( natural.height)) : natural.height;
|
|
2532
2198
|
setSize(s, id, w, h);
|
|
2533
2199
|
} else if (getLayoutSizing(b.node, "height") === "hug") {
|
|
2534
|
-
setSize(s, id, b.w, _nullishCoalesce(_optionalChain([s, 'access',
|
|
2200
|
+
setSize(s, id, b.w, _nullishCoalesce(_optionalChain([s, 'access', _89 => _89.measure, 'access', _90 => _90.textHeight, 'optionalCall', _91 => _91(b.node, b.w)]), () => ( b.h)));
|
|
2535
2201
|
}
|
|
2536
2202
|
}
|
|
2537
2203
|
function enforceLimits(s, id) {
|
|
@@ -2549,7 +2215,7 @@ function itemBaseline(s, id, depth2) {
|
|
|
2549
2215
|
const b = s.boxes.get(id);
|
|
2550
2216
|
if (!b) return void 0;
|
|
2551
2217
|
if (isText(s, b)) {
|
|
2552
|
-
const v = _optionalChain([s, 'access',
|
|
2218
|
+
const v = _optionalChain([s, 'access', _92 => _92.measure, 'access', _93 => _93.textBaseline, 'optionalCall', _94 => _94(b.node)]);
|
|
2553
2219
|
return typeof v === "number" && Number.isFinite(v) ? v : void 0;
|
|
2554
2220
|
}
|
|
2555
2221
|
const layout2 = getAutoLayout(b.node);
|
|
@@ -2564,7 +2230,7 @@ function resizeChild(s, id, w, h) {
|
|
|
2564
2230
|
const b = s.boxes.get(id);
|
|
2565
2231
|
if (!b) return;
|
|
2566
2232
|
if (isText(s, b) && getLayoutSizing(b.node, "height") === "hug") {
|
|
2567
|
-
setSize(s, id, w, _nullishCoalesce(_optionalChain([s, 'access',
|
|
2233
|
+
setSize(s, id, w, _nullishCoalesce(_optionalChain([s, 'access', _95 => _95.measure, 'access', _96 => _96.textHeight, 'optionalCall', _97 => _97(b.node, w)]), () => ( h)));
|
|
2568
2234
|
return;
|
|
2569
2235
|
}
|
|
2570
2236
|
const ow = b.w;
|
|
@@ -2811,16 +2477,16 @@ function trackSpec(tracks, i) {
|
|
|
2811
2477
|
return { sizing: t.sizing, value };
|
|
2812
2478
|
}
|
|
2813
2479
|
function cellRect(g, c) {
|
|
2814
|
-
const x0 = _nullishCoalesce(_optionalChain([g, 'access',
|
|
2815
|
-
const x1 = _nullishCoalesce(_optionalChain([g, 'access',
|
|
2816
|
-
const y0 = _nullishCoalesce(_optionalChain([g, 'access',
|
|
2817
|
-
const y1 = _nullishCoalesce(_optionalChain([g, 'access',
|
|
2480
|
+
const x0 = _nullishCoalesce(_optionalChain([g, 'access', _98 => _98.columns, 'access', _99 => _99[c.column], 'optionalAccess', _100 => _100[0]]), () => ( 0));
|
|
2481
|
+
const x1 = _nullishCoalesce(_optionalChain([g, 'access', _101 => _101.columns, 'access', _102 => _102[c.column + c.columnSpan - 1], 'optionalAccess', _103 => _103[1]]), () => ( x0));
|
|
2482
|
+
const y0 = _nullishCoalesce(_optionalChain([g, 'access', _104 => _104.rows, 'access', _105 => _105[c.row], 'optionalAccess', _106 => _106[0]]), () => ( 0));
|
|
2483
|
+
const y1 = _nullishCoalesce(_optionalChain([g, 'access', _107 => _107.rows, 'access', _108 => _108[c.row + c.rowSpan - 1], 'optionalAccess', _109 => _109[1]]), () => ( y0));
|
|
2818
2484
|
return { x: x0, y: y0, width: Math.max(x1, x0) - x0, height: Math.max(y1, y0) - y0 };
|
|
2819
2485
|
}
|
|
2820
2486
|
var toIndex = (v) => typeof v === "number" && Number.isFinite(v) && v >= 0 ? Math.floor(v) : void 0;
|
|
2821
2487
|
function gridPlace(s, al, kids) {
|
|
2822
|
-
const cols = trackList(_optionalChain([al, 'access',
|
|
2823
|
-
const minRows = trackList(_optionalChain([al, 'access',
|
|
2488
|
+
const cols = trackList(_optionalChain([al, 'access', _110 => _110.grid, 'optionalAccess', _111 => _111.columns]), 2).count;
|
|
2489
|
+
const minRows = trackList(_optionalChain([al, 'access', _112 => _112.grid, 'optionalAccess', _113 => _113.rows]), 1).count;
|
|
2824
2490
|
const maxRows = Math.min(Math.max(Math.floor(MAX_GRID_CELLS / cols), 1), MAX_TRACKS);
|
|
2825
2491
|
const occ = [];
|
|
2826
2492
|
const free = (c, r, cs, rs) => {
|
|
@@ -2963,8 +2629,8 @@ function gridGeometryOf(s, frame) {
|
|
|
2963
2629
|
const [pt, pr, pb, pl] = resolvePadding(al.padding);
|
|
2964
2630
|
const kids = flowChildren(s, frame);
|
|
2965
2631
|
const { cells, rows } = gridPlace(s, al, kids);
|
|
2966
|
-
const colSpec = trackList(_optionalChain([al, 'access',
|
|
2967
|
-
const rowSpec = trackList(_optionalChain([al, 'access',
|
|
2632
|
+
const colSpec = trackList(_optionalChain([al, 'access', _114 => _114.grid, 'optionalAccess', _115 => _115.columns]), 2);
|
|
2633
|
+
const rowSpec = trackList(_optionalChain([al, 'access', _116 => _116.grid, 'optionalAccess', _117 => _117.rows]), 1);
|
|
2968
2634
|
const cols = colSpec.count;
|
|
2969
2635
|
const gx = Math.max(finite(al.gap), 0);
|
|
2970
2636
|
const gy = Math.max(al.rowGap !== void 0 ? finite(al.rowGap) : gx, 0);
|
|
@@ -3066,7 +2732,7 @@ function constrain(s, id, ow, oh) {
|
|
|
3066
2732
|
let y1 = c.y + c.h;
|
|
3067
2733
|
const dx = nw - ow;
|
|
3068
2734
|
const dy = nh - oh;
|
|
3069
|
-
switch (_nullishCoalesce(_optionalChain([child, 'access',
|
|
2735
|
+
switch (_nullishCoalesce(_optionalChain([child, 'access', _118 => _118.constraints, 'optionalAccess', _119 => _119.horizontal]), () => ( "left"))) {
|
|
3070
2736
|
case "right":
|
|
3071
2737
|
x0 += dx;
|
|
3072
2738
|
x1 += dx;
|
|
@@ -3083,7 +2749,7 @@ function constrain(s, id, ow, oh) {
|
|
|
3083
2749
|
x1 *= sx;
|
|
3084
2750
|
break;
|
|
3085
2751
|
}
|
|
3086
|
-
switch (_nullishCoalesce(_optionalChain([child, 'access',
|
|
2752
|
+
switch (_nullishCoalesce(_optionalChain([child, 'access', _120 => _120.constraints, 'optionalAccess', _121 => _121.vertical]), () => ( "top"))) {
|
|
3087
2753
|
case "bottom":
|
|
3088
2754
|
y0 += dy;
|
|
3089
2755
|
y1 += dy;
|
|
@@ -3123,7 +2789,7 @@ function postOrder(s, nodes) {
|
|
|
3123
2789
|
const visit = (id) => {
|
|
3124
2790
|
if (seen.has(id)) return;
|
|
3125
2791
|
seen.add(id);
|
|
3126
|
-
for (const k of _nullishCoalesce(_optionalChain([s, 'access',
|
|
2792
|
+
for (const k of _nullishCoalesce(_optionalChain([s, 'access', _122 => _122.boxes, 'access', _123 => _123.get, 'call', _124 => _124(id), 'optionalAccess', _125 => _125.kids]), () => ( []))) visit(k);
|
|
3127
2793
|
out.push(id);
|
|
3128
2794
|
};
|
|
3129
2795
|
const roots = nodes.filter((n3) => !n3.parentId || !s.boxes.has(n3.parentId));
|
|
@@ -3160,14 +2826,14 @@ function getFlowChildren(nodes, frameId) {
|
|
|
3160
2826
|
return nodes.filter((n3) => n3.parentId === frameId && n3.id !== frameId && n3.hidden !== true && !getChildLayout(n3).absolute).map((n3) => n3.id);
|
|
3161
2827
|
}
|
|
3162
2828
|
function getLayoutParent(nodes, id) {
|
|
3163
|
-
const lookup = createNodeLookup(nodes);
|
|
2829
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
3164
2830
|
const node = lookup.get(id);
|
|
3165
|
-
if (!_optionalChain([node, 'optionalAccess',
|
|
2831
|
+
if (!_optionalChain([node, 'optionalAccess', _126 => _126.parentId]) || getChildLayout(node).absolute) return void 0;
|
|
3166
2832
|
const parent = lookup.get(node.parentId);
|
|
3167
2833
|
return isAutoLayoutFrame(parent) ? parent : void 0;
|
|
3168
2834
|
}
|
|
3169
2835
|
function makeSizingCoherent(nodes, id, options = {}) {
|
|
3170
|
-
const lookup = createNodeLookup(nodes);
|
|
2836
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
3171
2837
|
const targets = /* @__PURE__ */ new Set([id, ...nodes.filter((n3) => n3.parentId === id).map((n3) => n3.id)]);
|
|
3172
2838
|
if (!lookup.has(id)) return nodes;
|
|
3173
2839
|
let changed = false;
|
|
@@ -3175,7 +2841,7 @@ function makeSizingCoherent(nodes, id, options = {}) {
|
|
|
3175
2841
|
if (!targets.has(node.id)) return node;
|
|
3176
2842
|
const parent = node.parentId ? lookup.get(node.parentId) : void 0;
|
|
3177
2843
|
const flowParent = parent && isAutoLayoutFrame(parent) && !getChildLayout(node).absolute ? parent : void 0;
|
|
3178
|
-
const canHug = isAutoLayoutFrame(node) || _optionalChain([options, 'access',
|
|
2844
|
+
const canHug = isAutoLayoutFrame(node) || _optionalChain([options, 'access', _127 => _127.measure, 'optionalAccess', _128 => _128.textSize, 'optionalCall', _129 => _129(node)]) !== void 0;
|
|
3179
2845
|
const coherent = (axis) => {
|
|
3180
2846
|
const sizing = getLayoutSizing(node, axis);
|
|
3181
2847
|
if (sizing === "fill" && (!flowParent || getLayoutSizing(flowParent, axis) === "hug")) return "fixed";
|
|
@@ -3195,12 +2861,12 @@ function makeSizingCoherent(nodes, id, options = {}) {
|
|
|
3195
2861
|
return changed ? next : nodes;
|
|
3196
2862
|
}
|
|
3197
2863
|
function getAutoLayoutInsertTarget(nodes, frameId, point, options = {}) {
|
|
3198
|
-
const lookup = createNodeLookup(nodes);
|
|
2864
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
3199
2865
|
const frame = lookup.get(frameId);
|
|
3200
2866
|
const al = getAutoLayout(frame);
|
|
3201
2867
|
if (!frame || !al) return void 0;
|
|
3202
2868
|
const s = new LayoutState(nodes, options);
|
|
3203
|
-
const origin = getAbsolutePosition(frame, lookup);
|
|
2869
|
+
const origin = _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, frame, lookup);
|
|
3204
2870
|
const px2 = point.x - origin.x;
|
|
3205
2871
|
const py = point.y - origin.y;
|
|
3206
2872
|
const siblings = flowChildren(s, frameId).filter((id) => id !== options.excludeId).map((id) => s.boxes.get(id));
|
|
@@ -3238,7 +2904,7 @@ function getAutoLayoutInsertTarget(nodes, frameId, point, options = {}) {
|
|
|
3238
2904
|
}
|
|
3239
2905
|
function moveLayoutChild(nodes, childId, index) {
|
|
3240
2906
|
const child = nodes.find((n3) => n3.id === childId);
|
|
3241
|
-
if (!_optionalChain([child, 'optionalAccess',
|
|
2907
|
+
if (!_optionalChain([child, 'optionalAccess', _130 => _130.parentId])) return nodes;
|
|
3242
2908
|
const siblings = nodes.filter((n3) => n3.parentId === child.parentId && n3.id !== child.parentId);
|
|
3243
2909
|
const flow = siblings.filter((n3) => n3.hidden !== true && !getChildLayout(n3).absolute && n3.id !== childId);
|
|
3244
2910
|
const clamped = Math.min(Math.max(Math.floor(Number.isFinite(index) ? index : 0), 0), flow.length);
|
|
@@ -3286,17 +2952,17 @@ function createCanvasArrangeController(options) {
|
|
|
3286
2952
|
let resizeStart = null;
|
|
3287
2953
|
let resizeIndex = null;
|
|
3288
2954
|
let lastResized = null;
|
|
3289
|
-
const selectedIds = (ids) => ids ? [...ids] : _nullishCoalesce(_optionalChain([options, 'access',
|
|
2955
|
+
const selectedIds = (ids) => ids ? [...ids] : _nullishCoalesce(_optionalChain([options, 'access', _131 => _131.getSelectedIds, 'optionalCall', _132 => _132()]), () => ( options.getNodes().filter((n3) => n3.selected).map((n3) => n3.id)));
|
|
3290
2956
|
const setGuides = (next) => {
|
|
3291
2957
|
if (next.length === 0 && guides.length === 0) return;
|
|
3292
2958
|
guides = next;
|
|
3293
|
-
_optionalChain([options, 'access',
|
|
2959
|
+
_optionalChain([options, 'access', _133 => _133.onGuidesChange, 'optionalCall', _134 => _134(guides)]);
|
|
3294
2960
|
};
|
|
3295
2961
|
function apply(name, updates) {
|
|
3296
2962
|
if (updates.length === 0) return updates;
|
|
3297
2963
|
if (options.autoLayout) {
|
|
3298
2964
|
const layoutOptions = options.autoLayout === true ? { rectOptions: options.rectOptions } : options.autoLayout;
|
|
3299
|
-
const moved = applyNodeUpdates(options.getNodes(), updates);
|
|
2965
|
+
const moved = _chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, options.getNodes(), updates);
|
|
3300
2966
|
const layout2 = layoutUpMany(moved, updates.map((u) => u.id), layoutOptions);
|
|
3301
2967
|
if (layout2.length > 0) {
|
|
3302
2968
|
const byId = /* @__PURE__ */ new Map();
|
|
@@ -3304,8 +2970,8 @@ function createCanvasArrangeController(options) {
|
|
|
3304
2970
|
updates = [...byId.values()];
|
|
3305
2971
|
}
|
|
3306
2972
|
}
|
|
3307
|
-
const inverse = invertNodeUpdates(options.getNodes(), updates);
|
|
3308
|
-
const run = (u) => options.setNodes(applyNodeUpdates(options.getNodes(), u));
|
|
2973
|
+
const inverse = _chunkUBRYHNRUcjs.invertNodeUpdates.call(void 0, options.getNodes(), updates);
|
|
2974
|
+
const run = (u) => options.setNodes(_chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, options.getNodes(), u));
|
|
3309
2975
|
if (options.history) {
|
|
3310
2976
|
options.history.execute({ name, execute: () => run(updates), undo: () => run(inverse) });
|
|
3311
2977
|
} else {
|
|
@@ -3316,10 +2982,10 @@ function createCanvasArrangeController(options) {
|
|
|
3316
2982
|
function setLocked(name, ids, locked) {
|
|
3317
2983
|
const nodes = options.getNodes();
|
|
3318
2984
|
const set = new Set(ids);
|
|
3319
|
-
const changed = nodes.filter((n3) => set.has(n3.id) && isLocked(n3) !== locked).map((n3) => n3.id);
|
|
2985
|
+
const changed = nodes.filter((n3) => set.has(n3.id) && _chunkUBRYHNRUcjs.isLocked.call(void 0, n3) !== locked).map((n3) => n3.id);
|
|
3320
2986
|
if (changed.length === 0) return changed;
|
|
3321
|
-
const lock = () => options.setNodes(lockNodes(options.getNodes(), changed));
|
|
3322
|
-
const unlock = () => options.setNodes(unlockNodes(options.getNodes(), changed));
|
|
2987
|
+
const lock = () => options.setNodes(_chunkUBRYHNRUcjs.lockNodes.call(void 0, options.getNodes(), changed));
|
|
2988
|
+
const unlock = () => options.setNodes(_chunkUBRYHNRUcjs.unlockNodes.call(void 0, options.getNodes(), changed));
|
|
3323
2989
|
if (options.history) {
|
|
3324
2990
|
options.history.execute({ name, execute: locked ? lock : unlock, undo: locked ? unlock : lock });
|
|
3325
2991
|
} else if (locked) lock();
|
|
@@ -3333,22 +2999,22 @@ function createCanvasArrangeController(options) {
|
|
|
3333
2999
|
},
|
|
3334
3000
|
apply,
|
|
3335
3001
|
align(edge, ids, alignOptions = {}) {
|
|
3336
|
-
return apply(`Align ${edge}`, alignNodes(options.getNodes(), selectedIds(ids), edge, { ...rect2(), ...alignOptions }));
|
|
3002
|
+
return apply(`Align ${edge}`, _chunkUBRYHNRUcjs.alignNodes.call(void 0, options.getNodes(), selectedIds(ids), edge, { ...rect2(), ...alignOptions }));
|
|
3337
3003
|
},
|
|
3338
3004
|
distribute(axis, mode = "gaps", ids, distributeOptions = {}) {
|
|
3339
3005
|
return apply(
|
|
3340
3006
|
`Distribute ${axis}`,
|
|
3341
|
-
distributeNodes(options.getNodes(), selectedIds(ids), axis, mode, { ...rect2(), ...distributeOptions })
|
|
3007
|
+
_chunkUBRYHNRUcjs.distributeNodes.call(void 0, options.getNodes(), selectedIds(ids), axis, mode, { ...rect2(), ...distributeOptions })
|
|
3342
3008
|
);
|
|
3343
3009
|
},
|
|
3344
3010
|
matchSize(dimension, ids, sizeOptions = {}) {
|
|
3345
3011
|
return apply(
|
|
3346
3012
|
"Make Same Size",
|
|
3347
|
-
matchSize(options.getNodes(), selectedIds(ids), dimension, { ...rect2(), ...sizeOptions })
|
|
3013
|
+
_chunkUBRYHNRUcjs.matchSize.call(void 0, options.getNodes(), selectedIds(ids), dimension, { ...rect2(), ...sizeOptions })
|
|
3348
3014
|
);
|
|
3349
3015
|
},
|
|
3350
3016
|
reorder(operation, ids) {
|
|
3351
|
-
return apply(operation, reorderNodes(options.getNodes(), selectedIds(ids), operation, rect2()));
|
|
3017
|
+
return apply(operation, _chunkUBRYHNRUcjs.reorderNodes.call(void 0, options.getNodes(), selectedIds(ids), operation, rect2()));
|
|
3352
3018
|
},
|
|
3353
3019
|
bringForward: (ids) => controller.reorder("bringForward", ids),
|
|
3354
3020
|
sendBackward: (ids) => controller.reorder("sendBackward", ids),
|
|
@@ -3359,10 +3025,10 @@ function createCanvasArrangeController(options) {
|
|
|
3359
3025
|
toggleLock(ids) {
|
|
3360
3026
|
const list = selectedIds(ids);
|
|
3361
3027
|
const set = new Set(list);
|
|
3362
|
-
const anyUnlocked = options.getNodes().some((n3) => set.has(n3.id) && !isLocked(n3));
|
|
3028
|
+
const anyUnlocked = options.getNodes().some((n3) => set.has(n3.id) && !_chunkUBRYHNRUcjs.isLocked.call(void 0, n3));
|
|
3363
3029
|
return anyUnlocked ? controller.lock(list) : controller.unlock(list);
|
|
3364
3030
|
},
|
|
3365
|
-
isLocked: (id) => isLocked(options.getNodes().find((n3) => n3.id === id)),
|
|
3031
|
+
isLocked: (id) => _chunkUBRYHNRUcjs.isLocked.call(void 0, options.getNodes().find((n3) => n3.id === id)),
|
|
3366
3032
|
/**
|
|
3367
3033
|
* Freeform shape operation (Unite / Intersect / Subtract / Exclude / Divide) on the
|
|
3368
3034
|
* shape nodes among `ids` (default: the selection). Replaces them with the result as
|
|
@@ -3493,12 +3159,12 @@ function createCanvasArrangeController(options) {
|
|
|
3493
3159
|
const result = snapNodeDrag(options.getNodes(), list, {
|
|
3494
3160
|
...rect2(),
|
|
3495
3161
|
...options.guides,
|
|
3496
|
-
zoom: _nullishCoalesce(_optionalChain([options, 'access',
|
|
3162
|
+
zoom: _nullishCoalesce(_optionalChain([options, 'access', _135 => _135.getZoom, 'optionalCall', _136 => _136()]), () => ( 1)),
|
|
3497
3163
|
index: dragIndex
|
|
3498
3164
|
});
|
|
3499
3165
|
lastSnapped = /* @__PURE__ */ new Map();
|
|
3500
3166
|
if (result.updates.length > 0) {
|
|
3501
|
-
options.setNodes(applyNodeUpdates(options.getNodes(), result.updates));
|
|
3167
|
+
options.setNodes(_chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, options.getNodes(), result.updates));
|
|
3502
3168
|
for (const u of result.updates) if (u.position) lastSnapped.set(u.id, u.position);
|
|
3503
3169
|
}
|
|
3504
3170
|
setGuides(result.guides);
|
|
@@ -3531,7 +3197,7 @@ function createCanvasArrangeController(options) {
|
|
|
3531
3197
|
const result = snapNodeDrag(nodes, ids, {
|
|
3532
3198
|
...rect2(),
|
|
3533
3199
|
...options.guides,
|
|
3534
|
-
zoom: _nullishCoalesce(_optionalChain([options, 'access',
|
|
3200
|
+
zoom: _nullishCoalesce(_optionalChain([options, 'access', _137 => _137.getZoom, 'optionalCall', _138 => _138()]), () => ( 1)),
|
|
3535
3201
|
index: dragIndex
|
|
3536
3202
|
});
|
|
3537
3203
|
setGuides(result.guides);
|
|
@@ -3553,7 +3219,7 @@ function createCanvasArrangeController(options) {
|
|
|
3553
3219
|
*/
|
|
3554
3220
|
beginResize(id) {
|
|
3555
3221
|
const nodes = options.getNodes();
|
|
3556
|
-
const lookup = createNodeLookup(nodes);
|
|
3222
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
3557
3223
|
const node = lookup.get(id);
|
|
3558
3224
|
resizeId = id;
|
|
3559
3225
|
resizeStart = node ? getResizingNodeRect(node, lookup, rect2()) : null;
|
|
@@ -3570,17 +3236,17 @@ function createCanvasArrangeController(options) {
|
|
|
3570
3236
|
resize(id, handle) {
|
|
3571
3237
|
if (resizeId !== id) controller.beginResize(id);
|
|
3572
3238
|
const nodes = options.getNodes();
|
|
3573
|
-
const lookup = createNodeLookup(nodes);
|
|
3239
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
3574
3240
|
const node = lookup.get(id);
|
|
3575
3241
|
if (!node || !resizeStart) return null;
|
|
3576
3242
|
const proposed = getResizingNodeRect(node, lookup, rect2());
|
|
3577
|
-
if (isLocked(node)) {
|
|
3243
|
+
if (_chunkUBRYHNRUcjs.isLocked.call(void 0, node)) {
|
|
3578
3244
|
const start = resizeStart;
|
|
3579
3245
|
const parent = node.parentId ? lookup.get(node.parentId) : void 0;
|
|
3580
3246
|
const origin = parent ? getResizingNodeRect(parent, lookup, rect2()) : { x: 0, y: 0 };
|
|
3581
3247
|
if (proposed.x !== start.x || proposed.y !== start.y || proposed.width !== start.width || proposed.height !== start.height) {
|
|
3582
3248
|
options.setNodes(
|
|
3583
|
-
applyNodeUpdates(nodes, [
|
|
3249
|
+
_chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, nodes, [
|
|
3584
3250
|
{ id, position: { x: start.x - origin.x, y: start.y - origin.y }, width: start.width, height: start.height }
|
|
3585
3251
|
])
|
|
3586
3252
|
);
|
|
@@ -3597,11 +3263,11 @@ function createCanvasArrangeController(options) {
|
|
|
3597
3263
|
...rect2(),
|
|
3598
3264
|
...options.guides,
|
|
3599
3265
|
...options.resize,
|
|
3600
|
-
zoom: _nullishCoalesce(_optionalChain([options, 'access',
|
|
3266
|
+
zoom: _nullishCoalesce(_optionalChain([options, 'access', _139 => _139.getZoom, 'optionalCall', _140 => _140()]), () => ( 1)),
|
|
3601
3267
|
index: resizeIndex
|
|
3602
3268
|
});
|
|
3603
3269
|
lastResized = result.updates.length > 0 ? result : null;
|
|
3604
|
-
if (result.updates.length > 0) options.setNodes(applyNodeUpdates(nodes, result.updates));
|
|
3270
|
+
if (result.updates.length > 0) options.setNodes(_chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, nodes, result.updates));
|
|
3605
3271
|
setGuides(result.guides);
|
|
3606
3272
|
return result;
|
|
3607
3273
|
},
|
|
@@ -3616,12 +3282,12 @@ function createCanvasArrangeController(options) {
|
|
|
3616
3282
|
resizeIndex = null;
|
|
3617
3283
|
lastResized = null;
|
|
3618
3284
|
setGuides([]);
|
|
3619
|
-
const update = _optionalChain([last, 'optionalAccess',
|
|
3285
|
+
const update = _optionalChain([last, 'optionalAccess', _141 => _141.updates, 'access', _142 => _142[0]]);
|
|
3620
3286
|
if (!update) return;
|
|
3621
3287
|
const node = options.getNodes().find((n3) => n3.id === update.id);
|
|
3622
3288
|
if (!node) return;
|
|
3623
3289
|
const drift = node.position.x !== update.position.x || node.position.y !== update.position.y || node.width !== update.width || node.height !== update.height;
|
|
3624
|
-
if (drift) options.setNodes(applyNodeUpdates(options.getNodes(), [update]));
|
|
3290
|
+
if (drift) options.setNodes(_chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, options.getNodes(), [update]));
|
|
3625
3291
|
},
|
|
3626
3292
|
/**
|
|
3627
3293
|
* React Flow style: snaps the `dimensions` (and matching `position`) changes a
|
|
@@ -3636,15 +3302,15 @@ function createCanvasArrangeController(options) {
|
|
|
3636
3302
|
if (!dims) return changes;
|
|
3637
3303
|
const id = dims.id;
|
|
3638
3304
|
const nodes = options.getNodes();
|
|
3639
|
-
const lookup = createNodeLookup(nodes);
|
|
3305
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
3640
3306
|
const node = lookup.get(id);
|
|
3641
3307
|
const isResizeChange = (c) => c.id === id && (c.type === "dimensions" || c.type === "position");
|
|
3642
|
-
if (node && isLocked(node)) {
|
|
3308
|
+
if (node && _chunkUBRYHNRUcjs.isLocked.call(void 0, node)) {
|
|
3643
3309
|
if (dims.resizing === false) controller.endResize();
|
|
3644
3310
|
return changes.filter((c) => !isResizeChange(c));
|
|
3645
3311
|
}
|
|
3646
3312
|
if (dims.resizing === false) {
|
|
3647
|
-
const last = _optionalChain([lastResized, 'optionalAccess',
|
|
3313
|
+
const last = _optionalChain([lastResized, 'optionalAccess', _143 => _143.updates, 'access', _144 => _144[0]]);
|
|
3648
3314
|
lastResized = null;
|
|
3649
3315
|
controller.endResize();
|
|
3650
3316
|
if (!last || last.id !== id) return changes;
|
|
@@ -3658,7 +3324,7 @@ function createCanvasArrangeController(options) {
|
|
|
3658
3324
|
const posChange = changes.find((c) => c.id === id && c.type === "position" && !!c.position);
|
|
3659
3325
|
const parent = node.parentId ? lookup.get(node.parentId) : void 0;
|
|
3660
3326
|
const origin = parent ? getResizingNodeRect(parent, lookup, rect2()) : { x: 0, y: 0 };
|
|
3661
|
-
const position = _nullishCoalesce(_optionalChain([posChange, 'optionalAccess',
|
|
3327
|
+
const position = _nullishCoalesce(_optionalChain([posChange, 'optionalAccess', _145 => _145.position]), () => ( node.position));
|
|
3662
3328
|
const proposed = {
|
|
3663
3329
|
x: position.x + origin.x,
|
|
3664
3330
|
y: position.y + origin.y,
|
|
@@ -3674,7 +3340,7 @@ function createCanvasArrangeController(options) {
|
|
|
3674
3340
|
...rect2(),
|
|
3675
3341
|
...options.guides,
|
|
3676
3342
|
...options.resize,
|
|
3677
|
-
zoom: _nullishCoalesce(_optionalChain([options, 'access',
|
|
3343
|
+
zoom: _nullishCoalesce(_optionalChain([options, 'access', _146 => _146.getZoom, 'optionalCall', _147 => _147()]), () => ( 1)),
|
|
3678
3344
|
index: resizeIndex
|
|
3679
3345
|
});
|
|
3680
3346
|
setGuides(result.guides);
|
|
@@ -3709,7 +3375,7 @@ function createCanvasArrangeController(options) {
|
|
|
3709
3375
|
return !!p && (n3.position.x !== p.x || n3.position.y !== p.y);
|
|
3710
3376
|
});
|
|
3711
3377
|
if (drift) {
|
|
3712
|
-
options.setNodes(applyNodeUpdates(nodes, [...snapped].map(([id, position]) => ({ id, position }))));
|
|
3378
|
+
options.setNodes(_chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, nodes, [...snapped].map(([id, position]) => ({ id, position }))));
|
|
3713
3379
|
}
|
|
3714
3380
|
}
|
|
3715
3381
|
};
|
|
@@ -3810,10 +3476,10 @@ function measureToLine(a, orientation, at) {
|
|
|
3810
3476
|
}
|
|
3811
3477
|
function measureSelection(nodes, selectedIds, hoveredId, options = {}) {
|
|
3812
3478
|
const none = (selection2 = null) => ({ guides: [], target: null, selection: selection2 });
|
|
3813
|
-
const lookup = createNodeLookup(nodes);
|
|
3479
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
3814
3480
|
const selected = [...new Set(selectedIds)].map((id) => lookup.get(id)).filter((n3) => !!n3 && n3.hidden !== true);
|
|
3815
3481
|
if (selected.length === 0) return none();
|
|
3816
|
-
const selection =
|
|
3482
|
+
const selection = _chunkUBRYHNRUcjs.boundsOf.call(void 0, selected.map((n3) => _chunkUBRYHNRUcjs.getNodeRect.call(void 0, n3, lookup, options)));
|
|
3817
3483
|
if (!selection) return none();
|
|
3818
3484
|
const selectedSet = new Set(selected.map((n3) => n3.id));
|
|
3819
3485
|
let targetId = _nullishCoalesce(hoveredId, () => ( null));
|
|
@@ -3824,7 +3490,7 @@ function measureSelection(nodes, selectedIds, hoveredId, options = {}) {
|
|
|
3824
3490
|
}
|
|
3825
3491
|
const target = targetId !== null ? lookup.get(targetId) : void 0;
|
|
3826
3492
|
if (!target || target.hidden === true) return none(selection);
|
|
3827
|
-
const rect2 = getNodeRect(target, lookup, options);
|
|
3493
|
+
const rect2 = _chunkUBRYHNRUcjs.getNodeRect.call(void 0, target, lookup, options);
|
|
3828
3494
|
return { guides: measureBetween(selection, rect2), target: rect2, selection };
|
|
3829
3495
|
}
|
|
3830
3496
|
function isMeasureModifierHeld(event) {
|
|
@@ -3855,21 +3521,21 @@ function createCanvasAutoLayoutController(options) {
|
|
|
3855
3521
|
const setGuides = (next) => {
|
|
3856
3522
|
if (next.length === 0 && guides.length === 0) return;
|
|
3857
3523
|
guides = next;
|
|
3858
|
-
_optionalChain([options, 'access',
|
|
3524
|
+
_optionalChain([options, 'access', _148 => _148.onGuidesChange, 'optionalCall', _149 => _149(guides)]);
|
|
3859
3525
|
};
|
|
3860
3526
|
function run(name, forward, backward, ids, extra = [], restore) {
|
|
3861
3527
|
const before = options.getNodes();
|
|
3862
3528
|
const structural = forward(before);
|
|
3863
|
-
const withExtra = applyNodeUpdates(structural, extra);
|
|
3529
|
+
const withExtra = _chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, structural, extra);
|
|
3864
3530
|
const layout2 = enabled() || name === "Auto Layout" ? relayoutUpdates(withExtra, ids(withExtra), layoutOptions()) : [];
|
|
3865
3531
|
const updates = mergeNodeUpdates(extra, layout2);
|
|
3866
3532
|
if (structural === before && updates.length === 0) return updates;
|
|
3867
|
-
let inverse = invertNodeUpdates(structural, updates);
|
|
3533
|
+
let inverse = _chunkUBRYHNRUcjs.invertNodeUpdates.call(void 0, structural, updates);
|
|
3868
3534
|
if (restore) {
|
|
3869
3535
|
inverse = mergeNodeUpdates(inverse, [{ id: restore.id, position: { ...restore.position } }]);
|
|
3870
3536
|
}
|
|
3871
|
-
const execute = () => options.setNodes(applyNodeUpdates(forward(options.getNodes()), updates));
|
|
3872
|
-
const undo = () => options.setNodes(backward(applyNodeUpdates(options.getNodes(), inverse)));
|
|
3537
|
+
const execute = () => options.setNodes(_chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, forward(options.getNodes()), updates));
|
|
3538
|
+
const undo = () => options.setNodes(backward(_chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, options.getNodes(), inverse)));
|
|
3873
3539
|
if (options.history) options.history.execute({ name, execute, undo });
|
|
3874
3540
|
else execute();
|
|
3875
3541
|
return updates;
|
|
@@ -3901,7 +3567,7 @@ function createCanvasAutoLayoutController(options) {
|
|
|
3901
3567
|
*/
|
|
3902
3568
|
relayout(ids) {
|
|
3903
3569
|
const updates = relayoutUpdates(options.getNodes(), ids, layoutOptions());
|
|
3904
|
-
if (updates.length > 0) options.setNodes(applyNodeUpdates(options.getNodes(), updates));
|
|
3570
|
+
if (updates.length > 0) options.setNodes(_chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, options.getNodes(), updates));
|
|
3905
3571
|
return updates;
|
|
3906
3572
|
},
|
|
3907
3573
|
/**
|
|
@@ -3951,11 +3617,11 @@ function createCanvasAutoLayoutController(options) {
|
|
|
3951
3617
|
const nodes = options.getNodes();
|
|
3952
3618
|
const node = nodes.find((n3) => n3.id === id);
|
|
3953
3619
|
if (!node) return [];
|
|
3954
|
-
const old = getNodeSize(node, options.rectOptions);
|
|
3620
|
+
const old = _chunkUBRYHNRUcjs.getNodeSize.call(void 0, node, options.rectOptions);
|
|
3955
3621
|
const update = { id };
|
|
3956
3622
|
if (size2.width !== void 0) update.width = size2.width;
|
|
3957
3623
|
if (size2.height !== void 0) update.height = size2.height;
|
|
3958
|
-
const resized = applyNodeUpdates(nodes, [update]);
|
|
3624
|
+
const resized = _chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, nodes, [update]);
|
|
3959
3625
|
const constrained = mergeNodeUpdates([update], applyConstraints(resized, id, old, layoutOptions()));
|
|
3960
3626
|
return run("Resize", identity, identity, () => [id], constrained);
|
|
3961
3627
|
},
|
|
@@ -3973,8 +3639,8 @@ function createCanvasAutoLayoutController(options) {
|
|
|
3973
3639
|
const nodes = options.getNodes();
|
|
3974
3640
|
const frame = getLayoutParent(nodes, id);
|
|
3975
3641
|
if (!frame) return void 0;
|
|
3976
|
-
const lookup = createNodeLookup(nodes);
|
|
3977
|
-
const rect2 = getNodeRect(lookup.get(id), lookup, options.rectOptions);
|
|
3642
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
3643
|
+
const rect2 = _chunkUBRYHNRUcjs.getNodeRect.call(void 0, lookup.get(id), lookup, options.rectOptions);
|
|
3978
3644
|
const at = _nullishCoalesce(point, () => ( { x: rect2.x + rect2.width / 2, y: rect2.y + rect2.height / 2 }));
|
|
3979
3645
|
return getAutoLayoutInsertTarget(nodes, frame.id, at, { ...layoutOptions(), excludeId: id });
|
|
3980
3646
|
},
|
|
@@ -4019,13 +3685,13 @@ function createCanvasAutoLayoutController(options) {
|
|
|
4019
3685
|
*/
|
|
4020
3686
|
noteChanges(changes) {
|
|
4021
3687
|
const nodes = options.getNodes();
|
|
4022
|
-
const lookup = createNodeLookup(nodes);
|
|
3688
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
4023
3689
|
for (const c of changes) {
|
|
4024
|
-
const id = _nullishCoalesce(c.id, () => ( _optionalChain([c, 'access',
|
|
3690
|
+
const id = _nullishCoalesce(c.id, () => ( _optionalChain([c, 'access', _150 => _150.item, 'optionalAccess', _151 => _151.id])));
|
|
4025
3691
|
if (c.type === "add" && c.item) {
|
|
4026
3692
|
pendingIds.add(c.item.id);
|
|
4027
3693
|
} else if (c.type === "remove" && id) {
|
|
4028
|
-
const parent = _optionalChain([lookup, 'access',
|
|
3694
|
+
const parent = _optionalChain([lookup, 'access', _152 => _152.get, 'call', _153 => _153(id), 'optionalAccess', _154 => _154.parentId]);
|
|
4029
3695
|
if (parent) pendingIds.add(parent);
|
|
4030
3696
|
else pendingAll = true;
|
|
4031
3697
|
} else if (c.type === "replace" && id) {
|
|
@@ -4033,7 +3699,7 @@ function createCanvasAutoLayoutController(options) {
|
|
|
4033
3699
|
} else if (c.type === "dimensions" && id) {
|
|
4034
3700
|
const node = lookup.get(id);
|
|
4035
3701
|
if (c.resizing === true) {
|
|
4036
|
-
if (node && !resizeStarts.has(id)) resizeStarts.set(id, getNodeSize(node, options.rectOptions));
|
|
3702
|
+
if (node && !resizeStarts.has(id)) resizeStarts.set(id, _chunkUBRYHNRUcjs.getNodeSize.call(void 0, node, options.rectOptions));
|
|
4037
3703
|
continue;
|
|
4038
3704
|
}
|
|
4039
3705
|
const start = resizeStarts.get(id);
|
|
@@ -4089,7 +3755,7 @@ function createCanvasAutoLayoutController(options) {
|
|
|
4089
3755
|
for (const [id, previous] of pendingResizes) {
|
|
4090
3756
|
if (!nodes.some((n3) => n3.id === id)) continue;
|
|
4091
3757
|
const constrained = applyConstraints(nodes, id, previous, layoutOptions());
|
|
4092
|
-
nodes = applyNodeUpdates(nodes, constrained);
|
|
3758
|
+
nodes = _chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, nodes, constrained);
|
|
4093
3759
|
updates = mergeNodeUpdates(updates, constrained);
|
|
4094
3760
|
}
|
|
4095
3761
|
const layout2 = pendingAll ? layoutAll(nodes, layoutOptions()) : relayoutUpdates(nodes, [...pendingIds].filter((id) => nodes.some((n3) => n3.id === id)), layoutOptions());
|
|
@@ -4097,7 +3763,7 @@ function createCanvasAutoLayoutController(options) {
|
|
|
4097
3763
|
pendingIds.clear();
|
|
4098
3764
|
pendingResizes.clear();
|
|
4099
3765
|
pendingAll = false;
|
|
4100
|
-
if (updates.length > 0) options.setNodes(applyNodeUpdates(options.getNodes(), updates));
|
|
3766
|
+
if (updates.length > 0) options.setNodes(_chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, options.getNodes(), updates));
|
|
4101
3767
|
return mergeNodeUpdates(applied, updates);
|
|
4102
3768
|
},
|
|
4103
3769
|
/** Whether `id` is an auto layout frame. */
|
|
@@ -4191,7 +3857,7 @@ function withStyle(node, prop, value, unitless = false) {
|
|
|
4191
3857
|
return { ...node, style: writeNodeStyleProperty(node.style, prop, value, unitless) };
|
|
4192
3858
|
}
|
|
4193
3859
|
function shapeOf(node) {
|
|
4194
|
-
const shape = _optionalChain([node, 'access',
|
|
3860
|
+
const shape = _optionalChain([node, 'access', _155 => _155.data, 'optionalAccess', _156 => _156.shape]);
|
|
4195
3861
|
return _chunkNM3G4VQTcjs.isShapeDescription.call(void 0, shape) ? shape : null;
|
|
4196
3862
|
}
|
|
4197
3863
|
function withShape(node, key, value) {
|
|
@@ -4360,10 +4026,10 @@ function stringRecord(value) {
|
|
|
4360
4026
|
return out;
|
|
4361
4027
|
}
|
|
4362
4028
|
function getNodeTokenBindings(node) {
|
|
4363
|
-
return stringRecord(_optionalChain([node, 'optionalAccess',
|
|
4029
|
+
return stringRecord(_optionalChain([node, 'optionalAccess', _157 => _157.data, 'optionalAccess', _158 => _158[TOKEN_BINDINGS_DATA_KEY]]));
|
|
4364
4030
|
}
|
|
4365
4031
|
function getNodeTokenModes(node) {
|
|
4366
|
-
return stringRecord(_optionalChain([node, 'optionalAccess',
|
|
4032
|
+
return stringRecord(_optionalChain([node, 'optionalAccess', _159 => _159.data, 'optionalAccess', _160 => _160[TOKEN_MODES_DATA_KEY]]));
|
|
4367
4033
|
}
|
|
4368
4034
|
function getCanvasTokenProperty(key, options = {}) {
|
|
4369
4035
|
return (_nullishCoalesce(options.properties, () => ( CANVAS_TOKEN_PROPERTIES))).find((p) => p.key === key);
|
|
@@ -4572,12 +4238,12 @@ function tokenBacked(key, label, type, extra = {}) {
|
|
|
4572
4238
|
...extra,
|
|
4573
4239
|
read: (node) => {
|
|
4574
4240
|
const p = getCanvasTokenProperty(key);
|
|
4575
|
-
const v = _optionalChain([p, 'optionalAccess',
|
|
4241
|
+
const v = _optionalChain([p, 'optionalAccess', _161 => _161.appliesTo, 'call', _162 => _162(node)]) ? p.read(node) : void 0;
|
|
4576
4242
|
return typeof v === "number" || typeof v === "string" ? v : void 0;
|
|
4577
4243
|
},
|
|
4578
4244
|
write: (node, value) => {
|
|
4579
4245
|
const p = getCanvasTokenProperty(key);
|
|
4580
|
-
return _optionalChain([p, 'optionalAccess',
|
|
4246
|
+
return _optionalChain([p, 'optionalAccess', _163 => _163.appliesTo, 'call', _164 => _164(node)]) ? p.write(node, value) : node;
|
|
4581
4247
|
}
|
|
4582
4248
|
};
|
|
4583
4249
|
}
|
|
@@ -4588,15 +4254,15 @@ function sizeProperty(key, label) {
|
|
|
4588
4254
|
type: "number",
|
|
4589
4255
|
min: 0,
|
|
4590
4256
|
unit: "px",
|
|
4591
|
-
read: (node) => _nullishCoalesce(_nullishCoalesce(num(node[key]), () => ( readStyleSize(node.style)[key])), () => ( num(_optionalChain([node, 'access',
|
|
4257
|
+
read: (node) => _nullishCoalesce(_nullishCoalesce(num(node[key]), () => ( _chunkUBRYHNRUcjs.readStyleSize.call(void 0, node.style)[key])), () => ( num(_optionalChain([node, 'access', _165 => _165.measured, 'optionalAccess', _166 => _166[key]])))),
|
|
4592
4258
|
write: (node, value) => {
|
|
4593
4259
|
const v = tidy(Math.max(0, value));
|
|
4594
|
-
return { ...node, [key]: v, style: withStyleSize(node.style, { [key]: v }) };
|
|
4260
|
+
return { ...node, [key]: v, style: _chunkUBRYHNRUcjs.withStyleSize.call(void 0, node.style, { [key]: v }) };
|
|
4595
4261
|
}
|
|
4596
4262
|
};
|
|
4597
4263
|
}
|
|
4598
4264
|
function motionPathPoint(node, progress) {
|
|
4599
|
-
const path = _optionalChain([getNodeAnimation, 'call',
|
|
4265
|
+
const path = _optionalChain([getNodeAnimation, 'call', _167 => _167(node), 'optionalAccess', _168 => _168.motionPath]);
|
|
4600
4266
|
if (!path || typeof path.d !== "string") return null;
|
|
4601
4267
|
try {
|
|
4602
4268
|
const length = _chunkGF2RBSDMcjs.bezierPathLength.call(void 0, path.d);
|
|
@@ -4611,7 +4277,7 @@ var ANIMATABLE_PROPERTIES = [
|
|
|
4611
4277
|
label: "X",
|
|
4612
4278
|
type: "number",
|
|
4613
4279
|
unit: "px",
|
|
4614
|
-
read: (node) => num(_optionalChain([node, 'access',
|
|
4280
|
+
read: (node) => num(_optionalChain([node, 'access', _169 => _169.position, 'optionalAccess', _170 => _170.x])),
|
|
4615
4281
|
write: (node, value) => ({ ...node, position: { ...node.position, x: tidy(value) } })
|
|
4616
4282
|
},
|
|
4617
4283
|
{
|
|
@@ -4619,7 +4285,7 @@ var ANIMATABLE_PROPERTIES = [
|
|
|
4619
4285
|
label: "Y",
|
|
4620
4286
|
type: "number",
|
|
4621
4287
|
unit: "px",
|
|
4622
|
-
read: (node) => num(_optionalChain([node, 'access',
|
|
4288
|
+
read: (node) => num(_optionalChain([node, 'access', _171 => _171.position, 'optionalAccess', _172 => _172.y])),
|
|
4623
4289
|
write: (node, value) => ({ ...node, position: { ...node.position, y: tidy(value) } })
|
|
4624
4290
|
},
|
|
4625
4291
|
sizeProperty("width", "Width"),
|
|
@@ -4672,12 +4338,12 @@ var ANIMATABLE_PROPERTIES = [
|
|
|
4672
4338
|
write: (node, value) => {
|
|
4673
4339
|
const at = motionPathPoint(node, value);
|
|
4674
4340
|
if (!at) return node;
|
|
4675
|
-
const { width, height } = getNodeSize(node);
|
|
4341
|
+
const { width, height } = _chunkUBRYHNRUcjs.getNodeSize.call(void 0, node);
|
|
4676
4342
|
let next = {
|
|
4677
4343
|
...node,
|
|
4678
4344
|
position: { x: tidy(at.point[0] - width / 2), y: tidy(at.point[1] - height / 2) }
|
|
4679
4345
|
};
|
|
4680
|
-
if (_optionalChain([getNodeAnimation, 'call',
|
|
4346
|
+
if (_optionalChain([getNodeAnimation, 'call', _173 => _173(node), 'optionalAccess', _174 => _174.motionPath, 'optionalAccess', _175 => _175.autoRotate])) {
|
|
4681
4347
|
const base = _nullishCoalesce(num(readNodeStyleProperty(node.style, "rotate")), () => ( 0));
|
|
4682
4348
|
next = { ...next, style: writeNodeStyleProperty(next.style, "rotate", `${tidy(base + at.angle * 180 / Math.PI)}deg`) };
|
|
4683
4349
|
}
|
|
@@ -4696,12 +4362,12 @@ function clampAnimationValue(property, value) {
|
|
|
4696
4362
|
return v;
|
|
4697
4363
|
}
|
|
4698
4364
|
function getNodeAnimation(node) {
|
|
4699
|
-
const raw = _optionalChain([node, 'optionalAccess',
|
|
4365
|
+
const raw = _optionalChain([node, 'optionalAccess', _176 => _176.data, 'optionalAccess', _177 => _177[ANIMATION_DATA_KEY]]);
|
|
4700
4366
|
if (typeof raw !== "object" || raw === null || typeof raw.tracks !== "object" || raw.tracks === null) return null;
|
|
4701
4367
|
return raw;
|
|
4702
4368
|
}
|
|
4703
4369
|
function getAnimationTrack(node, property) {
|
|
4704
|
-
const track = _optionalChain([getNodeAnimation, 'call',
|
|
4370
|
+
const track = _optionalChain([getNodeAnimation, 'call', _178 => _178(node), 'optionalAccess', _179 => _179.tracks, 'access', _180 => _180[property]]);
|
|
4705
4371
|
return track && Array.isArray(track.keyframes) && _chunkSVR5FR7Bcjs.normalizeKeyframes.call(void 0, track.keyframes).length > 0 ? track : void 0;
|
|
4706
4372
|
}
|
|
4707
4373
|
function isNodeAnimated(node) {
|
|
@@ -4725,7 +4391,7 @@ function withNodeAnimation(node, animation) {
|
|
|
4725
4391
|
}
|
|
4726
4392
|
}
|
|
4727
4393
|
const data = { ..._nullishCoalesce(node.data, () => ( {})) };
|
|
4728
|
-
if (Object.keys(tracks).length === 0 && !_optionalChain([animation, 'optionalAccess',
|
|
4394
|
+
if (Object.keys(tracks).length === 0 && !_optionalChain([animation, 'optionalAccess', _181 => _181.motionPath])) delete data[ANIMATION_DATA_KEY];
|
|
4729
4395
|
else data[ANIMATION_DATA_KEY] = { ...animation, tracks };
|
|
4730
4396
|
return { ...node, data };
|
|
4731
4397
|
}
|
|
@@ -4756,7 +4422,7 @@ function evaluateAnimation(doc, time, options = {}) {
|
|
|
4756
4422
|
for (const [key, track] of Object.entries(animation.tracks)) {
|
|
4757
4423
|
if (!track || track.enabled === false) continue;
|
|
4758
4424
|
const property = (_nullishCoalesce(options.properties, () => ( ANIMATABLE_PROPERTIES))).find((p) => p.key === key);
|
|
4759
|
-
const value = _chunkSVR5FR7Bcjs.evaluateTrack.call(void 0, track, time, _nullishCoalesce(_optionalChain([property, 'optionalAccess',
|
|
4425
|
+
const value = _chunkSVR5FR7Bcjs.evaluateTrack.call(void 0, track, time, _nullishCoalesce(_optionalChain([property, 'optionalAccess', _182 => _182.type]), () => ( "number")));
|
|
4760
4426
|
if (value === void 0) continue;
|
|
4761
4427
|
(values ??= {})[key] = clampAnimationValue(property, value);
|
|
4762
4428
|
}
|
|
@@ -4802,7 +4468,7 @@ function snapTimeToFrame(time, fps) {
|
|
|
4802
4468
|
return Math.round(Math.round(time / frame) * frame * 1e3) / 1e3;
|
|
4803
4469
|
}
|
|
4804
4470
|
function coerceValue(property, value) {
|
|
4805
|
-
const type = _nullishCoalesce(_optionalChain([property, 'optionalAccess',
|
|
4471
|
+
const type = _nullishCoalesce(_optionalChain([property, 'optionalAccess', _183 => _183.type]), () => ( (typeof value === "string" && _chunkA6QWKBJPcjs.normalizeTokenColor.call(void 0, value) !== null ? "color" : "number")));
|
|
4806
4472
|
if (type === "color") {
|
|
4807
4473
|
const color = _chunkA6QWKBJPcjs.normalizeTokenColor.call(void 0, value);
|
|
4808
4474
|
if (color === null) throw new AnimationEditError("invalid_value", `"${String(value)}" is not a colour.`);
|
|
@@ -4847,7 +4513,7 @@ var Draft = (_class4 = class {
|
|
|
4847
4513
|
if (!animation) {
|
|
4848
4514
|
const current = getNodeAnimation(this.node(id));
|
|
4849
4515
|
const tracks = {};
|
|
4850
|
-
for (const [key, track] of Object.entries(_nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
4516
|
+
for (const [key, track] of Object.entries(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _184 => _184.tracks]), () => ( {})))) {
|
|
4851
4517
|
if (track) tracks[key] = { ...track, keyframes: _chunkSVR5FR7Bcjs.normalizeKeyframes.call(void 0, track.keyframes) };
|
|
4852
4518
|
}
|
|
4853
4519
|
animation = { ..._nullishCoalesce(current, () => ( {})), tracks };
|
|
@@ -4856,7 +4522,7 @@ var Draft = (_class4 = class {
|
|
|
4856
4522
|
return animation;
|
|
4857
4523
|
}
|
|
4858
4524
|
keys(id, property) {
|
|
4859
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
4525
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _185 => _185.animation, 'call', _186 => _186(id), 'access', _187 => _187.tracks, 'access', _188 => _188[property], 'optionalAccess', _189 => _189.keyframes]), () => ( []));
|
|
4860
4526
|
}
|
|
4861
4527
|
track(id, property) {
|
|
4862
4528
|
return this.animation(id).tracks[property];
|
|
@@ -4912,13 +4578,13 @@ function validateRefs(draft, refs, allowEmpty = false) {
|
|
|
4912
4578
|
function readAnimatableValue(node, property) {
|
|
4913
4579
|
const value = property.read(node);
|
|
4914
4580
|
if (value !== void 0) return value;
|
|
4915
|
-
if (property.key === "width" || property.key === "height") return getNodeSize(node)[property.key];
|
|
4581
|
+
if (property.key === "width" || property.key === "height") return _chunkUBRYHNRUcjs.getNodeSize.call(void 0, node)[property.key];
|
|
4916
4582
|
return void 0;
|
|
4917
4583
|
}
|
|
4918
4584
|
function getAnimatedValue(node, propertyKey, time, options = {}) {
|
|
4919
4585
|
const property = getAnimatableProperty(propertyKey, options);
|
|
4920
4586
|
const track = getAnimationTrack(node, propertyKey);
|
|
4921
|
-
if (track && track.enabled !== false) return _chunkSVR5FR7Bcjs.evaluateTrack.call(void 0, track, time, _nullishCoalesce(_optionalChain([property, 'optionalAccess',
|
|
4587
|
+
if (track && track.enabled !== false) return _chunkSVR5FR7Bcjs.evaluateTrack.call(void 0, track, time, _nullishCoalesce(_optionalChain([property, 'optionalAccess', _190 => _190.type]), () => ( "number")));
|
|
4922
4588
|
return property ? readAnimatableValue(node, property) : void 0;
|
|
4923
4589
|
}
|
|
4924
4590
|
function putKey(draft, nodeId, property, time, value, easing, inherit = true) {
|
|
@@ -4928,7 +4594,7 @@ function putKey(draft, nodeId, property, time, value, easing, inherit = true) {
|
|
|
4928
4594
|
keys[at] = { ...keys[at], value, ...easing !== void 0 ? { easing } : {} };
|
|
4929
4595
|
} else {
|
|
4930
4596
|
const before = [...keys].reverse().find((k) => k.time < time);
|
|
4931
|
-
const inherited = _nullishCoalesce(easing, () => ( (inherit ? _optionalChain([before, 'optionalAccess',
|
|
4597
|
+
const inherited = _nullishCoalesce(easing, () => ( (inherit ? _optionalChain([before, 'optionalAccess', _191 => _191.easing]) : void 0)));
|
|
4932
4598
|
keys.push({ time, value, ...inherited !== void 0 ? { easing: inherited } : {} });
|
|
4933
4599
|
}
|
|
4934
4600
|
draft.setKeys(nodeId, property, keys);
|
|
@@ -5098,7 +4764,7 @@ function getKeyframeTimes(nodes, options = {}) {
|
|
|
5098
4764
|
if (!animation) continue;
|
|
5099
4765
|
for (const [property, track] of Object.entries(animation.tracks)) {
|
|
5100
4766
|
const skip = _nullishCoalesce(excluded.get(refKey({ nodeId: node.id, property })), () => ( []));
|
|
5101
|
-
for (const k of _chunkSVR5FR7Bcjs.normalizeKeyframes.call(void 0, _optionalChain([track, 'optionalAccess',
|
|
4767
|
+
for (const k of _chunkSVR5FR7Bcjs.normalizeKeyframes.call(void 0, _optionalChain([track, 'optionalAccess', _192 => _192.keyframes]))) if (!skip.some((t) => sameTime(t, k.time))) times.push(k.time);
|
|
5102
4768
|
}
|
|
5103
4769
|
}
|
|
5104
4770
|
times.sort((a, b) => a - b);
|
|
@@ -5204,7 +4870,7 @@ function recordAnimationChanges(base, before, after, time, options = {}) {
|
|
|
5204
4870
|
const animation = getNodeAnimation(stored);
|
|
5205
4871
|
let result = next;
|
|
5206
4872
|
let tracks = null;
|
|
5207
|
-
const tracksOf = () => tracks ??= { ..._nullishCoalesce(_optionalChain([animation, 'optionalAccess',
|
|
4873
|
+
const tracksOf = () => tracks ??= { ..._nullishCoalesce(_optionalChain([animation, 'optionalAccess', _193 => _193.tracks]), () => ( {})) };
|
|
5208
4874
|
for (const p of properties) {
|
|
5209
4875
|
const track = getAnimationTrack(stored, p.key);
|
|
5210
4876
|
const animated = !!track && track.enabled !== false;
|
|
@@ -5219,7 +4885,7 @@ function recordAnimationChanges(base, before, after, time, options = {}) {
|
|
|
5219
4885
|
if (changed) {
|
|
5220
4886
|
const keys = _chunkSVR5FR7Bcjs.normalizeKeyframes.call(void 0, track.keyframes).filter((k) => !sameTime(k.time, t));
|
|
5221
4887
|
const before2 = [...keys].reverse().find((k) => k.time < t);
|
|
5222
|
-
keys.push({ time: t, value: now, ..._optionalChain([before2, 'optionalAccess',
|
|
4888
|
+
keys.push({ time: t, value: now, ..._optionalChain([before2, 'optionalAccess', _194 => _194.easing]) !== void 0 ? { easing: before2.easing } : {} });
|
|
5223
4889
|
tracksOf()[p.key] = { ...track, keyframes: keys.sort((a, b) => a.time - b.time) };
|
|
5224
4890
|
keyed.push({ nodeId: next.id, property: p.key, time: t });
|
|
5225
4891
|
}
|
|
@@ -5251,10 +4917,10 @@ function animateNode(nodes, nodeId, options) {
|
|
|
5251
4917
|
const writes = [];
|
|
5252
4918
|
for (const [key, target] of entries) {
|
|
5253
4919
|
const p = draft.property(key);
|
|
5254
|
-
if (!p || key === "motionPath" && !_optionalChain([getNodeAnimation, 'call',
|
|
4920
|
+
if (!p || key === "motionPath" && !_optionalChain([getNodeAnimation, 'call', _195 => _195(node), 'optionalAccess', _196 => _196.motionPath])) {
|
|
5255
4921
|
throw new AnimationEditError("unknown_property", `"${key}" cannot be animated${p ? " without a motion path" : ""}.`);
|
|
5256
4922
|
}
|
|
5257
|
-
const from = _nullishCoalesce(_optionalChain([options, 'access',
|
|
4923
|
+
const from = _nullishCoalesce(_optionalChain([options, 'access', _197 => _197.from, 'optionalAccess', _198 => _198[key]]), () => ( (key === "motionPath" ? 0 : getAnimatedValue(node, key, start, options))));
|
|
5258
4924
|
if (from === void 0) throw new AnimationEditError("invalid_value", `"${nodeId}" has no ${key} to animate from; pass "from".`);
|
|
5259
4925
|
writes.push([key, coerceValue(p, from), coerceValue(p, target)]);
|
|
5260
4926
|
}
|
|
@@ -5356,7 +5022,7 @@ function getCssPropertyAnimations(nodes, nodeId, options = {}) {
|
|
|
5356
5022
|
const keys = _chunkSVR5FR7Bcjs.normalizeKeyframes.call(void 0, track.keyframes);
|
|
5357
5023
|
if (keys.length > 0) tracks.set(key, keys);
|
|
5358
5024
|
}
|
|
5359
|
-
const typeOf = (key) => _nullishCoalesce(_optionalChain([ANIMATABLE_PROPERTIES, 'access',
|
|
5025
|
+
const typeOf = (key) => _nullishCoalesce(_optionalChain([ANIMATABLE_PROPERTIES, 'access', _199 => _199.find, 'call', _200 => _200((p) => p.key === key), 'optionalAccess', _201 => _201.type]), () => ( "number"));
|
|
5360
5026
|
const groups = /* @__PURE__ */ new Map();
|
|
5361
5027
|
for (const key of tracks.keys()) {
|
|
5362
5028
|
const css = map[key].css;
|
|
@@ -5464,7 +5130,7 @@ function isCssExportExact(nodes, nodeId) {
|
|
|
5464
5130
|
function isKeyframeSelected(selection, ref) {
|
|
5465
5131
|
return selection.some((s) => s.nodeId === ref.nodeId && s.property === ref.property && Math.abs(s.time - ref.time) <= _chunkSVR5FR7Bcjs.ANIMATION_TIME_EPSILON);
|
|
5466
5132
|
}
|
|
5467
|
-
var defaultLabel = (node) => typeof _optionalChain([node, 'access',
|
|
5133
|
+
var defaultLabel = (node) => typeof _optionalChain([node, 'access', _202 => _202.data, 'optionalAccess', _203 => _203.label]) === "string" && node.data.label.trim() ? node.data.label : node.id;
|
|
5468
5134
|
function getTimelineRows(nodes, ids, options = {}) {
|
|
5469
5135
|
const byId = new Map(nodes.map((n3) => [n3.id, n3]));
|
|
5470
5136
|
const selection = _nullishCoalesce(options.selection, () => ( []));
|
|
@@ -5475,7 +5141,7 @@ function getTimelineRows(nodes, ids, options = {}) {
|
|
|
5475
5141
|
if (!node) continue;
|
|
5476
5142
|
for (const property of getAnimatedProperties(node, options)) {
|
|
5477
5143
|
const track = getAnimationTrack(node, property);
|
|
5478
|
-
const label = _nullishCoalesce(_optionalChain([(_nullishCoalesce(options.properties, () => ( ANIMATABLE_PROPERTIES))), 'access',
|
|
5144
|
+
const label = _nullishCoalesce(_optionalChain([(_nullishCoalesce(options.properties, () => ( ANIMATABLE_PROPERTIES))), 'access', _204 => _204.find, 'call', _205 => _205((p) => p.key === property), 'optionalAccess', _206 => _206.label]), () => ( property));
|
|
5479
5145
|
rows.push({
|
|
5480
5146
|
id: `${id}:${property}`,
|
|
5481
5147
|
nodeId: id,
|
|
@@ -5548,7 +5214,7 @@ function createCanvasAnimationController(options) {
|
|
|
5548
5214
|
duration,
|
|
5549
5215
|
loop: options.loop,
|
|
5550
5216
|
playbackRate: options.playbackRate,
|
|
5551
|
-
onTime: (time) => _optionalChain([options, 'access',
|
|
5217
|
+
onTime: (time) => _optionalChain([options, 'access', _207 => _207.onTime, 'optionalCall', _208 => _208(time)])
|
|
5552
5218
|
});
|
|
5553
5219
|
let cached = null;
|
|
5554
5220
|
const snapshot = () => ({
|
|
@@ -5570,18 +5236,18 @@ function createCanvasAnimationController(options) {
|
|
|
5570
5236
|
};
|
|
5571
5237
|
const notify = () => {
|
|
5572
5238
|
const state = getState();
|
|
5573
|
-
_optionalChain([options, 'access',
|
|
5239
|
+
_optionalChain([options, 'access', _209 => _209.onChange, 'optionalCall', _210 => _210(state)]);
|
|
5574
5240
|
for (const listener of listeners) listener(state);
|
|
5575
5241
|
};
|
|
5576
5242
|
player.subscribe(notify);
|
|
5577
|
-
const selectedIds = () => _nullishCoalesce(_optionalChain([options, 'access',
|
|
5243
|
+
const selectedIds = () => _nullishCoalesce(_optionalChain([options, 'access', _211 => _211.getSelectedIds, 'optionalCall', _212 => _212()]), () => ( options.getNodes().filter((n3) => n3.selected).map((n3) => n3.id)));
|
|
5578
5244
|
const KEEP_FIELDS = ["selected", "dragging", "measured"];
|
|
5579
5245
|
const replaceNodes = (nodes, replacements, animationOnly = false) => nodes.map((node) => {
|
|
5580
5246
|
const replacement = replacements.get(node.id);
|
|
5581
5247
|
if (!replacement) return node;
|
|
5582
5248
|
if (animationOnly) {
|
|
5583
5249
|
const data = { ..._nullishCoalesce(node.data, () => ( {})) };
|
|
5584
|
-
const value = _optionalChain([replacement, 'access',
|
|
5250
|
+
const value = _optionalChain([replacement, 'access', _213 => _213.data, 'optionalAccess', _214 => _214[ANIMATION_DATA_KEY]]);
|
|
5585
5251
|
if (value === void 0) delete data[ANIMATION_DATA_KEY];
|
|
5586
5252
|
else data[ANIMATION_DATA_KEY] = value;
|
|
5587
5253
|
return { ...node, data };
|
|
@@ -5608,7 +5274,7 @@ function createCanvasAnimationController(options) {
|
|
|
5608
5274
|
}
|
|
5609
5275
|
}
|
|
5610
5276
|
if (redoMap.size === 0) return false;
|
|
5611
|
-
const scope = _nullishCoalesce(_optionalChain([merge, 'optionalAccess',
|
|
5277
|
+
const scope = _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _215 => _215.animationOnly]), () => ( false));
|
|
5612
5278
|
const execute = () => options.setNodes(replaceNodes(options.getNodes(), redoMap, scope));
|
|
5613
5279
|
const undo = () => options.setNodes(replaceNodes(options.getNodes(), undoMap, scope));
|
|
5614
5280
|
const command = { name, execute, undo, ...merge ? { tag: merge.tag } : {} };
|
|
@@ -5621,7 +5287,7 @@ function createCanvasAnimationController(options) {
|
|
|
5621
5287
|
if (selection.length === 0) return;
|
|
5622
5288
|
const byId = new Map(options.getNodes().map((n3) => [n3.id, n3]));
|
|
5623
5289
|
const kept = selection.filter((ref) => {
|
|
5624
|
-
const track = _optionalChain([getNodeAnimation, 'call',
|
|
5290
|
+
const track = _optionalChain([getNodeAnimation, 'call', _216 => _216(byId.get(ref.nodeId)), 'optionalAccess', _217 => _217.tracks, 'access', _218 => _218[ref.property]]);
|
|
5625
5291
|
return !!track && _chunkSVR5FR7Bcjs.normalizeKeyframes.call(void 0, track.keyframes).some((k) => Math.abs(k.time - ref.time) <= _chunkSVR5FR7Bcjs.ANIMATION_TIME_EPSILON);
|
|
5626
5292
|
});
|
|
5627
5293
|
if (kept.length !== selection.length) selection = kept;
|
|
@@ -5728,13 +5394,13 @@ function createCanvasAnimationController(options) {
|
|
|
5728
5394
|
const baseById = new Map(base.map((n3) => [n3.id, n3]));
|
|
5729
5395
|
const staticNodes = nodes.map((n3) => {
|
|
5730
5396
|
if (!ids.has(n3.id)) return n3;
|
|
5731
|
-
const old = _optionalChain([baseById, 'access',
|
|
5397
|
+
const old = _optionalChain([baseById, 'access', _219 => _219.get, 'call', _220 => _220(n3.id), 'optionalAccess', _221 => _221.data, 'optionalAccess', _222 => _222[ANIMATION_DATA_KEY]]);
|
|
5732
5398
|
const data = { ..._nullishCoalesce(n3.data, () => ( {})) };
|
|
5733
5399
|
if (old === void 0) delete data[ANIMATION_DATA_KEY];
|
|
5734
5400
|
else data[ANIMATION_DATA_KEY] = old;
|
|
5735
5401
|
return { ...n3, data };
|
|
5736
5402
|
});
|
|
5737
|
-
const animationOf = new Map(nodes.filter((n3) => ids.has(n3.id)).map((n3) => [n3.id, _optionalChain([n3, 'access',
|
|
5403
|
+
const animationOf = new Map(nodes.filter((n3) => ids.has(n3.id)).map((n3) => [n3.id, _optionalChain([n3, 'access', _223 => _223.data, 'optionalAccess', _224 => _224[ANIMATION_DATA_KEY]])]));
|
|
5738
5404
|
options.setNodes(staticNodes);
|
|
5739
5405
|
const tag = `animation.record:${[...ids].sort().join(",")}`;
|
|
5740
5406
|
commit(
|
|
@@ -5936,7 +5602,7 @@ function createCanvasAnimationController(options) {
|
|
|
5936
5602
|
// ----- views & export ---------------------------------------------------------------
|
|
5937
5603
|
/** Timeline rows for `ids` (default: selected nodes), including the drag preview. */
|
|
5938
5604
|
timelineRows(ids = selectedIds(), opts = {}) {
|
|
5939
|
-
return getTimelineRows(options.getNodes(), ids, { ...propertyOptions(), ...opts, selection, dragDelta: _nullishCoalesce(_optionalChain([drag, 'optionalAccess',
|
|
5605
|
+
return getTimelineRows(options.getNodes(), ids, { ...propertyOptions(), ...opts, selection, dragDelta: _nullishCoalesce(_optionalChain([drag, 'optionalAccess', _225 => _225.delta]), () => ( 0)) });
|
|
5940
5606
|
},
|
|
5941
5607
|
sampleFrames(opts = {}) {
|
|
5942
5608
|
return sampleAnimationFrames(options.getNodes(), { fps, duration: duration(), ...propertyOptions(), ...opts });
|
|
@@ -5966,7 +5632,7 @@ var COMPONENT_OVERRIDES_DATA_KEY = "componentOverrides";
|
|
|
5966
5632
|
var COMPONENT_PROPERTY_REFS_DATA_KEY = "componentPropertyRefs";
|
|
5967
5633
|
var MAX_DEPTH = 16;
|
|
5968
5634
|
var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
5969
|
-
var dataOf = (node) => isRecord(_optionalChain([node, 'optionalAccess',
|
|
5635
|
+
var dataOf = (node) => isRecord(_optionalChain([node, 'optionalAccess', _226 => _226.data])) ? node.data : {};
|
|
5970
5636
|
function same(a, b) {
|
|
5971
5637
|
if (a === b) return true;
|
|
5972
5638
|
if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) {
|
|
@@ -6020,7 +5686,7 @@ function getComponentPropertyRefs(node) {
|
|
|
6020
5686
|
function getLayerName(node) {
|
|
6021
5687
|
const d = dataOf(node);
|
|
6022
5688
|
for (const key of ["name", "label", "text"]) if (typeof d[key] === "string" && d[key]) return d[key];
|
|
6023
|
-
return typeof _optionalChain([node, 'optionalAccess',
|
|
5689
|
+
return typeof _optionalChain([node, 'optionalAccess', _227 => _227.type]) === "string" ? node.type : "";
|
|
6024
5690
|
}
|
|
6025
5691
|
function withData(node, data) {
|
|
6026
5692
|
return { ...node, data };
|
|
@@ -6096,7 +5762,7 @@ function styleKeys(style) {
|
|
|
6096
5762
|
return parseNodeStyleDeclarations(style).map(([k]) => camel(k));
|
|
6097
5763
|
}
|
|
6098
5764
|
function sizeOf(node) {
|
|
6099
|
-
const s = readStyleSize(node.style);
|
|
5765
|
+
const s = _chunkUBRYHNRUcjs.readStyleSize.call(void 0, node.style);
|
|
6100
5766
|
return { width: node.width, height: node.height, styleWidth: s.width, styleHeight: s.height };
|
|
6101
5767
|
}
|
|
6102
5768
|
var splitGroup = (group) => {
|
|
@@ -6113,9 +5779,9 @@ function readOverrideGroup(node, group) {
|
|
|
6113
5779
|
case "size":
|
|
6114
5780
|
return sizeOf(node);
|
|
6115
5781
|
case "component":
|
|
6116
|
-
return _optionalChain([getInstanceData, 'call',
|
|
5782
|
+
return _optionalChain([getInstanceData, 'call', _228 => _228(node), 'optionalAccess', _229 => _229.componentId]);
|
|
6117
5783
|
case "props":
|
|
6118
|
-
return _nullishCoalesce(_optionalChain([getInstanceData, 'call',
|
|
5784
|
+
return _nullishCoalesce(_optionalChain([getInstanceData, 'call', _230 => _230(node), 'optionalAccess', _231 => _231.properties]), () => ( {}));
|
|
6119
5785
|
}
|
|
6120
5786
|
const [kind, key] = splitGroup(group);
|
|
6121
5787
|
switch (kind) {
|
|
@@ -6137,7 +5803,7 @@ function withSize(node, value) {
|
|
|
6137
5803
|
else next.width = v.width;
|
|
6138
5804
|
if (v.height === void 0) delete next.height;
|
|
6139
5805
|
else next.height = v.height;
|
|
6140
|
-
const current = readStyleSize(node.style);
|
|
5806
|
+
const current = _chunkUBRYHNRUcjs.readStyleSize.call(void 0, node.style);
|
|
6141
5807
|
let style = node.style;
|
|
6142
5808
|
if (v.styleWidth !== current.width) style = writeNodeStyleProperty(style, "width", v.styleWidth);
|
|
6143
5809
|
if (v.styleHeight !== current.height) style = writeNodeStyleProperty(style, "height", v.styleHeight);
|
|
@@ -6295,12 +5961,12 @@ var Graph = (_class5 = class {
|
|
|
6295
5961
|
return out;
|
|
6296
5962
|
}
|
|
6297
5963
|
}, _class5);
|
|
6298
|
-
var owningComponentIn = (g, id) => _optionalChain([g, 'access',
|
|
6299
|
-
var owningInstanceIn = (g, id) => _optionalChain([g, 'access',
|
|
6300
|
-
var enclosingInstanceIn = (g, id) => _optionalChain([g, 'access',
|
|
5964
|
+
var owningComponentIn = (g, id) => _optionalChain([g, 'access', _232 => _232.chain, 'call', _233 => _233(id), 'access', _234 => _234.find, 'call', _235 => _235(isCanvasComponent), 'optionalAccess', _236 => _236.id]);
|
|
5965
|
+
var owningInstanceIn = (g, id) => _optionalChain([g, 'access', _237 => _237.chain, 'call', _238 => _238(id), 'access', _239 => _239.find, 'call', _240 => _240(isCanvasInstance), 'optionalAccess', _241 => _241.id]);
|
|
5966
|
+
var enclosingInstanceIn = (g, id) => _optionalChain([g, 'access', _242 => _242.chain, 'call', _243 => _243(id, false), 'access', _244 => _244.find, 'call', _245 => _245(isCanvasInstance), 'optionalAccess', _246 => _246.id]);
|
|
6301
5967
|
function rootInstanceIn(g, id) {
|
|
6302
5968
|
const list = g.chain(id).filter(isCanvasInstance);
|
|
6303
|
-
return _optionalChain([list, 'access',
|
|
5969
|
+
return _optionalChain([list, 'access', _247 => _247[list.length - 1], 'optionalAccess', _248 => _248.id]);
|
|
6304
5970
|
}
|
|
6305
5971
|
function variantSetIn(g, componentId) {
|
|
6306
5972
|
const comp = g.get(componentId);
|
|
@@ -6309,7 +5975,7 @@ function variantSetIn(g, componentId) {
|
|
|
6309
5975
|
return isCanvasComponentSet(parent) ? parent : void 0;
|
|
6310
5976
|
}
|
|
6311
5977
|
function getVariantValues(node) {
|
|
6312
|
-
const explicit = _optionalChain([getComponentData, 'call',
|
|
5978
|
+
const explicit = _optionalChain([getComponentData, 'call', _249 => _249(node), 'optionalAccess', _250 => _250.variant]);
|
|
6313
5979
|
if (isRecord(explicit) && Object.keys(explicit).length) return stringRecord2(explicit);
|
|
6314
5980
|
const name = getLayerName(node);
|
|
6315
5981
|
return name.includes("=") ? parseVariantName(name) : {};
|
|
@@ -6352,7 +6018,7 @@ function defaultVariantIn(g, setId) {
|
|
|
6352
6018
|
best = { key, id: v.id };
|
|
6353
6019
|
}
|
|
6354
6020
|
}
|
|
6355
|
-
return _optionalChain([best, 'optionalAccess',
|
|
6021
|
+
return _optionalChain([best, 'optionalAccess', _251 => _251.id]);
|
|
6356
6022
|
}
|
|
6357
6023
|
function findVariantIn(g, setId, wanted) {
|
|
6358
6024
|
const entries = Object.entries(wanted);
|
|
@@ -6363,7 +6029,7 @@ function findVariantIn(g, setId, wanted) {
|
|
|
6363
6029
|
if (score === entries.length) return v.id;
|
|
6364
6030
|
if (!best || score > best.score) best = { score, id: v.id };
|
|
6365
6031
|
}
|
|
6366
|
-
return _optionalChain([best, 'optionalAccess',
|
|
6032
|
+
return _optionalChain([best, 'optionalAccess', _252 => _252.id]);
|
|
6367
6033
|
}
|
|
6368
6034
|
function mainOfIn(g, id) {
|
|
6369
6035
|
const node = g.get(id);
|
|
@@ -6377,7 +6043,7 @@ function propertyDefsIn(g, componentId) {
|
|
|
6377
6043
|
if (!isCanvasComponent(comp)) return {};
|
|
6378
6044
|
const set = variantSetIn(g, componentId);
|
|
6379
6045
|
const owner = set ? dataOf(set)[COMPONENT_SET_DATA_KEY] : dataOf(comp)[COMPONENT_DATA_KEY];
|
|
6380
|
-
return isRecord(_optionalChain([owner, 'optionalAccess',
|
|
6046
|
+
return isRecord(_optionalChain([owner, 'optionalAccess', _253 => _253.properties])) ? owner.properties : {};
|
|
6381
6047
|
}
|
|
6382
6048
|
function validValue(def, v) {
|
|
6383
6049
|
return def.type === "boolean" ? typeof v === "boolean" : typeof v === "string";
|
|
@@ -6385,7 +6051,7 @@ function validValue(def, v) {
|
|
|
6385
6051
|
function effectivePropsIn(g, componentId, values) {
|
|
6386
6052
|
const out = {};
|
|
6387
6053
|
for (const [k, def] of Object.entries(propertyDefsIn(g, componentId))) {
|
|
6388
|
-
const v = _optionalChain([values, 'optionalAccess',
|
|
6054
|
+
const v = _optionalChain([values, 'optionalAccess', _254 => _254[k]]);
|
|
6389
6055
|
out[k] = v !== void 0 && validValue(def, v) ? v : def.default;
|
|
6390
6056
|
}
|
|
6391
6057
|
return out;
|
|
@@ -6396,7 +6062,7 @@ function componentDepsIn(g, componentId) {
|
|
|
6396
6062
|
while (queue.length) {
|
|
6397
6063
|
const c = queue.pop();
|
|
6398
6064
|
for (const id of g.subtree(c)) {
|
|
6399
|
-
const target = _optionalChain([getInstanceData, 'call',
|
|
6065
|
+
const target = _optionalChain([getInstanceData, 'call', _255 => _255(g.get(id)), 'optionalAccess', _256 => _256.componentId]);
|
|
6400
6066
|
if (target && !deps.has(target)) {
|
|
6401
6067
|
deps.add(target);
|
|
6402
6068
|
queue.push(target);
|
|
@@ -6430,7 +6096,7 @@ function isInsideInstance(nodes, id) {
|
|
|
6430
6096
|
return enclosingInstanceIn(new Graph(nodes), id) !== void 0;
|
|
6431
6097
|
}
|
|
6432
6098
|
function getComponentInstances(nodes, componentId) {
|
|
6433
|
-
return nodes.filter((n3) => _optionalChain([getInstanceData, 'call',
|
|
6099
|
+
return nodes.filter((n3) => _optionalChain([getInstanceData, 'call', _257 => _257(n3), 'optionalAccess', _258 => _258.componentId]) === componentId).map((n3) => n3.id);
|
|
6434
6100
|
}
|
|
6435
6101
|
function getInstanceStatus(nodes, id) {
|
|
6436
6102
|
const g = new Graph(nodes);
|
|
@@ -6439,7 +6105,7 @@ function getInstanceStatus(nodes, id) {
|
|
|
6439
6105
|
return isCanvasComponent(g.get(inst.componentId)) ? "linked" : "missing-main";
|
|
6440
6106
|
}
|
|
6441
6107
|
function getVariantSet(nodes, componentId) {
|
|
6442
|
-
return _optionalChain([variantSetIn, 'call',
|
|
6108
|
+
return _optionalChain([variantSetIn, 'call', _259 => _259(new Graph(nodes), componentId), 'optionalAccess', _260 => _260.id]);
|
|
6443
6109
|
}
|
|
6444
6110
|
function getVariantOptions(nodes, setId) {
|
|
6445
6111
|
return variantOptionsIn(new Graph(nodes), setId);
|
|
@@ -6470,7 +6136,7 @@ function listCanvasComponents(nodes) {
|
|
|
6470
6136
|
const g = new Graph(nodes);
|
|
6471
6137
|
const counts = /* @__PURE__ */ new Map();
|
|
6472
6138
|
for (const n3 of nodes) {
|
|
6473
|
-
const c = _optionalChain([getInstanceData, 'call',
|
|
6139
|
+
const c = _optionalChain([getInstanceData, 'call', _261 => _261(n3), 'optionalAccess', _262 => _262.componentId]);
|
|
6474
6140
|
if (c) counts.set(c, (_nullishCoalesce(counts.get(c), () => ( 0))) + 1);
|
|
6475
6141
|
}
|
|
6476
6142
|
const components = [];
|
|
@@ -6576,7 +6242,7 @@ function rootReference(g, comp) {
|
|
|
6576
6242
|
return "label" in dataOf(comp) && typeof label === "string" ? withData(comp, { ...dataOf(comp), label }) : comp;
|
|
6577
6243
|
}
|
|
6578
6244
|
function fixMeasured(node, old) {
|
|
6579
|
-
const measured2 = _nullishCoalesce(_optionalChain([old, 'optionalAccess',
|
|
6245
|
+
const measured2 = _nullishCoalesce(_optionalChain([old, 'optionalAccess', _263 => _263.measured]), () => ( node.measured));
|
|
6580
6246
|
const size2 = sizeOf(node);
|
|
6581
6247
|
const w = _nullishCoalesce(size2.width, () => ( size2.styleWidth));
|
|
6582
6248
|
const h = _nullishCoalesce(size2.height, () => ( size2.styleHeight));
|
|
@@ -6769,10 +6435,10 @@ function buildInstance(g, instId, opts, taken) {
|
|
|
6769
6435
|
if (nested && depth2 < MAX_DEPTH) {
|
|
6770
6436
|
const target = nested.componentId;
|
|
6771
6437
|
instProps.set(id, effectivePropsIn(g, target, nested.properties));
|
|
6772
|
-
if (_optionalChain([getInstanceData, 'call',
|
|
6438
|
+
if (_optionalChain([getInstanceData, 'call', _264 => _264(s), 'optionalAccess', _265 => _265.componentId]) !== target) {
|
|
6773
6439
|
const main = g.get(target);
|
|
6774
6440
|
if (isCanvasComponent(main) && !expanding.includes(target) && !g.isAncestor(target, instId)) {
|
|
6775
|
-
const previousComponent = o ? _optionalChain([getInstanceData, 'call',
|
|
6441
|
+
const previousComponent = o ? _optionalChain([getInstanceData, 'call', _266 => _266(o), 'optionalAccess', _267 => _267.componentId]) : void 0;
|
|
6776
6442
|
n3 = applyChainProps(instanceRoot(main, s, o, id, newParent, sid, nested, previousComponent, false), s, enc);
|
|
6777
6443
|
out.push(n3);
|
|
6778
6444
|
copyChildren(target, id, path, [id], [...expanding, target], depth2 + 1);
|
|
@@ -6801,16 +6467,16 @@ function buildInstance(g, instId, opts, taken) {
|
|
|
6801
6467
|
}
|
|
6802
6468
|
const removed = /* @__PURE__ */ new Set([instId, ...oldIds, ...foreign]);
|
|
6803
6469
|
let block = [root, ...out, ...keptForeign];
|
|
6804
|
-
const compSize = getNodeSize(comp);
|
|
6805
|
-
const rootSize = getNodeSize(root);
|
|
6470
|
+
const compSize = _chunkUBRYHNRUcjs.getNodeSize.call(void 0, comp);
|
|
6471
|
+
const rootSize = _chunkUBRYHNRUcjs.getNodeSize.call(void 0, root);
|
|
6806
6472
|
if (!getAutoLayout(root) && (Math.abs(compSize.width - rootSize.width) > 1e-9 || Math.abs(compSize.height - rootSize.height) > 1e-9)) {
|
|
6807
6473
|
const fixed = new Set(out.filter((n3) => getNodeOverrides(n3).some((gr) => gr === "size" || gr === "position")).map((n3) => n3.id));
|
|
6808
6474
|
const updates = applyConstraints(block, instId, compSize, opts.layout || {}).filter((u) => !fixed.has(u.id));
|
|
6809
|
-
block = applyNodeUpdates(block, updates);
|
|
6475
|
+
block = _chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, block, updates);
|
|
6810
6476
|
}
|
|
6811
6477
|
if (opts.layout) {
|
|
6812
6478
|
const frames = block.filter((n3) => getAutoLayout(n3)).map((n3) => n3.id);
|
|
6813
|
-
if (frames.length) block = applyNodeUpdates(block, layoutUpMany(block, frames, opts.layout));
|
|
6479
|
+
if (frames.length) block = _chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, block, layoutUpMany(block, frames, opts.layout));
|
|
6814
6480
|
}
|
|
6815
6481
|
block = block.map((n3) => {
|
|
6816
6482
|
const prev = g.get(n3.id);
|
|
@@ -6840,10 +6506,10 @@ function rebuildBatch(nodes, ids, opts) {
|
|
|
6840
6506
|
if (opts.layout) {
|
|
6841
6507
|
const lookup = new Map(result.map((n3) => [n3.id, n3]));
|
|
6842
6508
|
const inFrames = [...built.keys()].filter((r) => {
|
|
6843
|
-
const parent = lookup.get(_nullishCoalesce(_optionalChain([lookup, 'access',
|
|
6509
|
+
const parent = lookup.get(_nullishCoalesce(_optionalChain([lookup, 'access', _268 => _268.get, 'call', _269 => _269(r), 'optionalAccess', _270 => _270.parentId]), () => ( "")));
|
|
6844
6510
|
return !!getAutoLayout(parent);
|
|
6845
6511
|
});
|
|
6846
|
-
if (inFrames.length) result = applyNodeUpdates(result, layoutUpMany(result, inFrames, opts.layout));
|
|
6512
|
+
if (inFrames.length) result = _chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, result, layoutUpMany(result, inFrames, opts.layout));
|
|
6847
6513
|
}
|
|
6848
6514
|
return result.length === nodes.length && result.every((n3, i) => n3 === nodes[i]) ? nodes : result;
|
|
6849
6515
|
}
|
|
@@ -6896,7 +6562,7 @@ function rebuildInstances(nodes, comps, resync, opts) {
|
|
|
6896
6562
|
}
|
|
6897
6563
|
function finish(original, result, opts) {
|
|
6898
6564
|
let out = result;
|
|
6899
|
-
if (_optionalChain([opts, 'access',
|
|
6565
|
+
if (_optionalChain([opts, 'access', _271 => _271.tokens, 'optionalAccess', _272 => _272.state])) out = resolveCanvasTokens(out, opts.tokens.state, opts.tokens);
|
|
6900
6566
|
if (out.length === original.length && out.every((n3, i) => n3 === original[i])) return original;
|
|
6901
6567
|
return out;
|
|
6902
6568
|
}
|
|
@@ -7011,9 +6677,9 @@ function syncCanvasComponents(before, after, options = {}) {
|
|
|
7011
6677
|
const r = rootInstanceIn(g, n3.parentId);
|
|
7012
6678
|
if (!r || addedIds.has(r)) continue;
|
|
7013
6679
|
const rootNode = g.get(r);
|
|
7014
|
-
const abs = getAbsolutePosition(n3, g.byId);
|
|
6680
|
+
const abs = _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, n3, g.byId);
|
|
7015
6681
|
const parent = g.get(rootNode.parentId);
|
|
7016
|
-
const base = parent ? getAbsolutePosition(parent, g.byId) : { x: 0, y: 0 };
|
|
6682
|
+
const base = parent ? _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, parent, g.byId) : { x: 0, y: 0 };
|
|
7017
6683
|
const moved = { ...n3, position: { x: abs.x - base.x, y: abs.y - base.y } };
|
|
7018
6684
|
if (rootNode.parentId) moved.parentId = rootNode.parentId;
|
|
7019
6685
|
else delete moved.parentId;
|
|
@@ -7056,7 +6722,7 @@ function syncCanvasComponents(before, after, options = {}) {
|
|
|
7056
6722
|
let groups = raw.filter((gr) => gr !== "position" && (gr !== "size" || topRoot && !sizeFromLayout(g, n3)));
|
|
7057
6723
|
if (topRoot) groups = groups.filter((gr) => !isOwnRootGroup(gr));
|
|
7058
6724
|
let cleared = [];
|
|
7059
|
-
const srcId = topRoot ? _optionalChain([ni, 'optionalAccess',
|
|
6725
|
+
const srcId = topRoot ? _optionalChain([ni, 'optionalAccess', _273 => _273.componentId]) : getComponentSourceId(n3);
|
|
7060
6726
|
const src = g.get(srcId);
|
|
7061
6727
|
if (src) {
|
|
7062
6728
|
const reference = topRoot ? rootReference(g, src) : src;
|
|
@@ -7146,7 +6812,7 @@ function wrapInFrame(nodes, ids, frame) {
|
|
|
7146
6812
|
let maxX = -Infinity;
|
|
7147
6813
|
let maxY = -Infinity;
|
|
7148
6814
|
for (const n3 of roots) {
|
|
7149
|
-
const { width: width2, height: height2 } = getNodeSize(n3);
|
|
6815
|
+
const { width: width2, height: height2 } = _chunkUBRYHNRUcjs.getNodeSize.call(void 0, n3);
|
|
7150
6816
|
minX = Math.min(minX, n3.position.x);
|
|
7151
6817
|
minY = Math.min(minY, n3.position.y);
|
|
7152
6818
|
maxX = Math.max(maxX, n3.position.x + width2);
|
|
@@ -7251,7 +6917,7 @@ function createCanvasInstance(nodes, componentId, options = {}) {
|
|
|
7251
6917
|
if (parentId !== void 0) position = { x: 0, y: 0 };
|
|
7252
6918
|
else {
|
|
7253
6919
|
const top = g.chain(main).pop();
|
|
7254
|
-
position = { x: getAbsolutePosition(top, g.byId).x + getNodeSize(top).width + 40, y: getAbsolutePosition(comp, g.byId).y };
|
|
6920
|
+
position = { x: _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, top, g.byId).x + _chunkUBRYHNRUcjs.getNodeSize.call(void 0, top).width + 40, y: _chunkUBRYHNRUcjs.getAbsolutePosition.call(void 0, comp, g.byId).y };
|
|
7255
6921
|
}
|
|
7256
6922
|
}
|
|
7257
6923
|
const root = {
|
|
@@ -7368,7 +7034,7 @@ function swapCanvasInstance(nodes, ids, componentId, options = {}) {
|
|
|
7368
7034
|
if (g.isAncestor(main, id) || createsCycleIn(g, main, n3.parentId)) return fail(nodes, "cycle", "An instance can't show the component it is inside.");
|
|
7369
7035
|
const defaults = effectivePropsIn(g, main, void 0);
|
|
7370
7036
|
const properties = {};
|
|
7371
|
-
for (const [k, d] of Object.entries(defaults)) properties[k] = _optionalChain([inst, 'access',
|
|
7037
|
+
for (const [k, d] of Object.entries(defaults)) properties[k] = _optionalChain([inst, 'access', _274 => _274.properties, 'optionalAccess', _275 => _275[k]]) !== void 0 && typeof inst.properties[k] === typeof d ? inst.properties[k] : d;
|
|
7372
7038
|
updates.set(id, withData(n3, { ...dataOf(n3), [INSTANCE_DATA_KEY]: { ...inst, componentId: main, properties } }));
|
|
7373
7039
|
if (options.keepTextOverridesOnly) {
|
|
7374
7040
|
for (const d of g.subtree(id)) {
|
|
@@ -7613,7 +7279,7 @@ function closestVariant(list, wanted) {
|
|
|
7613
7279
|
const score = [matches2.reduce((a, b) => a + b, 0), ...matches2];
|
|
7614
7280
|
if (!best || better(score, best.score)) best = { score, id: v.id };
|
|
7615
7281
|
}
|
|
7616
|
-
return _optionalChain([best, 'optionalAccess',
|
|
7282
|
+
return _optionalChain([best, 'optionalAccess', _276 => _276.id]);
|
|
7617
7283
|
}
|
|
7618
7284
|
function variantEditIn(g, setId) {
|
|
7619
7285
|
const set = g.get(setId);
|
|
@@ -7629,7 +7295,7 @@ function addMissingProperties(edit, pairs, defaultValue) {
|
|
|
7629
7295
|
if (added.length === 0) return void 0;
|
|
7630
7296
|
const problem = variantNameProblem("value", defaultValue);
|
|
7631
7297
|
if (problem) return problem;
|
|
7632
|
-
const defs = _optionalChain([dataOf, 'call',
|
|
7298
|
+
const defs = _optionalChain([dataOf, 'call', _277 => _277(edit.set), 'access', _278 => _278[COMPONENT_SET_DATA_KEY], 'optionalAccess', _279 => _279.properties]);
|
|
7633
7299
|
const clash = isRecord(defs) ? added.find((k) => k in defs) : void 0;
|
|
7634
7300
|
if (clash) return `"${clash}" is a component property.`;
|
|
7635
7301
|
for (const [id, v] of edit.values) {
|
|
@@ -7661,11 +7327,11 @@ function nextVariantValuesIn(g, setId, fromId) {
|
|
|
7661
7327
|
const variants = variantsIn(g, setId);
|
|
7662
7328
|
const base = getVariantValues(g.get(fromId));
|
|
7663
7329
|
const first = variantOptionsIn(g, setId)[0];
|
|
7664
|
-
const prop = _nullishCoalesce(_optionalChain([first, 'optionalAccess',
|
|
7330
|
+
const prop = _nullishCoalesce(_optionalChain([first, 'optionalAccess', _280 => _280.name]), () => ( "Property 1"));
|
|
7665
7331
|
const used = new Set(variants.map((v) => variantKey(getVariantValues(v))));
|
|
7666
7332
|
for (let k = variants.length + 1; ; k++) {
|
|
7667
7333
|
const values = { ...base, [prop]: `Variant${k}` };
|
|
7668
|
-
if (!_optionalChain([first, 'optionalAccess',
|
|
7334
|
+
if (!_optionalChain([first, 'optionalAccess', _281 => _281.values, 'access', _282 => _282.includes, 'call', _283 => _283(`Variant${k}`)]) && !used.has(variantKey(values))) return values;
|
|
7669
7335
|
}
|
|
7670
7336
|
}
|
|
7671
7337
|
function getNextVariantValues(nodes, setId, from) {
|
|
@@ -7674,7 +7340,7 @@ function getNextVariantValues(nodes, setId, from) {
|
|
|
7674
7340
|
}
|
|
7675
7341
|
function relayoutSet(nodes, setId, options) {
|
|
7676
7342
|
if (options.layout === false || !getAutoLayout(nodes.find((n3) => n3.id === setId))) return nodes;
|
|
7677
|
-
return applyNodeUpdates(nodes, layoutUpMany(nodes, [setId], typeof options.layout === "object" ? options.layout : {}));
|
|
7343
|
+
return _chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, nodes, layoutUpMany(nodes, [setId], typeof options.layout === "object" ? options.layout : {}));
|
|
7678
7344
|
}
|
|
7679
7345
|
function addCanvasVariant(nodes, setId, options = {}) {
|
|
7680
7346
|
const g = new Graph(nodes);
|
|
@@ -7694,10 +7360,10 @@ function addCanvasVariant(nodes, setId, options = {}) {
|
|
|
7694
7360
|
const dup = duplicateAmong(edit.values, [id]);
|
|
7695
7361
|
if (dup) return fail(nodes, "invalid", `A variant with ${dup} exists already.`);
|
|
7696
7362
|
const autoLayout = !!getAutoLayout(edit.set);
|
|
7697
|
-
const { width, height } = getNodeSize(source);
|
|
7363
|
+
const { width, height } = _chunkUBRYHNRUcjs.getNodeSize.call(void 0, source);
|
|
7698
7364
|
let position = options.position ? { ...options.position } : { ...source.position };
|
|
7699
7365
|
if (!options.position && !autoLayout) {
|
|
7700
|
-
const rects = edit.variants.map((v) => ({ ...v.position, ...getNodeSize(v) }));
|
|
7366
|
+
const rects = edit.variants.map((v) => ({ ...v.position, ..._chunkUBRYHNRUcjs.getNodeSize.call(void 0, v) }));
|
|
7701
7367
|
position = { x: source.position.x + width + VARIANT_GAP, y: source.position.y };
|
|
7702
7368
|
for (let k = 0; k <= rects.length; k++) {
|
|
7703
7369
|
const hit = rects.find((r) => position.x < r.x + r.width && r.x < position.x + width && position.y < r.y + r.height && r.y < position.y + height);
|
|
@@ -7738,10 +7404,10 @@ function addCanvasVariant(nodes, setId, options = {}) {
|
|
|
7738
7404
|
});
|
|
7739
7405
|
if (autoLayout && !options.position) after = relayoutSet(after, setId, options);
|
|
7740
7406
|
else {
|
|
7741
|
-
const size2 = getNodeSize(edit.set);
|
|
7407
|
+
const size2 = _chunkUBRYHNRUcjs.getNodeSize.call(void 0, edit.set);
|
|
7742
7408
|
const w = Math.max(size2.width, position.x + width + VARIANT_GAP);
|
|
7743
7409
|
const h = Math.max(size2.height, position.y + height + VARIANT_GAP);
|
|
7744
|
-
if (w !== size2.width || h !== size2.height) after = applyNodeUpdates(after, [{ id: setId, width: w, height: h }]);
|
|
7410
|
+
if (w !== size2.width || h !== size2.height) after = _chunkUBRYHNRUcjs.applyNodeUpdates.call(void 0, after, [{ id: setId, width: w, height: h }]);
|
|
7745
7411
|
}
|
|
7746
7412
|
return done(nodes, after, [id], options);
|
|
7747
7413
|
}
|
|
@@ -7804,7 +7470,7 @@ function updateInstanceValues(g, setId, updates, fn) {
|
|
|
7804
7470
|
const ids = new Set(variantsIn(g, setId).map((v) => v.id));
|
|
7805
7471
|
for (const n3 of g.nodes) {
|
|
7806
7472
|
const inst = getInstanceData(n3);
|
|
7807
|
-
if (!_optionalChain([inst, 'optionalAccess',
|
|
7473
|
+
if (!_optionalChain([inst, 'optionalAccess', _284 => _284.properties]) || !ids.has(inst.componentId)) continue;
|
|
7808
7474
|
const props = fn({ ...inst.properties });
|
|
7809
7475
|
if (same(props, inst.properties)) continue;
|
|
7810
7476
|
const cur = _nullishCoalesce(updates.get(n3.id), () => ( n3));
|
|
@@ -7888,7 +7554,7 @@ function createCanvasComponentsController(options) {
|
|
|
7888
7554
|
layout: options.layout,
|
|
7889
7555
|
tokens: options.tokens
|
|
7890
7556
|
});
|
|
7891
|
-
const selection = (ids) => ids ? [...ids] : _nullishCoalesce(_optionalChain([options, 'access',
|
|
7557
|
+
const selection = (ids) => ids ? [...ids] : _nullishCoalesce(_optionalChain([options, 'access', _285 => _285.getSelectedIds, 'optionalCall', _286 => _286()]), () => ( options.getNodes().filter((n3) => n3.selected).map((n3) => n3.id)));
|
|
7892
7558
|
const target = (id) => _nullishCoalesce(id, () => ( selection()[0]));
|
|
7893
7559
|
function set(next) {
|
|
7894
7560
|
synced = next;
|
|
@@ -8117,12 +7783,12 @@ function createCanvasComponentsController(options) {
|
|
|
8117
7783
|
const at = target(id);
|
|
8118
7784
|
const list = sync();
|
|
8119
7785
|
const inst = at ? getOwningInstance(list, at) : void 0;
|
|
8120
|
-
const main = inst ? _optionalChain([getInstanceData, 'call',
|
|
7786
|
+
const main = inst ? _optionalChain([getInstanceData, 'call', _287 => _287(list.find((n3) => n3.id === inst)), 'optionalAccess', _288 => _288.componentId]) : void 0;
|
|
8121
7787
|
const node = main ? list.find((n3) => n3.id === main) : void 0;
|
|
8122
7788
|
if (!node) return void 0;
|
|
8123
7789
|
const next = list.map((n3) => !!n3.selected === (n3.id === main) ? n3 : { ...n3, selected: n3.id === main });
|
|
8124
7790
|
set(next);
|
|
8125
|
-
_optionalChain([options, 'access',
|
|
7791
|
+
_optionalChain([options, 'access', _289 => _289.onReveal, 'optionalCall', _290 => _290(next.find((n3) => n3.id === main))]);
|
|
8126
7792
|
return main;
|
|
8127
7793
|
},
|
|
8128
7794
|
canGoToMainComponent(id) {
|
|
@@ -8147,7 +7813,7 @@ function createCanvasComponentsController(options) {
|
|
|
8147
7813
|
}
|
|
8148
7814
|
var CANVAS_COMPONENT_DRAG_TYPE = "application/x-pixerate-component";
|
|
8149
7815
|
function getCanvasComponentDragId(dataTransfer) {
|
|
8150
|
-
const id = _optionalChain([dataTransfer, 'optionalAccess',
|
|
7816
|
+
const id = _optionalChain([dataTransfer, 'optionalAccess', _291 => _291.getData, 'call', _292 => _292(CANVAS_COMPONENT_DRAG_TYPE)]);
|
|
8151
7817
|
return id ? id : void 0;
|
|
8152
7818
|
}
|
|
8153
7819
|
|
|
@@ -8298,7 +7964,7 @@ function findStrokesAtPoint(point, nodes, radius = 12) {
|
|
|
8298
7964
|
for (const node of nodes) {
|
|
8299
7965
|
const shape = getNodeShape(node);
|
|
8300
7966
|
if (!shape || shape.kind !== "path") continue;
|
|
8301
|
-
const rect2 = getNodeRect(node);
|
|
7967
|
+
const rect2 = _chunkUBRYHNRUcjs.getNodeRect.call(void 0, node);
|
|
8302
7968
|
const strokeWidth = _nullishCoalesce(shape.strokeWidth, () => ( 2));
|
|
8303
7969
|
const effectiveRadius = radius + strokeWidth / 2;
|
|
8304
7970
|
if (point[0] < rect2.x - effectiveRadius || point[0] > rect2.x + rect2.width + effectiveRadius || point[1] < rect2.y - effectiveRadius || point[1] > rect2.y + rect2.height + effectiveRadius) {
|
|
@@ -8338,13 +8004,13 @@ function createCanvasDrawController(options) {
|
|
|
8338
8004
|
...createDefaultStrokeStyle(tool),
|
|
8339
8005
|
...options.style
|
|
8340
8006
|
};
|
|
8341
|
-
_optionalChain([options, 'access',
|
|
8007
|
+
_optionalChain([options, 'access', _293 => _293.onStyleChange, 'optionalCall', _294 => _294(currentStyle)]);
|
|
8342
8008
|
}
|
|
8343
|
-
_optionalChain([options, 'access',
|
|
8009
|
+
_optionalChain([options, 'access', _295 => _295.onToolChange, 'optionalCall', _296 => _296(tool)]);
|
|
8344
8010
|
}
|
|
8345
8011
|
function setStyle(style) {
|
|
8346
8012
|
currentStyle = { ...currentStyle, ...style };
|
|
8347
|
-
_optionalChain([options, 'access',
|
|
8013
|
+
_optionalChain([options, 'access', _297 => _297.onStyleChange, 'optionalCall', _298 => _298(currentStyle)]);
|
|
8348
8014
|
}
|
|
8349
8015
|
function startStroke(point, pen) {
|
|
8350
8016
|
if (currentTool === "select") return;
|
|
@@ -8354,7 +8020,7 @@ function createCanvasDrawController(options) {
|
|
|
8354
8020
|
eraseAt(point);
|
|
8355
8021
|
return;
|
|
8356
8022
|
}
|
|
8357
|
-
const id = _nullishCoalesce(_optionalChain([options, 'access',
|
|
8023
|
+
const id = _nullishCoalesce(_optionalChain([options, 'access', _299 => _299.generateNodeId, 'optionalCall', _300 => _300()]), () => ( `stroke-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`));
|
|
8358
8024
|
activeStroke = {
|
|
8359
8025
|
id,
|
|
8360
8026
|
tool: currentTool,
|
|
@@ -8363,7 +8029,7 @@ function createCanvasDrawController(options) {
|
|
|
8363
8029
|
style: { ...currentStyle },
|
|
8364
8030
|
startTime: Date.now()
|
|
8365
8031
|
};
|
|
8366
|
-
_optionalChain([options, 'access',
|
|
8032
|
+
_optionalChain([options, 'access', _301 => _301.onActiveStrokeChange, 'optionalCall', _302 => _302(activeStroke)]);
|
|
8367
8033
|
}
|
|
8368
8034
|
function continueStroke(point, pen) {
|
|
8369
8035
|
if (currentTool === "eraser") {
|
|
@@ -8376,8 +8042,8 @@ function createCanvasDrawController(options) {
|
|
|
8376
8042
|
if (Math.hypot(point[0] - last[0], point[1] - last[1]) < 0.25) return;
|
|
8377
8043
|
points.push(point);
|
|
8378
8044
|
if (pen && !activeStroke.samples) activeStroke.samples = points.slice(0, -1).map(() => ({}));
|
|
8379
|
-
_optionalChain([activeStroke, 'access',
|
|
8380
|
-
_optionalChain([options, 'access',
|
|
8045
|
+
_optionalChain([activeStroke, 'access', _303 => _303.samples, 'optionalAccess', _304 => _304.push, 'call', _305 => _305(pen ? { ...pen } : {})]);
|
|
8046
|
+
_optionalChain([options, 'access', _306 => _306.onActiveStrokeChange, 'optionalCall', _307 => _307({ ...activeStroke, points: [...points] })]);
|
|
8381
8047
|
}
|
|
8382
8048
|
function endStroke() {
|
|
8383
8049
|
if (currentTool === "eraser") {
|
|
@@ -8402,7 +8068,7 @@ function createCanvasDrawController(options) {
|
|
|
8402
8068
|
if (!activeStroke) return null;
|
|
8403
8069
|
const stroke = activeStroke;
|
|
8404
8070
|
activeStroke = null;
|
|
8405
|
-
_optionalChain([options, 'access',
|
|
8071
|
+
_optionalChain([options, 'access', _308 => _308.onActiveStrokeChange, 'optionalCall', _309 => _309(null)]);
|
|
8406
8072
|
if (stroke.points.length === 0) return null;
|
|
8407
8073
|
const drawOpts = _nullishCoalesce(options.drawOptions, () => ( {}));
|
|
8408
8074
|
const smoothed = streamlinePoints(stroke.points, _nullishCoalesce(drawOpts.streamline, () => ( 0.35)));
|
|
@@ -8414,7 +8080,7 @@ function createCanvasDrawController(options) {
|
|
|
8414
8080
|
}
|
|
8415
8081
|
);
|
|
8416
8082
|
addStrokeNode(node, `Draw ${stroke.tool}`);
|
|
8417
|
-
_optionalChain([options, 'access',
|
|
8083
|
+
_optionalChain([options, 'access', _310 => _310.onStrokeComplete, 'optionalCall', _311 => _311(node)]);
|
|
8418
8084
|
return node;
|
|
8419
8085
|
}
|
|
8420
8086
|
function addStrokeNode(node, name) {
|
|
@@ -8460,18 +8126,18 @@ function createCanvasDrawController(options) {
|
|
|
8460
8126
|
}
|
|
8461
8127
|
if (style.brush !== void 0) await _chunkPUC43JPTcjs.validateCanvasBrush.call(void 0, style.brush);
|
|
8462
8128
|
if (style.paint !== void 0) style.paint = (await _chunkPUC43JPTcjs.loadCanvasBrushstrokeRenderer.call(void 0, )).resolveCanvasPaint(style.paint);
|
|
8463
|
-
const id = _nullishCoalesce(_optionalChain([options, 'access',
|
|
8464
|
-
const smoothed = input.streamline ? streamlinePoints(points, _nullishCoalesce(_optionalChain([options, 'access',
|
|
8129
|
+
const id = _nullishCoalesce(_optionalChain([options, 'access', _312 => _312.generateNodeId, 'optionalCall', _313 => _313()]), () => ( `stroke-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`));
|
|
8130
|
+
const smoothed = input.streamline ? streamlinePoints(points, _nullishCoalesce(_optionalChain([options, 'access', _314 => _314.drawOptions, 'optionalAccess', _315 => _315.streamline]), () => ( 0.35))) : [...points];
|
|
8465
8131
|
const node = strokeToShapeNode(
|
|
8466
8132
|
{ id, tool, points: smoothed, style },
|
|
8467
|
-
{ tolerance: _nullishCoalesce(_optionalChain([options, 'access',
|
|
8133
|
+
{ tolerance: _nullishCoalesce(_optionalChain([options, 'access', _316 => _316.drawOptions, 'optionalAccess', _317 => _317.tolerance]), () => ( 1)), cornerAngleDeg: _nullishCoalesce(_optionalChain([options, 'access', _318 => _318.drawOptions, 'optionalAccess', _319 => _319.cornerAngleDeg]), () => ( 40)) }
|
|
8468
8134
|
);
|
|
8469
8135
|
const shape = node.data.shape;
|
|
8470
8136
|
if (shape.brush) {
|
|
8471
8137
|
for (const [key, values] of Object.entries(profiles)) if (values) shape.brush[key] = [...values];
|
|
8472
8138
|
}
|
|
8473
8139
|
addStrokeNode(node, `Draw ${tool}`);
|
|
8474
|
-
_optionalChain([options, 'access',
|
|
8140
|
+
_optionalChain([options, 'access', _320 => _320.onStrokeComplete, 'optionalCall', _321 => _321(node)]);
|
|
8475
8141
|
const pos = _nullishCoalesce(node.position, () => ( { x: 0, y: 0 }));
|
|
8476
8142
|
return {
|
|
8477
8143
|
id: node.id,
|
|
@@ -8483,7 +8149,7 @@ function createCanvasDrawController(options) {
|
|
|
8483
8149
|
function cancelStroke() {
|
|
8484
8150
|
if (activeStroke) {
|
|
8485
8151
|
activeStroke = null;
|
|
8486
|
-
_optionalChain([options, 'access',
|
|
8152
|
+
_optionalChain([options, 'access', _322 => _322.onActiveStrokeChange, 'optionalCall', _323 => _323(null)]);
|
|
8487
8153
|
}
|
|
8488
8154
|
if (erasedInDrag.size > 0) {
|
|
8489
8155
|
const entries = Array.from(erasedInDrag.values());
|
|
@@ -8502,7 +8168,7 @@ function createCanvasDrawController(options) {
|
|
|
8502
8168
|
const candidates = findStrokesAtPoint(point, nodes, radius);
|
|
8503
8169
|
const newlyErased = [];
|
|
8504
8170
|
for (const candidate of candidates) {
|
|
8505
|
-
if (erasedInDrag.has(candidate.id) || isLocked(candidate)) continue;
|
|
8171
|
+
if (erasedInDrag.has(candidate.id) || _chunkUBRYHNRUcjs.isLocked.call(void 0, candidate)) continue;
|
|
8506
8172
|
const index = nodes.findIndex((n3) => n3.id === candidate.id);
|
|
8507
8173
|
if (index !== -1) {
|
|
8508
8174
|
erasedInDrag.set(candidate.id, { node: candidate, index });
|
|
@@ -8513,7 +8179,7 @@ function createCanvasDrawController(options) {
|
|
|
8513
8179
|
const erasedSet = new Set(newlyErased.map((n3) => n3.id));
|
|
8514
8180
|
const nextNodes = nodes.filter((n3) => !erasedSet.has(n3.id));
|
|
8515
8181
|
options.setNodes(nextNodes);
|
|
8516
|
-
_optionalChain([options, 'access',
|
|
8182
|
+
_optionalChain([options, 'access', _324 => _324.onNodesErase, 'optionalCall', _325 => _325(newlyErased)]);
|
|
8517
8183
|
}
|
|
8518
8184
|
return newlyErased;
|
|
8519
8185
|
}
|
|
@@ -8653,8 +8319,8 @@ function estimateDiagramNodeSize(node) {
|
|
|
8653
8319
|
var IMAGE_LABEL_HEIGHT = 24;
|
|
8654
8320
|
function diagramImageSize(node) {
|
|
8655
8321
|
const num4 = (v) => typeof v === "number" && v > 0 ? v : void 0;
|
|
8656
|
-
const w = num4(_optionalChain([node, 'access',
|
|
8657
|
-
const h = num4(_optionalChain([node, 'access',
|
|
8322
|
+
const w = num4(_optionalChain([node, 'access', _326 => _326.data, 'optionalAccess', _327 => _327.w]));
|
|
8323
|
+
const h = num4(_optionalChain([node, 'access', _328 => _328.data, 'optionalAccess', _329 => _329.h]));
|
|
8658
8324
|
return { width: _nullishCoalesce(_nullishCoalesce(w, () => ( h)), () => ( 96)), height: _nullishCoalesce(_nullishCoalesce(h, () => ( w)), () => ( 96)) };
|
|
8659
8325
|
}
|
|
8660
8326
|
function extraLines(node) {
|
|
@@ -8716,7 +8382,7 @@ function autoLayoutDiagram(graph, options = {}) {
|
|
|
8716
8382
|
while (cur && !seen.has(cur)) {
|
|
8717
8383
|
if (ids.has(cur)) return cur;
|
|
8718
8384
|
seen.add(cur);
|
|
8719
|
-
cur = _nullishCoalesce(_optionalChain([nodeById, 'access',
|
|
8385
|
+
cur = _nullishCoalesce(_optionalChain([nodeById, 'access', _330 => _330.get, 'call', _331 => _331(cur), 'optionalAccess', _332 => _332.parentId]), () => ( _optionalChain([groupById, 'access', _333 => _333.get, 'call', _334 => _334(cur), 'optionalAccess', _335 => _335.parentId])));
|
|
8720
8386
|
}
|
|
8721
8387
|
return null;
|
|
8722
8388
|
};
|
|
@@ -8752,7 +8418,7 @@ function autoLayoutDiagram(graph, options = {}) {
|
|
|
8752
8418
|
const positions = {};
|
|
8753
8419
|
const absolute = (id) => {
|
|
8754
8420
|
if (positions[id]) return positions[id];
|
|
8755
|
-
const parentId = _nullishCoalesce(_optionalChain([nodeById, 'access',
|
|
8421
|
+
const parentId = _nullishCoalesce(_optionalChain([nodeById, 'access', _336 => _336.get, 'call', _337 => _337(id), 'optionalAccess', _338 => _338.parentId]), () => ( _optionalChain([groupById, 'access', _339 => _339.get, 'call', _340 => _340(id), 'optionalAccess', _341 => _341.parentId])));
|
|
8756
8422
|
const [rx, ry] = _nullishCoalesce(relative[id], () => ( [0, 0]));
|
|
8757
8423
|
if (!parentId) {
|
|
8758
8424
|
positions[id] = [rx, ry];
|
|
@@ -8772,15 +8438,15 @@ function push(map, key, value) {
|
|
|
8772
8438
|
else map.set(key, [value]);
|
|
8773
8439
|
}
|
|
8774
8440
|
function ensureDiagramLayout(graph, meta, options) {
|
|
8775
|
-
const measure = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
8776
|
-
const custom = _chunkZVNAMTFOcjs.getFamilyLayout.call(void 0, _optionalChain([options, 'optionalAccess',
|
|
8441
|
+
const measure = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _342 => _342.measure]), () => ( estimateDiagramNodeSize));
|
|
8442
|
+
const custom = _chunkZVNAMTFOcjs.getFamilyLayout.call(void 0, _optionalChain([options, 'optionalAccess', _343 => _343.family]));
|
|
8777
8443
|
if (custom) return custom(graph, meta, { ..._nullishCoalesce(options, () => ( {})), measure });
|
|
8778
8444
|
const stored = _nullishCoalesce(meta.layout, () => ( {}));
|
|
8779
8445
|
const allIds = [...graph.nodes.map((n3) => n3.id), ...graph.groups.map((g) => g.id)];
|
|
8780
8446
|
const missing = allIds.filter((id) => !stored[id]);
|
|
8781
8447
|
const sizes = {};
|
|
8782
8448
|
for (const n3 of graph.nodes)
|
|
8783
|
-
sizes[n3.id] = _optionalChain([meta, 'access',
|
|
8449
|
+
sizes[n3.id] = _optionalChain([meta, 'access', _344 => _344.sizes, 'optionalAccess', _345 => _345[n3.id]]) ? { width: meta.sizes[n3.id][0], height: meta.sizes[n3.id][1] } : measure(n3);
|
|
8784
8450
|
if (!missing.length) {
|
|
8785
8451
|
const positions2 = {};
|
|
8786
8452
|
for (const id of allIds) positions2[id] = stored[id];
|
|
@@ -8808,7 +8474,7 @@ function ensureDiagramLayout(graph, meta, options) {
|
|
|
8808
8474
|
return { positions, sizes };
|
|
8809
8475
|
}
|
|
8810
8476
|
function diagramGroupSize(groupId, graph, positions, sizes, meta, pad = 24, titleH = 32) {
|
|
8811
|
-
if (_optionalChain([meta, 'access',
|
|
8477
|
+
if (_optionalChain([meta, 'access', _346 => _346.sizes, 'optionalAccess', _347 => _347[groupId]]))
|
|
8812
8478
|
return { width: meta.sizes[groupId][0], height: meta.sizes[groupId][1] };
|
|
8813
8479
|
const members = [
|
|
8814
8480
|
...graph.nodes.filter((n3) => n3.parentId === groupId).map((n3) => n3.id),
|
|
@@ -8885,9 +8551,9 @@ function mermaidFlowNodes(graph, layout2, options = {}) {
|
|
|
8885
8551
|
width: size2.width,
|
|
8886
8552
|
height: size2.height,
|
|
8887
8553
|
style: { width: size2.width, height: size2.height },
|
|
8888
|
-
draggable: editable && !_optionalChain([g, 'access',
|
|
8554
|
+
draggable: editable && !_optionalChain([g, 'access', _348 => _348.data, 'optionalAccess', _349 => _349.locked]),
|
|
8889
8555
|
selectable: editable,
|
|
8890
|
-
connectable: editable && !_optionalChain([g, 'access',
|
|
8556
|
+
connectable: editable && !_optionalChain([g, 'access', _350 => _350.data, 'optionalAccess', _351 => _351.locked]),
|
|
8891
8557
|
zIndex: depth(g.id, parents)
|
|
8892
8558
|
};
|
|
8893
8559
|
});
|
|
@@ -8907,9 +8573,9 @@ function mermaidFlowNodes(graph, layout2, options = {}) {
|
|
|
8907
8573
|
width: size2.width,
|
|
8908
8574
|
height: size2.height,
|
|
8909
8575
|
style: { width: size2.width, height: size2.height },
|
|
8910
|
-
draggable: editable && !_optionalChain([n3, 'access',
|
|
8576
|
+
draggable: editable && !_optionalChain([n3, 'access', _352 => _352.data, 'optionalAccess', _353 => _353.locked]),
|
|
8911
8577
|
selectable: editable,
|
|
8912
|
-
connectable: editable && !_optionalChain([n3, 'access',
|
|
8578
|
+
connectable: editable && !_optionalChain([n3, 'access', _354 => _354.data, 'optionalAccess', _355 => _355.locked]) && !_optionalChain([n3, 'access', _356 => _356.data, 'optionalAccess', _357 => _357.synthetic]),
|
|
8913
8579
|
zIndex: depth(n3.id, parents) + 100
|
|
8914
8580
|
};
|
|
8915
8581
|
});
|
|
@@ -8974,7 +8640,7 @@ function clampHeight2(content, options = {}) {
|
|
|
8974
8640
|
return Math.round(Math.min(max, Math.max(min, content + padding)));
|
|
8975
8641
|
}
|
|
8976
8642
|
function diagramCanvasHeight(layout2, options) {
|
|
8977
|
-
return clampHeight2(_nullishCoalesce(_optionalChain([diagramLayoutBounds, 'call',
|
|
8643
|
+
return clampHeight2(_nullishCoalesce(_optionalChain([diagramLayoutBounds, 'call', _358 => _358(layout2), 'optionalAccess', _359 => _359.height]), () => ( 0)), options);
|
|
8978
8644
|
}
|
|
8979
8645
|
var RANK_HEIGHT = DEFAULT_DIAGRAM_NODE_HEIGHT + 72;
|
|
8980
8646
|
var NODES_PER_RANK2 = 2;
|
|
@@ -9186,7 +8852,7 @@ function chartTheme(theme) {
|
|
|
9186
8852
|
}
|
|
9187
8853
|
function xyChartSpec(graph, palette) {
|
|
9188
8854
|
const data = _nullishCoalesce(graph.data, () => ( {}));
|
|
9189
|
-
const longest = Math.max(0, ...graph.nodes.map((n3) => numbers(_optionalChain([n3, 'access',
|
|
8855
|
+
const longest = Math.max(0, ...graph.nodes.map((n3) => numbers(_optionalChain([n3, 'access', _360 => _360.data, 'optionalAccess', _361 => _361.values])).length));
|
|
9190
8856
|
let categories = Array.isArray(data.categories) ? data.categories.map(String) : [];
|
|
9191
8857
|
const xMin = num2(data.xMin);
|
|
9192
8858
|
const xMax = num2(data.xMax);
|
|
@@ -9201,11 +8867,11 @@ function xyChartSpec(graph, palette) {
|
|
|
9201
8867
|
type: bars ? "bar" : "line",
|
|
9202
8868
|
title: _nullishCoalesce(graph.title, () => ( "")),
|
|
9203
8869
|
categories,
|
|
9204
|
-
series: graph.nodes.map((n3) => ({ id: n3.id, name: n3.label, values: numbers(_optionalChain([n3, 'access',
|
|
8870
|
+
series: graph.nodes.map((n3) => ({ id: n3.id, name: n3.label, values: numbers(_optionalChain([n3, 'access', _362 => _362.data, 'optionalAccess', _363 => _363.values])), type: n3.shape === "line" ? "line" : "bar" })),
|
|
9205
8871
|
orientation: data.horizontal ? "horizontal" : "vertical",
|
|
9206
8872
|
xAxis: { show: true, title: text(data.xTitle), min: null, max: null, step: null, gridlines: false, format: {} },
|
|
9207
8873
|
yAxis: { show: true, title: text(data.yTitle), min: num2(data.yMin), max: num2(data.yMax), step: null, gridlines: true, format: {} },
|
|
9208
|
-
legend: { show: graph.nodes.some((n3) => _optionalChain([n3, 'access',
|
|
8874
|
+
legend: { show: graph.nodes.some((n3) => _optionalChain([n3, 'access', _364 => _364.data, 'optionalAccess', _365 => _365.titled])), position: "top" },
|
|
9209
8875
|
...palette ? { palette: [...palette] } : {}
|
|
9210
8876
|
});
|
|
9211
8877
|
}
|
|
@@ -9215,7 +8881,7 @@ function radarChartSpec(graph, palette) {
|
|
|
9215
8881
|
type: "radar",
|
|
9216
8882
|
title: _nullishCoalesce(graph.title, () => ( "")),
|
|
9217
8883
|
categories: Array.isArray(data.axes) ? data.axes.map(String) : [],
|
|
9218
|
-
series: graph.nodes.map((n3) => ({ id: n3.id, name: n3.label, values: numbers(_optionalChain([n3, 'access',
|
|
8884
|
+
series: graph.nodes.map((n3) => ({ id: n3.id, name: n3.label, values: numbers(_optionalChain([n3, 'access', _366 => _366.data, 'optionalAccess', _367 => _367.values])) })),
|
|
9219
8885
|
yAxis: { show: true, title: "", min: num2(data.min), max: num2(data.max), step: null, gridlines: true, format: {} },
|
|
9220
8886
|
legend: { show: data.showLegend !== false, position: "top" },
|
|
9221
8887
|
...palette ? { palette: [...palette] } : {}
|
|
@@ -9366,7 +9032,7 @@ var sequenceScene = ({ graph, theme }) => {
|
|
|
9366
9032
|
for (const group of graph.groups) {
|
|
9367
9033
|
const box = geo.boxes.get(group.id);
|
|
9368
9034
|
if (!box) continue;
|
|
9369
|
-
const color = typeof _optionalChain([group, 'access',
|
|
9035
|
+
const color = typeof _optionalChain([group, 'access', _368 => _368.data, 'optionalAccess', _369 => _369.color]) === "string" ? group.data.color : void 0;
|
|
9370
9036
|
marks.push(
|
|
9371
9037
|
{ kind: "rect", key: `box:${group.id}`, role: "box", target: group.id, ...box, fill: _nullishCoalesce(color, () => ( "none")), stroke: theme.groupStroke, strokeWidth: 1 },
|
|
9372
9038
|
...textLines(displayLines(group.label), {
|
|
@@ -9435,12 +9101,12 @@ var sequenceScene = ({ graph, theme }) => {
|
|
|
9435
9101
|
);
|
|
9436
9102
|
});
|
|
9437
9103
|
const edges = new Map(graph.edges.map((e) => [e.id, e]));
|
|
9438
|
-
const autonumber = !!_optionalChain([graph, 'access',
|
|
9104
|
+
const autonumber = !!_optionalChain([graph, 'access', _370 => _370.data, 'optionalAccess', _371 => _371.autonumber]);
|
|
9439
9105
|
geo.messages.forEach((row, index) => {
|
|
9440
9106
|
const edge = edges.get(row.edgeId);
|
|
9441
9107
|
if (!edge) return;
|
|
9442
|
-
const x1 = _nullishCoalesce(_optionalChain([geo, 'access',
|
|
9443
|
-
const x2 = _nullishCoalesce(_optionalChain([geo, 'access',
|
|
9108
|
+
const x1 = _nullishCoalesce(_optionalChain([geo, 'access', _372 => _372.columns, 'access', _373 => _373.get, 'call', _374 => _374(edge.source), 'optionalAccess', _375 => _375.center]), () => ( 0));
|
|
9109
|
+
const x2 = _nullishCoalesce(_optionalChain([geo, 'access', _376 => _376.columns, 'access', _377 => _377.get, 'call', _378 => _378(edge.target), 'optionalAccess', _379 => _379.center]), () => ( 0));
|
|
9444
9110
|
const y = row.y;
|
|
9445
9111
|
const stroke = theme.edge;
|
|
9446
9112
|
const strokeWidth = edge.pattern === "thick" ? 3.5 : 1.5;
|
|
@@ -9661,7 +9327,7 @@ var quadrantScene = ({ graph, theme }) => {
|
|
|
9661
9327
|
}
|
|
9662
9328
|
for (const q of geo.quadrants) {
|
|
9663
9329
|
const group = groups.get(q.id);
|
|
9664
|
-
if (!group || _optionalChain([group, 'access',
|
|
9330
|
+
if (!group || _optionalChain([group, 'access', _380 => _380.data, 'optionalAccess', _381 => _381.placeholder]) || !group.label) continue;
|
|
9665
9331
|
marks.push({
|
|
9666
9332
|
kind: "text",
|
|
9667
9333
|
key: `quadrant-label:${q.id}`,
|
|
@@ -10108,7 +9774,7 @@ var mindmapScene = ({ graph, theme }) => {
|
|
|
10108
9774
|
fill: colors.label
|
|
10109
9775
|
});
|
|
10110
9776
|
});
|
|
10111
|
-
const icon = typeof _optionalChain([node, 'access',
|
|
9777
|
+
const icon = typeof _optionalChain([node, 'access', _382 => _382.data, 'optionalAccess', _383 => _383.icon]) === "string" ? node.data.icon : void 0;
|
|
10112
9778
|
if (icon) {
|
|
10113
9779
|
marks.push(
|
|
10114
9780
|
{ kind: "circle", key: `icon:${t.id}`, role: "icon", target: t.id, cx: x0, cy: y0, r: 11, fill: colors.fill, stroke: theme.background, strokeWidth: 2 },
|
|
@@ -10142,7 +9808,7 @@ var REL_GAP = 3;
|
|
|
10142
9808
|
function colorsOf(type) {
|
|
10143
9809
|
return _nullishCoalesce(C4_COLORS[`${type.external ? "external_" : ""}${type.base}`], () => ( C4_COLORS.container));
|
|
10144
9810
|
}
|
|
10145
|
-
var styleOf = (data) => _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
9811
|
+
var styleOf = (data) => _nullishCoalesce(_optionalChain([data, 'optionalAccess', _384 => _384.c4Style]), () => ( {}));
|
|
10146
9812
|
function titleMark(graph, layout2, theme) {
|
|
10147
9813
|
if (!graph.title) return null;
|
|
10148
9814
|
const groupIds = new Set(graph.groups.map((g) => g.id));
|
|
@@ -10163,11 +9829,11 @@ var c4Scene = ({ graph, layout: layout2, theme }) => {
|
|
|
10163
9829
|
const depth2 = (id) => {
|
|
10164
9830
|
let d = 0;
|
|
10165
9831
|
const seen = /* @__PURE__ */ new Set();
|
|
10166
|
-
let p = _optionalChain([graph, 'access',
|
|
9832
|
+
let p = _optionalChain([graph, 'access', _385 => _385.groups, 'access', _386 => _386.find, 'call', _387 => _387((g) => g.id === id), 'optionalAccess', _388 => _388.parentId]);
|
|
10167
9833
|
while (p && groupIds.has(p) && !seen.has(p)) {
|
|
10168
9834
|
seen.add(p);
|
|
10169
9835
|
d++;
|
|
10170
|
-
p = _optionalChain([graph, 'access',
|
|
9836
|
+
p = _optionalChain([graph, 'access', _389 => _389.groups, 'access', _390 => _390.find, 'call', _391 => _391((g) => g.id === p), 'optionalAccess', _392 => _392.parentId]);
|
|
10171
9837
|
}
|
|
10172
9838
|
return d;
|
|
10173
9839
|
};
|
|
@@ -10183,7 +9849,7 @@ var c4Scene = ({ graph, layout: layout2, theme }) => {
|
|
|
10183
9849
|
marks.push({ kind: "text", key: `boundary-descr:${group.id}`, role: "boundary-descr", target: group.id, x: cx, y: b.y + text2.descrY, text: text2.descr, anchor: "middle", baseline: "middle", size: 12, fill: theme.groupText });
|
|
10184
9850
|
}
|
|
10185
9851
|
const labels = [];
|
|
10186
|
-
const dynamic = _optionalChain([graph, 'access',
|
|
9852
|
+
const dynamic = _optionalChain([graph, 'access', _393 => _393.data, 'optionalAccess', _394 => _394.c4Type]) === "C4Dynamic";
|
|
10187
9853
|
graph.edges.forEach((edge, index) => {
|
|
10188
9854
|
const from = box(edge.source);
|
|
10189
9855
|
const to = box(edge.target);
|
|
@@ -10211,7 +9877,7 @@ var c4Scene = ({ graph, layout: layout2, theme }) => {
|
|
|
10211
9877
|
const top = geo.label.y + offsetY - 7;
|
|
10212
9878
|
const textFill = style.textColor || theme.text;
|
|
10213
9879
|
const label = `${dynamic ? `${index + 1}: ` : ""}${_nullishCoalesce(edge.label, () => ( ""))}`;
|
|
10214
|
-
const tech = typeof _optionalChain([edge, 'access',
|
|
9880
|
+
const tech = typeof _optionalChain([edge, 'access', _395 => _395.data, 'optionalAccess', _396 => _396.tech]) === "string" && edge.data.tech ? `[${edge.data.tech}]` : "";
|
|
10215
9881
|
const gridWidth = Math.max(label ? estimateTextWidth2(label, REL_FONT) : 0, tech ? estimateTextWidth2(tech, REL_FONT) : 0);
|
|
10216
9882
|
if (label)
|
|
10217
9883
|
labels.push({ kind: "text", key: `relation-label:${edge.id}`, role: "relation-label", target: edge.id, x: left, y: top + REL_LINE / 2, text: label, anchor: "start", baseline: "middle", size: REL_FONT, fill: textFill });
|
|
@@ -10487,8 +10153,8 @@ function iconMarks(key, target, icon, x, y, size2, theme) {
|
|
|
10487
10153
|
);
|
|
10488
10154
|
return marks;
|
|
10489
10155
|
}
|
|
10490
|
-
var isJunction = (n3) => n3.shape === "sm-circ" || !!_optionalChain([n3, 'access',
|
|
10491
|
-
var iconOf = (data) => typeof _optionalChain([data, 'optionalAccess',
|
|
10156
|
+
var isJunction = (n3) => n3.shape === "sm-circ" || !!_optionalChain([n3, 'access', _397 => _397.data, 'optionalAccess', _398 => _398.junction]);
|
|
10157
|
+
var iconOf = (data) => typeof _optionalChain([data, 'optionalAccess', _399 => _399.icon]) === "string" && data.icon ? data.icon : void 0;
|
|
10492
10158
|
function titleMark2(graph, layout2, theme) {
|
|
10493
10159
|
if (!graph.title) return null;
|
|
10494
10160
|
const groupIds = new Set(graph.groups.map((g) => g.id));
|
|
@@ -10524,7 +10190,7 @@ var architectureScene = ({ graph, layout: layout2, theme }) => {
|
|
|
10524
10190
|
const icon = iconOf(group.data);
|
|
10525
10191
|
marks.push({ kind: "rect", key: `group:${group.id}`, role: "group", target: group.id, ...b, fill: "none", stroke: theme.groupStroke, strokeWidth: 2, dash: "8" });
|
|
10526
10192
|
if (icon) marks.push(...iconMarks(`group:${group.id}`, group.id, icon, b.x + 1, b.y + 1, A.groupIconSize, theme));
|
|
10527
|
-
const label = _optionalChain([group, 'access',
|
|
10193
|
+
const label = _optionalChain([group, 'access', _400 => _400.data, 'optionalAccess', _401 => _401.untitled]) ? "" : group.label;
|
|
10528
10194
|
if (label)
|
|
10529
10195
|
marks.push({ kind: "text", key: `group-label:${group.id}`, role: "group-label", target: group.id, x: b.x + (icon ? A.groupIconSize + 4 : 4), y: b.y + 7 + 19 / 2, text: label, anchor: "start", baseline: "middle", size: A.fontSize, fill: theme.groupText });
|
|
10530
10196
|
}
|
|
@@ -10561,7 +10227,7 @@ var architectureScene = ({ graph, layout: layout2, theme }) => {
|
|
|
10561
10227
|
continue;
|
|
10562
10228
|
}
|
|
10563
10229
|
marks.push(...iconMarks(`service:${node.id}`, node.id, iconOf(node.data), b.x, b.y, b.width, theme));
|
|
10564
|
-
if (_optionalChain([node, 'access',
|
|
10230
|
+
if (_optionalChain([node, 'access', _402 => _402.data, 'optionalAccess', _403 => _403.untitled])) continue;
|
|
10565
10231
|
_chunkZVNAMTFOcjs.serviceLabelLines.call(void 0, _nullishCoalesce(node.label, () => ( ""))).forEach(
|
|
10566
10232
|
(text2, i) => marks.push({ kind: "text", key: `service-label:${node.id}:${i}`, role: "service-label", target: node.id, x: b.x + b.width / 2, y: b.y + b.height + (i + 0.5) * A.lineHeight, text: text2, anchor: "middle", baseline: "middle", size: A.fontSize, fill: theme.text })
|
|
10567
10233
|
);
|
|
@@ -10576,7 +10242,7 @@ var architectureScene = ({ graph, layout: layout2, theme }) => {
|
|
|
10576
10242
|
var M7 = _chunkZVNAMTFOcjs.GANTT_METRICS;
|
|
10577
10243
|
var CRIT = 3;
|
|
10578
10244
|
function statusOf(node) {
|
|
10579
|
-
const tags = Array.isArray(_optionalChain([node, 'optionalAccess',
|
|
10245
|
+
const tags = Array.isArray(_optionalChain([node, 'optionalAccess', _404 => _404.data, 'optionalAccess', _405 => _405.tags])) ? node.data.tags.map(String) : [];
|
|
10580
10246
|
const done2 = tags.includes("done");
|
|
10581
10247
|
const active = tags.includes("active");
|
|
10582
10248
|
const crit = tags.includes("crit");
|
|
@@ -10666,7 +10332,7 @@ var ganttScene = ({ graph, selection, theme }) => {
|
|
|
10666
10332
|
const node = nodes.get(row.id);
|
|
10667
10333
|
const status = statusOf(node);
|
|
10668
10334
|
const colours2 = barColours(theme, status);
|
|
10669
|
-
const label = (_nullishCoalesce(_optionalChain([node, 'optionalAccess',
|
|
10335
|
+
const label = (_nullishCoalesce(_optionalChain([node, 'optionalAccess', _406 => _406.label]), () => ( row.id))).replace(/<br\s*\/?>/gi, " ");
|
|
10670
10336
|
if (row.milestone) {
|
|
10671
10337
|
const cx = row.x + row.width / 2;
|
|
10672
10338
|
const cy = row.y + row.height / 2;
|
|
@@ -10771,10 +10437,10 @@ var timelineScene = ({ graph, theme }) => {
|
|
|
10771
10437
|
for (const l of geo.eventLines) marks.push(...arrowLine(`event-line:${l.periodId}`, l.x, l.y1, l.x, l.y2, M8.eventLineWidth, true, line4));
|
|
10772
10438
|
marks.push(...arrowLine("axis", geo.axis.x1, geo.axis.y, geo.axis.x2, geo.axis.y, M8.axisWidth, false, line4));
|
|
10773
10439
|
for (const e of geo.events) box(`event:${e.periodId}:${e.index}`, "event", e.periodId, e, e.colour, e.text, void 0, true);
|
|
10774
|
-
for (const s of geo.sections.values()) box(`section:${s.id}`, "section", s.id, s, s.colour, _nullishCoalesce(_optionalChain([groups, 'access',
|
|
10440
|
+
for (const s of geo.sections.values()) box(`section:${s.id}`, "section", s.id, s, s.colour, _nullishCoalesce(_optionalChain([groups, 'access', _407 => _407.get, 'call', _408 => _408(s.id), 'optionalAccess', _409 => _409.label]), () => ( s.id)), s.empty ? 0.6 : void 0);
|
|
10775
10441
|
for (const p of geo.periods.values()) {
|
|
10776
10442
|
const node = nodes.get(p.id);
|
|
10777
|
-
box(`period:${p.id}`, "period", p.id, p, p.colour, _nullishCoalesce(_optionalChain([node, 'optionalAccess',
|
|
10443
|
+
box(`period:${p.id}`, "period", p.id, p, p.colour, _nullishCoalesce(_optionalChain([node, 'optionalAccess', _410 => _410.label]), () => ( p.id)));
|
|
10778
10444
|
}
|
|
10779
10445
|
if (graph.title)
|
|
10780
10446
|
marks.push({ kind: "text", key: "title", role: "title", target: DIAGRAM_TITLE_TARGET, x: geo.title.x, y: geo.title.baseline, text: graph.title, anchor: "start", baseline: "bottom", size: 32, weight: 700, fill: theme.text });
|
|
@@ -10828,7 +10494,7 @@ function markBounds(mark) {
|
|
|
10828
10494
|
}
|
|
10829
10495
|
case "path": {
|
|
10830
10496
|
if (mark.box) return [mark.box.x, mark.box.y, mark.box.x + mark.box.width, mark.box.y + mark.box.height];
|
|
10831
|
-
const nums = _nullishCoalesce(_optionalChain([mark, 'access',
|
|
10497
|
+
const nums = _nullishCoalesce(_optionalChain([mark, 'access', _411 => _411.d, 'access', _412 => _412.match, 'call', _413 => _413(/-?\d*\.?\d+(?:e-?\d+)?/gi), 'optionalAccess', _414 => _414.map, 'call', _415 => _415(Number)]), () => ( []));
|
|
10832
10498
|
if (nums.length < 2) return null;
|
|
10833
10499
|
let x0 = Infinity, y0 = Infinity, x1 = -Infinity, y1 = -Infinity;
|
|
10834
10500
|
for (let i = 0; i + 1 < nums.length; i += 2) {
|
|
@@ -10937,7 +10603,7 @@ function diagramRenameOp(doc, target, label) {
|
|
|
10937
10603
|
function diagramTargetLabel(doc, target) {
|
|
10938
10604
|
const { graph } = doc;
|
|
10939
10605
|
if (target === DIAGRAM_TITLE_TARGET) return _nullishCoalesce(graph.title, () => ( ""));
|
|
10940
|
-
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([graph, 'access',
|
|
10606
|
+
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([graph, 'access', _416 => _416.groups, 'access', _417 => _417.find, 'call', _418 => _418((g) => g.id === target), 'optionalAccess', _419 => _419.label]), () => ( _optionalChain([graph, 'access', _420 => _420.edges, 'access', _421 => _421.find, 'call', _422 => _422((e) => e.id === target), 'optionalAccess', _423 => _423.label]))), () => ( _optionalChain([graph, 'access', _424 => _424.nodes, 'access', _425 => _425.find, 'call', _426 => _426((n3) => n3.id === target), 'optionalAccess', _427 => _427.label]))), () => ( null));
|
|
10941
10607
|
}
|
|
10942
10608
|
|
|
10943
10609
|
// src/canvas/mermaid/shapes.ts
|
|
@@ -11155,7 +10821,7 @@ function mermaidLabelLines(label) {
|
|
|
11155
10821
|
return String(label).replace(/^"`?|`?"$/g, "").split(/<br\s*\/?>|\n/i).map((line4) => line4.replace(/<[^>]+>/g, ""));
|
|
11156
10822
|
}
|
|
11157
10823
|
function mermaidNodeMembers(data) {
|
|
11158
|
-
const list = [..._nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
10824
|
+
const list = [..._nullishCoalesce(_optionalChain([data, 'optionalAccess', _428 => _428.members]), () => ( [])), ..._nullishCoalesce(_optionalChain([data, 'optionalAccess', _429 => _429.attributes]), () => ( []))];
|
|
11159
10825
|
return list.map((m) => _nullishCoalesce(m.raw, () => ( "")));
|
|
11160
10826
|
}
|
|
11161
10827
|
|
|
@@ -11228,10 +10894,10 @@ function mermaidToSvg(doc, options = {}) {
|
|
|
11228
10894
|
}
|
|
11229
10895
|
const depth2 = (id) => {
|
|
11230
10896
|
let d = 0;
|
|
11231
|
-
let cur = _optionalChain([graph, 'access',
|
|
10897
|
+
let cur = _optionalChain([graph, 'access', _430 => _430.groups, 'access', _431 => _431.find, 'call', _432 => _432((g) => g.id === id), 'optionalAccess', _433 => _433.parentId]);
|
|
11232
10898
|
while (cur && d < 50) {
|
|
11233
10899
|
d++;
|
|
11234
|
-
cur = _optionalChain([graph, 'access',
|
|
10900
|
+
cur = _optionalChain([graph, 'access', _434 => _434.groups, 'access', _435 => _435.find, 'call', _436 => _436((g) => g.id === cur), 'optionalAccess', _437 => _437.parentId]);
|
|
11235
10901
|
}
|
|
11236
10902
|
return d;
|
|
11237
10903
|
};
|
|
@@ -11278,7 +10944,7 @@ function mermaidToSvg(doc, options = {}) {
|
|
|
11278
10944
|
const fill = _nullishCoalesce(st.fill, () => ( theme.nodeFill));
|
|
11279
10945
|
const stroke = _nullishCoalesce(st.stroke, () => ( theme.nodeStroke));
|
|
11280
10946
|
const color = _nullishCoalesce(st.color, () => ( theme.text));
|
|
11281
|
-
const strokeWidth = _nullishCoalesce(_optionalChain([st, 'access',
|
|
10947
|
+
const strokeWidth = _nullishCoalesce(_optionalChain([st, 'access', _438 => _438["stroke-width"], 'optionalAccess', _439 => _439.replace, 'call', _440 => _440("px", "")]), () => ( "1.25"));
|
|
11282
10948
|
const paint = (kind) => kind === "shape" ? `fill="${esc2(fill)}" stroke="${esc2(stroke)}" stroke-width="${esc2(strokeWidth)}"` : kind === "line" ? `fill="none" stroke="${esc2(stroke)}" stroke-width="${esc2(strokeWidth)}"` : kind === "filled" ? `fill="${esc2(stroke)}" stroke="${esc2(stroke)}"` : 'fill="none" stroke="none"';
|
|
11283
10949
|
out.push(`<g data-node="${esc2(node.id)}" transform="translate(${n2(b.x)} ${n2(b.y)})">`);
|
|
11284
10950
|
for (const path of mermaidShapePaths(node.shape, b.width, b.height)) out.push(`<path d="${path.d}" ${paint(path.paint)}/>`);
|
|
@@ -11311,7 +10977,7 @@ function rasterSize(width, height, scale = 2, maxSize = DIAGRAM_RASTER_MAX_SIZE)
|
|
|
11311
10977
|
var NO_DOM = 'Rasterizing needs a browser DOM (document, Image and a 2D canvas). Outside a browser, use the SVG (mermaidToSvg, or render_diagram with format "svg") with an SVG renderer.';
|
|
11312
10978
|
async function rasterizeSvg(svg, options) {
|
|
11313
10979
|
const doc = _nullishCoalesce(options.document, () => ( globalThis.document));
|
|
11314
|
-
const ImageCtor = _nullishCoalesce(_optionalChain([doc, 'optionalAccess',
|
|
10980
|
+
const ImageCtor = _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _441 => _441.defaultView, 'optionalAccess', _442 => _442.Image]), () => ( globalThis.Image));
|
|
11315
10981
|
if (!doc || typeof doc.createElement !== "function" || !ImageCtor) throw new Error(NO_DOM);
|
|
11316
10982
|
const size2 = rasterSize(options.width, options.height, options.scale, options.maxSize);
|
|
11317
10983
|
const canvas = doc.createElement("canvas");
|
|
@@ -11346,7 +11012,7 @@ function diagramFileName(doc, extension2) {
|
|
|
11346
11012
|
}
|
|
11347
11013
|
async function downloadDiagramPng(doc, options = {}) {
|
|
11348
11014
|
const drawn = mermaidToSvg(doc, options);
|
|
11349
|
-
const background = _nullishCoalesce(options.background, () => ( (options.transparent ? "transparent" : _nullishCoalesce(_optionalChain([options, 'access',
|
|
11015
|
+
const background = _nullishCoalesce(options.background, () => ( (options.transparent ? "transparent" : _nullishCoalesce(_optionalChain([options, 'access', _443 => _443.theme, 'optionalAccess', _444 => _444.background]), () => ( DIAGRAM_SVG_LIGHT_THEME.background)))));
|
|
11350
11016
|
const image = await rasterizeSvg(drawn.svg, { ...options, width: drawn.width, height: drawn.height, background });
|
|
11351
11017
|
const filename = _nullishCoalesce(options.filename, () => ( diagramFileName(doc, "png")));
|
|
11352
11018
|
const page = _nullishCoalesce(options.document, () => ( document));
|
|
@@ -11386,7 +11052,7 @@ function mermaidMovesFromCanvas(layout2, moved, all = moved, options = {}) {
|
|
|
11386
11052
|
for (const n3 of all) {
|
|
11387
11053
|
if (movedIds.has(n3.id)) continue;
|
|
11388
11054
|
let parent = n3.parentId;
|
|
11389
|
-
while (parent && !movedIds.has(parent)) parent = _optionalChain([byId, 'access',
|
|
11055
|
+
while (parent && !movedIds.has(parent)) parent = _optionalChain([byId, 'access', _445 => _445.get, 'call', _446 => _446(parent), 'optionalAccess', _447 => _447.parentId]);
|
|
11390
11056
|
if (parent) moves.push({ id: n3.id, position: absolute(n3.id) });
|
|
11391
11057
|
}
|
|
11392
11058
|
if (!moves.length) return null;
|
|
@@ -11422,10 +11088,10 @@ function getAgentCardAnchor(agentId = "agent", nodeId = "node", zone = 0, option
|
|
|
11422
11088
|
const seed = hashString(`${agentId}:${nodeId}:${zoneName}`);
|
|
11423
11089
|
const offsetX = seed % 17 - 8;
|
|
11424
11090
|
const offsetY = (seed >> 4) % 9 - 4;
|
|
11425
|
-
const jitterX = _optionalChain([options, 'optionalAccess',
|
|
11426
|
-
const jitterY = _optionalChain([options, 'optionalAccess',
|
|
11427
|
-
const maxX = _optionalChain([options, 'optionalAccess',
|
|
11428
|
-
const maxY = _optionalChain([options, 'optionalAccess',
|
|
11091
|
+
const jitterX = _optionalChain([options, 'optionalAccess', _448 => _448.randomJitter]) ? (Math.random() - 0.5) * 24 : 0;
|
|
11092
|
+
const jitterY = _optionalChain([options, 'optionalAccess', _449 => _449.randomJitter]) ? (Math.random() - 0.5) * 16 : 0;
|
|
11093
|
+
const maxX = _optionalChain([options, 'optionalAccess', _450 => _450.width]) ? Math.max(24, options.width - 20) : 230;
|
|
11094
|
+
const maxY = _optionalChain([options, 'optionalAccess', _451 => _451.height]) ? Math.max(20, options.height - 15) : 145;
|
|
11429
11095
|
return {
|
|
11430
11096
|
x: Math.max(16, Math.min(maxX, Math.round(base.x + offsetX + jitterX))),
|
|
11431
11097
|
y: Math.max(14, Math.min(maxY, Math.round(base.y + offsetY + jitterY))),
|
|
@@ -11434,8 +11100,8 @@ function getAgentCardAnchor(agentId = "agent", nodeId = "node", zone = 0, option
|
|
|
11434
11100
|
}
|
|
11435
11101
|
function calculateCurvedPath(fromX, fromY, toX, toY, progress, options) {
|
|
11436
11102
|
const p = Math.max(0, Math.min(1, progress));
|
|
11437
|
-
const arcHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11438
|
-
const wobble = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11103
|
+
const arcHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _452 => _452.arcHeight]), () => ( -30));
|
|
11104
|
+
const wobble = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _453 => _453.wobble]), () => ( 0));
|
|
11439
11105
|
const arc2 = Math.sin(p * Math.PI) * arcHeight;
|
|
11440
11106
|
const sway = Math.sin(p * Math.PI * 2) * wobble;
|
|
11441
11107
|
const currentX = fromX + (toX - fromX) * p + sway;
|
|
@@ -11462,7 +11128,7 @@ function getNaturalMovementTiming(distance, seedStr = "drag") {
|
|
|
11462
11128
|
function getCursorTransitionDuration(distance, seedStr = "cursor", options) {
|
|
11463
11129
|
const seed = hashString(seedStr);
|
|
11464
11130
|
const jitter = seed % 60 - 30;
|
|
11465
|
-
const variance = _optionalChain([options, 'optionalAccess',
|
|
11131
|
+
const variance = _optionalChain([options, 'optionalAccess', _454 => _454.naturalVariance]) ? 0.85 + Math.random() * 0.3 : 1;
|
|
11466
11132
|
let baseDuration = 560;
|
|
11467
11133
|
if (distance < 60) {
|
|
11468
11134
|
baseDuration = 340;
|
|
@@ -11499,10 +11165,10 @@ function formatAgentCursorName(nameOrUsername) {
|
|
|
11499
11165
|
}
|
|
11500
11166
|
function isAgentCursor(cursor) {
|
|
11501
11167
|
if (cursor.isAgent) return true;
|
|
11502
|
-
if (_optionalChain([cursor, 'access',
|
|
11503
|
-
if (_optionalChain([cursor, 'access',
|
|
11504
|
-
if (_optionalChain([cursor, 'access',
|
|
11505
|
-
const roleLower = _optionalChain([cursor, 'access',
|
|
11168
|
+
if (_optionalChain([cursor, 'access', _455 => _455.userId, 'optionalAccess', _456 => _456.startsWith, 'call', _457 => _457("agent_")]) || _optionalChain([cursor, 'access', _458 => _458.userId, 'optionalAccess', _459 => _459.startsWith, 'call', _460 => _460("agent-")])) return true;
|
|
11169
|
+
if (_optionalChain([cursor, 'access', _461 => _461.id, 'optionalAccess', _462 => _462.startsWith, 'call', _463 => _463("agent-")]) || _optionalChain([cursor, 'access', _464 => _464.id, 'optionalAccess', _465 => _465.startsWith, 'call', _466 => _466("agent_")])) return true;
|
|
11170
|
+
if (_optionalChain([cursor, 'access', _467 => _467.username, 'optionalAccess', _468 => _468.startsWith, 'call', _469 => _469("@agent_")]) || _optionalChain([cursor, 'access', _470 => _470.username, 'optionalAccess', _471 => _471.startsWith, 'call', _472 => _472("agent_")])) return true;
|
|
11171
|
+
const roleLower = _optionalChain([cursor, 'access', _473 => _473.role, 'optionalAccess', _474 => _474.toLowerCase, 'call', _475 => _475()]) || "";
|
|
11506
11172
|
if (roleLower.includes("agent") || roleLower.includes("specialist") || roleLower === "planner" || roleLower === "coordinator" || roleLower === "executor" || roleLower === "validator" || roleLower === "supervisor") {
|
|
11507
11173
|
return true;
|
|
11508
11174
|
}
|
|
@@ -11513,6 +11179,29 @@ function isAgentCursor(cursor) {
|
|
|
11513
11179
|
return false;
|
|
11514
11180
|
}
|
|
11515
11181
|
|
|
11182
|
+
// src/canvas/playback.ts
|
|
11183
|
+
function createCanvasPlaybackLocator(options) {
|
|
11184
|
+
return (ref) => {
|
|
11185
|
+
const nodes = options.getNodes();
|
|
11186
|
+
const lookup = _chunkUBRYHNRUcjs.createNodeLookup.call(void 0, nodes);
|
|
11187
|
+
const rectOf = (id) => {
|
|
11188
|
+
const node = lookup.get(id);
|
|
11189
|
+
return node ? _chunkUBRYHNRUcjs.getNodeRect.call(void 0, node, lookup, options.rectOptions) : null;
|
|
11190
|
+
};
|
|
11191
|
+
if (ref.kind === "node" || ref.kind === "item") return rectOf(ref.id);
|
|
11192
|
+
if (ref.kind === "edge") {
|
|
11193
|
+
const edge = _optionalChain([options, 'access', _476 => _476.getEdges, 'optionalCall', _477 => _477(), 'access', _478 => _478.find, 'call', _479 => _479((e) => e.id === ref.id)]);
|
|
11194
|
+
const a = edge && rectOf(edge.source);
|
|
11195
|
+
const b = edge && rectOf(edge.target);
|
|
11196
|
+
if (!a || !b) return null;
|
|
11197
|
+
const x = (a.x + a.width / 2 + b.x + b.width / 2) / 2;
|
|
11198
|
+
const y = (a.y + a.height / 2 + b.y + b.height / 2) / 2;
|
|
11199
|
+
return { x: x - 12, y: y - 12, width: 24, height: 24 };
|
|
11200
|
+
}
|
|
11201
|
+
return null;
|
|
11202
|
+
};
|
|
11203
|
+
}
|
|
11204
|
+
|
|
11516
11205
|
// src/canvas/capture.ts
|
|
11517
11206
|
var CANVAS_CAPTURE_VIEWPORT_SELECTOR = ".xyflow__viewport, .react-flow__viewport, .svelte-flow__viewport";
|
|
11518
11207
|
var CANVAS_CAPTURE_CHROME_SELECTORS = [
|
|
@@ -11536,8 +11225,8 @@ var CANVAS_CAPTURE_OVERLAY_SELECTORS = [
|
|
|
11536
11225
|
".svelte-flow__resize-control"
|
|
11537
11226
|
];
|
|
11538
11227
|
var size = (node) => ({
|
|
11539
|
-
width: _nullishCoalesce(_nullishCoalesce(_optionalChain([node, 'access',
|
|
11540
|
-
height: _nullishCoalesce(_nullishCoalesce(_optionalChain([node, 'access',
|
|
11228
|
+
width: _nullishCoalesce(_nullishCoalesce(_optionalChain([node, 'access', _480 => _480.measured, 'optionalAccess', _481 => _481.width]), () => ( node.width)), () => ( 0)),
|
|
11229
|
+
height: _nullishCoalesce(_nullishCoalesce(_optionalChain([node, 'access', _482 => _482.measured, 'optionalAccess', _483 => _483.height]), () => ( node.height)), () => ( 0))
|
|
11541
11230
|
});
|
|
11542
11231
|
function canvasNodeCaptureRect(node, nodes) {
|
|
11543
11232
|
if (node.hidden) return null;
|
|
@@ -11612,7 +11301,7 @@ function createCanvasCaptureSurface(options) {
|
|
|
11612
11301
|
vpEl.style.transform = `translate(${-request.rect.x * zoom}px, ${-request.rect.y * zoom}px) scale(${zoom})`;
|
|
11613
11302
|
vpEl.style.transformOrigin = "0 0";
|
|
11614
11303
|
for (let node = vpEl; node && node !== clone; node = node.parentElement) {
|
|
11615
|
-
for (const sibling of Array.from(_nullishCoalesce(_optionalChain([node, 'access',
|
|
11304
|
+
for (const sibling of Array.from(_nullishCoalesce(_optionalChain([node, 'access', _484 => _484.parentElement, 'optionalAccess', _485 => _485.children]), () => ( [])))) {
|
|
11616
11305
|
if (sibling !== node) sibling.remove();
|
|
11617
11306
|
}
|
|
11618
11307
|
}
|
|
@@ -11640,7 +11329,7 @@ var CANVAS_EFFECT_PLACES = {
|
|
|
11640
11329
|
transition: ["transition"]
|
|
11641
11330
|
};
|
|
11642
11331
|
function canvasNodeEffect(node) {
|
|
11643
|
-
const shape = _optionalChain([node, 'access',
|
|
11332
|
+
const shape = _optionalChain([node, 'access', _486 => _486.data, 'optionalAccess', _487 => _487.shape]);
|
|
11644
11333
|
return _chunkNM3G4VQTcjs.isShapeDescription.call(void 0, shape) ? shape.effect : void 0;
|
|
11645
11334
|
}
|
|
11646
11335
|
function createCanvasEffectsController(options) {
|
|
@@ -11658,7 +11347,7 @@ function createCanvasEffectsController(options) {
|
|
|
11658
11347
|
const shapeNode = (id) => {
|
|
11659
11348
|
const node = options.getNodes().find((n3) => n3.id === id);
|
|
11660
11349
|
if (!node) throw new Error(`There is no node "${id}"; the nodes are ${options.getNodes().map((n3) => `"${n3.id}"`).slice(0, 20).join(", ") || "none"}.`);
|
|
11661
|
-
const shape = _optionalChain([node, 'access',
|
|
11350
|
+
const shape = _optionalChain([node, 'access', _488 => _488.data, 'optionalAccess', _489 => _489.shape]);
|
|
11662
11351
|
if (!_chunkNM3G4VQTcjs.isShapeDescription.call(void 0, shape)) throw new Error(`Node "${id}" is not a shape; effects draw on shape nodes (data.shape).`);
|
|
11663
11352
|
return { node, shape };
|
|
11664
11353
|
};
|
|
@@ -11748,11 +11437,11 @@ function createCanvasEffectsController(options) {
|
|
|
11748
11437
|
},
|
|
11749
11438
|
/** The scenes, in order (empty without a Scenes store). */
|
|
11750
11439
|
scenes() {
|
|
11751
|
-
return _nullishCoalesce(_optionalChain([options, 'access',
|
|
11440
|
+
return _nullishCoalesce(_optionalChain([options, 'access', _490 => _490.scenes, 'optionalAccess', _491 => _491.getState, 'call', _492 => _492(), 'access', _493 => _493.scenes]), () => ( []));
|
|
11752
11441
|
},
|
|
11753
11442
|
/** The transition into a scene, if it has one. */
|
|
11754
11443
|
sceneTransition(sceneId) {
|
|
11755
|
-
return _optionalChain([options, 'access',
|
|
11444
|
+
return _optionalChain([options, 'access', _494 => _494.scenes, 'optionalAccess', _495 => _495.getScene, 'call', _496 => _496(sceneId), 'optionalAccess', _497 => _497.transition]);
|
|
11756
11445
|
},
|
|
11757
11446
|
/**
|
|
11758
11447
|
* Sets (or with `effect` null removes) the provider transition played when the canvas moves to
|
|
@@ -11813,7 +11502,7 @@ function runCanvasNodeEffect(options) {
|
|
|
11813
11502
|
if (options.animate !== false && effect.playing !== false) cancel = clock.frame(tick);
|
|
11814
11503
|
},
|
|
11815
11504
|
(e) => {
|
|
11816
|
-
if (!stopped) _optionalChain([options, 'access',
|
|
11505
|
+
if (!stopped) _optionalChain([options, 'access', _498 => _498.onError, 'optionalCall', _499 => _499(e)]);
|
|
11817
11506
|
}
|
|
11818
11507
|
);
|
|
11819
11508
|
};
|
|
@@ -11876,7 +11565,7 @@ async function transitionCanvasView(options) {
|
|
|
11876
11565
|
overlay.setAttribute("data-capture", "overlay");
|
|
11877
11566
|
overlay.setAttribute("data-canvas-transition", options.transition.effect);
|
|
11878
11567
|
Object.assign(overlay.style, { position: "absolute", inset: "0", width: "100%", height: "100%", pointerEvents: "none", zIndex: "1000" });
|
|
11879
|
-
_optionalChain([overlay, 'access',
|
|
11568
|
+
_optionalChain([overlay, 'access', _500 => _500.getContext, 'call', _501 => _501("2d"), 'optionalAccess', _502 => _502.putImageData, 'call', _503 => _503(new ImageData(new Uint8ClampedArray(from.data), size2.width, size2.height), 0, 0)]);
|
|
11880
11569
|
if (getComputedStyle(element).position === "static") element.style.position = "relative";
|
|
11881
11570
|
element.appendChild(overlay);
|
|
11882
11571
|
try {
|
|
@@ -11907,7 +11596,7 @@ function createCanvasEffectsToolProvider(controller, options = {}) {
|
|
|
11907
11596
|
return ro ? typeof ro === "string" ? ro : "The canvas is read-only." : null;
|
|
11908
11597
|
};
|
|
11909
11598
|
const result = (nodeId, effect) => {
|
|
11910
|
-
const now = _optionalChain([controller, 'access',
|
|
11599
|
+
const now = _optionalChain([controller, 'access', _504 => _504.list, 'call', _505 => _505(nodeId), 'access', _506 => _506[0], 'optionalAccess', _507 => _507.effect]);
|
|
11911
11600
|
return { target: nodeId, effect: info(_nullishCoalesce(effect, () => ( now))), effects: now ? [info(now)] : [] };
|
|
11912
11601
|
};
|
|
11913
11602
|
const once = (instance) => {
|
|
@@ -12494,4 +12183,5 @@ function createCanvasEffectsToolProvider(controller, options = {}) {
|
|
|
12494
12183
|
|
|
12495
12184
|
|
|
12496
12185
|
|
|
12497
|
-
exports.ANIMATABLE_PROPERTIES = ANIMATABLE_PROPERTIES; exports.ANIMATION_DATA_KEY = ANIMATION_DATA_KEY; exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkSVR5FR7Bcjs.ANIMATION_TIME_EPSILON; exports.AUTO_LAYOUT_DATA_KEY = AUTO_LAYOUT_DATA_KEY; exports.AnimationEditError = AnimationEditError; exports.AnimationPlayer = _chunkSVR5FR7Bcjs.AnimationPlayer; exports.BUILTIN_FAMILY_SCENES = BUILTIN_FAMILY_SCENES; exports.CANVAS_CAPTURE_CHROME_SELECTORS = CANVAS_CAPTURE_CHROME_SELECTORS; exports.CANVAS_CAPTURE_OVERLAY_SELECTORS = CANVAS_CAPTURE_OVERLAY_SELECTORS; exports.CANVAS_CAPTURE_VIEWPORT_SELECTOR = CANVAS_CAPTURE_VIEWPORT_SELECTOR; exports.CANVAS_COMPONENT_DRAG_TYPE = CANVAS_COMPONENT_DRAG_TYPE; exports.CANVAS_EFFECT_PLACES = CANVAS_EFFECT_PLACES; exports.CANVAS_GRADIENT_PRESETS = _chunkNM3G4VQTcjs.CANVAS_GRADIENT_PRESETS; exports.CANVAS_TOKEN_PROPERTIES = CANVAS_TOKEN_PROPERTIES; exports.CARD_INSPECTION_ZONES = CARD_INSPECTION_ZONES; exports.CHILD_LAYOUT_DATA_KEY = CHILD_LAYOUT_DATA_KEY; exports.COMPONENT_DATA_KEY = COMPONENT_DATA_KEY; exports.COMPONENT_OVERRIDES_DATA_KEY = COMPONENT_OVERRIDES_DATA_KEY; exports.COMPONENT_PROPERTY_REFS_DATA_KEY = COMPONENT_PROPERTY_REFS_DATA_KEY; exports.COMPONENT_SET_DATA_KEY = COMPONENT_SET_DATA_KEY; exports.COMPONENT_SOURCE_DATA_KEY = COMPONENT_SOURCE_DATA_KEY; exports.CONNECTION_LINE_TYPES = CONNECTION_LINE_TYPES; exports.CSS_ANIMATION_PROPERTIES = CSS_ANIMATION_PROPERTIES; exports.CSS_VARIABLE_DIAGRAM_SCENE_THEME = CSS_VARIABLE_DIAGRAM_SCENE_THEME; exports.CUBIC_BEZIER_PRESETS = _chunkDWJJI6RTcjs.CUBIC_BEZIER_PRESETS; exports.CanvasScenesStore = CanvasScenesStore; exports.DEFAULT_ARRANGE_SHORTCUTS = _chunk4EFNS2HVcjs.DEFAULT_ARRANGE_SHORTCUTS; exports.DEFAULT_CURSOR_INACTIVITY_MS = DEFAULT_CURSOR_INACTIVITY_MS; exports.DEFAULT_DIAGRAM_NODE_HEIGHT = DEFAULT_DIAGRAM_NODE_HEIGHT; exports.DEFAULT_DIAGRAM_NODE_WIDTH = DEFAULT_DIAGRAM_NODE_WIDTH; exports.DEFAULT_NODE_HEIGHT = _chunkMRD3NXKRcjs.DEFAULT_NODE_HEIGHT; exports.DEFAULT_NODE_WIDTH = _chunkMRD3NXKRcjs.DEFAULT_NODE_WIDTH; exports.DEFAULT_PLACEMENT_GAP = _chunkMRD3NXKRcjs.DEFAULT_PLACEMENT_GAP; exports.DIAGRAM_MARKER_IDS = DIAGRAM_MARKER_IDS; exports.DIAGRAM_RASTER_MAX_SIZE = DIAGRAM_RASTER_MAX_SIZE; exports.DIAGRAM_SCENE_DARK_THEME = DIAGRAM_SCENE_DARK_THEME; exports.DIAGRAM_SCENE_LIGHT_THEME = DIAGRAM_SCENE_LIGHT_THEME; exports.DIAGRAM_SVG_DARK_THEME = DIAGRAM_SVG_DARK_THEME; exports.DIAGRAM_SVG_LIGHT_THEME = DIAGRAM_SVG_LIGHT_THEME; exports.DIAGRAM_TITLE_TARGET = DIAGRAM_TITLE_TARGET; exports.DiagramStream = DiagramStream; exports.INSTANCE_DATA_KEY = INSTANCE_DATA_KEY; exports.LOCKED_DATA_KEY = LOCKED_DATA_KEY; exports.LOCKED_PREVIOUS_FLAGS_KEY = LOCKED_PREVIOUS_FLAGS_KEY; exports.MAX_KEYFRAME_REFS = MAX_KEYFRAME_REFS; exports.MERMAID_SHAPE_PAINT = MERMAID_SHAPE_PAINT; exports.ManualClock = _chunkSVR5FR7Bcjs.ManualClock; exports.PATHFINDER_OPERATIONS = _chunkYAWLMF3Ocjs.PATHFINDER_OPERATIONS; exports.PIXERATE_BRAND_GRADIENT = _chunkNM3G4VQTcjs.PIXERATE_BRAND_GRADIENT; exports.PathOpsError = _chunkGF2RBSDMcjs.PathOpsError; exports.PlanarMap = _chunkYAWLMF3Ocjs.PlanarMap; exports.RESIZE_HANDLES = RESIZE_HANDLES; exports.SHAPE_DATA_KEY = SHAPE_DATA_KEY; exports.SHAPE_KINDS = _chunkNM3G4VQTcjs.SHAPE_KINDS; exports.SHAPE_NODE_TYPE = SHAPE_NODE_TYPE; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.SPRING_PRESETS = _chunkDWJJI6RTcjs.SPRING_PRESETS; exports.StreamingLayoutManager = StreamingLayoutManager; exports.TOKEN_BINDINGS_DATA_KEY = TOKEN_BINDINGS_DATA_KEY; exports.TOKEN_MODES_DATA_KEY = TOKEN_MODES_DATA_KEY; exports.addCanvasVariant = addCanvasVariant; exports.addKeyframesAtTime = addKeyframesAtTime; exports.alignNodes = alignNodes; exports.angleToSvgLinearCoords = _chunkNM3G4VQTcjs.angleToSvgLinearCoords; exports.animateNode = animateNode; exports.applyAnimation = applyAnimation; exports.applyAnimationOverrides = applyAnimationOverrides; exports.applyConstraints = applyConstraints; exports.applyNodeUpdates = applyNodeUpdates; exports.applyShapeCombination = applyShapeCombination; exports.applyShapeReplacement = applyShapeReplacement; exports.arcToCubics = _chunkGF2RBSDMcjs.arcToCubics; exports.architectureScene = architectureScene; exports.autoLayoutDiagram = autoLayoutDiagram; exports.bezierPathArea = _chunkGF2RBSDMcjs.bezierPathArea; exports.bezierPathBounds = _chunkGF2RBSDMcjs.bezierPathBounds; exports.bezierPathLength = _chunkGF2RBSDMcjs.bezierPathLength; exports.bezierPathPointAtLength = _chunkGF2RBSDMcjs.bezierPathPointAtLength; exports.bezierPathSignedArea = _chunkGF2RBSDMcjs.bezierPathSignedArea; exports.bezierPathToSvg = _chunkGF2RBSDMcjs.bezierPathToSvg; exports.bindCanvasComponentProperty = bindCanvasComponentProperty; exports.bindCanvasToken = bindCanvasToken; exports.blendDiagramLayout = blendDiagramLayout; exports.blendLayout = blendLayout; exports.boundsOf = _chunkMRD3NXKRcjs.boundsOf; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeSeed = _chunkPUC43JPTcjs.brushstrokeSeed; exports.c4Scene = c4Scene; exports.calculateCursorArrowRotation = calculateCursorArrowRotation; exports.calculateCurvedPath = calculateCurvedPath; exports.calculateDagreReflowDisplacement = calculateDagreReflowDisplacement; exports.calculateDirectionalDisplacement = calculateDirectionalDisplacement; exports.canCombineShapeNodes = canCombineShapeNodes; exports.canOffsetShapeNodes = canOffsetShapeNodes; exports.canOutlineShapeNodeStrokes = canOutlineShapeNodeStrokes; exports.canvasEffectsPool = canvasEffectsPool; exports.canvasHeight = canvasHeight; exports.canvasNodeCaptureRect = canvasNodeCaptureRect; exports.canvasNodeEffect = canvasNodeEffect; exports.captureCanvasView = captureCanvasView; exports.centerNodes = _chunkMRD3NXKRcjs.centerNodes; exports.centre = _chunkMRD3NXKRcjs.centre; exports.clampAnimationValue = clampAnimationValue; exports.clampLayoutSize = clampLayoutSize; exports.closeContour = _chunkGF2RBSDMcjs.closeContour; exports.collectDescendantIds = collectDescendantIds; exports.combineCanvasComponentsAsVariants = combineCanvasComponentsAsVariants; exports.combineShapeNodes = combineShapeNodes; exports.computeDragBounds = computeDragBounds; exports.computeDragBoundsFromPoints = computeDragBoundsFromPoints; exports.computeNodesBoundingBox = computeNodesBoundingBox; exports.computeSnapGuides = computeSnapGuides; exports.connectedDiagramOnly = connectedDiagramOnly; exports.connectedOnly = connectedOnly; exports.contourEnclosesArea = _chunkYAWLMF3Ocjs.contourEnclosesArea; exports.contourSignedArea = _chunkGF2RBSDMcjs.contourSignedArea; exports.contoursToPath = _chunkGF2RBSDMcjs.contoursToPath; exports.copyKeyframes = copyKeyframes; exports.countPathSegments = _chunkGF2RBSDMcjs.countPathSegments; exports.createAnimationPlayer = _chunkSVR5FR7Bcjs.createAnimationPlayer; exports.createBezierTrajectory = createBezierTrajectory; exports.createCanvasAnimationController = createCanvasAnimationController; exports.createCanvasArrangeController = createCanvasArrangeController; exports.createCanvasAutoLayoutController = createCanvasAutoLayoutController; exports.createCanvasCaptureSurface = createCanvasCaptureSurface; exports.createCanvasCaptureToolProvider = createCanvasCaptureToolProvider; exports.createCanvasComponent = createCanvasComponent; exports.createCanvasComponentsController = createCanvasComponentsController; exports.createCanvasDrawController = createCanvasDrawController; exports.createCanvasEffectsController = createCanvasEffectsController; exports.createCanvasEffectsToolProvider = createCanvasEffectsToolProvider; exports.createCanvasInstance = createCanvasInstance; exports.createCanvasScenesStore = createCanvasScenesStore; exports.createDefaultStrokeStyle = createDefaultStrokeStyle; exports.createFanOutTrajectory = createFanOutTrajectory; exports.createGuideIndex = createGuideIndex; exports.createNodeGuideIndex = createNodeGuideIndex; exports.createNodeLookup = createNodeLookup; exports.cubicBezierAt = _chunkDWJJI6RTcjs.cubicBezierAt; exports.cubicPointAt = _chunkNM3G4VQTcjs.cubicPointAt; exports.cubicsToPathData = _chunkNM3G4VQTcjs.cubicsToPathData; exports.cutOutPiece = _chunkYAWLMF3Ocjs.cutOutPiece; exports.dashContours = _chunkGF2RBSDMcjs.dashContours; exports.defaultEasing = defaultEasing; exports.deleteKeyframes = deleteKeyframes; exports.detachCanvasInstance = detachCanvasInstance; exports.detachTokenBindings = detachTokenBindings; exports.diagramCanvasHeight = diagramCanvasHeight; exports.diagramFileName = diagramFileName; exports.diagramGroupSize = diagramGroupSize; exports.diagramImageSize = diagramImageSize; exports.diagramLayoutBounds = diagramLayoutBounds; exports.diagramMarksBounds = diagramMarksBounds; exports.diagramMarksToSvg = diagramMarksToSvg; exports.diagramRenameOp = diagramRenameOp; exports.diagramTargetLabel = diagramTargetLabel; exports.diagramTextBaseline = diagramTextBaseline; exports.diffOverrideGroups = diffOverrideGroups; exports.distanceToBezierPath = _chunkGF2RBSDMcjs.distanceToBezierPath; exports.distributeNodes = distributeNodes; exports.dividePaths = _chunkGF2RBSDMcjs.dividePaths; exports.dividePolygons = _chunkGF2RBSDMcjs.dividePolygons; exports.downloadDiagramPng = downloadDiagramPng; exports.easeDiagramTween = easeDiagramTween; exports.easingFromInfluence = _chunkDWJJI6RTcjs.easingFromInfluence; exports.easingLabel = _chunkDWJJI6RTcjs.easingLabel; exports.easingToCss = _chunkDWJJI6RTcjs.easingToCss; exports.elasticAt = _chunkDWJJI6RTcjs.elasticAt; exports.ensureDiagramLayout = ensureDiagramLayout; exports.ensureLayout = _chunkMRD3NXKRcjs.ensureLayout; exports.estimateCanvasHeight = estimateCanvasHeight; exports.estimateDiagramCanvasHeight = estimateDiagramCanvasHeight; exports.estimateDiagramNodeSize = estimateDiagramNodeSize; exports.estimateNodeSize = _chunkMRD3NXKRcjs.estimateNodeSize; exports.estimateTextWidth = estimateTextWidth2; exports.evaluateAnimation = evaluateAnimation; exports.evaluateEasing = _chunkDWJJI6RTcjs.evaluateEasing; exports.evaluateTrack = _chunkSVR5FR7Bcjs.evaluateTrack; exports.excludePaths = _chunkGF2RBSDMcjs.excludePaths; exports.exportCssAnimation = exportCssAnimation; exports.familySceneFromLayout = familySceneFromLayout; exports.findConnectorSnap = findConnectorSnap; exports.findStrokesAtPoint = findStrokesAtPoint; exports.findVariant = findVariant; exports.fitCubicRun = _chunkNM3G4VQTcjs.fitCubicRun; exports.fitCubicWithTangents = _chunkNM3G4VQTcjs.fitCubicWithTangents; exports.fitCubics = _chunkNM3G4VQTcjs.fitCubics; exports.fitFreehandPath = _chunkNM3G4VQTcjs.fitFreehandPath; exports.fitPathData = _chunkNM3G4VQTcjs.fitPathData; exports.fitViewportToNodes = fitViewportToNodes; exports.fitViewportToRect = fitViewportToRect; exports.flattenSvgPath = _chunkNM3G4VQTcjs.flattenSvgPath; exports.flowSide = _chunkMRD3NXKRcjs.flowSide; exports.formatAgentCursorName = formatAgentCursorName; exports.formatAnimationTime = formatAnimationTime; exports.formatNumber = _chunkNM3G4VQTcjs.formatNumber; exports.formatOklab = _chunk5FXOR7F2cjs.formatOklab; exports.formatVariantName = formatVariantName; exports.freehandBrushstroke = freehandBrushstroke; exports.ganttScene = ganttScene; exports.getAbsolutePosition = getAbsolutePosition; exports.getAgentCardAnchor = getAgentCardAnchor; exports.getAnimatableProperty = getAnimatableProperty; exports.getAnimatedProperties = getAnimatedProperties; exports.getAnimatedValue = getAnimatedValue; exports.getAnimationDuration = getAnimationDuration; exports.getAnimationTrack = getAnimationTrack; exports.getAutoLayout = getAutoLayout; exports.getAutoLayoutGrid = getAutoLayoutGrid; exports.getAutoLayoutInsertTarget = getAutoLayoutInsertTarget; exports.getBindableTokenProperties = getBindableTokenProperties; exports.getBrushedShapeSvg = _chunkPUC43JPTcjs.getBrushedShapeSvg; exports.getCanvasComponentDragId = getCanvasComponentDragId; exports.getCanvasTokenProperty = getCanvasTokenProperty; exports.getCenteredNodePosition = _chunkMRD3NXKRcjs.getCenteredNodePosition; exports.getChildLayout = getChildLayout; exports.getComponentData = getComponentData; exports.getComponentInstances = getComponentInstances; exports.getComponentPropertyDefs = getComponentPropertyDefs; exports.getComponentPropertyRefs = getComponentPropertyRefs; exports.getComponentSourceId = getComponentSourceId; exports.getCssPropertyAnimations = getCssPropertyAnimations; exports.getCursorTransitionDuration = getCursorTransitionDuration; exports.getDefaultVariant = getDefaultVariant; exports.getEffectiveTokenModes = getEffectiveTokenModes; exports.getFamilyScene = getFamilyScene; exports.getFlowChildren = getFlowChildren; exports.getInstanceData = getInstanceData; exports.getInstanceProperties = getInstanceProperties; exports.getInstanceStatus = getInstanceStatus; exports.getKeyframeTimes = getKeyframeTimes; exports.getLayerName = getLayerName; exports.getLayoutParent = getLayoutParent; exports.getLayoutSizing = getLayoutSizing; exports.getLayoutedNodes = _chunkMRD3NXKRcjs.getLayoutedNodes; exports.getNaturalMovementTiming = getNaturalMovementTiming; exports.getNextVariantValues = getNextVariantValues; exports.getNodeAnimation = getNodeAnimation; exports.getNodeOverrides = getNodeOverrides; exports.getNodeRect = getNodeRect; exports.getNodeShape = getNodeShape; exports.getNodeSize = getNodeSize; exports.getNodeTokenBindings = getNodeTokenBindings; exports.getNodeTokenModes = getNodeTokenModes; exports.getOwningComponent = getOwningComponent; exports.getOwningInstance = getOwningInstance; exports.getResizingNodeRect = getResizingNodeRect; exports.getRootInstance = getRootInstance; exports.getShapeRenderData = _chunkNM3G4VQTcjs.getShapeRenderData; exports.getShapeSvg = _chunkNM3G4VQTcjs.getShapeSvg; exports.getTimelineRows = getTimelineRows; exports.getTimelineTicks = getTimelineTicks; exports.getTokenPropertyScope = getTokenPropertyScope; exports.getTokensForProperty = getTokensForProperty; exports.getVariantConflicts = getVariantConflicts; exports.getVariantOptions = getVariantOptions; exports.getVariantSet = getVariantSet; exports.getVariantValues = getVariantValues; exports.gitGraphScene = gitGraphScene; exports.gradientToSvgDef = _chunkNM3G4VQTcjs.gradientToSvgDef; exports.handlePoint = handlePoint; exports.hasFamilyScene = hasFamilyScene; exports.hasVisibleStroke = hasVisibleStroke; exports.hashString = hashString; exports.hatchPath = _chunkYAWLMF3Ocjs.hatchPath; exports.inferResizeHandle = inferResizeHandle; exports.inspectCanvasInstance = inspectCanvasInstance; exports.inspectNodeTokens = inspectNodeTokens; exports.interiorPoint = _chunkYAWLMF3Ocjs.interiorPoint; exports.interpolateAnimationValue = _chunkSVR5FR7Bcjs.interpolateAnimationValue; exports.intersectPaths = _chunkGF2RBSDMcjs.intersectPaths; exports.intersectPolygons = _chunkGF2RBSDMcjs.intersectPolygons; exports.invertNodeUpdates = invertNodeUpdates; exports.isAgentCursor = isAgentCursor; exports.isAnimationEasing = _chunkDWJJI6RTcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkSVR5FR7Bcjs.isAnimationKeyframe; exports.isAutoLayoutFrame = isAutoLayoutFrame; exports.isBrushedShape = _chunkPUC43JPTcjs.isBrushedShape; exports.isCanvasComponent = isCanvasComponent; exports.isCanvasComponentSet = isCanvasComponentSet; exports.isCanvasGradient = _chunkNM3G4VQTcjs.isCanvasGradient; exports.isCanvasInstance = isCanvasInstance; exports.isCssExportExact = isCssExportExact; exports.isEventFromTextInput = isEventFromTextInput; exports.isInsideInstance = isInsideInstance; exports.isKeyframeSelected = isKeyframeSelected; exports.isLocked = isLocked; exports.isMeasureModifierHeld = isMeasureModifierHeld; exports.isNodeAnimated = isNodeAnimated; exports.isShapeDescription = _chunkNM3G4VQTcjs.isShapeDescription; exports.isShapeNode = isShapeNode; exports.isStraightCubic = _chunkNM3G4VQTcjs.isStraightCubic; exports.isValidCanvasEdge = isValidCanvasEdge; exports.isValidCanvasNode = isValidCanvasNode; exports.isValidCanvasScene = isValidCanvasScene; exports.isValidUrl = isValidUrl; exports.journeyScene = journeyScene; exports.layoutAll = layoutAll; exports.layoutBounds = layoutBounds; exports.layoutFrame = layoutFrame; exports.layoutUp = layoutUp; exports.layoutUpMany = layoutUpMany; exports.linearPositionTrajectory = linearPositionTrajectory; exports.linearTrajectory = linearTrajectory; exports.listCanvasBrushes = _chunkPUC43JPTcjs.listCanvasBrushes; exports.listCanvasComponents = listCanvasComponents; exports.loadCanvasBrushstrokeRenderer = _chunkPUC43JPTcjs.loadCanvasBrushstrokeRenderer; exports.lockNodes = lockNodes; exports.makeSizingCoherent = makeSizingCoherent; exports.matchArrangeShortcut = _chunk4EFNS2HVcjs.matchArrangeShortcut; exports.matchSize = matchSize; exports.measureBetween = measureBetween; exports.measureLabel = measureLabel; exports.measureSelection = measureSelection; exports.measureToLine = measureToLine; exports.mergeNodeUpdates = mergeNodeUpdates; exports.mermaidEdgeDash = mermaidEdgeDash; exports.mermaidEdgeMarker = mermaidEdgeMarker; exports.mermaidEdgeWidth = mermaidEdgeWidth; exports.mermaidFlowEdges = mermaidFlowEdges; exports.mermaidFlowNodes = mermaidFlowNodes; exports.mermaidLabelLines = mermaidLabelLines; exports.mermaidMarkerId = mermaidMarkerId; exports.mermaidMovesFromCanvas = mermaidMovesFromCanvas; exports.mermaidNodeMembers = mermaidNodeMembers; exports.mermaidNodePaint = mermaidNodePaint; exports.mermaidShapePaths = mermaidShapePaths; exports.mermaidThumbnailSvg = mermaidThumbnailSvg; exports.mermaidToCanvas = mermaidToCanvas; exports.mermaidToScene = mermaidToScene; exports.mermaidToSvg = mermaidToSvg; exports.mindmapScene = mindmapScene; exports.mixColorsOklab = _chunk5FXOR7F2cjs.mixColorsOklab; exports.moveKeyframes = moveKeyframes; exports.moveLayoutChild = moveLayoutChild; exports.multiPolygonArea = _chunkGF2RBSDMcjs.multiPolygonArea; exports.multiPolygonBounds = _chunkGF2RBSDMcjs.multiPolygonBounds; exports.nearestHandlePositions = nearestHandlePositions; exports.normalizeBezierPath = _chunkGF2RBSDMcjs.normalizeBezierPath; exports.normalizeKeyframes = _chunkSVR5FR7Bcjs.normalizeKeyframes; exports.offsetPath = _chunkGF2RBSDMcjs.offsetPath; exports.offsetShapeNodes = offsetShapeNodes; exports.oklabToRgb = _chunk5FXOR7F2cjs.oklabToRgb; exports.oppositePosition = oppositePosition; exports.outlineShapeNodeStrokes = outlineShapeNodeStrokes; exports.outlineStroke = _chunkGF2RBSDMcjs.outlineStroke; exports.overlaps = _chunkMRD3NXKRcjs.overlaps; exports.pageHidden = _chunkSVR5FR7Bcjs.pageHidden; exports.parseCanvasClipboardData = parseCanvasClipboardData; exports.parseCanvasScenes = parseCanvasScenes; exports.parseCssEasing = _chunkDWJJI6RTcjs.parseCssEasing; exports.parseCssGradient = _chunkNM3G4VQTcjs.parseCssGradient; exports.parseKeyframeClipboard = parseKeyframeClipboard; exports.parseMermaidStyles = parseMermaidStyles; exports.parseNodeStyleDeclarations = parseNodeStyleDeclarations; exports.parseOklab = _chunk5FXOR7F2cjs.parseOklab; exports.parseSvgPath = _chunkNM3G4VQTcjs.parseSvgPath; exports.parseVariantName = parseVariantName; exports.pasteKeyframes = pasteKeyframes; exports.pathBoolean = _chunkGF2RBSDMcjs.pathBoolean; exports.pathBooleanSelect = _chunkGF2RBSDMcjs.pathBooleanSelect; exports.pathDataToPolyline = _chunkPUC43JPTcjs.pathDataToPolyline; exports.pathToContours = _chunkGF2RBSDMcjs.pathToContours; exports.pathfinder = _chunkYAWLMF3Ocjs.pathfinder; exports.pieScene = pieScene; exports.placeBeside = _chunkMRD3NXKRcjs.placeBeside; exports.planarSplit = _chunkGF2RBSDMcjs.planarSplit; exports.playCanvasSceneTransition = playCanvasSceneTransition; exports.playWebAnimations = playWebAnimations; exports.pointInBezierPath = _chunkGF2RBSDMcjs.pointInBezierPath; exports.pointInMultiPolygon = _chunkGF2RBSDMcjs.pointInMultiPolygon; exports.pointInRings = _chunkGF2RBSDMcjs.pointInRings; exports.pointerPenSample = pointerPenSample; exports.polygonArea = _chunkGF2RBSDMcjs.polygonArea; exports.polygonBoolean = _chunkGF2RBSDMcjs.polygonBoolean; exports.polygonToSvgPath = _chunkNM3G4VQTcjs.polygonToSvgPath; exports.positionToSide = positionToSide; exports.profileAlongPolyline = _chunkPUC43JPTcjs.profileAlongPolyline; exports.pruneCanvasTokenModes = pruneCanvasTokenModes; exports.pushCanvasInstanceOverrides = pushCanvasInstanceOverrides; exports.quadrantScene = quadrantScene; exports.radarChartSpec = radarChartSpec; exports.radarScene = radarScene; exports.rasterSize = rasterSize; exports.rasterizeSvg = rasterizeSvg; exports.readAnimatableValue = readAnimatableValue; exports.readNodeStyleProperty = readNodeStyleProperty; exports.readOverrideGroup = readOverrideGroup; exports.readStyleSize = readStyleSize; exports.realClock = _chunkSVR5FR7Bcjs.realClock; exports.recordAnimationChanges = recordAnimationChanges; exports.registerFamilyScene = registerFamilyScene; exports.relayoutUpdates = relayoutUpdates; exports.remapPastedNodes = remapPastedNodes; exports.removeCanvasVariant = removeCanvasVariant; exports.removeTrack = removeTrack; exports.renameCanvasVariantProperty = renameCanvasVariantProperty; exports.renameCanvasVariantValue = renameCanvasVariantValue; exports.renderCanvasBrushSwatch = _chunkPUC43JPTcjs.renderCanvasBrushSwatch; exports.renderShapeBrushstroke = _chunkPUC43JPTcjs.renderShapeBrushstroke; exports.reorderNodes = reorderNodes; exports.repositionNodesTo = repositionNodesTo; exports.resetCanvasInstanceOverrides = resetCanvasInstanceOverrides; exports.resizeHandleAxes = resizeHandleAxes; exports.resolveCanvasGradient = _chunkNM3G4VQTcjs.resolveCanvasGradient; exports.resolveCanvasTokens = resolveCanvasTokens; exports.resolveEasing = _chunkDWJJI6RTcjs.resolveEasing; exports.resolveMermaidStyles = resolveMermaidStyles; exports.resolvePadding = resolvePadding; exports.restoreCanvasMainComponent = restoreCanvasMainComponent; exports.reverseCubicBezier = _chunkDWJJI6RTcjs.reverseCubicBezier; exports.revertShapeCombination = revertShapeCombination; exports.rgbToOklab = _chunk5FXOR7F2cjs.rgbToOklab; exports.ringSignedArea = _chunkGF2RBSDMcjs.ringSignedArea; exports.runCanvasNodeEffect = runCanvasNodeEffect; exports.runMultiNodeTransition = runMultiNodeTransition; exports.sampleAnimationFrames = sampleAnimationFrames; exports.scaleKeyframes = scaleKeyframes; exports.sceneColor = sceneColor; exports.segmentBounds = _chunkGF2RBSDMcjs.segmentBounds; exports.segmentCurvature = _chunkGF2RBSDMcjs.segmentCurvature; exports.segmentDerivative = _chunkGF2RBSDMcjs.segmentDerivative; exports.segmentExtrema = _chunkGF2RBSDMcjs.segmentExtrema; exports.segmentIntersections = _chunkGF2RBSDMcjs.segmentIntersections; exports.segmentLength = _chunkGF2RBSDMcjs.segmentLength; exports.segmentNearest = _chunkGF2RBSDMcjs.segmentNearest; exports.segmentParamAtLength = _chunkGF2RBSDMcjs.segmentParamAtLength; exports.segmentPoint = _chunkGF2RBSDMcjs.segmentPoint; exports.segmentTangent = _chunkGF2RBSDMcjs.segmentTangent; exports.sequenceScene = sequenceScene; exports.serializeCanvasNodes = serializeCanvasNodes; exports.setCanvasComponentProperty = setCanvasComponentProperty; exports.setCanvasInstanceProperties = setCanvasInstanceProperties; exports.setCanvasTokenMode = setCanvasTokenMode; exports.setCanvasVariantProperties = setCanvasVariantProperties; exports.setKeyframe = setKeyframe; exports.setKeyframeEasing = setKeyframeEasing; exports.setMotionPath = setMotionPath; exports.setTrackEnabled = setTrackEnabled; exports.shapeNodeToBezierPath = shapeNodeToBezierPath; exports.shapeNodeToPolygon = shapeNodeToPolygon; exports.shapeToBezierPath = shapeToBezierPath; exports.shapeToPolygon = _chunkNM3G4VQTcjs.shapeToPolygon; exports.sideToPosition = sideToPosition; exports.simplifyRing = _chunkNM3G4VQTcjs.simplifyRing; exports.snapKeyframeDelta = snapKeyframeDelta; exports.snapNodeDrag = snapNodeDrag; exports.snapNodeResize = snapNodeResize; exports.snapResize = snapResize; exports.snapTimeToFrame = snapTimeToFrame; exports.snapToGrid = snapToGrid; exports.splitSegment = _chunkGF2RBSDMcjs.splitSegment; exports.springAt = _chunkDWJJI6RTcjs.springAt; exports.springSettleMs = _chunkDWJJI6RTcjs.springSettleMs; exports.streamedDiagramText = streamedDiagramText; exports.streamlinePoints = streamlinePoints; exports.strokeBoundingBox = strokeBoundingBox; exports.strokeOutlineRings = _chunkGF2RBSDMcjs.strokeOutlineRings; exports.strokePointsToPathData = strokePointsToPathData; exports.strokeToShapeNode = strokeToShapeNode; exports.subSegment = _chunkGF2RBSDMcjs.subSegment; exports.subtractPaths = _chunkGF2RBSDMcjs.subtractPaths; exports.subtractPolygons = _chunkGF2RBSDMcjs.subtractPolygons; exports.swapCanvasInstance = swapCanvasInstance; exports.syncAllCanvasInstances = syncAllCanvasInstances; exports.syncCanvasComponents = syncCanvasComponents; exports.syncCanvasInstance = syncCanvasInstance; exports.timeToX = timeToX; exports.timelineScene = timelineScene; exports.toBezierPath = _chunkGF2RBSDMcjs.toBezierPath; exports.toWebAnimations = toWebAnimations; exports.toggleLockNodes = toggleLockNodes; exports.transformBezierPath = _chunkGF2RBSDMcjs.transformBezierPath; exports.transitionCanvasView = transitionCanvasView; exports.trimSegments = _chunkGF2RBSDMcjs.trimSegments; exports.unionPolygons = _chunkGF2RBSDMcjs.unionPolygons; exports.unitePaths = _chunkGF2RBSDMcjs.unitePaths; exports.unlockNodes = unlockNodes; exports.updateKeyframe = updateKeyframe; exports.validateCanvasBrush = _chunkPUC43JPTcjs.validateCanvasBrush; exports.validateCanvasBrushPaint = _chunkPUC43JPTcjs.validateCanvasBrushPaint; exports.windingNumber = _chunkGF2RBSDMcjs.windingNumber; exports.withNodeAnimation = withNodeAnimation; exports.withStyleOpacity = withStyleOpacity; exports.withStyleSize = withStyleSize; exports.wouldCreateComponentCycle = wouldCreateComponentCycle; exports.wrapAnimationTime = _chunkSVR5FR7Bcjs.wrapAnimationTime; exports.writeNodeStyleProperty = writeNodeStyleProperty; exports.writeOverrideGroup = writeOverrideGroup; exports.xToTime = xToTime; exports.xorPolygons = _chunkGF2RBSDMcjs.xorPolygons; exports.xyChartScene = xyChartScene; exports.xyChartSpec = xyChartSpec;
|
|
12186
|
+
|
|
12187
|
+
exports.ANIMATABLE_PROPERTIES = ANIMATABLE_PROPERTIES; exports.ANIMATION_DATA_KEY = ANIMATION_DATA_KEY; exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkSVR5FR7Bcjs.ANIMATION_TIME_EPSILON; exports.AUTO_LAYOUT_DATA_KEY = AUTO_LAYOUT_DATA_KEY; exports.AnimationEditError = AnimationEditError; exports.AnimationPlayer = _chunkSVR5FR7Bcjs.AnimationPlayer; exports.BUILTIN_FAMILY_SCENES = BUILTIN_FAMILY_SCENES; exports.CANVAS_CAPTURE_CHROME_SELECTORS = CANVAS_CAPTURE_CHROME_SELECTORS; exports.CANVAS_CAPTURE_OVERLAY_SELECTORS = CANVAS_CAPTURE_OVERLAY_SELECTORS; exports.CANVAS_CAPTURE_VIEWPORT_SELECTOR = CANVAS_CAPTURE_VIEWPORT_SELECTOR; exports.CANVAS_COMPONENT_DRAG_TYPE = CANVAS_COMPONENT_DRAG_TYPE; exports.CANVAS_EFFECT_PLACES = CANVAS_EFFECT_PLACES; exports.CANVAS_GRADIENT_PRESETS = _chunkNM3G4VQTcjs.CANVAS_GRADIENT_PRESETS; exports.CANVAS_TOKEN_PROPERTIES = CANVAS_TOKEN_PROPERTIES; exports.CARD_INSPECTION_ZONES = CARD_INSPECTION_ZONES; exports.CHILD_LAYOUT_DATA_KEY = CHILD_LAYOUT_DATA_KEY; exports.COMPONENT_DATA_KEY = COMPONENT_DATA_KEY; exports.COMPONENT_OVERRIDES_DATA_KEY = COMPONENT_OVERRIDES_DATA_KEY; exports.COMPONENT_PROPERTY_REFS_DATA_KEY = COMPONENT_PROPERTY_REFS_DATA_KEY; exports.COMPONENT_SET_DATA_KEY = COMPONENT_SET_DATA_KEY; exports.COMPONENT_SOURCE_DATA_KEY = COMPONENT_SOURCE_DATA_KEY; exports.CONNECTION_LINE_TYPES = CONNECTION_LINE_TYPES; exports.CSS_ANIMATION_PROPERTIES = CSS_ANIMATION_PROPERTIES; exports.CSS_VARIABLE_DIAGRAM_SCENE_THEME = CSS_VARIABLE_DIAGRAM_SCENE_THEME; exports.CUBIC_BEZIER_PRESETS = _chunkDWJJI6RTcjs.CUBIC_BEZIER_PRESETS; exports.CanvasScenesStore = CanvasScenesStore; exports.DEFAULT_ARRANGE_SHORTCUTS = _chunk4EFNS2HVcjs.DEFAULT_ARRANGE_SHORTCUTS; exports.DEFAULT_CURSOR_INACTIVITY_MS = DEFAULT_CURSOR_INACTIVITY_MS; exports.DEFAULT_DIAGRAM_NODE_HEIGHT = DEFAULT_DIAGRAM_NODE_HEIGHT; exports.DEFAULT_DIAGRAM_NODE_WIDTH = DEFAULT_DIAGRAM_NODE_WIDTH; exports.DEFAULT_NODE_HEIGHT = _chunkUBRYHNRUcjs.DEFAULT_NODE_HEIGHT; exports.DEFAULT_NODE_WIDTH = _chunkUBRYHNRUcjs.DEFAULT_NODE_WIDTH; exports.DEFAULT_PLACEMENT_GAP = _chunkUBRYHNRUcjs.DEFAULT_PLACEMENT_GAP; exports.DIAGRAM_MARKER_IDS = DIAGRAM_MARKER_IDS; exports.DIAGRAM_RASTER_MAX_SIZE = DIAGRAM_RASTER_MAX_SIZE; exports.DIAGRAM_SCENE_DARK_THEME = DIAGRAM_SCENE_DARK_THEME; exports.DIAGRAM_SCENE_LIGHT_THEME = DIAGRAM_SCENE_LIGHT_THEME; exports.DIAGRAM_SVG_DARK_THEME = DIAGRAM_SVG_DARK_THEME; exports.DIAGRAM_SVG_LIGHT_THEME = DIAGRAM_SVG_LIGHT_THEME; exports.DIAGRAM_TITLE_TARGET = DIAGRAM_TITLE_TARGET; exports.DiagramStream = DiagramStream; exports.INSTANCE_DATA_KEY = INSTANCE_DATA_KEY; exports.LOCKED_DATA_KEY = _chunkUBRYHNRUcjs.LOCKED_DATA_KEY; exports.LOCKED_PREVIOUS_FLAGS_KEY = _chunkUBRYHNRUcjs.LOCKED_PREVIOUS_FLAGS_KEY; exports.MAX_KEYFRAME_REFS = MAX_KEYFRAME_REFS; exports.MERMAID_SHAPE_PAINT = MERMAID_SHAPE_PAINT; exports.ManualClock = _chunkSVR5FR7Bcjs.ManualClock; exports.PATHFINDER_OPERATIONS = _chunkYAWLMF3Ocjs.PATHFINDER_OPERATIONS; exports.PIXERATE_BRAND_GRADIENT = _chunkNM3G4VQTcjs.PIXERATE_BRAND_GRADIENT; exports.PathOpsError = _chunkGF2RBSDMcjs.PathOpsError; exports.PlanarMap = _chunkYAWLMF3Ocjs.PlanarMap; exports.RESIZE_HANDLES = RESIZE_HANDLES; exports.SHAPE_DATA_KEY = SHAPE_DATA_KEY; exports.SHAPE_KINDS = _chunkNM3G4VQTcjs.SHAPE_KINDS; exports.SHAPE_NODE_TYPE = SHAPE_NODE_TYPE; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.SPRING_PRESETS = _chunkDWJJI6RTcjs.SPRING_PRESETS; exports.StreamingLayoutManager = StreamingLayoutManager; exports.TOKEN_BINDINGS_DATA_KEY = TOKEN_BINDINGS_DATA_KEY; exports.TOKEN_MODES_DATA_KEY = TOKEN_MODES_DATA_KEY; exports.addCanvasVariant = addCanvasVariant; exports.addKeyframesAtTime = addKeyframesAtTime; exports.alignNodes = _chunkUBRYHNRUcjs.alignNodes; exports.angleToSvgLinearCoords = _chunkNM3G4VQTcjs.angleToSvgLinearCoords; exports.animateNode = animateNode; exports.applyAnimation = applyAnimation; exports.applyAnimationOverrides = applyAnimationOverrides; exports.applyConstraints = applyConstraints; exports.applyNodeUpdates = _chunkUBRYHNRUcjs.applyNodeUpdates; exports.applyShapeCombination = applyShapeCombination; exports.applyShapeReplacement = applyShapeReplacement; exports.arcToCubics = _chunkGF2RBSDMcjs.arcToCubics; exports.architectureScene = architectureScene; exports.autoLayoutDiagram = autoLayoutDiagram; exports.bezierPathArea = _chunkGF2RBSDMcjs.bezierPathArea; exports.bezierPathBounds = _chunkGF2RBSDMcjs.bezierPathBounds; exports.bezierPathLength = _chunkGF2RBSDMcjs.bezierPathLength; exports.bezierPathPointAtLength = _chunkGF2RBSDMcjs.bezierPathPointAtLength; exports.bezierPathSignedArea = _chunkGF2RBSDMcjs.bezierPathSignedArea; exports.bezierPathToSvg = _chunkGF2RBSDMcjs.bezierPathToSvg; exports.bindCanvasComponentProperty = bindCanvasComponentProperty; exports.bindCanvasToken = bindCanvasToken; exports.blendDiagramLayout = blendDiagramLayout; exports.blendLayout = blendLayout; exports.boundsOf = _chunkUBRYHNRUcjs.boundsOf; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeSeed = _chunkPUC43JPTcjs.brushstrokeSeed; exports.c4Scene = c4Scene; exports.calculateCursorArrowRotation = calculateCursorArrowRotation; exports.calculateCurvedPath = calculateCurvedPath; exports.calculateDagreReflowDisplacement = calculateDagreReflowDisplacement; exports.calculateDirectionalDisplacement = calculateDirectionalDisplacement; exports.canCombineShapeNodes = canCombineShapeNodes; exports.canOffsetShapeNodes = canOffsetShapeNodes; exports.canOutlineShapeNodeStrokes = canOutlineShapeNodeStrokes; exports.canvasEffectsPool = canvasEffectsPool; exports.canvasHeight = canvasHeight; exports.canvasNodeCaptureRect = canvasNodeCaptureRect; exports.canvasNodeEffect = canvasNodeEffect; exports.captureCanvasView = captureCanvasView; exports.centerNodes = _chunkUBRYHNRUcjs.centerNodes; exports.centre = _chunkUBRYHNRUcjs.centre; exports.clampAnimationValue = clampAnimationValue; exports.clampLayoutSize = clampLayoutSize; exports.closeContour = _chunkGF2RBSDMcjs.closeContour; exports.collectDescendantIds = collectDescendantIds; exports.combineCanvasComponentsAsVariants = combineCanvasComponentsAsVariants; exports.combineShapeNodes = combineShapeNodes; exports.computeDragBounds = computeDragBounds; exports.computeDragBoundsFromPoints = computeDragBoundsFromPoints; exports.computeNodesBoundingBox = computeNodesBoundingBox; exports.computeSnapGuides = computeSnapGuides; exports.connectedDiagramOnly = connectedDiagramOnly; exports.connectedOnly = connectedOnly; exports.contourEnclosesArea = _chunkYAWLMF3Ocjs.contourEnclosesArea; exports.contourSignedArea = _chunkGF2RBSDMcjs.contourSignedArea; exports.contoursToPath = _chunkGF2RBSDMcjs.contoursToPath; exports.copyKeyframes = copyKeyframes; exports.countPathSegments = _chunkGF2RBSDMcjs.countPathSegments; exports.createAnimationPlayer = _chunkSVR5FR7Bcjs.createAnimationPlayer; exports.createBezierTrajectory = createBezierTrajectory; exports.createCanvasAnimationController = createCanvasAnimationController; exports.createCanvasArrangeController = createCanvasArrangeController; exports.createCanvasAutoLayoutController = createCanvasAutoLayoutController; exports.createCanvasCaptureSurface = createCanvasCaptureSurface; exports.createCanvasCaptureToolProvider = createCanvasCaptureToolProvider; exports.createCanvasComponent = createCanvasComponent; exports.createCanvasComponentsController = createCanvasComponentsController; exports.createCanvasDrawController = createCanvasDrawController; exports.createCanvasEffectsController = createCanvasEffectsController; exports.createCanvasEffectsToolProvider = createCanvasEffectsToolProvider; exports.createCanvasInstance = createCanvasInstance; exports.createCanvasPlaybackLocator = createCanvasPlaybackLocator; exports.createCanvasScenesStore = createCanvasScenesStore; exports.createDefaultStrokeStyle = createDefaultStrokeStyle; exports.createFanOutTrajectory = createFanOutTrajectory; exports.createGuideIndex = createGuideIndex; exports.createNodeGuideIndex = createNodeGuideIndex; exports.createNodeLookup = _chunkUBRYHNRUcjs.createNodeLookup; exports.cubicBezierAt = _chunkDWJJI6RTcjs.cubicBezierAt; exports.cubicPointAt = _chunkNM3G4VQTcjs.cubicPointAt; exports.cubicsToPathData = _chunkNM3G4VQTcjs.cubicsToPathData; exports.cutOutPiece = _chunkYAWLMF3Ocjs.cutOutPiece; exports.dashContours = _chunkGF2RBSDMcjs.dashContours; exports.defaultEasing = defaultEasing; exports.deleteKeyframes = deleteKeyframes; exports.detachCanvasInstance = detachCanvasInstance; exports.detachTokenBindings = detachTokenBindings; exports.diagramCanvasHeight = diagramCanvasHeight; exports.diagramFileName = diagramFileName; exports.diagramGroupSize = diagramGroupSize; exports.diagramImageSize = diagramImageSize; exports.diagramLayoutBounds = diagramLayoutBounds; exports.diagramMarksBounds = diagramMarksBounds; exports.diagramMarksToSvg = diagramMarksToSvg; exports.diagramRenameOp = diagramRenameOp; exports.diagramTargetLabel = diagramTargetLabel; exports.diagramTextBaseline = diagramTextBaseline; exports.diffOverrideGroups = diffOverrideGroups; exports.distanceToBezierPath = _chunkGF2RBSDMcjs.distanceToBezierPath; exports.distributeNodes = _chunkUBRYHNRUcjs.distributeNodes; exports.dividePaths = _chunkGF2RBSDMcjs.dividePaths; exports.dividePolygons = _chunkGF2RBSDMcjs.dividePolygons; exports.downloadDiagramPng = downloadDiagramPng; exports.easeDiagramTween = easeDiagramTween; exports.easingFromInfluence = _chunkDWJJI6RTcjs.easingFromInfluence; exports.easingLabel = _chunkDWJJI6RTcjs.easingLabel; exports.easingToCss = _chunkDWJJI6RTcjs.easingToCss; exports.elasticAt = _chunkDWJJI6RTcjs.elasticAt; exports.ensureDiagramLayout = ensureDiagramLayout; exports.ensureLayout = _chunkUBRYHNRUcjs.ensureLayout; exports.estimateCanvasHeight = estimateCanvasHeight; exports.estimateDiagramCanvasHeight = estimateDiagramCanvasHeight; exports.estimateDiagramNodeSize = estimateDiagramNodeSize; exports.estimateNodeSize = _chunkUBRYHNRUcjs.estimateNodeSize; exports.estimateTextWidth = estimateTextWidth2; exports.evaluateAnimation = evaluateAnimation; exports.evaluateEasing = _chunkDWJJI6RTcjs.evaluateEasing; exports.evaluateTrack = _chunkSVR5FR7Bcjs.evaluateTrack; exports.excludePaths = _chunkGF2RBSDMcjs.excludePaths; exports.exportCssAnimation = exportCssAnimation; exports.familySceneFromLayout = familySceneFromLayout; exports.findConnectorSnap = findConnectorSnap; exports.findStrokesAtPoint = findStrokesAtPoint; exports.findVariant = findVariant; exports.fitCubicRun = _chunkNM3G4VQTcjs.fitCubicRun; exports.fitCubicWithTangents = _chunkNM3G4VQTcjs.fitCubicWithTangents; exports.fitCubics = _chunkNM3G4VQTcjs.fitCubics; exports.fitFreehandPath = _chunkNM3G4VQTcjs.fitFreehandPath; exports.fitPathData = _chunkNM3G4VQTcjs.fitPathData; exports.fitViewportToNodes = fitViewportToNodes; exports.fitViewportToRect = fitViewportToRect; exports.flattenSvgPath = _chunkNM3G4VQTcjs.flattenSvgPath; exports.flowSide = _chunkUBRYHNRUcjs.flowSide; exports.formatAgentCursorName = formatAgentCursorName; exports.formatAnimationTime = formatAnimationTime; exports.formatNumber = _chunkNM3G4VQTcjs.formatNumber; exports.formatOklab = _chunk5FXOR7F2cjs.formatOklab; exports.formatVariantName = formatVariantName; exports.freehandBrushstroke = freehandBrushstroke; exports.ganttScene = ganttScene; exports.getAbsolutePosition = _chunkUBRYHNRUcjs.getAbsolutePosition; exports.getAgentCardAnchor = getAgentCardAnchor; exports.getAnimatableProperty = getAnimatableProperty; exports.getAnimatedProperties = getAnimatedProperties; exports.getAnimatedValue = getAnimatedValue; exports.getAnimationDuration = getAnimationDuration; exports.getAnimationTrack = getAnimationTrack; exports.getAutoLayout = getAutoLayout; exports.getAutoLayoutGrid = getAutoLayoutGrid; exports.getAutoLayoutInsertTarget = getAutoLayoutInsertTarget; exports.getBindableTokenProperties = getBindableTokenProperties; exports.getBrushedShapeSvg = _chunkPUC43JPTcjs.getBrushedShapeSvg; exports.getCanvasComponentDragId = getCanvasComponentDragId; exports.getCanvasTokenProperty = getCanvasTokenProperty; exports.getCenteredNodePosition = _chunkUBRYHNRUcjs.getCenteredNodePosition; exports.getChildLayout = getChildLayout; exports.getComponentData = getComponentData; exports.getComponentInstances = getComponentInstances; exports.getComponentPropertyDefs = getComponentPropertyDefs; exports.getComponentPropertyRefs = getComponentPropertyRefs; exports.getComponentSourceId = getComponentSourceId; exports.getCssPropertyAnimations = getCssPropertyAnimations; exports.getCursorTransitionDuration = getCursorTransitionDuration; exports.getDefaultVariant = getDefaultVariant; exports.getEffectiveTokenModes = getEffectiveTokenModes; exports.getFamilyScene = getFamilyScene; exports.getFlowChildren = getFlowChildren; exports.getInstanceData = getInstanceData; exports.getInstanceProperties = getInstanceProperties; exports.getInstanceStatus = getInstanceStatus; exports.getKeyframeTimes = getKeyframeTimes; exports.getLayerName = getLayerName; exports.getLayoutParent = getLayoutParent; exports.getLayoutSizing = getLayoutSizing; exports.getLayoutedNodes = _chunkUBRYHNRUcjs.getLayoutedNodes; exports.getNaturalMovementTiming = getNaturalMovementTiming; exports.getNextVariantValues = getNextVariantValues; exports.getNodeAnimation = getNodeAnimation; exports.getNodeOverrides = getNodeOverrides; exports.getNodeRect = _chunkUBRYHNRUcjs.getNodeRect; exports.getNodeShape = getNodeShape; exports.getNodeSize = _chunkUBRYHNRUcjs.getNodeSize; exports.getNodeTokenBindings = getNodeTokenBindings; exports.getNodeTokenModes = getNodeTokenModes; exports.getOwningComponent = getOwningComponent; exports.getOwningInstance = getOwningInstance; exports.getResizingNodeRect = getResizingNodeRect; exports.getRootInstance = getRootInstance; exports.getShapeRenderData = _chunkNM3G4VQTcjs.getShapeRenderData; exports.getShapeSvg = _chunkNM3G4VQTcjs.getShapeSvg; exports.getTimelineRows = getTimelineRows; exports.getTimelineTicks = getTimelineTicks; exports.getTokenPropertyScope = getTokenPropertyScope; exports.getTokensForProperty = getTokensForProperty; exports.getVariantConflicts = getVariantConflicts; exports.getVariantOptions = getVariantOptions; exports.getVariantSet = getVariantSet; exports.getVariantValues = getVariantValues; exports.gitGraphScene = gitGraphScene; exports.gradientToSvgDef = _chunkNM3G4VQTcjs.gradientToSvgDef; exports.handlePoint = handlePoint; exports.hasFamilyScene = hasFamilyScene; exports.hasVisibleStroke = hasVisibleStroke; exports.hashString = hashString; exports.hatchPath = _chunkYAWLMF3Ocjs.hatchPath; exports.inferResizeHandle = inferResizeHandle; exports.inspectCanvasInstance = inspectCanvasInstance; exports.inspectNodeTokens = inspectNodeTokens; exports.interiorPoint = _chunkYAWLMF3Ocjs.interiorPoint; exports.interpolateAnimationValue = _chunkSVR5FR7Bcjs.interpolateAnimationValue; exports.intersectPaths = _chunkGF2RBSDMcjs.intersectPaths; exports.intersectPolygons = _chunkGF2RBSDMcjs.intersectPolygons; exports.invertNodeUpdates = _chunkUBRYHNRUcjs.invertNodeUpdates; exports.isAgentCursor = isAgentCursor; exports.isAnimationEasing = _chunkDWJJI6RTcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkSVR5FR7Bcjs.isAnimationKeyframe; exports.isAutoLayoutFrame = isAutoLayoutFrame; exports.isBrushedShape = _chunkPUC43JPTcjs.isBrushedShape; exports.isCanvasComponent = isCanvasComponent; exports.isCanvasComponentSet = isCanvasComponentSet; exports.isCanvasGradient = _chunkNM3G4VQTcjs.isCanvasGradient; exports.isCanvasInstance = isCanvasInstance; exports.isCssExportExact = isCssExportExact; exports.isEventFromTextInput = isEventFromTextInput; exports.isInsideInstance = isInsideInstance; exports.isKeyframeSelected = isKeyframeSelected; exports.isLocked = _chunkUBRYHNRUcjs.isLocked; exports.isMeasureModifierHeld = isMeasureModifierHeld; exports.isNodeAnimated = isNodeAnimated; exports.isShapeDescription = _chunkNM3G4VQTcjs.isShapeDescription; exports.isShapeNode = isShapeNode; exports.isStraightCubic = _chunkNM3G4VQTcjs.isStraightCubic; exports.isValidCanvasEdge = isValidCanvasEdge; exports.isValidCanvasNode = isValidCanvasNode; exports.isValidCanvasScene = isValidCanvasScene; exports.isValidUrl = isValidUrl; exports.journeyScene = journeyScene; exports.layoutAll = layoutAll; exports.layoutBounds = layoutBounds; exports.layoutFrame = layoutFrame; exports.layoutUp = layoutUp; exports.layoutUpMany = layoutUpMany; exports.linearPositionTrajectory = linearPositionTrajectory; exports.linearTrajectory = linearTrajectory; exports.listCanvasBrushes = _chunkPUC43JPTcjs.listCanvasBrushes; exports.listCanvasComponents = listCanvasComponents; exports.loadCanvasBrushstrokeRenderer = _chunkPUC43JPTcjs.loadCanvasBrushstrokeRenderer; exports.lockNodes = _chunkUBRYHNRUcjs.lockNodes; exports.makeSizingCoherent = makeSizingCoherent; exports.matchArrangeShortcut = _chunk4EFNS2HVcjs.matchArrangeShortcut; exports.matchSize = _chunkUBRYHNRUcjs.matchSize; exports.measureBetween = measureBetween; exports.measureLabel = measureLabel; exports.measureSelection = measureSelection; exports.measureToLine = measureToLine; exports.mergeNodeUpdates = mergeNodeUpdates; exports.mermaidEdgeDash = mermaidEdgeDash; exports.mermaidEdgeMarker = mermaidEdgeMarker; exports.mermaidEdgeWidth = mermaidEdgeWidth; exports.mermaidFlowEdges = mermaidFlowEdges; exports.mermaidFlowNodes = mermaidFlowNodes; exports.mermaidLabelLines = mermaidLabelLines; exports.mermaidMarkerId = mermaidMarkerId; exports.mermaidMovesFromCanvas = mermaidMovesFromCanvas; exports.mermaidNodeMembers = mermaidNodeMembers; exports.mermaidNodePaint = mermaidNodePaint; exports.mermaidShapePaths = mermaidShapePaths; exports.mermaidThumbnailSvg = mermaidThumbnailSvg; exports.mermaidToCanvas = mermaidToCanvas; exports.mermaidToScene = mermaidToScene; exports.mermaidToSvg = mermaidToSvg; exports.mindmapScene = mindmapScene; exports.mixColorsOklab = _chunk5FXOR7F2cjs.mixColorsOklab; exports.moveKeyframes = moveKeyframes; exports.moveLayoutChild = moveLayoutChild; exports.multiPolygonArea = _chunkGF2RBSDMcjs.multiPolygonArea; exports.multiPolygonBounds = _chunkGF2RBSDMcjs.multiPolygonBounds; exports.nearestHandlePositions = nearestHandlePositions; exports.normalizeBezierPath = _chunkGF2RBSDMcjs.normalizeBezierPath; exports.normalizeKeyframes = _chunkSVR5FR7Bcjs.normalizeKeyframes; exports.offsetPath = _chunkGF2RBSDMcjs.offsetPath; exports.offsetShapeNodes = offsetShapeNodes; exports.oklabToRgb = _chunk5FXOR7F2cjs.oklabToRgb; exports.oppositePosition = oppositePosition; exports.outlineShapeNodeStrokes = outlineShapeNodeStrokes; exports.outlineStroke = _chunkGF2RBSDMcjs.outlineStroke; exports.overlaps = _chunkUBRYHNRUcjs.overlaps; exports.pageHidden = _chunkSVR5FR7Bcjs.pageHidden; exports.parseCanvasClipboardData = parseCanvasClipboardData; exports.parseCanvasScenes = parseCanvasScenes; exports.parseCssEasing = _chunkDWJJI6RTcjs.parseCssEasing; exports.parseCssGradient = _chunkNM3G4VQTcjs.parseCssGradient; exports.parseKeyframeClipboard = parseKeyframeClipboard; exports.parseMermaidStyles = parseMermaidStyles; exports.parseNodeStyleDeclarations = parseNodeStyleDeclarations; exports.parseOklab = _chunk5FXOR7F2cjs.parseOklab; exports.parseSvgPath = _chunkNM3G4VQTcjs.parseSvgPath; exports.parseVariantName = parseVariantName; exports.pasteKeyframes = pasteKeyframes; exports.pathBoolean = _chunkGF2RBSDMcjs.pathBoolean; exports.pathBooleanSelect = _chunkGF2RBSDMcjs.pathBooleanSelect; exports.pathDataToPolyline = _chunkPUC43JPTcjs.pathDataToPolyline; exports.pathToContours = _chunkGF2RBSDMcjs.pathToContours; exports.pathfinder = _chunkYAWLMF3Ocjs.pathfinder; exports.pieScene = pieScene; exports.placeBeside = _chunkUBRYHNRUcjs.placeBeside; exports.planarSplit = _chunkGF2RBSDMcjs.planarSplit; exports.playCanvasSceneTransition = playCanvasSceneTransition; exports.playWebAnimations = playWebAnimations; exports.pointInBezierPath = _chunkGF2RBSDMcjs.pointInBezierPath; exports.pointInMultiPolygon = _chunkGF2RBSDMcjs.pointInMultiPolygon; exports.pointInRings = _chunkGF2RBSDMcjs.pointInRings; exports.pointerPenSample = pointerPenSample; exports.polygonArea = _chunkGF2RBSDMcjs.polygonArea; exports.polygonBoolean = _chunkGF2RBSDMcjs.polygonBoolean; exports.polygonToSvgPath = _chunkNM3G4VQTcjs.polygonToSvgPath; exports.positionToSide = positionToSide; exports.profileAlongPolyline = _chunkPUC43JPTcjs.profileAlongPolyline; exports.pruneCanvasTokenModes = pruneCanvasTokenModes; exports.pushCanvasInstanceOverrides = pushCanvasInstanceOverrides; exports.quadrantScene = quadrantScene; exports.radarChartSpec = radarChartSpec; exports.radarScene = radarScene; exports.rasterSize = rasterSize; exports.rasterizeSvg = rasterizeSvg; exports.readAnimatableValue = readAnimatableValue; exports.readNodeStyleProperty = readNodeStyleProperty; exports.readOverrideGroup = readOverrideGroup; exports.readStyleSize = _chunkUBRYHNRUcjs.readStyleSize; exports.realClock = _chunkSVR5FR7Bcjs.realClock; exports.recordAnimationChanges = recordAnimationChanges; exports.registerFamilyScene = registerFamilyScene; exports.relayoutUpdates = relayoutUpdates; exports.remapPastedNodes = remapPastedNodes; exports.removeCanvasVariant = removeCanvasVariant; exports.removeTrack = removeTrack; exports.renameCanvasVariantProperty = renameCanvasVariantProperty; exports.renameCanvasVariantValue = renameCanvasVariantValue; exports.renderCanvasBrushSwatch = _chunkPUC43JPTcjs.renderCanvasBrushSwatch; exports.renderShapeBrushstroke = _chunkPUC43JPTcjs.renderShapeBrushstroke; exports.reorderNodes = _chunkUBRYHNRUcjs.reorderNodes; exports.repositionNodesTo = repositionNodesTo; exports.resetCanvasInstanceOverrides = resetCanvasInstanceOverrides; exports.resizeHandleAxes = resizeHandleAxes; exports.resolveCanvasGradient = _chunkNM3G4VQTcjs.resolveCanvasGradient; exports.resolveCanvasTokens = resolveCanvasTokens; exports.resolveEasing = _chunkDWJJI6RTcjs.resolveEasing; exports.resolveMermaidStyles = resolveMermaidStyles; exports.resolvePadding = resolvePadding; exports.restoreCanvasMainComponent = restoreCanvasMainComponent; exports.reverseCubicBezier = _chunkDWJJI6RTcjs.reverseCubicBezier; exports.revertShapeCombination = revertShapeCombination; exports.rgbToOklab = _chunk5FXOR7F2cjs.rgbToOklab; exports.ringSignedArea = _chunkGF2RBSDMcjs.ringSignedArea; exports.runCanvasNodeEffect = runCanvasNodeEffect; exports.runMultiNodeTransition = runMultiNodeTransition; exports.sampleAnimationFrames = sampleAnimationFrames; exports.scaleKeyframes = scaleKeyframes; exports.sceneColor = sceneColor; exports.segmentBounds = _chunkGF2RBSDMcjs.segmentBounds; exports.segmentCurvature = _chunkGF2RBSDMcjs.segmentCurvature; exports.segmentDerivative = _chunkGF2RBSDMcjs.segmentDerivative; exports.segmentExtrema = _chunkGF2RBSDMcjs.segmentExtrema; exports.segmentIntersections = _chunkGF2RBSDMcjs.segmentIntersections; exports.segmentLength = _chunkGF2RBSDMcjs.segmentLength; exports.segmentNearest = _chunkGF2RBSDMcjs.segmentNearest; exports.segmentParamAtLength = _chunkGF2RBSDMcjs.segmentParamAtLength; exports.segmentPoint = _chunkGF2RBSDMcjs.segmentPoint; exports.segmentTangent = _chunkGF2RBSDMcjs.segmentTangent; exports.sequenceScene = sequenceScene; exports.serializeCanvasNodes = serializeCanvasNodes; exports.setCanvasComponentProperty = setCanvasComponentProperty; exports.setCanvasInstanceProperties = setCanvasInstanceProperties; exports.setCanvasTokenMode = setCanvasTokenMode; exports.setCanvasVariantProperties = setCanvasVariantProperties; exports.setKeyframe = setKeyframe; exports.setKeyframeEasing = setKeyframeEasing; exports.setMotionPath = setMotionPath; exports.setTrackEnabled = setTrackEnabled; exports.shapeNodeToBezierPath = shapeNodeToBezierPath; exports.shapeNodeToPolygon = shapeNodeToPolygon; exports.shapeToBezierPath = shapeToBezierPath; exports.shapeToPolygon = _chunkNM3G4VQTcjs.shapeToPolygon; exports.sideToPosition = sideToPosition; exports.simplifyRing = _chunkNM3G4VQTcjs.simplifyRing; exports.snapKeyframeDelta = snapKeyframeDelta; exports.snapNodeDrag = snapNodeDrag; exports.snapNodeResize = snapNodeResize; exports.snapResize = snapResize; exports.snapTimeToFrame = snapTimeToFrame; exports.snapToGrid = snapToGrid; exports.splitSegment = _chunkGF2RBSDMcjs.splitSegment; exports.springAt = _chunkDWJJI6RTcjs.springAt; exports.springSettleMs = _chunkDWJJI6RTcjs.springSettleMs; exports.streamedDiagramText = streamedDiagramText; exports.streamlinePoints = streamlinePoints; exports.strokeBoundingBox = strokeBoundingBox; exports.strokeOutlineRings = _chunkGF2RBSDMcjs.strokeOutlineRings; exports.strokePointsToPathData = strokePointsToPathData; exports.strokeToShapeNode = strokeToShapeNode; exports.subSegment = _chunkGF2RBSDMcjs.subSegment; exports.subtractPaths = _chunkGF2RBSDMcjs.subtractPaths; exports.subtractPolygons = _chunkGF2RBSDMcjs.subtractPolygons; exports.swapCanvasInstance = swapCanvasInstance; exports.syncAllCanvasInstances = syncAllCanvasInstances; exports.syncCanvasComponents = syncCanvasComponents; exports.syncCanvasInstance = syncCanvasInstance; exports.timeToX = timeToX; exports.timelineScene = timelineScene; exports.toBezierPath = _chunkGF2RBSDMcjs.toBezierPath; exports.toWebAnimations = toWebAnimations; exports.toggleLockNodes = _chunkUBRYHNRUcjs.toggleLockNodes; exports.transformBezierPath = _chunkGF2RBSDMcjs.transformBezierPath; exports.transitionCanvasView = transitionCanvasView; exports.trimSegments = _chunkGF2RBSDMcjs.trimSegments; exports.unionPolygons = _chunkGF2RBSDMcjs.unionPolygons; exports.unitePaths = _chunkGF2RBSDMcjs.unitePaths; exports.unlockNodes = _chunkUBRYHNRUcjs.unlockNodes; exports.updateKeyframe = updateKeyframe; exports.validateCanvasBrush = _chunkPUC43JPTcjs.validateCanvasBrush; exports.validateCanvasBrushPaint = _chunkPUC43JPTcjs.validateCanvasBrushPaint; exports.windingNumber = _chunkGF2RBSDMcjs.windingNumber; exports.withNodeAnimation = withNodeAnimation; exports.withStyleOpacity = withStyleOpacity; exports.withStyleSize = _chunkUBRYHNRUcjs.withStyleSize; exports.wouldCreateComponentCycle = wouldCreateComponentCycle; exports.wrapAnimationTime = _chunkSVR5FR7Bcjs.wrapAnimationTime; exports.writeNodeStyleProperty = writeNodeStyleProperty; exports.writeOverrideGroup = writeOverrideGroup; exports.xToTime = xToTime; exports.xorPolygons = _chunkGF2RBSDMcjs.xorPolygons; exports.xyChartScene = xyChartScene; exports.xyChartSpec = xyChartSpec;
|