libreria-astro-lefebvre 0.1.131 → 0.1.133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libreria-astro-lefebvre",
3
- "version": "0.1.131",
3
+ "version": "0.1.133",
4
4
  "description": "Librería de componentes Astro, React y Vue para Lefebvre",
5
5
  "author": "Equipo web desarrollo Lefebvre",
6
6
  "type": "module",
@@ -21,6 +21,7 @@ export const metadata: ComponentMetadata = {
21
21
  { name: 'name', type: 'text', help: 'Texto del botón tipo pestaña (aparece en la barra superior). Se muestra también en móvil como icono con texto oculto salvo al hacer hover/active', label: 'Nombre o tag de la pestaña', example_value: 'Redacción' },
22
22
  { name: 'title', type: 'text', help: 'Título del vídeo (h3) que aparece sobre la descripción dentro del panel', label: 'Título del vídeo', example_value: 'Redacción automática de contratos' },
23
23
  { name: 'description', type: 'textArea', help: 'Descripción del vídeo que aparece debajo del título. Admite HTML', label: 'Descripción', example_value: 'Genera borradores de contratos en segundos a partir de plantillas personalizables' },
24
+ { name: 'video', type: 'video', help: 'Vídeo elegido desde Limbo. Se usa solo si "URL del archivo de vídeo (MP4)" está vacío; si ambos tienen valor, prevalece la URL MP4', label: 'Vídeo', example_value: '' },
24
25
  { name: 'iframeSrc', type: 'text', help: 'URL del archivo de vídeo MP4 directo (NO es un iframe de Vimeo/YouTube, a pesar del nombre del campo). Se usa como src de una etiqueta <video><source src="..." type="video/mp4">. Ejemplos válidos: .mp4, .webm alojados en CDN', label: 'URL del archivo de vídeo (MP4)', example_value: 'https://assets.lefebvre.es/media/videos/genial/redaccion-demo.mp4' },
25
26
  { name: 'thumbnailUrl', type: 'text', help: 'URL de la miniatura del vídeo usada en el structured data SEO (VideoObject)', label: 'URL de la miniatura (SEO)', example_value: 'https://assets.lefebvre.es/media/img/preview-comp/comp-16-9.png' },
26
27
  { name: 'imageSrc', type: 'text', help: 'URL alternativa de miniatura (fallback de "URL de la miniatura" en el structured data SEO). Si "URL de la miniatura" tiene valor, este campo se ignora', label: 'URL alternativa de miniatura (fallback SEO)', example_value: '' },
@@ -8,6 +8,7 @@ interface VideoItem {
8
8
  thumbnailUrl?: string;
9
9
  imageSrc?: string;
10
10
  iframeSrc?: string;
11
+ video?: string;
11
12
  limboVideo?: string;
12
13
  duration?: string;
13
14
  uploadDate?: string;
@@ -24,7 +25,7 @@ const { pageId = PAGE_ENTITY_ID, itemListId = '' } = Astro.props;
24
25
  const idAccordion = 'js-acordeon-' + Math.random().toString(36).substring(2, 15);
25
26
 
26
27
  // limboVideo ya no está en el carbin: solo se lee como respaldo para contenido guardado con la 0.1.126/0.1.127
27
- const getVideoUrl = (item: VideoItem) => item.iframeSrc || extractImageUrl(item.limboVideo || '', { prefer: 'original' });
28
+ const getVideoUrl = (item: VideoItem) => item.iframeSrc || extractImageUrl(item.video || item.limboVideo || '', { prefer: 'original' });
28
29
 
29
30
  const escapeJson =(s = "") => String(s).replace(/<[^>]*>/g, '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/</g, '\\u003c').replace(/>/g, '\\u003e').replace(/[\n\r\t]+/g, ' ');
30
31