dsh-remotion 0.3.3 → 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 (293) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.en.md +26 -65
  3. package/README.md +25 -67
  4. package/docs/USAGE.en.md +93 -0
  5. package/docs/USAGE.md +97 -0
  6. package/docs/VALIDATION.md +22 -0
  7. package/lib/client.js +90 -0
  8. package/lib/index.d.ts +3 -0
  9. package/lib/index.js +5 -1
  10. package/lib/media-store.d.ts +25 -0
  11. package/lib/media-store.js +174 -0
  12. package/lib/media-templates.d.ts +52 -0
  13. package/lib/media-templates.js +91 -0
  14. package/lib/media-workbench.d.ts +42 -0
  15. package/lib/media-workbench.js +476 -0
  16. package/package.json +18 -5
  17. package/scripts/build-client.mjs +4 -0
  18. package/skills/remotion-best-practices/SKILL.md +54 -54
  19. package/skills/remotion-best-practices/agents/openai.yaml +7 -7
  20. package/skills/remotion-best-practices/assets/remotion-icon.svg +4 -4
  21. package/skills/remotion-best-practices/remotion-captions/REFERENCE.md +36 -36
  22. package/skills/remotion-best-practices/remotion-captions/agents/openai.yaml +7 -7
  23. package/skills/remotion-best-practices/remotion-captions/assets/remotion-icon.svg +4 -4
  24. package/skills/remotion-best-practices/remotion-captions/display-captions.md +190 -190
  25. package/skills/remotion-best-practices/remotion-captions/import-srt-captions.md +73 -73
  26. package/skills/remotion-best-practices/remotion-captions/transcribe-captions.md +70 -70
  27. package/skills/remotion-best-practices/remotion-create/REFERENCE.md +85 -85
  28. package/skills/remotion-best-practices/remotion-create/agents/openai.yaml +7 -7
  29. package/skills/remotion-best-practices/remotion-create/assets/remotion-icon.svg +4 -4
  30. package/skills/remotion-best-practices/remotion-create/tailwind.md +11 -11
  31. package/skills/remotion-best-practices/remotion-create/video-layout.md +9 -9
  32. package/skills/remotion-best-practices/remotion-docs/REFERENCE.md +46 -46
  33. package/skills/remotion-best-practices/remotion-docs/agents/openai.yaml +7 -7
  34. package/skills/remotion-best-practices/remotion-docs/assets/remotion-icon.svg +4 -4
  35. package/skills/remotion-best-practices/remotion-interactivity/REFERENCE.md +315 -315
  36. package/skills/remotion-best-practices/remotion-interactivity/agents/openai.yaml +7 -7
  37. package/skills/remotion-best-practices/remotion-interactivity/assets/remotion-icon.svg +4 -4
  38. package/skills/remotion-best-practices/remotion-maps/REFERENCE.md +36 -36
  39. package/skills/remotion-best-practices/remotion-maps/agents/openai.yaml +7 -7
  40. package/skills/remotion-best-practices/remotion-maps/assets/remotion-icon.svg +4 -4
  41. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -89
  42. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -284
  43. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -299
  44. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/city-path.json +12 -12
  45. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -39
  46. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -35
  47. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -215
  48. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -43
  49. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -128
  50. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -57
  51. package/skills/remotion-best-practices/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -161
  52. package/skills/remotion-best-practices/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -449
  53. package/skills/remotion-best-practices/remotion-maps/techniques/mapbox/references/render-stability.md +64 -64
  54. package/skills/remotion-best-practices/remotion-maps/techniques/maplibre/TECHNIQUE.md +484 -484
  55. package/skills/remotion-best-practices/remotion-maps/techniques/maplibre/references/render-stability.md +64 -64
  56. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -80
  57. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -70
  58. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -80
  59. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -363
  60. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -22
  61. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -7535
  62. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -605
  63. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -34
  64. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -91
  65. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -129
  66. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -85
  67. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/render-stability.md +64 -64
  68. package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -202
  69. package/skills/remotion-best-practices/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -37
  70. package/skills/remotion-best-practices/remotion-markup/3d.md +86 -86
  71. package/skills/remotion-best-practices/remotion-markup/REFERENCE.md +358 -358
  72. package/skills/remotion-best-practices/remotion-markup/agents/openai.yaml +7 -7
  73. package/skills/remotion-best-practices/remotion-markup/assets/remotion-icon.svg +4 -4
  74. package/skills/remotion-best-practices/remotion-markup/audio-visualization.md +198 -198
  75. package/skills/remotion-best-practices/remotion-markup/audio.md +169 -169
  76. package/skills/remotion-best-practices/remotion-markup/calculate-metadata.md +136 -136
  77. package/skills/remotion-best-practices/remotion-markup/compositions.md +123 -123
  78. package/skills/remotion-best-practices/remotion-markup/connected-compositions.md +79 -79
  79. package/skills/remotion-best-practices/remotion-markup/cropping.md +34 -34
  80. package/skills/remotion-best-practices/remotion-markup/effects.md +251 -251
  81. package/skills/remotion-best-practices/remotion-markup/embedding-videos.md +171 -171
  82. package/skills/remotion-best-practices/remotion-markup/ffmpeg.md +38 -38
  83. package/skills/remotion-best-practices/remotion-markup/gifs.md +187 -187
  84. package/skills/remotion-best-practices/remotion-markup/google-fonts.md +76 -76
  85. package/skills/remotion-best-practices/remotion-markup/html-in-canvas.md +128 -128
  86. package/skills/remotion-best-practices/remotion-markup/images.md +73 -73
  87. package/skills/remotion-best-practices/remotion-markup/light-leaks.md +106 -106
  88. package/skills/remotion-best-practices/remotion-markup/local-fonts.md +69 -69
  89. package/skills/remotion-best-practices/remotion-markup/lottie.md +73 -73
  90. package/skills/remotion-best-practices/remotion-markup/measuring-dom-nodes.md +38 -38
  91. package/skills/remotion-best-practices/remotion-markup/measuring-text.md +146 -146
  92. package/skills/remotion-best-practices/remotion-markup/motion-blur.md +60 -60
  93. package/skills/remotion-best-practices/remotion-markup/multi-scene-video.md +81 -81
  94. package/skills/remotion-best-practices/remotion-markup/parameters.md +111 -111
  95. package/skills/remotion-best-practices/remotion-markup/remotion-maps/REFERENCE.md +36 -36
  96. package/skills/remotion-best-practices/remotion-markup/remotion-maps/agents/openai.yaml +7 -7
  97. package/skills/remotion-best-practices/remotion-markup/remotion-maps/assets/remotion-icon.svg +4 -4
  98. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -89
  99. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -284
  100. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -299
  101. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/city-path.json +12 -12
  102. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -39
  103. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -35
  104. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -215
  105. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -43
  106. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -128
  107. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -57
  108. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -161
  109. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -449
  110. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/mapbox/references/render-stability.md +64 -64
  111. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md +484 -484
  112. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maplibre/references/render-stability.md +64 -64
  113. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -80
  114. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -70
  115. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -80
  116. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -363
  117. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -22
  118. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -7535
  119. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -605
  120. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -34
  121. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -91
  122. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -129
  123. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -85
  124. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/render-stability.md +64 -64
  125. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -202
  126. package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -37
  127. package/skills/remotion-best-practices/remotion-markup/sequencing.md +169 -169
  128. package/skills/remotion-best-practices/remotion-markup/sfx.md +51 -51
  129. package/skills/remotion-best-practices/remotion-markup/silence-detection.md +71 -71
  130. package/skills/remotion-best-practices/remotion-markup/text-highlights.md +56 -56
  131. package/skills/remotion-best-practices/remotion-markup/timing.md +111 -111
  132. package/skills/remotion-best-practices/remotion-markup/transitions.md +239 -239
  133. package/skills/remotion-best-practices/remotion-markup/video-editing.md +90 -90
  134. package/skills/remotion-best-practices/remotion-markup/voiceover.md +99 -99
  135. package/skills/remotion-best-practices/remotion-multimedia/REFERENCE.md +20 -20
  136. package/skills/remotion-best-practices/remotion-multimedia/agents/openai.yaml +7 -7
  137. package/skills/remotion-best-practices/remotion-multimedia/assets/remotion-icon.svg +4 -4
  138. package/skills/remotion-best-practices/remotion-multimedia/get-audio-duration.md +56 -56
  139. package/skills/remotion-best-practices/remotion-multimedia/get-video-dimensions.md +66 -66
  140. package/skills/remotion-best-practices/remotion-multimedia/get-video-duration.md +58 -58
  141. package/skills/remotion-best-practices/remotion-render/REFERENCE.md +35 -35
  142. package/skills/remotion-best-practices/remotion-render/agents/openai.yaml +7 -7
  143. package/skills/remotion-best-practices/remotion-render/assets/remotion-icon.svg +4 -4
  144. package/skills/remotion-best-practices/remotion-render/transparent-videos.md +106 -106
  145. package/skills/remotion-best-practices/remotion-saas/REFERENCE.md +33 -33
  146. package/skills/remotion-best-practices/remotion-saas/agents/openai.yaml +7 -7
  147. package/skills/remotion-best-practices/remotion-saas/assets/remotion-icon.svg +4 -4
  148. package/skills/remotion-best-practices/remotion-saas/framework.md +19 -19
  149. package/skills/remotion-best-practices/remotion-saas/player.md +33 -33
  150. package/skills/remotion-best-practices/remotion-saas/rendering.md +69 -69
  151. package/skills/remotion-best-practices/remotion-studio/REFERENCE.md +24 -24
  152. package/skills/remotion-best-practices/remotion-studio/agents/openai.yaml +7 -7
  153. package/skills/remotion-best-practices/remotion-studio/assets/remotion-icon.svg +4 -4
  154. package/skills/remotion-best-practices/remotion-upgrade/REFERENCE.md +31 -31
  155. package/skills/remotion-best-practices/remotion-upgrade/agents/openai.yaml +7 -7
  156. package/skills/remotion-best-practices/remotion-upgrade/assets/remotion-icon.svg +4 -4
  157. package/skills/remotion-captions/SKILL.md +31 -31
  158. package/skills/remotion-captions/agents/openai.yaml +7 -7
  159. package/skills/remotion-captions/assets/remotion-icon.svg +4 -4
  160. package/skills/remotion-captions/display-captions.md +190 -190
  161. package/skills/remotion-captions/import-srt-captions.md +73 -73
  162. package/skills/remotion-captions/transcribe-captions.md +70 -70
  163. package/skills/remotion-create/SKILL.md +80 -80
  164. package/skills/remotion-create/agents/openai.yaml +7 -7
  165. package/skills/remotion-create/assets/remotion-icon.svg +4 -4
  166. package/skills/remotion-create/tailwind.md +11 -11
  167. package/skills/remotion-create/video-layout.md +9 -9
  168. package/skills/remotion-docs/SKILL.md +41 -41
  169. package/skills/remotion-docs/agents/openai.yaml +7 -7
  170. package/skills/remotion-docs/assets/remotion-icon.svg +4 -4
  171. package/skills/remotion-interactivity/SKILL.md +310 -310
  172. package/skills/remotion-interactivity/agents/openai.yaml +7 -7
  173. package/skills/remotion-interactivity/assets/remotion-icon.svg +4 -4
  174. package/skills/remotion-maps/SKILL.md +31 -31
  175. package/skills/remotion-maps/agents/openai.yaml +7 -7
  176. package/skills/remotion-maps/assets/remotion-icon.svg +4 -4
  177. package/skills/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -89
  178. package/skills/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -284
  179. package/skills/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -299
  180. package/skills/remotion-maps/techniques/cesium/assets/city-path.json +12 -12
  181. package/skills/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -39
  182. package/skills/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -35
  183. package/skills/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -215
  184. package/skills/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -43
  185. package/skills/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -128
  186. package/skills/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -57
  187. package/skills/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -161
  188. package/skills/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -449
  189. package/skills/remotion-maps/techniques/mapbox/references/render-stability.md +64 -64
  190. package/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md +484 -484
  191. package/skills/remotion-maps/techniques/maplibre/references/render-stability.md +64 -64
  192. package/skills/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -80
  193. package/skills/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -70
  194. package/skills/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -80
  195. package/skills/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -363
  196. package/skills/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -22
  197. package/skills/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -7535
  198. package/skills/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -605
  199. package/skills/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -34
  200. package/skills/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -91
  201. package/skills/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -129
  202. package/skills/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -85
  203. package/skills/remotion-maps/techniques/maptiler/references/render-stability.md +64 -64
  204. package/skills/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -202
  205. package/skills/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -37
  206. package/skills/remotion-markup/3d.md +86 -86
  207. package/skills/remotion-markup/SKILL.md +353 -353
  208. package/skills/remotion-markup/agents/openai.yaml +7 -7
  209. package/skills/remotion-markup/assets/remotion-icon.svg +4 -4
  210. package/skills/remotion-markup/audio-visualization.md +198 -198
  211. package/skills/remotion-markup/audio.md +169 -169
  212. package/skills/remotion-markup/calculate-metadata.md +136 -136
  213. package/skills/remotion-markup/compositions.md +123 -123
  214. package/skills/remotion-markup/connected-compositions.md +79 -79
  215. package/skills/remotion-markup/cropping.md +34 -34
  216. package/skills/remotion-markup/effects.md +251 -251
  217. package/skills/remotion-markup/embedding-videos.md +171 -171
  218. package/skills/remotion-markup/ffmpeg.md +38 -38
  219. package/skills/remotion-markup/gifs.md +187 -187
  220. package/skills/remotion-markup/google-fonts.md +76 -76
  221. package/skills/remotion-markup/html-in-canvas.md +128 -128
  222. package/skills/remotion-markup/images.md +73 -73
  223. package/skills/remotion-markup/light-leaks.md +106 -106
  224. package/skills/remotion-markup/local-fonts.md +69 -69
  225. package/skills/remotion-markup/lottie.md +73 -73
  226. package/skills/remotion-markup/measuring-dom-nodes.md +38 -38
  227. package/skills/remotion-markup/measuring-text.md +146 -146
  228. package/skills/remotion-markup/motion-blur.md +60 -60
  229. package/skills/remotion-markup/multi-scene-video.md +81 -81
  230. package/skills/remotion-markup/parameters.md +111 -111
  231. package/skills/remotion-markup/remotion-maps/REFERENCE.md +36 -36
  232. package/skills/remotion-markup/remotion-maps/agents/openai.yaml +7 -7
  233. package/skills/remotion-markup/remotion-maps/assets/remotion-icon.svg +4 -4
  234. package/skills/remotion-markup/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -89
  235. package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -284
  236. package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -299
  237. package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/city-path.json +12 -12
  238. package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -39
  239. package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -35
  240. package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -215
  241. package/skills/remotion-markup/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -43
  242. package/skills/remotion-markup/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -128
  243. package/skills/remotion-markup/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -57
  244. package/skills/remotion-markup/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -161
  245. package/skills/remotion-markup/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -449
  246. package/skills/remotion-markup/remotion-maps/techniques/mapbox/references/render-stability.md +64 -64
  247. package/skills/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md +484 -484
  248. package/skills/remotion-markup/remotion-maps/techniques/maplibre/references/render-stability.md +64 -64
  249. package/skills/remotion-markup/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -80
  250. package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -70
  251. package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -80
  252. package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -363
  253. package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -22
  254. package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -7535
  255. package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -605
  256. package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -34
  257. package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -91
  258. package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -129
  259. package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -85
  260. package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/render-stability.md +64 -64
  261. package/skills/remotion-markup/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -202
  262. package/skills/remotion-markup/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -37
  263. package/skills/remotion-markup/sequencing.md +169 -169
  264. package/skills/remotion-markup/sfx.md +51 -51
  265. package/skills/remotion-markup/silence-detection.md +71 -71
  266. package/skills/remotion-markup/text-highlights.md +56 -56
  267. package/skills/remotion-markup/timing.md +111 -111
  268. package/skills/remotion-markup/transitions.md +239 -239
  269. package/skills/remotion-markup/video-editing.md +90 -90
  270. package/skills/remotion-markup/voiceover.md +99 -99
  271. package/skills/remotion-multimedia/SKILL.md +15 -15
  272. package/skills/remotion-multimedia/agents/openai.yaml +7 -7
  273. package/skills/remotion-multimedia/assets/remotion-icon.svg +4 -4
  274. package/skills/remotion-multimedia/get-audio-duration.md +56 -56
  275. package/skills/remotion-multimedia/get-video-dimensions.md +66 -66
  276. package/skills/remotion-multimedia/get-video-duration.md +58 -58
  277. package/skills/remotion-render/SKILL.md +30 -30
  278. package/skills/remotion-render/agents/openai.yaml +7 -7
  279. package/skills/remotion-render/assets/remotion-icon.svg +4 -4
  280. package/skills/remotion-render/transparent-videos.md +106 -106
  281. package/skills/remotion-saas/SKILL.md +28 -28
  282. package/skills/remotion-saas/agents/openai.yaml +7 -7
  283. package/skills/remotion-saas/assets/remotion-icon.svg +4 -4
  284. package/skills/remotion-saas/framework.md +19 -19
  285. package/skills/remotion-saas/player.md +33 -33
  286. package/skills/remotion-saas/rendering.md +69 -69
  287. package/skills/remotion-studio/SKILL.md +19 -19
  288. package/skills/remotion-studio/agents/openai.yaml +7 -7
  289. package/skills/remotion-studio/assets/remotion-icon.svg +4 -4
  290. package/skills/remotion-upgrade/SKILL.md +26 -26
  291. package/skills/remotion-upgrade/agents/openai.yaml +7 -7
  292. package/skills/remotion-upgrade/assets/remotion-icon.svg +4 -4
  293. package/templates/DESIGN.md +26 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # 更新记录
2
+
3
+ [返回简介](README.md) · [使用说明](docs/USAGE.md) · [验证记录](docs/VALIDATION.md)
4
+
5
+ ## 0.4.0 (2026-10-03)
6
+
7
+ - 新增视频工作台、三种模板、素材副本上传、官方 Studio 预览、本机 MP4 与可编辑 ZIP 备份。
8
+ - 新增修订冲突检查、旧成片提示、任务记录与取消;首次环境准备使用固定版本官方 CLI 4.0.532。
9
+ - 保留现有上游技能;模板与工作台为本仓库原创实现。
10
+
11
+ ## 0.3.4 (2026-09-28)
12
+
13
+ - 更新官方 Harness 0.2.0-rc.1 的兼容声明和共同加载验证;运行时代码未变。验证范围见[验证记录](docs/VALIDATION.md)。
14
+
15
+ ## 0.3.3 (2026-09-28)
16
+
17
+ - 同步 Remotion 官方 v4.0.529 的技能内容,保留来源与许可证。
18
+
19
+ ## 更早的改动
20
+
21
+ 完整历史可查阅 [GitHub 提交记录](https://github.com/STARDUSTLC666/dsh-remotion/commits/master)。
package/README.en.md CHANGED
@@ -1,89 +1,50 @@
1
- [中文](README.md)
2
-
3
- ![npm](https://img.shields.io/npm/v/dsh-remotion) ![downloads](https://img.shields.io/npm/dm/dsh-remotion) ![license](https://img.shields.io/github/license/STARDUSTLC666/dsh-remotion) ![stars](https://img.shields.io/github/stars/STARDUSTLC666/dsh-remotion?style=social)
4
-
5
1
  # dsh-remotion
6
2
 
7
- [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
3
+ [中文](README.md)
8
4
 
9
- DSH (DeepSeek Harness) video-creation skill plugin: installing it registers the official Remotion skill into DSH (programmatic video with React: animation, audio, captions, 3D, charts, fonts; synced with the official Remotion v4.0.529 twelve-skill structure).
5
+ Bring Remotion React video creation skills into DSH.
10
6
 
11
- ## Compatibility
7
+ [![npm](https://img.shields.io/npm/v/dsh-remotion)](https://www.npmjs.com/package/dsh-remotion) [![downloads](https://img.shields.io/npm/dm/dsh-remotion)](https://www.npmjs.com/package/dsh-remotion)
12
8
 
13
- Verified with official `@deepseek-ai/dsh@0.1.5-rc.1` and Node `24.16.0` on 2026-09-11: all 18 components load alongside Modlens, with passing tool-schema, skill-registration and offline read-only invocation checks. Uses the `cordis.patch.yml` + `dsh.bundle.patch` bundle model. Node requirements match this Harness release: 22.19 or later within 22.x, or 24 or later. Live external-service workflows require separate configuration and validation.
9
+ ## What it does
14
10
 
15
- ## Installation
11
+ - A settings workbench for templates, editable content, media uploads, official Studio preview and local MP4 export.
12
+ - Title card, product card and slideshow templates in landscape, portrait or square format.
13
+ - Editable project backups, cancellable jobs and a warning when an MP4 uses an older revision.
16
14
 
17
- ```bash
18
- dsh plugin --profile web add dsh-remotion
19
- ```
15
+ - Cover animation, audio, captions, charts and 3D scenes.
16
+ - Guide project creation, Studio preview and rendering.
17
+ - Preserve upstream skills and provide runtime health checks.
20
18
 
21
- After restarting, say "make a video with Remotion" to trigger it.
19
+ ## Install
22
20
 
23
- ## Uninstall
21
+ In DSH Desktop, install `dsh-remotion` from the Plugins panel. If the bundled dsh command is available:
24
22
 
25
23
  ```bash
26
- dsh plugin --profile web remove dsh-remotion
24
+ dsh plugin --profile desktop add dsh-remotion
27
25
  ```
28
26
 
29
- Then restart the web service. To clean up fully, also remove the plugin entry from your profile `cordis.patch.yml` if you overrode it.
30
-
31
-
32
- ## Contents
33
-
34
- - **remotion-best-practices** (router hub) + 11 domain skills (captions/create/docs/interactivity/maps/markup/multimedia/render/saas/studio/upgrade), synced from official Remotion v4.0.529
35
-
36
- ## Requirements
37
-
38
- Node.js ≥ 22 + npx (npm registry); rendering needs ffmpeg (guided by the skill itself).
39
-
40
- ## Porting notes
41
-
42
- Synced from the official `remotion-dev/skills` checkout at v4.0.529 (2026-09-25): upstream skill bodies are vendored as-is, including the embedded reference copies under `remotion-best-practices/` and `remotion-markup/`, with `scripts/sync-skills.mjs` making the port repeatable and checkable. Only the frontmatter is ours (`name`/`description` plus the upstream `version`).
27
+ For the web version, replace `desktop` with `web`. Restart DSH after installation.
43
28
 
44
- ## Multi-harness
29
+ ## Start using it
45
30
 
46
- Skills use the open Agent Skills (SKILL.md) format — **not just DSH**. Copy the directories under `skills/` into another agent's skills directory:
31
+ Open Settings → Remotion → New video. Save your content, then upload media. Prepare the render environment on first use, inspect the official Studio preview, stop it and export MP4.
47
32
 
48
- | Agent | Skills directory |
49
- | :-- | :-- |
50
- | Claude Code | `~/.claude/skills/` |
51
- | Cursor | `.cursor/skills/` (or project-local `skills/`) |
52
- | Gemini CLI | `~/.gemini/skills/` |
53
- | OpenAI Codex | `~/.codex/skills/` |
33
+ Ask: “Make a Remotion video from these assets, preview it in Studio, then export MP4.”
54
34
 
55
- Port once, use everywhere.
35
+ ## Requirements and configuration
56
36
 
37
+ The plugin preserves upstream skills and adds a local workbench. First use needs Node.js 22.19+ / 24+ and npm; Remotion retains its [official license](https://www.remotion.dev/license). Dependencies are downloaded only when you explicitly prepare the environment.
57
38
 
58
- ## Health checks and reloads
39
+ Detailed configuration, tool arguments and troubleshooting are in the [usage guide](docs/USAGE.en.md). For standalone development, follow the Node requirement in [package.json](package.json).
59
40
 
60
- `remotion_health` rereads every `SKILL.md`, verifies readable files, valid YAML frontmatter, names matching their directories, and nonempty descriptions/bodies, then queries the host's `skills.get`. The effective name, description, body and resource directory must match this plugin instance's loaded snapshot. Existing files alone do not prove successful or still-active registration.
61
-
62
- Health checks do not mutate files or registrations. After changing a file or repairing one that failed initial loading, reload the plugin (or restart DSH). The result reports `changed`, `not_registered` or `registration_failed` until then. A previously loaded file that was temporarily missing becomes healthy again if its exact original content is restored and its registration remains active.
63
-
64
- Each item retains `name / ok / detail` and adds `code / fileOk / registered / registryChecked / reloadRequired`. `registered` means the registry still matches the loaded version, so a changed file can have `registered: true` and `ok: false`. Missing or failed registry lookup produces `registry_unavailable`; a disposed plugin produces `disposed`. The public `checkBundledSkills()` is disk-only, while the original non-throwing `parseSkillFile()` helper remains available.
65
-
66
- ## Development and shared implementation
67
-
68
- `src/index.ts` declares only package identity, skill names and the resource directory. Parsing, validation, registration and health logic live in `src/skill-bundle.ts`. The canonical source is in `dsh-hyperframes`; Remotion carries an identical version-controlled copy. Each package builds and ships its own `lib/skill-bundle.js`, with no cross-package runtime dependency and no sibling checkout required for building or installation.
69
-
70
- With dependencies already installed:
71
-
72
- ```bash
73
- node node_modules/typescript/bin/tsc -p tsconfig.json
74
- node --test "test/*.test.mjs"
75
- ```
76
-
77
- When developing the sibling repositories together, edit the shared module and regression tests in HyperFrames, then synchronize:
78
-
79
- ```bash
80
- # Run in dsh-hyperframes; updates only three shared files in sibling dsh-remotion
81
- node scripts/sync-skill-bundle.mjs
82
- node scripts/sync-skill-bundle.mjs --check
83
- ```
41
+ ## Documentation
84
42
 
85
- Both suites compare shared source and regression tests to prevent drift. A standalone checkout skips only that cross-repository comparison. Tests cover invalid YAML, unreadable files, empty bodies, rejected/inactive registrations, file changes and repairs, disposal races and cleanup failures, without invoking video or speech services.
43
+ - [Usage and troubleshooting](docs/USAGE.en.md)
44
+ - [Changelog](CHANGELOG.md)
45
+ - [Validation scope and history](docs/VALIDATION.md)
46
+ - [Report a problem or suggest a feature](https://github.com/STARDUSTLC666/dsh-remotion/issues)
86
47
 
87
48
  ## License
88
49
 
89
- MIT for the porting arrangement; skill content copyright remains with Remotion.
50
+ [MIT](LICENSE). Upstream skill licensing is documented in the usage guide.
package/README.md CHANGED
@@ -1,92 +1,50 @@
1
- [English](README.en.md)
2
-
3
1
  # dsh-remotion
4
2
 
5
- > **在 20+ 个 agent 里写视频**:Remotion 官方技能,React 编程式视频。
6
-
7
- ![npm version](https://img.shields.io/npm/v/dsh-remotion?label=npm&color=blue) ![npm downloads](https://img.shields.io/npm/dm/dsh-remotion) ![license](https://img.shields.io/npm/l/dsh-remotion) ![stars](https://img.shields.io/github/stars/STARDUSTLC666/dsh-remotion?style=social)
3
+ [English](README.en.md)
8
4
 
9
- [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
5
+ 把 Remotion 的 React 视频创作技能接入 DSH。
10
6
 
7
+ [![npm](https://img.shields.io/npm/v/dsh-remotion)](https://www.npmjs.com/package/dsh-remotion) [![downloads](https://img.shields.io/npm/dm/dsh-remotion)](https://www.npmjs.com/package/dsh-remotion)
11
8
 
12
- DSH(DeepSeek Harness)视频创作技能插件:**安装即把 Remotion 官方移植技能注册进 DSH**(React 编程式视频:动画、音频、字幕、3D、图表、字体等;同步 Remotion 官方 v4.0.529 的 12 技能结构)。
9
+ ## 功能
13
10
 
14
- ## 兼容性
11
+ - 设置页视频工作台:选模板、编辑内容、上传素材,在官方 Studio 预览并导出本机 MP4。
12
+ - 提供标题卡、产品介绍、图文轮播;支持横屏、竖屏和正方形。
13
+ - 保留可编辑工程备份、渲染记录与取消操作;工程修改后提醒重新导出。
15
14
 
16
- 已在官方 `@deepseek-ai/dsh@0.1.5-rc.1`、Node `24.16.0` 上验证(2026-09-11):18 个组件与 Modlens 同载,工具 schema、技能注册及离线只读调用检查通过。采用 `cordis.patch.yml` + `dsh.bundle.patch` 组合包模型。Node 要求与该版本 Harness 一致:22.19 及以上的 22.x,或 24 及以上。外部服务的实际业务操作需按各组件配置单独验证。
15
+ - 提供动画、音频、字幕、图表和 3D 场景指引。
16
+ - 覆盖项目创建、Studio 预览与渲染流程。
17
+ - 保留官方技能内容与运行时自检。
17
18
 
18
19
  ## 安装
19
20
 
20
- ```bash
21
- dsh plugin --profile web add dsh-remotion
22
- ```
23
-
24
- 重启后说「用 Remotion 做个视频」即可触发。
25
-
26
- ## 卸载
21
+ 桌面版可在「插件」面板按包名 `dsh-remotion` 安装。已配置 dsh 命令时也可使用:
27
22
 
28
23
  ```bash
29
- dsh plugin --profile web remove dsh-remotion
24
+ dsh plugin --profile desktop add dsh-remotion
30
25
  ```
31
26
 
32
- 卸载后重启 Web 服务。如需彻底清理,可再手动删除自己 profile `cordis.patch.yml` 中覆盖的插件行。
33
-
34
-
35
- ## 技能内容
36
-
37
- - **remotion-best-practices**(总纲路由)+ 11 个领域技能(captions/create/docs/interactivity/maps/markup/multimedia/render/saas/studio/upgrade),同步自 Remotion 官方 v4.0.529
38
-
39
- ## 依赖
40
-
41
- Node.js ≥ 22 + npx(npm registry);渲染需 ffmpeg(Remotion 自带指引)。
42
-
43
- ## 移植说明
27
+ 网页版把命令中的 `desktop` 改为 `web`。安装后重启 DSH。
44
28
 
45
- 技能同步自官方 `remotion-dev/skills` 检出 v4.0.529(2026-09-25):上游正文原样引入(含 `remotion-best-practices/`、`remotion-markup/` 下的内嵌引用副本),仅把 frontmatter 换成本包的 `name`/`description` + 上游 `version`;`scripts/sync-skills.mjs` 让移植可复现、可校验(`--check`)。
29
+ ## 开始使用
46
30
 
47
- ## 跨平台使用
31
+ 打开「设置 → Remotion」→「新建视频」,填写内容并保存,再上传素材。首次点击「准备渲染环境」下载依赖,完成后启动官方预览,检查画面、停止预览,再导出 MP4。
48
32
 
49
- 技能采用开放的 Agent Skills(SKILL.md)格式,**不止 DSH 能用**——把 `skills/` 下的目录复制到其他 agent 的技能目录即可:
33
+ 可说:“用 Remotion 把这些素材做成视频,先在 Studio 预览,再导出 MP4。”
50
34
 
51
- | Agent | 技能目录 |
52
- | :-- | :-- |
53
- | Claude Code | `~/.claude/skills/` |
54
- | Cursor | `.cursor/skills/`(或项目内 `skills/`)|
55
- | Gemini CLI | `~/.gemini/skills/` |
56
- | OpenAI Codex | `~/.codex/skills/` |
35
+ ## 依赖与配置
57
36
 
58
- 一次移植,处处可用。
37
+ 插件保留上游技能,并新增本地视频工作台。首次使用需 Node.js 22.19+ / 24+ 与 npm;Remotion 渲染器的使用条件见 [官方许可证](https://www.remotion.dev/license)。不会在 DSH 启动时自动下载依赖。
59
38
 
39
+ 详细配置、工具参数与排错见[使用说明](docs/USAGE.md)。从源码独立开发时,Node 要求以 [package.json](package.json) 为准。
60
40
 
61
- ## 技能自检与重载
62
-
63
- 运行 `remotion_health` 会重新读取每个 `SKILL.md`,验证文件可读、YAML frontmatter 合法、名称与目录一致、描述与正文非空,再通过宿主 `skills.get` 确认实际生效的名称、描述、正文和资源目录与本次加载内容相符。文件存在但未注册、注册失败或后来被移除时,自检都会失败。
64
-
65
- 自检不修改文件或注册表。修改技能文件,或修复加载时损坏的技能后,应重载插件(也可重启 DSH)。它会报告 `changed`、`not_registered` 或 `registration_failed`,不会把磁盘修复直接当成运行时修复。若原先已成功加载,只是文件暂时丢失,恢复与加载时完全相同的内容即可重新通过检查。
66
-
67
- 每项结果保留 `name / ok / detail`,并增加 `code / fileOk / registered / registryChecked / reloadRequired`:`registered` 表示注册表仍匹配加载时的版本,因此文件变更时它可以为 true 而 `ok` 为 false。缺少或无法查询宿主注册表时返回 `registry_unavailable`;插件卸载后返回 `disposed`。`checkBundledSkills()` 仅检查磁盘文件,不推断运行时状态;原有不抛错的 `parseSkillFile()` 解析入口保持可用。
68
-
69
- ## 开发与共享实现
70
-
71
- `src/index.ts` 只声明包名、技能清单和目录,解析、校验、注册与自检集中在包内 `src/skill-bundle.ts`。规范源位于 `dsh-hyperframes/src/skill-bundle.ts`,Remotion 保存相同的受版本控制副本;两包都编译并分发自己的 `lib/skill-bundle.js`,没有跨包运行时依赖,也不需要另一个仓库即可构建或安装。
72
-
73
- 依赖预先安装后,可直接离线构建和测试:
74
-
75
- ```bash
76
- node node_modules/typescript/bin/tsc -p tsconfig.json
77
- node --test "test/*.test.mjs"
78
- ```
79
-
80
- 两个仓库并列开发时,在 HyperFrames 修改公共模块与公共回归测试,再同步:
81
-
82
- ```bash
83
- # 在 dsh-hyperframes 中执行;只更新相邻 dsh-remotion 的三个公共文件
84
- node scripts/sync-skill-bundle.mjs
85
- node scripts/sync-skill-bundle.mjs --check
86
- ```
41
+ ## 文档
87
42
 
88
- 两包测试都会检查公共源码与回归测试是否一致,防止副本漂移;单独检出时只跳过跨仓库比对,其余测试正常运行。测试覆盖损坏 YAML、不可读文件、空正文、注册异常/失效、内容变更与修复、卸载及清理异常,全程不调用视频或语音服务。
43
+ - [使用与排错](docs/USAGE.md)
44
+ - [更新记录](CHANGELOG.md)
45
+ - [验证范围与历史记录](docs/VALIDATION.md)
46
+ - [问题反馈与功能建议](https://github.com/STARDUSTLC666/dsh-remotion/issues)
89
47
 
90
48
  ## License
91
49
 
92
- MIT(移植编排);技能内容版权归 Remotion。
50
+ [MIT](LICENSE)。上游技能内容的来源和许可证见使用说明。
@@ -0,0 +1,93 @@
1
+ # dsh-remotion usage guide
2
+
3
+ [Overview](../README.en.md) · [Changelog](../CHANGELOG.md) · [Validation](VALIDATION.md)
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ dsh plugin --profile web add dsh-remotion
9
+ ```
10
+
11
+ After restarting, say "make a video with Remotion" to trigger it.
12
+
13
+ ## Uninstall
14
+
15
+ ```bash
16
+ dsh plugin --profile web remove dsh-remotion
17
+ ```
18
+
19
+ Then restart the web service. To clean up fully, also remove the plugin entry from your profile `cordis.patch.yml` if you overrode it.
20
+
21
+ ## Video workbench
22
+
23
+ Open Settings → Remotion in DSH Web or Desktop.
24
+
25
+ 1. Create a video. Select title card, product card or slideshow; set title/body, canvas and 3–30 seconds, then save.
26
+ 2. Upload local PNG/JPEG copies, one MP3/WAV background audio and one muted MP4 background video. Limits: 20 MB each, 40 MB total. Slideshow follows upload order and needs at least two seconds per image.
27
+ 3. Explicitly prepare the environment. It downloads official CLI 4.0.532; installed Chrome is reused, with a browser download only when needed. You can continue editing during preparation. Check the [official Remotion license](https://www.remotion.dev/license) for your use case.
28
+ 4. Start official Studio and inspect the picture. Stop this preview before editing or exporting; no window opens automatically.
29
+ 5. Export, play and download MP4. Editing preserves earlier MP4s with a revision warning; export again for a new output.
30
+
31
+ The editable ZIP includes source, data and media. Extract it, run npm install and npm run preview / render. Original template code is MIT; engines retain their own licenses. ZIP import is not yet available in settings.
32
+
33
+ Projects and caches stay in DSH_HOME/data/dsh-remotion. Original assets and existing user projects are untouched. Closing settings preserves input within this page; saved projects survive restart, while active jobs stop with DSH. Jobs can be cancelled. Tools: remotion_project (list/create/get/update), remotion_render (prepare/preview/render/job/cancel). Updates/rendering need id/revision; job/cancel need job id.
34
+
35
+ This is template editing, without a full timeline, transcription, TTS or cloud rendering. Default: 24 FPS, maximum 200 MB MP4. Preview listens on 127.0.0.1 only; other users on the same machine may still reach the service.
36
+
37
+ ## Contents
38
+
39
+ - **remotion-best-practices** (router hub) + 11 domain skills (captions/create/docs/interactivity/maps/markup/multimedia/render/saas/studio/upgrade), synced from official Remotion v4.0.529
40
+
41
+ ## Requirements
42
+
43
+ Node.js `^22.19.0 || >=24.0.0` + npx (npm registry); rendering needs ffmpeg (guided by the skill itself).
44
+
45
+ ## Porting notes
46
+
47
+ Synced from the official `remotion-dev/skills` checkout at v4.0.529 (2026-09-25): upstream skill bodies are vendored as-is, including the embedded reference copies under `remotion-best-practices/` and `remotion-markup/`, with `scripts/sync-skills.mjs` making the port repeatable and checkable. Only the frontmatter is ours (`name`/`description` plus the upstream `version`).
48
+
49
+ ## Multi-harness
50
+
51
+ Skills use the open Agent Skills (SKILL.md) format — **not just DSH**. Copy the directories under `skills/` into another agent's skills directory:
52
+
53
+ | Agent | Skills directory |
54
+ | :-- | :-- |
55
+ | Claude Code | `~/.claude/skills/` |
56
+ | Cursor | `.cursor/skills/` (or project-local `skills/`) |
57
+ | Gemini CLI | `~/.gemini/skills/` |
58
+ | OpenAI Codex | `~/.codex/skills/` |
59
+
60
+ Port once, use everywhere.
61
+
62
+ ## Health checks and reloads
63
+
64
+ `remotion_health` rereads every `SKILL.md`, verifies readable files, valid YAML frontmatter, names matching their directories, and nonempty descriptions/bodies, then queries the host's `skills.get`. The effective name, description, body and resource directory must match this plugin instance's loaded snapshot. Existing files alone do not prove successful or still-active registration.
65
+
66
+ Health checks do not mutate files or registrations. After changing a file or repairing one that failed initial loading, reload the plugin (or restart DSH). The result reports `changed`, `not_registered` or `registration_failed` until then. A previously loaded file that was temporarily missing becomes healthy again if its exact original content is restored and its registration remains active.
67
+
68
+ Each item retains `name / ok / detail` and adds `code / fileOk / registered / registryChecked / reloadRequired`. `registered` means the registry still matches the loaded version, so a changed file can have `registered: true` and `ok: false`. Missing or failed registry lookup produces `registry_unavailable`; a disposed plugin produces `disposed`. The public `checkBundledSkills()` is disk-only, while the original non-throwing `parseSkillFile()` helper remains available.
69
+
70
+ ## Development and shared implementation
71
+
72
+ `src/index.ts` declares only package identity, skill names and the resource directory. Parsing, validation, registration and health logic live in `src/skill-bundle.ts`. The canonical source is in `dsh-hyperframes`; Remotion carries an identical version-controlled copy. Each package builds and ships its own `lib/skill-bundle.js`, with no cross-package runtime dependency and no sibling checkout required for building or installation.
73
+
74
+ With dependencies already installed:
75
+
76
+ ```bash
77
+ node node_modules/typescript/bin/tsc -p tsconfig.json
78
+ node --test "test/*.test.mjs"
79
+ ```
80
+
81
+ When developing the sibling repositories together, edit the shared module and regression tests in HyperFrames, then synchronize:
82
+
83
+ ```bash
84
+ # Run in dsh-hyperframes; updates only three shared files in sibling dsh-remotion
85
+ node scripts/sync-skill-bundle.mjs
86
+ node scripts/sync-skill-bundle.mjs --check
87
+ ```
88
+
89
+ Both suites compare shared source and regression tests to prevent drift. A standalone checkout skips only that cross-repository comparison. Tests cover invalid YAML, unreadable files, empty bodies, rejected/inactive registrations, file changes and repairs, disposal races and cleanup failures, without invoking video or speech services.
90
+
91
+ ## License
92
+
93
+ MIT for the porting arrangement; skill content copyright remains with Remotion.
package/docs/USAGE.md ADDED
@@ -0,0 +1,97 @@
1
+ # dsh-remotion 使用说明
2
+
3
+ [返回简介](../README.md) · [更新记录](../CHANGELOG.md) · [验证记录](VALIDATION.md)
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ dsh plugin --profile web add dsh-remotion
9
+ ```
10
+
11
+ 重启后说「用 Remotion 做个视频」即可触发。
12
+
13
+ ## 卸载
14
+
15
+ ```bash
16
+ dsh plugin --profile web remove dsh-remotion
17
+ ```
18
+
19
+ 卸载后重启 Web 服务。如需彻底清理,可再手动删除自己 profile `cordis.patch.yml` 中覆盖的插件行。
20
+
21
+ ## 视频工作台
22
+
23
+ 在桌面或 Web 的「设置 → Remotion」中操作:
24
+
25
+ 1. 新建视频,选择标题卡、产品介绍或图文轮播,填写标题/正文、画幅和 3–30 秒时长,明确保存。
26
+ 2. 上传 PNG/JPEG、一个背景音频(MP3/WAV)、一个静音背景视频(MP4)的副本。每个文件最多 20 MB、总计 40 MB;轮播按上传顺序,每张至少两秒。
27
+ 3. 首次点击「准备渲染环境」。此时下载固定版本官方 CLI 4.0.532,优先使用已安装的 Chrome,没有时再下载浏览器;可以继续编辑工程。下载失败保留工程,查看运行记录后重试。使用前确认 [Remotion 官方许可证](https://www.remotion.dev/license)适合你的用途。
28
+ 4. 启动官方 Studio,检查画面。停止本次预览后再编辑或导出;不会自动打开或占用前台窗口。
29
+ 5. 导出 MP4、在工作台播放并下载。工程更新后保留旧成品并显示旧修订提醒;再次导出即可生成新成片。
30
+
31
+ 「备份可编辑工程」包含源代码、项目数据和素材。解压后按 README 使用 npm install、npm run preview / render;原模板代码 MIT,渲染器保留自己的许可证。
32
+
33
+ 工程、素材、运行目录和依赖缓存默认位于 DSH_HOME/data/dsh-remotion,两个插件分别保存。使用同一个 DSH_HOME 的 Web 与桌面 profile 共享这些已保存工程。不会改写原始素材或用户已有视频工程。关闭设置后,当前输入和任务状态保留在本次页面;刷新页面会提示未保存输入,已保存工程长期保留。任务可取消,关闭 DSH 会停止本插件任务。备份 ZIP 目前不支持在设置页导回。
34
+
35
+ 智能体工具:remotion_project(list/create/get/update);remotion_render(prepare/preview/render/job/cancel)。渲染与更新需要工程 id 和当前 revision;查询/取消使用 job id。工具不会默认下载依赖。
36
+
37
+ ## 使用限制
38
+
39
+ 本轮为轻量模板编辑,尚不提供时间轴编辑、字幕转写、TTS 或云端渲染。外部链接不能作为素材路径;请先保存到本地再上传。默认 24 FPS,成品上限 200 MB。预览仅监听 127.0.0.1,属于本机服务;多用户机器仍需考虑同机访问。
40
+
41
+ ## 技能内容
42
+
43
+ - **remotion-best-practices**(总纲路由)+ 11 个领域技能(captions/create/docs/interactivity/maps/markup/multimedia/render/saas/studio/upgrade),同步自 Remotion 官方 v4.0.529
44
+
45
+ ## 依赖
46
+
47
+ Node.js `^22.19.0 || >=24.0.0` + npx(npm registry);渲染需 ffmpeg(Remotion 自带指引)。
48
+
49
+ ## 移植说明
50
+
51
+ 技能同步自官方 `remotion-dev/skills` 检出 v4.0.529(2026-09-25):上游正文原样引入(含 `remotion-best-practices/`、`remotion-markup/` 下的内嵌引用副本),仅把 frontmatter 换成本包的 `name`/`description` + 上游 `version`;`scripts/sync-skills.mjs` 让移植可复现、可校验(`--check`)。
52
+
53
+ ## 跨平台使用
54
+
55
+ 技能采用开放的 Agent Skills(SKILL.md)格式,**不止 DSH 能用**——把 `skills/` 下的目录复制到其他 agent 的技能目录即可:
56
+
57
+ | Agent | 技能目录 |
58
+ | :-- | :-- |
59
+ | Claude Code | `~/.claude/skills/` |
60
+ | Cursor | `.cursor/skills/`(或项目内 `skills/`)|
61
+ | Gemini CLI | `~/.gemini/skills/` |
62
+ | OpenAI Codex | `~/.codex/skills/` |
63
+
64
+ 一次移植,处处可用。
65
+
66
+ ## 技能自检与重载
67
+
68
+ 运行 `remotion_health` 会重新读取每个 `SKILL.md`,验证文件可读、YAML frontmatter 合法、名称与目录一致、描述与正文非空,再通过宿主 `skills.get` 确认实际生效的名称、描述、正文和资源目录与本次加载内容相符。文件存在但未注册、注册失败或后来被移除时,自检都会失败。
69
+
70
+ 自检不修改文件或注册表。修改技能文件,或修复加载时损坏的技能后,应重载插件(也可重启 DSH)。它会报告 `changed`、`not_registered` 或 `registration_failed`,不会把磁盘修复直接当成运行时修复。若原先已成功加载,只是文件暂时丢失,恢复与加载时完全相同的内容即可重新通过检查。
71
+
72
+ 每项结果保留 `name / ok / detail`,并增加 `code / fileOk / registered / registryChecked / reloadRequired`:`registered` 表示注册表仍匹配加载时的版本,因此文件变更时它可以为 true 而 `ok` 为 false。缺少或无法查询宿主注册表时返回 `registry_unavailable`;插件卸载后返回 `disposed`。`checkBundledSkills()` 仅检查磁盘文件,不推断运行时状态;原有不抛错的 `parseSkillFile()` 解析入口保持可用。
73
+
74
+ ## 开发与共享实现
75
+
76
+ `src/index.ts` 只声明包名、技能清单和目录,解析、校验、注册与自检集中在包内 `src/skill-bundle.ts`。规范源位于 `dsh-hyperframes/src/skill-bundle.ts`,Remotion 保存相同的受版本控制副本;两包都编译并分发自己的 `lib/skill-bundle.js`,没有跨包运行时依赖,也不需要另一个仓库即可构建或安装。
77
+
78
+ 依赖预先安装后,可直接离线构建和测试:
79
+
80
+ ```bash
81
+ node node_modules/typescript/bin/tsc -p tsconfig.json
82
+ node --test "test/*.test.mjs"
83
+ ```
84
+
85
+ 两个仓库并列开发时,在 HyperFrames 修改公共模块与公共回归测试,再同步:
86
+
87
+ ```bash
88
+ # 在 dsh-hyperframes 中执行;只更新相邻 dsh-remotion 的三个公共文件
89
+ node scripts/sync-skill-bundle.mjs
90
+ node scripts/sync-skill-bundle.mjs --check
91
+ ```
92
+
93
+ 两包测试都会检查公共源码与回归测试是否一致,防止副本漂移;单独检出时只跳过跨仓库比对,其余测试正常运行。测试覆盖损坏 YAML、不可读文件、空正文、注册异常/失效、内容变更与修复、卸载及清理异常,全程不调用视频或语音服务。
94
+
95
+ ## License
96
+
97
+ MIT(移植编排);技能内容版权归 Remotion。
@@ -0,0 +1,22 @@
1
+ # dsh-remotion 验证记录
2
+
3
+ 本页整理原 README 的历史验证说明,保留当时的版本、日期与范围。自动测试、启动检查、浏览器操作和真实服务验收分别记录,不能相互替代。更详细的版本验收文件仍保留在仓库中。
4
+
5
+ ## 0.4.0 视频工作台(2026-10-03)
6
+
7
+ - Windows、Node 24.16.0:39 项测试全部通过,无跳过。覆盖工程修订冲突、素材限制、快照、路径与请求校验、渲染失败、取消及退出清理。
8
+ - 官方 Harness 0.2.0-rc.2(639ed01)Web:实际完成新建、保存、上传图片/音频/背景视频、准备环境、启动/停止官方 Studio、导出、播放及下载源工程和 MP4。关闭设置后未保存输入保留;并发修改会提示冲突,明确放弃后才读取新版本。中文/英文和 390px 窄窗口均检查。
9
+ - 官方 Remotion 4.0.532:实际生成标题卡 1280×720 和产品介绍 720×720 两份 H.264/AAC MP4,均为约 6 秒、24 FPS、144 帧。检查成片中文、图片与背景视频,并在浏览器播放到结尾。Studio 检查了画布、帧率、时长和时间轴。
10
+ - 原素材保留,上传的是工作台副本;旧成片按其实际修订展示。导出失败不产生成功收据。
11
+ - 生产依赖审计使用官方 npm registry,结果为 0 项漏洞;不把自动测试或网页验收当作原生桌面窗口操作验收。
12
+ - 官方公开 npm 安装的 Harness 0.2.1-alpha.1:18 个独立插件同载的注册与输出检查通过(109 个工具、35 个技能、TypeScript/Python PTC 声明);保存的工作台工程和环境正常恢复,并再次实际导出 720×720 的产品介绍 MP4。
13
+
14
+ 边界:这一版本的新工作台尚未在原生桌面窗口中逐项操作;Linux/macOS 的真实浏览器渲染、任意长文本与用户自有素材的最终成片不属于本次验收。原始模板为 MIT,Remotion 依赖遵循它自己的许可条件。
15
+
16
+ ## 原中文记录
17
+
18
+ 验证宿主:官方源码构建的 Harness `0.2.0-rc.1`(commit `407e65c8`)+ Node `24.16.0`(2026-09-28)。23 项插件测试在隔离环境全部通过;同一个宿主里 18 个插件共同加载,注册 12 个技能、1 个工具,工具 schema 与健康检查契约通过。本轮未启用真实端口与外部服务。
19
+
20
+ ## Original English record
21
+
22
+ Validation host: Harness `0.2.0-rc.1` built from official sources (commit `407e65c8`) with Node `24.16.0` on 2026-09-28. All 23 plugin tests pass in an isolated environment; all 18 plugins mount together in one host registering 12 skills and 1 tools, with tool schemas and health-check contracts passing. No live ports or external services were exercised in this round.
package/lib/client.js ADDED
@@ -0,0 +1,90 @@
1
+ // Shared original browser source. build-client substitutes the engine identity.
2
+ window.__ModuleLoader__.load({ id: 'dsh-remotion', factory: require => {
3
+ const React = require('react'), { useState, useEffect, useRef } = React, h = React.createElement;
4
+ const engine = 'remotion', title = engine === 'hyperframes' ? 'HyperFrames' : 'Remotion', route = 'api/dsh-' + engine + '/workbench';
5
+ let cache = { project: null, fields: null, dirty: false, job: null, creating: false };
6
+ const empty = () => ({ template: 'title', title: '', body: '', format: 'landscape', duration: 8 });
7
+ const fieldsOf = p => ({ template: p.template, title: p.title, body: p.body, format: p.format, duration: p.duration });
8
+ const css = `.dmw{font:14px/1.6 system-ui,sans-serif;color:var(--fg,#142D39);min-width:0;padding:8px}.dmw *{box-sizing:border-box}.dmw h2{margin:0;font-size:23px}.dmw h3{font-size:17px;margin:8px 0}.dmw .muted{color:var(--fg-muted,#677881);font-size:13px}.dmw .bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0}.dmw button,.dmw .button{font:inherit;color:inherit;background:var(--bg-surface,#fff);border:1px solid var(--border,#c8d6d9);border-radius:9px;padding:8px 12px;cursor:pointer;white-space:normal;text-decoration:none}.dmw button.primary{background:#df5639;border-color:#df5639;color:white}.dmw button:disabled{opacity:.45;cursor:default}.dmw input:not([type=file]),.dmw textarea,.dmw select{font:inherit;color:inherit;width:100%;border:1px solid var(--border,#b9cccd);border-radius:8px;padding:9px;background:var(--bg,#fff)}.dmw label{display:block;margin:10px 0 4px}.dmw .card{border:1px solid var(--border,#ccd7d6);border-radius:12px;padding:14px;margin:12px 0;min-width:0;background:var(--bg-surface,#fff)}.dmw .notice{border-radius:8px;padding:10px;margin:10px 0;background:#eef5ed;color:#28573e;overflow-wrap:anywhere}.dmw .error{background:#fff0ec;color:#943b27}.dmw .row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.dmw .projects{display:grid;gap:8px}.dmw .projects button{text-align:left;width:100%}.dmw img{width:90px;height:70px;object-fit:contain}.dmw .assets{display:flex;flex-direction:column;gap:8px}.dmw .asset{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.dmw video{width:100%;max-height:400px;background:#142D39;border-radius:10px}.dmw pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;margin:8px 0;max-height:220px;overflow:auto}.dmw :focus-visible{outline:3px solid #79CDB4;outline-offset:2px}[role=dialog]:has(.dmw){width:min(1160px,calc(100vw - 40px))!important;max-width:1160px!important}@media(max-width:700px){.dmw{padding:3px}.dmw .row{grid-template-columns:1fr}[role=dialog]:has(.dmw){width:100%!important;max-width:100%!important;flex-direction:column!important}[role=dialog]:has(.dmw)>nav+div{min-width:0;width:100%}[role=dialog]:has(.dmw)>nav+div>div:has(.dmw){padding:12px!important;min-width:0}[role=dialog]:has(.dmw) nav{width:100%!important;flex-basis:auto!important;border-right:0;max-height:170px;overflow:auto}[role=dialog]:has(.dmw) nav>div:has(>button){display:flex;flex-direction:row!important;flex-wrap:wrap;gap:4px}}`;
9
+ async function api(body) {
10
+ const response = await fetch(new URL(route, document.baseURI), { method: 'POST', credentials: 'same-origin', headers: { 'content-type': 'application/json', 'x-dsh-media': '1' }, body: JSON.stringify(body) });
11
+ let data; try { data = await response.json() } catch { throw new Error('无法读取插件响应,请检查是否已经重启 DSH。') }
12
+ if (!response.ok || !data.ok) { const error = new Error(data.message || '操作未完成'); error.status = response.status; throw error; } return data.value;
13
+ }
14
+ function urlFor(project, kind, extra = {}) { const url = new URL(route, document.baseURI); url.search = new URLSearchParams({ id: project.id, kind, ...extra }); return url.href; }
15
+ function Workbench({ locale }) {
16
+ const [lang, setLang] = useState('zh'), [projects, setProjects] = useState([]), [environment, setEnvironment] = useState(null), [templates, setTemplates] = useState([]);
17
+ const [project, setProject] = useState(cache.project), [fields, setFields] = useState(cache.fields || empty()), [dirty, setDirty] = useState(cache.dirty), [creating, setCreating] = useState(cache.creating);
18
+ const [job, setJob] = useState(cache.job), [busy, setBusy] = useState(false), [error, setError] = useState(''), [notice, setNotice] = useState(''), [pending, setPending] = useState(null), [conflict, setConflict] = useState(false);
19
+ const busyRef = useRef(false), fileRef = useRef(null), latest = useRef({ project, fields, dirty }); latest.current = { project, fields, dirty };
20
+ const t = (zh, en) => lang === 'en' ? en : zh, activeJob = job?.state === 'running', running = busy || activeJob && job.kind !== 'prepare';
21
+ const stage = lang === 'en' ? ({ '下载环境': 'Preparing environment', '检查 FFmpeg': 'Checking FFmpeg', '下载官方依赖': 'Downloading official dependencies', '检查官方环境': 'Checking official CLI', '检查或下载 Chrome': 'Checking or downloading Chrome', '下载专用渲染浏览器': 'Downloading the official rendering browser', '准备修订快照': 'Preparing saved revision', '启动官方预览': 'Starting official preview', '官方预览已就绪': 'Official preview is ready', '检查合成': 'Checking composition', '渲染 MP4': 'Rendering MP4', '已完成': 'Completed', '已取消': 'Cancelled', '已取消;工程已保留': 'Cancelled; project preserved', '官方任务未完成,请展开运行记录后重试。工程已保留。': 'The official task failed. Open the job log and retry; your project is preserved.', '未找到 FFmpeg,请安装并加入 PATH,重启 DSH 后重试。工程已保留。': 'FFmpeg was not found. Install it, add it to PATH, then restart DSH and retry; your project is preserved.' }[job?.stage] || job?.stage) : job?.stage;
22
+ useEffect(() => { const update = () => setLang(String(locale?.getSnapshot?.().active || '').startsWith('en') ? 'en' : 'zh'); update(); return locale?.subscribe?.(update); }, [locale]);
23
+ useEffect(() => { cache = { project, fields, dirty, job, creating }; }, [project, fields, dirty, job, creating]);
24
+ useEffect(() => { const exit = e => { if (latest.current.dirty) { e.preventDefault(); e.returnValue = ''; } }; window.addEventListener('beforeunload', exit); return () => window.removeEventListener('beforeunload', exit); }, []);
25
+ async function refresh() {
26
+ const data = await api({ action: 'list' }); setProjects(data.projects); setEnvironment(data.environment); setTemplates(data.templates);
27
+ const current = latest.current, saved = !current.dirty && data.projects.find(row => row.id === current.project?.id);
28
+ if (saved) { setProject(saved); setFields(fieldsOf(saved)); }
29
+ setJob(previous => data.jobs.find(row => row.id === previous?.id) || data.jobs.filter(row => row.state === 'running').at(-1) || data.jobs.at(-1) || null);
30
+ }
31
+ useEffect(() => { refresh().catch(e => setError(e.message)); }, []);
32
+ useEffect(() => {
33
+ if (!job || job.state !== 'running') return;
34
+ let live = true, polling = false;
35
+ const timer = setInterval(async () => {
36
+ if (polling) return; polling = true;
37
+ try {
38
+ const next = await api({ action: 'job', job: job.id }); if (!live) return;
39
+ // Refresh output before the terminal state tears down this polling effect.
40
+ if (next.state !== 'running') await refresh();
41
+ else setJob(next);
42
+ } catch (e) { if (live) { setError(e.message); setJob(null); } } finally { polling = false; }
43
+ }, 1000);
44
+ return () => { live = false; clearInterval(timer); };
45
+ }, [job?.id, job?.state]);
46
+ async function perform(fn) { if (busyRef.current) return; busyRef.current = true; setBusy(true); setError(''); setNotice(''); try { return await fn(); } catch (e) { setError(e.message); setConflict(e.status === 409); } finally { busyRef.current = false; setBusy(false); } }
47
+ async function open(id) { const next = await api({ action: 'get', id }); setProject(next); setFields(fieldsOf(next)); setCreating(false); setDirty(false); setConflict(false); setPending(null); }
48
+ function navigate(target) { if (dirty) { setPending(target); return; } perform(() => move(target)); }
49
+ async function move(target) { if (target === 'new') { setProject(null); setFields(empty()); setCreating(true); } else if (target === 'list') { setProject(null); setCreating(false); await refresh(); } else await open(target); setDirty(false); setPending(null); }
50
+ async function save() { const next = await api(project ? { action: 'update', id: project.id, revision: project.revision, fields } : { action: 'create', fields }); setProject(next); setFields(fieldsOf(next)); setCreating(false); setDirty(false); setConflict(false); setNotice(t('工程已保存。', 'Project saved.')); await refresh(); return next; }
51
+ async function upload(event) { const file = event.target.files?.[0]; if (!file) return; await perform(async () => {
52
+ if (!project || dirty) throw new Error(t('请先保存工程,再上传素材。', 'Save your project before uploading media.'));
53
+ if (file.size > 20 * 1024 * 1024) throw new Error(t('单个素材不能超过 20 MB。', 'Each asset must be at most 20 MB.'));
54
+ const response = await fetch(new URL(route + '/upload', document.baseURI), { method: 'POST', credentials: 'same-origin', headers: { 'content-type': 'application/octet-stream', 'x-dsh-media': '1', 'x-project-id': project.id, 'x-project-revision': String(project.revision), 'x-file-name': encodeURIComponent(file.name) }, body: file }); const result = await response.json(); if (!response.ok || !result.ok) { const e = new Error(result.message); e.status = response.status; throw e; } setProject(result.value); setNotice(t('素材副本已保存,原文件未改变。', 'A media copy was saved; your original is unchanged.'));
55
+ }); event.target.value = ''; }
56
+ async function start(action) { await perform(async () => { if (action !== 'prepare' && dirty) throw new Error(t('请先保存修改。', 'Save changes first.')); setJob(await api({ action, id: project?.id, revision: project?.revision })); }); }
57
+ const render = project?.renders?.[0], stale = render && render.revision !== project.revision;
58
+ if (!environment) return h('div', { className: 'dmw' }, h('style', null, css), h('h2', null, title + t(' 视频工作台', ' video workbench')),
59
+ error ? h(React.Fragment, null, h('p', { className: 'notice error', role: 'alert' }, error), h('button', { disabled: busy, onClick: () => perform(refresh) }, t('重新读取项目', 'Reload projects'))) : h('p', { role: 'status' }, t('正在读取工程与渲染环境…', 'Loading projects and render environment…')));
60
+ return h('div', { className: 'dmw' }, h('style', null, css), h('h2', null, title + t(' 视频工作台', ' video workbench')),
61
+ h('p', { className: 'muted' }, t('模板 → 素材 → 官方预览 → 本机 MP4。工程与素材保存在 DSH 本地数据目录。', 'Template → media → official preview → local MP4. Projects stay in the local DSH data folder.')),
62
+ error && h('div', { className: 'notice error', role: 'alert' }, error), notice && h('div', { className: 'notice', role: 'status' }, notice),
63
+ pending && h('div', { className: 'card' }, h('p', null, t('有未保存内容,如何继续?', 'You have unsaved changes.')),
64
+ h('div', { className: 'bar' }, h('button', { disabled: running, onClick: () => perform(async () => { await save(); await move(pending); }) }, t('保存后继续', 'Save and continue')), h('button', { disabled: running, onClick: () => perform(() => move(pending)) }, t('放弃修改并继续', 'Discard and continue')), h('button', { onClick: () => setPending(null) }, t('留在当前', 'Stay here')))),
65
+ conflict && project && h('button', { disabled: running, onClick: () => { setPending(project.id); } }, t('重新打开最新版本(先处理当前输入)', 'Reopen latest version (review your current input first)')),
66
+ h('details', { className: 'card', open: !environment?.ready }, h('summary', null, t('渲染环境', 'Render environment') + (environment?.ready ? t(' · 已准备', ' · ready') : t(' · 首次需下载', ' · first download required'))),
67
+ h('p', { className: 'muted' }, t(environment?.hint, 'First use downloads the official CLI. ' + (engine === 'hyperframes' ? 'Windows uses the official rendering browser; other platforms reuse installed Chrome when available. FFmpeg must be in PATH.' : 'Installed Chrome is reused; a browser is downloaded when needed. Remotion retains its official license.'))), engine === 'remotion' && h('p', null, h('a', { href: 'https://www.remotion.dev/license', target: '_blank', rel: 'noreferrer' }, t('查看 Remotion 使用许可证', 'Read the Remotion license'))),
68
+ h('button', { disabled: busy || activeJob, onClick: () => start('prepare') }, environment?.ready ? t('重新检查 / 修复环境', 'Check / repair environment') : t('准备渲染环境', 'Prepare render environment'))),
69
+ job && h('div', { className: job.state === 'failed' ? 'card notice error' : 'card', role: job.state === 'failed' ? 'alert' : 'status' }, h('strong', null, t('任务状态:', 'Job status: ') + stage), job.url && h('p', null, h('a', { className: 'button', href: job.url, target: '_blank', rel: 'noreferrer' }, t('打开官方 Studio 预览', 'Open official Studio preview'))),
70
+ job.state === 'running' && h('button', { disabled: busy, onClick: () => perform(async () => { await api({ action: 'cancel', job: job.id }); setNotice(t('已请求停止;正在关闭本次任务。', 'Stopping this job.')); }) }, job.kind === 'preview' ? t('停止预览,返回编辑', 'Stop preview and return to editing') : t('取消任务', 'Cancel job')),
71
+ h('details', null, h('summary', null, t('查看运行记录', 'Show job log')), h('pre', null, job.lines.join('\n')))),
72
+ !project && !creating ? h(React.Fragment, null, h('div', { className: 'bar' }, h('button', { className: 'primary', disabled: running, onClick: () => navigate('new') }, t('新建视频', 'New video')), h('button', { disabled: running, onClick: () => perform(refresh) }, t('刷新项目', 'Refresh projects'))),
73
+ projects.length ? h('div', { className: 'projects' }, projects.map(p => h('button', { key: p.id, disabled: running, onClick: () => navigate(p.id) }, h('strong', null, p.title), h('div', { className: 'muted' }, p.duration + t(' 秒 · 修订 ', ' sec · revision ') + p.revision)))) : h('div', { className: 'card' }, h('h3', null, t('还没有视频工程', 'No video projects yet')), h('p', null, t('点击“新建视频”,先选模板并保存。环境准备可以稍后进行。', 'Choose New video, select a template and save. You can prepare the render environment later.')))) :
74
+ h(React.Fragment, null, h('div', { className: 'bar' }, h('button', { disabled: running, onClick: () => navigate('list') }, t('返回项目', 'Back to projects')), project && h('span', { className: 'muted' }, t('修订 ', 'Revision ') + project.revision), dirty && h('span', null, t('有未保存修改', 'Unsaved changes'))),
75
+ h('div', { className: 'card' }, h('h3', null, t('1. 模板与内容', '1. Template and content')),
76
+ h('label', { htmlFor: engine + '-template' }, t('模板', 'Template')), h('select', { id: engine + '-template', disabled: running, value: fields.template, onChange: e => { setFields({ ...fields, template: e.target.value }); setDirty(true); } }, templates.map(row => h('option', { key: row.id, value: row.id }, lang === 'en' ? row.en : row.zh))),
77
+ h('label', { htmlFor: engine + '-title' }, t('标题(最多 72 字符)', 'Title (up to 72 characters)')), h('input', { id: engine + '-title', value: fields.title, disabled: running, maxLength: 72, onChange: e => { setFields({ ...fields, title: e.target.value }); setDirty(true); } }),
78
+ h('label', { htmlFor: engine + '-body' }, t('正文(轮播时每行对应一页)', 'Body (one line per slideshow page)')), h('textarea', { id: engine + '-body', value: fields.body, disabled: running, maxLength: 360, rows: 4, onChange: e => { setFields({ ...fields, body: e.target.value }); setDirty(true); } }),
79
+ h('div', { className: 'row' }, h('div', null, h('label', { htmlFor: engine + '-format' }, t('画幅', 'Canvas')), h('select', { id: engine + '-format', value: fields.format, disabled: running, onChange: e => { setFields({ ...fields, format: e.target.value }); setDirty(true); } }, ['landscape','portrait','square'].map((key, i) => h('option', { key, value: key }, [t('横屏 16:9', 'Landscape 16:9'),t('竖屏 9:16', 'Portrait 9:16'),t('正方形', 'Square')][i])))), h('div', null, h('label', { htmlFor: engine + '-duration' }, t('时长(3–30 秒)', 'Duration (3–30 seconds)')), h('input', { id: engine + '-duration', type: 'number', min: 3, max: 30, value: fields.duration, disabled: running, onChange: e => { setFields({ ...fields, duration: Number(e.target.value) }); setDirty(true); } }))),
80
+ h('div', { className: 'bar' }, h('button', { className: 'primary', disabled: running || project && !dirty, onClick: () => perform(save) }, t('保存工程', 'Save project')), project && h('button', { disabled: running || !dirty, onClick: () => { setFields(fieldsOf(project)); setDirty(false); setError(''); } }, t('取消修改', 'Discard changes')))),
81
+ project && h('div', { className: 'card' }, h('h3', null, t('2. 素材', '2. Media')), h('p', { className: 'muted' }, t('PNG/JPEG 图片、一个背景音频和一个静音背景视频;每个 ≤20 MB,总共 ≤40 MB。轮播按上传顺序,每张至少两秒。', 'PNG/JPEG images, one background audio and one muted background video; each ≤20 MB, total ≤40 MB. Slideshow follows upload order, at least two seconds per image.')),
82
+ h('label', { htmlFor: engine + '-asset' }, t('上传素材副本', 'Upload a media copy')), h('input', { ref: fileRef, id: engine + '-asset', type: 'file', accept: '.png,.jpg,.jpeg,.mp3,.wav,.mp4', disabled: running || dirty, onChange: upload }),
83
+ h('div', { className: 'assets' }, project.assets.map(a => h('div', { className: 'asset', key: a.id }, a.kind === 'image' && h('img', { src: urlFor(project, 'asset', { asset: a.id }), alt: a.name }), h('span', null, a.name + ' · ' + Math.ceil(a.bytes / 1024) + ' KB'), h('button', { disabled: running || dirty, onClick: () => perform(async () => { setProject(await api({ action: 'removeAsset', id: project.id, revision: project.revision, asset: a.id })); }) }, t('移除上传副本', 'Remove uploaded copy')))))),
84
+ project && h('div', { className: 'card' }, h('h3', null, t('3. 预览与成品', '3. Preview and output')), h('p', { className: 'muted' }, t('保存后在官方 Studio 检查画面。关闭本次预览后再编辑或导出。MP4 按已保存修订生成;渲染不会占用前台窗口。', 'Check the saved project in official Studio. Stop this preview before editing or exporting. MP4 uses the saved revision and renders in the background.')),
85
+ h('div', { className: 'bar' }, h('button', { disabled: running || dirty || !environment?.ready, onClick: () => start('preview') }, t('启动官方预览', 'Start official preview')), h('button', { className: 'primary', disabled: running || dirty || !environment?.ready, onClick: () => start('render') }, t('导出 MP4', 'Export MP4')), h('a', { className: 'button', href: urlFor(project, 'source'), download: '' }, t('备份可编辑工程', 'Back up editable project'))),
86
+ render ? h(React.Fragment, null, h('p', { className: stale ? 'notice error' : 'muted' }, t('此 MP4 来自修订 ', 'This MP4 uses revision ') + render.revision + (stale ? t(',工程已有更新,请重新导出。', '; your project has newer changes. Export again.') : t(',请播放检查最终画面。', '. Play it to check the final output.'))), h('video', { controls: true, preload: 'metadata', src: urlFor(project, 'mp4', { render: render.id }) }), h('p', null, h('a', { className: 'button', href: urlFor(project, 'mp4', { render: render.id, download: '1' }), download: '' }, t('下载这份 MP4', 'Download this MP4')))) : h('p', { className: 'muted' }, t('尚无 MP4 成品。预览成功后点击“导出 MP4”。', 'No MP4 yet. Check the preview, then choose Export MP4.')))));
87
+ }
88
+ function apply(ctx) { let locale; try { locale = ctx.get?.('locale') || ctx.locale; } catch {} ctx.slots.inject('settings.section', () => ctx.slots.register({ name: 'settings.section', id: 'dsh-' + engine, order: engine === 'hyperframes' ? 62 : 63, label: () => title, inject: () => ({ locale }) }, Workbench)); }
89
+ return { inject: ['slots','locale'], apply };
90
+ } });
package/lib/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  import { type SkillsPluginContext } from './skill-bundle.js';
2
+ export { MediaWorkbench } from './media-workbench.js';
3
+ export { MediaStore } from './media-store.js';
4
+ export { MEDIA_TEMPLATES, MEDIA_VERSIONS } from './media-templates.js';
2
5
  export { parseSkillFile } from './skill-bundle.js';
3
6
  export type { SkillRegistration, SkillsPluginContext } from './skill-bundle.js';
4
7
  export declare const name = "remotion-skills";