mografy 0.0.0-stage → 0.1.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.
Files changed (260) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -2
  3. package/bin/mografy.js +17 -0
  4. package/examples/catalog.json +221 -0
  5. package/lib/node_modules/@mografy/cli/bin/locate.mjs +45 -0
  6. package/lib/node_modules/@mografy/cli/bin/mografy.js +23 -0
  7. package/lib/node_modules/@mografy/cli/dist/add.d.ts +19 -0
  8. package/lib/node_modules/@mografy/cli/dist/add.js +123 -0
  9. package/lib/node_modules/@mografy/cli/dist/commands/check.d.ts +1 -0
  10. package/lib/node_modules/@mografy/cli/dist/commands/check.js +64 -0
  11. package/lib/node_modules/@mografy/cli/dist/commands/dev.d.ts +5 -0
  12. package/lib/node_modules/@mografy/cli/dist/commands/dev.js +56 -0
  13. package/lib/node_modules/@mografy/cli/dist/commands/help.d.ts +5 -0
  14. package/lib/node_modules/@mografy/cli/dist/commands/help.js +71 -0
  15. package/lib/node_modules/@mografy/cli/dist/commands/review.d.ts +1 -0
  16. package/lib/node_modules/@mografy/cli/dist/commands/review.js +35 -0
  17. package/lib/node_modules/@mografy/cli/dist/commands/setup.d.ts +5 -0
  18. package/lib/node_modules/@mografy/cli/dist/commands/setup.js +62 -0
  19. package/lib/node_modules/@mografy/cli/dist/examples.d.ts +23 -0
  20. package/lib/node_modules/@mografy/cli/dist/examples.js +121 -0
  21. package/lib/node_modules/@mografy/cli/dist/export-transport.d.ts +11 -0
  22. package/lib/node_modules/@mografy/cli/dist/export-transport.js +26 -0
  23. package/lib/node_modules/@mografy/cli/dist/export.d.ts +17 -0
  24. package/lib/node_modules/@mografy/cli/dist/export.js +202 -0
  25. package/lib/node_modules/@mografy/cli/dist/extras.d.ts +26 -0
  26. package/lib/node_modules/@mografy/cli/dist/extras.js +111 -0
  27. package/lib/node_modules/@mografy/cli/dist/github.d.ts +11 -0
  28. package/lib/node_modules/@mografy/cli/dist/github.js +41 -0
  29. package/lib/node_modules/@mografy/cli/dist/index.d.ts +6 -0
  30. package/lib/node_modules/@mografy/cli/dist/index.js +176 -0
  31. package/lib/node_modules/@mografy/cli/dist/launcher.d.ts +18 -0
  32. package/lib/node_modules/@mografy/cli/dist/launcher.js +126 -0
  33. package/lib/node_modules/@mografy/cli/dist/mcp/hosts.d.ts +42 -0
  34. package/lib/node_modules/@mografy/cli/dist/mcp/hosts.js +127 -0
  35. package/lib/node_modules/@mografy/cli/dist/mcp/index.d.ts +1 -0
  36. package/lib/node_modules/@mografy/cli/dist/mcp/index.js +48 -0
  37. package/lib/node_modules/@mografy/cli/dist/mcp/rpc.d.ts +29 -0
  38. package/lib/node_modules/@mografy/cli/dist/mcp/rpc.js +84 -0
  39. package/lib/node_modules/@mografy/cli/dist/mcp/tools.d.ts +22 -0
  40. package/lib/node_modules/@mografy/cli/dist/mcp/tools.js +319 -0
  41. package/lib/node_modules/@mografy/cli/dist/options.d.ts +29 -0
  42. package/lib/node_modules/@mografy/cli/dist/options.js +74 -0
  43. package/lib/node_modules/@mografy/cli/dist/package-update.d.ts +4 -0
  44. package/lib/node_modules/@mografy/cli/dist/package-update.js +38 -0
  45. package/lib/node_modules/@mografy/cli/dist/paths.d.ts +7 -0
  46. package/lib/node_modules/@mografy/cli/dist/paths.js +27 -0
  47. package/lib/node_modules/@mografy/cli/dist/progress.d.ts +9 -0
  48. package/lib/node_modules/@mografy/cli/dist/progress.js +118 -0
  49. package/lib/node_modules/@mografy/cli/dist/project-args.d.ts +19 -0
  50. package/lib/node_modules/@mografy/cli/dist/project-args.js +50 -0
  51. package/lib/node_modules/@mografy/cli/dist/project-install.d.ts +27 -0
  52. package/lib/node_modules/@mografy/cli/dist/project-install.js +112 -0
  53. package/lib/node_modules/@mografy/cli/dist/showcase.d.ts +27 -0
  54. package/lib/node_modules/@mografy/cli/dist/showcase.js +109 -0
  55. package/lib/node_modules/@mografy/cli/dist/skill-hint.d.ts +4 -0
  56. package/lib/node_modules/@mografy/cli/dist/skill-hint.js +17 -0
  57. package/lib/node_modules/@mografy/cli/dist/skills.d.ts +6 -0
  58. package/lib/node_modules/@mografy/cli/dist/skills.js +43 -0
  59. package/lib/node_modules/@mografy/cli/dist/templates.d.ts +55 -0
  60. package/lib/node_modules/@mografy/cli/dist/templates.js +179 -0
  61. package/lib/node_modules/@mografy/cli/dist/update.d.ts +23 -0
  62. package/lib/node_modules/@mografy/cli/dist/update.js +258 -0
  63. package/lib/node_modules/@mografy/cli/package.json +14 -0
  64. package/lib/node_modules/@mografy/core/dist/api.d.ts +10 -0
  65. package/lib/node_modules/@mografy/core/dist/api.js +24 -0
  66. package/lib/node_modules/@mografy/core/dist/export-settings.d.ts +322 -0
  67. package/lib/node_modules/@mografy/core/dist/export-settings.js +157 -0
  68. package/lib/node_modules/@mografy/core/dist/guide.d.ts +25 -0
  69. package/lib/node_modules/@mografy/core/dist/guide.js +231 -0
  70. package/lib/node_modules/@mografy/core/dist/index.d.ts +16 -0
  71. package/lib/node_modules/@mografy/core/dist/index.js +15 -0
  72. package/lib/node_modules/@mografy/core/dist/parameters.d.ts +16 -0
  73. package/lib/node_modules/@mografy/core/dist/parameters.js +49 -0
  74. package/lib/node_modules/@mografy/core/dist/project-schema.d.ts +109 -0
  75. package/lib/node_modules/@mografy/core/dist/project-schema.js +48 -0
  76. package/lib/node_modules/@mografy/core/dist/protocol.d.ts +129 -0
  77. package/lib/node_modules/@mografy/core/dist/protocol.js +2 -0
  78. package/lib/node_modules/@mografy/core/dist/requests.d.ts +296 -0
  79. package/lib/node_modules/@mografy/core/dist/requests.js +53 -0
  80. package/lib/node_modules/@mografy/core/dist/scene-checks.d.ts +18 -0
  81. package/lib/node_modules/@mografy/core/dist/scene-checks.js +41 -0
  82. package/lib/node_modules/@mografy/core/dist/scene-inputs.d.ts +3 -0
  83. package/lib/node_modules/@mografy/core/dist/scene-inputs.js +9 -0
  84. package/lib/node_modules/@mografy/core/dist/scene-meta.d.ts +354 -0
  85. package/lib/node_modules/@mografy/core/dist/scene-meta.js +91 -0
  86. package/lib/node_modules/@mografy/core/dist/schema-parts.d.ts +5 -0
  87. package/lib/node_modules/@mografy/core/dist/schema-parts.js +7 -0
  88. package/lib/node_modules/@mografy/core/dist/shot-stops.d.ts +12 -0
  89. package/lib/node_modules/@mografy/core/dist/shot-stops.js +15 -0
  90. package/lib/node_modules/@mografy/core/dist/skill-text.d.ts +26 -0
  91. package/lib/node_modules/@mografy/core/dist/skill-text.js +28 -0
  92. package/lib/node_modules/@mografy/core/dist/smoothness.d.ts +59 -0
  93. package/lib/node_modules/@mografy/core/dist/smoothness.js +79 -0
  94. package/lib/node_modules/@mografy/core/dist/source-checks.d.ts +7 -0
  95. package/lib/node_modules/@mografy/core/dist/source-checks.js +22 -0
  96. package/lib/node_modules/@mografy/core/dist/timing.d.ts +29 -0
  97. package/lib/node_modules/@mografy/core/dist/timing.js +39 -0
  98. package/lib/node_modules/@mografy/core/package.json +14 -0
  99. package/lib/node_modules/@mografy/render/dist/animation.d.ts +41 -0
  100. package/lib/node_modules/@mografy/render/dist/animation.js +113 -0
  101. package/lib/node_modules/@mografy/render/dist/build.d.ts +19 -0
  102. package/lib/node_modules/@mografy/render/dist/build.js +176 -0
  103. package/lib/node_modules/@mografy/render/dist/cdp.d.ts +114 -0
  104. package/lib/node_modules/@mografy/render/dist/cdp.js +442 -0
  105. package/lib/node_modules/@mografy/render/dist/chromium.d.ts +16 -0
  106. package/lib/node_modules/@mografy/render/dist/chromium.js +49 -0
  107. package/lib/node_modules/@mografy/render/dist/codecs.d.ts +73 -0
  108. package/lib/node_modules/@mografy/render/dist/codecs.js +175 -0
  109. package/lib/node_modules/@mografy/render/dist/ffmpeg.d.ts +43 -0
  110. package/lib/node_modules/@mografy/render/dist/ffmpeg.js +145 -0
  111. package/lib/node_modules/@mografy/render/dist/fs-util.d.ts +18 -0
  112. package/lib/node_modules/@mografy/render/dist/fs-util.js +30 -0
  113. package/lib/node_modules/@mografy/render/dist/host-page.d.ts +168 -0
  114. package/lib/node_modules/@mografy/render/dist/host-page.js +260 -0
  115. package/lib/node_modules/@mografy/render/dist/host-server.d.ts +14 -0
  116. package/lib/node_modules/@mografy/render/dist/host-server.js +101 -0
  117. package/lib/node_modules/@mografy/render/dist/host.d.ts +159 -0
  118. package/lib/node_modules/@mografy/render/dist/host.js +354 -0
  119. package/lib/node_modules/@mografy/render/dist/index.d.ts +12 -0
  120. package/lib/node_modules/@mografy/render/dist/index.js +12 -0
  121. package/lib/node_modules/@mografy/render/dist/post-worker.d.ts +12 -0
  122. package/lib/node_modules/@mografy/render/dist/post-worker.js +40 -0
  123. package/lib/node_modules/@mografy/render/dist/review.d.ts +30 -0
  124. package/lib/node_modules/@mografy/render/dist/review.js +93 -0
  125. package/lib/node_modules/@mografy/render/dist/tools.d.ts +38 -0
  126. package/lib/node_modules/@mografy/render/dist/tools.js +167 -0
  127. package/lib/node_modules/@mografy/render/dist/video.d.ts +43 -0
  128. package/lib/node_modules/@mografy/render/dist/video.js +156 -0
  129. package/lib/node_modules/@mografy/render/package.json +18 -0
  130. package/lib/node_modules/@mografy/runtime/dist/canvas.d.ts +92 -0
  131. package/lib/node_modules/@mografy/runtime/dist/canvas.js +225 -0
  132. package/lib/node_modules/@mografy/runtime/dist/colors.d.ts +23 -0
  133. package/lib/node_modules/@mografy/runtime/dist/colors.js +76 -0
  134. package/lib/node_modules/@mografy/runtime/dist/draw.d.ts +47 -0
  135. package/lib/node_modules/@mografy/runtime/dist/draw.js +131 -0
  136. package/lib/node_modules/@mografy/runtime/dist/film.d.ts +188 -0
  137. package/lib/node_modules/@mografy/runtime/dist/film.js +385 -0
  138. package/lib/node_modules/@mografy/runtime/dist/index.d.ts +9 -0
  139. package/lib/node_modules/@mografy/runtime/dist/index.js +9 -0
  140. package/lib/node_modules/@mografy/runtime/dist/layers.d.ts +61 -0
  141. package/lib/node_modules/@mografy/runtime/dist/layers.js +134 -0
  142. package/lib/node_modules/@mografy/runtime/dist/math.d.ts +23 -0
  143. package/lib/node_modules/@mografy/runtime/dist/math.js +43 -0
  144. package/lib/node_modules/@mografy/runtime/dist/motion.d.ts +54 -0
  145. package/lib/node_modules/@mografy/runtime/dist/motion.js +72 -0
  146. package/lib/node_modules/@mografy/runtime/dist/post.d.ts +64 -0
  147. package/lib/node_modules/@mografy/runtime/dist/post.js +254 -0
  148. package/lib/node_modules/@mografy/runtime/dist/scene.d.ts +5 -0
  149. package/lib/node_modules/@mografy/runtime/dist/scene.js +8 -0
  150. package/lib/node_modules/@mografy/runtime/dist/timeline.d.ts +164 -0
  151. package/lib/node_modules/@mografy/runtime/dist/timeline.js +380 -0
  152. package/lib/node_modules/@mografy/runtime/package.json +22 -0
  153. package/lib/node_modules/@mografy/server/dist/component-thumbnails.d.ts +5 -0
  154. package/lib/node_modules/@mografy/server/dist/component-thumbnails.js +44 -0
  155. package/lib/node_modules/@mografy/server/dist/components.d.ts +54 -0
  156. package/lib/node_modules/@mografy/server/dist/components.js +56 -0
  157. package/lib/node_modules/@mografy/server/dist/errors.d.ts +7 -0
  158. package/lib/node_modules/@mografy/server/dist/errors.js +15 -0
  159. package/lib/node_modules/@mografy/server/dist/export-queue.d.ts +37 -0
  160. package/lib/node_modules/@mografy/server/dist/export-queue.js +195 -0
  161. package/lib/node_modules/@mografy/server/dist/files.d.ts +12 -0
  162. package/lib/node_modules/@mografy/server/dist/files.js +98 -0
  163. package/lib/node_modules/@mografy/server/dist/http-io.d.ts +11 -0
  164. package/lib/node_modules/@mografy/server/dist/http-io.js +85 -0
  165. package/lib/node_modules/@mografy/server/dist/http.d.ts +17 -0
  166. package/lib/node_modules/@mografy/server/dist/http.js +159 -0
  167. package/lib/node_modules/@mografy/server/dist/index.d.ts +5 -0
  168. package/lib/node_modules/@mografy/server/dist/index.js +6 -0
  169. package/lib/node_modules/@mografy/server/dist/installation.d.ts +50 -0
  170. package/lib/node_modules/@mografy/server/dist/installation.js +67 -0
  171. package/lib/node_modules/@mografy/server/dist/lock.d.ts +23 -0
  172. package/lib/node_modules/@mografy/server/dist/lock.js +66 -0
  173. package/lib/node_modules/@mografy/server/dist/project-frames.d.ts +22 -0
  174. package/lib/node_modules/@mografy/server/dist/project-frames.js +48 -0
  175. package/lib/node_modules/@mografy/server/dist/project-routes.d.ts +3 -0
  176. package/lib/node_modules/@mografy/server/dist/project-routes.js +103 -0
  177. package/lib/node_modules/@mografy/server/dist/project-scaffold.d.ts +13 -0
  178. package/lib/node_modules/@mografy/server/dist/project-scaffold.js +97 -0
  179. package/lib/node_modules/@mografy/server/dist/project-session.d.ts +26 -0
  180. package/lib/node_modules/@mografy/server/dist/project-session.js +146 -0
  181. package/lib/node_modules/@mografy/server/dist/project-watcher.d.ts +25 -0
  182. package/lib/node_modules/@mografy/server/dist/project-watcher.js +127 -0
  183. package/lib/node_modules/@mografy/server/dist/project.d.ts +216 -0
  184. package/lib/node_modules/@mografy/server/dist/project.js +497 -0
  185. package/lib/node_modules/@mografy/server/dist/render-jobs.d.ts +23 -0
  186. package/lib/node_modules/@mografy/server/dist/render-jobs.js +122 -0
  187. package/lib/node_modules/@mografy/server/dist/sheet-plan.d.ts +21 -0
  188. package/lib/node_modules/@mografy/server/dist/sheet-plan.js +30 -0
  189. package/lib/node_modules/@mografy/server/dist/workspace-routes.d.ts +3 -0
  190. package/lib/node_modules/@mografy/server/dist/workspace-routes.js +47 -0
  191. package/lib/node_modules/@mografy/server/dist/workspace-state.d.ts +17 -0
  192. package/lib/node_modules/@mografy/server/dist/workspace-state.js +62 -0
  193. package/lib/node_modules/@mografy/server/dist/workspace.d.ts +16 -0
  194. package/lib/node_modules/@mografy/server/dist/workspace.js +93 -0
  195. package/lib/node_modules/@mografy/server/package.json +14 -0
  196. package/lib/node_modules/@mografy/server/template/assets/ABeeZee-Regular.ttf +0 -0
  197. package/lib/node_modules/@mografy/server/template/assets/OFL.txt +93 -0
  198. package/lib/node_modules/@mografy/server/template/gitignore +2 -0
  199. package/lib/node_modules/@mografy/server/template/mografy.json +11 -0
  200. package/lib/node_modules/@mografy/server/template/scenes/ai-chat.ts +11 -0
  201. package/lib/node_modules/@mografy/server/template/scenes/audio-wave.ts +9 -0
  202. package/lib/node_modules/@mografy/server/template/scenes/brand-logo.ts +4 -0
  203. package/lib/node_modules/@mografy/server/template/scenes/component-frame.ts +30 -0
  204. package/lib/node_modules/@mografy/server/template/scenes/components.ts +110 -0
  205. package/lib/node_modules/@mografy/server/template/scenes/count-up.ts +9 -0
  206. package/lib/node_modules/@mografy/server/template/scenes/follow-badge.ts +10 -0
  207. package/lib/node_modules/@mografy/server/template/scenes/like-burst.ts +10 -0
  208. package/lib/node_modules/@mografy/server/template/scenes/logo-reveal.ts +9 -0
  209. package/lib/node_modules/@mografy/server/template/scenes/lower-third.ts +10 -0
  210. package/lib/node_modules/@mografy/server/template/scenes/main.ts +26 -0
  211. package/lib/node_modules/@mografy/server/template/scenes/notification-toast.ts +10 -0
  212. package/lib/node_modules/@mografy/server/template/scenes/pop-card.ts +17 -0
  213. package/lib/node_modules/@mografy/server/template/scenes/progress-bar.ts +10 -0
  214. package/lib/node_modules/@mografy/server/template/scenes/pulse-dots.ts +10 -0
  215. package/lib/node_modules/@mografy/server/template/scenes/showcase.ts +54 -0
  216. package/lib/node_modules/@mografy/server/template/scenes/social-card.ts +10 -0
  217. package/lib/node_modules/@mografy/server/template/scenes/social-components.ts +252 -0
  218. package/lib/node_modules/@mografy/server/template/scenes/stagger-text.ts +15 -0
  219. package/lib/node_modules/@mografy/server/template/scenes/toggle-switch.ts +9 -0
  220. package/lib/node_modules/@mografy/server/template/scenes/typewriter.ts +11 -0
  221. package/lib/node_modules/@mografy/server/template/scenes/youtube-subscribe.ts +10 -0
  222. package/lib/node_modules/@mografy/server/thumbnails/ai-chat.json +3 -0
  223. package/lib/node_modules/@mografy/server/thumbnails/ai-chat.png +0 -0
  224. package/lib/node_modules/@mografy/server/thumbnails/audio-wave.json +3 -0
  225. package/lib/node_modules/@mografy/server/thumbnails/audio-wave.png +0 -0
  226. package/lib/node_modules/@mografy/server/thumbnails/count-up.json +3 -0
  227. package/lib/node_modules/@mografy/server/thumbnails/count-up.png +0 -0
  228. package/lib/node_modules/@mografy/server/thumbnails/follow-badge.json +3 -0
  229. package/lib/node_modules/@mografy/server/thumbnails/follow-badge.png +0 -0
  230. package/lib/node_modules/@mografy/server/thumbnails/like-burst.json +3 -0
  231. package/lib/node_modules/@mografy/server/thumbnails/like-burst.png +0 -0
  232. package/lib/node_modules/@mografy/server/thumbnails/logo-reveal.json +3 -0
  233. package/lib/node_modules/@mografy/server/thumbnails/logo-reveal.png +0 -0
  234. package/lib/node_modules/@mografy/server/thumbnails/lower-third.json +3 -0
  235. package/lib/node_modules/@mografy/server/thumbnails/lower-third.png +0 -0
  236. package/lib/node_modules/@mografy/server/thumbnails/notification-toast.json +3 -0
  237. package/lib/node_modules/@mografy/server/thumbnails/notification-toast.png +0 -0
  238. package/lib/node_modules/@mografy/server/thumbnails/pop-card.json +3 -0
  239. package/lib/node_modules/@mografy/server/thumbnails/pop-card.png +0 -0
  240. package/lib/node_modules/@mografy/server/thumbnails/progress-bar.json +3 -0
  241. package/lib/node_modules/@mografy/server/thumbnails/progress-bar.png +0 -0
  242. package/lib/node_modules/@mografy/server/thumbnails/pulse-dots.json +3 -0
  243. package/lib/node_modules/@mografy/server/thumbnails/pulse-dots.png +0 -0
  244. package/lib/node_modules/@mografy/server/thumbnails/social-card.json +3 -0
  245. package/lib/node_modules/@mografy/server/thumbnails/social-card.png +0 -0
  246. package/lib/node_modules/@mografy/server/thumbnails/stagger-text.json +3 -0
  247. package/lib/node_modules/@mografy/server/thumbnails/stagger-text.png +0 -0
  248. package/lib/node_modules/@mografy/server/thumbnails/toggle-switch.json +3 -0
  249. package/lib/node_modules/@mografy/server/thumbnails/toggle-switch.png +0 -0
  250. package/lib/node_modules/@mografy/server/thumbnails/typewriter.json +3 -0
  251. package/lib/node_modules/@mografy/server/thumbnails/typewriter.png +0 -0
  252. package/lib/node_modules/@mografy/server/thumbnails/youtube-subscribe.json +3 -0
  253. package/lib/node_modules/@mografy/server/thumbnails/youtube-subscribe.png +0 -0
  254. package/lib/node_modules/@mografy/web/dist/app.css +2 -0
  255. package/lib/node_modules/@mografy/web/dist/app.js +137 -0
  256. package/lib/node_modules/@mografy/web/dist/favicon.svg +1 -0
  257. package/lib/node_modules/@mografy/web/dist/index.html +12 -0
  258. package/lib/node_modules/@mografy/web/dist/mografy-mascot-G2QLWEPR.png +0 -0
  259. package/lib/node_modules/@mografy/web/package.json +10 -0
  260. package/package.json +45 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mografy 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,23 @@
1
- # Temporary Holding Version
1
+ # Mografy
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
+ Local Canvas motion design for Claude Code and Codex. Scenes are TypeScript modules drawn as a pure function of time;
4
+ `mografy dev` previews them live and `mografy export` writes MP4, WebM, MOV, Lottie or SVGA.
5
+
6
+ ```sh
7
+ npx mografy@latest init # creates ./mografy: a project with Mografy and its agent Skill inside
8
+ cd mografy
9
+ npx mografy dev # open the editor (or: npm run dev)
10
+ ```
11
+
12
+ Then open Claude Code or Codex in the `mografy` folder and describe the animation. Everything lives in that folder:
13
+ nothing is installed globally, and deleting the folder removes it. `npx mografy@latest init my-film` names the folder.
14
+ To update, run `npx mografy@latest` inside it.
15
+
16
+ You don't install FFmpeg or Chromium: Chrome or Edge renders checks and exports, and FFmpeg downloads into the
17
+ project the first time you export a video (a Chromium shell too, only without Chrome or Edge), or ahead of time with
18
+ `npx mografy setup`. Templates, helpers and reference films download from GitHub
19
+ when `mografy add` needs them.
20
+
21
+ Optional, for every folder: `npm install -g mografy` and `npx skills add mografy/mografy -g`.
22
+
23
+ Documentation and the source: https://github.com/mografy/mografy
package/bin/mografy.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ // The `mografy` command of the npm package. Inside a Mografy checkout that was installed on this computer, that
3
+ // checkout runs instead (the same rule as the PATH launcher), so working on Mografy itself never uses a stale package.
4
+ import { existsSync } from 'node:fs';
5
+ import { join } from 'node:path';
6
+ import { pathToFileURL } from 'node:url';
7
+ import { checkoutAround, warnUntrusted } from '../lib/node_modules/@mografy/cli/bin/locate.mjs';
8
+
9
+ let entry = new URL('../lib/node_modules/@mografy/cli/dist/index.js', import.meta.url);
10
+ const found = checkoutAround(process.cwd());
11
+ if (found?.trusted && existsSync(join(found.path, 'packages/cli/dist/index.js'))) entry = pathToFileURL(join(found.path, 'packages/cli/dist/index.js'));
12
+ else if (found && !found.trusted && !process.env.MOGRAFY_CHECKOUT_CHECKED) warnUntrusted(found.dir);
13
+
14
+ import(entry.href).then(({ main }) => main()).catch(error => {
15
+ console.error(error instanceof Error ? error.message : String(error));
16
+ process.exit(1);
17
+ });
@@ -0,0 +1,221 @@
1
+ {
2
+ "generated": "pnpm examples:sync — do not edit by hand",
3
+ "examples": [
4
+ {
5
+ "name": "mografy-intro",
6
+ "title": "Mografy intro",
7
+ "files": [
8
+ ".gitignore",
9
+ "AGENTS.md",
10
+ "CLAUDE.md",
11
+ "assets/ABeeZee-Regular.ttf",
12
+ "assets/OFL.txt",
13
+ "assets/intro-music.mp3",
14
+ "mografy.json",
15
+ "scenes/logo.ts",
16
+ "scenes/main.ts",
17
+ "tools/make-music.py"
18
+ ]
19
+ },
20
+ {
21
+ "name": "stage-bento",
22
+ "title": "Stage · Bento",
23
+ "files": [
24
+ ".gitignore",
25
+ "AGENTS.md",
26
+ "CLAUDE.md",
27
+ "README.md",
28
+ "assets/Inter-LICENSE.txt",
29
+ "assets/Inter-Medium.otf",
30
+ "assets/Inter-Regular.otf",
31
+ "assets/Inter-SemiBold.otf",
32
+ "mografy.json",
33
+ "scenes/main.ts",
34
+ "scenes/stage.ts",
35
+ "storyboards/storyboard.md",
36
+ "style.md",
37
+ "tsconfig.json"
38
+ ]
39
+ },
40
+ {
41
+ "name": "stage-calendar",
42
+ "title": "Stage · Calendar drag",
43
+ "files": [
44
+ ".gitignore",
45
+ "AGENTS.md",
46
+ "CLAUDE.md",
47
+ "README.md",
48
+ "assets/Inter-LICENSE.txt",
49
+ "assets/Inter-Medium.otf",
50
+ "assets/Inter-Regular.otf",
51
+ "assets/Inter-SemiBold.otf",
52
+ "mografy.json",
53
+ "scenes/main.ts",
54
+ "scenes/stage.ts",
55
+ "storyboards/storyboard.md",
56
+ "style.md",
57
+ "tsconfig.json"
58
+ ]
59
+ },
60
+ {
61
+ "name": "stage-checkout",
62
+ "title": "Stage · Checkout",
63
+ "files": [
64
+ ".gitignore",
65
+ "AGENTS.md",
66
+ "CLAUDE.md",
67
+ "README.md",
68
+ "assets/Inter-LICENSE.txt",
69
+ "assets/Inter-Medium.otf",
70
+ "assets/Inter-Regular.otf",
71
+ "assets/Inter-SemiBold.otf",
72
+ "mografy.json",
73
+ "scenes/main.ts",
74
+ "scenes/stage.ts",
75
+ "storyboards/storyboard.md",
76
+ "style.md",
77
+ "tsconfig.json"
78
+ ]
79
+ },
80
+ {
81
+ "name": "stage-command",
82
+ "title": "Stage · Command palette",
83
+ "files": [
84
+ ".gitignore",
85
+ "AGENTS.md",
86
+ "CLAUDE.md",
87
+ "README.md",
88
+ "assets/Inter-LICENSE.txt",
89
+ "assets/Inter-Medium.otf",
90
+ "assets/Inter-Regular.otf",
91
+ "assets/Inter-SemiBold.otf",
92
+ "mografy.json",
93
+ "scenes/main.ts",
94
+ "scenes/stage.ts",
95
+ "storyboards/storyboard.md",
96
+ "style.md",
97
+ "tsconfig.json"
98
+ ]
99
+ },
100
+ {
101
+ "name": "stage-dashboard",
102
+ "title": "Stage · Dashboard",
103
+ "files": [
104
+ ".gitignore",
105
+ "AGENTS.md",
106
+ "CLAUDE.md",
107
+ "README.md",
108
+ "assets/Inter-LICENSE.txt",
109
+ "assets/Inter-Medium.otf",
110
+ "assets/Inter-Regular.otf",
111
+ "assets/Inter-SemiBold.otf",
112
+ "mografy.json",
113
+ "scenes/main.ts",
114
+ "scenes/stage.ts",
115
+ "storyboards/storyboard.md",
116
+ "style.md",
117
+ "tsconfig.json"
118
+ ]
119
+ },
120
+ {
121
+ "name": "stage-invoices",
122
+ "title": "Stage · Invoices",
123
+ "files": [
124
+ ".gitignore",
125
+ "AGENTS.md",
126
+ "CLAUDE.md",
127
+ "README.md",
128
+ "assets/Inter-LICENSE.txt",
129
+ "assets/Inter-Medium.otf",
130
+ "assets/Inter-Regular.otf",
131
+ "assets/Inter-SemiBold.otf",
132
+ "mografy.json",
133
+ "scenes/main.ts",
134
+ "scenes/stage.ts",
135
+ "storyboards/storyboard.md",
136
+ "style.md",
137
+ "tsconfig.json"
138
+ ]
139
+ },
140
+ {
141
+ "name": "stage-phone",
142
+ "title": "Stage · Phone reply",
143
+ "files": [
144
+ ".gitignore",
145
+ "AGENTS.md",
146
+ "CLAUDE.md",
147
+ "README.md",
148
+ "assets/Inter-LICENSE.txt",
149
+ "assets/Inter-Medium.otf",
150
+ "assets/Inter-Regular.otf",
151
+ "assets/Inter-SemiBold.otf",
152
+ "mografy.json",
153
+ "scenes/main.ts",
154
+ "scenes/stage.ts",
155
+ "storyboards/storyboard.md",
156
+ "style.md",
157
+ "tsconfig.json"
158
+ ]
159
+ },
160
+ {
161
+ "name": "stage-request",
162
+ "title": "Stage · Two screens",
163
+ "files": [
164
+ ".gitignore",
165
+ "AGENTS.md",
166
+ "CLAUDE.md",
167
+ "README.md",
168
+ "assets/Inter-LICENSE.txt",
169
+ "assets/Inter-Medium.otf",
170
+ "assets/Inter-Regular.otf",
171
+ "assets/Inter-SemiBold.otf",
172
+ "mografy.json",
173
+ "scenes/main.ts",
174
+ "scenes/stage.ts",
175
+ "storyboards/storyboard.md",
176
+ "style.md",
177
+ "tsconfig.json"
178
+ ]
179
+ },
180
+ {
181
+ "name": "stage-snooze",
182
+ "title": "Stage · Snooze",
183
+ "files": [
184
+ ".gitignore",
185
+ "AGENTS.md",
186
+ "CLAUDE.md",
187
+ "README.md",
188
+ "assets/Inter-LICENSE.txt",
189
+ "assets/Inter-Medium.otf",
190
+ "assets/Inter-Regular.otf",
191
+ "assets/Inter-SemiBold.otf",
192
+ "mografy.json",
193
+ "scenes/main.ts",
194
+ "scenes/stage.ts",
195
+ "storyboards/storyboard.md",
196
+ "style.md",
197
+ "tsconfig.json"
198
+ ]
199
+ },
200
+ {
201
+ "name": "stage-upload",
202
+ "title": "Stage · Upload diagram",
203
+ "files": [
204
+ ".gitignore",
205
+ "AGENTS.md",
206
+ "CLAUDE.md",
207
+ "README.md",
208
+ "assets/Inter-LICENSE.txt",
209
+ "assets/Inter-Medium.otf",
210
+ "assets/Inter-Regular.otf",
211
+ "assets/Inter-SemiBold.otf",
212
+ "mografy.json",
213
+ "scenes/main.ts",
214
+ "scenes/stage.ts",
215
+ "storyboards/storyboard.md",
216
+ "style.md",
217
+ "tsconfig.json"
218
+ ]
219
+ }
220
+ ]
221
+ }
@@ -0,0 +1,45 @@
1
+ // The one place that decides which Mografy checkout runs. bin/mografy.js imports it, and `mografy install-command`
2
+ // copies it beside the trust list so the PATH launchers still work when the checkout they came from is gone. It must
3
+ // stay a single file with no dependencies. A checkout around the current folder is used only when it was installed on
4
+ // this computer (listed in the trust file), so a downloaded folder that imitates one cannot run its code.
5
+ import { existsSync, readFileSync, realpathSync } from 'node:fs';
6
+ import { homedir } from 'node:os';
7
+ import { dirname, join } from 'node:path';
8
+ import { fileURLToPath, pathToFileURL } from 'node:url';
9
+
10
+ const real = dir => { try { return realpathSync(dir); } catch { return dir; } };
11
+ const defaultTrust = () => join(homedir(), '.mografy', 'trusted-checkouts');
12
+ const listed = (file, dir) => { try { return readFileSync(file, 'utf8').split('\n').includes(dir); } catch { return false; } };
13
+
14
+ /** The Mografy checkout containing `start`, if any: its real path, and whether it may run. */
15
+ export function checkoutAround(start, { trustFile = defaultTrust(), own } = {}) {
16
+ for (let dir = start; ; dir = dirname(dir)) {
17
+ let workspace;
18
+ try { workspace = JSON.parse(readFileSync(join(dir, 'package.json'), 'utf8')); } catch {}
19
+ if (workspace?.name === 'mografy-workspace' && existsSync(join(dir, 'pnpm-workspace.yaml'))) {
20
+ const path = real(dir);
21
+ return { dir, path, trusted: path === own || listed(trustFile, path) };
22
+ }
23
+ if (dirname(dir) === dir) return undefined;
24
+ }
25
+ }
26
+
27
+ export const warnUntrusted = dir => console.error(`mografy: ignoring ${dir} because it was not installed on this computer. Run pnpm install there to use it.`);
28
+
29
+ /** Launcher entry: `node locate.mjs --launch <installed bin> <trust file> [mografy arguments]`. */
30
+ async function launch([installedBin, trustFile, ...args]) {
31
+ const found = checkoutAround(process.cwd(), { trustFile });
32
+ let bin;
33
+ if (found?.trusted) { const local = join(found.path, 'packages/cli/bin/mografy.js'); if (existsSync(local)) bin = local; }
34
+ else if (found) warnUntrusted(found.dir);
35
+ if (!bin && existsSync(installedBin)) bin = installedBin;
36
+ if (!bin) {
37
+ console.error(`mografy: the Mografy folder this command was installed from no longer exists:\n ${installedBin}\nRun mografy from inside your Mografy folder, or repair this command once from there:\n node packages/cli/bin/mografy.js install-command`);
38
+ process.exit(1);
39
+ }
40
+ process.argv = [process.argv[0], bin, ...args];
41
+ process.env.MOGRAFY_CHECKOUT_CHECKED = '1';
42
+ await import(pathToFileURL(bin).href);
43
+ }
44
+
45
+ if (process.argv[2] === '--launch' && real(process.argv[1]) === real(fileURLToPath(import.meta.url))) await launch(process.argv.slice(3));
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ import { existsSync, realpathSync } from 'node:fs';
3
+ import { join } from 'node:path';
4
+ import { fileURLToPath, pathToFileURL } from 'node:url';
5
+ import { checkoutAround, warnUntrusted } from './locate.mjs';
6
+
7
+ // A PATH launcher may belong to an older clone. Prefer the checkout the user is working in, including when invoked from
8
+ // one of its animation subfolders, but only one installed on this computer, never a folder imitating one.
9
+ let entry = new URL('../dist/index.js', import.meta.url);
10
+ const found = checkoutAround(process.cwd(), { own: realpathSync(fileURLToPath(new URL('../../..', import.meta.url))) });
11
+ if (found?.trusted) {
12
+ const local = join(found.path, 'packages/cli/dist/index.js');
13
+ if (!existsSync(local)) {
14
+ console.error(`Mografy has not been built in ${found.path}. Run pnpm install && pnpm build in that checkout.`);
15
+ process.exit(1);
16
+ }
17
+ entry = pathToFileURL(local);
18
+ } else if (found && !process.env.MOGRAFY_CHECKOUT_CHECKED) warnUntrusted(found.dir);
19
+
20
+ import(entry.href).then(({ main }) => main()).catch(error => {
21
+ console.error(error instanceof Error ? error.message : String(error));
22
+ process.exit(1);
23
+ });
@@ -0,0 +1,19 @@
1
+ export type AddKind = 'film' | 'helper' | 'template';
2
+ export interface AddPlan {
3
+ films: string[];
4
+ helpers: string[];
5
+ templates?: string[];
6
+ target?: string;
7
+ }
8
+ export declare function addKind(name: string): Promise<AddKind | undefined>;
9
+ /** Split `mografy add` arguments into known names and an optional trailing folder or project. */
10
+ export declare function planAdd(args: string[]): Promise<AddPlan>;
11
+ export declare function addList(): Promise<string>;
12
+ /**
13
+ * Run a plan. `target` resolves where helpers and templates go: the named folder, or the current project, or undefined
14
+ * when there is none. Helpers need an existing project. Templates create one when the folder has no project yet (in the
15
+ * library, named after the first template, when no folder was named), so a missing project is never an error for templates
16
+ * and nothing is ever added silently to another, last-opened project.
17
+ */
18
+ export declare function runAdd(plan: AddPlan, workspaceRoot: string, target: (name?: string) => Promise<string | undefined>, force?: boolean, isProject?: (dir: string) => Promise<boolean>): Promise<void>;
19
+ export declare function addSuggestions(): Promise<string>;
@@ -0,0 +1,123 @@
1
+ // `mografy add`: one command for everything optional. A name is either a reference film, copied into
2
+ // the library as a project of its own (from this installation, downloaded from GitHub, or from the website's showcase), a helper
3
+ // (extra), or a template from Mografy Templates, both copied into a project. Several helpers and templates can be
4
+ // added at once, and a folder or project may follow the names.
5
+ import { addExtra, EXTRAS, extrasList, printAdd } from './extras.js';
6
+ import { copyExample, examplesList, listExamples, printExample } from './examples.js';
7
+ import { installShowcase, isShowcaseFilm, printShowcase, SHOWCASE_URL, showcaseList } from './showcase.js';
8
+ import { addTemplate, isTemplate, listTemplates, printTemplate, printTemplatesDone, ROOT, templateProject, templatesList } from './templates.js';
9
+ /** What `mografy install-command` suggests next: [arguments, why]. Films first, then helpers for a project. */
10
+ const SUGGESTED = [
11
+ ['hook-impact cta-endcard projects/my-post', 'Start a 9:16 post from Mografy Templates (creates the project)'],
12
+ ['stage-invoices', 'Start a product UI loop from a Stage reference film'],
13
+ ['film-starter', 'Download the 20 s model film from the showcase: one camera, one shot table, one light to follow'],
14
+ ['mografy-montage', 'Download a 60 s reference film from the showcase to watch and study'],
15
+ ['music cjk', 'In a project: the score generator, Chinese and Japanese type'],
16
+ ];
17
+ export async function addKind(name) {
18
+ if (EXTRAS[name])
19
+ return 'helper';
20
+ if ((await listExamples()).some(e => e.name === name) || isShowcaseFilm(name))
21
+ return 'film';
22
+ return await isTemplate(ROOT, name) ? 'template' : undefined;
23
+ }
24
+ /** Split `mografy add` arguments into known names and an optional trailing folder or project. */
25
+ export async function planAdd(args) {
26
+ const plan = { films: [], helpers: [] };
27
+ const templates = [];
28
+ for (const [i, arg] of args.entries()) {
29
+ const kind = await addKind(arg);
30
+ if (kind === 'film')
31
+ plan.films.push(arg);
32
+ else if (kind === 'helper')
33
+ plan.helpers.push(arg);
34
+ else if (kind === 'template')
35
+ templates.push(arg);
36
+ else if (i === args.length - 1 && i > 0)
37
+ plan.target = arg;
38
+ else
39
+ throw new Error(`Nothing called ${arg} can be added.\n\n${await addList()}`);
40
+ }
41
+ if (templates.length)
42
+ plan.templates = templates;
43
+ if (plan.films.length && (plan.helpers.length || templates.length) || plan.target !== undefined && plan.films.length > 1)
44
+ throw new Error('Add reference films and helpers separately; a folder can follow one film:\n mografy add <film> [folder]\n mografy add <helper...> [project]');
45
+ return plan;
46
+ }
47
+ export async function addList() {
48
+ return [
49
+ 'Reference films, copied into your library as a new project (those marked "from GitHub" download the first time):',
50
+ await examplesList(),
51
+ '',
52
+ `Showcase films, downloaded from ${SHOWCASE_URL} into your library:`,
53
+ showcaseList(),
54
+ '',
55
+ 'Helpers, copied into the current project or the one you name:',
56
+ extrasList(),
57
+ '',
58
+ 'Mografy Templates, ready-made templates copied into the current project or the one you name:',
59
+ await templatesList(),
60
+ '',
61
+ 'Usage:',
62
+ ' mografy add <film> [folder]',
63
+ ' mografy add <helper...> [project] for example: mografy add music cjk',
64
+ ' mografy add <template...> [project] for example: mografy add hook-impact cta-endcard projects/my-film',
65
+ ' (a missing project is created for the templates)',
66
+ ].join('\n');
67
+ }
68
+ /**
69
+ * Run a plan. `target` resolves where helpers and templates go: the named folder, or the current project, or undefined
70
+ * when there is none. Helpers need an existing project. Templates create one when the folder has no project yet (in the
71
+ * library, named after the first template, when no folder was named), so a missing project is never an error for templates
72
+ * and nothing is ever added silently to another, last-opened project.
73
+ */
74
+ export async function runAdd(plan, workspaceRoot, target, force = false, isProject = async () => true) {
75
+ const local = new Set((await listExamples()).map(e => e.name));
76
+ for (const [i, name] of plan.films.entries()) {
77
+ if (i)
78
+ console.log('');
79
+ if (local.has(name))
80
+ printExample(name, await copyExample(name, plan.target));
81
+ else {
82
+ const { dest, bytes } = await installShowcase(name, plan.target);
83
+ printShowcase(name, dest, bytes);
84
+ }
85
+ }
86
+ const templates = plan.templates ?? [];
87
+ if (!plan.helpers.length && !templates.length)
88
+ return;
89
+ let dir = await target(plan.target), created = false;
90
+ if (templates.length)
91
+ ({ dir, created } = await templateProject(workspaceRoot, dir, templates));
92
+ if (!dir || !await isProject(dir)) {
93
+ const named = plan.target ?? 'projects/<name>';
94
+ throw new Error(`${dir ? `${dir} has no mografy.json` : 'This folder is not a Mografy project'}, so there is nowhere to add ${plan.helpers.join(', ')}.\n`
95
+ + ` Name the project: mografy add ${plan.helpers.join(' ')} ${named}\n`
96
+ + ` Or start one from templates, which creates the project: mografy add hook-impact ${named}`);
97
+ }
98
+ for (const [i, name] of plan.helpers.entries()) {
99
+ if (i)
100
+ console.log('');
101
+ printAdd(name, dir, await addExtra(workspaceRoot, dir, name, force));
102
+ }
103
+ if (!templates.length)
104
+ return;
105
+ if (plan.helpers.length)
106
+ console.log('');
107
+ console.log(`Adding ${templates.length === 1 ? 'a template' : `${templates.length} templates`}:`);
108
+ for (const id of templates)
109
+ await printTemplate(workspaceRoot, id, dir, await addTemplate(workspaceRoot, dir, id, force));
110
+ const all = await listTemplates(workspaceRoot), aspect = all.find(s => s.id === templates[0]).aspect;
111
+ printTemplatesDone(dir, templates, created, aspect, created ? templates.filter(id => all.find(s => s.id === id).aspect !== aspect) : []);
112
+ }
113
+ export async function addSuggestions() {
114
+ const films = new Set((await listExamples()).map(e => e.name)), templates = new Set((await listTemplates(ROOT)).map(t => t.id));
115
+ // Every name must exist in this installation; a trailing folder (projects/…) is not a name.
116
+ const rows = SUGGESTED.filter(([args]) => args.split(' ').filter(name => !name.includes('/')).every(name => EXTRAS[name] || films.has(name) || isShowcaseFilm(name) || templates.has(name)));
117
+ if (!rows.length)
118
+ return '';
119
+ const all = [...rows.map(([args, why]) => [`mografy add ${args}`, why]), ['mografy add', 'List every template, reference film and helper']];
120
+ const width = Math.max(...all.map(([command]) => command.length));
121
+ return `\n\nNext, add what your films need:\n${all.map(([command, why]) => ` ${command.padEnd(width)} ${why}`).join('\n')}`;
122
+ }
123
+ //# sourceMappingURL=add.js.map
@@ -0,0 +1 @@
1
+ export declare function checkProject(dir: string, motion?: boolean): Promise<void>;
@@ -0,0 +1,64 @@
1
+ // `mografy check`: compile and trial-render, through the running player when there is one.
2
+ import { access, realpath } from 'node:fs/promises';
3
+ import { join, resolve, sep } from 'node:path';
4
+ import { frameCostReport, readApiResponse, sendApi, shotIssues, smoothnessReport, tempoIssues } from '@mografy/core';
5
+ import { Project, findServer } from '@mografy/server';
6
+ import { displayPath, requireProject } from '../paths.js';
7
+ export async function checkProject(dir, motion = false) {
8
+ await requireProject(dir);
9
+ console.log(`Checking ${displayPath(dir)}`);
10
+ // Every film keeps its design decisions in style.md, so later sessions keep its look (the Skill writes it).
11
+ const hasStyle = dir.split(sep).includes('.components') || await access(join(dir, 'style.md')).then(() => true, () => false);
12
+ const passed = (snapshot) => {
13
+ if (!snapshot.scene || snapshot.error)
14
+ throw new Error(snapshot.error?.message ?? 'The scene did not publish.');
15
+ console.log(`✓ Compiled and trial-rendered in Chromium\n ${snapshot.scene.meta.width}×${snapshot.scene.meta.height}, ${snapshot.scene.meta.duration}s, version ${snapshot.scene.version}`);
16
+ const { meta } = snapshot.scene;
17
+ if (meta.shots) {
18
+ const issues = shotIssues(meta);
19
+ if (issues.length)
20
+ throw new Error(issues.join('\n'));
21
+ console.log(`✓ ${meta.shots.length} shot${meta.shots.length === 1 ? '' : 's'}`);
22
+ }
23
+ if (meta.tempo) {
24
+ const issues = tempoIssues(meta, snapshot.project?.audio);
25
+ if (issues.length)
26
+ console.log(issues.map(issue => `! ${issue}`).join('\n') + '\n Change meta.tempo or the audio settings so the picture and the music share one grid.');
27
+ else
28
+ console.log(`✓ Timed to ${meta.tempo.bpm} BPM${snapshot.project?.audio ? ', matching the audio' : ' (no audio yet)'}`);
29
+ }
30
+ if (snapshot.cost) {
31
+ const { summary, warnings } = frameCostReport(snapshot.cost);
32
+ console.log(`${warnings.length ? '!' : '✓'} ${summary}${warnings.map(w => `\n! ${w}`).join('')}`);
33
+ }
34
+ if (!hasStyle)
35
+ console.log('! No style.md: write the film\'s idea, design system and motion decisions to style.md (see the Skill\'s taste.md), so later changes keep this look.');
36
+ };
37
+ // A running player already owns this project: ask it, so the check uses its queue and Chromium
38
+ // and the player shows the same result, instead of starting a second Chromium beside it.
39
+ const running = await findServer(dir);
40
+ if (running) {
41
+ const identity = await realpath(resolve(dir));
42
+ const response = await sendApi(running.url, 'check', 'POST', undefined, identity);
43
+ if (response.status !== 409) {
44
+ passed(await readApiResponse(response));
45
+ if (motion)
46
+ printMotion(await readApiResponse(await sendApi(running.url, 'check/motion', 'POST', undefined, identity)));
47
+ return;
48
+ }
49
+ }
50
+ const project = await Project.open(dir);
51
+ try {
52
+ passed({ ...project.snapshot(), cost: await project.measure().catch(() => undefined) });
53
+ if (motion)
54
+ printMotion(await project.motion());
55
+ }
56
+ finally {
57
+ await project.close();
58
+ }
59
+ }
60
+ function printMotion(result) {
61
+ const { summary, warnings } = smoothnessReport(result);
62
+ console.log(`${warnings.length ? '!' : '✓'} ${summary}${warnings.map(w => `\n! ${w}`).join('')}`);
63
+ }
64
+ //# sourceMappingURL=check.js.map
@@ -0,0 +1,5 @@
1
+ import type { Flags } from '../options.js';
2
+ export declare function openBrowser(url: string): void;
3
+ /** Ask the player that is already open to show `dir` instead. */
4
+ export declare function switchActive(dir: string): Promise<string | undefined>;
5
+ export declare function dev(dir: string, flags: Flags): Promise<void>;
@@ -0,0 +1,56 @@
1
+ // `mografy dev`: start the player, or hand the project to the one already open.
2
+ import { spawn } from 'node:child_process';
3
+ import { platform } from 'node:os';
4
+ import { sendApi } from '@mografy/core';
5
+ import { AlreadyRunning, findActive, startServer, installation } from '@mografy/server';
6
+ import { displayPath } from '../paths.js';
7
+ import { monitorDevExports } from '../progress.js';
8
+ export function openBrowser(url) {
9
+ if (process.env.MOGRAFY_NO_OPEN)
10
+ return;
11
+ const [command, args] = platform() === 'darwin' ? ['open', [url]] : platform() === 'win32' ? ['cmd', ['/c', 'start', '', url]] : ['xdg-open', [url]];
12
+ const child = spawn(command, args, { stdio: 'ignore', detached: true });
13
+ child.on('error', () => { });
14
+ child.unref();
15
+ }
16
+ /** Ask the player that is already open to show `dir` instead. */
17
+ export async function switchActive(dir) {
18
+ const active = await findActive();
19
+ if (!active)
20
+ return undefined;
21
+ const response = await sendApi(active.url, 'projects/open', 'POST', { dir });
22
+ if (response.ok)
23
+ return active.url;
24
+ const data = await response.json().catch(() => ({}));
25
+ return data.error?.url;
26
+ }
27
+ export async function dev(dir, flags) {
28
+ try {
29
+ const server = await startServer(dir, flags.port === undefined ? {} : { port: flags.port });
30
+ const snapshot = server.project.snapshot();
31
+ console.log(`Mografy dev server: ${server.url}`);
32
+ console.log(`Project: ${displayPath(dir)}`);
33
+ if (installation.kind === 'source')
34
+ console.log(server.hmr ? 'Player: hot reload from source (Vite)' : 'Player: built files (Vite not installed; run `pnpm install` for hot reload)');
35
+ console.log(snapshot.scene
36
+ ? `Scene ${snapshot.scene.version} (${snapshot.scene.meta.width}×${snapshot.scene.meta.height}, ${snapshot.scene.meta.duration}s)`
37
+ : `Scene failed to load:\n${snapshot.error?.message ?? ''}`);
38
+ console.log('\nEdit the scene with Claude or Codex. Mografy will compile and trial-render every saved change.\nExports from the player appear here. Press Ctrl+C to stop.');
39
+ const stopExportMonitor = monitorDevExports(server);
40
+ if (flags.open)
41
+ openBrowser(server.url);
42
+ const stop = async () => { stopExportMonitor(); await server.close(); process.exit(0); };
43
+ process.once('SIGINT', () => void stop());
44
+ process.once('SIGTERM', () => void stop());
45
+ }
46
+ catch (error) {
47
+ if (error instanceof AlreadyRunning) {
48
+ console.log(`Mografy dev is already running: ${error.url}`);
49
+ if (flags.open)
50
+ openBrowser(error.url);
51
+ return;
52
+ }
53
+ throw error;
54
+ }
55
+ }
56
+ //# sourceMappingURL=dev.js.map
@@ -0,0 +1,5 @@
1
+ /** The installation's version: the `mografy` package's, or the checkout's root package.json. */
2
+ export declare const VERSION: string;
3
+ /** Help text, grouped by what the user is doing. Brand colour only on an interactive terminal. */
4
+ export declare function helpText(color: boolean): string;
5
+ export declare const HELP: string;