From b8d08df244b97b1d3131cb2d076166838189eeb0 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 29 Apr 2026 01:59:46 +0200 Subject: chore: cleanup --- apps/web/src/text/background.ts | 10 ++++++++++ apps/web/src/text/layout.ts | 2 +- apps/web/src/text/measure-element.ts | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'apps/web/src/text') diff --git a/apps/web/src/text/background.ts b/apps/web/src/text/background.ts index be5ab6f5..baa67a52 100644 --- a/apps/web/src/text/background.ts +++ b/apps/web/src/text/background.ts @@ -1,2 +1,12 @@ export const CORNER_RADIUS_MIN = 0; export const CORNER_RADIUS_MAX = 100; + +export interface TextBackground { + enabled: boolean; + color: string; + cornerRadius?: number; + paddingX?: number; + paddingY?: number; + offsetX?: number; + offsetY?: number; +} diff --git a/apps/web/src/text/layout.ts b/apps/web/src/text/layout.ts index 65e17291..c52abc30 100644 --- a/apps/web/src/text/layout.ts +++ b/apps/web/src/text/layout.ts @@ -1,4 +1,4 @@ -import type { TextBackground } from "@/timeline"; +import type { TextBackground } from "@/text/background"; import { DEFAULTS } from "@/timeline/defaults"; import type { TextAlign } from "@/text/primitives"; diff --git a/apps/web/src/text/measure-element.ts b/apps/web/src/text/measure-element.ts index d89cd2f8..28e97eac 100644 --- a/apps/web/src/text/measure-element.ts +++ b/apps/web/src/text/measure-element.ts @@ -1,6 +1,7 @@ import { CORNER_RADIUS_MIN } from "@/text/background"; import { DEFAULTS } from "@/timeline/defaults"; -import type { TextBackground, TextElement } from "@/timeline"; +import type { TextElement } from "@/timeline"; +import type { TextBackground } from "@/text/background"; import { resolveNumberAtTime } from "@/animation/values"; import { getTextVisualRect, -- cgit v1.3.1