@holoscript/core 6.0.3 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -40
- package/bin/holoscript.cjs +3 -0
- package/dist/GLTFPipeline-SFIORFJU.js +16 -0
- package/dist/GLTFPipeline-VNNDPONV.cjs +37 -0
- package/dist/{HoloScriptPlusParser-BZR5DELQ.js → HoloScriptPlusParser-7FBIFUFC.js} +6 -5
- package/dist/{HoloScriptPlusParser-SBMYDNXO.cjs → HoloScriptPlusParser-A2W7OCN2.cjs} +17 -16
- package/dist/HoloScriptPlusParser-F2Z56FJR.js +10 -0
- package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +27 -0
- package/dist/{USDZExporter-MHEHXZB4.cjs → USDZExporter-3FWJ25JI.cjs} +344 -16
- package/dist/{USDZExporter-YA55ZS35.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-XSUZMPVQ.cjs → chunk-27MPVJVZ.cjs} +64 -28
- package/dist/{chunk-W76ETJTI.js → chunk-2A7FURVO.js} +44 -8
- package/dist/{chunk-C7BNX4XJ.js → chunk-2B7WVIDZ.js} +11 -8
- package/dist/chunk-2BSMSUCE.js +1941 -0
- package/dist/chunk-2HLIGOKU.cjs +5546 -0
- package/dist/{chunk-GC3YU46J.js → chunk-2M2DPHKB.js} +4 -4
- package/dist/{chunk-A6GO3DPZ.cjs → chunk-2YSNA2F2.cjs} +321 -49
- package/dist/{chunk-ZL6VJ6SN.js → chunk-33XCOVE3.js} +5 -5
- package/dist/chunk-3FOKASKO.cjs +348 -0
- package/dist/{chunk-XSF76QRU.js → chunk-4C57PR42.js} +3 -3
- package/dist/chunk-4N4SXXWF.js +769 -0
- package/dist/chunk-4PDEPEQW.cjs +41 -0
- package/dist/chunk-4R6SBXDB.js +45 -0
- package/dist/chunk-4SY77NA4.cjs +413 -0
- package/dist/{chunk-74YCHHTE.js → chunk-4UUKPCY4.js} +670 -116
- package/dist/{chunk-VZNKJZTT.cjs → chunk-52ULD552.cjs} +178 -113
- package/dist/{chunk-65RFOWZI.js → chunk-5CKA5SXU.js} +441 -23
- 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-EJA7G2C4.cjs → chunk-5WUNN6ZN.cjs} +2 -2
- package/dist/{chunk-ELLQPFAF.js → chunk-6ASWLXXN.js} +24 -10
- package/dist/chunk-6CTRH7HT.cjs +1985 -0
- package/dist/{chunk-ARNKA274.cjs → chunk-6EX3I5P4.cjs} +6 -6
- package/dist/chunk-6FGQNDR4.js +5731 -0
- package/dist/{chunk-X4YVN7H3.cjs → chunk-6KMK2UXT.cjs} +152 -56
- package/dist/{chunk-KUJRR4FJ.js → chunk-6L4VE27M.js} +36 -24
- package/dist/{chunk-RT7LJRSF.cjs → chunk-6S6TKNEA.cjs} +7357 -8312
- package/dist/chunk-77V4GTCA.js +596 -0
- package/dist/{chunk-XH7SE4HH.cjs → chunk-7AD52FRS.cjs} +19 -19
- package/dist/chunk-7OPW2KO7.cjs +639 -0
- package/dist/chunk-A6KINLZJ.js +236 -0
- package/dist/chunk-AIA52I7T.cjs +543 -0
- package/dist/chunk-AIX25INK.cjs +602 -0
- package/dist/{chunk-WN3YF33G.cjs → chunk-AO4I2Z7M.cjs} +15 -17
- package/dist/{chunk-TSWTWZ42.cjs → chunk-BPICAGBV.cjs} +376 -209
- package/dist/chunk-BRQJKJGT.cjs +20 -0
- package/dist/{chunk-3FXV5S25.cjs → chunk-C37BHB7N.cjs} +6 -3
- package/dist/{chunk-XNMEH2BI.js → chunk-CBJY23VL.js} +3 -3
- package/dist/chunk-CIWWXYHZ.cjs +50 -0
- package/dist/{chunk-NTMZSDXM.cjs → chunk-DIL6DDDN.cjs} +101 -45
- package/dist/chunk-DMXC24WV.js +404 -0
- package/dist/{chunk-SPDELRRV.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-7N3JIJMT.js → chunk-EMMC5CSQ.js} +12 -8
- package/dist/{chunk-EUFLX2PI.js → chunk-EOBB6A4B.js} +7263 -8214
- package/dist/chunk-EOFNVCM6.js +325 -0
- package/dist/{chunk-NKRKT6V2.js → chunk-ER4GATIU.js} +11 -10
- 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-HBZYCASG.js → chunk-FXKTYFYA.js} +203 -36
- package/dist/chunk-GCMWDSBZ.cjs +729 -0
- package/dist/chunk-GJNCFRJU.cjs +125 -0
- package/dist/{chunk-I3XGTIHM.cjs → chunk-GMP623FG.cjs} +16 -13
- package/dist/{chunk-CNVM7J3M.js → chunk-GN3KDX4W.js} +149 -53
- package/dist/{chunk-WFJIDI2N.cjs → chunk-GQYKQSTC.cjs} +10 -10
- package/dist/chunk-GTU2Z2WW.cjs +262 -0
- package/dist/chunk-GZG4KA4E.js +529 -0
- package/dist/{chunk-DIEDKX5B.cjs → chunk-H3MGK7TX.cjs} +45 -33
- package/dist/{chunk-DN7UFU63.cjs → chunk-H5DZIHJP.cjs} +14 -17
- package/dist/{chunk-DH5G2JUA.cjs → chunk-HANL7K2Q.cjs} +66 -53
- package/dist/{chunk-EGIZHYJP.cjs → chunk-HCCQLAA4.cjs} +2 -13
- package/dist/{chunk-HHS6FMOU.cjs → chunk-HGVXZDSK.cjs} +178 -29
- package/dist/{chunk-LBPEZQAF.js → chunk-HRODTEEO.js} +30 -10
- package/dist/{chunk-ZGTGVSTZ.js → chunk-HYNTS5CP.js} +2 -2
- package/dist/{chunk-RE3OKSYF.cjs → chunk-HZCQO4JM.cjs} +6 -6
- package/dist/{chunk-NCUHGRTZ.js → chunk-I2O7TW6B.js} +12 -8
- package/dist/chunk-IHESJZSW.js +4490 -0
- package/dist/{chunk-7H5UNJZD.cjs → chunk-IRWWS72C.cjs} +64 -22
- package/dist/{chunk-EMO7HAKJ.cjs → chunk-IVIA7K75.cjs} +691 -133
- package/dist/chunk-IVY74O6C.js +247 -0
- package/dist/chunk-J32ZJZJH.js +554 -0
- package/dist/chunk-JD7CIZ33.js +1949 -0
- package/dist/{chunk-7X2IEJIE.cjs → chunk-JIYN45TV.cjs} +41 -42
- package/dist/{chunk-XDXZM3ZP.cjs → chunk-KHPCJRI3.cjs} +24 -21
- package/dist/chunk-KKFZ3B6J.cjs +557 -0
- package/dist/chunk-KPJL34Y7.cjs +186 -0
- package/dist/{chunk-7KPI4EKH.cjs → chunk-KQTPCYTG.cjs} +130 -50
- package/dist/{chunk-F5LVGHNT.js → chunk-KX76JUQY.js} +3 -3
- package/dist/chunk-L4LFINPO.js +623 -0
- package/dist/{chunk-2UX5LRAP.cjs → chunk-L63H3SQ4.cjs} +46 -32
- package/dist/{chunk-NLPSZT4C.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-PQLGZKMC.cjs → chunk-MJVIRCUV.cjs} +31 -27
- package/dist/{chunk-AC4BSHFV.js → chunk-MSMIFMBL.js} +135 -18
- package/dist/{chunk-56IF4NTA.js → chunk-MXFUTKCO.js} +18 -18
- package/dist/{chunk-NRUB55IT.cjs → chunk-MXJ5SS53.cjs} +450 -32
- package/dist/chunk-MXWNGCRS.js +2176 -0
- package/dist/chunk-MYY4PMWX.cjs +264 -0
- package/dist/chunk-N75IH2HY.js +258 -0
- package/dist/chunk-NG77ATEW.cjs +778 -0
- package/dist/chunk-NW5G5FBQ.js +215 -0
- package/dist/{chunk-4FCZDTD5.js → chunk-OEFY723R.js} +29 -16
- package/dist/chunk-OEV5RMZO.cjs +3042 -0
- package/dist/{chunk-VSXOIUCF.cjs → chunk-OIQYIIO3.cjs} +7 -7
- package/dist/{chunk-32TWR3HE.js → chunk-OL46QLBJ.js} +3 -12
- package/dist/chunk-OPZ7XDDI.js +487 -0
- package/dist/chunk-OSYNRVOV.cjs +243 -0
- package/dist/{chunk-HUFNKFA6.js → chunk-P7YIA5LN.js} +93 -13
- package/dist/chunk-PGANYCAG.cjs +220 -0
- package/dist/{chunk-CO2VM2DK.js → chunk-QAVXL2IH.js} +62 -20
- package/dist/{chunk-BO2OKHIY.js → chunk-QCCBXSCE.js} +1640 -1311
- package/dist/{chunk-WYH4GVZ5.js → chunk-QPOQ7VPI.js} +16 -13
- package/dist/{chunk-V42NTCFH.js → chunk-QTPMJRGS.js} +2331 -17
- package/dist/{chunk-FEFHPUEM.cjs → chunk-QWNQ523V.cjs} +1705 -1382
- package/dist/{chunk-VK5AXKO3.js → chunk-R3IVNY6P.js} +166 -101
- package/dist/chunk-R75BSDH7.cjs +50 -0
- package/dist/{chunk-AIUXRS74.cjs → chunk-RMHC2VG7.cjs} +2358 -41
- package/dist/chunk-RUXGBKPS.cjs +4517 -0
- package/dist/{chunk-PLMYCCA4.js → chunk-S5IFXW6E.js} +113 -9
- package/dist/{chunk-27LWW5FU.cjs → chunk-S6YWHCKV.cjs} +5 -5
- package/dist/{chunk-SUCBB66F.js → chunk-SIEXCILW.js} +3 -3
- package/dist/{chunk-CLYEIWA5.cjs → chunk-SLU6UPJI.cjs} +5 -3
- package/dist/{chunk-H6WMMLQK.cjs → chunk-T5J7ZKP3.cjs} +454 -61
- 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-BU5ZAFMC.js → chunk-U4NBQJBY.js} +11 -13
- package/dist/{chunk-Y5MUAYTO.js → chunk-UD3DSHZM.js} +10 -13
- package/dist/chunk-UDMYRFDZ.js +3038 -0
- package/dist/{chunk-PPULB4GG.cjs → chunk-UOIGFQXC.cjs} +90 -68
- package/dist/{chunk-EPWRXL6S.js → chunk-URG2SJLK.js} +41 -42
- package/dist/{chunk-VJVCD5T5.cjs → chunk-V73NPPTM.cjs} +152 -35
- package/dist/chunk-VECQYRXL.js +474 -0
- package/dist/chunk-VEXPG4WN.js +1989 -0
- package/dist/{chunk-4SMUJFHL.js → chunk-VMLKSV26.js} +9 -6
- package/dist/{chunk-HKCVM6OK.cjs → chunk-VSK7W3O5.cjs} +47 -27
- package/dist/chunk-VVKVQZI6.js +55 -0
- package/dist/{chunk-KDB6BUMB.js → chunk-W55Z7QIX.js} +172 -25
- package/dist/{chunk-BY3B7ZYV.cjs → chunk-W6P2GBHH.cjs} +3 -3
- package/dist/{chunk-PBA6NXCT.cjs → chunk-W6RW64BB.cjs} +11 -8
- package/dist/chunk-WDT3JTGM.cjs +483 -0
- package/dist/{chunk-26TLYBFD.js → chunk-WKX5AMOY.js} +3 -3
- package/dist/chunk-WNNE3PO3.js +34 -0
- package/dist/chunk-WRLUBRKS.cjs +1943 -0
- package/dist/chunk-WRNEH5MO.js +3169 -0
- package/dist/{chunk-54FHG2MX.js → chunk-WRWEX5ZF.js} +7 -4
- package/dist/chunk-X3GJPRVK.cjs +3246 -0
- package/dist/{chunk-4KJ2R7VP.cjs → chunk-XFXGA5IW.cjs} +126 -22
- package/dist/{chunk-L3Z2HIWJ.cjs → chunk-XHIV6326.cjs} +4 -4
- package/dist/chunk-XJAN7CZG.cjs +432 -0
- package/dist/chunk-XL6INWKT.js +121 -0
- package/dist/{chunk-KYM4XRFG.js → chunk-XMWZG36H.js} +4 -4
- package/dist/{chunk-BKIGPPVM.js → chunk-XSFNHP2E.js} +6 -3
- package/dist/{chunk-ODGMVILH.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-CMYAWUX3.js → chunk-YIMN575O.js} +445 -53
- package/dist/chunk-YIVFJNYV.js +176 -0
- package/dist/{chunk-V2ILLPHK.cjs → chunk-YKGPCZEE.cjs} +10 -10
- package/dist/chunk-YQELFNJV.js +39 -0
- package/dist/chunk-YSCKYJOB.cjs +2196 -0
- package/dist/chunk-Z5XMPRNC.cjs +5390 -0
- package/dist/{chunk-3FYZOR7S.cjs → chunk-ZDSYWBIE.cjs} +18 -18
- package/dist/{chunk-CQDOF3G7.cjs → chunk-ZKSS47EV.cjs} +24 -19
- package/dist/chunk-ZUL5AVTX.cjs +1993 -0
- package/dist/chunk-ZXBZVXDW.js +5386 -0
- package/dist/{chunk-AW7WAELW.js → chunk-ZZ7RO2UQ.js} +314 -46
- package/dist/cli/holoscript-runner.cjs +203 -206
- package/dist/cli/holoscript-runner.js +147 -150
- package/dist/codebase/index.cjs +1 -1
- package/dist/codebase/index.d.ts +25 -0
- package/dist/codebase/index.js +1 -1
- package/dist/compiler/agent-inference.cjs +10 -8
- package/dist/compiler/agent-inference.js +6 -4
- package/dist/compiler/android-xr.cjs +12 -8
- package/dist/compiler/android-xr.js +10 -6
- package/dist/compiler/android.cjs +12 -9
- package/dist/compiler/android.js +10 -7
- package/dist/compiler/ar.cjs +9 -7
- package/dist/compiler/ar.js +7 -5
- package/dist/compiler/babylon.cjs +12 -9
- package/dist/compiler/babylon.js +11 -8
- 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 +161 -151
- package/dist/compiler/domain-block-utils.js +7 -5
- package/dist/compiler/dtdl.cjs +10 -8
- package/dist/compiler/dtdl.js +7 -5
- package/dist/compiler/gltf-pipeline.cjs +9 -9
- package/dist/compiler/gltf-pipeline.js +2 -2
- package/dist/compiler/godot.cjs +9 -7
- package/dist/compiler/godot.js +8 -6
- package/dist/compiler/incremental.cjs +12 -8
- package/dist/compiler/incremental.js +7 -3
- package/dist/compiler/index.cjs +5152 -814
- package/dist/compiler/index.d.ts +404 -21
- package/dist/compiler/index.js +5063 -859
- package/dist/compiler/ios.cjs +11 -9
- package/dist/compiler/ios.js +9 -7
- 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 -17
- package/dist/compiler/multi-layer.js +13 -10
- package/dist/compiler/nodetoy.cjs +5 -5
- package/dist/compiler/nodetoy.js +2 -2
- package/dist/compiler/openxr.cjs +10 -7
- package/dist/compiler/openxr.js +9 -6
- package/dist/compiler/playcanvas.cjs +10 -8
- package/dist/compiler/playcanvas.js +9 -7
- package/dist/compiler/r3f.cjs +17 -14
- package/dist/compiler/r3f.d.ts +22 -0
- package/dist/compiler/r3f.js +12 -9
- 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 -8
- package/dist/compiler/sdf.js +8 -6
- package/dist/compiler/semantic-scene.cjs +7 -7
- package/dist/compiler/semantic-scene.js +2 -2
- package/dist/compiler/state.cjs +9 -6
- package/dist/compiler/state.js +7 -4
- package/dist/compiler/trait-composition.cjs +11 -8
- package/dist/compiler/trait-composition.js +7 -4
- package/dist/compiler/unity.cjs +10 -7
- package/dist/compiler/unity.js +9 -6
- package/dist/compiler/unreal.cjs +11 -8
- package/dist/compiler/unreal.js +9 -6
- package/dist/compiler/urdf.cjs +20 -14
- package/dist/compiler/urdf.js +8 -6
- package/dist/compiler/usd-physics.cjs +10 -8
- package/dist/compiler/usd-physics.js +7 -5
- package/dist/compiler/visionos.cjs +10 -7
- package/dist/compiler/visionos.js +9 -6
- package/dist/compiler/vrchat.cjs +10 -8
- package/dist/compiler/vrchat.js +8 -6
- package/dist/compiler/vrr.cjs +10 -8
- package/dist/compiler/vrr.js +8 -6
- package/dist/compiler/wasm.cjs +13 -11
- package/dist/compiler/wasm.js +8 -6
- package/dist/compiler/webgpu.cjs +9 -7
- package/dist/compiler/webgpu.js +8 -6
- package/dist/constants.d.ts +4 -0
- 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.d.ts +9 -0
- package/dist/entries/interop.js +5 -3
- package/dist/entries/scripting.cjs +18 -17
- package/dist/entries/scripting.d.ts +7 -0
- package/dist/entries/scripting.js +8 -7
- 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 +21396 -39967
- package/dist/index.d.ts +1496 -40
- package/dist/index.js +21066 -40142
- 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-FSKBTE3W.cjs +1265 -0
- package/dist/ml-dsa-Z7JDKW4L.js +1265 -0
- 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 -10
- package/dist/parser.d.ts +11 -0
- package/dist/parser.js +10 -7
- package/dist/{playwright-7DTEQCBD.cjs → playwright-3AT3AKTV.cjs} +1985 -1985
- package/dist/{playwright-BIZXMLD2.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.d.ts +0 -48
- package/dist/self-improvement/index.js +545 -0
- package/dist/storage/index.cjs +10 -9
- package/dist/storage/index.d.ts +24 -0
- 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 +33 -0
- 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.d.ts +111 -0
- package/dist/traits/engines/index.js +380 -0
- package/dist/traits/index.cjs +14387 -4320
- package/dist/traits/index.d.ts +197 -0
- package/dist/traits/index.js +16455 -6958
- 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 +7 -7
- package/dist/wot/index.js +2 -2
- package/package.json +150 -23
- package/dist/GLTFPipeline-3KLWWUQO.cjs +0 -34
- package/dist/GLTFPipeline-LYII2ZVQ.js +0 -13
- package/dist/chunk-3KEU5QYY.cjs +0 -175
- package/dist/chunk-6OQBLABR.js +0 -5240
- package/dist/chunk-6WNCRE6F.js +0 -126
- package/dist/chunk-C2QHVHZF.js +0 -4066
- package/dist/chunk-CN4NOESF.cjs +0 -416
- package/dist/chunk-DXVCEFZB.js +0 -2027
- package/dist/chunk-ENV7K6XA.js +0 -282
- package/dist/chunk-H7XMORZI.js +0 -2731
- package/dist/chunk-HAN4V3PF.cjs +0 -2037
- package/dist/chunk-HF4OFY25.cjs +0 -4097
- package/dist/chunk-LER4WXW5.cjs +0 -286
- package/dist/chunk-M6FU6S22.js +0 -2911
- package/dist/chunk-MWEFR6YQ.js +0 -1857
- package/dist/chunk-PJMOXFPR.cjs +0 -1861
- package/dist/chunk-QHVVVN47.cjs +0 -2033
- package/dist/chunk-QWKUKVRE.js +0 -2026
- package/dist/chunk-UITWA6DV.cjs +0 -2829
- package/dist/chunk-UQW6SLM5.js +0 -172
- package/dist/chunk-WUXIRGZP.cjs +0 -2915
- package/dist/chunk-X67XRI2T.js +0 -410
- package/dist/chunk-Y7VK5TH3.cjs +0 -129
- package/dist/chunk-YCMQQQ5U.cjs +0 -5244
- package/dist/post-quantum-JTTAAGO3.cjs +0 -6
- package/dist/post-quantum-RVPVDEPI.js +0 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNG77ATEW_cjs = require('./chunk-NG77ATEW.cjs');
|
|
4
|
+
var chunkWRLUBRKS_cjs = require('./chunk-WRLUBRKS.cjs');
|
|
4
5
|
var crypto = require('crypto');
|
|
5
6
|
|
|
6
7
|
function _interopNamespace(e) {
|
|
@@ -681,6 +682,220 @@ var ParseCache = class {
|
|
|
681
682
|
};
|
|
682
683
|
var globalParseCache = new ParseCache();
|
|
683
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
|
+
|
|
684
899
|
// src/parser/RichErrors.ts
|
|
685
900
|
var HSPLUS_ERROR_CODES = {
|
|
686
901
|
// Syntax Errors (HSP001-HSP099)
|
|
@@ -768,7 +983,7 @@ function similarity(a, b) {
|
|
|
768
983
|
function findSimilarTrait(input, threshold = 0.5) {
|
|
769
984
|
let bestMatch;
|
|
770
985
|
let bestScore = threshold;
|
|
771
|
-
for (const trait of
|
|
986
|
+
for (const trait of chunkWRLUBRKS_cjs.VR_TRAITS) {
|
|
772
987
|
const score = similarity(input, trait);
|
|
773
988
|
if (score > bestScore) {
|
|
774
989
|
bestScore = score;
|
|
@@ -1573,7 +1788,18 @@ var HoloScriptPlusParser = class {
|
|
|
1573
1788
|
this.hasVRTraits = false;
|
|
1574
1789
|
this.hasControlFlow = false;
|
|
1575
1790
|
this.compiledExpressions = /* @__PURE__ */ new Map();
|
|
1576
|
-
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();
|
|
1577
1803
|
this.options = {
|
|
1578
1804
|
enableVRTraits: true,
|
|
1579
1805
|
enableTypeScriptImports: true,
|
|
@@ -1588,7 +1814,7 @@ var HoloScriptPlusParser = class {
|
|
|
1588
1814
|
getQuickFixes() {
|
|
1589
1815
|
const fixes = /* @__PURE__ */ new Map();
|
|
1590
1816
|
for (const error of this.errors) {
|
|
1591
|
-
const errorFixes =
|
|
1817
|
+
const errorFixes = chunkNG77ATEW_cjs.generateQuickFixes(
|
|
1592
1818
|
{
|
|
1593
1819
|
code: error.code,
|
|
1594
1820
|
message: error.message,
|
|
@@ -1609,7 +1835,7 @@ var HoloScriptPlusParser = class {
|
|
|
1609
1835
|
*/
|
|
1610
1836
|
getEnrichedErrors() {
|
|
1611
1837
|
return this.errors.map(
|
|
1612
|
-
(error) =>
|
|
1838
|
+
(error) => chunkNG77ATEW_cjs.enrichErrorWithSuggestions(
|
|
1613
1839
|
{
|
|
1614
1840
|
code: error.code,
|
|
1615
1841
|
message: error.message,
|
|
@@ -1638,9 +1864,33 @@ var HoloScriptPlusParser = class {
|
|
|
1638
1864
|
return this.buildResult(root);
|
|
1639
1865
|
}
|
|
1640
1866
|
/**
|
|
1641
|
-
* 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).
|
|
1642
1878
|
*/
|
|
1643
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
|
+
}
|
|
1644
1894
|
this.source = source;
|
|
1645
1895
|
this.errors = [];
|
|
1646
1896
|
this.warnings = [];
|
|
@@ -1649,46 +1899,43 @@ var HoloScriptPlusParser = class {
|
|
|
1649
1899
|
this.hasVRTraits = false;
|
|
1650
1900
|
this.hasControlFlow = false;
|
|
1651
1901
|
this.compiledExpressions = /* @__PURE__ */ new Map();
|
|
1652
|
-
const
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
const chunkFeatures = chunkResult.features;
|
|
1664
|
-
if (chunkAst?.root) {
|
|
1665
|
-
const node = chunkAst.root;
|
|
1666
|
-
this.offsetNodeLoc(node, chunk.startLine - 1);
|
|
1667
|
-
topLevelNodes.push(node);
|
|
1668
|
-
cache.set(chunk.id, hash, node);
|
|
1669
|
-
this.hasState = this.hasState || !!chunkFeatures?.state;
|
|
1670
|
-
this.hasVRTraits = this.hasVRTraits || !!chunkFeatures?.vrTraits;
|
|
1671
|
-
this.hasControlFlow = this.hasControlFlow || !!chunkFeatures?.loops || !!chunkFeatures?.conditionals;
|
|
1672
|
-
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
|
+
}
|
|
1673
1913
|
}
|
|
1674
|
-
this.errors.push(...chunkResult.errors);
|
|
1675
|
-
this.warnings.push(...chunkResult.warnings || []);
|
|
1676
1914
|
}
|
|
1677
1915
|
}
|
|
1678
|
-
const root = {
|
|
1916
|
+
const root = incrementalResult.ast.type === "fragment" ? incrementalResult.ast : {
|
|
1679
1917
|
type: "fragment",
|
|
1680
1918
|
id: "root",
|
|
1681
1919
|
properties: {},
|
|
1682
|
-
directives:
|
|
1683
|
-
children:
|
|
1920
|
+
directives: [],
|
|
1921
|
+
children: [incrementalResult.ast],
|
|
1684
1922
|
traits: /* @__PURE__ */ new Map(),
|
|
1685
|
-
loc: {
|
|
1686
|
-
|
|
1687
|
-
end: { line: chunks.length > 0 ? chunks[chunks.length - 1].endLine : 1, column: 1 }
|
|
1688
|
-
},
|
|
1689
|
-
body: topLevelNodes
|
|
1923
|
+
loc: incrementalResult.ast.loc || { start: { line: 1, column: 1 }, end: { line: 1, column: 1 } },
|
|
1924
|
+
body: [incrementalResult.ast]
|
|
1690
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
|
+
}
|
|
1691
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
|
+
};
|
|
1692
1939
|
return result;
|
|
1693
1940
|
}
|
|
1694
1941
|
buildResult(root) {
|
|
@@ -1708,15 +1955,24 @@ var HoloScriptPlusParser = class {
|
|
|
1708
1955
|
}
|
|
1709
1956
|
}
|
|
1710
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");
|
|
1711
1963
|
const ast = {
|
|
1712
1964
|
type: "Program",
|
|
1713
1965
|
id: "root",
|
|
1714
1966
|
properties: isFragment ? root.properties || {} : {},
|
|
1715
1967
|
directives,
|
|
1716
|
-
children
|
|
1968
|
+
children,
|
|
1969
|
+
worlds,
|
|
1970
|
+
compositions,
|
|
1971
|
+
templates,
|
|
1972
|
+
npcs,
|
|
1717
1973
|
traits: isFragment ? root.traits || /* @__PURE__ */ new Map() : /* @__PURE__ */ new Map(),
|
|
1718
1974
|
loc: root.loc,
|
|
1719
|
-
body:
|
|
1975
|
+
body: children,
|
|
1720
1976
|
version,
|
|
1721
1977
|
migrations: migrations.length > 0 ? migrations : void 0,
|
|
1722
1978
|
root,
|
|
@@ -1801,14 +2057,14 @@ var HoloScriptPlusParser = class {
|
|
|
1801
2057
|
globalDirectives.push(...currentDirectives);
|
|
1802
2058
|
} else {
|
|
1803
2059
|
this.error(
|
|
1804
|
-
`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`,
|
|
1805
2061
|
"HSP003"
|
|
1806
2062
|
);
|
|
1807
2063
|
globalDirectives.push(...currentDirectives);
|
|
1808
2064
|
}
|
|
1809
2065
|
} else if (!this.check("EOF")) {
|
|
1810
2066
|
this.error(
|
|
1811
|
-
`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`,
|
|
1812
2068
|
"HSP001"
|
|
1813
2069
|
);
|
|
1814
2070
|
throw new Error("ParseError");
|
|
@@ -1997,7 +2253,7 @@ var HoloScriptPlusParser = class {
|
|
|
1997
2253
|
}
|
|
1998
2254
|
};
|
|
1999
2255
|
}
|
|
2000
|
-
if (type === "composition") {
|
|
2256
|
+
if (type === "composition" || type === "world") {
|
|
2001
2257
|
let id2;
|
|
2002
2258
|
if (this.check("HASH")) {
|
|
2003
2259
|
this.advance();
|
|
@@ -2010,14 +2266,25 @@ var HoloScriptPlusParser = class {
|
|
|
2010
2266
|
id2 = this.advance().value;
|
|
2011
2267
|
}
|
|
2012
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
|
+
}
|
|
2013
2280
|
return {
|
|
2014
|
-
type: "composition",
|
|
2281
|
+
type: type === "composition" ? "composition" : "world",
|
|
2015
2282
|
name: id2,
|
|
2016
2283
|
id: id2,
|
|
2017
2284
|
properties: compBody.properties || {},
|
|
2018
2285
|
directives: [],
|
|
2019
2286
|
children: compBody.children,
|
|
2020
|
-
traits:
|
|
2287
|
+
traits: traits2,
|
|
2021
2288
|
body: compBody,
|
|
2022
2289
|
loc: {
|
|
2023
2290
|
start: { line: startToken.line, column: startToken.column },
|
|
@@ -2169,7 +2436,7 @@ var HoloScriptPlusParser = class {
|
|
|
2169
2436
|
properties[key] = spreadNode;
|
|
2170
2437
|
} else {
|
|
2171
2438
|
const token = this.current();
|
|
2172
|
-
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";
|
|
2173
2440
|
if (isKeyToken) {
|
|
2174
2441
|
const saved = this.pos;
|
|
2175
2442
|
const name = this.advance().value;
|
|
@@ -2191,6 +2458,7 @@ var HoloScriptPlusParser = class {
|
|
|
2191
2458
|
"spatial_group",
|
|
2192
2459
|
"scene",
|
|
2193
2460
|
"group",
|
|
2461
|
+
"world",
|
|
2194
2462
|
"module",
|
|
2195
2463
|
"struct",
|
|
2196
2464
|
"orb",
|
|
@@ -2198,7 +2466,9 @@ var HoloScriptPlusParser = class {
|
|
|
2198
2466
|
"assert",
|
|
2199
2467
|
"transition",
|
|
2200
2468
|
"on_entry",
|
|
2201
|
-
"on_exit"
|
|
2469
|
+
"on_exit",
|
|
2470
|
+
"page",
|
|
2471
|
+
"include"
|
|
2202
2472
|
];
|
|
2203
2473
|
if (name === "transition" && this.check("STRING")) {
|
|
2204
2474
|
const event = this.advance().value;
|
|
@@ -2331,7 +2601,9 @@ var HoloScriptPlusParser = class {
|
|
|
2331
2601
|
parseDirective() {
|
|
2332
2602
|
this.expect("AT", "Expected @");
|
|
2333
2603
|
const nameToken = this.current();
|
|
2334
|
-
const isKeyword = ["STATE_MACHINE", "STATE", "ON_ENTRY", "ON_EXIT", "TRANSITION"].includes(
|
|
2604
|
+
const isKeyword = ["STATE_MACHINE", "STATE", "ON_ENTRY", "ON_EXIT", "TRANSITION"].includes(
|
|
2605
|
+
nameToken.type
|
|
2606
|
+
);
|
|
2335
2607
|
if (nameToken.type !== "IDENTIFIER" && !isKeyword) {
|
|
2336
2608
|
this.error(
|
|
2337
2609
|
`Expected directive name, got ${nameToken.type}. Directives start with @ followed by name (e.g., @grabbable)`,
|
|
@@ -2360,7 +2632,7 @@ var HoloScriptPlusParser = class {
|
|
|
2360
2632
|
const body = this.check("LBRACE") ? this.parseCodeBlock() : "";
|
|
2361
2633
|
return { type: "migrate", fromVersion, body };
|
|
2362
2634
|
}
|
|
2363
|
-
if (
|
|
2635
|
+
if (chunkWRLUBRKS_cjs.VR_TRAITS.includes(name)) {
|
|
2364
2636
|
if (!this.options.enableVRTraits) {
|
|
2365
2637
|
this.warn(`VR trait @${name} is disabled`);
|
|
2366
2638
|
return null;
|
|
@@ -2371,9 +2643,9 @@ var HoloScriptPlusParser = class {
|
|
|
2371
2643
|
} else if (this.check("LBRACE")) {
|
|
2372
2644
|
config2 = this.parseBlockContent();
|
|
2373
2645
|
}
|
|
2374
|
-
return { type: "trait", name, config: config2 };
|
|
2646
|
+
return this.parseTraitSumTail({ type: "trait", name, config: config2 });
|
|
2375
2647
|
}
|
|
2376
|
-
if (
|
|
2648
|
+
if (chunkNG77ATEW_cjs.LIFECYCLE_HOOKS.includes(name)) {
|
|
2377
2649
|
const params = [];
|
|
2378
2650
|
if (this.check("LPAREN")) {
|
|
2379
2651
|
this.advance();
|
|
@@ -2639,7 +2911,11 @@ var HoloScriptPlusParser = class {
|
|
|
2639
2911
|
externalApiName = this.advance().value;
|
|
2640
2912
|
}
|
|
2641
2913
|
const config2 = this.check("LBRACE") ? this.parseBlockContent() : this.parseTraitConfig();
|
|
2642
|
-
return {
|
|
2914
|
+
return {
|
|
2915
|
+
type: "external_api",
|
|
2916
|
+
name: externalApiName,
|
|
2917
|
+
...config2
|
|
2918
|
+
};
|
|
2643
2919
|
}
|
|
2644
2920
|
if (name === "generate") {
|
|
2645
2921
|
const config2 = this.parseTraitConfig();
|
|
@@ -2678,7 +2954,7 @@ var HoloScriptPlusParser = class {
|
|
|
2678
2954
|
return { type: "hololand_event", event: eventName, params };
|
|
2679
2955
|
}
|
|
2680
2956
|
}
|
|
2681
|
-
if (
|
|
2957
|
+
if (chunkNG77ATEW_cjs.STRUCTURAL_DIRECTIVES.includes(name)) {
|
|
2682
2958
|
let nodeName;
|
|
2683
2959
|
if (this.check("STRING")) {
|
|
2684
2960
|
nodeName = this.advance().value;
|
|
@@ -2705,7 +2981,35 @@ var HoloScriptPlusParser = class {
|
|
|
2705
2981
|
config.body = this.parseCodeBlock();
|
|
2706
2982
|
}
|
|
2707
2983
|
}
|
|
2708
|
-
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 };
|
|
2709
3013
|
}
|
|
2710
3014
|
/**
|
|
2711
3015
|
* Parse a string inside parentheses: ("name")
|
|
@@ -2893,6 +3197,7 @@ var HoloScriptPlusParser = class {
|
|
|
2893
3197
|
"spatial_group",
|
|
2894
3198
|
"scene",
|
|
2895
3199
|
"group",
|
|
3200
|
+
"world",
|
|
2896
3201
|
"module",
|
|
2897
3202
|
"struct",
|
|
2898
3203
|
"orb",
|
|
@@ -2906,7 +3211,9 @@ var HoloScriptPlusParser = class {
|
|
|
2906
3211
|
"light",
|
|
2907
3212
|
"npc",
|
|
2908
3213
|
"camera",
|
|
2909
|
-
"timeline"
|
|
3214
|
+
"timeline",
|
|
3215
|
+
"page",
|
|
3216
|
+
"include"
|
|
2910
3217
|
];
|
|
2911
3218
|
while (!this.check("RBRACE") && !this.check("EOF")) {
|
|
2912
3219
|
const currentDirectives = [];
|
|
@@ -2923,11 +3230,69 @@ var HoloScriptPlusParser = class {
|
|
|
2923
3230
|
if (isNodeStart) {
|
|
2924
3231
|
const token = this.current();
|
|
2925
3232
|
const next = this.peek(1);
|
|
2926
|
-
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") {
|
|
2927
3292
|
const key = this.advance().value;
|
|
2928
3293
|
this.advance();
|
|
2929
3294
|
result.properties[key] = this.parseValue();
|
|
2930
|
-
} 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")) {
|
|
2931
3296
|
const keyword = this.current().value;
|
|
2932
3297
|
const node = this.parseNode();
|
|
2933
3298
|
node.directives = [...currentDirectives, ...node.directives || []];
|
|
@@ -2941,7 +3306,7 @@ var HoloScriptPlusParser = class {
|
|
|
2941
3306
|
} else if (!childNodeKeywords.includes(token.value) && (next.type === "STRING" || next.type === "NUMBER" || next.type === "BOOLEAN" || next.type === "NULL")) {
|
|
2942
3307
|
const key = this.advance().value;
|
|
2943
3308
|
result.properties[key] = this.parseValue();
|
|
2944
|
-
} 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") {
|
|
2945
3310
|
const keyword = this.current().value;
|
|
2946
3311
|
const node = this.parseNode();
|
|
2947
3312
|
node.directives = [...currentDirectives, ...node.directives || []];
|
|
@@ -3037,6 +3402,7 @@ var HoloScriptPlusParser = class {
|
|
|
3037
3402
|
parseLogicBlock() {
|
|
3038
3403
|
const result = {
|
|
3039
3404
|
functions: [],
|
|
3405
|
+
actions: [],
|
|
3040
3406
|
eventHandlers: [],
|
|
3041
3407
|
tickHandlers: []
|
|
3042
3408
|
};
|
|
@@ -3072,6 +3438,32 @@ var HoloScriptPlusParser = class {
|
|
|
3072
3438
|
}
|
|
3073
3439
|
const body = this.parseCodeBlock();
|
|
3074
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 });
|
|
3075
3467
|
} else if (keyword === "on_tick") {
|
|
3076
3468
|
this.advance();
|
|
3077
3469
|
let interval = 1;
|
|
@@ -4263,7 +4655,7 @@ var HoloScriptPlusParser = class {
|
|
|
4263
4655
|
code: "HSP001"
|
|
4264
4656
|
};
|
|
4265
4657
|
}
|
|
4266
|
-
if (current.type === "IDENTIFIER" &&
|
|
4658
|
+
if (current.type === "IDENTIFIER" && chunkWRLUBRKS_cjs.VR_TRAITS.includes(current.value)) {
|
|
4267
4659
|
if (prev?.type !== "AT") {
|
|
4268
4660
|
return {
|
|
4269
4661
|
message: `'${current.value}' is a trait and requires '@' prefix`,
|
|
@@ -4472,7 +4864,7 @@ function parse(source, options) {
|
|
|
4472
4864
|
return parser.parse(source);
|
|
4473
4865
|
}
|
|
4474
4866
|
|
|
4475
|
-
exports.
|
|
4867
|
+
exports.ChunkBasedIncrementalParser = ChunkBasedIncrementalParser;
|
|
4476
4868
|
exports.HSPLUS_ERROR_CODES = HSPLUS_ERROR_CODES;
|
|
4477
4869
|
exports.HoloScriptPlusParser = HoloScriptPlusParser;
|
|
4478
4870
|
exports.ParseCache = ParseCache;
|
|
@@ -4488,5 +4880,6 @@ exports.getErrorCodeDocumentation = getErrorCodeDocumentation;
|
|
|
4488
4880
|
exports.getSourceContext = getSourceContext;
|
|
4489
4881
|
exports.globalParseCache = globalParseCache;
|
|
4490
4882
|
exports.parse = parse;
|
|
4491
|
-
|
|
4492
|
-
//# sourceMappingURL=chunk-
|
|
4883
|
+
exports.parseIncrementalChunks = parseIncrementalChunks;
|
|
4884
|
+
//# sourceMappingURL=chunk-T5J7ZKP3.cjs.map
|
|
4885
|
+
//# sourceMappingURL=chunk-T5J7ZKP3.cjs.map
|