All templates now use scrollIntoView instead of visibility toggling.
Works universally for scroll-stacked, transform-based, and absolute
positioned slides. Lock body overflow to show one slide at a time.
Reset child opacity on the active slide to fix animation start states.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Non-active slides had children with opacity:0 from animation reset.
When cycling to them, only the container got visible — children stayed
invisible. Now reset all child opacity/visibility when activating a slide.
Also stop setting opacity:0 on hidden slides — visibility:hidden suffices.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace motion template thumbnail row with a full-width playable card
using <hyperframes-player>. Plays on hover, pauses and resets on leave.
First card: thesis composition restyled with biennale-yellow palette.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New top row shows HyperFrames video compositions as motion templates.
Each card has a thumbnail, name, and 'video' badge. Clicking sends
a templatePick message with motionTemplate:true flag. Data injected
via __MOTION_TEMPLATES_JSON__ placeholder.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The template picker matches replacement text to original word count.
Agents must generate pools with varied lengths so pickByLength has
good candidates for both short (2-word) and long (6+ word) slots.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pickByLength() scans the pool for the closest word-count match
to the original text. A 2-word headline gets a 2-word replacement,
a 15-word paragraph gets a similar-length one. Prevents layout
overflow from mismatched text lengths.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
deck-stage templates use <section class='s-cover'> not <section class='slide'>.
Query now falls back to section[class] when .slide finds nothing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Template picker passes PROMPT_TEXT and tone in the postMessage.
The bridge's iframe onload runs the same text injection logic
(display/headlines/body/stats/labels/smalls by font-size) so
the fine-tune preview shows contextual content, not placeholders.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Scale 1→1.06 over first 45%, then 1.06→1.08 while fading out
over remaining 55%. Phase 2 triggers at 900ms mid-fade.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Background fades to black (0.5s), card scales up 6% and holds,
then card fades out after background is dark. No dramatic zoom.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Calculates offset from card center to viewport center and sets
transform-origin so the zoom always converges on the middle of
the screen regardless of card position.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace two-class transition with one keyframe animation.
scale(1)→scale(4) over 0.9s, opacity fades after 60%.
cubic-bezier(0.4,0,0,1) for smooth acceleration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Card scales to 3.5x (well beyond viewport) over 0.8s with
cubic-bezier easing. Background fades to black over 0.5s.
Card fades out at 0.4s delay. Phase 2 slides in over 0.6s.
Total transition ~900ms for cinematic feel.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Click a template card: background fades to black, card scales up
and fades out over 450ms, then Phase 2 fades in with subtle slide-up.
Smooth handoff between browsing and configuring.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace moodboard HTML with iframe to template-picker.html. Tab says
'1. Template'. Clicking a template sends postMessage to parent which
triggers goToTune() — no page navigation, no flash. Template picker
and fine-tune live on the same page.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When pick-design.html is opened from the template picker bridge,
rewrite the Direction tab to show '← Template' and navigate back
to template-picker.html instead of showing the empty moodboard view.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When bridging from template picker, replace the static preview_frames
with a live iframe of the selected template. Includes slide cycling,
deck-stage fallback CSS, opacity reset for animation start states,
and scroll-mode detection for flex-scroll templates.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Guard mood-title, mood-grid, pal-bar, mood-next-btn references so
pick-design.html works when Phase 1 is replaced by template picker.
Add handleTemplatePick bridge that reads sessionStorage/postMessage
and auto-advances to Phase 2 with selected template metadata.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Inject fallback CSS for <deck-stage> since its JS gets stripped.
Makes it a 1920x1080 block container with absolute slides toggled
by .active class. Use visibility instead of display:none for slide
switching to work with both div and section slides.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Templates set opacity:0 and transform offsets for entrance animations.
Since we strip all scripts, those animations never fire and content
stays invisible. Reset opacity:0 → 1 and stuck transforms after load.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Templates use three different slide architectures:
- .slide.active toggle (16 templates)
- horizontal flex-scroll (8 templates: signal, studio, etc.)
- <deck-stage> web component (10 templates)
Auto-detect system via getSlides(), scroll-based navigation for
flex layouts, component-aware queries for deck-stage.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All text pools (headlines, body, stats, labels, smalls) now read from
PROMPT_TEXT instead of hardcoded arrays. Four placeholders:
__PALETTES_JSON__, __PROMPT_TEXT_JSON__, __TEMPLATES_JSON__, __PROMPT_DESC__
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy prototype from rawblock and replace the four hardcoded data values
(PALETTES, PROMPT_TEXT, ALL_TEMPLATES, header subtitle) with placeholder
tokens (__PALETTES_JSON__, __PROMPT_TEXT_JSON__, __TEMPLATES_JSON__,
__PROMPT_DESC__) so build-template-picker.py can inject prompt-specific
data at skill-invocation time.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The exported design.html used performance.now() in a rAF loop, which is
not seekable by the HyperFrames three adapter. Replace with the
event-driven renderAt pattern that listens for hf-seek and reads
window.__hfThreeTime for deterministic frame capture.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restructure design-picker.md to force creative thinking BEFORE code:
1. "What is unique about THIS prompt?" — visual vocabulary, emotion as
layout, surface context, anti-competition
2. Verbalized sampling with reasoning paths — from subject, emotion,
audience, anti-pattern, unusual format
3. Rate concepts HIGH/MID/LOW, keep 3+ LOW boards
4. Anti-mode-collapse check
5. THEN generate data
The creative process is now a HARD-GATE before the data format section.
Previously agents skipped straight to architecture HTML and produced
identical layouts across different projects.
Also: mandatory token usage rule strengthened — never hardcode colors,
fonts, spacing, or radii in preview frames.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- design-picker.md: tokens are mandatory in ALL preview frame HTML — never
hardcode colors, fonts, spacing, or radii. The preview must update live
when Phase 2 options change.
- Explicit guidance to follow video-composition.md, house-style.md, and
motion-principles.md when generating preview frames
- Fix easing option not calling renderPreview()
- Fix max-width:100% clamping scene frames in showcase
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 2 right panel is now a scrollable design system showcase:
- Overview, Palette swatches, Typography specimens, Scene grid,
Motion easing preview, Elevation cards, Radius chips
- All sections themed via CSS custom properties from selected palette
- Fix max-width: 100% clamping scene frames (was preventing scale)
Architecture preview frames guidance:
- Agents must follow video-composition.md, house-style.md, and
motion-principles.md when generating preview frame HTML
- 4 frames map to beat structure: hook, proof, action, close
- Use real content from prompt, not placeholders
- Frames are static but should look paused mid-animation
- Strip old 15-element checklist and "every token must be used"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove hard element counts and "never/always/every" mandates that forced
visual clutter and prevented minimal compositions:
- video-composition.md: replace "8-10 elements per scene" with density-as-
creative-choice; soften "fill the frame" to "use the frame"; replace
"two focal points minimum" with focal hierarchy; allow solid backgrounds
and deliberate stillness
- house-style.md: remove "2-5 decoratives per scene" count and "1 decorative
is under-dressed"; decoratives are a tool, not a requirement
- prompt-expansion.md: remove "required 2-5 from house-style" and element
padding; density matches the emotional beat
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace single vertical-column example with 3 structurally different
examples (split horizontal, single dominant, equal grid)
- Add structural diversity check: no two architectures share same wireframe
- List 8 layout shapes to draw from (centered, split, bottom-anchored,
grid, single-dominant, list, diagonal, timeline)
- Strip "every token must be used" — tokens only where concept needs them
- Canvas backgrounds now config-driven objects (type + params) instead of
hardcoded string types — same primitives, contextual parameters
- Added text renderer primitive for falling characters
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brief step: 6 questions (audience, emotion, brand assets, light/dark, surface,
key takeaway) asked one at a time, each answer informing the next. Skip what
the prompt already answers.
Verbalized sampling: generate 8-10 mood boards, label each as high/mid/low
mode, keep 2+ rare boards. Different creative modes (formal, emotional,
unconventional, speculative). Anti-mode-collapse check ensures no two boards
share the same template. Unlikely-but-valid board generation.
Design picker template:
- 3x3 grid layout (9 boards)
- 3-frame carousel per card (title, data, CTA scenes)
- Procedural canvas backgrounds (particles, voronoi, perlin heatmap,
ring-pulse, scanline, digits, sine-mesh, ripple, blobs)
- Backgrounds as selectable option in Phase 2
- Sticky canvas in Phase 2 preview
- No labels on Phase 1 cards — design speaks for itself
- Density matches concept, not a 15-element checklist
- Full implementation descriptions in design.md output
Prompt expansion: verbalized sampling for choreography — 3 approaches per
scene (content-first, emotion-first, unconventional), pick the best.
Video composition: added proximity/grouping rule.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(studio): add smooth preview zoom with pinch/Ctrl+scroll
- Scale iframe content from inside (contentDocument.documentElement) instead
of scaling the parent div, avoiding compositor re-rasterization on every
zoom frame — critical for smooth zoom on high-refresh displays (240Hz)
- Document-level capture-phase wheel handler bypasses the DomEditOverlay
- Center-based zoom (no pan drift from pointer-anchored formulas)
- Transient HUD shows zoom % briefly, no persistent UI controls
- Double-click preview area to reset zoom to fit
- Drag-to-pan when zoomed past 100%
- Momentum scroll suppression after pinch gesture (400ms cooldown)
- Delta clamping (MAX_DELTA=10) prevents overshooting on fast gestures
- toDomPrecision rounds transform values to 4 decimals (matches tldraw)
- Zoom state persisted to localStorage with 200ms debounce
- Exposes --preview-zoom CSS custom property for overlay coordinate mapping
- Fix infinite render loop in NLELayout (onIframeRef → refreshPreviewDocumentVersion)
* fix(studio): use CSS zoom instead of transform scale for preview zoom
CSS transform: scale() on a div containing an iframe causes compositor
cross-layer sync issues that produce visible frame tearing on high-refresh
displays (240Hz ProMotion). CSS zoom property changes the actual rendered
size without compositor layer synchronization, eliminating the jumping.
- Replace transform: scale(Z) with zoom: Z on the stage div
- Keep transform: translate() for panning (compositor-friendly, no iframe)
- Overlays work correctly since getBoundingClientRect() includes zoom
- Remove will-change, transition hacks, pointer-events toggles
* fix(ci): use apt-get for ffmpeg in preview-regression workflow
The FedericoCarboni/setup-ffmpeg action downloads from an external URL
that has been persistently unreachable, causing CI failures. Switch to
apt-get install which uses Ubuntu's package repos (same as ci.yml and
player-perf.yml).
* fix(studio): clear zoom timers on NLEPreview unmount
settleTimerRef, hudTimerRef, and retiringTimerRef could fire after
component unmount. Add cleanup effect to prevent stale callbacks.
* feat(studio): persist sidebar, timeline, and playback speed across reloads
Wire up studioUiPreferences for the three remaining UI states requested
in #752: left sidebar collapsed, timeline visibility, and playback rate.
All three now survive page reloads using the same localStorage key as
preview zoom.