@multiplatform.one/node-graph 9.0.10 → 9.1.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/cjs/graphLayout/GraphDots.cjs +60 -0
- package/dist/cjs/graphLayout/GraphDots.native.js +66 -0
- package/dist/cjs/graphLayout/GraphDots.native.js.map +1 -0
- package/dist/cjs/graphLayout/GraphLayout.cjs +153 -0
- package/dist/cjs/graphLayout/GraphLayout.native.js +163 -0
- package/dist/cjs/graphLayout/GraphLayout.native.js.map +1 -0
- package/dist/cjs/graphLayout/GraphSvg.cjs +68 -0
- package/dist/cjs/graphLayout/GraphSvg.native.js +73 -0
- package/dist/cjs/graphLayout/GraphSvg.native.js.map +1 -0
- package/dist/cjs/graphLayout/GraphViewport.cjs +263 -0
- package/dist/cjs/graphLayout/GraphViewport.native.js +279 -0
- package/dist/cjs/graphLayout/GraphViewport.native.js.map +1 -0
- package/dist/cjs/graphLayout/index.cjs +51 -0
- package/dist/cjs/graphLayout/index.native.js +54 -0
- package/dist/cjs/graphLayout/index.native.js.map +1 -0
- package/dist/cjs/graphLayout/ogden.fixture.cjs +30 -0
- package/dist/cjs/graphLayout/ogden.fixture.native.js +33 -0
- package/dist/cjs/graphLayout/ogden.fixture.native.js.map +1 -0
- package/dist/cjs/graphLayout/plan.cjs +263 -0
- package/dist/cjs/graphLayout/plan.native.js +372 -0
- package/dist/cjs/graphLayout/plan.native.js.map +1 -0
- package/dist/cjs/graphLayout/viewMath.cjs +142 -0
- package/dist/cjs/graphLayout/viewMath.native.js +147 -0
- package/dist/cjs/graphLayout/viewMath.native.js.map +1 -0
- package/dist/esm/graphLayout/GraphDots.mjs +35 -0
- package/dist/esm/graphLayout/GraphDots.mjs.map +1 -0
- package/dist/esm/graphLayout/GraphDots.native.js +38 -0
- package/dist/esm/graphLayout/GraphDots.native.js.map +1 -0
- package/dist/esm/graphLayout/GraphLayout.mjs +127 -0
- package/dist/esm/graphLayout/GraphLayout.mjs.map +1 -0
- package/dist/esm/graphLayout/GraphLayout.native.js +134 -0
- package/dist/esm/graphLayout/GraphLayout.native.js.map +1 -0
- package/dist/esm/graphLayout/GraphSvg.mjs +42 -0
- package/dist/esm/graphLayout/GraphSvg.mjs.map +1 -0
- package/dist/esm/graphLayout/GraphSvg.native.js +44 -0
- package/dist/esm/graphLayout/GraphSvg.native.js.map +1 -0
- package/dist/esm/graphLayout/GraphViewport.mjs +238 -0
- package/dist/esm/graphLayout/GraphViewport.mjs.map +1 -0
- package/dist/esm/graphLayout/GraphViewport.native.js +251 -0
- package/dist/esm/graphLayout/GraphViewport.native.js.map +1 -0
- package/dist/esm/graphLayout/index.mjs +7 -0
- package/dist/esm/graphLayout/index.mjs.map +1 -0
- package/dist/esm/graphLayout/index.native.js +7 -0
- package/dist/esm/graphLayout/index.native.js.map +1 -0
- package/dist/esm/graphLayout/ogden.fixture.mjs +4 -0
- package/dist/esm/graphLayout/ogden.fixture.mjs.map +1 -0
- package/dist/esm/graphLayout/ogden.fixture.native.js +4 -0
- package/dist/esm/graphLayout/ogden.fixture.native.js.map +1 -0
- package/dist/esm/graphLayout/plan.mjs +235 -0
- package/dist/esm/graphLayout/plan.mjs.map +1 -0
- package/dist/esm/graphLayout/plan.native.js +341 -0
- package/dist/esm/graphLayout/plan.native.js.map +1 -0
- package/dist/esm/graphLayout/viewMath.mjs +105 -0
- package/dist/esm/graphLayout/viewMath.mjs.map +1 -0
- package/dist/esm/graphLayout/viewMath.native.js +107 -0
- package/dist/esm/graphLayout/viewMath.native.js.map +1 -0
- package/dist/jsx/graphLayout/GraphDots.mjs +35 -0
- package/dist/jsx/graphLayout/GraphDots.mjs.map +1 -0
- package/dist/jsx/graphLayout/GraphDots.native.js +66 -0
- package/dist/jsx/graphLayout/GraphDots.native.js.map +1 -0
- package/dist/jsx/graphLayout/GraphLayout.mjs +127 -0
- package/dist/jsx/graphLayout/GraphLayout.mjs.map +1 -0
- package/dist/jsx/graphLayout/GraphLayout.native.js +163 -0
- package/dist/jsx/graphLayout/GraphLayout.native.js.map +1 -0
- package/dist/jsx/graphLayout/GraphSvg.mjs +42 -0
- package/dist/jsx/graphLayout/GraphSvg.mjs.map +1 -0
- package/dist/jsx/graphLayout/GraphSvg.native.js +73 -0
- package/dist/jsx/graphLayout/GraphSvg.native.js.map +1 -0
- package/dist/jsx/graphLayout/GraphViewport.mjs +238 -0
- package/dist/jsx/graphLayout/GraphViewport.mjs.map +1 -0
- package/dist/jsx/graphLayout/GraphViewport.native.js +279 -0
- package/dist/jsx/graphLayout/GraphViewport.native.js.map +1 -0
- package/dist/jsx/graphLayout/index.mjs +7 -0
- package/dist/jsx/graphLayout/index.mjs.map +1 -0
- package/dist/jsx/graphLayout/index.native.js +54 -0
- package/dist/jsx/graphLayout/index.native.js.map +1 -0
- package/dist/jsx/graphLayout/ogden.fixture.mjs +4 -0
- package/dist/jsx/graphLayout/ogden.fixture.mjs.map +1 -0
- package/dist/jsx/graphLayout/ogden.fixture.native.js +33 -0
- package/dist/jsx/graphLayout/ogden.fixture.native.js.map +1 -0
- package/dist/jsx/graphLayout/plan.mjs +235 -0
- package/dist/jsx/graphLayout/plan.mjs.map +1 -0
- package/dist/jsx/graphLayout/plan.native.js +372 -0
- package/dist/jsx/graphLayout/plan.native.js.map +1 -0
- package/dist/jsx/graphLayout/viewMath.mjs +105 -0
- package/dist/jsx/graphLayout/viewMath.mjs.map +1 -0
- package/dist/jsx/graphLayout/viewMath.native.js +147 -0
- package/dist/jsx/graphLayout/viewMath.native.js.map +1 -0
- package/graph-layout.ts +1 -0
- package/package.json +21 -6
- package/src/graphLayout/GraphDots.tsx +32 -0
- package/src/graphLayout/GraphLayout.stories.tsx +86 -0
- package/src/graphLayout/GraphLayout.tsx +152 -0
- package/src/graphLayout/GraphSvg.native.tsx +31 -0
- package/src/graphLayout/GraphSvg.tsx +45 -0
- package/src/graphLayout/GraphViewport.native.tsx +231 -0
- package/src/graphLayout/GraphViewport.tsx +246 -0
- package/src/graphLayout/index.ts +31 -0
- package/src/graphLayout/ogden.fixture.ts +120 -0
- package/src/graphLayout/plan.spec.ts +202 -0
- package/src/graphLayout/plan.ts +223 -0
- package/src/graphLayout/purity.spec.ts +67 -0
- package/src/graphLayout/viewMath.spec.ts +185 -0
- package/src/graphLayout/viewMath.ts +151 -0
- package/types/graphLayout/GraphDots.d.ts +9 -0
- package/types/graphLayout/GraphDots.d.ts.map +1 -0
- package/types/graphLayout/GraphLayout.d.ts +22 -0
- package/types/graphLayout/GraphLayout.d.ts.map +1 -0
- package/types/graphLayout/GraphSvg.d.ts +17 -0
- package/types/graphLayout/GraphSvg.d.ts.map +1 -0
- package/types/graphLayout/GraphSvg.native.d.ts +5 -0
- package/types/graphLayout/GraphSvg.native.d.ts.map +1 -0
- package/types/graphLayout/GraphViewport.d.ts +11 -0
- package/types/graphLayout/GraphViewport.d.ts.map +1 -0
- package/types/graphLayout/GraphViewport.native.d.ts +4 -0
- package/types/graphLayout/GraphViewport.native.d.ts.map +1 -0
- package/types/graphLayout/index.d.ts +11 -0
- package/types/graphLayout/index.d.ts.map +1 -0
- package/types/graphLayout/ogden.fixture.d.ts +3 -0
- package/types/graphLayout/ogden.fixture.d.ts.map +1 -0
- package/types/graphLayout/plan.d.ts +52 -0
- package/types/graphLayout/plan.d.ts.map +1 -0
- package/types/graphLayout/viewMath.d.ts +47 -0
- package/types/graphLayout/viewMath.d.ts.map +1 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var plan_exports = {};
|
|
26
|
+
__export(plan_exports, {
|
|
27
|
+
arrowHead: () => arrowHead,
|
|
28
|
+
graphEdgeId: () => graphEdgeId,
|
|
29
|
+
planGraphLayout: () => planGraphLayout,
|
|
30
|
+
usableEdges: () => usableEdges
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(plan_exports);
|
|
33
|
+
var import_edgeRoute = require("../edges/edgeRoute.native.js");
|
|
34
|
+
var import_edgePath = require("../edges/edgePath.native.js");
|
|
35
|
+
var import_edgeStyle = require("../edges/edgeStyle.native.js");
|
|
36
|
+
var import_dagre = require("../layout/dagre.native.js");
|
|
37
|
+
var import_xyPaths = require("../react-flow/xyPaths.native.js");
|
|
38
|
+
var sides = {
|
|
39
|
+
LR: {
|
|
40
|
+
out: import_xyPaths.Position.Right,
|
|
41
|
+
in: import_xyPaths.Position.Left
|
|
42
|
+
},
|
|
43
|
+
TB: {
|
|
44
|
+
out: import_xyPaths.Position.Bottom,
|
|
45
|
+
in: import_xyPaths.Position.Top
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var inward = {
|
|
49
|
+
[import_xyPaths.Position.Left]: {
|
|
50
|
+
x: 1,
|
|
51
|
+
y: 0
|
|
52
|
+
},
|
|
53
|
+
[import_xyPaths.Position.Right]: {
|
|
54
|
+
x: -1,
|
|
55
|
+
y: 0
|
|
56
|
+
},
|
|
57
|
+
[import_xyPaths.Position.Top]: {
|
|
58
|
+
x: 0,
|
|
59
|
+
y: 1
|
|
60
|
+
},
|
|
61
|
+
[import_xyPaths.Position.Bottom]: {
|
|
62
|
+
x: 0,
|
|
63
|
+
y: -1
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
function graphEdgeId(edge) {
|
|
67
|
+
var _edge_id;
|
|
68
|
+
return (_edge_id = edge.id) !== null && _edge_id !== void 0 ? _edge_id : `${edge.source}
|
|
69
|
+
${edge.target}`;
|
|
70
|
+
}
|
|
71
|
+
function usableEdges(nodes, edges) {
|
|
72
|
+
var known = new Set(nodes.map(function (node) {
|
|
73
|
+
return node.id;
|
|
74
|
+
}));
|
|
75
|
+
var seen = /* @__PURE__ */new Set();
|
|
76
|
+
var kept = [];
|
|
77
|
+
var _iteratorNormalCompletion = true,
|
|
78
|
+
_didIteratorError = false,
|
|
79
|
+
_iteratorError = void 0;
|
|
80
|
+
try {
|
|
81
|
+
for (var _iterator = edges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
82
|
+
var edge = _step.value;
|
|
83
|
+
if (edge.source === edge.target || !known.has(edge.source) || !known.has(edge.target)) continue;
|
|
84
|
+
var id = graphEdgeId(edge);
|
|
85
|
+
if (seen.has(id)) continue;
|
|
86
|
+
seen.add(id);
|
|
87
|
+
kept.push(edge);
|
|
88
|
+
}
|
|
89
|
+
} catch (err) {
|
|
90
|
+
_didIteratorError = true;
|
|
91
|
+
_iteratorError = err;
|
|
92
|
+
} finally {
|
|
93
|
+
try {
|
|
94
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
95
|
+
_iterator.return();
|
|
96
|
+
}
|
|
97
|
+
} finally {
|
|
98
|
+
if (_didIteratorError) {
|
|
99
|
+
throw _iteratorError;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return kept;
|
|
104
|
+
}
|
|
105
|
+
function placeNodes(input, edges) {
|
|
106
|
+
var _input_wrapWidth;
|
|
107
|
+
var placed = /* @__PURE__ */new Map();
|
|
108
|
+
if (input.positions) {
|
|
109
|
+
var _input_positions_node_id;
|
|
110
|
+
var _iteratorNormalCompletion = true,
|
|
111
|
+
_didIteratorError = false,
|
|
112
|
+
_iteratorError = void 0;
|
|
113
|
+
try {
|
|
114
|
+
for (var _iterator = input.nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
115
|
+
var node = _step.value;
|
|
116
|
+
placed.set(node.id, (_input_positions_node_id = input.positions[node.id]) !== null && _input_positions_node_id !== void 0 ? _input_positions_node_id : {
|
|
117
|
+
x: 0,
|
|
118
|
+
y: 0
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
} catch (err) {
|
|
122
|
+
_didIteratorError = true;
|
|
123
|
+
_iteratorError = err;
|
|
124
|
+
} finally {
|
|
125
|
+
try {
|
|
126
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
127
|
+
_iterator.return();
|
|
128
|
+
}
|
|
129
|
+
} finally {
|
|
130
|
+
if (_didIteratorError) {
|
|
131
|
+
throw _iteratorError;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return placed;
|
|
136
|
+
}
|
|
137
|
+
var linked = new Set(edges.flatMap(function (edge) {
|
|
138
|
+
return [edge.source, edge.target];
|
|
139
|
+
}));
|
|
140
|
+
var graphNodes = input.nodes.filter(function (node3) {
|
|
141
|
+
return linked.has(node3.id);
|
|
142
|
+
});
|
|
143
|
+
var isolated = input.nodes.filter(function (node3) {
|
|
144
|
+
return !linked.has(node3.id);
|
|
145
|
+
});
|
|
146
|
+
var dagWidth = 0;
|
|
147
|
+
var dagHeight = 0;
|
|
148
|
+
if (graphNodes.length > 0) {
|
|
149
|
+
var result = (0, import_dagre.layoutWithDagre)({
|
|
150
|
+
nodes: graphNodes.map(function (node3) {
|
|
151
|
+
return {
|
|
152
|
+
...node3,
|
|
153
|
+
position: {
|
|
154
|
+
x: 0,
|
|
155
|
+
y: 0
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}),
|
|
159
|
+
edges: edges.map(function (edge) {
|
|
160
|
+
return {
|
|
161
|
+
id: graphEdgeId(edge),
|
|
162
|
+
source: edge.source,
|
|
163
|
+
target: edge.target
|
|
164
|
+
};
|
|
165
|
+
}),
|
|
166
|
+
options: {
|
|
167
|
+
direction: input.direction,
|
|
168
|
+
nodeSpacing: input.nodeSpacing,
|
|
169
|
+
rankSpacing: input.rankSpacing
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
var _iteratorNormalCompletion1 = true,
|
|
173
|
+
_didIteratorError1 = false,
|
|
174
|
+
_iteratorError1 = void 0;
|
|
175
|
+
try {
|
|
176
|
+
for (var _iterator1 = graphNodes[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
177
|
+
var node1 = _step1.value;
|
|
178
|
+
var _result_positions_node_id;
|
|
179
|
+
var at = (_result_positions_node_id = result.positions[node1.id]) !== null && _result_positions_node_id !== void 0 ? _result_positions_node_id : {
|
|
180
|
+
x: 0,
|
|
181
|
+
y: 0
|
|
182
|
+
};
|
|
183
|
+
placed.set(node1.id, at);
|
|
184
|
+
dagWidth = Math.max(dagWidth, at.x + node1.width);
|
|
185
|
+
dagHeight = Math.max(dagHeight, at.y + node1.height);
|
|
186
|
+
}
|
|
187
|
+
} catch (err) {
|
|
188
|
+
_didIteratorError1 = true;
|
|
189
|
+
_iteratorError1 = err;
|
|
190
|
+
} finally {
|
|
191
|
+
try {
|
|
192
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
193
|
+
_iterator1.return();
|
|
194
|
+
}
|
|
195
|
+
} finally {
|
|
196
|
+
if (_didIteratorError1) {
|
|
197
|
+
throw _iteratorError1;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
var wrap = Math.max(dagWidth, (_input_wrapWidth = input.wrapWidth) !== null && _input_wrapWidth !== void 0 ? _input_wrapWidth : 0, ...isolated.map(function (node3) {
|
|
203
|
+
return node3.width;
|
|
204
|
+
}));
|
|
205
|
+
var x = 0;
|
|
206
|
+
var y = graphNodes.length > 0 ? dagHeight + input.rankSpacing : 0;
|
|
207
|
+
var rowHeight = 0;
|
|
208
|
+
var _iteratorNormalCompletion2 = true,
|
|
209
|
+
_didIteratorError2 = false,
|
|
210
|
+
_iteratorError2 = void 0;
|
|
211
|
+
try {
|
|
212
|
+
for (var _iterator2 = isolated[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
213
|
+
var node2 = _step2.value;
|
|
214
|
+
if (x > 0 && x + node2.width > wrap) {
|
|
215
|
+
x = 0;
|
|
216
|
+
y += rowHeight + input.nodeSpacing;
|
|
217
|
+
rowHeight = 0;
|
|
218
|
+
}
|
|
219
|
+
placed.set(node2.id, {
|
|
220
|
+
x,
|
|
221
|
+
y
|
|
222
|
+
});
|
|
223
|
+
x += node2.width + input.nodeSpacing;
|
|
224
|
+
rowHeight = Math.max(rowHeight, node2.height);
|
|
225
|
+
}
|
|
226
|
+
} catch (err) {
|
|
227
|
+
_didIteratorError2 = true;
|
|
228
|
+
_iteratorError2 = err;
|
|
229
|
+
} finally {
|
|
230
|
+
try {
|
|
231
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
232
|
+
_iterator2.return();
|
|
233
|
+
}
|
|
234
|
+
} finally {
|
|
235
|
+
if (_didIteratorError2) {
|
|
236
|
+
throw _iteratorError2;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return placed;
|
|
241
|
+
}
|
|
242
|
+
function anchor(node, side) {
|
|
243
|
+
switch (side) {
|
|
244
|
+
case import_xyPaths.Position.Left:
|
|
245
|
+
return {
|
|
246
|
+
x: node.x,
|
|
247
|
+
y: node.y + node.height / 2
|
|
248
|
+
};
|
|
249
|
+
case import_xyPaths.Position.Right:
|
|
250
|
+
return {
|
|
251
|
+
x: node.x + node.width,
|
|
252
|
+
y: node.y + node.height / 2
|
|
253
|
+
};
|
|
254
|
+
case import_xyPaths.Position.Top:
|
|
255
|
+
return {
|
|
256
|
+
x: node.x + node.width / 2,
|
|
257
|
+
y: node.y
|
|
258
|
+
};
|
|
259
|
+
default:
|
|
260
|
+
return {
|
|
261
|
+
x: node.x + node.width / 2,
|
|
262
|
+
y: node.y + node.height
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function round(value) {
|
|
267
|
+
return Math.round(value * 100) / 100;
|
|
268
|
+
}
|
|
269
|
+
function arrowHead(tip, side, strokeWidth) {
|
|
270
|
+
var into = inward[side];
|
|
271
|
+
var length = strokeWidth * 4;
|
|
272
|
+
var half = strokeWidth * 3 / 2;
|
|
273
|
+
var base = {
|
|
274
|
+
x: tip.x - into.x * length,
|
|
275
|
+
y: tip.y - into.y * length
|
|
276
|
+
};
|
|
277
|
+
var across = {
|
|
278
|
+
x: -into.y,
|
|
279
|
+
y: into.x
|
|
280
|
+
};
|
|
281
|
+
var a = {
|
|
282
|
+
x: base.x + across.x * half,
|
|
283
|
+
y: base.y + across.y * half
|
|
284
|
+
};
|
|
285
|
+
var b = {
|
|
286
|
+
x: base.x - across.x * half,
|
|
287
|
+
y: base.y - across.y * half
|
|
288
|
+
};
|
|
289
|
+
return `M ${round(tip.x)} ${round(tip.y)} L ${round(a.x)} ${round(a.y)} L ${round(b.x)} ${round(b.y)} Z`;
|
|
290
|
+
}
|
|
291
|
+
function planGraphLayout(input) {
|
|
292
|
+
var edges = usableEdges(input.nodes, input.edges);
|
|
293
|
+
var placed = placeNodes(input, edges);
|
|
294
|
+
var {
|
|
295
|
+
margin
|
|
296
|
+
} = input;
|
|
297
|
+
var nodes = input.nodes.map(function (node) {
|
|
298
|
+
var _placed_get;
|
|
299
|
+
var at = (_placed_get = placed.get(node.id)) !== null && _placed_get !== void 0 ? _placed_get : {
|
|
300
|
+
x: 0,
|
|
301
|
+
y: 0
|
|
302
|
+
};
|
|
303
|
+
return {
|
|
304
|
+
...node,
|
|
305
|
+
x: round(at.x + margin),
|
|
306
|
+
y: round(at.y + margin)
|
|
307
|
+
};
|
|
308
|
+
});
|
|
309
|
+
var byId = new Map(nodes.map(function (node) {
|
|
310
|
+
return [node.id, node];
|
|
311
|
+
}));
|
|
312
|
+
var boxes = nodes.map(function (node) {
|
|
313
|
+
return {
|
|
314
|
+
id: node.id,
|
|
315
|
+
x: node.x,
|
|
316
|
+
y: node.y,
|
|
317
|
+
width: node.width,
|
|
318
|
+
height: node.height
|
|
319
|
+
};
|
|
320
|
+
});
|
|
321
|
+
var side = sides[input.direction];
|
|
322
|
+
var planned = edges.map(function (edge) {
|
|
323
|
+
var _edge_kind, _edge_emphasis;
|
|
324
|
+
var source = byId.get(edge.source);
|
|
325
|
+
var target = byId.get(edge.target);
|
|
326
|
+
var from = anchor(source, side.out);
|
|
327
|
+
var tip = anchor(target, side.in);
|
|
328
|
+
var style = (0, import_edgeStyle.resolveEdgeStyle)({
|
|
329
|
+
kind: (_edge_kind = edge.kind) !== null && _edge_kind !== void 0 ? _edge_kind : "flow",
|
|
330
|
+
borderWidth: "small",
|
|
331
|
+
animation: "none"
|
|
332
|
+
});
|
|
333
|
+
var geometry = {
|
|
334
|
+
sourceX: from.x,
|
|
335
|
+
sourceY: from.y,
|
|
336
|
+
targetX: tip.x,
|
|
337
|
+
targetY: tip.y,
|
|
338
|
+
sourcePosition: side.out,
|
|
339
|
+
targetPosition: side.in
|
|
340
|
+
};
|
|
341
|
+
var [d] = (0, import_edgePath.buildEdgePath)(style.path, geometry, {
|
|
342
|
+
boxes,
|
|
343
|
+
clearance: import_edgeRoute.edgeClearance
|
|
344
|
+
});
|
|
345
|
+
return {
|
|
346
|
+
id: graphEdgeId(edge),
|
|
347
|
+
source: edge.source,
|
|
348
|
+
target: edge.target,
|
|
349
|
+
d,
|
|
350
|
+
head: arrowHead(tip, side.in, input.strokeWidth * (edge.emphasis ? 2 : 1)),
|
|
351
|
+
tip,
|
|
352
|
+
stroke: edge.emphasis ? "$accentColor" : style.stroke,
|
|
353
|
+
...(style.strokeDasharray ? {
|
|
354
|
+
dash: style.strokeDasharray
|
|
355
|
+
} : {}),
|
|
356
|
+
emphasis: (_edge_emphasis = edge.emphasis) !== null && _edge_emphasis !== void 0 ? _edge_emphasis : false
|
|
357
|
+
};
|
|
358
|
+
});
|
|
359
|
+
var width = nodes.reduce(function (most, node) {
|
|
360
|
+
return Math.max(most, node.x + node.width);
|
|
361
|
+
}, 0) + margin;
|
|
362
|
+
var height = nodes.reduce(function (most, node) {
|
|
363
|
+
return Math.max(most, node.y + node.height);
|
|
364
|
+
}, 0) + margin;
|
|
365
|
+
return {
|
|
366
|
+
width: round(width),
|
|
367
|
+
height: round(height),
|
|
368
|
+
nodes,
|
|
369
|
+
edges: planned
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
//# sourceMappingURL=plan.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","plan_exports","arrowHead","graphEdgeId","planGraphLayout","usableEdges","module","exports","import_edgeRoute","require","import_edgePath","import_edgeStyle","import_dagre","import_xyPaths","sides","LR","out","Position","Right","in","Left","TB","Bottom","Top","inward","x","y","edge","_edge_id","id","source","nodes","edges","known","Set","map","node","seen","kept","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","has","add","push","err","return","placeNodes","input","_input_wrapWidth","placed","Map","positions","_input_positions_node_id","set","linked","flatMap","graphNodes","filter","node3","isolated","dagWidth","dagHeight","length","result","layoutWithDagre","position"],"sources":["../../../src/graphLayout/plan.ts"],"sourcesContent":[null],"mappings":"AACA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAA,CAAAC,cAAqB;AAE9B,IAAAC,gBAAS,GAAAF,MAAA,CAAAG,wBAAwB;AACjC,IAAAC,iBAAS,GAAAJ,MAAA,CAAAK,mBAAuB;AAEhC,IAAAC,YAAS,GAAAN,MAAgB,CAAAO,SAAA,CAAAC,cAAA;AAsDzB,IAAAC,QAAM,GAAmFA,CAAAC,MAAA,EAAAC,GAAA;EACvF,KAAI,IAAEC,IAAK,IAAAD,GAAS,EACpBZ,SAAW,CAAAW,MAAA,EAASE,IAAA;IAAQC,GAAA,EAAIF,GAAA,CAAAC,IAAS;IAAAE,UAAI;EAAA;AAC/C;AAEA,IAAAC,WAAqC,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EACnC,IAACF,IAAA,IAAS,OAASA,IAAG,KAAM,QAAE,WAAAA,IAAA;IAC7B,SAASG,GAAA,IAAQhB,iBAAc,CAAAa,IAAA,GAC/B,KAAAX,YAAoB,CAAAe,IAAG,CAAGL,EAAE,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EAC5BnB,SAAS,CAAMiB,EAAA,EAAGI,GAAE,EAAG;MAAGP,GAAG,EAAAA,CAAA,KAAGI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;EACnC;EAEO,OAASE,EAAA;AACd;AAAgC,IAAKM,YAAW,GAAAC,GAAA,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AAClD,IAAAE,YAAA;AAEOhB,QAAA,CAASgB,YACd;EAGAC,SAAM,EAAAA,CAAA,KAAQA,SAAQ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CAAAM,MAAA;IACZ,IAAAC,MAAO,OAAA1D,YAAA,CAAA2D,eAAA;MACLxC,KAAI,EAAAgC,UAAY,CAAA5B,GAAI,WAAA8B,KAAA;QACpB,OAAQ;UACR,GAAAA,KAAQ;UACRO,QAAA;YACM/C,CAAA;YACNC,CAAA;UACA;QACA,CAAI;MACJ;MACFM,KAAA,EAAAA,KAAA,CAAAG,GAAA,WAAAR,IAAA;QACD;UACKE,EAAA,EAAA1B,WAAc,CAAAwB,IAAQ;UACtBG,MAAA,EAASH,IAAA,CAAMG,MAAA;UACd5C,MAAE,EAAOyC,IAAA,CAAAzC;QAClB","ignoreList":[]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const graphZoom = {
|
|
2
|
+
floor: 0.1,
|
|
3
|
+
step: 1.25,
|
|
4
|
+
settleMs: 220
|
|
5
|
+
};
|
|
6
|
+
function leastScale(content, viewport) {
|
|
7
|
+
"worklet";
|
|
8
|
+
|
|
9
|
+
if (content.width <= 0 || content.height <= 0 || viewport.width <= 0 || viewport.height <= 0) return 1;
|
|
10
|
+
const fit = Math.min(viewport.width / content.width, viewport.height / content.height);
|
|
11
|
+
return Math.min(1, Math.max(graphZoom.floor, fit));
|
|
12
|
+
}
|
|
13
|
+
function clampOffset(offset, content, viewport) {
|
|
14
|
+
"worklet";
|
|
15
|
+
|
|
16
|
+
if (content <= viewport) return (viewport - content) / 2;
|
|
17
|
+
return Math.min(0, Math.max(viewport - content, offset));
|
|
18
|
+
}
|
|
19
|
+
function clampView(view, content, viewport) {
|
|
20
|
+
"worklet";
|
|
21
|
+
|
|
22
|
+
const scale = Math.min(1, Math.max(leastScale(content, viewport), view.scale));
|
|
23
|
+
return {
|
|
24
|
+
scale,
|
|
25
|
+
x: clampOffset(view.x, content.width * scale, viewport.width),
|
|
26
|
+
y: clampOffset(view.y, content.height * scale, viewport.height)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function zoomAt(view, scale, focal, content, viewport) {
|
|
30
|
+
"worklet";
|
|
31
|
+
|
|
32
|
+
const next = Math.min(1, Math.max(leastScale(content, viewport), scale));
|
|
33
|
+
const ratio = next / view.scale;
|
|
34
|
+
return clampView({
|
|
35
|
+
scale: next,
|
|
36
|
+
x: focal.x - (focal.x - view.x) * ratio,
|
|
37
|
+
y: focal.y - (focal.y - view.y) * ratio
|
|
38
|
+
}, content, viewport);
|
|
39
|
+
}
|
|
40
|
+
function fittedView(content, viewport) {
|
|
41
|
+
"worklet";
|
|
42
|
+
|
|
43
|
+
return clampView({
|
|
44
|
+
scale: leastScale(content, viewport),
|
|
45
|
+
x: 0,
|
|
46
|
+
y: 0
|
|
47
|
+
}, content, viewport);
|
|
48
|
+
}
|
|
49
|
+
function toggledView(view, at, content, viewport) {
|
|
50
|
+
"worklet";
|
|
51
|
+
|
|
52
|
+
const least = leastScale(content, viewport);
|
|
53
|
+
return view.scale < 1 - 1e-3 ? zoomAt(view, 1, at, content, viewport) : zoomAt(view, least, at, content, viewport);
|
|
54
|
+
}
|
|
55
|
+
function keyedView(key, view, content, viewport) {
|
|
56
|
+
const centre = {
|
|
57
|
+
x: viewport.width / 2,
|
|
58
|
+
y: viewport.height / 2
|
|
59
|
+
};
|
|
60
|
+
if (key === "+" || key === "=") return zoomAt(view, view.scale * graphZoom.step, centre, content, viewport);
|
|
61
|
+
if (key === "-" || key === "_") return zoomAt(view, view.scale / graphZoom.step, centre, content, viewport);
|
|
62
|
+
if (key === "0") return zoomAt(view, 1, centre, content, viewport);
|
|
63
|
+
return void 0;
|
|
64
|
+
}
|
|
65
|
+
function dotPitch(pitch, scale) {
|
|
66
|
+
"worklet";
|
|
67
|
+
|
|
68
|
+
let spaced = pitch;
|
|
69
|
+
while (spaced * scale < pitch / 2) spaced *= 2;
|
|
70
|
+
return spaced;
|
|
71
|
+
}
|
|
72
|
+
function dotPhase(offset, scale, pitch, spaced) {
|
|
73
|
+
"worklet";
|
|
74
|
+
|
|
75
|
+
const step = spaced * scale;
|
|
76
|
+
const start = offset + pitch / 2 * scale;
|
|
77
|
+
return (start % step + step) % step - step;
|
|
78
|
+
}
|
|
79
|
+
function reachOf(offset, view, total, chunk) {
|
|
80
|
+
const start = Math.max(0, Math.floor(offset / chunk) * chunk - chunk);
|
|
81
|
+
return [start, Math.max(0, Math.min(view + chunk * 3, total - start))];
|
|
82
|
+
}
|
|
83
|
+
function dotArea(offset, viewport, canvas, chunk) {
|
|
84
|
+
const [x, width] = reachOf(offset.x, viewport.width, canvas.width, chunk);
|
|
85
|
+
const [y, height] = reachOf(offset.y, viewport.height, canvas.height, chunk);
|
|
86
|
+
return {
|
|
87
|
+
x,
|
|
88
|
+
y,
|
|
89
|
+
width,
|
|
90
|
+
height
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function dotPath(area, pitch) {
|
|
94
|
+
const runs = [];
|
|
95
|
+
const first = start => Math.ceil((start - pitch / 2) / pitch) * pitch + pitch / 2 - start;
|
|
96
|
+
for (let y = first(area.y); y < area.height; y += pitch) {
|
|
97
|
+
for (let x = first(area.x); x < area.width; x += pitch) runs.push(`M${x} ${y}h0.01`);
|
|
98
|
+
}
|
|
99
|
+
return runs.join("");
|
|
100
|
+
}
|
|
101
|
+
function sameArea(a, b) {
|
|
102
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
103
|
+
}
|
|
104
|
+
export { clampOffset, clampView, dotArea, dotPath, dotPhase, dotPitch, fittedView, graphZoom, keyedView, leastScale, sameArea, toggledView, zoomAt };
|
|
105
|
+
//# sourceMappingURL=viewMath.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["graphZoom","floor","step","settleMs","leastScale","content","viewport","width","height","fit","Math","min","max","clampOffset","offset","clampView","view","scale","x","y","zoomAt","focal","next","ratio","fittedView","toggledView","at","least","keyedView","key","centre","dotPitch","pitch","spaced","dotPhase","start","reachOf","total","chunk","dotArea","canvas","dotPath","area","runs","first","ceil","push","join","sameArea","a","b"],"sources":["../../../src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AAKG,IAAA,CAAK,IAAI5B,CAAC,IAAIC,CAAC,OAAO;EACrF;EACA,OAAOwB,IAAA,CAAKI,IAAA,CAAK,EAAE;AACrB;AAEO,SAASC,SAASC,CAAA,EAAYC,CAAA,EAAqB;EACxD,OAAOD,CAAA,CAAE/B,CAAA,KAAMgC,CAAA,CAAEhC,CAAA,IAAK+B,CAAA,CAAE9B,CAAA,KAAM+B,CAAA,CAAE/B,CAAA,IAAK8B,CAAA,CAAE1C,KAAA,KAAU2C,CAAA,CAAE3C,KAAA,IAAS0C,CAAA,CAAEzC,MAAA,KAAW0C,CAAA,CAAE1C,MAAA;AAC7E","ignoreList":[]}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var viewMath_exports = {};
|
|
26
|
+
__export(viewMath_exports, {
|
|
27
|
+
clampOffset: () => clampOffset,
|
|
28
|
+
clampView: () => clampView,
|
|
29
|
+
dotArea: () => dotArea,
|
|
30
|
+
dotPath: () => dotPath,
|
|
31
|
+
dotPhase: () => dotPhase,
|
|
32
|
+
dotPitch: () => dotPitch,
|
|
33
|
+
fittedView: () => fittedView,
|
|
34
|
+
graphZoom: () => graphZoom,
|
|
35
|
+
keyedView: () => keyedView,
|
|
36
|
+
leastScale: () => leastScale,
|
|
37
|
+
sameArea: () => sameArea,
|
|
38
|
+
toggledView: () => toggledView,
|
|
39
|
+
zoomAt: () => zoomAt
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(viewMath_exports);
|
|
42
|
+
var graphZoom = {
|
|
43
|
+
floor: 0.1,
|
|
44
|
+
step: 1.25,
|
|
45
|
+
settleMs: 220
|
|
46
|
+
};
|
|
47
|
+
function leastScale(content, viewport) {
|
|
48
|
+
"worklet";
|
|
49
|
+
|
|
50
|
+
if (content.width <= 0 || content.height <= 0 || viewport.width <= 0 || viewport.height <= 0) return 1;
|
|
51
|
+
var fit = Math.min(viewport.width / content.width, viewport.height / content.height);
|
|
52
|
+
return Math.min(1, Math.max(graphZoom.floor, fit));
|
|
53
|
+
}
|
|
54
|
+
function clampOffset(offset, content, viewport) {
|
|
55
|
+
"worklet";
|
|
56
|
+
|
|
57
|
+
if (content <= viewport) return (viewport - content) / 2;
|
|
58
|
+
return Math.min(0, Math.max(viewport - content, offset));
|
|
59
|
+
}
|
|
60
|
+
function clampView(view, content, viewport) {
|
|
61
|
+
"worklet";
|
|
62
|
+
|
|
63
|
+
var scale = Math.min(1, Math.max(leastScale(content, viewport), view.scale));
|
|
64
|
+
return {
|
|
65
|
+
scale,
|
|
66
|
+
x: clampOffset(view.x, content.width * scale, viewport.width),
|
|
67
|
+
y: clampOffset(view.y, content.height * scale, viewport.height)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function zoomAt(view, scale, focal, content, viewport) {
|
|
71
|
+
"worklet";
|
|
72
|
+
|
|
73
|
+
var next = Math.min(1, Math.max(leastScale(content, viewport), scale));
|
|
74
|
+
var ratio = next / view.scale;
|
|
75
|
+
return clampView({
|
|
76
|
+
scale: next,
|
|
77
|
+
x: focal.x - (focal.x - view.x) * ratio,
|
|
78
|
+
y: focal.y - (focal.y - view.y) * ratio
|
|
79
|
+
}, content, viewport);
|
|
80
|
+
}
|
|
81
|
+
function fittedView(content, viewport) {
|
|
82
|
+
"worklet";
|
|
83
|
+
|
|
84
|
+
return clampView({
|
|
85
|
+
scale: leastScale(content, viewport),
|
|
86
|
+
x: 0,
|
|
87
|
+
y: 0
|
|
88
|
+
}, content, viewport);
|
|
89
|
+
}
|
|
90
|
+
function toggledView(view, at, content, viewport) {
|
|
91
|
+
"worklet";
|
|
92
|
+
|
|
93
|
+
var least = leastScale(content, viewport);
|
|
94
|
+
return view.scale < 1 - 1e-3 ? zoomAt(view, 1, at, content, viewport) : zoomAt(view, least, at, content, viewport);
|
|
95
|
+
}
|
|
96
|
+
function keyedView(key, view, content, viewport) {
|
|
97
|
+
var centre = {
|
|
98
|
+
x: viewport.width / 2,
|
|
99
|
+
y: viewport.height / 2
|
|
100
|
+
};
|
|
101
|
+
if (key === "+" || key === "=") return zoomAt(view, view.scale * graphZoom.step, centre, content, viewport);
|
|
102
|
+
if (key === "-" || key === "_") return zoomAt(view, view.scale / graphZoom.step, centre, content, viewport);
|
|
103
|
+
if (key === "0") return zoomAt(view, 1, centre, content, viewport);
|
|
104
|
+
return void 0;
|
|
105
|
+
}
|
|
106
|
+
function dotPitch(pitch, scale) {
|
|
107
|
+
"worklet";
|
|
108
|
+
|
|
109
|
+
var spaced = pitch;
|
|
110
|
+
while (spaced * scale < pitch / 2) spaced *= 2;
|
|
111
|
+
return spaced;
|
|
112
|
+
}
|
|
113
|
+
function dotPhase(offset, scale, pitch, spaced) {
|
|
114
|
+
"worklet";
|
|
115
|
+
|
|
116
|
+
var step = spaced * scale;
|
|
117
|
+
var start = offset + pitch / 2 * scale;
|
|
118
|
+
return (start % step + step) % step - step;
|
|
119
|
+
}
|
|
120
|
+
function reachOf(offset, view, total, chunk) {
|
|
121
|
+
var start = Math.max(0, Math.floor(offset / chunk) * chunk - chunk);
|
|
122
|
+
return [start, Math.max(0, Math.min(view + chunk * 3, total - start))];
|
|
123
|
+
}
|
|
124
|
+
function dotArea(offset, viewport, canvas, chunk) {
|
|
125
|
+
var [x, width] = reachOf(offset.x, viewport.width, canvas.width, chunk);
|
|
126
|
+
var [y, height] = reachOf(offset.y, viewport.height, canvas.height, chunk);
|
|
127
|
+
return {
|
|
128
|
+
x,
|
|
129
|
+
y,
|
|
130
|
+
width,
|
|
131
|
+
height
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function dotPath(area, pitch) {
|
|
135
|
+
var runs = [];
|
|
136
|
+
var first = function first2(start) {
|
|
137
|
+
return Math.ceil((start - pitch / 2) / pitch) * pitch + pitch / 2 - start;
|
|
138
|
+
};
|
|
139
|
+
for (var y = first(area.y); y < area.height; y += pitch) {
|
|
140
|
+
for (var x = first(area.x); x < area.width; x += pitch) runs.push(`M${x} ${y}h0.01`);
|
|
141
|
+
}
|
|
142
|
+
return runs.join("");
|
|
143
|
+
}
|
|
144
|
+
function sameArea(a, b) {
|
|
145
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=viewMath.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","viewMath_exports","clampOffset","clampView","dotArea","dotPath","dotPhase","dotPitch","fittedView","graphZoom","keyedView","leastScale","sameArea","toggledView","zoomAt","module","exports","floor","step","settleMs","content","viewport","width","height","fit","Math","min","max","offset","view","scale","x","y","focal","next","ratio","at","least","centre"],"s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