@matthieumordrel/chart-studio-ui 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.
Files changed (46) hide show
  1. package/README.md +35 -0
  2. package/dist/index.d.mts +19 -0
  3. package/dist/index.mjs +18 -0
  4. package/dist/theme.css +67 -0
  5. package/dist/ui/chart-axis-ticks.mjs +65 -0
  6. package/dist/ui/chart-canvas.d.mts +40 -0
  7. package/dist/ui/chart-canvas.mjs +872 -0
  8. package/dist/ui/chart-context.d.mts +101 -0
  9. package/dist/ui/chart-context.mjs +117 -0
  10. package/dist/ui/chart-date-range-badge.d.mts +20 -0
  11. package/dist/ui/chart-date-range-badge.mjs +49 -0
  12. package/dist/ui/chart-date-range-panel.d.mts +18 -0
  13. package/dist/ui/chart-date-range-panel.mjs +126 -0
  14. package/dist/ui/chart-date-range.d.mts +20 -0
  15. package/dist/ui/chart-date-range.mjs +67 -0
  16. package/dist/ui/chart-debug.d.mts +21 -0
  17. package/dist/ui/chart-debug.mjs +172 -0
  18. package/dist/ui/chart-dropdown.mjs +92 -0
  19. package/dist/ui/chart-filters-panel.d.mts +26 -0
  20. package/dist/ui/chart-filters-panel.mjs +258 -0
  21. package/dist/ui/chart-filters.d.mts +18 -0
  22. package/dist/ui/chart-filters.mjs +48 -0
  23. package/dist/ui/chart-group-by-selector.d.mts +16 -0
  24. package/dist/ui/chart-group-by-selector.mjs +32 -0
  25. package/dist/ui/chart-metric-panel.d.mts +25 -0
  26. package/dist/ui/chart-metric-panel.mjs +172 -0
  27. package/dist/ui/chart-metric-selector.d.mts +16 -0
  28. package/dist/ui/chart-metric-selector.mjs +50 -0
  29. package/dist/ui/chart-select.mjs +61 -0
  30. package/dist/ui/chart-source-switcher.d.mts +24 -0
  31. package/dist/ui/chart-source-switcher.mjs +56 -0
  32. package/dist/ui/chart-time-bucket-selector.d.mts +17 -0
  33. package/dist/ui/chart-time-bucket-selector.mjs +37 -0
  34. package/dist/ui/chart-toolbar-overflow.d.mts +28 -0
  35. package/dist/ui/chart-toolbar-overflow.mjs +223 -0
  36. package/dist/ui/chart-toolbar.d.mts +33 -0
  37. package/dist/ui/chart-toolbar.mjs +60 -0
  38. package/dist/ui/chart-type-selector.d.mts +19 -0
  39. package/dist/ui/chart-type-selector.mjs +173 -0
  40. package/dist/ui/chart-x-axis-selector.d.mts +16 -0
  41. package/dist/ui/chart-x-axis-selector.mjs +28 -0
  42. package/dist/ui/index.d.mts +18 -0
  43. package/dist/ui/percent-stacked.mjs +36 -0
  44. package/dist/ui/toolbar-types.d.mts +7 -0
  45. package/dist/ui/toolbar-types.mjs +83 -0
  46. package/package.json +55 -0
@@ -0,0 +1,83 @@
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 };
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@matthieumordrel/chart-studio-ui",
3
+ "version": "0.5.2",
4
+ "description": "Alpha: optional Tailwind + Recharts UI for chart-studio. Not production-ready.",
5
+ "type": "module",
6
+ "sideEffects": [
7
+ "./dist/theme.css"
8
+ ],
9
+ "main": "./dist/index.mjs",
10
+ "types": "./dist/index.d.mts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.mts",
14
+ "import": "./dist/index.mjs"
15
+ },
16
+ "./theme.css": "./dist/theme.css",
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "README.md"
22
+ ],
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/MatthieuMordrel/chart-studio.git"
26
+ },
27
+ "bugs": {
28
+ "url": "https://github.com/MatthieuMordrel/chart-studio/issues"
29
+ },
30
+ "homepage": "https://github.com/MatthieuMordrel/chart-studio#readme",
31
+ "author": "Matthieu Mordrel",
32
+ "license": "MIT",
33
+ "keywords": [
34
+ "react",
35
+ "charts",
36
+ "recharts",
37
+ "tailwindcss",
38
+ "ui"
39
+ ],
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "scripts": {
44
+ "build": "tsdown",
45
+ "typecheck": "bunx tsc --noEmit -p tsconfig.json"
46
+ },
47
+ "peerDependencies": {
48
+ "@matthieumordrel/chart-studio": "0.5.2",
49
+ "lucide-react": ">=0.577.0 <1",
50
+ "react": ">=18.2.0 <20",
51
+ "react-dom": ">=18.2.0 <20",
52
+ "recharts": ">=3.0.0 <4",
53
+ "tailwindcss": ">=4.0.0 <5"
54
+ }
55
+ }