@graphysdk/react-renderer 1.9.0-beta.1793788324987 → 1.9.0-beta.1793799752548
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.mjs +21 -21
- package/dist/{history-chords-CSUG-Nyi.js → history-chords-DC1G9pA2.js} +2218 -2204
- package/dist/history-chords-DDANG01l.cjs +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +57 -21
- package/dist/index.mjs +258 -256
- package/package.json +3 -3
- package/dist/history-chords-QMnUaJIS.cjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { $t as fr, A as pr,
|
|
2
|
-
import { COMPILER_STAGE_KEYS as se, DEFAULT_LOCALE as Be, Geom as Oe, GraphCompilationSession as Fe, areEditTargetsEqual as Ke, buildDiagnostic as
|
|
1
|
+
import { $t as fr, A as pr, An as vr, B as yr, Bn as Ie, Bt as Ce, Cn as F, Dn as Sr, En as br, Et as Er, Fn as Tr, Ft as Rr, Gt as we, Hn as Pe, Ht as Gr, In as Nr, Kt as Ir, L as Cr, Ln as wr, Lt as Y, M as Pr, Nn as Le, Nt as Lr, On as De, Pn as Dr, Pt as qr, Qt as kr, R as _r, Rn as Hr, Sn as K, Ut as $r, Vn as ne, Vt as qe, Wn as X, Wt as Q, Xt as ke, Yt as xr, _n as J, _t as Mr, a as Ar, an as Br, at as Or, bn as Fr, bt as Kr, cn as zr, ct as Wr, dn as jr, en as Ur, fn as Vr, gn as _e, h as Yr, hn as Xr, i as Qr, it as Jr, j as Zr, jn as He, jt as en, kn as $e, kt as tn, mn as be, mt as rn, n as nn, ot as sn, pn as z, r as on, s as an, t as xe, tn as cn, vn as Ee, vt as ln, w as dn, wn as un, xn as Me, yn as Ae, z as mn, zn as hn } from "./history-chords-DC1G9pA2.js";
|
|
2
|
+
import { COMPILER_STAGE_KEYS as se, DEFAULT_LOCALE as Be, Geom as Oe, GraphCompilationSession as Fe, areEditTargetsEqual as Ke, buildDiagnostic as ae, canonicalizeLocale as ze, createAnchorResolver as We, createCompiler as je, createDataLabelPlacementResolver as Ue, createSpecBuilder as Ve, createStyleResolver as Te, findAnnotation as Ye, findIntlLocale as Xe, findLayerById as ce, foldGeomCornerRadii as Qe, isCompilerCachingEnabled as Je, resolveDefinition as Ze, resolveGeomCornerRadiusPx as le, setCompilerCachingEnabled as et, toPercent as U } from "@graphysdk/viz-engine";
|
|
3
3
|
import { Component as tt, useCallback as f, useEffect as H, useId as rt, useImperativeHandle as nt, useMemo as _, useRef as de, useState as y, useSyncExternalStore as st } from "react";
|
|
4
4
|
import { Fragment as ot, jsx as c, jsxs as p } from "react/jsx-runtime";
|
|
5
5
|
import { useStore as re } from "zustand";
|
|
6
6
|
import { motion as Z } from "motion/react";
|
|
7
7
|
import { createStore as oe } from "zustand/vanilla";
|
|
8
|
-
import
|
|
9
|
-
import './index.css';var
|
|
8
|
+
import it from "clsx";
|
|
9
|
+
import './index.css';var at = "_1a5iqpb0", ct = "_1a5iqpb1";
|
|
10
10
|
var lt = "_1a5iqpb3", dt = "_1a5iqpb4", ut = "_1a5iqpb5";
|
|
11
11
|
var ue = ({ errors: e }) => {
|
|
12
12
|
const [t, ...r] = e;
|
|
13
13
|
return /* @__PURE__ */ p("div", {
|
|
14
14
|
role: "alert",
|
|
15
|
-
className:
|
|
15
|
+
className: at,
|
|
16
16
|
children: [
|
|
17
17
|
/* @__PURE__ */ c("strong", {
|
|
18
18
|
className: ct,
|
|
@@ -50,10 +50,10 @@ var ht = class extends tt {
|
|
|
50
50
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
51
51
|
}
|
|
52
52
|
static getDerivedStateFromError(e) {
|
|
53
|
-
return { caughtDiagnostic:
|
|
53
|
+
return { caughtDiagnostic: ae(e) };
|
|
54
54
|
}
|
|
55
55
|
componentDidCatch(e, t) {
|
|
56
|
-
const r =
|
|
56
|
+
const r = ae(e);
|
|
57
57
|
X([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
|
|
58
58
|
}
|
|
59
59
|
componentDidUpdate(e) {
|
|
@@ -71,7 +71,7 @@ var ht = class extends tt {
|
|
|
71
71
|
}, gt = (e, t) => {
|
|
72
72
|
const r = e.filter((n) => ft(n, t));
|
|
73
73
|
return r.length === e.length ? e : r;
|
|
74
|
-
}, ft = (e, t) => e.kind === "annotation" ?
|
|
74
|
+
}, ft = (e, t) => e.kind === "annotation" ? Ye(t.annotations, e.id) !== null : e.kind === "observations" ? ce(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? ce(t.layers, e.layerId) !== void 0 : !0, he = [], pt = () => oe((e) => ({
|
|
75
75
|
selection: he,
|
|
76
76
|
setSelection: (t) => e((r) => vt(r.selection, t) ? r : { selection: t }),
|
|
77
77
|
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: he })
|
|
@@ -79,7 +79,7 @@ var ht = class extends tt {
|
|
|
79
79
|
const s = t[n];
|
|
80
80
|
return s !== void 0 && Ke(r, s);
|
|
81
81
|
}), yt = 5, St = (e) => {
|
|
82
|
-
if (
|
|
82
|
+
if (!Le) return {
|
|
83
83
|
emit: () => {
|
|
84
84
|
},
|
|
85
85
|
subscribe: () => Et,
|
|
@@ -94,7 +94,7 @@ var ht = class extends tt {
|
|
|
94
94
|
const s = e.getLastCompile();
|
|
95
95
|
if (s) {
|
|
96
96
|
r = n;
|
|
97
|
-
for (const
|
|
97
|
+
for (const i of t) i(n, s);
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
subscribe: (n) => (t.add(n), () => {
|
|
@@ -157,19 +157,19 @@ function ge(e) {
|
|
|
157
157
|
suggestion: `Add a render half for it: \`defineGeomRenderer(${d.type}Geom, { coord, render })\`, then include it in \`plugins\`.`
|
|
158
158
|
}));
|
|
159
159
|
}
|
|
160
|
-
const
|
|
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}`, h =
|
|
164
|
-
h ? h.count += 1 :
|
|
163
|
+
const d = `${l.geom}|${l.coord}`, h = i.get(d);
|
|
164
|
+
h ? h.count += 1 : i.set(d, {
|
|
165
165
|
geom: l.geom,
|
|
166
166
|
coord: l.coord,
|
|
167
167
|
count: 1
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
const
|
|
171
|
-
for (const { geom: l, coord: d, count: h } of
|
|
172
|
-
h < 2 ||
|
|
170
|
+
const a = [];
|
|
171
|
+
for (const { geom: l, coord: d, count: h } of i.values())
|
|
172
|
+
h < 2 || a.push({
|
|
173
173
|
kind: "userInput",
|
|
174
174
|
severity: "warning",
|
|
175
175
|
code: "DUPLICATE_REGISTERED_TYPE",
|
|
@@ -180,45 +180,45 @@ function ge(e) {
|
|
|
180
180
|
},
|
|
181
181
|
suggestion: `Keep a single render-only override for ('${l}', '${d}').`
|
|
182
182
|
});
|
|
183
|
-
return
|
|
183
|
+
return a.push(...qt(e)), {
|
|
184
184
|
errors: n,
|
|
185
|
-
warnings:
|
|
185
|
+
warnings: a
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
function Gt(e, t) {
|
|
189
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
190
|
-
for (const
|
|
191
|
-
t(
|
|
189
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
|
|
190
|
+
for (const a of n)
|
|
191
|
+
t(a.geom, r.type) !== null || s.has(a.geom) || (s.add(a.geom), i.push({
|
|
192
192
|
kind: "userInput",
|
|
193
193
|
severity: "warning",
|
|
194
194
|
code: "MISSING_GEOM_RENDERER",
|
|
195
|
-
message: `No renderer for geom '${
|
|
195
|
+
message: `No renderer for geom '${a.geom}' under ${r.type} coords; the layer is not painted.`,
|
|
196
196
|
context: {
|
|
197
|
-
requested:
|
|
197
|
+
requested: a.geom,
|
|
198
198
|
kind: "geom-renderer"
|
|
199
199
|
},
|
|
200
|
-
suggestion: `Register a renderer for ('${
|
|
200
|
+
suggestion: `Register a renderer for ('${a.geom}', '${r.type}') via \`defineGeomRenderer\`.`
|
|
201
201
|
}));
|
|
202
|
-
return
|
|
202
|
+
return i;
|
|
203
203
|
}
|
|
204
204
|
function Nt(e, t) {
|
|
205
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
206
|
-
for (const
|
|
207
|
-
if (
|
|
208
|
-
const l = t(
|
|
209
|
-
l === null || l.hitTest || Q(l) || (s.add(
|
|
205
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
|
|
206
|
+
for (const a of n) {
|
|
207
|
+
if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
|
|
208
|
+
const l = t(a.geom, r.type);
|
|
209
|
+
l === null || l.hitTest || Q(l) || (s.add(a.geom), i.push({
|
|
210
210
|
kind: "userInput",
|
|
211
211
|
severity: "warning",
|
|
212
212
|
code: "MISSING_RENDER_HIT_TEST",
|
|
213
|
-
message: `Geom '${
|
|
213
|
+
message: `Geom '${a.geom}' declares spatialKind 'renderHitTest' but its renderer provides no hit-test; the layer has no hover.`,
|
|
214
214
|
context: {
|
|
215
|
-
requested:
|
|
215
|
+
requested: a.geom,
|
|
216
216
|
kind: "geom-renderer"
|
|
217
217
|
},
|
|
218
|
-
suggestion: `Add a \`hitTest\` factory (precomputed geometry) or a live render (\`{ fn, options: { live: true } }\`, live simulation) to the renderer for ('${
|
|
218
|
+
suggestion: `Add a \`hitTest\` factory (precomputed geometry) or a live render (\`{ fn, options: { live: true } }\`, live simulation) to the renderer for ('${a.geom}', '${r.type}').`
|
|
219
219
|
}));
|
|
220
220
|
}
|
|
221
|
-
return
|
|
221
|
+
return i;
|
|
222
222
|
}
|
|
223
223
|
function It(e) {
|
|
224
224
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
@@ -239,25 +239,25 @@ function It(e) {
|
|
|
239
239
|
return r;
|
|
240
240
|
}
|
|
241
241
|
function Ct(e, t) {
|
|
242
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
243
|
-
for (const
|
|
244
|
-
if (
|
|
245
|
-
const l = t(
|
|
246
|
-
l === null || !l.hitTest || !Q(l) || (s.add(
|
|
242
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
|
|
243
|
+
for (const a of n) {
|
|
244
|
+
if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
|
|
245
|
+
const l = t(a.geom, r.type);
|
|
246
|
+
l === null || !l.hitTest || !Q(l) || (s.add(a.geom), i.push({
|
|
247
247
|
kind: "userInput",
|
|
248
248
|
severity: "warning",
|
|
249
249
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
250
|
-
message: `Geom '${
|
|
250
|
+
message: `Geom '${a.geom}' declares both a \`hitTest\` factory and a live render; these are alternatives, so only the live render is used.`,
|
|
251
251
|
context: {
|
|
252
|
-
requested:
|
|
252
|
+
requested: a.geom,
|
|
253
253
|
kind: "geom-renderer"
|
|
254
254
|
},
|
|
255
255
|
suggestion: "Keep one: a `hitTest` factory for precomputed geometry, OR a live render (`{ fn, options: { live: true } }`) for a live simulation."
|
|
256
256
|
}));
|
|
257
257
|
}
|
|
258
|
-
return
|
|
258
|
+
return i;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function wt(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 !== "renderHitTest" || r.has(s.geom) || t.hasCapability(s.geom) || (r.add(s.geom), n.push({
|
|
@@ -273,26 +273,26 @@ function Pt(e, t) {
|
|
|
273
273
|
})));
|
|
274
274
|
return n;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
278
|
-
for (const
|
|
279
|
-
if (
|
|
280
|
-
const l = t(
|
|
281
|
-
l === null || !Q(l) || (s.add(
|
|
276
|
+
function Pt(e, t) {
|
|
277
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
|
|
278
|
+
for (const a of n) {
|
|
279
|
+
if (a.interactive === !1 || a.spatialKind === "renderHitTest" || s.has(a.geom)) continue;
|
|
280
|
+
const l = t(a.geom, r.type);
|
|
281
|
+
l === null || !Q(l) || (s.add(a.geom), i.push({
|
|
282
282
|
kind: "userInput",
|
|
283
283
|
severity: "warning",
|
|
284
284
|
code: "LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",
|
|
285
|
-
message: `Geom '${
|
|
285
|
+
message: `Geom '${a.geom}' declares a live render but its layer's spatialKind is '${a.spatialKind}', not 'renderHitTest'; its push-path hover resolves to nothing.`,
|
|
286
286
|
context: {
|
|
287
|
-
requested:
|
|
287
|
+
requested: a.geom,
|
|
288
288
|
kind: "geom-renderer"
|
|
289
289
|
},
|
|
290
290
|
suggestion: "Have the geom's manifest yield spatialKind 'renderHitTest' so the scene layer carries the `byKey` index the live render's `pushHover` resolves against."
|
|
291
291
|
}));
|
|
292
292
|
}
|
|
293
|
-
return
|
|
293
|
+
return i;
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Lt(e, t) {
|
|
296
296
|
let r;
|
|
297
297
|
return e.layers.flatMap((n, s) => Q(t(n.geom, e.coordSystem.type)) ? Dt(n) ? (r ??= Te().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
|
|
298
298
|
kind: "userInput",
|
|
@@ -329,9 +329,9 @@ function qt(e) {
|
|
|
329
329
|
var kt = (e) => oe((t) => ({
|
|
330
330
|
scene: e,
|
|
331
331
|
setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
|
|
332
|
-
})), _t = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer:
|
|
333
|
-
const N =
|
|
334
|
-
const o =
|
|
332
|
+
})), _t = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: i, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: h }) => {
|
|
333
|
+
const N = Y(l), D = Y(d), G = Y(h), [{ session: g, compileBus: m, findGeom: S }] = y(() => {
|
|
334
|
+
const o = je({
|
|
335
335
|
plugins: n,
|
|
336
336
|
theme: s
|
|
337
337
|
});
|
|
@@ -346,15 +346,15 @@ var kt = (e) => oe((t) => ({
|
|
|
346
346
|
errors: [...u.errors, ...o.errors],
|
|
347
347
|
warnings: [...u.warnings, ...o.warnings]
|
|
348
348
|
};
|
|
349
|
-
}), $ = de(null), [
|
|
349
|
+
}), $ = de(null), [P] = y(Ht), T = de(null), v = f((o) => b.errors.length === 0 ? o : [...b.errors, ...o ?? []], [b]), q = f((o) => {
|
|
350
350
|
if (!o.ok) return o.errors;
|
|
351
351
|
if (T.current) T.current.getState().setScene(o.scene);
|
|
352
352
|
else {
|
|
353
353
|
const u = kt(o.scene);
|
|
354
|
-
u.subscribe(
|
|
354
|
+
u.subscribe(P.notify), T.current = u, P.notify();
|
|
355
355
|
}
|
|
356
356
|
return null;
|
|
357
|
-
}, [
|
|
357
|
+
}, [P]), [W, I] = y(() => {
|
|
358
358
|
const o = g.compile({
|
|
359
359
|
spec: e,
|
|
360
360
|
data: t,
|
|
@@ -363,24 +363,24 @@ var kt = (e) => oe((t) => ({
|
|
|
363
363
|
return $.current = o, v(q(o));
|
|
364
364
|
}), C = f((o) => o.ok ? [
|
|
365
365
|
...o.warnings,
|
|
366
|
-
...Gt(o.scene,
|
|
367
|
-
...Nt(o.scene,
|
|
366
|
+
...Gt(o.scene, i),
|
|
367
|
+
...Nt(o.scene, i),
|
|
368
368
|
...It(o.scene),
|
|
369
|
-
...Ct(o.scene,
|
|
370
|
-
...
|
|
371
|
-
...
|
|
372
|
-
...
|
|
373
|
-
] : o.warnings, [
|
|
369
|
+
...Ct(o.scene, i),
|
|
370
|
+
...Pt(o.scene, i),
|
|
371
|
+
...Lt(o.scene, i),
|
|
372
|
+
...wt(o.scene, a)
|
|
373
|
+
] : o.warnings, [i, a]), w = f((o) => {
|
|
374
374
|
o.length !== 0 && (X(o), D.current?.(o));
|
|
375
375
|
}, [D]), E = f((o) => {
|
|
376
376
|
o.length !== 0 && (X(o), G.current?.(o));
|
|
377
377
|
}, [G]);
|
|
378
378
|
H(() => {
|
|
379
379
|
const o = $.current;
|
|
380
|
-
o && (
|
|
380
|
+
o && (w([...b.errors, ...o.ok ? [] : o.errors]), E([...b.warnings, ...C(o)]), o.ok && m.emit({ kind: "init" }));
|
|
381
381
|
}, [
|
|
382
382
|
m,
|
|
383
|
-
|
|
383
|
+
w,
|
|
384
384
|
E,
|
|
385
385
|
b,
|
|
386
386
|
C
|
|
@@ -393,7 +393,7 @@ var kt = (e) => oe((t) => ({
|
|
|
393
393
|
if (!o) return;
|
|
394
394
|
o.committedSpec && N.current?.(o.committedSpec);
|
|
395
395
|
const u = q(o.result);
|
|
396
|
-
I(v(u)), u &&
|
|
396
|
+
I(v(u)), u && w(u), E(C(o.result)), u || m.emit({ kind: o.hasSpecChange ? "spec" : "data" });
|
|
397
397
|
}, [
|
|
398
398
|
e,
|
|
399
399
|
t,
|
|
@@ -401,7 +401,7 @@ var kt = (e) => oe((t) => ({
|
|
|
401
401
|
g,
|
|
402
402
|
m,
|
|
403
403
|
q,
|
|
404
|
-
|
|
404
|
+
w,
|
|
405
405
|
E,
|
|
406
406
|
v,
|
|
407
407
|
C,
|
|
@@ -417,37 +417,37 @@ var kt = (e) => oe((t) => ({
|
|
|
417
417
|
o.scene && T.current?.getState().setScene(o.scene), o.result && x(o.result), o.command && m.emit({
|
|
418
418
|
kind: "command",
|
|
419
419
|
command: o.command
|
|
420
|
-
}), o.spec && N.current?.(o.spec), o.errors &&
|
|
420
|
+
}), o.spec && N.current?.(o.spec), o.errors && w([...o.errors]);
|
|
421
421
|
}, [
|
|
422
422
|
x,
|
|
423
423
|
m,
|
|
424
424
|
N,
|
|
425
|
-
|
|
425
|
+
w
|
|
426
426
|
]), R = f((o) => {
|
|
427
427
|
for (const u of o) M(u);
|
|
428
428
|
return o.some((u) => !!u.scene);
|
|
429
429
|
}, [M]), ee = f((o, u) => {
|
|
430
430
|
R(g.applyCommand(o, u));
|
|
431
|
-
}, [g, R]),
|
|
431
|
+
}, [g, R]), j = f(() => {
|
|
432
432
|
R(g.commit());
|
|
433
|
-
}, [g, R]),
|
|
433
|
+
}, [g, R]), L = f(() => R(g.undo()), [g, R]), A = f(() => R(g.redo()), [g, R]), k = _(() => ({
|
|
434
434
|
stack: g.history,
|
|
435
|
-
undo:
|
|
435
|
+
undo: L,
|
|
436
436
|
redo: A
|
|
437
437
|
}), [
|
|
438
438
|
g,
|
|
439
|
-
|
|
439
|
+
L,
|
|
440
440
|
A
|
|
441
441
|
]), te = f(() => T.current?.getState().scene ?? null, []);
|
|
442
442
|
return {
|
|
443
443
|
store: T.current,
|
|
444
444
|
dispatch: ee,
|
|
445
|
-
commit:
|
|
445
|
+
commit: j,
|
|
446
446
|
history: k,
|
|
447
|
-
subscribe:
|
|
447
|
+
subscribe: P.subscribe,
|
|
448
448
|
getScene: te,
|
|
449
449
|
compileBus: m,
|
|
450
|
-
compileErrors:
|
|
450
|
+
compileErrors: W,
|
|
451
451
|
findGeom: S
|
|
452
452
|
};
|
|
453
453
|
}, Ht = () => {
|
|
@@ -458,15 +458,15 @@ var kt = (e) => oe((t) => ({
|
|
|
458
458
|
}),
|
|
459
459
|
notify: () => e.forEach((t) => t())
|
|
460
460
|
};
|
|
461
|
-
}, $t = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale:
|
|
462
|
-
const G = xt(
|
|
461
|
+
}, $t = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: i, handleRef: a, onSpecChange: l, onError: d, onWarnings: h, colorScheme: N = "light", children: D }) => {
|
|
462
|
+
const G = xt(i, h), [g] = y(() => n), [m] = y(() => He(n?.glyphs, s)), S = g?.colorScheme ?? N, [b] = y(() => qe([...g?.plugins ?? [], ...r].filter(Re))), $ = rt(), [P] = y(() => We(r)), [T] = y(() => Ue(r)), [v] = y(() => pt()), [q] = y(() => Ce()), W = _(() => Te({ colorScheme: S }), [S]), { store: I, dispatch: C, commit: w, history: E, subscribe: x, getScene: M, compileBus: R, compileErrors: ee, findGeom: j } = _t({
|
|
463
463
|
spec: t,
|
|
464
464
|
data: e,
|
|
465
465
|
colorScheme: S,
|
|
466
466
|
plugins: r,
|
|
467
467
|
theme: g,
|
|
468
468
|
resolveRenderer: b,
|
|
469
|
-
anchorResolver:
|
|
469
|
+
anchorResolver: P,
|
|
470
470
|
onSpecChange: l,
|
|
471
471
|
onError: d,
|
|
472
472
|
onWarnings: h
|
|
@@ -479,12 +479,12 @@ var kt = (e) => oe((t) => ({
|
|
|
479
479
|
o.length !== 0 && u(gt(o, k.scene.spec));
|
|
480
480
|
});
|
|
481
481
|
}, [I, v]);
|
|
482
|
-
const
|
|
482
|
+
const L = _(() => ({
|
|
483
483
|
dispatch: C,
|
|
484
|
-
commit:
|
|
485
|
-
}), [C,
|
|
486
|
-
nt(
|
|
487
|
-
commands:
|
|
484
|
+
commit: w
|
|
485
|
+
}), [C, w]);
|
|
486
|
+
nt(a, () => ({
|
|
487
|
+
commands: L,
|
|
488
488
|
undo: E.undo,
|
|
489
489
|
redo: E.redo,
|
|
490
490
|
subscribe: x,
|
|
@@ -497,7 +497,7 @@ var kt = (e) => oe((t) => ({
|
|
|
497
497
|
canFormatDataLabelsAsPercentages: T.hasPercentageFormat,
|
|
498
498
|
getGlyphs: () => m
|
|
499
499
|
}), [
|
|
500
|
-
|
|
500
|
+
L,
|
|
501
501
|
E,
|
|
502
502
|
x,
|
|
503
503
|
M,
|
|
@@ -511,41 +511,41 @@ var kt = (e) => oe((t) => ({
|
|
|
511
511
|
store: I,
|
|
512
512
|
selectionStore: v,
|
|
513
513
|
targetBoundaryStore: q,
|
|
514
|
-
commands:
|
|
514
|
+
commands: L,
|
|
515
515
|
history: E,
|
|
516
516
|
formattingLocale: G,
|
|
517
517
|
compileBus: R,
|
|
518
518
|
colorScheme: S,
|
|
519
|
-
styleResolver:
|
|
520
|
-
anchorResolver:
|
|
521
|
-
findGeom:
|
|
519
|
+
styleResolver: W,
|
|
520
|
+
anchorResolver: P,
|
|
521
|
+
findGeom: j
|
|
522
522
|
} : null, [
|
|
523
523
|
$,
|
|
524
524
|
I,
|
|
525
525
|
v,
|
|
526
526
|
q,
|
|
527
|
-
|
|
527
|
+
L,
|
|
528
528
|
E,
|
|
529
529
|
G,
|
|
530
530
|
R,
|
|
531
531
|
S,
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
532
|
+
W,
|
|
533
|
+
P,
|
|
534
|
+
j
|
|
535
535
|
]);
|
|
536
536
|
return /* @__PURE__ */ c(ht, {
|
|
537
537
|
forcedErrors: ee,
|
|
538
538
|
onError: d,
|
|
539
539
|
resetKeys: [t, e],
|
|
540
|
-
children: A ? /* @__PURE__ */ c(
|
|
540
|
+
children: A ? /* @__PURE__ */ c(Ie.Provider, {
|
|
541
541
|
value: A,
|
|
542
542
|
children: /* @__PURE__ */ c(ke, {
|
|
543
543
|
value: b,
|
|
544
|
-
children: /* @__PURE__ */ c(
|
|
544
|
+
children: /* @__PURE__ */ c(Pe, {
|
|
545
545
|
value: T,
|
|
546
|
-
children: /* @__PURE__ */ c(
|
|
546
|
+
children: /* @__PURE__ */ c(z, {
|
|
547
547
|
shapes: g?.shapes,
|
|
548
|
-
children: /* @__PURE__ */ c(
|
|
548
|
+
children: /* @__PURE__ */ c($e, {
|
|
549
549
|
glyphs: m,
|
|
550
550
|
children: D
|
|
551
551
|
})
|
|
@@ -555,7 +555,7 @@ var kt = (e) => oe((t) => ({
|
|
|
555
555
|
}) : null
|
|
556
556
|
});
|
|
557
557
|
}, xt = (e, t) => {
|
|
558
|
-
const r =
|
|
558
|
+
const r = Y(t);
|
|
559
559
|
return H(() => {
|
|
560
560
|
if (e === void 0 || Xe(e) !== void 0) return;
|
|
561
561
|
const n = [{
|
|
@@ -565,14 +565,14 @@ var kt = (e) => oe((t) => ({
|
|
|
565
565
|
message: `formattingLocale '${e}' is not a tag Intl can format in, so the chart formats in ${Be}.`
|
|
566
566
|
}];
|
|
567
567
|
X(n), r.current?.(n);
|
|
568
|
-
}, [e, r]), e === void 0 ? void 0 :
|
|
568
|
+
}, [e, r]), e === void 0 ? void 0 : ze(e);
|
|
569
569
|
};
|
|
570
|
-
function
|
|
571
|
-
const n =
|
|
570
|
+
function En({ theme: e, glyphs: t, ...r } = {}) {
|
|
571
|
+
const n = Ve(r);
|
|
572
572
|
return {
|
|
573
573
|
...n,
|
|
574
|
-
GraphProvider: (
|
|
575
|
-
...
|
|
574
|
+
GraphProvider: (i) => /* @__PURE__ */ c($t, {
|
|
575
|
+
...i,
|
|
576
576
|
plugins: n.plugins,
|
|
577
577
|
theme: e,
|
|
578
578
|
glyphs: t
|
|
@@ -584,16 +584,16 @@ var O = (e, t) => {
|
|
|
584
584
|
if (!e.endsWith("%")) return null;
|
|
585
585
|
const r = Number.parseFloat(e);
|
|
586
586
|
return Number.isFinite(r) ? r / 100 * t : null;
|
|
587
|
-
},
|
|
588
|
-
const
|
|
589
|
-
return
|
|
590
|
-
x:
|
|
591
|
-
y:
|
|
587
|
+
}, Tn = ({ x: e, y: t, width: r, height: n }, s) => {
|
|
588
|
+
const i = O(e, s.width), a = O(t, s.height), l = O(r, s.width), d = O(n, s.height);
|
|
589
|
+
return i === null || a === null || l === null || d === null ? null : {
|
|
590
|
+
x: i,
|
|
591
|
+
y: a,
|
|
592
592
|
width: l,
|
|
593
593
|
height: d
|
|
594
594
|
};
|
|
595
|
-
}, Mt = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...
|
|
596
|
-
const
|
|
595
|
+
}, Mt = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...i }) => {
|
|
596
|
+
const a = F(s);
|
|
597
597
|
return e ? /* @__PURE__ */ c(Z.circle, {
|
|
598
598
|
initial: !1,
|
|
599
599
|
animate: {
|
|
@@ -601,18 +601,18 @@ var O = (e, t) => {
|
|
|
601
601
|
cy: r,
|
|
602
602
|
r: n
|
|
603
603
|
},
|
|
604
|
-
transition:
|
|
605
|
-
style:
|
|
606
|
-
...
|
|
604
|
+
transition: K,
|
|
605
|
+
style: a,
|
|
606
|
+
...i
|
|
607
607
|
}) : /* @__PURE__ */ c("circle", {
|
|
608
608
|
cx: t,
|
|
609
609
|
cy: r,
|
|
610
610
|
r: n,
|
|
611
|
-
style:
|
|
612
|
-
...
|
|
611
|
+
style: a,
|
|
612
|
+
...i
|
|
613
613
|
});
|
|
614
|
-
}, At = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects:
|
|
615
|
-
const l =
|
|
614
|
+
}, At = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: i, ...a }) => {
|
|
615
|
+
const l = F(i);
|
|
616
616
|
return e ? /* @__PURE__ */ c(Z.line, {
|
|
617
617
|
initial: !1,
|
|
618
618
|
animate: {
|
|
@@ -621,19 +621,19 @@ var O = (e, t) => {
|
|
|
621
621
|
x2: n,
|
|
622
622
|
y2: s
|
|
623
623
|
},
|
|
624
|
-
transition:
|
|
624
|
+
transition: K,
|
|
625
625
|
style: l,
|
|
626
|
-
...
|
|
626
|
+
...a
|
|
627
627
|
}) : /* @__PURE__ */ c("line", {
|
|
628
628
|
x1: t,
|
|
629
629
|
y1: r,
|
|
630
630
|
x2: n,
|
|
631
631
|
y2: s,
|
|
632
632
|
style: l,
|
|
633
|
-
...
|
|
633
|
+
...a
|
|
634
634
|
});
|
|
635
|
-
}, Bt = ({ animateTransitions: e, x: t, y: r, width: n, height: s, rx:
|
|
636
|
-
const h =
|
|
635
|
+
}, Bt = ({ animateTransitions: e, x: t, y: r, width: n, height: s, rx: i, ry: a, effects: l, ...d }) => {
|
|
636
|
+
const h = F(l);
|
|
637
637
|
return e ? /* @__PURE__ */ c(Z.rect, {
|
|
638
638
|
initial: !1,
|
|
639
639
|
animate: {
|
|
@@ -641,12 +641,12 @@ var O = (e, t) => {
|
|
|
641
641
|
attrY: r,
|
|
642
642
|
width: n,
|
|
643
643
|
height: s,
|
|
644
|
-
...
|
|
645
|
-
rx:
|
|
646
|
-
ry:
|
|
644
|
+
...i !== void 0 && a !== void 0 ? {
|
|
645
|
+
rx: i,
|
|
646
|
+
ry: a
|
|
647
647
|
} : {}
|
|
648
648
|
},
|
|
649
|
-
transition:
|
|
649
|
+
transition: K,
|
|
650
650
|
style: h,
|
|
651
651
|
...d
|
|
652
652
|
}) : /* @__PURE__ */ c("rect", {
|
|
@@ -654,29 +654,29 @@ var O = (e, t) => {
|
|
|
654
654
|
y: r,
|
|
655
655
|
width: n,
|
|
656
656
|
height: s,
|
|
657
|
-
rx:
|
|
658
|
-
ry:
|
|
657
|
+
rx: i,
|
|
658
|
+
ry: a,
|
|
659
659
|
style: h,
|
|
660
660
|
...d
|
|
661
661
|
});
|
|
662
662
|
}, Ot = ({ animateTransitions: e, d: t, source: r, effects: n, ...s }) => {
|
|
663
|
-
const
|
|
663
|
+
const i = F(n);
|
|
664
664
|
return e ? /* @__PURE__ */ c(Ft, {
|
|
665
665
|
d: t,
|
|
666
666
|
source: r,
|
|
667
|
-
style:
|
|
667
|
+
style: i,
|
|
668
668
|
...s
|
|
669
669
|
}) : /* @__PURE__ */ c("path", {
|
|
670
670
|
d: t,
|
|
671
|
-
style:
|
|
671
|
+
style: i,
|
|
672
672
|
...s
|
|
673
673
|
});
|
|
674
|
-
},
|
|
674
|
+
}, Rn = (e) => {
|
|
675
675
|
const { Circle: t } = J(), { symbol: r, ...n } = e;
|
|
676
676
|
return r !== void 0 && r !== "circle" ? /* @__PURE__ */ c("g", {
|
|
677
|
-
style:
|
|
677
|
+
style: F(e.effects),
|
|
678
678
|
"data-testid": e["data-testid"],
|
|
679
|
-
children: /* @__PURE__ */ c(
|
|
679
|
+
children: /* @__PURE__ */ c(De, {
|
|
680
680
|
symbol: r,
|
|
681
681
|
cx: fe(e.cx),
|
|
682
682
|
cy: fe(e.cy),
|
|
@@ -688,26 +688,26 @@ var O = (e, t) => {
|
|
|
688
688
|
strokeOpacity: e.strokeOpacity,
|
|
689
689
|
strokeWidth: e.strokeWidth,
|
|
690
690
|
motion: e.animateTransitions ? {
|
|
691
|
-
transition:
|
|
691
|
+
transition: K,
|
|
692
692
|
intro: !1,
|
|
693
693
|
fadesIn: !1
|
|
694
694
|
} : null
|
|
695
695
|
})
|
|
696
|
-
}) : t === void 0 ? Mt(n) : /* @__PURE__ */ c(
|
|
697
|
-
},
|
|
696
|
+
}) : t === void 0 ? Mt(n) : /* @__PURE__ */ c(z, { children: /* @__PURE__ */ c(t, { ...n }) });
|
|
697
|
+
}, Gn = (e) => {
|
|
698
698
|
const { Line: t } = J();
|
|
699
|
-
return t === void 0 ? At(e) : /* @__PURE__ */ c(
|
|
700
|
-
},
|
|
701
|
-
const { Rect: r } = J(), n = Ee(), s = _e(),
|
|
699
|
+
return t === void 0 ? At(e) : /* @__PURE__ */ c(z, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
700
|
+
}, Nn = ({ cornerRadius: e, ...t }) => {
|
|
701
|
+
const { Rect: r } = J(), n = Ee()?.size ?? null, s = _e(), i = {
|
|
702
702
|
...t,
|
|
703
703
|
...Kt(e, t, n, s)
|
|
704
704
|
};
|
|
705
|
-
return r === void 0 ? Bt(
|
|
706
|
-
},
|
|
705
|
+
return r === void 0 ? Bt(i) : /* @__PURE__ */ c(z, { children: /* @__PURE__ */ c(r, { ...i }) });
|
|
706
|
+
}, In = (e) => {
|
|
707
707
|
const { Path: t } = J();
|
|
708
|
-
return t === void 0 ? Ot(e) : /* @__PURE__ */ c(
|
|
708
|
+
return t === void 0 ? Ot(e) : /* @__PURE__ */ c(z, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
709
709
|
}, fe = (e) => typeof e == "number" ? `${e}px` : e, Ft = ({ d: e, source: t, ...r }) => {
|
|
710
|
-
const n =
|
|
710
|
+
const n = Me(e, K, t);
|
|
711
711
|
return /* @__PURE__ */ c(Z.path, {
|
|
712
712
|
d: n,
|
|
713
713
|
...r
|
|
@@ -716,15 +716,15 @@ var O = (e, t) => {
|
|
|
716
716
|
if (e === void 0) return {};
|
|
717
717
|
const s = Qe(e);
|
|
718
718
|
if (s === void 0) return {};
|
|
719
|
-
const
|
|
720
|
-
if (
|
|
719
|
+
const i = zt(t, r, n);
|
|
720
|
+
if (i === null)
|
|
721
721
|
return s === "full" ? {} : ve(le({ cornerRadius: s }), n);
|
|
722
|
-
const
|
|
722
|
+
const a = Math.min(le({
|
|
723
723
|
cornerRadius: s,
|
|
724
|
-
box:
|
|
725
|
-
}), Math.min(
|
|
726
|
-
return ve(
|
|
727
|
-
},
|
|
724
|
+
box: i
|
|
725
|
+
}), Math.min(i.width, i.height) / 2);
|
|
726
|
+
return ve(a, n);
|
|
727
|
+
}, zt = (e, t, r) => {
|
|
728
728
|
const n = pe(e.width, t?.width, r.x), s = pe(e.height, t?.height, r.y);
|
|
729
729
|
return n === null || s === null ? null : {
|
|
730
730
|
width: n,
|
|
@@ -741,8 +741,8 @@ var O = (e, t) => {
|
|
|
741
741
|
} : {
|
|
742
742
|
rx: e / t.x,
|
|
743
743
|
ry: e / t.y
|
|
744
|
-
},
|
|
745
|
-
const r = Ee();
|
|
744
|
+
}, Cn = ({ children: e, ...t }) => {
|
|
745
|
+
const r = Ee()?.size ?? null;
|
|
746
746
|
return /* @__PURE__ */ c("svg", {
|
|
747
747
|
viewBox: "0 0 1 1",
|
|
748
748
|
preserveAspectRatio: "none",
|
|
@@ -756,24 +756,24 @@ var O = (e, t) => {
|
|
|
756
756
|
children: e
|
|
757
757
|
})
|
|
758
758
|
});
|
|
759
|
-
},
|
|
760
|
-
const r =
|
|
759
|
+
}, wn = ({ box: e, children: t }) => {
|
|
760
|
+
const r = Ae(), 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 : {
|
|
761
761
|
width: n,
|
|
762
762
|
height: s
|
|
763
763
|
}, [n, s]);
|
|
764
764
|
return /* @__PURE__ */ c("svg", {
|
|
765
|
-
x:
|
|
766
|
-
y:
|
|
767
|
-
width:
|
|
768
|
-
height:
|
|
765
|
+
x: U(e.x0),
|
|
766
|
+
y: U(e.y0),
|
|
767
|
+
width: U(e.x1 - e.x0),
|
|
768
|
+
height: U(e.y1 - e.y0),
|
|
769
769
|
overflow: "hidden",
|
|
770
770
|
pointerEvents: "none",
|
|
771
771
|
children: /* @__PURE__ */ c(be, {
|
|
772
|
-
size:
|
|
772
|
+
size: i,
|
|
773
773
|
children: t
|
|
774
774
|
})
|
|
775
775
|
});
|
|
776
|
-
},
|
|
776
|
+
}, Wt = "drqe3u0", jt = "drqe3u1", Ut = "drqe3u2", Vt = "drqe3u3", B = "drqe3u4", Yt = "drqe3u5", Xt = "drqe3u6", Qt = "drqe3u7", V = "drqe3u8", Jt = "drqe3u9", Zt = "drqe3ua";
|
|
777
777
|
var er = "drqe3uc", tr = "drqe3ud", rr = "drqe3ue", nr = "drqe3uf";
|
|
778
778
|
var sr = "drqe3uh", or = "drqe3ui", ye = {
|
|
779
779
|
enabled: "drqe3uk drqe3uj",
|
|
@@ -785,8 +785,8 @@ var sr = "drqe3uh", or = "drqe3ui", ye = {
|
|
|
785
785
|
ran: "drqe3uq drqe3up",
|
|
786
786
|
cached: "drqe3ur drqe3up",
|
|
787
787
|
untouched: "drqe3us drqe3up"
|
|
788
|
-
},
|
|
789
|
-
const { compileBus: n } = ne(), [s] = y(() => bt()), [
|
|
788
|
+
}, Pn = ({ width: e = 440, style: t, className: r } = {}) => {
|
|
789
|
+
const { compileBus: n } = ne(), [s] = y(() => bt()), [i, a] = y(!1), [l, d] = y(Je);
|
|
790
790
|
H(() => {
|
|
791
791
|
const { recordCompile: m } = s.getState(), S = n.getLastTrigger(), b = n.getLastCompile();
|
|
792
792
|
return S && b && m(S, b), n.subscribe(m);
|
|
@@ -798,28 +798,28 @@ var sr = "drqe3uh", or = "drqe3ui", ye = {
|
|
|
798
798
|
});
|
|
799
799
|
};
|
|
800
800
|
return /* @__PURE__ */ p("div", {
|
|
801
|
-
className:
|
|
801
|
+
className: it(Zt, r),
|
|
802
802
|
style: {
|
|
803
803
|
width: e,
|
|
804
804
|
...t
|
|
805
805
|
},
|
|
806
806
|
children: [
|
|
807
807
|
/* @__PURE__ */ p("div", {
|
|
808
|
-
className:
|
|
808
|
+
className: Wt,
|
|
809
809
|
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ c("div", {
|
|
810
|
-
className:
|
|
810
|
+
className: jt,
|
|
811
811
|
children: "compile cache"
|
|
812
812
|
}), /* @__PURE__ */ c("div", {
|
|
813
813
|
className: rr,
|
|
814
|
-
children: G ? "production: stats disabled" : h ? `last: ${h.label} · ${
|
|
814
|
+
children: G ? "production: stats disabled" : h ? `last: ${h.label} · ${ie(h.durationMs)}` : "awaiting first compile…"
|
|
815
815
|
})] }), /* @__PURE__ */ c("button", {
|
|
816
816
|
type: "button",
|
|
817
|
-
onClick: () =>
|
|
817
|
+
onClick: () => a((m) => !m),
|
|
818
818
|
className: nr,
|
|
819
|
-
children:
|
|
819
|
+
children: i ? "▾" : "▴"
|
|
820
820
|
})]
|
|
821
821
|
}),
|
|
822
|
-
!
|
|
822
|
+
!i && /* @__PURE__ */ p("div", {
|
|
823
823
|
className: "drqe3ub",
|
|
824
824
|
children: [/* @__PURE__ */ p("button", {
|
|
825
825
|
type: "button",
|
|
@@ -832,20 +832,20 @@ var sr = "drqe3uh", or = "drqe3ui", ye = {
|
|
|
832
832
|
children: "next compile reflects this toggle"
|
|
833
833
|
})]
|
|
834
834
|
}),
|
|
835
|
-
!
|
|
835
|
+
!i && !G && /* @__PURE__ */ p(ot, { children: [/* @__PURE__ */ c(ir, {
|
|
836
836
|
delta: h?.stages,
|
|
837
837
|
durations: h?.stageDurationsMs,
|
|
838
838
|
cumulative: D
|
|
839
|
-
}), /* @__PURE__ */ c(
|
|
839
|
+
}), /* @__PURE__ */ c(ar, { entries: N })] })
|
|
840
840
|
]
|
|
841
841
|
});
|
|
842
|
-
},
|
|
843
|
-
className:
|
|
842
|
+
}, ir = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ p("table", {
|
|
843
|
+
className: Ut,
|
|
844
844
|
children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ p("tr", {
|
|
845
845
|
className: sr,
|
|
846
846
|
children: [
|
|
847
847
|
/* @__PURE__ */ c("th", {
|
|
848
|
-
className:
|
|
848
|
+
className: Vt,
|
|
849
849
|
children: "stage"
|
|
850
850
|
}),
|
|
851
851
|
/* @__PURE__ */ c("th", {
|
|
@@ -870,15 +870,15 @@ var sr = "drqe3uh", or = "drqe3ui", ye = {
|
|
|
870
870
|
})
|
|
871
871
|
]
|
|
872
872
|
}) }), /* @__PURE__ */ c("tbody", { children: se.map((n) => {
|
|
873
|
-
const s = e?.[n],
|
|
873
|
+
const s = e?.[n], i = cr(s);
|
|
874
874
|
return /* @__PURE__ */ p("tr", {
|
|
875
875
|
className: er,
|
|
876
876
|
children: [
|
|
877
877
|
/* @__PURE__ */ p("td", {
|
|
878
|
-
className:
|
|
878
|
+
className: Yt,
|
|
879
879
|
children: [
|
|
880
880
|
/* @__PURE__ */ c("span", {
|
|
881
|
-
className: Ne[
|
|
881
|
+
className: Ne[i],
|
|
882
882
|
"aria-hidden": !0
|
|
883
883
|
}),
|
|
884
884
|
" ",
|
|
@@ -886,35 +886,35 @@ var sr = "drqe3uh", or = "drqe3ui", ye = {
|
|
|
886
886
|
]
|
|
887
887
|
}),
|
|
888
888
|
/* @__PURE__ */ c("td", {
|
|
889
|
-
className:
|
|
890
|
-
children: t === void 0 ||
|
|
889
|
+
className: V,
|
|
890
|
+
children: t === void 0 || i === "untouched" ? "—" : ie(t[n])
|
|
891
891
|
}),
|
|
892
892
|
/* @__PURE__ */ c("td", {
|
|
893
|
-
className:
|
|
893
|
+
className: i === "ran" ? Se.ran : Se.dim,
|
|
894
894
|
children: s?.misses ?? 0
|
|
895
895
|
}),
|
|
896
896
|
/* @__PURE__ */ c("td", {
|
|
897
|
-
className:
|
|
897
|
+
className: V,
|
|
898
898
|
children: s?.hits ?? 0
|
|
899
899
|
}),
|
|
900
900
|
/* @__PURE__ */ c("td", {
|
|
901
|
-
className:
|
|
901
|
+
className: V,
|
|
902
902
|
children: r[n].misses
|
|
903
903
|
}),
|
|
904
904
|
/* @__PURE__ */ c("td", {
|
|
905
|
-
className:
|
|
905
|
+
className: V,
|
|
906
906
|
children: r[n].hits
|
|
907
907
|
})
|
|
908
908
|
]
|
|
909
909
|
}, n);
|
|
910
910
|
}) })]
|
|
911
|
-
}),
|
|
911
|
+
}), ar = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ p("div", {
|
|
912
912
|
className: tr,
|
|
913
913
|
children: [/* @__PURE__ */ c("div", {
|
|
914
914
|
className: or,
|
|
915
915
|
children: "recent compiles"
|
|
916
916
|
}), e.map((t) => {
|
|
917
|
-
const r = lr(t.stages, (
|
|
917
|
+
const r = lr(t.stages, (i) => i.misses > 0), n = se.length;
|
|
918
918
|
return /* @__PURE__ */ p("div", {
|
|
919
919
|
className: Xt,
|
|
920
920
|
children: [
|
|
@@ -934,7 +934,7 @@ var sr = "drqe3uh", or = "drqe3ui", ye = {
|
|
|
934
934
|
"/",
|
|
935
935
|
n,
|
|
936
936
|
" ran · ",
|
|
937
|
-
|
|
937
|
+
ie(t.durationMs)
|
|
938
938
|
]
|
|
939
939
|
})
|
|
940
940
|
]
|
|
@@ -944,14 +944,14 @@ var sr = "drqe3uh", or = "drqe3ui", ye = {
|
|
|
944
944
|
let r = 0;
|
|
945
945
|
for (const n of se) t(e[n]) && (r += 1);
|
|
946
946
|
return r;
|
|
947
|
-
},
|
|
948
|
-
const { history: e } = ne(), { stack: t, undo: r, redo: n } = e, s = f((l) => t.subscribe(l), [t]),
|
|
947
|
+
}, ie = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Ln = () => {
|
|
948
|
+
const { history: e } = ne(), { stack: t, undo: r, redo: n } = e, s = f((l) => t.subscribe(l), [t]), i = f(() => t.getSnapshot(), [t]), a = st(s, i, i);
|
|
949
949
|
return _(() => ({
|
|
950
|
-
...
|
|
950
|
+
...a,
|
|
951
951
|
undo: r,
|
|
952
952
|
redo: n
|
|
953
953
|
}), [
|
|
954
|
-
|
|
954
|
+
a,
|
|
955
955
|
r,
|
|
956
956
|
n
|
|
957
957
|
]);
|
|
@@ -966,99 +966,101 @@ var sr = "drqe3uh", or = "drqe3ui", ye = {
|
|
|
966
966
|
"range",
|
|
967
967
|
"reset",
|
|
968
968
|
"submit"
|
|
969
|
-
]),
|
|
969
|
+
]), Dn = (e, t = {}) => {
|
|
970
970
|
const { target: r, enabled: n = !0 } = t;
|
|
971
971
|
H(() => {
|
|
972
972
|
const s = ur(r);
|
|
973
973
|
if (!n || !s) return;
|
|
974
|
-
const
|
|
975
|
-
if (!mr(
|
|
976
|
-
const l =
|
|
974
|
+
const i = (a) => {
|
|
975
|
+
if (!mr(a) || a.defaultPrevented || hr(a.target)) return;
|
|
976
|
+
const l = xe(a);
|
|
977
977
|
if (!l) return;
|
|
978
978
|
const d = e.current;
|
|
979
|
-
d && (l === "undo" ? d.undo() : d.redo()) &&
|
|
979
|
+
d && (l === "undo" ? d.undo() : d.redo()) && a.preventDefault();
|
|
980
980
|
};
|
|
981
|
-
return s.addEventListener("keydown",
|
|
981
|
+
return s.addEventListener("keydown", i), () => s.removeEventListener("keydown", i);
|
|
982
982
|
}, [
|
|
983
983
|
e,
|
|
984
984
|
r,
|
|
985
985
|
n
|
|
986
986
|
]);
|
|
987
|
-
}, ur = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, mr = (e) => "key" in e, hr = (e) => e instanceof HTMLInputElement ? !dr.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1,
|
|
987
|
+
}, ur = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, mr = (e) => "key" in e, hr = (e) => e instanceof HTMLInputElement ? !dr.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, qn = () => {
|
|
988
988
|
const { targetBoundaryStore: e } = ne();
|
|
989
989
|
return re(e, (t) => t.boundary);
|
|
990
990
|
};
|
|
991
991
|
export {
|
|
992
|
-
|
|
992
|
+
Ur as CanvasTextMeasurer,
|
|
993
993
|
_r as DefaultFooter,
|
|
994
994
|
Mt as DefaultGeomCircle,
|
|
995
995
|
At as DefaultGeomLine,
|
|
996
996
|
Ot as DefaultGeomPath,
|
|
997
997
|
Bt as DefaultGeomRect,
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
998
|
+
an as DefaultGrid,
|
|
999
|
+
Cr as DefaultHeader,
|
|
1000
|
+
xr as DefaultSwatch,
|
|
1001
|
+
sn as DefaultTooltip,
|
|
1002
|
+
Pn as DevToolsPanel,
|
|
1003
|
+
en as GRAPH_MODES,
|
|
1004
|
+
Rn as GeomCircle,
|
|
1005
|
+
Gn as GeomLine,
|
|
1006
1006
|
Lr as GeomOverpaint,
|
|
1007
|
-
|
|
1008
|
-
|
|
1007
|
+
Vr as GeomPanelSizeProvider,
|
|
1008
|
+
In as GeomPath,
|
|
1009
|
+
Nn as GeomRect,
|
|
1009
1010
|
ht as GraphErrorBoundary,
|
|
1010
1011
|
ue as GraphErrorPanel,
|
|
1011
1012
|
$t as GraphProvider,
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1013
|
+
Ar as GraphRenderer,
|
|
1014
|
+
mn as GraphyBadge,
|
|
1015
|
+
Rr as HoverProvider,
|
|
1015
1016
|
Kr as IntlProvider,
|
|
1016
|
-
|
|
1017
|
-
|
|
1017
|
+
Ir as IntroFade,
|
|
1018
|
+
Fr as IntroWipeClip,
|
|
1018
1019
|
kr as TextMeasurerProvider,
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1020
|
+
rn as ThemeProvider,
|
|
1021
|
+
wn as UnitBoxSvg,
|
|
1022
|
+
Cn as UnitSpaceSvg,
|
|
1023
|
+
br as buildDotsEditOutlineShapes,
|
|
1024
|
+
En as createGraphyKit,
|
|
1025
|
+
Mr as darkTheme,
|
|
1026
|
+
Gr as defineGeomRenderer,
|
|
1027
|
+
vr as defineGlyph,
|
|
1028
|
+
$r as getBuiltInEditOutlineShapes,
|
|
1029
|
+
ln as lightTheme,
|
|
1030
|
+
Br as lightenCss,
|
|
1031
|
+
Dr as projectPointCartesian,
|
|
1031
1032
|
gt as pruneSelection,
|
|
1032
1033
|
O as readPositionPixels,
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1034
|
+
Tn as readRectPixels,
|
|
1035
|
+
yr as resolveGraphyBadgeVariant,
|
|
1036
|
+
un as resolvePathStroke,
|
|
1037
|
+
Sr as scalePointToPanel,
|
|
1037
1038
|
pr as stampAxisEditTarget,
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1039
|
+
Zr as stampGridEditTarget,
|
|
1040
|
+
Pr as stampLegendEditTarget,
|
|
1041
|
+
Er as useElementScreenRect,
|
|
1042
|
+
Jr as useFormattingLocale,
|
|
1042
1043
|
qr as useGeomHitTest,
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
Ln as
|
|
1051
|
-
|
|
1044
|
+
tn as useGeomHover,
|
|
1045
|
+
Xr as useGeomPanelSize,
|
|
1046
|
+
Tr as useGeomReaderTree,
|
|
1047
|
+
Nr as useGeomStyleReader,
|
|
1048
|
+
Ae as useGeomViewportSize,
|
|
1049
|
+
nn as useGraphCommands,
|
|
1050
|
+
Qr as useGraphHandle,
|
|
1051
|
+
Ln as useGraphHistory,
|
|
1052
|
+
Dn as useGraphHistoryShortcuts,
|
|
1053
|
+
Or as useGraphLocale,
|
|
1052
1054
|
Yr as useGraphSelection,
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1055
|
+
dn as useGuidesTakePress,
|
|
1056
|
+
on as useHandleScene,
|
|
1057
|
+
Wr as useHoverState,
|
|
1058
|
+
jr as usePaintDefs,
|
|
1059
|
+
cn as useResolvedStyle,
|
|
1060
|
+
hn as useSceneSelector,
|
|
1061
|
+
wr as useStyleReaderTree,
|
|
1062
|
+
Hr as useStyleResolver,
|
|
1063
|
+
qn as useTargetBoundary,
|
|
1062
1064
|
fr as useTextMeasurer,
|
|
1063
|
-
|
|
1065
|
+
zr as vars
|
|
1064
1066
|
};
|