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
@@ -0,0 +1,192 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import {
5
+ AlertCircleIcon,
6
+ ArrowUpIcon,
7
+ CheckIcon,
8
+ FileIcon,
9
+ ImageIcon,
10
+ MicIcon,
11
+ PaperclipIcon,
12
+ SquareIcon,
13
+ XIcon
14
+ } from "lucide-react";
15
+ import { useDsMessages } from "../hooks/use-ds-messages.js";
16
+ import { dsFormat } from "../lib/i18n.js";
17
+ import { cn } from "../lib/utils.js";
18
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupTextarea } from "./input-group.js";
19
+ import { Spinner } from "./spinner.js";
20
+ const clock = (s) => `${Math.floor(s / 60)}:${String(Math.floor(s % 60)).padStart(2, "0")}`;
21
+ function ChatComposer({
22
+ value,
23
+ defaultValue = "",
24
+ onValueChange,
25
+ onSend,
26
+ onStop,
27
+ onAttach,
28
+ onFilesDrop,
29
+ attachments,
30
+ onRemoveAttachment,
31
+ voice,
32
+ maxLength,
33
+ streaming = false,
34
+ disabled,
35
+ placeholder,
36
+ className,
37
+ ...props
38
+ }) {
39
+ const t = useDsMessages();
40
+ const [inner, setInner] = React.useState(defaultValue);
41
+ const [dragging, setDragging] = React.useState(false);
42
+ const text = value ?? inner;
43
+ const set = (v) => {
44
+ if (value === void 0) setInner(v);
45
+ onValueChange?.(v);
46
+ };
47
+ const busyFiles = attachments?.some((a) => a.status === "uploading") ?? false;
48
+ const recording = voice?.state === "recording";
49
+ const canSend = !disabled && !streaming && !busyFiles && (text.trim().length > 0 || (attachments?.length ?? 0) > 0);
50
+ const send = () => {
51
+ if (!canSend) return;
52
+ onSend?.(text.trim());
53
+ set("");
54
+ };
55
+ const nearLimit = maxLength !== void 0 && text.length >= maxLength * 0.8;
56
+ const status = voice?.state === "transcribing" ? t.voiceTranscribing : voice?.state === "error" ? t.voiceError : busyFiles ? t.composerUploading : "";
57
+ return /* @__PURE__ */ jsxs(
58
+ "div",
59
+ {
60
+ "data-slot": "chat-composer",
61
+ "data-streaming": streaming || void 0,
62
+ "data-voice": voice?.state && voice.state !== "idle" ? voice.state : void 0,
63
+ "data-dragging": dragging || void 0,
64
+ className: cn("relative w-full", className),
65
+ onDragOver: onFilesDrop ? (e) => {
66
+ e.preventDefault();
67
+ setDragging(true);
68
+ } : void 0,
69
+ onDragLeave: onFilesDrop ? () => setDragging(false) : void 0,
70
+ onDrop: onFilesDrop ? (e) => {
71
+ e.preventDefault();
72
+ setDragging(false);
73
+ const files = Array.from(e.dataTransfer.files);
74
+ if (files.length) onFilesDrop(files);
75
+ } : void 0,
76
+ ...props,
77
+ children: [
78
+ attachments?.length ? /* @__PURE__ */ jsx("ul", { className: "mb-2 flex flex-wrap gap-2", children: attachments.map((a) => {
79
+ const st = a.status ?? "ready";
80
+ return /* @__PURE__ */ jsxs(
81
+ "li",
82
+ {
83
+ "data-slot": "chat-composer-attachment",
84
+ "data-status": st,
85
+ className: cn(
86
+ "flex max-w-full items-center gap-2 rounded-control border border-border bg-card py-1 ps-2 pe-1 text-sm",
87
+ st === "error" && "border-danger text-danger"
88
+ ),
89
+ children: [
90
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-muted-foreground [&_svg]:size-4", children: st === "uploading" ? /* @__PURE__ */ jsx(Spinner, { "aria-hidden": true, role: "presentation", className: "size-3.5" }) : st === "error" ? /* @__PURE__ */ jsx(AlertCircleIcon, { className: "text-danger" }) : a.type?.startsWith("image/") ? /* @__PURE__ */ jsx(ImageIcon, {}) : /* @__PURE__ */ jsx(FileIcon, {}) }),
91
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: a.name }),
92
+ st === "error" ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: t.composerFileError }) : null,
93
+ onRemoveAttachment ? /* @__PURE__ */ jsx(
94
+ InputGroupButton,
95
+ {
96
+ size: "icon-xs",
97
+ "aria-label": dsFormat(t.composerRemoveFile, { name: a.name }),
98
+ onClick: () => onRemoveAttachment(a.id),
99
+ children: /* @__PURE__ */ jsx(XIcon, {})
100
+ }
101
+ ) : null
102
+ ]
103
+ },
104
+ a.id
105
+ );
106
+ }) }) : null,
107
+ /* @__PURE__ */ jsxs(InputGroup, { className: cn(dragging && "border-primary ring-(length:--ds-ring-width) ring-(--ds-ring-color)"), children: [
108
+ recording ? /* @__PURE__ */ jsxs("div", { className: "flex min-h-(--ds-control-h-md) w-full items-center gap-3 px-3 text-sm", "data-slot": "chat-composer-voice", children: [
109
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "size-2 shrink-0 animate-ds-ring-inner rounded-full bg-danger motion-reduce:animate-none" }),
110
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t.voiceRecording }),
111
+ /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: clock(voice?.seconds ?? 0) })
112
+ ] }) : /* @__PURE__ */ jsx(
113
+ InputGroupTextarea,
114
+ {
115
+ rows: 1,
116
+ value: text,
117
+ disabled,
118
+ maxLength,
119
+ placeholder: placeholder ?? t.composerPlaceholder,
120
+ "aria-label": placeholder ?? t.composerPlaceholder,
121
+ className: "max-h-40 min-h-(--ds-control-h-md) [field-sizing:content]",
122
+ onChange: (e) => set(e.target.value),
123
+ onKeyDown: (e) => {
124
+ if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) {
125
+ e.preventDefault();
126
+ send();
127
+ }
128
+ }
129
+ }
130
+ ),
131
+ /* @__PURE__ */ jsx(InputGroupAddon, { align: "block-end", children: recording ? /* @__PURE__ */ jsxs(Fragment, { children: [
132
+ /* @__PURE__ */ jsx(InputGroupButton, { size: "icon-sm", "aria-label": t.voiceCancel, onClick: voice?.onCancel, children: /* @__PURE__ */ jsx(XIcon, {}) }),
133
+ /* @__PURE__ */ jsx(InputGroupButton, { size: "icon-sm", variant: "default", className: "ms-auto", "aria-label": t.voiceConfirm, onClick: voice?.onConfirm, children: /* @__PURE__ */ jsx(CheckIcon, {}) })
134
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
135
+ onAttach ? /* @__PURE__ */ jsx(InputGroupButton, { size: "icon-sm", "aria-label": t.composerAttach, disabled, onClick: onAttach, children: /* @__PURE__ */ jsx(PaperclipIcon, {}) }) : null,
136
+ voice ? /* @__PURE__ */ jsx(
137
+ InputGroupButton,
138
+ {
139
+ size: "icon-sm",
140
+ "aria-label": voice.state === "error" ? t.voiceRetry : t.composerVoice,
141
+ disabled: disabled || voice.state === "transcribing",
142
+ onClick: voice.onStart,
143
+ children: voice.state === "transcribing" ? /* @__PURE__ */ jsx(Spinner, { "aria-hidden": true, role: "presentation" }) : /* @__PURE__ */ jsx(MicIcon, {})
144
+ }
145
+ ) : null,
146
+ maxLength !== void 0 && nearLimit ? /* @__PURE__ */ jsx(
147
+ "span",
148
+ {
149
+ className: cn("ms-auto text-xs tabular-nums", text.length >= maxLength ? "text-danger" : "text-muted-foreground"),
150
+ children: dsFormat(t.composerCounter, { count: text.length, max: maxLength })
151
+ }
152
+ ) : null,
153
+ streaming ? /* @__PURE__ */ jsx(
154
+ InputGroupButton,
155
+ {
156
+ size: "icon-sm",
157
+ variant: "default",
158
+ className: nearLimit ? void 0 : "ms-auto",
159
+ "aria-label": t.composerStop,
160
+ onClick: onStop,
161
+ children: /* @__PURE__ */ jsx(SquareIcon, {})
162
+ }
163
+ ) : /* @__PURE__ */ jsx(
164
+ InputGroupButton,
165
+ {
166
+ size: "icon-sm",
167
+ variant: "default",
168
+ className: nearLimit ? void 0 : "ms-auto",
169
+ "aria-label": t.composerSend,
170
+ disabled: !canSend,
171
+ onClick: send,
172
+ children: /* @__PURE__ */ jsx(ArrowUpIcon, {})
173
+ }
174
+ )
175
+ ] }) })
176
+ ] }),
177
+ dragging ? /* @__PURE__ */ jsx(
178
+ "div",
179
+ {
180
+ "aria-hidden": true,
181
+ className: "pointer-events-none absolute inset-0 flex items-center justify-center rounded-control bg-background/80 text-sm font-(--ds-medium-weight)",
182
+ children: t.composerDrop
183
+ }
184
+ ) : null,
185
+ /* @__PURE__ */ jsx("p", { role: "status", "aria-live": "polite", className: cn(status ? "mt-1 text-xs text-muted-foreground" : "sr-only"), children: status })
186
+ ]
187
+ }
188
+ );
189
+ }
190
+ export {
191
+ ChatComposer
192
+ };
@@ -2,6 +2,39 @@ import * as React from 'react';
2
2
  import { Radio } from '@base-ui/react/radio';
3
3
  import { RadioGroup } from '@base-ui/react/radio-group';
4
4
 
5
+ /**
6
+ * @group forms
7
+ * @summary Teselas seleccionables con icono y texto para elegir UNA opción de un grupo corto y visual (tipo de cuenta, plan, modo).
8
+ * @see radio-group — muchas opciones o texto largo, en formato de lista
9
+ * @see select — elegir de una lista larga sin ocupar espacio
10
+ * @see toggle-group — cambiar una vista o filtro de la pantalla, no un dato del formulario
11
+ * @example Tipo de cuenta
12
+ * <ChoiceCardGroup defaultValue="company" aria-label="Tipo de cuenta">
13
+ * <ChoiceCard value="company">
14
+ * <ChoiceCardMedia>
15
+ * <BuildingIcon />
16
+ * </ChoiceCardMedia>
17
+ * <ChoiceCardTitle>Empresa</ChoiceCardTitle>
18
+ * </ChoiceCard>
19
+ * <ChoiceCard value="user">
20
+ * <ChoiceCardMedia>
21
+ * <UserIcon />
22
+ * </ChoiceCardMedia>
23
+ * <ChoiceCardTitle>Particular</ChoiceCardTitle>
24
+ * </ChoiceCard>
25
+ * </ChoiceCardGroup>
26
+ * @example Con descripción e indicador
27
+ * <ChoiceCardGroup defaultValue="pro" aria-label="Plan">
28
+ * <ChoiceCard value="pro">
29
+ * <ChoiceCardContent>
30
+ * <ChoiceCardTitle>Pro</ChoiceCardTitle>
31
+ * <ChoiceCardDescription>Hasta 20 usuarios</ChoiceCardDescription>
32
+ * </ChoiceCardContent>
33
+ * <ChoiceCardIndicator />
34
+ * </ChoiceCard>
35
+ * </ChoiceCardGroup>
36
+ */
37
+
5
38
  declare function ChoiceCardGroup({ className, ...props }: RadioGroup.Props): React.JSX.Element;
6
39
  declare function ChoiceCard({ className, orientation, ...props }: Radio.Root.Props & {
7
40
  orientation?: "horizontal" | "vertical";
@@ -1,5 +1,20 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group content
5
+ * @summary Bloque de código de varias líneas con cabecera (fichero o lenguaje), botón de copiar y números de línea opcionales; Code para código dentro de una frase.
6
+ * @see copy-button — copiar un valor corto (clave, enlace) sin mostrar un bloque
7
+ * @see markdown — pintar texto Markdown que ya trae sus bloques de código
8
+ * @see kbd — teclas o atajos de teclado, no código
9
+ * @example Con fichero y números de línea
10
+ * <CodeBlock code={source} language="tsx" title="button.tsx" showLineNumbers />
11
+ * @example Código en línea
12
+ * <p>Ejecuta <Code>pnpm install</Code> antes de empezar.</p>
13
+ * @example HTML ya resaltado (Shiki, de confianza)
14
+ * <CodeBlock code={source} html={highlightedHtml} language="ts" />
15
+ * @note `html` se inserta tal cual: solo HTML de tu propio resaltador (Shiki en el build o en el servidor), nunca texto del usuario o de una API sin sanear. `code` lleva siempre el texto plano: es lo que se copia.
16
+ */
17
+
3
18
  declare function CodeBlock({ code, html, language, title, showLineNumbers, copyable, className, ...props }: Omit<React.ComponentProps<"div">, "title"> & {
4
19
  code: string;
5
20
  html?: string;
@@ -1,6 +1,54 @@
1
1
  import * as React from 'react';
2
2
  import { Combobox as Combobox$1 } from '@base-ui/react';
3
3
 
4
+ /**
5
+ * @group forms
6
+ * @summary Campo con búsqueda para elegir uno o varios valores de una lista conocida (país, responsable, etiquetas); filtra mientras se escribe.
7
+ * @see select — lista corta (menos de ~10) sin necesidad de buscar
8
+ * @see search-box — buscar en datos de la app con sugerencias del servidor y navegar al resultado
9
+ * @see native-select — el selector del sistema, sin estilo de tema
10
+ * @example Uno de una lista
11
+ * <Combobox items={PAISES}>
12
+ * <ComboboxInput placeholder="Elige un país" showClear />
13
+ * <ComboboxContent>
14
+ * <ComboboxEmpty>No hay ningún país con ese nombre.</ComboboxEmpty>
15
+ * <ComboboxList>
16
+ * {(item) => (
17
+ * <ComboboxItem key={item} value={item}>
18
+ * {item}
19
+ * </ComboboxItem>
20
+ * )}
21
+ * </ComboboxList>
22
+ * </ComboboxContent>
23
+ * </Combobox>
24
+ * @example Varios con chips
25
+ * <Combobox multiple items={ETIQUETAS} defaultValue={["Urgente"]}>
26
+ * <ComboboxChips ref={anchor}>
27
+ * <ComboboxValue>
28
+ * {(values) => (
29
+ * <>
30
+ * {values.map((v) => (
31
+ * <ComboboxChip key={v}>{v}</ComboboxChip>
32
+ * ))}
33
+ * <ComboboxChipsInput placeholder="Añade etiquetas" />
34
+ * </>
35
+ * )}
36
+ * </ComboboxValue>
37
+ * </ComboboxChips>
38
+ * <ComboboxContent anchor={anchor}>
39
+ * <ComboboxList>
40
+ * {(item) => (
41
+ * <ComboboxItem key={item} value={item}>
42
+ * {item}
43
+ * </ComboboxItem>
44
+ * )}
45
+ * </ComboboxList>
46
+ * </ComboboxContent>
47
+ * </Combobox>
48
+ * @note Pasa la lista en `items` del Combobox y pinta cada opción con la función hija de ComboboxList; con chips, ancla la lista con `useComboboxAnchor()`.
49
+ * @note Pon siempre ComboboxEmpty con un texto de la app para cuando el filtro no encuentra nada.
50
+ */
51
+
4
52
  declare const Combobox: typeof Combobox$1.Root;
5
53
  declare function ComboboxValue({ ...props }: Combobox$1.Value.Props): React.JSX.Element;
6
54
  declare function ComboboxTrigger({ className, children, ...props }: Combobox$1.Trigger.Props): React.JSX.Element;
@@ -1,5 +1,23 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group navigation
5
+ * @summary Paleta de comandos ⌘K lista para usar (diálogo, atajo, filtro, vacío y textos): la app solo pasa los grupos de elementos. Una por app, en la raíz.
6
+ * @see command — piezas sueltas para una lista filtrable dentro de una página o un popover
7
+ * @see search-box — campo que filtra una lista de la propia vista
8
+ * @example Preset go (navegar)
9
+ * <CommandPalette
10
+ * groups={[{ heading: "Ir a", items: [{ id: "home", label: "Inicio", icon: <HomeIcon />, onSelect: () => navigate("/") }] }]}
11
+ * />
12
+ * @example Preset search contra el servidor
13
+ * <CommandPalette preset="search" groups={results} query={query} onQueryChange={setQuery} loading={isFetching} />
14
+ * @example Abrirla desde un botón de la cabecera
15
+ * <Button size="icon" variant="ghost" aria-label={t("search")} onClick={() => setOpen(true)}>
16
+ * <SearchIcon />
17
+ * </Button>
18
+ * <CommandPalette open={open} onOpenChange={setOpen} groups={groups} />
19
+ */
20
+
3
21
  type CommandPalettePreset = "go" | "actions" | "search";
4
22
  type CommandPaletteItem = {
5
23
  id: string;
@@ -3,6 +3,40 @@ import { Command as Command$1 } from 'cmdk';
3
3
  import { Dialog } from './dialog.js';
4
4
  import '@base-ui/react/dialog';
5
5
 
6
+ /**
7
+ * @group navigation
8
+ * @summary Piezas de una lista filtrable con teclado (campo, grupos, elementos, atajos) para montar una búsqueda en línea o en un popover. La paleta ⌘K ya hecha es CommandPalette.
9
+ * @see command-palette — paleta ⌘K completa (diálogo, atajo y textos) sin montar piezas
10
+ * @see combobox — elegir el valor de un campo de formulario en una lista filtrable
11
+ * @see dropdown-menu — menú corto de acciones sin campo de búsqueda
12
+ * @example Lista filtrable en línea
13
+ * <Command>
14
+ * <CommandInput placeholder={t("searchCommand")} />
15
+ * <CommandList>
16
+ * <CommandEmpty>Sin resultados.</CommandEmpty>
17
+ * <CommandGroup heading="Ajustes">
18
+ * <CommandItem onSelect={openProfile}>
19
+ * <UserIcon />
20
+ * Perfil
21
+ * <CommandShortcut>⌘P</CommandShortcut>
22
+ * </CommandItem>
23
+ * </CommandGroup>
24
+ * </CommandList>
25
+ * </Command>
26
+ * @example En un diálogo montado a mano
27
+ * <CommandDialog open={open} onOpenChange={setOpen}>
28
+ * <Command>
29
+ * <CommandInput placeholder={t("search")} />
30
+ * <CommandList>
31
+ * <CommandEmpty>Sin resultados.</CommandEmpty>
32
+ * <CommandItem onSelect={openReports}>Informes</CommandItem>
33
+ * </CommandList>
34
+ * </Command>
35
+ * </CommandDialog>
36
+ * @note Command no trae textos propios: el placeholder de CommandInput y el contenido de CommandEmpty los pone la app con su i18n.
37
+ * @note Para la paleta global ⌘K usa CommandPalette; CommandDialog solo si necesitas montar el contenido a mano.
38
+ */
39
+
6
40
  declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): React.JSX.Element;
7
41
  declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
8
42
  title?: string;
@@ -1,5 +1,35 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group overlays
5
+ * @summary Confirmación ya montada de una acción delicada (borrar, revocar, archivar) junto al botón que la lanza; el preset `typed` obliga a escribir el nombre si no se puede deshacer.
6
+ * @see confirm-dialog — la misma confirmación pedida desde un manejador (`await confirm(...)`), sin estado de apertura
7
+ * @see alert-dialog — diálogo de decisión con contenido propio que ConfirmAction no cubre
8
+ * @see toast — si la acción se puede deshacer, mejor confirmarla después con un toast con «Deshacer»
9
+ * @example Archivar (preset simple, tono neutro)
10
+ * <Button variant="outline" onClick={() => setOpen(true)}>Archivar</Button>
11
+ * <ConfirmAction
12
+ * open={open}
13
+ * onOpenChange={setOpen}
14
+ * tone="default"
15
+ * title="¿Archivar el proyecto?"
16
+ * description={t("projects.archiveHint")}
17
+ * confirmLabel="Archivar"
18
+ * onConfirm={archive}
19
+ * />
20
+ * @example Borrado irreversible (preset typed)
21
+ * <ConfirmAction
22
+ * open={open}
23
+ * onOpenChange={setOpen}
24
+ * preset="typed"
25
+ * expected={project.slug}
26
+ * title="¿Eliminar el proyecto?"
27
+ * description={t("projects.deleteHint")}
28
+ * confirmLabel="Eliminar proyecto"
29
+ * onConfirm={remove}
30
+ * />
31
+ */
32
+
3
33
  type ConfirmActionPreset = "simple" | "typed";
4
34
  declare function ConfirmAction({ open, onOpenChange, preset, tone, title, description, confirmLabel, cancelLabel, expected, onConfirm, }: {
5
35
  open?: boolean;
@@ -1,6 +1,29 @@
1
1
  import * as React from 'react';
2
2
  import { ConfirmActionPreset } from './confirm-action.js';
3
3
 
4
+ /**
5
+ * @group overlays
6
+ * @summary Confirmación imperativa: un provider en la raíz y `await confirm({...})` desde cualquier manejador, sin estado de apertura en cada pantalla; pinta un ConfirmAction.
7
+ * @see confirm-action — el diálogo vive junto a un botón concreto y controlas `open` tú
8
+ * @see alert-dialog — confirmación con contenido propio (icono, campos, varios botones)
9
+ * @example Provider en la raíz y confirmación desde un manejador
10
+ * <ConfirmDialogProvider>
11
+ * <App />
12
+ * </ConfirmDialogProvider>
13
+ *
14
+ * const confirm = useConfirm();
15
+ * const onDelete = async () => {
16
+ * if (await confirm({ title: "¿Eliminar el informe?", confirmLabel: "Eliminar" })) remove();
17
+ * };
18
+ * @example Borrado irreversible (preset typed)
19
+ * <ConfirmDialogProvider>
20
+ * <App />
21
+ * </ConfirmDialogProvider>
22
+ *
23
+ * const confirm = useConfirm();
24
+ * const ok = await confirm({ preset: "typed", expected: project.slug, title: "¿Eliminar el proyecto?", confirmLabel: "Eliminar" });
25
+ */
26
+
4
27
  interface ConfirmOptions {
5
28
  title: React.ReactNode;
6
29
  description?: React.ReactNode;
@@ -6,6 +6,20 @@ import './auth-backdrop.js';
6
6
  import 'class-variance-authority/types';
7
7
  import 'class-variance-authority';
8
8
 
9
+ /**
10
+ * @group content
11
+ * @summary Tarjeta lista por intención para rejillas (basic, feature, media, horizontal, metric, status, cover) sin montar piezas; con `href` u `onSelect` toda ella es pulsable.
12
+ * @see card — tarjeta con anatomía libre cuando ningún preset encaja
13
+ * @see item — fila de una lista de entidades (variant="card"), no una celda de rejilla
14
+ * @see media-card — tarjeta sencilla de vídeo, curso o producto con insignia y reproducir
15
+ * @example Capacidad que navega (preset feature)
16
+ * <ContentCard preset="feature" icon={<ZapIcon />} title="Automatizaciones" description="Reglas que actúan por ti" href="/automations" />
17
+ * @example Portada con acción en el pie
18
+ * <ContentCard preset="media" media={<img src="/curso.jpg" alt="" />} title="Curso de inicio" emphasis="outlined" footer={<Button size="sm">Empezar</Button>} />
19
+ * @example Un dato suelto (preset metric)
20
+ * <ContentCard preset="metric" title="Clientes activos" value="1.284" delta="+4,2 %" />
21
+ */
22
+
9
23
  type ContentCardPreset = "basic" | "feature" | "media" | "horizontal" | "metric" | "status" | "cover";
10
24
  type ContentCardEmphasis = "elevated" | "outlined" | "filled" | "ghost";
11
25
  declare function ContentCard({ preset, emphasis, tone, density, icon, media, value, delta, title, description, action, footer, href, onSelect, children, className, spotlight, glow, backdrop, backdropMedia, backdropGlass, animated, titleSize, plate, padding, }: {
@@ -1,6 +1,41 @@
1
1
  import * as React from 'react';
2
2
  import { ContextMenu as ContextMenu$1 } from '@base-ui/react/context-menu';
3
3
 
4
+ /**
5
+ * @group overlays
6
+ * @summary Menú de acciones que se abre con clic derecho (o pulsación larga) sobre un elemento; atajo para usuarios expertos, nunca el único camino a una acción.
7
+ * @see dropdown-menu — menú que se abre con un botón visible (⋯ de una fila, «Mi cuenta»)
8
+ * @see command-palette — buscar y lanzar acciones con el teclado (⌘K)
9
+ * @example Acciones de un elemento
10
+ * <ContextMenu>
11
+ * <ContextMenuTrigger>Informe trimestral Q3</ContextMenuTrigger>
12
+ * <ContextMenuContent>
13
+ * <ContextMenuItem onClick={rename}>
14
+ * <PencilIcon />
15
+ * Renombrar
16
+ * <ContextMenuShortcut>F2</ContextMenuShortcut>
17
+ * </ContextMenuItem>
18
+ * <ContextMenuItem onClick={duplicate}>Duplicar</ContextMenuItem>
19
+ * <ContextMenuSeparator />
20
+ * <ContextMenuItem variant="destructive" onClick={askDelete}>Eliminar</ContextMenuItem>
21
+ * </ContextMenuContent>
22
+ * </ContextMenu>
23
+ * @example Submenú y opción que se marca
24
+ * <ContextMenuContent>
25
+ * <ContextMenuSub>
26
+ * <ContextMenuSubTrigger>Compartir</ContextMenuSubTrigger>
27
+ * <ContextMenuSubContent>
28
+ * <ContextMenuItem>Copiar enlace</ContextMenuItem>
29
+ * </ContextMenuSubContent>
30
+ * </ContextMenuSub>
31
+ * <ContextMenuCheckboxItem checked={pinned} onCheckedChange={setPinned}>
32
+ * Fijar en el inicio
33
+ * </ContextMenuCheckboxItem>
34
+ * </ContextMenuContent>
35
+ * @note Toda acción del menú contextual existe también en un sitio visible (botón o DropdownMenu): el clic derecho no se descubre y en táctil apenas existe.
36
+ * @note Las destructivas van al final, tras ContextMenuSeparator, con `variant="destructive"`; ContextMenuLabel va dentro de un ContextMenuGroup.
37
+ */
38
+
4
39
  declare function ContextMenu({ ...props }: ContextMenu$1.Root.Props): React.JSX.Element;
5
40
  declare function ContextMenuPortal({ ...props }: ContextMenu$1.Portal.Props): React.JSX.Element;
6
41
  declare function ContextMenuTrigger({ className, ...props }: ContextMenu$1.Trigger.Props): React.JSX.Element;
@@ -111,7 +111,7 @@ function ContextMenuSubTrigger({
111
111
  ...props,
112
112
  children: [
113
113
  children,
114
- /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto" })
114
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto rtl:rotate-180" })
115
115
  ]
116
116
  }
117
117
  );
@@ -0,0 +1,44 @@
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * @group chat
5
+ * @summary Historial de conversaciones de un asistente: buscar, agrupar por fecha, fijar, renombrar y borrar; va en el lateral del chat.
6
+ * @see sidebar — navegación general de la app
7
+ * @see entity-list — lista de otras entidades (no conversaciones)
8
+ * @example En el lateral del chat
9
+ * <ConversationList
10
+ * items={[
11
+ * { id: "1", title: "Tarifas 2026", updatedAt: "2026-11-20", pinned: true },
12
+ * { id: "2", title: "Resumen de incidencias", updatedAt: "2026-11-21", busy: true },
13
+ * ]}
14
+ * activeId={chatId}
15
+ * onSelect={openChat}
16
+ * onNew={newChat}
17
+ * onPin={pin}
18
+ * onRename={rename}
19
+ * onDelete={removeChat}
20
+ * />
21
+ */
22
+
23
+ interface Conversation {
24
+ id: string;
25
+ title: string;
26
+ /** Última actividad; agrupa la lista (hoy, ayer, 7 días, anteriores). */
27
+ updatedAt: Date | string | number;
28
+ pinned?: boolean;
29
+ /** Tarea en curso (el agente está respondiendo): se marca con un punto que late. */
30
+ busy?: boolean;
31
+ }
32
+ declare function ConversationList({ items, activeId, onSelect, onNew, onRename, onDelete, onPin, now, searchable, className, ...props }: Omit<React.ComponentProps<"div">, "children" | "onSelect"> & {
33
+ items: Conversation[];
34
+ activeId?: string;
35
+ onSelect?: (id: string) => void;
36
+ onNew?: () => void;
37
+ onRename?: (id: string) => void;
38
+ onDelete?: (id: string) => void;
39
+ onPin?: (id: string, pinned: boolean) => void;
40
+ now?: Date;
41
+ searchable?: boolean;
42
+ }): React.JSX.Element;
43
+
44
+ export { type Conversation, ConversationList };