@slidevideo/cli 0.3.2 → 0.9.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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: slidevideo
3
- description: Draft, explain, review, and revise slidevideo.yaml storyboards for Slidev or PowerPoint presentations, create or adapt SlideVideo-compatible slides when requested, and operate the SlideVideo CLI to produce narrated videos. Use for narration, reveals, phrase cues, marker highlights, underlines, spotlights, zoom and pan, laser pointers, stamps and badges, image overlays, pauses, media, voice settings, deck compatibility, and production feedback.
3
+ description: Draft, explain, review, and revise slidevideo.yaml storyboards for Slidev or PowerPoint presentations, create or adapt SlideVideo-compatible slides when requested, and operate the SlideVideo CLI to produce narrated videos. Use for narration, reveals, phrase cues, marker highlights, underlines, spotlights, zoom and pan, laser pointers, stamps and badges, arrows, image overlays, pauses, media, voice settings, deck compatibility, and production feedback.
4
4
  ---
5
5
 
6
6
  # Author and produce a SlideVideo
@@ -37,7 +37,7 @@ Use stable IDs and paths relative to the storyboard. Include all required root f
37
37
 
38
38
  For marker highlights, underlines, spotlights, and zoom/pan, run `slidevideo inspect --deck <file> --json` or `slidevideo inspect --storyboard <file> --json` to discover existing audience-slide selectors, native shape IDs, and shape text previews. Inspect the deck and returned visibility/click information before choosing a target. Use `target: { type: text, text, container?, occurrence? }` to target visible slide phrases or words directly without wrapping Slidev copy in `<span>` tags. Regions need no element metadata. Never reference a nonexistent element ID in `slidevideo.yaml`, infer words inside an image, or claim whole-shape bounds establish word geometry. When a Slidev slide lacks a stable selector for a whole-card highlight and normalized regions are a poor fit, add a targeted `id` attribute only when slide creation or editing is part of the request or approved by the creator.
39
39
 
40
- Use the `annotations` array for `highlight`, `underline`, `spotlight`, `zoom`, `laser`, and `stamp` effects. The [marker reference](references/storyboard.md#marker-highlights), [underline reference](references/storyboard.md#underline-annotations), [spotlight reference](references/storyboard.md#spotlight-annotations), [zoom reference](references/storyboard.md#zoom-and-pan), [laser pointer reference](references/storyboard.md#laser-pointer), and [stamp and badge reference](references/storyboard.md#stamp-and-badge-annotations) cover Slidev and PowerPoint. Bind each annotation to a scene using either `at` (a phrase cue or an explicit scene-relative millisecond offset) with an explicit positive `duration_ms` or `follow` against retained speech alignment (`mode: words` for word-by-word read-along on `type: text` targets, or `mode: phrase` for exact spoken-span lifetimes), keeping every resolved interval inside one settled slide visit and reveal state. Choose visible `text` targets, normalized regions, normalized points (for `stamp`), Slidev element selectors, native PowerPoint shape IDs, or slide-relative `path` waypoints (for `laser`) as appropriate. Keep highlight padding and optional `bottom_border` under `highlight`, use `underline` for standalone solid or dashed strokes with normalized `width`, optional `offset` and `padding_x`, and optional `motion: { type: wipe }`, use `spotlight` to dim the surrounding slide while keeping `rounded-rect` or `ellipse` apertures bright (with optional `padding`, `radius`, `softness`, and `motion: { type: fade }`), use `zoom` to smoothly pan and magnify a target (with optional `fit`, `scale`, `max_scale`, `padding`, and `motion: { type: ease }`) while keeping attached annotations locked to slide content and `overlays`/watermarks frame-fixed, use `laser` to move a glowing pointer with optional dwell and decaying trail along normalized or target-anchored waypoints without clicking or mutating the deck, and use `stamp` to place reproducible bundled-font text and/or vector symbols (`check`, `cross`, `warning`, `star`, `info`, `arrow-right`) with optional background, border, rotation, multiline wrapping, and `fade` or `pop` motion. Moving targets, overlapping `zoom` intervals, and unimplemented effects are unsupported.
40
+ Use the `annotations` array for `highlight`, `underline`, `spotlight`, `zoom`, `laser`, `stamp`, and `arrow` effects. The [marker reference](references/storyboard.md#marker-highlights), [underline reference](references/storyboard.md#underline-annotations), [spotlight reference](references/storyboard.md#spotlight-annotations), [zoom reference](references/storyboard.md#zoom-and-pan), [laser pointer reference](references/storyboard.md#laser-pointer), [stamp and badge reference](references/storyboard.md#stamp-and-badge-annotations), and [arrow reference](references/storyboard.md#arrow-annotations) cover Slidev and PowerPoint. Bind each annotation to a scene using either `at` (a phrase cue or an explicit scene-relative millisecond offset) with an explicit positive `duration_ms` or `follow` against retained speech alignment (`mode: words` for word-by-word read-along on `type: text` targets, or `mode: phrase` for exact spoken-span lifetimes), keeping every resolved interval inside one settled slide visit and reveal state. Choose visible `text` targets, normalized regions, normalized points (for `stamp`), Slidev element selectors, native PowerPoint shape IDs, slide-relative `path` waypoints (for `laser`), or slide-relative `connector` endpoints (`from`/`to` with explicit `anchor` on target attachments for `arrow`) as appropriate. Keep highlight padding and optional `bottom_border` under `highlight`, use `underline` for standalone solid or dashed strokes with normalized `width`, optional `offset` and `padding_x`, and optional `motion: { type: wipe }`, use `spotlight` to dim the surrounding slide while keeping `rounded-rect` or `ellipse` apertures bright (with optional `padding`, `radius`, `softness`, and `motion: { type: fade }`), use `zoom` to smoothly pan and magnify a target (with optional `fit`, `scale`, `max_scale`, `padding`, and `motion: { type: ease }`) while keeping attached annotations locked to slide content and `overlays`/watermarks frame-fixed, use `laser` to move a glowing pointer with optional dwell and decaying trail along normalized or target-anchored waypoints without clicking or mutating the deck, use `stamp` to place reproducible bundled-font text and/or vector symbols (`check`, `cross`, `warning`, `star`, `info`, `arrow-right`) with optional background, border, rotation, multiline wrapping, and `fade` or `pop` motion, and use `arrow` to draw straight solid or dashed arrows with `filled` or `open` arrowheads, endpoint padding, and optional `fade` or `draw` motion. Moving targets, overlapping `zoom` intervals, curved arrows, and unimplemented effects are unsupported.
41
41
 
42
42
  Add, change or remove only the requested annotation and preserve unrelated annotations, narration, scene actions, media, IDs and settings. A new video after an annotation-only edit needs a new run and can reuse matching speech. Validate the draft through the real CLI. Required phrase alignment and actual target geometry are checked during resolution and capture. Highlights are composited into the final MP4, so ordinary deck playback and the raw recording remain unannotated.
43
43
 
@@ -533,7 +533,63 @@ Stamp `appearance` requires at least one of `text` or `symbol` and accepts these
533
533
  - Optional `rotation_deg` rotates the stamp in degrees (`[-180, 180]`, default `0`).
534
534
  - Optional `max_width` (`(0, 1]` normalized slide width) enables word wrapping; optional `align` (`left`, `center` default, `right`) aligns multiline text; optional `overflow` selects `error` (default, fails with `STAMP_OVERFLOW` if an unbreakable word exceeds `max_width` or the rotated box extends outside slide bounds) or `clip`.
535
535
 
536
- Optional `motion` accepts `{ type: fade, in_ms?, out_ms? }` or `{ type: pop, in_ms?, out_ms?, start_scale? }` (`start_scale` in `[0.2, 2.5]`, default `1.35`). `in_ms + out_ms` must fit within the resolved duration (`ANNOTATION_MOTION`). Active stamps clip to the slide-content rectangle, render above `spotlight`, `highlight`, and `underline` annotations (and beneath `laser` pointers), follow any active `zoom` view transform, and stay beneath frame-fixed `overlays` and the watermark. With `--verify-timing`, the analyzer checks stamp appearance and clearance at interval boundaries.
536
+ Optional `motion` accepts `{ type: fade, in_ms?, out_ms? }` or `{ type: pop, in_ms?, out_ms?, start_scale? }` (`start_scale` in `[0.2, 2.5]`, default `1.35`). `in_ms + out_ms` must fit within the resolved duration (`ANNOTATION_MOTION`). Active stamps clip to the slide-content rectangle, render above `spotlight`, `highlight`, `underline`, and `arrow` annotations (and beneath `laser` pointers), follow any active `zoom` view transform, and stay beneath frame-fixed `overlays` and the watermark. With `--verify-timing`, the analyzer checks stamp appearance and clearance at interval boundaries.
537
+
538
+ ## Arrow annotations
539
+
540
+ Use `effect: arrow` in `annotations` to point to a target or connect two declared endpoints with a straight arrow (with phrase-aligned `at` + `duration_ms`, explicit scene-relative numeric `at` + `duration_ms`, or `follow` with `mode: phrase`). Curved or routed arrows are not supported in this first delivery.
541
+
542
+ ```yaml
543
+ annotations:
544
+ - id: point-to-metric
545
+ scene: opening
546
+ target:
547
+ type: connector
548
+ units: normalized
549
+ from:
550
+ x: 0.22
551
+ y: 0.35
552
+ to:
553
+ target:
554
+ type: element
555
+ selector: '#key-metric'
556
+ anchor: left
557
+ padding: 0.015
558
+ effect: arrow
559
+ appearance:
560
+ color: '#ff2d2d'
561
+ opacity: 0.95
562
+ width: 0.006
563
+ style: solid
564
+ head: filled
565
+ head_size: 0.024
566
+ motion:
567
+ type: draw
568
+ in_ms: 250
569
+ out_ms: 200
570
+ follow:
571
+ segment: introduction
572
+ phrase: key metric
573
+ mode: phrase
574
+ ```
575
+
576
+ `target` uses `{ type: connector, units: normalized, from, to }`. Each endpoint (`from` and `to`) is either:
577
+
578
+ - Normalized slide coordinates `{ x, y, padding? }` with `x` and `y` in `[0, 1]`.
579
+ - Target-attached `{ target, anchor, padding? }` where `target` is any `region`, Slidev `element`, PowerPoint `shape`, or `text` target, and `anchor` is **required** (`center`, `top-left`, `top`, `top-right`, `left`, `right`, `bottom-left`, `bottom`, or `bottom-right` on the target's bounding box; attachment points are never chosen silently).
580
+
581
+ Optional `padding` on either endpoint (`[0, 0.25]` in normalized slide-height units, default `0`) trims the start forward along the arrow direction (`from.padding`) or trims the tip back from the target (`to.padding`). Coincident endpoints or padding that collapses the arrow to zero length fail explicitly with `ANNOTATION_GEOMETRY`.
582
+
583
+ Optional arrow `appearance` accepts these fields:
584
+
585
+ - Optional `color` is `#RRGGBB` and defaults to `'#ff2d2d'`.
586
+ - Optional `opacity` is greater than zero and at most one (default `0.95`).
587
+ - Optional `width` is the stroke width in normalized slide-height units (`(0, 0.05]`, default `0.006`).
588
+ - Optional `style` accepts `solid` (default) or `dashed`.
589
+ - Optional `head` accepts `filled` (default, solid triangle) or `open` (chevron).
590
+ - Optional `head_size` is the arrowhead length in normalized slide-height units (`(0, 0.15]`, default `0.024`).
591
+
592
+ Optional `motion` accepts `{ type: fade, in_ms?, out_ms? }` or `{ type: draw, in_ms?, out_ms? }` (draws progressively from `from` to `to` during `in_ms` and fades out during `out_ms`). `in_ms + out_ms` must fit within the resolved duration (`ANNOTATION_MOTION`). Active arrows clip to the slide-content rectangle, render above `spotlight`, `highlight`, and `underline` annotations (and beneath `stamp` and `laser` annotations), follow any active `zoom` view transform, and stay beneath frame-fixed `overlays` and the watermark. With `--verify-timing`, the analyzer checks arrow appearance and clearance at interval boundaries and interior `draw_in` progression when `motion.type: draw` is used.
537
593
 
538
594
  ## Image overlays
539
595