orbital-ds 0.40.0 → 0.44.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.
Files changed (197) hide show
  1. package/AGENTS.md +29 -10
  2. package/components.manifest.json +6469 -3349
  3. package/dist/auth-form-B1hgbXkI.d.ts +144 -0
  4. package/dist/hooks/use-ds-messages.d.ts +89 -0
  5. package/dist/lib/a2ui-catalog.d.ts +42 -0
  6. package/dist/lib/a2ui-catalog.js +558 -0
  7. package/dist/lib/a2ui.d.ts +289 -0
  8. package/dist/lib/a2ui.js +215 -0
  9. package/dist/lib/ai-events.d.ts +15 -0
  10. package/dist/lib/ai-events.js +202 -0
  11. package/dist/lib/auth-flow.d.ts +3 -1
  12. package/dist/lib/auth-flow.js +24 -3
  13. package/dist/lib/format.d.ts +57 -0
  14. package/dist/lib/format.js +177 -0
  15. package/dist/lib/i18n.d.ts +96 -2
  16. package/dist/lib/i18n.js +278 -2
  17. package/dist/lib/locales/de.d.ts +7 -0
  18. package/dist/lib/locales/de.js +535 -0
  19. package/dist/lib/locales/fr.d.ts +7 -0
  20. package/dist/lib/locales/fr.js +535 -0
  21. package/dist/lib/locales/he.d.ts +7 -0
  22. package/dist/lib/locales/he.js +535 -0
  23. package/dist/lib/locales/it.d.ts +7 -0
  24. package/dist/lib/locales/it.js +535 -0
  25. package/dist/styles.css +62 -2
  26. package/dist/ui/a2ui-renderer.d.ts +44 -0
  27. package/dist/ui/a2ui-renderer.js +793 -0
  28. package/dist/ui/agent-events.d.ts +49 -0
  29. package/dist/ui/agent-events.js +108 -0
  30. package/dist/ui/ai-tag.d.ts +16 -0
  31. package/dist/ui/alert-dialog.d.ts +37 -0
  32. package/dist/ui/alert.d.ts +1 -1
  33. package/dist/ui/animated-number.d.ts +11 -0
  34. package/dist/ui/app-bar.d.ts +22 -0
  35. package/dist/ui/attachment.d.ts +1 -1
  36. package/dist/ui/auth-backdrop.d.ts +17 -0
  37. package/dist/ui/auth-form.d.ts +3 -110
  38. package/dist/ui/auth-form.js +46 -11
  39. package/dist/ui/auth-layout.d.ts +38 -0
  40. package/dist/ui/avatar.d.ts +27 -0
  41. package/dist/ui/ayuda.d.ts +1 -1
  42. package/dist/ui/ayuda.js +4 -1
  43. package/dist/ui/badge.d.ts +1 -1
  44. package/dist/ui/banner.d.ts +1 -1
  45. package/dist/ui/bottom-nav.d.ts +22 -0
  46. package/dist/ui/breadcrumb.d.ts +22 -0
  47. package/dist/ui/breadcrumb.js +1 -1
  48. package/dist/ui/bubble.d.ts +1 -1
  49. package/dist/ui/button.d.ts +2 -2
  50. package/dist/ui/calendar.d.ts +13 -0
  51. package/dist/ui/calendar.js +3 -0
  52. package/dist/ui/card-stack.d.ts +27 -0
  53. package/dist/ui/card.d.ts +33 -0
  54. package/dist/ui/carousel.d.ts +35 -0
  55. package/dist/ui/carousel.js +10 -5
  56. package/dist/ui/chain-of-thought.d.ts +34 -0
  57. package/dist/ui/chain-of-thought.js +90 -0
  58. package/dist/ui/chart-card.d.ts +19 -0
  59. package/dist/ui/chart.d.ts +19 -0
  60. package/dist/ui/chat-composer.d.ts +58 -0
  61. package/dist/ui/chat-composer.js +192 -0
  62. package/dist/ui/choice-card.d.ts +33 -0
  63. package/dist/ui/code-block.d.ts +15 -0
  64. package/dist/ui/combobox.d.ts +48 -0
  65. package/dist/ui/command-palette.d.ts +18 -0
  66. package/dist/ui/command.d.ts +34 -0
  67. package/dist/ui/confirm-action.d.ts +30 -0
  68. package/dist/ui/confirm-dialog.d.ts +23 -0
  69. package/dist/ui/content-card.d.ts +14 -0
  70. package/dist/ui/context-menu.d.ts +35 -0
  71. package/dist/ui/context-menu.js +1 -1
  72. package/dist/ui/conversation-list.d.ts +44 -0
  73. package/dist/ui/conversation-list.js +141 -0
  74. package/dist/ui/copy-button.d.ts +11 -0
  75. package/dist/ui/date-time.d.ts +40 -0
  76. package/dist/ui/date-time.js +55 -0
  77. package/dist/ui/description-list.d.ts +49 -0
  78. package/dist/ui/description-list.js +86 -0
  79. package/dist/ui/detail-panel.d.ts +22 -0
  80. package/dist/ui/dialog.d.ts +35 -0
  81. package/dist/ui/dock.d.ts +17 -0
  82. package/dist/ui/drawer.d.ts +41 -0
  83. package/dist/ui/dropdown-menu.d.ts +32 -0
  84. package/dist/ui/dropdown-menu.js +1 -1
  85. package/dist/ui/echart.d.ts +15 -0
  86. package/dist/ui/empty.d.ts +1 -1
  87. package/dist/ui/entity-list.d.ts +32 -0
  88. package/dist/ui/form-layout.d.ts +24 -0
  89. package/dist/ui/gauge.d.ts +26 -0
  90. package/dist/ui/generated-image.d.ts +33 -0
  91. package/dist/ui/generated-image.js +65 -0
  92. package/dist/ui/generated-table.d.ts +29 -0
  93. package/dist/ui/generated-table.js +59 -0
  94. package/dist/ui/heatmap-grid.d.ts +20 -0
  95. package/dist/ui/hero.d.ts +58 -0
  96. package/dist/ui/hero.js +145 -0
  97. package/dist/ui/i18n-provider.d.ts +16 -0
  98. package/dist/ui/icon-tile.d.ts +2 -2
  99. package/dist/ui/input-group.d.ts +1 -1
  100. package/dist/ui/input-otp.d.ts +23 -0
  101. package/dist/ui/input.d.ts +16 -0
  102. package/dist/ui/instruction-editor.d.ts +17 -0
  103. package/dist/ui/item.d.ts +3 -3
  104. package/dist/ui/label.d.ts +17 -0
  105. package/dist/ui/legend.d.ts +25 -0
  106. package/dist/ui/level-meter.d.ts +12 -0
  107. package/dist/ui/load-more.d.ts +17 -0
  108. package/dist/ui/loading-state.d.ts +12 -0
  109. package/dist/ui/markdown.d.ts +29 -0
  110. package/dist/ui/markdown.js +123 -0
  111. package/dist/ui/media-card.d.ts +16 -0
  112. package/dist/ui/menubar.d.ts +39 -0
  113. package/dist/ui/message-actions.d.ts +21 -0
  114. package/dist/ui/message-actions.js +79 -0
  115. package/dist/ui/message-scroller.d.ts +30 -0
  116. package/dist/ui/message.d.ts +33 -0
  117. package/dist/ui/mfa-challenge.d.ts +3 -32
  118. package/dist/ui/mfa-challenge.js +1 -1
  119. package/dist/ui/mfa-setup.d.ts +1 -1
  120. package/dist/ui/mosaic.d.ts +23 -0
  121. package/dist/ui/motion-provider.d.ts +17 -0
  122. package/dist/ui/native-select.d.ts +22 -0
  123. package/dist/ui/next-step-card.d.ts +55 -0
  124. package/dist/ui/next-step-card.js +92 -0
  125. package/dist/ui/notice-review.d.ts +32 -0
  126. package/dist/ui/oauth-consent.d.ts +1 -1
  127. package/dist/ui/page-header.d.ts +46 -4
  128. package/dist/ui/page-header.js +20 -11
  129. package/dist/ui/page-loader.d.ts +17 -0
  130. package/dist/ui/page-shell.d.ts +17 -0
  131. package/dist/ui/pagination.d.ts +20 -0
  132. package/dist/ui/pagination.js +2 -2
  133. package/dist/ui/panel.d.ts +1 -1
  134. package/dist/ui/password-strength.d.ts +14 -0
  135. package/dist/ui/popover.d.ts +32 -0
  136. package/dist/ui/proportion-bar.d.ts +25 -0
  137. package/dist/ui/quantity.d.ts +25 -0
  138. package/dist/ui/quantity.js +27 -0
  139. package/dist/ui/questionnaire.d.ts +38 -0
  140. package/dist/ui/reasoning.d.ts +24 -0
  141. package/dist/ui/reasoning.js +62 -0
  142. package/dist/ui/reveal.d.ts +17 -0
  143. package/dist/ui/sheet.d.ts +39 -2
  144. package/dist/ui/sheet.js +6 -2
  145. package/dist/ui/shield.d.ts +14 -0
  146. package/dist/ui/show-more.d.ts +14 -0
  147. package/dist/ui/sidebar.d.ts +4 -2
  148. package/dist/ui/sidebar.js +7 -3
  149. package/dist/ui/sparkline.d.ts +1 -1
  150. package/dist/ui/stat-group.d.ts +32 -0
  151. package/dist/ui/stat.d.ts +1 -1
  152. package/dist/ui/status-badge.d.ts +3 -3
  153. package/dist/ui/status-hero.d.ts +18 -0
  154. package/dist/ui/step-dots.d.ts +12 -0
  155. package/dist/ui/step-ring.d.ts +14 -0
  156. package/dist/ui/suggestions.d.ts +17 -0
  157. package/dist/ui/suggestions.js +39 -0
  158. package/dist/ui/table.d.ts +26 -0
  159. package/dist/ui/tag-input.d.ts +21 -0
  160. package/dist/ui/tag-input.js +169 -0
  161. package/dist/ui/task-loader.d.ts +15 -0
  162. package/dist/ui/task-progress.d.ts +14 -0
  163. package/dist/ui/textarea.d.ts +22 -1
  164. package/dist/ui/textarea.js +7 -1
  165. package/dist/ui/timeline.d.ts +26 -0
  166. package/dist/ui/toggle-group.d.ts +24 -0
  167. package/dist/ui/tool-call.d.ts +27 -0
  168. package/dist/ui/tool-call.js +74 -0
  169. package/dist/ui/usage-meter.d.ts +42 -0
  170. package/dist/ui/usage-meter.js +116 -0
  171. package/dist/ui/week-strip.d.ts +11 -0
  172. package/dist/ui/week-strip.js +2 -2
  173. package/dist/ui/workflow-run.d.ts +51 -0
  174. package/dist/ui/workflow-run.js +185 -0
  175. package/docs/adr/0001-rtl-clases-logicas.md +14 -1
  176. package/docs/designer/criterio.md +87 -87
  177. package/docs/designer/flujo.md +1 -1
  178. package/docs/designer/patrones.md +43 -2
  179. package/manifest/actions.json +364 -0
  180. package/manifest/agents.json +399 -0
  181. package/manifest/ai.json +128 -0
  182. package/manifest/auth.json +1547 -0
  183. package/manifest/chat.json +612 -0
  184. package/manifest/content.json +2298 -0
  185. package/manifest/data.json +2904 -0
  186. package/manifest/feedback.json +1005 -0
  187. package/manifest/forms.json +1954 -0
  188. package/manifest/motion.json +196 -0
  189. package/manifest/navigation.json +1792 -0
  190. package/manifest/overlays.json +931 -0
  191. package/package.json +35 -21
  192. package/scripts/cli.mjs +105 -8
  193. package/scripts/doctor.mjs +126 -1
  194. package/scripts/eslint-plugin.mjs +93 -0
  195. package/scripts/i18n.mjs +1 -1
  196. package/scripts/manifest.mjs +159 -7
  197. package/skill/SKILL.md +8 -3
@@ -1,5 +1,29 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group forms
5
+ * @summary Maqueta de un formulario o pantalla de ajustes: secciones y barra Guardar/Descartar resueltas, en una columna o con títulos al lado.
6
+ * @see field — cada campo dentro de las secciones
7
+ * @see step-flow — un formulario largo repartido en pasos
8
+ * @see filter-bar — filtros de una lista, no un formulario que se guarda
9
+ * @example Preset inline (alta corta)
10
+ * <FormLayout preset="inline" onSave={crear}>
11
+ * <Field>
12
+ * <FieldLabel htmlFor="name">Nombre</FieldLabel>
13
+ * <Input id="name" />
14
+ * </Field>
15
+ * </FormLayout>
16
+ * @example Preset settings (barra solo con cambios)
17
+ * <FormLayout preset="settings" dirty={dirty} onSave={guardar} onDiscard={descartar}>
18
+ * <FormSection title="General" description="Datos básicos de la organización.">
19
+ * <Field>
20
+ * <FieldLabel htmlFor="org">Nombre</FieldLabel>
21
+ * <Input id="org" value={nombre} onChange={(e) => setNombre(e.target.value)} />
22
+ * </Field>
23
+ * </FormSection>
24
+ * </FormLayout>
25
+ */
26
+
3
27
  type FormLayoutPreset = "inline" | "sectioned" | "settings";
4
28
  declare function FormLayout({ preset, dirty, saving, onSave, onDiscard, saveLabel, discardLabel, className, children, ...props }: Omit<React.ComponentProps<"form">, "onSubmit"> & {
5
29
  preset?: FormLayoutPreset;
@@ -1,6 +1,32 @@
1
1
  import * as React from 'react';
2
2
  import { DsDataTone } from './legend.js';
3
3
 
4
+ /**
5
+ * @group data
6
+ * @summary Un valor sobre un máximo en anillo o arco, con la cifra en el centro y etiqueta de estado (riesgo, puntuación, reparto en tramos). Para uso frente a lo contratado, UsageMeter.
7
+ * @see usage-meter — uso frente a un límite contratado (almacenamiento, puestos), con aviso al 80 %
8
+ * @see level-meter — un nivel en porcentaje con su categoría y rango, sin anillo
9
+ * @see proportion-bar — parte frente al total o reparto en una barra horizontal
10
+ * @example Anillo con cifra y etiqueta de estado
11
+ * <Gauge value={540} max={1000} tone="warning" label="Riesgo">
12
+ * <GaugeValue>
13
+ * 540<GaugeSuffix>/1.000</GaugeSuffix>
14
+ * </GaugeValue>
15
+ * <GaugeTag>Riesgo medio</GaugeTag>
16
+ * </Gauge>
17
+ * @example Arco con escala
18
+ * <Gauge shape="semi" value={82} tone="success" label="Puntuación">
19
+ * <GaugeValue>82</GaugeValue>
20
+ * <GaugeTag>Bajo</GaugeTag>
21
+ * </Gauge>
22
+ * <GaugeScale min="Alto" max="Bajo" />
23
+ * @example Tramos con leyenda
24
+ * <Gauge label="Dispositivos" max={10} segments={[{ value: 6, tone: "success", label: "Protegidos" }, { value: 4, tone: "danger", label: "En peligro" }]}>
25
+ * <GaugeValue>10</GaugeValue>
26
+ * <GaugeCaption>dispositivos</GaugeCaption>
27
+ * </Gauge>
28
+ */
29
+
4
30
  type GaugeShape = "ring" | "semi";
5
31
  interface GaugeSegment {
6
32
  value: number;
@@ -0,0 +1,33 @@
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * @group ai
5
+ * @summary Imagen creada por IA dentro de un mensaje, con sus estados (generando, lista con descargar y regenerar, error) y la proporción fija para que la página no salte.
6
+ * @see media-card — imagen de contenido de la app, no generada
7
+ * @see aspect-ratio — cualquier imagen con proporción fija
8
+ * @example Imagen lista
9
+ * <GeneratedImage
10
+ * status="done"
11
+ * src={url}
12
+ * alt="Un faro al amanecer sobre el mar"
13
+ * prompt={prompt}
14
+ * ratio="16/9"
15
+ * downloadName="faro.png"
16
+ * onRetry={regenerate}
17
+ * />
18
+ * @example Generando
19
+ * <GeneratedImage status="loading" alt="Un faro al amanecer" ratio="1/1" />
20
+ */
21
+
22
+ declare function GeneratedImage({ status, src, alt, prompt, ratio, downloadName, onRetry, className, style, ...props }: Omit<React.ComponentProps<"figure">, "children"> & {
23
+ status?: "loading" | "done" | "error";
24
+ src?: string;
25
+ alt: string;
26
+ prompt?: string;
27
+ /** Proporción del hueco, p. ej. `"1/1"`, `"16/9"`. */
28
+ ratio?: string;
29
+ downloadName?: string;
30
+ onRetry?: () => void;
31
+ }): React.JSX.Element;
32
+
33
+ export { GeneratedImage };
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { AlertCircleIcon, DownloadIcon, RefreshCwIcon } from "lucide-react";
4
+ import { useDsMessages } from "../hooks/use-ds-messages.js";
5
+ import { cn } from "../lib/utils.js";
6
+ import { Button } from "./button.js";
7
+ import { Spinner } from "./spinner.js";
8
+ function GeneratedImage({
9
+ status = "done",
10
+ src,
11
+ alt,
12
+ prompt,
13
+ ratio = "1/1",
14
+ downloadName = "image.png",
15
+ onRetry,
16
+ className,
17
+ style,
18
+ ...props
19
+ }) {
20
+ const t = useDsMessages();
21
+ const ready = status === "done" && Boolean(src);
22
+ return /* @__PURE__ */ jsxs(
23
+ "figure",
24
+ {
25
+ "data-slot": "generated-image",
26
+ "data-status": status,
27
+ className: cn("flex w-full max-w-md flex-col gap-2", className),
28
+ style,
29
+ ...props,
30
+ children: [
31
+ /* @__PURE__ */ jsx("div", { className: "relative overflow-hidden rounded-lg border border-border bg-muted/40", style: { aspectRatio: ratio }, children: ready ? /* @__PURE__ */ jsx("img", { src, alt, className: "size-full object-cover" }) : status === "loading" ? /* @__PURE__ */ jsxs("div", { role: "status", className: "flex size-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground", children: [
32
+ /* @__PURE__ */ jsx(Spinner, { "aria-hidden": true, role: "presentation" }),
33
+ /* @__PURE__ */ jsx("span", { className: "text-shimmer", children: t.imageGenerating })
34
+ ] }) : /* @__PURE__ */ jsxs("div", { role: "alert", className: "flex size-full flex-col items-center justify-center gap-3 p-4 text-center text-sm text-danger", children: [
35
+ /* @__PURE__ */ jsx(AlertCircleIcon, { "aria-hidden": true, className: "size-5" }),
36
+ /* @__PURE__ */ jsx("span", { children: t.imageError }),
37
+ onRetry ? /* @__PURE__ */ jsxs(Button, { size: "sm", variant: "outline", onClick: onRetry, children: [
38
+ /* @__PURE__ */ jsx(RefreshCwIcon, { "data-icon": "inline-start" }),
39
+ t.messageRetry
40
+ ] }) : null
41
+ ] }) }),
42
+ prompt || ready ? /* @__PURE__ */ jsxs("figcaption", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
43
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: prompt }),
44
+ ready ? /* @__PURE__ */ jsxs(Fragment, { children: [
45
+ onRetry ? /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-xs", "aria-label": t.messageRetry, onClick: onRetry, children: /* @__PURE__ */ jsx(RefreshCwIcon, {}) }) : null,
46
+ /* @__PURE__ */ jsx(
47
+ Button,
48
+ {
49
+ variant: "ghost",
50
+ size: "icon-xs",
51
+ "aria-label": t.imageDownload,
52
+ render: /* @__PURE__ */ jsx("a", { href: src, download: downloadName }),
53
+ nativeButton: false,
54
+ children: /* @__PURE__ */ jsx(DownloadIcon, {})
55
+ }
56
+ )
57
+ ] }) : null
58
+ ] }) : null
59
+ ]
60
+ }
61
+ );
62
+ }
63
+ export {
64
+ GeneratedImage
65
+ };
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * @group ai
5
+ * @summary Tabla de solo lectura que produce una herramienta del agente dentro de un mensaje, con descarga CSV opcional; para ordenar, filtrar o paginar, DataTable.
6
+ * @see data-table — tabla de la app con orden, filtros y paginación
7
+ * @see table — tabla estática que la app compone a mano
8
+ * @example Resultado descargable
9
+ * <GeneratedTable
10
+ * caption="Planes disponibles"
11
+ * columns={["Plan", "Precio"]}
12
+ * rows={[
13
+ * { Plan: "Básico", Precio: "0 €" },
14
+ * { Plan: "Pro", Precio: "9 €" },
15
+ * ]}
16
+ * downloadable
17
+ * downloadName="planes.csv"
18
+ * />
19
+ */
20
+
21
+ declare function GeneratedTable({ columns, rows, caption, downloadable, downloadName, className, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
22
+ columns: string[];
23
+ rows: Record<string, React.ReactNode>[];
24
+ caption?: React.ReactNode;
25
+ downloadable?: boolean;
26
+ downloadName?: string;
27
+ }): React.JSX.Element;
28
+
29
+ export { GeneratedTable };
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { DownloadIcon } from "lucide-react";
5
+ import { useDsMessages } from "../hooks/use-ds-messages.js";
6
+ import { cn } from "../lib/utils.js";
7
+ import { Button } from "./button.js";
8
+ import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from "./table.js";
9
+ function csv(columns, rows) {
10
+ const cell = (v) => `"${String(v ?? "").replace(/"/g, '""')}"`;
11
+ return [columns.map(cell).join(","), ...rows.map((r) => columns.map((c) => cell(r[c])).join(","))].join("\n");
12
+ }
13
+ function GeneratedTable({
14
+ columns,
15
+ rows,
16
+ caption,
17
+ downloadable = false,
18
+ downloadName = "table.csv",
19
+ className,
20
+ ...props
21
+ }) {
22
+ const t = useDsMessages();
23
+ const href = React.useMemo(
24
+ () => downloadable ? `data:text/csv;charset=utf-8,${encodeURIComponent(csv(columns, rows))}` : void 0,
25
+ [downloadable, columns, rows]
26
+ );
27
+ return /* @__PURE__ */ jsxs(
28
+ "div",
29
+ {
30
+ "data-slot": "generated-table",
31
+ className: cn("flex flex-col gap-2 rounded-lg border border-border bg-card p-2 text-card-foreground", className),
32
+ ...props,
33
+ children: [
34
+ /* @__PURE__ */ jsxs(Table, { children: [
35
+ caption ? /* @__PURE__ */ jsx(TableCaption, { children: caption }) : null,
36
+ /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: columns.map((c) => /* @__PURE__ */ jsx(TableHead, { scope: "col", children: c }, c)) }) }),
37
+ /* @__PURE__ */ jsx(TableBody, { children: rows.length === 0 ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: Math.max(columns.length, 1), className: "text-center text-muted-foreground", children: t.tableEmpty }) }) : rows.map((r, i) => /* @__PURE__ */ jsx(TableRow, { children: columns.map((c) => /* @__PURE__ */ jsx(TableCell, { children: r[c] }, c)) }, i)) })
38
+ ] }),
39
+ href && rows.length ? /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxs(
40
+ Button,
41
+ {
42
+ variant: "ghost",
43
+ size: "sm",
44
+ "data-slot": "generated-table-download",
45
+ render: /* @__PURE__ */ jsx("a", { href, download: downloadName }),
46
+ nativeButton: false,
47
+ children: [
48
+ /* @__PURE__ */ jsx(DownloadIcon, { "data-icon": "inline-start" }),
49
+ t.tableDownload
50
+ ]
51
+ }
52
+ ) }) : null
53
+ ]
54
+ }
55
+ );
56
+ }
57
+ export {
58
+ GeneratedTable
59
+ };
@@ -1,6 +1,26 @@
1
1
  import * as React from 'react';
2
2
  import { DsDataTone } from './legend.js';
3
3
 
4
+ /**
5
+ * @group data
6
+ * @summary Mapa de calor accesible como tabla (día × hora, fila × columna): celdas navegables con flechas, sin dato rayado y tarjeta flotante. Para un mapa de calor dentro de un gráfico, EChart.
7
+ * @see echart — mapa de calor como gráfico (heatmapOption de echarts-presets), sin navegación por celdas
8
+ * @see data-table — valores exactos por filas y columnas que se ordenan o filtran
9
+ * @see legend — explicar tonos o series fuera del gráfico
10
+ * @example Día × hora con unidad en el valor
11
+ * <HeatmapGrid
12
+ * caption="Llamadas por día y hora"
13
+ * rows={["Lunes", "Martes"]}
14
+ * columns={["09", "10", "11"]}
15
+ * values={[[12, 30, null], [8, 22, 41]]}
16
+ * formatValue={(v) => `${v} llamadas`}
17
+ * />
18
+ * @example Celda pulsable para filtrar, con otro tono
19
+ * <HeatmapGrid aria-label="Backlog por día y hora" rows={days} columns={hours} values={backlog} tone="warning" onCellClick={(c) => setCell(c)} />
20
+ * @note Un hueco es null (celda rayada, «sin dato»), nunca 0. Da siempre caption o aria-label y formatValue con la unidad: es lo que se lee en cada celda.
21
+ * @note tone es del vocabulario común (DsDataTone): un solo tono por mapa, de bajo a alto. Para elegir celdas, onCellClick (también con Intro).
22
+ */
23
+
4
24
  interface HeatmapCell {
5
25
  row: number;
6
26
  column: number;
@@ -0,0 +1,58 @@
1
+ import * as React from 'react';
2
+ import { AuthBackdropVariant } from './auth-backdrop.js';
3
+
4
+ /**
5
+ * @group content
6
+ * @summary Portada de una web, un producto o un módulo: antetítulo, título grande, texto, acciones y, según el preset, imagen al lado, foto de fondo o tira de logos o cifras.
7
+ * @see page-header — cabecera de una vista de trabajo (título, migas, acciones), no una portada
8
+ * @see empty-state — un módulo que aún no tiene contenido e invita a crear lo primero
9
+ * @see content-card — tarjeta de presentación dentro de una rejilla, no la portada de la página
10
+ * @example Portada de producto
11
+ * <Hero
12
+ * preset="landing"
13
+ * eyebrow={<Badge variant="secondary">Nuevo · Informes automáticos</Badge>}
14
+ * title="Tus operaciones, en una sola vista"
15
+ * description="Conecta tus fuentes y recibe cada lunes el informe que antes hacías a mano."
16
+ * actions={<><Button size="lg">Empezar gratis</Button><Button size="lg" variant="outline">Ver demo</Button></>}
17
+ * backdrop="mesh"
18
+ * />
19
+ * @example Texto junto a una captura
20
+ * <Hero preset="split" title="Todo tu equipo, al día" description="Avisos, tareas y métricas en un panel." actions={<Button>Probar</Button>} media={<img src="/panel.png" alt="Panel de control con métricas" />} />
21
+ * @example Portada de un módulo dentro de la app
22
+ * <Hero preset="section" title="Integraciones" description="Conecta tus herramientas en dos clics." actions={<Button>Añadir integración</Button>} footer={<StatGroup preset="strip">…</StatGroup>} />
23
+ */
24
+
25
+ type HeroPreset = "landing" | "split" | "media" | "section";
26
+ type HeroAlign = "start" | "center";
27
+ type HeroProps = Omit<React.ComponentProps<"section">, "title"> & {
28
+ preset?: HeroPreset;
29
+ /** Título de la portada. No es el atributo HTML `title`. */
30
+ title: React.ReactNode;
31
+ /** Texto de apoyo bajo el título (una o dos frases). */
32
+ description?: React.ReactNode;
33
+ /** Sobre el título: una Badge de novedad, un enlace «Nuevo: …» o la categoría. */
34
+ eyebrow?: React.ReactNode;
35
+ /** Llamadas a la acción (una principal y, como mucho, una secundaria). */
36
+ actions?: React.ReactNode;
37
+ /** split: la imagen, el vídeo o la demo junto al texto (con su `alt`). */
38
+ media?: React.ReactNode;
39
+ /** Bajo todo: tira de logos de clientes, cifras (StatGroup preset="strip") o una nota. */
40
+ footer?: React.ReactNode;
41
+ /** Alineación del texto; por defecto, la del preset. */
42
+ align?: HeroAlign;
43
+ /** Fondo decorativo (ver AuthBackdrop). Por defecto ninguno; `media` usa `image`. */
44
+ backdrop?: AuthBackdropVariant;
45
+ /** backdrop="image": la foto o el vídeo de fondo (un <img>/<video> con alt=""). */
46
+ backdropMedia?: React.ReactNode;
47
+ /** Cristal esmerilado sobre el fondo. */
48
+ backdropGlass?: boolean;
49
+ /** Placa bajo el texto para garantizar el contraste sobre un fondo cargado; por defecto, solo con foto. */
50
+ plate?: boolean;
51
+ /** Entrada en cascada con el ritmo del tema (quieta con movimiento reducido). */
52
+ animated?: boolean;
53
+ /** Nivel del título: h1 si es la portada de la página; h2 si va dentro de otra vista. */
54
+ titleAs?: "h1" | "h2";
55
+ };
56
+ declare function Hero({ preset, title, description, eyebrow, actions, media, footer, align, backdrop, backdropMedia, backdropGlass, plate, animated, titleAs: Title, className, children, ...props }: HeroProps): React.JSX.Element;
57
+
58
+ export { Hero, type HeroAlign, type HeroPreset, type HeroProps };
@@ -0,0 +1,145 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { dsWarn } from "../lib/presets.js";
4
+ import { cn } from "../lib/utils.js";
5
+ import { AuthBackdrop } from "./auth-backdrop.js";
6
+ const PRESET_ALIGN = {
7
+ landing: "center",
8
+ split: "start",
9
+ media: "center",
10
+ section: "start"
11
+ };
12
+ const PRESET_SCALE = {
13
+ landing: "",
14
+ split: "",
15
+ media: "",
16
+ section: "[--ds-hero-title-size:var(--ds-hero-title-size-section)] [--ds-hero-title-size-wide:var(--ds-hero-title-size-section-wide)] [--ds-hero-py:var(--ds-hero-py-section)] [--ds-hero-py-wide:var(--ds-hero-py-section-wide)]"
17
+ };
18
+ function Hero({
19
+ preset = "landing",
20
+ title,
21
+ description,
22
+ eyebrow,
23
+ actions,
24
+ media,
25
+ footer,
26
+ align,
27
+ backdrop,
28
+ backdropMedia,
29
+ backdropGlass = false,
30
+ plate,
31
+ animated = false,
32
+ titleAs: Title = "h1",
33
+ className,
34
+ children,
35
+ ...props
36
+ }) {
37
+ const side = align ?? PRESET_ALIGN[preset];
38
+ const fx = backdrop ?? (preset === "media" ? "image" : "none");
39
+ const withFx = fx !== "none" || backdropGlass;
40
+ const withPlate = plate ?? fx === "image";
41
+ const isSplit = preset === "split" && media != null;
42
+ if (preset === "split" && media == null) dsWarn("Hero", 'preset="split" needs `media` (image, video or demo); it renders as a single column.');
43
+ if (fx === "image" && backdropMedia == null) dsWarn("Hero", 'backdrop="image" needs `backdropMedia` (an <img>/<video> with alt="").');
44
+ if (preset !== "split" && media != null) dsWarn("Hero", '`media` is only laid out by preset="split"; use `backdropMedia` for a background photo.');
45
+ const enter = (i) => animated ? { className: "animate-ds-stagger motion-reduce:animate-none", style: { "--ds-stagger-i": i } } : { className: void 0, style: void 0 };
46
+ return /* @__PURE__ */ jsxs(
47
+ "section",
48
+ {
49
+ "data-slot": "hero",
50
+ "data-preset": preset,
51
+ "data-align": side,
52
+ "data-backdrop": withFx ? fx : void 0,
53
+ className: cn(
54
+ "@container/hero relative isolate w-full overflow-hidden rounded-(--ds-hero-radius) bg-(--ds-hero-bg) px-(--ds-hero-px) py-(--ds-hero-py) text-(--ds-hero-fg) @3xl/hero:py-(--ds-hero-py-wide)",
55
+ PRESET_SCALE[preset],
56
+ className
57
+ ),
58
+ ...props,
59
+ children: [
60
+ withFx ? /* @__PURE__ */ jsx(AuthBackdrop, { variant: fx, media: backdropMedia, glass: backdropGlass, animated }) : null,
61
+ /* @__PURE__ */ jsxs(
62
+ "div",
63
+ {
64
+ "data-slot": "hero-inner",
65
+ className: cn(
66
+ "relative mx-auto grid w-full max-w-(--ds-page-max-w) grid-cols-1 gap-(--ds-hero-gap)",
67
+ isSplit && "@3xl/hero:grid-cols-2 @3xl/hero:items-center"
68
+ ),
69
+ children: [
70
+ /* @__PURE__ */ jsxs(
71
+ "div",
72
+ {
73
+ "data-slot": "hero-content",
74
+ className: cn(
75
+ "flex min-w-0 flex-col gap-(--ds-hero-content-gap)",
76
+ side === "center" ? "mx-auto max-w-(--ds-hero-measure) items-center text-center" : "max-w-(--ds-hero-measure) items-start text-start",
77
+ withPlate && "rounded-(--ds-auth-radius) border border-(--ds-auth-border) bg-(--ds-backdrop-plate-bg) p-(--ds-auth-p-sm) text-foreground shadow-(--ds-auth-shadow-elevated) [backdrop-filter:var(--ds-auth-glass-filter)] @3xl/hero:p-(--ds-auth-p)"
78
+ ),
79
+ children: [
80
+ eyebrow ? /* @__PURE__ */ jsx("div", { "data-slot": "hero-eyebrow", className: cn("flex flex-wrap items-center gap-2 text-sm", enter(0).className), style: enter(0).style, children: eyebrow }) : null,
81
+ /* @__PURE__ */ jsx(
82
+ Title,
83
+ {
84
+ "data-slot": "hero-title",
85
+ className: cn(
86
+ "text-(length:--ds-hero-title-size) leading-(--ds-hero-title-leading) font-(--ds-hero-title-weight) tracking-(--ds-hero-title-tracking) text-balance @3xl/hero:text-(length:--ds-hero-title-size-wide)",
87
+ enter(1).className
88
+ ),
89
+ style: enter(1).style,
90
+ children: title
91
+ }
92
+ ),
93
+ description ? /* @__PURE__ */ jsx(
94
+ "p",
95
+ {
96
+ "data-slot": "hero-description",
97
+ className: cn("text-(length:--ds-hero-description-size) text-pretty text-muted-foreground", enter(2).className),
98
+ style: enter(2).style,
99
+ children: description
100
+ }
101
+ ) : null,
102
+ actions ? /* @__PURE__ */ jsx(
103
+ "div",
104
+ {
105
+ "data-slot": "hero-actions",
106
+ className: cn("flex flex-wrap items-center gap-3", side === "center" && "justify-center", enter(3).className),
107
+ style: enter(3).style,
108
+ children: actions
109
+ }
110
+ ) : null
111
+ ]
112
+ }
113
+ ),
114
+ isSplit ? /* @__PURE__ */ jsx(
115
+ "div",
116
+ {
117
+ "data-slot": "hero-media",
118
+ className: cn(
119
+ "min-w-0 overflow-hidden rounded-(--ds-hero-media-radius) shadow-(--ds-hero-media-shadow) [&>img]:size-full [&>img]:object-cover [&>video]:size-full [&>video]:object-cover",
120
+ enter(2).className
121
+ ),
122
+ style: enter(2).style,
123
+ children: media
124
+ }
125
+ ) : null,
126
+ footer ? /* @__PURE__ */ jsx(
127
+ "div",
128
+ {
129
+ "data-slot": "hero-footer",
130
+ className: cn("min-w-0 @3xl/hero:col-span-full", side === "center" && "text-center", enter(4).className),
131
+ style: enter(4).style,
132
+ children: footer
133
+ }
134
+ ) : null
135
+ ]
136
+ }
137
+ ),
138
+ children
139
+ ]
140
+ }
141
+ );
142
+ }
143
+ export {
144
+ Hero
145
+ };
@@ -1,6 +1,22 @@
1
1
  import * as React from 'react';
2
2
  import { DsMessages } from '../lib/i18n.js';
3
3
 
4
+ /**
5
+ * @group content
6
+ * @summary Proveedor raíz que fija idioma, textos propios y dirección (ltr / rtl) de los componentes de orbital-ds; se monta una vez con el idioma activo de la app.
7
+ * @see direction — solo la dirección de Base UI (ya incluida aquí)
8
+ * @see motion-provider — proveedor raíz de Motion para animar con los presets del tema
9
+ * @example Con i18next (espacio «orbital»)
10
+ * <DsI18nProvider locale={i18n.language} messages={i18n.getResourceBundle(i18n.language, "orbital")}>
11
+ * <App />
12
+ * </DsI18nProvider>
13
+ * @example Con los catálogos incluidos (en, es, pt-BR)
14
+ * <DsI18nProvider locale="es">
15
+ * <App />
16
+ * </DsI18nProvider>
17
+ * @note Sin provider, los textos de los componentes salen en inglés. Pon además `dir={dsDirection(idioma)}` en `<html>`; la prop `dir` de aquí solo fuerza la dirección.
18
+ */
19
+
4
20
  declare function DsI18nProvider({ locale, messages, dir, children, }: {
5
21
  locale?: string | null;
6
22
  messages?: Partial<DsMessages>;
@@ -3,8 +3,8 @@ import { VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
4
 
5
5
  declare const iconTileVariants: (props?: ({
6
- tone?: "info" | "success" | "warning" | "danger" | "neutral" | "primary" | "accent" | null | undefined;
7
- size?: "sm" | "lg" | "md" | null | undefined;
6
+ tone?: "neutral" | "primary" | "info" | "success" | "warning" | "danger" | "accent" | null | undefined;
7
+ size?: "sm" | "md" | "lg" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  declare function IconTile({ className, tone, size, ...props }: React.ComponentProps<"div"> & VariantProps<typeof iconTileVariants>): React.JSX.Element;
10
10
 
@@ -10,7 +10,7 @@ declare const inputGroupAddonVariants: (props?: ({
10
10
  } & class_variance_authority_types.ClassProp) | undefined) => string;
11
11
  declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
12
12
  declare const inputGroupButtonVariants: (props?: ({
13
- size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
13
+ size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
14
14
  } & class_variance_authority_types.ClassProp) | undefined) => string;
15
15
  declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> & VariantProps<typeof inputGroupButtonVariants> & {
16
16
  type?: "button" | "submit" | "reset";
@@ -1,6 +1,29 @@
1
1
  import * as React from 'react';
2
2
  import { OTPInput } from 'input-otp';
3
3
 
4
+ /**
5
+ * @group forms
6
+ * @summary Código de un solo uso en casillas (verificación por SMS o correo, MFA): pega y avanza solo entre dígitos.
7
+ * @see mfa-challenge — la pantalla completa del segundo factor
8
+ * @see input — un código o dato de longitud libre
9
+ * @example Código de 6 dígitos en dos grupos
10
+ * <InputOTP maxLength={6} value={codigo} onChange={setCodigo}>
11
+ * <InputOTPGroup>
12
+ * <InputOTPSlot index={0} />
13
+ * <InputOTPSlot index={1} />
14
+ * <InputOTPSlot index={2} />
15
+ * </InputOTPGroup>
16
+ * <InputOTPSeparator />
17
+ * <InputOTPGroup>
18
+ * <InputOTPSlot index={3} />
19
+ * <InputOTPSlot index={4} />
20
+ * <InputOTPSlot index={5} />
21
+ * </InputOTPGroup>
22
+ * </InputOTP>
23
+ * @note Un InputOTPSlot por posición, con `index` de 0 a `maxLength - 1`; el error se marca con `aria-invalid` en cada casilla.
24
+ * @note input-otp es dependencia opcional de la app.
25
+ */
26
+
4
27
  declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
5
28
  containerClassName?: string;
6
29
  }): React.JSX.Element;
@@ -1,5 +1,21 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group forms
5
+ * @summary Campo de texto de una línea (nombre, correo, importe); va dentro de Field con su etiqueta.
6
+ * @see input-group — el campo necesita icono, prefijo, sufijo o botón dentro
7
+ * @see textarea — texto de varias líneas
8
+ * @see password-input — contraseñas, con mostrar/ocultar y autocompletado correcto
9
+ * @example Con etiqueta
10
+ * <Field>
11
+ * <FieldLabel htmlFor="email">Correo</FieldLabel>
12
+ * <Input id="email" type="email" autoComplete="email" />
13
+ * </Field>
14
+ * @example Con error
15
+ * <Input id="vat" aria-invalid="true" defaultValue="B1234" />
16
+ * @note El placeholder no es etiqueta: pon siempre FieldLabel (o `aria-label` si no hay sitio).
17
+ */
18
+
3
19
  declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
4
20
 
5
21
  export { Input };
@@ -1,6 +1,23 @@
1
1
  import * as React from 'react';
2
2
  import { ImageUploader } from '../lib/image-upload.js';
3
3
 
4
+ /**
5
+ * @group forms
6
+ * @summary Editor de instrucciones, prompts o documentos que siempre entrega Markdown, con vistas visual, Markdown, HTML y previa, y variables.
7
+ * @see textarea — texto libre corto sin formato
8
+ * @see chat-composer — escribir un mensaje en un chat
9
+ * @example Preset prompt con variables
10
+ * <InstructionEditor
11
+ * preset="prompt"
12
+ * value={md}
13
+ * onChange={setMd}
14
+ * variables={["company", "user_name"]}
15
+ * aria-label="Instrucciones del agente"
16
+ * />
17
+ * @example Preset compact (nota corta)
18
+ * <InstructionEditor preset="compact" defaultValue="" placeholder="Añade una nota…" aria-label="Nota" />
19
+ */
20
+
4
21
  type InstructionEditorPreset = "prompt" | "document" | "compact";
5
22
  /** Lo que devuelve `renderPreview`: el texto final y, si la app los calcula, datos de tamaño (p. ej. tokens TOON frente a JSON). */
6
23
  interface InstructionPreview {
package/dist/ui/item.d.ts CHANGED
@@ -8,12 +8,12 @@ import '@base-ui/react/separator';
8
8
  declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
9
  declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
10
10
  declare const itemVariants: (props?: ({
11
- variant?: "default" | "outline" | "muted" | "card" | null | undefined;
12
- size?: "default" | "xs" | "sm" | null | undefined;
11
+ variant?: "default" | "outline" | "card" | "muted" | null | undefined;
12
+ size?: "default" | "sm" | "xs" | null | undefined;
13
13
  } & class_variance_authority_types.ClassProp) | undefined) => string;
14
14
  declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>): React.JSX.Element;
15
15
  declare const itemMediaVariants: (props?: ({
16
- variant?: "image" | "default" | "icon" | null | undefined;
16
+ variant?: "image" | "icon" | "default" | null | undefined;
17
17
  } & class_variance_authority_types.ClassProp) | undefined) => string;
18
18
  declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
19
19
  declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
@@ -1,5 +1,22 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group forms
5
+ * @summary Etiqueta accesible (label nativa) para un control suelto fuera de la estructura de formulario.
6
+ * @see field — en formularios: FieldLabel junto con ayuda y error
7
+ * @example Etiqueta asociada
8
+ * <Label htmlFor="ie-preset">Preset</Label>
9
+ * <NativeSelect id="ie-preset">
10
+ * <NativeSelectOption value="prompt">Prompt</NativeSelectOption>
11
+ * </NativeSelect>
12
+ * @example Envolviendo el control
13
+ * <Label>
14
+ * <Switch />
15
+ * Avisos por correo
16
+ * </Label>
17
+ * @note Asocia con `htmlFor` o envolviendo el control; en un formulario usa FieldLabel dentro de Field.
18
+ */
19
+
3
20
  declare function Label({ className, ...props }: React.ComponentProps<"label">): React.JSX.Element;
4
21
 
5
22
  export { Label };