reframe-video 0.6.22 → 0.6.24

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reframe",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Create and iterate motion-graphics videos as addressable data: deterministic mp4 renders, human edits that survive AI regeneration, label-anchored audio, data-driven batch rendering.",
5
5
  "author": {
6
6
  "name": "Kiyeon Jeon",
package/README.md CHANGED
@@ -23,10 +23,12 @@ npx reframe-video render hello.ts # → out/hello.mp4
23
23
  | `reframe render <scene.ts> [--overlay edits.json] [-o out.mp4]` | deterministic mp4 |
24
24
  | `reframe batch <scene.ts> <data.json\|csv>` | one mp4 per data row (row keys are overlay addresses) |
25
25
  | `reframe compile <scene.ts> [-o out.json] [--json]` | bundle + validate a scene to SceneIR JSON, no render (fast; no ffmpeg/chromium) |
26
+ | `reframe frame <scene.ts> [--t <sec>] [-o out.png]` | render one frame at time `t` to a PNG (chromium only, no mux) — for a render-and-look loop |
26
27
  | `reframe preview` | scrub/play/edit UI for scenes in the current directory; edits export as overlay JSON |
27
28
  | `reframe new <name>` | scaffold a documented starter scene |
28
29
  | `reframe motion <mp4>` | calibrated motion profile of a rendered clip |
29
- | `reframe guide [--regen]` | the scene-authoring guide / regeneration contract — **feed this to your AI** |
30
+ | `reframe guide [--directing\|--regen\|--html]` | the authoring guide (default eDSL syntax; directing workflow; regeneration contract; HTML/GSAP) — **feed this to your AI** |
31
+ | `reframe skill [--path]` | print the authoring skill for an agent; `--path` prints the plugin dir to load |
30
32
 
31
33
  (Installed as both `reframe` and `reframe-video`; with npx use `npx reframe-video <cmd>`.)
32
34
 
package/dist/bin.js CHANGED
@@ -2810,11 +2810,12 @@ var GUIDE = PACKAGED ? {
2810
2810
  html: join9(ROOT2, "guides", "html-guide.md"),
2811
2811
  edsl: join9(ROOT2, "guides", "edsl-guide.md")
2812
2812
  } : {
2813
- regen: join9(ROOT2, "docs", "regen-contract.md"),
2813
+ regen: join9(ROOT2, "docs", "guides", "regen-contract.md"),
2814
2814
  directing: join9(ROOT2, "docs", "guides", "directing-guide.md"),
2815
2815
  html: join9(ROOT2, "docs", "guides", "html-guide.md"),
2816
2816
  edsl: join9(ROOT2, "docs", "guides", "edsl-guide.md")
2817
2817
  };
2818
+ var PLUGIN_DIR = PACKAGED ? ROOT2 : join9(ROOT2, "plugin");
2818
2819
  var USAGE = `reframe \u2014 declarative motion graphics
2819
2820
 
2820
2821
  usage:
@@ -3205,12 +3206,12 @@ ${results.length - failed} rendered (${orphaned} with orphans), ${failed} failed
3205
3206
  }
3206
3207
  case "skill": {
3207
3208
  if (rest.includes("--path")) {
3208
- process.stdout.write(`${ROOT2}
3209
+ process.stdout.write(`${PLUGIN_DIR}
3209
3210
  `);
3210
3211
  return;
3211
3212
  }
3212
3213
  const { readFile: readFile7 } = await import("node:fs/promises");
3213
- process.stdout.write(await readFile7(join9(ROOT2, "skills", "reframe", "SKILL.md"), "utf8"));
3214
+ process.stdout.write(await readFile7(join9(PLUGIN_DIR, "skills", "reframe", "SKILL.md"), "utf8"));
3214
3215
  return;
3215
3216
  }
3216
3217
  case "demo":
@@ -475,6 +475,31 @@ group({ id: "burst", x, y, blend: "screen" }, [ disc1, disc2, disc3 ])
475
475
  with the effect). It wraps a matte group and nests. The effects are screen-pixel space.
476
476
  See `examples/scenes/group-fx-demo.ts`.
477
477
 
478
+ ## Device frames (phone / browser / laptop …)
479
+
480
+ To put a **phone, browser, laptop, …** on screen, use the preset — don't hand-draw
481
+ a device out of rects. `devicePreset(name, opts) → NodeIR` returns a parametric
482
+ vector frame (bezel, rounded body, phone notch / dynamic island, browser chrome).
483
+
484
+ - `devicePreset(name, { id, x, y, scale?, opacity?, orientation?, content })` —
485
+ names: `phone` `tablet` `laptop` `browser` `watch` `monitor` `tv` `foldable`
486
+ `terminal` `car`. **There is no `"iphone"` — `"phone"` IS the iOS-style frame**
487
+ (notch + dynamic island). `browser`/`terminal` take an `address` string.
488
+ - `content` nodes are authored in **screen-LOCAL centre coords** (0,0 = screen
489
+ centre) and clipped to the screen. Stable ids `${id}-screen` / `${id}-content`
490
+ (overlay/regen addresses) — keep `id` across rewrites.
491
+ - It's one node: animate the device group for the float/entrance (`tween`/
492
+ `motionPath` its `x`/`y`/`scale`/`rotation`, `oscillate` for an idle drift).
493
+
494
+ ```ts
495
+ // a phone floating centre, a chat bubble inside the screen:
496
+ devicePreset("phone", { id: "hero", x: 960, y: 540, scale: 0.92, opacity: 0,
497
+ content: [ rect({ id: "b1", x: 80, y: -120, width: 300, height: 64, radius: 22, fill: "#2563EB" }) ] })
498
+ // timeline: par(tween("hero", { opacity: 1, scale: 1 }, { ease: "easeOutBack" }))
499
+ ```
500
+
501
+ Pair with `cursor` + `deviceScreenPoint` (below) to click UI *inside* the device.
502
+
478
503
  ## Cursor (UI demos)
479
504
 
480
505
  A vector mouse pointer that glides across the scene and clicks things — for app
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reframe-video",
3
- "version": "0.6.22",
3
+ "version": "0.6.24",
4
4
  "description": "Declarative motion graphics that AI can write and humans can tweak — human edits survive AI regeneration. Deterministic mp4 renders from a plain-data scene format.",
5
5
  "keywords": [
6
6
  "motion-graphics",
@@ -11,9 +11,12 @@ runtime needs ffmpeg on PATH and a one-time `npx playwright install chromium`
11
11
 
12
12
  ## Creating a scene
13
13
 
14
- 1. **Read the guide first** — it is the complete, current syntax (~1,700
15
- tokens) and one read is enough to write valid scenes:
16
- `npx -y reframe-video guide`
14
+ 1. **Read the guide first** — `npx -y reframe-video guide` is the complete,
15
+ current syntax. It's sectioned and sizable: read the core (Nodes, States,
16
+ Timeline) closely, and **skim the specialized sections by heading**
17
+ (perspective, track mattes, group effects, video, montage, character rig,
18
+ device frames, cursor, audio) — read one in full only when your scene uses
19
+ it. You don't need to re-read it for follow-up edits; it's already in context.
17
20
  2. Write a single self-contained `<name>.ts` in the user's directory
18
21
  (`npx -y reframe-video new <name>` scaffolds a documented starter).
19
22
  Scenes must be pure functions of time: no `Math.random()`/`Date` — use
@@ -1,14 +0,0 @@
1
- {
2
- "name": "kiyeonjeon21",
3
- "owner": {
4
- "name": "Kiyeon Jeon",
5
- "url": "https://github.com/kiyeonjeon21"
6
- },
7
- "plugins": [
8
- {
9
- "name": "reframe",
10
- "source": "./",
11
- "description": "Motion-graphics videos as addressable data — generate, tweak, regenerate without losing human edits."
12
- }
13
- ]
14
- }