Skip to content

Add PresentationDocument and export presentation subcommand (#38, #39) - #45

Open
leogdion wants to merge 3 commits into
v0.1.xfrom
issue/38-presentation
Open

Add PresentationDocument and export presentation subcommand (#38, #39)#45
leogdion wants to merge 3 commits into
v0.1.xfrom
issue/38-presentation

Conversation

@leogdion

@leogdion leogdion commented Aug 3, 2026

Copy link
Copy Markdown
Member

Closes #38. Closes #39.

Rebuilt on v0.1.x now that #42, #43, and #44 have landed. This branch previously merged all three so it could build; the diff is now just the presentation work — 9 files, one commit.

What this adds

The demo deck: seven solid-color slides with styled titles anchored on lane 1, separated by one-second cross dissolves. No .mov files and no ffmpeg — anyone who clones the repo can regenerate the .fcpxml with one command. FCPKit demonstrating itself.

PresentationDocument and PresentationSlide ship in FCPKitDSL so the showcase is browsable and testable; the CLI holds only a thin command that invokes them, per the RGBDocument lesson.

PresentationSequence assembles story items from an array, because a deck's length is data-driven rather than fixed-arity like the result builder's buildBlock.

Dissolve-safe title timing

Anchored items are not swept into a primary-storyline transition, so a title spanning a dissolve would hard-cut while its background dissolved. Packing sets a dissolved clip's start to T/2 and shrinks its duration by both overlaps, and an anchor's offset is relative to that trimmed start — so a title at offset zero already begins where the incoming dissolve ends, and only the tail needs trimming:

titleDuration = slideDuration - (incomingT / 2) - (outgoingT / 2)

Asserted directly rather than assumed.

Cleanup

Deletes the duplicated library copy of RGBDocument. Demo scaffolding belongs only in the CLI, and FCPTimeIntervalTests already used its own local fixture, so nothing broke.

Verified end to end against Apple's shipped DTDs

$ swift run fcpxml-dsl export presentation presentation.fcpxml
$ xmllint --noout --dtdvalid FCPXMLv1_14.dtd presentation.fcpxml   # ✅ valid
$ xmllint --noout --dtdvalid FCPXMLv1_13.dtd pres113.fcpxml        # ✅ valid

Gate

  • FCPKIT_REQUIRE_DTD=1 swift test — 68 XCTest + 49/12/65 Swift Testing, all passing
  • fcpxml-diff schema-completeness --fail-if-total-exceeds 0 — no structural loss
  • swift-format lint and swiftlint — 0 violations across 282 files
  • swift run fcpxml-dsl --help lists presentation in USAGE and EXAMPLES
  • Neither rgb.fcpxml nor presentation.fcpxml appears in git status after an export run

Remaining

#40 is human-only — it needs Final Cut Pro for the Share → Master File export and the README embed.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 942d30c6-db85-43c8-a1f6-d3598bedc121

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…39)

Closes #38. Closes #39.

The demo deck: seven solid-color slides with styled titles anchored on lane 1,
separated by one-second cross dissolves. No .mov files and no ffmpeg, so anyone
who clones the repo can regenerate the .fcpxml with one command — FCPKit
demonstrating itself.

`PresentationDocument` and `PresentationSlide` ship in FCPKitDSL so the showcase
is browsable and testable; the CLI holds only a thin command that invokes them.
`PresentationSequence` assembles the story items from an array, because a deck's
length is data-driven rather than fixed-arity like the result builder's
`buildBlock`.

Dissolve-safe title timing: anchored items are not swept into a primary-storyline
transition, so a title spanning a dissolve would hard-cut while its background
dissolved. Packing sets a dissolved clip's `start` to T/2 and shrinks its
duration by both overlaps, and an anchor's offset is relative to that trimmed
start — so a title at offset zero already begins where the incoming dissolve
ends, and only the tail needs trimming.

Deletes the duplicated library copy of `RGBDocument`; demo scaffolding belongs
only in the CLI, and `FCPTimeIntervalTests` already used its own local fixture.

Rebuilt on v0.1.x after #42, #43, and #44 landed, so this branch now carries
only the presentation work rather than the three tracks it was stacked on.

Verified end to end against Apple's shipped DTDs: the deck packs to 36s, emits
ts1..ts7, validates at both 1.13 and 1.14, and is byte-identical to the export
produced before the tracks were squashed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@leogdion
leogdion force-pushed the issue/38-presentation branch from aea171f to 0154aeb Compare August 3, 2026 21:15
leogdion and others added 2 commits August 5, 2026 14:14
Keep FCPKitDSL focused on authoring surface; showcase types depend only on the public DSL, with DocumentBuilder flattening nested groups so data-driven for/if spines export correctly.
Emit library colorProcessing via Project.colorProcessing(.wideHDR), reject zero-duration titles at build, and let anchored story items inherit the host duration when unset so PresentationDocument exports import cleanly into wide-HDR libraries.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant