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

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 F, B as xt, Bt as Ht, Ct as Mt, Dt as le, Et as K, Ft as ue, Gt as Lt, L as Pt, Lt as Bt, M as Ot, N as At, Ot as me, Pt as Kt, Qt as jt, R as Ft, Rt as Ut, T as Yt, V as Vt, a as Wt, an as j, c as Qt, dt as Xt, en as zt, ft as Jt, g as Zt, gt as er, i as tr, in as oe, it as rr, j as nr, jt as ge, kt as sr, lt as or, n as he, nn as ir, o as ar, r as cr, rn as pe, rt as dr, t as lr, tn as ur, vt as mr, wt as gr, yt as hr, zt as pr } from "./use-target-boundary-wO7GBGCI.js";
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";
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 X, createAnchorResolver as Se, createCompiler as be, createSpecBuilder as Ee, createStyleResolver as Te, findAnnotation as Re, findLayerById as z, isCompilerCachingEnabled as Ne, resolveDefinition as Ce, setCompilerCachingEnabled as qe, 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 H, useRef as J, useState as b, useSyncExternalStore as Ie } from "react";
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";
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
9
  import './index.css';var $e = "_1a5iqpb0", xe = "_1a5iqpb1";
10
- var He = "_1a5iqpb3", Me = "_1a5iqpb4", Le = "_1a5iqpb5";
10
+ var He = "_1a5iqpb3", Me = "_1a5iqpb4", Be = "_1a5iqpb5";
11
11
  var ee = ({ errors: e }) => {
12
12
  const [t, ...n] = e;
13
13
  return /* @__PURE__ */ v("div", {
@@ -33,7 +33,7 @@ var ee = ({ errors: e }) => {
33
33
  children: e.code
34
34
  }),
35
35
  /* @__PURE__ */ c("p", {
36
- className: Le,
36
+ className: Be,
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 Pe(e = [], t = []) {
45
+ function Le(e = [], t = []) {
46
46
  return e.length === t.length && e.every((n, r) => Object.is(n, t[r]));
47
47
  }
48
- var Be = class extends Ge {
48
+ var Pe = 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: X(e) };
53
+ return { caughtDiagnostic: z(e) };
54
54
  }
55
55
  componentDidCatch(e, t) {
56
- const n = X(e);
56
+ const n = z(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 && !Pe(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
60
+ this.state.caughtDiagnostic && !Le(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
61
61
  }
62
62
  render() {
63
63
  const { caughtDiagnostic: e } = this.state;
@@ -66,12 +66,12 @@ var Be = class extends Ge {
66
66
  return t && t.length > 0 ? /* @__PURE__ */ c(ee, { errors: t }) : n;
67
67
  }
68
68
  }, ie = (e) => typeof e == "object" && "geom" in e && "render" in e, Oe = (e) => {
69
- const t = Ce(e);
69
+ const t = qe(e);
70
70
  return t instanceof fe ? t : null;
71
71
  }, Ae = (e, t) => {
72
72
  const n = e.filter((r) => Ke(r, t));
73
73
  return n.length === e.length ? e : n;
74
- }, Ke = (e, t) => e.kind === "annotation" ? Re(t.annotations, e.id) !== null : e.kind === "observations" ? z(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? z(t.layers, e.layerId) !== void 0 : !0, re = [], je = () => Y((e) => ({
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
76
  setSelection: (t) => e((n) => Fe(n.selection, t) ? n : { selection: t }),
77
77
  clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: re })
@@ -82,7 +82,7 @@ var Be = class extends Ge {
82
82
  if (!Ue) return {
83
83
  emit: () => {
84
84
  },
85
- subscribe: () => Qe,
85
+ subscribe: () => Xe,
86
86
  getLastTrigger: () => null,
87
87
  getLastCompile: () => null,
88
88
  getCacheStats: () => e.getCacheStats()
@@ -113,20 +113,20 @@ var Be = class extends Ge {
113
113
  if (r.lastSnapshot === n) return r;
114
114
  const o = {
115
115
  id: r.nextId,
116
- label: Xe(t),
116
+ label: ze(t),
117
117
  stages: n.stages,
118
118
  stageDurationsMs: n.stageDurationsMs,
119
119
  durationMs: n.durationMs
120
120
  };
121
121
  return {
122
122
  lastCompile: o,
123
- history: ze(r.history, o, Ye),
123
+ history: Qe(r.history, o, Ye),
124
124
  nextId: r.nextId + 1,
125
125
  lastSnapshot: n
126
126
  };
127
127
  })
128
- })), Qe = () => {
129
- }, Xe = (e) => {
128
+ })), Xe = () => {
129
+ }, ze = (e) => {
130
130
  switch (e.kind) {
131
131
  case "init":
132
132
  return "init";
@@ -137,12 +137,12 @@ var Be = class extends Ge {
137
137
  case "command":
138
138
  return e.command.metadata.description;
139
139
  }
140
- }, ze = (e, t, n) => {
140
+ }, Qe = (e, t, n) => {
141
141
  const r = e.length >= n ? e.length - (n - 1) : 0;
142
142
  return [...e.slice(r), t];
143
143
  };
144
144
  function Je(e) {
145
- const t = e.filter(ie), n = /* @__PURE__ */ new Set([...Object.keys(ge), ...t.map((d) => d.geom)]), r = [], o = /* @__PURE__ */ new Set();
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
147
  const u = Oe(d);
148
148
  u === null || n.has(u.type) || o.has(u.type) || (o.add(u.type), r.push({
@@ -296,7 +296,7 @@ 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), I = K(u), q = K(m), [{ session: g, compileBus: l }] = b(() => {
299
+ const T = K(d), w = 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),
@@ -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]), [L, _] = b(() => {
313
+ }, [y]), [B, _] = b(() => {
314
314
  const s = g.compile({
315
315
  spec: e,
316
316
  data: t,
@@ -318,7 +318,7 @@ var ot = (e) => Y((t) => ({
318
318
  colorScheme: r
319
319
  });
320
320
  return G.current = s, k(N(s));
321
- }), C = f((s) => s.ok ? [
321
+ }), q = f((s) => s.ok ? [
322
322
  ...s.warnings,
323
323
  ...Ze(s.scene, a),
324
324
  ...et(s.scene, a),
@@ -326,20 +326,20 @@ 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]), w = f((s) => {
330
- s.length !== 0 && (j(s), I.current?.(s));
331
- }, [I]), S = f((s) => {
332
- s.length !== 0 && (j(s), q.current?.(s));
333
- }, [q]);
329
+ ] : s.warnings, [a, i]), I = f((s) => {
330
+ s.length !== 0 && (j(s), w.current?.(s));
331
+ }, [w]), S = f((s) => {
332
+ s.length !== 0 && (j(s), C.current?.(s));
333
+ }, [C]);
334
334
  M(() => {
335
335
  const s = G.current;
336
- s && (w([...p.errors, ...s.ok ? [] : s.errors]), S([...p.warnings, ...C(s)]), s.ok && l.emit({ kind: "init" }));
336
+ s && (I([...p.errors, ...s.ok ? [] : s.errors]), S([...p.warnings, ...q(s)]), s.ok && l.emit({ kind: "init" }));
337
337
  }, [
338
338
  l,
339
- w,
339
+ I,
340
340
  S,
341
341
  p,
342
- C
342
+ q
343
343
  ]), M(() => {
344
344
  const s = g.update({
345
345
  spec: e,
@@ -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 && w(h), S(C(s.result)), h || l.emit({ kind: s.specChanged ? "spec" : "data" });
353
+ _(k(h)), h && I(h), S(q(s.result)), h || l.emit({ kind: s.specChanged ? "spec" : "data" });
354
354
  }, [
355
355
  e,
356
356
  t,
@@ -359,53 +359,53 @@ var ot = (e) => Y((t) => ({
359
359
  g,
360
360
  l,
361
361
  N,
362
- w,
362
+ I,
363
363
  S,
364
364
  k,
365
- C,
365
+ q,
366
366
  T
367
367
  ]);
368
368
  const $ = f((s) => {
369
- _((h) => h === null ? h : k(null)), S(C(s));
369
+ _((h) => h === null ? h : k(null)), S(q(s));
370
370
  }, [
371
371
  k,
372
372
  S,
373
- C
373
+ q
374
374
  ]), D = f((s) => {
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 && w([...s.errors]);
378
+ }), s.spec && T.current?.(s.spec), s.errors && I([...s.errors]);
379
379
  }, [
380
380
  $,
381
381
  l,
382
382
  T,
383
- w
383
+ I
384
384
  ]), E = f((s) => {
385
385
  for (const h of s) D(h);
386
386
  return s.some((h) => !!h.scene);
387
- }, [D]), P = f((s, h) => {
387
+ }, [D]), L = f((s, h) => {
388
388
  E(g.applyCommand(s, h));
389
389
  }, [g, E]), A = f(() => {
390
390
  E(g.commit());
391
- }, [g, E]), W = f(() => E(g.undo()), [g, E]), Q = 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 = H(() => ({
392
392
  stack: g.history,
393
393
  undo: W,
394
- redo: Q
394
+ redo: X
395
395
  }), [
396
396
  g,
397
397
  W,
398
- Q
398
+ X
399
399
  ]), de = f(() => R.current?.getState().scene ?? null, []);
400
400
  return {
401
401
  store: R.current,
402
- dispatch: P,
402
+ dispatch: L,
403
403
  commit: A,
404
404
  history: ce,
405
405
  subscribe: y.subscribe,
406
406
  getScene: de,
407
407
  compileBus: l,
408
- compileErrors: L
408
+ compileErrors: B
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 [I] = b(() => me(n.filter(ie))), q = ke(), [g] = b(() => Se(n)), [l] = b(() => je()), [p] = b(() => le()), G = H(() => Te({ colorScheme: m }), [m]), { store: y, dispatch: R, commit: k, history: N, subscribe: L, getScene: _, compileBus: C, compileErrors: w } = it({
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({
420
420
  spec: t,
421
421
  data: e,
422
422
  customPalettes: u,
423
423
  colorScheme: m,
424
424
  plugins: n,
425
- resolveRenderer: I,
425
+ resolveRenderer: w,
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: P, setSelection: A } = l.getState();
436
- P.length !== 0 && A(Ae(P, D.scene.spec));
435
+ const { selection: L, setSelection: A } = l.getState();
436
+ L.length !== 0 && A(Ae(L, D.scene.spec));
437
437
  });
438
438
  }, [y, l]);
439
439
  const S = H(() => ({
440
440
  dispatch: R,
441
441
  commit: k
442
442
  }), [R, k]);
443
- we(o, () => ({
443
+ Ie(o, () => ({
444
444
  commands: S,
445
445
  undo: N.undo,
446
446
  redo: N.redo,
447
- subscribe: L,
447
+ subscribe: B,
448
448
  getScene: _,
449
449
  getSelection: () => l.getState().selection,
450
450
  setSelection: (D) => l.getState().setSelection(D),
@@ -452,43 +452,43 @@ var ot = (e) => Y((t) => ({
452
452
  }), [
453
453
  S,
454
454
  N,
455
- L,
455
+ B,
456
456
  _,
457
457
  l
458
458
  ]);
459
459
  const $ = H(() => y ? {
460
- chartId: q,
460
+ chartId: C,
461
461
  store: y,
462
462
  selectionStore: l,
463
463
  targetBoundaryStore: p,
464
464
  commands: S,
465
465
  history: N,
466
466
  formattingLocale: r,
467
- compileBus: C,
467
+ compileBus: q,
468
468
  colorScheme: m,
469
469
  styleResolver: G,
470
470
  anchorResolver: g
471
471
  } : null, [
472
- q,
472
+ C,
473
473
  y,
474
474
  l,
475
475
  p,
476
476
  S,
477
477
  N,
478
478
  r,
479
- C,
479
+ q,
480
480
  m,
481
481
  G,
482
482
  g
483
483
  ]);
484
- return /* @__PURE__ */ c(Be, {
485
- forcedErrors: w,
484
+ return /* @__PURE__ */ c(Pe, {
485
+ forcedErrors: I,
486
486
  onError: i,
487
487
  resetKeys: [t, e],
488
- children: $ ? /* @__PURE__ */ c(pe.Provider, {
488
+ children: $ ? /* @__PURE__ */ c(ge.Provider, {
489
489
  value: $,
490
- children: /* @__PURE__ */ c(ue, {
491
- value: I,
490
+ children: /* @__PURE__ */ c(le, {
491
+ value: w,
492
492
  children: T
493
493
  })
494
494
  }) : null
@@ -504,7 +504,7 @@ function Nr(e) {
504
504
  })
505
505
  };
506
506
  }
507
- var Cr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
507
+ var qr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
508
508
  viewBox: "0 0 1 1",
509
509
  preserveAspectRatio: "none",
510
510
  width: "100%",
@@ -512,11 +512,11 @@ var Cr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
512
512
  pointerEvents: "none",
513
513
  ...t,
514
514
  children: e
515
- }), qr = ({ box: e, children: t }) => /* @__PURE__ */ c("svg", {
516
- x: B(e.x0),
517
- y: B(e.y0),
518
- width: B(e.x1 - e.x0),
519
- height: B(e.y1 - e.y0),
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),
520
520
  overflow: "hidden",
521
521
  pointerEvents: "none",
522
522
  children: t
@@ -538,10 +538,10 @@ 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), I = r.getCacheStats(), q = m === null && T.length === 0, g = () => {
541
+ const m = Z(o, (l) => l.lastCompile), T = Z(o, (l) => l.history), w = r.getCacheStats(), C = m === null && T.length === 0, g = () => {
542
542
  u((l) => {
543
543
  const p = !l;
544
- return qe(p), p;
544
+ return Ce(p), p;
545
545
  });
546
546
  };
547
547
  return /* @__PURE__ */ v("div", {
@@ -558,7 +558,7 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
558
558
  children: "compile cache"
559
559
  }), /* @__PURE__ */ c("div", {
560
560
  className: bt,
561
- children: q ? "production: stats disabled" : m ? `last: ${m.label} · ${V(m.durationMs)}` : "awaiting first compile…"
561
+ children: C ? "production: stats disabled" : m ? `last: ${m.label} · ${V(m.durationMs)}` : "awaiting first compile…"
562
562
  })] }), /* @__PURE__ */ c("button", {
563
563
  type: "button",
564
564
  onClick: () => i((l) => !l),
@@ -579,11 +579,11 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
579
579
  children: "next compile reflects this toggle"
580
580
  })]
581
581
  }),
582
- !a && !q && /* @__PURE__ */ v(De, { children: [/* @__PURE__ */ c(Nt, {
582
+ !a && !C && /* @__PURE__ */ v(De, { children: [/* @__PURE__ */ c(Nt, {
583
583
  delta: m?.stages,
584
584
  durations: m?.stageDurationsMs,
585
- cumulative: I
586
- }), /* @__PURE__ */ c(Ct, { entries: T })] })
585
+ cumulative: w
586
+ }), /* @__PURE__ */ c(qt, { entries: T })] })
587
587
  ]
588
588
  });
589
589
  }, Nt = ({ delta: e, durations: t, cumulative: n }) => /* @__PURE__ */ v("table", {
@@ -617,7 +617,7 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
617
617
  })
618
618
  ]
619
619
  }) }), /* @__PURE__ */ c("tbody", { children: U.map((r) => {
620
- const o = e?.[r], a = qt(o);
620
+ const o = e?.[r], a = Ct(o);
621
621
  return /* @__PURE__ */ v("tr", {
622
622
  className: yt,
623
623
  children: [
@@ -655,7 +655,7 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
655
655
  ]
656
656
  }, r);
657
657
  }) })]
658
- }), Ct = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
658
+ }), qt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
659
659
  className: St,
660
660
  children: [/* @__PURE__ */ c("div", {
661
661
  className: Rt,
@@ -687,12 +687,12 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
687
687
  ]
688
688
  }, t.id);
689
689
  })]
690
- }), qt = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Gt = (e, t) => {
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
692
  for (const r of U) 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 = Ie(o, a, a);
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
696
  return H(() => ({
697
697
  ...i,
698
698
  undo: n,
@@ -713,14 +713,14 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
713
713
  "range",
714
714
  "reset",
715
715
  "submit"
716
- ]), wr = (e, t = {}) => {
716
+ ]), Ir = (e, t = {}) => {
717
717
  const { target: n, enabled: r = !0 } = t;
718
718
  M(() => {
719
- const o = wt(n);
719
+ const o = It(n);
720
720
  if (!r || !o) return;
721
721
  const a = (i) => {
722
- if (!It(i) || i.defaultPrevented || Dt(i.target)) return;
723
- const d = he(i);
722
+ if (!wt(i) || i.defaultPrevented || Dt(i.target)) return;
723
+ const d = pe(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
- }, 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;
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;
735
735
  export {
736
- xt as BrandMark,
737
- pr as CanvasTextMeasurer,
738
- Ft as DefaultFooter,
736
+ Ht as BrandMark,
737
+ Mt as CanvasTextMeasurer,
738
+ Kt as DefaultFooter,
739
739
  Qt as DefaultGrid,
740
740
  Pt as DefaultHeader,
741
- Kt as DefaultSwatch,
742
- dr as DefaultTooltip,
741
+ Bt as DefaultSwatch,
742
+ lr as DefaultTooltip,
743
743
  Gr as DevToolsPanel,
744
- er as GRAPH_MODES,
745
- Be as GraphErrorBoundary,
744
+ Wt as GRAPH_MODES,
745
+ Pe as GraphErrorBoundary,
746
746
  ee as GraphErrorPanel,
747
747
  ct as GraphProvider,
748
748
  ar as GraphRenderer,
749
- gr as HoverProvider,
750
- Bt as TextMeasurerProvider,
749
+ Ut as HoverProvider,
750
+ jt as TextMeasurerProvider,
751
751
  or as ThemeProvider,
752
- qr as UnitBoxSvg,
753
- Cr as UnitSpaceSvg,
752
+ Cr as UnitBoxSvg,
753
+ qr as UnitSpaceSvg,
754
754
  Nr as createGraphyKit,
755
- Xt as darkTheme,
756
- sr as defineGeomRenderer,
757
- Jt as lightTheme,
755
+ Jt as darkTheme,
756
+ xt as defineGeomRenderer,
757
+ er as lightTheme,
758
758
  Lt as lightenCss,
759
759
  Ae as pruneSelection,
760
- Vt as resolveBrandMarkVisual,
761
- nr as stampAxisEditTarget,
760
+ Yt as resolveBrandMarkVisual,
761
+ sr as stampAxisEditTarget,
762
762
  Ot as stampGridEditTarget,
763
763
  At as stampLegendEditTarget,
764
- hr as useElementScreenRect,
765
- Mt as useGeomHitTest,
766
- mr as useGeomHover,
767
- jt as useGeomReaderTree,
764
+ zt as useElementScreenRect,
765
+ gr as useGeomHitTest,
766
+ hr as useGeomHover,
767
+ $t as useGeomReaderTree,
768
768
  cr as useGraphCommands,
769
- Wt as useGraphHandle,
769
+ Xt as useGraphHandle,
770
770
  kr as useGraphHistory,
771
- wr as useGraphHistoryShortcuts,
772
- Zt as useGraphSelection,
773
- Yt as useGuidesTakePress,
774
- tr as useHandleScene,
775
- rr as useHoverState,
776
- Ht as useResolvedStyle,
777
- ir as useSceneSelector,
778
- $t as useStyleReaderTree,
779
- zt as useStyleReaders,
780
- ur as useStyleResolver,
781
- lr as useTargetBoundary,
782
- Ut as useTextMeasurer,
771
+ Ir as useGraphHistoryShortcuts,
772
+ tr as useGraphSelection,
773
+ Ft as useGuidesTakePress,
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,
783
783
  vr as vars
784
784
  };