framefields 2.8.1 → 2.9.2

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 (432) hide show
  1. package/README.md +30 -1
  2. package/dist/audio/index.mjs +10 -10
  3. package/dist/{audio-vatRe308.mjs → audio-BfQg37MW.mjs} +3 -3
  4. package/dist/{audio-vatRe308.mjs.map → audio-BfQg37MW.mjs.map} +1 -1
  5. package/dist/cli/check-worker.mjs +44 -44
  6. package/dist/components/index.d.mts +2 -2
  7. package/dist/components/index.mjs +43 -43
  8. package/dist/{dist-CFe1fC9l.mjs → dist-C1cCW7Bt.mjs} +8 -1
  9. package/dist/{dist-CFe1fC9l.mjs.map → dist-C1cCW7Bt.mjs.map} +1 -1
  10. package/dist/{dist-BbwtlSZO.mjs → dist-C8Xq3zgx.mjs} +2 -2
  11. package/dist/{dist-BbwtlSZO.mjs.map → dist-C8Xq3zgx.mjs.map} +1 -1
  12. package/dist/effects/index.d.mts +1 -1
  13. package/dist/effects/index.mjs +35 -35
  14. package/dist/{effects-CCyfjbhZ.mjs → effects-CemgqEPv.mjs} +2 -2
  15. package/dist/{effects-CCyfjbhZ.mjs.map → effects-CemgqEPv.mjs.map} +1 -1
  16. package/dist/fonts/index.mjs +2 -2
  17. package/dist/{fonts-C1mgtkCa.mjs → fonts-BW0pPcvJ.mjs} +2 -2
  18. package/dist/{fonts-C1mgtkCa.mjs.map → fonts-BW0pPcvJ.mjs.map} +1 -1
  19. package/dist/{gpu-CU2tEKJJ.mjs → gpu-CMaa63nz.mjs} +2 -2
  20. package/dist/{gpu-CU2tEKJJ.mjs.map → gpu-CMaa63nz.mjs.map} +1 -1
  21. package/dist/{index-BwRrsP_V.d.mts → index-Bnh42ouE.d.mts} +71 -10
  22. package/dist/index-Bnh42ouE.d.mts.map +1 -0
  23. package/dist/index-CFoAmh7q.d.mts.map +1 -1
  24. package/dist/{index-UDDAfHAF.d.mts → index-CQ-bbZk3.d.mts} +64 -13
  25. package/dist/index-CQ-bbZk3.d.mts.map +1 -0
  26. package/dist/index-D5UDyVMb.d.mts.map +1 -1
  27. package/dist/index.d.mts +3 -3
  28. package/dist/index.mjs +50 -50
  29. package/dist/preview/index.mjs +10 -10
  30. package/dist/{preview-WXbsf6Dv.mjs → preview-DvP8AZuV.mjs} +2 -2
  31. package/dist/{preview-WXbsf6Dv.mjs.map → preview-DvP8AZuV.mjs.map} +1 -1
  32. package/dist/preview-engine/audio.mjs +1 -1
  33. package/dist/preview-engine/{chunk-JGDZQCNU.mjs → chunk-2B722GXM.mjs} +1 -1
  34. package/dist/preview-engine/{chunk-GFW3D464.mjs → chunk-2DWY7UBV.mjs} +1 -1
  35. package/dist/preview-engine/{chunk-72DYOIMP.mjs → chunk-2PYTDN2C.mjs} +1 -1
  36. package/dist/preview-engine/{chunk-PF3SXQNV.mjs → chunk-34DL53D5.mjs} +1 -1
  37. package/dist/preview-engine/{chunk-GLXJOXBE.mjs → chunk-34RJ7GAS.mjs} +1 -1
  38. package/dist/preview-engine/{chunk-6OY4YLTC.mjs → chunk-35HMRW4I.mjs} +1 -1
  39. package/dist/preview-engine/{chunk-W26U6BP2.mjs → chunk-4WYM72ZN.mjs} +1 -1
  40. package/dist/preview-engine/{chunk-EQ4VBUWM.mjs → chunk-5AWAOMBR.mjs} +1 -1
  41. package/dist/preview-engine/{chunk-J4SHMCTG.mjs → chunk-6R3UJBL5.mjs} +1 -1
  42. package/dist/preview-engine/{chunk-VHGC72XP.mjs → chunk-73CNXGAK.mjs} +1 -1
  43. package/dist/preview-engine/{chunk-KYOPOCO5.mjs → chunk-AHQCDTD6.mjs} +1 -1
  44. package/dist/preview-engine/{chunk-ADV2TIKA.mjs → chunk-BEYA25UZ.mjs} +1 -1
  45. package/dist/preview-engine/{chunk-RBDIRBEI.mjs → chunk-BJV2LBII.mjs} +1 -1
  46. package/dist/preview-engine/{chunk-LBJBBEKP.mjs → chunk-BVDWS3D2.mjs} +1 -1
  47. package/dist/preview-engine/chunk-BXPM5SJ3.mjs +1 -0
  48. package/dist/preview-engine/{chunk-NIPWL6Z5.mjs → chunk-C4M3B2Q2.mjs} +1 -1
  49. package/dist/preview-engine/{chunk-LLUFOFF4.mjs → chunk-CC4NNNIY.mjs} +1 -1
  50. package/dist/preview-engine/{chunk-NX66555S.mjs → chunk-CN2VLYLB.mjs} +1 -1
  51. package/dist/preview-engine/chunk-D73ZKPFN.mjs +138 -0
  52. package/dist/preview-engine/{chunk-SK7PUBTC.mjs → chunk-DMSZXG56.mjs} +1 -1
  53. package/dist/preview-engine/{chunk-WC257OBY.mjs → chunk-DVZITDQS.mjs} +1 -1
  54. package/dist/preview-engine/{chunk-LLB3AGBQ.mjs → chunk-EJJITH6U.mjs} +1 -1
  55. package/dist/preview-engine/{chunk-COZG35ZR.mjs → chunk-FTCEG3SF.mjs} +1 -1
  56. package/dist/preview-engine/{chunk-57LES7TL.mjs → chunk-GA4HNR44.mjs} +1 -1
  57. package/dist/preview-engine/{chunk-S4WNCEMO.mjs → chunk-GIICZZQI.mjs} +1 -1
  58. package/dist/preview-engine/{chunk-RTHU7REC.mjs → chunk-GRJJVSOV.mjs} +1 -1
  59. package/dist/preview-engine/{chunk-RGDM6PQ5.mjs → chunk-GZWA5QJS.mjs} +1 -1
  60. package/dist/preview-engine/{chunk-LZNNM5OB.mjs → chunk-H7BSN7V7.mjs} +1 -1
  61. package/dist/preview-engine/{chunk-JXUENEQO.mjs → chunk-HOV6DDBZ.mjs} +1 -1
  62. package/dist/preview-engine/{chunk-C6XLAJLL.mjs → chunk-JSYG6OWZ.mjs} +1 -1
  63. package/dist/preview-engine/{chunk-GZVPVOHB.mjs → chunk-K3C6GUQD.mjs} +1 -1
  64. package/dist/preview-engine/chunk-KOVN277Z.mjs +1 -0
  65. package/dist/preview-engine/chunk-KXLXP66K.mjs +1974 -0
  66. package/dist/preview-engine/{chunk-Y6TWMUJC.mjs → chunk-LVYVXVZO.mjs} +1 -1
  67. package/dist/preview-engine/{chunk-NKAVHU7H.mjs → chunk-MIEH74UH.mjs} +7 -7
  68. package/dist/preview-engine/{chunk-AVDHZNIZ.mjs → chunk-OH5W5EL6.mjs} +1 -1
  69. package/dist/preview-engine/{chunk-22F33PPP.mjs → chunk-P5FKRQFU.mjs} +1 -1
  70. package/dist/preview-engine/{chunk-7X2AUKTU.mjs → chunk-PM2W4VLT.mjs} +1 -1
  71. package/dist/preview-engine/{chunk-PYX6Q2EJ.mjs → chunk-QCSVT73T.mjs} +1 -1
  72. package/dist/preview-engine/{chunk-523CTDOC.mjs → chunk-RJIAES3X.mjs} +1 -1
  73. package/dist/preview-engine/{chunk-DPQN7WYQ.mjs → chunk-S2ABWY5G.mjs} +1 -1
  74. package/dist/preview-engine/{chunk-G7JJ6HVL.mjs → chunk-SF37HXAH.mjs} +1 -1
  75. package/dist/preview-engine/{chunk-OKLYIQ5F.mjs → chunk-SPJPM43P.mjs} +1 -1
  76. package/dist/preview-engine/{chunk-UOTMBWBJ.mjs → chunk-TNJEZKXM.mjs} +1 -1
  77. package/dist/preview-engine/chunk-ULOFDFHJ.mjs +1 -0
  78. package/dist/preview-engine/{chunk-DISKQ5MH.mjs → chunk-UXYM2G6J.mjs} +1 -1
  79. package/dist/preview-engine/{chunk-U5YNECNG.mjs → chunk-VN36PRVD.mjs} +1 -1
  80. package/dist/preview-engine/{chunk-PMOKPVSD.mjs → chunk-VVE2QHVG.mjs} +1 -1
  81. package/dist/preview-engine/chunk-XYGDTPO7.mjs +39 -0
  82. package/dist/preview-engine/{chunk-PEUQRSIM.mjs → chunk-Y5K5LVOR.mjs} +1 -1
  83. package/dist/preview-engine/chunk-YGKO4NIU.mjs +1 -0
  84. package/dist/preview-engine/{chunk-PSEMCJBH.mjs → chunk-ZJ5SWTCW.mjs} +1 -1
  85. package/dist/preview-engine/chunk-ZY47XIRK.mjs +5 -0
  86. package/dist/preview-engine/components.mjs +1 -1
  87. package/dist/preview-engine/effects.mjs +1 -1
  88. package/dist/preview-engine/framefields.mjs +1 -1
  89. package/dist/preview-engine/player.mjs +1 -1
  90. package/dist/preview-engine/renderers-3BOQOUEU.mjs +1 -0
  91. package/dist/preview-engine/renderers-3M2FESR2.mjs +1 -0
  92. package/dist/preview-engine/{renderers-FEEIDQF3.mjs → renderers-4F7WLQD5.mjs} +1 -1
  93. package/dist/preview-engine/{renderers-OP6MKYRM.mjs → renderers-5KANN7XF.mjs} +1 -1
  94. package/dist/preview-engine/{renderers-TVRR7PGN.mjs → renderers-5TO2SXFR.mjs} +1 -1
  95. package/dist/preview-engine/{renderers-DR7UZ3QR.mjs → renderers-5UZ3YFBD.mjs} +1 -1
  96. package/dist/preview-engine/renderers-6LHIWKMZ.mjs +1 -0
  97. package/dist/preview-engine/{renderers-7F2KF5RE.mjs → renderers-6Z7DWAPH.mjs} +1 -1
  98. package/dist/preview-engine/renderers-77PDUMYI.mjs +1 -0
  99. package/dist/preview-engine/{renderers-3J3NCOAI.mjs → renderers-7C5RA3R5.mjs} +1 -1
  100. package/dist/preview-engine/{renderers-KPCQGBIY.mjs → renderers-7XHO6M3B.mjs} +1 -1
  101. package/dist/preview-engine/{renderers-KJAOPYAU.mjs → renderers-A24KZK2Q.mjs} +1 -1
  102. package/dist/preview-engine/renderers-A43VCJ7X.mjs +1 -0
  103. package/dist/preview-engine/renderers-AKY464RY.mjs +1 -0
  104. package/dist/preview-engine/renderers-C5UO6PL5.mjs +1 -0
  105. package/dist/preview-engine/renderers-C64QSZO4.mjs +1 -0
  106. package/dist/preview-engine/renderers-CIRCR6NG.mjs +1 -0
  107. package/dist/preview-engine/renderers-CIWOPETY.mjs +1 -0
  108. package/dist/preview-engine/renderers-CUMVIVHI.mjs +1 -0
  109. package/dist/preview-engine/renderers-CZEZCELP.mjs +1 -0
  110. package/dist/preview-engine/{renderers-R3YVLWKV.mjs → renderers-ENMY4DKF.mjs} +1 -1
  111. package/dist/preview-engine/{renderers-AAENCA7X.mjs → renderers-FSI5KNGZ.mjs} +1 -1
  112. package/dist/preview-engine/renderers-FSQMWHQM.mjs +1 -0
  113. package/dist/preview-engine/renderers-FZEW5C23.mjs +1 -0
  114. package/dist/preview-engine/renderers-HCET2IML.mjs +1 -0
  115. package/dist/preview-engine/{renderers-LBX7GPDU.mjs → renderers-IHGAWLUF.mjs} +1 -1
  116. package/dist/preview-engine/renderers-IUOOC6K7.mjs +1 -0
  117. package/dist/preview-engine/{renderers-VXMR47WZ.mjs → renderers-KC6ZSKCW.mjs} +1 -1
  118. package/dist/preview-engine/renderers-KYYJLVIJ.mjs +1 -0
  119. package/dist/preview-engine/renderers-L4GE7WV3.mjs +1 -0
  120. package/dist/preview-engine/renderers-L6YDX6GS.mjs +1 -0
  121. package/dist/preview-engine/renderers-LRAFWKCO.mjs +1 -0
  122. package/dist/preview-engine/renderers-LU3XZWEB.mjs +1 -0
  123. package/dist/preview-engine/{renderers-4YYGKLDK.mjs → renderers-MD3PRFZL.mjs} +1 -1
  124. package/dist/preview-engine/renderers-MDHPQY6D.mjs +1 -0
  125. package/dist/preview-engine/renderers-MOEC2XZZ.mjs +1 -0
  126. package/dist/preview-engine/{renderers-RGDTRVZM.mjs → renderers-NCGH2WWJ.mjs} +1 -1
  127. package/dist/preview-engine/renderers-ND2WV4K3.mjs +1 -0
  128. package/dist/preview-engine/renderers-NJ5CWVVH.mjs +1 -0
  129. package/dist/preview-engine/renderers-NKXYPR3V.mjs +1 -0
  130. package/dist/preview-engine/{renderers-WVQQZQ6Y.mjs → renderers-NUAI4TO5.mjs} +1 -1
  131. package/dist/preview-engine/renderers-NWR66CGK.mjs +1 -0
  132. package/dist/preview-engine/renderers-O22WTBRM.mjs +1 -0
  133. package/dist/preview-engine/renderers-PBBA7LQB.mjs +1 -0
  134. package/dist/preview-engine/{renderers-BL7Z3FTF.mjs → renderers-PIIEUKFE.mjs} +1 -1
  135. package/dist/preview-engine/renderers-PPZK6VEW.mjs +1 -0
  136. package/dist/preview-engine/renderers-Q6LJRZ7R.mjs +1 -0
  137. package/dist/preview-engine/{renderers-7TNEKJZS.mjs → renderers-QA2HKUJJ.mjs} +1 -1
  138. package/dist/preview-engine/renderers-RMEACSRL.mjs +1 -0
  139. package/dist/preview-engine/{renderers-AWRIELVX.mjs → renderers-RN2MHIFK.mjs} +1 -1
  140. package/dist/preview-engine/renderers-SEIAUKJF.mjs +1 -0
  141. package/dist/preview-engine/renderers-SP42LCSI.mjs +1 -0
  142. package/dist/preview-engine/{renderers-OE55O27K.mjs → renderers-T74CQCEN.mjs} +1 -1
  143. package/dist/preview-engine/renderers-T7SZA3BX.mjs +1 -0
  144. package/dist/preview-engine/{renderers-ZUQ2ZBYY.mjs → renderers-TGJSOKDY.mjs} +1 -1
  145. package/dist/preview-engine/renderers-TSBV4KPE.mjs +1 -0
  146. package/dist/preview-engine/{renderers-2SE5BLLB.mjs → renderers-U4M7ZCV4.mjs} +1 -1
  147. package/dist/preview-engine/{renderers-YEI4K4W4.mjs → renderers-V3AQO7AR.mjs} +1 -1
  148. package/dist/preview-engine/renderers-VADTDAHD.mjs +1 -0
  149. package/dist/preview-engine/renderers-VNNWI5C3.mjs +1 -0
  150. package/dist/preview-engine/{renderers-YYMRKHAA.mjs → renderers-WEYAHOBK.mjs} +1 -1
  151. package/dist/preview-engine/renderers-WZ75MLP3.mjs +1 -0
  152. package/dist/preview-engine/renderers-XB5R4UQA.mjs +1 -0
  153. package/dist/preview-engine/{renderers-YIVPMPQS.mjs → renderers-Y22VSOXF.mjs} +1 -1
  154. package/dist/preview-engine/{renderers-Y53D5CQ7.mjs → renderers-YBIUZDGQ.mjs} +1 -1
  155. package/dist/preview-engine/renderers-YESJR4O7.mjs +1 -0
  156. package/dist/preview-engine/renderers-YKSRZRRT.mjs +1 -0
  157. package/dist/preview-engine/{renderers-V4VML5IG.mjs → renderers-ZACSHGNZ.mjs} +1 -1
  158. package/dist/preview-engine/signals.mjs +1 -1
  159. package/dist/preview-engine/src-4IUYUKIZ.mjs +8 -0
  160. package/dist/{program-Cq4gP9Dd.mjs → program-CKpKkllV.mjs} +2 -2
  161. package/dist/{program-Cq4gP9Dd.mjs.map → program-CKpKkllV.mjs.map} +1 -1
  162. package/dist/renderer/index.mjs +2 -2
  163. package/dist/renderer--Ac-dg4A.mjs +5 -0
  164. package/dist/renderer--N7TMqzU.mjs +5 -0
  165. package/dist/{renderer-CXWAdRqn.mjs → renderer--fkmiVjl.mjs} +2 -2
  166. package/dist/{renderer-CXWAdRqn.mjs.map → renderer--fkmiVjl.mjs.map} +1 -1
  167. package/dist/{renderer-CZyJ72JZ.mjs → renderer-1r-Uq-Ae.mjs} +2 -2
  168. package/dist/{renderer-CZyJ72JZ.mjs.map → renderer-1r-Uq-Ae.mjs.map} +1 -1
  169. package/dist/renderer-2ecmdOae.mjs +5 -0
  170. package/dist/{renderer-D8CMakyz.mjs → renderer-8QIwXh7O.mjs} +3 -3
  171. package/dist/{renderer-D8CMakyz.mjs.map → renderer-8QIwXh7O.mjs.map} +1 -1
  172. package/dist/{renderer-B4iCFvJh.mjs → renderer-B-ur0Ej8.mjs} +3 -3
  173. package/dist/{renderer-B4iCFvJh.mjs.map → renderer-B-ur0Ej8.mjs.map} +1 -1
  174. package/dist/{renderer-BD25uND8.mjs → renderer-B2P1vgb7.mjs} +418 -187
  175. package/dist/renderer-B2P1vgb7.mjs.map +1 -0
  176. package/dist/{renderer-BZKkT-6Q.mjs → renderer-B2jjxsjO.mjs} +2 -2
  177. package/dist/{renderer-BZKkT-6Q.mjs.map → renderer-B2jjxsjO.mjs.map} +1 -1
  178. package/dist/{renderer-DEcbSNQd.mjs → renderer-B39I6CQw.mjs} +3 -3
  179. package/dist/{renderer-DEcbSNQd.mjs.map → renderer-B39I6CQw.mjs.map} +1 -1
  180. package/dist/{renderer-DIPyUVX2.mjs → renderer-B522Dkdk.mjs} +3 -3
  181. package/dist/{renderer-DIPyUVX2.mjs.map → renderer-B522Dkdk.mjs.map} +1 -1
  182. package/dist/renderer-B5RJp5g-.mjs +5 -0
  183. package/dist/renderer-B7xyT1Vb.mjs +5 -0
  184. package/dist/{renderer-CeX7uUXB.mjs → renderer-BAYTI6jj.mjs} +2 -2
  185. package/dist/{renderer-CeX7uUXB.mjs.map → renderer-BAYTI6jj.mjs.map} +1 -1
  186. package/dist/{renderer-DoRazdp_.mjs → renderer-BAusZ6Vu.mjs} +2 -2
  187. package/dist/{renderer-DoRazdp_.mjs.map → renderer-BAusZ6Vu.mjs.map} +1 -1
  188. package/dist/renderer-BBeArN_x.mjs +5 -0
  189. package/dist/renderer-BCAZDu-r.mjs +5 -0
  190. package/dist/{renderer-D41gHat4.mjs → renderer-BF0hx_iJ.mjs} +3 -3
  191. package/dist/{renderer-D41gHat4.mjs.map → renderer-BF0hx_iJ.mjs.map} +1 -1
  192. package/dist/renderer-BJnhik7Y.mjs +5 -0
  193. package/dist/{renderer-BeQrWrOa.mjs → renderer-BPWDsufX.mjs} +2 -2
  194. package/dist/{renderer-BeQrWrOa.mjs.map → renderer-BPWDsufX.mjs.map} +1 -1
  195. package/dist/{renderer-CxEBV-w0.mjs → renderer-BXJXziIt.mjs} +2 -2
  196. package/dist/{renderer-CxEBV-w0.mjs.map → renderer-BXJXziIt.mjs.map} +1 -1
  197. package/dist/{renderer-Ce8VPaog.mjs → renderer-BdyopiLC.mjs} +2 -2
  198. package/dist/{renderer-Ce8VPaog.mjs.map → renderer-BdyopiLC.mjs.map} +1 -1
  199. package/dist/{renderer-Bkqg-U2F.mjs → renderer-Bfk6A7UO.mjs} +3 -3
  200. package/dist/{renderer-Bkqg-U2F.mjs.map → renderer-Bfk6A7UO.mjs.map} +1 -1
  201. package/dist/{renderer-CAagaRag.mjs → renderer-BgO6BA_z.mjs} +2 -2
  202. package/dist/{renderer-CAagaRag.mjs.map → renderer-BgO6BA_z.mjs.map} +1 -1
  203. package/dist/{renderer-DlZwbO-A.mjs → renderer-BlPqTEii.mjs} +2 -2
  204. package/dist/{renderer-DlZwbO-A.mjs.map → renderer-BlPqTEii.mjs.map} +1 -1
  205. package/dist/{renderer-BEuU7qlG.mjs → renderer-BlvGcyAN.mjs} +2 -2
  206. package/dist/{renderer-BEuU7qlG.mjs.map → renderer-BlvGcyAN.mjs.map} +1 -1
  207. package/dist/{renderer-BrWOcJ9Q.mjs → renderer-BpIF1QIE.mjs} +3 -3
  208. package/dist/{renderer-BrWOcJ9Q.mjs.map → renderer-BpIF1QIE.mjs.map} +1 -1
  209. package/dist/renderer-BxRW8MZO.mjs +5 -0
  210. package/dist/renderer-C-lfsEAN.mjs +5 -0
  211. package/dist/{renderer-eAVNsuX8.mjs → renderer-C41U1tK6.mjs} +5 -5
  212. package/dist/{renderer-eAVNsuX8.mjs.map → renderer-C41U1tK6.mjs.map} +1 -1
  213. package/dist/renderer-C6nOFN4-.mjs +5 -0
  214. package/dist/{renderer-CjklM-KD.mjs → renderer-C7L8Ceqr.mjs} +2 -2
  215. package/dist/{renderer-CjklM-KD.mjs.map → renderer-C7L8Ceqr.mjs.map} +1 -1
  216. package/dist/{renderer-xLQ_nkmy.mjs → renderer-C7eFJf0_.mjs} +3 -3
  217. package/dist/{renderer-xLQ_nkmy.mjs.map → renderer-C7eFJf0_.mjs.map} +1 -1
  218. package/dist/renderer-C84TSQmS.mjs +5 -0
  219. package/dist/renderer-C8_6YofT.mjs +5 -0
  220. package/dist/{renderer-DsAoxQ8O.mjs → renderer-CCycwCEB.mjs} +2 -2
  221. package/dist/{renderer-DsAoxQ8O.mjs.map → renderer-CCycwCEB.mjs.map} +1 -1
  222. package/dist/{renderer-Cjx3x7xM.mjs → renderer-CHr7MiYW.mjs} +3 -3
  223. package/dist/{renderer-Cjx3x7xM.mjs.map → renderer-CHr7MiYW.mjs.map} +1 -1
  224. package/dist/renderer-COb3tOPG.mjs +5 -0
  225. package/dist/{renderer-DSpTGqUU.mjs → renderer-CQvmbRQ5.mjs} +3 -3
  226. package/dist/{renderer-DSpTGqUU.mjs.map → renderer-CQvmbRQ5.mjs.map} +1 -1
  227. package/dist/renderer-CSCIzaLy.mjs +5 -0
  228. package/dist/{renderer-D7Kk7VxM.mjs → renderer-CYC32bDW.mjs} +3 -3
  229. package/dist/{renderer-D7Kk7VxM.mjs.map → renderer-CYC32bDW.mjs.map} +1 -1
  230. package/dist/{renderer-Ci9x2WUd.mjs → renderer-CcvvoKiZ.mjs} +3 -3
  231. package/dist/{renderer-Ci9x2WUd.mjs.map → renderer-CcvvoKiZ.mjs.map} +1 -1
  232. package/dist/{renderer-DTgO5LPf.mjs → renderer-CiQhD8Gg.mjs} +3 -3
  233. package/dist/{renderer-DTgO5LPf.mjs.map → renderer-CiQhD8Gg.mjs.map} +1 -1
  234. package/dist/renderer-CmI4c8MS.mjs +5 -0
  235. package/dist/{renderer-BlVmbzPs.mjs → renderer-CpUJBOfb.mjs} +2 -2
  236. package/dist/renderer-CqVltdX9.mjs +5 -0
  237. package/dist/{renderer-LY2MiIj0.mjs → renderer-CwFqqpWY.mjs} +3 -3
  238. package/dist/{renderer-LY2MiIj0.mjs.map → renderer-CwFqqpWY.mjs.map} +1 -1
  239. package/dist/renderer-D-FpMzLY.mjs +5 -0
  240. package/dist/renderer-D-Oyn9mG.mjs +5 -0
  241. package/dist/renderer-D2QrkA8_.mjs +5 -0
  242. package/dist/{renderer-D7Cu9OZx.mjs → renderer-D47AEJE_.mjs} +2 -2
  243. package/dist/{renderer-D7Cu9OZx.mjs.map → renderer-D47AEJE_.mjs.map} +1 -1
  244. package/dist/renderer-D5bjOx83.mjs +3 -0
  245. package/dist/{renderer-DPn2DhMU.mjs → renderer-D61B9bXF.mjs} +2 -2
  246. package/dist/{renderer-DPn2DhMU.mjs.map → renderer-D61B9bXF.mjs.map} +1 -1
  247. package/dist/renderer-D64r4iN-.mjs +5 -0
  248. package/dist/{renderer-CUq2qgyc.mjs → renderer-D7Al3_-5.mjs} +3 -3
  249. package/dist/{renderer-CUq2qgyc.mjs.map → renderer-D7Al3_-5.mjs.map} +1 -1
  250. package/dist/{renderer-CyWRvKUI.mjs → renderer-D7r6onRT.mjs} +2 -2
  251. package/dist/{renderer-CyWRvKUI.mjs.map → renderer-D7r6onRT.mjs.map} +1 -1
  252. package/dist/{renderer-DxHICEk3.mjs → renderer-D8bBHrWC.mjs} +3 -3
  253. package/dist/{renderer-DxHICEk3.mjs.map → renderer-D8bBHrWC.mjs.map} +1 -1
  254. package/dist/renderer-DCq6YkgP.mjs +5 -0
  255. package/dist/{renderer-Dk45W8Zd.mjs → renderer-DDEkFbVI.mjs} +3 -3
  256. package/dist/{renderer-Dk45W8Zd.mjs.map → renderer-DDEkFbVI.mjs.map} +1 -1
  257. package/dist/renderer-DDHG3GdR.mjs +5 -0
  258. package/dist/{renderer-BWlMAacF.mjs → renderer-DEmYyaqj.mjs} +2 -2
  259. package/dist/{renderer-BWlMAacF.mjs.map → renderer-DEmYyaqj.mjs.map} +1 -1
  260. package/dist/{renderer-DRGa6tlX.mjs → renderer-DF-yvIrV.mjs} +2 -2
  261. package/dist/{renderer-DRGa6tlX.mjs.map → renderer-DF-yvIrV.mjs.map} +1 -1
  262. package/dist/{renderer-C-5RNIeX.mjs → renderer-DFzI3yI_.mjs} +2 -2
  263. package/dist/{renderer-C-5RNIeX.mjs.map → renderer-DFzI3yI_.mjs.map} +1 -1
  264. package/dist/{renderer-AMBVtZ_G.mjs → renderer-DIw3UtEU.mjs} +3 -3
  265. package/dist/{renderer-AMBVtZ_G.mjs.map → renderer-DIw3UtEU.mjs.map} +1 -1
  266. package/dist/renderer-DMdNfcud.mjs +6 -0
  267. package/dist/{renderer-DnPzvIHK.mjs → renderer-DMvmf3T2.mjs} +2 -2
  268. package/dist/{renderer-Gw1ICOJ3.mjs → renderer-DNQvOrkY.mjs} +3 -3
  269. package/dist/{renderer-Gw1ICOJ3.mjs.map → renderer-DNQvOrkY.mjs.map} +1 -1
  270. package/dist/{renderer-CP2FOWyJ.mjs → renderer-DO-KbpYZ.mjs} +3 -3
  271. package/dist/{renderer-CP2FOWyJ.mjs.map → renderer-DO-KbpYZ.mjs.map} +1 -1
  272. package/dist/{renderer-BeFiQfzV.mjs → renderer-DPAD6fL1.mjs} +70 -70
  273. package/dist/{renderer-BeFiQfzV.mjs.map → renderer-DPAD6fL1.mjs.map} +1 -1
  274. package/dist/{renderer-cg06hb82.mjs → renderer-DTqDy2m9.mjs} +3 -3
  275. package/dist/{renderer-cg06hb82.mjs.map → renderer-DTqDy2m9.mjs.map} +1 -1
  276. package/dist/{renderer-BXAgUuAq.mjs → renderer-DVCJjVn7.mjs} +2 -2
  277. package/dist/{renderer-BXAgUuAq.mjs.map → renderer-DVCJjVn7.mjs.map} +1 -1
  278. package/dist/{renderer-D6X9vWkN.mjs → renderer-DX41niRU.mjs} +2 -2
  279. package/dist/{renderer-D6X9vWkN.mjs.map → renderer-DX41niRU.mjs.map} +1 -1
  280. package/dist/{renderer-D3K9FEQk.mjs → renderer-DXEWbnRF.mjs} +3 -3
  281. package/dist/{renderer-D3K9FEQk.mjs.map → renderer-DXEWbnRF.mjs.map} +1 -1
  282. package/dist/renderer-DZQXZ4lK.mjs +5 -0
  283. package/dist/{renderer-CiMIftlS.mjs → renderer-DbRZe0Re.mjs} +3 -3
  284. package/dist/{renderer-CiMIftlS.mjs.map → renderer-DbRZe0Re.mjs.map} +1 -1
  285. package/dist/renderer-DczJJLA1.mjs +5 -0
  286. package/dist/renderer-DfqJj9oe.mjs +5 -0
  287. package/dist/renderer-DgO9ihVJ.mjs +5 -0
  288. package/dist/renderer-DhgnQZYb.mjs +5 -0
  289. package/dist/{renderer-CrgfMDbh.mjs → renderer-DiY70S8S.mjs} +3 -3
  290. package/dist/{renderer-CrgfMDbh.mjs.map → renderer-DiY70S8S.mjs.map} +1 -1
  291. package/dist/renderer-DjxKjHMf.mjs +5 -0
  292. package/dist/{renderer-Br4UZvfL.mjs → renderer-DkRSZg5g.mjs} +3 -3
  293. package/dist/{renderer-Br4UZvfL.mjs.map → renderer-DkRSZg5g.mjs.map} +1 -1
  294. package/dist/{renderer-CCSzKnvs.mjs → renderer-DmkWrWAk.mjs} +2 -2
  295. package/dist/{renderer-CCSzKnvs.mjs.map → renderer-DmkWrWAk.mjs.map} +1 -1
  296. package/dist/{renderer-D2JOseb1.mjs → renderer-DpruWmZU.mjs} +2 -2
  297. package/dist/{renderer-D2JOseb1.mjs.map → renderer-DpruWmZU.mjs.map} +1 -1
  298. package/dist/renderer-DqLA5cdR.mjs +5 -0
  299. package/dist/{renderer-DxbFjINv.mjs → renderer-DqvoMLca.mjs} +3 -3
  300. package/dist/{renderer-DxbFjINv.mjs.map → renderer-DqvoMLca.mjs.map} +1 -1
  301. package/dist/renderer-Dudp6ZlH.mjs +5 -0
  302. package/dist/{renderer-COQc1jn6.mjs → renderer-EaLUCobW.mjs} +2 -2
  303. package/dist/{renderer-COQc1jn6.mjs.map → renderer-EaLUCobW.mjs.map} +1 -1
  304. package/dist/{renderer-BioUC9zE.mjs → renderer-GBmWjBvy.mjs} +2 -2
  305. package/dist/{renderer-BioUC9zE.mjs.map → renderer-GBmWjBvy.mjs.map} +1 -1
  306. package/dist/{renderer-BNzT34UV.mjs → renderer-Lth37j17.mjs} +2 -2
  307. package/dist/{renderer-D-17HVPb.mjs → renderer-SSBL4M1o.mjs} +3 -3
  308. package/dist/{renderer-D-17HVPb.mjs.map → renderer-SSBL4M1o.mjs.map} +1 -1
  309. package/dist/{renderer-C8rxyjaE.mjs → renderer-SWr3vbrV.mjs} +2 -2
  310. package/dist/{renderer-C8rxyjaE.mjs.map → renderer-SWr3vbrV.mjs.map} +1 -1
  311. package/dist/{renderer-LwrcnEtI.mjs → renderer-WCZu2Rf5.mjs} +3 -3
  312. package/dist/{renderer-LwrcnEtI.mjs.map → renderer-WCZu2Rf5.mjs.map} +1 -1
  313. package/dist/{renderer-BIGILDEA.mjs → renderer-Xv6GfNUI.mjs} +2 -2
  314. package/dist/{renderer-BIGILDEA.mjs.map → renderer-Xv6GfNUI.mjs.map} +1 -1
  315. package/dist/renderer-_jC5KIT1.mjs +5 -0
  316. package/dist/{renderer-DveQQCi8.mjs → renderer-bAKUeHF3.mjs} +3 -3
  317. package/dist/{renderer-DveQQCi8.mjs.map → renderer-bAKUeHF3.mjs.map} +1 -1
  318. package/dist/renderer-cTgAuVmJ.mjs +5 -0
  319. package/dist/{renderer-DGPaKIFf.mjs → renderer-cod5Ona9.mjs} +2 -2
  320. package/dist/{renderer-DgLt0TPo.mjs → renderer-g_vrrAQU.mjs} +2 -2
  321. package/dist/{renderer-DgLt0TPo.mjs.map → renderer-g_vrrAQU.mjs.map} +1 -1
  322. package/dist/{renderer-uorPCWdC.mjs → renderer-hSCfnvaK.mjs} +3 -3
  323. package/dist/{renderer-uorPCWdC.mjs.map → renderer-hSCfnvaK.mjs.map} +1 -1
  324. package/dist/{renderer-BGPnCRFI.mjs → renderer-ktWXVYka.mjs} +3 -3
  325. package/dist/{renderer-BGPnCRFI.mjs.map → renderer-ktWXVYka.mjs.map} +1 -1
  326. package/dist/renderer-nVKDvDLO.mjs +5 -0
  327. package/dist/{renderer-U-12BOhe.mjs → renderer-oKRF4A0M.mjs} +2 -2
  328. package/dist/{renderer-U-12BOhe.mjs.map → renderer-oKRF4A0M.mjs.map} +1 -1
  329. package/dist/{renderer-CsilJwL-.mjs → renderer-pHWEHDnM.mjs} +3 -3
  330. package/dist/{renderer-CsilJwL-.mjs.map → renderer-pHWEHDnM.mjs.map} +1 -1
  331. package/dist/renderer-pZ6_pUo1.mjs +5 -0
  332. package/dist/{renderer-BD00i68i.mjs → renderer-sCovEubT.mjs} +3 -3
  333. package/dist/{renderer-BD00i68i.mjs.map → renderer-sCovEubT.mjs.map} +1 -1
  334. package/dist/{renderer-BdbGTz7z.mjs → renderer-sYSkIUfo.mjs} +3 -3
  335. package/dist/{renderer-BdbGTz7z.mjs.map → renderer-sYSkIUfo.mjs.map} +1 -1
  336. package/dist/{renderer-BLU0PQTB.mjs → renderer-zXPVLRlD.mjs} +3 -3
  337. package/dist/{renderer-BLU0PQTB.mjs.map → renderer-zXPVLRlD.mjs.map} +1 -1
  338. package/dist/{renderers-CP8CFWDs-ywy4xljX.mjs → renderers-CP8CFWDs-DH2oktaC.mjs} +2 -2
  339. package/dist/{renderers-CP8CFWDs-ywy4xljX.mjs.map → renderers-CP8CFWDs-DH2oktaC.mjs.map} +1 -1
  340. package/dist/signals/index.mjs +4 -4
  341. package/dist/{src-B0KFNjj4.mjs → src-DFEqficI.mjs} +445 -35
  342. package/dist/src-DFEqficI.mjs.map +1 -0
  343. package/package.json +67 -58
  344. package/dist/index-BwRrsP_V.d.mts.map +0 -1
  345. package/dist/index-UDDAfHAF.d.mts.map +0 -1
  346. package/dist/preview-engine/chunk-3U2A3RW4.mjs +0 -5
  347. package/dist/preview-engine/chunk-6E3JSPJN.mjs +0 -1
  348. package/dist/preview-engine/chunk-F4F2UDRX.mjs +0 -1
  349. package/dist/preview-engine/chunk-KFNVUGNN.mjs +0 -1974
  350. package/dist/preview-engine/chunk-PYSBWKIJ.mjs +0 -1
  351. package/dist/preview-engine/chunk-U2IFQMS3.mjs +0 -174
  352. package/dist/preview-engine/renderers-2GMY2ZNK.mjs +0 -1
  353. package/dist/preview-engine/renderers-2QJNKL7Q.mjs +0 -1
  354. package/dist/preview-engine/renderers-3OYU6O6F.mjs +0 -1
  355. package/dist/preview-engine/renderers-433Y2PCK.mjs +0 -1
  356. package/dist/preview-engine/renderers-4AGPGEL4.mjs +0 -1
  357. package/dist/preview-engine/renderers-54DBHGUW.mjs +0 -1
  358. package/dist/preview-engine/renderers-5M2O55U3.mjs +0 -1
  359. package/dist/preview-engine/renderers-6FVMDEAY.mjs +0 -1
  360. package/dist/preview-engine/renderers-6R7ZJ7DU.mjs +0 -1
  361. package/dist/preview-engine/renderers-75GCMFOD.mjs +0 -1
  362. package/dist/preview-engine/renderers-7LWLUCVQ.mjs +0 -1
  363. package/dist/preview-engine/renderers-BLDENIEV.mjs +0 -1
  364. package/dist/preview-engine/renderers-CDB3YK3R.mjs +0 -1
  365. package/dist/preview-engine/renderers-D6D4XDFY.mjs +0 -1
  366. package/dist/preview-engine/renderers-DJVFQZYU.mjs +0 -1
  367. package/dist/preview-engine/renderers-DMXSV7VO.mjs +0 -1
  368. package/dist/preview-engine/renderers-EBMASIOE.mjs +0 -1
  369. package/dist/preview-engine/renderers-F262HDFS.mjs +0 -1
  370. package/dist/preview-engine/renderers-FMXKIF22.mjs +0 -1
  371. package/dist/preview-engine/renderers-GJKSZ6DR.mjs +0 -1
  372. package/dist/preview-engine/renderers-GR3RLYDZ.mjs +0 -1
  373. package/dist/preview-engine/renderers-GT3W2QIA.mjs +0 -1
  374. package/dist/preview-engine/renderers-IHC7HUK3.mjs +0 -1
  375. package/dist/preview-engine/renderers-J56ZGEVM.mjs +0 -1
  376. package/dist/preview-engine/renderers-KYM6352U.mjs +0 -1
  377. package/dist/preview-engine/renderers-LFXX6TWI.mjs +0 -1
  378. package/dist/preview-engine/renderers-NAHUPFPU.mjs +0 -1
  379. package/dist/preview-engine/renderers-NM3FZLHH.mjs +0 -1
  380. package/dist/preview-engine/renderers-NNB4BTJA.mjs +0 -1
  381. package/dist/preview-engine/renderers-OYVQW6QI.mjs +0 -1
  382. package/dist/preview-engine/renderers-P5RIFU3C.mjs +0 -1
  383. package/dist/preview-engine/renderers-QB7HJUTS.mjs +0 -1
  384. package/dist/preview-engine/renderers-QRQVOCDC.mjs +0 -1
  385. package/dist/preview-engine/renderers-QVFHJTZA.mjs +0 -1
  386. package/dist/preview-engine/renderers-R3WQIE4L.mjs +0 -1
  387. package/dist/preview-engine/renderers-SQBVOLG7.mjs +0 -1
  388. package/dist/preview-engine/renderers-TLXMYEDI.mjs +0 -1
  389. package/dist/preview-engine/renderers-X4S3WELJ.mjs +0 -1
  390. package/dist/preview-engine/renderers-XT7U25I7.mjs +0 -1
  391. package/dist/preview-engine/renderers-XVGLMBB3.mjs +0 -1
  392. package/dist/preview-engine/renderers-YUWU3TQZ.mjs +0 -1
  393. package/dist/preview-engine/renderers-ZNUD5OVO.mjs +0 -1
  394. package/dist/renderer-01zxT4CK.mjs +0 -5
  395. package/dist/renderer-35LHkj36.mjs +0 -5
  396. package/dist/renderer-B0OIdCGj.mjs +0 -5
  397. package/dist/renderer-B3IPtkK9.mjs +0 -5
  398. package/dist/renderer-BD25uND8.mjs.map +0 -1
  399. package/dist/renderer-BMC39abo.mjs +0 -5
  400. package/dist/renderer-BQj3nlAI.mjs +0 -5
  401. package/dist/renderer-BnBvSmp_.mjs +0 -5
  402. package/dist/renderer-BsDSpTpL.mjs +0 -5
  403. package/dist/renderer-BtW6_gvE.mjs +0 -5
  404. package/dist/renderer-By8U44Rt.mjs +0 -5
  405. package/dist/renderer-C3lDmxuX.mjs +0 -5
  406. package/dist/renderer-C6SZAE_x.mjs +0 -5
  407. package/dist/renderer-CA3IVeZj.mjs +0 -5
  408. package/dist/renderer-CFoCH_mO.mjs +0 -5
  409. package/dist/renderer-CLhZqJF8.mjs +0 -6
  410. package/dist/renderer-CYJXQS8E.mjs +0 -5
  411. package/dist/renderer-C_vj6_WJ.mjs +0 -5
  412. package/dist/renderer-CeqfC6OR.mjs +0 -5
  413. package/dist/renderer-CkZCGMAc.mjs +0 -5
  414. package/dist/renderer-Clxju1r9.mjs +0 -5
  415. package/dist/renderer-Cvz22ZSh.mjs +0 -3
  416. package/dist/renderer-CyWtKBF7.mjs +0 -5
  417. package/dist/renderer-D27STGoB.mjs +0 -5
  418. package/dist/renderer-D78Aq9YK.mjs +0 -5
  419. package/dist/renderer-DHEffABL.mjs +0 -5
  420. package/dist/renderer-DUuNCgzW.mjs +0 -5
  421. package/dist/renderer-DVD5pzRq.mjs +0 -5
  422. package/dist/renderer-Dsp6xDw5.mjs +0 -5
  423. package/dist/renderer-DuC-BFXR.mjs +0 -5
  424. package/dist/renderer-DuWs_Wsv.mjs +0 -5
  425. package/dist/renderer-OSgsiIrW.mjs +0 -5
  426. package/dist/renderer-OZaMFYtZ.mjs +0 -5
  427. package/dist/renderer-T79TmHET.mjs +0 -5
  428. package/dist/renderer-UhsC9oTU.mjs +0 -5
  429. package/dist/renderer-WYZV1jWf.mjs +0 -5
  430. package/dist/renderer-Y7evDjHH.mjs +0 -5
  431. package/dist/renderer-mcePkmUe.mjs +0 -5
  432. package/dist/src-B0KFNjj4.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import "../chunk-BcJoO4Nm.mjs";
2
- import "../dist-CFe1fC9l.mjs";
3
- import { t as FontManager } from "../fonts-C1mgtkCa.mjs";
2
+ import "../dist-C1cCW7Bt.mjs";
3
+ import { t as FontManager } from "../fonts-BW0pPcvJ.mjs";
4
4
 
5
5
  export { FontManager };
@@ -1,4 +1,4 @@
1
- import { et as registerHeadlessFont, m as SlugGeometry, p as SlugFontCache, rt as setRegisteredFontSource } from "./dist-CFe1fC9l.mjs";
1
+ import { et as registerHeadlessFont, m as SlugGeometry, p as SlugFontCache, rt as setRegisteredFontSource } from "./dist-C1cCW7Bt.mjs";
2
2
  import path from "node:path";
3
3
  import * as fontkit from "fontkit";
4
4
  import fs from "node:fs/promises";
@@ -261,4 +261,4 @@ var FontManager = class FontManager {
261
261
 
262
262
  //#endregion
263
263
  export { FontManager as t };
264
- //# sourceMappingURL=fonts-C1mgtkCa.mjs.map
264
+ //# sourceMappingURL=fonts-BW0pPcvJ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"fonts-C1mgtkCa.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\tsetRegisteredFontSource,\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\t// A URL path is percent-encoded (\"My%20Film\"); files aren't. On\n\t\t\t// Windows \"/C:/…\" loses its leading slash.\n\t\t\tcleanPath = decodeURIComponent(new URL(cleanPath).pathname).replace(\n\t\t\t\t/^\\/([A-Za-z]:)/,\n\t\t\t\t\"$1\",\n\t\t\t);\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/** Whether a color emoji font is registered (or set to load from a path / URL). */\n\tpublic static hasEmojiFont(): boolean {\n\t\treturn SlugFontCache.hasEmojiFont();\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\tsetRegisteredFontSource(resolvedFamily, filePath ?? rawSource);\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":";;;;;;AAiCA,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,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MACvE;;EAGF,MAAM,iBACL,cAAc,cACd,cAAc,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;AAE1C,0BAAwB,gBAAgB,YAAY,UAAU;AAE9D,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-BW0pPcvJ.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\tsetRegisteredFontSource,\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\t// A URL path is percent-encoded (\"My%20Film\"); files aren't. On\n\t\t\t// Windows \"/C:/…\" loses its leading slash.\n\t\t\tcleanPath = decodeURIComponent(new URL(cleanPath).pathname).replace(\n\t\t\t\t/^\\/([A-Za-z]:)/,\n\t\t\t\t\"$1\",\n\t\t\t);\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/** Whether a color emoji font is registered (or set to load from a path / URL). */\n\tpublic static hasEmojiFont(): boolean {\n\t\treturn SlugFontCache.hasEmojiFont();\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\tsetRegisteredFontSource(resolvedFamily, filePath ?? rawSource);\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":";;;;;;AAiCA,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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gB;WAET,KAAK;GACb,MAAM,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI;AAC5D,SAAM,IAAI,MACT,sDAAsD,YAAY,KAAK,MACvE;;EAGF,MAAM,iBACL,cAAc,cACd,cAAc,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;AAE1C,0BAAwB,gBAAgB,YAAY,UAAU;AAE9D,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,4 +1,4 @@
1
- import { Rn as signalRegistry } from "./dist-CFe1fC9l.mjs";
1
+ import { Rn as signalRegistry } from "./dist-C1cCW7Bt.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-CU2tEKJJ.mjs.map
215
+ //# sourceMappingURL=gpu-CMaa63nz.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"gpu-CU2tEKJJ.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,SAAS;IACT,YAAY,eAAe;IAC3B,QAAQ,EAAE,MAAM,WAAW;IAC3B;AACD,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAAe;IAC3B,SAAS,EAAE,YAAY,SAAS;IAChC;AACD,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAAe;IAC3B,SAAS,EAAE,MAAM,aAAa;IAC9B;AACD,UAAO;IACN,YAAY,eAAe;IAC3B,GAAG;IACH,SAAS;IACT;IACA;EACF,CAAC;;;AAGH,SAAS,eAAe,QAAQ,OAAO;AACtC,QAAO,wBAAwB,QAAQ,CAAC,GAAG,MAAM,MAAM,CAAC,KAAK,UAAU,EAAE,UAAU,CAAC;;;AAGrF,SAAS,UAAU,QAAQ;CAC1B,MAAM,wBAAwB,IAAI,SAAS;AAC3C,SAAQ,WAAW;EAClB,IAAI,QAAQ,MAAM,IAAI,OAAO;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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-CMaa63nz.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,cA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1,10 @@
1
1
  import { $o as VirtualMediaData, A as RingGeometryOptions, B as SphereGeometryOptions, Bi as FrameContext, Ca as MeshAudioDeformConfig, E as PolyhedronGeometryOptions, H as TubeGeometryOptions, Ha as NormalRelightingOptions, Hi as FrameSignal, Io as TextSpan, Lt as KineticMarqueeConfig, Oi as EffectDomain, P as ShardGeometryOptions, Pr as Path3D, R as SlugFontCache, T as Points3DGeometryOptions, Ti as Effect$1, U as TubePathSpec, V as TorusGeometryOptions, _ as Line3DGeometryOptions, _i as DataType, ao as ResolvedMediaTimeRemap, ct as AdvancedTextAnimator, d as CylinderGeometryOptions, eo as ProgrammaticSignal, g as LatheGeometryOptions, hn as TextPathOptions, io as RenderDiagnostic, j as RoundedBoxGeometryOptions, kn as TypewriterAnimator, ma as MediaSourceInput, ot as AETextAnimator, p as ExtrudeShapeGeometryOptions, rs as VisionTask, sa as MediaMetadata, u as CapsuleGeometryOptions, uo as Signal, va as MediaTimeRemapInput, xa as MediaTimeSignalRemap, xi as DeflickerOptions } from "./index-D5UDyVMb.mjs";
2
2
  import { i as RegisterFontOptions } from "./index-BfDFmIBE.mjs";
3
- import { $n as ResizerScalerProps, $t as FlipProps, An as Paint, At as CameraParallax3DProps, B as PBRGlass, Bn as Pixelate, Bt as ContourProps, C as GradientMapProps, Cn as MeshWarp, Ct as AudioParametricEq, D as HalftoneScreen, Dn as NoiseGeneratorProps, Dt as CRT, Ei as TensorPipeline, En as NoiseGenerator, Et as AudioReverbProps, F as LevelsProps, Fn as Painterly, Ft as ColorBalance, G as SSAOProps, Gn as ProceduralVFXProps, Gt as DatamoshProps, H as Relight3D, Hn as Posterize, I as Modulate, In as PainterlyProps, It as ColorBalanceProps, J as SelectiveColorProps, Jn as RefineEdge, Jr as ClipSubjectSource, Jt as Dither, K as SelectiveColor, Kn as RGBSplit, Kr as COCO17_KEYPOINT_NAMES, Kt as DisplacementMap, L as ModulateProps, Ln as PatchHeal, Lt as ColorKey, M as HighPassProps, Mt as ChannelMergerProps, Nt as ChannelSplitter, O as HalftoneScreenProps, On as OpArt, Ot as CRTProps, P as Levels, Pt as ChannelSplitterProps, Q as TileOffset, Qn as ResizerScaler, Qt as Flip, R as MotionBlur, Rt as ColorKeyProps, S as GradientMap, Sn as MaskMathProps, St as AudioNoiseGateProps, Tn as MeshWarpProps, Tt as AudioReverb, U as Relight3DProps, Un as PosterizeProps, Ut as CornerPinProps, V as PBRGlassProps, Vn as PixelateProps, Vt as CornerPin, W as SSAO, Wn as ProceduralVFX, Wt as Datamosh, X as ShadowsHighlightsProps, Xn as RefractionCaustics3D, Xr as LandmarkCoordinateSignals, Xt as ExtractLUT, Y as ShadowsHighlights, Yn as RefineEdgeProps, Yr as InstanceMask, Yt as DitherProps, Z as TemporalDeflicker, Zn as RefractionCaustics3DProps, Zr as MaskTrackSignals, Zt as ExtractLUTProps, _t as AudioDelay, a as ApplyLUTProps, ai as PinToLandmarkOptions, an as KaleidoscopeProps, ar as Toon, b as FilmGrain, bn as LiquifyProps, bt as AudioFadeProps, c as Crop, cn as KenBurnsProps, cr as TrailsProps, dr as EffectProp, dt as Blur, en as Gooey, er as Rotate, et as TileOffsetProps, f as CurvesProps, ft as BlurProps, g as DepthOfFieldProps, gi as VisionNode, gn as LayerStyleProps, gt as AudioCompressorProps, h as DepthOfField, hi as VisionBundle, ht as AudioCompressor, i as ApplyLUT, in as Kaleidoscope, it as VisionProps, j as HighPass, jn as PaintProps, jt as ChannelMerger, kn as OpArtProps, kt as CameraParallax3D, l as CropProps, ln as LayerStyle, lr as Vignette, m as DeflickerProps, mi as VisionAnalysisReport, mt as AsciiProps, n as AnyEffect, nn as Iridescence, nr as StereoPanning, nt as UnsharpMaskProps, oi as PinToObjectOptions, on as KenBurns, or as ToonProps, p as CustomEffect, pt as Ascii, qn as RGBSplitProps, qt as DisplacementMapProps, r as AnyVisualEffect, ri as ObjectTrackSignals, rn as IridescenceProps, rr as StereoPanningProps, rt as Vision, sr as Trails, t as AnyAudioEffect, tn as GooeyProps, tr as RotateProps, tt as UnsharpMask, u as Curves, ur as VignetteProps, vn as Liquify, vt as AudioDelayProps, wt as AudioParametricEqProps, x as FilmGrainProps, xn as MaskMath, xt as AudioNoiseGate, yt as AudioFade, z as MotionBlurProps, zn as PatchHealProps, zt as Contour } from "./index-UDDAfHAF.mjs";
3
+ import { $n as ResizerScalerProps, $t as FlipProps, An as Paint, At as CameraParallax3DProps, B as PBRGlass, Bn as Pixelate, Bt as ContourProps, C as GradientMapProps, Cn as MeshWarp, Ct as AudioParametricEq, D as HalftoneScreen, Di as TensorPipeline, Dn as NoiseGeneratorProps, Dt as CRT, En as NoiseGenerator, Et as AudioReverbProps, F as LevelsProps, Fn as Painterly, Ft as ColorBalance, G as SSAOProps, Gn as ProceduralVFXProps, Gt as DatamoshProps, H as Relight3D, Hn as Posterize, I as Modulate, In as PainterlyProps, It as ColorBalanceProps, J as SelectiveColorProps, Jn as RefineEdge, Jr as ClipPose, Jt as Dither, K as SelectiveColor, Kn as RGBSplit, Kr as COCO17_KEYPOINT_NAMES, Kt as DisplacementMap, L as ModulateProps, Ln as PatchHeal, Lt as ColorKey, M as HighPassProps, Mt as ChannelMergerProps, Nt as ChannelSplitter, O as HalftoneScreenProps, On as OpArt, Ot as CRTProps, P as Levels, Pt as ChannelSplitterProps, Q as TileOffset, Qn as ResizerScaler, Qr as MaskTrackSignals, Qt as Flip, R as MotionBlur, Rt as ColorKeyProps, S as GradientMap, Sn as MaskMathProps, St as AudioNoiseGateProps, Tn as MeshWarpProps, Tt as AudioReverb, U as Relight3DProps, Un as PosterizeProps, Ut as CornerPinProps, V as PBRGlassProps, Vn as PixelateProps, Vt as CornerPin, W as SSAO, Wn as ProceduralVFX, Wt as Datamosh, X as ShadowsHighlightsProps, Xn as RefractionCaustics3D, Xr as InstanceMask, Xt as ExtractLUT, Y as ShadowsHighlights, Yn as RefineEdgeProps, Yr as ClipSubjectSource, Yt as DitherProps, Z as TemporalDeflicker, Zn as RefractionCaustics3DProps, Zr as LandmarkCoordinateSignals, Zt as ExtractLUTProps, _i as VisionNode, _t as AudioDelay, a as ApplyLUTProps, an as KaleidoscopeProps, ar as Toon, b as FilmGrain, bn as LiquifyProps, bt as AudioFadeProps, c as Crop, cn as KenBurnsProps, cr as TrailsProps, dr as EffectProp, dt as Blur, en as Gooey, er as Rotate, et as TileOffsetProps, f as CurvesProps, ft as BlurProps, g as DepthOfFieldProps, gi as VisionBundle, gn as LayerStyleProps, gt as AudioCompressorProps, h as DepthOfField, hi as VisionAnalysisReport, ht as AudioCompressor, i as ApplyLUT, ii as ObjectTrackSignals, in as Kaleidoscope, it as VisionProps, j as HighPass, jn as PaintProps, jt as ChannelMerger, kn as OpArtProps, kt as CameraParallax3D, l as CropProps, ln as LayerStyle, lr as Vignette, m as DeflickerProps, mt as AsciiProps, n as AnyEffect, nn as Iridescence, nr as StereoPanning, nt as UnsharpMaskProps, oi as PinToLandmarkOptions, on as KenBurns, or as ToonProps, p as CustomEffect, pt as Ascii, qn as RGBSplitProps, qt as DisplacementMapProps, r as AnyVisualEffect, rn as IridescenceProps, rr as StereoPanningProps, rt as Vision, si as PinToObjectOptions, sr as Trails, t as AnyAudioEffect, tn as GooeyProps, tr as RotateProps, tt as UnsharpMask, u as Curves, ur as VignetteProps, vn as Liquify, vt as AudioDelayProps, wt as AudioParametricEqProps, x as FilmGrainProps, xn as MaskMath, xt as AudioNoiseGate, yt as AudioFade, z as MotionBlurProps, zn as PatchHealProps, zt as Contour } from "./index-CQ-bbZk3.mjs";
4
4
  import { c as HeadlessMediaRenderer, f as RenderProgress, m as VideoQaReport, p as VideoQaOptions, t as FrameGridOptions } from "./index-CJL0JAU8.mjs";
5
5
  import { z, z as z$2 } from "zod";
6
6
  import { Yoga } from "yoga-layout/load";
7
+ import { Sam2FrameResult, Sam2Model, Sam2Options, Sam2Options as Sam2Options$1, Sam2Point, Sam2Prompt, Sam3Options, Sam3Options as Sam3Options$1, Sam3Precision, Sam3Prompt } from "@framefields/vision-sam";
7
8
 
8
9
  //#region ../compositions/dist/program/index.d.mts
9
10
 
@@ -3881,6 +3882,12 @@ declare const DEFAULT_CHART_COLORS: readonly ["#6366f1", "#22d3ee", "#f59e0b", "
3881
3882
  //#region src/clip-vision.d.ts
3882
3883
  type PoseKeypointName = (typeof COCO17_KEYPOINT_NAMES)[number];
3883
3884
  interface ClipVisionOptions {
3885
+ /** Prompted SAM 2.1 (Tiny or Small) video segmentation. Pose is opt-in in this mode, as with sam3. */
3886
+ sam2?: Sam2Options;
3887
+ /** SAM 3 point/box or text selection with temporal tracking. Mutually exclusive with sam2. */
3888
+ sam3?: Sam3Options;
3889
+ /** Explicitly agree to Meta's SAM License terms, required to download and run SAM 3. */
3890
+ acceptSamLicense?: boolean;
3884
3891
  /** Composition frame the clip's first frame plays on (default 0). */
3885
3892
  startFrame?: number;
3886
3893
  /** Seconds trimmed off the clip's start, as on its media layer (default 0). */
@@ -3891,7 +3898,10 @@ interface ClipVisionOptions {
3891
3898
  durationFrames?: number;
3892
3899
  /** Analysis frame rate (default: the composition's). */
3893
3900
  fps?: number;
3894
- /** Track 17 COCO keypoints (default true). */
3901
+ /**
3902
+ * Track 17 COCO keypoints (default true; opt-in with sam2/sam3, where each frame's pose
3903
+ * is the detected person whose keypoints fall most inside the selection).
3904
+ */
3895
3905
  pose?: boolean;
3896
3906
  /** Track the person's silhouette, dress and held things included (default true). */
3897
3907
  mask?: boolean;
@@ -3919,6 +3929,7 @@ interface PersonPlacement {
3919
3929
  fit?: "cover" | "contain" | "fill";
3920
3930
  }
3921
3931
  interface FrameResult {
3932
+ score?: number;
3922
3933
  /** 17 × [x, y, visibility], source px; null when no person was found. */
3923
3934
  kp: Float32Array | null;
3924
3935
  /** cellW × cellH, 0–255; null when no person was found. */
@@ -3960,6 +3971,20 @@ declare class ClipVision implements ClipSubjectSource {
3960
3971
  private readonly cell;
3961
3972
  private queue;
3962
3973
  private runner?;
3974
+ private sam2Tracker?;
3975
+ private sam2Frame;
3976
+ private sam3Tracker?;
3977
+ private sam3Frame;
3978
+ private sam?;
3979
+ /** Clips walk their source independently, so each owns a decoder (requests to one supersede). */
3980
+ private readonly decoderId;
3981
+ private signalBundle?;
3982
+ private publishedSignals;
3983
+ private signalMaskFrame;
3984
+ /** Masks of `signalMaskFrame` by track ID (0: all tracks merged). */
3985
+ private readonly signalMasks;
3986
+ /** Prompted track count per source frame, including frames where every track is absent. */
3987
+ private readonly trackCounts;
3963
3988
  private cacheLoaded?;
3964
3989
  private unsaved;
3965
3990
  private unsavedSubjects;
@@ -3972,6 +3997,13 @@ declare class ClipVision implements ClipSubjectSource {
3972
3997
  private subjectsLoaded?;
3973
3998
  /** @internal Use `comp.vision(source, options)`. */
3974
3999
  constructor(source: string, fps: number, options?: ClipVisionOptions);
4000
+ /** @internal Explicit selections must never fall back to another detected subject. */
4001
+ get exact(): boolean;
4002
+ /** Object, mask and optional pose signals on the composition clock, in source geometry. */
4003
+ get signals(): VisionBundle;
4004
+ private decoder;
4005
+ /** Free inference sessions and the decoder. Analysed frames remain readable; later frames replay memory. */
4006
+ release(): void;
3975
4007
  /** The tracked person in source pixels; `.place()` maps it into the composition. */
3976
4008
  get person(): PersonTrack;
3977
4009
  /**
@@ -3994,12 +4026,39 @@ declare class ClipVision implements ClipSubjectSource {
3994
4026
  * subjects kept, null when it holds no subject.
3995
4027
  */
3996
4028
  subject(frame: number, fps: number): InstanceMask | null | undefined;
4029
+ /**
4030
+ * @internal The pose matched to the subject at a source frame of the clip
4031
+ * (`frame` at `fps`), normalized to the source size, for a render-time
4032
+ * skeleton: undefined until that frame and its smoothing window are
4033
+ * analysed, null when no pose matched there.
4034
+ */
4035
+ pose(frame: number, fps: number): ClipPose | null | undefined;
4036
+ /** Whether frames carry keypoints: on by default, opt-in for prompted (SAM) clips. */
4037
+ get tracksPose(): boolean;
4038
+ /**
4039
+ * The analysed source frame a render-time read at `frame` (at `fps`) maps to;
4040
+ * undefined for an unprompted clip read between its analysed frames.
4041
+ */
4042
+ private sourceFrame;
3997
4043
  /** Composition frame → clip frame (fractional). */
3998
4044
  clipFrame(frame: number): number;
3999
4045
  private localFrame;
4000
4046
  private window;
4001
4047
  private analysed;
4048
+ /** Loads `@framefields/vision-sam` and validates the prompts once, on first use. */
4049
+ private prompted;
4002
4050
  private compute;
4051
+ private computeSam2;
4052
+ private computeSam3;
4053
+ /** Stores a prompted frame: every track's mask as one label map, the union as the subject. */
4054
+ private storeSamFrame;
4055
+ private samCategory;
4056
+ private matchedPose;
4057
+ /** Track IDs at a composition frame: every prompted track, else the one subject. */
4058
+ private trackIds;
4059
+ /** The subject (all tracks merged) or, with `id`, one track's mask, in source pixels. */
4060
+ private maskAt;
4061
+ private publishSignals;
4003
4062
  private setSize;
4004
4063
  /** @internal */
4005
4064
  size(): {
@@ -6412,13 +6471,15 @@ declare class Composition {
6412
6471
  */
6413
6472
  prepareVision(frame: number): Promise<void>;
6414
6473
  /**
6415
- * Points matte-family `withVision` layers at the `comp.vision` clip they
6416
- * show, so the cutout reuses that clip's per-frame subject instead of
6417
- * segmenting the frame again during render. Only layers whose settings
6418
- * would give the same subject are linked; the rest keep their own pass.
6474
+ * Points matte-family and skeleton `withVision` layers at the `comp.vision`
6475
+ * clip they show, so the cutout reuses that clip's per-frame subject and the
6476
+ * skeleton draws its matched pose, instead of analysing the frame again
6477
+ * during render. Only layers whose settings would give the same subject are
6478
+ * linked; the rest keep their own pass.
6419
6479
  */
6420
- private linkClipMattes;
6421
- private clipForMatte;
6480
+ private linkClipLayers;
6481
+ /** The `comp.vision` clip a matte or skeleton layer of the same source reads instead of analysing. */
6482
+ private clipForLayer;
6422
6483
  /**
6423
6484
  * One-shot, ffmpeg-free vision analysis of a media source.
6424
6485
  *
@@ -6804,5 +6865,5 @@ type ComponentNode<C extends Cues = Cues> = AnimatableNode<BoxNode> & ComponentE
6804
6865
  */
6805
6866
  declare function bindComponent<S$1 extends z.ZodRawShape, C extends Cues, E extends object = object>(definition: ComponentDefinition<S$1, C, E>): (props: z.input<z.ZodObject<S$1>> & BaseProps) => ComponentNode<C> & E;
6806
6867
  //#endregion
6807
- export { mapBlendModeToSkia as $, withDefaults as $a, evaluateGlyphExpression as $i, Anchor as $n, Model3DNode as $o, ResolvedMotion as $r, World3DOptions as $t, Physics as A, springAt as Aa, bandEdges as Ai, bold as An, EnvironmentFogSchema as Ao, GlyphBox as Ar, compositorToProgram as As, Points3DOptions as At, World2DOptions as B, targetPoint as Ba, contrastRatio as Bi, sub as Bn, LayoutNodeSchema as Bo, MeasureOptions as Br, Sphere3DOptions as Bt, TrackEditing as C, resolveTarget as Ca, anchorPoint as Ci, ChartSlice as Cn, CompositorProgramConfig as Co, ExtrudedTextOptions as Cr, ToneMapping as Cs, Icosphere3DOptions as Ct, section as D, scaleFrames as Da, audioLevelsSchema as Di, MarkOptions as Dn, EnvironmentFloor as Do, FrameValue as Dr, applyStaggerToChildren as Ds, Layer3D as Dt, editTrackedRegion as E, safeArea as Ea, ascending as Ei, DEFAULT_CHART_COLORS as En, EaseRef as Eo, FrameContextLike as Er, WiggleOptions as Es, Lathe3DOptions as Et, PhysicsRect as F, staggerOffsets as Fa, boundsOf as Fi, normalizeTextSpans as Fn, FromToOptions as Fo, Host as Fr, evaluateAnimationAtFrame as Fs, Ring3DOptions as Ft, InterpolateOptions as G, toPathData as Ga, dist as Gi, FRAMEFIELDS_AI_PROXY_URL as Gn, MaterialType as Go, MotionPresetName as Gr, Swarm3DOptions as Gt, LightingRig as H, themeFrames as Ha, defineComponent as Hi, Ai as Hn, LightNodeSchema as Ho, Metrics$1 as Hr, Text3DOptions as Ht, PhysicsRopeOptions as I, staggerRanks as Ia, boxPath as Ii, parseMarkup as In, Keyframe as Io, KeyBook as Ir, evaluateTrackAtFrame as Is, RoundedBox3DOptions as It, TextMeasureResult as J, transparent as Ja, elevate as Ji, RunOptions as Jn, MatteModeSchema as Jo, Placement as Jr, PhysicsBody3D as Jt, SpringConfig as K, toSeconds as Ka, drawOnKeys as Ki, QueueStatus as Kn, MaterialTypeSchema as Ko, MotionSize as Kr, Body3DOptions as Kt, PhysicsSpringOptions as L, stepExpression as La, catmullRom as Li, rich as Ln, KeyframeTuple as Lo, LayerStyleConfig as Lr, hoistMattes as Ls, Shape3DContainer as Lt, FieldSample2D as M, springSettleFrames as Ma, beats as Mi, color as Mn, EnvironmentPresetSchema as Mo, GlyphUnit as Mr, computeLayout as Ms, Primitive3DNodeOptions as Mt, PhysicsBody2D as N, springTrack as Na, bind as Ni, italic as Nn, FlexNode as No, GrainOptions as Nr, computeLayoutSync as Ns, Prism3DOptions as Nt, StyleName as O, scheduleExpression as Oa, bakeFunction as Oi, TextSpanItem as On, EnvironmentFloorSchema as Oo, FrameWindow as Or, calculateSequenceTimeline as Os, Line3DOptions as Ot, PhysicsGroundOptions as P, squigglePath as Pa, boilKeys as Pi, mark as Pn, FlexNodeSchema as Po, HandOptions as Pr, computeStaggerDelay as Ps, Pyramid3DOptions as Pt, interpolate as Q, withAlpha as Qa, evaluateEase as Qi, AnalyzeOptions as Qn, Model3DAnimatableProp as Qo, Rect as Qr, PhysicsWorld3D as Qt, PhysicsWallsOptions as R, supersede as Ra, chain as Ri, size as Rn, LayerAnimation as Ro, MOTION_PRESETS as Rr, lintComposition as Rs, Shard3DOptions as Rt, SubjectSandwichOptions as S, resolveMotion as Sa, analyzeChannels as Si, ChartSeries as Sn, ColorStopSchema as So, ElevationLevel as Sr, TextSpanSchema as Ss, Grid3DOptions as St, blurRegion as T, round as Ta, arrowPaths as Ti, ChartX as Tn, CompositorToProgramOptions as To, FontRole as Tr, TrackSource as Ts, Instances3DOptions as Tt, LightingRigOptions as U, themes as Ua, defineMeta as Ui, AiConfig as Un, LightType as Uo, MotionOptions as Ur, Torus3DOptions as Ut, Lighting as V, textLayout as Va, cover as Vi, sup as Vn, LightNode as Vo, MediaOptions as Vr, Surface3DOptions as Vt, Easing as W, toFrames as Wa, defineTheme as Wi, ApiError as Wn, LightTypeSchema as Wo, MotionPreset as Wr, Tube3DOptions as Wt, bezier as X, valueAt as Xa, ellipsePath as Xi, ai as Xn, MediaNode as Xo, PropsOf as Xr, PhysicsRope3DOptions as Xt, TextMeasureStyle as Y, typingFrames as Ya, elevationStyle as Yi, ValidationError as Yn, MediaAnimatableProp as Yo, ProjectDefaults as Yr, PhysicsBox3D as Yt, computeStrokeRect as Z, windowExpression as Za, enterAnimation as Zi, targetSchema as Zn, MediaNodeSchema as Zo, PulseOptions as Zr, PhysicsSpring3DOptions as Zt, RenderVideoResult as _, pulseKeys as _a, UNIT_INDEX as _i, ChartAxisOptions as _n, CarrierHandoffConfig as _o, Cues as _r, TextAnimator as _s, CubeFaceConfig as _t, AnimatableNode as a, hashString as aa, Spring as ai, PhysicsDriver as an, AnimationTrack as ao, AudioLevels as ar, SceneTransitionType as as, requiresIsolation as at, SmartFramingOptions as b, rendererChars as ba, WordRange as bi, ChartOptions as bn, ColorSignalOptions as bo, EaseFn as br, TextNodeSchema as bs, ExtrudeShape3DOptions as bt, CompositionOptions as c, isLight as ca, Target as ci, ParticleBlend as cn, BloomConfigSchema as co, BaseProps as cr, SequenceOptions as cs, SceneSequenceOptions as ct, EnvironmentOptions as d, linePath as da, TextLayout as di, ClipVision as dn, CameraAnimation as do, CanvasSize as dr, ShapeNode as ds, Transition as dt, exitAnimation as ea, ResolvedTarget as ei, Particles as en, within as eo, Animatable as er, Model3DNodeSchema as es, measureSpring as et, Layer as f, lineShift as fa, Theme as fi, ClipVisionOptions as fn, CameraDoF as fo, ComponentDefaults as fr, ShapeNodeSchema as fs, TransitionDirection as ft, RenderVideoOptions as g, parseColor as ga, TrackedObjectLike as gi, ChartAnimationOptions as gn, CameraShake as go, Cue as gr, TextAnimatableProp as gs, Cube3DOptions as gt, NodeCapability as h, offsetCues as ha, Track as hi, PoseKeypointName as hn, CameraNodeSchema as ho, ComponentMeta as hr, SpringOptions as hs, Carousel3DOptions as ht, analyzeAudio as i, hashRng as ia, SafeInsets as ii, PhysicsCollision as in, AnimatablePropsFor as io, ArrowGeometry as ir, SceneOptions as is, preloadFont as it, Body2DOptions as j, springKeys as ja, basePropsSchema as ji, code as jn, EnvironmentPreset as jo, GlyphProps as jr, computeCarrierContinuity as js, Polyhedron3DOptions as jt, Styles as k, smoothRelease as ka, bakeSamples as ki, accent as kn, EnvironmentFog as ko, GlyphAnimator as kr, collectNodeOps as ks, Plane3DOptions as kt, EditableObjectTrack as l, last as la, TargetContext as li, ParticleBounds as ln, BoxNode as lo, BuildContext as lr, SequenceTimelineResult as ls, SequenceEntry as lt, Media as m, mix as ma, ThemeName as mi, PersonTrack as mn, CameraNode as mo, ComponentExtras as mr, SizeSpec as ms, Capsule3DOptions as mt, bindComponent as n, frameSpan as na, Rng as ni, BodyCommonOptions as nn, wordRanges as no, ArcPath as nr, SceneDefinition as ns, measureTextAsync as nt, CompatibleEffect as o, holdFirstKeys as oa, StaggerOrder as oi, PhysicsWorldOptions as on, BlockNode as oo, BakeOptions as or, SceneTransitionTypeSchema as os, spring as ot, Light as p, luminance as pa, ThemeInput as pi, PersonPlacement as pn, CameraLens as po, ComponentDefinition as pr, SignalTrackOptions as ps, TransitionSpec as pt, StrokeRect as q, transformPathData as qa, ease$1 as qi, Result as qn, MatteMode as qo, ParticleOptions as qr, FieldSample3D as qt, z$2 as r, glyphAnimator as ra, SAFE_INSETS as ri, PhysicsBakeOptions as rn, AnimatableProp as ro, ArrowCurve as rr, SceneDefinitionSchema as rs, preloadCompositionFonts as rt, Composition as s, inkOn as sa, SyntaxKind as si, EmitterShape as sn, BloomConfig as so, BakedKey as sr, Sequence as ss, springCalculation as st, ComponentNode as t, findRange as ta, Rgba as ti, ParticlesOptions as tn, wobblePoints as to, AnimatableMethods as tr, Scene as ts, measureText as tt, Effect as u, lerp2 as ua, TargetNode as ui, ParticleShape as un, BoxNodeSchema as uo, BuildResult as ur, ShapeAnimatableProp as us, SequenceNode as ut, SectionNode as v, quantize as va, UnitSchedule as vi, ChartCandle as vn, CarrierHandoffConfigSchema as vo, CuesOf as vr, TextAnimatorSchema as vs, CubeFaceInput as vt, TrackedRegionOptions as w, rng as wa, arcPath as wi, ChartType as wn, CompositorProgramSchema as wo, FontNeed as wr, ToneMappingSchema as ws, InstanceTransform3D as wt, SubjectOutlineOptions as x, resampleBands as xa, after as xi, ChartPadding as xn, ColorStop as xo, Elevation as xr, TextSpanMarkSchema as xs, ExtrudedText3DOptions as xt, SectionOptions as y, rangeRects as ya, Vec2$1 as yi, ChartDatum as yn, CarrierState as yo, CutoutOptions as yr, TextNode as ys, Cylinder3DOptions as yt, PhysicsWorld2D as z, surfaceFill as za, constantExpression as zi, span as zn, LayoutNode as zo, MeasureFn as zr, mergeAnimationTracks as zs, SolidShape3DNode as zt };
6808
- //# sourceMappingURL=index-BwRrsP_V.d.mts.map
6868
+ export { InterpolateOptions as $, toPathData as $a, dist as $i, FRAMEFIELDS_AI_PROXY_URL as $n, MaterialType as $o, MotionPresetName as $r, Swarm3DOptions as $t, SubjectSandwichOptions as A, resolveMotion as Aa, analyzeChannels as Ai, ChartSeries as An, ColorStopSchema as Ao, ElevationLevel as Ar, TextSpanSchema as As, Grid3DOptions as At, FieldSample2D as B, springSettleFrames as Ba, beats as Bi, color as Bn, EnvironmentPresetSchema as Bo, GlyphUnit as Br, computeLayout as Bs, Primitive3DNodeOptions as Bt, Sam3Options$1 as C, offsetCues as Ca, Track as Ci, PoseKeypointName as Cn, CameraNodeSchema as Co, ComponentMeta as Cr, SpringOptions as Cs, Carousel3DOptions as Ct, SectionOptions as D, rangeRects as Da, Vec2$1 as Di, ChartDatum as Dn, CarrierState as Do, CutoutOptions as Dr, TextNode as Ds, Cylinder3DOptions as Dt, SectionNode as E, quantize as Ea, UnitSchedule as Ei, ChartCandle as En, CarrierHandoffConfigSchema as Eo, CuesOf as Er, TextAnimatorSchema as Es, CubeFaceInput as Et, section as F, scaleFrames as Fa, audioLevelsSchema as Fi, MarkOptions as Fn, EnvironmentFloor as Fo, FrameValue as Fr, applyStaggerToChildren as Fs, Layer3D as Ft, PhysicsSpringOptions as G, stepExpression as Ga, catmullRom as Gi, rich as Gn, KeyframeTuple as Go, LayerStyleConfig as Gr, hoistMattes as Gs, Shape3DContainer as Gt, PhysicsGroundOptions as H, squigglePath as Ha, boilKeys as Hi, mark as Hn, FlexNodeSchema as Ho, HandOptions as Hr, computeStaggerDelay as Hs, Pyramid3DOptions as Ht, StyleName as I, scheduleExpression as Ia, bakeFunction as Ii, TextSpanItem as In, EnvironmentFloorSchema as Io, FrameWindow as Ir, calculateSequenceTimeline as Is, Line3DOptions as It, World2DOptions as J, targetPoint as Ja, contrastRatio as Ji, sub as Jn, LayoutNodeSchema as Jo, MeasureOptions as Jr, Sphere3DOptions as Jt, PhysicsWallsOptions as K, supersede as Ka, chain as Ki, size as Kn, LayerAnimation as Ko, MOTION_PRESETS as Kr, lintComposition as Ks, Shard3DOptions as Kt, Styles as L, smoothRelease as La, bakeSamples as Li, accent as Ln, EnvironmentFog as Lo, GlyphAnimator as Lr, collectNodeOps as Ls, Plane3DOptions as Lt, TrackedRegionOptions as M, rng as Ma, arcPath as Mi, ChartType as Mn, CompositorProgramSchema as Mo, FontNeed as Mr, ToneMappingSchema as Ms, InstanceTransform3D as Mt, blurRegion as N, round as Na, arrowPaths as Ni, ChartX as Nn, CompositorToProgramOptions as No, FontRole as Nr, TrackSource as Ns, Instances3DOptions as Nt, SmartFramingOptions as O, rendererChars as Oa, WordRange as Oi, ChartOptions as On, ColorSignalOptions as Oo, EaseFn as Or, TextNodeSchema as Os, ExtrudeShape3DOptions as Ot, editTrackedRegion as P, safeArea as Pa, ascending as Pi, DEFAULT_CHART_COLORS as Pn, EaseRef as Po, FrameContextLike as Pr, WiggleOptions as Ps, Lathe3DOptions as Pt, Easing as Q, toFrames as Qa, defineTheme as Qi, ApiError as Qn, LightTypeSchema as Qo, MotionPreset as Qr, Tube3DOptions as Qt, Physics as R, springAt as Ra, bandEdges as Ri, bold as Rn, EnvironmentFogSchema as Ro, GlyphBox as Rr, compositorToProgram as Rs, Points3DOptions as Rt, Sam2Prompt as S, mix as Sa, ThemeName as Si, PersonTrack as Sn, CameraNode as So, ComponentExtras as Sr, SizeSpec as Ss, Capsule3DOptions as St, Sam3Prompt as T, pulseKeys as Ta, UNIT_INDEX as Ti, ChartAxisOptions as Tn, CarrierHandoffConfig as To, Cues as Tr, TextAnimator as Ts, CubeFaceConfig as Tt, PhysicsRect as U, staggerOffsets as Ua, boundsOf as Ui, normalizeTextSpans as Un, FromToOptions as Uo, Host as Ur, evaluateAnimationAtFrame as Us, Ring3DOptions as Ut, PhysicsBody2D as V, springTrack as Va, bind as Vi, italic as Vn, FlexNode as Vo, GrainOptions as Vr, computeLayoutSync as Vs, Prism3DOptions as Vt, PhysicsRopeOptions as W, staggerRanks as Wa, boxPath as Wi, parseMarkup as Wn, Keyframe as Wo, KeyBook as Wr, evaluateTrackAtFrame as Ws, RoundedBox3DOptions as Wt, LightingRig as X, themeFrames as Xa, defineComponent as Xi, Ai as Xn, LightNodeSchema as Xo, Metrics$1 as Xr, Text3DOptions as Xt, Lighting as Y, textLayout as Ya, cover as Yi, sup as Yn, LightNode as Yo, MediaOptions as Yr, Surface3DOptions as Yt, LightingRigOptions as Z, themes as Za, defineMeta as Zi, AiConfig as Zn, LightType as Zo, MotionOptions as Zr, Torus3DOptions as Zt, RenderVideoResult as _, last as _a, TargetContext as _i, ParticleBounds as _n, BoxNode as _o, BuildContext as _r, SequenceTimelineResult as _s, SequenceEntry as _t, AnimatableNode as a, enterAnimation as aa, PulseOptions as ai, PhysicsSpring3DOptions as an, windowExpression as ao, targetSchema as ar, MediaNodeSchema as as, computeStrokeRect as at, Sam2Options$1 as b, lineShift as ba, Theme as bi, ClipVisionOptions as bn, CameraDoF as bo, ComponentDefaults as br, ShapeNodeSchema as bs, TransitionDirection as bt, CompositionOptions as c, exitAnimation as ca, ResolvedTarget as ci, Particles as cn, within as co, Animatable as cr, Model3DNodeSchema as cs, measureSpring as ct, EnvironmentOptions as d, glyphAnimator as da, SAFE_INSETS as di, PhysicsBakeOptions as dn, AnimatableProp as do, ArrowCurve as dr, SceneDefinitionSchema as ds, preloadCompositionFonts as dt, drawOnKeys as ea, MotionSize as ei, Body3DOptions as en, toSeconds as eo, QueueStatus as er, MaterialTypeSchema as es, SpringConfig as et, Layer as f, hashRng as fa, SafeInsets as fi, PhysicsCollision as fn, AnimatablePropsFor as fo, ArrowGeometry as fr, SceneOptions as fs, preloadFont as ft, RenderVideoOptions as g, isLight as ga, Target as gi, ParticleBlend as gn, BloomConfigSchema as go, BaseProps as gr, SequenceOptions as gs, SceneSequenceOptions as gt, NodeCapability as h, inkOn as ha, SyntaxKind as hi, EmitterShape as hn, BloomConfig as ho, BakedKey as hr, Sequence as hs, springCalculation as ht, analyzeAudio as i, ellipsePath as ia, PropsOf as ii, PhysicsRope3DOptions as in, valueAt as io, ai as ir, MediaNode as is, bezier as it, TrackEditing as j, resolveTarget as ja, anchorPoint as ji, ChartSlice as jn, CompositorProgramConfig as jo, ExtrudedTextOptions as jr, ToneMapping as js, Icosphere3DOptions as jt, SubjectOutlineOptions as k, resampleBands as ka, after as ki, ChartPadding as kn, ColorStop as ko, Elevation as kr, TextSpanMarkSchema as ks, ExtrudedText3DOptions as kt, EditableObjectTrack as l, findRange as la, Rgba as li, ParticlesOptions as ln, wobblePoints as lo, AnimatableMethods as lr, Scene as ls, measureText as lt, Media as m, holdFirstKeys as ma, StaggerOrder as mi, PhysicsWorldOptions as mn, BlockNode as mo, BakeOptions as mr, SceneTransitionTypeSchema as ms, spring as mt, bindComponent as n, elevate as na, Placement as ni, PhysicsBody3D as nn, transparent as no, RunOptions as nr, MatteModeSchema as ns, TextMeasureResult as nt, CompatibleEffect as o, evaluateEase as oa, Rect as oi, PhysicsWorld3D as on, withAlpha as oo, AnalyzeOptions as or, Model3DAnimatableProp as os, interpolate as ot, Light as p, hashString as pa, Spring as pi, PhysicsDriver as pn, AnimationTrack as po, AudioLevels as pr, SceneTransitionType as ps, requiresIsolation as pt, PhysicsWorld2D as q, surfaceFill as qa, constantExpression as qi, span as qn, LayoutNode as qo, MeasureFn as qr, mergeAnimationTracks as qs, SolidShape3DNode as qt, z$2 as r, elevationStyle as ra, ProjectDefaults as ri, PhysicsBox3D as rn, typingFrames as ro, ValidationError as rr, MediaAnimatableProp as rs, TextMeasureStyle as rt, Composition as s, evaluateGlyphExpression as sa, ResolvedMotion as si, World3DOptions as sn, withDefaults as so, Anchor as sr, Model3DNode as ss, mapBlendModeToSkia as st, ComponentNode as t, ease$1 as ta, ParticleOptions as ti, FieldSample3D as tn, transformPathData as to, Result as tr, MatteMode as ts, StrokeRect as tt, Effect as u, frameSpan as ua, Rng as ui, BodyCommonOptions as un, wordRanges as uo, ArcPath as ur, SceneDefinition as us, measureTextAsync as ut, Sam2FrameResult as v, lerp2 as va, TargetNode as vi, ParticleShape as vn, BoxNodeSchema as vo, BuildResult as vr, ShapeAnimatableProp as vs, SequenceNode as vt, Sam3Precision as w, parseColor as wa, TrackedObjectLike as wi, ChartAnimationOptions as wn, CameraShake as wo, Cue as wr, TextAnimatableProp as ws, Cube3DOptions as wt, Sam2Point as x, luminance as xa, ThemeInput as xi, PersonPlacement as xn, CameraLens as xo, ComponentDefinition as xr, SignalTrackOptions as xs, TransitionSpec as xt, Sam2Model as y, linePath as ya, TextLayout as yi, ClipVision as yn, CameraAnimation as yo, CanvasSize as yr, ShapeNode as ys, Transition as yt, Body2DOptions as z, springKeys as za, basePropsSchema as zi, code as zn, EnvironmentPreset as zo, GlyphProps as zr, computeCarrierContinuity as zs, Polyhedron3DOptions as zt };
6869
+ //# sourceMappingURL=index-Bnh42ouE.d.mts.map