framefields 2.1.3 → 2.2.0-beta.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 (258) hide show
  1. package/README.md +48 -618
  2. package/dist/audio/index.d.mts +4 -4
  3. package/dist/audio/index.mjs +10 -10
  4. package/dist/{audio-CfBpzxn9.d.mts → audio-1QquqDJs.d.mts} +3 -3
  5. package/dist/{audio-CfBpzxn9.d.mts.map → audio-1QquqDJs.d.mts.map} +1 -1
  6. package/dist/{audio-DqaHxtG3.mjs → audio-BYqbtdH8.mjs} +3 -3
  7. package/dist/{audio-DqaHxtG3.mjs.map → audio-BYqbtdH8.mjs.map} +1 -1
  8. package/dist/{dist-BgFYDCoL.mjs → dist-BLbXEC6V.mjs} +2 -2
  9. package/dist/{dist-BgFYDCoL.mjs.map → dist-BLbXEC6V.mjs.map} +1 -1
  10. package/dist/{dist-Cog5jyVI.mjs → dist-DQlYw4eG.mjs} +44 -4
  11. package/dist/dist-DQlYw4eG.mjs.map +1 -0
  12. package/dist/effects/index.d.mts +4 -4
  13. package/dist/effects/index.mjs +35 -35
  14. package/dist/{effects-CXrmO68D.mjs → effects-DgpPr38s.mjs} +2 -2
  15. package/dist/{effects-CXrmO68D.mjs.map → effects-DgpPr38s.mjs.map} +1 -1
  16. package/dist/fonts/index.mjs +2 -2
  17. package/dist/{fonts-BUVSUWXJ.mjs → fonts-DakFEiDw.mjs} +2 -2
  18. package/dist/{fonts-BUVSUWXJ.mjs.map → fonts-DakFEiDw.mjs.map} +1 -1
  19. package/dist/{gpu-Bj08zUc5.mjs → gpu-AbcLcr1f.mjs} +2 -2
  20. package/dist/{gpu-Bj08zUc5.mjs.map → gpu-AbcLcr1f.mjs.map} +1 -1
  21. package/dist/{index-Cpkzy5XR.d.mts → index--1jnkoBj.d.mts} +20 -2
  22. package/dist/index--1jnkoBj.d.mts.map +1 -0
  23. package/dist/{index-BzQc812z.d.mts → index-BqzHDFkU.d.mts} +3 -3
  24. package/dist/{index-BzQc812z.d.mts.map → index-BqzHDFkU.d.mts.map} +1 -1
  25. package/dist/{index-DpWia6iH.d.mts → index-CaZfxDXx.d.mts} +27 -3
  26. package/dist/index-CaZfxDXx.d.mts.map +1 -0
  27. package/dist/{index-Fciq8bcC.d.mts → index-D6_KcajH.d.mts} +2 -2
  28. package/dist/{index-Fciq8bcC.d.mts.map → index-D6_KcajH.d.mts.map} +1 -1
  29. package/dist/{index-D__HdInU.d.mts → index-DLbtJPrc.d.mts} +23 -12
  30. package/dist/index-DLbtJPrc.d.mts.map +1 -0
  31. package/dist/{index--0vVZDPM.d.mts → index-DgJIBC_N.d.mts} +3 -3
  32. package/dist/{index--0vVZDPM.d.mts.map → index-DgJIBC_N.d.mts.map} +1 -1
  33. package/dist/index.d.mts +16 -9
  34. package/dist/index.d.mts.map +1 -1
  35. package/dist/index.mjs +50 -50
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/preview/index.d.mts +2 -2
  38. package/dist/preview/index.mjs +10 -10
  39. package/dist/{preview-BOqCRCgp.mjs → preview-BQ3BhcVX.mjs} +2 -2
  40. package/dist/{preview-BOqCRCgp.mjs.map → preview-BQ3BhcVX.mjs.map} +1 -1
  41. package/dist/preview-engine/audio.mjs +1 -1
  42. package/dist/preview-engine/{chunk-JJ5EF3EY.mjs → chunk-2W4BMOAZ.mjs} +1 -1
  43. package/dist/preview-engine/chunk-7OMK352W.mjs +1 -0
  44. package/dist/preview-engine/chunk-FJH5A2PV.mjs +1 -0
  45. package/dist/preview-engine/{chunk-USM33CF5.mjs → chunk-HFUA47QH.mjs} +1 -1
  46. package/dist/preview-engine/chunk-K7M5EIFC.mjs +98 -0
  47. package/dist/preview-engine/{chunk-5DOD2NVY.mjs → chunk-MOW55DX2.mjs} +1 -1
  48. package/dist/preview-engine/chunk-VUFDQJ2B.mjs +1 -0
  49. package/dist/preview-engine/{chunk-ZIIFTWDH.mjs → chunk-XETMNJVV.mjs} +1 -1
  50. package/dist/preview-engine/{chunk-AE2336RK.mjs → chunk-Z457JJCO.mjs} +1 -1
  51. package/dist/preview-engine/effects.mjs +1 -1
  52. package/dist/preview-engine/framefields.mjs +21 -21
  53. package/dist/preview-engine/player.mjs +1 -1
  54. package/dist/preview-engine/{renderers-57WDL6XN.mjs → renderers-HVTQ2B3H.mjs} +1 -1
  55. package/dist/preview-engine/{renderers-BH5MXUTT.mjs → renderers-OZYUGZG7.mjs} +1 -1
  56. package/dist/preview-engine/{renderers-2SVWAB42.mjs → renderers-UHYNEWQD.mjs} +1 -1
  57. package/dist/preview-engine/signals.mjs +1 -1
  58. package/dist/{program-D8JoVobr.mjs → program-Cc_2_YXn.mjs} +2 -2
  59. package/dist/{program-D8JoVobr.mjs.map → program-Cc_2_YXn.mjs.map} +1 -1
  60. package/dist/renderer/index.d.mts +3 -3
  61. package/dist/renderer/index.mjs +3 -3
  62. package/dist/{renderer-B9ProG0Z.mjs → renderer-2DjggBBS.mjs} +2 -2
  63. package/dist/{renderer-B9ProG0Z.mjs.map → renderer-2DjggBBS.mjs.map} +1 -1
  64. package/dist/{renderer-CBBhVrwO.mjs → renderer-4GYrnTfw.mjs} +2 -2
  65. package/dist/{renderer-CBBhVrwO.mjs.map → renderer-4GYrnTfw.mjs.map} +1 -1
  66. package/dist/renderer-9ETXaINw.mjs +5 -0
  67. package/dist/renderer-B3MVDN_e.mjs +5 -0
  68. package/dist/{renderer-CZ7-42SE.mjs → renderer-B4cnT3ce.mjs} +3 -3
  69. package/dist/{renderer-CZ7-42SE.mjs.map → renderer-B4cnT3ce.mjs.map} +1 -1
  70. package/dist/{renderer-0dD1VQsz.mjs → renderer-B5PFBOjv.mjs} +3 -3
  71. package/dist/{renderer-0dD1VQsz.mjs.map → renderer-B5PFBOjv.mjs.map} +1 -1
  72. package/dist/renderer-B6iUuWcx.mjs +6 -0
  73. package/dist/renderer-B8IdU-7S.mjs +5 -0
  74. package/dist/renderer-BEGJCxuL.mjs +5 -0
  75. package/dist/{renderer-BlTPu9QT.mjs → renderer-BEzUirF0.mjs} +2 -2
  76. package/dist/{renderer-BlTPu9QT.mjs.map → renderer-BEzUirF0.mjs.map} +1 -1
  77. package/dist/{renderer-ByGPFIu2.mjs → renderer-BKd2nRnO.mjs} +2 -2
  78. package/dist/{renderer-ByGPFIu2.mjs.map → renderer-BKd2nRnO.mjs.map} +1 -1
  79. package/dist/renderer-BLAkNFx7.mjs +5 -0
  80. package/dist/{renderer--2bwnzBi.mjs → renderer-BN0CzoG_.mjs} +2 -2
  81. package/dist/{renderer--2bwnzBi.mjs.map → renderer-BN0CzoG_.mjs.map} +1 -1
  82. package/dist/{renderer-aw8EsrS9.mjs → renderer-BNcsS03m.mjs} +2 -2
  83. package/dist/{renderer-aw8EsrS9.mjs.map → renderer-BNcsS03m.mjs.map} +1 -1
  84. package/dist/{renderer-Bs_f_App.d.mts → renderer-BO-7bYa5.d.mts} +2 -2
  85. package/dist/{renderer-Bs_f_App.d.mts.map → renderer-BO-7bYa5.d.mts.map} +1 -1
  86. package/dist/{renderer--JBbEfTc.mjs → renderer-BPMywsr4.mjs} +3 -3
  87. package/dist/{renderer--JBbEfTc.mjs.map → renderer-BPMywsr4.mjs.map} +1 -1
  88. package/dist/renderer-BVNhv2ft.mjs +5 -0
  89. package/dist/renderer-BaXTEIe0.mjs +5 -0
  90. package/dist/{renderer-BeuG4dyz.mjs → renderer-Bfrwo_It.mjs} +2 -2
  91. package/dist/{renderer-BeuG4dyz.mjs.map → renderer-Bfrwo_It.mjs.map} +1 -1
  92. package/dist/{renderer-DT1bySqu.mjs → renderer-BhxQzrHF.mjs} +2 -2
  93. package/dist/{renderer-DT1bySqu.mjs.map → renderer-BhxQzrHF.mjs.map} +1 -1
  94. package/dist/renderer-BjeA7s36.mjs +5 -0
  95. package/dist/renderer-BtGNxEay.mjs +5 -0
  96. package/dist/renderer-BvZg2RJG.mjs +5 -0
  97. package/dist/{renderer-BaYEXoS3.mjs → renderer-C2eBC0FB.mjs} +3 -3
  98. package/dist/{renderer-BaYEXoS3.mjs.map → renderer-C2eBC0FB.mjs.map} +1 -1
  99. package/dist/{renderer-B7jZuO6k.mjs → renderer-C4UqxwcT.mjs} +2 -2
  100. package/dist/{renderer-B7jZuO6k.mjs.map → renderer-C4UqxwcT.mjs.map} +1 -1
  101. package/dist/{renderer-Bm0W9qgc.mjs → renderer-C6u-XrH-.mjs} +3 -3
  102. package/dist/{renderer-Bm0W9qgc.mjs.map → renderer-C6u-XrH-.mjs.map} +1 -1
  103. package/dist/{renderer-BNyDJZzl.mjs → renderer-CB87_0vL.mjs} +3 -3
  104. package/dist/{renderer-BNyDJZzl.mjs.map → renderer-CB87_0vL.mjs.map} +1 -1
  105. package/dist/{renderer-FSCTtHrt.mjs → renderer-CD38wGmN.mjs} +2 -2
  106. package/dist/{renderer-FSCTtHrt.mjs.map → renderer-CD38wGmN.mjs.map} +1 -1
  107. package/dist/{renderer-ClIXn9ZU.mjs → renderer-CGZqCmf2.mjs} +2 -2
  108. package/dist/{renderer-ClIXn9ZU.mjs.map → renderer-CGZqCmf2.mjs.map} +1 -1
  109. package/dist/{renderer-CVD0oPsf.mjs → renderer-CHkqgIOL.mjs} +2 -2
  110. package/dist/{renderer-CVD0oPsf.mjs.map → renderer-CHkqgIOL.mjs.map} +1 -1
  111. package/dist/{renderer-Dj_K1f1T.mjs → renderer-CK0u3Psf.mjs} +3 -3
  112. package/dist/{renderer-Dj_K1f1T.mjs.map → renderer-CK0u3Psf.mjs.map} +1 -1
  113. package/dist/renderer-CLW6tUUn.mjs +5 -0
  114. package/dist/{renderer-BJ_GtjUk.mjs → renderer-CO4theVJ.mjs} +2 -2
  115. package/dist/{renderer-KcV0gCO5.mjs → renderer-CPW9o3Lc.mjs} +3 -3
  116. package/dist/{renderer-KcV0gCO5.mjs.map → renderer-CPW9o3Lc.mjs.map} +1 -1
  117. package/dist/renderer-CS-ojgJk.mjs +5 -0
  118. package/dist/{renderer-BwBc5xNu.mjs → renderer-CSfLMXN8.mjs} +3 -3
  119. package/dist/{renderer-BwBc5xNu.mjs.map → renderer-CSfLMXN8.mjs.map} +1 -1
  120. package/dist/{renderer-0fRv8mc5.mjs → renderer-CSoyJ8GH.mjs} +2 -2
  121. package/dist/{renderer-0fRv8mc5.mjs.map → renderer-CSoyJ8GH.mjs.map} +1 -1
  122. package/dist/renderer-CUQtKECw.mjs +5 -0
  123. package/dist/renderer-CV-l8wMq.mjs +5 -0
  124. package/dist/renderer-CV7_ALA5.mjs +5 -0
  125. package/dist/renderer-CVR6T6Lp.mjs +5 -0
  126. package/dist/{renderer-B-QXAPY0.mjs → renderer-CZ9gHx-4.mjs} +2 -2
  127. package/dist/{renderer-B-QXAPY0.mjs.map → renderer-CZ9gHx-4.mjs.map} +1 -1
  128. package/dist/renderer-CZKFEf_6.mjs +3 -0
  129. package/dist/{renderer-C-BjN5HM.mjs → renderer-CciB_sav.mjs} +3 -3
  130. package/dist/{renderer-C-BjN5HM.mjs.map → renderer-CciB_sav.mjs.map} +1 -1
  131. package/dist/{renderer-hIbXvzPu.mjs → renderer-ClWgdN2v.mjs} +2 -2
  132. package/dist/renderer-CtUF95UW.mjs +5 -0
  133. package/dist/{renderer-BJD6Ouon.mjs → renderer-Cv1wmjhA.mjs} +2 -2
  134. package/dist/{renderer-BJD6Ouon.mjs.map → renderer-Cv1wmjhA.mjs.map} +1 -1
  135. package/dist/{renderer-CJnIeI0m.mjs → renderer-Cxh7j423.mjs} +3 -3
  136. package/dist/{renderer-CJnIeI0m.mjs.map → renderer-Cxh7j423.mjs.map} +1 -1
  137. package/dist/{renderer-cjiONTY_.mjs → renderer-D0enmulV.mjs} +2 -2
  138. package/dist/{renderer-cjiONTY_.mjs.map → renderer-D0enmulV.mjs.map} +1 -1
  139. package/dist/renderer-D8ymQoTB.mjs +5 -0
  140. package/dist/renderer-D9x3UE1Y.mjs +5 -0
  141. package/dist/renderer-DAEXqa2Q.mjs +5 -0
  142. package/dist/renderer-DDhU9Goq.mjs +5 -0
  143. package/dist/{renderer-CgFs_3gW.mjs → renderer-DEQ09sg7.mjs} +2 -2
  144. package/dist/{renderer-CgFs_3gW.mjs.map → renderer-DEQ09sg7.mjs.map} +1 -1
  145. package/dist/{renderer-CATBdL9s.mjs → renderer-DRpIQFAK.mjs} +2 -2
  146. package/dist/{renderer-CATBdL9s.mjs.map → renderer-DRpIQFAK.mjs.map} +1 -1
  147. package/dist/{renderer-Dd9NUd_I.mjs → renderer-DT3QVVht.mjs} +2 -2
  148. package/dist/{renderer-Dd9NUd_I.mjs.map → renderer-DT3QVVht.mjs.map} +1 -1
  149. package/dist/{renderer-BqCx28Zb.mjs → renderer-DU3216cx.mjs} +3 -3
  150. package/dist/{renderer-BqCx28Zb.mjs.map → renderer-DU3216cx.mjs.map} +1 -1
  151. package/dist/{renderer-BXZo84vM.mjs → renderer-DU6i7shO.mjs} +2 -2
  152. package/dist/{renderer-BXZo84vM.mjs.map → renderer-DU6i7shO.mjs.map} +1 -1
  153. package/dist/renderer-DcCKath2.mjs +5 -0
  154. package/dist/{renderer-CmEvkdNL.mjs → renderer-DfSRmz7q.mjs} +3 -3
  155. package/dist/{renderer-CmEvkdNL.mjs.map → renderer-DfSRmz7q.mjs.map} +1 -1
  156. package/dist/renderer-DiBphLzn.mjs +5 -0
  157. package/dist/renderer-Diq9Z7gZ.mjs +5 -0
  158. package/dist/renderer-DjZiO7iA.mjs +5 -0
  159. package/dist/{renderer-Ba7Rc8DE.mjs → renderer-DkGODUgE.mjs} +3 -3
  160. package/dist/{renderer-Ba7Rc8DE.mjs.map → renderer-DkGODUgE.mjs.map} +1 -1
  161. package/dist/{renderer-DKmV8F6L.mjs → renderer-DlqDnh-8.mjs} +2 -2
  162. package/dist/{renderer-DKmV8F6L.mjs.map → renderer-DlqDnh-8.mjs.map} +1 -1
  163. package/dist/{renderer-CMOAtGdC.mjs → renderer-Dnm_SVy6.mjs} +3 -3
  164. package/dist/{renderer-CMOAtGdC.mjs.map → renderer-Dnm_SVy6.mjs.map} +1 -1
  165. package/dist/{renderer-Cun5J3z9.mjs → renderer-DppnY7RT.mjs} +3 -3
  166. package/dist/{renderer-Cun5J3z9.mjs.map → renderer-DppnY7RT.mjs.map} +1 -1
  167. package/dist/{renderer-CmpV4YNd.mjs → renderer-DqhZTIiC.mjs} +2 -2
  168. package/dist/{renderer-CmpV4YNd.mjs.map → renderer-DqhZTIiC.mjs.map} +1 -1
  169. package/dist/renderer-Dtj6o-74.mjs +5 -0
  170. package/dist/renderer-Duaam6bJ.mjs +5 -0
  171. package/dist/{renderer-CxE5__5p.mjs → renderer-DwCg5pXn.mjs} +2 -2
  172. package/dist/{renderer-CxE5__5p.mjs.map → renderer-DwCg5pXn.mjs.map} +1 -1
  173. package/dist/{renderer-B8Wjov5-.mjs → renderer-Dyh8c41v.mjs} +2 -2
  174. package/dist/{renderer-B6x_Mmpf.mjs → renderer-DzDZlez7.mjs} +247 -63
  175. package/dist/renderer-DzDZlez7.mjs.map +1 -0
  176. package/dist/renderer-FHqZe3K1.mjs +5 -0
  177. package/dist/renderer-FTKfOejk.mjs +5 -0
  178. package/dist/{renderer-BPDita2c.mjs → renderer-FgcNOe1R.mjs} +5 -5
  179. package/dist/{renderer-BPDita2c.mjs.map → renderer-FgcNOe1R.mjs.map} +1 -1
  180. package/dist/{renderer-58bVJfZx.mjs → renderer-L7UTxwZT.mjs} +2 -2
  181. package/dist/{renderer-58bVJfZx.mjs.map → renderer-L7UTxwZT.mjs.map} +1 -1
  182. package/dist/renderer-LmbkN82X.mjs +5 -0
  183. package/dist/{renderer-C-AzyBir.mjs → renderer-PbJk25JW.mjs} +3 -3
  184. package/dist/{renderer-C-AzyBir.mjs.map → renderer-PbJk25JW.mjs.map} +1 -1
  185. package/dist/renderer-SDspl6p-.mjs +5 -0
  186. package/dist/renderer-SWVUDypd.mjs +5 -0
  187. package/dist/renderer-WhpTBwDM.mjs +5 -0
  188. package/dist/renderer-WrpQEVdv.mjs +5 -0
  189. package/dist/{renderer-mp1NN5zk.mjs → renderer-dc39dBVA.mjs} +283 -79
  190. package/dist/renderer-dc39dBVA.mjs.map +1 -0
  191. package/dist/{renderer-Br1OuXr_.mjs → renderer-dj3f8cMg.mjs} +3 -3
  192. package/dist/{renderer-Br1OuXr_.mjs.map → renderer-dj3f8cMg.mjs.map} +1 -1
  193. package/dist/{renderer-BcFdZx4j.mjs → renderer-dwTzrQ2G.mjs} +3 -3
  194. package/dist/{renderer-BcFdZx4j.mjs.map → renderer-dwTzrQ2G.mjs.map} +1 -1
  195. package/dist/{renderer-Cd5BLFnS.mjs → renderer-egZPy7vq.mjs} +2 -2
  196. package/dist/{renderer-Cd5BLFnS.mjs.map → renderer-egZPy7vq.mjs.map} +1 -1
  197. package/dist/{renderer-ChO8NNw9.mjs → renderer-gwV6hyYm.mjs} +2 -2
  198. package/dist/{renderer-ChO8NNw9.mjs.map → renderer-gwV6hyYm.mjs.map} +1 -1
  199. package/dist/{renderer-pNxZ_lV2.mjs → renderer-lXmtdrdI.mjs} +2 -2
  200. package/dist/{renderer-pNxZ_lV2.mjs.map → renderer-lXmtdrdI.mjs.map} +1 -1
  201. package/dist/{renderer-D_2Y_tdA.mjs → renderer-n2kYIGtb.mjs} +2 -2
  202. package/dist/{renderer-D_2Y_tdA.mjs.map → renderer-n2kYIGtb.mjs.map} +1 -1
  203. package/dist/renderer-r4ney0FZ.mjs +5 -0
  204. package/dist/{renderer-Bos8nRhT.mjs → renderer-sHDPBywo.mjs} +2 -2
  205. package/dist/{renderer-Bos8nRhT.mjs.map → renderer-sHDPBywo.mjs.map} +1 -1
  206. package/dist/{renderer-D9mf-msP.mjs → renderer-scbJx-Dx.mjs} +2 -2
  207. package/dist/{renderers-CP8CFWDs-ZKjdDfYg.mjs → renderers-CP8CFWDs-B8HIr3kj.mjs} +2 -2
  208. package/dist/{renderers-CP8CFWDs-ZKjdDfYg.mjs.map → renderers-CP8CFWDs-B8HIr3kj.mjs.map} +1 -1
  209. package/dist/signals/index.d.mts +5 -5
  210. package/dist/signals/index.mjs +4 -4
  211. package/package.json +58 -55
  212. package/dist/dist-Cog5jyVI.mjs.map +0 -1
  213. package/dist/index-Cpkzy5XR.d.mts.map +0 -1
  214. package/dist/index-D__HdInU.d.mts.map +0 -1
  215. package/dist/index-DpWia6iH.d.mts.map +0 -1
  216. package/dist/preview-engine/chunk-3GNP7TJH.mjs +0 -98
  217. package/dist/preview-engine/chunk-CYY366IE.mjs +0 -1
  218. package/dist/preview-engine/chunk-NI577OMQ.mjs +0 -1
  219. package/dist/preview-engine/chunk-VRGREB3V.mjs +0 -1
  220. package/dist/renderer-3MuT2oZO.mjs +0 -5
  221. package/dist/renderer-AX_fHrXM.mjs +0 -5
  222. package/dist/renderer-B2-LQreV.mjs +0 -5
  223. package/dist/renderer-B2QhkksW.mjs +0 -5
  224. package/dist/renderer-B5CoE2Cv.mjs +0 -5
  225. package/dist/renderer-B6Au6f82.mjs +0 -5
  226. package/dist/renderer-B6qAMLXh.mjs +0 -5
  227. package/dist/renderer-B6x_Mmpf.mjs.map +0 -1
  228. package/dist/renderer-BEfvyxL_.mjs +0 -5
  229. package/dist/renderer-BH4j4urG.mjs +0 -5
  230. package/dist/renderer-BH4zfzus.mjs +0 -5
  231. package/dist/renderer-BRjW_pgJ.mjs +0 -6
  232. package/dist/renderer-BVo6W_BO.mjs +0 -5
  233. package/dist/renderer-BbxBM7Vh.mjs +0 -5
  234. package/dist/renderer-C07CnYVd.mjs +0 -5
  235. package/dist/renderer-C2Z3vJCu.mjs +0 -5
  236. package/dist/renderer-C31qkFvm.mjs +0 -5
  237. package/dist/renderer-C3FV8cYm.mjs +0 -5
  238. package/dist/renderer-CQXszrAF.mjs +0 -5
  239. package/dist/renderer-CWK41ajp.mjs +0 -5
  240. package/dist/renderer-C_U225ub.mjs +0 -5
  241. package/dist/renderer-C_nPzKwZ.mjs +0 -5
  242. package/dist/renderer-Cd6I_dsC.mjs +0 -5
  243. package/dist/renderer-Ceb06HuN.mjs +0 -5
  244. package/dist/renderer-D3P5SLcx.mjs +0 -5
  245. package/dist/renderer-D9R8QXS7.mjs +0 -5
  246. package/dist/renderer-D9SJ4Fg9.mjs +0 -5
  247. package/dist/renderer-DGAypVNj.mjs +0 -5
  248. package/dist/renderer-DLAAfwg0.mjs +0 -5
  249. package/dist/renderer-DTkBPkBu.mjs +0 -5
  250. package/dist/renderer-DbaTMTuo.mjs +0 -5
  251. package/dist/renderer-DsxhQdCp.mjs +0 -5
  252. package/dist/renderer-GSFP7v2z.mjs +0 -3
  253. package/dist/renderer-Hf1pCqoN.mjs +0 -5
  254. package/dist/renderer-V0UuIniZ.mjs +0 -5
  255. package/dist/renderer-VCnMXWqE.mjs +0 -5
  256. package/dist/renderer-lifu3xIt.mjs +0 -5
  257. package/dist/renderer-mPDgLBi4.mjs +0 -5
  258. package/dist/renderer-mp1NN5zk.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import "../chunk-GBe2k3y8.mjs";
2
- import "../dist-Cog5jyVI.mjs";
3
- import { t as FontManager } from "../fonts-BUVSUWXJ.mjs";
2
+ import "../dist-DQlYw4eG.mjs";
3
+ import { t as FontManager } from "../fonts-DakFEiDw.mjs";
4
4
 
5
5
  export { FontManager };
@@ -1,4 +1,4 @@
1
- import { J as registerHeadlessFont, m as SlugGeometry, p as SlugFontCache } from "./dist-Cog5jyVI.mjs";
1
+ import { Y as registerHeadlessFont, m as SlugGeometry, p as SlugFontCache } from "./dist-DQlYw4eG.mjs";
2
2
  import path from "node:path";
3
3
  import * as fontkit from "fontkit";
4
4
  import fs from "node:fs/promises";
@@ -256,4 +256,4 @@ var FontManager = class FontManager {
256
256
 
257
257
  //#endregion
258
258
  export { FontManager as t };
259
- //# sourceMappingURL=fonts-BUVSUWXJ.mjs.map
259
+ //# sourceMappingURL=fonts-DakFEiDw.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"fonts-BUVSUWXJ.mjs","names":[],"sources":["../src/fonts/manager.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n\tregisterHeadlessFont,\n\tSlugFontCache,\n\tSlugGeometry,\n} from \"@framefields/webgpu-renderers\";\nimport * as fontkit from \"fontkit\";\n\nexport interface RegisterFontOptions {\n\tfamily?: string;\n\tsource: string | Uint8Array;\n\tweight?: number | string;\n\tstyle?: \"normal\" | \"italic\" | \"oblique\";\n}\n\nexport interface RegisteredFont {\n\tfamily: string;\n\tsource: string | Uint8Array;\n\tfilePath?: string;\n\tformat: \"truetype\" | \"opentype\";\n\tpostscriptName?: string;\n\tunitsPerEm?: number;\n\tweight?: number | string;\n\tstyle?: string;\n}\n\ninterface ResolvedSource {\n\tbuffer: Uint8Array;\n\tfilePath?: string;\n}\n\nconst SFNT_TRUETYPE_1 = 0x00010000;\nconst SFNT_TRUETYPE_TRUE = 0x74727565; // 'true'\nconst SFNT_TRUETYPE_TYP1 = 0x74797031; // 'typ1'\nconst SFNT_OPENTYPE_CFF = 0x4f54544f; // 'OTTO'\nconst SFNT_COLLECTION = 0x74746366; // 'ttcf'\n\nfunction validateFontBinaryHeader(\n\tbytes: Uint8Array,\n\tsourceLabel: string,\n): \"truetype\" | \"opentype\" {\n\tif (bytes.length < 12) {\n\t\tthrow new Error(\n\t\t\t`Invalid font binary for \"${sourceLabel}\": File size (${bytes.length} bytes) is too small to be a valid TrueType or OpenType font.`,\n\t\t);\n\t}\n\n\tconst tag =\n\t\t((bytes[0] ?? 0) << 24) |\n\t\t((bytes[1] ?? 0) << 16) |\n\t\t((bytes[2] ?? 0) << 8) |\n\t\t(bytes[3] ?? 0);\n\n\tif (\n\t\ttag === SFNT_TRUETYPE_1 ||\n\t\ttag === SFNT_TRUETYPE_TRUE ||\n\t\ttag === SFNT_TRUETYPE_TYP1 ||\n\t\ttag === SFNT_COLLECTION\n\t) {\n\t\treturn \"truetype\";\n\t}\n\n\tif (tag === SFNT_OPENTYPE_CFF) {\n\t\treturn \"opentype\";\n\t}\n\n\tconst hexTag = (tag >>> 0).toString(16).padStart(8, \"0\");\n\tthrow new Error(\n\t\t`Invalid font format for \"${sourceLabel}\": Expected a valid TrueType (.ttf) or OpenType (.otf) font binary. Found header tag: 0x${hexTag}.`,\n\t);\n}\n\nasync function resolveSourceBuffer(\n\tsource: string | Uint8Array,\n): Promise<ResolvedSource> {\n\tif (source instanceof Uint8Array) {\n\t\treturn { buffer: source };\n\t}\n\n\tif (typeof source !== \"string\") {\n\t\tthrow new TypeError(\n\t\t\t`Font source must be a file path string or Uint8Array, received: ${typeof source}`,\n\t\t);\n\t}\n\n\tlet cleanPath = source;\n\tif (cleanPath.startsWith(\"http://\") || cleanPath.startsWith(\"https://\")) {\n\t\tconst res = await fetch(cleanPath);\n\t\tif (!res.ok) {\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to download font from \"${cleanPath}\": HTTP ${res.status} ${res.statusText}`,\n\t\t\t);\n\t\t}\n\t\tconst arrayBuffer = await res.arrayBuffer();\n\t\treturn {\n\t\t\tbuffer: new Uint8Array(arrayBuffer),\n\t\t\tfilePath: cleanPath,\n\t\t};\n\t}\n\n\tif (cleanPath.startsWith(\"file://\")) {\n\t\ttry {\n\t\t\tcleanPath = new URL(cleanPath).pathname;\n\t\t} catch {\n\t\t\tcleanPath = cleanPath.replace(/^file:\\/\\//, \"\");\n\t\t}\n\t}\n\n\tconst candidates: string[] = [\n\t\tcleanPath,\n\t\tpath.resolve(process.cwd(), cleanPath),\n\t\tpath.resolve(process.cwd(), \"assets/fonts\", cleanPath),\n\t\tpath.resolve(process.cwd(), \"assets/fonts\", path.basename(cleanPath)),\n\t];\n\n\t// Upward traversal to locate fonts in parent monorepo roots\n\tlet currentDir = process.cwd();\n\tfor (let i = 0; i < 5; i++) {\n\t\tcandidates.push(path.resolve(currentDir, cleanPath));\n\t\tcandidates.push(\n\t\t\tpath.resolve(currentDir, \"assets/fonts\", path.basename(cleanPath)),\n\t\t);\n\t\tconst parent = path.dirname(currentDir);\n\t\tif (parent === currentDir) break;\n\t\tcurrentDir = parent;\n\t}\n\n\tlet resolvedPath: string | null = null;\n\tlet fileBuffer: Buffer | null = null;\n\n\tfor (const candidate of candidates) {\n\t\ttry {\n\t\t\tconst stat = await fs.stat(candidate);\n\t\t\tif (stat.isFile()) {\n\t\t\t\tresolvedPath = candidate;\n\t\t\t\tfileBuffer = await fs.readFile(candidate);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch {\n\t\t\t// Continue searching next candidate\n\t\t}\n\t}\n\n\tif (!resolvedPath || !fileBuffer) {\n\t\tthrow new Error(\n\t\t\t`Font file not found: \"${source}\". Checked candidate locations:\\n - ${candidates.join(\"\\n - \")}`,\n\t\t);\n\t}\n\n\treturn {\n\t\tbuffer: new Uint8Array(\n\t\t\tfileBuffer.buffer,\n\t\t\tfileBuffer.byteOffset,\n\t\t\tfileBuffer.byteLength,\n\t\t),\n\t\tfilePath: resolvedPath,\n\t};\n}\n\n/**\n * Central singleton manager for font registration, TTF validation, and compositor typography binding.\n */\nexport interface MeasureTextOptions {\n\tfontFamily: string;\n\tfontSize?: number;\n\tfontWeight?: string | number;\n\t/** Extra px between characters, as on `Layer.text`. */\n\tletterSpacing?: number;\n\t/** Multiplier of fontSize when < 10, else px. Default 1.2. */\n\tlineHeight?: number;\n\t/** Wrap width in px; omit for one line per `\\n`. */\n\twidth?: number;\n\talign?: \"left\" | \"center\" | \"right\";\n\t/** Paragraph base direction, as on `Layer.text`. Default \"auto\". */\n\tdirection?: \"ltr\" | \"rtl\" | \"auto\";\n}\n\nexport interface MeasuredGlyph {\n\tchar: string;\n\t/** Index into the string (code units), matching `text.slice`. */\n\tindex: number;\n\t/** Left edge of the glyph, relative to the text box. */\n\tx: number;\n\t/** Baseline-relative top of the line box. */\n\ty: number;\n\t/** Advance width in px. */\n\twidth: number;\n\tline: number;\n\t/** Part of a right-to-left run: reading continues to the left. */\n\trtl?: boolean;\n}\n\nexport interface TextMetrics {\n\twidth: number;\n\theight: number;\n\tlines: number;\n\t/** Line box height in px. */\n\tlineHeight: number;\n\tglyphs: MeasuredGlyph[];\n\t/**\n\t * X of a caret placed after `count` characters (0 = before the first),\n\t * relative to the text box. In right-to-left text the caret sits on the\n\t * left of the last character. Pair with a `.keys(\"text\", …)` reveal to make\n\t * a cursor follow typing exactly.\n\t */\n\tcaretX(count: number): number;\n\t/** Width of the first `count` characters (same as `caretX` on one line). */\n\twidthOf(count: number): number;\n}\n\nexport class FontManager {\n\tprivate static instance: FontManager | null = null;\n\tprivate readonly fonts = new Map<string, RegisteredFont>();\n\n\tprivate constructor() {}\n\n\t/**\n\t * Returns the singleton FontManager instance.\n\t */\n\tpublic static getInstance(): FontManager {\n\t\tif (!FontManager.instance) {\n\t\t\tFontManager.instance = new FontManager();\n\t\t}\n\t\treturn FontManager.instance;\n\t}\n\n\t/**\n\t * Registers a TrueType/OpenType font into the Framefields engine with validation.\n\t */\n\tpublic static async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\treturn FontManager.getInstance().register(optionsOrFamilyOrSource, source);\n\t}\n\n\t/**\n\t * Sets the color emoji font text draws emoji with, for the preview and the\n\t * export alike: a CBDT/CBLC bitmap font such as Noto Color Emoji, as a file\n\t * path, URL or bytes. framefields ships none; without one, exports draw\n\t * nothing for emoji.\n\t */\n\tpublic static async registerEmojiFont(\n\t\tsource: string | Uint8Array,\n\t): Promise<void> {\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(source);\n\t\tconst label =\n\t\t\tfilePath ?? (typeof source === \"string\" ? source : \"Uint8Array\");\n\t\tvalidateFontBinaryHeader(buffer, label);\n\t\tSlugFontCache.setEmojiFont(buffer, filePath);\n\t}\n\n\t/**\n\t * Measures text with the real font, exactly as `Layer.text` lays it out:\n\t * box size, line count, per-glyph positions and caret offsets. Use it to\n\t * size containers, place cursors, underline a word or center by ink\n\t * instead of guessing advances. The family must be registered first.\n\t *\n\t * ```ts\n\t * const m = FontManager.measure(\"Hello\", { fontFamily: \"Inter\", fontSize: 60 });\n\t * m.width; m.caretX(3); m.glyphs[1].x\n\t * ```\n\t */\n\tpublic static measure(\n\t\ttext: string,\n\t\toptions: MeasureTextOptions,\n\t): TextMetrics {\n\t\tconst fontSize = options.fontSize ?? 48;\n\t\tconst font = SlugFontCache.getFont(\n\t\t\toptions.fontFamily,\n\t\t\toptions.fontWeight,\n\t\t\tnull,\n\t\t\tundefined,\n\t\t\tfontSize,\n\t\t);\n\t\tif (!font) {\n\t\t\tthrow new Error(\n\t\t\t\t`FontManager.measure: font \"${options.fontFamily}\" is not registered. ` +\n\t\t\t\t\t\"Call `await FontManager.register(...)` first.\",\n\t\t\t);\n\t\t}\n\t\tconst lineHeight =\n\t\t\toptions.lineHeight !== undefined && options.lineHeight < 10\n\t\t\t\t? options.lineHeight * fontSize\n\t\t\t\t: (options.lineHeight ?? fontSize * 1.2);\n\t\tconst letterSpacing = options.letterSpacing ?? 0;\n\t\tconst { width, height, layout } = SlugGeometry.measure(\n\t\t\ttext,\n\t\t\tfont,\n\t\t\tfontSize,\n\t\t\tletterSpacing,\n\t\t\tlineHeight,\n\t\t\toptions.width,\n\t\t\tundefined,\n\t\t\toptions.direction,\n\t\t);\n\t\tconst scale = fontSize / font.unitsPerEm;\n\t\t// One entry per cluster (a letter with its marks, or a ligature), in\n\t\t// reading order; textIndex maps it back to the string.\n\t\tconst glyphs: MeasuredGlyph[] = [];\n\t\tconst seen = new Set<number>();\n\t\tlet cursor = 0;\n\t\tfor (const g of layout.glyphs) {\n\t\t\tlet index = g.textIndex;\n\t\t\tif (index === undefined) {\n\t\t\t\tconst at = text.indexOf(g.char, cursor);\n\t\t\t\tindex = at >= 0 ? at : cursor;\n\t\t\t}\n\t\t\tif (seen.has(index)) continue;\n\t\t\tseen.add(index);\n\t\t\tcursor = index + g.char.length;\n\t\t\tconst advance =\n\t\t\t\tg.clusterAdvance ?? g.cp.advanceWidth * (g.fontScale ?? scale);\n\t\t\tglyphs.push({\n\t\t\t\tchar: g.char,\n\t\t\t\tindex,\n\t\t\t\tx: g.clusterX ?? g.x,\n\t\t\t\ty: g.y,\n\t\t\t\twidth: advance + letterSpacing,\n\t\t\t\tline: g.lineIndex,\n\t\t\t\t...(g.rtl && { rtl: true }),\n\t\t\t});\n\t\t}\n\t\tconst caretX = (count: number): number => {\n\t\t\tif (count <= 0 || glyphs.length === 0) {\n\t\t\t\tconst first = glyphs[0];\n\t\t\t\tif (!first) return 0;\n\t\t\t\treturn first.rtl ? first.x + first.width - letterSpacing : first.x;\n\t\t\t}\n\t\t\tconst before = glyphs.filter((g) => g.index < count);\n\t\t\tconst last = before[before.length - 1];\n\t\t\tif (!last) return 0;\n\t\t\treturn last.rtl ? last.x : last.x + last.width - letterSpacing;\n\t\t};\n\t\treturn {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tlines: layout.linesCount,\n\t\t\tlineHeight,\n\t\t\tglyphs,\n\t\t\tcaretX,\n\t\t\twidthOf: (count: number) => caretX(count) - (glyphs[0]?.x ?? 0),\n\t\t};\n\t}\n\n\t/**\n\t * Retrieves registered font metadata by family name.\n\t */\n\tpublic static get(family: string): RegisteredFont | undefined {\n\t\treturn FontManager.getInstance().get(family);\n\t}\n\n\t/**\n\t * Checks if a font family has been registered.\n\t */\n\tpublic static has(family: string): boolean {\n\t\treturn FontManager.getInstance().has(family);\n\t}\n\n\t/**\n\t * Returns all currently registered fonts.\n\t */\n\tpublic static getAll(): RegisteredFont[] {\n\t\treturn FontManager.getInstance().getAll();\n\t}\n\n\t/**\n\t * Returns relative or absolute file paths of all registered fonts for composition spec serialization.\n\t */\n\tpublic static getRegisteredFontPaths(): string[] {\n\t\treturn FontManager.getInstance().getRegisteredFontPaths();\n\t}\n\n\t/**\n\t * Clears all registered fonts from the manager.\n\t */\n\tpublic static clear(): void {\n\t\tFontManager.getInstance().clear();\n\t}\n\n\t/**\n\t * Instance registration method with format validation and Slug WebGPU cache population.\n\t */\n\tpublic async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\tlet family: string | undefined;\n\t\tlet rawSource: string | Uint8Array;\n\t\tlet weight: number | string | undefined;\n\t\tlet style: \"normal\" | \"italic\" | \"oblique\" | undefined;\n\n\t\tif (\n\t\t\ttypeof optionsOrFamilyOrSource === \"object\" &&\n\t\t\toptionsOrFamilyOrSource !== null\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource.family;\n\t\t\trawSource = optionsOrFamilyOrSource.source;\n\t\t\tweight = optionsOrFamilyOrSource.weight;\n\t\t\tstyle = optionsOrFamilyOrSource.style;\n\t\t} else if (\n\t\t\ttypeof optionsOrFamilyOrSource === \"string\" &&\n\t\t\tsource !== undefined\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource;\n\t\t\trawSource = source;\n\t\t} else if (typeof optionsOrFamilyOrSource === \"string\") {\n\t\t\tfamily = undefined;\n\t\t\trawSource = optionsOrFamilyOrSource;\n\t\t} else {\n\t\t\tthrow new TypeError(\"Invalid arguments passed to FontManager.register\");\n\t\t}\n\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(rawSource);\n\t\tconst sourceLabel =\n\t\t\tfilePath ?? (typeof rawSource === \"string\" ? rawSource : \"Uint8Array\");\n\t\tconst format = validateFontBinaryHeader(buffer, sourceLabel);\n\n\t\tlet parsedFontkit: fontkit.Font;\n\t\ttry {\n\t\t\tconst parsed = fontkit.create(buffer as unknown as Buffer);\n\t\t\tif (\n\t\t\t\tparsed &&\n\t\t\t\t\"fonts\" in parsed &&\n\t\t\t\tArray.isArray(parsed.fonts) &&\n\t\t\t\tparsed.fonts.length > 0\n\t\t\t) {\n\t\t\t\tparsedFontkit = parsed.fonts[0] as fontkit.Font;\n\t\t\t} else {\n\t\t\t\tparsedFontkit = parsed as fontkit.Font;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to parse TrueType/OpenType font binary for \"${sourceLabel}\": ${msg}`,\n\t\t\t);\n\t\t}\n\n\t\tconst detectedFamily =\n\t\t\tparsedFontkit.familyName ||\n\t\t\tparsedFontkit.postscriptName ||\n\t\t\tpath.parse(sourceLabel).name;\n\t\tconst resolvedFamily = family?.trim() || detectedFamily;\n\n\t\tconst registered: RegisteredFont = {\n\t\t\tfamily: resolvedFamily,\n\t\t\tsource: rawSource,\n\t\t\tfilePath,\n\t\t\tformat,\n\t\t\tpostscriptName: parsedFontkit.postscriptName,\n\t\t\tunitsPerEm: parsedFontkit.unitsPerEm,\n\t\t\tweight,\n\t\t\tstyle,\n\t\t};\n\n\t\tthis.fonts.set(resolvedFamily, registered);\n\n\t\t// Populate headless font registries\n\t\tif (filePath) {\n\t\t\tawait registerHeadlessFont(resolvedFamily, filePath);\n\t\t}\n\t\tSlugFontCache.setParsed(resolvedFamily, parsedFontkit);\n\n\t\treturn registered;\n\t}\n\n\tpublic get(family: string): RegisteredFont | undefined {\n\t\treturn this.fonts.get(family);\n\t}\n\n\tpublic has(family: string): boolean {\n\t\treturn this.fonts.has(family);\n\t}\n\n\tpublic getAll(): RegisteredFont[] {\n\t\treturn Array.from(this.fonts.values());\n\t}\n\n\tpublic getRegisteredFontPaths(): string[] {\n\t\tconst paths: string[] = [];\n\t\tfor (const font of this.fonts.values()) {\n\t\t\tif (font.filePath) {\n\t\t\t\tpaths.push(font.filePath);\n\t\t\t} else if (typeof font.source === \"string\") {\n\t\t\t\tpaths.push(font.source);\n\t\t\t}\n\t\t}\n\t\treturn paths;\n\t}\n\n\tpublic clear(): void {\n\t\tthis.fonts.clear();\n\t}\n}\n"],"mappings":";;;;;;AAgCA,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AAExB,SAAS,yBACR,OACA,aAC0B;AAC1B,KAAI,MAAM,SAAS,GAClB,OAAM,IAAI,MACT,4BAA4B,YAAY,gBAAgB,MAAM,OAAO,+DACrE;CAGF,MAAM,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Ac,kBACd,KAAK,MAAM,YAAY,CAAC;EACzB,MAAM,iBAAiB,QAAQ,MAAM,IAAI;EAEzC,MAAM,aAA6B;GAClC,QAAQ;GACR,QAAQ;GACR;GACA;GACA,gBAAgB,cAAc;GAC9B,YAAY,cAAc;GAC1B;GACA;GACA;AAED,OAAK,MAAM,IAAI,gBAAgB,WAAW;AAG1C,MAAI,SACH,OAAM,qBAAqB,gBAAgB,SAAS;AAErD,gBAAc,UAAU,gBAAgB,cAAc;AAEtD,SAAO;;CAGR,AAAO,IAAI,QAA4C;AACtD,SAAO,KAAK,MAAM,IAAI,OAAO;;CAG9B,AAAO,IAAI,QAAyB;AACnC,SAAO,KAAK,MAAM,IAAI,OAAO;;CAG9B,AAAO,SAA2B;AACjC,SAAO,MAAM,KAAK,KAAK,MAAM,QAAQ,CAAC;;CAGvC,AAAO,yBAAmC;EACzC,MAAM,QAAkB,EAAE;AAC1B,OAAK,MAAM,QAAQ,KAAK,MAAM,QAAQ,CACrC,KAAI,KAAK,SACR,OAAM,KAAK,KAAK,SAAS;WACf,OAAO,KAAK,WAAW,SACjC,OAAM,KAAK,KAAK,OAAO;AAGzB,SAAO;;CAGR,AAAO,QAAc;AACpB,OAAK,MAAM,OAAO"}
1
+ {"version":3,"file":"fonts-DakFEiDw.mjs","names":[],"sources":["../src/fonts/manager.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n\tregisterHeadlessFont,\n\tSlugFontCache,\n\tSlugGeometry,\n} from \"@framefields/webgpu-renderers\";\nimport * as fontkit from \"fontkit\";\n\nexport interface RegisterFontOptions {\n\tfamily?: string;\n\tsource: string | Uint8Array;\n\tweight?: number | string;\n\tstyle?: \"normal\" | \"italic\" | \"oblique\";\n}\n\nexport interface RegisteredFont {\n\tfamily: string;\n\tsource: string | Uint8Array;\n\tfilePath?: string;\n\tformat: \"truetype\" | \"opentype\";\n\tpostscriptName?: string;\n\tunitsPerEm?: number;\n\tweight?: number | string;\n\tstyle?: string;\n}\n\ninterface ResolvedSource {\n\tbuffer: Uint8Array;\n\tfilePath?: string;\n}\n\nconst SFNT_TRUETYPE_1 = 0x00010000;\nconst SFNT_TRUETYPE_TRUE = 0x74727565; // 'true'\nconst SFNT_TRUETYPE_TYP1 = 0x74797031; // 'typ1'\nconst SFNT_OPENTYPE_CFF = 0x4f54544f; // 'OTTO'\nconst SFNT_COLLECTION = 0x74746366; // 'ttcf'\n\nfunction validateFontBinaryHeader(\n\tbytes: Uint8Array,\n\tsourceLabel: string,\n): \"truetype\" | \"opentype\" {\n\tif (bytes.length < 12) {\n\t\tthrow new Error(\n\t\t\t`Invalid font binary for \"${sourceLabel}\": File size (${bytes.length} bytes) is too small to be a valid TrueType or OpenType font.`,\n\t\t);\n\t}\n\n\tconst tag =\n\t\t((bytes[0] ?? 0) << 24) |\n\t\t((bytes[1] ?? 0) << 16) |\n\t\t((bytes[2] ?? 0) << 8) |\n\t\t(bytes[3] ?? 0);\n\n\tif (\n\t\ttag === SFNT_TRUETYPE_1 ||\n\t\ttag === SFNT_TRUETYPE_TRUE ||\n\t\ttag === SFNT_TRUETYPE_TYP1 ||\n\t\ttag === SFNT_COLLECTION\n\t) {\n\t\treturn \"truetype\";\n\t}\n\n\tif (tag === SFNT_OPENTYPE_CFF) {\n\t\treturn \"opentype\";\n\t}\n\n\tconst hexTag = (tag >>> 0).toString(16).padStart(8, \"0\");\n\tthrow new Error(\n\t\t`Invalid font format for \"${sourceLabel}\": Expected a valid TrueType (.ttf) or OpenType (.otf) font binary. Found header tag: 0x${hexTag}.`,\n\t);\n}\n\nasync function resolveSourceBuffer(\n\tsource: string | Uint8Array,\n): Promise<ResolvedSource> {\n\tif (source instanceof Uint8Array) {\n\t\treturn { buffer: source };\n\t}\n\n\tif (typeof source !== \"string\") {\n\t\tthrow new TypeError(\n\t\t\t`Font source must be a file path string or Uint8Array, received: ${typeof source}`,\n\t\t);\n\t}\n\n\tlet cleanPath = source;\n\tif (cleanPath.startsWith(\"http://\") || cleanPath.startsWith(\"https://\")) {\n\t\tconst res = await fetch(cleanPath);\n\t\tif (!res.ok) {\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to download font from \"${cleanPath}\": HTTP ${res.status} ${res.statusText}`,\n\t\t\t);\n\t\t}\n\t\tconst arrayBuffer = await res.arrayBuffer();\n\t\treturn {\n\t\t\tbuffer: new Uint8Array(arrayBuffer),\n\t\t\tfilePath: cleanPath,\n\t\t};\n\t}\n\n\tif (cleanPath.startsWith(\"file://\")) {\n\t\ttry {\n\t\t\tcleanPath = new URL(cleanPath).pathname;\n\t\t} catch {\n\t\t\tcleanPath = cleanPath.replace(/^file:\\/\\//, \"\");\n\t\t}\n\t}\n\n\tconst candidates: string[] = [\n\t\tcleanPath,\n\t\tpath.resolve(process.cwd(), cleanPath),\n\t\tpath.resolve(process.cwd(), \"assets/fonts\", cleanPath),\n\t\tpath.resolve(process.cwd(), \"assets/fonts\", path.basename(cleanPath)),\n\t];\n\n\t// Upward traversal to locate fonts in parent monorepo roots\n\tlet currentDir = process.cwd();\n\tfor (let i = 0; i < 5; i++) {\n\t\tcandidates.push(path.resolve(currentDir, cleanPath));\n\t\tcandidates.push(\n\t\t\tpath.resolve(currentDir, \"assets/fonts\", path.basename(cleanPath)),\n\t\t);\n\t\tconst parent = path.dirname(currentDir);\n\t\tif (parent === currentDir) break;\n\t\tcurrentDir = parent;\n\t}\n\n\tlet resolvedPath: string | null = null;\n\tlet fileBuffer: Buffer | null = null;\n\n\tfor (const candidate of candidates) {\n\t\ttry {\n\t\t\tconst stat = await fs.stat(candidate);\n\t\t\tif (stat.isFile()) {\n\t\t\t\tresolvedPath = candidate;\n\t\t\t\tfileBuffer = await fs.readFile(candidate);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch {\n\t\t\t// Continue searching next candidate\n\t\t}\n\t}\n\n\tif (!resolvedPath || !fileBuffer) {\n\t\tthrow new Error(\n\t\t\t`Font file not found: \"${source}\". Checked candidate locations:\\n - ${candidates.join(\"\\n - \")}`,\n\t\t);\n\t}\n\n\treturn {\n\t\tbuffer: new Uint8Array(\n\t\t\tfileBuffer.buffer,\n\t\t\tfileBuffer.byteOffset,\n\t\t\tfileBuffer.byteLength,\n\t\t),\n\t\tfilePath: resolvedPath,\n\t};\n}\n\n/**\n * Central singleton manager for font registration, TTF validation, and compositor typography binding.\n */\nexport interface MeasureTextOptions {\n\tfontFamily: string;\n\tfontSize?: number;\n\tfontWeight?: string | number;\n\t/** Extra px between characters, as on `Layer.text`. */\n\tletterSpacing?: number;\n\t/** Multiplier of fontSize when < 10, else px. Default 1.2. */\n\tlineHeight?: number;\n\t/** Wrap width in px; omit for one line per `\\n`. */\n\twidth?: number;\n\talign?: \"left\" | \"center\" | \"right\";\n\t/** Paragraph base direction, as on `Layer.text`. Default \"auto\". */\n\tdirection?: \"ltr\" | \"rtl\" | \"auto\";\n}\n\nexport interface MeasuredGlyph {\n\tchar: string;\n\t/** Index into the string (code units), matching `text.slice`. */\n\tindex: number;\n\t/** Left edge of the glyph, relative to the text box. */\n\tx: number;\n\t/** Baseline-relative top of the line box. */\n\ty: number;\n\t/** Advance width in px. */\n\twidth: number;\n\tline: number;\n\t/** Part of a right-to-left run: reading continues to the left. */\n\trtl?: boolean;\n}\n\nexport interface TextMetrics {\n\twidth: number;\n\theight: number;\n\tlines: number;\n\t/** Line box height in px. */\n\tlineHeight: number;\n\tglyphs: MeasuredGlyph[];\n\t/**\n\t * X of a caret placed after `count` characters (0 = before the first),\n\t * relative to the text box. In right-to-left text the caret sits on the\n\t * left of the last character. Pair with a `.keys(\"text\", …)` reveal to make\n\t * a cursor follow typing exactly.\n\t */\n\tcaretX(count: number): number;\n\t/** Width of the first `count` characters (same as `caretX` on one line). */\n\twidthOf(count: number): number;\n}\n\nexport class FontManager {\n\tprivate static instance: FontManager | null = null;\n\tprivate readonly fonts = new Map<string, RegisteredFont>();\n\n\tprivate constructor() {}\n\n\t/**\n\t * Returns the singleton FontManager instance.\n\t */\n\tpublic static getInstance(): FontManager {\n\t\tif (!FontManager.instance) {\n\t\t\tFontManager.instance = new FontManager();\n\t\t}\n\t\treturn FontManager.instance;\n\t}\n\n\t/**\n\t * Registers a TrueType/OpenType font into the Framefields engine with validation.\n\t */\n\tpublic static async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\treturn FontManager.getInstance().register(optionsOrFamilyOrSource, source);\n\t}\n\n\t/**\n\t * Sets the color emoji font text draws emoji with, for the preview and the\n\t * export alike: a CBDT/CBLC bitmap font such as Noto Color Emoji, as a file\n\t * path, URL or bytes. framefields ships none; without one, exports draw\n\t * nothing for emoji.\n\t */\n\tpublic static async registerEmojiFont(\n\t\tsource: string | Uint8Array,\n\t): Promise<void> {\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(source);\n\t\tconst label =\n\t\t\tfilePath ?? (typeof source === \"string\" ? source : \"Uint8Array\");\n\t\tvalidateFontBinaryHeader(buffer, label);\n\t\tSlugFontCache.setEmojiFont(buffer, filePath);\n\t}\n\n\t/**\n\t * Measures text with the real font, exactly as `Layer.text` lays it out:\n\t * box size, line count, per-glyph positions and caret offsets. Use it to\n\t * size containers, place cursors, underline a word or center by ink\n\t * instead of guessing advances. The family must be registered first.\n\t *\n\t * ```ts\n\t * const m = FontManager.measure(\"Hello\", { fontFamily: \"Inter\", fontSize: 60 });\n\t * m.width; m.caretX(3); m.glyphs[1].x\n\t * ```\n\t */\n\tpublic static measure(\n\t\ttext: string,\n\t\toptions: MeasureTextOptions,\n\t): TextMetrics {\n\t\tconst fontSize = options.fontSize ?? 48;\n\t\tconst font = SlugFontCache.getFont(\n\t\t\toptions.fontFamily,\n\t\t\toptions.fontWeight,\n\t\t\tnull,\n\t\t\tundefined,\n\t\t\tfontSize,\n\t\t);\n\t\tif (!font) {\n\t\t\tthrow new Error(\n\t\t\t\t`FontManager.measure: font \"${options.fontFamily}\" is not registered. ` +\n\t\t\t\t\t\"Call `await FontManager.register(...)` first.\",\n\t\t\t);\n\t\t}\n\t\tconst lineHeight =\n\t\t\toptions.lineHeight !== undefined && options.lineHeight < 10\n\t\t\t\t? options.lineHeight * fontSize\n\t\t\t\t: (options.lineHeight ?? fontSize * 1.2);\n\t\tconst letterSpacing = options.letterSpacing ?? 0;\n\t\tconst { width, height, layout } = SlugGeometry.measure(\n\t\t\ttext,\n\t\t\tfont,\n\t\t\tfontSize,\n\t\t\tletterSpacing,\n\t\t\tlineHeight,\n\t\t\toptions.width,\n\t\t\tundefined,\n\t\t\toptions.direction,\n\t\t);\n\t\tconst scale = fontSize / font.unitsPerEm;\n\t\t// One entry per cluster (a letter with its marks, or a ligature), in\n\t\t// reading order; textIndex maps it back to the string.\n\t\tconst glyphs: MeasuredGlyph[] = [];\n\t\tconst seen = new Set<number>();\n\t\tlet cursor = 0;\n\t\tfor (const g of layout.glyphs) {\n\t\t\tlet index = g.textIndex;\n\t\t\tif (index === undefined) {\n\t\t\t\tconst at = text.indexOf(g.char, cursor);\n\t\t\t\tindex = at >= 0 ? at : cursor;\n\t\t\t}\n\t\t\tif (seen.has(index)) continue;\n\t\t\tseen.add(index);\n\t\t\tcursor = index + g.char.length;\n\t\t\tconst advance =\n\t\t\t\tg.clusterAdvance ?? g.cp.advanceWidth * (g.fontScale ?? scale);\n\t\t\tglyphs.push({\n\t\t\t\tchar: g.char,\n\t\t\t\tindex,\n\t\t\t\tx: g.clusterX ?? g.x,\n\t\t\t\ty: g.y,\n\t\t\t\twidth: advance + letterSpacing,\n\t\t\t\tline: g.lineIndex,\n\t\t\t\t...(g.rtl && { rtl: true }),\n\t\t\t});\n\t\t}\n\t\tconst caretX = (count: number): number => {\n\t\t\tif (count <= 0 || glyphs.length === 0) {\n\t\t\t\tconst first = glyphs[0];\n\t\t\t\tif (!first) return 0;\n\t\t\t\treturn first.rtl ? first.x + first.width - letterSpacing : first.x;\n\t\t\t}\n\t\t\tconst before = glyphs.filter((g) => g.index < count);\n\t\t\tconst last = before[before.length - 1];\n\t\t\tif (!last) return 0;\n\t\t\treturn last.rtl ? last.x : last.x + last.width - letterSpacing;\n\t\t};\n\t\treturn {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tlines: layout.linesCount,\n\t\t\tlineHeight,\n\t\t\tglyphs,\n\t\t\tcaretX,\n\t\t\twidthOf: (count: number) => caretX(count) - (glyphs[0]?.x ?? 0),\n\t\t};\n\t}\n\n\t/**\n\t * Retrieves registered font metadata by family name.\n\t */\n\tpublic static get(family: string): RegisteredFont | undefined {\n\t\treturn FontManager.getInstance().get(family);\n\t}\n\n\t/**\n\t * Checks if a font family has been registered.\n\t */\n\tpublic static has(family: string): boolean {\n\t\treturn FontManager.getInstance().has(family);\n\t}\n\n\t/**\n\t * Returns all currently registered fonts.\n\t */\n\tpublic static getAll(): RegisteredFont[] {\n\t\treturn FontManager.getInstance().getAll();\n\t}\n\n\t/**\n\t * Returns relative or absolute file paths of all registered fonts for composition spec serialization.\n\t */\n\tpublic static getRegisteredFontPaths(): string[] {\n\t\treturn FontManager.getInstance().getRegisteredFontPaths();\n\t}\n\n\t/**\n\t * Clears all registered fonts from the manager.\n\t */\n\tpublic static clear(): void {\n\t\tFontManager.getInstance().clear();\n\t}\n\n\t/**\n\t * Instance registration method with format validation and Slug WebGPU cache population.\n\t */\n\tpublic async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\tlet family: string | undefined;\n\t\tlet rawSource: string | Uint8Array;\n\t\tlet weight: number | string | undefined;\n\t\tlet style: \"normal\" | \"italic\" | \"oblique\" | undefined;\n\n\t\tif (\n\t\t\ttypeof optionsOrFamilyOrSource === \"object\" &&\n\t\t\toptionsOrFamilyOrSource !== null\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource.family;\n\t\t\trawSource = optionsOrFamilyOrSource.source;\n\t\t\tweight = optionsOrFamilyOrSource.weight;\n\t\t\tstyle = optionsOrFamilyOrSource.style;\n\t\t} else if (\n\t\t\ttypeof optionsOrFamilyOrSource === \"string\" &&\n\t\t\tsource !== undefined\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource;\n\t\t\trawSource = source;\n\t\t} else if (typeof optionsOrFamilyOrSource === \"string\") {\n\t\t\tfamily = undefined;\n\t\t\trawSource = optionsOrFamilyOrSource;\n\t\t} else {\n\t\t\tthrow new TypeError(\"Invalid arguments passed to FontManager.register\");\n\t\t}\n\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(rawSource);\n\t\tconst sourceLabel =\n\t\t\tfilePath ?? (typeof rawSource === \"string\" ? rawSource : \"Uint8Array\");\n\t\tconst format = validateFontBinaryHeader(buffer, sourceLabel);\n\n\t\tlet parsedFontkit: fontkit.Font;\n\t\ttry {\n\t\t\tconst parsed = fontkit.create(buffer as unknown as Buffer);\n\t\t\tif (\n\t\t\t\tparsed &&\n\t\t\t\t\"fonts\" in parsed &&\n\t\t\t\tArray.isArray(parsed.fonts) &&\n\t\t\t\tparsed.fonts.length > 0\n\t\t\t) {\n\t\t\t\tparsedFontkit = parsed.fonts[0] as fontkit.Font;\n\t\t\t} else {\n\t\t\t\tparsedFontkit = parsed as fontkit.Font;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to parse TrueType/OpenType font binary for \"${sourceLabel}\": ${msg}`,\n\t\t\t);\n\t\t}\n\n\t\tconst detectedFamily =\n\t\t\tparsedFontkit.familyName ||\n\t\t\tparsedFontkit.postscriptName ||\n\t\t\tpath.parse(sourceLabel).name;\n\t\tconst resolvedFamily = family?.trim() || detectedFamily;\n\n\t\tconst registered: RegisteredFont = {\n\t\t\tfamily: resolvedFamily,\n\t\t\tsource: rawSource,\n\t\t\tfilePath,\n\t\t\tformat,\n\t\t\tpostscriptName: parsedFontkit.postscriptName,\n\t\t\tunitsPerEm: parsedFontkit.unitsPerEm,\n\t\t\tweight,\n\t\t\tstyle,\n\t\t};\n\n\t\tthis.fonts.set(resolvedFamily, registered);\n\n\t\t// Populate headless font registries\n\t\tif (filePath) {\n\t\t\tawait registerHeadlessFont(resolvedFamily, filePath);\n\t\t}\n\t\tSlugFontCache.setParsed(resolvedFamily, parsedFontkit);\n\n\t\treturn registered;\n\t}\n\n\tpublic get(family: string): RegisteredFont | undefined {\n\t\treturn this.fonts.get(family);\n\t}\n\n\tpublic has(family: string): boolean {\n\t\treturn this.fonts.has(family);\n\t}\n\n\tpublic getAll(): RegisteredFont[] {\n\t\treturn Array.from(this.fonts.values());\n\t}\n\n\tpublic getRegisteredFontPaths(): string[] {\n\t\tconst paths: string[] = [];\n\t\tfor (const font of this.fonts.values()) {\n\t\t\tif (font.filePath) {\n\t\t\t\tpaths.push(font.filePath);\n\t\t\t} else if (typeof font.source === \"string\") {\n\t\t\t\tpaths.push(font.source);\n\t\t\t}\n\t\t}\n\t\treturn paths;\n\t}\n\n\tpublic clear(): void {\n\t\tthis.fonts.clear();\n\t}\n}\n"],"mappings":";;;;;;AAgCA,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AAExB,SAAS,yBACR,OACA,aAC0B;AAC1B,KAAI,MAAM,SAAS,GAClB,OAAM,IAAI,MACT,4BAA4B,YAAY,gBAAgB,MAAM,OAAO,+DACrE;CAGF,MAAM,OACH,MAAM,MAAM,MAAM,MAClB,MAAM,MAAM,MAAM,MAClB,MAAM,MAAM,MAAM,KACnB,MAAM,MAAM;AAEd,KACC,QAAQ,mBACR,QAAQ,sBACR,QAAQ,sBACR,QAAQ,gBAER,QAAO;AAGR,KAAI,QAAQ,kBACX,QAAO;CAGR,MAAM,UAAU,QAAQ,GAAG,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI;AACxD,OAAM,IAAI,MACT,4BAA4B,YAAY,0FAA0F,OAAO,GACzI;;AAGF,eAAe,oBACd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,QAA4C;AACtD,SAAO,KAAK,MAAM,IAAI,OAAO;;CAG9B,AAAO,IAAI,QAAyB;AACnC,SAAO,KAAK,MAAM,IAAI,OAAO;;CAG9B,AAAO,SAA2B;AACjC,SAAO,MAAM,KAAK,KAAK,MAAM,QAAQ,CAAC;;CAGvC,AAAO,yBAAmC;EACzC,MAAM,QAAkB,EAAE;AAC1B,OAAK,MAAM,QAAQ,KAAK,MAAM,QAAQ,CACrC,KAAI,KAAK,SACR,OAAM,KAAK,KAAK,SAAS;WACf,OAAO,KAAK,WAAW,SACjC,OAAM,KAAK,KAAK,OAAO;AAGzB,SAAO;;CAGR,AAAO,QAAc;AACpB,OAAK,MAAM,OAAO"}
@@ -1,4 +1,4 @@
1
- import { An as signalRegistry } from "./dist-Cog5jyVI.mjs";
1
+ import { jn as signalRegistry } from "./dist-DQlYw4eG.mjs";
2
2
 
3
3
  //#region ../node-sdk/dist/gpu.mjs
4
4
  const TRANSPARENT = {
@@ -212,4 +212,4 @@ function drawFullscreenPass(encoder, target, pipeline, bindGroups) {
212
212
 
213
213
  //#endregion
214
214
  export { createFullscreenPipeline as a, drawTextureToTarget as c, signalTextureView as d, signalTiming as f, beginTargetPass as i, fragmentBindGroupLayout as l, PREMULTIPLIED_BLEND as n, drawChildToTexture as o, texturesLayout as p, STRAIGHT_ALPHA_BLEND as r, drawFullscreenPass as s, FULLSCREEN_QUAD_WGSL as t, perDevice as u };
215
- //# sourceMappingURL=gpu-Bj08zUc5.mjs.map
215
+ //# sourceMappingURL=gpu-AbcLcr1f.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"gpu-Bj08zUc5.mjs","names":[],"sources":["../../node-sdk/dist/gpu.mjs"],"sourcesContent":["import { signalRegistry } from \"@framefields/webgpu-renderers\";\n\n//#region renderer/gpu.ts\nconst TRANSPARENT = {\n\tr: 0,\n\tg: 0,\n\tb: 0,\n\ta: 0\n};\n/**\n* Full-screen quad vertex stage: a 4-vertex triangle strip (draw(4)) that\n* hands `in.uv` (0,0 top-left → 1,1 bottom-right) to an `fs` reading `VSOut`.\n*/\nconst FULLSCREEN_QUAD_WGSL = `\nstruct VSOut {\n @builtin(position) pos : vec4<f32>,\n @location(0) uv : vec2<f32>,\n};\n\n@vertex fn vs(@builtin(vertex_index) vi: u32) -> VSOut {\n var pos = array<vec2<f32>, 4>(\n vec2<f32>(-1.0, 1.0),\n vec2<f32>(1.0, 1.0),\n vec2<f32>(-1.0, -1.0),\n vec2<f32>(1.0, -1.0)\n );\n var uv = array<vec2<f32>, 4>(\n vec2<f32>(0.0, 0.0),\n vec2<f32>(1.0, 0.0),\n vec2<f32>(0.0, 1.0),\n vec2<f32>(1.0, 1.0)\n );\n return VSOut(vec4<f32>(pos[vi], 0.0, 1.0), uv[vi]);\n}\n`;\n/** Premultiplied-alpha \"over\" blending. */\nconst PREMULTIPLIED_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** Straight-alpha color over a premultiplied-alpha accumulation. */\nconst STRAIGHT_ALPHA_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"src-alpha\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** A bind group layout whose entries are bound at 0, 1, 2… in order. */\nfunction fragmentBindGroupLayout(device, bindings, label) {\n\treturn device.createBindGroupLayout({\n\t\t...label && { label },\n\t\tentries: bindings.map((binding, index) => {\n\t\t\tif (binding === \"uniform\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tbuffer: { type: \"uniform\" }\n\t\t\t};\n\t\t\tif (binding === \"texture\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\ttexture: { sampleType: \"float\" }\n\t\t\t};\n\t\t\tif (binding === \"sampler\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tsampler: { type: \"filtering\" }\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\t...binding,\n\t\t\t\tbinding: index\n\t\t\t};\n\t\t})\n\t});\n}\n/** `count` float textures followed by one filtering sampler. */\nfunction texturesLayout(device, count) {\n\treturn fragmentBindGroupLayout(device, [...Array(count).fill(\"texture\"), \"sampler\"]);\n}\n/** Memoizes `create` per GPUDevice (resources can't cross devices). */\nfunction perDevice(create) {\n\tconst cache = /* @__PURE__ */ new WeakMap();\n\treturn (device) => {\n\t\tlet value = cache.get(device);\n\t\tif (value === void 0) {\n\t\t\tvalue = create(device);\n\t\t\tcache.set(device, value);\n\t\t}\n\t\treturn value;\n\t};\n}\n/** A triangle-strip pipeline drawing one full-screen quad (`draw(4)`). */\nfunction createFullscreenPipeline(device, options) {\n\tconst { module, format, blend } = options;\n\treturn device.createRenderPipeline({\n\t\t...options.label && { label: options.label },\n\t\tlayout: Array.isArray(options.layouts) ? device.createPipelineLayout({ bindGroupLayouts: options.layouts }) : options.layouts,\n\t\tvertex: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.vertexEntryPoint ?? \"vs\"\n\t\t},\n\t\tfragment: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.fragmentEntryPoint ?? \"fs\",\n\t\t\ttargets: [blend ? {\n\t\t\t\tformat,\n\t\t\t\tblend\n\t\t\t} : { format }]\n\t\t},\n\t\tprimitive: { topology: \"triangle-strip\" }\n\t});\n}\n/**\n* Renders `child` into a cleared temporary texture with an identity\n* transform and a full-size scissor, and returns that texture.\n*/\nasync function drawChildToTexture(args, child, options = {}) {\n\tconst { ctx, encoder, props } = args;\n\tconst width = options.width ?? args.targetWidth;\n\tconst height = options.height ?? args.targetHeight;\n\tconst texture = ctx.renderer.getTemporaryTexture(width, height, [\n\t\t...props.excludeTextures || [],\n\t\targs.targetTexture,\n\t\t...options.exclude ?? []\n\t]);\n\tconst view = texture.createView();\n\tctx.renderer.beginFrame(encoder, view, TRANSPARENT, width, height, \"clear\").end();\n\tctx.renderer.pushScissor({\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t});\n\tctx.renderer.pushIdentity();\n\tawait args.drawChild(child, options.props ?? {\n\t\t...props,\n\t\tvirtualMedia: child\n\t}, view, texture, width, height);\n\tctx.renderer.popTransform();\n\tctx.renderer.popScissor();\n\treturn {\n\t\ttexture,\n\t\tview\n\t};\n}\n/**\n* Opens a \"load\" pass on the node's target and makes it the node's current\n* pass (the caller hands it back to the compositor).\n*/\nfunction beginTargetPass(args, width = args.targetWidth, height = args.targetHeight) {\n\tconst pass = args.ctx.renderer.beginFrame(args.encoder, args.targetView, TRANSPARENT, width, height, \"load\");\n\targs.pass = pass;\n\treturn pass;\n}\n/** Draws `texture` over the whole target at `opacity` (the node's output). */\nfunction drawTextureToTarget(args, texture, opacity = 1) {\n\tconst { targetWidth: width, targetHeight: height } = args;\n\targs.ctx.renderer.drawTexture(beginTargetPass(args), texture, {\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t}, { opacity });\n}\n/** Clock a signal texture is evaluated at, in seconds. */\nfunction signalTiming(props, frame, fps, fallbackDurationSeconds = 0) {\n\tconst metadataDurationMs = props.virtualMedia?.metadata?.durationMs;\n\treturn {\n\t\telapsedSeconds: props.elapsedMs !== void 0 ? props.elapsedMs / 1e3 : frame / fps,\n\t\tdurationSeconds: metadataDurationMs ? metadataDurationMs / 1e3 : props.durationMs !== void 0 ? props.durationMs / 1e3 : fallbackDurationSeconds\n\t};\n}\n/**\n* The texture a bound parameter samples: its own GPU binding, the signal's\n* texture (cached under `sd.nodeId`, else `fallbackId`), or a 1×1 dummy.\n*/\nfunction signalTextureView(sc, param, fallbackId) {\n\tconst { args } = sc;\n\tif (param.gpuTextureView) return param.gpuTextureView;\n\tif (param.hasStaticSig && param.sd) return signalRegistry.getOrCreate2DTextureView(args.ctx.device, args.encoder, param.sd.nodeId ?? fallbackId, sc.elapsedSeconds, sc.durationSeconds, param.sd, sc.width, sc.height, args.props.renderId, sc.frame, sc.fps);\n\treturn signalRegistry.getDummy1x1TextureView(args.ctx.device);\n}\n/** Clears `target` to transparent and draws one full-screen quad into it. */\nfunction drawFullscreenPass(encoder, target, pipeline, bindGroups) {\n\tconst pass = encoder.beginRenderPass({ colorAttachments: [{\n\t\tview: target,\n\t\tloadOp: \"clear\",\n\t\tstoreOp: \"store\",\n\t\tclearValue: TRANSPARENT\n\t}] });\n\tpass.setPipeline(pipeline);\n\tbindGroups.forEach((group, index) => {\n\t\tpass.setBindGroup(index, group);\n\t});\n\tpass.draw(4);\n\tpass.end();\n}\n\n//#endregion\nexport { FULLSCREEN_QUAD_WGSL, PREMULTIPLIED_BLEND, STRAIGHT_ALPHA_BLEND, beginTargetPass, createFullscreenPipeline, drawChildToTexture, drawFullscreenPass, drawTextureToTarget, fragmentBindGroupLayout, perDevice, signalTextureView, signalTiming, texturesLayout };\n//# sourceMappingURL=gpu.mjs.map"],"mappings":";;;AAGA,MAAM,cAAc;CACnB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH;;;;;AAKD,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;AAuB7B,MAAM,sBAAsB;CAC3B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,MAAM,uBAAuB;CAC5B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,SAAS,wBAAwB,QAAQ,UAA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AO;EACN,gBAAgB,MAAM,cAAc,KAAK,IAAI,MAAM,YAAY,MAAM,QAAQ;EAC7E,iBAAiB,qBAAqB,qBAAqB,MAAM,MAAM,eAAe,KAAK,IAAI,MAAM,aAAa,MAAM;EACxH;;;;;;AAMF,SAAS,kBAAkB,IAAI,OAAO,YAAY;CACjD,MAAM,EAAE,SAAS;AACjB,KAAI,MAAM,eAAgB,QAAO,MAAM;AACvC,KAAI,MAAM,gBAAgB,MAAM,GAAI,QAAO,eAAe,yBAAyB,KAAK,IAAI,QAAQ,KAAK,SAAS,MAAM,GAAG,UAAU,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,MAAM,IAAI,GAAG,OAAO,GAAG,QAAQ,KAAK,MAAM,UAAU,GAAG,OAAO,GAAG,IAAI;AAC7P,QAAO,eAAe,uBAAuB,KAAK,IAAI,OAAO;;;AAG9D,SAAS,mBAAmB,SAAS,QAAQ,UAAU,YAAY;CAClE,MAAM,OAAO,QAAQ,gBAAgB,EAAE,kBAAkB,CAAC;EACzD,MAAM;EACN,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,CAAC,EAAE,CAAC;AACL,MAAK,YAAY,SAAS;AAC1B,YAAW,SAAS,OAAO,UAAU;AACpC,OAAK,aAAa,OAAO,MAAM;GAC9B;AACF,MAAK,KAAK,EAAE;AACZ,MAAK,KAAK"}
1
+ {"version":3,"file":"gpu-AbcLcr1f.mjs","names":[],"sources":["../../node-sdk/dist/gpu.mjs"],"sourcesContent":["import { signalRegistry } from \"@framefields/webgpu-renderers\";\n\n//#region renderer/gpu.ts\nconst TRANSPARENT = {\n\tr: 0,\n\tg: 0,\n\tb: 0,\n\ta: 0\n};\n/**\n* Full-screen quad vertex stage: a 4-vertex triangle strip (draw(4)) that\n* hands `in.uv` (0,0 top-left → 1,1 bottom-right) to an `fs` reading `VSOut`.\n*/\nconst FULLSCREEN_QUAD_WGSL = `\nstruct VSOut {\n @builtin(position) pos : vec4<f32>,\n @location(0) uv : vec2<f32>,\n};\n\n@vertex fn vs(@builtin(vertex_index) vi: u32) -> VSOut {\n var pos = array<vec2<f32>, 4>(\n vec2<f32>(-1.0, 1.0),\n vec2<f32>(1.0, 1.0),\n vec2<f32>(-1.0, -1.0),\n vec2<f32>(1.0, -1.0)\n );\n var uv = array<vec2<f32>, 4>(\n vec2<f32>(0.0, 0.0),\n vec2<f32>(1.0, 0.0),\n vec2<f32>(0.0, 1.0),\n vec2<f32>(1.0, 1.0)\n );\n return VSOut(vec4<f32>(pos[vi], 0.0, 1.0), uv[vi]);\n}\n`;\n/** Premultiplied-alpha \"over\" blending. */\nconst PREMULTIPLIED_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** Straight-alpha color over a premultiplied-alpha accumulation. */\nconst STRAIGHT_ALPHA_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"src-alpha\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** A bind group layout whose entries are bound at 0, 1, 2… in order. */\nfunction fragmentBindGroupLayout(device, bindings, label) {\n\treturn device.createBindGroupLayout({\n\t\t...label && { label },\n\t\tentries: bindings.map((binding, index) => {\n\t\t\tif (binding === \"uniform\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tbuffer: { type: \"uniform\" }\n\t\t\t};\n\t\t\tif (binding === \"texture\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\ttexture: { sampleType: \"float\" }\n\t\t\t};\n\t\t\tif (binding === \"sampler\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tsampler: { type: \"filtering\" }\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\t...binding,\n\t\t\t\tbinding: index\n\t\t\t};\n\t\t})\n\t});\n}\n/** `count` float textures followed by one filtering sampler. */\nfunction texturesLayout(device, count) {\n\treturn fragmentBindGroupLayout(device, [...Array(count).fill(\"texture\"), \"sampler\"]);\n}\n/** Memoizes `create` per GPUDevice (resources can't cross devices). */\nfunction perDevice(create) {\n\tconst cache = /* @__PURE__ */ new WeakMap();\n\treturn (device) => {\n\t\tlet value = cache.get(device);\n\t\tif (value === void 0) {\n\t\t\tvalue = create(device);\n\t\t\tcache.set(device, value);\n\t\t}\n\t\treturn value;\n\t};\n}\n/** A triangle-strip pipeline drawing one full-screen quad (`draw(4)`). */\nfunction createFullscreenPipeline(device, options) {\n\tconst { module, format, blend } = options;\n\treturn device.createRenderPipeline({\n\t\t...options.label && { label: options.label },\n\t\tlayout: Array.isArray(options.layouts) ? device.createPipelineLayout({ bindGroupLayouts: options.layouts }) : options.layouts,\n\t\tvertex: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.vertexEntryPoint ?? \"vs\"\n\t\t},\n\t\tfragment: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.fragmentEntryPoint ?? \"fs\",\n\t\t\ttargets: [blend ? {\n\t\t\t\tformat,\n\t\t\t\tblend\n\t\t\t} : { format }]\n\t\t},\n\t\tprimitive: { topology: \"triangle-strip\" }\n\t});\n}\n/**\n* Renders `child` into a cleared temporary texture with an identity\n* transform and a full-size scissor, and returns that texture.\n*/\nasync function drawChildToTexture(args, child, options = {}) {\n\tconst { ctx, encoder, props } = args;\n\tconst width = options.width ?? args.targetWidth;\n\tconst height = options.height ?? args.targetHeight;\n\tconst texture = ctx.renderer.getTemporaryTexture(width, height, [\n\t\t...props.excludeTextures || [],\n\t\targs.targetTexture,\n\t\t...options.exclude ?? []\n\t]);\n\tconst view = texture.createView();\n\tctx.renderer.beginFrame(encoder, view, TRANSPARENT, width, height, \"clear\").end();\n\tctx.renderer.pushScissor({\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t});\n\tctx.renderer.pushIdentity();\n\tawait args.drawChild(child, options.props ?? {\n\t\t...props,\n\t\tvirtualMedia: child\n\t}, view, texture, width, height);\n\tctx.renderer.popTransform();\n\tctx.renderer.popScissor();\n\treturn {\n\t\ttexture,\n\t\tview\n\t};\n}\n/**\n* Opens a \"load\" pass on the node's target and makes it the node's current\n* pass (the caller hands it back to the compositor).\n*/\nfunction beginTargetPass(args, width = args.targetWidth, height = args.targetHeight) {\n\tconst pass = args.ctx.renderer.beginFrame(args.encoder, args.targetView, TRANSPARENT, width, height, \"load\");\n\targs.pass = pass;\n\treturn pass;\n}\n/** Draws `texture` over the whole target at `opacity` (the node's output). */\nfunction drawTextureToTarget(args, texture, opacity = 1) {\n\tconst { targetWidth: width, targetHeight: height } = args;\n\targs.ctx.renderer.drawTexture(beginTargetPass(args), texture, {\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t}, { opacity });\n}\n/** Clock a signal texture is evaluated at, in seconds. */\nfunction signalTiming(props, frame, fps, fallbackDurationSeconds = 0) {\n\tconst metadataDurationMs = props.virtualMedia?.metadata?.durationMs;\n\treturn {\n\t\telapsedSeconds: props.elapsedMs !== void 0 ? props.elapsedMs / 1e3 : frame / fps,\n\t\tdurationSeconds: metadataDurationMs ? metadataDurationMs / 1e3 : props.durationMs !== void 0 ? props.durationMs / 1e3 : fallbackDurationSeconds\n\t};\n}\n/**\n* The texture a bound parameter samples: its own GPU binding, the signal's\n* texture (cached under `sd.nodeId`, else `fallbackId`), or a 1×1 dummy.\n*/\nfunction signalTextureView(sc, param, fallbackId) {\n\tconst { args } = sc;\n\tif (param.gpuTextureView) return param.gpuTextureView;\n\tif (param.hasStaticSig && param.sd) return signalRegistry.getOrCreate2DTextureView(args.ctx.device, args.encoder, param.sd.nodeId ?? fallbackId, sc.elapsedSeconds, sc.durationSeconds, param.sd, sc.width, sc.height, args.props.renderId, sc.frame, sc.fps);\n\treturn signalRegistry.getDummy1x1TextureView(args.ctx.device);\n}\n/** Clears `target` to transparent and draws one full-screen quad into it. */\nfunction drawFullscreenPass(encoder, target, pipeline, bindGroups) {\n\tconst pass = encoder.beginRenderPass({ colorAttachments: [{\n\t\tview: target,\n\t\tloadOp: \"clear\",\n\t\tstoreOp: \"store\",\n\t\tclearValue: TRANSPARENT\n\t}] });\n\tpass.setPipeline(pipeline);\n\tbindGroups.forEach((group, index) => {\n\t\tpass.setBindGroup(index, group);\n\t});\n\tpass.draw(4);\n\tpass.end();\n}\n\n//#endregion\nexport { FULLSCREEN_QUAD_WGSL, PREMULTIPLIED_BLEND, STRAIGHT_ALPHA_BLEND, beginTargetPass, createFullscreenPipeline, drawChildToTexture, drawFullscreenPass, drawTextureToTarget, fragmentBindGroupLayout, perDevice, signalTextureView, signalTiming, texturesLayout };\n//# sourceMappingURL=gpu.mjs.map"],"mappings":";;;AAGA,MAAM,cAAc;CACnB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH;;;;;AAKD,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;AAuB7B,MAAM,sBAAsB;CAC3B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,MAAM,uBAAuB;CAC5B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,SAAS,wBAAwB,QAAQ,UAAU,OAAO;AACzD,QAAO,OAAO,sBAAsB;EACnC,GAAG,SAAS,EAAE,OAAO;EACrB,SAAS,SAAS,KAAK,SAAS,UAAU;AACzC,OAAI,YAAY,UAAW,QAAO;IACjC,SA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,MAAM;EACxH;;;;;;AAMF,SAAS,kBAAkB,IAAI,OAAO,YAAY;CACjD,MAAM,EAAE,SAAS;AACjB,KAAI,MAAM,eAAgB,QAAO,MAAM;AACvC,KAAI,MAAM,gBAAgB,MAAM,GAAI,QAAO,eAAe,yBAAyB,KAAK,IAAI,QAAQ,KAAK,SAAS,MAAM,GAAG,UAAU,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,MAAM,IAAI,GAAG,OAAO,GAAG,QAAQ,KAAK,MAAM,UAAU,GAAG,OAAO,GAAG,IAAI;AAC7P,QAAO,eAAe,uBAAuB,KAAK,IAAI,OAAO;;;AAG9D,SAAS,mBAAmB,SAAS,QAAQ,UAAU,YAAY;CAClE,MAAM,OAAO,QAAQ,gBAAgB,EAAE,kBAAkB,CAAC;EACzD,MAAM;EACN,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,CAAC,EAAE,CAAC;AACL,MAAK,YAAY,SAAS;AAC1B,YAAW,SAAS,OAAO,UAAU;AACpC,OAAK,aAAa,OAAO,MAAM;GAC9B;AACF,MAAK,KAAK,EAAE;AACZ,MAAK,KAAK"}
@@ -4604,6 +4604,19 @@ declare class Renderer2D {
4604
4604
  * null/undefined/unrecognised input.
4605
4605
  */
4606
4606
 
4607
+ //#endregion
4608
+ //#region src/device.d.ts
4609
+ /** The adapter behind the rendering device. */
4610
+ interface GpuAdapterDescription {
4611
+ vendor: string;
4612
+ architecture: string;
4613
+ device: string;
4614
+ description: string;
4615
+ /** A CPU implementation (lavapipe/llvmpipe, SwiftShader, WARP). */
4616
+ software: boolean;
4617
+ }
4618
+ /** Initialises the rendering device if needed and describes its adapter. */
4619
+ declare function describeGpu(): Promise<GpuAdapterDescription>;
4607
4620
  declare const ensureDevice: (opts?: GPURequestAdapterOptions) => Promise<GPUDevice>;
4608
4621
  //#endregion
4609
4622
  //#region src/headless/init.d.ts
@@ -4616,6 +4629,11 @@ declare function initHeadlessWebGPU(): Promise<void>;
4616
4629
  declare class InputStore {
4617
4630
  private store;
4618
4631
  acquire(url: string): Promise<Input>;
4632
+ /**
4633
+ * Drops every cached input, including ones a failed render never released.
4634
+ * Used between jobs, when the same path may now hold a different file.
4635
+ */
4636
+ clear(): void;
4619
4637
  release(url: string): void;
4620
4638
  }
4621
4639
  declare const inputStore: InputStore;
@@ -5894,5 +5912,5 @@ declare global {
5894
5912
  var __GATEWAI_DELAYS__: Set<number>;
5895
5913
  }
5896
5914
  //#endregion
5897
- export { AnchorGroupingSchema as $, TrackedObject as $a, NodeProcessorContext as $i, BezierSegment3D as $n, progressSignal as $o, DEFAULT_MEDIA_DIMENSION as $r, TextCursorStyle as $t, SlugPipeline as A, SignalGateDataSchema as Aa, HandleTypeVal as Ai, computeLineLeadingDisplacement as An, formatHex as Ao, AnimationTypeSchema as Ar, ParticleDissolveConfig as At, lutStore as B, StorageService as Ba, MediaOperation as Bi, evaluateSkewMatrix as Bn, gradientStopsToOklab as Bo, COMPOSITE_OPERATIONS as Br, SelectorUnits as Bt, RoundedBoxGeometryOptions as C, SignalBuilderConfig as Ca, GateSignalOptions as Ci, Vec2Schema as Cn, cosineSignal as Co, ResolvedEnvironment as Cr, GlyphAnchorPointSchema as Ct, SignalRegistryResource as D, SignalData as Da, Gradient as Di, VolumetricFormationModeSchema as Dn, deserializeSignalData as Do, parseColorToRgb as Dr, LineSpacingDynamicsSchema as Dt, SignalRegistry as E, SignalContext as Ea, GlobalCompositeOperation as Ei, VolumetricFormationMode as En, dataTypeColors as Eo, Vector3Math as Er, LineSpacingDynamics as Et, initHeadlessWebGPU as F, SignalValue as Fa, Landmark3D as Fi, evaluateCubicBezier as Fn, getFileDataMetadata as Fo, BaseMediaOperationProps as Fr, SelectorBasedOnSchema as Ft, signalRegistry as G, TensorNode as Ga, MediaSourceSchema as Gi, generatePathSegments as Gn, isVirtualMediaData as Go, ConfigHandle as Gr, Spatial3DPropertiesSchema as Gt, parseMTL as H, TensorData as Ha, MediaService as Hi, evaluateTypewriterState as Hn, isCssGradient as Ho, CannyOptions as Hr, SkewProperties as Ht, inputStore as I, SineSignalOptions as Ia, MAX_GRADIENT_STOPS as Ii, evaluateCubicBezierDerivative as In, getFingerprint as Io, BaseMediaOperationPropsSchema as Ir, SelectorMode as It, AETextAnimatorSchema as J, TextSpan as Ja, ModerationUnrefundableError as Ji, parseSvgPathToCubicBeziers as Jn, normalizeColorStops as Jo, ConnectedInput as Jr, TextAnchorConfig as Jt, textureCache as K, TensorPipelineConfig as Ka, MeshAudioDeformConfig as Ki, getScramblePool as Kn, limitGradientStops as Ko, ConfigHandleSchema as Kr, SpringPhysics as Kt, loadFBX as L, SingleOutputGeneric as La, MIME_TYPES as Li, evaluateExpressionSelector as Ln, getLeafMediaType as Lo, BaseVideoLayerProps as Lr, SelectorModeSchema as Lt, WebGPUAudioProcessor as M, SignalMathDataSchema as Ma, JsonObject as Mi, deterministicWigglyNoise as Mn, frameSignal as Mo, AnyOutputUnionSchema as Mr, PathChainLUT as Mt, buildWGSLSignalFn as N, SignalStats as Na, JsonValue as Ni, distanceToCurveParameter as Nn, generateId as No, AudioExtractorSignalData as Nr, PathChainLUTEntry as Nt, Skeleton3D as O, SignalDataSchema as Oa, GradientType as Oi, buildPathLUT as On, extractSvgDimensions as Oo, resolveEnvironment as Or, LongShadowConfig as Ot, ensureDevice as P, SignalStatsSchema as Pa, JsonValueSchema as Pi, ellipseToCubicBeziers as Pn, getActiveMediaMetadata as Po, AudioExtractorSignalDataSchema as Pr, SelectorBasedOn as Pt, AnchorGrouping as Q, TimelineTransformSchema as Qa, NodeMetadataSchema as Qi, waveToCubicBeziers as Qn, programmaticSignal as Qo, DEFAULT_FPS as Qr, TextCursorConfigSchema as Qt, loadModel3D as R, SingleOutputGenericSchema as Ra, MediaMetadata as Ri, evaluateMarqueeOffset as Rn, getMediaType as Ro, BaseVideoLayerPropsSchema as Rr, SelectorShape as Rt, Renderer3D as S, Signal as Sa, GPUTextureBinding as Si, Vec2 as Sn, computed as So, Path3DSample as Sr, GlyphAnchorPoint as St, ShadowPipeline as T, SignalChannelMetaSchema as Ta, GeneratorSignalDataSchema as Ti, VolumetricFormationConfigSchema as Tn, createVirtualMedia as To, Vec3 as Tr, KineticMarqueeConfigSchema as Tt, parseOBJ as U, TensorDimensions as Ua, MediaSourceDescriptor as Ui, evaluateVolumetricFormation as Un, isEqual as Uo, Color$1 as Ur, SkewPropertiesSchema as Ut, parseFBX as V, TEXT_LAYER_DEFAULTS as Va, MediaOperationSchema as Vi, evaluateSpringProgress as Vn, hasOnlySingleSource as Vo, COMPOSITOR_DEFAULTS as Vr, SelectorUnitsSchema as Vt, shaderStore as W, TensorFormat as Wa, MediaSourceInput as Wi, generateArcLengthLUT as Wn, isSignal as Wo, ColorStopLike as Wr, Spatial3DProperties as Wt, AdvancedTextAnimatorBuilder as X, TimelineSegmentSchema as Xa, MultiOutputGenericSchema as Xi, sampleCurveGeometry as Xn, parseCssColor as Xo, DATA_TYPE_EXTENSIONS as Xr, TextAnimatorBuilder as Xt, AdvancedTextAnimator as Y, TextSpanMark as Ya, MultiOutputGeneric as Yi, sampleAudioSpectrumScale as Yn, oklabToRgb as Yo, ControlNetConditioningOutputs as Yr, TextAnchorConfigSchema as Yt, AdvancedTextAnimatorSchema as Z, TimelineTransform as Za, NodeMetadata as Zi, samplePathChainGeometry as Zn, parseCssGradient as Zo, DEFAULT_DURATION_MS as Zr, TextCursorConfig as Zt, Model3DData as _, ProgrammaticSignal as _a, FileAssetSchema as _i, TypewriterAnimatorSchema as _n, WritableSignal as _o, MAX_LIGHTS as _r, ExpressionSelectorSchema as _t, AudioMeshDeformPipeline as a, NodeVisualConfig as aa, DeflickerOptions as ai, TextPathSourceSchema as an, VideoLayerType as ao, ENVIRONMENT_PRESETS as ar, resolveParam as as, AudioSpectrumTypography as at, RenderContextValue as b, Rgba as ba, FrameContext as bi, VariableFontAxes as bn, checkNodeResultCache as bo, Path3D as br, GlyphAnchorGrouping as bt, BlendMode as c, NormalizedLandmarkList as ca, Effect as ci, TextScrambleConfig as cn, VideoStylePropsSchema as co, FrustumPlane as cr, sampleColorStops as cs, ChromaticGlitchConfigSchema as ct, EffectPipeline as d, Output$1 as da, ExportResult as di, TextSelectorSchema as dn, VirtualMediaData as do, HelixOptions as dr, signalBuilder as ds, DynamicStrokeProperties as dt, NodeProcessorParams as ea, DataForType as ei, TextCursorStyleSchema as en, TransitionSchema as eo, Camera3D as er, registerSignalDependency as es, AnchorPreset as et, GlassPipeline as f, OutputItem as fa, ExportResultSchema as fi, TextSignalSelector as fn, VirtualMediaDataSchema as fo, LIGHT_UNIFORM_SIZE_BYTES as fr, sineSignal as fs, DynamicStrokePropertiesSchema as ft, Mesh3DData as g, PoseSkeletonOptions as ga, FileAsset as gi, TypewriterAnimator as gn, VisionVariant as go, LightsUniformData as gr, updateClockSignals as gs, ExpressionSelector as gt, Material3D as h, ParsedGradientStop as ha, FaceLandmarksOptions as hi, TextWigglySelectorSchema as hn, VisionTask as ho, LightKind as hr, timeSignal as hs, ExpressionEvaluationContext as ht, AudioLatentTrackCache as i, NodeValidationFn as ia, DataTypes as ii, TextPathSource as in, VideoAnimationSchema as io, CirclePathOptions as ir, resolveNumber as is, ArcLengthLUTEntry as it, SphereGeometryOptions as j, SignalMathData as ja, JsonArray as ji, computeRangeSelectorWeight as jn, frameArraySignal as jo, AnyOutputUnion as jr, ParticleDissolveConfigSchema as jt, SlugFontCache as k, SignalGateData as ka, HandleType as ki, computeAnchorPivotOffset as kn, findSourceAsset as ko, AnimationType as kr, LongShadowConfigSchema as kt, Bone3D as l, ObjectBoundingBox as la, EffectConfig as li, TextScrambleConfigSchema as ln, VideoTextPropsSchema as lo, FrustumPlanes as lr, serializeSignalData as ls, CubicBezierSegment as lt, MasterAudioEntry as m, ParsedGradient as ma, ExtendedLayerSchema as mi, TextWigglySelector as mn, VisionNodeSpec as mo, Light3DOptions as mr, takeRenderDiagnostics as ms, EnhancedTextNodeSchema as mt, AudioLatentData as n, NodeResultSchema as na, DataTypeEnum as ni, TextPathOptions as nn, TransitionTypeSchema as no, CameraShakeOptions as nr, resolveBoolean as ns, AnimatableGlyphProps as nt, AudioSignalComputeConfig as o, NodeVisualConfigSchema as oa, DepthNormalsOptions as oi, TextRangeSelector as on, VideoLayerTypeSchema as oo, Environment3DFog as or, resolveString as os, AudioSpectrumTypographySchema as ot, LoadModelOptions as p, OutputItemSchema as pa, ExtendedLayer as pi, TextSignalSelectorSchema as pn, VisionConfig as po, Light3D as pr, stampResult as ps, EnhancedTextNode as pt, AETextAnimator as q, TextOperationSchema as qa, ModerationError as qi, getShuffledOrder as qn, mixColors as qo, ConfigSchemaRegistry as qr, SpringPhysicsSchema as qt, AudioLatentEngine as r, NodeRunFunction as ra, DataTypeVal as ri, TextPathOptionsSchema as rn, VideoAnimation as ro, CatmullRomOptions as rr, resolveMediaMimeType as rs, AnimatableGlyphPropsSchema as rt, AudioSignalComputePipeline as s, NormalRelightingOptions as sa, DetectedObject as si, TextRangeSelectorSchema as sn, VideoSpatialPropsSchema as so, Environment3DOptions as sr, rgbToOklab as ss, ChromaticGlitchConfig as st, AnimationClip3D as t, NodeResult as ta, DataType as ti, TextPathBuilder as tn, TransitionType as to, Camera3DPose as tr, reportRenderDiagnostic as ts, AnchorPresetSchema as tt, CylinderGeometryOptions as u, OpticalFlowOptions as ua, EffectConfigValue as ui, TextSelector as un, VideoTimingPropsSchema as uo, GPULightData as ur, signal as us, CubicBezierSegmentSchema as ut, MotionBlurPipeline as v, ProgrammaticSignalOptions as va, FileData as vi, TypingCadence as vn, XYPosition as vo, Mat4 as vr, ExtendedGlyphProperties as vt, SSAOPipeline as w, SignalChannelMeta as wa, GeneratorSignalData as wi, VolumetricFormationConfig as wn, createOutputItemSchema as wo, ShadowUniformInfo as wr, KineticMarqueeConfig as wt, Renderer2D as x, SegmentationOptions as xa, FrameSignal as xi, VariableFontAxesSchema as xn, computeVideoCropRenderProps as xo, Path3DPoint as xr, GlyphAnchorGroupingSchema as xt, NodeAnimationTrack3D as y, RenderDiagnostic as ya, FileDataSchema as yi, TypingCadenceSchema as yn, appendOperation as yo, Matrix4Math as yr, ExtendedGlyphPropertiesSchema as yt, loadOBJ as z, SourceOperationSchema as za, MediaMetadataSchema as zi, evaluateSelectorCombination as zn, getRenderFingerprint as zo, CAPTION_LAYER_DEFAULTS as zr, SelectorShapeSchema as zt };
5898
- //# sourceMappingURL=index-Cpkzy5XR.d.mts.map
5915
+ export { AdvancedTextAnimatorSchema as $, TimelineTransform as $a, NodeMetadata as $i, samplePathChainGeometry as $n, parseCssGradient as $o, DEFAULT_DURATION_MS as $r, TextCursorConfig as $t, SlugFontCache as A, SignalDataSchema as Aa, GradientType as Ai, buildPathLUT as An, extractSvgDimensions as Ao, resolveEnvironment as Ar, LongShadowConfig as At, loadModel3D as B, SingleOutputGenericSchema as Ba, MediaMetadata as Bi, evaluateMarqueeOffset as Bn, getMediaType as Bo, BaseVideoLayerPropsSchema as Br, SelectorShape as Bt, Renderer3D as C, SegmentationOptions as Ca, FrameSignal as Ci, VariableFontAxesSchema as Cn, computeVideoCropRenderProps as Co, Path3DPoint as Cr, GlyphAnchorGroupingSchema as Ct, SignalRegistry as D, SignalChannelMetaSchema as Da, GeneratorSignalDataSchema as Di, VolumetricFormationConfigSchema as Dn, createVirtualMedia as Do, Vec3 as Dr, KineticMarqueeConfigSchema as Dt, ShadowPipeline as E, SignalChannelMeta as Ea, GeneratorSignalData as Ei, VolumetricFormationConfig as En, createOutputItemSchema as Eo, ShadowUniformInfo as Er, KineticMarqueeConfig as Et, describeGpu as F, SignalStats as Fa, JsonValue as Fi, distanceToCurveParameter as Fn, generateId as Fo, AudioExtractorSignalData as Fr, PathChainLUTEntry as Ft, parseOBJ as G, TensorDimensions as Ga, MediaSourceDescriptor as Gi, evaluateVolumetricFormation as Gn, isEqual as Go, Color$1 as Gr, SkewPropertiesSchema as Gt, lutStore as H, StorageService as Ha, MediaOperation as Hi, evaluateSkewMatrix as Hn, gradientStopsToOklab as Ho, COMPOSITE_OPERATIONS as Hr, SelectorUnits as Ht, ensureDevice as I, SignalStatsSchema as Ia, JsonValueSchema as Ii, ellipseToCubicBeziers as In, getActiveMediaMetadata as Io, AudioExtractorSignalDataSchema as Ir, SelectorBasedOn as It, textureCache as J, TensorPipelineConfig as Ja, MeshAudioDeformConfig as Ji, getScramblePool as Jn, limitGradientStops as Jo, ConfigHandleSchema as Jr, SpringPhysics as Jt, shaderStore as K, TensorFormat as Ka, MediaSourceInput as Ki, generateArcLengthLUT as Kn, isSignal as Ko, ColorStopLike as Kr, Spatial3DProperties as Kt, initHeadlessWebGPU as L, SignalValue as La, Landmark3D as Li, evaluateCubicBezier as Ln, getFileDataMetadata as Lo, BaseMediaOperationProps as Lr, SelectorBasedOnSchema as Lt, SphereGeometryOptions as M, SignalGateDataSchema as Ma, HandleTypeVal as Mi, computeLineLeadingDisplacement as Mn, formatHex as Mo, AnimationTypeSchema as Mr, ParticleDissolveConfig as Mt, WebGPUAudioProcessor as N, SignalMathData as Na, JsonArray as Ni, computeRangeSelectorWeight as Nn, frameArraySignal as No, AnyOutputUnion as Nr, ParticleDissolveConfigSchema as Nt, SignalRegistryResource as O, SignalContext as Oa, GlobalCompositeOperation as Oi, VolumetricFormationMode as On, dataTypeColors as Oo, Vector3Math as Or, LineSpacingDynamics as Ot, buildWGSLSignalFn as P, SignalMathDataSchema as Pa, JsonObject as Pi, deterministicWigglyNoise as Pn, frameSignal as Po, AnyOutputUnionSchema as Pr, PathChainLUT as Pt, AdvancedTextAnimatorBuilder as Q, TimelineSegmentSchema as Qa, MultiOutputGenericSchema as Qi, sampleCurveGeometry as Qn, parseCssColor as Qo, DATA_TYPE_EXTENSIONS as Qr, TextAnimatorBuilder as Qt, inputStore as R, SineSignalOptions as Ra, MAX_GRADIENT_STOPS as Ri, evaluateCubicBezierDerivative as Rn, getFingerprint as Ro, BaseMediaOperationPropsSchema as Rr, SelectorMode as Rt, Renderer2D as S, Rgba as Sa, FrameContext as Si, VariableFontAxes as Sn, checkNodeResultCache as So, Path3D as Sr, GlyphAnchorGrouping as St, SSAOPipeline as T, SignalBuilderConfig as Ta, GateSignalOptions as Ti, Vec2Schema as Tn, cosineSignal as To, ResolvedEnvironment as Tr, GlyphAnchorPointSchema as Tt, parseFBX as U, TEXT_LAYER_DEFAULTS as Ua, MediaOperationSchema as Ui, evaluateSpringProgress as Un, hasOnlySingleSource as Uo, COMPOSITOR_DEFAULTS as Ur, SelectorUnitsSchema as Ut, loadOBJ as V, SourceOperationSchema as Va, MediaMetadataSchema as Vi, evaluateSelectorCombination as Vn, getRenderFingerprint as Vo, CAPTION_LAYER_DEFAULTS as Vr, SelectorShapeSchema as Vt, parseMTL as W, TensorData as Wa, MediaService as Wi, evaluateTypewriterState as Wn, isCssGradient as Wo, CannyOptions as Wr, SkewProperties as Wt, AETextAnimatorSchema as X, TextSpan as Xa, ModerationUnrefundableError as Xi, parseSvgPathToCubicBeziers as Xn, normalizeColorStops as Xo, ConnectedInput as Xr, TextAnchorConfig as Xt, AETextAnimator as Y, TextOperationSchema as Ya, ModerationError as Yi, getShuffledOrder as Yn, mixColors as Yo, ConfigSchemaRegistry as Yr, SpringPhysicsSchema as Yt, AdvancedTextAnimator as Z, TextSpanMark as Za, MultiOutputGeneric as Zi, sampleAudioSpectrumScale as Zn, oklabToRgb as Zo, ControlNetConditioningOutputs as Zr, TextAnchorConfigSchema as Zt, Mesh3DData as _, ParsedGradientStop as _a, FaceLandmarksOptions as _i, TextWigglySelectorSchema as _n, VisionTask as _o, LightKind as _r, timeSignal as _s, ExpressionEvaluationContext as _t, AudioMeshDeformPipeline as a, NodeRunFunction as aa, DataTypeVal as ai, TextPathOptionsSchema as an, VideoAnimation as ao, CatmullRomOptions as ar, resolveMediaMimeType as as, AnimatableGlyphPropsSchema as at, NodeAnimationTrack3D as b, ProgrammaticSignalOptions as ba, FileData as bi, TypingCadence as bn, XYPosition as bo, Mat4 as br, ExtendedGlyphProperties as bt, BlendMode as c, NodeVisualConfigSchema as ca, DepthNormalsOptions as ci, TextRangeSelector as cn, VideoLayerTypeSchema as co, Environment3DFog as cr, resolveString as cs, AudioSpectrumTypographySchema as ct, EffectPipeline as d, ObjectBoundingBox as da, EffectConfig as di, TextScrambleConfigSchema as dn, VideoTextPropsSchema as do, FrustumPlanes as dr, serializeSignalData as ds, CubicBezierSegment as dt, NodeMetadataSchema as ea, DEFAULT_FPS as ei, TextCursorConfigSchema as en, TimelineTransformSchema as eo, waveToCubicBeziers as er, programmaticSignal as es, AnchorGrouping as et, GlassPipeline as f, OpticalFlowOptions as fa, EffectConfigValue as fi, TextSelector as fn, VideoTimingPropsSchema as fo, GPULightData as fr, signal as fs, CubicBezierSegmentSchema as ft, Material3D as g, ParsedGradient as ga, ExtendedLayerSchema as gi, TextWigglySelector as gn, VisionNodeSpec as go, Light3DOptions as gr, takeRenderDiagnostics as gs, EnhancedTextNodeSchema as gt, MasterAudioEntry as h, OutputItemSchema as ha, ExtendedLayer as hi, TextSignalSelectorSchema as hn, VisionConfig as ho, Light3D as hr, stampResult as hs, EnhancedTextNode as ht, AudioLatentTrackCache as i, NodeResultSchema as ia, DataTypeEnum as ii, TextPathOptions as in, TransitionTypeSchema as io, CameraShakeOptions as ir, resolveBoolean as is, AnimatableGlyphProps as it, SlugPipeline as j, SignalGateData as ja, HandleType as ji, computeAnchorPivotOffset as jn, findSourceAsset as jo, AnimationType as jr, LongShadowConfigSchema as jt, Skeleton3D as k, SignalData as ka, Gradient as ki, VolumetricFormationModeSchema as kn, deserializeSignalData as ko, parseColorToRgb as kr, LineSpacingDynamicsSchema as kt, Bone3D as l, NormalRelightingOptions as la, DetectedObject as li, TextRangeSelectorSchema as ln, VideoSpatialPropsSchema as lo, Environment3DOptions as lr, rgbToOklab as ls, ChromaticGlitchConfig as lt, LoadModelOptions as m, OutputItem as ma, ExportResultSchema as mi, TextSignalSelector as mn, VirtualMediaDataSchema as mo, LIGHT_UNIFORM_SIZE_BYTES as mr, sineSignal as ms, DynamicStrokePropertiesSchema as mt, AudioLatentData as n, NodeProcessorParams as na, DataForType as ni, TextCursorStyleSchema as nn, TransitionSchema as no, Camera3D as nr, registerSignalDependency as ns, AnchorPreset as nt, AudioSignalComputeConfig as o, NodeValidationFn as oa, DataTypes as oi, TextPathSource as on, VideoAnimationSchema as oo, CirclePathOptions as or, resolveNumber as os, ArcLengthLUTEntry as ot, GpuAdapterDescription as p, Output$1 as pa, ExportResult as pi, TextSelectorSchema as pn, VirtualMediaData as po, HelixOptions as pr, signalBuilder as ps, DynamicStrokeProperties as pt, signalRegistry as q, TensorNode as qa, MediaSourceSchema as qi, generatePathSegments as qn, isVirtualMediaData as qo, ConfigHandle as qr, Spatial3DPropertiesSchema as qt, AudioLatentEngine as r, NodeResult as ra, DataType as ri, TextPathBuilder as rn, TransitionType as ro, Camera3DPose as rr, reportRenderDiagnostic as rs, AnchorPresetSchema as rt, AudioSignalComputePipeline as s, NodeVisualConfig as sa, DeflickerOptions as si, TextPathSourceSchema as sn, VideoLayerType as so, ENVIRONMENT_PRESETS as sr, resolveParam as ss, AudioSpectrumTypography as st, AnimationClip3D as t, NodeProcessorContext as ta, DEFAULT_MEDIA_DIMENSION as ti, TextCursorStyle as tn, TrackedObject as to, BezierSegment3D as tr, progressSignal as ts, AnchorGroupingSchema as tt, CylinderGeometryOptions as u, NormalizedLandmarkList as ua, Effect as ui, TextScrambleConfig as un, VideoStylePropsSchema as uo, FrustumPlane as ur, sampleColorStops as us, ChromaticGlitchConfigSchema as ut, Model3DData as v, PoseSkeletonOptions as va, FileAsset as vi, TypewriterAnimator as vn, VisionVariant as vo, LightsUniformData as vr, updateClockSignals as vs, ExpressionSelector as vt, RoundedBoxGeometryOptions as w, Signal as wa, GPUTextureBinding as wi, Vec2 as wn, computed as wo, Path3DSample as wr, GlyphAnchorPoint as wt, RenderContextValue as x, RenderDiagnostic as xa, FileDataSchema as xi, TypingCadenceSchema as xn, appendOperation as xo, Matrix4Math as xr, ExtendedGlyphPropertiesSchema as xt, MotionBlurPipeline as y, ProgrammaticSignal as ya, FileAssetSchema as yi, TypewriterAnimatorSchema as yn, WritableSignal as yo, MAX_LIGHTS as yr, ExpressionSelectorSchema as yt, loadFBX as z, SingleOutputGeneric as za, MIME_TYPES as zi, evaluateExpressionSelector as zn, getLeafMediaType as zo, BaseVideoLayerProps as zr, SelectorModeSchema as zt };
5916
+ //# sourceMappingURL=index--1jnkoBj.d.mts.map