@twick/visualizer 0.15.24 → 0.15.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Bangers-Regular.ttf +0 -0
- package/dist/Birthstone-Regular.ttf +0 -0
- package/dist/Corinthia-Bold.ttf +0 -0
- package/dist/Corinthia-Regular.ttf +0 -0
- package/dist/ImperialScript-Regular.ttf +0 -0
- package/dist/Kapakana.ttf +0 -0
- package/dist/KumarOneOutline-Regular.ttf +0 -0
- package/dist/LondrinaOutline-Regular.ttf +0 -0
- package/dist/LuckiestGuy-Regular.ttf +0 -0
- package/dist/Lumanosimo-Regular.ttf +0 -0
- package/dist/MarckScript-Regular.ttf +0 -0
- package/dist/Montserrat-VariableFont_wght.ttf +0 -0
- package/dist/Mulish-VariableFont_wght.ttf +0 -0
- package/dist/Pattaya-Regular.woff2 +0 -0
- package/dist/Peralta-Regular.ttf +0 -0
- package/dist/PlayfairDisplay-VariableFont_wght.ttf +0 -0
- package/dist/Poppins-Regular.ttf +0 -0
- package/dist/Roboto-VariableFont_wdth_wght.ttf +0 -0
- package/dist/Rubik.ttf +0 -0
- package/dist/project.css +1 -1
- package/dist/project.js +88 -88
- package/package.json +9 -9
- package/src/caption-styles/highlight-bg.handler.tsx +3 -3
- package/src/caption-styles/index.ts +2 -0
- package/src/caption-styles/karaoke-word.handler.tsx +54 -0
- package/src/caption-styles/karaoke.handler.tsx +15 -23
- package/src/caption-styles/lower-third.handler.tsx +11 -3
- package/src/caption-styles/outline-only.handler.tsx +7 -3
- package/src/caption-styles/pop-scale.handler.tsx +9 -4
- package/src/caption-styles/soft-box.handler.tsx +11 -3
- package/src/caption-styles/typewriter.handler.tsx +64 -18
- package/src/caption-styles/word-by-word-with-bg.handler.tsx +11 -3
- package/src/caption-styles/word-by-word.handler.tsx +11 -3
- package/src/components/track.tsx +50 -31
- package/src/elements/caption.element.tsx +38 -1
- package/src/fonts/Bangers-Regular.ttf +0 -0
- package/src/fonts/Birthstone-Regular.ttf +0 -0
- package/src/fonts/Corinthia-Bold.ttf +0 -0
- package/src/fonts/Corinthia-Regular.ttf +0 -0
- package/src/fonts/ImperialScript-Regular.ttf +0 -0
- package/src/fonts/Kapakana.ttf +0 -0
- package/src/fonts/KumarOneOutline-Regular.ttf +0 -0
- package/src/fonts/LondrinaOutline-Regular.ttf +0 -0
- package/src/fonts/LuckiestGuy-Regular.ttf +0 -0
- package/src/fonts/Lumanosimo-Regular.ttf +0 -0
- package/src/fonts/MarckScript-Regular.ttf +0 -0
- package/src/fonts/Montserrat-VariableFont_wght.ttf +0 -0
- package/src/fonts/Mulish-VariableFont_wght.ttf +0 -0
- package/src/fonts/Pattaya-Regular.woff2 +0 -0
- package/src/fonts/Peralta-Regular.ttf +0 -0
- package/src/fonts/PlayfairDisplay-VariableFont_wght.ttf +0 -0
- package/src/fonts/Poppins-Regular.ttf +0 -0
- package/src/fonts/Roboto-VariableFont_wdth,wght.ttf +0 -0
- package/src/fonts/Rubik.ttf +0 -0
- package/src/global.css +155 -12
- package/src/helpers/constants.ts +8 -8
- package/src/helpers/types.ts +2 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/global.css
CHANGED
|
@@ -1,12 +1,155 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
/* Local fonts for player, renderer, and export (Docker).
|
|
2
|
+
* Font files are in src/fonts/ and bundled into dist/ by the build.
|
|
3
|
+
* Single source of truth: used in Studio, live-player, and Lambda.
|
|
4
|
+
*/
|
|
5
|
+
@font-face {
|
|
6
|
+
font-family: 'Pattaya';
|
|
7
|
+
src: url('./fonts/Pattaya-Regular.woff2') format('woff2');
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-display: optional;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: 'Bangers';
|
|
15
|
+
src: url('./fonts/Bangers-Regular.ttf') format('truetype');
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-display: optional;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@font-face {
|
|
22
|
+
font-family: 'Birthstone';
|
|
23
|
+
src: url('./fonts/Birthstone-Regular.ttf') format('truetype');
|
|
24
|
+
font-weight: 400;
|
|
25
|
+
font-style: normal;
|
|
26
|
+
font-display: optional;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@font-face {
|
|
30
|
+
font-family: 'Corinthia';
|
|
31
|
+
font-weight: 400;
|
|
32
|
+
font-style: normal;
|
|
33
|
+
font-display: optional;
|
|
34
|
+
src: url('./fonts/Corinthia-Regular.ttf') format('truetype');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@font-face {
|
|
38
|
+
font-family: 'Corinthia';
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
font-style: normal;
|
|
41
|
+
font-display: optional;
|
|
42
|
+
src: url('./fonts/Corinthia-Bold.ttf') format('truetype');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@font-face {
|
|
46
|
+
font-family: 'Imperial Script';
|
|
47
|
+
src: url('./fonts/ImperialScript-Regular.ttf') format('truetype');
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
font-style: normal;
|
|
50
|
+
font-display: optional;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@font-face {
|
|
54
|
+
font-family: 'Kapakana';
|
|
55
|
+
src: url('./fonts/Kapakana.ttf') format('truetype');
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
font-style: normal;
|
|
58
|
+
font-display: optional;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@font-face {
|
|
62
|
+
font-family: 'Kumar One Outline';
|
|
63
|
+
src: url('./fonts/KumarOneOutline-Regular.ttf') format('truetype');
|
|
64
|
+
font-weight: 400;
|
|
65
|
+
font-style: normal;
|
|
66
|
+
font-display: optional;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@font-face {
|
|
70
|
+
font-family: 'Londrina Outline';
|
|
71
|
+
src: url('./fonts/LondrinaOutline-Regular.ttf') format('truetype');
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
font-style: normal;
|
|
74
|
+
font-display: optional;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@font-face {
|
|
78
|
+
font-family: 'Luckiest Guy';
|
|
79
|
+
src: url('./fonts/LuckiestGuy-Regular.ttf') format('truetype');
|
|
80
|
+
font-weight: 400;
|
|
81
|
+
font-style: normal;
|
|
82
|
+
font-display: optional;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@font-face {
|
|
86
|
+
font-family: 'Lumanosimo';
|
|
87
|
+
src: url('./fonts/Lumanosimo-Regular.ttf') format('truetype');
|
|
88
|
+
font-weight: 400;
|
|
89
|
+
font-style: normal;
|
|
90
|
+
font-display: optional;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@font-face {
|
|
94
|
+
font-family: 'Marck Script';
|
|
95
|
+
src: url('./fonts/MarckScript-Regular.ttf') format('truetype');
|
|
96
|
+
font-weight: 400;
|
|
97
|
+
font-style: normal;
|
|
98
|
+
font-display: optional;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@font-face {
|
|
102
|
+
font-family: 'Montserrat';
|
|
103
|
+
src: url('./fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
|
|
104
|
+
font-weight: 100 900;
|
|
105
|
+
font-style: normal;
|
|
106
|
+
font-display: optional;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@font-face {
|
|
110
|
+
font-family: 'Mulish';
|
|
111
|
+
src: url('./fonts/Mulish-VariableFont_wght.ttf') format('truetype');
|
|
112
|
+
font-weight: 200 1000;
|
|
113
|
+
font-style: normal;
|
|
114
|
+
font-display: optional;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@font-face {
|
|
118
|
+
font-family: 'Peralta';
|
|
119
|
+
src: url('./fonts/Peralta-Regular.ttf') format('truetype');
|
|
120
|
+
font-weight: 400;
|
|
121
|
+
font-style: normal;
|
|
122
|
+
font-display: optional;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@font-face {
|
|
126
|
+
font-family: 'Playfair Display';
|
|
127
|
+
src: url('./fonts/PlayfairDisplay-VariableFont_wght.ttf') format('truetype');
|
|
128
|
+
font-weight: 400 900;
|
|
129
|
+
font-style: normal;
|
|
130
|
+
font-display: optional;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@font-face {
|
|
134
|
+
font-family: 'Poppins';
|
|
135
|
+
src: url('./fonts/Poppins-Regular.ttf') format('truetype');
|
|
136
|
+
font-weight: 400;
|
|
137
|
+
font-style: normal;
|
|
138
|
+
font-display: optional;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@font-face {
|
|
142
|
+
font-family: 'Roboto';
|
|
143
|
+
src: url('./fonts/Roboto-VariableFont_wdth,wght.ttf') format('truetype');
|
|
144
|
+
font-weight: 100 900;
|
|
145
|
+
font-style: normal;
|
|
146
|
+
font-display: optional;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@font-face {
|
|
150
|
+
font-family: 'Rubik';
|
|
151
|
+
src: url('./fonts/Rubik.ttf') format('truetype');
|
|
152
|
+
font-weight: 400;
|
|
153
|
+
font-style: normal;
|
|
154
|
+
font-display: optional;
|
|
155
|
+
}
|
package/src/helpers/constants.ts
CHANGED
|
@@ -54,7 +54,7 @@ export const CAPTION_STYLE: Record<string, CaptionStyle> = {
|
|
|
54
54
|
lineWidth: 0.35,
|
|
55
55
|
stroke: "#000000",
|
|
56
56
|
fontWeight: 700,
|
|
57
|
-
shadowOffset: [-
|
|
57
|
+
shadowOffset: [-1, 1],
|
|
58
58
|
shadowColor: "#000000",
|
|
59
59
|
fill: "#ffffff",
|
|
60
60
|
fontFamily: "Bangers",
|
|
@@ -75,7 +75,7 @@ export const CAPTION_STYLE: Record<string, CaptionStyle> = {
|
|
|
75
75
|
stroke: "#000000",
|
|
76
76
|
fontWeight: 700,
|
|
77
77
|
strokeFirst: true,
|
|
78
|
-
shadowOffset: [-
|
|
78
|
+
shadowOffset: [-1, 1],
|
|
79
79
|
shadowColor: "#000000",
|
|
80
80
|
shadowBlur: 5,
|
|
81
81
|
fontFamily: "Bangers",
|
|
@@ -97,7 +97,7 @@ export const CAPTION_STYLE: Record<string, CaptionStyle> = {
|
|
|
97
97
|
stroke: "#000000",
|
|
98
98
|
fontWeight: 700,
|
|
99
99
|
strokeFirst: true,
|
|
100
|
-
shadowOffset: [-
|
|
100
|
+
shadowOffset: [-1, 1],
|
|
101
101
|
shadowColor: "#000000",
|
|
102
102
|
shadowBlur: 5,
|
|
103
103
|
fontFamily: "Bangers",
|
|
@@ -111,15 +111,15 @@ export const CAPTION_STYLE: Record<string, CaptionStyle> = {
|
|
|
111
111
|
rect: {
|
|
112
112
|
alignItems: "center",
|
|
113
113
|
justifyContent: "center",
|
|
114
|
-
gap:
|
|
114
|
+
gap: 12,
|
|
115
115
|
},
|
|
116
116
|
word: {
|
|
117
|
-
lineWidth:
|
|
117
|
+
lineWidth: 15,
|
|
118
118
|
stroke: "#000000",
|
|
119
119
|
fontWeight: 600,
|
|
120
120
|
strokeFirst: true,
|
|
121
121
|
shadowOffset: [0, 0],
|
|
122
|
-
shadowBlur:
|
|
122
|
+
shadowBlur: 1.25,
|
|
123
123
|
fontFamily: "Arial",
|
|
124
124
|
fill: "#FFFFFF",
|
|
125
125
|
fontSize: 42,
|
|
@@ -196,7 +196,7 @@ export const CAPTION_STYLE: Record<string, CaptionStyle> = {
|
|
|
196
196
|
stroke: "#000000",
|
|
197
197
|
fontWeight: 700,
|
|
198
198
|
strokeFirst: true,
|
|
199
|
-
shadowOffset: [-
|
|
199
|
+
shadowOffset: [-1, 1],
|
|
200
200
|
shadowColor: "#000000",
|
|
201
201
|
shadowBlur: 4,
|
|
202
202
|
fontFamily: "Bangers",
|
|
@@ -215,7 +215,7 @@ export const CAPTION_STYLE: Record<string, CaptionStyle> = {
|
|
|
215
215
|
stroke: "#000000",
|
|
216
216
|
fontWeight: 700,
|
|
217
217
|
strokeFirst: true,
|
|
218
|
-
shadowOffset: [-
|
|
218
|
+
shadowOffset: [-1, 1],
|
|
219
219
|
shadowColor: "#000000",
|
|
220
220
|
shadowBlur: 5,
|
|
221
221
|
fontFamily: "Bangers",
|
package/src/helpers/types.ts
CHANGED
|
@@ -164,6 +164,7 @@ export type Caption = {
|
|
|
164
164
|
export type CaptionProps = {
|
|
165
165
|
colors: CaptionColors;
|
|
166
166
|
font: CaptionFont;
|
|
167
|
+
lineWidth?: number;
|
|
167
168
|
bgOpacity?: number;
|
|
168
169
|
bgOffsetWidth?: number;
|
|
169
170
|
bgOffsetHeight?: number;
|
|
@@ -235,6 +236,7 @@ export type VisualizerTrack = {
|
|
|
235
236
|
elements: VisualizerElement[];
|
|
236
237
|
containerProps?: ContainerProps;
|
|
237
238
|
props?: {
|
|
239
|
+
rectProps?: any;
|
|
238
240
|
capStyle?: string;
|
|
239
241
|
bgOpacity?: number;
|
|
240
242
|
x?: number;
|