@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,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ErrorRecovery, generateQuickFixes, enrichErrorWithSuggestions, LIFECYCLE_HOOKS, STRUCTURAL_DIRECTIVES } from './chunk-4N4SXXWF.js';
|
|
2
|
+
import { VR_TRAITS } from './chunk-2BSMSUCE.js';
|
|
2
3
|
import * as crypto from 'crypto';
|
|
3
4
|
|
|
4
5
|
// src/parser/HybridChunker.ts
|
|
@@ -659,6 +660,220 @@ var ParseCache = class {
|
|
|
659
660
|
};
|
|
660
661
|
var globalParseCache = new ParseCache();
|
|
661
662
|
|
|
663
|
+
// src/parser/IncrementalParser.ts
|
|
664
|
+
var ChunkBasedIncrementalParser = class {
|
|
665
|
+
constructor(cache = globalParseCache) {
|
|
666
|
+
this.lastSource = "";
|
|
667
|
+
this.lastChunks = /* @__PURE__ */ new Map();
|
|
668
|
+
this.cache = cache;
|
|
669
|
+
this.parser = new HoloScriptPlusParser({
|
|
670
|
+
enableVRTraits: true,
|
|
671
|
+
enableTypeScriptImports: true,
|
|
672
|
+
strict: false
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Parse source with incremental caching
|
|
677
|
+
*/
|
|
678
|
+
parse(source) {
|
|
679
|
+
const startTime = Date.now();
|
|
680
|
+
let cached = 0;
|
|
681
|
+
let parsed = 0;
|
|
682
|
+
const changedChunks = [];
|
|
683
|
+
const currentChunks = this.detectChunks(source);
|
|
684
|
+
const chunkMap = new Map(currentChunks.map((c) => [c.id, c]));
|
|
685
|
+
const changedIds = this.identifyChangedChunks(currentChunks);
|
|
686
|
+
changedChunks.push(...changedIds);
|
|
687
|
+
const dependentIds = this.findDependents(changedIds, currentChunks);
|
|
688
|
+
const toParseIds = /* @__PURE__ */ new Set([...changedIds, ...dependentIds]);
|
|
689
|
+
const chunkNodes = /* @__PURE__ */ new Map();
|
|
690
|
+
for (const chunk of currentChunks) {
|
|
691
|
+
const hash = ParseCache.hash(chunk.content);
|
|
692
|
+
if (toParseIds.has(chunk.id)) {
|
|
693
|
+
const chunkNode = this.parseChunk(chunk);
|
|
694
|
+
if (chunkNode) {
|
|
695
|
+
chunkNodes.set(chunk.id, chunkNode);
|
|
696
|
+
this.cache.set(chunk.id, hash, chunkNode);
|
|
697
|
+
parsed++;
|
|
698
|
+
}
|
|
699
|
+
} else {
|
|
700
|
+
const cached_node = this.cache.get(chunk.id, hash);
|
|
701
|
+
if (cached_node) {
|
|
702
|
+
chunkNodes.set(chunk.id, cached_node);
|
|
703
|
+
cached++;
|
|
704
|
+
} else {
|
|
705
|
+
const chunkNode = this.parseChunk(chunk);
|
|
706
|
+
if (chunkNode) {
|
|
707
|
+
chunkNodes.set(chunk.id, chunkNode);
|
|
708
|
+
this.cache.set(chunk.id, hash, chunkNode);
|
|
709
|
+
parsed++;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
const ast = this.assembleAST(chunkNodes, currentChunks);
|
|
715
|
+
this.lastSource = source;
|
|
716
|
+
this.lastChunks = chunkMap;
|
|
717
|
+
const duration = Date.now() - startTime;
|
|
718
|
+
return {
|
|
719
|
+
ast,
|
|
720
|
+
cached,
|
|
721
|
+
parsed,
|
|
722
|
+
duration,
|
|
723
|
+
changedChunks
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Detects top-level chunks in the source
|
|
728
|
+
*/
|
|
729
|
+
detectChunks(source) {
|
|
730
|
+
return ChunkDetector.detect(source);
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Identifies which chunks have changed by comparing hashes
|
|
734
|
+
*/
|
|
735
|
+
identifyChangedChunks(currentChunks) {
|
|
736
|
+
const changed = [];
|
|
737
|
+
for (const chunk of currentChunks) {
|
|
738
|
+
const hash = ParseCache.hash(chunk.content);
|
|
739
|
+
const lastChunk = this.lastChunks.get(chunk.id);
|
|
740
|
+
if (!lastChunk) {
|
|
741
|
+
changed.push(chunk.id);
|
|
742
|
+
} else {
|
|
743
|
+
const lastHash = ParseCache.hash(lastChunk.content);
|
|
744
|
+
if (hash !== lastHash) {
|
|
745
|
+
changed.push(chunk.id);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
for (const [id, _lastChunk] of this.lastChunks.entries()) {
|
|
750
|
+
const currentChunk = this.detectChunks(this.lastSource).find((c) => c.id === id);
|
|
751
|
+
if (!currentChunk) {
|
|
752
|
+
changed.push(id);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
return changed;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Finds chunks that depend on the changed ones
|
|
759
|
+
*/
|
|
760
|
+
findDependents(changedIds, chunks) {
|
|
761
|
+
const dependents = /* @__PURE__ */ new Set();
|
|
762
|
+
const changeSet = new Set(changedIds);
|
|
763
|
+
const references = /* @__PURE__ */ new Map();
|
|
764
|
+
for (const chunk of chunks) {
|
|
765
|
+
const refs = this.extractReferences(chunk.content);
|
|
766
|
+
if (refs.size > 0) {
|
|
767
|
+
references.set(chunk.id, refs);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
for (const [chunkId, refs] of references.entries()) {
|
|
771
|
+
if (!changeSet.has(chunkId)) {
|
|
772
|
+
for (const ref of refs) {
|
|
773
|
+
if (changeSet.has(ref) || dependents.has(ref)) {
|
|
774
|
+
dependents.add(chunkId);
|
|
775
|
+
break;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
return Array.from(dependents);
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Extracts referenced identifiers from a chunk (templates, orbs, logic)
|
|
784
|
+
*/
|
|
785
|
+
extractReferences(content) {
|
|
786
|
+
const refs = /* @__PURE__ */ new Set();
|
|
787
|
+
const templateRefs = content.match(/using\s+"([^"]+)"/g);
|
|
788
|
+
if (templateRefs) {
|
|
789
|
+
templateRefs.forEach((ref) => {
|
|
790
|
+
const name = ref.match(/"([^"]+)"/)[1];
|
|
791
|
+
refs.add(`template:${name}`);
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
const spreadRefs = content.match(/\.\.\.\s*([a-zA-Z0-9_]+)/g);
|
|
795
|
+
if (spreadRefs) {
|
|
796
|
+
spreadRefs.forEach((ref) => {
|
|
797
|
+
const name = ref.replace(/\.\.\./, "").trim();
|
|
798
|
+
refs.add(`identifier:${name}`);
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
const compRefs = content.match(/@composition\s+"([^"]+)"/g);
|
|
802
|
+
if (compRefs) {
|
|
803
|
+
compRefs.forEach((ref) => {
|
|
804
|
+
const name = ref.match(/"([^"]+)"/)[1];
|
|
805
|
+
refs.add(`composition:${name}`);
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
return refs;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Parses a single chunk
|
|
812
|
+
*/
|
|
813
|
+
parseChunk(chunk) {
|
|
814
|
+
try {
|
|
815
|
+
const content = this.wrapChunkForParsing(chunk);
|
|
816
|
+
const result = this.parser.parse(content);
|
|
817
|
+
if (result.success && result.ast) {
|
|
818
|
+
return result.ast;
|
|
819
|
+
}
|
|
820
|
+
return null;
|
|
821
|
+
} catch (error) {
|
|
822
|
+
console.warn(`Failed to parse chunk ${chunk.id}:`, error);
|
|
823
|
+
return null;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Wraps chunk content to make it parseable in isolation
|
|
828
|
+
*/
|
|
829
|
+
wrapChunkForParsing(chunk) {
|
|
830
|
+
return chunk.content;
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Assembles final AST from parsed chunks
|
|
834
|
+
*/
|
|
835
|
+
assembleAST(chunkNodes, chunks) {
|
|
836
|
+
const children = [];
|
|
837
|
+
for (const chunk of chunks) {
|
|
838
|
+
const node = chunkNodes.get(chunk.id);
|
|
839
|
+
if (node) {
|
|
840
|
+
children.push(node);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
if (children.length === 1) {
|
|
844
|
+
return children[0];
|
|
845
|
+
}
|
|
846
|
+
return {
|
|
847
|
+
type: "fragment",
|
|
848
|
+
children,
|
|
849
|
+
properties: {},
|
|
850
|
+
directives: [],
|
|
851
|
+
traits: /* @__PURE__ */ new Map(),
|
|
852
|
+
loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 0 } }
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Clears the internal cache
|
|
857
|
+
*/
|
|
858
|
+
clearCache() {
|
|
859
|
+
this.cache.clear();
|
|
860
|
+
this.lastChunks.clear();
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Gets cache statistics
|
|
864
|
+
*/
|
|
865
|
+
getCacheStats() {
|
|
866
|
+
return {
|
|
867
|
+
size: this.lastChunks.size,
|
|
868
|
+
maxSize: 500
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
};
|
|
872
|
+
function parseIncrementalChunks(source, cache = globalParseCache) {
|
|
873
|
+
const parser = new ChunkBasedIncrementalParser(cache);
|
|
874
|
+
return parser.parse(source);
|
|
875
|
+
}
|
|
876
|
+
|
|
662
877
|
// src/parser/RichErrors.ts
|
|
663
878
|
var HSPLUS_ERROR_CODES = {
|
|
664
879
|
// Syntax Errors (HSP001-HSP099)
|
|
@@ -1552,6 +1767,17 @@ var HoloScriptPlusParser = class {
|
|
|
1552
1767
|
this.hasControlFlow = false;
|
|
1553
1768
|
this.compiledExpressions = /* @__PURE__ */ new Map();
|
|
1554
1769
|
this.errorRecovery = new ErrorRecovery();
|
|
1770
|
+
/**
|
|
1771
|
+
* Internal incremental parser for parseIncremental.
|
|
1772
|
+
* Uses ChunkBasedIncrementalParser with AST-aware chunking and
|
|
1773
|
+
* dependency tracking — no fallback to full re-parse for unchanged chunks.
|
|
1774
|
+
*/
|
|
1775
|
+
this._incrementalParser = null;
|
|
1776
|
+
/**
|
|
1777
|
+
* Per-cache incremental parser map so callers can supply their own cache
|
|
1778
|
+
* and still get a dedicated ChunkBasedIncrementalParser instance.
|
|
1779
|
+
*/
|
|
1780
|
+
this._incrementalParserCache = /* @__PURE__ */ new Map();
|
|
1555
1781
|
this.options = {
|
|
1556
1782
|
enableVRTraits: true,
|
|
1557
1783
|
enableTypeScriptImports: true,
|
|
@@ -1616,9 +1842,33 @@ var HoloScriptPlusParser = class {
|
|
|
1616
1842
|
return this.buildResult(root);
|
|
1617
1843
|
}
|
|
1618
1844
|
/**
|
|
1619
|
-
* Performs an incremental parse using
|
|
1845
|
+
* Performs an incremental parse using ChunkBasedIncrementalParser with
|
|
1846
|
+
* AST-aware chunking, hash-based caching, and dependency tracking.
|
|
1847
|
+
*
|
|
1848
|
+
* Unchanged chunks are served from cache (zero re-parse cost). Only chunks
|
|
1849
|
+
* whose content hash changed — plus chunks that reference changed ones via
|
|
1850
|
+
* `using`, spread, or `@composition` — are re-parsed.
|
|
1851
|
+
*
|
|
1852
|
+
* Previous implementation fell back to a full re-parse per chunk because it
|
|
1853
|
+
* used `ChunkDetector.detect()` inline without the stateful comparison that
|
|
1854
|
+
* `ChunkBasedIncrementalParser` provides. This is now wired through the
|
|
1855
|
+
* superior engine (APL WIT audit gap #3, 2026-05-21).
|
|
1620
1856
|
*/
|
|
1621
1857
|
parseIncremental(source, cache = globalParseCache) {
|
|
1858
|
+
let incrementalParser = this._incrementalParserCache.get(cache);
|
|
1859
|
+
if (!incrementalParser) {
|
|
1860
|
+
incrementalParser = new ChunkBasedIncrementalParser(cache);
|
|
1861
|
+
this._incrementalParserCache.set(cache, incrementalParser);
|
|
1862
|
+
}
|
|
1863
|
+
const incrementalResult = incrementalParser.parse(source);
|
|
1864
|
+
const chunks = ChunkDetector.detect(source);
|
|
1865
|
+
const children = incrementalResult.ast.type === "fragment" ? incrementalResult.ast.children || [] : [incrementalResult.ast];
|
|
1866
|
+
for (let i = 0; i < children.length; i++) {
|
|
1867
|
+
const chunk = chunks[i];
|
|
1868
|
+
if (chunk && chunk.startLine > 1) {
|
|
1869
|
+
this.offsetNodeLoc(children[i], chunk.startLine - 1);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1622
1872
|
this.source = source;
|
|
1623
1873
|
this.errors = [];
|
|
1624
1874
|
this.warnings = [];
|
|
@@ -1627,46 +1877,43 @@ var HoloScriptPlusParser = class {
|
|
|
1627
1877
|
this.hasVRTraits = false;
|
|
1628
1878
|
this.hasControlFlow = false;
|
|
1629
1879
|
this.compiledExpressions = /* @__PURE__ */ new Map();
|
|
1630
|
-
const
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
const chunkFeatures = chunkResult.features;
|
|
1642
|
-
if (chunkAst?.root) {
|
|
1643
|
-
const node = chunkAst.root;
|
|
1644
|
-
this.offsetNodeLoc(node, chunk.startLine - 1);
|
|
1645
|
-
topLevelNodes.push(node);
|
|
1646
|
-
cache.set(chunk.id, hash, node);
|
|
1647
|
-
this.hasState = this.hasState || !!chunkFeatures?.state;
|
|
1648
|
-
this.hasVRTraits = this.hasVRTraits || !!chunkFeatures?.vrTraits;
|
|
1649
|
-
this.hasControlFlow = this.hasControlFlow || !!chunkFeatures?.loops || !!chunkFeatures?.conditionals;
|
|
1650
|
-
this.imports.push(...chunkAst.imports);
|
|
1880
|
+
for (const node of children) {
|
|
1881
|
+
if (node && typeof node === "object") {
|
|
1882
|
+
const nodeAny = node;
|
|
1883
|
+
if (nodeAny.traits instanceof Map) {
|
|
1884
|
+
for (const [traitName] of nodeAny.traits) {
|
|
1885
|
+
const name = String(traitName);
|
|
1886
|
+
if (name === "state") this.hasState = true;
|
|
1887
|
+
if (name === "grabbable" || name === "throwable" || name === "hoverable" || name === "clickable" || name === "collidable") {
|
|
1888
|
+
this.hasVRTraits = true;
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1651
1891
|
}
|
|
1652
|
-
this.errors.push(...chunkResult.errors);
|
|
1653
|
-
this.warnings.push(...chunkResult.warnings || []);
|
|
1654
1892
|
}
|
|
1655
1893
|
}
|
|
1656
|
-
const root = {
|
|
1894
|
+
const root = incrementalResult.ast.type === "fragment" ? incrementalResult.ast : {
|
|
1657
1895
|
type: "fragment",
|
|
1658
1896
|
id: "root",
|
|
1659
1897
|
properties: {},
|
|
1660
|
-
directives:
|
|
1661
|
-
children:
|
|
1898
|
+
directives: [],
|
|
1899
|
+
children: [incrementalResult.ast],
|
|
1662
1900
|
traits: /* @__PURE__ */ new Map(),
|
|
1663
|
-
loc: {
|
|
1664
|
-
|
|
1665
|
-
end: { line: chunks.length > 0 ? chunks[chunks.length - 1].endLine : 1, column: 1 }
|
|
1666
|
-
},
|
|
1667
|
-
body: topLevelNodes
|
|
1901
|
+
loc: incrementalResult.ast.loc || { start: { line: 1, column: 1 }, end: { line: 1, column: 1 } },
|
|
1902
|
+
body: [incrementalResult.ast]
|
|
1668
1903
|
};
|
|
1904
|
+
if (root.type === "fragment" && root.loc) {
|
|
1905
|
+
root.loc.start = { line: 1, column: 1 };
|
|
1906
|
+
if (chunks.length > 0) {
|
|
1907
|
+
root.loc.end = { line: chunks[chunks.length - 1].endLine, column: 1 };
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1669
1910
|
const result = this.buildResult(root);
|
|
1911
|
+
result.incrementalMetrics = {
|
|
1912
|
+
cached: incrementalResult.cached,
|
|
1913
|
+
parsed: incrementalResult.parsed,
|
|
1914
|
+
duration: incrementalResult.duration,
|
|
1915
|
+
changedChunks: incrementalResult.changedChunks
|
|
1916
|
+
};
|
|
1670
1917
|
return result;
|
|
1671
1918
|
}
|
|
1672
1919
|
buildResult(root) {
|
|
@@ -1686,15 +1933,24 @@ var HoloScriptPlusParser = class {
|
|
|
1686
1933
|
}
|
|
1687
1934
|
}
|
|
1688
1935
|
if (version === void 0) version = "1.0";
|
|
1936
|
+
const children = isFragment ? root.children || [] : [root];
|
|
1937
|
+
const worlds = children.filter((c) => c.type === "world");
|
|
1938
|
+
const compositions = children.filter((c) => c.type === "composition");
|
|
1939
|
+
const templates = children.filter((c) => c.type === "template");
|
|
1940
|
+
const npcs = children.filter((c) => c.type === "npc");
|
|
1689
1941
|
const ast = {
|
|
1690
1942
|
type: "Program",
|
|
1691
1943
|
id: "root",
|
|
1692
1944
|
properties: isFragment ? root.properties || {} : {},
|
|
1693
1945
|
directives,
|
|
1694
|
-
children
|
|
1946
|
+
children,
|
|
1947
|
+
worlds,
|
|
1948
|
+
compositions,
|
|
1949
|
+
templates,
|
|
1950
|
+
npcs,
|
|
1695
1951
|
traits: isFragment ? root.traits || /* @__PURE__ */ new Map() : /* @__PURE__ */ new Map(),
|
|
1696
1952
|
loc: root.loc,
|
|
1697
|
-
body:
|
|
1953
|
+
body: children,
|
|
1698
1954
|
version,
|
|
1699
1955
|
migrations: migrations.length > 0 ? migrations : void 0,
|
|
1700
1956
|
root,
|
|
@@ -1779,14 +2035,14 @@ var HoloScriptPlusParser = class {
|
|
|
1779
2035
|
globalDirectives.push(...currentDirectives);
|
|
1780
2036
|
} else {
|
|
1781
2037
|
this.error(
|
|
1782
|
-
`Expected node after directives, got ${this.current().type}. Valid nodes: orb, template, logic, object, composition, scene, group`,
|
|
2038
|
+
`Expected node after directives, got ${this.current().type}. Valid nodes: orb, template, logic, object, world, composition, scene, group`,
|
|
1783
2039
|
"HSP003"
|
|
1784
2040
|
);
|
|
1785
2041
|
globalDirectives.push(...currentDirectives);
|
|
1786
2042
|
}
|
|
1787
2043
|
} else if (!this.check("EOF")) {
|
|
1788
2044
|
this.error(
|
|
1789
|
-
`Unexpected token ${this.current().type} "${this.current().value}" at top level. Expected: composition, object, template, logic, or @directive`,
|
|
2045
|
+
`Unexpected token ${this.current().type} "${this.current().value}" at top level. Expected: composition, object, world, template, logic, or @directive`,
|
|
1790
2046
|
"HSP001"
|
|
1791
2047
|
);
|
|
1792
2048
|
throw new Error("ParseError");
|
|
@@ -1975,7 +2231,7 @@ var HoloScriptPlusParser = class {
|
|
|
1975
2231
|
}
|
|
1976
2232
|
};
|
|
1977
2233
|
}
|
|
1978
|
-
if (type === "composition") {
|
|
2234
|
+
if (type === "composition" || type === "world") {
|
|
1979
2235
|
let id2;
|
|
1980
2236
|
if (this.check("HASH")) {
|
|
1981
2237
|
this.advance();
|
|
@@ -1988,14 +2244,25 @@ var HoloScriptPlusParser = class {
|
|
|
1988
2244
|
id2 = this.advance().value;
|
|
1989
2245
|
}
|
|
1990
2246
|
const compBody = this.parseCompositionBlock();
|
|
2247
|
+
const traits2 = /* @__PURE__ */ new Map();
|
|
2248
|
+
for (const child of compBody.children) {
|
|
2249
|
+
if (child.type === "fragment" && Array.isArray(child.directives)) {
|
|
2250
|
+
for (const d of child.directives) {
|
|
2251
|
+
if (d.type === "trait") {
|
|
2252
|
+
traits2.set(d.name, d.config);
|
|
2253
|
+
this.hasVRTraits = true;
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
1991
2258
|
return {
|
|
1992
|
-
type: "composition",
|
|
2259
|
+
type: type === "composition" ? "composition" : "world",
|
|
1993
2260
|
name: id2,
|
|
1994
2261
|
id: id2,
|
|
1995
2262
|
properties: compBody.properties || {},
|
|
1996
2263
|
directives: [],
|
|
1997
2264
|
children: compBody.children,
|
|
1998
|
-
traits:
|
|
2265
|
+
traits: traits2,
|
|
1999
2266
|
body: compBody,
|
|
2000
2267
|
loc: {
|
|
2001
2268
|
start: { line: startToken.line, column: startToken.column },
|
|
@@ -2147,7 +2414,7 @@ var HoloScriptPlusParser = class {
|
|
|
2147
2414
|
properties[key] = spreadNode;
|
|
2148
2415
|
} else {
|
|
2149
2416
|
const token = this.current();
|
|
2150
|
-
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";
|
|
2417
|
+
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";
|
|
2151
2418
|
if (isKeyToken) {
|
|
2152
2419
|
const saved = this.pos;
|
|
2153
2420
|
const name = this.advance().value;
|
|
@@ -2169,6 +2436,7 @@ var HoloScriptPlusParser = class {
|
|
|
2169
2436
|
"spatial_group",
|
|
2170
2437
|
"scene",
|
|
2171
2438
|
"group",
|
|
2439
|
+
"world",
|
|
2172
2440
|
"module",
|
|
2173
2441
|
"struct",
|
|
2174
2442
|
"orb",
|
|
@@ -2176,7 +2444,9 @@ var HoloScriptPlusParser = class {
|
|
|
2176
2444
|
"assert",
|
|
2177
2445
|
"transition",
|
|
2178
2446
|
"on_entry",
|
|
2179
|
-
"on_exit"
|
|
2447
|
+
"on_exit",
|
|
2448
|
+
"page",
|
|
2449
|
+
"include"
|
|
2180
2450
|
];
|
|
2181
2451
|
if (name === "transition" && this.check("STRING")) {
|
|
2182
2452
|
const event = this.advance().value;
|
|
@@ -2309,7 +2579,9 @@ var HoloScriptPlusParser = class {
|
|
|
2309
2579
|
parseDirective() {
|
|
2310
2580
|
this.expect("AT", "Expected @");
|
|
2311
2581
|
const nameToken = this.current();
|
|
2312
|
-
const isKeyword = ["STATE_MACHINE", "STATE", "ON_ENTRY", "ON_EXIT", "TRANSITION"].includes(
|
|
2582
|
+
const isKeyword = ["STATE_MACHINE", "STATE", "ON_ENTRY", "ON_EXIT", "TRANSITION"].includes(
|
|
2583
|
+
nameToken.type
|
|
2584
|
+
);
|
|
2313
2585
|
if (nameToken.type !== "IDENTIFIER" && !isKeyword) {
|
|
2314
2586
|
this.error(
|
|
2315
2587
|
`Expected directive name, got ${nameToken.type}. Directives start with @ followed by name (e.g., @grabbable)`,
|
|
@@ -2349,7 +2621,7 @@ var HoloScriptPlusParser = class {
|
|
|
2349
2621
|
} else if (this.check("LBRACE")) {
|
|
2350
2622
|
config2 = this.parseBlockContent();
|
|
2351
2623
|
}
|
|
2352
|
-
return { type: "trait", name, config: config2 };
|
|
2624
|
+
return this.parseTraitSumTail({ type: "trait", name, config: config2 });
|
|
2353
2625
|
}
|
|
2354
2626
|
if (LIFECYCLE_HOOKS.includes(name)) {
|
|
2355
2627
|
const params = [];
|
|
@@ -2617,7 +2889,11 @@ var HoloScriptPlusParser = class {
|
|
|
2617
2889
|
externalApiName = this.advance().value;
|
|
2618
2890
|
}
|
|
2619
2891
|
const config2 = this.check("LBRACE") ? this.parseBlockContent() : this.parseTraitConfig();
|
|
2620
|
-
return {
|
|
2892
|
+
return {
|
|
2893
|
+
type: "external_api",
|
|
2894
|
+
name: externalApiName,
|
|
2895
|
+
...config2
|
|
2896
|
+
};
|
|
2621
2897
|
}
|
|
2622
2898
|
if (name === "generate") {
|
|
2623
2899
|
const config2 = this.parseTraitConfig();
|
|
@@ -2683,7 +2959,35 @@ var HoloScriptPlusParser = class {
|
|
|
2683
2959
|
config.body = this.parseCodeBlock();
|
|
2684
2960
|
}
|
|
2685
2961
|
}
|
|
2686
|
-
return { type: "trait", name, config };
|
|
2962
|
+
return this.parseTraitSumTail({ type: "trait", name, config });
|
|
2963
|
+
}
|
|
2964
|
+
parseTraitSumTail(first) {
|
|
2965
|
+
if (!this.check("PLUS")) {
|
|
2966
|
+
return first;
|
|
2967
|
+
}
|
|
2968
|
+
const alternatives = [
|
|
2969
|
+
{ type: "trait_atom", name: first.name, config: first.config ?? {} }
|
|
2970
|
+
];
|
|
2971
|
+
while (this.check("PLUS")) {
|
|
2972
|
+
this.advance();
|
|
2973
|
+
alternatives.push(this.parseTraitAtom());
|
|
2974
|
+
}
|
|
2975
|
+
return {
|
|
2976
|
+
type: "trait_sum",
|
|
2977
|
+
operation: "additive",
|
|
2978
|
+
alternatives
|
|
2979
|
+
};
|
|
2980
|
+
}
|
|
2981
|
+
parseTraitAtom() {
|
|
2982
|
+
this.expect("AT", "Expected @ in trait sum alternative");
|
|
2983
|
+
const name = this.expect("IDENTIFIER", "Expected trait name in trait sum alternative").value;
|
|
2984
|
+
let config = {};
|
|
2985
|
+
if (this.check("LPAREN")) {
|
|
2986
|
+
config = this.parseTraitConfig();
|
|
2987
|
+
} else if (this.check("LBRACE")) {
|
|
2988
|
+
config = this.parseBlockContent();
|
|
2989
|
+
}
|
|
2990
|
+
return { type: "trait_atom", name, config };
|
|
2687
2991
|
}
|
|
2688
2992
|
/**
|
|
2689
2993
|
* Parse a string inside parentheses: ("name")
|
|
@@ -2871,6 +3175,7 @@ var HoloScriptPlusParser = class {
|
|
|
2871
3175
|
"spatial_group",
|
|
2872
3176
|
"scene",
|
|
2873
3177
|
"group",
|
|
3178
|
+
"world",
|
|
2874
3179
|
"module",
|
|
2875
3180
|
"struct",
|
|
2876
3181
|
"orb",
|
|
@@ -2884,7 +3189,9 @@ var HoloScriptPlusParser = class {
|
|
|
2884
3189
|
"light",
|
|
2885
3190
|
"npc",
|
|
2886
3191
|
"camera",
|
|
2887
|
-
"timeline"
|
|
3192
|
+
"timeline",
|
|
3193
|
+
"page",
|
|
3194
|
+
"include"
|
|
2888
3195
|
];
|
|
2889
3196
|
while (!this.check("RBRACE") && !this.check("EOF")) {
|
|
2890
3197
|
const currentDirectives = [];
|
|
@@ -2901,11 +3208,69 @@ var HoloScriptPlusParser = class {
|
|
|
2901
3208
|
if (isNodeStart) {
|
|
2902
3209
|
const token = this.current();
|
|
2903
3210
|
const next = this.peek(1);
|
|
2904
|
-
if (next.type === "
|
|
3211
|
+
if (token.type === "IDENTIFIER" && token.value === "system" && (next.type === "IDENTIFIER" || next.type === "STRING") && this.peek(2).type !== "LBRACE") {
|
|
3212
|
+
const startToken = this.advance();
|
|
3213
|
+
const name = this.advance().value;
|
|
3214
|
+
result.systems.push({
|
|
3215
|
+
type: "system",
|
|
3216
|
+
name,
|
|
3217
|
+
id: name,
|
|
3218
|
+
properties: {},
|
|
3219
|
+
directives: currentDirectives,
|
|
3220
|
+
children: [],
|
|
3221
|
+
traits: /* @__PURE__ */ new Map(),
|
|
3222
|
+
loc: {
|
|
3223
|
+
start: { line: startToken.line, column: startToken.column },
|
|
3224
|
+
end: { line: this.current().line, column: this.current().column }
|
|
3225
|
+
}
|
|
3226
|
+
});
|
|
3227
|
+
} else if (token.type === "IDENTIFIER" && token.value === "page" && next.type === "STRING") {
|
|
3228
|
+
const startToken = this.advance();
|
|
3229
|
+
const name = this.advance().value;
|
|
3230
|
+
const properties = {};
|
|
3231
|
+
if (this.check("LBRACE")) {
|
|
3232
|
+
this.advance();
|
|
3233
|
+
this.skipNewlines();
|
|
3234
|
+
while (!this.check("RBRACE") && !this.check("EOF")) {
|
|
3235
|
+
this.skipNewlines();
|
|
3236
|
+
if (this.check("RBRACE") || this.check("EOF")) break;
|
|
3237
|
+
if (this.check("IDENTIFIER")) {
|
|
3238
|
+
const key = this.advance().value;
|
|
3239
|
+
if (this.check("COLON") || this.check("EQUALS")) {
|
|
3240
|
+
this.advance();
|
|
3241
|
+
properties[key] = this.parseValue();
|
|
3242
|
+
} else if (this.check("STRING")) {
|
|
3243
|
+
properties[key] = this.advance().value;
|
|
3244
|
+
} else {
|
|
3245
|
+
properties[key] = true;
|
|
3246
|
+
}
|
|
3247
|
+
} else if (this.check("COMMA")) {
|
|
3248
|
+
this.advance();
|
|
3249
|
+
} else {
|
|
3250
|
+
this.advance();
|
|
3251
|
+
}
|
|
3252
|
+
this.skipNewlines();
|
|
3253
|
+
}
|
|
3254
|
+
this.expect("RBRACE", "Expected }");
|
|
3255
|
+
}
|
|
3256
|
+
result.children.push({
|
|
3257
|
+
type: "page",
|
|
3258
|
+
name,
|
|
3259
|
+
id: name,
|
|
3260
|
+
properties,
|
|
3261
|
+
directives: currentDirectives,
|
|
3262
|
+
children: [],
|
|
3263
|
+
traits: /* @__PURE__ */ new Map(),
|
|
3264
|
+
loc: {
|
|
3265
|
+
start: { line: startToken.line, column: startToken.column },
|
|
3266
|
+
end: { line: this.current().line, column: this.current().column }
|
|
3267
|
+
}
|
|
3268
|
+
});
|
|
3269
|
+
} else if (next.type === "COLON" || next.type === "EQUALS") {
|
|
2905
3270
|
const key = this.advance().value;
|
|
2906
3271
|
this.advance();
|
|
2907
3272
|
result.properties[key] = this.parseValue();
|
|
2908
|
-
} else if (childNodeKeywords.includes(token.value) && (next.type === "LBRACE" || next.type === "STRING" || next.type === "IDENTIFIER")) {
|
|
3273
|
+
} else if (childNodeKeywords.includes(token.value) && (next.type === "LBRACE" || next.type === "STRING" || next.type === "IDENTIFIER" || next.type === "HASH")) {
|
|
2909
3274
|
const keyword = this.current().value;
|
|
2910
3275
|
const node = this.parseNode();
|
|
2911
3276
|
node.directives = [...currentDirectives, ...node.directives || []];
|
|
@@ -2919,7 +3284,7 @@ var HoloScriptPlusParser = class {
|
|
|
2919
3284
|
} else if (!childNodeKeywords.includes(token.value) && (next.type === "STRING" || next.type === "NUMBER" || next.type === "BOOLEAN" || next.type === "NULL")) {
|
|
2920
3285
|
const key = this.advance().value;
|
|
2921
3286
|
result.properties[key] = this.parseValue();
|
|
2922
|
-
} else if (next.type === "LBRACE" || next.type === "IDENTIFIER" || next.type === "STRING") {
|
|
3287
|
+
} else if (next.type === "LBRACE" || next.type === "IDENTIFIER" || next.type === "STRING" || next.type === "HASH") {
|
|
2923
3288
|
const keyword = this.current().value;
|
|
2924
3289
|
const node = this.parseNode();
|
|
2925
3290
|
node.directives = [...currentDirectives, ...node.directives || []];
|
|
@@ -3015,6 +3380,7 @@ var HoloScriptPlusParser = class {
|
|
|
3015
3380
|
parseLogicBlock() {
|
|
3016
3381
|
const result = {
|
|
3017
3382
|
functions: [],
|
|
3383
|
+
actions: [],
|
|
3018
3384
|
eventHandlers: [],
|
|
3019
3385
|
tickHandlers: []
|
|
3020
3386
|
};
|
|
@@ -3050,6 +3416,32 @@ var HoloScriptPlusParser = class {
|
|
|
3050
3416
|
}
|
|
3051
3417
|
const body = this.parseCodeBlock();
|
|
3052
3418
|
result.functions.push({ name: funcName, params, body });
|
|
3419
|
+
} else if (keyword === "action") {
|
|
3420
|
+
this.advance();
|
|
3421
|
+
const actionName = this.check("IDENTIFIER") || this.check("STRING") ? this.advance().value : "anonymous";
|
|
3422
|
+
const params = [];
|
|
3423
|
+
if (this.check("LPAREN")) {
|
|
3424
|
+
this.advance();
|
|
3425
|
+
while (!this.check("RPAREN") && !this.check("EOF")) {
|
|
3426
|
+
if (this.check("IDENTIFIER")) {
|
|
3427
|
+
params.push(this.advance().value);
|
|
3428
|
+
if (this.check("COLON")) {
|
|
3429
|
+
this.advance();
|
|
3430
|
+
while (!this.check("COMMA") && !this.check("RPAREN") && !this.check("EOF")) {
|
|
3431
|
+
this.advance();
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3434
|
+
if (this.check("COMMA")) {
|
|
3435
|
+
this.advance();
|
|
3436
|
+
}
|
|
3437
|
+
} else {
|
|
3438
|
+
this.advance();
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
3441
|
+
this.expect("RPAREN", "Expected )");
|
|
3442
|
+
}
|
|
3443
|
+
const body = this.check("LBRACE") ? this.parseCodeBlock() : "";
|
|
3444
|
+
result.actions.push({ name: actionName, params, body });
|
|
3053
3445
|
} else if (keyword === "on_tick") {
|
|
3054
3446
|
this.advance();
|
|
3055
3447
|
let interval = 1;
|
|
@@ -4450,6 +4842,6 @@ function parse(source, options) {
|
|
|
4450
4842
|
return parser.parse(source);
|
|
4451
4843
|
}
|
|
4452
4844
|
|
|
4453
|
-
export {
|
|
4454
|
-
//# sourceMappingURL=chunk-
|
|
4455
|
-
//# sourceMappingURL=chunk-
|
|
4845
|
+
export { ChunkBasedIncrementalParser, HSPLUS_ERROR_CODES, HoloScriptPlusParser, ParseCache, createKeywordError, createParser, createRichError, createTraitError, findSimilarKeyword, findSimilarTrait, formatRichError, formatRichErrors, getErrorCodeDocumentation, getSourceContext, globalParseCache, parse, parseIncrementalChunks };
|
|
4846
|
+
//# sourceMappingURL=chunk-YIMN575O.js.map
|
|
4847
|
+
//# sourceMappingURL=chunk-YIMN575O.js.map
|