@mechane-ai/elements 0.24.1 → 0.25.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/layout.js CHANGED
@@ -625,7 +625,7 @@ function Q({ title: e, actions: t, showBreadcrumb: n = !1, showNavigation: r = !
625
625
  tabIndex: n ? void 0 : -1,
626
626
  "aria-label": n ? "Breadcrumb" : void 0,
627
627
  className: "x78zum5 x6s0dn4 x1hnptsi x1dc62k6 xeuugli xs83m0k x1ghz6dp x1qlqyl8 xj57cvi x1t137rt",
628
- children: /* @__PURE__ */ C("span", {
628
+ children: /* @__PURE__ */ C(n ? "div" : "span", {
629
629
  className: "xeuugli xb3r6kr xlyipyv xuxw1ft",
630
630
  children: e
631
631
  })
@@ -4,7 +4,7 @@ import type { BarComposition, BarSeries } from './bar-data.ts';
4
4
  export type { BarSeries, BarBucket, BarComposition } from './bar-data.ts';
5
5
  export type BarChartProps = {
6
6
  readonly title: string;
7
- readonly description?: string | undefined;
7
+ readonly description?: ReactNode;
8
8
  readonly categories: ReadonlyArray<{
9
9
  readonly id: string;
10
10
  readonly label: string;
@@ -8,5 +8,5 @@ export type { SparklineProps } from './sparkline.tsx';
8
8
  export { Sparkline } from './sparkline.tsx';
9
9
  export type { TimeSeriesPoint, TimeSeries, TimeSeriesMarker } from './time-series-data.ts';
10
10
  export { timeSeriesLimits } from './time-series-data.ts';
11
- export type { TimeSeriesChartProps, AreaChartProps, SmallMultiplesProps } from './time-series.tsx';
12
- export { LineChart, AreaChart, SmallMultiples } from './time-series.tsx';
11
+ export type { TimeSeriesChartProps, TimeSeriesChartPlaceholderProps, AreaChartProps, SmallMultiplesProps, } from './time-series.tsx';
12
+ export { LineChart, AreaChart, SmallMultiples, TimeSeriesChartPlaceholder } from './time-series.tsx';
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
2
2
  import type { TimeSeries, TimeSeriesMarker } from './time-series-data.ts';
3
3
  export type TimeSeriesChartProps = {
4
4
  readonly title: string;
5
- readonly description?: string | undefined;
5
+ readonly description?: ReactNode;
6
6
  readonly series: ReadonlyArray<TimeSeries>;
7
7
  readonly timestampUnit: 'seconds' | 'milliseconds';
8
8
  readonly formatTimestamp: (timestamp: number) => string;
@@ -15,12 +15,15 @@ export type TimeSeriesChartProps = {
15
15
  export type AreaChartProps = TimeSeriesChartProps & {
16
16
  readonly isStacked?: boolean | undefined;
17
17
  };
18
+ export type TimeSeriesChartPlaceholderProps = Pick<TimeSeriesChartProps, 'title' | 'description' | 'height' | 'actions'> & {
19
+ readonly series: ReadonlyArray<Pick<TimeSeries, 'id' | 'label' | 'tone'>>;
20
+ };
18
21
  export type SmallMultiplesProps = Omit<TimeSeriesChartProps, 'series' | 'title' | 'description' | 'actions' | 'formatValue' | 'formatTick' | 'markers'> & {
19
22
  readonly charts: ReadonlyArray<{
20
23
  readonly id: string;
21
24
  readonly title: string;
22
25
  readonly series: ReadonlyArray<TimeSeries>;
23
- readonly description?: string | undefined;
26
+ readonly description?: ReactNode;
24
27
  readonly formatValue: (value: number) => string;
25
28
  readonly formatTick?: ((value: number) => string) | undefined;
26
29
  readonly markers?: ReadonlyArray<TimeSeriesMarker> | undefined;
@@ -28,4 +31,5 @@ export type SmallMultiplesProps = Omit<TimeSeriesChartProps, 'series' | 'title'
28
31
  };
29
32
  export declare function LineChart(props: TimeSeriesChartProps): ReactNode;
30
33
  export declare function AreaChart({ isStacked, ...props }: AreaChartProps): ReactNode;
34
+ export declare function TimeSeriesChartPlaceholder({ title, description, series, actions, height, }: TimeSeriesChartPlaceholderProps): ReactNode;
31
35
  export declare function SmallMultiples({ charts, ...props }: SmallMultiplesProps): ReactNode;
@@ -6,7 +6,7 @@ export type ChartSelection = {
6
6
  };
7
7
  export type ChartFrameProps = {
8
8
  readonly title: ReactNode;
9
- readonly description?: string | undefined;
9
+ readonly description?: ReactNode;
10
10
  readonly children: ReactNode;
11
11
  readonly actions?: ReactNode;
12
12
  readonly footer?: ReactNode;
@@ -5,6 +5,6 @@ export declare function hasUniqueIds(records: ReadonlyArray<{
5
5
  }>): boolean;
6
6
  export declare function ChartInputError({ title, description, message, }: {
7
7
  readonly title: string;
8
- readonly description?: string | undefined;
8
+ readonly description?: ReactNode;
9
9
  readonly message: string;
10
10
  }): ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mechane-ai/elements",
3
- "version": "0.24.1",
3
+ "version": "0.25.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": {