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.
- package/AGENTS.md +29 -6
- package/CHANGELOG.md +458 -0
- package/README.md +2 -2
- package/components.manifest.json +209 -48
- package/dist/hooks/use-esc-close-stack.js +38 -0
- package/dist/hooks/use-simulated-progress.js +30 -0
- package/dist/lib/brand-allowlist.js +703 -0
- package/dist/lib/brand-runtime.js +85 -0
- package/dist/lib/echarts-presets.js +152 -1
- package/dist/lib/echarts-setup.js +2 -0
- package/dist/lib/i18n.js +3 -0
- package/dist/lib/locales/de.js +1 -0
- package/dist/lib/locales/fr.js +1 -0
- package/dist/lib/locales/he.js +1 -0
- package/dist/lib/locales/it.js +1 -0
- package/dist/ui/context-menu.js +2 -2
- package/dist/ui/cta-banner.js +63 -0
- package/dist/ui/detail-panel.js +2 -2
- package/dist/ui/faq.js +25 -0
- package/dist/ui/feature-grid.js +40 -0
- package/dist/ui/landing-section.js +59 -0
- package/dist/ui/pricing-table.js +86 -0
- package/dist/ui/sheet.js +1 -1
- package/dist/ui/testimonial.js +61 -0
- package/docs/designer/patrones.md +7 -2
- package/manifest/actions.json +1 -1
- package/manifest/agents.json +1 -1
- package/manifest/ai.json +1 -1
- package/manifest/auth.json +1 -1
- package/manifest/chat.json +1 -1
- package/manifest/content.json +496 -1
- package/manifest/data.json +1 -103
- package/manifest/feedback.json +6 -6
- package/manifest/forms.json +1 -1
- package/manifest/motion.json +3 -3
- package/manifest/navigation.json +3 -3
- package/manifest/overlays.json +14 -11
- package/package.json +6 -8
- package/scripts/cli.mjs +19 -0
- package/scripts/doctor.mjs +28 -2
- package/scripts/eslint-plugin.mjs +32 -0
- package/scripts/manifest.mjs +20 -0
- package/scripts/upgrade.mjs +126 -0
- package/dist/auth-form-B1hgbXkI.d.ts +0 -144
- package/dist/hooks/use-ds-messages.d.ts +0 -544
- package/dist/hooks/use-ds-motion.d.ts +0 -17
- package/dist/hooks/use-in-view.d.ts +0 -9
- package/dist/hooks/use-mobile.d.ts +0 -3
- package/dist/lib/a2ui-catalog.d.ts +0 -42
- package/dist/lib/a2ui.d.ts +0 -289
- package/dist/lib/ai-events.d.ts +0 -15
- package/dist/lib/auth-better-auth.d.ts +0 -29
- package/dist/lib/auth-flow.d.ts +0 -85
- package/dist/lib/auth-providers.d.ts +0 -194
- package/dist/lib/auth.d.ts +0 -68
- package/dist/lib/echarts-presets.d.ts +0 -227
- package/dist/lib/echarts-server.d.ts +0 -15
- package/dist/lib/echarts-setup.d.ts +0 -8
- package/dist/lib/echarts-theme.d.ts +0 -36
- package/dist/lib/format.d.ts +0 -57
- package/dist/lib/header-control.d.ts +0 -4
- package/dist/lib/i18n.d.ts +0 -557
- package/dist/lib/image-upload.d.ts +0 -41
- package/dist/lib/locales/de.d.ts +0 -7
- package/dist/lib/locales/fr.d.ts +0 -7
- package/dist/lib/locales/he.d.ts +0 -7
- package/dist/lib/locales/it.d.ts +0 -7
- package/dist/lib/motion.d.ts +0 -74
- package/dist/lib/presets.d.ts +0 -8
- package/dist/lib/template-syntax.d.ts +0 -22
- package/dist/lib/utils.d.ts +0 -5
- package/dist/motion.css +0 -146
- package/dist/styles.css +0 -1775
- package/dist/themes/chocolate.css +0 -259
- package/dist/themes/chocolate.fonts.css +0 -2
- package/dist/themes/chocolate.guide.md +0 -30
- package/dist/themes/chocolate.meta.json +0 -61
- package/dist/themes/chocolate.scoped.css +0 -259
- package/dist/themes/chocolate.tokens.json +0 -49
- package/dist/themes/fractalia.css +0 -556
- package/dist/themes/fractalia.fonts.css +0 -3
- package/dist/themes/fractalia.guide.md +0 -86
- package/dist/themes/fractalia.meta.json +0 -112
- package/dist/themes/fractalia.scoped.css +0 -556
- package/dist/themes/fractalia.tokens.json +0 -39
- package/dist/themes/friendly.css +0 -375
- package/dist/themes/friendly.fonts.css +0 -2
- package/dist/themes/friendly.guide.md +0 -38
- package/dist/themes/friendly.meta.json +0 -82
- package/dist/themes/friendly.scoped.css +0 -375
- package/dist/themes/friendly.tokens.json +0 -45
- package/dist/themes/lagoon.css +0 -362
- package/dist/themes/lagoon.fonts.css +0 -2
- package/dist/themes/lagoon.guide.md +0 -47
- package/dist/themes/lagoon.meta.json +0 -85
- package/dist/themes/lagoon.scoped.css +0 -362
- package/dist/themes/lagoon.tokens.json +0 -49
- package/dist/themes/liquid.css +0 -510
- package/dist/themes/liquid.fonts.css +0 -7
- package/dist/themes/liquid.guide.md +0 -82
- package/dist/themes/liquid.meta.json +0 -134
- package/dist/themes/liquid.scoped.css +0 -510
- package/dist/themes/liquid.tokens.json +0 -47
- package/dist/themes/matcha.css +0 -259
- package/dist/themes/matcha.fonts.css +0 -2
- package/dist/themes/matcha.guide.md +0 -30
- package/dist/themes/matcha.meta.json +0 -61
- package/dist/themes/matcha.scoped.css +0 -259
- package/dist/themes/matcha.tokens.json +0 -49
- package/dist/themes/qratia.css +0 -264
- package/dist/themes/qratia.fonts.css +0 -2
- package/dist/themes/qratia.guide.md +0 -34
- package/dist/themes/qratia.meta.json +0 -49
- package/dist/themes/qratia.scoped.css +0 -264
- package/dist/themes/qratia.tokens.json +0 -49
- package/dist/themes/stone.css +0 -263
- package/dist/themes/stone.fonts.css +0 -2
- package/dist/themes/stone.guide.md +0 -30
- package/dist/themes/stone.meta.json +0 -47
- package/dist/themes/stone.scoped.css +0 -263
- package/dist/themes/stone.tokens.json +0 -49
- package/dist/themes/tactile.css +0 -596
- package/dist/themes/tactile.fonts.css +0 -3
- package/dist/themes/tactile.guide.md +0 -82
- package/dist/themes/tactile.meta.json +0 -182
- package/dist/themes/tactile.scoped.css +0 -596
- package/dist/themes/tactile.tokens.json +0 -42
- package/dist/themes/twitter.css +0 -364
- package/dist/themes/twitter.fonts.css +0 -6
- package/dist/themes/twitter.guide.md +0 -35
- package/dist/themes/twitter.meta.json +0 -90
- package/dist/themes/twitter.scoped.css +0 -364
- package/dist/themes/twitter.tokens.json +0 -45
- package/dist/themes/y2k.css +0 -259
- package/dist/themes/y2k.fonts.css +0 -2
- package/dist/themes/y2k.guide.md +0 -30
- package/dist/themes/y2k.meta.json +0 -59
- package/dist/themes/y2k.scoped.css +0 -259
- package/dist/themes/y2k.tokens.json +0 -49
- package/dist/themes/zyro.css +0 -442
- package/dist/themes/zyro.fonts.css +0 -2
- package/dist/themes/zyro.guide.md +0 -33
- package/dist/themes/zyro.meta.json +0 -74
- package/dist/themes/zyro.scoped.css +0 -442
- package/dist/themes/zyro.tokens.json +0 -46
- package/dist/ui/a2ui-renderer.d.ts +0 -44
- package/dist/ui/accordion.d.ts +0 -9
- package/dist/ui/agent-events.d.ts +0 -49
- package/dist/ui/ai-tag.d.ts +0 -24
- package/dist/ui/alert-dialog.d.ts +0 -60
- package/dist/ui/alert.d.ts +0 -13
- package/dist/ui/animated-number.d.ts +0 -20
- package/dist/ui/app-bar.d.ts +0 -32
- package/dist/ui/aspect-ratio.d.ts +0 -7
- package/dist/ui/attachment.d.ts +0 -26
- package/dist/ui/auth-backdrop.d.ts +0 -37
- package/dist/ui/auth-form.d.ts +0 -4
- package/dist/ui/auth-layout.d.ts +0 -110
- package/dist/ui/auth-parts.d.ts +0 -43
- package/dist/ui/auth-status.d.ts +0 -23
- package/dist/ui/avatar.d.ts +0 -43
- package/dist/ui/ayuda.d.ts +0 -22
- package/dist/ui/badge.d.ts +0 -15
- package/dist/ui/banner.d.ts +0 -14
- package/dist/ui/bottom-nav.d.ts +0 -37
- package/dist/ui/breadcrumb.d.ts +0 -34
- package/dist/ui/bubble.d.ts +0 -19
- package/dist/ui/button-group.d.ts +0 -15
- package/dist/ui/button.d.ts +0 -14
- package/dist/ui/calendar.d.ts +0 -28
- package/dist/ui/card-stack.d.ts +0 -36
- package/dist/ui/card.d.ts +0 -61
- package/dist/ui/carousel.d.ts +0 -68
- package/dist/ui/chain-of-thought.d.ts +0 -34
- package/dist/ui/chart-card.d.ts +0 -47
- package/dist/ui/chart.d.ts +0 -65
- package/dist/ui/chart.js +0 -254
- package/dist/ui/chat-composer.d.ts +0 -58
- package/dist/ui/checkbox.d.ts +0 -6
- package/dist/ui/choice-card.d.ts +0 -49
- package/dist/ui/code-block.d.ts +0 -29
- package/dist/ui/collapsible.d.ts +0 -8
- package/dist/ui/combobox.d.ts +0 -74
- package/dist/ui/command-palette.d.ts +0 -54
- package/dist/ui/command.d.ts +0 -56
- package/dist/ui/confirm-action.d.ts +0 -48
- package/dist/ui/confirm-dialog.d.ts +0 -44
- package/dist/ui/connected-accounts.d.ts +0 -25
- package/dist/ui/content-card.d.ts +0 -66
- package/dist/ui/context-menu.d.ts +0 -66
- package/dist/ui/conversation-list.d.ts +0 -44
- package/dist/ui/copy-button.d.ts +0 -25
- package/dist/ui/data-table.d.ts +0 -198
- package/dist/ui/date-picker.d.ts +0 -65
- package/dist/ui/date-time.d.ts +0 -40
- package/dist/ui/description-list.d.ts +0 -49
- package/dist/ui/detail-panel.d.ts +0 -38
- package/dist/ui/dialog.d.ts +0 -54
- package/dist/ui/direction.d.ts +0 -1
- package/dist/ui/dock.d.ts +0 -30
- package/dist/ui/drawer.d.ts +0 -59
- package/dist/ui/dropdown-menu.d.ts +0 -63
- package/dist/ui/dropzone.d.ts +0 -44
- package/dist/ui/echart.d.ts +0 -46
- package/dist/ui/empty-state.d.ts +0 -26
- package/dist/ui/empty.d.ts +0 -15
- package/dist/ui/entity-list.d.ts +0 -57
- package/dist/ui/error-page.d.ts +0 -28
- package/dist/ui/error-state.d.ts +0 -16
- package/dist/ui/eyebrow.d.ts +0 -7
- package/dist/ui/field.d.ts +0 -28
- package/dist/ui/file-upload.d.ts +0 -42
- package/dist/ui/filter-bar.d.ts +0 -38
- package/dist/ui/form-layout.d.ts +0 -43
- package/dist/ui/gauge.d.ts +0 -66
- package/dist/ui/generated-image.d.ts +0 -33
- package/dist/ui/generated-table.d.ts +0 -29
- package/dist/ui/heatmap-grid.d.ts +0 -59
- package/dist/ui/hero.d.ts +0 -58
- package/dist/ui/hover-card.d.ts +0 -8
- package/dist/ui/i18n-provider.d.ts +0 -27
- package/dist/ui/icon-tile.d.ts +0 -11
- package/dist/ui/input-group.d.ts +0 -22
- package/dist/ui/input-otp.d.ts +0 -36
- package/dist/ui/input.d.ts +0 -21
- package/dist/ui/instruction-editor.d.ts +0 -81
- package/dist/ui/item.d.ts +0 -26
- package/dist/ui/kbd.d.ts +0 -6
- package/dist/ui/label.d.ts +0 -22
- package/dist/ui/legend.d.ts +0 -57
- package/dist/ui/level-meter.d.ts +0 -28
- package/dist/ui/load-more.d.ts +0 -36
- package/dist/ui/loading-state.d.ts +0 -26
- package/dist/ui/locale-switcher.d.ts +0 -19
- package/dist/ui/markdown.d.ts +0 -29
- package/dist/ui/marker.d.ts +0 -13
- package/dist/ui/media-card.d.ts +0 -29
- package/dist/ui/menubar.d.ts +0 -70
- package/dist/ui/message-actions.d.ts +0 -21
- package/dist/ui/message-scroller.d.ts +0 -46
- package/dist/ui/message.d.ts +0 -45
- package/dist/ui/mfa-challenge.d.ts +0 -4
- package/dist/ui/mfa-setup.d.ts +0 -29
- package/dist/ui/mosaic.d.ts +0 -38
- package/dist/ui/motion-provider.d.ts +0 -28
- package/dist/ui/native-select.d.ts +0 -32
- package/dist/ui/navigation-menu.d.ts +0 -15
- package/dist/ui/next-step-card.d.ts +0 -55
- package/dist/ui/notice-review.d.ts +0 -64
- package/dist/ui/notifications.d.ts +0 -81
- package/dist/ui/oauth-consent.d.ts +0 -54
- package/dist/ui/page-header.d.ts +0 -64
- package/dist/ui/page-loader.d.ts +0 -40
- package/dist/ui/page-shell.d.ts +0 -25
- package/dist/ui/pagination.d.ts +0 -42
- package/dist/ui/panel.d.ts +0 -12
- package/dist/ui/passkey-list.d.ts +0 -17
- package/dist/ui/password-input.d.ts +0 -5
- package/dist/ui/password-strength.d.ts +0 -28
- package/dist/ui/popover.d.ts +0 -44
- package/dist/ui/progress.d.ts +0 -9
- package/dist/ui/proportion-bar.d.ts +0 -52
- package/dist/ui/quantity.d.ts +0 -25
- package/dist/ui/questionnaire.d.ts +0 -62
- package/dist/ui/radio-group.d.ts +0 -8
- package/dist/ui/reasoning.d.ts +0 -24
- package/dist/ui/resizable.d.ts +0 -10
- package/dist/ui/reveal.d.ts +0 -28
- package/dist/ui/scroll-area.d.ts +0 -7
- package/dist/ui/search-box.d.ts +0 -32
- package/dist/ui/select.d.ts +0 -19
- package/dist/ui/separator.d.ts +0 -6
- package/dist/ui/session-list.d.ts +0 -19
- package/dist/ui/session-timeout.d.ts +0 -13
- package/dist/ui/sheet.d.ts +0 -53
- package/dist/ui/shield.d.ts +0 -35
- package/dist/ui/show-more.d.ts +0 -26
- package/dist/ui/sidebar.d.ts +0 -92
- package/dist/ui/sign-out-dialog.d.ts +0 -17
- package/dist/ui/skeleton.d.ts +0 -10
- package/dist/ui/slider.d.ts +0 -23
- package/dist/ui/sonner.d.ts +0 -6
- package/dist/ui/sparkline.d.ts +0 -26
- package/dist/ui/spinner.d.ts +0 -5
- package/dist/ui/stat-group.d.ts +0 -40
- package/dist/ui/stat.d.ts +0 -90
- package/dist/ui/status-badge.d.ts +0 -39
- package/dist/ui/status-hero.d.ts +0 -30
- package/dist/ui/step-dots.d.ts +0 -22
- package/dist/ui/step-flow.d.ts +0 -48
- package/dist/ui/step-ring.d.ts +0 -26
- package/dist/ui/stepper.d.ts +0 -20
- package/dist/ui/suggestions.d.ts +0 -17
- package/dist/ui/switch.d.ts +0 -8
- package/dist/ui/table.d.ts +0 -38
- package/dist/ui/tabs.d.ts +0 -14
- package/dist/ui/tag-input.d.ts +0 -21
- package/dist/ui/task-loader.d.ts +0 -29
- package/dist/ui/task-progress.d.ts +0 -32
- package/dist/ui/textarea.d.ts +0 -32
- package/dist/ui/theme-toggle.d.ts +0 -14
- package/dist/ui/timeline.d.ts +0 -55
- package/dist/ui/toast.d.ts +0 -19
- package/dist/ui/toggle-group.d.ts +0 -38
- package/dist/ui/toggle.d.ts +0 -12
- package/dist/ui/tool-call.d.ts +0 -27
- package/dist/ui/tooltip.d.ts +0 -9
- package/dist/ui/usage-meter.d.ts +0 -42
- package/dist/ui/week-strip.d.ts +0 -23
- package/dist/ui/workflow-run.d.ts +0 -51
package/manifest/data.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "orbital-ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"group": "data",
|
|
5
5
|
"about": "Tablas, gráficos, métricas, listas de entidades y estados de carga.",
|
|
6
6
|
"components": {
|
|
@@ -63,10 +63,6 @@
|
|
|
63
63
|
"component": "echart",
|
|
64
64
|
"when": "solo el lienzo del gráfico, sin tarjeta ni estados, dentro de tu propia maqueta"
|
|
65
65
|
},
|
|
66
|
-
{
|
|
67
|
-
"component": "chart",
|
|
68
|
-
"when": "gráficos Recharts heredados: solo compatibilidad, nunca para pantallas nuevas"
|
|
69
|
-
},
|
|
70
66
|
{
|
|
71
67
|
"component": "stat",
|
|
72
68
|
"when": "una cifra clave con su tendencia mínima (Sparkline), no un gráfico completo"
|
|
@@ -180,104 +176,6 @@
|
|
|
180
176
|
}
|
|
181
177
|
]
|
|
182
178
|
},
|
|
183
|
-
"chart": {
|
|
184
|
-
"import": "orbital-ds/ui/chart",
|
|
185
|
-
"group": "data",
|
|
186
|
-
"summary": "Contenedor de Recharts con la paleta del tema, tooltip y leyenda. SOLO por compatibilidad (sin funciones nuevas): para cualquier gráfico nuevo usa ChartCard o EChart.",
|
|
187
|
-
"see": [
|
|
188
|
-
{
|
|
189
|
-
"component": "chart-card",
|
|
190
|
-
"when": "gráfico nuevo en un panel: tarjeta con estados y descarga (ECharts)"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"component": "echart",
|
|
194
|
-
"when": "gráfico nuevo dentro de tu propia maqueta (ECharts, colores del tema)"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"component": "sparkline",
|
|
198
|
-
"when": "tendencia mínima junto a una cifra, sin librería de gráficos"
|
|
199
|
-
}
|
|
200
|
-
],
|
|
201
|
-
"exports": [
|
|
202
|
-
"ChartContainer",
|
|
203
|
-
"ChartLegend",
|
|
204
|
-
"ChartLegendContent",
|
|
205
|
-
"ChartStyle",
|
|
206
|
-
"ChartTooltip",
|
|
207
|
-
"ChartTooltipContent"
|
|
208
|
-
],
|
|
209
|
-
"slots": [
|
|
210
|
-
"chart",
|
|
211
|
-
"chart-legend",
|
|
212
|
-
"chart-legend-item",
|
|
213
|
-
"chart-tooltip",
|
|
214
|
-
"chart-tooltip-item"
|
|
215
|
-
],
|
|
216
|
-
"optionalPeers": [
|
|
217
|
-
"recharts"
|
|
218
|
-
],
|
|
219
|
-
"props": {
|
|
220
|
-
"ChartContainer": {
|
|
221
|
-
"config": {
|
|
222
|
-
"type": "ChartConfig",
|
|
223
|
-
"required": true
|
|
224
|
-
},
|
|
225
|
-
"initialDimension": {
|
|
226
|
-
"type": "{ width: number; height: number; }"
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
"ChartTooltipContent": {
|
|
230
|
-
"hideLabel": {
|
|
231
|
-
"type": "boolean"
|
|
232
|
-
},
|
|
233
|
-
"hideIndicator": {
|
|
234
|
-
"type": "boolean"
|
|
235
|
-
},
|
|
236
|
-
"indicator": {
|
|
237
|
-
"type": "\"line\" | \"dot\" | \"dashed\"",
|
|
238
|
-
"values": [
|
|
239
|
-
"line",
|
|
240
|
-
"dot",
|
|
241
|
-
"dashed"
|
|
242
|
-
]
|
|
243
|
-
},
|
|
244
|
-
"nameKey": {
|
|
245
|
-
"type": "string"
|
|
246
|
-
},
|
|
247
|
-
"labelKey": {
|
|
248
|
-
"type": "string"
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
"ChartLegendContent": {
|
|
252
|
-
"hideIcon": {
|
|
253
|
-
"type": "boolean"
|
|
254
|
-
},
|
|
255
|
-
"nameKey": {
|
|
256
|
-
"type": "string"
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
"ChartStyle": {
|
|
260
|
-
"id": {
|
|
261
|
-
"type": "string",
|
|
262
|
-
"required": true
|
|
263
|
-
},
|
|
264
|
-
"config": {
|
|
265
|
-
"type": "ChartConfig",
|
|
266
|
-
"required": true
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
"notes": [
|
|
271
|
-
"Solo compatibilidad con Recharts: no recibe funciones nuevas. En pantallas nuevas usa ChartCard (o EChart) con un option de orbital-ds/lib/echarts-presets.",
|
|
272
|
-
"Los colores de cada serie salen de las variables del tema (var(--chart-1) … var(--chart-5)) en el config; nunca un color escrito."
|
|
273
|
-
],
|
|
274
|
-
"examples": [
|
|
275
|
-
{
|
|
276
|
-
"title": "Código heredado con Recharts (series con variables del tema)",
|
|
277
|
-
"code": "<ChartContainer config={{ nuevos: { label: \"Nuevos clientes\", color: \"var(--chart-1)\" } }}>\n <BarChart accessibilityLayer data={data}>\n <XAxis dataKey=\"mes\" tickLine={false} axisLine={false} />\n <ChartTooltip content={<ChartTooltipContent />} />\n <ChartLegend content={<ChartLegendContent />} />\n <Bar dataKey=\"nuevos\" fill=\"var(--color-nuevos)\" />\n </BarChart>\n</ChartContainer>"
|
|
278
|
-
}
|
|
279
|
-
]
|
|
280
|
-
},
|
|
281
179
|
"data-table": {
|
|
282
180
|
"import": "orbital-ds/ui/data-table",
|
|
283
181
|
"group": "data",
|
package/manifest/feedback.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "orbital-ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"group": "feedback",
|
|
5
5
|
"about": "Alertas, toasts, progreso y esperas.",
|
|
6
6
|
"components": {
|
|
@@ -490,16 +490,16 @@
|
|
|
490
490
|
"type": "NotificationCenterPreset",
|
|
491
491
|
"values": [
|
|
492
492
|
"compact",
|
|
493
|
-
"
|
|
494
|
-
"
|
|
493
|
+
"count",
|
|
494
|
+
"dot"
|
|
495
495
|
]
|
|
496
496
|
},
|
|
497
497
|
"indicator": {
|
|
498
498
|
"type": "NotificationIndicator",
|
|
499
499
|
"values": [
|
|
500
500
|
"none",
|
|
501
|
-
"
|
|
502
|
-
"
|
|
501
|
+
"count",
|
|
502
|
+
"dot"
|
|
503
503
|
],
|
|
504
504
|
"doc": "Cómo se anuncian los avisos sin leer sobre la campana."
|
|
505
505
|
},
|
|
@@ -820,7 +820,7 @@
|
|
|
820
820
|
"notes": [
|
|
821
821
|
"Un solo Toaster en la raíz; `toast` se importa de `sonner`. Necesita `sonner` y `next-themes` instalados.",
|
|
822
822
|
"Elige un canal de toasts para toda la app: este Toaster o el de `toast` (Base UI), no los dos.",
|
|
823
|
-
"
|
|
823
|
+
"OBSOLETO: se retirará en la próxima versión que rompa compatibilidad; migra a `toast` (Base UI). El doctor (`--ui`) avisa de cada import."
|
|
824
824
|
],
|
|
825
825
|
"examples": [
|
|
826
826
|
{
|
package/manifest/forms.json
CHANGED
package/manifest/motion.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "orbital-ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"group": "motion",
|
|
5
5
|
"about": "Animación y cargadores de página.",
|
|
6
6
|
"components": {
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"required": true
|
|
33
33
|
},
|
|
34
34
|
"duration": {
|
|
35
|
-
"type": "\"base\" | \"
|
|
35
|
+
"type": "\"base\" | \"fast\" | \"slow\" | \"snap\" | \"layout\" | \"swipe\" | \"slower\"",
|
|
36
36
|
"values": [
|
|
37
37
|
"base",
|
|
38
|
-
"layout",
|
|
39
38
|
"fast",
|
|
40
39
|
"slow",
|
|
41
40
|
"snap",
|
|
41
|
+
"layout",
|
|
42
42
|
"swipe",
|
|
43
43
|
"slower"
|
|
44
44
|
]
|
package/manifest/navigation.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "orbital-ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"group": "navigation",
|
|
5
5
|
"about": "Cabecera, lateral, pestañas, pasos, paginación y búsqueda de destinos.",
|
|
6
6
|
"components": {
|
|
@@ -1066,8 +1066,8 @@
|
|
|
1066
1066
|
"values": [
|
|
1067
1067
|
"start",
|
|
1068
1068
|
"end",
|
|
1069
|
-
"
|
|
1070
|
-
"
|
|
1069
|
+
"left",
|
|
1070
|
+
"right"
|
|
1071
1071
|
],
|
|
1072
1072
|
"doc": "Lado: por defecto `start`, que sigue la dirección de lectura (izquierda en LTR, derecha en RTL); `end` al otro lado; `left`/`right` son físicos y no se invierten."
|
|
1073
1073
|
},
|
package/manifest/overlays.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "orbital-ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"group": "overlays",
|
|
5
5
|
"about": "Diálogos, menús, popovers y paneles que se superponen.",
|
|
6
6
|
"components": {
|
|
@@ -418,13 +418,16 @@
|
|
|
418
418
|
]
|
|
419
419
|
},
|
|
420
420
|
"side": {
|
|
421
|
-
"type": "\"top\" | \"bottom\" |
|
|
421
|
+
"type": "\"top\" | \"bottom\" | DsInlineSide",
|
|
422
422
|
"values": [
|
|
423
|
+
"start",
|
|
423
424
|
"top",
|
|
424
425
|
"bottom",
|
|
425
|
-
"
|
|
426
|
-
"left"
|
|
427
|
-
|
|
426
|
+
"end",
|
|
427
|
+
"left",
|
|
428
|
+
"right"
|
|
429
|
+
],
|
|
430
|
+
"doc": "Borde: `start`/`end` siguen la lectura (por defecto `end`, que en RTL es la izquierda); `left`/`right` son físicos."
|
|
428
431
|
},
|
|
429
432
|
"title": {
|
|
430
433
|
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
@@ -753,7 +756,7 @@
|
|
|
753
756
|
},
|
|
754
757
|
{
|
|
755
758
|
"title": "Abrir a un lado",
|
|
756
|
-
"code": "<HoverCardContent side=\"
|
|
759
|
+
"code": "<HoverCardContent side=\"inline-end\">\n <p>Cliente desde 2022 · Plan Empresa</p>\n</HoverCardContent>"
|
|
757
760
|
}
|
|
758
761
|
]
|
|
759
762
|
},
|
|
@@ -804,14 +807,14 @@
|
|
|
804
807
|
},
|
|
805
808
|
{
|
|
806
809
|
"title": "Disparador de solo icono, abre a la derecha",
|
|
807
|
-
"code": "<Popover>\n <PopoverTrigger render={<Button size=\"icon\" variant=\"ghost\" aria-label={t(\"view.settings\")} />}>\n <Settings2Icon />\n </PopoverTrigger>\n <PopoverContent side=\"
|
|
810
|
+
"code": "<Popover>\n <PopoverTrigger render={<Button size=\"icon\" variant=\"ghost\" aria-label={t(\"view.settings\")} />}>\n <Settings2Icon />\n </PopoverTrigger>\n <PopoverContent side=\"inline-end\">\n <PopoverHeader>\n <PopoverTitle>Vista del panel</PopoverTitle>\n </PopoverHeader>\n </PopoverContent>\n</Popover>"
|
|
808
811
|
}
|
|
809
812
|
]
|
|
810
813
|
},
|
|
811
814
|
"sheet": {
|
|
812
815
|
"import": "orbital-ds/ui/sheet",
|
|
813
816
|
"group": "overlays",
|
|
814
|
-
"summary": "Panel modal que entra desde un borde (derecha
|
|
817
|
+
"summary": "Panel modal que entra desde un borde (por defecto el final de la lectura: derecha en LTR, izquierda en RTL) para editar o consultar algo largo sin perder la página de fondo; pieza base de DetailPanel.",
|
|
815
818
|
"see": [
|
|
816
819
|
{
|
|
817
820
|
"component": "detail-panel",
|
|
@@ -858,10 +861,10 @@
|
|
|
858
861
|
"top",
|
|
859
862
|
"bottom",
|
|
860
863
|
"end",
|
|
861
|
-
"
|
|
862
|
-
"
|
|
864
|
+
"left",
|
|
865
|
+
"right"
|
|
863
866
|
],
|
|
864
|
-
"doc": "Borde desde el que entra: `
|
|
867
|
+
"doc": "Borde desde el que entra: por defecto `end` (derecha en LTR, izquierda en RTL); `start`/`end` siguen la lectura; `left`/`right` son físicos."
|
|
865
868
|
},
|
|
866
869
|
"showCloseButton": {
|
|
867
870
|
"type": "boolean"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orbital-ds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
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
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
"scripts/brand-core.d.mts",
|
|
38
38
|
"scripts/setup.mjs",
|
|
39
39
|
"scripts/brand-file.mjs",
|
|
40
|
-
"scripts/i18n.mjs"
|
|
40
|
+
"scripts/i18n.mjs",
|
|
41
|
+
"scripts/upgrade.mjs",
|
|
42
|
+
"CHANGELOG.md"
|
|
41
43
|
],
|
|
42
44
|
"exports": {
|
|
43
45
|
"./styles.css": "./dist/styles.css",
|
|
@@ -71,7 +73,7 @@
|
|
|
71
73
|
"build": "tsup && node scripts/build-css.mjs",
|
|
72
74
|
"dev": "tsup --watch --onSuccess \"node scripts/copy-css.mjs\"",
|
|
73
75
|
"typecheck": "tsc --noEmit",
|
|
74
|
-
"verify": "pnpm check:ds && pnpm check:neutral && pnpm typecheck && pnpm showcase:typecheck && pnpm build && pnpm check:bundle && pnpm check:charts && pnpm check:pack",
|
|
76
|
+
"verify": "pnpm check:ds && pnpm check:neutral && pnpm typecheck && pnpm showcase:typecheck && pnpm build && pnpm test && pnpm check:bundle && pnpm check:charts && pnpm check:pack",
|
|
75
77
|
"manifest": "node scripts/manifest.mjs",
|
|
76
78
|
"domains": "node scripts/changed-domains.mjs",
|
|
77
79
|
"check:ds": "node scripts/doctor.mjs",
|
|
@@ -79,6 +81,7 @@
|
|
|
79
81
|
"check:charts": "node scripts/check-charts.mjs",
|
|
80
82
|
"check:neutral": "node scripts/neutral.mjs --check",
|
|
81
83
|
"check:pack": "node scripts/check-pack.mjs",
|
|
84
|
+
"test": "node --test \"tests/*.test.mjs\"",
|
|
82
85
|
"prepublishOnly": "pnpm verify",
|
|
83
86
|
"showcase": "vite --config showcase/vite.config.ts",
|
|
84
87
|
"showcase:build": "vite build --config showcase/vite.config.ts",
|
|
@@ -111,7 +114,6 @@
|
|
|
111
114
|
"react-dom": ">=19",
|
|
112
115
|
"react-markdown": ">=10",
|
|
113
116
|
"react-resizable-panels": ">=4",
|
|
114
|
-
"recharts": ">=3",
|
|
115
117
|
"remark-gfm": ">=4",
|
|
116
118
|
"sonner": ">=2",
|
|
117
119
|
"tailwind-merge": ">=3",
|
|
@@ -179,9 +181,6 @@
|
|
|
179
181
|
"react-resizable-panels": {
|
|
180
182
|
"optional": true
|
|
181
183
|
},
|
|
182
|
-
"recharts": {
|
|
183
|
-
"optional": true
|
|
184
|
-
},
|
|
185
184
|
"remark-gfm": {
|
|
186
185
|
"optional": true
|
|
187
186
|
},
|
|
@@ -220,7 +219,6 @@
|
|
|
220
219
|
"react-dom": "^19.2.0",
|
|
221
220
|
"react-markdown": "^10.1.0",
|
|
222
221
|
"react-resizable-panels": "^4.14.4",
|
|
223
|
-
"recharts": "3.8.0",
|
|
224
222
|
"remark-gfm": "^4.0.1",
|
|
225
223
|
"sonner": "^2.0.8",
|
|
226
224
|
"tailwind-merge": "^3.0.2",
|
package/scripts/cli.mjs
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* orbital-ds theme [tema] cambiar de tema conservando tu marca y tus extras
|
|
8
8
|
* orbital-ds doctor [opc.] comprobar contrato, contraste y marca (= orbital-ds-doctor)
|
|
9
9
|
* orbital-ds i18n [opc.] textos de orbital-ds en los idiomas de la app (= orbital-ds-i18n)
|
|
10
|
+
* orbital-ds upgrade qué cambió desde la versión anterior y qué revisar
|
|
10
11
|
* orbital-ds help esta ayuda
|
|
11
12
|
*
|
|
12
13
|
* Las órdenes sueltas (orbital-ds-init, -doctor, -i18n) siguen funcionando: son atajos.
|
|
@@ -19,6 +20,7 @@ import { spawnSync } from 'node:child_process';
|
|
|
19
20
|
import { detectarCssApp, detectarMarca, importsDeTemaSueltos, temaDelCss, yaInstalado } from './setup.mjs';
|
|
20
21
|
import { analizarMarca, marcaGenerada, nombresColorTemas } from './brand-file.mjs';
|
|
21
22
|
import { estadoSkill, instalarSkill, raizApp, SKILL_NAME } from './skill.mjs';
|
|
23
|
+
import { ordenUpgrade } from './upgrade.mjs';
|
|
22
24
|
|
|
23
25
|
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
24
26
|
const [orden, ...resto] = process.argv.slice(2);
|
|
@@ -49,6 +51,7 @@ Uso: orbital-ds <orden> [opciones] (sin orden, un menú)
|
|
|
49
51
|
context resumen de esta app para un agente: tema, marca, componentes y patrones
|
|
50
52
|
components catálogo por dominios: resumen, alternativas, props, notas y ejemplos (--search · --group · <nombre>)
|
|
51
53
|
skill instala o refresca el diseñador de orbital-ds para Claude Code
|
|
54
|
+
upgrade qué cambió desde tu versión anterior y qué revisar en la app
|
|
52
55
|
help esta ayuda · orbital-ds help <orden> para el detalle
|
|
53
56
|
|
|
54
57
|
Ejemplos
|
|
@@ -151,6 +154,17 @@ ya trabaja con lo nuevo. Lleva la versión estampada; lo que añadas DESPUÉS de
|
|
|
151
154
|
orbital-ds skill --check comprueba (para el verify): falla si falta o es de otra versión
|
|
152
155
|
orbital-ds skill --print enseña el contenido sin escribir nada`,
|
|
153
156
|
|
|
157
|
+
upgrade: `orbital-ds upgrade — qué cambió y qué revisar al actualizar
|
|
158
|
+
|
|
159
|
+
Lee el CHANGELOG del paquete instalado entre tu versión anterior y la actual. La anterior sale del último
|
|
160
|
+
commit (lockfile o package.json) o del sello del skill; si no, indícala con --from.
|
|
161
|
+
|
|
162
|
+
orbital-ds upgrade resumen por versión con lo que puede pedir un ajuste
|
|
163
|
+
orbital-ds upgrade --from 0.41.0 desde una versión concreta
|
|
164
|
+
orbital-ds upgrade --json en JSON (para un agente)
|
|
165
|
+
|
|
166
|
+
No cambia nada en la app. Al terminar recuerda las comprobaciones (doctor --ui, i18n --check, skill).`,
|
|
167
|
+
|
|
154
168
|
i18n: `orbital-ds i18n — textos de orbital-ds en tus idiomas
|
|
155
169
|
|
|
156
170
|
orbital-ds i18n rellena el espacio «orbital» de cada JSON (sin pisar lo tuyo)
|
|
@@ -499,6 +513,7 @@ async function menu() {
|
|
|
499
513
|
{ value: 'doctor', label: 'Comprobar mi marca', hint: 'contrato, contraste y pesos' },
|
|
500
514
|
{ value: 'i18n', label: 'Textos en mis idiomas', hint: 'espacio «orbital» de los JSON de idioma' },
|
|
501
515
|
{ value: 'skill', label: 'Diseñador para Claude (skill)', hint: 'instala o refresca .claude/skills/orbital-ds-designer' },
|
|
516
|
+
{ value: 'upgrade', label: 'Qué cambió al actualizar', hint: 'resumen del CHANGELOG desde tu versión anterior' },
|
|
502
517
|
],
|
|
503
518
|
});
|
|
504
519
|
if (p.isCancel(v)) { p.cancel('Nada que hacer.'); return; }
|
|
@@ -507,6 +522,7 @@ async function menu() {
|
|
|
507
522
|
if (v === 'doctor') ejecutar('doctor.mjs', ['--css', resolve('src/brand.css')]);
|
|
508
523
|
if (v === 'i18n') ejecutar('i18n.mjs', []);
|
|
509
524
|
if (v === 'skill') return ordenSkill([]);
|
|
525
|
+
if (v === 'upgrade') return ordenUpgrade([]);
|
|
510
526
|
}
|
|
511
527
|
|
|
512
528
|
// Ayuda de una orden: orbital-ds <orden> --help · orbital-ds help <orden>
|
|
@@ -541,6 +557,9 @@ switch (orden) {
|
|
|
541
557
|
case 'i18n':
|
|
542
558
|
ejecutar('i18n.mjs', resto);
|
|
543
559
|
break;
|
|
560
|
+
case 'upgrade':
|
|
561
|
+
ordenUpgrade(resto);
|
|
562
|
+
break;
|
|
544
563
|
case 'help':
|
|
545
564
|
case '--help':
|
|
546
565
|
case '-h':
|
package/scripts/doctor.mjs
CHANGED
|
@@ -508,7 +508,7 @@ if (cssArgIdx > -1 && process.argv[cssArgIdx + 1]) {
|
|
|
508
508
|
|
|
509
509
|
// 5) valores fijos en componentes
|
|
510
510
|
const NO_HARDCODE = [
|
|
511
|
-
{ re: /#[0-9a-fA-F]{3,8}\b/g, why: 'color hexadecimal'
|
|
511
|
+
{ re: /#[0-9a-fA-F]{3,8}\b/g, why: 'color hexadecimal' },
|
|
512
512
|
{ re: /\b(?:rgb|rgba|hsl|hsla|oklch)\((?!from_)/g, why: 'color literal' },
|
|
513
513
|
{ re: /(?<![\w-])z-(?!0(?![\w-]))\d+(?![\w-])/g, why: 'z-index numérico (usa --ds-z-*)' },
|
|
514
514
|
{ re: /(?<![\w-])duration-(?!0(?![\w-]))\d+(?![\w-])/g, why: 'duración fija (usa --ds-motion-*)' },
|
|
@@ -557,6 +557,20 @@ if (existsSync(uiDir)) {
|
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
+
// 5a) LADOS LÓGICOS: ningún componente se ancla por defecto a un lado físico (left/right), que no se invierte
|
|
561
|
+
// en RTL. Laterales y paneles usan start/end; flotantes (Base UI), inline-start/inline-end.
|
|
562
|
+
const LADO_FISICO = /(?<![\w-])side(?:Prop)?\s*(?:=|:)\s*["'](?:left|right)["']/g;
|
|
563
|
+
const LADO_POR_QUE = 'lado físico que no se invierte en RTL (usa side="start"/"end" en Sidebar, Sheet y DetailPanel, o "inline-start"/"inline-end" en Tooltip, Popover y menús)';
|
|
564
|
+
if (existsSync(uiDir)) {
|
|
565
|
+
for (const f of readdirSync(uiDir).filter((n) => n.endsWith('.tsx'))) {
|
|
566
|
+
read(join(uiDir, f)).split(/\r?\n/).forEach((line, i) => {
|
|
567
|
+
if (/^\s*\*/.test(line)) return; // comentarios y fichas: documentan los valores físicos que existen
|
|
568
|
+
const hits = line.replace(/\/\/.*$/, '').match(LADO_FISICO);
|
|
569
|
+
if (hits) errors.push(`ui/${f}:${i + 1}: ${LADO_POR_QUE} → ${[...new Set(hits)].join(', ')}`);
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
560
574
|
// 5b) UI DE UNA APP (--ui <carpeta>): el código de las vistas no se sale del sistema. Mismas reglas
|
|
561
575
|
// visuales que los componentes (sin las de textos: la app tiene su i18n) y tres propias de una app.
|
|
562
576
|
// Son las comprobaciones mecánicas del diseñador (docs/designer/revision.md, apartado A).
|
|
@@ -571,6 +585,10 @@ if (existsSync(uiDir)) {
|
|
|
571
585
|
{ cadenas: true, re: /(?<=^|\s)![a-z][\w:/()[\]-]*/g, why: '!important en una clase (no se pelea con la librería: ajusta en brand.css o abre un hueco)' },
|
|
572
586
|
{ re: /<(?:button|input|select|textarea)\b(?![^>]*data-slot)/g, why: 'control nativo suelto (usa Button, Input, Select/NativeSelect o Textarea de orbital-ds)' },
|
|
573
587
|
];
|
|
588
|
+
const RETIRADOS = [
|
|
589
|
+
{ error: true, re: /['"]orbital-ds\/ui\/chart['"]/, why: 'orbital-ds/ui/chart (Recharts) se retiró en 0.48.0: usa ChartCard o EChart con un option de orbital-ds/lib/echarts-presets' },
|
|
590
|
+
{ re: /['"]orbital-ds\/ui\/sonner['"]/, why: 'orbital-ds/ui/sonner está obsoleto y se retirará: usa Toaster y toast.add de orbital-ds/ui/toast' },
|
|
591
|
+
];
|
|
574
592
|
const ficheros = [];
|
|
575
593
|
const recorrer = (d) => {
|
|
576
594
|
if (!existsSync(d)) return;
|
|
@@ -592,6 +610,11 @@ if (existsSync(uiDir)) {
|
|
|
592
610
|
const hits = rule.cadenas ? cadenas.flatMap((c) => c.match(rule.re) ?? []) : code.match(rule.re);
|
|
593
611
|
if (hits?.length) errors.push(`ui ${f.replace(process.cwd(), '.').split('\\').join('/')}:${n + 1}: ${rule.why} → ${[...new Set(hits)].join(', ')}`);
|
|
594
612
|
}
|
|
613
|
+
// Lado físico: aviso (puede ser intencionado en una app de un solo idioma), no error.
|
|
614
|
+
const lados = code.match(LADO_FISICO);
|
|
615
|
+
if (lados) warnings.push(`ui ${f.replace(process.cwd(), '.').split('\\').join('/')}:${n + 1}: ${LADO_POR_QUE} → ${[...new Set(lados)].join(', ')}`);
|
|
616
|
+
// Componentes retirados (error: el import ya no existe) u obsoletos (aviso: se retirarán en la próxima mayor).
|
|
617
|
+
for (const r of RETIRADOS) if (r.re.test(code)) (r.error ? errors : warnings).push(`ui ${f.replace(process.cwd(), '.').split('\\').join('/')}:${n + 1}: ${r.why}`);
|
|
595
618
|
});
|
|
596
619
|
}
|
|
597
620
|
// Props de los componentes de orbital-ds usados en las vistas, contra las props tipadas del manifiesto por dominio:
|
|
@@ -675,7 +698,10 @@ if (existsSync(uiDir)) {
|
|
|
675
698
|
// 6) API pública frente a la huella commiteada
|
|
676
699
|
const manifestPath = join(ROOT, 'components.manifest.json');
|
|
677
700
|
if (existsSync(manifestPath) && existsSync(uiDir)) {
|
|
678
|
-
const { buildManifest, GROUPS } = await import('./manifest.mjs');
|
|
701
|
+
const { buildManifest, GROUPS, buildBrandAllowlist, ALLOWLIST_FILE } = await import('./manifest.mjs');
|
|
702
|
+
// Lista de variables públicas de brand-runtime: debe coincidir con el contrato y la estructura.
|
|
703
|
+
const allowPath = join(ROOT, ALLOWLIST_FILE);
|
|
704
|
+
if (!existsSync(allowPath) || read(allowPath).replace(/\r\n/g, '\n') !== buildBrandAllowlist()) errors.push(`${ALLOWLIST_FILE} desactualizado: ejecuta pnpm manifest`);
|
|
679
705
|
const before = JSON.parse(read(manifestPath)).components;
|
|
680
706
|
const now = buildManifest().components;
|
|
681
707
|
// Dominio: cada componente declara `/** @group <dominio> */` y su demo vive en la sección homónima del escaparate.
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
* orbital-ds/system-styles en `className`, `cn()`, `clsx()` y `cva()`: nada de colores, z-index, duraciones,
|
|
12
12
|
* sombras de la escala Tailwind, paleta Tailwind ni px sueltos; usa tokens (`--ds-*`).
|
|
13
13
|
* orbital-ds/logical-direction clases lógicas (`ms-`, `ps-`, `text-start`…) en lugar de las físicas (RTL).
|
|
14
|
+
* orbital-ds/logical-side `side="left"|"right"` no se invierte en RTL: `start`/`end` (Sidebar, Sheet, DetailPanel)
|
|
15
|
+
* o `inline-start`/`inline-end` (Tooltip, Popover, menús).
|
|
14
16
|
*/
|
|
15
17
|
|
|
16
18
|
const STYLE_RULES = [
|
|
@@ -76,6 +78,35 @@ const rules = {
|
|
|
76
78
|
[[PHYSICAL, 'clase física de dirección (usa ms-/me-/ps-/pe-, text-start/end, border-s/e, rounded-s/e: soporte RTL)']],
|
|
77
79
|
'Clases lógicas de dirección para que la interfaz funcione en RTL.',
|
|
78
80
|
),
|
|
81
|
+
'logical-side': {
|
|
82
|
+
meta: {
|
|
83
|
+
type: 'suggestion',
|
|
84
|
+
docs: { description: 'Lados lógicos para que laterales, paneles y flotantes se inviertan en RTL.' },
|
|
85
|
+
schema: [],
|
|
86
|
+
messages: {
|
|
87
|
+
bad: 'side="{{value}}" es un lado físico y no se invierte en RTL: usa side="{{start}}" (o "{{end}}") para que siga la lectura.',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
create: (context) => ({
|
|
91
|
+
JSXAttribute(n) {
|
|
92
|
+
if (n.name?.name !== 'side' || n.value?.type !== 'Literal' || !['left', 'right'].includes(n.value.value)) return;
|
|
93
|
+
const el = n.parent?.name;
|
|
94
|
+
const tag = el?.type === 'JSXIdentifier' ? el.name : el?.type === 'JSXMemberExpression' ? el.property.name : '';
|
|
95
|
+
if (!/^[A-Z]/.test(tag)) return;
|
|
96
|
+
const panel = /^(?:Sidebar|SheetContent|DetailPanel)$/.test(tag);
|
|
97
|
+
const pick = (a, b) => (n.value.value === 'left' ? a : b);
|
|
98
|
+
context.report({
|
|
99
|
+
node: n,
|
|
100
|
+
messageId: 'bad',
|
|
101
|
+
data: {
|
|
102
|
+
value: n.value.value,
|
|
103
|
+
start: panel ? pick('start', 'end') : pick('inline-start', 'inline-end'),
|
|
104
|
+
end: panel ? pick('end', 'start') : pick('inline-end', 'inline-start'),
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
},
|
|
79
110
|
};
|
|
80
111
|
|
|
81
112
|
const plugin = { meta: { name: 'orbital-ds' }, rules, configs: {} };
|
|
@@ -86,6 +117,7 @@ plugin.configs.recommended = {
|
|
|
86
117
|
'orbital-ds/no-as-child': 'error',
|
|
87
118
|
'orbital-ds/system-styles': 'error',
|
|
88
119
|
'orbital-ds/logical-direction': 'warn',
|
|
120
|
+
'orbital-ds/logical-side': 'warn',
|
|
89
121
|
},
|
|
90
122
|
};
|
|
91
123
|
|
package/scripts/manifest.mjs
CHANGED
|
@@ -242,11 +242,31 @@ export function splitManifest(full) {
|
|
|
242
242
|
return { index, pages };
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
+
/** Fichero generado con los nombres públicos que una marca puede fijar en tiempo de ejecución (brand-runtime). */
|
|
246
|
+
export const ALLOWLIST_FILE = 'src/lib/brand-allowlist.ts';
|
|
247
|
+
|
|
248
|
+
/** Nombres públicos (sin `--`): los del contrato y todo `--ds-*` que declara la estructura (src/styles.css). */
|
|
249
|
+
export function buildBrandAllowlist() {
|
|
250
|
+
const contract = JSON.parse(readFileSync(join(ROOT, 'contract.json'), 'utf8'));
|
|
251
|
+
const css = readFileSync(join(ROOT, 'src', 'styles.css'), 'utf8');
|
|
252
|
+
const ds = [...css.matchAll(/(?:^|[\s;{])--(ds-[a-z0-9-]+)\s*:/g)].map((m) => m[1]);
|
|
253
|
+
const names = [...new Set([...contract.root, ...contract.brand.tokens.map((t) => t.name), ...ds])].sort();
|
|
254
|
+
return [
|
|
255
|
+
'// GENERADO por scripts/manifest.mjs (pnpm manifest): no se edita a mano.',
|
|
256
|
+
'// Variables públicas que una marca puede fijar en tiempo de ejecución (contrato + --ds-* de la estructura).',
|
|
257
|
+
'export const BRAND_PUBLIC_TOKENS: ReadonlySet<string> = new Set([',
|
|
258
|
+
...names.map((n) => `\t"${n}",`),
|
|
259
|
+
']);',
|
|
260
|
+
'',
|
|
261
|
+
].join('\n');
|
|
262
|
+
}
|
|
263
|
+
|
|
245
264
|
if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
246
265
|
const full = buildManifest({ props: true });
|
|
247
266
|
const { index, pages } = splitManifest(full);
|
|
248
267
|
writeFileSync(join(ROOT, 'components.manifest.json'), JSON.stringify(index, null, 2) + EOL);
|
|
249
268
|
mkdirSync(join(ROOT, PAGES_DIR), { recursive: true });
|
|
250
269
|
for (const [g, page] of Object.entries(pages)) writeFileSync(join(ROOT, PAGES_DIR, `${g}.json`), JSON.stringify(page, null, 2) + EOL);
|
|
270
|
+
writeFileSync(join(ROOT, ALLOWLIST_FILE), buildBrandAllowlist());
|
|
251
271
|
console.log(`manifest: ${Object.keys(full.components).length} componentes → components.manifest.json + ${PAGES_DIR}/ (${Object.keys(pages).length} dominios)`);
|
|
252
272
|
}
|