@mechane-ai/elements 0.43.0 → 0.45.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/dist/ai.js +1 -1
- package/dist/catalog.json +5 -1
- package/dist/categorical-values-DZLGQVW1.js +63 -0
- package/dist/{chart-frame-9dQQNF3F.js → chart-frame-Ztktqs1b.js} +86 -82
- package/dist/{chart-input-DT0STflx.js → chart-input-BO3BqlFO.js} +2 -2
- package/dist/charts/cartesian.js +835 -818
- package/dist/charts/distribution.js +296 -278
- package/dist/charts/graph.js +208 -197
- package/dist/charts/hierarchy.js +6 -6
- package/dist/charts/matrix.js +3 -3
- package/dist/charts/timeline.js +2 -2
- package/dist/charts.js +3 -3
- package/dist/collections.js +2 -2
- package/dist/{constants.stylex-BILvnwUk.js → constants.stylex-CqhVl0uU.js} +9 -9
- package/dist/content/tree.js +1 -1
- package/dist/feedback.js +1 -1
- package/dist/packages/charts/src/chart-theme.d.ts +10 -2
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +5 -1
- package/dist/packages/charts/src/index.d.ts +1 -1
- package/dist/packages/foundations/src/chart-tones.d.ts +5 -0
- package/dist/{plot-width-DzCmthQW.js → plot-width-CIqBiHcd.js} +15 -5
- package/dist/{src-BpvnBWrF.js → src-Dcs3SZ9V.js} +134 -119
- package/dist/styles2.css +39 -18
- package/dist/tokens.js +1 -1
- package/package.json +1 -1
- package/packages/foundations/src/constants.stylex.ts +9 -9
- package/packages/foundations/src/tokens.stylex.ts +9 -9
- package/skills/use-elements/references/reports.md +6 -4
- package/dist/categorical-values-DzhbfZ5w.js +0 -59
|
@@ -21,15 +21,15 @@ export const darkColors = stylex.defineConsts({
|
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
export const darkChartColors = stylex.defineConsts({
|
|
24
|
-
series1: '#
|
|
25
|
-
series2: '#
|
|
26
|
-
series3: '#
|
|
27
|
-
series4: '#
|
|
28
|
-
series5: '#
|
|
29
|
-
series6: '#
|
|
30
|
-
negative: '#
|
|
31
|
-
positive: '#
|
|
32
|
-
missing: '#
|
|
24
|
+
series1: '#6ba7ff',
|
|
25
|
+
series2: '#62c06c',
|
|
26
|
+
series3: '#b694f8',
|
|
27
|
+
series4: '#f69552',
|
|
28
|
+
series5: '#f286bd',
|
|
29
|
+
series6: '#f2c64f',
|
|
30
|
+
negative: '#ff7a72',
|
|
31
|
+
positive: '#6ba7ff',
|
|
32
|
+
missing: '#2b2b2b',
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
export const darkAvatarColors = stylex.defineConsts({
|
|
@@ -21,15 +21,15 @@ export const colors = stylex.defineVars({
|
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
export const chartColors = stylex.defineVars({
|
|
24
|
-
series1: '#
|
|
25
|
-
series2: '#
|
|
26
|
-
series3: '#
|
|
27
|
-
series4: '#
|
|
28
|
-
series5: '#
|
|
29
|
-
series6: '#
|
|
30
|
-
negative: '#
|
|
31
|
-
positive: '#
|
|
32
|
-
missing: '#
|
|
24
|
+
series1: '#3f86ec',
|
|
25
|
+
series2: '#3d9f4a',
|
|
26
|
+
series3: '#9a6ee9',
|
|
27
|
+
series4: '#e8762e',
|
|
28
|
+
series5: '#e0619f',
|
|
29
|
+
series6: '#c9921a',
|
|
30
|
+
negative: '#d9443f',
|
|
31
|
+
positive: '#3f86ec',
|
|
32
|
+
missing: '#ececec',
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
export const avatarColors = stylex.defineVars({
|
|
@@ -10,10 +10,12 @@ values a reader compares together. Keep available filters usable and preserve us
|
|
|
10
10
|
selection. Use the component's delay and reduced-motion behavior. On a cold document, wait for session resolution before
|
|
11
11
|
showing account navigation or sign-in.
|
|
12
12
|
|
|
13
|
-
For a custom plot, start with `ChartFrame` and chart tones from `/charts`.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
For a custom plot, start with `ChartFrame` and chart tones from `/charts`. Outline filled marks with
|
|
14
|
+
`chartToneOutlines`, draw the zero baseline and axes in ink, and set tick text in the mono face, as the shared charts
|
|
15
|
+
do. Keep data meaning in the caller. For a calendar heatmap, give each date a square cell, align week columns and day
|
|
16
|
+
rows to one gap, and distinguish a missing observation from the lowest score. A visible readout should provide the date
|
|
17
|
+
and value on hover and selection. Give keyboard users one tab stop with arrows in the plotted directions. Pointer exit
|
|
18
|
+
restores the selected reading.
|
|
17
19
|
|
|
18
20
|
Inspect a fast cached navigation, hold and release a slow read, then navigate away mid-read. Check that the shell and
|
|
19
21
|
filters stay usable, the skeleton reserves the relevant space, and late responses belong to the active selection. Check
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { c as e } from "./src-BpvnBWrF.js";
|
|
2
|
-
import { t } from "./chart-frame-9dQQNF3F.js";
|
|
3
|
-
import { n } from "./chart-input-DT0STflx.js";
|
|
4
|
-
import * as r from "@stylexjs/stylex";
|
|
5
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
-
// packages/charts/src/categorical-values.tsx
|
|
7
|
-
var o = {
|
|
8
|
-
kzqmXN: "x1xc55vz",
|
|
9
|
-
kZKoxP: "xdk7pt",
|
|
10
|
-
kmuXW: "x2lah0s",
|
|
11
|
-
$$css: !0
|
|
12
|
-
}, s = { swatch: (e) => [
|
|
13
|
-
o,
|
|
14
|
-
{
|
|
15
|
-
kWkggS: e == null ? e : "xl8spv7",
|
|
16
|
-
$$css: !0
|
|
17
|
-
},
|
|
18
|
-
{ "--x-backgroundColor": e ?? void 0 }
|
|
19
|
-
] }, c = {
|
|
20
|
-
items: 200,
|
|
21
|
-
series: 12
|
|
22
|
-
}, l = [
|
|
23
|
-
"series1",
|
|
24
|
-
"series2",
|
|
25
|
-
"series3",
|
|
26
|
-
"series4",
|
|
27
|
-
"series5",
|
|
28
|
-
"series6"
|
|
29
|
-
];
|
|
30
|
-
function u(e, t) {
|
|
31
|
-
return e ?? l[t % l.length] ?? "series1";
|
|
32
|
-
}
|
|
33
|
-
function d(e) {
|
|
34
|
-
if (e.length > c.items) return `Choose a window with at most ${c.items} items.`;
|
|
35
|
-
if (!n(e)) return "Every breakdown item needs a unique identifier.";
|
|
36
|
-
if (e.some((e) => e.value !== null && (!Number.isFinite(e.value) || e.value < 0))) return "Breakdown values must be finite and nonnegative, or explicitly missing.";
|
|
37
|
-
if (!Number.isFinite(e.reduce((e, t) => e + (t.value ?? 0), 0))) return "The sum of recorded values must be finite.";
|
|
38
|
-
}
|
|
39
|
-
function f({ items: n, selection: o }) {
|
|
40
|
-
return /* @__PURE__ */ i("ul", {
|
|
41
|
-
className: "xrvj5dj x1ghz6dp x1717udv xe8uvvx",
|
|
42
|
-
children: n.map((n) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ a(t, {
|
|
43
|
-
label: `${n.label}: ${n.valueLabel}`,
|
|
44
|
-
isSelected: o?.selectedId === n.id,
|
|
45
|
-
onSelect: o === void 0 ? void 0 : () => o.onSelect(n.id),
|
|
46
|
-
children: [/* @__PURE__ */ a("span", {
|
|
47
|
-
className: "x78zum5 x6s0dn4 x1hnptsi x1slnebi xeuugli",
|
|
48
|
-
children: [/* @__PURE__ */ i("span", {
|
|
49
|
-
"aria-hidden": !0,
|
|
50
|
-
...r.props(s.swatch(e[n.tone]))
|
|
51
|
-
}), n.label]
|
|
52
|
-
}), /* @__PURE__ */ i("span", {
|
|
53
|
-
className: "x153jb6y xp4054r xeuugli x193iq5w",
|
|
54
|
-
children: n.valueLabel
|
|
55
|
-
})]
|
|
56
|
-
}) }, n.id))
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
export { d as i, c as n, u as r, f as t };
|