solve-engine 2.3.0 → 2.4.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/{Configuration-Culg8H_o.d.cts → Configuration-BGQn-cJ8.d.cts} +21 -0
- package/dist/{Configuration-Culg8H_o.d.ts → Configuration-BGQn-cJ8.d.ts} +21 -0
- package/dist/FormattingSettings-bRKjU7wI.d.cts +47 -0
- package/dist/FormattingSettings-bRKjU7wI.d.ts +47 -0
- package/dist/{PackageCompatibility-DbpyKYOe.d.ts → PackageCompatibility-UsSZIfHs.d.ts} +1 -1
- package/dist/{PackageCompatibility-CN-2CVhu.d.cts → PackageCompatibility-cEClSSkz.d.cts} +1 -1
- package/dist/{PackageRegistry-jqdAsm6U.d.ts → PackageRegistry-B3yJHSxX.d.ts} +1 -1
- package/dist/{PackageRegistry-DXsvmpQN.d.cts → PackageRegistry-BsLmAVZJ.d.cts} +1 -1
- package/dist/{chunk-PXWOATTF.js → chunk-5R7S5KJJ.js} +3 -3
- package/dist/{chunk-PXWOATTF.js.map → chunk-5R7S5KJJ.js.map} +1 -1
- package/dist/chunk-6ZNNPXXE.cjs +3 -0
- package/dist/chunk-6ZNNPXXE.cjs.map +1 -0
- package/dist/chunk-AR7L5OJ2.js +2 -0
- package/dist/chunk-AR7L5OJ2.js.map +1 -0
- package/dist/chunk-B5NBFGNP.js +3 -0
- package/dist/chunk-B5NBFGNP.js.map +1 -0
- package/dist/{chunk-PBGPQM3X.cjs → chunk-E2ZSMJEL.cjs} +3 -3
- package/dist/{chunk-PBGPQM3X.cjs.map → chunk-E2ZSMJEL.cjs.map} +1 -1
- package/dist/chunk-GALZNKW7.js +3 -0
- package/dist/chunk-GALZNKW7.js.map +1 -0
- package/dist/chunk-MMT2LS5I.cjs +2 -0
- package/dist/chunk-MMT2LS5I.cjs.map +1 -0
- package/dist/chunk-NAMMTJBE.cjs +3 -0
- package/dist/chunk-NAMMTJBE.cjs.map +1 -0
- package/dist/chunk-NXIMGB4S.cjs +2 -0
- package/dist/chunk-NXIMGB4S.cjs.map +1 -0
- package/dist/{chunk-NNYMXK6H.js → chunk-UA3BGOYT.js} +4 -4
- package/dist/chunk-UA3BGOYT.js.map +1 -0
- package/dist/chunk-UGQM6ZXU.js +2 -0
- package/dist/chunk-UGQM6ZXU.js.map +1 -0
- package/dist/{chunk-L7ZQQ773.cjs → chunk-WYAY6WPQ.cjs} +4 -4
- package/dist/chunk-WYAY6WPQ.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 +3 -3
- package/dist/engine.d.ts +3 -3
- package/dist/engine.js +1 -1
- package/dist/format.cjs +1 -1
- package/dist/format.d.cts +2 -2
- package/dist/format.d.ts +2 -2
- package/dist/format.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/language.d.cts +3 -3
- package/dist/language.d.ts +3 -3
- package/dist/packages.cjs +1 -1
- package/dist/packages.d.cts +2 -2
- package/dist/packages.d.ts +2 -2
- package/dist/packages.js +1 -1
- package/dist/testing.cjs +2 -2
- package/dist/testing.d.cts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/testing.js +1 -1
- package/dist/worker.cjs +2 -2
- package/dist/worker.d.cts +3 -3
- package/dist/worker.d.ts +3 -3
- package/dist/worker.js +1 -1
- package/package.json +1 -1
- package/dist/FormattingSettings-CJHyxcYu.d.cts +0 -27
- package/dist/FormattingSettings-CJHyxcYu.d.ts +0 -27
- package/dist/chunk-7BXPCWKM.cjs +0 -2
- package/dist/chunk-7BXPCWKM.cjs.map +0 -1
- package/dist/chunk-AIIPKVKO.js +0 -3
- package/dist/chunk-AIIPKVKO.js.map +0 -1
- package/dist/chunk-BAVZMGTZ.cjs +0 -2
- package/dist/chunk-BAVZMGTZ.cjs.map +0 -1
- package/dist/chunk-ESXQDRP7.js +0 -2
- package/dist/chunk-ESXQDRP7.js.map +0 -1
- package/dist/chunk-HLBYHXQD.cjs +0 -3
- package/dist/chunk-HLBYHXQD.cjs.map +0 -1
- package/dist/chunk-J4LZD4ZY.js +0 -3
- package/dist/chunk-J4LZD4ZY.js.map +0 -1
- package/dist/chunk-JFREB45J.cjs +0 -3
- package/dist/chunk-JFREB45J.cjs.map +0 -1
- package/dist/chunk-L7ZQQ773.cjs.map +0 -1
- package/dist/chunk-NNYMXK6H.js.map +0 -1
- package/dist/chunk-TN5E6JU6.js +0 -2
- package/dist/chunk-TN5E6JU6.js.map +0 -1
package/dist/constants.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkMMT2LS5I_cjs=require('./chunk-MMT2LS5I.cjs');require('./chunk-SOMGSIO4.cjs');Object.defineProperty(exports,"ConfigManager",{enumerable:true,get:function(){return chunkMMT2LS5I_cjs.d}});Object.defineProperty(exports,"DEFAULT_CONFIG",{enumerable:true,get:function(){return chunkMMT2LS5I_cjs.b}});Object.defineProperty(exports,"ENGINE_VERSION",{enumerable:true,get:function(){return chunkMMT2LS5I_cjs.a}});//# sourceMappingURL=constants.cjs.map
|
|
2
2
|
//# sourceMappingURL=constants.cjs.map
|
package/dist/constants.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ConfigManager, D as DEFAULT_CONFIG, b as DateConfig, c as DiagnosticConfig, a as EngineConfig, E as EngineConfigOverride, H as HolidayCalendar, d as HolidayPredicate, P as PerformanceConfig, V as VMConfig, e as ValidationConfig, f as ValidationResult, W as WorkerConfig } from './Configuration-
|
|
1
|
+
export { C as ConfigManager, D as DEFAULT_CONFIG, b as DateConfig, c as DiagnosticConfig, a as EngineConfig, E as EngineConfigOverride, H as HolidayCalendar, d as HolidayPredicate, P as PerformanceConfig, V as VMConfig, e as ValidationConfig, f as ValidationResult, W as WorkerConfig } from './Configuration-BGQn-cJ8.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The running engine's version, taken from package.json.
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ConfigManager, D as DEFAULT_CONFIG, b as DateConfig, c as DiagnosticConfig, a as EngineConfig, E as EngineConfigOverride, H as HolidayCalendar, d as HolidayPredicate, P as PerformanceConfig, V as VMConfig, e as ValidationConfig, f as ValidationResult, W as WorkerConfig } from './Configuration-
|
|
1
|
+
export { C as ConfigManager, D as DEFAULT_CONFIG, b as DateConfig, c as DiagnosticConfig, a as EngineConfig, E as EngineConfigOverride, H as HolidayCalendar, d as HolidayPredicate, P as PerformanceConfig, V as VMConfig, e as ValidationConfig, f as ValidationResult, W as WorkerConfig } from './Configuration-BGQn-cJ8.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The running engine's version, taken from package.json.
|
package/dist/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{d as ConfigManager,b as DEFAULT_CONFIG,a as ENGINE_VERSION}from'./chunk-
|
|
1
|
+
export{d as ConfigManager,b as DEFAULT_CONFIG,a as ENGINE_VERSION}from'./chunk-UGQM6ZXU.js';import'./chunk-MPB7KUN5.js';//# sourceMappingURL=constants.js.map
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
package/dist/engine.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkE2ZSMJEL_cjs=require('./chunk-E2ZSMJEL.cjs');require('./chunk-EFJCC6FJ.cjs');var chunkWYAY6WPQ_cjs=require('./chunk-WYAY6WPQ.cjs');require('./chunk-FDE5HWDI.cjs'),require('./chunk-NGBBNL4K.cjs'),require('./chunk-LNZNJSRW.cjs'),require('./chunk-TTFO4YDP.cjs'),require('./chunk-SYYE3QAX.cjs'),require('./chunk-AXMQG5TS.cjs'),require('./chunk-6ZNNPXXE.cjs'),require('./chunk-R2SZFJTT.cjs'),require('./chunk-NXIMGB4S.cjs'),require('./chunk-4QVBSG6B.cjs'),require('./chunk-VAGS5JS7.cjs'),require('./chunk-UURM7P3P.cjs'),require('./chunk-ZLRJ7TDP.cjs'),require('./chunk-JAK3RAFA.cjs'),require('./chunk-4BZIYU7S.cjs'),require('./chunk-JFAJN3C2.cjs'),require('./chunk-TLG7VZRX.cjs'),require('./chunk-ESUN2THE.cjs'),require('./chunk-N7N7MPMK.cjs'),require('./chunk-PS272DZJ.cjs'),require('./chunk-IANAMBJQ.cjs'),require('./chunk-MMT2LS5I.cjs'),require('./chunk-32GC2FHC.cjs'),require('./chunk-Y7O4D3BJ.cjs'),require('./chunk-2LFLR3VZ.cjs'),require('./chunk-5IJD5L3O.cjs'),require('./chunk-MSYX32PF.cjs'),require('./chunk-FWW3M36J.cjs'),require('./chunk-CIQOK7Q4.cjs'),require('./chunk-SOMGSIO4.cjs');Object.defineProperty(exports,"DocumentModel",{enumerable:true,get:function(){return chunkE2ZSMJEL_cjs.a}});Object.defineProperty(exports,"EvalTier",{enumerable:true,get:function(){return chunkE2ZSMJEL_cjs.b}});Object.defineProperty(exports,"ThreeTierEvaluator",{enumerable:true,get:function(){return chunkE2ZSMJEL_cjs.c}});Object.defineProperty(exports,"evaluateDocument",{enumerable:true,get:function(){return chunkE2ZSMJEL_cjs.d}});Object.defineProperty(exports,"AsyncResolutionBatcher",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.h}});Object.defineProperty(exports,"ExpressionEngine",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.n}});Object.defineProperty(exports,"SNAPSHOT_FORMAT",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.d}});Object.defineProperty(exports,"SNAPSHOT_VERSION",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.e}});Object.defineProperty(exports,"SnapshotErrorCodes",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.f}});Object.defineProperty(exports,"checkExpressionComplexity",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.j}});Object.defineProperty(exports,"checkExpressionLength",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.i}});Object.defineProperty(exports,"extractReadsAndWrites",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.k}});Object.defineProperty(exports,"findInlineSolvesInLine",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.m}});Object.defineProperty(exports,"isEmptyLine",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.l}});//# sourceMappingURL=engine.cjs.map
|
|
2
2
|
//# sourceMappingURL=engine.cjs.map
|
package/dist/engine.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DocumentModel, E as ExpressionEngine, V as ViewportRange, r as LineChange, U as UnifiedParsingOptions, P as ParsingResult, s as InlineSolvePosition } from './PackageRegistry-
|
|
2
|
-
export { A as ApplyChangesResult, t as AsyncCachePackageInfo, u as AsyncErrorEvent, v as AsyncResolutionBatcher, w as AsyncResolutionEvent, B as BatcherMetrics, x as BytecodeCacheEntry, y as CacheSnapshot, z as CheckpointSnapshot, a as EngineOptions, b as EngineRestoreOptions, c as EngineSnapshot, d as Explanation, e as ExplanationStep, F as LineCacheEntryInfo, G as LineState, H as LinesUpdatedEvent, J as ParsedLine, S as SNAPSHOT_FORMAT, f as SNAPSHOT_VERSION, g as SerializedAnonymousBody, h as SerializedBytecode, i as SerializedDecimal, j as SerializedLineCacheEntry, k as SerializedNumber, l as SerializedRational, m as SerializedUserFunction, n as SerializedValue, o as SnapshotErrorCodes } from './PackageRegistry-
|
|
1
|
+
import { D as DocumentModel, E as ExpressionEngine, V as ViewportRange, r as LineChange, U as UnifiedParsingOptions, P as ParsingResult, s as InlineSolvePosition } from './PackageRegistry-BsLmAVZJ.cjs';
|
|
2
|
+
export { A as ApplyChangesResult, t as AsyncCachePackageInfo, u as AsyncErrorEvent, v as AsyncResolutionBatcher, w as AsyncResolutionEvent, B as BatcherMetrics, x as BytecodeCacheEntry, y as CacheSnapshot, z as CheckpointSnapshot, a as EngineOptions, b as EngineRestoreOptions, c as EngineSnapshot, d as Explanation, e as ExplanationStep, F as LineCacheEntryInfo, G as LineState, H as LinesUpdatedEvent, J as ParsedLine, S as SNAPSHOT_FORMAT, f as SNAPSHOT_VERSION, g as SerializedAnonymousBody, h as SerializedBytecode, i as SerializedDecimal, j as SerializedLineCacheEntry, k as SerializedNumber, l as SerializedRational, m as SerializedUserFunction, n as SerializedValue, o as SnapshotErrorCodes } from './PackageRegistry-BsLmAVZJ.cjs';
|
|
3
3
|
import { V as Value } from './Value-CCi_Eecs.cjs';
|
|
4
4
|
import { a as VMCheckpointer } from './VMCheckpoints-C_jQvABf.cjs';
|
|
5
5
|
import { T as Token } from './Token-CbP_OutD.cjs';
|
|
@@ -12,7 +12,7 @@ import './Lexer-B4C1qHXu.cjs';
|
|
|
12
12
|
import './resolvers.cjs';
|
|
13
13
|
import '@tanstack/query-core';
|
|
14
14
|
import './TokenNormalizer-DnlL7_8c.cjs';
|
|
15
|
-
import './Configuration-
|
|
15
|
+
import './Configuration-BGQn-cJ8.cjs';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* PageManager, page-based LRU eviction + directional preloading.
|
package/dist/engine.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DocumentModel, E as ExpressionEngine, V as ViewportRange, r as LineChange, U as UnifiedParsingOptions, P as ParsingResult, s as InlineSolvePosition } from './PackageRegistry-
|
|
2
|
-
export { A as ApplyChangesResult, t as AsyncCachePackageInfo, u as AsyncErrorEvent, v as AsyncResolutionBatcher, w as AsyncResolutionEvent, B as BatcherMetrics, x as BytecodeCacheEntry, y as CacheSnapshot, z as CheckpointSnapshot, a as EngineOptions, b as EngineRestoreOptions, c as EngineSnapshot, d as Explanation, e as ExplanationStep, F as LineCacheEntryInfo, G as LineState, H as LinesUpdatedEvent, J as ParsedLine, S as SNAPSHOT_FORMAT, f as SNAPSHOT_VERSION, g as SerializedAnonymousBody, h as SerializedBytecode, i as SerializedDecimal, j as SerializedLineCacheEntry, k as SerializedNumber, l as SerializedRational, m as SerializedUserFunction, n as SerializedValue, o as SnapshotErrorCodes } from './PackageRegistry-
|
|
1
|
+
import { D as DocumentModel, E as ExpressionEngine, V as ViewportRange, r as LineChange, U as UnifiedParsingOptions, P as ParsingResult, s as InlineSolvePosition } from './PackageRegistry-B3yJHSxX.js';
|
|
2
|
+
export { A as ApplyChangesResult, t as AsyncCachePackageInfo, u as AsyncErrorEvent, v as AsyncResolutionBatcher, w as AsyncResolutionEvent, B as BatcherMetrics, x as BytecodeCacheEntry, y as CacheSnapshot, z as CheckpointSnapshot, a as EngineOptions, b as EngineRestoreOptions, c as EngineSnapshot, d as Explanation, e as ExplanationStep, F as LineCacheEntryInfo, G as LineState, H as LinesUpdatedEvent, J as ParsedLine, S as SNAPSHOT_FORMAT, f as SNAPSHOT_VERSION, g as SerializedAnonymousBody, h as SerializedBytecode, i as SerializedDecimal, j as SerializedLineCacheEntry, k as SerializedNumber, l as SerializedRational, m as SerializedUserFunction, n as SerializedValue, o as SnapshotErrorCodes } from './PackageRegistry-B3yJHSxX.js';
|
|
3
3
|
import { V as Value } from './Value-CCi_Eecs.js';
|
|
4
4
|
import { a as VMCheckpointer } from './VMCheckpoints-CsHmQVaD.js';
|
|
5
5
|
import { T as Token } from './Token-CbP_OutD.js';
|
|
@@ -12,7 +12,7 @@ import './Lexer-DKMlj7Sy.js';
|
|
|
12
12
|
import './resolvers.js';
|
|
13
13
|
import '@tanstack/query-core';
|
|
14
14
|
import './TokenNormalizer-DCWdZjGz.js';
|
|
15
|
-
import './Configuration-
|
|
15
|
+
import './Configuration-BGQn-cJ8.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* PageManager, page-based LRU eviction + directional preloading.
|
package/dist/engine.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as DocumentModel,b as EvalTier,c as ThreeTierEvaluator,d as evaluateDocument}from'./chunk-
|
|
1
|
+
export{a as DocumentModel,b as EvalTier,c as ThreeTierEvaluator,d as evaluateDocument}from'./chunk-5R7S5KJJ.js';import'./chunk-RAF57WYO.js';export{h as AsyncResolutionBatcher,n as ExpressionEngine,d as SNAPSHOT_FORMAT,e as SNAPSHOT_VERSION,f as SnapshotErrorCodes,j as checkExpressionComplexity,i as checkExpressionLength,k as extractReadsAndWrites,m as findInlineSolvesInLine,l as isEmptyLine}from'./chunk-UA3BGOYT.js';import'./chunk-XNIWQHXY.js';import'./chunk-2RWAXT6O.js';import'./chunk-7E7NXKQ5.js';import'./chunk-MIQBJGGR.js';import'./chunk-YJ2OPULK.js';import'./chunk-TWC7K3ZX.js';import'./chunk-B5NBFGNP.js';import'./chunk-XEIDV5JP.js';import'./chunk-AR7L5OJ2.js';import'./chunk-YVKHEAFT.js';import'./chunk-5FO4PDIG.js';import'./chunk-76F3LCIL.js';import'./chunk-TCZSPH4A.js';import'./chunk-W2JAR233.js';import'./chunk-YAYBVVG2.js';import'./chunk-E6Z4NQAS.js';import'./chunk-HFKDWQUL.js';import'./chunk-R2ENWQ76.js';import'./chunk-RSF25YSJ.js';import'./chunk-EVAOPEO4.js';import'./chunk-WGZ3FNHI.js';import'./chunk-UGQM6ZXU.js';import'./chunk-YAHGSBMC.js';import'./chunk-JPFCXLJV.js';import'./chunk-G7TBEQRQ.js';import'./chunk-IJMNVBIS.js';import'./chunk-62LMTO4F.js';import'./chunk-TRBXW6HW.js';import'./chunk-2JMFUQZH.js';import'./chunk-MPB7KUN5.js';//# sourceMappingURL=engine.js.map
|
|
2
2
|
//# sourceMappingURL=engine.js.map
|
package/dist/format.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk6ZNNPXXE_cjs=require('./chunk-6ZNNPXXE.cjs');require('./chunk-R2SZFJTT.cjs'),require('./chunk-ESUN2THE.cjs'),require('./chunk-N7N7MPMK.cjs'),require('./chunk-PS272DZJ.cjs'),require('./chunk-MSYX32PF.cjs'),require('./chunk-SOMGSIO4.cjs');Object.defineProperty(exports,"DEFAULT_FORMATTING_SETTINGS",{enumerable:true,get:function(){return chunk6ZNNPXXE_cjs.a}});Object.defineProperty(exports,"formatMatrixAligned",{enumerable:true,get:function(){return chunk6ZNNPXXE_cjs.b}});Object.defineProperty(exports,"formatValue",{enumerable:true,get:function(){return chunk6ZNNPXXE_cjs.c}});//# sourceMappingURL=format.cjs.map
|
|
2
2
|
//# sourceMappingURL=format.cjs.map
|
package/dist/format.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { M as MatrixData, V as Value } from './Value-CCi_Eecs.cjs';
|
|
2
|
-
import { F as FormattingSettings } from './FormattingSettings-
|
|
3
|
-
export { D as DEFAULT_FORMATTING_SETTINGS } from './FormattingSettings-
|
|
2
|
+
import { F as FormattingSettings } from './FormattingSettings-bRKjU7wI.cjs';
|
|
3
|
+
export { D as DEFAULT_FORMATTING_SETTINGS } from './FormattingSettings-bRKjU7wI.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Render a matrix as a multi-line, column-aligned block: one row per line (the
|
package/dist/format.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { M as MatrixData, V as Value } from './Value-CCi_Eecs.js';
|
|
2
|
-
import { F as FormattingSettings } from './FormattingSettings-
|
|
3
|
-
export { D as DEFAULT_FORMATTING_SETTINGS } from './FormattingSettings-
|
|
2
|
+
import { F as FormattingSettings } from './FormattingSettings-bRKjU7wI.js';
|
|
3
|
+
export { D as DEFAULT_FORMATTING_SETTINGS } from './FormattingSettings-bRKjU7wI.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Render a matrix as a multi-line, column-aligned block: one row per line (the
|
package/dist/format.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as DEFAULT_FORMATTING_SETTINGS,b as formatMatrixAligned,c as formatValue}from'./chunk-
|
|
1
|
+
export{a as DEFAULT_FORMATTING_SETTINGS,b as formatMatrixAligned,c as formatValue}from'./chunk-B5NBFGNP.js';import'./chunk-XEIDV5JP.js';import'./chunk-R2ENWQ76.js';import'./chunk-RSF25YSJ.js';import'./chunk-EVAOPEO4.js';import'./chunk-62LMTO4F.js';import'./chunk-MPB7KUN5.js';//# sourceMappingURL=format.js.map
|
|
2
2
|
//# sourceMappingURL=format.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';require('./chunk-
|
|
1
|
+
'use strict';require('./chunk-E2ZSMJEL.cjs'),require('./chunk-EFJCC6FJ.cjs');var chunkWYAY6WPQ_cjs=require('./chunk-WYAY6WPQ.cjs');require('./chunk-FDE5HWDI.cjs'),require('./chunk-NGBBNL4K.cjs'),require('./chunk-LNZNJSRW.cjs'),require('./chunk-TTFO4YDP.cjs'),require('./chunk-SYYE3QAX.cjs'),require('./chunk-AXMQG5TS.cjs'),require('./chunk-6ZNNPXXE.cjs'),require('./chunk-R2SZFJTT.cjs');var chunkNAMMTJBE_cjs=require('./chunk-NAMMTJBE.cjs');require('./chunk-6INX773F.cjs'),require('./chunk-NXIMGB4S.cjs');var chunk4QVBSG6B_cjs=require('./chunk-4QVBSG6B.cjs');require('./chunk-VAGS5JS7.cjs'),require('./chunk-UURM7P3P.cjs'),require('./chunk-ZLRJ7TDP.cjs'),require('./chunk-JAK3RAFA.cjs'),require('./chunk-4BZIYU7S.cjs'),require('./chunk-JFAJN3C2.cjs'),require('./chunk-TLG7VZRX.cjs'),require('./chunk-ESUN2THE.cjs'),require('./chunk-N7N7MPMK.cjs');var chunkPS272DZJ_cjs=require('./chunk-PS272DZJ.cjs');require('./chunk-IANAMBJQ.cjs');var chunkMMT2LS5I_cjs=require('./chunk-MMT2LS5I.cjs');require('./chunk-32GC2FHC.cjs'),require('./chunk-Y7O4D3BJ.cjs'),require('./chunk-2LFLR3VZ.cjs'),require('./chunk-5IJD5L3O.cjs'),require('./chunk-MSYX32PF.cjs'),require('./chunk-FWW3M36J.cjs'),require('./chunk-CIQOK7Q4.cjs');var chunkSOMGSIO4_cjs=require('./chunk-SOMGSIO4.cjs');var r={DEFINE_FUNCTION_INVALID_NAME:"DEFINE_FUNCTION_INVALID_NAME",DEFINE_FUNCTION_INVALID_SPEC:"DEFINE_FUNCTION_INVALID_SPEC",DEFINE_FUNCTION_ARITY_MISMATCH:"DEFINE_FUNCTION_ARITY_MISMATCH",DEFINE_FUNCTION_ARGUMENT_TYPE:"DEFINE_FUNCTION_ARGUMENT_TYPE",DEFINE_FUNCTION_RETURN_TYPE:"DEFINE_FUNCTION_RETURN_TYPE"},b=/^[a-z_][a-z0-9_]*$/i,y=new Set(["number","string","boolean"]);function u(e){return e===1?"1 argument":`${e} arguments`}function f(e){switch(e.type){case 0:case 1:return "a number";case 3:return "a string";case 10:return "a boolean";case 2:return "a big integer";case 5:return "a percentage";case 6:return "a value with a unit";case 4:return "a date";case 7:return "a matrix";case 8:return "a range";case 9:return "a symbolic expression";default:return "an unsupported value"}}function A(e,n,t){switch(n.type){case "number":if(e.type===0||e.type===1)return e.toNumber();break;case "string":if(e.type===3)return e.value;break;case "boolean":if(e.type===10)return e.value;break}throw chunkSOMGSIO4_cjs.c.execution({code:r.DEFINE_FUNCTION_ARGUMENT_TYPE,message:`${t}() expects "${n.name}" to be a ${n.type}, but was given ${f(e)}`,expected:`a ${n.type}`,found:f(e),context:{functionName:t,argName:n.name,expectedType:n.type}})}function S(e,n,t){switch(n){case "number":if(typeof e=="number")return chunkPS272DZJ_cjs.n(e);break;case "string":if(typeof e=="string")return chunkPS272DZJ_cjs.t(e);break;case "boolean":if(typeof e=="boolean")return chunkPS272DZJ_cjs.J(e);break}throw chunkSOMGSIO4_cjs.c.internal({code:r.DEFINE_FUNCTION_RETURN_TYPE,message:`${t}() is declared to return a ${n}, but its implementation returned ${typeof e}`,expected:`a ${n}`,found:typeof e,context:{functionName:t,expectedType:n}})}var p=class{constructor(n){this.fnName=n;this.category="Function";}parse(n,t,i){n.consume("LPAREN");let a=0;if(n.peek()?.type!=="RPAREN")for(n.parseExpression(chunk4QVBSG6B_cjs.a.Lowest,i),a++;n.match("COMMA");)n.parseExpression(chunk4QVBSG6B_cjs.a.Lowest,i),a++;n.consume("RPAREN"),i.emitPluginCall(this.fnName,a);}};function P(e){let n=e.args.length;return t=>{if(t.length!==n)throw chunkSOMGSIO4_cjs.c.execution({code:r.DEFINE_FUNCTION_ARITY_MISMATCH,message:`${e.name}() takes ${u(n)}, but was given ${t.length===0?"none":u(t.length)}`,expected:u(n),found:t.length===0?"none":u(t.length),context:{functionName:e.name,expected:n,actual:t.length}});let i=new Array(n);for(let s=0;s<n;s++)i[s]=A(t[s],e.args[s],e.name);let a=e.call(...i);return S(a,e.returns,e.name)}}function V(e){if(typeof e?.name!="string"||!b.test(e.name))throw chunkSOMGSIO4_cjs.c.config({code:r.DEFINE_FUNCTION_INVALID_NAME,message:`defineFunction: name must be a single identifier, got ${JSON.stringify(e?.name)}`,suggestion:'e.g. "vat" or "net_price"',context:{name:e?.name}});if(!Array.isArray(e.args))throw chunkSOMGSIO4_cjs.c.config({code:r.DEFINE_FUNCTION_INVALID_SPEC,message:`defineFunction: "${e.name}" args must be an array`,context:{name:e.name}});for(let n of e.args){if(typeof n?.name!="string"||n.name.length===0)throw chunkSOMGSIO4_cjs.c.config({code:r.DEFINE_FUNCTION_INVALID_SPEC,message:`defineFunction: "${e.name}" has an argument with no name`,context:{name:e.name}});if(!y.has(n.type))throw chunkSOMGSIO4_cjs.c.config({code:r.DEFINE_FUNCTION_INVALID_SPEC,message:`defineFunction: "${e.name}" argument "${n.name}" has unsupported type ${JSON.stringify(n.type)}`,suggestion:"supported argument types are number, string, boolean",context:{name:e.name,argName:n.name,type:n.type}})}if(!y.has(e.returns))throw chunkSOMGSIO4_cjs.c.config({code:r.DEFINE_FUNCTION_INVALID_SPEC,message:`defineFunction: "${e.name}" has unsupported return type ${JSON.stringify(e.returns)}`,suggestion:"supported return types are number, string, boolean",context:{name:e.name,returns:e.returns}});if(typeof e.call!="function")throw chunkSOMGSIO4_cjs.c.config({code:r.DEFINE_FUNCTION_INVALID_SPEC,message:`defineFunction: "${e.name}" is missing a call implementation`,context:{name:e.name}})}function O(e){V(e);let n=e.name,t=`DEFINE_FN_${n.toUpperCase()}`;return {name:`solve-fn-${n}`,lexerVocabulary:{keywords:{[n.toLowerCase()]:t}},prefixParselets:{[t]:new p(n)},pluginFunctions:{[n]:P(e)}}}function h(e={}){let{extraPackages:n=[],...t}=e;return new chunkWYAY6WPQ_cjs.n({...t,packages:n.length>0?[...chunkNAMMTJBE_cjs.y,...n]:chunkNAMMTJBE_cjs.y})}Object.defineProperty(exports,"ExpressionEngine",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.n}});Object.defineProperty(exports,"SNAPSHOT_FORMAT",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.d}});Object.defineProperty(exports,"SNAPSHOT_VERSION",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.e}});Object.defineProperty(exports,"SnapshotErrorCodes",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.f}});Object.defineProperty(exports,"assertEngineVersionCompatible",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.c}});Object.defineProperty(exports,"checkEngineVersionCompatibility",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.b}});Object.defineProperty(exports,"checkPackageCompatibility",{enumerable:true,get:function(){return chunkWYAY6WPQ_cjs.a}});Object.defineProperty(exports,"ENGINE_VERSION",{enumerable:true,get:function(){return chunkMMT2LS5I_cjs.a}});exports.DefineFunctionErrorCodes=r;exports.createEngine=h;exports.defineFunction=O;//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IEnginePackage, a as EngineOptions, E as ExpressionEngine } from './PackageRegistry-
|
|
2
|
-
export { b as EngineRestoreOptions, c as EngineSnapshot, d as Explanation, e as ExplanationStep, S as SNAPSHOT_FORMAT, f as SNAPSHOT_VERSION, g as SerializedAnonymousBody, h as SerializedBytecode, i as SerializedDecimal, j as SerializedLineCacheEntry, k as SerializedNumber, l as SerializedRational, m as SerializedUserFunction, n as SerializedValue, o as SnapshotErrorCodes } from './PackageRegistry-
|
|
3
|
-
export { a as CompatibilityConflict, b as CompatibilityConflictKind, C as CompatibilityReport, c as CompatibilitySeverity, d as checkPackageCompatibility } from './PackageCompatibility-
|
|
4
|
-
export { E as EngineConfigOverride } from './Configuration-
|
|
1
|
+
import { I as IEnginePackage, a as EngineOptions, E as ExpressionEngine } from './PackageRegistry-BsLmAVZJ.cjs';
|
|
2
|
+
export { b as EngineRestoreOptions, c as EngineSnapshot, d as Explanation, e as ExplanationStep, S as SNAPSHOT_FORMAT, f as SNAPSHOT_VERSION, g as SerializedAnonymousBody, h as SerializedBytecode, i as SerializedDecimal, j as SerializedLineCacheEntry, k as SerializedNumber, l as SerializedRational, m as SerializedUserFunction, n as SerializedValue, o as SnapshotErrorCodes } from './PackageRegistry-BsLmAVZJ.cjs';
|
|
3
|
+
export { a as CompatibilityConflict, b as CompatibilityConflictKind, C as CompatibilityReport, c as CompatibilitySeverity, d as checkPackageCompatibility } from './PackageCompatibility-cEClSSkz.cjs';
|
|
4
|
+
export { E as EngineConfigOverride } from './Configuration-BGQn-cJ8.cjs';
|
|
5
5
|
export { ENGINE_VERSION } from './constants.cjs';
|
|
6
6
|
import './Parselet-C4Wu055_.cjs';
|
|
7
7
|
import './BytecodeBuilder-DGGeByAP.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IEnginePackage, a as EngineOptions, E as ExpressionEngine } from './PackageRegistry-
|
|
2
|
-
export { b as EngineRestoreOptions, c as EngineSnapshot, d as Explanation, e as ExplanationStep, S as SNAPSHOT_FORMAT, f as SNAPSHOT_VERSION, g as SerializedAnonymousBody, h as SerializedBytecode, i as SerializedDecimal, j as SerializedLineCacheEntry, k as SerializedNumber, l as SerializedRational, m as SerializedUserFunction, n as SerializedValue, o as SnapshotErrorCodes } from './PackageRegistry-
|
|
3
|
-
export { a as CompatibilityConflict, b as CompatibilityConflictKind, C as CompatibilityReport, c as CompatibilitySeverity, d as checkPackageCompatibility } from './PackageCompatibility-
|
|
4
|
-
export { E as EngineConfigOverride } from './Configuration-
|
|
1
|
+
import { I as IEnginePackage, a as EngineOptions, E as ExpressionEngine } from './PackageRegistry-B3yJHSxX.js';
|
|
2
|
+
export { b as EngineRestoreOptions, c as EngineSnapshot, d as Explanation, e as ExplanationStep, S as SNAPSHOT_FORMAT, f as SNAPSHOT_VERSION, g as SerializedAnonymousBody, h as SerializedBytecode, i as SerializedDecimal, j as SerializedLineCacheEntry, k as SerializedNumber, l as SerializedRational, m as SerializedUserFunction, n as SerializedValue, o as SnapshotErrorCodes } from './PackageRegistry-B3yJHSxX.js';
|
|
3
|
+
export { a as CompatibilityConflict, b as CompatibilityConflictKind, C as CompatibilityReport, c as CompatibilitySeverity, d as checkPackageCompatibility } from './PackageCompatibility-UsSZIfHs.js';
|
|
4
|
+
export { E as EngineConfigOverride } from './Configuration-BGQn-cJ8.js';
|
|
5
5
|
export { ENGINE_VERSION } from './constants.js';
|
|
6
6
|
import './Parselet-B-zoPrTa.js';
|
|
7
7
|
import './BytecodeBuilder-DGGeByAP.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import'./chunk-
|
|
1
|
+
import'./chunk-5R7S5KJJ.js';import'./chunk-RAF57WYO.js';import {n}from'./chunk-UA3BGOYT.js';export{n as ExpressionEngine,d as SNAPSHOT_FORMAT,e as SNAPSHOT_VERSION,f as SnapshotErrorCodes,c as assertEngineVersionCompatible,b as checkEngineVersionCompatibility,a as checkPackageCompatibility}from'./chunk-UA3BGOYT.js';import'./chunk-XNIWQHXY.js';import'./chunk-2RWAXT6O.js';import'./chunk-7E7NXKQ5.js';import'./chunk-MIQBJGGR.js';import'./chunk-YJ2OPULK.js';import'./chunk-TWC7K3ZX.js';import'./chunk-B5NBFGNP.js';import'./chunk-XEIDV5JP.js';import {y as y$1}from'./chunk-GALZNKW7.js';import'./chunk-6G3PMEPA.js';import'./chunk-AR7L5OJ2.js';import {a}from'./chunk-YVKHEAFT.js';import'./chunk-5FO4PDIG.js';import'./chunk-76F3LCIL.js';import'./chunk-TCZSPH4A.js';import'./chunk-W2JAR233.js';import'./chunk-YAYBVVG2.js';import'./chunk-E6Z4NQAS.js';import'./chunk-HFKDWQUL.js';import'./chunk-R2ENWQ76.js';import'./chunk-RSF25YSJ.js';import {J,t,n as n$1}from'./chunk-EVAOPEO4.js';import'./chunk-WGZ3FNHI.js';export{a as ENGINE_VERSION}from'./chunk-UGQM6ZXU.js';import'./chunk-YAHGSBMC.js';import'./chunk-JPFCXLJV.js';import'./chunk-G7TBEQRQ.js';import'./chunk-IJMNVBIS.js';import'./chunk-62LMTO4F.js';import'./chunk-TRBXW6HW.js';import'./chunk-2JMFUQZH.js';import {c}from'./chunk-MPB7KUN5.js';var r={DEFINE_FUNCTION_INVALID_NAME:"DEFINE_FUNCTION_INVALID_NAME",DEFINE_FUNCTION_INVALID_SPEC:"DEFINE_FUNCTION_INVALID_SPEC",DEFINE_FUNCTION_ARITY_MISMATCH:"DEFINE_FUNCTION_ARITY_MISMATCH",DEFINE_FUNCTION_ARGUMENT_TYPE:"DEFINE_FUNCTION_ARGUMENT_TYPE",DEFINE_FUNCTION_RETURN_TYPE:"DEFINE_FUNCTION_RETURN_TYPE"},b=/^[a-z_][a-z0-9_]*$/i,y=new Set(["number","string","boolean"]);function u(e){return e===1?"1 argument":`${e} arguments`}function f(e){switch(e.type){case 0:case 1:return "a number";case 3:return "a string";case 10:return "a boolean";case 2:return "a big integer";case 5:return "a percentage";case 6:return "a value with a unit";case 4:return "a date";case 7:return "a matrix";case 8:return "a range";case 9:return "a symbolic expression";default:return "an unsupported value"}}function A(e,n,t){switch(n.type){case "number":if(e.type===0||e.type===1)return e.toNumber();break;case "string":if(e.type===3)return e.value;break;case "boolean":if(e.type===10)return e.value;break}throw c.execution({code:r.DEFINE_FUNCTION_ARGUMENT_TYPE,message:`${t}() expects "${n.name}" to be a ${n.type}, but was given ${f(e)}`,expected:`a ${n.type}`,found:f(e),context:{functionName:t,argName:n.name,expectedType:n.type}})}function S(e,n,t$1){switch(n){case "number":if(typeof e=="number")return n$1(e);break;case "string":if(typeof e=="string")return t(e);break;case "boolean":if(typeof e=="boolean")return J(e);break}throw c.internal({code:r.DEFINE_FUNCTION_RETURN_TYPE,message:`${t$1}() is declared to return a ${n}, but its implementation returned ${typeof e}`,expected:`a ${n}`,found:typeof e,context:{functionName:t$1,expectedType:n}})}var p=class{constructor(n){this.fnName=n;this.category="Function";}parse(n,t,i){n.consume("LPAREN");let a$1=0;if(n.peek()?.type!=="RPAREN")for(n.parseExpression(a.Lowest,i),a$1++;n.match("COMMA");)n.parseExpression(a.Lowest,i),a$1++;n.consume("RPAREN"),i.emitPluginCall(this.fnName,a$1);}};function P(e){let n=e.args.length;return t=>{if(t.length!==n)throw c.execution({code:r.DEFINE_FUNCTION_ARITY_MISMATCH,message:`${e.name}() takes ${u(n)}, but was given ${t.length===0?"none":u(t.length)}`,expected:u(n),found:t.length===0?"none":u(t.length),context:{functionName:e.name,expected:n,actual:t.length}});let i=new Array(n);for(let s=0;s<n;s++)i[s]=A(t[s],e.args[s],e.name);let a=e.call(...i);return S(a,e.returns,e.name)}}function V(e){if(typeof e?.name!="string"||!b.test(e.name))throw c.config({code:r.DEFINE_FUNCTION_INVALID_NAME,message:`defineFunction: name must be a single identifier, got ${JSON.stringify(e?.name)}`,suggestion:'e.g. "vat" or "net_price"',context:{name:e?.name}});if(!Array.isArray(e.args))throw c.config({code:r.DEFINE_FUNCTION_INVALID_SPEC,message:`defineFunction: "${e.name}" args must be an array`,context:{name:e.name}});for(let n of e.args){if(typeof n?.name!="string"||n.name.length===0)throw c.config({code:r.DEFINE_FUNCTION_INVALID_SPEC,message:`defineFunction: "${e.name}" has an argument with no name`,context:{name:e.name}});if(!y.has(n.type))throw c.config({code:r.DEFINE_FUNCTION_INVALID_SPEC,message:`defineFunction: "${e.name}" argument "${n.name}" has unsupported type ${JSON.stringify(n.type)}`,suggestion:"supported argument types are number, string, boolean",context:{name:e.name,argName:n.name,type:n.type}})}if(!y.has(e.returns))throw c.config({code:r.DEFINE_FUNCTION_INVALID_SPEC,message:`defineFunction: "${e.name}" has unsupported return type ${JSON.stringify(e.returns)}`,suggestion:"supported return types are number, string, boolean",context:{name:e.name,returns:e.returns}});if(typeof e.call!="function")throw c.config({code:r.DEFINE_FUNCTION_INVALID_SPEC,message:`defineFunction: "${e.name}" is missing a call implementation`,context:{name:e.name}})}function O(e){V(e);let n=e.name,t=`DEFINE_FN_${n.toUpperCase()}`;return {name:`solve-fn-${n}`,lexerVocabulary:{keywords:{[n.toLowerCase()]:t}},prefixParselets:{[t]:new p(n)},pluginFunctions:{[n]:P(e)}}}function h(e={}){let{extraPackages:n$1=[],...t}=e;return new n({...t,packages:n$1.length>0?[...y$1,...n$1]:y$1})}export{r as DefineFunctionErrorCodes,h as createEngine,O as defineFunction};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/language.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CompletionItem } from './PackageRegistry-
|
|
2
|
-
export { L as LanguageService, p as LanguageServiceOptions, q as SemanticToken } from './PackageRegistry-
|
|
1
|
+
import { C as CompletionItem } from './PackageRegistry-BsLmAVZJ.cjs';
|
|
2
|
+
export { L as LanguageService, p as LanguageServiceOptions, q as SemanticToken } from './PackageRegistry-BsLmAVZJ.cjs';
|
|
3
3
|
import { e as TokenCategory } from './Lexer-B4C1qHXu.cjs';
|
|
4
4
|
import './Parselet-C4Wu055_.cjs';
|
|
5
5
|
import './BytecodeBuilder-DGGeByAP.cjs';
|
|
@@ -11,7 +11,7 @@ import '@tanstack/query-core';
|
|
|
11
11
|
import './TokenNormalizer-DnlL7_8c.cjs';
|
|
12
12
|
import './ScopeManager-t6SnP6Ce.cjs';
|
|
13
13
|
import './EngineError-Ce1lPkjZ.cjs';
|
|
14
|
-
import './Configuration-
|
|
14
|
+
import './Configuration-BGQn-cJ8.cjs';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Token types intentionally left uncategorized, either purely structural
|
package/dist/language.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CompletionItem } from './PackageRegistry-
|
|
2
|
-
export { L as LanguageService, p as LanguageServiceOptions, q as SemanticToken } from './PackageRegistry-
|
|
1
|
+
import { C as CompletionItem } from './PackageRegistry-B3yJHSxX.js';
|
|
2
|
+
export { L as LanguageService, p as LanguageServiceOptions, q as SemanticToken } from './PackageRegistry-B3yJHSxX.js';
|
|
3
3
|
import { e as TokenCategory } from './Lexer-DKMlj7Sy.js';
|
|
4
4
|
import './Parselet-B-zoPrTa.js';
|
|
5
5
|
import './BytecodeBuilder-DGGeByAP.js';
|
|
@@ -11,7 +11,7 @@ import '@tanstack/query-core';
|
|
|
11
11
|
import './TokenNormalizer-DCWdZjGz.js';
|
|
12
12
|
import './ScopeManager-DkpnlKuz.js';
|
|
13
13
|
import './EngineError-Ce1lPkjZ.js';
|
|
14
|
-
import './Configuration-
|
|
14
|
+
import './Configuration-BGQn-cJ8.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Token types intentionally left uncategorized, either purely structural
|
package/dist/packages.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkNAMMTJBE_cjs=require('./chunk-NAMMTJBE.cjs');require('./chunk-6INX773F.cjs');var chunkNXIMGB4S_cjs=require('./chunk-NXIMGB4S.cjs');require('./chunk-4QVBSG6B.cjs'),require('./chunk-VAGS5JS7.cjs'),require('./chunk-UURM7P3P.cjs'),require('./chunk-ZLRJ7TDP.cjs'),require('./chunk-JAK3RAFA.cjs'),require('./chunk-4BZIYU7S.cjs'),require('./chunk-JFAJN3C2.cjs'),require('./chunk-TLG7VZRX.cjs'),require('./chunk-ESUN2THE.cjs'),require('./chunk-N7N7MPMK.cjs'),require('./chunk-PS272DZJ.cjs'),require('./chunk-IANAMBJQ.cjs'),require('./chunk-2LFLR3VZ.cjs'),require('./chunk-5IJD5L3O.cjs'),require('./chunk-MSYX32PF.cjs'),require('./chunk-FWW3M36J.cjs'),require('./chunk-CIQOK7Q4.cjs'),require('./chunk-SOMGSIO4.cjs');Object.defineProperty(exports,"ARITHMETIC_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.a}});Object.defineProperty(exports,"BIGINT_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.n}});Object.defineProperty(exports,"BUILTIN_PACKAGES",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.y}});Object.defineProperty(exports,"CONDITIONALS_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.o}});Object.defineProperty(exports,"CONVERTERS_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.p}});Object.defineProperty(exports,"CURRENCY_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.j}});Object.defineProperty(exports,"DATETIME_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.d}});Object.defineProperty(exports,"DICE_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.f}});Object.defineProperty(exports,"FINANCE_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.r}});Object.defineProperty(exports,"FUNCTION_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.c}});Object.defineProperty(exports,"LINES_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.v}});Object.defineProperty(exports,"MAPREDUCE_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.m}});Object.defineProperty(exports,"MATHPHRASES_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.q}});Object.defineProperty(exports,"MATRIX_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.l}});Object.defineProperty(exports,"PERCENTAGE_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.b}});Object.defineProperty(exports,"TABLES_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.w}});Object.defineProperty(exports,"TAGS_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.x}});Object.defineProperty(exports,"TIME_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.e}});Object.defineProperty(exports,"UOM_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.h}});Object.defineProperty(exports,"VARIABLES_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.g}});Object.defineProperty(exports,"VECTOR_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.k}});Object.defineProperty(exports,"WEATHER_PACKAGE",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.s}});Object.defineProperty(exports,"createCurrencyPackage",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.i}});Object.defineProperty(exports,"createKnowledgePackage",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.u}});Object.defineProperty(exports,"createStocksPackage",{enumerable:true,get:function(){return chunkNAMMTJBE_cjs.t}});Object.defineProperty(exports,"SYMBOLIC_PACKAGE",{enumerable:true,get:function(){return chunkNXIMGB4S_cjs.a}});//# sourceMappingURL=packages.cjs.map
|
|
2
2
|
//# sourceMappingURL=packages.cjs.map
|
package/dist/packages.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IEnginePackage } from './PackageRegistry-
|
|
1
|
+
import { I as IEnginePackage } from './PackageRegistry-BsLmAVZJ.cjs';
|
|
2
2
|
import './Parselet-C4Wu055_.cjs';
|
|
3
3
|
import './BytecodeBuilder-DGGeByAP.cjs';
|
|
4
4
|
import './Token-CbP_OutD.cjs';
|
|
@@ -10,7 +10,7 @@ import '@tanstack/query-core';
|
|
|
10
10
|
import './TokenNormalizer-DnlL7_8c.cjs';
|
|
11
11
|
import './ScopeManager-t6SnP6Ce.cjs';
|
|
12
12
|
import './EngineError-Ce1lPkjZ.cjs';
|
|
13
|
-
import './Configuration-
|
|
13
|
+
import './Configuration-BGQn-cJ8.cjs';
|
|
14
14
|
|
|
15
15
|
/** Core arithmetic: numbers, `()` grouping, `pi`/`e` constants, `+ - * / % ^`, bitwise `<< >> & | ^`, and their `*_by` word forms. */
|
|
16
16
|
declare const ARITHMETIC_PACKAGE: IEnginePackage;
|
package/dist/packages.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IEnginePackage } from './PackageRegistry-
|
|
1
|
+
import { I as IEnginePackage } from './PackageRegistry-B3yJHSxX.js';
|
|
2
2
|
import './Parselet-B-zoPrTa.js';
|
|
3
3
|
import './BytecodeBuilder-DGGeByAP.js';
|
|
4
4
|
import './Token-CbP_OutD.js';
|
|
@@ -10,7 +10,7 @@ import '@tanstack/query-core';
|
|
|
10
10
|
import './TokenNormalizer-DCWdZjGz.js';
|
|
11
11
|
import './ScopeManager-DkpnlKuz.js';
|
|
12
12
|
import './EngineError-Ce1lPkjZ.js';
|
|
13
|
-
import './Configuration-
|
|
13
|
+
import './Configuration-BGQn-cJ8.js';
|
|
14
14
|
|
|
15
15
|
/** Core arithmetic: numbers, `()` grouping, `pi`/`e` constants, `+ - * / % ^`, bitwise `<< >> & | ^`, and their `*_by` word forms. */
|
|
16
16
|
declare const ARITHMETIC_PACKAGE: IEnginePackage;
|
package/dist/packages.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as ARITHMETIC_PACKAGE,n as BIGINT_PACKAGE,y 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,v as LINES_PACKAGE,m as MAPREDUCE_PACKAGE,q as MATHPHRASES_PACKAGE,l as MATRIX_PACKAGE,b as PERCENTAGE_PACKAGE,w as TABLES_PACKAGE,x as TAGS_PACKAGE,e as TIME_PACKAGE,h as UOM_PACKAGE,g as VARIABLES_PACKAGE,k as VECTOR_PACKAGE,s as WEATHER_PACKAGE,i as createCurrencyPackage,u as createKnowledgePackage,t as createStocksPackage}from'./chunk-
|
|
1
|
+
export{a as ARITHMETIC_PACKAGE,n as BIGINT_PACKAGE,y 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,v as LINES_PACKAGE,m as MAPREDUCE_PACKAGE,q as MATHPHRASES_PACKAGE,l as MATRIX_PACKAGE,b as PERCENTAGE_PACKAGE,w as TABLES_PACKAGE,x as TAGS_PACKAGE,e as TIME_PACKAGE,h as UOM_PACKAGE,g as VARIABLES_PACKAGE,k as VECTOR_PACKAGE,s as WEATHER_PACKAGE,i as createCurrencyPackage,u as createKnowledgePackage,t as createStocksPackage}from'./chunk-GALZNKW7.js';import'./chunk-6G3PMEPA.js';export{a as SYMBOLIC_PACKAGE}from'./chunk-AR7L5OJ2.js';import'./chunk-YVKHEAFT.js';import'./chunk-5FO4PDIG.js';import'./chunk-76F3LCIL.js';import'./chunk-TCZSPH4A.js';import'./chunk-W2JAR233.js';import'./chunk-YAYBVVG2.js';import'./chunk-E6Z4NQAS.js';import'./chunk-HFKDWQUL.js';import'./chunk-R2ENWQ76.js';import'./chunk-RSF25YSJ.js';import'./chunk-EVAOPEO4.js';import'./chunk-WGZ3FNHI.js';import'./chunk-G7TBEQRQ.js';import'./chunk-IJMNVBIS.js';import'./chunk-62LMTO4F.js';import'./chunk-TRBXW6HW.js';import'./chunk-2JMFUQZH.js';import'./chunk-MPB7KUN5.js';//# sourceMappingURL=packages.js.map
|
|
2
2
|
//# sourceMappingURL=packages.js.map
|
package/dist/testing.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkWYAY6WPQ_cjs=require('./chunk-WYAY6WPQ.cjs');require('./chunk-FDE5HWDI.cjs'),require('./chunk-NGBBNL4K.cjs'),require('./chunk-LNZNJSRW.cjs'),require('./chunk-TTFO4YDP.cjs'),require('./chunk-SYYE3QAX.cjs'),require('./chunk-AXMQG5TS.cjs'),require('./chunk-6ZNNPXXE.cjs'),require('./chunk-R2SZFJTT.cjs');var chunkNAMMTJBE_cjs=require('./chunk-NAMMTJBE.cjs');require('./chunk-6INX773F.cjs'),require('./chunk-NXIMGB4S.cjs'),require('./chunk-4QVBSG6B.cjs'),require('./chunk-VAGS5JS7.cjs'),require('./chunk-UURM7P3P.cjs'),require('./chunk-ZLRJ7TDP.cjs'),require('./chunk-JAK3RAFA.cjs'),require('./chunk-4BZIYU7S.cjs'),require('./chunk-JFAJN3C2.cjs'),require('./chunk-TLG7VZRX.cjs'),require('./chunk-ESUN2THE.cjs'),require('./chunk-N7N7MPMK.cjs');var chunkPS272DZJ_cjs=require('./chunk-PS272DZJ.cjs');require('./chunk-IANAMBJQ.cjs');var chunkMMT2LS5I_cjs=require('./chunk-MMT2LS5I.cjs');require('./chunk-32GC2FHC.cjs'),require('./chunk-Y7O4D3BJ.cjs'),require('./chunk-2LFLR3VZ.cjs'),require('./chunk-5IJD5L3O.cjs'),require('./chunk-MSYX32PF.cjs'),require('./chunk-FWW3M36J.cjs'),require('./chunk-CIQOK7Q4.cjs');var chunkSOMGSIO4_cjs=require('./chunk-SOMGSIO4.cjs');var i=class o extends Error{constructor(t){super(t.message),this.name="ExpectationError",this.code=t.code,this.expected=t.expected,this.actual=t.actual,Object.setPrototypeOf(this,o.prototype);}};function V(o=[],t={}){let{locale:e="en",includeBuiltins:r=true}=t,s=new chunkWYAY6WPQ_cjs.n({locale:e,packages:r?chunkNAMMTJBE_cjs.y:[]});for(let a of o)s.registerPackage(a);return s}function v(o,t){try{let e=o.evaluateExpression(t);return e.isError()?{status:"error",code:e.errorCode??"",message:e.errorMessage??"",source:e}:e.isPending()?{status:"pending",value:e}:{status:"value",value:e}}catch(e){if(e instanceof chunkSOMGSIO4_cjs.b)return {status:"error",code:e.code,message:e.message,source:e};let r=e instanceof Error?e.message:String(e);return {status:"error",code:"UNKNOWN_ERROR",message:r,source:new chunkPS272DZJ_cjs.m(13,"UNKNOWN_ERROR",r)}}}function x(o,t){if(Object.is(o,t))return true;if(!Number.isFinite(o)||!Number.isFinite(t))return false;let e=1e-9*Math.max(1,Math.abs(o),Math.abs(t));return Math.abs(o-t)<=e}function l(o){return o.type===3?JSON.stringify(o.value):o.type===6&&typeof o.unit=="string"?`${String(o.value)} ${o.unit}`:String(o.value)}function n(o){switch(o.status){case "value":return l(o.value);case "pending":return "a pending async value";case "error":return `an error (${o.code}: ${o.message})`}}var d=class{constructor(t,e){this.expression=t;this.outcome=e;}get value(){if(this.outcome.status==="error")throw new i({code:"EXPECTED_VALUE",message:`Expected "${this.expression}" to evaluate, but it failed with ${n(this.outcome)}.`,expected:"a resolved value",actual:n(this.outcome)});return this.outcome.value}toEvaluate(){if(this.outcome.status!=="value")throw new i({code:"EXPECTED_EVALUATE",message:`Expected "${this.expression}" to evaluate to a value, but got ${n(this.outcome)}.`,expected:"a resolved value",actual:n(this.outcome)});return this}toEqual(t,e){if(this.outcome.status!=="value")throw new i({code:"EXPECTED_EQUAL",message:`Expected "${this.expression}" to equal ${c(t,e)}, but got ${n(this.outcome)}.`,expected:c(t,e),actual:n(this.outcome)});let r=this.outcome.value,s;if(typeof t=="number"?s=x(r.toNumber(),t):typeof t=="boolean"?s=r.type===10&&r.value===t:s=C(r)===t,!s)throw new i({code:"EXPECTED_EQUAL",message:`Expected "${this.expression}" to equal ${c(t,e)}, but it was ${l(r)}.`,expected:c(t,e),actual:l(r)});if(e!==void 0&&r.unit!==e)throw new i({code:"EXPECTED_UNIT",message:`Expected "${this.expression}" to carry the unit "${e}", but it was ${r.unit===void 0?"unitless":`"${r.unit}"`}.`,expected:`unit "${e}"`,actual:r.unit===void 0?"no unit":`unit "${r.unit}"`});return this}toBeError(){if(this.outcome.status!=="error")throw new i({code:"EXPECTED_ERROR",message:`Expected "${this.expression}" to fail, but it produced ${n(this.outcome)}.`,expected:"an error",actual:n(this.outcome)});return this}toFailWith(t){if(this.outcome.status!=="error")throw new i({code:"EXPECTED_FAIL_WITH",message:`Expected "${this.expression}" to fail with "${t}", but it produced ${n(this.outcome)}.`,expected:`error code "${t}"`,actual:n(this.outcome)});if(this.outcome.code!==t)throw new i({code:"EXPECTED_FAIL_WITH",message:`Expected "${this.expression}" to fail with "${t}", but it failed with "${this.outcome.code}" (${this.outcome.message}).`,expected:`error code "${t}"`,actual:`error code "${this.outcome.code}"`});return this}toBePending(){if(this.outcome.status!=="pending")throw new i({code:"EXPECTED_PENDING",message:`Expected "${this.expression}" to be pending, but got ${n(this.outcome)}.`,expected:"a pending async value",actual:n(this.outcome)});return this}};function c(o,t){let e=typeof o=="string"?JSON.stringify(o):String(o);return t===void 0?e:`${e} ${t}`}function C(o){return String(o.value)}function D(o,t){return new d(t,v(o,t))}var O=["a","an","and","or","but","if","then","the","this","that","these","those","in","on","at","to","of","for","from","with","by","as","per","into","over","is","are","was","were","be","been","being","do","does","did","have","has","had","will","would","can","could","should","may","might","must","price","cost","value","total","sum","count","rate","amount","number","time","date","day","week","month","year","hour","minute","second","add","buy","sell","hold","make","take","give","get","set","run","up","down","out","off","all","some","any","no","not","more","less","one","two","three","first","last","next","each","every","here","there"],$=["error","warning","info"];function k(o){let t=[],e=o.lexerVocabulary;if(e?.keywords)for(let[r,s]of Object.entries(e.keywords))t.push({word:r,via:"keyword",tokenType:s});if(e?.units)for(let r of e.units)t.push({word:r,via:"unit"});if(e?.operators)for(let[r,s]of Object.entries(e.operators))t.push({word:r,via:"operator",tokenType:s});if(o.phrases)for(let[r,s]of Object.entries(o.phrases))r.includes(" ")||t.push({word:r,via:"phrase",tokenType:s});return t}var p=class{constructor(t){this.pkg=t;}notToShadow(t=O){let e=new Set(t.map(s=>s.toLowerCase())),r=k(this.pkg).filter(s=>e.has(s.word.toLowerCase()));if(r.length>0){let s=r.map(a=>`"${a.word}" (${a.via})`).join(", ");throw new i({code:"PACKAGE_SHADOWS_PROSE",message:`Package "${this.pkg.name}" claims prose word(s) as syntax: ${s}. A word that is also ordinary English turns prose into arithmetic; prefer a multi-word phrase or a form that requires a parenthesis.`,expected:"no prose words claimed as syntax",actual:s})}return r}notToCollideWith(t,e="error"){let r=chunkWYAY6WPQ_cjs.a(this.pkg,t),s=$.indexOf(e),a=r.conflicts.filter(u=>$.indexOf(u.severity)<=s);if(a.length>0){let u=a.map(g=>`[${g.severity}] ${g.detail}`).join(`
|
|
2
2
|
`);throw new i({code:"PACKAGE_VOCABULARY_COLLISION",message:`Package "${this.pkg.name}" collides with another package:
|
|
3
|
-
${u}`,expected:`no conflicts at or above "${e}" severity`,actual:`${a.length} conflict(s)`})}return r}toDeclareCompatibleEngineVersion(t=
|
|
3
|
+
${u}`,expected:`no conflicts at or above "${e}" severity`,actual:`${a.length} conflict(s)`})}return r}toDeclareCompatibleEngineVersion(t=chunkMMT2LS5I_cjs.a){let e=chunkWYAY6WPQ_cjs.b(this.pkg,t);if(!e.compatible){let r=e.reason==="invalid-range"?`its range "${e.declaredRange}" is not valid semver`:`its range "${e.declaredRange}" is not satisfied by engine version "${e.engineVersion}"`;throw new i({code:"PACKAGE_ENGINE_VERSION_INCOMPATIBLE",message:`Package "${this.pkg.name}" declares an engineVersion that will be rejected at registration: ${r}.`,expected:`an engineVersion satisfied by "${t}"`,actual:`"${e.declaredRange}"`})}return this}};function L(o){return new p(o)}exports.COMMON_PROSE_WORDS=O;exports.ExpectationError=i;exports.ExpressionAssertion=d;exports.PackageAssertion=p;exports.createTestEngine=V;exports.expectExpression=D;exports.expectPackage=L;//# sourceMappingURL=testing.cjs.map
|
|
4
4
|
//# sourceMappingURL=testing.cjs.map
|
package/dist/testing.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IEnginePackage, E as ExpressionEngine } from './PackageRegistry-
|
|
1
|
+
import { I as IEnginePackage, E as ExpressionEngine } from './PackageRegistry-BsLmAVZJ.cjs';
|
|
2
2
|
import { V as Value } from './Value-CCi_Eecs.cjs';
|
|
3
3
|
import { E as EngineError } from './EngineError-Ce1lPkjZ.cjs';
|
|
4
|
-
import { C as CompatibilityReport } from './PackageCompatibility-
|
|
4
|
+
import { C as CompatibilityReport } from './PackageCompatibility-cEClSSkz.cjs';
|
|
5
5
|
import './Parselet-C4Wu055_.cjs';
|
|
6
6
|
import './BytecodeBuilder-DGGeByAP.cjs';
|
|
7
7
|
import './Token-CbP_OutD.cjs';
|
|
@@ -11,7 +11,7 @@ import './resolvers.cjs';
|
|
|
11
11
|
import '@tanstack/query-core';
|
|
12
12
|
import './TokenNormalizer-DnlL7_8c.cjs';
|
|
13
13
|
import './ScopeManager-t6SnP6Ce.cjs';
|
|
14
|
-
import './Configuration-
|
|
14
|
+
import './Configuration-BGQn-cJ8.cjs';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* A test kit for package authors, the supported way to test a package by the
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IEnginePackage, E as ExpressionEngine } from './PackageRegistry-
|
|
1
|
+
import { I as IEnginePackage, E as ExpressionEngine } from './PackageRegistry-B3yJHSxX.js';
|
|
2
2
|
import { V as Value } from './Value-CCi_Eecs.js';
|
|
3
3
|
import { E as EngineError } from './EngineError-Ce1lPkjZ.js';
|
|
4
|
-
import { C as CompatibilityReport } from './PackageCompatibility-
|
|
4
|
+
import { C as CompatibilityReport } from './PackageCompatibility-UsSZIfHs.js';
|
|
5
5
|
import './Parselet-B-zoPrTa.js';
|
|
6
6
|
import './BytecodeBuilder-DGGeByAP.js';
|
|
7
7
|
import './Token-CbP_OutD.js';
|
|
@@ -11,7 +11,7 @@ import './resolvers.js';
|
|
|
11
11
|
import '@tanstack/query-core';
|
|
12
12
|
import './TokenNormalizer-DCWdZjGz.js';
|
|
13
13
|
import './ScopeManager-DkpnlKuz.js';
|
|
14
|
-
import './Configuration-
|
|
14
|
+
import './Configuration-BGQn-cJ8.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* A test kit for package authors, the supported way to test a package by the
|
package/dist/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {n as n$1,a,b}from'./chunk-
|
|
1
|
+
import {n as n$1,a,b}from'./chunk-UA3BGOYT.js';import'./chunk-XNIWQHXY.js';import'./chunk-2RWAXT6O.js';import'./chunk-7E7NXKQ5.js';import'./chunk-MIQBJGGR.js';import'./chunk-YJ2OPULK.js';import'./chunk-TWC7K3ZX.js';import'./chunk-B5NBFGNP.js';import'./chunk-XEIDV5JP.js';import {y}from'./chunk-GALZNKW7.js';import'./chunk-6G3PMEPA.js';import'./chunk-AR7L5OJ2.js';import'./chunk-YVKHEAFT.js';import'./chunk-5FO4PDIG.js';import'./chunk-76F3LCIL.js';import'./chunk-TCZSPH4A.js';import'./chunk-W2JAR233.js';import'./chunk-YAYBVVG2.js';import'./chunk-E6Z4NQAS.js';import'./chunk-HFKDWQUL.js';import'./chunk-R2ENWQ76.js';import'./chunk-RSF25YSJ.js';import {m}from'./chunk-EVAOPEO4.js';import'./chunk-WGZ3FNHI.js';import {a as a$1}from'./chunk-UGQM6ZXU.js';import'./chunk-YAHGSBMC.js';import'./chunk-JPFCXLJV.js';import'./chunk-G7TBEQRQ.js';import'./chunk-IJMNVBIS.js';import'./chunk-62LMTO4F.js';import'./chunk-TRBXW6HW.js';import'./chunk-2JMFUQZH.js';import {b as b$1}from'./chunk-MPB7KUN5.js';var i=class o extends Error{constructor(t){super(t.message),this.name="ExpectationError",this.code=t.code,this.expected=t.expected,this.actual=t.actual,Object.setPrototypeOf(this,o.prototype);}};function V(o=[],t={}){let{locale:e="en",includeBuiltins:r=true}=t,s=new n$1({locale:e,packages:r?y:[]});for(let a of o)s.registerPackage(a);return s}function v(o,t){try{let e=o.evaluateExpression(t);return e.isError()?{status:"error",code:e.errorCode??"",message:e.errorMessage??"",source:e}:e.isPending()?{status:"pending",value:e}:{status:"value",value:e}}catch(e){if(e instanceof b$1)return {status:"error",code:e.code,message:e.message,source:e};let r=e instanceof Error?e.message:String(e);return {status:"error",code:"UNKNOWN_ERROR",message:r,source:new m(13,"UNKNOWN_ERROR",r)}}}function x(o,t){if(Object.is(o,t))return true;if(!Number.isFinite(o)||!Number.isFinite(t))return false;let e=1e-9*Math.max(1,Math.abs(o),Math.abs(t));return Math.abs(o-t)<=e}function l(o){return o.type===3?JSON.stringify(o.value):o.type===6&&typeof o.unit=="string"?`${String(o.value)} ${o.unit}`:String(o.value)}function n(o){switch(o.status){case "value":return l(o.value);case "pending":return "a pending async value";case "error":return `an error (${o.code}: ${o.message})`}}var d=class{constructor(t,e){this.expression=t;this.outcome=e;}get value(){if(this.outcome.status==="error")throw new i({code:"EXPECTED_VALUE",message:`Expected "${this.expression}" to evaluate, but it failed with ${n(this.outcome)}.`,expected:"a resolved value",actual:n(this.outcome)});return this.outcome.value}toEvaluate(){if(this.outcome.status!=="value")throw new i({code:"EXPECTED_EVALUATE",message:`Expected "${this.expression}" to evaluate to a value, but got ${n(this.outcome)}.`,expected:"a resolved value",actual:n(this.outcome)});return this}toEqual(t,e){if(this.outcome.status!=="value")throw new i({code:"EXPECTED_EQUAL",message:`Expected "${this.expression}" to equal ${c(t,e)}, but got ${n(this.outcome)}.`,expected:c(t,e),actual:n(this.outcome)});let r=this.outcome.value,s;if(typeof t=="number"?s=x(r.toNumber(),t):typeof t=="boolean"?s=r.type===10&&r.value===t:s=C(r)===t,!s)throw new i({code:"EXPECTED_EQUAL",message:`Expected "${this.expression}" to equal ${c(t,e)}, but it was ${l(r)}.`,expected:c(t,e),actual:l(r)});if(e!==void 0&&r.unit!==e)throw new i({code:"EXPECTED_UNIT",message:`Expected "${this.expression}" to carry the unit "${e}", but it was ${r.unit===void 0?"unitless":`"${r.unit}"`}.`,expected:`unit "${e}"`,actual:r.unit===void 0?"no unit":`unit "${r.unit}"`});return this}toBeError(){if(this.outcome.status!=="error")throw new i({code:"EXPECTED_ERROR",message:`Expected "${this.expression}" to fail, but it produced ${n(this.outcome)}.`,expected:"an error",actual:n(this.outcome)});return this}toFailWith(t){if(this.outcome.status!=="error")throw new i({code:"EXPECTED_FAIL_WITH",message:`Expected "${this.expression}" to fail with "${t}", but it produced ${n(this.outcome)}.`,expected:`error code "${t}"`,actual:n(this.outcome)});if(this.outcome.code!==t)throw new i({code:"EXPECTED_FAIL_WITH",message:`Expected "${this.expression}" to fail with "${t}", but it failed with "${this.outcome.code}" (${this.outcome.message}).`,expected:`error code "${t}"`,actual:`error code "${this.outcome.code}"`});return this}toBePending(){if(this.outcome.status!=="pending")throw new i({code:"EXPECTED_PENDING",message:`Expected "${this.expression}" to be pending, but got ${n(this.outcome)}.`,expected:"a pending async value",actual:n(this.outcome)});return this}};function c(o,t){let e=typeof o=="string"?JSON.stringify(o):String(o);return t===void 0?e:`${e} ${t}`}function C(o){return String(o.value)}function D(o,t){return new d(t,v(o,t))}var O=["a","an","and","or","but","if","then","the","this","that","these","those","in","on","at","to","of","for","from","with","by","as","per","into","over","is","are","was","were","be","been","being","do","does","did","have","has","had","will","would","can","could","should","may","might","must","price","cost","value","total","sum","count","rate","amount","number","time","date","day","week","month","year","hour","minute","second","add","buy","sell","hold","make","take","give","get","set","run","up","down","out","off","all","some","any","no","not","more","less","one","two","three","first","last","next","each","every","here","there"],$=["error","warning","info"];function k(o){let t=[],e=o.lexerVocabulary;if(e?.keywords)for(let[r,s]of Object.entries(e.keywords))t.push({word:r,via:"keyword",tokenType:s});if(e?.units)for(let r of e.units)t.push({word:r,via:"unit"});if(e?.operators)for(let[r,s]of Object.entries(e.operators))t.push({word:r,via:"operator",tokenType:s});if(o.phrases)for(let[r,s]of Object.entries(o.phrases))r.includes(" ")||t.push({word:r,via:"phrase",tokenType:s});return t}var p=class{constructor(t){this.pkg=t;}notToShadow(t=O){let e=new Set(t.map(s=>s.toLowerCase())),r=k(this.pkg).filter(s=>e.has(s.word.toLowerCase()));if(r.length>0){let s=r.map(a=>`"${a.word}" (${a.via})`).join(", ");throw new i({code:"PACKAGE_SHADOWS_PROSE",message:`Package "${this.pkg.name}" claims prose word(s) as syntax: ${s}. A word that is also ordinary English turns prose into arithmetic; prefer a multi-word phrase or a form that requires a parenthesis.`,expected:"no prose words claimed as syntax",actual:s})}return r}notToCollideWith(t,e="error"){let r=a(this.pkg,t),s=$.indexOf(e),a$1=r.conflicts.filter(u=>$.indexOf(u.severity)<=s);if(a$1.length>0){let u=a$1.map(g=>`[${g.severity}] ${g.detail}`).join(`
|
|
2
2
|
`);throw new i({code:"PACKAGE_VOCABULARY_COLLISION",message:`Package "${this.pkg.name}" collides with another package:
|
|
3
3
|
${u}`,expected:`no conflicts at or above "${e}" severity`,actual:`${a$1.length} conflict(s)`})}return r}toDeclareCompatibleEngineVersion(t=a$1){let e=b(this.pkg,t);if(!e.compatible){let r=e.reason==="invalid-range"?`its range "${e.declaredRange}" is not valid semver`:`its range "${e.declaredRange}" is not satisfied by engine version "${e.engineVersion}"`;throw new i({code:"PACKAGE_ENGINE_VERSION_INCOMPATIBLE",message:`Package "${this.pkg.name}" declares an engineVersion that will be rejected at registration: ${r}.`,expected:`an engineVersion satisfied by "${t}"`,actual:`"${e.declaredRange}"`})}return this}};function L(o){return new p(o)}export{O as COMMON_PROSE_WORDS,i as ExpectationError,d as ExpressionAssertion,p as PackageAssertion,V as createTestEngine,D as expectExpression,L as expectPackage};//# sourceMappingURL=testing.js.map
|
|
4
4
|
//# sourceMappingURL=testing.js.map
|
package/dist/worker.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var chunkP6WPEUAJ_cjs=require('./chunk-P6WPEUAJ.cjs'),
|
|
2
|
-
`).forEach((d,l)=>s.set(l+1,d)):i.method==="evaluateLines"?i.args[0].forEach((d,l)=>s.set(l+1,d)):s.set(-1,i.args[0]),s},q=(i,s)=>{if(s.type==="error"){p({kind:"async-error",queryKey:s.queryKey,packageId:s.packageId,error:chunkP6WPEUAJ_cjs.b(chunkSOMGSIO4_cjs.d(s.error))});return}let d=[];for(let l of s.lineNumbers){let f=u.get(l);if(f!==void 0)try{let R=i.evaluateLine(l,f);R&&d.push({lineNumber:l,value:m(R,o)});}catch{}}d.length>0&&p({kind:"async-update",lines:d});},F=i=>{g?.();let s=i.getEventStream().getReader();g=()=>{s.cancel();},(async()=>{try{for(;;){let{done:d,value:l}=await s.read();if(d)return;q(i,l);}}catch{}})();},V=i=>{try{let s=H(n,i.packages);t=new
|
|
1
|
+
'use strict';var chunkP6WPEUAJ_cjs=require('./chunk-P6WPEUAJ.cjs'),chunkWYAY6WPQ_cjs=require('./chunk-WYAY6WPQ.cjs');require('./chunk-FDE5HWDI.cjs'),require('./chunk-NGBBNL4K.cjs'),require('./chunk-LNZNJSRW.cjs'),require('./chunk-TTFO4YDP.cjs'),require('./chunk-SYYE3QAX.cjs'),require('./chunk-AXMQG5TS.cjs');var chunk6ZNNPXXE_cjs=require('./chunk-6ZNNPXXE.cjs');require('./chunk-R2SZFJTT.cjs');var chunkNAMMTJBE_cjs=require('./chunk-NAMMTJBE.cjs');require('./chunk-6INX773F.cjs'),require('./chunk-NXIMGB4S.cjs'),require('./chunk-4QVBSG6B.cjs'),require('./chunk-VAGS5JS7.cjs'),require('./chunk-UURM7P3P.cjs'),require('./chunk-ZLRJ7TDP.cjs'),require('./chunk-JAK3RAFA.cjs'),require('./chunk-4BZIYU7S.cjs'),require('./chunk-JFAJN3C2.cjs'),require('./chunk-TLG7VZRX.cjs');var chunkESUN2THE_cjs=require('./chunk-ESUN2THE.cjs'),chunkN7N7MPMK_cjs=require('./chunk-N7N7MPMK.cjs');require('./chunk-PS272DZJ.cjs'),require('./chunk-IANAMBJQ.cjs'),require('./chunk-MMT2LS5I.cjs'),require('./chunk-32GC2FHC.cjs'),require('./chunk-Y7O4D3BJ.cjs'),require('./chunk-2LFLR3VZ.cjs'),require('./chunk-5IJD5L3O.cjs'),require('./chunk-MSYX32PF.cjs'),require('./chunk-FWW3M36J.cjs'),require('./chunk-CIQOK7Q4.cjs');var chunkSOMGSIO4_cjs=require('./chunk-SOMGSIO4.cjs');var W=class{constructor(r){this.nextId=1;this.pending=new Map;this.resolvedListeners=new Set;this.asyncErrorListeners=new Set;this.terminated=false;this.transport=r,this.transport.onMessage(n=>this.onMessage(n));}init(r){let n=this.nextId++;return new Promise((t,o)=>{this.pending.set(n,{resolve:()=>t(),reject:o}),this.transport.postMessage({kind:"init",id:n,localeCode:r.localeCode,diagnostics:r.diagnostics,config:r.config,packages:r.packages,formatting:r.formatting});})}parseDocument(r,n){let{signal:t,...o}=n??{},a=Object.keys(o).length>0?o:void 0;return this.call("parseDocument",[r,a],t)}evaluateLines(r,n){return this.call("evaluateLines",[r],n?.signal)}evaluateExpression(r,n){return this.call("evaluateExpression",[r],n?.signal)}onResolved(r){return this.resolvedListeners.add(r),()=>this.resolvedListeners.delete(r)}onAsyncError(r){return this.asyncErrorListeners.add(r),()=>this.asyncErrorListeners.delete(r)}terminate(){if(this.terminated)return;this.terminated=true;let r=chunkP6WPEUAJ_cjs.e();for(let n of this.pending.values())this.unhook(n),n.reject(r);this.pending.clear(),this.resolvedListeners.clear(),this.asyncErrorListeners.clear(),this.transport.terminate();}call(r,n,t){if(this.terminated)return Promise.reject(chunkP6WPEUAJ_cjs.e());if(t?.aborted)return Promise.reject(chunkP6WPEUAJ_cjs.d(r));let o=this.nextId++;return new Promise((a,u)=>{let c={resolve:a,reject:u};if(t){let g=()=>{this.pending.has(o)&&(this.pending.delete(o),this.transport.postMessage({kind:"cancel",id:o}),u(chunkP6WPEUAJ_cjs.d(r)));};c.signal=t,c.onAbort=g,t.addEventListener("abort",g,{once:true});}this.pending.set(o,c),this.transport.postMessage({kind:"request",id:o,method:r,args:n});})}onMessage(r){let n=r;switch(n.kind){case "ready":case "result":{let t=n.kind==="result"?n.value:void 0;this.settle(n.id,o=>o.resolve(t));break}case "error":this.settle(n.id,t=>t.reject(chunkP6WPEUAJ_cjs.c(n.error)));break;case "async-update":for(let t of [...this.resolvedListeners])t(n.lines);break;case "async-error":for(let t of [...this.asyncErrorListeners])t({queryKey:n.queryKey,packageId:n.packageId,error:chunkP6WPEUAJ_cjs.c(n.error)});break}}settle(r,n){let t=this.pending.get(r);t&&(this.pending.delete(r),this.unhook(t),n(t));}unhook(r){r.signal&&r.onAbort&&r.signal.removeEventListener("abort",r.onAbort);}};async function K(e){let r=new W(e.transport);return await r.init(e),r}function O(e){return e>0?"Infinity":e<0?"-Infinity":"NaN"}function U(e){let r=e.data.map(n=>typeof n=="object"&&n!==null?chunkN7N7MPMK_cjs.R(n):typeof n=="number"&&!Number.isFinite(n)?O(n):n);return {rows:e.rows,cols:e.cols,cells:r,hasSymbolic:e.hasSymbolic}}function m(e,r){let n=e.toNumber(),t={type:e.type,text:chunk6ZNNPXXE_cjs.c(e,r),number:Number.isFinite(n)?n:0};Number.isFinite(n)||(t.nonFinite=O(n)),e.unit!==void 0&&(t.unit=e.unit),e.timedOut!==void 0&&(t.timedOut=e.timedOut);let o=e.value;if(typeof o=="bigint")t.bigint=o.toString();else if(e.type===7)t.matrix=U(o);else if(e.type===8){let a=o;t.range={min:a.min,max:a.max};}else if(e.type===14){let a=o;t.colour={hex:chunkESUN2THE_cjs.f(a),r:a.r,g:a.g,b:a.b,a:a.a,format:a.format,css:chunkESUN2THE_cjs.g(a)};}return t}function N(e,r){return e?m(e,r):null}function _(e,r){return {start:e.start,end:e.end,expression:e.expression,lineNumber:e.lineNumber,columnNumber:e.columnNumber,result:N(e.result,r),error:e.error??null}}function y(e,r){return {lineNumber:e.lineNumber,text:e.text,startPosition:e.startPosition,endPosition:e.endPosition,isEmpty:e.isEmpty,hasInlineSolves:e.hasInlineSolves,inlineSolves:e.inlineSolves.map(n=>_(n,r)),expression:e.expression,result:N(e.result,r),error:e.error}}function x(e,r){let n={lines:e.lines.map(t=>y(t,r)),totalLines:e.totalLines,errors:[...e.errors]};return e.diagnostics!==void 0&&(n.diagnostics=e.diagnostics),n}function H(e,r){if(r===void 0)return e;let n=new Map(e.map(o=>[o.name,o])),t=[];for(let o of r){let a=n.get(o);if(!a)throw chunkSOMGSIO4_cjs.c.config(chunkP6WPEUAJ_cjs.a.WORKER_UNKNOWN_PACKAGE,`No package named "${o}" is available in this worker runtime`,{name:o,available:[...n.keys()]});t.push(a);}return t}function B(e,r={}){let n=r.packages??chunkNAMMTJBE_cjs.y,t=null,o,a=new Map,u=new Map,c=null,g=null,p=i=>e.postMessage(i),h=(i,s)=>{p({kind:"error",id:i,error:chunkP6WPEUAJ_cjs.b(chunkSOMGSIO4_cjs.d(s))});},C=i=>{let s=new Map;return i.method==="parseDocument"?i.args[0].split(`
|
|
2
|
+
`).forEach((d,l)=>s.set(l+1,d)):i.method==="evaluateLines"?i.args[0].forEach((d,l)=>s.set(l+1,d)):s.set(-1,i.args[0]),s},q=(i,s)=>{if(s.type==="error"){p({kind:"async-error",queryKey:s.queryKey,packageId:s.packageId,error:chunkP6WPEUAJ_cjs.b(chunkSOMGSIO4_cjs.d(s.error))});return}let d=[];for(let l of s.lineNumbers){let f=u.get(l);if(f!==void 0)try{let R=i.evaluateLine(l,f);R&&d.push({lineNumber:l,value:m(R,o)});}catch{}}d.length>0&&p({kind:"async-update",lines:d});},F=i=>{g?.();let s=i.getEventStream().getReader();g=()=>{s.cancel();},(async()=>{try{for(;;){let{done:d,value:l}=await s.read();if(d)return;q(i,l);}}catch{}})();},V=i=>{try{let s=H(n,i.packages);t=new chunkWYAY6WPQ_cjs.n({locale:i.localeCode??"en",diagnostics:i.diagnostics??!1,config:i.config,packages:s}),o=i.formatting,F(t),p({kind:"ready",id:i.id});}catch(s){h(i.id,s);}},j=(i,s)=>{let{method:d,args:l}=s;switch(d){case "parseDocument":return x(i.parseDocument(l[0],l[1]),o);case "evaluateLines":return i.evaluateLines(l[0]).map(f=>y(f,o));case "evaluateExpression":return m(i.evaluateExpression(l[0]),o);default:throw chunkSOMGSIO4_cjs.c.execution(chunkP6WPEUAJ_cjs.a.WORKER_UNKNOWN_METHOD,`The worker runtime has no method named "${String(d)}"`,{method:d})}},D=i=>{let s=t;if(!s){h(i.id,chunkSOMGSIO4_cjs.c.execution(chunkP6WPEUAJ_cjs.a.WORKER_NOT_INITIALISED,"The worker received a request before its engine finished initialising"));return}c?.abort();let d=new AbortController;c=d,u=C(i),a.set(i.id,d),s.setKeystrokeSignal(d.signal);try{let l=j(s,i);p({kind:"result",id:i.id,value:l});}catch(l){h(i.id,l);}finally{a.delete(i.id),s.setKeystrokeSignal(null);}};return e.onMessage(i=>{let s=i;switch(s.kind){case "init":V(s);break;case "request":D(s);break;case "cancel":a.get(s.id)?.abort();break}}),()=>{g?.(),g=null,c?.abort(),c=null,u=new Map;for(let i of a.values())i.abort();a.clear(),t?.clear(),t=null,e.terminate();}}function G(e){return typeof globalThis.structuredClone=="function"?globalThis.structuredClone(e):JSON.parse(JSON.stringify(e))}function J(){let e=null,r=null,n=true,t=(u,c)=>{let g=G(c);queueMicrotask(()=>{n&&u()?.(g);});};return {client:{postMessage:u=>t(()=>r,u),onMessage:u=>{e=u;},terminate:()=>{n=false;}},host:{postMessage:u=>t(()=>e,u),onMessage:u=>{r=u;},terminate:()=>{n=false;}}}}function $(e){return {postMessage:r=>e.postMessage(r),onMessage:r=>{let n=t=>r(t.data);typeof e.addEventListener=="function"?e.addEventListener("message",n):e.onmessage=n,e.start?.();},terminate:()=>{e.terminate?.(),e.close?.();}}}function Q(e){return {postMessage:r=>e.postMessage(r),onMessage:r=>{e.on("message",n=>r(n));},terminate:()=>{e.terminate?.(),e.close?.();}}}exports.createLinkedTransports=J;exports.createWorkerEngine=K;exports.eventTargetTransport=$;exports.messagePortTransport=Q;exports.serializeParsedLine=y;exports.serializeParsingResult=x;exports.serializeValue=m;exports.startWorkerRuntime=B;//# sourceMappingURL=worker.cjs.map
|
|
3
3
|
//# sourceMappingURL=worker.cjs.map
|
package/dist/worker.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as EngineConfigOverride } from './Configuration-
|
|
2
|
-
import { U as UnifiedParsingOptions, I as IEnginePackage, J as ParsedLine, P as ParsingResult } from './PackageRegistry-
|
|
3
|
-
import { F as FormattingSettings } from './FormattingSettings-
|
|
1
|
+
import { E as EngineConfigOverride } from './Configuration-BGQn-cJ8.cjs';
|
|
2
|
+
import { U as UnifiedParsingOptions, I as IEnginePackage, J as ParsedLine, P as ParsingResult } from './PackageRegistry-BsLmAVZJ.cjs';
|
|
3
|
+
import { F as FormattingSettings } from './FormattingSettings-bRKjU7wI.cjs';
|
|
4
4
|
import { E as EngineError } from './EngineError-Ce1lPkjZ.cjs';
|
|
5
5
|
import { b as ValueType, g as ColourFormat, V as Value } from './Value-CCi_Eecs.cjs';
|
|
6
6
|
import { a as DiagnosticReportJSON } from './pipeline-DCQicwWX.cjs';
|
package/dist/worker.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as EngineConfigOverride } from './Configuration-
|
|
2
|
-
import { U as UnifiedParsingOptions, I as IEnginePackage, J as ParsedLine, P as ParsingResult } from './PackageRegistry-
|
|
3
|
-
import { F as FormattingSettings } from './FormattingSettings-
|
|
1
|
+
import { E as EngineConfigOverride } from './Configuration-BGQn-cJ8.js';
|
|
2
|
+
import { U as UnifiedParsingOptions, I as IEnginePackage, J as ParsedLine, P as ParsingResult } from './PackageRegistry-B3yJHSxX.js';
|
|
3
|
+
import { F as FormattingSettings } from './FormattingSettings-bRKjU7wI.js';
|
|
4
4
|
import { E as EngineError } from './EngineError-Ce1lPkjZ.js';
|
|
5
5
|
import { b as ValueType, g as ColourFormat, V as Value } from './Value-CCi_Eecs.js';
|
|
6
6
|
import { a as DiagnosticReportJSON } from './pipeline-72QmQlGx.js';
|