@mechane-ai/elements 0.44.0 → 0.46.0

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 (117) hide show
  1. package/README.md +48 -18
  2. package/bin/mechane-elements-catalog.mjs +42 -4
  3. package/dist/ai.js +268 -202
  4. package/dist/catalog.json +95 -31
  5. package/dist/categorical-values-BXi-rJuv.js +74 -0
  6. package/dist/chart-cursor-1mFd48Jc.js +23 -0
  7. package/dist/chart-data-CIJVWCYt.js +21 -0
  8. package/dist/chart-frame-BaxKn_MB.js +236 -0
  9. package/dist/{chart-input-B6_HXFDP.js → chart-input-Bm82_9Rd.js} +2 -2
  10. package/dist/chart-theme-4zprJ3rW.js +404 -0
  11. package/dist/charts/cartesian.js +1624 -1442
  12. package/dist/charts/distribution.js +486 -409
  13. package/dist/charts/graph.js +383 -358
  14. package/dist/charts/hierarchy.js +103 -94
  15. package/dist/charts/matrix.js +340 -333
  16. package/dist/charts/timeline.js +167 -134
  17. package/dist/charts.js +3 -3
  18. package/dist/{code-block-Cpfr7B6a.js → code-block-DioAM2bZ.js} +67 -52
  19. package/dist/collections.js +1648 -1188
  20. package/dist/{constants.stylex-CaVa9yGN.js → constants.stylex-CqhVl0uU.js} +9 -9
  21. package/dist/content/code.js +1 -1
  22. package/dist/content/diff.js +67 -66
  23. package/dist/content/link.js +1 -1
  24. package/dist/content/markdown.js +2 -2
  25. package/dist/content/tree.js +3 -3
  26. package/dist/{content-link-CGeFFb9F.js → content-link-NWuHp5rC.js} +1 -1
  27. package/dist/content.js +1 -1
  28. package/dist/csp.js +6 -11
  29. package/dist/feedback.js +1 -1
  30. package/dist/forms/dates.js +274 -214
  31. package/dist/{forms-DeU0Tiv3.js → forms-CEbwzlRR.js} +50 -41
  32. package/dist/forms.js +3 -3
  33. package/dist/index.js +1 -1
  34. package/dist/layout.js +207 -207
  35. package/dist/navigation.js +4 -3
  36. package/dist/packages/ai/src/conversation.d.ts +2 -0
  37. package/dist/packages/ai/src/prompt-input.d.ts +7 -2
  38. package/dist/packages/charts/src/cartesian/composition-bars.d.ts +2 -2
  39. package/dist/packages/charts/src/cartesian/index.d.ts +3 -2
  40. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +8 -2
  41. package/dist/packages/charts/src/cartesian/time-series.d.ts +11 -1
  42. package/dist/packages/charts/src/categorical-values.d.ts +14 -9
  43. package/dist/packages/charts/src/chart-frame.d.ts +7 -9
  44. package/dist/packages/charts/src/chart-inspection.d.ts +1 -2
  45. package/dist/packages/charts/src/chart-range.d.ts +33 -0
  46. package/dist/packages/charts/src/chart-rows.d.ts +20 -0
  47. package/dist/packages/charts/src/chart-theme.d.ts +25 -1
  48. package/dist/packages/charts/src/chart.d.ts +81 -0
  49. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +6 -4
  50. package/dist/packages/charts/src/index.d.ts +2 -1
  51. package/dist/packages/charts/src/matrix/matrix-strip.d.ts +3 -3
  52. package/dist/packages/charts/src/plot-width.d.ts +0 -1
  53. package/dist/packages/charts/src/timeline/index.d.ts +1 -1
  54. package/dist/packages/charts/src/timeline/waterfall.d.ts +6 -2
  55. package/dist/packages/collections/src/collection-controls.d.ts +5 -1
  56. package/dist/packages/collections/src/collection-filters.d.ts +4 -1
  57. package/dist/packages/collections/src/control-toolbar.d.ts +13 -0
  58. package/dist/packages/collections/src/data-table-layout.d.ts +78 -0
  59. package/dist/packages/collections/src/data-table-rows.d.ts +54 -0
  60. package/dist/packages/collections/src/data-table-styles.d.ts +340 -0
  61. package/dist/packages/collections/src/data-table-text.d.ts +13 -0
  62. package/dist/packages/collections/src/data-table-trigger.d.ts +23 -0
  63. package/dist/packages/collections/src/data-table.d.ts +3 -85
  64. package/dist/packages/collections/src/index.d.ts +11 -6
  65. package/dist/packages/collections/src/query-controls.d.ts +6 -2
  66. package/dist/packages/collections/src/table-results.d.ts +47 -13
  67. package/dist/packages/collections/src/timeline.d.ts +1 -0
  68. package/dist/packages/collections/src/use-collection-controls.d.ts +2 -1
  69. package/dist/packages/collections/src/use-table-window.d.ts +25 -0
  70. package/dist/packages/content/src/viewer.d.ts +8 -0
  71. package/dist/packages/core/src/disclosure.d.ts +9 -1
  72. package/dist/packages/core/src/index.d.ts +1 -0
  73. package/dist/packages/core/src/route-link.d.ts +11 -0
  74. package/dist/packages/forms/src/dates/date-inputs.d.ts +3 -1
  75. package/dist/packages/forms/src/file-picker.d.ts +15 -0
  76. package/dist/packages/forms/src/form-controls.d.ts +1 -6
  77. package/dist/packages/forms/src/forms.d.ts +4 -1
  78. package/dist/packages/forms/src/index.d.ts +4 -2
  79. package/dist/packages/forms/src/selection.d.ts +14 -0
  80. package/dist/packages/foundations/src/chart-tones.d.ts +5 -0
  81. package/dist/packages/foundations/src/csp/index.d.ts +1 -1
  82. package/dist/packages/foundations/src/csp/provider.d.ts +7 -2
  83. package/dist/packages/navigation/src/index.d.ts +1 -1
  84. package/dist/{pierre-diff-B3tD3-6z.js → pierre-diff-DlvjyuJn.js} +1 -1
  85. package/dist/plot-width-v2c_rA20.js +63 -0
  86. package/dist/{src-gqEebHEa.js → src-1EHkSFS-.js} +395 -274
  87. package/dist/{src-DBNncL7_.js → src-BPTDJqt0.js} +48 -68
  88. package/dist/src-CGc_hjxJ.js +409 -0
  89. package/dist/{src-DcW_gMX8.js → src-CpdJlDhO.js} +480 -362
  90. package/dist/{src-CDp1JtwC.js → src-DVHlknB6.js} +135 -120
  91. package/dist/styles2.css +167 -132
  92. package/dist/tokens.js +1 -1
  93. package/package.json +1 -4
  94. package/packages/foundations/src/constants.stylex.ts +9 -9
  95. package/packages/foundations/src/tokens.stylex.ts +9 -9
  96. package/skills/extend-elements/SKILL.md +74 -0
  97. package/skills/review-elements/SKILL.md +76 -0
  98. package/skills/upgrade-elements/SKILL.md +34 -0
  99. package/skills/upgrade-elements/references/releases.md +58 -0
  100. package/skills/use-elements/SKILL.md +64 -13
  101. package/skills/use-elements/references/agent.md +57 -0
  102. package/skills/use-elements/references/charts.md +63 -0
  103. package/skills/use-elements/references/collections.md +89 -0
  104. package/skills/use-elements/references/conversations.md +47 -0
  105. package/skills/use-elements/references/forms.md +81 -0
  106. package/skills/use-elements/references/reports.md +6 -4
  107. package/skills/use-elements/references/styling.md +70 -0
  108. package/skills/use-elements/references/workspace.md +3 -3
  109. package/dist/categorical-values-ByvFLaNE.js +0 -59
  110. package/dist/chart-frame-Bcd9Tpt5.js +0 -251
  111. package/dist/chart-navigation-BAbb5PV9.js +0 -154
  112. package/dist/header-styles-COxCYFZx.js +0 -90
  113. package/dist/packages/charts/src/chart-navigation.d.ts +0 -39
  114. package/dist/packages/charts/src/chart-surface.d.ts +0 -27
  115. package/dist/packages/navigation/src/route-link.d.ts +0 -2
  116. package/dist/plot-width-8cXdAjoD.js +0 -96
  117. package/dist/src-Bk7M67zy.js +0 -396
@@ -1,32 +1,35 @@
1
- import { c as e } from "../src-CDp1JtwC.js";
2
- import { a as t, n, t as r } from "../chart-navigation-BAbb5PV9.js";
3
- import { i, n as a, t as o } from "../chart-frame-Bcd9Tpt5.js";
4
- import { n as s, r as c, t as l } from "../chart-input-B6_HXFDP.js";
5
- import { n as u, t as d } from "../plot-width-8cXdAjoD.js";
6
- import * as f from "@stylexjs/stylex";
7
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
8
- import { scaleLinear as g } from "@visx/scale";
9
- import { Bar as _ } from "@visx/shape";
1
+ import { c as e, l as t } from "../src-DVHlknB6.js";
2
+ import { t as n } from "../chart-cursor-1mFd48Jc.js";
3
+ import { t as r } from "../chart-data-CIJVWCYt.js";
4
+ import { r as i, t as a } from "../chart-frame-BaxKn_MB.js";
5
+ import { n as o, r as s, t as c } from "../chart-input-Bm82_9Rd.js";
6
+ import { i as l, l as u, n as d, s as f, t as p } from "../chart-theme-4zprJ3rW.js";
7
+ import { n as m, r as h, t as g } from "../plot-width-v2c_rA20.js";
8
+ import * as _ from "@stylexjs/stylex";
9
+ import { useId as v } from "react";
10
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
11
+ import { scaleLinear as S } from "@visx/scale";
12
+ import { Bar as C } from "@visx/shape";
10
13
  // packages/charts/src/distribution/distribution-input.ts
11
- var v = {
14
+ var w = {
12
15
  bins: 200,
13
16
  cumulativePoints: 2e3,
14
17
  rows: 200
15
18
  };
16
- function y({ items: e, domain: t, maxEntries: n }) {
17
- if (!c(t)) return "The chart domain must contain two finite, increasing values.";
18
- if (!s(e)) return "Chart records must have unique identifiers.";
19
+ function T({ items: e, domain: t, maxEntries: n }) {
20
+ if (!s(t)) return "The chart domain must contain two finite, increasing values.";
21
+ if (!o(e)) return "Chart records must have unique identifiers.";
19
22
  if (e.length > n) return `This chart supports at most ${n} records. Supply an explicit data window or aggregation.`;
20
23
  }
21
- function b(e, t) {
24
+ function E(e, t) {
22
25
  return !Number.isFinite(e) || e < t[0] || e > t[1];
23
26
  }
24
27
  // packages/charts/src/distribution/distribution-plot.tsx
25
- var x = { height: 160 }, S = [
28
+ var D = { height: 160 }, O = [
26
29
  0,
27
30
  .5,
28
31
  1
29
- ], C = {
32
+ ], k = {
30
33
  plot: {
31
34
  k7Eaqz: "xeuugli",
32
35
  k1xSpc: "xrvj5dj",
@@ -40,7 +43,8 @@ var x = { height: 160 }, S = [
40
43
  kXwgrk: "xdt5ytf",
41
44
  kjj79g: "x1qughib",
42
45
  k9WMMc: "xp4054r",
43
- kMwMTN: "x153jb6y",
46
+ kMwMTN: "xbixft",
47
+ kMv6JI: "xiard35",
44
48
  kGuDYH: "xy8obcc",
45
49
  kLWn49: "xas2l8k",
46
50
  kcqcaj: "xss6m8b",
@@ -68,7 +72,8 @@ var x = { height: 160 }, S = [
68
72
  k1xSpc: "x78zum5",
69
73
  kjj79g: "x1qughib",
70
74
  kOIVth: "x1hnptsi",
71
- kMwMTN: "x153jb6y",
75
+ kMwMTN: "xbixft",
76
+ kMv6JI: "xiard35",
72
77
  kGuDYH: "xy8obcc",
73
78
  kLWn49: "xas2l8k",
74
79
  kcqcaj: "xss6m8b",
@@ -186,171 +191,179 @@ var x = { height: 160 }, S = [
186
191
  $$css: !0
187
192
  }
188
193
  };
189
- function w({ navigation: e, onInspectValue: t, xDomain: r, yDomain: i, xLabel: a, yLabel: o, formatX: s, formatY: c, children: l }) {
190
- let { ref: u, width: f } = d(), p = S.map((e) => r[0] + e * (r[1] - r[0])), g = S.map((e) => i[1] - e * (i[1] - i[0]));
191
- return /* @__PURE__ */ h("div", {
194
+ function A({ label: e, readoutId: t, xDomain: n, yDomain: r, xLabel: i, yLabel: a, formatX: o, formatY: s, children: c }) {
195
+ let { ref: u, width: d } = g(), f = O.map((e) => n[0] + e * (n[1] - n[0])), p = O.map((e) => r[1] - e * (r[1] - r[0]));
196
+ return /* @__PURE__ */ x("div", {
192
197
  className: "xeuugli xrvj5dj x37z1gs x1hnptsi",
193
198
  children: [
194
- /* @__PURE__ */ h("div", {
199
+ /* @__PURE__ */ x("div", {
195
200
  className: "x1osaytk x78zum5 x1qughib x1n8ia3y",
196
- children: [/* @__PURE__ */ m("span", {
197
- className: "x153jb6y xy8obcc xas2l8k xj0a0fe",
198
- children: o
199
- }), /* @__PURE__ */ m("span", {
201
+ children: [/* @__PURE__ */ b("span", {
200
202
  className: "x153jb6y xy8obcc xas2l8k xj0a0fe",
201
203
  children: a
204
+ }), /* @__PURE__ */ b("span", {
205
+ className: "x153jb6y xy8obcc xas2l8k xj0a0fe",
206
+ children: i
202
207
  })]
203
208
  }),
204
- /* @__PURE__ */ m("div", {
209
+ /* @__PURE__ */ b("div", {
205
210
  "aria-hidden": !0,
206
- className: "x1ymw6g x78zum5 xdt5ytf x1qughib xp4054r x153jb6y xy8obcc xas2l8k xss6m8b x2aouup xj0a0fe",
207
- children: g.map((e) => /* @__PURE__ */ m("span", { children: c(e) }, e))
211
+ className: "x1ymw6g x78zum5 xdt5ytf x1qughib xp4054r xbixft xiard35 xy8obcc xas2l8k xss6m8b x2aouup xj0a0fe",
212
+ children: p.map((e) => /* @__PURE__ */ b("span", { children: s(e) }, e))
208
213
  }),
209
- /* @__PURE__ */ m(n, {
214
+ /* @__PURE__ */ b(l, {
210
215
  ref: u,
211
- ...e,
212
- className: "xeuugli",
213
- children: /* @__PURE__ */ h("svg", {
216
+ role: "group",
217
+ "aria-label": e,
218
+ "aria-describedby": t,
219
+ className: "xeuugli x-default-marker",
220
+ children: /* @__PURE__ */ x("svg", {
214
221
  "aria-hidden": !0,
215
- onPointerMove: (e) => {
216
- let n = e.currentTarget.getBoundingClientRect();
217
- t?.(r[0] + (e.clientX - n.left) / n.width * (r[1] - r[0]));
218
- },
219
- onPointerDown: (e) => {
220
- let n = e.currentTarget.getBoundingClientRect();
221
- t?.(r[0] + (e.clientX - n.left) / n.width * (r[1] - r[0]));
222
- },
223
- viewBox: `0 0 ${f} ${x.height}`,
222
+ viewBox: `0 0 ${d} ${D.height}`,
224
223
  preserveAspectRatio: "none",
225
224
  className: "x1lliihq xh8yej3 x1ymw6g xb3r6kr",
226
- children: [S.map((e) => /* @__PURE__ */ m("line", {
225
+ children: [O.map((e) => /* @__PURE__ */ b("line", {
227
226
  x1: 0,
228
- x2: f,
229
- y1: x.height * e,
230
- y2: x.height * e,
227
+ x2: d,
228
+ y1: D.height * e,
229
+ y2: D.height * e,
231
230
  className: "x13hfdr1 x13efnbd"
232
- }, e)), l(f)]
231
+ }, e)), c(d)]
233
232
  })
234
233
  }),
235
- /* @__PURE__ */ m("span", {}),
236
- /* @__PURE__ */ m("div", {
234
+ /* @__PURE__ */ b("span", {}),
235
+ /* @__PURE__ */ b("div", {
237
236
  "aria-hidden": !0,
238
- className: "x78zum5 x1qughib x1hnptsi x153jb6y xy8obcc xas2l8k xss6m8b",
239
- children: p.map((e, t) => /* @__PURE__ */ m("span", {
237
+ className: "x78zum5 x1qughib x1hnptsi xbixft xiard35 xy8obcc xas2l8k xss6m8b",
238
+ children: f.map((e, t) => /* @__PURE__ */ b("span", {
240
239
  ...{
241
240
  0: { className: "x1cqoux5 xeuugli xj0a0fe" },
242
241
  2: { className: "x1cqoux5 xeuugli xj0a0fe x2b8uid" },
243
242
  1: { className: "x1cqoux5 xeuugli xj0a0fe xp4054r" },
244
243
  3: { className: "x1cqoux5 xeuugli xj0a0fe xp4054r" }
245
244
  }[(t === 1) << 1 | t === 2],
246
- children: s(e)
245
+ children: o(e)
247
246
  }, e))
248
247
  })
249
248
  ]
250
249
  });
251
250
  }
252
- function T({ domain: e, formatValue: t }) {
253
- return /* @__PURE__ */ h("div", {
254
- className: "x78zum5 x1qughib x1hnptsi x153jb6y xy8obcc xas2l8k xss6m8b",
255
- children: [/* @__PURE__ */ m("span", {
251
+ function j({ domain: e, formatValue: t }) {
252
+ return /* @__PURE__ */ x("div", {
253
+ className: "x78zum5 x1qughib x1hnptsi xbixft xiard35 xy8obcc xas2l8k xss6m8b",
254
+ children: [/* @__PURE__ */ b("span", {
256
255
  className: "x1cqoux5 xeuugli xj0a0fe",
257
256
  children: t(e[0])
258
- }), /* @__PURE__ */ m("span", {
257
+ }), /* @__PURE__ */ b("span", {
259
258
  className: "x1cqoux5 xeuugli xj0a0fe xp4054r",
260
259
  children: t(e[1])
261
260
  })]
262
261
  });
263
262
  }
264
263
  // packages/charts/src/distribution/ecdf.tsx
265
- function E({ title: n, report: o, description: s, points: c, domain: u, valueLabel: d, probabilityLabel: _, formatValue: v, formatProbability: y, tone: b = "series1", selection: S, emptyLabel: T = "No cumulative distribution points are available." }) {
266
- let E = c.map((e) => ({
264
+ var M = 6, N = 12;
265
+ function P({ title: t, report: o, description: s, points: l, domain: p, valueLabel: m, probabilityLabel: h, formatValue: g, formatProbability: C, tone: w = "series1", selection: T, emptyLabel: E = "No cumulative distribution points are available." }) {
266
+ let O = l.map((e) => ({
267
267
  id: e.id,
268
- label: `${d}: ${v(e.value)}, ${_}: ${e.probability === null ? "Unavailable" : y(e.probability)}`
269
- })), O = r({
270
- title: n,
271
- items: E,
272
- selection: S
273
- }), k = D({
274
- points: c,
275
- domain: u
268
+ label: `${m}: ${g(e.value)}, ${h}: ${e.probability === null ? "Unavailable" : C(e.probability)}`
269
+ })), j = v(), P = F({
270
+ points: l,
271
+ domain: p
276
272
  });
277
- if (k !== void 0) return /* @__PURE__ */ m(l, {
278
- title: n,
273
+ if (P !== void 0) return /* @__PURE__ */ b(c, {
274
+ title: t,
279
275
  report: o,
280
276
  description: s,
281
- message: k
277
+ message: P
282
278
  });
283
- let A = g({
279
+ let I = S({
284
280
  domain: [0, 1],
285
- range: [x.height, 0]
281
+ range: [D.height, 0]
286
282
  });
287
- return /* @__PURE__ */ m(a, {
288
- title: n,
289
- report: o,
290
- description: s,
291
- footer: /* @__PURE__ */ m(i, {
292
- id: O.id,
293
- children: O.label ?? "\xA0"
294
- }),
295
- children: c.length === 0 ? /* @__PURE__ */ m("p", {
296
- ...f.props(C.empty),
297
- children: T
298
- }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(w, {
299
- navigation: O.props,
300
- onInspectValue: (e) => {
301
- let t = { point: c[0] };
302
- for (let n of c) (t.point === void 0 || Math.abs(n.value - e) < Math.abs(t.point.value - e)) && (t.point = n);
303
- let n = t.point;
304
- n !== void 0 && O.inspect(n.id);
305
- },
306
- xDomain: u,
307
- yDomain: [0, 1],
308
- xLabel: d,
309
- yLabel: _,
310
- formatX: v,
311
- formatY: y,
312
- children: (t) => {
313
- let n = g({
314
- domain: [...u],
315
- range: [0, t]
316
- }), r = c.map((e, t) => {
317
- if (e.probability === null) return "";
318
- let r = n(e.value), i = A(e.probability), a = c[t - 1];
319
- return a === void 0 || a.probability === null ? `M ${r} ${i}` : `H ${r} V ${i}`;
320
- }).join(" ");
321
- return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("path", {
322
- d: r,
323
- fill: "none",
324
- stroke: e[b],
325
- strokeWidth: 2,
326
- vectorEffect: "non-scaling-stroke"
327
- }), c.map((t) => t.probability === null ? null : /* @__PURE__ */ m("circle", {
328
- onPointerEnter: () => O.inspect(t.id),
329
- onClick: () => S?.onSelect(t.id),
330
- cx: n(t.value),
331
- cy: A(t.probability),
332
- r: S?.selectedId === t.id || O.label !== void 0 && O.activeId === t.id ? 4 : 2,
333
- fill: e[b]
334
- }, t.id))] });
335
- }
336
- }), /* @__PURE__ */ m(t, {
337
- label: `${n} observations`,
338
- columns: [{
339
- id: "observation",
340
- label: "Observation"
341
- }],
342
- rows: E.map((e) => ({
343
- id: e.id,
344
- values: [e.label]
345
- }))
346
- })] })
283
+ return /* @__PURE__ */ b(d, {
284
+ items: O,
285
+ arrows: "both",
286
+ locate: (e) => {
287
+ let t = p[0] + e.x / e.width * (p[1] - p[0]), n = { point: l[0] };
288
+ for (let e of l) (n.point === void 0 || Math.abs(e.value - t) < Math.abs(n.point.value - t)) && (n.point = e);
289
+ return n.point?.id;
290
+ },
291
+ selected: T?.selectedId ?? null,
292
+ onSelect: T?.onSelect,
293
+ render: (c, { inspected: d, cursor: v }) => /* @__PURE__ */ b(a, {
294
+ figure: c,
295
+ title: t,
296
+ report: o,
297
+ description: s,
298
+ footer: /* @__PURE__ */ b(i, {
299
+ id: j,
300
+ children: f(O, d)
301
+ }),
302
+ children: l.length === 0 ? /* @__PURE__ */ b("p", {
303
+ ..._.props(k.empty),
304
+ children: E
305
+ }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(A, {
306
+ label: u({
307
+ title: t,
308
+ isSelectable: T !== void 0
309
+ }),
310
+ readoutId: j,
311
+ xDomain: p,
312
+ yDomain: [0, 1],
313
+ xLabel: m,
314
+ yLabel: h,
315
+ formatX: g,
316
+ formatY: C,
317
+ children: (t) => {
318
+ let r = S({
319
+ domain: [...p],
320
+ range: [0, t]
321
+ }), i = l.map((e, t) => {
322
+ if (e.probability === null) return "";
323
+ let n = r(e.value), i = I(e.probability), a = l[t - 1];
324
+ return a === void 0 || a.probability === null ? `M ${n} ${i}` : `H ${n} V ${i}`;
325
+ }).join(" "), a = l.find((e) => e.id === v);
326
+ return /* @__PURE__ */ x(y, { children: [
327
+ /* @__PURE__ */ b("path", {
328
+ d: i,
329
+ fill: "none",
330
+ stroke: e[w],
331
+ strokeWidth: 2,
332
+ vectorEffect: "non-scaling-stroke"
333
+ }),
334
+ l.map((t) => t.probability === null ? null : /* @__PURE__ */ b("circle", {
335
+ cx: r(t.value),
336
+ cy: I(t.probability),
337
+ r: T?.selectedId === t.id || d === t.id ? 4 : 2,
338
+ fill: e[w]
339
+ }, t.id)),
340
+ a !== void 0 && /* @__PURE__ */ b(n, {
341
+ x: r(a.value),
342
+ top: 0,
343
+ bottom: D.height - M,
344
+ width: N
345
+ })
346
+ ] });
347
+ }
348
+ }), /* @__PURE__ */ b(r, {
349
+ label: `${t} observations`,
350
+ columns: [{
351
+ id: "observation",
352
+ label: "Observation"
353
+ }],
354
+ rows: O.map((e) => ({
355
+ id: e.id,
356
+ values: [e.label]
357
+ }))
358
+ })] })
359
+ })
347
360
  });
348
361
  }
349
- function D({ points: e, domain: t }) {
350
- let n = y({
362
+ function F({ points: e, domain: t }) {
363
+ let n = T({
351
364
  items: e,
352
365
  domain: t,
353
- maxEntries: v.cumulativePoints
366
+ maxEntries: w.cumulativePoints
354
367
  });
355
368
  if (n !== void 0) return n;
356
369
  let r = {
@@ -358,7 +371,7 @@ function D({ points: e, domain: t }) {
358
371
  probability: 0
359
372
  };
360
373
  for (let n of e) {
361
- if (b(n.value, t) || n.value < r.value) return `Cumulative point ${n.id} is non-finite, outside the domain, or out of order.`;
374
+ if (E(n.value, t) || n.value < r.value) return `Cumulative point ${n.id} is non-finite, outside the domain, or out of order.`;
362
375
  if (n.probability !== null) {
363
376
  if (!Number.isFinite(n.probability) || n.probability < r.probability || n.probability > 1) return `Cumulative point ${n.id} must have a probability from zero to one that does not decrease.`;
364
377
  r.probability = n.probability;
@@ -367,223 +380,259 @@ function D({ points: e, domain: t }) {
367
380
  }
368
381
  }
369
382
  // packages/charts/src/distribution/histogram.tsx
370
- function O({ title: n, report: o, description: s, bins: c, domain: d, maximumCount: v, valueLabel: y, countLabel: b, formatValue: S, formatCount: T, tone: E = "series1", selection: D, emptyLabel: O = "No histogram bins are available." }) {
371
- let A = c.map((e) => ({
383
+ var I = 6;
384
+ function L({ title: o, report: s, description: l, bins: m, domain: h, maximumCount: g, valueLabel: C, countLabel: w, formatValue: T, formatCount: E, tone: O = "series1", selection: j, emptyLabel: M = "No histogram bins are available." }) {
385
+ let N = m.map((e) => ({
372
386
  id: e.id,
373
- label: `${e.label}, ${S(e.lowerBound)} – ${S(e.upperBound)}, ${b}: ${e.count === null ? "Unavailable" : T(e.count)}`
374
- })), j = r({
375
- title: n,
376
- items: A,
377
- selection: D
378
- }), M = k({
379
- bins: c,
380
- domain: d,
381
- maximumCount: v
387
+ label: `${e.label}, ${T(e.lowerBound)} – ${T(e.upperBound)}, ${w}: ${e.count === null ? "Unavailable" : E(e.count)}`
388
+ })), P = v(), F = R({
389
+ bins: m,
390
+ domain: h,
391
+ maximumCount: g
382
392
  });
383
- if (M !== void 0) return /* @__PURE__ */ m(l, {
384
- title: n,
385
- report: o,
386
- description: s,
387
- message: M
393
+ if (F !== void 0) return /* @__PURE__ */ b(c, {
394
+ title: o,
395
+ report: s,
396
+ description: l,
397
+ message: F
388
398
  });
389
- let N = g({
390
- domain: [0, v],
391
- range: [x.height, 0]
399
+ let L = S({
400
+ domain: [0, g],
401
+ range: [D.height, 0]
392
402
  });
393
- return /* @__PURE__ */ m(a, {
394
- title: n,
395
- report: o,
396
- description: s,
397
- footer: /* @__PURE__ */ m(i, {
398
- id: j.id,
399
- children: j.label ?? "\xA0"
400
- }),
401
- children: c.length === 0 ? /* @__PURE__ */ m("p", {
402
- ...f.props(C.empty),
403
- children: O
404
- }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(w, {
405
- navigation: j.props,
406
- onInspectValue: (e) => {
407
- let t = c.find((t) => e >= t.lowerBound && e <= t.upperBound);
408
- t !== void 0 && j.inspect(t.id);
409
- },
410
- xDomain: d,
411
- yDomain: [0, v],
412
- xLabel: y,
413
- yLabel: b,
414
- formatX: S,
415
- formatY: T,
416
- children: (t) => {
417
- let n = g({
418
- domain: [...d],
419
- range: [0, t]
420
- });
421
- return c.map((t) => {
422
- let r = n(t.lowerBound), i = n(t.upperBound) - r, a = Math.min(2, i * .2), o = D?.selectedId === t.id || j.label !== void 0 && j.activeId === t.id;
423
- if (t.count === null) return /* @__PURE__ */ m(_, {
424
- onPointerEnter: () => j.inspect(t.id),
425
- onClick: () => D?.onSelect(t.id),
426
- x: r + a / 2,
427
- y: x.height - 6,
428
- width: i - a,
429
- height: 5,
430
- ...f.props(C.missing)
431
- }, t.id);
432
- let s = N(t.count);
433
- return /* @__PURE__ */ m(_, {
434
- onPointerEnter: () => j.inspect(t.id),
435
- onClick: () => D?.onSelect(t.id),
436
- x: r + a / 2,
437
- y: s,
438
- width: i - a,
439
- height: x.height - s,
440
- fill: e[E],
441
- ...f.props(o && u.selected),
442
- opacity: D?.selectedId === void 0 || o ? 1 : .45
443
- }, t.id);
444
- });
445
- }
446
- }), /* @__PURE__ */ m(t, {
447
- label: `${n} observations`,
448
- columns: [{
449
- id: "observation",
450
- label: "Observation"
451
- }],
452
- rows: A.map((e) => ({
453
- id: e.id,
454
- values: [e.label]
455
- }))
456
- })] })
403
+ return /* @__PURE__ */ b(d, {
404
+ items: N,
405
+ arrows: "both",
406
+ locate: (e) => {
407
+ let t = h[0] + e.x / e.width * (h[1] - h[0]);
408
+ return m.find((e) => t >= e.lowerBound && t <= e.upperBound)?.id;
409
+ },
410
+ selected: j?.selectedId ?? null,
411
+ onSelect: j?.onSelect,
412
+ render: (c, { inspected: d, cursor: v }) => /* @__PURE__ */ b(a, {
413
+ figure: c,
414
+ title: o,
415
+ report: s,
416
+ description: l,
417
+ footer: /* @__PURE__ */ b(i, {
418
+ id: P,
419
+ children: f(N, d)
420
+ }),
421
+ children: m.length === 0 ? /* @__PURE__ */ b("p", {
422
+ ..._.props(k.empty),
423
+ children: M
424
+ }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(A, {
425
+ label: u({
426
+ title: o,
427
+ isSelectable: j !== void 0
428
+ }),
429
+ readoutId: P,
430
+ xDomain: h,
431
+ yDomain: [0, g],
432
+ xLabel: C,
433
+ yLabel: w,
434
+ formatX: T,
435
+ formatY: E,
436
+ children: (r) => {
437
+ let i = S({
438
+ domain: [...h],
439
+ range: [0, r]
440
+ }), a = m.map((n) => {
441
+ let r = i(n.lowerBound), a = i(n.upperBound) - r, o = Math.min(2, a * .2), s = j?.selectedId === n.id || d === n.id;
442
+ if (n.count === null) return /* @__PURE__ */ b("rect", {
443
+ x: r + o / 2,
444
+ y: D.height - 6,
445
+ width: a - o,
446
+ height: 5,
447
+ ..._.props(k.missing)
448
+ }, n.id);
449
+ let c = L(n.count);
450
+ return /* @__PURE__ */ b("rect", {
451
+ x: r + o / 2,
452
+ y: c,
453
+ width: a - o,
454
+ height: D.height - c,
455
+ fill: e[O],
456
+ stroke: t[O],
457
+ ..._.props(p.outlined, s && p.selected),
458
+ opacity: j?.selectedId === void 0 || s ? 1 : .45
459
+ }, n.id);
460
+ }), o = m.find((e) => e.id === v);
461
+ return /* @__PURE__ */ x(y, { children: [a, o !== void 0 && /* @__PURE__ */ b(n, {
462
+ x: (i(o.lowerBound) + i(o.upperBound)) / 2,
463
+ top: 0,
464
+ bottom: D.height - I,
465
+ width: i(o.upperBound) - i(o.lowerBound)
466
+ })] });
467
+ }
468
+ }), /* @__PURE__ */ b(r, {
469
+ label: `${o} observations`,
470
+ columns: [{
471
+ id: "observation",
472
+ label: "Observation"
473
+ }],
474
+ rows: N.map((e) => ({
475
+ id: e.id,
476
+ values: [e.label]
477
+ }))
478
+ })] })
479
+ })
457
480
  });
458
481
  }
459
- function k({ bins: e, domain: t, maximumCount: n }) {
460
- let r = y({
482
+ function R({ bins: e, domain: t, maximumCount: n }) {
483
+ let r = T({
461
484
  items: e,
462
485
  domain: t,
463
- maxEntries: v.bins
486
+ maxEntries: w.bins
464
487
  });
465
488
  if (r !== void 0) return r;
466
489
  if (!Number.isFinite(n) || n <= 0) return "The histogram count domain must have a finite maximum greater than zero.";
467
490
  for (let [r, i] of e.entries()) {
468
- if (b(i.lowerBound, t) || b(i.upperBound, t)) return `Histogram bin ${i.id} has a non-finite bound or lies outside the declared domain.`;
491
+ if (E(i.lowerBound, t) || E(i.upperBound, t)) return `Histogram bin ${i.id} has a non-finite bound or lies outside the declared domain.`;
469
492
  let a = e[r - 1];
470
493
  if (i.lowerBound >= i.upperBound || a !== void 0 && i.lowerBound < a.upperBound) return `Histogram bin ${i.id} is reversed, overlaps another bin, or is out of order.`;
471
494
  if (i.count !== null && (!Number.isFinite(i.count) || i.count < 0 || i.count > n)) return `Histogram bin ${i.id} has a count outside the declared count domain.`;
472
495
  }
473
496
  }
474
497
  // packages/charts/src/distribution/interval-plot.tsx
475
- function A({ title: t, report: n, description: r, items: i, domain: s, valueLabel: c, intervalLabel: u, formatValue: p, selection: _, emptyLabel: v = "No interval estimates are available." }) {
476
- let { ref: y, width: b } = d(), x = j({
498
+ function z({ title: t, report: n, description: r, items: i, domain: o, valueLabel: s, intervalLabel: l, formatValue: u, selection: f, emptyLabel: p = "No interval estimates are available." }) {
499
+ let { ref: v, width: y } = g(), C = B({
477
500
  items: i,
478
- domain: s
501
+ domain: o
479
502
  });
480
- if (x !== void 0) return /* @__PURE__ */ m(l, {
503
+ if (C !== void 0) return /* @__PURE__ */ b(c, {
481
504
  title: t,
482
505
  report: n,
483
506
  description: r,
484
- message: x
485
- });
486
- let S = g({
487
- domain: [...s],
488
- range: [0, b]
507
+ message: C
489
508
  });
490
- return /* @__PURE__ */ m(a, {
491
- title: t,
492
- report: n,
493
- description: r,
494
- footer: `${c} · ${u}`,
495
- children: i.length === 0 ? /* @__PURE__ */ m("p", {
496
- ...f.props(C.empty),
497
- children: v
498
- }) : /* @__PURE__ */ h("div", {
499
- ...f.props(C.values),
500
- children: [i.map((t) => {
501
- let n = t.estimate === null ? "Estimate unavailable" : p(t.estimate), r = `${u}: ${t.lower === null ? "Unavailable" : p(t.lower)} – ${t.upper === null ? "Unavailable" : p(t.upper)}`, i = e[t.tone ?? "series1"];
502
- return /* @__PURE__ */ m(o, {
503
- label: `${t.label}, ${c}: ${n}, ${r}`,
504
- isSelected: _?.selectedId === t.id,
505
- onSelect: _ === void 0 ? void 0 : () => _.onSelect(t.id),
506
- children: /* @__PURE__ */ h("span", {
507
- ...f.props(C.row),
508
- children: [/* @__PURE__ */ h("span", {
509
- ...f.props(C.rowLabel),
510
- children: [
511
- /* @__PURE__ */ m("span", { children: t.label }),
512
- /* @__PURE__ */ m("span", {
513
- ...f.props(C.rowValue),
514
- children: n
515
- }),
516
- /* @__PURE__ */ m("span", {
517
- ...f.props(C.label),
518
- children: r
509
+ let w = S({
510
+ domain: [...o],
511
+ range: [0, y]
512
+ }), T = i.map((e) => {
513
+ let t = e.estimate === null ? "Estimate unavailable" : u(e.estimate), n = `${l}: ${e.lower === null ? "Unavailable" : u(e.lower)} – ${e.upper === null ? "Unavailable" : u(e.upper)}`;
514
+ return {
515
+ item: e,
516
+ estimate: t,
517
+ interval: n,
518
+ readout: `${e.label}, ${s}: ${t}, ${n}`
519
+ };
520
+ }), E = T.map((e) => ({
521
+ id: e.item.id,
522
+ label: e.readout
523
+ }));
524
+ return /* @__PURE__ */ b(d, {
525
+ items: E,
526
+ arrows: "both",
527
+ selected: f?.selectedId ?? null,
528
+ onSelect: f?.onSelect,
529
+ render: (c, d) => {
530
+ let g = f === void 0 ? void 0 : d;
531
+ return /* @__PURE__ */ b(a, {
532
+ figure: c,
533
+ title: t,
534
+ report: n,
535
+ description: r,
536
+ footer: `${s} · ${l}`,
537
+ children: i.length === 0 ? /* @__PURE__ */ b("p", {
538
+ ..._.props(k.empty),
539
+ children: p
540
+ }) : /* @__PURE__ */ b(h, {
541
+ title: t,
542
+ items: E,
543
+ view: g,
544
+ children: /* @__PURE__ */ x("div", {
545
+ ..._.props(k.values),
546
+ children: [T.map(({ item: t, estimate: n, interval: r, readout: i }) => {
547
+ let a = e[t.tone ?? "series1"];
548
+ return /* @__PURE__ */ b(m, {
549
+ id: t.id,
550
+ label: i,
551
+ view: g,
552
+ children: /* @__PURE__ */ x("span", {
553
+ ..._.props(k.row),
554
+ children: [/* @__PURE__ */ x("span", {
555
+ ..._.props(k.rowLabel),
556
+ children: [
557
+ /* @__PURE__ */ b("span", { children: t.label }),
558
+ /* @__PURE__ */ b("span", {
559
+ ..._.props(k.rowValue),
560
+ children: n
561
+ }),
562
+ /* @__PURE__ */ b("span", {
563
+ ..._.props(k.label),
564
+ children: r
565
+ })
566
+ ]
567
+ }), /* @__PURE__ */ x("svg", {
568
+ "aria-hidden": !0,
569
+ viewBox: `0 0 ${y} 28`,
570
+ preserveAspectRatio: "none",
571
+ ..._.props(k.rowSvg),
572
+ children: [
573
+ /* @__PURE__ */ b("line", {
574
+ x1: 0,
575
+ x2: y,
576
+ y1: 14,
577
+ y2: 14,
578
+ ..._.props(k.baseline)
579
+ }),
580
+ t.lower !== null && t.upper !== null && /* @__PURE__ */ x("g", {
581
+ stroke: a,
582
+ strokeWidth: 2,
583
+ vectorEffect: "non-scaling-stroke",
584
+ children: [
585
+ /* @__PURE__ */ b("line", {
586
+ x1: w(t.lower),
587
+ x2: w(t.upper),
588
+ y1: 14,
589
+ y2: 14
590
+ }),
591
+ /* @__PURE__ */ b("line", {
592
+ x1: w(t.lower),
593
+ x2: w(t.lower),
594
+ y1: 9,
595
+ y2: 19
596
+ }),
597
+ /* @__PURE__ */ b("line", {
598
+ x1: w(t.upper),
599
+ x2: w(t.upper),
600
+ y1: 9,
601
+ y2: 19
602
+ })
603
+ ]
604
+ }),
605
+ t.estimate !== null && /* @__PURE__ */ b("circle", {
606
+ cx: w(t.estimate),
607
+ cy: 14,
608
+ r: 4,
609
+ fill: a
610
+ })
611
+ ]
612
+ })]
519
613
  })
520
- ]
521
- }), /* @__PURE__ */ h("svg", {
522
- "aria-hidden": !0,
523
- viewBox: `0 0 ${b} 28`,
524
- preserveAspectRatio: "none",
525
- ...f.props(C.rowSvg),
526
- children: [
527
- /* @__PURE__ */ m("line", {
528
- x1: 0,
529
- x2: b,
530
- y1: 14,
531
- y2: 14,
532
- ...f.props(C.baseline)
533
- }),
534
- t.lower !== null && t.upper !== null && /* @__PURE__ */ h("g", {
535
- stroke: i,
536
- strokeWidth: 2,
537
- vectorEffect: "non-scaling-stroke",
538
- children: [
539
- /* @__PURE__ */ m("line", {
540
- x1: S(t.lower),
541
- x2: S(t.upper),
542
- y1: 14,
543
- y2: 14
544
- }),
545
- /* @__PURE__ */ m("line", {
546
- x1: S(t.lower),
547
- x2: S(t.lower),
548
- y1: 9,
549
- y2: 19
550
- }),
551
- /* @__PURE__ */ m("line", {
552
- x1: S(t.upper),
553
- x2: S(t.upper),
554
- y1: 9,
555
- y2: 19
556
- })
557
- ]
558
- }),
559
- t.estimate !== null && /* @__PURE__ */ m("circle", {
560
- cx: S(t.estimate),
561
- cy: 14,
562
- r: 4,
563
- fill: i
614
+ }, t.id);
615
+ }), /* @__PURE__ */ x("div", {
616
+ ..._.props(k.row, k.rowAxis),
617
+ children: [/* @__PURE__ */ b("span", { ..._.props(k.axisSpacer) }), /* @__PURE__ */ b("div", {
618
+ ref: v,
619
+ children: /* @__PURE__ */ b(j, {
620
+ domain: o,
621
+ formatValue: u
564
622
  })
565
- ]
623
+ })]
566
624
  })]
567
625
  })
568
- }, t.id);
569
- }), /* @__PURE__ */ h("div", {
570
- ...f.props(C.row, C.rowAxis),
571
- children: [/* @__PURE__ */ m("span", { ...f.props(C.axisSpacer) }), /* @__PURE__ */ m("div", {
572
- ref: y,
573
- children: /* @__PURE__ */ m(T, {
574
- domain: s,
575
- formatValue: p
576
- })
577
- })]
578
- })]
579
- })
626
+ })
627
+ });
628
+ }
580
629
  });
581
630
  }
582
- function j({ items: e, domain: t }) {
583
- let n = y({
631
+ function B({ items: e, domain: t }) {
632
+ let n = T({
584
633
  items: e,
585
634
  domain: t,
586
- maxEntries: v.rows
635
+ maxEntries: w.rows
587
636
  });
588
637
  if (n !== void 0) return n;
589
638
  for (let n of e) {
@@ -591,7 +640,7 @@ function j({ items: e, domain: t }) {
591
640
  n.lower,
592
641
  n.estimate,
593
642
  n.upper
594
- ].some((e) => e !== null && b(e, t))) return `Interval ${n.id} has a non-finite value or lies outside the declared domain.`;
643
+ ].some((e) => e !== null && E(e, t))) return `Interval ${n.id} has a non-finite value or lies outside the declared domain.`;
595
644
  if (n.lower !== null && n.upper !== null && n.lower > n.upper) return `Interval ${n.id} has reversed endpoints.`;
596
645
  if (n.estimate !== null) {
597
646
  if (n.lower !== null && n.estimate < n.lower) return `Interval ${n.id} has an estimate below its lower endpoint.`;
@@ -600,105 +649,133 @@ function j({ items: e, domain: t }) {
600
649
  }
601
650
  }
602
651
  // packages/charts/src/distribution/ranked-bars.tsx
603
- function M({ title: t, report: n, description: r, items: i, domain: s, valueLabel: c, formatValue: u, selection: p, emptyLabel: v = "No ranked values are available." }) {
604
- let { ref: y, width: b } = d(), x = N({
605
- items: i,
652
+ function V({ title: n, report: r, description: i, items: o, domain: s, valueLabel: l, formatValue: u, selection: f, emptyLabel: v = "No ranked values are available." }) {
653
+ let { ref: y, width: w } = g(), T = H({
654
+ items: o,
606
655
  domain: s
607
656
  });
608
- if (x !== void 0) return /* @__PURE__ */ m(l, {
609
- title: t,
610
- report: n,
611
- description: r,
612
- message: x
657
+ if (T !== void 0) return /* @__PURE__ */ b(c, {
658
+ title: n,
659
+ report: r,
660
+ description: i,
661
+ message: T
613
662
  });
614
- let S = g({
663
+ let E = S({
615
664
  domain: [...s],
616
- range: [0, b]
617
- }), w = S(0);
618
- return /* @__PURE__ */ m(a, {
619
- title: t,
620
- report: n,
621
- description: r,
622
- footer: c,
623
- children: i.length === 0 ? /* @__PURE__ */ m("p", {
624
- ...f.props(C.empty),
625
- children: v
626
- }) : /* @__PURE__ */ h("div", {
627
- ...f.props(C.values),
628
- children: [i.map((t) => {
629
- let n = t.value === null ? "Unavailable" : u(t.value), r = t.rank === void 0 ? t.label : `${t.rank} · ${t.label}`, i = e[t.tone ?? "series1"];
630
- return /* @__PURE__ */ m(o, {
631
- label: `${r}, ${c}: ${n}`,
632
- isSelected: p?.selectedId === t.id,
633
- onSelect: p === void 0 ? void 0 : () => p.onSelect(t.id),
634
- children: /* @__PURE__ */ h("span", {
635
- ...f.props(C.row),
636
- children: [/* @__PURE__ */ h("span", {
637
- ...f.props(C.rowLabel),
638
- children: [/* @__PURE__ */ m("span", { children: r }), /* @__PURE__ */ m("span", {
639
- ...f.props(C.rowValue),
640
- children: n
665
+ range: [0, w]
666
+ }), D = E(0), O = o.map((e) => {
667
+ let t = e.value === null ? "Unavailable" : u(e.value), n = e.rank === void 0 ? e.label : `${e.rank} · ${e.label}`;
668
+ return {
669
+ item: e,
670
+ value: t,
671
+ label: n,
672
+ readout: `${n}, ${l}: ${t}`
673
+ };
674
+ }), A = O.map((e) => ({
675
+ id: e.item.id,
676
+ label: e.readout
677
+ }));
678
+ return /* @__PURE__ */ b(d, {
679
+ items: A,
680
+ arrows: "both",
681
+ selected: f?.selectedId ?? null,
682
+ onSelect: f?.onSelect,
683
+ render: (c, d) => {
684
+ let g = f === void 0 ? void 0 : d;
685
+ return /* @__PURE__ */ b(a, {
686
+ figure: c,
687
+ title: n,
688
+ report: r,
689
+ description: i,
690
+ footer: l,
691
+ children: o.length === 0 ? /* @__PURE__ */ b("p", {
692
+ ..._.props(k.empty),
693
+ children: v
694
+ }) : /* @__PURE__ */ b(h, {
695
+ title: n,
696
+ items: A,
697
+ view: g,
698
+ children: /* @__PURE__ */ x("div", {
699
+ ..._.props(k.values),
700
+ children: [O.map(({ item: n, value: r, label: i, readout: a }) => {
701
+ let o = n.tone ?? "series1", s = e[o];
702
+ return /* @__PURE__ */ b(m, {
703
+ id: n.id,
704
+ label: a,
705
+ view: g,
706
+ children: /* @__PURE__ */ x("span", {
707
+ ..._.props(k.row),
708
+ children: [/* @__PURE__ */ x("span", {
709
+ ..._.props(k.rowLabel),
710
+ children: [/* @__PURE__ */ b("span", { children: i }), /* @__PURE__ */ b("span", {
711
+ ..._.props(k.rowValue),
712
+ children: r
713
+ })]
714
+ }), /* @__PURE__ */ x("svg", {
715
+ "aria-hidden": !0,
716
+ viewBox: `0 0 ${w} 28`,
717
+ preserveAspectRatio: "none",
718
+ ..._.props(k.rowSvg),
719
+ children: [
720
+ /* @__PURE__ */ b("rect", {
721
+ x: 0,
722
+ y: 10,
723
+ width: w,
724
+ height: 8,
725
+ ..._.props(k.track)
726
+ }),
727
+ /* @__PURE__ */ b("line", {
728
+ x1: D,
729
+ x2: D,
730
+ y1: 3,
731
+ y2: 25,
732
+ ..._.props(k.baseline)
733
+ }),
734
+ n.value !== null && (n.value === 0 ? /* @__PURE__ */ b("line", {
735
+ x1: D,
736
+ x2: D,
737
+ y1: 10,
738
+ y2: 18,
739
+ stroke: s,
740
+ strokeWidth: 2,
741
+ vectorEffect: "non-scaling-stroke"
742
+ }) : /* @__PURE__ */ b(C, {
743
+ x: Math.min(D, E(n.value)),
744
+ y: 10,
745
+ width: Math.abs(E(n.value) - D),
746
+ height: 8,
747
+ fill: s,
748
+ stroke: t[o],
749
+ ..._.props(p.outlined)
750
+ }))
751
+ ]
752
+ })]
753
+ })
754
+ }, n.id);
755
+ }), /* @__PURE__ */ x("div", {
756
+ ..._.props(k.row, k.rowAxis),
757
+ children: [/* @__PURE__ */ b("span", { ..._.props(k.axisSpacer) }), /* @__PURE__ */ b("div", {
758
+ ref: y,
759
+ children: /* @__PURE__ */ b(j, {
760
+ domain: s,
761
+ formatValue: u
762
+ })
641
763
  })]
642
- }), /* @__PURE__ */ h("svg", {
643
- "aria-hidden": !0,
644
- viewBox: `0 0 ${b} 28`,
645
- preserveAspectRatio: "none",
646
- ...f.props(C.rowSvg),
647
- children: [
648
- /* @__PURE__ */ m("rect", {
649
- x: 0,
650
- y: 10,
651
- width: b,
652
- height: 8,
653
- ...f.props(C.track)
654
- }),
655
- /* @__PURE__ */ m("line", {
656
- x1: w,
657
- x2: w,
658
- y1: 3,
659
- y2: 25,
660
- ...f.props(C.baseline)
661
- }),
662
- t.value !== null && (t.value === 0 ? /* @__PURE__ */ m("line", {
663
- x1: w,
664
- x2: w,
665
- y1: 10,
666
- y2: 18,
667
- stroke: i,
668
- strokeWidth: 2,
669
- vectorEffect: "non-scaling-stroke"
670
- }) : /* @__PURE__ */ m(_, {
671
- x: Math.min(w, S(t.value)),
672
- y: 10,
673
- width: Math.abs(S(t.value) - w),
674
- height: 8,
675
- fill: i
676
- }))
677
- ]
678
764
  })]
679
765
  })
680
- }, t.id);
681
- }), /* @__PURE__ */ h("div", {
682
- ...f.props(C.row, C.rowAxis),
683
- children: [/* @__PURE__ */ m("span", { ...f.props(C.axisSpacer) }), /* @__PURE__ */ m("div", {
684
- ref: y,
685
- children: /* @__PURE__ */ m(T, {
686
- domain: s,
687
- formatValue: u
688
- })
689
- })]
690
- })]
691
- })
766
+ })
767
+ });
768
+ }
692
769
  });
693
770
  }
694
- function N({ items: e, domain: t }) {
695
- let n = y({
771
+ function H({ items: e, domain: t }) {
772
+ let n = T({
696
773
  items: e,
697
774
  domain: t,
698
- maxEntries: v.rows
775
+ maxEntries: w.rows
699
776
  });
700
777
  if (n !== void 0) return n;
701
778
  if (t[0] > 0 || t[1] < 0) return "The ranked-value domain must include zero.";
702
- for (let n of e) if (n.value !== null && b(n.value, t)) return `Ranked value ${n.id} is non-finite or lies outside the declared domain.`;
779
+ for (let n of e) if (n.value !== null && E(n.value, t)) return `Ranked value ${n.id} is non-finite or lies outside the declared domain.`;
703
780
  }
704
- export { E as ECDF, O as Histogram, A as IntervalPlot, M as RankedBars };
781
+ export { P as ECDF, L as Histogram, z as IntervalPlot, V as RankedBars };