@rsconcept/domain 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/analyzer-DlSq3Y3r.d.ts +39 -0
- package/dist/arguments-extractor-1acwjQNc.d.ts +38 -0
- package/dist/ast-C8sIpKdL.d.ts +51 -0
- package/dist/ast-annotations-BiMjkKvz.d.ts +16 -0
- package/dist/branded-ZlzIcxzu.d.ts +9 -0
- package/dist/calculator-C9W2jkSx.d.ts +39 -0
- package/dist/cctext/index.d.ts +2 -1
- package/dist/cctext/index.js +2 -42
- package/dist/cctext/language-api.d.ts +10 -12
- package/dist/cctext/language-api.js +157 -227
- package/dist/cctext/language-api.js.map +1 -1
- package/dist/cctext/language.d.ts +24 -22
- package/dist/cctext/language.js +43 -39
- package/dist/cctext/language.js.map +1 -1
- package/dist/error-E1LVq_3w.d.ts +87 -0
- package/dist/graph/graph.d.ts +2 -62
- package/dist/graph/graph.js +339 -382
- package/dist/graph/graph.js.map +1 -1
- package/dist/graph/index.d.ts +2 -1
- package/dist/graph/index.js +2 -384
- package/dist/graph-DR8rL2o3.d.ts +64 -0
- package/dist/hash-Y8I4c6Al.d.ts +8 -0
- package/dist/index-BKZ67WMa.d.ts +1 -0
- package/dist/index-BVVgDSdq.d.ts +1 -0
- package/dist/index-DmtQKWjk.d.ts +1 -0
- package/dist/index-_6s0AX1B.d.ts +1 -0
- package/dist/index.d.ts +27 -28
- package/dist/index.js +23 -5851
- package/dist/lezer-tree-iS7LpLBJ.d.ts +14 -0
- package/dist/library/folder-tree.d.ts +22 -20
- package/dist/library/folder-tree.js +108 -130
- package/dist/library/folder-tree.js.map +1 -1
- package/dist/library/index.d.ts +8 -17
- package/dist/library/index.js +7 -2800
- package/dist/library/library-api.d.ts +3 -1
- package/dist/library/library-api.js +9 -8
- package/dist/library/library-api.js.map +1 -1
- package/dist/library/library.d.ts +2 -56
- package/dist/library/library.js +23 -19
- package/dist/library/library.js.map +1 -1
- package/dist/library/oss-api.d.ts +26 -37
- package/dist/library/oss-api.js +257 -1096
- package/dist/library/oss-api.js.map +1 -1
- package/dist/library/oss-layout-api.d.ts +28 -28
- package/dist/library/oss-layout-api.js +239 -316
- package/dist/library/oss-layout-api.js.map +1 -1
- package/dist/library/oss-layout.d.ts +2 -25
- package/dist/library/oss-layout.js +1 -1
- package/dist/library/oss.d.ts +87 -89
- package/dist/library/oss.js +27 -26
- package/dist/library/oss.js.map +1 -1
- package/dist/library/rsengine.d.ts +100 -106
- package/dist/library/rsengine.js +439 -2599
- package/dist/library/rsengine.js.map +1 -1
- package/dist/library/rsform-api.d.ts +11 -16
- package/dist/library/rsform-api.js +313 -825
- package/dist/library/rsform-api.js.map +1 -1
- package/dist/library/rsform.d.ts +159 -167
- package/dist/library/rsform.js +29 -28
- package/dist/library/rsform.js.map +1 -1
- package/dist/library/rsmodel-api.d.ts +8 -15
- package/dist/library/rsmodel-api.js +172 -813
- package/dist/library/rsmodel-api.js.map +1 -1
- package/dist/library/rsmodel.d.ts +27 -33
- package/dist/library/rsmodel.js +16 -23
- package/dist/library/rsmodel.js.map +1 -1
- package/dist/library/structure-planner.d.ts +20 -26
- package/dist/library/structure-planner.js +106 -474
- package/dist/library/structure-planner.js.map +1 -1
- package/dist/library-CYun28Xz.d.ts +58 -0
- package/dist/oss-layout-3glgAqfn.d.ts +27 -0
- package/dist/parser-Bwd8LxJ1.d.ts +7 -0
- package/dist/parsing/ast.d.ts +2 -49
- package/dist/parsing/ast.js +68 -76
- package/dist/parsing/ast.js.map +1 -1
- package/dist/parsing/index.d.ts +3 -3
- package/dist/parsing/index.js +3 -141
- package/dist/parsing/lezer-tree.d.ts +2 -13
- package/dist/parsing/lezer-tree.js +50 -43
- package/dist/parsing/lezer-tree.js.map +1 -1
- package/dist/rslang/api.d.ts +9 -14
- package/dist/rslang/api.js +114 -827
- package/dist/rslang/api.js.map +1 -1
- package/dist/rslang/ast-annotations.d.ts +2 -18
- package/dist/rslang/ast-annotations.js +34 -45
- package/dist/rslang/ast-annotations.js.map +1 -1
- package/dist/rslang/error.d.ts +2 -85
- package/dist/rslang/error.js +88 -150
- package/dist/rslang/error.js.map +1 -1
- package/dist/rslang/eval/calculator.d.ts +2 -43
- package/dist/rslang/eval/calculator.js +81 -1636
- package/dist/rslang/eval/calculator.js.map +1 -1
- package/dist/rslang/eval/evaluation-cache.d.ts +22 -26
- package/dist/rslang/eval/evaluation-cache.js +168 -287
- package/dist/rslang/eval/evaluation-cache.js.map +1 -1
- package/dist/rslang/eval/evaluator.d.ts +59 -63
- package/dist/rslang/eval/evaluator.js +602 -1509
- package/dist/rslang/eval/evaluator.js.map +1 -1
- package/dist/rslang/eval/value-api.d.ts +2 -48
- package/dist/rslang/eval/value-api.js +2 -490
- package/dist/rslang/eval/value.d.ts +2 -36
- package/dist/rslang/eval/value.js +2 -118
- package/dist/rslang/index.d.ts +14 -17
- package/dist/rslang/index.js +12 -4314
- package/dist/rslang/labels.d.ts +6 -6
- package/dist/rslang/labels.js +139 -305
- package/dist/rslang/labels.js.map +1 -1
- package/dist/rslang/parser/expression-generator.d.ts +5 -5
- package/dist/rslang/parser/expression-generator.js +248 -446
- package/dist/rslang/parser/expression-generator.js.map +1 -1
- package/dist/rslang/parser/normalize.d.ts +4 -8
- package/dist/rslang/parser/normalize.js +286 -481
- package/dist/rslang/parser/normalize.js.map +1 -1
- package/dist/rslang/parser/parser.d.ts +2 -5
- package/dist/rslang/parser/parser.js +30 -21
- package/dist/rslang/parser/parser.js.map +1 -1
- package/dist/rslang/parser/parser.terms.d.ts +43 -41
- package/dist/rslang/parser/parser.terms.js +44 -83
- package/dist/rslang/parser/parser.terms.js.map +1 -1
- package/dist/rslang/parser/syntax-errors.d.ts +5 -8
- package/dist/rslang/parser/syntax-errors.js +113 -382
- package/dist/rslang/parser/syntax-errors.js.map +1 -1
- package/dist/rslang/parser/token.d.ts +2 -79
- package/dist/rslang/parser/token.js +81 -93
- package/dist/rslang/parser/token.js.map +1 -1
- package/dist/rslang/semantic/analyzer.d.ts +2 -39
- package/dist/rslang/semantic/analyzer.js +186 -2600
- package/dist/rslang/semantic/analyzer.js.map +1 -1
- package/dist/rslang/semantic/arguments-extractor.d.ts +2 -42
- package/dist/rslang/semantic/arguments-extractor.js +202 -361
- package/dist/rslang/semantic/arguments-extractor.js.map +1 -1
- package/dist/rslang/semantic/type-auditor.d.ts +64 -68
- package/dist/rslang/semantic/type-auditor.js +594 -1564
- package/dist/rslang/semantic/type-auditor.js.map +1 -1
- package/dist/rslang/semantic/typification-api.d.ts +4 -7
- package/dist/rslang/semantic/typification-api.js +162 -303
- package/dist/rslang/semantic/typification-api.js.map +1 -1
- package/dist/rslang/semantic/typification-parser.d.ts +2 -12
- package/dist/rslang/semantic/typification-parser.js +165 -219
- package/dist/rslang/semantic/typification-parser.js.map +1 -1
- package/dist/rslang/semantic/typification.d.ts +2 -119
- package/dist/rslang/semantic/typification.js +66 -52
- package/dist/rslang/semantic/typification.js.map +1 -1
- package/dist/rslang/semantic/value-auditor.d.ts +32 -38
- package/dist/rslang/semantic/value-auditor.js +206 -518
- package/dist/rslang/semantic/value-auditor.js.map +1 -1
- package/dist/rslang/semantic/value-class.d.ts +2 -10
- package/dist/rslang/semantic/value-class.js +8 -7
- package/dist/rslang/semantic/value-class.js.map +1 -1
- package/dist/rslang/typification-graph.d.ts +2 -33
- package/dist/rslang/typification-graph.js +94 -306
- package/dist/rslang/typification-graph.js.map +1 -1
- package/dist/shared/branded.d.ts +2 -7
- package/dist/shared/branded.js +1 -1
- package/dist/shared/hash.d.ts +2 -6
- package/dist/shared/hash.js +13 -13
- package/dist/shared/hash.js.map +1 -1
- package/dist/shared/index.d.ts +3 -2
- package/dist/shared/index.js +2 -18
- package/dist/token-DeXAmzwr.d.ts +81 -0
- package/dist/typification-Dk-fisgO.d.ts +120 -0
- package/dist/typification-graph-6HcZ-rKH.d.ts +30 -0
- package/dist/typification-parser-BBVx1RxP.d.ts +13 -0
- package/dist/value-B8UtCqaK.js +366 -0
- package/dist/value-B8UtCqaK.js.map +1 -0
- package/dist/value-CTjX6825.d.ts +33 -0
- package/dist/value-api-Bw-SgaYY.d.ts +49 -0
- package/dist/value-class-CNI-lqXJ.d.ts +12 -0
- package/package.json +8 -8
- package/src/library/rsform-api.test.ts +24 -0
- package/src/library/rsform-api.ts +12 -4
- package/dist/cctext/index.js.map +0 -1
- package/dist/graph/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/library/index.js.map +0 -1
- package/dist/library/oss-layout.js.map +0 -1
- package/dist/parsing/index.js.map +0 -1
- package/dist/rslang/eval/value-api.js.map +0 -1
- package/dist/rslang/eval/value.js.map +0 -1
- package/dist/rslang/index.js.map +0 -1
- package/dist/shared/branded.js.map +0 -1
- package/dist/shared/index.js.map +0 -1
|
@@ -1,116 +1,110 @@
|
|
|
1
|
-
import { AstNode } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import '@lezer/common';
|
|
7
|
-
import '../rslang/error.js';
|
|
8
|
-
import '../rslang/semantic/typification.js';
|
|
9
|
-
import '../shared/branded.js';
|
|
10
|
-
import '../graph/graph.js';
|
|
11
|
-
import '../rslang/semantic/analyzer.js';
|
|
12
|
-
import '../rslang/semantic/value-class.js';
|
|
13
|
-
import './library.js';
|
|
1
|
+
import { t as AstNode } from "../ast-C8sIpKdL.js";
|
|
2
|
+
import { c as Value } from "../value-CTjX6825.js";
|
|
3
|
+
import { n as CalculatorResult, r as RSCalculator, t as CalculatorEvaluateOptions } from "../calculator-C9W2jkSx.js";
|
|
4
|
+
import { CstType, RSForm } from "./rsform.js";
|
|
5
|
+
import { BasicBinding, BasicsContext, EvalStatus, RSModel } from "./rsmodel.js";
|
|
14
6
|
|
|
7
|
+
//#region src/library/rsengine.d.ts
|
|
15
8
|
/** Services for {@link RSEngine}. */
|
|
16
9
|
interface RSEngineServices {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
10
|
+
setCstValue: (args: {
|
|
11
|
+
itemID: number;
|
|
12
|
+
data: {
|
|
13
|
+
target: number;
|
|
14
|
+
type: string;
|
|
15
|
+
data: Value | BasicBinding;
|
|
16
|
+
}[];
|
|
17
|
+
}) => Promise<unknown>;
|
|
18
|
+
clearValues: (args: {
|
|
19
|
+
itemID: number;
|
|
20
|
+
data: {
|
|
21
|
+
items: number[];
|
|
22
|
+
};
|
|
23
|
+
}) => Promise<unknown>;
|
|
31
24
|
}
|
|
32
25
|
/** Notifications for {@link RSEngine}. */
|
|
33
26
|
interface RSEngineNotifications {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
onInvalidSetValue: () => void;
|
|
28
|
+
onCalculationSuccess: (timeSpent: string) => void;
|
|
29
|
+
onEvaluationError: (message: string) => void;
|
|
37
30
|
}
|
|
38
31
|
/** Calculation engine for {@link RSModel}. */
|
|
39
32
|
declare class RSEngine {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
33
|
+
modelID: number;
|
|
34
|
+
schema: RSForm | null;
|
|
35
|
+
data: RSModel | null;
|
|
36
|
+
calculator: RSCalculator;
|
|
37
|
+
basics: BasicsContext;
|
|
38
|
+
private services;
|
|
39
|
+
private notifications;
|
|
40
|
+
private invalidData;
|
|
41
|
+
private calculatedSet;
|
|
42
|
+
private valueSubscribers;
|
|
43
|
+
private statusSubscribers;
|
|
44
|
+
private changeSubscribers;
|
|
45
|
+
private changeGeneration;
|
|
46
|
+
private pendingChange;
|
|
47
|
+
private coalescedEmitTimeout;
|
|
48
|
+
constructor(modelID: number, services: RSEngineServices, notifications?: RSEngineNotifications | null);
|
|
49
|
+
/** Updates data for {@link RSEngine}. */
|
|
50
|
+
loadData(schema: RSForm, model: RSModel): void;
|
|
51
|
+
/** Updates services for {@link RSEngine}. */
|
|
52
|
+
updateServices(services: RSEngineServices): void;
|
|
53
|
+
/** Updates notifications for {@link RSEngine}. */
|
|
54
|
+
updateNotifications(notifications: RSEngineNotifications | null): void;
|
|
55
|
+
/** Gets value of {@link Constituenta}. */
|
|
56
|
+
getCstValue(cstID: number): Value | null;
|
|
57
|
+
/** Gets status of {@link Constituenta}. */
|
|
58
|
+
getCstStatus(cstID: number): EvalStatus;
|
|
59
|
+
/** Subscribe to value change of {@link Constituenta}. */
|
|
60
|
+
subscribeValue(cstID: number, callbackFn: () => void): () => void;
|
|
61
|
+
/** Subscribe to status change of {@link Constituenta}. */
|
|
62
|
+
subscribeStatus(cstID: number, callbackFn: () => void): () => void;
|
|
63
|
+
/**
|
|
64
|
+
* Subscribe to any engine change that can affect evaluation (values, status, or loaded data).
|
|
65
|
+
*/
|
|
66
|
+
subscribeChanges(callbackFn: () => void): () => void;
|
|
67
|
+
/** Monotonic counter bumped whenever the engine emits a change to {@link RSEngine.subscribeChanges} listeners. */
|
|
68
|
+
getChangeGeneration(): number;
|
|
69
|
+
/**
|
|
70
|
+
* Runs pending {@link RSEngine.subscribeChanges} notifications immediately and clears the coalescing queue.
|
|
71
|
+
* Use after a synchronous batch of engine updates when listeners must observe a bumped {@link getChangeGeneration}
|
|
72
|
+
* in the same turn.
|
|
73
|
+
*/
|
|
74
|
+
flushPendingChanges(): void;
|
|
75
|
+
/** Sets value for {@link Constituenta} from {@link Value}. */
|
|
76
|
+
setStructureValue(cstID: number, data: Value): Promise<void>;
|
|
77
|
+
/** Sets value for {@link Constituenta} from {@link BasicBinding}. */
|
|
78
|
+
setBasicValue(cstID: number, data: BasicBinding): Promise<void>;
|
|
79
|
+
/** Resets value for {@link Constituenta}. */
|
|
80
|
+
resetValue(cstID: number): Promise<void>;
|
|
81
|
+
/** Evaluates expression for {@link RSEngine}. */
|
|
82
|
+
evaluateExpression(expression: string, cstType: CstType): CalculatorResult;
|
|
83
|
+
/** Evaluates AST for {@link RSEngine}. */
|
|
84
|
+
evaluateAst(ast: AstNode, options?: CalculatorEvaluateOptions): CalculatorResult;
|
|
85
|
+
/** Calculates value for {@link Constituenta}. */
|
|
86
|
+
calculateCst(cstID: number): CalculatorResult;
|
|
87
|
+
/** Recalculate model for all inferrable expressions. */
|
|
88
|
+
recalculateAll(): void;
|
|
89
|
+
/** Notify subscribers about value and status change of {@link Constituenta}. */
|
|
90
|
+
private notifyCst;
|
|
91
|
+
/** Notify all subscribers about value change. */
|
|
92
|
+
private notifyValue;
|
|
93
|
+
/** Notify all subscribers about status change. */
|
|
94
|
+
private notifyStatus;
|
|
95
|
+
/** Notify all subscribers about value and status change. */
|
|
96
|
+
private notifyAll;
|
|
97
|
+
private scheduleCoalescedEmitChange;
|
|
98
|
+
private emitChange;
|
|
99
|
+
private prepareAst;
|
|
100
|
+
private prepareValues;
|
|
101
|
+
private setupEmptySets;
|
|
102
|
+
private collectChanged;
|
|
103
|
+
private onChangeDefinitions;
|
|
104
|
+
private cascadeReset;
|
|
105
|
+
private prepareEvaluation;
|
|
106
|
+
private recalculateInternal;
|
|
114
107
|
}
|
|
115
|
-
|
|
116
|
-
export { RSEngine,
|
|
108
|
+
//#endregion
|
|
109
|
+
export { RSEngine, RSEngineNotifications, RSEngineServices };
|
|
110
|
+
//# sourceMappingURL=rsengine.d.ts.map
|