orbital-ds 0.44.1 → 0.48.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.
Files changed (310) hide show
  1. package/AGENTS.md +29 -6
  2. package/CHANGELOG.md +458 -0
  3. package/README.md +2 -2
  4. package/components.manifest.json +209 -48
  5. package/dist/hooks/use-esc-close-stack.js +38 -0
  6. package/dist/hooks/use-simulated-progress.js +30 -0
  7. package/dist/lib/brand-allowlist.js +703 -0
  8. package/dist/lib/brand-runtime.js +85 -0
  9. package/dist/lib/echarts-presets.js +152 -1
  10. package/dist/lib/echarts-setup.js +2 -0
  11. package/dist/lib/i18n.js +3 -0
  12. package/dist/lib/locales/de.js +1 -0
  13. package/dist/lib/locales/fr.js +1 -0
  14. package/dist/lib/locales/he.js +1 -0
  15. package/dist/lib/locales/it.js +1 -0
  16. package/dist/ui/context-menu.js +2 -2
  17. package/dist/ui/cta-banner.js +63 -0
  18. package/dist/ui/detail-panel.js +2 -2
  19. package/dist/ui/faq.js +25 -0
  20. package/dist/ui/feature-grid.js +40 -0
  21. package/dist/ui/landing-section.js +59 -0
  22. package/dist/ui/pricing-table.js +86 -0
  23. package/dist/ui/sheet.js +1 -1
  24. package/dist/ui/testimonial.js +61 -0
  25. package/docs/designer/patrones.md +7 -2
  26. package/manifest/actions.json +1 -1
  27. package/manifest/agents.json +1 -1
  28. package/manifest/ai.json +1 -1
  29. package/manifest/auth.json +1 -1
  30. package/manifest/chat.json +1 -1
  31. package/manifest/content.json +496 -1
  32. package/manifest/data.json +1 -103
  33. package/manifest/feedback.json +6 -6
  34. package/manifest/forms.json +1 -1
  35. package/manifest/motion.json +3 -3
  36. package/manifest/navigation.json +3 -3
  37. package/manifest/overlays.json +14 -11
  38. package/package.json +6 -8
  39. package/scripts/cli.mjs +19 -0
  40. package/scripts/doctor.mjs +28 -2
  41. package/scripts/eslint-plugin.mjs +32 -0
  42. package/scripts/manifest.mjs +20 -0
  43. package/scripts/upgrade.mjs +126 -0
  44. package/dist/auth-form-B1hgbXkI.d.ts +0 -144
  45. package/dist/hooks/use-ds-messages.d.ts +0 -544
  46. package/dist/hooks/use-ds-motion.d.ts +0 -17
  47. package/dist/hooks/use-in-view.d.ts +0 -9
  48. package/dist/hooks/use-mobile.d.ts +0 -3
  49. package/dist/lib/a2ui-catalog.d.ts +0 -42
  50. package/dist/lib/a2ui.d.ts +0 -289
  51. package/dist/lib/ai-events.d.ts +0 -15
  52. package/dist/lib/auth-better-auth.d.ts +0 -29
  53. package/dist/lib/auth-flow.d.ts +0 -85
  54. package/dist/lib/auth-providers.d.ts +0 -194
  55. package/dist/lib/auth.d.ts +0 -68
  56. package/dist/lib/echarts-presets.d.ts +0 -227
  57. package/dist/lib/echarts-server.d.ts +0 -15
  58. package/dist/lib/echarts-setup.d.ts +0 -8
  59. package/dist/lib/echarts-theme.d.ts +0 -36
  60. package/dist/lib/format.d.ts +0 -57
  61. package/dist/lib/header-control.d.ts +0 -4
  62. package/dist/lib/i18n.d.ts +0 -557
  63. package/dist/lib/image-upload.d.ts +0 -41
  64. package/dist/lib/locales/de.d.ts +0 -7
  65. package/dist/lib/locales/fr.d.ts +0 -7
  66. package/dist/lib/locales/he.d.ts +0 -7
  67. package/dist/lib/locales/it.d.ts +0 -7
  68. package/dist/lib/motion.d.ts +0 -74
  69. package/dist/lib/presets.d.ts +0 -8
  70. package/dist/lib/template-syntax.d.ts +0 -22
  71. package/dist/lib/utils.d.ts +0 -5
  72. package/dist/motion.css +0 -146
  73. package/dist/styles.css +0 -1775
  74. package/dist/themes/chocolate.css +0 -259
  75. package/dist/themes/chocolate.fonts.css +0 -2
  76. package/dist/themes/chocolate.guide.md +0 -30
  77. package/dist/themes/chocolate.meta.json +0 -61
  78. package/dist/themes/chocolate.scoped.css +0 -259
  79. package/dist/themes/chocolate.tokens.json +0 -49
  80. package/dist/themes/fractalia.css +0 -556
  81. package/dist/themes/fractalia.fonts.css +0 -3
  82. package/dist/themes/fractalia.guide.md +0 -86
  83. package/dist/themes/fractalia.meta.json +0 -112
  84. package/dist/themes/fractalia.scoped.css +0 -556
  85. package/dist/themes/fractalia.tokens.json +0 -39
  86. package/dist/themes/friendly.css +0 -375
  87. package/dist/themes/friendly.fonts.css +0 -2
  88. package/dist/themes/friendly.guide.md +0 -38
  89. package/dist/themes/friendly.meta.json +0 -82
  90. package/dist/themes/friendly.scoped.css +0 -375
  91. package/dist/themes/friendly.tokens.json +0 -45
  92. package/dist/themes/lagoon.css +0 -362
  93. package/dist/themes/lagoon.fonts.css +0 -2
  94. package/dist/themes/lagoon.guide.md +0 -47
  95. package/dist/themes/lagoon.meta.json +0 -85
  96. package/dist/themes/lagoon.scoped.css +0 -362
  97. package/dist/themes/lagoon.tokens.json +0 -49
  98. package/dist/themes/liquid.css +0 -510
  99. package/dist/themes/liquid.fonts.css +0 -7
  100. package/dist/themes/liquid.guide.md +0 -82
  101. package/dist/themes/liquid.meta.json +0 -134
  102. package/dist/themes/liquid.scoped.css +0 -510
  103. package/dist/themes/liquid.tokens.json +0 -47
  104. package/dist/themes/matcha.css +0 -259
  105. package/dist/themes/matcha.fonts.css +0 -2
  106. package/dist/themes/matcha.guide.md +0 -30
  107. package/dist/themes/matcha.meta.json +0 -61
  108. package/dist/themes/matcha.scoped.css +0 -259
  109. package/dist/themes/matcha.tokens.json +0 -49
  110. package/dist/themes/qratia.css +0 -264
  111. package/dist/themes/qratia.fonts.css +0 -2
  112. package/dist/themes/qratia.guide.md +0 -34
  113. package/dist/themes/qratia.meta.json +0 -49
  114. package/dist/themes/qratia.scoped.css +0 -264
  115. package/dist/themes/qratia.tokens.json +0 -49
  116. package/dist/themes/stone.css +0 -263
  117. package/dist/themes/stone.fonts.css +0 -2
  118. package/dist/themes/stone.guide.md +0 -30
  119. package/dist/themes/stone.meta.json +0 -47
  120. package/dist/themes/stone.scoped.css +0 -263
  121. package/dist/themes/stone.tokens.json +0 -49
  122. package/dist/themes/tactile.css +0 -596
  123. package/dist/themes/tactile.fonts.css +0 -3
  124. package/dist/themes/tactile.guide.md +0 -82
  125. package/dist/themes/tactile.meta.json +0 -182
  126. package/dist/themes/tactile.scoped.css +0 -596
  127. package/dist/themes/tactile.tokens.json +0 -42
  128. package/dist/themes/twitter.css +0 -364
  129. package/dist/themes/twitter.fonts.css +0 -6
  130. package/dist/themes/twitter.guide.md +0 -35
  131. package/dist/themes/twitter.meta.json +0 -90
  132. package/dist/themes/twitter.scoped.css +0 -364
  133. package/dist/themes/twitter.tokens.json +0 -45
  134. package/dist/themes/y2k.css +0 -259
  135. package/dist/themes/y2k.fonts.css +0 -2
  136. package/dist/themes/y2k.guide.md +0 -30
  137. package/dist/themes/y2k.meta.json +0 -59
  138. package/dist/themes/y2k.scoped.css +0 -259
  139. package/dist/themes/y2k.tokens.json +0 -49
  140. package/dist/themes/zyro.css +0 -442
  141. package/dist/themes/zyro.fonts.css +0 -2
  142. package/dist/themes/zyro.guide.md +0 -33
  143. package/dist/themes/zyro.meta.json +0 -74
  144. package/dist/themes/zyro.scoped.css +0 -442
  145. package/dist/themes/zyro.tokens.json +0 -46
  146. package/dist/ui/a2ui-renderer.d.ts +0 -44
  147. package/dist/ui/accordion.d.ts +0 -9
  148. package/dist/ui/agent-events.d.ts +0 -49
  149. package/dist/ui/ai-tag.d.ts +0 -24
  150. package/dist/ui/alert-dialog.d.ts +0 -60
  151. package/dist/ui/alert.d.ts +0 -13
  152. package/dist/ui/animated-number.d.ts +0 -20
  153. package/dist/ui/app-bar.d.ts +0 -32
  154. package/dist/ui/aspect-ratio.d.ts +0 -7
  155. package/dist/ui/attachment.d.ts +0 -26
  156. package/dist/ui/auth-backdrop.d.ts +0 -37
  157. package/dist/ui/auth-form.d.ts +0 -4
  158. package/dist/ui/auth-layout.d.ts +0 -110
  159. package/dist/ui/auth-parts.d.ts +0 -43
  160. package/dist/ui/auth-status.d.ts +0 -23
  161. package/dist/ui/avatar.d.ts +0 -43
  162. package/dist/ui/ayuda.d.ts +0 -22
  163. package/dist/ui/badge.d.ts +0 -15
  164. package/dist/ui/banner.d.ts +0 -14
  165. package/dist/ui/bottom-nav.d.ts +0 -37
  166. package/dist/ui/breadcrumb.d.ts +0 -34
  167. package/dist/ui/bubble.d.ts +0 -19
  168. package/dist/ui/button-group.d.ts +0 -15
  169. package/dist/ui/button.d.ts +0 -14
  170. package/dist/ui/calendar.d.ts +0 -28
  171. package/dist/ui/card-stack.d.ts +0 -36
  172. package/dist/ui/card.d.ts +0 -61
  173. package/dist/ui/carousel.d.ts +0 -68
  174. package/dist/ui/chain-of-thought.d.ts +0 -34
  175. package/dist/ui/chart-card.d.ts +0 -47
  176. package/dist/ui/chart.d.ts +0 -65
  177. package/dist/ui/chart.js +0 -254
  178. package/dist/ui/chat-composer.d.ts +0 -58
  179. package/dist/ui/checkbox.d.ts +0 -6
  180. package/dist/ui/choice-card.d.ts +0 -49
  181. package/dist/ui/code-block.d.ts +0 -29
  182. package/dist/ui/collapsible.d.ts +0 -8
  183. package/dist/ui/combobox.d.ts +0 -74
  184. package/dist/ui/command-palette.d.ts +0 -54
  185. package/dist/ui/command.d.ts +0 -56
  186. package/dist/ui/confirm-action.d.ts +0 -48
  187. package/dist/ui/confirm-dialog.d.ts +0 -44
  188. package/dist/ui/connected-accounts.d.ts +0 -25
  189. package/dist/ui/content-card.d.ts +0 -66
  190. package/dist/ui/context-menu.d.ts +0 -66
  191. package/dist/ui/conversation-list.d.ts +0 -44
  192. package/dist/ui/copy-button.d.ts +0 -25
  193. package/dist/ui/data-table.d.ts +0 -198
  194. package/dist/ui/date-picker.d.ts +0 -65
  195. package/dist/ui/date-time.d.ts +0 -40
  196. package/dist/ui/description-list.d.ts +0 -49
  197. package/dist/ui/detail-panel.d.ts +0 -38
  198. package/dist/ui/dialog.d.ts +0 -54
  199. package/dist/ui/direction.d.ts +0 -1
  200. package/dist/ui/dock.d.ts +0 -30
  201. package/dist/ui/drawer.d.ts +0 -59
  202. package/dist/ui/dropdown-menu.d.ts +0 -63
  203. package/dist/ui/dropzone.d.ts +0 -44
  204. package/dist/ui/echart.d.ts +0 -46
  205. package/dist/ui/empty-state.d.ts +0 -26
  206. package/dist/ui/empty.d.ts +0 -15
  207. package/dist/ui/entity-list.d.ts +0 -57
  208. package/dist/ui/error-page.d.ts +0 -28
  209. package/dist/ui/error-state.d.ts +0 -16
  210. package/dist/ui/eyebrow.d.ts +0 -7
  211. package/dist/ui/field.d.ts +0 -28
  212. package/dist/ui/file-upload.d.ts +0 -42
  213. package/dist/ui/filter-bar.d.ts +0 -38
  214. package/dist/ui/form-layout.d.ts +0 -43
  215. package/dist/ui/gauge.d.ts +0 -66
  216. package/dist/ui/generated-image.d.ts +0 -33
  217. package/dist/ui/generated-table.d.ts +0 -29
  218. package/dist/ui/heatmap-grid.d.ts +0 -59
  219. package/dist/ui/hero.d.ts +0 -58
  220. package/dist/ui/hover-card.d.ts +0 -8
  221. package/dist/ui/i18n-provider.d.ts +0 -27
  222. package/dist/ui/icon-tile.d.ts +0 -11
  223. package/dist/ui/input-group.d.ts +0 -22
  224. package/dist/ui/input-otp.d.ts +0 -36
  225. package/dist/ui/input.d.ts +0 -21
  226. package/dist/ui/instruction-editor.d.ts +0 -81
  227. package/dist/ui/item.d.ts +0 -26
  228. package/dist/ui/kbd.d.ts +0 -6
  229. package/dist/ui/label.d.ts +0 -22
  230. package/dist/ui/legend.d.ts +0 -57
  231. package/dist/ui/level-meter.d.ts +0 -28
  232. package/dist/ui/load-more.d.ts +0 -36
  233. package/dist/ui/loading-state.d.ts +0 -26
  234. package/dist/ui/locale-switcher.d.ts +0 -19
  235. package/dist/ui/markdown.d.ts +0 -29
  236. package/dist/ui/marker.d.ts +0 -13
  237. package/dist/ui/media-card.d.ts +0 -29
  238. package/dist/ui/menubar.d.ts +0 -70
  239. package/dist/ui/message-actions.d.ts +0 -21
  240. package/dist/ui/message-scroller.d.ts +0 -46
  241. package/dist/ui/message.d.ts +0 -45
  242. package/dist/ui/mfa-challenge.d.ts +0 -4
  243. package/dist/ui/mfa-setup.d.ts +0 -29
  244. package/dist/ui/mosaic.d.ts +0 -38
  245. package/dist/ui/motion-provider.d.ts +0 -28
  246. package/dist/ui/native-select.d.ts +0 -32
  247. package/dist/ui/navigation-menu.d.ts +0 -15
  248. package/dist/ui/next-step-card.d.ts +0 -55
  249. package/dist/ui/notice-review.d.ts +0 -64
  250. package/dist/ui/notifications.d.ts +0 -81
  251. package/dist/ui/oauth-consent.d.ts +0 -54
  252. package/dist/ui/page-header.d.ts +0 -64
  253. package/dist/ui/page-loader.d.ts +0 -40
  254. package/dist/ui/page-shell.d.ts +0 -25
  255. package/dist/ui/pagination.d.ts +0 -42
  256. package/dist/ui/panel.d.ts +0 -12
  257. package/dist/ui/passkey-list.d.ts +0 -17
  258. package/dist/ui/password-input.d.ts +0 -5
  259. package/dist/ui/password-strength.d.ts +0 -28
  260. package/dist/ui/popover.d.ts +0 -44
  261. package/dist/ui/progress.d.ts +0 -9
  262. package/dist/ui/proportion-bar.d.ts +0 -52
  263. package/dist/ui/quantity.d.ts +0 -25
  264. package/dist/ui/questionnaire.d.ts +0 -62
  265. package/dist/ui/radio-group.d.ts +0 -8
  266. package/dist/ui/reasoning.d.ts +0 -24
  267. package/dist/ui/resizable.d.ts +0 -10
  268. package/dist/ui/reveal.d.ts +0 -28
  269. package/dist/ui/scroll-area.d.ts +0 -7
  270. package/dist/ui/search-box.d.ts +0 -32
  271. package/dist/ui/select.d.ts +0 -19
  272. package/dist/ui/separator.d.ts +0 -6
  273. package/dist/ui/session-list.d.ts +0 -19
  274. package/dist/ui/session-timeout.d.ts +0 -13
  275. package/dist/ui/sheet.d.ts +0 -53
  276. package/dist/ui/shield.d.ts +0 -35
  277. package/dist/ui/show-more.d.ts +0 -26
  278. package/dist/ui/sidebar.d.ts +0 -92
  279. package/dist/ui/sign-out-dialog.d.ts +0 -17
  280. package/dist/ui/skeleton.d.ts +0 -10
  281. package/dist/ui/slider.d.ts +0 -23
  282. package/dist/ui/sonner.d.ts +0 -6
  283. package/dist/ui/sparkline.d.ts +0 -26
  284. package/dist/ui/spinner.d.ts +0 -5
  285. package/dist/ui/stat-group.d.ts +0 -40
  286. package/dist/ui/stat.d.ts +0 -90
  287. package/dist/ui/status-badge.d.ts +0 -39
  288. package/dist/ui/status-hero.d.ts +0 -30
  289. package/dist/ui/step-dots.d.ts +0 -22
  290. package/dist/ui/step-flow.d.ts +0 -48
  291. package/dist/ui/step-ring.d.ts +0 -26
  292. package/dist/ui/stepper.d.ts +0 -20
  293. package/dist/ui/suggestions.d.ts +0 -17
  294. package/dist/ui/switch.d.ts +0 -8
  295. package/dist/ui/table.d.ts +0 -38
  296. package/dist/ui/tabs.d.ts +0 -14
  297. package/dist/ui/tag-input.d.ts +0 -21
  298. package/dist/ui/task-loader.d.ts +0 -29
  299. package/dist/ui/task-progress.d.ts +0 -32
  300. package/dist/ui/textarea.d.ts +0 -32
  301. package/dist/ui/theme-toggle.d.ts +0 -14
  302. package/dist/ui/timeline.d.ts +0 -55
  303. package/dist/ui/toast.d.ts +0 -19
  304. package/dist/ui/toggle-group.d.ts +0 -38
  305. package/dist/ui/toggle.d.ts +0 -12
  306. package/dist/ui/tool-call.d.ts +0 -27
  307. package/dist/ui/tooltip.d.ts +0 -9
  308. package/dist/ui/usage-meter.d.ts +0 -42
  309. package/dist/ui/week-strip.d.ts +0 -23
  310. package/dist/ui/workflow-run.d.ts +0 -51
@@ -1,227 +0,0 @@
1
- import { EChartsCoreOption } from 'echarts/core';
2
-
3
- /** Valor de una serie: `null` = sin dato (hueco), nunca 0. */
4
- type DsChartValue = number | null;
5
- interface DsSeries {
6
- name: string;
7
- data: DsChartValue[];
8
- /** Grupo de apilado propio (si no, el de `stack` del constructor). */
9
- stack?: string;
10
- }
11
- /** Formatea un valor en el tooltip y las etiquetas (p. ej. con Intl.NumberFormat). */
12
- type DsValueFormatter = (value: number) => string;
13
- /** Línea o área de referencia (las crean `referenceLine` y `referenceArea`). */
14
- type DsReference = {
15
- kind: "line";
16
- markLine: Record<string, unknown>;
17
- } | {
18
- kind: "area";
19
- markArea: Record<string, unknown>;
20
- };
21
- type Obj = Record<string, unknown>;
22
- interface CommonOptions {
23
- /** Muestra la leyenda (por defecto, si hay más de una serie). */
24
- legend?: boolean;
25
- /** Formato de los valores (tooltip y ejes de valor). */
26
- valueFormatter?: DsValueFormatter;
27
- /** Opciones propias fusionadas por encima del resultado. */
28
- extend?: Obj;
29
- }
30
- /**
31
- * Línea de referencia (objetivo, umbral de SLA…). `axis` es el eje del VALOR: "y" en
32
- * gráficos verticales (por defecto) y "x" en barras horizontales.
33
- */
34
- declare function referenceLine(value: number, label?: string, { axis }?: {
35
- axis?: "x" | "y";
36
- }): DsReference;
37
- /**
38
- * Banda de referencia entre dos valores (franja horaria, zona de alerta…). Con `axis: "x"`
39
- * acepta categorías del eje X (p. ej. "08:00" → "15:00"); con "y", valores.
40
- */
41
- declare function referenceArea(from: number | string, to: number | string, label?: string, { axis }?: {
42
- axis?: "x" | "y";
43
- }): DsReference;
44
- /**
45
- * Escapa texto para HTML. Un `formatter` de tooltip que devuelve una cadena se pinta COMO
46
- * HTML: todo lo interpolado (categorías, nombres de serie, etiquetas, valores formateados)
47
- * puede venir de datos de usuario y debe pasar por aquí. El tooltip por defecto de ECharts
48
- * (nombres y `valueFormatter`) ya escapa; las etiquetas de serie, markLine y markArea son
49
- * texto del lienzo/SVG, no HTML.
50
- */
51
- declare function escapeHtml(value: unknown): string;
52
- interface LineOptionInput extends CommonOptions {
53
- categories: Array<string | number>;
54
- series: DsSeries[];
55
- /** Rellena el área bajo cada línea. */
56
- area?: boolean;
57
- /** Apila las series (true = un solo grupo, o el nombre del grupo). */
58
- stack?: boolean | string;
59
- smooth?: boolean;
60
- /** Sin puntos en la línea (series largas). */
61
- showSymbols?: boolean;
62
- /** Une los huecos (`null`) en lugar de cortar la línea. */
63
- connectNulls?: boolean;
64
- references?: DsReference[];
65
- yName?: string;
66
- /** Activa el zoom horizontal con la rueda y el arrastre. */
67
- zoom?: boolean;
68
- }
69
- declare function lineOption(input: LineOptionInput): EChartsCoreOption;
70
- interface BarOptionInput extends CommonOptions {
71
- categories: Array<string | number>;
72
- series: DsSeries[];
73
- /** Barras horizontales (categorías en el eje Y). */
74
- horizontal?: boolean;
75
- stack?: boolean | string;
76
- /**
77
- * Ranking: ordena la PRIMERA serie de mayor a menor (horizontal por defecto, la mayor
78
- * arriba) y reordena las demás igual.
79
- */
80
- ranking?: boolean;
81
- /** Etiqueta con el valor al final de cada barra. */
82
- showLabels?: boolean;
83
- references?: DsReference[];
84
- }
85
- declare function barOption(input: BarOptionInput): EChartsCoreOption;
86
- interface ComboOptionInput extends Omit<CommonOptions, "valueFormatter"> {
87
- categories: Array<string | number>;
88
- /** Series de barras (eje izquierdo/inicial). */
89
- bars: DsSeries[];
90
- /** Series de línea (eje derecho/final). */
91
- lines: DsSeries[];
92
- barAxisName?: string;
93
- lineAxisName?: string;
94
- barFormatter?: DsValueFormatter;
95
- lineFormatter?: DsValueFormatter;
96
- stackBars?: boolean;
97
- smooth?: boolean;
98
- /** Referencias sobre el eje de las líneas (p. ej. objetivo de SLA). */
99
- references?: DsReference[];
100
- }
101
- declare function comboOption(input: ComboOptionInput): EChartsCoreOption;
102
- interface HeatmapOptionInput extends CommonOptions {
103
- /** Columnas (p. ej. horas "00"…"23"). */
104
- xCategories: Array<string | number>;
105
- /** Filas (p. ej. días "Lun"…"Dom"). */
106
- yCategories: Array<string | number>;
107
- /** Matriz [fila][columna]; `null` = sin dato (celda vacía, nunca 0). */
108
- values: DsChartValue[][];
109
- min?: number;
110
- max?: number;
111
- /** Muestra el valor en cada celda. */
112
- showLabels?: boolean;
113
- /** Muestra el mapa visual (escala) bajo el gráfico. */
114
- showScale?: boolean;
115
- }
116
- declare function heatmapOption(input: HeatmapOptionInput): EChartsCoreOption;
117
- interface SankeyLink {
118
- source: string;
119
- target: string;
120
- value: number;
121
- }
122
- interface SankeyOptionInput extends CommonOptions {
123
- /** Nodos (si se omiten, salen de los enlaces). */
124
- nodes?: string[];
125
- links: SankeyLink[];
126
- orient?: "horizontal" | "vertical";
127
- }
128
- declare function sankeyOption(input: SankeyOptionInput): EChartsCoreOption;
129
- interface GaugeOptionInput extends Omit<CommonOptions, "legend"> {
130
- value: number | null;
131
- min?: number;
132
- max?: number;
133
- /** Nombre bajo la cifra (p. ej. "SLA"). */
134
- name?: string;
135
- /** Marcas del eje (por defecto, 5 tramos). */
136
- splitNumber?: number;
137
- }
138
- declare function gaugeOption(input: GaugeOptionInput): EChartsCoreOption;
139
- interface PieOptionInput extends CommonOptions {
140
- data: Array<{
141
- name: string;
142
- value: number;
143
- }>;
144
- /** Donut (por defecto) o tarta llena. */
145
- donut?: boolean;
146
- /** Texto en el centro del donut (p. ej. el total). */
147
- centerLabel?: string;
148
- centerSubLabel?: string;
149
- showLabels?: boolean;
150
- }
151
- declare function pieOption(input: PieOptionInput): EChartsCoreOption;
152
- interface ScatterOptionInput extends CommonOptions {
153
- /** Cada serie es un grupo de puntos `[x, y]` (o `[x, y, tamaño]` con `sizeAxis`). */
154
- series: Array<{
155
- name: string;
156
- data: Array<[number, number] | [number, number, number]>;
157
- }>;
158
- xName?: string;
159
- yName?: string;
160
- /** La tercera coordenada de cada punto da su tamaño (burbujas). */
161
- sizeAxis?: boolean;
162
- /** Formateador del eje X (el del valor se usa para Y). */
163
- xFormatter?: DsValueFormatter;
164
- zoom?: boolean;
165
- }
166
- declare function scatterOption(input: ScatterOptionInput): EChartsCoreOption;
167
- interface RadarOptionInput extends CommonOptions {
168
- /** Dimensiones y su máximo (la escala de cada eje). */
169
- indicators: Array<{
170
- name: string;
171
- max: number;
172
- }>;
173
- series: Array<{
174
- name: string;
175
- data: number[];
176
- }>;
177
- /** Rellena el área de cada serie. */
178
- area?: boolean;
179
- }
180
- declare function radarOption(input: RadarOptionInput): EChartsCoreOption;
181
- interface FunnelOptionInput extends CommonOptions {
182
- /** Etapas de mayor a menor; el nombre sale en la etiqueta. */
183
- data: Array<{
184
- name: string;
185
- value: number;
186
- }>;
187
- /** Muestra el valor en cada etapa. */
188
- showValues?: boolean;
189
- }
190
- declare function funnelOption(input: FunnelOptionInput): EChartsCoreOption;
191
- interface HierarchyNode {
192
- name: string;
193
- value?: number;
194
- children?: HierarchyNode[];
195
- }
196
- interface TreemapOptionInput extends CommonOptions {
197
- data: HierarchyNode[];
198
- /** Muestra la ruta de migas para bajar y subir de nivel. */
199
- breadcrumb?: boolean;
200
- }
201
- /** Peso relativo de partes de un todo con varios niveles (presupuesto, espacio en disco). */
202
- declare function treemapOption(input: TreemapOptionInput): EChartsCoreOption;
203
- interface SunburstOptionInput extends CommonOptions {
204
- data: HierarchyNode[];
205
- }
206
- /** Composición en anillos concéntricos (cada anillo, un nivel de la jerarquía). */
207
- declare function sunburstOption(input: SunburstOptionInput): EChartsCoreOption;
208
- interface CandlestickOptionInput extends CommonOptions {
209
- categories: Array<string | number>;
210
- /** Por categoría: `[apertura, cierre, mínimo, máximo]`. */
211
- data: Array<[number, number, number, number]>;
212
- name?: string;
213
- zoom?: boolean;
214
- }
215
- /** Precios o medidas con apertura, cierre, mínimo y máximo por periodo. */
216
- declare function candlestickOption(input: CandlestickOptionInput): EChartsCoreOption;
217
- interface BoxplotOptionInput extends CommonOptions {
218
- categories: Array<string | number>;
219
- /** Por categoría, ya calculado: `[mínimo, Q1, mediana, Q3, máximo]`. */
220
- data: Array<[number, number, number, number, number]>;
221
- name?: string;
222
- horizontal?: boolean;
223
- }
224
- /** Distribución de una medida por grupo (mediana, cuartiles y extremos). */
225
- declare function boxplotOption(input: BoxplotOptionInput): EChartsCoreOption;
226
-
227
- export { type BarOptionInput, type BoxplotOptionInput, type CandlestickOptionInput, type ComboOptionInput, type DsChartValue, type DsReference, type DsSeries, type DsValueFormatter, type FunnelOptionInput, type GaugeOptionInput, type HeatmapOptionInput, type HierarchyNode, type LineOptionInput, type PieOptionInput, type RadarOptionInput, type SankeyLink, type SankeyOptionInput, type ScatterOptionInput, type SunburstOptionInput, type TreemapOptionInput, barOption, boxplotOption, candlestickOption, comboOption, escapeHtml, funnelOption, gaugeOption, heatmapOption, lineOption, pieOption, radarOption, referenceArea, referenceLine, sankeyOption, scatterOption, sunburstOption, treemapOption };
@@ -1,15 +0,0 @@
1
- import { EChartsCoreOption } from 'echarts/core';
2
- import { DsChartTokens, DsEchartsTheme } from './echarts-theme.js';
3
-
4
- interface RenderEChartOptions {
5
- width: number;
6
- height: number;
7
- /** Valores del tema (piel `light` o `dark` de `<tema>.tokens.json`), o un tema ya montado. */
8
- tokens?: DsChartTokens;
9
- theme?: DsEchartsTheme;
10
- /** Sin animación por defecto: en un documento no se ve. */
11
- animation?: boolean;
12
- }
13
- declare function renderEChartToSvg(option: EChartsCoreOption, { width, height, tokens, theme, animation }: RenderEChartOptions): string;
14
-
15
- export { type RenderEChartOptions, renderEChartToSvg };
@@ -1,8 +0,0 @@
1
- import * as echarts from 'echarts/core';
2
- export { echarts };
3
- export { EChartsCoreOption as DsEChartOption } from 'echarts/core';
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 };
@@ -1,36 +0,0 @@
1
- /** Valores de un tema que necesita un gráfico (lo que trae `<tema>.tokens.json`). */
2
- interface DsChartTokens {
3
- palette: string[];
4
- foreground: string;
5
- muted: string;
6
- border: string;
7
- surface: string;
8
- surfaceForeground: string;
9
- fontSans: string;
10
- fontDisplay: string;
11
- motionBaseMs: number;
12
- motionSlowMs: number;
13
- }
14
- interface DsEchartsTheme {
15
- color: string[];
16
- backgroundColor: string;
17
- textStyle: {
18
- fontFamily: string;
19
- color: string;
20
- };
21
- [key: string]: unknown;
22
- }
23
- /** Color CSS cualquiera (oklch, color-mix…) → `rgba(r, g, b, a)`. Fuera del navegador lo devuelve tal cual. */
24
- declare function dsResolveColor(value: string): string;
25
- /** Lee del navegador los valores del tema ACTIVO (con la marca de la app). */
26
- declare function dsChartTokens(el?: Element): DsChartTokens;
27
- /** Paleta de series del tema activo, en RGB. */
28
- declare function dsChartPalette(el?: Element): string[];
29
- /** Tema de ECharts a partir de los valores de un tema (navegador o servidor). */
30
- declare function dsEchartsThemeFromTokens(t: DsChartTokens, { reducedMotion }?: {
31
- reducedMotion?: boolean | undefined;
32
- }): DsEchartsTheme;
33
- /** Tema de ECharts para el tema ACTIVO en el navegador. */
34
- declare function dsEchartsTheme(el?: Element): DsEchartsTheme;
35
-
36
- export { type DsChartTokens, type DsEchartsTheme, dsChartPalette, dsChartTokens, dsEchartsTheme, dsEchartsThemeFromTokens, dsResolveColor };
@@ -1,57 +0,0 @@
1
- type DsUnitDisplay = "short" | "long" | "narrow";
2
- interface DsQuantityOptions {
3
- /** Etiqueta BCP 47 (p. ej. "es", "pt-BR"). Por defecto, la del entorno. */
4
- locale?: string;
5
- /** "si" (1000, GB) por defecto; "binary" (1024, GiB) para memoria o cuando el contrato lo diga. */
6
- system?: "si" | "binary";
7
- /** Forma de la unidad: "short" (12 GB), "long" (12 gigabytes), "narrow" (12GB). */
8
- unitDisplay?: DsUnitDisplay;
9
- /** Decimales máximos. Por defecto: 1 en bytes y tasas escaladas, 0 en el resto salvo que el valor los traiga. */
10
- maximumFractionDigits?: number;
11
- /** Notación compacta para recuentos grandes (1,2 mil). */
12
- compact?: boolean;
13
- }
14
- /** ¿La unidad es de bytes (UCUM)? */
15
- declare function isByteUnit(unit: string | undefined): boolean;
16
- /** Pasa un valor en bytes UCUM (`GBy`, `MiBy`…) a bytes. Devuelve null si la unidad no es de bytes. */
17
- declare function toBytes(value: number, unit: string): number | null;
18
- /**
19
- * Formatea un valor con su unidad UCUM en el idioma indicado.
20
- *
21
- * formatQuantity(12_000_000_000, "By", { locale: "es" }) → "12 GB"
22
- * formatQuantity(50, "GBy", { locale: "es" }) → "50 GB"
23
- * formatQuantity(73.5, "%", { locale: "es" }) → "73,5 %"
24
- * formatQuantity(3, "{device}") → "3"
25
- * formatQuantity(null, "By") → null
26
- */
27
- declare function formatQuantity(value: number | null | undefined, unit?: string, options?: DsQuantityOptions): string | null;
28
- /** Proporción (0..1) como porcentaje: formatRatio(0.24, { locale: "es" }) → "24 %". */
29
- declare function formatRatio(ratio: number | null | undefined, options?: {
30
- locale?: string;
31
- maximumFractionDigits?: number;
32
- }): string | null;
33
- type DsDateInput = Date | string | number | null | undefined;
34
- /** Pasa una fecha (Date, ISO 8601 o milisegundos) a Date; null si no es válida. */
35
- declare function toDate(input: DsDateInput): Date | null;
36
- type DsDateStyle = "date" | "datetime" | "time" | "long" | "short";
37
- /** Fecha absoluta en el idioma indicado. `style` o, para algo concreto, `format` (Intl.DateTimeFormatOptions). */
38
- declare function formatDate(input: DsDateInput, options?: {
39
- locale?: string;
40
- style?: DsDateStyle;
41
- format?: Intl.DateTimeFormatOptions;
42
- timeZone?: string;
43
- }): string | null;
44
- /**
45
- * Tiempo relativo («hace 5 minutos», «en 3 días», «ayer») eligiendo la unidad sola.
46
- * `now` permite fijar el instante de referencia (pruebas, servidor).
47
- */
48
- declare function formatRelativeTime(input: DsDateInput, options?: {
49
- locale?: string;
50
- now?: DsDateInput;
51
- numeric?: "auto" | "always";
52
- style?: "long" | "short" | "narrow";
53
- }): string | null;
54
- /** Cada cuánto conviene refrescar un tiempo relativo según su distancia al presente (ms). */
55
- declare function relativeTimeRefreshMs(input: DsDateInput, now?: DsDateInput): number;
56
-
57
- export { type DsDateInput, type DsDateStyle, type DsQuantityOptions, type DsUnitDisplay, formatDate, formatQuantity, formatRatio, formatRelativeTime, isByteUnit, relativeTimeRefreshMs, toBytes, toDate };
@@ -1,4 +0,0 @@
1
- type HeaderControlTone = "neutral" | "brand" | "soft";
2
- declare function headerControlClass(tone?: HeaderControlTone): string;
3
-
4
- export { type HeaderControlTone, headerControlClass };