@wodira/browser 0.1.0 → 1.0.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 (71) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +259 -17
  3. package/dist/index.cjs +38 -5
  4. package/dist/index.d.ts +110 -2
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +38 -4
  7. package/dist/types.d.ts +56 -2
  8. package/dist/types.d.ts.map +1 -1
  9. package/dist/ui/boxes/cdn.d.ts +2 -0
  10. package/dist/ui/boxes/cdn.d.ts.map +1 -0
  11. package/dist/ui/boxes/cdn.js +743 -0
  12. package/dist/ui/boxes/client.d.ts +30 -0
  13. package/dist/ui/boxes/client.d.ts.map +1 -0
  14. package/dist/ui/boxes/components.d.ts +246 -0
  15. package/dist/ui/boxes/components.d.ts.map +1 -0
  16. package/dist/ui/boxes/i18n.d.ts +107 -0
  17. package/dist/ui/boxes/i18n.d.ts.map +1 -0
  18. package/dist/ui/boxes/index.d.ts +16 -0
  19. package/dist/ui/boxes/index.d.ts.map +1 -0
  20. package/dist/ui/boxes/index.js +3071 -0
  21. package/dist/ui/boxes/styles.d.ts +2 -0
  22. package/dist/ui/boxes/styles.d.ts.map +1 -0
  23. package/dist/ui/boxes/types.d.ts +105 -0
  24. package/dist/ui/boxes/types.d.ts.map +1 -0
  25. package/dist/ui/components.d.ts +158 -4
  26. package/dist/ui/components.d.ts.map +1 -1
  27. package/dist/ui/events.d.ts +1 -1
  28. package/dist/ui/events.d.ts.map +1 -1
  29. package/dist/ui/i18n.d.ts +4 -1
  30. package/dist/ui/i18n.d.ts.map +1 -1
  31. package/dist/ui/index-tfej862z.js +3264 -0
  32. package/dist/ui/index-xdhg885t.js +997 -0
  33. package/dist/ui/index.d.ts +19 -3
  34. package/dist/ui/index.d.ts.map +1 -1
  35. package/dist/ui/index.js +9038 -2030
  36. package/dist/ui/layout-styles.d.ts +3 -0
  37. package/dist/ui/layout-styles.d.ts.map +1 -0
  38. package/dist/ui/registration-eligibility.d.ts +52 -0
  39. package/dist/ui/registration-eligibility.d.ts.map +1 -0
  40. package/dist/ui/shirt-3d-renderer-jyks1h8f.js +10 -0
  41. package/dist/ui/shirt-sponsors/cdn.d.ts +2 -0
  42. package/dist/ui/shirt-sponsors/cdn.d.ts.map +1 -0
  43. package/dist/ui/shirt-sponsors/cdn.js +5125 -0
  44. package/dist/ui/shirt-sponsors/index.d.ts +9 -0
  45. package/dist/ui/shirt-sponsors/index.d.ts.map +1 -0
  46. package/dist/ui/shirt-sponsors/index.js +10 -0
  47. package/dist/ui/shirt-sponsors/render/auction-model.d.ts +55 -0
  48. package/dist/ui/shirt-sponsors/render/auction-model.d.ts.map +1 -0
  49. package/dist/ui/shirt-sponsors/render/index.d.ts +7 -0
  50. package/dist/ui/shirt-sponsors/render/index.d.ts.map +1 -0
  51. package/dist/ui/shirt-sponsors/render/index.js +34 -0
  52. package/dist/ui/shirt-sponsors/render/shirt-3d-renderer.d.ts +109 -0
  53. package/dist/ui/shirt-sponsors/render/shirt-3d-renderer.d.ts.map +1 -0
  54. package/dist/ui/shirt-sponsors/render/shirt-artwork-projection.d.ts +13 -0
  55. package/dist/ui/shirt-sponsors/render/shirt-artwork-projection.d.ts.map +1 -0
  56. package/dist/ui/shirt-sponsors/render/shirt-artwork.d.ts +17 -0
  57. package/dist/ui/shirt-sponsors/render/shirt-artwork.d.ts.map +1 -0
  58. package/dist/ui/shirt-sponsors/render/shirt-cloth-motion.d.ts +31 -0
  59. package/dist/ui/shirt-sponsors/render/shirt-cloth-motion.d.ts.map +1 -0
  60. package/dist/ui/shirt-sponsors/render/shirt-silhouette.d.ts +9 -0
  61. package/dist/ui/shirt-sponsors/render/shirt-silhouette.d.ts.map +1 -0
  62. package/dist/ui/shirt-sponsors/shirt-auction.d.ts +137 -0
  63. package/dist/ui/shirt-sponsors/shirt-auction.d.ts.map +1 -0
  64. package/dist/ui/signature-pad.d.ts +29 -0
  65. package/dist/ui/signature-pad.d.ts.map +1 -0
  66. package/dist/ui/styles.d.ts.map +1 -1
  67. package/dist/ui/theme.d.ts +63 -0
  68. package/dist/ui/theme.d.ts.map +1 -0
  69. package/dist/ui/validators.d.ts +1 -1
  70. package/dist/ui/validators.d.ts.map +1 -1
  71. package/package.json +42 -13
package/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 — 2026-11-11
4
+
5
+ ### Changed
6
+
7
+ - `<wodira-shirt-auction>` now renders natively instead of in an iframe: the 3D shirt, slots, current leaders and outbid amount live in the page and use the shared `--wodira-*` tokens and `::part()` names, including the colours painted on the 3D shirt. Sign-in, the sponsor logo and Stripe payment open in a WODira window. **Breaking:** the element now requires `publishable-key`; `base-url` sets the API.
8
+
9
+ ### Added
10
+
11
+ - `WodiraBrowserClient.getShirtSponsorCampaign()` and the `WodiraShirtCampaign` types.
12
+ - `@wodira/browser/ui/shirt-sponsors/render`, the three.js shirt renderer shared with the WODira web app. three.js loads only when a shirt is on the page.
13
+ - `wodira:shirt:slot-selected` and `wodira:shirt:bid-started` events.
14
+
15
+ ### Fixed
16
+
17
+ - The public shirt renderer includes its Three.js declaration dependency, so strict TypeScript consumers can import the render entry without installing extra types.
18
+
19
+ ## 0.3.0 — 2026-11-11
20
+
21
+ ### Added
22
+
23
+ - Lit components for event discovery, registration, signature capture and registration receipts, with theme tokens and customization through slots and CSS parts.
24
+ - Boxes widgets for calendars, plans and trial classes, with a versioned CDN bundle and integrity verification.
25
+ - Registration support for category availability, supplements, custom fields, signatures and promotional codes.
26
+
27
+ ### Fixed
28
+
29
+ - Published TypeScript declarations resolve correctly in strict NodeNext projects as well as frontend bundlers.
30
+ - Registration components preserve API validation messages and recover when a promotional code is removed.
package/README.md CHANGED
@@ -39,6 +39,30 @@ if (session.sessionUrl) window.location.href = session.sessionUrl;
39
39
 
40
40
  Las URLs de éxito/cancelación deben pertenecer a un origen permitido en la publishable key.
41
41
 
42
+ ## Widgets públicos de Boxes: `@wodira/browser/ui/boxes`
43
+
44
+ Las instalaciones de Boxes se crean desde el constructor **Box → Widgets web**. Cada una entrega un `installation-id` y una clave publicable exclusiva para un origen.
45
+
46
+ ```ts
47
+ import { defineWodiraBoxElements } from '@wodira/browser/ui/boxes';
48
+
49
+ defineWodiraBoxElements();
50
+ ```
51
+
52
+ ```html
53
+ <wodira-box-widget
54
+ installation-id="widget_..."
55
+ publishable-key="wpk_live_..."
56
+ locale="auto"
57
+ ></wodira-box-widget>
58
+ ```
59
+
60
+ También están disponibles `<wodira-box-calendar>`, `<wodira-box-trial>` y `<wodira-box-plans>`. Aplican automáticamente logo, banner y colores del box; son responsive por contenedor; soportan `es`, `en` y `pt`; y permiten personalización con variables `--wodira-box-*` y partes como `shell`, `hero`, `logo`, `card`, `class-cta`, `trial-cta` y `plan-cta`.
61
+
62
+ Las selecciones emiten `wodira:box-class-selected`, `wodira:box-trial-selected` y `wodira:box-plan-selected`. La identificación, confirmación y pago continúan en WODira Boxes; nunca se expone una clave secreta en el embed.
63
+
64
+ La guía completa de instalación, CSP, privacidad y despliegue está en [`docs/boxes/public-widgets.md`](../../docs/boxes/public-widgets.md).
65
+
42
66
  ## Web Components: `@wodira/browser/ui`
43
67
 
44
68
  `@wodira/browser/ui` incluye Web Components basados en Lit para incrustar el embudo de inscripción en webs de organizadores. Los componentes usan publishable keys, CSS variables y `::part()` para personalización visual.
@@ -112,29 +136,247 @@ Atributos principales: `publishable-key`, `base-url`, `event-id`, `success-url`,
112
136
  ### Production notes
113
137
 
114
138
  - Los componentes hacen validación cliente antes de crear Checkout Session: comprador, atletas, campos obligatorios, términos y waivers requeridos.
139
+ - En categorías de equipo elegibles, cada plaza salvo la del capitán permite elegir **Completar ahora** o **Invitar después**. Las plazas aplazadas conservan su género reservado y se completan mediante un enlace compartible después del pago.
140
+ - La disponibilidad de **Invitar después** la decide `teamCompletion` en el resumen. No se ofrece para categorías individuales, cuando hay firmas obligatorias o cuando ha vencido el plazo de finalización.
141
+ - Cuando quedan plazas pendientes, la sesión devuelve `participantDataStatus`, `pendingParticipantCount` y `teamManageToken`; en pagos Stripe, WODira añade además `teamToken` al fragmento de la URL de éxito para continuar la gestión del equipo.
115
142
  - Si el evento expone suplementos activos, el formulario renderiza extras y selecciona automáticamente los obligatorios.
116
143
  - El resumen de precio se recalcula con `getRegistrationSummary` cuando hay `purchaserEmail` válido, categoría y extras/promocode.
117
- - `locale="en-US"` cambia los textos base a inglés; cualquier otro locale usa español por defecto y se usa para fecha/moneda.
144
+ - `locale` explícito tiene prioridad sobre el idioma del documento anfitrión; `en`/`en-*` usa inglés y los idiomas no soportados usan español. Fechas e importes utilizan `Intl`.
118
145
  - `auto-redirect` está activo por defecto; si se desactiva, escucha `wodira:checkout-created` o `wodira:redirect` para gestionar la navegación.
119
146
 
120
147
  ### CSS variables soportadas
121
148
 
122
- | Variable | Uso |
123
- | ---------------------------------------- | -------------------- |
124
- | `--wodira-color-primary` | Botones principales |
125
- | `--wodira-color-primary-contrast` | Texto sobre primario |
126
- | `--wodira-color-accent` | Precios y foco |
127
- | `--wodira-color-surface` | Tarjetas e inputs |
128
- | `--wodira-color-muted` | Fondos secundarios |
129
- | `--wodira-color-border` | Bordes |
130
- | `--wodira-color-text` | Texto principal |
131
- | `--wodira-color-text-muted` | Texto secundario |
132
- | `--wodira-color-danger` | Errores |
133
- | `--wodira-radius` / `--wodira-radius-sm` | Radios |
134
- | `--wodira-space` | Espaciado base |
135
- | `--wodira-font-family` | Tipografía |
136
- | `--wodira-shadow` | Sombra de tarjetas |
149
+ | Variable | Uso |
150
+ | ---------------------------------------- | ----------------------------------------------- |
151
+ | `--wodira-color-primary` | Botones principales |
152
+ | `--wodira-color-primary-contrast` | Texto sobre primario |
153
+ | `--wodira-color-accent` | Precios y foco |
154
+ | `--wodira-color-accent-contrast` | Texto sobre acento |
155
+ | `--wodira-color-surface` | Tarjetas e inputs |
156
+ | `--wodira-color-muted` | Fondos secundarios |
157
+ | `--wodira-color-border` | Bordes |
158
+ | `--wodira-color-text` | Texto principal |
159
+ | `--wodira-color-text-muted` | Texto secundario |
160
+ | `--wodira-color-danger` | Errores |
161
+ | `--wodira-color-success` | Confirmaciones |
162
+ | `--wodira-radius` / `--wodira-radius-sm` | Radios |
163
+ | `--wodira-space` | Espaciado base |
164
+ | `--wodira-font-family` | Tipografía |
165
+ | `--wodira-font-size` | Tamaño base (1rem) |
166
+ | `--wodira-color-scheme` | Esquema de controles nativos (`light` / `dark`) |
167
+ | `--wodira-shadow` | Sombra de tarjetas |
168
+ | `--wodira-control-height` | Altura mínima de controles (2.75rem) |
169
+ | `--wodira-card-padding` | Espacio interior de tarjetas |
170
+ | `--wodira-grid-min` | Ancho mínimo de columna, limitado al contenedor |
171
+ | `--wodira-content-width` | Ancho máximo del checkout (76rem) |
172
+ | `--wodira-summary-width` | Ancho del resumen lateral (21rem) |
173
+ | `--wodira-sticky-offset` | Separación superior del resumen lateral (1rem) |
137
174
 
138
175
  ### Parts principales
139
176
 
140
- `card`, `event-card`, `pricing-card`, `registration-form`, `summary`, `button`, `input`, `select`, `textarea`, `checkbox`, `label`, `title`, `price`, `meta`, `hint`, `error`, `field-error`, `loader`, `empty`, `waiver`, `supplement`.
177
+ `card`, `event-card`, `pricing-card`, `registration-form`, `summary`, `button`, `input`, `select`, `textarea`, `checkbox`, `label`, `title`, `price`, `meta`, `hint`, `error`, `field-error`, `loader`, `empty`, `waiver`, `supplement`, `participant-mode`, `participant-mode-button`, `deferred-participant-hint`.
178
+
179
+ También: `registration-layout`, `registration-fields`, `registration-title`, `checkout-sidebar`, `summary-row`, `summary-total`, `submit`, `progress`, `progress-step`, `step-number`, `eligibility-summary` y `gender-composition`. Los compuestos propagan las partes públicas de sus hijos con `exportparts`: `wodira-checkout-flow::part(submit)` alcanza el botón real dentro del formulario, y `wodira-box-widget::part(class-cta)` alcanza la reserva del calendario.
180
+
181
+ ### Temas heredables, sin recrear los componentes
182
+
183
+ Los valores por defecto se resuelven como fallbacks: ningún componente sobrescribe las variables públicas del integrador. Puedes aplicar un tema al contenedor de varios widgets, a un widget concreto o con CSS. La fuente se hereda de la web anfitriona.
184
+
185
+ ```ts
186
+ import { applyWodiraTheme, wodiraThemes, type WodiraTheme } from '@wodira/browser/ui';
187
+ // También disponibles desde @wodira/browser/ui/boxes.
188
+
189
+ const brand: WodiraTheme = {
190
+ ...wodiraThemes.light,
191
+ primary: '#00564b',
192
+ primaryContrast: '#ffffff',
193
+ accent: '#006b58',
194
+ radius: '0.5rem',
195
+ fontFamily: 'inherit',
196
+ };
197
+ applyWodiraTheme(container, brand);
198
+ applyWodiraTheme(container, wodiraThemes.dark);
199
+ applyWodiraTheme(container, { radius: null }); // Restaura la herencia/default.
200
+ ```
201
+
202
+ `applyWodiraTheme` aplica un parche: las claves omitidas no cambian y `null` elimina sólo esa sobrescritura. `createWodiraCheckoutFlow(container, { ...options, theme: brand })` acepta el mismo objeto. No se pierden los datos del formulario al cambiar el tema. `wodiraThemeTokens` expone la correspondencia tipada entre las claves y sus variables CSS.
203
+
204
+ En Boxes se mantiene la API `--wodira-box-*`. Precedencia: variable específica de Boxes → variable genérica `--wodira-*` → marca recibida del servidor (primario/acento) → valores por defecto. Los colores del servidor no pisan la personalización del integrador.
205
+
206
+ Los presets claro y oscuro tienen colores de texto, error y acento coordinados. Si cambias colores, comprueba el contraste de texto (4.5:1 normal, 3:1 grande) y foco; no reduzcas los controles por debajo de un tamaño táctil cómodo. La densidad no oculta campos ni elimina validaciones.
207
+
208
+ ### Contenido mediante slots
209
+
210
+ | Componente | Slots aditivos |
211
+ | -------------------------------------- | ------------------------------------------------------------------------- |
212
+ | `wodira-checkout-flow` | `header`, `footer`, `registration-intro`, `checkout-help`, `after-submit` |
213
+ | `wodira-registration-form` | `intro`, `checkout-help`, `after-submit` |
214
+ | `wodira-box-widget` | `header`, `footer`, `calendar-intro`, `trial-intro`, `plans-intro` |
215
+ | Calendario, prueba y planes standalone | `header`, `intro`, `footer` |
216
+
217
+ ```html
218
+ <wodira-checkout-flow publishable-key="wpk_live_..." event-id="evt_...">
219
+ <p slot="registration-intro">Ten a mano tus datos de participante.</p>
220
+ <p slot="checkout-help">¿Necesitas ayuda? Contacta con nuestro equipo.</p>
221
+ </wodira-checkout-flow>
222
+ ```
223
+
224
+ Los slots añaden contenido; no sustituyen campos, aceptación legal, waivers o atribución de WODira. Usa contenido de confianza y conserva los contratos de los eventos DOM existentes.
225
+
226
+ ### Layout, accesibilidad y catálogo local
227
+
228
+ El registro separa los datos del resumen. A partir de **56rem de ancho del contenedor** el resumen queda en una columna lateral sticky; por debajo sigue el flujo del documento, sin barras fijas que tapen controles. Incluye progreso de pasos, foco en el formulario al seleccionar categoría y en el primer campo inválido al enviar. Respeta `prefers-reduced-motion` y mantiene los botones y pestañas operables con teclado.
229
+
230
+ ```bash
231
+ pnpm --filter @wodira/browser preview:ui
232
+ # http://127.0.0.1:4179 · Datos ficticios, sin llamadas a producción ni pagos.
233
+ pnpm --filter @wodira/browser test
234
+ pnpm --filter @wodira/browser test:ui:browser
235
+ ```
236
+
237
+ El catálogo permite cambiar marca, tema claro/oscuro, acento, densidad, radios e idioma sobre los componentes reales. Las pruebas de Chromium cubren 320/768/1024/1440px, herencia a través de Shadow DOM, `::part()`, foco, teclado, estados y accesibilidad con axe. Requieren Chromium de Playwright instalado (`pnpm exec playwright install chromium`).
238
+
239
+ El instalador CDN sigue fijado al artefacto publicado y su SRI. Antes de distribuir una nueva versión del paquete, publica con una **versión nueva** y actualiza conjuntamente `boxes-cdn-manifest.json` y el instalador de `apps/web`; no cambies el SRI de una URL versionada ya publicada.
240
+
241
+ ## Camiseta 3D y pujas en una web de evento
242
+
243
+ `@wodira/browser/ui/shirt-sponsors` proporciona `<wodira-shirt-auction>`, un componente Lit
244
+ nativo (sin iframe) para que un patrocinador vea la camiseta del evento en 3D, elija un espacio
245
+ tocándolo en la camiseta o en la lista, vea quién lidera y por cuánto, y puje o supere la puja
246
+ actual. Funciona con ratón, teclado y pantallas táctiles: en el móvil un deslizamiento vertical
247
+ sigue desplazando la página y uno horizontal gira la camiseta.
248
+
249
+ ```ts
250
+ import { defineWodiraShirtElements } from '@wodira/browser/ui/shirt-sponsors';
251
+ defineWodiraShirtElements();
252
+ ```
253
+
254
+ ```html
255
+ <wodira-shirt-auction
256
+ campaign-id="ID_DE_LA_CAMPANA"
257
+ publishable-key="wpk_live_..."
258
+ locale="es"
259
+ ></wodira-shirt-auction>
260
+ ```
261
+
262
+ También queda registrado con `defineWodiraElements()` desde `@wodira/browser/ui`. three.js es una
263
+ dependencia del paquete, pero se carga con un `import()` dinámico solo cuando hay una camiseta en
264
+ la página: el resto de componentes no lo descargan.
265
+
266
+ Para HTML sin bundler, ejecuta `pnpm --filter @wodira/browser build`, copia
267
+ `packages/browser/dist/ui/shirt-sponsors/cdn.js` (incluye Lit y three.js) a tu web y carga:
268
+
269
+ ```html
270
+ <script type="module" src="/assets/wodira-shirt-auction.js"></script>
271
+ ```
272
+
273
+ | Atributo | Uso |
274
+ | ----------------- | ------------------------------------------------------------------------ |
275
+ | `campaign-id` | ID de una campaña publicada de un evento de tu organización. |
276
+ | `publishable-key` | Clave `wpk_live_...` con el origen de tu web en los orígenes permitidos. |
277
+ | `locale` | `es`, `en`, `pt` o `auto` (idioma de la página). |
278
+ | `base-url` | API de WODira; por defecto `https://api.wodira.app`. |
279
+ | `app-url` | Web de WODira; por defecto `https://wodira.app`. HTTP solo en localhost. |
280
+
281
+ ### Migrar desde 0.3.x a 1.0.0
282
+
283
+ El componente de camisetas requiere ahora `publishable-key`: crea una clave pública de la
284
+ organización con el origen de tu web permitido y añádela al elemento, conservando
285
+ `campaign-id`, `locale` y `app-url`. Una clave secreta de organizador nunca debe usarse aquí.
286
+ Si utilizas una API distinta de `https://api.wodira.app`, configura además `base-url`.
287
+
288
+ La camiseta se dibuja dentro del propio componente. Sustituye las personalizaciones de
289
+ `::part(frame)` y los antiguos tokens `--wodira-primary`/`--wodira-background` por las partes
290
+ nativas y los tokens `--wodira-color-*` de la sección «Personalización». Permite la API en
291
+ `connect-src` y conserva las ventanas de WODira para el inicio de sesión y el pago.
292
+
293
+ Los imports del cliente, los componentes de inscripción y los widgets de Boxes conservan sus
294
+ entradas públicas. Si necesitas mantener temporalmente la integración anterior de camisetas,
295
+ fija la dependencia a `0.3.0` hasta adaptar su configuración.
296
+
297
+ ### Compra de la puja
298
+
299
+ El componente valida el importe (puja mínima e incrementos) y, al pulsar «Pujar» o «Superar la
300
+ puja», abre una ventana de WODira con el espacio y el importe ya elegidos. Allí el patrocinador
301
+ inicia sesión, sube el logotipo en SVG, acepta las condiciones y paga con Stripe. La sesión de
302
+ WODira y los datos de pago nunca pasan por la web del evento. Cuando Stripe confirma el pago, la
303
+ ventana avisa al componente, que recarga la campaña y muestra la nueva puja en la camiseta.
304
+
305
+ ```js
306
+ const auction = document.querySelector('wodira-shirt-auction');
307
+ auction.addEventListener('wodira:shirt:slot-selected', ({ detail }) => detail.slotId);
308
+ auction.addEventListener('wodira:shirt:bid-started', ({ detail }) => detail.amountCents);
309
+ auction.addEventListener('wodira:shirt:paid', ({ detail }) => detail.campaignId);
310
+ ```
311
+
312
+ `wodira:shirt:paid` es una señal de interfaz, no una prueba de pago para un servidor. Ningún
313
+ evento contiene emails, tokens, datos de tarjeta ni identificadores privados de puja. Si el
314
+ navegador bloquea la ventana, el componente muestra un enlace para abrir la puja.
315
+
316
+ ### Personalización
317
+
318
+ Usa las mismas variables y la misma convención de `::part()` que el resto de componentes.
319
+ `--wodira-color-accent` (huecos, precio líder, elementos activos),
320
+ `--wodira-color-accent-contrast`, `--wodira-color-primary` (botón y contorno del hueco elegido),
321
+ `--wodira-color-primary-contrast`, `--wodira-color-surface`, `--wodira-color-muted` (fondo de la
322
+ camiseta y del panel de puja), `--wodira-color-border` (también los huecos reservados),
323
+ `--wodira-color-text`, `--wodira-color-text-muted`, `--wodira-font-family`, `--wodira-radius`,
324
+ `--wodira-radius-sm`, `--wodira-space`, `--wodira-shadow` y `--wodira-card-padding`. Además,
325
+ `--wodira-shirt-stage-background` cambia solo el fondo de la camiseta.
326
+
327
+ Los colores también se pintan en la camiseta 3D. Si cambias las variables desde JavaScript sin
328
+ tocar `class`, `style` ni `data-theme` de la página o del elemento, llama a
329
+ `auction.refreshTheme()`.
330
+
331
+ Partes: `container`, `header`, `title`, `meta`, `layout`, `stage`, `shirt`, `stage-hint`,
332
+ `stage-controls`, `zoom-button`, `side-switch`, `side-button`, `side-button-active`,
333
+ `section-title`, `slot-list`, `slot`, `slot-selected`, `slot-reserved`, `slot-name`,
334
+ `slot-detail`, `slot-price`, `price`, `bid-panel`, `bid-title`, `leader`, `leader-logo`,
335
+ `bid-form`, `label`, `input`, `field-error`, `button`, `submit`, `hint`, `status`, `success`,
336
+ `error` y `loader`.
337
+
338
+ ```css
339
+ wodira-shirt-auction {
340
+ --wodira-color-accent: #2fd27a;
341
+ --wodira-color-primary: #10131a;
342
+ --wodira-radius: 4px;
343
+ }
344
+ wodira-shirt-auction::part(title) {
345
+ text-transform: uppercase;
346
+ }
347
+ ```
348
+
349
+ ### Desarrollo y despliegue
350
+
351
+ - API: `GET /external/v1/browser/shirt-sponsors/{campaignId}` con la clave publicable. Solo
352
+ devuelve campañas públicas de eventos de la organización de la clave.
353
+ - La campaña debe estar publicada y el organizador conectado con Stripe.
354
+ - La web de WODira sirve el modelo `/images/sponsor-studio/*.glb` con CORS, y la API los diseños
355
+ subidos en `/statics/images/`, para que la camiseta se dibuje en otra web.
356
+ - La web que integra el componente debe permitir en su CSP `connect-src https://api.wodira.app
357
+ https://wodira.app`, `img-src data: https:` y abrir ventanas emergentes de `https://wodira.app`.
358
+ - El renderer 3D se comparte con la web de WODira mediante `@wodira/browser/ui/shirt-sponsors/render`.
359
+
360
+ Preview local: `pnpm --filter @wodira/browser preview:ui` y abre
361
+ `http://127.0.0.1:4179/shirt-auction` (añade `?theme=dark` para ver un tema del organizador).
362
+ Usa una campaña ficticia y una ventana de puja simulada, sin pagos. Las pruebas de navegador
363
+ están en `browser-tests/shirt-auction.browser.ts`.
364
+
365
+ ### Disponibilidad y formulario de inscripción
366
+
367
+ El flujo Lit aplica la apertura y el cierre de inscripciones (incluido el cierre predeterminado
368
+ anterior al inicio del evento), la venta por categoría y los cupos. El servidor vuelve a validar
369
+ la disponibilidad al reservar las plazas. Los límites se actualizan automáticamente si la página
370
+ permanece abierta durante el cambio de horario.
371
+
372
+ Comprador e invitados tienen campos y suplementos independientes. Se admiten opciones de
373
+ suplementos y cantidades, todos los tipos de campo configurables, documentos por categoría y
374
+ firma electrónica con representación de menores. Las casillas obligatorias y las opciones
375
+ configuradas se validan también en la API.
376
+
377
+ El idioma por defecto es español; `locale` tiene prioridad sobre el idioma del documento anfitrión.
378
+ Los reintentos de una misma compra conservan su identidad mientras no cambien los datos. No guardes
379
+ ni publiques el secreto de reanudación que acompaña al intento de checkout.
380
+
381
+ Consulta la revisión y su matriz de comprobaciones en
382
+ [`docs/reviews/2026-11-10-lit-registration.md`](../../docs/reviews/2026-11-10-lit-registration.md).
package/dist/index.cjs CHANGED
@@ -39,12 +39,11 @@ var __export = (target, all) => {
39
39
  // src/index.ts
40
40
  var exports_src = {};
41
41
  __export(exports_src, {
42
- createWodiraBrowserClient: () => createWodiraBrowserClient,
42
+ WodiraBrowserApiError: () => WodiraBrowserApiError,
43
43
  WodiraBrowserClient: () => WodiraBrowserClient,
44
- WodiraBrowserApiError: () => WodiraBrowserApiError
44
+ createWodiraBrowserClient: () => createWodiraBrowserClient
45
45
  });
46
46
  module.exports = __toCommonJS(exports_src);
47
-
48
47
  class WodiraBrowserApiError extends Error {
49
48
  status;
50
49
  statusText;
@@ -65,6 +64,7 @@ class WodiraBrowserClient {
65
64
  baseUrl;
66
65
  fetcher;
67
66
  headers;
67
+ checkoutSecrets = new Map;
68
68
  constructor(options) {
69
69
  if (!options.publishableKey?.trim()) {
70
70
  throw new Error("WodiraBrowserClient requires a publishableKey.");
@@ -87,6 +87,11 @@ class WodiraBrowserClient {
87
87
  getEvent(eventId, signal) {
88
88
  return this.request(`/events/${encodeURIComponent(eventId)}`, { signal });
89
89
  }
90
+ getShirtSponsorCampaign(campaignId, signal) {
91
+ return this.request(`/shirt-sponsors/${encodeURIComponent(campaignId)}`, {
92
+ signal
93
+ });
94
+ }
90
95
  getPricingCards(eventId, signal) {
91
96
  return this.request(`/events/${encodeURIComponent(eventId)}/pricing-cards`, { signal });
92
97
  }
@@ -98,9 +103,36 @@ class WodiraBrowserClient {
98
103
  });
99
104
  }
100
105
  createRegistrationCheckoutSession(input, signal) {
106
+ let secret = input.checkoutResumeSecret;
107
+ if (!secret && input.idempotencyKey) {
108
+ secret = this.checkoutSecrets.get(input.idempotencyKey);
109
+ if (!secret) {
110
+ secret = globalThis.crypto.randomUUID();
111
+ if (this.checkoutSecrets.size >= 128)
112
+ this.checkoutSecrets.delete(this.checkoutSecrets.keys().next().value);
113
+ this.checkoutSecrets.set(input.idempotencyKey, secret);
114
+ }
115
+ }
101
116
  return this.request("/checkout/registration/session", {
102
117
  method: "POST",
103
- body: serializeRegistrationInput(input),
118
+ body: serializeRegistrationInput({
119
+ ...input,
120
+ ...secret ? { checkoutResumeSecret: secret } : {}
121
+ }),
122
+ signal
123
+ });
124
+ }
125
+ lookupRegistrationReceipts(eventId, input, signal) {
126
+ return this.request(`/events/${encodeURIComponent(eventId)}/registration-receipts/lookup`, {
127
+ method: "POST",
128
+ body: input,
129
+ signal
130
+ });
131
+ }
132
+ sendRegistrationReceipts(eventId, input, signal) {
133
+ return this.request(`/events/${encodeURIComponent(eventId)}/registration-receipts/send`, {
134
+ method: "POST",
135
+ body: input,
104
136
  signal
105
137
  });
106
138
  }
@@ -145,7 +177,8 @@ async function readResponsePayload(response) {
145
177
  function extractErrorMessage(payload, response) {
146
178
  if (typeof payload === "string")
147
179
  return payload;
148
- const message = payload?.message;
180
+ const outerMessage = payload?.message;
181
+ const message = outerMessage !== null && typeof outerMessage === "object" && "message" in outerMessage ? outerMessage.message : outerMessage;
149
182
  if (typeof message === "string")
150
183
  return message;
151
184
  if (Array.isArray(message))
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { WodiraAthleteInput, WodiraCustomFieldInput, WodiraEvent, WodiraPaginatedResponse, WodiraPricingCardsResponse, WodiraSearchEventsInput } from './types';
2
- export type * from './types';
1
+ import type { WodiraAthleteInput, WodiraCustomFieldInput, WodiraEvent, WodiraGender, WodiraPaginatedResponse, WodiraPricingCardsResponse, WodiraRegistrationReceiptLookup, WodiraRegistrationReceiptSendResult, WodiraSearchEventsInput, WodiraSupplementSelection } from './types.js';
2
+ export type * from './types.js';
3
3
  export interface WodiraBrowserApiErrorPayload {
4
4
  message?: unknown;
5
5
  error?: unknown;
@@ -27,18 +27,37 @@ export interface WodiraBrowserClientOptions {
27
27
  export interface WodiraGuestRegistrationSummaryInput {
28
28
  categoryId: string;
29
29
  selectedSupplementIds?: string[];
30
+ supplementSelections?: WodiraSupplementSelection[];
30
31
  }
31
32
  export interface WodiraRegistrationSummaryInput {
32
33
  categoryId: string;
33
34
  purchaserEmail: string;
34
35
  promocode?: string;
35
36
  selectedSupplementIds?: string[];
37
+ supplementSelections?: WodiraSupplementSelection[];
36
38
  guestRegistrations?: WodiraGuestRegistrationSummaryInput[];
37
39
  }
38
40
  export interface WodiraBrowserAthleteInput extends WodiraAthleteInput {
39
41
  phone: string;
40
42
  idNumber: string;
41
43
  }
44
+ export interface WodiraLegalSignatureInput {
45
+ signerName: string;
46
+ signerIdNumber: string;
47
+ authorityAccepted: true;
48
+ minorRelationship?: string;
49
+ guardianAuthorityAccepted?: true;
50
+ locale: 'es' | 'en' | 'pt';
51
+ waiverVersions: Array<{
52
+ waiverId: string;
53
+ version: number;
54
+ }>;
55
+ strokes: Array<Array<{
56
+ x: number;
57
+ y: number;
58
+ t: number;
59
+ }>>;
60
+ }
42
61
  export interface WodiraGuestRegistrationInput {
43
62
  guestEmail: string;
44
63
  guestName: string;
@@ -49,6 +68,7 @@ export interface WodiraGuestRegistrationInput {
49
68
  customFields?: WodiraCustomFieldInput[];
50
69
  waiversAccepted?: Record<string, boolean>;
51
70
  selectedSupplementIds?: string[];
71
+ supplementSelections?: WodiraSupplementSelection[];
52
72
  }
53
73
  export interface WodiraRegistrationCheckoutSessionInput extends WodiraRegistrationSummaryInput {
54
74
  eventId: string;
@@ -56,14 +76,25 @@ export interface WodiraRegistrationCheckoutSessionInput extends WodiraRegistrati
56
76
  club?: string;
57
77
  purchaserName: string;
58
78
  athletes: WodiraBrowserAthleteInput[];
79
+ deferredTeamCompletion?: WodiraDeferredTeamCompletionInput;
59
80
  guestRegistrations?: WodiraGuestRegistrationInput[];
60
81
  customFields?: WodiraCustomFieldInput[];
61
82
  termsAccepted: boolean;
62
83
  waiversAccepted?: Record<string, boolean>;
84
+ legalSignature?: WodiraLegalSignatureInput;
63
85
  idempotencyKey?: string;
86
+ checkoutResumeSecret?: string;
64
87
  successUrl: string;
65
88
  cancelUrl: string;
66
89
  }
90
+ export interface WodiraDeferredTeamCompletionInput {
91
+ pendingParticipantCount: number;
92
+ pendingParticipantPositions?: number[];
93
+ slotGenders?: WodiraGender[];
94
+ participantWaivers: Array<{
95
+ waiversAccepted: Record<string, boolean>;
96
+ }>;
97
+ }
67
98
  export interface WodiraAppliedCoupon {
68
99
  code: string;
69
100
  discount: number;
@@ -83,6 +114,7 @@ export interface WodiraRegistrationSummary {
83
114
  applicationFee: number;
84
115
  applicationFeePercentage: number;
85
116
  processingFee: number;
117
+ checkoutFeePayer: 'BUYER' | 'ORGANIZER';
86
118
  total: number;
87
119
  organizerReceives: number;
88
120
  currency: string;
@@ -94,24 +126,100 @@ export interface WodiraRegistrationSummary {
94
126
  supplementsTotal: number;
95
127
  subtotal: number;
96
128
  }>;
129
+ teamCompletion?: WodiraTeamCompletionDecision;
130
+ }
131
+ export interface WodiraTeamCompletionDecision {
132
+ available: boolean;
133
+ deadlineAt?: string;
134
+ unavailableReason?: 'INDIVIDUAL_CATEGORY' | 'SIGNATURE_REQUIRED' | 'DEADLINE_PASSED';
97
135
  }
98
136
  export interface WodiraRegistrationCheckoutSession {
99
137
  sessionId: string | null;
100
138
  sessionUrl: string | null;
101
139
  orderId: string;
102
140
  completed: boolean;
141
+ receiptToken: string;
142
+ participantDataStatus?: 'READY' | 'PENDING_PARTICIPANTS';
143
+ pendingParticipantCount?: number;
144
+ teamManageToken?: string;
145
+ }
146
+ export interface WodiraRegistrationReceiptRequestInput {
147
+ email: string;
148
+ }
149
+ export type WodiraShirtSlotSide = 'front' | 'back' | 'left-sleeve' | 'right-sleeve';
150
+ /** A sponsorship space on the event shirt. Amounts are in euro cents. */
151
+ export interface WodiraShirtSlot {
152
+ id: string;
153
+ name: string;
154
+ side: WodiraShirtSlotSide;
155
+ /** Position and size on the shirt face, in percent. */
156
+ x: number;
157
+ y: number;
158
+ width: number;
159
+ height: number;
160
+ printWidthCm: number;
161
+ printHeightCm: number;
162
+ startingPriceCents: number;
163
+ incrementCents: number;
164
+ /** Lowest amount that wins the slot now: the starting price, or the leader plus one increment. */
165
+ minimumBidCents: number;
166
+ bidCount: number;
167
+ leadingBrandName: string | null;
168
+ leadingAmountCents: number | null;
169
+ leadingArtworkUrl: string | null;
170
+ /** Kept by the organizer; not open to bids. */
171
+ isReserved?: boolean;
172
+ reservedArtworkUrl?: string | null;
173
+ }
174
+ export interface WodiraShirtDesignLayer {
175
+ url: string;
176
+ name: string;
177
+ scale: number;
178
+ x: number;
179
+ y: number;
180
+ photo?: boolean;
181
+ fabricColor?: string;
182
+ }
183
+ export interface WodiraShirtCampaign {
184
+ id: string;
185
+ eventId: string;
186
+ eventSlug: string;
187
+ eventName: string;
188
+ eventType: string;
189
+ eventStartDate: string;
190
+ eventBanner: string | null;
191
+ city: string;
192
+ province: string;
193
+ shirtCount: number;
194
+ closesAt: string;
195
+ availableSlots: number;
196
+ startingPriceCents: number;
197
+ status: 'DRAFT' | 'PUBLISHED' | 'CLOSED' | 'CANCELLED';
198
+ shirtColor: string;
199
+ shirtDesign?: {
200
+ version: 1;
201
+ front?: WodiraShirtDesignLayer;
202
+ back?: WodiraShirtDesignLayer;
203
+ previewUrl: string;
204
+ } | null;
205
+ slots: WodiraShirtSlot[];
103
206
  }
104
207
  export declare class WodiraBrowserClient {
105
208
  private readonly publishableKey;
106
209
  private readonly baseUrl;
107
210
  private readonly fetcher;
108
211
  private readonly headers;
212
+ private readonly checkoutSecrets;
109
213
  constructor(options: WodiraBrowserClientOptions);
110
214
  searchEvents(input?: Omit<WodiraSearchEventsInput, 'status'>, signal?: AbortSignal): Promise<WodiraPaginatedResponse<WodiraEvent>>;
111
215
  getEvent(eventId: string, signal?: AbortSignal): Promise<WodiraEvent>;
216
+ /** Public shirt sponsorship campaign of an event that belongs to the key's organization. */
217
+ getShirtSponsorCampaign(campaignId: string, signal?: AbortSignal): Promise<WodiraShirtCampaign>;
112
218
  getPricingCards(eventId: string, signal?: AbortSignal): Promise<WodiraPricingCardsResponse>;
113
219
  getRegistrationSummary(input: WodiraRegistrationSummaryInput, signal?: AbortSignal): Promise<WodiraRegistrationSummary>;
114
220
  createRegistrationCheckoutSession(input: WodiraRegistrationCheckoutSessionInput, signal?: AbortSignal): Promise<WodiraRegistrationCheckoutSession>;
221
+ lookupRegistrationReceipts(eventId: string, input: WodiraRegistrationReceiptRequestInput, signal?: AbortSignal): Promise<WodiraRegistrationReceiptLookup>;
222
+ sendRegistrationReceipts(eventId: string, input: WodiraRegistrationReceiptRequestInput, signal?: AbortSignal): Promise<WodiraRegistrationReceiptSendResult>;
115
223
  private request;
116
224
  }
117
225
  export declare function createWodiraBrowserClient(options: WodiraBrowserClientOptions): WodiraBrowserClient;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,SAAS,CAAC;AACjB,mBAAmB,SAAS,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