Files
hyperframes/packages/studio/src/utils/previewSafeMargins.ts
Miguel Ángel 898d27869e feat(studio): preview ruler and safe-margin toggles (#4127)
* feat(studio): preview ruler and safe-margin toggles

* test(studio): cover guides placement in the preview pane and the caption band box

* feat(studio): safe margins are two nested 90 and 80 percent boxes with edge ticks

* fix(studio): safe box ticks centred on the line, no halo, tighter skill wording test
2026-09-18 19:47:27 -04:00

11 lines
434 B
TypeScript

// Adobe Premiere default: action-safe and title-safe margins are 10% and 20% total (5% and 10% per edge).
export const ACTION_SAFE_PERCENT = 90;
export const TITLE_SAFE_PERCENT = 80;
export const SAFE_BOX_PERCENTS = [ACTION_SAFE_PERCENT, TITLE_SAFE_PERCENT] as const;
/** Inset from each frame edge, as a percent of the frame. */
export function safeBoxInsetPercent(boxPercent: number): number {
return (100 - boxPercent) / 2;
}