@editframe/create 0.44.0 → 0.45.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/index.js +16 -28
- package/dist/index.js.map +1 -1
- package/dist/skills/editframe-brand-video-generator/README.md +155 -0
- package/dist/skills/editframe-brand-video-generator/SKILL.md +207 -0
- package/dist/skills/editframe-brand-video-generator/references/brand-examples.md +178 -0
- package/dist/skills/editframe-brand-video-generator/references/color-psychology.md +227 -0
- package/dist/skills/editframe-brand-video-generator/references/composition-patterns.md +383 -0
- package/dist/skills/editframe-brand-video-generator/references/editing.md +66 -0
- package/dist/skills/editframe-brand-video-generator/references/emotional-arcs.md +496 -0
- package/dist/skills/editframe-brand-video-generator/references/genre-selection.md +135 -0
- package/dist/skills/editframe-brand-video-generator/references/transition-styles.md +611 -0
- package/dist/skills/editframe-brand-video-generator/references/typography-personalities.md +326 -0
- package/dist/skills/editframe-brand-video-generator/references/video-archetypes.md +86 -0
- package/dist/skills/editframe-brand-video-generator/references/video-fundamentals.md +169 -0
- package/dist/skills/editframe-brand-video-generator/references/visual-metaphors.md +50 -0
- package/dist/skills/editframe-composition/SKILL.md +169 -0
- package/dist/skills/editframe-composition/references/audio.md +483 -0
- package/dist/skills/editframe-composition/references/captions.md +844 -0
- package/dist/skills/editframe-composition/references/composition-model.md +73 -0
- package/dist/skills/editframe-composition/references/configuration.md +403 -0
- package/dist/skills/editframe-composition/references/css-parts.md +105 -0
- package/dist/skills/editframe-composition/references/css-variables.md +640 -0
- package/dist/skills/editframe-composition/references/entry-points.md +810 -0
- package/dist/skills/editframe-composition/references/events.md +499 -0
- package/dist/skills/editframe-composition/references/getting-started.md +259 -0
- package/dist/skills/editframe-composition/references/hooks.md +234 -0
- package/dist/skills/editframe-composition/references/image.md +241 -0
- package/dist/skills/editframe-composition/references/r3f.md +580 -0
- package/dist/skills/editframe-composition/references/render-api.md +484 -0
- package/dist/skills/editframe-composition/references/render-strategies.md +119 -0
- package/dist/skills/editframe-composition/references/render-to-video.md +1101 -0
- package/dist/skills/editframe-composition/references/scripting.md +606 -0
- package/dist/skills/editframe-composition/references/sequencing.md +116 -0
- package/dist/skills/editframe-composition/references/server-rendering.md +753 -0
- package/dist/skills/editframe-composition/references/surface.md +329 -0
- package/dist/skills/editframe-composition/references/text.md +627 -0
- package/dist/skills/editframe-composition/references/time-model.md +99 -0
- package/dist/skills/editframe-composition/references/timegroup-modes.md +102 -0
- package/dist/skills/editframe-composition/references/timegroup.md +457 -0
- package/dist/skills/editframe-composition/references/timeline-root.md +398 -0
- package/dist/skills/editframe-composition/references/transcription.md +47 -0
- package/dist/skills/editframe-composition/references/transitions.md +608 -0
- package/dist/skills/editframe-composition/references/use-media-info.md +357 -0
- package/dist/skills/editframe-composition/references/video.md +506 -0
- package/dist/skills/editframe-composition/references/waveform.md +327 -0
- package/dist/skills/editframe-editor-gui/SKILL.md +152 -0
- package/dist/skills/editframe-editor-gui/references/active-root-temporal.md +657 -0
- package/dist/skills/editframe-editor-gui/references/canvas.md +947 -0
- package/dist/skills/editframe-editor-gui/references/controls.md +366 -0
- package/dist/skills/editframe-editor-gui/references/dial.md +756 -0
- package/dist/skills/editframe-editor-gui/references/editor-toolkit.md +587 -0
- package/dist/skills/editframe-editor-gui/references/filmstrip.md +460 -0
- package/dist/skills/editframe-editor-gui/references/fit-scale.md +772 -0
- package/dist/skills/editframe-editor-gui/references/focus-overlay.md +561 -0
- package/dist/skills/editframe-editor-gui/references/hierarchy.md +544 -0
- package/dist/skills/editframe-editor-gui/references/overlay-item.md +634 -0
- package/dist/skills/editframe-editor-gui/references/overlay-layer.md +429 -0
- package/dist/skills/editframe-editor-gui/references/pan-zoom.md +568 -0
- package/dist/skills/editframe-editor-gui/references/pause.md +397 -0
- package/dist/skills/editframe-editor-gui/references/play.md +370 -0
- package/dist/skills/editframe-editor-gui/references/preview.md +391 -0
- package/dist/skills/editframe-editor-gui/references/resizable-box.md +749 -0
- package/dist/skills/editframe-editor-gui/references/scrubber.md +588 -0
- package/dist/skills/editframe-editor-gui/references/thumbnail-strip.md +566 -0
- package/dist/skills/editframe-editor-gui/references/time-display.md +492 -0
- package/dist/skills/editframe-editor-gui/references/timeline-ruler.md +489 -0
- package/dist/skills/editframe-editor-gui/references/timeline.md +604 -0
- package/dist/skills/editframe-editor-gui/references/toggle-loop.md +618 -0
- package/dist/skills/editframe-editor-gui/references/toggle-play.md +526 -0
- package/dist/skills/editframe-editor-gui/references/transform-handles.md +924 -0
- package/dist/skills/editframe-editor-gui/references/trim-handles.md +725 -0
- package/dist/skills/editframe-editor-gui/references/workbench.md +453 -0
- package/dist/skills/editframe-motion-design/SKILL.md +101 -0
- package/dist/skills/editframe-motion-design/references/0-editframe.md +299 -0
- package/dist/skills/editframe-motion-design/references/1-intent.md +201 -0
- package/dist/skills/editframe-motion-design/references/2-physics-model.md +405 -0
- package/dist/skills/editframe-motion-design/references/3-attention.md +350 -0
- package/dist/skills/editframe-motion-design/references/4-process.md +418 -0
- package/dist/skills/editframe-vite-plugin/SKILL.md +75 -0
- package/dist/skills/editframe-vite-plugin/references/file-api.md +111 -0
- package/dist/skills/editframe-vite-plugin/references/getting-started.md +96 -0
- package/dist/skills/editframe-vite-plugin/references/jit-transcoding.md +91 -0
- package/dist/skills/editframe-vite-plugin/references/local-assets.md +75 -0
- package/dist/skills/editframe-vite-plugin/references/visual-testing.md +136 -0
- package/dist/skills/editframe-webhooks/SKILL.md +126 -0
- package/dist/skills/editframe-webhooks/references/events.md +382 -0
- package/dist/skills/editframe-webhooks/references/getting-started.md +232 -0
- package/dist/skills/editframe-webhooks/references/security.md +418 -0
- package/dist/skills/editframe-webhooks/references/testing.md +409 -0
- package/dist/skills/editframe-webhooks/references/troubleshooting.md +457 -0
- package/dist/templates/html/AGENTS.md +13 -0
- package/dist/templates/react/AGENTS.md +13 -0
- package/dist/utils.js +15 -16
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/tsdown.config.ts +4 -0
- package/dist/detectAgent.js +0 -89
- package/dist/detectAgent.js.map +0 -1
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Filmstrip Element
|
|
3
|
+
description: Visual timeline panel showing composition hierarchy as stacked tracks with time-proportional widths and playhead indicator.
|
|
4
|
+
type: reference
|
|
5
|
+
nav:
|
|
6
|
+
parent: "Timeline"
|
|
7
|
+
priority: 11
|
|
8
|
+
api:
|
|
9
|
+
attributes:
|
|
10
|
+
- name: target
|
|
11
|
+
type: string
|
|
12
|
+
required: true
|
|
13
|
+
description: ID of target temporal element to visualize
|
|
14
|
+
- name: pixels-per-ms
|
|
15
|
+
type: number
|
|
16
|
+
default: 0.04
|
|
17
|
+
description: Zoom level for timeline (pixels per millisecond)
|
|
18
|
+
- name: hide-playhead
|
|
19
|
+
type: boolean
|
|
20
|
+
default: false
|
|
21
|
+
description: Hide the playhead indicator
|
|
22
|
+
- name: disable-internal-scroll
|
|
23
|
+
type: boolean
|
|
24
|
+
default: false
|
|
25
|
+
description: Disable internal scrolling behavior
|
|
26
|
+
- name: hide
|
|
27
|
+
type: string
|
|
28
|
+
description: Comma-separated CSS selectors for elements to hide
|
|
29
|
+
- name: show
|
|
30
|
+
type: string
|
|
31
|
+
description: Comma-separated CSS selectors for elements to show (hides all others)
|
|
32
|
+
react:
|
|
33
|
+
generate: true
|
|
34
|
+
componentName: Filmstrip
|
|
35
|
+
importPath: "@editframe/react"
|
|
36
|
+
propMapping:
|
|
37
|
+
pixels-per-ms: pixelsPerMs
|
|
38
|
+
hide-playhead: hidePlayhead
|
|
39
|
+
disable-internal-scroll: disableInternalScroll
|
|
40
|
+
additionalProps:
|
|
41
|
+
- name: className
|
|
42
|
+
type: string
|
|
43
|
+
description: CSS classes for styling
|
|
44
|
+
nav:
|
|
45
|
+
parent: "Tools"
|
|
46
|
+
priority: 44
|
|
47
|
+
related: ["timeline", "timeline-ruler", "controls"]
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
<!-- html-only -->
|
|
51
|
+
# ef-filmstrip
|
|
52
|
+
<!-- /html-only -->
|
|
53
|
+
<!-- react-only -->
|
|
54
|
+
# Filmstrip
|
|
55
|
+
<!-- /react-only -->
|
|
56
|
+
|
|
57
|
+
Visual timeline that displays the temporal structure of a composition. Shows tracks for each element in the hierarchy with playback visualization.
|
|
58
|
+
|
|
59
|
+
<!-- react-only -->
|
|
60
|
+
## Import
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import { Filmstrip } from "@editframe/react";
|
|
64
|
+
```
|
|
65
|
+
<!-- /react-only -->
|
|
66
|
+
|
|
67
|
+
## Basic Usage
|
|
68
|
+
|
|
69
|
+
<!-- html-only -->
|
|
70
|
+
Display a timeline for a composition.
|
|
71
|
+
|
|
72
|
+
```html live
|
|
73
|
+
<ef-timegroup mode="contain" class="w-[720px] h-[480px] bg-black" id="filmstrip-demo">
|
|
74
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" class="size-full object-contain"></ef-video>
|
|
75
|
+
<ef-text class="absolute bottom-4 left-4 text-white text-3xl font-bold">
|
|
76
|
+
Hello Timeline
|
|
77
|
+
</ef-text>
|
|
78
|
+
</ef-timegroup>
|
|
79
|
+
<div class="mt-4 h-[200px] bg-gray-900 rounded-lg overflow-hidden">
|
|
80
|
+
<ef-filmstrip target="filmstrip-demo"></ef-filmstrip>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="mt-2 flex gap-2">
|
|
83
|
+
<ef-controls target="filmstrip-demo">
|
|
84
|
+
<ef-toggle-play class="px-3 py-1 bg-blue-600 text-white rounded"></ef-toggle-play>
|
|
85
|
+
</ef-controls>
|
|
86
|
+
</div>
|
|
87
|
+
```
|
|
88
|
+
<!-- /html-only -->
|
|
89
|
+
<!-- react-only -->
|
|
90
|
+
```tsx
|
|
91
|
+
import { Filmstrip, Timegroup, Video, Text } from "@editframe/react";
|
|
92
|
+
|
|
93
|
+
<div className="h-64 bg-gray-900">
|
|
94
|
+
<Filmstrip className="w-full h-full" />
|
|
95
|
+
|
|
96
|
+
<Timegroup mode="sequence" className="w-[1920px] h-[1080px]" id="main-timeline">
|
|
97
|
+
<Video src="/video1.mp4" />
|
|
98
|
+
<Video src="/video2.mp4" />
|
|
99
|
+
</Timegroup>
|
|
100
|
+
</div>
|
|
101
|
+
```
|
|
102
|
+
<!-- /react-only -->
|
|
103
|
+
|
|
104
|
+
<!-- react-only -->
|
|
105
|
+
## With Target
|
|
106
|
+
|
|
107
|
+
Target a specific timeline:
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
<Filmstrip
|
|
111
|
+
target="composition-1"
|
|
112
|
+
className="w-full h-48 bg-gray-800"
|
|
113
|
+
/>
|
|
114
|
+
|
|
115
|
+
<Timegroup id="composition-1" mode="sequence" className="w-[1920px] h-[1080px]">
|
|
116
|
+
<Video src="/video.mp4" />
|
|
117
|
+
<Text>Hello World</Text>
|
|
118
|
+
</Timegroup>
|
|
119
|
+
```
|
|
120
|
+
<!-- /react-only -->
|
|
121
|
+
|
|
122
|
+
## Zoomed Timeline
|
|
123
|
+
|
|
124
|
+
Adjust zoom level with <!-- html-only -->`pixels-per-ms`<!-- /html-only --><!-- react-only -->`pixelsPerMs`<!-- /react-only -->.
|
|
125
|
+
|
|
126
|
+
<!-- html-only -->
|
|
127
|
+
```html live
|
|
128
|
+
<ef-timegroup mode="contain" class="w-[720px] h-[480px] bg-black" id="zoom-demo">
|
|
129
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" sourcein="0s" sourceout="5s" class="size-full object-contain"></ef-video>
|
|
130
|
+
<ef-text class="absolute top-4 left-4 text-white text-2xl font-bold">Zoomed View</ef-text>
|
|
131
|
+
</ef-timegroup>
|
|
132
|
+
<div class="mt-4 h-[200px] bg-gray-900 rounded-lg overflow-auto">
|
|
133
|
+
<ef-filmstrip target="zoom-demo" pixels-per-ms="0.2"></ef-filmstrip>
|
|
134
|
+
</div>
|
|
135
|
+
<div class="mt-2 flex gap-2">
|
|
136
|
+
<ef-controls target="zoom-demo">
|
|
137
|
+
<ef-toggle-play class="px-3 py-1 bg-blue-600 text-white rounded"></ef-toggle-play>
|
|
138
|
+
</ef-controls>
|
|
139
|
+
</div>
|
|
140
|
+
```
|
|
141
|
+
<!-- /html-only -->
|
|
142
|
+
<!-- react-only -->
|
|
143
|
+
```tsx
|
|
144
|
+
import { useState } from "react";
|
|
145
|
+
|
|
146
|
+
export const ZoomableFilmstrip = () => {
|
|
147
|
+
const [zoom, setZoom] = useState(0.04);
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<div>
|
|
151
|
+
<div className="flex gap-2 mb-2">
|
|
152
|
+
<button onClick={() => setZoom(zoom * 1.5)}>Zoom In</button>
|
|
153
|
+
<button onClick={() => setZoom(zoom / 1.5)}>Zoom Out</button>
|
|
154
|
+
<span>Zoom: {Math.round(zoom * 1000)}%</span>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<Filmstrip
|
|
158
|
+
pixelsPerMs={zoom}
|
|
159
|
+
className="w-full h-48"
|
|
160
|
+
/>
|
|
161
|
+
</div>
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
```
|
|
165
|
+
<!-- /react-only -->
|
|
166
|
+
|
|
167
|
+
<!-- html-only -->
|
|
168
|
+
## Sequence Timeline
|
|
169
|
+
|
|
170
|
+
Filmstrip automatically shows sequential layout for `mode="sequence"` timegroups.
|
|
171
|
+
|
|
172
|
+
```html live
|
|
173
|
+
<ef-timegroup mode="sequence" class="w-[720px] h-[480px] bg-black" id="sequence-demo">
|
|
174
|
+
<ef-timegroup class="flex items-center justify-center">
|
|
175
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" sourcein="0s" sourceout="2s" class="absolute inset-0 size-full object-contain"></ef-video>
|
|
176
|
+
<h1 class="text-white text-4xl font-bold bg-blue-600 p-4 rounded relative">Scene 1</h1>
|
|
177
|
+
</ef-timegroup>
|
|
178
|
+
<ef-timegroup class="flex items-center justify-center">
|
|
179
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" sourcein="5s" sourceout="7s" class="absolute inset-0 size-full object-contain"></ef-video>
|
|
180
|
+
<h1 class="text-white text-4xl font-bold bg-purple-600 p-4 rounded relative">Scene 2</h1>
|
|
181
|
+
</ef-timegroup>
|
|
182
|
+
<ef-timegroup class="flex items-center justify-center">
|
|
183
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" sourcein="8s" class="absolute inset-0 size-full object-contain"></ef-video>
|
|
184
|
+
<h1 class="text-white text-4xl font-bold bg-green-600 p-4 rounded relative">Scene 3</h1>
|
|
185
|
+
</ef-timegroup>
|
|
186
|
+
</ef-timegroup>
|
|
187
|
+
<div class="mt-4 h-[250px] bg-gray-900 rounded-lg overflow-hidden">
|
|
188
|
+
<ef-filmstrip target="sequence-demo" pixels-per-ms="0.08"></ef-filmstrip>
|
|
189
|
+
</div>
|
|
190
|
+
<div class="mt-2 flex gap-2">
|
|
191
|
+
<ef-controls target="sequence-demo">
|
|
192
|
+
<ef-toggle-play class="px-3 py-1 bg-blue-600 text-white rounded"></ef-toggle-play>
|
|
193
|
+
</ef-controls>
|
|
194
|
+
</div>
|
|
195
|
+
```
|
|
196
|
+
<!-- /html-only -->
|
|
197
|
+
|
|
198
|
+
## Filtering Tracks
|
|
199
|
+
|
|
200
|
+
Control which elements appear in the timeline.
|
|
201
|
+
|
|
202
|
+
<!-- html-only -->
|
|
203
|
+
```html live
|
|
204
|
+
<ef-timegroup mode="contain" class="w-[720px] h-[480px] bg-black" id="filter-demo">
|
|
205
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" class="size-full object-contain"></ef-video>
|
|
206
|
+
<ef-text class="absolute top-4 left-4 text-white text-2xl">Title Text</ef-text>
|
|
207
|
+
<ef-text class="absolute bottom-4 left-4 text-white text-sm helper-text">Helper text</ef-text>
|
|
208
|
+
<ef-text class="absolute bottom-4 right-4 text-white text-sm watermark">Watermark</ef-text>
|
|
209
|
+
</ef-timegroup>
|
|
210
|
+
<div class="mt-4 space-y-2">
|
|
211
|
+
<div class="text-white text-sm">Hiding helper text and watermark:</div>
|
|
212
|
+
<div class="h-[200px] bg-gray-900 rounded-lg overflow-hidden">
|
|
213
|
+
<ef-filmstrip target="filter-demo" hide=".helper-text, .watermark"></ef-filmstrip>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
<div class="mt-2 flex gap-2">
|
|
217
|
+
<ef-controls target="filter-demo">
|
|
218
|
+
<ef-toggle-play class="px-3 py-1 bg-blue-600 text-white rounded"></ef-toggle-play>
|
|
219
|
+
</ef-controls>
|
|
220
|
+
</div>
|
|
221
|
+
```
|
|
222
|
+
<!-- /html-only -->
|
|
223
|
+
<!-- react-only -->
|
|
224
|
+
Show only specific element types:
|
|
225
|
+
|
|
226
|
+
```tsx
|
|
227
|
+
{/* Hide waveforms */}
|
|
228
|
+
<Filmstrip
|
|
229
|
+
hide="ef-waveform"
|
|
230
|
+
className="w-full h-48"
|
|
231
|
+
/>
|
|
232
|
+
|
|
233
|
+
{/* Show only videos and images */}
|
|
234
|
+
<Filmstrip
|
|
235
|
+
show="ef-video,ef-image"
|
|
236
|
+
className="w-full h-48"
|
|
237
|
+
/>
|
|
238
|
+
|
|
239
|
+
{/* Hide multiple element types */}
|
|
240
|
+
<Filmstrip
|
|
241
|
+
hide="ef-waveform,ef-surface,.helper-layer"
|
|
242
|
+
className="w-full h-48"
|
|
243
|
+
/>
|
|
244
|
+
```
|
|
245
|
+
<!-- /react-only -->
|
|
246
|
+
|
|
247
|
+
## Without Playhead
|
|
248
|
+
|
|
249
|
+
Hide the playhead indicator for static timeline views.
|
|
250
|
+
|
|
251
|
+
<!-- html-only -->
|
|
252
|
+
```html live
|
|
253
|
+
<ef-timegroup mode="contain" class="w-[720px] h-[480px] bg-black" id="static-demo">
|
|
254
|
+
<ef-video src="https://assets.editframe.com/bars-n-tone.mp4" class="size-full object-contain"></ef-video>
|
|
255
|
+
<ef-text class="absolute bottom-4 left-4 text-white text-3xl font-bold">Static View</ef-text>
|
|
256
|
+
</ef-timegroup>
|
|
257
|
+
<div class="mt-4 h-[150px] bg-gray-900 rounded-lg overflow-hidden">
|
|
258
|
+
<ef-filmstrip target="static-demo" hide-playhead></ef-filmstrip>
|
|
259
|
+
</div>
|
|
260
|
+
```
|
|
261
|
+
<!-- /html-only -->
|
|
262
|
+
<!-- react-only -->
|
|
263
|
+
```tsx
|
|
264
|
+
<Filmstrip
|
|
265
|
+
hidePlayhead
|
|
266
|
+
className="w-full h-48 bg-gray-900"
|
|
267
|
+
/>
|
|
268
|
+
```
|
|
269
|
+
<!-- /react-only -->
|
|
270
|
+
|
|
271
|
+
<!-- react-only -->
|
|
272
|
+
## Styled Filmstrip
|
|
273
|
+
|
|
274
|
+
```tsx
|
|
275
|
+
<Filmstrip className="
|
|
276
|
+
w-full
|
|
277
|
+
h-56
|
|
278
|
+
bg-gradient-to-b from-gray-900 to-gray-800
|
|
279
|
+
border border-gray-700
|
|
280
|
+
rounded-lg
|
|
281
|
+
shadow-xl
|
|
282
|
+
" />
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## Split View Editor
|
|
286
|
+
|
|
287
|
+
Filmstrip with preview:
|
|
288
|
+
|
|
289
|
+
```tsx
|
|
290
|
+
import { Preview, Filmstrip, Controls, Timegroup, Video } from "@editframe/react";
|
|
291
|
+
|
|
292
|
+
export const SplitEditor = () => {
|
|
293
|
+
return (
|
|
294
|
+
<div className="h-screen flex flex-col bg-gray-900">
|
|
295
|
+
{/* Preview */}
|
|
296
|
+
<div className="flex-1 p-4">
|
|
297
|
+
<Preview className="w-full h-full bg-black rounded" />
|
|
298
|
+
</div>
|
|
299
|
+
|
|
300
|
+
{/* Controls */}
|
|
301
|
+
<div className="px-4 py-2">
|
|
302
|
+
<Controls className="w-full" />
|
|
303
|
+
</div>
|
|
304
|
+
|
|
305
|
+
{/* Timeline */}
|
|
306
|
+
<div className="h-64 border-t border-gray-700">
|
|
307
|
+
<Filmstrip className="w-full h-full" />
|
|
308
|
+
</div>
|
|
309
|
+
|
|
310
|
+
{/* Composition */}
|
|
311
|
+
<Timegroup mode="sequence" className="w-[1920px] h-[1080px]">
|
|
312
|
+
<Video src="/video1.mp4" />
|
|
313
|
+
<Video src="/video2.mp4" />
|
|
314
|
+
</Timegroup>
|
|
315
|
+
</div>
|
|
316
|
+
);
|
|
317
|
+
};
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Compact Timeline
|
|
321
|
+
|
|
322
|
+
Minimal filmstrip for review:
|
|
323
|
+
|
|
324
|
+
```tsx
|
|
325
|
+
<div className="flex flex-col gap-2">
|
|
326
|
+
<h3>Timeline Preview</h3>
|
|
327
|
+
<Filmstrip
|
|
328
|
+
hidePlayhead={false}
|
|
329
|
+
className="w-full h-24 bg-black/50 rounded"
|
|
330
|
+
/>
|
|
331
|
+
</div>
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
## Multi-Timeline View
|
|
335
|
+
|
|
336
|
+
Show multiple timelines:
|
|
337
|
+
|
|
338
|
+
```tsx
|
|
339
|
+
<div className="space-y-4">
|
|
340
|
+
<div>
|
|
341
|
+
<h4 className="text-sm mb-1">Main Timeline</h4>
|
|
342
|
+
<Filmstrip
|
|
343
|
+
target="timeline-main"
|
|
344
|
+
className="w-full h-32 bg-gray-800 rounded"
|
|
345
|
+
/>
|
|
346
|
+
</div>
|
|
347
|
+
|
|
348
|
+
<div>
|
|
349
|
+
<h4 className="text-sm mb-1">B-Roll</h4>
|
|
350
|
+
<Filmstrip
|
|
351
|
+
target="timeline-broll"
|
|
352
|
+
className="w-full h-32 bg-gray-800 rounded"
|
|
353
|
+
/>
|
|
354
|
+
</div>
|
|
355
|
+
</div>
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
## With React State
|
|
359
|
+
|
|
360
|
+
Integrate with React state:
|
|
361
|
+
|
|
362
|
+
```tsx
|
|
363
|
+
import { useState } from "react";
|
|
364
|
+
import { Filmstrip, Timegroup, Video } from "@editframe/react";
|
|
365
|
+
|
|
366
|
+
export const StateIntegratedFilmstrip = () => {
|
|
367
|
+
const [hideWaveforms, setHideWaveforms] = useState(true);
|
|
368
|
+
const [zoom, setZoom] = useState(0.04);
|
|
369
|
+
|
|
370
|
+
return (
|
|
371
|
+
<div>
|
|
372
|
+
<div className="flex gap-4 mb-4">
|
|
373
|
+
<label>
|
|
374
|
+
<input
|
|
375
|
+
type="checkbox"
|
|
376
|
+
checked={hideWaveforms}
|
|
377
|
+
onChange={(e) => setHideWaveforms(e.target.checked)}
|
|
378
|
+
/>
|
|
379
|
+
Hide Waveforms
|
|
380
|
+
</label>
|
|
381
|
+
|
|
382
|
+
<input
|
|
383
|
+
type="range"
|
|
384
|
+
min="0.01"
|
|
385
|
+
max="0.2"
|
|
386
|
+
step="0.01"
|
|
387
|
+
value={zoom}
|
|
388
|
+
onChange={(e) => setZoom(parseFloat(e.target.value))}
|
|
389
|
+
/>
|
|
390
|
+
</div>
|
|
391
|
+
|
|
392
|
+
<Filmstrip
|
|
393
|
+
hide={hideWaveforms ? "ef-waveform" : ""}
|
|
394
|
+
pixelsPerMs={zoom}
|
|
395
|
+
className="w-full h-48 bg-gray-900 rounded"
|
|
396
|
+
/>
|
|
397
|
+
</div>
|
|
398
|
+
);
|
|
399
|
+
};
|
|
400
|
+
```
|
|
401
|
+
<!-- /react-only -->
|
|
402
|
+
|
|
403
|
+
## Features
|
|
404
|
+
|
|
405
|
+
**Automatic track generation** — Creates visual tracks for all temporal elements in the composition hierarchy.
|
|
406
|
+
|
|
407
|
+
**Playhead visualization** — Shows current playback position with a vertical line that follows playback.
|
|
408
|
+
|
|
409
|
+
**Zoom control** — Adjust timeline zoom with <!-- html-only -->`pixels-per-ms`<!-- /html-only --><!-- react-only -->`pixelsPerMs`<!-- /react-only --> to show more or less detail.
|
|
410
|
+
|
|
411
|
+
**Track filtering** — Show or hide specific elements using CSS selectors.
|
|
412
|
+
|
|
413
|
+
**Sequence support** — Automatically handles sequential timegroup layouts.
|
|
414
|
+
|
|
415
|
+
**Scroll support** — Long timelines are scrollable with the playhead staying visible.
|
|
416
|
+
|
|
417
|
+
## Relationship to EFTimeline
|
|
418
|
+
|
|
419
|
+
<!-- html-only -->
|
|
420
|
+
`ef-filmstrip` is a simplified wrapper around `ef-timeline` that shows only the tracks without:
|
|
421
|
+
<!-- /html-only -->
|
|
422
|
+
<!-- react-only -->
|
|
423
|
+
Filmstrip is a simplified version of Timeline without:
|
|
424
|
+
<!-- /react-only -->
|
|
425
|
+
- Hierarchy panel
|
|
426
|
+
- Playback controls
|
|
427
|
+
- Zoom controls
|
|
428
|
+
- Timeline ruler
|
|
429
|
+
- Time display
|
|
430
|
+
|
|
431
|
+
<!-- html-only -->
|
|
432
|
+
For full timeline editing features, use `ef-timeline` directly.
|
|
433
|
+
<!-- /html-only -->
|
|
434
|
+
<!-- react-only -->
|
|
435
|
+
For full timeline editing features, use Timeline directly.
|
|
436
|
+
<!-- /react-only -->
|
|
437
|
+
|
|
438
|
+
## CSS Custom Properties
|
|
439
|
+
|
|
440
|
+
Timeline appearance inherits from theme variables:
|
|
441
|
+
|
|
442
|
+
```css
|
|
443
|
+
ef-filmstrip {
|
|
444
|
+
--ef-color-bg: #111827;
|
|
445
|
+
--ef-color-border: #374151;
|
|
446
|
+
--ef-color-playhead: #3b82f6;
|
|
447
|
+
--ef-track-height: 24px;
|
|
448
|
+
}
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
<!-- react-only -->
|
|
452
|
+
## Notes
|
|
453
|
+
|
|
454
|
+
- Filmstrip is a simplified version of Timeline without controls
|
|
455
|
+
- Automatically connects to the active timeline in context
|
|
456
|
+
- Use `target` prop to specify a particular timegroup
|
|
457
|
+
- The `hide` and `show` props accept comma-separated CSS selectors
|
|
458
|
+
- Zoom level (`pixelsPerMs`) determines how much timeline fits in view
|
|
459
|
+
- Use with `Preview` and `Controls` for a complete editor
|
|
460
|
+
<!-- /react-only -->
|