@twick/video-editor 0.14.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.
Files changed (34) hide show
  1. package/LICENSE +197 -0
  2. package/README.md +19 -0
  3. package/dist/assets/index.d.ts +19 -0
  4. package/dist/components/controls/control-manager.d.ts +5 -0
  5. package/dist/components/controls/player-controls.d.ts +20 -0
  6. package/dist/components/controls/seek-control.d.ts +7 -0
  7. package/dist/components/controls/timeline-zoom.d.ts +8 -0
  8. package/dist/components/controls/undo-redo-controls.d.ts +8 -0
  9. package/dist/components/player/player-manager.d.ts +8 -0
  10. package/dist/components/timeline/timeline-manager.d.ts +5 -0
  11. package/dist/components/timeline/timeline-view.d.ts +23 -0
  12. package/dist/components/track/seek-track.d.ts +10 -0
  13. package/dist/components/track/track-base.d.ts +21 -0
  14. package/dist/components/track/track-element.d.ts +21 -0
  15. package/dist/components/track/track-header.d.ts +13 -0
  16. package/dist/components/video-editor.d.ts +18 -0
  17. package/dist/helpers/animation-manager.d.ts +3 -0
  18. package/dist/helpers/constants.d.ts +54 -0
  19. package/dist/helpers/editor.utils.d.ts +4 -0
  20. package/dist/helpers/media-manager/base-media-manager.d.ts +18 -0
  21. package/dist/helpers/media-manager/browser-media-manager.d.ts +25 -0
  22. package/dist/helpers/text-effects-manager.d.ts +3 -0
  23. package/dist/helpers/types.d.ts +50 -0
  24. package/dist/hooks/use-player-control.d.ts +3 -0
  25. package/dist/hooks/use-player-manager.d.ts +11 -0
  26. package/dist/hooks/use-timeline-control.d.ts +9 -0
  27. package/dist/hooks/use-timeline-manager.d.ts +18 -0
  28. package/dist/index.d.ts +17 -0
  29. package/dist/index.js +17900 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/index.mjs +17900 -0
  32. package/dist/index.mjs.map +1 -0
  33. package/dist/video-editor.css +471 -0
  34. package/package.json +57 -0
@@ -0,0 +1,471 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap');@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Birthstone&family=Corinthia:wght@400;700&family=Imperial+Script&family=Kumar+One+Outline&family=Londrina+Outline&family=Marck+Script&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Pattaya&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');@import url('https://fonts.cdnfonts.com/css/peralta');@import url('https://fonts.cdnfonts.com/css/impact');@import url('https://fonts.cdnfonts.com/css/lumanosimo');@import url('https://fonts.cdnfonts.com/css/kapakana');@import url('https://fonts.cdnfonts.com/css/handyrush');@import url('https://fonts.cdnfonts.com/css/dasher');@import url('https://fonts.cdnfonts.com/css/brittany-signature');
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+ .twick-editor-main-container {
14
+ display: flex;
15
+ flex-direction: column;
16
+ width: 100%;
17
+ height: 100%;
18
+ gap: 6px;
19
+ }
20
+ .twick-editor-view-section {
21
+ display: flex;
22
+ flex-direction: row;
23
+ justify-content: space-between;
24
+ gap: 6px;
25
+ width: 100%;
26
+ height: 100%;
27
+ }
28
+ .twick-editor-timeline-section {
29
+ display: flex;
30
+ flex-direction: row;
31
+ width: 100%;
32
+ height: 100%;
33
+ background-color: #252525;
34
+ border-radius: 10px;
35
+ overflow-x: hidden;
36
+ }
37
+ .twick-editor-container {
38
+ position: relative;
39
+ height: 80dvh;
40
+ overflow: hidden;
41
+ border-radius: 10px;
42
+ background-color: #000;
43
+ color: #fff;
44
+ }
45
+ .twick-editor-canvas-container {
46
+ position: absolute;
47
+ top: 0;
48
+ left: 0;
49
+ width: 100%;
50
+ height: 100%;
51
+ }
52
+ .twick-editor-canvas {
53
+ width: 100%;
54
+ height: 100%;
55
+ }.twick-timeline-scroll-container {
56
+ display: flex;
57
+ flex-direction: column;
58
+ flex: 1;
59
+ overflow-x: auto;
60
+ overflow-y: hidden;
61
+ }
62
+ /* Timeline Container Styles */
63
+ .twick-timeline-container {
64
+ display: flex;
65
+ height: 2.75rem;
66
+ position: relative;
67
+ }
68
+
69
+ .twick-timeline-header-container {
70
+ position: sticky;
71
+ left: 0;
72
+ z-index: 30;
73
+ }
74
+
75
+ .twick-seek-track-container {
76
+ display: flex;
77
+ position: relative;
78
+ min-width: 100%;
79
+ height: 2rem;
80
+ width: 100%;
81
+ }
82
+
83
+ .twick-seek-track-empty-space {
84
+ position: sticky;
85
+ left: 0;
86
+ z-index: 40;
87
+ display: flex;
88
+ flex-grow: 0;
89
+ min-width: 40px;
90
+ height: 34px;
91
+ background-color: #171717;
92
+ }
93
+
94
+ .twick-seek-track {
95
+ position: relative;
96
+ width: 100%;
97
+ border-top: 1px solid #262626;
98
+ border-bottom: 1px solid #262626;
99
+ background-color: #171717;
100
+ }
101
+
102
+ .twick-seek-track-canvas {
103
+ min-width: 100%;
104
+ height: 2rem;
105
+ }
106
+
107
+ .twick-seek-track-playhead {
108
+ position: absolute;
109
+ top: 0;
110
+ left: 0;
111
+ z-index: 30;
112
+ cursor: ew-resize;
113
+ width: 100%;
114
+ height: 100%;
115
+ }
116
+
117
+ .twick-seek-track-pin {
118
+ position: absolute;
119
+ top: 0;
120
+ left: 0;
121
+ z-index: 30;
122
+ width: 1.5px;
123
+ height: 100%;
124
+ background-color: #FFFFFF;
125
+ }
126
+
127
+ .twick-seek-track-handle {
128
+ position: absolute;
129
+ top: 0;
130
+ left: 0;
131
+ width: 0.75rem;
132
+ height: 0.75rem;
133
+ transform: translate(-50%, -50%);
134
+ background-color: #FFFFFF;
135
+ border-radius: 25%;
136
+ }
137
+
138
+ .twick-track-element {
139
+ position: absolute;
140
+ height: 100%;
141
+ cursor: pointer;
142
+ border-radius: 6px;
143
+ transition: background-color 0.2s ease-in-out;
144
+ }
145
+
146
+ .twick-track-element-selected {
147
+ border: 2px solid #FFFFFF;
148
+ z-index: 10;
149
+ box-shadow: 0 0 0 1px rgba(255,255,255,0.8);
150
+ }
151
+
152
+ .twick-track-element-default {
153
+ border: 1px solid #d1d1d1;
154
+ }
155
+
156
+ .twick-track-element-dragging {
157
+ border: 1px solid #ffffff;
158
+ }
159
+
160
+ .twick-track-element-content {
161
+ width: 100%;
162
+ height: 100%;
163
+ cursor: grab;
164
+ transition: background-color 0.2s ease-in-out;
165
+ padding: 0.25rem;
166
+ white-space: nowrap;
167
+ overflow: hidden;
168
+ text-overflow: ellipsis;
169
+ }
170
+
171
+ .twick-track-element-handle {
172
+ position: absolute;
173
+ width: 2px;
174
+ height: 60%;
175
+ cursor: ew-resize;
176
+ transition: background-color 0.2s ease-in-out;
177
+ top: 50%;
178
+ transform: translate(-50%, -50%);
179
+ background-color: #FFFFFF;
180
+ border-radius: 25%;
181
+ z-index: 10;
182
+ }
183
+
184
+ .twick-track-element-handle-start {
185
+ left: 0px;
186
+ }
187
+
188
+ .twick-track-element-handle-end {
189
+ right: -2px;
190
+ }
191
+
192
+ .twick-track-element-frame-effect {
193
+ position: absolute;
194
+ flex: 1;
195
+ top: 0;
196
+ display: flex;
197
+ align-items: center;
198
+ padding: 0 0.5rem;
199
+ font-size: 0.75rem;
200
+ opacity: 0.5;
201
+ }
202
+
203
+ .twick-track-header {
204
+ display: flex;
205
+ flex: none;
206
+ position: relative;
207
+ width: 40px;
208
+ height: 100%;
209
+ background-color: #171717;
210
+ border-right: 1px solid #262626;
211
+ align-items: center;
212
+ }
213
+
214
+
215
+ .twick-track-header-selected {
216
+ border: 2px solid #FFFFFF;
217
+ z-index: 10;
218
+ box-shadow: 0 0 0 1px rgba(255,255,255,0.8);
219
+ outline: 2px solid #FFFFFF;
220
+ }
221
+
222
+ .twick-track-header-default {
223
+ border: 1px solid #404040;
224
+ }
225
+
226
+ .twick-track-header-lock {
227
+ position: absolute;
228
+ top: 14px;
229
+ right: 2px;
230
+ width: 16px;
231
+ height: 16px;
232
+ z-index: 20;
233
+ color: #333;
234
+ }
235
+
236
+ .twick-track-header-content {
237
+ display: flex;
238
+ align-items: center;
239
+ width: 100%;
240
+ height: 100%;
241
+ padding: 0 0.5rem;
242
+ }
243
+
244
+ .twick-track-header-grip {
245
+ display: flex;
246
+ align-items: center;
247
+ justify-content: center;
248
+ margin-top: 4px;
249
+ width: 20px;
250
+ height: 20px;
251
+ cursor: grab;
252
+ }
253
+
254
+ .twick-track-header-name {
255
+ display: flex;
256
+ align-items: center;
257
+ width: 100%;
258
+ height: 100%;
259
+ padding: 0 0.5rem;
260
+ }
261
+
262
+ .twick-track {
263
+ min-width: 100%;
264
+ position: relative;
265
+ height: 2.5rem;
266
+ margin-top: 2px;
267
+ background-color: #474747;
268
+ }
269
+ .player-controls {
270
+ background: #474747;
271
+ padding: 12px 16px;
272
+ display: flex;
273
+ flex-direction: column;
274
+ gap: 12px;
275
+ -webkit-user-select: none;
276
+ -moz-user-select: none;
277
+ user-select: none;
278
+ max-height: 200px;
279
+ }
280
+
281
+ .player-controls-top {
282
+ display: flex;
283
+ align-items: center;
284
+ justify-content: space-between;
285
+ gap: 16px;
286
+ height: 40px;
287
+ }
288
+
289
+ /* Edit Controls (Left Section) */
290
+ .edit-controls {
291
+ display: flex;
292
+ align-items: center;
293
+ gap: 8px;
294
+ }
295
+
296
+ /* Playback Controls (Center Section) */
297
+ .playback-controls {
298
+ display: flex;
299
+ align-items: center;
300
+ gap: 24px;
301
+ flex: 1;
302
+ justify-content: space-around;
303
+ }
304
+
305
+ /* Time Display (Right Section) */
306
+ .time-display {
307
+ display: flex;
308
+ align-items: center;
309
+ gap: 6px;
310
+ font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
311
+ font-size: 14px;
312
+ color: #fff;
313
+ min-width: 80px;
314
+ justify-content: flex-end;
315
+ }
316
+
317
+ .current-time {
318
+ color: #fff;
319
+ font-weight: 500;
320
+ }
321
+
322
+ .time-separator {
323
+ color: #666;
324
+ margin: 0 2px;
325
+ }
326
+
327
+ .total-time {
328
+ color: #999;
329
+ }
330
+
331
+ /* Control Buttons */
332
+ .control-btn {
333
+ display: flex;
334
+ align-items: center;
335
+ gap: 6px;
336
+ padding: 8px 12px;
337
+ background: #2a2a2a;
338
+ border: 1px solid #444;
339
+ border-radius: 6px;
340
+ color: #fff;
341
+ font-size: 13px;
342
+ font-weight: 500;
343
+ cursor: pointer;
344
+ transition: all 0.15s ease;
345
+ white-space: nowrap;
346
+ min-height: 36px;
347
+ }
348
+
349
+ .control-btn:hover {
350
+ background: #3a3a3a;
351
+ border-color: #555;
352
+ }
353
+
354
+ .control-btn:active {
355
+ transform: translateY(1px);
356
+ background: #1a1a1a;
357
+ }
358
+
359
+ .control-btn:disabled {
360
+ opacity: 0.5;
361
+ cursor: not-allowed;
362
+ pointer-events: none;
363
+ }
364
+
365
+ .control-btn svg {
366
+ flex-shrink: 0;
367
+ }
368
+
369
+ /* Specific Button Styles */
370
+ .play-pause-btn {
371
+ background: #0066cc;
372
+ border-color: #0066cc;
373
+ padding: 8px;
374
+ min-width: 44px;
375
+ justify-content: center;
376
+ }
377
+
378
+ .play-pause-btn:hover {
379
+ background: #0077dd;
380
+ border-color: #0077dd;
381
+ }
382
+
383
+ .delete-btn {
384
+ color: #ff4444;
385
+ border-color: #ff444440;
386
+ }
387
+
388
+ .delete-btn:hover {
389
+ background: #ff444420;
390
+ border-color: #ff4444;
391
+ }
392
+
393
+ .split-btn svg {
394
+ color: #ffa500;
395
+ }
396
+
397
+ .clone-btn svg {
398
+ color: #00cc66;
399
+ }
400
+
401
+ .btn-disabled {
402
+ opacity: 0.5;
403
+ cursor: not-allowed;
404
+ pointer-events: none;
405
+ }
406
+
407
+ .prev-btn,
408
+ .next-btn {
409
+ padding: 8px;
410
+ min-width: 36px;
411
+ justify-content: center;
412
+ }
413
+
414
+ /* Timeline Controls */
415
+ .timeline-controls {
416
+ position: relative;
417
+ background: #2a2a2a;
418
+ border-radius: 6px;
419
+ padding: 8px;
420
+ border: 1px solid #444;
421
+ }
422
+
423
+
424
+ .twick-track-zoom-container {
425
+ display: flex;
426
+ align-items: center;
427
+ justify-content: space-between;
428
+ gap: 8px;
429
+ width: 100%;
430
+ background-color: #171717;
431
+ border: 4px;
432
+ padding: 0 4px;
433
+ }
434
+
435
+ .twick-zoom-slider {
436
+ position: relative;
437
+ width: 100%;
438
+ height: 2px;
439
+ cursor: pointer;
440
+ background-color: #ffffff55;
441
+ border-radius: 50%;
442
+ }
443
+
444
+ .twick-zoom-slider-track {
445
+ position: absolute;
446
+ top: 0;
447
+ left: 0;
448
+ height: 100%;
449
+ background-color: #4949d5;
450
+ border-radius: 50%;
451
+ transition: all 0.2s ease-in-out;
452
+ }
453
+
454
+ .twick-zoom-slider-thumb {
455
+ position: absolute;
456
+ top: 50%;
457
+ width: 16px;
458
+ height: 16px;
459
+ background-color: #ffffff;
460
+ border: 2px solid #4949d5;
461
+ border-radius: 50%;
462
+ cursor: grab;
463
+ transform: translate(-50%, -50%);
464
+ transition: all 0.2s ease-in-out;
465
+ }
466
+
467
+ .undo-redo-controls {
468
+ display: flex;
469
+ align-items: center;
470
+ gap: 8px;
471
+ }
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@twick/video-editor",
3
+ "version": "0.14.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "sideEffects": [
9
+ "**/*.css"
10
+ ],
11
+ "license": "Apache-2.0",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "peerDependencies": {
19
+ "@twick/timeline": "^0.14.0",
20
+ "@twick/live-player": "^0.14.0"
21
+ },
22
+ "dependencies": {
23
+ "@emotion/is-prop-valid": "^1.2.2",
24
+ "@twick/canvas": "^0.14.0",
25
+ "@twick/live-player": "^0.14.0",
26
+ "@twick/timeline": "^0.14.0",
27
+ "@react-spring/web": "^10.0.1",
28
+ "@use-gesture/react": "^10.3.0",
29
+ "@twick/media-utils": "^0.14.0",
30
+ "framer-motion": "^11.0.3",
31
+ "lucide-react": "^0.511.0",
32
+ "react": "^18.2.0",
33
+ "react-dom": "^18.2.0"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^20.11.24",
37
+ "@types/react": "^18.2.55",
38
+ "@types/react-dom": "^18.2.19",
39
+ "@twick/live-player": "^0.14.0",
40
+ "@twick/timeline": "^0.14.0",
41
+ "rimraf": "^5.0.5",
42
+ "typedoc": "^0.25.8",
43
+ "typedoc-plugin-markdown": "^3.17.1",
44
+ "typescript": "^5.4.2",
45
+ "vite": "^5.1.4",
46
+ "vite-plugin-dts": "^3.7.3",
47
+ "postcss": "^8.4.35",
48
+ "autoprefixer": "^10.4.17"
49
+ },
50
+ "scripts": {
51
+ "build": "vite build",
52
+ "dev": "vite build --watch",
53
+ "lint": "eslint src/",
54
+ "clean": "rimraf .turbo node_modules dist",
55
+ "docs": "typedoc --plugin typedoc-plugin-markdown --out docs src/index.ts"
56
+ }
57
+ }