flomotion 0.0.0-stage → 0.4.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.
Files changed (153) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/LICENSE +21 -0
  3. package/README.md +65 -2
  4. package/dist/bin.mjs +9648 -0
  5. package/dist/chunks/chunk-IGG2VZB6.mjs +4357 -0
  6. package/dist/chunks/chunk-PEC2UVQY.mjs +25080 -0
  7. package/dist/chunks/chunk-TTHAZGRG.mjs +122 -0
  8. package/dist/chunks/chunk-XWY6CUY6.mjs +218 -0
  9. package/dist/chunks/lock-WGPR7CJ2.mjs +29 -0
  10. package/dist/components.mjs +586 -0
  11. package/dist/core.mjs +340 -0
  12. package/dist/hooks.mjs +62 -0
  13. package/dist/jsx-dev-runtime.mjs +13 -0
  14. package/dist/jsx-runtime.mjs +11 -0
  15. package/docs/components/Adjustment.md +74 -0
  16. package/docs/components/Animate.md +45 -0
  17. package/docs/components/Audio.md +56 -0
  18. package/docs/components/B.md +22 -0
  19. package/docs/components/Blur.md +30 -0
  20. package/docs/components/Captions.md +207 -0
  21. package/docs/components/Card.md +105 -0
  22. package/docs/components/Center.md +80 -0
  23. package/docs/components/Chart.md +115 -0
  24. package/docs/components/Chip.md +104 -0
  25. package/docs/components/Circle.md +88 -0
  26. package/docs/components/Clip.md +104 -0
  27. package/docs/components/CodeBlock.md +103 -0
  28. package/docs/components/ColorGrade.md +75 -0
  29. package/docs/components/Composition.md +40 -0
  30. package/docs/components/Counter.md +216 -0
  31. package/docs/components/Cursor.md +94 -0
  32. package/docs/components/Curves.md +29 -0
  33. package/docs/components/DropShadow.md +42 -0
  34. package/docs/components/Enter.md +54 -0
  35. package/docs/components/Exit.md +54 -0
  36. package/docs/components/Font.md +41 -0
  37. package/docs/components/Fonts.md +22 -0
  38. package/docs/components/GlassCard.md +105 -0
  39. package/docs/components/Glitch.md +39 -0
  40. package/docs/components/Glow.md +36 -0
  41. package/docs/components/Grain.md +45 -0
  42. package/docs/components/Grid.md +101 -0
  43. package/docs/components/Group.md +79 -0
  44. package/docs/components/Highlight.md +31 -0
  45. package/docs/components/Hitstop.md +33 -0
  46. package/docs/components/I.md +22 -0
  47. package/docs/components/Image.md +89 -0
  48. package/docs/components/Impact.md +45 -0
  49. package/docs/components/Keyframes.md +37 -0
  50. package/docs/components/Line.md +95 -0
  51. package/docs/components/Look.md +34 -0
  52. package/docs/components/Marker.md +26 -0
  53. package/docs/components/Mask.md +48 -0
  54. package/docs/components/Matte.md +35 -0
  55. package/docs/components/Path.md +100 -0
  56. package/docs/components/Polygon.md +93 -0
  57. package/docs/components/Precomp.md +79 -0
  58. package/docs/components/ProgressRing.md +110 -0
  59. package/docs/components/Pulse.md +39 -0
  60. package/docs/components/PunchZoom.md +36 -0
  61. package/docs/components/README.md +115 -0
  62. package/docs/components/RGBSplit.md +39 -0
  63. package/docs/components/Rect.md +91 -0
  64. package/docs/components/RoundRect.md +91 -0
  65. package/docs/components/SafeArea.md +80 -0
  66. package/docs/components/Scene.md +77 -0
  67. package/docs/components/Sequence.md +77 -0
  68. package/docs/components/Shake.md +48 -0
  69. package/docs/components/Slam.md +51 -0
  70. package/docs/components/Sound.md +42 -0
  71. package/docs/components/Span.md +36 -0
  72. package/docs/components/SplitText.md +218 -0
  73. package/docs/components/SquashStretch.md +39 -0
  74. package/docs/components/Stack.md +97 -0
  75. package/docs/components/Stagger.md +80 -0
  76. package/docs/components/Strike.md +31 -0
  77. package/docs/components/Stroke.md +33 -0
  78. package/docs/components/Svg.md +89 -0
  79. package/docs/components/Text.md +195 -0
  80. package/docs/components/TextAnimator.md +57 -0
  81. package/docs/components/Theme.md +34 -0
  82. package/docs/components/Thud.md +45 -0
  83. package/docs/components/Title.md +195 -0
  84. package/docs/components/Track.md +39 -0
  85. package/docs/components/UIMock.md +107 -0
  86. package/docs/components/Underline.md +31 -0
  87. package/docs/components/Video.md +104 -0
  88. package/docs/components/Vignette.md +45 -0
  89. package/docs/components/Voiceover.md +32 -0
  90. package/docs/components/WhipPan.md +48 -0
  91. package/docs/components/Wobble.md +39 -0
  92. package/docs/gate2-manual-checklist.md +90 -0
  93. package/docs/hyperframes-notes.md +149 -0
  94. package/docs/later.md +27 -0
  95. package/docs/spec.md +208 -0
  96. package/package.json +45 -4
  97. package/skills/flomotion-studio/CHANGELOG.md +39 -0
  98. package/skills/flomotion-studio/README.md +81 -0
  99. package/skills/flomotion-studio/SKILL.md +90 -0
  100. package/skills/flomotion-studio/config/thresholds.md +191 -0
  101. package/skills/flomotion-studio/dataset/annotations/ansarada.md +53 -0
  102. package/skills/flomotion-studio/dataset/annotations/canva.md +49 -0
  103. package/skills/flomotion-studio/dataset/annotations/clickup.md +60 -0
  104. package/skills/flomotion-studio/dataset/annotations/gemini-stub.md +39 -0
  105. package/skills/flomotion-studio/dataset/annotations/monday.md +51 -0
  106. package/skills/flomotion-studio/dataset/annotations/phantom.md +53 -0
  107. package/skills/flomotion-studio/dataset/annotations/slack.md +54 -0
  108. package/skills/flomotion-studio/dataset/annotations/unknown-7.md +39 -0
  109. package/skills/flomotion-studio/dataset/annotations/vaylens.md +53 -0
  110. package/skills/flomotion-studio/dataset/brief-template.md +110 -0
  111. package/skills/flomotion-studio/dataset/rating-sheet.md +28 -0
  112. package/skills/flomotion-studio/dataset/schema.md +44 -0
  113. package/skills/flomotion-studio/evals/README.md +33 -0
  114. package/skills/flomotion-studio/evals/briefs/briefs.md +25 -0
  115. package/skills/flomotion-studio/examples/engine-looks/kinetic.scene.tsx +196 -0
  116. package/skills/flomotion-studio/examples/engine-looks/minimal.scene.tsx +163 -0
  117. package/skills/flomotion-studio/examples/engine-looks/sketch.scene.tsx +180 -0
  118. package/skills/flomotion-studio/examples/flomotion-ad/LOG.md +39 -0
  119. package/skills/flomotion-studio/examples/flomotion-ad/brief.md +41 -0
  120. package/skills/flomotion-studio/examples/flomotion-ad/ideas.md +12 -0
  121. package/skills/flomotion-studio/examples/flomotion-ad/project.tsx +1694 -0
  122. package/skills/flomotion-studio/examples/flomotion-ad/script.md +28 -0
  123. package/skills/flomotion-studio/examples/flomotion-ad/storyboard.md +93 -0
  124. package/skills/flomotion-studio/examples/saas-promo/README.md +7 -0
  125. package/skills/flomotion-studio/examples/saas-promo/make-assets.sh +42 -0
  126. package/skills/flomotion-studio/examples/saas-promo/project.tsx +545 -0
  127. package/skills/flomotion-studio/looks/bold-kinetic.md +122 -0
  128. package/skills/flomotion-studio/looks/clean-light.md +122 -0
  129. package/skills/flomotion-studio/looks/dark-product.md +120 -0
  130. package/skills/flomotion-studio/references/anti-patterns.md +36 -0
  131. package/skills/flomotion-studio/references/assets.md +42 -0
  132. package/skills/flomotion-studio/references/block-recipes.md +249 -0
  133. package/skills/flomotion-studio/references/blocks.md +114 -0
  134. package/skills/flomotion-studio/references/catalogue.md +53 -0
  135. package/skills/flomotion-studio/references/checks.md +87 -0
  136. package/skills/flomotion-studio/references/clean-styles.md +56 -0
  137. package/skills/flomotion-studio/references/components.md +5574 -0
  138. package/skills/flomotion-studio/references/copywriting.md +64 -0
  139. package/skills/flomotion-studio/references/decision-tables.md +80 -0
  140. package/skills/flomotion-studio/references/interview.md +145 -0
  141. package/skills/flomotion-studio/references/looks.md +45 -0
  142. package/skills/flomotion-studio/references/mcp-tools.md +70 -0
  143. package/skills/flomotion-studio/references/motion.md +68 -0
  144. package/skills/flomotion-studio/references/patterns.md +45 -0
  145. package/skills/flomotion-studio/references/review.md +56 -0
  146. package/skills/flomotion-studio/references/script-craft.md +59 -0
  147. package/skills/flomotion-studio/references/sound.md +57 -0
  148. package/skills/flomotion-studio/references/story-templates.md +52 -0
  149. package/skills/flomotion-studio/references/storyboard.md +62 -0
  150. package/skills/flomotion-studio/references/styles.md +70 -0
  151. package/skills/flomotion-studio/references/transitions.md +62 -0
  152. package/skills/flomotion-studio/references/typography.md +46 -0
  153. package/skills/flomotion-studio/references/workflow.md +96 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,93 @@
1
+ # Changelog
2
+
3
+ ## Fixes and examples (unreleased)
4
+
5
+ - **Audio mix is deterministic again.** With voice and music together, two renders of the same project could differ
6
+ in the last samples (`sidechaincompress` paired frames in thread order). The ducking chain now uses fixed frame
7
+ sizes; a regression test mixes the same project 8 times and fails without the fix.
8
+ - **`examples/flomotion-ad`:** a 30 s vertical ad for flomotion, built with the studio skill (real live-view captures,
9
+ its own licence ledger on screen). See its `LOG.md` for what was and was not verified.
10
+
11
+ ## Rename: CodeCut is now flomotion everywhere
12
+
13
+ - The product, packages (`@flomotion/*`), command (`flomotion`), project folder (`.flomotion/`), config file
14
+ (`flomotion.json`) and element ids (`fm_`) all use the name flomotion. The old `codecut` command and `@codecut/*`
15
+ imports are gone. Projects made before the rename: move `.codecut/` to `.flomotion/`, change the imports, and replace `.codecut/` with
16
+ `.flomotion/` inside `.flomotion/fonts.lock.json` and `.flomotion/ledger.json`
17
+ (`sed -i '' 's#\.codecut/#.flomotion/#g' .flomotion/*.json`).
18
+
19
+ ## 0.4.0: setup, your own material, and assets (unreleased)
20
+
21
+ - **`flomotion setup`:** a guided setup (also `setup show | check | set | unset | sounds`, and `--yes`). You choose
22
+ how you supply the voiceover, the word timings, the sound effects and the graphics (your own recording,
23
+ transcript, sound files, logos and screenshots, or Freesound, ElevenLabs, Whisper, Pexels), and enter the keys that
24
+ go with it. Each key is checked with its real service (read-only) and saved only on your computer (`~/.config/
25
+ flomotion/config.json`, mode 0600). It can also install the skill and add flomotion to Claude Code.
26
+ - **Your own material:** `voice_import`, `transcript_import` (SRT, VTT, word-level JSON, lines with times, or plain
27
+ text, with an honest precision: word, cue, estimated), `sound_import`, a searchable library of your own sound
28
+ folder, and `asset_import`. Files may be anywhere on your computer; credentials and key folders are never read.
29
+ - **Assets:** `asset_search` and `asset_get` for icons, emoji, brand logos (trademark: needs permission), photos and
30
+ illustrations (Iconify, Openverse, Pexels); `asset_capture` for sharp screenshots of your own product;
31
+ `brand_extract` for your site's colours, fonts and logos. Licences are classified, share-alike and
32
+ non-commercial refused, CC-BY credited, everything in the ledger; `lint` and the licence report cover images.
33
+ - `setup_status` tool: the agent checks what exists before it plans, and tells you what is missing.
34
+ - ElevenLabs quotes show your account's remaining characters. The server identifies itself as `flomotion` 0.4.0.
35
+ - Skill: `flomotion-studio` 0.4.0 (Round 0 of the interview, `assets.md`, asset plan at G4, own material).
36
+ - Tested: every tool, the wizard (scripted and piped), the key checks against local servers, Iconify and Openverse
37
+ for real, screenshots and brand extraction against a local site.
38
+ - Not verified: Freesound, ElevenLabs and Pexels with real keys, Whisper, and the hidden key prompt on a real terminal.
39
+
40
+ ## 0.3.0: the flomotion-studio skill, install command and live view (unreleased)
41
+
42
+ - **Skill:** `skills/flomotion-studio` (the main director skill: extensive interview, gates G0 to G6, looks, scene
43
+ blocks, checks, copywriting, sound and motion rules) replaces the earlier motion-studio skill. Reconciled with the
44
+ real tools: `references/mcp-tools.md` lists the 30 tools and error codes, `references/checks.md` says which checks
45
+ `review` computes and which the agent computes or cannot run, `references/block-recipes.md` has the 13 core blocks
46
+ as TSX (linted and rendered in all three looks by the tests), `references/components.md` is generated.
47
+ - **Looks:** `clean-light`, `dark-product`, `bold-kinetic` exist in the engine (`theme="$look.clean-light"`),
48
+ matching the skill's JSON (a test keeps them in sync). The engine's `kinetic`, `minimal`, `sketch` stay for the
49
+ examples.
50
+ - **Install:** `flomotion install skill` copies the skill to `~/.claude/skills` (or `--project`), replacing a previous
51
+ copy and noting an old `motion-studio` skill. `flomotion skill install` from 0.2.0 still works.
52
+ - **Live view:** `flomotion ui` and `flomotion mcp --ui`: activity feed of every tool call, gate progress,
53
+ outline and timeline, a scrubbable preview rendered on demand, code with the latest change highlighted, review
54
+ results, assets with licences, renders, and history with Restore. Localhost only, no network.
55
+ - The MCP server logs every call to `.flomotion/activity.jsonl`; `review` writes `.flomotion/review/last.json`;
56
+ the server identifies itself as `flomotion`.
57
+ - Fixed: bin paths written `./dist/bin.mjs` were stripped by npm 11 at publish.
58
+
59
+ ## Phase 2: MCP server, sound, voice, review, skill (unreleased)
60
+
61
+ - `@flomotion/mcp`: 30 tools and 4 resources over stdio (`flomotion mcp`), same patches as the edit ops, applied to the
62
+ TSX with ts-morph (formatting and comments kept, expressions refused, every write re-read and verified, history
63
+ snapshots with undo tokens). Typed errors with fix hints.
64
+ - Freesound client (token auth, tag search, CC0/CC-BY filter, measured peak, ledger, credits file) with a local
65
+ catalogue fallback; voice providers (recording, local TTS stub, ElevenLabs quote then `confirm:true`);
66
+ transcription via whisper.cpp; `align_to_voice`; `sound_auto` for impact cues.
67
+ - Review: 17-point checklist from the compiled animation, lint, ledger, measured mix and the rendered page.
68
+ - `render` presets with credits and licence report; `mix_preview` with measured loudness.
69
+ - `skills/motion-studio`: gated workflow, references (motion, sound, typography, saas-promo, review, generated
70
+ components), three Looks as data with a finished reference scene each, a finished example.
71
+ - CLI: `mcp`, `skill install`; `render` writes credits and a licence report. Bundle: multi-entry esbuild build with
72
+ hooks so a published install (npm package `flomotion`) resolves `@flomotion/*` imports and compiles project TSX with no node_modules.
73
+ - Fixed: `RGBSplit` and `Glitch` showed their effect before their start time (baked span began at the jump).
74
+ `lint` compared `CC0-1.0` with `CC0`. A sound reused for two tags lost its first peak name.
75
+ - Tests: codemods, every tool, review checks, resources, stdio, schema round trip through an MCP call, skill files,
76
+ Look scenes, and the Gate 2 flow against test doubles.
77
+
78
+ ## Phase 1: core engine (unreleased)
79
+
80
+ - Schema system (`defineComponent`/`defineEffect`, 20+ control builders) generating TS types, Zod validators,
81
+ MCP JSON Schema, docs and lint rules from one declaration.
82
+ - JSX runtime, resolver (themes, tokens, refs, timing, expressions), timeline IR, HyperFrames HTML compiler with
83
+ baked, seekable animation; 10 transitions (`shader` is a stub).
84
+ - Keyframes (modes, handles, spatial paths, loops) and pure expressions with a purity linter.
85
+ - 76 definitions: structure, transform stack, media, typography (variable axes, rich text, animators and presets),
86
+ shapes, masks/mattes, layout, UI mocks, impact effects with sound tags, ColorGrade/Curves/Grain, layer styles.
87
+ - Fonts: local, Google (CSS API, licence from google/fonts METADATA.pb), Fontsource fallback, URL, system; hash lock,
88
+ ledger, Chrome-measured layout cache, pre-render font gate, glyph-coverage lint.
89
+ - 24 timeline edit operations and 16 keyframe operations as pure patch producers with undo.
90
+ - Offline FFmpeg audio mixer (buses, sidechain ducking, loudnorm), deterministic.
91
+ - CLI: `init lint render frame sheet fonts sync docs`.
92
+ - Examples: `saas-promo`, `typography`. Tests: unit, compiler snapshots, goldens (perceptual hash), double render,
93
+ schema round trip, fonts, glyph lint, e2e.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 flomotion contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,66 @@
1
- # Temporary Holding Version
1
+ # flomotion
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A code-first video editor. A video is one TSX file; every control a normal editor has is a typed prop or
4
+ function. Claude edits it through an MCP server; rendering is done by
5
+ [HyperFrames](https://github.com/heygen-com/hyperframes) (HTML + GSAP → headless Chrome + FFmpeg → MP4).
6
+
7
+ > **Status: early (0.4).** The engine, the MCP server, the `flomotion-studio` skill and the live view are built and tested against
8
+ > test doubles for Freesound, ElevenLabs and Whisper. Nothing has been run in a real Claude Code session yet:
9
+ > see `docs/gate2-manual-checklist.md` in the repository. Editor type hints for project files are not shipped
10
+ > yet (projects run; editors will not resolve `@flomotion/*` types).
11
+
12
+ ## Requirements
13
+
14
+ Node 22+, **FFmpeg and ffprobe on PATH** (`brew install ffmpeg`), Google Chrome (or set `CHROME_PATH`).
15
+ Optional: `whisper-cpp` for transcription (`brew install whisper-cpp`). Optional environment keys:
16
+ `FREESOUND_API_KEY` (sound search and download), `GOOGLE_FONTS_API_KEY` (font search only),
17
+ `ELEVENLABS_API_KEY` (generated voice; always quoted first, runs only with `confirm: true`).
18
+
19
+ ## Use it from Claude Code
20
+
21
+ ```bash
22
+ npx -y flomotion install skill # installs the flomotion-studio skill for all your projects (~/.claude/skills)
23
+ mkdir my-video && cd my-video
24
+ claude mcp add flomotion -e FREESOUND_API_KEY=… -- npx -y flomotion mcp --dir . --ui
25
+ claude # describe the video you want
26
+ ```
27
+
28
+ `flomotion install skill --project` installs into the current folder only. The skill runs a gated workflow:
29
+ interview (extensive, with a read-back), direction, script, style frames, storyboard, draft, final. It stops for
30
+ your OK at each gate. Sounds and fonts are fetched into a licence ledger; CC-BY credits are written next to the
31
+ render. The agent cannot hear audio or judge taste, so it lists what you need to review.
32
+
33
+ ## Live view
34
+
35
+ `--ui` on the MCP server (or `flomotion ui` in the project folder) serves a small page on `127.0.0.1:4317`. It shows,
36
+ in real time: a **Storyboard** board where you and Claude brainstorm (`ideas.md`) and the plan (`storyboard.md`) shows as a timeline that turns green as scenes are built, each tool call Claude makes with its result, progress through the gates, the scene outline and
37
+ timeline, a preview you can scrub (rendered on demand from the file on disk), the code with the latest change
38
+ highlighted, review results, the sounds and fonts used with their licences, renders you can play, and the
39
+ history with a Restore button. It is a viewer with undo and a notes board, not an editor yet. It listens on localhost only and loads
40
+ nothing from the network.
41
+
42
+ ## CLI
43
+
44
+ ```bash
45
+ flomotion mcp --dir . [--ui] # MCP server over stdio (39 tools, 4 resources); --ui also serves the live view
46
+ flomotion ui [--open] # the live view for this folder
47
+ flomotion install skill [--project]
48
+ flomotion init my-video # scaffold a project
49
+ flomotion fonts sync my-video # download and lock fonts (the only network use besides sound/voice tools)
50
+ flomotion lint my-video
51
+ flomotion render my-video # -> my-video/renders/<id>.mp4 (+ .credits.txt, .licenses.json)
52
+ flomotion frame my-video 2.5 # one PNG
53
+ flomotion sheet my-video # contact sheet
54
+ flomotion docs # reference docs for every component, from the schemas
55
+ ```
56
+
57
+ A project is `project.tsx` exporting a `<Composition>`; components are imported from `@flomotion/components`
58
+ (or `flomotion/components`). Renders never use the network: fonts are locked by hash and checked before the first
59
+ frame; a missing or changed font file fails the render with the font id and path.
60
+
61
+ ## Limits
62
+
63
+ Some Later-tier options are typed stubs (`Precomp`, `Adjustment`, shader transitions, `.cube` LUTs, 3D text).
64
+ Byte-identical renders are verified on one machine only. See `docs/later.md` in the repository.
65
+
66
+ MIT licensed.