framefields 2.5.5 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/README.md +11 -0
  2. package/dist/audio/index.mjs +10 -10
  3. package/dist/{audio-C9euVW4K.mjs → audio-CYrO9q9P.mjs} +3 -3
  4. package/dist/{audio-C9euVW4K.mjs.map → audio-CYrO9q9P.mjs.map} +1 -1
  5. package/dist/cli.mjs +866 -16
  6. package/dist/cli.mjs.map +1 -1
  7. package/dist/components/index.d.mts +2 -2
  8. package/dist/components/index.mjs +43 -43
  9. package/dist/{dist-DBdxM6xv.mjs → dist-DSKhnhDk.mjs} +3 -3
  10. package/dist/dist-DSKhnhDk.mjs.map +1 -0
  11. package/dist/{dist-BuirkW-f.mjs → dist-cC6nOaMR.mjs} +11 -3
  12. package/dist/dist-cC6nOaMR.mjs.map +1 -0
  13. package/dist/effects/index.mjs +34 -34
  14. package/dist/{effects-B263lgUi.mjs → effects-Dvdwndk0.mjs} +2 -2
  15. package/dist/{effects-B263lgUi.mjs.map → effects-Dvdwndk0.mjs.map} +1 -1
  16. package/dist/fonts/index.d.mts +1 -1
  17. package/dist/fonts/index.mjs +2 -2
  18. package/dist/{fonts-DNx6ps2p.mjs → fonts-B6a4CyoM.mjs} +7 -3
  19. package/dist/fonts-B6a4CyoM.mjs.map +1 -0
  20. package/dist/{gpu-BRBIoxMC.mjs → gpu-CrQADlcf.mjs} +2 -2
  21. package/dist/{gpu-BRBIoxMC.mjs.map → gpu-CrQADlcf.mjs.map} +1 -1
  22. package/dist/index-3Vdef2KE.d.mts.map +1 -1
  23. package/dist/{index-N1tMc5Z9.d.mts → index-CWG19cm-.d.mts} +821 -393
  24. package/dist/index-CWG19cm-.d.mts.map +1 -0
  25. package/dist/index-D-Gnyffj.d.mts.map +1 -1
  26. package/dist/{index-CalU-mpZ.d.mts → index-j5LGVVbm.d.mts} +3 -1
  27. package/dist/index-j5LGVVbm.d.mts.map +1 -0
  28. package/dist/index.d.mts +3 -3
  29. package/dist/index.mjs +50 -50
  30. package/dist/preview/index.mjs +10 -10
  31. package/dist/{preview-ChR8Z8Fm.mjs → preview-OTsGYyOU.mjs} +2 -2
  32. package/dist/{preview-ChR8Z8Fm.mjs.map → preview-OTsGYyOU.mjs.map} +1 -1
  33. package/dist/preview-engine/{chunk-BBHRXV75.mjs → chunk-4C26NVQY.mjs} +1 -1
  34. package/dist/preview-engine/chunk-5NLDETDV.mjs +1974 -0
  35. package/dist/preview-engine/{chunk-VY6ST4QX.mjs → chunk-AGLAJGQJ.mjs} +1 -1
  36. package/dist/preview-engine/{chunk-ZJLNXN7W.mjs → chunk-K3IMPV6T.mjs} +6 -6
  37. package/dist/preview-engine/chunk-LHCEQ77S.mjs +5 -0
  38. package/dist/preview-engine/{chunk-2LQCQ3OT.mjs → chunk-Q6CRERSJ.mjs} +5 -5
  39. package/dist/preview-engine/chunk-ZGMA27IG.mjs +3 -0
  40. package/dist/preview-engine/components.mjs +1 -1
  41. package/dist/preview-engine/fonts.mjs +1 -1
  42. package/dist/preview-engine/framefields.mjs +1 -1
  43. package/dist/preview-engine/player.mjs +1 -1
  44. package/dist/preview-engine/{renderers-WZEV464O.mjs → renderers-IT5ISWSA.mjs} +1 -1
  45. package/dist/{program-O2bWX0cs.mjs → program-W4CWO2bp.mjs} +19 -3
  46. package/dist/program-W4CWO2bp.mjs.map +1 -0
  47. package/dist/registry/annotate.json +1 -1
  48. package/dist/registry/app-frame.json +1 -1
  49. package/dist/registry/backdrop.json +3 -3
  50. package/dist/registry/before-after.json +1 -1
  51. package/dist/registry/callout.json +1 -1
  52. package/dist/registry/captions.json +7 -1
  53. package/dist/registry/card-stack.json +3 -3
  54. package/dist/registry/chat-thread.json +7 -1
  55. package/dist/registry/code-block.json +8 -2
  56. package/dist/registry/confetti.json +1 -1
  57. package/dist/registry/device-frame.json +2 -1
  58. package/dist/registry/focus-zoom.json +1 -1
  59. package/dist/registry/logo-reveal.json +1 -1
  60. package/dist/registry/lower-third.json +1 -1
  61. package/dist/registry/meter.json +1 -1
  62. package/dist/registry/mouse-pointer.json +1 -1
  63. package/dist/registry/selection.json +3 -3
  64. package/dist/registry/spotlight.json +1 -1
  65. package/dist/registry/terminal.json +7 -1
  66. package/dist/registry/text-reveal.json +2 -1
  67. package/dist/registry/title-card.json +1 -1
  68. package/dist/registry/toasts.json +1 -1
  69. package/dist/registry/touch-point.json +4 -4
  70. package/dist/registry/waveform.json +3 -3
  71. package/dist/registry/word-cycle.json +2 -2
  72. package/dist/renderer/index.mjs +2 -2
  73. package/dist/{renderer-DkM6Ikdf.mjs → renderer-0W-Ty55h.mjs} +3 -3
  74. package/dist/{renderer-DkM6Ikdf.mjs.map → renderer-0W-Ty55h.mjs.map} +1 -1
  75. package/dist/{renderer-CrKYlipx.mjs → renderer-0n4A8P2_.mjs} +2 -2
  76. package/dist/{renderer-CrKYlipx.mjs.map → renderer-0n4A8P2_.mjs.map} +1 -1
  77. package/dist/{renderer-D3FJcRA3.mjs → renderer-158rymL0.mjs} +2 -2
  78. package/dist/{renderer-D3FJcRA3.mjs.map → renderer-158rymL0.mjs.map} +1 -1
  79. package/dist/{renderer-Dwh0jaor.mjs → renderer-1KfQICGK.mjs} +3 -3
  80. package/dist/{renderer-Dwh0jaor.mjs.map → renderer-1KfQICGK.mjs.map} +1 -1
  81. package/dist/renderer-8HnHWqYj.mjs +5 -0
  82. package/dist/renderer-8itujues.mjs +5 -0
  83. package/dist/{renderer-DWG6EXGj.mjs → renderer-B3gQT1uq.mjs} +3 -3
  84. package/dist/{renderer-DWG6EXGj.mjs.map → renderer-B3gQT1uq.mjs.map} +1 -1
  85. package/dist/{renderer-Bs6BaMLf.mjs → renderer-BE6K88VR.mjs} +3 -3
  86. package/dist/{renderer-Bs6BaMLf.mjs.map → renderer-BE6K88VR.mjs.map} +1 -1
  87. package/dist/{renderer-CqJou_2L.mjs → renderer-BEpA2g1_.mjs} +2 -2
  88. package/dist/{renderer-CqJou_2L.mjs.map → renderer-BEpA2g1_.mjs.map} +1 -1
  89. package/dist/renderer-BFods-7v.mjs +5 -0
  90. package/dist/{renderer-RbMM6Njv.mjs → renderer-BGDKxfsM.mjs} +3 -3
  91. package/dist/{renderer-RbMM6Njv.mjs.map → renderer-BGDKxfsM.mjs.map} +1 -1
  92. package/dist/{renderer-DGOY-LBR.mjs → renderer-BGnMRdUK.mjs} +2 -2
  93. package/dist/{renderer-DGOY-LBR.mjs.map → renderer-BGnMRdUK.mjs.map} +1 -1
  94. package/dist/{renderer-CpDaUeCN.mjs → renderer-BIMm7lYG.mjs} +3 -3
  95. package/dist/{renderer-CpDaUeCN.mjs.map → renderer-BIMm7lYG.mjs.map} +1 -1
  96. package/dist/{renderer-Dw3K8KT9.mjs → renderer-BKL3UEzN.mjs} +2 -2
  97. package/dist/{renderer-Dw3K8KT9.mjs.map → renderer-BKL3UEzN.mjs.map} +1 -1
  98. package/dist/{renderer-DtqiWq1m.mjs → renderer-BKhdqykZ.mjs} +3 -3
  99. package/dist/{renderer-DtqiWq1m.mjs.map → renderer-BKhdqykZ.mjs.map} +1 -1
  100. package/dist/{renderer-CnclEQdA.mjs → renderer-BO5u8eFS.mjs} +2 -2
  101. package/dist/{renderer-CnclEQdA.mjs.map → renderer-BO5u8eFS.mjs.map} +1 -1
  102. package/dist/{renderer-DTPmvL1i.mjs → renderer-BQ-pHSPI.mjs} +3 -3
  103. package/dist/{renderer-DTPmvL1i.mjs.map → renderer-BQ-pHSPI.mjs.map} +1 -1
  104. package/dist/{renderer-BStETpqC.mjs → renderer-BXGr426R.mjs} +2 -2
  105. package/dist/{renderer-BStETpqC.mjs.map → renderer-BXGr426R.mjs.map} +1 -1
  106. package/dist/{renderer-Dk0okoS3.mjs → renderer-B_Oz9L3g.mjs} +2 -2
  107. package/dist/{renderer-Dk0okoS3.mjs.map → renderer-B_Oz9L3g.mjs.map} +1 -1
  108. package/dist/renderer-BbQygRwc.mjs +5 -0
  109. package/dist/{renderer-PhjHSS97.mjs → renderer-BcaT2j3R.mjs} +2 -2
  110. package/dist/{renderer-PhjHSS97.mjs.map → renderer-BcaT2j3R.mjs.map} +1 -1
  111. package/dist/{renderer-C6n8y6Pw.mjs → renderer-Bh7d3RSt.mjs} +3 -3
  112. package/dist/{renderer-C6n8y6Pw.mjs.map → renderer-Bh7d3RSt.mjs.map} +1 -1
  113. package/dist/{renderer-QQDU1b0Z.mjs → renderer-BiH29MS6.mjs} +3 -3
  114. package/dist/{renderer-QQDU1b0Z.mjs.map → renderer-BiH29MS6.mjs.map} +1 -1
  115. package/dist/{renderer-DdkPY4hO.mjs → renderer-BnpMAub0.mjs} +2 -2
  116. package/dist/{renderer-DdkPY4hO.mjs.map → renderer-BnpMAub0.mjs.map} +1 -1
  117. package/dist/renderer-Bq_sPaCg.mjs +5 -0
  118. package/dist/renderer-BrkDrvqS.mjs +5 -0
  119. package/dist/{renderer-DVGVcDvB.mjs → renderer-Bt3F1tmP.mjs} +3 -3
  120. package/dist/{renderer-DVGVcDvB.mjs.map → renderer-Bt3F1tmP.mjs.map} +1 -1
  121. package/dist/{renderer-DsnV8tpW.mjs → renderer-BwnQRuce.mjs} +3 -3
  122. package/dist/{renderer-DsnV8tpW.mjs.map → renderer-BwnQRuce.mjs.map} +1 -1
  123. package/dist/renderer-C1diVT5Q.mjs +5 -0
  124. package/dist/{renderer-CTy0bSsl.mjs → renderer-C2O4nK9x.mjs} +3 -3
  125. package/dist/{renderer-CTy0bSsl.mjs.map → renderer-C2O4nK9x.mjs.map} +1 -1
  126. package/dist/{renderer-Cg2xS8h8.mjs → renderer-C4Jfgjm5.mjs} +2 -2
  127. package/dist/{renderer-Cg2xS8h8.mjs.map → renderer-C4Jfgjm5.mjs.map} +1 -1
  128. package/dist/renderer-C8E7ajTR.mjs +5 -0
  129. package/dist/renderer-CAz8JW5c.mjs +5 -0
  130. package/dist/{renderer-1NoJLLDa.mjs → renderer-CEvj79Wg.mjs} +3 -3
  131. package/dist/{renderer-1NoJLLDa.mjs.map → renderer-CEvj79Wg.mjs.map} +1 -1
  132. package/dist/{renderer-Bag1LFos.mjs → renderer-CFSh2eG-.mjs} +3 -3
  133. package/dist/{renderer-Bag1LFos.mjs.map → renderer-CFSh2eG-.mjs.map} +1 -1
  134. package/dist/{renderer-Daqvhwjp.mjs → renderer-CHvEgLHy.mjs} +3 -3
  135. package/dist/{renderer-Daqvhwjp.mjs.map → renderer-CHvEgLHy.mjs.map} +1 -1
  136. package/dist/renderer-CKfrUdGw.mjs +5 -0
  137. package/dist/renderer-CL0rqBA4.mjs +5 -0
  138. package/dist/{renderer-R5Lg65F8.mjs → renderer-CLP6Lm7y.mjs} +2 -2
  139. package/dist/{renderer-B0IJirDs.mjs → renderer-COcFh5bK.mjs} +3 -3
  140. package/dist/{renderer-B0IJirDs.mjs.map → renderer-COcFh5bK.mjs.map} +1 -1
  141. package/dist/renderer-COyavIEv.mjs +5 -0
  142. package/dist/{renderer-DcApNxER.mjs → renderer-CPtyQrJI.mjs} +2 -2
  143. package/dist/{renderer-DcApNxER.mjs.map → renderer-CPtyQrJI.mjs.map} +1 -1
  144. package/dist/renderer-CUrShvUZ.mjs +5 -0
  145. package/dist/renderer-CWvJ_GaL.mjs +5 -0
  146. package/dist/{renderer-B2no_9zi.mjs → renderer-CX4rvqm9.mjs} +3 -3
  147. package/dist/{renderer-B2no_9zi.mjs.map → renderer-CX4rvqm9.mjs.map} +1 -1
  148. package/dist/{renderer-C3tdjg8B.mjs → renderer-CZGpETnc.mjs} +3 -3
  149. package/dist/{renderer-C3tdjg8B.mjs.map → renderer-CZGpETnc.mjs.map} +1 -1
  150. package/dist/{renderer-DmTxEeMh.mjs → renderer-C_-hWBF1.mjs} +3 -3
  151. package/dist/{renderer-DmTxEeMh.mjs.map → renderer-C_-hWBF1.mjs.map} +1 -1
  152. package/dist/{renderer-H4-8sBjl.mjs → renderer-Cb74SQHm.mjs} +2 -2
  153. package/dist/{renderer-H4-8sBjl.mjs.map → renderer-Cb74SQHm.mjs.map} +1 -1
  154. package/dist/{renderer-DO1TeUqV.mjs → renderer-Cba208C9.mjs} +3 -3
  155. package/dist/{renderer-DO1TeUqV.mjs.map → renderer-Cba208C9.mjs.map} +1 -1
  156. package/dist/{renderer-CA_CwisV.mjs → renderer-CdJoOfQw.mjs} +2 -2
  157. package/dist/{renderer-CA_CwisV.mjs.map → renderer-CdJoOfQw.mjs.map} +1 -1
  158. package/dist/renderer-Ck0mGIo9.mjs +5 -0
  159. package/dist/{renderer-YBwN9uyj.mjs → renderer-CoaDDIS6.mjs} +5 -5
  160. package/dist/{renderer-YBwN9uyj.mjs.map → renderer-CoaDDIS6.mjs.map} +1 -1
  161. package/dist/renderer-CqIXqdf0.mjs +5 -0
  162. package/dist/renderer-Csod6biL.mjs +5 -0
  163. package/dist/{renderer-BMiZIGkZ.mjs → renderer-CsxO_wBG.mjs} +2 -2
  164. package/dist/renderer-CueO924-.mjs +5 -0
  165. package/dist/{renderer-x1xlZaH_.mjs → renderer-Cv6od7Be.mjs} +3 -3
  166. package/dist/{renderer-x1xlZaH_.mjs.map → renderer-Cv6od7Be.mjs.map} +1 -1
  167. package/dist/{renderer-B5ZdkcMi.mjs → renderer-Cw7R1U43.mjs} +2 -2
  168. package/dist/{renderer-B5ZdkcMi.mjs.map → renderer-Cw7R1U43.mjs.map} +1 -1
  169. package/dist/renderer-D1vM4obC.mjs +5 -0
  170. package/dist/{renderer-CEAmByVW.mjs → renderer-D36Pjp0B.mjs} +2 -2
  171. package/dist/{renderer-CEAmByVW.mjs.map → renderer-D36Pjp0B.mjs.map} +1 -1
  172. package/dist/{renderer-CFCR_7bq.mjs → renderer-D52KWsb8.mjs} +3 -3
  173. package/dist/{renderer-CFCR_7bq.mjs.map → renderer-D52KWsb8.mjs.map} +1 -1
  174. package/dist/renderer-DB7QUt90.mjs +5 -0
  175. package/dist/{renderer-BfQdc3RM.mjs → renderer-DGsWlXjl.mjs} +69 -69
  176. package/dist/{renderer-BfQdc3RM.mjs.map → renderer-DGsWlXjl.mjs.map} +1 -1
  177. package/dist/renderer-DLMDnKlA.mjs +6 -0
  178. package/dist/renderer-DNs7yWMr.mjs +5 -0
  179. package/dist/{renderer-C8pJFxcL.mjs → renderer-DORydJHm.mjs} +2 -2
  180. package/dist/{renderer-C8pJFxcL.mjs.map → renderer-DORydJHm.mjs.map} +1 -1
  181. package/dist/renderer-DOrtuoa9.mjs +5 -0
  182. package/dist/{renderer-Dz4muMyE.mjs → renderer-DTKtkgTO.mjs} +2 -2
  183. package/dist/{renderer-Dz4muMyE.mjs.map → renderer-DTKtkgTO.mjs.map} +1 -1
  184. package/dist/{renderer-YFHESw3v.mjs → renderer-DVdRzDwX.mjs} +3 -3
  185. package/dist/{renderer-YFHESw3v.mjs.map → renderer-DVdRzDwX.mjs.map} +1 -1
  186. package/dist/renderer-D_JgOawb.mjs +5 -0
  187. package/dist/renderer-DdLo1uoa.mjs +5 -0
  188. package/dist/renderer-DeX3JEZV.mjs +5 -0
  189. package/dist/{renderer-C2MaJKfY.mjs → renderer-Df-rf7RC.mjs} +3 -3
  190. package/dist/{renderer-C2MaJKfY.mjs.map → renderer-Df-rf7RC.mjs.map} +1 -1
  191. package/dist/renderer-DfgZVACG.mjs +5 -0
  192. package/dist/{renderer-CFRTJ7cT.mjs → renderer-DmrP4dsn.mjs} +2 -2
  193. package/dist/{renderer-CFRTJ7cT.mjs.map → renderer-DmrP4dsn.mjs.map} +1 -1
  194. package/dist/renderer-DoYG7Pn6.mjs +5 -0
  195. package/dist/{renderer-Bvizxddu.mjs → renderer-DqIrYB0P.mjs} +2 -2
  196. package/dist/{renderer-Bvizxddu.mjs.map → renderer-DqIrYB0P.mjs.map} +1 -1
  197. package/dist/{renderer-BrKgtYq4.mjs → renderer-DrrWvz8l.mjs} +3 -3
  198. package/dist/{renderer-BrKgtYq4.mjs.map → renderer-DrrWvz8l.mjs.map} +1 -1
  199. package/dist/{renderer-Bwxm-kWL.mjs → renderer-DuFwDHHF.mjs} +2 -2
  200. package/dist/{renderer-CVbNiH03.mjs → renderer-DxOJv_G7.mjs} +3 -3
  201. package/dist/{renderer-CVbNiH03.mjs.map → renderer-DxOJv_G7.mjs.map} +1 -1
  202. package/dist/{renderer-CbxfSmYE.mjs → renderer-E54Vv1_W.mjs} +3 -3
  203. package/dist/{renderer-CbxfSmYE.mjs.map → renderer-E54Vv1_W.mjs.map} +1 -1
  204. package/dist/{renderer-B7vXnBUo.mjs → renderer-FPYVmSf6.mjs} +3 -3
  205. package/dist/{renderer-B7vXnBUo.mjs.map → renderer-FPYVmSf6.mjs.map} +1 -1
  206. package/dist/{renderer-BlU3Sh_0.mjs → renderer-FgP_1OgD.mjs} +3 -3
  207. package/dist/{renderer-BlU3Sh_0.mjs.map → renderer-FgP_1OgD.mjs.map} +1 -1
  208. package/dist/{renderer-DW21AyEv.mjs → renderer-H-Adf8Za.mjs} +3 -3
  209. package/dist/{renderer-DW21AyEv.mjs.map → renderer-H-Adf8Za.mjs.map} +1 -1
  210. package/dist/{renderer-CPSg6eEQ.mjs → renderer-HPBahXjt.mjs} +2 -2
  211. package/dist/{renderer-CPSg6eEQ.mjs.map → renderer-HPBahXjt.mjs.map} +1 -1
  212. package/dist/renderer-Jwqa-BUN.mjs +5 -0
  213. package/dist/{renderer-BNs31kME.mjs → renderer-KkDYCAkn.mjs} +3 -3
  214. package/dist/{renderer-BNs31kME.mjs.map → renderer-KkDYCAkn.mjs.map} +1 -1
  215. package/dist/{renderer-BvA4sQz5.mjs → renderer-PDAlUGKG.mjs} +3 -3
  216. package/dist/{renderer-BvA4sQz5.mjs.map → renderer-PDAlUGKG.mjs.map} +1 -1
  217. package/dist/{renderer-C5QYI1Wu.mjs → renderer-PDs21Gsq.mjs} +2 -2
  218. package/dist/{renderer-C5QYI1Wu.mjs.map → renderer-PDs21Gsq.mjs.map} +1 -1
  219. package/dist/{renderer-DADTT3ym.mjs → renderer-Sdsy27LH.mjs} +2 -2
  220. package/dist/{renderer-DHdFVpdH.mjs → renderer-YEDoDnsE.mjs} +2 -2
  221. package/dist/{renderer-DHdFVpdH.mjs.map → renderer-YEDoDnsE.mjs.map} +1 -1
  222. package/dist/renderer-Z2Vs-IqP.mjs +5 -0
  223. package/dist/{renderer-BWNQQZ12.mjs → renderer-ZM2jwJbX.mjs} +3 -3
  224. package/dist/{renderer-BWNQQZ12.mjs.map → renderer-ZM2jwJbX.mjs.map} +1 -1
  225. package/dist/{renderer-BKJ8cywK.mjs → renderer-ZarULMvJ.mjs} +2 -2
  226. package/dist/{renderer-BKJ8cywK.mjs.map → renderer-ZarULMvJ.mjs.map} +1 -1
  227. package/dist/renderer-ZnyCpdWE.mjs +5 -0
  228. package/dist/{renderer-8_d6YNnE.mjs → renderer-aT6MUYPr.mjs} +2 -2
  229. package/dist/{renderer-8_d6YNnE.mjs.map → renderer-aT6MUYPr.mjs.map} +1 -1
  230. package/dist/{renderer-DkOxEQsg.mjs → renderer-dX7Fy1NR.mjs} +3 -3
  231. package/dist/{renderer-DkOxEQsg.mjs.map → renderer-dX7Fy1NR.mjs.map} +1 -1
  232. package/dist/{renderer-tcS585Iy.mjs → renderer-eQP0fvgc.mjs} +2 -2
  233. package/dist/{renderer-tcS585Iy.mjs.map → renderer-eQP0fvgc.mjs.map} +1 -1
  234. package/dist/renderer-emCnsnTH.mjs +5 -0
  235. package/dist/renderer-ioxa4-Dy.mjs +5 -0
  236. package/dist/renderer-iyIwrDWO.mjs +5 -0
  237. package/dist/{renderer-BZ5uOfoX.mjs → renderer-lP23pU1s.mjs} +2 -2
  238. package/dist/{renderer-BZ5uOfoX.mjs.map → renderer-lP23pU1s.mjs.map} +1 -1
  239. package/dist/{renderer-oR1LvHeO.mjs → renderer-tYmQUp4d.mjs} +2 -2
  240. package/dist/{renderer-oR1LvHeO.mjs.map → renderer-tYmQUp4d.mjs.map} +1 -1
  241. package/dist/renderer-tuudA_RZ.mjs +5 -0
  242. package/dist/{renderer-D8m3fuRp.mjs → renderer-wrXFfvpJ.mjs} +2 -2
  243. package/dist/{renderer-D8m3fuRp.mjs.map → renderer-wrXFfvpJ.mjs.map} +1 -1
  244. package/dist/renderer-yyn8S821.mjs +5 -0
  245. package/dist/{renderers-CP8CFWDs-EZZPEbhW.mjs → renderers-CP8CFWDs-CZJ7NRsl.mjs} +2 -2
  246. package/dist/{renderers-CP8CFWDs-EZZPEbhW.mjs.map → renderers-CP8CFWDs-CZJ7NRsl.mjs.map} +1 -1
  247. package/dist/signals/index.mjs +4 -4
  248. package/dist/{src-r7Suenhp.mjs → src-_l81YkMD.mjs} +612 -117
  249. package/dist/src-_l81YkMD.mjs.map +1 -0
  250. package/package.json +59 -58
  251. package/dist/dist-BuirkW-f.mjs.map +0 -1
  252. package/dist/dist-DBdxM6xv.mjs.map +0 -1
  253. package/dist/fonts-DNx6ps2p.mjs.map +0 -1
  254. package/dist/index-CalU-mpZ.d.mts.map +0 -1
  255. package/dist/index-N1tMc5Z9.d.mts.map +0 -1
  256. package/dist/preview-engine/chunk-2TCJSHFA.mjs +0 -1974
  257. package/dist/preview-engine/chunk-Q7XC3FI7.mjs +0 -3
  258. package/dist/preview-engine/chunk-ZZAZF6VC.mjs +0 -5
  259. package/dist/program-O2bWX0cs.mjs.map +0 -1
  260. package/dist/renderer-0441BN0U.mjs +0 -5
  261. package/dist/renderer-3qDgFc-W.mjs +0 -5
  262. package/dist/renderer-6AIqTN5Z.mjs +0 -5
  263. package/dist/renderer-B7MZ5R7u.mjs +0 -5
  264. package/dist/renderer-BE2rIA4B.mjs +0 -5
  265. package/dist/renderer-BIQ81ln4.mjs +0 -5
  266. package/dist/renderer-BKm3_Ob3.mjs +0 -5
  267. package/dist/renderer-BNdT1Wwf.mjs +0 -5
  268. package/dist/renderer-BQycs1q_.mjs +0 -5
  269. package/dist/renderer-Bj7MxXfk.mjs +0 -5
  270. package/dist/renderer-BjRAGYYC.mjs +0 -5
  271. package/dist/renderer-BqE2BQ_X.mjs +0 -5
  272. package/dist/renderer-Bz5BMkOE.mjs +0 -5
  273. package/dist/renderer-CDOSfB9H.mjs +0 -5
  274. package/dist/renderer-CT26yQT-.mjs +0 -5
  275. package/dist/renderer-CZeAbz48.mjs +0 -5
  276. package/dist/renderer-D50b7kip.mjs +0 -5
  277. package/dist/renderer-D5LmrO96.mjs +0 -5
  278. package/dist/renderer-DCvqZ5o_.mjs +0 -5
  279. package/dist/renderer-DJGJeGEn.mjs +0 -5
  280. package/dist/renderer-DONvNNXi.mjs +0 -5
  281. package/dist/renderer-DPaSo--Y.mjs +0 -6
  282. package/dist/renderer-DfYYokhr.mjs +0 -5
  283. package/dist/renderer-DlIJhdEM.mjs +0 -5
  284. package/dist/renderer-DqD3nMtv.mjs +0 -5
  285. package/dist/renderer-DrIl-uGt.mjs +0 -5
  286. package/dist/renderer-DyCB3Q1d.mjs +0 -5
  287. package/dist/renderer-DyJ-iSv6.mjs +0 -5
  288. package/dist/renderer-Dzs0jV0G.mjs +0 -5
  289. package/dist/renderer-HIKXw5-Y.mjs +0 -5
  290. package/dist/renderer-Jgt2g8Wp.mjs +0 -5
  291. package/dist/renderer-KnZWmT-M.mjs +0 -5
  292. package/dist/renderer-OMSXddG9.mjs +0 -5
  293. package/dist/renderer-P78xh6OV.mjs +0 -5
  294. package/dist/renderer-gaFP1Kak.mjs +0 -5
  295. package/dist/renderer-lQ8gH7Zd.mjs +0 -5
  296. package/dist/src-r7Suenhp.mjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { H as Signal, Tt as frameArraySignal, V as ProgrammaticSignal, gt as createVirtualMedia, lt as appendOperation, y as Effect$1 } from "./dist-D021IFfp.mjs";
2
- import { F as getPrimitiveGeometry, K as mediaDecoderCache, N as generateExtrudedTextGeometry, Z as parseSvgPathToSegments, _ as buildShapeSvgPath, p as SlugFontCache, q as parseColor, z as inputStore } from "./dist-BuirkW-f.mjs";
3
- import { n as decodeAudioSource } from "./dist-DBdxM6xv.mjs";
4
- import { t as FontManager } from "./fonts-DNx6ps2p.mjs";
2
+ import { F as getPrimitiveGeometry, K as mediaDecoderCache, N as generateExtrudedTextGeometry, Z as parseSvgPathToSegments, _ as buildShapeSvgPath, p as SlugFontCache, q as parseColor$1, z as inputStore } from "./dist-cC6nOaMR.mjs";
3
+ import { n as decodeAudioSource } from "./dist-DSKhnhDk.mjs";
4
+ import { t as FontManager } from "./fonts-B6a4CyoM.mjs";
5
5
  import { s as TensorPipeline } from "./dist-C_SMBmHr.mjs";
6
6
  import { a as COCO17_KEYPOINT_NAMES, d as VisionNode, f as VisionRunner, g as pinNodeToObject, h as pinNodeToLandmark, m as mergeSubjectMask, n as CLIP_SUBJECT, p as analyzeSequence, u as VisionBundle } from "./renderer-Duorbrb8.mjs";
7
- import { N as compositorToProgram, U as lintComposition, W as mergeAnimationTracks, d as LayerAnimation } from "./program-O2bWX0cs.mjs";
8
- import { C as effectFactories, H as Dither, I as ColorBalance, K as Iridescence, L as ColorKey, M as CRT, R as Contour, S as Vision, T as Ascii, Y as LayerStyle, _ as SelectiveColor, a as CustomEffect, at as Posterize, b as TileOffset, c as GradientMap, d as Levels, et as OpArt, f as Modulate, g as SSAO, h as Relight3D, ht as Vignette, i as Curves, it as Pixelate, l as HalftoneScreen, m as PBRGlass, nt as Painterly, o as DepthOfField, ot as ProceduralVFX, p as MotionBlur, pt as Toon, q as Kaleidoscope, r as Crop, s as FilmGrain, st as RGBSplit, t as ApplyLUT, u as HighPass, v as ShadowsHighlights, w as Blur, x as UnsharpMask, y as TemporalDeflicker } from "./effects-B263lgUi.mjs";
9
- import { a as HeadlessMediaRenderer, n as renderFrameGrid } from "./renderer-BfQdc3RM.mjs";
7
+ import { N as compositorToProgram, U as lintComposition, W as mergeAnimationTracks, d as LayerAnimation } from "./program-W4CWO2bp.mjs";
8
+ import { C as effectFactories, H as Dither, I as ColorBalance, K as Iridescence, L as ColorKey, M as CRT, R as Contour, S as Vision, T as Ascii, Y as LayerStyle, _ as SelectiveColor, a as CustomEffect, at as Posterize, b as TileOffset, c as GradientMap, d as Levels, et as OpArt, f as Modulate, g as SSAO, h as Relight3D, ht as Vignette, i as Curves, it as Pixelate, l as HalftoneScreen, m as PBRGlass, nt as Painterly, o as DepthOfField, ot as ProceduralVFX, p as MotionBlur, pt as Toon, q as Kaleidoscope, r as Crop, s as FilmGrain, st as RGBSplit, t as ApplyLUT, u as HighPass, v as ShadowsHighlights, w as Blur, x as UnsharpMask, y as TemporalDeflicker } from "./effects-Dvdwndk0.mjs";
9
+ import { a as HeadlessMediaRenderer, n as renderFrameGrid } from "./renderer-DGsWlXjl.mjs";
10
10
  import { z, z as z$2 } from "zod";
11
11
  import path from "node:path";
12
12
  import fs from "node:fs/promises";
@@ -317,8 +317,8 @@ async function* serverSentEvents(body) {
317
317
  end = buffer.indexOf("\n\n");
318
318
  }
319
319
  }
320
- const last = parseBlock(buffer);
321
- if (last) yield last;
320
+ const last$1 = parseBlock(buffer);
321
+ if (last$1) yield last$1;
322
322
  }
323
323
  function parseBlock(block) {
324
324
  let event = "message";
@@ -360,11 +360,11 @@ async function stream(model, { input, abortSignal }) {
360
360
  requestId
361
361
  });
362
362
  const source = outputs(response.body, requestId);
363
- let last;
363
+ let last$1;
364
364
  let finished;
365
365
  async function* tracked() {
366
366
  for await (const value of source) {
367
- last = value;
367
+ last$1 = value;
368
368
  yield value;
369
369
  }
370
370
  }
@@ -372,12 +372,12 @@ async function stream(model, { input, abortSignal }) {
372
372
  const drain = async () => {
373
373
  let step = await iterator.next();
374
374
  while (!step.done) step = await iterator.next();
375
- if (last === void 0) throw new ApiError({
375
+ if (last$1 === void 0) throw new ApiError({
376
376
  message: "Stream had no output",
377
377
  status: 502,
378
378
  requestId
379
379
  });
380
- return last;
380
+ return last$1;
381
381
  };
382
382
  return {
383
383
  requestId,
@@ -682,7 +682,7 @@ function curveOf(curve) {
682
682
  if (curve === "step") return curveStepAfter;
683
683
  return curveMonotoneX;
684
684
  }
685
- function withAlpha(color$1, alpha) {
685
+ function withAlpha$1(color$1, alpha) {
686
686
  const hex = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(color$1.trim());
687
687
  if (!hex) return color$1;
688
688
  let h = hex[1];
@@ -1013,7 +1013,7 @@ function buildChart(options, props, defaultFontFamily) {
1013
1013
  y: round$1(plot.y + y(0) - 1),
1014
1014
  width: plot.width,
1015
1015
  height: 2,
1016
- background: withAlpha("#94a3b8", .45)
1016
+ background: withAlpha$1("#94a3b8", .45)
1017
1017
  });
1018
1018
  if (timing.enabled) node.animate(fadeIn(timing, 0, timing.duration / 2));
1019
1019
  children.push(node);
@@ -1164,8 +1164,8 @@ function buildChart(options, props, defaultFontFamily) {
1164
1164
  ...roundRect(frame),
1165
1165
  d: roundPath(d$1),
1166
1166
  fillType: "linear",
1167
- fillColor: withAlpha(color$1, .45),
1168
- gradientEndColor: withAlpha(color$1, .02),
1167
+ fillColor: withAlpha$1(color$1, .45),
1168
+ gradientEndColor: withAlpha$1(color$1, .02),
1169
1169
  gradientAngle: 90
1170
1170
  });
1171
1171
  if (timing.enabled) node.animate(fadeIn(timing, delay + timing.duration * .4, timing.duration));
@@ -2394,7 +2394,7 @@ var Particles = class extends Effect$1 {
2394
2394
  const width = options.width;
2395
2395
  const height = options.height;
2396
2396
  const colors = (Array.isArray(options.color) ? options.color : [options.color ?? "#ffffff"]).map((c) => {
2397
- const p = parseColor(c);
2397
+ const p = parseColor$1(c);
2398
2398
  return [
2399
2399
  p.r,
2400
2400
  p.g,
@@ -5195,7 +5195,7 @@ const Styles = {
5195
5195
  };
5196
5196
 
5197
5197
  //#endregion
5198
- //#region ../components/dist/meta-DHC7xghM.mjs
5198
+ //#region ../components/dist/meta-VjYvRsYe.mjs
5199
5199
  /** splitmix32: tiny, fast, and well distributed for animation jitter. */
5200
5200
  function rng(seed) {
5201
5201
  let state = seed >>> 0;
@@ -5367,9 +5367,11 @@ function resolveMotion(input, kind, theme, fps = 30) {
5367
5367
  duration: Math.max(1, Math.round(o.duration ?? scaleFrames(theme.motion.speed.base, fps))),
5368
5368
  ease: o.ease ?? (o.preset === "pop" ? theme.motion.ease.snap : kind === "enter" ? theme.motion.ease.enter : theme.motion.ease.exit),
5369
5369
  distance: o.distance ?? (o.preset.startsWith("slide-") ? 120 : 40) * theme.scale,
5370
- delay: Math.max(0, Math.round(o.delay ?? 0))
5370
+ delay: Math.max(0, Math.round(o.delay ?? 0)),
5371
+ blur: shutter(o.blur ?? o.preset.startsWith("slide-"))
5371
5372
  };
5372
5373
  }
5374
+ const shutter = (blur) => blur === true ? 90 : blur === false ? 0 : Math.max(0, Math.min(360, blur));
5373
5375
  const isMask = (m) => m.preset.startsWith("mask-");
5374
5376
  /** Offset (dx, dy) a translating preset starts from (enter) or ends at (exit). */
5375
5377
  function offsetOf(m, size$1) {
@@ -5484,6 +5486,131 @@ function exitAnimation(m, end, size$1) {
5484
5486
  }
5485
5487
  return anim;
5486
5488
  }
5489
+ const NAMED = {
5490
+ white: [
5491
+ 255,
5492
+ 255,
5493
+ 255,
5494
+ 1
5495
+ ],
5496
+ black: [
5497
+ 0,
5498
+ 0,
5499
+ 0,
5500
+ 1
5501
+ ],
5502
+ transparent: [
5503
+ 0,
5504
+ 0,
5505
+ 0,
5506
+ 0
5507
+ ]
5508
+ };
5509
+ /** The color's channels, or null when the format isn't one listed above. */
5510
+ function parseColor(color$1) {
5511
+ const c = color$1.trim().toLowerCase();
5512
+ const named = NAMED[c];
5513
+ if (named) return [...named];
5514
+ const hex = c.match(/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/);
5515
+ if (hex?.[1]) {
5516
+ const h = hex[1].length <= 4 ? [...hex[1]].map((x) => x + x).join("") : hex[1];
5517
+ const byte = (i) => Number.parseInt(h.slice(i, i + 2), 16);
5518
+ return [
5519
+ byte(0),
5520
+ byte(2),
5521
+ byte(4),
5522
+ h.length === 8 ? byte(6) / 255 : 1
5523
+ ];
5524
+ }
5525
+ const fn$1 = c.match(/^rgba?\(([^)]*)\)$/);
5526
+ if (fn$1?.[1]) {
5527
+ const parts = fn$1[1].split(/[\s,/]+/).filter(Boolean);
5528
+ if (parts.length !== 3 && parts.length !== 4) return null;
5529
+ const num$2$1 = (p, max) => p.endsWith("%") ? Number.parseFloat(p) / 100 * max : Number(p);
5530
+ const [r, g, b] = parts.slice(0, 3).map((p) => num$2$1(p, 255));
5531
+ const a = parts[3] === void 0 ? 1 : num$2$1(parts[3], 1);
5532
+ if ([
5533
+ r,
5534
+ g,
5535
+ b,
5536
+ a
5537
+ ].some((v) => v === void 0 || Number.isNaN(v))) return null;
5538
+ return [
5539
+ r,
5540
+ g,
5541
+ b,
5542
+ a
5543
+ ];
5544
+ }
5545
+ return null;
5546
+ }
5547
+ const css = ([r, g, b, a]) => `rgba(${Math.round(r)},${Math.round(g)},${Math.round(b)},${+a.toFixed(3)})`;
5548
+ /** `color` at `alpha` (replacing its own); unknown formats pass through. */
5549
+ function withAlpha(color$1, alpha) {
5550
+ const c = parseColor(color$1);
5551
+ return c ? css([
5552
+ c[0],
5553
+ c[1],
5554
+ c[2],
5555
+ alpha
5556
+ ]) : color$1;
5557
+ }
5558
+ /**
5559
+ * `color` fully transparent, keeping its hue, so a gradient fading to it has
5560
+ * no dark fringe. Unknown formats give plain `rgba(0,0,0,0)`.
5561
+ */
5562
+ function transparent(color$1) {
5563
+ const c = parseColor(color$1);
5564
+ return css(c ? [
5565
+ c[0],
5566
+ c[1],
5567
+ c[2],
5568
+ 0
5569
+ ] : [
5570
+ 0,
5571
+ 0,
5572
+ 0,
5573
+ 0
5574
+ ]);
5575
+ }
5576
+ /** Mix `a` toward `b` by `t` (0 → a, 1 → b): `#rrggbb` when both are opaque. */
5577
+ function mix(a, b, t) {
5578
+ const x = parseColor(a);
5579
+ const y = parseColor(b);
5580
+ if (!x || !y) return a;
5581
+ const m = x.map((v, k) => v + (y[k] - v) * t);
5582
+ if (m[3] < 1) return css(m);
5583
+ return `#${m.slice(0, 3).map((v) => Math.round(v).toString(16).padStart(2, "0")).join("")}`;
5584
+ }
5585
+ /** WCAG relative luminance (0 black … 1 white), or null for unknown formats. */
5586
+ function luminance(color$1) {
5587
+ const c = parseColor(color$1);
5588
+ if (!c) return null;
5589
+ const channel = (v) => {
5590
+ const s = v / 255;
5591
+ return s <= .03928 ? s / 12.92 : ((s + .055) / 1.055) ** 2.4;
5592
+ };
5593
+ return .2126 * channel(c[0]) + .7152 * channel(c[1]) + .0722 * channel(c[2]);
5594
+ }
5595
+ /** WCAG contrast ratio of two colors, or null when either is unknown. */
5596
+ function contrastRatio(a, b) {
5597
+ const la = luminance(a);
5598
+ const lb = luminance(b);
5599
+ if (la === null || lb === null) return null;
5600
+ const [hi, lo] = la > lb ? [la, lb] : [lb, la];
5601
+ return (hi + .05) / (lo + .05);
5602
+ }
5603
+ /**
5604
+ * True when black text reads better than white on `color` (luminance above
5605
+ * ~0.18). Unknown formats count as dark.
5606
+ */
5607
+ function isLight(color$1) {
5608
+ return (luminance(color$1) ?? 0) > .179;
5609
+ }
5610
+ /** Whichever of `light` / `dark` ink reads better on `background`. */
5611
+ function inkOn(background, light = "#ffffff", dark = "#0b0c0e") {
5612
+ return (contrastRatio(light, background) ?? 0) >= (contrastRatio(dark, background) ?? 0) ? light : dark;
5613
+ }
5487
5614
  /**
5488
5615
  * Design tokens every component reads instead of hard-coded colors, fonts and
5489
5616
  * timings. `defineTheme` deep-merges a partial theme over `themes.graphite`.
@@ -5499,6 +5626,68 @@ const motion = {
5499
5626
  fast: 8,
5500
5627
  base: 16,
5501
5628
  slow: 30
5629
+ },
5630
+ spring: {
5631
+ settle: {
5632
+ stiffness: 230,
5633
+ damping: 24
5634
+ },
5635
+ base: {
5636
+ stiffness: 260,
5637
+ damping: 20
5638
+ },
5639
+ pop: {
5640
+ stiffness: 320,
5641
+ damping: 14
5642
+ }
5643
+ }
5644
+ };
5645
+ const weight = {
5646
+ regular: 400,
5647
+ medium: 500,
5648
+ semibold: 600,
5649
+ bold: 700,
5650
+ heavy: 800
5651
+ };
5652
+ /** Dark grounds need deeper shadows, and a lit top edge to separate surfaces. */
5653
+ const darkElevation = {
5654
+ low: {
5655
+ opacity: .32,
5656
+ distance: 3,
5657
+ size: 10,
5658
+ edge: .07
5659
+ },
5660
+ mid: {
5661
+ opacity: .4,
5662
+ distance: 10,
5663
+ size: 30,
5664
+ edge: .08
5665
+ },
5666
+ high: {
5667
+ opacity: .5,
5668
+ distance: 22,
5669
+ size: 60,
5670
+ edge: .1
5671
+ }
5672
+ };
5673
+ const lightElevation = {
5674
+ low: {
5675
+ opacity: .1,
5676
+ distance: 2,
5677
+ size: 8,
5678
+ edge: 0
5679
+ },
5680
+ mid: {
5681
+ opacity: .14,
5682
+ distance: 8,
5683
+ size: 26,
5684
+ edge: 0
5685
+ },
5686
+ high: {
5687
+ opacity: .2,
5688
+ distance: 18,
5689
+ size: 54,
5690
+ edge: 0
5502
5691
  }
5503
5692
  };
5504
5693
  const shape = {
@@ -5522,6 +5711,7 @@ const fonts = {
5522
5711
  /** Built-in themes. Fonts are never bundled: register the families you use. */
5523
5712
  const themes = {
5524
5713
  graphite: {
5714
+ mode: "dark",
5525
5715
  color: {
5526
5716
  bg: "#0d0e11",
5527
5717
  surface: "#16181d",
@@ -5533,14 +5723,18 @@ const themes = {
5533
5723
  accent2: "#b07cff",
5534
5724
  positive: "#3ecf8e",
5535
5725
  negative: "#ff5c5c",
5536
- highlight: "#ffd23f"
5726
+ highlight: "#ffd23f",
5727
+ shadow: "#000000"
5537
5728
  },
5538
5729
  font: fonts,
5730
+ weight,
5539
5731
  ...shape,
5732
+ elevation: darkElevation,
5540
5733
  motion,
5541
5734
  scale: 1
5542
5735
  },
5543
5736
  paper: {
5737
+ mode: "light",
5544
5738
  color: {
5545
5739
  bg: "#f4f1ea",
5546
5740
  surface: "#fffdf8",
@@ -5552,14 +5746,18 @@ const themes = {
5552
5746
  accent2: "#1f5fe0",
5553
5747
  positive: "#1f8a4c",
5554
5748
  negative: "#c8282d",
5555
- highlight: "#ffe066"
5749
+ highlight: "#ffe066",
5750
+ shadow: "#3b2f1e"
5556
5751
  },
5557
5752
  font: fonts,
5753
+ weight,
5558
5754
  ...shape,
5755
+ elevation: lightElevation,
5559
5756
  motion,
5560
5757
  scale: 1
5561
5758
  },
5562
5759
  signal: {
5760
+ mode: "dark",
5563
5761
  color: {
5564
5762
  bg: "#000000",
5565
5763
  surface: "#111111",
@@ -5571,10 +5769,13 @@ const themes = {
5571
5769
  accent2: "#ff2e88",
5572
5770
  positive: "#00e676",
5573
5771
  negative: "#ff1744",
5574
- highlight: "#c6ff00"
5772
+ highlight: "#c6ff00",
5773
+ shadow: "#000000"
5575
5774
  },
5576
5775
  font: fonts,
5776
+ weight,
5577
5777
  ...shape,
5778
+ elevation: darkElevation,
5578
5779
  motion: {
5579
5780
  ...motion,
5580
5781
  ease: {
@@ -5585,6 +5786,20 @@ const themes = {
5585
5786
  fast: 6,
5586
5787
  base: 12,
5587
5788
  slow: 24
5789
+ },
5790
+ spring: {
5791
+ settle: {
5792
+ stiffness: 300,
5793
+ damping: 26
5794
+ },
5795
+ base: {
5796
+ stiffness: 340,
5797
+ damping: 22
5798
+ },
5799
+ pop: {
5800
+ stiffness: 400,
5801
+ damping: 14
5802
+ }
5588
5803
  }
5589
5804
  },
5590
5805
  scale: 1
@@ -5596,6 +5811,10 @@ const themes = {
5596
5811
  */
5597
5812
  function defineTheme(input = {}, base = themes.graphite) {
5598
5813
  const theme = merge(base, input);
5814
+ if (input.mode === void 0 && input.color?.bg !== void 0) {
5815
+ theme.mode = isLight(theme.color.bg) ? "light" : "dark";
5816
+ if (input.elevation === void 0) theme.elevation = theme.mode === "light" ? lightElevation : darkElevation;
5817
+ }
5599
5818
  const ratio = contrastRatio(theme.color.ink, theme.color.surface);
5600
5819
  if (ratio !== null && ratio < 4.5) throw new Error(`Theme contrast too low: ink ${theme.color.ink} on surface ${theme.color.surface} is ${ratio.toFixed(2)}:1 (needs 4.5:1).`);
5601
5820
  return theme;
@@ -5611,24 +5830,6 @@ function merge(base, over) {
5611
5830
  for (const [key, value] of Object.entries(over)) out[key] = merge(out[key], value);
5612
5831
  return out;
5613
5832
  }
5614
- /** WCAG contrast ratio of two hex colors, or null when either isn't hex. */
5615
- function contrastRatio(a, b) {
5616
- const la = luminance(a);
5617
- const lb = luminance(b);
5618
- if (la === null || lb === null) return null;
5619
- const [hi, lo] = la > lb ? [la, lb] : [lb, la];
5620
- return (hi + .05) / (lo + .05);
5621
- }
5622
- function luminance(hex) {
5623
- const m = hex.trim().match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);
5624
- if (!m?.[1]) return null;
5625
- const h = m[1].length === 3 ? m[1].split("").map((c) => c + c).join("") : m[1];
5626
- const channel = (i) => {
5627
- const c = Number.parseInt(h.slice(i, i + 2), 16) / 255;
5628
- return c <= .03928 ? c / 12.92 : ((c + .055) / 1.055) ** 2.4;
5629
- };
5630
- return .2126 * channel(0) + .7152 * channel(2) + .0722 * channel(4);
5631
- }
5632
5833
  /** Shift every cue's `frame` (and `end`, when present) by `offset`. */
5633
5834
  function offsetCues(cues, offset) {
5634
5835
  const out = {};
@@ -5670,7 +5871,8 @@ function motionPresetSchema() {
5670
5871
  duration: z.number().int().positive().optional(),
5671
5872
  ease: z.string().optional(),
5672
5873
  distance: z.number().optional(),
5673
- delay: z.number().int().min(0).optional()
5874
+ delay: z.number().int().min(0).optional(),
5875
+ blur: z.union([z.boolean(), z.number().min(0).max(360)]).optional()
5674
5876
  })]);
5675
5877
  }
5676
5878
  let baseProps;
@@ -5695,12 +5897,42 @@ function buildBaseProps() {
5695
5897
  theme: z.custom((v) => typeof v === "object" && v !== null).optional(),
5696
5898
  seed: z.number().int().optional(),
5697
5899
  fps: z.number().positive().optional(),
5900
+ canvas: z.object({
5901
+ width: z.number().positive(),
5902
+ height: z.number().positive()
5903
+ }).strict().optional(),
5698
5904
  customize: fn().optional()
5699
5905
  });
5700
5906
  }
5701
5907
  function defineComponent(definition) {
5702
5908
  return definition;
5703
5909
  }
5910
+ /**
5911
+ * Wrap component factories so every call starts from the project's frame
5912
+ * rate, canvas, theme and seed. Props given at the call win; a call's
5913
+ * partial `theme` merges over the default theme, not over `graphite`.
5914
+ *
5915
+ * ```ts
5916
+ * const ui = withDefaults({ fps: 60, canvas: { width: 1080, height: 1920 }, theme: themes.paper });
5917
+ * const Captions = ui(CaptionsBase);
5918
+ * ```
5919
+ */
5920
+ function withDefaults(defaults) {
5921
+ const base = defaults.theme ? defineTheme(defaults.theme) : void 0;
5922
+ return (factory) => (props) => factory({
5923
+ ...defaults,
5924
+ ...props,
5925
+ theme: props.theme && base ? defineTheme(props.theme, base) : props.theme ?? base
5926
+ });
5927
+ }
5928
+ /**
5929
+ * The frame `gap` frames after `node` ends: `at: after(title, 6)`. Throws
5930
+ * for open-ended components, which have no end until given a `duration`.
5931
+ */
5932
+ function after(node, gap = 0) {
5933
+ if (!Number.isFinite(node.span.end)) throw new Error("after(): this component is open-ended (it stays until its parent ends). Give it a `duration`, or use its cues.");
5934
+ return node.span.end + gap;
5935
+ }
5704
5936
  const kebab = (name) => name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
5705
5937
  /**
5706
5938
  * Bind a definition to a host, producing the user-facing factory. framefields
@@ -5713,12 +5945,40 @@ function bind(host$1, definition) {
5713
5945
  schema ??= basePropsSchema().extend(definition.props()).strict();
5714
5946
  const parsed = schema.safeParse(input ?? {});
5715
5947
  if (!parsed.success) {
5716
- const issues = parsed.error.issues.map((i) => ` - ${i.path.join(".") || "(props)"}: ${i.message}`).join("\n");
5717
- throw new Error(`${definition.name}: invalid props\n${issues}`);
5948
+ const known = Object.keys(schema.shape);
5949
+ const issues = parsed.error.issues.map((i) => {
5950
+ const where = i.path.join(".") || "(props)";
5951
+ const hint = i.code === "unrecognized_keys" && i.path.length === 0 ? suggest(i.keys, known) : "";
5952
+ return ` - ${where}: ${i.message}${hint}`;
5953
+ }).join("\n");
5954
+ const who = typeof input?.id === "string" ? `${definition.name}#${input.id}` : definition.name;
5955
+ throw new Error(`${who}: invalid props\n${issues}`);
5718
5956
  }
5719
5957
  return assemble(host$1, definition, parsed.data);
5720
5958
  };
5721
5959
  }
5960
+ /** ` (did you mean "label"?)` for keys one or two edits from a known prop. */
5961
+ function suggest(keys, known) {
5962
+ const hints = keys.flatMap((key) => {
5963
+ let best;
5964
+ let bestD = 3;
5965
+ for (const k of known) {
5966
+ const d = editDistance(key.toLowerCase(), k.toLowerCase());
5967
+ if (d < bestD) [best, bestD] = [k, d];
5968
+ }
5969
+ return best ? [`"${key}" → "${best}"`] : [];
5970
+ });
5971
+ return hints.length > 0 ? ` (did you mean ${hints.join(", ")}?)` : "";
5972
+ }
5973
+ function editDistance(a, b) {
5974
+ let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
5975
+ for (let i = 1; i <= a.length; i++) {
5976
+ const row = [i];
5977
+ for (let j = 1; j <= b.length; j++) row[j] = Math.min(prev[j] + 1, row[j - 1] + 1, prev[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
5978
+ prev = row;
5979
+ }
5980
+ return prev[b.length];
5981
+ }
5722
5982
  function assemble(host$1, definition, props) {
5723
5983
  const theme = defineTheme(props.theme ?? {});
5724
5984
  const fps = props.fps ?? 30;
@@ -5740,7 +6000,11 @@ function assemble(host$1, definition, props) {
5740
6000
  duration: props.duration,
5741
6001
  at: props.at ?? 0
5742
6002
  },
5743
- hold
6003
+ hold,
6004
+ canvas: props.canvas ?? {
6005
+ width: 1920 * theme.scale,
6006
+ height: 1080 * theme.scale
6007
+ }
5744
6008
  };
5745
6009
  const built = definition.build(ctx, props);
5746
6010
  const enter = resolveMotion(props.enter === void 0 ? defaults.enter : props.enter, "enter", theme, fps);
@@ -5750,6 +6014,7 @@ function assemble(host$1, definition, props) {
5750
6014
  if (duration === null && exit) throw new Error(`${definition.name}: an exit needs a known end. Give \`duration\`, or drop \`exit\`.`);
5751
6015
  const width = props.width ?? built.width;
5752
6016
  const height = props.height ?? built.height;
6017
+ const blur = Math.max(enter?.blur ?? 0, exit?.blur ?? 0);
5753
6018
  const stage = host$1.box({
5754
6019
  id: ctx.partId("stage"),
5755
6020
  position: "absolute",
@@ -5757,6 +6022,7 @@ function assemble(host$1, definition, props) {
5757
6022
  y: 0,
5758
6023
  width,
5759
6024
  height,
6025
+ ...blur > 0 && { motionBlurShutter: blur },
5760
6026
  children: built.children
5761
6027
  });
5762
6028
  const size$1 = {
@@ -5808,6 +6074,10 @@ function assemble(host$1, definition, props) {
5808
6074
  part: {
5809
6075
  value: (name) => parts[name],
5810
6076
  enumerable: false
6077
+ },
6078
+ partNames: {
6079
+ value: Object.keys(parts),
6080
+ enumerable: false
5811
6081
  }
5812
6082
  });
5813
6083
  if (built.api) {
@@ -5872,11 +6142,11 @@ function catmullRomPoint(p0, p1, p2, p3, t) {
5872
6142
  const t2 = t1 + knot(p1, p2);
5873
6143
  const t3 = t2 + knot(p2, p3);
5874
6144
  const u = t1 + (t2 - t1) * t;
5875
- const mix = (a, b, ta, tb) => tb === ta ? a : lerp2(a, b, (u - ta) / (tb - ta));
5876
- const a1 = mix(p0, p1, t0, t1);
5877
- const a2 = mix(p1, p2, t1, t2);
5878
- const a3 = mix(p2, p3, t2, t3);
5879
- return mix(mix(a1, a2, t0, t2), mix(a2, a3, t1, t3), t1, t2);
6145
+ const mix$1 = (a, b, ta, tb) => tb === ta ? a : lerp2(a, b, (u - ta) / (tb - ta));
6146
+ const a1 = mix$1(p0, p1, t0, t1);
6147
+ const a2 = mix$1(p1, p2, t1, t2);
6148
+ const a3 = mix$1(p2, p3, t2, t3);
6149
+ return mix$1(mix$1(a1, a2, t0, t2), mix$1(a2, a3, t1, t3), t1, t2);
5880
6150
  }
5881
6151
  function arcPath(points) {
5882
6152
  if (points.length === 0) throw new Error("arcPath: no points");
@@ -6406,6 +6676,182 @@ function targetPoint(resolved, frame = 0, isText = false) {
6406
6676
  const first = resolved.rects[0];
6407
6677
  return anchorPoint(resolved.anchor === "tip" ? first : boundsOf(resolved.rects), resolved.anchor, isText);
6408
6678
  }
6679
+ const clamp01$1 = (t) => t < 0 ? 0 : t > 1 ? 1 : t;
6680
+ /** The "in" form of each base curve; `out` and `inOut` derive from it. */
6681
+ const BASES = {
6682
+ none: () => (x) => x,
6683
+ linear: () => (x) => x,
6684
+ power1: () => (x) => x * x,
6685
+ power2: () => (x) => x * x * x,
6686
+ cubic: () => (x) => x * x * x,
6687
+ power3: () => (x) => x ** 4,
6688
+ sine: () => (x) => 1 - Math.cos(x * Math.PI / 2),
6689
+ circ: () => (x) => 1 - Math.sqrt(Math.max(0, 1 - x * x)),
6690
+ expo: () => (x) => x === 0 ? 0 : 2 ** (10 * (x - 1)),
6691
+ back: ([overshoot = 1.70158]) => (x) => (overshoot + 1) * x * x * x - overshoot * x * x,
6692
+ elastic: ([amplitude = 1, period = .3]) => {
6693
+ const a = Math.max(1, amplitude);
6694
+ const s = period / (2 * Math.PI) * Math.asin(1 / a);
6695
+ return (x) => x === 0 || x === 1 ? x : -(a * 2 ** (10 * (x - 1)) * Math.sin((x - 1 - s) * (2 * Math.PI) / period));
6696
+ },
6697
+ bounce: () => (x) => 1 - bounceOut(1 - x)
6698
+ };
6699
+ function bounceOut(x) {
6700
+ const n1 = 7.5625;
6701
+ const d1 = 2.75;
6702
+ if (x < 1 / d1) return n1 * x * x;
6703
+ if (x < 2 / d1) return n1 * (x - 1.5 / d1) ** 2 + .75;
6704
+ if (x < 2.5 / d1) return n1 * (x - 2.25 / d1) ** 2 + .9375;
6705
+ return n1 * (x - 2.625 / d1) ** 2 + .984375;
6706
+ }
6707
+ const cache = /* @__PURE__ */ new Map();
6708
+ /** Parse an ease name into a function on [0, 1]. Unknown names throw. */
6709
+ function ease(name) {
6710
+ if (!name) return (t) => clamp01$1(t);
6711
+ const cached = cache.get(name);
6712
+ if (cached) return cached;
6713
+ const match = name.trim().match(/^([a-zA-Z0-9]+)(?:\.([a-zA-Z]+))?(?:\(([^)]*)\))?$/);
6714
+ if (!match) throw new Error(`Unknown ease "${name}"`);
6715
+ const base = (match[1] ?? "").toLowerCase();
6716
+ const dir = (match[2] ?? "out").toLowerCase();
6717
+ const params = (match[3] ?? "").split(",").map((s) => Number.parseFloat(s)).filter((n) => !Number.isNaN(n));
6718
+ let fn$1;
6719
+ if (base === "hold") fn$1 = (t) => t >= 1 ? 1 : 0;
6720
+ else {
6721
+ const make = BASES[base];
6722
+ if (!make) throw new Error(`Unknown ease "${name}"`);
6723
+ const easeIn = make(params);
6724
+ if (dir === "in") fn$1 = (t) => easeIn(clamp01$1(t));
6725
+ else if (dir === "inout") fn$1 = (t) => {
6726
+ const s = clamp01$1(t);
6727
+ return s < .5 ? easeIn(s * 2) / 2 : 1 - easeIn((1 - s) * 2) / 2;
6728
+ };
6729
+ else if (dir === "out") fn$1 = (t) => 1 - easeIn(1 - clamp01$1(t));
6730
+ else throw new Error(`Unknown ease direction in "${name}"`);
6731
+ }
6732
+ cache.set(name, fn$1);
6733
+ return fn$1;
6734
+ }
6735
+ /** `ease(name)(t)` in one call. */
6736
+ function evaluateEase(name, t) {
6737
+ return ease(name)(t);
6738
+ }
6739
+ /**
6740
+ * Keyframe bookkeeping shared by every component: ordering, sampling, and
6741
+ * builders that collect keys per node and prop before animating once.
6742
+ */
6743
+ /** Round to `places` decimals (default 3): keeps baked keys short and stable. */
6744
+ const round = (v, places = 3) => {
6745
+ const k = 10 ** places;
6746
+ return Math.round(v * k) / k;
6747
+ };
6748
+ /** The last element, or `undefined`. */
6749
+ const last = (list$1) => list$1[list$1.length - 1];
6750
+ /**
6751
+ * Keys in ascending frame order; of several keys on one frame, the one given
6752
+ * last wins. Input order is otherwise free.
6753
+ */
6754
+ function ascending(keys) {
6755
+ const byFrame = /* @__PURE__ */ new Map();
6756
+ for (const k of keys) byFrame.set(k[0], k);
6757
+ return [...byFrame.values()].sort((a, b) => a[0] - b[0]);
6758
+ }
6759
+ /**
6760
+ * Keys written as a timeline where each key supersedes what came before at
6761
+ * or after its frame: a key earlier than the previous one drops the later
6762
+ * ones (a retarget cancels the planned rest of a move).
6763
+ */
6764
+ function supersede(keys) {
6765
+ const out = [];
6766
+ for (const k of keys) {
6767
+ while (out.length > 0 && last(out)[0] >= k[0]) out.pop();
6768
+ out.push(k);
6769
+ }
6770
+ return out;
6771
+ }
6772
+ /**
6773
+ * A numeric track's value at `frame`, the way the renderer evaluates it:
6774
+ * each segment eased by its end key's ease, `hold` stepping on the key.
6775
+ */
6776
+ function valueAt(keys, frame) {
6777
+ const first = keys[0];
6778
+ if (!first) return 0;
6779
+ if (frame <= first[0]) return first[1];
6780
+ for (let i = 1; i < keys.length; i++) {
6781
+ const [f0, v0] = keys[i - 1];
6782
+ const [f1, v1, ease$1] = keys[i];
6783
+ if (frame > f1) continue;
6784
+ if (ease$1 === "hold") return frame === f1 ? v1 : v0;
6785
+ const t = evaluateEase(typeof ease$1 === "string" ? ease$1 : void 0, (frame - f0) / Math.max(1, f1 - f0));
6786
+ return v0 + (v1 - v0) * t;
6787
+ }
6788
+ return last(keys)[1];
6789
+ }
6790
+ /** A value track built from transitions: each eases from wherever the value is to `to`. */
6791
+ var Track = class {
6792
+ changes = [];
6793
+ constructor(initial) {
6794
+ this.initial = initial;
6795
+ }
6796
+ to(start, end, value, ease$1 = "power2.out") {
6797
+ this.changes.push({
6798
+ start,
6799
+ end: Math.max(start, end),
6800
+ to: value,
6801
+ ease: ease$1
6802
+ });
6803
+ return this;
6804
+ }
6805
+ /** Jump to `value` on `frame` (a hold key). */
6806
+ set(frame, value) {
6807
+ return this.to(frame, frame, value);
6808
+ }
6809
+ /** Ascending keyframes; a change that starts mid-transition starts from its target. */
6810
+ keys() {
6811
+ const keys = [[0, this.initial]];
6812
+ let value = this.initial;
6813
+ for (const c of [...this.changes].sort((x, y) => x.start - y.start)) {
6814
+ const prev = last(keys);
6815
+ const start = Math.max(c.start, prev[0] + (c.end === c.start ? 1 : 0));
6816
+ if (start > prev[0]) keys.push([start, value]);
6817
+ const end = Math.max(c.end, start);
6818
+ if (end === start) keys[keys.length - 1] = [
6819
+ start,
6820
+ c.to,
6821
+ "hold"
6822
+ ];
6823
+ else keys.push([
6824
+ end,
6825
+ c.to,
6826
+ c.ease
6827
+ ]);
6828
+ value = c.to;
6829
+ }
6830
+ return supersede(keys);
6831
+ }
6832
+ };
6833
+ /**
6834
+ * Keys collected per node and prop from anywhere in a build, merged into one
6835
+ * ascending track each and applied with one `animate()` per node.
6836
+ */
6837
+ var KeyBook = class {
6838
+ book = /* @__PURE__ */ new Map();
6839
+ /** Append keys for `node`'s `prop` (merged with any already given). */
6840
+ key(node, prop, keys) {
6841
+ const byProp = this.book.get(node) ?? /* @__PURE__ */ new Map();
6842
+ this.book.set(node, byProp);
6843
+ byProp.set(prop, [...byProp.get(prop) ?? [], ...keys]);
6844
+ return this;
6845
+ }
6846
+ /** Animate every node once with its merged tracks. */
6847
+ apply() {
6848
+ for (const [node, byProp] of this.book) {
6849
+ const anim = LayerAnimation.create();
6850
+ for (const [prop, keys] of byProp) anim.keys(prop, ascending(keys));
6851
+ node.animate(anim);
6852
+ }
6853
+ }
6854
+ };
6409
6855
  /**
6410
6856
  * Simplify `values` (one per frame, starting at `startFrame`) to linear keys
6411
6857
  * whose interpolation stays within `tolerance` of every sample
@@ -6472,9 +6918,9 @@ function springAt(seconds, { stiffness = 170, damping = 26, mass = 1 } = {}) {
6472
6918
  * `max` frames.
6473
6919
  */
6474
6920
  function springSettleFrames(fps, options, epsilon = .001, max = 600) {
6475
- let last = 0;
6476
- for (let f = 0; f <= max; f++) if (Math.abs(1 - springAt(f / fps, options)) > epsilon) last = f;
6477
- return Math.min(max, last + 1);
6921
+ let last$1 = 0;
6922
+ for (let f = 0; f <= max; f++) if (Math.abs(1 - springAt(f / fps, options)) > epsilon) last$1 = f;
6923
+ return Math.min(max, last$1 + 1);
6478
6924
  }
6479
6925
  /**
6480
6926
  * A spring from `from` to `to` starting at frame `start`, baked to linear
@@ -6484,65 +6930,69 @@ function springKeys(start, from, to, fps, options, tolerance = Math.max(1e-4, Ma
6484
6930
  const frames = springSettleFrames(fps, options);
6485
6931
  return bakeSamples(Array.from({ length: frames + 1 }, (_, f) => f === frames ? to : from + (to - from) * springAt(f / fps, options)), start, { tolerance });
6486
6932
  }
6487
- const clamp01$1 = (t) => t < 0 ? 0 : t > 1 ? 1 : t;
6488
- /** The "in" form of each base curve; `out` and `inOut` derive from it. */
6489
- const BASES = {
6490
- none: () => (x) => x,
6491
- linear: () => (x) => x,
6492
- power1: () => (x) => x * x,
6493
- power2: () => (x) => x * x * x,
6494
- cubic: () => (x) => x * x * x,
6495
- power3: () => (x) => x ** 4,
6496
- sine: () => (x) => 1 - Math.cos(x * Math.PI / 2),
6497
- circ: () => (x) => 1 - Math.sqrt(Math.max(0, 1 - x * x)),
6498
- expo: () => (x) => x === 0 ? 0 : 2 ** (10 * (x - 1)),
6499
- back: ([overshoot = 1.70158]) => (x) => (overshoot + 1) * x * x * x - overshoot * x * x,
6500
- elastic: ([amplitude = 1, period = .3]) => {
6501
- const a = Math.max(1, amplitude);
6502
- const s = period / (2 * Math.PI) * Math.asin(1 / a);
6503
- return (x) => x === 0 || x === 1 ? x : -(a * 2 ** (10 * (x - 1)) * Math.sin((x - 1 - s) * (2 * Math.PI) / period));
6504
- },
6505
- bounce: () => (x) => 1 - bounceOut(1 - x)
6506
- };
6507
- function bounceOut(x) {
6508
- const n1 = 7.5625;
6509
- const d1 = 2.75;
6510
- if (x < 1 / d1) return n1 * x * x;
6511
- if (x < 2 / d1) return n1 * (x - 1.5 / d1) ** 2 + .75;
6512
- if (x < 2.5 / d1) return n1 * (x - 2.25 / d1) ** 2 + .9375;
6513
- return n1 * (x - 2.625 / d1) ** 2 + .984375;
6514
- }
6515
- const cache = /* @__PURE__ */ new Map();
6516
- /** Parse an ease name into a function on [0, 1]. Unknown names throw. */
6517
- function ease(name) {
6518
- if (!name) return (t) => clamp01$1(t);
6519
- const cached = cache.get(name);
6520
- if (cached) return cached;
6521
- const match = name.trim().match(/^([a-zA-Z0-9]+)(?:\.([a-zA-Z]+))?(?:\(([^)]*)\))?$/);
6522
- if (!match) throw new Error(`Unknown ease "${name}"`);
6523
- const base = (match[1] ?? "").toLowerCase();
6524
- const dir = (match[2] ?? "out").toLowerCase();
6525
- const params = (match[3] ?? "").split(",").map((s) => Number.parseFloat(s)).filter((n) => !Number.isNaN(n));
6526
- let fn$1;
6527
- if (base === "hold") fn$1 = (t) => t >= 1 ? 1 : 0;
6528
- else {
6529
- const make = BASES[base];
6530
- if (!make) throw new Error(`Unknown ease "${name}"`);
6531
- const easeIn = make(params);
6532
- if (dir === "in") fn$1 = (t) => easeIn(clamp01$1(t));
6533
- else if (dir === "inout") fn$1 = (t) => {
6534
- const s = clamp01$1(t);
6535
- return s < .5 ? easeIn(s * 2) / 2 : 1 - easeIn((1 - s) * 2) / 2;
6536
- };
6537
- else if (dir === "out") fn$1 = (t) => 1 - easeIn(1 - clamp01$1(t));
6538
- else throw new Error(`Unknown ease direction in "${name}"`);
6933
+ /**
6934
+ * Per-frame values (frames 0…`length`) that spring to each new target from
6935
+ * wherever they are: a retarget mid-flight starts from the current value
6936
+ * (velocity isn't carried over). Bake with `bakeSamples` or bind as a signal.
6937
+ */
6938
+ function springTrack(changes, initial, length, fps, options = {
6939
+ stiffness: 230,
6940
+ damping: 24
6941
+ }) {
6942
+ const sorted = [...changes].sort((a, b) => a[0] - b[0]);
6943
+ const out = new Array(length + 1);
6944
+ let from = initial;
6945
+ let to = initial;
6946
+ let since = 0;
6947
+ let k = 0;
6948
+ for (let f = 0; f <= length; f++) {
6949
+ while (k < sorted.length && sorted[k][0] <= f) {
6950
+ from = from + (to - from) * springAt((f - since) / fps, options);
6951
+ to = sorted[k][1];
6952
+ since = sorted[k][0];
6953
+ k++;
6954
+ }
6955
+ out[f] = from + (to - from) * springAt((f - since) / fps, options);
6539
6956
  }
6540
- cache.set(name, fn$1);
6541
- return fn$1;
6957
+ return out;
6542
6958
  }
6543
- /** `ease(name)(t)` in one call. */
6544
- function evaluateEase(name, t) {
6545
- return ease(name)(t);
6959
+ /** Layer styles for `level`: a drop shadow and, when the theme asks, a top-edge highlight. */
6960
+ function elevationStyle(theme, level) {
6961
+ const e = theme.elevation[level];
6962
+ const s = theme.scale;
6963
+ return {
6964
+ ...e.opacity > 0 && { dropShadow: {
6965
+ color: theme.color.shadow,
6966
+ opacity: e.opacity,
6967
+ angle: 90,
6968
+ distance: e.distance * s,
6969
+ size: e.size * s
6970
+ } },
6971
+ ...e.edge > 0 && { innerShadow: {
6972
+ color: "#ffffff",
6973
+ opacity: e.edge,
6974
+ angle: 270,
6975
+ distance: Math.max(1, s),
6976
+ size: 0,
6977
+ blendMode: "normal"
6978
+ } }
6979
+ };
6980
+ }
6981
+ /** Put `node` at `level` (or leave it flat for `false`); returns it. */
6982
+ function elevate(host$1, node, theme, level) {
6983
+ if (level === false) return node;
6984
+ const style = elevationStyle(theme, level);
6985
+ return Object.keys(style).length > 0 ? host$1.style(node, style) : node;
6986
+ }
6987
+ /**
6988
+ * A background for a surface of `color`: a vertical sheen a few percent
6989
+ * lighter at the top on dark themes (light themes stay flat, where a
6990
+ * lighter top reads as a glare). Non-hex / non-rgb colors pass through.
6991
+ */
6992
+ function surfaceFill(color$1, theme, sheen = .05) {
6993
+ if (theme.mode === "light" || sheen <= 0) return color$1;
6994
+ const top = mix(color$1, "#ffffff", sheen);
6995
+ return top === color$1 ? color$1 : `linear-gradient(180deg, ${top} 0%, ${color$1} 100%)`;
6546
6996
  }
6547
6997
  /**
6548
6998
  * Audio analysis, offline and deterministic: decoded samples in, plain
@@ -6600,7 +7050,6 @@ function percentile(values, p) {
6600
7050
  }
6601
7051
  const db = (v) => 20 * Math.log10(v + 1e-9);
6602
7052
  const clamp01 = (v) => v < 0 ? 0 : v > 1 ? 1 : v;
6603
- const round = (v) => Math.round(v * 1e3) / 1e3;
6604
7053
  /** Band edges in Hz, log-spaced. */
6605
7054
  function bandEdges(count, minHz, maxHz) {
6606
7055
  return Array.from({ length: count + 1 }, (_, i) => minHz * (maxHz / minHz) ** (i / count));
@@ -6687,8 +7136,8 @@ function pickOnsets(flux, fps) {
6687
7136
  const near = flux.slice(Math.max(0, f - reach), f + reach + 1);
6688
7137
  const mean = near.reduce((a, b) => a + b, 0) / near.length;
6689
7138
  if (v < mean + 1.5 * Math.sqrt(near.reduce((a, b) => a + (b - mean) ** 2, 0) / near.length)) continue;
6690
- const last = beats$1[beats$1.length - 1];
6691
- if (last !== void 0 && f - last < gap) continue;
7139
+ const last$1 = beats$1[beats$1.length - 1];
7140
+ if (last$1 !== void 0 && f - last$1 < gap) continue;
6692
7141
  beats$1.push(f);
6693
7142
  }
6694
7143
  return beats$1;
@@ -6757,8 +7206,8 @@ function scheduleExpression(unit, schedule, mode, factors) {
6757
7206
  const table = Array.from({ length: n + 1 }, (_, k) => evaluateEase(schedule.ease, k / n));
6758
7207
  const idx = UNIT_INDEX[unit];
6759
7208
  const pick = (arr) => `(${arr}[${idx}]??${arr}[${arr}.length-1])`;
6760
- const weight = mode === "enter" ? "1-v" : "v";
6761
- const scaled = factors ? `(${weight})*${pick("F")}` : weight;
7209
+ const weight$1 = mode === "enter" ? "1-v" : "v";
7210
+ const scaled = factors ? `(${weight$1})*${pick("F")}` : weight$1;
6762
7211
  return [
6763
7212
  `((S,L,F)=>{`,
6764
7213
  `const t=frame-${pick("S")};`,
@@ -6825,6 +7274,52 @@ function evaluateGlyphExpression(expression, scope) {
6825
7274
  return Number.isFinite(result$1) ? Math.max(-1, Math.min(1, result$1)) : 0;
6826
7275
  }
6827
7276
  /**
7277
+ * Safe-area margins by use. Portrait leaves room for the captions, buttons
7278
+ * and handles that short-form platforms draw over the bottom and right.
7279
+ */
7280
+ const SAFE_INSETS = {
7281
+ titles: {
7282
+ landscape: {
7283
+ x: .06,
7284
+ top: .08,
7285
+ bottom: .1
7286
+ },
7287
+ portrait: {
7288
+ x: .08,
7289
+ top: .1,
7290
+ bottom: .24
7291
+ }
7292
+ },
7293
+ captions: {
7294
+ landscape: {
7295
+ x: .1,
7296
+ top: .08,
7297
+ bottom: .1
7298
+ },
7299
+ portrait: {
7300
+ x: .08,
7301
+ top: .12,
7302
+ bottom: .22
7303
+ }
7304
+ }
7305
+ };
7306
+ /**
7307
+ * The rect inside `canvas` that content keeps to. `area` forces an
7308
+ * orientation or gives the rect itself; by default a frame taller than it is
7309
+ * wide counts as portrait.
7310
+ */
7311
+ function safeArea(canvas, area$1, insets = SAFE_INSETS.titles) {
7312
+ if (area$1 && typeof area$1 === "object") return area$1;
7313
+ const { width: W, height: H } = canvas;
7314
+ const i = (area$1 ? area$1 === "portrait" : H > W) ? insets.portrait : insets.landscape;
7315
+ return {
7316
+ x: W * i.x,
7317
+ y: H * i.top,
7318
+ width: W * (1 - 2 * i.x),
7319
+ height: H * (1 - i.top - i.bottom)
7320
+ };
7321
+ }
7322
+ /**
6828
7323
  * Keystroke frames for typing at `cps` characters a second: seeded ±30 %
6829
7324
  * jitter, a beat after spaces, a longer one after punctuation. Frame `k[i]`
6830
7325
  * is when character `i` appears.
@@ -7715,7 +8210,7 @@ var Composition = class Composition {
7715
8210
  * never change. `renderVideo({ qa })` includes these automatically.
7716
8211
  */
7717
8212
  lint() {
7718
- return lintComposition(this.toSpec());
8213
+ return lintComposition(this.toSpec(), { emojiFont: FontManager.hasEmojiFont() });
7719
8214
  }
7720
8215
  };
7721
8216
  function withAnimation(node) {
@@ -8369,5 +8864,5 @@ const Effect = Object.assign(Effect$1, effectFactories, {
8369
8864
  });
8370
8865
 
8371
8866
  //#endregion
8372
- export { offsetCues as $, rich as $t, constantExpression as A, wobblePoints as At, enterAnimation as B, Layer3D as Bt, beats as C, toFrames as Ct, boxPath as D, typingFrames as Dt, boundsOf as E, transformPathData as Et, defineTheme as F, PhysicsWorld3D as Ft, frameSpan as G, accent as Gt, evaluateGlyphExpression as H, ClipVision as Ht, dist as I, PhysicsBody2D as It, hashString as J, color as Jt, glyphAnimator as K, bold as Kt, drawOnKeys as L, PhysicsWorld2D as Lt, cover as M, Styles as Mt, defineComponent as N, Physics as Nt, catmullRom as O, windowExpression as Ot, defineMeta as P, PhysicsBody3D as Pt, lineShift as Q, parseMarkup as Qt, ease as R, Lighting as Rt, basePropsSchema as S, themes as St, boilKeys as T, toSeconds as Tt, exitAnimation as U, PersonTrack as Ut, evaluateEase as V, Particles as Vt, findRange as W, DEFAULT_CHART_COLORS as Wt, lerp2 as X, mark as Xt, holdFirstKeys as Y, italic as Yt, linePath as Z, normalizeTextSpans as Zt, arrowPaths as _, stepExpression as _t, Media as a, FRAMEFIELDS_AI_PROXY_URL as an, resolveMotion as at, bakeSamples as b, textLayout as bt, section as c, scaleFrames as ct, analyzeAudio as d, springAt as dt, size as en, pulseKeys as et, MOTION_PRESETS as f, springKeys as ft, arcPath as g, staggerRanks as gt, anchorPoint as h, staggerOffsets as ht, Light as i, ApiError as in, resampleBands as it, contrastRatio as j, wordRanges as jt, chain as k, within as kt, bindComponent as l, scheduleExpression as lt, analyzeChannels as m, squigglePath as mt, Effect as n, sub as nn, rangeRects as nt, blurRegion as o, ValidationError as on, resolveTarget as ot, UNIT_INDEX as p, springSettleFrames as pt, hashRng as q, code as qt, Layer as r, sup as rn, rendererChars as rt, editTrackedRegion as s, ai as sn, rng as st, Composition as t, span as tn, quantize as tt, z$2 as u, smoothRelease as ut, audioLevelsSchema as v, targetPoint as vt, bind as w, toPathData as wt, bandEdges as x, themeFrames as xt, bakeFunction as y, targetSchema as yt, ellipsePath as z, Transition as zt };
8373
- //# sourceMappingURL=src-r7Suenhp.mjs.map
8867
+ export { glyphAnimator as $, wordRanges as $t, boilKeys as A, squigglePath as At, defineTheme as B, themes as Bt, audioLevelsSchema as C, span as Cn, scaleFrames as Ct, basePropsSchema as D, FRAMEFIELDS_AI_PROXY_URL as Dn, springKeys as Dt, bandEdges as E, ApiError as En, springAt as Et, constantExpression as F, surfaceFill as Ft, elevationStyle as G, transparent as Gt, drawOnKeys as H, toPathData as Ht, contrastRatio as I, targetPoint as It, evaluateEase as J, windowExpression as Jt, ellipsePath as K, typingFrames as Kt, cover as L, targetSchema as Lt, boxPath as M, staggerRanks as Mt, catmullRom as N, stepExpression as Nt, beats as O, ValidationError as On, springSettleFrames as Ot, chain as P, supersede as Pt, frameSpan as Q, wobblePoints as Qt, defineComponent as R, textLayout as Rt, ascending as S, size as Sn, safeArea as St, bakeSamples as T, sup as Tn, smoothRelease as Tt, ease as U, toSeconds as Ut, dist as V, toFrames as Vt, elevate as W, transformPathData as Wt, exitAnimation as X, withDefaults as Xt, evaluateGlyphExpression as Y, withAlpha as Yt, findRange as Z, within as Zt, after as _, italic as _n, resampleBands as _t, Media as a, PhysicsWorld2D as an, last as at, arcPath as b, parseMarkup as bn, rng as bt, section as c, Layer3D as cn, lineShift as ct, analyzeAudio as d, PersonTrack as dn, offsetCues as dt, Styles as en, hashRng as et, KeyBook as f, DEFAULT_CHART_COLORS as fn, parseColor as ft, UNIT_INDEX as g, color as gn, rendererChars as gt, Track as h, code as hn, rangeRects as ht, Light as i, PhysicsBody2D as in, isLight as it, boundsOf as j, staggerOffsets as jt, bind as k, ai as kn, springTrack as kt, bindComponent as l, Particles as ln, luminance as lt, SAFE_INSETS as m, bold as mn, quantize as mt, Effect as n, PhysicsBody3D as nn, holdFirstKeys as nt, blurRegion as o, Lighting as on, lerp2 as ot, MOTION_PRESETS as p, accent as pn, pulseKeys as pt, enterAnimation as q, valueAt as qt, Layer as r, PhysicsWorld3D as rn, inkOn as rt, editTrackedRegion as s, Transition as sn, linePath as st, Composition as t, Physics as tn, hashString as tt, z$2 as u, ClipVision as un, mix as ut, analyzeChannels as v, mark as vn, resolveMotion as vt, bakeFunction as w, sub as wn, scheduleExpression as wt, arrowPaths as x, rich as xn, round as xt, anchorPoint as y, normalizeTextSpans as yn, resolveTarget as yt, defineMeta as z, themeFrames as zt };
8868
+ //# sourceMappingURL=src-_l81YkMD.mjs.map