@matthieumordrel/chart-studio 0.4.0 → 0.5.2
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 +10 -768
- package/dist/_internal.d.mts +9 -0
- package/dist/_internal.mjs +9 -0
- package/dist/core/chart-capabilities.d.mts +5 -0
- package/dist/core/chart-capabilities.mjs +9 -0
- package/dist/core/config-utils.mjs +2 -1
- package/dist/core/data-label-defaults.d.mts +92 -0
- package/dist/core/data-label-defaults.mjs +4 -0
- package/dist/core/date-range-presets.d.mts +43 -1
- package/dist/core/date-range-presets.mjs +1 -1
- package/dist/core/date-utils.d.mts +26 -0
- package/dist/core/formatting.d.mts +49 -0
- package/dist/core/formatting.mjs +32 -10
- package/dist/core/index.d.mts +5 -3
- package/dist/core/metric-utils.d.mts +18 -2
- package/dist/core/metric-utils.mjs +1 -1
- package/dist/core/types.d.mts +2 -2
- package/dist/core/use-chart.mjs +1 -1
- package/dist/core/use-dashboard.mjs +1 -1
- package/dist/index.d.mts +7 -4
- package/dist/index.mjs +4 -1
- package/package.json +10 -41
- package/LICENSE +0 -21
- package/dist/ui/chart-axis-ticks.mjs +0 -65
- package/dist/ui/chart-canvas.d.mts +0 -40
- package/dist/ui/chart-canvas.mjs +0 -790
- package/dist/ui/chart-context.d.mts +0 -101
- package/dist/ui/chart-context.mjs +0 -117
- package/dist/ui/chart-date-range-badge.d.mts +0 -20
- package/dist/ui/chart-date-range-badge.mjs +0 -49
- package/dist/ui/chart-date-range-panel.d.mts +0 -18
- package/dist/ui/chart-date-range-panel.mjs +0 -126
- package/dist/ui/chart-date-range.d.mts +0 -20
- package/dist/ui/chart-date-range.mjs +0 -67
- package/dist/ui/chart-debug.d.mts +0 -21
- package/dist/ui/chart-debug.mjs +0 -173
- package/dist/ui/chart-dropdown.mjs +0 -92
- package/dist/ui/chart-filters-panel.d.mts +0 -26
- package/dist/ui/chart-filters-panel.mjs +0 -258
- package/dist/ui/chart-filters.d.mts +0 -18
- package/dist/ui/chart-filters.mjs +0 -48
- package/dist/ui/chart-group-by-selector.d.mts +0 -16
- package/dist/ui/chart-group-by-selector.mjs +0 -32
- package/dist/ui/chart-metric-panel.d.mts +0 -25
- package/dist/ui/chart-metric-panel.mjs +0 -172
- package/dist/ui/chart-metric-selector.d.mts +0 -16
- package/dist/ui/chart-metric-selector.mjs +0 -50
- package/dist/ui/chart-select.mjs +0 -61
- package/dist/ui/chart-source-switcher.d.mts +0 -24
- package/dist/ui/chart-source-switcher.mjs +0 -56
- package/dist/ui/chart-time-bucket-selector.d.mts +0 -17
- package/dist/ui/chart-time-bucket-selector.mjs +0 -37
- package/dist/ui/chart-toolbar-overflow.d.mts +0 -28
- package/dist/ui/chart-toolbar-overflow.mjs +0 -223
- package/dist/ui/chart-toolbar.d.mts +0 -33
- package/dist/ui/chart-toolbar.mjs +0 -60
- package/dist/ui/chart-type-selector.d.mts +0 -19
- package/dist/ui/chart-type-selector.mjs +0 -168
- package/dist/ui/chart-x-axis-selector.d.mts +0 -16
- package/dist/ui/chart-x-axis-selector.mjs +0 -28
- package/dist/ui/index.d.mts +0 -19
- package/dist/ui/index.mjs +0 -18
- package/dist/ui/percent-stacked.mjs +0 -36
- package/dist/ui/theme.css +0 -67
- package/dist/ui/toolbar-types.d.mts +0 -7
- package/dist/ui/toolbar-types.mjs +0 -83
package/dist/ui/theme.css
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
@source "./";
|
|
2
|
-
|
|
3
|
-
@theme inline {
|
|
4
|
-
--color-background: var(--cs-background);
|
|
5
|
-
--color-foreground: var(--cs-foreground);
|
|
6
|
-
--color-card: var(--cs-card);
|
|
7
|
-
--color-card-foreground: var(--cs-card-foreground);
|
|
8
|
-
--color-popover: var(--cs-popover);
|
|
9
|
-
--color-popover-foreground: var(--cs-popover-foreground);
|
|
10
|
-
--color-primary: var(--cs-primary);
|
|
11
|
-
--color-primary-foreground: var(--cs-primary-foreground);
|
|
12
|
-
--color-muted: var(--cs-muted);
|
|
13
|
-
--color-muted-foreground: var(--cs-muted-foreground);
|
|
14
|
-
--color-border: var(--cs-border);
|
|
15
|
-
--color-input: var(--cs-input);
|
|
16
|
-
--color-ring: var(--cs-ring);
|
|
17
|
-
--radius-sm: calc(var(--cs-radius) - 4px);
|
|
18
|
-
--radius-md: calc(var(--cs-radius) - 2px);
|
|
19
|
-
--radius-lg: var(--cs-radius);
|
|
20
|
-
--radius-xl: calc(var(--cs-radius) + 4px);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:root {
|
|
24
|
-
color-scheme: light;
|
|
25
|
-
--cs-radius: var(--radius, 0.25rem);
|
|
26
|
-
--cs-background: var(--background, oklch(0.980 0.002 264.545));
|
|
27
|
-
--cs-foreground: var(--foreground, oklch(0.128 0.027 261.594));
|
|
28
|
-
--cs-card: var(--card, oklch(1.000 0 0));
|
|
29
|
-
--cs-card-foreground: var(--card-foreground, oklch(0.128 0.027 261.594));
|
|
30
|
-
--cs-popover: var(--popover, oklch(1.000 0 0));
|
|
31
|
-
--cs-popover-foreground: var(--popover-foreground, oklch(0.128 0.027 261.594));
|
|
32
|
-
--cs-primary: var(--primary, oklch(0.501 0.228 277.992));
|
|
33
|
-
--cs-primary-foreground: var(--primary-foreground, oklch(1.000 0 0));
|
|
34
|
-
--cs-muted: var(--muted, oklch(0.948 0.004 264.536));
|
|
35
|
-
--cs-muted-foreground: var(--muted-foreground, oklch(0.550 0.023 264.362));
|
|
36
|
-
--cs-border: var(--border, oklch(0.920 0.006 264.529));
|
|
37
|
-
--cs-input: var(--input, oklch(0.920 0.006 264.529));
|
|
38
|
-
--cs-ring: var(--ring, oklch(0.501 0.228 277.992));
|
|
39
|
-
--cs-chart-1: oklch(0.501 0.228 277.992);
|
|
40
|
-
--cs-chart-2: oklch(0.550 0.235 302.715);
|
|
41
|
-
--cs-chart-3: oklch(0.609 0.206 354.673);
|
|
42
|
-
--cs-chart-4: oklch(0.635 0.109 178.228);
|
|
43
|
-
--cs-chart-5: oklch(0.732 0.166 58.213);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:root[data-theme='dark'],
|
|
47
|
-
.dark {
|
|
48
|
-
color-scheme: dark;
|
|
49
|
-
--cs-background: var(--background, oklch(0.171 0.015 273.761));
|
|
50
|
-
--cs-foreground: var(--foreground, oklch(0.944 0.005 264.534));
|
|
51
|
-
--cs-card: var(--card, oklch(0.203 0.018 273.739));
|
|
52
|
-
--cs-card-foreground: var(--card-foreground, oklch(0.944 0.005 264.534));
|
|
53
|
-
--cs-popover: var(--popover, oklch(0.224 0.019 273.793));
|
|
54
|
-
--cs-popover-foreground: var(--popover-foreground, oklch(0.944 0.005 264.534));
|
|
55
|
-
--cs-primary: var(--primary, oklch(0.597 0.196 282.474));
|
|
56
|
-
--cs-primary-foreground: var(--primary-foreground, oklch(1.000 0 0));
|
|
57
|
-
--cs-muted: var(--muted, oklch(0.246 0.018 274.033));
|
|
58
|
-
--cs-muted-foreground: var(--muted-foreground, oklch(0.618 0.025 264.372));
|
|
59
|
-
--cs-border: var(--border, oklch(0.258 0.016 274.161));
|
|
60
|
-
--cs-input: var(--input, oklch(0.287 0.019 274.112));
|
|
61
|
-
--cs-ring: var(--ring, oklch(0.597 0.196 282.474));
|
|
62
|
-
--cs-chart-1: oklch(0.625 0.188 283.272);
|
|
63
|
-
--cs-chart-2: oklch(0.660 0.198 305.491);
|
|
64
|
-
--cs-chart-3: oklch(0.785 0.132 215.571);
|
|
65
|
-
--cs-chart-4: oklch(0.789 0.176 158.514);
|
|
66
|
-
--cs-chart-5: oklch(0.815 0.143 77.593);
|
|
67
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//#region src/ui/toolbar-types.d.ts
|
|
2
|
-
/** All valid toolbar control identifiers. */
|
|
3
|
-
declare const CONTROL_IDS: readonly ["source", "xAxis", "chartType", "groupBy", "timeBucket", "metric", "filters", "dateRange"];
|
|
4
|
-
/** Union type of all valid toolbar control identifiers. */
|
|
5
|
-
type ControlId = (typeof CONTROL_IDS)[number];
|
|
6
|
-
//#endregion
|
|
7
|
-
export { ControlId };
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { ChartDateRange } from "./chart-date-range.mjs";
|
|
2
|
-
import { ChartFilters } from "./chart-filters.mjs";
|
|
3
|
-
import { ChartGroupBySelector } from "./chart-group-by-selector.mjs";
|
|
4
|
-
import { ChartMetricSelector } from "./chart-metric-selector.mjs";
|
|
5
|
-
import { ChartSourceSwitcher } from "./chart-source-switcher.mjs";
|
|
6
|
-
import { ChartTimeBucketSelector } from "./chart-time-bucket-selector.mjs";
|
|
7
|
-
import { ChartTypeSelector } from "./chart-type-selector.mjs";
|
|
8
|
-
import { ChartXAxisSelector } from "./chart-x-axis-selector.mjs";
|
|
9
|
-
//#region src/ui/toolbar-types.ts
|
|
10
|
-
/** All valid toolbar control identifiers. */
|
|
11
|
-
const CONTROL_IDS = [
|
|
12
|
-
"source",
|
|
13
|
-
"xAxis",
|
|
14
|
-
"chartType",
|
|
15
|
-
"groupBy",
|
|
16
|
-
"timeBucket",
|
|
17
|
-
"metric",
|
|
18
|
-
"filters",
|
|
19
|
-
"dateRange"
|
|
20
|
-
];
|
|
21
|
-
/**
|
|
22
|
-
* Ordered registry of all toolbar controls.
|
|
23
|
-
* Controls render in this order both pinned and inside the overflow menu.
|
|
24
|
-
*/
|
|
25
|
-
const CONTROL_REGISTRY = {
|
|
26
|
-
source: {
|
|
27
|
-
label: "Data source",
|
|
28
|
-
section: "data",
|
|
29
|
-
component: ChartSourceSwitcher
|
|
30
|
-
},
|
|
31
|
-
xAxis: {
|
|
32
|
-
label: "X-axis",
|
|
33
|
-
section: "data",
|
|
34
|
-
component: ChartXAxisSelector
|
|
35
|
-
},
|
|
36
|
-
chartType: {
|
|
37
|
-
label: "Chart type",
|
|
38
|
-
section: "visualization",
|
|
39
|
-
component: ChartTypeSelector
|
|
40
|
-
},
|
|
41
|
-
groupBy: {
|
|
42
|
-
label: "Group by",
|
|
43
|
-
section: "visualization",
|
|
44
|
-
component: ChartGroupBySelector
|
|
45
|
-
},
|
|
46
|
-
timeBucket: {
|
|
47
|
-
label: "Time bucket",
|
|
48
|
-
section: "visualization",
|
|
49
|
-
component: ChartTimeBucketSelector
|
|
50
|
-
},
|
|
51
|
-
metric: {
|
|
52
|
-
label: "Metric",
|
|
53
|
-
section: "visualization",
|
|
54
|
-
component: ChartMetricSelector
|
|
55
|
-
},
|
|
56
|
-
filters: {
|
|
57
|
-
label: "Filters",
|
|
58
|
-
section: "filters",
|
|
59
|
-
component: ChartFilters
|
|
60
|
-
},
|
|
61
|
-
dateRange: {
|
|
62
|
-
label: "Date range",
|
|
63
|
-
section: "filters",
|
|
64
|
-
component: ChartDateRange
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
/** Section metadata for the overflow panel. */
|
|
68
|
-
const SECTIONS = [
|
|
69
|
-
{
|
|
70
|
-
id: "data",
|
|
71
|
-
label: "Data"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: "visualization",
|
|
75
|
-
label: "Visualization"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
id: "filters",
|
|
79
|
-
label: "Filters"
|
|
80
|
-
}
|
|
81
|
-
];
|
|
82
|
-
//#endregion
|
|
83
|
-
export { CONTROL_IDS, CONTROL_REGISTRY, SECTIONS };
|