@graphysdk/react-renderer 1.9.0-beta.1790237819098 → 1.9.0-beta.1790263076123

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/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
- import { $t, At as xt, B as Ht, Bt as Mt, Dt as K, Ft as Bt, It as le, Kt as Lt, L as Pt, M as Ot, Mt as ue, N as At, Ot as me, R as Kt, Rt as jt, T as Ft, Tt as Ut, V as Yt, Vt, _t as Wt, a as Xt, an as oe, bt as zt, c as Qt, dt as Jt, en as Zt, ft as er, g as tr, i as rr, in as ge, it as nr, j as sr, jt as F, kt as he, lt as or, n as pe, nn as ir, o as ar, on as j, r as cr, rn as dr, rt as lr, t as ur, tn as mr, wt as gr, yt as hr, zt as pr } from "./use-target-boundary-DA2-wopd.js";
1
+ import { At as le, B as $t, Bt as Ht, Dt as K, Ht as xt, Jt as Mt, L as Lt, Lt as Pt, M as Bt, Mt as At, N as Ot, Nt as U, Pt as ue, R as Kt, Rt as me, T as jt, Tt as Ut, Ut as Ft, V as Yt, Vt, _t as Wt, a as Xt, an as Jt, bt as Qt, c as zt, cn as j, dt as Zt, ft as er, g as tr, i as rr, in as nr, it as sr, j as or, jt as ge, lt as ir, n as he, nn as ar, o as cr, on as pe, r as dr, rn as lr, rt as ur, sn as oe, t as mr, tn as gr, wt as hr, yt as pr } from "./use-target-boundary-4MJrqeJ9.js";
2
2
  import { n as vr } from "./theme.contract.css-AyXDNf0F.js";
3
- import { COMPILER_STAGE_KEYS as U, Geom as fe, GraphCompilationSession as ve, areEditTargetsEqual as ye, buildDiagnostic as z, createAnchorResolver as Se, createCompiler as be, createSpecBuilder as Ee, createStyleResolver as Te, findAnnotation as Re, findLayerById as Q, isCompilerCachingEnabled as Ne, resolveDefinition as qe, setCompilerCachingEnabled as Ce, toPercent as P } from "@graphysdk/viz-engine";
4
- import { Component as Ge, useCallback as f, useEffect as M, useId as ke, useImperativeHandle as Ie, useMemo as H, useRef as J, useState as b, useSyncExternalStore as we } from "react";
3
+ import { COMPILER_STAGE_KEYS as F, Geom as fe, GraphCompilationSession as ve, areEditTargetsEqual as ye, buildDiagnostic as J, createAnchorResolver as Se, createCompiler as be, createSpecBuilder as Ee, createStyleResolver as Te, findAnnotation as Re, findLayerById as Q, isCompilerCachingEnabled as Ne, resolveDefinition as qe, setCompilerCachingEnabled as Ce, toPercent as B } from "@graphysdk/viz-engine";
4
+ import { Component as Ge, useCallback as f, useEffect as M, useId as ke, useImperativeHandle as we, useMemo as x, useRef as z, useState as b, useSyncExternalStore as Ie } from "react";
5
5
  import { Fragment as De, jsx as c, jsxs as v } from "react/jsx-runtime";
6
6
  import { useStore as Z } from "zustand";
7
7
  import { createStore as Y } from "zustand/vanilla";
8
8
  import _e from "clsx";
9
- import './index.css';var $e = "_1a5iqpb0", xe = "_1a5iqpb1";
10
- var He = "_1a5iqpb3", Me = "_1a5iqpb4", Be = "_1a5iqpb5";
9
+ import './index.css';var $e = "_1a5iqpb0", He = "_1a5iqpb1";
10
+ var xe = "_1a5iqpb3", Me = "_1a5iqpb4", Le = "_1a5iqpb5";
11
11
  var ee = ({ errors: e }) => {
12
12
  const [t, ...n] = e;
13
13
  return /* @__PURE__ */ v("div", {
@@ -15,7 +15,7 @@ var ee = ({ errors: e }) => {
15
15
  className: $e,
16
16
  children: [
17
17
  /* @__PURE__ */ c("strong", {
18
- className: xe,
18
+ className: He,
19
19
  children: "This chart could not be rendered."
20
20
  }),
21
21
  t && /* @__PURE__ */ c(te, { diagnostic: t }),
@@ -26,14 +26,14 @@ var ee = ({ errors: e }) => {
26
26
  ]
27
27
  });
28
28
  }, te = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
29
- className: He,
29
+ className: xe,
30
30
  children: [
31
31
  /* @__PURE__ */ c("span", {
32
32
  className: Me,
33
33
  children: e.code
34
34
  }),
35
35
  /* @__PURE__ */ c("p", {
36
- className: Be,
36
+ className: Le,
37
37
  children: e.message
38
38
  }),
39
39
  e.suggestion && /* @__PURE__ */ c("p", {
@@ -42,22 +42,22 @@ var ee = ({ errors: e }) => {
42
42
  })
43
43
  ]
44
44
  });
45
- function Le(e = [], t = []) {
45
+ function Pe(e = [], t = []) {
46
46
  return e.length === t.length && e.every((n, r) => Object.is(n, t[r]));
47
47
  }
48
- var Pe = class extends Ge {
48
+ var Be = class extends Ge {
49
49
  constructor(...e) {
50
50
  super(...e), this.state = { caughtDiagnostic: null };
51
51
  }
52
52
  static getDerivedStateFromError(e) {
53
- return { caughtDiagnostic: z(e) };
53
+ return { caughtDiagnostic: J(e) };
54
54
  }
55
55
  componentDidCatch(e, t) {
56
- const n = z(e);
56
+ const n = J(e);
57
57
  j([n]), this.props.onError?.([n]), console.error("Chart render component stack:", t.componentStack);
58
58
  }
59
59
  componentDidUpdate(e) {
60
- this.state.caughtDiagnostic && !Le(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
60
+ this.state.caughtDiagnostic && !Pe(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
61
61
  }
62
62
  render() {
63
63
  const { caughtDiagnostic: e } = this.state;
@@ -65,21 +65,21 @@ var Pe = class extends Ge {
65
65
  const { forcedErrors: t, children: n } = this.props;
66
66
  return t && t.length > 0 ? /* @__PURE__ */ c(ee, { errors: t }) : n;
67
67
  }
68
- }, ie = (e) => typeof e == "object" && "geom" in e && "render" in e, Oe = (e) => {
68
+ }, ie = (e) => typeof e == "object" && "geom" in e && "render" in e, Ae = (e) => {
69
69
  const t = qe(e);
70
70
  return t instanceof fe ? t : null;
71
- }, Ae = (e, t) => {
71
+ }, Oe = (e, t) => {
72
72
  const n = e.filter((r) => Ke(r, t));
73
73
  return n.length === e.length ? e : n;
74
74
  }, Ke = (e, t) => e.kind === "annotation" ? Re(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 = [], je = () => Y((e) => ({
75
75
  selection: re,
76
- setSelection: (t) => e((n) => Fe(n.selection, t) ? n : { selection: t }),
76
+ setSelection: (t) => e((n) => Ue(n.selection, t) ? n : { selection: t }),
77
77
  clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: re })
78
- })), Fe = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((n, r) => {
78
+ })), Ue = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((n, r) => {
79
79
  const o = t[r];
80
80
  return o !== void 0 && ye(n, o);
81
- }), Ue = process.env.NODE_ENV !== "production", Ye = 5, Ve = (e) => {
82
- if (!Ue) return {
81
+ }), Fe = process.env.NODE_ENV !== "production", Ye = 5, Ve = (e) => {
82
+ if (!Fe) return {
83
83
  emit: () => {
84
84
  },
85
85
  subscribe: () => Xe,
@@ -113,7 +113,7 @@ var Pe = class extends Ge {
113
113
  if (r.lastSnapshot === n) return r;
114
114
  const o = {
115
115
  id: r.nextId,
116
- label: ze(t),
116
+ label: Je(t),
117
117
  stages: n.stages,
118
118
  stageDurationsMs: n.stageDurationsMs,
119
119
  durationMs: n.durationMs
@@ -126,7 +126,7 @@ var Pe = class extends Ge {
126
126
  };
127
127
  })
128
128
  })), Xe = () => {
129
- }, ze = (e) => {
129
+ }, Je = (e) => {
130
130
  switch (e.kind) {
131
131
  case "init":
132
132
  return "init";
@@ -141,10 +141,10 @@ var Pe = class extends Ge {
141
141
  const r = e.length >= n ? e.length - (n - 1) : 0;
142
142
  return [...e.slice(r), t];
143
143
  };
144
- function Je(e) {
144
+ function ze(e) {
145
145
  const t = e.filter(ie), n = /* @__PURE__ */ new Set([...Object.keys(ue), ...t.map((d) => d.geom)]), r = [], o = /* @__PURE__ */ new Set();
146
146
  for (const d of e) {
147
- const u = Oe(d);
147
+ const u = Ae(d);
148
148
  u === null || n.has(u.type) || o.has(u.type) || (o.add(u.type), r.push({
149
149
  kind: "user-input",
150
150
  severity: "error",
@@ -206,7 +206,7 @@ function et(e, t) {
206
206
  for (const i of r) {
207
207
  if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
208
208
  const d = t(i.geom, n.type);
209
- d === null || d.hitTest || F(d) || (o.add(i.geom), a.push({
209
+ d === null || d.hitTest || U(d) || (o.add(i.geom), a.push({
210
210
  kind: "user-input",
211
211
  severity: "warning",
212
212
  code: "MISSING_RENDER_HIT_TEST",
@@ -243,7 +243,7 @@ function rt(e, t) {
243
243
  for (const i of r) {
244
244
  if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
245
245
  const d = t(i.geom, n.type);
246
- d === null || !d.hitTest || !F(d) || (o.add(i.geom), a.push({
246
+ d === null || !d.hitTest || !U(d) || (o.add(i.geom), a.push({
247
247
  kind: "user-input",
248
248
  severity: "warning",
249
249
  code: "CONFLICTING_RENDER_HIT_TEST",
@@ -278,7 +278,7 @@ function st(e, t) {
278
278
  for (const i of r) {
279
279
  if (i.interactive === !1 || i.spatialKind === "render-hit-test" || o.has(i.geom)) continue;
280
280
  const d = t(i.geom, n.type);
281
- d === null || !F(d) || (o.add(i.geom), a.push({
281
+ d === null || !U(d) || (o.add(i.geom), a.push({
282
282
  kind: "user-input",
283
283
  severity: "warning",
284
284
  code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
@@ -296,13 +296,13 @@ var ot = (e) => Y((t) => ({
296
296
  scene: e,
297
297
  setScene: (n) => t((r) => r.scene === n ? r : { scene: n })
298
298
  })), it = ({ spec: e, data: t, customPalettes: n, colorScheme: r, plugins: o, resolveRenderer: a, anchorResolver: i, onSpecChange: d, onError: u, onWarnings: m }) => {
299
- const T = K(d), w = K(u), C = K(m), [{ session: g, compileBus: l }] = b(() => {
299
+ const T = K(d), I = K(u), C = K(m), [{ session: g, compileBus: l }] = b(() => {
300
300
  const s = be({ plugins: o });
301
301
  return {
302
302
  session: new ve(s),
303
303
  compileBus: Ve(s)
304
304
  };
305
- }), [p] = b(() => Je(o ?? [])), G = J(null), [y] = b(at), R = J(null), k = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), N = f((s) => {
305
+ }), [p] = b(() => ze(o ?? [])), G = z(null), [y] = b(at), R = z(null), k = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), N = f((s) => {
306
306
  if (!s.ok) return s.errors;
307
307
  if (R.current) R.current.getState().setScene(s.scene);
308
308
  else {
@@ -310,7 +310,7 @@ var ot = (e) => Y((t) => ({
310
310
  h.subscribe(y.notify), R.current = h, y.notify();
311
311
  }
312
312
  return null;
313
- }, [y]), [B, _] = b(() => {
313
+ }, [y]), [L, _] = b(() => {
314
314
  const s = g.compile({
315
315
  spec: e,
316
316
  data: t,
@@ -326,17 +326,17 @@ var ot = (e) => Y((t) => ({
326
326
  ...rt(s.scene, a),
327
327
  ...st(s.scene, a),
328
328
  ...nt(s.scene, i)
329
- ] : s.warnings, [a, i]), I = f((s) => {
330
- s.length !== 0 && (j(s), w.current?.(s));
331
- }, [w]), S = f((s) => {
329
+ ] : s.warnings, [a, i]), w = f((s) => {
330
+ s.length !== 0 && (j(s), I.current?.(s));
331
+ }, [I]), S = f((s) => {
332
332
  s.length !== 0 && (j(s), C.current?.(s));
333
333
  }, [C]);
334
334
  M(() => {
335
335
  const s = G.current;
336
- s && (I([...p.errors, ...s.ok ? [] : s.errors]), S([...p.warnings, ...q(s)]), s.ok && l.emit({ kind: "init" }));
336
+ s && (w([...p.errors, ...s.ok ? [] : s.errors]), S([...p.warnings, ...q(s)]), s.ok && l.emit({ kind: "init" }));
337
337
  }, [
338
338
  l,
339
- I,
339
+ w,
340
340
  S,
341
341
  p,
342
342
  q
@@ -350,7 +350,7 @@ var ot = (e) => Y((t) => ({
350
350
  if (!s) return;
351
351
  s.committedSpec && T.current?.(s.committedSpec);
352
352
  const h = N(s.result);
353
- _(k(h)), h && I(h), S(q(s.result)), h || l.emit({ kind: s.specChanged ? "spec" : "data" });
353
+ _(k(h)), h && w(h), S(q(s.result)), h || l.emit({ kind: s.specChanged ? "spec" : "data" });
354
354
  }, [
355
355
  e,
356
356
  t,
@@ -359,7 +359,7 @@ var ot = (e) => Y((t) => ({
359
359
  g,
360
360
  l,
361
361
  N,
362
- I,
362
+ w,
363
363
  S,
364
364
  k,
365
365
  q,
@@ -375,20 +375,20 @@ var ot = (e) => Y((t) => ({
375
375
  s.scene && R.current?.getState().setScene(s.scene), s.result && $(s.result), s.command && l.emit({
376
376
  kind: "command",
377
377
  command: s.command
378
- }), s.spec && T.current?.(s.spec), s.errors && I([...s.errors]);
378
+ }), s.spec && T.current?.(s.spec), s.errors && w([...s.errors]);
379
379
  }, [
380
380
  $,
381
381
  l,
382
382
  T,
383
- I
383
+ w
384
384
  ]), E = f((s) => {
385
385
  for (const h of s) D(h);
386
386
  return s.some((h) => !!h.scene);
387
- }, [D]), L = f((s, h) => {
387
+ }, [D]), P = f((s, h) => {
388
388
  E(g.applyCommand(s, h));
389
- }, [g, E]), A = f(() => {
389
+ }, [g, E]), O = f(() => {
390
390
  E(g.commit());
391
- }, [g, E]), W = f(() => E(g.undo()), [g, E]), X = f(() => E(g.redo()), [g, E]), ce = H(() => ({
391
+ }, [g, E]), W = f(() => E(g.undo()), [g, E]), X = f(() => E(g.redo()), [g, E]), ce = x(() => ({
392
392
  stack: g.history,
393
393
  undo: W,
394
394
  redo: X
@@ -399,13 +399,13 @@ var ot = (e) => Y((t) => ({
399
399
  ]), de = f(() => R.current?.getState().scene ?? null, []);
400
400
  return {
401
401
  store: R.current,
402
- dispatch: L,
403
- commit: A,
402
+ dispatch: P,
403
+ commit: O,
404
404
  history: ce,
405
405
  subscribe: y.subscribe,
406
406
  getScene: de,
407
407
  compileBus: l,
408
- compileErrors: B
408
+ compileErrors: L
409
409
  };
410
410
  }, at = () => {
411
411
  const e = /* @__PURE__ */ new Set();
@@ -416,13 +416,13 @@ var ot = (e) => Y((t) => ({
416
416
  notify: () => e.forEach((t) => t())
417
417
  };
418
418
  }, ct = ({ data: e, spec: t, plugins: n = [], formattingLocale: r, handleRef: o, onSpecChange: a, onError: i, onWarnings: d, customPalettes: u, colorScheme: m = "light", children: T }) => {
419
- const [w] = b(() => he(n.filter(ie))), C = ke(), [g] = b(() => Se(n)), [l] = b(() => je()), [p] = b(() => me()), G = H(() => Te({ colorScheme: m }), [m]), { store: y, dispatch: R, commit: k, history: N, subscribe: B, getScene: _, compileBus: q, compileErrors: I } = it({
419
+ const [I] = b(() => ge(n.filter(ie))), C = ke(), [g] = b(() => Se(n)), [l] = b(() => je()), [p] = b(() => le()), G = x(() => Te({ colorScheme: m }), [m]), { store: y, dispatch: R, commit: k, history: N, subscribe: L, getScene: _, compileBus: q, compileErrors: w } = it({
420
420
  spec: t,
421
421
  data: e,
422
422
  customPalettes: u,
423
423
  colorScheme: m,
424
424
  plugins: n,
425
- resolveRenderer: w,
425
+ resolveRenderer: I,
426
426
  anchorResolver: g,
427
427
  onSpecChange: a,
428
428
  onError: i,
@@ -432,19 +432,19 @@ var ot = (e) => Y((t) => ({
432
432
  if (y)
433
433
  return y.subscribe((D, E) => {
434
434
  if (D.scene.spec === E.scene.spec) return;
435
- const { selection: L, setSelection: A } = l.getState();
436
- L.length !== 0 && A(Ae(L, D.scene.spec));
435
+ const { selection: P, setSelection: O } = l.getState();
436
+ P.length !== 0 && O(Oe(P, D.scene.spec));
437
437
  });
438
438
  }, [y, l]);
439
- const S = H(() => ({
439
+ const S = x(() => ({
440
440
  dispatch: R,
441
441
  commit: k
442
442
  }), [R, k]);
443
- Ie(o, () => ({
443
+ we(o, () => ({
444
444
  commands: S,
445
445
  undo: N.undo,
446
446
  redo: N.redo,
447
- subscribe: B,
447
+ subscribe: L,
448
448
  getScene: _,
449
449
  getSelection: () => l.getState().selection,
450
450
  setSelection: (D) => l.getState().setSelection(D),
@@ -452,11 +452,11 @@ var ot = (e) => Y((t) => ({
452
452
  }), [
453
453
  S,
454
454
  N,
455
- B,
455
+ L,
456
456
  _,
457
457
  l
458
458
  ]);
459
- const $ = H(() => y ? {
459
+ const $ = x(() => y ? {
460
460
  chartId: C,
461
461
  store: y,
462
462
  selectionStore: l,
@@ -481,14 +481,14 @@ var ot = (e) => Y((t) => ({
481
481
  G,
482
482
  g
483
483
  ]);
484
- return /* @__PURE__ */ c(Pe, {
485
- forcedErrors: I,
484
+ return /* @__PURE__ */ c(Be, {
485
+ forcedErrors: w,
486
486
  onError: i,
487
487
  resetKeys: [t, e],
488
- children: $ ? /* @__PURE__ */ c(ge.Provider, {
488
+ children: $ ? /* @__PURE__ */ c(pe.Provider, {
489
489
  value: $,
490
- children: /* @__PURE__ */ c(le, {
491
- value: w,
490
+ children: /* @__PURE__ */ c(me, {
491
+ value: I,
492
492
  children: T
493
493
  })
494
494
  }) : null
@@ -513,14 +513,14 @@ var qr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
513
513
  ...t,
514
514
  children: e
515
515
  }), Cr = ({ box: e, children: t }) => /* @__PURE__ */ c("svg", {
516
- x: P(e.x0),
517
- y: P(e.y0),
518
- width: P(e.x1 - e.x0),
519
- height: P(e.y1 - e.y0),
516
+ x: B(e.x0),
517
+ y: B(e.y0),
518
+ width: B(e.x1 - e.x0),
519
+ height: B(e.y1 - e.y0),
520
520
  overflow: "hidden",
521
521
  pointerEvents: "none",
522
522
  children: t
523
- }), dt = "drqe3u0", lt = "drqe3u1", ut = "drqe3u2", mt = "drqe3u3", x = "drqe3u4", gt = "drqe3u5", ht = "drqe3u6", pt = "drqe3u7", O = "drqe3u8", ft = "drqe3u9", vt = "drqe3ua";
523
+ }), dt = "drqe3u0", lt = "drqe3u1", ut = "drqe3u2", mt = "drqe3u3", H = "drqe3u4", gt = "drqe3u5", ht = "drqe3u6", pt = "drqe3u7", A = "drqe3u8", ft = "drqe3u9", vt = "drqe3ua";
524
524
  var yt = "drqe3uc", St = "drqe3ud", bt = "drqe3ue", Et = "drqe3uf";
525
525
  var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
526
526
  enabled: "drqe3uk drqe3uj",
@@ -538,7 +538,7 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
538
538
  const { recordCompile: l } = o.getState(), p = r.getLastTrigger(), G = r.getLastCompile();
539
539
  return p && G && l(p, G), r.subscribe(l);
540
540
  }, [o, r]);
541
- const m = Z(o, (l) => l.lastCompile), T = Z(o, (l) => l.history), w = r.getCacheStats(), C = m === null && T.length === 0, g = () => {
541
+ const m = Z(o, (l) => l.lastCompile), T = Z(o, (l) => l.history), I = r.getCacheStats(), C = m === null && T.length === 0, g = () => {
542
542
  u((l) => {
543
543
  const p = !l;
544
544
  return Ce(p), p;
@@ -582,7 +582,7 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
582
582
  !a && !C && /* @__PURE__ */ v(De, { children: [/* @__PURE__ */ c(Nt, {
583
583
  delta: m?.stages,
584
584
  durations: m?.stageDurationsMs,
585
- cumulative: w
585
+ cumulative: I
586
586
  }), /* @__PURE__ */ c(qt, { entries: T })] })
587
587
  ]
588
588
  });
@@ -596,27 +596,27 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
596
596
  children: "stage"
597
597
  }),
598
598
  /* @__PURE__ */ c("th", {
599
- className: x,
599
+ className: H,
600
600
  children: "time"
601
601
  }),
602
602
  /* @__PURE__ */ c("th", {
603
- className: x,
603
+ className: H,
604
604
  children: "Δ miss"
605
605
  }),
606
606
  /* @__PURE__ */ c("th", {
607
- className: x,
607
+ className: H,
608
608
  children: "Δ hit"
609
609
  }),
610
610
  /* @__PURE__ */ c("th", {
611
- className: x,
611
+ className: H,
612
612
  children: "total miss"
613
613
  }),
614
614
  /* @__PURE__ */ c("th", {
615
- className: x,
615
+ className: H,
616
616
  children: "total hit"
617
617
  })
618
618
  ]
619
- }) }), /* @__PURE__ */ c("tbody", { children: U.map((r) => {
619
+ }) }), /* @__PURE__ */ c("tbody", { children: F.map((r) => {
620
620
  const o = e?.[r], a = Ct(o);
621
621
  return /* @__PURE__ */ v("tr", {
622
622
  className: yt,
@@ -633,7 +633,7 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
633
633
  ]
634
634
  }),
635
635
  /* @__PURE__ */ c("td", {
636
- className: O,
636
+ className: A,
637
637
  children: t === void 0 || a === "untouched" ? "—" : V(t[r])
638
638
  }),
639
639
  /* @__PURE__ */ c("td", {
@@ -641,15 +641,15 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
641
641
  children: o?.misses ?? 0
642
642
  }),
643
643
  /* @__PURE__ */ c("td", {
644
- className: O,
644
+ className: A,
645
645
  children: o?.hits ?? 0
646
646
  }),
647
647
  /* @__PURE__ */ c("td", {
648
- className: O,
648
+ className: A,
649
649
  children: n[r].misses
650
650
  }),
651
651
  /* @__PURE__ */ c("td", {
652
- className: O,
652
+ className: A,
653
653
  children: n[r].hits
654
654
  })
655
655
  ]
@@ -661,7 +661,7 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
661
661
  className: Rt,
662
662
  children: "recent compiles"
663
663
  }), e.map((t) => {
664
- const n = Gt(t.stages, (a) => a.misses > 0), r = U.length;
664
+ const n = Gt(t.stages, (a) => a.misses > 0), r = F.length;
665
665
  return /* @__PURE__ */ v("div", {
666
666
  className: ht,
667
667
  children: [
@@ -689,11 +689,11 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
689
689
  })]
690
690
  }), Ct = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Gt = (e, t) => {
691
691
  let n = 0;
692
- for (const r of U) t(e[r]) && (n += 1);
692
+ for (const r of F) t(e[r]) && (n += 1);
693
693
  return n;
694
694
  }, V = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, kr = () => {
695
- const { history: e } = oe(), { stack: t, undo: n, redo: r } = e, o = f((d) => t.subscribe(d), [t]), a = f(() => t.getSnapshot(), [t]), i = we(o, a, a);
696
- return H(() => ({
695
+ const { history: e } = oe(), { stack: t, undo: n, redo: r } = e, o = f((d) => t.subscribe(d), [t]), a = f(() => t.getSnapshot(), [t]), i = Ie(o, a, a);
696
+ return x(() => ({
697
697
  ...i,
698
698
  undo: n,
699
699
  redo: r
@@ -713,14 +713,14 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
713
713
  "range",
714
714
  "reset",
715
715
  "submit"
716
- ]), Ir = (e, t = {}) => {
716
+ ]), wr = (e, t = {}) => {
717
717
  const { target: n, enabled: r = !0 } = t;
718
718
  M(() => {
719
- const o = It(n);
719
+ const o = wt(n);
720
720
  if (!r || !o) return;
721
721
  const a = (i) => {
722
- if (!wt(i) || i.defaultPrevented || Dt(i.target)) return;
723
- const d = pe(i);
722
+ if (!It(i) || i.defaultPrevented || Dt(i.target)) return;
723
+ const d = he(i);
724
724
  if (!d) return;
725
725
  const u = e.current;
726
726
  u && (d === "undo" ? u.undo() : u.redo()) && i.preventDefault();
@@ -731,54 +731,54 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
731
731
  n,
732
732
  r
733
733
  ]);
734
- }, It = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, wt = (e) => "key" in e, Dt = (e) => e instanceof HTMLInputElement ? !kt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
734
+ }, wt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, It = (e) => "key" in e, Dt = (e) => e instanceof HTMLInputElement ? !kt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
735
735
  export {
736
- Ht as BrandMark,
737
- Mt as CanvasTextMeasurer,
736
+ $t as BrandMark,
737
+ xt as CanvasTextMeasurer,
738
738
  Kt as DefaultFooter,
739
- Qt as DefaultGrid,
740
- Pt as DefaultHeader,
741
- Bt as DefaultSwatch,
742
- lr as DefaultTooltip,
739
+ zt as DefaultGrid,
740
+ Lt as DefaultHeader,
741
+ Pt as DefaultSwatch,
742
+ ur as DefaultTooltip,
743
743
  Gr as DevToolsPanel,
744
744
  Wt as GRAPH_MODES,
745
- Pe as GraphErrorBoundary,
745
+ Be as GraphErrorBoundary,
746
746
  ee as GraphErrorPanel,
747
747
  ct as GraphProvider,
748
- ar as GraphRenderer,
748
+ cr as GraphRenderer,
749
749
  Ut as HoverProvider,
750
- jt as TextMeasurerProvider,
751
- or as ThemeProvider,
750
+ Ht as TextMeasurerProvider,
751
+ ir as ThemeProvider,
752
752
  Cr as UnitBoxSvg,
753
753
  qr as UnitSpaceSvg,
754
754
  Nr as createGraphyKit,
755
- Jt as darkTheme,
756
- xt as defineGeomRenderer,
755
+ Zt as darkTheme,
756
+ At as defineGeomRenderer,
757
757
  er as lightTheme,
758
- Lt as lightenCss,
759
- Ae as pruneSelection,
758
+ Mt as lightenCss,
759
+ Oe as pruneSelection,
760
760
  Yt as resolveBrandMarkVisual,
761
- sr as stampAxisEditTarget,
762
- Ot as stampGridEditTarget,
763
- At as stampLegendEditTarget,
764
- zt as useElementScreenRect,
765
- gr as useGeomHitTest,
766
- hr as useGeomHover,
767
- $t as useGeomReaderTree,
768
- cr as useGraphCommands,
761
+ or as stampAxisEditTarget,
762
+ Bt as stampGridEditTarget,
763
+ Ot as stampLegendEditTarget,
764
+ Qt as useElementScreenRect,
765
+ hr as useGeomHitTest,
766
+ pr as useGeomHover,
767
+ gr as useGeomReaderTree,
768
+ dr as useGraphCommands,
769
769
  Xt as useGraphHandle,
770
770
  kr as useGraphHistory,
771
- Ir as useGraphHistoryShortcuts,
771
+ wr as useGraphHistoryShortcuts,
772
772
  tr as useGraphSelection,
773
- Ft as useGuidesTakePress,
773
+ jt as useGuidesTakePress,
774
774
  rr as useHandleScene,
775
- nr as useHoverState,
776
- Vt as useResolvedStyle,
777
- dr as useSceneSelector,
778
- Zt as useStyleReaderTree,
779
- mr as useStyleReaders,
780
- ir as useStyleResolver,
781
- ur as useTargetBoundary,
782
- pr as useTextMeasurer,
775
+ sr as useHoverState,
776
+ Ft as useResolvedStyle,
777
+ Jt as useSceneSelector,
778
+ ar as useStyleReaderTree,
779
+ lr as useStyleReaders,
780
+ nr as useStyleResolver,
781
+ mr as useTargetBoundary,
782
+ Vt as useTextMeasurer,
783
783
  vr as vars
784
784
  };