@mechane-ai/elements 0.7.1 → 0.9.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 (63) hide show
  1. package/README.md +73 -36
  2. package/dist/ai.js +231 -170
  3. package/dist/assets/stylex.css +464 -166
  4. package/dist/{categorical-values-75J0TUkR.js → categorical-values-DYRiw5Qd.js} +2 -2
  5. package/dist/{chart-frame--DOsZKwP.js → chart-frame-RL1hCWBC.js} +2 -1
  6. package/dist/{chart-input-C-g586YE.js → chart-input-Bm3ot1yD.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-B30xQKqg.js} +1 -1
  15. package/dist/collections.js +369 -244
  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 +4 -4
  20. package/dist/content/tree.js +2 -2
  21. package/dist/{content-link-HLYu0cmz.js → content-link-BrPrpBof.js} +1 -1
  22. package/dist/content.js +35 -35
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +7 -7
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +144 -91
  28. package/dist/navigation/commands.js +1 -1
  29. package/dist/packages/ai/src/conversation.d.ts +2 -1
  30. package/dist/packages/ai/src/index.d.ts +4 -0
  31. package/dist/packages/ai/src/message-action.d.ts +10 -0
  32. package/dist/packages/ai/src/message-boundary.d.ts +6 -0
  33. package/dist/packages/ai/src/message.d.ts +2 -1
  34. package/dist/packages/charts/src/chart-theme.d.ts +1 -0
  35. package/dist/packages/collections/src/data-table.d.ts +9 -1
  36. package/dist/packages/collections/src/index.d.ts +4 -2
  37. package/dist/packages/collections/src/metrics.d.ts +5 -2
  38. package/dist/packages/collections/src/timeline.d.ts +26 -0
  39. package/dist/packages/core/src/actions.d.ts +7 -0
  40. package/dist/packages/core/src/agent-avatar-glyphs.d.ts +5 -0
  41. package/dist/packages/core/src/agent-avatar.d.ts +17 -0
  42. package/dist/packages/core/src/copy-value.d.ts +2 -1
  43. package/dist/packages/core/src/index.d.ts +5 -1
  44. package/dist/packages/forms/src/agent-avatar-picker.d.ts +8 -0
  45. package/dist/packages/forms/src/field-styles.d.ts +19 -0
  46. package/dist/packages/forms/src/forms.d.ts +2 -1
  47. package/dist/packages/forms/src/index.d.ts +2 -0
  48. package/dist/packages/foundations/src/tokens.stylex.d.ts +52 -0
  49. package/dist/packages/layout/src/app-shell.d.ts +2 -1
  50. package/dist/packages/layout/src/index.d.ts +2 -1
  51. package/dist/packages/layout/src/page-toolbar.d.ts +3 -1
  52. package/dist/packages/layout/src/sidebar.d.ts +4 -0
  53. package/dist/packages/layout/src/view-stack.d.ts +13 -0
  54. package/dist/packages/layout/src/workbench.d.ts +5 -2
  55. package/dist/{pierre-tree-DVybsnm4.js → pierre-tree-CRk09rx7.js} +2 -2
  56. package/dist/{src-DjTM64tN.js → src-Cc0Sadzr.js} +378 -295
  57. package/dist/{src-B_DCatpY.js → src-DuuAmS-c.js} +1 -1
  58. package/dist/src-elMBQ2Dh.js +1087 -0
  59. package/dist/theme.js +1 -1
  60. package/dist/tokens.js +61 -10
  61. package/package.json +1 -1
  62. package/packages/foundations/src/tokens.stylex.ts +54 -0
  63. package/dist/src-BkCsvZGi.js +0 -675
@@ -1 +1 @@
1
- export { t as CodeBlock } from "../code-block-D0Jmsj7w.js";
1
+ export { t as CodeBlock } from "../code-block-B30xQKqg.js";
@@ -1,5 +1,5 @@
1
- import { g as e, h as t } from "../src-BkCsvZGi.js";
2
- import { t as n } from "../code-block-D0Jmsj7w.js";
1
+ import { g as e, h as t } from "../src-elMBQ2Dh.js";
2
+ import { t as n } from "../code-block-B30xQKqg.js";
3
3
  import "@stylexjs/stylex";
4
4
  import { useEffect as r, useState as i } from "react";
5
5
  import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
@@ -1 +1 @@
1
- export { t as ContentLink } from "../content-link-HLYu0cmz.js";
1
+ export { t as ContentLink } from "../content-link-BrPrpBof.js";
@@ -1,5 +1,5 @@
1
- import { t as e } from "../code-block-D0Jmsj7w.js";
2
- import { n as t, t as n } from "../content-link-HLYu0cmz.js";
1
+ import { t as e } from "../code-block-B30xQKqg.js";
2
+ import { n as t, t as n } from "../content-link-BrPrpBof.js";
3
3
  import * as r from "@stylexjs/stylex";
4
4
  import { Children as i, createElement as a } from "react";
5
5
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
@@ -100,9 +100,9 @@ var x = {
100
100
  role: "region",
101
101
  "aria-label": "Markdown table",
102
102
  tabIndex: 0,
103
- className: "xw2csxc x1we84gm xmkeg23 x1y0btm7 x1ey3b81",
103
+ className: "xeuugli x193iq5w xw2csxc x1we84gm xmkeg23 x1y0btm7 x1ey3b81",
104
104
  children: /* @__PURE__ */ s("table", {
105
- className: "xh8yej3 x1mwwwfo xss6m8b x1yc453h",
105
+ className: "xh8yej3 x1mwwwfo xss6m8b x1yc453h x1h4wwuj",
106
106
  children: e
107
107
  })
108
108
  }),
@@ -1,4 +1,4 @@
1
- import { b as e } from "../src-BkCsvZGi.js";
1
+ import { T as e } from "../src-elMBQ2Dh.js";
2
2
  import * as t from "@stylexjs/stylex";
3
3
  import { useEffect as n, useState as r } from "react";
4
4
  import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
@@ -26,7 +26,7 @@ function u(c) {
26
26
  let e = !0;
27
27
  async function t() {
28
28
  try {
29
- let t = await import("../pierre-tree-DVybsnm4.js");
29
+ let t = await import("../pierre-tree-CRk09rx7.js");
30
30
  e && d({
31
31
  Component: t.PierreTree,
32
32
  hasFailed: !1
@@ -1,4 +1,4 @@
1
- import { x as e } from "./src-BkCsvZGi.js";
1
+ import { E as e } from "./src-elMBQ2Dh.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  // packages/content/src/content-link.tsx
4
4
  var n = "https://content.invalid", r = /* @__PURE__ */ new Set([
package/dist/content.js CHANGED
@@ -1,5 +1,5 @@
1
- import { b as e, g as t, h as n, v as r, x as i } from "./src-BkCsvZGi.js";
2
- import { t as a } from "./code-block-D0Jmsj7w.js";
1
+ import { E as e, S as t, T as n, g as r, h as i } from "./src-elMBQ2Dh.js";
2
+ import { t as a } from "./code-block-B30xQKqg.js";
3
3
  import * as o from "@stylexjs/stylex";
4
4
  import { useCallback as s, useEffect as c, useRef as l, useState as u } from "react";
5
5
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
@@ -79,21 +79,21 @@ function x({ value: e, name: t, path: n, depth: r, maxDepth: i, maxEntries: a })
79
79
  })]
80
80
  });
81
81
  }
82
- function S({ value: e, label: n, maxDepth: r = 6, maxEntries: i = 50 }) {
82
+ function S({ value: e, label: t, maxDepth: n = 6, maxEntries: i = 50 }) {
83
83
  let a = s(() => JSON.stringify(e, null, 2), [e]);
84
84
  return /* @__PURE__ */ f("section", {
85
- "aria-label": n,
85
+ "aria-label": t,
86
86
  className: "xeuugli xmkeg23 x1y0btm7 x1ey3b81 xbixft xpvm0e4 x1hz01jw xtqrqnz x1778rvt",
87
87
  children: [/* @__PURE__ */ f("div", {
88
88
  className: "x78zum5 x6s0dn4 x1qughib x1n8ia3y x69ldcm xso031l x1q0q8m5 x1qndepd",
89
- children: [/* @__PURE__ */ d("span", { children: n }), /* @__PURE__ */ d(t, {
90
- label: n,
89
+ children: [/* @__PURE__ */ d("span", { children: t }), /* @__PURE__ */ d(r, {
90
+ label: t,
91
91
  value: a,
92
92
  children: "Copy JSON"
93
93
  })]
94
94
  }), /* @__PURE__ */ d("div", {
95
95
  role: "region",
96
- "aria-label": `${n} fields`,
96
+ "aria-label": `${t} fields`,
97
97
  tabIndex: 0,
98
98
  className: "x69ldcm xysyzu8 x1phlbz0 xiard35 xy8obcc",
99
99
  children: /* @__PURE__ */ d(x, {
@@ -101,7 +101,7 @@ function S({ value: e, label: n, maxDepth: r = 6, maxEntries: i = 50 }) {
101
101
  path: "",
102
102
  value: e,
103
103
  depth: 0,
104
- maxDepth: Math.max(1, r),
104
+ maxDepth: Math.max(1, n),
105
105
  maxEntries: Math.max(1, i)
106
106
  })
107
107
  })]
@@ -139,12 +139,12 @@ function E({ output: e, label: n, maxLines: i = 500, maxHeight: a = 320, isRunni
139
139
  className: "x78zum5 x6s0dn4 x1qughib x1n8ia3y x69ldcm xso031l x1q0q8m5 x1qndepd",
140
140
  children: [/* @__PURE__ */ f("span", { children: [n, s && " · running"] }), /* @__PURE__ */ f("div", {
141
141
  className: "x78zum5 x6s0dn4 x1n8ia3y",
142
- children: [/* @__PURE__ */ d(r, {
142
+ children: [/* @__PURE__ */ d(t, {
143
143
  size: "sm",
144
144
  variant: "ghost",
145
145
  onClick: () => h(!m),
146
146
  children: m ? "Pause following" : "Follow output"
147
- }), /* @__PURE__ */ d(t, {
147
+ }), /* @__PURE__ */ d(r, {
148
148
  value: e,
149
149
  label: n,
150
150
  children: "Copy"
@@ -175,42 +175,42 @@ function E({ output: e, label: n, maxLines: i = 500, maxHeight: a = 320, isRunni
175
175
  });
176
176
  }
177
177
  // packages/content/src/stack-trace.tsx
178
- function D({ message: e, frames: t }) {
178
+ function D({ message: t, frames: n }) {
179
179
  return /* @__PURE__ */ f("section", {
180
180
  "aria-label": "Stack trace",
181
181
  className: "xeuugli xmkeg23 x1y0btm7 x1ey3b81 x1hz01jw xtqrqnz x1778rvt xpvm0e4 xbixft",
182
182
  children: [/* @__PURE__ */ d("p", {
183
183
  className: "x1ghz6dp x1mvvolr xso031l x1q0q8m5 x1qndepd xr5kp14 xk50ysn xj0a0fe",
184
- children: e
185
- }), t.length === 0 ? /* @__PURE__ */ d("p", {
184
+ children: t
185
+ }), n.length === 0 ? /* @__PURE__ */ d("p", {
186
186
  className: "x1ghz6dp x1mvvolr x153jb6y",
187
187
  children: "No frames recorded."
188
188
  }) : /* @__PURE__ */ d("ol", {
189
189
  className: "x1ghz6dp x1717udv x3ct3a4",
190
- children: t.map((e) => {
191
- let t = [
192
- e.file,
193
- e.line,
194
- e.column
190
+ children: n.map((t) => {
191
+ let n = [
192
+ t.file,
193
+ t.line,
194
+ t.column
195
195
  ].filter((e) => e !== void 0).join(":");
196
196
  return /* @__PURE__ */ f("li", {
197
197
  className: "x1mvvolr xso031l x1q0q8m5 x1qndepd",
198
198
  children: [
199
- e.href === void 0 ? /* @__PURE__ */ d("span", { children: e.name }) : /* @__PURE__ */ d(i, {
200
- href: e.href,
201
- children: e.name
199
+ t.href === void 0 ? /* @__PURE__ */ d("span", { children: t.name }) : /* @__PURE__ */ d(e, {
200
+ href: t.href,
201
+ children: t.name
202
202
  }),
203
203
  /* @__PURE__ */ d("span", {
204
204
  className: "x1lliihq x153jb6y xiard35 xy8obcc xj0a0fe",
205
- children: t
205
+ children: n
206
206
  }),
207
- e.code !== void 0 && /* @__PURE__ */ d(a, {
208
- code: e.code,
209
- language: e.language,
210
- filename: e.file
207
+ t.code !== void 0 && /* @__PURE__ */ d(a, {
208
+ code: t.code,
209
+ language: t.language,
210
+ filename: t.file
211
211
  })
212
212
  ]
213
- }, e.id);
213
+ }, t.id);
214
214
  })
215
215
  })]
216
216
  });
@@ -270,17 +270,17 @@ function M({ label: e, children: t }) {
270
270
  children: t
271
271
  });
272
272
  }
273
- function N({ id: t, label: r, status: i, statusLabel: a, description: s, detail: c, selected: l, onSelect: u, children: p }) {
274
- let m = A[i];
273
+ function N({ id: e, label: t, status: r, statusLabel: a, description: s, detail: c, selected: l, onSelect: u, children: p }) {
274
+ let m = A[r];
275
275
  return /* @__PURE__ */ f("li", {
276
- "data-item-id": t,
276
+ "data-item-id": e,
277
277
  className: "x1n2onr6 xrvj5dj x1qpdrs7 x8zbtdt x1wv5www",
278
278
  children: [/* @__PURE__ */ f("div", {
279
279
  "aria-hidden": !0,
280
280
  className: "x78zum5 xdt5ytf x6s0dn4 xunmzkg x1lk341d",
281
281
  children: [/* @__PURE__ */ d(m, {
282
282
  size: 14,
283
- ...o.props(k[i])
283
+ ...o.props(k[r])
284
284
  }), /* @__PURE__ */ d("span", { className: "x1i1rx1s x1f6qilh x98rzlu x1fa40ue" })]
285
285
  }), /* @__PURE__ */ f("div", {
286
286
  className: "x78zum5 xdt5ytf xunmzkg xeuugli",
@@ -290,10 +290,10 @@ function N({ id: t, label: r, status: i, statusLabel: a, description: s, detail:
290
290
  0: { className: "xk50ysn xj0a0fe" },
291
291
  1: { className: "xk50ysn xj0a0fe xujl8zx xda060z" }
292
292
  }[l === !0 | 0],
293
- children: u === void 0 ? r : /* @__PURE__ */ d(e, {
293
+ children: u === void 0 ? t : /* @__PURE__ */ d(n, {
294
294
  "aria-pressed": l,
295
- onClick: () => u(t),
296
- children: r
295
+ onClick: () => u(e),
296
+ children: t
297
297
  })
298
298
  }),
299
299
  /* @__PURE__ */ d("span", {
@@ -304,7 +304,7 @@ function N({ id: t, label: r, status: i, statusLabel: a, description: s, detail:
304
304
  className: "x1ghz6dp x153jb6y xj0a0fe",
305
305
  children: s
306
306
  }),
307
- c !== void 0 && /* @__PURE__ */ f(n.Root, { children: [/* @__PURE__ */ d(n.Trigger, { children: "Details" }), /* @__PURE__ */ d(n.Panel, { children: c })] }),
307
+ c !== void 0 && /* @__PURE__ */ f(i.Root, { children: [/* @__PURE__ */ d(i.Trigger, { children: "Details" }), /* @__PURE__ */ d(i.Panel, { children: c })] }),
308
308
  p
309
309
  ]
310
310
  })]
package/dist/feedback.js CHANGED
@@ -1 +1 @@
1
- export { t as AsyncRegion, n as ContentReveal, u as EmptyState, o as Loading, i as Meter, d as Notice, a as Progress, s as Skeleton, c as SkeletonText, l as Spinner, r as Toast } from "./src-B_DCatpY.js";
1
+ export { t as AsyncRegion, n as ContentReveal, u as EmptyState, o as Loading, i as Meter, d as Notice, a as Progress, s as Skeleton, c as SkeletonText, l as Spinner, r as Toast } from "./src-DuuAmS-c.js";
@@ -1,4 +1,4 @@
1
- import { b as e, v as t } from "../src-BkCsvZGi.js";
1
+ import { S as e, T as t } from "../src-elMBQ2Dh.js";
2
2
  import { r as n } from "../src-CfDf8TY8.js";
3
3
  import "@stylexjs/stylex";
4
4
  import { useState as r } from "react";
@@ -115,7 +115,7 @@ function m({ label: s, value: c, onValueChange: l, formatValue: u, presets: d =
115
115
  onOpenChange: g,
116
116
  children: [/* @__PURE__ */ a(n.Trigger, {
117
117
  disabled: f,
118
- render: /* @__PURE__ */ i(t, { variant: "outline" }),
118
+ render: /* @__PURE__ */ i(e, { variant: "outline" }),
119
119
  "aria-label": s,
120
120
  children: [/* @__PURE__ */ i(o, {
121
121
  size: 16,
@@ -132,14 +132,14 @@ function m({ label: s, value: c, onValueChange: l, formatValue: u, presets: d =
132
132
  role: "group",
133
133
  "aria-label": "Date presets",
134
134
  className: "x78zum5 x1a02dak xunmzkg xmmm7uk xso031l x1q0q8m5 x1qndepd",
135
- children: d.map((e) => /* @__PURE__ */ i(t, {
135
+ children: d.map((t) => /* @__PURE__ */ i(e, {
136
136
  size: "sm",
137
137
  variant: "ghost",
138
138
  onClick: () => {
139
- l(e.value), g(!1);
139
+ l(t.value), g(!1);
140
140
  },
141
- children: e.label
142
- }, e.id))
141
+ children: t.label
142
+ }, t.id))
143
143
  }),
144
144
  /* @__PURE__ */ i(p, {
145
145
  ...m,
@@ -153,7 +153,7 @@ function m({ label: s, value: c, onValueChange: l, formatValue: u, presets: d =
153
153
  }),
154
154
  /* @__PURE__ */ a("div", {
155
155
  className: "x78zum5 x1qughib x6s0dn4 xaml1ju x3bg4vu x178xt8z x13fuv20 xhjagg4 xy8obcc x153jb6y",
156
- children: [/* @__PURE__ */ i("span", { children: m.timeZone }), /* @__PURE__ */ i(e, {
156
+ children: [/* @__PURE__ */ i("span", { children: m.timeZone }), /* @__PURE__ */ i(t, {
157
157
  disabled: c === void 0,
158
158
  onClick: () => l(void 0),
159
159
  children: "Clear"
package/dist/forms.js CHANGED
@@ -1 +1 @@
1
- export { r as Checkbox, g as Combobox, c as Field, d as Fieldset, f as FilePicker, l as Input, p as InputGroup, m as NumberField, i as RadioGroup, s as Select, n as SettingsRow, t as SettingsSection, h as Slider, a as Switch, u as Textarea, o as ToggleGroup } from "./src-DjTM64tN.js";
1
+ export { g as AgentAvatarPicker, r as Checkbox, _ as Combobox, c as Field, d as Fieldset, f as FilePicker, l as Input, p as InputGroup, m as NumberField, i as RadioGroup, s as Select, n as SettingsRow, t as SettingsSection, h as Slider, a as Switch, u as Textarea, o as ToggleGroup } from "./src-Cc0Sadzr.js";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { m as Accordion, _ as Avatar, t as Badge, v as Button, h as Collapsible, l as Columns, g as CopyValue, u as Divider, n as Heading, y as IconButton, r as Identifier, i as Muted, d as Panel, a as Prose, f as Row, p as Stack, o as Status, s as Subheading, c as Text, b as TextButton, x as TextLink } from "./src-BkCsvZGi.js";
1
+ export { m as Accordion, _ as AgentAvatar, x as Avatar, t as Badge, S as Button, h as Collapsible, l as Columns, g as CopyValue, u as Divider, n as Heading, C as IconButton, w as IconLink, r as Identifier, i as Muted, d as Panel, a as Prose, f as Row, p as Stack, o as Status, s as Subheading, c as Text, T as TextButton, E as TextLink, v as agentAppearance, y as agentAvatarColors, b as agentAvatarShapes } from "./src-elMBQ2Dh.js";