@mechane-ai/elements 0.26.0 → 0.27.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 (61) hide show
  1. package/README.md +9 -6
  2. package/dist/ai.js +56 -56
  3. package/dist/{categorical-values-CPRt9uzI.js → categorical-values-DqoH9l1M.js} +2 -2
  4. package/dist/chart-frame-CYdrUwvP.js +239 -0
  5. package/dist/{chart-input-DDAjzy-O.js → chart-input--Q3Jdono.js} +4 -3
  6. package/dist/charts/cartesian.js +527 -434
  7. package/dist/charts/distribution.js +134 -126
  8. package/dist/charts/graph.js +46 -43
  9. package/dist/charts/hierarchy.js +28 -26
  10. package/dist/charts/matrix.js +81 -77
  11. package/dist/charts/timeline.js +87 -80
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-DENC5fD_.js → code-block-DPeyW4sm.js} +3 -3
  14. package/dist/collections.js +52 -52
  15. package/dist/content/code.js +1 -1
  16. package/dist/content/diff.js +10 -10
  17. package/dist/content/link.js +1 -1
  18. package/dist/content/markdown.js +2 -2
  19. package/dist/content/tree.js +2 -2
  20. package/dist/{content-link-CGIua9If.js → content-link-5oRGjDHa.js} +1 -1
  21. package/dist/content.js +18 -18
  22. package/dist/elements.css +14 -0
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +7 -7
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +39 -39
  28. package/dist/navigation/commands.js +1 -1
  29. package/dist/packages/charts/src/cartesian/bar-chart.d.ts +5 -4
  30. package/dist/packages/charts/src/cartesian/breakdown-bar.d.ts +3 -2
  31. package/dist/packages/charts/src/cartesian/index.d.ts +2 -2
  32. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +2 -1
  33. package/dist/packages/charts/src/cartesian/time-series.d.ts +12 -3
  34. package/dist/packages/charts/src/chart-frame.d.ts +15 -7
  35. package/dist/packages/charts/src/chart-input.d.ts +3 -1
  36. package/dist/packages/charts/src/chart-inspection.d.ts +3 -1
  37. package/dist/packages/charts/src/chart-series-summary.d.ts +6 -0
  38. package/dist/packages/charts/src/chart-theme.d.ts +5 -0
  39. package/dist/packages/charts/src/distribution/ecdf.d.ts +3 -2
  40. package/dist/packages/charts/src/distribution/histogram.d.ts +3 -2
  41. package/dist/packages/charts/src/distribution/interval-plot.d.ts +3 -2
  42. package/dist/packages/charts/src/distribution/ranked-bars.d.ts +3 -2
  43. package/dist/packages/charts/src/graph/relation-graph.d.ts +3 -2
  44. package/dist/packages/charts/src/hierarchy/treemap.d.ts +3 -2
  45. package/dist/packages/charts/src/index.d.ts +1 -1
  46. package/dist/packages/charts/src/matrix/matrix.d.ts +3 -2
  47. package/dist/packages/charts/src/matrix/token-heatmap.d.ts +3 -2
  48. package/dist/packages/charts/src/timeline/waterfall.d.ts +4 -1
  49. package/dist/packages/core/src/index.d.ts +2 -0
  50. package/dist/packages/core/src/section-heading.d.ts +8 -0
  51. package/dist/{pierre-diff-CHQsoQSZ.js → pierre-diff-C3U_qae6.js} +1 -1
  52. package/dist/{pierre-theme-CLgk9v3e.js → pierre-theme-DsrSwl5m.js} +19 -20
  53. package/dist/{pierre-tree-C3nKYyoN.js → pierre-tree-KSFewJrY.js} +4 -4
  54. package/dist/{src-CQOgWIzP.js → src-DYwAhQHt.js} +98 -98
  55. package/dist/{src-DLReNPV9.js → src-E3Or8tkO.js} +38 -18
  56. package/dist/{src-DHYcohZP.js → src-eWcNz_oB.js} +25 -26
  57. package/dist/tokens.js +1 -3
  58. package/dist/{tokens.stylex-DTHHFbyl.js → tokens.stylex-BoRZ3D8s.js} +92 -12
  59. package/package.json +1 -1
  60. package/dist/chart-frame-CNr8M_b2.js +0 -166
  61. package/dist/constants.stylex-BILvnwUk.js +0 -84
@@ -1,5 +1,5 @@
1
- import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-CNr8M_b2.js";
2
- import { n as a, r as o, t as s } from "../chart-input-DDAjzy-O.js";
1
+ import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-CYdrUwvP.js";
2
+ import { n as a, r as o, t as s } from "../chart-input--Q3Jdono.js";
3
3
  import { t as c } from "../plot-width--OgdohB5.js";
4
4
  import * as l from "@stylexjs/stylex";
5
5
  import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
@@ -248,64 +248,66 @@ function S({ domain: e, formatValue: t }) {
248
248
  });
249
249
  }
250
250
  // packages/charts/src/distribution/ecdf.tsx
251
- function C({ title: a, description: o, points: c, domain: m, valueLabel: h, probabilityLabel: g, formatValue: _, formatProbability: y, tone: S = "series1", selection: C, emptyLabel: T = "No cumulative distribution points are available." }) {
252
- let E = w({
253
- points: c,
254
- domain: m
251
+ function C({ title: a, report: o, description: c, points: m, domain: h, valueLabel: g, probabilityLabel: _, formatValue: y, formatProbability: S, tone: C = "series1", selection: T, emptyLabel: E = "No cumulative distribution points are available." }) {
252
+ let D = w({
253
+ points: m,
254
+ domain: h
255
255
  });
256
- if (E !== void 0) return /* @__PURE__ */ d(s, {
256
+ if (D !== void 0) return /* @__PURE__ */ d(s, {
257
257
  title: a,
258
- description: o,
259
- message: E
258
+ report: o,
259
+ description: c,
260
+ message: D
260
261
  });
261
- let D = p({
262
+ let O = p({
262
263
  domain: [0, 1],
263
264
  range: [v.height, 0]
264
- }), O = c.find((e) => e.id === C?.selectedId);
265
+ }), k = m.find((e) => e.id === T?.selectedId);
265
266
  return /* @__PURE__ */ d(n, {
266
267
  title: a,
267
- description: o,
268
- footer: C !== void 0 && c.length > 0 ? /* @__PURE__ */ d(e, { children: O === void 0 ? "Select a point in View data to inspect its probability." : `${h}: ${_(O.value)}, ${g}: ${O.probability === null ? "Unavailable" : y(O.probability)}` }) : void 0,
269
- children: c.length === 0 ? /* @__PURE__ */ d("p", {
268
+ report: o,
269
+ description: c,
270
+ footer: T !== void 0 && m.length > 0 ? /* @__PURE__ */ d(e, { children: k === void 0 ? "Select a point in View data to inspect its probability." : `${g}: ${y(k.value)}, ${_}: ${k.probability === null ? "Unavailable" : S(k.probability)}` }) : void 0,
271
+ children: m.length === 0 ? /* @__PURE__ */ d("p", {
270
272
  ...l.props(b.empty),
271
- children: T
273
+ children: E
272
274
  }) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(x, {
273
- xDomain: m,
275
+ xDomain: h,
274
276
  yDomain: [0, 1],
275
- xLabel: h,
276
- yLabel: g,
277
- formatX: _,
278
- formatY: y,
277
+ xLabel: g,
278
+ yLabel: _,
279
+ formatX: y,
280
+ formatY: S,
279
281
  children: (e) => {
280
282
  let t = p({
281
- domain: [...m],
283
+ domain: [...h],
282
284
  range: [0, e]
283
- }), n = c.map((e, n) => {
285
+ }), n = m.map((e, n) => {
284
286
  if (e.probability === null) return "";
285
- let r = t(e.value), i = D(e.probability), a = c[n - 1];
287
+ let r = t(e.value), i = O(e.probability), a = m[n - 1];
286
288
  return a === void 0 || a.probability === null ? `M ${r} ${i}` : `H ${r} V ${i}`;
287
289
  }).join(" ");
288
290
  return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("path", {
289
291
  d: n,
290
292
  fill: "none",
291
- stroke: r[S],
293
+ stroke: r[C],
292
294
  strokeWidth: 2,
293
295
  vectorEffect: "non-scaling-stroke"
294
- }), c.map((e) => e.probability === null ? null : /* @__PURE__ */ d("circle", {
296
+ }), m.map((e) => e.probability === null ? null : /* @__PURE__ */ d("circle", {
295
297
  cx: t(e.value),
296
- cy: D(e.probability),
297
- r: C?.selectedId === e.id ? 4 : 2,
298
- fill: r[S]
298
+ cy: O(e.probability),
299
+ r: T?.selectedId === e.id ? 4 : 2,
300
+ fill: r[C]
299
301
  }, e.id))] });
300
302
  }
301
303
  }), /* @__PURE__ */ d(i, { children: /* @__PURE__ */ d("div", {
302
304
  ...l.props(b.values),
303
- children: c.map((e) => {
304
- let n = _(e.value), r = e.probability === null ? "Unavailable" : y(e.probability);
305
+ children: m.map((e) => {
306
+ let n = y(e.value), r = e.probability === null ? "Unavailable" : S(e.probability);
305
307
  return /* @__PURE__ */ d(t, {
306
- label: `${h}: ${n}, ${g}: ${r}`,
307
- isSelected: C?.selectedId === e.id,
308
- onSelect: C === void 0 ? void 0 : () => C.onSelect(e.id),
308
+ label: `${g}: ${n}, ${_}: ${r}`,
309
+ isSelected: T?.selectedId === e.id,
310
+ onSelect: T === void 0 ? void 0 : () => T.onSelect(e.id),
309
311
  children: /* @__PURE__ */ f("span", {
310
312
  ...l.props(b.value),
311
313
  children: [/* @__PURE__ */ d("span", { children: n }), /* @__PURE__ */ d("span", {
@@ -339,42 +341,44 @@ function w({ points: e, domain: t }) {
339
341
  }
340
342
  }
341
343
  // packages/charts/src/distribution/histogram.tsx
342
- function T({ title: a, description: o, bins: c, domain: h, maximumCount: g, valueLabel: _, countLabel: y, formatValue: S, formatCount: C, tone: w = "series1", selection: T, emptyLabel: D = "No histogram bins are available." }) {
343
- let O = E({
344
- bins: c,
345
- domain: h,
346
- maximumCount: g
344
+ function T({ title: a, report: o, description: c, bins: h, domain: g, maximumCount: _, valueLabel: y, countLabel: S, formatValue: C, formatCount: w, tone: T = "series1", selection: D, emptyLabel: O = "No histogram bins are available." }) {
345
+ let k = E({
346
+ bins: h,
347
+ domain: g,
348
+ maximumCount: _
347
349
  });
348
- if (O !== void 0) return /* @__PURE__ */ d(s, {
350
+ if (k !== void 0) return /* @__PURE__ */ d(s, {
349
351
  title: a,
350
- description: o,
351
- message: O
352
+ report: o,
353
+ description: c,
354
+ message: k
352
355
  });
353
- let k = p({
354
- domain: [0, g],
356
+ let A = p({
357
+ domain: [0, _],
355
358
  range: [v.height, 0]
356
- }), A = c.find((e) => e.id === T?.selectedId);
359
+ }), j = h.find((e) => e.id === D?.selectedId);
357
360
  return /* @__PURE__ */ d(n, {
358
361
  title: a,
359
- description: o,
360
- footer: T !== void 0 && c.length > 0 ? /* @__PURE__ */ d(e, { children: A === void 0 ? "Select a bin in View data to inspect its count." : `${A.label}, ${S(A.lowerBound)} – ${S(A.upperBound)}, ${y}: ${A.count === null ? "Unavailable" : C(A.count)}` }) : void 0,
361
- children: c.length === 0 ? /* @__PURE__ */ d("p", {
362
+ report: o,
363
+ description: c,
364
+ footer: D !== void 0 && h.length > 0 ? /* @__PURE__ */ d(e, { children: j === void 0 ? "Select a bin in View data to inspect its count." : `${j.label}, ${C(j.lowerBound)} – ${C(j.upperBound)}, ${S}: ${j.count === null ? "Unavailable" : w(j.count)}` }) : void 0,
365
+ children: h.length === 0 ? /* @__PURE__ */ d("p", {
362
366
  ...l.props(b.empty),
363
- children: D
367
+ children: O
364
368
  }) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(x, {
365
- xDomain: h,
366
- yDomain: [0, g],
367
- xLabel: _,
368
- yLabel: y,
369
- formatX: S,
370
- formatY: C,
369
+ xDomain: g,
370
+ yDomain: [0, _],
371
+ xLabel: y,
372
+ yLabel: S,
373
+ formatX: C,
374
+ formatY: w,
371
375
  children: (e) => {
372
376
  let t = p({
373
- domain: [...h],
377
+ domain: [...g],
374
378
  range: [0, e]
375
379
  });
376
- return c.map((e) => {
377
- let n = t(e.lowerBound), i = t(e.upperBound) - n, a = Math.min(2, i * .2), o = T?.selectedId === e.id;
380
+ return h.map((e) => {
381
+ let n = t(e.lowerBound), i = t(e.upperBound) - n, a = Math.min(2, i * .2), o = D?.selectedId === e.id;
378
382
  if (e.count === null) return /* @__PURE__ */ d(m, {
379
383
  x: n + a / 2,
380
384
  y: v.height - 6,
@@ -382,25 +386,25 @@ function T({ title: a, description: o, bins: c, domain: h, maximumCount: g, valu
382
386
  height: 5,
383
387
  ...l.props(b.missing)
384
388
  }, e.id);
385
- let s = k(e.count);
389
+ let s = A(e.count);
386
390
  return /* @__PURE__ */ d(m, {
387
391
  x: n + a / 2,
388
392
  y: s,
389
393
  width: i - a,
390
394
  height: v.height - s,
391
- fill: r[w],
392
- opacity: T?.selectedId === void 0 || o ? 1 : .45
395
+ fill: r[T],
396
+ opacity: D?.selectedId === void 0 || o ? 1 : .45
393
397
  }, e.id);
394
398
  });
395
399
  }
396
400
  }), /* @__PURE__ */ d(i, { children: /* @__PURE__ */ d("div", {
397
401
  ...l.props(b.values),
398
- children: c.map((e) => {
399
- let n = e.count === null ? "Unavailable" : C(e.count), r = `${S(e.lowerBound)} – ${S(e.upperBound)}`;
402
+ children: h.map((e) => {
403
+ let n = e.count === null ? "Unavailable" : w(e.count), r = `${C(e.lowerBound)} – ${C(e.upperBound)}`;
400
404
  return /* @__PURE__ */ d(t, {
401
- label: `${e.label}, ${r}, ${y}: ${n}`,
402
- isSelected: T?.selectedId === e.id,
403
- onSelect: T === void 0 ? void 0 : () => T.onSelect(e.id),
405
+ label: `${e.label}, ${r}, ${S}: ${n}`,
406
+ isSelected: D?.selectedId === e.id,
407
+ onSelect: D === void 0 ? void 0 : () => D.onSelect(e.id),
404
408
  children: /* @__PURE__ */ f("span", {
405
409
  ...l.props(b.value),
406
410
  children: [/* @__PURE__ */ f("span", { children: [
@@ -433,35 +437,37 @@ function E({ bins: e, domain: t, maximumCount: n }) {
433
437
  }
434
438
  }
435
439
  // packages/charts/src/distribution/interval-plot.tsx
436
- function D({ title: e, description: i, items: a, domain: o, valueLabel: u, intervalLabel: m, formatValue: h, selection: g, emptyLabel: _ = "No interval estimates are available." }) {
437
- let { ref: v, width: y } = c(), x = O({
438
- items: a,
439
- domain: o
440
+ function D({ title: e, report: i, description: a, items: o, domain: u, valueLabel: m, intervalLabel: h, formatValue: g, selection: _, emptyLabel: v = "No interval estimates are available." }) {
441
+ let { ref: y, width: x } = c(), C = O({
442
+ items: o,
443
+ domain: u
440
444
  });
441
- if (x !== void 0) return /* @__PURE__ */ d(s, {
445
+ if (C !== void 0) return /* @__PURE__ */ d(s, {
442
446
  title: e,
443
- description: i,
444
- message: x
447
+ report: i,
448
+ description: a,
449
+ message: C
445
450
  });
446
- let C = p({
447
- domain: [...o],
448
- range: [0, y]
451
+ let w = p({
452
+ domain: [...u],
453
+ range: [0, x]
449
454
  });
450
455
  return /* @__PURE__ */ d(n, {
451
456
  title: e,
452
- description: i,
453
- footer: `${u} · ${m}`,
454
- children: a.length === 0 ? /* @__PURE__ */ d("p", {
457
+ report: i,
458
+ description: a,
459
+ footer: `${m} · ${h}`,
460
+ children: o.length === 0 ? /* @__PURE__ */ d("p", {
455
461
  ...l.props(b.empty),
456
- children: _
462
+ children: v
457
463
  }) : /* @__PURE__ */ f("div", {
458
464
  ...l.props(b.values),
459
- children: [a.map((e) => {
460
- let n = e.estimate === null ? "Estimate unavailable" : h(e.estimate), i = `${m}: ${e.lower === null ? "Unavailable" : h(e.lower)} – ${e.upper === null ? "Unavailable" : h(e.upper)}`, a = r[e.tone ?? "series1"];
465
+ children: [o.map((e) => {
466
+ let n = e.estimate === null ? "Estimate unavailable" : g(e.estimate), i = `${h}: ${e.lower === null ? "Unavailable" : g(e.lower)} – ${e.upper === null ? "Unavailable" : g(e.upper)}`, a = r[e.tone ?? "series1"];
461
467
  return /* @__PURE__ */ d(t, {
462
- label: `${e.label}, ${u}: ${n}, ${i}`,
463
- isSelected: g?.selectedId === e.id,
464
- onSelect: g === void 0 ? void 0 : () => g.onSelect(e.id),
468
+ label: `${e.label}, ${m}: ${n}, ${i}`,
469
+ isSelected: _?.selectedId === e.id,
470
+ onSelect: _ === void 0 ? void 0 : () => _.onSelect(e.id),
465
471
  children: /* @__PURE__ */ f("span", {
466
472
  ...l.props(b.row),
467
473
  children: [/* @__PURE__ */ f("span", {
@@ -479,13 +485,13 @@ function D({ title: e, description: i, items: a, domain: o, valueLabel: u, inter
479
485
  ]
480
486
  }), /* @__PURE__ */ f("svg", {
481
487
  "aria-hidden": !0,
482
- viewBox: `0 0 ${y} 28`,
488
+ viewBox: `0 0 ${x} 28`,
483
489
  preserveAspectRatio: "none",
484
490
  ...l.props(b.rowSvg),
485
491
  children: [
486
492
  /* @__PURE__ */ d("line", {
487
493
  x1: 0,
488
- x2: y,
494
+ x2: x,
489
495
  y1: 14,
490
496
  y2: 14,
491
497
  ...l.props(b.baseline)
@@ -496,27 +502,27 @@ function D({ title: e, description: i, items: a, domain: o, valueLabel: u, inter
496
502
  vectorEffect: "non-scaling-stroke",
497
503
  children: [
498
504
  /* @__PURE__ */ d("line", {
499
- x1: C(e.lower),
500
- x2: C(e.upper),
505
+ x1: w(e.lower),
506
+ x2: w(e.upper),
501
507
  y1: 14,
502
508
  y2: 14
503
509
  }),
504
510
  /* @__PURE__ */ d("line", {
505
- x1: C(e.lower),
506
- x2: C(e.lower),
511
+ x1: w(e.lower),
512
+ x2: w(e.lower),
507
513
  y1: 9,
508
514
  y2: 19
509
515
  }),
510
516
  /* @__PURE__ */ d("line", {
511
- x1: C(e.upper),
512
- x2: C(e.upper),
517
+ x1: w(e.upper),
518
+ x2: w(e.upper),
513
519
  y1: 9,
514
520
  y2: 19
515
521
  })
516
522
  ]
517
523
  }),
518
524
  e.estimate !== null && /* @__PURE__ */ d("circle", {
519
- cx: C(e.estimate),
525
+ cx: w(e.estimate),
520
526
  cy: 14,
521
527
  r: 4,
522
528
  fill: a
@@ -528,10 +534,10 @@ function D({ title: e, description: i, items: a, domain: o, valueLabel: u, inter
528
534
  }), /* @__PURE__ */ f("div", {
529
535
  ...l.props(b.row, b.rowAxis),
530
536
  children: [/* @__PURE__ */ d("span", { ...l.props(b.axisSpacer) }), /* @__PURE__ */ d("div", {
531
- ref: v,
537
+ ref: y,
532
538
  children: /* @__PURE__ */ d(S, {
533
- domain: o,
534
- formatValue: h
539
+ domain: u,
540
+ formatValue: g
535
541
  })
536
542
  })]
537
543
  })]
@@ -559,35 +565,37 @@ function O({ items: e, domain: t }) {
559
565
  }
560
566
  }
561
567
  // packages/charts/src/distribution/ranked-bars.tsx
562
- function k({ title: e, description: i, items: a, domain: o, valueLabel: u, formatValue: h, selection: g, emptyLabel: _ = "No ranked values are available." }) {
563
- let { ref: v, width: y } = c(), x = A({
564
- items: a,
565
- domain: o
568
+ function k({ title: e, report: i, description: a, items: o, domain: u, valueLabel: h, formatValue: g, selection: _, emptyLabel: v = "No ranked values are available." }) {
569
+ let { ref: y, width: x } = c(), C = A({
570
+ items: o,
571
+ domain: u
566
572
  });
567
- if (x !== void 0) return /* @__PURE__ */ d(s, {
573
+ if (C !== void 0) return /* @__PURE__ */ d(s, {
568
574
  title: e,
569
- description: i,
570
- message: x
575
+ report: i,
576
+ description: a,
577
+ message: C
571
578
  });
572
- let C = p({
573
- domain: [...o],
574
- range: [0, y]
575
- }), w = C(0);
579
+ let w = p({
580
+ domain: [...u],
581
+ range: [0, x]
582
+ }), T = w(0);
576
583
  return /* @__PURE__ */ d(n, {
577
584
  title: e,
578
- description: i,
579
- footer: u,
580
- children: a.length === 0 ? /* @__PURE__ */ d("p", {
585
+ report: i,
586
+ description: a,
587
+ footer: h,
588
+ children: o.length === 0 ? /* @__PURE__ */ d("p", {
581
589
  ...l.props(b.empty),
582
- children: _
590
+ children: v
583
591
  }) : /* @__PURE__ */ f("div", {
584
592
  ...l.props(b.values),
585
- children: [a.map((e) => {
586
- let n = e.value === null ? "Unavailable" : h(e.value), i = e.rank === void 0 ? e.label : `${e.rank} · ${e.label}`, a = r[e.tone ?? "series1"];
593
+ children: [o.map((e) => {
594
+ let n = e.value === null ? "Unavailable" : g(e.value), i = e.rank === void 0 ? e.label : `${e.rank} · ${e.label}`, a = r[e.tone ?? "series1"];
587
595
  return /* @__PURE__ */ d(t, {
588
- label: `${i}, ${u}: ${n}`,
589
- isSelected: g?.selectedId === e.id,
590
- onSelect: g === void 0 ? void 0 : () => g.onSelect(e.id),
596
+ label: `${i}, ${h}: ${n}`,
597
+ isSelected: _?.selectedId === e.id,
598
+ onSelect: _ === void 0 ? void 0 : () => _.onSelect(e.id),
591
599
  children: /* @__PURE__ */ f("span", {
592
600
  ...l.props(b.row),
593
601
  children: [/* @__PURE__ */ f("span", {
@@ -598,27 +606,27 @@ function k({ title: e, description: i, items: a, domain: o, valueLabel: u, forma
598
606
  })]
599
607
  }), /* @__PURE__ */ f("svg", {
600
608
  "aria-hidden": !0,
601
- viewBox: `0 0 ${y} 28`,
609
+ viewBox: `0 0 ${x} 28`,
602
610
  preserveAspectRatio: "none",
603
611
  ...l.props(b.rowSvg),
604
612
  children: [/* @__PURE__ */ d("line", {
605
- x1: w,
606
- x2: w,
613
+ x1: T,
614
+ x2: T,
607
615
  y1: 3,
608
616
  y2: 25,
609
617
  ...l.props(b.baseline)
610
618
  }), e.value !== null && (e.value === 0 ? /* @__PURE__ */ d("line", {
611
- x1: w,
612
- x2: w,
619
+ x1: T,
620
+ x2: T,
613
621
  y1: 10,
614
622
  y2: 18,
615
623
  stroke: a,
616
624
  strokeWidth: 2,
617
625
  vectorEffect: "non-scaling-stroke"
618
626
  }) : /* @__PURE__ */ d(m, {
619
- x: Math.min(w, C(e.value)),
627
+ x: Math.min(T, w(e.value)),
620
628
  y: 10,
621
- width: Math.abs(C(e.value) - w),
629
+ width: Math.abs(w(e.value) - T),
622
630
  height: 8,
623
631
  fill: a
624
632
  }))]
@@ -628,10 +636,10 @@ function k({ title: e, description: i, items: a, domain: o, valueLabel: u, forma
628
636
  }), /* @__PURE__ */ f("div", {
629
637
  ...l.props(b.row, b.rowAxis),
630
638
  children: [/* @__PURE__ */ d("span", { ...l.props(b.axisSpacer) }), /* @__PURE__ */ d("div", {
631
- ref: v,
639
+ ref: y,
632
640
  children: /* @__PURE__ */ d(S, {
633
- domain: o,
634
- formatValue: h
641
+ domain: u,
642
+ formatValue: g
635
643
  })
636
644
  })]
637
645
  })]
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../use-scroll-tab-index-Dxpdh4W7.js";
2
- import { a as t, n, r, s as i, t as a } from "../chart-frame-CNr8M_b2.js";
3
- import { n as o, t as s } from "../chart-input-DDAjzy-O.js";
2
+ import { a as t, n, r, s as i, t as a } from "../chart-frame-CYdrUwvP.js";
3
+ import { n as o, t as s } from "../chart-input--Q3Jdono.js";
4
4
  import * as c from "@stylexjs/stylex";
5
5
  import { useId as l } from "react";
6
6
  import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
@@ -81,44 +81,47 @@ var p = {
81
81
  $$css: !0
82
82
  }
83
83
  }, h = 256, g = 1024, _ = 256, v = 8192;
84
- function y({ title: o, description: p, nodes: h, edges: g, groups: _ = [], width: v, height: y, selection: S, emptyLabel: C }) {
85
- let w = l(), T = e(), E = b({
86
- nodes: h,
87
- edges: g,
88
- groups: _,
89
- width: v,
90
- height: y
84
+ function y({ title: o, report: p, description: h, nodes: g, edges: _, groups: v = [], width: y, height: S, selection: C, emptyLabel: w }) {
85
+ let T = l(), E = e(), D = b({
86
+ nodes: g,
87
+ edges: _,
88
+ groups: v,
89
+ width: y,
90
+ height: S
91
91
  });
92
- if (E !== null) return /* @__PURE__ */ d(s, {
92
+ if (D !== null) return /* @__PURE__ */ d(s, {
93
93
  title: o,
94
- description: p,
95
- message: E
94
+ report: p,
95
+ description: h,
96
+ message: D
96
97
  });
97
- let D = new Map(h.map((e) => [e.id, e])), O = x(g, D), k = S?.selectedId === void 0 ? void 0 : D.get(S.selectedId), A = h.length > 0;
98
- return O === null ? /* @__PURE__ */ d(s, {
98
+ let O = new Map(g.map((e) => [e.id, e])), k = x(_, O), A = C?.selectedId === void 0 ? void 0 : O.get(C.selectedId), j = g.length > 0;
99
+ return k === null ? /* @__PURE__ */ d(s, {
99
100
  title: o,
100
- description: p,
101
+ report: p,
102
+ description: h,
101
103
  message: "Every relationship must refer to two supplied nodes."
102
104
  }) : /* @__PURE__ */ f(r, {
103
105
  title: o,
104
- description: p,
105
- footer: S !== void 0 && A ? /* @__PURE__ */ d(t, { children: k === void 0 ? "Select a node to inspect its record." : [k.label, k.description].filter((e) => e !== void 0).join(" · ") }) : void 0,
106
- children: [A ? /* @__PURE__ */ d("div", {
107
- ref: T.ref,
106
+ report: p,
107
+ description: h,
108
+ footer: C !== void 0 && j ? /* @__PURE__ */ d(t, { children: A === void 0 ? "Select a node to inspect its record." : [A.label, A.description].filter((e) => e !== void 0).join(" · ") }) : void 0,
109
+ children: [j ? /* @__PURE__ */ d("div", {
110
+ ref: E.ref,
108
111
  role: "region",
109
112
  "aria-label": `${o} graph`,
110
- tabIndex: T.tabIndex,
113
+ tabIndex: E.tabIndex,
111
114
  className: "xysyzu8 xzuc9lq xeuugli x1t137rt xmkeg23 x1y0btm7 x1ey3b81 x13qnu6 x19rmrnh x9v5kkp x1bqaal",
112
115
  children: /* @__PURE__ */ f("div", {
113
- ...c.props(m.canvas(v, y)),
116
+ ...c.props(m.canvas(y, S)),
114
117
  children: [/* @__PURE__ */ f("svg", {
115
- width: v,
116
- height: y,
118
+ width: y,
119
+ height: S,
117
120
  "aria-hidden": !0,
118
121
  className: "x10l6tqk x10a8y8t x1lliihq",
119
122
  children: [
120
123
  /* @__PURE__ */ d("defs", { children: /* @__PURE__ */ d("marker", {
121
- id: w,
124
+ id: T,
122
125
  markerWidth: 8,
123
126
  markerHeight: 8,
124
127
  refX: 7,
@@ -130,7 +133,7 @@ function y({ title: o, description: p, nodes: h, edges: g, groups: _ = [], width
130
133
  className: "x8futc7"
131
134
  })
132
135
  }) }),
133
- _.map((e) => /* @__PURE__ */ f("g", { children: [/* @__PURE__ */ d("rect", {
136
+ v.map((e) => /* @__PURE__ */ f("g", { children: [/* @__PURE__ */ d("rect", {
134
137
  x: e.x,
135
138
  y: e.y,
136
139
  width: e.width,
@@ -149,29 +152,29 @@ function y({ title: o, description: p, nodes: h, edges: g, groups: _ = [], width
149
152
  children: e.label
150
153
  })
151
154
  })] }, e.id)),
152
- O.map(({ edge: e, source: t, target: n }) => {
155
+ k.map(({ edge: e, source: t, target: n }) => {
153
156
  let r = t.x < n.x, i = t.x + (r ? t.width : 0), a = n.x + (r ? 0 : n.width), o = t.y + t.height / 2, s = n.y + n.height / 2, c = (i + a) / 2, l = t.x + t.width / 2, u = t.id === n.id ? `M${l - 12},${t.y} C${l - 48},${t.y - 36} ${l + 48},${t.y - 36} ${l + 12},${t.y}` : `M${i},${o} C${c},${o} ${c},${s} ${a},${s}`;
154
157
  return /* @__PURE__ */ d("path", {
155
158
  d: u,
156
- markerEnd: e.direction === "directed" ? `url(#${w})` : void 0,
159
+ markerEnd: e.direction === "directed" ? `url(#${T})` : void 0,
157
160
  className: "xbh8q5q x1crw9hw xhr4kjn",
158
161
  children: /* @__PURE__ */ d("title", { children: e.label })
159
162
  }, e.id);
160
163
  })
161
164
  ]
162
- }), h.map((e) => {
165
+ }), g.map((e) => {
163
166
  let t = [
164
- ..._.filter((t) => t.nodeIds.includes(e.id)).map((e) => e.label),
167
+ ...v.filter((t) => t.nodeIds.includes(e.id)).map((e) => e.label),
165
168
  e.label,
166
169
  e.description
167
- ].filter((e) => e !== void 0).join(", "), n = c.props(m.node, m.position(e.x, e.y), m.size(e.width, e.height), m.tone(i[e.tone]), S !== void 0 && m.action, S?.selectedId === e.id && m.selected), r = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", {
170
+ ].filter((e) => e !== void 0).join(", "), n = c.props(m.node, m.position(e.x, e.y), m.size(e.width, e.height), m.tone(i[e.tone]), C !== void 0 && m.action, C?.selectedId === e.id && m.selected), r = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", {
168
171
  className: "xtqrqnz x1778rvt xk4h15q xb3r6kr xlyipyv xuxw1ft",
169
172
  children: e.label
170
173
  }), e.description !== void 0 && e.height >= 56 && /* @__PURE__ */ d("span", {
171
174
  className: "xy8obcc xas2l8k x153jb6y xb3r6kr xlyipyv xuxw1ft",
172
175
  children: e.description
173
176
  })] });
174
- return S === void 0 ? /* @__PURE__ */ d("div", {
177
+ return C === void 0 ? /* @__PURE__ */ d("div", {
175
178
  role: "group",
176
179
  "aria-label": t,
177
180
  title: t,
@@ -181,8 +184,8 @@ function y({ title: o, description: p, nodes: h, edges: g, groups: _ = [], width
181
184
  type: "button",
182
185
  "aria-label": t,
183
186
  title: t,
184
- "aria-pressed": S.selectedId === e.id,
185
- onClick: () => S.onSelect(e.id),
187
+ "aria-pressed": C.selectedId === e.id,
188
+ onClick: () => C.onSelect(e.id),
186
189
  ...n,
187
190
  children: r
188
191
  }, e.id);
@@ -190,17 +193,17 @@ function y({ title: o, description: p, nodes: h, edges: g, groups: _ = [], width
190
193
  })
191
194
  }) : /* @__PURE__ */ d("p", {
192
195
  className: "x1ghz6dp x153jb6y",
193
- children: C
194
- }), A ? /* @__PURE__ */ f(a, {
196
+ children: w
197
+ }), j ? /* @__PURE__ */ f(a, {
195
198
  label: "Graph data",
196
199
  children: [
197
200
  /* @__PURE__ */ d("ul", {
198
201
  "aria-label": "Nodes",
199
202
  className: "x1ghz6dp x1717udv xe8uvvx",
200
- children: h.map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(n, {
203
+ children: g.map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(n, {
201
204
  label: [e.label, e.description].filter((e) => e !== void 0).join(", "),
202
- isSelected: S?.selectedId === e.id,
203
- onSelect: S === void 0 ? void 0 : () => S.onSelect(e.id),
205
+ isSelected: C?.selectedId === e.id,
206
+ onSelect: C === void 0 ? void 0 : () => C.onSelect(e.id),
204
207
  children: /* @__PURE__ */ f("span", {
205
208
  className: "xrvj5dj xfko13i xeuugli xh8yej3",
206
209
  children: [/* @__PURE__ */ d("span", { children: e.label }), e.description !== void 0 && /* @__PURE__ */ d("span", {
@@ -210,19 +213,19 @@ function y({ title: o, description: p, nodes: h, edges: g, groups: _ = [], width
210
213
  })
211
214
  }) }, e.id))
212
215
  }),
213
- _.length > 0 && /* @__PURE__ */ d("ul", {
216
+ v.length > 0 && /* @__PURE__ */ d("ul", {
214
217
  "aria-label": "Groups",
215
218
  className: "xo02m6d xv06hpe x153jb6y xj0a0fe",
216
- children: _.map((e) => /* @__PURE__ */ f("li", { children: [
219
+ children: v.map((e) => /* @__PURE__ */ f("li", { children: [
217
220
  e.label,
218
221
  ": ",
219
- e.nodeIds.map((e) => D.get(e)?.label).join(", ")
222
+ e.nodeIds.map((e) => O.get(e)?.label).join(", ")
220
223
  ] }, e.id))
221
224
  }),
222
- O.length > 0 && /* @__PURE__ */ d("ul", {
225
+ k.length > 0 && /* @__PURE__ */ d("ul", {
223
226
  "aria-label": "Relationships",
224
227
  className: "xo02m6d xv06hpe x153jb6y xj0a0fe",
225
- children: O.map(({ edge: e, source: t, target: n }) => /* @__PURE__ */ f("li", { children: [
228
+ children: k.map(({ edge: e, source: t, target: n }) => /* @__PURE__ */ f("li", { children: [
226
229
  t.label,
227
230
  " ",
228
231
  e.direction === "directed" ? "→" : "↔",