Files
hyperframes/packages/core/src/studioPreviewMark.ts
Miguel Ángel 2fbaef6abb fix(core): an element its script hides stays hidden while studio preview plays (#5458)
* fix(core): an element its script hides stays hidden while studio preview plays

* fix(core): a stamped element re-timed in the timeline hides outside its new window

Studio timing edits drop the runtime-stamped mark, and a script-hidden stamped
container no longer holds back its images.

* fix(core): a preview-only stamp copied into a project no longer changes the render

Only the Studio preview honours the stamp, copied live markup drops it, and a
lane-only move makes a stamped element authored like the save does.
2026-10-11 16:45:42 +00:00

21 lines
771 B
TypeScript

export const STUDIO_PREVIEW_MARK_META = "hyperframes-studio-preview";
export const STUDIO_PREVIEW_UPCOMING_ATTR = "data-hf-upcoming";
export const STUDIO_PREVIEW_LAZY_ATTR = "data-hf-preview-lazy";
export const STUDIO_PREVIEW_ERRORS = "__hfPreviewErrors";
export const PREVIEW_RASTER_ATTR = "data-hf-preview-raster";
export const RUNTIME_STAMPED_ATTR = "data-hf-autostamped";
export const PREVIEW_ONLY_ATTRS = [
STUDIO_PREVIEW_UPCOMING_ATTR,
STUDIO_PREVIEW_LAZY_ATTR,
PREVIEW_RASTER_ATTR,
RUNTIME_STAMPED_ATTR,
] as const;
export function applyAuthoredTiming(
el: Element,
attrs: ReadonlyArray<readonly [name: string, value: string]>,
): void {
for (const [name, value] of attrs) el.setAttribute(name, value);
el.removeAttribute(RUNTIME_STAMPED_ATTR);
}