@graphysdk/react-renderer 1.9.0-beta.1790606620233 → 1.9.0-beta.1790607168916
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 +1 -1
- package/dist/{history-chords-sGHetDJP.js → history-chords-Bw-7IlCd.js} +1 -1
- package/dist/{history-chords-Crrwn8Bl.cjs → history-chords-CbwQsode.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +49 -0
- package/dist/index.mjs +320 -289
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { n as
|
|
3
|
-
import { COMPILER_STAGE_KEYS as
|
|
4
|
-
import { Component as
|
|
5
|
-
import { Fragment as He, jsx as
|
|
6
|
-
import { useStore as
|
|
7
|
-
import { motion as
|
|
8
|
-
import { createStore as
|
|
9
|
-
import
|
|
10
|
-
import './index.css';var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
1
|
+
import { $t as ge, A as Bt, At as he, B as Ot, Bt as Kt, Ct as Ft, Et as U, Ht as jt, I as Ut, Jt as Yt, L as Wt, Lt as Vt, M as Xt, Mt as V, Nt as pe, Pt as Qt, Qt as zt, Rt as fe, Ut as Jt, Vt as Zt, a as er, an as tr, cn as rr, ct as nr, dn as X, dt as sr, en as K, fn as ve, gt as or, h as ar, i as ir, in as cr, j as lr, jt as dr, kt as ye, ln as ur, n as mr, nt as gr, on as hr, pn as Y, r as pr, rn as fr, rt as vr, s as yr, sn as Sr, t as Se, tn as br, un as be, ut as Er, vt as Tr, w as Rr, wt as Nr, yt as Cr, z as Gr } from "./history-chords-Bw-7IlCd.js";
|
|
2
|
+
import { n as Dr } from "./theme.contract.css-AyXDNf0F.js";
|
|
3
|
+
import { COMPILER_STAGE_KEYS as Q, Geom as Ee, GraphCompilationSession as Te, areEditTargetsEqual as Re, buildDiagnostic as ee, createAnchorResolver as Ne, createCompiler as Ce, createDataLabelPlacementResolver as Ge, createSpecBuilder as qe, createStyleResolver as De, findAnnotation as Ie, findLayerById as te, isCompilerCachingEnabled as ke, resolveDefinition as we, setCompilerCachingEnabled as _e, toPercent as B } from "@graphysdk/viz-engine";
|
|
4
|
+
import { Component as Pe, useCallback as f, useEffect as H, useId as Le, useImperativeHandle as $e, useMemo as M, useRef as re, useState as b, useSyncExternalStore as Me } from "react";
|
|
5
|
+
import { Fragment as He, jsx as i, jsxs as v } from "react/jsx-runtime";
|
|
6
|
+
import { useStore as W } from "zustand";
|
|
7
|
+
import { motion as F } from "motion/react";
|
|
8
|
+
import { createStore as z } from "zustand/vanilla";
|
|
9
|
+
import xe from "clsx";
|
|
10
|
+
import './index.css';var Ae = "_1a5iqpb0", Be = "_1a5iqpb1";
|
|
11
|
+
var Oe = "_1a5iqpb3", Ke = "_1a5iqpb4", Fe = "_1a5iqpb5";
|
|
12
|
+
var ne = ({ errors: e }) => {
|
|
13
13
|
const [t, ...n] = e;
|
|
14
14
|
return /* @__PURE__ */ v("div", {
|
|
15
15
|
role: "alert",
|
|
16
|
-
className:
|
|
16
|
+
className: Ae,
|
|
17
17
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
className:
|
|
18
|
+
/* @__PURE__ */ i("strong", {
|
|
19
|
+
className: Be,
|
|
20
20
|
children: "This chart could not be rendered."
|
|
21
21
|
}),
|
|
22
|
-
t && /* @__PURE__ */
|
|
23
|
-
n.length > 0 && /* @__PURE__ */
|
|
22
|
+
t && /* @__PURE__ */ i(se, { diagnostic: t }),
|
|
23
|
+
n.length > 0 && /* @__PURE__ */ i("ul", {
|
|
24
24
|
className: "_1a5iqpb2",
|
|
25
|
-
children: n.map((r, s) => /* @__PURE__ */
|
|
25
|
+
children: n.map((r, s) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(se, { diagnostic: r }) }, `${r.code}-${s}`))
|
|
26
26
|
})
|
|
27
27
|
]
|
|
28
28
|
});
|
|
29
|
-
},
|
|
30
|
-
className:
|
|
29
|
+
}, se = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
|
|
30
|
+
className: Oe,
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
className:
|
|
32
|
+
/* @__PURE__ */ i("span", {
|
|
33
|
+
className: Ke,
|
|
34
34
|
children: e.code
|
|
35
35
|
}),
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
className:
|
|
36
|
+
/* @__PURE__ */ i("p", {
|
|
37
|
+
className: Fe,
|
|
38
38
|
children: e.message
|
|
39
39
|
}),
|
|
40
|
-
e.suggestion && /* @__PURE__ */
|
|
40
|
+
e.suggestion && /* @__PURE__ */ i("p", {
|
|
41
41
|
className: "_1a5iqpb6",
|
|
42
42
|
children: e.suggestion
|
|
43
43
|
})
|
|
44
44
|
]
|
|
45
45
|
});
|
|
46
|
-
function
|
|
46
|
+
function je(e = [], t = []) {
|
|
47
47
|
return e.length === t.length && e.every((n, r) => Object.is(n, t[r]));
|
|
48
48
|
}
|
|
49
|
-
var
|
|
49
|
+
var Ue = class extends Pe {
|
|
50
50
|
constructor(...e) {
|
|
51
51
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
52
52
|
}
|
|
53
53
|
static getDerivedStateFromError(e) {
|
|
54
|
-
return { caughtDiagnostic:
|
|
54
|
+
return { caughtDiagnostic: ee(e) };
|
|
55
55
|
}
|
|
56
56
|
componentDidCatch(e, t) {
|
|
57
|
-
const n =
|
|
58
|
-
|
|
57
|
+
const n = ee(e);
|
|
58
|
+
Y([n]), this.props.onError?.([n]), console.error("Chart render component stack:", t.componentStack);
|
|
59
59
|
}
|
|
60
60
|
componentDidUpdate(e) {
|
|
61
|
-
this.state.caughtDiagnostic && !
|
|
61
|
+
this.state.caughtDiagnostic && !je(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
const { caughtDiagnostic: e } = this.state;
|
|
65
|
-
if (e) return /* @__PURE__ */
|
|
65
|
+
if (e) return /* @__PURE__ */ i(ne, { errors: [e] });
|
|
66
66
|
const { forcedErrors: t, children: n } = this.props;
|
|
67
|
-
return t && t.length > 0 ? /* @__PURE__ */
|
|
67
|
+
return t && t.length > 0 ? /* @__PURE__ */ i(ne, { errors: t }) : n;
|
|
68
68
|
}
|
|
69
69
|
}, ce = (e) => typeof e == "object" && "geom" in e && "render" in e, le = (e) => {
|
|
70
70
|
const t = we(e);
|
|
71
|
-
return t instanceof
|
|
72
|
-
},
|
|
73
|
-
const n = e.filter((r) =>
|
|
71
|
+
return t instanceof Ee ? t : null;
|
|
72
|
+
}, Ye = (e, t) => {
|
|
73
|
+
const n = e.filter((r) => We(r, t));
|
|
74
74
|
return n.length === e.length ? e : n;
|
|
75
|
-
},
|
|
76
|
-
selection:
|
|
77
|
-
setSelection: (t) => e((n) =>
|
|
78
|
-
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection:
|
|
79
|
-
})),
|
|
75
|
+
}, We = (e, t) => e.kind === "annotation" ? Ie(t.annotations, e.id) !== null : e.kind === "observations" ? te(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? te(t.layers, e.layerId) !== void 0 : !0, oe = [], Ve = () => z((e) => ({
|
|
76
|
+
selection: oe,
|
|
77
|
+
setSelection: (t) => e((n) => Xe(n.selection, t) ? n : { selection: t }),
|
|
78
|
+
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: oe })
|
|
79
|
+
})), Xe = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((n, r) => {
|
|
80
80
|
const s = t[r];
|
|
81
|
-
return s !== void 0 &&
|
|
82
|
-
}), Qe = process.env.NODE_ENV !== "production",
|
|
81
|
+
return s !== void 0 && Re(n, s);
|
|
82
|
+
}), Qe = process.env.NODE_ENV !== "production", ze = 5, Je = (e) => {
|
|
83
83
|
if (!Qe) return {
|
|
84
84
|
emit: () => {
|
|
85
85
|
},
|
|
86
|
-
subscribe: () =>
|
|
86
|
+
subscribe: () => et,
|
|
87
87
|
getLastTrigger: () => null,
|
|
88
88
|
getLastCompile: () => null,
|
|
89
89
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -95,7 +95,7 @@ var je = class extends _e {
|
|
|
95
95
|
const s = e.getLastCompile();
|
|
96
96
|
if (s) {
|
|
97
97
|
n = r;
|
|
98
|
-
for (const
|
|
98
|
+
for (const c of t) c(r, s);
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
subscribe: (r) => (t.add(r), () => {
|
|
@@ -105,7 +105,7 @@ var je = class extends _e {
|
|
|
105
105
|
getLastCompile: () => e.getLastCompile(),
|
|
106
106
|
getCacheStats: () => e.getCacheStats()
|
|
107
107
|
};
|
|
108
|
-
},
|
|
108
|
+
}, Ze = () => z((e) => ({
|
|
109
109
|
lastCompile: null,
|
|
110
110
|
history: [],
|
|
111
111
|
nextId: 1,
|
|
@@ -114,20 +114,20 @@ var je = class extends _e {
|
|
|
114
114
|
if (r.lastSnapshot === n) return r;
|
|
115
115
|
const s = {
|
|
116
116
|
id: r.nextId,
|
|
117
|
-
label:
|
|
117
|
+
label: tt(t),
|
|
118
118
|
stages: n.stages,
|
|
119
119
|
stageDurationsMs: n.stageDurationsMs,
|
|
120
120
|
durationMs: n.durationMs
|
|
121
121
|
};
|
|
122
122
|
return {
|
|
123
123
|
lastCompile: s,
|
|
124
|
-
history:
|
|
124
|
+
history: rt(r.history, s, ze),
|
|
125
125
|
nextId: r.nextId + 1,
|
|
126
126
|
lastSnapshot: n
|
|
127
127
|
};
|
|
128
128
|
})
|
|
129
|
-
})),
|
|
130
|
-
},
|
|
129
|
+
})), et = () => {
|
|
130
|
+
}, tt = (e) => {
|
|
131
131
|
switch (e.kind) {
|
|
132
132
|
case "init":
|
|
133
133
|
return "init";
|
|
@@ -138,12 +138,12 @@ var je = class extends _e {
|
|
|
138
138
|
case "command":
|
|
139
139
|
return e.command.metadata.description;
|
|
140
140
|
}
|
|
141
|
-
},
|
|
141
|
+
}, rt = (e, t, n) => {
|
|
142
142
|
const r = e.length >= n ? e.length - (n - 1) : 0;
|
|
143
143
|
return [...e.slice(r), t];
|
|
144
144
|
};
|
|
145
|
-
function
|
|
146
|
-
const t = e.filter(ce), n = /* @__PURE__ */ new Set([...Object.keys(
|
|
145
|
+
function nt(e) {
|
|
146
|
+
const t = e.filter(ce), n = /* @__PURE__ */ new Set([...Object.keys(pe), ...t.map((l) => l.geom)]), r = [], s = /* @__PURE__ */ new Set();
|
|
147
147
|
for (const l of e) {
|
|
148
148
|
const d = le(l);
|
|
149
149
|
d === null || n.has(d.type) || s.has(d.type) || (s.add(d.type), r.push({
|
|
@@ -158,18 +158,18 @@ function rt(e) {
|
|
|
158
158
|
suggestion: `Add a render half for it: \`defineGeomRenderer(${d.type}Geom, { coord, render })\`, then include it in \`plugins\`.`
|
|
159
159
|
}));
|
|
160
160
|
}
|
|
161
|
-
const
|
|
161
|
+
const c = /* @__PURE__ */ new Map();
|
|
162
162
|
for (const l of t) {
|
|
163
163
|
if ("definition" in l) continue;
|
|
164
|
-
const d = `${l.geom}|${l.coord}`, g =
|
|
165
|
-
g ? g.count += 1 :
|
|
164
|
+
const d = `${l.geom}|${l.coord}`, g = c.get(d);
|
|
165
|
+
g ? g.count += 1 : c.set(d, {
|
|
166
166
|
geom: l.geom,
|
|
167
167
|
coord: l.coord,
|
|
168
168
|
count: 1
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
const a = [];
|
|
172
|
-
for (const { geom: l, coord: d, count: g } of
|
|
172
|
+
for (const { geom: l, coord: d, count: g } of c.values())
|
|
173
173
|
g < 2 || a.push({
|
|
174
174
|
kind: "user-input",
|
|
175
175
|
severity: "warning",
|
|
@@ -181,15 +181,15 @@ function rt(e) {
|
|
|
181
181
|
},
|
|
182
182
|
suggestion: `Keep a single render-only override for ('${l}', '${d}').`
|
|
183
183
|
});
|
|
184
|
-
return a.push(...
|
|
184
|
+
return a.push(...dt(e)), {
|
|
185
185
|
errors: r,
|
|
186
186
|
warnings: a
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(),
|
|
189
|
+
function st(e, t) {
|
|
190
|
+
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(), c = [];
|
|
191
191
|
for (const a of r)
|
|
192
|
-
t(a.geom, n.type) !== null || s.has(a.geom) || (s.add(a.geom),
|
|
192
|
+
t(a.geom, n.type) !== null || s.has(a.geom) || (s.add(a.geom), c.push({
|
|
193
193
|
kind: "user-input",
|
|
194
194
|
severity: "warning",
|
|
195
195
|
code: "MISSING_GEOM_RENDERER",
|
|
@@ -200,14 +200,14 @@ function nt(e, t) {
|
|
|
200
200
|
},
|
|
201
201
|
suggestion: `Register a renderer for ('${a.geom}', '${n.type}') via \`defineGeomRenderer\`.`
|
|
202
202
|
}));
|
|
203
|
-
return
|
|
203
|
+
return c;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(),
|
|
205
|
+
function ot(e, t) {
|
|
206
|
+
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(), c = [];
|
|
207
207
|
for (const a of r) {
|
|
208
208
|
if (a.interactive === !1 || a.spatialKind !== "render-hit-test" || s.has(a.geom)) continue;
|
|
209
209
|
const l = t(a.geom, n.type);
|
|
210
|
-
l === null || l.hitTest ||
|
|
210
|
+
l === null || l.hitTest || V(l) || (s.add(a.geom), c.push({
|
|
211
211
|
kind: "user-input",
|
|
212
212
|
severity: "warning",
|
|
213
213
|
code: "MISSING_RENDER_HIT_TEST",
|
|
@@ -219,9 +219,9 @@ function st(e, t) {
|
|
|
219
219
|
suggestion: `Add a \`hitTest\` factory (precomputed geometry) or an overlay render (\`{ fn, options: { overlay: true } }\`, live simulation) to the renderer for ('${a.geom}', '${n.type}').`
|
|
220
220
|
}));
|
|
221
221
|
}
|
|
222
|
-
return
|
|
222
|
+
return c;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function at(e) {
|
|
225
225
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
226
226
|
for (const r of e.layers) {
|
|
227
227
|
const s = r.identityKey;
|
|
@@ -239,12 +239,12 @@ function ot(e) {
|
|
|
239
239
|
}
|
|
240
240
|
return n;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(),
|
|
242
|
+
function it(e, t) {
|
|
243
|
+
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(), c = [];
|
|
244
244
|
for (const a of r) {
|
|
245
245
|
if (a.interactive === !1 || a.spatialKind !== "render-hit-test" || s.has(a.geom)) continue;
|
|
246
246
|
const l = t(a.geom, n.type);
|
|
247
|
-
l === null || !l.hitTest || !
|
|
247
|
+
l === null || !l.hitTest || !V(l) || (s.add(a.geom), c.push({
|
|
248
248
|
kind: "user-input",
|
|
249
249
|
severity: "warning",
|
|
250
250
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
@@ -256,9 +256,9 @@ function at(e, t) {
|
|
|
256
256
|
suggestion: "Keep one: a `hitTest` factory for precomputed geometry, OR an overlay render (`{ fn, options: { overlay: true } }`) for a live simulation."
|
|
257
257
|
}));
|
|
258
258
|
}
|
|
259
|
-
return
|
|
259
|
+
return c;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function ct(e, t) {
|
|
262
262
|
const n = /* @__PURE__ */ new Set(), r = [];
|
|
263
263
|
for (const s of e.layers)
|
|
264
264
|
s.interactive !== !1 && (s.spatialKind !== "render-hit-test" || n.has(s.geom) || t.hasCapability(s.geom) || (n.add(s.geom), r.push({
|
|
@@ -274,12 +274,12 @@ function it(e, t) {
|
|
|
274
274
|
})));
|
|
275
275
|
return r;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(),
|
|
277
|
+
function lt(e, t) {
|
|
278
|
+
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(), c = [];
|
|
279
279
|
for (const a of r) {
|
|
280
280
|
if (a.interactive === !1 || a.spatialKind === "render-hit-test" || s.has(a.geom)) continue;
|
|
281
281
|
const l = t(a.geom, n.type);
|
|
282
|
-
l === null || !
|
|
282
|
+
l === null || !V(l) || (s.add(a.geom), c.push({
|
|
283
283
|
kind: "user-input",
|
|
284
284
|
severity: "warning",
|
|
285
285
|
code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
|
|
@@ -291,9 +291,9 @@ function ct(e, t) {
|
|
|
291
291
|
suggestion: "Have the geom's manifest yield spatialKind 'render-hit-test' so the scene layer carries the `byKey` index the overlay's `pushHover` resolves against."
|
|
292
292
|
}));
|
|
293
293
|
}
|
|
294
|
-
return
|
|
294
|
+
return c;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function dt(e) {
|
|
297
297
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
298
298
|
for (const r of e) {
|
|
299
299
|
const s = le(r);
|
|
@@ -311,55 +311,55 @@ function lt(e) {
|
|
|
311
311
|
}
|
|
312
312
|
return n;
|
|
313
313
|
}
|
|
314
|
-
var
|
|
314
|
+
var ut = (e) => z((t) => ({
|
|
315
315
|
scene: e,
|
|
316
316
|
setScene: (n) => t((r) => r.scene === n ? r : { scene: n })
|
|
317
|
-
})),
|
|
318
|
-
const E =
|
|
319
|
-
const o =
|
|
317
|
+
})), mt = ({ spec: e, data: t, customPalettes: n, colorScheme: r, plugins: s, resolveRenderer: c, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: g }) => {
|
|
318
|
+
const E = U(l), D = U(d), N = U(g), [{ session: h, compileBus: u }] = b(() => {
|
|
319
|
+
const o = Ce({ plugins: s });
|
|
320
320
|
return {
|
|
321
|
-
session: new
|
|
322
|
-
compileBus:
|
|
321
|
+
session: new Te(o),
|
|
322
|
+
compileBus: Je(o)
|
|
323
323
|
};
|
|
324
|
-
}), [m] = b(() =>
|
|
324
|
+
}), [m] = b(() => nt(s ?? [])), C = re(null), [I] = b(gt), y = re(null), G = f((o) => m.errors.length === 0 ? o : [...m.errors, ...o ?? []], [m]), _ = f((o) => {
|
|
325
325
|
if (!o.ok) return o.errors;
|
|
326
326
|
if (y.current) y.current.getState().setScene(o.scene);
|
|
327
327
|
else {
|
|
328
|
-
const p =
|
|
328
|
+
const p = ut(o.scene);
|
|
329
329
|
p.subscribe(I.notify), y.current = p, I.notify();
|
|
330
330
|
}
|
|
331
331
|
return null;
|
|
332
|
-
}, [I]), [
|
|
332
|
+
}, [I]), [k, P] = b(() => {
|
|
333
333
|
const o = h.compile({
|
|
334
334
|
spec: e,
|
|
335
335
|
data: t,
|
|
336
336
|
customPalettes: n,
|
|
337
337
|
colorScheme: r
|
|
338
338
|
});
|
|
339
|
-
return C.current = o,
|
|
339
|
+
return C.current = o, G(_(o));
|
|
340
340
|
}), T = f((o) => o.ok ? [
|
|
341
341
|
...o.warnings,
|
|
342
|
-
...
|
|
343
|
-
...
|
|
344
|
-
...
|
|
345
|
-
...
|
|
346
|
-
...
|
|
347
|
-
...
|
|
348
|
-
] : o.warnings, [
|
|
349
|
-
o.length !== 0 && (
|
|
350
|
-
}, [
|
|
351
|
-
o.length !== 0 && (
|
|
342
|
+
...st(o.scene, c),
|
|
343
|
+
...ot(o.scene, c),
|
|
344
|
+
...at(o.scene),
|
|
345
|
+
...it(o.scene, c),
|
|
346
|
+
...lt(o.scene, c),
|
|
347
|
+
...ct(o.scene, a)
|
|
348
|
+
] : o.warnings, [c, a]), R = f((o) => {
|
|
349
|
+
o.length !== 0 && (Y(o), D.current?.(o));
|
|
350
|
+
}, [D]), q = f((o) => {
|
|
351
|
+
o.length !== 0 && (Y(o), N.current?.(o));
|
|
352
352
|
}, [N]);
|
|
353
|
-
|
|
353
|
+
H(() => {
|
|
354
354
|
const o = C.current;
|
|
355
|
-
o && (R([...m.errors, ...o.ok ? [] : o.errors]),
|
|
355
|
+
o && (R([...m.errors, ...o.ok ? [] : o.errors]), q([...m.warnings, ...T(o)]), o.ok && u.emit({ kind: "init" }));
|
|
356
356
|
}, [
|
|
357
357
|
u,
|
|
358
358
|
R,
|
|
359
|
-
|
|
359
|
+
q,
|
|
360
360
|
m,
|
|
361
361
|
T
|
|
362
|
-
]),
|
|
362
|
+
]), H(() => {
|
|
363
363
|
const o = h.update({
|
|
364
364
|
spec: e,
|
|
365
365
|
data: t,
|
|
@@ -369,7 +369,7 @@ var dt = (e) => Q((t) => ({
|
|
|
369
369
|
if (!o) return;
|
|
370
370
|
o.committedSpec && E.current?.(o.committedSpec);
|
|
371
371
|
const p = _(o.result);
|
|
372
|
-
|
|
372
|
+
P(G(p)), p && R(p), q(T(o.result)), p || u.emit({ kind: o.specChanged ? "spec" : "data" });
|
|
373
373
|
}, [
|
|
374
374
|
e,
|
|
375
375
|
t,
|
|
@@ -379,54 +379,54 @@ var dt = (e) => Q((t) => ({
|
|
|
379
379
|
u,
|
|
380
380
|
_,
|
|
381
381
|
R,
|
|
382
|
-
D,
|
|
383
382
|
q,
|
|
383
|
+
G,
|
|
384
384
|
T,
|
|
385
385
|
E
|
|
386
386
|
]);
|
|
387
|
-
const
|
|
388
|
-
|
|
387
|
+
const w = f((o) => {
|
|
388
|
+
P((p) => p === null ? p : G(null)), q(T(o));
|
|
389
389
|
}, [
|
|
390
|
+
G,
|
|
390
391
|
q,
|
|
391
|
-
D,
|
|
392
392
|
T
|
|
393
|
-
]),
|
|
394
|
-
o.scene && y.current?.getState().setScene(o.scene), o.result &&
|
|
393
|
+
]), L = f((o) => {
|
|
394
|
+
o.scene && y.current?.getState().setScene(o.scene), o.result && w(o.result), o.command && u.emit({
|
|
395
395
|
kind: "command",
|
|
396
396
|
command: o.command
|
|
397
397
|
}), o.spec && E.current?.(o.spec), o.errors && R([...o.errors]);
|
|
398
398
|
}, [
|
|
399
|
-
|
|
399
|
+
w,
|
|
400
400
|
u,
|
|
401
401
|
E,
|
|
402
402
|
R
|
|
403
403
|
]), S = f((o) => {
|
|
404
|
-
for (const p of o)
|
|
404
|
+
for (const p of o) L(p);
|
|
405
405
|
return o.some((p) => !!p.scene);
|
|
406
|
-
}, [
|
|
406
|
+
}, [L]), j = f((o, p) => {
|
|
407
407
|
S(h.applyCommand(o, p));
|
|
408
408
|
}, [h, S]), x = f(() => {
|
|
409
409
|
S(h.commit());
|
|
410
|
-
}, [h, S]), A = f(() => S(h.undo()), [h, S]),
|
|
410
|
+
}, [h, S]), A = f(() => S(h.undo()), [h, S]), Z = f(() => S(h.redo()), [h, S]), ue = M(() => ({
|
|
411
411
|
stack: h.history,
|
|
412
412
|
undo: A,
|
|
413
|
-
redo:
|
|
413
|
+
redo: Z
|
|
414
414
|
}), [
|
|
415
415
|
h,
|
|
416
416
|
A,
|
|
417
|
-
|
|
417
|
+
Z
|
|
418
418
|
]), me = f(() => y.current?.getState().scene ?? null, []);
|
|
419
419
|
return {
|
|
420
420
|
store: y.current,
|
|
421
|
-
dispatch:
|
|
421
|
+
dispatch: j,
|
|
422
422
|
commit: x,
|
|
423
423
|
history: ue,
|
|
424
424
|
subscribe: I.subscribe,
|
|
425
425
|
getScene: me,
|
|
426
426
|
compileBus: u,
|
|
427
|
-
compileErrors:
|
|
427
|
+
compileErrors: k
|
|
428
428
|
};
|
|
429
|
-
},
|
|
429
|
+
}, gt = () => {
|
|
430
430
|
const e = /* @__PURE__ */ new Set();
|
|
431
431
|
return {
|
|
432
432
|
subscribe: (t) => (e.add(t), () => {
|
|
@@ -434,36 +434,36 @@ var dt = (e) => Q((t) => ({
|
|
|
434
434
|
}),
|
|
435
435
|
notify: () => e.forEach((t) => t())
|
|
436
436
|
};
|
|
437
|
-
},
|
|
438
|
-
const [
|
|
437
|
+
}, ht = ({ data: e, spec: t, plugins: n = [], formattingLocale: r, handleRef: s, onSpecChange: c, onError: a, onWarnings: l, customPalettes: d, colorScheme: g = "light", children: E }) => {
|
|
438
|
+
const [D] = b(() => he(n.filter(ce))), N = Le(), [h] = b(() => Ne(n)), [u] = b(() => Ge(n)), [m] = b(() => Ve()), [C] = b(() => ye()), I = M(() => De({ colorScheme: g }), [g]), { store: y, dispatch: G, commit: _, history: k, subscribe: P, getScene: T, compileBus: R, compileErrors: q } = mt({
|
|
439
439
|
spec: t,
|
|
440
440
|
data: e,
|
|
441
441
|
customPalettes: d,
|
|
442
442
|
colorScheme: g,
|
|
443
443
|
plugins: n,
|
|
444
|
-
resolveRenderer:
|
|
444
|
+
resolveRenderer: D,
|
|
445
445
|
anchorResolver: h,
|
|
446
|
-
onSpecChange:
|
|
446
|
+
onSpecChange: c,
|
|
447
447
|
onError: a,
|
|
448
448
|
onWarnings: l
|
|
449
449
|
});
|
|
450
|
-
|
|
450
|
+
H(() => {
|
|
451
451
|
if (y)
|
|
452
|
-
return y.subscribe((S,
|
|
453
|
-
if (S.scene.spec ===
|
|
452
|
+
return y.subscribe((S, j) => {
|
|
453
|
+
if (S.scene.spec === j.scene.spec) return;
|
|
454
454
|
const { selection: x, setSelection: A } = m.getState();
|
|
455
|
-
x.length !== 0 && A(
|
|
455
|
+
x.length !== 0 && A(Ye(x, S.scene.spec));
|
|
456
456
|
});
|
|
457
457
|
}, [y, m]);
|
|
458
|
-
const
|
|
459
|
-
dispatch:
|
|
458
|
+
const w = M(() => ({
|
|
459
|
+
dispatch: G,
|
|
460
460
|
commit: _
|
|
461
|
-
}), [
|
|
462
|
-
|
|
463
|
-
commands:
|
|
464
|
-
undo:
|
|
465
|
-
redo:
|
|
466
|
-
subscribe:
|
|
461
|
+
}), [G, _]);
|
|
462
|
+
$e(s, () => ({
|
|
463
|
+
commands: w,
|
|
464
|
+
undo: k.undo,
|
|
465
|
+
redo: k.redo,
|
|
466
|
+
subscribe: P,
|
|
467
467
|
getScene: T,
|
|
468
468
|
getSelection: () => m.getState().selection,
|
|
469
469
|
setSelection: (S) => m.getState().setSelection(S),
|
|
@@ -471,20 +471,20 @@ var dt = (e) => Q((t) => ({
|
|
|
471
471
|
canPlaceDataLabels: u.hasCapability,
|
|
472
472
|
canFormatDataLabelsAsPercentages: u.hasPercentageFormat
|
|
473
473
|
}), [
|
|
474
|
-
k,
|
|
475
474
|
w,
|
|
476
|
-
|
|
475
|
+
k,
|
|
476
|
+
P,
|
|
477
477
|
T,
|
|
478
478
|
m,
|
|
479
479
|
u
|
|
480
480
|
]);
|
|
481
|
-
const
|
|
481
|
+
const L = M(() => y ? {
|
|
482
482
|
chartId: N,
|
|
483
483
|
store: y,
|
|
484
484
|
selectionStore: m,
|
|
485
485
|
targetBoundaryStore: C,
|
|
486
|
-
commands:
|
|
487
|
-
history:
|
|
486
|
+
commands: w,
|
|
487
|
+
history: k,
|
|
488
488
|
formattingLocale: r,
|
|
489
489
|
compileBus: R,
|
|
490
490
|
colorScheme: g,
|
|
@@ -495,23 +495,23 @@ var dt = (e) => Q((t) => ({
|
|
|
495
495
|
y,
|
|
496
496
|
m,
|
|
497
497
|
C,
|
|
498
|
-
k,
|
|
499
498
|
w,
|
|
499
|
+
k,
|
|
500
500
|
r,
|
|
501
501
|
R,
|
|
502
502
|
g,
|
|
503
503
|
I,
|
|
504
504
|
h
|
|
505
505
|
]);
|
|
506
|
-
return /* @__PURE__ */
|
|
507
|
-
forcedErrors:
|
|
506
|
+
return /* @__PURE__ */ i(Ue, {
|
|
507
|
+
forcedErrors: q,
|
|
508
508
|
onError: a,
|
|
509
509
|
resetKeys: [t, e],
|
|
510
|
-
children:
|
|
511
|
-
value:
|
|
512
|
-
children: /* @__PURE__ */
|
|
513
|
-
value:
|
|
514
|
-
children: /* @__PURE__ */
|
|
510
|
+
children: L ? /* @__PURE__ */ i(be.Provider, {
|
|
511
|
+
value: L,
|
|
512
|
+
children: /* @__PURE__ */ i(fe, {
|
|
513
|
+
value: D,
|
|
514
|
+
children: /* @__PURE__ */ i(ve, {
|
|
515
515
|
value: u,
|
|
516
516
|
children: E
|
|
517
517
|
})
|
|
@@ -519,31 +519,31 @@ var dt = (e) => Q((t) => ({
|
|
|
519
519
|
}) : null
|
|
520
520
|
});
|
|
521
521
|
};
|
|
522
|
-
function
|
|
522
|
+
function Mr(e) {
|
|
523
523
|
const t = qe(e);
|
|
524
524
|
return {
|
|
525
525
|
...t,
|
|
526
|
-
GraphProvider: (r) => /* @__PURE__ */
|
|
526
|
+
GraphProvider: (r) => /* @__PURE__ */ i(ht, {
|
|
527
527
|
...r,
|
|
528
528
|
plugins: t.plugins
|
|
529
529
|
})
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
|
-
var
|
|
532
|
+
var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__PURE__ */ i(F.circle, {
|
|
533
533
|
initial: !1,
|
|
534
534
|
animate: {
|
|
535
535
|
cx: t,
|
|
536
536
|
cy: n,
|
|
537
537
|
r
|
|
538
538
|
},
|
|
539
|
-
transition:
|
|
539
|
+
transition: K,
|
|
540
540
|
...s
|
|
541
|
-
}) : /* @__PURE__ */
|
|
541
|
+
}) : /* @__PURE__ */ i("circle", {
|
|
542
542
|
cx: t,
|
|
543
543
|
cy: n,
|
|
544
544
|
r,
|
|
545
545
|
...s
|
|
546
|
-
}),
|
|
546
|
+
}), xr = ({ shouldAnimateTransitions: e, x1: t, y1: n, x2: r, y2: s, ...c }) => e ? /* @__PURE__ */ i(F.line, {
|
|
547
547
|
initial: !1,
|
|
548
548
|
animate: {
|
|
549
549
|
x1: t,
|
|
@@ -551,15 +551,44 @@ var $r = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
551
551
|
x2: r,
|
|
552
552
|
y2: s
|
|
553
553
|
},
|
|
554
|
-
transition:
|
|
555
|
-
...
|
|
556
|
-
}) : /* @__PURE__ */
|
|
554
|
+
transition: K,
|
|
555
|
+
...c
|
|
556
|
+
}) : /* @__PURE__ */ i("line", {
|
|
557
557
|
x1: t,
|
|
558
558
|
y1: n,
|
|
559
559
|
x2: r,
|
|
560
560
|
y2: s,
|
|
561
|
-
...
|
|
562
|
-
}),
|
|
561
|
+
...c
|
|
562
|
+
}), Ar = ({ shouldAnimateTransitions: e, x: t, y: n, width: r, height: s, ...c }) => e ? /* @__PURE__ */ i(F.rect, {
|
|
563
|
+
initial: !1,
|
|
564
|
+
animate: {
|
|
565
|
+
attrX: t,
|
|
566
|
+
attrY: n,
|
|
567
|
+
width: r,
|
|
568
|
+
height: s
|
|
569
|
+
},
|
|
570
|
+
transition: K,
|
|
571
|
+
...c
|
|
572
|
+
}) : /* @__PURE__ */ i("rect", {
|
|
573
|
+
x: t,
|
|
574
|
+
y: n,
|
|
575
|
+
width: r,
|
|
576
|
+
height: s,
|
|
577
|
+
...c
|
|
578
|
+
}), Br = ({ shouldAnimateTransitions: e, d: t, source: n, ...r }) => e ? /* @__PURE__ */ i(pt, {
|
|
579
|
+
d: t,
|
|
580
|
+
source: n,
|
|
581
|
+
...r
|
|
582
|
+
}) : /* @__PURE__ */ i("path", {
|
|
583
|
+
d: t,
|
|
584
|
+
...r
|
|
585
|
+
}), pt = ({ d: e, source: t, ...n }) => {
|
|
586
|
+
const r = ge(e, K, t);
|
|
587
|
+
return /* @__PURE__ */ i(F.path, {
|
|
588
|
+
d: r,
|
|
589
|
+
...n
|
|
590
|
+
});
|
|
591
|
+
}, Or = ({ children: e, ...t }) => /* @__PURE__ */ i("svg", {
|
|
563
592
|
viewBox: "0 0 1 1",
|
|
564
593
|
preserveAspectRatio: "none",
|
|
565
594
|
width: "100%",
|
|
@@ -567,7 +596,7 @@ var $r = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
567
596
|
pointerEvents: "none",
|
|
568
597
|
...t,
|
|
569
598
|
children: e
|
|
570
|
-
}),
|
|
599
|
+
}), Kr = ({ box: e, children: t }) => /* @__PURE__ */ i("svg", {
|
|
571
600
|
x: B(e.x0),
|
|
572
601
|
y: B(e.y0),
|
|
573
602
|
width: B(e.x1 - e.x0),
|
|
@@ -575,180 +604,180 @@ var $r = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
575
604
|
overflow: "hidden",
|
|
576
605
|
pointerEvents: "none",
|
|
577
606
|
children: t
|
|
578
|
-
}),
|
|
579
|
-
var
|
|
580
|
-
var
|
|
607
|
+
}), ft = "drqe3u0", vt = "drqe3u1", yt = "drqe3u2", St = "drqe3u3", $ = "drqe3u4", bt = "drqe3u5", Et = "drqe3u6", Tt = "drqe3u7", O = "drqe3u8", Rt = "drqe3u9", Nt = "drqe3ua";
|
|
608
|
+
var Ct = "drqe3uc", Gt = "drqe3ud", qt = "drqe3ue", Dt = "drqe3uf";
|
|
609
|
+
var It = "drqe3uh", kt = "drqe3ui", ae = {
|
|
581
610
|
enabled: "drqe3uk drqe3uj",
|
|
582
611
|
disabled: "drqe3ul drqe3uj"
|
|
583
|
-
},
|
|
612
|
+
}, ie = {
|
|
584
613
|
ran: "drqe3un drqe3um",
|
|
585
614
|
dim: "drqe3uo drqe3um"
|
|
586
615
|
}, de = {
|
|
587
616
|
ran: "drqe3uq drqe3up",
|
|
588
617
|
cached: "drqe3ur drqe3up",
|
|
589
618
|
untouched: "drqe3us drqe3up"
|
|
590
|
-
},
|
|
591
|
-
const { compileBus: r } =
|
|
592
|
-
|
|
619
|
+
}, Fr = ({ width: e = 440, style: t, className: n } = {}) => {
|
|
620
|
+
const { compileBus: r } = X(), [s] = b(() => Ze()), [c, a] = b(!1), [l, d] = b(ke);
|
|
621
|
+
H(() => {
|
|
593
622
|
const { recordCompile: u } = s.getState(), m = r.getLastTrigger(), C = r.getLastCompile();
|
|
594
623
|
return m && C && u(m, C), r.subscribe(u);
|
|
595
624
|
}, [s, r]);
|
|
596
|
-
const g =
|
|
625
|
+
const g = W(s, (u) => u.lastCompile), E = W(s, (u) => u.history), D = r.getCacheStats(), N = g === null && E.length === 0, h = () => {
|
|
597
626
|
d((u) => {
|
|
598
627
|
const m = !u;
|
|
599
|
-
return
|
|
628
|
+
return _e(m), m;
|
|
600
629
|
});
|
|
601
630
|
};
|
|
602
631
|
return /* @__PURE__ */ v("div", {
|
|
603
|
-
className:
|
|
632
|
+
className: xe(Nt, n),
|
|
604
633
|
style: {
|
|
605
634
|
width: e,
|
|
606
635
|
...t
|
|
607
636
|
},
|
|
608
637
|
children: [
|
|
609
638
|
/* @__PURE__ */ v("div", {
|
|
610
|
-
className:
|
|
611
|
-
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */
|
|
612
|
-
className:
|
|
639
|
+
className: ft,
|
|
640
|
+
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ i("div", {
|
|
641
|
+
className: vt,
|
|
613
642
|
children: "compile cache"
|
|
614
|
-
}), /* @__PURE__ */
|
|
615
|
-
className:
|
|
616
|
-
children: N ? "production: stats disabled" : g ? `last: ${g.label} · ${
|
|
617
|
-
})] }), /* @__PURE__ */
|
|
643
|
+
}), /* @__PURE__ */ i("div", {
|
|
644
|
+
className: qt,
|
|
645
|
+
children: N ? "production: stats disabled" : g ? `last: ${g.label} · ${J(g.durationMs)}` : "awaiting first compile…"
|
|
646
|
+
})] }), /* @__PURE__ */ i("button", {
|
|
618
647
|
type: "button",
|
|
619
648
|
onClick: () => a((u) => !u),
|
|
620
|
-
className:
|
|
621
|
-
children:
|
|
649
|
+
className: Dt,
|
|
650
|
+
children: c ? "▾" : "▴"
|
|
622
651
|
})]
|
|
623
652
|
}),
|
|
624
|
-
!
|
|
653
|
+
!c && /* @__PURE__ */ v("div", {
|
|
625
654
|
className: "drqe3ub",
|
|
626
655
|
children: [/* @__PURE__ */ v("button", {
|
|
627
656
|
type: "button",
|
|
628
657
|
onClick: h,
|
|
629
|
-
className: l ?
|
|
658
|
+
className: l ? ae.enabled : ae.disabled,
|
|
630
659
|
"aria-pressed": l,
|
|
631
660
|
children: ["cache ", l ? "enabled" : "disabled"]
|
|
632
|
-
}), /* @__PURE__ */
|
|
661
|
+
}), /* @__PURE__ */ i("span", {
|
|
633
662
|
className: "drqe3ug",
|
|
634
663
|
children: "next compile reflects this toggle"
|
|
635
664
|
})]
|
|
636
665
|
}),
|
|
637
|
-
!
|
|
666
|
+
!c && !N && /* @__PURE__ */ v(He, { children: [/* @__PURE__ */ i(wt, {
|
|
638
667
|
delta: g?.stages,
|
|
639
668
|
durations: g?.stageDurationsMs,
|
|
640
|
-
cumulative:
|
|
641
|
-
}), /* @__PURE__ */
|
|
669
|
+
cumulative: D
|
|
670
|
+
}), /* @__PURE__ */ i(_t, { entries: E })] })
|
|
642
671
|
]
|
|
643
672
|
});
|
|
644
|
-
},
|
|
645
|
-
className:
|
|
646
|
-
children: [/* @__PURE__ */
|
|
647
|
-
className:
|
|
673
|
+
}, wt = ({ delta: e, durations: t, cumulative: n }) => /* @__PURE__ */ v("table", {
|
|
674
|
+
className: yt,
|
|
675
|
+
children: [/* @__PURE__ */ i("thead", { children: /* @__PURE__ */ v("tr", {
|
|
676
|
+
className: It,
|
|
648
677
|
children: [
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
className:
|
|
678
|
+
/* @__PURE__ */ i("th", {
|
|
679
|
+
className: St,
|
|
651
680
|
children: "stage"
|
|
652
681
|
}),
|
|
653
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ i("th", {
|
|
654
683
|
className: $,
|
|
655
684
|
children: "time"
|
|
656
685
|
}),
|
|
657
|
-
/* @__PURE__ */
|
|
686
|
+
/* @__PURE__ */ i("th", {
|
|
658
687
|
className: $,
|
|
659
688
|
children: "Δ miss"
|
|
660
689
|
}),
|
|
661
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ i("th", {
|
|
662
691
|
className: $,
|
|
663
692
|
children: "Δ hit"
|
|
664
693
|
}),
|
|
665
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ i("th", {
|
|
666
695
|
className: $,
|
|
667
696
|
children: "total miss"
|
|
668
697
|
}),
|
|
669
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ i("th", {
|
|
670
699
|
className: $,
|
|
671
700
|
children: "total hit"
|
|
672
701
|
})
|
|
673
702
|
]
|
|
674
|
-
}) }), /* @__PURE__ */
|
|
675
|
-
const s = e?.[r],
|
|
703
|
+
}) }), /* @__PURE__ */ i("tbody", { children: Q.map((r) => {
|
|
704
|
+
const s = e?.[r], c = Pt(s);
|
|
676
705
|
return /* @__PURE__ */ v("tr", {
|
|
677
|
-
className:
|
|
706
|
+
className: Ct,
|
|
678
707
|
children: [
|
|
679
708
|
/* @__PURE__ */ v("td", {
|
|
680
|
-
className:
|
|
709
|
+
className: bt,
|
|
681
710
|
children: [
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
-
className: de[
|
|
711
|
+
/* @__PURE__ */ i("span", {
|
|
712
|
+
className: de[c],
|
|
684
713
|
"aria-hidden": !0
|
|
685
714
|
}),
|
|
686
715
|
" ",
|
|
687
716
|
r
|
|
688
717
|
]
|
|
689
718
|
}),
|
|
690
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ i("td", {
|
|
691
720
|
className: O,
|
|
692
|
-
children: t === void 0 ||
|
|
721
|
+
children: t === void 0 || c === "untouched" ? "—" : J(t[r])
|
|
693
722
|
}),
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
className:
|
|
723
|
+
/* @__PURE__ */ i("td", {
|
|
724
|
+
className: c === "ran" ? ie.ran : ie.dim,
|
|
696
725
|
children: s?.misses ?? 0
|
|
697
726
|
}),
|
|
698
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ i("td", {
|
|
699
728
|
className: O,
|
|
700
729
|
children: s?.hits ?? 0
|
|
701
730
|
}),
|
|
702
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ i("td", {
|
|
703
732
|
className: O,
|
|
704
733
|
children: n[r].misses
|
|
705
734
|
}),
|
|
706
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ i("td", {
|
|
707
736
|
className: O,
|
|
708
737
|
children: n[r].hits
|
|
709
738
|
})
|
|
710
739
|
]
|
|
711
740
|
}, r);
|
|
712
741
|
}) })]
|
|
713
|
-
}),
|
|
714
|
-
className:
|
|
715
|
-
children: [/* @__PURE__ */
|
|
716
|
-
className:
|
|
742
|
+
}), _t = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
|
|
743
|
+
className: Gt,
|
|
744
|
+
children: [/* @__PURE__ */ i("div", {
|
|
745
|
+
className: kt,
|
|
717
746
|
children: "recent compiles"
|
|
718
747
|
}), e.map((t) => {
|
|
719
|
-
const n =
|
|
748
|
+
const n = Lt(t.stages, (c) => c.misses > 0), r = Q.length;
|
|
720
749
|
return /* @__PURE__ */ v("div", {
|
|
721
|
-
className:
|
|
750
|
+
className: Et,
|
|
722
751
|
children: [
|
|
723
|
-
/* @__PURE__ */
|
|
752
|
+
/* @__PURE__ */ i("span", {
|
|
724
753
|
className: de[n === 0 ? "cached" : "ran"],
|
|
725
754
|
"aria-hidden": !0
|
|
726
755
|
}),
|
|
727
|
-
/* @__PURE__ */
|
|
728
|
-
className:
|
|
756
|
+
/* @__PURE__ */ i("span", {
|
|
757
|
+
className: Tt,
|
|
729
758
|
title: t.label,
|
|
730
759
|
children: t.label
|
|
731
760
|
}),
|
|
732
761
|
/* @__PURE__ */ v("span", {
|
|
733
|
-
className:
|
|
762
|
+
className: Rt,
|
|
734
763
|
children: [
|
|
735
764
|
n,
|
|
736
765
|
"/",
|
|
737
766
|
r,
|
|
738
767
|
" ran · ",
|
|
739
|
-
|
|
768
|
+
J(t.durationMs)
|
|
740
769
|
]
|
|
741
770
|
})
|
|
742
771
|
]
|
|
743
772
|
}, t.id);
|
|
744
773
|
})]
|
|
745
|
-
}),
|
|
774
|
+
}), Pt = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Lt = (e, t) => {
|
|
746
775
|
let n = 0;
|
|
747
|
-
for (const r of
|
|
776
|
+
for (const r of Q) t(e[r]) && (n += 1);
|
|
748
777
|
return n;
|
|
749
|
-
},
|
|
750
|
-
const { history: e } =
|
|
751
|
-
return
|
|
778
|
+
}, J = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, jr = () => {
|
|
779
|
+
const { history: e } = X(), { stack: t, undo: n, redo: r } = e, s = f((l) => t.subscribe(l), [t]), c = f(() => t.getSnapshot(), [t]), a = Me(s, c, c);
|
|
780
|
+
return M(() => ({
|
|
752
781
|
...a,
|
|
753
782
|
undo: n,
|
|
754
783
|
redo: r
|
|
@@ -757,7 +786,7 @@ var Dt = "drqe3uh", Gt = "drqe3ui", se = {
|
|
|
757
786
|
n,
|
|
758
787
|
r
|
|
759
788
|
]);
|
|
760
|
-
},
|
|
789
|
+
}, $t = /* @__PURE__ */ new Set([
|
|
761
790
|
"button",
|
|
762
791
|
"checkbox",
|
|
763
792
|
"color",
|
|
@@ -768,82 +797,84 @@ var Dt = "drqe3uh", Gt = "drqe3ui", se = {
|
|
|
768
797
|
"range",
|
|
769
798
|
"reset",
|
|
770
799
|
"submit"
|
|
771
|
-
]),
|
|
800
|
+
]), Ur = (e, t = {}) => {
|
|
772
801
|
const { target: n, enabled: r = !0 } = t;
|
|
773
|
-
|
|
774
|
-
const s =
|
|
802
|
+
H(() => {
|
|
803
|
+
const s = Mt(n);
|
|
775
804
|
if (!r || !s) return;
|
|
776
|
-
const
|
|
777
|
-
if (
|
|
778
|
-
const l =
|
|
805
|
+
const c = (a) => {
|
|
806
|
+
if (!Ht(a) || a.defaultPrevented || xt(a.target)) return;
|
|
807
|
+
const l = Se(a);
|
|
779
808
|
if (!l) return;
|
|
780
809
|
const d = e.current;
|
|
781
810
|
d && (l === "undo" ? d.undo() : d.redo()) && a.preventDefault();
|
|
782
811
|
};
|
|
783
|
-
return s.addEventListener("keydown",
|
|
812
|
+
return s.addEventListener("keydown", c), () => s.removeEventListener("keydown", c);
|
|
784
813
|
}, [
|
|
785
814
|
e,
|
|
786
815
|
n,
|
|
787
816
|
r
|
|
788
817
|
]);
|
|
789
|
-
},
|
|
790
|
-
const { targetBoundaryStore: e } =
|
|
791
|
-
return
|
|
818
|
+
}, Mt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Ht = (e) => "key" in e, xt = (e) => e instanceof HTMLInputElement ? !$t.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, Yr = () => {
|
|
819
|
+
const { targetBoundaryStore: e } = X();
|
|
820
|
+
return W(e, (t) => t.boundary);
|
|
792
821
|
};
|
|
793
822
|
export {
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
823
|
+
Gr as BrandMark,
|
|
824
|
+
jt as CanvasTextMeasurer,
|
|
825
|
+
Wt as DefaultFooter,
|
|
826
|
+
yr as DefaultGrid,
|
|
827
|
+
Ut as DefaultHeader,
|
|
828
|
+
Vt as DefaultSwatch,
|
|
829
|
+
gr as DefaultTooltip,
|
|
830
|
+
Fr as DevToolsPanel,
|
|
831
|
+
or as GRAPH_MODES,
|
|
832
|
+
Hr as GeomCircle,
|
|
833
|
+
xr as GeomLine,
|
|
834
|
+
Br as GeomPath,
|
|
835
|
+
Ar as GeomRect,
|
|
836
|
+
Ue as GraphErrorBoundary,
|
|
837
|
+
ne as GraphErrorPanel,
|
|
838
|
+
ht as GraphProvider,
|
|
839
|
+
er as GraphRenderer,
|
|
840
|
+
Nr as HoverProvider,
|
|
841
|
+
Qt as IntroFade,
|
|
842
|
+
zt as IntroWipeClip,
|
|
843
|
+
Kt as TextMeasurerProvider,
|
|
844
|
+
nr as ThemeProvider,
|
|
845
|
+
Kr as UnitBoxSvg,
|
|
846
|
+
Or as UnitSpaceSvg,
|
|
847
|
+
br as buildDotsEditOutlineShapes,
|
|
848
|
+
Mr as createGraphyKit,
|
|
849
|
+
Er as darkTheme,
|
|
850
|
+
dr as defineGeomRenderer,
|
|
851
|
+
sr as lightTheme,
|
|
852
|
+
Yt as lightenCss,
|
|
853
|
+
cr as projectPointCartesian,
|
|
854
|
+
Ye as pruneSelection,
|
|
855
|
+
Ot as resolveBrandMarkVisual,
|
|
856
|
+
fr as scalePointToPanel,
|
|
857
|
+
Bt as stampAxisEditTarget,
|
|
858
|
+
lr as stampGridEditTarget,
|
|
859
|
+
Xt as stampLegendEditTarget,
|
|
860
|
+
Cr as useElementScreenRect,
|
|
861
|
+
Ft as useGeomHitTest,
|
|
862
|
+
Tr as useGeomHover,
|
|
863
|
+
tr as useGeomReaderTree,
|
|
864
|
+
hr as useGeomStyleReader,
|
|
865
|
+
mr as useGraphCommands,
|
|
866
|
+
ir as useGraphHandle,
|
|
867
|
+
jr as useGraphHistory,
|
|
868
|
+
Ur as useGraphHistoryShortcuts,
|
|
869
|
+
ar as useGraphSelection,
|
|
870
|
+
Rr as useGuidesTakePress,
|
|
871
|
+
pr as useHandleScene,
|
|
872
|
+
vr as useHoverState,
|
|
873
|
+
Jt as useResolvedStyle,
|
|
874
|
+
ur as useSceneSelector,
|
|
875
|
+
Sr as useStyleReaderTree,
|
|
876
|
+
rr as useStyleResolver,
|
|
877
|
+
Yr as useTargetBoundary,
|
|
878
|
+
Zt as useTextMeasurer,
|
|
879
|
+
Dr as vars
|
|
849
880
|
};
|