greenlight-motion 0.1.3 → 0.1.5

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 CHANGED
@@ -17,16 +17,16 @@ The agent writes the video as data: a `project.json` and its files. The engine t
17
17
  ## Quick start
18
18
 
19
19
  ```bash
20
- npx greenlight-motion@0.1.3 doctor # Node 18+, Chrome or Edge, WebGPU, H.264: what's missing and how to fix it
21
- npx greenlight-motion@0.1.3 init my-video # a working starter: index.html, project.json, assets/
20
+ npx greenlight-motion@0.1.5 doctor # Node 18+, Chrome or Edge, WebGPU, H.264: what's missing and how to fix it
21
+ npx greenlight-motion@0.1.5 init my-video # a working starter: index.html, project.json, assets/
22
22
  # edit my-video/project.json, put pictures / video / sound in my-video/assets/
23
23
  # or: write my-video/script.json (a scene script, skill/references/scene-script.md), then
24
- npx greenlight-motion@0.1.3 script my-video # script.json → project.json with the Video Editor's own presets
25
- npx greenlight-motion@0.1.3 check my-video # what to fix: missing files, template mistakes, blank frames, broken plugins
26
- npx greenlight-motion@0.1.3 stills my-video # frames + a labelled contact sheet, to look at
27
- npx greenlight-motion@0.1.3 render my-video --fps 60 --motion-blur
28
- npx greenlight-motion@0.1.3 pack my-video # everything in ONE html file
29
- npx greenlight-motion@0.1.3 pack my-video --glvideo # ONE .glvideo: double-clicked, it opens in GreenLight Dash
24
+ npx greenlight-motion@0.1.5 script my-video # script.json → project.json with the Video Editor's own presets
25
+ npx greenlight-motion@0.1.5 check my-video # what to fix: missing files, template mistakes, blank frames, broken plugins
26
+ npx greenlight-motion@0.1.5 stills my-video # frames + a labelled contact sheet, to look at
27
+ npx greenlight-motion@0.1.5 render my-video --fps 60 --motion-blur
28
+ npx greenlight-motion@0.1.5 pack my-video # everything in ONE html file
29
+ npx greenlight-motion@0.1.5 pack my-video --glvideo # ONE .glvideo: double-clicked, it opens in GreenLight Dash
30
30
  ```
31
31
 
32
32
  Also: `trace` (every animated layer's values frame by frame, plus the layer's moments), `set key=value`
@@ -72,7 +72,7 @@ The engine is one classic script, so it runs from a double-clicked file, a CDN o
72
72
 
73
73
  ```html
74
74
  <div id="app"></div>
75
- <script src="https://cdn.jsdelivr.net/npm/greenlight-motion@0.1.3/dist/greenlight-motion.js"></script>
75
+ <script src="https://cdn.jsdelivr.net/npm/greenlight-motion@0.1.5/dist/greenlight-motion.js"></script>
76
76
  <script>
77
77
  GreenLightMotion.mountStudio(document.getElementById('app'), {
78
78
  project: { /* project.json */ },
@@ -84,8 +84,11 @@ The engine is one classic script, so it runs from a double-clicked file, a CDN o
84
84
  `mountStudio` is the page every GreenLight surface shows (a project folder's page, a chat's GreenLight Motion page, a
85
85
  shared link, a review card on a board): the preview with Edit · Notes · Highlight, the inspector, the layers and Render.
86
86
  Its review (notes with drawings, highlights, changes) is text to copy for your agent; a host can send it elsewhere
87
- (`config.save`). `GreenLightMotion.mountPage(el, { project, assets, theme })` is the plain page under it, without the
88
- review interface.
87
+ (`config.save`). In a narrow frame — a chat's column, a card — pass `chat: { height, full, onExpand }`: up to 900 px
88
+ wide it becomes the mobile editor in a box `height` px tall (the whole frame with `full: true`), the timeline across the
89
+ width with its panels as sheets over it; wider, the full studio. `onExpand(full)` puts a Full screen button in the app
90
+ bar for a host that can go full screen; the returned studio's `chat.set({ height, full })` follows the host.
91
+ `GreenLightMotion.mountPage(el, { project, assets, theme })` is the plain page under it, without the review interface.
89
92
 
90
93
  Without the page UI (in the browser, through a bundler or the ESM build; Node runs only the CLI):
91
94
 
@@ -325,6 +325,8 @@
325
325
  "frontend/src/motionEngine/soundCues.js",
326
326
  "frontend/src/motionEngine/soundLibrary.js",
327
327
  "frontend/src/motionEngine/stubs/motionTemplatesRegistry.js",
328
+ "frontend/src/motionEngine/studio/chat.css",
329
+ "frontend/src/motionEngine/studio/chat.js",
328
330
  "frontend/src/motionEngine/studio/color.css",
329
331
  "frontend/src/motionEngine/studio/color.js",
330
332
  "frontend/src/motionEngine/studio/focus.css",
@@ -16593,7 +16593,7 @@ function compileScript(script, caps, files = /* @__PURE__ */ new Map()) {
16593
16593
  init_define_import_meta_env();
16594
16594
 
16595
16595
  // ../skills/greenlight-dash/references/video-design.md
16596
- var video_design_default = "# Motion design that looks made, not generated\n\nWhat makes a video read as designed rather than generated. The rules hold however the video is built \u2014 a project\nthrough the app's API, `project.json` with the engine's CLI, or a scene script \u2014 so read them before the first version\nand check every version against them.\n\n## Story and words\n\n- **One idea per scene**: 3\u20136 scenes of 2\u20133 s for a short video. A scene that says two things says neither.\n- **At most ~8 words on screen at once, held at least 1 s.** People read about 3 words a second; text that leaves\n before it is read is noise.\n- **9:16**: bigger text, stacked vertically, everything in the middle 80 %.\n\n## Hierarchy\n\n- One headline per scene; supporting text much smaller. Hierarchy comes from size and weight, not colour alone.\n- One accent colour and strong contrast.\n- Keep text inside the middle 80 % of the frame (in a project: |panX| and |panY| \u2264 40): players and feeds crop the\n edges.\n\n## Timing\n\n- Stagger related elements by 0.06\u20130.12 s.\n- **One focal move at a time.** If everything moves, nothing reads: supporting elements move less and later.\n- Shapes and pictures enter in 0.4\u20130.8 s; exits are faster than entrances.\n- A text animation takes at least 0.8\u20131 s over the whole line, first unit in to last unit settled, unless the video\n needs snap (a beat hit, a glitch flick): faster text flashes past before it is read. The arithmetic per kind of\n animation: video-projects.md, Text animation pace.\n\n## Easing by intent\n\n- Entrances: `AE Out` or `Expo Out` (fast start, soft landing). Camera and big moves: `AE Smooth`.\n- A layer that passes through (in, glide, out): `Smooth Glide` with the `glide` expression \u2014 the Glide keyframe\n presets build it (video-keyframes.md).\n- Playful arrivals: `Back Out` or `Overshoot`. Exits: `Ease In`.\n- `Linear` only for constant motion: tickers, rotation, progress along a path.\n\n## Text animation\n\n- Animate words or letters, never a whole line at once \u2014 the text presets do this.\n- One family per video. Calm presets for lines and captions: Glide Text (`glide-text`), Classic Fade Up\n (`classic-fade-up`), Classic Rise (Mask) (`classic-rise-mask`); Focus Type (`focus-type`) for a title.\n- Punchy presets that tilt or overshoot \u2014 Swing Pop (`swing-pop`), Whip (`whip`), Letter Vortex (`letter-vortex`) \u2014\n only on 1\u20133 words when the video wants energy. On a longer caption they read cheap.\n- Glide Continuous (`glide-continuous`) and Glide Soft Stop (`glide-soft-stop`) never let the text rest: use them\n only when the user asks for drifting text.\n- On a coloured card, pick a preset without a colour band (Classic Rise (Mask), Classic Fade Up): a band's colour can\n clash with the card.\n\n## Transitions and camera\n\n- Vary two or three kinds of transition across a video: one kind everywhere looks like a template, a new one at\n every cut looks random.\n- Camera moves are slow and small unless they are the point. Fast motion looks best at 60 fps with motion blur.\n\n## Sound\n\n- A soft whoosh on each transition and on the first headline is a good base. `data-1` or `selection-data-click` for\n UI-like pops, `cinematic-transition-13` for one big reveal.\n\n## What to check in every version\n\nLook at real frames across the video (a contact sheet) before the user sees it \u2014 the JSON doesn't show these:\nblank or empty frames, overlapping or cut-off text, text too small or gone too fast, nothing moving or everything\nmoving at once, weak hierarchy, clashing colours. Fix them and look again; two rounds are usually enough.\n";
16596
+ var video_design_default = "# Motion design that looks made, not generated\n\nWhat makes a video read as designed rather than generated. The rules hold however the video is built \u2014 a project\nthrough the app's API, `project.json` with the engine's CLI, or a scene script \u2014 so read them before the first version\nand check every version against them.\n\n## Story and words\n\n- **One idea per scene**: 3\u20136 scenes of 2\u20133 s for a short video. A scene that says two things says neither.\n- **At most ~8 words on screen at once, held at least 1 s.** People read about 3 words a second; text that leaves\n before it is read is noise.\n- **9:16**: bigger text, stacked vertically, everything in the middle 80 %.\n\n## Hierarchy\n\n- One headline per scene; supporting text much smaller. Hierarchy comes from size and weight, not colour alone.\n- One accent colour and strong contrast.\n- **No text shadows unless the user asks for one.** A shadow under type reads as a stock default and softens the\n letter edges. When text has to read over footage or a busy picture, get the contrast from the design instead: a\n calmer or darker part of the frame, a caption bar (`textBgEnabled`), or a shape behind the text. So no\n `textShadowX` / `textShadowY` / `textShadowBlur` / `textShadowSpread` on a text layer, no `shadow` property in a\n Text Animator and no `longShadow` effect on text. A shadow already in the user's project stays.\n- Keep text inside the middle 80 % of the frame (in a project: |panX| and |panY| \u2264 40): players and feeds crop the\n edges.\n\n## Timing\n\n- Stagger related elements by 0.06\u20130.12 s.\n- **One focal move at a time.** If everything moves, nothing reads: supporting elements move less and later.\n- Shapes and pictures enter in 0.4\u20130.8 s; exits are faster than entrances.\n- A text animation takes at least 0.8\u20131 s over the whole line, first unit in to last unit settled, unless the video\n needs snap (a beat hit, a glitch flick): faster text flashes past before it is read. The arithmetic per kind of\n animation: video-projects.md, Text animation pace.\n\n## Easing by intent\n\n- Entrances: `AE Out` or `Expo Out` (fast start, soft landing). Camera and big moves: `AE Smooth`.\n- A layer that passes through (in, glide, out): `Smooth Glide` with the `glide` expression \u2014 the Glide keyframe\n presets build it (video-keyframes.md).\n- Playful arrivals: `Back Out` or `Overshoot`. Exits: `Ease In`.\n- `Linear` only for constant motion: tickers, rotation, progress along a path.\n\n## Text animation\n\n- Animate words or letters, never a whole line at once \u2014 the text presets do this.\n- One family per video. Calm presets for lines and captions: Glide Text (`glide-text`), Classic Fade Up\n (`classic-fade-up`), Classic Rise (Mask) (`classic-rise-mask`); Focus Type (`focus-type`) for a title.\n- Punchy presets that tilt or overshoot \u2014 Swing Pop (`swing-pop`), Whip (`whip`), Letter Vortex (`letter-vortex`) \u2014\n only on 1\u20133 words when the video wants energy. On a longer caption they read cheap.\n- Glide Continuous (`glide-continuous`) and Glide Soft Stop (`glide-soft-stop`) never let the text rest: use them\n only when the user asks for drifting text.\n- On a coloured card, pick a preset without a colour band (Classic Rise (Mask), Classic Fade Up): a band's colour can\n clash with the card.\n\n## Transitions and camera\n\n- Vary two or three kinds of transition across a video: one kind everywhere looks like a template, a new one at\n every cut looks random.\n- Camera moves are slow and small unless they are the point. Fast motion looks best at 60 fps with motion blur.\n\n## Sound\n\n- A soft whoosh on each transition and on the first headline is a good base. `data-1` or `selection-data-click` for\n UI-like pops, `cinematic-transition-13` for one big reveal.\n\n## What to check in every version\n\nLook at real frames across the video (a contact sheet) before the user sees it \u2014 the JSON doesn't show these:\nblank or empty frames, overlapping or cut-off text, text too small or gone too fast, nothing moving or everything\nmoving at once, weak hierarchy, clashing colours. Fix them and look again; two rounds are usually enough.\n";
16597
16597
 
16598
16598
  // src/motionEngine/sceneScriptGuide.js
16599
16599
  var PREFERRED = {