@overlap.ai/react-video-subtitles 1.0.25 → 1.0.27
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/package.json +7 -2
- package/dist/components/SubtitleText.d.ts +0 -2
- package/dist/components/Subtitles.d.ts +0 -2
- package/dist/hooks/fontLoader.d.ts +0 -1
- package/dist/hooks/useAdjustedPhrases.d.ts +0 -10
- package/dist/hooks/useAdjustedPosition.d.ts +0 -4
- package/dist/hooks/useProcessWords.d.ts +0 -3
- package/dist/hooks/useRelativeNumber.d.ts +0 -2
- package/dist/hooks/useStyleConfig.d.ts +0 -2
- package/dist/hooks/useTextStyle.d.ts +0 -42
- package/dist/index.d.ts +0 -10
- package/dist/index.esm.js +0 -16885
- package/dist/index.js +0 -16893
- package/dist/test/TestComponent.d.ts +0 -1
- package/dist/test/components/FullScreenPreset.d.ts +0 -1
- package/dist/test/components/GridView.d.ts +0 -1
- package/dist/test/components/NewPreset.d.ts +0 -1
- package/dist/test/components/PresetTest.d.ts +0 -1
- package/dist/test/components/SmallTest.d.ts +0 -1
- package/dist/test/components/SwitchableTest.d.ts +0 -1
- package/dist/test/components/controls/ColorPicker.d.ts +0 -7
- package/dist/test/components/controls/Select.d.ts +0 -8
- package/dist/test/components/controls/Slider.d.ts +0 -10
- package/dist/test/components/controls/Switch.d.ts +0 -7
- package/dist/test/constants/testWords.d.ts +0 -5
- package/dist/test/hooks/useAnimationFrame.d.ts +0 -4
- package/dist/test/main.d.ts +0 -1
- package/dist/test/styles/common.d.ts +0 -7
- package/dist/test/utils/loadSubtitlePresets.d.ts +0 -1
- package/dist/types/components.d.ts +0 -19
- package/dist/types/index.d.ts +0 -2
- package/dist/types/subtitles.d.ts +0 -88
- package/dist/utils/findPhrasesInRange.d.ts +0 -2
- package/dist/utils/loadSubtitlePreset.d.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overlap.ai/react-video-subtitles",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"description": "A React component for rendering animated subtitles in videos",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
"build": "npx rollup -c",
|
|
15
15
|
"typecheck": "tsc --noEmit",
|
|
16
16
|
"test-build": "rm -rf *.tgz && rm -rf dist && npm run build && npm pack && cd test-subtitles && npm uninstall @overlap.ai/react-video-subtitles && rm -rf node_modules && npm install && npm install $(ls ../*.tgz) && npm start",
|
|
17
|
-
"dev": "vite",
|
|
17
|
+
"dev": "concurrently \"vite\" \"node dev-server.js\"",
|
|
18
|
+
"dev:client": "vite",
|
|
19
|
+
"dev:server": "node dev-server.js",
|
|
18
20
|
"test:build": "cd test-subtitles && npm start",
|
|
19
21
|
"test:both": "concurrently \"npm run dev\" \"npm run test:build\""
|
|
20
22
|
},
|
|
@@ -45,7 +47,10 @@
|
|
|
45
47
|
"@types/react-dom": "^18.0.0",
|
|
46
48
|
"@vitejs/plugin-react": "^4.3.4",
|
|
47
49
|
"concurrently": "^8.0.0",
|
|
50
|
+
"cors": "^2.8.5",
|
|
51
|
+
"express": "^4.18.2",
|
|
48
52
|
"firebase": "^10.14.1",
|
|
53
|
+
"firebase-admin": "^12.0.0",
|
|
49
54
|
"postcss": "^8.4.0",
|
|
50
55
|
"rollup": "^3.0.0",
|
|
51
56
|
"rollup-plugin-copy": "^3.5.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function loadDocumentFonts(fontFamily: any): Promise<void>;
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}[];
|
|
@@ -1,3 +0,0 @@
|
|
|
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[];
|
|
@@ -1,42 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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, };
|