@mechane-ai/elements 0.25.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 (69) 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 +55 -54
  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 +22 -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 +125 -97
  28. package/dist/navigation/commands.js +1 -1
  29. package/dist/navigation.js +61 -25
  30. package/dist/packages/charts/src/cartesian/bar-chart.d.ts +5 -4
  31. package/dist/packages/charts/src/cartesian/breakdown-bar.d.ts +3 -2
  32. package/dist/packages/charts/src/cartesian/index.d.ts +2 -2
  33. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +2 -1
  34. package/dist/packages/charts/src/cartesian/time-series.d.ts +12 -3
  35. package/dist/packages/charts/src/chart-frame.d.ts +15 -7
  36. package/dist/packages/charts/src/chart-input.d.ts +3 -1
  37. package/dist/packages/charts/src/chart-inspection.d.ts +3 -1
  38. package/dist/packages/charts/src/chart-series-summary.d.ts +6 -0
  39. package/dist/packages/charts/src/chart-theme.d.ts +5 -0
  40. package/dist/packages/charts/src/distribution/ecdf.d.ts +3 -2
  41. package/dist/packages/charts/src/distribution/histogram.d.ts +3 -2
  42. package/dist/packages/charts/src/distribution/interval-plot.d.ts +3 -2
  43. package/dist/packages/charts/src/distribution/ranked-bars.d.ts +3 -2
  44. package/dist/packages/charts/src/graph/relation-graph.d.ts +3 -2
  45. package/dist/packages/charts/src/hierarchy/treemap.d.ts +3 -2
  46. package/dist/packages/charts/src/index.d.ts +1 -1
  47. package/dist/packages/charts/src/matrix/matrix.d.ts +3 -2
  48. package/dist/packages/charts/src/matrix/token-heatmap.d.ts +3 -2
  49. package/dist/packages/charts/src/timeline/waterfall.d.ts +4 -1
  50. package/dist/packages/core/src/index.d.ts +2 -0
  51. package/dist/packages/core/src/section-heading.d.ts +8 -0
  52. package/dist/packages/layout/src/collection-layout.d.ts +6 -0
  53. package/dist/packages/layout/src/detail-page.d.ts +2 -1
  54. package/dist/packages/layout/src/index.d.ts +4 -0
  55. package/dist/packages/layout/src/record-page.d.ts +2 -1
  56. package/dist/packages/layout/src/report-content.d.ts +6 -0
  57. package/dist/packages/navigation/src/content-tabs.d.ts +17 -0
  58. package/dist/packages/navigation/src/index.d.ts +2 -0
  59. package/dist/{pierre-diff-CHQsoQSZ.js → pierre-diff-C3U_qae6.js} +1 -1
  60. package/dist/{pierre-theme-CLgk9v3e.js → pierre-theme-DsrSwl5m.js} +19 -20
  61. package/dist/{pierre-tree-C3nKYyoN.js → pierre-tree-KSFewJrY.js} +4 -4
  62. package/dist/{src-CQOgWIzP.js → src-DYwAhQHt.js} +98 -98
  63. package/dist/{src-DLReNPV9.js → src-E3Or8tkO.js} +38 -18
  64. package/dist/{src-DHYcohZP.js → src-eWcNz_oB.js} +25 -26
  65. package/dist/tokens.js +1 -3
  66. package/dist/{tokens.stylex-DTHHFbyl.js → tokens.stylex-BoRZ3D8s.js} +92 -12
  67. package/package.json +1 -1
  68. package/dist/chart-frame-CNr8M_b2.js +0 -166
  69. package/dist/constants.stylex-BILvnwUk.js +0 -84
package/dist/content.js CHANGED
@@ -1,8 +1,8 @@
1
- import { C as e, E as t, _ as n, g as r } from "./src-DLReNPV9.js";
1
+ import { D as e, _ as t, v as n, w as r } from "./src-E3Or8tkO.js";
2
2
  import { t as i } from "./use-scroll-tab-index-Dxpdh4W7.js";
3
3
  import { t as a } from "./viewer-styles-CpHqp5Qv.js";
4
- import { t as o } from "./code-block-DENC5fD_.js";
5
- import { t as s } from "./content-link-CGIua9If.js";
4
+ import { t as o } from "./code-block-DPeyW4sm.js";
5
+ import { t as s } from "./content-link-5oRGjDHa.js";
6
6
  import * as c from "@stylexjs/stylex";
7
7
  import { useCallback as l, useEffect as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
8
8
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
@@ -149,24 +149,24 @@ var D = {
149
149
  $$css: !0
150
150
  }
151
151
  }, k = 2e5;
152
- function A({ output: t, label: r, maxLines: o = 500, maxHeight: s = 320, isRunning: l = !1 }) {
153
- let g = i(), _ = g.viewport, v = f(!1), [y, b] = p(!0), x = S(t), C = x.slice(-2e5).split("\n"), w = C.slice(-Math.max(1, o)), T = C.length - w.length;
152
+ function A({ output: e, label: t, maxLines: o = 500, maxHeight: s = 320, isRunning: l = !1 }) {
153
+ let g = i(), _ = g.viewport, v = f(!1), [y, b] = p(!0), x = S(e), C = x.slice(-2e5).split("\n"), w = C.slice(-Math.max(1, o)), T = C.length - w.length;
154
154
  return u(() => {
155
155
  y && _.current !== null && (_.current.scrollTop = _.current.scrollHeight);
156
- }, [t, y]), d(() => {
156
+ }, [e, y]), d(() => {
157
157
  !l && v.current && (v.current = !1, _.current?.focus({ preventScroll: !0 }));
158
158
  }, [l]), /* @__PURE__ */ h("section", {
159
- "aria-label": r,
159
+ "aria-label": t,
160
160
  ...c.props(a.root),
161
161
  children: [
162
162
  /* @__PURE__ */ h("div", {
163
163
  ...c.props(a.header),
164
164
  children: [/* @__PURE__ */ h("span", {
165
165
  ...c.props(a.label),
166
- children: [r, l && " · running"]
166
+ children: [t, l && " · running"]
167
167
  }), /* @__PURE__ */ h("div", {
168
168
  ...c.props(a.actions),
169
- children: [l && /* @__PURE__ */ m(e, {
169
+ children: [l && /* @__PURE__ */ m(r, {
170
170
  variant: "ghost",
171
171
  onClick: () => b(!y),
172
172
  onFocus: () => {
@@ -177,8 +177,8 @@ function A({ output: t, label: r, maxLines: o = 500, maxHeight: s = 320, isRunni
177
177
  },
178
178
  children: y ? "Pause following" : "Follow output"
179
179
  }), /* @__PURE__ */ m(n, {
180
- value: t,
181
- label: r,
180
+ value: e,
181
+ label: t,
182
182
  children: "Copy"
183
183
  })]
184
184
  })]
@@ -194,7 +194,7 @@ function A({ output: t, label: r, maxLines: o = 500, maxHeight: s = 320, isRunni
194
194
  /* @__PURE__ */ m("pre", {
195
195
  ref: g.ref,
196
196
  role: "region",
197
- "aria-label": `${r} output`,
197
+ "aria-label": `${t} output`,
198
198
  tabIndex: g.tabIndex,
199
199
  onScroll: (e) => {
200
200
  let t = e.currentTarget;
@@ -346,10 +346,10 @@ function z({ label: e, children: t }) {
346
346
  children: t
347
347
  });
348
348
  }
349
- function B({ id: e, label: n, status: i, statusLabel: a, description: o, detail: s, isSelected: l, onSelect: u, children: d }) {
349
+ function B({ id: n, label: r, status: i, statusLabel: a, description: o, detail: s, isSelected: l, onSelect: u, children: d }) {
350
350
  let f = L[i];
351
351
  return /* @__PURE__ */ h("li", {
352
- "data-item-id": e,
352
+ "data-item-id": n,
353
353
  className: "x1n2onr6 xrvj5dj x1qpdrs7 x8zbtdt x1wv5www xup0pd7",
354
354
  children: [/* @__PURE__ */ h("div", {
355
355
  "aria-hidden": !0,
@@ -366,10 +366,10 @@ function B({ id: e, label: n, status: i, statusLabel: a, description: o, detail:
366
366
  0: { className: "xk4h15q xj0a0fe" },
367
367
  1: { className: "xk4h15q xj0a0fe xujl8zx xda060z" }
368
368
  }[l === !0 | 0],
369
- children: u === void 0 ? n : /* @__PURE__ */ m(t, {
369
+ children: u === void 0 ? r : /* @__PURE__ */ m(e, {
370
370
  "aria-pressed": l,
371
- onClick: () => u(e),
372
- children: n
371
+ onClick: () => u(n),
372
+ children: r
373
373
  })
374
374
  }),
375
375
  /* @__PURE__ */ m("span", {
@@ -380,7 +380,7 @@ function B({ id: e, label: n, status: i, statusLabel: a, description: o, detail:
380
380
  className: "x1ghz6dp x153jb6y xj0a0fe",
381
381
  children: o
382
382
  }),
383
- s !== void 0 && /* @__PURE__ */ h(r.Root, { children: [/* @__PURE__ */ m(r.Trigger, { children: "Details" }), /* @__PURE__ */ m(r.Panel, { children: s })] }),
383
+ s !== void 0 && /* @__PURE__ */ h(t.Root, { children: [/* @__PURE__ */ m(t.Trigger, { children: "Details" }), /* @__PURE__ */ m(t.Panel, { children: s })] }),
384
384
  d
385
385
  ]
386
386
  })]
package/dist/elements.css CHANGED
@@ -2406,6 +2406,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
2406
2406
  margin-left: auto;
2407
2407
  }
2408
2408
 
2409
+ .x1y332i5 {
2410
+ margin-top: -1px;
2411
+ }
2412
+
2409
2413
  .xr1yuqi {
2410
2414
  margin-top: auto;
2411
2415
  }
@@ -2650,10 +2654,18 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
2650
2654
  overflow-y: auto;
2651
2655
  }
2652
2656
 
2657
+ .xy5w88m {
2658
+ overscroll-behavior-y: auto;
2659
+ }
2660
+
2653
2661
  .x1e4zzel {
2654
2662
  overscroll-behavior-y: contain;
2655
2663
  }
2656
2664
 
2665
+ .x18d9i69 {
2666
+ padding-bottom: 0;
2667
+ }
2668
+
2657
2669
  .x1a148e8 {
2658
2670
  padding-bottom: env(safe-area-inset-bottom, 0px);
2659
2671
  }
@@ -2766,6 +2778,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
2766
2778
  width: 16px;
2767
2779
  }
2768
2780
 
2781
+ .x1f394nn {
2782
+ width: 18%;
2783
+ }
2784
+
2769
2785
  .x1so1ns2 {
2770
2786
  width: 192px;
2771
2787
  }
@@ -3296,6 +3312,12 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
3296
3312
  }
3297
3313
  }
3298
3314
 
3315
+ @media (width <= 639px) {
3316
+ .x43dure.x43dure {
3317
+ width: auto;
3318
+ }
3319
+ }
3320
+
3299
3321
  @container workbench (width <= 860px) {
3300
3322
  .x1vx4hiz.x1vx4hiz {
3301
3323
  width: 100%;
package/dist/feedback.js CHANGED
@@ -1 +1 @@
1
- export { t as AsyncRegion, c as ButtonPlaceholder, n as ContentReveal, p as EmptyState, l as FieldPlaceholder, r as LoadingScope, o as Meter, m as Notice, s as Progress, u as Skeleton, d as SkeletonText, f as Spinner, i as Toaster, a as toast } from "./src-DHYcohZP.js";
1
+ export { t as AsyncRegion, c as ButtonPlaceholder, n as ContentReveal, p as EmptyState, l as FieldPlaceholder, r as LoadingScope, o as Meter, m as Notice, s as Progress, u as Skeleton, d as SkeletonText, f as Spinner, i as Toaster, a as toast } from "./src-eWcNz_oB.js";
@@ -1,4 +1,4 @@
1
- import { C as e, E as t } from "../src-DLReNPV9.js";
1
+ import { D as e, w as t } from "../src-E3Or8tkO.js";
2
2
  import { r as n } from "../src-d7EAi61b.js";
3
3
  import "@stylexjs/stylex";
4
4
  import { useState as r } from "react";
@@ -115,7 +115,7 @@ function m({ label: s, value: c, onValueChange: l, formatValue: u, presets: d =
115
115
  onOpenChange: g,
116
116
  children: [/* @__PURE__ */ a(n.Trigger, {
117
117
  disabled: f,
118
- render: /* @__PURE__ */ i(e, { variant: "outline" }),
118
+ render: /* @__PURE__ */ i(t, { variant: "outline" }),
119
119
  "aria-label": s,
120
120
  children: [/* @__PURE__ */ i(o, {
121
121
  size: 16,
@@ -132,13 +132,13 @@ function m({ label: s, value: c, onValueChange: l, formatValue: u, presets: d =
132
132
  role: "group",
133
133
  "aria-label": "Date presets",
134
134
  className: "x78zum5 x1a02dak xunmzkg xmmm7uk xso031l x1q0q8m5 x1qndepd",
135
- children: d.map((t) => /* @__PURE__ */ i(e, {
135
+ children: d.map((e) => /* @__PURE__ */ i(t, {
136
136
  variant: "ghost",
137
137
  onClick: () => {
138
- l(t.value), g(!1);
138
+ l(e.value), g(!1);
139
139
  },
140
- children: t.label
141
- }, t.id))
140
+ children: e.label
141
+ }, e.id))
142
142
  }),
143
143
  /* @__PURE__ */ i(p, {
144
144
  ...m,
@@ -152,7 +152,7 @@ function m({ label: s, value: c, onValueChange: l, formatValue: u, presets: d =
152
152
  }),
153
153
  /* @__PURE__ */ a("div", {
154
154
  className: "x78zum5 x1a02dak x1qughib x6s0dn4 xaml1ju x3bg4vu x178xt8z x13fuv20 xhjagg4 xy8obcc xas2l8k xj0a0fe x153jb6y",
155
- children: [/* @__PURE__ */ i("span", { children: m.timeZone }), /* @__PURE__ */ i(t, {
155
+ children: [/* @__PURE__ */ i("span", { children: m.timeZone }), /* @__PURE__ */ i(e, {
156
156
  disabled: c === void 0,
157
157
  onClick: () => l(void 0),
158
158
  children: "Clear"
package/dist/forms.js CHANGED
@@ -1 +1 @@
1
- export { _ as AgentAvatarPicker, r as Checkbox, v as Combobox, c as Field, f as Fieldset, p as FilePicker, d as FormActions, l as Input, m as InputGroup, h as NumberField, i as RadioGroup, s as Select, n as SettingsRow, t as SettingsSection, g as Slider, a as Switch, u as Textarea, o as ToggleGroup } from "./src-CQOgWIzP.js";
1
+ export { _ as AgentAvatarPicker, r as Checkbox, v as Combobox, c as Field, f as Fieldset, p as FilePicker, d as FormActions, l as Input, m as InputGroup, h as NumberField, i as RadioGroup, s as Select, n as SettingsRow, t as SettingsSection, g as Slider, a as Switch, u as Textarea, o as ToggleGroup } from "./src-DYwAhQHt.js";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { h as Accordion, v as AgentAvatar, S as Avatar, t as Badge, C as Button, g as Collapsible, l as Columns, _ as CopyValue, u as Divider, n as Heading, w as IconButton, T as IconLink, r as Identifier, i as Muted, d as Panel, a as Prose, f as Row, p as Stack, o as Status, s as Subheading, m as SurfaceLink, c as Text, E as TextButton, D as TextLink, y as agentAppearance, b as agentAvatarColors, x as agentAvatarShapes } from "./src-DLReNPV9.js";
1
+ export { g as Accordion, y as AgentAvatar, C as Avatar, t as Badge, w as Button, _ as Collapsible, u as Columns, v as CopyValue, d as Divider, n as Heading, T as IconButton, E as IconLink, r as Identifier, i as Muted, f as Panel, a as Prose, p as Row, l as SectionHeading, m as Stack, o as Status, s as Subheading, h as SurfaceLink, c as Text, D as TextButton, O as TextLink, b as agentAppearance, x as agentAvatarColors, S as agentAvatarShapes } from "./src-E3Or8tkO.js";