@lostgradient/cinder 0.22.0 → 0.23.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/CHANGELOG.md +63 -0
- package/components.json +1 -1
- package/dist/_internal/chart/chart-bar-model.d.ts +24 -0
- package/dist/_internal/chart/chart-cartesian-model.d.ts +16 -0
- package/dist/_internal/chart/chart-layout.d.ts +23 -0
- package/dist/_internal/chart/chart-model-utilities.d.ts +157 -0
- package/dist/_internal/chart/chart-scale.d.ts +37 -0
- package/dist/_internal/chart/chart-utilities.d.ts +7 -164
- package/dist/_internal/chart/heatmap-utilities.d.ts +5 -4
- package/dist/components/_internal/chart-tooltip.css +21 -0
- package/dist/components/_internal/chart-tooltip.svelte.d.ts +11 -0
- package/dist/components/approval-card/index.js +5 -5
- package/dist/components/area-chart/area-chart.css +27 -23
- package/dist/components/area-chart/area-chart.schema.js +38 -1
- package/dist/components/area-chart/area-chart.types.d.ts +6 -2
- package/dist/components/area-chart/index.js +1589 -768
- package/dist/components/badge/badge.css +2 -2
- package/dist/components/badge/badge.schema.js +2 -2
- package/dist/components/badge/badge.types.d.ts +3 -3
- package/dist/components/badge/index.js +4 -4
- package/dist/components/bar-chart/bar-chart.css +27 -21
- package/dist/components/bar-chart/bar-chart.schema.js +38 -1
- package/dist/components/bar-chart/bar-chart.types.d.ts +7 -3
- package/dist/components/bar-chart/index.js +1544 -740
- package/dist/components/chart.types.d.ts +98 -2
- package/dist/components/json-schema-editor/index.js +4 -4
- package/dist/components/line-chart/index.js +1587 -785
- package/dist/components/line-chart/line-chart.css +25 -24
- package/dist/components/line-chart/line-chart.schema.js +38 -1
- package/dist/components/line-chart/line-chart.types.d.ts +6 -2
- package/dist/components/matrix-chart/index.js +1038 -429
- package/dist/components/matrix-chart/matrix-chart.css +12 -6
- package/dist/components/matrix-chart/matrix-chart.schema.js +26 -1
- package/dist/components/matrix-chart/matrix-chart.types.d.ts +5 -1
- package/dist/components/payload-inspector/index.js +4 -4
- package/dist/components/run-step-timeline/index.js +6 -6
- package/dist/components/sparkbar/index.js +1291 -4
- package/dist/components/sparkbar/sparkbar.css +5 -4
- package/dist/components/sparkbar/sparkbar.schema.js +26 -1
- package/dist/components/sparkbar/sparkbar.types.d.ts +5 -0
- package/dist/components/spectrogram/index.js +1076 -437
- package/dist/components/spectrogram/spectrogram.css +7 -6
- package/dist/components/spectrogram/spectrogram.schema.js +26 -1
- package/dist/components/spectrogram/spectrogram.types.d.ts +5 -1
- package/dist/components/spectrum-chart/index.js +1037 -423
- package/dist/components/spectrum-chart/spectrum-chart.css +8 -7
- package/dist/components/spectrum-chart/spectrum-chart.schema.js +26 -1
- package/dist/components/spectrum-chart/spectrum-chart.types.d.ts +5 -1
- package/dist/components/statistic/index.js +1288 -2
- package/dist/components/statistic/statistic.css +6 -5
- package/dist/components/statistic/statistic.schema.js +26 -1
- package/dist/components/statistic/statistic.types.d.ts +5 -0
- package/dist/components/statistic-group/index.js +1288 -2
- package/dist/components/waveform/index.js +1004 -404
- package/dist/components/waveform/waveform.css +8 -7
- package/dist/components/waveform/waveform.schema.js +26 -1
- package/dist/components/waveform/waveform.types.d.ts +5 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17734 -16540
- package/dist/server/components/approval-card/index.js +3 -3
- package/dist/server/components/area-chart/index.js +3 -3
- package/dist/server/components/badge/index.js +2 -2
- package/dist/server/components/bar-chart/index.js +3 -3
- package/dist/server/components/json-schema-editor/index.js +2 -2
- package/dist/server/components/line-chart/index.js +3 -3
- package/dist/server/components/matrix-chart/index.js +3 -3
- package/dist/server/components/payload-inspector/index.js +3 -3
- package/dist/server/components/run-step-timeline/index.js +2 -2
- package/dist/server/components/sparkbar/index.js +3 -2
- package/dist/server/components/spectrogram/index.js +3 -3
- package/dist/server/components/spectrum-chart/index.js +2 -2
- package/dist/server/components/statistic/index.js +4 -3
- package/dist/server/components/statistic-group/index.js +4 -3
- package/dist/server/components/waveform/index.js +2 -2
- package/dist/server/index.js +21 -21
- package/dist/server/{index.server-3dkwzkd3.js → index.server-10r7yf13.js} +110 -27
- package/dist/server/{index.server-pp2n6def.js → index.server-2y0xz53g.js} +37 -14
- package/dist/server/{index.server-bd8rcgf0.js → index.server-4hvjet4z.js} +1 -1
- package/dist/server/{index.server-bsm39gpy.js → index.server-5d83fkyg.js} +75 -21
- package/dist/server/{index.server-abqbstkt.js → index.server-9gj583qs.js} +41 -14
- package/dist/server/{index.server-2nmwsacy.js → index.server-9scm7zf9.js} +4 -4
- package/dist/server/{index.server-5j6jv7rm.js → index.server-9vwxyy06.js} +108 -29
- package/dist/server/{index.server-abjsjsw8.js → index.server-afpjvfz1.js} +111 -35
- package/dist/server/{index.server-wm8957be.js → index.server-bp0vzxby.js} +14 -1
- package/dist/server/{index.server-86sw5ea6.js → index.server-dw9bz17h.js} +4 -4
- package/dist/server/{index.server-d26jzn2m.js → index.server-en31rprd.js} +3 -3
- package/dist/server/{index.server-dx58qant.js → index.server-f3a0ecqg.js} +72 -9
- package/dist/server/{index.server-d63pwytk.js → index.server-kz8aeeq5.js} +18 -10
- package/dist/server/index.server-mmmrgvyd.js +1274 -0
- package/dist/server/{index.server-93943z3e.js → index.server-rx9aszk6.js} +1 -1
- package/dist/server/{index.server-1221p7e4.js → index.server-scahngwv.js} +13 -1
- package/dist/server/{index.server-nj8kk5bv.js → index.server-t73q59c1.js} +1 -1
- package/dist/server/{index.server-5schb2vt.js → index.server-tdrncj5e.js} +16 -6
- package/dist/server/{index.server-4wweyb2e.js → index.server-vnr1h5g5.js} +1 -1
- package/dist/server/{index.server-fphvzcfb.js → index.server-wqajghn9.js} +1 -1
- package/dist/server/{index.server-yd9shwqq.js → index.server-zjcjzcv6.js} +1 -1
- package/package.json +1 -1
- package/src/_internal/chart/chart-bar-model.ts +330 -0
- package/src/_internal/chart/chart-cartesian-model.ts +450 -0
- package/src/_internal/chart/chart-interaction.svelte.ts +25 -6
- package/src/_internal/chart/chart-layout.ts +348 -0
- package/src/_internal/chart/chart-model-utilities.ts +357 -0
- package/src/_internal/chart/chart-scale.ts +487 -0
- package/src/_internal/chart/chart-utilities.ts +22 -1078
- package/src/_internal/chart/heatmap-utilities.ts +21 -17
- package/src/components/_internal/chart-tooltip.css +21 -0
- package/src/components/_internal/chart-tooltip.svelte +44 -0
- package/src/components/approval-card/approval-card.svelte +1 -1
- package/src/components/area-chart/area-chart.css +27 -23
- package/src/components/area-chart/area-chart.examples.json +1 -1
- package/src/components/area-chart/area-chart.schema.json +37 -0
- package/src/components/area-chart/area-chart.schema.ts +40 -0
- package/src/components/area-chart/area-chart.svelte +103 -35
- package/src/components/area-chart/area-chart.types.ts +7 -1
- package/src/components/badge/badge.css +2 -2
- package/src/components/badge/badge.schema.json +1 -1
- package/src/components/badge/badge.schema.ts +1 -1
- package/src/components/badge/badge.svelte +2 -2
- package/src/components/badge/badge.types.ts +3 -3
- package/src/components/bar-chart/bar-chart.css +27 -21
- package/src/components/bar-chart/bar-chart.schema.json +37 -0
- package/src/components/bar-chart/bar-chart.schema.ts +40 -0
- package/src/components/bar-chart/bar-chart.svelte +94 -33
- package/src/components/bar-chart/bar-chart.types.ts +9 -2
- package/src/components/chart.types.ts +112 -2
- package/src/components/line-chart/line-chart.css +25 -24
- package/src/components/line-chart/line-chart.examples.json +1 -1
- package/src/components/line-chart/line-chart.schema.json +37 -0
- package/src/components/line-chart/line-chart.schema.ts +40 -0
- package/src/components/line-chart/line-chart.svelte +95 -40
- package/src/components/line-chart/line-chart.types.ts +7 -1
- package/src/components/matrix-chart/matrix-chart.css +12 -6
- package/src/components/matrix-chart/matrix-chart.schema.json +25 -0
- package/src/components/matrix-chart/matrix-chart.schema.ts +25 -0
- package/src/components/matrix-chart/matrix-chart.svelte +30 -12
- package/src/components/matrix-chart/matrix-chart.types.ts +5 -1
- package/src/components/run-step-timeline/run-step-timeline.svelte +2 -2
- package/src/components/sparkbar/sparkbar.css +5 -4
- package/src/components/sparkbar/sparkbar.schema.json +25 -0
- package/src/components/sparkbar/sparkbar.schema.ts +26 -0
- package/src/components/sparkbar/sparkbar.svelte +8 -1
- package/src/components/sparkbar/sparkbar.types.ts +5 -0
- package/src/components/spectrogram/spectrogram.css +7 -6
- package/src/components/spectrogram/spectrogram.schema.json +25 -0
- package/src/components/spectrogram/spectrogram.schema.ts +25 -0
- package/src/components/spectrogram/spectrogram.svelte +73 -28
- package/src/components/spectrogram/spectrogram.types.ts +5 -1
- package/src/components/spectrum-chart/spectrum-chart.css +8 -7
- package/src/components/spectrum-chart/spectrum-chart.schema.json +25 -0
- package/src/components/spectrum-chart/spectrum-chart.schema.ts +26 -0
- package/src/components/spectrum-chart/spectrum-chart.svelte +38 -12
- package/src/components/spectrum-chart/spectrum-chart.types.ts +5 -1
- package/src/components/statistic/statistic.css +6 -5
- package/src/components/statistic/statistic.schema.json +25 -0
- package/src/components/statistic/statistic.schema.ts +26 -0
- package/src/components/statistic/statistic.svelte +42 -1
- package/src/components/statistic/statistic.types.ts +5 -0
- package/src/components/waveform/waveform.css +8 -7
- package/src/components/waveform/waveform.schema.json +25 -0
- package/src/components/waveform/waveform.schema.ts +26 -0
- package/src/components/waveform/waveform.svelte +16 -3
- package/src/components/waveform/waveform.types.ts +5 -1
- package/src/index.ts +8 -0
- package/dist/server/index.server-6vbpz6dd.js +0 -690
|
@@ -16,6 +16,10 @@ export type ChartAxisConfiguration = {
|
|
|
16
16
|
tickCount?: number;
|
|
17
17
|
format?: ChartTickFormatter;
|
|
18
18
|
};
|
|
19
|
+
export type ChartXAxisConfiguration = ChartAxisConfiguration & {
|
|
20
|
+
/** Tick-label rotation in degrees. Default `0`. */
|
|
21
|
+
tickLabelRotation?: number;
|
|
22
|
+
};
|
|
19
23
|
export type ChartPoint = {
|
|
20
24
|
x: ChartXValue;
|
|
21
25
|
y: ChartNumericValue;
|
|
@@ -27,7 +31,79 @@ export type ChartCartesianSeries = {
|
|
|
27
31
|
color?: string;
|
|
28
32
|
valueFormatter?: ChartValueFormatter;
|
|
29
33
|
};
|
|
30
|
-
export type
|
|
34
|
+
export type ChartTheme = {
|
|
35
|
+
foreground?: string;
|
|
36
|
+
muted?: string;
|
|
37
|
+
grid?: string;
|
|
38
|
+
background?: string;
|
|
39
|
+
palette?: string[];
|
|
40
|
+
};
|
|
41
|
+
export type ResolvedChartTheme = {
|
|
42
|
+
foreground: string;
|
|
43
|
+
muted: string;
|
|
44
|
+
grid: string;
|
|
45
|
+
background: string;
|
|
46
|
+
palette: string[];
|
|
47
|
+
};
|
|
48
|
+
export type NormalizedXValue = {
|
|
49
|
+
raw: ChartXValue;
|
|
50
|
+
key: string;
|
|
51
|
+
label: string;
|
|
52
|
+
comparable: string | number;
|
|
53
|
+
kind: 'string' | 'number' | 'date';
|
|
54
|
+
};
|
|
55
|
+
export type PlacedPoint = {
|
|
56
|
+
seriesId: string;
|
|
57
|
+
seriesLabel: string;
|
|
58
|
+
color: string;
|
|
59
|
+
x: NormalizedXValue;
|
|
60
|
+
y: number | null;
|
|
61
|
+
originalY: ChartNumericValue;
|
|
62
|
+
index: number;
|
|
63
|
+
pixelX: number;
|
|
64
|
+
pixelY: number;
|
|
65
|
+
/** Pixel-space baseline for filled marks. In stacked areas, this is the lower stack coordinate. */
|
|
66
|
+
pixelY0: number;
|
|
67
|
+
};
|
|
68
|
+
export type ChartGeometry = {
|
|
69
|
+
plotWidth: number;
|
|
70
|
+
plotHeight: number;
|
|
71
|
+
marginTop: number;
|
|
72
|
+
marginRight: number;
|
|
73
|
+
marginBottom: number;
|
|
74
|
+
marginLeft: number;
|
|
75
|
+
};
|
|
76
|
+
export type ChartTarget = {
|
|
77
|
+
id: string;
|
|
78
|
+
seriesId: string;
|
|
79
|
+
seriesLabel: string;
|
|
80
|
+
xLabel: string;
|
|
81
|
+
valueLabel: string;
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
width?: number;
|
|
85
|
+
height?: number;
|
|
86
|
+
color: string;
|
|
87
|
+
};
|
|
88
|
+
export type BarChartPlacedBar = {
|
|
89
|
+
id: string;
|
|
90
|
+
seriesId: string;
|
|
91
|
+
seriesLabel: string;
|
|
92
|
+
categoryLabel: string;
|
|
93
|
+
valueLabel: string;
|
|
94
|
+
x: number;
|
|
95
|
+
y: number;
|
|
96
|
+
width: number;
|
|
97
|
+
height: number;
|
|
98
|
+
color: string;
|
|
99
|
+
hidden: boolean;
|
|
100
|
+
};
|
|
101
|
+
export type ChartMarkContext<TSeries = ChartCartesianSeries, TPoint = PlacedPoint> = {
|
|
102
|
+
series: TSeries;
|
|
103
|
+
points: TPoint[];
|
|
104
|
+
geometry: ChartGeometry;
|
|
105
|
+
};
|
|
106
|
+
export type ChartSharedProps<TSeries = ChartCartesianSeries, TPoint = PlacedPoint> = Omit<HTMLAttributes<HTMLElement>, 'class'> & {
|
|
31
107
|
/** Accessible label for the chart. Required for screen readers. */
|
|
32
108
|
label: string;
|
|
33
109
|
/** Optional description rendered below the label. */
|
|
@@ -35,7 +111,7 @@ export type ChartSharedProps = Omit<HTMLAttributes<HTMLElement>, 'class'> & {
|
|
|
35
111
|
/** Pixel height of the chart viewport. Default `280`. */
|
|
36
112
|
height?: number;
|
|
37
113
|
/** Configuration for the x-axis label and tick formatting. */
|
|
38
|
-
xAxis?:
|
|
114
|
+
xAxis?: ChartXAxisConfiguration;
|
|
39
115
|
/** Configuration for the y-axis label and tick formatting. */
|
|
40
116
|
yAxis?: ChartAxisConfiguration;
|
|
41
117
|
/** Where to render the series legend relative to the chart. Default `top`. */
|
|
@@ -50,6 +126,12 @@ export type ChartSharedProps = Omit<HTMLAttributes<HTMLElement>, 'class'> & {
|
|
|
50
126
|
dataTableVisibility?: ChartDataTableVisibility;
|
|
51
127
|
/** Maximum number of interactive focus targets before keyboard navigation is disabled. Default `500`. */
|
|
52
128
|
maximumInteractivePoints?: number;
|
|
129
|
+
/** Partial visual theme override. Omitted fields inherit the surrounding application. */
|
|
130
|
+
theme?: ChartTheme;
|
|
131
|
+
/** Opt-in visual tooltip. Pass a snippet to replace the default visual content. */
|
|
132
|
+
tooltip?: boolean | Snippet<[ChartTarget]>;
|
|
133
|
+
/** Per-series renderer override. The chart retains scales, guides, focus, and data-table semantics. */
|
|
134
|
+
mark?: Snippet<[ChartMarkContext<TSeries, TPoint>]>;
|
|
53
135
|
/** Custom class applied to the root element. */
|
|
54
136
|
class?: string;
|
|
55
137
|
empty?: Snippet;
|
|
@@ -74,6 +156,20 @@ export type ChartAxisSchemaConfiguration = {
|
|
|
74
156
|
tickCount?: number;
|
|
75
157
|
};
|
|
76
158
|
/** @schemaObject */
|
|
159
|
+
export type ChartXAxisSchemaConfiguration = {
|
|
160
|
+
label?: string;
|
|
161
|
+
tickCount?: number;
|
|
162
|
+
tickLabelRotation?: number;
|
|
163
|
+
};
|
|
164
|
+
/** @schemaObject */
|
|
165
|
+
export type ChartThemeSchema = {
|
|
166
|
+
foreground?: string;
|
|
167
|
+
muted?: string;
|
|
168
|
+
grid?: string;
|
|
169
|
+
background?: string;
|
|
170
|
+
palette?: string[];
|
|
171
|
+
};
|
|
172
|
+
/** @schemaObject */
|
|
77
173
|
export type ChartSchemaPoint = {
|
|
78
174
|
x: ChartJsonXValue;
|
|
79
175
|
y?: number | null;
|
|
@@ -3248,7 +3248,7 @@ var rest_excludes2 = new Set([
|
|
|
3248
3248
|
"$$legacy",
|
|
3249
3249
|
"variant",
|
|
3250
3250
|
"size",
|
|
3251
|
-
"
|
|
3251
|
+
"monospace",
|
|
3252
3252
|
"subscriptionState",
|
|
3253
3253
|
"class",
|
|
3254
3254
|
"children"
|
|
@@ -3265,7 +3265,7 @@ function Badge($$anchor, $$props) {
|
|
|
3265
3265
|
expired: { variant: "danger", label: "Expired" },
|
|
3266
3266
|
refunded: { variant: "neutral", label: "Refunded" }
|
|
3267
3267
|
};
|
|
3268
|
-
let variant = $12.prop($$props, "variant", 3, "neutral"), size = $12.prop($$props, "size", 3, "md"),
|
|
3268
|
+
let variant = $12.prop($$props, "variant", 3, "neutral"), size = $12.prop($$props, "size", 3, "md"), monospace = $12.prop($$props, "monospace", 3, false), rest = $12.rest_props($$props, rest_excludes2);
|
|
3269
3269
|
const subscriptionStateConfiguration = $12.derived(() => $$props.subscriptionState === undefined ? undefined : subscriptionStateConfigurations[$$props.subscriptionState]);
|
|
3270
3270
|
const resolvedVariant = $12.derived(() => $12.get(subscriptionStateConfiguration)?.variant ?? variant());
|
|
3271
3271
|
var span = root_1();
|
|
@@ -3273,7 +3273,7 @@ function Badge($$anchor, $$props) {
|
|
|
3273
3273
|
class: $0,
|
|
3274
3274
|
"data-cinder-variant": $12.get(resolvedVariant),
|
|
3275
3275
|
"data-cinder-size": size(),
|
|
3276
|
-
"data-cinder-
|
|
3276
|
+
"data-cinder-monospace": monospace() ? "" : undefined,
|
|
3277
3277
|
"data-cinder-subscription-state": $$props.subscriptionState,
|
|
3278
3278
|
...rest
|
|
3279
3279
|
}), [() => classNames("cinder-badge", $$props.class)]);
|
|
@@ -9733,4 +9733,4 @@ export {
|
|
|
9733
9733
|
Json_schema_editor as JsonSchemaEditor
|
|
9734
9734
|
};
|
|
9735
9735
|
|
|
9736
|
-
//# debugId=
|
|
9736
|
+
//# debugId=B34016B400BA89F564756E2164756E21
|