1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
import type { TextElement } from "@/types/timeline";
import {
DEFAULT_OPACITY,
DEFAULT_TRANSFORM,
TIMELINE_CONSTANTS,
} from "./timeline-constants";
export const MIN_FONT_SIZE = 5;
export const MAX_FONT_SIZE = 300;
/**
* higher value: smaller font size
* lower value: larger font size
*/
export const FONT_SIZE_SCALE_REFERENCE = 90;
export const DEFAULT_LETTER_SPACING = 0;
export const DEFAULT_LINE_HEIGHT = 1.2;
export const DEFAULT_TEXT_BACKGROUND = {
color: "#000000",
cornerRadius: 0,
paddingX: 30,
paddingY: 42,
offsetX: 0,
offsetY: 0,
};
export const DEFAULT_TEXT_ELEMENT: Omit<TextElement, "id"> = {
type: "text",
name: "Text",
content: "Default text",
fontSize: 15,
fontFamily: "Arial",
color: "#ffffff",
background: DEFAULT_TEXT_BACKGROUND,
textAlign: "center",
fontWeight: "normal",
fontStyle: "normal",
textDecoration: "none",
letterSpacing: DEFAULT_LETTER_SPACING,
lineHeight: DEFAULT_LINE_HEIGHT,
duration: TIMELINE_CONSTANTS.DEFAULT_ELEMENT_DURATION,
startTime: 0,
trimStart: 0,
trimEnd: 0,
transform: DEFAULT_TRANSFORM,
opacity: DEFAULT_OPACITY,
};
|