@mechane-ai/elements 0.19.0 → 0.20.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 (44) hide show
  1. package/README.md +11 -3
  2. package/dist/ai.js +4 -4
  3. package/dist/{categorical-values-D-sSI9JB.js → categorical-values-Cf-zlA1u.js} +2 -2
  4. package/dist/{chart-frame-vwS7YVgv.js → chart-frame-Cf6LBA8M.js} +1 -1
  5. package/dist/{chart-input-D6Fw2UGV.js → chart-input-BTDzeBQU.js} +2 -2
  6. package/dist/charts/cartesian.js +6 -6
  7. package/dist/charts/distribution.js +2 -2
  8. package/dist/charts/graph.js +2 -2
  9. package/dist/charts/hierarchy.js +3 -3
  10. package/dist/charts/matrix.js +2 -2
  11. package/dist/charts/timeline.js +2 -2
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-DB42-a0M.js → code-block-D1_kzPrs.js} +2 -2
  14. package/dist/collections.js +4 -4
  15. package/dist/{constants.stylex-bbdiv1fD.js → constants.stylex-BILvnwUk.js} +1 -0
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +3 -3
  18. package/dist/content/link.js +1 -1
  19. package/dist/content/markdown.js +2 -2
  20. package/dist/content/tree.js +2 -2
  21. package/dist/{content-link-rdxJ94P8.js → content-link-BIMrgXbz.js} +1 -1
  22. package/dist/content.js +3 -3
  23. package/dist/elements.css +20 -0
  24. package/dist/feedback.js +1 -1
  25. package/dist/forms/dates.js +1 -1
  26. package/dist/forms.js +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/layout.js +342 -207
  29. package/dist/navigation/commands.js +1 -1
  30. package/dist/packages/feedback/src/async-region.d.ts +3 -1
  31. package/dist/packages/foundations/src/constants.stylex.d.ts +1 -0
  32. package/dist/packages/layout/src/app-shell.d.ts +2 -1
  33. package/dist/packages/layout/src/index.d.ts +2 -0
  34. package/dist/packages/layout/src/navigation-rail.d.ts +18 -0
  35. package/dist/packages/layout/src/sidebar.d.ts +2 -1
  36. package/dist/{pierre-diff-C_j0nxwS.js → pierre-diff-hAwARDse.js} +1 -1
  37. package/dist/{pierre-theme-BUeJim8s.js → pierre-theme-CLgk9v3e.js} +1 -1
  38. package/dist/{pierre-tree-BQBbAhmI.js → pierre-tree-D3XsgEH6.js} +4 -4
  39. package/dist/{src-BVsyKLQ8.js → src-0mocxTaR.js} +64 -43
  40. package/dist/{src-Dven_9lR.js → src-D4zPPr32.js} +1 -1
  41. package/dist/{src-BXh4g2VY.js → src-qU5Z5LRH.js} +1 -0
  42. package/dist/tokens.js +1 -1
  43. package/package.json +1 -1
  44. package/packages/foundations/src/constants.stylex.ts +1 -1
package/README.md CHANGED
@@ -95,9 +95,13 @@ asynchronous work and pass its pending, success, or failure state to controls.
95
95
  Use `ToolbarAction` for page-header actions, including links composed with `render`. A clipboard action can compose
96
96
  `CopyValue render={<ToolbarAction />}`; the rendered control owns its appearance and CopyValue owns copy feedback. Use
97
97
  `Row` for aligned inline actions, `Stack` for related content, and `RecordPage.Content` for separated page sections.
98
- Detail titles wrap; list metadata truncates. Sidebar items share contiguous hit areas. Put scrolling commands with the
99
- navigation and reserve the divided sidebar footer for persistent account controls. Use
100
- `SidebarFooter layout="navigation"` for a group of commands; its intrinsic height keeps the scrolling navigation clear.
98
+ Detail titles wrap; list metadata truncates. Sidebar items share contiguous hit areas. Supply `AppShell` with a
99
+ `NavigationRail` in its `rail` slot for persistent area links and an optional action. It occupies 48px of the 240px
100
+ navigation budget beside a 192px contextual sidebar. Collapsing hides the contextual sidebar and retains the rail. The
101
+ phone drawer renders those area links with visible labels above its pages. Applications supply selection, URLs, native
102
+ link handlers, and action callbacks. Omit the rail for a sidebar that collapses to page icons.
103
+ `SidebarFooter layout="navigation"` holds persistent controls in the contextual sidebar and reserves their intrinsic
104
+ height while its pages scroll independently.
101
105
 
102
106
  Navigation closes the mobile drawer and preserves focus set by the destination. Use
103
107
  `NavigationItem shouldCloseOnActivate={false}` for menu triggers.
@@ -191,6 +195,10 @@ Use `AsyncRegion` from `/feedback` with an explicit `pending`, `ready`, or `fail
191
195
  80ms; ready-at-mount and failed content appear immediately. Reduced motion removes the fades. There is no minimum
192
196
  loading duration, and ordinary callers do not configure timing.
193
197
 
198
+ For a photo or image, set `presentation="image"` to show its placeholder immediately and reveal the ready image in
199
+ 200ms. Ready-at-mount images keep full opacity, including cached revisits. The supplied state covers the application's
200
+ fetch and decode, and the reduced-motion preference removes the transition.
201
+
194
202
  Wrap a page in `LoadingScope` and pass its navigation `identity` to share one clock across dependent reads. Updating the
195
203
  identity resets pending presentation without remounting ready children. Use `initialStartedAt` only to preserve elapsed
196
204
  document loading time at hydration; later identities start their own clock. Keep refreshes in the ready state and retain
package/dist/ai.js CHANGED
@@ -1,8 +1,8 @@
1
- import { C as e, E as t, O as n, T as r, f as i, g as a, p as o, t as s, w as c } from "./src-BXh4g2VY.js";
2
- import { t as l } from "./content-link-rdxJ94P8.js";
1
+ import { C as e, E as t, O as n, T as r, f as i, g as a, p as o, t as s, w as c } from "./src-qU5Z5LRH.js";
2
+ import { t as l } from "./content-link-BIMrgXbz.js";
3
3
  import { r as u, t as d } from "./src-d7EAi61b.js";
4
- import { c as f, d as p } from "./src-BVsyKLQ8.js";
5
- import { c as m, u as h } from "./src-Dven_9lR.js";
4
+ import { c as f, d as p } from "./src-0mocxTaR.js";
5
+ import { c as m, u as h } from "./src-D4zPPr32.js";
6
6
  import { t as g } from "./accessibility-C-aIZ1Yx.js";
7
7
  import { t as _ } from "./visible-motion-1GcUaEi4.js";
8
8
  import * as v from "@stylexjs/stylex";
@@ -1,5 +1,5 @@
1
- import { n as e, s as t } from "./chart-frame-vwS7YVgv.js";
2
- import { n } from "./chart-input-D6Fw2UGV.js";
1
+ import { n as e, s as t } from "./chart-frame-Cf6LBA8M.js";
2
+ import { n } from "./chart-input-BTDzeBQU.js";
3
3
  import * as r from "@stylexjs/stylex";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  // packages/charts/src/categorical-values.tsx
@@ -1,4 +1,4 @@
1
- import { g as e } from "./src-BXh4g2VY.js";
1
+ import { g as e } from "./src-qU5Z5LRH.js";
2
2
  import { n as t, r as n } from "./tokens.stylex-DTHHFbyl.js";
3
3
  import * as r from "@stylexjs/stylex";
4
4
  import { useId as i } from "react";
@@ -1,5 +1,5 @@
1
- import { m as e } from "./src-BVsyKLQ8.js";
2
- import { r as t } from "./chart-frame-vwS7YVgv.js";
1
+ import { m as e } from "./src-0mocxTaR.js";
2
+ import { r as t } from "./chart-frame-Cf6LBA8M.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  // packages/charts/src/chart-input.tsx
5
5
  function r(e) {
@@ -1,10 +1,10 @@
1
- import { u as e } from "../src-BVsyKLQ8.js";
2
- import { i as t, n, r, t as i } from "../categorical-values-D-sSI9JB.js";
3
- import { a, i as o, n as s, o as c, r as l, s as u, t as d } from "../chart-frame-vwS7YVgv.js";
4
- import { n as f, r as p, t as m } from "../chart-input-D6Fw2UGV.js";
1
+ import { u as e } from "../src-0mocxTaR.js";
2
+ import { i as t, n, r, t as i } from "../categorical-values-Cf-zlA1u.js";
3
+ import { a, i as o, n as s, o as c, r as l, s as u, t as d } from "../chart-frame-Cf6LBA8M.js";
4
+ import { n as f, r as p, t as m } from "../chart-input-BTDzeBQU.js";
5
5
  import { t as h } from "../plot-width--OgdohB5.js";
6
- import { E as g } from "../src-BXh4g2VY.js";
7
- import { g as _ } from "../src-Dven_9lR.js";
6
+ import { E as g } from "../src-qU5Z5LRH.js";
7
+ import { g as _ } from "../src-D4zPPr32.js";
8
8
  import { r as v } from "../tokens.stylex-DTHHFbyl.js";
9
9
  import * as y from "@stylexjs/stylex";
10
10
  import { useEffect as b, useId as x, useMemo as S, useRef as C, useState as w } from "react";
@@ -1,5 +1,5 @@
1
- import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-vwS7YVgv.js";
2
- import { n as a, r as o, t as s } from "../chart-input-D6Fw2UGV.js";
1
+ import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-Cf6LBA8M.js";
2
+ import { n as a, r as o, t as s } from "../chart-input-BTDzeBQU.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";
@@ -1,5 +1,5 @@
1
- import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-vwS7YVgv.js";
2
- import { n as a, t as o } from "../chart-input-D6Fw2UGV.js";
1
+ import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-Cf6LBA8M.js";
2
+ import { n as a, t as o } from "../chart-input-BTDzeBQU.js";
3
3
  import * as s from "@stylexjs/stylex";
4
4
  import { useId as c } from "react";
5
5
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import { i as e, r as t, t as n } from "../categorical-values-D-sSI9JB.js";
2
- import { o as r, r as i, s as a } from "../chart-frame-vwS7YVgv.js";
3
- import { t as o } from "../chart-input-D6Fw2UGV.js";
1
+ import { i as e, r as t, t as n } from "../categorical-values-Cf-zlA1u.js";
2
+ import { o as r, r as i, s as a } from "../chart-frame-Cf6LBA8M.js";
3
+ import { t as o } from "../chart-input-BTDzeBQU.js";
4
4
  import { t as s } from "../plot-width--OgdohB5.js";
5
5
  import * as c from "@stylexjs/stylex";
6
6
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { r as e } from "../tokens.stylex-DTHHFbyl.js";
2
- import { n as t, r as n, t as r } from "../chart-input-D6Fw2UGV.js";
3
- import { a as i, n as a, r as o, s, t as c } from "../chart-frame-vwS7YVgv.js";
2
+ import { n as t, r as n, t as r } from "../chart-input-BTDzeBQU.js";
3
+ import { a as i, n as a, r as o, s, t as c } from "../chart-frame-Cf6LBA8M.js";
4
4
  import * as l from "@stylexjs/stylex";
5
5
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
6
6
  // packages/charts/src/matrix/heatmap-scale.ts
@@ -1,5 +1,5 @@
1
- import { c as e } from "../src-BXh4g2VY.js";
2
- import { n as t, t as n } from "../chart-input-D6Fw2UGV.js";
1
+ import { c as e } from "../src-qU5Z5LRH.js";
2
+ import { n as t, t as n } from "../chart-input-BTDzeBQU.js";
3
3
  import * as r from "@stylexjs/stylex";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  import { scaleLinear as o } from "@visx/scale";
package/dist/charts.js CHANGED
@@ -1 +1 @@
1
- export { r as ChartFrame, i as ChartLegend } from "./chart-frame-vwS7YVgv.js";
1
+ export { r as ChartFrame, i as ChartLegend } from "./chart-frame-Cf6LBA8M.js";
@@ -1,7 +1,7 @@
1
- import { _ as e } from "./src-BXh4g2VY.js";
1
+ import { _ as e } from "./src-qU5Z5LRH.js";
2
2
  import { r as t } from "./tokens.stylex-DTHHFbyl.js";
3
3
  import { t as n } from "./viewer-styles-CpHqp5Qv.js";
4
- import { t as r } from "./pierre-theme-BUeJim8s.js";
4
+ import { t as r } from "./pierre-theme-CLgk9v3e.js";
5
5
  import * as i from "@stylexjs/stylex";
6
6
  import { useEffect as a, useRef as o, useState as s } from "react";
7
7
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
@@ -1,9 +1,9 @@
1
- import { C as e, c as t, f as n, g as r, w as i } from "./src-BXh4g2VY.js";
2
- import { r as a } from "./src-Dven_9lR.js";
1
+ import { C as e, c as t, f as n, g as r, w as i } from "./src-qU5Z5LRH.js";
2
+ import { r as a } from "./src-D4zPPr32.js";
3
3
  import { r as o, t as s } from "./src-d7EAi61b.js";
4
- import { d as c } from "./src-BVsyKLQ8.js";
4
+ import { d as c } from "./src-0mocxTaR.js";
5
5
  import { t as l } from "./accessibility-C-aIZ1Yx.js";
6
- import { l as u, t as d } from "./constants.stylex-bbdiv1fD.js";
6
+ import { l as u, t as d } from "./constants.stylex-BILvnwUk.js";
7
7
  import { mergeProps as f } from "@base-ui/react/merge-props";
8
8
  import * as p from "@stylexjs/stylex";
9
9
  import { Children as m, Fragment as ee, useEffect as h, useLayoutEffect as g, useMemo as te, useRef as _, useState as v, useSyncExternalStore as ne } from "react";
@@ -62,6 +62,7 @@ var e = {
62
62
  }, i = {
63
63
  delaySeconds: 2,
64
64
  revealMs: 80,
65
+ imageRevealMs: 200,
65
66
  placeholderMs: 120
66
67
  }, a = { popup: "0 4px 16px #00000066" }, o = {
67
68
  sticky: "1",
@@ -1 +1 @@
1
- export { t as CodeBlock } from "../code-block-DB42-a0M.js";
1
+ export { t as CodeBlock } from "../code-block-D1_kzPrs.js";
@@ -1,5 +1,5 @@
1
- import { E as e, _ as t, g as n } from "../src-BXh4g2VY.js";
2
- import { t as r } from "../code-block-DB42-a0M.js";
1
+ import { E as e, _ as t, g as n } from "../src-qU5Z5LRH.js";
2
+ import { t as r } from "../code-block-D1_kzPrs.js";
3
3
  import { t as i } from "../viewer-styles-CpHqp5Qv.js";
4
4
  import * as a from "@stylexjs/stylex";
5
5
  import { useEffect as o, useState as s } from "react";
@@ -44,7 +44,7 @@ function m(n) {
44
44
  let e = !0;
45
45
  async function t() {
46
46
  if (!A) try {
47
- let t = await import("../pierre-diff-C_j0nxwS.js"), n = t.prepareDiff(x);
47
+ let t = await import("../pierre-diff-hAwARDse.js"), n = t.prepareDiff(x);
48
48
  e && w({
49
49
  source: x,
50
50
  Component: t.PierreDiff,
@@ -1 +1 @@
1
- export { t as ContentLink } from "../content-link-rdxJ94P8.js";
1
+ export { t as ContentLink } from "../content-link-BIMrgXbz.js";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../visible-motion-1GcUaEi4.js";
2
- import { t } from "../code-block-DB42-a0M.js";
3
- import { n, t as r } from "../content-link-rdxJ94P8.js";
2
+ import { t } from "../code-block-D1_kzPrs.js";
3
+ import { n, t as r } from "../content-link-BIMrgXbz.js";
4
4
  import { t as i } from "../viewer-styles-CpHqp5Qv.js";
5
5
  import * as a from "@stylexjs/stylex";
6
6
  import { Children as o, createContext as s, createElement as c, memo as l, useContext as u } from "react";
@@ -1,4 +1,4 @@
1
- import { E as e } from "../src-BXh4g2VY.js";
1
+ import { E as e } from "../src-qU5Z5LRH.js";
2
2
  import { t } from "../viewer-styles-CpHqp5Qv.js";
3
3
  import * as n from "@stylexjs/stylex";
4
4
  import { useEffect as r, useState as i } from "react";
@@ -27,7 +27,7 @@ function d(l) {
27
27
  let e = !0;
28
28
  async function t() {
29
29
  try {
30
- let t = await import("../pierre-tree-BQBbAhmI.js");
30
+ let t = await import("../pierre-tree-D3XsgEH6.js");
31
31
  e && f({
32
32
  Component: t.PierreTree,
33
33
  hasFailed: !1
@@ -1,4 +1,4 @@
1
- import { D as e } from "./src-BXh4g2VY.js";
1
+ import { D as e } from "./src-qU5Z5LRH.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,7 +1,7 @@
1
- import { C as e, E as t, _ as n, g as r } from "./src-BXh4g2VY.js";
1
+ import { C as e, E as t, _ as n, g as r } from "./src-qU5Z5LRH.js";
2
2
  import { t as i } from "./viewer-styles-CpHqp5Qv.js";
3
- import { t as a } from "./code-block-DB42-a0M.js";
4
- import { t as o } from "./content-link-rdxJ94P8.js";
3
+ import { t as a } from "./code-block-D1_kzPrs.js";
4
+ import { t as o } from "./content-link-BIMrgXbz.js";
5
5
  import * as s from "@stylexjs/stylex";
6
6
  import { useCallback as c, useEffect as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
7
7
  import { jsx as p, jsxs as m } from "react/jsx-runtime";
package/dist/elements.css CHANGED
@@ -472,6 +472,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
472
472
  margin-inline: auto;
473
473
  }
474
474
 
475
+ .xn92wy8 {
476
+ margin-inline: var(--xxhyxt);
477
+ }
478
+
475
479
  .xysyzu8 {
476
480
  overflow: auto;
477
481
  }
@@ -676,6 +680,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
676
680
  animation-duration: .12s;
677
681
  }
678
682
 
683
+ .x11hm9ij {
684
+ animation-duration: .2s;
685
+ }
686
+
679
687
  .x1irg2zc {
680
688
  animation-duration: 80ms;
681
689
  }
@@ -1218,6 +1226,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
1218
1226
  grid-auto-columns: auto;
1219
1227
  }
1220
1228
 
1229
+ .x1rnidkh {
1230
+ grid-auto-columns: minmax(0, 1fr);
1231
+ }
1232
+
1221
1233
  .x1mt1orb {
1222
1234
  grid-auto-flow: column;
1223
1235
  }
@@ -2608,6 +2620,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
2608
2620
  padding-bottom: var(--x1qq5i99);
2609
2621
  }
2610
2622
 
2623
+ .xngumbj {
2624
+ padding-bottom: var(--x1xijsos);
2625
+ }
2626
+
2611
2627
  .xmmm7uk {
2612
2628
  padding-bottom: var(--xxhyxt);
2613
2629
  }
@@ -2752,6 +2768,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
2752
2768
  width: auto;
2753
2769
  }
2754
2770
 
2771
+ .xuqhkz3 {
2772
+ width: calc(var(--xyyn5jb) - var(--x1m0ogk9));
2773
+ }
2774
+
2755
2775
  .xeq5yr9 {
2756
2776
  width: fit-content;
2757
2777
  }
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-BVsyKLQ8.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-0mocxTaR.js";
@@ -1,4 +1,4 @@
1
- import { C as e, E as t } from "../src-BXh4g2VY.js";
1
+ import { C as e, E as t } from "../src-qU5Z5LRH.js";
2
2
  import { r as n } from "../src-d7EAi61b.js";
3
3
  import "@stylexjs/stylex";
4
4
  import { useState as r } from "react";
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-Dven_9lR.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-D4zPPr32.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-BXh4g2VY.js";
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-qU5Z5LRH.js";