@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.
Files changed (79) hide show
  1. package/dist/chunk-3D6X7EAK.js +6605 -0
  2. package/dist/chunk-3D6X7EAK.js.map +1 -0
  3. package/dist/chunk-6KHDVYST.js +6616 -0
  4. package/dist/chunk-6KHDVYST.js.map +1 -0
  5. package/dist/chunk-6MXPTXGR.js +6591 -0
  6. package/dist/chunk-6MXPTXGR.js.map +1 -0
  7. package/dist/chunk-EM64RW7I.js +6592 -0
  8. package/dist/chunk-EM64RW7I.js.map +1 -0
  9. package/dist/chunk-H7YXFZ4I.js +6605 -0
  10. package/dist/chunk-H7YXFZ4I.js.map +1 -0
  11. package/dist/chunk-Z437BNC5.js +107 -0
  12. package/dist/chunk-Z437BNC5.js.map +1 -0
  13. package/dist/cli.js +149 -16
  14. package/dist/cli.js.map +1 -1
  15. package/dist/compliance-suite.js +3 -5
  16. package/dist/compliance-suite.js.map +1 -1
  17. package/dist/config-B-kbeoff.d.ts +927 -0
  18. package/dist/config-Mw_Iq324.d.ts +921 -0
  19. package/dist/lib/{chunk-S7WGJBSX.js → chunk-24FMHL6W.js} +16 -3
  20. package/dist/lib/chunk-24FMHL6W.js.map +1 -0
  21. package/dist/lib/{chunk-2BDFE7U4.js → chunk-4L54VFWU.js} +132 -15
  22. package/dist/lib/chunk-4L54VFWU.js.map +1 -0
  23. package/dist/lib/{chunk-UF6I25ED.cjs → chunk-KX5QZ5G2.cjs} +685 -567
  24. package/dist/lib/chunk-KX5QZ5G2.cjs.map +1 -0
  25. package/dist/lib/{chunk-K65UI6KX.cjs → chunk-OABJLZRZ.cjs} +113 -100
  26. package/dist/lib/chunk-OABJLZRZ.cjs.map +1 -0
  27. package/dist/lib/{chunk-AEOBCHBK.js → chunk-SLITBMFB.js} +10 -3
  28. package/dist/lib/chunk-SLITBMFB.js.map +1 -0
  29. package/dist/lib/{chunk-KHF2VXWO.cjs → chunk-ZMMIYWFF.cjs} +10 -2
  30. package/dist/lib/chunk-ZMMIYWFF.cjs.map +1 -0
  31. package/dist/lib/index.cjs +99 -91
  32. package/dist/lib/index.d.cts +4 -4
  33. package/dist/lib/index.d.ts +4 -4
  34. package/dist/lib/index.js +3 -3
  35. package/dist/lib/{interpreter-DdF_Hj-J.d.ts → interpreter-B7BcLEBz.d.cts} +54 -4
  36. package/dist/lib/{interpreter-Cz_vWDDa.d.cts → interpreter-wKto6JTb.d.ts} +54 -4
  37. package/dist/lib/interpreter.cjs +81 -73
  38. package/dist/lib/interpreter.d.cts +7 -6
  39. package/dist/lib/interpreter.d.ts +7 -6
  40. package/dist/lib/interpreter.js +3 -3
  41. package/dist/lib/processor-node.cjs +12 -12
  42. package/dist/lib/processor-node.d.cts +3 -3
  43. package/dist/lib/processor-node.d.ts +3 -3
  44. package/dist/lib/processor-node.js +3 -3
  45. package/dist/lib/processor.cjs +17 -17
  46. package/dist/lib/processor.d.cts +4 -4
  47. package/dist/lib/processor.d.ts +4 -4
  48. package/dist/lib/processor.js +3 -3
  49. package/dist/lib/schema.cjs +5 -5
  50. package/dist/lib/schema.d.cts +1 -1
  51. package/dist/lib/schema.d.ts +1 -1
  52. package/dist/lib/schema.js +3 -3
  53. package/dist/lib/syntax-highlighting.cjs +15 -15
  54. package/dist/lib/syntax-highlighting.d.cts +1 -1
  55. package/dist/lib/syntax-highlighting.d.ts +1 -1
  56. package/dist/lib/syntax-highlighting.js +2 -2
  57. package/dist/lib/{types-DRpZJjkx.d.ts → types-BHcQYEQ-.d.ts} +2 -2
  58. package/dist/lib/{types-CxQPMHn1.d.ts → types-BMYcHiSq.d.cts} +9 -1
  59. package/dist/lib/{types-CxQPMHn1.d.cts → types-BMYcHiSq.d.ts} +9 -1
  60. package/dist/lib/{types-6QQt-XVS.d.cts → types-BOyxzACN.d.cts} +2 -2
  61. package/dist/lib/types.cjs +10 -6
  62. package/dist/lib/types.d.cts +1 -1
  63. package/dist/lib/types.d.ts +1 -1
  64. package/dist/lib/types.js +1 -1
  65. package/dist/processor/index.d.ts +1 -1
  66. package/dist/processor/index.js +18 -2
  67. package/dist/processor/index.js.map +1 -1
  68. package/dist/repl.d.ts +15 -3
  69. package/dist/repl.js +6 -8
  70. package/dist/repl.js.map +1 -1
  71. package/dist/types.d.ts +1 -1
  72. package/dist/types.js +1 -1
  73. package/package.json +1 -1
  74. package/dist/lib/chunk-2BDFE7U4.js.map +0 -1
  75. package/dist/lib/chunk-AEOBCHBK.js.map +0 -1
  76. package/dist/lib/chunk-K65UI6KX.cjs.map +0 -1
  77. package/dist/lib/chunk-KHF2VXWO.cjs.map +0 -1
  78. package/dist/lib/chunk-S7WGJBSX.js.map +0 -1
  79. package/dist/lib/chunk-UF6I25ED.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
- import { P as ProcessFilesOptions, a as ProcessResult } from './types-6QQt-XVS.cjs';
2
- import './interpreter-Cz_vWDDa.cjs';
3
- import './types-CxQPMHn1.cjs';
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-DRpZJjkx.js';
2
- import './interpreter-DdF_Hj-J.js';
3
- import './types-CxQPMHn1.js';
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-2BDFE7U4.js';
2
- import './chunk-S7WGJBSX.js';
3
- import { __name } from './chunk-AEOBCHBK.js';
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';
@@ -1,66 +1,66 @@
1
1
  'use strict';
2
2
 
3
- var chunkUF6I25ED_cjs = require('./chunk-UF6I25ED.cjs');
4
- require('./chunk-K65UI6KX.cjs');
5
- require('./chunk-KHF2VXWO.cjs');
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 chunkUF6I25ED_cjs.TokenResolver; }
11
+ get: function () { return chunkKX5QZ5G2_cjs.TokenResolver; }
12
12
  });
13
13
  Object.defineProperty(exports, "ValidationSeverity", {
14
14
  enumerable: true,
15
- get: function () { return chunkUF6I25ED_cjs.ValidationSeverity; }
15
+ get: function () { return chunkKX5QZ5G2_cjs.ValidationSeverity; }
16
16
  });
17
17
  Object.defineProperty(exports, "buildTokens", {
18
18
  enumerable: true,
19
- get: function () { return chunkUF6I25ED_cjs.buildTokens; }
19
+ get: function () { return chunkKX5QZ5G2_cjs.buildTokens; }
20
20
  });
21
21
  Object.defineProperty(exports, "builders", {
22
22
  enumerable: true,
23
- get: function () { return chunkUF6I25ED_cjs.builders_exports; }
23
+ get: function () { return chunkKX5QZ5G2_cjs.builders_exports; }
24
24
  });
25
25
  Object.defineProperty(exports, "flattenChildrenMap", {
26
26
  enumerable: true,
27
- get: function () { return chunkUF6I25ED_cjs.flattenChildrenMap; }
27
+ get: function () { return chunkKX5QZ5G2_cjs.flattenChildrenMap; }
28
28
  });
29
29
  Object.defineProperty(exports, "flattenChildrenObject", {
30
30
  enumerable: true,
31
- get: function () { return chunkUF6I25ED_cjs.flattenChildrenObject; }
31
+ get: function () { return chunkKX5QZ5G2_cjs.flattenChildrenObject; }
32
32
  });
33
33
  Object.defineProperty(exports, "getAffectedTokens", {
34
34
  enumerable: true,
35
- get: function () { return chunkUF6I25ED_cjs.getAffectedTokens; }
35
+ get: function () { return chunkKX5QZ5G2_cjs.getAffectedTokens; }
36
36
  });
37
37
  Object.defineProperty(exports, "getBrokenReferences", {
38
38
  enumerable: true,
39
- get: function () { return chunkUF6I25ED_cjs.getBrokenReferences; }
39
+ get: function () { return chunkKX5QZ5G2_cjs.getBrokenReferences; }
40
40
  });
41
41
  Object.defineProperty(exports, "getModifiedDependants", {
42
42
  enumerable: true,
43
- get: function () { return chunkUF6I25ED_cjs.getModifiedDependants; }
43
+ get: function () { return chunkKX5QZ5G2_cjs.getModifiedDependants; }
44
44
  });
45
45
  Object.defineProperty(exports, "getRenamedReferences", {
46
46
  enumerable: true,
47
- get: function () { return chunkUF6I25ED_cjs.getRenamedReferences; }
47
+ get: function () { return chunkKX5QZ5G2_cjs.getRenamedReferences; }
48
48
  });
49
49
  Object.defineProperty(exports, "processTokenSets", {
50
50
  enumerable: true,
51
- get: function () { return chunkUF6I25ED_cjs.processTokenSets; }
51
+ get: function () { return chunkKX5QZ5G2_cjs.processTokenSets; }
52
52
  });
53
53
  Object.defineProperty(exports, "processTokens", {
54
54
  enumerable: true,
55
- get: function () { return chunkUF6I25ED_cjs.processTokens; }
55
+ get: function () { return chunkKX5QZ5G2_cjs.processTokens; }
56
56
  });
57
57
  Object.defineProperty(exports, "validateTokenName", {
58
58
  enumerable: true,
59
- get: function () { return chunkUF6I25ED_cjs.validateTokenName; }
59
+ get: function () { return chunkKX5QZ5G2_cjs.validateTokenName; }
60
60
  });
61
61
  Object.defineProperty(exports, "validateTokenPath", {
62
62
  enumerable: true,
63
- get: function () { return chunkUF6I25ED_cjs.validateTokenPath; }
63
+ get: function () { return chunkKX5QZ5G2_cjs.validateTokenPath; }
64
64
  });
65
65
  //# sourceMappingURL=processor.cjs.map
66
66
  //# sourceMappingURL=processor.cjs.map
@@ -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-6QQt-XVS.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-6QQt-XVS.cjs';
3
- import { l as InterpreterResult } from './interpreter-Cz_vWDDa.cjs';
4
- import './types-CxQPMHn1.cjs';
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;
@@ -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-DRpZJjkx.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-DRpZJjkx.js';
3
- import { l as InterpreterResult } from './interpreter-DdF_Hj-J.js';
4
- import './types-CxQPMHn1.js';
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;
@@ -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-2BDFE7U4.js';
2
- import './chunk-S7WGJBSX.js';
3
- import './chunk-AEOBCHBK.js';
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
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkUF6I25ED_cjs = require('./chunk-UF6I25ED.cjs');
4
- require('./chunk-K65UI6KX.cjs');
5
- require('./chunk-KHF2VXWO.cjs');
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 chunkUF6I25ED_cjs.fetchAndRegisterSchemas; }
11
+ get: function () { return chunkKX5QZ5G2_cjs.fetchAndRegisterSchemas; }
12
12
  });
13
13
  Object.defineProperty(exports, "fetchTokenScriptSchema", {
14
14
  enumerable: true,
15
- get: function () { return chunkUF6I25ED_cjs.fetchTokenScriptSchema; }
15
+ get: function () { return chunkKX5QZ5G2_cjs.fetchTokenScriptSchema; }
16
16
  });
17
17
  //# sourceMappingURL=schema.cjs.map
18
18
  //# sourceMappingURL=schema.cjs.map
@@ -1,4 +1,4 @@
1
- import { b as ColorSpecification, F as FunctionSpecification, e as Config } from './types-CxQPMHn1.cjs';
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 {
@@ -1,4 +1,4 @@
1
- import { b as ColorSpecification, F as FunctionSpecification, e as Config } from './types-CxQPMHn1.js';
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 {
@@ -1,5 +1,5 @@
1
- export { fetchAndRegisterSchemas, fetchTokenScriptSchema } from './chunk-2BDFE7U4.js';
2
- import './chunk-S7WGJBSX.js';
3
- import './chunk-AEOBCHBK.js';
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 chunkK65UI6KX_cjs = require('./chunk-K65UI6KX.cjs');
4
- var chunkKHF2VXWO_cjs = require('./chunk-KHF2VXWO.cjs');
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(chunkKHF2VXWO_cjs.ReservedKeyword);
7
+ var KEYWORDS = Object.values(chunkZMMIYWFF_cjs.ReservedKeyword);
8
8
  var TYPES = [
9
- chunkK65UI6KX_cjs.StringSymbol.type,
10
- chunkK65UI6KX_cjs.NumberSymbol.type,
11
- chunkK65UI6KX_cjs.NumberWithUnitSymbol.type,
12
- chunkK65UI6KX_cjs.ColorSymbol.type,
13
- chunkK65UI6KX_cjs.ListSymbol.type,
14
- chunkK65UI6KX_cjs.DictionarySymbol.type,
15
- chunkK65UI6KX_cjs.BooleanSymbol.type
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(chunkKHF2VXWO_cjs.SupportedFormats);
38
+ var UNITS = Object.values(chunkZMMIYWFF_cjs.SupportedFormats);
39
39
  var OPERATORS = [
40
- ...Object.values(chunkKHF2VXWO_cjs.Operations),
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
- chunkKHF2VXWO_cjs.__name(createKeywordPattern, "createKeywordPattern");
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
- chunkKHF2VXWO_cjs.__name(createUnitPattern, "createUnitPattern");
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
- chunkKHF2VXWO_cjs.__name(tokenscriptLanguage, "tokenscriptLanguage");
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, q as SupportedFormats } from './types-CxQPMHn1.cjs';
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, q as SupportedFormats } from './types-CxQPMHn1.js';
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-S7WGJBSX.js';
2
- import { ReservedKeyword, SupportedFormats, Operations, __name } from './chunk-AEOBCHBK.js';
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-DdF_Hj-J.js';
2
- import { e as Config, I as ISymbolType, r as SymbolMetadata } from './types-CxQPMHn1.js';
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, jsValueToSymbolType as E, type FunctionSpecification as F, walkAST as G, ReferenceNode as H, type ISymbolType as I, type JsValue as J, BinOpNode as K, type LanguageOptions as L, FunctionCallNode as M, NullSymbol as N, Operations as O, ImplicitListNode as P, ListNode as Q, type ReferenceRecord as R, StringSymbol as S, type Token as T, UNINTERPRETED_KEYWORDS as U, NoOpNode as V, NumNode as W, StringNode as X, UnaryOpNode as Y, 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, SupportedFormats as q, type SymbolMetadata as r, TokenSymbol as s, TokenType as t, UnitManager as u, type UnitSpecification as v, UnitSpecificationSchema as w, collectReferenceNodes as x, filterAST as y, getResultTypeName as z };
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, jsValueToSymbolType as E, type FunctionSpecification as F, walkAST as G, ReferenceNode as H, type ISymbolType as I, type JsValue as J, BinOpNode as K, type LanguageOptions as L, FunctionCallNode as M, NullSymbol as N, Operations as O, ImplicitListNode as P, ListNode as Q, type ReferenceRecord as R, StringSymbol as S, type Token as T, UNINTERPRETED_KEYWORDS as U, NoOpNode as V, NumNode as W, StringNode as X, UnaryOpNode as Y, 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, SupportedFormats as q, type SymbolMetadata as r, TokenSymbol as s, TokenType as t, UnitManager as u, type UnitSpecification as v, UnitSpecificationSchema as w, collectReferenceNodes as x, filterAST as y, getResultTypeName as z };
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-Cz_vWDDa.cjs';
2
- import { e as Config, I as ISymbolType, r as SymbolMetadata } from './types-CxQPMHn1.cjs';
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.
@@ -1,28 +1,32 @@
1
1
  'use strict';
2
2
 
3
- var chunkKHF2VXWO_cjs = require('./chunk-KHF2VXWO.cjs');
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 chunkKHF2VXWO_cjs.Operations; }
9
+ get: function () { return chunkZMMIYWFF_cjs.Operations; }
10
10
  });
11
11
  Object.defineProperty(exports, "ReservedKeyword", {
12
12
  enumerable: true,
13
- get: function () { return chunkKHF2VXWO_cjs.ReservedKeyword; }
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 chunkKHF2VXWO_cjs.SupportedFormats; }
21
+ get: function () { return chunkZMMIYWFF_cjs.SupportedFormats; }
18
22
  });
19
23
  Object.defineProperty(exports, "TokenType", {
20
24
  enumerable: true,
21
- get: function () { return chunkKHF2VXWO_cjs.TokenType; }
25
+ get: function () { return chunkZMMIYWFF_cjs.TokenType; }
22
26
  });
23
27
  Object.defineProperty(exports, "UNINTERPRETED_KEYWORDS", {
24
28
  enumerable: true,
25
- get: function () { return chunkKHF2VXWO_cjs.UNINTERPRETED_KEYWORDS; }
29
+ get: function () { return chunkZMMIYWFF_cjs.UNINTERPRETED_KEYWORDS; }
26
30
  });
27
31
  //# sourceMappingURL=types.cjs.map
28
32
  //# sourceMappingURL=types.cjs.map
@@ -1,2 +1,2 @@
1
- export { A as ASTNode, I as ISymbolType, O as Operations, R as ReferenceRecord, o as ReferenceRecordValue, p as ReservedKeyword, q as SupportedFormats, r as SymbolMetadata, T as Token, t as TokenType, U as UNINTERPRETED_KEYWORDS } from './types-CxQPMHn1.cjs';
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';
@@ -1,2 +1,2 @@
1
- export { A as ASTNode, I as ISymbolType, O as Operations, R as ReferenceRecord, o as ReferenceRecordValue, p as ReservedKeyword, q as SupportedFormats, r as SymbolMetadata, T as Token, t as TokenType, U as UNINTERPRETED_KEYWORDS } from './types-CxQPMHn1.js';
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-AEOBCHBK.js';
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-Bsd6DPFy.js';
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;
@@ -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-OCQX3WYJ.js';
2
- import { UNINTERPRETED_KEYWORDS } from '../chunk-LZTXD3LN.js';
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) {