@mechane-ai/elements 0.4.1 → 0.5.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.
- package/README.md +38 -29
- package/dist/ai.js +6 -6
- package/dist/assets/stylex.css +92 -0
- package/dist/{categorical-values-cMX7Mykq.js → categorical-values-BfAEQUd0.js} +1 -1
- package/dist/{chart-input-qnM44oen.js → chart-input--VSrlMl-.js} +1 -1
- package/dist/charts/cartesian.js +49 -49
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +2 -2
- package/dist/charts/matrix.js +1 -1
- package/dist/collections.js +439 -214
- package/dist/content/diff.js +13 -11
- package/dist/content/markdown.js +151 -80
- package/dist/content/tree.js +1 -1
- package/dist/csp.js +1 -0
- package/dist/feedback.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/layout.js +210 -136
- package/dist/navigation/commands.js +1 -1
- package/dist/navigation.js +36 -11
- package/dist/packages/collections/src/collection-scroll.d.ts +19 -0
- package/dist/packages/collections/src/data-table.d.ts +20 -3
- package/dist/packages/collections/src/index.d.ts +3 -1
- package/dist/packages/collections/src/use-end-reached.d.ts +9 -0
- package/dist/packages/content/src/markdown/index.d.ts +2 -0
- package/dist/packages/content/src/markdown/markdown-options.d.ts +2 -0
- package/dist/packages/content/src/markdown/markdown-preview.d.ts +5 -0
- package/dist/packages/content/src/markdown/markdown.d.ts +4 -1
- package/dist/packages/feedback/src/async-region.d.ts +17 -0
- package/dist/packages/feedback/src/index.d.ts +2 -0
- package/dist/packages/feedback/src/skeleton.d.ts +4 -3
- package/dist/packages/forms/src/index.d.ts +2 -0
- package/dist/packages/forms/src/settings-section.d.ts +7 -0
- package/dist/packages/foundations/src/csp/index.d.ts +2 -0
- package/dist/packages/layout/src/app-shell.d.ts +2 -1
- package/dist/packages/layout/src/frame.stylex.d.ts +2 -0
- package/dist/packages/layout/src/index.d.ts +2 -0
- package/dist/packages/layout/src/record-page.d.ts +42 -0
- package/dist/packages/layout/src/sidebar.d.ts +1 -0
- package/dist/packages/navigation/src/index.d.ts +2 -0
- package/dist/packages/navigation/src/page-navigation.d.ts +14 -0
- package/dist/{pierre-tree-qZVvI5c1.js → pierre-tree-LY7PGy-7.js} +1 -1
- package/dist/src-CbJTK9oP.js +360 -0
- package/dist/{src-CvpS9XIR.js → src-CjnbzSgq.js} +353 -336
- package/package.json +5 -1
- package/dist/src-BfvOOeA3.js +0 -272
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mechane-ai/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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": {
|
|
@@ -117,6 +117,10 @@
|
|
|
117
117
|
"types": "./dist/packages/foundations/src/theme.d.ts",
|
|
118
118
|
"import": "./dist/theme.js"
|
|
119
119
|
},
|
|
120
|
+
"./csp": {
|
|
121
|
+
"types": "./dist/packages/foundations/src/csp/index.d.ts",
|
|
122
|
+
"import": "./dist/csp.js"
|
|
123
|
+
},
|
|
120
124
|
"./tokens": {
|
|
121
125
|
"types": "./dist/packages/foundations/src/tokens.stylex.d.ts",
|
|
122
126
|
"import": "./dist/tokens.js"
|
package/dist/src-BfvOOeA3.js
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { i as e, s as t } from "./src-CbYaLvhD.js";
|
|
2
|
-
import { t as n } from "./accessibility-C-aIZ1Yx.js";
|
|
3
|
-
import { n as r, t as i } from "./popup-styles-CvtZDE2t.js";
|
|
4
|
-
import { t as a } from "./style-composition-uYlczSsB.js";
|
|
5
|
-
import { mergeProps as o } from "@base-ui/react/merge-props";
|
|
6
|
-
import * as s from "@stylexjs/stylex";
|
|
7
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
-
import { Box as u, LoaderCircle as d } from "lucide-react";
|
|
9
|
-
import { Meter as f } from "@base-ui/react/meter";
|
|
10
|
-
import { Progress as p } from "@base-ui/react/progress";
|
|
11
|
-
import { Toast as m } from "@base-ui/react/toast";
|
|
12
|
-
// packages/feedback/src/feedback.tsx
|
|
13
|
-
function h({ title: n, children: r, action: i, ...a }) {
|
|
14
|
-
return /* @__PURE__ */ l("div", {
|
|
15
|
-
...o({ className: "x78zum5 xdt5ytf x6s0dn4 xl56j7k x2b8uid x1iefggq xnx3t7k x1n8ia3y x1hz01jw xvmahel" }, a),
|
|
16
|
-
children: [
|
|
17
|
-
/* @__PURE__ */ c(u, {
|
|
18
|
-
size: 22,
|
|
19
|
-
"aria-hidden": !0,
|
|
20
|
-
className: "x153jb6y x1kk91vl"
|
|
21
|
-
}),
|
|
22
|
-
/* @__PURE__ */ c(t, { children: n }),
|
|
23
|
-
/* @__PURE__ */ c(e, { children: r }),
|
|
24
|
-
i
|
|
25
|
-
]
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
function g({ error: e = !1, ...t }) {
|
|
29
|
-
return /* @__PURE__ */ c("div", { ...o({ role: e ? "alert" : "status" }, {
|
|
30
|
-
0: { className: "xp59q4u x1doqdfy x1ok0vyi x1hz01jw xvmahel xtqrqnz x1778rvt x1dqe72f x1f9ixgr xj0a0fe" },
|
|
31
|
-
1: { className: "xp59q4u x1doqdfy x1ok0vyi x1hz01jw xvmahel xtqrqnz x1778rvt xj0a0fe xr5kp14 xcqwzn" }
|
|
32
|
-
}[!!e | 0], t) });
|
|
33
|
-
}
|
|
34
|
-
// packages/feedback/src/skeleton.tsx
|
|
35
|
-
var _ = {
|
|
36
|
-
skeleton: {
|
|
37
|
-
k1xSpc: "x1lliihq",
|
|
38
|
-
ks0D6T: "x193iq5w",
|
|
39
|
-
kWkggS: "x1r7kqkb",
|
|
40
|
-
kaIpWk: "x1ok0vyi",
|
|
41
|
-
kmuXW: "x2lah0s",
|
|
42
|
-
$$css: !0
|
|
43
|
-
},
|
|
44
|
-
dimensions: (e, t) => [{
|
|
45
|
-
kzqmXN: e == null ? e : "x5lhr3w",
|
|
46
|
-
kZKoxP: t == null ? t : "x16ye13r",
|
|
47
|
-
$$css: !0
|
|
48
|
-
}, {
|
|
49
|
-
"--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
|
|
50
|
-
"--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
|
|
51
|
-
}],
|
|
52
|
-
circle: {
|
|
53
|
-
kaIpWk: "x16rqkct",
|
|
54
|
-
$$css: !0
|
|
55
|
-
},
|
|
56
|
-
rectangle: { $$css: !0 }
|
|
57
|
-
}, v = {
|
|
58
|
-
rectangle: _.rectangle,
|
|
59
|
-
circle: _.circle
|
|
60
|
-
};
|
|
61
|
-
function y({ width: e = "100%", height: t = 8, shape: n = "rectangle" }) {
|
|
62
|
-
return /* @__PURE__ */ c("span", {
|
|
63
|
-
"aria-hidden": !0,
|
|
64
|
-
...s.props(_.skeleton, _.dimensions(e, t), v[n])
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function b({ lines: e = 3 }) {
|
|
68
|
-
return /* @__PURE__ */ c("div", {
|
|
69
|
-
"aria-hidden": !0,
|
|
70
|
-
className: "x78zum5 xdt5ytf x1hnptsi xh8yej3",
|
|
71
|
-
children: Array.from({ length: e }, (t, n) => /* @__PURE__ */ c(y, { width: n === e - 1 ? "65%" : "100%" }, `placeholder-${n}`))
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
function x({ label: e, showLabel: t = !1 }) {
|
|
75
|
-
return /* @__PURE__ */ l("span", {
|
|
76
|
-
role: "status",
|
|
77
|
-
className: "x3nfvp2 x1n2onr6 x6s0dn4 x1hnptsi x153jb6y x1hz01jw xtqrqnz x1778rvt",
|
|
78
|
-
children: [/* @__PURE__ */ c(d, {
|
|
79
|
-
"aria-hidden": !0,
|
|
80
|
-
className: "xtwnzbg x18utl2x x2lah0s"
|
|
81
|
-
}), /* @__PURE__ */ c("span", {
|
|
82
|
-
...s.props(!t && n.hidden),
|
|
83
|
-
children: e
|
|
84
|
-
})]
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
// packages/feedback/src/loading.tsx
|
|
88
|
-
function S({ label: e, shape: t = "rows" }) {
|
|
89
|
-
return /* @__PURE__ */ l("div", {
|
|
90
|
-
role: "status",
|
|
91
|
-
className: "xeuugli x1n2onr6",
|
|
92
|
-
children: [/* @__PURE__ */ c("span", {
|
|
93
|
-
...s.props(n.hidden),
|
|
94
|
-
children: e
|
|
95
|
-
}), t === "rows" ? /* @__PURE__ */ l("div", {
|
|
96
|
-
"aria-hidden": !0,
|
|
97
|
-
children: [/* @__PURE__ */ c("div", {
|
|
98
|
-
className: "xrvj5dj x18zg5m9 x18hwk67 x6s0dn4 x1m92p3w xu0aao5 xso031l x1q0q8m5 x1qndepd",
|
|
99
|
-
children: /* @__PURE__ */ c(y, { width: 54 })
|
|
100
|
-
}), [
|
|
101
|
-
0,
|
|
102
|
-
1,
|
|
103
|
-
2
|
|
104
|
-
].map((e) => /* @__PURE__ */ l("div", {
|
|
105
|
-
className: "xrvj5dj x18zg5m9 x18hwk67 x6s0dn4 xse5ku5 x1m92p3w",
|
|
106
|
-
children: [
|
|
107
|
-
/* @__PURE__ */ c(y, { width: e === 1 ? 108 : 174 }),
|
|
108
|
-
/* @__PURE__ */ c(y, { width: 54 }),
|
|
109
|
-
/* @__PURE__ */ c(y, { width: 108 })
|
|
110
|
-
]
|
|
111
|
-
}, e))]
|
|
112
|
-
}) : /* @__PURE__ */ l("div", {
|
|
113
|
-
"aria-hidden": !0,
|
|
114
|
-
className: "xrvj5dj x1c1vhfx x1xn8qrt",
|
|
115
|
-
children: [
|
|
116
|
-
/* @__PURE__ */ c(y, {
|
|
117
|
-
width: 216,
|
|
118
|
-
height: 24
|
|
119
|
-
}),
|
|
120
|
-
/* @__PURE__ */ c(y, { width: 174 }),
|
|
121
|
-
/* @__PURE__ */ c(y, { width: 108 })
|
|
122
|
-
]
|
|
123
|
-
})]
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
// packages/feedback/src/progress.tsx
|
|
127
|
-
function C({ label: e, value: t, max: n, valueLabel: r }) {
|
|
128
|
-
return /* @__PURE__ */ l(p.Root, {
|
|
129
|
-
value: t,
|
|
130
|
-
max: n,
|
|
131
|
-
locale: "en-US",
|
|
132
|
-
getAriaValueText: () => r,
|
|
133
|
-
className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xbixft",
|
|
134
|
-
children: [/* @__PURE__ */ l("div", {
|
|
135
|
-
className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
|
|
136
|
-
children: [/* @__PURE__ */ c(p.Label, { children: e }), /* @__PURE__ */ c("span", {
|
|
137
|
-
className: "x153jb6y xss6m8b",
|
|
138
|
-
children: r
|
|
139
|
-
})]
|
|
140
|
-
}), /* @__PURE__ */ c(p.Track, {
|
|
141
|
-
...{
|
|
142
|
-
0: { className: "xqu0tyb xh8yej3 x1ok0vyi x1fa40ue xb3r6kr" },
|
|
143
|
-
1: { className: "xqu0tyb xh8yej3 x1ok0vyi xb3r6kr x1r7kqkb xmkeg23 xbsl7fq xqrc7c3 x9f619" }
|
|
144
|
-
}[t === null | 0],
|
|
145
|
-
children: t !== null && /* @__PURE__ */ c(p.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
|
|
146
|
-
})]
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
function w({ label: e, value: t, max: n, valueLabel: r }) {
|
|
150
|
-
return t === null ? /* @__PURE__ */ l("div", {
|
|
151
|
-
className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xbixft",
|
|
152
|
-
children: [/* @__PURE__ */ l("div", {
|
|
153
|
-
className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
|
|
154
|
-
children: [/* @__PURE__ */ c("span", { children: e }), /* @__PURE__ */ c("span", {
|
|
155
|
-
className: "x153jb6y xss6m8b",
|
|
156
|
-
children: r
|
|
157
|
-
})]
|
|
158
|
-
}), /* @__PURE__ */ c("div", {
|
|
159
|
-
"aria-hidden": !0,
|
|
160
|
-
className: "xqu0tyb xh8yej3 x1ok0vyi xb3r6kr x1r7kqkb xmkeg23 xbsl7fq xqrc7c3 x9f619"
|
|
161
|
-
})]
|
|
162
|
-
}) : /* @__PURE__ */ l(f.Root, {
|
|
163
|
-
value: t,
|
|
164
|
-
max: n,
|
|
165
|
-
locale: "en-US",
|
|
166
|
-
getAriaValueText: () => r,
|
|
167
|
-
className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xbixft",
|
|
168
|
-
children: [/* @__PURE__ */ l("div", {
|
|
169
|
-
className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
|
|
170
|
-
children: [/* @__PURE__ */ c(f.Label, { children: e }), /* @__PURE__ */ c("span", {
|
|
171
|
-
className: "x153jb6y xss6m8b",
|
|
172
|
-
children: r
|
|
173
|
-
})]
|
|
174
|
-
}), /* @__PURE__ */ c(f.Track, {
|
|
175
|
-
className: "xqu0tyb xh8yej3 x1ok0vyi x1fa40ue xb3r6kr",
|
|
176
|
-
children: /* @__PURE__ */ c(f.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
|
|
177
|
-
})]
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
// packages/feedback/src/toast.tsx
|
|
181
|
-
var T = {
|
|
182
|
-
focus: {
|
|
183
|
-
kPJHz1: "x13qnu6",
|
|
184
|
-
k7shQP: "x9v5kkp",
|
|
185
|
-
kZs9gx: "x19rmrnh",
|
|
186
|
-
kiEn40: "x1bqaal",
|
|
187
|
-
$$css: !0
|
|
188
|
-
},
|
|
189
|
-
root: {
|
|
190
|
-
kzqmXN: "xh8yej3",
|
|
191
|
-
kmVPX3: "x1c8xbx5",
|
|
192
|
-
k3aq6I: "x1j8b0r",
|
|
193
|
-
kOpbMr: "xmeywwb",
|
|
194
|
-
$$css: !0
|
|
195
|
-
},
|
|
196
|
-
title: {
|
|
197
|
-
kGuDYH: "xtqrqnz",
|
|
198
|
-
kLWn49: "x1778rvt",
|
|
199
|
-
k63SB2: "xk50ysn",
|
|
200
|
-
$$css: !0
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
function E({ className: e, style: t, ...n }) {
|
|
204
|
-
return /* @__PURE__ */ c(m.Viewport, {
|
|
205
|
-
...n,
|
|
206
|
-
...a({
|
|
207
|
-
className: e,
|
|
208
|
-
style: t,
|
|
209
|
-
styles: { className: "xixxii4 x640wxr xsygj64 xb912zn x78zum5 xdt5ytf x1hnptsi x147k7ee xy2oaap x1odjw0f xish69e x1k57tk5 x13qnu6 x9v5kkp x19rmrnh x1bqaal" }
|
|
210
|
-
})
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
function D({ className: e, style: t, ...n }) {
|
|
214
|
-
return /* @__PURE__ */ c(m.Root, {
|
|
215
|
-
...n,
|
|
216
|
-
...a({
|
|
217
|
-
className: e,
|
|
218
|
-
style: t,
|
|
219
|
-
styles: s.props(i.surface, T.root, T.focus)
|
|
220
|
-
})
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
function O({ className: e, style: t, ...n }) {
|
|
224
|
-
return /* @__PURE__ */ c(m.Content, {
|
|
225
|
-
...n,
|
|
226
|
-
...a({
|
|
227
|
-
className: e,
|
|
228
|
-
style: t,
|
|
229
|
-
styles: { className: "x78zum5 xdt5ytf x1hnptsi" }
|
|
230
|
-
})
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
function k({ className: e, style: t, ...n }) {
|
|
234
|
-
return /* @__PURE__ */ c(m.Title, {
|
|
235
|
-
...n,
|
|
236
|
-
...a({
|
|
237
|
-
className: e,
|
|
238
|
-
style: t,
|
|
239
|
-
styles: s.props(r.title, T.title)
|
|
240
|
-
})
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
function A({ className: e, style: t, ...n }) {
|
|
244
|
-
return /* @__PURE__ */ c(m.Description, {
|
|
245
|
-
...n,
|
|
246
|
-
...a({
|
|
247
|
-
className: e,
|
|
248
|
-
style: t,
|
|
249
|
-
styles: s.props(r.description)
|
|
250
|
-
})
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
function j(e) {
|
|
254
|
-
return /* @__PURE__ */ c(m.Close, {
|
|
255
|
-
"aria-hidden": !1,
|
|
256
|
-
...e
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
var M = {
|
|
260
|
-
Provider: m.Provider,
|
|
261
|
-
Portal: m.Portal,
|
|
262
|
-
Viewport: E,
|
|
263
|
-
Root: D,
|
|
264
|
-
Content: O,
|
|
265
|
-
Title: k,
|
|
266
|
-
Description: A,
|
|
267
|
-
Close: j,
|
|
268
|
-
Action: m.Action,
|
|
269
|
-
useManager: m.useToastManager,
|
|
270
|
-
createManager: m.createToastManager
|
|
271
|
-
};
|
|
272
|
-
export { y as a, h as c, S as i, g as l, w as n, b as o, C as r, x as s, M as t };
|