@graphysdk/react-renderer 1.9.0-beta.1795606078423 → 1.9.0-beta.1795686990387
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.d.ts +8 -0
- package/dist/editable.mjs +120 -120
- package/dist/history-chords-7P8sFd-9.cjs +2 -0
- package/dist/{history-chords-D81GmhCY.js → history-chords-LuhZmV5N.js} +3788 -3639
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.mjs +578 -549
- package/package.json +5 -5
- package/dist/history-chords-VpwilkFA.cjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { $n as
|
|
2
|
-
import { COMPILER_STAGE_KEYS as
|
|
3
|
-
import { Component as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { useStore as
|
|
6
|
-
import { createStore as
|
|
7
|
-
import
|
|
8
|
-
import './index.css';function
|
|
1
|
+
import { $n as zr, $t as Vr, An as Yr, At as jr, Bn as Qr, Bt as Xr, Cn as Jr, Dr as $e, En as Zr, Er as He, Gn as ee, H as en, Hn as Ne, In as tn, Jn as xe, Kn as Ce, Lt as rn, Or as ce, Ot as nn, P as sn, Qn as W, Qt as on, Sn as Me, Sr as Ae, Tn as an, Tr as he, U as cn, Un as ln, Ut as dn, Vn as z, Vt as un, W as mn, Wn as Oe, X as hn, Yn as te, Yt as gn, Zn as pn, _n as Be, _r as fn, a as vn, an as Ke, ar as Fe, bn as yn, br as Sn, cn as Ue, dr as We, en as bn, et as Tn, fn as ze, fr as Ve, gn as re, gr as Pe, hn as Gn, hr as se, i as En, ir as Ye, jt as Rn, kt as wn, l as In, lr as je, mn as Nn, mr as Qe, n as Cn, nr as Pn, nt as Ln, on as Xe, or as Dn, pn as Je, pr as Ze, qn as et, r as _n, rr as tt, sn as rt, sr as nt, t as st, tn as qn, tr as kn, tt as $n, un as ot, ur as Le, vn as Hn, vr as xn, w as Mn, wn as An, wr as oe, xn as it, xr as at, yr as On, zn as Bn } from "./history-chords-LuhZmV5N.js";
|
|
2
|
+
import { COMPILER_STAGE_KEYS as le, DEFAULT_LOCALE as ct, Geom as lt, GraphCompilationSession as dt, areEditTargetsEqual as ut, buildDiagnostic as ge, buildPointSymbolPath as mt, canonicalizeLocale as ht, createAnchorResolver as gt, createCompiler as pt, createDataLabelPlacementResolver as ft, createSpecBuilder as vt, createStyleResolver as De, findAnnotation as yt, findIntlLocale as St, findLayerById as pe, foldGeomCornerRadii as bt, getLegendGroupKey as Tt, isCompilerCachingEnabled as Gt, isGeometricSymbol as de, isImageSymbol as Et, resolveDefinition as Rt, resolveGeomCornerRadiusPx as fe, setCompilerCachingEnabled as wt, toPercent as J } from "@graphysdk/viz-engine";
|
|
3
|
+
import { Component as It, useCallback as f, useEffect as q, useId as Nt, useImperativeHandle as Ct, useMemo as M, useRef as ve, useState as v, useSyncExternalStore as Pt } from "react";
|
|
4
|
+
import { Fragment as Lt, jsx as c, jsxs as y } from "react/jsx-runtime";
|
|
5
|
+
import { useStore as ie } from "zustand";
|
|
6
|
+
import { createStore as ue } from "zustand/vanilla";
|
|
7
|
+
import Dt from "clsx";
|
|
8
|
+
import './index.css';function ae(e) {
|
|
9
9
|
for (const t of e) (t.severity === "error" ? console.error : console.warn)(`[graphy] ${t.code}: ${t.message}`, t);
|
|
10
10
|
}
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var _t = "_1a5iqpb0", qt = "_1a5iqpb1";
|
|
12
|
+
var kt = "_1a5iqpb3", $t = "_1a5iqpb4", Ht = "_1a5iqpb5";
|
|
13
|
+
var ye = ({ errors: e }) => {
|
|
14
14
|
const [t, ...r] = e;
|
|
15
15
|
return /* @__PURE__ */ y("div", {
|
|
16
16
|
role: "alert",
|
|
17
|
-
className:
|
|
17
|
+
className: _t,
|
|
18
18
|
children: [
|
|
19
19
|
/* @__PURE__ */ c("strong", {
|
|
20
|
-
className:
|
|
20
|
+
className: qt,
|
|
21
21
|
children: "This chart could not be rendered."
|
|
22
22
|
}),
|
|
23
|
-
t && /* @__PURE__ */ c(
|
|
23
|
+
t && /* @__PURE__ */ c(Se, { diagnostic: t }),
|
|
24
24
|
r.length > 0 && /* @__PURE__ */ c("ul", {
|
|
25
25
|
className: "_1a5iqpb2",
|
|
26
|
-
children: r.map((n, s) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
|
|
26
|
+
children: r.map((n, s) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(Se, { diagnostic: n }) }, `${n.code}-${s}`))
|
|
27
27
|
})
|
|
28
28
|
]
|
|
29
29
|
});
|
|
30
|
-
},
|
|
31
|
-
className:
|
|
30
|
+
}, Se = ({ diagnostic: e }) => /* @__PURE__ */ y("div", {
|
|
31
|
+
className: kt,
|
|
32
32
|
children: [
|
|
33
33
|
/* @__PURE__ */ c("span", {
|
|
34
|
-
className:
|
|
34
|
+
className: $t,
|
|
35
35
|
children: e.code
|
|
36
36
|
}),
|
|
37
37
|
/* @__PURE__ */ c("p", {
|
|
38
|
-
className:
|
|
38
|
+
className: Ht,
|
|
39
39
|
children: e.message
|
|
40
40
|
}),
|
|
41
41
|
e.suggestion && /* @__PURE__ */ c("p", {
|
|
@@ -44,47 +44,54 @@ var ve = ({ errors: e }) => {
|
|
|
44
44
|
})
|
|
45
45
|
]
|
|
46
46
|
});
|
|
47
|
-
function
|
|
47
|
+
function xt(e = [], t = []) {
|
|
48
48
|
return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
|
|
49
49
|
}
|
|
50
|
-
var
|
|
50
|
+
var Mt = class extends It {
|
|
51
51
|
constructor(...e) {
|
|
52
52
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
53
53
|
}
|
|
54
54
|
static getDerivedStateFromError(e) {
|
|
55
|
-
return { caughtDiagnostic:
|
|
55
|
+
return { caughtDiagnostic: ge(e) };
|
|
56
56
|
}
|
|
57
57
|
componentDidCatch(e, t) {
|
|
58
|
-
const r =
|
|
59
|
-
|
|
58
|
+
const r = ge(e);
|
|
59
|
+
ae([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
|
|
60
60
|
}
|
|
61
61
|
componentDidUpdate(e) {
|
|
62
|
-
this.state.caughtDiagnostic && !
|
|
62
|
+
this.state.caughtDiagnostic && !xt(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
65
|
const { caughtDiagnostic: e } = this.state;
|
|
66
|
-
if (e) return /* @__PURE__ */ c(
|
|
66
|
+
if (e) return /* @__PURE__ */ c(ye, { errors: [e] });
|
|
67
67
|
const { forcedErrors: t, children: r } = this.props;
|
|
68
|
-
return t && t.length > 0 ? /* @__PURE__ */ c(
|
|
68
|
+
return t && t.length > 0 ? /* @__PURE__ */ c(ye, { errors: t }) : r;
|
|
69
69
|
}
|
|
70
|
-
},
|
|
71
|
-
const t =
|
|
72
|
-
return t instanceof
|
|
73
|
-
},
|
|
74
|
-
const
|
|
70
|
+
}, _e = (e) => typeof e == "object" && "geom" in e && "render" in e, qe = (e) => {
|
|
71
|
+
const t = Rt(e);
|
|
72
|
+
return t instanceof lt ? t : null;
|
|
73
|
+
}, At = (e) => {
|
|
74
|
+
const t = /* @__PURE__ */ new Set();
|
|
75
|
+
if (e.position === "none") return t;
|
|
76
|
+
for (const r of e.drawn)
|
|
77
|
+
if (!(!r.hidesGroups || r.display !== "pill"))
|
|
78
|
+
for (const n of r.items) t.add(Tt(r, n));
|
|
79
|
+
return t;
|
|
80
|
+
}, Ot = (e, t) => {
|
|
81
|
+
const r = e.filter((n) => Bt(n, t));
|
|
75
82
|
return r.length === e.length ? e : r;
|
|
76
|
-
},
|
|
77
|
-
selection:
|
|
78
|
-
setSelection: (t) => e((r) =>
|
|
79
|
-
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection:
|
|
80
|
-
})),
|
|
83
|
+
}, Bt = (e, t) => e.kind === "annotation" ? yt(t.annotations, e.id) !== null : e.kind === "observations" ? pe(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? pe(t.layers, e.layerId) !== void 0 : !0, be = [], Kt = () => ue((e) => ({
|
|
84
|
+
selection: be,
|
|
85
|
+
setSelection: (t) => e((r) => Ft(r.selection, t) ? r : { selection: t }),
|
|
86
|
+
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: be })
|
|
87
|
+
})), Ft = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
|
|
81
88
|
const s = t[n];
|
|
82
|
-
return s !== void 0 &&
|
|
83
|
-
}),
|
|
84
|
-
if (!
|
|
89
|
+
return s !== void 0 && ut(r, s);
|
|
90
|
+
}), Ut = 5, Wt = (e) => {
|
|
91
|
+
if (!Le) return {
|
|
85
92
|
emit: () => {
|
|
86
93
|
},
|
|
87
|
-
subscribe: () =>
|
|
94
|
+
subscribe: () => Vt,
|
|
88
95
|
getLastTrigger: () => null,
|
|
89
96
|
getLastCompile: () => null,
|
|
90
97
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -96,7 +103,7 @@ var kt = class extends Rt {
|
|
|
96
103
|
const s = e.getLastCompile();
|
|
97
104
|
if (s) {
|
|
98
105
|
r = n;
|
|
99
|
-
for (const
|
|
106
|
+
for (const a of t) a(n, s);
|
|
100
107
|
}
|
|
101
108
|
},
|
|
102
109
|
subscribe: (n) => (t.add(n), () => {
|
|
@@ -106,7 +113,7 @@ var kt = class extends Rt {
|
|
|
106
113
|
getLastCompile: () => e.getLastCompile(),
|
|
107
114
|
getCacheStats: () => e.getCacheStats()
|
|
108
115
|
};
|
|
109
|
-
},
|
|
116
|
+
}, zt = () => ue((e) => ({
|
|
110
117
|
lastCompile: null,
|
|
111
118
|
history: [],
|
|
112
119
|
nextId: 1,
|
|
@@ -115,20 +122,20 @@ var kt = class extends Rt {
|
|
|
115
122
|
if (n.lastSnapshot === r) return n;
|
|
116
123
|
const s = {
|
|
117
124
|
id: n.nextId,
|
|
118
|
-
label:
|
|
125
|
+
label: Yt(t),
|
|
119
126
|
stages: r.stages,
|
|
120
127
|
stageDurationsMs: r.stageDurationsMs,
|
|
121
128
|
durationMs: r.durationMs
|
|
122
129
|
};
|
|
123
130
|
return {
|
|
124
131
|
lastCompile: s,
|
|
125
|
-
history:
|
|
132
|
+
history: jt(n.history, s, Ut),
|
|
126
133
|
nextId: n.nextId + 1,
|
|
127
134
|
lastSnapshot: r
|
|
128
135
|
};
|
|
129
136
|
})
|
|
130
|
-
})),
|
|
131
|
-
},
|
|
137
|
+
})), Vt = () => {
|
|
138
|
+
}, Yt = (e) => {
|
|
132
139
|
switch (e.kind) {
|
|
133
140
|
case "init":
|
|
134
141
|
return "init";
|
|
@@ -139,14 +146,14 @@ var kt = class extends Rt {
|
|
|
139
146
|
case "command":
|
|
140
147
|
return e.command.metadata.description;
|
|
141
148
|
}
|
|
142
|
-
},
|
|
149
|
+
}, jt = (e, t, r) => {
|
|
143
150
|
const n = e.length >= r ? e.length - (r - 1) : 0;
|
|
144
151
|
return [...e.slice(n), t];
|
|
145
152
|
};
|
|
146
|
-
function
|
|
147
|
-
const t = e.filter(
|
|
153
|
+
function Te(e) {
|
|
154
|
+
const t = e.filter(_e), r = /* @__PURE__ */ new Set([...Object.keys(Be), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
|
|
148
155
|
for (const l of e) {
|
|
149
|
-
const d =
|
|
156
|
+
const d = qe(l);
|
|
150
157
|
d === null || r.has(d.type) || s.has(d.type) || (s.add(d.type), n.push({
|
|
151
158
|
kind: "userInput",
|
|
152
159
|
severity: "error",
|
|
@@ -159,70 +166,70 @@ function be(e) {
|
|
|
159
166
|
suggestion: `Add a render half for it: \`defineGeomRenderer(${d.type}Geom, { coord, render })\`, then include it in \`plugins\`.`
|
|
160
167
|
}));
|
|
161
168
|
}
|
|
162
|
-
const
|
|
169
|
+
const a = /* @__PURE__ */ new Map();
|
|
163
170
|
for (const l of t) {
|
|
164
171
|
if ("definition" in l) continue;
|
|
165
|
-
const d = `${l.geom}|${l.coord}`,
|
|
166
|
-
|
|
172
|
+
const d = `${l.geom}|${l.coord}`, g = a.get(d);
|
|
173
|
+
g ? g.count += 1 : a.set(d, {
|
|
167
174
|
geom: l.geom,
|
|
168
175
|
coord: l.coord,
|
|
169
176
|
count: 1
|
|
170
177
|
});
|
|
171
178
|
}
|
|
172
|
-
const
|
|
173
|
-
for (const { geom: l, coord: d, count:
|
|
174
|
-
|
|
179
|
+
const i = [];
|
|
180
|
+
for (const { geom: l, coord: d, count: g } of a.values())
|
|
181
|
+
g < 2 || i.push({
|
|
175
182
|
kind: "userInput",
|
|
176
183
|
severity: "warning",
|
|
177
184
|
code: "DUPLICATE_REGISTERED_TYPE",
|
|
178
|
-
message: `Multiple render-only overrides register ('${l}', '${d}') (${
|
|
185
|
+
message: `Multiple render-only overrides register ('${l}', '${d}') (${g} entries); the last in the array wins.`,
|
|
179
186
|
context: {
|
|
180
187
|
requested: `${l}@${d}`,
|
|
181
188
|
kind: "geom-renderer"
|
|
182
189
|
},
|
|
183
190
|
suggestion: `Keep a single render-only override for ('${l}', '${d}').`
|
|
184
191
|
});
|
|
185
|
-
return
|
|
192
|
+
return i.push(...sr(e)), {
|
|
186
193
|
errors: n,
|
|
187
|
-
warnings:
|
|
194
|
+
warnings: i
|
|
188
195
|
};
|
|
189
196
|
}
|
|
190
|
-
function
|
|
191
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
192
|
-
for (const
|
|
193
|
-
t(
|
|
197
|
+
function Qt(e, t) {
|
|
198
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), a = [];
|
|
199
|
+
for (const i of n)
|
|
200
|
+
t(i.geom, r.type) !== null || s.has(i.geom) || (s.add(i.geom), a.push({
|
|
194
201
|
kind: "userInput",
|
|
195
202
|
severity: "warning",
|
|
196
203
|
code: "MISSING_GEOM_RENDERER",
|
|
197
|
-
message: `No renderer for geom '${
|
|
204
|
+
message: `No renderer for geom '${i.geom}' under ${r.type} coords; the layer is not painted.`,
|
|
198
205
|
context: {
|
|
199
|
-
requested:
|
|
206
|
+
requested: i.geom,
|
|
200
207
|
kind: "geom-renderer"
|
|
201
208
|
},
|
|
202
|
-
suggestion: `Register a renderer for ('${
|
|
209
|
+
suggestion: `Register a renderer for ('${i.geom}', '${r.type}') via \`defineGeomRenderer\`.`
|
|
203
210
|
}));
|
|
204
|
-
return
|
|
211
|
+
return a;
|
|
205
212
|
}
|
|
206
|
-
function
|
|
207
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
208
|
-
for (const
|
|
209
|
-
if (
|
|
210
|
-
const l = t(
|
|
211
|
-
l === null || l.hitTest ||
|
|
213
|
+
function Xt(e, t) {
|
|
214
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), a = [];
|
|
215
|
+
for (const i of n) {
|
|
216
|
+
if (i.interactive === !1 || i.spatialKind !== "renderHitTest" || s.has(i.geom)) continue;
|
|
217
|
+
const l = t(i.geom, r.type);
|
|
218
|
+
l === null || l.hitTest || re(l) || (s.add(i.geom), a.push({
|
|
212
219
|
kind: "userInput",
|
|
213
220
|
severity: "warning",
|
|
214
221
|
code: "MISSING_RENDER_HIT_TEST",
|
|
215
|
-
message: `Geom '${
|
|
222
|
+
message: `Geom '${i.geom}' declares spatialKind 'renderHitTest' but its renderer provides no hit-test; the layer has no hover.`,
|
|
216
223
|
context: {
|
|
217
|
-
requested:
|
|
224
|
+
requested: i.geom,
|
|
218
225
|
kind: "geom-renderer"
|
|
219
226
|
},
|
|
220
|
-
suggestion: `Add a \`hitTest\` factory (precomputed geometry) or a live render (\`{ fn, options: { live: true } }\`, live simulation) to the renderer for ('${
|
|
227
|
+
suggestion: `Add a \`hitTest\` factory (precomputed geometry) or a live render (\`{ fn, options: { live: true } }\`, live simulation) to the renderer for ('${i.geom}', '${r.type}').`
|
|
221
228
|
}));
|
|
222
229
|
}
|
|
223
|
-
return
|
|
230
|
+
return a;
|
|
224
231
|
}
|
|
225
|
-
function
|
|
232
|
+
function Jt(e) {
|
|
226
233
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
227
234
|
for (const n of e.layers) {
|
|
228
235
|
const s = n.identityKey;
|
|
@@ -240,26 +247,26 @@ function Vt(e) {
|
|
|
240
247
|
}
|
|
241
248
|
return r;
|
|
242
249
|
}
|
|
243
|
-
function
|
|
244
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
245
|
-
for (const
|
|
246
|
-
if (
|
|
247
|
-
const l = t(
|
|
248
|
-
l === null || !l.hitTest || !
|
|
250
|
+
function Zt(e, t) {
|
|
251
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), a = [];
|
|
252
|
+
for (const i of n) {
|
|
253
|
+
if (i.interactive === !1 || i.spatialKind !== "renderHitTest" || s.has(i.geom)) continue;
|
|
254
|
+
const l = t(i.geom, r.type);
|
|
255
|
+
l === null || !l.hitTest || !re(l) || (s.add(i.geom), a.push({
|
|
249
256
|
kind: "userInput",
|
|
250
257
|
severity: "warning",
|
|
251
258
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
252
|
-
message: `Geom '${
|
|
259
|
+
message: `Geom '${i.geom}' declares both a \`hitTest\` factory and a live render; these are alternatives, so only the live render is used.`,
|
|
253
260
|
context: {
|
|
254
|
-
requested:
|
|
261
|
+
requested: i.geom,
|
|
255
262
|
kind: "geom-renderer"
|
|
256
263
|
},
|
|
257
264
|
suggestion: "Keep one: a `hitTest` factory for precomputed geometry, OR a live render (`{ fn, options: { live: true } }`) for a live simulation."
|
|
258
265
|
}));
|
|
259
266
|
}
|
|
260
|
-
return
|
|
267
|
+
return a;
|
|
261
268
|
}
|
|
262
|
-
function
|
|
269
|
+
function er(e, t) {
|
|
263
270
|
const r = /* @__PURE__ */ new Set(), n = [];
|
|
264
271
|
for (const s of e.layers)
|
|
265
272
|
s.interactive !== !1 && (s.spatialKind !== "renderHitTest" || r.has(s.geom) || t.hasCapability(s.geom) || (r.add(s.geom), n.push({
|
|
@@ -275,28 +282,28 @@ function jt(e, t) {
|
|
|
275
282
|
})));
|
|
276
283
|
return n;
|
|
277
284
|
}
|
|
278
|
-
function
|
|
279
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
280
|
-
for (const
|
|
281
|
-
if (
|
|
282
|
-
const l = t(
|
|
283
|
-
l === null || !
|
|
285
|
+
function tr(e, t) {
|
|
286
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), a = [];
|
|
287
|
+
for (const i of n) {
|
|
288
|
+
if (i.interactive === !1 || i.spatialKind === "renderHitTest" || s.has(i.geom)) continue;
|
|
289
|
+
const l = t(i.geom, r.type);
|
|
290
|
+
l === null || !re(l) || (s.add(i.geom), a.push({
|
|
284
291
|
kind: "userInput",
|
|
285
292
|
severity: "warning",
|
|
286
293
|
code: "LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",
|
|
287
|
-
message: `Geom '${
|
|
294
|
+
message: `Geom '${i.geom}' declares a live render but its layer's spatialKind is '${i.spatialKind}', not 'renderHitTest'; its push-path hover resolves to nothing.`,
|
|
288
295
|
context: {
|
|
289
|
-
requested:
|
|
296
|
+
requested: i.geom,
|
|
290
297
|
kind: "geom-renderer"
|
|
291
298
|
},
|
|
292
299
|
suggestion: "Have the geom's manifest yield spatialKind 'renderHitTest' so the scene layer carries the `byKey` index the live render's `pushHover` resolves against."
|
|
293
300
|
}));
|
|
294
301
|
}
|
|
295
|
-
return
|
|
302
|
+
return a;
|
|
296
303
|
}
|
|
297
|
-
function
|
|
304
|
+
function rr(e, t) {
|
|
298
305
|
let r;
|
|
299
|
-
return e.layers.flatMap((n, s) =>
|
|
306
|
+
return e.layers.flatMap((n, s) => re(t(n.geom, e.coordSystem.type)) ? nr(n) ? (r ??= De().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
|
|
300
307
|
kind: "userInput",
|
|
301
308
|
severity: "warning",
|
|
302
309
|
code: "INVALID_STYLE_RULE",
|
|
@@ -309,11 +316,11 @@ function Qt(e, t) {
|
|
|
309
316
|
suggestion: "Remove the hovered overpaint, or paint the hover treatment in the geom's live render."
|
|
310
317
|
}]) : [] : []);
|
|
311
318
|
}
|
|
312
|
-
var
|
|
313
|
-
function
|
|
319
|
+
var nr = (e) => [e.styles.defaults, e.styles.overrides].some((t) => t.some((r) => r.state === "hovered" && (r.declarations.overpaint?.length ?? 0) > 0));
|
|
320
|
+
function sr(e) {
|
|
314
321
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
315
322
|
for (const n of e) {
|
|
316
|
-
const s =
|
|
323
|
+
const s = qe(n);
|
|
317
324
|
s === null || t.has(s.type) || s.dataLabelCoordTypes.length === 0 || s.getDataLabelPlacements !== void 0 || (t.add(s.type), r.push({
|
|
318
325
|
kind: "userInput",
|
|
319
326
|
severity: "warning",
|
|
@@ -328,140 +335,143 @@ function Zt(e) {
|
|
|
328
335
|
}
|
|
329
336
|
return r;
|
|
330
337
|
}
|
|
331
|
-
var
|
|
338
|
+
var or = (e) => ue((t) => ({
|
|
332
339
|
scene: e,
|
|
333
340
|
setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
|
|
334
|
-
})),
|
|
335
|
-
const
|
|
336
|
-
P.current?.(
|
|
337
|
-
})), [{ session:
|
|
338
|
-
const
|
|
339
|
-
plugins:
|
|
340
|
-
theme:
|
|
341
|
+
})), ir = ({ spec: e, data: t, colorScheme: r, hiddenGroups: n, plugins: s, theme: a, resolveRenderer: i, anchorResolver: l, onSpecChange: d, onError: g, onWarnings: S }) => {
|
|
342
|
+
const T = se(d), I = se(g), P = se(S), [h] = v(() => He(ae, (o) => {
|
|
343
|
+
P.current?.(o);
|
|
344
|
+
})), [{ session: m, compileBus: p, findGeom: V }] = v(() => {
|
|
345
|
+
const o = pt({
|
|
346
|
+
plugins: s,
|
|
347
|
+
theme: a
|
|
341
348
|
});
|
|
342
349
|
return {
|
|
343
|
-
session: new
|
|
344
|
-
compileBus:
|
|
345
|
-
findGeom: (
|
|
350
|
+
session: new dt(o),
|
|
351
|
+
compileBus: Wt(o),
|
|
352
|
+
findGeom: (u) => o.findGeom(u)
|
|
346
353
|
};
|
|
347
|
-
}), [
|
|
348
|
-
const
|
|
354
|
+
}), [w] = v(() => {
|
|
355
|
+
const o = Te(s ?? []), u = Te(a?.plugins ?? []);
|
|
349
356
|
return {
|
|
350
|
-
errors: [...
|
|
351
|
-
warnings: [...
|
|
357
|
+
errors: [...u.errors, ...o.errors],
|
|
358
|
+
warnings: [...u.warnings, ...o.warnings]
|
|
352
359
|
};
|
|
353
|
-
}),
|
|
354
|
-
if (!
|
|
355
|
-
if (
|
|
360
|
+
}), k = ve(null), [b] = v(ar), G = ve(null), L = f((o) => w.errors.length === 0 ? o : [...w.errors, ...o ?? []], [w]), $ = f((o) => {
|
|
361
|
+
if (!o.ok) return o.errors;
|
|
362
|
+
if (G.current) G.current.getState().setScene(o.scene);
|
|
356
363
|
else {
|
|
357
|
-
const
|
|
358
|
-
|
|
364
|
+
const u = or(o.scene);
|
|
365
|
+
u.subscribe(b.notify), G.current = u, b.notify();
|
|
359
366
|
}
|
|
360
367
|
return null;
|
|
361
|
-
}, [
|
|
362
|
-
const
|
|
368
|
+
}, [b]), [E, A] = v(() => {
|
|
369
|
+
const o = m.compile({
|
|
363
370
|
spec: e,
|
|
364
371
|
data: t,
|
|
365
|
-
colorScheme: r
|
|
372
|
+
colorScheme: r,
|
|
373
|
+
hiddenGroups: n
|
|
366
374
|
});
|
|
367
|
-
return
|
|
368
|
-
}),
|
|
369
|
-
...
|
|
370
|
-
...
|
|
371
|
-
...
|
|
372
|
-
...
|
|
373
|
-
...
|
|
374
|
-
...
|
|
375
|
-
...
|
|
376
|
-
...
|
|
377
|
-
] :
|
|
378
|
-
|
|
379
|
-
}, [
|
|
380
|
-
|
|
381
|
-
const
|
|
382
|
-
|
|
375
|
+
return k.current = o, L($(o));
|
|
376
|
+
}), N = f((o) => o.ok ? [
|
|
377
|
+
...o.warnings,
|
|
378
|
+
...Qt(o.scene, i),
|
|
379
|
+
...Xt(o.scene, i),
|
|
380
|
+
...Jt(o.scene),
|
|
381
|
+
...Zt(o.scene, i),
|
|
382
|
+
...tr(o.scene, i),
|
|
383
|
+
...rr(o.scene, i),
|
|
384
|
+
...er(o.scene, l)
|
|
385
|
+
] : o.warnings, [i, l]), C = f((o) => {
|
|
386
|
+
o.length !== 0 && (ae(o), I.current?.(o));
|
|
387
|
+
}, [I]);
|
|
388
|
+
q(() => {
|
|
389
|
+
const o = k.current;
|
|
390
|
+
o && (C([...w.errors, ...o.ok ? [] : o.errors]), h(oe, [...w.warnings, ...N(o)]), o.ok && p.emit({ kind: "init" }));
|
|
383
391
|
}, [
|
|
384
|
-
|
|
392
|
+
p,
|
|
393
|
+
C,
|
|
394
|
+
h,
|
|
385
395
|
w,
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
]), D(() => {
|
|
390
|
-
const i = u.update({
|
|
396
|
+
N
|
|
397
|
+
]), q(() => {
|
|
398
|
+
const o = m.update({
|
|
391
399
|
spec: e,
|
|
392
400
|
data: t,
|
|
393
|
-
colorScheme: r
|
|
401
|
+
colorScheme: r,
|
|
402
|
+
hiddenGroups: n
|
|
394
403
|
});
|
|
395
|
-
if (!
|
|
396
|
-
|
|
397
|
-
const
|
|
398
|
-
|
|
404
|
+
if (!o) return;
|
|
405
|
+
o.committedSpec && T.current?.(o.committedSpec);
|
|
406
|
+
const u = $(o.result);
|
|
407
|
+
A(L(u)), u && C(u), h(oe, N(o.result)), u || p.emit({ kind: o.hasSpecChange ? "spec" : "data" });
|
|
399
408
|
}, [
|
|
400
409
|
e,
|
|
401
410
|
t,
|
|
402
411
|
r,
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
412
|
+
n,
|
|
413
|
+
m,
|
|
414
|
+
p,
|
|
415
|
+
$,
|
|
416
|
+
C,
|
|
417
|
+
h,
|
|
418
|
+
L,
|
|
419
|
+
N,
|
|
420
|
+
T
|
|
411
421
|
]);
|
|
412
|
-
const
|
|
413
|
-
|
|
422
|
+
const O = f((o) => {
|
|
423
|
+
A((u) => u === null ? u : L(null)), h(oe, N(o));
|
|
414
424
|
}, [
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
]),
|
|
419
|
-
|
|
425
|
+
L,
|
|
426
|
+
h,
|
|
427
|
+
N
|
|
428
|
+
]), D = f((o) => {
|
|
429
|
+
o.scene && G.current?.getState().setScene(o.scene), o.result && O(o.result), o.command && p.emit({
|
|
420
430
|
kind: "command",
|
|
421
|
-
command:
|
|
422
|
-
}),
|
|
431
|
+
command: o.command
|
|
432
|
+
}), o.spec && T.current?.(o.spec), o.errors && C([...o.errors]);
|
|
423
433
|
}, [
|
|
424
|
-
|
|
425
|
-
g,
|
|
434
|
+
O,
|
|
426
435
|
p,
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
436
|
+
T,
|
|
437
|
+
C
|
|
438
|
+
]), R = f((o) => {
|
|
439
|
+
for (const u of o) D(u);
|
|
440
|
+
return o.some((u) => !!u.scene);
|
|
441
|
+
}, [D]), Y = f((o, u) => {
|
|
442
|
+
R(m.applyCommand(o, u));
|
|
443
|
+
}, [m, R]), j = f(() => {
|
|
444
|
+
R(m.commit());
|
|
445
|
+
}, [m, R]), Q = f(() => R(m.undo()), [m, R]), B = f(() => R(m.redo()), [m, R]), K = f((o) => {
|
|
446
|
+
const u = m.preview(o).find((_) => _.scene)?.scene;
|
|
447
|
+
return u ? (G.current?.getState().setScene(u), !0) : !1;
|
|
448
|
+
}, [m]), H = f(() => {
|
|
449
|
+
const o = m.scene;
|
|
450
|
+
o && G.current?.getState().setScene(o);
|
|
451
|
+
}, [m]), x = M(() => ({
|
|
452
|
+
stack: m.history,
|
|
453
|
+
undo: Q,
|
|
454
|
+
redo: B
|
|
445
455
|
}), [
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
]),
|
|
456
|
+
m,
|
|
457
|
+
Q,
|
|
458
|
+
B
|
|
459
|
+
]), X = f(() => G.current?.getState().scene ?? null, []);
|
|
450
460
|
return {
|
|
451
|
-
store:
|
|
452
|
-
dispatch:
|
|
453
|
-
commit:
|
|
454
|
-
paintPreview:
|
|
455
|
-
clearPreview:
|
|
456
|
-
history:
|
|
457
|
-
subscribe:
|
|
458
|
-
getScene:
|
|
459
|
-
compileBus:
|
|
460
|
-
compileErrors:
|
|
461
|
-
findGeom:
|
|
462
|
-
reportWarningSource:
|
|
461
|
+
store: G.current,
|
|
462
|
+
dispatch: Y,
|
|
463
|
+
commit: j,
|
|
464
|
+
paintPreview: K,
|
|
465
|
+
clearPreview: H,
|
|
466
|
+
history: x,
|
|
467
|
+
subscribe: b.subscribe,
|
|
468
|
+
getScene: X,
|
|
469
|
+
compileBus: p,
|
|
470
|
+
compileErrors: E,
|
|
471
|
+
findGeom: V,
|
|
472
|
+
reportWarningSource: h
|
|
463
473
|
};
|
|
464
|
-
},
|
|
474
|
+
}, ar = () => {
|
|
465
475
|
const e = /* @__PURE__ */ new Set();
|
|
466
476
|
return {
|
|
467
477
|
subscribe: (t) => (e.add(t), () => {
|
|
@@ -469,180 +479,199 @@ var er = (e) => le((t) => ({
|
|
|
469
479
|
}),
|
|
470
480
|
notify: () => e.forEach((t) => t())
|
|
471
481
|
};
|
|
472
|
-
},
|
|
473
|
-
const
|
|
474
|
-
|
|
475
|
-
|
|
482
|
+
}, cr = ["cartesian", "polar"], lr = ({ mode: e = ot.readonly, ...t }) => {
|
|
483
|
+
const r = ze(e);
|
|
484
|
+
return /* @__PURE__ */ c(rt, {
|
|
485
|
+
mode: r,
|
|
486
|
+
children: /* @__PURE__ */ c(dr, {
|
|
487
|
+
...t,
|
|
488
|
+
mode: r
|
|
489
|
+
})
|
|
490
|
+
});
|
|
491
|
+
}, dr = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: a, handleRef: i, onSpecChange: l, onError: d, onWarnings: g, colorScheme: S = "light", mode: T, children: I }) => {
|
|
492
|
+
const [P] = v(() => n), [h] = v(() => nt(n?.glyphs, s)), m = P?.colorScheme ?? S, [p] = v(() => Je([...P?.plugins ?? [], ...r].filter(_e)));
|
|
493
|
+
mr(p, h);
|
|
494
|
+
const V = Nt(), [w] = v(() => gt(r)), [k] = v(() => ft(r)), [b] = v(() => Kt()), [G] = v(() => Ke()), L = M(() => De({ colorScheme: m }), [m]), $ = Ue(), { store: E, dispatch: A, commit: N, paintPreview: C, clearPreview: O, history: D, subscribe: R, getScene: Y, compileBus: j, compileErrors: Q, findGeom: B, reportWarningSource: K } = ir({
|
|
476
495
|
spec: t,
|
|
477
496
|
data: e,
|
|
478
|
-
colorScheme:
|
|
497
|
+
colorScheme: m,
|
|
498
|
+
hiddenGroups: Xe(),
|
|
479
499
|
plugins: r,
|
|
480
|
-
theme:
|
|
481
|
-
resolveRenderer:
|
|
482
|
-
anchorResolver:
|
|
500
|
+
theme: P,
|
|
501
|
+
resolveRenderer: p,
|
|
502
|
+
anchorResolver: w,
|
|
483
503
|
onSpecChange: l,
|
|
484
504
|
onError: d,
|
|
485
|
-
onWarnings:
|
|
486
|
-
}),
|
|
487
|
-
|
|
488
|
-
if (
|
|
489
|
-
return
|
|
490
|
-
if (
|
|
491
|
-
const { selection:
|
|
492
|
-
|
|
505
|
+
onWarnings: g
|
|
506
|
+
}), H = hr(a, K);
|
|
507
|
+
q(() => {
|
|
508
|
+
if (E)
|
|
509
|
+
return E.subscribe((o, u) => {
|
|
510
|
+
if (o.scene.spec === u.scene.spec) return;
|
|
511
|
+
const { selection: _, setSelection: ne } = b.getState();
|
|
512
|
+
_.length !== 0 && ne(Ot(_, o.scene.spec));
|
|
493
513
|
});
|
|
494
|
-
}, [
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
514
|
+
}, [E, b]), q(() => {
|
|
515
|
+
if (!E) return;
|
|
516
|
+
const o = (u) => {
|
|
517
|
+
const { hiddenGroupKeys: _, keepHidden: ne } = $.getState();
|
|
518
|
+
_.size > 0 && ne(At(u));
|
|
519
|
+
};
|
|
520
|
+
return E.subscribe((u, _) => {
|
|
521
|
+
u.scene.guides.legends !== _.scene.guides.legends && o(u.scene.guides.legends);
|
|
522
|
+
});
|
|
523
|
+
}, [E, $]);
|
|
524
|
+
const x = M(() => ({
|
|
525
|
+
dispatch: A,
|
|
526
|
+
commit: N,
|
|
527
|
+
paintPreview: C,
|
|
528
|
+
clearPreview: O
|
|
500
529
|
}), [
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
530
|
+
A,
|
|
531
|
+
N,
|
|
532
|
+
C,
|
|
533
|
+
O
|
|
505
534
|
]);
|
|
506
|
-
|
|
507
|
-
commands:
|
|
508
|
-
undo:
|
|
509
|
-
redo:
|
|
510
|
-
subscribe:
|
|
511
|
-
getScene:
|
|
512
|
-
formattingLocale:
|
|
513
|
-
getSelection: () =>
|
|
514
|
-
setSelection: (
|
|
515
|
-
subscribeSelection:
|
|
516
|
-
canPlaceDataLabels:
|
|
517
|
-
canFormatDataLabelsAsPercentages:
|
|
518
|
-
getGlyphs: () =>
|
|
519
|
-
getPointSymbols: (
|
|
535
|
+
Ct(i, () => ({
|
|
536
|
+
commands: x,
|
|
537
|
+
undo: D.undo,
|
|
538
|
+
redo: D.redo,
|
|
539
|
+
subscribe: R,
|
|
540
|
+
getScene: Y,
|
|
541
|
+
formattingLocale: H,
|
|
542
|
+
getSelection: () => b.getState().selection,
|
|
543
|
+
setSelection: (o) => b.getState().setSelection(o),
|
|
544
|
+
subscribeSelection: b.subscribe,
|
|
545
|
+
canPlaceDataLabels: k.hasCapability,
|
|
546
|
+
canFormatDataLabelsAsPercentages: k.hasPercentageFormat,
|
|
547
|
+
getGlyphs: () => h,
|
|
548
|
+
getPointSymbols: (o) => p("point", o)?.symbols
|
|
520
549
|
}), [
|
|
521
|
-
|
|
550
|
+
x,
|
|
551
|
+
D,
|
|
552
|
+
R,
|
|
553
|
+
Y,
|
|
554
|
+
H,
|
|
522
555
|
b,
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
S,
|
|
527
|
-
T,
|
|
528
|
-
g,
|
|
529
|
-
E
|
|
556
|
+
k,
|
|
557
|
+
h,
|
|
558
|
+
p
|
|
530
559
|
]);
|
|
531
|
-
const
|
|
532
|
-
chartId:
|
|
533
|
-
store:
|
|
534
|
-
selectionStore:
|
|
535
|
-
targetBoundaryStore:
|
|
536
|
-
commands:
|
|
537
|
-
history:
|
|
538
|
-
formattingLocale:
|
|
539
|
-
compileBus:
|
|
540
|
-
colorScheme:
|
|
541
|
-
mode:
|
|
542
|
-
styleResolver:
|
|
543
|
-
anchorResolver:
|
|
544
|
-
findGeom:
|
|
545
|
-
reportLayoutWarnings:
|
|
560
|
+
const X = M(() => E ? {
|
|
561
|
+
chartId: V,
|
|
562
|
+
store: E,
|
|
563
|
+
selectionStore: b,
|
|
564
|
+
targetBoundaryStore: G,
|
|
565
|
+
commands: x,
|
|
566
|
+
history: D,
|
|
567
|
+
formattingLocale: H,
|
|
568
|
+
compileBus: j,
|
|
569
|
+
colorScheme: m,
|
|
570
|
+
mode: T,
|
|
571
|
+
styleResolver: L,
|
|
572
|
+
anchorResolver: w,
|
|
573
|
+
findGeom: B,
|
|
574
|
+
reportLayoutWarnings: K
|
|
546
575
|
} : null, [
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
S,
|
|
550
|
-
_,
|
|
551
|
-
k,
|
|
576
|
+
V,
|
|
577
|
+
E,
|
|
552
578
|
b,
|
|
553
|
-
q,
|
|
554
|
-
A,
|
|
555
579
|
G,
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
580
|
+
x,
|
|
581
|
+
D,
|
|
582
|
+
H,
|
|
559
583
|
j,
|
|
560
|
-
|
|
584
|
+
m,
|
|
585
|
+
T,
|
|
586
|
+
L,
|
|
587
|
+
w,
|
|
588
|
+
B,
|
|
589
|
+
K
|
|
561
590
|
]);
|
|
562
|
-
return /* @__PURE__ */ c(
|
|
563
|
-
forcedErrors:
|
|
591
|
+
return /* @__PURE__ */ c(Mt, {
|
|
592
|
+
forcedErrors: Q,
|
|
564
593
|
onError: d,
|
|
565
594
|
resetKeys: [t, e],
|
|
566
|
-
children:
|
|
567
|
-
value:
|
|
568
|
-
children: /* @__PURE__ */ c(
|
|
569
|
-
value:
|
|
570
|
-
children: /* @__PURE__ */ c(
|
|
571
|
-
value:
|
|
572
|
-
children: /* @__PURE__ */ c(
|
|
573
|
-
shapes:
|
|
574
|
-
children: /* @__PURE__ */ c(
|
|
575
|
-
glyphs:
|
|
576
|
-
children:
|
|
595
|
+
children: X ? /* @__PURE__ */ c($e.Provider, {
|
|
596
|
+
value: X,
|
|
597
|
+
children: /* @__PURE__ */ c(it, {
|
|
598
|
+
value: p,
|
|
599
|
+
children: /* @__PURE__ */ c(Ae, {
|
|
600
|
+
value: k,
|
|
601
|
+
children: /* @__PURE__ */ c(z, {
|
|
602
|
+
shapes: P?.shapes,
|
|
603
|
+
children: /* @__PURE__ */ c(Fe, {
|
|
604
|
+
glyphs: h,
|
|
605
|
+
children: I
|
|
577
606
|
})
|
|
578
607
|
})
|
|
579
608
|
})
|
|
580
609
|
})
|
|
581
610
|
}) : null
|
|
582
611
|
});
|
|
583
|
-
},
|
|
584
|
-
|
|
585
|
-
if (!
|
|
612
|
+
}, ur = (e, t) => (e ?? []).filter((r) => !de(r) && !t.has(r)), mr = (e, t) => {
|
|
613
|
+
q(() => {
|
|
614
|
+
if (!Le) return;
|
|
586
615
|
const r = new Set(t.map(({ name: n }) => n));
|
|
587
|
-
for (const n of
|
|
616
|
+
for (const n of cr) for (const s of ur(e("point", n)?.symbols, r)) console.warn(`[graphy] The ${n} point renderer lists "${s}", but no glyph has that name. The shape menu offers it, and SymbolFigure draws the first listed symbol in its place.`);
|
|
588
617
|
}, [e, t]);
|
|
589
|
-
},
|
|
590
|
-
if (e === void 0 ||
|
|
591
|
-
t(
|
|
618
|
+
}, hr = (e, t) => (q(() => {
|
|
619
|
+
if (e === void 0 || St(e) !== void 0) {
|
|
620
|
+
t(he, []);
|
|
592
621
|
return;
|
|
593
622
|
}
|
|
594
|
-
t(
|
|
623
|
+
t(he, [{
|
|
595
624
|
severity: "warning",
|
|
596
625
|
kind: "userInput",
|
|
597
626
|
code: "INVALID_FORMATTING_LOCALE",
|
|
598
|
-
message: `formattingLocale '${e}' is not a tag Intl can format in, so the chart formats in ${
|
|
627
|
+
message: `formattingLocale '${e}' is not a tag Intl can format in, so the chart formats in ${ct}.`
|
|
599
628
|
}]);
|
|
600
|
-
}, [e, t]), e === void 0 ? void 0 :
|
|
601
|
-
function
|
|
602
|
-
const n =
|
|
629
|
+
}, [e, t]), e === void 0 ? void 0 : ht(e));
|
|
630
|
+
function Yn({ theme: e, glyphs: t, ...r } = {}) {
|
|
631
|
+
const n = vt(r);
|
|
603
632
|
return {
|
|
604
633
|
...n,
|
|
605
|
-
GraphProvider: (
|
|
606
|
-
...
|
|
634
|
+
GraphProvider: (a) => /* @__PURE__ */ c(lr, {
|
|
635
|
+
...a,
|
|
607
636
|
plugins: n.plugins,
|
|
608
637
|
theme: e,
|
|
609
638
|
glyphs: t
|
|
610
639
|
})
|
|
611
640
|
};
|
|
612
641
|
}
|
|
613
|
-
var
|
|
642
|
+
var U = (e, t) => {
|
|
614
643
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
615
644
|
if (!e.endsWith("%")) return null;
|
|
616
645
|
const r = Number.parseFloat(e);
|
|
617
646
|
return Number.isFinite(r) ? r / 100 * t : null;
|
|
618
|
-
},
|
|
619
|
-
const
|
|
620
|
-
return
|
|
621
|
-
x:
|
|
622
|
-
y:
|
|
647
|
+
}, jn = ({ x: e, y: t, width: r, height: n }, s) => {
|
|
648
|
+
const a = U(e, s.width), i = U(t, s.height), l = U(r, s.width), d = U(n, s.height);
|
|
649
|
+
return a === null || i === null || l === null || d === null ? null : {
|
|
650
|
+
x: a,
|
|
651
|
+
y: i,
|
|
623
652
|
width: l,
|
|
624
653
|
height: d
|
|
625
654
|
};
|
|
626
|
-
},
|
|
627
|
-
const
|
|
628
|
-
return e ? /* @__PURE__ */ c(
|
|
655
|
+
}, gr = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...a }) => {
|
|
656
|
+
const i = W(s);
|
|
657
|
+
return e ? /* @__PURE__ */ c(We, {
|
|
629
658
|
animate: {
|
|
630
659
|
cx: t,
|
|
631
660
|
cy: r,
|
|
632
661
|
r: n
|
|
633
662
|
},
|
|
634
|
-
style:
|
|
635
|
-
...
|
|
663
|
+
style: i,
|
|
664
|
+
...a
|
|
636
665
|
}) : /* @__PURE__ */ c("circle", {
|
|
637
666
|
cx: t,
|
|
638
667
|
cy: r,
|
|
639
668
|
r: n,
|
|
640
|
-
style:
|
|
641
|
-
...
|
|
669
|
+
style: i,
|
|
670
|
+
...a
|
|
642
671
|
});
|
|
643
|
-
},
|
|
644
|
-
const l =
|
|
645
|
-
return e ? /* @__PURE__ */ c(
|
|
672
|
+
}, pr = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: a, ...i }) => {
|
|
673
|
+
const l = W(a);
|
|
674
|
+
return e ? /* @__PURE__ */ c(Ve, {
|
|
646
675
|
animate: {
|
|
647
676
|
x1: t,
|
|
648
677
|
y1: r,
|
|
@@ -650,66 +679,66 @@ var F = (e, t) => {
|
|
|
650
679
|
y2: s
|
|
651
680
|
},
|
|
652
681
|
style: l,
|
|
653
|
-
...
|
|
682
|
+
...i
|
|
654
683
|
}) : /* @__PURE__ */ c("line", {
|
|
655
684
|
x1: t,
|
|
656
685
|
y1: r,
|
|
657
686
|
x2: n,
|
|
658
687
|
y2: s,
|
|
659
688
|
style: l,
|
|
660
|
-
...
|
|
689
|
+
...i
|
|
661
690
|
});
|
|
662
|
-
},
|
|
663
|
-
const
|
|
691
|
+
}, fr = ({ animateTransitions: e, x: t, y: r, width: n, height: s, rx: a, ry: i, effects: l, ...d }) => {
|
|
692
|
+
const g = W(l);
|
|
664
693
|
if (!e) return /* @__PURE__ */ c("rect", {
|
|
665
694
|
x: t,
|
|
666
695
|
y: r,
|
|
667
696
|
width: n,
|
|
668
697
|
height: s,
|
|
669
|
-
rx:
|
|
670
|
-
ry:
|
|
671
|
-
style:
|
|
698
|
+
rx: a,
|
|
699
|
+
ry: i,
|
|
700
|
+
style: g,
|
|
672
701
|
...d
|
|
673
702
|
});
|
|
674
|
-
const
|
|
703
|
+
const S = {
|
|
675
704
|
x: t,
|
|
676
705
|
y: r,
|
|
677
706
|
width: n,
|
|
678
707
|
height: s
|
|
679
708
|
};
|
|
680
|
-
return /* @__PURE__ */ c(
|
|
681
|
-
animate:
|
|
682
|
-
...
|
|
683
|
-
rx:
|
|
684
|
-
ry:
|
|
709
|
+
return /* @__PURE__ */ c(Qe, {
|
|
710
|
+
animate: a === void 0 || i === void 0 ? S : {
|
|
711
|
+
...S,
|
|
712
|
+
rx: a,
|
|
713
|
+
ry: i
|
|
685
714
|
},
|
|
686
|
-
style:
|
|
715
|
+
style: g,
|
|
687
716
|
...d
|
|
688
717
|
});
|
|
689
|
-
},
|
|
690
|
-
const
|
|
691
|
-
return e ? /* @__PURE__ */ c(
|
|
718
|
+
}, vr = ({ animateTransitions: e, d: t, source: r, effects: n, ...s }) => {
|
|
719
|
+
const a = W(n);
|
|
720
|
+
return e ? /* @__PURE__ */ c(yr, {
|
|
692
721
|
d: t,
|
|
693
722
|
source: r,
|
|
694
|
-
style:
|
|
723
|
+
style: a,
|
|
695
724
|
...s
|
|
696
725
|
}) : /* @__PURE__ */ c("path", {
|
|
697
726
|
d: t,
|
|
698
|
-
style:
|
|
727
|
+
style: a,
|
|
699
728
|
...s
|
|
700
729
|
});
|
|
701
|
-
},
|
|
702
|
-
const { Circle: t } =
|
|
730
|
+
}, Qn = (e) => {
|
|
731
|
+
const { Circle: t } = ee(), { animateTransitions: r } = te(), { symbol: n, ...s } = e, a = {
|
|
703
732
|
...s,
|
|
704
733
|
animateTransitions: r
|
|
705
734
|
};
|
|
706
735
|
return n !== void 0 && n !== "circle" ? /* @__PURE__ */ c("g", {
|
|
707
|
-
style:
|
|
736
|
+
style: W(e.effects),
|
|
708
737
|
"data-testid": e["data-testid"],
|
|
709
|
-
children: /* @__PURE__ */ c(
|
|
738
|
+
children: /* @__PURE__ */ c(tt, {
|
|
710
739
|
symbol: n,
|
|
711
|
-
cx:
|
|
712
|
-
cy:
|
|
740
|
+
cx: Ge(e.cx),
|
|
741
|
+
cy: Ge(e.cy),
|
|
713
742
|
size: e.r * 2,
|
|
714
743
|
fill: e.fill ?? "currentColor",
|
|
715
744
|
fillOpacity: e.fillOpacity,
|
|
@@ -718,87 +747,87 @@ var F = (e, t) => {
|
|
|
718
747
|
strokeOpacity: e.strokeOpacity,
|
|
719
748
|
strokeWidth: e.strokeWidth,
|
|
720
749
|
motion: r ? {
|
|
721
|
-
transition:
|
|
750
|
+
transition: Pe,
|
|
722
751
|
intro: !1,
|
|
723
752
|
fadesIn: !1
|
|
724
753
|
} : null
|
|
725
754
|
})
|
|
726
|
-
}) : t === void 0 ?
|
|
727
|
-
},
|
|
728
|
-
const { Line: t } =
|
|
755
|
+
}) : t === void 0 ? gr(a) : /* @__PURE__ */ c(z, { children: /* @__PURE__ */ c(t, { ...a }) });
|
|
756
|
+
}, Xn = (e) => {
|
|
757
|
+
const { Line: t } = ee(), { animateTransitions: r } = te(), n = {
|
|
729
758
|
...e,
|
|
730
759
|
animateTransitions: r
|
|
731
760
|
};
|
|
732
|
-
return t === void 0 ?
|
|
733
|
-
},
|
|
734
|
-
const { Rect: r } =
|
|
761
|
+
return t === void 0 ? pr(n) : /* @__PURE__ */ c(z, { children: /* @__PURE__ */ c(t, { ...n }) });
|
|
762
|
+
}, Jn = ({ cornerRadius: e, ...t }) => {
|
|
763
|
+
const { Rect: r } = ee(), n = Ce()?.size ?? null, s = Oe(), { animateTransitions: a } = te(), i = {
|
|
735
764
|
...t,
|
|
736
|
-
animateTransitions:
|
|
737
|
-
...
|
|
765
|
+
animateTransitions: a,
|
|
766
|
+
...Sr(e, t, n, s)
|
|
738
767
|
};
|
|
739
|
-
return r === void 0 ?
|
|
740
|
-
},
|
|
741
|
-
const { Path: t } =
|
|
768
|
+
return r === void 0 ? fr(i) : /* @__PURE__ */ c(z, { children: /* @__PURE__ */ c(r, { ...i }) });
|
|
769
|
+
}, Zn = (e) => {
|
|
770
|
+
const { Path: t } = ee(), { animateTransitions: r } = te(), n = {
|
|
742
771
|
...e,
|
|
743
772
|
animateTransitions: r
|
|
744
773
|
};
|
|
745
|
-
return t === void 0 ?
|
|
746
|
-
},
|
|
747
|
-
d:
|
|
774
|
+
return t === void 0 ? vr(n) : /* @__PURE__ */ c(z, { children: /* @__PURE__ */ c(t, { ...n }) });
|
|
775
|
+
}, Ge = (e) => typeof e == "number" ? `${e}px` : e, yr = ({ d: e, source: t, ...r }) => /* @__PURE__ */ c(Ze, {
|
|
776
|
+
d: xe(e, Pe, t),
|
|
748
777
|
...r
|
|
749
|
-
}),
|
|
778
|
+
}), Sr = (e, t, r, n) => {
|
|
750
779
|
if (e === void 0) return {};
|
|
751
|
-
const s =
|
|
780
|
+
const s = bt(e);
|
|
752
781
|
if (s === void 0) return {};
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
return s === "full" ? {} :
|
|
756
|
-
const
|
|
782
|
+
const a = br(t, r, n);
|
|
783
|
+
if (a === null)
|
|
784
|
+
return s === "full" ? {} : Re(fe({ cornerRadius: s }), n);
|
|
785
|
+
const i = Math.min(fe({
|
|
757
786
|
cornerRadius: s,
|
|
758
|
-
box:
|
|
759
|
-
}), Math.min(
|
|
760
|
-
return
|
|
761
|
-
},
|
|
762
|
-
const n =
|
|
787
|
+
box: a
|
|
788
|
+
}), Math.min(a.width, a.height) / 2);
|
|
789
|
+
return Re(i, n);
|
|
790
|
+
}, br = (e, t, r) => {
|
|
791
|
+
const n = Ee(e.width, t?.width, r.x), s = Ee(e.height, t?.height, r.y);
|
|
763
792
|
return n === null || s === null ? null : {
|
|
764
793
|
width: n,
|
|
765
794
|
height: s
|
|
766
795
|
};
|
|
767
|
-
},
|
|
796
|
+
}, Ee = (e, t, r) => {
|
|
768
797
|
if (typeof e == "number") return Number.isFinite(e) ? Math.abs(e) * r : null;
|
|
769
798
|
if (t === void 0) return null;
|
|
770
|
-
const n =
|
|
799
|
+
const n = U(e, t);
|
|
771
800
|
return n === null ? null : Math.abs(n);
|
|
772
|
-
},
|
|
801
|
+
}, Re = (e, t) => t.x <= 0 || t.y <= 0 ? {
|
|
773
802
|
rx: 0,
|
|
774
803
|
ry: 0
|
|
775
804
|
} : {
|
|
776
805
|
rx: e / t.x,
|
|
777
806
|
ry: e / t.y
|
|
778
|
-
},
|
|
779
|
-
const l =
|
|
807
|
+
}, es = ({ symbol: e, size: t, fill: r, fillOpacity: n, stroke: s, strokeOpacity: a, strokeWidth: i }) => {
|
|
808
|
+
const l = je(), d = Me(), g = at((I) => I.coordSystem.type), S = Tr(e, d("point", g)?.symbols ?? [], l), T = {
|
|
780
809
|
size: t,
|
|
781
810
|
fill: r,
|
|
782
811
|
fillOpacity: n,
|
|
783
812
|
stroke: s,
|
|
784
|
-
strokeOpacity:
|
|
785
|
-
strokeWidth:
|
|
813
|
+
strokeOpacity: a,
|
|
814
|
+
strokeWidth: i
|
|
786
815
|
};
|
|
787
|
-
return
|
|
788
|
-
d:
|
|
816
|
+
return de(S) ? /* @__PURE__ */ c("path", {
|
|
817
|
+
d: mt(S, t),
|
|
789
818
|
fill: r,
|
|
790
819
|
fillOpacity: n,
|
|
791
820
|
stroke: s,
|
|
792
|
-
strokeOpacity:
|
|
793
|
-
strokeWidth:
|
|
821
|
+
strokeOpacity: a,
|
|
822
|
+
strokeWidth: i,
|
|
794
823
|
strokeLinejoin: "round"
|
|
795
|
-
}) : /* @__PURE__ */ c(
|
|
796
|
-
symbol:
|
|
824
|
+
}) : /* @__PURE__ */ c(Ye, {
|
|
825
|
+
symbol: S,
|
|
797
826
|
glyphs: l,
|
|
798
|
-
...
|
|
827
|
+
...T
|
|
799
828
|
});
|
|
800
|
-
},
|
|
801
|
-
const r =
|
|
829
|
+
}, Tr = (e, t, r) => Et(e) || t.includes(e) || !de(e) && r.has(e) ? e : t[0] ?? "circle", ts = ({ children: e, ...t }) => {
|
|
830
|
+
const r = Ce()?.size ?? null;
|
|
802
831
|
return /* @__PURE__ */ c("svg", {
|
|
803
832
|
viewBox: "0 0 1 1",
|
|
804
833
|
preserveAspectRatio: "none",
|
|
@@ -806,81 +835,81 @@ var F = (e, t) => {
|
|
|
806
835
|
height: "100%",
|
|
807
836
|
pointerEvents: "none",
|
|
808
837
|
...t,
|
|
809
|
-
children: /* @__PURE__ */ c(
|
|
838
|
+
children: /* @__PURE__ */ c(Ne, {
|
|
810
839
|
size: r,
|
|
811
840
|
space: "unit",
|
|
812
841
|
children: e
|
|
813
842
|
})
|
|
814
843
|
});
|
|
815
|
-
},
|
|
816
|
-
const r =
|
|
844
|
+
}, rs = ({ box: e, children: t }) => {
|
|
845
|
+
const r = et(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), a = M(() => n === null || s === null ? null : {
|
|
817
846
|
width: n,
|
|
818
847
|
height: s
|
|
819
848
|
}, [n, s]);
|
|
820
849
|
return /* @__PURE__ */ c("svg", {
|
|
821
|
-
x:
|
|
822
|
-
y:
|
|
823
|
-
width:
|
|
824
|
-
height:
|
|
850
|
+
x: J(e.x0),
|
|
851
|
+
y: J(e.y0),
|
|
852
|
+
width: J(e.x1 - e.x0),
|
|
853
|
+
height: J(e.y1 - e.y0),
|
|
825
854
|
overflow: "hidden",
|
|
826
855
|
pointerEvents: "none",
|
|
827
|
-
children: /* @__PURE__ */ c(
|
|
828
|
-
size:
|
|
856
|
+
children: /* @__PURE__ */ c(Ne, {
|
|
857
|
+
size: a,
|
|
829
858
|
children: t
|
|
830
859
|
})
|
|
831
860
|
});
|
|
832
|
-
},
|
|
833
|
-
var
|
|
834
|
-
var
|
|
861
|
+
}, Gr = "drqe3u0", Er = "drqe3u1", Rr = "drqe3u2", wr = "drqe3u3", F = "drqe3u4", Ir = "drqe3u5", Nr = "drqe3u6", Cr = "drqe3u7", Z = "drqe3u8", Pr = "drqe3u9", Lr = "drqe3ua";
|
|
862
|
+
var Dr = "drqe3uc", _r = "drqe3ud", qr = "drqe3ue", kr = "drqe3uf";
|
|
863
|
+
var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
835
864
|
enabled: "drqe3uk drqe3uj",
|
|
836
865
|
disabled: "drqe3ul drqe3uj"
|
|
837
|
-
},
|
|
866
|
+
}, Ie = {
|
|
838
867
|
ran: "drqe3un drqe3um",
|
|
839
868
|
dim: "drqe3uo drqe3um"
|
|
840
|
-
},
|
|
869
|
+
}, ke = {
|
|
841
870
|
ran: "drqe3uq drqe3up",
|
|
842
871
|
cached: "drqe3ur drqe3up",
|
|
843
872
|
untouched: "drqe3us drqe3up"
|
|
844
|
-
},
|
|
845
|
-
const { compileBus: n } =
|
|
846
|
-
|
|
847
|
-
const { recordCompile:
|
|
848
|
-
return
|
|
873
|
+
}, ns = ({ width: e = 440, style: t, className: r } = {}) => {
|
|
874
|
+
const { compileBus: n } = ce(), [s] = v(() => zt()), [a, i] = v(!1), [l, d] = v(Gt);
|
|
875
|
+
q(() => {
|
|
876
|
+
const { recordCompile: h } = s.getState(), m = n.getLastTrigger(), p = n.getLastCompile();
|
|
877
|
+
return m && p && h(m, p), n.subscribe(h);
|
|
849
878
|
}, [s, n]);
|
|
850
|
-
const
|
|
851
|
-
d((
|
|
852
|
-
const
|
|
853
|
-
return
|
|
879
|
+
const g = ie(s, (h) => h.lastCompile), S = ie(s, (h) => h.history), T = n.getCacheStats(), I = g === null && S.length === 0, P = () => {
|
|
880
|
+
d((h) => {
|
|
881
|
+
const m = !h;
|
|
882
|
+
return wt(m), m;
|
|
854
883
|
});
|
|
855
884
|
};
|
|
856
885
|
return /* @__PURE__ */ y("div", {
|
|
857
|
-
className:
|
|
886
|
+
className: Dt(Lr, r),
|
|
858
887
|
style: {
|
|
859
888
|
width: e,
|
|
860
889
|
...t
|
|
861
890
|
},
|
|
862
891
|
children: [
|
|
863
892
|
/* @__PURE__ */ y("div", {
|
|
864
|
-
className:
|
|
893
|
+
className: Gr,
|
|
865
894
|
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ c("div", {
|
|
866
|
-
className:
|
|
895
|
+
className: Er,
|
|
867
896
|
children: "compile cache"
|
|
868
897
|
}), /* @__PURE__ */ c("div", {
|
|
869
|
-
className:
|
|
870
|
-
children:
|
|
898
|
+
className: qr,
|
|
899
|
+
children: I ? "production: stats disabled" : g ? `last: ${g.label} · ${me(g.durationMs)}` : "awaiting first compile…"
|
|
871
900
|
})] }), /* @__PURE__ */ c("button", {
|
|
872
901
|
type: "button",
|
|
873
|
-
onClick: () =>
|
|
874
|
-
className:
|
|
875
|
-
children:
|
|
902
|
+
onClick: () => i((h) => !h),
|
|
903
|
+
className: kr,
|
|
904
|
+
children: a ? "▾" : "▴"
|
|
876
905
|
})]
|
|
877
906
|
}),
|
|
878
|
-
!
|
|
907
|
+
!a && /* @__PURE__ */ y("div", {
|
|
879
908
|
className: "drqe3ub",
|
|
880
909
|
children: [/* @__PURE__ */ y("button", {
|
|
881
910
|
type: "button",
|
|
882
|
-
onClick:
|
|
883
|
-
className: l ?
|
|
911
|
+
onClick: P,
|
|
912
|
+
className: l ? we.enabled : we.disabled,
|
|
884
913
|
"aria-pressed": l,
|
|
885
914
|
children: ["cache ", l ? "enabled" : "disabled"]
|
|
886
915
|
}), /* @__PURE__ */ c("span", {
|
|
@@ -888,53 +917,53 @@ var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
|
888
917
|
children: "next compile reflects this toggle"
|
|
889
918
|
})]
|
|
890
919
|
}),
|
|
891
|
-
!
|
|
892
|
-
delta:
|
|
893
|
-
durations:
|
|
894
|
-
cumulative:
|
|
895
|
-
}), /* @__PURE__ */ c(
|
|
920
|
+
!a && !I && /* @__PURE__ */ y(Lt, { children: [/* @__PURE__ */ c(xr, {
|
|
921
|
+
delta: g?.stages,
|
|
922
|
+
durations: g?.stageDurationsMs,
|
|
923
|
+
cumulative: T
|
|
924
|
+
}), /* @__PURE__ */ c(Mr, { entries: S })] })
|
|
896
925
|
]
|
|
897
926
|
});
|
|
898
|
-
},
|
|
899
|
-
className:
|
|
927
|
+
}, xr = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ y("table", {
|
|
928
|
+
className: Rr,
|
|
900
929
|
children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ y("tr", {
|
|
901
|
-
className:
|
|
930
|
+
className: $r,
|
|
902
931
|
children: [
|
|
903
932
|
/* @__PURE__ */ c("th", {
|
|
904
|
-
className:
|
|
933
|
+
className: wr,
|
|
905
934
|
children: "stage"
|
|
906
935
|
}),
|
|
907
936
|
/* @__PURE__ */ c("th", {
|
|
908
|
-
className:
|
|
937
|
+
className: F,
|
|
909
938
|
children: "time"
|
|
910
939
|
}),
|
|
911
940
|
/* @__PURE__ */ c("th", {
|
|
912
|
-
className:
|
|
941
|
+
className: F,
|
|
913
942
|
children: "Δ miss"
|
|
914
943
|
}),
|
|
915
944
|
/* @__PURE__ */ c("th", {
|
|
916
|
-
className:
|
|
945
|
+
className: F,
|
|
917
946
|
children: "Δ hit"
|
|
918
947
|
}),
|
|
919
948
|
/* @__PURE__ */ c("th", {
|
|
920
|
-
className:
|
|
949
|
+
className: F,
|
|
921
950
|
children: "total miss"
|
|
922
951
|
}),
|
|
923
952
|
/* @__PURE__ */ c("th", {
|
|
924
|
-
className:
|
|
953
|
+
className: F,
|
|
925
954
|
children: "total hit"
|
|
926
955
|
})
|
|
927
956
|
]
|
|
928
|
-
}) }), /* @__PURE__ */ c("tbody", { children:
|
|
929
|
-
const s = e?.[n],
|
|
957
|
+
}) }), /* @__PURE__ */ c("tbody", { children: le.map((n) => {
|
|
958
|
+
const s = e?.[n], a = Ar(s);
|
|
930
959
|
return /* @__PURE__ */ y("tr", {
|
|
931
|
-
className:
|
|
960
|
+
className: Dr,
|
|
932
961
|
children: [
|
|
933
962
|
/* @__PURE__ */ y("td", {
|
|
934
|
-
className:
|
|
963
|
+
className: Ir,
|
|
935
964
|
children: [
|
|
936
965
|
/* @__PURE__ */ c("span", {
|
|
937
|
-
className:
|
|
966
|
+
className: ke[a],
|
|
938
967
|
"aria-hidden": !0
|
|
939
968
|
}),
|
|
940
969
|
" ",
|
|
@@ -942,76 +971,76 @@ var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
|
942
971
|
]
|
|
943
972
|
}),
|
|
944
973
|
/* @__PURE__ */ c("td", {
|
|
945
|
-
className:
|
|
946
|
-
children: t === void 0 ||
|
|
974
|
+
className: Z,
|
|
975
|
+
children: t === void 0 || a === "untouched" ? "—" : me(t[n])
|
|
947
976
|
}),
|
|
948
977
|
/* @__PURE__ */ c("td", {
|
|
949
|
-
className:
|
|
978
|
+
className: a === "ran" ? Ie.ran : Ie.dim,
|
|
950
979
|
children: s?.misses ?? 0
|
|
951
980
|
}),
|
|
952
981
|
/* @__PURE__ */ c("td", {
|
|
953
|
-
className:
|
|
982
|
+
className: Z,
|
|
954
983
|
children: s?.hits ?? 0
|
|
955
984
|
}),
|
|
956
985
|
/* @__PURE__ */ c("td", {
|
|
957
|
-
className:
|
|
986
|
+
className: Z,
|
|
958
987
|
children: r[n].misses
|
|
959
988
|
}),
|
|
960
989
|
/* @__PURE__ */ c("td", {
|
|
961
|
-
className:
|
|
990
|
+
className: Z,
|
|
962
991
|
children: r[n].hits
|
|
963
992
|
})
|
|
964
993
|
]
|
|
965
994
|
}, n);
|
|
966
995
|
}) })]
|
|
967
|
-
}),
|
|
968
|
-
className:
|
|
996
|
+
}), Mr = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ y("div", {
|
|
997
|
+
className: _r,
|
|
969
998
|
children: [/* @__PURE__ */ c("div", {
|
|
970
|
-
className:
|
|
999
|
+
className: Hr,
|
|
971
1000
|
children: "recent compiles"
|
|
972
1001
|
}), e.map((t) => {
|
|
973
|
-
const r =
|
|
1002
|
+
const r = Or(t.stages, (a) => a.misses > 0), n = le.length;
|
|
974
1003
|
return /* @__PURE__ */ y("div", {
|
|
975
|
-
className:
|
|
1004
|
+
className: Nr,
|
|
976
1005
|
children: [
|
|
977
1006
|
/* @__PURE__ */ c("span", {
|
|
978
|
-
className:
|
|
1007
|
+
className: ke[r === 0 ? "cached" : "ran"],
|
|
979
1008
|
"aria-hidden": !0
|
|
980
1009
|
}),
|
|
981
1010
|
/* @__PURE__ */ c("span", {
|
|
982
|
-
className:
|
|
1011
|
+
className: Cr,
|
|
983
1012
|
title: t.label,
|
|
984
1013
|
children: t.label
|
|
985
1014
|
}),
|
|
986
1015
|
/* @__PURE__ */ y("span", {
|
|
987
|
-
className:
|
|
1016
|
+
className: Pr,
|
|
988
1017
|
children: [
|
|
989
1018
|
r,
|
|
990
1019
|
"/",
|
|
991
1020
|
n,
|
|
992
1021
|
" ran · ",
|
|
993
|
-
|
|
1022
|
+
me(t.durationMs)
|
|
994
1023
|
]
|
|
995
1024
|
})
|
|
996
1025
|
]
|
|
997
1026
|
}, t.id);
|
|
998
1027
|
})]
|
|
999
|
-
}),
|
|
1028
|
+
}), Ar = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Or = (e, t) => {
|
|
1000
1029
|
let r = 0;
|
|
1001
|
-
for (const n of
|
|
1030
|
+
for (const n of le) t(e[n]) && (r += 1);
|
|
1002
1031
|
return r;
|
|
1003
|
-
},
|
|
1004
|
-
const { history: e } =
|
|
1005
|
-
return
|
|
1006
|
-
...
|
|
1032
|
+
}, me = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, ss = () => {
|
|
1033
|
+
const { history: e } = ce(), { stack: t, undo: r, redo: n } = e, s = f((l) => t.subscribe(l), [t]), a = f(() => t.getSnapshot(), [t]), i = Pt(s, a, a);
|
|
1034
|
+
return M(() => ({
|
|
1035
|
+
...i,
|
|
1007
1036
|
undo: r,
|
|
1008
1037
|
redo: n
|
|
1009
1038
|
}), [
|
|
1010
|
-
|
|
1039
|
+
i,
|
|
1011
1040
|
r,
|
|
1012
1041
|
n
|
|
1013
1042
|
]);
|
|
1014
|
-
},
|
|
1043
|
+
}, Br = /* @__PURE__ */ new Set([
|
|
1015
1044
|
"button",
|
|
1016
1045
|
"checkbox",
|
|
1017
1046
|
"color",
|
|
@@ -1022,102 +1051,102 @@ var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
|
1022
1051
|
"range",
|
|
1023
1052
|
"reset",
|
|
1024
1053
|
"submit"
|
|
1025
|
-
]),
|
|
1054
|
+
]), os = (e, t = {}) => {
|
|
1026
1055
|
const { target: r, enabled: n = !0 } = t;
|
|
1027
|
-
|
|
1028
|
-
const s =
|
|
1056
|
+
q(() => {
|
|
1057
|
+
const s = Kr(r);
|
|
1029
1058
|
if (!n || !s) return;
|
|
1030
|
-
const
|
|
1031
|
-
if (!
|
|
1032
|
-
const l =
|
|
1059
|
+
const a = (i) => {
|
|
1060
|
+
if (!Fr(i) || i.defaultPrevented || Ur(i.target)) return;
|
|
1061
|
+
const l = st(i);
|
|
1033
1062
|
if (!l) return;
|
|
1034
1063
|
const d = e.current;
|
|
1035
|
-
d && (l === "undo" ? d.undo() : d.redo()) &&
|
|
1064
|
+
d && (l === "undo" ? d.undo() : d.redo()) && i.preventDefault();
|
|
1036
1065
|
};
|
|
1037
|
-
return s.addEventListener("keydown",
|
|
1066
|
+
return s.addEventListener("keydown", a), () => s.removeEventListener("keydown", a);
|
|
1038
1067
|
}, [
|
|
1039
1068
|
e,
|
|
1040
1069
|
r,
|
|
1041
1070
|
n
|
|
1042
1071
|
]);
|
|
1043
|
-
},
|
|
1044
|
-
const { targetBoundaryStore: e } =
|
|
1045
|
-
return
|
|
1072
|
+
}, Kr = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Fr = (e) => "key" in e, Ur = (e) => e instanceof HTMLInputElement ? !Br.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, is = () => {
|
|
1073
|
+
const { targetBoundaryStore: e } = ce();
|
|
1074
|
+
return ie(e, (t) => t.boundary);
|
|
1046
1075
|
};
|
|
1047
1076
|
export {
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1077
|
+
an as CanvasTextMeasurer,
|
|
1078
|
+
Tn as DefaultFooter,
|
|
1079
|
+
gr as DefaultGeomCircle,
|
|
1080
|
+
pr as DefaultGeomLine,
|
|
1081
|
+
vr as DefaultGeomPath,
|
|
1082
|
+
fr as DefaultGeomRect,
|
|
1054
1083
|
In as DefaultGrid,
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
+
hn as DefaultHeader,
|
|
1085
|
+
yn as DefaultSwatch,
|
|
1086
|
+
jr as DefaultTooltip,
|
|
1087
|
+
ns as DevToolsPanel,
|
|
1088
|
+
ot as GRAPH_MODES,
|
|
1089
|
+
Qn as GeomCircle,
|
|
1090
|
+
Xn as GeomLine,
|
|
1091
|
+
Vr as GeomOverpaint,
|
|
1092
|
+
Qr as GeomPanelSizeProvider,
|
|
1093
|
+
Zn as GeomPath,
|
|
1094
|
+
Jn as GeomRect,
|
|
1095
|
+
Mt as GraphErrorBoundary,
|
|
1096
|
+
ye as GraphErrorPanel,
|
|
1097
|
+
lr as GraphProvider,
|
|
1098
|
+
vn as GraphRenderer,
|
|
1099
|
+
$n as GraphyBadge,
|
|
1100
|
+
qn as HoverProvider,
|
|
1101
|
+
dn as IntlProvider,
|
|
1102
|
+
Hn as IntroFade,
|
|
1103
|
+
Bn as IntroWipeClip,
|
|
1104
|
+
es as SymbolFigure,
|
|
1105
|
+
Jr as TextMeasurerProvider,
|
|
1106
|
+
rn as ThemeProvider,
|
|
1107
|
+
rs as UnitBoxSvg,
|
|
1108
|
+
ts as UnitSpaceSvg,
|
|
1109
|
+
kn as buildDotsEditOutlineShapes,
|
|
1110
|
+
Yn as createGraphyKit,
|
|
1111
|
+
Xr as darkTheme,
|
|
1112
|
+
Nn as defineGeomRenderer,
|
|
1084
1113
|
Dn as defineGlyph,
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1114
|
+
Gn as getBuiltInEditOutlineShapes,
|
|
1115
|
+
un as lightTheme,
|
|
1116
|
+
Yr as lightenCss,
|
|
1117
|
+
Ot as pruneSelection,
|
|
1118
|
+
U as readPositionPixels,
|
|
1119
|
+
jn as readRectPixels,
|
|
1120
|
+
Ln as resolveGraphyBadgeVariant,
|
|
1121
|
+
zr as resolvePathStroke,
|
|
1122
|
+
Pn as scalePointToPanel,
|
|
1123
|
+
en as stampAxisEditTarget,
|
|
1124
|
+
cn as stampGridEditTarget,
|
|
1125
|
+
mn as stampLegendEditTarget,
|
|
1126
|
+
gn as useElementScreenRect,
|
|
1127
|
+
nn as useFormattingLocale,
|
|
1128
|
+
bn as useGeomHitTest,
|
|
1129
|
+
on as useGeomHover,
|
|
1130
|
+
ln as useGeomPanelSize,
|
|
1131
|
+
fn as useGeomReaderTree,
|
|
1132
|
+
xn as useGeomStyleReader,
|
|
1133
|
+
et as useGeomViewportSize,
|
|
1134
|
+
te as useGraphAnimation,
|
|
1106
1135
|
Cn as useGraphCommands,
|
|
1107
1136
|
En as useGraphHandle,
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1137
|
+
ss as useGraphHistory,
|
|
1138
|
+
os as useGraphHistoryShortcuts,
|
|
1139
|
+
wn as useGraphLocale,
|
|
1140
|
+
Mn as useGraphSelection,
|
|
1141
|
+
sn as useGuidesTakePress,
|
|
1142
|
+
_n as useHandleScene,
|
|
1143
|
+
Rn as useHoverState,
|
|
1144
|
+
pn as usePaintDefs,
|
|
1145
|
+
Zr as useResolvedStyle,
|
|
1146
|
+
at as useSceneSelector,
|
|
1147
|
+
On as useStyleReaderTree,
|
|
1148
|
+
Sn as useStyleResolver,
|
|
1149
|
+
is as useTargetBoundary,
|
|
1150
|
+
An as useTextMeasurer,
|
|
1151
|
+
tn as vars
|
|
1123
1152
|
};
|