@mechane-ai/elements 0.13.0 → 0.14.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 +36 -12
- package/dist/ai.js +19 -19
- package/dist/{categorical-values-DwobbjBq.js → categorical-values-BnWfIPlv.js} +3 -3
- package/dist/{chart-frame-DAxsgMyl.js → chart-frame-Dm8UNfYD.js} +6 -6
- package/dist/{chart-input-B0snxbMH.js → chart-input-ceiMZYI-.js} +3 -3
- package/dist/charts/cartesian.js +16 -16
- package/dist/charts/distribution.js +6 -6
- package/dist/charts/graph.js +5 -5
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +13 -13
- package/dist/charts/timeline.js +30 -30
- package/dist/charts.js +1 -1
- package/dist/{code-block-VwrOHz5j.js → code-block-D07N6mYS.js} +4 -4
- package/dist/collections.js +330 -394
- package/dist/constants.stylex-bbdiv1fD.js +83 -0
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +5 -5
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +4 -4
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-Oj-MtNYi.js → content-link-CEx2s1MU.js} +1 -1
- package/dist/content.js +5 -5
- package/dist/elements.css +65 -106
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +21 -21
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +22 -22
- package/dist/navigation/commands.js +6 -6
- package/dist/navigation.js +7 -7
- package/dist/overlays.js +1 -1
- package/dist/packages/ai/src/approval.d.ts +1 -1
- package/dist/packages/ai/src/conversation.d.ts +4 -4
- package/dist/packages/ai/src/prompt-input.d.ts +7 -7
- package/dist/packages/charts/src/cartesian/time-series-data.d.ts +1 -1
- package/dist/packages/charts/src/cartesian/time-series.d.ts +2 -2
- package/dist/packages/charts/src/chart-frame.d.ts +2 -2
- package/dist/packages/collections/src/collection-controls.d.ts +8 -7
- package/dist/packages/collections/src/collection-scroll.d.ts +2 -2
- package/dist/packages/collections/src/data-table.d.ts +6 -6
- package/dist/packages/collections/src/index.d.ts +2 -3
- package/dist/packages/content/src/code/code-block.d.ts +4 -4
- package/dist/packages/content/src/diff/diff-source.d.ts +1 -1
- package/dist/packages/content/src/diff/pierre-diff.d.ts +2 -2
- package/dist/packages/content/src/markdown/markdown.d.ts +2 -2
- package/dist/packages/content/src/trace.d.ts +3 -3
- package/dist/packages/core/src/actions.d.ts +2 -2
- package/dist/packages/core/src/surfaces.d.ts +6 -6
- package/dist/packages/core/src/text.d.ts +2 -2
- package/dist/packages/feedback/src/async-region.d.ts +5 -3
- package/dist/packages/feedback/src/control-placeholders.d.ts +5 -5
- package/dist/packages/feedback/src/feedback.d.ts +2 -2
- package/dist/packages/forms/src/form-actions.d.ts +2 -2
- package/dist/packages/forms/src/forms.d.ts +2 -2
- package/dist/packages/forms/src/selection-styles.d.ts +1 -1
- package/dist/packages/foundations/src/constants.stylex.d.ts +90 -0
- package/dist/packages/foundations/src/tokens.d.ts +2 -0
- package/dist/packages/foundations/src/tokens.stylex.d.ts +0 -90
- package/dist/packages/layout/src/app-shell.d.ts +2 -2
- package/dist/packages/layout/src/page-toolbar.d.ts +3 -3
- package/dist/packages/layout/src/record-page.d.ts +2 -2
- package/dist/packages/layout/src/resizable.d.ts +2 -2
- package/dist/packages/layout/src/sidebar.d.ts +6 -6
- package/dist/packages/layout/src/view-stack.d.ts +2 -2
- package/dist/packages/layout/src/workbench.d.ts +2 -2
- package/dist/packages/navigation/src/commands/command.d.ts +3 -3
- package/dist/packages/navigation/src/page-navigation.d.ts +4 -4
- package/dist/packages/overlays/src/drawer.d.ts +2 -2
- package/dist/{pierre-diff-sUAU-xeL.js → pierre-diff-C_j0nxwS.js} +2 -2
- package/dist/pierre-theme-BUeJim8s.js +127 -0
- package/dist/{pierre-tree-Db1yaDM2.js → pierre-tree-CBBDlJ_Y.js} +4 -4
- package/dist/{src-DMsnWyru.js → src-BkXlN6aZ.js} +28 -28
- package/dist/{src-B0UTwpOz.js → src-C9GQP3px.js} +42 -41
- package/dist/{src-BNlyCwOr.js → src-CyJd2qSZ.js} +27 -27
- package/dist/{src-CVlgjAlw.js → src-d7EAi61b.js} +9 -9
- package/dist/theme.js +1 -1
- package/dist/tokens.js +3 -207
- package/dist/tokens.stylex-DTHHFbyl.js +128 -0
- package/package.json +4 -2
- package/packages/foundations/src/constants.stylex.ts +91 -0
- package/packages/foundations/src/tokens.stylex.ts +0 -90
- package/dist/packages/collections/src/table.d.ts +0 -17
- package/dist/pierre-theme-CBAncKdH.js +0 -126
package/README.md
CHANGED
|
@@ -77,7 +77,8 @@ Every path below belongs to `@mechane-ai/elements`. There is one package, versio
|
|
|
77
77
|
| `/theme` | Light and dark theme props. |
|
|
78
78
|
| `/csp` | Application-supplied content security policy configuration. |
|
|
79
79
|
| `/tokens` | Compiled token references for runtime styles. |
|
|
80
|
-
| `/tokens.stylex` |
|
|
80
|
+
| `/tokens.stylex` | Variable definitions for StyleX authoring and themes. |
|
|
81
|
+
| `/constants.stylex` | Compile-time conditions, palette values, layers, and shared geometry. |
|
|
81
82
|
| `/styles.css` | Component styles and token defaults. |
|
|
82
83
|
|
|
83
84
|
Focused entries keep renderer and chart dependencies out of basic controls. There is no all-components barrel. Renderers
|
|
@@ -98,10 +99,10 @@ Detail titles wrap; list metadata truncates. Sidebar items share contiguous hit
|
|
|
98
99
|
navigation and reserve the divided sidebar footer for persistent account controls. Use
|
|
99
100
|
`SidebarFooter layout="navigation"` for a group of commands; its intrinsic height keeps the scrolling navigation clear.
|
|
100
101
|
|
|
101
|
-
`AppShell
|
|
102
|
-
content mounted and measurable but removes it from keyboard and assistive-technology navigation. The
|
|
103
|
-
which view is active and when to unmount it; use this for a draft or reading position that must survive
|
|
104
|
-
`WorkbenchScroll` requires an accessible `label`; its `
|
|
102
|
+
`AppShell shouldFocus` temporarily hides navigation while retaining its expansion state. `ViewStack.Panel` keeps
|
|
103
|
+
inactive content mounted and measurable but removes it from keyboard and assistive-technology navigation. The
|
|
104
|
+
application owns which view is active and when to unmount it; use this for a draft or reading position that must survive
|
|
105
|
+
inspection. `WorkbenchScroll` requires an accessible `label`; its `isFlush` mode leaves list insets to the table. Its
|
|
105
106
|
`scrollRestorationId` identifies the actual scroll region for application-owned restoration.
|
|
106
107
|
|
|
107
108
|
Each `DataTable` column declares a role: `primary`, `text`, `status`, `number`, `timestamp`, or `actions`. Roles own
|
|
@@ -136,13 +137,35 @@ The default theme is light, with system fonts and a compact spacing scale. Impor
|
|
|
136
137
|
`@mechane-ai/elements/theme` and spread `themeProps.light` or `themeProps.dark` onto the document root. Portaled content
|
|
137
138
|
then inherits the same theme. The application owns the preference; no theme provider is required.
|
|
138
139
|
|
|
139
|
-
For custom StyleX themes, import
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
For custom StyleX styles and themes, import variables from `@mechane-ai/elements/tokens.stylex` and compile-time
|
|
141
|
+
constants from `@mechane-ai/elements/constants.stylex`. The archive preserves both defining paths. Variables retain the
|
|
142
|
+
same names as the packaged CSS; constants need their source compiled with the consuming styles. The ordinary `/tokens`
|
|
143
|
+
entry supplies runtime references and values for both groups.
|
|
144
|
+
|
|
145
|
+
With Vite and StyleX 0.19.1, configure the consumer as follows:
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
import stylex from '@stylexjs/unplugin/vite';
|
|
149
|
+
import { defineConfig } from 'vite';
|
|
150
|
+
|
|
151
|
+
export default defineConfig({
|
|
152
|
+
plugins: [
|
|
153
|
+
stylex({
|
|
154
|
+
useCSSLayers: true,
|
|
155
|
+
debug: false,
|
|
156
|
+
runtimeInjection: false,
|
|
157
|
+
unstable_moduleResolution: { type: 'commonJS' },
|
|
158
|
+
externalPackages: ['@mechane-ai/elements'],
|
|
159
|
+
}),
|
|
160
|
+
],
|
|
161
|
+
resolve: { alias: [{ find: /^@mechane-ai\/elements\/tokens\.stylex$/, replacement: '@mechane-ai/elements/tokens' }] },
|
|
162
|
+
});
|
|
163
|
+
```
|
|
143
164
|
|
|
144
|
-
|
|
145
|
-
|
|
165
|
+
The bundler alias uses compiled variable references without re-emitting defaults over the selected theme. StyleX still
|
|
166
|
+
resolves the original defining path during compilation. Keep `/constants.stylex` direct so its metadata reaches the
|
|
167
|
+
compiler. Consumer styles can then use `[conditions.coarsePointer]` from that entry, and
|
|
168
|
+
`stylex.createTheme(colors, ...)` with `colors` from `/tokens.stylex`.
|
|
146
169
|
|
|
147
170
|
When an application's Content Security Policy requires nonces, wrap its component tree in `CSPProvider` from
|
|
148
171
|
`@mechane-ai/elements/csp` and pass the same request nonce used in its policy. Preserve that nonce during hydration.
|
|
@@ -162,7 +185,8 @@ Use `AsyncRegion` from `/feedback` with an explicit `pending`, `ready`, or `fail
|
|
|
162
185
|
loading duration, and ordinary callers do not configure timing.
|
|
163
186
|
|
|
164
187
|
Wrap a page in `LoadingScope` and pass its navigation `identity` to share one clock across dependent reads. Updating the
|
|
165
|
-
identity resets pending presentation without remounting ready children.
|
|
188
|
+
identity resets pending presentation without remounting ready children. Use `initialStartedAt` only to preserve elapsed
|
|
189
|
+
document loading time at hydration; later identities start their own clock. Keep refreshes in the ready state and retain
|
|
166
190
|
their content, focus, and drafts; display progress or failure alongside the last result.
|
|
167
191
|
|
|
168
192
|
Build placeholders from the same layouts as their destinations. `DataTablePlaceholder` accepts the real table's
|
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-
|
|
3
|
-
import { r as u, t as d } from "./src-
|
|
4
|
-
import { c as f, d as p } from "./src-
|
|
5
|
-
import { c as m, u as h } from "./src-
|
|
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-CyJd2qSZ.js";
|
|
2
|
+
import { t as l } from "./content-link-CEx2s1MU.js";
|
|
3
|
+
import { r as u, t as d } from "./src-d7EAi61b.js";
|
|
4
|
+
import { c as f, d as p } from "./src-C9GQP3px.js";
|
|
5
|
+
import { c as m, u as h } from "./src-BkXlN6aZ.js";
|
|
6
6
|
import { t as g } from "./accessibility-C-aIZ1Yx.js";
|
|
7
7
|
import * as _ from "@stylexjs/stylex";
|
|
8
8
|
import { createContext as v, useContext as y, useId as b, useRef as x } from "react";
|
|
@@ -28,14 +28,14 @@ function M(t) {
|
|
|
28
28
|
t.status === "pending" ? /* @__PURE__ */ C(i, { children: [/* @__PURE__ */ S(e, {
|
|
29
29
|
variant: "solid",
|
|
30
30
|
onClick: t.onApprove,
|
|
31
|
-
disabled: t.
|
|
32
|
-
|
|
31
|
+
disabled: t.isDisabled === !0 || t.busy !== void 0,
|
|
32
|
+
isPending: t.busy === "approve",
|
|
33
33
|
pendingLabel: "Approving…",
|
|
34
34
|
children: t.approveLabel ?? "Approve"
|
|
35
35
|
}), /* @__PURE__ */ S(e, {
|
|
36
36
|
onClick: t.onDeny,
|
|
37
|
-
disabled: t.
|
|
38
|
-
|
|
37
|
+
disabled: t.isDisabled === !0 || t.busy !== void 0,
|
|
38
|
+
isPending: t.busy === "deny",
|
|
39
39
|
pendingLabel: "Denying…",
|
|
40
40
|
children: t.denyLabel ?? "Deny"
|
|
41
41
|
})] }) : /* @__PURE__ */ S(s, { children: t.statusLabel })
|
|
@@ -44,7 +44,7 @@ function M(t) {
|
|
|
44
44
|
}
|
|
45
45
|
// packages/ai/src/conversation.tsx
|
|
46
46
|
var N = v(void 0);
|
|
47
|
-
function P({ children: e, initialPosition: t = "end",
|
|
47
|
+
function P({ children: e, initialPosition: t = "end", shouldFollow: n = !0, viewportRef: r }) {
|
|
48
48
|
let i = x(null), a = r ?? i;
|
|
49
49
|
return /* @__PURE__ */ S(N.Provider, {
|
|
50
50
|
value: a,
|
|
@@ -68,7 +68,7 @@ function F({ label: e, children: t, scrollRestorationId: n }) {
|
|
|
68
68
|
children: t
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
function I({ children: e,
|
|
71
|
+
function I({ children: e, isStreaming: t = !1 }) {
|
|
72
72
|
return /* @__PURE__ */ S(k.Content, {
|
|
73
73
|
"aria-live": "polite",
|
|
74
74
|
"aria-relevant": "additions",
|
|
@@ -186,7 +186,7 @@ function G({ author: e, children: t, id: n, kind: r = "assistant", meta: i, avat
|
|
|
186
186
|
children: s
|
|
187
187
|
}),
|
|
188
188
|
o !== void 0 && /* @__PURE__ */ S("footer", {
|
|
189
|
-
className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr
|
|
189
|
+
className: "x78zum5 x1a02dak x6s0dn4 xeuugli xunmzkg x1hc1fzr x12vu8c0 xtf8l8m x1thm12b",
|
|
190
190
|
children: o
|
|
191
191
|
})
|
|
192
192
|
]
|
|
@@ -262,7 +262,7 @@ var X = { action: {
|
|
|
262
262
|
keTefX: "xvc5jky",
|
|
263
263
|
$$css: !0
|
|
264
264
|
} };
|
|
265
|
-
function Z({
|
|
265
|
+
function Z({ isCompact: e = !1 }) {
|
|
266
266
|
return /* @__PURE__ */ S("div", {
|
|
267
267
|
"aria-hidden": !0,
|
|
268
268
|
inert: !0,
|
|
@@ -281,14 +281,14 @@ function Z({ compact: e = !1 }) {
|
|
|
281
281
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd xy8obcc xas2l8k",
|
|
282
282
|
children: /* @__PURE__ */ S(p, { width: "8ch" })
|
|
283
283
|
}), /* @__PURE__ */ S(f, {
|
|
284
|
-
|
|
284
|
+
isIconOnly: !0,
|
|
285
285
|
xstyle: X.action
|
|
286
286
|
})]
|
|
287
287
|
})]
|
|
288
288
|
})
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
|
-
function Q({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prompt", placeholder: a, maxLength: o, required: s = !0,
|
|
291
|
+
function Q({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prompt", placeholder: a, maxLength: o, required: s = !0, isPending: l = !1, disabled: u = !1, isSubmitDisabled: f = !1, submitLabel: p = "Send message", pendingLabel: v = "Sending…", enterBehavior: y = "newline", isCompact: x = !1, description: w, error: E, controls: D, attachments: k, onStop: A, isStopPending: j = !1, stopLabel: M = "Stop response" }) {
|
|
292
292
|
let N = b(), P = u || l, F = p;
|
|
293
293
|
A === void 0 ? l ? F = v : y === "submit" && (F = `${p} · Enter`) : F = j ? "Stopping…" : M;
|
|
294
294
|
function I(e) {
|
|
@@ -318,7 +318,7 @@ function Q({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "promp
|
|
|
318
318
|
/* @__PURE__ */ S(h, {
|
|
319
319
|
appearance: "plain",
|
|
320
320
|
rows: x ? 1 : 2,
|
|
321
|
-
|
|
321
|
+
isCompact: x,
|
|
322
322
|
name: i,
|
|
323
323
|
value: t,
|
|
324
324
|
onChange: (e) => n(e.currentTarget.value),
|
|
@@ -342,7 +342,7 @@ function Q({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "promp
|
|
|
342
342
|
variant: "solid",
|
|
343
343
|
"aria-label": l ? v : p,
|
|
344
344
|
disabled: u || f,
|
|
345
|
-
|
|
345
|
+
isPending: l,
|
|
346
346
|
children: /* @__PURE__ */ S(T, {
|
|
347
347
|
size: 16,
|
|
348
348
|
"aria-hidden": !0
|
|
@@ -355,7 +355,7 @@ function Q({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "promp
|
|
|
355
355
|
e.preventDefault(), A();
|
|
356
356
|
},
|
|
357
357
|
disabled: u,
|
|
358
|
-
|
|
358
|
+
isPending: j,
|
|
359
359
|
children: /* @__PURE__ */ S(O, {
|
|
360
360
|
size: 14,
|
|
361
361
|
"aria-hidden": !0
|
|
@@ -415,7 +415,7 @@ function ee({ source: e, label: n }) {
|
|
|
415
415
|
}), /* @__PURE__ */ S(u.Portal, { children: /* @__PURE__ */ S(u.Positioner, {
|
|
416
416
|
side: "top",
|
|
417
417
|
children: /* @__PURE__ */ S(u.Popup, { children: /* @__PURE__ */ C(o, {
|
|
418
|
-
|
|
418
|
+
isCompact: !0,
|
|
419
419
|
children: [
|
|
420
420
|
/* @__PURE__ */ S(u.Title, { children: e.title }),
|
|
421
421
|
e.description !== void 0 && /* @__PURE__ */ S(u.Description, { children: e.description }),
|
|
@@ -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-Dm8UNfYD.js";
|
|
2
|
+
import { n } from "./chart-input-ceiMZYI-.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
|
|
@@ -40,7 +40,7 @@ function f({ items: n, selection: o }) {
|
|
|
40
40
|
className: "xrvj5dj x1ghz6dp x1717udv xe8uvvx",
|
|
41
41
|
children: n.map((n) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ a(e, {
|
|
42
42
|
label: `${n.label}: ${n.valueLabel}`,
|
|
43
|
-
|
|
43
|
+
isSelected: o?.selectedId === n.id,
|
|
44
44
|
onSelect: o === void 0 ? void 0 : () => o.onSelect(n.id),
|
|
45
45
|
children: [/* @__PURE__ */ a("span", {
|
|
46
46
|
className: "x78zum5 x6s0dn4 x1hnptsi x1slnebi xeuugli",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as e } from "./src-
|
|
2
|
-
import {
|
|
1
|
+
import { g as e } from "./src-CyJd2qSZ.js";
|
|
2
|
+
import { n as t, r as n } from "./tokens.stylex-DTHHFbyl.js";
|
|
3
3
|
import * as r from "@stylexjs/stylex";
|
|
4
4
|
import { useId as i } from "react";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
@@ -123,9 +123,9 @@ function f({ items: e, label: t = "Legend" }) {
|
|
|
123
123
|
}, e.id))
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function p({ label: e,
|
|
126
|
+
function p({ label: e, isSelected: t = !1, onSelect: n, children: r }) {
|
|
127
127
|
return n === void 0 ? /* @__PURE__ */ a("div", {
|
|
128
|
-
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r
|
|
128
|
+
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r x17oiadl x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b",
|
|
129
129
|
children: r
|
|
130
130
|
}) : /* @__PURE__ */ a("button", {
|
|
131
131
|
type: "button",
|
|
@@ -133,8 +133,8 @@ function p({ label: e, selected: t = !1, onSelect: n, children: r }) {
|
|
|
133
133
|
"aria-pressed": t,
|
|
134
134
|
onClick: n,
|
|
135
135
|
...{
|
|
136
|
-
0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r
|
|
137
|
-
1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r
|
|
136
|
+
0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r x17oiadl x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal" },
|
|
137
|
+
1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r x17oiadl x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xss6m8b x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1r7kqkb xh3r7i3" }
|
|
138
138
|
}[!!t | 0],
|
|
139
139
|
children: r
|
|
140
140
|
});
|
|
@@ -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-C9GQP3px.js";
|
|
2
|
+
import { r as t } from "./chart-frame-Dm8UNfYD.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
// packages/charts/src/chart-input.tsx
|
|
5
5
|
function r(e) {
|
|
@@ -13,7 +13,7 @@ function a({ title: r, description: i, message: a }) {
|
|
|
13
13
|
title: r,
|
|
14
14
|
description: i,
|
|
15
15
|
children: /* @__PURE__ */ n(e, {
|
|
16
|
-
|
|
16
|
+
hasError: !0,
|
|
17
17
|
children: a
|
|
18
18
|
})
|
|
19
19
|
});
|
package/dist/charts/cartesian.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { u as e } from "../src-
|
|
2
|
-
import { i as t, n, r, t as i } from "../categorical-values-
|
|
3
|
-
import { a, i as o, n as s, o as c, r as l, s as u, t as d } from "../chart-frame-
|
|
4
|
-
import { n as f, r as p, t as m } from "../chart-input-
|
|
1
|
+
import { u as e } from "../src-C9GQP3px.js";
|
|
2
|
+
import { i as t, n, r, t as i } from "../categorical-values-BnWfIPlv.js";
|
|
3
|
+
import { a, i as o, n as s, o as c, r as l, s as u, t as d } from "../chart-frame-Dm8UNfYD.js";
|
|
4
|
+
import { n as f, r as p, t as m } from "../chart-input-ceiMZYI-.js";
|
|
5
5
|
import { t as h } from "../plot-width--OgdohB5.js";
|
|
6
|
-
import { E as g } from "../src-
|
|
7
|
-
import { g as _ } from "../src-
|
|
8
|
-
import {
|
|
6
|
+
import { E as g } from "../src-CyJd2qSZ.js";
|
|
7
|
+
import { g as _ } from "../src-BkXlN6aZ.js";
|
|
8
|
+
import { r as v } from "../tokens.stylex-DTHHFbyl.js";
|
|
9
9
|
import * as y from "@stylexjs/stylex";
|
|
10
10
|
import { useEffect as b, useId as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
11
11
|
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
@@ -333,9 +333,9 @@ var U = 260, W = 56, G = 20, K = 12, q = 1e3, re = {
|
|
|
333
333
|
kZs9gx: "x19rmrnh",
|
|
334
334
|
k7shQP: "x9v5kkp",
|
|
335
335
|
kiEn40: "x175ew0f",
|
|
336
|
-
kmCx7Z: "
|
|
337
|
-
kJrEVn: "
|
|
338
|
-
kLz2MD: "
|
|
336
|
+
kmCx7Z: "xwycy1x",
|
|
337
|
+
kJrEVn: "x15ajoc",
|
|
338
|
+
kLz2MD: "x13ljvab",
|
|
339
339
|
k1CtGv: "xzgvv12",
|
|
340
340
|
$$css: !0
|
|
341
341
|
},
|
|
@@ -415,7 +415,7 @@ function ie(e) {
|
|
|
415
415
|
}),
|
|
416
416
|
r.length > 0 && /* @__PURE__ */ E(d, { children: r.map((e) => /* @__PURE__ */ D(s, {
|
|
417
417
|
label: `${e.label}, ${c}: ${p(e.x)}, ${f}: ${g(e.y)}`,
|
|
418
|
-
|
|
418
|
+
isSelected: _?.selectedId === e.id,
|
|
419
419
|
onSelect: _ === void 0 ? void 0 : () => _.onSelect(e.id),
|
|
420
420
|
children: [/* @__PURE__ */ E("span", { children: e.label }), /* @__PURE__ */ D("span", {
|
|
421
421
|
className: "xeuugli xss6m8b xj0a0fe x153jb6y",
|
|
@@ -868,14 +868,14 @@ function ge(e) {
|
|
|
868
868
|
return /* @__PURE__ */ E(ye, {
|
|
869
869
|
...e,
|
|
870
870
|
kind: "line",
|
|
871
|
-
|
|
871
|
+
isStacked: !1
|
|
872
872
|
});
|
|
873
873
|
}
|
|
874
|
-
function _e({
|
|
874
|
+
function _e({ isStacked: e = !1, ...t }) {
|
|
875
875
|
return /* @__PURE__ */ E(ye, {
|
|
876
876
|
...t,
|
|
877
877
|
kind: "area",
|
|
878
|
-
|
|
878
|
+
isStacked: e
|
|
879
879
|
});
|
|
880
880
|
}
|
|
881
881
|
function ve({ charts: e, ...t }) {
|
|
@@ -927,13 +927,13 @@ function ve({ charts: e, ...t }) {
|
|
|
927
927
|
formatValue: e.formatValue,
|
|
928
928
|
markers: e.markers,
|
|
929
929
|
kind: "line",
|
|
930
|
-
|
|
930
|
+
isStacked: !1,
|
|
931
931
|
sharedInspection: c,
|
|
932
932
|
axisWidth: u
|
|
933
933
|
}, e.id))
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
|
-
function ye({ title: e, description: t, series: n, timestampUnit: r, formatTimestamp: i, formatValue: a, markers: s = [], height: f = 180, actions: p, kind: g,
|
|
936
|
+
function ye({ title: e, description: t, series: n, timestampUnit: r, formatTimestamp: i, formatValue: a, markers: s = [], height: f = 180, actions: p, kind: g, isStacked: _, sharedInspection: O, axisWidth: ee }) {
|
|
937
937
|
let j = !Number.isFinite(f) || f < 48 ? "Chart height must be at least 48 pixels." : se({
|
|
938
938
|
series: n,
|
|
939
939
|
isStacked: _,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-
|
|
2
|
-
import { n as a, r as o, t as s } from "../chart-input-
|
|
1
|
+
import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-Dm8UNfYD.js";
|
|
2
|
+
import { n as a, r as o, t as s } from "../chart-input-ceiMZYI-.js";
|
|
3
3
|
import { t as c } from "../plot-width--OgdohB5.js";
|
|
4
4
|
import * as l from "@stylexjs/stylex";
|
|
5
5
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
@@ -304,7 +304,7 @@ function C({ title: a, description: o, points: c, domain: m, valueLabel: h, prob
|
|
|
304
304
|
let n = _(e.value), r = e.probability === null ? "Unavailable" : y(e.probability);
|
|
305
305
|
return /* @__PURE__ */ d(t, {
|
|
306
306
|
label: `${h}: ${n}, ${g}: ${r}`,
|
|
307
|
-
|
|
307
|
+
isSelected: C?.selectedId === e.id,
|
|
308
308
|
onSelect: C === void 0 ? void 0 : () => C.onSelect(e.id),
|
|
309
309
|
children: /* @__PURE__ */ f("span", {
|
|
310
310
|
...l.props(b.value),
|
|
@@ -399,7 +399,7 @@ function T({ title: a, description: o, bins: c, domain: h, maximumCount: g, valu
|
|
|
399
399
|
let n = e.count === null ? "Unavailable" : C(e.count), r = `${S(e.lowerBound)} – ${S(e.upperBound)}`;
|
|
400
400
|
return /* @__PURE__ */ d(t, {
|
|
401
401
|
label: `${e.label}, ${r}, ${y}: ${n}`,
|
|
402
|
-
|
|
402
|
+
isSelected: T?.selectedId === e.id,
|
|
403
403
|
onSelect: T === void 0 ? void 0 : () => T.onSelect(e.id),
|
|
404
404
|
children: /* @__PURE__ */ f("span", {
|
|
405
405
|
...l.props(b.value),
|
|
@@ -460,7 +460,7 @@ function D({ title: e, description: i, items: a, domain: o, valueLabel: u, inter
|
|
|
460
460
|
let n = e.estimate === null ? "Estimate unavailable" : h(e.estimate), i = `${m}: ${e.lower === null ? "Unavailable" : h(e.lower)} – ${e.upper === null ? "Unavailable" : h(e.upper)}`, a = r[e.tone ?? "series1"];
|
|
461
461
|
return /* @__PURE__ */ d(t, {
|
|
462
462
|
label: `${e.label}, ${u}: ${n}, ${i}`,
|
|
463
|
-
|
|
463
|
+
isSelected: g?.selectedId === e.id,
|
|
464
464
|
onSelect: g === void 0 ? void 0 : () => g.onSelect(e.id),
|
|
465
465
|
children: /* @__PURE__ */ f("span", {
|
|
466
466
|
...l.props(b.row),
|
|
@@ -586,7 +586,7 @@ function k({ title: e, description: i, items: a, domain: o, valueLabel: u, forma
|
|
|
586
586
|
let n = e.value === null ? "Unavailable" : h(e.value), i = e.rank === void 0 ? e.label : `${e.rank} · ${e.label}`, a = r[e.tone ?? "series1"];
|
|
587
587
|
return /* @__PURE__ */ d(t, {
|
|
588
588
|
label: `${i}, ${u}: ${n}`,
|
|
589
|
-
|
|
589
|
+
isSelected: g?.selectedId === e.id,
|
|
590
590
|
onSelect: g === void 0 ? void 0 : () => g.onSelect(e.id),
|
|
591
591
|
children: /* @__PURE__ */ f("span", {
|
|
592
592
|
...l.props(b.row),
|
package/dist/charts/graph.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-
|
|
2
|
-
import { n as a, t as o } from "../chart-input-
|
|
1
|
+
import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-Dm8UNfYD.js";
|
|
2
|
+
import { n as a, t as o } from "../chart-input-ceiMZYI-.js";
|
|
3
3
|
import * as s from "@stylexjs/stylex";
|
|
4
4
|
import { useId as c } from "react";
|
|
5
5
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
@@ -38,7 +38,7 @@ var f = {
|
|
|
38
38
|
k9WMMc: "x1yc453h",
|
|
39
39
|
kMv6JI: "x1hz01jw",
|
|
40
40
|
k63SB2: "xj57cvi",
|
|
41
|
-
kAzted: "x17tes2r
|
|
41
|
+
kAzted: "x17tes2r x17oiadl",
|
|
42
42
|
$$css: !0
|
|
43
43
|
},
|
|
44
44
|
position: (e, t) => [{
|
|
@@ -64,7 +64,7 @@ var f = {
|
|
|
64
64
|
action: {
|
|
65
65
|
kkrTdU: "x1ypdohk",
|
|
66
66
|
k3XXqK: "x1t137rt",
|
|
67
|
-
kGzVvX: "
|
|
67
|
+
kGzVvX: "xif5pkx",
|
|
68
68
|
kSReZ0: "x1ecmtor",
|
|
69
69
|
kPJHz1: "x13qnu6",
|
|
70
70
|
kZs9gx: "x19rmrnh",
|
|
@@ -197,7 +197,7 @@ function v({ title: a, description: f, nodes: m, edges: h, groups: g = [], width
|
|
|
197
197
|
className: "x1ghz6dp x1717udv xe8uvvx",
|
|
198
198
|
children: m.map((e) => /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u(t, {
|
|
199
199
|
label: [e.label, e.description].filter((e) => e !== void 0).join(", "),
|
|
200
|
-
|
|
200
|
+
isSelected: x?.selectedId === e.id,
|
|
201
201
|
onSelect: x === void 0 ? void 0 : () => x.onSelect(e.id),
|
|
202
202
|
children: /* @__PURE__ */ d("span", {
|
|
203
203
|
className: "xrvj5dj xfko13i xeuugli xh8yej3",
|
package/dist/charts/hierarchy.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as e, r as t, t as n } from "../categorical-values-
|
|
2
|
-
import { o as r, r as i, s as a } from "../chart-frame-
|
|
3
|
-
import { t as o } from "../chart-input-
|
|
1
|
+
import { i as e, r as t, t as n } from "../categorical-values-BnWfIPlv.js";
|
|
2
|
+
import { o as r, r as i, s as a } from "../chart-frame-Dm8UNfYD.js";
|
|
3
|
+
import { t as o } from "../chart-input-ceiMZYI-.js";
|
|
4
4
|
import { t as s } from "../plot-width--OgdohB5.js";
|
|
5
5
|
import * as c from "@stylexjs/stylex";
|
|
6
6
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
package/dist/charts/matrix.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as t, r as n, t as r } from "../chart-input-
|
|
3
|
-
import { a as i, n as a, r as o, s, t as c } from "../chart-frame-
|
|
1
|
+
import { r as e } from "../tokens.stylex-DTHHFbyl.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "../chart-input-ceiMZYI-.js";
|
|
3
|
+
import { a as i, n as a, r as o, s, t as c } from "../chart-frame-Dm8UNfYD.js";
|
|
4
4
|
import * as l from "@stylexjs/stylex";
|
|
5
5
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
6
|
// packages/charts/src/matrix/heatmap-scale.ts
|
|
@@ -78,8 +78,8 @@ var b = {
|
|
|
78
78
|
k1xSpc: "x78zum5",
|
|
79
79
|
kGNEyG: "x6s0dn4",
|
|
80
80
|
kjj79g: "xl56j7k",
|
|
81
|
-
kzqmXN: "x100vrsf
|
|
82
|
-
kZKoxP: "x1vqgdyp
|
|
81
|
+
kzqmXN: "x100vrsf x1ff4b4a",
|
|
82
|
+
kZKoxP: "x1vqgdyp x992rv9",
|
|
83
83
|
kB7OPa: "x9f619",
|
|
84
84
|
kMzoRj: "xmkeg23",
|
|
85
85
|
ksu8eU: "x1y0btm7",
|
|
@@ -102,7 +102,7 @@ var b = {
|
|
|
102
102
|
kZs9gx: "x19rmrnh",
|
|
103
103
|
k7shQP: "x9v5kkp",
|
|
104
104
|
kiEn40: "x1bqaal",
|
|
105
|
-
kaVNsj: "
|
|
105
|
+
kaVNsj: "x1box67k",
|
|
106
106
|
$$css: !0
|
|
107
107
|
},
|
|
108
108
|
selected: {
|
|
@@ -178,7 +178,7 @@ function T({ title: e, description: t, rows: n, columns: s, cells: l, domain: f,
|
|
|
178
178
|
let n = x.get(e.id)?.get(t.id), r = `${e.label} → ${t.label}`, i = O(n, f, g);
|
|
179
179
|
return /* @__PURE__ */ u("li", { children: /* @__PURE__ */ d(a, {
|
|
180
180
|
label: `${r}: ${i}`,
|
|
181
|
-
|
|
181
|
+
isSelected: n !== void 0 && _?.selectedId === n.id,
|
|
182
182
|
onSelect: n === void 0 || _ === void 0 ? void 0 : () => _.onSelect(n.id),
|
|
183
183
|
children: [/* @__PURE__ */ u("span", { children: r }), /* @__PURE__ */ u("span", { children: i })]
|
|
184
184
|
}) }, JSON.stringify([e.id, t.id]));
|
|
@@ -204,7 +204,7 @@ function T({ title: e, description: t, rows: n, columns: s, cells: l, domain: f,
|
|
|
204
204
|
title: e.label,
|
|
205
205
|
className: "x1717udv xy8obcc xas2l8k xj57cvi x153jb6y x1yc453h xuxw1ft",
|
|
206
206
|
children: /* @__PURE__ */ u("span", {
|
|
207
|
-
className: "x1lliihq x100vrsf
|
|
207
|
+
className: "x1lliihq x100vrsf x1ff4b4a xb3r6kr xlyipyv x2b8uid x1hmw7ec",
|
|
208
208
|
children: e.label
|
|
209
209
|
})
|
|
210
210
|
}, e.id))] }) }), /* @__PURE__ */ u("tbody", { children: n.map((e) => /* @__PURE__ */ d("tr", { children: [/* @__PURE__ */ u("th", {
|
|
@@ -218,7 +218,7 @@ function T({ title: e, description: t, rows: n, columns: s, cells: l, domain: f,
|
|
|
218
218
|
}), s.map((t) => {
|
|
219
219
|
let n = x.get(e.id)?.get(t.id);
|
|
220
220
|
return /* @__PURE__ */ u("td", {
|
|
221
|
-
className: "x1717udv x100vrsf
|
|
221
|
+
className: "x1717udv x100vrsf x1ff4b4a x2b8uid",
|
|
222
222
|
children: /* @__PURE__ */ u(E, {
|
|
223
223
|
cell: n,
|
|
224
224
|
label: `${e.label}, ${t.label}`,
|
|
@@ -238,7 +238,7 @@ function E({ cell: e, label: t, domain: n, palette: r, formatValue: i, selection
|
|
|
238
238
|
role: "img",
|
|
239
239
|
"aria-label": `${t}: not supplied`,
|
|
240
240
|
title: `${t}: not supplied`,
|
|
241
|
-
className: "x78zum5 x6s0dn4 xl56j7k x100vrsf
|
|
241
|
+
className: "x78zum5 x6s0dn4 xl56j7k x100vrsf x1ff4b4a x1vqgdyp x992rv9 x9f619 xmkeg23 x1ey3b81 x1717udv x1hz01jw xy8obcc xj57cvi xas2l8k xss6m8b x153jb6y x1r7kqkb xbsl7fq",
|
|
242
242
|
children: "·"
|
|
243
243
|
});
|
|
244
244
|
let o = e.kind === "value" && !m(e.value, n), s = O(e, n, i), c = `${t}: ${s}`, d = e.kind === "value" && !o ? h(e.value, {
|
|
@@ -328,12 +328,12 @@ var A = {
|
|
|
328
328
|
interactive: {
|
|
329
329
|
kkrTdU: "x1ypdohk",
|
|
330
330
|
k3XXqK: "x1t137rt",
|
|
331
|
-
kLWn49: "x1778rvt
|
|
331
|
+
kLWn49: "x1778rvt xwpstqy",
|
|
332
332
|
kPJHz1: "x13qnu6",
|
|
333
333
|
kZs9gx: "x19rmrnh",
|
|
334
334
|
k7shQP: "x9v5kkp",
|
|
335
335
|
kiEn40: "x13iak60",
|
|
336
|
-
kGzVvX: "
|
|
336
|
+
kGzVvX: "xif5pkx",
|
|
337
337
|
kSReZ0: "x1ecmtor",
|
|
338
338
|
$$css: !0
|
|
339
339
|
},
|
|
@@ -418,7 +418,7 @@ function M({ title: e, description: t, tokens: n, domain: s, palette: f, valueLa
|
|
|
418
418
|
className: "x1hmw7ec x5g2kb4 xso031l x1q0q8m5 x1qndepd x1yc453h xj57cvi x1df8dnd",
|
|
419
419
|
children: /* @__PURE__ */ u(a, {
|
|
420
420
|
label: `Select token ${e.index}: ${JSON.stringify(e.text)}`,
|
|
421
|
-
|
|
421
|
+
isSelected: _?.selectedId === e.id,
|
|
422
422
|
onSelect: _ === void 0 ? void 0 : () => _.onSelect(e.id),
|
|
423
423
|
children: e.index
|
|
424
424
|
})
|