@tokens-studio/tokenscript-interpreter 0.36.4 → 0.37.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/chunk-3D6X7EAK.js +6605 -0
- package/dist/chunk-3D6X7EAK.js.map +1 -0
- package/dist/chunk-6KHDVYST.js +6616 -0
- package/dist/chunk-6KHDVYST.js.map +1 -0
- package/dist/chunk-6MXPTXGR.js +6591 -0
- package/dist/chunk-6MXPTXGR.js.map +1 -0
- package/dist/chunk-EM64RW7I.js +6592 -0
- package/dist/chunk-EM64RW7I.js.map +1 -0
- package/dist/chunk-H7YXFZ4I.js +6605 -0
- package/dist/chunk-H7YXFZ4I.js.map +1 -0
- package/dist/chunk-Z437BNC5.js +107 -0
- package/dist/chunk-Z437BNC5.js.map +1 -0
- package/dist/cli.js +149 -16
- package/dist/cli.js.map +1 -1
- package/dist/compliance-suite.js +3 -5
- package/dist/compliance-suite.js.map +1 -1
- package/dist/config-B-kbeoff.d.ts +927 -0
- package/dist/config-Mw_Iq324.d.ts +921 -0
- package/dist/lib/{chunk-S7WGJBSX.js → chunk-24FMHL6W.js} +16 -3
- package/dist/lib/chunk-24FMHL6W.js.map +1 -0
- package/dist/lib/{chunk-2BDFE7U4.js → chunk-4L54VFWU.js} +132 -15
- package/dist/lib/chunk-4L54VFWU.js.map +1 -0
- package/dist/lib/{chunk-UF6I25ED.cjs → chunk-KX5QZ5G2.cjs} +685 -567
- package/dist/lib/chunk-KX5QZ5G2.cjs.map +1 -0
- package/dist/lib/{chunk-K65UI6KX.cjs → chunk-OABJLZRZ.cjs} +113 -100
- package/dist/lib/chunk-OABJLZRZ.cjs.map +1 -0
- package/dist/lib/{chunk-AEOBCHBK.js → chunk-SLITBMFB.js} +10 -3
- package/dist/lib/chunk-SLITBMFB.js.map +1 -0
- package/dist/lib/{chunk-KHF2VXWO.cjs → chunk-ZMMIYWFF.cjs} +10 -2
- package/dist/lib/chunk-ZMMIYWFF.cjs.map +1 -0
- package/dist/lib/index.cjs +99 -91
- package/dist/lib/index.d.cts +4 -4
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +3 -3
- package/dist/lib/{interpreter-DdF_Hj-J.d.ts → interpreter-B7BcLEBz.d.cts} +54 -4
- package/dist/lib/{interpreter-Cz_vWDDa.d.cts → interpreter-wKto6JTb.d.ts} +54 -4
- package/dist/lib/interpreter.cjs +81 -73
- package/dist/lib/interpreter.d.cts +7 -6
- package/dist/lib/interpreter.d.ts +7 -6
- package/dist/lib/interpreter.js +3 -3
- package/dist/lib/processor-node.cjs +12 -12
- package/dist/lib/processor-node.d.cts +3 -3
- package/dist/lib/processor-node.d.ts +3 -3
- package/dist/lib/processor-node.js +3 -3
- package/dist/lib/processor.cjs +17 -17
- package/dist/lib/processor.d.cts +4 -4
- package/dist/lib/processor.d.ts +4 -4
- package/dist/lib/processor.js +3 -3
- package/dist/lib/schema.cjs +5 -5
- package/dist/lib/schema.d.cts +1 -1
- package/dist/lib/schema.d.ts +1 -1
- package/dist/lib/schema.js +3 -3
- package/dist/lib/syntax-highlighting.cjs +15 -15
- package/dist/lib/syntax-highlighting.d.cts +1 -1
- package/dist/lib/syntax-highlighting.d.ts +1 -1
- package/dist/lib/syntax-highlighting.js +2 -2
- package/dist/lib/{types-DRpZJjkx.d.ts → types-BHcQYEQ-.d.ts} +2 -2
- package/dist/lib/{types-CxQPMHn1.d.ts → types-BMYcHiSq.d.cts} +9 -1
- package/dist/lib/{types-CxQPMHn1.d.cts → types-BMYcHiSq.d.ts} +9 -1
- package/dist/lib/{types-6QQt-XVS.d.cts → types-BOyxzACN.d.cts} +2 -2
- package/dist/lib/types.cjs +10 -6
- package/dist/lib/types.d.cts +1 -1
- package/dist/lib/types.d.ts +1 -1
- package/dist/lib/types.js +1 -1
- package/dist/processor/index.d.ts +1 -1
- package/dist/processor/index.js +18 -2
- package/dist/processor/index.js.map +1 -1
- package/dist/repl.d.ts +15 -3
- package/dist/repl.js +6 -8
- package/dist/repl.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/package.json +1 -1
- package/dist/lib/chunk-2BDFE7U4.js.map +0 -1
- package/dist/lib/chunk-AEOBCHBK.js.map +0 -1
- package/dist/lib/chunk-K65UI6KX.cjs.map +0 -1
- package/dist/lib/chunk-KHF2VXWO.cjs.map +0 -1
- package/dist/lib/chunk-S7WGJBSX.js.map +0 -1
- package/dist/lib/chunk-UF6I25ED.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as ProcessFilesOptions, a as ProcessResult } from './types-
|
|
2
|
-
import './interpreter-
|
|
3
|
-
import './types-
|
|
1
|
+
import { P as ProcessFilesOptions, a as ProcessResult } from './types-BOyxzACN.cjs';
|
|
2
|
+
import './interpreter-B7BcLEBz.cjs';
|
|
3
|
+
import './types-BMYcHiSq.cjs';
|
|
4
4
|
import '@tokens-studio/schema-validation';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as ProcessFilesOptions, a as ProcessResult } from './types-
|
|
2
|
-
import './interpreter-
|
|
3
|
-
import './types-
|
|
1
|
+
import { P as ProcessFilesOptions, a as ProcessResult } from './types-BHcQYEQ-.js';
|
|
2
|
+
import './interpreter-wKto6JTb.js';
|
|
3
|
+
import './types-BMYcHiSq.js';
|
|
4
4
|
import '@tokens-studio/schema-validation';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { fetchAndRegisterSchemas, processTokenSets } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import { __name } from './chunk-
|
|
1
|
+
import { fetchAndRegisterSchemas, processTokenSets } from './chunk-4L54VFWU.js';
|
|
2
|
+
import './chunk-24FMHL6W.js';
|
|
3
|
+
import { __name } from './chunk-SLITBMFB.js';
|
|
4
4
|
import fs from 'fs/promises';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import * as yauzl from 'yauzl';
|
package/dist/lib/processor.cjs
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkKX5QZ5G2_cjs = require('./chunk-KX5QZ5G2.cjs');
|
|
4
|
+
require('./chunk-OABJLZRZ.cjs');
|
|
5
|
+
require('./chunk-ZMMIYWFF.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "TokenResolver", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkKX5QZ5G2_cjs.TokenResolver; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "ValidationSeverity", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkKX5QZ5G2_cjs.ValidationSeverity; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "buildTokens", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkKX5QZ5G2_cjs.buildTokens; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "builders", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkKX5QZ5G2_cjs.builders_exports; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "flattenChildrenMap", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkKX5QZ5G2_cjs.flattenChildrenMap; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "flattenChildrenObject", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkKX5QZ5G2_cjs.flattenChildrenObject; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "getAffectedTokens", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkKX5QZ5G2_cjs.getAffectedTokens; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "getBrokenReferences", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkKX5QZ5G2_cjs.getBrokenReferences; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "getModifiedDependants", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkKX5QZ5G2_cjs.getModifiedDependants; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "getRenamedReferences", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkKX5QZ5G2_cjs.getRenamedReferences; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "processTokenSets", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkKX5QZ5G2_cjs.processTokenSets; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "processTokens", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkKX5QZ5G2_cjs.processTokens; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "validateTokenName", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkKX5QZ5G2_cjs.validateTokenName; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "validateTokenPath", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkKX5QZ5G2_cjs.validateTokenPath; }
|
|
64
64
|
});
|
|
65
65
|
//# sourceMappingURL=processor.cjs.map
|
|
66
66
|
//# sourceMappingURL=processor.cjs.map
|
package/dist/lib/processor.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TokenBuilder, B as BuildTokensOptions, m as BuilderFormat, g as TokenDataMap, l as buildTokens, n as ProcessSetsOptions, a as ProcessResult, f as TokenData, o as ProcessOptions, h as TokenOperationResult, p as RefPath } from './types-
|
|
2
|
-
export { C as CreateTokenParams, b as CreateTokenResult, D as DeleteTokenParams, c as DeleteTokenResult, I as IssuesMap, d as ProcessorOutput, e as ProcessorResult, R as ResolveIssue, i as TokenResolver, U as UpdateTokenParams, j as UpdateTokenResult, V as ValidationIssue, k as ValidationSeverity } from './types-
|
|
3
|
-
import { l as InterpreterResult } from './interpreter-
|
|
4
|
-
import './types-
|
|
1
|
+
import { T as TokenBuilder, B as BuildTokensOptions, m as BuilderFormat, g as TokenDataMap, l as buildTokens, n as ProcessSetsOptions, a as ProcessResult, f as TokenData, o as ProcessOptions, h as TokenOperationResult, p as RefPath } from './types-BOyxzACN.cjs';
|
|
2
|
+
export { C as CreateTokenParams, b as CreateTokenResult, D as DeleteTokenParams, c as DeleteTokenResult, I as IssuesMap, d as ProcessorOutput, e as ProcessorResult, R as ResolveIssue, i as TokenResolver, U as UpdateTokenParams, j as UpdateTokenResult, V as ValidationIssue, k as ValidationSeverity } from './types-BOyxzACN.cjs';
|
|
3
|
+
import { l as InterpreterResult } from './interpreter-B7BcLEBz.cjs';
|
|
4
|
+
import './types-BMYcHiSq.cjs';
|
|
5
5
|
import '@tokens-studio/schema-validation';
|
|
6
6
|
|
|
7
7
|
type FlattenCallback<T> = (key: string, value: InterpreterResult) => T;
|
package/dist/lib/processor.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TokenBuilder, B as BuildTokensOptions, m as BuilderFormat, g as TokenDataMap, l as buildTokens, n as ProcessSetsOptions, a as ProcessResult, f as TokenData, o as ProcessOptions, h as TokenOperationResult, p as RefPath } from './types-
|
|
2
|
-
export { C as CreateTokenParams, b as CreateTokenResult, D as DeleteTokenParams, c as DeleteTokenResult, I as IssuesMap, d as ProcessorOutput, e as ProcessorResult, R as ResolveIssue, i as TokenResolver, U as UpdateTokenParams, j as UpdateTokenResult, V as ValidationIssue, k as ValidationSeverity } from './types-
|
|
3
|
-
import { l as InterpreterResult } from './interpreter-
|
|
4
|
-
import './types-
|
|
1
|
+
import { T as TokenBuilder, B as BuildTokensOptions, m as BuilderFormat, g as TokenDataMap, l as buildTokens, n as ProcessSetsOptions, a as ProcessResult, f as TokenData, o as ProcessOptions, h as TokenOperationResult, p as RefPath } from './types-BHcQYEQ-.js';
|
|
2
|
+
export { C as CreateTokenParams, b as CreateTokenResult, D as DeleteTokenParams, c as DeleteTokenResult, I as IssuesMap, d as ProcessorOutput, e as ProcessorResult, R as ResolveIssue, i as TokenResolver, U as UpdateTokenParams, j as UpdateTokenResult, V as ValidationIssue, k as ValidationSeverity } from './types-BHcQYEQ-.js';
|
|
3
|
+
import { l as InterpreterResult } from './interpreter-wKto6JTb.js';
|
|
4
|
+
import './types-BMYcHiSq.js';
|
|
5
5
|
import '@tokens-studio/schema-validation';
|
|
6
6
|
|
|
7
7
|
type FlattenCallback<T> = (key: string, value: InterpreterResult) => T;
|
package/dist/lib/processor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { TokenResolver, ValidationSeverity, buildTokens, builders_exports as builders, flattenChildrenMap, flattenChildrenObject, getAffectedTokens, getBrokenReferences, getModifiedDependants, getRenamedReferences, processTokenSets, processTokens, validateTokenName, validateTokenPath } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { TokenResolver, ValidationSeverity, buildTokens, builders_exports as builders, flattenChildrenMap, flattenChildrenObject, getAffectedTokens, getBrokenReferences, getModifiedDependants, getRenamedReferences, processTokenSets, processTokens, validateTokenName, validateTokenPath } from './chunk-4L54VFWU.js';
|
|
2
|
+
import './chunk-24FMHL6W.js';
|
|
3
|
+
import './chunk-SLITBMFB.js';
|
|
4
4
|
//# sourceMappingURL=processor.js.map
|
|
5
5
|
//# sourceMappingURL=processor.js.map
|
package/dist/lib/schema.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkKX5QZ5G2_cjs = require('./chunk-KX5QZ5G2.cjs');
|
|
4
|
+
require('./chunk-OABJLZRZ.cjs');
|
|
5
|
+
require('./chunk-ZMMIYWFF.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "fetchAndRegisterSchemas", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkKX5QZ5G2_cjs.fetchAndRegisterSchemas; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "fetchTokenScriptSchema", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkKX5QZ5G2_cjs.fetchTokenScriptSchema; }
|
|
16
16
|
});
|
|
17
17
|
//# sourceMappingURL=schema.cjs.map
|
|
18
18
|
//# sourceMappingURL=schema.cjs.map
|
package/dist/lib/schema.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ColorSpecification, F as FunctionSpecification, e as Config } from './types-
|
|
1
|
+
import { b as ColorSpecification, F as FunctionSpecification, e as Config } from './types-BMYcHiSq.cjs';
|
|
2
2
|
import '@tokens-studio/schema-validation';
|
|
3
3
|
|
|
4
4
|
interface TokenScriptSchemaResponse {
|
package/dist/lib/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ColorSpecification, F as FunctionSpecification, e as Config } from './types-
|
|
1
|
+
import { b as ColorSpecification, F as FunctionSpecification, e as Config } from './types-BMYcHiSq.js';
|
|
2
2
|
import '@tokens-studio/schema-validation';
|
|
3
3
|
|
|
4
4
|
interface TokenScriptSchemaResponse {
|
package/dist/lib/schema.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { fetchAndRegisterSchemas, fetchTokenScriptSchema } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { fetchAndRegisterSchemas, fetchTokenScriptSchema } from './chunk-4L54VFWU.js';
|
|
2
|
+
import './chunk-24FMHL6W.js';
|
|
3
|
+
import './chunk-SLITBMFB.js';
|
|
4
4
|
//# sourceMappingURL=schema.js.map
|
|
5
5
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkOABJLZRZ_cjs = require('./chunk-OABJLZRZ.cjs');
|
|
4
|
+
var chunkZMMIYWFF_cjs = require('./chunk-ZMMIYWFF.cjs');
|
|
5
5
|
|
|
6
6
|
// src/syntax-highlighter/spec.ts
|
|
7
|
-
var KEYWORDS = Object.values(
|
|
7
|
+
var KEYWORDS = Object.values(chunkZMMIYWFF_cjs.ReservedKeyword);
|
|
8
8
|
var TYPES = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
chunkOABJLZRZ_cjs.StringSymbol.type,
|
|
10
|
+
chunkOABJLZRZ_cjs.NumberSymbol.type,
|
|
11
|
+
chunkOABJLZRZ_cjs.NumberWithUnitSymbol.type,
|
|
12
|
+
chunkOABJLZRZ_cjs.ColorSymbol.type,
|
|
13
|
+
chunkOABJLZRZ_cjs.ListSymbol.type,
|
|
14
|
+
chunkOABJLZRZ_cjs.DictionarySymbol.type,
|
|
15
|
+
chunkOABJLZRZ_cjs.BooleanSymbol.type
|
|
16
16
|
];
|
|
17
17
|
var BUILTIN_FUNCTIONS = [
|
|
18
18
|
"rgb",
|
|
@@ -35,9 +35,9 @@ var BUILTIN_FUNCTIONS = [
|
|
|
35
35
|
"linear-gradient",
|
|
36
36
|
"type"
|
|
37
37
|
];
|
|
38
|
-
var UNITS = Object.values(
|
|
38
|
+
var UNITS = Object.values(chunkZMMIYWFF_cjs.SupportedFormats);
|
|
39
39
|
var OPERATORS = [
|
|
40
|
-
...Object.values(
|
|
40
|
+
...Object.values(chunkZMMIYWFF_cjs.Operations),
|
|
41
41
|
"=",
|
|
42
42
|
">",
|
|
43
43
|
"<",
|
|
@@ -91,12 +91,12 @@ var MONACO_PATTERNS = {
|
|
|
91
91
|
function createKeywordPattern(keywords) {
|
|
92
92
|
return new RegExp(`\\b(?:${keywords.join("|")})\\b`);
|
|
93
93
|
}
|
|
94
|
-
|
|
94
|
+
chunkZMMIYWFF_cjs.__name(createKeywordPattern, "createKeywordPattern");
|
|
95
95
|
function createUnitPattern(units) {
|
|
96
96
|
const escapedUnits = units.map((unit) => unit.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
97
97
|
return new RegExp(`\\b\\d+(?:\\.\\d+)?(?:${escapedUnits.join("|")})(?!\\w)`);
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
chunkZMMIYWFF_cjs.__name(createUnitPattern, "createUnitPattern");
|
|
100
100
|
|
|
101
101
|
// src/syntax-highlighter/monaco.ts
|
|
102
102
|
var tokenscriptLanguageDefinition = {
|
|
@@ -269,7 +269,7 @@ function tokenscriptLanguage(Prism) {
|
|
|
269
269
|
Prism.languages.ts = Prism.languages.tokenscript;
|
|
270
270
|
return Prism.languages.tokenscript;
|
|
271
271
|
}
|
|
272
|
-
|
|
272
|
+
chunkZMMIYWFF_cjs.__name(tokenscriptLanguage, "tokenscriptLanguage");
|
|
273
273
|
|
|
274
274
|
exports.BUILTIN_FUNCTIONS = BUILTIN_FUNCTIONS;
|
|
275
275
|
exports.KEYWORDS = KEYWORDS;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { languages } from 'monaco-editor';
|
|
2
|
-
import { p as ReservedKeyword, O as Operations,
|
|
2
|
+
import { p as ReservedKeyword, O as Operations, r as SupportedFormats } from './types-BMYcHiSq.cjs';
|
|
3
3
|
import '@tokens-studio/schema-validation';
|
|
4
4
|
|
|
5
5
|
declare const tokenscriptLanguageDefinition: languages.IMonarchLanguage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { languages } from 'monaco-editor';
|
|
2
|
-
import { p as ReservedKeyword, O as Operations,
|
|
2
|
+
import { p as ReservedKeyword, O as Operations, r as SupportedFormats } from './types-BMYcHiSq.js';
|
|
3
3
|
import '@tokens-studio/schema-validation';
|
|
4
4
|
|
|
5
5
|
declare const tokenscriptLanguageDefinition: languages.IMonarchLanguage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StringSymbol, NumberSymbol, NumberWithUnitSymbol, ColorSymbol, ListSymbol, DictionarySymbol, BooleanSymbol } from './chunk-
|
|
2
|
-
import { ReservedKeyword, SupportedFormats, Operations, __name } from './chunk-
|
|
1
|
+
import { StringSymbol, NumberSymbol, NumberWithUnitSymbol, ColorSymbol, ListSymbol, DictionarySymbol, BooleanSymbol } from './chunk-24FMHL6W.js';
|
|
2
|
+
import { ReservedKeyword, SupportedFormats, Operations, __name } from './chunk-SLITBMFB.js';
|
|
3
3
|
|
|
4
4
|
// src/syntax-highlighter/spec.ts
|
|
5
5
|
var KEYWORDS = Object.values(ReservedKeyword);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as InterpreterResult, L as LanguageError } from './interpreter-
|
|
2
|
-
import { e as Config, I as ISymbolType,
|
|
1
|
+
import { l as InterpreterResult, L as LanguageError } from './interpreter-wKto6JTb.js';
|
|
2
|
+
import { e as Config, I as ISymbolType, s as SymbolMetadata } from './types-BMYcHiSq.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* ObjectParser allows custom transformation of structured values into interpreter symbols.
|
|
@@ -268,6 +268,11 @@ declare class StringSymbol extends BaseSymbolType {
|
|
|
268
268
|
}[];
|
|
269
269
|
returnType: string;
|
|
270
270
|
};
|
|
271
|
+
trim: {
|
|
272
|
+
function: (this: StringSymbol) => StringSymbol;
|
|
273
|
+
args: never[];
|
|
274
|
+
returnType: string;
|
|
275
|
+
};
|
|
271
276
|
};
|
|
272
277
|
value: StringValue;
|
|
273
278
|
constructor(value: string | StringSymbol | null, config?: Config);
|
|
@@ -281,6 +286,7 @@ declare class StringSymbol extends BaseSymbolType {
|
|
|
281
286
|
length(): NumberSymbol;
|
|
282
287
|
concat(other: StringSymbol): StringSymbol;
|
|
283
288
|
split(delimiter?: StringSymbol): ListSymbol;
|
|
289
|
+
trim(): StringSymbol;
|
|
284
290
|
toJs(_options?: ToJsOptions): StringValue;
|
|
285
291
|
}
|
|
286
292
|
type BooleanValue = boolean | null;
|
|
@@ -1165,8 +1171,10 @@ interface ISymbolType {
|
|
|
1165
1171
|
getAttribute?(attributeName: string): ISymbolType | null;
|
|
1166
1172
|
setAttribute?(attributeName: string, value: ISymbolType, config?: Config): void;
|
|
1167
1173
|
}
|
|
1174
|
+
/** Reserved keywords that introduce statements — only valid in script mode, not inline mode. */
|
|
1175
|
+
declare const SCRIPT_ONLY_STATEMENT_KEYWORDS: ReadonlySet<string>;
|
|
1168
1176
|
declare const UNINTERPRETED_KEYWORDS: string[];
|
|
1169
1177
|
type ReferenceRecordValue = string | number | ISymbolType;
|
|
1170
1178
|
type ReferenceRecord = Record<string, ReferenceRecordValue | Array<ReferenceRecordValue>>;
|
|
1171
1179
|
|
|
1172
|
-
export { type ASTNode as A, BaseSymbolType as B, ColorManager as C, DEFAULT_LANGUAGE_OPTIONS as D,
|
|
1180
|
+
export { type ASTNode as A, BaseSymbolType as B, ColorManager as C, DEFAULT_LANGUAGE_OPTIONS as D, getResultTypeName as E, type FunctionSpecification as F, jsValueToSymbolType as G, walkAST as H, type ISymbolType as I, type JsValue as J, ReferenceNode as K, type LanguageOptions as L, BinOpNode as M, NullSymbol as N, Operations as O, FunctionCallNode as P, ImplicitListNode as Q, type ReferenceRecord as R, SCRIPT_ONLY_STATEMENT_KEYWORDS as S, type Token as T, UNINTERPRETED_KEYWORDS as U, ListNode as V, NoOpNode as W, NumNode as X, StringNode as Y, UnaryOpNode as Z, BooleanSymbol as a, type ColorSpecification as b, ColorSpecificationSchema as c, ColorSymbol as d, Config as e, type ConfigOptions as f, type ConstantsSpecification as g, ConstantsSpecificationSchema as h, DictionarySymbol as i, FunctionSpecificationSchema as j, FunctionsManager as k, ListSymbol as l, NumberSymbol as m, NumberWithUnitSymbol as n, type ReferenceRecordValue as o, ReservedKeyword as p, StringSymbol as q, SupportedFormats as r, type SymbolMetadata as s, TokenSymbol as t, TokenType as u, UnitManager as v, type UnitSpecification as w, UnitSpecificationSchema as x, collectReferenceNodes as y, filterAST as z };
|
|
@@ -268,6 +268,11 @@ declare class StringSymbol extends BaseSymbolType {
|
|
|
268
268
|
}[];
|
|
269
269
|
returnType: string;
|
|
270
270
|
};
|
|
271
|
+
trim: {
|
|
272
|
+
function: (this: StringSymbol) => StringSymbol;
|
|
273
|
+
args: never[];
|
|
274
|
+
returnType: string;
|
|
275
|
+
};
|
|
271
276
|
};
|
|
272
277
|
value: StringValue;
|
|
273
278
|
constructor(value: string | StringSymbol | null, config?: Config);
|
|
@@ -281,6 +286,7 @@ declare class StringSymbol extends BaseSymbolType {
|
|
|
281
286
|
length(): NumberSymbol;
|
|
282
287
|
concat(other: StringSymbol): StringSymbol;
|
|
283
288
|
split(delimiter?: StringSymbol): ListSymbol;
|
|
289
|
+
trim(): StringSymbol;
|
|
284
290
|
toJs(_options?: ToJsOptions): StringValue;
|
|
285
291
|
}
|
|
286
292
|
type BooleanValue = boolean | null;
|
|
@@ -1165,8 +1171,10 @@ interface ISymbolType {
|
|
|
1165
1171
|
getAttribute?(attributeName: string): ISymbolType | null;
|
|
1166
1172
|
setAttribute?(attributeName: string, value: ISymbolType, config?: Config): void;
|
|
1167
1173
|
}
|
|
1174
|
+
/** Reserved keywords that introduce statements — only valid in script mode, not inline mode. */
|
|
1175
|
+
declare const SCRIPT_ONLY_STATEMENT_KEYWORDS: ReadonlySet<string>;
|
|
1168
1176
|
declare const UNINTERPRETED_KEYWORDS: string[];
|
|
1169
1177
|
type ReferenceRecordValue = string | number | ISymbolType;
|
|
1170
1178
|
type ReferenceRecord = Record<string, ReferenceRecordValue | Array<ReferenceRecordValue>>;
|
|
1171
1179
|
|
|
1172
|
-
export { type ASTNode as A, BaseSymbolType as B, ColorManager as C, DEFAULT_LANGUAGE_OPTIONS as D,
|
|
1180
|
+
export { type ASTNode as A, BaseSymbolType as B, ColorManager as C, DEFAULT_LANGUAGE_OPTIONS as D, getResultTypeName as E, type FunctionSpecification as F, jsValueToSymbolType as G, walkAST as H, type ISymbolType as I, type JsValue as J, ReferenceNode as K, type LanguageOptions as L, BinOpNode as M, NullSymbol as N, Operations as O, FunctionCallNode as P, ImplicitListNode as Q, type ReferenceRecord as R, SCRIPT_ONLY_STATEMENT_KEYWORDS as S, type Token as T, UNINTERPRETED_KEYWORDS as U, ListNode as V, NoOpNode as W, NumNode as X, StringNode as Y, UnaryOpNode as Z, BooleanSymbol as a, type ColorSpecification as b, ColorSpecificationSchema as c, ColorSymbol as d, Config as e, type ConfigOptions as f, type ConstantsSpecification as g, ConstantsSpecificationSchema as h, DictionarySymbol as i, FunctionSpecificationSchema as j, FunctionsManager as k, ListSymbol as l, NumberSymbol as m, NumberWithUnitSymbol as n, type ReferenceRecordValue as o, ReservedKeyword as p, StringSymbol as q, SupportedFormats as r, type SymbolMetadata as s, TokenSymbol as t, TokenType as u, UnitManager as v, type UnitSpecification as w, UnitSpecificationSchema as x, collectReferenceNodes as y, filterAST as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as InterpreterResult, L as LanguageError } from './interpreter-
|
|
2
|
-
import { e as Config, I as ISymbolType,
|
|
1
|
+
import { l as InterpreterResult, L as LanguageError } from './interpreter-B7BcLEBz.cjs';
|
|
2
|
+
import { e as Config, I as ISymbolType, s as SymbolMetadata } from './types-BMYcHiSq.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* ObjectParser allows custom transformation of structured values into interpreter symbols.
|
package/dist/lib/types.cjs
CHANGED
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZMMIYWFF_cjs = require('./chunk-ZMMIYWFF.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Operations", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkZMMIYWFF_cjs.Operations; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "ReservedKeyword", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkZMMIYWFF_cjs.ReservedKeyword; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "SCRIPT_ONLY_STATEMENT_KEYWORDS", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkZMMIYWFF_cjs.SCRIPT_ONLY_STATEMENT_KEYWORDS; }
|
|
14
18
|
});
|
|
15
19
|
Object.defineProperty(exports, "SupportedFormats", {
|
|
16
20
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkZMMIYWFF_cjs.SupportedFormats; }
|
|
18
22
|
});
|
|
19
23
|
Object.defineProperty(exports, "TokenType", {
|
|
20
24
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkZMMIYWFF_cjs.TokenType; }
|
|
22
26
|
});
|
|
23
27
|
Object.defineProperty(exports, "UNINTERPRETED_KEYWORDS", {
|
|
24
28
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkZMMIYWFF_cjs.UNINTERPRETED_KEYWORDS; }
|
|
26
30
|
});
|
|
27
31
|
//# sourceMappingURL=types.cjs.map
|
|
28
32
|
//# sourceMappingURL=types.cjs.map
|
package/dist/lib/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ASTNode, I as ISymbolType, O as Operations, R as ReferenceRecord, o as ReferenceRecordValue, p as ReservedKeyword,
|
|
1
|
+
export { A as ASTNode, I as ISymbolType, O as Operations, R as ReferenceRecord, o as ReferenceRecordValue, p as ReservedKeyword, S as SCRIPT_ONLY_STATEMENT_KEYWORDS, r as SupportedFormats, s as SymbolMetadata, T as Token, u as TokenType, U as UNINTERPRETED_KEYWORDS } from './types-BMYcHiSq.cjs';
|
|
2
2
|
import '@tokens-studio/schema-validation';
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ASTNode, I as ISymbolType, O as Operations, R as ReferenceRecord, o as ReferenceRecordValue, p as ReservedKeyword,
|
|
1
|
+
export { A as ASTNode, I as ISymbolType, O as Operations, R as ReferenceRecord, o as ReferenceRecordValue, p as ReservedKeyword, S as SCRIPT_ONLY_STATEMENT_KEYWORDS, r as SupportedFormats, s as SymbolMetadata, T as Token, u as TokenType, U as UNINTERPRETED_KEYWORDS } from './types-BMYcHiSq.js';
|
|
2
2
|
import '@tokens-studio/schema-validation';
|
package/dist/lib/types.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Operations, ReservedKeyword, SupportedFormats, TokenType, UNINTERPRETED_KEYWORDS } from './chunk-
|
|
1
|
+
export { Operations, ReservedKeyword, SCRIPT_ONLY_STATEMENT_KEYWORDS, SupportedFormats, TokenType, UNINTERPRETED_KEYWORDS } from './chunk-SLITBMFB.js';
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
3
3
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as ISymbolType, C as Config, T as Token, S as SymbolMetadata } from '../config-
|
|
1
|
+
import { I as ISymbolType, C as Config, T as Token, S as SymbolMetadata } from '../config-B-kbeoff.js';
|
|
2
2
|
import '@tokens-studio/schema-validation';
|
|
3
3
|
|
|
4
4
|
type InterpreterResult = ISymbolType | string | null;
|
package/dist/processor/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NumberWithUnitSymbol, isLanguageError, ProcessorError, isObject, isNumber, isString, renameReferences, parseExpression, DictionarySymbol, serializeInterpreterResult, stringifyInterpreterResult, StringSymbol, NumberSymbol, isBoolean, BooleanSymbol, isNull, NullSymbol, isArray, TokenSymbol, ListSymbol, isTokenscriptSymbol, Interpreter, jsValueToSymbolType, getKeyAlt } from '../chunk-
|
|
2
|
-
import { UNINTERPRETED_KEYWORDS } from '../chunk-
|
|
1
|
+
import { NumberWithUnitSymbol, isLanguageError, ProcessorError, isObject, isNumber, isString, renameReferences, parseExpression, DictionarySymbol, serializeInterpreterResult, stringifyInterpreterResult, ParserError, StringSymbol, NumberSymbol, isBoolean, BooleanSymbol, isNull, NullSymbol, isArray, TokenSymbol, ListSymbol, isTokenscriptSymbol, Interpreter, jsValueToSymbolType, getKeyAlt } from '../chunk-6KHDVYST.js';
|
|
2
|
+
import { SCRIPT_ONLY_STATEMENT_KEYWORDS, UNINTERPRETED_KEYWORDS } from '../chunk-Z437BNC5.js';
|
|
3
3
|
import { z } from '@tokens-studio/schema-validation';
|
|
4
4
|
|
|
5
5
|
// src/processor/resolver/DependencyTracker.ts
|
|
@@ -1221,6 +1221,22 @@ var PrefixResolver = class _PrefixResolver {
|
|
|
1221
1221
|
this.earlyResolved.push(tokenName);
|
|
1222
1222
|
}
|
|
1223
1223
|
tryParseExpression(refPath, value) {
|
|
1224
|
+
try {
|
|
1225
|
+
return parseExpression(value, { mode: "inline" });
|
|
1226
|
+
} catch (error) {
|
|
1227
|
+
const isStatementSyntax = error instanceof ParserError && (error.code === "PARSER_UNALLOWED_INLINE_SYNTAX" /* UNALLOWED_INLINE_SYNTAX */ || error.code === "PARSER_UNEXPECTED_TOKEN" /* UNEXPECTED_TOKEN */ && SCRIPT_ONLY_STATEMENT_KEYWORDS.has(error.data?.token));
|
|
1228
|
+
if (isStatementSyntax) ; else if (isLanguageError(error)) {
|
|
1229
|
+
return this.resolveError(refPath, error, value);
|
|
1230
|
+
} else {
|
|
1231
|
+
return this.resolveError(
|
|
1232
|
+
refPath,
|
|
1233
|
+
new ProcessorError("PROC_UNKNOWN_PARSING_ERROR" /* UNKNOWN_PARSING_ERROR */, {
|
|
1234
|
+
data: { error: error instanceof Error ? error.message : String(error) }
|
|
1235
|
+
}),
|
|
1236
|
+
value
|
|
1237
|
+
);
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1224
1240
|
try {
|
|
1225
1241
|
return parseExpression(value);
|
|
1226
1242
|
} catch (error) {
|