@holoscript/core 8.0.6 → 8.0.8
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 +34 -34
- package/bin/holoscript.cjs +1 -1
- package/dist/GLTFPipeline-3EJLL3TS.cjs +38 -0
- package/dist/GLTFPipeline-3OWJV2VK.js +17 -0
- package/dist/{HoloScriptPlusParser-A2W7OCN2.cjs → HoloScriptPlusParser-ADWRY5OS.cjs} +15 -15
- package/dist/{HoloScriptPlusParser-7FBIFUFC.js → HoloScriptPlusParser-JLJDXHSC.js} +4 -4
- package/dist/HoloScriptPlusParser-QCGFPWIL.cjs +27 -0
- package/dist/{HoloScriptPlusParser-F2Z56FJR.js → HoloScriptPlusParser-WENAFEFV.js} +5 -5
- package/dist/HoloScriptRuntime-GGRVEU4T.cjs +19 -0
- package/dist/HoloScriptRuntime-GJK6VJPH.js +10 -0
- package/dist/{USDZExporter-3FWJ25JI.cjs → USDZExporter-AUHZODOF.cjs} +15 -4
- package/dist/{USDZExporter-D2HQLQYK.js → USDZExporter-GXB4AUSG.js} +15 -4
- package/dist/{chunk-2GQHTXOK.js → chunk-22Q5A6RV.js} +3 -3
- package/dist/{chunk-XHZCF3AS.cjs → chunk-2BZHWUSR.cjs} +27 -15
- package/dist/{chunk-XJAN7CZG.cjs → chunk-2GCNOI2U.cjs} +2 -2
- package/dist/{chunk-DBPGNHFS.js → chunk-2OWDB4FB.js} +13 -25
- package/dist/{chunk-N75IH2HY.js → chunk-2Y3V22SG.js} +5 -14
- package/dist/{chunk-MXFUTKCO.js → chunk-33YHE7HX.js} +3 -7
- package/dist/{chunk-RCZHLCX2.js → chunk-3GWWJT7L.js} +4 -4
- package/dist/{chunk-EK7L4DW7.js → chunk-3NGDZZR4.js} +4 -4
- package/dist/{chunk-WRLUBRKS.cjs → chunk-3SKLAUDD.cjs} +2 -2
- package/dist/{chunk-KKFZ3B6J.cjs → chunk-3VBO3IYQ.cjs} +2 -2
- package/dist/{chunk-YF2I3MV3.js → chunk-47RUFYKR.js} +2 -2
- package/dist/{chunk-VHAONJBY.js → chunk-4JGRWHZJ.js} +7 -5
- package/dist/{chunk-2J5WZLF5.cjs → chunk-4W5G5QVL.cjs} +26 -26
- package/dist/{chunk-GQHQOPXZ.cjs → chunk-4YNYPHH3.cjs} +186 -17
- package/dist/{chunk-H5PUZHJV.cjs → chunk-56VOWURB.cjs} +61 -40
- package/dist/{chunk-DQRQZB33.cjs → chunk-5A4TCHOC.cjs} +3 -3
- package/dist/{chunk-M56JSP4A.js → chunk-5EDVCNRT.js} +2 -2
- package/dist/{chunk-YU5RJQPE.js → chunk-5ET6L4NS.js} +3 -3
- package/dist/{chunk-A3GFOZAF.cjs → chunk-63ZGNR2T.cjs} +43 -39
- package/dist/{chunk-NG77ATEW.cjs → chunk-6PRZIHGL.cjs} +6 -6
- package/dist/{chunk-OXGPGQXN.cjs → chunk-7DMMMBCY.cjs} +7 -7
- package/dist/{chunk-FHP6LXJS.js → chunk-7E7GCQCK.js} +2 -2
- package/dist/{chunk-P4AIF7OQ.js → chunk-7VMGP2FW.js} +44 -28
- package/dist/{chunk-7MVLEZB2.js → chunk-7X5PNIQJ.js} +3 -3
- package/dist/{chunk-X7QB5PL5.cjs → chunk-7ZHYEITD.cjs} +11 -11
- package/dist/{chunk-KPJL34Y7.cjs → chunk-ACVWFGBI.cjs} +2 -2
- package/dist/{chunk-QWSB553J.cjs → chunk-AWB7QYY6.cjs} +6 -6
- package/dist/{chunk-VATGR4EM.js → chunk-B4EKV6HQ.js} +61 -40
- package/dist/{chunk-HBEN5TQR.js → chunk-BRNUPDHJ.js} +5 -5
- package/dist/{chunk-F63LYRVE.js → chunk-BTKZGHAV.js} +23 -11
- package/dist/{chunk-YTR32ZEB.cjs → chunk-C4GSLCHE.cjs} +300 -125
- package/dist/{chunk-CXS3DUKD.js → chunk-C7ZBSV2Q.js} +3 -3
- package/dist/{chunk-WOH6LKYT.cjs → chunk-CCPSNT6B.cjs} +12 -7
- package/dist/{chunk-NW5G5FBQ.js → chunk-DD2JQ7TS.js} +4 -3
- package/dist/{chunk-JD7CIZ33.js → chunk-DUCB6LGL.js} +8 -10
- package/dist/{chunk-D63CGNJU.js → chunk-DY72BMU5.js} +3 -3
- package/dist/{chunk-AIA52I7T.cjs → chunk-EBS32AJI.cjs} +6 -4
- package/dist/{chunk-DCE3LDO3.cjs → chunk-EDPYCLRC.cjs} +52 -62
- package/dist/{chunk-NDUX553L.js → chunk-F2G6CWFT.js} +240 -65
- package/dist/{chunk-X7LYK5TX.cjs → chunk-F5LKJ6F5.cjs} +43 -31
- package/dist/{chunk-LAUFLPB6.js → chunk-FGMDMJM7.js} +10 -5
- package/dist/{chunk-P52PPB5R.js → chunk-FHQFPYV4.js} +4 -4
- package/dist/{chunk-YIMN575O.js → chunk-FNHJRI32.js} +8 -5
- package/dist/{chunk-EXUP2BUM.cjs → chunk-FT6TDR2O.cjs} +27 -27
- package/dist/{chunk-BRQJKJGT.cjs → chunk-FWVYAMNW.cjs} +4 -4
- package/dist/{chunk-PGANYCAG.cjs → chunk-G25QVBA5.cjs} +4 -3
- package/dist/{chunk-5BLWXOIP.cjs → chunk-G6PNEASF.cjs} +13 -13
- package/dist/{chunk-2BSMSUCE.js → chunk-GASCWJK5.js} +2 -2
- package/dist/{chunk-2VL6SJ33.cjs → chunk-GH6C2QGW.cjs} +12 -21
- package/dist/{chunk-JEB5UU3E.js → chunk-GSOUNWEL.js} +35 -27
- package/dist/{chunk-QPOQ7VPI.js → chunk-GTA4Q3A3.js} +2 -2
- package/dist/{chunk-JIYN45TV.cjs → chunk-GVFJ6T4S.cjs} +3 -7
- package/dist/{chunk-IVY74O6C.js → chunk-GVOKJNUN.js} +50 -11
- package/dist/{chunk-GZG4KA4E.js → chunk-GW3LKD5C.js} +6 -4
- package/dist/{chunk-IBXT6UP3.cjs → chunk-HFSVMKM3.cjs} +14 -14
- package/dist/{chunk-E767PVC6.cjs → chunk-HLFDZ35S.cjs} +5 -5
- package/dist/{chunk-ZXZ2AL2J.cjs → chunk-I76GIKN7.cjs} +20 -16
- package/dist/{chunk-4FDL7JLJ.cjs → chunk-KAIVDEIG.cjs} +145 -60
- package/dist/{chunk-X4EBCG4K.js → chunk-KCPHASCO.js} +18 -6
- package/dist/{chunk-T5J7ZKP3.cjs → chunk-KOUAQL2B.cjs} +16 -13
- package/dist/{chunk-GMP623FG.cjs → chunk-KQU64CIX.cjs} +2 -2
- package/dist/{chunk-4DO425P5.js → chunk-L5U4W6JC.js} +4 -4
- package/dist/{chunk-HBLKLLG5.cjs → chunk-LMJ5EBV7.cjs} +10 -10
- package/dist/{chunk-QWAR3GY6.cjs → chunk-LODTHGST.cjs} +8 -8
- package/dist/{chunk-TFUMBR7G.cjs → chunk-LPS5AMQD.cjs} +8 -8
- package/dist/{chunk-ISG3TQ2O.js → chunk-LWUOUCYL.js} +9 -5
- package/dist/{chunk-6CTRH7HT.cjs → chunk-LYJJI7ZK.cjs} +12 -14
- package/dist/{chunk-GTU2Z2WW.cjs → chunk-M7K4LE66.cjs} +5 -14
- package/dist/{chunk-URG2SJLK.js → chunk-MDR235RZ.js} +3 -7
- package/dist/{chunk-ULXWSPCK.js → chunk-MSYSQ2AJ.js} +101 -16
- package/dist/{chunk-TCBJMNXS.cjs → chunk-NGBXXZLL.cjs} +50 -62
- package/dist/{chunk-RXU4PQKA.js → chunk-NHJLP37F.js} +6 -6
- package/dist/{chunk-NTGBEMYL.cjs → chunk-NHYRRAGI.cjs} +5 -5
- package/dist/{chunk-YG3OAHJZ.cjs → chunk-O3MGZDCT.cjs} +89 -52
- package/dist/{chunk-GIOYPNTH.js → chunk-OABEO6HH.js} +185 -16
- package/dist/{chunk-N5YOAFNA.cjs → chunk-OS533P33.cjs} +37 -29
- package/dist/{chunk-IIUFMUTV.js → chunk-PABONWKI.js} +24 -11
- package/dist/{chunk-5BQIJG3O.js → chunk-PXNZ6TME.js} +47 -57
- package/dist/{chunk-KDZRD6EI.js → chunk-Q2Q34NF3.js} +63 -26
- package/dist/{chunk-IS4AEGLU.js → chunk-QBWNJXNR.js} +10 -6
- package/dist/{chunk-5IHG2LGT.js → chunk-QFU53KRH.js} +4 -4
- package/dist/{chunk-NTJZJ5IP.cjs → chunk-QGMUTVVH.cjs} +17 -17
- package/dist/{chunk-MYY4PMWX.cjs → chunk-RUVBFAF7.cjs} +50 -11
- package/dist/{chunk-E64LOLJU.js → chunk-S762UEV5.js} +5 -5
- package/dist/{chunk-3SBVODUP.cjs → chunk-SH5PPVK7.cjs} +61 -45
- package/dist/{chunk-LY4DMQOW.cjs → chunk-SKZPC5AG.cjs} +5 -5
- package/dist/{chunk-TJHVSBP2.js → chunk-SLHLXUMO.js} +10 -4
- package/dist/{chunk-S6OVFUXD.js → chunk-SSSN7VAM.js} +3 -3
- package/dist/{chunk-K5UGRXKR.js → chunk-SXOSDZD6.js} +6 -6
- package/dist/{chunk-J32ZJZJH.js → chunk-SYTRBGDS.js} +2 -2
- package/dist/{chunk-CIWWXYHZ.cjs → chunk-T6W3Z3SH.cjs} +2 -2
- package/dist/{chunk-U36W76U7.js → chunk-TEVX443G.js} +44 -51
- package/dist/{chunk-6DOKCECB.cjs → chunk-TQ377OLB.cjs} +23 -21
- package/dist/{chunk-YAPPQYJH.cjs → chunk-TRCGG42I.cjs} +195 -152
- package/dist/{chunk-H652NHX5.js → chunk-TVANHNJ7.js} +30 -23
- package/dist/{chunk-EKBKLK7P.js → chunk-UDE4OZMR.js} +3 -3
- package/dist/{chunk-3OIZJNVT.cjs → chunk-UGXHYIWT.cjs} +5 -5
- package/dist/{chunk-44GM3P4G.cjs → chunk-ULMSSHCJ.cjs} +21 -21
- package/dist/{chunk-3B5NVDHJ.cjs → chunk-UOL6Y5TD.cjs} +18 -18
- package/dist/{chunk-5S7RKFGR.cjs → chunk-UVFI7XIR.cjs} +10 -4
- package/dist/{chunk-5TIZXMED.cjs → chunk-V7AKE5VT.cjs} +10 -10
- package/dist/{chunk-3B7AY37W.js → chunk-VEPGBETF.js} +6 -6
- package/dist/{chunk-BKCK3IU6.js → chunk-VF257YKO.js} +4 -4
- package/dist/{chunk-4N4SXXWF.js → chunk-VSACG2AR.js} +3 -3
- package/dist/{chunk-ZDSYWBIE.cjs → chunk-VW5CRJBE.cjs} +3 -7
- package/dist/{chunk-PVWNU4QT.cjs → chunk-WFKVS2K4.cjs} +64 -26
- package/dist/{chunk-TDCJ7YPA.js → chunk-WXQ57LAO.js} +3 -3
- package/dist/{chunk-NE5CZ2NC.cjs → chunk-X27QRG4C.cjs} +38 -38
- package/dist/{chunk-TVHSPJ4N.cjs → chunk-X2AVEAZM.cjs} +30 -23
- package/dist/{chunk-C34AJIJO.js → chunk-XQ5MWMP2.js} +4 -4
- package/dist/{chunk-TFWYKOOB.cjs → chunk-XW6IXEQH.cjs} +26 -13
- package/dist/{chunk-YIVFJNYV.js → chunk-Y3ZFVUUU.js} +2 -2
- package/dist/{chunk-TJIMBJ6L.cjs → chunk-Y57W2CT5.cjs} +2 -2
- package/dist/{chunk-BFROVZOF.cjs → chunk-YCM6QQRT.cjs} +46 -53
- package/dist/{chunk-MBOOR7X4.js → chunk-YFVQWSNJ.js} +3 -3
- package/dist/{chunk-ISM4NX6N.js → chunk-YFWRJW4B.js} +2 -2
- package/dist/{chunk-6OTFG3EB.js → chunk-YN6IETRZ.js} +179 -136
- package/dist/{chunk-NPDNFPTU.js → chunk-YRRAUB35.js} +4 -4
- package/dist/{chunk-GCYR3D2K.js → chunk-Z6PMDS4G.js} +61 -23
- package/dist/{chunk-DPZXVDGM.js → chunk-ZA34AN3R.js} +8 -17
- package/dist/{chunk-EKYL4PE3.cjs → chunk-ZLF4YF3U.cjs} +2 -2
- package/dist/{chunk-VFKXK4GR.cjs → chunk-ZPZAVHXL.cjs} +20 -20
- package/dist/cli/holoscript-runner.cjs +39 -22
- package/dist/cli/holoscript-runner.js +32 -15
- package/dist/compiler/GasOptimizationAnalyzer.d.ts +73 -0
- package/dist/compiler/NFTMarketplaceCompiler.d.ts +23 -0
- package/dist/compiler/agent-inference.cjs +7 -7
- package/dist/compiler/agent-inference.js +3 -3
- package/dist/compiler/android-xr.cjs +8 -8
- package/dist/compiler/android-xr.js +6 -6
- package/dist/compiler/android.cjs +6 -6
- package/dist/compiler/android.js +4 -4
- package/dist/compiler/ar.cjs +6 -6
- package/dist/compiler/ar.js +4 -4
- package/dist/compiler/babylon.cjs +8 -8
- package/dist/compiler/babylon.js +7 -7
- package/dist/compiler/business-quest.cjs +9 -9
- package/dist/compiler/business-quest.js +1 -1
- package/dist/compiler/context.cjs +6 -6
- package/dist/compiler/context.js +3 -3
- package/dist/compiler/domain-block-utils.cjs +153 -153
- package/dist/compiler/domain-block-utils.js +4 -4
- package/dist/compiler/dtdl.cjs +7 -7
- package/dist/compiler/dtdl.js +4 -4
- package/dist/compiler/gltf-pipeline.cjs +8 -8
- package/dist/compiler/gltf-pipeline.js +1 -1
- package/dist/compiler/godot.cjs +6 -6
- package/dist/compiler/godot.js +5 -5
- package/dist/compiler/incremental.cjs +8 -8
- package/dist/compiler/incremental.js +3 -3
- package/dist/compiler/index.cjs +347 -362
- package/dist/compiler/index.d.ts +20 -0
- package/dist/compiler/index.js +200 -215
- package/dist/compiler/ios.cjs +6 -6
- package/dist/compiler/ios.js +4 -4
- package/dist/compiler/llm-provider-capabilities.cjs +6 -6
- package/dist/compiler/llm-provider-capabilities.js +3 -3
- package/dist/compiler/multi-layer.cjs +10 -10
- package/dist/compiler/multi-layer.js +9 -9
- package/dist/compiler/openxr.cjs +7 -7
- package/dist/compiler/openxr.js +6 -6
- package/dist/compiler/playcanvas.cjs +6 -6
- package/dist/compiler/playcanvas.js +5 -5
- package/dist/compiler/r3f.cjs +13 -13
- package/dist/compiler/r3f.js +8 -8
- package/dist/compiler/sdf.cjs +7 -7
- package/dist/compiler/sdf.js +5 -5
- package/dist/compiler/state.cjs +6 -6
- package/dist/compiler/state.js +4 -4
- package/dist/compiler/trait-composition.cjs +8 -8
- package/dist/compiler/trait-composition.js +4 -4
- package/dist/compiler/unity.cjs +7 -7
- package/dist/compiler/unity.js +6 -6
- package/dist/compiler/unreal.cjs +8 -8
- package/dist/compiler/unreal.js +6 -6
- package/dist/compiler/urdf.cjs +14 -14
- package/dist/compiler/urdf.js +5 -5
- package/dist/compiler/usd-physics.cjs +7 -7
- package/dist/compiler/usd-physics.js +4 -4
- package/dist/compiler/visionos.cjs +7 -7
- package/dist/compiler/visionos.js +6 -6
- package/dist/compiler/vrchat.cjs +7 -7
- package/dist/compiler/vrchat.js +5 -5
- package/dist/compiler/vrr.cjs +7 -7
- package/dist/compiler/vrr.js +5 -5
- package/dist/compiler/wasm.cjs +10 -10
- package/dist/compiler/wasm.js +5 -5
- package/dist/compiler/webgpu.cjs +6 -6
- package/dist/compiler/webgpu.js +5 -5
- package/dist/coordinators/index.cjs +27 -10
- package/dist/coordinators/index.js +27 -10
- package/dist/debugger.cjs +6 -6
- package/dist/debugger.js +4 -4
- package/dist/entries/scripting.cjs +6 -6
- package/dist/entries/scripting.js +2 -2
- package/dist/hololand/index.cjs +36 -36
- package/dist/hololand/index.js +2 -2
- package/dist/index.cjs +1056 -796
- package/dist/index.js +440 -180
- package/dist/math/tropical-spmv.cjs +10 -10
- package/dist/math/tropical-spmv.js +1 -1
- package/dist/math/vec3.cjs +13 -13
- package/dist/math/vec3.js +1 -1
- package/dist/parser/NFTMarketplaceTypes.d.ts +191 -0
- package/dist/parser.cjs +16 -16
- package/dist/parser.js +5 -5
- package/dist/reconstruction/index.cjs +37 -37
- package/dist/reconstruction/index.js +4 -4
- package/dist/runtime.cjs +274 -76
- package/dist/runtime.d.ts +10 -1
- package/dist/runtime.js +268 -70
- package/dist/self-improvement/index.cjs +12 -4
- package/dist/self-improvement/index.js +12 -4
- package/dist/{src-HCCCSYP7.js → src-J6CM4AUR.js} +91 -33
- package/dist/{src-4ROC227P.cjs → src-PT2FERDV.cjs} +93 -35
- package/dist/testing.cjs +5 -5
- package/dist/testing.js +1 -1
- package/dist/traits/botanical-lotus.cjs +49 -49
- package/dist/traits/botanical-lotus.js +2 -2
- package/dist/traits/engines/index.cjs +39 -39
- package/dist/traits/engines/index.d.ts +279 -0
- package/dist/traits/engines/index.js +4 -4
- package/dist/traits/index.cjs +881 -773
- package/dist/traits/index.js +366 -258
- package/dist/world/index.cjs +21 -18
- package/dist/world/index.js +21 -18
- package/dist/world-model/index.cjs +11 -5
- package/dist/world-model/index.d.ts +8 -0
- package/dist/world-model/index.js +11 -5
- package/package.json +74 -68
- package/LICENSE +0 -21
- package/dist/GLTFPipeline-PVLTKDBD.cjs +0 -38
- package/dist/GLTFPipeline-QPI4I7DL.js +0 -17
- package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +0 -27
- package/dist/HoloScriptRuntime-6ZGLUCFS.js +0 -10
- package/dist/HoloScriptRuntime-ALUASIL2.cjs +0 -19
|
@@ -17,11 +17,7 @@ function vec3Length(v) {
|
|
|
17
17
|
return Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
|
|
18
18
|
}
|
|
19
19
|
function vec3Cross(a, b) {
|
|
20
|
-
return [
|
|
21
|
-
a[1] * b[2] - a[2] * b[1],
|
|
22
|
-
a[2] * b[0] - a[0] * b[2],
|
|
23
|
-
a[0] * b[1] - a[1] * b[0]
|
|
24
|
-
];
|
|
20
|
+
return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
|
|
25
21
|
}
|
|
26
22
|
function vec3CrossArray(a, b) {
|
|
27
23
|
return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
|
|
@@ -52,5 +48,5 @@ function vec3Dot(a, b) {
|
|
|
52
48
|
}
|
|
53
49
|
|
|
54
50
|
export { vec3Add, vec3Cross, vec3CrossArray, vec3Distance, vec3Dot, vec3Length, vec3Normalize, vec3NormalizeInPlace, vec3Scale, vec3ScaleArray, vec3Sub, vec3SubArray };
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-33YHE7HX.js.map
|
|
52
|
+
//# sourceMappingURL=chunk-33YHE7HX.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computeContentHash } from './chunk-4R6SBXDB.js';
|
|
2
|
-
import { init_AgentRBAC, init_CompilerBase, getRBAC, UnauthorizedCompilerAccessError } from './chunk-
|
|
2
|
+
import { init_AgentRBAC, init_CompilerBase, getRBAC, UnauthorizedCompilerAccessError } from './chunk-C7ZBSV2Q.js';
|
|
3
3
|
import { init_safeJsonParse, readJson } from './chunk-VVKVQZI6.js';
|
|
4
4
|
import { createHash } from 'crypto';
|
|
5
5
|
|
|
@@ -725,7 +725,7 @@ var ImportResolver = class {
|
|
|
725
725
|
throw new Error(`File not found: '${canonicalPath}' (imported from '${importedBy}')`);
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
|
-
const { HoloScriptPlusParser } = await import('./HoloScriptPlusParser-
|
|
728
|
+
const { HoloScriptPlusParser } = await import('./HoloScriptPlusParser-WENAFEFV.js');
|
|
729
729
|
const parser = new HoloScriptPlusParser({ enableTypeScriptImports: true });
|
|
730
730
|
const result = parser.parse(source);
|
|
731
731
|
if (!result.success && result.errors.length > 0) {
|
|
@@ -2003,5 +2003,5 @@ var UnauthorizedIncrementalCompilerAccessError = class extends UnauthorizedCompi
|
|
|
2003
2003
|
};
|
|
2004
2004
|
|
|
2005
2005
|
export { IncrementalCompiler, TraitDependencyGraph, UnauthorizedIncrementalCompilerAccessError, createIncrementalCompiler, deserializeCache, globalTraitGraph, serializeCache };
|
|
2006
|
-
//# sourceMappingURL=chunk-
|
|
2007
|
-
//# sourceMappingURL=chunk-
|
|
2006
|
+
//# sourceMappingURL=chunk-3GWWJT7L.js.map
|
|
2007
|
+
//# sourceMappingURL=chunk-3GWWJT7L.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileMaterialBlock, materialToWebGPU } from './chunk-
|
|
2
|
-
import { init_CompilerBase, CompilerBase } from './chunk-
|
|
1
|
+
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileMaterialBlock, materialToWebGPU } from './chunk-ZA34AN3R.js';
|
|
2
|
+
import { init_CompilerBase, CompilerBase } from './chunk-C7ZBSV2Q.js';
|
|
3
3
|
import { __export, __esm } from './chunk-OL46QLBJ.js';
|
|
4
4
|
import { ANSCapabilityPath } from '@holoscript/core-types/ans';
|
|
5
5
|
|
|
@@ -665,5 +665,5 @@ var init_WebGPUCompiler = __esm({
|
|
|
665
665
|
});
|
|
666
666
|
|
|
667
667
|
export { WebGPUCompiler, WebGPUCompiler_exports, init_WebGPUCompiler };
|
|
668
|
-
//# sourceMappingURL=chunk-
|
|
669
|
-
//# sourceMappingURL=chunk-
|
|
668
|
+
//# sourceMappingURL=chunk-3NGDZZR4.js.map
|
|
669
|
+
//# sourceMappingURL=chunk-3NGDZZR4.js.map
|
|
@@ -1939,5 +1939,5 @@ var init_constants = chunkHCCQLAA4_cjs.__esm({
|
|
|
1939
1939
|
});
|
|
1940
1940
|
|
|
1941
1941
|
exports.init_constants = init_constants;
|
|
1942
|
-
//# sourceMappingURL=chunk-
|
|
1943
|
-
//# sourceMappingURL=chunk-
|
|
1942
|
+
//# sourceMappingURL=chunk-3SKLAUDD.cjs.map
|
|
1943
|
+
//# sourceMappingURL=chunk-3SKLAUDD.cjs.map
|
|
@@ -553,5 +553,5 @@ function isPipelineSource(source) {
|
|
|
553
553
|
|
|
554
554
|
exports.isPipelineSource = isPipelineSource;
|
|
555
555
|
exports.parsePipeline = parsePipeline;
|
|
556
|
-
//# sourceMappingURL=chunk-
|
|
557
|
-
//# sourceMappingURL=chunk-
|
|
556
|
+
//# sourceMappingURL=chunk-3VBO3IYQ.cjs.map
|
|
557
|
+
//# sourceMappingURL=chunk-3VBO3IYQ.cjs.map
|
|
@@ -42,5 +42,5 @@ function isWebGpuEnvironmentPresent() {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export { HOLOMAP_SIMULATION_CONTRACT_KIND, ensureNodeWebGpuSync, isWebGpuEnvironmentPresent };
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-47RUFYKR.js.map
|
|
46
|
+
//# sourceMappingURL=chunk-47RUFYKR.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, weatherToUSD, compileAudioSourceBlock, audioSourceToUSD, compilePostProcessingBlock, postProcessingToUSD, compileParticleBlock, particlesToUSD, compilePhysicsBlock, physicsToURDF, compileMaterialBlock, materialToUSD } from './chunk-
|
|
2
|
-
import { init_CompilerBase, CompilerBase } from './chunk-
|
|
1
|
+
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, weatherToUSD, compileAudioSourceBlock, audioSourceToUSD, compilePostProcessingBlock, postProcessingToUSD, compileParticleBlock, particlesToUSD, compilePhysicsBlock, physicsToURDF, compileMaterialBlock, materialToUSD } from './chunk-ZA34AN3R.js';
|
|
2
|
+
import { init_CompilerBase, CompilerBase } from './chunk-C7ZBSV2Q.js';
|
|
3
3
|
import { ANSCapabilityPath } from '@holoscript/core-types/ans';
|
|
4
4
|
|
|
5
5
|
// src/compiler/USDPhysicsCompiler.ts
|
|
@@ -816,7 +816,9 @@ var USDPhysicsCompiler = class extends CompilerBase {
|
|
|
816
816
|
this.emit(`customData = {`);
|
|
817
817
|
this.indentLevel++;
|
|
818
818
|
this.emit(`string holoscript:version = "6.0"`);
|
|
819
|
-
this.emit(
|
|
819
|
+
this.emit(
|
|
820
|
+
`string holoscript:compositionName = "${this.escapeStringValue(composition.name, "USD")}"`
|
|
821
|
+
);
|
|
820
822
|
const objectNames = (composition.objects || []).map((o) => o.name);
|
|
821
823
|
if (objectNames.length > 0) {
|
|
822
824
|
const namesStr = objectNames.map((n) => `"${this.escapeStringValue(n, "USD")}"`).join(", ");
|
|
@@ -878,5 +880,5 @@ function compileForIsaacSim(composition, options) {
|
|
|
878
880
|
}
|
|
879
881
|
|
|
880
882
|
export { USDPhysicsCompiler, compileForIsaacSim, compileToUSDPhysics };
|
|
881
|
-
//# sourceMappingURL=chunk-
|
|
882
|
-
//# sourceMappingURL=chunk-
|
|
883
|
+
//# sourceMappingURL=chunk-4JGRWHZJ.js.map
|
|
884
|
+
//# sourceMappingURL=chunk-4JGRWHZJ.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUVFI7XIR_cjs = require('./chunk-UVFI7XIR.cjs');
|
|
4
4
|
var chunkOIQYIIO3_cjs = require('./chunk-OIQYIIO3.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunkEBS32AJI_cjs = require('./chunk-EBS32AJI.cjs');
|
|
6
|
+
var chunkGH6C2QGW_cjs = require('./chunk-GH6C2QGW.cjs');
|
|
7
|
+
var chunkLODTHGST_cjs = require('./chunk-LODTHGST.cjs');
|
|
8
8
|
var chunkHCCQLAA4_cjs = require('./chunk-HCCQLAA4.cjs');
|
|
9
9
|
var ans = require('@holoscript/core-types/ans');
|
|
10
10
|
|
|
@@ -17,10 +17,10 @@ var SHAPE_TO_MESH; exports.BabylonCompiler = void 0;
|
|
|
17
17
|
var init_BabylonCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
18
18
|
"src/compiler/BabylonCompiler.ts"() {
|
|
19
19
|
chunkOIQYIIO3_cjs.init_TraitCompositor();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
chunkUVFI7XIR_cjs.init_ProvenanceSemiring();
|
|
21
|
+
chunkLODTHGST_cjs.init_CompilerBase();
|
|
22
|
+
chunkGH6C2QGW_cjs.init_DomainBlockCompilerMixin();
|
|
23
|
+
chunkEBS32AJI_cjs.init_PlatformConditionalCompilerMixin();
|
|
24
24
|
SHAPE_TO_MESH = {
|
|
25
25
|
sphere: "CreateSphere",
|
|
26
26
|
orb: "CreateSphere",
|
|
@@ -36,7 +36,7 @@ var init_BabylonCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
36
36
|
capsule: "CreateCapsule",
|
|
37
37
|
disc: "CreateDisc"
|
|
38
38
|
};
|
|
39
|
-
exports.BabylonCompiler = class extends
|
|
39
|
+
exports.BabylonCompiler = class extends chunkLODTHGST_cjs.CompilerBase {
|
|
40
40
|
constructor(options = {}) {
|
|
41
41
|
super();
|
|
42
42
|
this.compilerName = "BabylonCompiler";
|
|
@@ -57,8 +57,8 @@ var init_BabylonCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
57
57
|
compile(composition, agentToken, outputPath) {
|
|
58
58
|
this.validateCompilerAccess(agentToken, outputPath);
|
|
59
59
|
if (this.options.platformTarget) {
|
|
60
|
-
const target = typeof this.options.platformTarget === "string" ?
|
|
61
|
-
const platformMixin = new
|
|
60
|
+
const target = typeof this.options.platformTarget === "string" ? chunkEBS32AJI_cjs.createPlatformTarget(this.options.platformTarget) : this.options.platformTarget;
|
|
61
|
+
const platformMixin = new chunkEBS32AJI_cjs.PlatformConditionalCompilerMixin();
|
|
62
62
|
composition = platformMixin.filterForPlatform(composition, target);
|
|
63
63
|
}
|
|
64
64
|
this.lines = [];
|
|
@@ -138,31 +138,31 @@ var init_BabylonCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
138
138
|
this.emit("");
|
|
139
139
|
this.emit("// === v4.2 Domain Blocks ===");
|
|
140
140
|
let blockIdx = 0;
|
|
141
|
-
const compiled =
|
|
141
|
+
const compiled = chunkGH6C2QGW_cjs.compileDomainBlocks(
|
|
142
142
|
domainBlocks,
|
|
143
143
|
{
|
|
144
144
|
material: (block) => {
|
|
145
|
-
const mat =
|
|
146
|
-
return
|
|
145
|
+
const mat = chunkGH6C2QGW_cjs.compileMaterialBlock(block);
|
|
146
|
+
return chunkGH6C2QGW_cjs.materialToBabylon(mat, `db${blockIdx++}`);
|
|
147
147
|
},
|
|
148
148
|
physics: (block) => {
|
|
149
|
-
const phys =
|
|
150
|
-
return
|
|
149
|
+
const phys = chunkGH6C2QGW_cjs.compilePhysicsBlock(block);
|
|
150
|
+
return chunkGH6C2QGW_cjs.physicsToBabylon(phys, `db${blockIdx++}`);
|
|
151
151
|
},
|
|
152
152
|
vfx: (block) => {
|
|
153
|
-
const ps =
|
|
154
|
-
return
|
|
153
|
+
const ps = chunkGH6C2QGW_cjs.compileParticleBlock(block);
|
|
154
|
+
return chunkGH6C2QGW_cjs.particlesToBabylon(ps, `db${blockIdx++}`);
|
|
155
155
|
},
|
|
156
156
|
postfx: (block) => {
|
|
157
|
-
const pp =
|
|
158
|
-
return
|
|
157
|
+
const pp = chunkGH6C2QGW_cjs.compilePostProcessingBlock(block);
|
|
158
|
+
return chunkGH6C2QGW_cjs.postProcessingToBabylon(pp);
|
|
159
159
|
},
|
|
160
160
|
audio: (block) => {
|
|
161
|
-
const audio =
|
|
162
|
-
return
|
|
161
|
+
const audio = chunkGH6C2QGW_cjs.compileAudioSourceBlock(block);
|
|
162
|
+
return chunkGH6C2QGW_cjs.audioSourceToBabylon(audio, `db${blockIdx++}`);
|
|
163
163
|
},
|
|
164
164
|
weather: (block) => {
|
|
165
|
-
const weather =
|
|
165
|
+
const weather = chunkGH6C2QGW_cjs.compileWeatherBlock(block);
|
|
166
166
|
const layers = weather.layers.map((l) => `// Layer: ${l.type} \u2014 ${JSON.stringify(l.properties)}`).join("\n");
|
|
167
167
|
return `// Weather: ${weather.keyword} "${weather.name || ""}" \u2014 implement via Babylon.js particle systems
|
|
168
168
|
${layers}`;
|
|
@@ -346,7 +346,7 @@ ${layers}`;
|
|
|
346
346
|
(t) => t.name === "physics" || t.name === "collidable"
|
|
347
347
|
);
|
|
348
348
|
if (physicsTraits.length > 0) {
|
|
349
|
-
const semiring = new
|
|
349
|
+
const semiring = new chunkUVFI7XIR_cjs.ProvenanceSemiring();
|
|
350
350
|
const applications = physicsTraits.map((t) => ({
|
|
351
351
|
name: t.name,
|
|
352
352
|
config: t.config || {},
|
|
@@ -843,5 +843,5 @@ ${layers}`;
|
|
|
843
843
|
|
|
844
844
|
exports.BabylonCompiler_exports = BabylonCompiler_exports;
|
|
845
845
|
exports.init_BabylonCompiler = init_BabylonCompiler;
|
|
846
|
-
//# sourceMappingURL=chunk-
|
|
847
|
-
//# sourceMappingURL=chunk-
|
|
846
|
+
//# sourceMappingURL=chunk-4W5G5QVL.cjs.map
|
|
847
|
+
//# sourceMappingURL=chunk-4W5G5QVL.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3VBO3IYQ_cjs = require('./chunk-3VBO3IYQ.cjs');
|
|
4
4
|
|
|
5
5
|
// src/parser/TypoDetector.ts
|
|
6
6
|
var TypoDetector = class {
|
|
@@ -777,6 +777,8 @@ var KEYWORDS_AS_IDENTIFIERS = [
|
|
|
777
777
|
"CONSTRAINT",
|
|
778
778
|
"TERRAIN",
|
|
779
779
|
"PARTICLES",
|
|
780
|
+
// Behavior/AI keywords that appear as property names in state + NPC blocks
|
|
781
|
+
"BEHAVIOR",
|
|
780
782
|
// Game/AI keywords that can appear as property names
|
|
781
783
|
"SHAPE",
|
|
782
784
|
"NPC",
|
|
@@ -1178,6 +1180,10 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
1178
1180
|
composition.environment = this.parseEnvironmentBody();
|
|
1179
1181
|
} else if (decoratorName === "state") {
|
|
1180
1182
|
composition.state = this.parseStateBody();
|
|
1183
|
+
} else if (decoratorName === "state_machine") {
|
|
1184
|
+
if (this.check("LBRACE")) {
|
|
1185
|
+
composition.stateMachines.push(this.parseStateMachineFromDecorator());
|
|
1186
|
+
}
|
|
1181
1187
|
} else {
|
|
1182
1188
|
composition.traits = composition.traits || [];
|
|
1183
1189
|
const config = this.parseOptionalTraitConfig();
|
|
@@ -1394,7 +1400,7 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
1394
1400
|
const startLoc = this.currentLocation();
|
|
1395
1401
|
this.pushContext("composition");
|
|
1396
1402
|
this.expect("COMPOSITION");
|
|
1397
|
-
const name = this.expectString();
|
|
1403
|
+
const name = this.check("STRING") ? this.expectString() : this.check("IDENTIFIER") ? this.expectIdentifier() : this.expectString();
|
|
1398
1404
|
this.skipNewlines();
|
|
1399
1405
|
this.expect("LBRACE");
|
|
1400
1406
|
this.skipNewlines();
|
|
@@ -1557,6 +1563,10 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
1557
1563
|
composition.state = this.parseStateBody();
|
|
1558
1564
|
} else if (decoratorName === "world" || decoratorName === "environment") {
|
|
1559
1565
|
composition.environment = this.parseEnvironmentBody();
|
|
1566
|
+
} else if (decoratorName === "state_machine") {
|
|
1567
|
+
if (this.check("LBRACE")) {
|
|
1568
|
+
composition.stateMachines.push(this.parseStateMachineFromDecorator());
|
|
1569
|
+
}
|
|
1560
1570
|
} else {
|
|
1561
1571
|
composition.traits = composition.traits || [];
|
|
1562
1572
|
const config = this.parseOptionalTraitConfig();
|
|
@@ -1869,7 +1879,7 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
1869
1879
|
parseLight() {
|
|
1870
1880
|
const startLoc = this.currentLocation();
|
|
1871
1881
|
this.expect("LIGHT");
|
|
1872
|
-
const name = this.expectString();
|
|
1882
|
+
const name = this.check("STRING") ? this.expectString() : "light";
|
|
1873
1883
|
let lightType = "directional";
|
|
1874
1884
|
const lightTypeNames = {
|
|
1875
1885
|
directional: "directional",
|
|
@@ -1892,6 +1902,21 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
1892
1902
|
while (!this.check("RBRACE") && !this.isAtEnd()) {
|
|
1893
1903
|
this.skipNewlines();
|
|
1894
1904
|
if (this.check("RBRACE")) break;
|
|
1905
|
+
if (this.check("AT")) {
|
|
1906
|
+
this.advance();
|
|
1907
|
+
const traitName = this.parseTraitName();
|
|
1908
|
+
const cfg = this.parseOptionalTraitConfig();
|
|
1909
|
+
const cfgKeys = Object.keys(cfg);
|
|
1910
|
+
let traitValue;
|
|
1911
|
+
if (cfgKeys.length === 0) traitValue = true;
|
|
1912
|
+
else if (cfgKeys.every((k) => /^_arg\d+$/.test(k))) {
|
|
1913
|
+
const arr = cfgKeys.sort().map((k) => cfg[k]);
|
|
1914
|
+
traitValue = arr.length === 1 ? arr[0] : arr;
|
|
1915
|
+
} else traitValue = cfg;
|
|
1916
|
+
properties.push({ type: "LightProperty", key: traitName, value: traitValue });
|
|
1917
|
+
this.skipNewlines();
|
|
1918
|
+
continue;
|
|
1919
|
+
}
|
|
1895
1920
|
const key = this.expectIdentifier();
|
|
1896
1921
|
if (this.check("STRING")) {
|
|
1897
1922
|
this.advance();
|
|
@@ -2557,7 +2582,7 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
2557
2582
|
const traits = [];
|
|
2558
2583
|
while (this.check("AT")) {
|
|
2559
2584
|
this.advance();
|
|
2560
|
-
const traitName = this.
|
|
2585
|
+
const traitName = this.parseTraitName();
|
|
2561
2586
|
if (String(traitName).toLowerCase() === "platform") {
|
|
2562
2587
|
platformConstraint = this.parsePlatformConstraint();
|
|
2563
2588
|
this.skipNewlines();
|
|
@@ -2627,7 +2652,12 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
2627
2652
|
platformConstraint: constraint
|
|
2628
2653
|
};
|
|
2629
2654
|
traits.push(trait2);
|
|
2630
|
-
directives.push({
|
|
2655
|
+
directives.push({
|
|
2656
|
+
type: "trait",
|
|
2657
|
+
name: nextTraitName,
|
|
2658
|
+
config: config2,
|
|
2659
|
+
platformConstraint: constraint
|
|
2660
|
+
});
|
|
2631
2661
|
} else if (this.check("OBJECT") || this.check("SPATIAL_AGENT") || this.check("TOOL_SLOT") || this.check("BEHAVIOR") || this.current().type.startsWith("UI_")) {
|
|
2632
2662
|
const nestedType = this.check("OBJECT") ? void 0 : this.current().value.toLowerCase();
|
|
2633
2663
|
const child = this.parseObject(nestedType);
|
|
@@ -2744,11 +2774,10 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
2744
2774
|
}
|
|
2745
2775
|
if (declarationKind === "instanced_object") {
|
|
2746
2776
|
obj.declarationKind = "instanced_object";
|
|
2747
|
-
obj.instanceMetadata = this.buildInstancedObjectMetadata(
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
);
|
|
2777
|
+
obj.instanceMetadata = this.buildInstancedObjectMetadata(properties, traits, {
|
|
2778
|
+
start: startLoc,
|
|
2779
|
+
end: endLoc
|
|
2780
|
+
});
|
|
2752
2781
|
}
|
|
2753
2782
|
return obj;
|
|
2754
2783
|
}
|
|
@@ -2757,9 +2786,7 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
2757
2786
|
for (const property of properties) {
|
|
2758
2787
|
propertyMap[property.key] = property.value;
|
|
2759
2788
|
}
|
|
2760
|
-
const count = this.asOptionalNumber(
|
|
2761
|
-
propertyMap["instance_count"] ?? propertyMap["count"]
|
|
2762
|
-
);
|
|
2789
|
+
const count = this.asOptionalNumber(propertyMap["instance_count"] ?? propertyMap["count"]);
|
|
2763
2790
|
const anchor = this.asOptionalString(
|
|
2764
2791
|
propertyMap["anchor"] ?? this.propertyFromObject(propertyMap["generator"], "anchor")
|
|
2765
2792
|
);
|
|
@@ -3338,6 +3365,9 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
3338
3365
|
if (this.match("LBRACE")) {
|
|
3339
3366
|
return this.parseObjectValue();
|
|
3340
3367
|
}
|
|
3368
|
+
if (_HoloCompositionParser.DOMAIN_TOKENS.has(this.current().type) || this.isKeywordAsIdentifierType(this.current().type)) {
|
|
3369
|
+
return this.advance().value;
|
|
3370
|
+
}
|
|
3341
3371
|
this.error(`Expected value, got ${this.current().type}`);
|
|
3342
3372
|
this.advance();
|
|
3343
3373
|
return null;
|
|
@@ -3573,7 +3603,7 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
3573
3603
|
if (this.check("RBRACE")) break;
|
|
3574
3604
|
if (this.check("AT")) {
|
|
3575
3605
|
this.advance();
|
|
3576
|
-
const name = this.
|
|
3606
|
+
const name = this.parseTraitName();
|
|
3577
3607
|
const config = this.parseOptionalTraitConfig();
|
|
3578
3608
|
traits.push({ type: "ObjectTrait", name, config });
|
|
3579
3609
|
} else if (this.check("IDENTIFIER")) {
|
|
@@ -3660,6 +3690,34 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
3660
3690
|
this.error(`Expected string, got ${current.type}`, suggestion);
|
|
3661
3691
|
return "";
|
|
3662
3692
|
}
|
|
3693
|
+
/**
|
|
3694
|
+
* Read a trait name after '@'. Trait names may start with a digit (e.g. @2d_canvas, a
|
|
3695
|
+
* registered Semantic2D trait), but the lexer cannot start an IDENTIFIER with a digit, so it
|
|
3696
|
+
* splits "2d_canvas" into NUMBER("2") + IDENTIFIER("d_canvas"). Reassemble those so the
|
|
3697
|
+
* canonical trait name parses in BOTH primitive and object bodies (the primitive body used to
|
|
3698
|
+
* error via expectIdentifier; the object body silently captured only "2", dropping the rest —
|
|
3699
|
+
* which also silently corrupted the shipped 2d-revolution template). Also accepts a quoted
|
|
3700
|
+
* name (@"2d_canvas") and keyword-as-identifier names.
|
|
3701
|
+
*/
|
|
3702
|
+
parseTraitName() {
|
|
3703
|
+
if (this.check("STRING")) {
|
|
3704
|
+
return this.advance().value;
|
|
3705
|
+
}
|
|
3706
|
+
if (this.check("NUMBER")) {
|
|
3707
|
+
let name = this.advance().value;
|
|
3708
|
+
if (this.check("IDENTIFIER")) {
|
|
3709
|
+
name += this.advance().value;
|
|
3710
|
+
}
|
|
3711
|
+
return name;
|
|
3712
|
+
}
|
|
3713
|
+
if (this.check("IDENTIFIER")) {
|
|
3714
|
+
return this.advance().value;
|
|
3715
|
+
}
|
|
3716
|
+
if (this.isKeywordAsIdentifierType(this.current().type)) {
|
|
3717
|
+
return this.advance().value;
|
|
3718
|
+
}
|
|
3719
|
+
return this.isAtEnd() ? "" : this.advance().value;
|
|
3720
|
+
}
|
|
3663
3721
|
expectIdentifier() {
|
|
3664
3722
|
if (this.check("IDENTIFIER")) {
|
|
3665
3723
|
return this.advance().value;
|
|
@@ -4445,6 +4503,117 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
4445
4503
|
this.popContext();
|
|
4446
4504
|
return sm;
|
|
4447
4505
|
}
|
|
4506
|
+
/**
|
|
4507
|
+
* Parse the body of an `@state_machine { ... }` decorator.
|
|
4508
|
+
*
|
|
4509
|
+
* Called after @ and state_machine tokens are already consumed — starts
|
|
4510
|
+
* at the opening LBRACE. Handles:
|
|
4511
|
+
* - `initial: "stateName"` / `initialState: "stateName"`
|
|
4512
|
+
* - `state "name" { on_entry { ... } on_exit { ... } transitions { ... } }`
|
|
4513
|
+
* - `state identifier { ... }` (unquoted state names)
|
|
4514
|
+
*
|
|
4515
|
+
* Stores the result in composition.stateMachines so compilers can read it.
|
|
4516
|
+
* Without this, @state_machine blocks were stored as opaque traits and
|
|
4517
|
+
* invisible to compile_to_a2a_agent_card and other compilers.
|
|
4518
|
+
*/
|
|
4519
|
+
parseStateMachineFromDecorator() {
|
|
4520
|
+
const startLoc = this.currentLocation();
|
|
4521
|
+
this.expect("LBRACE");
|
|
4522
|
+
this.skipNewlines();
|
|
4523
|
+
const sm = {
|
|
4524
|
+
type: "StateMachine",
|
|
4525
|
+
name: "implicit",
|
|
4526
|
+
initialState: "",
|
|
4527
|
+
states: {}
|
|
4528
|
+
};
|
|
4529
|
+
while (!this.check("RBRACE") && !this.isAtEnd()) {
|
|
4530
|
+
this.skipNewlines();
|
|
4531
|
+
if (this.check("RBRACE")) break;
|
|
4532
|
+
if (this.check("STATE")) {
|
|
4533
|
+
this.advance();
|
|
4534
|
+
const stateName = this.check("STRING") || this.check("IDENTIFIER") ? this.advance().value : "anonymous";
|
|
4535
|
+
if (!sm.initialState) sm.initialState = stateName;
|
|
4536
|
+
if (this.check("LBRACE")) {
|
|
4537
|
+
this.expect("LBRACE");
|
|
4538
|
+
this.skipNewlines();
|
|
4539
|
+
const state = {
|
|
4540
|
+
type: "State_Machine",
|
|
4541
|
+
name: stateName,
|
|
4542
|
+
actions: [],
|
|
4543
|
+
transitions: []
|
|
4544
|
+
};
|
|
4545
|
+
while (!this.check("RBRACE") && !this.isAtEnd()) {
|
|
4546
|
+
this.skipNewlines();
|
|
4547
|
+
if (this.check("RBRACE")) break;
|
|
4548
|
+
const key2 = this.expectIdentifier();
|
|
4549
|
+
if (this.check("COLON")) {
|
|
4550
|
+
this.advance();
|
|
4551
|
+
if (key2 === "enter" || key2 === "entry" || key2 === "on_entry") {
|
|
4552
|
+
this.expect("LBRACE");
|
|
4553
|
+
this.skipNewlines();
|
|
4554
|
+
state.entry = this.parseStatementBlock();
|
|
4555
|
+
this.expect("RBRACE");
|
|
4556
|
+
} else if (key2 === "exit" || key2 === "on_exit") {
|
|
4557
|
+
this.expect("LBRACE");
|
|
4558
|
+
this.skipNewlines();
|
|
4559
|
+
state.exit = this.parseStatementBlock();
|
|
4560
|
+
this.expect("RBRACE");
|
|
4561
|
+
} else if (key2 === "actions") {
|
|
4562
|
+
state.actions = this.parseBehaviorActions();
|
|
4563
|
+
} else if (key2 === "transitions") {
|
|
4564
|
+
state.transitions = this.parseStateTransitions();
|
|
4565
|
+
} else if (key2 === "timeout") {
|
|
4566
|
+
state.timeout = this.parseValue();
|
|
4567
|
+
} else {
|
|
4568
|
+
this.parseValue();
|
|
4569
|
+
}
|
|
4570
|
+
} else if (this.check("LBRACE")) {
|
|
4571
|
+
if (key2 === "enter" || key2 === "entry" || key2 === "on_entry") {
|
|
4572
|
+
this.expect("LBRACE");
|
|
4573
|
+
this.skipNewlines();
|
|
4574
|
+
state.entry = this.parseStatementBlock();
|
|
4575
|
+
this.expect("RBRACE");
|
|
4576
|
+
} else if (key2 === "exit" || key2 === "on_exit") {
|
|
4577
|
+
this.expect("LBRACE");
|
|
4578
|
+
this.skipNewlines();
|
|
4579
|
+
state.exit = this.parseStatementBlock();
|
|
4580
|
+
this.expect("RBRACE");
|
|
4581
|
+
} else if (key2 === "transitions") {
|
|
4582
|
+
state.transitions = this.parseStateTransitions();
|
|
4583
|
+
} else {
|
|
4584
|
+
this.skipBlock();
|
|
4585
|
+
}
|
|
4586
|
+
}
|
|
4587
|
+
this.skipNewlines();
|
|
4588
|
+
}
|
|
4589
|
+
this.expect("RBRACE");
|
|
4590
|
+
sm.states[stateName] = state;
|
|
4591
|
+
}
|
|
4592
|
+
this.skipNewlines();
|
|
4593
|
+
continue;
|
|
4594
|
+
}
|
|
4595
|
+
const key = this.expectIdentifier();
|
|
4596
|
+
if (key === "initial" || key === "initialState") {
|
|
4597
|
+
this.expect("COLON");
|
|
4598
|
+
sm.initialState = this.parseValue();
|
|
4599
|
+
} else if (key === "name") {
|
|
4600
|
+
this.expect("COLON");
|
|
4601
|
+
sm.name = this.parseValue();
|
|
4602
|
+
} else if (key === "states" && this.check("COLON")) {
|
|
4603
|
+
this.advance();
|
|
4604
|
+
sm.states = this.parseStateMachineStates();
|
|
4605
|
+
} else if (this.check("COLON")) {
|
|
4606
|
+
this.advance();
|
|
4607
|
+
this.parseValue();
|
|
4608
|
+
} else if (this.check("LBRACE")) {
|
|
4609
|
+
this.skipBlock();
|
|
4610
|
+
}
|
|
4611
|
+
this.skipNewlines();
|
|
4612
|
+
}
|
|
4613
|
+
this.expect("RBRACE");
|
|
4614
|
+
sm.loc = { start: startLoc, end: this.currentLocation() };
|
|
4615
|
+
return sm;
|
|
4616
|
+
}
|
|
4448
4617
|
parseStateMachineStates() {
|
|
4449
4618
|
this.expect("LBRACE");
|
|
4450
4619
|
this.skipNewlines();
|
|
@@ -5221,7 +5390,7 @@ var _HoloCompositionParser = class _HoloCompositionParser {
|
|
|
5221
5390
|
const pipelineSource = `pipeline "${name}" {
|
|
5222
5391
|
${bodyText}
|
|
5223
5392
|
}`;
|
|
5224
|
-
const pipelineResult =
|
|
5393
|
+
const pipelineResult = chunk3VBO3IYQ_cjs.parsePipeline(pipelineSource);
|
|
5225
5394
|
const properties = {};
|
|
5226
5395
|
if (pipelineResult.pipeline) {
|
|
5227
5396
|
const p = pipelineResult.pipeline;
|
|
@@ -5576,5 +5745,5 @@ exports.HoloCompositionParser = HoloCompositionParser;
|
|
|
5576
5745
|
exports.parseHolo = parseHolo;
|
|
5577
5746
|
exports.parseHoloPartial = parseHoloPartial;
|
|
5578
5747
|
exports.parseHoloStrict = parseHoloStrict;
|
|
5579
|
-
//# sourceMappingURL=chunk-
|
|
5580
|
-
//# sourceMappingURL=chunk-
|
|
5748
|
+
//# sourceMappingURL=chunk-4YNYPHH3.cjs.map
|
|
5749
|
+
//# sourceMappingURL=chunk-4YNYPHH3.cjs.map
|