Sistema de plantillas

Las plantillas se expanden en clips normales en runtime. No deben tratarse como contenedores padre que transmiten automáticamente estilo o animación a sus hijos generados.

1. Plantillas registradas

Compatibles actualmente:

  • product-intro
  • slideshow
  • subtitle-video
  • talking-head
  • comparison
  • countdown
  • text-reveal
  • news
  • quote
  • list

2. Límites compartidos

Estos campos en el propio clip de plantilla no están documentados como heredados por los clips hijos generados:

  • transform
  • style
  • animations
  • keyframes
  • transition

El control específico de la plantilla debe pasarse mediante data.

3. product-intro

Campos efectivos:

  • name
  • tagline
  • features
  • price
  • image
  • cta

Comportamiento:

  • Imagen opcional del producto a la izquierda
  • Título del producto y texto de apoyo a la derecha
  • Lista opcional de características
  • Precio opcional
  • Texto de CTA opcional

Ejemplo:

{
  "type": "template",
  "template": "product-intro",
  "start": 0,
  "duration": 8,
  "data": {
    "name": "Smart Watch Pro",
    "tagline": "Built for modern teams",
    "features": ["AMOLED display", "7-day battery", "Health tracking"],
    "price": "$299",
    "image": "https://example.com/watch.png",
    "cta": "Order Now"
  }
}

4. slideshow

Campos efectivos:

  • images
  • durationPerSlide
  • showCaptions

Comportamiento:

  • Cada imagen se expande en un clip image
  • Las diapositivas usan el comportamiento actual de transición integrada
  • Se genera texto de subtítulo cuando una diapositiva incluye caption y showCaptions !== false

Ejemplo:

{
  "type": "template",
  "template": "slideshow",
  "start": 0,
  "duration": 9,
  "data": {
    "images": [
      { "image": "https://example.com/slide-1.jpg", "caption": "Welcome" },
      { "image": "https://example.com/slide-2.jpg", "caption": "New Features" },
      { "image": "https://example.com/slide-3.jpg", "caption": "Get Started" }
    ],
    "durationPerSlide": 3,
    "showCaptions": true
  }
}

5. subtitle-video

Campos efectivos:

  • src
  • words
  • config
  • source
  • volume
  • muted
  • playbackRate

Comportamiento:

  • Genera un video a pantalla completa
  • Genera un subtitle

Ejemplo:

{
  "type": "template",
  "template": "subtitle-video",
  "start": 0,
  "duration": 8,
  "data": {
    "src": { "$ref": "host-video" },
    "words": { "$ref": "subtitle-main" },
    "muted": false,
    "volume": 1,
    "config": {
      "position": "bottom",
      "fontSize": 58,
      "highlightColor": "#22d3ee"
    }
  }
}

6. talking-head

Campos efectivos:

  • src
  • words
  • config
  • source
  • volume
  • muted
  • playbackRate
  • speaker
  • role
  • title
  • showLowerThird

Comportamiento:

  • Genera un video principal a pantalla completa
  • Título superior opcional
  • Bloque lower-third opcional
  • Pista de subtítulos opcional

Ejemplo:

{
  "type": "template",
  "template": "talking-head",
  "start": 0,
  "duration": 8,
  "data": {
    "src": { "$ref": "host-video" },
    "words": { "$ref": "subtitle-main" },
    "title": "Weekly Update",
    "speaker": "Alex Chen",
    "role": "Founder",
    "showLowerThird": true,
    "config": {
      "position": "bottom",
      "fontSize": 60,
      "highlightColor": "#22d3ee"
    }
  }
}

7. comparison

Campos efectivos:

  • left.title
  • left.items
  • left.image
  • right.title
  • right.items
  • right.image
  • vsText

Comportamiento:

  • Genera bloques de comparación a izquierda y derecha
  • Imágenes y listas opcionales para ambos lados
  • Genera el divisor central y el texto VS

Ejemplo:

{
  "type": "template",
  "template": "comparison",
  "start": 0,
  "duration": 7,
  "data": {
    "left": {
      "title": "Before",
      "items": ["Manual workflow", "Slow review", "Higher cost"],
      "image": "https://example.com/before.png"
    },
    "right": {
      "title": "After",
      "items": ["Automated workflow", "Fast review", "Lower cost"],
      "image": "https://example.com/after.png"
    },
    "vsText": "VS"
  }
}

8. countdown

Campos efectivos:

  • from
  • to
  • showText
  • onComplete

Comportamiento:

  • Renderiza una secuencia de cuenta atrás
  • Puede mostrar texto de apoyo cerca del final
  • Puede mostrar un mensaje de finalización

Ejemplo:

{
  "type": "template",
  "template": "countdown",
  "start": 0,
  "duration": 6,
  "data": {
    "from": 5,
    "to": 0,
    "showText": true,
    "onComplete": "Launch"
  }
}

9. text-reveal

Campos efectivos:

  • text
  • style
  • fontSize
  • color
  • textAlign
  • position

Valores de estilo documentados:

  • fade
  • slide
  • zoom

Comportamiento:

  • Genera uno o más clips de texto para una revelación escalonada
  • Usa el estilo de revelado seleccionado donde esté implementado actualmente

Ejemplo:

{
  "type": "template",
  "template": "text-reveal",
  "start": 0,
  "duration": 5,
  "data": {
    "text": "Ship faster with AI video",
    "style": "slide",
    "fontSize": 72,
    "color": "#ffffff",
    "textAlign": "center",
    "position": "center"
  }
}

10. news

Campos efectivos:

  • headline
  • content
  • reporter
  • location
  • showLowerThird

Comportamiento:

  • Titular principal
  • Bloque de contenido opcional
  • Bloque de información lower-third opcional

Ejemplo:

{
  "type": "template",
  "template": "news",
  "start": 0,
  "duration": 8,
  "data": {
    "headline": "Quarterly results exceed expectations",
    "content": "Revenue grew 38% year over year, driven by strong subscription growth.",
    "reporter": "Maya Lin",
    "location": "San Francisco",
    "showLowerThird": true
  }
}

11. quote

Campos efectivos:

  • quote
  • author
  • source

Comportamiento:

  • Renderiza el texto de la cita
  • Línea opcional de autor y fuente

Ejemplo:

{
  "type": "template",
  "template": "quote",
  "start": 0,
  "duration": 6,
  "data": {
    "quote": "Simplicity scales better than complexity.",
    "author": "Alex Chen",
    "source": "Team Memo"
  }
}

12. list

Campos efectivos:

  • title
  • items
  • style
  • itemDuration
  • animation

Comportamiento:

  • Genera un título cuando se proporciona
  • Genera elementos de lista en secuencia
  • Admite estilo de marcador y animación de elementos
  • itemDuration: "auto" distribuye automáticamente el tiempo total

Ejemplo:

{
  "type": "template",
  "template": "list",
  "start": 0,
  "duration": 8,
  "data": {
    "title": "Release Checklist",
    "items": ["Finalize copy", "Export assets", "Publish update"],
    "style": "checkmark",
    "itemDuration": "auto",
    "animation": "fadeIn"
  }
}