@angular/material 15.1.1 → 15.1.3
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/checkbox/index.d.ts +1 -0
- package/core/typography/_typography.scss +2 -0
- package/dialog/_dialog-theme.scss +2 -2
- package/esm2020/checkbox/checkbox.mjs +11 -3
- package/esm2020/core/common-behaviors/common-module.mjs +8 -6
- package/esm2020/core/version.mjs +1 -1
- package/esm2020/menu/public-api.mjs +2 -2
- package/esm2020/tabs/tab-group.mjs +2 -2
- package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
- package/fesm2015/checkbox.mjs +10 -2
- package/fesm2015/checkbox.mjs.map +1 -1
- package/fesm2015/core.mjs +8 -6
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/menu.mjs.map +1 -1
- package/fesm2015/tabs.mjs +4 -4
- package/fesm2015/tabs.mjs.map +1 -1
- package/fesm2020/checkbox.mjs +10 -2
- package/fesm2020/checkbox.mjs.map +1 -1
- package/fesm2020/core.mjs +8 -6
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/menu.mjs.map +1 -1
- package/fesm2020/tabs.mjs +4 -4
- package/fesm2020/tabs.mjs.map +1 -1
- package/legacy-prebuilt-themes/legacy-deeppurple-amber.css +1 -1
- package/legacy-prebuilt-themes/legacy-indigo-pink.css +1 -1
- package/legacy-prebuilt-themes/legacy-pink-bluegrey.css +1 -1
- package/legacy-prebuilt-themes/legacy-purple-green.css +1 -1
- package/menu/index.d.ts +1 -1
- package/package.json +2 -2
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/mdc-migration/index_bundled.js +326 -104
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
- package/schematics/ng-update/index_bundled.js +197 -52
- package/schematics/ng-update/index_bundled.js.map +3 -3
- package/tabs/_tabs-common.scss +7 -3
- package/tabs/_tabs-theme.scss +1 -3
- package/schematics/ng-generate/mdc-migration/mdc_migration_bundle_metadata.json +0 -1
- package/schematics/ng-update/ng_update_index_metadata.json +0 -1
|
@@ -48,7 +48,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
48
48
|
}
|
|
49
49
|
return to;
|
|
50
50
|
};
|
|
51
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
51
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
52
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
53
|
+
mod
|
|
54
|
+
));
|
|
52
55
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
53
56
|
var __async = (__this, __arguments, generator) => {
|
|
54
57
|
return new Promise((resolve, reject) => {
|
|
@@ -954,7 +957,9 @@ var require_stringifier = __commonJS({
|
|
|
954
957
|
}
|
|
955
958
|
stringify(node, semicolon) {
|
|
956
959
|
if (!this[node.type]) {
|
|
957
|
-
throw new Error(
|
|
960
|
+
throw new Error(
|
|
961
|
+
"Unknown AST node type " + node.type + ". Maybe you need to change PostCSS stringifier."
|
|
962
|
+
);
|
|
958
963
|
}
|
|
959
964
|
this[node.type](node, semicolon);
|
|
960
965
|
}
|
|
@@ -1317,7 +1322,12 @@ var require_node = __commonJS({
|
|
|
1317
1322
|
error(message, opts = {}) {
|
|
1318
1323
|
if (this.source) {
|
|
1319
1324
|
let { start, end } = this.rangeBy(opts);
|
|
1320
|
-
return this.source.input.error(
|
|
1325
|
+
return this.source.input.error(
|
|
1326
|
+
message,
|
|
1327
|
+
{ line: start.line, column: start.column },
|
|
1328
|
+
{ line: end.line, column: end.column },
|
|
1329
|
+
opts
|
|
1330
|
+
);
|
|
1321
1331
|
}
|
|
1322
1332
|
return new CssSyntaxError(message);
|
|
1323
1333
|
}
|
|
@@ -1566,7 +1576,10 @@ var require_node = __commonJS({
|
|
|
1566
1576
|
error.postcssNode = this;
|
|
1567
1577
|
if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
|
|
1568
1578
|
let s = this.source;
|
|
1569
|
-
error.stack = error.stack.replace(
|
|
1579
|
+
error.stack = error.stack.replace(
|
|
1580
|
+
/\n\s{4}at /,
|
|
1581
|
+
`$&${s.input.from}:${s.start.line}:${s.start.column}$&`
|
|
1582
|
+
);
|
|
1570
1583
|
}
|
|
1571
1584
|
return error;
|
|
1572
1585
|
}
|
|
@@ -2307,7 +2320,9 @@ var require_source_map_generator = __commonJS({
|
|
|
2307
2320
|
var sourceFile = aSourceFile;
|
|
2308
2321
|
if (aSourceFile == null) {
|
|
2309
2322
|
if (aSourceMapConsumer.file == null) {
|
|
2310
|
-
throw new Error(
|
|
2323
|
+
throw new Error(
|
|
2324
|
+
`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
|
|
2325
|
+
);
|
|
2311
2326
|
}
|
|
2312
2327
|
sourceFile = aSourceMapConsumer.file;
|
|
2313
2328
|
}
|
|
@@ -2364,7 +2379,9 @@ var require_source_map_generator = __commonJS({
|
|
|
2364
2379
|
};
|
|
2365
2380
|
SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
|
|
2366
2381
|
if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
|
|
2367
|
-
throw new Error(
|
|
2382
|
+
throw new Error(
|
|
2383
|
+
"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."
|
|
2384
|
+
);
|
|
2368
2385
|
}
|
|
2369
2386
|
if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
|
|
2370
2387
|
return;
|
|
@@ -2500,7 +2517,14 @@ var require_binary_search = __commonJS({
|
|
|
2500
2517
|
if (aHaystack.length === 0) {
|
|
2501
2518
|
return -1;
|
|
2502
2519
|
}
|
|
2503
|
-
var index = recursiveSearch(
|
|
2520
|
+
var index = recursiveSearch(
|
|
2521
|
+
-1,
|
|
2522
|
+
aHaystack.length,
|
|
2523
|
+
aNeedle,
|
|
2524
|
+
aHaystack,
|
|
2525
|
+
aCompare,
|
|
2526
|
+
aBias || exports.GREATEST_LOWER_BOUND
|
|
2527
|
+
);
|
|
2504
2528
|
if (index < 0) {
|
|
2505
2529
|
return -1;
|
|
2506
2530
|
}
|
|
@@ -2661,7 +2685,14 @@ var require_source_map_consumer = __commonJS({
|
|
|
2661
2685
|
return [];
|
|
2662
2686
|
}
|
|
2663
2687
|
var mappings = [];
|
|
2664
|
-
var index = this._findMapping(
|
|
2688
|
+
var index = this._findMapping(
|
|
2689
|
+
needle,
|
|
2690
|
+
this._originalMappings,
|
|
2691
|
+
"originalLine",
|
|
2692
|
+
"originalColumn",
|
|
2693
|
+
util.compareByOriginalPositions,
|
|
2694
|
+
binarySearch.LEAST_UPPER_BOUND
|
|
2695
|
+
);
|
|
2665
2696
|
if (index >= 0) {
|
|
2666
2697
|
var mapping = this._originalMappings[index];
|
|
2667
2698
|
if (aArgs.column === void 0) {
|
|
@@ -2744,7 +2775,10 @@ var require_source_map_consumer = __commonJS({
|
|
|
2744
2775
|
var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
|
2745
2776
|
var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
|
2746
2777
|
smc.sourceRoot = aSourceMap._sourceRoot;
|
|
2747
|
-
smc.sourcesContent = aSourceMap._generateSourcesContent(
|
|
2778
|
+
smc.sourcesContent = aSourceMap._generateSourcesContent(
|
|
2779
|
+
smc._sources.toArray(),
|
|
2780
|
+
smc.sourceRoot
|
|
2781
|
+
);
|
|
2748
2782
|
smc.file = aSourceMap._file;
|
|
2749
2783
|
smc._sourceMapURL = aSourceMapURL;
|
|
2750
2784
|
smc._absoluteSources = smc._sources.toArray().map(function(s) {
|
|
@@ -2925,7 +2959,14 @@ var require_source_map_consumer = __commonJS({
|
|
|
2925
2959
|
generatedLine: util.getArg(aArgs, "line"),
|
|
2926
2960
|
generatedColumn: util.getArg(aArgs, "column")
|
|
2927
2961
|
};
|
|
2928
|
-
var index = this._findMapping(
|
|
2962
|
+
var index = this._findMapping(
|
|
2963
|
+
needle,
|
|
2964
|
+
this._generatedMappings,
|
|
2965
|
+
"generatedLine",
|
|
2966
|
+
"generatedColumn",
|
|
2967
|
+
util.compareByGeneratedPositionsDeflated,
|
|
2968
|
+
util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
|
|
2969
|
+
);
|
|
2929
2970
|
if (index >= 0) {
|
|
2930
2971
|
var mapping = this._generatedMappings[index];
|
|
2931
2972
|
if (mapping.generatedLine === needle.generatedLine) {
|
|
@@ -3004,7 +3045,14 @@ var require_source_map_consumer = __commonJS({
|
|
|
3004
3045
|
originalLine: util.getArg(aArgs, "line"),
|
|
3005
3046
|
originalColumn: util.getArg(aArgs, "column")
|
|
3006
3047
|
};
|
|
3007
|
-
var index = this._findMapping(
|
|
3048
|
+
var index = this._findMapping(
|
|
3049
|
+
needle,
|
|
3050
|
+
this._originalMappings,
|
|
3051
|
+
"originalLine",
|
|
3052
|
+
"originalColumn",
|
|
3053
|
+
util.compareByOriginalPositions,
|
|
3054
|
+
util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
|
|
3055
|
+
);
|
|
3008
3056
|
if (index >= 0) {
|
|
3009
3057
|
var mapping = this._originalMappings[index];
|
|
3010
3058
|
if (mapping.source === needle.source) {
|
|
@@ -3077,13 +3125,17 @@ var require_source_map_consumer = __commonJS({
|
|
|
3077
3125
|
generatedLine: util.getArg(aArgs, "line"),
|
|
3078
3126
|
generatedColumn: util.getArg(aArgs, "column")
|
|
3079
3127
|
};
|
|
3080
|
-
var sectionIndex = binarySearch.search(
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3128
|
+
var sectionIndex = binarySearch.search(
|
|
3129
|
+
needle,
|
|
3130
|
+
this._sections,
|
|
3131
|
+
function(needle2, section2) {
|
|
3132
|
+
var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
|
|
3133
|
+
if (cmp) {
|
|
3134
|
+
return cmp;
|
|
3135
|
+
}
|
|
3136
|
+
return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
|
|
3084
3137
|
}
|
|
3085
|
-
|
|
3086
|
-
});
|
|
3138
|
+
);
|
|
3087
3139
|
var section = this._sections[sectionIndex];
|
|
3088
3140
|
if (!section) {
|
|
3089
3141
|
return {
|
|
@@ -3259,7 +3311,13 @@ var require_source_node = __commonJS({
|
|
|
3259
3311
|
node.add(code);
|
|
3260
3312
|
} else {
|
|
3261
3313
|
var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
|
|
3262
|
-
node.add(new SourceNode(
|
|
3314
|
+
node.add(new SourceNode(
|
|
3315
|
+
mapping.originalLine,
|
|
3316
|
+
mapping.originalColumn,
|
|
3317
|
+
source,
|
|
3318
|
+
code,
|
|
3319
|
+
mapping.name
|
|
3320
|
+
));
|
|
3263
3321
|
}
|
|
3264
3322
|
}
|
|
3265
3323
|
};
|
|
@@ -3273,7 +3331,9 @@ var require_source_node = __commonJS({
|
|
|
3273
3331
|
this.children.push(aChunk);
|
|
3274
3332
|
}
|
|
3275
3333
|
} else {
|
|
3276
|
-
throw new TypeError(
|
|
3334
|
+
throw new TypeError(
|
|
3335
|
+
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
|
|
3336
|
+
);
|
|
3277
3337
|
}
|
|
3278
3338
|
return this;
|
|
3279
3339
|
};
|
|
@@ -3285,7 +3345,9 @@ var require_source_node = __commonJS({
|
|
|
3285
3345
|
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
3286
3346
|
this.children.unshift(aChunk);
|
|
3287
3347
|
} else {
|
|
3288
|
-
throw new TypeError(
|
|
3348
|
+
throw new TypeError(
|
|
3349
|
+
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
|
|
3350
|
+
);
|
|
3289
3351
|
}
|
|
3290
3352
|
return this;
|
|
3291
3353
|
};
|
|
@@ -3557,7 +3619,9 @@ var require_previous_map = __commonJS({
|
|
|
3557
3619
|
if (prevPath) {
|
|
3558
3620
|
let map = this.loadFile(prevPath);
|
|
3559
3621
|
if (!map) {
|
|
3560
|
-
throw new Error(
|
|
3622
|
+
throw new Error(
|
|
3623
|
+
"Unable to load previous source map: " + prevPath.toString()
|
|
3624
|
+
);
|
|
3561
3625
|
}
|
|
3562
3626
|
return map;
|
|
3563
3627
|
}
|
|
@@ -3568,7 +3632,9 @@ var require_previous_map = __commonJS({
|
|
|
3568
3632
|
} else if (this.isMap(prev)) {
|
|
3569
3633
|
return JSON.stringify(prev);
|
|
3570
3634
|
} else {
|
|
3571
|
-
throw new Error(
|
|
3635
|
+
throw new Error(
|
|
3636
|
+
"Unsupported previous source map format: " + prev.toString()
|
|
3637
|
+
);
|
|
3572
3638
|
}
|
|
3573
3639
|
} else if (this.inline) {
|
|
3574
3640
|
return this.decodeInline(this.annotation);
|
|
@@ -3704,9 +3770,23 @@ var require_input = __commonJS({
|
|
|
3704
3770
|
}
|
|
3705
3771
|
let origin = this.origin(line, column, endLine, endColumn);
|
|
3706
3772
|
if (origin) {
|
|
3707
|
-
result = new CssSyntaxError(
|
|
3773
|
+
result = new CssSyntaxError(
|
|
3774
|
+
message,
|
|
3775
|
+
origin.endLine === void 0 ? origin.line : { line: origin.line, column: origin.column },
|
|
3776
|
+
origin.endLine === void 0 ? origin.column : { line: origin.endLine, column: origin.endColumn },
|
|
3777
|
+
origin.source,
|
|
3778
|
+
origin.file,
|
|
3779
|
+
opts.plugin
|
|
3780
|
+
);
|
|
3708
3781
|
} else {
|
|
3709
|
-
result = new CssSyntaxError(
|
|
3782
|
+
result = new CssSyntaxError(
|
|
3783
|
+
message,
|
|
3784
|
+
endLine === void 0 ? line : { line, column },
|
|
3785
|
+
endLine === void 0 ? column : { line: endLine, column: endColumn },
|
|
3786
|
+
this.css,
|
|
3787
|
+
this.file,
|
|
3788
|
+
opts.plugin
|
|
3789
|
+
);
|
|
3710
3790
|
}
|
|
3711
3791
|
result.input = { line, column, endLine, endColumn, source: this.css };
|
|
3712
3792
|
if (this.file) {
|
|
@@ -3732,7 +3812,10 @@ var require_input = __commonJS({
|
|
|
3732
3812
|
if (isAbsolute(from.source)) {
|
|
3733
3813
|
fromUrl = pathToFileURL(from.source);
|
|
3734
3814
|
} else {
|
|
3735
|
-
fromUrl = new URL(
|
|
3815
|
+
fromUrl = new URL(
|
|
3816
|
+
from.source,
|
|
3817
|
+
this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
|
|
3818
|
+
);
|
|
3736
3819
|
}
|
|
3737
3820
|
let result = {
|
|
3738
3821
|
url: fromUrl.toString(),
|
|
@@ -3999,7 +4082,9 @@ var require_map_generator = __commonJS({
|
|
|
3999
4082
|
if (pathToFileURL) {
|
|
4000
4083
|
return pathToFileURL(path).toString();
|
|
4001
4084
|
} else {
|
|
4002
|
-
throw new Error(
|
|
4085
|
+
throw new Error(
|
|
4086
|
+
"`map.absolute` option is not available in this PostCSS build"
|
|
4087
|
+
);
|
|
4003
4088
|
}
|
|
4004
4089
|
}
|
|
4005
4090
|
sourcePath(node) {
|
|
@@ -4429,17 +4514,21 @@ var require_container = __commonJS({
|
|
|
4429
4514
|
return node[prop];
|
|
4430
4515
|
} else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) {
|
|
4431
4516
|
return (...args) => {
|
|
4432
|
-
return node[prop](
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4517
|
+
return node[prop](
|
|
4518
|
+
...args.map((i) => {
|
|
4519
|
+
if (typeof i === "function") {
|
|
4520
|
+
return (child, index) => i(child.toProxy(), index);
|
|
4521
|
+
} else {
|
|
4522
|
+
return i;
|
|
4523
|
+
}
|
|
4524
|
+
})
|
|
4525
|
+
);
|
|
4439
4526
|
};
|
|
4440
4527
|
} else if (prop === "every" || prop === "some") {
|
|
4441
4528
|
return (cb) => {
|
|
4442
|
-
return node[prop](
|
|
4529
|
+
return node[prop](
|
|
4530
|
+
(child, ...other) => cb(child.toProxy(), ...other)
|
|
4531
|
+
);
|
|
4443
4532
|
};
|
|
4444
4533
|
} else if (prop === "root") {
|
|
4445
4534
|
return () => node.root().toProxy();
|
|
@@ -4960,7 +5049,9 @@ var require_parser = __commonJS({
|
|
|
4960
5049
|
this.semicolon = true;
|
|
4961
5050
|
tokens.pop();
|
|
4962
5051
|
}
|
|
4963
|
-
node.source.end = this.getPosition(
|
|
5052
|
+
node.source.end = this.getPosition(
|
|
5053
|
+
last[3] || last[2] || findLastWithPosition(tokens)
|
|
5054
|
+
);
|
|
4964
5055
|
while (tokens[0][0] !== "word") {
|
|
4965
5056
|
if (tokens.length === 1)
|
|
4966
5057
|
this.unknownWord(tokens);
|
|
@@ -5267,23 +5358,43 @@ var require_parser = __commonJS({
|
|
|
5267
5358
|
return false;
|
|
5268
5359
|
}
|
|
5269
5360
|
unclosedBracket(bracket) {
|
|
5270
|
-
throw this.input.error(
|
|
5361
|
+
throw this.input.error(
|
|
5362
|
+
"Unclosed bracket",
|
|
5363
|
+
{ offset: bracket[2] },
|
|
5364
|
+
{ offset: bracket[2] + 1 }
|
|
5365
|
+
);
|
|
5271
5366
|
}
|
|
5272
5367
|
unknownWord(tokens) {
|
|
5273
|
-
throw this.input.error(
|
|
5368
|
+
throw this.input.error(
|
|
5369
|
+
"Unknown word",
|
|
5370
|
+
{ offset: tokens[0][2] },
|
|
5371
|
+
{ offset: tokens[0][2] + tokens[0][1].length }
|
|
5372
|
+
);
|
|
5274
5373
|
}
|
|
5275
5374
|
unexpectedClose(token) {
|
|
5276
|
-
throw this.input.error(
|
|
5375
|
+
throw this.input.error(
|
|
5376
|
+
"Unexpected }",
|
|
5377
|
+
{ offset: token[2] },
|
|
5378
|
+
{ offset: token[2] + 1 }
|
|
5379
|
+
);
|
|
5277
5380
|
}
|
|
5278
5381
|
unclosedBlock() {
|
|
5279
5382
|
let pos = this.current.source.start;
|
|
5280
5383
|
throw this.input.error("Unclosed block", pos.line, pos.column);
|
|
5281
5384
|
}
|
|
5282
5385
|
doubleColon(token) {
|
|
5283
|
-
throw this.input.error(
|
|
5386
|
+
throw this.input.error(
|
|
5387
|
+
"Double colon",
|
|
5388
|
+
{ offset: token[2] },
|
|
5389
|
+
{ offset: token[2] + token[1].length }
|
|
5390
|
+
);
|
|
5284
5391
|
}
|
|
5285
5392
|
unnamedAtrule(node, token) {
|
|
5286
|
-
throw this.input.error(
|
|
5393
|
+
throw this.input.error(
|
|
5394
|
+
"At-rule without name",
|
|
5395
|
+
{ offset: token[2] },
|
|
5396
|
+
{ offset: token[2] + token[1].length }
|
|
5397
|
+
);
|
|
5287
5398
|
}
|
|
5288
5399
|
precheckMissedSemicolon() {
|
|
5289
5400
|
}
|
|
@@ -5301,7 +5412,10 @@ var require_parser = __commonJS({
|
|
|
5301
5412
|
break;
|
|
5302
5413
|
}
|
|
5303
5414
|
}
|
|
5304
|
-
throw this.input.error(
|
|
5415
|
+
throw this.input.error(
|
|
5416
|
+
"Missed semicolon",
|
|
5417
|
+
token[0] === "word" ? token[3] + 1 : token[2]
|
|
5418
|
+
);
|
|
5305
5419
|
}
|
|
5306
5420
|
};
|
|
5307
5421
|
module2.exports = Parser;
|
|
@@ -5516,7 +5630,9 @@ var require_lazy_result = __commonJS({
|
|
|
5516
5630
|
then(onFulfilled, onRejected) {
|
|
5517
5631
|
if (process.env.NODE_ENV !== "production") {
|
|
5518
5632
|
if (!("from" in this.opts)) {
|
|
5519
|
-
warnOnce(
|
|
5633
|
+
warnOnce(
|
|
5634
|
+
"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."
|
|
5635
|
+
);
|
|
5520
5636
|
}
|
|
5521
5637
|
}
|
|
5522
5638
|
return this.async().then(onFulfilled, onRejected);
|
|
@@ -5634,7 +5750,9 @@ var require_lazy_result = __commonJS({
|
|
|
5634
5750
|
try {
|
|
5635
5751
|
if (typeof plugin === "object" && plugin.Once) {
|
|
5636
5752
|
if (this.result.root.type === "document") {
|
|
5637
|
-
let roots = this.result.root.nodes.map(
|
|
5753
|
+
let roots = this.result.root.nodes.map(
|
|
5754
|
+
(root) => plugin.Once(root, this.helpers)
|
|
5755
|
+
);
|
|
5638
5756
|
if (isPromise(roots[0])) {
|
|
5639
5757
|
return Promise.all(roots);
|
|
5640
5758
|
}
|
|
@@ -5668,7 +5786,9 @@ var require_lazy_result = __commonJS({
|
|
|
5668
5786
|
let a = pluginVer.split(".");
|
|
5669
5787
|
let b = runtimeVer.split(".");
|
|
5670
5788
|
if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {
|
|
5671
|
-
console.error(
|
|
5789
|
+
console.error(
|
|
5790
|
+
"Unknown error from PostCSS plugin. Your current PostCSS version is " + runtimeVer + ", but " + pluginName + " uses " + pluginVer + ". Perhaps this is the source of the error below."
|
|
5791
|
+
);
|
|
5672
5792
|
}
|
|
5673
5793
|
}
|
|
5674
5794
|
}
|
|
@@ -5715,7 +5835,9 @@ var require_lazy_result = __commonJS({
|
|
|
5715
5835
|
this.result.lastPlugin = plugin;
|
|
5716
5836
|
try {
|
|
5717
5837
|
if (root.type === "document") {
|
|
5718
|
-
let roots = root.nodes.map(
|
|
5838
|
+
let roots = root.nodes.map(
|
|
5839
|
+
(subRoot) => visitor(subRoot, this.helpers)
|
|
5840
|
+
);
|
|
5719
5841
|
yield Promise.all(roots);
|
|
5720
5842
|
} else {
|
|
5721
5843
|
yield visitor(root, this.helpers);
|
|
@@ -5741,7 +5863,9 @@ var require_lazy_result = __commonJS({
|
|
|
5741
5863
|
if (typeof plugin === "object") {
|
|
5742
5864
|
for (let event in plugin) {
|
|
5743
5865
|
if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {
|
|
5744
|
-
throw new Error(
|
|
5866
|
+
throw new Error(
|
|
5867
|
+
`Unknown event ${event} in ${plugin.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`
|
|
5868
|
+
);
|
|
5745
5869
|
}
|
|
5746
5870
|
if (!NOT_VISITORS[event]) {
|
|
5747
5871
|
if (typeof plugin[event] === "object") {
|
|
@@ -5749,7 +5873,11 @@ var require_lazy_result = __commonJS({
|
|
|
5749
5873
|
if (filter === "*") {
|
|
5750
5874
|
add(plugin, event, plugin[event][filter]);
|
|
5751
5875
|
} else {
|
|
5752
|
-
add(
|
|
5876
|
+
add(
|
|
5877
|
+
plugin,
|
|
5878
|
+
event + "-" + filter.toLowerCase(),
|
|
5879
|
+
plugin[event][filter]
|
|
5880
|
+
);
|
|
5753
5881
|
}
|
|
5754
5882
|
}
|
|
5755
5883
|
} else if (typeof plugin[event] === "function") {
|
|
@@ -5910,7 +6038,9 @@ var require_no_work_result = __commonJS({
|
|
|
5910
6038
|
then(onFulfilled, onRejected) {
|
|
5911
6039
|
if (process.env.NODE_ENV !== "production") {
|
|
5912
6040
|
if (!("from" in this._opts)) {
|
|
5913
|
-
warnOnce(
|
|
6041
|
+
warnOnce(
|
|
6042
|
+
"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."
|
|
6043
|
+
);
|
|
5914
6044
|
}
|
|
5915
6045
|
}
|
|
5916
6046
|
return this.async().then(onFulfilled, onRejected);
|
|
@@ -5977,7 +6107,9 @@ var require_processor = __commonJS({
|
|
|
5977
6107
|
normalized.push(i);
|
|
5978
6108
|
} else if (typeof i === "object" && (i.parse || i.stringify)) {
|
|
5979
6109
|
if (process.env.NODE_ENV !== "production") {
|
|
5980
|
-
throw new Error(
|
|
6110
|
+
throw new Error(
|
|
6111
|
+
"PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation."
|
|
6112
|
+
);
|
|
5981
6113
|
}
|
|
5982
6114
|
} else {
|
|
5983
6115
|
throw new Error(i + " is not a PostCSS plugin");
|
|
@@ -6082,9 +6214,13 @@ var require_postcss = __commonJS({
|
|
|
6082
6214
|
function creator(...args) {
|
|
6083
6215
|
if (console && console.warn && !warningPrinted) {
|
|
6084
6216
|
warningPrinted = true;
|
|
6085
|
-
console.warn(
|
|
6217
|
+
console.warn(
|
|
6218
|
+
name + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"
|
|
6219
|
+
);
|
|
6086
6220
|
if (process.env.LANG && process.env.LANG.startsWith("cn")) {
|
|
6087
|
-
console.warn(
|
|
6221
|
+
console.warn(
|
|
6222
|
+
name + ": \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:\nhttps://www.w3ctech.com/topic/2226"
|
|
6223
|
+
);
|
|
6088
6224
|
}
|
|
6089
6225
|
}
|
|
6090
6226
|
let transformer = initializer(...args);
|
|
@@ -7100,8 +7236,17 @@ var require_legacy_components_v15 = __commonJS({
|
|
|
7100
7236
|
this._replaceAt(filePath, node.pos, str);
|
|
7101
7237
|
}
|
|
7102
7238
|
_replaceAt(filePath, offset, str) {
|
|
7239
|
+
var _a;
|
|
7103
7240
|
const index = this.fileSystem.read(filePath).indexOf(str.old, offset);
|
|
7104
|
-
this.
|
|
7241
|
+
(_a = this._updates) != null ? _a : this._updates = [];
|
|
7242
|
+
this._updates.push({
|
|
7243
|
+
offset: index,
|
|
7244
|
+
update: () => this.fileSystem.edit(filePath).remove(index, str.old.length).insertRight(index, str.new)
|
|
7245
|
+
});
|
|
7246
|
+
}
|
|
7247
|
+
postAnalysis() {
|
|
7248
|
+
var _a;
|
|
7249
|
+
(_a = this._updates) == null ? void 0 : _a.sort((a, b) => b.offset - a.offset).forEach(({ update }) => update());
|
|
7105
7250
|
}
|
|
7106
7251
|
};
|
|
7107
7252
|
exports.LegacyComponentsMigration = LegacyComponentsMigration2;
|