@jxsuite/parser 4.0.0 → 4.1.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/markdown.js CHANGED
@@ -46385,6 +46385,7 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
46385
46385
  constructor(fn) {
46386
46386
  this.fn = fn;
46387
46387
  }
46388
+ fn;
46388
46389
  cache = /* @__PURE__ */ new Map;
46389
46390
  get(key) {
46390
46391
  if (this.cache.has(key)) {
@@ -46400,6 +46401,9 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
46400
46401
  this._defaults = _defaults;
46401
46402
  this._root = _root;
46402
46403
  }
46404
+ _colorMap;
46405
+ _defaults;
46406
+ _root;
46403
46407
  static createFromRawTheme(source, colorMap) {
46404
46408
  return this.createFromParsedTheme(parseTheme(source), colorMap);
46405
46409
  }
@@ -46430,6 +46434,8 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
46430
46434
  this.parent = parent;
46431
46435
  this.scopeName = scopeName;
46432
46436
  }
46437
+ parent;
46438
+ scopeName;
46433
46439
  static push(path, scopeNames) {
46434
46440
  for (const name of scopeNames) {
46435
46441
  path = new _ScopeStack(path, name);
@@ -46483,6 +46489,9 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
46483
46489
  this.foregroundId = foregroundId;
46484
46490
  this.backgroundId = backgroundId;
46485
46491
  }
46492
+ fontStyle;
46493
+ foregroundId;
46494
+ backgroundId;
46486
46495
  }, ParsedThemeRule = class {
46487
46496
  constructor(scope, parentScopes, index, fontStyle, foreground, background) {
46488
46497
  this.scope = scope;
@@ -46492,6 +46501,12 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
46492
46501
  this.foreground = foreground;
46493
46502
  this.background = background;
46494
46503
  }
46504
+ scope;
46505
+ parentScopes;
46506
+ index;
46507
+ fontStyle;
46508
+ foreground;
46509
+ background;
46495
46510
  }, FontStyle, ColorMap = class {
46496
46511
  _isFrozen;
46497
46512
  _lastColorId;
@@ -46576,6 +46591,8 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
46576
46591
  this._children = _children;
46577
46592
  this._rulesWithParentScopes = rulesWithParentScopes;
46578
46593
  }
46594
+ _mainRule;
46595
+ _children;
46579
46596
  _rulesWithParentScopes;
46580
46597
  static _cmpBySpecificity(a, b) {
46581
46598
  if (a.scopeDepth !== b.scopeDepth) {
@@ -46736,6 +46753,7 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
46736
46753
  constructor(scopeName) {
46737
46754
  this.scopeName = scopeName;
46738
46755
  }
46756
+ scopeName;
46739
46757
  toKey() {
46740
46758
  return this.scopeName;
46741
46759
  }
@@ -46744,6 +46762,8 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
46744
46762
  this.scopeName = scopeName;
46745
46763
  this.ruleName = ruleName;
46746
46764
  }
46765
+ scopeName;
46766
+ ruleName;
46747
46767
  toKey() {
46748
46768
  return `${this.scopeName}#${this.ruleName}`;
46749
46769
  }
@@ -46769,6 +46789,8 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
46769
46789
  this.seenFullScopeRequests.add(this.initialScopeName);
46770
46790
  this.Q = [new TopLevelRuleReference(this.initialScopeName)];
46771
46791
  }
46792
+ repo;
46793
+ initialScopeName;
46772
46794
  seenFullScopeRequests = /* @__PURE__ */ new Set;
46773
46795
  seenPartialScopeRequests = /* @__PURE__ */ new Set;
46774
46796
  Q;
@@ -46806,19 +46828,23 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
46806
46828
  constructor(ruleName) {
46807
46829
  this.ruleName = ruleName;
46808
46830
  }
46831
+ ruleName;
46809
46832
  kind = 2;
46810
46833
  }, TopLevelReference = class {
46811
46834
  constructor(scopeName) {
46812
46835
  this.scopeName = scopeName;
46813
46836
  }
46837
+ scopeName;
46814
46838
  kind = 3;
46815
46839
  }, TopLevelRepositoryReference = class {
46816
46840
  constructor(scopeName, ruleName) {
46817
46841
  this.scopeName = scopeName;
46818
46842
  this.ruleName = ruleName;
46819
46843
  }
46844
+ scopeName;
46845
+ ruleName;
46820
46846
  kind = 4;
46821
- }, HAS_BACK_REFERENCES, BACK_REFERENCING_END, ruleIdSymbol, endRuleId = -1, whileRuleId = -2, Rule = class {
46847
+ }, HAS_BACK_REFERENCES, BACK_REFERENCING_END, endRuleId = -1, whileRuleId = -2, Rule = class {
46822
46848
  $location;
46823
46849
  id;
46824
46850
  _nameIsCapturing;
@@ -47213,6 +47239,8 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
47213
47239
  this.rules = rules;
47214
47240
  this.scanner = onigLib.createOnigScanner(regExps);
47215
47241
  }
47242
+ regExps;
47243
+ rules;
47216
47244
  scanner;
47217
47245
  dispose() {
47218
47246
  if (typeof this.scanner.dispose === "function") {
@@ -47242,6 +47270,8 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
47242
47270
  this.languageId = languageId;
47243
47271
  this.tokenType = tokenType;
47244
47272
  }
47273
+ languageId;
47274
+ tokenType;
47245
47275
  }, BasicScopeAttributesProvider, ScopeMatcher = class {
47246
47276
  values;
47247
47277
  scopesRegExp;
@@ -47272,6 +47302,8 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
47272
47302
  this.stack = stack;
47273
47303
  this.stoppedEarly = stoppedEarly;
47274
47304
  }
47305
+ stack;
47306
+ stoppedEarly;
47275
47307
  }, LocalStackElement = class {
47276
47308
  scopes;
47277
47309
  endPos;
@@ -47305,6 +47337,9 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
47305
47337
  }
47306
47338
  }
47307
47339
  }
47340
+ _rootScopeName;
47341
+ balancedBracketSelectors;
47342
+ _onigLib;
47308
47343
  _rootId;
47309
47344
  _lastRuleId;
47310
47345
  _ruleId2desc;
@@ -47457,6 +47492,9 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
47457
47492
  this.scopePath = scopePath;
47458
47493
  this.tokenAttributes = tokenAttributes;
47459
47494
  }
47495
+ parent;
47496
+ scopePath;
47497
+ tokenAttributes;
47460
47498
  static fromExtension(namesScopeList, contentNameScopesList) {
47461
47499
  let current = namesScopeList;
47462
47500
  let scopeNames = namesScopeList?.scopePath ?? null;
@@ -47595,6 +47633,7 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
47595
47633
  this._binaryTokens = [];
47596
47634
  this._lastTokenEndIndex = 0;
47597
47635
  }
47636
+ balancedBracketSelectors;
47598
47637
  _emitBinaryTokens;
47599
47638
  _lineText;
47600
47639
  _tokens;
@@ -47677,6 +47716,7 @@ var CAPTURING_REGEX_SOURCE, RegexSource = class {
47677
47716
  this._onigLib = _onigLib;
47678
47717
  this._theme = theme;
47679
47718
  }
47719
+ _onigLib;
47680
47720
  _grammars = /* @__PURE__ */ new Map;
47681
47721
  _rawGrammars = /* @__PURE__ */ new Map;
47682
47722
  _injectionGrammars = /* @__PURE__ */ new Map;
@@ -47790,7 +47830,6 @@ var init_dist5 = __esm(() => {
47790
47830
  emptyParentScopes = Object.freeze([]);
47791
47831
  HAS_BACK_REFERENCES = /\\(\d+)/;
47792
47832
  BACK_REFERENCING_END = /\\(\d+)/g;
47793
- ruleIdSymbol = Symbol("RuleId");
47794
47833
  CaptureRule = class extends Rule {
47795
47834
  retokenizeCapturedWithRuleId;
47796
47835
  constructor($location, id, name, contentName, retokenizeCapturedWithRuleId) {
@@ -48085,6 +48124,12 @@ var init_dist5 = __esm(() => {
48085
48124
  this._enterPos = enterPos;
48086
48125
  this._anchorPos = anchorPos;
48087
48126
  }
48127
+ parent;
48128
+ ruleId;
48129
+ beginRuleCapturedEOL;
48130
+ endRule;
48131
+ nameScopesList;
48132
+ contentNameScopesList;
48088
48133
  _stackElementBrand = undefined;
48089
48134
  static NULL = new _StateStackImpl(null, 0, 0, 0, false, null, null, null);
48090
48135
  _enterPos;
@@ -54091,31 +54136,31 @@ var init_caddyfile = __esm(() => {
54091
54136
  ],
54092
54137
  repository: {
54093
54138
  comment: {
54094
- match: "(?:^|(?<=\\s))#.*$",
54139
+ match: String.raw`(?:^|(?<=\s))#.*$`,
54095
54140
  name: "comment.line.number-sign.caddyfile"
54096
54141
  },
54097
54142
  constant: {
54098
- match: "\\b(?:on|off|true|false|h1|h2|h2c|h3)\\b",
54143
+ match: String.raw`\b(?:on|off|true|false|h1|h2|h2c|h3)\b`,
54099
54144
  name: "constant.language.caddyfile"
54100
54145
  },
54101
54146
  directive: {
54102
- match: "^\\s*([A-Za-z_][\\w]*)(?=\\s|$)",
54147
+ match: String.raw`^\s*([A-Za-z_][\w]*)(?=\s|$)`,
54103
54148
  captures: { "1": { name: "entity.name.function.directive.caddyfile" } }
54104
54149
  },
54105
54150
  duration: {
54106
- match: "\\b\\d+(?:\\.\\d+)?(?:ns|us|ms|s|m|h|d)\\b",
54151
+ match: String.raw`\b\d+(?:\.\d+)?(?:ns|us|ms|s|m|h|d)\b`,
54107
54152
  name: "constant.numeric.duration.caddyfile"
54108
54153
  },
54109
54154
  matcher: {
54110
- match: "(?<![\\w])@[\\w-]+",
54155
+ match: String.raw`(?<![\w])@[\w-]+`,
54111
54156
  name: "entity.name.tag.matcher.caddyfile"
54112
54157
  },
54113
54158
  number: {
54114
- match: "\\b\\d+(?:\\.\\d+)?\\b",
54159
+ match: String.raw`\b\d+(?:\.\d+)?\b`,
54115
54160
  name: "constant.numeric.caddyfile"
54116
54161
  },
54117
54162
  placeholder: {
54118
- match: "\\{[$%]?[\\w.>/:-]+\\}",
54163
+ match: String.raw`\{[$%]?[\w.>/:-]+\}`,
54119
54164
  name: "constant.other.placeholder.caddyfile"
54120
54165
  },
54121
54166
  punctuation: {
@@ -54123,7 +54168,7 @@ var init_caddyfile = __esm(() => {
54123
54168
  name: "punctuation.section.block.caddyfile"
54124
54169
  },
54125
54170
  "site-address": {
54126
- match: "^(?=\\S)(?:[^\\s{#,]*[.:*/][^\\s{#,]*)(?:\\s*,\\s*[^\\s{#,]+)*(?=\\s*\\{\\s*$)",
54171
+ match: String.raw`^(?=\S)(?:[^\s{#,]*[.:*/][^\s{#,]*)(?:\s*,\s*[^\s{#,]+)*(?=\s*\{\s*$)`,
54127
54172
  name: "entity.name.type.address.caddyfile"
54128
54173
  },
54129
54174
  string: {
@@ -54132,7 +54177,7 @@ var init_caddyfile = __esm(() => {
54132
54177
  begin: '"',
54133
54178
  end: '"',
54134
54179
  name: "string.quoted.double.caddyfile",
54135
- patterns: [{ match: "\\\\.", name: "constant.character.escape.caddyfile" }]
54180
+ patterns: [{ match: String.raw`\\.`, name: "constant.character.escape.caddyfile" }]
54136
54181
  },
54137
54182
  { begin: "`", end: "`", name: "string.quoted.other.caddyfile" }
54138
54183
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jxsuite/parser",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "Jx markdown parser and external class integration",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -66,8 +66,8 @@
66
66
  "yaml": "^2.9.1"
67
67
  },
68
68
  "devDependencies": {
69
- "@happy-dom/global-registrator": "^21.0.3",
70
- "@jxsuite/runtime": "^5.0.0",
69
+ "@happy-dom/global-registrator": "^21.0.4",
70
+ "@jxsuite/runtime": "^5.2.0",
71
71
  "@jxsuite/test-support": "^0.0.0",
72
72
  "@types/mdast": "^4.0.4",
73
73
  "ajv": "^8.20.0"
@@ -32,33 +32,33 @@ export const caddyfile: LanguageRegistration = {
32
32
  ],
33
33
  repository: {
34
34
  comment: {
35
- match: "(?:^|(?<=\\s))#.*$",
35
+ match: String.raw`(?:^|(?<=\s))#.*$`,
36
36
  name: "comment.line.number-sign.caddyfile",
37
37
  },
38
38
  constant: {
39
- match: "\\b(?:on|off|true|false|h1|h2|h2c|h3)\\b",
39
+ match: String.raw`\b(?:on|off|true|false|h1|h2|h2c|h3)\b`,
40
40
  name: "constant.language.caddyfile",
41
41
  },
42
42
  directive: {
43
43
  /* The first word of a line is a directive or subdirective. A word that carries a dot or a
44
44
  colon straight after it (`example.com`, `http://…`) is a site address, not a directive. */
45
- match: "^\\s*([A-Za-z_][\\w]*)(?=\\s|$)",
45
+ match: String.raw`^\s*([A-Za-z_][\w]*)(?=\s|$)`,
46
46
  captures: { "1": { name: "entity.name.function.directive.caddyfile" } },
47
47
  },
48
48
  duration: {
49
- match: "\\b\\d+(?:\\.\\d+)?(?:ns|us|ms|s|m|h|d)\\b",
49
+ match: String.raw`\b\d+(?:\.\d+)?(?:ns|us|ms|s|m|h|d)\b`,
50
50
  name: "constant.numeric.duration.caddyfile",
51
51
  },
52
52
  matcher: {
53
- match: "(?<![\\w])@[\\w-]+",
53
+ match: String.raw`(?<![\w])@[\w-]+`,
54
54
  name: "entity.name.tag.matcher.caddyfile",
55
55
  },
56
56
  number: {
57
- match: "\\b\\d+(?:\\.\\d+)?\\b",
57
+ match: String.raw`\b\d+(?:\.\d+)?\b`,
58
58
  name: "constant.numeric.caddyfile",
59
59
  },
60
60
  placeholder: {
61
- match: "\\{[$%]?[\\w.>/:-]+\\}",
61
+ match: String.raw`\{[$%]?[\w.>/:-]+\}`,
62
62
  name: "constant.other.placeholder.caddyfile",
63
63
  },
64
64
  punctuation: {
@@ -67,7 +67,7 @@ export const caddyfile: LanguageRegistration = {
67
67
  },
68
68
  "site-address": {
69
69
  // A column-0 line that opens a block and names a host, a port or a wildcard.
70
- match: "^(?=\\S)(?:[^\\s{#,]*[.:*/][^\\s{#,]*)(?:\\s*,\\s*[^\\s{#,]+)*(?=\\s*\\{\\s*$)",
70
+ match: String.raw`^(?=\S)(?:[^\s{#,]*[.:*/][^\s{#,]*)(?:\s*,\s*[^\s{#,]+)*(?=\s*\{\s*$)`,
71
71
  name: "entity.name.type.address.caddyfile",
72
72
  },
73
73
  string: {
@@ -76,7 +76,7 @@ export const caddyfile: LanguageRegistration = {
76
76
  begin: '"',
77
77
  end: '"',
78
78
  name: "string.quoted.double.caddyfile",
79
- patterns: [{ match: "\\\\.", name: "constant.character.escape.caddyfile" }],
79
+ patterns: [{ match: String.raw`\\.`, name: "constant.character.escape.caddyfile" }],
80
80
  },
81
81
  { begin: "`", end: "`", name: "string.quoted.other.caddyfile" },
82
82
  ],