@meframe/core 0.0.19 → 0.0.21

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.
Files changed (58) hide show
  1. package/dist/config/types.d.ts +4 -0
  2. package/dist/config/types.d.ts.map +1 -1
  3. package/dist/model/CompositionModel.d.ts.map +1 -1
  4. package/dist/model/CompositionModel.js +21 -1
  5. package/dist/model/CompositionModel.js.map +1 -1
  6. package/dist/model/types.d.ts +31 -0
  7. package/dist/model/types.d.ts.map +1 -1
  8. package/dist/model/types.js.map +1 -1
  9. package/dist/orchestrator/CompositionPlanner.d.ts +1 -0
  10. package/dist/orchestrator/CompositionPlanner.d.ts.map +1 -1
  11. package/dist/orchestrator/CompositionPlanner.js +36 -10
  12. package/dist/orchestrator/CompositionPlanner.js.map +1 -1
  13. package/dist/orchestrator/Orchestrator.d.ts.map +1 -1
  14. package/dist/orchestrator/Orchestrator.js +2 -1
  15. package/dist/orchestrator/Orchestrator.js.map +1 -1
  16. package/dist/stages/compose/LayerRenderer.d.ts +4 -7
  17. package/dist/stages/compose/LayerRenderer.d.ts.map +1 -1
  18. package/dist/stages/compose/VideoComposer.d.ts +1 -0
  19. package/dist/stages/compose/VideoComposer.d.ts.map +1 -1
  20. package/dist/stages/compose/font-system/FontManager.d.ts +11 -0
  21. package/dist/stages/compose/font-system/FontManager.d.ts.map +1 -0
  22. package/dist/stages/compose/font-system/FontManager.js +69 -0
  23. package/dist/stages/compose/font-system/FontManager.js.map +1 -0
  24. package/dist/stages/compose/font-system/font-templates.d.ts +12 -0
  25. package/dist/stages/compose/font-system/font-templates.d.ts.map +1 -0
  26. package/dist/stages/compose/font-system/font-templates.js +384 -0
  27. package/dist/stages/compose/font-system/font-templates.js.map +1 -0
  28. package/dist/stages/compose/font-system/index.d.ts +5 -0
  29. package/dist/stages/compose/font-system/index.d.ts.map +1 -0
  30. package/dist/stages/compose/font-system/types.d.ts +60 -0
  31. package/dist/stages/compose/font-system/types.d.ts.map +1 -0
  32. package/dist/stages/compose/instructions.d.ts +50 -0
  33. package/dist/stages/compose/instructions.d.ts.map +1 -1
  34. package/dist/stages/compose/text-renderers/animation-utils.d.ts +16 -0
  35. package/dist/stages/compose/text-renderers/animation-utils.d.ts.map +1 -0
  36. package/dist/stages/compose/text-renderers/basic-text-renderer.d.ts +5 -0
  37. package/dist/stages/compose/text-renderers/basic-text-renderer.d.ts.map +1 -0
  38. package/dist/stages/compose/text-renderers/character-ktv-renderer.d.ts +4 -0
  39. package/dist/stages/compose/text-renderers/character-ktv-renderer.d.ts.map +1 -0
  40. package/dist/stages/compose/text-renderers/index.d.ts +6 -0
  41. package/dist/stages/compose/text-renderers/index.d.ts.map +1 -0
  42. package/dist/stages/compose/text-renderers/word-by-word-renderer.d.ts +4 -0
  43. package/dist/stages/compose/text-renderers/word-by-word-renderer.d.ts.map +1 -0
  44. package/dist/stages/compose/text-renderers/word-fancy-renderer.d.ts +4 -0
  45. package/dist/stages/compose/text-renderers/word-fancy-renderer.d.ts.map +1 -0
  46. package/dist/stages/compose/text-utils/index.d.ts +4 -0
  47. package/dist/stages/compose/text-utils/index.d.ts.map +1 -0
  48. package/dist/stages/compose/text-utils/locale-detector.d.ts +5 -0
  49. package/dist/stages/compose/text-utils/locale-detector.d.ts.map +1 -0
  50. package/dist/stages/compose/text-utils/text-metrics.d.ts +3 -0
  51. package/dist/stages/compose/text-utils/text-metrics.d.ts.map +1 -0
  52. package/dist/stages/compose/text-utils/text-wrapper.d.ts +4 -0
  53. package/dist/stages/compose/text-utils/text-wrapper.d.ts.map +1 -0
  54. package/dist/stages/compose/types.d.ts +51 -1
  55. package/dist/stages/compose/types.d.ts.map +1 -1
  56. package/dist/workers/stages/compose/video-compose.worker.js +845 -77
  57. package/dist/workers/stages/compose/video-compose.worker.js.map +1 -1
  58. package/package.json +1 -1
@@ -0,0 +1,384 @@
1
+ function mergeFontTemplates(...templates) {
2
+ const merged = { name: "merged" };
3
+ for (const template of templates) {
4
+ if (template.textStyle) {
5
+ merged.textStyle = { ...merged.textStyle, ...template.textStyle };
6
+ }
7
+ if (template.containerStyle) {
8
+ merged.containerStyle = { ...merged.containerStyle, ...template.containerStyle };
9
+ }
10
+ if (template.globalPosition) {
11
+ merged.globalPosition = { ...merged.globalPosition, ...template.globalPosition };
12
+ }
13
+ }
14
+ return merged;
15
+ }
16
+ const normal30 = {
17
+ name: "normal-30",
18
+ textStyle: { fontSize: 30 }
19
+ };
20
+ const normal40 = {
21
+ name: "normal-40",
22
+ textStyle: { fontSize: 40 }
23
+ };
24
+ const normal50 = {
25
+ name: "normal-50",
26
+ textStyle: { fontSize: 50 }
27
+ };
28
+ const normal60 = {
29
+ name: "normal-60",
30
+ textStyle: { fontSize: 60 }
31
+ };
32
+ const normal80 = {
33
+ name: "normal-80",
34
+ textStyle: { fontSize: 80 }
35
+ };
36
+ const bold40 = {
37
+ name: "bold-40",
38
+ textStyle: { fontWeight: "bold", fontSize: 40 }
39
+ };
40
+ const bold50 = {
41
+ name: "bold-50",
42
+ textStyle: { fontWeight: "bold", fontSize: 50 }
43
+ };
44
+ const bold60 = {
45
+ name: "bold-60",
46
+ textStyle: { fontWeight: "bold", letterSpacing: "0.05em", fontSize: 60 }
47
+ };
48
+ const fillBlack = {
49
+ name: "fill-black",
50
+ textStyle: { fill: "rgb(0, 0, 0)" }
51
+ };
52
+ const fillWhite = {
53
+ name: "fill-white",
54
+ textStyle: { fill: "rgb(255, 255, 255)" }
55
+ };
56
+ const fillYellow = {
57
+ name: "fill-yellow",
58
+ textStyle: { fill: "rgb(255, 215, 0)" }
59
+ };
60
+ const fillRed = {
61
+ name: "fill-red",
62
+ textStyle: { fill: "rgb(255, 77, 77)" }
63
+ };
64
+ const fillPink = {
65
+ name: "fill-pink",
66
+ textStyle: { fill: "rgb(255, 192, 203)" }
67
+ };
68
+ const strokeBlack = {
69
+ name: "stroke-black",
70
+ textStyle: {
71
+ paintOrder: "stroke",
72
+ strokeLinejoin: "round",
73
+ strokeLinecap: "round",
74
+ stroke: "rgb(0, 0, 0)"
75
+ }
76
+ };
77
+ const strokeWhite = {
78
+ name: "stroke-white",
79
+ textStyle: {
80
+ paintOrder: "stroke",
81
+ strokeLinejoin: "round",
82
+ strokeLinecap: "round",
83
+ stroke: "rgb(255, 255, 255)"
84
+ }
85
+ };
86
+ const strokeYellow = {
87
+ name: "stroke-yellow",
88
+ textStyle: {
89
+ paintOrder: "stroke",
90
+ strokeLinejoin: "round",
91
+ strokeLinecap: "round",
92
+ stroke: "rgb(255, 215, 0)"
93
+ }
94
+ };
95
+ const stroke0 = {
96
+ name: "stroke-0",
97
+ textStyle: { strokeWidth: 0 }
98
+ };
99
+ const stroke2 = {
100
+ name: "stroke-2",
101
+ textStyle: { strokeWidth: 2 }
102
+ };
103
+ const stroke4 = {
104
+ name: "stroke-4",
105
+ textStyle: { strokeWidth: 4 }
106
+ };
107
+ const stroke6 = {
108
+ name: "stroke-6",
109
+ textStyle: { strokeWidth: 6 }
110
+ };
111
+ const stroke8 = {
112
+ name: "stroke-8",
113
+ textStyle: { strokeWidth: 8 }
114
+ };
115
+ const stroke16 = {
116
+ name: "stroke-16",
117
+ textStyle: { strokeWidth: 16 }
118
+ };
119
+ const strokeBlack4 = mergeFontTemplates(strokeBlack, stroke4);
120
+ strokeBlack4.name = "stroke-black-4";
121
+ const strokeBlack6 = mergeFontTemplates(strokeBlack, stroke6);
122
+ strokeBlack6.name = "stroke-black-6";
123
+ const strokeBlack8 = mergeFontTemplates(strokeBlack, stroke8);
124
+ strokeBlack8.name = "stroke-black-8";
125
+ const strokeBlack16 = mergeFontTemplates(strokeBlack, stroke16);
126
+ strokeBlack16.name = "stroke-black-16";
127
+ const strokeWhite4 = mergeFontTemplates(strokeWhite, stroke4);
128
+ strokeWhite4.name = "stroke-white-4";
129
+ const strokeWhite8 = mergeFontTemplates(strokeWhite, stroke8);
130
+ strokeWhite8.name = "stroke-white-8";
131
+ const strokeYellow4 = mergeFontTemplates(strokeYellow, stroke4);
132
+ strokeYellow4.name = "stroke-yellow-4";
133
+ const strokeYellow8 = mergeFontTemplates(strokeYellow, stroke8);
134
+ strokeYellow8.name = "stroke-yellow-8";
135
+ const containerFull = {
136
+ name: "container-full",
137
+ containerStyle: { width: "100%" }
138
+ };
139
+ const container60 = {
140
+ name: "container-60",
141
+ containerStyle: { width: "60%" }
142
+ };
143
+ const container80 = {
144
+ name: "container-80",
145
+ containerStyle: { width: "80%" }
146
+ };
147
+ const container95 = {
148
+ name: "container-95",
149
+ containerStyle: { width: "95%" }
150
+ };
151
+ const container98 = {
152
+ name: "container-98",
153
+ containerStyle: { width: "98%" }
154
+ };
155
+ const containerBlack = {
156
+ name: "container-black",
157
+ containerStyle: {
158
+ backgroundColor: "black",
159
+ padding: "10px 10px 4px 10px",
160
+ borderRadius: 10,
161
+ width: "80%"
162
+ }
163
+ };
164
+ const containerWhite = {
165
+ name: "container-white",
166
+ containerStyle: {
167
+ backgroundColor: "white",
168
+ padding: "10px 10px 4px 10px",
169
+ borderRadius: 10,
170
+ width: "80%"
171
+ }
172
+ };
173
+ const containerYellow = {
174
+ name: "container-yellow",
175
+ containerStyle: {
176
+ backgroundColor: "yellow",
177
+ padding: "10px 10px 4px 10px",
178
+ borderRadius: 10,
179
+ width: "80%"
180
+ }
181
+ };
182
+ const containerBlackOpacity40 = {
183
+ name: "container-black-opacity-40",
184
+ containerStyle: {
185
+ backgroundColor: "rgba(0, 0, 0, 0.4)",
186
+ padding: "10px 10px 4px 10px",
187
+ borderRadius: 10,
188
+ width: "80%"
189
+ }
190
+ };
191
+ const globalCenter = {
192
+ name: "global-center",
193
+ globalPosition: {
194
+ display: "flex",
195
+ alignItems: "center",
196
+ justifyContent: "center"
197
+ }
198
+ };
199
+ const globalHorizontalCenter = {
200
+ name: "global-horizontal-center",
201
+ globalPosition: {
202
+ display: "flex",
203
+ justifyContent: "center"
204
+ }
205
+ };
206
+ const globalTop5 = {
207
+ name: "global-top-5",
208
+ globalPosition: {
209
+ position: "absolute",
210
+ top: "5%"
211
+ }
212
+ };
213
+ const globalTop10 = {
214
+ name: "global-top-10",
215
+ globalPosition: {
216
+ position: "absolute",
217
+ top: "10%"
218
+ }
219
+ };
220
+ const globalTop20 = {
221
+ name: "global-top-20",
222
+ globalPosition: {
223
+ position: "absolute",
224
+ top: "20%"
225
+ }
226
+ };
227
+ const globalTop70 = {
228
+ name: "global-top-70",
229
+ globalPosition: {
230
+ position: "absolute",
231
+ top: "70%"
232
+ }
233
+ };
234
+ const globalTop80 = {
235
+ name: "global-top-80",
236
+ globalPosition: {
237
+ position: "absolute",
238
+ top: "80%"
239
+ }
240
+ };
241
+ const globalBottom5 = {
242
+ name: "global-bottom-5",
243
+ globalPosition: {
244
+ position: "absolute",
245
+ bottom: "5%"
246
+ }
247
+ };
248
+ const globalBottom10 = {
249
+ name: "global-bottom-10",
250
+ globalPosition: {
251
+ position: "absolute",
252
+ bottom: "10%"
253
+ }
254
+ };
255
+ const globalBottom15 = {
256
+ name: "global-bottom-15",
257
+ globalPosition: {
258
+ position: "absolute",
259
+ bottom: "15%"
260
+ }
261
+ };
262
+ const yellowText = mergeFontTemplates(normal40, fillYellow, strokeBlack8);
263
+ yellowText.name = "yellowText";
264
+ const whiteText = mergeFontTemplates(normal40, fillWhite, strokeBlack8);
265
+ whiteText.name = "whiteText";
266
+ const blackText = mergeFontTemplates(normal40, fillBlack, strokeWhite8);
267
+ blackText.name = "blackText";
268
+ const baseSubtitle = mergeFontTemplates(normal40, fillWhite, strokeBlack8, globalTop70);
269
+ baseSubtitle.name = "baseSubtitle";
270
+ const baseSubtitleCenter = mergeFontTemplates(
271
+ normal50,
272
+ fillWhite,
273
+ strokeBlack16,
274
+ globalCenter,
275
+ container60
276
+ );
277
+ baseSubtitleCenter.name = "baseSubtitleCenter";
278
+ const yellowSubtitle = mergeFontTemplates(yellowText, globalTop70);
279
+ yellowSubtitle.name = "yellowSubtitle";
280
+ const whiteSubtitle = mergeFontTemplates(whiteText, globalTop70);
281
+ whiteSubtitle.name = "whiteSubtitle";
282
+ const blackSubtitle = mergeFontTemplates(blackText, globalTop70);
283
+ blackSubtitle.name = "blackSubtitle";
284
+ const subtitleBackgroundBlack = mergeFontTemplates(
285
+ normal40,
286
+ fillWhite,
287
+ globalTop70,
288
+ containerBlack
289
+ );
290
+ subtitleBackgroundBlack.name = "subtitleBackgroundBlack";
291
+ const title = mergeFontTemplates(yellowText, bold50, globalTop5, container95);
292
+ title.name = "title";
293
+ const subtitle = mergeFontTemplates(normal30, fillWhite, strokeBlack8, globalTop5, container80);
294
+ subtitle.name = "subtitle";
295
+ const FONT_TEMPLATES = {
296
+ "normal-30": normal30,
297
+ "normal-40": normal40,
298
+ "normal-50": normal50,
299
+ "normal-60": normal60,
300
+ "normal-80": normal80,
301
+ "bold-40": bold40,
302
+ "bold-50": bold50,
303
+ "bold-60": bold60,
304
+ "fill-black": fillBlack,
305
+ "fill-white": fillWhite,
306
+ "fill-yellow": fillYellow,
307
+ "fill-red": fillRed,
308
+ "fill-pink": fillPink,
309
+ "stroke-black": strokeBlack,
310
+ "stroke-white": strokeWhite,
311
+ "stroke-yellow": strokeYellow,
312
+ "stroke-0": stroke0,
313
+ "stroke-2": stroke2,
314
+ "stroke-4": stroke4,
315
+ "stroke-6": stroke6,
316
+ "stroke-8": stroke8,
317
+ "stroke-16": stroke16,
318
+ "stroke-black-4": strokeBlack4,
319
+ "stroke-black-6": strokeBlack6,
320
+ "stroke-black-8": strokeBlack8,
321
+ "stroke-black-16": strokeBlack16,
322
+ "stroke-white-4": strokeWhite4,
323
+ "stroke-white-8": strokeWhite8,
324
+ "stroke-yellow-4": strokeYellow4,
325
+ "stroke-yellow-8": strokeYellow8,
326
+ "container-full": containerFull,
327
+ "container-60": container60,
328
+ "container-80": container80,
329
+ "container-95": container95,
330
+ "container-98": container98,
331
+ "container-black": containerBlack,
332
+ "container-white": containerWhite,
333
+ "container-yellow": containerYellow,
334
+ "container-black-opacity-40": containerBlackOpacity40,
335
+ "global-center": globalCenter,
336
+ "global-horizontal-center": globalHorizontalCenter,
337
+ "global-top-5": globalTop5,
338
+ "global-top-10": globalTop10,
339
+ "global-top-20": globalTop20,
340
+ "global-top-70": globalTop70,
341
+ "global-top-80": globalTop80,
342
+ "global-bottom-5": globalBottom5,
343
+ "global-bottom-10": globalBottom10,
344
+ "global-bottom-15": globalBottom15,
345
+ yellowText,
346
+ whiteText,
347
+ blackText,
348
+ baseSubtitle,
349
+ baseSubtitleCenter,
350
+ yellowSubtitle,
351
+ whiteSubtitle,
352
+ blackSubtitle,
353
+ subtitleBackgroundBlack,
354
+ title,
355
+ subtitle
356
+ };
357
+ function getTemplate(templateName) {
358
+ const templateNames = templateName.split(" ").filter(Boolean);
359
+ const templates = templateNames.map((name) => FONT_TEMPLATES[name]).filter((t) => t !== void 0);
360
+ if (templates.length === 0) {
361
+ return {
362
+ name: "default",
363
+ textStyle: {
364
+ fontSize: 40,
365
+ fontWeight: 400,
366
+ fontFamily: "Arial, sans-serif",
367
+ fill: "rgb(255, 255, 255)",
368
+ stroke: "rgb(0, 0, 0)",
369
+ strokeWidth: 4,
370
+ lineHeight: 1.2
371
+ }
372
+ };
373
+ }
374
+ if (templates.length === 1) {
375
+ return templates[0];
376
+ }
377
+ return mergeFontTemplates(...templates);
378
+ }
379
+ export {
380
+ FONT_TEMPLATES,
381
+ getTemplate,
382
+ mergeFontTemplates
383
+ };
384
+ //# sourceMappingURL=font-templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-templates.js","sources":["../../../../src/stages/compose/font-system/font-templates.ts"],"sourcesContent":["import type { TextStyle, ContainerStyle, GlobalPositionStyle } from './types';\n\nexport interface FontTemplate {\n name: string;\n textStyle?: Partial<TextStyle>;\n containerStyle?: Partial<ContainerStyle>;\n globalPosition?: Partial<GlobalPositionStyle>;\n}\n\nexport function mergeFontTemplates(...templates: FontTemplate[]): FontTemplate {\n const merged: FontTemplate = { name: 'merged' };\n\n for (const template of templates) {\n if (template.textStyle) {\n merged.textStyle = { ...merged.textStyle, ...template.textStyle };\n }\n if (template.containerStyle) {\n merged.containerStyle = { ...merged.containerStyle, ...template.containerStyle };\n }\n if (template.globalPosition) {\n merged.globalPosition = { ...merged.globalPosition, ...template.globalPosition };\n }\n }\n\n return merged;\n}\n\nconst normal30: FontTemplate = {\n name: 'normal-30',\n textStyle: { fontSize: 30 },\n};\n\nconst normal40: FontTemplate = {\n name: 'normal-40',\n textStyle: { fontSize: 40 },\n};\n\nconst normal50: FontTemplate = {\n name: 'normal-50',\n textStyle: { fontSize: 50 },\n};\n\nconst normal60: FontTemplate = {\n name: 'normal-60',\n textStyle: { fontSize: 60 },\n};\n\nconst normal80: FontTemplate = {\n name: 'normal-80',\n textStyle: { fontSize: 80 },\n};\n\nconst bold40: FontTemplate = {\n name: 'bold-40',\n textStyle: { fontWeight: 'bold', fontSize: 40 },\n};\n\nconst bold50: FontTemplate = {\n name: 'bold-50',\n textStyle: { fontWeight: 'bold', fontSize: 50 },\n};\n\nconst bold60: FontTemplate = {\n name: 'bold-60',\n textStyle: { fontWeight: 'bold', letterSpacing: '0.05em', fontSize: 60 },\n};\n\nconst fillBlack: FontTemplate = {\n name: 'fill-black',\n textStyle: { fill: 'rgb(0, 0, 0)' },\n};\n\nconst fillWhite: FontTemplate = {\n name: 'fill-white',\n textStyle: { fill: 'rgb(255, 255, 255)' },\n};\n\nconst fillYellow: FontTemplate = {\n name: 'fill-yellow',\n textStyle: { fill: 'rgb(255, 215, 0)' },\n};\n\nconst fillRed: FontTemplate = {\n name: 'fill-red',\n textStyle: { fill: 'rgb(255, 77, 77)' },\n};\n\nconst fillPink: FontTemplate = {\n name: 'fill-pink',\n textStyle: { fill: 'rgb(255, 192, 203)' },\n};\n\nconst strokeBlack: FontTemplate = {\n name: 'stroke-black',\n textStyle: {\n paintOrder: 'stroke',\n strokeLinejoin: 'round',\n strokeLinecap: 'round',\n stroke: 'rgb(0, 0, 0)',\n },\n};\n\nconst strokeWhite: FontTemplate = {\n name: 'stroke-white',\n textStyle: {\n paintOrder: 'stroke',\n strokeLinejoin: 'round',\n strokeLinecap: 'round',\n stroke: 'rgb(255, 255, 255)',\n },\n};\n\nconst strokeYellow: FontTemplate = {\n name: 'stroke-yellow',\n textStyle: {\n paintOrder: 'stroke',\n strokeLinejoin: 'round',\n strokeLinecap: 'round',\n stroke: 'rgb(255, 215, 0)',\n },\n};\n\nconst stroke0: FontTemplate = {\n name: 'stroke-0',\n textStyle: { strokeWidth: 0 },\n};\n\nconst stroke2: FontTemplate = {\n name: 'stroke-2',\n textStyle: { strokeWidth: 2 },\n};\n\nconst stroke4: FontTemplate = {\n name: 'stroke-4',\n textStyle: { strokeWidth: 4 },\n};\n\nconst stroke6: FontTemplate = {\n name: 'stroke-6',\n textStyle: { strokeWidth: 6 },\n};\n\nconst stroke8: FontTemplate = {\n name: 'stroke-8',\n textStyle: { strokeWidth: 8 },\n};\n\nconst stroke16: FontTemplate = {\n name: 'stroke-16',\n textStyle: { strokeWidth: 16 },\n};\n\nconst strokeBlack4 = mergeFontTemplates(strokeBlack, stroke4);\nstrokeBlack4.name = 'stroke-black-4';\n\nconst strokeBlack6 = mergeFontTemplates(strokeBlack, stroke6);\nstrokeBlack6.name = 'stroke-black-6';\n\nconst strokeBlack8 = mergeFontTemplates(strokeBlack, stroke8);\nstrokeBlack8.name = 'stroke-black-8';\n\nconst strokeBlack16 = mergeFontTemplates(strokeBlack, stroke16);\nstrokeBlack16.name = 'stroke-black-16';\n\nconst strokeWhite4 = mergeFontTemplates(strokeWhite, stroke4);\nstrokeWhite4.name = 'stroke-white-4';\n\nconst strokeWhite8 = mergeFontTemplates(strokeWhite, stroke8);\nstrokeWhite8.name = 'stroke-white-8';\n\nconst strokeYellow4 = mergeFontTemplates(strokeYellow, stroke4);\nstrokeYellow4.name = 'stroke-yellow-4';\n\nconst strokeYellow8 = mergeFontTemplates(strokeYellow, stroke8);\nstrokeYellow8.name = 'stroke-yellow-8';\n\nconst containerFull: FontTemplate = {\n name: 'container-full',\n containerStyle: { width: '100%' },\n};\n\nconst container60: FontTemplate = {\n name: 'container-60',\n containerStyle: { width: '60%' },\n};\n\nconst container80: FontTemplate = {\n name: 'container-80',\n containerStyle: { width: '80%' },\n};\n\nconst container95: FontTemplate = {\n name: 'container-95',\n containerStyle: { width: '95%' },\n};\n\nconst container98: FontTemplate = {\n name: 'container-98',\n containerStyle: { width: '98%' },\n};\n\nconst containerBlack: FontTemplate = {\n name: 'container-black',\n containerStyle: {\n backgroundColor: 'black',\n padding: '10px 10px 4px 10px',\n borderRadius: 10,\n width: '80%',\n },\n};\n\nconst containerWhite: FontTemplate = {\n name: 'container-white',\n containerStyle: {\n backgroundColor: 'white',\n padding: '10px 10px 4px 10px',\n borderRadius: 10,\n width: '80%',\n },\n};\n\nconst containerYellow: FontTemplate = {\n name: 'container-yellow',\n containerStyle: {\n backgroundColor: 'yellow',\n padding: '10px 10px 4px 10px',\n borderRadius: 10,\n width: '80%',\n },\n};\n\nconst containerBlackOpacity40: FontTemplate = {\n name: 'container-black-opacity-40',\n containerStyle: {\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n padding: '10px 10px 4px 10px',\n borderRadius: 10,\n width: '80%',\n },\n};\n\nconst globalCenter: FontTemplate = {\n name: 'global-center',\n globalPosition: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n};\n\nconst globalHorizontalCenter: FontTemplate = {\n name: 'global-horizontal-center',\n globalPosition: {\n display: 'flex',\n justifyContent: 'center',\n },\n};\n\nconst globalTop5: FontTemplate = {\n name: 'global-top-5',\n globalPosition: {\n position: 'absolute',\n top: '5%',\n },\n};\n\nconst globalTop10: FontTemplate = {\n name: 'global-top-10',\n globalPosition: {\n position: 'absolute',\n top: '10%',\n },\n};\n\nconst globalTop20: FontTemplate = {\n name: 'global-top-20',\n globalPosition: {\n position: 'absolute',\n top: '20%',\n },\n};\n\nconst globalTop70: FontTemplate = {\n name: 'global-top-70',\n globalPosition: {\n position: 'absolute',\n top: '70%',\n },\n};\n\nconst globalTop80: FontTemplate = {\n name: 'global-top-80',\n globalPosition: {\n position: 'absolute',\n top: '80%',\n },\n};\n\nconst globalBottom5: FontTemplate = {\n name: 'global-bottom-5',\n globalPosition: {\n position: 'absolute',\n bottom: '5%',\n },\n};\n\nconst globalBottom10: FontTemplate = {\n name: 'global-bottom-10',\n globalPosition: {\n position: 'absolute',\n bottom: '10%',\n },\n};\n\nconst globalBottom15: FontTemplate = {\n name: 'global-bottom-15',\n globalPosition: {\n position: 'absolute',\n bottom: '15%',\n },\n};\n\nconst yellowText = mergeFontTemplates(normal40, fillYellow, strokeBlack8);\nyellowText.name = 'yellowText';\n\nconst whiteText = mergeFontTemplates(normal40, fillWhite, strokeBlack8);\nwhiteText.name = 'whiteText';\n\nconst blackText = mergeFontTemplates(normal40, fillBlack, strokeWhite8);\nblackText.name = 'blackText';\n\nconst baseSubtitle = mergeFontTemplates(normal40, fillWhite, strokeBlack8, globalTop70);\nbaseSubtitle.name = 'baseSubtitle';\n\nconst baseSubtitleCenter = mergeFontTemplates(\n normal50,\n fillWhite,\n strokeBlack16,\n globalCenter,\n container60\n);\nbaseSubtitleCenter.name = 'baseSubtitleCenter';\n\nconst yellowSubtitle = mergeFontTemplates(yellowText, globalTop70);\nyellowSubtitle.name = 'yellowSubtitle';\n\nconst whiteSubtitle = mergeFontTemplates(whiteText, globalTop70);\nwhiteSubtitle.name = 'whiteSubtitle';\n\nconst blackSubtitle = mergeFontTemplates(blackText, globalTop70);\nblackSubtitle.name = 'blackSubtitle';\n\nconst subtitleBackgroundBlack = mergeFontTemplates(\n normal40,\n fillWhite,\n globalTop70,\n containerBlack\n);\nsubtitleBackgroundBlack.name = 'subtitleBackgroundBlack';\n\nconst title = mergeFontTemplates(yellowText, bold50, globalTop5, container95);\ntitle.name = 'title';\n\nconst subtitle = mergeFontTemplates(normal30, fillWhite, strokeBlack8, globalTop5, container80);\nsubtitle.name = 'subtitle';\n\nexport const FONT_TEMPLATES: Record<string, FontTemplate> = {\n 'normal-30': normal30,\n 'normal-40': normal40,\n 'normal-50': normal50,\n 'normal-60': normal60,\n 'normal-80': normal80,\n 'bold-40': bold40,\n 'bold-50': bold50,\n 'bold-60': bold60,\n 'fill-black': fillBlack,\n 'fill-white': fillWhite,\n 'fill-yellow': fillYellow,\n 'fill-red': fillRed,\n 'fill-pink': fillPink,\n 'stroke-black': strokeBlack,\n 'stroke-white': strokeWhite,\n 'stroke-yellow': strokeYellow,\n 'stroke-0': stroke0,\n 'stroke-2': stroke2,\n 'stroke-4': stroke4,\n 'stroke-6': stroke6,\n 'stroke-8': stroke8,\n 'stroke-16': stroke16,\n 'stroke-black-4': strokeBlack4,\n 'stroke-black-6': strokeBlack6,\n 'stroke-black-8': strokeBlack8,\n 'stroke-black-16': strokeBlack16,\n 'stroke-white-4': strokeWhite4,\n 'stroke-white-8': strokeWhite8,\n 'stroke-yellow-4': strokeYellow4,\n 'stroke-yellow-8': strokeYellow8,\n 'container-full': containerFull,\n 'container-60': container60,\n 'container-80': container80,\n 'container-95': container95,\n 'container-98': container98,\n 'container-black': containerBlack,\n 'container-white': containerWhite,\n 'container-yellow': containerYellow,\n 'container-black-opacity-40': containerBlackOpacity40,\n 'global-center': globalCenter,\n 'global-horizontal-center': globalHorizontalCenter,\n 'global-top-5': globalTop5,\n 'global-top-10': globalTop10,\n 'global-top-20': globalTop20,\n 'global-top-70': globalTop70,\n 'global-top-80': globalTop80,\n 'global-bottom-5': globalBottom5,\n 'global-bottom-10': globalBottom10,\n 'global-bottom-15': globalBottom15,\n yellowText,\n whiteText,\n blackText,\n baseSubtitle,\n baseSubtitleCenter,\n yellowSubtitle,\n whiteSubtitle,\n blackSubtitle,\n subtitleBackgroundBlack,\n title,\n subtitle,\n};\n\nexport function getTemplate(templateName: string): FontTemplate {\n const templateNames = templateName.split(' ').filter(Boolean);\n const templates = templateNames\n .map((name) => FONT_TEMPLATES[name])\n .filter((t): t is FontTemplate => t !== undefined);\n\n if (templates.length === 0) {\n return {\n name: 'default',\n textStyle: {\n fontSize: 40,\n fontWeight: 400,\n fontFamily: 'Arial, sans-serif',\n fill: 'rgb(255, 255, 255)',\n stroke: 'rgb(0, 0, 0)',\n strokeWidth: 4,\n lineHeight: 1.2,\n },\n };\n }\n\n if (templates.length === 1) {\n return templates[0]!;\n }\n\n return mergeFontTemplates(...templates);\n}\n"],"names":[],"mappings":"AASO,SAAS,sBAAsB,WAAyC;AAC7E,QAAM,SAAuB,EAAE,MAAM,SAAA;AAErC,aAAW,YAAY,WAAW;AAChC,QAAI,SAAS,WAAW;AACtB,aAAO,YAAY,EAAE,GAAG,OAAO,WAAW,GAAG,SAAS,UAAA;AAAA,IACxD;AACA,QAAI,SAAS,gBAAgB;AAC3B,aAAO,iBAAiB,EAAE,GAAG,OAAO,gBAAgB,GAAG,SAAS,eAAA;AAAA,IAClE;AACA,QAAI,SAAS,gBAAgB;AAC3B,aAAO,iBAAiB,EAAE,GAAG,OAAO,gBAAgB,GAAG,SAAS,eAAA;AAAA,IAClE;AAAA,EACF;AAEA,SAAO;AACT;AAEA,MAAM,WAAyB;AAAA,EAC7B,MAAM;AAAA,EACN,WAAW,EAAE,UAAU,GAAA;AACzB;AAEA,MAAM,WAAyB;AAAA,EAC7B,MAAM;AAAA,EACN,WAAW,EAAE,UAAU,GAAA;AACzB;AAEA,MAAM,WAAyB;AAAA,EAC7B,MAAM;AAAA,EACN,WAAW,EAAE,UAAU,GAAA;AACzB;AAEA,MAAM,WAAyB;AAAA,EAC7B,MAAM;AAAA,EACN,WAAW,EAAE,UAAU,GAAA;AACzB;AAEA,MAAM,WAAyB;AAAA,EAC7B,MAAM;AAAA,EACN,WAAW,EAAE,UAAU,GAAA;AACzB;AAEA,MAAM,SAAuB;AAAA,EAC3B,MAAM;AAAA,EACN,WAAW,EAAE,YAAY,QAAQ,UAAU,GAAA;AAC7C;AAEA,MAAM,SAAuB;AAAA,EAC3B,MAAM;AAAA,EACN,WAAW,EAAE,YAAY,QAAQ,UAAU,GAAA;AAC7C;AAEA,MAA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AA,QACV,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,aAAa;AAAA,QACb,YAAY;AAAA,MAAA;AAAA,IACd;AAAA,EAEJ;AAEA,MAAI,UAAU,WAAW,GAAG;AAC1B,WAAO,UAAU,CAAC;AAAA,EACpB;AAEA,SAAO,mBAAmB,GAAG,SAAS;AACxC;"}
@@ -0,0 +1,5 @@
1
+ export * from './types';
2
+ export * from './FontManager';
3
+ export * from './font-templates';
4
+ export { getFontConfig, clearFontCache } from './FontManager';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/stages/compose/font-system/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,60 @@
1
+ export type LocaleCode = 'zh-CN' | 'en-US' | 'ja-JP' | 'ko-KR' | 'ar-SA' | 'other';
2
+ export interface TextStyle {
3
+ fontSize: number;
4
+ fontWeight: string | number;
5
+ fontFamily: string;
6
+ fill: string;
7
+ stroke?: string;
8
+ strokeWidth?: number;
9
+ letterSpacing?: string | number;
10
+ lineHeight?: number;
11
+ paintOrder?: string;
12
+ strokeLinejoin?: CanvasLineJoin;
13
+ strokeLinecap?: CanvasLineCap;
14
+ }
15
+ export interface ContainerStyle {
16
+ width?: string;
17
+ backgroundColor?: string;
18
+ padding?: string;
19
+ borderRadius?: number;
20
+ }
21
+ export interface GlobalPositionStyle {
22
+ position?: 'absolute';
23
+ top?: string;
24
+ bottom?: string;
25
+ left?: string;
26
+ right?: string;
27
+ display?: string;
28
+ alignItems?: string;
29
+ justifyContent?: string;
30
+ }
31
+ export interface FontConfig {
32
+ familyName: string;
33
+ url?: string;
34
+ locales: LocaleCode[];
35
+ textStyle: TextStyle;
36
+ containerStyle?: ContainerStyle;
37
+ globalPosition?: GlobalPositionStyle;
38
+ }
39
+ export interface SerializedFontConfig {
40
+ textStyle: TextStyle;
41
+ containerStyle?: ContainerStyle;
42
+ globalPosition?: GlobalPositionStyle;
43
+ }
44
+ export interface TextAnimationConfig {
45
+ type: 'none' | 'fade' | 'wordByWord' | 'characterKTV' | 'wordByWordFancy' | 'wordByWordSlideUp';
46
+ glowColor?: string;
47
+ glowIntensity?: number;
48
+ transitionFrames?: number;
49
+ highlightColor?: string;
50
+ highlightTextStyle?: TextStyle;
51
+ enlargeScale?: number;
52
+ slideDistance?: number;
53
+ fadeDuration?: number;
54
+ }
55
+ export interface WordTiming {
56
+ text: string;
57
+ startFrame: number;
58
+ endFrame: number;
59
+ }
60
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/stages/compose/font-system/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEnF,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,C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E,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -66,6 +66,56 @@ export interface SerializedTextLayerPayload extends LayerPayloadBase {
66
66
  strokeWidth?: number;
67
67
  lineHeight?: number;
68
68
  align?: 'left' | 'center' | 'right';
69
+ localeCode?: string;
70
+ fontConfig?: {
71
+ textStyle: {
72
+ fontSize: number;
73
+ fontWeight: string | number;
74
+ fontFamily: string;
75
+ fill: string;
76
+ stroke?: string;
77
+ strokeWidth?: number;
78
+ letterSpacing?: string | number;
79
+ lineHeight?: number;
80
+ paintOrder?: string;
81
+ strokeLinejoin?: CanvasLineJoin;
82
+ strokeLinecap?: CanvasLineCap;
83
+ };
84
+ containerStyle?: {
85
+ width?: string;
86
+ backgroundColor?: string;
87
+ padding?: string;
88
+ borderRadius?: number;
89
+ };
90
+ globalPosition?: {
91
+ position?: 'absolute';
92
+ top?: string;
93
+ bottom?: string;
94
+ left?: string;
95
+ right?: string;
96
+ display?: string;
97
+ alignItems?: string;
98
+ justifyContent?: string;
99
+ };
100
+ };
101
+ animation?: {
102
+ type: 'none' | 'fade' | 'wordByWord' | 'characterKTV' | 'wordByWordFancy' | 'wordByWordSlideUp';
103
+ glowColor?: string;
104
+ glowIntensity?: number;
105
+ transitionFrames?: number;
106
+ highlightColor?: string;
107
+ highlightTextStyle?: {
108
+ fill?: string;
109
+ stroke?: string;
110
+ };
111
+ [key: string]: unknown;
112
+ };
113
+ wordTimings?: Array<{
114
+ text: string;
115
+ startUs: number;
116
+ endUs: number;
117
+ }>;
118
+ letterCase?: 'upper' | 'lower' | 'none';
69
119
  }
70
120
  export interface SerializedMaskLayerPayload extends LayerPayloadBase {
71
121
  resourceId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../../src/stages/compose/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1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O,EAAE,4BAA4B,CAAC;CACvC,CAAC,CAAC;AAEP,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,MAAM,EAAE,0BAA0B,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxC,MAAM,EAAE,qBAAqB,CAAC;CAC/B"}
@@ -0,0 +1,16 @@
1
+ export interface SpringConfig {
2
+ damping: number;
3
+ mass: number;
4
+ stiffness: number;
5
+ overshootClamping?: boolean;
6
+ }
7
+ export declare function springEasing(frame: number, config: SpringConfig): number;
8
+ export declare function interpolate(value: number, inputRange: [number, number], outputRange: [number, number], options?: {
9
+ extrapolateLeft?: 'clamp' | 'extend';
10
+ extrapolateRight?: 'clamp' | 'extend';
11
+ }): number;
12
+ export declare function interpolateColor(color1: string, color2: string, progress: number): string;
13
+ export type EasingFunction = (t: number) => number;
14
+ export declare const easingFunctions: Record<string, EasingFunction>;
15
+ export declare function calculateProgress(frame: number, startFrame: number, duration: number, easing?: string): number;
16
+ //# sourceMappingURL=animation-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation-utils.d.ts","sourceRoot":"","sources":["../../../../src/stages/compose/text-renderers/animation-utils.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,MAAM,CA+BxE;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,OAAO,CAAC,EAAE;IACR,eAAe,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACrC,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CACvC,GACA,MAAM,CA2BR;AAcD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAazF;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;AAEnD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAK1D,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,MAAiB,GACxB,MAAM,CAOR"}
@@ -0,0 +1,5 @@
1
+ import { TextLayer } from '../types';
2
+
3
+ export declare function renderBasicText(ctx: OffscreenCanvasRenderingContext2D, layer: TextLayer, canvasWidth: number, canvasHeight: number, _relativeFrame: number): void;
4
+ export declare function renderTextWithEntrance(ctx: OffscreenCanvasRenderingContext2D, layer: TextLayer, canvasWidth: number, canvasHeight: number, relativeFrame: number): void;
5
+ //# sourceMappingURL=basic-text-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic-text-renderer.d.ts","sourceRoot":"","sources":["../../../../src/stages/compose/text-renderers/basic-text-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AA4C1C,wBAAgB,eAAe,CAC7B,GAAG,EAAE,iCAAiC,EACtC,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,GACrB,IAAI,CAwDN;AAED,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,iCAAiC,EACtC,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,GACpB,IAAI,CAsBN"}
@@ -0,0 +1,4 @@
1
+ import { TextLayer } from '../types';
2
+
3
+ export declare function renderCharacterKTV(ctx: OffscreenCanvasRenderingContext2D, layer: TextLayer, canvasWidth: number, canvasHeight: number, relativeFrame: number, fps?: number): void;
4
+ //# sourceMappingURL=character-ktv-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character-ktv-renderer.d.ts","sourceRoot":"","sources":["../../../../src/stages/compose/text-renderers/character-ktv-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAkD1C,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,iCAAiC,EACtC,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,GAAG,GAAE,MAAW,GACf,IAAI,CA+HN"}
@@ -0,0 +1,6 @@
1
+ export { renderBasicText, renderTextWithEntrance } from './basic-text-renderer';
2
+ export { renderWordByWord } from './word-by-word-renderer';
3
+ export { renderCharacterKTV } from './character-ktv-renderer';
4
+ export { renderWordByWordFancy } from './word-fancy-renderer';
5
+ export * from './animation-utils';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/stages/compose/text-renderers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { TextLayer } from '../types';
2
+
3
+ export declare function renderWordByWord(ctx: OffscreenCanvasRenderingContext2D, layer: TextLayer, canvasWidth: number, canvasHeight: number, relativeFrame: number, fps?: number): void;
4
+ //# sourceMappingURL=word-by-word-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-by-word-renderer.d.ts","sourceRoot":"","sources":["../../../../src/stages/compose/text-renderers/word-by-word-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAsD1C,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,iCAAiC,EACtC,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,GAAG,GAAE,MAAW,GACf,IAAI,CAyHN"}
@@ -0,0 +1,4 @@
1
+ import { TextLayer } from '../types';
2
+
3
+ export declare function renderWordByWordFancy(ctx: OffscreenCanvasRenderingContext2D, layer: TextLayer, canvasWidth: number, canvasHeight: number, relativeFrame: number, fps?: number): void;
4
+ //# sourceMappingURL=word-fancy-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-fancy-renderer.d.ts","sourceRoot":"","sources":["../../../../src/stages/compose/text-renderers/word-fancy-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAuD1C,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,iCAAiC,EACtC,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,GAAG,GAAE,MAAW,GACf,IAAI,CAkIN"}
@@ -0,0 +1,4 @@
1
+ export * from './locale-detector';
2
+ export * from './text-wrapper';
3
+ export * from './text-metrics';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/stages/compose/text-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}