clipwise 0.6.1 → 0.7.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/README.md +41 -7
- package/dist/cli/index.js +480 -106
- package/dist/compose/frame-worker.js +85 -76
- package/dist/index.d.ts +477 -34
- package/dist/index.js +582 -129
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -169,6 +169,7 @@ steps:
|
|
|
169
169
|
| `waitForURL` | `url`, `timeout?` | `timeout: 15000` | Wait for URL match |
|
|
170
170
|
| `waitForFunction` | `expression`, `polling?`, `timeout?` | `polling: "raf"`, `timeout: 30000` | Wait for JS expression to be truthy |
|
|
171
171
|
| `waitForResponse` | `url`, `status?`, `timeout?` | `timeout: 30000` | Wait for network response (URL substring match) |
|
|
172
|
+
| `smartWait` | `until`, `selector?`, `timeout?`, `displaySpeed?` | `until: "networkIdle"`, `timeout: 30000`, `displaySpeed: 8` | Smart wait — records real wait, auto-speeds in output |
|
|
172
173
|
|
|
173
174
|
**`waitUntil`** options: `"load"`, `"domcontentloaded"`, `"networkidle"` (default)
|
|
174
175
|
**`state`** options: `"visible"` (default), `"attached"`, `"hidden"`
|
|
@@ -227,6 +228,7 @@ zoom:
|
|
|
227
228
|
# 1.15x | 1.25x | 1.35x | 1.5x | 1.8x
|
|
228
229
|
# scale: 1.25 # Override with a numeric value instead of intensity
|
|
229
230
|
duration: 800 # Zoom animation ms
|
|
231
|
+
easing: spring # spring (natural) | ease-in-out (default)
|
|
230
232
|
autoZoom:
|
|
231
233
|
followCursor: true # Viewport pans to follow cursor position
|
|
232
234
|
transitionDuration: 300
|
|
@@ -241,7 +243,7 @@ zoom:
|
|
|
241
243
|
| `strong` | 1.5× | Clear focus, some context sacrificed |
|
|
242
244
|
| `dramatic` | 1.8× | Maximum emphasis, sparse UIs only |
|
|
243
245
|
|
|
244
|
-
**Smart camera**: Zoom is automatically suppressed during scroll actions to avoid disorienting motion. When `followCursor` is enabled, the focal point smoothly pans to follow cursor position (not just click targets).
|
|
246
|
+
**Smart camera**: Zoom is automatically suppressed during scroll actions to avoid disorienting motion. When `followCursor` is enabled, the focal point smoothly pans to follow cursor position (not just click targets). **Zone-aware zoom** (v0.7.0) merges nearby clicks into continuous zoom zones — no more jarring zoom-out/zoom-in between adjacent interactions. **Spring easing** (`easing: spring`) produces natural, Screen Studio-like camera motion with faster initial response and smooth deceleration.
|
|
245
247
|
|
|
246
248
|
### Cursor
|
|
247
249
|
|
|
@@ -329,6 +331,32 @@ speedRamp:
|
|
|
329
331
|
actionSpeed: 0.8 # Slow factor near clicks
|
|
330
332
|
```
|
|
331
333
|
|
|
334
|
+
### Smart Speed <sup>v0.7.0</sup>
|
|
335
|
+
|
|
336
|
+
Content-aware speed control. Automatically compresses loading/wait periods while keeping meaningful content at normal speed. Detects CSS loading spinners via CDP Animation domain — no configuration needed.
|
|
337
|
+
|
|
338
|
+
```yaml
|
|
339
|
+
effects:
|
|
340
|
+
smartSpeed:
|
|
341
|
+
enabled: true
|
|
342
|
+
waitSpeed: 4 # Speed multiplier for wait/loading periods
|
|
343
|
+
idleSpeed: 4 # Speed multiplier for idle frames
|
|
344
|
+
transitionDuration: 500 # Ease-in/out duration (ms) — loader is visible before fast-forward
|
|
345
|
+
|
|
346
|
+
steps:
|
|
347
|
+
- name: "Submit form"
|
|
348
|
+
actions:
|
|
349
|
+
- action: click
|
|
350
|
+
selector: "#submit-btn"
|
|
351
|
+
- action: smartWait # Records real API wait, auto-compresses in output
|
|
352
|
+
until: selector # networkIdle | selector | domStable
|
|
353
|
+
selector: ".success-toast"
|
|
354
|
+
timeout: 30000
|
|
355
|
+
displaySpeed: 4 # 4x fast-forward (spinner visibly spins faster)
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**How it works**: `smartWait` records the actual wait (API calls, loading states) at full quality, then smartSpeed compresses those frames in the output. Loading spinners are **auto-detected** via CDP — frames during active `@keyframes spin/rotate/pulse` animations are automatically marked for compression.
|
|
359
|
+
|
|
332
360
|
### Transitions
|
|
333
361
|
|
|
334
362
|
Control how steps transition to each other.
|
|
@@ -388,12 +416,15 @@ audio:
|
|
|
388
416
|
|
|
389
417
|
Measured on **Apple M1 Max (10 cores)** — Pulse Dashboard demo, 44s @ 30fps, 1280×800:
|
|
390
418
|
|
|
391
|
-
| Stage | v0.3.0 | v0.4.0 | v0.5.0 | v0.6.0 |
|
|
392
|
-
|
|
393
|
-
| Recording | 30.8 s | 31.1 s | 31.1 s | 31.1 s |
|
|
394
|
-
| Compose + Encode | 97.2 s | 60.6 s | 60.6 s | 60.6 s |
|
|
395
|
-
| **Total** | **127.9 s** | **91.7 s** | **91.7 s** | **91.7 s** |
|
|
396
|
-
| Frames captured | 1,303 | 902 | 902 | 902 |
|
|
419
|
+
| Stage | v0.3.0 | v0.4.0 | v0.5.0 | v0.6.0 | **v0.7.0** |
|
|
420
|
+
|-------|--------|--------|--------|--------|--------|
|
|
421
|
+
| Recording | 30.8 s | 31.1 s | 31.1 s | 31.1 s | 58.3 s¹ |
|
|
422
|
+
| Compose + Encode | 97.2 s | 60.6 s | 60.6 s | 60.6 s | **39.6 s** |
|
|
423
|
+
| **Total** | **127.9 s** | **91.7 s** | **91.7 s** | **91.7 s** | **97.8 s**¹ |
|
|
424
|
+
| Frames captured | 1,303 | 902 | 902 | 902 | 1,388 |
|
|
425
|
+
| **ms/frame** | **69** | **67** | **67** | **67** | **23** |
|
|
426
|
+
|
|
427
|
+
¹ v0.7.0 recording is longer due to more scenario steps (23 vs 20) and zoom-sustaining click events during typing. Compose throughput improved **3×** (69 → 23 ms/frame) via Sharp pipeline batching.
|
|
397
428
|
|
|
398
429
|
Key optimisations in v0.4.0: concurrent streaming pipeline, static frame deduplication (~33% skipped), per-worker StaticLayers cache, and raw RGBA buffer pipeline.
|
|
399
430
|
|
|
@@ -401,6 +432,8 @@ v0.5.0 focuses on **recording quality**: smooth cursor, zoom intensity presets,
|
|
|
401
432
|
|
|
402
433
|
v0.6.0 focuses on **convention alignment & expressiveness**: gentler defaults (light zoom, normal cursor speed), per-step effects override, new transitions (slide, blur), audio narration, and smart camera (scroll-aware zoom suppression + cursor-following focal point).
|
|
403
434
|
|
|
435
|
+
v0.7.0 focuses on **quality leap**: spring physics zoom, zone-aware zoom continuity, focus point interpolation, `smartWait` + content-aware `smartSpeed`, auto loader detection (CDP Animation), HEVC 10-bit encoding (`-tune animation`), AV1 codec support, and Sharp pipeline batching (5→1 calls/frame).
|
|
436
|
+
|
|
404
437
|
## Output Compression
|
|
405
438
|
|
|
406
439
|
Use the `preset` field to control quality and file size:
|
|
@@ -410,6 +443,7 @@ output:
|
|
|
410
443
|
format: mp4
|
|
411
444
|
fps: 30
|
|
412
445
|
preset: social # social | balanced | archive
|
|
446
|
+
codec: auto # auto | h264 | hevc | av1
|
|
413
447
|
```
|
|
414
448
|
|
|
415
449
|
| Preset | libx264 CRF | HEVC VideoToolbox q:v | Target use case |
|