@graphysdk/react-renderer 1.9.0-beta.1792407460425 → 1.9.0-beta.1792410301640
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/editable.cjs +1 -1
- package/dist/editable.css +1 -1
- package/dist/editable.d.ts +5 -6
- package/dist/editable.mjs +1724 -1692
- package/dist/history-chords-Coid8oNw.cjs +2 -0
- package/dist/{history-chords-BcKFOh7E.js → history-chords-J77rC1ob.js} +2029 -2011
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/index.mjs +277 -265
- package/package.json +2 -2
- package/dist/history-chords-B9ozn71x.cjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { COMPILER_STAGE_KEYS as re, Geom as
|
|
3
|
-
import { Component as Ue, useCallback as v, useEffect as
|
|
4
|
-
import { Fragment as
|
|
1
|
+
import { An as te, At as or, Bt as ar, Cn as ir, Dn as cr, Dt as lr, En as dr, Ft as Z, H as ur, Ht as Ne, Kt as mr, M as hr, Mt as gr, N as pr, Nn as J, Nt as vr, On as fr, Qt as yr, R as Sr, Rt as Ge, Sn as br, Tn as Er, Tt as Tr, Ut as Rr, V as Nr, Vt as Y, Xt as Gr, Yt as Cr, Zt as Dr, _n as z, _t as wr, a as Pr, an as qr, at as Ir, cn as _r, ct as kr, dn as fe, fn as Ce, gn as De, h as Lr, hn as Mr, i as xr, j as $r, jn as we, jt as Hr, kn as Pe, ln as ye, mn as W, mt as Ar, n as Br, nn as Or, ot as Kr, pn as qe, qt as Ie, r as Fr, s as jr, t as _e, un as A, vn as V, vt as Ur, w as Yr, wn as zr, xn as Wr, yn as Vr, z as Xr, zt as ke } from "./history-chords-J77rC1ob.js";
|
|
2
|
+
import { COMPILER_STAGE_KEYS as re, Geom as Le, GraphCompilationSession as Me, areEditTargetsEqual as xe, buildDiagnostic as oe, createAnchorResolver as $e, createCompiler as He, createDataLabelPlacementResolver as Ae, createSpecBuilder as Be, createStyleResolver as Se, findAnnotation as Oe, findLayerById as ae, isCompilerCachingEnabled as Ke, resolveDefinition as Fe, resolveGeomCornerRadiusPx as ie, setCompilerCachingEnabled as je, toPercent as j } from "@graphysdk/viz-engine";
|
|
3
|
+
import { Component as Ue, useCallback as v, useEffect as H, useId as Ye, useImperativeHandle as ze, useMemo as _, useRef as ce, useState as b, useSyncExternalStore as We } from "react";
|
|
4
|
+
import { Fragment as Ve, jsx as c, jsxs as f } from "react/jsx-runtime";
|
|
5
5
|
import { useStore as ee } from "zustand";
|
|
6
6
|
import { motion as X } from "motion/react";
|
|
7
7
|
import { createStore as ne } from "zustand/vanilla";
|
|
8
|
-
import
|
|
9
|
-
import './index.css';var
|
|
10
|
-
var
|
|
8
|
+
import Xe from "clsx";
|
|
9
|
+
import './index.css';var Qe = "_1a5iqpb0", Ze = "_1a5iqpb1";
|
|
10
|
+
var Je = "_1a5iqpb3", et = "_1a5iqpb4", tt = "_1a5iqpb5";
|
|
11
11
|
var le = ({ errors: e }) => {
|
|
12
12
|
const [t, ...r] = e;
|
|
13
13
|
return /* @__PURE__ */ f("div", {
|
|
14
14
|
role: "alert",
|
|
15
|
-
className:
|
|
15
|
+
className: Qe,
|
|
16
16
|
children: [
|
|
17
17
|
/* @__PURE__ */ c("strong", {
|
|
18
|
-
className:
|
|
18
|
+
className: Ze,
|
|
19
19
|
children: "This chart could not be rendered."
|
|
20
20
|
}),
|
|
21
21
|
t && /* @__PURE__ */ c(de, { diagnostic: t }),
|
|
@@ -26,14 +26,14 @@ var le = ({ errors: e }) => {
|
|
|
26
26
|
]
|
|
27
27
|
});
|
|
28
28
|
}, de = ({ diagnostic: e }) => /* @__PURE__ */ f("div", {
|
|
29
|
-
className:
|
|
29
|
+
className: Je,
|
|
30
30
|
children: [
|
|
31
31
|
/* @__PURE__ */ c("span", {
|
|
32
|
-
className:
|
|
32
|
+
className: et,
|
|
33
33
|
children: e.code
|
|
34
34
|
}),
|
|
35
35
|
/* @__PURE__ */ c("p", {
|
|
36
|
-
className:
|
|
36
|
+
className: tt,
|
|
37
37
|
children: e.message
|
|
38
38
|
}),
|
|
39
39
|
e.suggestion && /* @__PURE__ */ c("p", {
|
|
@@ -42,10 +42,10 @@ var le = ({ errors: e }) => {
|
|
|
42
42
|
})
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
|
-
function
|
|
45
|
+
function rt(e = [], t = []) {
|
|
46
46
|
return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
|
|
47
47
|
}
|
|
48
|
-
var
|
|
48
|
+
var nt = class extends Ue {
|
|
49
49
|
constructor(...e) {
|
|
50
50
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
51
51
|
}
|
|
@@ -57,7 +57,7 @@ var rt = class extends Ue {
|
|
|
57
57
|
J([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
|
|
58
58
|
}
|
|
59
59
|
componentDidUpdate(e) {
|
|
60
|
-
this.state.caughtDiagnostic && !
|
|
60
|
+
this.state.caughtDiagnostic && !rt(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
63
|
const { caughtDiagnostic: e } = this.state;
|
|
@@ -65,24 +65,24 @@ var rt = class extends Ue {
|
|
|
65
65
|
const { forcedErrors: t, children: r } = this.props;
|
|
66
66
|
return t && t.length > 0 ? /* @__PURE__ */ c(le, { errors: t }) : r;
|
|
67
67
|
}
|
|
68
|
-
},
|
|
69
|
-
const t =
|
|
70
|
-
return t instanceof
|
|
71
|
-
},
|
|
72
|
-
const r = e.filter((n) =>
|
|
68
|
+
}, be = (e) => typeof e == "object" && "geom" in e && "render" in e, Ee = (e) => {
|
|
69
|
+
const t = Fe(e);
|
|
70
|
+
return t instanceof Le ? t : null;
|
|
71
|
+
}, st = (e, t) => {
|
|
72
|
+
const r = e.filter((n) => ot(n, t));
|
|
73
73
|
return r.length === e.length ? e : r;
|
|
74
|
-
},
|
|
74
|
+
}, ot = (e, t) => e.kind === "annotation" ? Oe(t.annotations, e.id) !== null : e.kind === "observations" ? ae(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? ae(t.layers, e.layerId) !== void 0 : !0, ue = [], at = () => ne((e) => ({
|
|
75
75
|
selection: ue,
|
|
76
|
-
setSelection: (t) => e((r) =>
|
|
76
|
+
setSelection: (t) => e((r) => it(r.selection, t) ? r : { selection: t }),
|
|
77
77
|
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: ue })
|
|
78
|
-
})),
|
|
78
|
+
})), it = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
|
|
79
79
|
const s = t[n];
|
|
80
|
-
return s !== void 0 &&
|
|
81
|
-
}),
|
|
82
|
-
if (!
|
|
80
|
+
return s !== void 0 && xe(r, s);
|
|
81
|
+
}), ct = process.env.NODE_ENV !== "production", lt = 5, dt = (e) => {
|
|
82
|
+
if (!ct) return {
|
|
83
83
|
emit: () => {
|
|
84
84
|
},
|
|
85
|
-
subscribe: () =>
|
|
85
|
+
subscribe: () => mt,
|
|
86
86
|
getLastTrigger: () => null,
|
|
87
87
|
getLastCompile: () => null,
|
|
88
88
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -104,7 +104,7 @@ var rt = class extends Ue {
|
|
|
104
104
|
getLastCompile: () => e.getLastCompile(),
|
|
105
105
|
getCacheStats: () => e.getCacheStats()
|
|
106
106
|
};
|
|
107
|
-
},
|
|
107
|
+
}, ut = () => ne((e) => ({
|
|
108
108
|
lastCompile: null,
|
|
109
109
|
history: [],
|
|
110
110
|
nextId: 1,
|
|
@@ -120,12 +120,12 @@ var rt = class extends Ue {
|
|
|
120
120
|
};
|
|
121
121
|
return {
|
|
122
122
|
lastCompile: s,
|
|
123
|
-
history:
|
|
123
|
+
history: gt(n.history, s, lt),
|
|
124
124
|
nextId: n.nextId + 1,
|
|
125
125
|
lastSnapshot: r
|
|
126
126
|
};
|
|
127
127
|
})
|
|
128
|
-
})),
|
|
128
|
+
})), mt = () => {
|
|
129
129
|
}, ht = (e) => {
|
|
130
130
|
switch (e.kind) {
|
|
131
131
|
case "init":
|
|
@@ -137,14 +137,14 @@ var rt = class extends Ue {
|
|
|
137
137
|
case "command":
|
|
138
138
|
return e.command.metadata.description;
|
|
139
139
|
}
|
|
140
|
-
},
|
|
140
|
+
}, gt = (e, t, r) => {
|
|
141
141
|
const n = e.length >= r ? e.length - (r - 1) : 0;
|
|
142
142
|
return [...e.slice(n), t];
|
|
143
143
|
};
|
|
144
|
-
function
|
|
145
|
-
const t = e.filter(
|
|
144
|
+
function me(e) {
|
|
145
|
+
const t = e.filter(be), r = /* @__PURE__ */ new Set([...Object.keys(Ne), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
|
|
146
146
|
for (const l of e) {
|
|
147
|
-
const d =
|
|
147
|
+
const d = Ee(l);
|
|
148
148
|
d === null || r.has(d.type) || s.has(d.type) || (s.add(d.type), n.push({
|
|
149
149
|
kind: "user-input",
|
|
150
150
|
severity: "error",
|
|
@@ -160,32 +160,32 @@ function he(e) {
|
|
|
160
160
|
const i = /* @__PURE__ */ new Map();
|
|
161
161
|
for (const l of t) {
|
|
162
162
|
if ("definition" in l) continue;
|
|
163
|
-
const d = `${l.geom}|${l.coord}`,
|
|
164
|
-
|
|
163
|
+
const d = `${l.geom}|${l.coord}`, m = i.get(d);
|
|
164
|
+
m ? m.count += 1 : i.set(d, {
|
|
165
165
|
geom: l.geom,
|
|
166
166
|
coord: l.coord,
|
|
167
167
|
count: 1
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
const a = [];
|
|
171
|
-
for (const { geom: l, coord: d, count:
|
|
172
|
-
|
|
171
|
+
for (const { geom: l, coord: d, count: m } of i.values())
|
|
172
|
+
m < 2 || a.push({
|
|
173
173
|
kind: "user-input",
|
|
174
174
|
severity: "warning",
|
|
175
175
|
code: "DUPLICATE_REGISTERED_TYPE",
|
|
176
|
-
message: `Multiple render-only overrides register ('${l}', '${d}') (${
|
|
176
|
+
message: `Multiple render-only overrides register ('${l}', '${d}') (${m} entries); the last in the array wins.`,
|
|
177
177
|
context: {
|
|
178
178
|
requested: `${l}@${d}`,
|
|
179
179
|
kind: "geom-renderer"
|
|
180
180
|
},
|
|
181
181
|
suggestion: `Keep a single render-only override for ('${l}', '${d}').`
|
|
182
182
|
});
|
|
183
|
-
return a.push(...
|
|
183
|
+
return a.push(...Rt(e)), {
|
|
184
184
|
errors: n,
|
|
185
185
|
warnings: a
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function pt(e, t) {
|
|
189
189
|
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
|
|
190
190
|
for (const a of n)
|
|
191
191
|
t(a.geom, r.type) !== null || s.has(a.geom) || (s.add(a.geom), i.push({
|
|
@@ -201,12 +201,12 @@ function gt(e, t) {
|
|
|
201
201
|
}));
|
|
202
202
|
return i;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function vt(e, t) {
|
|
205
205
|
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
|
|
206
206
|
for (const a of n) {
|
|
207
207
|
if (a.interactive === !1 || a.spatialKind !== "render-hit-test" || s.has(a.geom)) continue;
|
|
208
208
|
const l = t(a.geom, r.type);
|
|
209
|
-
l === null || l.hitTest ||
|
|
209
|
+
l === null || l.hitTest || Y(l) || (s.add(a.geom), i.push({
|
|
210
210
|
kind: "user-input",
|
|
211
211
|
severity: "warning",
|
|
212
212
|
code: "MISSING_RENDER_HIT_TEST",
|
|
@@ -220,7 +220,7 @@ function pt(e, t) {
|
|
|
220
220
|
}
|
|
221
221
|
return i;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function ft(e) {
|
|
224
224
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
225
225
|
for (const n of e.layers) {
|
|
226
226
|
const s = n.identityKey;
|
|
@@ -238,12 +238,12 @@ function vt(e) {
|
|
|
238
238
|
}
|
|
239
239
|
return r;
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function yt(e, t) {
|
|
242
242
|
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
|
|
243
243
|
for (const a of n) {
|
|
244
244
|
if (a.interactive === !1 || a.spatialKind !== "render-hit-test" || s.has(a.geom)) continue;
|
|
245
245
|
const l = t(a.geom, r.type);
|
|
246
|
-
l === null || !l.hitTest || !
|
|
246
|
+
l === null || !l.hitTest || !Y(l) || (s.add(a.geom), i.push({
|
|
247
247
|
kind: "user-input",
|
|
248
248
|
severity: "warning",
|
|
249
249
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
@@ -257,7 +257,7 @@ function ft(e, t) {
|
|
|
257
257
|
}
|
|
258
258
|
return i;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function St(e, t) {
|
|
261
261
|
const r = /* @__PURE__ */ new Set(), n = [];
|
|
262
262
|
for (const s of e.layers)
|
|
263
263
|
s.interactive !== !1 && (s.spatialKind !== "render-hit-test" || r.has(s.geom) || t.hasCapability(s.geom) || (r.add(s.geom), n.push({
|
|
@@ -273,12 +273,12 @@ function yt(e, t) {
|
|
|
273
273
|
})));
|
|
274
274
|
return n;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function bt(e, t) {
|
|
277
277
|
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
|
|
278
278
|
for (const a of n) {
|
|
279
279
|
if (a.interactive === !1 || a.spatialKind === "render-hit-test" || s.has(a.geom)) continue;
|
|
280
280
|
const l = t(a.geom, r.type);
|
|
281
|
-
l === null || !
|
|
281
|
+
l === null || !Y(l) || (s.add(a.geom), i.push({
|
|
282
282
|
kind: "user-input",
|
|
283
283
|
severity: "warning",
|
|
284
284
|
code: "LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",
|
|
@@ -292,9 +292,9 @@ function St(e, t) {
|
|
|
292
292
|
}
|
|
293
293
|
return i;
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Et(e, t) {
|
|
296
296
|
let r;
|
|
297
|
-
return e.layers.flatMap((n, s) =>
|
|
297
|
+
return e.layers.flatMap((n, s) => Y(t(n.geom, e.coordSystem.type)) ? Tt(n) ? (r ??= Se().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
|
|
298
298
|
kind: "user-input",
|
|
299
299
|
severity: "warning",
|
|
300
300
|
code: "INVALID_STYLE_RULE",
|
|
@@ -307,11 +307,11 @@ function bt(e, t) {
|
|
|
307
307
|
suggestion: "Remove the hovered overpaint, or paint the hover treatment in the geom's live render."
|
|
308
308
|
}]) : [] : []);
|
|
309
309
|
}
|
|
310
|
-
var
|
|
311
|
-
function
|
|
310
|
+
var Tt = (e) => [e.styles.defaults, e.styles.overrides].some((t) => t.some((r) => r.state === "hovered" && (r.declarations.overpaint?.length ?? 0) > 0));
|
|
311
|
+
function Rt(e) {
|
|
312
312
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
313
313
|
for (const n of e) {
|
|
314
|
-
const s =
|
|
314
|
+
const s = Ee(n);
|
|
315
315
|
s === null || t.has(s.type) || s.dataLabelCoordTypes.length === 0 || s.getDataLabelPlacements !== void 0 || (t.add(s.type), r.push({
|
|
316
316
|
kind: "user-input",
|
|
317
317
|
severity: "warning",
|
|
@@ -326,34 +326,34 @@ function Tt(e) {
|
|
|
326
326
|
}
|
|
327
327
|
return r;
|
|
328
328
|
}
|
|
329
|
-
var
|
|
329
|
+
var Nt = (e) => ne((t) => ({
|
|
330
330
|
scene: e,
|
|
331
331
|
setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
|
|
332
|
-
})),
|
|
333
|
-
const G = Z(l), C = Z(d), T = Z(
|
|
334
|
-
const o =
|
|
332
|
+
})), Gt = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: i, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: m }) => {
|
|
333
|
+
const G = Z(l), C = Z(d), T = Z(m), [{ session: g, compileBus: u }] = b(() => {
|
|
334
|
+
const o = He({
|
|
335
335
|
plugins: n,
|
|
336
336
|
theme: s
|
|
337
337
|
});
|
|
338
338
|
return {
|
|
339
|
-
session: new
|
|
340
|
-
compileBus:
|
|
339
|
+
session: new Me(o),
|
|
340
|
+
compileBus: dt(o)
|
|
341
341
|
};
|
|
342
342
|
}), [p] = b(() => {
|
|
343
|
-
const o =
|
|
343
|
+
const o = me(n ?? []), h = me(s?.plugins ?? []);
|
|
344
344
|
return {
|
|
345
|
-
errors: [...
|
|
346
|
-
warnings: [...
|
|
345
|
+
errors: [...h.errors, ...o.errors],
|
|
346
|
+
warnings: [...h.warnings, ...o.warnings]
|
|
347
347
|
};
|
|
348
|
-
}), R = ce(null), [y] = b(
|
|
348
|
+
}), R = ce(null), [y] = b(Ct), D = ce(null), q = v((o) => p.errors.length === 0 ? o : [...p.errors, ...o ?? []], [p]), N = v((o) => {
|
|
349
349
|
if (!o.ok) return o.errors;
|
|
350
|
-
if (
|
|
350
|
+
if (D.current) D.current.getState().setScene(o.scene);
|
|
351
351
|
else {
|
|
352
|
-
const
|
|
353
|
-
|
|
352
|
+
const h = Nt(o.scene);
|
|
353
|
+
h.subscribe(y.notify), D.current = h, y.notify();
|
|
354
354
|
}
|
|
355
355
|
return null;
|
|
356
|
-
}, [y]), [
|
|
356
|
+
}, [y]), [B, k] = b(() => {
|
|
357
357
|
const o = g.compile({
|
|
358
358
|
spec: e,
|
|
359
359
|
data: t,
|
|
@@ -362,28 +362,28 @@ var Rt = (e) => ne((t) => ({
|
|
|
362
362
|
return R.current = o, q(N(o));
|
|
363
363
|
}), E = v((o) => o.ok ? [
|
|
364
364
|
...o.warnings,
|
|
365
|
-
...gt(o.scene, i),
|
|
366
365
|
...pt(o.scene, i),
|
|
367
|
-
...vt(o.scene),
|
|
368
|
-
...ft(o.scene
|
|
369
|
-
...
|
|
366
|
+
...vt(o.scene, i),
|
|
367
|
+
...ft(o.scene),
|
|
368
|
+
...yt(o.scene, i),
|
|
370
369
|
...bt(o.scene, i),
|
|
371
|
-
...
|
|
372
|
-
|
|
370
|
+
...Et(o.scene, i),
|
|
371
|
+
...St(o.scene, a)
|
|
372
|
+
] : o.warnings, [i, a]), w = v((o) => {
|
|
373
373
|
o.length !== 0 && (J(o), C.current?.(o));
|
|
374
374
|
}, [C]), P = v((o) => {
|
|
375
375
|
o.length !== 0 && (J(o), T.current?.(o));
|
|
376
376
|
}, [T]);
|
|
377
|
-
|
|
377
|
+
H(() => {
|
|
378
378
|
const o = R.current;
|
|
379
|
-
o && (
|
|
379
|
+
o && (w([...p.errors, ...o.ok ? [] : o.errors]), P([...p.warnings, ...E(o)]), o.ok && u.emit({ kind: "init" }));
|
|
380
380
|
}, [
|
|
381
381
|
u,
|
|
382
|
-
|
|
382
|
+
w,
|
|
383
383
|
P,
|
|
384
384
|
p,
|
|
385
385
|
E
|
|
386
|
-
]),
|
|
386
|
+
]), H(() => {
|
|
387
387
|
const o = g.update({
|
|
388
388
|
spec: e,
|
|
389
389
|
data: t,
|
|
@@ -391,8 +391,8 @@ var Rt = (e) => ne((t) => ({
|
|
|
391
391
|
});
|
|
392
392
|
if (!o) return;
|
|
393
393
|
o.committedSpec && G.current?.(o.committedSpec);
|
|
394
|
-
const
|
|
395
|
-
k(q(
|
|
394
|
+
const h = N(o.result);
|
|
395
|
+
k(q(h)), h && w(h), P(E(o.result)), h || u.emit({ kind: o.specChanged ? "spec" : "data" });
|
|
396
396
|
}, [
|
|
397
397
|
e,
|
|
398
398
|
t,
|
|
@@ -400,55 +400,55 @@ var Rt = (e) => ne((t) => ({
|
|
|
400
400
|
g,
|
|
401
401
|
u,
|
|
402
402
|
N,
|
|
403
|
-
|
|
403
|
+
w,
|
|
404
404
|
P,
|
|
405
405
|
q,
|
|
406
406
|
E,
|
|
407
407
|
G
|
|
408
408
|
]);
|
|
409
409
|
const L = v((o) => {
|
|
410
|
-
k((
|
|
410
|
+
k((h) => h === null ? h : q(null)), P(E(o));
|
|
411
411
|
}, [
|
|
412
412
|
q,
|
|
413
413
|
P,
|
|
414
414
|
E
|
|
415
|
-
]),
|
|
416
|
-
o.scene &&
|
|
415
|
+
]), O = v((o) => {
|
|
416
|
+
o.scene && D.current?.getState().setScene(o.scene), o.result && L(o.result), o.command && u.emit({
|
|
417
417
|
kind: "command",
|
|
418
418
|
command: o.command
|
|
419
|
-
}), o.spec && G.current?.(o.spec), o.errors &&
|
|
419
|
+
}), o.spec && G.current?.(o.spec), o.errors && w([...o.errors]);
|
|
420
420
|
}, [
|
|
421
421
|
L,
|
|
422
422
|
u,
|
|
423
423
|
G,
|
|
424
|
-
|
|
424
|
+
w
|
|
425
425
|
]), S = v((o) => {
|
|
426
|
-
for (const
|
|
427
|
-
return o.some((
|
|
428
|
-
}, [
|
|
429
|
-
S(g.applyCommand(o,
|
|
426
|
+
for (const h of o) O(h);
|
|
427
|
+
return o.some((h) => !!h.scene);
|
|
428
|
+
}, [O]), K = v((o, h) => {
|
|
429
|
+
S(g.applyCommand(o, h));
|
|
430
430
|
}, [g, S]), I = v(() => {
|
|
431
431
|
S(g.commit());
|
|
432
|
-
}, [g, S]),
|
|
432
|
+
}, [g, S]), F = v(() => S(g.undo()), [g, S]), M = v(() => S(g.redo()), [g, S]), Q = _(() => ({
|
|
433
433
|
stack: g.history,
|
|
434
|
-
undo:
|
|
435
|
-
redo:
|
|
434
|
+
undo: F,
|
|
435
|
+
redo: M
|
|
436
436
|
}), [
|
|
437
437
|
g,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
]),
|
|
438
|
+
F,
|
|
439
|
+
M
|
|
440
|
+
]), Re = v(() => D.current?.getState().scene ?? null, []);
|
|
441
441
|
return {
|
|
442
|
-
store:
|
|
443
|
-
dispatch:
|
|
442
|
+
store: D.current,
|
|
443
|
+
dispatch: K,
|
|
444
444
|
commit: I,
|
|
445
445
|
history: Q,
|
|
446
446
|
subscribe: y.subscribe,
|
|
447
|
-
getScene:
|
|
447
|
+
getScene: Re,
|
|
448
448
|
compileBus: u,
|
|
449
|
-
compileErrors:
|
|
449
|
+
compileErrors: B
|
|
450
450
|
};
|
|
451
|
-
},
|
|
451
|
+
}, Ct = () => {
|
|
452
452
|
const e = /* @__PURE__ */ new Set();
|
|
453
453
|
return {
|
|
454
454
|
subscribe: (t) => (e.add(t), () => {
|
|
@@ -456,8 +456,8 @@ var Rt = (e) => ne((t) => ({
|
|
|
456
456
|
}),
|
|
457
457
|
notify: () => e.forEach((t) => t())
|
|
458
458
|
};
|
|
459
|
-
},
|
|
460
|
-
const [C] = b(() => n), T = C?.colorScheme ??
|
|
459
|
+
}, Dt = ({ data: e, spec: t, plugins: r = [], theme: n, formattingLocale: s, handleRef: i, onSpecChange: a, onError: l, onWarnings: d, colorScheme: m = "light", children: G }) => {
|
|
460
|
+
const [C] = b(() => n), T = C?.colorScheme ?? m, [g] = b(() => ke([...C?.plugins ?? [], ...r].filter(be))), u = Ye(), [p] = b(() => $e(r)), [R] = b(() => Ae(r)), [y] = b(() => at()), [D] = b(() => Ge()), q = _(() => Se({ colorScheme: T }), [T]), { store: N, dispatch: B, commit: k, history: E, subscribe: w, getScene: P, compileBus: L, compileErrors: O } = Gt({
|
|
461
461
|
spec: t,
|
|
462
462
|
data: e,
|
|
463
463
|
colorScheme: T,
|
|
@@ -469,23 +469,23 @@ var Rt = (e) => ne((t) => ({
|
|
|
469
469
|
onError: l,
|
|
470
470
|
onWarnings: d
|
|
471
471
|
});
|
|
472
|
-
|
|
472
|
+
H(() => {
|
|
473
473
|
if (N)
|
|
474
|
-
return N.subscribe((I,
|
|
475
|
-
if (I.scene.spec ===
|
|
476
|
-
const { selection:
|
|
477
|
-
|
|
474
|
+
return N.subscribe((I, F) => {
|
|
475
|
+
if (I.scene.spec === F.scene.spec) return;
|
|
476
|
+
const { selection: M, setSelection: Q } = y.getState();
|
|
477
|
+
M.length !== 0 && Q(st(M, I.scene.spec));
|
|
478
478
|
});
|
|
479
479
|
}, [N, y]);
|
|
480
480
|
const S = _(() => ({
|
|
481
|
-
dispatch:
|
|
481
|
+
dispatch: B,
|
|
482
482
|
commit: k
|
|
483
|
-
}), [
|
|
484
|
-
|
|
483
|
+
}), [B, k]);
|
|
484
|
+
ze(i, () => ({
|
|
485
485
|
commands: S,
|
|
486
486
|
undo: E.undo,
|
|
487
487
|
redo: E.redo,
|
|
488
|
-
subscribe:
|
|
488
|
+
subscribe: w,
|
|
489
489
|
getScene: P,
|
|
490
490
|
getSelection: () => y.getState().selection,
|
|
491
491
|
setSelection: (I) => y.getState().setSelection(I),
|
|
@@ -495,16 +495,16 @@ var Rt = (e) => ne((t) => ({
|
|
|
495
495
|
}), [
|
|
496
496
|
S,
|
|
497
497
|
E,
|
|
498
|
-
|
|
498
|
+
w,
|
|
499
499
|
P,
|
|
500
500
|
y,
|
|
501
501
|
R
|
|
502
502
|
]);
|
|
503
|
-
const
|
|
503
|
+
const K = _(() => N ? {
|
|
504
504
|
chartId: u,
|
|
505
505
|
store: N,
|
|
506
506
|
selectionStore: y,
|
|
507
|
-
targetBoundaryStore:
|
|
507
|
+
targetBoundaryStore: D,
|
|
508
508
|
commands: S,
|
|
509
509
|
history: E,
|
|
510
510
|
formattingLocale: s,
|
|
@@ -516,7 +516,7 @@ var Rt = (e) => ne((t) => ({
|
|
|
516
516
|
u,
|
|
517
517
|
N,
|
|
518
518
|
y,
|
|
519
|
-
|
|
519
|
+
D,
|
|
520
520
|
S,
|
|
521
521
|
E,
|
|
522
522
|
s,
|
|
@@ -525,17 +525,17 @@ var Rt = (e) => ne((t) => ({
|
|
|
525
525
|
q,
|
|
526
526
|
p
|
|
527
527
|
]);
|
|
528
|
-
return /* @__PURE__ */ c(
|
|
529
|
-
forcedErrors:
|
|
528
|
+
return /* @__PURE__ */ c(nt, {
|
|
529
|
+
forcedErrors: O,
|
|
530
530
|
onError: l,
|
|
531
531
|
resetKeys: [t, e],
|
|
532
|
-
children:
|
|
533
|
-
value:
|
|
534
|
-
children: /* @__PURE__ */ c(
|
|
532
|
+
children: K ? /* @__PURE__ */ c(Pe.Provider, {
|
|
533
|
+
value: K,
|
|
534
|
+
children: /* @__PURE__ */ c(Ie, {
|
|
535
535
|
value: g,
|
|
536
|
-
children: /* @__PURE__ */ c(
|
|
536
|
+
children: /* @__PURE__ */ c(we, {
|
|
537
537
|
value: R,
|
|
538
|
-
children: /* @__PURE__ */ c(
|
|
538
|
+
children: /* @__PURE__ */ c(A, {
|
|
539
539
|
shapes: C?.shapes,
|
|
540
540
|
children: G
|
|
541
541
|
})
|
|
@@ -545,30 +545,31 @@ var Rt = (e) => ne((t) => ({
|
|
|
545
545
|
});
|
|
546
546
|
};
|
|
547
547
|
function sn({ theme: e, ...t } = {}) {
|
|
548
|
-
const r =
|
|
548
|
+
const r = Be(t);
|
|
549
549
|
return {
|
|
550
550
|
...r,
|
|
551
|
-
GraphProvider: (s) => /* @__PURE__ */ c(
|
|
551
|
+
GraphProvider: (s) => /* @__PURE__ */ c(Dt, {
|
|
552
552
|
...s,
|
|
553
553
|
plugins: r.plugins,
|
|
554
554
|
theme: e
|
|
555
555
|
})
|
|
556
556
|
};
|
|
557
557
|
}
|
|
558
|
-
var
|
|
559
|
-
if (typeof e
|
|
558
|
+
var $ = (e, t) => {
|
|
559
|
+
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
560
|
+
if (!e.endsWith("%")) return null;
|
|
560
561
|
const r = Number.parseFloat(e);
|
|
561
562
|
return Number.isFinite(r) ? r / 100 * t : null;
|
|
562
|
-
},
|
|
563
|
-
const i =
|
|
563
|
+
}, on = ({ x: e, y: t, width: r, height: n }, s) => {
|
|
564
|
+
const i = $(e, s.width), a = $(t, s.height), l = $(r, s.width), d = $(n, s.height);
|
|
564
565
|
return i === null || a === null || l === null || d === null ? null : {
|
|
565
566
|
x: i,
|
|
566
567
|
y: a,
|
|
567
568
|
width: l,
|
|
568
569
|
height: d
|
|
569
570
|
};
|
|
570
|
-
},
|
|
571
|
-
const a =
|
|
571
|
+
}, wt = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, effects: s, ...i }) => {
|
|
572
|
+
const a = V(s);
|
|
572
573
|
return e ? /* @__PURE__ */ c(X.circle, {
|
|
573
574
|
initial: !1,
|
|
574
575
|
animate: {
|
|
@@ -576,7 +577,7 @@ var U = (e, t) => {
|
|
|
576
577
|
cy: r,
|
|
577
578
|
r: n
|
|
578
579
|
},
|
|
579
|
-
transition:
|
|
580
|
+
transition: z,
|
|
580
581
|
style: a,
|
|
581
582
|
...i
|
|
582
583
|
}) : /* @__PURE__ */ c("circle", {
|
|
@@ -587,7 +588,7 @@ var U = (e, t) => {
|
|
|
587
588
|
...i
|
|
588
589
|
});
|
|
589
590
|
}, Pt = ({ shouldAnimateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: i, ...a }) => {
|
|
590
|
-
const l =
|
|
591
|
+
const l = V(i);
|
|
591
592
|
return e ? /* @__PURE__ */ c(X.line, {
|
|
592
593
|
initial: !1,
|
|
593
594
|
animate: {
|
|
@@ -596,7 +597,7 @@ var U = (e, t) => {
|
|
|
596
597
|
x2: n,
|
|
597
598
|
y2: s
|
|
598
599
|
},
|
|
599
|
-
transition:
|
|
600
|
+
transition: z,
|
|
600
601
|
style: l,
|
|
601
602
|
...a
|
|
602
603
|
}) : /* @__PURE__ */ c("line", {
|
|
@@ -608,7 +609,7 @@ var U = (e, t) => {
|
|
|
608
609
|
...a
|
|
609
610
|
});
|
|
610
611
|
}, qt = ({ shouldAnimateTransitions: e, x: t, y: r, width: n, height: s, rx: i, ry: a, effects: l, ...d }) => {
|
|
611
|
-
const
|
|
612
|
+
const m = V(l);
|
|
612
613
|
return e ? /* @__PURE__ */ c(X.rect, {
|
|
613
614
|
initial: !1,
|
|
614
615
|
animate: {
|
|
@@ -621,8 +622,8 @@ var U = (e, t) => {
|
|
|
621
622
|
ry: a
|
|
622
623
|
} : {}
|
|
623
624
|
},
|
|
624
|
-
transition:
|
|
625
|
-
style:
|
|
625
|
+
transition: z,
|
|
626
|
+
style: m,
|
|
626
627
|
...d
|
|
627
628
|
}) : /* @__PURE__ */ c("rect", {
|
|
628
629
|
x: t,
|
|
@@ -631,11 +632,11 @@ var U = (e, t) => {
|
|
|
631
632
|
height: s,
|
|
632
633
|
rx: i,
|
|
633
634
|
ry: a,
|
|
634
|
-
style:
|
|
635
|
+
style: m,
|
|
635
636
|
...d
|
|
636
637
|
});
|
|
637
638
|
}, It = ({ shouldAnimateTransitions: e, d: t, source: r, effects: n, ...s }) => {
|
|
638
|
-
const i =
|
|
639
|
+
const i = V(n);
|
|
639
640
|
return e ? /* @__PURE__ */ c(_t, {
|
|
640
641
|
d: t,
|
|
641
642
|
source: r,
|
|
@@ -646,23 +647,23 @@ var U = (e, t) => {
|
|
|
646
647
|
style: i,
|
|
647
648
|
...s
|
|
648
649
|
});
|
|
649
|
-
}, on = (e) => {
|
|
650
|
-
const { Circle: t } = z();
|
|
651
|
-
return t === void 0 ? Dt(e) : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
652
650
|
}, an = (e) => {
|
|
653
|
-
const {
|
|
654
|
-
return t === void 0 ?
|
|
655
|
-
}, cn = (
|
|
656
|
-
const {
|
|
651
|
+
const { Circle: t } = W();
|
|
652
|
+
return t === void 0 ? wt(e) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
653
|
+
}, cn = (e) => {
|
|
654
|
+
const { Line: t } = W();
|
|
655
|
+
return t === void 0 ? Pt(e) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
656
|
+
}, ln = ({ cornerRadius: e, ...t }) => {
|
|
657
|
+
const { Rect: r } = W(), n = fe(), s = qe(), i = {
|
|
657
658
|
...t,
|
|
658
659
|
...kt(e, t, n, s)
|
|
659
660
|
};
|
|
660
|
-
return r === void 0 ? qt(i) : /* @__PURE__ */ c(
|
|
661
|
-
},
|
|
662
|
-
const { Path: t } =
|
|
663
|
-
return t === void 0 ? It(e) : /* @__PURE__ */ c(
|
|
661
|
+
return r === void 0 ? qt(i) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(r, { ...i }) });
|
|
662
|
+
}, dn = (e) => {
|
|
663
|
+
const { Path: t } = W();
|
|
664
|
+
return t === void 0 ? It(e) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
664
665
|
}, _t = ({ d: e, source: t, ...r }) => {
|
|
665
|
-
const n =
|
|
666
|
+
const n = De(e, z, t);
|
|
666
667
|
return /* @__PURE__ */ c(X.path, {
|
|
667
668
|
d: n,
|
|
668
669
|
...r
|
|
@@ -671,19 +672,30 @@ var U = (e, t) => {
|
|
|
671
672
|
if (e === void 0) return {};
|
|
672
673
|
const s = Lt(t, r, n);
|
|
673
674
|
if (s === null)
|
|
674
|
-
return e === "full" ? {} :
|
|
675
|
+
return e === "full" ? {} : ge(ie({ cornerRadius: e }), n);
|
|
675
676
|
const i = Math.min(ie({
|
|
676
677
|
cornerRadius: e,
|
|
677
678
|
box: s
|
|
678
679
|
}), Math.min(s.width, s.height) / 2);
|
|
679
|
-
return
|
|
680
|
-
}, Lt = (e, t, r) =>
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
680
|
+
return ge(i, n);
|
|
681
|
+
}, Lt = (e, t, r) => {
|
|
682
|
+
const n = he(e.width, t?.width, r.x), s = he(e.height, t?.height, r.y);
|
|
683
|
+
return n === null || s === null ? null : {
|
|
684
|
+
width: n,
|
|
685
|
+
height: s
|
|
686
|
+
};
|
|
687
|
+
}, he = (e, t, r) => {
|
|
688
|
+
if (typeof e == "number") return Number.isFinite(e) ? Math.abs(e) * r : null;
|
|
689
|
+
if (t === void 0) return null;
|
|
690
|
+
const n = $(e, t);
|
|
691
|
+
return n === null ? null : Math.abs(n);
|
|
692
|
+
}, ge = (e, t) => t.x <= 0 || t.y <= 0 ? {
|
|
693
|
+
rx: 0,
|
|
694
|
+
ry: 0
|
|
695
|
+
} : {
|
|
684
696
|
rx: e / t.x,
|
|
685
697
|
ry: e / t.y
|
|
686
|
-
}
|
|
698
|
+
}, un = ({ children: e, ...t }) => {
|
|
687
699
|
const r = fe();
|
|
688
700
|
return /* @__PURE__ */ c("svg", {
|
|
689
701
|
viewBox: "0 0 1 1",
|
|
@@ -692,68 +704,68 @@ var U = (e, t) => {
|
|
|
692
704
|
height: "100%",
|
|
693
705
|
pointerEvents: "none",
|
|
694
706
|
...t,
|
|
695
|
-
children: /* @__PURE__ */ c(
|
|
707
|
+
children: /* @__PURE__ */ c(ye, {
|
|
696
708
|
size: r,
|
|
697
709
|
space: "unit",
|
|
698
710
|
children: e
|
|
699
711
|
})
|
|
700
712
|
});
|
|
701
|
-
},
|
|
702
|
-
const r =
|
|
713
|
+
}, mn = ({ box: e, children: t }) => {
|
|
714
|
+
const r = Ce(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), i = _(() => n === null || s === null ? null : {
|
|
703
715
|
width: n,
|
|
704
716
|
height: s
|
|
705
717
|
}, [n, s]);
|
|
706
718
|
return /* @__PURE__ */ c("svg", {
|
|
707
|
-
x:
|
|
708
|
-
y:
|
|
709
|
-
width:
|
|
710
|
-
height:
|
|
719
|
+
x: j(e.x0),
|
|
720
|
+
y: j(e.y0),
|
|
721
|
+
width: j(e.x1 - e.x0),
|
|
722
|
+
height: j(e.y1 - e.y0),
|
|
711
723
|
overflow: "hidden",
|
|
712
724
|
pointerEvents: "none",
|
|
713
|
-
children: /* @__PURE__ */ c(
|
|
725
|
+
children: /* @__PURE__ */ c(ye, {
|
|
714
726
|
size: i,
|
|
715
727
|
children: t
|
|
716
728
|
})
|
|
717
729
|
});
|
|
718
|
-
},
|
|
719
|
-
var
|
|
720
|
-
var
|
|
730
|
+
}, Mt = "drqe3u0", xt = "drqe3u1", $t = "drqe3u2", Ht = "drqe3u3", x = "drqe3u4", At = "drqe3u5", Bt = "drqe3u6", Ot = "drqe3u7", U = "drqe3u8", Kt = "drqe3u9", Ft = "drqe3ua";
|
|
731
|
+
var jt = "drqe3uc", Ut = "drqe3ud", Yt = "drqe3ue", zt = "drqe3uf";
|
|
732
|
+
var Wt = "drqe3uh", Vt = "drqe3ui", pe = {
|
|
721
733
|
enabled: "drqe3uk drqe3uj",
|
|
722
734
|
disabled: "drqe3ul drqe3uj"
|
|
723
|
-
},
|
|
735
|
+
}, ve = {
|
|
724
736
|
ran: "drqe3un drqe3um",
|
|
725
737
|
dim: "drqe3uo drqe3um"
|
|
726
|
-
},
|
|
738
|
+
}, Te = {
|
|
727
739
|
ran: "drqe3uq drqe3up",
|
|
728
740
|
cached: "drqe3ur drqe3up",
|
|
729
741
|
untouched: "drqe3us drqe3up"
|
|
730
742
|
}, hn = ({ width: e = 440, style: t, className: r } = {}) => {
|
|
731
|
-
const { compileBus: n } = te(), [s] = b(() =>
|
|
732
|
-
|
|
743
|
+
const { compileBus: n } = te(), [s] = b(() => ut()), [i, a] = b(!1), [l, d] = b(Ke);
|
|
744
|
+
H(() => {
|
|
733
745
|
const { recordCompile: u } = s.getState(), p = n.getLastTrigger(), R = n.getLastCompile();
|
|
734
746
|
return p && R && u(p, R), n.subscribe(u);
|
|
735
747
|
}, [s, n]);
|
|
736
|
-
const
|
|
748
|
+
const m = ee(s, (u) => u.lastCompile), G = ee(s, (u) => u.history), C = n.getCacheStats(), T = m === null && G.length === 0, g = () => {
|
|
737
749
|
d((u) => {
|
|
738
750
|
const p = !u;
|
|
739
|
-
return
|
|
751
|
+
return je(p), p;
|
|
740
752
|
});
|
|
741
753
|
};
|
|
742
754
|
return /* @__PURE__ */ f("div", {
|
|
743
|
-
className:
|
|
755
|
+
className: Xe(Ft, r),
|
|
744
756
|
style: {
|
|
745
757
|
width: e,
|
|
746
758
|
...t
|
|
747
759
|
},
|
|
748
760
|
children: [
|
|
749
761
|
/* @__PURE__ */ f("div", {
|
|
750
|
-
className:
|
|
762
|
+
className: Mt,
|
|
751
763
|
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ c("div", {
|
|
752
|
-
className:
|
|
764
|
+
className: xt,
|
|
753
765
|
children: "compile cache"
|
|
754
766
|
}), /* @__PURE__ */ c("div", {
|
|
755
|
-
className:
|
|
756
|
-
children: T ? "production: stats disabled" :
|
|
767
|
+
className: Yt,
|
|
768
|
+
children: T ? "production: stats disabled" : m ? `last: ${m.label} · ${se(m.durationMs)}` : "awaiting first compile…"
|
|
757
769
|
})] }), /* @__PURE__ */ c("button", {
|
|
758
770
|
type: "button",
|
|
759
771
|
onClick: () => a((u) => !u),
|
|
@@ -766,7 +778,7 @@ var Yt = "drqe3uh", Vt = "drqe3ui", ge = {
|
|
|
766
778
|
children: [/* @__PURE__ */ f("button", {
|
|
767
779
|
type: "button",
|
|
768
780
|
onClick: g,
|
|
769
|
-
className: l ?
|
|
781
|
+
className: l ? pe.enabled : pe.disabled,
|
|
770
782
|
"aria-pressed": l,
|
|
771
783
|
children: ["cache ", l ? "enabled" : "disabled"]
|
|
772
784
|
}), /* @__PURE__ */ c("span", {
|
|
@@ -774,53 +786,53 @@ var Yt = "drqe3uh", Vt = "drqe3ui", ge = {
|
|
|
774
786
|
children: "next compile reflects this toggle"
|
|
775
787
|
})]
|
|
776
788
|
}),
|
|
777
|
-
!i && !T && /* @__PURE__ */ f(
|
|
778
|
-
delta:
|
|
779
|
-
durations:
|
|
789
|
+
!i && !T && /* @__PURE__ */ f(Ve, { children: [/* @__PURE__ */ c(Xt, {
|
|
790
|
+
delta: m?.stages,
|
|
791
|
+
durations: m?.stageDurationsMs,
|
|
780
792
|
cumulative: C
|
|
781
793
|
}), /* @__PURE__ */ c(Qt, { entries: G })] })
|
|
782
794
|
]
|
|
783
795
|
});
|
|
784
796
|
}, Xt = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ f("table", {
|
|
785
|
-
className:
|
|
797
|
+
className: $t,
|
|
786
798
|
children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ f("tr", {
|
|
787
|
-
className:
|
|
799
|
+
className: Wt,
|
|
788
800
|
children: [
|
|
789
801
|
/* @__PURE__ */ c("th", {
|
|
790
802
|
className: Ht,
|
|
791
803
|
children: "stage"
|
|
792
804
|
}),
|
|
793
805
|
/* @__PURE__ */ c("th", {
|
|
794
|
-
className:
|
|
806
|
+
className: x,
|
|
795
807
|
children: "time"
|
|
796
808
|
}),
|
|
797
809
|
/* @__PURE__ */ c("th", {
|
|
798
|
-
className:
|
|
810
|
+
className: x,
|
|
799
811
|
children: "Δ miss"
|
|
800
812
|
}),
|
|
801
813
|
/* @__PURE__ */ c("th", {
|
|
802
|
-
className:
|
|
814
|
+
className: x,
|
|
803
815
|
children: "Δ hit"
|
|
804
816
|
}),
|
|
805
817
|
/* @__PURE__ */ c("th", {
|
|
806
|
-
className:
|
|
818
|
+
className: x,
|
|
807
819
|
children: "total miss"
|
|
808
820
|
}),
|
|
809
821
|
/* @__PURE__ */ c("th", {
|
|
810
|
-
className:
|
|
822
|
+
className: x,
|
|
811
823
|
children: "total hit"
|
|
812
824
|
})
|
|
813
825
|
]
|
|
814
826
|
}) }), /* @__PURE__ */ c("tbody", { children: re.map((n) => {
|
|
815
827
|
const s = e?.[n], i = Zt(s);
|
|
816
828
|
return /* @__PURE__ */ f("tr", {
|
|
817
|
-
className:
|
|
829
|
+
className: jt,
|
|
818
830
|
children: [
|
|
819
831
|
/* @__PURE__ */ f("td", {
|
|
820
832
|
className: At,
|
|
821
833
|
children: [
|
|
822
834
|
/* @__PURE__ */ c("span", {
|
|
823
|
-
className:
|
|
835
|
+
className: Te[i],
|
|
824
836
|
"aria-hidden": !0
|
|
825
837
|
}),
|
|
826
838
|
" ",
|
|
@@ -828,30 +840,30 @@ var Yt = "drqe3uh", Vt = "drqe3ui", ge = {
|
|
|
828
840
|
]
|
|
829
841
|
}),
|
|
830
842
|
/* @__PURE__ */ c("td", {
|
|
831
|
-
className:
|
|
843
|
+
className: U,
|
|
832
844
|
children: t === void 0 || i === "untouched" ? "—" : se(t[n])
|
|
833
845
|
}),
|
|
834
846
|
/* @__PURE__ */ c("td", {
|
|
835
|
-
className: i === "ran" ?
|
|
847
|
+
className: i === "ran" ? ve.ran : ve.dim,
|
|
836
848
|
children: s?.misses ?? 0
|
|
837
849
|
}),
|
|
838
850
|
/* @__PURE__ */ c("td", {
|
|
839
|
-
className:
|
|
851
|
+
className: U,
|
|
840
852
|
children: s?.hits ?? 0
|
|
841
853
|
}),
|
|
842
854
|
/* @__PURE__ */ c("td", {
|
|
843
|
-
className:
|
|
855
|
+
className: U,
|
|
844
856
|
children: r[n].misses
|
|
845
857
|
}),
|
|
846
858
|
/* @__PURE__ */ c("td", {
|
|
847
|
-
className:
|
|
859
|
+
className: U,
|
|
848
860
|
children: r[n].hits
|
|
849
861
|
})
|
|
850
862
|
]
|
|
851
863
|
}, n);
|
|
852
864
|
}) })]
|
|
853
865
|
}), Qt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ f("div", {
|
|
854
|
-
className:
|
|
866
|
+
className: Ut,
|
|
855
867
|
children: [/* @__PURE__ */ c("div", {
|
|
856
868
|
className: Vt,
|
|
857
869
|
children: "recent compiles"
|
|
@@ -861,7 +873,7 @@ var Yt = "drqe3uh", Vt = "drqe3ui", ge = {
|
|
|
861
873
|
className: Bt,
|
|
862
874
|
children: [
|
|
863
875
|
/* @__PURE__ */ c("span", {
|
|
864
|
-
className:
|
|
876
|
+
className: Te[r === 0 ? "cached" : "ran"],
|
|
865
877
|
"aria-hidden": !0
|
|
866
878
|
}),
|
|
867
879
|
/* @__PURE__ */ c("span", {
|
|
@@ -886,8 +898,8 @@ var Yt = "drqe3uh", Vt = "drqe3ui", ge = {
|
|
|
886
898
|
let r = 0;
|
|
887
899
|
for (const n of re) t(e[n]) && (r += 1);
|
|
888
900
|
return r;
|
|
889
|
-
}, se = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`,
|
|
890
|
-
const { history: e } = te(), { stack: t, undo: r, redo: n } = e, s = v((l) => t.subscribe(l), [t]), i = v(() => t.getSnapshot(), [t]), a =
|
|
901
|
+
}, se = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, gn = () => {
|
|
902
|
+
const { history: e } = te(), { stack: t, undo: r, redo: n } = e, s = v((l) => t.subscribe(l), [t]), i = v(() => t.getSnapshot(), [t]), a = We(s, i, i);
|
|
891
903
|
return _(() => ({
|
|
892
904
|
...a,
|
|
893
905
|
undo: r,
|
|
@@ -908,9 +920,9 @@ var Yt = "drqe3uh", Vt = "drqe3ui", ge = {
|
|
|
908
920
|
"range",
|
|
909
921
|
"reset",
|
|
910
922
|
"submit"
|
|
911
|
-
]),
|
|
923
|
+
]), pn = (e, t = {}) => {
|
|
912
924
|
const { target: r, enabled: n = !0 } = t;
|
|
913
|
-
|
|
925
|
+
H(() => {
|
|
914
926
|
const s = tr(r);
|
|
915
927
|
if (!n || !s) return;
|
|
916
928
|
const i = (a) => {
|
|
@@ -926,77 +938,77 @@ var Yt = "drqe3uh", Vt = "drqe3ui", ge = {
|
|
|
926
938
|
r,
|
|
927
939
|
n
|
|
928
940
|
]);
|
|
929
|
-
}, tr = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, rr = (e) => "key" in e, nr = (e) => e instanceof HTMLInputElement ? !er.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1,
|
|
941
|
+
}, tr = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, rr = (e) => "key" in e, nr = (e) => e instanceof HTMLInputElement ? !er.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, vn = () => {
|
|
930
942
|
const { targetBoundaryStore: e } = te();
|
|
931
943
|
return ee(e, (t) => t.boundary);
|
|
932
944
|
};
|
|
933
945
|
export {
|
|
934
|
-
|
|
935
|
-
|
|
946
|
+
Nr as BrandMark,
|
|
947
|
+
Dr as CanvasTextMeasurer,
|
|
936
948
|
Xr as DefaultFooter,
|
|
937
|
-
|
|
949
|
+
wt as DefaultGeomCircle,
|
|
938
950
|
Pt as DefaultGeomLine,
|
|
939
951
|
It as DefaultGeomPath,
|
|
940
952
|
qt as DefaultGeomRect,
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
953
|
+
jr as DefaultGrid,
|
|
954
|
+
Sr as DefaultHeader,
|
|
955
|
+
mr as DefaultSwatch,
|
|
956
|
+
Kr as DefaultTooltip,
|
|
945
957
|
hn as DevToolsPanel,
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
958
|
+
Tr as GRAPH_MODES,
|
|
959
|
+
an as GeomCircle,
|
|
960
|
+
cn as GeomLine,
|
|
961
|
+
Hr as GeomOverpaint,
|
|
962
|
+
dn as GeomPath,
|
|
963
|
+
ln as GeomRect,
|
|
964
|
+
nt as GraphErrorBoundary,
|
|
953
965
|
le as GraphErrorPanel,
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
966
|
+
Dt as GraphProvider,
|
|
967
|
+
Pr as GraphRenderer,
|
|
968
|
+
vr as HoverProvider,
|
|
969
|
+
Rr as IntroFade,
|
|
970
|
+
Mr as IntroWipeClip,
|
|
971
|
+
Cr as TextMeasurerProvider,
|
|
972
|
+
Ar as ThemeProvider,
|
|
973
|
+
mn as UnitBoxSvg,
|
|
974
|
+
un as UnitSpaceSvg,
|
|
975
|
+
Wr as buildDotsEditOutlineShapes,
|
|
964
976
|
sn as createGraphyKit,
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
977
|
+
wr as darkTheme,
|
|
978
|
+
ar as defineGeomRenderer,
|
|
979
|
+
Ur as lightTheme,
|
|
980
|
+
Or as lightenCss,
|
|
981
|
+
ir as projectPointCartesian,
|
|
982
|
+
st as pruneSelection,
|
|
983
|
+
$ as readPositionPixels,
|
|
984
|
+
on as readRectPixels,
|
|
985
|
+
ur as resolveBrandMarkVisual,
|
|
986
|
+
Vr as resolvePathStroke,
|
|
987
|
+
br as scalePointToPanel,
|
|
988
|
+
$r as stampAxisEditTarget,
|
|
989
|
+
hr as stampGridEditTarget,
|
|
990
|
+
pr as stampLegendEditTarget,
|
|
991
|
+
lr as useElementScreenRect,
|
|
992
|
+
gr as useGeomHitTest,
|
|
993
|
+
or as useGeomHover,
|
|
994
|
+
Ce as useGeomPanelSize,
|
|
995
|
+
zr as useGeomReaderTree,
|
|
996
|
+
Er as useGeomStyleReader,
|
|
997
|
+
Br as useGraphCommands,
|
|
998
|
+
xr as useGraphHandle,
|
|
999
|
+
gn as useGraphHistory,
|
|
1000
|
+
pn as useGraphHistoryShortcuts,
|
|
1001
|
+
Ir as useGraphLocale,
|
|
1002
|
+
Lr as useGraphSelection,
|
|
1003
|
+
Yr as useGuidesTakePress,
|
|
992
1004
|
Fr as useHandleScene,
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1005
|
+
kr as useHoverState,
|
|
1006
|
+
_r as usePaintDefs,
|
|
1007
|
+
yr as useResolvedStyle,
|
|
1008
|
+
fr as useSceneSelector,
|
|
1009
|
+
dr as useStyleReaderTree,
|
|
1010
|
+
cr as useStyleResolver,
|
|
1011
|
+
vn as useTargetBoundary,
|
|
1012
|
+
Gr as useTextMeasurer,
|
|
1013
|
+
qr as vars
|
|
1002
1014
|
};
|