@editframe/create 0.44.0 → 0.45.1
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,327 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Waveform Element
|
|
3
|
+
description: Audio waveform visualization element with bar, line, and mirror display modes, synced to composition playback time.
|
|
4
|
+
type: reference
|
|
5
|
+
nav:
|
|
6
|
+
parent: "Media"
|
|
7
|
+
priority: 32
|
|
8
|
+
related: ["audio"]
|
|
9
|
+
api:
|
|
10
|
+
attributes:
|
|
11
|
+
- name: target
|
|
12
|
+
type: string
|
|
13
|
+
required: true
|
|
14
|
+
description: ID of ef-audio or ef-video element
|
|
15
|
+
- name: mode
|
|
16
|
+
type: string
|
|
17
|
+
default: "bars"
|
|
18
|
+
description: Display mode
|
|
19
|
+
values: ["bars", "roundBars", "line", "curve", "wave", "spikes", "bricks", "pixel"]
|
|
20
|
+
- name: bar-spacing
|
|
21
|
+
type: number
|
|
22
|
+
default: 0.5
|
|
23
|
+
description: Spacing between bars
|
|
24
|
+
- name: line-width
|
|
25
|
+
type: number
|
|
26
|
+
default: 4
|
|
27
|
+
description: Line width for line/curve modes
|
|
28
|
+
react:
|
|
29
|
+
generate: true
|
|
30
|
+
componentName: Waveform
|
|
31
|
+
importPath: "@editframe/react"
|
|
32
|
+
propMapping:
|
|
33
|
+
target: for
|
|
34
|
+
bar-spacing: barSpacing
|
|
35
|
+
line-width: lineWidth
|
|
36
|
+
additionalProps:
|
|
37
|
+
- name: className
|
|
38
|
+
type: string
|
|
39
|
+
description: CSS classes for styling
|
|
40
|
+
- name: style
|
|
41
|
+
type: React.CSSProperties
|
|
42
|
+
description: Inline styles (useful for colors)
|
|
43
|
+
nav:
|
|
44
|
+
parent: "Components / Text & Graphics"
|
|
45
|
+
priority: 32
|
|
46
|
+
related: ["audio"]
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
<!-- html-only -->
|
|
50
|
+
# ef-waveform
|
|
51
|
+
<!-- /html-only -->
|
|
52
|
+
<!-- react-only -->
|
|
53
|
+
# Waveform
|
|
54
|
+
<!-- /react-only -->
|
|
55
|
+
|
|
56
|
+
Audio waveform visualization.
|
|
57
|
+
|
|
58
|
+
<!-- react-only -->
|
|
59
|
+
## Import
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
import { Waveform } from "@editframe/react";
|
|
63
|
+
```
|
|
64
|
+
<!-- /react-only -->
|
|
65
|
+
|
|
66
|
+
## Basic Usage
|
|
67
|
+
|
|
68
|
+
<!-- html-only -->
|
|
69
|
+
```html
|
|
70
|
+
<ef-audio id="audio" fft-size="256" src="music.mp3"></ef-audio>
|
|
71
|
+
<ef-waveform target="audio" mode="bars" class="text-green-400 w-3/4 h-32"></ef-waveform>
|
|
72
|
+
```
|
|
73
|
+
<!-- /html-only -->
|
|
74
|
+
<!-- react-only -->
|
|
75
|
+
```tsx
|
|
76
|
+
import { Audio, Waveform } from "@editframe/react";
|
|
77
|
+
|
|
78
|
+
<Timegroup mode="contain" className="absolute w-full h-full bg-black">
|
|
79
|
+
<Audio id="track1" src="/assets/music.mp3" />
|
|
80
|
+
<Waveform
|
|
81
|
+
for="track1"
|
|
82
|
+
className="absolute bottom-0 w-full h-32"
|
|
83
|
+
/>
|
|
84
|
+
</Timegroup>
|
|
85
|
+
```
|
|
86
|
+
<!-- /react-only -->
|
|
87
|
+
|
|
88
|
+
<!-- html-only -->
|
|
89
|
+
## Full Scene
|
|
90
|
+
|
|
91
|
+
```html live
|
|
92
|
+
<ef-timegroup mode="contain" workbench class="w-[720px] h-[400px] bg-slate-900 flex flex-col items-center justify-center">
|
|
93
|
+
<ef-audio id="wf-demo" fft-size="256" src="https://assets.editframe.com/bars-n-tone.mp4" volume="0.6"></ef-audio>
|
|
94
|
+
<ef-waveform mode="bars" target="wf-demo" class="text-green-400 w-3/4 h-32"></ef-waveform>
|
|
95
|
+
<ef-text duration="10s" class="text-white text-lg mt-4">Audio Waveform</ef-text>
|
|
96
|
+
</ef-timegroup>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Visualization Modes
|
|
100
|
+
|
|
101
|
+
Each mode produces a different visual style. Color is inherited from `currentColor` (set via Tailwind `text-*` classes).
|
|
102
|
+
|
|
103
|
+
### Bars
|
|
104
|
+
|
|
105
|
+
```html live
|
|
106
|
+
<ef-timegroup mode="contain" workbench class="w-[720px] h-[300px] bg-slate-900 flex items-center justify-center">
|
|
107
|
+
<ef-audio id="wf-bars" fft-size="256" src="https://assets.editframe.com/bars-n-tone.mp4"></ef-audio>
|
|
108
|
+
<ef-waveform mode="bars" target="wf-bars" class="text-green-400 w-3/4 h-32"></ef-waveform>
|
|
109
|
+
</ef-timegroup>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Round Bars
|
|
113
|
+
|
|
114
|
+
```html live
|
|
115
|
+
<ef-timegroup mode="contain" workbench class="w-[720px] h-[300px] bg-slate-900 flex items-center justify-center">
|
|
116
|
+
<ef-audio id="wf-round" fft-size="256" src="https://assets.editframe.com/bars-n-tone.mp4"></ef-audio>
|
|
117
|
+
<ef-waveform mode="roundBars" target="wf-round" class="text-blue-400 w-3/4 h-32"></ef-waveform>
|
|
118
|
+
</ef-timegroup>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Line
|
|
122
|
+
|
|
123
|
+
```html live
|
|
124
|
+
<ef-timegroup mode="contain" workbench class="w-[720px] h-[300px] bg-slate-900 flex items-center justify-center">
|
|
125
|
+
<ef-audio id="wf-line" fft-size="256" src="https://assets.editframe.com/bars-n-tone.mp4"></ef-audio>
|
|
126
|
+
<ef-waveform mode="line" line-width="2" target="wf-line" class="text-yellow-400 w-3/4 h-32"></ef-waveform>
|
|
127
|
+
</ef-timegroup>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Curve
|
|
131
|
+
|
|
132
|
+
```html live
|
|
133
|
+
<ef-timegroup mode="contain" workbench class="w-[720px] h-[300px] bg-slate-900 flex items-center justify-center">
|
|
134
|
+
<ef-audio id="wf-curve" fft-size="256" src="https://assets.editframe.com/bars-n-tone.mp4"></ef-audio>
|
|
135
|
+
<ef-waveform mode="curve" target="wf-curve" class="text-purple-400 w-3/4 h-32"></ef-waveform>
|
|
136
|
+
</ef-timegroup>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Wave
|
|
140
|
+
|
|
141
|
+
```html live
|
|
142
|
+
<ef-timegroup mode="contain" workbench class="w-[720px] h-[300px] bg-slate-900 flex items-center justify-center">
|
|
143
|
+
<ef-audio id="wf-wave" fft-size="256" src="https://assets.editframe.com/bars-n-tone.mp4"></ef-audio>
|
|
144
|
+
<ef-waveform mode="wave" target="wf-wave" class="text-cyan-400 w-3/4 h-32"></ef-waveform>
|
|
145
|
+
</ef-timegroup>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Spikes
|
|
149
|
+
|
|
150
|
+
```html live
|
|
151
|
+
<ef-timegroup mode="contain" workbench class="w-[720px] h-[300px] bg-slate-900 flex items-center justify-center">
|
|
152
|
+
<ef-audio id="wf-spikes" fft-size="256" src="https://assets.editframe.com/bars-n-tone.mp4"></ef-audio>
|
|
153
|
+
<ef-waveform mode="spikes" target="wf-spikes" class="text-red-400 w-3/4 h-32"></ef-waveform>
|
|
154
|
+
</ef-timegroup>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Bricks
|
|
158
|
+
|
|
159
|
+
```html live
|
|
160
|
+
<ef-timegroup mode="contain" workbench class="w-[720px] h-[300px] bg-slate-900 flex items-center justify-center">
|
|
161
|
+
<ef-audio id="wf-bricks" fft-size="256" src="https://assets.editframe.com/bars-n-tone.mp4"></ef-audio>
|
|
162
|
+
<ef-waveform mode="bricks" target="wf-bricks" class="text-orange-400 w-3/4 h-32"></ef-waveform>
|
|
163
|
+
</ef-timegroup>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Pixel
|
|
167
|
+
|
|
168
|
+
```html live
|
|
169
|
+
<ef-timegroup mode="contain" workbench class="w-[720px] h-[300px] bg-slate-900 flex items-center justify-center">
|
|
170
|
+
<ef-audio id="wf-pixel" fft-size="256" src="https://assets.editframe.com/bars-n-tone.mp4"></ef-audio>
|
|
171
|
+
<ef-waveform mode="pixel" target="wf-pixel" class="text-pink-400 w-3/4 h-32"></ef-waveform>
|
|
172
|
+
</ef-timegroup>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Customization
|
|
176
|
+
|
|
177
|
+
### Bar Spacing and Line Width
|
|
178
|
+
|
|
179
|
+
```html live
|
|
180
|
+
<ef-timegroup mode="contain" workbench class="w-[720px] h-[300px] bg-slate-900 flex items-center justify-center gap-8">
|
|
181
|
+
<ef-audio id="wf-custom" fft-size="256" src="https://assets.editframe.com/bars-n-tone.mp4"></ef-audio>
|
|
182
|
+
<ef-waveform mode="bars" bar-spacing="2" target="wf-custom" class="text-emerald-400 w-1/3 h-32"></ef-waveform>
|
|
183
|
+
<ef-waveform mode="line" line-width="4" target="wf-custom" class="text-sky-400 w-1/3 h-32"></ef-waveform>
|
|
184
|
+
</ef-timegroup>
|
|
185
|
+
```
|
|
186
|
+
<!-- /html-only -->
|
|
187
|
+
|
|
188
|
+
<!-- react-only -->
|
|
189
|
+
## Styled Waveform
|
|
190
|
+
|
|
191
|
+
```tsx
|
|
192
|
+
<Waveform
|
|
193
|
+
for="audio1"
|
|
194
|
+
className="absolute bottom-0 w-full h-40 opacity-60"
|
|
195
|
+
style={{
|
|
196
|
+
fill: '#3b82f6', // blue-500
|
|
197
|
+
stroke: '#60a5fa', // blue-400
|
|
198
|
+
}}
|
|
199
|
+
/>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Positioned Waveform
|
|
203
|
+
|
|
204
|
+
```tsx
|
|
205
|
+
<Timegroup mode="contain" className="absolute w-full h-full">
|
|
206
|
+
<Audio id="podcast" src="/assets/podcast.mp3" />
|
|
207
|
+
|
|
208
|
+
{/* Bottom waveform */}
|
|
209
|
+
<Waveform
|
|
210
|
+
for="podcast"
|
|
211
|
+
className="absolute bottom-0 w-full h-24"
|
|
212
|
+
style={{ fill: '#22c55e' }}
|
|
213
|
+
/>
|
|
214
|
+
|
|
215
|
+
{/* Top waveform (mirrored effect) */}
|
|
216
|
+
<Waveform
|
|
217
|
+
for="podcast"
|
|
218
|
+
className="absolute top-0 w-full h-24 scale-y-[-1]"
|
|
219
|
+
style={{ fill: '#22c55e', opacity: 0.3 }}
|
|
220
|
+
/>
|
|
221
|
+
</Timegroup>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## With Video
|
|
225
|
+
|
|
226
|
+
```tsx
|
|
227
|
+
import { Timegroup, Video, Audio, Waveform } from "@editframe/react";
|
|
228
|
+
|
|
229
|
+
<Timegroup mode="contain" className="absolute w-full h-full">
|
|
230
|
+
<Video src="/assets/video.mp4" muted className="size-full object-cover" />
|
|
231
|
+
<Audio id="audio-track" src="/assets/music.mp3" volume={0.5} />
|
|
232
|
+
<Waveform
|
|
233
|
+
for="audio-track"
|
|
234
|
+
className="absolute bottom-0 w-full h-20 opacity-50"
|
|
235
|
+
style={{ fill: '#ffffff' }}
|
|
236
|
+
/>
|
|
237
|
+
</Timegroup>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Centered Waveform
|
|
241
|
+
|
|
242
|
+
```tsx
|
|
243
|
+
<Timegroup mode="contain" className="absolute w-full h-full flex items-center justify-center bg-gradient-to-br from-purple-900 to-blue-900">
|
|
244
|
+
<Audio id="beat" src="/assets/beat.mp3" />
|
|
245
|
+
<Waveform
|
|
246
|
+
for="beat"
|
|
247
|
+
className="w-3/4 h-64"
|
|
248
|
+
style={{ fill: '#a855f7', stroke: '#c084fc' }}
|
|
249
|
+
/>
|
|
250
|
+
</Timegroup>
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Multiple Audio Tracks
|
|
254
|
+
|
|
255
|
+
```tsx
|
|
256
|
+
<Timegroup mode="fixed" duration="10s" className="absolute w-full h-full">
|
|
257
|
+
<Audio id="music" src="/assets/music.mp3" volume={0.3} />
|
|
258
|
+
<Audio id="voice" src="/assets/voice.mp3" volume={1.0} />
|
|
259
|
+
|
|
260
|
+
<Waveform
|
|
261
|
+
for="music"
|
|
262
|
+
className="absolute bottom-0 w-full h-16"
|
|
263
|
+
style={{ fill: '#3b82f6', opacity: 0.6 }}
|
|
264
|
+
/>
|
|
265
|
+
|
|
266
|
+
<Waveform
|
|
267
|
+
for="voice"
|
|
268
|
+
className="absolute bottom-16 w-full h-32"
|
|
269
|
+
style={{ fill: '#22c55e', opacity: 0.8 }}
|
|
270
|
+
/>
|
|
271
|
+
</Timegroup>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Podcast/Audio Visualization
|
|
275
|
+
|
|
276
|
+
```tsx
|
|
277
|
+
import { Audio, Waveform, Text, Image } from "@editframe/react";
|
|
278
|
+
|
|
279
|
+
export const PodcastVisualizer = () => {
|
|
280
|
+
return (
|
|
281
|
+
<Timegroup
|
|
282
|
+
mode="contain"
|
|
283
|
+
className="w-[1920px] h-[1080px] bg-gradient-to-br from-slate-900 to-slate-800"
|
|
284
|
+
>
|
|
285
|
+
<Audio id="episode" src="/assets/podcast.mp3" />
|
|
286
|
+
|
|
287
|
+
{/* Podcast artwork */}
|
|
288
|
+
<Image
|
|
289
|
+
src="/assets/podcast-cover.jpg"
|
|
290
|
+
className="absolute top-1/4 left-1/2 -translate-x-1/2 w-64 h-64 rounded-lg shadow-2xl"
|
|
291
|
+
/>
|
|
292
|
+
|
|
293
|
+
{/* Waveform */}
|
|
294
|
+
<Waveform
|
|
295
|
+
for="episode"
|
|
296
|
+
className="absolute bottom-32 w-full h-40"
|
|
297
|
+
style={{ fill: '#3b82f6', opacity: 0.7 }}
|
|
298
|
+
/>
|
|
299
|
+
|
|
300
|
+
{/* Title */}
|
|
301
|
+
<Text
|
|
302
|
+
duration="contain"
|
|
303
|
+
className="absolute bottom-8 left-1/2 -translate-x-1/2 text-white text-2xl"
|
|
304
|
+
>
|
|
305
|
+
Episode 42: The Future of AI
|
|
306
|
+
</Text>
|
|
307
|
+
</Timegroup>
|
|
308
|
+
);
|
|
309
|
+
};
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## Dynamic Colors
|
|
313
|
+
|
|
314
|
+
```tsx
|
|
315
|
+
import { useState } from "react";
|
|
316
|
+
|
|
317
|
+
const colors = ['#3b82f6', '#22c55e', '#f59e0b', '#ef4444'];
|
|
318
|
+
|
|
319
|
+
const [colorIndex, setColorIndex] = useState(0);
|
|
320
|
+
|
|
321
|
+
<Waveform
|
|
322
|
+
for="audio"
|
|
323
|
+
className="absolute bottom-0 w-full h-32"
|
|
324
|
+
style={{ fill: colors[colorIndex] }}
|
|
325
|
+
/>
|
|
326
|
+
```
|
|
327
|
+
<!-- /react-only -->
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: editframe-editor-gui
|
|
3
|
+
title: Editor Toolkit
|
|
4
|
+
description: Build video editing interfaces with Editframe's GUI components. Assemble timeline, scrubber, filmstrip, preview, playback controls, and transform handles.
|
|
5
|
+
order: 15
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: editframe
|
|
9
|
+
version: "2.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Editor Toolkit
|
|
13
|
+
|
|
14
|
+
Build video editing interfaces by composing GUI components around a composition. The composition itself is built with the `composition` skill — these components provide the controls and views around it.
|
|
15
|
+
|
|
16
|
+
## Before opening any reference file, answer:
|
|
17
|
+
|
|
18
|
+
**What kind of editor does the user need?**
|
|
19
|
+
|
|
20
|
+
| Need | Start here |
|
|
21
|
+
|------|-----------|
|
|
22
|
+
| Just play/pause + seek | Minimal: `ef-preview` + `ef-controls` |
|
|
23
|
+
| Visual timeline of clips | Add `ef-filmstrip` |
|
|
24
|
+
| Layer panel (select/reorder) | Add `ef-hierarchy` |
|
|
25
|
+
| Full editor with all panels | Use `ef-workbench` |
|
|
26
|
+
| Canvas manipulation (drag/resize) | Add `ef-canvas` + `ef-transform-handles` |
|
|
27
|
+
|
|
28
|
+
Build editors incrementally — start minimal, add components only when needed.
|
|
29
|
+
|
|
30
|
+
## The Composition Model
|
|
31
|
+
|
|
32
|
+
Every editor has one composition (a `ef-timegroup` with an `id`). All GUI components reference it.
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
ef-preview ← renders the composition
|
|
36
|
+
└── ef-timegroup id="comp" ← the composition
|
|
37
|
+
|
|
38
|
+
ef-controls target="comp" ← connects to the composition by id
|
|
39
|
+
├── ef-toggle-play
|
|
40
|
+
├── ef-scrubber
|
|
41
|
+
└── ef-time-display
|
|
42
|
+
|
|
43
|
+
ef-filmstrip target="comp" ← visual timeline view
|
|
44
|
+
ef-hierarchy target="comp" ← layer list
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**The `target` attribute** connects any control or view to a composition outside its DOM ancestry. Without it, controls look up the DOM tree for the nearest timegroup.
|
|
48
|
+
|
|
49
|
+
## Progressive Levels
|
|
50
|
+
|
|
51
|
+
### Level 1 — Minimal (Preview + Controls)
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<ef-preview>
|
|
55
|
+
<ef-timegroup id="comp" mode="sequence" class="w-[1920px] h-[1080px]">
|
|
56
|
+
<!-- your composition -->
|
|
57
|
+
</ef-timegroup>
|
|
58
|
+
</ef-preview>
|
|
59
|
+
|
|
60
|
+
<ef-controls target="comp" class="flex items-center gap-4">
|
|
61
|
+
<ef-toggle-play></ef-toggle-play>
|
|
62
|
+
<ef-time-display></ef-time-display>
|
|
63
|
+
<ef-scrubber class="flex-1"></ef-scrubber>
|
|
64
|
+
<ef-toggle-loop></ef-toggle-loop>
|
|
65
|
+
</ef-controls>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Level 2 — Timeline (add Filmstrip)
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<ef-filmstrip target="comp" pixels-per-ms="0.1"></ef-filmstrip>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Level 3 — Layers (add Hierarchy)
|
|
75
|
+
|
|
76
|
+
```html
|
|
77
|
+
<ef-hierarchy target="comp"></ef-hierarchy>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Level 4 — Full Editor (Workbench)
|
|
81
|
+
|
|
82
|
+
`ef-workbench` provides a complete shell with named slots — no manual layout needed:
|
|
83
|
+
|
|
84
|
+
```html
|
|
85
|
+
<ef-workbench class="w-full h-screen">
|
|
86
|
+
<ef-pan-zoom slot="canvas">
|
|
87
|
+
<ef-fit-scale>
|
|
88
|
+
<ef-timegroup mode="sequence" class="w-[1920px] h-[1080px]">
|
|
89
|
+
<!-- composition -->
|
|
90
|
+
</ef-timegroup>
|
|
91
|
+
</ef-fit-scale>
|
|
92
|
+
</ef-pan-zoom>
|
|
93
|
+
|
|
94
|
+
<ef-hierarchy slot="hierarchy"></ef-hierarchy>
|
|
95
|
+
|
|
96
|
+
<div slot="timeline" class="h-full flex flex-col">
|
|
97
|
+
<ef-controls class="flex items-center gap-2 p-2">
|
|
98
|
+
<ef-toggle-play></ef-toggle-play>
|
|
99
|
+
<ef-time-display></ef-time-display>
|
|
100
|
+
<ef-scrubber class="flex-1"></ef-scrubber>
|
|
101
|
+
</ef-controls>
|
|
102
|
+
<ef-filmstrip class="flex-1"></ef-filmstrip>
|
|
103
|
+
</div>
|
|
104
|
+
</ef-workbench>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Getting Started
|
|
108
|
+
|
|
109
|
+
- [references/editor-toolkit.md](references/editor-toolkit.md) — Full progressive guide with working examples
|
|
110
|
+
|
|
111
|
+
## Preview & Canvas
|
|
112
|
+
|
|
113
|
+
- [references/preview.md](references/preview.md) — Preview container with focus tracking
|
|
114
|
+
- [references/canvas.md](references/canvas.md) — Interactive canvas with selection and drag-and-drop
|
|
115
|
+
- [references/pan-zoom.md](references/pan-zoom.md) — Pan and zoom container with gestures
|
|
116
|
+
- [references/focus-overlay.md](references/focus-overlay.md) — Highlight focused element
|
|
117
|
+
- [references/fit-scale.md](references/fit-scale.md) — Responsive aspect-ratio scaling
|
|
118
|
+
|
|
119
|
+
## Playback Controls
|
|
120
|
+
|
|
121
|
+
- [references/controls.md](references/controls.md) — Context bridge for disconnected controls
|
|
122
|
+
- [references/play.md](references/play.md) — Play button
|
|
123
|
+
- [references/pause.md](references/pause.md) — Pause button
|
|
124
|
+
- [references/toggle-play.md](references/toggle-play.md) — Combined play/pause toggle
|
|
125
|
+
- [references/toggle-loop.md](references/toggle-loop.md) — Loop toggle
|
|
126
|
+
|
|
127
|
+
## Timeline
|
|
128
|
+
|
|
129
|
+
- [references/timeline.md](references/timeline.md) — Full-featured timeline editor
|
|
130
|
+
- [references/filmstrip.md](references/filmstrip.md) — Visual timeline with tracks
|
|
131
|
+
- [references/scrubber.md](references/scrubber.md) — Seek control
|
|
132
|
+
- [references/time-display.md](references/time-display.md) — Current time / duration display
|
|
133
|
+
- [references/timeline-ruler.md](references/timeline-ruler.md) — Time ruler with frame markers
|
|
134
|
+
- [references/trim-handles.md](references/trim-handles.md) — Interactive trim controls
|
|
135
|
+
- [references/thumbnail-strip.md](references/thumbnail-strip.md) — Video thumbnail preview strip
|
|
136
|
+
|
|
137
|
+
## Transform & Manipulation
|
|
138
|
+
|
|
139
|
+
- [references/transform-handles.md](references/transform-handles.md) — Resize and rotation handles
|
|
140
|
+
- [references/resizable-box.md](references/resizable-box.md) — Resizable container with drag handles
|
|
141
|
+
- [references/dial.md](references/dial.md) — Rotary angle input
|
|
142
|
+
|
|
143
|
+
## Overlay System
|
|
144
|
+
|
|
145
|
+
- [references/overlay-layer.md](references/overlay-layer.md) — Container for positioned overlays
|
|
146
|
+
- [references/overlay-item.md](references/overlay-item.md) — Track and follow target elements
|
|
147
|
+
|
|
148
|
+
## Editor Shells
|
|
149
|
+
|
|
150
|
+
- [references/workbench.md](references/workbench.md) — Full editor UI with preview, timeline, hierarchy, and export
|
|
151
|
+
- [references/hierarchy.md](references/hierarchy.md) — Layer panel with selection and drag-and-drop
|
|
152
|
+
- [references/active-root-temporal.md](references/active-root-temporal.md) — Display active root element ID
|