kasaframe 0.0.0-stage → 0.1.3

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 (442) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +148 -0
  3. package/README.md +92 -2
  4. package/app/package.json +12 -0
  5. package/app/server/engine.ts +533 -0
  6. package/app/server/main.ts +209 -0
  7. package/app/web/env.d.ts +2 -0
  8. package/app/web/icons.ts +31 -0
  9. package/app/web/index.html +21 -0
  10. package/app/web/main.ts +1195 -0
  11. package/app/web/style.css +463 -0
  12. package/bin/hooks.mjs +64 -0
  13. package/bin/kf.mjs +32 -0
  14. package/docs/AGENTS.md +286 -0
  15. package/music/README.md +37 -0
  16. package/package.json +44 -4
  17. package/packages/adapters/package.json +36 -0
  18. package/packages/adapters/src/css.ts +11 -0
  19. package/packages/adapters/src/gsap.ts +26 -0
  20. package/packages/adapters/src/index.ts +9 -0
  21. package/packages/adapters/src/lottie.ts +22 -0
  22. package/packages/adapters/src/media.ts +59 -0
  23. package/packages/adapters/src/page.ts +229 -0
  24. package/packages/adapters/src/project.ts +214 -0
  25. package/packages/adapters/src/react.ts +36 -0
  26. package/packages/adapters/src/svelte.ts +22 -0
  27. package/packages/adapters/src/three.ts +18 -0
  28. package/packages/adapters/src/vue.ts +27 -0
  29. package/packages/check/package.json +19 -0
  30. package/packages/check/src/check.ts +280 -0
  31. package/packages/check/src/cli.ts +70 -0
  32. package/packages/check/src/image.ts +146 -0
  33. package/packages/check/src/index.ts +9 -0
  34. package/packages/check/src/ocr.swift +37 -0
  35. package/packages/check/src/probe.ts +328 -0
  36. package/packages/check/src/report.ts +44 -0
  37. package/packages/check/src/rules/assets.ts +45 -0
  38. package/packages/check/src/rules/beats.ts +212 -0
  39. package/packages/check/src/rules/camera.ts +217 -0
  40. package/packages/check/src/rules/captions.ts +49 -0
  41. package/packages/check/src/rules/flash.ts +235 -0
  42. package/packages/check/src/rules/frames.ts +136 -0
  43. package/packages/check/src/rules/layout.ts +281 -0
  44. package/packages/check/src/rules/page.ts +87 -0
  45. package/packages/check/src/rules/runs.ts +20 -0
  46. package/packages/check/src/rules/text.ts +326 -0
  47. package/packages/check/src/scan.ts +240 -0
  48. package/packages/check/src/serve.ts +67 -0
  49. package/packages/check/src/types.ts +80 -0
  50. package/packages/check/src/video.ts +137 -0
  51. package/packages/cli/package.json +30 -0
  52. package/packages/cli/src/blur.ts +80 -0
  53. package/packages/cli/src/browser.ts +203 -0
  54. package/packages/cli/src/command.ts +44 -0
  55. package/packages/cli/src/commands/app.ts +25 -0
  56. package/packages/cli/src/commands/beats.ts +36 -0
  57. package/packages/cli/src/commands/bench.ts +123 -0
  58. package/packages/cli/src/commands/blender.ts +293 -0
  59. package/packages/cli/src/commands/check.ts +25 -0
  60. package/packages/cli/src/commands/direct.ts +210 -0
  61. package/packages/cli/src/commands/doctor.ts +30 -0
  62. package/packages/cli/src/commands/gen.ts +173 -0
  63. package/packages/cli/src/commands/look.ts +46 -0
  64. package/packages/cli/src/commands/lyrics.ts +157 -0
  65. package/packages/cli/src/commands/make.ts +1121 -0
  66. package/packages/cli/src/commands/music.ts +78 -0
  67. package/packages/cli/src/commands/narrate.ts +238 -0
  68. package/packages/cli/src/commands/new.ts +185 -0
  69. package/packages/cli/src/commands/preview.ts +43 -0
  70. package/packages/cli/src/commands/render.ts +250 -0
  71. package/packages/cli/src/commands/series.ts +110 -0
  72. package/packages/cli/src/commands/setup.ts +102 -0
  73. package/packages/cli/src/commands/sheet.ts +114 -0
  74. package/packages/cli/src/commands/skill.ts +43 -0
  75. package/packages/cli/src/commands/still.ts +40 -0
  76. package/packages/cli/src/commands/theme.ts +172 -0
  77. package/packages/cli/src/commands/transitions.ts +40 -0
  78. package/packages/cli/src/deps.ts +122 -0
  79. package/packages/cli/src/ffmpeg.ts +81 -0
  80. package/packages/cli/src/index.ts +8 -0
  81. package/packages/cli/src/kf.ts +64 -0
  82. package/packages/cli/src/lock.ts +72 -0
  83. package/packages/cli/src/mix.ts +131 -0
  84. package/packages/cli/src/out.ts +13 -0
  85. package/packages/cli/src/pool.ts +34 -0
  86. package/packages/cli/src/segments.ts +402 -0
  87. package/packages/cli/src/serve.ts +124 -0
  88. package/packages/clock/package.json +14 -0
  89. package/packages/clock/src/index.ts +25 -0
  90. package/packages/clock/src/install.ts +351 -0
  91. package/packages/clock/src/types.ts +45 -0
  92. package/packages/core/package.json +9 -0
  93. package/packages/core/src/beats.ts +283 -0
  94. package/packages/core/src/ease.ts +87 -0
  95. package/packages/core/src/frame.ts +99 -0
  96. package/packages/core/src/index.ts +27 -0
  97. package/packages/core/src/project.ts +157 -0
  98. package/packages/core/src/rand.ts +56 -0
  99. package/packages/core/src/spring.ts +52 -0
  100. package/packages/core/src/style.ts +100 -0
  101. package/packages/core/src/time.ts +88 -0
  102. package/packages/director/package.json +23 -0
  103. package/packages/director/src/assemble.ts +361 -0
  104. package/packages/director/src/brief.ts +122 -0
  105. package/packages/director/src/catalog.ts +49 -0
  106. package/packages/director/src/content.ts +343 -0
  107. package/packages/director/src/fallback.ts +58 -0
  108. package/packages/director/src/index.ts +13 -0
  109. package/packages/director/src/pattern.ts +90 -0
  110. package/packages/director/src/patterns/fill/cells.ts +115 -0
  111. package/packages/director/src/patterns/formula/stack.ts +93 -0
  112. package/packages/director/src/patterns/util.ts +58 -0
  113. package/packages/director/src/scene.ts +62 -0
  114. package/packages/director/src/select.ts +163 -0
  115. package/packages/director/src/transitions.ts +115 -0
  116. package/packages/gen/PROVIDERS.md +90 -0
  117. package/packages/gen/package.json +9 -0
  118. package/packages/gen/src/ask.ts +132 -0
  119. package/packages/gen/src/audio.ts +91 -0
  120. package/packages/gen/src/blender.ts +54 -0
  121. package/packages/gen/src/capabilities.ts +151 -0
  122. package/packages/gen/src/generate.ts +206 -0
  123. package/packages/gen/src/image/codex.ts +117 -0
  124. package/packages/gen/src/image/og.ts +133 -0
  125. package/packages/gen/src/index.ts +26 -0
  126. package/packages/gen/src/keys.ts +86 -0
  127. package/packages/gen/src/media.ts +150 -0
  128. package/packages/gen/src/music/elevenlabs.ts +41 -0
  129. package/packages/gen/src/music/index.ts +120 -0
  130. package/packages/gen/src/music/library.ts +73 -0
  131. package/packages/gen/src/music/lyria.ts +52 -0
  132. package/packages/gen/src/music/types.ts +28 -0
  133. package/packages/gen/src/plan.ts +106 -0
  134. package/packages/gen/src/registry.ts +54 -0
  135. package/packages/gen/src/seam.ts +103 -0
  136. package/packages/gen/src/tts/dashscope.ts +64 -0
  137. package/packages/gen/src/tts/elevenlabs.ts +84 -0
  138. package/packages/gen/src/tts/gemini.ts +73 -0
  139. package/packages/gen/src/tts/index.ts +241 -0
  140. package/packages/gen/src/tts/local.ts +42 -0
  141. package/packages/gen/src/tts/types.ts +44 -0
  142. package/packages/gen/src/types.ts +90 -0
  143. package/packages/gen/src/video/fal.ts +140 -0
  144. package/packages/gen/src/video/h3.ts +112 -0
  145. package/packages/gen/src/video/http.ts +44 -0
  146. package/packages/gen/src/video/ltx.ts +60 -0
  147. package/packages/gen/src/video/minimax.ts +55 -0
  148. package/packages/gen/src/video/veo.ts +71 -0
  149. package/packages/jizura/package.json +16 -0
  150. package/packages/jizura/src/deny.ts +73 -0
  151. package/packages/jizura/src/index.ts +7 -0
  152. package/packages/jizura/src/install.ts +269 -0
  153. package/packages/jizura/src/layer.ts +325 -0
  154. package/packages/jizura/src/lyrics.ts +81 -0
  155. package/packages/jizura/src/pin.ts +8 -0
  156. package/packages/jizura/src/vendor.ts +140 -0
  157. package/packages/jizura/src/vite.ts +63 -0
  158. package/packages/jizura/vendor/JIZURA_LICENSE.txt +21 -0
  159. package/packages/jizura/vendor/NOTICE +43 -0
  160. package/packages/jizura/vendor/engine.json +47 -0
  161. package/packages/jizura/vendor/fonts/BlackHanSans-Regular.woff2 +0 -0
  162. package/packages/jizura/vendor/fonts/DotGothic16-Regular.woff2 +0 -0
  163. package/packages/jizura/vendor/fonts/GowunBatang-Bold.woff2 +0 -0
  164. package/packages/jizura/vendor/fonts/IBMPlexMono-Medium.ttf +0 -0
  165. package/packages/jizura/vendor/fonts/IBMPlexMono-SemiBold.ttf +0 -0
  166. package/packages/jizura/vendor/fonts/NotoSansKR-VF.woff2 +0 -0
  167. package/packages/jizura/vendor/fonts/NotoSerifKR-VF.woff2 +0 -0
  168. package/packages/jizura/vendor/fonts/OFL-blackhansans.txt +93 -0
  169. package/packages/jizura/vendor/fonts/OFL-dotgothic16.txt +93 -0
  170. package/packages/jizura/vendor/fonts/OFL-gowunbatang.txt +94 -0
  171. package/packages/jizura/vendor/fonts/OFL-ibmplexmono.txt +93 -0
  172. package/packages/jizura/vendor/fonts/OFL-notosanskr.txt +93 -0
  173. package/packages/jizura/vendor/fonts/OFL-notoserifkr.txt +94 -0
  174. package/packages/jizura/vendor/fonts/fonts.json +52 -0
  175. package/packages/jizura/vendor/jizura_engine.js +35024 -0
  176. package/packages/motion/README.md +153 -0
  177. package/packages/motion/package.json +30 -0
  178. package/packages/motion/src/camera.ts +97 -0
  179. package/packages/motion/src/captions.ts +487 -0
  180. package/packages/motion/src/enter.ts +128 -0
  181. package/packages/motion/src/hangul.ts +129 -0
  182. package/packages/motion/src/impact.ts +100 -0
  183. package/packages/motion/src/index.ts +17 -0
  184. package/packages/motion/src/moves/brushWipe.ts +103 -0
  185. package/packages/motion/src/moves/cloneArray.ts +111 -0
  186. package/packages/motion/src/moves/curtains.ts +81 -0
  187. package/packages/motion/src/moves/dress.ts +191 -0
  188. package/packages/motion/src/moves/echoStack.ts +70 -0
  189. package/packages/motion/src/moves/fit.ts +70 -0
  190. package/packages/motion/src/moves/flood.ts +61 -0
  191. package/packages/motion/src/moves/ghostStack.ts +88 -0
  192. package/packages/motion/src/moves/gridFloor.ts +100 -0
  193. package/packages/motion/src/moves/imageSwarm.ts +113 -0
  194. package/packages/motion/src/moves/index.ts +38 -0
  195. package/packages/motion/src/moves/irisBlades.ts +113 -0
  196. package/packages/motion/src/moves/karaokeLine.ts +108 -0
  197. package/packages/motion/src/moves/ledBoard.ts +94 -0
  198. package/packages/motion/src/moves/liquidTab.ts +72 -0
  199. package/packages/motion/src/moves/markerWrite.ts +63 -0
  200. package/packages/motion/src/moves/menu.ts +138 -0
  201. package/packages/motion/src/moves/morphBox.ts +96 -0
  202. package/packages/motion/src/moves/neonSign.ts +78 -0
  203. package/packages/motion/src/moves/panelPop.ts +78 -0
  204. package/packages/motion/src/moves/paperTear.ts +75 -0
  205. package/packages/motion/src/moves/path.ts +64 -0
  206. package/packages/motion/src/moves/pathText.ts +107 -0
  207. package/packages/motion/src/moves/pointSphere.ts +109 -0
  208. package/packages/motion/src/moves/ransomLetters.ts +73 -0
  209. package/packages/motion/src/moves/shapeMorph.ts +143 -0
  210. package/packages/motion/src/moves/slamWords.ts +96 -0
  211. package/packages/motion/src/moves/sparkTrail.ts +130 -0
  212. package/packages/motion/src/moves/speedLines.ts +91 -0
  213. package/packages/motion/src/moves/splitFlap.ts +149 -0
  214. package/packages/motion/src/moves/stepWords.ts +128 -0
  215. package/packages/motion/src/moves/strikeOut.ts +98 -0
  216. package/packages/motion/src/moves/sunburst.ts +58 -0
  217. package/packages/motion/src/moves/tickerRows.ts +91 -0
  218. package/packages/motion/src/moves/tokenPicker.ts +115 -0
  219. package/packages/motion/src/moves/truchet.ts +85 -0
  220. package/packages/motion/src/moves/wordWall.ts +78 -0
  221. package/packages/motion/src/moves/worldRoll.ts +32 -0
  222. package/packages/motion/src/particles.ts +102 -0
  223. package/packages/motion/src/react/index.tsx +21 -0
  224. package/packages/motion/src/react/parts.tsx +431 -0
  225. package/packages/motion/src/react/time.tsx +97 -0
  226. package/packages/motion/src/text.ts +103 -0
  227. package/packages/motion/src/transition.ts +82 -0
  228. package/packages/motion/src/transition3d/cards.ts +65 -0
  229. package/packages/motion/src/transition3d/chain.ts +84 -0
  230. package/packages/motion/src/transition3d/dive.ts +181 -0
  231. package/packages/motion/src/transition3d/fold.ts +110 -0
  232. package/packages/motion/src/transition3d/gl.ts +219 -0
  233. package/packages/motion/src/transition3d/index.ts +235 -0
  234. package/packages/motion/src/transition3d/live.ts +70 -0
  235. package/packages/motion/src/transition3d/portal.ts +115 -0
  236. package/packages/motion/src/transition3d/react.tsx +29 -0
  237. package/packages/motion/src/transition3d/rig.ts +600 -0
  238. package/packages/motion/src/transition3d/shatter.ts +104 -0
  239. package/packages/motion/src/transition3d/space.ts +173 -0
  240. package/packages/motion/src/transition3d/whip.ts +78 -0
  241. package/packages/motion/src/transition3d/world.ts +737 -0
  242. package/packages/motion/src/transition3d/zoomOut.ts +114 -0
  243. package/packages/motion/src/transitions2d/catalog.ts +127 -0
  244. package/packages/motion/src/transitions2d/css.d.ts +2 -0
  245. package/packages/motion/src/transitions2d/cult-ui/LICENSE.md +9 -0
  246. package/packages/motion/src/transitions2d/cult-ui/RollingNumber.tsx +43 -0
  247. package/packages/motion/src/transitions2d/gl-transitions/LICENSE +25 -0
  248. package/packages/motion/src/transitions2d/gl-transitions/shaders.ts +1931 -0
  249. package/packages/motion/src/transitions2d/index.ts +2 -0
  250. package/packages/motion/src/transitions2d/kokonutui/LICENSE +21 -0
  251. package/packages/motion/src/transitions2d/kokonutui/MatrixText.css +16 -0
  252. package/packages/motion/src/transitions2d/kokonutui/MatrixText.tsx +94 -0
  253. package/packages/motion/src/transitions2d/magicui/HyperText.css +15 -0
  254. package/packages/motion/src/transitions2d/magicui/HyperText.tsx +115 -0
  255. package/packages/motion/src/transitions2d/magicui/LICENSE.md +21 -0
  256. package/packages/motion/src/transitions2d/magicui/MorphingText.css +25 -0
  257. package/packages/motion/src/transitions2d/magicui/MorphingText.tsx +130 -0
  258. package/packages/motion/src/transitions2d/magicui/WordRotate.tsx +42 -0
  259. package/packages/motion/src/transitions2d/react.ts +13 -0
  260. package/packages/motion/src/transitions2d/skiper-ui/ClipDiv.css +39 -0
  261. package/packages/motion/src/transitions2d/skiper-ui/ClipDiv.tsx +32 -0
  262. package/packages/motion/src/transitions2d/smoothui/LICENSE +21 -0
  263. package/packages/motion/src/transitions2d/smoothui/SharedAxisY.tsx +50 -0
  264. package/packages/motion/src/transitions2d/smoothui/TextMorph.tsx +90 -0
  265. package/packages/motion/src/transitions2d/smoothui/shaders.ts +223 -0
  266. package/packages/motion/src/transitions2d/unlumen/LICENSE +21 -0
  267. package/packages/motion/src/transitions2d/unlumen/ScrambleText.tsx +114 -0
  268. package/packages/motion/src/transitions2d/vengeance-ui/LICENSE +21 -0
  269. package/packages/motion/src/transitions2d/vengeance-ui/MorphText.css +69 -0
  270. package/packages/motion/src/transitions2d/vengeance-ui/MorphText.tsx +45 -0
  271. package/packages/motion/src/type.ts +131 -0
  272. package/packages/motion/src/ui.ts +172 -0
  273. package/packages/patterns/package.json +15 -0
  274. package/packages/patterns/src/bars/rank.ts +119 -0
  275. package/packages/patterns/src/before-after/shrink.ts +127 -0
  276. package/packages/patterns/src/before-after/strike.ts +125 -0
  277. package/packages/patterns/src/code/terminal.ts +133 -0
  278. package/packages/patterns/src/compare/bars.ts +142 -0
  279. package/packages/patterns/src/compare/duel.ts +103 -0
  280. package/packages/patterns/src/end/lockup.ts +85 -0
  281. package/packages/patterns/src/end/slam.ts +91 -0
  282. package/packages/patterns/src/flow/graph.ts +250 -0
  283. package/packages/patterns/src/hook-number/counter.ts +101 -0
  284. package/packages/patterns/src/hook-number/roll.ts +179 -0
  285. package/packages/patterns/src/hook-number/slam.ts +91 -0
  286. package/packages/patterns/src/index.ts +38 -0
  287. package/packages/patterns/src/kit.ts +449 -0
  288. package/packages/patterns/src/limit/gauge.ts +117 -0
  289. package/packages/patterns/src/list/cards.ts +131 -0
  290. package/packages/patterns/src/list/cycle.ts +22 -0
  291. package/packages/patterns/src/media/panels.ts +100 -0
  292. package/packages/patterns/src/objects.ts +234 -0
  293. package/packages/patterns/src/quote/karaoke.ts +126 -0
  294. package/packages/patterns/src/quote/slam.ts +22 -0
  295. package/packages/patterns/src/screen/focus.ts +85 -0
  296. package/packages/patterns/src/steps/path.ts +137 -0
  297. package/packages/patterns/src/steps/stack.ts +111 -0
  298. package/packages/patterns/src/term-reveal/chips.ts +92 -0
  299. package/packages/patterns/src/term-reveal/expand.ts +127 -0
  300. package/packages/patterns/src/timeline/axis.ts +144 -0
  301. package/packages/patterns/src/title/mask.ts +85 -0
  302. package/packages/patterns/src/title/slam.ts +23 -0
  303. package/packages/patterns/src/toggle-sim/switch.ts +92 -0
  304. package/packages/patterns/src/trend/columns.ts +108 -0
  305. package/packages/patterns/src/trend/draw.ts +140 -0
  306. package/packages/patterns/src/types.ts +67 -0
  307. package/packages/patterns/src/words/moves.ts +42 -0
  308. package/packages/patterns/src/words/slam.ts +4 -0
  309. package/packages/plan/package.json +15 -0
  310. package/packages/plan/src/asks.ts +256 -0
  311. package/packages/plan/src/brief.ts +383 -0
  312. package/packages/plan/src/captions.ts +78 -0
  313. package/packages/plan/src/detect.ts +93 -0
  314. package/packages/plan/src/index.ts +27 -0
  315. package/packages/plan/src/layout.ts +176 -0
  316. package/packages/plan/src/llm.ts +172 -0
  317. package/packages/plan/src/look.ts +222 -0
  318. package/packages/plan/src/plan.ts +179 -0
  319. package/packages/plan/src/request.ts +55 -0
  320. package/packages/plan/src/series.ts +76 -0
  321. package/packages/plan/src/studio.ts +53 -0
  322. package/packages/plan/src/templates.ts +42 -0
  323. package/packages/plan/src/themes.ts +48 -0
  324. package/packages/plan/src/types.ts +157 -0
  325. package/packages/studio/package.json +12 -0
  326. package/packages/studio/src/index.ts +1 -0
  327. package/packages/studio/src/plugin.ts +236 -0
  328. package/packages/studio/src/ui/main.ts +503 -0
  329. package/packages/studio/src/ui/studio.css +165 -0
  330. package/packages/studio/src/ui/timeline.ts +317 -0
  331. package/packages/themes/kit/THEME-MAKE.md +68 -0
  332. package/packages/themes/kit/THEME.md +30 -0
  333. package/packages/themes/kit/briefs/og-intro-15s/brief.json +16 -0
  334. package/packages/themes/kit/briefs/og-intro-15s/facts.ts +29 -0
  335. package/packages/themes/kit/briefs/og-intro-15s/logo.svg +12 -0
  336. package/packages/themes/kit/effects.ts +5 -0
  337. package/packages/themes/kit/sample/index.html +11 -0
  338. package/packages/themes/kit/sample/main.ts +9 -0
  339. package/packages/themes/kit/sample/scenes/scene.ts +15 -0
  340. package/packages/themes/package.json +19 -0
  341. package/packages/themes/src/factory.ts +296 -0
  342. package/packages/themes/src/fx.ts +14 -0
  343. package/packages/themes/src/index.ts +114 -0
  344. package/packages/themes/src/slotkit.ts +79 -0
  345. package/packages/themes/src/slots.ts +46 -0
  346. package/packages/themes/src/stage3d.ts +197 -0
  347. package/packages/themes/src/types.ts +58 -0
  348. package/presets/kawaii-pastel.json +94 -0
  349. package/presets/neutral-dark.json +82 -0
  350. package/presets/og.json +98 -0
  351. package/series/og-shorts.json +14 -0
  352. package/skills/kasaframe/SKILL.md +33 -0
  353. package/templates/_shared/project/index.html +11 -0
  354. package/templates/_shared/project/lib/react.ts +22 -0
  355. package/templates/_shared/project/lib/stage.ts +292 -0
  356. package/templates/_shared/project/main.ts +9 -0
  357. package/templates/_shared/scenes/default.ts +21 -0
  358. package/templates/_shared/scenes/drop.ts +33 -0
  359. package/templates/_shared/scenes/end.ts +26 -0
  360. package/templates/_shared/scenes/hook.ts +18 -0
  361. package/templates/_shared/scenes/seam.ts +41 -0
  362. package/templates/_shared/scenes/step.ts +49 -0
  363. package/templates/ad/preview.png +0 -0
  364. package/templates/ad/template.json +151 -0
  365. package/templates/demo/preview.png +0 -0
  366. package/templates/demo/template.json +141 -0
  367. package/templates/explainer/preview.png +0 -0
  368. package/templates/explainer/template.json +193 -0
  369. package/templates/launch/preview.png +0 -0
  370. package/templates/launch/template.json +163 -0
  371. package/templates/mv/preview.png +0 -0
  372. package/templates/mv/scenes/default.ts +98 -0
  373. package/templates/mv/template.json +178 -0
  374. package/templates/promo/preview.png +0 -0
  375. package/templates/promo/template.json +185 -0
  376. package/templates/shorts/preview.png +0 -0
  377. package/templates/shorts/scenes/hook.ts +37 -0
  378. package/templates/shorts/template.json +196 -0
  379. package/templates/square/preview.png +0 -0
  380. package/templates/square/template.json +133 -0
  381. package/themes/debug-hud/THEME.md +39 -0
  382. package/themes/debug-hud/effects.ts +389 -0
  383. package/themes/debug-hud/sample/assets/og/logo.svg +12 -0
  384. package/themes/debug-hud/sample/beats.json +1 -0
  385. package/themes/debug-hud/sample/index.html +11 -0
  386. package/themes/debug-hud/sample/kf.json +59 -0
  387. package/themes/debug-hud/sample/lib/hudkit.ts +49 -0
  388. package/themes/debug-hud/sample/lib/og.ts +29 -0
  389. package/themes/debug-hud/sample/main.ts +9 -0
  390. package/themes/debug-hud/sample/scenes/end.ts +62 -0
  391. package/themes/debug-hud/sample/scenes/gather.ts +67 -0
  392. package/themes/debug-hud/sample/scenes/models.ts +70 -0
  393. package/themes/debug-hud/sample/scenes/price.ts +79 -0
  394. package/themes/debug-hud/sample/style.json +91 -0
  395. package/themes/debug-hud/slots.ts +99 -0
  396. package/themes/debug-hud/still.png +0 -0
  397. package/themes/debug-hud/style.json +91 -0
  398. package/themes/debug-hud/theme.json +68 -0
  399. package/themes/og-measure/THEME.md +47 -0
  400. package/themes/og-measure/effects.ts +432 -0
  401. package/themes/og-measure/sample/assets/brand/og-logo-full.svg +12 -0
  402. package/themes/og-measure/sample/assets/brand/og-logo.svg +12 -0
  403. package/themes/og-measure/sample/assets/data/measure.json +353 -0
  404. package/themes/og-measure/sample/beats.json +1 -0
  405. package/themes/og-measure/sample/index.html +11 -0
  406. package/themes/og-measure/sample/kf.json +66 -0
  407. package/themes/og-measure/sample/lib/data.ts +62 -0
  408. package/themes/og-measure/sample/main.ts +9 -0
  409. package/themes/og-measure/sample/measure.ts +78 -0
  410. package/themes/og-measure/sample/scenes/end.ts +47 -0
  411. package/themes/og-measure/sample/scenes/gather.ts +51 -0
  412. package/themes/og-measure/sample/scenes/models.ts +34 -0
  413. package/themes/og-measure/sample/scenes/one.ts +39 -0
  414. package/themes/og-measure/sample/scenes/price.ts +56 -0
  415. package/themes/og-measure/sample/style.json +97 -0
  416. package/themes/og-measure/slots.ts +88 -0
  417. package/themes/og-measure/still.png +0 -0
  418. package/themes/og-measure/style.json +97 -0
  419. package/themes/og-measure/theme.json +79 -0
  420. package/themes/riso-zine/THEME.md +43 -0
  421. package/themes/riso-zine/effects.ts +321 -0
  422. package/themes/riso-zine/sample/assets/og/logo.svg +12 -0
  423. package/themes/riso-zine/sample/beats.json +1 -0
  424. package/themes/riso-zine/sample/index.html +11 -0
  425. package/themes/riso-zine/sample/kf.json +59 -0
  426. package/themes/riso-zine/sample/lib/og.ts +29 -0
  427. package/themes/riso-zine/sample/lib/shot.ts +86 -0
  428. package/themes/riso-zine/sample/lib/zine.ts +42 -0
  429. package/themes/riso-zine/sample/main.ts +9 -0
  430. package/themes/riso-zine/sample/scenes/end.ts +61 -0
  431. package/themes/riso-zine/sample/scenes/gather.ts +62 -0
  432. package/themes/riso-zine/sample/scenes/models.ts +52 -0
  433. package/themes/riso-zine/sample/scenes/price.ts +82 -0
  434. package/themes/riso-zine/sample/style.json +99 -0
  435. package/themes/riso-zine/slots.ts +81 -0
  436. package/themes/riso-zine/still.png +0 -0
  437. package/themes/riso-zine/style.json +99 -0
  438. package/themes/riso-zine/theme.json +75 -0
  439. package/tools/beats/beats.py +372 -0
  440. package/tools/beats/requirements.txt +3 -0
  441. package/tools/lyrics/align.py +164 -0
  442. package/tools/lyrics/requirements.txt +9 -0
@@ -0,0 +1,197 @@
1
+ import type { SceneCtx } from "@kasaframe/core";
2
+ import * as THREE from "three";
3
+ import { RoomEnvironment } from "three/examples/jsm/environments/RoomEnvironment.js";
4
+
5
+ // 입체 테마가 같이 쓰는 바탕 — 렌더러 하나·한글 글자판·환경광. 테마의 효과(rig)는 이 위에 물체를 얹고 t 로 움직인다.
6
+
7
+ let shared: THREE.WebGLRenderer | null = null;
8
+
9
+ // 크롬은 한 페이지에 WebGL 문맥을 16 개쯤만 살려 둔다 — 장면이 여럿이어도 렌더러 하나를 돌려 쓰고, 그리는 장면으로 캔버스를 옮긴다
10
+ export function renderer3d(w: number, h: number): THREE.WebGLRenderer {
11
+ if (!shared) {
12
+ shared = new THREE.WebGLRenderer({ antialias: true, preserveDrawingBuffer: true, alpha: false, powerPreference: "high-performance" });
13
+ shared.setPixelRatio(1);
14
+ shared.outputColorSpace = THREE.SRGBColorSpace;
15
+ shared.toneMapping = THREE.ACESFilmicToneMapping;
16
+ shared.shadowMap.enabled = true;
17
+ shared.shadowMap.type = THREE.PCFSoftShadowMap;
18
+ shared.domElement.style.cssText = "position:absolute;inset:0;width:100%;height:100%;display:block";
19
+ }
20
+ const size = shared.getSize(new THREE.Vector2());
21
+ if (size.x !== w || size.y !== h) shared.setSize(w, h, false);
22
+ return shared;
23
+ }
24
+
25
+ let envTex: THREE.Texture | null = null;
26
+ /** 방 하나의 빛을 환경 맵으로 — 금속·유리가 비칠 것이 생긴다. 한 번만 굽는다 */
27
+ export function roomEnvironment(renderer: THREE.WebGLRenderer): THREE.Texture {
28
+ if (!envTex) {
29
+ const pmrem = new THREE.PMREMGenerator(renderer);
30
+ envTex = pmrem.fromScene(new RoomEnvironment(), 0.04).texture;
31
+ pmrem.dispose();
32
+ }
33
+ return envTex;
34
+ }
35
+
36
+ /** 3D 부품(rig) — 무대 위에 물체를 얹고 t 마다 움직인다. 같은 t 면 같은 자리 */
37
+ export type Rig = (t: number) => void;
38
+
39
+ export interface Stage3D {
40
+ scene: THREE.Scene;
41
+ camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
42
+ renderer: THREE.WebGLRenderer;
43
+ /** 무대가 박힌 DOM 자리(장면 루트 안) — 겹칠 DOM 은 여기 형제로 */
44
+ el: HTMLElement;
45
+ /** rig 를 등록 — paint(t) 가 카메라를 놓은 뒤 차례로 부른다 */
46
+ add(rig: Rig): void;
47
+ /** rig 를 다 부르고 그린다 */
48
+ paint(t: number): void;
49
+ }
50
+
51
+ export interface StageOpts {
52
+ ctx: SceneCtx;
53
+ camera?: "perspective" | "ortho";
54
+ fov?: number;
55
+ /** 정사영일 때 화면 세로에 담길 세계 단위 */
56
+ frustum?: number;
57
+ background?: string;
58
+ fog?: [near: number, far: number];
59
+ env?: boolean;
60
+ exposure?: number;
61
+ /** 카메라를 t 로 — 자리와 보는 곳 */
62
+ shot?(t: number, camera: THREE.Camera): void;
63
+ }
64
+
65
+ export function stage3d(root: HTMLElement, o: StageOpts): Stage3D {
66
+ const { ctx } = o;
67
+ const W = ctx.meta.width;
68
+ const H = ctx.meta.height;
69
+ const el = document.createElement("div");
70
+ el.style.cssText = "position:absolute;inset:0;";
71
+ root.append(el);
72
+ const renderer = renderer3d(W, H);
73
+ const scene = new THREE.Scene();
74
+ const bg = new THREE.Color(o.background ?? ctx.style.colors.bg);
75
+ scene.background = bg;
76
+ if (o.fog) scene.fog = new THREE.Fog(bg, o.fog[0], o.fog[1]);
77
+ if (o.env) scene.environment = roomEnvironment(renderer);
78
+ let camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
79
+ if (o.camera === "ortho") {
80
+ const f = o.frustum ?? 10;
81
+ const a = W / H;
82
+ camera = new THREE.OrthographicCamera((-f * a) / 2, (f * a) / 2, f / 2, -f / 2, 0.1, 400);
83
+ } else {
84
+ camera = new THREE.PerspectiveCamera(o.fov ?? 50, W / H, 0.1, 400);
85
+ }
86
+ const rigs: Rig[] = [];
87
+ return {
88
+ scene,
89
+ camera,
90
+ renderer,
91
+ el,
92
+ add: (rig) => rigs.push(rig),
93
+ paint(t) {
94
+ if (renderer.domElement.parentElement !== el) el.prepend(renderer.domElement);
95
+ renderer.toneMappingExposure = o.exposure ?? 1;
96
+ o.shot?.(t, camera);
97
+ for (const r of rigs) r(t);
98
+ renderer.render(scene, camera);
99
+ },
100
+ };
101
+ }
102
+
103
+ /**
104
+ * 서 있는 무대 — 처음 한 번만 그려 2D 캔버스로 옮겨 두고 그 뒤로는 다시 그리지 않는다.
105
+ * 움직이지 않는 3D 바탕(테마 슬롯 surface)을 프레임마다 SwiftShader 로 그릴 까닭이 없고, 렌더러 캔버스는 다른 무대가 가져가도 된다
106
+ */
107
+ export function stillStage(stage: Stage3D, paint: (t: number) => void = (t) => stage.paint(t)): (t: number) => void {
108
+ let done = false;
109
+ return () => {
110
+ if (done) return;
111
+ paint(0);
112
+ const src = stage.renderer.domElement;
113
+ const c = document.createElement("canvas");
114
+ c.width = src.width;
115
+ c.height = src.height;
116
+ c.style.cssText = src.style.cssText;
117
+ c.getContext("2d")!.drawImage(src, 0, 0);
118
+ src.replaceWith(c);
119
+ done = true;
120
+ };
121
+ }
122
+
123
+ export interface TextPlaneOpts {
124
+ text: string;
125
+ /** CSS font 단축 꼴의 앞부분 없이 글꼴 스택만 — 굵기·크기는 따로 */
126
+ family: string;
127
+ weight?: number;
128
+ color: string;
129
+ /** 세계 단위 높이(글 한 줄) */
130
+ height: number;
131
+ /** 캔버스에 그릴 글 크기 px — 클수록 가까이서도 또렷하다 */
132
+ px?: number;
133
+ align?: "left" | "center" | "right";
134
+ /** 바탕을 칠하면 판, 없으면 투명 */
135
+ plate?: string;
136
+ pad?: number;
137
+ emissive?: boolean;
138
+ }
139
+
140
+ /** 한글이 서는 글꼴로 캔버스에 그린 글을 판(평면 메시)으로. 장면 build 에서 만든다(글꼴을 다 받은 뒤라 치수가 맞다) */
141
+ export function textPlane(o: TextPlaneOpts): THREE.Mesh<THREE.PlaneGeometry, THREE.MeshBasicMaterial> {
142
+ const px = o.px ?? 160;
143
+ const pad = o.pad ?? px * 0.25;
144
+ const font = `${o.weight ?? 700} ${px}px ${o.family}`;
145
+ const probe = document.createElement("canvas").getContext("2d")!;
146
+ probe.font = font;
147
+ const w = Math.ceil(probe.measureText(o.text).width + pad * 2);
148
+ const h = Math.ceil(px * 1.3 + pad * 2);
149
+ const c = document.createElement("canvas");
150
+ c.width = w;
151
+ c.height = h;
152
+ const g = c.getContext("2d")!;
153
+ if (o.plate) {
154
+ g.fillStyle = o.plate;
155
+ g.fillRect(0, 0, w, h);
156
+ }
157
+ g.font = font;
158
+ g.fillStyle = o.color;
159
+ g.textBaseline = "middle";
160
+ g.textAlign = "left";
161
+ g.fillText(o.text, pad, h / 2);
162
+ const tex = new THREE.CanvasTexture(c);
163
+ tex.colorSpace = THREE.SRGBColorSpace;
164
+ tex.anisotropy = 4;
165
+ const worldH = (o.height * h) / (px * 1.3);
166
+ const worldW = (worldH * w) / h;
167
+ const geo = new THREE.PlaneGeometry(worldW, worldH);
168
+ if (o.align === "left") geo.translate(worldW / 2, 0, 0);
169
+ if (o.align === "right") geo.translate(-worldW / 2, 0, 0);
170
+ const mat = new THREE.MeshBasicMaterial({ map: tex, transparent: true, depthWrite: false, toneMapped: !o.emissive, side: THREE.DoubleSide });
171
+ return new THREE.Mesh(geo, mat);
172
+ }
173
+
174
+ /** 둥근 사각 테(관문) 모양 — OG 로고의 두 칸이 이 꼴이다 */
175
+ export function roundRectShape(w: number, h: number, r: number, hole = 0): THREE.Shape {
176
+ const s = new THREE.Shape();
177
+ const rr = (p: THREE.Path | THREE.Shape, x: number, y: number, ww: number, hh: number, rad: number) => {
178
+ p.moveTo(x + rad, y);
179
+ p.lineTo(x + ww - rad, y);
180
+ p.quadraticCurveTo(x + ww, y, x + ww, y + rad);
181
+ p.lineTo(x + ww, y + hh - rad);
182
+ p.quadraticCurveTo(x + ww, y + hh, x + ww - rad, y + hh);
183
+ p.lineTo(x + rad, y + hh);
184
+ p.quadraticCurveTo(x, y + hh, x, y + hh - rad);
185
+ p.lineTo(x, y + rad);
186
+ p.quadraticCurveTo(x, y, x + rad, y);
187
+ };
188
+ rr(s, -w / 2, -h / 2, w, h, r);
189
+ if (hole > 0) {
190
+ const p = new THREE.Path();
191
+ rr(p, -w / 2 + hole, -h / 2 + hole, w - hole * 2, h - hole * 2, Math.max(0.01, r - hole * 0.6));
192
+ s.holes.push(p);
193
+ }
194
+ return s;
195
+ }
196
+
197
+ export { THREE };
@@ -0,0 +1,58 @@
1
+ import type { KfStyle } from "@kasaframe/core";
2
+
3
+ /** draft 만드는 중 · review 견본이 나와 사람이 볼 차례 · approved 사람이 OK 해서 라이브러리에 정식으로 들어감 */
4
+ export type ThemeStatus = "draft" | "review" | "approved";
5
+
6
+ export const THEME_STATUSES: readonly ThemeStatus[] = ["draft", "review", "approved"];
7
+
8
+ export interface ThemeEffectInfo {
9
+ /** effects.ts 의 이름 있는 내보내기와 같다 */
10
+ name: string;
11
+ /** value: (t, opts) => Style·수·글 · layer: (el, opts) => (t) => void · rig: (stage, opts) => (t) => void(3D 무대에 물체를 얹는다) — 모두 같은 t 면 같은 화면 */
12
+ kind: "value" | "layer" | "rig";
13
+ /** 무엇을 하나 — 한 줄 */
14
+ does: string;
15
+ /** 부르는 꼴 한 줄(모델이 그대로 베낀다) */
16
+ use: string;
17
+ }
18
+
19
+ /** themes/<id>/theme.json */
20
+ export interface ThemeManifest {
21
+ id: string;
22
+ name: string;
23
+ /** 내용에서 나온 비유 한 줄 — 「무엇이 무엇처럼 되며 화면이 찍힌다」 */
24
+ metaphor: string;
25
+ status: ThemeStatus;
26
+ /** approved 로 바꾼 날(ISO). 그 전엔 null */
27
+ approvedAt: string | null;
28
+ /** 어울리는 용도 — templates/<id> */
29
+ purposes: string[];
30
+ /** 견본이 서는 화면비. 앞이 견본의 화면비 */
31
+ aspect: string[];
32
+ effects: ThemeEffectInfo[];
33
+ /** 테마 폴더 기준 파일 이름. 기본 still.png · sample.mp4 */
34
+ still?: string;
35
+ sample?: string;
36
+ }
37
+
38
+ export interface Theme extends ThemeManifest {
39
+ dir: string;
40
+ style: KfStyle;
41
+ /** THEME.md 원문 — 비유·맞는 내용·금지 */
42
+ guide: string;
43
+ /** 절대 경로. 파일이 아직 없으면 null */
44
+ files: { still: string | null; sample: string | null; sampleProject: string | null; effects: string };
45
+ }
46
+
47
+ /** 작업실·plan 이 목록에 쓰는 꼴. still·sample 은 절대 경로(없으면 null) */
48
+ export interface ThemeCard {
49
+ id: string;
50
+ name: string;
51
+ metaphor: string;
52
+ status: ThemeStatus;
53
+ approvedAt: string | null;
54
+ still: string | null;
55
+ sample: string | null;
56
+ purposes: string[];
57
+ aspect: string[];
58
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "kawaii-pastel",
3
+ "label": "카와이 파스텔 — 퓨처베이스",
4
+ "scheme": "light",
5
+ "colors": {
6
+ "bg": "#FFF6FB",
7
+ "surface": "#FFFFFF",
8
+ "raised": "#FDE8F3",
9
+ "line": "#F6CFE4",
10
+ "ink": "#4A2B4F",
11
+ "inkSoft": "#6B4A70",
12
+ "dim": "#7E5F84",
13
+ "accent": "#FF7EB6",
14
+ "accentSoft": "#FFD1E6",
15
+ "accentText": "#C2387A",
16
+ "onAccent": "#4A2B4F",
17
+ "mint": "#7FD8C3",
18
+ "lavender": "#B9A7FF",
19
+ "sky": "#8FD3FF",
20
+ "lemon": "#FFE48A",
21
+ "peach": "#FFB59E",
22
+ "success": "#3CBF9A",
23
+ "danger": "#E5537A",
24
+ "warning": "#F2A93B"
25
+ },
26
+ "fonts": {
27
+ "sans": "\"Pretendard Variable\", Pretendard, \"Noto Sans KR\", \"Apple SD Gothic Neo\", sans-serif",
28
+ "display": "\"Jua\", \"Pretendard Variable\", \"Noto Sans KR\", \"Apple SD Gothic Neo\", sans-serif",
29
+ "mono": "\"JetBrains Mono\", ui-monospace, \"Pretendard Variable\", \"Noto Sans KR\", \"Apple SD Gothic Neo\", monospace",
30
+ "faces": [
31
+ {
32
+ "family": "Pretendard Variable",
33
+ "src": "https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/variable/woff2/PretendardVariable.woff2",
34
+ "weight": "45 920"
35
+ },
36
+ {
37
+ "family": "JetBrains Mono",
38
+ "src": "https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5/files/jetbrains-mono-latin-wght-normal.woff2",
39
+ "weight": "100 800"
40
+ },
41
+ {
42
+ "family": "Jua",
43
+ "src": "https://cdn.jsdelivr.net/gh/google/fonts@main/ofl/jua/Jua-Regular.ttf",
44
+ "weight": "400"
45
+ }
46
+ ]
47
+ },
48
+ "type": {
49
+ "hero": 136,
50
+ "title": 80,
51
+ "body": 40,
52
+ "caption": 32,
53
+ "weightDisplay": 400,
54
+ "weightBody": 600,
55
+ "tracking": "-0.01em"
56
+ },
57
+ "radius": {
58
+ "sm": 16,
59
+ "md": 28,
60
+ "lg": 44,
61
+ "pill": 999
62
+ },
63
+ "shadow": {
64
+ "soft": "0 10px 30px rgba(255, 126, 182, 0.22)",
65
+ "lift": "0 6px 0 rgba(74, 43, 79, 0.12)"
66
+ },
67
+ "motion": {
68
+ "beatPulse": "drops-only",
69
+ "shake": {
70
+ "on": [
71
+ "drop"
72
+ ],
73
+ "maxPerPhrase": 1,
74
+ "maxPx": 10
75
+ },
76
+ "cameraMove": "once-per-phrase",
77
+ "repeatSameMove": false,
78
+ "maxFreezeSec": 0.5,
79
+ "enter": "pop",
80
+ "ease": "outBack",
81
+ "durations": {
82
+ "fast": 0.18,
83
+ "base": 0.36,
84
+ "slow": 0.7
85
+ }
86
+ },
87
+ "notes": [
88
+ "퓨처베이스 곡에 맞춘 밝은 파스텔. 분홍 강조 + 민트·라벤더·하늘·레몬을 보조로 한두 개만.",
89
+ "제목은 Jua(구글 폰트, OFL) — 굵기 한 벌뿐이라 weightDisplay 400. 본문은 Pretendard 600. 글꼴은 한 파일로 받는다(구글 CSS 의 unicode-range 조각은 안 쓴 글자 조각을 늦게 받아 font-display:block 동안 글이 투명하게 찍힌다).",
90
+ "accent 분홍은 바탕 위 글자로 2.2:1 — 글자는 accentText, 분홍은 면·반짝이·도형에.",
91
+ "등장은 pop + outBack 으로 통통 튀게. 그래도 박 펄스는 드롭에서만, 흔들림은 드롭에 한 번.",
92
+ "반짝이·파티클은 시드 고정(rand)으로 — 탭 나눠 찍어도 같은 자리."
93
+ ]
94
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "neutral-dark",
3
+ "label": "뉴트럴 다크",
4
+ "scheme": "dark",
5
+ "colors": {
6
+ "bg": "#0E0F12",
7
+ "surface": "#16181D",
8
+ "raised": "#1E2128",
9
+ "line": "#2C3038",
10
+ "ink": "#F2F3F5",
11
+ "inkSoft": "#C9CCD3",
12
+ "dim": "#8B909A",
13
+ "accent": "#8AB4FF",
14
+ "accentSoft": "rgba(138, 180, 255, 0.24)",
15
+ "accentText": "#8AB4FF",
16
+ "onAccent": "#0E0F12",
17
+ "success": "#4ADE80",
18
+ "danger": "#F87171",
19
+ "warning": "#FBBF24"
20
+ },
21
+ "fonts": {
22
+ "sans": "\"Pretendard Variable\", Pretendard, \"Noto Sans KR\", \"Apple SD Gothic Neo\", sans-serif",
23
+ "display": "\"Pretendard Variable\", Pretendard, \"Noto Sans KR\", \"Apple SD Gothic Neo\", sans-serif",
24
+ "mono": "\"Geist Mono\", ui-monospace, \"Pretendard Variable\", \"Noto Sans KR\", \"Apple SD Gothic Neo\", monospace",
25
+ "faces": [
26
+ {
27
+ "family": "Pretendard Variable",
28
+ "src": "https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/variable/woff2/PretendardVariable.woff2",
29
+ "weight": "45 920"
30
+ },
31
+ {
32
+ "family": "Geist Mono",
33
+ "src": "https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Variable.woff2",
34
+ "weight": "100 900"
35
+ }
36
+ ]
37
+ },
38
+ "type": {
39
+ "hero": 124,
40
+ "title": 72,
41
+ "body": 38,
42
+ "caption": 30,
43
+ "weightDisplay": 720,
44
+ "weightBody": 450,
45
+ "tracking": "-0.025em"
46
+ },
47
+ "radius": {
48
+ "sm": 10,
49
+ "md": 16,
50
+ "lg": 24,
51
+ "pill": 999
52
+ },
53
+ "shadow": {
54
+ "soft": "0 12px 32px rgba(0, 0, 0, 0.45)",
55
+ "lift": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 40px rgba(0, 0, 0, 0.55)"
56
+ },
57
+ "motion": {
58
+ "beatPulse": "drops-only",
59
+ "shake": {
60
+ "on": [
61
+ "drop"
62
+ ],
63
+ "maxPerPhrase": 1,
64
+ "maxPx": 10
65
+ },
66
+ "cameraMove": "once-per-phrase",
67
+ "repeatSameMove": false,
68
+ "maxFreezeSec": 0.5,
69
+ "enter": "rise",
70
+ "ease": "snappy",
71
+ "durations": {
72
+ "fast": 0.15,
73
+ "base": 0.3,
74
+ "slow": 0.6
75
+ }
76
+ },
77
+ "notes": [
78
+ "어디에나 무난한 어두운 판. 무채색 면 세 층 + 차가운 파랑 강조 하나.",
79
+ "글은 ink·inkSoft 로, dim 은 보조 한 줄에만(5.9:1).",
80
+ "브랜드가 정해지지 않은 설명·시연 영상의 기본값."
81
+ ]
82
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "name": "og",
3
+ "label": "OpenGateway — 브랜드 파랑 한 색",
4
+ "scheme": "light",
5
+ "colors": {
6
+ "bg": "#FFFFFF",
7
+ "surface": "#F8FAFC",
8
+ "raised": "#F1F5F9",
9
+ "line": "#E2E8F0",
10
+ "ink": "#020817",
11
+ "inkSoft": "#1E293B",
12
+ "dim": "#64748B",
13
+ "accent": "#006FD6",
14
+ "accentSoft": "rgba(0, 111, 214, 0.45)",
15
+ "accentText": "#01509D",
16
+ "onAccent": "#FFFFFF",
17
+ "tint": "rgba(0, 111, 214, 0.08)",
18
+ "success": "#22C55E",
19
+ "danger": "#EF4444",
20
+ "warning": "#F59E0B",
21
+ "darkBg": "#090A0C",
22
+ "darkSurface": "#13151B",
23
+ "darkLine": "#39404F",
24
+ "darkInk": "#C6CAD6",
25
+ "darkAccent": "#0085FF"
26
+ },
27
+ "fonts": {
28
+ "sans": "\"Pretendard Variable\", Pretendard, \"Noto Sans KR\", \"Apple SD Gothic Neo\", sans-serif",
29
+ "display": "\"Geist\", \"Pretendard Variable\", \"Noto Sans KR\", \"Apple SD Gothic Neo\", sans-serif",
30
+ "mono": "\"Geist Mono\", ui-monospace, \"Pretendard Variable\", \"Noto Sans KR\", \"Apple SD Gothic Neo\", monospace",
31
+ "faces": [
32
+ {
33
+ "family": "Pretendard Variable",
34
+ "src": "https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/variable/woff2/PretendardVariable.woff2",
35
+ "weight": "45 920"
36
+ },
37
+ {
38
+ "family": "Geist",
39
+ "src": "https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Variable.woff2",
40
+ "weight": "100 900"
41
+ },
42
+ {
43
+ "family": "Geist Mono",
44
+ "src": "https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Variable.woff2",
45
+ "weight": "100 900"
46
+ }
47
+ ]
48
+ },
49
+ "type": {
50
+ "hero": 132,
51
+ "title": 72,
52
+ "body": 38,
53
+ "caption": 30,
54
+ "weightDisplay": 800,
55
+ "weightBody": 500,
56
+ "tracking": "-0.055em"
57
+ },
58
+ "radius": {
59
+ "sm": 0,
60
+ "md": 12,
61
+ "lg": 12,
62
+ "pill": 999
63
+ },
64
+ "shadow": {
65
+ "soft": "none",
66
+ "lift": "none"
67
+ },
68
+ "motion": {
69
+ "beatPulse": "drops-only",
70
+ "shake": {
71
+ "on": [
72
+ "drop"
73
+ ],
74
+ "maxPerPhrase": 1,
75
+ "maxPx": 8
76
+ },
77
+ "cameraMove": "once-per-phrase",
78
+ "repeatSameMove": false,
79
+ "maxFreezeSec": 0.5,
80
+ "enter": "rise",
81
+ "ease": "snappy",
82
+ "durations": {
83
+ "fast": 0.15,
84
+ "base": 0.22,
85
+ "slow": 0.3
86
+ }
87
+ },
88
+ "notes": [
89
+ "출처: opengateway/cp-fe-og-styleguide/design.md + globals.css(:root 라이트), 쇼츠 mla-swa-remotion/src/mlahost/look.ts.",
90
+ "강조는 브랜드 파랑 하나, 빨강(danger)은 오류에만. 파랑 글자는 accentText(--on-primary).",
91
+ "면은 테두리 없이 색으로 가른다(bg 100% → surface 98% → raised 96%). 면 위에 border 를 겹쳐 그리지 않는다. 그림자 없음.",
92
+ "모서리는 세 칸뿐: 면 12px(md·lg), 그 밖 0(sm), 누르는 것 알약(pill). 영상엔 누르는 것이 거의 없다.",
93
+ "영문 대제목·큰 숫자는 Geist 800 자간 −0.055em(워드마크 결). Geist 에 한글이 없어 한글은 Pretendard 로 떨어진다 — 한글 제목은 700·자간 −0.045em·한 단계 작게.",
94
+ "코드·모델 ID·시각은 Geist Mono, 숫자는 tabular-nums.",
95
+ "움직임은 150/220/300ms 감속 곡선 + 6px 진입. 차트 선을 매번 다시 그리지 않는다.",
96
+ "다크 판이 필요하면 dark* 색(.dark 토큰)을 쓴다."
97
+ ]
98
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "og-shorts",
3
+ "label": "OG 쇼츠",
4
+ "summary": "OpenGateway 기술 쇼츠 — 측정 테마·차분한 남성 내레이션·깊은 앰비언트 곡·화면 자막, 45–60초, 끝 카드 OpenGateway",
5
+ "match": ["OG 쇼츠", "OG 숏츠", "OG 숏폼", "OG shorts", "오픈게이트웨이 쇼츠", "OpenGateway 쇼츠", "OpenGateway shorts"],
6
+ "purpose": "shorts",
7
+ "theme": "og-measure",
8
+ "voice": "gemini:Charon",
9
+ "music": { "mood": "deep" },
10
+ "captions": "on",
11
+ "duration": { "min": 45, "max": 60, "default": 45 },
12
+ "end": { "title": "OpenGateway", "line": "opengateway.ai" },
13
+ "answers": { "image": "og-gpt-image-2.5-sunburst", "video": "none" }
14
+ }
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: kasaframe
3
+ description: 영상을 만들 때 쓴다 — 홍보 영상·쇼츠·릴스·설명 영상·제품 공개·시연·광고·피드·뮤직비디오·모션그래픽·카운트다운·로고 애니메이션. 말로만 해도(「카사텀 홍보 영상 1분, 리소 느낌으로」) kasaframe 이 용도·테마·곡을 알아서 고르고 장면 지시서를 낸다. 영상 만드는 길은 이것 하나다. 한국어 트리거: 영상 만들어, 쇼츠 만들어, 홍보 영상, 뮤비, 모션그래픽, 설명 영상, 시연 영상, 광고 영상. English: make a video, promo video, shorts, music video, motion graphics, explainer.
4
+ version: 0.1.0
5
+ user-invocable: true
6
+ argument-hint: "[만들 영상 한 줄]"
7
+ ---
8
+
9
+ # kasaframe — 말 한 줄로 영상까지
10
+
11
+ 명령은 `kf <명령>` — `npm i -g kasaframe` 로 깔았으면 어느 폴더에서나. `kf` 가 PATH 에 없고 이 스킬 폴더가 레포 안의 링크면(실제 경로의 두 단계 위가 레포 뿌리) 그 뿌리에서 `npx kf <명령>`. 둘 다 아니면 사람에게 `npm i -g kasaframe && kf setup` 을 알린다. 처음이면 `kf doctor` 로 ffmpeg·크롬·librosa·OG 키를 본다.
12
+ 규칙·장면 쓰는 법·고치는 법의 정본은 **`docs/AGENTS.md`**(이 스킬 폴더 `kf skill path` 의 두 단계 위) — 장면을 쓰기 전에 0절과 3절을 읽는다.
13
+
14
+ ## 순서
15
+
16
+ 1. **요청을 그대로 넘긴다** — 묻지 말고 시작한다.
17
+ ```
18
+ kf make "<사람이 한 말 그대로>"
19
+ ```
20
+ 결과 폴더는 지금 폴더 아래 생긴다(`--out` 으로 바꾼다). 시리즈(「OG 쇼츠」처럼 `kf series list` 의 묶음을 짚으면 그 묶음이 다 정한다)·용도(홍보·쇼츠·설명·공개·시연·광고·피드·뮤비)·테마(「~ 느낌·풍」으로 짚으면 그 테마, 아니면 맨 위 질문으로 묻는다 — 답 전엔 내용에 맞는 승인 테마로 깔린다)·곡(`--music`, 없으면 곡 모음 `KF_MUSIC_DIR` 에서)을 알아서 고른다. **종료 코드 3** 이면 확신이 낮다는 뜻 — 찍힌 보기 중 맞는 것을 `--purpose` 로 다시(그래도 모르겠으면 그때 사람에게 묻는다).
21
+ 2. 찍힌 `<폴더>/MAKE.md`(장면 지시서 — 용도별 규칙·장면별 시각·할 일·박·테마 효과·만들 그림·주인공 3D 장면)를 읽는다. **맨 위에 「사용자에게 먼저 물을 것」이 있으면** 장면을 쓰기 전에 AskUserQuestion 한 번으로 묻고(적힌 header·보기 그대로, 첫째가 권장) 답을 `kf make --answer <폴더> --<플래그> <값> …` 로 넣는다 — 테마·목소리와 돈이 드는 생성·없는 능력이 올라온다(테마는 견본 그림 경로가 보기마다 붙는다 — 사람에게 보여 주고 묻는다). **없는 능력(「넣는 법·다른 엔진·빼기」 보기)은 네가 대신 고르지 말고 꼭 사람에게** 묻는다. `kf make` 가 종료 코드 3 으로 보기를 찍고 멈추면(박자·가사 도구처럼 뼈대 전에 필요한 것) 그 보기를 그대로 물어 플래그로 다시 부른다. **쇼츠·설명은 내레이션 먼저** — 지시서의 「내레이션 먼저」대로 `captions.json` 에 장면별 문장을 쓰고 `kf narrate <폴더>` 로 장면 길이를 목소리에 맞춘 뒤(곡이 있으면 박에) 장면을 쓴다. 그다음 고른 공급자로 그림(`kf gen img`)·3D 샷(`kf blender`)·영상 컷(`kf gen vid`)을 만들고 `scenes/*.ts` 를 채운다. 무대 `lib/stage.ts` 를 겉에 씌우면 「0.1초도 쉬지 않기·같은 구도 오래 두지 않기(용도별 기준)·화면 채우기」가 처음부터 선다.
22
+ 3. `kf look <폴더>` 가 찍는 장면 모음을 Read 로 직접 보고 장면별 확인표(`out/look.md`)대로 고친다. **그림이 안 보이면**(OG 로 붙인 모델 등)만 `kf look <폴더> --vision-model google/gemini-3.5-flash` — 그림 보는 모델이 장면마다 글로 알려 준다.
23
+ 4. `kf make --finish <폴더>` — 렌더·검사·표지·자막. 검사 오류가 0 이 될 때까지 장면을 고쳐 다시(렌더는 고칠 것을 모아 한 번에 — 한 기계에서 하나씩 돈다).
24
+ 5. 결과 `out/video.mp4`·`out/cover.png` 를 사람이 보는 공유 폴더에 넣어 보여 준다.
25
+
26
+ 작업실(`kf app`, :5150)이 떠 있으면 `kf make` 가 거기에 등록하고 주소를 찍는다 — 사람은 페이지에서 실시간 미리보기·지난 작업을 본다.
27
+
28
+ ## 하지 않는 것
29
+
30
+ - 돈이 드는 그림·영상 생성을 묻기 전에 부르지 않는다 — 사람이 고른 답(또는 `--yes`·`--allow`)이 있을 때만. 「만들 그림」은 받은 자산·실제 화면·도형으로 안 될 때만 구체적인 프롬프트로.
31
+ - 지역 제한이 걸린 공급자(사내 H3)를 회사·바깥 결과물에 쓰지 않는다 — 보기의 경고를 그대로 사람에게 보인다.
32
+ - 슬로건·감성 카피를 화면에 쓰지 않는다(홍보 틀). 이모지 금지.
33
+ - 렌더·검사를 잠금 없이 여러 개 동시에 돌리지 않는다.
@@ -0,0 +1,11 @@
1
+ <!doctype html>
2
+ <html lang="ko">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>{{title}}</title>
6
+ </head>
7
+ <body>
8
+ <div id="stage"></div>
9
+ <script type="module" src="./main.ts"></script>
10
+ </body>
11
+ </html>
@@ -0,0 +1,22 @@
1
+ import { createElement, type ComponentType } from "react";
2
+ import { flushSync } from "react-dom";
3
+ import { createRoot, type Root } from "react-dom/client";
4
+
5
+ // 이미 있는 React 컴포넌트(geono-hub bits 같은)를 고치지 않고 장면에 얹는다.
6
+ // build 에서 바로 붙이면 장면이 숨어 있는 동안(앞 장면 차례) 등장 애니메이션이 다 끝나 버린다 — 장면이 처음 그려질 때 붙인다.
7
+ // 자기 시계(rAF·motion 스프링·타이머)로 도는 컴포넌트면 kf.json 에 "mode": "step"(0 초부터 차례로 돈다).
8
+ // 컴포넌트가 따로 쓰는 npm 패키지는 프로젝트 폴더에 package.json 을 두고 `npm i <패키지> --legacy-peer-deps` —
9
+ // react·react-dom 은 레포 것 한 벌로 묶이니 프로젝트에 또 깔지 않는다(두 벌이면 훅이 깨진다).
10
+ //
11
+ // const crowd = bit(host, CrowdCanvas);
12
+ // return (t) => { crowd({ count: 12 }, "once"); ... } // key 가 같으면 다시 그리지 않는다
13
+ export function bit<P extends object>(host: HTMLElement, Comp: ComponentType<P>): (props: P, key?: string) => void {
14
+ let root: Root | null = null;
15
+ let last: string | undefined;
16
+ return (props, key = JSON.stringify(props)) => {
17
+ root ??= createRoot(host);
18
+ if (key === last) return;
19
+ last = key;
20
+ flushSync(() => root!.render(createElement(Comp, props)));
21
+ };
22
+ }