@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.
- package/LICENSE +21 -0
- package/README.md +3 -3
- package/bin/holoscript.cjs +3 -0
- package/dist/GLTFPipeline-SFIORFJU.js +16 -0
- package/dist/GLTFPipeline-VNNDPONV.cjs +37 -0
- package/dist/{HoloScriptPlusParser-BN6KVRCM.js → HoloScriptPlusParser-7FBIFUFC.js} +6 -5
- package/dist/{HoloScriptPlusParser-NC5FE6AL.cjs → HoloScriptPlusParser-A2W7OCN2.cjs} +17 -16
- package/dist/HoloScriptPlusParser-F2Z56FJR.js +10 -0
- package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +27 -0
- package/dist/{USDZExporter-UWGWNMMD.cjs → USDZExporter-3FWJ25JI.cjs} +344 -16
- package/dist/{USDZExporter-NTMBNTDB.js → USDZExporter-D2HQLQYK.js} +344 -16
- package/dist/agents/index.cjs +19 -0
- package/dist/agents/index.d.ts +100 -0
- package/dist/agents/index.js +17 -0
- package/dist/chunk-22W6NGYN.js +725 -0
- package/dist/{chunk-5OEOHAAW.cjs → chunk-27MPVJVZ.cjs} +64 -28
- package/dist/{chunk-RVYPEYPX.js → chunk-2A7FURVO.js} +44 -8
- package/dist/{chunk-XCWFGZAA.js → chunk-2B7WVIDZ.js} +11 -8
- package/dist/{chunk-NDQNIJEH.js → chunk-2BSMSUCE.js} +250 -24
- package/dist/chunk-2HLIGOKU.cjs +5546 -0
- package/dist/{chunk-EONILVMF.js → chunk-2M2DPHKB.js} +4 -4
- package/dist/{chunk-G7CT3EMP.cjs → chunk-2YSNA2F2.cjs} +319 -47
- package/dist/{chunk-IWI6J7FX.js → chunk-33XCOVE3.js} +5 -5
- package/dist/chunk-3FOKASKO.cjs +348 -0
- package/dist/{chunk-DXJQDCFL.js → chunk-4C57PR42.js} +3 -3
- package/dist/{chunk-MPXBVFHQ.js → chunk-4N4SXXWF.js} +4 -3
- package/dist/chunk-4PDEPEQW.cjs +41 -0
- package/dist/chunk-4R6HPSHJ.js +2176 -0
- package/dist/chunk-4R6SBXDB.js +45 -0
- package/dist/chunk-4SY77NA4.cjs +413 -0
- package/dist/{chunk-YCXFCXDS.js → chunk-4UUKPCY4.js} +668 -110
- package/dist/{chunk-LGGRPKTV.cjs → chunk-52ULD552.cjs} +114 -35
- package/dist/{chunk-L4G4RLXX.js → chunk-5CKA5SXU.js} +438 -22
- package/dist/chunk-5FSKKMR7.cjs +2092 -0
- package/dist/{chunk-FF3Q7ADR.js → chunk-5JEU52DW.js} +5 -3
- package/dist/chunk-5N54COB6.cjs +327 -0
- package/dist/chunk-5S7RKFGR.cjs +446 -0
- package/dist/{chunk-KED34ILP.js → chunk-6ASWLXXN.js} +21 -9
- package/dist/chunk-6CTRH7HT.cjs +1985 -0
- package/dist/{chunk-CAUCGUEA.cjs → chunk-6EX3I5P4.cjs} +6 -6
- package/dist/chunk-6FGQNDR4.js +5731 -0
- package/dist/{chunk-72EQECGT.cjs → chunk-6KMK2UXT.cjs} +122 -46
- package/dist/{chunk-G4VZTCIB.js → chunk-6L4VE27M.js} +33 -23
- package/dist/{chunk-ATSKSYVE.cjs → chunk-6S6TKNEA.cjs} +6478 -1738
- package/dist/chunk-77V4GTCA.js +596 -0
- package/dist/{chunk-ZP4D3CSX.cjs → chunk-7AD52FRS.cjs} +16 -16
- package/dist/chunk-A6KINLZJ.js +236 -0
- package/dist/chunk-AIA52I7T.cjs +543 -0
- package/dist/chunk-AIX25INK.cjs +602 -0
- package/dist/{chunk-B5TCIAPQ.cjs → chunk-AO4I2Z7M.cjs} +17 -18
- package/dist/{chunk-Q5SJOGHQ.cjs → chunk-BPICAGBV.cjs} +324 -199
- package/dist/chunk-BRQJKJGT.cjs +20 -0
- package/dist/{chunk-3FXV5S25.cjs → chunk-C37BHB7N.cjs} +6 -3
- package/dist/{chunk-XUTX5CBW.js → chunk-CBJY23VL.js} +3 -3
- package/dist/chunk-CIWWXYHZ.cjs +50 -0
- package/dist/{chunk-XXINBTZK.cjs → chunk-DIL6DDDN.cjs} +101 -45
- package/dist/chunk-DMXC24WV.js +404 -0
- package/dist/{chunk-PMGODDJA.cjs → chunk-DTGBOSEM.cjs} +12 -12
- package/dist/chunk-E7JP3BS3.cjs +61 -0
- package/dist/{chunk-HJJLD366.js → chunk-EKBKLK7P.js} +3 -3
- package/dist/chunk-EKYL4PE3.cjs +404 -0
- package/dist/{chunk-UPJBDCVF.js → chunk-EMMC5CSQ.js} +12 -8
- package/dist/{chunk-GGHSW2NN.js → chunk-EOBB6A4B.js} +6389 -1718
- package/dist/chunk-EOFNVCM6.js +325 -0
- package/dist/{chunk-FHQVYCH2.js → chunk-ER4GATIU.js} +7 -7
- package/dist/{chunk-N5FTS757.cjs → chunk-EXKSFGSX.cjs} +7 -148
- package/dist/{chunk-LK5IAVH6.cjs → chunk-EXUP2BUM.cjs} +27 -27
- package/dist/chunk-FDSGHPAK.js +130 -0
- package/dist/chunk-FEWUHQNM.cjs +144 -0
- package/dist/{chunk-5TOFIR6L.js → chunk-FGGJQRLZ.js} +5 -142
- package/dist/chunk-FHP6LXJS.js +415 -0
- package/dist/{chunk-7LCYLPW2.cjs → chunk-FJPADH77.cjs} +7 -4
- package/dist/{chunk-T36DDXSF.js → chunk-FXKTYFYA.js} +150 -25
- package/dist/chunk-G2LS3RFO.js +623 -0
- package/dist/chunk-GCMWDSBZ.cjs +729 -0
- package/dist/chunk-GJNCFRJU.cjs +125 -0
- package/dist/{chunk-Q4QX3AET.cjs → chunk-GMP623FG.cjs} +16 -13
- package/dist/{chunk-XD6IYDUX.js → chunk-GN3KDX4W.js} +119 -43
- package/dist/{chunk-QLEAOI3Q.cjs → chunk-GQYKQSTC.cjs} +10 -10
- package/dist/chunk-GTU2Z2WW.cjs +262 -0
- package/dist/chunk-GZG4KA4E.js +529 -0
- package/dist/{chunk-BND3ST2K.cjs → chunk-H3MGK7TX.cjs} +42 -32
- package/dist/{chunk-XRKWN5PL.cjs → chunk-H5DZIHJP.cjs} +14 -18
- package/dist/{chunk-Z34RLXRA.cjs → chunk-HANL7K2Q.cjs} +65 -50
- package/dist/{chunk-3SAK5KFL.cjs → chunk-HCCQLAA4.cjs} +2 -11
- package/dist/{chunk-LXJ4667L.cjs → chunk-HGVXZDSK.cjs} +108 -20
- package/dist/{chunk-3FJCK5XA.js → chunk-HRODTEEO.js} +30 -10
- package/dist/{chunk-HQUEA5R6.cjs → chunk-HZCQO4JM.cjs} +6 -6
- package/dist/{chunk-S565K7NK.js → chunk-I2O7TW6B.js} +12 -8
- package/dist/chunk-IHESJZSW.js +4490 -0
- package/dist/{chunk-FSF7EQVA.cjs → chunk-IRWWS72C.cjs} +63 -22
- package/dist/{chunk-5O6TQC6M.cjs → chunk-IVIA7K75.cjs} +689 -127
- package/dist/chunk-IVY74O6C.js +247 -0
- package/dist/chunk-J32ZJZJH.js +554 -0
- package/dist/chunk-J56PTA46.cjs +639 -0
- package/dist/chunk-JD7CIZ33.js +1949 -0
- package/dist/{chunk-T7LEXZUZ.cjs → chunk-JIYN45TV.cjs} +14 -15
- package/dist/{chunk-FFKU7BTK.cjs → chunk-KHPCJRI3.cjs} +24 -21
- package/dist/chunk-KKFZ3B6J.cjs +557 -0
- package/dist/chunk-KPJL34Y7.cjs +186 -0
- package/dist/{chunk-HE7ULERA.cjs → chunk-KQTPCYTG.cjs} +128 -44
- package/dist/{chunk-OFKWH2IP.js → chunk-KX76JUQY.js} +3 -3
- package/dist/{chunk-33LSUQDD.cjs → chunk-L63H3SQ4.cjs} +43 -31
- package/dist/{chunk-K6EKD26I.js → chunk-LAOCQJ2M.js} +64 -8
- package/dist/chunk-LM2VU56C.cjs +37 -0
- package/dist/chunk-M56JSP4A.js +400 -0
- package/dist/chunk-MBOOR7X4.js +18 -0
- package/dist/{chunk-XWPNTWDN.cjs → chunk-MJVIRCUV.cjs} +31 -27
- package/dist/{chunk-SDAMZIRE.js → chunk-MSMIFMBL.js} +135 -18
- package/dist/{chunk-56IF4NTA.js → chunk-MXFUTKCO.js} +18 -18
- package/dist/{chunk-6UEHYZ7V.cjs → chunk-MXJ5SS53.cjs} +447 -31
- package/dist/chunk-MYY4PMWX.cjs +264 -0
- package/dist/chunk-N75IH2HY.js +258 -0
- package/dist/{chunk-GVUR45UF.cjs → chunk-NG77ATEW.cjs} +7 -6
- package/dist/chunk-NW5G5FBQ.js +215 -0
- package/dist/{chunk-E3FWRT3Z.js → chunk-OEFY723R.js} +28 -13
- package/dist/chunk-OEV5RMZO.cjs +3042 -0
- package/dist/{chunk-X4ZF6CNE.cjs → chunk-OIQYIIO3.cjs} +7 -7
- package/dist/{chunk-2CWOLHTE.js → chunk-OL46QLBJ.js} +3 -11
- package/dist/chunk-OPZ7XDDI.js +487 -0
- package/dist/chunk-OSYNRVOV.cjs +243 -0
- package/dist/{chunk-TEWCN33Y.js → chunk-P7YIA5LN.js} +91 -7
- package/dist/chunk-PGANYCAG.cjs +220 -0
- package/dist/{chunk-CS2EMTGF.js → chunk-QAVXL2IH.js} +62 -21
- package/dist/{chunk-T4NKMBDL.js → chunk-QCCBXSCE.js} +1666 -756
- package/dist/{chunk-F4IULT7N.js → chunk-QPOQ7VPI.js} +16 -13
- package/dist/{chunk-6XSERL6L.js → chunk-QTPMJRGS.js} +3108 -2827
- package/dist/{chunk-F3HH56EB.cjs → chunk-QWNQ523V.cjs} +1730 -823
- package/dist/{chunk-R7MA7QWV.js → chunk-R3IVNY6P.js} +102 -23
- package/dist/chunk-R75BSDH7.cjs +50 -0
- package/dist/chunk-RAXUF5DF.cjs +2196 -0
- package/dist/{chunk-BF2235SI.cjs → chunk-RMHC2VG7.cjs} +2876 -2592
- package/dist/chunk-RUXGBKPS.cjs +4517 -0
- package/dist/{chunk-UERJ3YJV.js → chunk-S5IFXW6E.js} +113 -9
- package/dist/{chunk-27LWW5FU.cjs → chunk-S6YWHCKV.cjs} +5 -5
- package/dist/{chunk-WB4Z63GG.js → chunk-SIEXCILW.js} +3 -3
- package/dist/{chunk-CLYEIWA5.cjs → chunk-SLU6UPJI.cjs} +5 -3
- package/dist/{chunk-LZ266PCM.cjs → chunk-T5J7ZKP3.cjs} +446 -60
- package/dist/chunk-TDCNJHWO.js +341 -0
- package/dist/{chunk-IHOUYQIA.js → chunk-TG7O4WBC.js} +5 -5
- package/dist/chunk-THCK6ECW.js +2085 -0
- package/dist/chunk-TJHVSBP2.js +439 -0
- package/dist/chunk-TK74TR4H.js +5541 -0
- package/dist/{chunk-CDPGV4DN.js → chunk-U4NBQJBY.js} +14 -15
- package/dist/{chunk-NOZZ46QU.js → chunk-UD3DSHZM.js} +10 -14
- package/dist/chunk-UDMYRFDZ.js +3038 -0
- package/dist/{chunk-WDW67DZB.cjs → chunk-UOIGFQXC.cjs} +90 -68
- package/dist/{chunk-BU7VWW2K.js → chunk-URG2SJLK.js} +14 -15
- package/dist/{chunk-EQV4R3EV.cjs → chunk-V73NPPTM.cjs} +152 -35
- package/dist/chunk-VECQYRXL.js +474 -0
- package/dist/chunk-VEXPG4WN.js +1989 -0
- package/dist/{chunk-LDP5OK6G.js → chunk-VMLKSV26.js} +5 -5
- package/dist/{chunk-5BGSECRJ.cjs → chunk-VSK7W3O5.cjs} +47 -27
- package/dist/chunk-VVKVQZI6.js +55 -0
- package/dist/{chunk-YQK5JNFK.js → chunk-W55Z7QIX.js} +103 -15
- package/dist/{chunk-KSGXLT74.cjs → chunk-W6P2GBHH.cjs} +3 -3
- package/dist/{chunk-IBDG74G2.cjs → chunk-W6RW64BB.cjs} +7 -7
- package/dist/chunk-WDT3JTGM.cjs +483 -0
- package/dist/{chunk-HPS76H7Q.js → chunk-WKX5AMOY.js} +3 -3
- package/dist/chunk-WNNE3PO3.js +34 -0
- package/dist/{chunk-XG23EUQX.cjs → chunk-WRLUBRKS.cjs} +538 -312
- package/dist/{chunk-IFNQFCTM.js → chunk-WRNEH5MO.js} +79 -8
- package/dist/{chunk-54FHG2MX.js → chunk-WRWEX5ZF.js} +7 -4
- package/dist/{chunk-KCQ5NDYC.cjs → chunk-X3GJPRVK.cjs} +154 -80
- package/dist/{chunk-7AGYRWKW.cjs → chunk-XFXGA5IW.cjs} +126 -22
- package/dist/{chunk-TQSZUOW5.cjs → chunk-XHIV6326.cjs} +4 -4
- package/dist/chunk-XJAN7CZG.cjs +432 -0
- package/dist/chunk-XL6INWKT.js +121 -0
- package/dist/{chunk-E3UALNFA.js → chunk-XMWZG36H.js} +4 -4
- package/dist/{chunk-BKIGPPVM.js → chunk-XSFNHP2E.js} +6 -3
- package/dist/{chunk-H5Z7NASB.js → chunk-XT6JY5W5.js} +25 -3
- package/dist/chunk-XXZJEFKW.cjs +490 -0
- package/dist/chunk-Y3MWXQSB.cjs +5737 -0
- package/dist/chunk-YF2I3MV3.js +46 -0
- package/dist/{chunk-V3NN3HPP.js → chunk-YIMN575O.js} +437 -52
- package/dist/chunk-YIVFJNYV.js +176 -0
- package/dist/{chunk-MD6KDHVE.cjs → chunk-YKGPCZEE.cjs} +10 -10
- package/dist/chunk-YQELFNJV.js +39 -0
- package/dist/chunk-Z5XMPRNC.cjs +5390 -0
- package/dist/{chunk-3FYZOR7S.cjs → chunk-ZDSYWBIE.cjs} +18 -18
- package/dist/{chunk-6TZPZCOJ.cjs → chunk-ZKSS47EV.cjs} +24 -19
- package/dist/chunk-ZUL5AVTX.cjs +1993 -0
- package/dist/chunk-ZXBZVXDW.js +5386 -0
- package/dist/{chunk-DMG7C4H2.js → chunk-ZZ7RO2UQ.js} +312 -44
- package/dist/cli/holoscript-runner.cjs +200 -204
- package/dist/cli/holoscript-runner.js +144 -148
- package/dist/codebase/index.cjs +1 -1
- package/dist/codebase/index.js +1 -1
- package/dist/compiler/agent-inference.cjs +10 -7
- package/dist/compiler/agent-inference.js +6 -3
- package/dist/compiler/android-xr.cjs +12 -7
- package/dist/compiler/android-xr.js +10 -5
- package/dist/compiler/android.cjs +12 -8
- package/dist/compiler/android.js +10 -6
- package/dist/compiler/ar.cjs +9 -6
- package/dist/compiler/ar.js +7 -4
- package/dist/compiler/babylon.cjs +12 -8
- package/dist/compiler/babylon.js +11 -7
- package/dist/compiler/business-quest.cjs +43 -0
- package/dist/compiler/business-quest.js +4 -0
- package/dist/compiler/coco.cjs +1 -1
- package/dist/compiler/coco.js +1 -1
- package/dist/compiler/context.cjs +25 -0
- package/dist/compiler/context.d.ts +28 -0
- package/dist/compiler/context.js +8 -0
- package/dist/compiler/domain-block-utils.cjs +155 -152
- package/dist/compiler/domain-block-utils.js +7 -4
- package/dist/compiler/dtdl.cjs +10 -7
- package/dist/compiler/dtdl.js +7 -4
- package/dist/compiler/gltf-pipeline.cjs +9 -9
- package/dist/compiler/gltf-pipeline.js +2 -2
- package/dist/compiler/godot.cjs +9 -6
- package/dist/compiler/godot.js +8 -5
- package/dist/compiler/incremental.cjs +12 -7
- package/dist/compiler/incremental.js +7 -2
- package/dist/compiler/index.cjs +3550 -268
- package/dist/compiler/index.d.ts +404 -21
- package/dist/compiler/index.js +3280 -138
- package/dist/compiler/ios.cjs +11 -8
- package/dist/compiler/ios.js +9 -6
- package/dist/compiler/llm-provider-capabilities.cjs +25 -0
- package/dist/compiler/llm-provider-capabilities.d.ts +43 -0
- package/dist/compiler/llm-provider-capabilities.js +8 -0
- package/dist/compiler/multi-layer.cjs +14 -10
- package/dist/compiler/multi-layer.js +13 -9
- package/dist/compiler/nodetoy.cjs +5 -5
- package/dist/compiler/nodetoy.js +2 -2
- package/dist/compiler/openxr.cjs +10 -6
- package/dist/compiler/openxr.js +9 -5
- package/dist/compiler/playcanvas.cjs +10 -7
- package/dist/compiler/playcanvas.js +9 -6
- package/dist/compiler/r3f.cjs +17 -13
- package/dist/compiler/r3f.d.ts +22 -0
- package/dist/compiler/r3f.js +12 -8
- package/dist/compiler/remotion.cjs +1 -1
- package/dist/compiler/remotion.js +1 -1
- package/dist/compiler/reproducibility.cjs +1 -1
- package/dist/compiler/reproducibility.js +1 -1
- package/dist/compiler/sdf.cjs +10 -7
- package/dist/compiler/sdf.js +8 -5
- package/dist/compiler/semantic-scene.cjs +1 -1
- package/dist/compiler/semantic-scene.js +1 -1
- package/dist/compiler/state.cjs +9 -5
- package/dist/compiler/state.js +7 -3
- package/dist/compiler/trait-composition.cjs +11 -7
- package/dist/compiler/trait-composition.js +7 -3
- package/dist/compiler/unity.cjs +10 -6
- package/dist/compiler/unity.js +9 -5
- package/dist/compiler/unreal.cjs +11 -7
- package/dist/compiler/unreal.js +9 -5
- package/dist/compiler/urdf.cjs +20 -13
- package/dist/compiler/urdf.js +8 -5
- package/dist/compiler/usd-physics.cjs +10 -7
- package/dist/compiler/usd-physics.js +7 -4
- package/dist/compiler/visionos.cjs +10 -6
- package/dist/compiler/visionos.js +9 -5
- package/dist/compiler/vrchat.cjs +10 -7
- package/dist/compiler/vrchat.js +8 -5
- package/dist/compiler/vrr.cjs +10 -7
- package/dist/compiler/vrr.js +8 -5
- package/dist/compiler/wasm.cjs +13 -10
- package/dist/compiler/wasm.js +8 -5
- package/dist/compiler/webgpu.cjs +9 -6
- package/dist/compiler/webgpu.js +8 -5
- package/dist/constants.d.ts +3 -2
- package/dist/coordinators/index.cjs +1266 -0
- package/dist/coordinators/index.d.ts +260 -0
- package/dist/coordinators/index.js +1259 -0
- package/dist/debugger.cjs +9 -7
- package/dist/debugger.js +7 -5
- package/dist/entries/interop.cjs +23 -21
- package/dist/entries/interop.js +5 -3
- package/dist/entries/scripting.cjs +18 -18
- package/dist/entries/scripting.js +8 -8
- package/dist/hololand/index.cjs +146 -0
- package/dist/hololand/index.d.ts +70 -0
- package/dist/hololand/index.js +5 -0
- package/dist/index.cjs +20332 -18121
- package/dist/index.d.ts +1477 -40
- package/dist/index.js +19451 -17638
- package/dist/math/tropical-spmv.cjs +45 -0
- package/dist/math/tropical-spmv.js +4 -0
- package/dist/math/vec3.cjs +14 -14
- package/dist/math/vec3.js +2 -2
- package/dist/{ml-dsa-PHCWUBPX.cjs → ml-dsa-FSKBTE3W.cjs} +177 -90
- package/dist/{ml-dsa-WYLJHJO6.js → ml-dsa-Z7JDKW4L.js} +158 -71
- package/dist/paper-0c-spike/index.cjs +150 -0
- package/dist/paper-0c-spike/index.d.ts +29 -0
- package/dist/paper-0c-spike/index.js +141 -0
- package/dist/parser.cjs +45 -11
- package/dist/parser.d.ts +11 -0
- package/dist/parser.js +10 -8
- package/dist/{playwright-RL6GY4F7.cjs → playwright-3AT3AKTV.cjs} +1985 -1985
- package/dist/{playwright-5OSAPTNH.js → playwright-VZPDVUEQ.js} +3 -3
- package/dist/reconstruction/index.cjs +153 -0
- package/dist/reconstruction/index.d.ts +105 -0
- package/dist/reconstruction/index.js +8 -0
- package/dist/runtime.cjs +7 -5
- package/dist/runtime.js +6 -4
- package/dist/self-improvement/index.cjs +563 -0
- package/dist/self-improvement/index.js +545 -0
- package/dist/storage/index.cjs +10 -9
- package/dist/storage/index.js +3 -2
- package/dist/testing.cjs +25 -0
- package/dist/testing.d.ts +70 -0
- package/dist/testing.js +4 -0
- package/dist/tools/index.d.ts +22 -1
- package/dist/traitDocs/traitDocs.cjs +33 -0
- package/dist/traitDocs/traitDocs.d.ts +69 -0
- package/dist/traitDocs/traitDocs.js +7 -0
- package/dist/traits/botanical-lotus.cjs +41 -0
- package/dist/traits/botanical-lotus.d.ts +172 -0
- package/dist/traits/botanical-lotus.js +4 -0
- package/dist/traits/engines/index.cjs +520 -0
- package/dist/traits/engines/index.js +380 -0
- package/dist/traits/index.cjs +17630 -7881
- package/dist/traits/index.d.ts +197 -0
- package/dist/traits/index.js +16573 -7193
- package/dist/traits/simulation-solver-factory.cjs +13 -0
- package/dist/traits/simulation-solver-factory.d.ts +23 -0
- package/dist/traits/simulation-solver-factory.js +4 -0
- package/dist/traits/webcam-gaze.cjs +35 -0
- package/dist/traits/webcam-gaze.d.ts +17 -0
- package/dist/traits/webcam-gaze.js +4 -0
- package/dist/type-checker.cjs +6 -5
- package/dist/type-checker.js +4 -3
- package/dist/world/index.cjs +947 -0
- package/dist/world/index.d.ts +147 -0
- package/dist/world/index.js +939 -0
- package/dist/world-model/index.cjs +1446 -0
- package/dist/world-model/index.d.ts +119 -0
- package/dist/world-model/index.js +1414 -0
- package/dist/wot/index.cjs +29 -0
- package/dist/wot/index.js +4 -0
- package/package.json +153 -61
- package/dist/GLTFPipeline-DEN36VNK.js +0 -12
- package/dist/GLTFPipeline-YPCAK236.cjs +0 -33
- package/dist/chunk-4XSNJCLC.cjs +0 -1859
- package/dist/chunk-A7PIMZGU.js +0 -263
- package/dist/chunk-BWFJEM5A.js +0 -5419
- package/dist/chunk-CBJSLA2E.cjs +0 -5423
- package/dist/chunk-K3JDKWGI.cjs +0 -270
- package/dist/chunk-LSW7P7ML.js +0 -3675
- package/dist/chunk-MEASWI2Y.js +0 -126
- package/dist/chunk-NCUKG4SK.cjs +0 -3075
- package/dist/chunk-Q5JT3YML.cjs +0 -129
- package/dist/chunk-QGKNANZ3.js +0 -3071
- package/dist/chunk-S2N5TNMA.js +0 -1855
- package/dist/chunk-TSH3MSQU.cjs +0 -129
- package/dist/chunk-WGMEAYBG.js +0 -126
- package/dist/chunk-X6SEAXAX.cjs +0 -3681
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkNG77ATEW_cjs = require('./chunk-NG77ATEW.cjs');
|
|
4
|
+
var chunkWRLUBRKS_cjs = require('./chunk-WRLUBRKS.cjs');
|
|
5
5
|
var crypto = require('crypto');
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
@@ -682,6 +682,220 @@ var ParseCache = class {
|
|
|
682
682
|
};
|
|
683
683
|
var globalParseCache = new ParseCache();
|
|
684
684
|
|
|
685
|
+
// src/parser/IncrementalParser.ts
|
|
686
|
+
var ChunkBasedIncrementalParser = class {
|
|
687
|
+
constructor(cache = globalParseCache) {
|
|
688
|
+
this.lastSource = "";
|
|
689
|
+
this.lastChunks = /* @__PURE__ */ new Map();
|
|
690
|
+
this.cache = cache;
|
|
691
|
+
this.parser = new HoloScriptPlusParser({
|
|
692
|
+
enableVRTraits: true,
|
|
693
|
+
enableTypeScriptImports: true,
|
|
694
|
+
strict: false
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* Parse source with incremental caching
|
|
699
|
+
*/
|
|
700
|
+
parse(source) {
|
|
701
|
+
const startTime = Date.now();
|
|
702
|
+
let cached = 0;
|
|
703
|
+
let parsed = 0;
|
|
704
|
+
const changedChunks = [];
|
|
705
|
+
const currentChunks = this.detectChunks(source);
|
|
706
|
+
const chunkMap = new Map(currentChunks.map((c) => [c.id, c]));
|
|
707
|
+
const changedIds = this.identifyChangedChunks(currentChunks);
|
|
708
|
+
changedChunks.push(...changedIds);
|
|
709
|
+
const dependentIds = this.findDependents(changedIds, currentChunks);
|
|
710
|
+
const toParseIds = /* @__PURE__ */ new Set([...changedIds, ...dependentIds]);
|
|
711
|
+
const chunkNodes = /* @__PURE__ */ new Map();
|
|
712
|
+
for (const chunk of currentChunks) {
|
|
713
|
+
const hash = ParseCache.hash(chunk.content);
|
|
714
|
+
if (toParseIds.has(chunk.id)) {
|
|
715
|
+
const chunkNode = this.parseChunk(chunk);
|
|
716
|
+
if (chunkNode) {
|
|
717
|
+
chunkNodes.set(chunk.id, chunkNode);
|
|
718
|
+
this.cache.set(chunk.id, hash, chunkNode);
|
|
719
|
+
parsed++;
|
|
720
|
+
}
|
|
721
|
+
} else {
|
|
722
|
+
const cached_node = this.cache.get(chunk.id, hash);
|
|
723
|
+
if (cached_node) {
|
|
724
|
+
chunkNodes.set(chunk.id, cached_node);
|
|
725
|
+
cached++;
|
|
726
|
+
} else {
|
|
727
|
+
const chunkNode = this.parseChunk(chunk);
|
|
728
|
+
if (chunkNode) {
|
|
729
|
+
chunkNodes.set(chunk.id, chunkNode);
|
|
730
|
+
this.cache.set(chunk.id, hash, chunkNode);
|
|
731
|
+
parsed++;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
const ast = this.assembleAST(chunkNodes, currentChunks);
|
|
737
|
+
this.lastSource = source;
|
|
738
|
+
this.lastChunks = chunkMap;
|
|
739
|
+
const duration = Date.now() - startTime;
|
|
740
|
+
return {
|
|
741
|
+
ast,
|
|
742
|
+
cached,
|
|
743
|
+
parsed,
|
|
744
|
+
duration,
|
|
745
|
+
changedChunks
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* Detects top-level chunks in the source
|
|
750
|
+
*/
|
|
751
|
+
detectChunks(source) {
|
|
752
|
+
return ChunkDetector.detect(source);
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Identifies which chunks have changed by comparing hashes
|
|
756
|
+
*/
|
|
757
|
+
identifyChangedChunks(currentChunks) {
|
|
758
|
+
const changed = [];
|
|
759
|
+
for (const chunk of currentChunks) {
|
|
760
|
+
const hash = ParseCache.hash(chunk.content);
|
|
761
|
+
const lastChunk = this.lastChunks.get(chunk.id);
|
|
762
|
+
if (!lastChunk) {
|
|
763
|
+
changed.push(chunk.id);
|
|
764
|
+
} else {
|
|
765
|
+
const lastHash = ParseCache.hash(lastChunk.content);
|
|
766
|
+
if (hash !== lastHash) {
|
|
767
|
+
changed.push(chunk.id);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
for (const [id, _lastChunk] of this.lastChunks.entries()) {
|
|
772
|
+
const currentChunk = this.detectChunks(this.lastSource).find((c) => c.id === id);
|
|
773
|
+
if (!currentChunk) {
|
|
774
|
+
changed.push(id);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
return changed;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Finds chunks that depend on the changed ones
|
|
781
|
+
*/
|
|
782
|
+
findDependents(changedIds, chunks) {
|
|
783
|
+
const dependents = /* @__PURE__ */ new Set();
|
|
784
|
+
const changeSet = new Set(changedIds);
|
|
785
|
+
const references = /* @__PURE__ */ new Map();
|
|
786
|
+
for (const chunk of chunks) {
|
|
787
|
+
const refs = this.extractReferences(chunk.content);
|
|
788
|
+
if (refs.size > 0) {
|
|
789
|
+
references.set(chunk.id, refs);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
for (const [chunkId, refs] of references.entries()) {
|
|
793
|
+
if (!changeSet.has(chunkId)) {
|
|
794
|
+
for (const ref of refs) {
|
|
795
|
+
if (changeSet.has(ref) || dependents.has(ref)) {
|
|
796
|
+
dependents.add(chunkId);
|
|
797
|
+
break;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
return Array.from(dependents);
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* Extracts referenced identifiers from a chunk (templates, orbs, logic)
|
|
806
|
+
*/
|
|
807
|
+
extractReferences(content) {
|
|
808
|
+
const refs = /* @__PURE__ */ new Set();
|
|
809
|
+
const templateRefs = content.match(/using\s+"([^"]+)"/g);
|
|
810
|
+
if (templateRefs) {
|
|
811
|
+
templateRefs.forEach((ref) => {
|
|
812
|
+
const name = ref.match(/"([^"]+)"/)[1];
|
|
813
|
+
refs.add(`template:${name}`);
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
const spreadRefs = content.match(/\.\.\.\s*([a-zA-Z0-9_]+)/g);
|
|
817
|
+
if (spreadRefs) {
|
|
818
|
+
spreadRefs.forEach((ref) => {
|
|
819
|
+
const name = ref.replace(/\.\.\./, "").trim();
|
|
820
|
+
refs.add(`identifier:${name}`);
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
const compRefs = content.match(/@composition\s+"([^"]+)"/g);
|
|
824
|
+
if (compRefs) {
|
|
825
|
+
compRefs.forEach((ref) => {
|
|
826
|
+
const name = ref.match(/"([^"]+)"/)[1];
|
|
827
|
+
refs.add(`composition:${name}`);
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
return refs;
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Parses a single chunk
|
|
834
|
+
*/
|
|
835
|
+
parseChunk(chunk) {
|
|
836
|
+
try {
|
|
837
|
+
const content = this.wrapChunkForParsing(chunk);
|
|
838
|
+
const result = this.parser.parse(content);
|
|
839
|
+
if (result.success && result.ast) {
|
|
840
|
+
return result.ast;
|
|
841
|
+
}
|
|
842
|
+
return null;
|
|
843
|
+
} catch (error) {
|
|
844
|
+
console.warn(`Failed to parse chunk ${chunk.id}:`, error);
|
|
845
|
+
return null;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Wraps chunk content to make it parseable in isolation
|
|
850
|
+
*/
|
|
851
|
+
wrapChunkForParsing(chunk) {
|
|
852
|
+
return chunk.content;
|
|
853
|
+
}
|
|
854
|
+
/**
|
|
855
|
+
* Assembles final AST from parsed chunks
|
|
856
|
+
*/
|
|
857
|
+
assembleAST(chunkNodes, chunks) {
|
|
858
|
+
const children = [];
|
|
859
|
+
for (const chunk of chunks) {
|
|
860
|
+
const node = chunkNodes.get(chunk.id);
|
|
861
|
+
if (node) {
|
|
862
|
+
children.push(node);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
if (children.length === 1) {
|
|
866
|
+
return children[0];
|
|
867
|
+
}
|
|
868
|
+
return {
|
|
869
|
+
type: "fragment",
|
|
870
|
+
children,
|
|
871
|
+
properties: {},
|
|
872
|
+
directives: [],
|
|
873
|
+
traits: /* @__PURE__ */ new Map(),
|
|
874
|
+
loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 0 } }
|
|
875
|
+
};
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Clears the internal cache
|
|
879
|
+
*/
|
|
880
|
+
clearCache() {
|
|
881
|
+
this.cache.clear();
|
|
882
|
+
this.lastChunks.clear();
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Gets cache statistics
|
|
886
|
+
*/
|
|
887
|
+
getCacheStats() {
|
|
888
|
+
return {
|
|
889
|
+
size: this.lastChunks.size,
|
|
890
|
+
maxSize: 500
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
};
|
|
894
|
+
function parseIncrementalChunks(source, cache = globalParseCache) {
|
|
895
|
+
const parser = new ChunkBasedIncrementalParser(cache);
|
|
896
|
+
return parser.parse(source);
|
|
897
|
+
}
|
|
898
|
+
|
|
685
899
|
// src/parser/RichErrors.ts
|
|
686
900
|
var HSPLUS_ERROR_CODES = {
|
|
687
901
|
// Syntax Errors (HSP001-HSP099)
|
|
@@ -769,7 +983,7 @@ function similarity(a, b) {
|
|
|
769
983
|
function findSimilarTrait(input, threshold = 0.5) {
|
|
770
984
|
let bestMatch;
|
|
771
985
|
let bestScore = threshold;
|
|
772
|
-
for (const trait of
|
|
986
|
+
for (const trait of chunkWRLUBRKS_cjs.VR_TRAITS) {
|
|
773
987
|
const score = similarity(input, trait);
|
|
774
988
|
if (score > bestScore) {
|
|
775
989
|
bestScore = score;
|
|
@@ -1574,7 +1788,18 @@ var HoloScriptPlusParser = class {
|
|
|
1574
1788
|
this.hasVRTraits = false;
|
|
1575
1789
|
this.hasControlFlow = false;
|
|
1576
1790
|
this.compiledExpressions = /* @__PURE__ */ new Map();
|
|
1577
|
-
this.errorRecovery = new
|
|
1791
|
+
this.errorRecovery = new chunkNG77ATEW_cjs.ErrorRecovery();
|
|
1792
|
+
/**
|
|
1793
|
+
* Internal incremental parser for parseIncremental.
|
|
1794
|
+
* Uses ChunkBasedIncrementalParser with AST-aware chunking and
|
|
1795
|
+
* dependency tracking — no fallback to full re-parse for unchanged chunks.
|
|
1796
|
+
*/
|
|
1797
|
+
this._incrementalParser = null;
|
|
1798
|
+
/**
|
|
1799
|
+
* Per-cache incremental parser map so callers can supply their own cache
|
|
1800
|
+
* and still get a dedicated ChunkBasedIncrementalParser instance.
|
|
1801
|
+
*/
|
|
1802
|
+
this._incrementalParserCache = /* @__PURE__ */ new Map();
|
|
1578
1803
|
this.options = {
|
|
1579
1804
|
enableVRTraits: true,
|
|
1580
1805
|
enableTypeScriptImports: true,
|
|
@@ -1589,7 +1814,7 @@ var HoloScriptPlusParser = class {
|
|
|
1589
1814
|
getQuickFixes() {
|
|
1590
1815
|
const fixes = /* @__PURE__ */ new Map();
|
|
1591
1816
|
for (const error of this.errors) {
|
|
1592
|
-
const errorFixes =
|
|
1817
|
+
const errorFixes = chunkNG77ATEW_cjs.generateQuickFixes(
|
|
1593
1818
|
{
|
|
1594
1819
|
code: error.code,
|
|
1595
1820
|
message: error.message,
|
|
@@ -1610,7 +1835,7 @@ var HoloScriptPlusParser = class {
|
|
|
1610
1835
|
*/
|
|
1611
1836
|
getEnrichedErrors() {
|
|
1612
1837
|
return this.errors.map(
|
|
1613
|
-
(error) =>
|
|
1838
|
+
(error) => chunkNG77ATEW_cjs.enrichErrorWithSuggestions(
|
|
1614
1839
|
{
|
|
1615
1840
|
code: error.code,
|
|
1616
1841
|
message: error.message,
|
|
@@ -1639,9 +1864,33 @@ var HoloScriptPlusParser = class {
|
|
|
1639
1864
|
return this.buildResult(root);
|
|
1640
1865
|
}
|
|
1641
1866
|
/**
|
|
1642
|
-
* Performs an incremental parse using
|
|
1867
|
+
* Performs an incremental parse using ChunkBasedIncrementalParser with
|
|
1868
|
+
* AST-aware chunking, hash-based caching, and dependency tracking.
|
|
1869
|
+
*
|
|
1870
|
+
* Unchanged chunks are served from cache (zero re-parse cost). Only chunks
|
|
1871
|
+
* whose content hash changed — plus chunks that reference changed ones via
|
|
1872
|
+
* `using`, spread, or `@composition` — are re-parsed.
|
|
1873
|
+
*
|
|
1874
|
+
* Previous implementation fell back to a full re-parse per chunk because it
|
|
1875
|
+
* used `ChunkDetector.detect()` inline without the stateful comparison that
|
|
1876
|
+
* `ChunkBasedIncrementalParser` provides. This is now wired through the
|
|
1877
|
+
* superior engine (APL WIT audit gap #3, 2026-05-21).
|
|
1643
1878
|
*/
|
|
1644
1879
|
parseIncremental(source, cache = globalParseCache) {
|
|
1880
|
+
let incrementalParser = this._incrementalParserCache.get(cache);
|
|
1881
|
+
if (!incrementalParser) {
|
|
1882
|
+
incrementalParser = new ChunkBasedIncrementalParser(cache);
|
|
1883
|
+
this._incrementalParserCache.set(cache, incrementalParser);
|
|
1884
|
+
}
|
|
1885
|
+
const incrementalResult = incrementalParser.parse(source);
|
|
1886
|
+
const chunks = ChunkDetector.detect(source);
|
|
1887
|
+
const children = incrementalResult.ast.type === "fragment" ? incrementalResult.ast.children || [] : [incrementalResult.ast];
|
|
1888
|
+
for (let i = 0; i < children.length; i++) {
|
|
1889
|
+
const chunk = chunks[i];
|
|
1890
|
+
if (chunk && chunk.startLine > 1) {
|
|
1891
|
+
this.offsetNodeLoc(children[i], chunk.startLine - 1);
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1645
1894
|
this.source = source;
|
|
1646
1895
|
this.errors = [];
|
|
1647
1896
|
this.warnings = [];
|
|
@@ -1650,46 +1899,43 @@ var HoloScriptPlusParser = class {
|
|
|
1650
1899
|
this.hasVRTraits = false;
|
|
1651
1900
|
this.hasControlFlow = false;
|
|
1652
1901
|
this.compiledExpressions = /* @__PURE__ */ new Map();
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
const chunkFeatures = chunkResult.features;
|
|
1665
|
-
if (chunkAst?.root) {
|
|
1666
|
-
const node = chunkAst.root;
|
|
1667
|
-
this.offsetNodeLoc(node, chunk.startLine - 1);
|
|
1668
|
-
topLevelNodes.push(node);
|
|
1669
|
-
cache.set(chunk.id, hash, node);
|
|
1670
|
-
this.hasState = this.hasState || !!chunkFeatures?.state;
|
|
1671
|
-
this.hasVRTraits = this.hasVRTraits || !!chunkFeatures?.vrTraits;
|
|
1672
|
-
this.hasControlFlow = this.hasControlFlow || !!chunkFeatures?.loops || !!chunkFeatures?.conditionals;
|
|
1673
|
-
this.imports.push(...chunkAst.imports);
|
|
1902
|
+
for (const node of children) {
|
|
1903
|
+
if (node && typeof node === "object") {
|
|
1904
|
+
const nodeAny = node;
|
|
1905
|
+
if (nodeAny.traits instanceof Map) {
|
|
1906
|
+
for (const [traitName] of nodeAny.traits) {
|
|
1907
|
+
const name = String(traitName);
|
|
1908
|
+
if (name === "state") this.hasState = true;
|
|
1909
|
+
if (name === "grabbable" || name === "throwable" || name === "hoverable" || name === "clickable" || name === "collidable") {
|
|
1910
|
+
this.hasVRTraits = true;
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1674
1913
|
}
|
|
1675
|
-
this.errors.push(...chunkResult.errors);
|
|
1676
|
-
this.warnings.push(...chunkResult.warnings || []);
|
|
1677
1914
|
}
|
|
1678
1915
|
}
|
|
1679
|
-
const root = {
|
|
1916
|
+
const root = incrementalResult.ast.type === "fragment" ? incrementalResult.ast : {
|
|
1680
1917
|
type: "fragment",
|
|
1681
1918
|
id: "root",
|
|
1682
1919
|
properties: {},
|
|
1683
|
-
directives:
|
|
1684
|
-
children:
|
|
1920
|
+
directives: [],
|
|
1921
|
+
children: [incrementalResult.ast],
|
|
1685
1922
|
traits: /* @__PURE__ */ new Map(),
|
|
1686
|
-
loc: {
|
|
1687
|
-
|
|
1688
|
-
end: { line: chunks.length > 0 ? chunks[chunks.length - 1].endLine : 1, column: 1 }
|
|
1689
|
-
},
|
|
1690
|
-
body: topLevelNodes
|
|
1923
|
+
loc: incrementalResult.ast.loc || { start: { line: 1, column: 1 }, end: { line: 1, column: 1 } },
|
|
1924
|
+
body: [incrementalResult.ast]
|
|
1691
1925
|
};
|
|
1926
|
+
if (root.type === "fragment" && root.loc) {
|
|
1927
|
+
root.loc.start = { line: 1, column: 1 };
|
|
1928
|
+
if (chunks.length > 0) {
|
|
1929
|
+
root.loc.end = { line: chunks[chunks.length - 1].endLine, column: 1 };
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1692
1932
|
const result = this.buildResult(root);
|
|
1933
|
+
result.incrementalMetrics = {
|
|
1934
|
+
cached: incrementalResult.cached,
|
|
1935
|
+
parsed: incrementalResult.parsed,
|
|
1936
|
+
duration: incrementalResult.duration,
|
|
1937
|
+
changedChunks: incrementalResult.changedChunks
|
|
1938
|
+
};
|
|
1693
1939
|
return result;
|
|
1694
1940
|
}
|
|
1695
1941
|
buildResult(root) {
|
|
@@ -1709,15 +1955,24 @@ var HoloScriptPlusParser = class {
|
|
|
1709
1955
|
}
|
|
1710
1956
|
}
|
|
1711
1957
|
if (version === void 0) version = "1.0";
|
|
1958
|
+
const children = isFragment ? root.children || [] : [root];
|
|
1959
|
+
const worlds = children.filter((c) => c.type === "world");
|
|
1960
|
+
const compositions = children.filter((c) => c.type === "composition");
|
|
1961
|
+
const templates = children.filter((c) => c.type === "template");
|
|
1962
|
+
const npcs = children.filter((c) => c.type === "npc");
|
|
1712
1963
|
const ast = {
|
|
1713
1964
|
type: "Program",
|
|
1714
1965
|
id: "root",
|
|
1715
1966
|
properties: isFragment ? root.properties || {} : {},
|
|
1716
1967
|
directives,
|
|
1717
|
-
children
|
|
1968
|
+
children,
|
|
1969
|
+
worlds,
|
|
1970
|
+
compositions,
|
|
1971
|
+
templates,
|
|
1972
|
+
npcs,
|
|
1718
1973
|
traits: isFragment ? root.traits || /* @__PURE__ */ new Map() : /* @__PURE__ */ new Map(),
|
|
1719
1974
|
loc: root.loc,
|
|
1720
|
-
body:
|
|
1975
|
+
body: children,
|
|
1721
1976
|
version,
|
|
1722
1977
|
migrations: migrations.length > 0 ? migrations : void 0,
|
|
1723
1978
|
root,
|
|
@@ -1802,14 +2057,14 @@ var HoloScriptPlusParser = class {
|
|
|
1802
2057
|
globalDirectives.push(...currentDirectives);
|
|
1803
2058
|
} else {
|
|
1804
2059
|
this.error(
|
|
1805
|
-
`Expected node after directives, got ${this.current().type}. Valid nodes: orb, template, logic, object, composition, scene, group`,
|
|
2060
|
+
`Expected node after directives, got ${this.current().type}. Valid nodes: orb, template, logic, object, world, composition, scene, group`,
|
|
1806
2061
|
"HSP003"
|
|
1807
2062
|
);
|
|
1808
2063
|
globalDirectives.push(...currentDirectives);
|
|
1809
2064
|
}
|
|
1810
2065
|
} else if (!this.check("EOF")) {
|
|
1811
2066
|
this.error(
|
|
1812
|
-
`Unexpected token ${this.current().type} "${this.current().value}" at top level. Expected: composition, object, template, logic, or @directive`,
|
|
2067
|
+
`Unexpected token ${this.current().type} "${this.current().value}" at top level. Expected: composition, object, world, template, logic, or @directive`,
|
|
1813
2068
|
"HSP001"
|
|
1814
2069
|
);
|
|
1815
2070
|
throw new Error("ParseError");
|
|
@@ -1998,7 +2253,7 @@ var HoloScriptPlusParser = class {
|
|
|
1998
2253
|
}
|
|
1999
2254
|
};
|
|
2000
2255
|
}
|
|
2001
|
-
if (type === "composition") {
|
|
2256
|
+
if (type === "composition" || type === "world") {
|
|
2002
2257
|
let id2;
|
|
2003
2258
|
if (this.check("HASH")) {
|
|
2004
2259
|
this.advance();
|
|
@@ -2011,14 +2266,25 @@ var HoloScriptPlusParser = class {
|
|
|
2011
2266
|
id2 = this.advance().value;
|
|
2012
2267
|
}
|
|
2013
2268
|
const compBody = this.parseCompositionBlock();
|
|
2269
|
+
const traits2 = /* @__PURE__ */ new Map();
|
|
2270
|
+
for (const child of compBody.children) {
|
|
2271
|
+
if (child.type === "fragment" && Array.isArray(child.directives)) {
|
|
2272
|
+
for (const d of child.directives) {
|
|
2273
|
+
if (d.type === "trait") {
|
|
2274
|
+
traits2.set(d.name, d.config);
|
|
2275
|
+
this.hasVRTraits = true;
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2014
2280
|
return {
|
|
2015
|
-
type: "composition",
|
|
2281
|
+
type: type === "composition" ? "composition" : "world",
|
|
2016
2282
|
name: id2,
|
|
2017
2283
|
id: id2,
|
|
2018
2284
|
properties: compBody.properties || {},
|
|
2019
2285
|
directives: [],
|
|
2020
2286
|
children: compBody.children,
|
|
2021
|
-
traits:
|
|
2287
|
+
traits: traits2,
|
|
2022
2288
|
body: compBody,
|
|
2023
2289
|
loc: {
|
|
2024
2290
|
start: { line: startToken.line, column: startToken.column },
|
|
@@ -2170,7 +2436,7 @@ var HoloScriptPlusParser = class {
|
|
|
2170
2436
|
properties[key] = spreadNode;
|
|
2171
2437
|
} else {
|
|
2172
2438
|
const token = this.current();
|
|
2173
|
-
const isKeyToken = token.type === "IDENTIFIER" || token.type === "STRING" || token.type === "STATE" || token.type === "STATE_MACHINE" || token.type === "INITIAL" || token.type === "ON_ENTRY" || token.type === "ON_EXIT" || token.type === "TRANSITION";
|
|
2439
|
+
const isKeyToken = token.type === "IDENTIFIER" || token.type === "STRING" || token.type === "HASH" || token.type === "STATE" || token.type === "STATE_MACHINE" || token.type === "INITIAL" || token.type === "ON_ENTRY" || token.type === "ON_EXIT" || token.type === "TRANSITION";
|
|
2174
2440
|
if (isKeyToken) {
|
|
2175
2441
|
const saved = this.pos;
|
|
2176
2442
|
const name = this.advance().value;
|
|
@@ -2192,6 +2458,7 @@ var HoloScriptPlusParser = class {
|
|
|
2192
2458
|
"spatial_group",
|
|
2193
2459
|
"scene",
|
|
2194
2460
|
"group",
|
|
2461
|
+
"world",
|
|
2195
2462
|
"module",
|
|
2196
2463
|
"struct",
|
|
2197
2464
|
"orb",
|
|
@@ -2199,7 +2466,9 @@ var HoloScriptPlusParser = class {
|
|
|
2199
2466
|
"assert",
|
|
2200
2467
|
"transition",
|
|
2201
2468
|
"on_entry",
|
|
2202
|
-
"on_exit"
|
|
2469
|
+
"on_exit",
|
|
2470
|
+
"page",
|
|
2471
|
+
"include"
|
|
2203
2472
|
];
|
|
2204
2473
|
if (name === "transition" && this.check("STRING")) {
|
|
2205
2474
|
const event = this.advance().value;
|
|
@@ -2363,7 +2632,7 @@ var HoloScriptPlusParser = class {
|
|
|
2363
2632
|
const body = this.check("LBRACE") ? this.parseCodeBlock() : "";
|
|
2364
2633
|
return { type: "migrate", fromVersion, body };
|
|
2365
2634
|
}
|
|
2366
|
-
if (
|
|
2635
|
+
if (chunkWRLUBRKS_cjs.VR_TRAITS.includes(name)) {
|
|
2367
2636
|
if (!this.options.enableVRTraits) {
|
|
2368
2637
|
this.warn(`VR trait @${name} is disabled`);
|
|
2369
2638
|
return null;
|
|
@@ -2374,9 +2643,9 @@ var HoloScriptPlusParser = class {
|
|
|
2374
2643
|
} else if (this.check("LBRACE")) {
|
|
2375
2644
|
config2 = this.parseBlockContent();
|
|
2376
2645
|
}
|
|
2377
|
-
return { type: "trait", name, config: config2 };
|
|
2646
|
+
return this.parseTraitSumTail({ type: "trait", name, config: config2 });
|
|
2378
2647
|
}
|
|
2379
|
-
if (
|
|
2648
|
+
if (chunkNG77ATEW_cjs.LIFECYCLE_HOOKS.includes(name)) {
|
|
2380
2649
|
const params = [];
|
|
2381
2650
|
if (this.check("LPAREN")) {
|
|
2382
2651
|
this.advance();
|
|
@@ -2685,7 +2954,7 @@ var HoloScriptPlusParser = class {
|
|
|
2685
2954
|
return { type: "hololand_event", event: eventName, params };
|
|
2686
2955
|
}
|
|
2687
2956
|
}
|
|
2688
|
-
if (
|
|
2957
|
+
if (chunkNG77ATEW_cjs.STRUCTURAL_DIRECTIVES.includes(name)) {
|
|
2689
2958
|
let nodeName;
|
|
2690
2959
|
if (this.check("STRING")) {
|
|
2691
2960
|
nodeName = this.advance().value;
|
|
@@ -2712,7 +2981,35 @@ var HoloScriptPlusParser = class {
|
|
|
2712
2981
|
config.body = this.parseCodeBlock();
|
|
2713
2982
|
}
|
|
2714
2983
|
}
|
|
2715
|
-
return { type: "trait", name, config };
|
|
2984
|
+
return this.parseTraitSumTail({ type: "trait", name, config });
|
|
2985
|
+
}
|
|
2986
|
+
parseTraitSumTail(first) {
|
|
2987
|
+
if (!this.check("PLUS")) {
|
|
2988
|
+
return first;
|
|
2989
|
+
}
|
|
2990
|
+
const alternatives = [
|
|
2991
|
+
{ type: "trait_atom", name: first.name, config: first.config ?? {} }
|
|
2992
|
+
];
|
|
2993
|
+
while (this.check("PLUS")) {
|
|
2994
|
+
this.advance();
|
|
2995
|
+
alternatives.push(this.parseTraitAtom());
|
|
2996
|
+
}
|
|
2997
|
+
return {
|
|
2998
|
+
type: "trait_sum",
|
|
2999
|
+
operation: "additive",
|
|
3000
|
+
alternatives
|
|
3001
|
+
};
|
|
3002
|
+
}
|
|
3003
|
+
parseTraitAtom() {
|
|
3004
|
+
this.expect("AT", "Expected @ in trait sum alternative");
|
|
3005
|
+
const name = this.expect("IDENTIFIER", "Expected trait name in trait sum alternative").value;
|
|
3006
|
+
let config = {};
|
|
3007
|
+
if (this.check("LPAREN")) {
|
|
3008
|
+
config = this.parseTraitConfig();
|
|
3009
|
+
} else if (this.check("LBRACE")) {
|
|
3010
|
+
config = this.parseBlockContent();
|
|
3011
|
+
}
|
|
3012
|
+
return { type: "trait_atom", name, config };
|
|
2716
3013
|
}
|
|
2717
3014
|
/**
|
|
2718
3015
|
* Parse a string inside parentheses: ("name")
|
|
@@ -2900,6 +3197,7 @@ var HoloScriptPlusParser = class {
|
|
|
2900
3197
|
"spatial_group",
|
|
2901
3198
|
"scene",
|
|
2902
3199
|
"group",
|
|
3200
|
+
"world",
|
|
2903
3201
|
"module",
|
|
2904
3202
|
"struct",
|
|
2905
3203
|
"orb",
|
|
@@ -2913,7 +3211,9 @@ var HoloScriptPlusParser = class {
|
|
|
2913
3211
|
"light",
|
|
2914
3212
|
"npc",
|
|
2915
3213
|
"camera",
|
|
2916
|
-
"timeline"
|
|
3214
|
+
"timeline",
|
|
3215
|
+
"page",
|
|
3216
|
+
"include"
|
|
2917
3217
|
];
|
|
2918
3218
|
while (!this.check("RBRACE") && !this.check("EOF")) {
|
|
2919
3219
|
const currentDirectives = [];
|
|
@@ -2930,11 +3230,69 @@ var HoloScriptPlusParser = class {
|
|
|
2930
3230
|
if (isNodeStart) {
|
|
2931
3231
|
const token = this.current();
|
|
2932
3232
|
const next = this.peek(1);
|
|
2933
|
-
if (next.type === "
|
|
3233
|
+
if (token.type === "IDENTIFIER" && token.value === "system" && (next.type === "IDENTIFIER" || next.type === "STRING") && this.peek(2).type !== "LBRACE") {
|
|
3234
|
+
const startToken = this.advance();
|
|
3235
|
+
const name = this.advance().value;
|
|
3236
|
+
result.systems.push({
|
|
3237
|
+
type: "system",
|
|
3238
|
+
name,
|
|
3239
|
+
id: name,
|
|
3240
|
+
properties: {},
|
|
3241
|
+
directives: currentDirectives,
|
|
3242
|
+
children: [],
|
|
3243
|
+
traits: /* @__PURE__ */ new Map(),
|
|
3244
|
+
loc: {
|
|
3245
|
+
start: { line: startToken.line, column: startToken.column },
|
|
3246
|
+
end: { line: this.current().line, column: this.current().column }
|
|
3247
|
+
}
|
|
3248
|
+
});
|
|
3249
|
+
} else if (token.type === "IDENTIFIER" && token.value === "page" && next.type === "STRING") {
|
|
3250
|
+
const startToken = this.advance();
|
|
3251
|
+
const name = this.advance().value;
|
|
3252
|
+
const properties = {};
|
|
3253
|
+
if (this.check("LBRACE")) {
|
|
3254
|
+
this.advance();
|
|
3255
|
+
this.skipNewlines();
|
|
3256
|
+
while (!this.check("RBRACE") && !this.check("EOF")) {
|
|
3257
|
+
this.skipNewlines();
|
|
3258
|
+
if (this.check("RBRACE") || this.check("EOF")) break;
|
|
3259
|
+
if (this.check("IDENTIFIER")) {
|
|
3260
|
+
const key = this.advance().value;
|
|
3261
|
+
if (this.check("COLON") || this.check("EQUALS")) {
|
|
3262
|
+
this.advance();
|
|
3263
|
+
properties[key] = this.parseValue();
|
|
3264
|
+
} else if (this.check("STRING")) {
|
|
3265
|
+
properties[key] = this.advance().value;
|
|
3266
|
+
} else {
|
|
3267
|
+
properties[key] = true;
|
|
3268
|
+
}
|
|
3269
|
+
} else if (this.check("COMMA")) {
|
|
3270
|
+
this.advance();
|
|
3271
|
+
} else {
|
|
3272
|
+
this.advance();
|
|
3273
|
+
}
|
|
3274
|
+
this.skipNewlines();
|
|
3275
|
+
}
|
|
3276
|
+
this.expect("RBRACE", "Expected }");
|
|
3277
|
+
}
|
|
3278
|
+
result.children.push({
|
|
3279
|
+
type: "page",
|
|
3280
|
+
name,
|
|
3281
|
+
id: name,
|
|
3282
|
+
properties,
|
|
3283
|
+
directives: currentDirectives,
|
|
3284
|
+
children: [],
|
|
3285
|
+
traits: /* @__PURE__ */ new Map(),
|
|
3286
|
+
loc: {
|
|
3287
|
+
start: { line: startToken.line, column: startToken.column },
|
|
3288
|
+
end: { line: this.current().line, column: this.current().column }
|
|
3289
|
+
}
|
|
3290
|
+
});
|
|
3291
|
+
} else if (next.type === "COLON" || next.type === "EQUALS") {
|
|
2934
3292
|
const key = this.advance().value;
|
|
2935
3293
|
this.advance();
|
|
2936
3294
|
result.properties[key] = this.parseValue();
|
|
2937
|
-
} else if (childNodeKeywords.includes(token.value) && (next.type === "LBRACE" || next.type === "STRING" || next.type === "IDENTIFIER")) {
|
|
3295
|
+
} else if (childNodeKeywords.includes(token.value) && (next.type === "LBRACE" || next.type === "STRING" || next.type === "IDENTIFIER" || next.type === "HASH")) {
|
|
2938
3296
|
const keyword = this.current().value;
|
|
2939
3297
|
const node = this.parseNode();
|
|
2940
3298
|
node.directives = [...currentDirectives, ...node.directives || []];
|
|
@@ -2948,7 +3306,7 @@ var HoloScriptPlusParser = class {
|
|
|
2948
3306
|
} else if (!childNodeKeywords.includes(token.value) && (next.type === "STRING" || next.type === "NUMBER" || next.type === "BOOLEAN" || next.type === "NULL")) {
|
|
2949
3307
|
const key = this.advance().value;
|
|
2950
3308
|
result.properties[key] = this.parseValue();
|
|
2951
|
-
} else if (next.type === "LBRACE" || next.type === "IDENTIFIER" || next.type === "STRING") {
|
|
3309
|
+
} else if (next.type === "LBRACE" || next.type === "IDENTIFIER" || next.type === "STRING" || next.type === "HASH") {
|
|
2952
3310
|
const keyword = this.current().value;
|
|
2953
3311
|
const node = this.parseNode();
|
|
2954
3312
|
node.directives = [...currentDirectives, ...node.directives || []];
|
|
@@ -3044,6 +3402,7 @@ var HoloScriptPlusParser = class {
|
|
|
3044
3402
|
parseLogicBlock() {
|
|
3045
3403
|
const result = {
|
|
3046
3404
|
functions: [],
|
|
3405
|
+
actions: [],
|
|
3047
3406
|
eventHandlers: [],
|
|
3048
3407
|
tickHandlers: []
|
|
3049
3408
|
};
|
|
@@ -3079,6 +3438,32 @@ var HoloScriptPlusParser = class {
|
|
|
3079
3438
|
}
|
|
3080
3439
|
const body = this.parseCodeBlock();
|
|
3081
3440
|
result.functions.push({ name: funcName, params, body });
|
|
3441
|
+
} else if (keyword === "action") {
|
|
3442
|
+
this.advance();
|
|
3443
|
+
const actionName = this.check("IDENTIFIER") || this.check("STRING") ? this.advance().value : "anonymous";
|
|
3444
|
+
const params = [];
|
|
3445
|
+
if (this.check("LPAREN")) {
|
|
3446
|
+
this.advance();
|
|
3447
|
+
while (!this.check("RPAREN") && !this.check("EOF")) {
|
|
3448
|
+
if (this.check("IDENTIFIER")) {
|
|
3449
|
+
params.push(this.advance().value);
|
|
3450
|
+
if (this.check("COLON")) {
|
|
3451
|
+
this.advance();
|
|
3452
|
+
while (!this.check("COMMA") && !this.check("RPAREN") && !this.check("EOF")) {
|
|
3453
|
+
this.advance();
|
|
3454
|
+
}
|
|
3455
|
+
}
|
|
3456
|
+
if (this.check("COMMA")) {
|
|
3457
|
+
this.advance();
|
|
3458
|
+
}
|
|
3459
|
+
} else {
|
|
3460
|
+
this.advance();
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3463
|
+
this.expect("RPAREN", "Expected )");
|
|
3464
|
+
}
|
|
3465
|
+
const body = this.check("LBRACE") ? this.parseCodeBlock() : "";
|
|
3466
|
+
result.actions.push({ name: actionName, params, body });
|
|
3082
3467
|
} else if (keyword === "on_tick") {
|
|
3083
3468
|
this.advance();
|
|
3084
3469
|
let interval = 1;
|
|
@@ -4270,7 +4655,7 @@ var HoloScriptPlusParser = class {
|
|
|
4270
4655
|
code: "HSP001"
|
|
4271
4656
|
};
|
|
4272
4657
|
}
|
|
4273
|
-
if (current.type === "IDENTIFIER" &&
|
|
4658
|
+
if (current.type === "IDENTIFIER" && chunkWRLUBRKS_cjs.VR_TRAITS.includes(current.value)) {
|
|
4274
4659
|
if (prev?.type !== "AT") {
|
|
4275
4660
|
return {
|
|
4276
4661
|
message: `'${current.value}' is a trait and requires '@' prefix`,
|
|
@@ -4479,7 +4864,7 @@ function parse(source, options) {
|
|
|
4479
4864
|
return parser.parse(source);
|
|
4480
4865
|
}
|
|
4481
4866
|
|
|
4482
|
-
exports.
|
|
4867
|
+
exports.ChunkBasedIncrementalParser = ChunkBasedIncrementalParser;
|
|
4483
4868
|
exports.HSPLUS_ERROR_CODES = HSPLUS_ERROR_CODES;
|
|
4484
4869
|
exports.HoloScriptPlusParser = HoloScriptPlusParser;
|
|
4485
4870
|
exports.ParseCache = ParseCache;
|
|
@@ -4495,5 +4880,6 @@ exports.getErrorCodeDocumentation = getErrorCodeDocumentation;
|
|
|
4495
4880
|
exports.getSourceContext = getSourceContext;
|
|
4496
4881
|
exports.globalParseCache = globalParseCache;
|
|
4497
4882
|
exports.parse = parse;
|
|
4498
|
-
|
|
4499
|
-
//# sourceMappingURL=chunk-
|
|
4883
|
+
exports.parseIncrementalChunks = parseIncrementalChunks;
|
|
4884
|
+
//# sourceMappingURL=chunk-T5J7ZKP3.cjs.map
|
|
4885
|
+
//# sourceMappingURL=chunk-T5J7ZKP3.cjs.map
|