@mechane-ai/elements 0.48.0 → 0.49.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 (140) hide show
  1. package/README.md +40 -2
  2. package/dist/ai.js +5 -5
  3. package/dist/{article-BXZr10QQ.js → article-CRlhq9oA.js} +532 -464
  4. package/dist/article.js +1 -1
  5. package/dist/catalog.json +243 -1
  6. package/dist/{categorical-values-BpVq8cFj.js → categorical-values-BYP_R5gS.js} +13 -13
  7. package/dist/{cells-xVmnQ9oQ.js → cells-CNZE4us2.js} +2 -2
  8. package/dist/charts/cartesian.js +1 -1
  9. package/dist/charts/cells.js +1 -1
  10. package/dist/charts/comparison.js +1 -1
  11. package/dist/charts/distribution.js +1 -1
  12. package/dist/charts/figure.js +12 -12
  13. package/dist/charts/graph.js +1 -1
  14. package/dist/charts/hierarchy.js +1 -1
  15. package/dist/charts/image.js +1 -1
  16. package/dist/charts/matrix.js +1 -1
  17. package/dist/charts/plot.js +7 -7
  18. package/dist/charts/relationship.js +1 -1
  19. package/dist/charts/text.js +1 -1
  20. package/dist/charts/timeline.js +1 -1
  21. package/dist/charts/trend.js +1 -1
  22. package/dist/charts.js +7 -7
  23. package/dist/{code-block-DioAM2bZ.js → code-block-BZsY2sh3.js} +1 -1
  24. package/dist/collections.js +1 -1
  25. package/dist/content/code.js +1 -1
  26. package/dist/content/diff.js +3 -3
  27. package/dist/content/link.js +1 -1
  28. package/dist/content/markdown.js +2 -2
  29. package/dist/content/tree.js +1 -1
  30. package/dist/{content-link-NWuHp5rC.js → content-link-PnpcnTCx.js} +1 -1
  31. package/dist/content.js +1 -1
  32. package/dist/{dates-Cww8UR_n.js → dates-ckJdYF7t.js} +1 -1
  33. package/dist/{dumbbell-plot-DQdTxDeO.js → dumbbell-plot-B-Tn7ewW.js} +49 -48
  34. package/dist/{embedding-map-CF-J-8JW.js → embedding-map-Bljn-A5q.js} +533 -533
  35. package/dist/feedback.js +1 -1
  36. package/dist/figure-frame-CEijciL7.js +289 -0
  37. package/dist/forms/dates.js +1 -1
  38. package/dist/forms.js +3 -3
  39. package/dist/{image-grid-Dl2sjIMB.js → image-grid-mrG5u9oE.js} +49 -49
  40. package/dist/index.js +1 -1
  41. package/dist/kits/evaluation.js +5 -5
  42. package/dist/kits/interpretability.js +320 -302
  43. package/dist/kits/operations.js +6 -6
  44. package/dist/kits/research.js +558 -0
  45. package/dist/kits/training.js +6 -6
  46. package/dist/layout.js +205 -110
  47. package/dist/lesson/spec.js +11 -11
  48. package/dist/lesson.js +4 -4
  49. package/dist/mdx.js +6 -6
  50. package/dist/navigation.js +2 -2
  51. package/dist/packages/charts/src/cartesian/index.d.ts +1 -1
  52. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +18 -0
  53. package/dist/packages/charts/src/chart-theme.d.ts +1 -1
  54. package/dist/packages/charts/src/figure/caption-scope.d.ts +12 -0
  55. package/dist/packages/charts/src/figure/figure-frame.d.ts +2 -1
  56. package/dist/packages/charts/src/index.d.ts +2 -0
  57. package/dist/packages/charts/src/plot/plot-surface.d.ts +3 -1
  58. package/dist/packages/collections/src/index.d.ts +1 -1
  59. package/dist/packages/collections/src/metrics.d.ts +9 -1
  60. package/dist/packages/content/src/index.d.ts +2 -0
  61. package/dist/packages/content/src/text-match.d.ts +22 -0
  62. package/dist/packages/core/src/index.d.ts +1 -0
  63. package/dist/packages/core/src/surfaces.d.ts +12 -2
  64. package/dist/packages/forms/src/index.d.ts +2 -0
  65. package/dist/packages/forms/src/token-input.d.ts +24 -0
  66. package/dist/packages/kits/src/interpretability/index.d.ts +1 -1
  67. package/dist/packages/kits/src/interpretability/logit-lens.d.ts +10 -1
  68. package/dist/packages/kits/src/research/finding-card.d.ts +43 -0
  69. package/dist/packages/kits/src/research/index.d.ts +8 -0
  70. package/dist/packages/kits/src/research/milestone-path.d.ts +36 -0
  71. package/dist/packages/kits/src/research/specimen-diff.d.ts +41 -0
  72. package/dist/packages/kits/src/research/work-heartbeat.d.ts +34 -0
  73. package/dist/packages/layout/src/figure-grid.d.ts +8 -0
  74. package/dist/packages/layout/src/index.d.ts +4 -1
  75. package/dist/packages/layout/src/sidebar.d.ts +7 -0
  76. package/dist/packages/layout/src/workbench.d.ts +4 -1
  77. package/dist/packages/teaching/src/article/article-context.d.ts +2 -0
  78. package/dist/packages/teaching/src/article/article-layout.stylex.d.ts +13 -0
  79. package/dist/packages/teaching/src/article/article.d.ts +6 -1
  80. package/dist/packages/teaching/src/article/figure.d.ts +20 -3
  81. package/dist/packages/teaching/src/article/index.d.ts +1 -1
  82. package/dist/packages/teaching/src/article/view-essay.d.ts +2 -1
  83. package/dist/packages/teaching/src/lesson/define-lesson.d.ts +4 -0
  84. package/dist/packages/teaching/src/lesson/index.d.ts +2 -2
  85. package/dist/packages/teaching/src/lesson/lesson-player.d.ts +19 -3
  86. package/dist/packages/teaching/src/lesson/lesson-store.d.ts +2 -0
  87. package/dist/packages/teaching/src/lesson/playback.d.ts +9 -6
  88. package/dist/packages/teaching/src/lesson/use-lesson.d.ts +7 -2
  89. package/dist/packages/teaching/src/scene/plane/plane-labels.d.ts +4 -1
  90. package/dist/packages/teaching/src/scene/plane/scene-point.d.ts +5 -6
  91. package/dist/packages/teaching/src/scene/scene-geometry.d.ts +1 -1
  92. package/dist/packages/teaching/src/scene/scene-node.d.ts +4 -1
  93. package/dist/packages/teaching/src/scene/scene-validate.d.ts +6 -0
  94. package/dist/packages/teaching/src/scene/scene-wire.d.ts +6 -1
  95. package/dist/packages/teaching/src/scene/scene.d.ts +1 -1
  96. package/dist/packages/teaching/src/scene/shapes/cell-grid.d.ts +5 -1
  97. package/dist/packages/teaching/src/scene/shapes/scene-cells.d.ts +1 -1
  98. package/dist/packages/teaching/src/scene/shapes/scene-slot.d.ts +1 -1
  99. package/dist/packages/teaching/src/time/tween.d.ts +2 -0
  100. package/dist/{param-CqKUTHaO.js → param-BdqTpZER.js} +175 -108
  101. package/dist/{pierre-diff-DlvjyuJn.js → pierre-diff-aGyQK5xK.js} +1 -1
  102. package/dist/{plot-axes-DJkLW4wk.js → plot-axes-D5S9BnBa.js} +1 -1
  103. package/dist/{plot-layout-CZVSJ-le.js → plot-layout-B2xRt-_k.js} +146 -132
  104. package/dist/{plot-marks-uozcbOIX.js → plot-marks-FVsbFkUs.js} +3 -3
  105. package/dist/{plot-surface-CbVBvgqZ.js → plot-surface-0cKFwtws.js} +11 -11
  106. package/dist/{plot-width-DcqtSgzb.js → plot-width-D3hTycYX.js} +1 -1
  107. package/dist/{reference-lines-BDcttOp0.js → reference-lines-nSxcZVF5.js} +2 -2
  108. package/dist/{scene-0z2gbaDE.js → scene-BwJKueD6.js} +1228 -1126
  109. package/dist/scene.js +1 -1
  110. package/dist/{slope-chart-BKVEAVCs.js → slope-chart-CGTYbFxi.js} +182 -182
  111. package/dist/{src-CpdJlDhO.js → src-9EJskqB_.js} +73 -31
  112. package/dist/{src-Dcfq8vE4.js → src-B2rgpWap.js} +48 -14
  113. package/dist/{src-BPTDJqt0.js → src-Ci8DeY8J.js} +1 -1
  114. package/dist/{src-CGc_hjxJ.js → src-DFW49IAs.js} +143 -111
  115. package/dist/{src-BD6xlvDt.js → src-Dxs3Buo_.js} +203 -137
  116. package/dist/{src-CExIrXPC.js → src-npqwq3Sa.js} +1 -1
  117. package/dist/styles2.css +136 -17
  118. package/dist/{time-series-BgzGNOk0.js → time-series-Dh8y5ba0.js} +1018 -944
  119. package/dist/{token-heatmap-BrW1OsKD.js → token-heatmap-BTrZ3-N4.js} +86 -86
  120. package/dist/{token-predictions-yerq_Oet.js → token-predictions-CUe4junQ.js} +129 -129
  121. package/dist/{transport-BJweqDPj.js → transport-4V9rfYHN.js} +291 -246
  122. package/dist/{tree-diagram-D09BRqE-.js → tree-diagram-Dpqmo-fh.js} +118 -118
  123. package/dist/{treemap-CW4WsJNL.js → treemap-BUSaVD3m.js} +28 -28
  124. package/dist/use-tween-BsaEO862.js +10 -0
  125. package/dist/{violin-plot-DrtPZ1-T.js → violin-plot-BxaLwdRi.js} +126 -126
  126. package/dist/{waterfall-DYLSnGjm.js → waterfall-CcDMdKec.js} +43 -43
  127. package/package.json +5 -1
  128. package/recipes/counting-cards.tsx +3 -3
  129. package/skills/review-explainer/SKILL.md +2 -1
  130. package/skills/upgrade-elements/references/releases.md +61 -0
  131. package/skills/use-elements/SKILL.md +3 -1
  132. package/skills/use-elements/references/kits.md +7 -6
  133. package/skills/use-elements/references/styling.md +23 -0
  134. package/skills/use-elements/references/teaching.md +13 -0
  135. package/skills/write-explainer/references/article.md +50 -2
  136. package/skills/write-explainer/references/lesson.md +18 -9
  137. package/skills/write-explainer/references/scene-parts.md +17 -12
  138. package/skills/write-explainer/references/scene.md +25 -3
  139. package/dist/figure-frame-BJ3REgTA.js +0 -270
  140. package/dist/use-tween-5HZ55_9d.js +0 -72
@@ -1,4 +1,4 @@
1
- import { A as e } from "./src-CpdJlDhO.js";
1
+ import { A as e } from "./src-9EJskqB_.js";
2
2
  import "@stylexjs/stylex";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  // packages/content/src/content-link.tsx
package/dist/content.js CHANGED
@@ -1 +1 @@
1
- export { o as JsonViewer, a as LogViewer, r as MediaViewer, i as MediaViewerPlaceholder, n as StackTrace, t as Trace } from "./src-CGc_hjxJ.js";
1
+ export { u as JsonViewer, l as LogViewer, s as MediaViewer, c as MediaViewerPlaceholder, o as StackTrace, t as TextMatch, a as Trace, n as fuzzyScore, r as matchRanges, i as matchSegments } from "./src-DFW49IAs.js";
@@ -1,6 +1,6 @@
1
1
  import { r as e } from "./control-styles-D3q_Qyxi.js";
2
2
  import { n as t, t as n } from "./forms-CEbwzlRR.js";
3
- import { D as r, T as i, k as a } from "./src-CpdJlDhO.js";
3
+ import { D as r, T as i, k as a } from "./src-9EJskqB_.js";
4
4
  import { r as o } from "./src-na2DdkKI.js";
5
5
  import * as s from "@stylexjs/stylex";
6
6
  import { useEffect as c, useId as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
@@ -1,14 +1,14 @@
1
1
  import { r as e } from "./tokens.stylex-dF5CACEJ.js";
2
- import { A as t, O as n, S as r, a as i, c as a, i as o, k as s, n as c, w as l, x as u } from "./plot-layout-CZVSJ-le.js";
2
+ import { A as t, E as n, M as r, S as i, a, c as o, i as s, j as c, n as l, x as u } from "./plot-layout-B2xRt-_k.js";
3
3
  import { i as d, r as f } from "./chart-link-AE_xuxiP.js";
4
4
  import { a as p } from "./tone-scope-DKiSw-JR.js";
5
5
  import { r as m } from "./figure-format-B8kRZMlo.js";
6
6
  import { a as h, o as g } from "./scale-C2xgZyZN.js";
7
- import { i as _, l as v, n as y, r as b, t as x } from "./figure-frame-BJ3REgTA.js";
8
- import { n as S } from "./plot-width-DcqtSgzb.js";
9
- import { t as C } from "./plot-axes-DJkLW4wk.js";
10
- import { a as w, f as T, r as E, s as D } from "./plot-marks-uozcbOIX.js";
11
- import { n as O, r as k, t as A } from "./plot-surface-CbVBvgqZ.js";
7
+ import { i as _, l as v, n as y, r as b, t as x } from "./figure-frame-CEijciL7.js";
8
+ import { n as S } from "./plot-width-D3hTycYX.js";
9
+ import { t as C } from "./plot-axes-D5S9BnBa.js";
10
+ import { a as w, f as T, r as E, s as D } from "./plot-marks-FVsbFkUs.js";
11
+ import { n as O, r as k, t as A } from "./plot-surface-0cKFwtws.js";
12
12
  import { t as ee } from "./locate-Bcg3QcP4.js";
13
13
  import * as j from "@stylexjs/stylex";
14
14
  import { useId as M } from "react";
@@ -24,18 +24,18 @@ var te = 56, I = {
24
24
  $$css: !0
25
25
  }
26
26
  };
27
- function L({ rows: e, value: n, valueDomain: r, rowsMax: i }) {
28
- let a = g(r, n.scale);
27
+ function L({ rows: e, value: t, valueDomain: n, rowsMax: i }) {
28
+ let a = g(n, t.scale);
29
29
  if (a !== void 0) return a;
30
- if (!t(e)) return "Rows must have unique identifiers.";
30
+ if (!r(e)) return "Rows must have unique identifiers.";
31
31
  if (e.length > i) return `This chart draws at most ${i} rows. Supply the leading rows or group the rest.`;
32
32
  }
33
33
  function R(e, t) {
34
34
  let n = new Set(e.map((e) => e.id));
35
35
  return t.filter((e) => !n.has(e));
36
36
  }
37
- function z({ frame: e, isEmpty: t, emptyLabel: i, rows: f, value: p, valueDomain: m, height: h, rowStep: g, items: _, legend: b, hasLegend: w, grid: T, selected: E, onSelectedChange: D, renderMarks: L }) {
38
- let R = k(h), z = M(), B = d(), V = Math.max(a[h], f.length * g + te), H = o({
37
+ function z({ frame: e, isEmpty: r, emptyLabel: a, rows: f, value: p, valueDomain: m, height: h, rowStep: g, items: _, legend: b, hasLegend: w, grid: T, selected: E, onSelectedChange: D, renderMarks: L }) {
38
+ let R = k(h), z = M(), B = d(), V = Math.max(o[h], f.length * g + te), H = s({
39
39
  width: R.width,
40
40
  height: V,
41
41
  direction: "rows",
@@ -51,7 +51,7 @@ function z({ frame: e, isEmpty: t, emptyLabel: i, rows: f, value: p, valueDomain
51
51
  y: t
52
52
  }];
53
53
  });
54
- return /* @__PURE__ */ P(l, {
54
+ return /* @__PURE__ */ P(n, {
55
55
  ...B,
56
56
  items: _,
57
57
  arrows: "both",
@@ -63,8 +63,8 @@ function z({ frame: e, isEmpty: t, emptyLabel: i, rows: f, value: p, valueDomain
63
63
  }),
64
64
  selected: E,
65
65
  onSelect: D,
66
- render: (a, o) => {
67
- let l = _.find((e) => e.id === o.inspected)?.id, d = _.find((e) => e.id === o.selected)?.id, m = _.find((e) => e.id === o.cursor)?.id;
66
+ render: (n, o) => {
67
+ let s = _.find((e) => e.id === o.inspected)?.id, d = _.find((e) => e.id === o.selected)?.id, m = _.find((e) => e.id === o.cursor)?.id;
68
68
  function h(e) {
69
69
  return {
70
70
  y: (W.start(e) ?? 0) - (W.step - W.bandwidth) / 2,
@@ -73,24 +73,24 @@ function z({ frame: e, isEmpty: t, emptyLabel: i, rows: f, value: p, valueDomain
73
73
  }
74
74
  return /* @__PURE__ */ P(y, {
75
75
  ...e,
76
- figure: a,
76
+ figure: n,
77
77
  series: b,
78
- seriesLegend: w && !t ? /* @__PURE__ */ P(u, { items: b }) : void 0,
79
- footer: t ? void 0 : /* @__PURE__ */ P(r, {
78
+ seriesLegend: w && !r ? /* @__PURE__ */ P(u, { items: b }) : void 0,
79
+ footer: r ? void 0 : /* @__PURE__ */ P(i, {
80
80
  id: z,
81
- children: n(_, l ?? null)
81
+ children: t(_, s ?? null)
82
82
  }),
83
- children: t ? /* @__PURE__ */ P(x, { children: i }) : /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F(O, {
83
+ children: r ? /* @__PURE__ */ P(x, { children: a }) : /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F(O, {
84
84
  plotRef: R.ref,
85
85
  box: U,
86
- label: s({
86
+ label: c({
87
87
  title: e.title,
88
88
  marks: "rows",
89
89
  isSelectable: D !== void 0
90
90
  }),
91
91
  readoutId: z,
92
92
  children: [
93
- f.filter((e) => e.id === l || e.id === d).map((e) => /* @__PURE__ */ P("rect", {
93
+ f.filter((e) => e.id === s || e.id === d).map((e) => /* @__PURE__ */ P("rect", {
94
94
  x: U.left,
95
95
  width: U.innerWidth,
96
96
  ...h(e.id),
@@ -103,14 +103,15 @@ function z({ frame: e, isEmpty: t, emptyLabel: i, rows: f, value: p, valueDomain
103
103
  box: U,
104
104
  xTicks: H.valueTicks,
105
105
  yTicks: H.bandTicks,
106
- xTitle: c(p),
106
+ xTitle: l(p),
107
107
  grid: T
108
108
  }),
109
109
  /* @__PURE__ */ P(A, {
110
110
  box: U,
111
+ pad: 6,
111
112
  children: L({
112
113
  plot: H,
113
- inspected: l,
114
+ inspected: s,
114
115
  selected: d
115
116
  })
116
117
  }),
@@ -180,12 +181,12 @@ function K({ rows: e, value: t, valueDomain: n }) {
180
181
  }
181
182
  }
182
183
  function q(e) {
183
- let { rows: t, value: n, selected: r, onSelectedChange: a, height: o = "regular", ...s } = e, { emptyLabel: c = "No measurements are available.", ...l } = s, { locale: u } = l;
184
+ let { rows: t, value: n, selected: r, onSelectedChange: i, height: o = "regular", ...s } = e, { emptyLabel: c = "No measurements are available.", ...l } = s, { locale: u } = l;
184
185
  if (l.status === "loading") return /* @__PURE__ */ P(_, {
185
186
  ...l,
186
187
  height: o
187
188
  });
188
- let d = n.domain ?? i({
189
+ let d = n.domain ?? a({
189
190
  values: t.flatMap((e) => [
190
191
  e.value,
191
192
  e.target ?? null,
@@ -244,7 +245,7 @@ function q(e) {
244
245
  hasLegend: !0,
245
246
  grid: "x",
246
247
  selected: r,
247
- onSelectedChange: a,
248
+ onSelectedChange: i,
248
249
  renderMarks: ({ plot: e, inspected: n, selected: r }) => t.flatMap((t) => {
249
250
  let i = e.band.center(t.id), a = e.band.start(t.id);
250
251
  if (i === void 0 || a === void 0) return [];
@@ -284,33 +285,33 @@ var J = {
284
285
  rows: 60,
285
286
  series: 6
286
287
  }, Y = 4, X = 9, Z = 12;
287
- function ne({ rows: e, series: n, value: r, valueDomain: i }) {
288
+ function ne({ rows: e, series: t, value: n, valueDomain: i }) {
288
289
  let a = L({
289
290
  rows: e,
290
- value: r,
291
+ value: n,
291
292
  valueDomain: i,
292
293
  rowsMax: J.rows
293
294
  });
294
295
  if (a !== void 0) return a;
295
- if (!t(n)) return "Series must have unique identifiers.";
296
- if (n.length > J.series) return `This chart draws at most ${J.series} series.`;
297
- for (let t of n) {
298
- if (R(e, [...Object.keys(t.values), ...Object.keys(t.intervals ?? {})]).length > 0) return `Series ${t.id} has values for rows that are not listed.`;
299
- let n = Object.values(t.intervals ?? {}).flatMap((e) => [e.lower, e.upper]);
300
- if ([...Object.values(t.values), ...n].some((e) => e !== null && h(e, i))) return `Series ${t.id} has a value that is not finite or lies outside the declared domain.`;
301
- if (Object.values(t.intervals ?? {}).some((e) => e.lower > e.upper)) return `Series ${t.id} has an interval whose lower bound is above its upper bound.`;
296
+ if (!r(t)) return "Series must have unique identifiers.";
297
+ if (t.length > J.series) return `This chart draws at most ${J.series} series.`;
298
+ for (let n of t) {
299
+ if (R(e, [...Object.keys(n.values), ...Object.keys(n.intervals ?? {})]).length > 0) return `Series ${n.id} has values for rows that are not listed.`;
300
+ let t = Object.values(n.intervals ?? {}).flatMap((e) => [e.lower, e.upper]);
301
+ if ([...Object.values(n.values), ...t].some((e) => e !== null && h(e, i))) return `Series ${n.id} has a value that is not finite or lies outside the declared domain.`;
302
+ if (Object.values(n.intervals ?? {}).some((e) => e.lower > e.upper)) return `Series ${n.id} has an interval whose lower bound is above its upper bound.`;
302
303
  }
303
304
  }
304
305
  function re(e) {
305
- let { rows: t, series: n, value: r, highlighted: a, selected: o, onSelectedChange: s, height: c = "regular", ...l } = e, { emptyLabel: u = "No values are available.", ...d } = l, { locale: h } = d, g = p(), v = f({
306
+ let { rows: t, series: n, value: r, highlighted: i, selected: o, onSelectedChange: s, height: c = "regular", ...l } = e, { emptyLabel: u = "No values are available.", ...d } = l, { locale: h } = d, g = p(), v = f({
306
307
  ids: n.map((e) => e.id),
307
- highlighted: a
308
+ highlighted: i
308
309
  });
309
310
  if (d.status === "loading") return /* @__PURE__ */ P(_, {
310
311
  ...d,
311
312
  height: c
312
313
  });
313
- let y = r.domain ?? i({
314
+ let y = r.domain ?? a({
314
315
  values: n.flatMap((e) => [...Object.values(e.values), ...Object.values(e.intervals ?? {}).flatMap((e) => [e.lower, e.upper])]),
315
316
  scale: r.scale
316
317
  }), x = ne({
@@ -409,12 +410,12 @@ function ae({ rows: e, value: t, valueDomain: n }) {
409
410
  if (e.flatMap((e) => [e.from, e.to]).some((e) => e !== null && h(e, n))) return "A value is not finite or lies outside the declared domain.";
410
411
  }
411
412
  function oe(e) {
412
- let { rows: t, fromLabel: n, toLabel: r, fromTone: a = "series1", toTone: o = "series2", value: s } = e, { selected: c, onSelectedChange: l, height: u = "regular", ...d } = e, { emptyLabel: f = "No values are available.", ...p } = d, { locale: h } = p;
413
+ let { rows: t, fromLabel: n, toLabel: r, fromTone: i = "series1", toTone: o = "series2", value: s } = e, { selected: c, onSelectedChange: l, height: u = "regular", ...d } = e, { emptyLabel: f = "No values are available.", ...p } = d, { locale: h } = p;
413
414
  if (p.status === "loading") return /* @__PURE__ */ P(_, {
414
415
  ...p,
415
416
  height: u
416
417
  });
417
- let g = s.domain ?? i({
418
+ let g = s.domain ?? a({
418
419
  values: t.flatMap((e) => [e.from, e.to]),
419
420
  scale: s.scale
420
421
  }), v = ae({
@@ -462,7 +463,7 @@ function oe(e) {
462
463
  legend: [{
463
464
  id: "from",
464
465
  label: n,
465
- tone: a
466
+ tone: i
466
467
  }, {
467
468
  id: "to",
468
469
  label: r,
@@ -473,8 +474,8 @@ function oe(e) {
473
474
  selected: c,
474
475
  onSelectedChange: l,
475
476
  renderMarks: ({ plot: e, inspected: n, selected: r }) => t.flatMap((t) => {
476
- let i = e.band.center(t.id);
477
- if (i === void 0) return [];
477
+ let a = e.band.center(t.id);
478
+ if (a === void 0) return [];
478
479
  let s = {
479
480
  isInspected: t.id === n,
480
481
  isSelected: t.id === r
@@ -483,21 +484,21 @@ function oe(e) {
483
484
  t.from !== null && t.to !== null && /* @__PURE__ */ P(D, {
484
485
  x1: e.value.position(t.from),
485
486
  x2: e.value.position(t.to),
486
- y1: i,
487
- y2: i,
487
+ y1: a,
488
+ y2: a,
488
489
  tone: "neutral",
489
490
  emphasis: "context"
490
491
  }),
491
492
  t.from !== null && /* @__PURE__ */ P(w, {
492
493
  x: e.value.position(t.from),
493
- y: i,
494
- tone: a,
494
+ y: a,
495
+ tone: i,
495
496
  radius: $,
496
497
  ...s
497
498
  }),
498
499
  t.to !== null && /* @__PURE__ */ P(w, {
499
500
  x: e.value.position(t.to),
500
- y: i,
501
+ y: a,
501
502
  tone: o,
502
503
  radius: $,
503
504
  ...s