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