@overlap.ai/react-video-subtitles 1.0.27 → 1.0.28
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/components/SubtitleText.d.ts +2 -0
- package/dist/components/Subtitles.d.ts +2 -0
- package/dist/hooks/fontLoader.d.ts +1 -0
- package/dist/hooks/useAdjustedPhrases.d.ts +10 -0
- package/dist/hooks/useAdjustedPosition.d.ts +4 -0
- package/dist/hooks/useProcessWords.d.ts +3 -0
- package/dist/hooks/useRelativeNumber.d.ts +2 -0
- package/dist/hooks/useStyleConfig.d.ts +2 -0
- package/dist/hooks/useTextStyle.d.ts +42 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.esm.js +17031 -0
- package/dist/index.js +17039 -0
- package/dist/test/TestComponent.d.ts +1 -0
- package/dist/test/components/FullScreenPreset.d.ts +1 -0
- package/dist/test/components/GridView.d.ts +1 -0
- package/dist/test/components/NewPreset.d.ts +1 -0
- package/dist/test/components/PresetTest.d.ts +1 -0
- package/dist/test/components/SmallTest.d.ts +1 -0
- package/dist/test/components/SwitchableTest.d.ts +1 -0
- package/dist/test/components/controls/ColorPicker.d.ts +7 -0
- package/dist/test/components/controls/Select.d.ts +8 -0
- package/dist/test/components/controls/Slider.d.ts +10 -0
- package/dist/test/components/controls/Switch.d.ts +7 -0
- package/dist/test/constants/testWords.d.ts +5 -0
- package/dist/test/hooks/useAnimationFrame.d.ts +4 -0
- package/dist/test/main.d.ts +1 -0
- package/dist/test/styles/common.d.ts +7 -0
- package/dist/test/utils/loadSubtitlePresets.d.ts +1 -0
- package/dist/types/components.d.ts +20 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/subtitles.d.ts +93 -0
- package/dist/utils/findPhrasesInRange.d.ts +2 -0
- package/dist/utils/loadSubtitlePreset.d.ts +3 -0
- package/dist/utils/saveSubtitlePreset.d.ts +27 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function loadDocumentFonts(fontFamily: any): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function useAdjustedPhrases(subtitlesData: any, maxCharsPerLine: any, fps: any, segmentData?: any[]): {
|
|
2
|
+
startFrame: number;
|
|
3
|
+
endFrame: number;
|
|
4
|
+
durationInFrames: number;
|
|
5
|
+
text: string;
|
|
6
|
+
words: any[];
|
|
7
|
+
start: any;
|
|
8
|
+
end: any;
|
|
9
|
+
segmentIndex: number;
|
|
10
|
+
}[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SegmentWord, Phrase } from '../types/subtitles';
|
|
2
|
+
export declare const processWords: (words: SegmentWord[], fps: number, maxCharsPerLine?: number) => Phrase[];
|
|
3
|
+
export declare const useProcessWords: (words: SegmentWord[], fps: number, maxCharsPerLine?: number) => Phrase[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export function useTextStyle(preset: any, x: any, adjustedY: any, videoWidth: any): {
|
|
2
|
+
position: string;
|
|
3
|
+
left: string;
|
|
4
|
+
top: string;
|
|
5
|
+
transform: string;
|
|
6
|
+
fontFamily: any;
|
|
7
|
+
fontSize: string;
|
|
8
|
+
fontWeight: any;
|
|
9
|
+
color: any;
|
|
10
|
+
amplifiedColor: any;
|
|
11
|
+
amplifiedColors: any;
|
|
12
|
+
amplifySpokenWords: any;
|
|
13
|
+
textCase: any;
|
|
14
|
+
fontStyle: string;
|
|
15
|
+
textAlign: string;
|
|
16
|
+
letterSpacing: string;
|
|
17
|
+
backgroundColor: any;
|
|
18
|
+
backgroundPadding: string;
|
|
19
|
+
backgroundBorderRadius: any;
|
|
20
|
+
verticalStretch: any;
|
|
21
|
+
transformOrigin: string;
|
|
22
|
+
width: string;
|
|
23
|
+
maxWidth: string;
|
|
24
|
+
whiteSpace: string;
|
|
25
|
+
overflow: string;
|
|
26
|
+
outlineColor: any;
|
|
27
|
+
outlineWidth: any;
|
|
28
|
+
filter: string;
|
|
29
|
+
display: string;
|
|
30
|
+
textHighlightPersists: any;
|
|
31
|
+
amplifiedOpacity: any;
|
|
32
|
+
unAmplifiedOpacity: any;
|
|
33
|
+
currentWordBlock: any;
|
|
34
|
+
currentWordBlockBackgroundColor: any;
|
|
35
|
+
currentWordBlockOpacity: any;
|
|
36
|
+
currentWordBlockPadding: any;
|
|
37
|
+
currentWordBlockBorderRadius: any;
|
|
38
|
+
amplifyOpacityTransitionDuration: any;
|
|
39
|
+
textShadow: string;
|
|
40
|
+
shadowIntensity: any;
|
|
41
|
+
backgroundOpacity: any;
|
|
42
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Subtitles } from './components/Subtitles';
|
|
2
|
+
import { SubtitleText } from './components/SubtitleText';
|
|
3
|
+
import { useStyleConfig } from './hooks/useStyleConfig';
|
|
4
|
+
import { useAdjustedPosition } from './hooks/useAdjustedPosition';
|
|
5
|
+
import { useAdjustedPhrases } from './hooks/useAdjustedPhrases';
|
|
6
|
+
import { useTextStyle } from './hooks/useTextStyle';
|
|
7
|
+
import { loadSubtitlePreset } from './utils/loadSubtitlePreset';
|
|
8
|
+
import type { StyleConfig, SubtitlesProps, Phrase, SubtitleComponent, SubtitleTextProps } from './types';
|
|
9
|
+
export { Subtitles, SubtitleText, useStyleConfig, useAdjustedPosition, useAdjustedPhrases, useTextStyle, loadSubtitlePreset, };
|
|
10
|
+
export type { StyleConfig, SubtitlesProps, Phrase, SubtitleComponent, SubtitleTextProps, };
|