orbital-ds 0.41.0 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/AGENTS.md +54 -12
  2. package/CHANGELOG.md +458 -0
  3. package/README.md +2 -2
  4. package/components.manifest.json +6630 -3569
  5. package/dist/hooks/use-esc-close-stack.js +38 -0
  6. package/dist/hooks/use-simulated-progress.js +30 -0
  7. package/dist/lib/brand-allowlist.js +703 -0
  8. package/dist/lib/brand-runtime.js +85 -0
  9. package/dist/lib/echarts-presets.js +152 -1
  10. package/dist/lib/echarts-setup.js +2 -0
  11. package/dist/lib/format.js +177 -0
  12. package/dist/lib/i18n.js +35 -2
  13. package/dist/lib/locales/de.js +536 -0
  14. package/dist/lib/locales/fr.js +536 -0
  15. package/dist/lib/locales/he.js +536 -0
  16. package/dist/lib/locales/it.js +536 -0
  17. package/dist/ui/auth-form.js +13 -6
  18. package/dist/ui/ayuda.js +4 -1
  19. package/dist/ui/breadcrumb.js +1 -1
  20. package/dist/ui/calendar.js +3 -0
  21. package/dist/ui/carousel.js +10 -5
  22. package/dist/ui/context-menu.js +3 -3
  23. package/dist/ui/cta-banner.js +63 -0
  24. package/dist/ui/date-time.js +55 -0
  25. package/dist/ui/description-list.js +86 -0
  26. package/dist/ui/detail-panel.js +2 -2
  27. package/dist/ui/dropdown-menu.js +1 -1
  28. package/dist/ui/faq.js +25 -0
  29. package/dist/ui/feature-grid.js +40 -0
  30. package/dist/ui/hero.js +145 -0
  31. package/dist/ui/landing-section.js +59 -0
  32. package/dist/ui/mfa-challenge.js +1 -1
  33. package/dist/ui/next-step-card.js +92 -0
  34. package/dist/ui/page-header.js +20 -11
  35. package/dist/ui/pagination.js +2 -2
  36. package/dist/ui/pricing-table.js +86 -0
  37. package/dist/ui/quantity.js +27 -0
  38. package/dist/ui/sheet.js +6 -2
  39. package/dist/ui/sidebar.js +7 -3
  40. package/dist/ui/tag-input.js +169 -0
  41. package/dist/ui/testimonial.js +61 -0
  42. package/dist/ui/textarea.js +7 -1
  43. package/dist/ui/usage-meter.js +116 -0
  44. package/dist/ui/week-strip.js +2 -2
  45. package/docs/adr/0001-rtl-clases-logicas.md +14 -1
  46. package/docs/designer/flujo.md +1 -1
  47. package/docs/designer/patrones.md +45 -1
  48. package/manifest/actions.json +364 -0
  49. package/manifest/agents.json +399 -0
  50. package/manifest/ai.json +128 -0
  51. package/manifest/auth.json +1547 -0
  52. package/manifest/chat.json +612 -0
  53. package/manifest/content.json +2793 -0
  54. package/manifest/data.json +2802 -0
  55. package/manifest/feedback.json +1005 -0
  56. package/manifest/forms.json +1954 -0
  57. package/manifest/motion.json +196 -0
  58. package/manifest/navigation.json +1792 -0
  59. package/manifest/overlays.json +934 -0
  60. package/package.json +240 -238
  61. package/scripts/cli.mjs +124 -8
  62. package/scripts/doctor.mjs +153 -2
  63. package/scripts/eslint-plugin.mjs +125 -0
  64. package/scripts/i18n.mjs +1 -1
  65. package/scripts/manifest.mjs +179 -7
  66. package/scripts/upgrade.mjs +126 -0
  67. package/skill/SKILL.md +8 -3
  68. package/dist/hooks/use-ds-messages.d.ts +0 -537
  69. package/dist/hooks/use-ds-motion.d.ts +0 -17
  70. package/dist/hooks/use-in-view.d.ts +0 -9
  71. package/dist/hooks/use-mobile.d.ts +0 -3
  72. package/dist/lib/a2ui-catalog.d.ts +0 -42
  73. package/dist/lib/a2ui.d.ts +0 -289
  74. package/dist/lib/ai-events.d.ts +0 -15
  75. package/dist/lib/auth-better-auth.d.ts +0 -29
  76. package/dist/lib/auth-flow.d.ts +0 -85
  77. package/dist/lib/auth-providers.d.ts +0 -194
  78. package/dist/lib/auth.d.ts +0 -68
  79. package/dist/lib/echarts-presets.d.ts +0 -227
  80. package/dist/lib/echarts-server.d.ts +0 -15
  81. package/dist/lib/echarts-setup.d.ts +0 -8
  82. package/dist/lib/echarts-theme.d.ts +0 -36
  83. package/dist/lib/header-control.d.ts +0 -4
  84. package/dist/lib/i18n.d.ts +0 -545
  85. package/dist/lib/image-upload.d.ts +0 -41
  86. package/dist/lib/motion.d.ts +0 -74
  87. package/dist/lib/presets.d.ts +0 -8
  88. package/dist/lib/template-syntax.d.ts +0 -22
  89. package/dist/lib/utils.d.ts +0 -5
  90. package/dist/motion.css +0 -146
  91. package/dist/styles.css +0 -1737
  92. package/dist/themes/chocolate.css +0 -259
  93. package/dist/themes/chocolate.fonts.css +0 -2
  94. package/dist/themes/chocolate.guide.md +0 -30
  95. package/dist/themes/chocolate.meta.json +0 -61
  96. package/dist/themes/chocolate.scoped.css +0 -259
  97. package/dist/themes/chocolate.tokens.json +0 -49
  98. package/dist/themes/fractalia.css +0 -556
  99. package/dist/themes/fractalia.fonts.css +0 -3
  100. package/dist/themes/fractalia.guide.md +0 -86
  101. package/dist/themes/fractalia.meta.json +0 -112
  102. package/dist/themes/fractalia.scoped.css +0 -556
  103. package/dist/themes/fractalia.tokens.json +0 -39
  104. package/dist/themes/friendly.css +0 -375
  105. package/dist/themes/friendly.fonts.css +0 -2
  106. package/dist/themes/friendly.guide.md +0 -38
  107. package/dist/themes/friendly.meta.json +0 -82
  108. package/dist/themes/friendly.scoped.css +0 -375
  109. package/dist/themes/friendly.tokens.json +0 -45
  110. package/dist/themes/lagoon.css +0 -362
  111. package/dist/themes/lagoon.fonts.css +0 -2
  112. package/dist/themes/lagoon.guide.md +0 -47
  113. package/dist/themes/lagoon.meta.json +0 -85
  114. package/dist/themes/lagoon.scoped.css +0 -362
  115. package/dist/themes/lagoon.tokens.json +0 -49
  116. package/dist/themes/liquid.css +0 -510
  117. package/dist/themes/liquid.fonts.css +0 -7
  118. package/dist/themes/liquid.guide.md +0 -82
  119. package/dist/themes/liquid.meta.json +0 -134
  120. package/dist/themes/liquid.scoped.css +0 -510
  121. package/dist/themes/liquid.tokens.json +0 -47
  122. package/dist/themes/matcha.css +0 -259
  123. package/dist/themes/matcha.fonts.css +0 -2
  124. package/dist/themes/matcha.guide.md +0 -30
  125. package/dist/themes/matcha.meta.json +0 -61
  126. package/dist/themes/matcha.scoped.css +0 -259
  127. package/dist/themes/matcha.tokens.json +0 -49
  128. package/dist/themes/qratia.css +0 -264
  129. package/dist/themes/qratia.fonts.css +0 -2
  130. package/dist/themes/qratia.guide.md +0 -34
  131. package/dist/themes/qratia.meta.json +0 -49
  132. package/dist/themes/qratia.scoped.css +0 -264
  133. package/dist/themes/qratia.tokens.json +0 -49
  134. package/dist/themes/stone.css +0 -263
  135. package/dist/themes/stone.fonts.css +0 -2
  136. package/dist/themes/stone.guide.md +0 -30
  137. package/dist/themes/stone.meta.json +0 -47
  138. package/dist/themes/stone.scoped.css +0 -263
  139. package/dist/themes/stone.tokens.json +0 -49
  140. package/dist/themes/tactile.css +0 -596
  141. package/dist/themes/tactile.fonts.css +0 -3
  142. package/dist/themes/tactile.guide.md +0 -82
  143. package/dist/themes/tactile.meta.json +0 -182
  144. package/dist/themes/tactile.scoped.css +0 -596
  145. package/dist/themes/tactile.tokens.json +0 -42
  146. package/dist/themes/twitter.css +0 -364
  147. package/dist/themes/twitter.fonts.css +0 -6
  148. package/dist/themes/twitter.guide.md +0 -35
  149. package/dist/themes/twitter.meta.json +0 -90
  150. package/dist/themes/twitter.scoped.css +0 -364
  151. package/dist/themes/twitter.tokens.json +0 -45
  152. package/dist/themes/y2k.css +0 -259
  153. package/dist/themes/y2k.fonts.css +0 -2
  154. package/dist/themes/y2k.guide.md +0 -30
  155. package/dist/themes/y2k.meta.json +0 -59
  156. package/dist/themes/y2k.scoped.css +0 -259
  157. package/dist/themes/y2k.tokens.json +0 -49
  158. package/dist/themes/zyro.css +0 -442
  159. package/dist/themes/zyro.fonts.css +0 -2
  160. package/dist/themes/zyro.guide.md +0 -33
  161. package/dist/themes/zyro.meta.json +0 -74
  162. package/dist/themes/zyro.scoped.css +0 -442
  163. package/dist/themes/zyro.tokens.json +0 -46
  164. package/dist/ui/a2ui-renderer.d.ts +0 -33
  165. package/dist/ui/accordion.d.ts +0 -9
  166. package/dist/ui/agent-events.d.ts +0 -32
  167. package/dist/ui/ai-tag.d.ts +0 -8
  168. package/dist/ui/alert-dialog.d.ts +0 -23
  169. package/dist/ui/alert.d.ts +0 -13
  170. package/dist/ui/animated-number.d.ts +0 -9
  171. package/dist/ui/app-bar.d.ts +0 -10
  172. package/dist/ui/aspect-ratio.d.ts +0 -7
  173. package/dist/ui/attachment.d.ts +0 -26
  174. package/dist/ui/auth-backdrop.d.ts +0 -20
  175. package/dist/ui/auth-form.d.ts +0 -113
  176. package/dist/ui/auth-layout.d.ts +0 -72
  177. package/dist/ui/auth-parts.d.ts +0 -43
  178. package/dist/ui/auth-status.d.ts +0 -23
  179. package/dist/ui/avatar.d.ts +0 -16
  180. package/dist/ui/ayuda.d.ts +0 -22
  181. package/dist/ui/badge.d.ts +0 -15
  182. package/dist/ui/banner.d.ts +0 -14
  183. package/dist/ui/bottom-nav.d.ts +0 -15
  184. package/dist/ui/breadcrumb.d.ts +0 -12
  185. package/dist/ui/bubble.d.ts +0 -19
  186. package/dist/ui/button-group.d.ts +0 -15
  187. package/dist/ui/button.d.ts +0 -14
  188. package/dist/ui/calendar.d.ts +0 -15
  189. package/dist/ui/card-stack.d.ts +0 -9
  190. package/dist/ui/card.d.ts +0 -28
  191. package/dist/ui/carousel.d.ts +0 -33
  192. package/dist/ui/chain-of-thought.d.ts +0 -19
  193. package/dist/ui/chart-card.d.ts +0 -28
  194. package/dist/ui/chart.d.ts +0 -46
  195. package/dist/ui/chart.js +0 -254
  196. package/dist/ui/chat-composer.d.ts +0 -39
  197. package/dist/ui/checkbox.d.ts +0 -6
  198. package/dist/ui/choice-card.d.ts +0 -16
  199. package/dist/ui/code-block.d.ts +0 -14
  200. package/dist/ui/collapsible.d.ts +0 -8
  201. package/dist/ui/combobox.d.ts +0 -26
  202. package/dist/ui/command-palette.d.ts +0 -36
  203. package/dist/ui/command.d.ts +0 -22
  204. package/dist/ui/confirm-action.d.ts +0 -18
  205. package/dist/ui/confirm-dialog.d.ts +0 -21
  206. package/dist/ui/connected-accounts.d.ts +0 -25
  207. package/dist/ui/content-card.d.ts +0 -52
  208. package/dist/ui/context-menu.d.ts +0 -31
  209. package/dist/ui/conversation-list.d.ts +0 -24
  210. package/dist/ui/copy-button.d.ts +0 -14
  211. package/dist/ui/data-table.d.ts +0 -198
  212. package/dist/ui/date-picker.d.ts +0 -65
  213. package/dist/ui/detail-panel.d.ts +0 -16
  214. package/dist/ui/dialog.d.ts +0 -19
  215. package/dist/ui/direction.d.ts +0 -1
  216. package/dist/ui/dock.d.ts +0 -13
  217. package/dist/ui/drawer.d.ts +0 -18
  218. package/dist/ui/dropdown-menu.d.ts +0 -31
  219. package/dist/ui/dropzone.d.ts +0 -44
  220. package/dist/ui/echart.d.ts +0 -31
  221. package/dist/ui/empty-state.d.ts +0 -26
  222. package/dist/ui/empty.d.ts +0 -15
  223. package/dist/ui/entity-list.d.ts +0 -25
  224. package/dist/ui/error-page.d.ts +0 -28
  225. package/dist/ui/error-state.d.ts +0 -16
  226. package/dist/ui/eyebrow.d.ts +0 -7
  227. package/dist/ui/field.d.ts +0 -28
  228. package/dist/ui/file-upload.d.ts +0 -42
  229. package/dist/ui/filter-bar.d.ts +0 -38
  230. package/dist/ui/form-layout.d.ts +0 -19
  231. package/dist/ui/gauge.d.ts +0 -40
  232. package/dist/ui/generated-image.d.ts +0 -14
  233. package/dist/ui/generated-table.d.ts +0 -11
  234. package/dist/ui/heatmap-grid.d.ts +0 -39
  235. package/dist/ui/hover-card.d.ts +0 -8
  236. package/dist/ui/i18n-provider.d.ts +0 -11
  237. package/dist/ui/icon-tile.d.ts +0 -11
  238. package/dist/ui/input-group.d.ts +0 -22
  239. package/dist/ui/input-otp.d.ts +0 -13
  240. package/dist/ui/input.d.ts +0 -5
  241. package/dist/ui/instruction-editor.d.ts +0 -64
  242. package/dist/ui/item.d.ts +0 -26
  243. package/dist/ui/kbd.d.ts +0 -6
  244. package/dist/ui/label.d.ts +0 -5
  245. package/dist/ui/legend.d.ts +0 -32
  246. package/dist/ui/level-meter.d.ts +0 -16
  247. package/dist/ui/load-more.d.ts +0 -19
  248. package/dist/ui/loading-state.d.ts +0 -14
  249. package/dist/ui/locale-switcher.d.ts +0 -19
  250. package/dist/ui/markdown.d.ts +0 -14
  251. package/dist/ui/marker.d.ts +0 -13
  252. package/dist/ui/media-card.d.ts +0 -13
  253. package/dist/ui/menubar.d.ts +0 -31
  254. package/dist/ui/message-actions.d.ts +0 -12
  255. package/dist/ui/message-scroller.d.ts +0 -16
  256. package/dist/ui/message.d.ts +0 -12
  257. package/dist/ui/mfa-challenge.d.ts +0 -33
  258. package/dist/ui/mfa-setup.d.ts +0 -29
  259. package/dist/ui/mosaic.d.ts +0 -15
  260. package/dist/ui/motion-provider.d.ts +0 -11
  261. package/dist/ui/native-select.d.ts +0 -10
  262. package/dist/ui/navigation-menu.d.ts +0 -15
  263. package/dist/ui/notice-review.d.ts +0 -32
  264. package/dist/ui/notifications.d.ts +0 -81
  265. package/dist/ui/oauth-consent.d.ts +0 -54
  266. package/dist/ui/page-header.d.ts +0 -22
  267. package/dist/ui/page-loader.d.ts +0 -23
  268. package/dist/ui/page-shell.d.ts +0 -8
  269. package/dist/ui/pagination.d.ts +0 -22
  270. package/dist/ui/panel.d.ts +0 -12
  271. package/dist/ui/passkey-list.d.ts +0 -17
  272. package/dist/ui/password-input.d.ts +0 -5
  273. package/dist/ui/password-strength.d.ts +0 -14
  274. package/dist/ui/popover.d.ts +0 -12
  275. package/dist/ui/progress.d.ts +0 -9
  276. package/dist/ui/proportion-bar.d.ts +0 -27
  277. package/dist/ui/questionnaire.d.ts +0 -24
  278. package/dist/ui/radio-group.d.ts +0 -8
  279. package/dist/ui/reasoning.d.ts +0 -10
  280. package/dist/ui/resizable.d.ts +0 -10
  281. package/dist/ui/reveal.d.ts +0 -11
  282. package/dist/ui/scroll-area.d.ts +0 -7
  283. package/dist/ui/search-box.d.ts +0 -32
  284. package/dist/ui/select.d.ts +0 -19
  285. package/dist/ui/separator.d.ts +0 -6
  286. package/dist/ui/session-list.d.ts +0 -19
  287. package/dist/ui/session-timeout.d.ts +0 -13
  288. package/dist/ui/sheet.d.ts +0 -16
  289. package/dist/ui/shield.d.ts +0 -21
  290. package/dist/ui/show-more.d.ts +0 -12
  291. package/dist/ui/sidebar.d.ts +0 -90
  292. package/dist/ui/sign-out-dialog.d.ts +0 -17
  293. package/dist/ui/skeleton.d.ts +0 -10
  294. package/dist/ui/slider.d.ts +0 -23
  295. package/dist/ui/sonner.d.ts +0 -6
  296. package/dist/ui/sparkline.d.ts +0 -26
  297. package/dist/ui/spinner.d.ts +0 -5
  298. package/dist/ui/stat-group.d.ts +0 -8
  299. package/dist/ui/stat.d.ts +0 -90
  300. package/dist/ui/status-badge.d.ts +0 -39
  301. package/dist/ui/status-hero.d.ts +0 -12
  302. package/dist/ui/step-dots.d.ts +0 -10
  303. package/dist/ui/step-flow.d.ts +0 -48
  304. package/dist/ui/step-ring.d.ts +0 -12
  305. package/dist/ui/stepper.d.ts +0 -20
  306. package/dist/ui/suggestions.d.ts +0 -8
  307. package/dist/ui/switch.d.ts +0 -8
  308. package/dist/ui/table.d.ts +0 -12
  309. package/dist/ui/tabs.d.ts +0 -14
  310. package/dist/ui/task-loader.d.ts +0 -14
  311. package/dist/ui/task-progress.d.ts +0 -18
  312. package/dist/ui/textarea.d.ts +0 -11
  313. package/dist/ui/theme-toggle.d.ts +0 -14
  314. package/dist/ui/timeline.d.ts +0 -29
  315. package/dist/ui/toast.d.ts +0 -19
  316. package/dist/ui/toggle-group.d.ts +0 -14
  317. package/dist/ui/toggle.d.ts +0 -12
  318. package/dist/ui/tool-call.d.ts +0 -15
  319. package/dist/ui/tooltip.d.ts +0 -9
  320. package/dist/ui/week-strip.d.ts +0 -12
  321. package/dist/ui/workflow-run.d.ts +0 -23
@@ -1,289 +0,0 @@
1
- declare const A2UI_VERSION: "1.0";
2
- /** Identificador del catálogo de Orbital (el básico de A2UI + piezas del sistema de diseño). No es una URL que resolver. */
3
- declare const ORBITAL_CATALOG_ID = "https://orbital-ds.dev/a2ui/catalogs/orbital/v1";
4
- interface PathBinding {
5
- "@path": string;
6
- }
7
- interface FunctionCall {
8
- "@call": string;
9
- args?: Record<string, unknown>;
10
- }
11
- type DynamicString = string | PathBinding | FunctionCall;
12
- type DynamicNumber = number | PathBinding | FunctionCall;
13
- type DynamicBoolean = boolean | PathBinding | FunctionCall;
14
- type DynamicStringList = string[] | PathBinding | FunctionCall;
15
- type ComponentId = string;
16
- /** Hijos repetidos por cada elemento de una lista del modelo de datos: `componentId` se pinta con ámbito `path/i`. */
17
- interface TemplateChildren {
18
- componentId: ComponentId;
19
- path: string;
20
- }
21
- type ChildList = ComponentId[] | TemplateChildren;
22
- /** Comprobación de un campo o botón: si `condition` da falso, se muestra `message` y el botón se desactiva. */
23
- interface Check {
24
- condition: DynamicBoolean;
25
- message: string;
26
- }
27
- type A2UIAction = {
28
- event: {
29
- name: string;
30
- userMessage?: string;
31
- context?: Record<string, unknown>;
32
- };
33
- } | {
34
- functionCall: FunctionCall;
35
- };
36
- /** Lo que recibe la app cuando una persona acciona algo. `context` ya viene con los enlaces resueltos. */
37
- type A2UIActionEvent = {
38
- type: "event";
39
- surfaceId: string;
40
- componentId: ComponentId;
41
- name: string;
42
- userMessage?: string;
43
- context: Record<string, unknown>;
44
- /** Copia del modelo de datos si la superficie se creó con `sendDataModel: true`. */
45
- dataModel?: Record<string, unknown>;
46
- } | {
47
- type: "functionCall";
48
- surfaceId: string;
49
- componentId: ComponentId;
50
- call: string;
51
- args: Record<string, unknown>;
52
- };
53
- type A2UITone = "neutral" | "primary" | "info" | "success" | "warning" | "danger";
54
- type Justify = "start" | "center" | "end" | "stretch" | "spaceBetween" | "spaceAround" | "spaceEvenly";
55
- type Align = "start" | "center" | "end" | "stretch";
56
- interface BaseNode<TName extends string> {
57
- id: ComponentId;
58
- component: TName;
59
- /** Solo con un padre Row o Column: reparto del espacio sobrante (como `flex-grow`). */
60
- weight?: number;
61
- "@catalogId"?: string;
62
- "@accessibility"?: {
63
- label?: DynamicString;
64
- description?: DynamicString;
65
- };
66
- }
67
- interface Checkable {
68
- "@checks"?: Check[];
69
- }
70
- interface RowNode extends BaseNode<"Row"> {
71
- children: ChildList;
72
- justify?: Justify;
73
- align?: Align;
74
- }
75
- interface ColumnNode extends BaseNode<"Column"> {
76
- children: ChildList;
77
- justify?: Justify;
78
- align?: Align;
79
- }
80
- interface ListNode extends BaseNode<"List"> {
81
- children: ChildList;
82
- direction?: "vertical" | "horizontal";
83
- align?: Align;
84
- }
85
- interface CardNode extends BaseNode<"Card"> {
86
- child: ComponentId;
87
- }
88
- interface TabsNode extends BaseNode<"Tabs"> {
89
- tabs: Array<{
90
- title: DynamicString;
91
- child: ComponentId;
92
- }>;
93
- }
94
- interface ModalNode extends BaseNode<"Modal"> {
95
- /** Título accesible del diálogo (se anuncia, no se ve); sin él, el texto genérico del idioma activo. */
96
- title?: DynamicString;
97
- trigger: ComponentId;
98
- content: ComponentId;
99
- }
100
- interface DividerNode extends BaseNode<"Divider"> {
101
- axis?: "horizontal" | "vertical";
102
- }
103
- interface TextNode extends BaseNode<"Text"> {
104
- text: DynamicString;
105
- variant?: "body" | "caption";
106
- }
107
- interface ImageNode extends BaseNode<"Image"> {
108
- url: DynamicString;
109
- description?: DynamicString;
110
- fit?: "contain" | "cover" | "fill" | "none" | "scaleDown";
111
- variant?: "icon" | "avatar" | "smallFeature" | "mediumFeature" | "largeFeature" | "header";
112
- }
113
- interface IconNode extends BaseNode<"Icon"> {
114
- name: string | PathBinding;
115
- }
116
- interface VideoNode extends BaseNode<"Video"> {
117
- url: DynamicString;
118
- posterUrl?: DynamicString;
119
- }
120
- interface AudioPlayerNode extends BaseNode<"AudioPlayer"> {
121
- url: DynamicString;
122
- description?: DynamicString;
123
- }
124
- interface ButtonNode extends BaseNode<"Button">, Checkable {
125
- child: ComponentId;
126
- action: A2UIAction;
127
- variant?: "default" | "primary" | "borderless";
128
- }
129
- interface TextFieldNode extends BaseNode<"TextField">, Checkable {
130
- label: DynamicString;
131
- value: DynamicString;
132
- placeholder?: DynamicString;
133
- variant?: "shortText" | "longText" | "number" | "obscured";
134
- }
135
- interface CheckBoxNode extends BaseNode<"CheckBox">, Checkable {
136
- label: DynamicString;
137
- value: DynamicBoolean;
138
- }
139
- interface ChoicePickerNode extends BaseNode<"ChoicePicker">, Checkable {
140
- label?: DynamicString;
141
- options: Array<{
142
- label: DynamicString;
143
- value: string;
144
- }>;
145
- value: DynamicStringList;
146
- variant?: "multipleSelection" | "mutuallyExclusive";
147
- displayStyle?: "checkbox" | "chips";
148
- filterable?: boolean;
149
- }
150
- interface SliderNode extends BaseNode<"Slider">, Checkable {
151
- label?: DynamicString;
152
- value: DynamicNumber;
153
- max: number;
154
- min?: number;
155
- steps?: number;
156
- }
157
- interface DateTimeInputNode extends BaseNode<"DateTimeInput">, Checkable {
158
- label?: DynamicString;
159
- value: DynamicString;
160
- enableDate?: boolean;
161
- enableTime?: boolean;
162
- min?: DynamicString;
163
- max?: DynamicString;
164
- }
165
- interface PanelNode extends BaseNode<"Panel"> {
166
- child: ComponentId;
167
- title?: DynamicString;
168
- description?: DynamicString;
169
- icon?: string;
170
- tone?: A2UITone;
171
- /** Acciones al pie. */
172
- footer?: ComponentId;
173
- }
174
- interface HeadingNode extends BaseNode<"Heading"> {
175
- text: DynamicString;
176
- level?: 1 | 2 | 3;
177
- description?: DynamicString;
178
- }
179
- interface IconTileNode extends BaseNode<"IconTile"> {
180
- name: string;
181
- tone?: A2UITone;
182
- size?: "sm" | "md" | "lg";
183
- }
184
- interface BadgeNode extends BaseNode<"Badge"> {
185
- text: DynamicString;
186
- tone?: A2UITone;
187
- }
188
- interface ProgressNode extends BaseNode<"Progress"> {
189
- value: DynamicNumber;
190
- max?: number;
191
- label?: DynamicString;
192
- tone?: A2UITone;
193
- }
194
- interface StatNode extends BaseNode<"Stat"> {
195
- label: DynamicString;
196
- value: DynamicString | DynamicNumber;
197
- /** Variación frente al periodo anterior, en %. */
198
- delta?: DynamicNumber;
199
- description?: DynamicString;
200
- icon?: string;
201
- tone?: "neutral" | "good" | "warn" | "bad";
202
- }
203
- interface AlertNode extends BaseNode<"Alert"> {
204
- text: DynamicString;
205
- title?: DynamicString;
206
- tone?: "info" | "success" | "warning" | "danger";
207
- }
208
- interface ListItemNode extends BaseNode<"ListItem"> {
209
- title: DynamicString;
210
- description?: DynamicString;
211
- icon?: DynamicString;
212
- tone?: DynamicString;
213
- badge?: DynamicString;
214
- badgeTone?: DynamicString;
215
- /** Componente a la derecha (p. ej. un Button). */
216
- action?: ComponentId;
217
- }
218
- type ChartKind = "line" | "area" | "bar" | "horizontalBar" | "donut" | "pie" | "gauge";
219
- interface ChartNode extends BaseNode<"Chart"> {
220
- kind: ChartKind;
221
- title?: DynamicString;
222
- description?: DynamicString;
223
- /** Etiquetas del eje (line, area, bar). Lista literal o `{ "@path" }`. */
224
- categories?: Array<string | number> | PathBinding;
225
- /** Series `[{ name, data: number[] }]` (line, area, bar). Literal o `{ "@path" }`. */
226
- series?: Array<{
227
- name: string;
228
- data: Array<number | null>;
229
- }> | PathBinding;
230
- /** Porciones `[{ name, value }]` (donut, pie). Literal o `{ "@path" }`. */
231
- slices?: Array<{
232
- name: string;
233
- value: number;
234
- }> | PathBinding;
235
- /** Valor del gauge. */
236
- value?: DynamicNumber;
237
- min?: number;
238
- max?: number;
239
- stacked?: boolean;
240
- size?: "glance" | "standard" | "focus";
241
- }
242
- type A2UIComponent = RowNode | ColumnNode | ListNode | CardNode | TabsNode | ModalNode | DividerNode | TextNode | ImageNode | IconNode | VideoNode | AudioPlayerNode | ButtonNode | TextFieldNode | CheckBoxNode | ChoicePickerNode | SliderNode | DateTimeInputNode | PanelNode | HeadingNode | IconTileNode | BadgeNode | ProgressNode | StatNode | AlertNode | ListItemNode | ChartNode;
243
- type A2UIMessage = {
244
- version: "1.0";
245
- createSurface: {
246
- surfaceId: string;
247
- catalogId?: string;
248
- /** Componentes y datos iniciales: la superficie aparece pintada en un solo mensaje. */
249
- components?: A2UIComponent[];
250
- dataModel?: Record<string, unknown>;
251
- sendDataModel?: boolean;
252
- };
253
- } | {
254
- version: "1.0";
255
- updateComponents: {
256
- surfaceId: string;
257
- components: A2UIComponent[];
258
- };
259
- } | {
260
- version: "1.0";
261
- updateDataModel: {
262
- surfaceId: string;
263
- path?: string;
264
- value?: unknown;
265
- };
266
- } | {
267
- version: "1.0";
268
- deleteSurface: {
269
- surfaceId: string;
270
- };
271
- };
272
- /**
273
- * Devuelve un modelo nuevo con `value` en `path` (crea los tramos que falten; `value` nulo o indefinido borra la
274
- * clave). Sin ruta (o `/`) sustituye el modelo entero por un objeto.
275
- */
276
- declare function applyUpdate(model: Record<string, unknown>, path: string | undefined, value: unknown): Record<string, unknown>;
277
- declare function isPathBinding(raw: unknown): raw is PathBinding;
278
- declare function isFunctionCall(raw: unknown): raw is FunctionCall;
279
- /** Ruta absoluta de un puntero, relativa al ámbito (`scopePath`) cuando no empieza por `/`. */
280
- declare function buildFullPath(pointer: string, scopePath: string | undefined): string;
281
- /** Valor literal tal cual; `{ "@path" }` = lo que haya en el modelo de datos; `{ "@call" }` = el resultado de la función. */
282
- /** `locale`: idioma activo (BCP 47) para los formatos de número, moneda, fecha y plural; sin él, el del entorno. */
283
- declare function resolveDynamic<T = unknown>(raw: unknown, data: Record<string, unknown>, scopePath?: string, depth?: number, locale?: string): T | undefined;
284
- /** Resuelve los enlaces de un objeto (el `context` de una acción) un nivel hacia dentro. */
285
- declare function resolveContext(context: Record<string, unknown> | undefined, data: Record<string, unknown>, scopePath?: string, locale?: string): Record<string, unknown>;
286
- /** ¿Pasan todas las comprobaciones? Devuelve los mensajes de las que fallan. */
287
- declare function failedChecks(checks: Check[] | undefined, data: Record<string, unknown>, scopePath?: string, locale?: string): string[];
288
-
289
- export { type A2UIAction, type A2UIActionEvent, type A2UIComponent, type A2UIMessage, type A2UITone, A2UI_VERSION, type AlertNode, type AudioPlayerNode, type BadgeNode, type ButtonNode, type CardNode, type ChartKind, type ChartNode, type Check, type CheckBoxNode, type ChildList, type ChoicePickerNode, type ColumnNode, type ComponentId, type DateTimeInputNode, type DividerNode, type DynamicBoolean, type DynamicNumber, type DynamicString, type DynamicStringList, type FunctionCall, type HeadingNode, type IconNode, type IconTileNode, type ImageNode, type ListItemNode, type ListNode, type ModalNode, ORBITAL_CATALOG_ID, type PanelNode, type PathBinding, type ProgressNode, type RowNode, type SliderNode, type StatNode, type TabsNode, type TemplateChildren, type TextFieldNode, type TextNode, type VideoNode, applyUpdate, buildFullPath, failedChecks, isFunctionCall, isPathBinding, resolveContext, resolveDynamic };
@@ -1,15 +0,0 @@
1
- import { AgentEventChip, AgentEvent } from '../ui/agent-events.js';
2
- import 'react';
3
-
4
- /** Chips (modelo, tokens, coste) a partir de los metadatos habituales de un evento. */
5
- declare function chipsFromMeta(meta: {
6
- model?: string;
7
- tokensIn?: number;
8
- tokensOut?: number;
9
- costUsd?: number;
10
- }): AgentEventChip[];
11
- declare function toAgentEvents(stream: unknown[]): AgentEvent[];
12
- /** Partes de un mensaje del AI SDK (`message.parts`) → eventos. */
13
- declare function fromUiMessageParts(parts: unknown[]): AgentEvent[];
14
-
15
- export { chipsFromMeta, fromUiMessageParts, toAgentEvents };
@@ -1,29 +0,0 @@
1
- import { AuthErrorCode } from './auth.js';
2
- import 'react';
3
- import './i18n.js';
4
-
5
- /** Error tal como lo devuelve Better Auth (cliente o API). */
6
- type BetterAuthError = {
7
- code?: string;
8
- message?: string;
9
- status?: number;
10
- statusText?: string;
11
- } | null | undefined;
12
- /** Traduce un error de Better Auth a `AuthErrorCode` (desconocido → `unknown`). */
13
- declare function betterAuthErrorCode(error: BetterAuthError): AuthErrorCode;
14
- /**
15
- * Convierte una respuesta `{ data, error }` en lo que esperan los callbacks de orbital-ds:
16
- * sin error → `undefined` (el componente sigue su flujo); con error → `{ error: AuthErrorCode }`.
17
- * Si la cuenta tiene 2FA, Better Auth responde `twoFactorRedirect`: llévala a MfaChallenge.
18
- */
19
- declare function fromBetterAuth(result: {
20
- error?: BetterAuthError;
21
- } | null | undefined): {
22
- error: AuthErrorCode;
23
- } | undefined;
24
- /** ¿Pide Better Auth el segundo factor? (`data.twoFactorRedirect`). */
25
- declare function needsTwoFactor(result: {
26
- data?: unknown;
27
- } | null | undefined): boolean;
28
-
29
- export { type BetterAuthError, betterAuthErrorCode, fromBetterAuth, needsTwoFactor };
@@ -1,85 +0,0 @@
1
- import { AuthProviderId } from './auth-providers.js';
2
- import { MfaMethod } from './auth.js';
3
- import 'react';
4
- import './i18n.js';
5
-
6
- type AuthFlowPreset = "standard" | "social" | "passwordless" | "partner" | "enterprise" | "hybrid" | "sso-only" | "sso-staff";
7
- type AuthAudience = "internal" | "external" | "mixed";
8
- type AuthSignUp = "open" | "invite" | "none";
9
- type AuthSignInMethod = "password" | "social" | "passkey" | "magic-link" | "email-code" | "sso";
10
- /** Por qué puerta entra una persona: plantilla de la organización o gente de fuera. */
11
- type AuthAccessKind = "internal" | "external";
12
- type AuthAccessRule = {
13
- methods: AuthSignInMethod[];
14
- mfaRequired: boolean;
15
- signUp: AuthSignUp;
16
- };
17
- type AuthFlowConfig = {
18
- preset: AuthFlowPreset;
19
- /** Para quién es la puerta: plantilla (internal), gente de fuera (external) o las dos (mixed). */
20
- audience: AuthAudience;
21
- /** Métodos ofrecidos para entrar, en orden de preferencia. */
22
- methods: AuthSignInMethod[];
23
- /** Proveedores sociales (ids de Better Auth). */
24
- providers: AuthProviderId[];
25
- /** Preset de AuthForm para la pantalla de entrada. */
26
- signIn: "sign-in" | "social" | "magic-link" | "email-code" | "sso";
27
- /** Identificador primero (home realm discovery). */
28
- identifierFirst: boolean;
29
- /** Inicio de la pantalla: pide el correo (identifier) o ofrece dos puertas sin escribir: «Continuar con SSO» y «Acceso para personas externas» (doors). */
30
- entry?: "identifier" | "doors";
31
- /** Dominios de la plantilla (sin @): su correo va al SSO corporativo. Obligatorio en `mixed`. */
32
- internalDomains: string[];
33
- /** Cómo se crean las cuentas: registro abierto, por invitación o desde el directorio (SSO). */
34
- signUp: AuthSignUp;
35
- mfa: {
36
- required: boolean;
37
- methods: MfaMethod[];
38
- };
39
- /** Reglas por tipo de persona; lo que falte se deduce del flujo (ver `resolveAuthAccess`). */
40
- access?: {
41
- internal?: Partial<AuthAccessRule>;
42
- external?: Partial<AuthAccessRule>;
43
- };
44
- /** Props de AuthLayout. */
45
- layout: {
46
- preset?: "centered" | "split" | "cover" | "banner" | "minimal";
47
- surface?: "solid" | "glass" | "elevated" | "plain";
48
- shape?: "rounded" | "soft" | "sharp";
49
- backdrop?: "none" | "dots" | "grid" | "aurora" | "mesh" | "glow" | "rings" | "beams" | "image";
50
- /** Cristal esmerilado sobre el fondo («mesh + glass»). */
51
- backdropGlass?: boolean;
52
- motion?: "full" | "entrance" | "off";
53
- mediaTint?: "none" | "brand" | "duotone";
54
- };
55
- };
56
- type FlowDefaults = Omit<AuthFlowConfig, "preset">;
57
- declare const AUTH_FLOW_PRESETS: Record<AuthFlowPreset, FlowDefaults>;
58
- /** Flujo a partir de un preset; cualquier valor explícito lo sobrescribe. */
59
- declare function defineAuthFlow(preset: AuthFlowPreset, overrides?: Partial<Omit<AuthFlowConfig, "preset">>): AuthFlowConfig;
60
- /** ¿Es de la plantilla? Compara el dominio del correo (y sus subdominios) con `internalDomains`. */
61
- declare function isInternalIdentifier(flow: Pick<AuthFlowConfig, "internalDomains">, identifier: string): boolean;
62
- type AccessFlow = Pick<AuthFlowConfig, "audience" | "methods" | "internalDomains" | "signUp" | "mfa" | "access">;
63
- /** Regla efectiva de cada puerta: lo explícito de `access` manda; el resto se deduce del flujo. */
64
- declare function authAccessRule(flow: AccessFlow, kind: AuthAccessKind): AuthAccessRule;
65
- /**
66
- * ¿Por qué puerta entra este correo y qué se le exigirá? `internal` si el flujo es interno o el dominio es de
67
- * la plantilla; `external` en el resto. Devuelve la regla de esa puerta y el método con el que seguir.
68
- */
69
- declare function resolveAuthAccess(flow: AccessFlow, identifier: string): AuthAccessRule & {
70
- kind: AuthAccessKind;
71
- method: AuthSignInMethod;
72
- };
73
- /**
74
- * Ruta por defecto para `AuthForm onIdentify`: la plantilla (o una puerta interna) va al SSO; el
75
- * resto, al primer método de cuenta propia del flujo. Para dominios de clientes con su propio SSO
76
- * (enterprise, partner), la app consulta antes a su proveedor y cae aquí si no lo encuentra.
77
- */
78
- declare function routeAuthIdentifier(flow: Pick<AuthFlowConfig, "audience" | "methods" | "internalDomains"> & Partial<Pick<AuthFlowConfig, "signUp" | "mfa" | "access">>, identifier: string): {
79
- method: "password" | "sso" | "passkey" | "email-code" | "magic-link";
80
- access: AuthAccessKind;
81
- };
82
- /** Problemas de un flujo (vacío = válido). Mensajes en inglés, como `dsWarn`. */
83
- declare function validateAuthFlow(flow: AuthFlowConfig): string[];
84
-
85
- export { AUTH_FLOW_PRESETS, type AuthAccessKind, type AuthAccessRule, type AuthAudience, type AuthFlowConfig, type AuthFlowPreset, type AuthSignInMethod, type AuthSignUp, authAccessRule, defineAuthFlow, isInternalIdentifier, resolveAuthAccess, routeAuthIdentifier, validateAuthFlow };
@@ -1,194 +0,0 @@
1
- import * as React from 'react';
2
- import { AuthProviderOption } from './auth.js';
3
- import './i18n.js';
4
-
5
- type AuthProviderKind = "social" | "enterprise";
6
- type AuthProviderInfo = {
7
- /** Identificador de Better Auth. */
8
- id: string;
9
- /** Nombre propio de la marca (no se traduce). */
10
- label: string;
11
- kind: AuthProviderKind;
12
- };
13
- /** Proveedores sociales de Better Auth (`socialProviders`). */
14
- declare const AUTH_SOCIAL_PROVIDERS: readonly [{
15
- readonly id: "google";
16
- readonly label: "Google";
17
- readonly kind: "social";
18
- }, {
19
- readonly id: "microsoft";
20
- readonly label: "Microsoft";
21
- readonly kind: "social";
22
- }, {
23
- readonly id: "apple";
24
- readonly label: "Apple";
25
- readonly kind: "social";
26
- }, {
27
- readonly id: "github";
28
- readonly label: "GitHub";
29
- readonly kind: "social";
30
- }, {
31
- readonly id: "gitlab";
32
- readonly label: "GitLab";
33
- readonly kind: "social";
34
- }, {
35
- readonly id: "facebook";
36
- readonly label: "Facebook";
37
- readonly kind: "social";
38
- }, {
39
- readonly id: "twitter";
40
- readonly label: "X";
41
- readonly kind: "social";
42
- }, {
43
- readonly id: "linkedin";
44
- readonly label: "LinkedIn";
45
- readonly kind: "social";
46
- }, {
47
- readonly id: "discord";
48
- readonly label: "Discord";
49
- readonly kind: "social";
50
- }, {
51
- readonly id: "slack";
52
- readonly label: "Slack";
53
- readonly kind: "social";
54
- }, {
55
- readonly id: "atlassian";
56
- readonly label: "Atlassian";
57
- readonly kind: "social";
58
- }, {
59
- readonly id: "notion";
60
- readonly label: "Notion";
61
- readonly kind: "social";
62
- }, {
63
- readonly id: "linear";
64
- readonly label: "Linear";
65
- readonly kind: "social";
66
- }, {
67
- readonly id: "figma";
68
- readonly label: "Figma";
69
- readonly kind: "social";
70
- }, {
71
- readonly id: "salesforce";
72
- readonly label: "Salesforce";
73
- readonly kind: "social";
74
- }, {
75
- readonly id: "dropbox";
76
- readonly label: "Dropbox";
77
- readonly kind: "social";
78
- }, {
79
- readonly id: "zoom";
80
- readonly label: "Zoom";
81
- readonly kind: "social";
82
- }, {
83
- readonly id: "spotify";
84
- readonly label: "Spotify";
85
- readonly kind: "social";
86
- }, {
87
- readonly id: "twitch";
88
- readonly label: "Twitch";
89
- readonly kind: "social";
90
- }, {
91
- readonly id: "tiktok";
92
- readonly label: "TikTok";
93
- readonly kind: "social";
94
- }, {
95
- readonly id: "reddit";
96
- readonly label: "Reddit";
97
- readonly kind: "social";
98
- }, {
99
- readonly id: "paypal";
100
- readonly label: "PayPal";
101
- readonly kind: "social";
102
- }, {
103
- readonly id: "huggingface";
104
- readonly label: "Hugging Face";
105
- readonly kind: "social";
106
- }, {
107
- readonly id: "vercel";
108
- readonly label: "Vercel";
109
- readonly kind: "social";
110
- }, {
111
- readonly id: "cognito";
112
- readonly label: "Amazon Cognito";
113
- readonly kind: "social";
114
- }, {
115
- readonly id: "roblox";
116
- readonly label: "Roblox";
117
- readonly kind: "social";
118
- }, {
119
- readonly id: "kick";
120
- readonly label: "Kick";
121
- readonly kind: "social";
122
- }, {
123
- readonly id: "vk";
124
- readonly label: "VK";
125
- readonly kind: "social";
126
- }, {
127
- readonly id: "kakao";
128
- readonly label: "Kakao";
129
- readonly kind: "social";
130
- }, {
131
- readonly id: "naver";
132
- readonly label: "Naver";
133
- readonly kind: "social";
134
- }, {
135
- readonly id: "line";
136
- readonly label: "LINE";
137
- readonly kind: "social";
138
- }];
139
- /**
140
- * Proveedores de identidad de empresa (Better Auth `sso` con OIDC o SAML, o `genericOAuth`).
141
- * En el formulario van por la vista SSO (correo de trabajo u organización), no como botones
142
- * sueltos; se listan como botón solo si la app tiene un único IdP conocido.
143
- */
144
- declare const AUTH_ENTERPRISE_PROVIDERS: readonly [{
145
- readonly id: "entra-id";
146
- readonly label: "Microsoft Entra ID";
147
- readonly kind: "enterprise";
148
- }, {
149
- readonly id: "google-workspace";
150
- readonly label: "Google Workspace";
151
- readonly kind: "enterprise";
152
- }, {
153
- readonly id: "okta";
154
- readonly label: "Okta";
155
- readonly kind: "enterprise";
156
- }, {
157
- readonly id: "auth0";
158
- readonly label: "Auth0";
159
- readonly kind: "enterprise";
160
- }, {
161
- readonly id: "keycloak";
162
- readonly label: "Keycloak";
163
- readonly kind: "enterprise";
164
- }, {
165
- readonly id: "onelogin";
166
- readonly label: "OneLogin";
167
- readonly kind: "enterprise";
168
- }, {
169
- readonly id: "jumpcloud";
170
- readonly label: "JumpCloud";
171
- readonly kind: "enterprise";
172
- }, {
173
- readonly id: "ping";
174
- readonly label: "Ping Identity";
175
- readonly kind: "enterprise";
176
- }, {
177
- readonly id: "adfs";
178
- readonly label: "AD FS";
179
- readonly kind: "enterprise";
180
- }];
181
- /** Ids conocidos (autocompletado); se acepta cualquier otro texto. */
182
- type AuthProviderId = (typeof AUTH_SOCIAL_PROVIDERS)[number]["id"] | (typeof AUTH_ENTERPRISE_PROVIDERS)[number]["id"] | (string & {});
183
- /** Ficha de un proveedor (o `undefined` si no está en el catálogo). */
184
- declare function authProviderInfo(id: string): AuthProviderInfo | undefined;
185
- /**
186
- * Lista de opciones para `AuthForm`/`AuthProviders` en el orden pedido. `icons` y `labels` los
187
- * pone la app; `disabled` desactiva algunos (p. ej. mientras no hay credenciales en ese entorno).
188
- */
189
- declare function authProviders(ids: readonly AuthProviderId[], icons?: Partial<Record<string, React.ReactNode>>, options?: {
190
- labels?: Partial<Record<string, string>>;
191
- disabled?: readonly string[];
192
- }): AuthProviderOption[];
193
-
194
- export { AUTH_ENTERPRISE_PROVIDERS, AUTH_SOCIAL_PROVIDERS, type AuthProviderId, type AuthProviderInfo, type AuthProviderKind, authProviderInfo, authProviders };
@@ -1,68 +0,0 @@
1
- import * as React from 'react';
2
- import { DsMessages } from './i18n.js';
3
-
4
- /** Errores de acceso con texto propio en los catálogos (en, es, pt-BR). */
5
- type AuthErrorCode = "invalid-credentials" | "account-locked" | "too-many-attempts" | "email-not-verified" | "email-taken" | "weak-password" | "password-reused" | "invalid-code" | "expired-code" | "link-expired" | "session-expired" | "provider-failed" | "passkey-failed" | "network" | "unknown";
6
- /** Campos que validan los formularios de acceso. */
7
- type AuthField = "identifier" | "name" | "password" | "confirmPassword" | "terms" | "code" | "phone";
8
- /** Proveedor externo (SSO, social). El icono y el nombre los pone la app: nada de marcas en el paquete. */
9
- type AuthProviderOption = {
10
- id: string;
11
- label: React.ReactNode;
12
- icon?: React.ReactNode;
13
- disabled?: boolean;
14
- };
15
- /** Métodos de segundo factor. */
16
- type MfaMethod = "totp" | "sms" | "email" | "backup-code" | "passkey";
17
- /** Enlace de navegación: una URL (se pinta como <a>) o una función (router de la app). */
18
- type AuthLink = string | (() => void);
19
- /** Reglas de contraseña nueva (sign-up, reset-password). */
20
- type PasswordRules = {
21
- minLength?: number;
22
- lowercase?: boolean;
23
- uppercase?: boolean;
24
- number?: boolean;
25
- symbol?: boolean;
26
- };
27
- declare const DEFAULT_PASSWORD_RULES: Required<PasswordRules>;
28
- /** Texto de un error de acceso en el idioma activo. */
29
- declare function authErrorMessage(t: DsMessages, code: AuthErrorCode): string;
30
- /** Es un código de error conocido (y no un nodo de React con el texto de la app). */
31
- declare function isAuthErrorCode(value: unknown): value is AuthErrorCode;
32
- /** Correo con forma válida (la comprobación real es del servidor). */
33
- declare function isValidEmail(value: string): boolean;
34
- /** Qué reglas cumple una contraseña. */
35
- declare function checkPassword(value: string, rules?: PasswordRules): {
36
- rules: {
37
- minLength: number;
38
- lowercase: boolean;
39
- uppercase: boolean;
40
- number: boolean;
41
- symbol: boolean;
42
- };
43
- checks: {
44
- minLength: boolean;
45
- lowercase: boolean;
46
- uppercase: boolean;
47
- number: boolean;
48
- symbol: boolean;
49
- };
50
- valid: boolean;
51
- };
52
- /**
53
- * Fuerza orientativa de 0 a 5 para PasswordStrength (longitud y variedad). Es una pista visual: la
54
- * política real (listas de contraseñas filtradas, zxcvbn…) la aplica el servidor o la app.
55
- */
56
- declare function passwordScore(value: string): number;
57
- /** Cuenta atrás en segundos (reenviar código, sesión a punto de caducar). `start(n)` la reinicia. */
58
- declare function useAuthCountdown(initial?: number): {
59
- left: number;
60
- start: (seconds: number) => void;
61
- running: boolean;
62
- };
63
- /** mm:ss para una cuenta atrás. */
64
- declare function formatCountdown(seconds: number): string;
65
- /** Fecha de acceso legible en el idioma activo (sesiones, llaves de acceso). Un texto se deja tal cual. */
66
- declare function formatAuthDate(value: string | number | Date | null | undefined, locale: string): string;
67
-
68
- export { type AuthErrorCode, type AuthField, type AuthLink, type AuthProviderOption, DEFAULT_PASSWORD_RULES, type MfaMethod, type PasswordRules, authErrorMessage, checkPassword, formatAuthDate, formatCountdown, isAuthErrorCode, isValidEmail, passwordScore, useAuthCountdown };