solve-engine 2.24.0 → 2.26.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/dist/{BytecodeBuilder-aqVa7Plx.d.cts → BytecodeBuilder-DSWKZi4f.d.cts} +11 -9
- package/dist/{BytecodeBuilder-aqVa7Plx.d.ts → BytecodeBuilder-DSWKZi4f.d.ts} +11 -9
- package/dist/CalendarBackend-MdS3Bb4P.d.cts +181 -0
- package/dist/CalendarBackend-MdS3Bb4P.d.ts +181 -0
- package/dist/{Configuration-DnzYPmoK.d.cts → Configuration-BxriK9Kw.d.cts} +63 -4
- package/dist/{Configuration-DnzYPmoK.d.ts → Configuration-BxriK9Kw.d.ts} +63 -4
- package/dist/DateCalendar-B85t6Vk6.d.ts +90 -0
- package/dist/DateCalendar-CUGI1fT4.d.cts +90 -0
- package/dist/{EngineError-D1kXsjIj.d.cts → EngineError-C-kBwYlN.d.cts} +33 -4
- package/dist/{EngineError-D1kXsjIj.d.ts → EngineError-C-kBwYlN.d.ts} +33 -4
- package/dist/{FormattingSettings-bRKjU7wI.d.ts → FormattingSettings-ByO-4wiM.d.cts} +14 -0
- package/dist/{FormattingSettings-bRKjU7wI.d.cts → FormattingSettings-CvCzAfsz.d.ts} +14 -0
- package/dist/{Lexer-CqagTewQ.d.ts → Lexer-DhGhoAa2.d.cts} +96 -37
- package/dist/{Lexer-CCHFDcgP.d.cts → Lexer-DqtnZMC5.d.ts} +96 -37
- package/dist/{PackageCompatibility-CeAPVHZr.d.cts → PackageCompatibility-CNiTtC6S.d.cts} +1 -1
- package/dist/{PackageCompatibility-Bq82y0ZN.d.ts → PackageCompatibility-fj_f7uqC.d.ts} +1 -1
- package/dist/{PackageRegistry-B9-7fJGH.d.cts → PackageRegistry-BHBCFswo.d.cts} +377 -15
- package/dist/{PackageRegistry-CDEgfhT_.d.ts → PackageRegistry-CNZUwWHJ.d.ts} +377 -15
- package/dist/{Parselet-4oH5OuRt.d.cts → Parselet-DF3864la.d.cts} +26 -4
- package/dist/{Parselet-BwDqKFfK.d.ts → Parselet-Dgymjxzd.d.ts} +26 -4
- package/dist/{Token-CbP_OutD.d.cts → Token-D8f7yaz1.d.cts} +17 -0
- package/dist/{Token-CbP_OutD.d.ts → Token-D8f7yaz1.d.ts} +17 -0
- package/dist/{TokenNormalizer-OTPS0Otq.d.ts → TokenNormalizer-IF7nPRMp.d.ts} +46 -27
- package/dist/{TokenNormalizer-MXaKLJ_m.d.cts → TokenNormalizer-Pe3_390t.d.cts} +46 -27
- package/dist/{ScopeManager-BQBhlDAu.d.ts → VMBuiltins-CZiZRKn-.d.ts} +92 -10
- package/dist/{ScopeManager-DrXB3Nvm.d.cts → VMBuiltins-kv4rr0y5.d.cts} +92 -10
- package/dist/{VMCheckpoints-C5jC92o3.d.ts → VMCheckpoints-DXze6ypg.d.ts} +3 -3
- package/dist/{VMCheckpoints-BK32PTl2.d.cts → VMCheckpoints-yun4ocSv.d.cts} +3 -3
- package/dist/{Value-Ds3Gy07C.d.cts → Value-BYHw-x7q.d.cts} +57 -1
- package/dist/{Value-Ds3Gy07C.d.ts → Value-BYHw-x7q.d.ts} +57 -1
- package/dist/{WorkerError-DaNWQFp1.d.cts → WorkerError-BLZyNq6M.d.cts} +1 -1
- package/dist/{WorkerError-CVQbs6_D.d.ts → WorkerError-CfBJYueR.d.ts} +1 -1
- package/dist/chunk-2SYYKQ4Q.cjs +2 -0
- package/dist/chunk-2SYYKQ4Q.cjs.map +1 -0
- package/dist/chunk-6EYKVQT3.cjs +2 -0
- package/dist/chunk-6EYKVQT3.cjs.map +1 -0
- package/dist/chunk-7RC6RBS6.cjs +2 -0
- package/dist/chunk-7RC6RBS6.cjs.map +1 -0
- package/dist/chunk-AZX4NTYN.cjs +3 -0
- package/dist/chunk-AZX4NTYN.cjs.map +1 -0
- package/dist/{chunk-PTQCHMYA.js → chunk-BCR53EIL.js} +2 -2
- package/dist/{chunk-PTQCHMYA.js.map → chunk-BCR53EIL.js.map} +1 -1
- package/dist/chunk-BLJ6E577.js +2 -0
- package/dist/chunk-BLJ6E577.js.map +1 -0
- package/dist/{chunk-CMZSK6FY.cjs → chunk-C5GEMKUY.cjs} +3 -3
- package/dist/{chunk-CMZSK6FY.cjs.map → chunk-C5GEMKUY.cjs.map} +1 -1
- package/dist/chunk-CL7DM2FX.js +2 -0
- package/dist/chunk-CL7DM2FX.js.map +1 -0
- package/dist/chunk-CQLCTKMX.cjs +2 -0
- package/dist/chunk-CQLCTKMX.cjs.map +1 -0
- package/dist/chunk-CQY23OF5.cjs +5 -0
- package/dist/chunk-CQY23OF5.cjs.map +1 -0
- package/dist/chunk-D4VBWPWN.js +2 -0
- package/dist/chunk-D4VBWPWN.js.map +1 -0
- package/dist/chunk-E4HAKNBQ.cjs +2 -0
- package/dist/chunk-E4HAKNBQ.cjs.map +1 -0
- package/dist/{chunk-GP4H5OIT.js → chunk-ESZNJQ2C.js} +3 -3
- package/dist/{chunk-GP4H5OIT.js.map → chunk-ESZNJQ2C.js.map} +1 -1
- package/dist/{chunk-IJMNVBIS.js → chunk-FAO6DQ74.js} +2 -2
- package/dist/chunk-FAO6DQ74.js.map +1 -0
- package/dist/{chunk-2VE4OW4A.cjs → chunk-FDKTESBC.cjs} +2 -2
- package/dist/{chunk-2VE4OW4A.cjs.map → chunk-FDKTESBC.cjs.map} +1 -1
- package/dist/{chunk-RN3ISTM3.cjs → chunk-G2V33LFM.cjs} +2 -2
- package/dist/{chunk-RN3ISTM3.cjs.map → chunk-G2V33LFM.cjs.map} +1 -1
- package/dist/chunk-GJZIJK2Q.cjs +2 -0
- package/dist/chunk-GJZIJK2Q.cjs.map +1 -0
- package/dist/chunk-GQM6ICDM.js +2 -0
- package/dist/chunk-GQM6ICDM.js.map +1 -0
- package/dist/chunk-GVL3ZMS7.cjs +2 -0
- package/dist/chunk-GVL3ZMS7.cjs.map +1 -0
- package/dist/chunk-GXO7TSXQ.cjs +3 -0
- package/dist/chunk-GXO7TSXQ.cjs.map +1 -0
- package/dist/{chunk-OMHRBKAT.js → chunk-HANGBVEE.js} +2 -2
- package/dist/{chunk-OMHRBKAT.js.map → chunk-HANGBVEE.js.map} +1 -1
- package/dist/chunk-J4K72CQN.js +2 -0
- package/dist/chunk-J4K72CQN.js.map +1 -0
- package/dist/chunk-LE6WZLJ4.js +2 -0
- package/dist/chunk-LE6WZLJ4.js.map +1 -0
- package/dist/chunk-LMZDTQS5.js +3 -0
- package/dist/chunk-LMZDTQS5.js.map +1 -0
- package/dist/chunk-LQIRBP4Q.js +2 -0
- package/dist/chunk-LQIRBP4Q.js.map +1 -0
- package/dist/{chunk-UXR7JIPX.js → chunk-LTUYWJGO.js} +2 -2
- package/dist/{chunk-UXR7JIPX.js.map → chunk-LTUYWJGO.js.map} +1 -1
- package/dist/chunk-MCU7UYKG.js +3 -0
- package/dist/{chunk-7EP36NXE.js.map → chunk-MCU7UYKG.js.map} +1 -1
- package/dist/chunk-MTN53APQ.js +5 -0
- package/dist/chunk-MTN53APQ.js.map +1 -0
- package/dist/chunk-OPKJ2WWB.cjs +3 -0
- package/dist/chunk-OPKJ2WWB.cjs.map +1 -0
- package/dist/chunk-QQHHZPEW.cjs +2 -0
- package/dist/chunk-QQHHZPEW.cjs.map +1 -0
- package/dist/chunk-RRUGQ6DM.js +2 -0
- package/dist/chunk-RRUGQ6DM.js.map +1 -0
- package/dist/chunk-S3ODNMJS.js +2 -0
- package/dist/chunk-S3ODNMJS.js.map +1 -0
- package/dist/{chunk-CDNJZBM3.cjs → chunk-SE6ZCGZ5.cjs} +2 -2
- package/dist/{chunk-CDNJZBM3.cjs.map → chunk-SE6ZCGZ5.cjs.map} +1 -1
- package/dist/chunk-TC23XEAV.js +2 -0
- package/dist/chunk-TC23XEAV.js.map +1 -0
- package/dist/{chunk-MWWAKZOD.cjs → chunk-TMQ37JQY.cjs} +3 -3
- package/dist/{chunk-MWWAKZOD.cjs.map → chunk-TMQ37JQY.cjs.map} +1 -1
- package/dist/chunk-TPPM4QSS.cjs +2 -0
- package/dist/chunk-TPPM4QSS.cjs.map +1 -0
- package/dist/chunk-VB6QMU2W.js +3 -0
- package/dist/chunk-VB6QMU2W.js.map +1 -0
- package/dist/chunk-VQO54ZMA.js +2 -0
- package/dist/chunk-VQO54ZMA.js.map +1 -0
- package/dist/chunk-Y7XRA2EV.js +2 -0
- package/dist/chunk-Y7XRA2EV.js.map +1 -0
- package/dist/{chunk-5IJD5L3O.cjs → chunk-YBQOQTVL.cjs} +2 -2
- package/dist/chunk-YBQOQTVL.cjs.map +1 -0
- package/dist/chunk-YG7UWQFV.js +2 -0
- package/dist/chunk-YG7UWQFV.js.map +1 -0
- package/dist/chunk-YS2OW75C.cjs +2 -0
- package/dist/chunk-YS2OW75C.cjs.map +1 -0
- package/dist/chunk-ZC2NPRLO.js +3 -0
- package/dist/chunk-ZC2NPRLO.js.map +1 -0
- package/dist/chunk-ZDJTDFTR.cjs +2 -0
- package/dist/chunk-ZDJTDFTR.cjs.map +1 -0
- package/dist/chunk-ZE5KKMBV.cjs +2 -0
- package/dist/chunk-ZE5KKMBV.cjs.map +1 -0
- package/dist/chunk-ZSLVLMO5.cjs +2 -0
- package/dist/chunk-ZSLVLMO5.cjs.map +1 -0
- package/dist/constants.cjs +1 -1
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/engine.cjs +1 -1
- package/dist/engine.d.cts +15 -13
- package/dist/engine.d.ts +15 -13
- package/dist/engine.js +1 -1
- package/dist/errors.cjs +1 -1
- package/dist/errors.d.cts +3 -3
- package/dist/errors.d.ts +3 -3
- package/dist/errors.js +1 -1
- package/dist/format.cjs +1 -1
- package/dist/format.d.cts +4 -3
- package/dist/format.d.ts +4 -3
- package/dist/format.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -14
- package/dist/index.d.ts +16 -14
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/language.d.cts +13 -12
- package/dist/language.d.ts +13 -12
- package/dist/lexer.cjs +1 -1
- package/dist/lexer.cjs.map +1 -1
- package/dist/lexer.d.cts +9 -8
- package/dist/lexer.d.ts +9 -8
- package/dist/lexer.js +1 -1
- package/dist/lexer.js.map +1 -1
- package/dist/normalizer.cjs +1 -1
- package/dist/normalizer.d.cts +3 -3
- package/dist/normalizer.d.ts +3 -3
- package/dist/normalizer.js +1 -1
- package/dist/packages.cjs +1 -1
- package/dist/packages.d.cts +12 -11
- package/dist/packages.d.ts +12 -11
- package/dist/packages.js +1 -1
- package/dist/parser.cjs +1 -1
- package/dist/parser.d.cts +6 -5
- package/dist/parser.d.ts +6 -5
- package/dist/parser.js +1 -1
- package/dist/{pipeline-69q2tsLE.d.cts → pipeline-BYkKNpql.d.cts} +1 -1
- package/dist/{pipeline-DTqGLPsV.d.ts → pipeline-Cl7KW8CB.d.ts} +1 -1
- package/dist/resolvers.d.cts +3 -3
- package/dist/resolvers.d.ts +3 -3
- package/dist/temporal.cjs +2 -0
- package/dist/temporal.cjs.map +1 -0
- package/dist/temporal.d.cts +201 -0
- package/dist/temporal.d.ts +201 -0
- package/dist/temporal.js +2 -0
- package/dist/temporal.js.map +1 -0
- package/dist/testing.cjs +2 -2
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +13 -12
- package/dist/testing.d.ts +13 -12
- package/dist/testing.js +1 -1
- package/dist/testing.js.map +1 -1
- package/dist/uom.cjs +1 -1
- package/dist/uom.d.cts +3 -3
- package/dist/uom.d.ts +3 -3
- package/dist/uom.js +1 -1
- package/dist/vm.cjs +1 -1
- package/dist/vm.cjs.map +1 -1
- package/dist/vm.d.cts +9 -57
- package/dist/vm.d.ts +9 -57
- package/dist/vm.js +1 -1
- package/dist/vm.js.map +1 -1
- package/dist/worker.cjs +2 -2
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.d.cts +36 -14
- package/dist/worker.d.ts +36 -14
- package/dist/worker.js +2 -2
- package/dist/worker.js.map +1 -1
- package/package.json +16 -5
- package/dist/chunk-2BXNZM3G.js +0 -2
- package/dist/chunk-2BXNZM3G.js.map +0 -1
- package/dist/chunk-2JSNWYYA.cjs +0 -3
- package/dist/chunk-2JSNWYYA.cjs.map +0 -1
- package/dist/chunk-3SHWTGTP.js +0 -2
- package/dist/chunk-3SHWTGTP.js.map +0 -1
- package/dist/chunk-5GL4SAVH.cjs +0 -2
- package/dist/chunk-5GL4SAVH.cjs.map +0 -1
- package/dist/chunk-5IJD5L3O.cjs.map +0 -1
- package/dist/chunk-72N3ZRVE.cjs +0 -2
- package/dist/chunk-72N3ZRVE.cjs.map +0 -1
- package/dist/chunk-7EP36NXE.js +0 -3
- package/dist/chunk-A4JV7HRB.js +0 -3
- package/dist/chunk-A4JV7HRB.js.map +0 -1
- package/dist/chunk-AUOE7MFI.cjs +0 -2
- package/dist/chunk-AUOE7MFI.cjs.map +0 -1
- package/dist/chunk-BDF4VCQX.js +0 -3
- package/dist/chunk-BDF4VCQX.js.map +0 -1
- package/dist/chunk-D2Q2VFJ6.js +0 -2
- package/dist/chunk-D2Q2VFJ6.js.map +0 -1
- package/dist/chunk-DA7M6H63.cjs +0 -2
- package/dist/chunk-DA7M6H63.cjs.map +0 -1
- package/dist/chunk-ELQQKZN3.cjs +0 -3
- package/dist/chunk-ELQQKZN3.cjs.map +0 -1
- package/dist/chunk-F7QIBC4B.cjs +0 -3
- package/dist/chunk-F7QIBC4B.cjs.map +0 -1
- package/dist/chunk-HQ7BKXG7.js +0 -2
- package/dist/chunk-HQ7BKXG7.js.map +0 -1
- package/dist/chunk-IHAZL4EF.cjs +0 -2
- package/dist/chunk-IHAZL4EF.cjs.map +0 -1
- package/dist/chunk-IJMNVBIS.js.map +0 -1
- package/dist/chunk-IPSOWFCA.js +0 -2
- package/dist/chunk-IPSOWFCA.js.map +0 -1
- package/dist/chunk-LM6ZQUEU.js +0 -2
- package/dist/chunk-LM6ZQUEU.js.map +0 -1
- package/dist/chunk-LTJV3VJE.cjs +0 -2
- package/dist/chunk-LTJV3VJE.cjs.map +0 -1
- package/dist/chunk-NUF66H57.js +0 -5
- package/dist/chunk-NUF66H57.js.map +0 -1
- package/dist/chunk-PWWQZFAE.js +0 -2
- package/dist/chunk-PWWQZFAE.js.map +0 -1
- package/dist/chunk-RE6AIU6Y.js +0 -3
- package/dist/chunk-RE6AIU6Y.js.map +0 -1
- package/dist/chunk-RECRD45C.cjs +0 -5
- package/dist/chunk-RECRD45C.cjs.map +0 -1
- package/dist/chunk-RENO2AWO.js +0 -2
- package/dist/chunk-RENO2AWO.js.map +0 -1
- package/dist/chunk-RMCN5WFO.cjs +0 -2
- package/dist/chunk-RMCN5WFO.cjs.map +0 -1
- package/dist/chunk-S46R5QZP.cjs +0 -2
- package/dist/chunk-S46R5QZP.cjs.map +0 -1
- package/dist/chunk-UPH22K2T.cjs +0 -2
- package/dist/chunk-UPH22K2T.cjs.map +0 -1
- package/dist/chunk-UY3ID6JF.cjs +0 -2
- package/dist/chunk-UY3ID6JF.cjs.map +0 -1
- package/dist/chunk-WFOQRPA6.js +0 -2
- package/dist/chunk-WFOQRPA6.js.map +0 -1
- package/dist/chunk-XFJABR3B.js +0 -2
- package/dist/chunk-XFJABR3B.js.map +0 -1
package/dist/lexer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"lexer.js"}
|
|
1
|
+
{"version":3,"sources":["../src/lexer/TokenClassRegistry.ts","../src/lexer/tokenRegistration.ts"],"names":["TokenClassRegistry","tokenClass","tokenType","c","keywordMap","phraseMap","unitNames","keywordToType","keyword","sorted","a","b","tc","phraseTrie","phraseStartWords","root","phrase","words","node","word","startWords","first","buildTokenLookup","localeCode","locale","getLocale","registry","BUILTIN_PHRASES","knownUnits"],"mappings":"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","file":"lexer.js","sourcesContent":["/**\n * TokenClass, Plugin-extensible keyword registration for the Lexer.\n *\n * Providers call `registry.register(tokenClass)` to teach the lexer about\n * their keywords. The registry merges locale keywords, provider keywords,\n * phrase mappings, and unit names into an optimized TokenLookup structure\n * consumed by the Lexer.\n *\n * @example\n * registry.register({\n * tokenType: 'CARET',\n * keywords: {},\n * phrases: { 'to the power of': true, 'power of': true },\n * priority: 10,\n * description: 'Exponentiation operators (x^y)',\n * });\n */\nexport interface TokenClass {\n /** The token type string produced by the lexer (e.g., \"FUNC\", \"PI\", \"CARET\").\n * Must match a token type that a ParseletRegistry has a parselet for. */\n tokenType: string;\n\n /** Single-word keywords (case-insensitive). The lexer lowercases input\n * before lookup, so these should be lowercase. Example:\n * { sqrt: true, abs: true, sin: true, cos: true } for tokenType \"FUNC\" */\n keywords: Record<string, boolean>;\n\n /** Multi-word phrases (case-insensitive). Matched by the built-in PhraseMatcher\n * via the phrase trie. Example:\n * { \"to the power of\": true, \"power of\": true } for tokenType \"CARET\" */\n phrases?: Record<string, boolean>;\n\n /** Priority for conflict resolution. When two TokenClasses register\n * the same keyword, the higher-priority class wins. Locale keywords\n * have priority 0 (set via setLocale). Providers should use\n * priority >= 10 to override locale defaults. Default: 0 */\n priority?: number;\n\n /** Human-readable description for debugging and introspection */\n description?: string;\n}\n\n// ── Phrase Trie ──────────────────────────────────────────────────────────────\n\n/** Trie node for multi-word phrase matching. */\nexport interface PhraseNode {\n /** Complete phrase token type (null = intermediate node) */\n type?: string;\n children: Map<string, PhraseNode>;\n}\n\n// ── TokenLookup, Optimized lookup structure for the Lexer ──────────────────\n\n/**\n * The optimized lookup structure built by TokenClassRegistry.build().\n * Consumed by the Lexer for O(1) keyword → token type lookups and\n * O(word-count) phrase matching.\n */\nexport interface TokenLookup {\n /** Lowercase keyword → token type. O(1) Map lookup. */\n keywordToType: Map<string, string>;\n\n /** Phrase trie for multi-word matching. Root node with children maps.\n * Null if no phrases registered. */\n phraseTrie: PhraseNode | null;\n\n /** Set of lowercase first-words of all registered phrases.\n * Used by the lexer to emit IDENT (not a phrase keyword) for words\n * that start multi-word phrases, deferring to the PhraseMatcher.\n *\n * Example: \"to\" is in phraseStartWords because \"to the power of\" is a phrase.\n * When the lexer sees \"to\", it emits IDENT and lets the phrase matcher\n * combine \"to the power of\" into a single CARET token.\n *\n * This prevents plugins from accidentally overriding phrase-start words.\n */\n phraseStartWords: Set<string>;\n\n /** Case-sensitive unit names for UNIT fallback after keyword lookup fails. */\n unitNames: ReadonlySet<string>;\n}\n\n// ── TokenClassRegistry ───────────────────────────────────────────────────────\n\n/**\n * Central registry for keyword→token-type mappings.\n *\n * Providers register TokenClasses; locales provide keyword maps;\n * units provide a name set. `build()` merges all sources into an\n * optimized TokenLookup consumed by the Lexer.\n *\n * Merge order (later overrides earlier):\n * 1. Locale keywords (priority 0)\n * 2. Provider keywords (sorted by priority ascending, higher priority wins)\n *\n * Unit names are stored separately (checked AFTER keyword lookup fails).\n * Phrases are stored in a trie for O(phrase-length) matching.\n */\nexport class TokenClassRegistry {\n private classes: TokenClass[] = [];\n private localeKeywordMap: Record<string, string> | null = null;\n private localePhraseMap: Record<string, string> | null = null;\n private unitNames: ReadonlySet<string> | null = null;\n\n /**\n * Register a provider's TokenClass. Must be called BEFORE build().\n * Can be called multiple times to add more entries.\n *\n * Built-in token types CANNOT be overridden, throws a EngineError\n * if the TokenClass attempts to register a keyword that conflicts\n * with an already-registered token type.\n */\n register(tokenClass: TokenClass): void {\n this.classes.push(tokenClass);\n }\n\n /**\n * Unregister all TokenClasses for a given token type.\n * Useful for plugin unload. Requires rebuild() to take effect.\n */\n unregister(tokenType: string): void {\n this.classes = this.classes.filter(c => c.tokenType !== tokenType);\n }\n\n /**\n * Set the locale's keyword→type map and optional phrase map.\n * Called on locale change. Priority 0 (cannot override providers with higher priority).\n */\n setLocale(keywordMap: Record<string, string>, phraseMap?: Record<string, string>): void {\n this.localeKeywordMap = keywordMap;\n this.localePhraseMap = phraseMap ?? null;\n }\n\n /**\n * Set the unit name set. Called when unit list changes.\n * Units are stored separately (checked AFTER keyword lookup fails).\n *\n * Takes a ReadonlySet because the caller's set is derived from the\n * conversion tables and must not be mutated; this class only ever reads it.\n */\n setUnits(unitNames: ReadonlySet<string>): void {\n this.unitNames = unitNames;\n }\n\n /**\n * Build the optimized TokenLookup from all registered sources.\n *\n * Merge order (later overrides earlier):\n * 1. Locale keywords (priority 0)\n * 2. Provider classes (sorted by priority ascending)\n *\n * Returns a frozen TokenLookup that the Lexer consumes.\n * Call build() again after register()/setLocale()/setUnits() changes.\n */\n build(): TokenLookup {\n const keywordToType = new Map<string, string>();\n\n // Layer 1: Locale keywords (priority 0, lowest)\n if (this.localeKeywordMap) {\n for (const [keyword, tokenType] of Object.entries(this.localeKeywordMap)) {\n keywordToType.set(keyword.toLowerCase(), tokenType);\n }\n }\n\n // Layer 2: Provider keywords (sorted by priority ascending, higher wins)\n const sorted = [...this.classes].sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));\n for (const tc of sorted) {\n for (const keyword of Object.keys(tc.keywords)) {\n keywordToType.set(keyword.toLowerCase(), tc.tokenType);\n }\n }\n\n // Build phrase trie from locale + provider phrases\n const phraseTrie = this.buildPhraseTrie();\n\n // Build phraseStartWords set (first word of every phrase)\n const phraseStartWords = this.buildPhraseStartWords();\n\n return {\n keywordToType,\n phraseTrie,\n phraseStartWords,\n unitNames: this.unitNames ?? new Set(),\n };\n }\n\n // ── Private helpers ─────────────────────────────────────────────────────\n\n private buildPhraseTrie(): PhraseNode | null {\n const root: PhraseNode = { children: new Map() };\n\n // Layer 1: Locale phrases\n if (this.localePhraseMap) {\n for (const [phrase, tokenType] of Object.entries(this.localePhraseMap)) {\n this.insertPhrase(root, phrase.toLowerCase(), tokenType);\n }\n }\n\n // Layer 2: Provider phrases\n for (const tc of this.classes) {\n if (!tc.phrases) continue;\n for (const phrase of Object.keys(tc.phrases)) {\n this.insertPhrase(root, phrase.toLowerCase(), tc.tokenType);\n }\n }\n\n return root.children.size > 0 ? root : null;\n }\n\n private insertPhrase(root: PhraseNode, phrase: string, tokenType: string): void {\n const words = phrase.split(' ');\n let node = root;\n for (const word of words) {\n if (!node.children.has(word)) {\n node.children.set(word, { children: new Map() });\n }\n node = node.children.get(word)!;\n }\n // Only set type if not already set, first-registered (locale) wins\n if (!node.type) {\n node.type = tokenType;\n }\n }\n\n private buildPhraseStartWords(): Set<string> {\n const startWords = new Set<string>();\n\n // Locale phrase first words\n if (this.localePhraseMap) {\n for (const phrase of Object.keys(this.localePhraseMap)) {\n const first = phrase.split(' ')[0].toLowerCase();\n startWords.add(first);\n }\n }\n\n // Provider phrase first words\n for (const tc of this.classes) {\n if (!tc.phrases) continue;\n for (const phrase of Object.keys(tc.phrases)) {\n const first = phrase.split(' ')[0].toLowerCase();\n startWords.add(first);\n }\n }\n\n return startWords;\n }\n}","/**\n * tokenRegistration.ts, Bootstrap for building TokenLookup from locale, units, and phrases.\n *\n * This module centralizes the assembly of the TokenLookup consumed by ExpressionLexer.\n * It merges:\n * 1. Locale keywords (from ILocale.keywordMap)\n * 2. Built-in phrase patterns (to the power of, increase by, etc.)\n * 3. Known unit names (from units.ts)\n *\n * The resulting TokenLookup is frozen. Nothing in the engine consumes it any\n * more (see the deprecation on {@link buildTokenLookup}).\n */\nimport { TokenClassRegistry } from '@solve-js/lexer/TokenClassRegistry';\nimport type { TokenLookup } from '@solve-js/lexer/TokenClassRegistry';\nimport { getLocale, type ILocale } from '@solve-js/constants/locales';\nimport { knownUnits } from '@solve-js/lexer/units';\n// The multi-word expressions handled as compound tokens, matched by the\n// PhraseMatcher (trie-based) in ExpressionLexer.tryMatchPhrase(). The same\n// table the normalizer's phrase trie reads, so the two cannot drift.\nimport { BUILTIN_PHRASES } from '@solve-js/lexer/BuiltinPhrases';\n\n/**\n * Build a TokenLookup from locale keywords, known units, and built-in phrases.\n *\n * Merge order (later overrides earlier):\n * 1. Locale keywords (priority 0, lowest, can be overridden by providers)\n * 2. Built-in phrases (via locale phraseMap)\n * 3. Known units (checked AFTER keyword lookup fails, via unitNames set)\n *\n * @param localeCode - The locale code (e.g., \"en\", \"de\"). Defaults to \"en\".\n * @returns A frozen TokenLookup.\n * @deprecated The lexer never read the lookup it was handed: its keyword, unit\n * and phrase tables are built from the locale and the packages registered\n * with it, and the engine no longer builds one at construction. Kept for\n * callers that build their own; removed in 3.0.\n */\nexport function buildTokenLookup(localeCode = 'en'): TokenLookup {\n const locale: ILocale = getLocale(localeCode);\n const registry = new TokenClassRegistry();\n\n // Layer 1: Locale keywords (priority 0, lowest)\n registry.setLocale(locale.keywordMap, BUILTIN_PHRASES);\n\n // Layer 2: Known units (checked after keyword lookup)\n registry.setUnits(knownUnits);\n\n // Build and return the lookup\n return registry.build();\n}\n"]}
|
package/dist/normalizer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';require('./chunk-NGBBNL4K.cjs');var
|
|
1
|
+
'use strict';require('./chunk-NGBBNL4K.cjs');var chunkZSLVLMO5_cjs=require('./chunk-ZSLVLMO5.cjs'),chunk6EYKVQT3_cjs=require('./chunk-6EYKVQT3.cjs');require('./chunk-YBQOQTVL.cjs'),require('./chunk-S3DFU33X.cjs'),require('./chunk-J4LSAHCY.cjs'),require('./chunk-EZKR44MA.cjs'),require('./chunk-GXO7TSXQ.cjs');Object.defineProperty(exports,"PhraseTrie",{enumerable:true,get:function(){return chunkZSLVLMO5_cjs.a}});Object.defineProperty(exports,"TokenNormalizer",{enumerable:true,get:function(){return chunkZSLVLMO5_cjs.c}});Object.defineProperty(exports,"createBuiltinNormalizerRules",{enumerable:true,get:function(){return chunkZSLVLMO5_cjs.f}});Object.defineProperty(exports,"createFusedToken",{enumerable:true,get:function(){return chunkZSLVLMO5_cjs.b}});Object.defineProperty(exports,"implicitMultiplyRule",{enumerable:true,get:function(){return chunkZSLVLMO5_cjs.d}});Object.defineProperty(exports,"BUILTIN_PHRASES",{enumerable:true,get:function(){return chunk6EYKVQT3_cjs.c}});//# sourceMappingURL=normalizer.cjs.map
|
|
2
2
|
//# sourceMappingURL=normalizer.cjs.map
|
package/dist/normalizer.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as NormalizerMatch, a as NormalizerRule } from './TokenNormalizer-
|
|
2
|
-
export { b as NormalizerOptions, T as TokenFusion, c as TokenNormalizer, d as createFusedToken } from './TokenNormalizer-
|
|
3
|
-
import { T as Token } from './Token-
|
|
1
|
+
import { N as NormalizerMatch, a as NormalizerRule } from './TokenNormalizer-Pe3_390t.cjs';
|
|
2
|
+
export { b as NormalizerOptions, T as TokenFusion, c as TokenNormalizer, d as createFusedToken } from './TokenNormalizer-Pe3_390t.cjs';
|
|
3
|
+
import { T as Token } from './Token-D8f7yaz1.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* PhraseTrie, optimized word-level trie for multi-word phrase fusion.
|
package/dist/normalizer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as NormalizerMatch, a as NormalizerRule } from './TokenNormalizer-
|
|
2
|
-
export { b as NormalizerOptions, T as TokenFusion, c as TokenNormalizer, d as createFusedToken } from './TokenNormalizer-
|
|
3
|
-
import { T as Token } from './Token-
|
|
1
|
+
import { N as NormalizerMatch, a as NormalizerRule } from './TokenNormalizer-IF7nPRMp.js';
|
|
2
|
+
export { b as NormalizerOptions, T as TokenFusion, c as TokenNormalizer, d as createFusedToken } from './TokenNormalizer-IF7nPRMp.js';
|
|
3
|
+
import { T as Token } from './Token-D8f7yaz1.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* PhraseTrie, optimized word-level trie for multi-word phrase fusion.
|
package/dist/normalizer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import'./chunk-2RWAXT6O.js';export{a as PhraseTrie,c as TokenNormalizer,f as createBuiltinNormalizerRules,b as createFusedToken,d as implicitMultiplyRule}from'./chunk-
|
|
1
|
+
import'./chunk-2RWAXT6O.js';export{a as PhraseTrie,c as TokenNormalizer,f as createBuiltinNormalizerRules,b as createFusedToken,d as implicitMultiplyRule}from'./chunk-LE6WZLJ4.js';export{c as BUILTIN_PHRASES}from'./chunk-RRUGQ6DM.js';import'./chunk-FAO6DQ74.js';import'./chunk-LHLW7JLS.js';import'./chunk-CHVGFTO3.js';import'./chunk-PRSXXDTA.js';import'./chunk-VB6QMU2W.js';//# sourceMappingURL=normalizer.js.map
|
|
2
2
|
//# sourceMappingURL=normalizer.js.map
|
package/dist/packages.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkOPKJ2WWB_cjs=require('./chunk-OPKJ2WWB.cjs');require('./chunk-G2V33LFM.cjs');var chunk7RC6RBS6_cjs=require('./chunk-7RC6RBS6.cjs');require('./chunk-ZDJTDFTR.cjs'),require('./chunk-ZSLVLMO5.cjs'),require('./chunk-UURM7P3P.cjs'),require('./chunk-ZLRJ7TDP.cjs'),require('./chunk-QQHHZPEW.cjs'),require('./chunk-ZE5KKMBV.cjs'),require('./chunk-TMQ37JQY.cjs'),require('./chunk-ABVDKMNF.cjs'),require('./chunk-TLG7VZRX.cjs'),require('./chunk-5TVI2UPZ.cjs'),require('./chunk-FDKTESBC.cjs'),require('./chunk-TPPM4QSS.cjs'),require('./chunk-E4HAKNBQ.cjs'),require('./chunk-GJZIJK2Q.cjs'),require('./chunk-ZKFCKAIX.cjs'),require('./chunk-6EYKVQT3.cjs'),require('./chunk-YBQOQTVL.cjs'),require('./chunk-S3DFU33X.cjs'),require('./chunk-J4LSAHCY.cjs'),require('./chunk-EZKR44MA.cjs'),require('./chunk-GXO7TSXQ.cjs');Object.defineProperty(exports,"ARITHMETIC_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.a}});Object.defineProperty(exports,"BIGINT_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.n}});Object.defineProperty(exports,"BUILTIN_PACKAGES",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.z}});Object.defineProperty(exports,"CONDITIONALS_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.o}});Object.defineProperty(exports,"CONVERTERS_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.p}});Object.defineProperty(exports,"CURRENCY_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.j}});Object.defineProperty(exports,"DATETIME_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.d}});Object.defineProperty(exports,"DICE_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.f}});Object.defineProperty(exports,"FINANCE_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.r}});Object.defineProperty(exports,"FUNCTION_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.c}});Object.defineProperty(exports,"LINES_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.w}});Object.defineProperty(exports,"MAPREDUCE_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.m}});Object.defineProperty(exports,"MATHPHRASES_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.q}});Object.defineProperty(exports,"MATRIX_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.l}});Object.defineProperty(exports,"PERCENTAGE_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.b}});Object.defineProperty(exports,"TABLES_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.x}});Object.defineProperty(exports,"TAGS_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.y}});Object.defineProperty(exports,"TIME_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.e}});Object.defineProperty(exports,"UOM_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.h}});Object.defineProperty(exports,"VARIABLES_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.g}});Object.defineProperty(exports,"VECTOR_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.k}});Object.defineProperty(exports,"WEATHER_PACKAGE",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.s}});Object.defineProperty(exports,"createCryptoPackage",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.u}});Object.defineProperty(exports,"createCurrencyPackage",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.i}});Object.defineProperty(exports,"createKnowledgePackage",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.v}});Object.defineProperty(exports,"createStocksPackage",{enumerable:true,get:function(){return chunkOPKJ2WWB_cjs.t}});Object.defineProperty(exports,"SYMBOLIC_PACKAGE",{enumerable:true,get:function(){return chunk7RC6RBS6_cjs.a}});//# sourceMappingURL=packages.cjs.map
|
|
2
2
|
//# sourceMappingURL=packages.cjs.map
|
package/dist/packages.d.cts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { I as IEnginePackage } from './PackageRegistry-
|
|
2
|
-
import './Parselet-
|
|
3
|
-
import './BytecodeBuilder-
|
|
4
|
-
import './Token-
|
|
5
|
-
import './pipeline-
|
|
6
|
-
import './Value-
|
|
7
|
-
import './
|
|
1
|
+
import { I as IEnginePackage } from './PackageRegistry-BHBCFswo.cjs';
|
|
2
|
+
import './Parselet-DF3864la.cjs';
|
|
3
|
+
import './BytecodeBuilder-DSWKZi4f.cjs';
|
|
4
|
+
import './Token-D8f7yaz1.cjs';
|
|
5
|
+
import './pipeline-BYkKNpql.cjs';
|
|
6
|
+
import './Value-BYHw-x7q.cjs';
|
|
7
|
+
import './CalendarBackend-MdS3Bb4P.cjs';
|
|
8
|
+
import './Lexer-DhGhoAa2.cjs';
|
|
9
|
+
import './EngineError-C-kBwYlN.cjs';
|
|
8
10
|
import './resolvers.cjs';
|
|
9
11
|
import '@tanstack/query-core';
|
|
10
|
-
import './TokenNormalizer-
|
|
11
|
-
import './
|
|
12
|
-
import './
|
|
13
|
-
import './Configuration-DnzYPmoK.cjs';
|
|
12
|
+
import './TokenNormalizer-Pe3_390t.cjs';
|
|
13
|
+
import './VMBuiltins-kv4rr0y5.cjs';
|
|
14
|
+
import './Configuration-BxriK9Kw.cjs';
|
|
14
15
|
|
|
15
16
|
/** Core arithmetic: numbers, `()` grouping, `pi`/`e` constants, `+ - * / % ^`, bitwise `<< >> & | ^`, and their `*_by` word forms. */
|
|
16
17
|
declare const ARITHMETIC_PACKAGE: IEnginePackage;
|
package/dist/packages.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { I as IEnginePackage } from './PackageRegistry-
|
|
2
|
-
import './Parselet-
|
|
3
|
-
import './BytecodeBuilder-
|
|
4
|
-
import './Token-
|
|
5
|
-
import './pipeline-
|
|
6
|
-
import './Value-
|
|
7
|
-
import './
|
|
1
|
+
import { I as IEnginePackage } from './PackageRegistry-CNZUwWHJ.js';
|
|
2
|
+
import './Parselet-Dgymjxzd.js';
|
|
3
|
+
import './BytecodeBuilder-DSWKZi4f.js';
|
|
4
|
+
import './Token-D8f7yaz1.js';
|
|
5
|
+
import './pipeline-Cl7KW8CB.js';
|
|
6
|
+
import './Value-BYHw-x7q.js';
|
|
7
|
+
import './CalendarBackend-MdS3Bb4P.js';
|
|
8
|
+
import './Lexer-DqtnZMC5.js';
|
|
9
|
+
import './EngineError-C-kBwYlN.js';
|
|
8
10
|
import './resolvers.js';
|
|
9
11
|
import '@tanstack/query-core';
|
|
10
|
-
import './TokenNormalizer-
|
|
11
|
-
import './
|
|
12
|
-
import './
|
|
13
|
-
import './Configuration-DnzYPmoK.js';
|
|
12
|
+
import './TokenNormalizer-IF7nPRMp.js';
|
|
13
|
+
import './VMBuiltins-CZiZRKn-.js';
|
|
14
|
+
import './Configuration-BxriK9Kw.js';
|
|
14
15
|
|
|
15
16
|
/** Core arithmetic: numbers, `()` grouping, `pi`/`e` constants, `+ - * / % ^`, bitwise `<< >> & | ^`, and their `*_by` word forms. */
|
|
16
17
|
declare const ARITHMETIC_PACKAGE: IEnginePackage;
|
package/dist/packages.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as ARITHMETIC_PACKAGE,n as BIGINT_PACKAGE,z as BUILTIN_PACKAGES,o as CONDITIONALS_PACKAGE,p as CONVERTERS_PACKAGE,j as CURRENCY_PACKAGE,d as DATETIME_PACKAGE,f as DICE_PACKAGE,r as FINANCE_PACKAGE,c as FUNCTION_PACKAGE,w as LINES_PACKAGE,m as MAPREDUCE_PACKAGE,q as MATHPHRASES_PACKAGE,l as MATRIX_PACKAGE,b as PERCENTAGE_PACKAGE,x as TABLES_PACKAGE,y as TAGS_PACKAGE,e as TIME_PACKAGE,h as UOM_PACKAGE,g as VARIABLES_PACKAGE,k as VECTOR_PACKAGE,s as WEATHER_PACKAGE,u as createCryptoPackage,i as createCurrencyPackage,v as createKnowledgePackage,t as createStocksPackage}from'./chunk-
|
|
1
|
+
export{a as ARITHMETIC_PACKAGE,n as BIGINT_PACKAGE,z as BUILTIN_PACKAGES,o as CONDITIONALS_PACKAGE,p as CONVERTERS_PACKAGE,j as CURRENCY_PACKAGE,d as DATETIME_PACKAGE,f as DICE_PACKAGE,r as FINANCE_PACKAGE,c as FUNCTION_PACKAGE,w as LINES_PACKAGE,m as MAPREDUCE_PACKAGE,q as MATHPHRASES_PACKAGE,l as MATRIX_PACKAGE,b as PERCENTAGE_PACKAGE,x as TABLES_PACKAGE,y as TAGS_PACKAGE,e as TIME_PACKAGE,h as UOM_PACKAGE,g as VARIABLES_PACKAGE,k as VECTOR_PACKAGE,s as WEATHER_PACKAGE,u as createCryptoPackage,i as createCurrencyPackage,v as createKnowledgePackage,t as createStocksPackage}from'./chunk-LMZDTQS5.js';import'./chunk-HANGBVEE.js';export{a as SYMBOLIC_PACKAGE}from'./chunk-S3ODNMJS.js';import'./chunk-YG7UWQFV.js';import'./chunk-LE6WZLJ4.js';import'./chunk-76F3LCIL.js';import'./chunk-TCZSPH4A.js';import'./chunk-CL7DM2FX.js';import'./chunk-D4VBWPWN.js';import'./chunk-ESZNJQ2C.js';import'./chunk-TZYMXNIB.js';import'./chunk-HFKDWQUL.js';import'./chunk-5TCSFTZD.js';import'./chunk-LTUYWJGO.js';import'./chunk-BLJ6E577.js';import'./chunk-J4K72CQN.js';import'./chunk-LQIRBP4Q.js';import'./chunk-4CNYGIND.js';import'./chunk-RRUGQ6DM.js';import'./chunk-FAO6DQ74.js';import'./chunk-LHLW7JLS.js';import'./chunk-CHVGFTO3.js';import'./chunk-PRSXXDTA.js';import'./chunk-VB6QMU2W.js';//# sourceMappingURL=packages.js.map
|
|
2
2
|
//# sourceMappingURL=packages.js.map
|
package/dist/parser.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk2SYYKQ4Q_cjs=require('./chunk-2SYYKQ4Q.cjs');require('./chunk-HG4NPDN5.cjs');var chunkZDJTDFTR_cjs=require('./chunk-ZDJTDFTR.cjs'),chunkABVDKMNF_cjs=require('./chunk-ABVDKMNF.cjs');require('./chunk-TPPM4QSS.cjs'),require('./chunk-E4HAKNBQ.cjs'),require('./chunk-YBQOQTVL.cjs'),require('./chunk-S3DFU33X.cjs'),require('./chunk-GXO7TSXQ.cjs');Object.defineProperty(exports,"ParseletRegistry",{enumerable:true,get:function(){return chunk2SYYKQ4Q_cjs.b}});Object.defineProperty(exports,"Parser",{enumerable:true,get:function(){return chunk2SYYKQ4Q_cjs.a}});Object.defineProperty(exports,"PrecedenceParser",{enumerable:true,get:function(){return chunk2SYYKQ4Q_cjs.a}});Object.defineProperty(exports,"sharedParseletRegistry",{enumerable:true,get:function(){return chunk2SYYKQ4Q_cjs.c}});Object.defineProperty(exports,"BindingPower",{enumerable:true,get:function(){return chunkZDJTDFTR_cjs.a}});Object.defineProperty(exports,"BytecodeBuilder",{enumerable:true,get:function(){return chunkZDJTDFTR_cjs.d}});Object.defineProperty(exports,"buildBindingPowerTable",{enumerable:true,get:function(){return chunkZDJTDFTR_cjs.b}});Object.defineProperty(exports,"invalidateBindingPowerTable",{enumerable:true,get:function(){return chunkZDJTDFTR_cjs.c}});Object.defineProperty(exports,"OpCode",{enumerable:true,get:function(){return chunkABVDKMNF_cjs.a}});Object.defineProperty(exports,"getOpCodeName",{enumerable:true,get:function(){return chunkABVDKMNF_cjs.b}});//# sourceMappingURL=parser.cjs.map
|
|
2
2
|
//# sourceMappingURL=parser.cjs.map
|
package/dist/parser.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { I as InfixParselet, P as ParseletRegistry, a as Parser, a as PrecedenceParser, b as PrefixParselet, s as sharedParseletRegistry } from './Parselet-
|
|
2
|
-
export { B as BytecodeBuilder, a as BytecodeProgram, O as OpCode, g as getOpCodeName } from './BytecodeBuilder-
|
|
3
|
-
import './Token-
|
|
4
|
-
import './pipeline-
|
|
5
|
-
import './Value-
|
|
1
|
+
export { I as InfixParselet, P as ParseletRegistry, a as Parser, a as PrecedenceParser, b as PrefixParselet, s as sharedParseletRegistry } from './Parselet-DF3864la.cjs';
|
|
2
|
+
export { B as BytecodeBuilder, a as BytecodeProgram, O as OpCode, g as getOpCodeName } from './BytecodeBuilder-DSWKZi4f.cjs';
|
|
3
|
+
import './Token-D8f7yaz1.cjs';
|
|
4
|
+
import './pipeline-BYkKNpql.cjs';
|
|
5
|
+
import './Value-BYHw-x7q.cjs';
|
|
6
|
+
import './CalendarBackend-MdS3Bb4P.cjs';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Named precedence levels for the Pratt parser, from loosest (`Lowest`) to
|
package/dist/parser.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { I as InfixParselet, P as ParseletRegistry, a as Parser, a as PrecedenceParser, b as PrefixParselet, s as sharedParseletRegistry } from './Parselet-
|
|
2
|
-
export { B as BytecodeBuilder, a as BytecodeProgram, O as OpCode, g as getOpCodeName } from './BytecodeBuilder-
|
|
3
|
-
import './Token-
|
|
4
|
-
import './pipeline-
|
|
5
|
-
import './Value-
|
|
1
|
+
export { I as InfixParselet, P as ParseletRegistry, a as Parser, a as PrecedenceParser, b as PrefixParselet, s as sharedParseletRegistry } from './Parselet-Dgymjxzd.js';
|
|
2
|
+
export { B as BytecodeBuilder, a as BytecodeProgram, O as OpCode, g as getOpCodeName } from './BytecodeBuilder-DSWKZi4f.js';
|
|
3
|
+
import './Token-D8f7yaz1.js';
|
|
4
|
+
import './pipeline-Cl7KW8CB.js';
|
|
5
|
+
import './Value-BYHw-x7q.js';
|
|
6
|
+
import './CalendarBackend-MdS3Bb4P.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Named precedence levels for the Pratt parser, from loosest (`Lowest`) to
|
package/dist/parser.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{b as ParseletRegistry,a as Parser,a as PrecedenceParser,c as sharedParseletRegistry}from'./chunk-
|
|
1
|
+
export{b as ParseletRegistry,a as Parser,a as PrecedenceParser,c as sharedParseletRegistry}from'./chunk-VQO54ZMA.js';import'./chunk-JP4JMQOG.js';export{a as BindingPower,d as BytecodeBuilder,b as buildBindingPowerTable,c as invalidateBindingPowerTable}from'./chunk-YG7UWQFV.js';export{a as OpCode,b as getOpCodeName}from'./chunk-TZYMXNIB.js';import'./chunk-BLJ6E577.js';import'./chunk-J4K72CQN.js';import'./chunk-FAO6DQ74.js';import'./chunk-LHLW7JLS.js';import'./chunk-VB6QMU2W.js';//# sourceMappingURL=parser.js.map
|
|
2
2
|
//# sourceMappingURL=parser.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MatrixData, R as RangeData, C as ColourData, S as SplitData, f as ChartData, I as IpCidrData, g as SymbolicNode } from './Value-
|
|
1
|
+
import { M as MatrixData, R as RangeData, C as ColourData, S as SplitData, f as ChartData, I as IpCidrData, g as SymbolicNode } from './Value-BYHw-x7q.cjs';
|
|
2
2
|
|
|
3
3
|
/** Base event, all events include a timestamp relative to pipeline start */
|
|
4
4
|
interface BaseEvent {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MatrixData, R as RangeData, C as ColourData, S as SplitData, f as ChartData, I as IpCidrData, g as SymbolicNode } from './Value-
|
|
1
|
+
import { M as MatrixData, R as RangeData, C as ColourData, S as SplitData, f as ChartData, I as IpCidrData, g as SymbolicNode } from './Value-BYHw-x7q.js';
|
|
2
2
|
|
|
3
3
|
/** Base event, all events include a timestamp relative to pipeline start */
|
|
4
4
|
interface BaseEvent {
|
package/dist/resolvers.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/query-core';
|
|
2
|
-
import { T as Token } from './Token-
|
|
3
|
-
import { a as BytecodeProgram } from './BytecodeBuilder-
|
|
4
|
-
import { V as Value } from './Value-
|
|
2
|
+
import { T as Token } from './Token-D8f7yaz1.cjs';
|
|
3
|
+
import { a as BytecodeProgram } from './BytecodeBuilder-DSWKZi4f.cjs';
|
|
4
|
+
import { V as Value } from './Value-BYHw-x7q.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Result from a resolver's preflight() check.
|
package/dist/resolvers.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/query-core';
|
|
2
|
-
import { T as Token } from './Token-
|
|
3
|
-
import { a as BytecodeProgram } from './BytecodeBuilder-
|
|
4
|
-
import { V as Value } from './Value-
|
|
2
|
+
import { T as Token } from './Token-D8f7yaz1.js';
|
|
3
|
+
import { a as BytecodeProgram } from './BytecodeBuilder-DSWKZi4f.js';
|
|
4
|
+
import { V as Value } from './Value-BYHw-x7q.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Result from a resolver's preflight() check.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkZE5KKMBV_cjs=require('./chunk-ZE5KKMBV.cjs');require('./chunk-E4HAKNBQ.cjs'),require('./chunk-GXO7TSXQ.cjs');Object.defineProperty(exports,"TemporalCalendar",{enumerable:true,get:function(){return chunkZE5KKMBV_cjs.a}});Object.defineProperty(exports,"createTemporalCalendar",{enumerable:true,get:function(){return chunkZE5KKMBV_cjs.b}});//# sourceMappingURL=temporal.cjs.map
|
|
2
|
+
//# sourceMappingURL=temporal.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"temporal.cjs"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { C as CalendarBackend, a as CalendarFields, Z as ZonedFields } from './CalendarBackend-MdS3Bb4P.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `Temporal` calendar backend: the engine's date questions answered
|
|
5
|
+
* through a `Temporal` implementation the host supplies, in a time zone the
|
|
6
|
+
* host chooses.
|
|
7
|
+
*
|
|
8
|
+
* `Temporal` is the JavaScript standard library's replacement for `Date`. It
|
|
9
|
+
* ships unflagged in Node 26 and in current Chrome, Firefox and Deno, but not
|
|
10
|
+
* in Safari nor in Node 22 and 24, and the smallest polyfill adds about twenty
|
|
11
|
+
* kilobytes gzipped to a bundle. The engine therefore imports no `Temporal`
|
|
12
|
+
* and no polyfill: this module is reached only through the
|
|
13
|
+
* `solve-engine/temporal` entry, and the host hands it the implementation to
|
|
14
|
+
* use, `globalThis.Temporal` on a runtime that has one or a polyfill's export.
|
|
15
|
+
* A host that never imports the entry pays nothing for it.
|
|
16
|
+
*
|
|
17
|
+
* The backend answers exactly what the `Date` backend answers. That is a
|
|
18
|
+
* design constraint rather than a hope: `Temporal` and `Date` differ in what
|
|
19
|
+
* they do with an out-of-range instant (`RangeError` against `NaN`), a
|
|
20
|
+
* fractional millisecond (a throw against truncation), a day past the end of
|
|
21
|
+
* a month (a clamp or a throw against a roll into the next month) and a year
|
|
22
|
+
* from 0 to 99 (read literally against read as the 1900s), and every one of
|
|
23
|
+
* those is reproduced here the way `Date` does it, because the engine's
|
|
24
|
+
* results are measured against `Date` and a host switching backends must see
|
|
25
|
+
* no result move. The differential suite under `__tests__/temporal/` is what
|
|
26
|
+
* holds that line.
|
|
27
|
+
*
|
|
28
|
+
* The one thing that does change is the zone. `Date` reads the process's own
|
|
29
|
+
* zone and nothing else; this backend reads the zone it was constructed with,
|
|
30
|
+
* so a document can be computed in Tokyo from a server in London, or in a
|
|
31
|
+
* zone the reader picks. That is the capability the backend adds, and the
|
|
32
|
+
* only observable difference.
|
|
33
|
+
*
|
|
34
|
+
* The named-zone display strings go through the same `Intl.DateTimeFormat`
|
|
35
|
+
* helpers the `Date` backend uses (`calendar/IntlZone.ts`), and the zone-free
|
|
36
|
+
* arithmetic through `calendar/Gregorian.ts`, so the two backends share one
|
|
37
|
+
* implementation wherever an answer does not depend on which backend is in
|
|
38
|
+
* use. The one piece of arithmetic `Date` keeps inside its own setters, the
|
|
39
|
+
* normalisation of overflowing fields, is written out in `CivilDays.ts`.
|
|
40
|
+
*
|
|
41
|
+
* @module TemporalCalendar
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The part of a `Temporal.Instant` the backend reads: its epoch milliseconds,
|
|
46
|
+
* and the zoned date-time it shows in a named zone.
|
|
47
|
+
*/
|
|
48
|
+
interface TemporalInstantLike {
|
|
49
|
+
readonly epochMilliseconds: number;
|
|
50
|
+
toZonedDateTimeISO(timeZone: string): TemporalZonedDateTimeLike;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The part of a `Temporal.ZonedDateTime` the backend reads: the calendar
|
|
54
|
+
* fields (a one-based month and an ISO weekday, Monday 1 to Sunday 7, both
|
|
55
|
+
* translated at the boundary), the offset, and the instant.
|
|
56
|
+
*/
|
|
57
|
+
interface TemporalZonedDateTimeLike {
|
|
58
|
+
readonly year: number;
|
|
59
|
+
/** One-based month, 1 is January, as `Temporal` counts. */
|
|
60
|
+
readonly month: number;
|
|
61
|
+
readonly day: number;
|
|
62
|
+
/** ISO weekday: Monday is 1, Sunday is 7. */
|
|
63
|
+
readonly dayOfWeek: number;
|
|
64
|
+
readonly hour: number;
|
|
65
|
+
readonly minute: number;
|
|
66
|
+
readonly second: number;
|
|
67
|
+
readonly millisecond: number;
|
|
68
|
+
/** The zone's offset from UTC at this instant, in nanoseconds, positive when ahead. */
|
|
69
|
+
readonly offsetNanoseconds: number;
|
|
70
|
+
readonly epochMilliseconds: number;
|
|
71
|
+
/** The zone's canonical IANA identifier. */
|
|
72
|
+
readonly timeZoneId: string;
|
|
73
|
+
}
|
|
74
|
+
/** The part of a `Temporal.PlainDateTime` the backend uses: resolving a wall-clock time to an instant in a zone. */
|
|
75
|
+
interface TemporalPlainDateTimeLike {
|
|
76
|
+
toZonedDateTime(timeZone: string, options?: {
|
|
77
|
+
disambiguation?: "compatible" | "earlier" | "later" | "reject";
|
|
78
|
+
}): TemporalZonedDateTimeLike;
|
|
79
|
+
}
|
|
80
|
+
/** The wall-clock fields a `Temporal.PlainDateTime` is built from, with a one-based month. */
|
|
81
|
+
interface TemporalDateTimeFields {
|
|
82
|
+
year: number;
|
|
83
|
+
/** One-based month, 1 is January. */
|
|
84
|
+
month: number;
|
|
85
|
+
day: number;
|
|
86
|
+
hour: number;
|
|
87
|
+
minute: number;
|
|
88
|
+
second: number;
|
|
89
|
+
millisecond: number;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The subset of the `Temporal` namespace the backend uses, as a structural
|
|
93
|
+
* type, so the engine compiles and ships with no `Temporal` type installed
|
|
94
|
+
* and a host passes whichever implementation it has: `globalThis.Temporal`
|
|
95
|
+
* on Node 26 or a current browser, or the export of a polyfill such as
|
|
96
|
+
* `temporal-polyfill`. Both satisfy this shape as they are.
|
|
97
|
+
*/
|
|
98
|
+
interface TemporalLike {
|
|
99
|
+
readonly Now: {
|
|
100
|
+
instant(): TemporalInstantLike;
|
|
101
|
+
timeZoneId(): string;
|
|
102
|
+
};
|
|
103
|
+
readonly Instant: {
|
|
104
|
+
fromEpochMilliseconds(epochMilliseconds: number): TemporalInstantLike;
|
|
105
|
+
};
|
|
106
|
+
readonly PlainDateTime: {
|
|
107
|
+
from(fields: TemporalDateTimeFields, options?: {
|
|
108
|
+
overflow?: "constrain" | "reject";
|
|
109
|
+
}): TemporalPlainDateTimeLike;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/** What {@link createTemporalCalendar} takes beside the implementation. */
|
|
113
|
+
interface TemporalCalendarOptions {
|
|
114
|
+
/**
|
|
115
|
+
* The IANA time zone the engine computes dates in (`"Asia/Tokyo"`,
|
|
116
|
+
* `"UTC"`). Defaults to the runtime's own zone, `Temporal.Now.timeZoneId()`,
|
|
117
|
+
* which is what the `Date` backend reads. A zone the implementation does
|
|
118
|
+
* not know is refused at construction with `TEMPORAL_TIME_ZONE_UNKNOWN`.
|
|
119
|
+
*/
|
|
120
|
+
timeZone?: string;
|
|
121
|
+
/**
|
|
122
|
+
* The clock `now()` reads, in epoch milliseconds. Defaults to
|
|
123
|
+
* `Temporal.Now.instant()`. A test pins a date with this: a fake-timer
|
|
124
|
+
* library replaces `Date.now`, which the `Date` backend reads, but not
|
|
125
|
+
* `Temporal.Now`, so this backend needs telling separately.
|
|
126
|
+
*/
|
|
127
|
+
now?: () => number;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* A {@link CalendarBackend} over a `Temporal` implementation, computing in
|
|
131
|
+
* one named time zone. Build one with {@link createTemporalCalendar}.
|
|
132
|
+
*
|
|
133
|
+
* Every method answers what the `Date` backend answers for the same inputs
|
|
134
|
+
* when the zone is the process's own; see the module comment for the
|
|
135
|
+
* differences between `Temporal` and `Date` that are reproduced deliberately.
|
|
136
|
+
* The local methods answer `NaN` for an instant or a date the backend cannot
|
|
137
|
+
* represent and never throw; the four named-zone methods throw the runtime's
|
|
138
|
+
* `RangeError` for a zone it does not know or an instant it cannot represent,
|
|
139
|
+
* which is the contract the interface states.
|
|
140
|
+
*/
|
|
141
|
+
declare class TemporalCalendar implements CalendarBackend {
|
|
142
|
+
/** The IANA zone every local answer is computed in, in its canonical spelling. */
|
|
143
|
+
readonly timeZone: string;
|
|
144
|
+
private readonly temporal;
|
|
145
|
+
private readonly clock;
|
|
146
|
+
constructor(temporal: TemporalLike, options?: TemporalCalendarOptions);
|
|
147
|
+
now(): number;
|
|
148
|
+
fields(epochMs: number): CalendarFields;
|
|
149
|
+
localMidnight(year: number, month0: number, day: number): number;
|
|
150
|
+
localWallClock(year: number, month0: number, day: number, minutesPastMidnight: number): number;
|
|
151
|
+
addDays(epochMs: number, days: number): number;
|
|
152
|
+
addMonths(epochMs: number, months: number): number;
|
|
153
|
+
utcOffsetMinutes(epochMs: number): number;
|
|
154
|
+
parseIso8601(text: string): number;
|
|
155
|
+
formatLongDate(epochMs: number, locale: string): string;
|
|
156
|
+
formatTimeOfDay(epochMs: number, locale: string): string;
|
|
157
|
+
zoneOffsetMinutes(zone: string, epochMs: number): number;
|
|
158
|
+
fieldsInZone(zone: string, epochMs: number): ZonedFields;
|
|
159
|
+
/** The IANA zone this backend computes in, which is what `CalendarBackend.zone` documents. */
|
|
160
|
+
zone(): string;
|
|
161
|
+
formatTimeInZone(zone: string, epochMs: number): string;
|
|
162
|
+
formatDateInZone(zone: string, epochMs: number): string;
|
|
163
|
+
/** The zoned date-time of an instant, or `null` where `Date` would answer `NaN`. */
|
|
164
|
+
private zoned;
|
|
165
|
+
/**
|
|
166
|
+
* The instant a set of local wall-clock fields names, with the fields
|
|
167
|
+
* normalised the way `Date`'s constructor and setters normalise them
|
|
168
|
+
* (month 12 is next January, day 0 the last of the month before, a year
|
|
169
|
+
* from 0 to 99 the 1900s) before the zone is consulted.
|
|
170
|
+
*/
|
|
171
|
+
private wallClock;
|
|
172
|
+
/**
|
|
173
|
+
* Normalised wall-clock fields resolved to an instant in the backend's
|
|
174
|
+
* zone, clipped to the range `Date` represents only then, as `Date` clips
|
|
175
|
+
* last. `compatible` disambiguation is `Date`'s rule: a time in a
|
|
176
|
+
* spring-forward gap moves later by the gap, and a time that occurs twice
|
|
177
|
+
* on a fall-back day is its first occurrence.
|
|
178
|
+
*/
|
|
179
|
+
private resolve;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* A calendar backend over the host's `Temporal`, for the engine's `calendar`
|
|
183
|
+
* option.
|
|
184
|
+
*
|
|
185
|
+
* ```ts
|
|
186
|
+
* import { createEngine } from "solve-engine";
|
|
187
|
+
* import { createTemporalCalendar } from "solve-engine/temporal";
|
|
188
|
+
*
|
|
189
|
+
* const calendar = createTemporalCalendar(globalThis.Temporal, { timeZone: "Asia/Tokyo" });
|
|
190
|
+
* const engine = createEngine({ calendar });
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
193
|
+
* @param temporal - The `Temporal` implementation: `globalThis.Temporal` where the runtime ships one, or a polyfill's export.
|
|
194
|
+
* @param options - The zone to compute in and, for a test, the clock to read; see {@link TemporalCalendarOptions}.
|
|
195
|
+
* @returns A backend that computes every date in that zone and answers what the `Date` backend would in it.
|
|
196
|
+
* @throws `TEMPORAL_IMPLEMENTATION_INVALID` when `temporal` lacks the members the backend uses, and
|
|
197
|
+
* `TEMPORAL_TIME_ZONE_UNKNOWN` when the implementation does not know the zone asked for.
|
|
198
|
+
*/
|
|
199
|
+
declare function createTemporalCalendar(temporal: TemporalLike, options?: TemporalCalendarOptions): TemporalCalendar;
|
|
200
|
+
|
|
201
|
+
export { CalendarBackend, CalendarFields, TemporalCalendar, type TemporalCalendarOptions, type TemporalDateTimeFields, type TemporalInstantLike, type TemporalLike, type TemporalPlainDateTimeLike, type TemporalZonedDateTimeLike, ZonedFields, createTemporalCalendar };
|