@coldsmirk/abacus-core 0.11.0 → 0.12.1
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/index.cjs +5 -5
- package/dist/index.d.cts +1 -5
- package/dist/index.d.ts +1 -5
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -361,7 +361,7 @@ function isZenConsistentNumber(value) {
|
|
|
361
361
|
const SUBJECT_PATTERN = /^[A-Z_$][\w$]*(?:\.[A-Z_$][\w$]*|\[\d+\])*$/i;
|
|
362
362
|
const SUBJECT_IDENTIFIER_PATTERN = /[A-Z_$][\w$]*/gi;
|
|
363
363
|
const SUBJECT_INDEX_PATTERN = /\[(?<index>\d+)\]/g;
|
|
364
|
-
const ZEN_RESERVED_WORDS = new Set([
|
|
364
|
+
const ZEN_RESERVED_WORDS = /* @__PURE__ */ new Set([
|
|
365
365
|
"and",
|
|
366
366
|
"or",
|
|
367
367
|
"not",
|
|
@@ -370,7 +370,7 @@ const ZEN_RESERVED_WORDS = new Set([
|
|
|
370
370
|
"false",
|
|
371
371
|
"null"
|
|
372
372
|
]);
|
|
373
|
-
const ZEN_MEMBER_RESERVED_WORDS = new Set(["true", "false"]);
|
|
373
|
+
const ZEN_MEMBER_RESERVED_WORDS = /* @__PURE__ */ new Set(["true", "false"]);
|
|
374
374
|
function isZenReservedWord(word) {
|
|
375
375
|
return ZEN_RESERVED_WORDS.has(word);
|
|
376
376
|
}
|
|
@@ -653,13 +653,13 @@ function isConditionScalar(value) {
|
|
|
653
653
|
function isConditionScalarArray(value) {
|
|
654
654
|
return isArray(value) && value.every((item) => isConditionScalar(item));
|
|
655
655
|
}
|
|
656
|
-
const TWO_CHAR_PUNCTUATION = new Set([
|
|
656
|
+
const TWO_CHAR_PUNCTUATION = /* @__PURE__ */ new Set([
|
|
657
657
|
"==",
|
|
658
658
|
"!=",
|
|
659
659
|
"<=",
|
|
660
660
|
">="
|
|
661
661
|
]);
|
|
662
|
-
const ONE_CHAR_PUNCTUATION = new Set([
|
|
662
|
+
const ONE_CHAR_PUNCTUATION = /* @__PURE__ */ new Set([
|
|
663
663
|
"(",
|
|
664
664
|
")",
|
|
665
665
|
"[",
|
|
@@ -1162,7 +1162,7 @@ const zhCNMessages = {
|
|
|
1162
1162
|
expectedBoolean: (actualType) => `期望布尔测试表达式,实际类型为 \`${actualType}\`。`,
|
|
1163
1163
|
expectedType: (expectedType, actualType) => `期望 \`${expectedType}\`,实际为 \`${actualType}\`。`
|
|
1164
1164
|
};
|
|
1165
|
-
const localeRegistry = new Map([["en-US", enMessages], ["zh-CN", zhCNMessages]]);
|
|
1165
|
+
const localeRegistry = /* @__PURE__ */ new Map([["en-US", enMessages], ["zh-CN", zhCNMessages]]);
|
|
1166
1166
|
let activeBaseMessages = enMessages;
|
|
1167
1167
|
let activeMessages = enMessages;
|
|
1168
1168
|
const messageListeners = /* @__PURE__ */ new Set();
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { InitInput } from "@gorules/zen-engine-wasm";
|
|
2
2
|
import { SchemaTree } from "@coldsmirk/caliper-core";
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* How an expression editor interprets its document:
|
|
6
5
|
*
|
|
@@ -695,10 +694,7 @@ interface ConfigureMessagesOptions {
|
|
|
695
694
|
* override, or both (overrides win). Idempotent and module-global, so a host
|
|
696
695
|
* configures it once (e.g. through `ExpressionConfigProvider`).
|
|
697
696
|
*/
|
|
698
|
-
declare function configureExpressionMessages({
|
|
699
|
-
locale,
|
|
700
|
-
messages
|
|
701
|
-
}: ConfigureMessagesOptions): void;
|
|
697
|
+
declare function configureExpressionMessages({ locale, messages }: ConfigureMessagesOptions): void;
|
|
702
698
|
/**
|
|
703
699
|
* The active {@link ExpressionMessages} catalog (English by default).
|
|
704
700
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { InitInput } from "@gorules/zen-engine-wasm";
|
|
2
2
|
import { SchemaTree } from "@coldsmirk/caliper-core";
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* How an expression editor interprets its document:
|
|
6
5
|
*
|
|
@@ -695,10 +694,7 @@ interface ConfigureMessagesOptions {
|
|
|
695
694
|
* override, or both (overrides win). Idempotent and module-global, so a host
|
|
696
695
|
* configures it once (e.g. through `ExpressionConfigProvider`).
|
|
697
696
|
*/
|
|
698
|
-
declare function configureExpressionMessages({
|
|
699
|
-
locale,
|
|
700
|
-
messages
|
|
701
|
-
}: ConfigureMessagesOptions): void;
|
|
697
|
+
declare function configureExpressionMessages({ locale, messages }: ConfigureMessagesOptions): void;
|
|
702
698
|
/**
|
|
703
699
|
* The active {@link ExpressionMessages} catalog (English by default).
|
|
704
700
|
*/
|
package/dist/index.js
CHANGED
|
@@ -360,7 +360,7 @@ function isZenConsistentNumber(value) {
|
|
|
360
360
|
const SUBJECT_PATTERN = /^[A-Z_$][\w$]*(?:\.[A-Z_$][\w$]*|\[\d+\])*$/i;
|
|
361
361
|
const SUBJECT_IDENTIFIER_PATTERN = /[A-Z_$][\w$]*/gi;
|
|
362
362
|
const SUBJECT_INDEX_PATTERN = /\[(?<index>\d+)\]/g;
|
|
363
|
-
const ZEN_RESERVED_WORDS = new Set([
|
|
363
|
+
const ZEN_RESERVED_WORDS = /* @__PURE__ */ new Set([
|
|
364
364
|
"and",
|
|
365
365
|
"or",
|
|
366
366
|
"not",
|
|
@@ -369,7 +369,7 @@ const ZEN_RESERVED_WORDS = new Set([
|
|
|
369
369
|
"false",
|
|
370
370
|
"null"
|
|
371
371
|
]);
|
|
372
|
-
const ZEN_MEMBER_RESERVED_WORDS = new Set(["true", "false"]);
|
|
372
|
+
const ZEN_MEMBER_RESERVED_WORDS = /* @__PURE__ */ new Set(["true", "false"]);
|
|
373
373
|
function isZenReservedWord(word) {
|
|
374
374
|
return ZEN_RESERVED_WORDS.has(word);
|
|
375
375
|
}
|
|
@@ -652,13 +652,13 @@ function isConditionScalar(value) {
|
|
|
652
652
|
function isConditionScalarArray(value) {
|
|
653
653
|
return isArray(value) && value.every((item) => isConditionScalar(item));
|
|
654
654
|
}
|
|
655
|
-
const TWO_CHAR_PUNCTUATION = new Set([
|
|
655
|
+
const TWO_CHAR_PUNCTUATION = /* @__PURE__ */ new Set([
|
|
656
656
|
"==",
|
|
657
657
|
"!=",
|
|
658
658
|
"<=",
|
|
659
659
|
">="
|
|
660
660
|
]);
|
|
661
|
-
const ONE_CHAR_PUNCTUATION = new Set([
|
|
661
|
+
const ONE_CHAR_PUNCTUATION = /* @__PURE__ */ new Set([
|
|
662
662
|
"(",
|
|
663
663
|
")",
|
|
664
664
|
"[",
|
|
@@ -1161,7 +1161,7 @@ const zhCNMessages = {
|
|
|
1161
1161
|
expectedBoolean: (actualType) => `期望布尔测试表达式,实际类型为 \`${actualType}\`。`,
|
|
1162
1162
|
expectedType: (expectedType, actualType) => `期望 \`${expectedType}\`,实际为 \`${actualType}\`。`
|
|
1163
1163
|
};
|
|
1164
|
-
const localeRegistry = new Map([["en-US", enMessages], ["zh-CN", zhCNMessages]]);
|
|
1164
|
+
const localeRegistry = /* @__PURE__ */ new Map([["en-US", enMessages], ["zh-CN", zhCNMessages]]);
|
|
1165
1165
|
let activeBaseMessages = enMessages;
|
|
1166
1166
|
let activeMessages = enMessages;
|
|
1167
1167
|
const messageListeners = /* @__PURE__ */ new Set();
|
package/package.json
CHANGED