summaryrefslogtreecommitdiff
path: root/apps/web/src/lib/text
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-14 18:17:14 +0200
committerMaze Winther <mazewinther@gmail.com>2026-04-14 18:17:14 +0200
commit6de6c7fd95de1de9d8d3107eaf7ce1dd150ed094 (patch)
tree75d5eb387b867449fc2218f5fe9b3acc70731561 /apps/web/src/lib/text
parent34c67ef8e85eafd6dfe6808280c807aceb00a345 (diff)
downloadopencut-6de6c7fd95de1de9d8d3107eaf7ce1dd150ed094.tar.gz
refactor: move constants to domain modules
Diffstat (limited to 'apps/web/src/lib/text')
-rw-r--r--apps/web/src/lib/text/background.ts2
-rw-r--r--apps/web/src/lib/text/measure-element.ts6
-rw-r--r--apps/web/src/lib/text/typography.ts (renamed from apps/web/src/lib/text/constants.ts)3
3 files changed, 4 insertions, 7 deletions
diff --git a/apps/web/src/lib/text/background.ts b/apps/web/src/lib/text/background.ts
new file mode 100644
index 00000000..be5ab6f5
--- /dev/null
+++ b/apps/web/src/lib/text/background.ts
@@ -0,0 +1,2 @@
+export const CORNER_RADIUS_MIN = 0;
+export const CORNER_RADIUS_MAX = 100;
diff --git a/apps/web/src/lib/text/measure-element.ts b/apps/web/src/lib/text/measure-element.ts
index 99b8a7ba..213682ab 100644
--- a/apps/web/src/lib/text/measure-element.ts
+++ b/apps/web/src/lib/text/measure-element.ts
@@ -1,7 +1,5 @@
-import {
- CORNER_RADIUS_MIN,
- FONT_SIZE_SCALE_REFERENCE,
-} from "@/constants/text-constants";
+import { CORNER_RADIUS_MIN } from "@/lib/text/background";
+import { FONT_SIZE_SCALE_REFERENCE } from "@/lib/text/typography";
import { resolveNumberAtTime } from "@/lib/animation";
import { DEFAULTS } from "@/lib/timeline/defaults";
import type { TextBackground, TextElement } from "@/lib/timeline";
diff --git a/apps/web/src/lib/text/constants.ts b/apps/web/src/lib/text/typography.ts
index a101f209..837236ab 100644
--- a/apps/web/src/lib/text/constants.ts
+++ b/apps/web/src/lib/text/typography.ts
@@ -7,6 +7,3 @@ export const DEFAULT_TEXT_COLOR = "#000000";
* lower value: larger font size
*/
export const FONT_SIZE_SCALE_REFERENCE = 90;
-
-export const CORNER_RADIUS_MIN = 0;
-export const CORNER_RADIUS_MAX = 100;