@mechane-ai/elements 0.45.0 → 0.46.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 (110) hide show
  1. package/README.md +48 -18
  2. package/bin/mechane-elements-catalog.mjs +42 -4
  3. package/dist/ai.js +268 -202
  4. package/dist/catalog.json +91 -31
  5. package/dist/categorical-values-BXi-rJuv.js +74 -0
  6. package/dist/chart-cursor-1mFd48Jc.js +23 -0
  7. package/dist/chart-data-CIJVWCYt.js +21 -0
  8. package/dist/{chart-frame-Ztktqs1b.js → chart-frame-BaxKn_MB.js} +22 -41
  9. package/dist/{chart-input-BO3BqlFO.js → chart-input-Bm82_9Rd.js} +2 -2
  10. package/dist/chart-theme-4zprJ3rW.js +404 -0
  11. package/dist/charts/cartesian.js +1598 -1432
  12. package/dist/charts/distribution.js +476 -404
  13. package/dist/charts/graph.js +363 -349
  14. package/dist/charts/hierarchy.js +103 -94
  15. package/dist/charts/matrix.js +340 -333
  16. package/dist/charts/timeline.js +167 -134
  17. package/dist/charts.js +3 -3
  18. package/dist/{code-block-Cpfr7B6a.js → code-block-DioAM2bZ.js} +67 -52
  19. package/dist/collections.js +1648 -1188
  20. package/dist/content/code.js +1 -1
  21. package/dist/content/diff.js +67 -66
  22. package/dist/content/link.js +1 -1
  23. package/dist/content/markdown.js +2 -2
  24. package/dist/content/tree.js +2 -2
  25. package/dist/{content-link-CGeFFb9F.js → content-link-NWuHp5rC.js} +1 -1
  26. package/dist/content.js +1 -1
  27. package/dist/csp.js +6 -11
  28. package/dist/feedback.js +1 -1
  29. package/dist/forms/dates.js +274 -214
  30. package/dist/{forms-DeU0Tiv3.js → forms-CEbwzlRR.js} +50 -41
  31. package/dist/forms.js +3 -3
  32. package/dist/index.js +1 -1
  33. package/dist/layout.js +207 -207
  34. package/dist/navigation.js +4 -3
  35. package/dist/packages/ai/src/conversation.d.ts +2 -0
  36. package/dist/packages/ai/src/prompt-input.d.ts +7 -2
  37. package/dist/packages/charts/src/cartesian/composition-bars.d.ts +2 -2
  38. package/dist/packages/charts/src/cartesian/index.d.ts +3 -2
  39. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +8 -2
  40. package/dist/packages/charts/src/cartesian/time-series.d.ts +11 -1
  41. package/dist/packages/charts/src/categorical-values.d.ts +14 -9
  42. package/dist/packages/charts/src/chart-frame.d.ts +7 -9
  43. package/dist/packages/charts/src/chart-inspection.d.ts +1 -2
  44. package/dist/packages/charts/src/chart-range.d.ts +33 -0
  45. package/dist/packages/charts/src/chart-rows.d.ts +20 -0
  46. package/dist/packages/charts/src/chart-theme.d.ts +17 -0
  47. package/dist/packages/charts/src/chart.d.ts +81 -0
  48. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +4 -4
  49. package/dist/packages/charts/src/index.d.ts +1 -0
  50. package/dist/packages/charts/src/matrix/matrix-strip.d.ts +3 -3
  51. package/dist/packages/charts/src/plot-width.d.ts +0 -1
  52. package/dist/packages/charts/src/timeline/index.d.ts +1 -1
  53. package/dist/packages/charts/src/timeline/waterfall.d.ts +6 -2
  54. package/dist/packages/collections/src/collection-controls.d.ts +5 -1
  55. package/dist/packages/collections/src/collection-filters.d.ts +4 -1
  56. package/dist/packages/collections/src/control-toolbar.d.ts +13 -0
  57. package/dist/packages/collections/src/data-table-layout.d.ts +78 -0
  58. package/dist/packages/collections/src/data-table-rows.d.ts +54 -0
  59. package/dist/packages/collections/src/data-table-styles.d.ts +340 -0
  60. package/dist/packages/collections/src/data-table-text.d.ts +13 -0
  61. package/dist/packages/collections/src/data-table-trigger.d.ts +23 -0
  62. package/dist/packages/collections/src/data-table.d.ts +3 -85
  63. package/dist/packages/collections/src/index.d.ts +11 -6
  64. package/dist/packages/collections/src/query-controls.d.ts +6 -2
  65. package/dist/packages/collections/src/table-results.d.ts +47 -13
  66. package/dist/packages/collections/src/timeline.d.ts +1 -0
  67. package/dist/packages/collections/src/use-collection-controls.d.ts +2 -1
  68. package/dist/packages/collections/src/use-table-window.d.ts +25 -0
  69. package/dist/packages/content/src/viewer.d.ts +8 -0
  70. package/dist/packages/core/src/disclosure.d.ts +9 -1
  71. package/dist/packages/core/src/index.d.ts +1 -0
  72. package/dist/packages/core/src/route-link.d.ts +11 -0
  73. package/dist/packages/forms/src/dates/date-inputs.d.ts +3 -1
  74. package/dist/packages/forms/src/file-picker.d.ts +15 -0
  75. package/dist/packages/forms/src/form-controls.d.ts +1 -6
  76. package/dist/packages/forms/src/forms.d.ts +4 -1
  77. package/dist/packages/forms/src/index.d.ts +4 -2
  78. package/dist/packages/forms/src/selection.d.ts +14 -0
  79. package/dist/packages/foundations/src/csp/index.d.ts +1 -1
  80. package/dist/packages/foundations/src/csp/provider.d.ts +7 -2
  81. package/dist/packages/navigation/src/index.d.ts +1 -1
  82. package/dist/{pierre-diff-B3tD3-6z.js → pierre-diff-DlvjyuJn.js} +1 -1
  83. package/dist/plot-width-v2c_rA20.js +63 -0
  84. package/dist/{src-gqEebHEa.js → src-1EHkSFS-.js} +395 -274
  85. package/dist/{src-DBNncL7_.js → src-BPTDJqt0.js} +48 -68
  86. package/dist/src-CGc_hjxJ.js +409 -0
  87. package/dist/{src-DcW_gMX8.js → src-CpdJlDhO.js} +480 -362
  88. package/dist/{src-Dcs3SZ9V.js → src-DVHlknB6.js} +1 -1
  89. package/dist/styles2.css +136 -114
  90. package/package.json +1 -4
  91. package/skills/extend-elements/SKILL.md +74 -0
  92. package/skills/review-elements/SKILL.md +76 -0
  93. package/skills/upgrade-elements/SKILL.md +34 -0
  94. package/skills/upgrade-elements/references/releases.md +58 -0
  95. package/skills/use-elements/SKILL.md +64 -13
  96. package/skills/use-elements/references/agent.md +57 -0
  97. package/skills/use-elements/references/charts.md +63 -0
  98. package/skills/use-elements/references/collections.md +89 -0
  99. package/skills/use-elements/references/conversations.md +47 -0
  100. package/skills/use-elements/references/forms.md +81 -0
  101. package/skills/use-elements/references/styling.md +70 -0
  102. package/skills/use-elements/references/workspace.md +3 -3
  103. package/dist/categorical-values-DZLGQVW1.js +0 -63
  104. package/dist/chart-navigation-BAbb5PV9.js +0 -154
  105. package/dist/header-styles-COxCYFZx.js +0 -90
  106. package/dist/packages/charts/src/chart-navigation.d.ts +0 -39
  107. package/dist/packages/charts/src/chart-surface.d.ts +0 -27
  108. package/dist/packages/navigation/src/route-link.d.ts +0 -2
  109. package/dist/plot-width-CIqBiHcd.js +0 -105
  110. package/dist/src-Bk7M67zy.js +0 -396
@@ -1,12 +1,13 @@
1
1
  import { a as e, n as t, r as n } from "./control-styles-D3q_Qyxi.js";
2
2
  import { n as r } from "./accessibility-P89UG9-r.js";
3
3
  import * as i from "@stylexjs/stylex";
4
- import { jsx as a } from "react/jsx-runtime";
5
- import { Field as o, FieldControl as s, FieldDescription as c, FieldError as l, FieldLabel as u } from "@ui-sdk/react/field";
6
- import { Input as d } from "@ui-sdk/react/input";
7
- import { Textarea as f } from "@ui-sdk/react/textarea";
4
+ import { dispatch as a } from "@ui-sdk/core";
5
+ import { jsx as o } from "react/jsx-runtime";
6
+ import { Field as s, FieldControl as c, FieldDescription as l, FieldError as u, FieldLabel as d } from "@ui-sdk/react/field";
7
+ import { Input as f } from "@ui-sdk/react/input";
8
+ import { Textarea as p } from "@ui-sdk/react/textarea";
8
9
  // packages/forms/src/field-styles.ts
9
- var p = {
10
+ var m = {
10
11
  error: {
11
12
  kMwMTN: "xr5kp14",
12
13
  kGuDYH: "xy8obcc",
@@ -26,13 +27,13 @@ var p = {
26
27
  kHenm0: "xtt52l0",
27
28
  $$css: !0
28
29
  }
29
- }, m = {
30
+ }, h = {
30
31
  field: { field: { $$css: !0 } }.field,
31
32
  plain: n.plainTextarea
32
33
  };
33
34
  // packages/forms/src/forms.tsx
34
- function h({ className: e, style: t, xstyle: s, isSensitive: c = !1, ...l }) {
35
- return /* @__PURE__ */ a(o, {
35
+ function g({ className: e, style: t, xstyle: a, isSensitive: c = !1, ...l }) {
36
+ return /* @__PURE__ */ o(s, {
36
37
  ...l,
37
38
  ...c && {
38
39
  "data-agent-hidden": "",
@@ -41,13 +42,13 @@ function h({ className: e, style: t, xstyle: s, isSensitive: c = !1, ...l }) {
41
42
  ...r({
42
43
  className: e,
43
44
  style: t,
44
- styles: i.props(n.fieldRoot, s)
45
+ styles: i.props(n.fieldRoot, a)
45
46
  })
46
47
  });
47
48
  }
48
- function g({ className: e, style: t, ...o }) {
49
- return /* @__PURE__ */ a(u, {
50
- ...o,
49
+ function _({ className: e, style: t, ...a }) {
50
+ return /* @__PURE__ */ o(d, {
51
+ ...a,
51
52
  ...r({
52
53
  className: e,
53
54
  style: t,
@@ -55,9 +56,9 @@ function g({ className: e, style: t, ...o }) {
55
56
  })
56
57
  });
57
58
  }
58
- function _({ className: e, style: t, ...o }) {
59
- return /* @__PURE__ */ a(c, {
60
- ...o,
59
+ function v({ className: e, style: t, ...a }) {
60
+ return /* @__PURE__ */ o(l, {
61
+ ...a,
61
62
  ...r({
62
63
  className: e,
63
64
  style: t,
@@ -65,44 +66,52 @@ function _({ className: e, style: t, ...o }) {
65
66
  })
66
67
  });
67
68
  }
68
- function v({ className: e, style: t, ...n }) {
69
- return /* @__PURE__ */ a(l, {
69
+ function y({ className: e, style: t, ...n }) {
70
+ return /* @__PURE__ */ o(u, {
70
71
  ...n,
71
72
  ...r({
72
73
  className: e,
73
74
  style: t,
74
- styles: i.props(p.error)
75
+ styles: i.props(m.error)
75
76
  })
76
77
  });
77
78
  }
78
- var y = {
79
- Root: h,
80
- Label: g,
81
- Description: _,
82
- Error: v
79
+ var b = {
80
+ Root: g,
81
+ Label: _,
82
+ Description: v,
83
+ Error: y
83
84
  };
84
- function b(e) {
85
- return /* @__PURE__ */ a(S, { ...e });
86
- }
87
85
  function x(e) {
86
+ return /* @__PURE__ */ o(w, { ...e });
87
+ }
88
+ function S(e, t) {
89
+ if (e.defaultPrevented || t === void 0) return;
90
+ let { value: n } = e.currentTarget, r = { onReport: (e, r) => t(n, r) };
91
+ a({ options: () => r }, "onReport", null, {
92
+ reason: "input-change",
93
+ event: e.nativeEvent
94
+ });
95
+ }
96
+ function C(e) {
88
97
  return /(?:^|\s)(?:current-password|new-password|one-time-code|cc-[a-z-]+)(?:\s|$)/i.test(e ?? "");
89
98
  }
90
- function S({ density: o = "standard", isEmbedded: c = !1, isSensitive: l = !1, className: u, style: f, xstyle: p, value: m, defaultValue: h, onValueChange: g, onChange: _, ...v }) {
99
+ function w({ density: a = "standard", isEmbedded: s = !1, isSensitive: l = !1, className: u, style: d, xstyle: p, value: m, defaultValue: h, onValueChange: g, onChange: _, ...v }) {
91
100
  let y = r({
92
101
  className: u,
93
- style: f,
94
- styles: i.props(n.base, n.field, n.singleLineField, n.textFieldState, t[o], e[o], c && n.embedded, p)
102
+ style: d,
103
+ styles: i.props(n.base, n.field, n.singleLineField, n.textFieldState, t[a], e[a], s && n.embedded, p)
95
104
  });
96
- return l || v.type?.toLowerCase() === "password" || x(v.autoComplete) ? /* @__PURE__ */ a(s, {
105
+ return l || v.type?.toLowerCase() === "password" || C(v.autoComplete) ? /* @__PURE__ */ o(c, {
97
106
  ...v,
98
107
  ...y,
99
108
  "data-agent-hidden": "",
100
109
  value: m,
101
110
  defaultValue: h,
102
111
  onChange: (e) => {
103
- _?.(e), e.defaultPrevented || g?.(e.currentTarget.value);
112
+ _?.(e), S(e, g);
104
113
  }
105
- }) : /* @__PURE__ */ a(d, {
114
+ }) : /* @__PURE__ */ o(f, {
106
115
  ...v,
107
116
  ...y,
108
117
  ...m !== void 0 && { value: String(m) },
@@ -111,33 +120,33 @@ function S({ density: o = "standard", isEmbedded: c = !1, isSensitive: l = !1, c
111
120
  ...g !== void 0 && { onValueChange: g }
112
121
  });
113
122
  }
114
- function C({ isCompact: e = !1, shouldGrow: t = !1, appearance: o = "field", isSensitive: c = !1, className: l, style: u, xstyle: d, value: h, defaultValue: g, onValueChange: _, onChange: v, ...y }) {
123
+ function T({ isCompact: e = !1, shouldGrow: t = !1, appearance: a = "field", isSensitive: s = !1, className: l, style: u, xstyle: d, value: f, defaultValue: g, onValueChange: _, onChange: v, ...y }) {
115
124
  let b = r({
116
125
  className: l,
117
126
  style: u,
118
- styles: i.props(n.base, n.field, n.textFieldState, n.textarea, e && p.compactTextarea, t && p.growingTextarea, m[o], d)
127
+ styles: i.props(n.base, n.field, n.textFieldState, n.textarea, e && m.compactTextarea, t && m.growingTextarea, h[a], d)
119
128
  });
120
- return c || x(y.autoComplete) ? /* @__PURE__ */ a(s, {
129
+ return s || C(y.autoComplete) ? /* @__PURE__ */ o(c, {
121
130
  ...y.id !== void 0 && { id: y.id },
122
131
  ...y.name !== void 0 && { name: y.name },
123
- render: /* @__PURE__ */ a("textarea", {
132
+ render: /* @__PURE__ */ o("textarea", {
124
133
  ...y,
125
134
  "data-agent-hidden": "",
126
135
  className: b.className({}),
127
136
  style: b.style({}),
128
- value: h,
137
+ value: f,
129
138
  defaultValue: g,
130
139
  onChange: (e) => {
131
- v?.(e), e.defaultPrevented || _?.(e.currentTarget.value);
140
+ v?.(e), S(e, _);
132
141
  }
133
142
  })
134
- }) : /* @__PURE__ */ a(f, {
143
+ }) : /* @__PURE__ */ o(p, {
135
144
  ...y,
136
145
  ...b,
137
- ...h !== void 0 && { value: String(h) },
146
+ ...f !== void 0 && { value: String(f) },
138
147
  ...g !== void 0 && { defaultValue: String(g) },
139
148
  ...v !== void 0 && { onChange: v },
140
149
  ..._ !== void 0 && { onValueChange: _ }
141
150
  });
142
151
  }
143
- export { C as i, b as n, S as r, y as t };
152
+ export { T as i, x as n, w as r, b as t };
package/dist/forms.js CHANGED
@@ -1,3 +1,3 @@
1
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./src-gqEebHEa.js";
2
- import { i as _, n as v, t as y } from "./forms-DeU0Tiv3.js";
3
- export { a as AgentAvatarPicker, p as Checkbox, e as Combobox, y as Field, r as Fieldset, i as FilePicker, g as FormActions, c as FormStatus, v as Input, f as InputGroup, l as NumberField, s as RadioGroup, n as Select, m as SelectControl, u as SettingsRow, h as SettingsSection, o as Slider, t as Switch, _ as Textarea, d as ToggleGroup };
1
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _ } from "./src-1EHkSFS-.js";
2
+ import { i as v, n as y, t as b } from "./forms-CEbwzlRR.js";
3
+ export { e as AgentAvatarPicker, p as Checkbox, _ as Combobox, b as Field, f as Fieldset, i as FilePicker, r as FormActions, g as FormStatus, y as Input, l as InputGroup, o as NumberField, s as RadioGroup, t as SegmentedControl, c as Select, n as SelectControl, u as SettingsRow, h as SettingsSection, a as Slider, d as Switch, v as Textarea, m as ToggleGroup };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { g as Accordion, y as AgentAvatar, C as Avatar, t as Badge, w as Button, _ as Collapsible, u as Columns, T as ConfirmButton, v as CopyValue, d as Divider, n as Heading, E as IconButton, D as IconLink, r as Identifier, i as Muted, f as Panel, a as Prose, p as Row, l as SectionHeading, m as Stack, o as Status, s as Subheading, h as SurfaceLink, c as Text, O as TextButton, k as TextLink, b as agentAppearance, x as agentAvatarColors, S as agentAvatarShapes } from "./src-DcW_gMX8.js";
1
+ export { _ as Accordion, b as AgentAvatar, w as Avatar, t as Badge, T as Button, v as Collapsible, d as Columns, E as ConfirmButton, y as CopyValue, f as Divider, n as Heading, D as IconButton, O as IconLink, r as Identifier, i as Muted, p as Panel, a as Prose, j as RouteLink, m as Row, l as SectionHeading, h as Stack, o as Status, s as Subheading, g as SurfaceLink, c as Text, k as TextButton, A as TextLink, x as agentAppearance, S as agentAvatarColors, C as agentAvatarShapes } from "./src-CpdJlDhO.js";