@mechane-ai/elements 0.19.0 → 0.20.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.
- package/README.md +15 -4
- package/dist/ai.js +4 -4
- package/dist/{categorical-values-D-sSI9JB.js → categorical-values-DG0kzYxN.js} +2 -2
- package/dist/{chart-frame-vwS7YVgv.js → chart-frame-DxAZ0h_q.js} +50 -51
- package/dist/{chart-input-D6Fw2UGV.js → chart-input-Dru0GScv.js} +2 -2
- package/dist/charts/cartesian.js +279 -229
- package/dist/charts/distribution.js +2 -2
- package/dist/charts/graph.js +82 -80
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +136 -134
- package/dist/charts/timeline.js +2 -2
- package/dist/charts.js +1 -1
- package/dist/code-block-DlUwVaPP.js +182 -0
- package/dist/collections.js +144 -143
- package/dist/{constants.stylex-bbdiv1fD.js → constants.stylex-BILvnwUk.js} +1 -0
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +108 -102
- package/dist/content/tree.js +43 -41
- package/dist/{content-link-rdxJ94P8.js → content-link-BIMrgXbz.js} +1 -1
- package/dist/content.js +139 -137
- package/dist/elements.css +34 -0
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +349 -212
- package/dist/navigation/commands.js +1 -1
- package/dist/navigation.js +0 -1
- package/dist/packages/charts/src/chart-cursor.d.ts +7 -0
- package/dist/packages/charts/src/chart-theme.d.ts +1 -7
- package/dist/packages/feedback/src/async-region.d.ts +3 -1
- package/dist/packages/foundations/src/constants.stylex.d.ts +1 -0
- package/dist/packages/foundations/src/use-scroll-tab-index.d.ts +6 -0
- package/dist/packages/layout/src/app-shell.d.ts +2 -1
- package/dist/packages/layout/src/index.d.ts +2 -0
- package/dist/packages/layout/src/navigation-rail.d.ts +18 -0
- package/dist/packages/layout/src/sidebar.d.ts +2 -1
- package/dist/pierre-diff-CHQsoQSZ.js +72 -0
- package/dist/{pierre-theme-BUeJim8s.js → pierre-theme-CLgk9v3e.js} +1 -1
- package/dist/{pierre-tree-BQBbAhmI.js → pierre-tree-D3XsgEH6.js} +4 -4
- package/dist/{src-BVsyKLQ8.js → src-0mocxTaR.js} +64 -43
- package/dist/{src-Dven_9lR.js → src-D4zPPr32.js} +1 -1
- package/dist/{src-BXh4g2VY.js → src-qU5Z5LRH.js} +1 -0
- package/dist/tokens.js +1 -1
- package/dist/use-scroll-tab-index-Dxpdh4W7.js +45 -0
- package/package.json +1 -1
- package/packages/foundations/src/constants.stylex.ts +1 -1
- package/dist/code-block-DB42-a0M.js +0 -180
- package/dist/pierre-diff-C_j0nxwS.js +0 -71
package/README.md
CHANGED
|
@@ -95,9 +95,13 @@ asynchronous work and pass its pending, success, or failure state to controls.
|
|
|
95
95
|
Use `ToolbarAction` for page-header actions, including links composed with `render`. A clipboard action can compose
|
|
96
96
|
`CopyValue render={<ToolbarAction />}`; the rendered control owns its appearance and CopyValue owns copy feedback. Use
|
|
97
97
|
`Row` for aligned inline actions, `Stack` for related content, and `RecordPage.Content` for separated page sections.
|
|
98
|
-
Detail titles wrap; list metadata truncates. Sidebar items share contiguous hit areas.
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
Detail titles wrap; list metadata truncates. Sidebar items share contiguous hit areas. Supply `AppShell` with a
|
|
99
|
+
`NavigationRail` in its `rail` slot for persistent area links and an optional action. It occupies 48px of the 240px
|
|
100
|
+
navigation budget beside a 192px contextual sidebar. Collapsing hides the contextual sidebar and retains the rail. The
|
|
101
|
+
phone drawer renders those area links with visible labels above its pages. Applications supply selection, URLs, native
|
|
102
|
+
link handlers, and action callbacks. Omit the rail for a sidebar that collapses to page icons.
|
|
103
|
+
`SidebarFooter layout="navigation"` holds persistent controls in the contextual sidebar and reserves their intrinsic
|
|
104
|
+
height while its pages scroll independently.
|
|
101
105
|
|
|
102
106
|
Navigation closes the mobile drawer and preserves focus set by the destination. Use
|
|
103
107
|
`NavigationItem shouldCloseOnActivate={false}` for menu triggers.
|
|
@@ -106,7 +110,10 @@ Navigation closes the mobile drawer and preserves focus set by the destination.
|
|
|
106
110
|
inactive content mounted and measurable but removes it from keyboard and assistive-technology navigation. The
|
|
107
111
|
application owns which view is active and when to unmount it; use this for a draft or reading position that must survive
|
|
108
112
|
inspection. `WorkbenchScroll` requires an accessible `label`; its `isFlush` mode leaves list insets to the table. Its
|
|
109
|
-
`scrollRestorationId` identifies the actual scroll region for application-owned restoration.
|
|
113
|
+
`scrollRestorationId` identifies the actual scroll region for application-owned restoration. Layout wrappers leave
|
|
114
|
+
sequential keyboard navigation to their controls. Tables and viewers add a named scroll stop when overflow needs one.
|
|
115
|
+
Interactive Cartesian charts have one Tab stop, a local datum cursor, and arrow-key inspection. Enter or Space activates
|
|
116
|
+
supplied selection; Escape dismisses details while retaining the cursor.
|
|
110
117
|
|
|
111
118
|
`Workbench` accepts an optional `inspector={{ label: 'Workspace', content: <WorkspaceFiles /> }}`. The application
|
|
112
119
|
supplies the accessible name with the panel content and owns opening, closing, and focus restoration. The inspector
|
|
@@ -191,6 +198,10 @@ Use `AsyncRegion` from `/feedback` with an explicit `pending`, `ready`, or `fail
|
|
|
191
198
|
80ms; ready-at-mount and failed content appear immediately. Reduced motion removes the fades. There is no minimum
|
|
192
199
|
loading duration, and ordinary callers do not configure timing.
|
|
193
200
|
|
|
201
|
+
For a photo or image, set `presentation="image"` to show its placeholder immediately and reveal the ready image in
|
|
202
|
+
200ms. Ready-at-mount images keep full opacity, including cached revisits. The supplied state covers the application's
|
|
203
|
+
fetch and decode, and the reduced-motion preference removes the transition.
|
|
204
|
+
|
|
194
205
|
Wrap a page in `LoadingScope` and pass its navigation `identity` to share one clock across dependent reads. Updating the
|
|
195
206
|
identity resets pending presentation without remounting ready children. Use `initialStartedAt` only to preserve elapsed
|
|
196
207
|
document loading time at hydration; later identities start their own clock. Keep refreshes in the ready state and retain
|
package/dist/ai.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as e, E as t, O as n, T as r, f as i, g as a, p as o, t as s, w as c } from "./src-
|
|
2
|
-
import { t as l } from "./content-link-
|
|
1
|
+
import { C as e, E as t, O as n, T as r, f as i, g as a, p as o, t as s, w as c } from "./src-qU5Z5LRH.js";
|
|
2
|
+
import { t as l } from "./content-link-BIMrgXbz.js";
|
|
3
3
|
import { r as u, t as d } from "./src-d7EAi61b.js";
|
|
4
|
-
import { c as f, d as p } from "./src-
|
|
5
|
-
import { c as m, u as h } from "./src-
|
|
4
|
+
import { c as f, d as p } from "./src-0mocxTaR.js";
|
|
5
|
+
import { c as m, u as h } from "./src-D4zPPr32.js";
|
|
6
6
|
import { t as g } from "./accessibility-C-aIZ1Yx.js";
|
|
7
7
|
import { t as _ } from "./visible-motion-1GcUaEi4.js";
|
|
8
8
|
import * as v from "@stylexjs/stylex";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e, s as t } from "./chart-frame-
|
|
2
|
-
import { n } from "./chart-input-
|
|
1
|
+
import { n as e, s as t } from "./chart-frame-DxAZ0h_q.js";
|
|
2
|
+
import { n } from "./chart-input-Dru0GScv.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,20 +1,21 @@
|
|
|
1
|
-
import { g as e } from "./src-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { g as e } from "./src-qU5Z5LRH.js";
|
|
2
|
+
import { t } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
3
|
+
import { n, r } from "./tokens.stylex-DTHHFbyl.js";
|
|
4
|
+
import * as i from "@stylexjs/stylex";
|
|
5
|
+
import { useId as a } from "react";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
7
|
// packages/charts/src/chart-theme.ts
|
|
7
|
-
var
|
|
8
|
-
series1:
|
|
9
|
-
series2:
|
|
10
|
-
series3:
|
|
11
|
-
series4:
|
|
12
|
-
series5:
|
|
13
|
-
series6:
|
|
14
|
-
positive:
|
|
15
|
-
negative:
|
|
16
|
-
neutral:
|
|
17
|
-
},
|
|
8
|
+
var c = {
|
|
9
|
+
series1: n.series1,
|
|
10
|
+
series2: n.series2,
|
|
11
|
+
series3: n.series3,
|
|
12
|
+
series4: n.series4,
|
|
13
|
+
series5: n.series5,
|
|
14
|
+
series6: n.series6,
|
|
15
|
+
positive: n.positive,
|
|
16
|
+
negative: n.negative,
|
|
17
|
+
neutral: r.muted
|
|
18
|
+
}, l = {
|
|
18
19
|
plot: {
|
|
19
20
|
k7Eaqz: "xeuugli",
|
|
20
21
|
kVQacm: "xb3r6kr",
|
|
@@ -58,82 +59,78 @@ var s = {
|
|
|
58
59
|
kREpy8: "x13efnbd",
|
|
59
60
|
$$css: !0
|
|
60
61
|
},
|
|
61
|
-
|
|
62
|
+
inspectable: {
|
|
62
63
|
k3XXqK: "x1t137rt",
|
|
63
|
-
kZs9gx: "x19rmrnh",
|
|
64
|
-
k7shQP: "x9v5kkp",
|
|
65
|
-
kPJHz1: "x13qnu6",
|
|
66
|
-
kiEn40: "x17c0hmk",
|
|
67
64
|
$$css: !0
|
|
68
65
|
}
|
|
69
|
-
},
|
|
66
|
+
}, u = {
|
|
70
67
|
kzqmXN: "x1xc55vz",
|
|
71
68
|
kZKoxP: "xdk7pt",
|
|
72
69
|
kmuXW: "x2lah0s",
|
|
73
70
|
$$css: !0
|
|
74
|
-
},
|
|
75
|
-
|
|
71
|
+
}, d = { swatch: (e) => [
|
|
72
|
+
u,
|
|
76
73
|
{
|
|
77
74
|
kWkggS: e == null ? e : "xl8spv7",
|
|
78
75
|
$$css: !0
|
|
79
76
|
},
|
|
80
77
|
{ "--x-backgroundColor": e ?? void 0 }
|
|
81
78
|
] };
|
|
82
|
-
function
|
|
83
|
-
let c =
|
|
84
|
-
return /* @__PURE__ */
|
|
79
|
+
function f({ title: e, description: t, children: n, actions: r, footer: i }) {
|
|
80
|
+
let c = a();
|
|
81
|
+
return /* @__PURE__ */ s("figure", {
|
|
85
82
|
"aria-labelledby": c,
|
|
86
83
|
className: "xeuugli x1ghz6dp xbixft xpvm0e4 x1hz01jw xtqrqnz xj57cvi x1778rvt",
|
|
87
84
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ s("figcaption", {
|
|
89
86
|
className: "x78zum5 x1a02dak x1qughib x7a106z x1n8ia3y x1wv5www",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ s("div", {
|
|
91
88
|
className: "x1iv9x3n xeuugli xj0a0fe",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ o("p", {
|
|
93
90
|
id: c,
|
|
94
91
|
className: "x1ghz6dp x12myhf4 x1778rvt xk4h15q",
|
|
95
92
|
children: e
|
|
96
|
-
}), t !== void 0 && /* @__PURE__ */
|
|
93
|
+
}), t !== void 0 && /* @__PURE__ */ o("p", {
|
|
97
94
|
className: "x1ghz6dp x1c87qhr x153jb6y xy8obcc xas2l8k",
|
|
98
95
|
children: t
|
|
99
96
|
})]
|
|
100
|
-
}), r !== void 0 && /* @__PURE__ */
|
|
97
|
+
}), r !== void 0 && /* @__PURE__ */ o("div", {
|
|
101
98
|
className: "x78zum5 x1a02dak x1hnptsi x193iq5w",
|
|
102
99
|
children: r
|
|
103
100
|
})]
|
|
104
101
|
}),
|
|
105
102
|
n,
|
|
106
|
-
|
|
103
|
+
i !== void 0 && /* @__PURE__ */ o("div", {
|
|
107
104
|
className: "x1xxf3xd xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
108
|
-
children:
|
|
105
|
+
children: i
|
|
109
106
|
})
|
|
110
107
|
]
|
|
111
108
|
});
|
|
112
109
|
}
|
|
113
|
-
function
|
|
114
|
-
return /* @__PURE__ */
|
|
110
|
+
function p({ items: e, label: t = "Legend", isScrollable: n = !1 }) {
|
|
111
|
+
return /* @__PURE__ */ o("ul", {
|
|
115
112
|
"aria-label": t,
|
|
116
113
|
...{
|
|
117
114
|
0: { className: "x78zum5 x1a02dak x8zbtdt x1gkm1c7 xe8uvvx x1ghz6dp x1717udv x153jb6y x1hz01jw xy8obcc xas2l8k" },
|
|
118
115
|
1: { className: "x78zum5 x8zbtdt x1gkm1c7 xe8uvvx x1ghz6dp x1717udv x153jb6y x1hz01jw xy8obcc xas2l8k xozqiw3 xw2csxc x1mqbd49" }
|
|
119
116
|
}[!!n | 0],
|
|
120
|
-
children: e.map((e) => /* @__PURE__ */
|
|
117
|
+
children: e.map((e) => /* @__PURE__ */ s("li", {
|
|
121
118
|
...{
|
|
122
119
|
0: { className: "x3nfvp2 x6s0dn4 xunmzkg xeuugli x193iq5w xj0a0fe" },
|
|
123
120
|
1: { className: "x3nfvp2 x6s0dn4 xunmzkg xeuugli xj0a0fe x2lah0s x1x1rfll xuxw1ft" }
|
|
124
121
|
}[!!n | 0],
|
|
125
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ o("span", {
|
|
126
123
|
"aria-hidden": !0,
|
|
127
|
-
...
|
|
124
|
+
...i.props(d.swatch(c[e.tone]))
|
|
128
125
|
}), e.label]
|
|
129
126
|
}, e.id))
|
|
130
127
|
});
|
|
131
128
|
}
|
|
132
|
-
function
|
|
133
|
-
return n === void 0 ? /* @__PURE__ */
|
|
129
|
+
function m({ label: e, isSelected: t = !1, onSelect: n, children: r }) {
|
|
130
|
+
return n === void 0 ? /* @__PURE__ */ o("div", {
|
|
134
131
|
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r x17oiadl x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b",
|
|
135
132
|
children: r
|
|
136
|
-
}) : /* @__PURE__ */
|
|
133
|
+
}) : /* @__PURE__ */ o("button", {
|
|
137
134
|
type: "button",
|
|
138
135
|
"aria-label": e,
|
|
139
136
|
"aria-pressed": t,
|
|
@@ -145,23 +142,25 @@ function p({ label: e, isSelected: t = !1, onSelect: n, children: r }) {
|
|
|
145
142
|
children: r
|
|
146
143
|
});
|
|
147
144
|
}
|
|
148
|
-
function
|
|
149
|
-
return /* @__PURE__ */
|
|
145
|
+
function h({ children: e }) {
|
|
146
|
+
return /* @__PURE__ */ o("p", {
|
|
150
147
|
"aria-live": "polite",
|
|
151
148
|
className: "x1ghz6dp xeuugli x1mqbd49 xbixft xy8obcc xas2l8k xss6m8b xj0a0fe",
|
|
152
149
|
children: e
|
|
153
150
|
});
|
|
154
151
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
152
|
+
function g({ children: n, label: r = "View data" }) {
|
|
153
|
+
let i = t();
|
|
154
|
+
return /* @__PURE__ */ o("div", {
|
|
157
155
|
className: "x1xxf3xd x178xt8z x13fuv20 xhjagg4",
|
|
158
|
-
children: /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ s(e.Root, { children: [/* @__PURE__ */ o(e.Trigger, { children: r }), /* @__PURE__ */ o(e.Panel, { children: /* @__PURE__ */ o("div", {
|
|
157
|
+
ref: i.ref,
|
|
159
158
|
role: "region",
|
|
160
|
-
"aria-label":
|
|
161
|
-
tabIndex:
|
|
159
|
+
"aria-label": r,
|
|
160
|
+
tabIndex: i.tabIndex,
|
|
162
161
|
className: "xeuugli x1sslpiy xysyzu8 x1t137rt x19rmrnh x9v5kkp x13qnu6 x1bqaal",
|
|
163
|
-
children:
|
|
162
|
+
children: n
|
|
164
163
|
}) })] })
|
|
165
164
|
});
|
|
166
165
|
}
|
|
167
|
-
export {
|
|
166
|
+
export { h as a, p as i, m as n, l as o, f as r, c as s, g as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as e } from "./src-
|
|
2
|
-
import { r as t } from "./chart-frame-
|
|
1
|
+
import { m as e } from "./src-0mocxTaR.js";
|
|
2
|
+
import { r as t } from "./chart-frame-DxAZ0h_q.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
// packages/charts/src/chart-input.tsx
|
|
5
5
|
function r(e) {
|