@mechane-ai/elements 0.30.0 → 0.32.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 (54) hide show
  1. package/dist/ai.js +43 -43
  2. package/dist/{categorical-values-Dfe3nkBV.js → categorical-values-BXPE0Cjs.js} +2 -2
  3. package/dist/{chart-frame-rL7_RAIc.js → chart-frame-Degqwy_z.js} +94 -64
  4. package/dist/{chart-input-JIyGPusK.js → chart-input-B12En69_.js} +2 -2
  5. package/dist/charts/cartesian.js +8 -8
  6. package/dist/charts/distribution.js +2 -2
  7. package/dist/charts/graph.js +2 -2
  8. package/dist/charts/hierarchy.js +3 -3
  9. package/dist/charts/matrix.js +3 -3
  10. package/dist/charts/timeline.js +3 -3
  11. package/dist/charts.js +1 -1
  12. package/dist/{code-block-BX51BVe1.js → code-block-B_qJ1JJ3.js} +3 -3
  13. package/dist/collections.js +224 -211
  14. package/dist/content/code.js +1 -1
  15. package/dist/content/diff.js +3 -3
  16. package/dist/content/link.js +1 -1
  17. package/dist/content/markdown.js +2 -2
  18. package/dist/content/tree.js +2 -2
  19. package/dist/{content-link-5oRGjDHa.js → content-link-BtaiSKk8.js} +1 -1
  20. package/dist/content.js +1 -1
  21. package/dist/elements.css +89 -23
  22. package/dist/feedback.js +1 -1
  23. package/dist/forms/dates.js +1 -1
  24. package/dist/forms.js +1 -1
  25. package/dist/index.js +1 -1
  26. package/dist/layout.js +391 -317
  27. package/dist/navigation/commands.js +1 -1
  28. package/dist/packages/charts/src/chart-frame.d.ts +6 -4
  29. package/dist/packages/charts/src/chart-heading.d.ts +9 -0
  30. package/dist/packages/core/src/actions.d.ts +6 -2
  31. package/dist/packages/core/src/index.d.ts +1 -0
  32. package/dist/packages/feedback/src/control-placeholders.d.ts +11 -4
  33. package/dist/packages/forms/src/combobox.d.ts +5 -2
  34. package/dist/packages/forms/src/form-controls.d.ts +9 -4
  35. package/dist/packages/forms/src/forms.d.ts +3 -1
  36. package/dist/packages/forms/src/select.d.ts +3 -1
  37. package/dist/packages/foundations/src/control-density.d.ts +1 -0
  38. package/dist/packages/foundations/src/control-styles.d.ts +36 -1
  39. package/dist/packages/foundations/src/header-styles.d.ts +85 -0
  40. package/dist/packages/foundations/src/tokens.d.ts +1 -1
  41. package/dist/packages/foundations/src/tokens.stylex.d.ts +7 -0
  42. package/dist/packages/layout/src/frame.stylex.d.ts +0 -2
  43. package/dist/{pierre-diff-DOkqEUqx.js → pierre-diff-CaPsfQRo.js} +1 -1
  44. package/dist/{pierre-theme-DsrSwl5m.js → pierre-theme-BpNaWn1x.js} +30 -30
  45. package/dist/{pierre-tree-D2kRr4h4.js → pierre-tree-CPhT5CUP.js} +4 -4
  46. package/dist/src-BPIIuMeE.js +1291 -0
  47. package/dist/{src-eWcNz_oB.js → src-BjmKVOb2.js} +309 -309
  48. package/dist/{src-E3Or8tkO.js → src-CALHXF-U.js} +574 -415
  49. package/dist/{src-DlNMCgVy.js → src-DfPfFOu1.js} +17 -17
  50. package/dist/tokens.js +1 -1
  51. package/dist/{tokens.stylex-BoRZ3D8s.js → tokens.stylex-CJbIDPB9.js} +10 -3
  52. package/package.json +1 -1
  53. package/packages/foundations/src/tokens.stylex.ts +6 -0
  54. package/dist/src-BfPaaDxg.js +0 -1193
@@ -1,8 +1,8 @@
1
- import { D as e, _ as t, v as n, w as r } from "./src-E3Or8tkO.js";
1
+ import { O as e, T as t, v as n, y as r } from "./src-CALHXF-U.js";
2
2
  import { t as i } from "./use-scroll-tab-index-Dxpdh4W7.js";
3
3
  import { t as a } from "./viewer-styles-DsFYri4K.js";
4
- import { t as o } from "./code-block-BX51BVe1.js";
5
- import { t as s } from "./content-link-5oRGjDHa.js";
4
+ import { t as o } from "./code-block-B_qJ1JJ3.js";
5
+ import { t as s } from "./content-link-BtaiSKk8.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";
@@ -89,7 +89,7 @@ function T({ value: e, name: t, path: n, depth: r, maxDepth: i, maxEntries: a })
89
89
  })]
90
90
  });
91
91
  }
92
- function E({ value: e, label: t, maxDepth: r = 6, maxEntries: o = 50 }) {
92
+ function E({ value: e, label: t, maxDepth: n = 6, maxEntries: o = 50 }) {
93
93
  let s = i(), u = l(() => JSON.stringify(e, null, 2), [e]);
94
94
  return /* @__PURE__ */ h("section", {
95
95
  "aria-label": t,
@@ -99,7 +99,7 @@ function E({ value: e, label: t, maxDepth: r = 6, maxEntries: o = 50 }) {
99
99
  children: [/* @__PURE__ */ m("span", {
100
100
  ...c.props(a.label),
101
101
  children: t
102
- }), /* @__PURE__ */ m(n, {
102
+ }), /* @__PURE__ */ m(r, {
103
103
  label: t,
104
104
  value: u,
105
105
  children: "Copy JSON"
@@ -115,7 +115,7 @@ function E({ value: e, label: t, maxDepth: r = 6, maxEntries: o = 50 }) {
115
115
  path: "",
116
116
  value: e,
117
117
  depth: 0,
118
- maxDepth: Math.max(1, r),
118
+ maxDepth: Math.max(1, n),
119
119
  maxEntries: Math.max(1, o)
120
120
  })
121
121
  })]
@@ -149,24 +149,24 @@ var D = {
149
149
  $$css: !0
150
150
  }
151
151
  }, k = 2e5;
152
- function A({ output: e, label: t, variant: o = "default", maxLines: s = 500, maxHeight: l = 320, isRunning: g = !1 }) {
152
+ function A({ output: e, label: n, variant: o = "default", maxLines: s = 500, maxHeight: l = 320, isRunning: g = !1 }) {
153
153
  let _ = i(), v = _.viewport, y = f(!1), [b, x] = p(!0), C = S(e), w = C.slice(-2e5).split("\n"), T = w.slice(-Math.max(1, s)), E = w.length - T.length, D = o === "embedded", A = g && (!D || !b);
154
154
  return u(() => {
155
155
  b && v.current !== null && (v.current.scrollTop = v.current.scrollHeight);
156
156
  }, [e, b]), d(() => {
157
157
  !g && y.current && (y.current = !1, v.current?.focus({ preventScroll: !0 }));
158
158
  }, [g]), /* @__PURE__ */ h("section", {
159
- "aria-label": t,
159
+ "aria-label": n,
160
160
  ...c.props(a.root, D && a.embedded),
161
161
  children: [
162
162
  /* @__PURE__ */ h("div", {
163
163
  ...c.props(a.header, D && a.embeddedHeader),
164
164
  children: [/* @__PURE__ */ h("span", {
165
165
  ...c.props(a.label),
166
- children: [t, g && !D && " · running"]
166
+ children: [n, g && !D && " · running"]
167
167
  }), /* @__PURE__ */ h("div", {
168
168
  ...c.props(a.actions),
169
- children: [A && /* @__PURE__ */ m(r, {
169
+ children: [A && /* @__PURE__ */ m(t, {
170
170
  variant: "ghost",
171
171
  onClick: () => x(!b),
172
172
  onFocus: () => {
@@ -176,9 +176,9 @@ function A({ output: e, label: t, variant: o = "default", maxLines: s = 500, max
176
176
  y.current = !1;
177
177
  },
178
178
  children: b ? "Pause following" : "Follow output"
179
- }), /* @__PURE__ */ m(n, {
179
+ }), /* @__PURE__ */ m(r, {
180
180
  value: e,
181
- label: t,
181
+ label: n,
182
182
  display: D ? "icon" : "value",
183
183
  children: "Copy"
184
184
  })]
@@ -195,7 +195,7 @@ function A({ output: e, label: t, variant: o = "default", maxLines: s = 500, max
195
195
  /* @__PURE__ */ m("pre", {
196
196
  ref: _.ref,
197
197
  role: "region",
198
- "aria-label": `${t} output`,
198
+ "aria-label": `${n} output`,
199
199
  tabIndex: _.tabIndex,
200
200
  onScroll: (e) => {
201
201
  let t = e.currentTarget;
@@ -347,10 +347,10 @@ function z({ label: e, children: t }) {
347
347
  children: t
348
348
  });
349
349
  }
350
- function B({ id: n, label: r, status: i, statusLabel: a, description: o, detail: s, isSelected: l, onSelect: u, children: d }) {
350
+ function B({ id: t, label: r, status: i, statusLabel: a, description: o, detail: s, isSelected: l, onSelect: u, children: d }) {
351
351
  let f = L[i];
352
352
  return /* @__PURE__ */ h("li", {
353
- "data-item-id": n,
353
+ "data-item-id": t,
354
354
  className: "x1n2onr6 xrvj5dj x1qpdrs7 x8zbtdt x1wv5www xup0pd7",
355
355
  children: [/* @__PURE__ */ h("div", {
356
356
  "aria-hidden": !0,
@@ -369,7 +369,7 @@ function B({ id: n, label: r, status: i, statusLabel: a, description: o, detail:
369
369
  }[l === !0 | 0],
370
370
  children: u === void 0 ? r : /* @__PURE__ */ m(e, {
371
371
  "aria-pressed": l,
372
- onClick: () => u(n),
372
+ onClick: () => u(t),
373
373
  children: r
374
374
  })
375
375
  }),
@@ -381,7 +381,7 @@ function B({ id: n, label: r, status: i, statusLabel: a, description: o, detail:
381
381
  className: "x1ghz6dp x153jb6y xj0a0fe",
382
382
  children: o
383
383
  }),
384
- s !== void 0 && /* @__PURE__ */ h(t.Root, { children: [/* @__PURE__ */ m(t.Trigger, { children: "Details" }), /* @__PURE__ */ m(t.Panel, { children: s })] }),
384
+ s !== void 0 && /* @__PURE__ */ h(n.Root, { children: [/* @__PURE__ */ m(n.Trigger, { children: "Details" }), /* @__PURE__ */ m(n.Panel, { children: s })] }),
385
385
  d
386
386
  ]
387
387
  })]
package/dist/tokens.js CHANGED
@@ -1 +1 @@
1
- export { t as avatarColors, n as chartColors, r as colors, f as conditions, i as controls, p as darkAvatarColors, m as darkChartColors, h as darkColors, g as darkShadows, _ as darkSyntaxColors, v as layers, y as loading, a as motion, o as pageGeometry, s as radii, c as shadows, l as spacing, u as syntaxColors, b as tableGeometry, d as typography } from "./tokens.stylex-BoRZ3D8s.js";
1
+ export { t as avatarColors, n as chartColors, r as colors, p as conditions, i as controls, m as darkAvatarColors, h as darkChartColors, g as darkColors, _ as darkShadows, v as darkSyntaxColors, y as layers, b as loading, a as motion, o as pageGeometry, s as radii, c as reportGeometry, l as shadows, u as spacing, d as syntaxColors, x as tableGeometry, f as typography } from "./tokens.stylex-CJbIDPB9.js";
@@ -177,11 +177,15 @@ var e = {
177
177
  __varGroupHash__: "xledmcz"
178
178
  }, h = {
179
179
  height: "var(--x14tmdi9)",
180
+ compactHeight: "var(--xcmidyz)",
180
181
  coarseTarget: "var(--x6uufy4)",
181
182
  iconSize: "var(--x1ud0cvw)",
182
183
  paddingInline: "var(--xrzkwmd)",
184
+ compactPaddingInline: "var(--x1u2pzhu)",
183
185
  paddingBlock: "var(--xjz2qh5)",
186
+ compactPaddingBlock: "var(--xiys6xd)",
184
187
  gap: "var(--x1z0o8cd)",
188
+ compactGap: "var(--x1kf6g89)",
185
189
  focusWidth: "var(--xxx3t85)",
186
190
  disabledOpacity: "var(--x9ngs59)",
187
191
  __varGroupHash__: "x1sjug0q"
@@ -191,18 +195,21 @@ var e = {
191
195
  sectionGap: "var(--xe6nmbs)",
192
196
  __varGroupHash__: "x1vss23x"
193
197
  }, _ = {
198
+ headerHeight: "var(--xfz06zf)",
199
+ __varGroupHash__: "xiqc376"
200
+ }, v = {
194
201
  sm: "var(--x1asdyoo)",
195
202
  md: "var(--xz1oyae)",
196
203
  __varGroupHash__: "x1i152zt"
197
- }, v = {
204
+ }, y = {
198
205
  duration: "var(--xjjzqp4)",
199
206
  easing: "var(--x5xz5r2)",
200
207
  drawerDuration: "var(--xrmqybo)",
201
208
  drawerEasing: "var(--xumjr7l)",
202
209
  __varGroupHash__: "xtoz1ri"
203
- }, y = {
210
+ }, b = {
204
211
  popup: "var(--xfou7vv)",
205
212
  selection: "var(--x1qr3jy8)",
206
213
  __varGroupHash__: "x1e8hs47"
207
214
  };
208
- export { r as _, v as a, s as b, y as c, m as d, c as f, a as g, e as h, h as i, p as l, t as m, u as n, g as o, n as p, l as r, _ as s, d as t, f as u, o as v, i as y };
215
+ export { a as _, y as a, i as b, _ as c, f as d, m as f, e as g, t as h, h as i, b as l, n as m, u as n, g as o, c as p, l as r, v as s, d as t, p as u, r as v, s as x, o as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mechane-ai/elements",
3
- "version": "0.30.0",
3
+ "version": "0.32.0",
4
4
  "description": "Elements by Mechane — React components for applications, AI interfaces, and analytical graphics",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -103,17 +103,23 @@ export const typography = stylex.defineVars({
103
103
 
104
104
  export const controls = stylex.defineVars({
105
105
  height: '32px',
106
+ compactHeight: '28px',
106
107
  coarseTarget: '44px',
107
108
  iconSize: '16px',
108
109
  paddingInline: '10px',
110
+ compactPaddingInline: '8px',
109
111
  paddingBlock: '5px',
112
+ compactPaddingBlock: '3px',
110
113
  gap: '6px',
114
+ compactGap: '4px',
111
115
  focusWidth: '2px',
112
116
  disabledOpacity: '0.45',
113
117
  });
114
118
 
115
119
  export const pageGeometry = stylex.defineVars({ inset: '16px', toolbarHeight: '48px', sectionGap: '32px' });
116
120
 
121
+ export const reportGeometry = stylex.defineVars({ headerHeight: '36px' });
122
+
117
123
  export const radii = stylex.defineVars({ sm: '4px', md: '6px' });
118
124
 
119
125
  export const motion = stylex.defineVars({