@skaldapp/monaco-sfc 1.1.45 → 1.1.47

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 (2) hide show
  1. package/dist/vue.worker.js +47 -72
  2. package/package.json +7 -7
@@ -15470,102 +15470,87 @@ var require_collectBindings = /* @__PURE__ */ __commonJSMin(((exports) => {
15470
15470
  var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15471
15471
  Object.defineProperty(exports, "__esModule", { value: true });
15472
15472
  exports.generateInterpolation = generateInterpolation;
15473
+ exports.shouldIdentifierSkipped = shouldIdentifierSkipped;
15473
15474
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
15474
15475
  var collectBindings_1 = require_collectBindings();
15475
15476
  var shared_2 = require_shared$2();
15476
15477
  var codeFeatures_1 = require_codeFeatures();
15477
15478
  var names_1 = require_names();
15478
15479
  var utils_1 = require_utils$5();
15480
+ var boundary_1 = require_boundary();
15479
15481
  var isLiteralWhitelisted = /* @__PURE__ */ (0, shared_1.makeMap)("true,false,null,this");
15480
15482
  function* generateInterpolation({ typescript, setupRefs }, ctx, block, data, code, start, prefix = "", suffix = "") {
15481
- for (const segment of forEachInterpolationSegment(typescript, setupRefs, ctx, block, code, start, prefix, suffix)) {
15482
- if (typeof segment === "string") {
15483
- yield segment;
15484
- continue;
15485
- }
15486
- let [section, offset, type] = segment;
15487
- offset -= prefix.length;
15488
- let addSuffix = "";
15489
- const overLength = offset + section.length - code.length;
15490
- if (overLength > 0) {
15491
- addSuffix = section.slice(section.length - overLength);
15492
- section = section.slice(0, -overLength);
15493
- }
15494
- if (offset < 0) {
15495
- yield section.slice(0, -offset);
15496
- section = section.slice(-offset);
15497
- offset = 0;
15498
- }
15499
- if (!(section.length === 0 && type === "startEnd")) yield [
15500
- section,
15501
- block.name,
15502
- start + offset,
15503
- type === "errorMappingOnly" ? codeFeatures_1.codeFeatures.verification : type === "shorthand" ? {
15504
- ...data,
15505
- __shorthandExpression: "js"
15506
- } : data
15507
- ];
15508
- yield addSuffix;
15509
- }
15510
- }
15511
- function* forEachInterpolationSegment(ts, setupRefs, ctx, block, originalCode, start, prefix, suffix) {
15512
- const code = prefix + originalCode + suffix;
15483
+ if (prefix) yield prefix;
15513
15484
  let prevEnd = 0;
15514
- for (const [name, offset, isShorthand] of forEachIdentifiers(ts, ctx, block, originalCode, code, prefix)) {
15485
+ for (const [name, offset, isShorthand] of forEachIdentifiers(typescript, ctx, block, code, prefix, suffix)) {
15515
15486
  if (isShorthand) {
15516
- yield [code.slice(prevEnd, offset + name.length), prevEnd];
15487
+ yield [
15488
+ code.slice(prevEnd, offset + name.length),
15489
+ block.name,
15490
+ start + prevEnd,
15491
+ data
15492
+ ];
15517
15493
  yield `: `;
15518
- } else yield [
15494
+ } else if (prevEnd < offset) yield [
15519
15495
  code.slice(prevEnd, offset),
15520
- prevEnd,
15521
- prevEnd > 0 ? void 0 : "startEnd"
15496
+ block.name,
15497
+ start + prevEnd,
15498
+ data
15522
15499
  ];
15523
15500
  if (setupRefs.has(name)) {
15524
- yield [name, offset];
15525
- yield `.value`;
15526
- } else {
15527
15501
  yield [
15528
- "",
15529
- offset,
15530
- "errorMappingOnly"
15502
+ name,
15503
+ block.name,
15504
+ start + offset,
15505
+ data
15531
15506
  ];
15507
+ yield `.value`;
15508
+ } else {
15509
+ const token = yield* (0, boundary_1.startBoundary)(block.name, start + offset, codeFeatures_1.codeFeatures.verification);
15532
15510
  if (ctx.dollarVars.has(name)) yield names_1.names.dollars;
15533
15511
  else {
15534
- ctx.recordComponentAccess(block.name, name, start - prefix.length + offset);
15512
+ ctx.recordComponentAccess(block.name, name, start + offset);
15535
15513
  yield names_1.names.ctx;
15536
15514
  }
15537
15515
  yield `.`;
15538
15516
  yield [
15539
15517
  name,
15540
- offset,
15541
- isShorthand ? "shorthand" : void 0
15518
+ block.name,
15519
+ start + offset,
15520
+ isShorthand ? {
15521
+ ...data,
15522
+ __shorthandExpression: "js"
15523
+ } : data
15542
15524
  ];
15525
+ yield (0, boundary_1.endBoundary)(token, start + offset + name.length);
15543
15526
  }
15544
15527
  prevEnd = offset + name.length;
15545
15528
  }
15546
15529
  if (prevEnd < code.length) yield [
15547
15530
  code.slice(prevEnd),
15548
- prevEnd,
15549
- "startEnd"
15531
+ block.name,
15532
+ start + prevEnd,
15533
+ data
15550
15534
  ];
15535
+ if (suffix) yield suffix;
15551
15536
  }
15552
- function* forEachIdentifiers(ts, ctx, block, originalCode, code, prefix) {
15553
- if (utils_1.identifierRegex.test(originalCode) && !shouldIdentifierSkipped(ctx, originalCode)) {
15537
+ function* forEachIdentifiers(ts, ctx, block, code, prefix, suffix) {
15538
+ if (utils_1.identifierRegex.test(code) && !shouldIdentifierSkipped(ctx, code)) {
15554
15539
  yield [
15555
- originalCode,
15556
- prefix.length,
15540
+ code,
15541
+ 0,
15557
15542
  false
15558
15543
  ];
15559
15544
  return;
15560
15545
  }
15561
15546
  const endScope = ctx.startScope();
15562
- const ast = (0, utils_1.getTypeScriptAST)(ts, block, code);
15547
+ const ast = (0, utils_1.getTypeScriptAST)(ts, block, prefix + code + suffix);
15563
15548
  for (const [id, isShorthand] of forEachDeclarations(ts, ast, ast, ctx)) {
15564
15549
  const text = (0, shared_2.getNodeText)(ts, id, ast);
15565
15550
  if (shouldIdentifierSkipped(ctx, text)) continue;
15566
15551
  yield [
15567
15552
  text,
15568
- (0, shared_2.getStartEnd)(ts, id, ast).start,
15553
+ (0, shared_2.getStartEnd)(ts, id, ast).start - prefix.length,
15569
15554
  isShorthand
15570
15555
  ];
15571
15556
  }
@@ -18216,7 +18201,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18216
18201
  ...codeFeatures_1.codeFeatures.withoutHighlightAndCompletion,
18217
18202
  __shorthandExpression: "html"
18218
18203
  });
18219
- if (ctx.scopes.some((scope) => scope.has(propVariableName))) yield* codes;
18204
+ if ((0, interpolation_1.shouldIdentifierSkipped)(ctx, propVariableName)) yield* codes;
18220
18205
  else if (options.setupRefs.has(propVariableName)) {
18221
18206
  yield* codes;
18222
18207
  yield `.value`;
@@ -32561,6 +32546,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32561
32546
  return this.range;
32562
32547
  }
32563
32548
  parseRange(range) {
32549
+ range = range.replace(BUILDSTRIPRE, "");
32564
32550
  const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
32565
32551
  const cached = cache.get(memoKey);
32566
32552
  if (cached) return cached;
@@ -32619,8 +32605,9 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32619
32605
  var Comparator = require_comparator();
32620
32606
  var debug = require_debug();
32621
32607
  var SemVer = require_semver$1();
32622
- var { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
32608
+ var { safeRe: re, src, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
32623
32609
  var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
32610
+ var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
32624
32611
  var isNullSet = (c) => c.value === "<0.0.0-0";
32625
32612
  var isAny = (c) => c.value === "";
32626
32613
  var isSatisfiable = (comparators, options) => {
@@ -33147,7 +33134,7 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
33147
33134
  if (c.operator === ">" || c.operator === ">=") {
33148
33135
  higher = higherGT(gt, c, options);
33149
33136
  if (higher === c && higher !== gt) return false;
33150
- } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) return false;
33137
+ } else if (gt.operator === ">=" && !c.test(gt.semver)) return false;
33151
33138
  }
33152
33139
  if (lt) {
33153
33140
  if (needDomLTPre) {
@@ -33156,7 +33143,7 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
33156
33143
  if (c.operator === "<" || c.operator === "<=") {
33157
33144
  lower = lowerLT(lt, c, options);
33158
33145
  if (lower === c && lower !== lt) return false;
33159
- } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) return false;
33146
+ } else if (lt.operator === "<=" && !c.test(lt.semver)) return false;
33160
33147
  }
33161
33148
  if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
33162
33149
  }
@@ -169594,7 +169581,7 @@ ${lanes.join("\n")}
169594
169581
  type = getIntendedTypeFromJSDocTypeReference(node);
169595
169582
  if (!type) {
169596
169583
  symbol = resolveTypeReferenceName(node, meaning, true);
169597
- if (symbol === unknownSymbol) symbol = resolveTypeReferenceName(node, meaning | 111551);
169584
+ if (symbol === unknownSymbol) symbol = resolveTypeReferenceName(node, 900095);
169598
169585
  else resolveTypeReferenceName(node, meaning);
169599
169586
  type = getTypeReferenceType(node, symbol);
169600
169587
  }
@@ -244236,7 +244223,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
244236
244223
  };
244237
244224
  }
244238
244225
  return {
244239
- newText: openComment + closeComment,
244226
+ newText: "/** */",
244240
244227
  caretOffset: 3
244241
244228
  };
244242
244229
  }
@@ -262428,7 +262415,6 @@ var require_moduleSpecifierCache$3 = /* @__PURE__ */ __commonJSMin(((exports) =>
262428
262415
  exports.createModuleSpecifierCache = exports.nodeModulesPathPart = void 0;
262429
262416
  exports.nodeModulesPathPart = "/node_modules/";
262430
262417
  function createModuleSpecifierCache() {
262431
- let containedNodeModulesWatchers;
262432
262418
  let cache;
262433
262419
  let currentKey;
262434
262420
  const result = {
@@ -262455,9 +262441,7 @@ var require_moduleSpecifierCache$3 = /* @__PURE__ */ __commonJSMin(((exports) =>
262455
262441
  else cache.set(toFileName, createInfo(void 0, void 0, isBlockedByPackageJsonDependencies));
262456
262442
  },
262457
262443
  clear() {
262458
- containedNodeModulesWatchers === null || containedNodeModulesWatchers === void 0 || containedNodeModulesWatchers.forEach((watcher) => watcher.close());
262459
262444
  cache === null || cache === void 0 || cache.clear();
262460
- containedNodeModulesWatchers === null || containedNodeModulesWatchers === void 0 || containedNodeModulesWatchers.clear();
262461
262445
  currentKey = void 0;
262462
262446
  },
262463
262447
  count() {
@@ -262686,7 +262670,6 @@ var require_moduleSpecifierCache$2 = /* @__PURE__ */ __commonJSMin(((exports) =>
262686
262670
  exports.createModuleSpecifierCache = exports.nodeModulesPathPart = void 0;
262687
262671
  exports.nodeModulesPathPart = "/node_modules/";
262688
262672
  function createModuleSpecifierCache() {
262689
- let containedNodeModulesWatchers;
262690
262673
  let cache;
262691
262674
  let currentKey;
262692
262675
  const result = {
@@ -262713,9 +262696,7 @@ var require_moduleSpecifierCache$2 = /* @__PURE__ */ __commonJSMin(((exports) =>
262713
262696
  else cache.set(toFileName, createInfo(void 0, void 0, isBlockedByPackageJsonDependencies));
262714
262697
  },
262715
262698
  clear() {
262716
- containedNodeModulesWatchers === null || containedNodeModulesWatchers === void 0 || containedNodeModulesWatchers.forEach((watcher) => watcher.close());
262717
262699
  cache === null || cache === void 0 || cache.clear();
262718
- containedNodeModulesWatchers === null || containedNodeModulesWatchers === void 0 || containedNodeModulesWatchers.clear();
262719
262700
  currentKey = void 0;
262720
262701
  },
262721
262702
  count() {
@@ -263164,7 +263145,6 @@ var require_moduleSpecifierCache$1 = /* @__PURE__ */ __commonJSMin(((exports) =>
263164
263145
  Object.defineProperty(exports, "__esModule", { value: true });
263165
263146
  exports.createModuleSpecifierCache = void 0;
263166
263147
  function createModuleSpecifierCache() {
263167
- let containedNodeModulesWatchers;
263168
263148
  let cache;
263169
263149
  let currentKey;
263170
263150
  const result = {
@@ -263191,9 +263171,7 @@ var require_moduleSpecifierCache$1 = /* @__PURE__ */ __commonJSMin(((exports) =>
263191
263171
  else cache.set(toFileName, createInfo(void 0, void 0, void 0, isBlockedByPackageJsonDependencies));
263192
263172
  },
263193
263173
  clear() {
263194
- containedNodeModulesWatchers === null || containedNodeModulesWatchers === void 0 || containedNodeModulesWatchers.forEach((watcher) => watcher.close());
263195
263174
  cache === null || cache === void 0 || cache.clear();
263196
- containedNodeModulesWatchers === null || containedNodeModulesWatchers === void 0 || containedNodeModulesWatchers.clear();
263197
263175
  currentKey = void 0;
263198
263176
  },
263199
263177
  count() {
@@ -263251,7 +263229,6 @@ var require_moduleSpecifierCache = /* @__PURE__ */ __commonJSMin(((exports) => {
263251
263229
  Object.defineProperty(exports, "__esModule", { value: true });
263252
263230
  exports.createModuleSpecifierCache = void 0;
263253
263231
  function createModuleSpecifierCache() {
263254
- let containedNodeModulesWatchers;
263255
263232
  let cache;
263256
263233
  let currentKey;
263257
263234
  const result = {
@@ -263280,9 +263257,7 @@ var require_moduleSpecifierCache = /* @__PURE__ */ __commonJSMin(((exports) => {
263280
263257
  } else cache.set(toFileName, createInfo(void 0, void 0, void 0, void 0, isBlockedByPackageJsonDependencies));
263281
263258
  },
263282
263259
  clear() {
263283
- containedNodeModulesWatchers === null || containedNodeModulesWatchers === void 0 || containedNodeModulesWatchers.forEach((watcher) => watcher.close());
263284
263260
  cache === null || cache === void 0 || cache.clear();
263285
- containedNodeModulesWatchers === null || containedNodeModulesWatchers === void 0 || containedNodeModulesWatchers.clear();
263286
263261
  currentKey = void 0;
263287
263262
  },
263288
263263
  count() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package",
3
3
  "name": "@skaldapp/monaco-sfc",
4
- "version": "1.1.45",
4
+ "version": "1.1.47",
5
5
  "description": "A Monaco Editor language server for Vue Single File Components (SFC) providing syntax highlighting, IntelliSense, error detection, and more",
6
6
  "keywords": [
7
7
  "vue",
@@ -54,9 +54,9 @@
54
54
  "@remote-dom/polyfill": "^1.5.1",
55
55
  "@volar/jsdelivr": "^2.4.28",
56
56
  "@volar/monaco": "^2.4.28",
57
- "@vue/language-core": "^3.3.1",
58
- "@vue/language-service": "^3.3.1",
59
- "@vue/typescript-plugin": "^3.3.1",
57
+ "@vue/language-core": "^3.3.2",
58
+ "@vue/language-service": "^3.3.2",
59
+ "@vue/typescript-plugin": "^3.3.2",
60
60
  "monaco-editor": "0.52.2",
61
61
  "typescript": "^6.0.3",
62
62
  "volar-service-typescript": "^0.0.71",
@@ -65,12 +65,12 @@
65
65
  },
66
66
  "devDependencies": {
67
67
  "@rollup/plugin-commonjs": "^29.0.2",
68
- "@skaldapp/configs": "^1.2.108",
68
+ "@skaldapp/configs": "^1.2.110",
69
69
  "@types/markdown-it": "^14.1.2",
70
- "@types/node": "^25.9.0",
70
+ "@types/node": "^25.9.1",
71
71
  "eslint": "^10.4.0",
72
72
  "jsonc-parser": "^3.3.1",
73
73
  "path-browserify": "^1.0.1",
74
- "vite": "^8.0.13"
74
+ "vite": "^8.0.14"
75
75
  }
76
76
  }