@clypra-studio/engine 1.10.2 → 2.0.0
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/captions/index.cjs +543 -0
- package/dist/captions/index.cjs.map +1 -0
- package/dist/captions/index.d.cts +180 -0
- package/dist/captions/index.d.ts +180 -0
- package/dist/captions/index.js +35 -0
- package/dist/captions/index.js.map +1 -0
- package/dist/chunk-MVUSVC4T.js +504 -0
- package/dist/chunk-MVUSVC4T.js.map +1 -0
- package/dist/index.cjs +516 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -43
- package/dist/index.d.ts +44 -43
- package/dist/index.js +48 -16
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Caption Engine Types
|
|
3
|
+
*
|
|
4
|
+
* Canonical types for word-timed animated captions, shared identically
|
|
5
|
+
* between desktop (wgpu compositor, worker rasterizer, main-thread fallback)
|
|
6
|
+
* and @clypra-studio/engine.
|
|
7
|
+
*/
|
|
8
|
+
interface CaptionWord {
|
|
9
|
+
id: string;
|
|
10
|
+
text: string;
|
|
11
|
+
startMs: number;
|
|
12
|
+
endMs: number;
|
|
13
|
+
/** Gap in milliseconds to the start of the next word (or 0 if end-of-segment) */
|
|
14
|
+
gapToNextMs?: number;
|
|
15
|
+
}
|
|
16
|
+
interface CaptionCue {
|
|
17
|
+
id: string;
|
|
18
|
+
words: CaptionWord[];
|
|
19
|
+
text: string;
|
|
20
|
+
startMs: number;
|
|
21
|
+
endMs: number;
|
|
22
|
+
}
|
|
23
|
+
type CaptionPresetId = "classic-subtitle" | "karaoke-pop" | "bold-punch" | "clean-minimal" | "cinematic-gold" | "neon-glow";
|
|
24
|
+
interface CaptionPresetDefinition {
|
|
25
|
+
id: CaptionPresetId | string;
|
|
26
|
+
name: string;
|
|
27
|
+
fontFamily: string;
|
|
28
|
+
fontWeight: number;
|
|
29
|
+
fontStyle: "normal" | "italic";
|
|
30
|
+
fontSize: number;
|
|
31
|
+
letterSpacing: number;
|
|
32
|
+
lineHeight: number;
|
|
33
|
+
textTransform?: "none" | "uppercase" | "lowercase" | "capitalize";
|
|
34
|
+
textAlign: "left" | "center" | "right";
|
|
35
|
+
verticalAlign: "top" | "middle" | "bottom";
|
|
36
|
+
inactiveColor: string;
|
|
37
|
+
inactiveOpacity: number;
|
|
38
|
+
activeColor: string;
|
|
39
|
+
activeScale?: number;
|
|
40
|
+
activeWordAnim?: "none" | "pop" | "glow" | "bounce";
|
|
41
|
+
strokeEnabled: boolean;
|
|
42
|
+
strokeColor?: string;
|
|
43
|
+
strokeWidth?: number;
|
|
44
|
+
activeStrokeColor?: string;
|
|
45
|
+
activeStrokeWidth?: number;
|
|
46
|
+
shadowEnabled: boolean;
|
|
47
|
+
shadowColor?: string;
|
|
48
|
+
shadowBlur?: number;
|
|
49
|
+
shadowOffsetX?: number;
|
|
50
|
+
shadowOffsetY?: number;
|
|
51
|
+
backgroundEnabled: boolean;
|
|
52
|
+
backgroundColor?: string;
|
|
53
|
+
backgroundPaddingX?: number;
|
|
54
|
+
backgroundPaddingY?: number;
|
|
55
|
+
backgroundBorderRadius?: number;
|
|
56
|
+
glowEnabled?: boolean;
|
|
57
|
+
glowColor?: string;
|
|
58
|
+
glowBlur?: number;
|
|
59
|
+
}
|
|
60
|
+
interface CaptionBounds {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
}
|
|
66
|
+
interface CaptionWordBox {
|
|
67
|
+
wordIndex: number;
|
|
68
|
+
word: CaptionWord;
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
baselineY: number;
|
|
74
|
+
isActive: boolean;
|
|
75
|
+
}
|
|
76
|
+
interface CaptionLineLayout {
|
|
77
|
+
lineIndex: number;
|
|
78
|
+
text: string;
|
|
79
|
+
words: CaptionWordBox[];
|
|
80
|
+
width: number;
|
|
81
|
+
height: number;
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
}
|
|
85
|
+
interface CaptionRenderOptions {
|
|
86
|
+
cue: CaptionCue;
|
|
87
|
+
activeWordIndex: number;
|
|
88
|
+
preset: CaptionPresetDefinition;
|
|
89
|
+
canvasWidth: number;
|
|
90
|
+
canvasHeight: number;
|
|
91
|
+
scale?: number;
|
|
92
|
+
positionYRatio?: number;
|
|
93
|
+
}
|
|
94
|
+
interface CaptionRenderResult {
|
|
95
|
+
bounds: CaptionBounds;
|
|
96
|
+
wordBoxes: CaptionWordBox[];
|
|
97
|
+
lines: CaptionLineLayout[];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Built-in Caption Presets (OFL Fonts Only)
|
|
102
|
+
*
|
|
103
|
+
* 6 production-grade typography presets for word-timed animated captions:
|
|
104
|
+
* 1. Classic Subtitle (Inter Variable, subtle stroke, bottom centered)
|
|
105
|
+
* 2. Karaoke Pop (Outfit Variable, active word highlight with scale 1.12x)
|
|
106
|
+
* 3. Bold Punch (Montserrat Variable, uppercase, thick stroke, drop shadow)
|
|
107
|
+
* 4. Clean Minimal (Inter Variable, rounded translucent pill box background)
|
|
108
|
+
* 5. Cinematic Gold (Outfit Variable, gold active fill #FBBF24, tracked letters)
|
|
109
|
+
* 6. Neon Glow (Montserrat Variable, vibrant cyan stroke #0891B2, glow blur)
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
declare const CAPTION_PRESET_CLASSIC_SUBTITLE: CaptionPresetDefinition;
|
|
113
|
+
declare const CAPTION_PRESET_KARAOKE_POP: CaptionPresetDefinition;
|
|
114
|
+
declare const CAPTION_PRESET_BOLD_PUNCH: CaptionPresetDefinition;
|
|
115
|
+
declare const CAPTION_PRESET_CLEAN_MINIMAL: CaptionPresetDefinition;
|
|
116
|
+
declare const CAPTION_PRESET_CINEMATIC_GOLD: CaptionPresetDefinition;
|
|
117
|
+
declare const CAPTION_PRESET_NEON_GLOW: CaptionPresetDefinition;
|
|
118
|
+
declare const BUILT_IN_CAPTION_PRESETS: Record<CaptionPresetId, CaptionPresetDefinition>;
|
|
119
|
+
declare function getCaptionPreset(idOrPreset: string | CaptionPresetDefinition | undefined): CaptionPresetDefinition;
|
|
120
|
+
/**
|
|
121
|
+
* Computes a fast deterministic 32-bit hash of a resolved CaptionPresetDefinition
|
|
122
|
+
* for use in sub-canvas bounding-box raster cache keys.
|
|
123
|
+
*/
|
|
124
|
+
declare function hashCaptionPreset(preset: CaptionPresetDefinition): string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Caption Engine
|
|
128
|
+
*
|
|
129
|
+
* Handles layout geometry, pagination, word-timing evaluation, and
|
|
130
|
+
* cache key computation for word-timed animated captions.
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
declare const PAUSE_RELEASE_THRESHOLD_MS = 250;
|
|
134
|
+
declare const DEFAULT_MAX_WORDS_PER_LINE = 5;
|
|
135
|
+
declare const DEFAULT_MAX_LINES = 2;
|
|
136
|
+
declare const DEFAULT_PAUSE_BREAK_MS = 350;
|
|
137
|
+
interface CaptionPaginationConfig {
|
|
138
|
+
maxWordsPerLine?: number;
|
|
139
|
+
maxLines?: number;
|
|
140
|
+
pauseBreakMs?: number;
|
|
141
|
+
}
|
|
142
|
+
declare class CaptionEngine {
|
|
143
|
+
/**
|
|
144
|
+
* Paginates a flat stream of words into structured caption cues.
|
|
145
|
+
* Enforces max words per line, max lines, pause thresholds, and punctuation breaks.
|
|
146
|
+
*/
|
|
147
|
+
static paginateWords(words: CaptionWord[], config?: CaptionPaginationConfig): CaptionCue[];
|
|
148
|
+
/**
|
|
149
|
+
* Resolves the active word index within a cue for a given playback time in milliseconds.
|
|
150
|
+
* Returns -1 if no word is active or during the pause release window (> 250ms after speech ends).
|
|
151
|
+
*/
|
|
152
|
+
static resolveActiveWordIndex(cue: CaptionCue, currentTimeMs: number): number;
|
|
153
|
+
/**
|
|
154
|
+
* Builds the canonical raster cache key for a caption frame.
|
|
155
|
+
* Format: `caption:${clipId}:${segmentId}:${activeWordIndex}:${presetHash}:${fontLoaded}`
|
|
156
|
+
*/
|
|
157
|
+
static buildCacheKey(clipId: string, segmentId: string, activeWordIndex: number, preset: CaptionPresetDefinition, fontLoaded: boolean): string;
|
|
158
|
+
/**
|
|
159
|
+
* Computes multi-line word layout and bounding boxes for a cue.
|
|
160
|
+
*/
|
|
161
|
+
static computeLayout(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, cue: CaptionCue, activeWordIndex: number, preset: CaptionPresetDefinition, canvasWidth: number, canvasHeight: number, scale?: number, positionYRatio?: number): {
|
|
162
|
+
bounds: CaptionBounds;
|
|
163
|
+
wordBoxes: CaptionWordBox[];
|
|
164
|
+
lines: CaptionLineLayout[];
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Caption Canvas Renderer
|
|
170
|
+
*
|
|
171
|
+
* Single source of truth for rendering word-timed animated captions.
|
|
172
|
+
* Consumed identically by:
|
|
173
|
+
* 1. Web Worker (templateRasterizer.worker.ts) for off-thread sub-canvas rasterization
|
|
174
|
+
* 2. Main-thread fallback (nativeTextPreview.ts) when Web Workers are unavailable or during export
|
|
175
|
+
* 3. @clypra-studio/engine in web and browser previews
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
declare function renderCaptionToCanvas(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, options: CaptionRenderOptions): CaptionRenderResult;
|
|
179
|
+
|
|
180
|
+
export { BUILT_IN_CAPTION_PRESETS, CAPTION_PRESET_BOLD_PUNCH, CAPTION_PRESET_CINEMATIC_GOLD, CAPTION_PRESET_CLASSIC_SUBTITLE, CAPTION_PRESET_CLEAN_MINIMAL, CAPTION_PRESET_KARAOKE_POP, CAPTION_PRESET_NEON_GLOW, type CaptionBounds, type CaptionCue, CaptionEngine, type CaptionLineLayout, type CaptionPaginationConfig, type CaptionPresetDefinition, type CaptionPresetId, type CaptionRenderOptions, type CaptionRenderResult, type CaptionWord, type CaptionWordBox, DEFAULT_MAX_LINES, DEFAULT_MAX_WORDS_PER_LINE, DEFAULT_PAUSE_BREAK_MS, PAUSE_RELEASE_THRESHOLD_MS, getCaptionPreset, hashCaptionPreset, renderCaptionToCanvas };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Caption Engine Types
|
|
3
|
+
*
|
|
4
|
+
* Canonical types for word-timed animated captions, shared identically
|
|
5
|
+
* between desktop (wgpu compositor, worker rasterizer, main-thread fallback)
|
|
6
|
+
* and @clypra-studio/engine.
|
|
7
|
+
*/
|
|
8
|
+
interface CaptionWord {
|
|
9
|
+
id: string;
|
|
10
|
+
text: string;
|
|
11
|
+
startMs: number;
|
|
12
|
+
endMs: number;
|
|
13
|
+
/** Gap in milliseconds to the start of the next word (or 0 if end-of-segment) */
|
|
14
|
+
gapToNextMs?: number;
|
|
15
|
+
}
|
|
16
|
+
interface CaptionCue {
|
|
17
|
+
id: string;
|
|
18
|
+
words: CaptionWord[];
|
|
19
|
+
text: string;
|
|
20
|
+
startMs: number;
|
|
21
|
+
endMs: number;
|
|
22
|
+
}
|
|
23
|
+
type CaptionPresetId = "classic-subtitle" | "karaoke-pop" | "bold-punch" | "clean-minimal" | "cinematic-gold" | "neon-glow";
|
|
24
|
+
interface CaptionPresetDefinition {
|
|
25
|
+
id: CaptionPresetId | string;
|
|
26
|
+
name: string;
|
|
27
|
+
fontFamily: string;
|
|
28
|
+
fontWeight: number;
|
|
29
|
+
fontStyle: "normal" | "italic";
|
|
30
|
+
fontSize: number;
|
|
31
|
+
letterSpacing: number;
|
|
32
|
+
lineHeight: number;
|
|
33
|
+
textTransform?: "none" | "uppercase" | "lowercase" | "capitalize";
|
|
34
|
+
textAlign: "left" | "center" | "right";
|
|
35
|
+
verticalAlign: "top" | "middle" | "bottom";
|
|
36
|
+
inactiveColor: string;
|
|
37
|
+
inactiveOpacity: number;
|
|
38
|
+
activeColor: string;
|
|
39
|
+
activeScale?: number;
|
|
40
|
+
activeWordAnim?: "none" | "pop" | "glow" | "bounce";
|
|
41
|
+
strokeEnabled: boolean;
|
|
42
|
+
strokeColor?: string;
|
|
43
|
+
strokeWidth?: number;
|
|
44
|
+
activeStrokeColor?: string;
|
|
45
|
+
activeStrokeWidth?: number;
|
|
46
|
+
shadowEnabled: boolean;
|
|
47
|
+
shadowColor?: string;
|
|
48
|
+
shadowBlur?: number;
|
|
49
|
+
shadowOffsetX?: number;
|
|
50
|
+
shadowOffsetY?: number;
|
|
51
|
+
backgroundEnabled: boolean;
|
|
52
|
+
backgroundColor?: string;
|
|
53
|
+
backgroundPaddingX?: number;
|
|
54
|
+
backgroundPaddingY?: number;
|
|
55
|
+
backgroundBorderRadius?: number;
|
|
56
|
+
glowEnabled?: boolean;
|
|
57
|
+
glowColor?: string;
|
|
58
|
+
glowBlur?: number;
|
|
59
|
+
}
|
|
60
|
+
interface CaptionBounds {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
}
|
|
66
|
+
interface CaptionWordBox {
|
|
67
|
+
wordIndex: number;
|
|
68
|
+
word: CaptionWord;
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
baselineY: number;
|
|
74
|
+
isActive: boolean;
|
|
75
|
+
}
|
|
76
|
+
interface CaptionLineLayout {
|
|
77
|
+
lineIndex: number;
|
|
78
|
+
text: string;
|
|
79
|
+
words: CaptionWordBox[];
|
|
80
|
+
width: number;
|
|
81
|
+
height: number;
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
}
|
|
85
|
+
interface CaptionRenderOptions {
|
|
86
|
+
cue: CaptionCue;
|
|
87
|
+
activeWordIndex: number;
|
|
88
|
+
preset: CaptionPresetDefinition;
|
|
89
|
+
canvasWidth: number;
|
|
90
|
+
canvasHeight: number;
|
|
91
|
+
scale?: number;
|
|
92
|
+
positionYRatio?: number;
|
|
93
|
+
}
|
|
94
|
+
interface CaptionRenderResult {
|
|
95
|
+
bounds: CaptionBounds;
|
|
96
|
+
wordBoxes: CaptionWordBox[];
|
|
97
|
+
lines: CaptionLineLayout[];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Built-in Caption Presets (OFL Fonts Only)
|
|
102
|
+
*
|
|
103
|
+
* 6 production-grade typography presets for word-timed animated captions:
|
|
104
|
+
* 1. Classic Subtitle (Inter Variable, subtle stroke, bottom centered)
|
|
105
|
+
* 2. Karaoke Pop (Outfit Variable, active word highlight with scale 1.12x)
|
|
106
|
+
* 3. Bold Punch (Montserrat Variable, uppercase, thick stroke, drop shadow)
|
|
107
|
+
* 4. Clean Minimal (Inter Variable, rounded translucent pill box background)
|
|
108
|
+
* 5. Cinematic Gold (Outfit Variable, gold active fill #FBBF24, tracked letters)
|
|
109
|
+
* 6. Neon Glow (Montserrat Variable, vibrant cyan stroke #0891B2, glow blur)
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
declare const CAPTION_PRESET_CLASSIC_SUBTITLE: CaptionPresetDefinition;
|
|
113
|
+
declare const CAPTION_PRESET_KARAOKE_POP: CaptionPresetDefinition;
|
|
114
|
+
declare const CAPTION_PRESET_BOLD_PUNCH: CaptionPresetDefinition;
|
|
115
|
+
declare const CAPTION_PRESET_CLEAN_MINIMAL: CaptionPresetDefinition;
|
|
116
|
+
declare const CAPTION_PRESET_CINEMATIC_GOLD: CaptionPresetDefinition;
|
|
117
|
+
declare const CAPTION_PRESET_NEON_GLOW: CaptionPresetDefinition;
|
|
118
|
+
declare const BUILT_IN_CAPTION_PRESETS: Record<CaptionPresetId, CaptionPresetDefinition>;
|
|
119
|
+
declare function getCaptionPreset(idOrPreset: string | CaptionPresetDefinition | undefined): CaptionPresetDefinition;
|
|
120
|
+
/**
|
|
121
|
+
* Computes a fast deterministic 32-bit hash of a resolved CaptionPresetDefinition
|
|
122
|
+
* for use in sub-canvas bounding-box raster cache keys.
|
|
123
|
+
*/
|
|
124
|
+
declare function hashCaptionPreset(preset: CaptionPresetDefinition): string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Caption Engine
|
|
128
|
+
*
|
|
129
|
+
* Handles layout geometry, pagination, word-timing evaluation, and
|
|
130
|
+
* cache key computation for word-timed animated captions.
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
declare const PAUSE_RELEASE_THRESHOLD_MS = 250;
|
|
134
|
+
declare const DEFAULT_MAX_WORDS_PER_LINE = 5;
|
|
135
|
+
declare const DEFAULT_MAX_LINES = 2;
|
|
136
|
+
declare const DEFAULT_PAUSE_BREAK_MS = 350;
|
|
137
|
+
interface CaptionPaginationConfig {
|
|
138
|
+
maxWordsPerLine?: number;
|
|
139
|
+
maxLines?: number;
|
|
140
|
+
pauseBreakMs?: number;
|
|
141
|
+
}
|
|
142
|
+
declare class CaptionEngine {
|
|
143
|
+
/**
|
|
144
|
+
* Paginates a flat stream of words into structured caption cues.
|
|
145
|
+
* Enforces max words per line, max lines, pause thresholds, and punctuation breaks.
|
|
146
|
+
*/
|
|
147
|
+
static paginateWords(words: CaptionWord[], config?: CaptionPaginationConfig): CaptionCue[];
|
|
148
|
+
/**
|
|
149
|
+
* Resolves the active word index within a cue for a given playback time in milliseconds.
|
|
150
|
+
* Returns -1 if no word is active or during the pause release window (> 250ms after speech ends).
|
|
151
|
+
*/
|
|
152
|
+
static resolveActiveWordIndex(cue: CaptionCue, currentTimeMs: number): number;
|
|
153
|
+
/**
|
|
154
|
+
* Builds the canonical raster cache key for a caption frame.
|
|
155
|
+
* Format: `caption:${clipId}:${segmentId}:${activeWordIndex}:${presetHash}:${fontLoaded}`
|
|
156
|
+
*/
|
|
157
|
+
static buildCacheKey(clipId: string, segmentId: string, activeWordIndex: number, preset: CaptionPresetDefinition, fontLoaded: boolean): string;
|
|
158
|
+
/**
|
|
159
|
+
* Computes multi-line word layout and bounding boxes for a cue.
|
|
160
|
+
*/
|
|
161
|
+
static computeLayout(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, cue: CaptionCue, activeWordIndex: number, preset: CaptionPresetDefinition, canvasWidth: number, canvasHeight: number, scale?: number, positionYRatio?: number): {
|
|
162
|
+
bounds: CaptionBounds;
|
|
163
|
+
wordBoxes: CaptionWordBox[];
|
|
164
|
+
lines: CaptionLineLayout[];
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Caption Canvas Renderer
|
|
170
|
+
*
|
|
171
|
+
* Single source of truth for rendering word-timed animated captions.
|
|
172
|
+
* Consumed identically by:
|
|
173
|
+
* 1. Web Worker (templateRasterizer.worker.ts) for off-thread sub-canvas rasterization
|
|
174
|
+
* 2. Main-thread fallback (nativeTextPreview.ts) when Web Workers are unavailable or during export
|
|
175
|
+
* 3. @clypra-studio/engine in web and browser previews
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
declare function renderCaptionToCanvas(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, options: CaptionRenderOptions): CaptionRenderResult;
|
|
179
|
+
|
|
180
|
+
export { BUILT_IN_CAPTION_PRESETS, CAPTION_PRESET_BOLD_PUNCH, CAPTION_PRESET_CINEMATIC_GOLD, CAPTION_PRESET_CLASSIC_SUBTITLE, CAPTION_PRESET_CLEAN_MINIMAL, CAPTION_PRESET_KARAOKE_POP, CAPTION_PRESET_NEON_GLOW, type CaptionBounds, type CaptionCue, CaptionEngine, type CaptionLineLayout, type CaptionPaginationConfig, type CaptionPresetDefinition, type CaptionPresetId, type CaptionRenderOptions, type CaptionRenderResult, type CaptionWord, type CaptionWordBox, DEFAULT_MAX_LINES, DEFAULT_MAX_WORDS_PER_LINE, DEFAULT_PAUSE_BREAK_MS, PAUSE_RELEASE_THRESHOLD_MS, getCaptionPreset, hashCaptionPreset, renderCaptionToCanvas };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BUILT_IN_CAPTION_PRESETS,
|
|
3
|
+
CAPTION_PRESET_BOLD_PUNCH,
|
|
4
|
+
CAPTION_PRESET_CINEMATIC_GOLD,
|
|
5
|
+
CAPTION_PRESET_CLASSIC_SUBTITLE,
|
|
6
|
+
CAPTION_PRESET_CLEAN_MINIMAL,
|
|
7
|
+
CAPTION_PRESET_KARAOKE_POP,
|
|
8
|
+
CAPTION_PRESET_NEON_GLOW,
|
|
9
|
+
CaptionEngine,
|
|
10
|
+
DEFAULT_MAX_LINES,
|
|
11
|
+
DEFAULT_MAX_WORDS_PER_LINE,
|
|
12
|
+
DEFAULT_PAUSE_BREAK_MS,
|
|
13
|
+
PAUSE_RELEASE_THRESHOLD_MS,
|
|
14
|
+
getCaptionPreset,
|
|
15
|
+
hashCaptionPreset,
|
|
16
|
+
renderCaptionToCanvas
|
|
17
|
+
} from "../chunk-MVUSVC4T.js";
|
|
18
|
+
export {
|
|
19
|
+
BUILT_IN_CAPTION_PRESETS,
|
|
20
|
+
CAPTION_PRESET_BOLD_PUNCH,
|
|
21
|
+
CAPTION_PRESET_CINEMATIC_GOLD,
|
|
22
|
+
CAPTION_PRESET_CLASSIC_SUBTITLE,
|
|
23
|
+
CAPTION_PRESET_CLEAN_MINIMAL,
|
|
24
|
+
CAPTION_PRESET_KARAOKE_POP,
|
|
25
|
+
CAPTION_PRESET_NEON_GLOW,
|
|
26
|
+
CaptionEngine,
|
|
27
|
+
DEFAULT_MAX_LINES,
|
|
28
|
+
DEFAULT_MAX_WORDS_PER_LINE,
|
|
29
|
+
DEFAULT_PAUSE_BREAK_MS,
|
|
30
|
+
PAUSE_RELEASE_THRESHOLD_MS,
|
|
31
|
+
getCaptionPreset,
|
|
32
|
+
hashCaptionPreset,
|
|
33
|
+
renderCaptionToCanvas
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|