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,51 @@
1
+ import { applyStyle, type SceneCtx } from "@kasaframe/core";
2
+ import { fx } from "@kasaframe/themes/fx";
3
+ import { OG, beatsOf, stageOf } from "../lib/data.ts";
4
+
5
+ const { graphPaper, flag, pickFly, callLine, trackCam } = fx("og-measure");
6
+
7
+ // 회사마다 흩어진 모델 — 모델 ID 접두와 개수가 박마다 화면 곳곳에 뜨고, 일곱째 박에 한 주소로 날아가 모인다.
8
+ const SPOTS = [
9
+ [150, 150],
10
+ [1160, 110],
11
+ [620, 320],
12
+ [1420, 360],
13
+ [200, 560],
14
+ [1240, 610],
15
+ [520, 770],
16
+ [1180, 860],
17
+ [150, 900],
18
+ ] as const;
19
+ const AT = [0, 0, 1, 2, 3, 3, 4, 4, 5];
20
+
21
+ export default {
22
+ build(root: HTMLElement, ctx: SceneCtx) {
23
+ const bg = graphPaper(root, { phase: ctx.from });
24
+ const stage = stageOf(root);
25
+ const b = beatsOf(ctx.beats);
26
+ const B = (i: number) => b[i] ?? i * 0.353;
27
+ const SIZE = 62;
28
+ const label = (i: number) => `${OG.owners[i][0]} ${OG.owners[i][1]}`;
29
+ // 첫 칩은 0초에 — 첫 박(0.29초)까지 화면이 멈춰 있지 않게
30
+ const chips = OG.owners.map((_, i) => flag(stage, { x: SPOTS[i][0], y: SPOTS[i][1], text: label(i), at: i === 0 ? 0 : B(AT[i]), until: B(6), tone: "soft", size: SIZE, mono: true }));
31
+ const width = (s: string) => s.length * SIZE * 0.6 + 40;
32
+ const fly = pickFly(stage, {
33
+ items: OG.owners.map((o, i) => ({ at: B(6), text: o[0], from: { x: SPOTS[i][0] + width(label(i)) / 2, y: SPOTS[i][1] + SIZE * 0.7 }, to: { x: 960, y: 540 } })),
34
+ dur: 0.3,
35
+ size: 52,
36
+ });
37
+ const card = callLine(stage, { x: 160, y: 430, w: 1600, at: B(6) + 0.2, size: 84, url: [OG.host, "/v1"], urlAt: [B(6) + 0.24, B(7)] });
38
+ const shots = [
39
+ { at: 0, x: 960, y: 540 },
40
+ { at: B(4), x: 920, y: 530, zoom: 1.04, kick: 0.04 },
41
+ { at: B(6), x: 960, y: 560, zoom: 1.0, kick: 0.07 },
42
+ ];
43
+ return (t: number) => {
44
+ bg(t);
45
+ for (const c of chips) c(t);
46
+ fly(t);
47
+ card(t);
48
+ applyStyle(stage, trackCam(t, { shots, scene: ctx.id }));
49
+ };
50
+ },
51
+ };
@@ -0,0 +1,34 @@
1
+ import { applyStyle, type SceneCtx } from "@kasaframe/core";
2
+ import { fx } from "@kasaframe/themes/fx";
3
+ import { OG, beatsOf, stageOf } from "../lib/data.ts";
4
+
5
+ const { graphPaper, callLine, rawLog, flag, trackCam } = fx("og-measure");
6
+
7
+ // 같은 주소로 가는 요청 줄 — 박마다 모델 ID 하나, 드롭 앞 마지막 마디는 반 박마다 하나씩 몰아 올린다. 결과는 붙이지 않는다(부르지 않은 호출).
8
+ export default {
9
+ build(root: HTMLElement, ctx: SceneCtx) {
10
+ const bg = graphPaper(root, { phase: ctx.from });
11
+ const stage = stageOf(root);
12
+ const b = beatsOf(ctx.beats);
13
+ const B = (i: number) => b[i] ?? i * 0.353;
14
+ const half = 60 / ctx.beats.bpm / 2;
15
+ const head = callLine(stage, { x: 90, y: 50, w: 1740, at: -1, size: 60, url: [OG.host, "/v1"], urlAt: [-1, -1] });
16
+ const lines = OG.requests.map(([path, model]) => `POST ${path.padEnd(24)} ${model}`);
17
+ const times = lines.map((_, i) => (i < 8 ? B(i) : B(8 + Math.floor((i - 8) / 2)) + ((i - 8) % 2) * half));
18
+ const log = rawLog(stage, { x: 90, y: 230, w: 1740, rows: 9, lines, times, pick: /([a-z-]+\/[\w.-]+)$/i, size: 40 });
19
+ const one = flag(stage, { x: 90, y: 920, text: "주소 1개", at: B(4), tone: "soft", size: 48 });
20
+ const shots = [
21
+ { at: 0, x: 960, y: 540, kick: 0.05 },
22
+ { at: B(4), x: 940, y: 530, zoom: 1.03, kick: 0.03 },
23
+ { at: B(8), x: 980, y: 550, zoom: 1.05, kick: 0.04 },
24
+ { at: B(10), x: 960, y: 540, zoom: 1.02, kick: 0.04 },
25
+ ];
26
+ return (t: number) => {
27
+ bg(t);
28
+ head(t);
29
+ log(t);
30
+ one(t);
31
+ applyStyle(stage, trackCam(t, { shots, scene: ctx.id }));
32
+ };
33
+ },
34
+ };
@@ -0,0 +1,39 @@
1
+ import { applyStyle, type SceneCtx } from "@kasaframe/core";
2
+ import { fx } from "@kasaframe/themes/fx";
3
+ import { OG, beatsOf, stageOf } from "../lib/data.ts";
4
+
5
+ const { graphPaper, meter, flag, trackCam } = fx("og-measure");
6
+
7
+ // 드롭: 102 가 앞자리부터 멈춰 서며 카메라가 크게 툭 → 박마다 주소 · OpenAI 형식 · Anthropic 형식.
8
+ export default {
9
+ build(root: HTMLElement, ctx: SceneCtx) {
10
+ const bg = graphPaper(root, { phase: ctx.from });
11
+ const stage = stageOf(root);
12
+ const b = beatsOf(ctx.beats);
13
+ const B = (i: number) => b[i] ?? i * 0.353;
14
+ const big = document.createElement("div");
15
+ big.style.cssText = "position:absolute;left:100px;top:110px;display:flex;align-items:baseline;gap:40px;font-family:var(--kf-font-display);font-weight:800;color:var(--kf-ink);font-variant-numeric:tabular-nums";
16
+ const num = document.createElement("span");
17
+ num.style.cssText = "font-size:430px;line-height:1.1;letter-spacing:-0.04em";
18
+ const unit = document.createElement("span");
19
+ unit.textContent = "모델";
20
+ unit.style.cssText = "font-family:var(--kf-font-sans);font-size:150px;font-weight:700;color:var(--kf-dim)";
21
+ big.append(num, unit);
22
+ stage.append(big);
23
+ const host = flag(stage, { x: 100, y: 660, text: `https://${OG.host}/v1`, at: B(1), tone: "plain", size: 80, mono: true });
24
+ const a = flag(stage, { x: 100, y: 840, text: "OpenAI 형식", at: B(2), size: 60 });
25
+ const c = flag(stage, { x: 560, y: 840, text: "Anthropic 형식", at: B(3), size: 60 });
26
+ const shots = [
27
+ { at: 0, x: 960, y: 540, kick: 0.16 },
28
+ { at: B(2), x: 950, y: 560, zoom: 1.02, kick: 0.03 },
29
+ ];
30
+ return (t: number) => {
31
+ bg(t);
32
+ num.textContent = meter(t, { to: OG.models, at: 0, dur: 0.5 });
33
+ host(t);
34
+ a(t);
35
+ c(t);
36
+ applyStyle(stage, trackCam(t, { shots, scene: ctx.id }));
37
+ };
38
+ },
39
+ };
@@ -0,0 +1,56 @@
1
+ import { applyStyle, type SceneCtx } from "@kasaframe/core";
2
+ import { fx } from "@kasaframe/themes/fx";
3
+ import { OG, beatsOf, stageOf } from "../lib/data.ts";
4
+
5
+ const { graphPaper, rankBars, flag, trackCam } = fx("og-measure");
6
+
7
+ // 시간대 가격 — 한국 00–10시 창에서 같은 모델 ID 가 정가의 10%. 박마다 막대 하나·차이 칩 하나.
8
+ export default {
9
+ build(root: HTMLElement, ctx: SceneCtx) {
10
+ const bg = graphPaper(root, { phase: ctx.from });
11
+ const stage = stageOf(root);
12
+ const b = beatsOf(ctx.beats);
13
+ const B = (i: number) => b[i] ?? i * 0.353;
14
+ const P = OG.price;
15
+ const off = (a: number, z: number) => `−${Math.round((1 - z / a) * 100)}%`;
16
+ const model = flag(stage, { x: 90, y: 50, text: P.model, at: 0, tone: "plain", size: 52, mono: true });
17
+ const win = flag(stage, { x: 1300, y: 56, text: "KST 00:00–10:00", at: B(1), tone: "soft", size: 46, mono: true });
18
+ const bars = rankBars(stage, {
19
+ x: 90,
20
+ y: 190,
21
+ w: 1740,
22
+ max: 1.3,
23
+ best: [1, 3],
24
+ prefix: "$",
25
+ unit: "/M",
26
+ decimals: 2,
27
+ barH: 70,
28
+ gap: 26,
29
+ size: 40,
30
+ items: [
31
+ { label: "출력 · 정가", value: P.output[0], at: B(2) },
32
+ { label: "출력 · 00–10시", value: P.output[1], at: B(3), delta: off(P.output[0], P.output[1]), deltaAt: B(4) },
33
+ { label: "입력 · 정가", value: P.input[0], at: B(5) },
34
+ { label: "입력 · 00–10시", value: P.input[1], at: B(6), delta: off(P.input[0], P.input[1]), deltaAt: B(7) },
35
+ ],
36
+ });
37
+ const glm = flag(stage, { x: 90, y: 840, text: `${P.glm} · 밤 −70%`, at: B(8), tone: "plain", size: 44, mono: true });
38
+ const auto = flag(stage, { x: 90, y: 950, text: "신청 없이 · 같은 모델 ID", at: B(9), tone: "soft", size: 44 });
39
+ const shots = [
40
+ { at: 0, x: 960, y: 540, kick: 0.05 },
41
+ { at: B(4), x: 940, y: 530, zoom: 1.03, kick: 0.03 },
42
+ { at: B(8), x: 980, y: 560, zoom: 1.03, kick: 0.03 },
43
+ { at: B(10), x: 960, y: 550, zoom: 1.0, kick: 0.04 },
44
+ { at: B(11), x: 960, y: 550, zoom: 1.02, kick: 0.04 },
45
+ ];
46
+ return (t: number) => {
47
+ bg(t);
48
+ model(t);
49
+ win(t);
50
+ bars(t);
51
+ glm(t);
52
+ auto(t);
53
+ applyStyle(stage, trackCam(t, { shots, scene: ctx.id }));
54
+ };
55
+ },
56
+ };
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "og-measure",
3
+ "label": "OG 측정 화면 — 재 온 숫자가 쌓이는 계측기",
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
+ "bar": "rgba(100, 116, 139, 0.28)"
27
+ },
28
+ "fonts": {
29
+ "sans": "\"Pretendard Variable\", Pretendard, \"Noto Sans KR\", \"Apple SD Gothic Neo\", sans-serif",
30
+ "display": "\"Geist\", \"Pretendard Variable\", \"Noto Sans KR\", \"Apple SD Gothic Neo\", sans-serif",
31
+ "mono": "\"Geist Mono\", ui-monospace, \"Pretendard Variable\", \"Noto Sans KR\", \"Apple SD Gothic Neo\", monospace",
32
+ "faces": [
33
+ {
34
+ "family": "Pretendard Variable",
35
+ "src": "https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/variable/woff2/PretendardVariable.woff2",
36
+ "weight": "45 920"
37
+ },
38
+ {
39
+ "family": "Geist",
40
+ "src": "https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Variable.woff2",
41
+ "weight": "100 900"
42
+ },
43
+ {
44
+ "family": "Geist Mono",
45
+ "src": "https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Variable.woff2",
46
+ "weight": "100 900"
47
+ }
48
+ ]
49
+ },
50
+ "type": {
51
+ "hero": 132,
52
+ "title": 72,
53
+ "body": 38,
54
+ "caption": 30,
55
+ "weightDisplay": 800,
56
+ "weightBody": 500,
57
+ "tracking": "-0.055em"
58
+ },
59
+ "radius": {
60
+ "sm": 0,
61
+ "md": 12,
62
+ "lg": 12,
63
+ "pill": 999
64
+ },
65
+ "shadow": {
66
+ "soft": "none",
67
+ "lift": "none"
68
+ },
69
+ "motion": {
70
+ "beatPulse": "drops-only",
71
+ "shake": {
72
+ "on": [
73
+ "drop"
74
+ ],
75
+ "maxPerPhrase": 1,
76
+ "maxPx": 8
77
+ },
78
+ "cameraMove": "free",
79
+ "repeatSameMove": false,
80
+ "maxFreezeSec": 0.1,
81
+ "enter": "rise",
82
+ "ease": "snappy",
83
+ "durations": {
84
+ "fast": 0.15,
85
+ "base": 0.22,
86
+ "slow": 0.3
87
+ }
88
+ },
89
+ "notes": [
90
+ "잉크 셋: 흰 종이(bg) · 거의 검정(ink #020817) · OG 파랑 하나(accent #006FD6). 회색 막대(bar)는 비교 대상, 파랑은 가장 좋은 값 하나에만. 빨강은 오류에만.",
91
+ "질감: 흰 모눈 종이 + 아주 옅은 파란 주사선. 면은 테두리 없이 색으로 가른다(surface 98% → raised 96%), 그림자 없음, 모서리는 면 12px·칩 알약뿐.",
92
+ "숫자·모델 ID·주소·로그는 Geist Mono + tabular-nums, 큰 숫자는 Geist 800 자간 −0.055em. 한글은 Pretendard 로 떨어진다(제목 700).",
93
+ "움직임 성격: 220ms 감속(snappy) + 6px 진입. 숫자는 지어내지 않고 들어온 시각에 보인다 — 점이 찍히고, 가운데값이 미끄러지고, 큰 숫자는 앞자리부터 멈춰 선다. 차트 선을 매번 다시 그리지 않는다.",
94
+ "출처: opengateway cp-fe-og-styleguide design.md, 쇼츠 mla-swa-remotion devkit(재 봤습니다 연재).",
95
+ "쉬지 않는다: 카메라(trackCam)가 늘 조금씩 다가가며 흐르고 마디마다 툭 친다. 박마다 주소 조각·카운터·로그 한 줄·날아가는 숫자·막대·칩 중 하나가 크게 움직인다. 흔들림·섬광은 쓰지 않는다(쇼츠·설명·시연 틀이 끈다)."
96
+ ]
97
+ }
@@ -0,0 +1,88 @@
1
+ import { clamp, ease, progress, type Style } from "@kasaframe/core";
2
+ import { dropBurst } from "@kasaframe/motion";
3
+ import type { ThemeSlots } from "@kasaframe/themes/slots";
4
+ import { layer, letters, partial, shownCount, strokePath, traceCanvas } from "@kasaframe/themes/slotkit";
5
+
6
+ // 장면 문법 패턴이 테마 이름 없이 부르는 자리 — 계측기 화면의 결. 바탕은 서 있는 모눈(뜻 없는 흐름을 두지 않는다),
7
+ // 움직임은 값이 찍히고 막대가 서는 쪽만. 감속은 effects.ts 와 같은 snappy
8
+ const snappy = ease.snappy;
9
+
10
+ export const slots: ThemeSlots = {
11
+ surface(el) {
12
+ layer(
13
+ el,
14
+ "inset:0;background:var(--kf-bg);background-image:linear-gradient(rgba(203,213,225,.55) 1px,transparent 1px),linear-gradient(90deg,rgba(203,213,225,.55) 1px,transparent 1px);background-size:56px 56px",
15
+ );
16
+ return () => {};
17
+ },
18
+
19
+ // 흰 카드 — 회색 1px 테두리·12px 모서리, 강조 판은 OG 파랑. 위에서 짧게 내려와 선다
20
+ panel(el, { at, tone }) {
21
+ const card = layer(
22
+ el,
23
+ `inset:0;border-radius:var(--kf-radius-md);border:1px solid var(--kf-line);box-shadow:0 1px 2px rgba(2,8,23,.06),0 8px 24px rgba(2,8,23,.06);background:${tone === "accent" ? "var(--kf-accent)" : "var(--kf-bg)"}`,
24
+ true,
25
+ );
26
+ return (t) => {
27
+ const p = snappy(progress(t, at, 0.22));
28
+ card.style.visibility = t >= at ? "visible" : "hidden";
29
+ card.style.opacity = String(p);
30
+ card.style.transform = `translateY(${((1 - p) * -14).toFixed(2)}px)`;
31
+ };
32
+ },
33
+
34
+ // 값이 잡히는 순간 — 넘침 없이 한 번 조이고 선다(계측은 출렁이지 않는다)
35
+ land(_el, { at }) {
36
+ return (t): Style => (t < at || t > at + 0.3 ? {} : { scale: 1 + 0.05 * (1 - snappy(progress(t, at, 0.24))) });
37
+ },
38
+
39
+ // 계기판처럼 — 글자는 앞에서부터 서고, 숫자 칸은 서기 전까지 돌고 있다(meter 와 같은 결)
40
+ write(el, { text, at, dur }) {
41
+ const spans = letters(el, text);
42
+ const chars = Array.from(text);
43
+ return (t) => {
44
+ const n = shownCount(spans.length, t, at, dur);
45
+ spans.forEach((s, i) => {
46
+ const on = t >= at && i < Math.min(spans.length, n + 2);
47
+ s.style.visibility = on ? "visible" : "hidden";
48
+ s.textContent = i < n || !/\d/.test(chars[i]) ? chars[i] : String(Math.floor(t * 26 + i * 3.7) % 10);
49
+ });
50
+ };
51
+ },
52
+
53
+ // 표본 선 — 파랑 3px 선이 그어지고 꺾이는 점마다 표본 점이 선다
54
+ trace(el, { points, at, dur, tone }) {
55
+ const { g, clear } = traceCanvas(el, points);
56
+ const css = getComputedStyle(el);
57
+ const color = (tone === "accent" ? css.getPropertyValue("--kf-accent") : css.getPropertyValue("--kf-ink")).trim() || "#006FD6";
58
+ return (t) => {
59
+ clear();
60
+ const p = clamp((t - at) / Math.max(0.05, dur));
61
+ if (p <= 0) return;
62
+ const drawn = partial(points, p);
63
+ g.strokeStyle = color;
64
+ g.lineWidth = 3;
65
+ g.lineJoin = "round";
66
+ strokePath(g, drawn);
67
+ g.fillStyle = color;
68
+ for (const [x, y] of drawn.slice(0, -1)) {
69
+ g.beginPath();
70
+ g.arc(x, y, 6, 0, Math.PI * 2);
71
+ g.fill();
72
+ }
73
+ };
74
+ },
75
+
76
+ // 드롭 — 파랑 판이 한 번 덮였다 걷히고 고리가 퍼진다(흰 바탕이라 흰 섬광은 안 보인다)
77
+ drop(el, { ctx, drop }) {
78
+ const flood = layer(el, "inset:0;background:var(--kf-accent);opacity:0");
79
+ const ring = layer(el, "left:50%;top:50%;width:40vmin;height:40vmin;margin:-20vmin 0 0 -20vmin;border-radius:50%;border:6px solid var(--kf-accent);opacity:0");
80
+ return (t) => {
81
+ const s = dropBurst(t, { beats: ctx.beats, drop, rules: ctx.style.motion, scene: ctx.id, source: "og-drop" });
82
+ flood.style.opacity = String(Math.round(s.flash * 0.85 * 100) / 100);
83
+ ring.style.opacity = String(s.ring.opacity);
84
+ ring.style.transform = `scale(${s.ring.scale.toFixed(3)})`;
85
+ return s;
86
+ };
87
+ },
88
+ };
Binary file
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "og-measure",
3
+ "label": "OG 측정 화면 — 재 온 숫자가 쌓이는 계측기",
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
+ "bar": "rgba(100, 116, 139, 0.28)"
27
+ },
28
+ "fonts": {
29
+ "sans": "\"Pretendard Variable\", Pretendard, \"Noto Sans KR\", \"Apple SD Gothic Neo\", sans-serif",
30
+ "display": "\"Geist\", \"Pretendard Variable\", \"Noto Sans KR\", \"Apple SD Gothic Neo\", sans-serif",
31
+ "mono": "\"Geist Mono\", ui-monospace, \"Pretendard Variable\", \"Noto Sans KR\", \"Apple SD Gothic Neo\", monospace",
32
+ "faces": [
33
+ {
34
+ "family": "Pretendard Variable",
35
+ "src": "https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/variable/woff2/PretendardVariable.woff2",
36
+ "weight": "45 920"
37
+ },
38
+ {
39
+ "family": "Geist",
40
+ "src": "https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Variable.woff2",
41
+ "weight": "100 900"
42
+ },
43
+ {
44
+ "family": "Geist Mono",
45
+ "src": "https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Variable.woff2",
46
+ "weight": "100 900"
47
+ }
48
+ ]
49
+ },
50
+ "type": {
51
+ "hero": 132,
52
+ "title": 72,
53
+ "body": 38,
54
+ "caption": 30,
55
+ "weightDisplay": 800,
56
+ "weightBody": 500,
57
+ "tracking": "-0.055em"
58
+ },
59
+ "radius": {
60
+ "sm": 0,
61
+ "md": 12,
62
+ "lg": 12,
63
+ "pill": 999
64
+ },
65
+ "shadow": {
66
+ "soft": "none",
67
+ "lift": "none"
68
+ },
69
+ "motion": {
70
+ "beatPulse": "drops-only",
71
+ "shake": {
72
+ "on": [
73
+ "drop"
74
+ ],
75
+ "maxPerPhrase": 1,
76
+ "maxPx": 8
77
+ },
78
+ "cameraMove": "free",
79
+ "repeatSameMove": false,
80
+ "maxFreezeSec": 0.1,
81
+ "enter": "rise",
82
+ "ease": "snappy",
83
+ "durations": {
84
+ "fast": 0.15,
85
+ "base": 0.22,
86
+ "slow": 0.3
87
+ }
88
+ },
89
+ "notes": [
90
+ "잉크 셋: 흰 종이(bg) · 거의 검정(ink #020817) · OG 파랑 하나(accent #006FD6). 회색 막대(bar)는 비교 대상, 파랑은 가장 좋은 값 하나에만. 빨강은 오류에만.",
91
+ "질감: 흰 모눈 종이 + 아주 옅은 파란 주사선. 면은 테두리 없이 색으로 가른다(surface 98% → raised 96%), 그림자 없음, 모서리는 면 12px·칩 알약뿐.",
92
+ "숫자·모델 ID·주소·로그는 Geist Mono + tabular-nums, 큰 숫자는 Geist 800 자간 −0.055em. 한글은 Pretendard 로 떨어진다(제목 700).",
93
+ "움직임 성격: 220ms 감속(snappy) + 6px 진입. 숫자는 지어내지 않고 들어온 시각에 보인다 — 점이 찍히고, 가운데값이 미끄러지고, 큰 숫자는 앞자리부터 멈춰 선다. 차트 선을 매번 다시 그리지 않는다.",
94
+ "출처: opengateway cp-fe-og-styleguide design.md, 쇼츠 mla-swa-remotion devkit(재 봤습니다 연재).",
95
+ "쉬지 않는다: 박마다 주소 조각·카운터·로그 한 줄·날아가는 숫자·막대·칩 중 하나가 크게 움직이고, 모눈·주사선이 늘 흐른다. 카메라(trackCam)는 이유가 있을 때만 — 결과가 서는 순간에 한 번 옮기며 툭, 사이에는 선다. 흔들림·섬광은 쓰지 않는다(쇼츠·설명·시연 틀이 끈다)."
96
+ ]
97
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "id": "og-measure",
3
+ "name": "OG 측정 화면",
4
+ "metaphor": "계측기 화면 — 실제 호출이 한 줄 나가고, 원자료 로그가 흐르고, 거기서 숫자가 뽑혀 점·막대·큰 숫자로 쌓인다",
5
+ "status": "approved",
6
+ "approvedAt": "2026-10-08",
7
+ "purposes": [
8
+ "shorts",
9
+ "explainer",
10
+ "demo",
11
+ "promo"
12
+ ],
13
+ "aspect": [
14
+ "16:9",
15
+ "9:16"
16
+ ],
17
+ "effects": [
18
+ {
19
+ "name": "graphPaper",
20
+ "kind": "layer",
21
+ "does": "측정 바탕 — 흰 모눈과 아주 옅은 파란 주사선이 천천히 지나간다",
22
+ "use": "const paint = graphPaper(root, { phase: ctx.from }) // 모눈이 흐르고 주사선이 지나간다"
23
+ },
24
+ {
25
+ "name": "callLine",
26
+ "kind": "layer",
27
+ "does": "실제 호출 한 줄 — 주소가 박마다 한 조각씩 붙고 모델·보낼 글이 찍히고, 보낸 뒤 경과 시간이 실제 속도로 굴러 잰 ms 에 멈추며 상태·첫 토큰·받은 글·사용량이 붙는다",
28
+ "use": "const paint = callLine(stage, { x: 90, y: 140, w: 1740, at: 0, url: [\"apis.opengateway.ai\", \"/v1\", \"/chat\", \"/completions\"], urlAt: [b[0], b[1], b[2], b[3]], model, modelAt: b[4], prompt, promptAt: b[5], sendAt: b[6], status: 200, ms: call.ttft_ms, answer: call.text, usage, usageAt: b[10] })"
29
+ },
30
+ {
31
+ "name": "rawLog",
32
+ "kind": "layer",
33
+ "does": "원자료 로그 — 줄이 들어온 박에 맨 아래 붙고 한 줄씩 밀려 오르며, 정규식이 잡은 숫자에 파란 칸",
34
+ "use": "const paint = rawLog(stage, { x: 70, y: 150, w: 1080, rows: 14, lines, times, pick: /ttft_ms=(\\d+)/, size: 34 })"
35
+ },
36
+ {
37
+ "name": "samplePlot",
38
+ "kind": "layer",
39
+ "does": "샘플 점 그림 — 재 온 값이 꽂히는 시각에 점이 커졌다 자리 잡고 가운데값 눈금·숫자가 따라 미끄러진다",
40
+ "use": "const paint = samplePlot(stage, { x: 1200, y: 160, w: 650, rows, min: 450, max: 1050, unit: \"ms\", ticks: [500, 750, 1000], best: 0, size: 34 })"
41
+ },
42
+ {
43
+ "name": "pickFly",
44
+ "kind": "layer",
45
+ "does": "뽑힌 숫자 — 로그 줄의 숫자가 떠올라 호를 그리며 점 그림 자리로 날아가 꽂힌다(박마다 큰 움직임)",
46
+ "use": "const paint = pickFly(stage, { items: [{ at: b[0], text: \"746\", from: { x: 760, y: 200 }, to: { x: 1500, y: 250 } }] })"
47
+ },
48
+ {
49
+ "name": "meter",
50
+ "kind": "value",
51
+ "does": "자리 고정 숫자 — 계기판처럼 앞자리부터 하나씩 멈춰 선다(글자 수 고정)",
52
+ "use": "num.textContent = meter(t, { to: 612.5, at: 0, decimals: 1 })"
53
+ },
54
+ {
55
+ "name": "rankBars",
56
+ "kind": "layer",
57
+ "does": "막대 — 박마다 하나씩 값만큼 자라고(best 만 OG 파랑), delta 칩이 그 박에 튀어나온다",
58
+ "use": "const paint = rankBars(stage, { x: 90, y: 400, w: 1740, items: [{ label, value, at: b[2] }, { label, value, at: b[3], delta: \"+80.5ms\", deltaAt: b[5] }], max: 820, best: 0, unit: \"ms\" })"
59
+ },
60
+ {
61
+ "name": "stamp",
62
+ "kind": "layer",
63
+ "does": "끝 도장 — 「측정 날짜 · 호출 N번 · $비용 · 키 하나」와 OG 로고가 쾅 찍힌다(비용은 첫 유효 자리까지)",
64
+ "use": "const paint = stamp(stage, { x: 960, y: 975, at: b[14], date, calls: 18, cost, logo: ctx.asset(\"brand/og-logo.svg\") })"
65
+ },
66
+ {
67
+ "name": "flag",
68
+ "kind": "layer",
69
+ "does": "칩 — 짧은 낱말·잰 값 하나가 크게 튀어 들어온다",
70
+ "use": "const paint = flag(stage, { x: 90, y: 60, text: \"실측\", at: 0 })"
71
+ },
72
+ {
73
+ "name": "trackCam",
74
+ "kind": "value",
75
+ "does": "계측 카메라 — 샷이 바뀌면 220ms 로 옮기며 툭(kick) 치고 사이에는 선다. 샷은 드러냄·결과가 서는 순간에만(긴 로그가 잘리지 않게 배율 1–1.1), 쉬지 않는 몫은 카운터·로그·막대",
76
+ "use": "applyStyle(stage, trackCam(t, { shots: [{ at: 0, kick: 0.1 }, { at: bar[1], zoom: 1.04 }], scene: ctx.id })) // stage: transform-origin 0 0"
77
+ }
78
+ ]
79
+ }
@@ -0,0 +1,43 @@
1
+ # 리소 잡지 `riso-zine`
2
+
3
+ **비유: 잉크 판을 한 장씩 찍어 화면을 인쇄한다.** 리소그래프는 색마다 판(드럼)을 따로 돌려 종이에 한 장씩 겹쳐 찍는다. 화면도 그렇게 — 무엇이 나타나든 박에서 판 한 장이 찍혀 생기고, 판끼리는 곱하기로 겹쳐(블루+핑크 = 보라) 가장자리가 조금씩 어긋난다. 그라데이션은 망점, 바탕은 끓는 종이결.
4
+
5
+ ## 맞는 내용·용도
6
+
7
+ - 곡·공연·전시·행사 포스터, 인디 제품·책·잡지 소개, 숫자 몇 개로 말하는 데이터(곡 길이·BPM·횟수) — 글이 적고 큰 화면.
8
+ - 용도: 홍보(promo)·뮤비(mv)·피드(square)·쇼츠(shorts)·공개(launch). 마디마다 판 한 장, 드롭에 `dropPlate`.
9
+ - 화면 글은 제목·이름·숫자·짧은 낱말. 한글 큰 글은 Black Han Sans, 작은 글은 Pretendard, 숫자 표는 모노.
10
+
11
+ ## 금지
12
+
13
+ - 잉크 셋(종이 `bg`·블루 `blue`·핑크 `pink`) 밖의 색, 투명도로 만든 옅은 색, CSS 그라데이션·그림자·흐림 — 옅은 색은 망점으로만.
14
+ - 60fps 로 미끄러지는 보간. 움직임은 `printFrames`(초당 12장)·`drumPass`(24장)로 끊는다. 카메라 대신 종이가 움직인다(`sheetDrift`).
15
+ - 핑크 판 하나로 쓴 작은 글(종이 위 2.6:1). 글은 블루 판, 큰 글은 블루+핑크 두 판을 겹친다.
16
+ - 판을 박마다 흔들기. 판이 끓는 건 `misregister` 의 0.6px 결뿐, 흔들림은 `dropPlate` 가 돌려준 값을 드롭에서만. 박마다의 큰 움직임은 흔들기가 아니라 판 한 장이 새로 찍히는 것이다.
17
+ - 슬로건·감성 문장.
18
+
19
+ ## 움직임
20
+
21
+ - 마디마다 새 판면 — 드럼이 지나가며(`drumPass`) 다음 판면이 드러난다. 판면 하나는 큰 낱말 하나 + 망점 그림 하나.
22
+ - 박마다 판 한 장: 첫 박 블루 낱말 → 둘째 박 망점 → 셋째 박 핑크 겹침(어긋남) → 넷째 박 작은 표.
23
+ - 그 사이에도 쉬지 않는다: 판면이 `sheetDrift` 로 늘 끌려가고, 종이결이 초당 12번 끓는다.
24
+
25
+ ## 효과
26
+
27
+ 같은 레포 안에서는 `effects.ts` 를 바로, 프로젝트에서는 `fx("riso-zine")`. layer 는 `build` 에서 만들고 `(t) => …` 에서 부른다. 장면 하나는 보통 `paperGrain`(맨 아래) → 판들 → `paperGrain({ mode: "mottle" })`(맨 위) 순서로 쌓는다. 판면 틀에 `sheetDrift`·흔들림을 걸면 그 틀이 따로 합성돼 판끼리만 곱하기로 겹친다 — 종이가 밝아 눈에 띄는 차이는 없다.
28
+
29
+ | 효과 | 꼴 | 하는 일 |
30
+ |---|---|---|
31
+ | `printFrames` | value | t 를 초당 12장으로 끊는다 |
32
+ | `misregister` | value | 판 어긋남 — 시드 고정 ±px, 찍히는 두 장은 더 어긋났다 앉고 초당 12번 끓는다 |
33
+ | `plateStamp` | layer | 같은 그림을 판 여러 장으로. `build(plate)` 안의 글·SVG 는 `currentColor` 가 판 잉크 |
34
+ | `halftone` | layer | 망점 판. `value(u, v)` 나 `src` 그림, `reveal: "grow" \| "sweep"`, `pulse` 면 드롭 구간 박마다 부푼다 |
35
+ | `paperGrain` | layer | `paper` 종이·섬유·티끌 / `mottle` 잉크 위 흰 반점. 초당 12번 끓는다 |
36
+ | `sheetDrift` | value | 종이 밀림 — 판면이 한 방향으로 끌려가며 조금 돈다(초당 12장). 판면 틀에 |
37
+ | `drumPass` | value | 드럼이 지나간 쪽만 보이는 clip — `plateStamp` 의 `style` 에 |
38
+ | `sheetFeed` | layer | 장면 끝에 새 종이가 들어와 덮는다. 다음 장면은 빈 종이에서 시작 |
39
+ | `dropPlate` | layer | 드롭 — 핑크 판 통째로 + 망점 고리, 흔들림을 돌려준다 |
40
+
41
+ 망 각도는 리소 관례대로 블루 15°·핑크 75°.
42
+
43
+ 견본: `sample/` — 공통 주제 「OpenGateway 소개 15초」, kawaii-friends 4.0–19.0초(드롭 7.34초), 판면 열하나(마디마다). 흩어진 회사 아홉 → 회사별 모델 수 → 주소와 /v1 → 박마다 새 판으로 바뀌는 모델 ID → 두 형식 → 드롭 102 → 하루 시계 00–10시 -90% → deepseek 가격 → 실측 → 로고 두 판 겹침.