orbital-ds 0.10.0 → 0.10.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/AGENTS.md +5 -2
- package/dist/lib/echarts-server.js +2 -2
- package/dist/lib/echarts-setup.d.ts +5 -1
- package/dist/lib/echarts-setup.js +36 -28
- package/dist/ui/echart.js +2 -2
- package/package.json +173 -171
- package/scripts/doctor.mjs +0 -0
- package/scripts/i18n.mjs +0 -0
- package/scripts/init.mjs +0 -0
package/AGENTS.md
CHANGED
|
@@ -68,7 +68,9 @@ adivinar. Lee antes: `README.md`, `docs/CONTRACT.md`, `contract.json` y
|
|
|
68
68
|
(`orbital-ds/lib/echarts-server`) con `tokens` = `orbital-ds/themes/<tema>.tokens.json` → `.light` o
|
|
69
69
|
`.dark` (colores ya resueltos; mezcla ahí los de la marca si la app tiene). Para PNG (plantillas de
|
|
70
70
|
documento), la app convierte el SVG (p. ej. resvg) con las fuentes del tema.
|
|
71
|
-
- Registro común de tipos y componentes: `orbital-ds/lib/echarts-setup`. Otro tipo → `echarts.use([...])` en la app.
|
|
71
|
+
- Registro común de tipos y componentes: `orbital-ds/lib/echarts-setup`. Otro tipo → `echarts.use([...])` en la app. Si la app
|
|
72
|
+
usa `echarts` directamente (sin `<EChart>` ni `renderEChartToSvg`), llama antes a `dsEcharts()` (registra y lo devuelve):
|
|
73
|
+
así ningún empaquetador quita el registro. `pnpm check:bundle` lo comprueba empaquetando un consumidor.
|
|
72
74
|
- **Recetas completas** (pantalla, informe SVG→PNG, función de servidor de TanStack Start, endpoint en un Worker, marca en los informes): `docs/GRAFICOS.md`.
|
|
73
75
|
|
|
74
76
|
## Idioma (i18n)
|
|
@@ -103,7 +105,8 @@ instala Motion y pasa el doctor. Sin preguntas: `--primary <color> --theme <tema
|
|
|
103
105
|
|
|
104
106
|
```bash
|
|
105
107
|
pnpm check:ds # contrato, repetidos, sombras, fugas, valores fijos, personalidad, familias, contraste y demos
|
|
106
|
-
pnpm verify # doctor + typecheck + build
|
|
108
|
+
pnpm verify # doctor + typecheck + build + check:bundle
|
|
109
|
+
pnpm check:bundle # empaqueta un consumidor de EChart (navegador y servidor) y comprueba que dibuja
|
|
107
110
|
pnpm manifest # regenera components.manifest.json tras añadir componentes
|
|
108
111
|
pnpm showcase # escaparate: todos los componentes × todos los temas × claro/oscuro × marca
|
|
109
112
|
pnpm showcase:typecheck # tipos de las demos
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dsEcharts } from "./echarts-setup";
|
|
2
2
|
import { dsEchartsThemeFromTokens } from "./echarts-theme";
|
|
3
3
|
function renderEChartToSvg(option, { width, height, tokens, theme, animation = false }) {
|
|
4
4
|
const tema = theme ?? (tokens ? dsEchartsThemeFromTokens(tokens, { reducedMotion: !animation }) : void 0);
|
|
5
|
-
const chart =
|
|
5
|
+
const chart = dsEcharts().init(null, tema, { renderer: "svg", ssr: true, width, height });
|
|
6
6
|
try {
|
|
7
7
|
chart.setOption({ animation, ...option });
|
|
8
8
|
return chart.renderToSVGString();
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import * as echarts from 'echarts/core';
|
|
2
2
|
export { echarts };
|
|
3
3
|
export { EChartsCoreOption as DsEChartOption } from 'echarts/core';
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
/** Registra los tipos y componentes de orbital-ds (una sola vez) y devuelve `echarts`. */
|
|
6
|
+
declare function dsEcharts(): typeof echarts;
|
|
7
|
+
|
|
8
|
+
export { dsEcharts };
|
|
@@ -27,34 +27,42 @@ import {
|
|
|
27
27
|
import * as echarts from "echarts/core";
|
|
28
28
|
import { LabelLayout, UniversalTransition } from "echarts/features";
|
|
29
29
|
import { CanvasRenderer, SVGRenderer } from "echarts/renderers";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
30
|
+
let registered = false;
|
|
31
|
+
function dsEcharts() {
|
|
32
|
+
if (registered) return echarts;
|
|
33
|
+
registered = true;
|
|
34
|
+
echarts.use([
|
|
35
|
+
BarChart,
|
|
36
|
+
FunnelChart,
|
|
37
|
+
GaugeChart,
|
|
38
|
+
HeatmapChart,
|
|
39
|
+
LineChart,
|
|
40
|
+
PieChart,
|
|
41
|
+
RadarChart,
|
|
42
|
+
SankeyChart,
|
|
43
|
+
ScatterChart,
|
|
44
|
+
AriaComponent,
|
|
45
|
+
DatasetComponent,
|
|
46
|
+
DataZoomComponent,
|
|
47
|
+
GraphicComponent,
|
|
48
|
+
GridComponent,
|
|
49
|
+
LegendComponent,
|
|
50
|
+
MarkAreaComponent,
|
|
51
|
+
MarkLineComponent,
|
|
52
|
+
MarkPointComponent,
|
|
53
|
+
TitleComponent,
|
|
54
|
+
TooltipComponent,
|
|
55
|
+
TransformComponent,
|
|
56
|
+
VisualMapComponent,
|
|
57
|
+
LabelLayout,
|
|
58
|
+
UniversalTransition,
|
|
59
|
+
CanvasRenderer,
|
|
60
|
+
SVGRenderer
|
|
61
|
+
]);
|
|
62
|
+
return echarts;
|
|
63
|
+
}
|
|
64
|
+
dsEcharts();
|
|
58
65
|
export {
|
|
66
|
+
dsEcharts,
|
|
59
67
|
echarts
|
|
60
68
|
};
|
package/dist/ui/echart.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { DownloadIcon } from "lucide-react";
|
|
5
5
|
import { useDsMessages } from "../hooks/use-ds-messages";
|
|
6
|
-
import {
|
|
6
|
+
import { dsEcharts } from "../lib/echarts-setup";
|
|
7
7
|
import { dsEchartsTheme } from "../lib/echarts-theme";
|
|
8
8
|
import { cn } from "../lib/utils";
|
|
9
9
|
import { Button } from "./button";
|
|
@@ -27,7 +27,7 @@ const EChart = React.forwardRef(function EChart2({ option, height = 320, rendere
|
|
|
27
27
|
}, []);
|
|
28
28
|
React.useEffect(() => {
|
|
29
29
|
if (!box.current || empty) return;
|
|
30
|
-
const instance =
|
|
30
|
+
const instance = dsEcharts().init(box.current, dsEchartsTheme(box.current), { renderer });
|
|
31
31
|
chart.current = instance;
|
|
32
32
|
instance.setOption(optionRef.current);
|
|
33
33
|
for (const [name, handler] of Object.entries(onEvents ?? {})) instance.on(name, handler);
|
package/package.json
CHANGED
|
@@ -1,171 +1,173 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "orbital-ds",
|
|
3
|
-
"version": "0.10.
|
|
4
|
-
"description": "Sistema de diseño genérico: estructura común + temas con personalidad (qratia, zyro) + ~60 componentes sobre Base UI y Tailwind v4, con contrato verificable y legible por agentes.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"design-system",
|
|
7
|
-
"design-tokens",
|
|
8
|
-
"theme",
|
|
9
|
-
"tailwindcss",
|
|
10
|
-
"base-ui",
|
|
11
|
-
"shadcn",
|
|
12
|
-
"react"
|
|
13
|
-
],
|
|
14
|
-
"license": "MIT",
|
|
15
|
-
"type": "module",
|
|
16
|
-
"sideEffects": [
|
|
17
|
-
"*.css"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"scripts/
|
|
30
|
-
"scripts/
|
|
31
|
-
"scripts/
|
|
32
|
-
"scripts/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"./
|
|
37
|
-
"./themes/*.
|
|
38
|
-
"./themes/*.
|
|
39
|
-
"./themes/*.
|
|
40
|
-
"./
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"./
|
|
54
|
-
"./
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"react
|
|
71
|
-
"react
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"react": "^19.2.0",
|
|
140
|
-
"react-
|
|
141
|
-
"react
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
"
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "orbital-ds",
|
|
3
|
+
"version": "0.10.1",
|
|
4
|
+
"description": "Sistema de diseño genérico: estructura común + temas con personalidad (qratia, zyro) + ~60 componentes sobre Base UI y Tailwind v4, con contrato verificable y legible por agentes.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"design-system",
|
|
7
|
+
"design-tokens",
|
|
8
|
+
"theme",
|
|
9
|
+
"tailwindcss",
|
|
10
|
+
"base-ui",
|
|
11
|
+
"shadcn",
|
|
12
|
+
"react"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"*.css",
|
|
18
|
+
"./dist/lib/echarts-setup.js"
|
|
19
|
+
],
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"scripts/doctor.mjs",
|
|
23
|
+
"contract.json",
|
|
24
|
+
"components.manifest.json",
|
|
25
|
+
"docs",
|
|
26
|
+
"AGENTS.md",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"scripts/init.mjs",
|
|
30
|
+
"scripts/manifest.mjs",
|
|
31
|
+
"scripts/brand-core.mjs",
|
|
32
|
+
"scripts/setup.mjs",
|
|
33
|
+
"scripts/i18n.mjs"
|
|
34
|
+
],
|
|
35
|
+
"exports": {
|
|
36
|
+
"./styles.css": "./dist/styles.css",
|
|
37
|
+
"./themes/*.css": "./dist/themes/*.css",
|
|
38
|
+
"./themes/*.md": "./dist/themes/*.md",
|
|
39
|
+
"./themes/*.meta.json": "./dist/themes/*.meta.json",
|
|
40
|
+
"./themes/*.tokens.json": "./dist/themes/*.tokens.json",
|
|
41
|
+
"./ui/*": {
|
|
42
|
+
"types": "./dist/ui/*.d.ts",
|
|
43
|
+
"import": "./dist/ui/*.js"
|
|
44
|
+
},
|
|
45
|
+
"./lib/*": {
|
|
46
|
+
"types": "./dist/lib/*.d.ts",
|
|
47
|
+
"import": "./dist/lib/*.js"
|
|
48
|
+
},
|
|
49
|
+
"./hooks/*": {
|
|
50
|
+
"types": "./dist/hooks/*.d.ts",
|
|
51
|
+
"import": "./dist/hooks/*.js"
|
|
52
|
+
},
|
|
53
|
+
"./package.json": "./package.json",
|
|
54
|
+
"./contract.json": "./contract.json",
|
|
55
|
+
"./components.manifest.json": "./components.manifest.json"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup && node scripts/build-css.mjs",
|
|
59
|
+
"dev": "tsup --watch --onSuccess \"node scripts/copy-css.mjs\"",
|
|
60
|
+
"typecheck": "tsc --noEmit",
|
|
61
|
+
"verify": "pnpm check:ds && pnpm typecheck && pnpm showcase:typecheck && pnpm build && pnpm check:bundle",
|
|
62
|
+
"manifest": "node scripts/manifest.mjs",
|
|
63
|
+
"check:ds": "node scripts/doctor.mjs",
|
|
64
|
+
"check:bundle": "node scripts/check-bundle.mjs",
|
|
65
|
+
"showcase": "vite --config showcase/vite.config.ts",
|
|
66
|
+
"showcase:build": "vite build --config showcase/vite.config.ts",
|
|
67
|
+
"showcase:typecheck": "tsc --noEmit -p showcase"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"@base-ui/react": ">=1.9",
|
|
71
|
+
"@shadcn/react": ">=0.3",
|
|
72
|
+
"class-variance-authority": ">=0.7",
|
|
73
|
+
"clsx": ">=2",
|
|
74
|
+
"cmdk": ">=1.1",
|
|
75
|
+
"date-fns": ">=4",
|
|
76
|
+
"embla-carousel-react": ">=8.6",
|
|
77
|
+
"input-otp": ">=1.5",
|
|
78
|
+
"lucide-react": ">=0.400",
|
|
79
|
+
"motion": ">=12",
|
|
80
|
+
"next-themes": ">=0.4",
|
|
81
|
+
"react": ">=19",
|
|
82
|
+
"react-day-picker": ">=10",
|
|
83
|
+
"react-dom": ">=19",
|
|
84
|
+
"react-resizable-panels": ">=4",
|
|
85
|
+
"recharts": ">=3",
|
|
86
|
+
"sonner": ">=2",
|
|
87
|
+
"tailwind-merge": ">=3",
|
|
88
|
+
"tailwindcss": ">=4.1",
|
|
89
|
+
"tw-animate-css": ">=1.3",
|
|
90
|
+
"echarts": ">=6",
|
|
91
|
+
"@tanstack/react-table": ">=9"
|
|
92
|
+
},
|
|
93
|
+
"peerDependenciesMeta": {
|
|
94
|
+
"next-themes": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"recharts": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"sonner": {
|
|
101
|
+
"optional": true
|
|
102
|
+
},
|
|
103
|
+
"@shadcn/react": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
106
|
+
"cmdk": {
|
|
107
|
+
"optional": true
|
|
108
|
+
},
|
|
109
|
+
"date-fns": {
|
|
110
|
+
"optional": true
|
|
111
|
+
},
|
|
112
|
+
"embla-carousel-react": {
|
|
113
|
+
"optional": true
|
|
114
|
+
},
|
|
115
|
+
"input-otp": {
|
|
116
|
+
"optional": true
|
|
117
|
+
},
|
|
118
|
+
"react-day-picker": {
|
|
119
|
+
"optional": true
|
|
120
|
+
},
|
|
121
|
+
"react-resizable-panels": {
|
|
122
|
+
"optional": true
|
|
123
|
+
},
|
|
124
|
+
"motion": {
|
|
125
|
+
"optional": true
|
|
126
|
+
},
|
|
127
|
+
"echarts": {
|
|
128
|
+
"optional": true
|
|
129
|
+
},
|
|
130
|
+
"@tanstack/react-table": {
|
|
131
|
+
"optional": true
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"devDependencies": {
|
|
135
|
+
"@base-ui/react": "^1.9.0",
|
|
136
|
+
"@shadcn/react": "^0.3.1",
|
|
137
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
138
|
+
"@tanstack/react-table": "^9.2.8",
|
|
139
|
+
"@types/react": "^19.2.0",
|
|
140
|
+
"@types/react-dom": "^19.2.0",
|
|
141
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
142
|
+
"class-variance-authority": "^0.7.1",
|
|
143
|
+
"clsx": "^2.1.1",
|
|
144
|
+
"cmdk": "^1.1.1",
|
|
145
|
+
"date-fns": "^4.4.0",
|
|
146
|
+
"echarts": "^6.1.0",
|
|
147
|
+
"embla-carousel-react": "^8.6.0",
|
|
148
|
+
"input-otp": "^1.5.0",
|
|
149
|
+
"lucide-react": "^0.577.0",
|
|
150
|
+
"motion": "^14.1.0",
|
|
151
|
+
"next-themes": "^0.4.6",
|
|
152
|
+
"react": "^19.2.0",
|
|
153
|
+
"react-day-picker": "^10.0.2",
|
|
154
|
+
"react-dom": "^19.2.0",
|
|
155
|
+
"react-resizable-panels": "^4.14.4",
|
|
156
|
+
"recharts": "3.8.0",
|
|
157
|
+
"sonner": "^2.0.8",
|
|
158
|
+
"tailwind-merge": "^3.0.2",
|
|
159
|
+
"tailwindcss": "^4.1.18",
|
|
160
|
+
"tsup": "^8.5.0",
|
|
161
|
+
"tw-animate-css": "^1.3.6",
|
|
162
|
+
"typescript": "^5.9.0",
|
|
163
|
+
"vite": "^8.3.4"
|
|
164
|
+
},
|
|
165
|
+
"bin": {
|
|
166
|
+
"orbital-ds-doctor": "./scripts/doctor.mjs",
|
|
167
|
+
"orbital-ds-init": "./scripts/init.mjs",
|
|
168
|
+
"orbital-ds-i18n": "./scripts/i18n.mjs"
|
|
169
|
+
},
|
|
170
|
+
"dependencies": {
|
|
171
|
+
"@clack/prompts": "^1.8.1"
|
|
172
|
+
}
|
|
173
|
+
}
|
package/scripts/doctor.mjs
CHANGED
|
File without changes
|
package/scripts/i18n.mjs
CHANGED
|
File without changes
|
package/scripts/init.mjs
CHANGED
|
File without changes
|