@mechane-ai/elements 0.51.0 → 0.52.1

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.
Files changed (62) hide show
  1. package/dist/ai.js +169 -169
  2. package/dist/{article-CRlhq9oA.js → article-BDVuehRt.js} +1 -1
  3. package/dist/article.js +1 -1
  4. package/dist/catalog.json +42 -1
  5. package/dist/{categorical-values-BYP_R5gS.js → categorical-values-BoS03HcI.js} +1 -1
  6. package/dist/charts/cartesian.js +1 -1
  7. package/dist/charts/comparison.js +1 -1
  8. package/dist/charts/distribution.js +1 -1
  9. package/dist/charts/figure.js +12 -13
  10. package/dist/charts/graph.js +1 -1
  11. package/dist/charts/hierarchy.js +1 -1
  12. package/dist/charts/image.js +1 -1
  13. package/dist/charts/matrix.js +1 -1
  14. package/dist/charts/plot.js +3 -3
  15. package/dist/charts/relationship.js +1 -1
  16. package/dist/charts/text.js +1 -1
  17. package/dist/charts/timeline.js +1 -1
  18. package/dist/charts/trend.js +1 -1
  19. package/dist/charts.js +2 -2
  20. package/dist/collections.js +1 -1
  21. package/dist/content/markdown.js +1 -278
  22. package/dist/{dates-ckJdYF7t.js → dates-CjlTzw00.js} +1 -1
  23. package/dist/{dumbbell-plot-BC8d_IJy.js → dumbbell-plot-Xxl6P7D1.js} +3 -3
  24. package/dist/{embedding-map-Bj8krO-d.js → embedding-map-tU8hT_aC.js} +3 -3
  25. package/dist/{figure-frame-koVKcXph.js → figure-frame-BKc9TvtX.js} +1 -1
  26. package/dist/forms/dates.js +1 -1
  27. package/dist/{image-grid-CLhol2jy.js → image-grid-BZy2lkNb.js} +2 -2
  28. package/dist/kits/evaluation.js +4 -4
  29. package/dist/kits/interpretability.js +7 -7
  30. package/dist/kits/operations.js +4 -4
  31. package/dist/kits/research.js +463 -183
  32. package/dist/kits/training.js +3 -3
  33. package/dist/markdown-VpLw_P9T.js +313 -0
  34. package/dist/mdx.js +2 -2
  35. package/dist/packages/charts/src/graph/tree-diagram.d.ts +1 -1
  36. package/dist/packages/charts/src/plot/plot-layout.d.ts +0 -6
  37. package/dist/packages/charts/src/timeline/event-strip.d.ts +12 -2
  38. package/dist/packages/charts/src/timeline/index.d.ts +1 -1
  39. package/dist/packages/collections/src/metrics.d.ts +5 -11
  40. package/dist/packages/content/src/markdown/markdown.d.ts +8 -1
  41. package/dist/packages/kits/src/research/collection-page.d.ts +9 -0
  42. package/dist/packages/kits/src/research/index.d.ts +3 -1
  43. package/dist/packages/kits/src/research/lineage-graph.d.ts +40 -0
  44. package/dist/{plot-layout-B2xRt-_k.js → plot-layout-D8j-ozGR.js} +102 -86
  45. package/dist/{plot-surface-0cKFwtws.js → plot-surface-5e3xeiub.js} +1 -1
  46. package/dist/{reference-lines-nSxcZVF5.js → reference-lines-1FttCg46.js} +1 -1
  47. package/dist/{scene-4ePpWdmE.js → scene-8F-fQksU.js} +4 -4
  48. package/dist/scene.js +1 -1
  49. package/dist/{slope-chart-DWZIYDty.js → slope-chart-B35ZfaYn.js} +4 -4
  50. package/dist/{src-DNclWY4V.js → src-fvoTU3Bq.js} +377 -377
  51. package/dist/{time-series-CsngFxr1.js → time-series-DoFMGmFV.js} +612 -590
  52. package/dist/{token-heatmap-BQLIxPky.js → token-heatmap-DLPQWwMv.js} +3 -3
  53. package/dist/{token-predictions-C3B5L-eO.js → token-predictions-D_Jwf8Aw.js} +3 -3
  54. package/dist/{tree-diagram-Dau9jeXS.js → tree-diagram-DreDBCvt.js} +4 -4
  55. package/dist/{treemap-DWrMQndu.js → treemap-MVX-wa4t.js} +4 -4
  56. package/dist/{violin-plot-D05ODcyc.js → violin-plot-Bi71NqXF.js} +3 -3
  57. package/dist/waterfall-8y8ANO3c.js +605 -0
  58. package/package.json +1 -1
  59. package/recipes/calendar-workspace.tsx +39 -0
  60. package/skills/use-elements/references/workspace.md +8 -6
  61. package/dist/visible-motion-1GcUaEi4.js +0 -23
  62. package/dist/waterfall-BkLLv2Lm.js +0 -576
@@ -444,12 +444,12 @@ function Ce({ children: e }) {
444
444
  children: e
445
445
  });
446
446
  }
447
- function I() {
447
+ function we() {
448
448
  return g(F);
449
449
  }
450
450
  // packages/charts/src/chart-frame.tsx
451
- function we({ title: t, description: n, children: r, actions: i, footer: a, report: o, series: s = [], figure: c = {}, seriesLegend: l, scaleLegend: u }) {
452
- let f = _(), h = I() && i === void 0, g = /* @__PURE__ */ D(T, { children: [
451
+ function Te({ title: t, description: n, children: r, actions: i, footer: a, report: o, series: s = [], figure: c = {}, seriesLegend: l, scaleLegend: u }) {
452
+ let f = _(), h = we() && i === void 0, g = /* @__PURE__ */ D(T, { children: [
453
453
  l !== void 0 && /* @__PURE__ */ E("div", {
454
454
  className: "xeuugli x1jfksii",
455
455
  children: l
@@ -516,7 +516,7 @@ function we({ title: t, description: n, children: r, actions: i, footer: a, repo
516
516
  }), g]
517
517
  });
518
518
  }
519
- function Te({ items: e, label: t = "Legend", isScrollable: n = !1 }) {
519
+ function Ee({ items: e, label: t = "Legend", isScrollable: n = !1 }) {
520
520
  return /* @__PURE__ */ E("ul", {
521
521
  "aria-label": t,
522
522
  ...{
@@ -535,7 +535,7 @@ function Te({ items: e, label: t = "Legend", isScrollable: n = !1 }) {
535
535
  }, e.id))
536
536
  });
537
537
  }
538
- function Ee({ children: e, id: t }) {
538
+ function De({ children: e, id: t }) {
539
539
  return /* @__PURE__ */ E("p", {
540
540
  id: t,
541
541
  className: "x1ghz6dp xeuugli x1mqbd49 xbixft xy8obcc xas2l8k xss6m8b xj0a0fe",
@@ -543,42 +543,42 @@ function Ee({ children: e, id: t }) {
543
543
  });
544
544
  }
545
545
  // packages/charts/src/plot/ticks.ts
546
- var L = 10, De = 5, R = 2, Oe = 200, ke = 3, Ae = Math.sqrt(50), je = Math.sqrt(10), Me = Math.sqrt(R), Ne = [
546
+ var I = 10, Oe = 5, L = 2, ke = 200, Ae = 3, je = Math.sqrt(50), Me = Math.sqrt(10), Ne = Math.sqrt(L), Pe = [
547
547
  1,
548
- R,
549
- De
548
+ L,
549
+ Oe
550
550
  ];
551
- function Pe(e) {
552
- return e >= Ae ? L : e >= je ? De : e >= Me ? R : 1;
551
+ function Fe(e) {
552
+ return e >= je ? I : e >= Me ? Oe : e >= Ne ? L : 1;
553
553
  }
554
- function z(e, t) {
554
+ function R(e, t) {
555
555
  let [n, r] = e;
556
556
  if (!(t > 0) || !(r > n)) return [];
557
- let i = (r - n) / t, a = Math.floor(Math.log10(i)), o = Pe(i / L ** a), s = a < 0, c = s ? L ** -a / o : L ** a * o, l = s ? n * c : n / c, u = s ? r * c : r / c, d = Math.ceil(l - 2 ** -52 * Math.abs(l)), f = Math.floor(u + 2 ** -52 * Math.abs(u)), p = Math.max(0, Math.min(Oe, f - d + 1));
557
+ let i = (r - n) / t, a = Math.floor(Math.log10(i)), o = Fe(i / I ** a), s = a < 0, c = s ? I ** -a / o : I ** a * o, l = s ? n * c : n / c, u = s ? r * c : r / c, d = Math.ceil(l - 2 ** -52 * Math.abs(l)), f = Math.floor(u + 2 ** -52 * Math.abs(u)), p = Math.max(0, Math.min(ke, f - d + 1));
558
558
  return Array.from({ length: p }, (e, t) => s ? (d + t) / c : (d + t) * c);
559
559
  }
560
- function B(e, t) {
560
+ function z(e, t) {
561
561
  let [n, r] = e;
562
562
  if (!(n > 0) || !(r > n)) return [];
563
- let i = Math.floor(Math.log10(n)), a = Math.ceil(Math.log10(r)), o = Array.from({ length: a - i + 1 }, (e, t) => i + t), s = o.filter((e) => L ** e >= n && L ** e <= r);
564
- if (s.length >= Math.min(t, ke)) {
563
+ let i = Math.floor(Math.log10(n)), a = Math.ceil(Math.log10(r)), o = Array.from({ length: a - i + 1 }, (e, t) => i + t), s = o.filter((e) => I ** e >= n && I ** e <= r);
564
+ if (s.length >= Math.min(t, Ae)) {
565
565
  let e = Math.max(1, Math.ceil(s.length / Math.max(1, t)));
566
- return s.filter((t, n) => n % e === 0).map((e) => L ** e);
566
+ return s.filter((t, n) => n % e === 0).map((e) => I ** e);
567
567
  }
568
- return o.flatMap((e) => Ne.map((t) => t * L ** e)).filter((e) => e >= n && e <= r);
568
+ return o.flatMap((e) => Pe.map((t) => t * I ** e)).filter((e) => e >= n && e <= r);
569
569
  }
570
- function Fe(e, t) {
571
- let [n, r] = e, i = Math.max(1, Math.floor(t / R)), a = r > 1 ? B([1, r], i).filter((e) => Number.isInteger(Math.log10(e))) : [];
570
+ function Ie(e, t) {
571
+ let [n, r] = e, i = Math.max(1, Math.floor(t / L)), a = r > 1 ? z([1, r], i).filter((e) => Number.isInteger(Math.log10(e))) : [];
572
572
  return [
573
- ...(n < -1 ? B([1, -n], i).filter((e) => Number.isInteger(Math.log10(e))) : []).map((e) => -e).toReversed(),
573
+ ...(n < -1 ? z([1, -n], i).filter((e) => Number.isInteger(Math.log10(e))) : []).map((e) => -e).toReversed(),
574
574
  ...n <= 0 && r >= 0 ? [0] : [],
575
575
  ...a
576
576
  ].filter((e) => e >= n && e <= r);
577
577
  }
578
- function V({ domain: e, type: t = "linear", count: n }) {
579
- return t === "log" ? B(e, n) : t === "symlog" ? Fe(e, n) : z(e, n);
578
+ function Le({ domain: e, type: t = "linear", count: n }) {
579
+ return t === "log" ? z(e, n) : t === "symlog" ? Ie(e, n) : R(e, n);
580
580
  }
581
- var H = 1e3, U = {
581
+ var B = 1e3, V = {
582
582
  second: 1,
583
583
  fiveSeconds: 5,
584
584
  quarterMinute: 15,
@@ -600,50 +600,50 @@ var H = 1e3, U = {
600
600
  twoYears: 63072e3,
601
601
  fiveYears: 15768e4,
602
602
  decade: 31536e4
603
- }, Ie = U.day * H, Le = U.week * H;
604
- function Re({ domain: e, count: t, zoneOffset: n }) {
603
+ }, Re = V.day * B, ze = V.week * B;
604
+ function Be({ domain: e, count: t, zoneOffset: n }) {
605
605
  let [r, i] = e;
606
606
  if (!(t > 0) || !(i > r)) return [];
607
- let a = (i - r) / t, o = Object.values(U).map((e) => e * H).find((e) => e >= a) ?? U.year * H, s = o > Le ? Math.ceil((r + n) / Ie) * Ie : 0, c = s + Math.ceil((r + n - s) / o) * o, l = Math.max(0, Math.min(Oe, Math.floor((i + n - c) / o) + 1));
607
+ let a = (i - r) / t, o = Object.values(V).map((e) => e * B).find((e) => e >= a) ?? V.year * B, s = o > ze ? Math.ceil((r + n) / Re) * Re : 0, c = s + Math.ceil((r + n - s) / o) * o, l = Math.max(0, Math.min(ke, Math.floor((i + n - c) / o) + 1));
608
608
  return Array.from({ length: l }, (e, t) => c + t * o - n);
609
609
  }
610
610
  // packages/charts/src/plot/plot-layout.ts
611
- var ze = {
611
+ var Ve = {
612
612
  compact: 160,
613
613
  regular: 260,
614
614
  tall: 380
615
- }, W = 7, Be = 12, Ve = 44, He = 20, Ue = 28, We = 24, Ge = 12, Ke = 20, G = .4, qe = .5, Je = 2, Ye = 3, Xe = 120, Ze = 6, Qe = .4, $e = Array.from({ length: 4 }, (e, t) => t + 1), K = 10, q = 96, J = 56, et = 3, tt = .2, nt = 16, rt = 14, it = "\n", at = {
615
+ }, H = 7, He = 12, Ue = 44, We = 20, Ge = 28, Ke = 24, qe = 12, Je = 20, U = .4, Ye = .5, Xe = 2, Ze = 3, Qe = 120, $e = 6, et = .4, tt = Array.from({ length: 4 }, (e, t) => t + 1), W = 10, G = 96, K = 56, nt = 3, rt = .2, it = 16, at = 14, ot = "\n", st = {
616
616
  linear: void 0,
617
617
  log: "log scale",
618
618
  symlog: "symmetric log scale"
619
619
  };
620
- function ot(e) {
621
- let t = at[e.scale ?? "linear"];
620
+ function ct(e) {
621
+ let t = st[e.scale ?? "linear"];
622
622
  return t === void 0 ? e.label : `${e.label} (${t})`;
623
623
  }
624
- function st({ values: e, isZeroBased: t = !1, scale: n = "linear" }) {
624
+ function lt({ values: e, isZeroBased: t = !1, scale: n = "linear" }) {
625
625
  let r = e.flatMap((e) => e !== null && Number.isFinite(e) ? [e] : []), i = t && n !== "log" ? [...r, 0] : r;
626
- if (i.length === 0) return n === "log" ? [1, K] : [0, 1];
626
+ if (i.length === 0) return n === "log" ? [1, W] : [0, 1];
627
627
  let a = Math.min(...i), o = Math.max(...i);
628
628
  if (n === "log") {
629
- let e = K ** Math.floor(Math.log10(Math.max(a, Number.MIN_VALUE))), t = K ** Math.ceil(Math.log10(Math.max(o, Number.MIN_VALUE)));
630
- return [e, t > e ? t : e * K];
629
+ let e = W ** Math.floor(Math.log10(Math.max(a, Number.MIN_VALUE))), t = W ** Math.ceil(Math.log10(Math.max(o, Number.MIN_VALUE)));
630
+ return [e, t > e ? t : e * W];
631
631
  }
632
632
  if (a === o) return [a - 1, o + 1];
633
633
  if (n === "symlog") return [a, o];
634
- let [s, c] = z([a, o], et), l = s === void 0 || c === void 0 ? o - a : c - s;
634
+ let [s, c] = R([a, o], nt), l = s === void 0 || c === void 0 ? o - a : c - s;
635
635
  return [Math.floor(a / l) * l, Math.ceil(o / l) * l];
636
636
  }
637
- function Y({ width: e, valueLabels: t, hasXTitle: n, hasYTitle: r, leftShare: i = G }) {
638
- let a = Math.max(0, ...t.map((e) => e.length)) * W + Be + (r ? Ue : 0);
637
+ function q({ width: e, valueLabels: t, hasXTitle: n, hasYTitle: r, leftShare: i = U }) {
638
+ let a = Math.max(0, ...t.map((e) => e.length)) * H + He + (r ? Ge : 0);
639
639
  return {
640
- top: Ge,
641
- right: Ke,
642
- bottom: We + (n ? He : 0),
643
- left: Math.min(Math.max(Ve, a), e * i)
640
+ top: qe,
641
+ right: Je,
642
+ bottom: Ke + (n ? We : 0),
643
+ left: Math.min(Math.max(Ue, a), e * i)
644
644
  };
645
645
  }
646
- function X({ width: e, height: t, margins: n }) {
646
+ function J({ width: e, height: t, margins: n }) {
647
647
  let r = Math.max(n.left, e - n.right), i = Math.max(n.top, t - n.bottom);
648
648
  return {
649
649
  width: e,
@@ -656,10 +656,10 @@ function X({ width: e, height: t, margins: n }) {
656
656
  innerHeight: i - n.top
657
657
  };
658
658
  }
659
- function ct(e) {
659
+ function ut(e) {
660
660
  return new Set(e).size === e.length;
661
661
  }
662
- function lt(e, t) {
662
+ function Y(e, t) {
663
663
  return {
664
664
  ...e,
665
665
  minimumSignificantDigits: void 0,
@@ -668,7 +668,7 @@ function lt(e, t) {
668
668
  maximumFractionDigits: Math.max(e.maximumFractionDigits ?? 0, t)
669
669
  };
670
670
  }
671
- function ut(e, t) {
671
+ function dt(e, t) {
672
672
  return !t || typeof e == "function" || e.style !== "unit" ? e : {
673
673
  ...e,
674
674
  style: "decimal",
@@ -676,30 +676,46 @@ function ut(e, t) {
676
676
  unitDisplay: void 0
677
677
  };
678
678
  }
679
- function dt({ values: e, axis: t, locale: n, hasTitle: r }) {
680
- let i = ut(t.tickFormat ?? o(t.format), r), a = ut(t.format, r), s = (typeof i == "function" ? [i] : [
679
+ function X({ values: e, axis: t, locale: n, hasTitle: r }) {
680
+ let i = dt(t.tickFormat ?? o(t.format), r), a = dt(t.format, r), s = (typeof i == "function" ? [i] : [
681
681
  i,
682
- ...$e.map((e) => lt(i, e)),
683
- ...typeof a == "function" ? [] : $e.map((e) => lt(a, e))
682
+ ...tt.map((e) => Y(i, e)),
683
+ ...typeof a == "function" ? [] : tt.map((e) => Y(a, e))
684
684
  ]).map((t) => e.map((e) => c({
685
685
  value: e,
686
686
  locale: n,
687
687
  format: t
688
688
  })));
689
- return s.find(ct) ?? s.at(-1) ?? [];
689
+ return s.find(ut) ?? s.at(-1) ?? [];
690
690
  }
691
691
  function Z(e) {
692
- return e > Xe ? Ye : Je;
692
+ return e > Qe ? Ze : Xe;
693
+ }
694
+ function ft(e) {
695
+ let t = e.tickFormat ?? e.format;
696
+ return typeof t == "function" || e.scale === "log" ? !1 : t.maximumFractionDigits === 0 && t.style !== "percent";
693
697
  }
694
698
  function Q({ axis: e, domain: t, length: n, spacing: r, locale: i, hasTitle: a }) {
695
- let o = Z(n), s = Math.max(o, Math.round(n / r)), c = Array.from({ length: Ze }, (n, r) => V({
699
+ let o = Z(n), s = Math.max(o, Math.round(n / r)), c = Array.from({ length: $e }, (n, r) => Le({
696
700
  domain: t,
697
701
  type: e.scale,
698
702
  count: s + r
699
- })).filter((e, t) => t === 0 || e.length * r * Qe <= n), l = c.filter((e) => e.length >= o), u = l.find((e) => e[0] === t[0] && e.at(-1) === t[1]), d = l[0] ?? c[0] ?? [], f = u ?? d;
703
+ })).filter((e, t) => t === 0 || e.length * r * et <= n), l = c.filter((e) => e.length >= o), u = l.find((e) => e[0] === t[0] && e.at(-1) === t[1]), d = l[0] ?? c[0] ?? [], f = u ?? d;
704
+ if (ft(e)) {
705
+ let t = f.filter((e) => Number.isInteger(e)), n = t.length >= Xe ? t : f;
706
+ return {
707
+ values: n,
708
+ labels: X({
709
+ values: n,
710
+ axis: e,
711
+ locale: i,
712
+ hasTitle: a
713
+ })
714
+ };
715
+ }
700
716
  return {
701
717
  values: f,
702
- labels: dt({
718
+ labels: X({
703
719
  values: f,
704
720
  axis: e,
705
721
  locale: i,
@@ -714,17 +730,17 @@ function $(e, t) {
714
730
  label: t.labels[r] ?? ""
715
731
  }));
716
732
  }
717
- function ft(e) {
733
+ function pt(e) {
718
734
  let t = e.split(" ");
719
735
  return t.slice(1).map((e, n) => {
720
736
  let r = t.slice(0, n + 1).join(" "), i = t.slice(n + 1).join(" ");
721
737
  return {
722
- text: `${r}${it}${i}`,
738
+ text: `${r}${ot}${i}`,
723
739
  longest: Math.max(r.length, i.length)
724
740
  };
725
741
  }).toSorted((e, t) => e.longest - t.longest)[0]?.text ?? e;
726
742
  }
727
- function pt(e, t) {
743
+ function mt(e, t) {
728
744
  return t.flatMap((t) => {
729
745
  let n = e.center(t.id);
730
746
  return n === void 0 ? [] : [{
@@ -734,20 +750,20 @@ function pt(e, t) {
734
750
  }];
735
751
  });
736
752
  }
737
- function mt({ width: e, height: t, x: n, y: r, xDomain: i, yDomain: a, locale: o, rightGutter: s = 0 }) {
753
+ function ht({ width: e, height: t, x: n, y: r, xDomain: i, yDomain: a, locale: o, rightGutter: s = 0 }) {
738
754
  let c = Q({
739
755
  axis: r,
740
756
  domain: a,
741
757
  length: t,
742
- spacing: J,
758
+ spacing: K,
743
759
  locale: o,
744
760
  hasTitle: !0
745
- }), u = Y({
761
+ }), u = q({
746
762
  width: e,
747
763
  valueLabels: c.labels,
748
764
  hasXTitle: !0,
749
765
  hasYTitle: !0
750
- }), d = X({
766
+ }), d = J({
751
767
  width: e,
752
768
  height: t,
753
769
  margins: {
@@ -758,7 +774,7 @@ function mt({ width: e, height: t, x: n, y: r, xDomain: i, yDomain: a, locale: o
758
774
  axis: n,
759
775
  domain: i,
760
776
  length: d.innerWidth,
761
- spacing: q,
777
+ spacing: G,
762
778
  locale: o,
763
779
  hasTitle: !0
764
780
  }), p = l({
@@ -778,25 +794,25 @@ function mt({ width: e, height: t, x: n, y: r, xDomain: i, yDomain: a, locale: o
778
794
  yTicks: $(m, c)
779
795
  };
780
796
  }
781
- function ht({ width: e, height: t, direction: n, categories: r, value: i, valueDomain: a, locale: o, padding: s = tt, topInset: c = 0, rightGutter: d = 0, hasValueTitle: f = !0 }) {
797
+ function gt({ width: e, height: t, direction: n, categories: r, value: i, valueDomain: a, locale: o, padding: s = rt, topInset: c = 0, rightGutter: d = 0, hasValueTitle: f = !0 }) {
782
798
  let p = r.map((e) => e.id), m = n === "columns", h = Q({
783
799
  axis: i,
784
800
  domain: a,
785
801
  length: m ? t : e,
786
- spacing: m ? J : q,
802
+ spacing: m ? K : G,
787
803
  locale: o,
788
804
  hasTitle: f
789
- }), g = Y({
805
+ }), g = q({
790
806
  width: e,
791
807
  valueLabels: m ? h.labels : r.map((e) => e.label),
792
808
  hasXTitle: !m && f,
793
809
  hasYTitle: m && f,
794
- leftShare: m ? G : qe
810
+ leftShare: m ? U : Ye
795
811
  }), _ = {
796
812
  ...g,
797
813
  top: g.top + c,
798
814
  right: g.right + d
799
- }, v = X({
815
+ }, v = J({
800
816
  width: e,
801
817
  height: t,
802
818
  margins: _
@@ -804,15 +820,15 @@ function ht({ width: e, height: t, direction: n, categories: r, value: i, valueD
804
820
  ids: p,
805
821
  range: [v.left, v.right],
806
822
  padding: s
807
- }).step - nt, ee = r.some((e) => e.label.length * W > y), b = r.map((e) => ({
823
+ }).step - it, ee = r.some((e) => e.label.length * H > y), b = r.map((e) => ({
808
824
  ...e,
809
- label: ft(e.label)
810
- })), x = m && ee && b.every((e) => e.label.split(it).every((e) => e.length * W <= y)), S = x ? X({
825
+ label: pt(e.label)
826
+ })), x = m && ee && b.every((e) => e.label.split(ot).every((e) => e.length * H <= y)), S = x ? J({
811
827
  width: e,
812
828
  height: t,
813
829
  margins: {
814
830
  ..._,
815
- bottom: _.bottom + rt
831
+ bottom: _.bottom + at
816
832
  }
817
833
  }) : v, C = u({
818
834
  ids: p,
@@ -827,18 +843,18 @@ function ht({ width: e, height: t, direction: n, categories: r, value: i, valueD
827
843
  box: S,
828
844
  band: C,
829
845
  value: w,
830
- bandTicks: pt(C, x ? b : r),
846
+ bandTicks: mt(C, x ? b : r),
831
847
  valueTicks: $(w, h)
832
848
  };
833
849
  }
834
- function gt({ height: e, axes: t, locale: n, hasValueTitle: r = !1 }) {
835
- return Y({
850
+ function _t({ height: e, axes: t, locale: n, hasValueTitle: r = !1 }) {
851
+ return q({
836
852
  width: Infinity,
837
853
  valueLabels: t.flatMap(({ axis: t, domain: i }) => Q({
838
854
  axis: t,
839
855
  domain: i,
840
856
  length: e,
841
- spacing: J,
857
+ spacing: K,
842
858
  locale: n,
843
859
  hasTitle: r
844
860
  }).labels),
@@ -846,20 +862,20 @@ function gt({ height: e, axes: t, locale: n, hasValueTitle: r = !1 }) {
846
862
  hasYTitle: r
847
863
  }).left;
848
864
  }
849
- function _t({ width: e, height: t, value: n, valueDomain: r, timeDomain: i, timeFormat: a, locale: o, topInset: s = 0, gutter: c = 0, hasValueTitle: u = !1 }) {
865
+ function vt({ width: e, height: t, value: n, valueDomain: r, timeDomain: i, timeFormat: a, locale: o, topInset: s = 0, gutter: c = 0, hasValueTitle: u = !1 }) {
850
866
  let d = Q({
851
867
  axis: n,
852
868
  domain: r,
853
869
  length: t,
854
- spacing: J,
870
+ spacing: K,
855
871
  locale: o,
856
872
  hasTitle: u
857
- }), f = Y({
873
+ }), f = q({
858
874
  width: e,
859
875
  valueLabels: d.labels,
860
876
  hasXTitle: !1,
861
877
  hasYTitle: u
862
- }), p = Math.min(Math.max(f.left, c), e * G), m = X({
878
+ }), p = Math.min(Math.max(f.left, c), e * U), m = J({
863
879
  width: e,
864
880
  height: t,
865
881
  margins: {
@@ -879,7 +895,7 @@ function _t({ width: e, height: t, value: n, valueDomain: r, timeDomain: i, time
879
895
  box: m,
880
896
  x: h,
881
897
  y: g,
882
- xTicks: $(h, yt({
898
+ xTicks: $(h, bt({
883
899
  domain: i,
884
900
  length: m.innerWidth,
885
901
  timeFormat: a,
@@ -888,7 +904,7 @@ function _t({ width: e, height: t, value: n, valueDomain: r, timeDomain: i, time
888
904
  yTicks: $(g, d)
889
905
  };
890
906
  }
891
- var vt = [
907
+ var yt = [
892
908
  {
893
909
  month: "short",
894
910
  day: "numeric"
@@ -905,12 +921,12 @@ var vt = [
905
921
  second: "2-digit"
906
922
  }
907
923
  ];
908
- function yt({ domain: e, length: t, timeFormat: n, locale: r, timeZone: i }) {
909
- let o = typeof n == "function" ? i : n.timeZone, c = o === void 0 ? 0 : a(e[0], o), l = Z(t), u = Math.max(l, Math.round(t / q)), d = Array.from({ length: Ze }, (t, n) => Re({
924
+ function bt({ domain: e, length: t, timeFormat: n, locale: r, timeZone: i }) {
925
+ let o = typeof n == "function" ? i : n.timeZone, c = o === void 0 ? 0 : a(e[0], o), l = Z(t), u = Math.max(l, Math.round(t / G)), d = Array.from({ length: $e }, (t, n) => Be({
910
926
  domain: e,
911
927
  count: u + n,
912
928
  zoneOffset: c
913
- })), f = d.find((e) => e.length >= l) ?? d[0] ?? [], p = (typeof n == "function" ? [n] : [n, ...vt.map((e) => ({
929
+ })), f = d.find((e) => e.length >= l) ?? d[0] ?? [], p = (typeof n == "function" ? [n] : [n, ...yt.map((e) => ({
914
930
  ...e,
915
931
  ...n
916
932
  }))]).map((e) => f.map((t) => s({
@@ -920,7 +936,7 @@ function yt({ domain: e, length: t, timeFormat: n, locale: r, timeZone: i }) {
920
936
  })));
921
937
  return {
922
938
  values: f,
923
- labels: p.find(ct) ?? p.at(-1) ?? []
939
+ labels: p.find(ut) ?? p.at(-1) ?? []
924
940
  };
925
941
  }
926
- export { he as A, Ce as C, me as D, ue as E, re as M, fe as O, Ee as S, P as T, V as _, st as a, we as b, ze as c, Z as d, yt as f, B as g, z as h, ht as i, ge as j, pe as k, Y as l, gt as m, ot as n, mt as o, _t as p, pt as r, X as s, Q as t, dt as u, Fe as v, I as w, Te as x, Re as y };
942
+ export { he as A, Ce as C, me as D, ue as E, re as M, fe as O, De as S, P as T, Le as _, lt as a, Te as b, Ve as c, Z as d, bt as f, z as g, R as h, gt as i, ge as j, pe as k, q as l, _t as m, ct as n, ht as o, vt as p, mt as r, J as s, Q as t, X as u, Ie as v, we as w, Ee as x, Be as y };
@@ -1,5 +1,5 @@
1
1
  import { n as e, t } from "./plot-width-D3hTycYX.js";
2
- import { O as n, c as r } from "./plot-layout-B2xRt-_k.js";
2
+ import { O as n, c as r } from "./plot-layout-D8j-ozGR.js";
3
3
  import * as i from "@stylexjs/stylex";
4
4
  import { useId as a } from "react";
5
5
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { M as e } from "./plot-layout-B2xRt-_k.js";
1
+ import { M as e } from "./plot-layout-D8j-ozGR.js";
2
2
  import { t } from "./label-spacing-BncjePGb.js";
3
3
  import { n, t as r } from "./label-place-Z0fryBZb.js";
4
4
  import { c as i, f as a } from "./plot-marks-FVsbFkUs.js";
@@ -1,7 +1,7 @@
1
1
  import { i as e } from "./chart-link-AE_xuxiP.js";
2
- import { A as t, D as n, E as r, O as i, S as a, c as o, j as s, l as c, s as l, t as u, u as d } from "./plot-layout-B2xRt-_k.js";
3
- import { i as f, l as p, n as m, r as h, t as g } from "./figure-frame-koVKcXph.js";
4
- import { r as _, t as v } from "./plot-surface-0cKFwtws.js";
2
+ import { A as t, D as n, E as r, O as i, S as a, c as o, j as s, l as c, s as l, t as u, u as d } from "./plot-layout-D8j-ozGR.js";
3
+ import { i as f, l as p, n as m, r as h, t as g } from "./figure-frame-BKc9TvtX.js";
4
+ import { r as _, t as v } from "./plot-surface-5e3xeiub.js";
5
5
  import { a as y, i as b, r as x } from "./tone-scope-DKiSw-JR.js";
6
6
  import { _ as S, a as C, g as w, o as T, t as E, u as D } from "./param-BdqTpZER.js";
7
7
  import { n as O, t as k } from "./clock-DSm5lkNE.js";
@@ -16,7 +16,7 @@ import { a as z, c as ee, f as te, n as B, t as V, u as ne } from "./plot-marks-
16
16
  import { i as re, r as ie, t as ae } from "./path-BglsXpnO.js";
17
17
  import { t as oe } from "./plot-axes-D5S9BnBa.js";
18
18
  import { t as se } from "./heatmap-scale-Zte6Ya-g.js";
19
- import { d as ce, f as le } from "./token-predictions-C3B5L-eO.js";
19
+ import { d as ce, f as le } from "./token-predictions-D_Jwf8Aw.js";
20
20
  import * as H from "@stylexjs/stylex";
21
21
  import { Children as ue, createContext as de, memo as fe, use as pe, useEffect as me, useId as he, useLayoutEffect as U, useMemo as ge, useRef as _e, useState as W, useSyncExternalStore as ve } from "react";
22
22
  import { bindDrag as ye, dragThreshold as be } from "@ui-sdk/core";
package/dist/scene.js CHANGED
@@ -1 +1 @@
1
- export { r as LessonFlow, t as MorphScope, tt as Scene, H as SceneAxes, q as SceneBracket, G as SceneCallout, C as SceneCard, g as SceneCells, L as SceneCurve, U as SceneCustom, i as SceneFlow, J as SceneGroup, W as SceneHighlight, $ as SceneLayer, X as SceneNode, et as SceneOutside, I as ScenePoint, F as SceneProjection, P as SceneRegion, N as SceneRule, b as SceneSlot, x as SceneStack, u as SceneToken, l as SceneTokens, M as SceneVector, Y as SceneWire, w as cardRanks, T as cardSuits, v as cellGap, R as curveResolutions, nt as edgePoint, mt as fillLabel, a as flowNodeSize, s as flowPlan, c as flowPositions, n as morphLabels, rt as nodeBox, it as padRect, V as planeLabels, z as planeLimits, B as planeThicknesses, at as rectCenter, ot as rectsOverlap, E as sceneCardLabels, O as sceneCardSizes, y as sceneCellSizes, _ as sceneCellsLabels, st as sceneCircleSizes, Z as sceneContextColor, o as sceneFlowLabels, ht as sceneLabels, gt as sceneLimits, ct as sceneNodeSizes, Q as sceneOutlines, S as sceneStackLabels, _t as sceneStaggers, vt as sceneStore, d as sceneTokenLabels, lt as sidePoint, k as stackBounds, A as stackGaps, j as stackPlace, D as suitTones, p as tokenBox, m as tokenFlow, h as tokenGaps, f as tokenPercent, ut as unionRect, K as useObstacle, dt as useSceneContext, ft as useSceneFrames, pt as useSceneObject } from "./scene-4ePpWdmE.js";
1
+ export { r as LessonFlow, t as MorphScope, tt as Scene, H as SceneAxes, q as SceneBracket, G as SceneCallout, C as SceneCard, g as SceneCells, L as SceneCurve, U as SceneCustom, i as SceneFlow, J as SceneGroup, W as SceneHighlight, $ as SceneLayer, X as SceneNode, et as SceneOutside, I as ScenePoint, F as SceneProjection, P as SceneRegion, N as SceneRule, b as SceneSlot, x as SceneStack, u as SceneToken, l as SceneTokens, M as SceneVector, Y as SceneWire, w as cardRanks, T as cardSuits, v as cellGap, R as curveResolutions, nt as edgePoint, mt as fillLabel, a as flowNodeSize, s as flowPlan, c as flowPositions, n as morphLabels, rt as nodeBox, it as padRect, V as planeLabels, z as planeLimits, B as planeThicknesses, at as rectCenter, ot as rectsOverlap, E as sceneCardLabels, O as sceneCardSizes, y as sceneCellSizes, _ as sceneCellsLabels, st as sceneCircleSizes, Z as sceneContextColor, o as sceneFlowLabels, ht as sceneLabels, gt as sceneLimits, ct as sceneNodeSizes, Q as sceneOutlines, S as sceneStackLabels, _t as sceneStaggers, vt as sceneStore, d as sceneTokenLabels, lt as sidePoint, k as stackBounds, A as stackGaps, j as stackPlace, D as suitTones, p as tokenBox, m as tokenFlow, h as tokenGaps, f as tokenPercent, ut as unionRect, K as useObstacle, dt as useSceneContext, ft as useSceneFrames, pt as useSceneObject } from "./scene-8F-fQksU.js";
@@ -1,18 +1,18 @@
1
1
  import { t as e } from "./accessibility-P89UG9-r.js";
2
- import { A as t, E as n, M as r, S as i, a, j as o, l as s, n as c, o as l, s as u, t as d } from "./plot-layout-B2xRt-_k.js";
2
+ import { A as t, E as n, M as r, S as i, a, j as o, l as s, n as c, o as l, s as u, t as d } from "./plot-layout-D8j-ozGR.js";
3
3
  import { i as f, r as p } from "./chart-link-AE_xuxiP.js";
4
4
  import { a as m } from "./tone-scope-DKiSw-JR.js";
5
5
  import { r as h, t as g } from "./figure-format-B8kRZMlo.js";
6
6
  import { a as _, o as v, r as y } from "./scale-C2xgZyZN.js";
7
7
  import { t as b } from "./chart-cursor-1mFd48Jc.js";
8
- import { c as x, i as ee, l as S, n as te, o as C, r as w, t as T } from "./figure-frame-koVKcXph.js";
8
+ import { c as x, i as ee, l as S, n as te, o as C, r as w, t as T } from "./figure-frame-BKc9TvtX.js";
9
9
  import { n as E } from "./plot-width-D3hTycYX.js";
10
10
  import { t as D } from "./plot-axes-D5S9BnBa.js";
11
11
  import { a as O, c as k, l as A, n as ne, o as re } from "./plot-marks-FVsbFkUs.js";
12
- import { n as ie, r as ae, t as oe } from "./plot-surface-0cKFwtws.js";
12
+ import { n as ie, r as ae, t as oe } from "./plot-surface-5e3xeiub.js";
13
13
  import { t as j } from "./label-spacing-BncjePGb.js";
14
14
  import { n as se, t as ce } from "./label-place-Z0fryBZb.js";
15
- import { t as le } from "./reference-lines-nSxcZVF5.js";
15
+ import { t as le } from "./reference-lines-1FttCg46.js";
16
16
  import { n as ue, r as M, t as de } from "./path-BglsXpnO.js";
17
17
  import { t as fe } from "./locate-Bcg3QcP4.js";
18
18
  import { t as N } from "./heatmap-scale-Zte6Ya-g.js";