@mechane-ai/elements 0.6.0 → 0.7.1

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 (40) hide show
  1. package/dist/ai.js +24 -23
  2. package/dist/assets/stylex.css +36 -4
  3. package/dist/{categorical-values-DrTcMsSi.js → categorical-values-75J0TUkR.js} +2 -2
  4. package/dist/{chart-frame-cfBPXmni.js → chart-frame--DOsZKwP.js} +1 -1
  5. package/dist/{chart-input-hK9U0Ql0.js → chart-input-C-g586YE.js} +2 -2
  6. package/dist/charts/cartesian.js +5 -5
  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 +1 -1
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-DSmz0jTf.js → code-block-D0Jmsj7w.js} +1 -1
  14. package/dist/collections.js +95 -83
  15. package/dist/content/code.js +1 -1
  16. package/dist/content/diff.js +2 -2
  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-DLiDJzwq.js → content-link-HLYu0cmz.js} +1 -1
  21. package/dist/content.js +2 -2
  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 +77 -35
  27. package/dist/navigation/commands.js +1 -1
  28. package/dist/packages/ai/src/prompt-input.d.ts +2 -1
  29. package/dist/packages/collections/src/data-table.d.ts +3 -2
  30. package/dist/packages/core/src/text.d.ts +4 -2
  31. package/dist/packages/forms/src/field-styles.d.ts +4 -0
  32. package/dist/packages/forms/src/forms.d.ts +2 -1
  33. package/dist/packages/layout/src/focus-page.d.ts +4 -0
  34. package/dist/packages/layout/src/index.d.ts +2 -0
  35. package/dist/packages/layout/src/workbench.d.ts +12 -0
  36. package/dist/{pierre-tree-C-eebLcZ.js → pierre-tree-DVybsnm4.js} +2 -2
  37. package/dist/{src-Daf4PUD6.js → src-B_DCatpY.js} +1 -1
  38. package/dist/{src-DuTmAQp5.js → src-BkCsvZGi.js} +5 -2
  39. package/dist/{src-DjvJJoaw.js → src-DjTM64tN.js} +18 -13
  40. package/package.json +1 -1
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-DuTmAQp5.js";
2
- import { t as a } from "./content-link-DLiDJzwq.js";
3
- import { c as o, u as s } from "./src-DjvJJoaw.js";
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";
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";
@@ -193,52 +193,53 @@ var I = { action: {
193
193
  keTefX: "xvc5jky",
194
194
  $$css: !0
195
195
  } };
196
- function L({ label: e, value: t, onValueChange: n, onSubmit: r, name: a = "prompt", placeholder: c, maxLength: l, required: u = !0, pending: d = !1, disabled: p = !1, submitDisabled: g = !1, submitLabel: v = "Send message", pendingLabel: y = "Sending…", enterBehavior: x = "newline", description: S, error: C, controls: w, attachments: T, onStop: E, stopPending: D = !1, stopLabel: O = "Stop response" }) {
197
- let k = f(), A = p || d;
198
- function j(e) {
196
+ function L({ label: e, value: t, onValueChange: n, onSubmit: r, name: a = "prompt", placeholder: c, maxLength: l, required: u = !0, pending: d = !1, disabled: p = !1, submitDisabled: g = !1, submitLabel: v = "Send message", pendingLabel: y = "Sending…", enterBehavior: x = "newline", compact: S = !1, description: C, error: w, controls: T, attachments: E, onStop: D, stopPending: O = !1, stopLabel: k = "Stop response" }) {
197
+ let A = f(), j = p || d;
198
+ function M(e) {
199
199
  if (x !== "submit" || e.key !== "Enter" || e.repeat) return;
200
200
  let t = e.altKey || e.ctrlKey || e.metaKey;
201
- e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), !A && !g && E === void 0 && e.currentTarget.form?.requestSubmit());
201
+ e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), !j && !g && D === void 0 && e.currentTarget.form?.requestSubmit());
202
202
  }
203
- function M(e) {
204
- e.preventDefault(), !A && !g && E === void 0 && r(e);
203
+ function N(e) {
204
+ e.preventDefault(), !j && !g && D === void 0 && r(e);
205
205
  }
206
206
  return /* @__PURE__ */ h("form", {
207
- onSubmit: M,
207
+ onSubmit: N,
208
208
  className: "x78zum5 xdt5ytf x1n8ia3y xeuugli",
209
209
  children: [
210
210
  /* @__PURE__ */ h(o.Root, {
211
- invalid: C !== void 0,
211
+ invalid: w !== void 0,
212
212
  children: [
213
213
  /* @__PURE__ */ m(o.Label, { children: e }),
214
214
  /* @__PURE__ */ m(s, {
215
+ compact: S,
215
216
  name: a,
216
217
  value: t,
217
218
  onChange: (e) => n(e.currentTarget.value),
218
- onKeyDown: j,
219
+ onKeyDown: M,
219
220
  placeholder: c,
220
221
  maxLength: l,
221
222
  required: u,
222
223
  disabled: p,
223
224
  readOnly: d,
224
- "aria-errormessage": C === void 0 ? void 0 : k
225
+ "aria-errormessage": w === void 0 ? void 0 : A
225
226
  }),
226
- S !== void 0 && /* @__PURE__ */ m(o.Description, { children: S }),
227
- C !== void 0 && /* @__PURE__ */ m(o.Error, {
228
- id: k,
227
+ C !== void 0 && /* @__PURE__ */ m(o.Description, { children: C }),
228
+ w !== void 0 && /* @__PURE__ */ m(o.Error, {
229
+ id: A,
229
230
  match: !0,
230
231
  role: "alert",
231
- children: C
232
+ children: w
232
233
  })
233
234
  ]
234
235
  }),
235
- T,
236
+ E,
236
237
  /* @__PURE__ */ h("div", {
237
238
  className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1n8ia3y",
238
239
  children: [/* @__PURE__ */ m("div", {
239
240
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
240
- children: w
241
- }), E === void 0 ? /* @__PURE__ */ h(i, {
241
+ children: T
242
+ }), D === void 0 ? /* @__PURE__ */ h(i, {
242
243
  xstyle: I.action,
243
244
  type: "submit",
244
245
  variant: "solid",
@@ -253,15 +254,15 @@ function L({ label: e, value: t, onValueChange: n, onSubmit: r, name: a = "promp
253
254
  xstyle: I.action,
254
255
  type: "button",
255
256
  onClick: (e) => {
256
- e.preventDefault(), E();
257
+ e.preventDefault(), D();
257
258
  },
258
259
  disabled: p,
259
- pending: D,
260
+ pending: O,
260
261
  pendingLabel: "Stopping…",
261
262
  children: [/* @__PURE__ */ m(b, {
262
263
  size: 14,
263
264
  "aria-hidden": !0
264
- }), O]
265
+ }), k]
265
266
  })]
266
267
  })
267
268
  ]
@@ -231,6 +231,10 @@
231
231
  overflow: auto;
232
232
  }
233
233
 
234
+ .x7giv3 {
235
+ overflow: clip;
236
+ }
237
+
234
238
  .xb3r6kr {
235
239
  overflow: hidden;
236
240
  }
@@ -1382,6 +1386,12 @@
1382
1386
  transform: translateY(0);
1383
1387
  }
1384
1388
 
1389
+ @media (width <= 1100px) {
1390
+ .x1g9v1si.x1g9v1si {
1391
+ display: none;
1392
+ }
1393
+ }
1394
+
1385
1395
  @media (width <= 650px) {
1386
1396
  .xj8mwme.xj8mwme {
1387
1397
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
@@ -1574,6 +1584,10 @@
1574
1584
  height: 8px;
1575
1585
  }
1576
1586
 
1587
+ .x1b7uu3i {
1588
+ height: calc(100dvh - var(--xrzfcxb));
1589
+ }
1590
+
1577
1591
  .x16ye13r {
1578
1592
  height: var(--x-height);
1579
1593
  }
@@ -1650,6 +1664,10 @@
1650
1664
  margin-top: var(--x1xijsos);
1651
1665
  }
1652
1666
 
1667
+ .x1y3glee {
1668
+ max-height: 30dvh;
1669
+ }
1670
+
1653
1671
  .x1sslpiy {
1654
1672
  max-height: 320px;
1655
1673
  }
@@ -1702,6 +1720,10 @@
1702
1720
  max-width: 280px;
1703
1721
  }
1704
1722
 
1723
+ .xxc7z9f {
1724
+ max-width: 360px;
1725
+ }
1726
+
1705
1727
  .x1ewvobj {
1706
1728
  max-width: 72ch;
1707
1729
  }
@@ -1754,6 +1776,10 @@
1754
1776
  min-height: 52px;
1755
1777
  }
1756
1778
 
1779
+ .xseoqlg {
1780
+ min-height: 80px;
1781
+ }
1782
+
1757
1783
  .x1avwmir {
1758
1784
  min-height: var(--x10l6e8v);
1759
1785
  }
@@ -1830,10 +1856,6 @@
1830
1856
  min-width: var(--x6uufy4);
1831
1857
  }
1832
1858
 
1833
- .x167izq3 {
1834
- min-width: var(--xrzfcxb);
1835
- }
1836
-
1837
1859
  .xelkyza {
1838
1860
  min-width: var(--xymjgzc);
1839
1861
  }
@@ -1950,6 +1972,10 @@
1950
1972
  width: 40px;
1951
1973
  }
1952
1974
 
1975
+ .x1peuizl {
1976
+ width: 440px;
1977
+ }
1978
+
1953
1979
  .x187nhsf {
1954
1980
  width: 44px;
1955
1981
  }
@@ -2053,6 +2079,12 @@
2053
2079
  .x1t1lzn6:last-child {
2054
2080
  border-bottom-width: 0;
2055
2081
  }
2082
+
2083
+ @media (width <= 1100px) {
2084
+ .x1tama1k.x1tama1k {
2085
+ width: 100%;
2086
+ }
2087
+ }
2056
2088
  }
2057
2089
 
2058
2090
  @layer priority6 {
@@ -1,5 +1,5 @@
1
- import { n as e, o as t } from "./chart-frame-cfBPXmni.js";
2
- import { n } from "./chart-input-hK9U0Ql0.js";
1
+ import { n as e, o as t } from "./chart-frame--DOsZKwP.js";
2
+ import { n } from "./chart-input-C-g586YE.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-DuTmAQp5.js";
1
+ import { h as e } from "./src-BkCsvZGi.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";
@@ -1,5 +1,5 @@
1
- import { d as e } from "./src-Daf4PUD6.js";
2
- import { r as t } from "./chart-frame-cfBPXmni.js";
1
+ import { d as e } from "./src-B_DCatpY.js";
2
+ import { r as t } from "./chart-frame--DOsZKwP.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-DrTcMsSi.js";
2
- import { a as i, i as a, n as o, o as s, r as c, t as l } from "../chart-frame-cfBPXmni.js";
3
- import { n as u, r as d, t as f } from "../chart-input-hK9U0Ql0.js";
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";
4
4
  import { t as p } from "../plot-width--OgdohB5.js";
5
- import { b as m } from "../src-DuTmAQp5.js";
6
- import { h } from "../src-DjvJJoaw.js";
5
+ import { b as m } from "../src-BkCsvZGi.js";
6
+ import { h } from "../src-DjTM64tN.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";
@@ -1,5 +1,5 @@
1
- import { n as e, o as t, r as n, t as r } from "../chart-frame-cfBPXmni.js";
2
- import { n as i, r as a, t as o } from "../chart-input-hK9U0Ql0.js";
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";
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-cfBPXmni.js";
2
- import { n as r, t as i } from "../chart-input-hK9U0Ql0.js";
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";
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-DrTcMsSi.js";
2
- import { a as r, o as i, r as a } from "../chart-frame-cfBPXmni.js";
3
- import { t as o } from "../chart-input-hK9U0Ql0.js";
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";
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-hK9U0Ql0.js";
3
- import { n as i, o as a, r as o, t as s } from "../chart-frame-cfBPXmni.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";
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-DuTmAQp5.js";
1
+ import { c as e } from "../src-BkCsvZGi.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-cfBPXmni.js";
1
+ export { r as ChartFrame, i as ChartLegend } from "./chart-frame--DOsZKwP.js";
@@ -1,4 +1,4 @@
1
- import { g as e } from "./src-DuTmAQp5.js";
1
+ import { g as e } from "./src-BkCsvZGi.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";