@rsconcept/domain 1.0.0 → 1.2.0

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