solve-engine 1.0.0-beta.2 → 1.0.0-beta.3

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 (97) hide show
  1. package/dist/{Lexer-BJdhlnej.d.cts → Lexer-Dkt7KGaU.d.ts} +18 -2
  2. package/dist/{Lexer-D9l4Yrk2.d.ts → Lexer-y8uY6n6t.d.cts} +18 -2
  3. package/dist/{PackageRegistry-D-Tv_7ca.d.cts → PackageRegistry-CblRmrHc.d.cts} +60 -4
  4. package/dist/{PackageRegistry-DaH4aIKP.d.ts → PackageRegistry-wUQyVEyw.d.ts} +60 -4
  5. package/dist/{Parselet-CK8cQu2a.d.cts → Parselet-C974vhZG.d.cts} +1 -1
  6. package/dist/{Parselet-ConOIdRO.d.ts → Parselet-CsmtM3It.d.ts} +1 -1
  7. package/dist/{Token-0jpvUdPY.d.cts → Token-DnU2hwFY.d.cts} +14 -0
  8. package/dist/{Token-0jpvUdPY.d.ts → Token-DnU2hwFY.d.ts} +14 -0
  9. package/dist/TokenNormalizer-B8zmhO5X.d.ts +377 -0
  10. package/dist/TokenNormalizer-CqBCrYkR.d.cts +377 -0
  11. package/dist/{chunk-M5LX5AOO.js → chunk-23MFG6GG.js} +21 -8
  12. package/dist/chunk-23MFG6GG.js.map +1 -0
  13. package/dist/{chunk-SDGRK7EP.js → chunk-2A3VOGVG.js} +4 -4
  14. package/dist/{chunk-SDGRK7EP.js.map → chunk-2A3VOGVG.js.map} +1 -1
  15. package/dist/{chunk-NMD5VRN4.cjs → chunk-2R7SVDDB.cjs} +68 -67
  16. package/dist/chunk-2R7SVDDB.cjs.map +1 -0
  17. package/dist/{chunk-RIN643A3.js → chunk-626UW5RU.js} +2 -2
  18. package/dist/chunk-626UW5RU.js.map +1 -0
  19. package/dist/{chunk-CLL7RUQV.cjs → chunk-7J2Q77OH.cjs} +34 -13
  20. package/dist/chunk-7J2Q77OH.cjs.map +1 -0
  21. package/dist/{chunk-HWSZJQCI.js → chunk-AF5AE52C.js} +33 -12
  22. package/dist/chunk-AF5AE52C.js.map +1 -0
  23. package/dist/{chunk-RZCWSXTA.cjs → chunk-BOAVE4FC.cjs} +129 -129
  24. package/dist/{chunk-RZCWSXTA.cjs.map → chunk-BOAVE4FC.cjs.map} +1 -1
  25. package/dist/{chunk-EBSPLUW4.cjs → chunk-CGIDYRAX.cjs} +19 -9
  26. package/dist/chunk-CGIDYRAX.cjs.map +1 -0
  27. package/dist/{chunk-C4XZV6E7.cjs → chunk-EEJSQEHC.cjs} +20 -20
  28. package/dist/{chunk-C4XZV6E7.cjs.map → chunk-EEJSQEHC.cjs.map} +1 -1
  29. package/dist/{chunk-LR7YASZF.cjs → chunk-F7G7ZFIZ.cjs} +3 -3
  30. package/dist/chunk-F7G7ZFIZ.cjs.map +1 -0
  31. package/dist/{chunk-GW32KPCU.cjs → chunk-FI4WDYSL.cjs} +2 -2
  32. package/dist/chunk-FI4WDYSL.cjs.map +1 -0
  33. package/dist/{chunk-EIGTWK5N.js → chunk-KFRBAXKW.js} +3 -3
  34. package/dist/chunk-KFRBAXKW.js.map +1 -0
  35. package/dist/{chunk-64W6GLLZ.js → chunk-OJ6LW7VQ.js} +15 -5
  36. package/dist/chunk-OJ6LW7VQ.js.map +1 -0
  37. package/dist/{chunk-3PPFLFH4.js → chunk-OWXIOHQB.js} +6 -6
  38. package/dist/{chunk-3PPFLFH4.js.map → chunk-OWXIOHQB.js.map} +1 -1
  39. package/dist/{chunk-JBSYC7BB.cjs → chunk-PG2K5BL6.cjs} +41 -28
  40. package/dist/chunk-PG2K5BL6.cjs.map +1 -0
  41. package/dist/{chunk-XVWCOTR6.js → chunk-VM5ZKDLH.js} +5 -4
  42. package/dist/chunk-VM5ZKDLH.js.map +1 -0
  43. package/dist/{chunk-NMCRQP3Z.cjs → chunk-ZH2PCJ4V.cjs} +68 -68
  44. package/dist/{chunk-NMCRQP3Z.cjs.map → chunk-ZH2PCJ4V.cjs.map} +1 -1
  45. package/dist/{chunk-5YEMOYSE.js → chunk-ZS6CRJZP.js} +3 -3
  46. package/dist/{chunk-5YEMOYSE.js.map → chunk-ZS6CRJZP.js.map} +1 -1
  47. package/dist/constants.cjs +4 -4
  48. package/dist/constants.js +1 -1
  49. package/dist/engine.cjs +19 -19
  50. package/dist/engine.d.cts +6 -6
  51. package/dist/engine.d.ts +6 -6
  52. package/dist/engine.js +9 -9
  53. package/dist/index.cjs +18 -18
  54. package/dist/index.d.cts +6 -6
  55. package/dist/index.d.ts +6 -6
  56. package/dist/index.js +10 -10
  57. package/dist/language.cjs +63 -1
  58. package/dist/language.cjs.map +1 -1
  59. package/dist/language.d.cts +6 -6
  60. package/dist/language.d.ts +6 -6
  61. package/dist/language.js +63 -1
  62. package/dist/language.js.map +1 -1
  63. package/dist/lexer.cjs +14 -14
  64. package/dist/lexer.d.cts +3 -3
  65. package/dist/lexer.d.ts +3 -3
  66. package/dist/lexer.js +3 -3
  67. package/dist/normalizer.cjs +9 -9
  68. package/dist/normalizer.d.cts +4 -210
  69. package/dist/normalizer.d.ts +4 -210
  70. package/dist/normalizer.js +3 -3
  71. package/dist/packages.cjs +28 -28
  72. package/dist/packages.d.cts +5 -5
  73. package/dist/packages.d.ts +5 -5
  74. package/dist/packages.js +5 -5
  75. package/dist/parser.cjs +11 -11
  76. package/dist/parser.d.cts +2 -2
  77. package/dist/parser.d.ts +2 -2
  78. package/dist/parser.js +3 -3
  79. package/dist/resolvers.d.cts +1 -1
  80. package/dist/resolvers.d.ts +1 -1
  81. package/dist/uom.d.cts +1 -1
  82. package/dist/uom.d.ts +1 -1
  83. package/package.json +2 -1
  84. package/dist/NormalizerRule-BrVoVjmP.d.cts +0 -163
  85. package/dist/NormalizerRule-CEjf1FyD.d.ts +0 -163
  86. package/dist/chunk-64W6GLLZ.js.map +0 -1
  87. package/dist/chunk-CLL7RUQV.cjs.map +0 -1
  88. package/dist/chunk-EBSPLUW4.cjs.map +0 -1
  89. package/dist/chunk-EIGTWK5N.js.map +0 -1
  90. package/dist/chunk-GW32KPCU.cjs.map +0 -1
  91. package/dist/chunk-HWSZJQCI.js.map +0 -1
  92. package/dist/chunk-JBSYC7BB.cjs.map +0 -1
  93. package/dist/chunk-LR7YASZF.cjs.map +0 -1
  94. package/dist/chunk-M5LX5AOO.js.map +0 -1
  95. package/dist/chunk-NMD5VRN4.cjs.map +0 -1
  96. package/dist/chunk-RIN643A3.js.map +0 -1
  97. package/dist/chunk-XVWCOTR6.js.map +0 -1
@@ -1,212 +1,6 @@
1
- import { T as Token } from './Token-0jpvUdPY.js';
2
- import { T as TokenFusion, N as NormalizerRule, a as NormalizerMatch } from './NormalizerRule-CEjf1FyD.js';
3
-
4
- /**
5
- * TokenNormalizer, post-lexer token normalization pass.
6
- *
7
- * ## Purpose
8
- * Applies domain-specific {@link NormalizerRule | NormalizerRules} to the raw
9
- * token stream produced by the {@link ExpressionLexer}. This keeps the lexer
10
- * slim and focused on single-token production, while multi-token pattern
11
- * matching (phrases, implicit operators, domain merges) lives here.
12
- *
13
- * ## What rules can do
14
- * - **Phrase fusion**: Merge consecutive words into compound tokens
15
- * (e.g., `IDENT + ... + IDENT` → `CARET`)
16
- * - **Implicit operator insertion**: Insert missing operators between tokens
17
- * (e.g., `NUMBER IDENT` → `NUMBER STAR IDENT`)
18
- * - **Domain-specific transformations**: Coalesce item names, currency pairs,
19
- * percentage syntax, etc.
20
- *
21
- * ## Architecture
22
- * Providers register NormalizerRules alongside Parselets and OpCode handlers
23
- * via {@link IEnginePackage.normalizerRules}. The normalizer applies them
24
- * greedily left-to-right in multiple passes with safety limits.
25
- *
26
- * @module TokenNormalizer
27
- */
28
-
29
- /**
30
- * Configuration options for the normalization pass.
31
- *
32
- * These control safety limits and diagnostic callbacks. The defaults
33
- * are chosen to be generous enough for any realistic expression while
34
- * preventing runaway token expansion from recursive rules.
35
- */
36
- interface NormalizerOptions {
37
- /**
38
- * Maximum number of full passes over the token stream before bailing out.
39
- * Prevents infinite loops from recursive rule chains.
40
- * @default 100
41
- */
42
- maxPasses?: number;
43
- /**
44
- * Maximum number of tokens allowed after normalization.
45
- * If exceeded, an Error is thrown rather than passing a bloated stream
46
- * to the parser.
47
- * @default 10000
48
- */
49
- maxTokens?: number;
50
- /**
51
- * Callback invoked for each fusion event during normalization.
52
- * Used by diagnostic mode to populate {@link NormalizerOutput.fusions}.
53
- * When `undefined`, fusions are still tracked internally but no callbacks fire.
54
- */
55
- onFusion?: (fusion: TokenFusion) => void;
56
- }
57
- /**
58
- * Creates a new normalized token from fused source tokens.
59
- *
60
- * The fused token inherits position information (offset, line, column)
61
- * from the first source token, which preserves source-map accuracy
62
- * for error messages and diagnostic highlighting.
63
- *
64
- * @param type - The new token type (e.g., "CARET", "TIMES_BY")
65
- * @param text - The combined text representation (e.g., "to the power of")
66
- * @param sourceTokens - The original tokens being fused (at least 2)
67
- * @returns A new {@link LexerToken} with the fused type and combined text
68
- */
69
- declare function createFusedToken(type: string, text: string, sourceTokens: Token[]): Token;
70
- /**
71
- * Token normalizer: applies {@link NormalizerRule | NormalizerRules} to a token stream.
72
- *
73
- * ## Lifecycle
74
- * 1. **Registration**: Rules are added via {@link register} and sorted by priority
75
- * 2. **Normalization**: {@link normalize} applies rules greedily left-to-right
76
- * 3. **Cleanup**: {@link clear} or {@link unregister} removes rules
77
- *
78
- * ## Normalization algorithm
79
- * The normalizer uses a greedy left-to-right multi-pass algorithm:
80
- * - At each token position, rules are tried in priority order (highest first)
81
- * - When a rule matches, matched tokens are consumed and replaced
82
- * - Processing continues from the replacement position
83
- * - Multiple passes handle cascading matches (one rule's output triggers another)
84
- * - Safety limits ({@link NormalizerOptions.maxPasses}) prevent infinite loops
85
- *
86
- * @example
87
- * ```ts
88
- * const normalizer = new TokenNormalizer();
89
- * normalizer.register(phraseRule); // "to the power of" → CARET
90
- * normalizer.register(implicitMultRule); // "2 x" → "2 * x"
91
- * const normalized = normalizer.normalize(rawTokens);
92
- * ```
93
- */
94
- declare class TokenNormalizer {
95
- /** Registered rules, unsorted, the source of truth. */
96
- private rules;
97
- /**
98
- * Priority-sorted copy of {@link rules}, rebuilt lazily on the next
99
- * {@link normalize} call after a mutation. Rules are registered once at
100
- * engine/package-registration time and essentially never change during a
101
- * session, but normalize() runs on every keystroke-driven evaluation, an
102
- * earlier version re-sorted a fresh copy of `rules` on every single call,
103
- * which meant every keystroke paid for an allocation + sort of a list that
104
- * had usually not changed since the last one. `null` means "stale, rebuild
105
- * on next use"; {@link register}/{@link unregister}/{@link clear} all
106
- * invalidate it.
107
- */
108
- private sortedRulesCache;
109
- /**
110
- * Phrase trie for single-pass multi-word phrase fusion.
111
- * Tried at each token position BEFORE other rules, the trie walk
112
- * is O(depth) vs O(R × W) for separate rule matching.
113
- */
114
- private phraseTrie;
115
- /** Merged options with defaults applied. */
116
- private options;
117
- /**
118
- * @param options - Configuration overrides for safety limits and diagnostic callbacks
119
- */
120
- constructor(options?: NormalizerOptions);
121
- /**
122
- * Register a normalization rule.
123
- *
124
- * Rules are sorted by priority (descending) on each {@link normalize} call.
125
- * Multiple rules can share the same priority, they are tried in registration
126
- * order when priorities are equal.
127
- *
128
- * @param rule - The rule to register
129
- */
130
- register(rule: NormalizerRule): void;
131
- /**
132
- * Unregister a normalization rule by its {@link NormalizerRule.name | name}.
133
- *
134
- * If multiple rules share the same name, all are removed. This is safe to
135
- * call with a name that doesn't match any rule, it simply has no effect.
136
- *
137
- * @param ruleName - The name of the rule to remove
138
- */
139
- unregister(ruleName: string): void;
140
- /**
141
- * Remove all registered rules, resetting the normalizer to its initial state.
142
- * Also clears the phrase trie.
143
- */
144
- clear(): void;
145
- /**
146
- * Priority-sorted view of {@link rules} (descending priority; registration
147
- * order preserved for ties, since {@link Array.prototype.sort} is stable).
148
- * Cached until the next mutation. See {@link sortedRulesCache}.
149
- */
150
- private getSortedRules;
151
- /**
152
- * Get the number of currently registered rules (excludes phrase trie entries).
153
- */
154
- get ruleCount(): number;
155
- /**
156
- * Register a multi-word phrase for fusion into a single compound token.
157
- *
158
- * This is the preferred way to add phrase patterns. It inserts into the
159
- * internal {@link PhraseTrie}, which collapses all phrase rules into a
160
- * single O(depth) trie walk per position, no separate rule scanning.
161
- *
162
- * @param phrase - Multi-word phrase (e.g., "to the power of", "abyssal whip")
163
- * @param tokenType - Target token type after fusion (e.g., "CARET", "ITEM")
164
- */
165
- addPhrase(phrase: string, tokenType: string): void;
166
- /**
167
- * Check whether a word can start any registered phrase.
168
- *
169
- * Used by {@link implicitMultiplyRule} to suppress `*` insertion
170
- * before phrase-starting identifiers (e.g., "2 power of 3" → `2 ^ 3`,
171
- * not `2 * power of 3`). Delegates to {@link PhraseTrie.canStart}.
172
- */
173
- /**
174
- * Get all registered phrases and their target token types.
175
- *
176
- * Exposes the full phrase trie structure for diagnostic rendering
177
- * in the playground's NormalizerTab. Returns ALL registered phrases,
178
- * not just the ones that matched in the last evaluation.
179
- */
180
- getPhrases(): Record<string, string>;
181
- canStartPhrase(word: string): boolean;
182
- /**
183
- * Normalize a token stream by applying all registered rules.
184
- *
185
- * ## Algorithm
186
- * Applies rules greedily left-to-right in multiple passes:
187
- * 1. Sort rules by priority (descending)
188
- * 2. Walk the token stream left to right
189
- * 3. At each position, try rules in priority order
190
- * 4. On match: consume matched tokens, insert replacements, restart from insert point
191
- * 5. On no match: pass token through unchanged
192
- * 6. Repeat until a full pass produces no changes, or maxPasses is reached
193
- *
194
- * ## Fusion tracking
195
- * When a rule consumes more tokens than it produces, the normalizer calls
196
- * `onFusion` with a {@link TokenFusion} record for diagnostic collection.
197
- * This populates {@link NormalizerOutput.fusions} in the playground pipeline view.
198
- *
199
- * ## Safety
200
- * If the normalized token count exceeds {@link NormalizerOptions.maxTokens},
201
- * an Error is thrown to prevent memory exhaustion from runaway rule expansion.
202
- *
203
- * @param tokens - Raw tokens from the lexer
204
- * @param onFusion - Optional fusion callback (overrides {@link NormalizerOptions.onFusion})
205
- * @returns Normalized tokens ready for parsing
206
- * @throws {Error} If the normalized token count exceeds maxTokens
207
- */
208
- normalize(tokens: Token[], onFusion?: (fusion: TokenFusion) => void): Token[];
209
- }
1
+ import { N as NormalizerMatch, a as NormalizerRule } from './TokenNormalizer-B8zmhO5X.js';
2
+ export { b as NormalizerOptions, T as TokenFusion, c as TokenNormalizer, d as createFusedToken } from './TokenNormalizer-B8zmhO5X.js';
3
+ import { T as Token } from './Token-DnU2hwFY.js';
210
4
 
211
5
  /**
212
6
  * PhraseTrie, optimized word-level trie for multi-word phrase fusion.
@@ -361,4 +155,4 @@ declare function createBuiltinNormalizerRules(): NormalizerRule[];
361
155
  */
362
156
  declare const BUILTIN_PHRASES: Record<string, string>;
363
157
 
364
- export { BUILTIN_PHRASES, NormalizerMatch, type NormalizerOptions, NormalizerRule, PhraseTrie, TokenFusion, TokenNormalizer, createBuiltinNormalizerRules, createFusedToken, implicitMultiplyRule };
158
+ export { BUILTIN_PHRASES, NormalizerMatch, NormalizerRule, PhraseTrie, createBuiltinNormalizerRules, implicitMultiplyRule };
@@ -1,7 +1,7 @@
1
1
  import './chunk-2RWAXT6O.js';
2
- export { BUILTIN_PHRASES, PhraseTrie, TokenNormalizer, createBuiltinNormalizerRules, createFusedToken, implicitMultiplyRule } from './chunk-64W6GLLZ.js';
3
- import './chunk-XVWCOTR6.js';
4
- import './chunk-RIN643A3.js';
2
+ export { BUILTIN_PHRASES, PhraseTrie, TokenNormalizer, createBuiltinNormalizerRules, createFusedToken, implicitMultiplyRule } from './chunk-OJ6LW7VQ.js';
3
+ import './chunk-VM5ZKDLH.js';
4
+ import './chunk-626UW5RU.js';
5
5
  import './chunk-GOLDJNMZ.js';
6
6
  import './chunk-LIPPNDBE.js';
7
7
  import './chunk-4MG4XKO2.js';
package/dist/packages.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkRZCWSXTA_cjs = require('./chunk-RZCWSXTA.cjs');
4
- require('./chunk-C4XZV6E7.cjs');
5
- require('./chunk-EBSPLUW4.cjs');
3
+ var chunkBOAVE4FC_cjs = require('./chunk-BOAVE4FC.cjs');
4
+ require('./chunk-EEJSQEHC.cjs');
5
+ require('./chunk-CGIDYRAX.cjs');
6
6
  require('./chunk-N5YFR4UP.cjs');
7
7
  require('./chunk-WQTTOGXC.cjs');
8
8
  require('./chunk-Z2XP767T.cjs');
@@ -15,8 +15,8 @@ require('./chunk-OT6OJY7C.cjs');
15
15
  require('./chunk-HTXVVJRA.cjs');
16
16
  require('./chunk-OC6LTXYS.cjs');
17
17
  require('./chunk-QNJ4ACRT.cjs');
18
- require('./chunk-NMD5VRN4.cjs');
19
- require('./chunk-GW32KPCU.cjs');
18
+ require('./chunk-2R7SVDDB.cjs');
19
+ require('./chunk-FI4WDYSL.cjs');
20
20
  require('./chunk-3YNVWKR2.cjs');
21
21
  require('./chunk-EHAHVROS.cjs');
22
22
  require('./chunk-53B6KDDJ.cjs');
@@ -27,95 +27,95 @@ require('./chunk-B7LXJ6LC.cjs');
27
27
 
28
28
  Object.defineProperty(exports, "ARITHMETIC_PACKAGE", {
29
29
  enumerable: true,
30
- get: function () { return chunkRZCWSXTA_cjs.ARITHMETIC_PACKAGE; }
30
+ get: function () { return chunkBOAVE4FC_cjs.ARITHMETIC_PACKAGE; }
31
31
  });
32
32
  Object.defineProperty(exports, "BIGINT_PACKAGE", {
33
33
  enumerable: true,
34
- get: function () { return chunkRZCWSXTA_cjs.BIGINT_PACKAGE; }
34
+ get: function () { return chunkBOAVE4FC_cjs.BIGINT_PACKAGE; }
35
35
  });
36
36
  Object.defineProperty(exports, "BUILTIN_PACKAGES", {
37
37
  enumerable: true,
38
- get: function () { return chunkRZCWSXTA_cjs.BUILTIN_PACKAGES; }
38
+ get: function () { return chunkBOAVE4FC_cjs.BUILTIN_PACKAGES; }
39
39
  });
40
40
  Object.defineProperty(exports, "CONDITIONALS_PACKAGE", {
41
41
  enumerable: true,
42
- get: function () { return chunkRZCWSXTA_cjs.CONDITIONALS_PACKAGE; }
42
+ get: function () { return chunkBOAVE4FC_cjs.CONDITIONALS_PACKAGE; }
43
43
  });
44
44
  Object.defineProperty(exports, "CONVERTERS_PACKAGE", {
45
45
  enumerable: true,
46
- get: function () { return chunkRZCWSXTA_cjs.CONVERTERS_PACKAGE; }
46
+ get: function () { return chunkBOAVE4FC_cjs.CONVERTERS_PACKAGE; }
47
47
  });
48
48
  Object.defineProperty(exports, "CURRENCY_PACKAGE", {
49
49
  enumerable: true,
50
- get: function () { return chunkRZCWSXTA_cjs.CURRENCY_PACKAGE; }
50
+ get: function () { return chunkBOAVE4FC_cjs.CURRENCY_PACKAGE; }
51
51
  });
52
52
  Object.defineProperty(exports, "DATETIME_PACKAGE", {
53
53
  enumerable: true,
54
- get: function () { return chunkRZCWSXTA_cjs.DATETIME_PACKAGE; }
54
+ get: function () { return chunkBOAVE4FC_cjs.DATETIME_PACKAGE; }
55
55
  });
56
56
  Object.defineProperty(exports, "DICE_PACKAGE", {
57
57
  enumerable: true,
58
- get: function () { return chunkRZCWSXTA_cjs.DICE_PACKAGE; }
58
+ get: function () { return chunkBOAVE4FC_cjs.DICE_PACKAGE; }
59
59
  });
60
60
  Object.defineProperty(exports, "FINANCE_PACKAGE", {
61
61
  enumerable: true,
62
- get: function () { return chunkRZCWSXTA_cjs.FINANCE_PACKAGE; }
62
+ get: function () { return chunkBOAVE4FC_cjs.FINANCE_PACKAGE; }
63
63
  });
64
64
  Object.defineProperty(exports, "FUNCTION_PACKAGE", {
65
65
  enumerable: true,
66
- get: function () { return chunkRZCWSXTA_cjs.FUNCTION_PACKAGE; }
66
+ get: function () { return chunkBOAVE4FC_cjs.FUNCTION_PACKAGE; }
67
67
  });
68
68
  Object.defineProperty(exports, "LINES_PACKAGE", {
69
69
  enumerable: true,
70
- get: function () { return chunkRZCWSXTA_cjs.LINES_PACKAGE; }
70
+ get: function () { return chunkBOAVE4FC_cjs.LINES_PACKAGE; }
71
71
  });
72
72
  Object.defineProperty(exports, "MAPREDUCE_PACKAGE", {
73
73
  enumerable: true,
74
- get: function () { return chunkRZCWSXTA_cjs.MAPREDUCE_PACKAGE; }
74
+ get: function () { return chunkBOAVE4FC_cjs.MAPREDUCE_PACKAGE; }
75
75
  });
76
76
  Object.defineProperty(exports, "MATHPHRASES_PACKAGE", {
77
77
  enumerable: true,
78
- get: function () { return chunkRZCWSXTA_cjs.MATHPHRASES_PACKAGE; }
78
+ get: function () { return chunkBOAVE4FC_cjs.MATHPHRASES_PACKAGE; }
79
79
  });
80
80
  Object.defineProperty(exports, "MATRIX_PACKAGE", {
81
81
  enumerable: true,
82
- get: function () { return chunkRZCWSXTA_cjs.MATRIX_PACKAGE; }
82
+ get: function () { return chunkBOAVE4FC_cjs.MATRIX_PACKAGE; }
83
83
  });
84
84
  Object.defineProperty(exports, "PERCENTAGE_PACKAGE", {
85
85
  enumerable: true,
86
- get: function () { return chunkRZCWSXTA_cjs.PERCENTAGE_PACKAGE; }
86
+ get: function () { return chunkBOAVE4FC_cjs.PERCENTAGE_PACKAGE; }
87
87
  });
88
88
  Object.defineProperty(exports, "SYMBOLIC_PACKAGE", {
89
89
  enumerable: true,
90
- get: function () { return chunkRZCWSXTA_cjs.SYMBOLIC_PACKAGE; }
90
+ get: function () { return chunkBOAVE4FC_cjs.SYMBOLIC_PACKAGE; }
91
91
  });
92
92
  Object.defineProperty(exports, "TIME_PACKAGE", {
93
93
  enumerable: true,
94
- get: function () { return chunkRZCWSXTA_cjs.TIME_PACKAGE; }
94
+ get: function () { return chunkBOAVE4FC_cjs.TIME_PACKAGE; }
95
95
  });
96
96
  Object.defineProperty(exports, "UOM_PACKAGE", {
97
97
  enumerable: true,
98
- get: function () { return chunkRZCWSXTA_cjs.UOM_PACKAGE; }
98
+ get: function () { return chunkBOAVE4FC_cjs.UOM_PACKAGE; }
99
99
  });
100
100
  Object.defineProperty(exports, "VARIABLES_PACKAGE", {
101
101
  enumerable: true,
102
- get: function () { return chunkRZCWSXTA_cjs.VARIABLES_PACKAGE; }
102
+ get: function () { return chunkBOAVE4FC_cjs.VARIABLES_PACKAGE; }
103
103
  });
104
104
  Object.defineProperty(exports, "VECTOR_PACKAGE", {
105
105
  enumerable: true,
106
- get: function () { return chunkRZCWSXTA_cjs.VECTOR_PACKAGE; }
106
+ get: function () { return chunkBOAVE4FC_cjs.VECTOR_PACKAGE; }
107
107
  });
108
108
  Object.defineProperty(exports, "WEATHER_PACKAGE", {
109
109
  enumerable: true,
110
- get: function () { return chunkRZCWSXTA_cjs.WEATHER_PACKAGE; }
110
+ get: function () { return chunkBOAVE4FC_cjs.WEATHER_PACKAGE; }
111
111
  });
112
112
  Object.defineProperty(exports, "createKnowledgePackage", {
113
113
  enumerable: true,
114
- get: function () { return chunkRZCWSXTA_cjs.createKnowledgePackage; }
114
+ get: function () { return chunkBOAVE4FC_cjs.createKnowledgePackage; }
115
115
  });
116
116
  Object.defineProperty(exports, "createStocksPackage", {
117
117
  enumerable: true,
118
- get: function () { return chunkRZCWSXTA_cjs.createStocksPackage; }
118
+ get: function () { return chunkBOAVE4FC_cjs.createStocksPackage; }
119
119
  });
120
120
  //# sourceMappingURL=packages.cjs.map
121
121
  //# sourceMappingURL=packages.cjs.map
@@ -1,14 +1,14 @@
1
- import { I as IEnginePackage } from './PackageRegistry-D-Tv_7ca.cjs';
2
- import './Parselet-CK8cQu2a.cjs';
1
+ import { I as IEnginePackage } from './PackageRegistry-CblRmrHc.cjs';
2
+ import './Parselet-C974vhZG.cjs';
3
3
  import './BytecodeBuilder-3egMyuDi.cjs';
4
- import './Token-0jpvUdPY.cjs';
4
+ import './Token-DnU2hwFY.cjs';
5
5
  import './pipeline-DPUQt7yL.cjs';
6
6
  import './Value-KtAQNHur.cjs';
7
7
  import './variables.cjs';
8
- import './Lexer-BJdhlnej.cjs';
8
+ import './Lexer-y8uY6n6t.cjs';
9
9
  import './resolvers.cjs';
10
10
  import '@tanstack/query-core';
11
- import './NormalizerRule-BrVoVjmP.cjs';
11
+ import './TokenNormalizer-CqBCrYkR.cjs';
12
12
  import './ScopeManager-CKfQtl7l.cjs';
13
13
  import './EngineError-DvPSnhZi.cjs';
14
14
  import './Configuration-fVpd-HC-.cjs';
@@ -1,14 +1,14 @@
1
- import { I as IEnginePackage } from './PackageRegistry-DaH4aIKP.js';
2
- import './Parselet-ConOIdRO.js';
1
+ import { I as IEnginePackage } from './PackageRegistry-wUQyVEyw.js';
2
+ import './Parselet-CsmtM3It.js';
3
3
  import './BytecodeBuilder-3egMyuDi.js';
4
- import './Token-0jpvUdPY.js';
4
+ import './Token-DnU2hwFY.js';
5
5
  import './pipeline-CrsRPmsv.js';
6
6
  import './Value-KtAQNHur.js';
7
7
  import './variables.js';
8
- import './Lexer-D9l4Yrk2.js';
8
+ import './Lexer-Dkt7KGaU.js';
9
9
  import './resolvers.js';
10
10
  import '@tanstack/query-core';
11
- import './NormalizerRule-CEjf1FyD.js';
11
+ import './TokenNormalizer-B8zmhO5X.js';
12
12
  import './ScopeManager-B5k0nk05.js';
13
13
  import './EngineError-DvPSnhZi.js';
14
14
  import './Configuration-fVpd-HC-.js';
package/dist/packages.js CHANGED
@@ -1,6 +1,6 @@
1
- export { ARITHMETIC_PACKAGE, BIGINT_PACKAGE, BUILTIN_PACKAGES, CONDITIONALS_PACKAGE, CONVERTERS_PACKAGE, CURRENCY_PACKAGE, DATETIME_PACKAGE, DICE_PACKAGE, FINANCE_PACKAGE, FUNCTION_PACKAGE, LINES_PACKAGE, MAPREDUCE_PACKAGE, MATHPHRASES_PACKAGE, MATRIX_PACKAGE, PERCENTAGE_PACKAGE, SYMBOLIC_PACKAGE, TIME_PACKAGE, UOM_PACKAGE, VARIABLES_PACKAGE, VECTOR_PACKAGE, WEATHER_PACKAGE, createKnowledgePackage, createStocksPackage } from './chunk-3PPFLFH4.js';
2
- import './chunk-5YEMOYSE.js';
3
- import './chunk-64W6GLLZ.js';
1
+ export { ARITHMETIC_PACKAGE, BIGINT_PACKAGE, BUILTIN_PACKAGES, CONDITIONALS_PACKAGE, CONVERTERS_PACKAGE, CURRENCY_PACKAGE, DATETIME_PACKAGE, DICE_PACKAGE, FINANCE_PACKAGE, FUNCTION_PACKAGE, LINES_PACKAGE, MAPREDUCE_PACKAGE, MATHPHRASES_PACKAGE, MATRIX_PACKAGE, PERCENTAGE_PACKAGE, SYMBOLIC_PACKAGE, TIME_PACKAGE, UOM_PACKAGE, VARIABLES_PACKAGE, VECTOR_PACKAGE, WEATHER_PACKAGE, createKnowledgePackage, createStocksPackage } from './chunk-OWXIOHQB.js';
2
+ import './chunk-ZS6CRJZP.js';
3
+ import './chunk-OJ6LW7VQ.js';
4
4
  import './chunk-PFSDGGYL.js';
5
5
  import './chunk-EPOXXJBK.js';
6
6
  import './chunk-NLNDMWZC.js';
@@ -13,8 +13,8 @@ import './chunk-RFYD5TJE.js';
13
13
  import './chunk-34RRD7PC.js';
14
14
  import './chunk-BVAR5J2F.js';
15
15
  import './chunk-NH2O2AUR.js';
16
- import './chunk-XVWCOTR6.js';
17
- import './chunk-RIN643A3.js';
16
+ import './chunk-VM5ZKDLH.js';
17
+ import './chunk-626UW5RU.js';
18
18
  import './chunk-GOLDJNMZ.js';
19
19
  import './chunk-LIPPNDBE.js';
20
20
  import './chunk-4MG4XKO2.js';
package/dist/parser.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkNMCRQP3Z_cjs = require('./chunk-NMCRQP3Z.cjs');
3
+ var chunkZH2PCJ4V_cjs = require('./chunk-ZH2PCJ4V.cjs');
4
4
  require('./chunk-47LRVGOT.cjs');
5
- var chunkC4XZV6E7_cjs = require('./chunk-C4XZV6E7.cjs');
5
+ var chunkEEJSQEHC_cjs = require('./chunk-EEJSQEHC.cjs');
6
6
  var chunkMZOVP3WI_cjs = require('./chunk-MZOVP3WI.cjs');
7
- require('./chunk-GW32KPCU.cjs');
7
+ require('./chunk-FI4WDYSL.cjs');
8
8
  require('./chunk-3YNVWKR2.cjs');
9
9
  require('./chunk-M4N5GA5Z.cjs');
10
10
  require('./chunk-B7LXJ6LC.cjs');
@@ -13,35 +13,35 @@ require('./chunk-B7LXJ6LC.cjs');
13
13
 
14
14
  Object.defineProperty(exports, "ParseletRegistry", {
15
15
  enumerable: true,
16
- get: function () { return chunkNMCRQP3Z_cjs.ParseletRegistry; }
16
+ get: function () { return chunkZH2PCJ4V_cjs.ParseletRegistry; }
17
17
  });
18
18
  Object.defineProperty(exports, "Parser", {
19
19
  enumerable: true,
20
- get: function () { return chunkNMCRQP3Z_cjs.PrecedenceParser; }
20
+ get: function () { return chunkZH2PCJ4V_cjs.PrecedenceParser; }
21
21
  });
22
22
  Object.defineProperty(exports, "PrecedenceParser", {
23
23
  enumerable: true,
24
- get: function () { return chunkNMCRQP3Z_cjs.PrecedenceParser; }
24
+ get: function () { return chunkZH2PCJ4V_cjs.PrecedenceParser; }
25
25
  });
26
26
  Object.defineProperty(exports, "sharedParseletRegistry", {
27
27
  enumerable: true,
28
- get: function () { return chunkNMCRQP3Z_cjs.sharedParseletRegistry; }
28
+ get: function () { return chunkZH2PCJ4V_cjs.sharedParseletRegistry; }
29
29
  });
30
30
  Object.defineProperty(exports, "BindingPower", {
31
31
  enumerable: true,
32
- get: function () { return chunkC4XZV6E7_cjs.BindingPower; }
32
+ get: function () { return chunkEEJSQEHC_cjs.BindingPower; }
33
33
  });
34
34
  Object.defineProperty(exports, "BytecodeBuilder", {
35
35
  enumerable: true,
36
- get: function () { return chunkC4XZV6E7_cjs.BytecodeBuilder; }
36
+ get: function () { return chunkEEJSQEHC_cjs.BytecodeBuilder; }
37
37
  });
38
38
  Object.defineProperty(exports, "buildBindingPowerTable", {
39
39
  enumerable: true,
40
- get: function () { return chunkC4XZV6E7_cjs.buildBindingPowerTable; }
40
+ get: function () { return chunkEEJSQEHC_cjs.buildBindingPowerTable; }
41
41
  });
42
42
  Object.defineProperty(exports, "invalidateBindingPowerTable", {
43
43
  enumerable: true,
44
- get: function () { return chunkC4XZV6E7_cjs.invalidateBindingPowerTable; }
44
+ get: function () { return chunkEEJSQEHC_cjs.invalidateBindingPowerTable; }
45
45
  });
46
46
  Object.defineProperty(exports, "OpCode", {
47
47
  enumerable: true,
package/dist/parser.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- export { I as InfixParselet, P as ParseletRegistry, a as Parser, a as PrecedenceParser, b as PrefixParselet, s as sharedParseletRegistry } from './Parselet-CK8cQu2a.cjs';
1
+ export { I as InfixParselet, P as ParseletRegistry, a as Parser, a as PrecedenceParser, b as PrefixParselet, s as sharedParseletRegistry } from './Parselet-C974vhZG.cjs';
2
2
  export { B as BytecodeBuilder, a as BytecodeProgram, O as OpCode, g as getOpCodeName } from './BytecodeBuilder-3egMyuDi.cjs';
3
- import './Token-0jpvUdPY.cjs';
3
+ import './Token-DnU2hwFY.cjs';
4
4
  import './pipeline-DPUQt7yL.cjs';
5
5
  import './Value-KtAQNHur.cjs';
6
6
 
package/dist/parser.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { I as InfixParselet, P as ParseletRegistry, a as Parser, a as PrecedenceParser, b as PrefixParselet, s as sharedParseletRegistry } from './Parselet-ConOIdRO.js';
1
+ export { I as InfixParselet, P as ParseletRegistry, a as Parser, a as PrecedenceParser, b as PrefixParselet, s as sharedParseletRegistry } from './Parselet-CsmtM3It.js';
2
2
  export { B as BytecodeBuilder, a as BytecodeProgram, O as OpCode, g as getOpCodeName } from './BytecodeBuilder-3egMyuDi.js';
3
- import './Token-0jpvUdPY.js';
3
+ import './Token-DnU2hwFY.js';
4
4
  import './pipeline-CrsRPmsv.js';
5
5
  import './Value-KtAQNHur.js';
6
6
 
package/dist/parser.js CHANGED
@@ -1,8 +1,8 @@
1
- export { ParseletRegistry, PrecedenceParser as Parser, PrecedenceParser, sharedParseletRegistry } from './chunk-SDGRK7EP.js';
1
+ export { ParseletRegistry, PrecedenceParser as Parser, PrecedenceParser, sharedParseletRegistry } from './chunk-2A3VOGVG.js';
2
2
  import './chunk-G535KJEG.js';
3
- export { BindingPower, BytecodeBuilder, buildBindingPowerTable, invalidateBindingPowerTable } from './chunk-5YEMOYSE.js';
3
+ export { BindingPower, BytecodeBuilder, buildBindingPowerTable, invalidateBindingPowerTable } from './chunk-ZS6CRJZP.js';
4
4
  export { OpCode, getOpCodeName } from './chunk-75JP4BZX.js';
5
- import './chunk-RIN643A3.js';
5
+ import './chunk-626UW5RU.js';
6
6
  import './chunk-GOLDJNMZ.js';
7
7
  import './chunk-6RDSQURE.js';
8
8
  import './chunk-YLJ4XMA6.js';
@@ -1,5 +1,5 @@
1
1
  import { QueryClient } from '@tanstack/query-core';
2
- import { T as Token } from './Token-0jpvUdPY.cjs';
2
+ import { T as Token } from './Token-DnU2hwFY.cjs';
3
3
  import { a as BytecodeProgram } from './BytecodeBuilder-3egMyuDi.cjs';
4
4
  import { V as Value } from './Value-KtAQNHur.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { QueryClient } from '@tanstack/query-core';
2
- import { T as Token } from './Token-0jpvUdPY.js';
2
+ import { T as Token } from './Token-DnU2hwFY.js';
3
3
  import { a as BytecodeProgram } from './BytecodeBuilder-3egMyuDi.js';
4
4
  import { V as Value } from './Value-KtAQNHur.js';
5
5
 
package/dist/uom.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { QueryClient } from '@tanstack/query-core';
2
- import { T as Token } from './Token-0jpvUdPY.cjs';
2
+ import { T as Token } from './Token-DnU2hwFY.cjs';
3
3
  import { a as BytecodeProgram } from './BytecodeBuilder-3egMyuDi.cjs';
4
4
  import { IAsyncResolver, AsyncCheckResult } from './resolvers.cjs';
5
5
  import './Value-KtAQNHur.cjs';
package/dist/uom.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { QueryClient } from '@tanstack/query-core';
2
- import { T as Token } from './Token-0jpvUdPY.js';
2
+ import { T as Token } from './Token-DnU2hwFY.js';
3
3
  import { a as BytecodeProgram } from './BytecodeBuilder-3egMyuDi.js';
4
4
  import { IAsyncResolver, AsyncCheckResult } from './resolvers.js';
5
5
  import './Value-KtAQNHur.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solve-engine",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.3",
4
4
  "description": "The expression evaluation engine behind Solve — lexer, parser, bytecode VM, and an extensible package system.",
5
5
  "keywords": [
6
6
  "expression-evaluator",
@@ -221,5 +221,6 @@
221
221
  "tsup": "8.5.1",
222
222
  "typescript": "5.9.3"
223
223
  },
224
+ "//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.",
224
225
  "sideEffects": false
225
226
  }