@nanoforge-dev/editor 0.0.2-beta.7f94b8f → 0.0.2-beta.82a2d26

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 (307) hide show
  1. package/dist/client/_app/immutable/assets/0.B5z3JAkE.css +1 -0
  2. package/dist/client/_app/immutable/assets/0.B5z3JAkE.css.br +0 -0
  3. package/dist/client/_app/immutable/assets/0.B5z3JAkE.css.gz +0 -0
  4. package/dist/client/_app/immutable/chunks/{BS47D1Yd2.js → BFWbalF82.js} +1 -1
  5. package/dist/client/_app/immutable/chunks/BFWbalF82.js.br +0 -0
  6. package/dist/client/_app/immutable/chunks/BFWbalF82.js.gz +0 -0
  7. package/dist/client/_app/immutable/chunks/{DT8Ddh1L2.js → BLf9jss52.js} +1 -1
  8. package/dist/client/_app/immutable/chunks/BLf9jss52.js.br +0 -0
  9. package/dist/client/_app/immutable/chunks/BLf9jss52.js.gz +0 -0
  10. package/dist/client/_app/immutable/chunks/{CKei9xPI2.js → BSNB_Uck2.js} +2 -2
  11. package/dist/client/_app/immutable/chunks/BSNB_Uck2.js.br +0 -0
  12. package/dist/client/_app/immutable/chunks/BSNB_Uck2.js.gz +0 -0
  13. package/dist/client/_app/immutable/chunks/{Fu4roQAh.js → BWNegMLP.js} +1 -1
  14. package/dist/client/_app/immutable/chunks/BWNegMLP.js.br +0 -0
  15. package/dist/client/_app/immutable/chunks/BWNegMLP.js.gz +0 -0
  16. package/dist/client/_app/immutable/chunks/{orCHVlgT.js → BesjqVrk.js} +1 -1
  17. package/dist/client/_app/immutable/chunks/BesjqVrk.js.br +0 -0
  18. package/dist/client/_app/immutable/chunks/BesjqVrk.js.gz +0 -0
  19. package/dist/client/_app/immutable/chunks/{BWDRzheF2.js → Bhafduqk2.js} +1 -1
  20. package/dist/client/_app/immutable/chunks/Bhafduqk2.js.br +0 -0
  21. package/dist/client/_app/immutable/chunks/Bhafduqk2.js.gz +0 -0
  22. package/dist/client/_app/immutable/chunks/{iXxqXKVH.js → Bp3dOgoC.js} +1 -1
  23. package/dist/client/_app/immutable/chunks/Bp3dOgoC.js.br +0 -0
  24. package/dist/client/_app/immutable/chunks/Bp3dOgoC.js.gz +0 -0
  25. package/dist/client/_app/immutable/chunks/BpNXszev.js +6 -0
  26. package/dist/client/_app/immutable/chunks/BpNXszev.js.br +0 -0
  27. package/dist/client/_app/immutable/chunks/BpNXszev.js.gz +0 -0
  28. package/dist/client/_app/immutable/chunks/{CjBgitB7.js → CBb7lP5l.js} +1 -1
  29. package/dist/client/_app/immutable/chunks/CBb7lP5l.js.br +2 -0
  30. package/dist/client/_app/immutable/chunks/CBb7lP5l.js.gz +0 -0
  31. package/dist/client/_app/immutable/chunks/{DVc-WzII.js → CByF3Zfc.js} +1 -1
  32. package/dist/client/_app/immutable/chunks/CByF3Zfc.js.br +0 -0
  33. package/dist/client/_app/immutable/chunks/CByF3Zfc.js.gz +0 -0
  34. package/dist/client/_app/immutable/chunks/{uo5fvlDn2.js → CJxKUjL-2.js} +1 -1
  35. package/dist/client/_app/immutable/chunks/CJxKUjL-2.js.br +0 -0
  36. package/dist/client/_app/immutable/chunks/CJxKUjL-2.js.gz +0 -0
  37. package/dist/client/_app/immutable/chunks/{DH-ThjiG2.js → CVQMNY_q2.js} +2 -2
  38. package/dist/client/_app/immutable/chunks/CVQMNY_q2.js.br +0 -0
  39. package/dist/client/_app/immutable/chunks/CVQMNY_q2.js.gz +0 -0
  40. package/dist/client/_app/immutable/chunks/{Bk9DeFcz2.js → CbW3yNTi.js} +1 -1
  41. package/dist/client/_app/immutable/chunks/CbW3yNTi.js.br +0 -0
  42. package/dist/client/_app/immutable/chunks/CbW3yNTi.js.gz +0 -0
  43. package/dist/client/_app/immutable/chunks/CvkNa2t_.js +3 -0
  44. package/dist/client/_app/immutable/chunks/CvkNa2t_.js.br +0 -0
  45. package/dist/client/_app/immutable/chunks/CvkNa2t_.js.gz +0 -0
  46. package/dist/client/_app/immutable/chunks/{CnhOha0Z2.js → D2PipAw82.js} +1 -1
  47. package/dist/client/_app/immutable/chunks/D2PipAw82.js.br +0 -0
  48. package/dist/client/_app/immutable/chunks/D2PipAw82.js.gz +0 -0
  49. package/dist/client/_app/immutable/chunks/{BzGBrbo22.js → D6-zOYYZ2.js} +1 -1
  50. package/dist/client/_app/immutable/chunks/D6-zOYYZ2.js.br +0 -0
  51. package/dist/client/_app/immutable/chunks/D6-zOYYZ2.js.gz +0 -0
  52. package/dist/client/_app/immutable/chunks/{B4w9-fYM2.js → DGDm8Q4w2.js} +1 -1
  53. package/dist/client/_app/immutable/chunks/DGDm8Q4w2.js.br +0 -0
  54. package/dist/client/_app/immutable/chunks/DGDm8Q4w2.js.gz +0 -0
  55. package/dist/client/_app/immutable/chunks/{DFXoGGM32.js → DRQF0pcw2.js} +1 -1
  56. package/dist/client/_app/immutable/chunks/DRQF0pcw2.js.br +0 -0
  57. package/dist/client/_app/immutable/chunks/DRQF0pcw2.js.gz +0 -0
  58. package/dist/client/_app/immutable/chunks/DV4appXC.js +1 -0
  59. package/dist/client/_app/immutable/chunks/DV4appXC.js.br +0 -0
  60. package/dist/client/_app/immutable/chunks/DV4appXC.js.gz +0 -0
  61. package/dist/client/_app/immutable/chunks/{C83DJP9w2.js → DYPPS7OK2.js} +1 -1
  62. package/dist/client/_app/immutable/chunks/DYPPS7OK2.js.br +0 -0
  63. package/dist/client/_app/immutable/chunks/DYPPS7OK2.js.gz +0 -0
  64. package/dist/client/_app/immutable/chunks/{BZqFHUa32.js → DaisyxdZ2.js} +1 -1
  65. package/dist/client/_app/immutable/chunks/DaisyxdZ2.js.br +0 -0
  66. package/dist/client/_app/immutable/chunks/DaisyxdZ2.js.gz +0 -0
  67. package/dist/client/_app/immutable/chunks/{BlGyHMDZ.js → DtcTX-YU.js} +1 -1
  68. package/dist/client/_app/immutable/chunks/DtcTX-YU.js.br +0 -0
  69. package/dist/client/_app/immutable/chunks/DtcTX-YU.js.gz +0 -0
  70. package/dist/client/_app/immutable/chunks/{DHQLzCjY2.js → M5EMNuDS2.js} +1 -1
  71. package/dist/client/_app/immutable/chunks/M5EMNuDS2.js.br +0 -0
  72. package/dist/client/_app/immutable/chunks/M5EMNuDS2.js.gz +0 -0
  73. package/dist/client/_app/immutable/chunks/{DuDzfUqN2.js → SmrQhi1p2.js} +1 -1
  74. package/dist/client/_app/immutable/chunks/SmrQhi1p2.js.br +0 -0
  75. package/dist/client/_app/immutable/chunks/SmrQhi1p2.js.gz +0 -0
  76. package/dist/client/_app/immutable/chunks/{C7bUlFLk2.js → TFu7Wn2c2.js} +1 -1
  77. package/dist/client/_app/immutable/chunks/TFu7Wn2c2.js.br +0 -0
  78. package/dist/client/_app/immutable/chunks/TFu7Wn2c2.js.gz +0 -0
  79. package/dist/client/_app/immutable/chunks/{BwWAgYKi2.js → mESnenQM2.js} +1 -1
  80. package/dist/client/_app/immutable/chunks/mESnenQM2.js.br +0 -0
  81. package/dist/client/_app/immutable/chunks/mESnenQM2.js.gz +0 -0
  82. package/dist/client/_app/immutable/chunks/nE3VUeYj.js +0 -0
  83. package/dist/client/_app/immutable/chunks/nE3VUeYj.js.br +1 -0
  84. package/dist/client/_app/immutable/chunks/nE3VUeYj.js.gz +0 -0
  85. package/dist/client/_app/immutable/chunks/{mRVEsFly2.js → uIj7mV9x2.js} +1 -1
  86. package/dist/client/_app/immutable/chunks/uIj7mV9x2.js.br +0 -0
  87. package/dist/client/_app/immutable/chunks/uIj7mV9x2.js.gz +0 -0
  88. package/dist/client/_app/immutable/chunks/{DvR7gEY0.js → z7c9RqCD.js} +10 -10
  89. package/dist/client/_app/immutable/chunks/z7c9RqCD.js.br +0 -0
  90. package/dist/client/_app/immutable/chunks/z7c9RqCD.js.gz +0 -0
  91. package/dist/client/_app/immutable/entry/{app.ClajJkjE.js → app.6QEfz-iq.js} +2 -2
  92. package/dist/client/_app/immutable/entry/app.6QEfz-iq.js.br +0 -0
  93. package/dist/client/_app/immutable/entry/app.6QEfz-iq.js.gz +0 -0
  94. package/dist/client/_app/immutable/entry/start.DgVllUEP.js +1 -0
  95. package/dist/client/_app/immutable/entry/start.DgVllUEP.js.br +0 -0
  96. package/dist/client/_app/immutable/entry/start.DgVllUEP.js.gz +0 -0
  97. package/dist/client/_app/immutable/nodes/{0.Z6tE7NXD.js → 0.DHdCqwIJ.js} +1 -1
  98. package/dist/client/_app/immutable/nodes/0.DHdCqwIJ.js.br +0 -0
  99. package/dist/client/_app/immutable/nodes/0.DHdCqwIJ.js.gz +0 -0
  100. package/dist/client/_app/immutable/nodes/{1.D-llQKCG.js → 1.loL9C4pA.js} +1 -1
  101. package/dist/client/_app/immutable/nodes/1.loL9C4pA.js.br +3 -0
  102. package/dist/client/_app/immutable/nodes/1.loL9C4pA.js.gz +0 -0
  103. package/dist/client/_app/immutable/nodes/{9.DJls5DBF.js → 11.BJRhAisP.js} +1 -1
  104. package/dist/client/_app/immutable/nodes/11.BJRhAisP.js.br +0 -0
  105. package/dist/client/_app/immutable/nodes/11.BJRhAisP.js.gz +0 -0
  106. package/dist/client/_app/immutable/nodes/2.5Lbr-iiR.js +1 -0
  107. package/dist/client/_app/immutable/nodes/2.5Lbr-iiR.js.br +0 -0
  108. package/dist/client/_app/immutable/nodes/2.5Lbr-iiR.js.gz +0 -0
  109. package/dist/client/_app/immutable/nodes/3.5BHWCtcR.js +6 -0
  110. package/dist/client/_app/immutable/nodes/3.5BHWCtcR.js.br +0 -0
  111. package/dist/client/_app/immutable/nodes/3.5BHWCtcR.js.gz +0 -0
  112. package/dist/client/_app/version.json +1 -1
  113. package/dist/client/_app/version.json.br +0 -0
  114. package/dist/client/_app/version.json.gz +0 -0
  115. package/dist/server/chunks/{0-SqIRzZEU.js → 0-DK13KdVt.js} +6 -6
  116. package/dist/server/chunks/{0-SqIRzZEU.js.map → 0-DK13KdVt.js.map} +1 -1
  117. package/dist/server/chunks/{1-lGw6eSTV.js → 1-DytmaR_G.js} +6 -6
  118. package/dist/server/chunks/{1-lGw6eSTV.js.map → 1-DytmaR_G.js.map} +1 -1
  119. package/dist/server/chunks/{5-610NKQc3.js → 10-zM8H1H7h.js} +5 -5
  120. package/dist/server/chunks/10-zM8H1H7h.js.map +1 -0
  121. package/dist/server/chunks/11-DAhp5wFR.js +22 -0
  122. package/dist/server/chunks/11-DAhp5wFR.js.map +1 -0
  123. package/dist/server/chunks/{2-YIlYe7s2.js → 2-BdHpeJzA.js} +10 -10
  124. package/dist/server/chunks/{2-YIlYe7s2.js.map → 2-BdHpeJzA.js.map} +1 -1
  125. package/dist/server/chunks/3-CFpQUapX.js +22 -0
  126. package/dist/server/chunks/3-CFpQUapX.js.map +1 -0
  127. package/dist/server/chunks/{3-CtfjP4uZ.js → 4-8BW6Sdb0.js} +25 -11
  128. package/dist/server/chunks/4-8BW6Sdb0.js.map +1 -0
  129. package/dist/server/chunks/{8-s07Rj2Zo.js → 5-1NMUY_LH.js} +5 -5
  130. package/dist/server/chunks/{8-s07Rj2Zo.js.map → 5-1NMUY_LH.js.map} +1 -1
  131. package/dist/server/chunks/{4-DP-_gDay.js → 6-DE-wH6HQ.js} +5 -5
  132. package/dist/server/chunks/{4-DP-_gDay.js.map → 6-DE-wH6HQ.js.map} +1 -1
  133. package/dist/server/chunks/7-B1Qi_1kM.js +18 -0
  134. package/dist/server/chunks/7-B1Qi_1kM.js.map +1 -0
  135. package/dist/server/chunks/8-sn6bIqkc.js +91 -0
  136. package/dist/server/chunks/8-sn6bIqkc.js.map +1 -0
  137. package/dist/server/chunks/{7-BUEKgK7m.js → 9-UjOK68In.js} +5 -5
  138. package/dist/server/chunks/{7-BUEKgK7m.js.map → 9-UjOK68In.js.map} +1 -1
  139. package/dist/server/chunks/{_layout.svelte-uX7XiB9K.js → _layout.svelte-By6MJeec.js} +5 -5
  140. package/dist/server/chunks/_layout.svelte-By6MJeec.js.map +1 -0
  141. package/dist/server/chunks/{_page.svelte-Djlpeftv.js → _page.svelte-B3dvQwz5.js} +7 -7
  142. package/dist/server/chunks/{_page.svelte-Djlpeftv.js.map → _page.svelte-B3dvQwz5.js.map} +1 -1
  143. package/dist/server/chunks/{_page.svelte-DXg7rMv4.js → _page.svelte-DRyjxD6O.js} +271 -106
  144. package/dist/server/chunks/_page.svelte-DRyjxD6O.js.map +1 -0
  145. package/dist/server/chunks/{_page.svelte-C5uhadJX.js → _page.svelte-DYpkpTnJ.js} +6 -6
  146. package/dist/server/chunks/_page.svelte-DYpkpTnJ.js.map +1 -0
  147. package/dist/server/chunks/_server.ts-C1vgzIkJ.js +13 -0
  148. package/dist/server/chunks/_server.ts-C1vgzIkJ.js.map +1 -0
  149. package/dist/server/chunks/{_server.ts-DlC2sxcm.js → _server.ts-Dy1xpkL2.js} +15 -3
  150. package/dist/server/chunks/_server.ts-Dy1xpkL2.js.map +1 -0
  151. package/dist/server/chunks/{_server.ts-a-I4s4R9.js → _server.ts-Hci5qTfA.js} +2 -2
  152. package/dist/server/chunks/{_server.ts-a-I4s4R9.js.map → _server.ts-Hci5qTfA.js.map} +1 -1
  153. package/dist/server/chunks/app-DUeJj5RD.js.map +1 -1
  154. package/dist/server/chunks/{client-C2VsBptx.js → client-DBcQyXdV.js} +4 -4
  155. package/dist/server/chunks/client-DBcQyXdV.js.map +1 -0
  156. package/dist/server/chunks/{error-DWpaxupR.js → error-dHCCrW4T.js} +322 -153
  157. package/dist/server/chunks/error-dHCCrW4T.js.map +1 -0
  158. package/dist/server/chunks/{error.svelte-BsMzCBZ0.js → error.svelte-CAHakCnN.js} +3 -3
  159. package/dist/server/chunks/error.svelte-CAHakCnN.js.map +1 -0
  160. package/dist/server/chunks/{exports-CWOtdr_a.js → exports-D0uQzbjy.js} +4 -4
  161. package/dist/server/chunks/{exports-CWOtdr_a.js.map → exports-D0uQzbjy.js.map} +1 -1
  162. package/dist/server/chunks/{hooks.server-DvBkCPa4.js → hooks.server-BR9nwSH9.js} +6 -6
  163. package/dist/server/chunks/hooks.server-BR9nwSH9.js.map +1 -0
  164. package/dist/server/chunks/{hooks.universal-DhGFdBkK.js → hooks.universal-bt2XJEN9.js} +2 -2
  165. package/dist/server/chunks/{hooks.universal-DhGFdBkK.js.map → hooks.universal-bt2XJEN9.js.map} +1 -1
  166. package/dist/server/chunks/{events-Bhh2w-5S.js → index-server-BthNUqCR.js} +1006 -1005
  167. package/dist/server/chunks/index-server-BthNUqCR.js.map +1 -0
  168. package/dist/server/chunks/{internal-DsA4iYdx.js → internal-vr3mPczx.js} +2 -2
  169. package/dist/server/chunks/{internal-DsA4iYdx.js.map → internal-vr3mPczx.js.map} +1 -1
  170. package/dist/server/chunks/{internal2-BH90KZDG.js → internal2-DhEJvRRa.js} +22 -15
  171. package/dist/server/chunks/internal2-DhEJvRRa.js.map +1 -0
  172. package/dist/server/chunks/{loader-circle-CFNm9vip.js → loader-circle-C4T0os4K.js} +5 -5
  173. package/dist/server/chunks/loader-circle-C4T0os4K.js.map +1 -0
  174. package/dist/server/chunks/{logo-BZr09Nc5.js → logo-V5iuJCmy.js} +4 -4
  175. package/dist/server/chunks/logo-V5iuJCmy.js.map +1 -0
  176. package/dist/server/chunks/{project-loader-CgAv5fFI.js → project-loader-CkPdftFo.js} +4 -4
  177. package/dist/server/chunks/project-loader-CkPdftFo.js.map +1 -0
  178. package/dist/server/chunks/{request-handler-guINVc1G.js → request-handler-BVHWtbqx.js} +206 -140
  179. package/dist/server/chunks/request-handler-BVHWtbqx.js.map +1 -0
  180. package/dist/server/chunks/{runtime-CDHWD9vo.js → runtime-26c7QsEi.js} +9 -9
  181. package/dist/server/chunks/runtime-26c7QsEi.js.map +1 -0
  182. package/dist/server/chunks/{schemas-CAs9LqPk.js → schemas-l8C4cVM-.js} +348 -303
  183. package/dist/server/chunks/schemas-l8C4cVM-.js.map +1 -0
  184. package/dist/server/chunks/{session-DLCjVGKo.js → session-By0bbFhg.js} +2 -2
  185. package/dist/server/chunks/{session-DLCjVGKo.js.map → session-By0bbFhg.js.map} +1 -1
  186. package/dist/server/chunks/shared-server-Cha0Qlv9.js.map +1 -1
  187. package/dist/server/chunks/{state-UrPv9oOA.js → state-D4QqZ0FB.js} +3 -3
  188. package/dist/server/chunks/state-D4QqZ0FB.js.map +1 -0
  189. package/dist/server/index.js +368 -353
  190. package/dist/server/index.js.map +1 -1
  191. package/dist/server/manifest.js +55 -31
  192. package/dist/server/manifest.js.map +1 -1
  193. package/package.json +18 -16
  194. package/dist/client/_app/immutable/assets/0.RX2QRDI2.css +0 -1
  195. package/dist/client/_app/immutable/assets/0.RX2QRDI2.css.br +0 -0
  196. package/dist/client/_app/immutable/assets/0.RX2QRDI2.css.gz +0 -0
  197. package/dist/client/_app/immutable/chunks/B4w9-fYM2.js.br +0 -0
  198. package/dist/client/_app/immutable/chunks/B4w9-fYM2.js.gz +0 -0
  199. package/dist/client/_app/immutable/chunks/BS47D1Yd2.js.br +0 -0
  200. package/dist/client/_app/immutable/chunks/BS47D1Yd2.js.gz +0 -0
  201. package/dist/client/_app/immutable/chunks/BWDRzheF2.js.br +0 -0
  202. package/dist/client/_app/immutable/chunks/BWDRzheF2.js.gz +0 -0
  203. package/dist/client/_app/immutable/chunks/BZqFHUa32.js.br +0 -0
  204. package/dist/client/_app/immutable/chunks/BZqFHUa32.js.gz +0 -0
  205. package/dist/client/_app/immutable/chunks/Bk9DeFcz2.js.br +0 -0
  206. package/dist/client/_app/immutable/chunks/Bk9DeFcz2.js.gz +0 -0
  207. package/dist/client/_app/immutable/chunks/BlGyHMDZ.js.br +0 -0
  208. package/dist/client/_app/immutable/chunks/BlGyHMDZ.js.gz +0 -0
  209. package/dist/client/_app/immutable/chunks/BwWAgYKi2.js.br +0 -3
  210. package/dist/client/_app/immutable/chunks/BwWAgYKi2.js.gz +0 -0
  211. package/dist/client/_app/immutable/chunks/BzGBrbo22.js.br +0 -0
  212. package/dist/client/_app/immutable/chunks/BzGBrbo22.js.gz +0 -0
  213. package/dist/client/_app/immutable/chunks/C7bUlFLk2.js.br +0 -0
  214. package/dist/client/_app/immutable/chunks/C7bUlFLk2.js.gz +0 -0
  215. package/dist/client/_app/immutable/chunks/C83DJP9w2.js.br +0 -0
  216. package/dist/client/_app/immutable/chunks/C83DJP9w2.js.gz +0 -0
  217. package/dist/client/_app/immutable/chunks/CKei9xPI2.js.br +0 -0
  218. package/dist/client/_app/immutable/chunks/CKei9xPI2.js.gz +0 -0
  219. package/dist/client/_app/immutable/chunks/CjBgitB7.js.br +0 -0
  220. package/dist/client/_app/immutable/chunks/CjBgitB7.js.gz +0 -0
  221. package/dist/client/_app/immutable/chunks/CnhOha0Z2.js.br +0 -0
  222. package/dist/client/_app/immutable/chunks/CnhOha0Z2.js.gz +0 -0
  223. package/dist/client/_app/immutable/chunks/DFXoGGM32.js.br +0 -0
  224. package/dist/client/_app/immutable/chunks/DFXoGGM32.js.gz +0 -0
  225. package/dist/client/_app/immutable/chunks/DH-ThjiG2.js.br +0 -0
  226. package/dist/client/_app/immutable/chunks/DH-ThjiG2.js.gz +0 -0
  227. package/dist/client/_app/immutable/chunks/DHQLzCjY2.js.br +0 -0
  228. package/dist/client/_app/immutable/chunks/DHQLzCjY2.js.gz +0 -0
  229. package/dist/client/_app/immutable/chunks/DT8Ddh1L2.js.br +0 -0
  230. package/dist/client/_app/immutable/chunks/DT8Ddh1L2.js.gz +0 -0
  231. package/dist/client/_app/immutable/chunks/DVc-WzII.js.br +0 -0
  232. package/dist/client/_app/immutable/chunks/DVc-WzII.js.gz +0 -0
  233. package/dist/client/_app/immutable/chunks/Dc55oY-d.js +0 -6
  234. package/dist/client/_app/immutable/chunks/Dc55oY-d.js.br +0 -0
  235. package/dist/client/_app/immutable/chunks/Dc55oY-d.js.gz +0 -0
  236. package/dist/client/_app/immutable/chunks/DuDzfUqN2.js.br +0 -0
  237. package/dist/client/_app/immutable/chunks/DuDzfUqN2.js.gz +0 -0
  238. package/dist/client/_app/immutable/chunks/DvR7gEY0.js.br +0 -0
  239. package/dist/client/_app/immutable/chunks/DvR7gEY0.js.gz +0 -0
  240. package/dist/client/_app/immutable/chunks/DywQicCE.js +0 -1
  241. package/dist/client/_app/immutable/chunks/DywQicCE.js.br +0 -0
  242. package/dist/client/_app/immutable/chunks/DywQicCE.js.gz +0 -0
  243. package/dist/client/_app/immutable/chunks/Fu4roQAh.js.br +0 -0
  244. package/dist/client/_app/immutable/chunks/Fu4roQAh.js.gz +0 -0
  245. package/dist/client/_app/immutable/chunks/ZLGReh43.js +0 -3
  246. package/dist/client/_app/immutable/chunks/ZLGReh43.js.br +0 -0
  247. package/dist/client/_app/immutable/chunks/ZLGReh43.js.gz +0 -0
  248. package/dist/client/_app/immutable/chunks/iXxqXKVH.js.br +0 -0
  249. package/dist/client/_app/immutable/chunks/iXxqXKVH.js.gz +0 -0
  250. package/dist/client/_app/immutable/chunks/mRVEsFly2.js.br +0 -0
  251. package/dist/client/_app/immutable/chunks/mRVEsFly2.js.gz +0 -0
  252. package/dist/client/_app/immutable/chunks/orCHVlgT.js.br +0 -0
  253. package/dist/client/_app/immutable/chunks/orCHVlgT.js.gz +0 -0
  254. package/dist/client/_app/immutable/chunks/uo5fvlDn2.js.br +0 -0
  255. package/dist/client/_app/immutable/chunks/uo5fvlDn2.js.gz +0 -0
  256. package/dist/client/_app/immutable/entry/app.ClajJkjE.js.br +0 -0
  257. package/dist/client/_app/immutable/entry/app.ClajJkjE.js.gz +0 -0
  258. package/dist/client/_app/immutable/entry/start.C8gl6i9j.js +0 -1
  259. package/dist/client/_app/immutable/entry/start.C8gl6i9j.js.br +0 -1
  260. package/dist/client/_app/immutable/entry/start.C8gl6i9j.js.gz +0 -0
  261. package/dist/client/_app/immutable/nodes/0.Z6tE7NXD.js.br +0 -0
  262. package/dist/client/_app/immutable/nodes/0.Z6tE7NXD.js.gz +0 -0
  263. package/dist/client/_app/immutable/nodes/1.D-llQKCG.js.br +0 -2
  264. package/dist/client/_app/immutable/nodes/1.D-llQKCG.js.gz +0 -0
  265. package/dist/client/_app/immutable/nodes/10.DiWMEh1J.js +0 -6
  266. package/dist/client/_app/immutable/nodes/10.DiWMEh1J.js.br +0 -0
  267. package/dist/client/_app/immutable/nodes/10.DiWMEh1J.js.gz +0 -0
  268. package/dist/client/_app/immutable/nodes/2.Dc2Wqxh2.js +0 -1
  269. package/dist/client/_app/immutable/nodes/2.Dc2Wqxh2.js.br +0 -0
  270. package/dist/client/_app/immutable/nodes/2.Dc2Wqxh2.js.gz +0 -0
  271. package/dist/client/_app/immutable/nodes/9.DJls5DBF.js.br +0 -0
  272. package/dist/client/_app/immutable/nodes/9.DJls5DBF.js.gz +0 -0
  273. package/dist/server/chunks/10-B9fUldfW.js +0 -22
  274. package/dist/server/chunks/10-B9fUldfW.js.map +0 -1
  275. package/dist/server/chunks/3-CtfjP4uZ.js.map +0 -1
  276. package/dist/server/chunks/5-610NKQc3.js.map +0 -1
  277. package/dist/server/chunks/6-Dl_h_OyU.js +0 -98
  278. package/dist/server/chunks/6-Dl_h_OyU.js.map +0 -1
  279. package/dist/server/chunks/9-glLEYI96.js +0 -22
  280. package/dist/server/chunks/9-glLEYI96.js.map +0 -1
  281. package/dist/server/chunks/_layout.svelte-uX7XiB9K.js.map +0 -1
  282. package/dist/server/chunks/_page.svelte-C5uhadJX.js.map +0 -1
  283. package/dist/server/chunks/_page.svelte-DXg7rMv4.js.map +0 -1
  284. package/dist/server/chunks/_server.ts-DlC2sxcm.js.map +0 -1
  285. package/dist/server/chunks/client-C2VsBptx.js.map +0 -1
  286. package/dist/server/chunks/error-DWpaxupR.js.map +0 -1
  287. package/dist/server/chunks/error.svelte-BsMzCBZ0.js.map +0 -1
  288. package/dist/server/chunks/events-Bhh2w-5S.js.map +0 -1
  289. package/dist/server/chunks/hooks.server-DvBkCPa4.js.map +0 -1
  290. package/dist/server/chunks/internal2-BH90KZDG.js.map +0 -1
  291. package/dist/server/chunks/loader-circle-CFNm9vip.js.map +0 -1
  292. package/dist/server/chunks/logo-BZr09Nc5.js.map +0 -1
  293. package/dist/server/chunks/project-loader-CgAv5fFI.js.map +0 -1
  294. package/dist/server/chunks/request-handler-guINVc1G.js.map +0 -1
  295. package/dist/server/chunks/runtime-CDHWD9vo.js.map +0 -1
  296. package/dist/server/chunks/schemas-CAs9LqPk.js.map +0 -1
  297. package/dist/server/chunks/state-UrPv9oOA.js.map +0 -1
  298. /package/dist/client/_app/immutable/assets/{10.BP_hUVIU.css → 3.BP_hUVIU.css} +0 -0
  299. /package/dist/client/_app/immutable/assets/{10.BP_hUVIU.css.br → 3.BP_hUVIU.css.br} +0 -0
  300. /package/dist/client/_app/immutable/assets/{10.BP_hUVIU.css.gz → 3.BP_hUVIU.css.gz} +0 -0
  301. /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js → CVaqCwHa2.js} +0 -0
  302. /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js.br → CVaqCwHa2.js.br} +0 -0
  303. /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js.gz → CVaqCwHa2.js.gz} +0 -0
  304. /package/dist/client/_app/immutable/chunks/{De2hgUGE.js → De2hgUGE2.js} +0 -0
  305. /package/dist/client/_app/immutable/chunks/{De2hgUGE.js.br → De2hgUGE2.js.br} +0 -0
  306. /package/dist/client/_app/immutable/chunks/{De2hgUGE.js.gz → De2hgUGE2.js.gz} +0 -0
  307. /package/dist/server/chunks/{chunk-D7D4PA-g.js → rolldown-runtime-D7D4PA-g.js} +0 -0
@@ -1,10 +1,10 @@
1
- import { Ct as clsx, D as ensure_array_like, M as get$1$1, N as getAllContexts, P as getContext, R as hasContext, St as writable, X as mount, a as ATTACHMENT_KEY, ct as setContext, dt as spread_props, g as bind_props, gt as tick, h as attributes, k as escape_html, ot as run, r as on, tt as props_id, w as derived, y as clsx$1, yt as unmount } from "./events-Bhh2w-5S.js";
2
- import { G as noop$1, J as parse } from "./internal2-BH90KZDG.js";
1
+ import { B as mount, C as escape_html, D as getAllContexts, K as props_id, M as hasContext, O as getContext, Q as run, S as ensure_array_like, T as get$2, U as on, ct as unmount, d as bind_props, dt as clsx, et as setContext, m as clsx$1, ot as tick, rt as spread_props, t as ATTACHMENT_KEY, u as attributes, ut as writable, y as derived } from "./index-server-BthNUqCR.js";
2
+ import { G as noop$1, J as parse } from "./internal2-DhEJvRRa.js";
3
3
  import { t as app } from "./app-DUeJj5RD.js";
4
4
  import { n as SESSION_PROJECT_HEADER, t as Exception } from "./const-Dy5RfQqP.js";
5
5
  import { r as formatFrom, t as HttpClient } from "./format-DGOlJxF5.js";
6
- import { a as resolve, i as invalidateAll, n as applyAction, r as goto } from "./client-C2VsBptx.js";
7
- import { A as resolveQueryBoolean, I as timeUntilStale, L as timeoutManager, N as shallowEqualObjects, O as pendingThenable, R as toast, T as notifyManager, _ as getIsRestoringContext, c as SvelteMap, f as createSubscriber, h as focusManager, j as resolveStaleTime, k as replaceData, l as SvelteSet, m as fetchState, n as Loader_circle, p as environmentManager, s as Subscribable, t as Icon, v as getQueryClientContext, w as noop$2, x as isValidTimeout } from "./loader-circle-CFNm9vip.js";
6
+ import { a as resolve, i as invalidateAll, n as applyAction, r as goto } from "./client-DBcQyXdV.js";
7
+ import { A as resolveQueryBoolean, I as timeUntilStale, L as timeoutManager, N as shallowEqualObjects, O as pendingThenable, R as toast, T as notifyManager, _ as getIsRestoringContext, c as SvelteMap, f as createSubscriber, h as focusManager, j as resolveStaleTime, k as replaceData, l as SvelteSet, m as fetchState, n as Loader_circle, p as environmentManager, s as Subscribable, t as Icon, v as getQueryClientContext, w as noop$2, x as isValidTimeout } from "./loader-circle-C4T0os4K.js";
8
8
  //#region node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
9
9
  /**
10
10
  * Concatenates two arrays faster than the array spread operator.
@@ -3420,7 +3420,7 @@ const mergeArrayProperties = (baseObject, mergeObject, key) => {
3420
3420
  const extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === "function" ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
3421
3421
  const twMerge = /*#__PURE__*/ createTailwindMerge(getDefaultConfig);
3422
3422
  //#endregion
3423
- //#region node_modules/.pnpm/tailwind-variants@3.2.2_tailwind-merge@3.6.0_tailwindcss@4.3.0/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js
3423
+ //#region node_modules/.pnpm/tailwind-variants@3.2.2_tailwind-merge@3.6.0_tailwindcss@4.3.1/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js
3424
3424
  var SPACE_REGEX = /\s+/g;
3425
3425
  var removeExtraSpaces = (str) => {
3426
3426
  if (typeof str !== "string" || !str) return str;
@@ -3508,7 +3508,7 @@ var mergeObjects = (obj1, obj2) => {
3508
3508
  return result;
3509
3509
  };
3510
3510
  //#endregion
3511
- //#region node_modules/.pnpm/tailwind-variants@3.2.2_tailwind-merge@3.6.0_tailwindcss@4.3.0/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js
3511
+ //#region node_modules/.pnpm/tailwind-variants@3.2.2_tailwind-merge@3.6.0_tailwindcss@4.3.1/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js
3512
3512
  var defaultConfig = {
3513
3513
  twMerge: true,
3514
3514
  twMergeConfig: {}
@@ -3721,7 +3721,7 @@ var getTailwindVariants = (cn) => {
3721
3721
  };
3722
3722
  };
3723
3723
  //#endregion
3724
- //#region node_modules/.pnpm/tailwind-variants@3.2.2_tailwind-merge@3.6.0_tailwindcss@4.3.0/node_modules/tailwind-variants/dist/index.js
3724
+ //#region node_modules/.pnpm/tailwind-variants@3.2.2_tailwind-merge@3.6.0_tailwindcss@4.3.1/node_modules/tailwind-variants/dist/index.js
3725
3725
  var createTwMerge = (cachedTwMergeConfig) => {
3726
3726
  return isEmptyObject(cachedTwMergeConfig) ? twMerge : extendTailwindMerge({
3727
3727
  ...cachedTwMergeConfig,
@@ -4584,6 +4584,11 @@ var BaseRepository = class {
4584
4584
  return formData;
4585
4585
  }
4586
4586
  };
4587
+ var ProjectArchiveRepository = class extends BaseRepository {
4588
+ create() {
4589
+ return this.run(`/actions/project/archive?/create`);
4590
+ }
4591
+ };
4587
4592
  var ProjectFsRepository = class extends BaseRepository {
4588
4593
  readdir(input) {
4589
4594
  return this.run(`/actions/project/fs?/readdir`, input);
@@ -4601,30 +4606,27 @@ var ProjectLoaderRepository = class extends BaseRepository {
4601
4606
  }
4602
4607
  };
4603
4608
  var ProjectPackageRepository = class extends BaseRepository {
4604
- addComponents(input) {
4605
- return this.run(`/actions/project/package?/add-components`, input);
4606
- }
4607
- addSystems(input) {
4608
- return this.run(`/actions/project/package?/add-systems`, input);
4609
- }
4610
4609
  createComponent(input) {
4611
4610
  return this.run(`/actions/project/package?/create-component`, input);
4612
4611
  }
4613
4612
  createSystem(input) {
4614
4613
  return this.run(`/actions/project/package?/create-system`, input);
4615
4614
  }
4616
- getComponentsManifests(input) {
4617
- return this.run(`/actions/project/package?/get-components-manifests`, input);
4618
- }
4619
- getSystemsManifests(input) {
4620
- return this.run(`/actions/project/package?/get-systems-manifests`, input);
4621
- }
4622
4615
  getComponents() {
4623
4616
  return this.run(`/actions/project/package?/get-components`);
4624
4617
  }
4625
4618
  getSystems() {
4626
4619
  return this.run(`/actions/project/package?/get-systems`);
4627
4620
  }
4621
+ getAssets() {
4622
+ return this.run(`/actions/project/package?/get-assets`);
4623
+ }
4624
+ installPackages(input) {
4625
+ return this.run(`/actions/project/package?/install-packages`, input);
4626
+ }
4627
+ searchPackages(input) {
4628
+ return this.run(`/actions/project/package?/search-packages`, input);
4629
+ }
4628
4630
  };
4629
4631
  var ProjectRepository = class extends BaseRepository {
4630
4632
  load(input) {
@@ -4645,6 +4647,9 @@ var ProjectRepository = class extends BaseRepository {
4645
4647
  getGatewayProjects() {
4646
4648
  return this.run(`/actions/project?/get-gateway-projects`);
4647
4649
  }
4650
+ syncGatewayProject() {
4651
+ return this.run(`/actions/project?/sync-gateway-project`);
4652
+ }
4648
4653
  };
4649
4654
  var ProjectSaveRepository = class extends BaseRepository {
4650
4655
  get() {
@@ -4657,6 +4662,7 @@ var ProjectSaveRepository = class extends BaseRepository {
4657
4662
  var getActionClient = (projectId) => {
4658
4663
  const client = new HttpClient("", projectId ? { headers: { [SESSION_PROJECT_HEADER]: projectId } } : {});
4659
4664
  return {
4665
+ archive: new ProjectArchiveRepository(client),
4660
4666
  fs: new ProjectFsRepository(client),
4661
4667
  loader: new ProjectLoaderRepository(client),
4662
4668
  package: new ProjectPackageRepository(client),
@@ -4678,6 +4684,11 @@ var systemTransformer = (system) => ({
4678
4684
  path: system.save.path
4679
4685
  });
4680
4686
  var systemsTransformer = (systems) => systems.map(systemTransformer);
4687
+ var assetTransformer = (asset) => ({
4688
+ id: asset.path,
4689
+ path: asset.path
4690
+ });
4691
+ var assetsTransformer = (assets) => assets.map(assetTransformer);
4681
4692
  var libraryTransformer = (lib) => ({
4682
4693
  id: lib.path,
4683
4694
  name: lib.name
@@ -4707,7 +4718,7 @@ var randomString = (nb, { numbers = true, lowers = true, uppers = false, special
4707
4718
  return [...Array(nb)].map(() => chars[Math.floor(Math.random() * chars.length)]).join("");
4708
4719
  };
4709
4720
  var resetSubscriptions = (store) => {
4710
- const subscriptions = get$1$1(store);
4721
+ const subscriptions = get$2(store);
4711
4722
  Object.values(subscriptions).forEach((sub) => {
4712
4723
  try {
4713
4724
  sub?.();
@@ -4716,7 +4727,7 @@ var resetSubscriptions = (store) => {
4716
4727
  store.set({});
4717
4728
  };
4718
4729
  var resetListeners = (store) => {
4719
- get$1$1(store)?.forEach((sub) => {
4730
+ get$2(store)?.forEach((sub) => {
4720
4731
  try {
4721
4732
  sub();
4722
4733
  } catch {}
@@ -4724,7 +4735,7 @@ var resetListeners = (store) => {
4724
4735
  store.set(null);
4725
4736
  };
4726
4737
  var resolveStore = (storage, resolvable, defaultValue) => {
4727
- const content = get$1$1(storage);
4738
+ const content = get$2(storage);
4728
4739
  if (resolvable in content) return content[resolvable];
4729
4740
  content[resolvable] = writable(defaultValue);
4730
4741
  storage.set(content);
@@ -4736,6 +4747,114 @@ var getId = (data, name) => {
4736
4747
  while (data.find((d) => d.id === id)) id = `${baseId}_${randomString(5)}`;
4737
4748
  return id;
4738
4749
  };
4750
+ var _storage$15 = writable({});
4751
+ var AssetHandle = class {
4752
+ _manager;
4753
+ _store;
4754
+ id;
4755
+ static reset() {
4756
+ _storage$15.set({});
4757
+ }
4758
+ constructor(manager, asset) {
4759
+ this._manager = manager;
4760
+ this.id = asset.id;
4761
+ this._store = resolveStore(_storage$15, this.id, asset);
4762
+ }
4763
+ get store() {
4764
+ return this._store;
4765
+ }
4766
+ get data() {
4767
+ return get$2(this._store);
4768
+ }
4769
+ update(asset) {
4770
+ this._store.set({
4771
+ ...get$2(this._store),
4772
+ ...asset
4773
+ });
4774
+ }
4775
+ delete() {
4776
+ return this._manager.delete(this.id);
4777
+ }
4778
+ };
4779
+ var _storage$14 = writable([]);
4780
+ var _subscriptions$7 = writable({});
4781
+ var AssetManager = class {
4782
+ static reset() {
4783
+ _storage$14.set([]);
4784
+ resetSubscriptions(_subscriptions$7);
4785
+ }
4786
+ constructor(assets) {
4787
+ _storage$14.set(assets);
4788
+ }
4789
+ get store() {
4790
+ return _storage$14;
4791
+ }
4792
+ get data() {
4793
+ return get$2(_storage$14);
4794
+ }
4795
+ async createMany(files) {
4796
+ const { fs } = useProject();
4797
+ await Promise.all(files.map(this.create.bind(this)));
4798
+ await this.sync();
4799
+ await (await fs.getDirectory()).readdir(true);
4800
+ }
4801
+ async create(file) {
4802
+ const { fs } = useProject();
4803
+ const assetFile = await (await fs.getDirectory("assets")).getFile(file.name);
4804
+ const stream = await assetFile.createWritable();
4805
+ await file.stream().pipeTo(stream);
4806
+ await assetFile.sync();
4807
+ }
4808
+ add(asset) {
4809
+ this._add(assetTransformer(asset));
4810
+ }
4811
+ async sync() {
4812
+ const { actions } = useProject();
4813
+ const assets = await actions.package.getAssets();
4814
+ _storage$14.set(assetsTransformer(assets));
4815
+ }
4816
+ get(id) {
4817
+ const asset = get$2(_storage$14).find((asset) => asset.id === id);
4818
+ if (!asset) throw new Error(`Asset with id ${id} not found`);
4819
+ const handle = new AssetHandle(this, asset);
4820
+ this._subscribe(id, handle);
4821
+ return handle;
4822
+ }
4823
+ async delete(id) {
4824
+ const assets = get$2(_storage$14);
4825
+ const asset = assets.find((c) => c.id === id);
4826
+ if (!asset) throw new Error(`System not found: ${id}`);
4827
+ _storage$14.set(assets.filter((c) => c.id !== id));
4828
+ const { fs } = useProject();
4829
+ await (await fs.getFile(asset.path)).delete();
4830
+ const subscriptions = get$2(_subscriptions$7);
4831
+ if (subscriptions[id]) {
4832
+ subscriptions[id]();
4833
+ subscriptions[id] = null;
4834
+ _subscriptions$7.set(subscriptions);
4835
+ }
4836
+ }
4837
+ _add(asset) {
4838
+ const assets = get$2(_storage$14);
4839
+ assets.push(asset);
4840
+ _storage$14.set(assets);
4841
+ }
4842
+ _subscribe(id, handle) {
4843
+ setTimeout(() => {
4844
+ const subscriptions = get$2(_subscriptions$7);
4845
+ if (subscriptions[id]) return;
4846
+ subscriptions[id] = handle.store.subscribe((asset) => this._update(id, asset));
4847
+ _subscriptions$7.set(subscriptions);
4848
+ }, 0);
4849
+ }
4850
+ _update(id, asset) {
4851
+ const assets = get$2(_storage$14);
4852
+ const index = assets.findIndex((s) => s.id === id);
4853
+ if (index === -1) return;
4854
+ assets[index] = asset;
4855
+ _storage$14.set(assets);
4856
+ }
4857
+ };
4739
4858
  var _storage$13 = writable({});
4740
4859
  var ComponentHandle = class {
4741
4860
  _manager;
@@ -4753,16 +4872,16 @@ var ComponentHandle = class {
4753
4872
  return this._store;
4754
4873
  }
4755
4874
  get data() {
4756
- return get$1$1(this._store);
4875
+ return get$2(this._store);
4757
4876
  }
4758
4877
  update(component) {
4759
4878
  this._store.set({
4760
- ...get$1$1(this._store),
4879
+ ...get$2(this._store),
4761
4880
  ...component
4762
4881
  });
4763
4882
  }
4764
4883
  delete() {
4765
- this._manager.delete(this.id);
4884
+ return this._manager.delete(this.id);
4766
4885
  }
4767
4886
  };
4768
4887
  var _storage$12 = writable([]);
@@ -4779,7 +4898,7 @@ var ComponentManager = class {
4779
4898
  return _storage$12;
4780
4899
  }
4781
4900
  get data() {
4782
- return get$1$1(_storage$12);
4901
+ return get$2(_storage$12);
4783
4902
  }
4784
4903
  async create(name) {
4785
4904
  const { actions, fs } = useProject();
@@ -4787,12 +4906,8 @@ var ComponentManager = class {
4787
4906
  this._add(componentTransformer(component));
4788
4907
  await (await fs.getDirectory()).readdir(true);
4789
4908
  }
4790
- async import(names) {
4791
- const { actions, ecs, fs } = useProject();
4792
- await actions.package.addComponents({ componentNames: names });
4793
- await this.sync();
4794
- await ecs.components.sync();
4795
- await (await fs.getDirectory()).readdir(true);
4909
+ add(component) {
4910
+ this._add(componentTransformer(component));
4796
4911
  }
4797
4912
  async sync() {
4798
4913
  const { actions } = useProject();
@@ -4800,16 +4915,20 @@ var ComponentManager = class {
4800
4915
  _storage$12.set(componentsTransformer(components));
4801
4916
  }
4802
4917
  get(id) {
4803
- const component = get$1$1(_storage$12).find((component) => component.id === id);
4918
+ const component = get$2(_storage$12).find((component) => component.id === id);
4804
4919
  if (!component) throw new Error(`Component with id ${id} not found`);
4805
4920
  const handle = new ComponentHandle(this, component);
4806
4921
  this._subscribe(id, handle);
4807
4922
  return handle;
4808
4923
  }
4809
- delete(id) {
4810
- const components = get$1$1(_storage$12);
4811
- _storage$12.set(components.filter((component) => component.id !== id));
4812
- const subscriptions = get$1$1(_subscriptions$6);
4924
+ async delete(id) {
4925
+ const components = get$2(_storage$12);
4926
+ const component = components.find((c) => c.id === id);
4927
+ if (!component) throw new Error(`System not found: ${id}`);
4928
+ _storage$12.set(components.filter((c) => c.id !== id));
4929
+ const { fs } = useProject();
4930
+ await (await fs.getFile(component.path)).delete();
4931
+ const subscriptions = get$2(_subscriptions$6);
4813
4932
  if (subscriptions[id]) {
4814
4933
  subscriptions[id]();
4815
4934
  subscriptions[id] = null;
@@ -4817,20 +4936,20 @@ var ComponentManager = class {
4817
4936
  }
4818
4937
  }
4819
4938
  _add(component) {
4820
- const components = get$1$1(_storage$12);
4939
+ const components = get$2(_storage$12);
4821
4940
  components.push(component);
4822
4941
  _storage$12.set(components);
4823
4942
  }
4824
4943
  _subscribe(id, handle) {
4825
4944
  setTimeout(() => {
4826
- const subscriptions = get$1$1(_subscriptions$6);
4945
+ const subscriptions = get$2(_subscriptions$6);
4827
4946
  if (subscriptions[id]) return;
4828
4947
  subscriptions[id] = handle.store.subscribe((component) => this._update(id, component));
4829
4948
  _subscriptions$6.set(subscriptions);
4830
4949
  }, 0);
4831
4950
  }
4832
4951
  _update(id, component) {
4833
- const components = get$1$1(_storage$12);
4952
+ const components = get$2(_storage$12);
4834
4953
  const index = components.findIndex((s) => s.id === id);
4835
4954
  if (index === -1) return;
4836
4955
  components[index] = component;
@@ -4854,11 +4973,11 @@ var LibraryHandle = class {
4854
4973
  return this._store;
4855
4974
  }
4856
4975
  get data() {
4857
- return get$1$1(this._store);
4976
+ return get$2(this._store);
4858
4977
  }
4859
4978
  update(library) {
4860
4979
  this._store.set({
4861
- ...get$1$1(this._store),
4980
+ ...get$2(this._store),
4862
4981
  ...library
4863
4982
  });
4864
4983
  }
@@ -4880,10 +4999,10 @@ var LibraryManager = class {
4880
4999
  return _storage$10;
4881
5000
  }
4882
5001
  get data() {
4883
- return get$1$1(_storage$10);
5002
+ return get$2(_storage$10);
4884
5003
  }
4885
5004
  add(library) {
4886
- const libraries = get$1$1(_storage$10);
5005
+ const libraries = get$2(_storage$10);
4887
5006
  libraries.push({
4888
5007
  ...library,
4889
5008
  id: library.name
@@ -4892,16 +5011,16 @@ var LibraryManager = class {
4892
5011
  return library.name;
4893
5012
  }
4894
5013
  get(id) {
4895
- const library = get$1$1(_storage$10).find((library) => library.id === id);
5014
+ const library = get$2(_storage$10).find((library) => library.id === id);
4896
5015
  if (!library) throw new Error(`Library with id ${id} not found`);
4897
5016
  const handle = new LibraryHandle(this, library);
4898
5017
  this._subscribe(id, handle);
4899
5018
  return handle;
4900
5019
  }
4901
5020
  delete(id) {
4902
- const libraries = get$1$1(_storage$10);
5021
+ const libraries = get$2(_storage$10);
4903
5022
  _storage$10.set(libraries.filter((library) => library.id !== id));
4904
- const subscriptions = get$1$1(_subscriptions$5);
5023
+ const subscriptions = get$2(_subscriptions$5);
4905
5024
  if (subscriptions[id]) {
4906
5025
  subscriptions[id]();
4907
5026
  subscriptions[id] = null;
@@ -4910,14 +5029,14 @@ var LibraryManager = class {
4910
5029
  }
4911
5030
  _subscribe(id, handle) {
4912
5031
  setTimeout(() => {
4913
- const subscriptions = get$1$1(_subscriptions$5);
5032
+ const subscriptions = get$2(_subscriptions$5);
4914
5033
  if (subscriptions[id]) return;
4915
5034
  subscriptions[id] = handle.store.subscribe((library) => this._update(id, library));
4916
5035
  _subscriptions$5.set(subscriptions);
4917
5036
  }, 0);
4918
5037
  }
4919
5038
  _update(id, library) {
4920
- const libraries = get$1$1(_storage$10);
5039
+ const libraries = get$2(_storage$10);
4921
5040
  const index = libraries.findIndex((s) => s.id === id);
4922
5041
  if (index === -1) return;
4923
5042
  libraries[index] = library;
@@ -4955,7 +5074,7 @@ var ComponentParamHandle = class {
4955
5074
  this.manager.delete(this.id);
4956
5075
  }
4957
5076
  _listen() {
4958
- if (get$1$1(_listener$5)) return;
5077
+ if (get$2(_listener$5)) return;
4959
5078
  const unsub = this.manager.component.store.subscribe((component) => {
4960
5079
  const newParam = component.params.find((param) => param.name === this.id);
4961
5080
  if (!newParam) return;
@@ -4982,7 +5101,7 @@ var ComponentParamManager = class {
4982
5101
  constructor(component, params) {
4983
5102
  this.component = component;
4984
5103
  this._storageResolvable = `${this.component.manager.entity.manager.scene.id}/${this.component.manager.entity.id}/${this.component.id}`;
4985
- this._store = resolveStore(_storage$8, this._storageResolvable, get$1$1(component.store).params);
5104
+ this._store = resolveStore(_storage$8, this._storageResolvable, get$2(component.store).params);
4986
5105
  this._valuesStore = resolveStore(_valueStorage, this._storageResolvable, params);
4987
5106
  this._listen();
4988
5107
  }
@@ -4993,21 +5112,21 @@ var ComponentParamManager = class {
4993
5112
  return this._valuesStore;
4994
5113
  }
4995
5114
  get(id) {
4996
- const param = get$1$1(this._store).find((param) => param.name === id);
5115
+ const param = get$2(this._store).find((param) => param.name === id);
4997
5116
  if (!param) throw new Error(`Param with id ${id} not found`);
4998
- const value = get$1$1(this._valuesStore)[id];
5117
+ const value = get$2(this._valuesStore)[id];
4999
5118
  const handle = new ComponentParamHandle(this, param, value);
5000
5119
  this._subscribe(id, handle);
5001
5120
  return handle;
5002
5121
  }
5003
5122
  delete(id) {
5004
- const params = get$1$1(this._store);
5123
+ const params = get$2(this._store);
5005
5124
  this._store.set(params.map((param) => param.name === id ? {
5006
5125
  ...param,
5007
5126
  value: void 0
5008
5127
  } : param));
5009
5128
  const fullId = `${this._storageResolvable}/${id}`;
5010
- const subscriptions = get$1$1(_subscriptions$4);
5129
+ const subscriptions = get$2(_subscriptions$4);
5011
5130
  if (subscriptions[fullId]) {
5012
5131
  subscriptions[fullId]();
5013
5132
  subscriptions[fullId] = null;
@@ -5015,7 +5134,7 @@ var ComponentParamManager = class {
5015
5134
  }
5016
5135
  }
5017
5136
  _listen() {
5018
- if (get$1$1(_listener$4)) return;
5137
+ if (get$2(_listener$4)) return;
5019
5138
  const unsub = this.component.store.subscribe((component) => {
5020
5139
  this._store.set(component.params);
5021
5140
  });
@@ -5024,14 +5143,14 @@ var ComponentParamManager = class {
5024
5143
  _subscribe(id, handle) {
5025
5144
  setTimeout(() => {
5026
5145
  const fullId = `${this._storageResolvable}/${id}`;
5027
- const subscriptions = get$1$1(_subscriptions$4);
5146
+ const subscriptions = get$2(_subscriptions$4);
5028
5147
  if (subscriptions[fullId]) return;
5029
5148
  subscriptions[fullId] = handle.value.subscribe((param) => this._update(id, param));
5030
5149
  _subscriptions$4.set(subscriptions);
5031
5150
  }, 0);
5032
5151
  }
5033
5152
  _update(id, value) {
5034
- const params = get$1$1(this._valuesStore);
5153
+ const params = get$2(this._valuesStore);
5035
5154
  params[id] = value;
5036
5155
  this._valuesStore.set(params);
5037
5156
  }
@@ -5051,7 +5170,7 @@ var EntityComponentHandle = class {
5051
5170
  return this._store;
5052
5171
  }
5053
5172
  get data() {
5054
- return get$1$1(this._store);
5173
+ return get$2(this._store);
5055
5174
  }
5056
5175
  get params() {
5057
5176
  return this._params;
@@ -5082,30 +5201,30 @@ var EntityComponentManager = class {
5082
5201
  return this._store;
5083
5202
  }
5084
5203
  get data() {
5085
- return get$1$1(this._store);
5204
+ return get$2(this._store);
5086
5205
  }
5087
5206
  add(component) {
5088
- const components = get$1$1(this._store);
5207
+ const components = get$2(this._store);
5089
5208
  const manifest = this.entity.manager.scene.manager.ecs.components.get(component).data;
5090
5209
  components[component] = { ...Object.fromEntries(manifest.params.filter((param) => param.default).map((param) => [param.name, param.default])) };
5091
5210
  this._store.set(components);
5092
5211
  }
5093
5212
  get(id) {
5094
- const params = get$1$1(this._store)[id];
5213
+ const params = get$2(this._store)[id];
5095
5214
  if (!params) throw new Error(`Component with id ${id} not found`);
5096
5215
  const handle = new EntityComponentHandle(this, id, params);
5097
5216
  this._subscribe(id, handle);
5098
5217
  return handle;
5099
5218
  }
5100
5219
  delete(id) {
5101
- const components = get$1$1(this._store);
5220
+ const components = get$2(this._store);
5102
5221
  const newComponents = {};
5103
5222
  Object.entries(components).forEach(([key, params]) => {
5104
5223
  if (key !== id) newComponents[key] = params;
5105
5224
  });
5106
5225
  this._store.set(newComponents);
5107
5226
  const fullId = `${this._storageResolvable}/${id}`;
5108
- const subscriptions = get$1$1(_subscriptions$3);
5227
+ const subscriptions = get$2(_subscriptions$3);
5109
5228
  if (subscriptions[fullId]) {
5110
5229
  subscriptions[fullId]();
5111
5230
  subscriptions[fullId] = null;
@@ -5113,9 +5232,9 @@ var EntityComponentManager = class {
5113
5232
  }
5114
5233
  }
5115
5234
  _listen() {
5116
- if (get$1$1(_listener$3)) return;
5235
+ if (get$2(_listener$3)) return;
5117
5236
  const unsub = this.entity.manager.scene.manager.ecs.components.store.subscribe((components) => {
5118
- const entityComponents = get$1$1(this._store);
5237
+ const entityComponents = get$2(this._store);
5119
5238
  const newComponents = {};
5120
5239
  Object.entries(entityComponents).forEach(([key, params]) => {
5121
5240
  if (components.find((s) => s.id === key)) newComponents[key] = params;
@@ -5127,14 +5246,14 @@ var EntityComponentManager = class {
5127
5246
  _subscribe(id, handle) {
5128
5247
  setTimeout(() => {
5129
5248
  const fullId = `${this._storageResolvable}/${id}`;
5130
- const subscriptions = get$1$1(_subscriptions$3);
5249
+ const subscriptions = get$2(_subscriptions$3);
5131
5250
  if (subscriptions[fullId]) return;
5132
5251
  subscriptions[fullId] = handle.params.values.subscribe((params) => this._update(id, params));
5133
5252
  _subscriptions$3.set(subscriptions);
5134
5253
  }, 0);
5135
5254
  }
5136
5255
  _update(id, params) {
5137
- const component = get$1$1(this._store);
5256
+ const component = get$2(this._store);
5138
5257
  component[id] = params;
5139
5258
  this._store.set(component);
5140
5259
  }
@@ -5161,14 +5280,14 @@ var SceneEntityHandle = class {
5161
5280
  return this._store;
5162
5281
  }
5163
5282
  get data() {
5164
- return get$1$1(this._store);
5283
+ return get$2(this._store);
5165
5284
  }
5166
5285
  get components() {
5167
5286
  return this._components;
5168
5287
  }
5169
5288
  update(entity) {
5170
5289
  this._store.set({
5171
- ...get$1$1(this._store),
5290
+ ...get$2(this._store),
5172
5291
  ...entity
5173
5292
  });
5174
5293
  }
@@ -5179,9 +5298,9 @@ var SceneEntityHandle = class {
5179
5298
  this.manager.selected = this;
5180
5299
  }
5181
5300
  _listen() {
5182
- if (get$1$1(_listener$2)) return;
5301
+ if (get$2(_listener$2)) return;
5183
5302
  const unsub = this._components.store.subscribe((components) => {
5184
- const entity = get$1$1(this._store);
5303
+ const entity = get$2(this._store);
5185
5304
  entity.components = components;
5186
5305
  this._store.set(entity);
5187
5306
  });
@@ -5206,10 +5325,10 @@ var SceneEntityManager = class {
5206
5325
  return this._store;
5207
5326
  }
5208
5327
  get data() {
5209
- return get$1$1(this._store);
5328
+ return get$2(this._store);
5210
5329
  }
5211
5330
  get selectedData() {
5212
- return get$1$1(selectedEntity);
5331
+ return get$2(selectedEntity);
5213
5332
  }
5214
5333
  get selected() {
5215
5334
  return selectedEntity;
@@ -5218,7 +5337,7 @@ var SceneEntityManager = class {
5218
5337
  selectedEntity.set(entity);
5219
5338
  }
5220
5339
  add(entity) {
5221
- const entities = get$1$1(this._store);
5340
+ const entities = get$2(this._store);
5222
5341
  const id = getId(this.data, entity.name);
5223
5342
  entities.push({
5224
5343
  ...entity,
@@ -5228,17 +5347,17 @@ var SceneEntityManager = class {
5228
5347
  return id;
5229
5348
  }
5230
5349
  get(id) {
5231
- const entity = get$1$1(this._store).find((entity) => entity.id === id);
5350
+ const entity = get$2(this._store).find((entity) => entity.id === id);
5232
5351
  if (!entity) throw new Error(`Entity with id ${id} not found`);
5233
5352
  const handle = new SceneEntityHandle(this, entity);
5234
5353
  this._subscribe(id, handle);
5235
5354
  return handle;
5236
5355
  }
5237
5356
  delete(id) {
5238
- const entities = get$1$1(this._store);
5357
+ const entities = get$2(this._store);
5239
5358
  this._store.set(entities.filter((entity) => entity.id !== id));
5240
5359
  const fullId = `${this.scene.id}/${id}`;
5241
- const subscriptions = get$1$1(_subscriptions$2);
5360
+ const subscriptions = get$2(_subscriptions$2);
5242
5361
  if (subscriptions[fullId]) {
5243
5362
  subscriptions[fullId]();
5244
5363
  subscriptions[fullId] = null;
@@ -5249,14 +5368,14 @@ var SceneEntityManager = class {
5249
5368
  _subscribe(id, handle) {
5250
5369
  setTimeout(() => {
5251
5370
  const fullId = `${this.scene.id}/${id}`;
5252
- const subscriptions = get$1$1(_subscriptions$2);
5371
+ const subscriptions = get$2(_subscriptions$2);
5253
5372
  if (subscriptions[fullId]) return;
5254
5373
  subscriptions[fullId] = handle.store.subscribe((entity) => this._update(id, entity));
5255
5374
  _subscriptions$2.set(subscriptions);
5256
5375
  }, 0);
5257
5376
  }
5258
5377
  _update(id, entity) {
5259
- const entities = get$1$1(this._store);
5378
+ const entities = get$2(this._store);
5260
5379
  const index = entities.findIndex((s) => s.id === id);
5261
5380
  if (index === -1) return;
5262
5381
  entities[index] = entity;
@@ -5276,7 +5395,7 @@ var SceneSystemHandle = class {
5276
5395
  return this._store;
5277
5396
  }
5278
5397
  get data() {
5279
- return get$1$1(this._store);
5398
+ return get$2(this._store);
5280
5399
  }
5281
5400
  delete() {
5282
5401
  this.manager.delete(this.id);
@@ -5300,26 +5419,26 @@ var SceneSystemManager = class {
5300
5419
  return this._store;
5301
5420
  }
5302
5421
  get data() {
5303
- return get$1$1(this._store);
5422
+ return get$2(this._store);
5304
5423
  }
5305
5424
  add(system) {
5306
- const systems = get$1$1(this._store);
5425
+ const systems = get$2(this._store);
5307
5426
  systems.push(system);
5308
5427
  this._store.set(systems);
5309
5428
  }
5310
5429
  get(id) {
5311
- const system = get$1$1(this._store).find((system) => system === id);
5430
+ const system = get$2(this._store).find((system) => system === id);
5312
5431
  if (!system) throw new Error(`System with id ${id} not found`);
5313
5432
  return new SceneSystemHandle(this, system);
5314
5433
  }
5315
5434
  delete(id) {
5316
- const systems = get$1$1(this._store);
5435
+ const systems = get$2(this._store);
5317
5436
  this._store.set(systems.filter((system) => system !== id));
5318
5437
  }
5319
5438
  _listen() {
5320
- if (get$1$1(_listener$1)) return;
5439
+ if (get$2(_listener$1)) return;
5321
5440
  const unsub = this.scene.manager.ecs.systems.store.subscribe((systems) => {
5322
- const sceneSystems = get$1$1(this._store);
5441
+ const sceneSystems = get$2(this._store);
5323
5442
  sceneSystems.filter((system) => systems.find((s) => s.id === system));
5324
5443
  this._store.set(sceneSystems);
5325
5444
  });
@@ -5350,7 +5469,7 @@ var SceneHandle = class {
5350
5469
  return this._store;
5351
5470
  }
5352
5471
  get data() {
5353
- return get$1$1(this._store);
5472
+ return get$2(this._store);
5354
5473
  }
5355
5474
  get entities() {
5356
5475
  return this._entities;
@@ -5360,7 +5479,7 @@ var SceneHandle = class {
5360
5479
  }
5361
5480
  update(scene) {
5362
5481
  this._store.set({
5363
- ...get$1$1(this._store),
5482
+ ...get$2(this._store),
5364
5483
  ...scene
5365
5484
  });
5366
5485
  }
@@ -5374,13 +5493,13 @@ var SceneHandle = class {
5374
5493
  this.manager.default = this.id;
5375
5494
  }
5376
5495
  _listen() {
5377
- if (get$1$1(_listener)) return;
5496
+ if (get$2(_listener)) return;
5378
5497
  const unsub = [this._entities.store.subscribe((entities) => {
5379
- const scene = get$1$1(this._store);
5498
+ const scene = get$2(this._store);
5380
5499
  scene.entities = entities;
5381
5500
  this._store.set(scene);
5382
5501
  }), this._systems.store.subscribe((systems) => {
5383
- const scene = get$1$1(this._store);
5502
+ const scene = get$2(this._store);
5384
5503
  scene.systems = systems;
5385
5504
  this._store.set(scene);
5386
5505
  })];
@@ -5414,10 +5533,10 @@ var SceneManager = class {
5414
5533
  return _storage$2;
5415
5534
  }
5416
5535
  get data() {
5417
- return get$1$1(_storage$2);
5536
+ return get$2(_storage$2);
5418
5537
  }
5419
5538
  get activeData() {
5420
- return get$1$1(_activeSceneStorage);
5539
+ return get$2(_activeSceneStorage);
5421
5540
  }
5422
5541
  get active() {
5423
5542
  return _activeSceneStorage;
@@ -5426,7 +5545,7 @@ var SceneManager = class {
5426
5545
  _activeSceneStorage.set(handle);
5427
5546
  }
5428
5547
  get defaultData() {
5429
- return get$1$1(_defaultSceneStorage);
5548
+ return get$2(_defaultSceneStorage);
5430
5549
  }
5431
5550
  get default() {
5432
5551
  return _defaultSceneStorage;
@@ -5435,7 +5554,7 @@ var SceneManager = class {
5435
5554
  _defaultSceneStorage.set(handle);
5436
5555
  }
5437
5556
  get rootScenes() {
5438
- return get$1$1(_rootScenesStorage);
5557
+ return get$2(_rootScenesStorage);
5439
5558
  }
5440
5559
  get rootScenesStore() {
5441
5560
  return _rootScenesStorage;
@@ -5444,7 +5563,7 @@ var SceneManager = class {
5444
5563
  _rootScenesStorage.set(Array.from(new Set(scenes)));
5445
5564
  }
5446
5565
  add(scene) {
5447
- const scenes = get$1$1(_storage$2);
5566
+ const scenes = get$2(_storage$2);
5448
5567
  const id = getId(this.data, scene.name);
5449
5568
  scenes.push({
5450
5569
  ...scene,
@@ -5454,16 +5573,16 @@ var SceneManager = class {
5454
5573
  return id;
5455
5574
  }
5456
5575
  get(id) {
5457
- const scene = get$1$1(_storage$2).find((scene) => scene.id === id);
5576
+ const scene = get$2(_storage$2).find((scene) => scene.id === id);
5458
5577
  if (!scene) throw new Error(`Scene with id ${id} not found`);
5459
5578
  const handle = new SceneHandle(this, scene);
5460
5579
  this._subscribe(id, handle);
5461
5580
  return handle;
5462
5581
  }
5463
5582
  delete(id) {
5464
- const scenes = get$1$1(_storage$2);
5583
+ const scenes = get$2(_storage$2);
5465
5584
  _storage$2.set(scenes.filter((scene) => scene.id !== id));
5466
- const subscriptions = get$1$1(_subscriptions$1);
5585
+ const subscriptions = get$2(_subscriptions$1);
5467
5586
  if (subscriptions[id]) {
5468
5587
  subscriptions[id]();
5469
5588
  subscriptions[id] = null;
@@ -5475,14 +5594,14 @@ var SceneManager = class {
5475
5594
  }
5476
5595
  _subscribe(id, handle) {
5477
5596
  setTimeout(() => {
5478
- const subscriptions = get$1$1(_subscriptions$1);
5597
+ const subscriptions = get$2(_subscriptions$1);
5479
5598
  if (subscriptions[id]) return;
5480
5599
  subscriptions[id] = handle.store.subscribe((scene) => this._update(id, scene));
5481
5600
  _subscriptions$1.set(subscriptions);
5482
5601
  }, 0);
5483
5602
  }
5484
5603
  _update(id, scene) {
5485
- const scenes = get$1$1(_storage$2);
5604
+ const scenes = get$2(_storage$2);
5486
5605
  const index = scenes.findIndex((s) => s.id === id);
5487
5606
  if (index === -1) return;
5488
5607
  scenes[index] = scene;
@@ -5506,16 +5625,16 @@ var SystemHandle = class {
5506
5625
  return this._store;
5507
5626
  }
5508
5627
  get data() {
5509
- return get$1$1(this._store);
5628
+ return get$2(this._store);
5510
5629
  }
5511
5630
  update(system) {
5512
5631
  this._store.set({
5513
- ...get$1$1(this._store),
5632
+ ...get$2(this._store),
5514
5633
  ...system
5515
5634
  });
5516
5635
  }
5517
5636
  delete() {
5518
- this._manager.delete(this.id);
5637
+ return this._manager.delete(this.id);
5519
5638
  }
5520
5639
  };
5521
5640
  var _storage = writable([]);
@@ -5532,7 +5651,7 @@ var SystemManager = class {
5532
5651
  return _storage;
5533
5652
  }
5534
5653
  get data() {
5535
- return get$1$1(_storage);
5654
+ return get$2(_storage);
5536
5655
  }
5537
5656
  async create(name) {
5538
5657
  const { actions, fs } = useProject();
@@ -5540,12 +5659,8 @@ var SystemManager = class {
5540
5659
  this._add(systemTransformer(system));
5541
5660
  await (await fs.getDirectory()).readdir(true);
5542
5661
  }
5543
- async import(names) {
5544
- const { actions, ecs, fs } = useProject();
5545
- await actions.package.addSystems({ systemNames: names });
5546
- await this.sync();
5547
- await ecs.components.sync();
5548
- await (await fs.getDirectory()).readdir(true);
5662
+ add(system) {
5663
+ this._add(systemTransformer(system));
5549
5664
  }
5550
5665
  async sync() {
5551
5666
  const { actions } = useProject();
@@ -5553,16 +5668,20 @@ var SystemManager = class {
5553
5668
  _storage.set(systemsTransformer(systems));
5554
5669
  }
5555
5670
  get(id) {
5556
- const system = get$1$1(_storage).find((system) => system.id === id);
5671
+ const system = get$2(_storage).find((system) => system.id === id);
5557
5672
  if (!system) throw new Error(`System with id ${id} not found`);
5558
5673
  const handle = new SystemHandle(this, system);
5559
5674
  this._subscribe(id, handle);
5560
5675
  return handle;
5561
5676
  }
5562
- delete(id) {
5563
- const systems = get$1$1(_storage);
5564
- _storage.set(systems.filter((system) => system.id !== id));
5565
- const subscriptions = get$1$1(_subscriptions);
5677
+ async delete(id) {
5678
+ const systems = get$2(_storage);
5679
+ const system = systems.find((s) => s.id === id);
5680
+ if (!system) throw new Error(`System not found: ${id}`);
5681
+ _storage.set(systems.filter((s) => s.id !== id));
5682
+ const { fs } = useProject();
5683
+ await (await fs.getFile(system.path)).delete();
5684
+ const subscriptions = get$2(_subscriptions);
5566
5685
  if (subscriptions[id]) {
5567
5686
  subscriptions[id]();
5568
5687
  subscriptions[id] = null;
@@ -5570,20 +5689,20 @@ var SystemManager = class {
5570
5689
  }
5571
5690
  }
5572
5691
  _add(system) {
5573
- const systems = get$1$1(_storage);
5692
+ const systems = get$2(_storage);
5574
5693
  systems.push(system);
5575
5694
  _storage.set(systems);
5576
5695
  }
5577
5696
  _subscribe(id, handle) {
5578
5697
  setTimeout(() => {
5579
- const subscriptions = get$1$1(_subscriptions);
5698
+ const subscriptions = get$2(_subscriptions);
5580
5699
  if (subscriptions[id]) return;
5581
5700
  subscriptions[id] = handle.store.subscribe((system) => this._update(id, system));
5582
5701
  _subscriptions.set(subscriptions);
5583
5702
  }, 0);
5584
5703
  }
5585
5704
  _update(id, system) {
5586
- const systems = get$1$1(_storage);
5705
+ const systems = get$2(_storage);
5587
5706
  const index = systems.findIndex((s) => s.id === id);
5588
5707
  if (index === -1) return;
5589
5708
  systems[index] = system;
@@ -5593,10 +5712,13 @@ var SystemManager = class {
5593
5712
  var ECSHandler = class {
5594
5713
  _project;
5595
5714
  _sceneManager;
5715
+ _assetManager;
5596
5716
  _componentManager;
5597
5717
  _systemManager;
5598
5718
  _libraryManager;
5599
5719
  static reset() {
5720
+ AssetHandle.reset();
5721
+ AssetManager.reset();
5600
5722
  ComponentHandle.reset();
5601
5723
  ComponentManager.reset();
5602
5724
  SystemManager.reset();
@@ -5621,9 +5743,11 @@ var ECSHandler = class {
5621
5743
  * This init is only made for the current version of the editor
5622
5744
  * When scenes will be implemented, this init must be changed accordingly
5623
5745
  */
5746
+ const assets = await this._project.actions.package.getAssets();
5624
5747
  const components = await this._project.actions.package.getComponents();
5625
5748
  const systems = await this._project.actions.package.getSystems();
5626
5749
  const save = await this._project.actions.save.get();
5750
+ this._assetManager = new AssetManager(assetsTransformer(assets));
5627
5751
  this._componentManager = new ComponentManager(componentsTransformer(components));
5628
5752
  this._systemManager = new SystemManager(systemsTransformer(systems));
5629
5753
  this._libraryManager = new LibraryManager(librariesTransformer(save));
@@ -5633,6 +5757,10 @@ var ECSHandler = class {
5633
5757
  if (!this._sceneManager) throw new Error("ECS handler not initialized");
5634
5758
  return this._sceneManager;
5635
5759
  }
5760
+ get assets() {
5761
+ if (!this._assetManager) throw new Error("ECS handler not initialized");
5762
+ return this._assetManager;
5763
+ }
5636
5764
  get components() {
5637
5765
  if (!this._componentManager) throw new Error("ECS handler not initialized");
5638
5766
  return this._componentManager;
@@ -5646,9 +5774,22 @@ var ECSHandler = class {
5646
5774
  return this._libraryManager;
5647
5775
  }
5648
5776
  };
5777
+ var moveComponentListener = (handler) => {
5778
+ handler.on(EditorEvents.MOVE_COMPONENT, (entityId, _componentId, { x, y }) => {
5779
+ const { ecs } = useProject();
5780
+ const component = ecs.scenes.activeData.entities.get(entityId).components.get("Position2D");
5781
+ component.params.get("x").value.set(x);
5782
+ component.params.get("y").value.set(y);
5783
+ });
5784
+ return () => {};
5785
+ };
5649
5786
  var EventEmitter = class {
5650
5787
  listeners = {};
5651
5788
  eventQueue = [];
5789
+ _dequeueOnEmit;
5790
+ constructor(dequeueOnEmit = false) {
5791
+ this._dequeueOnEmit = dequeueOnEmit;
5792
+ }
5652
5793
  runEvents() {
5653
5794
  this.eventQueue.forEach((e) => {
5654
5795
  this._executeEvent(e);
@@ -5660,6 +5801,7 @@ var EventEmitter = class {
5660
5801
  event,
5661
5802
  args
5662
5803
  });
5804
+ if (this._dequeueOnEmit) this.runEvents();
5663
5805
  }
5664
5806
  addListener(event, listener) {
5665
5807
  if (!this.listeners[event]) this.listeners[event] = [];
@@ -5693,9 +5835,17 @@ var EventEmitter = class {
5693
5835
  });
5694
5836
  }
5695
5837
  };
5838
+ var listeners = writable([]);
5696
5839
  var EventHandler = class {
5697
5840
  _coreEvents = new EventEmitter();
5698
- _editorEvents = new EventEmitter();
5841
+ _editorEvents = new EventEmitter(true);
5842
+ static reset() {
5843
+ get$2(listeners).forEach((unsub) => unsub());
5844
+ listeners.set([]);
5845
+ }
5846
+ async init() {
5847
+ listeners.set([moveComponentListener(this)]);
5848
+ }
5699
5849
  emit(event, ...args) {
5700
5850
  this._coreEvents.emitEvent(event, ...args);
5701
5851
  }
@@ -5703,6 +5853,18 @@ var EventHandler = class {
5703
5853
  this._editorEvents.on(event, callback);
5704
5854
  }
5705
5855
  };
5856
+ var CoreEvents = /* @__PURE__ */ function(CoreEvents) {
5857
+ CoreEvents["HOT_RELOAD"] = "hot-reload";
5858
+ CoreEvents["HARD_RELOAD"] = "hard-reload";
5859
+ CoreEvents["PAUSE_GAME"] = "pause-game";
5860
+ CoreEvents["STOP_GAME"] = "stop-game";
5861
+ CoreEvents["UNPAUSE_GAME"] = "unpause-game";
5862
+ return CoreEvents;
5863
+ }({});
5864
+ var EditorEvents = /* @__PURE__ */ function(EditorEvents) {
5865
+ EditorEvents["MOVE_COMPONENT"] = "move-component";
5866
+ return EditorEvents;
5867
+ }({});
5706
5868
  var infoStore = writable();
5707
5869
  var InfoHandler = class {
5708
5870
  core;
@@ -5713,12 +5875,12 @@ var InfoHandler = class {
5713
5875
  this.core = core;
5714
5876
  }
5715
5877
  get(cacheOnly) {
5716
- if (cacheOnly) return get$1$1(infoStore);
5878
+ if (cacheOnly) return get$2(infoStore);
5717
5879
  return this.fetch();
5718
5880
  }
5719
5881
  async fetch(noCache = false) {
5720
5882
  if (!noCache) {
5721
- const cache = get$1$1(infoStore);
5883
+ const cache = get$2(infoStore);
5722
5884
  if (cache) return cache;
5723
5885
  }
5724
5886
  const res = await this.core.actions.project.getInfo();
@@ -5852,6 +6014,9 @@ var FileSystemFile = class {
5852
6014
  const raw = JSON.stringify(content);
5853
6015
  return this.write(raw);
5854
6016
  }
6017
+ async createWritable() {
6018
+ return this.handle.createWritable();
6019
+ }
5855
6020
  async getUrl() {
5856
6021
  if (URL_CACHE.has(this.handle.name)) URL.revokeObjectURL(URL_CACHE.get(this.handle.name));
5857
6022
  const file = await this.handle.getFile();
@@ -6037,6 +6202,10 @@ var SfsFile = class {
6037
6202
  await this._cache.writeJson(content);
6038
6203
  await this.sync();
6039
6204
  }
6205
+ async createWritable() {
6206
+ await this._preWrite();
6207
+ return await this._cache.createWritable();
6208
+ }
6040
6209
  async sync() {
6041
6210
  if (!this._cache) return;
6042
6211
  const file = await this._cache.getFile();
@@ -6050,6 +6219,13 @@ var SfsFile = class {
6050
6219
  });
6051
6220
  if (!res.ok) throw new Error(`Failed to sync file: ${await res.text()}`);
6052
6221
  }
6222
+ async delete() {
6223
+ const res = await fetch(this._route, {
6224
+ method: "DELETE",
6225
+ headers: { [SESSION_PROJECT_HEADER]: this._handler.project.id }
6226
+ });
6227
+ if (!res.ok) throw new Error(`Failed to delete file: ${await res.text()}`);
6228
+ }
6053
6229
  async getFile() {
6054
6230
  await this._preRead();
6055
6231
  return this._cache;
@@ -6314,33 +6490,14 @@ var Loader = class {
6314
6490
  };
6315
6491
  var PackageHandler = class {
6316
6492
  _project;
6317
- _componentsManifests = /* @__PURE__ */ new Map();
6318
- _systemsManifests = /* @__PURE__ */ new Map();
6319
6493
  constructor(project) {
6320
6494
  this._project = project;
6321
6495
  }
6322
- async init() {}
6323
- getComponentManifest(componentName) {
6324
- return this._componentsManifests.get(componentName);
6325
- }
6326
- getSystemManifest(systemName) {
6327
- return this._systemsManifests.get(systemName);
6328
- }
6329
- async installComponent(name) {
6330
- const newComponent = (await this._project.actions.package.addComponents({ componentNames: [name] }))[0];
6331
- this._project.save.save.components.push(newComponent.save);
6332
- this._componentsManifests.set(newComponent.save.name, newComponent.manifest);
6333
- }
6334
- async installSystem(name) {
6335
- const newSystem = (await this._project.actions.package.addSystems({ systemNames: [name] }))[0];
6336
- this._project.save.save.systems.push(newSystem.save);
6337
- this._systemsManifests.set(newSystem.save.name, newSystem.manifest);
6338
- }
6339
- addComponentManifest(componentName, component) {
6340
- this._componentsManifests.set(componentName, component);
6341
- }
6342
- addSystemManifest(systemName, system) {
6343
- this._systemsManifests.set(systemName, system);
6496
+ async installPackages(names) {
6497
+ await this._project.actions.package.installPackages({ names });
6498
+ await this._project.ecs.components.sync();
6499
+ await this._project.ecs.systems.sync();
6500
+ await (await this._project.fs.getDirectory()).readdir(true);
6344
6501
  }
6345
6502
  };
6346
6503
  var SaveHandler = class {
@@ -6354,6 +6511,7 @@ var SaveHandler = class {
6354
6511
  _readyToSync = true;
6355
6512
  _syncTimer;
6356
6513
  _needSync = writable(false);
6514
+ _syncGatewayEnable = true;
6357
6515
  constructor(project) {
6358
6516
  this._project = project;
6359
6517
  }
@@ -6362,7 +6520,9 @@ var SaveHandler = class {
6362
6520
  this._listeners();
6363
6521
  this._save.subscribe(() => {
6364
6522
  this.syncToServer();
6523
+ this._project.event.emit(CoreEvents.HOT_RELOAD, this.save);
6365
6524
  });
6525
+ if (getConfig().mode === "online") this.initSyncGateway();
6366
6526
  }
6367
6527
  async fetchFromServer() {
6368
6528
  this._save.set(await this._project.actions.save.get());
@@ -6370,10 +6530,10 @@ var SaveHandler = class {
6370
6530
  async syncToServer() {
6371
6531
  if (this._readyToSync) {
6372
6532
  this._readyToSync = false;
6373
- await this._project.actions.save.set({ save: get$1$1(this._save) });
6533
+ await this._project.actions.save.set({ save: get$2(this._save) });
6374
6534
  this._syncTimer = setTimeout(() => {
6375
6535
  this._readyToSync = true;
6376
- if (get$1$1(this._needSync)) {
6536
+ if (get$2(this._needSync)) {
6377
6537
  this.syncToServer();
6378
6538
  this._needSync.set(false);
6379
6539
  }
@@ -6387,7 +6547,7 @@ var SaveHandler = class {
6387
6547
  await this.syncToServer();
6388
6548
  }
6389
6549
  get save() {
6390
- return get$1$1(this._save);
6550
+ return get$2(this._save);
6391
6551
  }
6392
6552
  _listeners() {
6393
6553
  this._project.ecs.components.store.subscribe((components) => {
@@ -6426,6 +6586,14 @@ var SaveHandler = class {
6426
6586
  this.syncToServer();
6427
6587
  });
6428
6588
  }
6589
+ initSyncGateway() {
6590
+ setInterval(async () => {
6591
+ if (this._syncGatewayEnable) await this._project.actions.project.syncGatewayProject();
6592
+ }, 1e3 * 60 * 5);
6593
+ window.addEventListener("beforeunload", (e) => {
6594
+ if (!this._project.actions.project.syncGatewayProject()) e.preventDefault();
6595
+ });
6596
+ }
6429
6597
  };
6430
6598
  var Project = class {
6431
6599
  id;
@@ -6440,6 +6608,7 @@ var Project = class {
6440
6608
  _inited = false;
6441
6609
  static reset() {
6442
6610
  InfoHandler.reset();
6611
+ EventHandler.reset();
6443
6612
  }
6444
6613
  constructor(id) {
6445
6614
  this.id = id;
@@ -6450,7 +6619,7 @@ var Project = class {
6450
6619
  await this.fs.init();
6451
6620
  await this.ecs.init();
6452
6621
  await this.save.init();
6453
- await this.packages.init();
6622
+ await this.event.init();
6454
6623
  this._inited = true;
6455
6624
  return this;
6456
6625
  }
@@ -6682,7 +6851,7 @@ var ProjectLoader = class ProjectLoader {
6682
6851
  }
6683
6852
  };
6684
6853
  var useProject = () => {
6685
- const project = get$1$1(projectStore);
6854
+ const project = get$2(projectStore);
6686
6855
  if (!project) {
6687
6856
  const error = new PLException(PLErrors.No_Project);
6688
6857
  error.fb();
@@ -14990,4 +15159,4 @@ var runSafe = async (context, cb, fallback) => {
14990
15159
  //#endregion
14991
15160
  export { createBitsAttrs as $, Portal as A, Separator as B, MenuMenuState as C, PLException as D, PLErrors as E, Scroll_lock as F, Text_selection_layer as G, StyleToObject as H, Select as I, boolToStr as J, attachRef as K, Select_content as L, ProjectCache as M, ProjectLoader as N, Popper_layer as O, RovingFocusGroup as P, cn as Q, Select_item as R, MenuItemState as S, MenuSeparatorState as T, Switch as U, Spinner as V, Switch_thumb as W, boxWith as X, boolToTrueOrUndef as Y, capitalize as Z, Floating_layer_anchor as _, useId as _t, Card_content as a, getDataOpenClosed as at, Loading_button as b, tv as bt, Card_title as c, getFloatingContentCSSVars as ct, DOMContext as d, mergeProps as dt, createId as et, Dismissible_layer as f, noop as ft, Floating_layer as g, useDebounce as gt, FloatingArrowState as h, toastError as ht, Card as i, getConfig as it, PresenceManager as j, Popper_layer_force_mount as k, Context as l, isElement$1 as lt, Escape_layer as m, simpleBox as mt, Button as n, deserialize as nt, Card_description as o, getDataTransitionAttrs as ot, DropdownMenuTriggerState as p, runSafe as pt, boolToEmptyStrOrUndef as q, CONTEXT_MENU_TRIGGER_ATTR as r, enhance as rt, Card_header as s, getDocument as st, AnimationsComplete as t, createQuery as tt, ContextMenuTriggerState as u, isFocusVisible as ut, Focus_scope as v, useProject as vt, MenuRootState as w, MenuContentState as x, IsMounted as y, watch as yt, Select_trigger as z };
14992
15161
 
14993
- //# sourceMappingURL=error-DWpaxupR.js.map
15162
+ //# sourceMappingURL=error-dHCCrW4T.js.map