@mechane-ai/elements 0.23.0 → 0.24.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/dist/{categorical-values-lk7xoiOz.js → categorical-values-CPRt9uzI.js} +2 -2
- package/dist/{chart-frame-CFEDXxpC.js → chart-frame-CNr8M_b2.js} +1 -1
- package/dist/{chart-input-BrzNr3oe.js → chart-input-DDAjzy-O.js} +1 -1
- package/dist/charts/cartesian.js +764 -585
- package/dist/charts/distribution.js +2 -2
- package/dist/charts/graph.js +2 -2
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/timeline.js +1 -1
- package/dist/charts.js +1 -1
- package/dist/elements.css +31 -9
- package/dist/layout.js +5 -8
- package/dist/packages/charts/src/cartesian/bar-chart.d.ts +3 -1
- package/dist/packages/charts/src/cartesian/composition-bars.d.ts +2 -1
- package/dist/packages/charts/src/cartesian/time-series.d.ts +3 -1
- package/dist/packages/charts/src/chart-data.d.ts +5 -0
- package/dist/packages/charts/src/chart-frame.d.ts +1 -1
- package/dist/packages/charts/src/chart-inspection.d.ts +24 -0
- package/dist/packages/charts/src/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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-CNr8M_b2.js";
|
|
2
|
+
import { n as a, r as o, t as s } from "../chart-input-DDAjzy-O.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";
|
package/dist/charts/graph.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "../use-scroll-tab-index-Dxpdh4W7.js";
|
|
2
|
-
import { a as t, n, r, s as i, t as a } from "../chart-frame-
|
|
3
|
-
import { n as o, t as s } from "../chart-input-
|
|
2
|
+
import { a as t, n, r, s as i, t as a } from "../chart-frame-CNr8M_b2.js";
|
|
3
|
+
import { n as o, t as s } from "../chart-input-DDAjzy-O.js";
|
|
4
4
|
import * as c from "@stylexjs/stylex";
|
|
5
5
|
import { useId as l } from "react";
|
|
6
6
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
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-CPRt9uzI.js";
|
|
2
|
+
import { o as r, r as i, s as a } from "../chart-frame-CNr8M_b2.js";
|
|
3
|
+
import { t as o } from "../chart-input-DDAjzy-O.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
1
|
import { r as e } from "../tokens.stylex-DTHHFbyl.js";
|
|
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-
|
|
2
|
+
import { n as t, r as n, t as r } from "../chart-input-DDAjzy-O.js";
|
|
3
|
+
import { a as i, n as a, r as o, s, t as c } from "../chart-frame-CNr8M_b2.js";
|
|
4
4
|
import { t as l } from "../use-scroll-tab-index-Dxpdh4W7.js";
|
|
5
5
|
import * as u from "@stylexjs/stylex";
|
|
6
6
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
package/dist/charts/timeline.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as e } from "../src-DLReNPV9.js";
|
|
2
|
-
import { n as t, t as n } from "../chart-input-
|
|
2
|
+
import { n as t, t as n } from "../chart-input-DDAjzy-O.js";
|
|
3
3
|
import * as r from "@stylexjs/stylex";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
import { scaleLinear as o } from "@visx/scale";
|
package/dist/charts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as ChartFrame, i as ChartLegend } from "./chart-frame-
|
|
1
|
+
export { r as ChartFrame, i as ChartLegend, s as chartToneColors } from "./chart-frame-CNr8M_b2.js";
|
package/dist/elements.css
CHANGED
|
@@ -356,10 +356,6 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
356
356
|
flex: 12ch;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
.x1iv9x3n {
|
|
360
|
-
flex: 200px;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
359
|
.xk30mkq {
|
|
364
360
|
flex: 240px;
|
|
365
361
|
}
|
|
@@ -1286,6 +1282,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1286
1282
|
grid-template-columns: minmax(110px, 1fr) minmax(120px, 2fr) minmax(110px, 1fr);
|
|
1287
1283
|
}
|
|
1288
1284
|
|
|
1285
|
+
.xnby9oq {
|
|
1286
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
1289
|
.x10yxpwy {
|
|
1290
1290
|
grid-template-columns: repeat(auto-fill,minmax(var(--x14tmdi9),1fr));
|
|
1291
1291
|
}
|
|
@@ -1402,6 +1402,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1402
1402
|
object-fit: cover;
|
|
1403
1403
|
}
|
|
1404
1404
|
|
|
1405
|
+
.xuzhngd {
|
|
1406
|
+
opacity: .3;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1405
1409
|
.x1hc1fzr {
|
|
1406
1410
|
opacity: 1;
|
|
1407
1411
|
}
|
|
@@ -1830,7 +1834,7 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1830
1834
|
background-color: var(--x1umbgym);
|
|
1831
1835
|
}
|
|
1832
1836
|
|
|
1833
|
-
.x13rtz23[data-dragging]:not([data-disabled]), .xf2ykmf[data-highlighted], .xgm7wsc[data-checked], .xhtu79c[data-pressed], .xyg3wme:active:not([data-disabled]) {
|
|
1837
|
+
.x13rtz23[data-dragging]:not([data-disabled]), .x1yk04ar[aria-current="location"], .xf2ykmf[data-highlighted], .xgm7wsc[data-checked], .xhtu79c[data-pressed], .xyg3wme:active:not([data-disabled]) {
|
|
1834
1838
|
background-color: var(--x7wqmh8);
|
|
1835
1839
|
}
|
|
1836
1840
|
|
|
@@ -2246,6 +2250,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
2246
2250
|
bottom: var(--x1qq5i99);
|
|
2247
2251
|
}
|
|
2248
2252
|
|
|
2253
|
+
.xqtp20y {
|
|
2254
|
+
height: 0;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2249
2257
|
.x5yr21d {
|
|
2250
2258
|
height: 100%;
|
|
2251
2259
|
}
|
|
@@ -2558,10 +2566,6 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
2558
2566
|
min-height: 35px;
|
|
2559
2567
|
}
|
|
2560
2568
|
|
|
2561
|
-
.x1rtsecp {
|
|
2562
|
-
min-height: calc(var(--xdvbmuj) * 2);
|
|
2563
|
-
}
|
|
2564
|
-
|
|
2565
2569
|
.x1avwmir {
|
|
2566
2570
|
min-height: var(--x10l6e8v);
|
|
2567
2571
|
}
|
|
@@ -3020,6 +3024,24 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
3020
3024
|
}
|
|
3021
3025
|
}
|
|
3022
3026
|
|
|
3027
|
+
@media (width <= 639px) {
|
|
3028
|
+
.xannxpe.xannxpe {
|
|
3029
|
+
display: block;
|
|
3030
|
+
}
|
|
3031
|
+
|
|
3032
|
+
.x1xnx9c1.x1xnx9c1 {
|
|
3033
|
+
display: grid;
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
.xfodcyb.xfodcyb {
|
|
3037
|
+
display: inline;
|
|
3038
|
+
}
|
|
3039
|
+
|
|
3040
|
+
.x1boff50.x1boff50 {
|
|
3041
|
+
display: none;
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
|
|
3023
3045
|
@media (width <= 600px) {
|
|
3024
3046
|
.xqxxu6g.xqxxu6g {
|
|
3025
3047
|
display: none;
|
package/dist/layout.js
CHANGED
|
@@ -248,8 +248,8 @@ function V() {
|
|
|
248
248
|
}
|
|
249
249
|
// packages/layout/src/navigation-rail.tsx
|
|
250
250
|
var H = g("rail"), U = {
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
selected: {
|
|
252
|
+
kHjaVl: "x1yk04ar",
|
|
253
253
|
$$css: !0
|
|
254
254
|
},
|
|
255
255
|
mobileLink: {
|
|
@@ -293,7 +293,7 @@ function W({ label: e, links: t, action: o }) {
|
|
|
293
293
|
"aria-label": e,
|
|
294
294
|
className: "xrvj5dj x1mt1orb x1rnidkh xunmzkg x1s01oa9",
|
|
295
295
|
children: t.map(({ label: e, icon: t, isCurrent: n = !1, ...r }) => /* @__PURE__ */ w("a", {
|
|
296
|
-
...p(m.props(i.base, i.button, U.mobileLink, U.rounded,
|
|
296
|
+
...p(m.props(i.base, i.button, U.mobileLink, U.rounded, U.selected), r),
|
|
297
297
|
"aria-current": n ? "location" : void 0,
|
|
298
298
|
onClick: (e) => u(r.onClick, e),
|
|
299
299
|
children: [/* @__PURE__ */ C("span", {
|
|
@@ -323,13 +323,10 @@ function W({ label: e, links: t, action: o }) {
|
|
|
323
323
|
"aria-label": e,
|
|
324
324
|
className: "x78zum5 xdt5ytf x1qjc9v5",
|
|
325
325
|
children: t.map(({ label: e, icon: t, isCurrent: r = !1, ...i }) => /* @__PURE__ */ C("div", {
|
|
326
|
-
|
|
327
|
-
0: { className: "x1n2onr6 x78zum5 x6s0dn4 xl56j7k x1oec0jp" },
|
|
328
|
-
1: { className: "x1n2onr6 x78zum5 x6s0dn4 xl56j7k x1oec0jp x1r7kqkb xh3r7i3" }
|
|
329
|
-
}[!!r | 0],
|
|
326
|
+
className: "x1n2onr6 x78zum5 x6s0dn4 xl56j7k x1oec0jp",
|
|
330
327
|
children: /* @__PURE__ */ w(n.Root, { children: [/* @__PURE__ */ C(n.Trigger, {
|
|
331
328
|
render: /* @__PURE__ */ C(a, {
|
|
332
|
-
...i,
|
|
329
|
+
...p({ className: "x1yk04ar" }, i),
|
|
333
330
|
"aria-label": e,
|
|
334
331
|
"aria-current": r ? "location" : void 0,
|
|
335
332
|
onClick: (e) => u(i.onClick, e)
|
|
@@ -15,6 +15,8 @@ export type BarChartProps = {
|
|
|
15
15
|
readonly mode?: 'grouped' | 'stacked' | undefined;
|
|
16
16
|
readonly composition?: BarComposition | undefined;
|
|
17
17
|
readonly formatValue: (value: number) => string;
|
|
18
|
+
readonly formatTick?: ((value: number) => string) | undefined;
|
|
19
|
+
readonly highlightedSeriesId?: string | undefined;
|
|
18
20
|
readonly selection?: ChartSelection | undefined;
|
|
19
21
|
readonly height?: number | undefined;
|
|
20
22
|
};
|
|
@@ -23,4 +25,4 @@ export type BarChartPlaceholderProps = Pick<BarChartProps, 'description' | 'heig
|
|
|
23
25
|
readonly series?: ReadonlyArray<Pick<BarSeries, 'id' | 'label' | 'tone'>> | undefined;
|
|
24
26
|
};
|
|
25
27
|
export declare function BarChartPlaceholder({ title, description, series, height, }: BarChartPlaceholderProps): ReactNode;
|
|
26
|
-
export declare function BarChart({ title, description, categories, series, domain, mode, formatValue, selection, height, composition, }: BarChartProps): ReactNode;
|
|
28
|
+
export declare function BarChart({ title, description, categories, series, domain, mode, formatValue, formatTick, highlightedSeriesId, selection, height, composition, }: BarChartProps): ReactNode;
|
|
@@ -9,6 +9,7 @@ type CompositionBarsProps = {
|
|
|
9
9
|
readonly width: number;
|
|
10
10
|
readonly y: (value: number) => number;
|
|
11
11
|
readonly isHighlighted: boolean;
|
|
12
|
+
readonly highlightedSeriesId?: string | undefined;
|
|
12
13
|
};
|
|
13
|
-
export declare function CompositionBars({ bucket, series, focusedSeries, index, x, width, y, isHighlighted, }: CompositionBarsProps): ReactNode;
|
|
14
|
+
export declare function CompositionBars({ bucket, series, focusedSeries, index, x, width, y, isHighlighted, highlightedSeriesId, }: CompositionBarsProps): ReactNode;
|
|
14
15
|
export {};
|
|
@@ -7,6 +7,7 @@ export type TimeSeriesChartProps = {
|
|
|
7
7
|
readonly timestampUnit: 'seconds' | 'milliseconds';
|
|
8
8
|
readonly formatTimestamp: (timestamp: number) => string;
|
|
9
9
|
readonly formatValue: (value: number) => string;
|
|
10
|
+
readonly formatTick?: ((value: number) => string) | undefined;
|
|
10
11
|
readonly markers?: ReadonlyArray<TimeSeriesMarker> | undefined;
|
|
11
12
|
readonly height?: number | undefined;
|
|
12
13
|
readonly actions?: ReactNode;
|
|
@@ -14,13 +15,14 @@ export type TimeSeriesChartProps = {
|
|
|
14
15
|
export type AreaChartProps = TimeSeriesChartProps & {
|
|
15
16
|
readonly isStacked?: boolean | undefined;
|
|
16
17
|
};
|
|
17
|
-
export type SmallMultiplesProps = Omit<TimeSeriesChartProps, 'series' | 'title' | 'description' | 'actions' | 'formatValue' | 'markers'> & {
|
|
18
|
+
export type SmallMultiplesProps = Omit<TimeSeriesChartProps, 'series' | 'title' | 'description' | 'actions' | 'formatValue' | 'formatTick' | 'markers'> & {
|
|
18
19
|
readonly charts: ReadonlyArray<{
|
|
19
20
|
readonly id: string;
|
|
20
21
|
readonly title: string;
|
|
21
22
|
readonly series: ReadonlyArray<TimeSeries>;
|
|
22
23
|
readonly description?: string | undefined;
|
|
23
24
|
readonly formatValue: (value: number) => string;
|
|
25
|
+
readonly formatTick?: ((value: number) => string) | undefined;
|
|
24
26
|
readonly markers?: ReadonlyArray<TimeSeriesMarker> | undefined;
|
|
25
27
|
}>;
|
|
26
28
|
};
|
|
@@ -5,7 +5,7 @@ export type ChartSelection = {
|
|
|
5
5
|
readonly onSelect: (id: string) => void;
|
|
6
6
|
};
|
|
7
7
|
export type ChartFrameProps = {
|
|
8
|
-
readonly title:
|
|
8
|
+
readonly title: ReactNode;
|
|
9
9
|
readonly description?: string | undefined;
|
|
10
10
|
readonly children: ReactNode;
|
|
11
11
|
readonly actions?: ReactNode;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ChartLegendItem } from './chart-frame.tsx';
|
|
3
|
+
export type ChartInspectionRow = ChartLegendItem & {
|
|
4
|
+
readonly value: string;
|
|
5
|
+
};
|
|
6
|
+
type ChartInspectionProps = {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly label: string | undefined;
|
|
9
|
+
readonly summary?: string | undefined;
|
|
10
|
+
readonly legend: ReadonlyArray<ChartLegendItem>;
|
|
11
|
+
readonly layoutLegend?: ReadonlyArray<ChartLegendItem> | undefined;
|
|
12
|
+
readonly rows: ReadonlyArray<ChartInspectionRow>;
|
|
13
|
+
readonly x: number;
|
|
14
|
+
readonly width: number;
|
|
15
|
+
readonly offset?: number | undefined;
|
|
16
|
+
readonly source: 'pointer' | 'keyboard' | undefined;
|
|
17
|
+
readonly notes?: ReadonlyArray<string> | undefined;
|
|
18
|
+
};
|
|
19
|
+
export declare function ChartInspectionTitle({ title, detail, }: {
|
|
20
|
+
readonly title: string;
|
|
21
|
+
readonly detail: string | undefined;
|
|
22
|
+
}): ReactNode;
|
|
23
|
+
export declare function ChartInspection({ id, label, summary, legend, layoutLegend, rows, x, width, offset, source, notes, }: ChartInspectionProps): ReactNode;
|
|
24
|
+
export {};
|
|
@@ -2,3 +2,4 @@ export type { BreakdownItem } from './categorical-values.tsx';
|
|
|
2
2
|
export type { ChartSelection, ChartFrameProps, ChartLegendItem, ChartLegendProps } from './chart-frame.tsx';
|
|
3
3
|
export { ChartFrame, ChartLegend } from './chart-frame.tsx';
|
|
4
4
|
export type { ChartTone } from './chart-theme.ts';
|
|
5
|
+
export { chartToneColors } from './chart-theme.ts';
|
package/package.json
CHANGED