@mechane-ai/elements 0.11.0 → 0.13.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 (69) hide show
  1. package/README.md +23 -4
  2. package/dist/ai.js +167 -141
  3. package/dist/{categorical-values-FYc43JCa.js → categorical-values-DwobbjBq.js} +2 -2
  4. package/dist/{chart-frame-Bczk5sWj.js → chart-frame-DAxsgMyl.js} +4 -4
  5. package/dist/{chart-input-CbzVN76m.js → chart-input-B0snxbMH.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-VwrOHz5j.js} +2 -2
  14. package/dist/collections.js +402 -267
  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-Oj-MtNYi.js} +1 -1
  21. package/dist/content.js +3 -4
  22. package/dist/elements.css +141 -96
  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/navigation.js +26 -12
  30. package/dist/overlays.js +1 -1
  31. package/dist/packages/ai/src/index.d.ts +2 -2
  32. package/dist/packages/ai/src/prompt-input.d.ts +4 -0
  33. package/dist/packages/collections/src/collection-controls.d.ts +1 -1
  34. package/dist/packages/collections/src/data-table.d.ts +24 -6
  35. package/dist/packages/collections/src/index.d.ts +2 -2
  36. package/dist/packages/core/src/actions.d.ts +5 -8
  37. package/dist/packages/feedback/src/async-region.d.ts +15 -9
  38. package/dist/packages/feedback/src/control-placeholders.d.ts +21 -0
  39. package/dist/packages/feedback/src/index.d.ts +4 -3
  40. package/dist/packages/forms/src/field-styles.d.ts +2 -74
  41. package/dist/packages/forms/src/form-actions.d.ts +11 -0
  42. package/dist/packages/forms/src/form-controls.d.ts +1 -1
  43. package/dist/packages/forms/src/forms.d.ts +3 -3
  44. package/dist/packages/forms/src/index.d.ts +2 -0
  45. package/dist/packages/forms/src/select.d.ts +2 -2
  46. package/dist/packages/forms/src/selection-styles.d.ts +0 -13
  47. package/dist/packages/foundations/src/control-styles.d.ts +122 -0
  48. package/dist/packages/foundations/src/style-composition.d.ts +0 -2
  49. package/dist/packages/foundations/src/tokens.stylex.d.ts +13 -2
  50. package/dist/packages/layout/src/frame.stylex.d.ts +0 -1
  51. package/dist/packages/layout/src/index.d.ts +2 -0
  52. package/dist/packages/layout/src/page-content.d.ts +5 -0
  53. package/dist/packages/layout/src/page-toolbar.d.ts +1 -1
  54. package/dist/packages/layout/src/sidebar.d.ts +3 -3
  55. package/dist/packages/navigation/src/index.d.ts +2 -2
  56. package/dist/packages/navigation/src/page-navigation.d.ts +5 -0
  57. package/dist/{pierre-diff--zsiHCCB.js → pierre-diff-sUAU-xeL.js} +1 -1
  58. package/dist/{pierre-theme-D9hnHv3Z.js → pierre-theme-CBAncKdH.js} +1 -1
  59. package/dist/{pierre-tree-D47uA7lb.js → pierre-tree-Db1yaDM2.js} +3 -3
  60. package/dist/src-B0UTwpOz.js +1003 -0
  61. package/dist/{src-D05isEh_.js → src-BNlyCwOr.js} +141 -69
  62. package/dist/{src-Cs0dRc4X.js → src-CVlgjAlw.js} +1 -1
  63. package/dist/src-DMsnWyru.js +1184 -0
  64. package/dist/tokens.js +18 -8
  65. package/package.json +1 -1
  66. package/packages/foundations/src/tokens.stylex.ts +15 -5
  67. package/dist/packages/feedback/src/loading.d.ts +0 -7
  68. package/dist/src-C_heP5kL.js +0 -1264
  69. package/dist/src-DXsGTJgv.js +0 -969
@@ -10,30 +10,128 @@ import { Avatar as p } from "@base-ui/react/avatar";
10
10
  import { Check as m, ChevronDown as h, Circle as g, CircleCheck as _, CircleX as v, Clock as y, Copy as b } from "lucide-react";
11
11
  import { Accordion as x } from "@base-ui/react/accordion";
12
12
  import { Collapsible as S } from "@base-ui/react/collapsible";
13
- // packages/core/src/actions.tsx
13
+ // packages/foundations/src/control-styles.ts
14
14
  var C = {
15
- button: {
16
- k1xSpc: "x3nfvp2",
15
+ base: {
17
16
  kB7OPa: "x9f619",
18
- kGNEyG: "x6s0dn4",
19
- kjj79g: "xl56j7k",
20
- kOIVth: "xbgj81g",
21
- k8WAf4: "x1hmw7ec",
17
+ kAzted: "x17tes2r xwu7q15",
18
+ k8WAf4: "x1ixblau",
22
19
  kg3NbH: "x1atzlso",
23
- kaIpWk: "x1ok0vyi",
24
20
  kMzoRj: "xmkeg23",
25
21
  ksu8eU: "x1y0btm7",
22
+ kVAM5u: "x1ey3b81",
23
+ kaIpWk: "x1ok0vyi",
26
24
  kMv6JI: "x1hz01jw",
27
25
  khiITx: "xvmahel",
28
- k63SB2: "xk4h15q",
26
+ k63SB2: "xj57cvi",
29
27
  kGuDYH: "xtqrqnz",
30
28
  kLWn49: "x1778rvt",
31
- kMnn75: "xkrqix3",
32
- kkrTdU: "x1ypdohk",
29
+ $$css: !0
30
+ },
31
+ button: {
32
+ k1xSpc: "x3nfvp2",
33
+ kGNEyG: "x6s0dn4",
34
+ kjj79g: "xl56j7k",
35
+ kOIVth: "xbgj81g",
33
36
  k7Eaqz: "xeuugli",
34
37
  ks0D6T: "x193iq5w",
35
38
  kHjlTd: "xj0a0fe",
36
39
  k9WMMc: "x2b8uid",
40
+ $$css: !0
41
+ },
42
+ iconButton: {
43
+ k7Eaqz: "x16opp91 xidce53",
44
+ kg3NbH: "xnjsko4",
45
+ $$css: !0
46
+ },
47
+ field: {
48
+ k1xSpc: "x1lliihq",
49
+ kzqmXN: "xh8yej3",
50
+ k7Eaqz: "xeuugli",
51
+ kWkggS: "xpvm0e4",
52
+ kMwMTN: "xbixft",
53
+ kGuDYH: "xtqrqnz x1ue2g44",
54
+ $$css: !0
55
+ },
56
+ fieldRoot: {
57
+ k1xSpc: "x78zum5",
58
+ kXwgrk: "xdt5ytf",
59
+ kOIVth: "x1hnptsi",
60
+ k7Eaqz: "xeuugli",
61
+ kMv6JI: "x1hz01jw",
62
+ k63SB2: "xj57cvi",
63
+ khiITx: "xvmahel",
64
+ $$css: !0
65
+ },
66
+ label: {
67
+ kMwMTN: "xbixft",
68
+ kMv6JI: "x1hz01jw",
69
+ kGuDYH: "xtqrqnz",
70
+ k63SB2: "xk4h15q",
71
+ kLWn49: "x1778rvt",
72
+ kHjlTd: "xj0a0fe",
73
+ $$css: !0
74
+ },
75
+ description: {
76
+ kogj98: "x1ghz6dp",
77
+ kMwMTN: "x153jb6y",
78
+ kGuDYH: "xy8obcc",
79
+ kLWn49: "xas2l8k",
80
+ kHjlTd: "xj0a0fe",
81
+ $$css: !0
82
+ },
83
+ textarea: {
84
+ kAzted: "x13j50qi",
85
+ kHenm0: "x288g5",
86
+ kLWn49: "x1gj8gu9",
87
+ $$css: !0
88
+ },
89
+ plainTextarea: {
90
+ kAzted: "x16exltd",
91
+ kskxy: "x1y3glee",
92
+ kOwNse: "x5f5z56",
93
+ kHenm0: "xtt52l0",
94
+ k8WAf4: "xt970qd",
95
+ kg3NbH: "xnjsko4",
96
+ kMzoRj: "xc342km",
97
+ kaIpWk: "x2u8bby",
98
+ kWkggS: "xjbqb8w",
99
+ k7shQP: "xi5y0ii",
100
+ kD2jPA: "x1oqui1x",
101
+ $$css: !0
102
+ },
103
+ group: {
104
+ kVAEAm: "x1n2onr6",
105
+ k1xSpc: "x78zum5",
106
+ kGNEyG: "x1qjc9v5",
107
+ k7Eaqz: "xeuugli",
108
+ kaIpWk: "x1ok0vyi",
109
+ kWkggS: "xpvm0e4",
110
+ k5JduY: "x1s928wv",
111
+ kwXMNM: "x1j6awrg",
112
+ kv0HGH: "xarstr8",
113
+ kloYau: "x2q1x1w",
114
+ kPGmMm: "x5hscyn",
115
+ kbwMcY: "x86avzo",
116
+ kXtpa: "x10z0kkz",
117
+ kUfP38: "xt0q9np",
118
+ krLA0g: "xzggfk3",
119
+ $$css: !0
120
+ },
121
+ embedded: {
122
+ kUk6DE: "x98rzlu",
123
+ k7Eaqz: "xeuugli",
124
+ kzqmXN: "xnalus7",
125
+ kVAM5u: "x9r1u3d",
126
+ kWkggS: "xjbqb8w",
127
+ kr7hW5: "x1m9vbm4",
128
+ kiEn40: "x8fq8g9",
129
+ $$css: !0
130
+ }
131
+ }, w = {
132
+ button: {
133
+ kMnn75: "xkrqix3",
134
+ kkrTdU: "x1ypdohk",
37
135
  kUfY9r: "xdibjt2",
38
136
  kxHhyo: "xwpgcpl",
39
137
  kL1HnH: "xknznnm",
@@ -43,14 +141,6 @@ var C = {
43
141
  kiEn40: "x7s97pk",
44
142
  $$css: !0
45
143
  },
46
- sm: {
47
- kAzted: "xaeotn9 xwu7q15",
48
- $$css: !0
49
- },
50
- md: {
51
- kAzted: "x1uey4wk xwu7q15",
52
- $$css: !0
53
- },
54
144
  solidNeutral: {
55
145
  kWkggS: "x1pt885t",
56
146
  kVAM5u: "x159tnba",
@@ -70,9 +160,7 @@ var C = {
70
160
  ghostNeutral: {
71
161
  kWkggS: "xjbqb8w",
72
162
  kVAM5u: "x9r1u3d",
73
- kMzoRj: "xc342km",
74
163
  kMwMTN: "xbixft",
75
- k63SB2: "xj57cvi",
76
164
  kvyT6O: "x19fjeqo",
77
165
  k2wZ5d: "x1480za7",
78
166
  $$css: !0
@@ -96,23 +184,11 @@ var C = {
96
184
  ghostDanger: {
97
185
  kWkggS: "xjbqb8w",
98
186
  kVAM5u: "x9r1u3d",
99
- kMzoRj: "xc342km",
100
187
  kMwMTN: "xr5kp14",
101
- k63SB2: "xj57cvi",
102
188
  kGGynd: "xvxq6zk",
103
189
  k2wZ5d: "x14u6bge",
104
190
  $$css: !0
105
191
  },
106
- iconSm: {
107
- k7Eaqz: "x1udcv4t xidce53",
108
- kg3NbH: "xnjsko4",
109
- $$css: !0
110
- },
111
- iconMd: {
112
- k7Eaqz: "xelkyza xidce53",
113
- kg3NbH: "xnjsko4",
114
- $$css: !0
115
- },
116
192
  text: {
117
193
  k1xSpc: "x1rg5ohu",
118
194
  kB7OPa: "x9f619",
@@ -168,28 +244,22 @@ var C = {
168
244
  kiEn40: "x7s97pk",
169
245
  $$css: !0
170
246
  }
171
- }, w = {
247
+ }, T = {
172
248
  neutral: {
173
- solid: C.solidNeutral,
174
- outline: C.outlineNeutral,
175
- ghost: C.ghostNeutral
249
+ solid: w.solidNeutral,
250
+ outline: w.outlineNeutral,
251
+ ghost: w.ghostNeutral
176
252
  },
177
253
  danger: {
178
- solid: C.solidDanger,
179
- outline: C.outlineDanger,
180
- ghost: C.ghostDanger
254
+ solid: w.solidDanger,
255
+ outline: w.outlineDanger,
256
+ ghost: w.ghostDanger
181
257
  }
182
- }, T = {
183
- sm: C.sm,
184
- md: C.md
185
258
  }, E = {
186
- sm: C.iconSm,
187
- md: C.iconMd
188
- }, D = {
189
- neutral: C.neutralText,
190
- danger: C.dangerText
259
+ neutral: w.neutralText,
260
+ danger: w.dangerText
191
261
  };
192
- function O({ id: e, children: t, pending: n = !1, pendingLabel: r }) {
262
+ function D({ id: e, children: t, pending: n = !1, pendingLabel: r }) {
193
263
  return r === void 0 ? t : /* @__PURE__ */ f("span", {
194
264
  id: e,
195
265
  className: "xwz0xwf xeuugli x193iq5w",
@@ -210,8 +280,8 @@ function O({ id: e, children: t, pending: n = !1, pendingLabel: r }) {
210
280
  })]
211
281
  });
212
282
  }
213
- function k({ variant: t = "outline", tone: r = "neutral", size: i = "sm", pending: o = !1, pendingLabel: c, children: l, className: u, style: f, xstyle: p, disabled: m = !1, ...h }) {
214
- let g = s(), _ = a.props(C.button, T[i], w[r][t], p);
283
+ function O({ variant: t = "outline", tone: r = "neutral", isIconOnly: i = !1, pending: o = !1, pendingLabel: c, children: l, className: u, style: f, xstyle: p, disabled: m = !1, ...h }) {
284
+ let g = s(), _ = a.props(C.base, C.button, w.button, T[r][t], i && C.iconButton, p);
215
285
  return /* @__PURE__ */ d(n, {
216
286
  ...h,
217
287
  ...e({
@@ -223,7 +293,7 @@ function k({ variant: t = "outline", tone: r = "neutral", size: i = "sm", pendin
223
293
  focusableWhenDisabled: o || h.focusableWhenDisabled,
224
294
  "aria-labelledby": h["aria-labelledby"] ?? (h["aria-label"] === void 0 && c !== void 0 ? g : void 0),
225
295
  "aria-busy": o || h["aria-busy"],
226
- children: /* @__PURE__ */ d(O, {
296
+ children: /* @__PURE__ */ d(D, {
227
297
  id: g,
228
298
  pending: o,
229
299
  pendingLabel: c,
@@ -231,20 +301,22 @@ function k({ variant: t = "outline", tone: r = "neutral", size: i = "sm", pendin
231
301
  })
232
302
  });
233
303
  }
234
- function ee({ size: e = "sm", children: t, xstyle: n, ...r }) {
235
- return /* @__PURE__ */ d(k, {
236
- ...r,
237
- size: e,
238
- xstyle: [E[e], n],
304
+ function k(e) {
305
+ return /* @__PURE__ */ d(O, { ...e });
306
+ }
307
+ function ee({ children: e, ...t }) {
308
+ return /* @__PURE__ */ d(O, {
309
+ ...t,
310
+ isIconOnly: !0,
239
311
  children: /* @__PURE__ */ d("span", {
240
312
  "aria-hidden": !0,
241
313
  className: "xtwnzbg x18utl2x x2lah0s x3nfvp2",
242
- children: t
314
+ children: e
243
315
  })
244
316
  });
245
317
  }
246
318
  function A({ tone: t = "neutral", pending: r = !1, pendingLabel: i, children: o, className: c, style: l, xstyle: u, disabled: f = !1, ...p }) {
247
- let m = s(), h = a.props(C.text, D[t], u);
319
+ let m = s(), h = a.props(w.text, E[t], u);
248
320
  return /* @__PURE__ */ d(n, {
249
321
  ...p,
250
322
  ...e({
@@ -256,7 +328,7 @@ function A({ tone: t = "neutral", pending: r = !1, pendingLabel: i, children: o,
256
328
  focusableWhenDisabled: r || p.focusableWhenDisabled,
257
329
  "aria-labelledby": p["aria-labelledby"] ?? (p["aria-label"] === void 0 && i !== void 0 ? m : void 0),
258
330
  "aria-busy": r || p["aria-busy"],
259
- children: /* @__PURE__ */ d(O, {
331
+ children: /* @__PURE__ */ d(D, {
260
332
  id: m,
261
333
  pending: r,
262
334
  pendingLabel: i,
@@ -265,16 +337,16 @@ function A({ tone: t = "neutral", pending: r = !1, pendingLabel: i, children: o,
265
337
  });
266
338
  }
267
339
  function j({ xstyle: e, ...t }) {
268
- return /* @__PURE__ */ d("a", { ...r(a.props(C.link, e), t) });
340
+ return /* @__PURE__ */ d("a", { ...r(a.props(w.link, e), t) });
269
341
  }
270
- function M({ size: e = "sm", children: t, xstyle: n, render: o, ref: s, ...c }) {
342
+ function M({ children: e, xstyle: t, render: n, ref: o, ...s }) {
271
343
  return i({
272
344
  defaultTagName: "a",
273
- render: o,
274
- ref: s,
275
- props: r(a.props(C.button, T[e], C.ghostNeutral, E[e], n), c, { children: /* @__PURE__ */ d("span", {
345
+ render: n,
346
+ ref: o,
347
+ props: r(a.props(C.base, C.button, w.button, w.ghostNeutral, C.iconButton, t), s, { children: /* @__PURE__ */ d("span", {
276
348
  className: "xtwnzbg x18utl2x x2lah0s x3nfvp2",
277
- children: t
349
+ children: e
278
350
  }) })
279
351
  });
280
352
  }
@@ -1363,7 +1435,7 @@ function ae({ className: t, style: n, children: r, ...i }) {
1363
1435
  ...e({
1364
1436
  className: t,
1365
1437
  style: n,
1366
- styles: { className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xh8yej3 x1uey4wk xwu7q15 xnjsko4 xn9t2bk xc342km xjbqb8w xvwfb5p xyg3wme xjb2p0i x1qlqyl8 x15bjb6t xk4h15q x1heor9g x1yc453h xj0a0fe x1ypdohk xwj21n9 x1m8qfh3 x13qnu6 x9v5kkp x19rmrnh x7s97pk x-default-marker" }
1438
+ styles: { className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xh8yej3 x17tes2r xwu7q15 xnjsko4 xn9t2bk xc342km xjbqb8w xvwfb5p xyg3wme xjb2p0i x1qlqyl8 x15bjb6t xk4h15q x1heor9g x1yc453h xj0a0fe x1ypdohk xwj21n9 x1m8qfh3 x13qnu6 x9v5kkp x19rmrnh x7s97pk x-default-marker" }
1367
1439
  }),
1368
1440
  children: [r, /* @__PURE__ */ d(h, {
1369
1441
  "aria-hidden": !0,
@@ -1397,7 +1469,7 @@ function ce({ className: t, style: n, children: r, ...i }) {
1397
1469
  ...e({
1398
1470
  className: t,
1399
1471
  style: n,
1400
- styles: { className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xh8yej3 x1uey4wk xwu7q15 xnjsko4 xn9t2bk xc342km xjbqb8w xvwfb5p xyg3wme xjb2p0i x1qlqyl8 x15bjb6t xk4h15q x1heor9g x1yc453h xj0a0fe x1ypdohk xwj21n9 x1m8qfh3 x13qnu6 x9v5kkp x19rmrnh x7s97pk x-default-marker" }
1472
+ styles: { className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xh8yej3 x17tes2r xwu7q15 xnjsko4 xn9t2bk xc342km xjbqb8w xvwfb5p xyg3wme xjb2p0i x1qlqyl8 x15bjb6t xk4h15q x1heor9g x1yc453h xj0a0fe x1ypdohk xwj21n9 x1m8qfh3 x13qnu6 x9v5kkp x19rmrnh x7s97pk x-default-marker" }
1401
1473
  }),
1402
1474
  children: [r, /* @__PURE__ */ d(h, {
1403
1475
  "aria-hidden": !0,
@@ -1649,4 +1721,4 @@ function Ae({ children: e, tone: t = "neutral", ...n }) {
1649
1721
  })]
1650
1722
  });
1651
1723
  }
1652
- export { k as C, j as D, A as E, te as S, M as T, X as _, Oe as a, z as b, Ce as c, pe as d, he as f, de as g, ue as h, Ee as i, _e as l, me as m, we as n, Ae as o, ge as p, De as r, Te as s, ke as t, ve as u, W as v, ee as w, ne as x, U as y };
1724
+ export { k as C, j as D, A as E, C as O, te as S, M as T, X as _, Oe as a, z as b, Ce as c, pe as d, he as f, de as g, ue as h, Ee as i, _e as l, me as m, we as n, Ae as o, ge as p, De as r, Te as s, ke as t, ve as u, W as v, ee as w, ne as x, U as y };
@@ -318,7 +318,7 @@ var j = {
318
318
  k7Eaqz: "xeuugli",
319
319
  kHjlTd: "xj0a0fe",
320
320
  kOIVth: "x1hnptsi",
321
- kAzted: "xaeotn9 xwu7q15",
321
+ kAzted: "x17tes2r xwu7q15",
322
322
  kg3NbH: "x5g2kb4",
323
323
  k8WAf4: "x1hmw7ec",
324
324
  kaIpWk: "x1ok0vyi",