feat(web-video-presentation): optional slides.ts + slide-data.json export - #29
Open
dy2651 wants to merge 1 commit into
Open
feat(web-video-presentation): optional slides.ts + slide-data.json export#29dy2651 wants to merge 1 commit into
dy2651 wants to merge 1 commit into
Conversation
…n export - Add SlideStepType/SlideStepMeta to registry types (14 types + custom) - Add per-chapter optional slides.ts (length locked to narrations.ts) - Add export-slide-data.ts: merges chapters+slides+narrations -> slide-data.json - Add slide-config.ts for top-level title/subtitle - scaffold.sh copies new templates + adds export-slide-data npm script - Auto-infers coarse step type when a chapter omits slides.ts (no breakage) - Docs: SKILL.md + CHAPTER-CRAFT.md cover the slides.ts convention
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an optional slides.ts data layer to the
web-video-presentationskill and a slide-data.json export, so presentations can be consumed/edited by a generic web viewer/editor (not just the React recording project).What changed
templates/src/registry/types.ts: newSlideStepType(14 named types +custom),SlideStepMeta(loosestring | string[]field bag),ChapterSlidesSegment,SlideDataExport;ChapterDef.slides?optional field with length-lock docs.templates/src/chapters/01-example/slides.ts(new): example slides declaration (hero/fact/highlight) matching the existing example narrations.templates/scripts/export-slide-data.ts(new): reads each chapter'snarrations.ts(required) + optionalslides.ts, merges them into a singleslide-data.jsonat project root. Drift guard: ifslides.length !== narrations.lengthit throws.templates/src/registry/slide-config.ts(new): top-level{ title, subtitle }source.templates/src/registry/chapters.ts: wire example chapter'sslides+ doc comments.scripts/scaffold.sh: copy the new templates, addexport-slide-datanpm script, mention in completion notes.SKILL.md/references/CHAPTER-CRAFT.md: document the slides.ts convention (length-lock, supported types, optional fallback).Why optional / backward compatible
Chapters without
slides.tsstill export fine — the script auto-infers a coarse step type per narration (empty→transition, index 0→hero, numbers→study, question marks→question, short→highlight, else fact). So existing projects don't break; the real visual structure is only editable in a web editor whenslides.tsis present.Usage
Verified end-to-end: scaffold → add slides.ts → export → 3-step demo produces valid
slide-data.json; missing-slides chapter auto-infers; length mismatch (4 vs 3) throws the drift-guard error.