@skaldapp/monaco-sfc 1.1.54 → 1.1.56
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/vue.worker.js +144 -122
- package/package.json +5 -5
package/dist/vue.worker.js
CHANGED
|
@@ -9765,11 +9765,12 @@ var require_boundary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9765
9765
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9766
9766
|
exports.Boundary = void 0;
|
|
9767
9767
|
exports.Boundary = class Boundary {
|
|
9768
|
-
constructor(source, features) {
|
|
9768
|
+
constructor(source, endOffset, features) {
|
|
9769
9769
|
this.source = source;
|
|
9770
|
+
this.endOffset = endOffset;
|
|
9770
9771
|
this.features = features;
|
|
9771
9772
|
}
|
|
9772
|
-
static *start(source,
|
|
9773
|
+
static *start(source, start, end, features) {
|
|
9773
9774
|
features = {
|
|
9774
9775
|
...features,
|
|
9775
9776
|
__combineToken: Symbol()
|
|
@@ -9777,16 +9778,16 @@ var require_boundary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9777
9778
|
yield [
|
|
9778
9779
|
``,
|
|
9779
9780
|
source,
|
|
9780
|
-
|
|
9781
|
+
start,
|
|
9781
9782
|
features
|
|
9782
9783
|
];
|
|
9783
|
-
return new Boundary(source, features);
|
|
9784
|
+
return new Boundary(source, end, features);
|
|
9784
9785
|
}
|
|
9785
|
-
end(
|
|
9786
|
+
end() {
|
|
9786
9787
|
return [
|
|
9787
9788
|
``,
|
|
9788
9789
|
this.source,
|
|
9789
|
-
|
|
9790
|
+
this.endOffset,
|
|
9790
9791
|
this.features
|
|
9791
9792
|
];
|
|
9792
9793
|
}
|
|
@@ -15198,9 +15199,9 @@ var require_context$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15198
15199
|
const info = stack.pop();
|
|
15199
15200
|
commentBuffer.length = 0;
|
|
15200
15201
|
if (info.expectError !== void 0) {
|
|
15201
|
-
const boundary = yield* boundary_1.Boundary.start("template", info.expectError.node.loc.start.offset, { verification: { shouldReport: () => info.expectError.token === 0 } });
|
|
15202
|
+
const boundary = yield* boundary_1.Boundary.start("template", info.expectError.node.loc.start.offset, info.expectError.node.loc.end.offset, { verification: { shouldReport: () => info.expectError.token === 0 } });
|
|
15202
15203
|
yield `// @ts-expect-error`;
|
|
15203
|
-
yield boundary.end(
|
|
15204
|
+
yield boundary.end();
|
|
15204
15205
|
yield `${utils_1.newLine}${utils_1.endOfLine}`;
|
|
15205
15206
|
}
|
|
15206
15207
|
}
|
|
@@ -15361,20 +15362,17 @@ var require_stringLiteralKey = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15361
15362
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15362
15363
|
exports.generateStringLiteralKey = generateStringLiteralKey;
|
|
15363
15364
|
var boundary_1 = require_boundary();
|
|
15364
|
-
function* generateStringLiteralKey(code, offset,
|
|
15365
|
-
|
|
15366
|
-
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
|
|
15374
|
-
|
|
15375
|
-
yield `'`;
|
|
15376
|
-
yield boundary.end(offset + code.length);
|
|
15377
|
-
}
|
|
15365
|
+
function* generateStringLiteralKey(code, offset, features) {
|
|
15366
|
+
const boundary = yield* boundary_1.Boundary.start("template", offset, offset + code.length, features);
|
|
15367
|
+
yield `'`;
|
|
15368
|
+
yield [
|
|
15369
|
+
code,
|
|
15370
|
+
"template",
|
|
15371
|
+
offset,
|
|
15372
|
+
boundary.features
|
|
15373
|
+
];
|
|
15374
|
+
yield `'`;
|
|
15375
|
+
yield boundary.end();
|
|
15378
15376
|
}
|
|
15379
15377
|
}));
|
|
15380
15378
|
//#endregion
|
|
@@ -15492,7 +15490,7 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15492
15490
|
];
|
|
15493
15491
|
yield `.value`;
|
|
15494
15492
|
} else {
|
|
15495
|
-
const boundary = yield* boundary_1.Boundary.start(block.name, start + offset, codeFeatures_1.codeFeatures.verification);
|
|
15493
|
+
const boundary = yield* boundary_1.Boundary.start(block.name, start + offset, start + offset + name.length, codeFeatures_1.codeFeatures.verification);
|
|
15496
15494
|
if (ctx.dollarVars.has(name)) yield names_1.names.dollars;
|
|
15497
15495
|
else {
|
|
15498
15496
|
ctx.accessVariable(block.name, name, start + offset);
|
|
@@ -15508,7 +15506,7 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15508
15506
|
__shorthandExpression: "js"
|
|
15509
15507
|
} : data
|
|
15510
15508
|
];
|
|
15511
|
-
yield boundary.end(
|
|
15509
|
+
yield boundary.end();
|
|
15512
15510
|
}
|
|
15513
15511
|
prevEnd = offset + name.length;
|
|
15514
15512
|
}
|
|
@@ -15608,11 +15606,11 @@ var require_objectProperty = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15608
15606
|
else yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, features, code, offset);
|
|
15609
15607
|
else if (shouldCamelize) if (utils_1.identifierRE.test((0, shared_1.camelize)(code))) yield* (0, camelized_1.generateCamelized)(code, "template", offset, features);
|
|
15610
15608
|
else {
|
|
15611
|
-
const boundary = yield* boundary_1.Boundary.start("template", offset, features);
|
|
15609
|
+
const boundary = yield* boundary_1.Boundary.start("template", offset, offset + code.length, features);
|
|
15612
15610
|
yield `'`;
|
|
15613
15611
|
yield* (0, camelized_1.generateCamelized)(code, "template", offset, boundary.features);
|
|
15614
15612
|
yield `'`;
|
|
15615
|
-
yield boundary.end(
|
|
15613
|
+
yield boundary.end();
|
|
15616
15614
|
}
|
|
15617
15615
|
else if (utils_1.identifierRE.test(code)) yield [
|
|
15618
15616
|
code,
|
|
@@ -17847,9 +17845,9 @@ var require_unicode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17847
17845
|
var boundary_1 = require_boundary();
|
|
17848
17846
|
function* generateUnicode(code, offset, features) {
|
|
17849
17847
|
if (needToUnicode(code)) {
|
|
17850
|
-
const boundary = yield* boundary_1.Boundary.start("template", offset, features);
|
|
17848
|
+
const boundary = yield* boundary_1.Boundary.start("template", offset, offset + code.length, features);
|
|
17851
17849
|
yield toUnicode(code);
|
|
17852
|
-
yield boundary.end(
|
|
17850
|
+
yield boundary.end();
|
|
17853
17851
|
} else yield [
|
|
17854
17852
|
code,
|
|
17855
17853
|
"template",
|
|
@@ -18059,17 +18057,16 @@ var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18059
18057
|
...options.vueCompilerOptions.checkUnknownEvents ? codeFeatures_1.codeFeatures.verification : codeFeatures_1.codeFeatures.doNotReportTs2353AndTs2561
|
|
18060
18058
|
};
|
|
18061
18059
|
if (directive.length) name = (0, shared_1.capitalize)(name);
|
|
18060
|
+
const boundary = yield* boundary_1.Boundary.start("template", start, start + name.length, features);
|
|
18062
18061
|
if (utils_2.identifierRE.test((0, shared_1.camelize)(name))) {
|
|
18063
|
-
const boundary = yield* boundary_1.Boundary.start("template", start, features);
|
|
18064
18062
|
yield directive;
|
|
18065
18063
|
yield* (0, camelized_1.generateCamelized)(name, "template", start, boundary.features);
|
|
18066
18064
|
} else {
|
|
18067
|
-
const boundary = yield* boundary_1.Boundary.start("template", start, features);
|
|
18068
18065
|
yield `'`;
|
|
18069
18066
|
yield directive;
|
|
18070
18067
|
yield* (0, camelized_1.generateCamelized)(name, "template", start, boundary.features);
|
|
18071
18068
|
yield `'`;
|
|
18072
|
-
yield boundary.end(
|
|
18069
|
+
yield boundary.end();
|
|
18073
18070
|
}
|
|
18074
18071
|
}
|
|
18075
18072
|
function* generateEventExpression(options, ctx, prop) {
|
|
@@ -18241,19 +18238,19 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18241
18238
|
const shouldCamelize = getShouldCamelize(options, node, prop, propName);
|
|
18242
18239
|
const features = getPropsCodeFeatures(checkUnknownProps);
|
|
18243
18240
|
if (shouldSpread) yield `...{ `;
|
|
18244
|
-
const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
|
|
18241
|
+
const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, prop.loc.end.offset, codeFeatures_1.codeFeatures.verification);
|
|
18245
18242
|
if (prop.arg) yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, propName, prop.arg.loc.start.offset, features, shouldCamelize);
|
|
18246
18243
|
else {
|
|
18247
|
-
const boundary2 = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
|
|
18244
|
+
const boundary2 = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, prop.loc.start.offset + 7, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
|
|
18248
18245
|
yield propName;
|
|
18249
|
-
yield boundary2.end(
|
|
18246
|
+
yield boundary2.end();
|
|
18250
18247
|
}
|
|
18251
18248
|
yield `: `;
|
|
18252
18249
|
const argLoc = prop.arg?.loc ?? prop.loc;
|
|
18253
|
-
const boundary3 = yield* boundary_1.Boundary.start("template", argLoc.start.offset, codeFeatures_1.codeFeatures.verification);
|
|
18250
|
+
const boundary3 = yield* boundary_1.Boundary.start("template", argLoc.start.offset, argLoc.end.offset, codeFeatures_1.codeFeatures.verification);
|
|
18254
18251
|
yield* generatePropExp(options, ctx, prop, prop.exp);
|
|
18255
|
-
yield boundary3.end(
|
|
18256
|
-
yield boundary.end(
|
|
18252
|
+
yield boundary3.end();
|
|
18253
|
+
yield boundary.end();
|
|
18257
18254
|
if (shouldSpread) yield ` }`;
|
|
18258
18255
|
yield `,${utils_1.newLine}`;
|
|
18259
18256
|
if (isComponent && prop.name === "model" && prop.modifiers.length) {
|
|
@@ -18267,7 +18264,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18267
18264
|
const shouldCamelize = getShouldCamelize(options, node, prop, prop.name);
|
|
18268
18265
|
const features = getPropsCodeFeatures(checkUnknownProps);
|
|
18269
18266
|
if (shouldSpread) yield `...{ `;
|
|
18270
|
-
const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
|
|
18267
|
+
const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, prop.loc.end.offset, codeFeatures_1.codeFeatures.verification);
|
|
18271
18268
|
const prefix = options.template.content.slice(prop.loc.start.offset, prop.loc.start.offset + 1);
|
|
18272
18269
|
if (prefix === "." || prefix === "#") for (const char of prop.name) yield [
|
|
18273
18270
|
char,
|
|
@@ -18280,7 +18277,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18280
18277
|
if (prop.name === "style") yield `{}`;
|
|
18281
18278
|
else if (prop.value) yield* generateAttrValue(prop.value, codeFeatures_1.codeFeatures.withoutNavigation);
|
|
18282
18279
|
else yield `true`;
|
|
18283
|
-
yield boundary.end(
|
|
18280
|
+
yield boundary.end();
|
|
18284
18281
|
if (shouldSpread) yield ` }`;
|
|
18285
18282
|
yield `,${utils_1.newLine}`;
|
|
18286
18283
|
} else if (prop.name === "bind" && !prop.arg && prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) if (prop.exp.loc.source === "$attrs") failedPropExps?.push({
|
|
@@ -18289,10 +18286,10 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18289
18286
|
suffix: `)`
|
|
18290
18287
|
});
|
|
18291
18288
|
else {
|
|
18292
|
-
const boundary = yield* boundary_1.Boundary.start("template", prop.exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
|
|
18289
|
+
const boundary = yield* boundary_1.Boundary.start("template", prop.exp.loc.start.offset, prop.exp.loc.end.offset, codeFeatures_1.codeFeatures.verification);
|
|
18293
18290
|
yield `...`;
|
|
18294
18291
|
yield* generatePropExp(options, ctx, prop, prop.exp);
|
|
18295
|
-
yield boundary.end(
|
|
18292
|
+
yield boundary.end();
|
|
18296
18293
|
yield `,${utils_1.newLine}`;
|
|
18297
18294
|
}
|
|
18298
18295
|
}
|
|
@@ -18428,22 +18425,31 @@ var require_elementDirectives = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18428
18425
|
function* generateElementDirectives(options, ctx, node) {
|
|
18429
18426
|
for (const prop of node.props) {
|
|
18430
18427
|
if (prop.type !== CompilerDOM.NodeTypes.DIRECTIVE || prop.name === "slot" || prop.name === "on" || prop.name === "model" || prop.name === "bind") continue;
|
|
18431
|
-
const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
|
|
18436
|
-
|
|
18437
|
-
|
|
18438
|
-
|
|
18439
|
-
|
|
18428
|
+
const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, prop.loc.end.offset, codeFeatures_1.codeFeatures.verification);
|
|
18429
|
+
if (options.isVapor && !(0, shared_1.isBuiltInDirective)(prop.name)) {
|
|
18430
|
+
yield* generateIdentifier(options, ctx, prop);
|
|
18431
|
+
yield `(null!, `;
|
|
18432
|
+
yield* generateValue(options, ctx, prop, false);
|
|
18433
|
+
yield* generateArg(options, ctx, prop, false);
|
|
18434
|
+
yield* generateModifiers(options, ctx, prop, "modifiers", false);
|
|
18435
|
+
yield `)`;
|
|
18436
|
+
} else {
|
|
18437
|
+
yield `${names_1.names.asFunctionalDirective}(`;
|
|
18438
|
+
yield* generateIdentifier(options, ctx, prop);
|
|
18439
|
+
yield `, {} as import('${options.vueCompilerOptions.lib}').ObjectDirective)(null!, { ...${names_1.names.directiveBindingRestFields}, `;
|
|
18440
|
+
yield* generateArg(options, ctx, prop);
|
|
18441
|
+
yield* generateModifiers(options, ctx, prop);
|
|
18442
|
+
yield* generateValue(options, ctx, prop);
|
|
18443
|
+
yield `}, null!, null!)`;
|
|
18444
|
+
}
|
|
18445
|
+
yield boundary.end();
|
|
18440
18446
|
yield utils_1.endOfLine;
|
|
18441
18447
|
}
|
|
18442
18448
|
}
|
|
18443
18449
|
function* generateIdentifier(options, ctx, prop) {
|
|
18444
18450
|
const rawName = "v-" + prop.name;
|
|
18445
18451
|
const startOffset = prop.loc.start.offset;
|
|
18446
|
-
const boundary = yield* boundary_1.Boundary.start("template", startOffset, codeFeatures_1.codeFeatures.verification);
|
|
18452
|
+
const boundary = yield* boundary_1.Boundary.start("template", startOffset, startOffset + rawName.length, codeFeatures_1.codeFeatures.verification);
|
|
18447
18453
|
yield names_1.names.directives;
|
|
18448
18454
|
yield `.`;
|
|
18449
18455
|
yield* (0, camelized_1.generateCamelized)(rawName, "template", prop.loc.start.offset, {
|
|
@@ -18451,43 +18457,56 @@ var require_elementDirectives = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18451
18457
|
verification: options.vueCompilerOptions.checkUnknownDirectives && !(0, shared_1.isBuiltInDirective)(prop.name)
|
|
18452
18458
|
});
|
|
18453
18459
|
if (!(0, shared_1.isBuiltInDirective)(prop.name)) ctx.accessVariable("template", (0, shared_1.camelize)(rawName), prop.loc.start.offset);
|
|
18454
|
-
yield boundary.end(
|
|
18460
|
+
yield boundary.end();
|
|
18455
18461
|
}
|
|
18456
|
-
function* generateArg(options, ctx, prop) {
|
|
18462
|
+
function* generateArg(options, ctx, prop, asBindingProperty = true) {
|
|
18457
18463
|
const { arg } = prop;
|
|
18458
|
-
if (arg?.type
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
18462
|
-
|
|
18463
|
-
|
|
18464
|
-
|
|
18465
|
-
|
|
18466
|
-
|
|
18467
|
-
|
|
18468
|
-
|
|
18464
|
+
if (arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
|
|
18465
|
+
const startOffset = arg.loc.start.offset + arg.loc.source.indexOf(arg.content);
|
|
18466
|
+
if (asBindingProperty) {
|
|
18467
|
+
const boundary = yield* boundary_1.Boundary.start("template", startOffset, startOffset + arg.content.length, codeFeatures_1.codeFeatures.verification);
|
|
18468
|
+
yield `arg`;
|
|
18469
|
+
yield boundary.end();
|
|
18470
|
+
yield `: `;
|
|
18471
|
+
}
|
|
18472
|
+
if (arg.isStatic) yield* (0, stringLiteralKey_1.generateStringLiteralKey)(arg.content, startOffset, codeFeatures_1.codeFeatures.all);
|
|
18473
|
+
else yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.all, arg.content, startOffset, `(`, `)`);
|
|
18474
|
+
yield `, `;
|
|
18475
|
+
} else if (!asBindingProperty) yield `undefined, `;
|
|
18476
|
+
}
|
|
18477
|
+
function* generateModifiers(options, ctx, prop, propertyName = "modifiers", asBindingProperty = true) {
|
|
18469
18478
|
const { modifiers } = prop;
|
|
18470
|
-
if (
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
|
|
18474
|
-
|
|
18475
|
-
|
|
18476
|
-
|
|
18477
|
-
|
|
18478
|
-
|
|
18479
|
-
|
|
18480
|
-
|
|
18481
|
-
|
|
18482
|
-
|
|
18483
|
-
|
|
18479
|
+
if (modifiers.length) {
|
|
18480
|
+
if (asBindingProperty) {
|
|
18481
|
+
const boundary = yield* boundary_1.Boundary.start("template", modifiers[0].loc.start.offset - 1, modifiers.at(-1).loc.end.offset, codeFeatures_1.codeFeatures.verification);
|
|
18482
|
+
yield propertyName;
|
|
18483
|
+
yield boundary.end();
|
|
18484
|
+
yield `: `;
|
|
18485
|
+
}
|
|
18486
|
+
yield `{ `;
|
|
18487
|
+
for (const mod of modifiers) {
|
|
18488
|
+
yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, mod.content, mod.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlight);
|
|
18489
|
+
yield `: true, `;
|
|
18490
|
+
}
|
|
18491
|
+
yield `}, `;
|
|
18492
|
+
} else if (!asBindingProperty) yield `undefined, `;
|
|
18493
|
+
}
|
|
18494
|
+
function* generateValue(options, ctx, prop, asBindingProperty = true) {
|
|
18484
18495
|
const { exp } = prop;
|
|
18485
|
-
if (exp?.type
|
|
18486
|
-
|
|
18487
|
-
|
|
18488
|
-
|
|
18489
|
-
|
|
18490
|
-
|
|
18496
|
+
if (exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
|
|
18497
|
+
const boundary = yield* boundary_1.Boundary.start("template", exp.loc.start.offset, exp.loc.end.offset, codeFeatures_1.codeFeatures.verification);
|
|
18498
|
+
if (asBindingProperty) {
|
|
18499
|
+
yield `value`;
|
|
18500
|
+
yield boundary.end();
|
|
18501
|
+
yield `: `;
|
|
18502
|
+
yield* (0, elementProps_1.generatePropExp)(options, ctx, prop, exp);
|
|
18503
|
+
} else {
|
|
18504
|
+
yield `() => `;
|
|
18505
|
+
yield* (0, elementProps_1.generatePropExp)(options, ctx, prop, exp);
|
|
18506
|
+
yield boundary.end();
|
|
18507
|
+
}
|
|
18508
|
+
yield `, `;
|
|
18509
|
+
} else if (!asBindingProperty) yield `undefined, `;
|
|
18491
18510
|
}
|
|
18492
18511
|
}));
|
|
18493
18512
|
//#endregion
|
|
@@ -18668,11 +18687,11 @@ var require_styleScopedClasses = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18668
18687
|
arr.push([className, offset]);
|
|
18669
18688
|
} else cache[1].push([className, offset]);
|
|
18670
18689
|
yield `/** @type {${names_1.names.StyleScopedClasses}[`;
|
|
18671
|
-
const boundary = yield* boundary_1.Boundary.start(block.name, fullStart, codeFeatures_1.codeFeatures.navigationAndCompletion);
|
|
18690
|
+
const boundary = yield* boundary_1.Boundary.start(block.name, fullStart, offset + className.length, codeFeatures_1.codeFeatures.navigationAndCompletion);
|
|
18672
18691
|
yield `'`;
|
|
18673
18692
|
yield* (0, escaped_1.generateEscaped)(className, block.name, offset, boundary.features, classNameEscapeRE);
|
|
18674
18693
|
yield `'`;
|
|
18675
|
-
yield boundary.end(
|
|
18694
|
+
yield boundary.end();
|
|
18676
18695
|
yield `]} */${utils_1.endOfLine}`;
|
|
18677
18696
|
}
|
|
18678
18697
|
}));
|
|
@@ -18739,15 +18758,15 @@ var require_vSlot = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18739
18758
|
yield `const { `;
|
|
18740
18759
|
if (slotDir.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && slotDir.arg.content) yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, slotDir.arg.loc.source, slotDir.arg.loc.start.offset, slotDir.arg.isStatic ? codeFeatures_1.codeFeatures.withoutHighlight : codeFeatures_1.codeFeatures.all, false, true);
|
|
18741
18760
|
else {
|
|
18742
|
-
const boundary = yield* boundary_1.Boundary.start("template", slotDir.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
|
|
18761
|
+
const boundary = yield* boundary_1.Boundary.start("template", slotDir.loc.start.offset, slotDir.loc.start.offset + (slotDir.rawName?.length ?? 0), codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
|
|
18743
18762
|
yield `default`;
|
|
18744
|
-
yield boundary.end(
|
|
18763
|
+
yield boundary.end();
|
|
18745
18764
|
}
|
|
18746
18765
|
} else {
|
|
18747
18766
|
yield `const { `;
|
|
18748
|
-
const boundary = yield* boundary_1.Boundary.start("template", node.loc.start.offset, codeFeatures_1.codeFeatures.navigation);
|
|
18767
|
+
const boundary = yield* boundary_1.Boundary.start("template", node.loc.start.offset, node.loc.end.offset, codeFeatures_1.codeFeatures.navigation);
|
|
18749
18768
|
yield `default`;
|
|
18750
|
-
yield boundary.end(
|
|
18769
|
+
yield boundary.end();
|
|
18751
18770
|
}
|
|
18752
18771
|
yield `: ${slotVar} } = ${ctxVar}.slots!${utils_1.endOfLine}`;
|
|
18753
18772
|
const scope = ctx.scope();
|
|
@@ -18798,7 +18817,7 @@ var require_vSlot = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18798
18817
|
yield `] = ${names_1.names.vSlot}(${slotVar}!`;
|
|
18799
18818
|
if (types.some((t) => t)) {
|
|
18800
18819
|
yield `, `;
|
|
18801
|
-
const boundary = yield* boundary_1.Boundary.start("template", exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
|
|
18820
|
+
const boundary = yield* boundary_1.Boundary.start("template", exp.loc.start.offset, exp.loc.end.offset, codeFeatures_1.codeFeatures.verification);
|
|
18802
18821
|
yield `(`;
|
|
18803
18822
|
yield* types.flatMap((type) => type ? [
|
|
18804
18823
|
`_`,
|
|
@@ -18806,7 +18825,7 @@ var require_vSlot = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18806
18825
|
`, `
|
|
18807
18826
|
] : `_, `);
|
|
18808
18827
|
yield `) => [] as any`;
|
|
18809
|
-
yield boundary.end(
|
|
18828
|
+
yield boundary.end();
|
|
18810
18829
|
}
|
|
18811
18830
|
yield `)${utils_1.endOfLine}`;
|
|
18812
18831
|
}
|
|
@@ -18972,14 +18991,14 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18972
18991
|
yield propsStr;
|
|
18973
18992
|
yield `}))${utils_1.endOfLine}`;
|
|
18974
18993
|
yield `const `;
|
|
18975
|
-
const boundary = yield* boundary_1.Boundary.start("template", node.loc.start.offset, codeFeatures_1.codeFeatures.doNotReportTs6133);
|
|
18994
|
+
const boundary = yield* boundary_1.Boundary.start("template", node.loc.start.offset, node.loc.end.offset, codeFeatures_1.codeFeatures.doNotReportTs6133);
|
|
18976
18995
|
yield vnodeVar;
|
|
18977
|
-
yield boundary.end(
|
|
18996
|
+
yield boundary.end();
|
|
18978
18997
|
yield ` = ${functionalVar}`;
|
|
18979
18998
|
const commentInfo = ctx.getCommentInfo();
|
|
18980
18999
|
if (commentInfo.generic) {
|
|
18981
19000
|
const { content, offset } = commentInfo.generic;
|
|
18982
|
-
const boundary = yield* boundary_1.Boundary.start("template", offset, codeFeatures_1.codeFeatures.verification);
|
|
19001
|
+
const boundary = yield* boundary_1.Boundary.start("template", offset, offset + content.length, codeFeatures_1.codeFeatures.verification);
|
|
18983
19002
|
yield `<`;
|
|
18984
19003
|
yield [
|
|
18985
19004
|
content,
|
|
@@ -18988,11 +19007,11 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18988
19007
|
codeFeatures_1.codeFeatures.all
|
|
18989
19008
|
];
|
|
18990
19009
|
yield `>`;
|
|
18991
|
-
yield boundary.end(
|
|
19010
|
+
yield boundary.end();
|
|
18992
19011
|
}
|
|
18993
19012
|
const shouldInheritAttrs = hasVBindAttrs(options, ctx, node);
|
|
18994
19013
|
yield `(`;
|
|
18995
|
-
const boundary2 = yield* boundary_1.Boundary.start("template", startTagOffset, shouldInheritAttrs && options.vueCompilerOptions.checkRequiredFallthroughAttributes ? {} : codeFeatures_1.codeFeatures.verification);
|
|
19014
|
+
const boundary2 = yield* boundary_1.Boundary.start("template", startTagOffset, startTagOffset + tag.length, shouldInheritAttrs && options.vueCompilerOptions.checkRequiredFallthroughAttributes ? {} : codeFeatures_1.codeFeatures.verification);
|
|
18996
19015
|
yield `{`;
|
|
18997
19016
|
yield [
|
|
18998
19017
|
``,
|
|
@@ -19003,7 +19022,7 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19003
19022
|
yield utils_1.newLine;
|
|
19004
19023
|
yield* propCodes;
|
|
19005
19024
|
yield `}`;
|
|
19006
|
-
yield boundary2.end(
|
|
19025
|
+
yield boundary2.end();
|
|
19007
19026
|
yield `, ...${names_1.names.functionalComponentArgsRest}(${functionalVar}))${utils_1.endOfLine}`;
|
|
19008
19027
|
yield* generateFailedExpressions(options, ctx, failedPropExps);
|
|
19009
19028
|
yield* (0, elementEvents_1.generateElementEvents)(options, ctx, node, componentVar, getCtxVar, getPropsVar);
|
|
@@ -19044,11 +19063,11 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19044
19063
|
yield* (0, propertyAccess_1.generatePropertyAccess)(options, ctx, node.tag, endTagOffset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
|
|
19045
19064
|
}
|
|
19046
19065
|
yield `)(`;
|
|
19047
|
-
const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
|
|
19066
|
+
const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, startTagOffset + node.tag.length, codeFeatures_1.codeFeatures.verification);
|
|
19048
19067
|
yield `{${utils_1.newLine}`;
|
|
19049
19068
|
yield* (0, elementProps_1.generateElementProps)(options, ctx, node, node.props, options.vueCompilerOptions.checkUnknownProps, failedPropExps);
|
|
19050
19069
|
yield `}`;
|
|
19051
|
-
yield boundary.end(
|
|
19070
|
+
yield boundary.end();
|
|
19052
19071
|
yield `)${utils_1.endOfLine}`;
|
|
19053
19072
|
yield* generateFailedExpressions(options, ctx, failedPropExps);
|
|
19054
19073
|
yield* (0, elementDirectives_1.generateElementDirectives)(options, ctx, node);
|
|
@@ -19067,11 +19086,11 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19067
19086
|
const [startTagOffset] = (0, shared_2.getElementTagOffsets)(node, options.template);
|
|
19068
19087
|
if (node.props.length) {
|
|
19069
19088
|
yield `__VLS_asFunctionalElement(__VLS_intrinsics.template)(`;
|
|
19070
|
-
const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
|
|
19089
|
+
const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, startTagOffset + node.tag.length, codeFeatures_1.codeFeatures.verification);
|
|
19071
19090
|
yield `{${utils_1.newLine}`;
|
|
19072
19091
|
yield* (0, elementProps_1.generateElementProps)(options, ctx, node, node.props, options.vueCompilerOptions.checkUnknownProps);
|
|
19073
19092
|
yield `}`;
|
|
19074
|
-
yield boundary.end(
|
|
19093
|
+
yield boundary.end();
|
|
19075
19094
|
yield `)${utils_1.endOfLine}`;
|
|
19076
19095
|
}
|
|
19077
19096
|
for (const child of node.children) yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child);
|
|
@@ -19167,25 +19186,25 @@ var require_slotOutlet = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19167
19186
|
`]`
|
|
19168
19187
|
];
|
|
19169
19188
|
else codes = [`['default']`];
|
|
19170
|
-
const boundary = yield* boundary_1.Boundary.start("template", nameProp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
|
|
19189
|
+
const boundary = yield* boundary_1.Boundary.start("template", nameProp.loc.start.offset, nameProp.loc.end.offset, codeFeatures_1.codeFeatures.verification);
|
|
19171
19190
|
yield options.slotsAssignName ?? names_1.names.slots;
|
|
19172
19191
|
yield* codes;
|
|
19173
|
-
yield boundary.end(
|
|
19192
|
+
yield boundary.end();
|
|
19174
19193
|
} else {
|
|
19175
|
-
const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
|
|
19194
|
+
const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, startTagEndOffset, codeFeatures_1.codeFeatures.verification);
|
|
19176
19195
|
yield `${options.slotsAssignName ?? names_1.names.slots}[`;
|
|
19177
|
-
const boundary2 = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
|
|
19196
|
+
const boundary2 = yield* boundary_1.Boundary.start("template", startTagOffset, startTagEndOffset, codeFeatures_1.codeFeatures.verification);
|
|
19178
19197
|
yield `'default'`;
|
|
19179
|
-
yield boundary2.end(
|
|
19198
|
+
yield boundary2.end();
|
|
19180
19199
|
yield `]`;
|
|
19181
|
-
yield boundary.end(
|
|
19200
|
+
yield boundary.end();
|
|
19182
19201
|
}
|
|
19183
19202
|
yield `)(`;
|
|
19184
|
-
const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
|
|
19203
|
+
const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, startTagEndOffset, codeFeatures_1.codeFeatures.verification);
|
|
19185
19204
|
yield `{${utils_1.newLine}`;
|
|
19186
19205
|
yield* (0, elementProps_1.generateElementProps)(options, ctx, node, node.props.filter((prop) => prop !== nameProp), true);
|
|
19187
19206
|
yield `}`;
|
|
19188
|
-
yield boundary.end(
|
|
19207
|
+
yield boundary.end();
|
|
19189
19208
|
yield `)${utils_1.endOfLine}`;
|
|
19190
19209
|
} else {
|
|
19191
19210
|
yield `var ${propsVar} = {${utils_1.newLine}`;
|
|
@@ -19563,9 +19582,9 @@ var require_template$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19563
19582
|
yield `${utils_1.newLine}& { `;
|
|
19564
19583
|
if (slot.name && slot.offset !== void 0) yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, slot.name, slot.offset, codeFeatures_1.codeFeatures.navigation);
|
|
19565
19584
|
else {
|
|
19566
|
-
const boundary = yield* boundary_1.Boundary.start("template", slot.tagRange
|
|
19585
|
+
const boundary = yield* boundary_1.Boundary.start("template", ...slot.tagRange, codeFeatures_1.codeFeatures.navigation);
|
|
19567
19586
|
yield `default`;
|
|
19568
|
-
yield boundary.end(
|
|
19587
|
+
yield boundary.end();
|
|
19569
19588
|
}
|
|
19570
19589
|
yield `?: (props: typeof ${slot.propsVar}) => any }`;
|
|
19571
19590
|
}
|
|
@@ -19772,6 +19791,7 @@ var require_compilerOptions = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19772
19791
|
inferTemplateDollarRefs: false,
|
|
19773
19792
|
inferTemplateDollarSlots: false,
|
|
19774
19793
|
skipTemplateCodegen: false,
|
|
19794
|
+
vapor: false,
|
|
19775
19795
|
fallthroughAttributes: false,
|
|
19776
19796
|
checkRequiredFallthroughAttributes: false,
|
|
19777
19797
|
resolveStyleImports: false,
|
|
@@ -22177,9 +22197,9 @@ var require_scriptSetup$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
22177
22197
|
}));
|
|
22178
22198
|
else transforms.push((0, transform_1.insert)(callExp.end, function* () {
|
|
22179
22199
|
yield ` as ${type}[`;
|
|
22180
|
-
const boundary = yield* boundary_1.Boundary.start(scriptSetup.name, exp.start, codeFeatures_1.codeFeatures.verification);
|
|
22200
|
+
const boundary = yield* boundary_1.Boundary.start(scriptSetup.name, exp.start, exp.end, codeFeatures_1.codeFeatures.verification);
|
|
22181
22201
|
yield `'$style'`;
|
|
22182
|
-
yield boundary.end(
|
|
22202
|
+
yield boundary.end();
|
|
22183
22203
|
yield `])`;
|
|
22184
22204
|
}));
|
|
22185
22205
|
}
|
|
@@ -22508,7 +22528,7 @@ var require_script = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
22508
22528
|
if (src.endsWith(".ts") && !src.endsWith(".d.ts")) src = src.slice(0, -3) + ".js";
|
|
22509
22529
|
else if (src.endsWith(".tsx")) src = src.slice(0, -4) + ".jsx";
|
|
22510
22530
|
yield `import ${names_1.names.src} from `;
|
|
22511
|
-
const boundary = yield* boundary_1.Boundary.start("main", script.src.offset, {
|
|
22531
|
+
const boundary = yield* boundary_1.Boundary.start("main", script.src.offset, script.src.offset + script.src.text.length, {
|
|
22512
22532
|
...codeFeatures_1.codeFeatures.all,
|
|
22513
22533
|
...src !== script.src.text ? codeFeatures_1.codeFeatures.navigationWithoutRename : {}
|
|
22514
22534
|
});
|
|
@@ -22521,7 +22541,7 @@ var require_script = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
22521
22541
|
];
|
|
22522
22542
|
yield src.slice(script.src.text.length);
|
|
22523
22543
|
yield `'`;
|
|
22524
|
-
yield boundary.end(
|
|
22544
|
+
yield boundary.end();
|
|
22525
22545
|
yield utils_1.endOfLine;
|
|
22526
22546
|
yield `export default ${names_1.names.src}${utils_1.endOfLine}`;
|
|
22527
22547
|
yield* (0, template_1.generateTemplate)(options, ctx, names_1.names.src);
|
|
@@ -22607,9 +22627,9 @@ var require_script = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
22607
22627
|
}
|
|
22608
22628
|
function* generateExportDeclareEqual(block, name) {
|
|
22609
22629
|
yield `const `;
|
|
22610
|
-
const boundary = yield* boundary_1.Boundary.start(block.name, 0, codeFeatures_1.codeFeatures.doNotReportTs6133);
|
|
22630
|
+
const boundary = yield* boundary_1.Boundary.start(block.name, 0, block.content.length, codeFeatures_1.codeFeatures.doNotReportTs6133);
|
|
22611
22631
|
yield name;
|
|
22612
|
-
yield boundary.end(
|
|
22632
|
+
yield boundary.end();
|
|
22613
22633
|
yield ` = `;
|
|
22614
22634
|
}
|
|
22615
22635
|
}));
|
|
@@ -22624,7 +22644,7 @@ var require_common$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
22624
22644
|
var boundary_1 = require_boundary();
|
|
22625
22645
|
function* generateClassProperty(source, classNameWithDot, offset, propertyType) {
|
|
22626
22646
|
yield `${utils_1.newLine} & { `;
|
|
22627
|
-
const boundary = yield* boundary_1.Boundary.start(source, offset, codeFeatures_1.codeFeatures.navigation);
|
|
22647
|
+
const boundary = yield* boundary_1.Boundary.start(source, offset, offset + classNameWithDot.length, codeFeatures_1.codeFeatures.navigation);
|
|
22628
22648
|
yield `'`;
|
|
22629
22649
|
yield [
|
|
22630
22650
|
classNameWithDot.slice(1),
|
|
@@ -22633,14 +22653,14 @@ var require_common$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
22633
22653
|
boundary.features
|
|
22634
22654
|
];
|
|
22635
22655
|
yield `'`;
|
|
22636
|
-
yield boundary.end(
|
|
22656
|
+
yield boundary.end();
|
|
22637
22657
|
yield `: ${propertyType}`;
|
|
22638
22658
|
yield ` }`;
|
|
22639
22659
|
}
|
|
22640
22660
|
function* generateStyleImports(style) {
|
|
22641
22661
|
if (typeof style.src === "object") {
|
|
22642
22662
|
yield `${utils_1.newLine} & typeof import(`;
|
|
22643
|
-
const boundary = yield* boundary_1.Boundary.start("main", style.src.offset, codeFeatures_1.codeFeatures.navigationAndVerification);
|
|
22663
|
+
const boundary = yield* boundary_1.Boundary.start("main", style.src.offset, style.src.offset + style.src.text.length, codeFeatures_1.codeFeatures.navigationAndVerification);
|
|
22644
22664
|
yield `'`;
|
|
22645
22665
|
yield [
|
|
22646
22666
|
style.src.text,
|
|
@@ -22649,7 +22669,7 @@ var require_common$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
22649
22669
|
boundary.features
|
|
22650
22670
|
];
|
|
22651
22671
|
yield `'`;
|
|
22652
|
-
yield boundary.end(
|
|
22672
|
+
yield boundary.end();
|
|
22653
22673
|
yield `).default`;
|
|
22654
22674
|
}
|
|
22655
22675
|
for (const { text, offset } of style.imports) {
|
|
@@ -23209,6 +23229,7 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
23209
23229
|
}
|
|
23210
23230
|
return vueCompilerOptions;
|
|
23211
23231
|
});
|
|
23232
|
+
const getIsVapor = (0, alien_signals_1.computed)(() => getResolvedOptions().vapor || !!(ir.scriptSetup?.attrs.vapor || ir.template?.attrs.vapor));
|
|
23212
23233
|
const getScriptRanges = (0, alien_signals_1.computed)(() => ir.script && validLangs.has(ir.script.lang) ? (0, scriptRanges_1.parseScriptRanges)(ts, ir.script.ast, getResolvedOptions()) : void 0);
|
|
23213
23234
|
const getScriptSetupRanges = (0, alien_signals_1.computed)(() => ir.scriptSetup && validLangs.has(ir.scriptSetup.lang) ? (0, scriptSetupRanges_1.parseScriptSetupRanges)(ts, ir.scriptSetup.ast, getResolvedOptions()) : void 0);
|
|
23214
23235
|
const getImportedComponents = (0, signals_1.computedSet)(() => {
|
|
@@ -23267,6 +23288,7 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
23267
23288
|
typescript: ts,
|
|
23268
23289
|
vueCompilerOptions: getResolvedOptions(),
|
|
23269
23290
|
template: ir.template,
|
|
23291
|
+
isVapor: getIsVapor(),
|
|
23270
23292
|
componentName: getComponentName(),
|
|
23271
23293
|
setupConsts: getSetupConsts(),
|
|
23272
23294
|
setupRefs: getSetupRefs(),
|
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.
|
|
4
|
+
"version": "1.1.56",
|
|
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.
|
|
58
|
-
"@vue/language-service": "^3.3.
|
|
59
|
-
"@vue/typescript-plugin": "^3.3.
|
|
57
|
+
"@vue/language-core": "^3.3.8",
|
|
58
|
+
"@vue/language-service": "^3.3.8",
|
|
59
|
+
"@vue/typescript-plugin": "^3.3.8",
|
|
60
60
|
"monaco-editor": "0.52.2",
|
|
61
61
|
"typescript": "^6.0.3",
|
|
62
62
|
"volar-service-typescript": "^0.0.71",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@rollup/plugin-commonjs": "^29.0.3",
|
|
68
|
-
"@skaldapp/configs": "^1.4.
|
|
68
|
+
"@skaldapp/configs": "^1.4.10",
|
|
69
69
|
"@types/markdown-it": "^14.1.2",
|
|
70
70
|
"@types/node": "^26.1.1",
|
|
71
71
|
"eslint": "^10.7.0",
|