@mechane-ai/elements 0.7.0 → 0.8.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 (39) hide show
  1. package/README.md +17 -1
  2. package/dist/ai.js +3 -3
  3. package/dist/assets/stylex.css +66 -2
  4. package/dist/{categorical-values-75J0TUkR.js → categorical-values-dGbaZ0tp.js} +2 -2
  5. package/dist/{chart-frame--DOsZKwP.js → chart-frame-DgPdIguO.js} +2 -1
  6. package/dist/{chart-input-C-g586YE.js → chart-input-Sac4StHN.js} +2 -2
  7. package/dist/charts/cartesian.js +6 -5
  8. package/dist/charts/distribution.js +2 -2
  9. package/dist/charts/graph.js +2 -2
  10. package/dist/charts/hierarchy.js +3 -3
  11. package/dist/charts/matrix.js +2 -2
  12. package/dist/charts/timeline.js +1 -1
  13. package/dist/charts.js +1 -1
  14. package/dist/{code-block-D0Jmsj7w.js → code-block-BRNdtTaP.js} +1 -1
  15. package/dist/collections.js +186 -105
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +2 -2
  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-HLYu0cmz.js → content-link-Dd8gapwc.js} +1 -1
  22. package/dist/content.js +2 -2
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +1 -1
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +8 -7
  28. package/dist/navigation/commands.js +1 -1
  29. package/dist/packages/charts/src/chart-theme.d.ts +1 -0
  30. package/dist/packages/collections/src/data-table.d.ts +3 -1
  31. package/dist/packages/collections/src/index.d.ts +2 -0
  32. package/dist/packages/collections/src/metrics.d.ts +5 -2
  33. package/dist/packages/collections/src/timeline.d.ts +19 -0
  34. package/dist/packages/core/src/copy-value.d.ts +1 -1
  35. package/dist/{pierre-tree-DVybsnm4.js → pierre-tree-DdE1boiT.js} +2 -2
  36. package/dist/{src-BkCsvZGi.js → src-Bc5sEhdO.js} +35 -30
  37. package/dist/{src-B_DCatpY.js → src-DV0BNk1M.js} +1 -1
  38. package/dist/{src-DjTM64tN.js → src-Eg_ytPjv.js} +3 -3
  39. package/package.json +1 -1
package/README.md CHANGED
@@ -58,7 +58,7 @@ Every path below belongs to `@mechane-ai/elements`. There is one package, versio
58
58
  | `/navigation` | Tabs, page navigation, breadcrumbs, skip links, and shortcut labels. |
59
59
  | `/navigation/commands` | Command palette and scoped application-owned shortcuts. |
60
60
  | `/layout` | Application shell, sidebar, toolbars, compound record pages, and resizable panes. |
61
- | `/collections` | Tables, inspectors, collection controls, metrics, and timestamps. |
61
+ | `/collections` | Tables, inspectors, collection controls, timelines, metrics, and timestamps. |
62
62
  | `/content` | Trace, JSON, recorded logs, and stack traces. |
63
63
  | `/content/link` | Safe content links without a renderer dependency. |
64
64
  | `/content/markdown` | Completed and streaming Markdown, embedded headings, and inert previews. |
@@ -90,6 +90,22 @@ Use Base UI's `render` composition and named variants for appearance. Native att
90
90
  available. Typed `xstyle` inputs permit placement styles compiled by the application's StyleX setup. Applications own
91
91
  asynchronous work and pass its pending, success, or failure state to controls.
92
92
 
93
+ Use `ToolbarAction` for page-header actions, including links composed with `render`. A clipboard action can compose
94
+ `CopyValue render={<ToolbarAction />}`; the rendered control owns its appearance and CopyValue owns copy feedback. Use
95
+ `Row` for aligned inline actions, `Stack` for related content, and `RecordPage.Content` for separated page sections.
96
+ Detail titles wrap; list metadata truncates. Sidebar items share contiguous hit areas. Put scrolling commands with the
97
+ navigation and reserve the divided sidebar footer for persistent account information.
98
+
99
+ `DataTable` uses 48px rows by default and truncates text to preserve stable column and virtualization geometry. Set
100
+ `rowSizing="content"` for records that need multiline cells; virtualization then measures those rows. Long content
101
+ belongs in a detail view or a deliberately content-sized row, not behind a clipped control. `CollectionEnd` renders
102
+ nothing when complete unless an explicit summary is supplied. `Timeline.Root` and `Timeline.Item` compose readable
103
+ activity with supplied titles, icons, timestamps, metadata, and body content, without interpreting domain events.
104
+
105
+ `MetricGrid layout="columns"` distributes supplied metrics by available container width. Its inline layout suits compact
106
+ record summaries. `SettingsSection` keeps wide tables inside their scroll region; group sections with `Stack` and align
107
+ form actions with `Row`.
108
+
93
109
  The default theme is light, with system fonts and a compact spacing scale. Import `themeProps` from
94
110
  `@mechane-ai/elements/theme` and spread `themeProps.light` or `themeProps.dark` onto the document root. Portaled content
95
111
  then inherits the same theme. The application owns the preference; no theme provider is required.
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { b as e, f as t, p as n, t as r, v as i } from "./src-BkCsvZGi.js";
2
- import { t as a } from "./content-link-HLYu0cmz.js";
3
- import { c as o, u as s } from "./src-DjTM64tN.js";
1
+ import { b as e, f as t, p as n, t as r, v as i } from "./src-Bc5sEhdO.js";
2
+ import { t as a } from "./content-link-Dd8gapwc.js";
3
+ import { c as o, u as s } from "./src-Eg_ytPjv.js";
4
4
  import { r as c } from "./src-CfDf8TY8.js";
5
5
  import * as l from "@stylexjs/stylex";
6
6
  import { createContext as u, useContext as d, useId as f, useRef as p } from "react";
@@ -48,6 +48,10 @@
48
48
  .x69ldcm {
49
49
  padding: var(--xxhyxt);
50
50
  }
51
+
52
+ .x1az1eml:empty {
53
+ padding: 0;
54
+ }
51
55
  }
52
56
 
53
57
  @layer priority3 {
@@ -231,6 +235,10 @@
231
235
  overflow: auto;
232
236
  }
233
237
 
238
+ .x7giv3 {
239
+ overflow: clip;
240
+ }
241
+
234
242
  .xb3r6kr {
235
243
  overflow: hidden;
236
244
  }
@@ -584,6 +592,10 @@
584
592
  column-gap: var(--x1iwxfi2);
585
593
  }
586
594
 
595
+ .x1y1mm1b {
596
+ column-gap: var(--x1qq5i99);
597
+ }
598
+
587
599
  .x14ut1dr {
588
600
  container-name: toolbar;
589
601
  }
@@ -792,6 +804,10 @@
792
804
  grid-template-columns: minmax(90px, 1fr) minmax(0, 1.6fr);
793
805
  }
794
806
 
807
+ .xpuu00s {
808
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
809
+ }
810
+
795
811
  .xhuszhj {
796
812
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
797
813
  }
@@ -904,6 +920,10 @@
904
920
  outline-offset: 3px;
905
921
  }
906
922
 
923
+ .x1t137rt {
924
+ outline-style: none;
925
+ }
926
+
907
927
  .xaatb59 {
908
928
  outline-style: solid;
909
929
  }
@@ -1568,6 +1588,14 @@
1568
1588
  height: 44px;
1569
1589
  }
1570
1590
 
1591
+ .x1dqyrwa {
1592
+ height: 47px;
1593
+ }
1594
+
1595
+ .xsdox4t {
1596
+ height: 48px;
1597
+ }
1598
+
1571
1599
  .xqu0tyb {
1572
1600
  height: 4px;
1573
1601
  }
@@ -1580,6 +1608,10 @@
1580
1608
  height: 8px;
1581
1609
  }
1582
1610
 
1611
+ .xt7dq6l {
1612
+ height: auto;
1613
+ }
1614
+
1583
1615
  .x1b7uu3i {
1584
1616
  height: calc(100dvh - var(--xrzfcxb));
1585
1617
  }
@@ -1672,6 +1704,10 @@
1672
1704
  max-height: 400px;
1673
1705
  }
1674
1706
 
1707
+ .xjexgjb {
1708
+ max-height: 47px;
1709
+ }
1710
+
1675
1711
  .x14eurpq {
1676
1712
  max-height: 480px;
1677
1713
  }
@@ -1872,6 +1908,10 @@
1872
1908
  padding-bottom: var(--x1drqizm);
1873
1909
  }
1874
1910
 
1911
+ .xhlx3wy {
1912
+ padding-bottom: var(--x1iwxfi2);
1913
+ }
1914
+
1875
1915
  .x1uwsqpk {
1876
1916
  padding-bottom: var(--x1p8em4u);
1877
1917
  }
@@ -2076,6 +2116,14 @@
2076
2116
  border-bottom-width: 0;
2077
2117
  }
2078
2118
 
2119
+ .xup0pd7:last-child {
2120
+ padding-bottom: 0;
2121
+ }
2122
+
2123
+ .x15x95ik:empty {
2124
+ min-height: 0;
2125
+ }
2126
+
2079
2127
  @media (width <= 1100px) {
2080
2128
  .x1tama1k.x1tama1k {
2081
2129
  width: 100%;
@@ -2368,7 +2416,7 @@
2368
2416
  background-color: var(--x7wqmh8);
2369
2417
  }
2370
2418
 
2371
- .xtccgxd:after {
2419
+ .x1mi36wk:before, .xtccgxd:after {
2372
2420
  background-color: var(--xe11pje);
2373
2421
  }
2374
2422
 
@@ -2416,6 +2464,10 @@
2416
2464
  inset-inline-start: 0;
2417
2465
  }
2418
2466
 
2467
+ .x1lk18uv:before {
2468
+ inset-inline-start: 7px;
2469
+ }
2470
+
2419
2471
  .x1k5xxp6::file-selector-button {
2420
2472
  margin-inline-end: var(--xxhyxt);
2421
2473
  }
@@ -2444,6 +2496,10 @@
2444
2496
  transform: none;
2445
2497
  }
2446
2498
 
2499
+ .x1wse844:last-child:before {
2500
+ display: none;
2501
+ }
2502
+
2447
2503
  .xysgshy:disabled::file-selector-button {
2448
2504
  color: var(--x24btp3);
2449
2505
  }
@@ -2458,6 +2514,10 @@
2458
2514
  border-bottom-width: 2px;
2459
2515
  }
2460
2516
 
2517
+ .x1jw5pjq:before {
2518
+ bottom: 4px;
2519
+ }
2520
+
2461
2521
  .x1a5uphr:after, .xj3gwzc:before {
2462
2522
  height: 16px;
2463
2523
  }
@@ -2490,6 +2550,10 @@
2490
2550
  top: 10px;
2491
2551
  }
2492
2552
 
2553
+ .x1gi6gvw:before {
2554
+ top: 24px;
2555
+ }
2556
+
2493
2557
  .xoqv437:after {
2494
2558
  top: 50%;
2495
2559
  }
@@ -2498,7 +2562,7 @@
2498
2562
  width: 16px;
2499
2563
  }
2500
2564
 
2501
- .xv6d0c5:after {
2565
+ .x1vgi0k:before, .xv6d0c5:after {
2502
2566
  width: 1px;
2503
2567
  }
2504
2568
 
@@ -1,5 +1,5 @@
1
- import { n as e, o as t } from "./chart-frame--DOsZKwP.js";
2
- import { n } from "./chart-input-C-g586YE.js";
1
+ import { n as e, o as t } from "./chart-frame-DgPdIguO.js";
2
+ import { n } from "./chart-input-Sac4StHN.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 { h as e } from "./src-BkCsvZGi.js";
1
+ import { h as e } from "./src-Bc5sEhdO.js";
2
2
  import { chartColors as t, colors as n } from "./tokens.js";
3
3
  import * as r from "@stylexjs/stylex";
4
4
  import { useId as i } from "react";
@@ -58,6 +58,7 @@ var s = {
58
58
  $$css: !0
59
59
  },
60
60
  focus: {
61
+ k3XXqK: "x1t137rt",
61
62
  kZs9gx: "x19rmrnh",
62
63
  k7shQP: "x9v5kkp",
63
64
  kPJHz1: "x13qnu6",
@@ -1,5 +1,5 @@
1
- import { d as e } from "./src-B_DCatpY.js";
2
- import { r as t } from "./chart-frame--DOsZKwP.js";
1
+ import { d as e } from "./src-DV0BNk1M.js";
2
+ import { r as t } from "./chart-frame-DgPdIguO.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,9 +1,9 @@
1
- import { i as e, n as t, r as n, t as r } from "../categorical-values-75J0TUkR.js";
2
- import { a as i, i as a, n as o, o as s, r as c, t as l } from "../chart-frame--DOsZKwP.js";
3
- import { n as u, r as d, t as f } from "../chart-input-C-g586YE.js";
1
+ import { i as e, n as t, r as n, t as r } from "../categorical-values-dGbaZ0tp.js";
2
+ import { a as i, i as a, n as o, o as s, r as c, t as l } from "../chart-frame-DgPdIguO.js";
3
+ import { n as u, r as d, t as f } from "../chart-input-Sac4StHN.js";
4
4
  import { t as p } from "../plot-width--OgdohB5.js";
5
- import { b as m } from "../src-BkCsvZGi.js";
6
- import { h } from "../src-DjTM64tN.js";
5
+ import { b as m } from "../src-Bc5sEhdO.js";
6
+ import { h } from "../src-Eg_ytPjv.js";
7
7
  import { colors as g } from "../tokens.js";
8
8
  import * as _ from "@stylexjs/stylex";
9
9
  import { useEffect as v, useId as y, useMemo as b, useRef as x, useState as S } from "react";
@@ -777,6 +777,7 @@ function Z({ title: e, summary: t, unit: n, series: r, valueDomain: i }) {
777
777
  // packages/charts/src/cartesian/time-series.tsx
778
778
  var le = { plot: {
779
779
  k7Eaqz: "xeuugli",
780
+ k3XXqK: "x1t137rt",
780
781
  kInvED: "x1hl8ikr",
781
782
  kZs9gx: "x19rmrnh",
782
783
  k7shQP: "x9v5kkp",
@@ -1,5 +1,5 @@
1
- import { n as e, o as t, r as n, t as r } from "../chart-frame--DOsZKwP.js";
2
- import { n as i, r as a, t as o } from "../chart-input-C-g586YE.js";
1
+ import { n as e, o as t, r as n, t as r } from "../chart-frame-DgPdIguO.js";
2
+ import { n as i, r as a, t as o } from "../chart-input-Sac4StHN.js";
3
3
  import { t as s } from "../plot-width--OgdohB5.js";
4
4
  import * as c from "@stylexjs/stylex";
5
5
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { o as e, r as t, t as n } from "../chart-frame--DOsZKwP.js";
2
- import { n as r, t as i } from "../chart-input-C-g586YE.js";
1
+ import { o as e, r as t, t as n } from "../chart-frame-DgPdIguO.js";
2
+ import { n as r, t as i } from "../chart-input-Sac4StHN.js";
3
3
  import * as a from "@stylexjs/stylex";
4
4
  import { useId as o } from "react";
5
5
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import { i as e, r as t, t as n } from "../categorical-values-75J0TUkR.js";
2
- import { a as r, o as i, r as a } from "../chart-frame--DOsZKwP.js";
3
- import { t as o } from "../chart-input-C-g586YE.js";
1
+ import { i as e, r as t, t as n } from "../categorical-values-dGbaZ0tp.js";
2
+ import { a as r, o as i, r as a } from "../chart-frame-DgPdIguO.js";
3
+ import { t as o } from "../chart-input-Sac4StHN.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 { colors as e } from "../tokens.js";
2
- import { n as t, r as n, t as r } from "../chart-input-C-g586YE.js";
3
- import { n as i, o as a, r as o, t as s } from "../chart-frame--DOsZKwP.js";
2
+ import { n as t, r as n, t as r } from "../chart-input-Sac4StHN.js";
3
+ import { n as i, o as a, r as o, t as s } from "../chart-frame-DgPdIguO.js";
4
4
  import * as c from "@stylexjs/stylex";
5
5
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
6
  // packages/charts/src/matrix/heatmap-scale.ts
@@ -1,4 +1,4 @@
1
- import { c as e } from "../src-BkCsvZGi.js";
1
+ import { c as e } from "../src-Bc5sEhdO.js";
2
2
  import * as t from "@stylexjs/stylex";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  import { scaleLinear as i } from "@visx/scale";
package/dist/charts.js CHANGED
@@ -1 +1 @@
1
- export { r as ChartFrame, i as ChartLegend } from "./chart-frame--DOsZKwP.js";
1
+ export { r as ChartFrame, i as ChartLegend } from "./chart-frame-DgPdIguO.js";
@@ -1,4 +1,4 @@
1
- import { g as e } from "./src-BkCsvZGi.js";
1
+ import { g as e } from "./src-Bc5sEhdO.js";
2
2
  import { colors as t } from "./tokens.js";
3
3
  import { t as n } from "./pierre-theme-BpESNIsV.js";
4
4
  import * as r from "@stylexjs/stylex";