@twick/video-editor 0.14.0 → 0.14.3
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/README.md +135 -19
- package/dist/components/controls/player-controls.d.ts +34 -1
- package/dist/components/video-editor.d.ts +94 -8
- package/dist/helpers/animation-manager.d.ts +35 -0
- package/dist/helpers/constants.d.ts +145 -25
- package/dist/helpers/text-effects-manager.d.ts +32 -0
- package/dist/helpers/types.d.ts +150 -0
- package/dist/hooks/use-player-control.d.ts +15 -0
- package/dist/hooks/use-player-manager.d.ts +17 -0
- package/dist/hooks/use-timeline-control.d.ts +18 -0
- package/dist/hooks/use-timeline-manager.d.ts +18 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +106 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +106 -22
- package/dist/index.mjs.map +1 -1
- package/dist/video-editor.css +493 -470
- package/package.json +14 -14
- package/LICENSE +0 -197
package/README.md
CHANGED
|
@@ -1,19 +1,135 @@
|
|
|
1
|
-
# @twick/video-editor
|
|
2
|
-
|
|
3
|
-
A React component for video editing and timeline management
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
# @twick/video-editor
|
|
2
|
+
|
|
3
|
+
A React component for video editing and timeline management with advanced features.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This package provides a comprehensive video editing interface with timeline management, multi-track support, and real-time preview capabilities. It integrates seamlessly with other Twick packages to create a complete video editing solution.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- Video preview with custom controls
|
|
12
|
+
- Timeline-based editing interface
|
|
13
|
+
- Multi-track timeline support
|
|
14
|
+
- Customizable video dimensions
|
|
15
|
+
- Drag-and-drop timeline reordering
|
|
16
|
+
- High-performance video rendering
|
|
17
|
+
- Real-time project updates
|
|
18
|
+
- Advanced timeline manipulation
|
|
19
|
+
- Professional editing tools
|
|
20
|
+
|
|
21
|
+
## Requirements
|
|
22
|
+
|
|
23
|
+
- React 18 or higher
|
|
24
|
+
- Browser environment with HTML5 Video support
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install @twick/video-editor
|
|
30
|
+
# or
|
|
31
|
+
pnpm add @twick/video-editor
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
import { VideoEditor } from '@twick/video-editor';
|
|
38
|
+
import { LivePlayerProvider } from '@twick/live-player';
|
|
39
|
+
import { TimelineProvider } from '@twick/timeline';
|
|
40
|
+
|
|
41
|
+
function App() {
|
|
42
|
+
return (
|
|
43
|
+
<LivePlayerProvider>
|
|
44
|
+
<TimelineProvider
|
|
45
|
+
initialData={{
|
|
46
|
+
timeline: [],
|
|
47
|
+
version: 0,
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
<VideoEditor
|
|
51
|
+
leftPanel={null}
|
|
52
|
+
rightPanel={null}
|
|
53
|
+
editorConfig={{
|
|
54
|
+
videoProps: {
|
|
55
|
+
width: 720,
|
|
56
|
+
height: 1280,
|
|
57
|
+
},
|
|
58
|
+
}}
|
|
59
|
+
/>
|
|
60
|
+
</TimelineProvider>
|
|
61
|
+
</LivePlayerProvider>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Key Features
|
|
67
|
+
|
|
68
|
+
### Video Preview
|
|
69
|
+
- Real-time video playback with custom controls
|
|
70
|
+
- Frame-accurate timeline scrubbing
|
|
71
|
+
- Multiple preview quality options
|
|
72
|
+
- Responsive video display
|
|
73
|
+
|
|
74
|
+
### Timeline Management
|
|
75
|
+
- Multi-track timeline interface
|
|
76
|
+
- Drag-and-drop element reordering
|
|
77
|
+
- Visual timeline representation
|
|
78
|
+
- Time-based element positioning
|
|
79
|
+
|
|
80
|
+
### Editing Tools
|
|
81
|
+
- Text overlay capabilities
|
|
82
|
+
- Image and video element support
|
|
83
|
+
- Audio track management
|
|
84
|
+
- Effect and transition tools
|
|
85
|
+
|
|
86
|
+
### Performance
|
|
87
|
+
- Optimized rendering pipeline
|
|
88
|
+
- Efficient memory management
|
|
89
|
+
- Smooth playback performance
|
|
90
|
+
- Real-time updates
|
|
91
|
+
|
|
92
|
+
## API Reference
|
|
93
|
+
|
|
94
|
+
### Components
|
|
95
|
+
|
|
96
|
+
- `VideoEditor`: Main video editor component
|
|
97
|
+
|
|
98
|
+
### Props
|
|
99
|
+
|
|
100
|
+
- `leftPanel`: Custom left panel component
|
|
101
|
+
- `rightPanel`: Custom right panel component
|
|
102
|
+
- `editorConfig`: Editor configuration object
|
|
103
|
+
- `videoProps`: Video properties configuration
|
|
104
|
+
|
|
105
|
+
### Types
|
|
106
|
+
|
|
107
|
+
- `VideoEditorProps`: Props interface for VideoEditor
|
|
108
|
+
- `EditorConfig`: Editor configuration interface
|
|
109
|
+
- `VideoProps`: Video properties interface
|
|
110
|
+
|
|
111
|
+
For complete API documentation, refer to the generated documentation.
|
|
112
|
+
|
|
113
|
+
## Browser Support
|
|
114
|
+
|
|
115
|
+
This package requires a browser environment with support for:
|
|
116
|
+
- HTML5 Video and Audio
|
|
117
|
+
- Canvas API
|
|
118
|
+
- Drag and Drop API
|
|
119
|
+
- Modern JavaScript features (ES2020+)
|
|
120
|
+
|
|
121
|
+
## Documentation
|
|
122
|
+
|
|
123
|
+
For complete documentation, refer to the project documentation site.
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
This package is licensed under the **Sustainable Use License (SUL) Version 1.0**.
|
|
128
|
+
|
|
129
|
+
- Free for use in commercial and non-commercial apps
|
|
130
|
+
- Can be modified and self-hosted
|
|
131
|
+
- Cannot be sold, rebranded, or distributed as a standalone SDK
|
|
132
|
+
|
|
133
|
+
For commercial licensing inquiries, contact: contact@kifferai.com
|
|
134
|
+
|
|
135
|
+
For full license terms, see the main LICENSE.md file in the project root.
|
|
@@ -2,18 +2,51 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { PLAYER_STATE } from '@twick/live-player';
|
|
3
3
|
import { TrackElement, Track } from '@twick/timeline';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Props for the PlayerControls component.
|
|
7
|
+
* Defines the configuration options and callback functions for player controls.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```jsx
|
|
11
|
+
* <PlayerControls
|
|
12
|
+
* selectedItem={selectedElement}
|
|
13
|
+
* currentTime={5.5}
|
|
14
|
+
* duration={120}
|
|
15
|
+
* canUndo={true}
|
|
16
|
+
* canRedo={false}
|
|
17
|
+
* playerState={PLAYER_STATE.PLAYING}
|
|
18
|
+
* togglePlayback={handleTogglePlayback}
|
|
19
|
+
* onUndo={handleUndo}
|
|
20
|
+
* onRedo={handleRedo}
|
|
21
|
+
* onDelete={handleDelete}
|
|
22
|
+
* onSplit={handleSplit}
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export interface PlayerControlsProps {
|
|
27
|
+
/** Currently selected timeline element or track */
|
|
6
28
|
selectedItem: TrackElement | Track | null;
|
|
29
|
+
/** Current playback time in seconds */
|
|
7
30
|
currentTime: number;
|
|
31
|
+
/** Total duration of the timeline in seconds */
|
|
8
32
|
duration: number;
|
|
33
|
+
/** Whether undo operation is available */
|
|
9
34
|
canUndo: boolean;
|
|
35
|
+
/** Whether redo operation is available */
|
|
10
36
|
canRedo: boolean;
|
|
37
|
+
/** Current player state (playing, paused, refresh) */
|
|
11
38
|
playerState: keyof typeof PLAYER_STATE;
|
|
39
|
+
/** Function to toggle between play and pause */
|
|
12
40
|
togglePlayback: () => void;
|
|
41
|
+
/** Optional callback for undo operation */
|
|
13
42
|
onUndo?: () => void;
|
|
43
|
+
/** Optional callback for redo operation */
|
|
14
44
|
onRedo?: () => void;
|
|
45
|
+
/** Optional callback for delete operation */
|
|
15
46
|
onDelete?: (item: TrackElement | Track) => void;
|
|
47
|
+
/** Optional callback for split operation */
|
|
16
48
|
onSplit?: (item: TrackElement, splitTime: number) => void;
|
|
49
|
+
/** Optional CSS class name for styling */
|
|
17
50
|
className?: string;
|
|
18
51
|
}
|
|
19
52
|
declare const PlayerControls: React.FC<PlayerControlsProps>;
|
|
@@ -1,18 +1,104 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for the video editor.
|
|
5
|
+
* Defines the video properties and editor behavior settings.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```js
|
|
9
|
+
* const editorConfig = {
|
|
10
|
+
* videoProps: { width: 1920, height: 1080 },
|
|
11
|
+
* canvasMode: true
|
|
12
|
+
* };
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export interface VideoEditorConfig {
|
|
16
|
+
/** Video dimensions and properties */
|
|
17
|
+
videoProps: {
|
|
18
|
+
/** Width of the video in pixels */
|
|
19
|
+
width: number;
|
|
20
|
+
/** Height of the video in pixels */
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
/** Whether to use canvas mode for rendering */
|
|
24
|
+
canvasMode?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for the VideoEditor component.
|
|
28
|
+
* Defines the configuration options and custom panels for the video editor.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```jsx
|
|
32
|
+
* <VideoEditor
|
|
33
|
+
* leftPanel={<MediaPanel />}
|
|
34
|
+
* rightPanel={<PropertiesPanel />}
|
|
35
|
+
* bottomPanel={<EffectsPanel />}
|
|
36
|
+
* editorConfig={{
|
|
37
|
+
* videoProps: { width: 1920, height: 1080 },
|
|
38
|
+
* canvasMode: true
|
|
39
|
+
* }}
|
|
40
|
+
* defaultPlayControls={true}
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export interface VideoEditorProps {
|
|
45
|
+
/** Custom left panel component (e.g., media library) */
|
|
4
46
|
leftPanel?: React.ReactNode;
|
|
47
|
+
/** Custom right panel component (e.g., properties inspector) */
|
|
5
48
|
rightPanel?: React.ReactNode;
|
|
49
|
+
/** Custom bottom panel component (e.g., effects library) */
|
|
6
50
|
bottomPanel?: React.ReactNode;
|
|
51
|
+
/** Custom play controls component */
|
|
7
52
|
playControls?: React.ReactNode;
|
|
53
|
+
/** Whether to show default play controls if no custom controls provided */
|
|
8
54
|
defaultPlayControls?: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
width: number;
|
|
12
|
-
height: number;
|
|
13
|
-
};
|
|
14
|
-
canvasMode?: boolean;
|
|
15
|
-
};
|
|
55
|
+
/** Editor configuration including video properties and mode settings */
|
|
56
|
+
editorConfig: VideoEditorConfig;
|
|
16
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* VideoEditor is the main component for the Twick video editing interface.
|
|
60
|
+
* Provides a complete video editing environment with timeline management,
|
|
61
|
+
* player controls, and customizable panels for media, properties, and effects.
|
|
62
|
+
*
|
|
63
|
+
* The editor consists of:
|
|
64
|
+
* - Left panel: Media library and assets
|
|
65
|
+
* - Center: Video player and preview
|
|
66
|
+
* - Right panel: Properties and settings
|
|
67
|
+
* - Bottom: Timeline and track management
|
|
68
|
+
* - Controls: Playback controls and timeline zoom
|
|
69
|
+
*
|
|
70
|
+
* @param props - VideoEditor configuration and custom panels
|
|
71
|
+
* @returns Complete video editing interface
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```jsx
|
|
75
|
+
* import VideoEditor from '@twick/video-editor';
|
|
76
|
+
*
|
|
77
|
+
* function MyVideoEditor() {
|
|
78
|
+
* return (
|
|
79
|
+
* <VideoEditor
|
|
80
|
+
* leftPanel={<MediaLibrary />}
|
|
81
|
+
* rightPanel={<PropertiesPanel />}
|
|
82
|
+
* bottomPanel={<EffectsPanel />}
|
|
83
|
+
* editorConfig={{
|
|
84
|
+
* videoProps: { width: 1920, height: 1080 },
|
|
85
|
+
* canvasMode: true
|
|
86
|
+
* }}
|
|
87
|
+
* defaultPlayControls={true}
|
|
88
|
+
* />
|
|
89
|
+
* );
|
|
90
|
+
* }
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```jsx
|
|
95
|
+
* // Minimal configuration
|
|
96
|
+
* <VideoEditor
|
|
97
|
+
* editorConfig={{
|
|
98
|
+
* videoProps: { width: 1280, height: 720 }
|
|
99
|
+
* }}
|
|
100
|
+
* />
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
17
103
|
declare const VideoEditor: React.FC<VideoEditorProps>;
|
|
18
104
|
export default VideoEditor;
|
|
@@ -1,3 +1,38 @@
|
|
|
1
1
|
import { Animation } from './types';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Collection of available animations for video editor elements.
|
|
5
|
+
* Provides predefined animation configurations with sample previews
|
|
6
|
+
* that can be applied to timeline elements.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```js
|
|
10
|
+
* import { ANIMATIONS } from '@twick/video-editor';
|
|
11
|
+
*
|
|
12
|
+
* // Get all available animations
|
|
13
|
+
* const allAnimations = ANIMATIONS;
|
|
14
|
+
*
|
|
15
|
+
* // Find a specific animation
|
|
16
|
+
* const fadeAnimation = ANIMATIONS.find(anim => anim.name === 'fade');
|
|
17
|
+
*
|
|
18
|
+
* // Get animation sample
|
|
19
|
+
* const sampleGif = fadeAnimation.getSample();
|
|
20
|
+
*
|
|
21
|
+
* // Apply animation to element
|
|
22
|
+
* element.setAnimation(fadeAnimation);
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```js
|
|
27
|
+
* // Use animation with custom settings
|
|
28
|
+
* const riseAnimation = ANIMATIONS.find(anim => anim.name === 'rise');
|
|
29
|
+
* const customRise = {
|
|
30
|
+
* ...riseAnimation,
|
|
31
|
+
* direction: 'down',
|
|
32
|
+
* interval: 2
|
|
33
|
+
* };
|
|
34
|
+
*
|
|
35
|
+
* element.setAnimation(customRise);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
3
38
|
export declare const ANIMATIONS: Animation[];
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { ElementColors } from './types';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Initial timeline data structure for new video editor projects.
|
|
5
|
+
* Provides a default timeline with a sample text element to get started.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```js
|
|
9
|
+
* import { INITIAL_TIMELINE_DATA } from '@twick/video-editor';
|
|
10
|
+
*
|
|
11
|
+
* // Use as starting point for new projects
|
|
12
|
+
* const newProject = {
|
|
13
|
+
* ...INITIAL_TIMELINE_DATA,
|
|
14
|
+
* tracks: [...INITIAL_TIMELINE_DATA.tracks, newTrack]
|
|
15
|
+
* };
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
3
18
|
export declare const INITIAL_TIMELINE_DATA: {
|
|
4
19
|
tracks: {
|
|
5
20
|
type: string;
|
|
@@ -20,35 +35,140 @@ export declare const INITIAL_TIMELINE_DATA: {
|
|
|
20
35
|
}[];
|
|
21
36
|
version: number;
|
|
22
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Minimum duration for timeline elements in seconds.
|
|
40
|
+
* Used to prevent elements from having zero or negative duration.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```js
|
|
44
|
+
* import { MIN_DURATION } from '@twick/video-editor';
|
|
45
|
+
*
|
|
46
|
+
* const elementDuration = Math.max(duration, MIN_DURATION);
|
|
47
|
+
* // Ensures element has at least 0.1 seconds duration
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
23
50
|
export declare const MIN_DURATION = 0.1;
|
|
51
|
+
/**
|
|
52
|
+
* Drag operation types for timeline interactions.
|
|
53
|
+
* Defines the different phases of drag operations on timeline elements.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```js
|
|
57
|
+
* import { DRAG_TYPE } from '@twick/video-editor';
|
|
58
|
+
*
|
|
59
|
+
* function handleDrag(type) {
|
|
60
|
+
* switch (type) {
|
|
61
|
+
* case DRAG_TYPE.START:
|
|
62
|
+
* // Handle drag start
|
|
63
|
+
* break;
|
|
64
|
+
* case DRAG_TYPE.MOVE:
|
|
65
|
+
* // Handle drag move
|
|
66
|
+
* break;
|
|
67
|
+
* case DRAG_TYPE.END:
|
|
68
|
+
* // Handle drag end
|
|
69
|
+
* break;
|
|
70
|
+
* }
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
24
74
|
export declare const DRAG_TYPE: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
75
|
+
/** Drag operation is starting */
|
|
76
|
+
readonly START: "start";
|
|
77
|
+
/** Drag operation is in progress */
|
|
78
|
+
readonly MOVE: "move";
|
|
79
|
+
/** Drag operation has ended */
|
|
80
|
+
readonly END: "end";
|
|
28
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* Default zoom level for timeline view.
|
|
84
|
+
* Controls the initial magnification of the timeline interface.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```js
|
|
88
|
+
* import { DEFAULT_TIMELINE_ZOOM } from '@twick/video-editor';
|
|
89
|
+
*
|
|
90
|
+
* const [zoom, setZoom] = useState(DEFAULT_TIMELINE_ZOOM);
|
|
91
|
+
* // Timeline starts with 1.5x zoom
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
29
94
|
export declare const DEFAULT_TIMELINE_ZOOM = 1.5;
|
|
95
|
+
/**
|
|
96
|
+
* Default color scheme for different element types in the timeline.
|
|
97
|
+
* Provides consistent visual distinction between various timeline elements.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```js
|
|
101
|
+
* import { DEFAULT_ELEMENT_COLORS } from '@twick/video-editor';
|
|
102
|
+
*
|
|
103
|
+
* const videoColor = DEFAULT_ELEMENT_COLORS.video; // "#4B2E83"
|
|
104
|
+
* const textColor = DEFAULT_ELEMENT_COLORS.text; // "#375A7F"
|
|
105
|
+
*
|
|
106
|
+
* // Apply colors to timeline elements
|
|
107
|
+
* element.style.backgroundColor = DEFAULT_ELEMENT_COLORS[element.type];
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
30
110
|
export declare const DEFAULT_ELEMENT_COLORS: ElementColors;
|
|
111
|
+
/**
|
|
112
|
+
* Available text fonts for video editor text elements.
|
|
113
|
+
* Includes Google Fonts, display fonts, and custom CDN fonts.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```js
|
|
117
|
+
* import { AVAILABLE_TEXT_FONTS } from '@twick/video-editor';
|
|
118
|
+
*
|
|
119
|
+
* // Use Google Fonts
|
|
120
|
+
* const googleFont = AVAILABLE_TEXT_FONTS.ROBOTO; // "Roboto"
|
|
121
|
+
*
|
|
122
|
+
* // Use decorative fonts
|
|
123
|
+
* const decorativeFont = AVAILABLE_TEXT_FONTS.BANGERS; // "Bangers"
|
|
124
|
+
*
|
|
125
|
+
* // Apply font to text element
|
|
126
|
+
* textElement.style.fontFamily = AVAILABLE_TEXT_FONTS.POPPINS;
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
31
129
|
export declare const AVAILABLE_TEXT_FONTS: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
130
|
+
/** Modern sans-serif font */
|
|
131
|
+
readonly RUBIK: "Rubik";
|
|
132
|
+
/** Clean and readable font */
|
|
133
|
+
readonly MULISH: "Mulish";
|
|
134
|
+
/** Bold display font */
|
|
135
|
+
readonly LUCKIEST_GUY: "Luckiest Guy";
|
|
136
|
+
/** Elegant serif font */
|
|
137
|
+
readonly PLAYFAIR_DISPLAY: "Playfair Display";
|
|
138
|
+
/** Classic sans-serif font */
|
|
139
|
+
readonly ROBOTO: "Roboto";
|
|
140
|
+
/** Modern geometric font */
|
|
141
|
+
readonly POPPINS: "Poppins";
|
|
142
|
+
/** Comic-style display font */
|
|
143
|
+
readonly BANGERS: "Bangers";
|
|
144
|
+
/** Handwritten-style font */
|
|
145
|
+
readonly BIRTHSTONE: "Birthstone";
|
|
146
|
+
/** Elegant script font */
|
|
147
|
+
readonly CORINTHIA: "Corinthia";
|
|
148
|
+
/** Formal script font */
|
|
149
|
+
readonly IMPERIAL_SCRIPT: "Imperial Script";
|
|
150
|
+
/** Bold outline font */
|
|
151
|
+
readonly KUMAR_ONE_OUTLINE: "Kumar One Outline";
|
|
152
|
+
/** Light outline font */
|
|
153
|
+
readonly LONDRI_OUTLINE: "Londrina Outline";
|
|
154
|
+
/** Casual script font */
|
|
155
|
+
readonly MARCK_SCRIPT: "Marck Script";
|
|
156
|
+
/** Modern sans-serif font */
|
|
157
|
+
readonly MONTSERRAT: "Montserrat";
|
|
158
|
+
/** Stylish display font */
|
|
159
|
+
readonly PATTAYA: "Pattaya";
|
|
160
|
+
/** Unique display font */
|
|
161
|
+
readonly PERALTA: "Peralta";
|
|
162
|
+
/** Bold impact font */
|
|
163
|
+
readonly IMPACT: "Impact";
|
|
164
|
+
/** Handwritten-style font */
|
|
165
|
+
readonly LUMANOSIMO: "Lumanosimo";
|
|
166
|
+
/** Custom display font */
|
|
167
|
+
readonly KAPAKANA: "Kapakana";
|
|
168
|
+
/** Handwritten font */
|
|
169
|
+
readonly HANDYRUSH: "HandyRush";
|
|
170
|
+
/** Decorative font */
|
|
171
|
+
readonly DASHER: "Dasher";
|
|
172
|
+
/** Signature-style font */
|
|
173
|
+
readonly BRITTANY_SIGNATURE: "Brittany Signature";
|
|
54
174
|
};
|
|
@@ -1,3 +1,35 @@
|
|
|
1
1
|
import { TextEffect } from './types';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Collection of available text effects for video editor text elements.
|
|
5
|
+
* Provides predefined text animation configurations that can be applied
|
|
6
|
+
* to text elements in the timeline.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```js
|
|
10
|
+
* import { TEXT_EFFECTS } from '@twick/video-editor';
|
|
11
|
+
*
|
|
12
|
+
* // Get all available text effects
|
|
13
|
+
* const allTextEffects = TEXT_EFFECTS;
|
|
14
|
+
*
|
|
15
|
+
* // Find a specific text effect
|
|
16
|
+
* const typewriterEffect = TEXT_EFFECTS.find(effect => effect.name === 'typewriter');
|
|
17
|
+
*
|
|
18
|
+
* // Apply text effect to element
|
|
19
|
+
* textElement.setTextEffect(typewriterEffect);
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```js
|
|
24
|
+
* // Use text effect with custom settings
|
|
25
|
+
* const elasticEffect = TEXT_EFFECTS.find(effect => effect.name === 'elastic');
|
|
26
|
+
* const customElastic = {
|
|
27
|
+
* ...elasticEffect,
|
|
28
|
+
* delay: 0.5,
|
|
29
|
+
* bufferTime: 0.2
|
|
30
|
+
* };
|
|
31
|
+
*
|
|
32
|
+
* textElement.setTextEffect(customElastic);
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
3
35
|
export declare const TEXT_EFFECTS: TextEffect[];
|