@tokens-studio/tokenscript-interpreter 0.36.4 → 0.37.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/chunk-2EEKBDOX.js +5308 -0
- package/dist/chunk-2EEKBDOX.js.map +1 -0
- package/dist/chunk-2NMUBWBX.js +5861 -0
- package/dist/chunk-2NMUBWBX.js.map +1 -0
- package/dist/chunk-2OHE65GL.js +5779 -0
- package/dist/chunk-2OHE65GL.js.map +1 -0
- package/dist/chunk-2PZR6BQ6.js +5773 -0
- package/dist/chunk-2PZR6BQ6.js.map +1 -0
- package/dist/chunk-2QDDLPUW.js +5858 -0
- package/dist/chunk-2QDDLPUW.js.map +1 -0
- package/dist/chunk-4DUQBXYY.js +5762 -0
- package/dist/chunk-4DUQBXYY.js.map +1 -0
- package/dist/chunk-4SLJE4IW.js +5322 -0
- package/dist/chunk-4SLJE4IW.js.map +1 -0
- package/dist/chunk-6ABZOYUP.js +5802 -0
- package/dist/chunk-6ABZOYUP.js.map +1 -0
- package/dist/chunk-6HQZVWXZ.js +5341 -0
- package/dist/chunk-6HQZVWXZ.js.map +1 -0
- package/dist/chunk-6UY773C4.js +5292 -0
- package/dist/chunk-6UY773C4.js.map +1 -0
- package/dist/chunk-75Z55XEZ.js +5681 -0
- package/dist/chunk-75Z55XEZ.js.map +1 -0
- package/dist/chunk-7IWYKR22.js +5778 -0
- package/dist/chunk-7IWYKR22.js.map +1 -0
- package/dist/chunk-AVZUAMNS.js +5757 -0
- package/dist/chunk-AVZUAMNS.js.map +1 -0
- package/dist/chunk-BL7GZSRR.js +5724 -0
- package/dist/chunk-BL7GZSRR.js.map +1 -0
- package/dist/chunk-BMZ5NY7J.js +93 -0
- package/dist/chunk-BMZ5NY7J.js.map +1 -0
- package/dist/{chunk-AXH5N7KV.js → chunk-BNLQ6GCU.js} +2 -6
- package/dist/chunk-BNLQ6GCU.js.map +1 -0
- package/dist/chunk-BSJBGMCX.js +93 -0
- package/dist/{chunk-RI2BWY7D.js.map → chunk-BSJBGMCX.js.map} +1 -1
- package/dist/chunk-BUJRELXW.js +5342 -0
- package/dist/chunk-BUJRELXW.js.map +1 -0
- package/dist/chunk-DCOIGXSK.js +5763 -0
- package/dist/chunk-DCOIGXSK.js.map +1 -0
- package/dist/chunk-DZDZDYPO.js +5654 -0
- package/dist/chunk-DZDZDYPO.js.map +1 -0
- package/dist/{chunk-OCQX3WYJ.js → chunk-GAE7SZLZ.js} +111 -8
- package/dist/chunk-GAE7SZLZ.js.map +1 -0
- package/dist/chunk-HFLLWRRV.js +5791 -0
- package/dist/chunk-HFLLWRRV.js.map +1 -0
- package/dist/{lib/chunk-AEOBCHBK.js → chunk-JL4UU4PY.js} +2 -9
- package/dist/chunk-JL4UU4PY.js.map +1 -0
- package/dist/{chunk-CKLFRLH7.js → chunk-JUGNHFDN.js} +220 -338
- package/dist/chunk-JUGNHFDN.js.map +1 -0
- package/dist/{chunk-RI2BWY7D.js → chunk-K2OUSWUX.js} +2 -3
- package/dist/chunk-K2OUSWUX.js.map +1 -0
- package/dist/chunk-KOLA6XR5.js +5770 -0
- package/dist/chunk-KOLA6XR5.js.map +1 -0
- package/dist/{chunk-3ZOUTFP5.js → chunk-L77CTMYP.js} +169 -296
- package/dist/chunk-L77CTMYP.js.map +1 -0
- package/dist/chunk-LIXBSHBJ.js +99 -0
- package/dist/chunk-LIXBSHBJ.js.map +1 -0
- package/dist/chunk-LM5SZQV5.js +5763 -0
- package/dist/chunk-LM5SZQV5.js.map +1 -0
- package/dist/chunk-M76AGXPG.js +5772 -0
- package/dist/chunk-M76AGXPG.js.map +1 -0
- package/dist/{chunk-QP7M6WUR.js → chunk-OV2GMYVM.js} +221 -341
- package/dist/chunk-OV2GMYVM.js.map +1 -0
- package/dist/{chunk-33CDF4L4.js → chunk-P4VLJQEI.js} +235 -838
- package/dist/chunk-P4VLJQEI.js.map +1 -0
- package/dist/chunk-QLSMLF5S.js +5302 -0
- package/dist/chunk-QLSMLF5S.js.map +1 -0
- package/dist/chunk-QYTZHMUN.js +5831 -0
- package/dist/chunk-QYTZHMUN.js.map +1 -0
- package/dist/chunk-SBM4WTQW.js +5771 -0
- package/dist/chunk-SBM4WTQW.js.map +1 -0
- package/dist/chunk-UAQCLV6Y.js +5816 -0
- package/dist/chunk-UAQCLV6Y.js.map +1 -0
- package/dist/chunk-YIZGWYGL.js +5300 -0
- package/dist/chunk-YIZGWYGL.js.map +1 -0
- package/dist/{chunk-LZTXD3LN.js → chunk-Z437BNC5.js} +10 -3
- package/dist/chunk-Z437BNC5.js.map +1 -0
- package/dist/cli.js +138 -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-Bb9I9K-y.d.ts +1005 -0
- package/dist/config-Be-GTPYh.d.ts +976 -0
- package/dist/config-BkIqJNxv.d.ts +1009 -0
- package/dist/config-Cp5BqDfR.d.ts +731 -0
- package/dist/config-D36YRJGj.d.ts +1007 -0
- package/dist/{config-CFhN7-6U.d.ts → config-DB5rZBMx.d.ts} +109 -17
- package/dist/config-DQj8LHMT.d.ts +995 -0
- package/dist/{config-Bsd6DPFy.d.ts → config-Mw_Iq324.d.ts} +3 -1
- package/dist/{config-DtbN3iyg.d.ts → config-P6Ivo_zY.d.ts} +105 -26
- package/dist/config-RCpZF46f.d.ts +960 -0
- package/dist/lib/{chunk-K65UI6KX.cjs → chunk-EMRAAGPR.cjs} +102 -100
- package/dist/lib/chunk-EMRAAGPR.cjs.map +1 -0
- package/dist/lib/{chunk-UF6I25ED.cjs → chunk-JQKYSUJJ.cjs} +685 -567
- package/dist/lib/chunk-JQKYSUJJ.cjs.map +1 -0
- package/dist/lib/{chunk-S7WGJBSX.js → chunk-MD2DETZV.js} +5 -3
- package/dist/lib/chunk-MD2DETZV.js.map +1 -0
- package/dist/lib/chunk-SLITBMFB.js +114 -0
- package/dist/lib/chunk-SLITBMFB.js.map +1 -0
- package/dist/lib/{chunk-2BDFE7U4.js → chunk-VXZQQBEA.js} +132 -15
- package/dist/lib/chunk-VXZQQBEA.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-ByrEtz7T.d.ts} +54 -4
- package/dist/lib/{interpreter-Cz_vWDDa.d.cts → interpreter-CG0Jw_k-.d.cts} +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-BZAWM2oN.d.ts} +2 -2
- package/dist/lib/{types-6QQt-XVS.d.cts → types-BhyJ6plH.d.cts} +2 -2
- package/dist/lib/{types-CxQPMHn1.d.ts → types-DA9_CC7p.d.cts} +3 -1
- package/dist/lib/{types-CxQPMHn1.d.cts → types-DA9_CC7p.d.ts} +3 -1
- 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/token-schemas.js +414 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-33CDF4L4.js.map +0 -1
- package/dist/chunk-3ZOUTFP5.js.map +0 -1
- package/dist/chunk-5S3H4SYX.js +0 -6460
- package/dist/chunk-5S3H4SYX.js.map +0 -1
- package/dist/chunk-AXH5N7KV.js.map +0 -1
- package/dist/chunk-CKLFRLH7.js.map +0 -1
- package/dist/chunk-GJIOYGP6.js +0 -6446
- package/dist/chunk-GJIOYGP6.js.map +0 -1
- package/dist/chunk-HHCPY4WI.js +0 -6456
- package/dist/chunk-HHCPY4WI.js.map +0 -1
- package/dist/chunk-LZTXD3LN.js.map +0 -1
- package/dist/chunk-MXKGYBE4.js +0 -6457
- package/dist/chunk-MXKGYBE4.js.map +0 -1
- package/dist/chunk-NGG6MBER.js +0 -6452
- package/dist/chunk-NGG6MBER.js.map +0 -1
- package/dist/chunk-OCQX3WYJ.js.map +0 -1
- package/dist/chunk-QP7M6WUR.js.map +0 -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,7 +1,7 @@
|
|
|
1
|
-
import { A as ASTNode, T as Token, O as Operations,
|
|
2
|
-
export { B as BaseSymbolType, a as BooleanSymbol, C as ColorManager, b as ColorSpecification, c as ColorSpecificationSchema, d as ColorSymbol, f as ConfigOptions, g as ConstantsSpecification, h as ConstantsSpecificationSchema, D as DEFAULT_LANGUAGE_OPTIONS, i as DictionarySymbol, F as FunctionSpecification, j as FunctionSpecificationSchema, k as FunctionsManager, I as ISymbolType, J as JsValue, L as LanguageOptions, l as ListSymbol, N as NullSymbol, m as NumberSymbol, n as NumberWithUnitSymbol, o as ReferenceRecordValue, p as ReservedKeyword, S as
|
|
3
|
-
import { A as AllErrorCodes, L as LanguageError, T as TolerantParseResult } from './interpreter-
|
|
4
|
-
export { C as ColorErrorCode, c as ColorErrorData, d as ConfigErrorCode, e as ConfigErrorData, E as ErrorOptions, F as FunctionsErrorCode, f as FunctionsErrorData, g as IncompleteInfo, h as IncompleteType, i as Interpreter, I as InterpreterError, j as InterpreterErrorCode, k as InterpreterErrorData, l as InterpreterResult, m as Lexer, a as LexerError, n as LexerErrorCode, o as LexerErrorData, O as OperationsErrorCode, p as OperationsErrorData,
|
|
1
|
+
import { A as ASTNode, T as Token, O as Operations, u as TokenType, R as ReferenceRecord, e as Config, K as ReferenceNode, M as BinOpNode, P as FunctionCallNode, Q as ImplicitListNode, V as ListNode, W as NoOpNode, X as NumNode, Y as StringNode, Z as UnaryOpNode } from './types-DA9_CC7p.js';
|
|
2
|
+
export { B as BaseSymbolType, a as BooleanSymbol, C as ColorManager, b as ColorSpecification, c as ColorSpecificationSchema, d as ColorSymbol, f as ConfigOptions, g as ConstantsSpecification, h as ConstantsSpecificationSchema, D as DEFAULT_LANGUAGE_OPTIONS, i as DictionarySymbol, F as FunctionSpecification, j as FunctionSpecificationSchema, k as FunctionsManager, I as ISymbolType, J as JsValue, L as LanguageOptions, l as ListSymbol, N as NullSymbol, m as NumberSymbol, n as NumberWithUnitSymbol, o as ReferenceRecordValue, p as ReservedKeyword, S as SCRIPT_ONLY_STATEMENT_KEYWORDS, q as StringSymbol, r as SupportedFormats, s as SymbolMetadata, t as TokenSymbol, U as UNINTERPRETED_KEYWORDS, v as UnitManager, w as UnitSpecification, x as UnitSpecificationSchema, y as collectReferenceNodes, z as filterAST, E as getResultTypeName, G as jsValueToSymbolType, H as walkAST } from './types-DA9_CC7p.js';
|
|
3
|
+
import { A as AllErrorCodes, L as LanguageError, q as ParseMode, T as TolerantParseResult } from './interpreter-ByrEtz7T.js';
|
|
4
|
+
export { C as ColorErrorCode, c as ColorErrorData, d as ConfigErrorCode, e as ConfigErrorData, E as ErrorOptions, F as FunctionsErrorCode, f as FunctionsErrorData, g as IncompleteInfo, h as IncompleteType, i as Interpreter, I as InterpreterError, j as InterpreterErrorCode, k as InterpreterErrorData, l as InterpreterResult, m as Lexer, a as LexerError, n as LexerErrorCode, o as LexerErrorData, O as OperationsErrorCode, p as OperationsErrorData, r as ParseState, s as Parser, b as ParserError, t as ParserErrorCode, u as ParserErrorData, P as ProcessorError, v as ProcessorErrorCode, w as ProcessorErrorData, S as SerializedError, x as SymbolsErrorCode, y as SymbolsErrorData, U as UnitErrorCode, z as UnitErrorData, B as isInterpreterError, D as isLanguageError, G as isLexerError, H as isParserError, J as isProcessorError, K as lexerOptionsForMode, M as parseExpression, N as serializeError } from './interpreter-ByrEtz7T.js';
|
|
5
5
|
import '@tokens-studio/schema-validation';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -116,7 +116,8 @@ declare function renameReferences(originalValue: string, ast: ASTNode, renameMap
|
|
|
116
116
|
interface EvalOptions {
|
|
117
117
|
references?: ReferenceRecord;
|
|
118
118
|
config?: Config;
|
|
119
|
-
|
|
119
|
+
/** Parsing mode. Defaults to `"script"`. */
|
|
120
|
+
mode?: ParseMode;
|
|
120
121
|
}
|
|
121
122
|
interface EvalSuccess {
|
|
122
123
|
success: true;
|
|
@@ -224,4 +225,4 @@ declare const ASTNodes: {
|
|
|
224
225
|
UnaryOpNode: typeof UnaryOpNode;
|
|
225
226
|
};
|
|
226
227
|
|
|
227
|
-
export { ASTNode, ASTNodes, AllErrorCodes, Config, type EvalError, type EvalOptions, type EvalResult, type EvalSuccess, LanguageError, Operations, PartialBinOpNode, PartialFunctionCallNode, PartialParenNode, PartialReferenceNode, PartialStringNode, PartialUnaryOpNode, type ReferenceInfo, ReferenceRecord, Token, TokenType, TolerantParseResult, collectAllReferences, evaluateExpression, getMessage, hasPartialNodes, parseTolerantly, renameReferences, tokenizeTolerantly };
|
|
228
|
+
export { ASTNode, ASTNodes, AllErrorCodes, Config, type EvalError, type EvalOptions, type EvalResult, type EvalSuccess, LanguageError, Operations, ParseMode, PartialBinOpNode, PartialFunctionCallNode, PartialParenNode, PartialReferenceNode, PartialStringNode, PartialUnaryOpNode, type ReferenceInfo, ReferenceRecord, Token, TokenType, TolerantParseResult, collectAllReferences, evaluateExpression, getMessage, hasPartialNodes, parseTolerantly, renameReferences, tokenizeTolerantly };
|
package/dist/lib/interpreter.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ASTNodes, ColorManager, ColorSpecificationSchema, Config, ConstantsSpecificationSchema, DEFAULT_LANGUAGE_OPTIONS, FunctionSpecificationSchema, FunctionsManager, IncompleteType, Interpreter, Lexer, ParseState, Parser, PartialBinOpNode, PartialFunctionCallNode, PartialParenNode, PartialReferenceNode, PartialStringNode, PartialUnaryOpNode, UnitManager, UnitSpecificationSchema, collectAllReferences, collectReferenceNodes, evaluateExpression, filterAST, hasPartialNodes, parseExpression, parseTolerantly, renameReferences, tokenizeTolerantly, walkAST } from './chunk-
|
|
2
|
-
export { BaseSymbolType, BooleanSymbol, ColorErrorCode, ColorSymbol, ConfigErrorCode, DictionarySymbol, FunctionsErrorCode, InterpreterError, InterpreterErrorCode, LanguageError, LexerError, LexerErrorCode, ListSymbol, NullSymbol, NumberSymbol, NumberWithUnitSymbol, OperationsErrorCode, ParserError, ParserErrorCode, ProcessorError, ProcessorErrorCode, StringSymbol, SymbolsErrorCode, TokenSymbol, UnitErrorCode, getMessage, getResultTypeName, isInterpreterError, isLanguageError, isLexerError, isParserError, isProcessorError, jsValueToSymbolType, serializeError } from './chunk-
|
|
3
|
-
export { Operations, ReservedKeyword, SupportedFormats, TokenType, UNINTERPRETED_KEYWORDS } from './chunk-
|
|
1
|
+
export { ASTNodes, ColorManager, ColorSpecificationSchema, Config, ConstantsSpecificationSchema, DEFAULT_LANGUAGE_OPTIONS, FunctionSpecificationSchema, FunctionsManager, IncompleteType, Interpreter, Lexer, ParseState, Parser, PartialBinOpNode, PartialFunctionCallNode, PartialParenNode, PartialReferenceNode, PartialStringNode, PartialUnaryOpNode, UnitManager, UnitSpecificationSchema, collectAllReferences, collectReferenceNodes, evaluateExpression, filterAST, hasPartialNodes, lexerOptionsForMode, parseExpression, parseTolerantly, renameReferences, tokenizeTolerantly, walkAST } from './chunk-VXZQQBEA.js';
|
|
2
|
+
export { BaseSymbolType, BooleanSymbol, ColorErrorCode, ColorSymbol, ConfigErrorCode, DictionarySymbol, FunctionsErrorCode, InterpreterError, InterpreterErrorCode, LanguageError, LexerError, LexerErrorCode, ListSymbol, NullSymbol, NumberSymbol, NumberWithUnitSymbol, OperationsErrorCode, ParserError, ParserErrorCode, ProcessorError, ProcessorErrorCode, StringSymbol, SymbolsErrorCode, TokenSymbol, UnitErrorCode, getMessage, getResultTypeName, isInterpreterError, isLanguageError, isLexerError, isParserError, isProcessorError, jsValueToSymbolType, serializeError } from './chunk-MD2DETZV.js';
|
|
3
|
+
export { Operations, ReservedKeyword, SCRIPT_ONLY_STATEMENT_KEYWORDS, SupportedFormats, TokenType, UNINTERPRETED_KEYWORDS } from './chunk-SLITBMFB.js';
|
|
4
4
|
//# sourceMappingURL=interpreter.js.map
|
|
5
5
|
//# sourceMappingURL=interpreter.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
var
|
|
3
|
+
var chunkJQKYSUJJ_cjs = require('./chunk-JQKYSUJJ.cjs');
|
|
4
|
+
require('./chunk-EMRAAGPR.cjs');
|
|
5
|
+
var chunkZMMIYWFF_cjs = require('./chunk-ZMMIYWFF.cjs');
|
|
6
6
|
var fs = require('fs/promises');
|
|
7
7
|
var path = require('path');
|
|
8
8
|
var yauzl = require('yauzl');
|
|
@@ -40,11 +40,11 @@ function parseJson(content, fileName) {
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
chunkZMMIYWFF_cjs.__name(parseJson, "parseJson");
|
|
44
44
|
function removeJsonExtension(fileName) {
|
|
45
45
|
return fileName.replace(/\.json$/i, "");
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
chunkZMMIYWFF_cjs.__name(removeJsonExtension, "removeJsonExtension");
|
|
48
48
|
async function loadZipToMemory(zipPath) {
|
|
49
49
|
return new Promise((resolve, reject) => {
|
|
50
50
|
const filesContent = {};
|
|
@@ -103,7 +103,7 @@ async function loadZipToMemory(zipPath) {
|
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
chunkZMMIYWFF_cjs.__name(loadZipToMemory, "loadZipToMemory");
|
|
107
107
|
function detectFileType(filePath, stats) {
|
|
108
108
|
if (stats.isDirectory()) {
|
|
109
109
|
return "DIRECTORY" /* DIRECTORY */;
|
|
@@ -113,7 +113,7 @@ function detectFileType(filePath, stats) {
|
|
|
113
113
|
if (ext === ".json") return "JSON" /* JSON */;
|
|
114
114
|
throw new Error(`Unsupported file type: ${ext}`);
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
chunkZMMIYWFF_cjs.__name(detectFileType, "detectFileType");
|
|
117
117
|
async function collectJsonFiles(filePath) {
|
|
118
118
|
const fileStats = await fs__default.default.stat(filePath);
|
|
119
119
|
const fileType = detectFileType(filePath, fileStats);
|
|
@@ -145,7 +145,7 @@ async function collectJsonFiles(filePath) {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
chunkZMMIYWFF_cjs.__name(collectJsonFiles, "collectJsonFiles");
|
|
149
149
|
|
|
150
150
|
// src/processor/utils/normalizer.ts
|
|
151
151
|
function normalizeJsonFiles(jsonFiles) {
|
|
@@ -165,7 +165,7 @@ function normalizeJsonFiles(jsonFiles) {
|
|
|
165
165
|
}
|
|
166
166
|
return jsonFiles;
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
chunkZMMIYWFF_cjs.__name(normalizeJsonFiles, "normalizeJsonFiles");
|
|
169
169
|
|
|
170
170
|
// src/processor/processFiles.ts
|
|
171
171
|
async function processTokensFromFiles({
|
|
@@ -175,16 +175,16 @@ async function processTokensFromFiles({
|
|
|
175
175
|
activeTheme,
|
|
176
176
|
builder
|
|
177
177
|
}) {
|
|
178
|
-
await
|
|
178
|
+
await chunkJQKYSUJJ_cjs.fetchAndRegisterSchemas(schemas ?? []);
|
|
179
179
|
const jsonFiles = await collectJsonFiles(inputPath);
|
|
180
180
|
const normalizedFiles = normalizeJsonFiles(jsonFiles);
|
|
181
|
-
return
|
|
181
|
+
return chunkJQKYSUJJ_cjs.processTokenSets(normalizedFiles, {
|
|
182
182
|
activeSets,
|
|
183
183
|
activeTheme,
|
|
184
184
|
builder
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
chunkZMMIYWFF_cjs.__name(processTokensFromFiles, "processTokensFromFiles");
|
|
188
188
|
|
|
189
189
|
exports.processTokensFromFiles = processTokensFromFiles;
|
|
190
190
|
//# sourceMappingURL=processor-node.cjs.map
|
|
@@ -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-BhyJ6plH.cjs';
|
|
2
|
+
import './interpreter-CG0Jw_k-.cjs';
|
|
3
|
+
import './types-DA9_CC7p.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-BZAWM2oN.js';
|
|
2
|
+
import './interpreter-ByrEtz7T.js';
|
|
3
|
+
import './types-DA9_CC7p.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-VXZQQBEA.js';
|
|
2
|
+
import './chunk-MD2DETZV.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 chunkJQKYSUJJ_cjs = require('./chunk-JQKYSUJJ.cjs');
|
|
4
|
+
require('./chunk-EMRAAGPR.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 chunkJQKYSUJJ_cjs.TokenResolver; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "ValidationSeverity", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkJQKYSUJJ_cjs.ValidationSeverity; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "buildTokens", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkJQKYSUJJ_cjs.buildTokens; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "builders", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkJQKYSUJJ_cjs.builders_exports; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "flattenChildrenMap", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkJQKYSUJJ_cjs.flattenChildrenMap; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "flattenChildrenObject", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkJQKYSUJJ_cjs.flattenChildrenObject; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "getAffectedTokens", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkJQKYSUJJ_cjs.getAffectedTokens; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "getBrokenReferences", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkJQKYSUJJ_cjs.getBrokenReferences; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "getModifiedDependants", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkJQKYSUJJ_cjs.getModifiedDependants; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "getRenamedReferences", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkJQKYSUJJ_cjs.getRenamedReferences; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "processTokenSets", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkJQKYSUJJ_cjs.processTokenSets; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "processTokens", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkJQKYSUJJ_cjs.processTokens; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "validateTokenName", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkJQKYSUJJ_cjs.validateTokenName; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "validateTokenPath", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkJQKYSUJJ_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-BhyJ6plH.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-BhyJ6plH.cjs';
|
|
3
|
+
import { l as InterpreterResult } from './interpreter-CG0Jw_k-.cjs';
|
|
4
|
+
import './types-DA9_CC7p.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-BZAWM2oN.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-BZAWM2oN.js';
|
|
3
|
+
import { l as InterpreterResult } from './interpreter-ByrEtz7T.js';
|
|
4
|
+
import './types-DA9_CC7p.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-VXZQQBEA.js';
|
|
2
|
+
import './chunk-MD2DETZV.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 chunkJQKYSUJJ_cjs = require('./chunk-JQKYSUJJ.cjs');
|
|
4
|
+
require('./chunk-EMRAAGPR.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 chunkJQKYSUJJ_cjs.fetchAndRegisterSchemas; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "fetchTokenScriptSchema", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkJQKYSUJJ_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-DA9_CC7p.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-DA9_CC7p.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-VXZQQBEA.js';
|
|
2
|
+
import './chunk-MD2DETZV.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 chunkEMRAAGPR_cjs = require('./chunk-EMRAAGPR.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
|
+
chunkEMRAAGPR_cjs.StringSymbol.type,
|
|
10
|
+
chunkEMRAAGPR_cjs.NumberSymbol.type,
|
|
11
|
+
chunkEMRAAGPR_cjs.NumberWithUnitSymbol.type,
|
|
12
|
+
chunkEMRAAGPR_cjs.ColorSymbol.type,
|
|
13
|
+
chunkEMRAAGPR_cjs.ListSymbol.type,
|
|
14
|
+
chunkEMRAAGPR_cjs.DictionarySymbol.type,
|
|
15
|
+
chunkEMRAAGPR_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-DA9_CC7p.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-DA9_CC7p.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-MD2DETZV.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-ByrEtz7T.js';
|
|
2
|
+
import { e as Config, I as ISymbolType, s as SymbolMetadata } from './types-DA9_CC7p.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* ObjectParser allows custom transformation of structured values into interpreter symbols.
|
|
@@ -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-CG0Jw_k-.cjs';
|
|
2
|
+
import { e as Config, I as ISymbolType, s as SymbolMetadata } from './types-DA9_CC7p.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* ObjectParser allows custom transformation of structured values into interpreter symbols.
|
|
@@ -1165,8 +1165,10 @@ interface ISymbolType {
|
|
|
1165
1165
|
getAttribute?(attributeName: string): ISymbolType | null;
|
|
1166
1166
|
setAttribute?(attributeName: string, value: ISymbolType, config?: Config): void;
|
|
1167
1167
|
}
|
|
1168
|
+
/** Reserved keywords that introduce statements — only valid in script mode, not inline mode. */
|
|
1169
|
+
declare const SCRIPT_ONLY_STATEMENT_KEYWORDS: ReadonlySet<string>;
|
|
1168
1170
|
declare const UNINTERPRETED_KEYWORDS: string[];
|
|
1169
1171
|
type ReferenceRecordValue = string | number | ISymbolType;
|
|
1170
1172
|
type ReferenceRecord = Record<string, ReferenceRecordValue | Array<ReferenceRecordValue>>;
|
|
1171
1173
|
|
|
1172
|
-
export { type ASTNode as A, BaseSymbolType as B, ColorManager as C, DEFAULT_LANGUAGE_OPTIONS as D,
|
|
1174
|
+
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 };
|
|
@@ -1165,8 +1165,10 @@ interface ISymbolType {
|
|
|
1165
1165
|
getAttribute?(attributeName: string): ISymbolType | null;
|
|
1166
1166
|
setAttribute?(attributeName: string, value: ISymbolType, config?: Config): void;
|
|
1167
1167
|
}
|
|
1168
|
+
/** Reserved keywords that introduce statements — only valid in script mode, not inline mode. */
|
|
1169
|
+
declare const SCRIPT_ONLY_STATEMENT_KEYWORDS: ReadonlySet<string>;
|
|
1168
1170
|
declare const UNINTERPRETED_KEYWORDS: string[];
|
|
1169
1171
|
type ReferenceRecordValue = string | number | ISymbolType;
|
|
1170
1172
|
type ReferenceRecord = Record<string, ReferenceRecordValue | Array<ReferenceRecordValue>>;
|
|
1171
1173
|
|
|
1172
|
-
export { type ASTNode as A, BaseSymbolType as B, ColorManager as C, DEFAULT_LANGUAGE_OPTIONS as D,
|
|
1174
|
+
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 };
|
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-DA9_CC7p.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-DA9_CC7p.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-Mw_Iq324.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-GAE7SZLZ.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) {
|