@mechane-ai/elements 0.11.0 → 0.12.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 +8 -4
  2. package/dist/ai.js +4 -5
  3. package/dist/{categorical-values-FYc43JCa.js → categorical-values-CTrHn9jH.js} +2 -2
  4. package/dist/{chart-frame-Bczk5sWj.js → chart-frame-38ES6kwK.js} +4 -4
  5. package/dist/{chart-input-CbzVN76m.js → chart-input-C9fu7f1Q.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 +3 -3
  9. package/dist/charts/hierarchy.js +3 -3
  10. package/dist/charts/matrix.js +2 -2
  11. package/dist/charts/timeline.js +4 -4
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-B7xzM3tD.js → code-block-BjV2EFZS.js} +2 -2
  14. package/dist/collections.js +346 -294
  15. package/dist/content/code.js +1 -1
  16. package/dist/content/diff.js +3 -3
  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-CatGOrbo.js → content-link-C460m-O7.js} +1 -1
  21. package/dist/content.js +3 -4
  22. package/dist/elements.css +133 -80
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +22 -23
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +223 -237
  28. package/dist/navigation/commands.js +3 -3
  29. package/dist/overlays.js +1 -1
  30. package/dist/packages/collections/src/collection-controls.d.ts +1 -1
  31. package/dist/packages/collections/src/data-table.d.ts +5 -4
  32. package/dist/packages/collections/src/index.d.ts +1 -1
  33. package/dist/packages/core/src/actions.d.ts +5 -8
  34. package/dist/packages/feedback/src/control-placeholders.d.ts +16 -0
  35. package/dist/packages/feedback/src/index.d.ts +2 -0
  36. package/dist/packages/forms/src/field-styles.d.ts +2 -74
  37. package/dist/packages/forms/src/form-actions.d.ts +11 -0
  38. package/dist/packages/forms/src/form-controls.d.ts +1 -1
  39. package/dist/packages/forms/src/forms.d.ts +3 -3
  40. package/dist/packages/forms/src/index.d.ts +2 -0
  41. package/dist/packages/forms/src/select.d.ts +2 -2
  42. package/dist/packages/forms/src/selection-styles.d.ts +0 -13
  43. package/dist/packages/foundations/src/control-styles.d.ts +101 -0
  44. package/dist/packages/foundations/src/style-composition.d.ts +0 -2
  45. package/dist/packages/foundations/src/tokens.stylex.d.ts +8 -2
  46. package/dist/packages/layout/src/frame.stylex.d.ts +0 -1
  47. package/dist/packages/layout/src/index.d.ts +2 -0
  48. package/dist/packages/layout/src/page-content.d.ts +5 -0
  49. package/dist/packages/layout/src/page-toolbar.d.ts +1 -1
  50. package/dist/packages/layout/src/sidebar.d.ts +3 -3
  51. package/dist/{pierre-diff--zsiHCCB.js → pierre-diff-sUAU-xeL.js} +1 -1
  52. package/dist/{pierre-theme-D9hnHv3Z.js → pierre-theme-CBAncKdH.js} +1 -1
  53. package/dist/{pierre-tree-D47uA7lb.js → pierre-tree-DKN2eGlZ.js} +3 -3
  54. package/dist/{src-D05isEh_.js → src-3gzujMhN.js} +124 -66
  55. package/dist/{src-DXsGTJgv.js → src-CI6KtN2w.js} +366 -307
  56. package/dist/{src-Cs0dRc4X.js → src-CVlgjAlw.js} +1 -1
  57. package/dist/src-DOzle5d4.js +1199 -0
  58. package/dist/tokens.js +14 -8
  59. package/package.json +1 -1
  60. package/packages/foundations/src/tokens.stylex.ts +13 -5
  61. package/dist/src-C_heP5kL.js +0 -1264
package/README.md CHANGED
@@ -104,8 +104,10 @@ which view is active and when to unmount it; use this for a draft or reading pos
104
104
  `WorkbenchScroll` requires an accessible `label`; its `flush` mode leaves list insets to the table. Its
105
105
  `scrollRestorationId` identifies the actual scroll region for application-owned restoration.
106
106
 
107
- `DataTable` uses 48px rows by default and truncates text to preserve stable column and virtualization geometry. Set
108
- `rowSizing="content"` for records that need multiline cells; virtualization then measures those rows. Long content
107
+ Each `DataTable` column declares a role: `primary`, `text`, `status`, `number`, `timestamp`, or `actions`. Roles own
108
+ alignment and minimum sizing; the primary column uses available space. Headers and placeholders follow the same
109
+ geometry. The table uses 48px rows by default and truncates text to preserve stable column and virtualization geometry.
110
+ Set `rowSizing="content"` for records that need multiline cells; virtualization then measures those rows. Long content
109
111
  belongs in a detail view or a deliberately content-sized row, not behind a clipped control. Use `DataTableText` for a
110
112
  primary string and optional secondary string inside one cell; both text elements own their ellipsis. Arbitrary nested
111
113
  layouts do not inherit text truncation. Give dates and numeric values sufficient column width or explicit content
@@ -125,8 +127,10 @@ acknowledgement, and draft retention.
125
127
  record and store named choices rather than catalog indexes. Identity palettes remain separate from status colors.
126
128
 
127
129
  `MetricGrid layout="columns"` distributes supplied metrics by available container width. Its inline layout suits compact
128
- record summaries. `SettingsSection` keeps wide tables inside their scroll region; group sections with `Stack` and align
129
- form actions with `Row`.
130
+ record summaries. `PageContent` owns report insets and section gaps; keep full-width tables outside it so their cell
131
+ insets remain the only gutter. `SettingsSection` keeps wide tables inside their scroll region, and `SettingsRow` aligns
132
+ labels and controls. `FormActions` owns submission rows and their internal spacing. The enclosing section owns the gap
133
+ before and after the actions.
130
134
 
131
135
  The default theme is light, with system fonts and a compact spacing scale. Import `themeProps` from
132
136
  `@mechane-ai/elements/theme` and spread `themeProps.light` or `themeProps.dark` onto the document root. Portaled content
package/dist/ai.js CHANGED
@@ -1,7 +1,7 @@
1
- import { C as e, E as t, T as n, f as r, g as i, p as a, t as o, w as s } from "./src-D05isEh_.js";
2
- import { t as c } from "./content-link-CatGOrbo.js";
3
- import { r as l, t as u } from "./src-Cs0dRc4X.js";
4
- import { c as d, u as f } from "./src-C_heP5kL.js";
1
+ import { C as e, E as t, T as n, f as r, g as i, p as a, t as o, w as s } from "./src-3gzujMhN.js";
2
+ import { t as c } from "./content-link-C460m-O7.js";
3
+ import { r as l, t as u } from "./src-CVlgjAlw.js";
4
+ import { c as d, u as f } from "./src-DOzle5d4.js";
5
5
  import { t as p } from "./accessibility-C-aIZ1Yx.js";
6
6
  import * as m from "@stylexjs/stylex";
7
7
  import { createContext as h, useContext as g, useId as _, useRef as v } from "react";
@@ -99,7 +99,6 @@ function I({ label: e = "Jump to latest" }) {
99
99
  function L({ label: t, onActivate: n }) {
100
100
  let { scrollToEnd: r } = D(), i = g(A);
101
101
  return /* @__PURE__ */ b(e, {
102
- size: "sm",
103
102
  onClick: () => {
104
103
  n?.(), requestAnimationFrame(() => {
105
104
  let e = i?.current;
@@ -1,5 +1,5 @@
1
- import { n as e, s as t } from "./chart-frame-Bczk5sWj.js";
2
- import { n } from "./chart-input-CbzVN76m.js";
1
+ import { n as e, s as t } from "./chart-frame-38ES6kwK.js";
2
+ import { n } from "./chart-input-C9fu7f1Q.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-D05isEh_.js";
1
+ import { g as e } from "./src-3gzujMhN.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";
@@ -125,7 +125,7 @@ function f({ items: e, label: t = "Legend" }) {
125
125
  }
126
126
  function p({ label: e, selected: t = !1, onSelect: n, children: r }) {
127
127
  return n === void 0 ? /* @__PURE__ */ a("div", {
128
- className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli xaeotn9 xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b",
128
+ className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b",
129
129
  children: r
130
130
  }) : /* @__PURE__ */ a("button", {
131
131
  type: "button",
@@ -133,8 +133,8 @@ function p({ label: e, selected: t = !1, onSelect: n, children: r }) {
133
133
  "aria-pressed": t,
134
134
  onClick: n,
135
135
  ...{
136
- 0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli xaeotn9 xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal" },
137
- 1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli xaeotn9 xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xss6m8b x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1r7kqkb x1jmj9dw" }
136
+ 0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal" },
137
+ 1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r xwu7q15 x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xss6m8b x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1r7kqkb xh3r7i3" }
138
138
  }[!!t | 0],
139
139
  children: r
140
140
  });
@@ -1,5 +1,5 @@
1
- import { f as e } from "./src-DXsGTJgv.js";
2
- import { r as t } from "./chart-frame-Bczk5sWj.js";
1
+ import { m as e } from "./src-CI6KtN2w.js";
2
+ import { r as t } from "./chart-frame-38ES6kwK.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 { c as e } from "../src-DXsGTJgv.js";
2
- import { i as t, n, r, t as i } from "../categorical-values-FYc43JCa.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-Bczk5sWj.js";
4
- import { n as f, r as p, t as m } from "../chart-input-CbzVN76m.js";
1
+ import { u as e } from "../src-CI6KtN2w.js";
2
+ import { i as t, n, r, t as i } from "../categorical-values-CTrHn9jH.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-38ES6kwK.js";
4
+ import { n as f, r as p, t as m } from "../chart-input-C9fu7f1Q.js";
5
5
  import { t as h } from "../plot-width--OgdohB5.js";
6
- import { E as g } from "../src-D05isEh_.js";
7
- import { h as _ } from "../src-C_heP5kL.js";
6
+ import { E as g } from "../src-3gzujMhN.js";
7
+ import { g as _ } from "../src-DOzle5d4.js";
8
8
  import { colors as v } from "../tokens.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-Bczk5sWj.js";
2
- import { n as a, r as o, t as s } from "../chart-input-CbzVN76m.js";
1
+ import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-38ES6kwK.js";
2
+ import { n as a, r as o, t as s } from "../chart-input-C9fu7f1Q.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-Bczk5sWj.js";
2
- import { n as a, t as o } from "../chart-input-CbzVN76m.js";
1
+ import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-38ES6kwK.js";
2
+ import { n as a, t as o } from "../chart-input-C9fu7f1Q.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";
@@ -38,7 +38,7 @@ var f = {
38
38
  k9WMMc: "x1yc453h",
39
39
  kMv6JI: "x1hz01jw",
40
40
  k63SB2: "xj57cvi",
41
- kAzted: "xaeotn9 xwu7q15",
41
+ kAzted: "x17tes2r xwu7q15",
42
42
  $$css: !0
43
43
  },
44
44
  position: (e, t) => [{
@@ -1,6 +1,6 @@
1
- import { i as e, r as t, t as n } from "../categorical-values-FYc43JCa.js";
2
- import { o as r, r as i, s as a } from "../chart-frame-Bczk5sWj.js";
3
- import { t as o } from "../chart-input-CbzVN76m.js";
1
+ import { i as e, r as t, t as n } from "../categorical-values-CTrHn9jH.js";
2
+ import { o as r, r as i, s as a } from "../chart-frame-38ES6kwK.js";
3
+ import { t as o } from "../chart-input-C9fu7f1Q.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-CbzVN76m.js";
3
- import { a as i, n as a, r as o, s, t as c } from "../chart-frame-Bczk5sWj.js";
2
+ import { n as t, r as n, t as r } from "../chart-input-C9fu7f1Q.js";
3
+ import { a as i, n as a, r as o, s, t as c } from "../chart-frame-38ES6kwK.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-D05isEh_.js";
2
- import { n as t, t as n } from "../chart-input-CbzVN76m.js";
1
+ import { c as e } from "../src-3gzujMhN.js";
2
+ import { n as t, t as n } from "../chart-input-C9fu7f1Q.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";
@@ -54,7 +54,7 @@ function f({ items: t, start: s, end: f, label: g, rowLabel: _, summaryLabel: v,
54
54
  className: "xeuugli x1hz01jw x12h1iku",
55
55
  children: [
56
56
  /* @__PURE__ */ a("div", {
57
- className: "xrvj5dj x13sfnbj x1prkh4w x6s0dn4 x1gkm1c7 x1y1mm1b xh8yej3 x9f619 x1doqdfy x1uey4wk x153jb6y xy8obcc xso031l x1q0q8m5 x1qndepd",
57
+ className: "xrvj5dj x13sfnbj x1prkh4w x6s0dn4 x1gkm1c7 x1y1mm1b xh8yej3 x9f619 x1doqdfy x17tes2r x153jb6y xy8obcc xso031l x1q0q8m5 x1qndepd",
58
58
  children: [
59
59
  /* @__PURE__ */ i(e, {
60
60
  variant: "caption",
@@ -96,7 +96,7 @@ function f({ items: t, start: s, end: f, label: g, rowLabel: _, summaryLabel: v,
96
96
  onClick: () => S(t.id),
97
97
  ...{
98
98
  0: { className: "xrvj5dj x13sfnbj x1prkh4w x6s0dn4 x1gkm1c7 x1y1mm1b xh8yej3 x9f619 x1doqdfy xn9t2bk x1wiwyrm xc342km xso031l x1q0q8m5 x1qndepd xpvm0e4 xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6" },
99
- 1: { className: "xrvj5dj x13sfnbj x1prkh4w x6s0dn4 x1gkm1c7 x1y1mm1b xh8yej3 x9f619 x1doqdfy xn9t2bk x1wiwyrm xc342km xso031l x1q0q8m5 x1qndepd xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 x1r7kqkb x1jmj9dw" }
99
+ 1: { className: "xrvj5dj x13sfnbj x1prkh4w x6s0dn4 x1gkm1c7 x1y1mm1b xh8yej3 x9f619 x1doqdfy xn9t2bk x1wiwyrm xc342km xso031l x1q0q8m5 x1qndepd xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 x1r7kqkb xh3r7i3" }
100
100
  }[b === t.id | 0],
101
101
  children: [
102
102
  /* @__PURE__ */ a("span", {
package/dist/charts.js CHANGED
@@ -1 +1 @@
1
- export { r as ChartFrame, i as ChartLegend } from "./chart-frame-Bczk5sWj.js";
1
+ export { r as ChartFrame, i as ChartLegend } from "./chart-frame-38ES6kwK.js";
@@ -1,7 +1,7 @@
1
- import { _ as e } from "./src-D05isEh_.js";
1
+ import { _ as e } from "./src-3gzujMhN.js";
2
2
  import { colors as t } from "./tokens.js";
3
3
  import { t as n } from "./viewer-styles-CpHqp5Qv.js";
4
- import { t as r } from "./pierre-theme-D9hnHv3Z.js";
4
+ import { t as r } from "./pierre-theme-CBAncKdH.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";