@holoscript/core 6.0.4 → 6.1.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 (351) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -3
  3. package/bin/holoscript.cjs +3 -0
  4. package/dist/GLTFPipeline-SFIORFJU.js +16 -0
  5. package/dist/GLTFPipeline-VNNDPONV.cjs +37 -0
  6. package/dist/{HoloScriptPlusParser-BN6KVRCM.js → HoloScriptPlusParser-7FBIFUFC.js} +6 -5
  7. package/dist/{HoloScriptPlusParser-NC5FE6AL.cjs → HoloScriptPlusParser-A2W7OCN2.cjs} +17 -16
  8. package/dist/HoloScriptPlusParser-F2Z56FJR.js +10 -0
  9. package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +27 -0
  10. package/dist/{USDZExporter-UWGWNMMD.cjs → USDZExporter-3FWJ25JI.cjs} +344 -16
  11. package/dist/{USDZExporter-NTMBNTDB.js → USDZExporter-D2HQLQYK.js} +344 -16
  12. package/dist/agents/index.cjs +19 -0
  13. package/dist/agents/index.d.ts +100 -0
  14. package/dist/agents/index.js +17 -0
  15. package/dist/chunk-22W6NGYN.js +725 -0
  16. package/dist/{chunk-5OEOHAAW.cjs → chunk-27MPVJVZ.cjs} +64 -28
  17. package/dist/{chunk-RVYPEYPX.js → chunk-2A7FURVO.js} +44 -8
  18. package/dist/{chunk-XCWFGZAA.js → chunk-2B7WVIDZ.js} +11 -8
  19. package/dist/{chunk-NDQNIJEH.js → chunk-2BSMSUCE.js} +250 -24
  20. package/dist/chunk-2HLIGOKU.cjs +5546 -0
  21. package/dist/{chunk-EONILVMF.js → chunk-2M2DPHKB.js} +4 -4
  22. package/dist/{chunk-G7CT3EMP.cjs → chunk-2YSNA2F2.cjs} +319 -47
  23. package/dist/{chunk-IWI6J7FX.js → chunk-33XCOVE3.js} +5 -5
  24. package/dist/chunk-3FOKASKO.cjs +348 -0
  25. package/dist/{chunk-DXJQDCFL.js → chunk-4C57PR42.js} +3 -3
  26. package/dist/{chunk-MPXBVFHQ.js → chunk-4N4SXXWF.js} +4 -3
  27. package/dist/chunk-4PDEPEQW.cjs +41 -0
  28. package/dist/chunk-4R6HPSHJ.js +2176 -0
  29. package/dist/chunk-4R6SBXDB.js +45 -0
  30. package/dist/chunk-4SY77NA4.cjs +413 -0
  31. package/dist/{chunk-YCXFCXDS.js → chunk-4UUKPCY4.js} +668 -110
  32. package/dist/{chunk-LGGRPKTV.cjs → chunk-52ULD552.cjs} +114 -35
  33. package/dist/{chunk-L4G4RLXX.js → chunk-5CKA5SXU.js} +438 -22
  34. package/dist/chunk-5FSKKMR7.cjs +2092 -0
  35. package/dist/{chunk-FF3Q7ADR.js → chunk-5JEU52DW.js} +5 -3
  36. package/dist/chunk-5N54COB6.cjs +327 -0
  37. package/dist/chunk-5S7RKFGR.cjs +446 -0
  38. package/dist/{chunk-KED34ILP.js → chunk-6ASWLXXN.js} +21 -9
  39. package/dist/chunk-6CTRH7HT.cjs +1985 -0
  40. package/dist/{chunk-CAUCGUEA.cjs → chunk-6EX3I5P4.cjs} +6 -6
  41. package/dist/chunk-6FGQNDR4.js +5731 -0
  42. package/dist/{chunk-72EQECGT.cjs → chunk-6KMK2UXT.cjs} +122 -46
  43. package/dist/{chunk-G4VZTCIB.js → chunk-6L4VE27M.js} +33 -23
  44. package/dist/{chunk-ATSKSYVE.cjs → chunk-6S6TKNEA.cjs} +6478 -1738
  45. package/dist/chunk-77V4GTCA.js +596 -0
  46. package/dist/{chunk-ZP4D3CSX.cjs → chunk-7AD52FRS.cjs} +16 -16
  47. package/dist/chunk-A6KINLZJ.js +236 -0
  48. package/dist/chunk-AIA52I7T.cjs +543 -0
  49. package/dist/chunk-AIX25INK.cjs +602 -0
  50. package/dist/{chunk-B5TCIAPQ.cjs → chunk-AO4I2Z7M.cjs} +17 -18
  51. package/dist/{chunk-Q5SJOGHQ.cjs → chunk-BPICAGBV.cjs} +324 -199
  52. package/dist/chunk-BRQJKJGT.cjs +20 -0
  53. package/dist/{chunk-3FXV5S25.cjs → chunk-C37BHB7N.cjs} +6 -3
  54. package/dist/{chunk-XUTX5CBW.js → chunk-CBJY23VL.js} +3 -3
  55. package/dist/chunk-CIWWXYHZ.cjs +50 -0
  56. package/dist/{chunk-XXINBTZK.cjs → chunk-DIL6DDDN.cjs} +101 -45
  57. package/dist/chunk-DMXC24WV.js +404 -0
  58. package/dist/{chunk-PMGODDJA.cjs → chunk-DTGBOSEM.cjs} +12 -12
  59. package/dist/chunk-E7JP3BS3.cjs +61 -0
  60. package/dist/{chunk-HJJLD366.js → chunk-EKBKLK7P.js} +3 -3
  61. package/dist/chunk-EKYL4PE3.cjs +404 -0
  62. package/dist/{chunk-UPJBDCVF.js → chunk-EMMC5CSQ.js} +12 -8
  63. package/dist/{chunk-GGHSW2NN.js → chunk-EOBB6A4B.js} +6389 -1718
  64. package/dist/chunk-EOFNVCM6.js +325 -0
  65. package/dist/{chunk-FHQVYCH2.js → chunk-ER4GATIU.js} +7 -7
  66. package/dist/{chunk-N5FTS757.cjs → chunk-EXKSFGSX.cjs} +7 -148
  67. package/dist/{chunk-LK5IAVH6.cjs → chunk-EXUP2BUM.cjs} +27 -27
  68. package/dist/chunk-FDSGHPAK.js +130 -0
  69. package/dist/chunk-FEWUHQNM.cjs +144 -0
  70. package/dist/{chunk-5TOFIR6L.js → chunk-FGGJQRLZ.js} +5 -142
  71. package/dist/chunk-FHP6LXJS.js +415 -0
  72. package/dist/{chunk-7LCYLPW2.cjs → chunk-FJPADH77.cjs} +7 -4
  73. package/dist/{chunk-T36DDXSF.js → chunk-FXKTYFYA.js} +150 -25
  74. package/dist/chunk-G2LS3RFO.js +623 -0
  75. package/dist/chunk-GCMWDSBZ.cjs +729 -0
  76. package/dist/chunk-GJNCFRJU.cjs +125 -0
  77. package/dist/{chunk-Q4QX3AET.cjs → chunk-GMP623FG.cjs} +16 -13
  78. package/dist/{chunk-XD6IYDUX.js → chunk-GN3KDX4W.js} +119 -43
  79. package/dist/{chunk-QLEAOI3Q.cjs → chunk-GQYKQSTC.cjs} +10 -10
  80. package/dist/chunk-GTU2Z2WW.cjs +262 -0
  81. package/dist/chunk-GZG4KA4E.js +529 -0
  82. package/dist/{chunk-BND3ST2K.cjs → chunk-H3MGK7TX.cjs} +42 -32
  83. package/dist/{chunk-XRKWN5PL.cjs → chunk-H5DZIHJP.cjs} +14 -18
  84. package/dist/{chunk-Z34RLXRA.cjs → chunk-HANL7K2Q.cjs} +65 -50
  85. package/dist/{chunk-3SAK5KFL.cjs → chunk-HCCQLAA4.cjs} +2 -11
  86. package/dist/{chunk-LXJ4667L.cjs → chunk-HGVXZDSK.cjs} +108 -20
  87. package/dist/{chunk-3FJCK5XA.js → chunk-HRODTEEO.js} +30 -10
  88. package/dist/{chunk-HQUEA5R6.cjs → chunk-HZCQO4JM.cjs} +6 -6
  89. package/dist/{chunk-S565K7NK.js → chunk-I2O7TW6B.js} +12 -8
  90. package/dist/chunk-IHESJZSW.js +4490 -0
  91. package/dist/{chunk-FSF7EQVA.cjs → chunk-IRWWS72C.cjs} +63 -22
  92. package/dist/{chunk-5O6TQC6M.cjs → chunk-IVIA7K75.cjs} +689 -127
  93. package/dist/chunk-IVY74O6C.js +247 -0
  94. package/dist/chunk-J32ZJZJH.js +554 -0
  95. package/dist/chunk-J56PTA46.cjs +639 -0
  96. package/dist/chunk-JD7CIZ33.js +1949 -0
  97. package/dist/{chunk-T7LEXZUZ.cjs → chunk-JIYN45TV.cjs} +14 -15
  98. package/dist/{chunk-FFKU7BTK.cjs → chunk-KHPCJRI3.cjs} +24 -21
  99. package/dist/chunk-KKFZ3B6J.cjs +557 -0
  100. package/dist/chunk-KPJL34Y7.cjs +186 -0
  101. package/dist/{chunk-HE7ULERA.cjs → chunk-KQTPCYTG.cjs} +128 -44
  102. package/dist/{chunk-OFKWH2IP.js → chunk-KX76JUQY.js} +3 -3
  103. package/dist/{chunk-33LSUQDD.cjs → chunk-L63H3SQ4.cjs} +43 -31
  104. package/dist/{chunk-K6EKD26I.js → chunk-LAOCQJ2M.js} +64 -8
  105. package/dist/chunk-LM2VU56C.cjs +37 -0
  106. package/dist/chunk-M56JSP4A.js +400 -0
  107. package/dist/chunk-MBOOR7X4.js +18 -0
  108. package/dist/{chunk-XWPNTWDN.cjs → chunk-MJVIRCUV.cjs} +31 -27
  109. package/dist/{chunk-SDAMZIRE.js → chunk-MSMIFMBL.js} +135 -18
  110. package/dist/{chunk-56IF4NTA.js → chunk-MXFUTKCO.js} +18 -18
  111. package/dist/{chunk-6UEHYZ7V.cjs → chunk-MXJ5SS53.cjs} +447 -31
  112. package/dist/chunk-MYY4PMWX.cjs +264 -0
  113. package/dist/chunk-N75IH2HY.js +258 -0
  114. package/dist/{chunk-GVUR45UF.cjs → chunk-NG77ATEW.cjs} +7 -6
  115. package/dist/chunk-NW5G5FBQ.js +215 -0
  116. package/dist/{chunk-E3FWRT3Z.js → chunk-OEFY723R.js} +28 -13
  117. package/dist/chunk-OEV5RMZO.cjs +3042 -0
  118. package/dist/{chunk-X4ZF6CNE.cjs → chunk-OIQYIIO3.cjs} +7 -7
  119. package/dist/{chunk-2CWOLHTE.js → chunk-OL46QLBJ.js} +3 -11
  120. package/dist/chunk-OPZ7XDDI.js +487 -0
  121. package/dist/chunk-OSYNRVOV.cjs +243 -0
  122. package/dist/{chunk-TEWCN33Y.js → chunk-P7YIA5LN.js} +91 -7
  123. package/dist/chunk-PGANYCAG.cjs +220 -0
  124. package/dist/{chunk-CS2EMTGF.js → chunk-QAVXL2IH.js} +62 -21
  125. package/dist/{chunk-T4NKMBDL.js → chunk-QCCBXSCE.js} +1666 -756
  126. package/dist/{chunk-F4IULT7N.js → chunk-QPOQ7VPI.js} +16 -13
  127. package/dist/{chunk-6XSERL6L.js → chunk-QTPMJRGS.js} +3108 -2827
  128. package/dist/{chunk-F3HH56EB.cjs → chunk-QWNQ523V.cjs} +1730 -823
  129. package/dist/{chunk-R7MA7QWV.js → chunk-R3IVNY6P.js} +102 -23
  130. package/dist/chunk-R75BSDH7.cjs +50 -0
  131. package/dist/chunk-RAXUF5DF.cjs +2196 -0
  132. package/dist/{chunk-BF2235SI.cjs → chunk-RMHC2VG7.cjs} +2876 -2592
  133. package/dist/chunk-RUXGBKPS.cjs +4517 -0
  134. package/dist/{chunk-UERJ3YJV.js → chunk-S5IFXW6E.js} +113 -9
  135. package/dist/{chunk-27LWW5FU.cjs → chunk-S6YWHCKV.cjs} +5 -5
  136. package/dist/{chunk-WB4Z63GG.js → chunk-SIEXCILW.js} +3 -3
  137. package/dist/{chunk-CLYEIWA5.cjs → chunk-SLU6UPJI.cjs} +5 -3
  138. package/dist/{chunk-LZ266PCM.cjs → chunk-T5J7ZKP3.cjs} +446 -60
  139. package/dist/chunk-TDCNJHWO.js +341 -0
  140. package/dist/{chunk-IHOUYQIA.js → chunk-TG7O4WBC.js} +5 -5
  141. package/dist/chunk-THCK6ECW.js +2085 -0
  142. package/dist/chunk-TJHVSBP2.js +439 -0
  143. package/dist/chunk-TK74TR4H.js +5541 -0
  144. package/dist/{chunk-CDPGV4DN.js → chunk-U4NBQJBY.js} +14 -15
  145. package/dist/{chunk-NOZZ46QU.js → chunk-UD3DSHZM.js} +10 -14
  146. package/dist/chunk-UDMYRFDZ.js +3038 -0
  147. package/dist/{chunk-WDW67DZB.cjs → chunk-UOIGFQXC.cjs} +90 -68
  148. package/dist/{chunk-BU7VWW2K.js → chunk-URG2SJLK.js} +14 -15
  149. package/dist/{chunk-EQV4R3EV.cjs → chunk-V73NPPTM.cjs} +152 -35
  150. package/dist/chunk-VECQYRXL.js +474 -0
  151. package/dist/chunk-VEXPG4WN.js +1989 -0
  152. package/dist/{chunk-LDP5OK6G.js → chunk-VMLKSV26.js} +5 -5
  153. package/dist/{chunk-5BGSECRJ.cjs → chunk-VSK7W3O5.cjs} +47 -27
  154. package/dist/chunk-VVKVQZI6.js +55 -0
  155. package/dist/{chunk-YQK5JNFK.js → chunk-W55Z7QIX.js} +103 -15
  156. package/dist/{chunk-KSGXLT74.cjs → chunk-W6P2GBHH.cjs} +3 -3
  157. package/dist/{chunk-IBDG74G2.cjs → chunk-W6RW64BB.cjs} +7 -7
  158. package/dist/chunk-WDT3JTGM.cjs +483 -0
  159. package/dist/{chunk-HPS76H7Q.js → chunk-WKX5AMOY.js} +3 -3
  160. package/dist/chunk-WNNE3PO3.js +34 -0
  161. package/dist/{chunk-XG23EUQX.cjs → chunk-WRLUBRKS.cjs} +538 -312
  162. package/dist/{chunk-IFNQFCTM.js → chunk-WRNEH5MO.js} +79 -8
  163. package/dist/{chunk-54FHG2MX.js → chunk-WRWEX5ZF.js} +7 -4
  164. package/dist/{chunk-KCQ5NDYC.cjs → chunk-X3GJPRVK.cjs} +154 -80
  165. package/dist/{chunk-7AGYRWKW.cjs → chunk-XFXGA5IW.cjs} +126 -22
  166. package/dist/{chunk-TQSZUOW5.cjs → chunk-XHIV6326.cjs} +4 -4
  167. package/dist/chunk-XJAN7CZG.cjs +432 -0
  168. package/dist/chunk-XL6INWKT.js +121 -0
  169. package/dist/{chunk-E3UALNFA.js → chunk-XMWZG36H.js} +4 -4
  170. package/dist/{chunk-BKIGPPVM.js → chunk-XSFNHP2E.js} +6 -3
  171. package/dist/{chunk-H5Z7NASB.js → chunk-XT6JY5W5.js} +25 -3
  172. package/dist/chunk-XXZJEFKW.cjs +490 -0
  173. package/dist/chunk-Y3MWXQSB.cjs +5737 -0
  174. package/dist/chunk-YF2I3MV3.js +46 -0
  175. package/dist/{chunk-V3NN3HPP.js → chunk-YIMN575O.js} +437 -52
  176. package/dist/chunk-YIVFJNYV.js +176 -0
  177. package/dist/{chunk-MD6KDHVE.cjs → chunk-YKGPCZEE.cjs} +10 -10
  178. package/dist/chunk-YQELFNJV.js +39 -0
  179. package/dist/chunk-Z5XMPRNC.cjs +5390 -0
  180. package/dist/{chunk-3FYZOR7S.cjs → chunk-ZDSYWBIE.cjs} +18 -18
  181. package/dist/{chunk-6TZPZCOJ.cjs → chunk-ZKSS47EV.cjs} +24 -19
  182. package/dist/chunk-ZUL5AVTX.cjs +1993 -0
  183. package/dist/chunk-ZXBZVXDW.js +5386 -0
  184. package/dist/{chunk-DMG7C4H2.js → chunk-ZZ7RO2UQ.js} +312 -44
  185. package/dist/cli/holoscript-runner.cjs +200 -204
  186. package/dist/cli/holoscript-runner.js +144 -148
  187. package/dist/codebase/index.cjs +1 -1
  188. package/dist/codebase/index.js +1 -1
  189. package/dist/compiler/agent-inference.cjs +10 -7
  190. package/dist/compiler/agent-inference.js +6 -3
  191. package/dist/compiler/android-xr.cjs +12 -7
  192. package/dist/compiler/android-xr.js +10 -5
  193. package/dist/compiler/android.cjs +12 -8
  194. package/dist/compiler/android.js +10 -6
  195. package/dist/compiler/ar.cjs +9 -6
  196. package/dist/compiler/ar.js +7 -4
  197. package/dist/compiler/babylon.cjs +12 -8
  198. package/dist/compiler/babylon.js +11 -7
  199. package/dist/compiler/business-quest.cjs +43 -0
  200. package/dist/compiler/business-quest.js +4 -0
  201. package/dist/compiler/coco.cjs +1 -1
  202. package/dist/compiler/coco.js +1 -1
  203. package/dist/compiler/context.cjs +25 -0
  204. package/dist/compiler/context.d.ts +28 -0
  205. package/dist/compiler/context.js +8 -0
  206. package/dist/compiler/domain-block-utils.cjs +155 -152
  207. package/dist/compiler/domain-block-utils.js +7 -4
  208. package/dist/compiler/dtdl.cjs +10 -7
  209. package/dist/compiler/dtdl.js +7 -4
  210. package/dist/compiler/gltf-pipeline.cjs +9 -9
  211. package/dist/compiler/gltf-pipeline.js +2 -2
  212. package/dist/compiler/godot.cjs +9 -6
  213. package/dist/compiler/godot.js +8 -5
  214. package/dist/compiler/incremental.cjs +12 -7
  215. package/dist/compiler/incremental.js +7 -2
  216. package/dist/compiler/index.cjs +3550 -268
  217. package/dist/compiler/index.d.ts +404 -21
  218. package/dist/compiler/index.js +3280 -138
  219. package/dist/compiler/ios.cjs +11 -8
  220. package/dist/compiler/ios.js +9 -6
  221. package/dist/compiler/llm-provider-capabilities.cjs +25 -0
  222. package/dist/compiler/llm-provider-capabilities.d.ts +43 -0
  223. package/dist/compiler/llm-provider-capabilities.js +8 -0
  224. package/dist/compiler/multi-layer.cjs +14 -10
  225. package/dist/compiler/multi-layer.js +13 -9
  226. package/dist/compiler/nodetoy.cjs +5 -5
  227. package/dist/compiler/nodetoy.js +2 -2
  228. package/dist/compiler/openxr.cjs +10 -6
  229. package/dist/compiler/openxr.js +9 -5
  230. package/dist/compiler/playcanvas.cjs +10 -7
  231. package/dist/compiler/playcanvas.js +9 -6
  232. package/dist/compiler/r3f.cjs +17 -13
  233. package/dist/compiler/r3f.d.ts +22 -0
  234. package/dist/compiler/r3f.js +12 -8
  235. package/dist/compiler/remotion.cjs +1 -1
  236. package/dist/compiler/remotion.js +1 -1
  237. package/dist/compiler/reproducibility.cjs +1 -1
  238. package/dist/compiler/reproducibility.js +1 -1
  239. package/dist/compiler/sdf.cjs +10 -7
  240. package/dist/compiler/sdf.js +8 -5
  241. package/dist/compiler/semantic-scene.cjs +1 -1
  242. package/dist/compiler/semantic-scene.js +1 -1
  243. package/dist/compiler/state.cjs +9 -5
  244. package/dist/compiler/state.js +7 -3
  245. package/dist/compiler/trait-composition.cjs +11 -7
  246. package/dist/compiler/trait-composition.js +7 -3
  247. package/dist/compiler/unity.cjs +10 -6
  248. package/dist/compiler/unity.js +9 -5
  249. package/dist/compiler/unreal.cjs +11 -7
  250. package/dist/compiler/unreal.js +9 -5
  251. package/dist/compiler/urdf.cjs +20 -13
  252. package/dist/compiler/urdf.js +8 -5
  253. package/dist/compiler/usd-physics.cjs +10 -7
  254. package/dist/compiler/usd-physics.js +7 -4
  255. package/dist/compiler/visionos.cjs +10 -6
  256. package/dist/compiler/visionos.js +9 -5
  257. package/dist/compiler/vrchat.cjs +10 -7
  258. package/dist/compiler/vrchat.js +8 -5
  259. package/dist/compiler/vrr.cjs +10 -7
  260. package/dist/compiler/vrr.js +8 -5
  261. package/dist/compiler/wasm.cjs +13 -10
  262. package/dist/compiler/wasm.js +8 -5
  263. package/dist/compiler/webgpu.cjs +9 -6
  264. package/dist/compiler/webgpu.js +8 -5
  265. package/dist/constants.d.ts +3 -2
  266. package/dist/coordinators/index.cjs +1266 -0
  267. package/dist/coordinators/index.d.ts +260 -0
  268. package/dist/coordinators/index.js +1259 -0
  269. package/dist/debugger.cjs +9 -7
  270. package/dist/debugger.js +7 -5
  271. package/dist/entries/interop.cjs +23 -21
  272. package/dist/entries/interop.js +5 -3
  273. package/dist/entries/scripting.cjs +18 -18
  274. package/dist/entries/scripting.js +8 -8
  275. package/dist/hololand/index.cjs +146 -0
  276. package/dist/hololand/index.d.ts +70 -0
  277. package/dist/hololand/index.js +5 -0
  278. package/dist/index.cjs +20332 -18121
  279. package/dist/index.d.ts +1477 -40
  280. package/dist/index.js +19451 -17638
  281. package/dist/math/tropical-spmv.cjs +45 -0
  282. package/dist/math/tropical-spmv.js +4 -0
  283. package/dist/math/vec3.cjs +14 -14
  284. package/dist/math/vec3.js +2 -2
  285. package/dist/{ml-dsa-PHCWUBPX.cjs → ml-dsa-FSKBTE3W.cjs} +177 -90
  286. package/dist/{ml-dsa-WYLJHJO6.js → ml-dsa-Z7JDKW4L.js} +158 -71
  287. package/dist/paper-0c-spike/index.cjs +150 -0
  288. package/dist/paper-0c-spike/index.d.ts +29 -0
  289. package/dist/paper-0c-spike/index.js +141 -0
  290. package/dist/parser.cjs +45 -11
  291. package/dist/parser.d.ts +11 -0
  292. package/dist/parser.js +10 -8
  293. package/dist/{playwright-RL6GY4F7.cjs → playwright-3AT3AKTV.cjs} +1985 -1985
  294. package/dist/{playwright-5OSAPTNH.js → playwright-VZPDVUEQ.js} +3 -3
  295. package/dist/reconstruction/index.cjs +153 -0
  296. package/dist/reconstruction/index.d.ts +105 -0
  297. package/dist/reconstruction/index.js +8 -0
  298. package/dist/runtime.cjs +7 -5
  299. package/dist/runtime.js +6 -4
  300. package/dist/self-improvement/index.cjs +563 -0
  301. package/dist/self-improvement/index.js +545 -0
  302. package/dist/storage/index.cjs +10 -9
  303. package/dist/storage/index.js +3 -2
  304. package/dist/testing.cjs +25 -0
  305. package/dist/testing.d.ts +70 -0
  306. package/dist/testing.js +4 -0
  307. package/dist/tools/index.d.ts +22 -1
  308. package/dist/traitDocs/traitDocs.cjs +33 -0
  309. package/dist/traitDocs/traitDocs.d.ts +69 -0
  310. package/dist/traitDocs/traitDocs.js +7 -0
  311. package/dist/traits/botanical-lotus.cjs +41 -0
  312. package/dist/traits/botanical-lotus.d.ts +172 -0
  313. package/dist/traits/botanical-lotus.js +4 -0
  314. package/dist/traits/engines/index.cjs +520 -0
  315. package/dist/traits/engines/index.js +380 -0
  316. package/dist/traits/index.cjs +17630 -7881
  317. package/dist/traits/index.d.ts +197 -0
  318. package/dist/traits/index.js +16573 -7193
  319. package/dist/traits/simulation-solver-factory.cjs +13 -0
  320. package/dist/traits/simulation-solver-factory.d.ts +23 -0
  321. package/dist/traits/simulation-solver-factory.js +4 -0
  322. package/dist/traits/webcam-gaze.cjs +35 -0
  323. package/dist/traits/webcam-gaze.d.ts +17 -0
  324. package/dist/traits/webcam-gaze.js +4 -0
  325. package/dist/type-checker.cjs +6 -5
  326. package/dist/type-checker.js +4 -3
  327. package/dist/world/index.cjs +947 -0
  328. package/dist/world/index.d.ts +147 -0
  329. package/dist/world/index.js +939 -0
  330. package/dist/world-model/index.cjs +1446 -0
  331. package/dist/world-model/index.d.ts +119 -0
  332. package/dist/world-model/index.js +1414 -0
  333. package/dist/wot/index.cjs +29 -0
  334. package/dist/wot/index.js +4 -0
  335. package/package.json +153 -61
  336. package/dist/GLTFPipeline-DEN36VNK.js +0 -12
  337. package/dist/GLTFPipeline-YPCAK236.cjs +0 -33
  338. package/dist/chunk-4XSNJCLC.cjs +0 -1859
  339. package/dist/chunk-A7PIMZGU.js +0 -263
  340. package/dist/chunk-BWFJEM5A.js +0 -5419
  341. package/dist/chunk-CBJSLA2E.cjs +0 -5423
  342. package/dist/chunk-K3JDKWGI.cjs +0 -270
  343. package/dist/chunk-LSW7P7ML.js +0 -3675
  344. package/dist/chunk-MEASWI2Y.js +0 -126
  345. package/dist/chunk-NCUKG4SK.cjs +0 -3075
  346. package/dist/chunk-Q5JT3YML.cjs +0 -129
  347. package/dist/chunk-QGKNANZ3.js +0 -3071
  348. package/dist/chunk-S2N5TNMA.js +0 -1855
  349. package/dist/chunk-TSH3MSQU.cjs +0 -129
  350. package/dist/chunk-WGMEAYBG.js +0 -126
  351. package/dist/chunk-X6SEAXAX.cjs +0 -3681
@@ -0,0 +1,432 @@
1
+ 'use strict';
2
+
3
+ // src/traits/engines/tensor-ops.ts
4
+ function sizeOf(shape) {
5
+ return shape.reduce((a, b) => a * b, 1);
6
+ }
7
+ function createTensor(shape, data) {
8
+ if (!Array.isArray(shape) || shape.length === 0 || shape.some((d) => !Number.isInteger(d) || d <= 0)) {
9
+ throw new Error(`tensor-ops: invalid shape ${JSON.stringify(shape)}`);
10
+ }
11
+ const size = sizeOf(shape);
12
+ const buf = new Float32Array(size);
13
+ if (data) {
14
+ const n = Math.min(size, data.length);
15
+ for (let i = 0; i < n; i++) buf[i] = data[i];
16
+ }
17
+ return { shape: shape.slice(), data: buf };
18
+ }
19
+ function add(a, b) {
20
+ if (a.data.length !== b.data.length) {
21
+ throw new Error(
22
+ `tensor-ops: add shape mismatch ${JSON.stringify(a.shape)} vs ${JSON.stringify(b.shape)}`
23
+ );
24
+ }
25
+ const out = new Float32Array(a.data.length);
26
+ for (let i = 0; i < out.length; i++) out[i] = a.data[i] + b.data[i];
27
+ return { shape: a.shape.slice(), data: out };
28
+ }
29
+ function matmul(a, b) {
30
+ if (a.shape.length !== 2 || b.shape.length !== 2) {
31
+ throw new Error("tensor-ops: matmul requires 2D tensors");
32
+ }
33
+ const [m, k] = a.shape;
34
+ const [k2, n] = b.shape;
35
+ if (k !== k2) {
36
+ throw new Error(`tensor-ops: matmul inner dim mismatch ${k} vs ${k2}`);
37
+ }
38
+ const out = new Float32Array(m * n);
39
+ for (let i = 0; i < m; i++) {
40
+ for (let j = 0; j < n; j++) {
41
+ let acc = 0;
42
+ for (let p = 0; p < k; p++) acc += a.data[i * k + p] * b.data[p * n + j];
43
+ out[i * n + j] = acc;
44
+ }
45
+ }
46
+ return { shape: [m, n], data: out };
47
+ }
48
+
49
+ // src/traits/engines/pfnn-network.ts
50
+ var PHASE_CONTROL_POINTS = 4;
51
+ var HIDDEN_DIM = 64;
52
+ function mulberry32(seed) {
53
+ let a = seed >>> 0;
54
+ return () => {
55
+ a |= 0;
56
+ a = a + 1831565813 | 0;
57
+ let t = Math.imul(a ^ a >>> 15, 1 | a);
58
+ t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
59
+ return ((t ^ t >>> 14) >>> 0) / 4294967296;
60
+ };
61
+ }
62
+ function eluInPlace(data) {
63
+ for (let i = 0; i < data.length; i++) {
64
+ const x = data[i];
65
+ data[i] = x >= 0 ? x : Math.exp(x) - 1;
66
+ }
67
+ }
68
+ function initWeight(rng, inDim, outDim) {
69
+ const limit = Math.sqrt(6 / (inDim + outDim));
70
+ const data = new Float32Array(inDim * outDim);
71
+ for (let i = 0; i < data.length; i++) data[i] = (rng() * 2 - 1) * limit;
72
+ return { shape: [inDim, outDim], data };
73
+ }
74
+ function initBias(rng, outDim) {
75
+ const data = new Float32Array(outDim);
76
+ for (let i = 0; i < data.length; i++) data[i] = (rng() * 2 - 1) * 0.01;
77
+ return { shape: [1, outDim], data };
78
+ }
79
+ var PfnnNetwork = class {
80
+ constructor(inputDim, outputDim, seed = 2654435769, hiddenDim = HIDDEN_DIM) {
81
+ this.inputDim = inputDim;
82
+ this.outputDim = outputDim;
83
+ this.hiddenDim = hiddenDim;
84
+ const rng = mulberry32(seed);
85
+ this.controlPoints = [];
86
+ for (let c = 0; c < PHASE_CONTROL_POINTS; c++) {
87
+ const layers = [
88
+ { weight: initWeight(rng, inputDim, hiddenDim), bias: initBias(rng, hiddenDim) },
89
+ { weight: initWeight(rng, hiddenDim, hiddenDim), bias: initBias(rng, hiddenDim) },
90
+ { weight: initWeight(rng, hiddenDim, outputDim), bias: initBias(rng, outputDim) }
91
+ ];
92
+ this.controlPoints.push({ layers });
93
+ }
94
+ }
95
+ /**
96
+ * Export the raw weights — used by the .onnx provisioning script so the
97
+ * ONNX graph carries the identical numbers. Returned arrays are copies.
98
+ */
99
+ exportWeights() {
100
+ return {
101
+ controlPoints: this.controlPoints.map((cp) => ({
102
+ layers: cp.layers.map((l) => ({
103
+ weight: Array.from(l.weight.data),
104
+ bias: Array.from(l.bias.data),
105
+ shape: [l.weight.shape[0], l.weight.shape[1]]
106
+ }))
107
+ }))
108
+ };
109
+ }
110
+ /**
111
+ * Cyclic cubic Catmull-Rom blend of the four control points at phase φ.
112
+ * Holden 2017 eq. 4: the four banks are knots on a periodic spline indexed
113
+ * by φ·4, and the fractional part drives a Catmull-Rom interpolation. We
114
+ * blend per-layer weight and bias buffers.
115
+ */
116
+ blendLayer(layerIdx, phase) {
117
+ const t = (phase % 1 + 1) % 1;
118
+ const scaled = t * PHASE_CONTROL_POINTS;
119
+ const k = Math.floor(scaled);
120
+ const f = scaled - k;
121
+ const mod = (n) => (n % PHASE_CONTROL_POINTS + PHASE_CONTROL_POINTS) % PHASE_CONTROL_POINTS;
122
+ const p0 = this.controlPoints[mod(k - 1)].layers[layerIdx];
123
+ const p1 = this.controlPoints[mod(k)].layers[layerIdx];
124
+ const p2 = this.controlPoints[mod(k + 1)].layers[layerIdx];
125
+ const p3 = this.controlPoints[mod(k + 2)].layers[layerIdx];
126
+ const f2 = f * f;
127
+ const f3 = f2 * f;
128
+ const w0 = -0.5 * f3 + f2 - 0.5 * f;
129
+ const w1 = 1.5 * f3 - 2.5 * f2 + 1;
130
+ const w2 = -1.5 * f3 + 2 * f2 + 0.5 * f;
131
+ const w3 = 0.5 * f3 - 0.5 * f2;
132
+ const blend = (a, b, c, d) => {
133
+ const out = new Float32Array(a.data.length);
134
+ for (let i = 0; i < out.length; i++) {
135
+ out[i] = w0 * a.data[i] + w1 * b.data[i] + w2 * c.data[i] + w3 * d.data[i];
136
+ }
137
+ return { shape: a.shape.slice(), data: out };
138
+ };
139
+ return {
140
+ weight: blend(p0.weight, p1.weight, p2.weight, p3.weight),
141
+ bias: blend(p0.bias, p1.bias, p2.bias, p3.bias)
142
+ };
143
+ }
144
+ /**
145
+ * Run a real forward pass. `input` is a Float32Array of length inputDim.
146
+ * `phase` ∈ [0,1) selects the blended weights. Returns a Float32Array of
147
+ * length outputDim. Pure, deterministic, no native deps.
148
+ */
149
+ forward(input, phase) {
150
+ if (input.length !== this.inputDim) {
151
+ throw new Error(
152
+ `PfnnNetwork.forward: input length ${input.length} != inputDim ${this.inputDim}`
153
+ );
154
+ }
155
+ let x = createTensor([1, this.inputDim], input);
156
+ const layer0 = this.blendLayer(0, phase);
157
+ const layer1 = this.blendLayer(1, phase);
158
+ const layer2 = this.blendLayer(2, phase);
159
+ x = add(matmul(x, layer0.weight), layer0.bias);
160
+ eluInPlace(x.data);
161
+ x = add(matmul(x, layer1.weight), layer1.bias);
162
+ eluInPlace(x.data);
163
+ x = add(matmul(x, layer2.weight), layer2.bias);
164
+ return x.data;
165
+ }
166
+ /**
167
+ * Forward pass using ONLY control point `cp` (no phase blending). This is the
168
+ * exact computation the provisioned .onnx graph encodes (it bakes a single
169
+ * control point). Used by the pure-JS ↔ ONNX numerical-parity test to prove
170
+ * both paths run the identical genuine forward pass.
171
+ */
172
+ forwardControlPoint(input, cp = 0) {
173
+ if (input.length !== this.inputDim) {
174
+ throw new Error(
175
+ `PfnnNetwork.forwardControlPoint: input length ${input.length} != inputDim ${this.inputDim}`
176
+ );
177
+ }
178
+ const layers = this.controlPoints[(cp % PHASE_CONTROL_POINTS + PHASE_CONTROL_POINTS) % PHASE_CONTROL_POINTS].layers;
179
+ let x = createTensor([1, this.inputDim], input);
180
+ x = add(matmul(x, layers[0].weight), layers[0].bias);
181
+ eluInPlace(x.data);
182
+ x = add(matmul(x, layers[1].weight), layers[1].bias);
183
+ eluInPlace(x.data);
184
+ x = add(matmul(x, layers[2].weight), layers[2].bias);
185
+ return x.data;
186
+ }
187
+ };
188
+ var BUNDLED_MODEL_SEED = 2654435769;
189
+ function createBundledPfnn(inputDim, outputDim) {
190
+ return new PfnnNetwork(inputDim, outputDim, BUNDLED_MODEL_SEED);
191
+ }
192
+
193
+ // src/traits/engines/onnx-adapter.ts
194
+ var NoOpInferenceAdapter = class {
195
+ constructor() {
196
+ this.name = "NoOpInferenceAdapter";
197
+ this.preferredProvider = "cpu";
198
+ this.loaded = false;
199
+ this.modelUrl = null;
200
+ }
201
+ async load(modelUrl) {
202
+ this.modelUrl = modelUrl;
203
+ this.loaded = true;
204
+ }
205
+ runSync(request) {
206
+ if (!this.loaded) {
207
+ throw new Error("NoOpInferenceAdapter: load() must be called before run()");
208
+ }
209
+ const inputNames = Object.keys(request.inputs);
210
+ if (inputNames.length === 0) {
211
+ throw new Error("NoOpInferenceAdapter: at least one input required");
212
+ }
213
+ const firstInput = request.inputs[inputNames[0]];
214
+ const outputNames = request.outputs && request.outputs.length > 0 ? request.outputs : ["output"];
215
+ const outputs = {};
216
+ for (const name of outputNames) {
217
+ outputs[name] = {
218
+ data: new Float32Array(firstInput.data.length),
219
+ shape: firstInput.shape
220
+ };
221
+ }
222
+ return {
223
+ outputs,
224
+ durationMs: 0,
225
+ providerUsed: this.preferredProvider
226
+ };
227
+ }
228
+ async run(request) {
229
+ return this.runSync(request);
230
+ }
231
+ dispose() {
232
+ this.loaded = false;
233
+ this.modelUrl = null;
234
+ }
235
+ /** Returns the URL the adapter was loaded with — diagnostic only. */
236
+ get loadedModelUrl() {
237
+ return this.modelUrl;
238
+ }
239
+ };
240
+ function createNoOpInferenceAdapter() {
241
+ return new NoOpInferenceAdapter();
242
+ }
243
+ var PureJsInferenceAdapter = class {
244
+ constructor(inputDim, outputDim) {
245
+ this.inputDim = inputDim;
246
+ this.outputDim = outputDim;
247
+ this.name = "PureJsInferenceAdapter";
248
+ this.preferredProvider = "cpu";
249
+ this.loaded = false;
250
+ this.net = null;
251
+ this.modelUrl = null;
252
+ }
253
+ async load(modelUrl) {
254
+ this.modelUrl = modelUrl;
255
+ if (this.inputDim != null && this.outputDim != null) {
256
+ this.net = createBundledPfnn(this.inputDim, this.outputDim);
257
+ }
258
+ this.loaded = true;
259
+ }
260
+ ensureNet(inputDim) {
261
+ if (this.net && this.net.inputDim === inputDim) return this.net;
262
+ const outDim = this.outputDim ?? MOTION_OUTPUT_DIM_DEFAULT;
263
+ this.net = createBundledPfnn(inputDim, outDim);
264
+ return this.net;
265
+ }
266
+ /** Recover the locomotion phase from the engine's phase channels. */
267
+ phaseFromInput(data) {
268
+ const n = data.length;
269
+ const sinP = data[n - 4] ?? 0;
270
+ const cosP = data[n - 3] ?? 1;
271
+ return (Math.atan2(sinP, cosP) / (2 * Math.PI) + 1) % 1;
272
+ }
273
+ runSync(request) {
274
+ if (!this.loaded) {
275
+ throw new Error("PureJsInferenceAdapter: load() must be called before run()");
276
+ }
277
+ const inputNames = Object.keys(request.inputs);
278
+ if (inputNames.length === 0) {
279
+ throw new Error("PureJsInferenceAdapter: at least one input required");
280
+ }
281
+ const input = request.inputs[inputNames[0]];
282
+ const net = this.ensureNet(input.data.length);
283
+ const phase = this.phaseFromInput(input.data);
284
+ const start = nowMs();
285
+ const out = net.forward(input.data, phase);
286
+ const durationMs = nowMs() - start;
287
+ const outName = request.outputs && request.outputs.length > 0 ? request.outputs[0] : "motion_output";
288
+ return {
289
+ outputs: { [outName]: { data: out, shape: [1, out.length] } },
290
+ durationMs,
291
+ providerUsed: this.preferredProvider
292
+ };
293
+ }
294
+ async run(request) {
295
+ return this.runSync(request);
296
+ }
297
+ dispose() {
298
+ this.loaded = false;
299
+ this.net = null;
300
+ this.modelUrl = null;
301
+ }
302
+ };
303
+ var MOTION_OUTPUT_DIM_DEFAULT = 50;
304
+ function nowMs() {
305
+ return typeof performance !== "undefined" && performance.now ? performance.now() : Date.now();
306
+ }
307
+ function createPureJsInferenceAdapter(inputDim, outputDim) {
308
+ return new PureJsInferenceAdapter(inputDim, outputDim);
309
+ }
310
+ var OnnxNodeInferenceAdapter = class {
311
+ constructor(preferredProvider = "cpu") {
312
+ this.name = "OnnxNodeInferenceAdapter";
313
+ this.loaded = false;
314
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
315
+ this.session = null;
316
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
317
+ this.ort = null;
318
+ this.resolvedPath = null;
319
+ this.preferredProvider = preferredProvider;
320
+ }
321
+ async load(modelUrl) {
322
+ const path = await resolveOnnxModelPath(modelUrl);
323
+ if (!path) {
324
+ throw new Error(
325
+ `OnnxNodeInferenceAdapter: no .onnx model file resolved for "${modelUrl}". Provision it with scripts/provision-motion-model.mjs or set HOLOSCRIPT_MOTION_MODELS_DIR.`
326
+ );
327
+ }
328
+ this.ort = await import('onnxruntime-node');
329
+ this.session = await this.ort.InferenceSession.create(path);
330
+ this.resolvedPath = path;
331
+ this.loaded = true;
332
+ }
333
+ async run(request) {
334
+ if (!this.loaded || !this.session || !this.ort) {
335
+ throw new Error("OnnxNodeInferenceAdapter: load() must be called before run()");
336
+ }
337
+ const inputNames = Object.keys(request.inputs);
338
+ if (inputNames.length === 0) {
339
+ throw new Error("OnnxNodeInferenceAdapter: at least one input required");
340
+ }
341
+ const feeds = {};
342
+ const sessionInputs = this.session.inputNames ?? [];
343
+ const requestEntries = Object.entries(request.inputs);
344
+ requestEntries.forEach(([name, tensor], i) => {
345
+ const target = sessionInputs[i] ?? name;
346
+ feeds[target] = new this.ort.Tensor("float32", tensor.data, Array.from(tensor.shape));
347
+ });
348
+ const start = nowMs();
349
+ const results = await this.session.run(feeds);
350
+ const durationMs = nowMs() - start;
351
+ const sessionOutputs = this.session.outputNames ?? Object.keys(results);
352
+ const wanted = request.outputs && request.outputs.length > 0 ? request.outputs : sessionOutputs;
353
+ const outputs = {};
354
+ wanted.forEach((name, i) => {
355
+ const srcName = sessionOutputs[i] ?? name;
356
+ const t = results[srcName] ?? results[name];
357
+ if (t) {
358
+ outputs[name] = { data: t.data, shape: t.dims.slice() };
359
+ }
360
+ });
361
+ return { outputs, durationMs, providerUsed: this.preferredProvider };
362
+ }
363
+ dispose() {
364
+ if (this.session && typeof this.session.release === "function") {
365
+ try {
366
+ void this.session.release();
367
+ } catch {
368
+ }
369
+ }
370
+ this.session = null;
371
+ this.ort = null;
372
+ this.resolvedPath = null;
373
+ this.loaded = false;
374
+ }
375
+ /** The on-disk path the session was created from — diagnostic only. */
376
+ get loadedModelPath() {
377
+ return this.resolvedPath;
378
+ }
379
+ };
380
+ function createOnnxNodeInferenceAdapter(preferredProvider = "cpu") {
381
+ return new OnnxNodeInferenceAdapter(preferredProvider);
382
+ }
383
+ async function resolveOnnxModelPath(modelUrl) {
384
+ let fs;
385
+ let path;
386
+ try {
387
+ fs = await import('fs');
388
+ path = await import('path');
389
+ } catch {
390
+ return null;
391
+ }
392
+ const exists = (p) => {
393
+ try {
394
+ return fs.existsSync(p);
395
+ } catch {
396
+ return false;
397
+ }
398
+ };
399
+ if (!modelUrl.startsWith("bundled://") && exists(modelUrl)) return modelUrl;
400
+ const id = modelUrl.startsWith("bundled://") ? modelUrl.slice("bundled://".length) : path.basename(modelUrl);
401
+ const fileName = id.endsWith(".onnx") ? id : `${id}.onnx`;
402
+ const candidates = [];
403
+ const envDir = process?.env?.HOLOSCRIPT_MOTION_MODELS_DIR?.trim();
404
+ if (envDir) candidates.push(path.join(path.resolve(envDir), fileName));
405
+ let dir = process?.cwd?.() ?? ".";
406
+ for (let i = 0; i < 8; i++) {
407
+ candidates.push(path.join(dir, ".models", "motion", fileName));
408
+ const parent = path.dirname(dir);
409
+ if (parent === dir) break;
410
+ dir = parent;
411
+ }
412
+ return candidates.find(exists) ?? null;
413
+ }
414
+
415
+ exports.BUNDLED_MODEL_SEED = BUNDLED_MODEL_SEED;
416
+ exports.HIDDEN_DIM = HIDDEN_DIM;
417
+ exports.NoOpInferenceAdapter = NoOpInferenceAdapter;
418
+ exports.OnnxNodeInferenceAdapter = OnnxNodeInferenceAdapter;
419
+ exports.PHASE_CONTROL_POINTS = PHASE_CONTROL_POINTS;
420
+ exports.PfnnNetwork = PfnnNetwork;
421
+ exports.PureJsInferenceAdapter = PureJsInferenceAdapter;
422
+ exports.add = add;
423
+ exports.createBundledPfnn = createBundledPfnn;
424
+ exports.createNoOpInferenceAdapter = createNoOpInferenceAdapter;
425
+ exports.createOnnxNodeInferenceAdapter = createOnnxNodeInferenceAdapter;
426
+ exports.createPureJsInferenceAdapter = createPureJsInferenceAdapter;
427
+ exports.createTensor = createTensor;
428
+ exports.eluInPlace = eluInPlace;
429
+ exports.matmul = matmul;
430
+ exports.resolveOnnxModelPath = resolveOnnxModelPath;
431
+ //# sourceMappingURL=chunk-XJAN7CZG.cjs.map
432
+ //# sourceMappingURL=chunk-XJAN7CZG.cjs.map
@@ -0,0 +1,121 @@
1
+ // src/ReactiveState.ts
2
+ var ReactiveState = class {
3
+ constructor(initialState = {}) {
4
+ this.subscribers = /* @__PURE__ */ new Set();
5
+ this.state = { ...initialState };
6
+ this.proxy = this.createReactiveProxy(this.state);
7
+ }
8
+ createReactiveProxy(target) {
9
+ const self = this;
10
+ return new Proxy(target, {
11
+ get(obj, key) {
12
+ const val = obj[key];
13
+ if (val && typeof val === "object" && !Array.isArray(val)) {
14
+ return self.createReactiveProxy(val);
15
+ }
16
+ return val;
17
+ },
18
+ set(obj, key, value) {
19
+ const oldVal = obj[key];
20
+ obj[key] = value;
21
+ if (oldVal !== value) {
22
+ self.notify();
23
+ }
24
+ return true;
25
+ }
26
+ });
27
+ }
28
+ get(key) {
29
+ return this.proxy[key];
30
+ }
31
+ set(key, value) {
32
+ this.proxy[key] = value;
33
+ }
34
+ has(key) {
35
+ return this.proxy[key] !== void 0;
36
+ }
37
+ update(updates) {
38
+ Object.assign(this.proxy, updates);
39
+ }
40
+ subscribe(callback) {
41
+ this.subscribers.add(callback);
42
+ return () => this.subscribers.delete(callback);
43
+ }
44
+ getSnapshot() {
45
+ return { ...this.state };
46
+ }
47
+ getProxy() {
48
+ return this.proxy;
49
+ }
50
+ notify() {
51
+ this.subscribers.forEach((cb) => cb(this.getSnapshot()));
52
+ }
53
+ };
54
+ var ExpressionEvaluator = class {
55
+ constructor(context = {}) {
56
+ this.context = context;
57
+ }
58
+ evaluate(expression) {
59
+ if (typeof expression !== "string") return expression;
60
+ const dangerousPatterns = [
61
+ /\beval\s*\(/,
62
+ /\brequire\s*\(/,
63
+ /\bimport\s*\(/,
64
+ /\bprocess\b/,
65
+ /\bglobalThis?\b/,
66
+ /\b__dirname\b/,
67
+ /\b__filename\b/,
68
+ /\bfs\b/,
69
+ /\bchild_process\b/,
70
+ // Prototype chain / constructor escape
71
+ /\bconstructor\b/,
72
+ /\b__proto__\b/,
73
+ /\bprototype\b/,
74
+ /\bObject\s*\.\s*(create|definePropert|getProto|assign|setProto)/,
75
+ /\bReflect\b/,
76
+ /\bProxy\b/,
77
+ /\bFunction\b/,
78
+ /\barguments\b/
79
+ ];
80
+ for (const pattern of dangerousPatterns) {
81
+ if (pattern.test(expression)) {
82
+ return void 0;
83
+ }
84
+ }
85
+ if (expression.includes("${")) {
86
+ const trimmed = expression.trim();
87
+ const match = trimmed.match(/^\$\{([^}]+)\}$/);
88
+ if (match) {
89
+ return this.evaluate(match[1]);
90
+ }
91
+ return this.interpolate(expression);
92
+ }
93
+ const keys = Object.keys(this.context);
94
+ const values = Object.values(this.context);
95
+ try {
96
+ const fn = new Function(...keys, `"use strict"; return (${expression});`);
97
+ return fn.call(null, ...values);
98
+ } catch (_e) {
99
+ return expression;
100
+ }
101
+ }
102
+ interpolate(str) {
103
+ return str.replace(/\$\{([^}]+)\}/g, (_, expr) => {
104
+ const val = this.evaluate(expr);
105
+ return val !== void 0 ? String(val) : "";
106
+ });
107
+ }
108
+ updateContext(updates) {
109
+ Object.assign(this.context, updates);
110
+ }
111
+ setContext(context) {
112
+ this.context = { ...context };
113
+ }
114
+ };
115
+ function createState(initial = {}) {
116
+ return new ReactiveState(initial);
117
+ }
118
+
119
+ export { ExpressionEvaluator, ReactiveState, createState };
120
+ //# sourceMappingURL=chunk-XL6INWKT.js.map
121
+ //# sourceMappingURL=chunk-XL6INWKT.js.map
@@ -1,5 +1,5 @@
1
- import { HoloScriptRuntime } from './chunk-LSW7P7ML.js';
2
- import { HoloScriptCodeParser } from './chunk-BU7VWW2K.js';
1
+ import { HoloScriptRuntime } from './chunk-IHESJZSW.js';
2
+ import { HoloScriptCodeParser } from './chunk-URG2SJLK.js';
3
3
 
4
4
  // src/HoloScriptDebugger.ts
5
5
  var HoloScriptDebugger = class {
@@ -417,5 +417,5 @@ function createDebugger(runtime) {
417
417
  }
418
418
 
419
419
  export { HoloScriptDebugger, createDebugger };
420
- //# sourceMappingURL=chunk-E3UALNFA.js.map
421
- //# sourceMappingURL=chunk-E3UALNFA.js.map
420
+ //# sourceMappingURL=chunk-XMWZG36H.js.map
421
+ //# sourceMappingURL=chunk-XMWZG36H.js.map
@@ -1,3 +1,5 @@
1
+ import { init_safeJsonParse, readJson } from './chunk-VVKVQZI6.js';
2
+
1
3
  // src/traits/traitConstraints.ts
2
4
  var BUILTIN_CONSTRAINTS = [
3
5
  // =============================================================================
@@ -593,6 +595,7 @@ var BUILTIN_CONSTRAINTS = [
593
595
  ];
594
596
 
595
597
  // src/traits/constraintConfig.ts
598
+ init_safeJsonParse();
596
599
  function loadConstraintsFromConfig(config) {
597
600
  if (!config || typeof config !== "object") return [];
598
601
  const raw = config;
@@ -617,7 +620,7 @@ async function loadConstraintsFromFile(configPath = "holoscript.config.json") {
617
620
  try {
618
621
  const { readFileSync } = await import('fs');
619
622
  const raw = readFileSync(configPath, "utf-8");
620
- const parsed = JSON.parse(raw);
623
+ const parsed = readJson(raw);
621
624
  return loadConstraintsFromConfig(parsed);
622
625
  } catch {
623
626
  return [];
@@ -625,5 +628,5 @@ async function loadConstraintsFromFile(configPath = "holoscript.config.json") {
625
628
  }
626
629
 
627
630
  export { BUILTIN_CONSTRAINTS, loadConstraintsFromConfig, loadConstraintsFromFile };
628
- //# sourceMappingURL=chunk-BKIGPPVM.js.map
629
- //# sourceMappingURL=chunk-BKIGPPVM.js.map
631
+ //# sourceMappingURL=chunk-XSFNHP2E.js.map
632
+ //# sourceMappingURL=chunk-XSFNHP2E.js.map
@@ -1,4 +1,4 @@
1
- import { __esm } from './chunk-2CWOLHTE.js';
1
+ import { __esm } from './chunk-OL46QLBJ.js';
2
2
 
3
3
  // src/traits/visual/presets/material-properties.visual.ts
4
4
  var MATERIAL_PROPERTIES_VISUALS;
@@ -1541,6 +1541,12 @@ var init_gems_minerals_visual = __esm({
1541
1541
  tags: ["mineral", "transparent", "reflective"],
1542
1542
  layer: "base_material"
1543
1543
  },
1544
+ gem_resonance: {
1545
+ emissive: { color: "#88ffcc", intensity: 0.25 },
1546
+ opacity: 0.72,
1547
+ tags: ["gem", "audio", "harmonic"],
1548
+ layer: "visual_effect"
1549
+ },
1544
1550
  gold_material: {
1545
1551
  material: { roughness: 0.3, metalness: 1, color: "#FFD700", envMapIntensity: 1.5 },
1546
1552
  tags: ["metallic", "precious"],
@@ -1877,6 +1883,22 @@ var init_visual_effects_visual = __esm({
1877
1883
  tags: ["transparent", "emissive", "scifi"],
1878
1884
  layer: "visual_effect"
1879
1885
  },
1886
+ holographic_mesh: {
1887
+ material: {
1888
+ roughness: 0.02,
1889
+ metalness: 0.2,
1890
+ transparent: true,
1891
+ opacity: 0.65,
1892
+ transmission: 0.75,
1893
+ ior: 1.45,
1894
+ emissive: "#00D6FF",
1895
+ emissiveIntensity: 0.9,
1896
+ iridescence: 0.35
1897
+ },
1898
+ shader: "hologram",
1899
+ tags: ["transparent", "emissive", "refractive", "mesh", "scifi"],
1900
+ layer: "visual_effect"
1901
+ },
1880
1902
  outlined: {
1881
1903
  tags: ["post-process", "edge"],
1882
1904
  layer: "visual_effect"
@@ -9658,5 +9680,5 @@ var init_xr_platform_visual = __esm({
9658
9680
  });
9659
9681
 
9660
9682
  export { ACCESSIBILITY_EXTENDED_VISUALS, ACCESSIBILITY_VISUALS, AGE_CONDITION_VISUALS, ANIMALS_VISUALS, ARCHITECTURE_REALESTATE_VISUALS, AUDIO_VISUALS, CONSTRUCTION_BUILDING_VISUALS, CONTAINERS_STORAGE_VISUALS, COOKING_FOOD_VISUALS, CORE_VR_INTERACTION_VISUALS, CREATURES_MYTHICAL_VISUALS, DATA_VISUALIZATION_VISUALS, EDUCATION_LEARNING_VISUALS, EMOTION_MOOD_VISUALS, ENVIRONMENTAL_BIOME_VISUALS, ENVIRONMENT_INPUT_VISUALS, FABRIC_CLOTH_VISUALS, FURNITURE_DECOR_VISUALS, GAME_MECHANICS_VISUALS, GEMS_MINERALS_VISUALS, GEOSPATIAL_WEB3_VISUALS, HEALTHCARE_MEDICAL_VISUALS, HUMANOID_AVATAR_VISUALS, INTELLIGENCE_BEHAVIOR_VISUALS, INTEROP_COPRESENCE_VISUALS, IOT_AUTONOMOUS_AGENTS_VISUALS, LIGHTING_VISUALS, LOCOMOTION_MOVEMENT_VISUALS, MAGIC_FANTASY_VISUALS, MARITIME_NAVAL_VISUALS, MATERIAL_PROPERTIES_VISUALS, MEASUREMENT_SENSING_VISUALS, MEDIA_ANALYTICS_VISUALS, MULTISENSORY_HAPTIC_VISUALS, MUSICAL_SOUND_VISUALS, MUSIC_PERFORMANCE_VISUALS, NARRATIVE_STORYTELLING_VISUALS, NATURE_LIFE_VISUALS, NETWORKING_AI_VISUALS, NPC_ROLES_VISUALS, OBJECT_INTERACTION_VISUALS, PARSER_CORE_UI_VISUALS, PHYSICAL_AFFORDANCES_VISUALS, PHYSICS_EXPANSION_VISUALS, PROCEDURAL_GENERATION_VISUALS, RESOURCE_GATHERING_VISUALS, SAFETY_BOUNDARIES_VISUALS, SCIFI_TECHNOLOGY_VISUALS, SHAPE_FORM_VISUALS, SIGNS_COMMUNICATION_VISUALS, SIMPLE_MODIFIERS_VISUALS, SIZE_SCALE_VISUALS, SOCIAL_COMMERCE_VISUALS, SOCIAL_EFFECTS_VISUALS, SPORTS_FITNESS_VISUALS, STATE_PERSISTENCE_VISUALS, SURFACE_TEXTURE_VISUALS, TIME_PERIOD_VISUALS, TRANSPORTATION_VEHICLES_VISUALS, VISUAL_EFFECTS_VISUALS, VOLUMETRIC_WEBGPU_VISUALS, WATER_FLUID_VISUALS, WEATHER_PARTICLES_VISUALS, WEATHER_PHENOMENA_VISUALS, XR_PLATFORM_VISUALS, init_accessibility_extended_visual, init_accessibility_visual, init_age_condition_visual, init_animals_visual, init_architecture_realestate_visual, init_audio_visual, init_construction_building_visual, init_containers_storage_visual, init_cooking_food_visual, init_core_vr_interaction_visual, init_creatures_mythical_visual, init_data_visualization_visual, init_education_learning_visual, init_emotion_mood_visual, init_environment_input_visual, init_environmental_biome_visual, init_fabric_cloth_visual, init_furniture_decor_visual, init_game_mechanics_visual, init_gems_minerals_visual, init_geospatial_web3_visual, init_healthcare_medical_visual, init_humanoid_avatar_visual, init_intelligence_behavior_visual, init_interop_copresence_visual, init_iot_autonomous_agents_visual, init_lighting_visual, init_locomotion_movement_visual, init_magic_fantasy_visual, init_maritime_naval_visual, init_material_properties_visual, init_measurement_sensing_visual, init_media_analytics_visual, init_multisensory_haptic_visual, init_music_performance_visual, init_musical_sound_visual, init_narrative_storytelling_visual, init_nature_life_visual, init_networking_ai_visual, init_npc_roles_visual, init_object_interaction_visual, init_parser_core_ui_visual, init_physical_affordances_visual, init_physics_expansion_visual, init_procedural_generation_visual, init_resource_gathering_visual, init_safety_boundaries_visual, init_scifi_technology_visual, init_shape_form_visual, init_signs_communication_visual, init_simple_modifiers_visual, init_size_scale_visual, init_social_commerce_visual, init_social_effects_visual, init_sports_fitness_visual, init_state_persistence_visual, init_surface_texture_visual, init_time_period_visual, init_transportation_vehicles_visual, init_visual_effects_visual, init_volumetric_webgpu_visual, init_water_fluid_visual, init_weather_particles_visual, init_weather_phenomena_visual, init_xr_platform_visual };
9661
- //# sourceMappingURL=chunk-H5Z7NASB.js.map
9662
- //# sourceMappingURL=chunk-H5Z7NASB.js.map
9683
+ //# sourceMappingURL=chunk-XT6JY5W5.js.map
9684
+ //# sourceMappingURL=chunk-XT6JY5W5.js.map