solve-engine 1.2.0 → 2.0.0
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 +12 -17
- package/dist/{BytecodeBuilder-Bp9xeTmX.d.cts → BytecodeBuilder-DGGeByAP.d.cts} +18 -0
- package/dist/{BytecodeBuilder-Bp9xeTmX.d.ts → BytecodeBuilder-DGGeByAP.d.ts} +18 -0
- package/dist/{Configuration-C9W8tJv_.d.cts → Configuration-B6W0-T67.d.cts} +17 -4
- package/dist/{Configuration-C9W8tJv_.d.ts → Configuration-B6W0-T67.d.ts} +17 -4
- package/dist/{EngineError-CNA_rHY-.d.cts → EngineError-Ce1lPkjZ.d.cts} +2 -0
- package/dist/{EngineError-CNA_rHY-.d.ts → EngineError-Ce1lPkjZ.d.ts} +2 -0
- package/dist/{PackageCompatibility-B6NX9IaN.d.cts → PackageCompatibility-Bn5jnBtA.d.cts} +2 -2
- package/dist/{PackageCompatibility-Ceg5XdAp.d.ts → PackageCompatibility-CIvq2MP5.d.ts} +2 -2
- package/dist/{PackageRegistry-DrCPQNyy.d.ts → PackageRegistry-DzeiWcv4.d.ts} +93 -172
- package/dist/{PackageRegistry-DnJYVw9G.d.cts → PackageRegistry-dpdurBVO.d.cts} +93 -172
- package/dist/{Parselet-Bhf7d0_W.d.ts → Parselet-B-zoPrTa.d.ts} +8 -5
- package/dist/{Parselet-Cv7S7KRt.d.cts → Parselet-C4Wu055_.d.cts} +8 -5
- package/dist/{ScopeManager-Bzq87GfA.d.ts → ScopeManager-C2LDOrDx.d.ts} +7 -16
- package/dist/{ScopeManager-DRDBVfan.d.cts → ScopeManager-D7uMXbhS.d.cts} +7 -16
- package/dist/{VMCheckpoints-C6c17Hbo.d.ts → VMCheckpoints-CGyFhivM.d.ts} +3 -3
- package/dist/{VMCheckpoints-dZxSMGHG.d.cts → VMCheckpoints-I9jg3jWR.d.cts} +3 -3
- package/dist/{Value-DZNQ_PU7.d.cts → Value-CCi_Eecs.d.cts} +40 -0
- package/dist/{Value-DZNQ_PU7.d.ts → Value-CCi_Eecs.d.ts} +40 -0
- package/dist/{WorkerError-Djd7GGGa.d.cts → WorkerError-B4p6PNfx.d.cts} +1 -1
- package/dist/{WorkerError-B7t7R2-m.d.ts → WorkerError-Dhj9BQ_A.d.ts} +1 -1
- package/dist/chunk-2JMFUQZH.js +2 -0
- package/dist/chunk-2JMFUQZH.js.map +1 -0
- package/dist/chunk-2RWAXT6O.js +0 -1
- package/dist/chunk-4BZIYU7S.cjs +3 -0
- package/dist/chunk-4BZIYU7S.cjs.map +1 -0
- package/dist/chunk-4J7XZSZJ.cjs +5 -0
- package/dist/chunk-4J7XZSZJ.cjs.map +1 -0
- package/dist/chunk-4QVBSG6B.cjs +2 -0
- package/dist/chunk-4QVBSG6B.cjs.map +1 -0
- package/dist/chunk-5IJD5L3O.cjs +2 -0
- package/dist/chunk-5IJD5L3O.cjs.map +1 -0
- package/dist/chunk-62LMTO4F.js +2 -0
- package/dist/chunk-62LMTO4F.js.map +1 -0
- package/dist/chunk-6CY44ZPG.js +2 -0
- package/dist/chunk-6CY44ZPG.js.map +1 -0
- package/dist/chunk-6G3PMEPA.js +2 -0
- package/dist/chunk-6G3PMEPA.js.map +1 -0
- package/dist/chunk-6INX773F.cjs +2 -0
- package/dist/chunk-6INX773F.cjs.map +1 -0
- package/dist/chunk-6KFVG6UY.cjs +2 -0
- package/dist/{chunk-YJHY7CMN.cjs.map → chunk-6KFVG6UY.cjs.map} +1 -1
- package/dist/chunk-76F3LCIL.js +4 -0
- package/dist/chunk-76F3LCIL.js.map +1 -0
- package/dist/chunk-7GK3XEZF.js +2 -0
- package/dist/chunk-7GK3XEZF.js.map +1 -0
- package/dist/chunk-APN442VD.cjs +2 -0
- package/dist/chunk-APN442VD.cjs.map +1 -0
- package/dist/chunk-AXMQG5TS.cjs +2 -0
- package/dist/chunk-AXMQG5TS.cjs.map +1 -0
- package/dist/chunk-CIQOK7Q4.cjs +2 -0
- package/dist/chunk-CIQOK7Q4.cjs.map +1 -0
- package/dist/chunk-E6Z4NQAS.js +2 -0
- package/dist/chunk-E6Z4NQAS.js.map +1 -0
- package/dist/chunk-EFJCC6FJ.cjs +2 -0
- package/dist/chunk-EFJCC6FJ.cjs.map +1 -0
- package/dist/chunk-ESUN2THE.cjs +2 -0
- package/dist/chunk-ESUN2THE.cjs.map +1 -0
- package/dist/chunk-EVAOPEO4.js +2 -0
- package/dist/chunk-EVAOPEO4.js.map +1 -0
- package/dist/chunk-EYRBENHC.js +3 -0
- package/dist/chunk-EYRBENHC.js.map +1 -0
- package/dist/chunk-FDE5HWDI.cjs +2 -0
- package/dist/chunk-FDE5HWDI.cjs.map +1 -0
- package/dist/chunk-FWW3M36J.cjs +2 -0
- package/dist/chunk-FWW3M36J.cjs.map +1 -0
- package/dist/chunk-GOIQYUWV.js +2 -0
- package/dist/chunk-GOIQYUWV.js.map +1 -0
- package/dist/chunk-HFKDWQUL.js +2 -0
- package/dist/chunk-HFKDWQUL.js.map +1 -0
- package/dist/chunk-HLBYHXQD.cjs +3 -0
- package/dist/chunk-HLBYHXQD.cjs.map +1 -0
- package/dist/chunk-IANAMBJQ.cjs +2 -0
- package/dist/chunk-IANAMBJQ.cjs.map +1 -0
- package/dist/chunk-IJMNVBIS.js +2 -0
- package/dist/chunk-IJMNVBIS.js.map +1 -0
- package/dist/chunk-J4LZD4ZY.js +3 -0
- package/dist/chunk-J4LZD4ZY.js.map +1 -0
- package/dist/chunk-JAK3RAFA.cjs +2 -0
- package/dist/chunk-JAK3RAFA.cjs.map +1 -0
- package/dist/chunk-JFAJN3C2.cjs +2 -0
- package/dist/chunk-JFAJN3C2.cjs.map +1 -0
- package/dist/chunk-JPFCXLJV.js +2 -0
- package/dist/chunk-JPFCXLJV.js.map +1 -0
- package/dist/chunk-JSPKKNPQ.js +3 -0
- package/dist/chunk-JSPKKNPQ.js.map +1 -0
- package/dist/chunk-L3FPQSGN.js +2 -0
- package/dist/chunk-L3FPQSGN.js.map +1 -0
- package/dist/chunk-LR4E4A4W.cjs +2 -0
- package/dist/chunk-LR4E4A4W.cjs.map +1 -0
- package/dist/chunk-MIQBJGGR.js +2 -0
- package/dist/chunk-MIQBJGGR.js.map +1 -0
- package/dist/chunk-MPB7KUN5.js +3 -0
- package/dist/chunk-MPB7KUN5.js.map +1 -0
- package/dist/chunk-MSYX32PF.cjs +2 -0
- package/dist/chunk-MSYX32PF.cjs.map +1 -0
- package/dist/chunk-MVZUTETT.js +2 -0
- package/dist/chunk-MVZUTETT.js.map +1 -0
- package/dist/chunk-N7N7MPMK.cjs +2 -0
- package/dist/chunk-N7N7MPMK.cjs.map +1 -0
- package/dist/chunk-NGBBNL4K.cjs +1 -3
- package/dist/chunk-P6WPEUAJ.cjs +2 -0
- package/dist/chunk-P6WPEUAJ.cjs.map +1 -0
- package/dist/chunk-PS272DZJ.cjs +2 -0
- package/dist/chunk-PS272DZJ.cjs.map +1 -0
- package/dist/chunk-QXQE7X4S.js +2 -0
- package/dist/chunk-QXQE7X4S.js.map +1 -0
- package/dist/chunk-R2ENWQ76.js +2 -0
- package/dist/chunk-R2ENWQ76.js.map +1 -0
- package/dist/chunk-R2SZFJTT.cjs +2 -0
- package/dist/chunk-R2SZFJTT.cjs.map +1 -0
- package/dist/chunk-RAF57WYO.js +2 -0
- package/dist/chunk-RAF57WYO.js.map +1 -0
- package/dist/chunk-RSF25YSJ.js +2 -0
- package/dist/chunk-RSF25YSJ.js.map +1 -0
- package/dist/chunk-SOMGSIO4.cjs +3 -0
- package/dist/chunk-SOMGSIO4.cjs.map +1 -0
- package/dist/chunk-SUXRZWH2.cjs +3 -0
- package/dist/chunk-SUXRZWH2.cjs.map +1 -0
- package/dist/chunk-SYYE3QAX.cjs +2 -0
- package/dist/chunk-SYYE3QAX.cjs.map +1 -0
- package/dist/chunk-SZGK6RIP.cjs +2 -0
- package/dist/chunk-SZGK6RIP.cjs.map +1 -0
- package/dist/chunk-TCZSPH4A.js +2 -0
- package/dist/chunk-TCZSPH4A.js.map +1 -0
- package/dist/chunk-TLG7VZRX.cjs +2 -0
- package/dist/chunk-TLG7VZRX.cjs.map +1 -0
- package/dist/chunk-TRBXW6HW.js +2 -0
- package/dist/{chunk-AQNHHJMJ.cjs.map → chunk-TRBXW6HW.js.map} +1 -1
- package/dist/chunk-TTFO4YDP.cjs +2 -0
- package/dist/chunk-TTFO4YDP.cjs.map +1 -0
- package/dist/chunk-TWC7K3ZX.js +2 -0
- package/dist/chunk-TWC7K3ZX.js.map +1 -0
- package/dist/chunk-UDQ57ZRX.cjs +2 -0
- package/dist/chunk-UDQ57ZRX.cjs.map +1 -0
- package/dist/chunk-UI6IFGBT.js +2 -0
- package/dist/chunk-UI6IFGBT.js.map +1 -0
- package/dist/chunk-UURM7P3P.cjs +4 -0
- package/dist/chunk-UURM7P3P.cjs.map +1 -0
- package/dist/chunk-W2JAR233.js +2 -0
- package/dist/chunk-W2JAR233.js.map +1 -0
- package/dist/chunk-WGZ3FNHI.js +2 -0
- package/dist/chunk-WGZ3FNHI.js.map +1 -0
- package/dist/chunk-WN5CMP4T.cjs +3 -0
- package/dist/chunk-WN5CMP4T.cjs.map +1 -0
- package/dist/chunk-XEIDV5JP.js +2 -0
- package/dist/chunk-XEIDV5JP.js.map +1 -0
- package/dist/chunk-XNIWQHXY.js +2 -0
- package/dist/chunk-XNIWQHXY.js.map +1 -0
- package/dist/chunk-XR7HEC7B.js +5 -0
- package/dist/chunk-XR7HEC7B.js.map +1 -0
- package/dist/chunk-Y7O4D3BJ.cjs +2 -0
- package/dist/chunk-Y7O4D3BJ.cjs.map +1 -0
- package/dist/chunk-YAYBVVG2.js +3 -0
- package/dist/chunk-YAYBVVG2.js.map +1 -0
- package/dist/chunk-YJ2OPULK.js +2 -0
- package/dist/chunk-YJ2OPULK.js.map +1 -0
- package/dist/chunk-YVKHEAFT.js +2 -0
- package/dist/chunk-YVKHEAFT.js.map +1 -0
- package/dist/chunk-ZCNBT44X.cjs +2 -0
- package/dist/chunk-ZCNBT44X.cjs.map +1 -0
- package/dist/chunk-ZLRJ7TDP.cjs +2 -0
- package/dist/chunk-ZLRJ7TDP.cjs.map +1 -0
- package/dist/constants.cjs +1 -21
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -4
- package/dist/engine.cjs +1 -94
- package/dist/engine.d.cts +10 -11
- package/dist/engine.d.ts +10 -11
- package/dist/engine.js +1 -37
- package/dist/errors.cjs +1 -105
- package/dist/errors.d.cts +3 -3
- package/dist/errors.d.ts +3 -3
- package/dist/errors.js +1 -4
- package/dist/format.cjs +1 -26
- package/dist/format.d.cts +2 -2
- package/dist/format.d.ts +2 -2
- package/dist/format.js +1 -9
- package/dist/index.cjs +1 -314
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -20
- package/dist/index.d.ts +52 -20
- package/dist/index.js +1 -278
- package/dist/index.js.map +1 -1
- package/dist/language.cjs +1 -369
- package/dist/language.cjs.map +1 -1
- package/dist/language.d.cts +9 -10
- package/dist/language.d.ts +9 -10
- package/dist/language.js +1 -348
- package/dist/language.js.map +1 -1
- package/dist/lexer.cjs +1 -63
- package/dist/lexer.js +1 -10
- package/dist/normalizer.cjs +1 -39
- package/dist/normalizer.js +1 -10
- package/dist/packages.cjs +1 -132
- package/dist/packages.d.cts +8 -9
- package/dist/packages.d.ts +8 -9
- package/dist/packages.js +1 -23
- package/dist/parser.cjs +1 -54
- package/dist/parser.d.cts +8 -8
- package/dist/parser.d.ts +8 -8
- package/dist/parser.js +1 -9
- package/dist/{pipeline-D-PS9gVw.d.ts → pipeline-72QmQlGx.d.ts} +1 -1
- package/dist/{pipeline-DtSBJ8TS.d.cts → pipeline-DCQicwWX.d.cts} +1 -1
- package/dist/resolvers.cjs +1 -12
- package/dist/resolvers.d.cts +2 -2
- package/dist/resolvers.d.ts +2 -2
- package/dist/resolvers.js +1 -3
- package/dist/services.cjs +1 -20
- package/dist/services.js +1 -3
- package/dist/testing.cjs +3 -477
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +9 -10
- package/dist/testing.d.ts +9 -10
- package/dist/testing.js +3 -469
- package/dist/testing.js.map +1 -1
- package/dist/uom.cjs +1 -55
- package/dist/uom.d.cts +2 -2
- package/dist/uom.d.ts +2 -2
- package/dist/uom.js +1 -10
- package/dist/utilities.cjs +1 -36
- package/dist/utilities.js +1 -7
- package/dist/vm.cjs +1 -295
- package/dist/vm.cjs.map +1 -1
- package/dist/vm.d.cts +22 -10
- package/dist/vm.d.ts +22 -10
- package/dist/vm.js +1 -193
- package/dist/vm.js.map +1 -1
- package/dist/worker.cjs +2 -492
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.d.cts +16 -17
- package/dist/worker.d.ts +16 -17
- package/dist/worker.js +2 -483
- package/dist/worker.js.map +1 -1
- package/package.json +1 -13
- package/dist/chunk-3BOK2LDK.js +0 -17
- package/dist/chunk-3BOK2LDK.js.map +0 -1
- package/dist/chunk-3VGDNEE3.js +0 -84
- package/dist/chunk-3VGDNEE3.js.map +0 -1
- package/dist/chunk-4K5W7EH2.cjs +0 -112
- package/dist/chunk-4K5W7EH2.cjs.map +0 -1
- package/dist/chunk-5EFKSKMA.js +0 -413
- package/dist/chunk-5EFKSKMA.js.map +0 -1
- package/dist/chunk-5HRB36DK.js +0 -405
- package/dist/chunk-5HRB36DK.js.map +0 -1
- package/dist/chunk-5ON7PUAZ.js +0 -12
- package/dist/chunk-5ON7PUAZ.js.map +0 -1
- package/dist/chunk-7AXJNQMF.cjs +0 -297
- package/dist/chunk-7AXJNQMF.cjs.map +0 -1
- package/dist/chunk-7JM3F4KL.js +0 -1795
- package/dist/chunk-7JM3F4KL.js.map +0 -1
- package/dist/chunk-7USV76HV.cjs +0 -341
- package/dist/chunk-7USV76HV.cjs.map +0 -1
- package/dist/chunk-A2DZ5BEJ.cjs +0 -1930
- package/dist/chunk-A2DZ5BEJ.cjs.map +0 -1
- package/dist/chunk-ADBA3XBE.cjs +0 -20
- package/dist/chunk-ADBA3XBE.cjs.map +0 -1
- package/dist/chunk-AKNGX4TZ.cjs +0 -236
- package/dist/chunk-AKNGX4TZ.cjs.map +0 -1
- package/dist/chunk-ALYRJ72W.cjs +0 -434
- package/dist/chunk-ALYRJ72W.cjs.map +0 -1
- package/dist/chunk-AMOJYLG2.cjs +0 -1692
- package/dist/chunk-AMOJYLG2.cjs.map +0 -1
- package/dist/chunk-AOH6UR2L.js +0 -825
- package/dist/chunk-AOH6UR2L.js.map +0 -1
- package/dist/chunk-AQNHHJMJ.cjs +0 -261
- package/dist/chunk-B7LXJ6LC.cjs +0 -36
- package/dist/chunk-B7LXJ6LC.cjs.map +0 -1
- package/dist/chunk-BESTLPRK.cjs +0 -6919
- package/dist/chunk-BESTLPRK.cjs.map +0 -1
- package/dist/chunk-BLI4NIQY.js +0 -98
- package/dist/chunk-BLI4NIQY.js.map +0 -1
- package/dist/chunk-BSPXMGIS.js +0 -455
- package/dist/chunk-BSPXMGIS.js.map +0 -1
- package/dist/chunk-C2OMO3WN.cjs +0 -2806
- package/dist/chunk-C2OMO3WN.cjs.map +0 -1
- package/dist/chunk-CSDQMDU2.js +0 -204
- package/dist/chunk-CSDQMDU2.js.map +0 -1
- package/dist/chunk-EJ3ILXX6.cjs +0 -223
- package/dist/chunk-EJ3ILXX6.cjs.map +0 -1
- package/dist/chunk-ENRIK36Q.cjs +0 -94
- package/dist/chunk-ENRIK36Q.cjs.map +0 -1
- package/dist/chunk-F4UB4XIL.js +0 -109
- package/dist/chunk-F4UB4XIL.js.map +0 -1
- package/dist/chunk-FD5ZZHEU.js +0 -92
- package/dist/chunk-FD5ZZHEU.js.map +0 -1
- package/dist/chunk-FE4RC37D.js +0 -2801
- package/dist/chunk-FE4RC37D.js.map +0 -1
- package/dist/chunk-FEAIOR7N.cjs +0 -91
- package/dist/chunk-FEAIOR7N.cjs.map +0 -1
- package/dist/chunk-FR7RNOPT.cjs +0 -3303
- package/dist/chunk-FR7RNOPT.cjs.map +0 -1
- package/dist/chunk-G2YPPLGX.cjs +0 -484
- package/dist/chunk-G2YPPLGX.cjs.map +0 -1
- package/dist/chunk-GCM5JHMX.js +0 -88
- package/dist/chunk-GCM5JHMX.js.map +0 -1
- package/dist/chunk-GDEU72RG.cjs +0 -829
- package/dist/chunk-GDEU72RG.cjs.map +0 -1
- package/dist/chunk-HKTQCQ4Z.cjs +0 -8383
- package/dist/chunk-HKTQCQ4Z.cjs.map +0 -1
- package/dist/chunk-HWHU642X.cjs +0 -316
- package/dist/chunk-HWHU642X.cjs.map +0 -1
- package/dist/chunk-ICEKS6YC.cjs +0 -507
- package/dist/chunk-ICEKS6YC.cjs.map +0 -1
- package/dist/chunk-IJGOFP2J.js +0 -6904
- package/dist/chunk-IJGOFP2J.js.map +0 -1
- package/dist/chunk-IQJGDZOP.js +0 -333
- package/dist/chunk-IQJGDZOP.js.map +0 -1
- package/dist/chunk-IT74O4BE.cjs +0 -456
- package/dist/chunk-IT74O4BE.cjs.map +0 -1
- package/dist/chunk-KXDQKVNX.cjs +0 -459
- package/dist/chunk-KXDQKVNX.cjs.map +0 -1
- package/dist/chunk-L2TE7PMO.cjs +0 -14
- package/dist/chunk-L2TE7PMO.cjs.map +0 -1
- package/dist/chunk-L5YHV6BQ.js +0 -499
- package/dist/chunk-L5YHV6BQ.js.map +0 -1
- package/dist/chunk-LO7HU5WB.cjs +0 -209
- package/dist/chunk-LO7HU5WB.cjs.map +0 -1
- package/dist/chunk-LSALB3IN.js +0 -292
- package/dist/chunk-LSALB3IN.js.map +0 -1
- package/dist/chunk-MI7OTUHL.cjs +0 -339
- package/dist/chunk-MI7OTUHL.cjs.map +0 -1
- package/dist/chunk-MIGXCBXT.cjs +0 -381
- package/dist/chunk-MIGXCBXT.cjs.map +0 -1
- package/dist/chunk-MVTOCRV2.js +0 -213
- package/dist/chunk-MVTOCRV2.js.map +0 -1
- package/dist/chunk-N7FNVFXW.cjs +0 -32
- package/dist/chunk-N7FNVFXW.cjs.map +0 -1
- package/dist/chunk-N7OA4WPJ.js +0 -362
- package/dist/chunk-N7OA4WPJ.js.map +0 -1
- package/dist/chunk-NAWZATKT.js +0 -478
- package/dist/chunk-NAWZATKT.js.map +0 -1
- package/dist/chunk-NLNDMWZC.js +0 -31
- package/dist/chunk-NLNDMWZC.js.map +0 -1
- package/dist/chunk-ORM7CHYZ.js +0 -1531
- package/dist/chunk-ORM7CHYZ.js.map +0 -1
- package/dist/chunk-OUHT5Z36.cjs +0 -393
- package/dist/chunk-OUHT5Z36.cjs.map +0 -1
- package/dist/chunk-PCZVMMWU.cjs +0 -74
- package/dist/chunk-PCZVMMWU.cjs.map +0 -1
- package/dist/chunk-RNKDIXDV.js +0 -336
- package/dist/chunk-RNKDIXDV.js.map +0 -1
- package/dist/chunk-SBUFNJVE.js +0 -258
- package/dist/chunk-SBUFNJVE.js.map +0 -1
- package/dist/chunk-TC6BTUSU.cjs +0 -1799
- package/dist/chunk-TC6BTUSU.cjs.map +0 -1
- package/dist/chunk-TPOK3UNI.js +0 -8355
- package/dist/chunk-TPOK3UNI.js.map +0 -1
- package/dist/chunk-UF6JG5SG.js +0 -312
- package/dist/chunk-UF6JG5SG.js.map +0 -1
- package/dist/chunk-UKQHXPGW.js +0 -30
- package/dist/chunk-UKQHXPGW.js.map +0 -1
- package/dist/chunk-V4XG5QF6.js +0 -1685
- package/dist/chunk-V4XG5QF6.js.map +0 -1
- package/dist/chunk-VEKIWQ3F.cjs +0 -39
- package/dist/chunk-VEKIWQ3F.cjs.map +0 -1
- package/dist/chunk-WMQRJTAO.js +0 -3266
- package/dist/chunk-WMQRJTAO.js.map +0 -1
- package/dist/chunk-X6K3HUOY.cjs +0 -86
- package/dist/chunk-X6K3HUOY.cjs.map +0 -1
- package/dist/chunk-XBTEO4OB.js +0 -391
- package/dist/chunk-XBTEO4OB.js.map +0 -1
- package/dist/chunk-XIYYHA65.cjs +0 -101
- package/dist/chunk-XIYYHA65.cjs.map +0 -1
- package/dist/chunk-YJHY7CMN.cjs +0 -1534
- package/dist/chunk-YLJ4XMA6.js +0 -33
- package/dist/chunk-YLJ4XMA6.js.map +0 -1
- package/dist/chunk-YNIWOYW6.js +0 -232
- package/dist/chunk-YNIWOYW6.js.map +0 -1
- package/dist/chunk-Z2XP767T.cjs +0 -35
- package/dist/chunk-Z2XP767T.cjs.map +0 -1
- package/dist/chunk-Z4X2RWOF.js +0 -37
- package/dist/chunk-Z4X2RWOF.js.map +0 -1
- package/dist/chunk-ZN6YYPIW.js +0 -67
- package/dist/chunk-ZN6YYPIW.js.map +0 -1
- package/dist/chunk-ZNFFTYWH.js +0 -1854
- package/dist/chunk-ZNFFTYWH.js.map +0 -1
- package/dist/variables.cjs +0 -17
- package/dist/variables.cjs.map +0 -1
- package/dist/variables.d.cts +0 -87
- package/dist/variables.d.ts +0 -87
- package/dist/variables.js +0 -4
- package/dist/variables.js.map +0 -1
package/dist/chunk-NAWZATKT.js
DELETED
|
@@ -1,478 +0,0 @@
|
|
|
1
|
-
// src/lexer/Token.ts
|
|
2
|
-
var TokenTypes = {
|
|
3
|
-
NUMBER: "NUMBER",
|
|
4
|
-
BIGINT: "BIGINT",
|
|
5
|
-
STRING: "STRING",
|
|
6
|
-
IDENT: "IDENT",
|
|
7
|
-
PLUS: "PLUS",
|
|
8
|
-
MINUS: "MINUS",
|
|
9
|
-
// Compound assignment for running totals: `total += 100`, `total -= 40`.
|
|
10
|
-
// Handled by the engine's compound-assignment interception, not a parselet.
|
|
11
|
-
PLUS_EQUALS: "PLUS_EQUALS",
|
|
12
|
-
MINUS_EQUALS: "MINUS_EQUALS",
|
|
13
|
-
STAR: "STAR",
|
|
14
|
-
SLASH: "SLASH",
|
|
15
|
-
// The uncertainty operator, `±` (U+00B1) or the ASCII `+/-`. The symbol is
|
|
16
|
-
// lexed directly (ExpressionLexer.ts, alongside `×`/`÷`), and the ASCII
|
|
17
|
-
// spelling is fused from PLUS SLASH MINUS by a normalizer rule (see
|
|
18
|
-
// packages/uncertainty/). Registered here rather than left to be lazily
|
|
19
|
-
// minted so its id is stable, the same reasoning as the algebra verbs below.
|
|
20
|
-
PLUS_MINUS: "PLUS_MINUS",
|
|
21
|
-
CARET: "CARET",
|
|
22
|
-
PERCENT: "PERCENT",
|
|
23
|
-
LSHIFT: "LSHIFT",
|
|
24
|
-
RSHIFT: "RSHIFT",
|
|
25
|
-
URSHIFT: "URSHIFT",
|
|
26
|
-
LPAREN: "LPAREN",
|
|
27
|
-
RPAREN: "RPAREN",
|
|
28
|
-
LBRACKET: "LBRACKET",
|
|
29
|
-
RBRACKET: "RBRACKET",
|
|
30
|
-
LBRACE: "LBRACE",
|
|
31
|
-
RBRACE: "RBRACE",
|
|
32
|
-
COMMA: "COMMA",
|
|
33
|
-
DOT: "DOT",
|
|
34
|
-
COLON: "COLON",
|
|
35
|
-
SEMICOLON: "SEMICOLON",
|
|
36
|
-
EQUALS: "EQUALS",
|
|
37
|
-
DOLLAR: "DOLLAR",
|
|
38
|
-
POUND: "POUND",
|
|
39
|
-
EURO: "EURO",
|
|
40
|
-
YEN: "YEN",
|
|
41
|
-
RUBLE: "RUBLE",
|
|
42
|
-
WON: "WON",
|
|
43
|
-
QUESTION: "QUESTION",
|
|
44
|
-
BANG: "BANG",
|
|
45
|
-
BIT_AND: "BIT_AND",
|
|
46
|
-
BIT_OR: "BIT_OR",
|
|
47
|
-
BIT_NOT: "BIT_NOT",
|
|
48
|
-
KEYWORD: "KEYWORD",
|
|
49
|
-
EOF: "EOF",
|
|
50
|
-
ERROR: "ERROR",
|
|
51
|
-
WS: "WS",
|
|
52
|
-
NEWLINE: "NEWLINE",
|
|
53
|
-
DATETIME_LITERAL: "DATETIME_LITERAL",
|
|
54
|
-
DURATION: "DURATION",
|
|
55
|
-
UNIT: "UNIT",
|
|
56
|
-
ROLL: "ROLL",
|
|
57
|
-
PI: "PI",
|
|
58
|
-
E: "E",
|
|
59
|
-
MOD: "MOD",
|
|
60
|
-
// The English word "and", which is NOT the same thing as "+" even though it
|
|
61
|
-
// adds. It used to map straight onto PLUS in the locale keyword map, which
|
|
62
|
-
// made "3 and 4" evaluate to 7 correctly and then quietly broke every phrase
|
|
63
|
-
// that uses "and" as a list separator: "average of 36, 42, 19 and 81" parsed
|
|
64
|
-
// its last argument as "19 + 81" and returned 178/3 rather than 178/4.
|
|
65
|
-
//
|
|
66
|
-
// Giving it its own type lets a parselet tell the two apart. It is still an
|
|
67
|
-
// infix addition (see ArithmeticPackage.ts) so "3 and 4" is unchanged, but it
|
|
68
|
-
// binds at BindingPower.Conjunction, looser than both Sum and Conditional, so
|
|
69
|
-
// a phrase parselet can parse an argument at Conjunction and get "1 + 2"
|
|
70
|
-
// whole while still stopping at "and", and so "5 > 3 and 2 > 1" reads as the
|
|
71
|
-
// conjunction of two comparisons rather than "5 > (3 and 2) > 1".
|
|
72
|
-
AND_CONJ: "AND_CONJ",
|
|
73
|
-
OF: "OF",
|
|
74
|
-
INCREASE_BY: "INCREASE_BY",
|
|
75
|
-
DECREASE_BY: "DECREASE_BY",
|
|
76
|
-
// Percentage solve-for-unknown (packages/percentage/), "N% of what is
|
|
77
|
-
// X" solves N% * base = X for base. Fused as a full 3-word phrase (see
|
|
78
|
-
// PercentagePackage.ts's `phrases` field) rather than a bare "what"
|
|
79
|
-
// keyword, "what" is common enough as a variable name to be worth the
|
|
80
|
-
// same phrase-fusion treatment this codebase gives "total"/"average"/etc.
|
|
81
|
-
OF_WHAT_IS: "OF_WHAT_IS",
|
|
82
|
-
// Sibling solve-for-unknown forms accounting for a +/-1 offset, "N% on
|
|
83
|
-
// what is X" (increase) / "N% off what is X" (decrease). Same
|
|
84
|
-
// phrase-fusion reasoning as OF_WHAT_IS above.
|
|
85
|
-
ON_WHAT_IS: "ON_WHAT_IS",
|
|
86
|
-
OFF_WHAT_IS: "OFF_WHAT_IS",
|
|
87
|
-
NOW: "NOW",
|
|
88
|
-
TODAY: "TODAY",
|
|
89
|
-
TOMORROW: "TOMORROW",
|
|
90
|
-
YESTERDAY: "YESTERDAY",
|
|
91
|
-
DURATION_DAY: "DURATION_DAY",
|
|
92
|
-
DURATION_WEEK: "DURATION_WEEK",
|
|
93
|
-
DURATION_MONTH: "DURATION_MONTH",
|
|
94
|
-
DURATION_YEAR: "DURATION_YEAR",
|
|
95
|
-
DURATION_HOUR: "DURATION_HOUR",
|
|
96
|
-
DURATION_MINUTE: "DURATION_MINUTE",
|
|
97
|
-
DURATION_SECOND: "DURATION_SECOND",
|
|
98
|
-
FUNC: "FUNC",
|
|
99
|
-
CONVERT: "CONVERT",
|
|
100
|
-
TO: "TO",
|
|
101
|
-
BEST: "BEST",
|
|
102
|
-
NEXT: "NEXT",
|
|
103
|
-
LAST: "LAST",
|
|
104
|
-
UNTIL: "UNTIL",
|
|
105
|
-
SINCE: "SINCE",
|
|
106
|
-
BETWEEN: "BETWEEN",
|
|
107
|
-
// Bill split (finance package). Retyped from the ordinary words "split",
|
|
108
|
-
// "ways" and "people" by BillSplitNormalizerRule, but only inside the full
|
|
109
|
-
// split shape, so those words stay usable as variable names and prose
|
|
110
|
-
// everywhere else (the same contextual-claim discipline as the recurring
|
|
111
|
-
// schedule and at-rate rules).
|
|
112
|
-
// The verb-first `split <amount> between N` form (prefix).
|
|
113
|
-
SPLIT: "SPLIT",
|
|
114
|
-
// The amount-first `<amount> split N ways` form (infix). A separate,
|
|
115
|
-
// infix-only token so implicit multiplication does not read it as the start
|
|
116
|
-
// of a new value and insert a `*` before it, which the dual-role SPLIT would.
|
|
117
|
-
SPLIT_WAYS: "SPLIT_WAYS",
|
|
118
|
-
WAYS: "WAYS",
|
|
119
|
-
PEOPLE: "PEOPLE",
|
|
120
|
-
FROM: "FROM",
|
|
121
|
-
INCREASE: "INCREASE",
|
|
122
|
-
DECREASE: "DECREASE",
|
|
123
|
-
UNICODE_MATH: "UNICODE_MATH",
|
|
124
|
-
TIMES_BY: "TIMES_BY",
|
|
125
|
-
MULTIPLY_BY: "MULTIPLY_BY",
|
|
126
|
-
DIVIDE_BY: "DIVIDE_BY",
|
|
127
|
-
NEQ: "NEQ",
|
|
128
|
-
IN: "IN",
|
|
129
|
-
BIT_XOR: "BIT_XOR",
|
|
130
|
-
EQUALITY: "EQUALITY",
|
|
131
|
-
GTE: "GTE",
|
|
132
|
-
LTE: "LTE",
|
|
133
|
-
LT: "LT",
|
|
134
|
-
GT: "GT",
|
|
135
|
-
LOGICAL_AND: "LOGICAL_AND",
|
|
136
|
-
LOGICAL_OR: "LOGICAL_OR",
|
|
137
|
-
OR: "OR",
|
|
138
|
-
TRUE: "TRUE",
|
|
139
|
-
FALSE: "FALSE",
|
|
140
|
-
IF: "IF",
|
|
141
|
-
THEN: "THEN",
|
|
142
|
-
ELSE: "ELSE",
|
|
143
|
-
AS: "AS",
|
|
144
|
-
CONVERTER_NAME: "CONVERTER_NAME",
|
|
145
|
-
// Rounding (packages/converters/). "rounded" is a bare keyword: it is a
|
|
146
|
-
// past participle with no plausible use as a :variableName, the same
|
|
147
|
-
// accepted-risk category as "between"/"from". TO_NEAREST and
|
|
148
|
-
// DECIMAL_PLACES are fused, since "to" already means percentage change.
|
|
149
|
-
ROUNDED: "ROUNDED",
|
|
150
|
-
TO_NEAREST: "TO_NEAREST",
|
|
151
|
-
DECIMAL_PLACES: "DECIMAL_PLACES",
|
|
152
|
-
// Fused two-word phrase tokens (see MathPhrasesPackage.ts's `phrases`
|
|
153
|
-
// field), deliberately NOT bare single-word keywords: "average"
|
|
154
|
-
// "total", "count", etc. are common variable names, and this codebase
|
|
155
|
-
// has a tested policy that colon-prefixed variable names can't be
|
|
156
|
-
// keyword-shaped words (see VariableParselet.ts's doc comment). Fusing
|
|
157
|
-
// the full "<word> of"/"<word> between" phrase means the bare word
|
|
158
|
-
// itself never becomes its own token type, so ":total = ..." keeps
|
|
159
|
-
// working exactly as before.
|
|
160
|
-
AVERAGE_OF: "AVERAGE_OF",
|
|
161
|
-
MEDIAN_OF: "MEDIAN_OF",
|
|
162
|
-
TOTAL_OF: "TOTAL_OF",
|
|
163
|
-
COUNT_OF: "COUNT_OF",
|
|
164
|
-
LARGER_OF: "LARGER_OF",
|
|
165
|
-
SMALLER_OF: "SMALLER_OF",
|
|
166
|
-
HALF_OF: "HALF_OF",
|
|
167
|
-
MIDPOINT_BETWEEN: "MIDPOINT_BETWEEN",
|
|
168
|
-
REMAINDER_OF: "REMAINDER_OF",
|
|
169
|
-
NTH_ROOT: "NTH_ROOT",
|
|
170
|
-
LOG_PHRASE: "LOG_PHRASE",
|
|
171
|
-
LOG_BASE: "LOG_BASE",
|
|
172
|
-
GCD_OF: "GCD_OF",
|
|
173
|
-
LCM_OF: "LCM_OF",
|
|
174
|
-
SQUARE_ROOT_OF: "SQUARE_ROOT_OF",
|
|
175
|
-
CUBE_ROOT_OF: "CUBE_ROOT_OF",
|
|
176
|
-
RANDOM_NUMBER: "RANDOM_NUMBER",
|
|
177
|
-
IS_TO: "IS_TO",
|
|
178
|
-
// Bare "is", the trigger for the solve-for-the-unknown percentage family
|
|
179
|
-
// (packages/percentage/IsWhatParselet.ts). Safe as a bare keyword: it is a
|
|
180
|
-
// verb, not a plausible :variableName, and the "is to" proportion phrase is
|
|
181
|
-
// fused earlier so it still wins.
|
|
182
|
-
IS: "IS",
|
|
183
|
-
PCT_ON: "PCT_ON",
|
|
184
|
-
PCT_OFF: "PCT_OFF",
|
|
185
|
-
// Successive percentage change (packages/percentage/UpDownParselet.ts):
|
|
186
|
-
// `X up N%` grows, `X down N%` shrinks, chainable with `then` and
|
|
187
|
-
// repeatable with `N times`. Retyped from a bare `up`/`down` IDENT only
|
|
188
|
-
// when a percentage immediately follows (PercentUpDownNormalizerRule), so
|
|
189
|
-
// prose that merely mentions the words is untouched. Declared here rather
|
|
190
|
-
// than minted lazily for the same reason as the algebra verbs below: a
|
|
191
|
-
// normalizer rule and its parselet must agree on the id.
|
|
192
|
-
PCT_UP: "PCT_UP",
|
|
193
|
-
PCT_DOWN: "PCT_DOWN",
|
|
194
|
-
OF_WHAT: "OF_WHAT",
|
|
195
|
-
OFF_WHAT: "OFF_WHAT",
|
|
196
|
-
ON_WHAT: "ON_WHAT",
|
|
197
|
-
// CLAMP stays a bare single-word keyword: "clamp X between Y and Z" has
|
|
198
|
-
// the value X between the trigger and "between", so it can't be
|
|
199
|
-
// phrase-fused like the others above (same structural reason
|
|
200
|
-
// ClampParselet.ts is hand-written instead of PhrasePattern-based).
|
|
201
|
-
// Matches this codebase's existing accepted risk for "between"/"from"/
|
|
202
|
-
// "next"/"last"/"best", also bare, also can't be used as `:name`.
|
|
203
|
-
CLAMP: "CLAMP",
|
|
204
|
-
// map/reduce/sum/prod (packages/mapreduce/), bare single-word keywords
|
|
205
|
-
// each with its own dedicated parselet (custom argument grammar: a bare
|
|
206
|
-
// builtin/user-function name, an inline transform expression, or
|
|
207
|
-
// `name=collection` zipped pairs, none of which fit the ordinary
|
|
208
|
-
// FunctionCallParselet path, so these can't just reuse the generic FUNC
|
|
209
|
-
// token type the way sqrt/abs/... do).
|
|
210
|
-
MAP: "MAP",
|
|
211
|
-
REDUCE: "REDUCE",
|
|
212
|
-
SUM_FN: "SUM_FN",
|
|
213
|
-
PROD_FN: "PROD_FN",
|
|
214
|
-
// The algebra verbs (packages/symbolic/), fused from an ordinary IDENT only
|
|
215
|
-
// when immediately followed by `(`, so `factor`/`solve`/`expand` stay usable
|
|
216
|
-
// as variable names. Declared here rather than left to be minted on first use
|
|
217
|
-
// by `tokenTypeId()`, which is what {@link registerAllTokenTypes} exists for:
|
|
218
|
-
// a lazily-minted id depends on what else happened to be minted before it, so
|
|
219
|
-
// in a single-process run the id a normalizer rule produces can stop matching
|
|
220
|
-
// the id the parselet was registered under. Every token type a built-in
|
|
221
|
-
// package relies on belongs in this table.
|
|
222
|
-
EXPAND_FN: "EXPAND_FN",
|
|
223
|
-
FACTOR_FN: "FACTOR_FN",
|
|
224
|
-
SOLVE_FN: "SOLVE_FN",
|
|
225
|
-
DER_FN: "DER_FN",
|
|
226
|
-
INTEGRAL_FN: "INTEGRAL_FN",
|
|
227
|
-
TAYLOR_FN: "TAYLOR_FN",
|
|
228
|
-
JACOBIAN_FN: "JACOBIAN_FN",
|
|
229
|
-
CONJ_FN: "CONJ_FN",
|
|
230
|
-
RE_FN: "RE_FN",
|
|
231
|
-
IM_FN: "IM_FN",
|
|
232
|
-
CANCEL_FN: "CANCEL_FN",
|
|
233
|
-
APART_FN: "APART_FN",
|
|
234
|
-
// The imaginary-literal suffix, fused from a number followed immediately by
|
|
235
|
-
// `i`. Same registration reasoning as the verbs above.
|
|
236
|
-
IMAGINARY: "IMAGINARY",
|
|
237
|
-
// `=>`, "therefore"/solve operator. The algebra itself lives in symbolic/;
|
|
238
|
-
// packages/symbolic/ carries the grammar surface for the named operations.
|
|
239
|
-
// A genuine 2-char lexer token (ExpressionLexer.ts's TWO_CHAR_OPS table),
|
|
240
|
-
// same mechanism as ==/!=/>=/<=, not a normalizer-level fusion, "=" then
|
|
241
|
-
// ">" is the opposite char order from GTE's ">=", so there's no collision.
|
|
242
|
-
THEREFORE: "THEREFORE",
|
|
243
|
-
// Timezone query phrases (see TimePackage.ts's `phrases` field). Same
|
|
244
|
-
// phrase-fusion reasoning as above: "time"/"date"/"difference" are
|
|
245
|
-
// common variable names, so the fused trigger is the full phrase.
|
|
246
|
-
// CITY_NAME is the fused-token type for multi-word city/country names
|
|
247
|
-
// (e.g. "new york"). See timezones/CityZones.ts's MULTI_WORD_CITY_ZONES.
|
|
248
|
-
TIME_IN: "TIME_IN",
|
|
249
|
-
DATE_IN: "DATE_IN",
|
|
250
|
-
TIME_DIFFERENCE_BETWEEN: "TIME_DIFFERENCE_BETWEEN",
|
|
251
|
-
CITY_NAME: "CITY_NAME",
|
|
252
|
-
BACKTICK_OPEN: "BACKTICK_OPEN",
|
|
253
|
-
INLINE_SOLVE_START: "INLINE_SOLVE_START",
|
|
254
|
-
// Comment marker, `#` or `//` to end of line. Emitted by
|
|
255
|
-
// ExpressionLexer.tokenizeComment()/tokenizeOperator() but never reaches
|
|
256
|
-
// a parselet: ExpressionEngine.prepareExpression() filters COMMENT
|
|
257
|
-
// tokens out of the stream before normalization/parsing (see
|
|
258
|
-
// ExpressionEngine.ts's "Filter COMMENT tokens" comments). Listed here
|
|
259
|
-
// for discoverability even though tokenTypeId() would lazily register
|
|
260
|
-
// it anyway on first use.
|
|
261
|
-
COMMENT: "COMMENT",
|
|
262
|
-
// A `#hex` colour literal (`#ff0000`), recognised by the lexer where `#`
|
|
263
|
-
// would otherwise be a heading/comment; the colour package's parselet turns
|
|
264
|
-
// it into a colour value. See ExpressionLexer.matchHexColourEnd().
|
|
265
|
-
HEX_COLOUR: "HEX_COLOUR",
|
|
266
|
-
// A bounded mid-line `#tag` annotation (`1200 #housing`). Stripped from
|
|
267
|
-
// evaluation by the tags package's strip rule, or consumed by its aggregate
|
|
268
|
-
// rule (`total of #housing`). A line-start `#` is a heading, and `# ` (space)
|
|
269
|
-
// or `//` is still a free-text comment.
|
|
270
|
-
TAG: "TAG",
|
|
271
|
-
// A colour function call fused by the colour package's normalizer, e.g.
|
|
272
|
-
// `rgb(`/`lighten(`. Carries the function name; see ColourCallParselet.
|
|
273
|
-
COLOUR_CALL: "COLOUR_CALL",
|
|
274
|
-
// Vector types (referenced in locale keywordMap as vec2→VEC2, etc.)
|
|
275
|
-
VEC2: "VEC2",
|
|
276
|
-
VEC3: "VEC3",
|
|
277
|
-
VEC4: "VEC4",
|
|
278
|
-
FLOAT: "FLOAT",
|
|
279
|
-
GLOBAL: "GLOBAL",
|
|
280
|
-
// ── Finance (packages/finance/) ──
|
|
281
|
-
// OVER/RATE_AT are bare single-word keywords (not phrase-fused): both are
|
|
282
|
-
// prepositions with near-zero plausibility as a variable name (nobody
|
|
283
|
-
// writes ":over = 5" or ":at = 3"), the same accepted-risk category as
|
|
284
|
-
// this codebase's existing bare "between"/"from"/"next"/"last"/"best"
|
|
285
|
-
// keywords (see VariableParselet.ts's doc comment). RATE_AT is deliberately
|
|
286
|
-
// NOT named "AT", that name is already reserved (dormant) for a future
|
|
287
|
-
// "@" symbol token in TokenNormalizer.NON_WORD_NAMES; reusing it here would
|
|
288
|
-
// create an unintended coupling if "@" is ever wired up.
|
|
289
|
-
OVER: "OVER",
|
|
290
|
-
RATE_AT: "RATE_AT",
|
|
291
|
-
// The investment grammar's connectives (packages/finance/), same
|
|
292
|
-
// accepted-risk category as OVER/RATE_AT above. "after"/"for" are
|
|
293
|
-
// prepositions; "compounding", "invested" and "returned" are participles,
|
|
294
|
-
// and none is a plausible `:variableName`.
|
|
295
|
-
//
|
|
296
|
-
// "after" and "for" are the pivots Soulver's own documented syntax uses,
|
|
297
|
-
// `$1,000 after 3 years at 7%` and `$1,000 for 3 years at 7% compounding
|
|
298
|
-
// monthly`. This package originally substituted "over" for both and said so
|
|
299
|
-
// in CompoundInterestParselet.ts's doc comment; the documented spellings now
|
|
300
|
-
// work as well, and "over" is kept so nothing that already parsed stops.
|
|
301
|
-
AFTER: "AFTER",
|
|
302
|
-
PRESENT_VALUE_OF: "PRESENT_VALUE_OF",
|
|
303
|
-
ANNUAL_RETURN_ON: "ANNUAL_RETURN_ON",
|
|
304
|
-
FOR_DURATION: "FOR_DURATION",
|
|
305
|
-
COMPOUNDING: "COMPOUNDING",
|
|
306
|
-
INVESTED: "INVESTED",
|
|
307
|
-
RETURNED: "RETURNED",
|
|
308
|
-
// Fused phrase tokens (see FinancePackage.ts's `phrases` field)
|
|
309
|
-
// deliberately NOT bare single-word keywords: "interest", "tax", "vat",
|
|
310
|
-
// "repayment", "principal" etc. are all common, plausible variable names
|
|
311
|
-
// (a shipped playground example uses ":total = :subtotal + :tax". See
|
|
312
|
-
// MathPhrasesPackage.ts's doc comment for the regression this caused
|
|
313
|
-
// once already). Fusing the full "<word> on"/"<word> off" phrase means
|
|
314
|
-
// the bare leading word itself never becomes its own token type, so
|
|
315
|
-
// ":tax = ..." keeps working exactly as before.
|
|
316
|
-
COMPOUND_INTEREST_ON: "COMPOUND_INTEREST_ON",
|
|
317
|
-
INTEREST_ON: "INTEREST_ON",
|
|
318
|
-
DAILY_REPAYMENT_ON: "DAILY_REPAYMENT_ON",
|
|
319
|
-
MONTHLY_REPAYMENT_ON: "MONTHLY_REPAYMENT_ON",
|
|
320
|
-
ANNUAL_REPAYMENT_ON: "ANNUAL_REPAYMENT_ON",
|
|
321
|
-
TOTAL_REPAYMENT_ON: "TOTAL_REPAYMENT_ON",
|
|
322
|
-
DAILY_LOAN_INTEREST_ON: "DAILY_LOAN_INTEREST_ON",
|
|
323
|
-
MONTHLY_LOAN_INTEREST_ON: "MONTHLY_LOAN_INTEREST_ON",
|
|
324
|
-
ANNUAL_LOAN_INTEREST_ON: "ANNUAL_LOAN_INTEREST_ON",
|
|
325
|
-
TOTAL_LOAN_INTEREST_ON: "TOTAL_LOAN_INTEREST_ON",
|
|
326
|
-
TAX_ON: "TAX_ON",
|
|
327
|
-
TAX_OFF: "TAX_OFF",
|
|
328
|
-
TAX_IN_PHRASE: "TAX_IN_PHRASE",
|
|
329
|
-
// Inflation-adjusted value (packages/finance/) -- fused phrase
|
|
330
|
-
// tokens (see FinancePackage.ts's `phrases` field), same reasoning
|
|
331
|
-
// as the tax/interest phrases above: "what"/"was"/"value"/"worth"
|
|
332
|
-
// are all plausible variable names, so only the full phrases are
|
|
333
|
-
// ever claimed as keywords, never the bare leading word.
|
|
334
|
-
WHAT_IS: "WHAT_IS",
|
|
335
|
-
WHAT_WAS: "WHAT_WAS",
|
|
336
|
-
VALUE_OF: "VALUE_OF",
|
|
337
|
-
WORTH_IN: "WORTH_IN",
|
|
338
|
-
// Savings goals (finance). Fused whole-phrase triggers, so "how", "much",
|
|
339
|
-
// "save" and "reach" stay ordinary variable names, the same reason as the
|
|
340
|
-
// other finance phrases above.
|
|
341
|
-
SAVINGS_HOW_LONG: "SAVINGS_HOW_LONG",
|
|
342
|
-
SAVINGS_HOW_MUCH: "SAVINGS_HOW_MUCH",
|
|
343
|
-
// Bare single-word keyword (not phrase-fused) -- "assuming" has
|
|
344
|
-
// near-zero plausibility as a variable name, the same accepted-risk
|
|
345
|
-
// category as this codebase's existing bare "over"/"at" keywords
|
|
346
|
-
// (see the OVER/RATE_AT comment above). Registered so its bare word
|
|
347
|
-
// is a recognized phrase-starter (`canStartPhrase`), which suppresses
|
|
348
|
-
// implicit-multiply insertion between the futureYear NUMBER and this
|
|
349
|
-
// word in "value of $X in <year> assuming N% inflation" -- without
|
|
350
|
-
// this, "<year> assuming" was silently rewritten to "<year> *
|
|
351
|
-
// assuming" before parsing ever ran.
|
|
352
|
-
ASSUMING: "ASSUMING",
|
|
353
|
-
// Fused by a custom NormalizerRule (not `phrases`), carrying the
|
|
354
|
-
// year as its value -- see
|
|
355
|
-
// finance/normalizer/InYearDollarsNormalizerRule.ts.
|
|
356
|
-
IN_YEAR_DOLLARS: "IN_YEAR_DOLLARS",
|
|
357
|
-
// Cooking/UoM (packages/uom/) -- fused ingredient name (single- or
|
|
358
|
-
// multi-word, e.g. "butter"/"olive oil") carrying the matched name
|
|
359
|
-
// as its value. NOT a bare-word phrase-trie keyword -- see
|
|
360
|
-
// uom/normalizer/IngredientNameNormalizerRule.ts's doc comment for
|
|
361
|
-
// why this is a context-sensitive NormalizerRule instead (so a bare
|
|
362
|
-
// `:butter = 5` variable definition is completely unaffected).
|
|
363
|
-
INGREDIENT_NAME: "INGREDIENT_NAME",
|
|
364
|
-
// ── Datetime, workdays/weekdays/timestamps (packages/datetime/) ──
|
|
365
|
-
// Fused phrase tokens (see DatetimePackage.ts's `phrases` field)
|
|
366
|
-
// deliberately NOT bare single-word keywords: "workdays"/"weekday"/
|
|
367
|
-
// "timestamp"/"date" are all plausible variable names, same
|
|
368
|
-
// reasoning/regression risk as MathPhrasesPackage.ts's "total" note and
|
|
369
|
-
// FinancePackage.ts's "tax" note above. Fusing the full phrase means the
|
|
370
|
-
// bare leading word itself never becomes its own token type, so e.g.
|
|
371
|
-
// ":timestamp = 5" keeps working.
|
|
372
|
-
WORKDAYS_IN: "WORKDAYS_IN",
|
|
373
|
-
WEEKDAY_ON: "WEEKDAY_ON",
|
|
374
|
-
CURRENT_TIMESTAMP: "CURRENT_TIMESTAMP",
|
|
375
|
-
TO_DATE: "TO_DATE",
|
|
376
|
-
TO_TIMESTAMP: "TO_TIMESTAMP",
|
|
377
|
-
// Natural-question forms over the same date fields, "what day is it in
|
|
378
|
-
// 30 days", "what month is it on 25/12/2026", "what week is it". Each is
|
|
379
|
-
// a fully-fused phrase for the same reason as WEEKDAY_ON above: claiming
|
|
380
|
-
// bare "day"/"month"/"week" as keywords would break ":day = 5" and
|
|
381
|
-
// collide with the UNIT tokens of the same name.
|
|
382
|
-
WEEKDAY_IN: "WEEKDAY_IN",
|
|
383
|
-
MONTH_ON: "MONTH_ON",
|
|
384
|
-
MONTH_IN: "MONTH_IN",
|
|
385
|
-
WEEK_ON: "WEEK_ON",
|
|
386
|
-
DAYS_IN_PERIOD: "DAYS_IN_PERIOD",
|
|
387
|
-
IN_TWO_UNITS: "IN_TWO_UNITS",
|
|
388
|
-
PER_UNIT: "PER_UNIT",
|
|
389
|
-
AT_RATE: "AT_RATE",
|
|
390
|
-
WEEK_IN: "WEEK_IN",
|
|
391
|
-
// `<unit> between <date> and <date>`, fused UNIT+BETWEEN, exactly like
|
|
392
|
-
// UNTIL_UNIT/SINCE_UNIT above.
|
|
393
|
-
BETWEEN_UNIT: "BETWEEN_UNIT",
|
|
394
|
-
// Business-day arithmetic in words, "N working/business days after|from|
|
|
395
|
-
// before <date>" (infix, the count is the left operand) and "working/
|
|
396
|
-
// business days between <date> and <date>" (prefix). Full phrases for the
|
|
397
|
-
// same reason as WORKDAYS_IN above: "working"/"business" are ordinary words,
|
|
398
|
-
// so only the complete phrase is claimed, never the bare leading word. See
|
|
399
|
-
// WorkdayOffsetParselet.ts / WorkdaysBetweenParselet.ts.
|
|
400
|
-
WORKDAYS_AFTER: "WORKDAYS_AFTER",
|
|
401
|
-
WORKDAYS_BEFORE: "WORKDAYS_BEFORE",
|
|
402
|
-
WORKDAYS_BETWEEN: "WORKDAYS_BETWEEN",
|
|
403
|
-
// Postfix day-type predicates, "<date> is a weekend" / "is a workday".
|
|
404
|
-
IS_WEEKEND: "IS_WEEKEND",
|
|
405
|
-
IS_WORKDAY: "IS_WORKDAY",
|
|
406
|
-
// ── Time, video timecode (packages/time/) ──
|
|
407
|
-
// Fused from a raw `HH:MM:SS:FF` token sequence (see
|
|
408
|
-
// packages/time/normalizer/VideoTimecodeNormalizerRule.ts) and from
|
|
409
|
-
// `NUMBER frames` (see FrameCountNormalizerRule.ts), not a bare-keyword
|
|
410
|
-
// collision risk the way the datetime tokens above are, since neither
|
|
411
|
-
// fusion claims a plain English word as its own token type.
|
|
412
|
-
VIDEO_TIMECODE: "VIDEO_TIMECODE",
|
|
413
|
-
FRAME_COUNT: "FRAME_COUNT",
|
|
414
|
-
// "@". See ExpressionLexer.ts's OP_MAP entry for why this was
|
|
415
|
-
// previously dormant/unproduced despite being anticipated by name here
|
|
416
|
-
// and in TokenNormalizer.ts's NON_WORD_NAMES.
|
|
417
|
-
AT: "AT",
|
|
418
|
-
// Generic token for every currency symbol added AFTER the original
|
|
419
|
-
// DOLLAR/POUND/EURO/YEN/RUBLE/WON set (each of which kept its own
|
|
420
|
-
// specific token type for backward compatibility). See
|
|
421
|
-
// uom/CurrencyAliases.ts's CURRENCY_SYMBOL_ALIASES and
|
|
422
|
-
// ExpressionLexer.ts's dispatch for the full symbol list. One shared
|
|
423
|
-
// type avoids needing a new TokenTypes entry + TokenCategoryMap entry +
|
|
424
|
-
// CurrencyPackage.ts prefixParselets entry per additional symbol.
|
|
425
|
-
CURRENCY_SYMBOL: "CURRENCY_SYMBOL",
|
|
426
|
-
// ── Cross-line data access (packages/lines/) ──
|
|
427
|
-
// "prev" -- bare keyword (nothing to phrase-fuse against, same shape as
|
|
428
|
-
// CLAMP -- accepted collision risk per that package's own precedent).
|
|
429
|
-
PREV: "PREV",
|
|
430
|
-
// "line1" / "line 1" / "l1" -- fused by LineRefNormalizerRule (never a
|
|
431
|
-
// bare lexer keyword, so ":line = 5"/":l = 5" stay untouched). Carries
|
|
432
|
-
// the parsed line number as its .value.
|
|
433
|
-
LINE_REF: "LINE_REF",
|
|
434
|
-
// "sum(" / "total(" -- fused ONLY when immediately followed by LPAREN
|
|
435
|
-
// (see LineRefNormalizerRule's lookahead guard), so ":sum = 100" and
|
|
436
|
-
// MathPhrases' "total of X, Y" (no paren after "of") are unaffected.
|
|
437
|
-
SUM_RANGE_CALL: "SUM_RANGE_CALL",
|
|
438
|
-
AVERAGE_RANGE_CALL: "AVERAGE_RANGE_CALL",
|
|
439
|
-
// "total above" / "sum above" / "average above" -- phrase-fused (see
|
|
440
|
-
// LinesPackage.ts's `phrases` field), a deliberate departure from
|
|
441
|
-
// Numi/Numbr's bare "total"/"sum" wording to avoid the exact bare-
|
|
442
|
-
// keyword collision this codebase already regressed on once.
|
|
443
|
-
TOTAL_ABOVE: "TOTAL_ABOVE",
|
|
444
|
-
SUM_ABOVE: "SUM_ABOVE",
|
|
445
|
-
AVERAGE_ABOVE: "AVERAGE_ABOVE",
|
|
446
|
-
// ── Goal seek (packages/goalseek/) ──
|
|
447
|
-
// "solve line 4 for rate = 900" -- fused by GoalSeekNormalizerRule when the
|
|
448
|
-
// bare word "solve" is immediately followed by a LINE_REF (never a bare
|
|
449
|
-
// lexer keyword, so ":solve = 2" and the existing "solve(...)" call form
|
|
450
|
-
// both stay untouched, since neither is "solve" directly before a LINE_REF).
|
|
451
|
-
GOAL_SEEK: "GOAL_SEEK"
|
|
452
|
-
};
|
|
453
|
-
var _nextTokenTypeId = 0;
|
|
454
|
-
var _tokenTypeNameToId = /* @__PURE__ */ new Map();
|
|
455
|
-
var _tokenTypeIdToName = /* @__PURE__ */ new Map();
|
|
456
|
-
function registerTokenType(name) {
|
|
457
|
-
const existing = _tokenTypeNameToId.get(name);
|
|
458
|
-
if (existing !== void 0) return existing;
|
|
459
|
-
const id = _nextTokenTypeId++;
|
|
460
|
-
_tokenTypeNameToId.set(name, id);
|
|
461
|
-
_tokenTypeIdToName.set(id, name);
|
|
462
|
-
return id;
|
|
463
|
-
}
|
|
464
|
-
function tokenTypeId(name) {
|
|
465
|
-
return registerTokenType(name);
|
|
466
|
-
}
|
|
467
|
-
function tokenTypeName(id) {
|
|
468
|
-
return _tokenTypeIdToName.get(id) ?? `UNKNOWN_${id}`;
|
|
469
|
-
}
|
|
470
|
-
function registerAllTokenTypes() {
|
|
471
|
-
for (const name of Object.values(TokenTypes)) {
|
|
472
|
-
registerTokenType(name);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
export { TokenTypes, registerAllTokenTypes, registerTokenType, tokenTypeId, tokenTypeName };
|
|
477
|
-
//# sourceMappingURL=chunk-NAWZATKT.js.map
|
|
478
|
-
//# sourceMappingURL=chunk-NAWZATKT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lexer/Token.ts"],"names":[],"mappings":";AA0CO,IAAM,UAAA,GAAa;AAAA,EACxB,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ,QAAA;AAAA,EACR,KAAA,EAAO,OAAA;AAAA,EACP,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,OAAA;AAAA;AAAA;AAAA,EAGP,WAAA,EAAa,aAAA;AAAA,EACb,YAAA,EAAc,cAAA;AAAA,EACd,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMP,UAAA,EAAY,YAAA;AAAA,EACZ,KAAA,EAAO,OAAA;AAAA,EACP,OAAA,EAAS,SAAA;AAAA,EACT,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ,QAAA;AAAA,EACR,OAAA,EAAS,SAAA;AAAA,EACT,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ,QAAA;AAAA,EACR,QAAA,EAAU,UAAA;AAAA,EACV,QAAA,EAAU,UAAA;AAAA,EACV,MAAA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B,gBAAA;AAAA,EAChB,kBAAA,EAAoB,oBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKpB,WAAA,EAAa,aAAA;AAAA,EACb,SAAA,EAAW,WAAA;AAAA,EACX,aAAA,EAAe,eAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMf,SAAA,EAAW;AACb;AAcA,IAAI,gBAAA,GAAmB,CAAA;AAGvB,IAAM,kBAAA,uBAAyB,GAAA,EAAoB;AAGnD,IAAM,kBAAA,uBAAyB,GAAA,EAAoB;AAO5C,SAAS,kBAAkB,IAAA,EAAsB;AACvD,EAAA,MAAM,QAAA,GAAW,kBAAA,CAAmB,GAAA,CAAI,IAAI,CAAA;AAC5C,EAAA,IAAI,QAAA,KAAa,QAAW,OAAO,QAAA;AACnC,EAAA,MAAM,EAAA,GAAK,gBAAA,EAAA;AACX,EAAA,kBAAA,CAAmB,GAAA,CAAI,MAAM,EAAE,CAAA;AAC/B,EAAA,kBAAA,CAAmB,GAAA,CAAI,IAAI,IAAI,CAAA;AAC/B,EAAA,OAAO,EAAA;AACR;AAQO,SAAS,YAAY,IAAA,EAAsB;AACjD,EAAA,OAAO,kBAAkB,IAAI,CAAA;AAC9B;AAMO,SAAS,cAAc,EAAA,EAAoB;AACjD,EAAA,OAAO,kBAAA,CAAmB,GAAA,CAAI,EAAE,CAAA,IAAK,WAAW,EAAE,CAAA,CAAA;AACnD;AAMO,SAAS,qBAAA,GAA8B;AAC7C,EAAA,KAAA,MAAW,IAAA,IAAQ,MAAA,CAAO,MAAA,CAAO,UAAU,CAAA,EAAG;AAC7C,IAAA,iBAAA,CAAkB,IAAI,CAAA;AAAA,EACvB;AACD","file":"chunk-NAWZATKT.js","sourcesContent":["/**\n * Lexer token produced by {@link ExpressionLexer} and consumed by parsers.\n *\n * Each token carries:\n * - `type`: string name (e.g. \"NUMBER\", \"PLUS\") for diagnostics and parselet lookup\n * - `typeId`: integer ID for O(1) comparison in parser hot paths\n * - `value`/`text`: the token's semantic value and raw source text\n * - `offset`/`line`/`col`: source position for error messages and highlighting\n */\nexport interface Token {\n\t/** String token type (e.g., \"NUMBER\", \"PLUS\", \"IDENT\"). Used by ParseletRegistry string-keyed maps and error messages. */\n\ttype: string;\n\t/** Integer token type ID for fast comparison in Parser hot path.\n\t * Populated by the Lexer via registerTokenType(). Use tokenTypeId(type) to get a type's ID. */\n\ttypeId: number;\n\tvalue: string;\n\ttext: string;\n\toffset: number;\n\tlineBreaks: number;\n\tline: number;\n\tcol: number;\n\t/**\n\t * End offset of the source text this token was fused from, exclusive.\n\t *\n\t * Only set on tokens the normalizer built by fusing several lexer tokens\n\t * into one, and only there because those are the tokens whose `value` no\n\t * longer describes the text they came from. `10 frames` fuses into a\n\t * FRAME_COUNT whose value is `10`, so `offset + value.length` would cover\n\t * two characters of a nine-character phrase.\n\t *\n\t * Evaluation never reads this. It exists so that a consumer painting a line\n\t * (see `LanguageService.getSemanticTokens`) can highlight a fused phrase as\n\t * the one thing the parser will see rather than as its parts.\n\t */\n\tsourceEnd?: number;\n}\n\n/**\n * Canonical token type name constants.\n * All token types used by the lexer, parser, and VM are defined here.\n * Custom/plugin token types should be registered via {@link registerTokenType}.\n */\nexport const TokenTypes = {\n NUMBER: \"NUMBER\",\n BIGINT: \"BIGINT\",\n STRING: \"STRING\",\n IDENT: \"IDENT\",\n PLUS: \"PLUS\",\n MINUS: \"MINUS\",\n // Compound assignment for running totals: `total += 100`, `total -= 40`.\n // Handled by the engine's compound-assignment interception, not a parselet.\n PLUS_EQUALS: \"PLUS_EQUALS\",\n MINUS_EQUALS: \"MINUS_EQUALS\",\n STAR: \"STAR\",\n SLASH: \"SLASH\",\n // The uncertainty operator, `±` (U+00B1) or the ASCII `+/-`. The symbol is\n // lexed directly (ExpressionLexer.ts, alongside `×`/`÷`), and the ASCII\n // spelling is fused from PLUS SLASH MINUS by a normalizer rule (see\n // packages/uncertainty/). Registered here rather than left to be lazily\n // minted so its id is stable, the same reasoning as the algebra verbs below.\n PLUS_MINUS: \"PLUS_MINUS\",\n CARET: \"CARET\",\n PERCENT: \"PERCENT\",\n LSHIFT: \"LSHIFT\",\n RSHIFT: \"RSHIFT\",\n URSHIFT: \"URSHIFT\",\n LPAREN: \"LPAREN\",\n RPAREN: \"RPAREN\",\n LBRACKET: \"LBRACKET\",\n RBRACKET: \"RBRACKET\",\n LBRACE: \"LBRACE\",\n RBRACE: \"RBRACE\",\n COMMA: \"COMMA\",\n DOT: \"DOT\",\n COLON: \"COLON\",\n SEMICOLON: \"SEMICOLON\",\n EQUALS: \"EQUALS\",\n DOLLAR: \"DOLLAR\",\n POUND: \"POUND\",\n EURO: \"EURO\",\n YEN: \"YEN\",\n RUBLE: \"RUBLE\",\n WON: \"WON\",\n QUESTION: \"QUESTION\",\n BANG: \"BANG\",\n BIT_AND: \"BIT_AND\",\n BIT_OR: \"BIT_OR\",\n BIT_NOT: \"BIT_NOT\",\n KEYWORD: \"KEYWORD\",\n EOF: \"EOF\",\n ERROR: \"ERROR\",\n WS: \"WS\",\n NEWLINE: \"NEWLINE\",\n DATETIME_LITERAL: \"DATETIME_LITERAL\",\n DURATION: \"DURATION\",\n UNIT: \"UNIT\",\n ROLL: \"ROLL\",\n PI: \"PI\",\n E: \"E\",\n MOD: \"MOD\",\n // The English word \"and\", which is NOT the same thing as \"+\" even though it\n // adds. It used to map straight onto PLUS in the locale keyword map, which\n // made \"3 and 4\" evaluate to 7 correctly and then quietly broke every phrase\n // that uses \"and\" as a list separator: \"average of 36, 42, 19 and 81\" parsed\n // its last argument as \"19 + 81\" and returned 178/3 rather than 178/4.\n //\n // Giving it its own type lets a parselet tell the two apart. It is still an\n // infix addition (see ArithmeticPackage.ts) so \"3 and 4\" is unchanged, but it\n // binds at BindingPower.Conjunction, looser than both Sum and Conditional, so\n // a phrase parselet can parse an argument at Conjunction and get \"1 + 2\"\n // whole while still stopping at \"and\", and so \"5 > 3 and 2 > 1\" reads as the\n // conjunction of two comparisons rather than \"5 > (3 and 2) > 1\".\n AND_CONJ: \"AND_CONJ\",\n OF: \"OF\",\n INCREASE_BY: \"INCREASE_BY\",\n DECREASE_BY: \"DECREASE_BY\",\n // Percentage solve-for-unknown (packages/percentage/), \"N% of what is\n // X\" solves N% * base = X for base. Fused as a full 3-word phrase (see\n // PercentagePackage.ts's `phrases` field) rather than a bare \"what\"\n // keyword, \"what\" is common enough as a variable name to be worth the\n // same phrase-fusion treatment this codebase gives \"total\"/\"average\"/etc.\n OF_WHAT_IS: \"OF_WHAT_IS\",\n // Sibling solve-for-unknown forms accounting for a +/-1 offset, \"N% on\n // what is X\" (increase) / \"N% off what is X\" (decrease). Same\n // phrase-fusion reasoning as OF_WHAT_IS above.\n ON_WHAT_IS: \"ON_WHAT_IS\",\n OFF_WHAT_IS: \"OFF_WHAT_IS\",\n NOW: \"NOW\",\n TODAY: \"TODAY\",\n TOMORROW: \"TOMORROW\",\n YESTERDAY: \"YESTERDAY\",\n DURATION_DAY: \"DURATION_DAY\",\n DURATION_WEEK: \"DURATION_WEEK\",\n DURATION_MONTH: \"DURATION_MONTH\",\n DURATION_YEAR: \"DURATION_YEAR\",\n DURATION_HOUR: \"DURATION_HOUR\",\n DURATION_MINUTE: \"DURATION_MINUTE\",\n DURATION_SECOND: \"DURATION_SECOND\",\n FUNC: \"FUNC\",\n CONVERT: \"CONVERT\",\n TO: \"TO\",\n BEST: \"BEST\",\n NEXT: \"NEXT\",\n LAST: \"LAST\",\n UNTIL: \"UNTIL\",\n SINCE: \"SINCE\",\n BETWEEN: \"BETWEEN\",\n // Bill split (finance package). Retyped from the ordinary words \"split\",\n // \"ways\" and \"people\" by BillSplitNormalizerRule, but only inside the full\n // split shape, so those words stay usable as variable names and prose\n // everywhere else (the same contextual-claim discipline as the recurring\n // schedule and at-rate rules).\n // The verb-first `split <amount> between N` form (prefix).\n SPLIT: \"SPLIT\",\n // The amount-first `<amount> split N ways` form (infix). A separate,\n // infix-only token so implicit multiplication does not read it as the start\n // of a new value and insert a `*` before it, which the dual-role SPLIT would.\n SPLIT_WAYS: \"SPLIT_WAYS\",\n WAYS: \"WAYS\",\n PEOPLE: \"PEOPLE\",\n FROM: \"FROM\",\n INCREASE: \"INCREASE\",\n DECREASE: \"DECREASE\",\n UNICODE_MATH: \"UNICODE_MATH\",\n TIMES_BY: \"TIMES_BY\",\n MULTIPLY_BY: \"MULTIPLY_BY\",\n DIVIDE_BY: \"DIVIDE_BY\",\n NEQ: \"NEQ\",\n IN: \"IN\",\n BIT_XOR: \"BIT_XOR\",\n EQUALITY: \"EQUALITY\",\n GTE: \"GTE\",\n LTE: \"LTE\",\n LT: \"LT\",\n GT: \"GT\",\n LOGICAL_AND: \"LOGICAL_AND\",\n LOGICAL_OR: \"LOGICAL_OR\",\n OR: \"OR\",\n TRUE: \"TRUE\",\n FALSE: \"FALSE\",\n IF: \"IF\",\n THEN: \"THEN\",\n ELSE: \"ELSE\",\n AS: \"AS\",\n CONVERTER_NAME: \"CONVERTER_NAME\",\n // Rounding (packages/converters/). \"rounded\" is a bare keyword: it is a\n // past participle with no plausible use as a :variableName, the same\n // accepted-risk category as \"between\"/\"from\". TO_NEAREST and\n // DECIMAL_PLACES are fused, since \"to\" already means percentage change.\n ROUNDED: \"ROUNDED\",\n TO_NEAREST: \"TO_NEAREST\",\n DECIMAL_PLACES: \"DECIMAL_PLACES\",\n // Fused two-word phrase tokens (see MathPhrasesPackage.ts's `phrases`\n // field), deliberately NOT bare single-word keywords: \"average\"\n // \"total\", \"count\", etc. are common variable names, and this codebase\n // has a tested policy that colon-prefixed variable names can't be\n // keyword-shaped words (see VariableParselet.ts's doc comment). Fusing\n // the full \"<word> of\"/\"<word> between\" phrase means the bare word\n // itself never becomes its own token type, so \":total = ...\" keeps\n // working exactly as before.\n AVERAGE_OF: \"AVERAGE_OF\",\n MEDIAN_OF: \"MEDIAN_OF\",\n TOTAL_OF: \"TOTAL_OF\",\n COUNT_OF: \"COUNT_OF\",\n LARGER_OF: \"LARGER_OF\",\n SMALLER_OF: \"SMALLER_OF\",\n HALF_OF: \"HALF_OF\",\n MIDPOINT_BETWEEN: \"MIDPOINT_BETWEEN\",\n REMAINDER_OF: \"REMAINDER_OF\",\n NTH_ROOT: \"NTH_ROOT\",\n LOG_PHRASE: \"LOG_PHRASE\",\n LOG_BASE: \"LOG_BASE\",\n GCD_OF: \"GCD_OF\",\n LCM_OF: \"LCM_OF\",\n SQUARE_ROOT_OF: \"SQUARE_ROOT_OF\",\n CUBE_ROOT_OF: \"CUBE_ROOT_OF\",\n RANDOM_NUMBER: \"RANDOM_NUMBER\",\n IS_TO: \"IS_TO\",\n // Bare \"is\", the trigger for the solve-for-the-unknown percentage family\n // (packages/percentage/IsWhatParselet.ts). Safe as a bare keyword: it is a\n // verb, not a plausible :variableName, and the \"is to\" proportion phrase is\n // fused earlier so it still wins.\n IS: \"IS\",\n PCT_ON: \"PCT_ON\",\n PCT_OFF: \"PCT_OFF\",\n // Successive percentage change (packages/percentage/UpDownParselet.ts):\n // `X up N%` grows, `X down N%` shrinks, chainable with `then` and\n // repeatable with `N times`. Retyped from a bare `up`/`down` IDENT only\n // when a percentage immediately follows (PercentUpDownNormalizerRule), so\n // prose that merely mentions the words is untouched. Declared here rather\n // than minted lazily for the same reason as the algebra verbs below: a\n // normalizer rule and its parselet must agree on the id.\n PCT_UP: \"PCT_UP\",\n PCT_DOWN: \"PCT_DOWN\",\n OF_WHAT: \"OF_WHAT\",\n OFF_WHAT: \"OFF_WHAT\",\n ON_WHAT: \"ON_WHAT\",\n // CLAMP stays a bare single-word keyword: \"clamp X between Y and Z\" has\n // the value X between the trigger and \"between\", so it can't be\n // phrase-fused like the others above (same structural reason\n // ClampParselet.ts is hand-written instead of PhrasePattern-based).\n // Matches this codebase's existing accepted risk for \"between\"/\"from\"/\n // \"next\"/\"last\"/\"best\", also bare, also can't be used as `:name`.\n CLAMP: \"CLAMP\",\n // map/reduce/sum/prod (packages/mapreduce/), bare single-word keywords\n // each with its own dedicated parselet (custom argument grammar: a bare\n // builtin/user-function name, an inline transform expression, or\n // `name=collection` zipped pairs, none of which fit the ordinary\n // FunctionCallParselet path, so these can't just reuse the generic FUNC\n // token type the way sqrt/abs/... do).\n MAP: \"MAP\",\n REDUCE: \"REDUCE\",\n SUM_FN: \"SUM_FN\",\n PROD_FN: \"PROD_FN\",\n // The algebra verbs (packages/symbolic/), fused from an ordinary IDENT only\n // when immediately followed by `(`, so `factor`/`solve`/`expand` stay usable\n // as variable names. Declared here rather than left to be minted on first use\n // by `tokenTypeId()`, which is what {@link registerAllTokenTypes} exists for:\n // a lazily-minted id depends on what else happened to be minted before it, so\n // in a single-process run the id a normalizer rule produces can stop matching\n // the id the parselet was registered under. Every token type a built-in\n // package relies on belongs in this table.\n EXPAND_FN: \"EXPAND_FN\",\n FACTOR_FN: \"FACTOR_FN\",\n SOLVE_FN: \"SOLVE_FN\",\n DER_FN: \"DER_FN\",\n INTEGRAL_FN: \"INTEGRAL_FN\",\n TAYLOR_FN: \"TAYLOR_FN\",\n JACOBIAN_FN: \"JACOBIAN_FN\",\n CONJ_FN: \"CONJ_FN\",\n RE_FN: \"RE_FN\",\n IM_FN: \"IM_FN\",\n CANCEL_FN: \"CANCEL_FN\",\n APART_FN: \"APART_FN\",\n // The imaginary-literal suffix, fused from a number followed immediately by\n // `i`. Same registration reasoning as the verbs above.\n IMAGINARY: \"IMAGINARY\",\n // `=>`, \"therefore\"/solve operator. The algebra itself lives in symbolic/;\n // packages/symbolic/ carries the grammar surface for the named operations.\n // A genuine 2-char lexer token (ExpressionLexer.ts's TWO_CHAR_OPS table),\n // same mechanism as ==/!=/>=/<=, not a normalizer-level fusion, \"=\" then\n // \">\" is the opposite char order from GTE's \">=\", so there's no collision.\n THEREFORE: \"THEREFORE\",\n // Timezone query phrases (see TimePackage.ts's `phrases` field). Same\n // phrase-fusion reasoning as above: \"time\"/\"date\"/\"difference\" are\n // common variable names, so the fused trigger is the full phrase.\n // CITY_NAME is the fused-token type for multi-word city/country names\n // (e.g. \"new york\"). See timezones/CityZones.ts's MULTI_WORD_CITY_ZONES.\n TIME_IN: \"TIME_IN\",\n DATE_IN: \"DATE_IN\",\n TIME_DIFFERENCE_BETWEEN: \"TIME_DIFFERENCE_BETWEEN\",\n CITY_NAME: \"CITY_NAME\",\n BACKTICK_OPEN: \"BACKTICK_OPEN\",\n INLINE_SOLVE_START: \"INLINE_SOLVE_START\",\n // Comment marker, `#` or `//` to end of line. Emitted by\n // ExpressionLexer.tokenizeComment()/tokenizeOperator() but never reaches\n // a parselet: ExpressionEngine.prepareExpression() filters COMMENT\n // tokens out of the stream before normalization/parsing (see\n // ExpressionEngine.ts's \"Filter COMMENT tokens\" comments). Listed here\n // for discoverability even though tokenTypeId() would lazily register\n // it anyway on first use.\n COMMENT: \"COMMENT\",\n // A `#hex` colour literal (`#ff0000`), recognised by the lexer where `#`\n // would otherwise be a heading/comment; the colour package's parselet turns\n // it into a colour value. See ExpressionLexer.matchHexColourEnd().\n HEX_COLOUR: \"HEX_COLOUR\",\n // A bounded mid-line `#tag` annotation (`1200 #housing`). Stripped from\n // evaluation by the tags package's strip rule, or consumed by its aggregate\n // rule (`total of #housing`). A line-start `#` is a heading, and `# ` (space)\n // or `//` is still a free-text comment.\n TAG: \"TAG\",\n // A colour function call fused by the colour package's normalizer, e.g.\n // `rgb(`/`lighten(`. Carries the function name; see ColourCallParselet.\n COLOUR_CALL: \"COLOUR_CALL\",\n // Vector types (referenced in locale keywordMap as vec2→VEC2, etc.)\n VEC2: \"VEC2\",\n VEC3: \"VEC3\",\n VEC4: \"VEC4\",\n FLOAT: \"FLOAT\",\n GLOBAL: \"GLOBAL\",\n // ── Finance (packages/finance/) ──\n // OVER/RATE_AT are bare single-word keywords (not phrase-fused): both are\n // prepositions with near-zero plausibility as a variable name (nobody\n // writes \":over = 5\" or \":at = 3\"), the same accepted-risk category as\n // this codebase's existing bare \"between\"/\"from\"/\"next\"/\"last\"/\"best\"\n // keywords (see VariableParselet.ts's doc comment). RATE_AT is deliberately\n // NOT named \"AT\", that name is already reserved (dormant) for a future\n // \"@\" symbol token in TokenNormalizer.NON_WORD_NAMES; reusing it here would\n // create an unintended coupling if \"@\" is ever wired up.\n OVER: \"OVER\",\n RATE_AT: \"RATE_AT\",\n // The investment grammar's connectives (packages/finance/), same\n // accepted-risk category as OVER/RATE_AT above. \"after\"/\"for\" are\n // prepositions; \"compounding\", \"invested\" and \"returned\" are participles,\n // and none is a plausible `:variableName`.\n //\n // \"after\" and \"for\" are the pivots Soulver's own documented syntax uses,\n // `$1,000 after 3 years at 7%` and `$1,000 for 3 years at 7% compounding\n // monthly`. This package originally substituted \"over\" for both and said so\n // in CompoundInterestParselet.ts's doc comment; the documented spellings now\n // work as well, and \"over\" is kept so nothing that already parsed stops.\n AFTER: \"AFTER\",\n PRESENT_VALUE_OF: \"PRESENT_VALUE_OF\",\n ANNUAL_RETURN_ON: \"ANNUAL_RETURN_ON\",\n FOR_DURATION: \"FOR_DURATION\",\n COMPOUNDING: \"COMPOUNDING\",\n INVESTED: \"INVESTED\",\n RETURNED: \"RETURNED\",\n // Fused phrase tokens (see FinancePackage.ts's `phrases` field)\n // deliberately NOT bare single-word keywords: \"interest\", \"tax\", \"vat\",\n // \"repayment\", \"principal\" etc. are all common, plausible variable names\n // (a shipped playground example uses \":total = :subtotal + :tax\". See\n // MathPhrasesPackage.ts's doc comment for the regression this caused\n // once already). Fusing the full \"<word> on\"/\"<word> off\" phrase means\n // the bare leading word itself never becomes its own token type, so\n // \":tax = ...\" keeps working exactly as before.\n COMPOUND_INTEREST_ON: \"COMPOUND_INTEREST_ON\",\n INTEREST_ON: \"INTEREST_ON\",\n DAILY_REPAYMENT_ON: \"DAILY_REPAYMENT_ON\",\n MONTHLY_REPAYMENT_ON: \"MONTHLY_REPAYMENT_ON\",\n ANNUAL_REPAYMENT_ON: \"ANNUAL_REPAYMENT_ON\",\n TOTAL_REPAYMENT_ON: \"TOTAL_REPAYMENT_ON\",\n DAILY_LOAN_INTEREST_ON: \"DAILY_LOAN_INTEREST_ON\",\n MONTHLY_LOAN_INTEREST_ON: \"MONTHLY_LOAN_INTEREST_ON\",\n ANNUAL_LOAN_INTEREST_ON: \"ANNUAL_LOAN_INTEREST_ON\",\n TOTAL_LOAN_INTEREST_ON: \"TOTAL_LOAN_INTEREST_ON\",\n TAX_ON: \"TAX_ON\",\n TAX_OFF: \"TAX_OFF\",\n TAX_IN_PHRASE: \"TAX_IN_PHRASE\",\n // Inflation-adjusted value (packages/finance/) -- fused phrase\n // tokens (see FinancePackage.ts's `phrases` field), same reasoning\n // as the tax/interest phrases above: \"what\"/\"was\"/\"value\"/\"worth\"\n // are all plausible variable names, so only the full phrases are\n // ever claimed as keywords, never the bare leading word.\n WHAT_IS: \"WHAT_IS\",\n WHAT_WAS: \"WHAT_WAS\",\n VALUE_OF: \"VALUE_OF\",\n WORTH_IN: \"WORTH_IN\",\n // Savings goals (finance). Fused whole-phrase triggers, so \"how\", \"much\",\n // \"save\" and \"reach\" stay ordinary variable names, the same reason as the\n // other finance phrases above.\n SAVINGS_HOW_LONG: \"SAVINGS_HOW_LONG\",\n SAVINGS_HOW_MUCH: \"SAVINGS_HOW_MUCH\",\n // Bare single-word keyword (not phrase-fused) -- \"assuming\" has\n // near-zero plausibility as a variable name, the same accepted-risk\n // category as this codebase's existing bare \"over\"/\"at\" keywords\n // (see the OVER/RATE_AT comment above). Registered so its bare word\n // is a recognized phrase-starter (`canStartPhrase`), which suppresses\n // implicit-multiply insertion between the futureYear NUMBER and this\n // word in \"value of $X in <year> assuming N% inflation\" -- without\n // this, \"<year> assuming\" was silently rewritten to \"<year> *\n // assuming\" before parsing ever ran.\n ASSUMING: \"ASSUMING\",\n // Fused by a custom NormalizerRule (not `phrases`), carrying the\n // year as its value -- see\n // finance/normalizer/InYearDollarsNormalizerRule.ts.\n IN_YEAR_DOLLARS: \"IN_YEAR_DOLLARS\",\n // Cooking/UoM (packages/uom/) -- fused ingredient name (single- or\n // multi-word, e.g. \"butter\"/\"olive oil\") carrying the matched name\n // as its value. NOT a bare-word phrase-trie keyword -- see\n // uom/normalizer/IngredientNameNormalizerRule.ts's doc comment for\n // why this is a context-sensitive NormalizerRule instead (so a bare\n // `:butter = 5` variable definition is completely unaffected).\n INGREDIENT_NAME: \"INGREDIENT_NAME\",\n // ── Datetime, workdays/weekdays/timestamps (packages/datetime/) ──\n // Fused phrase tokens (see DatetimePackage.ts's `phrases` field)\n // deliberately NOT bare single-word keywords: \"workdays\"/\"weekday\"/\n // \"timestamp\"/\"date\" are all plausible variable names, same\n // reasoning/regression risk as MathPhrasesPackage.ts's \"total\" note and\n // FinancePackage.ts's \"tax\" note above. Fusing the full phrase means the\n // bare leading word itself never becomes its own token type, so e.g.\n // \":timestamp = 5\" keeps working.\n WORKDAYS_IN: \"WORKDAYS_IN\",\n WEEKDAY_ON: \"WEEKDAY_ON\",\n CURRENT_TIMESTAMP: \"CURRENT_TIMESTAMP\",\n TO_DATE: \"TO_DATE\",\n TO_TIMESTAMP: \"TO_TIMESTAMP\",\n // Natural-question forms over the same date fields, \"what day is it in\n // 30 days\", \"what month is it on 25/12/2026\", \"what week is it\". Each is\n // a fully-fused phrase for the same reason as WEEKDAY_ON above: claiming\n // bare \"day\"/\"month\"/\"week\" as keywords would break \":day = 5\" and\n // collide with the UNIT tokens of the same name.\n WEEKDAY_IN: \"WEEKDAY_IN\",\n MONTH_ON: \"MONTH_ON\",\n MONTH_IN: \"MONTH_IN\",\n WEEK_ON: \"WEEK_ON\",\n DAYS_IN_PERIOD: \"DAYS_IN_PERIOD\",\n IN_TWO_UNITS: \"IN_TWO_UNITS\",\n PER_UNIT: \"PER_UNIT\",\n AT_RATE: \"AT_RATE\",\n WEEK_IN: \"WEEK_IN\",\n // `<unit> between <date> and <date>`, fused UNIT+BETWEEN, exactly like\n // UNTIL_UNIT/SINCE_UNIT above.\n BETWEEN_UNIT: \"BETWEEN_UNIT\",\n // Business-day arithmetic in words, \"N working/business days after|from|\n // before <date>\" (infix, the count is the left operand) and \"working/\n // business days between <date> and <date>\" (prefix). Full phrases for the\n // same reason as WORKDAYS_IN above: \"working\"/\"business\" are ordinary words,\n // so only the complete phrase is claimed, never the bare leading word. See\n // WorkdayOffsetParselet.ts / WorkdaysBetweenParselet.ts.\n WORKDAYS_AFTER: \"WORKDAYS_AFTER\",\n WORKDAYS_BEFORE: \"WORKDAYS_BEFORE\",\n WORKDAYS_BETWEEN: \"WORKDAYS_BETWEEN\",\n // Postfix day-type predicates, \"<date> is a weekend\" / \"is a workday\".\n IS_WEEKEND: \"IS_WEEKEND\",\n IS_WORKDAY: \"IS_WORKDAY\",\n // ── Time, video timecode (packages/time/) ──\n // Fused from a raw `HH:MM:SS:FF` token sequence (see\n // packages/time/normalizer/VideoTimecodeNormalizerRule.ts) and from\n // `NUMBER frames` (see FrameCountNormalizerRule.ts), not a bare-keyword\n // collision risk the way the datetime tokens above are, since neither\n // fusion claims a plain English word as its own token type.\n VIDEO_TIMECODE: \"VIDEO_TIMECODE\",\n FRAME_COUNT: \"FRAME_COUNT\",\n // \"@\". See ExpressionLexer.ts's OP_MAP entry for why this was\n // previously dormant/unproduced despite being anticipated by name here\n // and in TokenNormalizer.ts's NON_WORD_NAMES.\n AT: \"AT\",\n // Generic token for every currency symbol added AFTER the original\n // DOLLAR/POUND/EURO/YEN/RUBLE/WON set (each of which kept its own\n // specific token type for backward compatibility). See\n // uom/CurrencyAliases.ts's CURRENCY_SYMBOL_ALIASES and\n // ExpressionLexer.ts's dispatch for the full symbol list. One shared\n // type avoids needing a new TokenTypes entry + TokenCategoryMap entry +\n // CurrencyPackage.ts prefixParselets entry per additional symbol.\n CURRENCY_SYMBOL: \"CURRENCY_SYMBOL\",\n // ── Cross-line data access (packages/lines/) ──\n // \"prev\" -- bare keyword (nothing to phrase-fuse against, same shape as\n // CLAMP -- accepted collision risk per that package's own precedent).\n PREV: \"PREV\",\n // \"line1\" / \"line 1\" / \"l1\" -- fused by LineRefNormalizerRule (never a\n // bare lexer keyword, so \":line = 5\"/\":l = 5\" stay untouched). Carries\n // the parsed line number as its .value.\n LINE_REF: \"LINE_REF\",\n // \"sum(\" / \"total(\" -- fused ONLY when immediately followed by LPAREN\n // (see LineRefNormalizerRule's lookahead guard), so \":sum = 100\" and\n // MathPhrases' \"total of X, Y\" (no paren after \"of\") are unaffected.\n SUM_RANGE_CALL: \"SUM_RANGE_CALL\",\n AVERAGE_RANGE_CALL: \"AVERAGE_RANGE_CALL\",\n // \"total above\" / \"sum above\" / \"average above\" -- phrase-fused (see\n // LinesPackage.ts's `phrases` field), a deliberate departure from\n // Numi/Numbr's bare \"total\"/\"sum\" wording to avoid the exact bare-\n // keyword collision this codebase already regressed on once.\n TOTAL_ABOVE: \"TOTAL_ABOVE\",\n SUM_ABOVE: \"SUM_ABOVE\",\n AVERAGE_ABOVE: \"AVERAGE_ABOVE\",\n // ── Goal seek (packages/goalseek/) ──\n // \"solve line 4 for rate = 900\" -- fused by GoalSeekNormalizerRule when the\n // bare word \"solve\" is immediately followed by a LINE_REF (never a bare\n // lexer keyword, so \":solve = 2\" and the existing \"solve(...)\" call form\n // both stay untouched, since neither is \"solve\" directly before a LINE_REF).\n GOAL_SEEK: \"GOAL_SEEK\",\n} as const;\n\n/**\n * A token's kind, as a string.\n *\n * Deliberately open rather than an enum: a package registers its own token\n * types at runtime, and a closed set would make that impossible.\n */\nexport type TokenType = (typeof TokenTypes)[keyof typeof TokenTypes];\n\n// ── Integer Token Type ID System ──────────────────────────────────────────────\n// Enables O(1) integer comparison in Parser hot path instead of string hashing.\n\n/** Auto-incrementing integer ID for each token type. */\nlet _nextTokenTypeId = 0;\n\n/** String → integer ID lookup. Populated lazily via registerTokenType(). */\nconst _tokenTypeNameToId = new Map<string, number>();\n\n/** Integer ID → string lookup. For debug/error messages. */\nconst _tokenTypeIdToName = new Map<number, string>();\n\n/**\n * Register a token type name and get back its integer ID.\n * Idempotent, returns existing ID if already registered.\n * Call once per token type at module initialization time.\n */\nexport function registerTokenType(name: string): number {\n\tconst existing = _tokenTypeNameToId.get(name);\n\tif (existing !== undefined) return existing;\n\tconst id = _nextTokenTypeId++;\n\t_tokenTypeNameToId.set(name, id);\n\t_tokenTypeIdToName.set(id, name);\n\treturn id;\n}\n\n/**\n * Get the integer ID for a token type name.\n * Lazily registers unknown token types on first access, enabling plugin providers\n * to define custom token types (VEC2, VEC3, etc.) without pre-registration.\n * All built-in TokenTypes are pre-registered via registerAllTokenTypes().\n */\nexport function tokenTypeId(name: string): number {\n\treturn registerTokenType(name); // registerTokenType is idempotent\n}\n\n/**\n * Get the string name for a token type ID (for error messages and debugging).\n * Returns `UNKNOWN_${id}` if the ID is not registered.\n */\nexport function tokenTypeName(id: number): string {\n\treturn _tokenTypeIdToName.get(id) ?? `UNKNOWN_${id}`;\n}\n\n/**\n * Bootstrap all known token types from TokenTypes at module load.\n * Call this once after TokenTypes is defined.\n */\nexport function registerAllTokenTypes(): void {\n\tfor (const name of Object.values(TokenTypes)) {\n\t\tregisterTokenType(name);\n\t}\n}\n"]}
|
package/dist/chunk-NLNDMWZC.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { QueryClient } from '@tanstack/query-core';
|
|
2
|
-
|
|
3
|
-
// src/services/DataQueryService.ts
|
|
4
|
-
var _activeQueryClient = null;
|
|
5
|
-
function setActiveQueryClient(qc) {
|
|
6
|
-
_activeQueryClient = qc;
|
|
7
|
-
}
|
|
8
|
-
function getActiveQueryClient() {
|
|
9
|
-
return _activeQueryClient;
|
|
10
|
-
}
|
|
11
|
-
function createQueryClient() {
|
|
12
|
-
return new QueryClient({
|
|
13
|
-
defaultOptions: {
|
|
14
|
-
queries: {
|
|
15
|
-
staleTime: 5 * 60 * 1e3,
|
|
16
|
-
// 5 minutes
|
|
17
|
-
gcTime: 10 * 60 * 1e3,
|
|
18
|
-
// 10 minutes
|
|
19
|
-
retry: 3,
|
|
20
|
-
retryDelay: (attempt) => Math.min(500 * 2 ** attempt, 5e3),
|
|
21
|
-
refetchOnWindowFocus: false,
|
|
22
|
-
refetchOnReconnect: false
|
|
23
|
-
// Not relevant in Obsidian plugin context
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { createQueryClient, getActiveQueryClient, setActiveQueryClient };
|
|
30
|
-
//# sourceMappingURL=chunk-NLNDMWZC.js.map
|
|
31
|
-
//# sourceMappingURL=chunk-NLNDMWZC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/services/DataQueryService.ts"],"names":[],"mappings":";;;AA2BA,IAAI,kBAAA,GAAyC,IAAA;AAGtC,SAAS,qBAAqB,EAAA,EAA8B;AACjE,EAAA,kBAAA,GAAqB,EAAA;AACvB;AAGO,SAAS,oBAAA,GAA2C;AACzD,EAAA,OAAO,kBAAA;AACT;AAMO,SAAS,iBAAA,GAAiC;AAC/C,EAAA,OAAO,IAAI,WAAA,CAAY;AAAA,IACrB,cAAA,EAAgB;AAAA,MACd,OAAA,EAAS;AAAA,QACP,SAAA,EAAW,IAAI,EAAA,GAAK,GAAA;AAAA;AAAA,QACpB,MAAA,EAAQ,KAAK,EAAA,GAAK,GAAA;AAAA;AAAA,QAClB,KAAA,EAAO,CAAA;AAAA,QACP,UAAA,EAAY,CAAC,OAAA,KAAY,IAAA,CAAK,IAAI,GAAA,GAAM,CAAA,IAAK,SAAS,GAAI,CAAA;AAAA,QAC1D,oBAAA,EAAsB,KAAA;AAAA,QACtB,kBAAA,EAAoB;AAAA;AAAA;AACtB;AACF,GACD,CAAA;AACH","file":"chunk-NLNDMWZC.js","sourcesContent":["/**\n * QueryClient factory for the solve-js engine.\n *\n * Creates a TanStack Query QueryClient with sensible defaults for\n * stale-while-revalidate, garbage collection, and retry behavior.\n * The QueryClient is injected into resolvers via the engine, so\n * no global singleton is needed.\n *\n * Removed in this refactor:\n * - DataQueryWorker (worker thread), doesn't solve anything in Obsidian's single-threaded env\n * - localCache (raw Map), replaced by TanStack Query's built-in cache\n * - pendingQueries (manual promise plumbing), TanStack Query handles dedup\n * - DataSourceHandle, registerDataSource, unregisterDataSource, no longer needed\n * - cleanupCache timer, TanStack Query's gc does this automatically\n * - cacheUpdateListeners / errorListeners, TanStack Query has its own observer API\n */\n\nimport { QueryClient } from \"@tanstack/query-core\";\n\n// ── Active query client (execution context) ───────────────────────────────\n// Synchronous VM plugin functions (dispatched via CALL_PLUGIN) can't receive\n// the engine's QueryClient through their (args) => Value ABI, so the engine\n// publishes the client here before each execution and package handlers read\n// it back. This module is the package-agnostic home for that hand-off\n// the engine must not import from a specific package (e.g. packages/osrs)\n// to wire it.\n\nlet _activeQueryClient: QueryClient | null = null;\n\n/** Publish the QueryClient for the execution about to run. Set by the engine. */\nexport function setActiveQueryClient(qc: QueryClient | null): void {\n _activeQueryClient = qc;\n}\n\n/** Read the QueryClient of the currently executing engine, if any. */\nexport function getActiveQueryClient(): QueryClient | null {\n return _activeQueryClient;\n}\n\n/**\n * Create a new TanStack Query QueryClient with project defaults.\n * Each engine instance gets its own client for isolation.\n */\nexport function createQueryClient(): QueryClient {\n return new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000, // 5 minutes\n gcTime: 10 * 60 * 1000, // 10 minutes\n retry: 3,\n retryDelay: (attempt) => Math.min(500 * 2 ** attempt, 5000),\n refetchOnWindowFocus: false,\n refetchOnReconnect: false, // Not relevant in Obsidian plugin context\n },\n },\n });\n}\n"]}
|