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.
Files changed (384) hide show
  1. package/README.md +12 -17
  2. package/dist/{BytecodeBuilder-Bp9xeTmX.d.cts → BytecodeBuilder-DGGeByAP.d.cts} +18 -0
  3. package/dist/{BytecodeBuilder-Bp9xeTmX.d.ts → BytecodeBuilder-DGGeByAP.d.ts} +18 -0
  4. package/dist/{Configuration-C9W8tJv_.d.cts → Configuration-B6W0-T67.d.cts} +17 -4
  5. package/dist/{Configuration-C9W8tJv_.d.ts → Configuration-B6W0-T67.d.ts} +17 -4
  6. package/dist/{EngineError-CNA_rHY-.d.cts → EngineError-Ce1lPkjZ.d.cts} +2 -0
  7. package/dist/{EngineError-CNA_rHY-.d.ts → EngineError-Ce1lPkjZ.d.ts} +2 -0
  8. package/dist/{PackageCompatibility-B6NX9IaN.d.cts → PackageCompatibility-Bn5jnBtA.d.cts} +2 -2
  9. package/dist/{PackageCompatibility-Ceg5XdAp.d.ts → PackageCompatibility-CIvq2MP5.d.ts} +2 -2
  10. package/dist/{PackageRegistry-DrCPQNyy.d.ts → PackageRegistry-DzeiWcv4.d.ts} +93 -172
  11. package/dist/{PackageRegistry-DnJYVw9G.d.cts → PackageRegistry-dpdurBVO.d.cts} +93 -172
  12. package/dist/{Parselet-Bhf7d0_W.d.ts → Parselet-B-zoPrTa.d.ts} +8 -5
  13. package/dist/{Parselet-Cv7S7KRt.d.cts → Parselet-C4Wu055_.d.cts} +8 -5
  14. package/dist/{ScopeManager-Bzq87GfA.d.ts → ScopeManager-C2LDOrDx.d.ts} +7 -16
  15. package/dist/{ScopeManager-DRDBVfan.d.cts → ScopeManager-D7uMXbhS.d.cts} +7 -16
  16. package/dist/{VMCheckpoints-C6c17Hbo.d.ts → VMCheckpoints-CGyFhivM.d.ts} +3 -3
  17. package/dist/{VMCheckpoints-dZxSMGHG.d.cts → VMCheckpoints-I9jg3jWR.d.cts} +3 -3
  18. package/dist/{Value-DZNQ_PU7.d.cts → Value-CCi_Eecs.d.cts} +40 -0
  19. package/dist/{Value-DZNQ_PU7.d.ts → Value-CCi_Eecs.d.ts} +40 -0
  20. package/dist/{WorkerError-Djd7GGGa.d.cts → WorkerError-B4p6PNfx.d.cts} +1 -1
  21. package/dist/{WorkerError-B7t7R2-m.d.ts → WorkerError-Dhj9BQ_A.d.ts} +1 -1
  22. package/dist/chunk-2JMFUQZH.js +2 -0
  23. package/dist/chunk-2JMFUQZH.js.map +1 -0
  24. package/dist/chunk-2RWAXT6O.js +0 -1
  25. package/dist/chunk-4BZIYU7S.cjs +3 -0
  26. package/dist/chunk-4BZIYU7S.cjs.map +1 -0
  27. package/dist/chunk-4J7XZSZJ.cjs +5 -0
  28. package/dist/chunk-4J7XZSZJ.cjs.map +1 -0
  29. package/dist/chunk-4QVBSG6B.cjs +2 -0
  30. package/dist/chunk-4QVBSG6B.cjs.map +1 -0
  31. package/dist/chunk-5IJD5L3O.cjs +2 -0
  32. package/dist/chunk-5IJD5L3O.cjs.map +1 -0
  33. package/dist/chunk-62LMTO4F.js +2 -0
  34. package/dist/chunk-62LMTO4F.js.map +1 -0
  35. package/dist/chunk-6CY44ZPG.js +2 -0
  36. package/dist/chunk-6CY44ZPG.js.map +1 -0
  37. package/dist/chunk-6G3PMEPA.js +2 -0
  38. package/dist/chunk-6G3PMEPA.js.map +1 -0
  39. package/dist/chunk-6INX773F.cjs +2 -0
  40. package/dist/chunk-6INX773F.cjs.map +1 -0
  41. package/dist/chunk-6KFVG6UY.cjs +2 -0
  42. package/dist/{chunk-YJHY7CMN.cjs.map → chunk-6KFVG6UY.cjs.map} +1 -1
  43. package/dist/chunk-76F3LCIL.js +4 -0
  44. package/dist/chunk-76F3LCIL.js.map +1 -0
  45. package/dist/chunk-7GK3XEZF.js +2 -0
  46. package/dist/chunk-7GK3XEZF.js.map +1 -0
  47. package/dist/chunk-APN442VD.cjs +2 -0
  48. package/dist/chunk-APN442VD.cjs.map +1 -0
  49. package/dist/chunk-AXMQG5TS.cjs +2 -0
  50. package/dist/chunk-AXMQG5TS.cjs.map +1 -0
  51. package/dist/chunk-CIQOK7Q4.cjs +2 -0
  52. package/dist/chunk-CIQOK7Q4.cjs.map +1 -0
  53. package/dist/chunk-E6Z4NQAS.js +2 -0
  54. package/dist/chunk-E6Z4NQAS.js.map +1 -0
  55. package/dist/chunk-EFJCC6FJ.cjs +2 -0
  56. package/dist/chunk-EFJCC6FJ.cjs.map +1 -0
  57. package/dist/chunk-ESUN2THE.cjs +2 -0
  58. package/dist/chunk-ESUN2THE.cjs.map +1 -0
  59. package/dist/chunk-EVAOPEO4.js +2 -0
  60. package/dist/chunk-EVAOPEO4.js.map +1 -0
  61. package/dist/chunk-EYRBENHC.js +3 -0
  62. package/dist/chunk-EYRBENHC.js.map +1 -0
  63. package/dist/chunk-FDE5HWDI.cjs +2 -0
  64. package/dist/chunk-FDE5HWDI.cjs.map +1 -0
  65. package/dist/chunk-FWW3M36J.cjs +2 -0
  66. package/dist/chunk-FWW3M36J.cjs.map +1 -0
  67. package/dist/chunk-GOIQYUWV.js +2 -0
  68. package/dist/chunk-GOIQYUWV.js.map +1 -0
  69. package/dist/chunk-HFKDWQUL.js +2 -0
  70. package/dist/chunk-HFKDWQUL.js.map +1 -0
  71. package/dist/chunk-HLBYHXQD.cjs +3 -0
  72. package/dist/chunk-HLBYHXQD.cjs.map +1 -0
  73. package/dist/chunk-IANAMBJQ.cjs +2 -0
  74. package/dist/chunk-IANAMBJQ.cjs.map +1 -0
  75. package/dist/chunk-IJMNVBIS.js +2 -0
  76. package/dist/chunk-IJMNVBIS.js.map +1 -0
  77. package/dist/chunk-J4LZD4ZY.js +3 -0
  78. package/dist/chunk-J4LZD4ZY.js.map +1 -0
  79. package/dist/chunk-JAK3RAFA.cjs +2 -0
  80. package/dist/chunk-JAK3RAFA.cjs.map +1 -0
  81. package/dist/chunk-JFAJN3C2.cjs +2 -0
  82. package/dist/chunk-JFAJN3C2.cjs.map +1 -0
  83. package/dist/chunk-JPFCXLJV.js +2 -0
  84. package/dist/chunk-JPFCXLJV.js.map +1 -0
  85. package/dist/chunk-JSPKKNPQ.js +3 -0
  86. package/dist/chunk-JSPKKNPQ.js.map +1 -0
  87. package/dist/chunk-L3FPQSGN.js +2 -0
  88. package/dist/chunk-L3FPQSGN.js.map +1 -0
  89. package/dist/chunk-LR4E4A4W.cjs +2 -0
  90. package/dist/chunk-LR4E4A4W.cjs.map +1 -0
  91. package/dist/chunk-MIQBJGGR.js +2 -0
  92. package/dist/chunk-MIQBJGGR.js.map +1 -0
  93. package/dist/chunk-MPB7KUN5.js +3 -0
  94. package/dist/chunk-MPB7KUN5.js.map +1 -0
  95. package/dist/chunk-MSYX32PF.cjs +2 -0
  96. package/dist/chunk-MSYX32PF.cjs.map +1 -0
  97. package/dist/chunk-MVZUTETT.js +2 -0
  98. package/dist/chunk-MVZUTETT.js.map +1 -0
  99. package/dist/chunk-N7N7MPMK.cjs +2 -0
  100. package/dist/chunk-N7N7MPMK.cjs.map +1 -0
  101. package/dist/chunk-NGBBNL4K.cjs +1 -3
  102. package/dist/chunk-P6WPEUAJ.cjs +2 -0
  103. package/dist/chunk-P6WPEUAJ.cjs.map +1 -0
  104. package/dist/chunk-PS272DZJ.cjs +2 -0
  105. package/dist/chunk-PS272DZJ.cjs.map +1 -0
  106. package/dist/chunk-QXQE7X4S.js +2 -0
  107. package/dist/chunk-QXQE7X4S.js.map +1 -0
  108. package/dist/chunk-R2ENWQ76.js +2 -0
  109. package/dist/chunk-R2ENWQ76.js.map +1 -0
  110. package/dist/chunk-R2SZFJTT.cjs +2 -0
  111. package/dist/chunk-R2SZFJTT.cjs.map +1 -0
  112. package/dist/chunk-RAF57WYO.js +2 -0
  113. package/dist/chunk-RAF57WYO.js.map +1 -0
  114. package/dist/chunk-RSF25YSJ.js +2 -0
  115. package/dist/chunk-RSF25YSJ.js.map +1 -0
  116. package/dist/chunk-SOMGSIO4.cjs +3 -0
  117. package/dist/chunk-SOMGSIO4.cjs.map +1 -0
  118. package/dist/chunk-SUXRZWH2.cjs +3 -0
  119. package/dist/chunk-SUXRZWH2.cjs.map +1 -0
  120. package/dist/chunk-SYYE3QAX.cjs +2 -0
  121. package/dist/chunk-SYYE3QAX.cjs.map +1 -0
  122. package/dist/chunk-SZGK6RIP.cjs +2 -0
  123. package/dist/chunk-SZGK6RIP.cjs.map +1 -0
  124. package/dist/chunk-TCZSPH4A.js +2 -0
  125. package/dist/chunk-TCZSPH4A.js.map +1 -0
  126. package/dist/chunk-TLG7VZRX.cjs +2 -0
  127. package/dist/chunk-TLG7VZRX.cjs.map +1 -0
  128. package/dist/chunk-TRBXW6HW.js +2 -0
  129. package/dist/{chunk-AQNHHJMJ.cjs.map → chunk-TRBXW6HW.js.map} +1 -1
  130. package/dist/chunk-TTFO4YDP.cjs +2 -0
  131. package/dist/chunk-TTFO4YDP.cjs.map +1 -0
  132. package/dist/chunk-TWC7K3ZX.js +2 -0
  133. package/dist/chunk-TWC7K3ZX.js.map +1 -0
  134. package/dist/chunk-UDQ57ZRX.cjs +2 -0
  135. package/dist/chunk-UDQ57ZRX.cjs.map +1 -0
  136. package/dist/chunk-UI6IFGBT.js +2 -0
  137. package/dist/chunk-UI6IFGBT.js.map +1 -0
  138. package/dist/chunk-UURM7P3P.cjs +4 -0
  139. package/dist/chunk-UURM7P3P.cjs.map +1 -0
  140. package/dist/chunk-W2JAR233.js +2 -0
  141. package/dist/chunk-W2JAR233.js.map +1 -0
  142. package/dist/chunk-WGZ3FNHI.js +2 -0
  143. package/dist/chunk-WGZ3FNHI.js.map +1 -0
  144. package/dist/chunk-WN5CMP4T.cjs +3 -0
  145. package/dist/chunk-WN5CMP4T.cjs.map +1 -0
  146. package/dist/chunk-XEIDV5JP.js +2 -0
  147. package/dist/chunk-XEIDV5JP.js.map +1 -0
  148. package/dist/chunk-XNIWQHXY.js +2 -0
  149. package/dist/chunk-XNIWQHXY.js.map +1 -0
  150. package/dist/chunk-XR7HEC7B.js +5 -0
  151. package/dist/chunk-XR7HEC7B.js.map +1 -0
  152. package/dist/chunk-Y7O4D3BJ.cjs +2 -0
  153. package/dist/chunk-Y7O4D3BJ.cjs.map +1 -0
  154. package/dist/chunk-YAYBVVG2.js +3 -0
  155. package/dist/chunk-YAYBVVG2.js.map +1 -0
  156. package/dist/chunk-YJ2OPULK.js +2 -0
  157. package/dist/chunk-YJ2OPULK.js.map +1 -0
  158. package/dist/chunk-YVKHEAFT.js +2 -0
  159. package/dist/chunk-YVKHEAFT.js.map +1 -0
  160. package/dist/chunk-ZCNBT44X.cjs +2 -0
  161. package/dist/chunk-ZCNBT44X.cjs.map +1 -0
  162. package/dist/chunk-ZLRJ7TDP.cjs +2 -0
  163. package/dist/chunk-ZLRJ7TDP.cjs.map +1 -0
  164. package/dist/constants.cjs +1 -21
  165. package/dist/constants.d.cts +1 -1
  166. package/dist/constants.d.ts +1 -1
  167. package/dist/constants.js +1 -4
  168. package/dist/engine.cjs +1 -94
  169. package/dist/engine.d.cts +10 -11
  170. package/dist/engine.d.ts +10 -11
  171. package/dist/engine.js +1 -37
  172. package/dist/errors.cjs +1 -105
  173. package/dist/errors.d.cts +3 -3
  174. package/dist/errors.d.ts +3 -3
  175. package/dist/errors.js +1 -4
  176. package/dist/format.cjs +1 -26
  177. package/dist/format.d.cts +2 -2
  178. package/dist/format.d.ts +2 -2
  179. package/dist/format.js +1 -9
  180. package/dist/index.cjs +1 -314
  181. package/dist/index.cjs.map +1 -1
  182. package/dist/index.d.cts +52 -20
  183. package/dist/index.d.ts +52 -20
  184. package/dist/index.js +1 -278
  185. package/dist/index.js.map +1 -1
  186. package/dist/language.cjs +1 -369
  187. package/dist/language.cjs.map +1 -1
  188. package/dist/language.d.cts +9 -10
  189. package/dist/language.d.ts +9 -10
  190. package/dist/language.js +1 -348
  191. package/dist/language.js.map +1 -1
  192. package/dist/lexer.cjs +1 -63
  193. package/dist/lexer.js +1 -10
  194. package/dist/normalizer.cjs +1 -39
  195. package/dist/normalizer.js +1 -10
  196. package/dist/packages.cjs +1 -132
  197. package/dist/packages.d.cts +8 -9
  198. package/dist/packages.d.ts +8 -9
  199. package/dist/packages.js +1 -23
  200. package/dist/parser.cjs +1 -54
  201. package/dist/parser.d.cts +8 -8
  202. package/dist/parser.d.ts +8 -8
  203. package/dist/parser.js +1 -9
  204. package/dist/{pipeline-D-PS9gVw.d.ts → pipeline-72QmQlGx.d.ts} +1 -1
  205. package/dist/{pipeline-DtSBJ8TS.d.cts → pipeline-DCQicwWX.d.cts} +1 -1
  206. package/dist/resolvers.cjs +1 -12
  207. package/dist/resolvers.d.cts +2 -2
  208. package/dist/resolvers.d.ts +2 -2
  209. package/dist/resolvers.js +1 -3
  210. package/dist/services.cjs +1 -20
  211. package/dist/services.js +1 -3
  212. package/dist/testing.cjs +3 -477
  213. package/dist/testing.cjs.map +1 -1
  214. package/dist/testing.d.cts +9 -10
  215. package/dist/testing.d.ts +9 -10
  216. package/dist/testing.js +3 -469
  217. package/dist/testing.js.map +1 -1
  218. package/dist/uom.cjs +1 -55
  219. package/dist/uom.d.cts +2 -2
  220. package/dist/uom.d.ts +2 -2
  221. package/dist/uom.js +1 -10
  222. package/dist/utilities.cjs +1 -36
  223. package/dist/utilities.js +1 -7
  224. package/dist/vm.cjs +1 -295
  225. package/dist/vm.cjs.map +1 -1
  226. package/dist/vm.d.cts +22 -10
  227. package/dist/vm.d.ts +22 -10
  228. package/dist/vm.js +1 -193
  229. package/dist/vm.js.map +1 -1
  230. package/dist/worker.cjs +2 -492
  231. package/dist/worker.cjs.map +1 -1
  232. package/dist/worker.d.cts +16 -17
  233. package/dist/worker.d.ts +16 -17
  234. package/dist/worker.js +2 -483
  235. package/dist/worker.js.map +1 -1
  236. package/package.json +1 -13
  237. package/dist/chunk-3BOK2LDK.js +0 -17
  238. package/dist/chunk-3BOK2LDK.js.map +0 -1
  239. package/dist/chunk-3VGDNEE3.js +0 -84
  240. package/dist/chunk-3VGDNEE3.js.map +0 -1
  241. package/dist/chunk-4K5W7EH2.cjs +0 -112
  242. package/dist/chunk-4K5W7EH2.cjs.map +0 -1
  243. package/dist/chunk-5EFKSKMA.js +0 -413
  244. package/dist/chunk-5EFKSKMA.js.map +0 -1
  245. package/dist/chunk-5HRB36DK.js +0 -405
  246. package/dist/chunk-5HRB36DK.js.map +0 -1
  247. package/dist/chunk-5ON7PUAZ.js +0 -12
  248. package/dist/chunk-5ON7PUAZ.js.map +0 -1
  249. package/dist/chunk-7AXJNQMF.cjs +0 -297
  250. package/dist/chunk-7AXJNQMF.cjs.map +0 -1
  251. package/dist/chunk-7JM3F4KL.js +0 -1795
  252. package/dist/chunk-7JM3F4KL.js.map +0 -1
  253. package/dist/chunk-7USV76HV.cjs +0 -341
  254. package/dist/chunk-7USV76HV.cjs.map +0 -1
  255. package/dist/chunk-A2DZ5BEJ.cjs +0 -1930
  256. package/dist/chunk-A2DZ5BEJ.cjs.map +0 -1
  257. package/dist/chunk-ADBA3XBE.cjs +0 -20
  258. package/dist/chunk-ADBA3XBE.cjs.map +0 -1
  259. package/dist/chunk-AKNGX4TZ.cjs +0 -236
  260. package/dist/chunk-AKNGX4TZ.cjs.map +0 -1
  261. package/dist/chunk-ALYRJ72W.cjs +0 -434
  262. package/dist/chunk-ALYRJ72W.cjs.map +0 -1
  263. package/dist/chunk-AMOJYLG2.cjs +0 -1692
  264. package/dist/chunk-AMOJYLG2.cjs.map +0 -1
  265. package/dist/chunk-AOH6UR2L.js +0 -825
  266. package/dist/chunk-AOH6UR2L.js.map +0 -1
  267. package/dist/chunk-AQNHHJMJ.cjs +0 -261
  268. package/dist/chunk-B7LXJ6LC.cjs +0 -36
  269. package/dist/chunk-B7LXJ6LC.cjs.map +0 -1
  270. package/dist/chunk-BESTLPRK.cjs +0 -6919
  271. package/dist/chunk-BESTLPRK.cjs.map +0 -1
  272. package/dist/chunk-BLI4NIQY.js +0 -98
  273. package/dist/chunk-BLI4NIQY.js.map +0 -1
  274. package/dist/chunk-BSPXMGIS.js +0 -455
  275. package/dist/chunk-BSPXMGIS.js.map +0 -1
  276. package/dist/chunk-C2OMO3WN.cjs +0 -2806
  277. package/dist/chunk-C2OMO3WN.cjs.map +0 -1
  278. package/dist/chunk-CSDQMDU2.js +0 -204
  279. package/dist/chunk-CSDQMDU2.js.map +0 -1
  280. package/dist/chunk-EJ3ILXX6.cjs +0 -223
  281. package/dist/chunk-EJ3ILXX6.cjs.map +0 -1
  282. package/dist/chunk-ENRIK36Q.cjs +0 -94
  283. package/dist/chunk-ENRIK36Q.cjs.map +0 -1
  284. package/dist/chunk-F4UB4XIL.js +0 -109
  285. package/dist/chunk-F4UB4XIL.js.map +0 -1
  286. package/dist/chunk-FD5ZZHEU.js +0 -92
  287. package/dist/chunk-FD5ZZHEU.js.map +0 -1
  288. package/dist/chunk-FE4RC37D.js +0 -2801
  289. package/dist/chunk-FE4RC37D.js.map +0 -1
  290. package/dist/chunk-FEAIOR7N.cjs +0 -91
  291. package/dist/chunk-FEAIOR7N.cjs.map +0 -1
  292. package/dist/chunk-FR7RNOPT.cjs +0 -3303
  293. package/dist/chunk-FR7RNOPT.cjs.map +0 -1
  294. package/dist/chunk-G2YPPLGX.cjs +0 -484
  295. package/dist/chunk-G2YPPLGX.cjs.map +0 -1
  296. package/dist/chunk-GCM5JHMX.js +0 -88
  297. package/dist/chunk-GCM5JHMX.js.map +0 -1
  298. package/dist/chunk-GDEU72RG.cjs +0 -829
  299. package/dist/chunk-GDEU72RG.cjs.map +0 -1
  300. package/dist/chunk-HKTQCQ4Z.cjs +0 -8383
  301. package/dist/chunk-HKTQCQ4Z.cjs.map +0 -1
  302. package/dist/chunk-HWHU642X.cjs +0 -316
  303. package/dist/chunk-HWHU642X.cjs.map +0 -1
  304. package/dist/chunk-ICEKS6YC.cjs +0 -507
  305. package/dist/chunk-ICEKS6YC.cjs.map +0 -1
  306. package/dist/chunk-IJGOFP2J.js +0 -6904
  307. package/dist/chunk-IJGOFP2J.js.map +0 -1
  308. package/dist/chunk-IQJGDZOP.js +0 -333
  309. package/dist/chunk-IQJGDZOP.js.map +0 -1
  310. package/dist/chunk-IT74O4BE.cjs +0 -456
  311. package/dist/chunk-IT74O4BE.cjs.map +0 -1
  312. package/dist/chunk-KXDQKVNX.cjs +0 -459
  313. package/dist/chunk-KXDQKVNX.cjs.map +0 -1
  314. package/dist/chunk-L2TE7PMO.cjs +0 -14
  315. package/dist/chunk-L2TE7PMO.cjs.map +0 -1
  316. package/dist/chunk-L5YHV6BQ.js +0 -499
  317. package/dist/chunk-L5YHV6BQ.js.map +0 -1
  318. package/dist/chunk-LO7HU5WB.cjs +0 -209
  319. package/dist/chunk-LO7HU5WB.cjs.map +0 -1
  320. package/dist/chunk-LSALB3IN.js +0 -292
  321. package/dist/chunk-LSALB3IN.js.map +0 -1
  322. package/dist/chunk-MI7OTUHL.cjs +0 -339
  323. package/dist/chunk-MI7OTUHL.cjs.map +0 -1
  324. package/dist/chunk-MIGXCBXT.cjs +0 -381
  325. package/dist/chunk-MIGXCBXT.cjs.map +0 -1
  326. package/dist/chunk-MVTOCRV2.js +0 -213
  327. package/dist/chunk-MVTOCRV2.js.map +0 -1
  328. package/dist/chunk-N7FNVFXW.cjs +0 -32
  329. package/dist/chunk-N7FNVFXW.cjs.map +0 -1
  330. package/dist/chunk-N7OA4WPJ.js +0 -362
  331. package/dist/chunk-N7OA4WPJ.js.map +0 -1
  332. package/dist/chunk-NAWZATKT.js +0 -478
  333. package/dist/chunk-NAWZATKT.js.map +0 -1
  334. package/dist/chunk-NLNDMWZC.js +0 -31
  335. package/dist/chunk-NLNDMWZC.js.map +0 -1
  336. package/dist/chunk-ORM7CHYZ.js +0 -1531
  337. package/dist/chunk-ORM7CHYZ.js.map +0 -1
  338. package/dist/chunk-OUHT5Z36.cjs +0 -393
  339. package/dist/chunk-OUHT5Z36.cjs.map +0 -1
  340. package/dist/chunk-PCZVMMWU.cjs +0 -74
  341. package/dist/chunk-PCZVMMWU.cjs.map +0 -1
  342. package/dist/chunk-RNKDIXDV.js +0 -336
  343. package/dist/chunk-RNKDIXDV.js.map +0 -1
  344. package/dist/chunk-SBUFNJVE.js +0 -258
  345. package/dist/chunk-SBUFNJVE.js.map +0 -1
  346. package/dist/chunk-TC6BTUSU.cjs +0 -1799
  347. package/dist/chunk-TC6BTUSU.cjs.map +0 -1
  348. package/dist/chunk-TPOK3UNI.js +0 -8355
  349. package/dist/chunk-TPOK3UNI.js.map +0 -1
  350. package/dist/chunk-UF6JG5SG.js +0 -312
  351. package/dist/chunk-UF6JG5SG.js.map +0 -1
  352. package/dist/chunk-UKQHXPGW.js +0 -30
  353. package/dist/chunk-UKQHXPGW.js.map +0 -1
  354. package/dist/chunk-V4XG5QF6.js +0 -1685
  355. package/dist/chunk-V4XG5QF6.js.map +0 -1
  356. package/dist/chunk-VEKIWQ3F.cjs +0 -39
  357. package/dist/chunk-VEKIWQ3F.cjs.map +0 -1
  358. package/dist/chunk-WMQRJTAO.js +0 -3266
  359. package/dist/chunk-WMQRJTAO.js.map +0 -1
  360. package/dist/chunk-X6K3HUOY.cjs +0 -86
  361. package/dist/chunk-X6K3HUOY.cjs.map +0 -1
  362. package/dist/chunk-XBTEO4OB.js +0 -391
  363. package/dist/chunk-XBTEO4OB.js.map +0 -1
  364. package/dist/chunk-XIYYHA65.cjs +0 -101
  365. package/dist/chunk-XIYYHA65.cjs.map +0 -1
  366. package/dist/chunk-YJHY7CMN.cjs +0 -1534
  367. package/dist/chunk-YLJ4XMA6.js +0 -33
  368. package/dist/chunk-YLJ4XMA6.js.map +0 -1
  369. package/dist/chunk-YNIWOYW6.js +0 -232
  370. package/dist/chunk-YNIWOYW6.js.map +0 -1
  371. package/dist/chunk-Z2XP767T.cjs +0 -35
  372. package/dist/chunk-Z2XP767T.cjs.map +0 -1
  373. package/dist/chunk-Z4X2RWOF.js +0 -37
  374. package/dist/chunk-Z4X2RWOF.js.map +0 -1
  375. package/dist/chunk-ZN6YYPIW.js +0 -67
  376. package/dist/chunk-ZN6YYPIW.js.map +0 -1
  377. package/dist/chunk-ZNFFTYWH.js +0 -1854
  378. package/dist/chunk-ZNFFTYWH.js.map +0 -1
  379. package/dist/variables.cjs +0 -17
  380. package/dist/variables.cjs.map +0 -1
  381. package/dist/variables.d.cts +0 -87
  382. package/dist/variables.d.ts +0 -87
  383. package/dist/variables.js +0 -4
  384. package/dist/variables.js.map +0 -1
@@ -1,209 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkMIGXCBXT_cjs = require('./chunk-MIGXCBXT.cjs');
4
-
5
- // package.json
6
- var version = "1.2.0";
7
-
8
- // src/constants/version.ts
9
- var ENGINE_VERSION = version;
10
-
11
- // src/constants/Configuration.ts
12
- var DEFAULT_CONFIG = {
13
- date: {
14
- // A century of workdays is about 26,000 steps, which is microseconds,
15
- // and past any offset a person means. The walk is what these bound; see
16
- // DateConfig above for why no other date offset needs a ceiling.
17
- maxOffsetYears: 100,
18
- minOffsetYears: -100,
19
- defaultFormat: "YYYY-MM-DD"
20
- },
21
- performance: {
22
- // Preserves the effective cache size the hardcoded (now-removed)
23
- // BYTECODE_CACHE_MAX_ENTRIES constant had, so wiring this field up
24
- // doesn't silently shrink the default cache for existing consumers.
25
- defaultCacheSize: 2e3,
26
- // Raised from the 10,000 this field was declared with, which was never
27
- // enforced and turned out to be under what this engine already supports:
28
- // its paging design is tested against a 20,000-line document
29
- // (`engine/PageManager.ts` and its spec) and its throughput benchmark
30
- // parses a 50,000-line one. Twice the largest of those, and the same
31
- // number `ConfigManager.validate()` already refuses to go above.
32
- //
33
- // Measured under a 256MB heap: setting a 100,000-line document costs
34
- // 64MB, evaluating every line of a 20,000-line one costs 106MB, and
35
- // 200,000 lines aborts the process before a single expression is looked
36
- // at. A host with a small heap should lower this; the ceiling is here to
37
- // stop the size that cannot work anywhere.
38
- maxDocumentLines: 1e5
39
- },
40
- validation: {
41
- maxExpressionLength: 2e3,
42
- maxComplexity: 500,
43
- maxNestingDepth: 50,
44
- autoBalanceParens: false
45
- },
46
- vm: {
47
- maxStackDepth: 200,
48
- maxInstructions: 5e4,
49
- // Two orders of magnitude above anything a person types by hand (the
50
- // longest range in the test suite is 1000 elements) and small enough
51
- // that expanding it is measured in milliseconds rather than in whether
52
- // the host survives.
53
- maxCollectionSize: 1e5,
54
- // Twenty times the single-collection ceiling above, so an expression may
55
- // legitimately handle a number of large collections, and two hundred
56
- // times below the allocation that took the process down.
57
- maxAllocatedElements: 2e6,
58
- // Six hundred times the largest call count any test or example makes
59
- // (five levels of composition is sixteen calls), and small enough that
60
- // the calls it does allow cost single-digit megabytes rather than the
61
- // heap. A document that needs more than ten thousand calls on one line
62
- // is doing something a calculator was not built for.
63
- maxFunctionCalls: 1e4,
64
- // A hundred bisection steps resolve an input to one part in 2^100, far
65
- // finer than any document needs and a firm stop for an untrusted one. A
66
- // continuous, monotonic relationship converges in tens of steps, well
67
- // under this; hitting it means the target is unreachable or the
68
- // relationship is not the smooth one goal seek assumes.
69
- maxGoalSeekIterations: 100
70
- },
71
- worker: {
72
- maxConcurrentWorkers: 4,
73
- idleTimeoutMs: 3e4,
74
- maxRetries: 3,
75
- baseBackoffMs: 1e3
76
- },
77
- diagnostic: {
78
- enabled: false,
79
- vmTraceEnabled: false
80
- }
81
- };
82
- function mergeEngineConfig(base, override) {
83
- return {
84
- date: { ...base.date, ...override.date },
85
- performance: { ...base.performance, ...override.performance },
86
- validation: { ...base.validation, ...override.validation },
87
- vm: { ...base.vm, ...override.vm },
88
- worker: { ...base.worker, ...override.worker },
89
- diagnostic: { ...base.diagnostic, ...override.diagnostic }
90
- };
91
- }
92
- var ConfigManager = class {
93
- constructor(config = {}) {
94
- this.config = mergeEngineConfig(DEFAULT_CONFIG, config);
95
- }
96
- /**
97
- * Get configuration value by path
98
- *
99
- * @param path - Dot-notation path to config value
100
- * @returns Configuration value
101
- */
102
- get(path) {
103
- const keys = path.split(".");
104
- let current = this.config;
105
- for (const key of keys) {
106
- if (current && typeof current === "object" && key in current) {
107
- current = current[key];
108
- } else {
109
- throw chunkMIGXCBXT_cjs.ErrorFactory.config(
110
- "CONFIG_PATH_NOT_FOUND",
111
- `Configuration path not found: ${path}`,
112
- { path }
113
- );
114
- }
115
- }
116
- return current;
117
- }
118
- /**
119
- * Set configuration value by path
120
- *
121
- * @param path - Dot-notation path to config value
122
- * @param value - New value
123
- */
124
- set(path, value) {
125
- const keys = path.split(".");
126
- if (keys.length < 2) {
127
- throw chunkMIGXCBXT_cjs.ErrorFactory.config(
128
- "INVALID_CONFIG_PATH",
129
- `Invalid path: ${path}. Must be in format 'section.property'`,
130
- { path }
131
- );
132
- }
133
- const section = keys[0];
134
- const property = keys[1];
135
- if (!(section in this.config)) {
136
- throw chunkMIGXCBXT_cjs.ErrorFactory.config(
137
- "CONFIG_SECTION_NOT_FOUND",
138
- `Configuration section not found: ${section}`,
139
- { section, path }
140
- );
141
- }
142
- const sectionConfig = this.config[section];
143
- if (sectionConfig && typeof sectionConfig === "object") {
144
- sectionConfig[property] = value;
145
- } else {
146
- throw chunkMIGXCBXT_cjs.ErrorFactory.config(
147
- "CONFIG_PROPERTY_NOT_FOUND",
148
- `Configuration property not found: ${path}`,
149
- { path }
150
- );
151
- }
152
- }
153
- /**
154
- * Get complete configuration.
155
- *
156
- * A detached copy, section objects included. A top-level spread would hand
157
- * the caller this manager's own section objects, so `getConfig().vm.x = 1`
158
- * would be an undeclared back door into {@link set}, bypassing its path
159
- * validation and reaching every later {@link get}.
160
- */
161
- getConfig() {
162
- return mergeEngineConfig(this.config, {});
163
- }
164
- /**
165
- * Update multiple configuration values
166
- */
167
- update(config) {
168
- this.config = mergeEngineConfig(this.config, config);
169
- }
170
- /**
171
- * Reset to default configuration.
172
- *
173
- * Goes through {@link mergeEngineConfig} for the same reason the constructor
174
- * does. A top-level `{ ...DEFAULT_CONFIG }` copies the six section
175
- * references, not the sections, so after a reset this manager's
176
- * `performance` object WAS `DEFAULT_CONFIG.performance` and the next
177
- * `set('performance.x', ...)` wrote into the module constant. That constant
178
- * is what every `ExpressionEngine` is built from, so one manager's reset
179
- * could change the cache size, instruction ceiling or allocation budget of
180
- * every engine constructed later in the process.
181
- */
182
- reset() {
183
- this.config = mergeEngineConfig(DEFAULT_CONFIG, {});
184
- }
185
- /**
186
- * Validate configuration values
187
- */
188
- validate() {
189
- const errors = [];
190
- if (this.config.performance.maxDocumentLines > 1e5) {
191
- errors.push("maxDocumentLines cannot exceed 100,000");
192
- }
193
- if (this.config.date.maxOffsetYears > 1e3) {
194
- errors.push("maxOffsetYears cannot exceed 1000");
195
- }
196
- return {
197
- valid: errors.length === 0,
198
- error: errors.join("; "),
199
- warnings: []
200
- };
201
- }
202
- };
203
-
204
- exports.ConfigManager = ConfigManager;
205
- exports.DEFAULT_CONFIG = DEFAULT_CONFIG;
206
- exports.ENGINE_VERSION = ENGINE_VERSION;
207
- exports.mergeEngineConfig = mergeEngineConfig;
208
- //# sourceMappingURL=chunk-LO7HU5WB.cjs.map
209
- //# sourceMappingURL=chunk-LO7HU5WB.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../package.json","../src/constants/version.ts","../src/constants/Configuration.ts"],"names":["ErrorFactory"],"mappings":";;;;;AAEE,IAAA,OAAA,GAAW,OAAA;;;ACcN,IAAM,cAAA,GAAyB;;;AC4R/B,IAAM,cAAA,GAA+B;AAAA,EACzC,IAAA,EAAM;AAAA;AAAA;AAAA;AAAA,IAIJ,cAAA,EAAgB,GAAA;AAAA,IAChB,cAAA,EAAgB,IAAA;AAAA,IAChB,aAAA,EAAe;AAAA,GACjB;AAAA,EACA,WAAA,EAAa;AAAA;AAAA;AAAA;AAAA,IAIX,gBAAA,EAAkB,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAalB,gBAAA,EAAkB;AAAA,GACpB;AAAA,EACC,UAAA,EAAY;AAAA,IACV,mBAAA,EAAqB,GAAA;AAAA,IACrB,aAAA,EAAe,GAAA;AAAA,IACf,eAAA,EA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AAEA,IAAA,OAAO;AAAA,MACL,KAAA,EAAO,OAAO,MAAA,KAAW,CAAA;AAAA,MACzB,KAAA,EAAO,MAAA,CAAO,IAAA,CAAK,IAAI,CAAA;AAAA,MACvB,UAAU;AAAC,KACb;AAAA,EACF;AACF","file":"chunk-LO7HU5WB.cjs","sourcesContent":["{\n \"name\": \"solve-engine\",\n \"version\": \"1.2.0\",\n \"description\": \"An embeddable expression engine for natural-language calculations: units, currencies, percentages, dates and matrices, with the parsing and evaluation plumbing already built.\",\n \"keywords\": [\n \"expression-evaluator\",\n \"calculator\",\n \"bytecode-vm\",\n \"parser\",\n \"lexer\",\n \"dsl\",\n \"markdown\",\n \"obsidian\"\n ],\n \"license\": \"MIT\",\n \"author\": \"Liam Riddell\",\n \"homepage\": \"https://liamriddell.github.io/solve-engine/\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/LiamRiddell/solve-engine.git\",\n \"directory\": \"packages/engine\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/LiamRiddell/solve-engine/issues\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"type\": \"module\",\n \"engines\": {\n \"node\": \">=22\"\n },\n \"files\": [\n \"dist\",\n \"LICENSE\"\n ],\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n },\n \"./engine\": {\n \"import\": {\n \"types\": \"./dist/engine.d.ts\",\n \"default\": \"./dist/engine.js\"\n },\n \"require\": {\n \"types\": \"./dist/engine.d.cts\",\n \"default\": \"./dist/engine.cjs\"\n }\n },\n \"./vm\": {\n \"import\": {\n \"types\": \"./dist/vm.d.ts\",\n \"default\": \"./dist/vm.js\"\n },\n \"require\": {\n \"types\": \"./dist/vm.d.cts\",\n \"default\": \"./dist/vm.cjs\"\n }\n },\n \"./format\": {\n \"import\": {\n \"types\": \"./dist/format.d.ts\",\n \"default\": \"./dist/format.js\"\n },\n \"require\": {\n \"types\": \"./dist/format.d.cts\",\n \"default\": \"./dist/format.cjs\"\n }\n },\n \"./language\": {\n \"import\": {\n \"types\": \"./dist/language.d.ts\",\n \"default\": \"./dist/language.js\"\n },\n \"require\": {\n \"types\": \"./dist/language.d.cts\",\n \"default\": \"./dist/language.cjs\"\n }\n },\n \"./packages\": {\n \"import\": {\n \"types\": \"./dist/packages.d.ts\",\n \"default\": \"./dist/packages.js\"\n },\n \"require\": {\n \"types\": \"./dist/packages.d.cts\",\n \"default\": \"./dist/packages.cjs\"\n }\n },\n \"./constants\": {\n \"import\": {\n \"types\": \"./dist/constants.d.ts\",\n \"default\": \"./dist/constants.js\"\n },\n \"require\": {\n \"types\": \"./dist/constants.d.cts\",\n \"default\": \"./dist/constants.cjs\"\n }\n },\n \"./lexer\": {\n \"import\": {\n \"types\": \"./dist/lexer.d.ts\",\n \"default\": \"./dist/lexer.js\"\n },\n \"require\": {\n \"types\": \"./dist/lexer.d.cts\",\n \"default\": \"./dist/lexer.cjs\"\n }\n },\n \"./parser\": {\n \"import\": {\n \"types\": \"./dist/parser.d.ts\",\n \"default\": \"./dist/parser.js\"\n },\n \"require\": {\n \"types\": \"./dist/parser.d.cts\",\n \"default\": \"./dist/parser.cjs\"\n }\n },\n \"./normalizer\": {\n \"import\": {\n \"types\": \"./dist/normalizer.d.ts\",\n \"default\": \"./dist/normalizer.js\"\n },\n \"require\": {\n \"types\": \"./dist/normalizer.d.cts\",\n \"default\": \"./dist/normalizer.cjs\"\n }\n },\n \"./variables\": {\n \"import\": {\n \"types\": \"./dist/variables.d.ts\",\n \"default\": \"./dist/variables.js\"\n },\n \"require\": {\n \"types\": \"./dist/variables.d.cts\",\n \"default\": \"./dist/variables.cjs\"\n }\n },\n \"./resolvers\": {\n \"import\": {\n \"types\": \"./dist/resolvers.d.ts\",\n \"default\": \"./dist/resolvers.js\"\n },\n \"require\": {\n \"types\": \"./dist/resolvers.d.cts\",\n \"default\": \"./dist/resolvers.cjs\"\n }\n },\n \"./errors\": {\n \"import\": {\n \"types\": \"./dist/errors.d.ts\",\n \"default\": \"./dist/errors.js\"\n },\n \"require\": {\n \"types\": \"./dist/errors.d.cts\",\n \"default\": \"./dist/errors.cjs\"\n }\n },\n \"./utilities\": {\n \"import\": {\n \"types\": \"./dist/utilities.d.ts\",\n \"default\": \"./dist/utilities.js\"\n },\n \"require\": {\n \"types\": \"./dist/utilities.d.cts\",\n \"default\": \"./dist/utilities.cjs\"\n }\n },\n \"./uom\": {\n \"import\": {\n \"types\": \"./dist/uom.d.ts\",\n \"default\": \"./dist/uom.js\"\n },\n \"require\": {\n \"types\": \"./dist/uom.d.cts\",\n \"default\": \"./dist/uom.cjs\"\n }\n },\n \"./services\": {\n \"import\": {\n \"types\": \"./dist/services.d.ts\",\n \"default\": \"./dist/services.js\"\n },\n \"require\": {\n \"types\": \"./dist/services.d.cts\",\n \"default\": \"./dist/services.cjs\"\n }\n },\n \"./worker\": {\n \"import\": {\n \"types\": \"./dist/worker.d.ts\",\n \"default\": \"./dist/worker.js\"\n },\n \"require\": {\n \"types\": \"./dist/worker.d.cts\",\n \"default\": \"./dist/worker.cjs\"\n }\n },\n \"./testing\": {\n \"import\": {\n \"types\": \"./dist/testing.d.ts\",\n \"default\": \"./dist/testing.js\"\n },\n \"require\": {\n \"types\": \"./dist/testing.d.cts\",\n \"default\": \"./dist/testing.cjs\"\n }\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"prepublishOnly\": \"npm run build && node ../../scripts/assert-publishable.mjs .\",\n \"dev\": \"tsup --watch\",\n \"test\": \"jest --config jest.config.cjs --no-coverage\",\n \"typecheck\": \"tsgo --noEmit --skipLibCheck\",\n \"typecheck:tsc\": \"tsc --noEmit --skipLibCheck\"\n },\n \"dependencies\": {\n \"@tanstack/query-core\": \"^5.100.10\"\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^30.4.1\",\n \"@types/node\": \"^26.2.0\",\n \"@types/semver\": \"^7.5.0\",\n \"convert\": \"^7.0.0\",\n \"jest\": \"^30.4.2\",\n \"semver\": \"^7.6.0\",\n \"ts-jest\": \"^29.4.12\",\n \"tsup\": \"8.5.1\",\n \"typescript\": \"5.9.3\"\n },\n \"//sideEffects\": \"Load-bearing claim, not boilerplate. tsup's splitting emits bare chunk imports at the top of dist/index.js, and this field tells Rollup, webpack and Vite they may delete them, which esbuild reports as [ignored-bare-import] once per import during `npm run size`. The engine does have module-level work to lose: registerAllTokenTypes(), _PrecedenceParser.BP_TABLE and its cached token ids, and several process-wide registries. It is safe because every chunk doing that work is also imported for its bindings somewhere, so no bundler can drop it. That is a property of how tsup currently splits the code rather than a design guarantee, so `npm run smoke:bundled` (scripts/check-tree-shaking.mjs) proves it on every run of `npm run verify` instead of assuming it, and its header explains the two fixes if it ever stops holding.\",\n \"sideEffects\": false\n}\n","/**\n * The running engine's own semver version, sourced directly from this\n * package's package.json so it can never drift from what's actually\n * published. Exists so IEnginePackage.engineVersion range checks\n * (api/EngineVersionCompatibility.ts) have something real to check\n * against.\n */\nimport { version } from \"../../package.json\";\n\n/**\n * The running engine's version, taken from package.json.\n *\n * What a package's `engineVersion` range is checked against at registration.\n * A prerelease is compared by its coerced release version, so a 1.0.0 beta\n * satisfies `^1.0.0`. See `api/EngineVersionCompatibility.ts`.\n */\nexport const ENGINE_VERSION: string = version;\n","/**\n * Configuration Module for solve-js Engine\n * \n * This module provides the **single source of truth** for all engine configuration.\n * Every configurable aspect of the engine, from safety limits and performance\n * budgets to VM constraints and worker pool sizing, is defined here.\n * \n * ### Design principles\n * \n * 1. **Engine owns its config.** The engine defines its own config shape and defaults.\n * Consumers (e.g., the Obsidian plugin) pass partial overrides; all unspecified\n * fields fall back to `DEFAULT_CONFIG`.\n * \n * 2. **Self-documenting.** Every interface and field has descriptive JSDoc so the\n * config is understandable at a glance, whether you're using the engine as an\n * npm package or reading the source.\n * \n * 3. **Minimal consumer knowledge.** Consumers only need to pass `Partial<EngineConfig>`.\n * They don't need to replicate the full config shape, just the fields they\n * want to override.\n * \n * @module Configuration\n */\n\nimport { ErrorFactory } from \"@solve-js/errors/UnifiedErrorFramework\";\n\n/**\n * A host's test for whether a calendar date is a public holiday, given the\n * `Date` for that day at local midnight. Return `true` to exclude it from\n * working-day arithmetic.\n */\nexport type HolidayPredicate = (date: Date) => boolean;\n\n/**\n * The host-supplied public-holiday calendar, in the same \"bring your own data\"\n * shape the stocks and weather packages already use for a host callback (see\n * `packages/stocks/StocksPackage.ts`): weekends are decidable from the date\n * alone, holidays are not, so they come from the host or not at all.\n *\n * Either a {@link HolidayPredicate}, for a host that computes holidays itself\n * (an existing library, a region rule), or an iterable of specific dates as\n * `YYYY-MM-DD` strings, epoch-millisecond numbers or `Date` objects, for a host\n * that just has a list. Resolved to one internal predicate by\n * `vm/HolidayCalendar.ts`'s `resolveHolidayPredicate()`.\n *\n * Left unset, working-day arithmetic skips weekends only, which is the honest\n * default: the engine excludes exactly the days it can prove are non-working.\n */\nexport type HolidayCalendar = HolidayPredicate | Iterable<string | number | Date>;\n\n/**\n * Date-related configuration.\n * Controls the bounds and formatting for date/time expression evaluation\n * (e.g., `today + 20 days`, `last monday`).\n */\nexport interface DateConfig {\n /**\n * How far forward a date offset whose COST grows with the offset may reach,\n * in years. Enforced by `vm/VM.ts`'s `addBusinessDays()`.\n *\n * Bounds the walk, not the calendar. Every other date offset in the engine\n * is arithmetic on a Date field, so `today + 100000 days` costs exactly what\n * one day costs and needs no ceiling; workdays are the one offset that has\n * to step day by day, because which days are skipped depends on where each\n * step lands. `today + 100000000 workdays` therefore froze the host for\n * thirteen seconds inside a single ADD opcode (where `vm.maxInstructions`\n * cannot see it) and then answered \"Invalid Date\", and a trillion never\n * returned at all.\n *\n * Release hardening: this field was declared, documented as a \"safety\n * limit\", and read nowhere, so it bounded nothing. A limit a host can\n * configure and the engine ignores is worse than no limit, because it reads\n * as protection that is not there.\n */\n readonly maxOffsetYears: number;\n /** How far BACK the same walk may reach, in years, as a negative number. See {@link maxOffsetYears}. */\n readonly minOffsetYears: number;\n /** Default date string format for display (moment.js format string) */\n readonly defaultFormat: string;\n /**\n * Public-holiday calendar for working-day arithmetic (`N working days after\n * <date>`, `working days between <date> and <date>`, `<date> + N workdays`).\n * See {@link HolidayCalendar}.\n *\n * Optional and unset by default: with no calendar, working-day arithmetic\n * skips weekends only. A host that wants holidays excluded too supplies one\n * here (`new ExpressionEngine(\"en\", false, { date: { holidays } })`), the\n * same way stocks and weather take a host data source. Threaded into the VM\n * by `engine/ExpressionEngine.ts` exactly as {@link maxOffsetYears} is,\n * because working-day math is a VM operation several grammar forms share, so\n * the calendar has to be one source the VM owns rather than per-package state\n * the VM cannot see.\n */\n readonly holidays?: HolidayCalendar;\n}\n\n/**\n * Performance-related configuration.\n * Controls caching, timeouts, and processing limits to prevent runaway\n * resource consumption on large documents.\n */\nexport interface PerformanceConfig {\n /**\n * Maximum number of entries in {@link ExpressionEngine}'s bytecode cache\n * (per-instance, keyed by expression text) before the oldest entry is\n * evicted. Raise this for documents with many distinct expressions if\n * repeated re-evaluation (e.g. scrolling) is re-parsing instead of\n * hitting cache, bug fix (release hardening pass): this field used to\n * be read nowhere; the cache size was a hardcoded, unconfigurable\n * constant. Note this does NOT bound {@link LineCache}, which has no\n * size limit of its own.\n */\n readonly defaultCacheSize: number;\n /**\n * Maximum lines a document may have for the engine to process it in one\n * pass. Enforced by `ExpressionEngine.parseDocument()` and by\n * `engine/DocumentModel.ts`'s `setDocument()`, the two entry points that\n * take a whole document.\n *\n * A document costs memory per line whatever each line says: a parsed line\n * record, a cache entry, a dependency-graph node. Two hundred thousand\n * lines of `1 + 1` therefore exhausted the heap and aborted the process\n * before any per-line limit had anything to object to, which is the same\n * shape of hole as an unbounded expression and needs the same kind of\n * ceiling. Refusing the document names the limit; a host that genuinely has\n * a larger one raises this field.\n *\n * Release hardening: declared and read nowhere until now.\n */\n readonly maxDocumentLines: number;\n}\n\n/**\n * Validation / safety-limit configuration.\n * Protects against runaway expressions that could cause excessive memory use\n * or stack overflow. These limits are checked during lexing and parsing.\n */\n/** Bounds on untrusted input: expression length and nesting depth. */\nexport interface ValidationConfig {\n /** Maximum expression length in characters. Prevents excessively long strings from entering the pipeline. */\n readonly maxExpressionLength: number;\n /** Maximum expression complexity score (`tokens + functionCalls×5 + nestingDepth×10`). Protects against deeply nested or combinatorially complex expressions. */\n readonly maxComplexity: number;\n /** Maximum parentheses nesting depth. Prevents stack overflow in the recursive-descent parser. */\n readonly maxNestingDepth: number;\n /**\n * Auto-balance unmatched parentheses by appending missing closing parens\n * or prepending missing opening parens. When disabled, unbalanced expressions\n * cause parse errors instead of being silently corrected.\n *\n * Disabled by default for strict parsing. Enable for forgiving user input\n * (e.g., chat-style calculators where users often omit closing parens).\n * Has zero overhead when disabled, the O(n) paren-count scan is skipped.\n */\n readonly autoBalanceParens: boolean;\n}\n\n/**\n * Worker pool configuration.\n * Controls the parallel execution workers used for batch evaluation.\n */\nexport interface WorkerConfig {\n /** Maximum number of concurrent Web Workers allowed */\n readonly maxConcurrentWorkers: number;\n /** Time (ms) a worker stays alive while idle before being terminated */\n readonly idleTimeoutMs: number;\n /** Maximum retry attempts for a failed worker operation */\n readonly maxRetries: number;\n /** Base backoff delay (ms) between retries (exponential backoff applied on top) */\n readonly baseBackoffMs: number;\n} /**\n * Diagnostic / telemetry configuration.\n * Controls the diagnostic event pipeline for profiling and debugging.\n * All diagnostics are disabled by default for maximum production performance.\n */\n export interface DiagnosticConfig {\n /** Master switch: enable the diagnostic pipeline (collectors receive events for all pipeline stages) */\n readonly enabled: boolean;\n /** Enable VM trace mode, emits per-opcode execution events (very verbose; disables some optimizations) */\n readonly vmTraceEnabled: boolean;\n }\n\n /**\n * Virtual Machine configuration.\n * Controls the internal bytecode VM that executes compiled expressions.\n */\n export interface VMConfig {\n /** Maximum stack depth (value slots) for VM execution, prevents stack overflow in recursive/pratt-parser generated bytecode */\n readonly maxStackDepth: number;\n /** Maximum opcodes executed per expression, halts runaway infinite loops */\n readonly maxInstructions: number;\n /**\n * Maximum elements a collection may be expanded to before `map`/`reduce`/\n * `sum`/`prod` will iterate it.\n *\n * A Range is stored as its two bounds and costs nothing until something\n * materializes it, at which point it becomes one Value per element. Twenty\n * characters (`sum(x, 1:100000000)`) therefore asked for a hundred million\n * of them, and neither `maxInstructions` nor `maxStackDepth` could see it:\n * the expansion happens inside a single opcode, so the instruction counter\n * is never consulted while it runs, and the elements never reach the value\n * stack. V8 aborted the whole process with \"Reached heap limit\", which a\n * host embedding the engine cannot catch.\n */\n readonly maxCollectionSize: number;\n /**\n * Maximum elements (collection Values, matrix cells) one evaluation may\n * materialize in total.\n *\n * `maxCollectionSize` above bounds a single collection. This bounds the sum\n * of everything an expression asks for, which is a different question and\n * the one that actually protects the host: two collections that are\n * individually legal are legal together, and an operation whose result is\n * the PRODUCT of two legal operands is bounded by neither of them. A matrix\n * multiply is exactly that shape, so three lines within every other limit\n * (`:a = map(1*x, 0:20000)`, `:b = transpose(a)`, `b * a`) asked for four\n * hundred million cells and aborted the process.\n *\n * Counted in elements rather than bytes, because a count is what a call\n * site has before it allocates. An element is 8 bytes as a numeric matrix\n * cell and closer to a hundred as a full Value, so the default is worth\n * roughly 16 MB of matrix or 200 MB of expanded collection: far past any\n * document and far short of what an editor cannot survive.\n */\n readonly maxAllocatedElements: number;\n /**\n * Maximum user-defined-function calls one evaluation may make in TOTAL,\n * however deeply or widely they nest.\n *\n * `maxFunctionRecursionDepth` bounds how DEEP calls nest and cannot see\n * how MANY there are, and those are different numbers. Twenty-two lines of\n * `f(n)(v) = f(n-1)(v) + f(n-1)(v)` reach a depth of only 22 against a\n * limit of 50, and make 2,097,152 calls doing it: a fatal heap abort in\n * under a second. `maxInstructions` cannot bound it either, because\n * `executeBytecode()` re-enters itself per call and each reentrant call\n * gets its OWN instruction count, so recursion refreshes its allowance on\n * the way in. This is the tally that does not refresh; see\n * `vm/AllocationBudget.ts`, which holds it for the same reason it holds\n * the element tally.\n *\n * Counted in calls rather than in the instructions they run, because the\n * call is the thing that multiplies: every call allocates a frame, its\n * arguments and its result whatever its body says.\n */\n readonly maxFunctionCalls: number;\n /**\n * Hard ceiling on how many bisection steps goal seek (`solve line N for\n * <var> = <target>`, see `packages/goalseek/`) may take before it gives up\n * with a structured error rather than continuing.\n *\n * Goal seek re-evaluates the target line's expression once per step while\n * narrowing an interval, and an untrusted document must never be able to\n * make that loop spin. `maxInstructions` bounds each individual\n * re-evaluation, but not how many of them the search performs, so this is\n * the tally that bounds the search itself, the same reason `maxFunctionCalls`\n * exists alongside `maxInstructions`. Bisection halves the interval every\n * step, so a hundred steps resolves an input to roughly one part in 2^100:\n * far past any precision a document needs, and a definite stop either way.\n */\n readonly maxGoalSeekIterations: number;\n }\n\n/**\n * Complete engine configuration.\n *\n * Every field has a default in `DEFAULT_CONFIG`. To customize, pass a\n * `Partial<EngineConfig>` when constructing `ExpressionEngine`. Only the\n * sections/fields you supply are overridden; all others use their defaults.\n *\n * @example\n * ```typescript\n * import { ExpressionEngine } from \"solve-js\";\n *\n * const engine = new ExpressionEngine(\"en\", false, {\n * validation: {\n * maxExpressionLength: 1000,\n * maxComplexity: 200,\n * },\n * // date, performance, vm, worker, diagnostic all use defaults\n * });\n * ```\n */\nexport interface EngineConfig {\n /** Date/time expression evaluation bounds and formatting */\n readonly date: DateConfig;\n /** Performance budgets and cache sizing */\n readonly performance: PerformanceConfig;\n /** Safety limits for expression complexity */\n readonly validation: ValidationConfig;\n /** Internal bytecode VM configuration */\n readonly vm: VMConfig;\n /** Parallel worker pool configuration */\n readonly worker: WorkerConfig;\n /** Diagnostic pipeline configuration */\n readonly diagnostic: DiagnosticConfig;\n }\n\n/**\n * Default configuration values\n */\nexport const DEFAULT_CONFIG: EngineConfig = {\n date: {\n // A century of workdays is about 26,000 steps, which is microseconds,\n // and past any offset a person means. The walk is what these bound; see\n // DateConfig above for why no other date offset needs a ceiling.\n maxOffsetYears: 100,\n minOffsetYears: -100,\n defaultFormat: 'YYYY-MM-DD'\n },\n performance: {\n // Preserves the effective cache size the hardcoded (now-removed)\n // BYTECODE_CACHE_MAX_ENTRIES constant had, so wiring this field up\n // doesn't silently shrink the default cache for existing consumers.\n defaultCacheSize: 2000,\n // Raised from the 10,000 this field was declared with, which was never\n // enforced and turned out to be under what this engine already supports:\n // its paging design is tested against a 20,000-line document\n // (`engine/PageManager.ts` and its spec) and its throughput benchmark\n // parses a 50,000-line one. Twice the largest of those, and the same\n // number `ConfigManager.validate()` already refuses to go above.\n //\n // Measured under a 256MB heap: setting a 100,000-line document costs\n // 64MB, evaluating every line of a 20,000-line one costs 106MB, and\n // 200,000 lines aborts the process before a single expression is looked\n // at. A host with a small heap should lower this; the ceiling is here to\n // stop the size that cannot work anywhere.\n maxDocumentLines: 100000,\n },\n validation: {\n maxExpressionLength: 2000,\n maxComplexity: 500,\n maxNestingDepth: 50,\n autoBalanceParens: false,\n },\n vm: {\n maxStackDepth: 200,\n maxInstructions: 50000,\n // Two orders of magnitude above anything a person types by hand (the\n // longest range in the test suite is 1000 elements) and small enough\n // that expanding it is measured in milliseconds rather than in whether\n // the host survives.\n maxCollectionSize: 100000,\n // Twenty times the single-collection ceiling above, so an expression may\n // legitimately handle a number of large collections, and two hundred\n // times below the allocation that took the process down.\n maxAllocatedElements: 2000000,\n // Six hundred times the largest call count any test or example makes\n // (five levels of composition is sixteen calls), and small enough that\n // the calls it does allow cost single-digit megabytes rather than the\n // heap. A document that needs more than ten thousand calls on one line\n // is doing something a calculator was not built for.\n maxFunctionCalls: 10000,\n // A hundred bisection steps resolve an input to one part in 2^100, far\n // finer than any document needs and a firm stop for an untrusted one. A\n // continuous, monotonic relationship converges in tens of steps, well\n // under this; hitting it means the target is unreachable or the\n // relationship is not the smooth one goal seek assumes.\n maxGoalSeekIterations: 100,\n },\n worker: {\n maxConcurrentWorkers: 4,\n idleTimeoutMs: 30000,\n maxRetries: 3,\n baseBackoffMs: 1000,\n },\n diagnostic: {\n enabled: false,\n vmTraceEnabled: false,\n },\n };\n\n/**\n * Merge a partial config override onto a base `EngineConfig`, section by\n * section, `{ ...base.section, ...override.section }` for each of the 7\n * top-level sections, not a single top-level spread.\n *\n * A shallow `{ ...base, ...override }` at the TOP level replaces an entire\n * section wholesale the moment a caller overrides even one field in it\n * (e.g. `{ performance: { defaultCacheSize: 500 } }` would silently drop\n * every other `performance.*` field back to `undefined`, not to its\n * default). This function exists specifically so every config consumer\n * shares one correct merge instead of each hand-rolling (and risking) its\n * own. `ConfigManager` and `ExpressionEngine` both call this rather than\n * either duplicating the section list or instantiating a whole\n * `ConfigManager` just to reuse its private merge logic.\n */\nexport function mergeEngineConfig(\n base: EngineConfig,\n override: Partial<EngineConfig>\n): EngineConfig {\n return {\n date: { ...base.date, ...override.date },\n performance: { ...base.performance, ...override.performance },\n validation: { ...base.validation, ...override.validation },\n vm: { ...base.vm, ...override.vm },\n worker: { ...base.worker, ...override.worker },\n diagnostic: { ...base.diagnostic, ...override.diagnostic },\n };\n}\n\n/**\n * Configuration manager for engine settings\n *\n * @example\n * ```typescript\n * const configManager = new ConfigManager();\n * configManager.set('performance.defaultCacheSize', 2000);\n * const cacheSize = configManager.get('performance.defaultCacheSize');\n * ```\n */\nexport class ConfigManager {\n private config: EngineConfig;\n\n constructor(config: Partial<EngineConfig> = {}) {\n this.config = mergeEngineConfig(DEFAULT_CONFIG, config);\n }\n\n /**\n * Get configuration value by path\n * \n * @param path - Dot-notation path to config value\n * @returns Configuration value\n */\n get<T>(path: string): T {\n const keys = path.split('.');\n let current: unknown = this.config;\n\n for (const key of keys) {\n if (current && typeof current === 'object' && key in current) {\n current = (current as Record<string, unknown>)[key];\n } else {\n throw ErrorFactory.config(\n \"CONFIG_PATH_NOT_FOUND\",\n `Configuration path not found: ${path}`,\n { path }\n );\n }\n }\n\n return current as T;\n }\n\n /**\n * Set configuration value by path\n * \n * @param path - Dot-notation path to config value\n * @param value - New value\n */\n set<T>(path: string, value: T): void {\n const keys = path.split('.');\n if (keys.length < 2) {\n throw ErrorFactory.config(\n \"INVALID_CONFIG_PATH\",\n `Invalid path: ${path}. Must be in format 'section.property'`,\n { path }\n );\n }\n \n const section = keys[0];\n const property = keys[1];\n \n if (!(section in this.config)) {\n throw ErrorFactory.config(\n \"CONFIG_SECTION_NOT_FOUND\",\n `Configuration section not found: ${section}`,\n { section, path }\n );\n }\n \n const sectionConfig = this.config[section as keyof EngineConfig];\n if (sectionConfig && typeof sectionConfig === 'object') {\n (sectionConfig as unknown as Record<string, unknown>)[property] = value;\n } else {\n throw ErrorFactory.config(\n \"CONFIG_PROPERTY_NOT_FOUND\",\n `Configuration property not found: ${path}`,\n { path }\n );\n }\n }\n\n /**\n * Get complete configuration.\n *\n * A detached copy, section objects included. A top-level spread would hand\n * the caller this manager's own section objects, so `getConfig().vm.x = 1`\n * would be an undeclared back door into {@link set}, bypassing its path\n * validation and reaching every later {@link get}.\n */\n getConfig(): EngineConfig {\n return mergeEngineConfig(this.config, {});\n }\n\n /**\n * Update multiple configuration values\n */\n update(config: Partial<EngineConfig>): void {\n this.config = mergeEngineConfig(this.config, config);\n }\n\n /**\n * Reset to default configuration.\n *\n * Goes through {@link mergeEngineConfig} for the same reason the constructor\n * does. A top-level `{ ...DEFAULT_CONFIG }` copies the six section\n * references, not the sections, so after a reset this manager's\n * `performance` object WAS `DEFAULT_CONFIG.performance` and the next\n * `set('performance.x', ...)` wrote into the module constant. That constant\n * is what every `ExpressionEngine` is built from, so one manager's reset\n * could change the cache size, instruction ceiling or allocation budget of\n * every engine constructed later in the process.\n */\n reset(): void {\n this.config = mergeEngineConfig(DEFAULT_CONFIG, {});\n }\n\n /**\n * Validate configuration values\n */\n validate(): ValidationResult {\n const errors: string[] = [];\n\n // Validate performance config\n if (this.config.performance.maxDocumentLines > 100000) {\n errors.push('maxDocumentLines cannot exceed 100,000');\n }\n\n // Validate date config\n if (this.config.date.maxOffsetYears > 1000) {\n errors.push('maxOffsetYears cannot exceed 1000');\n }\n\n return {\n valid: errors.length === 0,\n error: errors.join('; '),\n warnings: []\n };\n }\n}\n\n/**\n * Result type for {@link ConfigManager.validate}.\n */\nexport interface ValidationResult {\n valid: boolean;\n error?: string;\n warnings?: string[];\n}\n\n"]}
@@ -1,292 +0,0 @@
1
- // src/language/TokenCategoryMap.ts
2
- var TOKEN_CATEGORY_MAP = {
3
- // Literals
4
- NUMBER: "number",
5
- BIGINT: "number",
6
- FLOAT: "number",
7
- STRING: "string",
8
- // Keywords (constants, date words, dice, misc grammar keywords)
9
- PI: "keyword",
10
- E: "keyword",
11
- NOW: "keyword",
12
- TODAY: "keyword",
13
- TOMORROW: "keyword",
14
- YESTERDAY: "keyword",
15
- ROLL: "keyword",
16
- GLOBAL: "keyword",
17
- OF: "keyword",
18
- DURATION_DAY: "keyword",
19
- DURATION_WEEK: "keyword",
20
- DURATION_MONTH: "keyword",
21
- DURATION_YEAR: "keyword",
22
- DURATION_HOUR: "keyword",
23
- DURATION_MINUTE: "keyword",
24
- DURATION_SECOND: "keyword",
25
- NEXT: "keyword",
26
- LAST: "keyword",
27
- UNTIL: "keyword",
28
- SINCE: "keyword",
29
- BETWEEN: "keyword",
30
- // Bill split (finance): the split verb, its two spellings, and the trailing
31
- // words the normalizer retypes only inside the full split shape.
32
- SPLIT: "keyword",
33
- SPLIT_WAYS: "keyword",
34
- WAYS: "keyword",
35
- PEOPLE: "keyword",
36
- FROM: "keyword",
37
- BEST: "keyword",
38
- KEYWORD: "keyword",
39
- TRUE: "keyword",
40
- FALSE: "keyword",
41
- IF: "keyword",
42
- THEN: "keyword",
43
- ELSE: "keyword",
44
- AS: "keyword",
45
- CONVERTER_NAME: "keyword",
46
- ROUNDED: "keyword",
47
- TO_NEAREST: "keyword",
48
- DECIMAL_PLACES: "keyword",
49
- AVERAGE_OF: "keyword",
50
- MEDIAN_OF: "keyword",
51
- TOTAL_OF: "keyword",
52
- COUNT_OF: "keyword",
53
- LARGER_OF: "keyword",
54
- SMALLER_OF: "keyword",
55
- HALF_OF: "keyword",
56
- MIDPOINT_BETWEEN: "keyword",
57
- REMAINDER_OF: "keyword",
58
- NTH_ROOT: "keyword",
59
- LOG_PHRASE: "keyword",
60
- LOG_BASE: "keyword",
61
- GCD_OF: "keyword",
62
- LCM_OF: "keyword",
63
- SQUARE_ROOT_OF: "keyword",
64
- CUBE_ROOT_OF: "keyword",
65
- CLAMP: "keyword",
66
- MAP: "keyword",
67
- REDUCE: "keyword",
68
- SUM_FN: "keyword",
69
- PROD_FN: "keyword",
70
- // Symbolic algebra verbs (packages/symbolic/). Declared here alongside
71
- // map/reduce rather than only on the package descriptor, so highlighting is
72
- // correct without depending on registration order.
73
- EXPAND_FN: "keyword",
74
- FACTOR_FN: "keyword",
75
- SOLVE_FN: "keyword",
76
- DER_FN: "keyword",
77
- INTEGRAL_FN: "keyword",
78
- TAYLOR_FN: "keyword",
79
- JACOBIAN_FN: "keyword",
80
- IMAGINARY: "number",
81
- CONJ_FN: "keyword",
82
- RE_FN: "keyword",
83
- IM_FN: "keyword",
84
- CANCEL_FN: "keyword",
85
- APART_FN: "keyword",
86
- TIME_IN: "keyword",
87
- DATE_IN: "keyword",
88
- TIME_DIFFERENCE_BETWEEN: "keyword",
89
- CITY_NAME: "keyword",
90
- OVER: "keyword",
91
- // The investment grammar's connectives (packages/finance/).
92
- AFTER: "keyword",
93
- PRESENT_VALUE_OF: "keyword",
94
- ANNUAL_RETURN_ON: "keyword",
95
- FOR_DURATION: "keyword",
96
- COMPOUNDING: "keyword",
97
- INVESTED: "keyword",
98
- RETURNED: "keyword",
99
- RATE_AT: "keyword",
100
- COMPOUND_INTEREST_ON: "keyword",
101
- INTEREST_ON: "keyword",
102
- DAILY_REPAYMENT_ON: "keyword",
103
- MONTHLY_REPAYMENT_ON: "keyword",
104
- ANNUAL_REPAYMENT_ON: "keyword",
105
- TOTAL_REPAYMENT_ON: "keyword",
106
- DAILY_LOAN_INTEREST_ON: "keyword",
107
- MONTHLY_LOAN_INTEREST_ON: "keyword",
108
- ANNUAL_LOAN_INTEREST_ON: "keyword",
109
- TOTAL_LOAN_INTEREST_ON: "keyword",
110
- TAX_ON: "keyword",
111
- TAX_OFF: "keyword",
112
- TAX_IN_PHRASE: "keyword",
113
- IS_TO: "keyword",
114
- IS: "keyword",
115
- PCT_ON: "operator",
116
- PCT_OFF: "operator",
117
- PCT_UP: "operator",
118
- PCT_DOWN: "operator",
119
- OF_WHAT: "keyword",
120
- OFF_WHAT: "keyword",
121
- ON_WHAT: "keyword",
122
- RANDOM_NUMBER: "keyword",
123
- WHAT_IS: "keyword",
124
- WHAT_WAS: "keyword",
125
- VALUE_OF: "keyword",
126
- WORTH_IN: "keyword",
127
- SAVINGS_HOW_LONG: "keyword",
128
- SAVINGS_HOW_MUCH: "keyword",
129
- IN_YEAR_DOLLARS: "keyword",
130
- INGREDIENT_NAME: "keyword",
131
- ASSUMING: "keyword",
132
- // Datetime, workdays/weekdays/timestamps (packages/datetime/); Time
133
- // video timecode (packages/time/). See Token.ts's TokenTypes doc
134
- // comments for why each is a fused phrase/sequence token rather than a
135
- // bare keyword.
136
- WORKDAYS_IN: "keyword",
137
- WEEKDAY_ON: "keyword",
138
- WEEKDAY_IN: "keyword",
139
- MONTH_ON: "keyword",
140
- MONTH_IN: "keyword",
141
- WEEK_ON: "keyword",
142
- DAYS_IN_PERIOD: "keyword",
143
- IN_TWO_UNITS: "unit",
144
- PER_UNIT: "unit",
145
- AT_RATE: "keyword",
146
- WEEK_IN: "keyword",
147
- BETWEEN_UNIT: "keyword",
148
- WORKDAYS_AFTER: "keyword",
149
- WORKDAYS_BEFORE: "keyword",
150
- WORKDAYS_BETWEEN: "keyword",
151
- IS_WEEKEND: "keyword",
152
- IS_WORKDAY: "keyword",
153
- CURRENT_TIMESTAMP: "keyword",
154
- TO_DATE: "keyword",
155
- TO_TIMESTAMP: "keyword",
156
- VIDEO_TIMECODE: "datetime",
157
- FRAME_COUNT: "datetime",
158
- AT: "keyword",
159
- // Arithmetic / assignment-style operators
160
- PLUS: "operator",
161
- // The word "and". An operator rather than a keyword: it adds, and syntax
162
- // highlighting that painted it as a keyword would make "5 and 3" look
163
- // structurally different from "5 + 3" when the two mean the same thing.
164
- AND_CONJ: "operator",
165
- MINUS: "operator",
166
- STAR: "operator",
167
- SLASH: "operator",
168
- // `±` / `+/-`, the uncertainty operator (packages/uncertainty/). A core
169
- // lexer token, so its category lives in the built-in map alongside the other
170
- // operators rather than being registered by the package.
171
- PLUS_MINUS: "operator",
172
- CARET: "operator",
173
- PERCENT: "operator",
174
- LSHIFT: "operator",
175
- RSHIFT: "operator",
176
- EQUALS: "operator",
177
- PLUS_EQUALS: "operator",
178
- MINUS_EQUALS: "operator",
179
- THEREFORE: "operator",
180
- INCREASE_BY: "operator",
181
- DECREASE_BY: "operator",
182
- OF_WHAT_IS: "keyword",
183
- ON_WHAT_IS: "keyword",
184
- OFF_WHAT_IS: "keyword",
185
- TIMES_BY: "operator",
186
- MULTIPLY_BY: "operator",
187
- DIVIDE_BY: "operator",
188
- MOD: "operator",
189
- INCREASE: "operator",
190
- DECREASE: "operator",
191
- UNICODE_MATH: "operator",
192
- QUESTION: "operator",
193
- BANG: "operator",
194
- // Comparison operators
195
- NEQ: "comparison",
196
- IN: "comparison",
197
- GTE: "comparison",
198
- LTE: "comparison",
199
- EQUALITY: "comparison",
200
- LT: "comparison",
201
- GT: "comparison",
202
- LOGICAL_AND: "comparison",
203
- LOGICAL_OR: "comparison",
204
- OR: "comparison",
205
- // Bitwise operators
206
- URSHIFT: "bitwise",
207
- BIT_AND: "bitwise",
208
- BIT_OR: "bitwise",
209
- BIT_NOT: "bitwise",
210
- BIT_XOR: "bitwise",
211
- // Functions
212
- FUNC: "function",
213
- // Variable references/definitions, DOLLAR/COLON are the sigils, IDENT is
214
- // a bare identifier reference. All three are recognized-by-the-grammar
215
- // variable syntax at LEX time, independent of whether the variable turns
216
- // out to be defined at eval time (that's a separate, later concern).
217
- DOLLAR: "variable",
218
- COLON: "variable",
219
- IDENT: "variable",
220
- // Units / conversions / currency symbols
221
- UNIT: "unit",
222
- CONVERT: "unit",
223
- TO: "unit",
224
- POUND: "unit",
225
- EURO: "unit",
226
- YEN: "unit",
227
- RUBLE: "unit",
228
- WON: "unit",
229
- CURRENCY_SYMBOL: "unit",
230
- // Cross-line data access (packages/lines/)
231
- PREV: "keyword",
232
- LINE_REF: "keyword",
233
- SUM_RANGE_CALL: "keyword",
234
- AVERAGE_RANGE_CALL: "keyword",
235
- TOTAL_ABOVE: "keyword",
236
- SUM_ABOVE: "keyword",
237
- AVERAGE_ABOVE: "keyword",
238
- // Goal seek (packages/goalseek/)
239
- GOAL_SEEK: "keyword",
240
- // Colour (packages/colour/). HEX_COLOUR gets its own "colour" category so a
241
- // host can render an inline swatch on the literal; the call token highlights
242
- // like any function.
243
- HEX_COLOUR: "colour",
244
- COLOUR_CALL: "function",
245
- // Datetime literals/durations
246
- DATETIME_LITERAL: "datetime",
247
- DURATION: "datetime",
248
- // Vectors
249
- VEC2: "vector",
250
- VEC3: "vector",
251
- VEC4: "vector",
252
- // Punctuation, grouping/separators, deliberately neutral/muted rather
253
- // than left uncategorized: they're still recognized grammar, just not
254
- // semantically interesting enough to earn a "loud" color.
255
- LPAREN: "punctuation",
256
- RPAREN: "punctuation",
257
- LBRACKET: "punctuation",
258
- RBRACKET: "punctuation",
259
- LBRACE: "punctuation",
260
- RBRACE: "punctuation",
261
- DOT: "punctuation",
262
- COMMA: "punctuation",
263
- SEMICOLON: "punctuation",
264
- // Errors
265
- ERROR: "error"
266
- };
267
- var UNCATEGORIZED_TOKEN_TYPES = /* @__PURE__ */ new Set([
268
- "WS",
269
- "NEWLINE",
270
- "EOF",
271
- "BACKTICK_OPEN",
272
- "INLINE_SOLVE_START",
273
- "COMMENT",
274
- // A mid-line `#tag` reaches the highlight stream like COMMENT but has no
275
- // evaluation role of its own (it is stripped or folded into an aggregate),
276
- // so it is deliberately unstyled rather than categorised.
277
- "TAG"
278
- ]);
279
- var pluginCategories = /* @__PURE__ */ new Map();
280
- function registerTokenCategory(tokenType, category) {
281
- pluginCategories.set(tokenType, category);
282
- }
283
- function unregisterTokenCategory(tokenType) {
284
- pluginCategories.delete(tokenType);
285
- }
286
- function getTokenCategory(tokenType) {
287
- return pluginCategories.get(tokenType) ?? TOKEN_CATEGORY_MAP[tokenType];
288
- }
289
-
290
- export { UNCATEGORIZED_TOKEN_TYPES, getTokenCategory, registerTokenCategory, unregisterTokenCategory };
291
- //# sourceMappingURL=chunk-LSALB3IN.js.map
292
- //# sourceMappingURL=chunk-LSALB3IN.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/language/TokenCategoryMap.ts"],"names":[],"mappings":";AAiBA,IAAM,kBAAA,GAAoD;AAAA;AAAA,EAEzD,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ,QAAA;AAAA,EACR,KAAA,EAAO,QAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA;AAAA,EAGR,EAAA,EAAI,SAAA;AAAA,EACJ,CAAA,EAAG,SAAA;AAAA,EACH,GAAA,EAAK,SAAA;AAAA,EACL,KAAA,EAAO,SAAA;AAAA,EACP,QAAA,EAAU,SAAA;AAAA,EACV,SAAA,EAAW,SAAA;AAAA,EACX,IAAA,EAAM,SAAA;AAAA,EACN,MAAA,EAAQ,SAAA;AAAA,EACR,EAAA,EAAI,SAAA;AAAA,EACJ,YAAA,EAAc,SAAA;AAAA,EACd,aAAA,EAAe,SAAA;AAAA,EACf,cAAA,EAAgB,SAAA;AAAA,EAChB,aAAA,EAAe,SAAA;AAAA,EACf,aAAA,EAAe,SAAA;AAAA,EACf,eAAA,EAAiB,SAAA;AAAA,EACjB,eAAA,EAAiB,SAAA;AAAA,EACjB,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,OAAA,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EAAO;AACR,CAAA;AAQO,IAAM,yBAAA,uBAAqD,GAAA,CAAI;AAAA,EACrE,IAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA,eAAA;AAAA,EACA,oBAAA;AAAA,EACA,SAAA;AAAA;AAAA;AAAA;AAAA,EAIA;AACD,CAAC;AAUD,IAAM,gBAAA,uBAAuB,GAAA,EAA2B;AAQjD,SAAS,qBAAA,CAAsB,WAAmB,QAAA,EAA+B;AACvF,EAAA,gBAAA,CAAiB,GAAA,CAAI,WAAW,QAAQ,CAAA;AACzC;AAOO,SAAS,wBAAwB,SAAA,EAAyB;AAChE,EAAA,gBAAA,CAAiB,OAAO,SAAS,CAAA;AAClC;AAWO,SAAS,iBAAiB,SAAA,EAA8C;AAC9E,EAAA,OAAO,gBAAA,CAAiB,GAAA,CAAI,SAAS,CAAA,IAAK,mBAAmB,SAAS,CAAA;AACvE","file":"chunk-LSALB3IN.js","sourcesContent":["import type { TokenCategory } from \"@solve-js/language/TokenCategory\";\n\n/**\n * Static, built-in token-type → semantic-category table.\n *\n * Covers the full `TokenTypes` surface (see Token.ts) so nothing recognized\n * by the lexer's grammar goes uncategorized by omission. Structural/internal\n * token types (WS, NEWLINE, EOF, BACKTICK_OPEN, INLINE_SOLVE_START, COMMENT)\n * are intentionally absent, they're either filtered out before reaching\n * this lookup (see Lexer.getHighlightTokens) or simply have nothing\n * meaningful to highlight. COMMENT specifically: it reaches\n * Lexer.getHighlightTokens() (unlike WS/NEWLINE, filtered earlier), so a\n * future \"give comments their own color\" pass would add a real category\n * here. This is a rendering-scope decision, not a correctness\n * requirement, since COMMENT tokens are already filtered out of the\n * parser's input regardless of how they're highlighted.\n */\nconst TOKEN_CATEGORY_MAP: Record<string, TokenCategory> = {\n\t// Literals\n\tNUMBER: \"number\",\n\tBIGINT: \"number\",\n\tFLOAT: \"number\",\n\tSTRING: \"string\",\n\n\t// Keywords (constants, date words, dice, misc grammar keywords)\n\tPI: \"keyword\",\n\tE: \"keyword\",\n\tNOW: \"keyword\",\n\tTODAY: \"keyword\",\n\tTOMORROW: \"keyword\",\n\tYESTERDAY: \"keyword\",\n\tROLL: \"keyword\",\n\tGLOBAL: \"keyword\",\n\tOF: \"keyword\",\n\tDURATION_DAY: \"keyword\",\n\tDURATION_WEEK: \"keyword\",\n\tDURATION_MONTH: \"keyword\",\n\tDURATION_YEAR: \"keyword\",\n\tDURATION_HOUR: \"keyword\",\n\tDURATION_MINUTE: \"keyword\",\n\tDURATION_SECOND: \"keyword\",\n\tNEXT: \"keyword\",\n\tLAST: \"keyword\",\n\tUNTIL: \"keyword\",\n\tSINCE: \"keyword\",\n\tBETWEEN: \"keyword\",\n\t// Bill split (finance): the split verb, its two spellings, and the trailing\n\t// words the normalizer retypes only inside the full split shape.\n\tSPLIT: \"keyword\",\n\tSPLIT_WAYS: \"keyword\",\n\tWAYS: \"keyword\",\n\tPEOPLE: \"keyword\",\n\tFROM: \"keyword\",\n\tBEST: \"keyword\",\n\tKEYWORD: \"keyword\",\n\tTRUE: \"keyword\",\n\tFALSE: \"keyword\",\n\tIF: \"keyword\",\n\tTHEN: \"keyword\",\n\tELSE: \"keyword\",\n\tAS: \"keyword\",\n\tCONVERTER_NAME: \"keyword\",\n\tROUNDED: \"keyword\",\n\tTO_NEAREST: \"keyword\",\n\tDECIMAL_PLACES: \"keyword\",\n\tAVERAGE_OF: \"keyword\",\n\tMEDIAN_OF: \"keyword\",\n\tTOTAL_OF: \"keyword\",\n\tCOUNT_OF: \"keyword\",\n\tLARGER_OF: \"keyword\",\n\tSMALLER_OF: \"keyword\",\n\tHALF_OF: \"keyword\",\n\tMIDPOINT_BETWEEN: \"keyword\",\n\tREMAINDER_OF: \"keyword\",\n\tNTH_ROOT: \"keyword\",\n\tLOG_PHRASE: \"keyword\",\n\tLOG_BASE: \"keyword\",\n\tGCD_OF: \"keyword\",\n\tLCM_OF: \"keyword\",\n\tSQUARE_ROOT_OF: \"keyword\",\n\tCUBE_ROOT_OF: \"keyword\",\n\tCLAMP: \"keyword\",\n\tMAP: \"keyword\",\n\tREDUCE: \"keyword\",\n\tSUM_FN: \"keyword\",\n\tPROD_FN: \"keyword\",\n\t// Symbolic algebra verbs (packages/symbolic/). Declared here alongside\n\t// map/reduce rather than only on the package descriptor, so highlighting is\n\t// correct without depending on registration order.\n\tEXPAND_FN: \"keyword\",\n\tFACTOR_FN: \"keyword\",\n\tSOLVE_FN: \"keyword\",\n\tDER_FN: \"keyword\",\n\tINTEGRAL_FN: \"keyword\",\n\tTAYLOR_FN: \"keyword\",\n\tJACOBIAN_FN: \"keyword\",\n\tIMAGINARY: \"number\",\n\tCONJ_FN: \"keyword\",\n\tRE_FN: \"keyword\",\n\tIM_FN: \"keyword\",\n\tCANCEL_FN: \"keyword\",\n\tAPART_FN: \"keyword\",\n\tTIME_IN: \"keyword\",\n\tDATE_IN: \"keyword\",\n\tTIME_DIFFERENCE_BETWEEN: \"keyword\",\n\tCITY_NAME: \"keyword\",\n\tOVER: \"keyword\",\n\t// The investment grammar's connectives (packages/finance/).\n\tAFTER: \"keyword\",\n\tPRESENT_VALUE_OF: \"keyword\",\n\tANNUAL_RETURN_ON: \"keyword\",\n\tFOR_DURATION: \"keyword\",\n\tCOMPOUNDING: \"keyword\",\n\tINVESTED: \"keyword\",\n\tRETURNED: \"keyword\",\n\tRATE_AT: \"keyword\",\n\tCOMPOUND_INTEREST_ON: \"keyword\",\n\tINTEREST_ON: \"keyword\",\n\tDAILY_REPAYMENT_ON: \"keyword\",\n\tMONTHLY_REPAYMENT_ON: \"keyword\",\n\tANNUAL_REPAYMENT_ON: \"keyword\",\n\tTOTAL_REPAYMENT_ON: \"keyword\",\n\tDAILY_LOAN_INTEREST_ON: \"keyword\",\n\tMONTHLY_LOAN_INTEREST_ON: \"keyword\",\n\tANNUAL_LOAN_INTEREST_ON: \"keyword\",\n\tTOTAL_LOAN_INTEREST_ON: \"keyword\",\n\tTAX_ON: \"keyword\",\n\tTAX_OFF: \"keyword\",\n\tTAX_IN_PHRASE: \"keyword\",\n\tIS_TO: \"keyword\",\n\tIS: \"keyword\",\n\tPCT_ON: \"operator\",\n\tPCT_OFF: \"operator\",\n\tPCT_UP: \"operator\",\n\tPCT_DOWN: \"operator\",\n\tOF_WHAT: \"keyword\",\n\tOFF_WHAT: \"keyword\",\n\tON_WHAT: \"keyword\",\n\tRANDOM_NUMBER: \"keyword\",\n\tWHAT_IS: \"keyword\",\n\tWHAT_WAS: \"keyword\",\n\tVALUE_OF: \"keyword\",\n\tWORTH_IN: \"keyword\",\n\tSAVINGS_HOW_LONG: \"keyword\",\n\tSAVINGS_HOW_MUCH: \"keyword\",\n\tIN_YEAR_DOLLARS: \"keyword\",\n\tINGREDIENT_NAME: \"keyword\",\n\tASSUMING: \"keyword\",\n\t// Datetime, workdays/weekdays/timestamps (packages/datetime/); Time\n\t// video timecode (packages/time/). See Token.ts's TokenTypes doc\n\t// comments for why each is a fused phrase/sequence token rather than a\n\t// bare keyword.\n\tWORKDAYS_IN: \"keyword\",\n\tWEEKDAY_ON: \"keyword\",\n\tWEEKDAY_IN: \"keyword\",\n\tMONTH_ON: \"keyword\",\n\tMONTH_IN: \"keyword\",\n\tWEEK_ON: \"keyword\",\n\tDAYS_IN_PERIOD: \"keyword\",\n\tIN_TWO_UNITS: \"unit\",\n\tPER_UNIT: \"unit\",\n\tAT_RATE: \"keyword\",\n\tWEEK_IN: \"keyword\",\n\tBETWEEN_UNIT: \"keyword\",\n\tWORKDAYS_AFTER: \"keyword\",\n\tWORKDAYS_BEFORE: \"keyword\",\n\tWORKDAYS_BETWEEN: \"keyword\",\n\tIS_WEEKEND: \"keyword\",\n\tIS_WORKDAY: \"keyword\",\n\tCURRENT_TIMESTAMP: \"keyword\",\n\tTO_DATE: \"keyword\",\n\tTO_TIMESTAMP: \"keyword\",\n\tVIDEO_TIMECODE: \"datetime\",\n\tFRAME_COUNT: \"datetime\",\n\tAT: \"keyword\",\n\n\t// Arithmetic / assignment-style operators\n\tPLUS: \"operator\",\n\t// The word \"and\". An operator rather than a keyword: it adds, and syntax\n\t// highlighting that painted it as a keyword would make \"5 and 3\" look\n\t// structurally different from \"5 + 3\" when the two mean the same thing.\n\tAND_CONJ: \"operator\",\n\tMINUS: \"operator\",\n\tSTAR: \"operator\",\n\tSLASH: \"operator\",\n\t// `±` / `+/-`, the uncertainty operator (packages/uncertainty/). A core\n\t// lexer token, so its category lives in the built-in map alongside the other\n\t// operators rather than being registered by the package.\n\tPLUS_MINUS: \"operator\",\n\tCARET: \"operator\",\n\tPERCENT: \"operator\",\n\tLSHIFT: \"operator\",\n\tRSHIFT: \"operator\",\n\tEQUALS: \"operator\",\n\tPLUS_EQUALS: \"operator\",\n\tMINUS_EQUALS: \"operator\",\n\tTHEREFORE: \"operator\",\n\tINCREASE_BY: \"operator\",\n\tDECREASE_BY: \"operator\",\n\tOF_WHAT_IS: \"keyword\",\n\tON_WHAT_IS: \"keyword\",\n\tOFF_WHAT_IS: \"keyword\",\n\tTIMES_BY: \"operator\",\n\tMULTIPLY_BY: \"operator\",\n\tDIVIDE_BY: \"operator\",\n\tMOD: \"operator\",\n\tINCREASE: \"operator\",\n\tDECREASE: \"operator\",\n\tUNICODE_MATH: \"operator\",\n\tQUESTION: \"operator\",\n\tBANG: \"operator\",\n\n\t// Comparison operators\n\tNEQ: \"comparison\",\n\tIN: \"comparison\",\n\tGTE: \"comparison\",\n\tLTE: \"comparison\",\n\tEQUALITY: \"comparison\",\n\tLT: \"comparison\",\n\tGT: \"comparison\",\n\tLOGICAL_AND: \"comparison\",\n\tLOGICAL_OR: \"comparison\",\n\tOR: \"comparison\",\n\n\t// Bitwise operators\n\tURSHIFT: \"bitwise\",\n\tBIT_AND: \"bitwise\",\n\tBIT_OR: \"bitwise\",\n\tBIT_NOT: \"bitwise\",\n\tBIT_XOR: \"bitwise\",\n\n\t// Functions\n\tFUNC: \"function\",\n\n\t// Variable references/definitions, DOLLAR/COLON are the sigils, IDENT is\n\t// a bare identifier reference. All three are recognized-by-the-grammar\n\t// variable syntax at LEX time, independent of whether the variable turns\n\t// out to be defined at eval time (that's a separate, later concern).\n\tDOLLAR: \"variable\",\n\tCOLON: \"variable\",\n\tIDENT: \"variable\",\n\n\t// Units / conversions / currency symbols\n\tUNIT: \"unit\",\n\tCONVERT: \"unit\",\n\tTO: \"unit\",\n\tPOUND: \"unit\",\n\tEURO: \"unit\",\n\tYEN: \"unit\",\n\tRUBLE: \"unit\",\n\tWON: \"unit\",\n\tCURRENCY_SYMBOL: \"unit\",\n\n\t// Cross-line data access (packages/lines/)\n\tPREV: \"keyword\",\n\tLINE_REF: \"keyword\",\n\tSUM_RANGE_CALL: \"keyword\",\n\tAVERAGE_RANGE_CALL: \"keyword\",\n\tTOTAL_ABOVE: \"keyword\",\n\tSUM_ABOVE: \"keyword\",\n\tAVERAGE_ABOVE: \"keyword\",\n\n\t// Goal seek (packages/goalseek/)\n\tGOAL_SEEK: \"keyword\",\n\n\t// Colour (packages/colour/). HEX_COLOUR gets its own \"colour\" category so a\n\t// host can render an inline swatch on the literal; the call token highlights\n\t// like any function.\n\tHEX_COLOUR: \"colour\",\n\tCOLOUR_CALL: \"function\",\n\n\t// Datetime literals/durations\n\tDATETIME_LITERAL: \"datetime\",\n\tDURATION: \"datetime\",\n\n\t// Vectors\n\tVEC2: \"vector\",\n\tVEC3: \"vector\",\n\tVEC4: \"vector\",\n\n\t// Punctuation, grouping/separators, deliberately neutral/muted rather\n\t// than left uncategorized: they're still recognized grammar, just not\n\t// semantically interesting enough to earn a \"loud\" color.\n\tLPAREN: \"punctuation\",\n\tRPAREN: \"punctuation\",\n\tLBRACKET: \"punctuation\",\n\tRBRACKET: \"punctuation\",\n\tLBRACE: \"punctuation\",\n\tRBRACE: \"punctuation\",\n\tDOT: \"punctuation\",\n\tCOMMA: \"punctuation\",\n\tSEMICOLON: \"punctuation\",\n\n\t// Errors\n\tERROR: \"error\",\n};\n\n/**\n * Token types intentionally left uncategorized, either purely structural\n * (never meant to be visibly styled) or already filtered out upstream\n * before reaching a category lookup. Used only by the completeness test to\n * distinguish \"deliberately unstyled\" from \"forgotten.\"\n */\nexport const UNCATEGORIZED_TOKEN_TYPES: ReadonlySet<string> = new Set([\n\t\"WS\",\n\t\"NEWLINE\",\n\t\"EOF\",\n\t\"BACKTICK_OPEN\",\n\t\"INLINE_SOLVE_START\",\n\t\"COMMENT\",\n\t// A mid-line `#tag` reaches the highlight stream like COMMENT but has no\n\t// evaluation role of its own (it is stripped or folded into an aggregate),\n\t// so it is deliberately unstyled rather than categorised.\n\t\"TAG\",\n]);\n\n/**\n * Runtime registry for package-contributed categories (e.g. a plugin's\n * custom token types). Overrides/extends the static table above, never\n * replaces it, so a package can't accidentally break core highlighting.\n * Register/unregister symmetry mirrors this codebase's other pluggable\n * registries (e.g. sharedOpRegistry). See ExpressionEngine.registerPackage\n * / unregisterPackage, which call these on behalf of IEnginePackage.tokenCategories.\n */\nconst pluginCategories = new Map<string, TokenCategory>();\n\n/**\n * Map a token type to a highlighting category.\n *\n * @param tokenType - Token type a package registered.\n * @param category - Category deciding how an editor colours it.\n */\nexport function registerTokenCategory(tokenType: string, category: TokenCategory): void {\n\tpluginCategories.set(tokenType, category);\n}\n\n/**\n * Remove a token type's highlighting category.\n *\n * @param tokenType - Token type to forget. Unknown types are ignored.\n */\nexport function unregisterTokenCategory(tokenType: string): void {\n\tpluginCategories.delete(tokenType);\n}\n\n/**\n * Resolve a token type to its semantic category, checking plugin-contributed\n * categories first (so a plugin could theoretically re-categorize a builtin\n * token type, though in practice plugins only ever add categories for their\n * own new types).\n *\n * @returns The category, or `undefined` if the token type has no category\n * the signal to a UI adapter that this token should render unstyled.\n */\nexport function getTokenCategory(tokenType: string): TokenCategory | undefined {\n\treturn pluginCategories.get(tokenType) ?? TOKEN_CATEGORY_MAP[tokenType];\n}\n"]}