@mechane-ai/elements 0.18.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 (52) hide show
  1. package/README.md +11 -3
  2. package/dist/ai.js +211 -169
  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 +134 -132
  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 +105 -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/ai/src/index.d.ts +2 -0
  31. package/dist/packages/ai/src/message.d.ts +2 -1
  32. package/dist/packages/ai/src/reply-indicator.d.ts +6 -0
  33. package/dist/packages/content/src/markdown/markdown.d.ts +1 -1
  34. package/dist/packages/feedback/src/async-region.d.ts +3 -1
  35. package/dist/packages/forms/src/field-styles.d.ts +6 -0
  36. package/dist/packages/forms/src/forms.d.ts +2 -1
  37. package/dist/packages/foundations/src/constants.stylex.d.ts +1 -0
  38. package/dist/packages/foundations/src/visible-motion.d.ts +4 -0
  39. package/dist/packages/layout/src/app-shell.d.ts +2 -1
  40. package/dist/packages/layout/src/index.d.ts +2 -0
  41. package/dist/packages/layout/src/navigation-rail.d.ts +18 -0
  42. package/dist/packages/layout/src/sidebar.d.ts +2 -1
  43. package/dist/{pierre-diff-C_j0nxwS.js → pierre-diff-hAwARDse.js} +1 -1
  44. package/dist/{pierre-theme-BUeJim8s.js → pierre-theme-CLgk9v3e.js} +1 -1
  45. package/dist/{pierre-tree-BaIVTNmG.js → pierre-tree-D3XsgEH6.js} +4 -4
  46. package/dist/{src-BVsyKLQ8.js → src-0mocxTaR.js} +64 -43
  47. package/dist/{src-R0kgHFPZ.js → src-D4zPPr32.js} +20 -13
  48. package/dist/{src-BXh4g2VY.js → src-qU5Z5LRH.js} +1 -0
  49. package/dist/tokens.js +1 -1
  50. package/dist/visible-motion-1GcUaEi4.js +23 -0
  51. package/package.json +1 -1
  52. 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