stylelint-config-silverwind 34.1.4 → 35.0.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.
- package/dist/index.js +116 -51
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -2074,8 +2074,8 @@ var hasRequiredSymbols;
|
|
|
2074
2074
|
function requireSymbols() {
|
|
2075
2075
|
if (hasRequiredSymbols) return symbols;
|
|
2076
2076
|
hasRequiredSymbols = 1;
|
|
2077
|
-
symbols.isClean = Symbol("isClean");
|
|
2078
|
-
symbols.my = Symbol("my");
|
|
2077
|
+
symbols.isClean = /* @__PURE__ */ Symbol("isClean");
|
|
2078
|
+
symbols.my = /* @__PURE__ */ Symbol("my");
|
|
2079
2079
|
return symbols;
|
|
2080
2080
|
}
|
|
2081
2081
|
var node$3;
|
|
@@ -5008,7 +5008,7 @@ function requireInput() {
|
|
|
5008
5008
|
let CssSyntaxError = requireCssSyntaxError();
|
|
5009
5009
|
let PreviousMap = requirePreviousMap();
|
|
5010
5010
|
let terminalHighlight = requireTerminalHighlight();
|
|
5011
|
-
let lineToIndexCache = Symbol("lineToIndexCache");
|
|
5011
|
+
let lineToIndexCache = /* @__PURE__ */ Symbol("lineToIndexCache");
|
|
5012
5012
|
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
5013
5013
|
let pathAvailable = Boolean(resolve2 && isAbsolute);
|
|
5014
5014
|
function getLineToIndex(input2) {
|
|
@@ -8898,7 +8898,7 @@ function resolveId(id2, basedir, {
|
|
|
8898
8898
|
});
|
|
8899
8899
|
}
|
|
8900
8900
|
async function getCustomPropertiesFromRoot(root2, resolver) {
|
|
8901
|
-
let customProperties =
|
|
8901
|
+
let customProperties = Object(null);
|
|
8902
8902
|
let sourceDir = process.cwd();
|
|
8903
8903
|
if (root2.source && root2.source.input && root2.source.input.file) {
|
|
8904
8904
|
sourceDir = path$2.dirname(root2.source.input.file);
|
|
@@ -8921,6 +8921,60 @@ async function getCustomPropertiesFromRoot(root2, resolver) {
|
|
|
8921
8921
|
importPromises.push(promise);
|
|
8922
8922
|
}
|
|
8923
8923
|
});
|
|
8924
|
+
root2.walkAtRules("property", (atRule2) => {
|
|
8925
|
+
console.log(atRule2);
|
|
8926
|
+
const nodes = valueParser(atRule2.params).nodes;
|
|
8927
|
+
const names = [];
|
|
8928
|
+
for (let i2 = 0; i2 < nodes.length; i2++) {
|
|
8929
|
+
let node2 = nodes[i2];
|
|
8930
|
+
if (node2.type === "word" && node2.value.startsWith("--")) {
|
|
8931
|
+
names.push(node2.value);
|
|
8932
|
+
while (!(node2.type === "div" && node2.value === ",")) {
|
|
8933
|
+
i2++;
|
|
8934
|
+
node2 = nodes[i2];
|
|
8935
|
+
if (!node2) {
|
|
8936
|
+
break;
|
|
8937
|
+
}
|
|
8938
|
+
}
|
|
8939
|
+
}
|
|
8940
|
+
}
|
|
8941
|
+
const atProperty = {
|
|
8942
|
+
inherits: void 0,
|
|
8943
|
+
syntax: void 0,
|
|
8944
|
+
initialValue: void 0
|
|
8945
|
+
};
|
|
8946
|
+
atRule2.each((descriptor) => {
|
|
8947
|
+
if (descriptor.type !== "decl") {
|
|
8948
|
+
return;
|
|
8949
|
+
}
|
|
8950
|
+
switch (descriptor.prop) {
|
|
8951
|
+
case "initial-value":
|
|
8952
|
+
atProperty.initialValue = descriptor.value;
|
|
8953
|
+
return;
|
|
8954
|
+
case "syntax":
|
|
8955
|
+
atProperty.syntax = descriptor.value.trim();
|
|
8956
|
+
break;
|
|
8957
|
+
case "inherits":
|
|
8958
|
+
atProperty.inherits = descriptor.value.trim();
|
|
8959
|
+
break;
|
|
8960
|
+
}
|
|
8961
|
+
});
|
|
8962
|
+
if (typeof atProperty.inherits === "undefined" || typeof atProperty.syntax === "undefined") {
|
|
8963
|
+
return;
|
|
8964
|
+
}
|
|
8965
|
+
if (atProperty.syntax === "*" || atProperty.syntax === "'*'" || atProperty.syntax === '"*"') {
|
|
8966
|
+
names.forEach((name) => {
|
|
8967
|
+
customProperties[name] = {};
|
|
8968
|
+
});
|
|
8969
|
+
return;
|
|
8970
|
+
}
|
|
8971
|
+
if (typeof atProperty.initialValue === "undefined") {
|
|
8972
|
+
return;
|
|
8973
|
+
}
|
|
8974
|
+
names.forEach((name) => {
|
|
8975
|
+
customProperties[name] = {};
|
|
8976
|
+
});
|
|
8977
|
+
});
|
|
8924
8978
|
(await Promise.all(importPromises)).forEach((propertiesFromImport) => {
|
|
8925
8979
|
customProperties = Object.assign(customProperties, propertiesFromImport);
|
|
8926
8980
|
});
|
|
@@ -8928,7 +8982,7 @@ async function getCustomPropertiesFromRoot(root2, resolver) {
|
|
|
8928
8982
|
if (!decl.variable || !decl.prop.startsWith("--")) {
|
|
8929
8983
|
return;
|
|
8930
8984
|
}
|
|
8931
|
-
customProperties[decl.prop] =
|
|
8985
|
+
customProperties[decl.prop] = {};
|
|
8932
8986
|
});
|
|
8933
8987
|
return customProperties;
|
|
8934
8988
|
}
|
|
@@ -9050,7 +9104,8 @@ const validateValueAST = (ast, { result: result2, customProperties, decl }) => {
|
|
|
9050
9104
|
return;
|
|
9051
9105
|
}
|
|
9052
9106
|
stylelint.utils.report({
|
|
9053
|
-
message: messages$1d.unexpected
|
|
9107
|
+
message: messages$1d.unexpected,
|
|
9108
|
+
messageArgs: [propertyName, decl.prop],
|
|
9054
9109
|
node: decl,
|
|
9055
9110
|
result: result2,
|
|
9056
9111
|
ruleName: ruleName$1d,
|
|
@@ -9060,8 +9115,8 @@ const validateValueAST = (ast, { result: result2, customProperties, decl }) => {
|
|
|
9060
9115
|
});
|
|
9061
9116
|
};
|
|
9062
9117
|
const isVarFunction = (node2) => node2.type === "function" && node2.value === "var" && node2.nodes[0].value.startsWith("--");
|
|
9063
|
-
const validateResult = (result2, customProperties) => {
|
|
9064
|
-
|
|
9118
|
+
const validateResult = (root2, result2, customProperties) => {
|
|
9119
|
+
root2.walkDecls((decl) => {
|
|
9065
9120
|
if (hasCustomPropertyReference(decl)) {
|
|
9066
9121
|
validateDecl(decl, { result: result2, customProperties });
|
|
9067
9122
|
}
|
|
@@ -9088,7 +9143,7 @@ const ruleFunction = (method, opts) => {
|
|
|
9088
9143
|
await customPropertiesPromise,
|
|
9089
9144
|
await getCustomPropertiesFromRoot(root2, resolver)
|
|
9090
9145
|
);
|
|
9091
|
-
validateResult(result2, customProperties);
|
|
9146
|
+
validateResult(root2, result2, customProperties);
|
|
9092
9147
|
}
|
|
9093
9148
|
};
|
|
9094
9149
|
};
|
|
@@ -18065,6 +18120,9 @@ function rule$H(primary, secondaryOptions = {}) {
|
|
|
18065
18120
|
if (ruleNode.params) {
|
|
18066
18121
|
ruleLevel += 1;
|
|
18067
18122
|
}
|
|
18123
|
+
if (selector2.match(/:\w+\(\s*\r?\n/)) {
|
|
18124
|
+
ruleLevel += 1;
|
|
18125
|
+
}
|
|
18068
18126
|
checkMultilineBit(selector2, ruleLevel, ruleNode);
|
|
18069
18127
|
}
|
|
18070
18128
|
function checkAtRuleParams(atRule2, ruleLevel) {
|
|
@@ -19010,6 +19068,9 @@ function isIdentCodePoint(e3) {
|
|
|
19010
19068
|
function isNonASCII_IdentCodePoint(e3) {
|
|
19011
19069
|
return 183 === e3 || 8204 === e3 || 8205 === e3 || 8255 === e3 || 8256 === e3 || 8204 === e3 || (192 <= e3 && e3 <= 214 || 216 <= e3 && e3 <= 246 || 248 <= e3 && e3 <= 893 || 895 <= e3 && e3 <= 8191 || 8304 <= e3 && e3 <= 8591 || 11264 <= e3 && e3 <= 12271 || 12289 <= e3 && e3 <= 55295 || 63744 <= e3 && e3 <= 64975 || 65008 <= e3 && e3 <= 65533 || (0 === e3 || (!!isSurrogate(e3) || e3 >= 65536)));
|
|
19012
19070
|
}
|
|
19071
|
+
function isNonPrintableCodePoint(e3) {
|
|
19072
|
+
return 11 === e3 || 127 === e3 || 0 <= e3 && e3 <= 8 || 14 <= e3 && e3 <= 31;
|
|
19073
|
+
}
|
|
19013
19074
|
function isNewLine(e3) {
|
|
19014
19075
|
return e3 === r || e3 === t || 12 === e3;
|
|
19015
19076
|
}
|
|
@@ -19235,13 +19296,13 @@ function consumeUrlToken(n2, t2) {
|
|
|
19235
19296
|
}
|
|
19236
19297
|
return 41 === t2.source.codePointAt(t2.cursor) ? (t2.advanceCodePoint(), [c.URL, t2.source.slice(t2.representationStart, t2.representationEnd + 1), t2.representationStart, t2.representationEnd, { value: o2 }]) : (consumeBadURL(n2, t2), [c.BadURL, t2.source.slice(t2.representationStart, t2.representationEnd + 1), t2.representationStart, t2.representationEnd, void 0]);
|
|
19237
19298
|
}
|
|
19238
|
-
const
|
|
19239
|
-
if (34 ===
|
|
19299
|
+
const r2 = t2.source.codePointAt(t2.cursor);
|
|
19300
|
+
if (34 === r2 || 39 === r2 || 40 === r2 || isNonPrintableCodePoint(r2 ?? -1)) {
|
|
19240
19301
|
consumeBadURL(n2, t2);
|
|
19241
19302
|
const o3 = [c.BadURL, t2.source.slice(t2.representationStart, t2.representationEnd + 1), t2.representationStart, t2.representationEnd, void 0];
|
|
19242
19303
|
return n2.onParseError(new ParseErrorWithToken(e2.UnexpectedCharacterInURL, t2.representationStart, t2.representationEnd, ["4.3.6. Consume a url token", `Unexpected U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+0028 LEFT PARENTHESIS (() or non-printable code point`], o3)), o3;
|
|
19243
19304
|
}
|
|
19244
|
-
if (92 ===
|
|
19305
|
+
if (92 === r2) {
|
|
19245
19306
|
if (checkIfTwoCodePointsAreAValidEscape(t2)) {
|
|
19246
19307
|
t2.advanceCodePoint(), o2 += String.fromCodePoint(consumeEscapedCodePoint(n2, t2));
|
|
19247
19308
|
continue;
|
|
@@ -19252,7 +19313,6 @@ function consumeUrlToken(n2, t2) {
|
|
|
19252
19313
|
}
|
|
19253
19314
|
0 === t2.source.codePointAt(t2.cursor) || isSurrogate(t2.source.codePointAt(t2.cursor) ?? -1) ? (o2 += String.fromCodePoint(s), t2.advanceCodePoint()) : (o2 += t2.source[t2.cursor], t2.advanceCodePoint());
|
|
19254
19315
|
}
|
|
19255
|
-
var r2;
|
|
19256
19316
|
}
|
|
19257
19317
|
function consumeIdentLikeToken(e3, n2) {
|
|
19258
19318
|
const t2 = consumeIdentSequence(e3, n2);
|
|
@@ -19497,7 +19557,7 @@ class ContainerNodeBaseClass {
|
|
|
19497
19557
|
}
|
|
19498
19558
|
}
|
|
19499
19559
|
walk(e3, n2) {
|
|
19500
|
-
0 !== this.value.length && this.forEach((
|
|
19560
|
+
0 !== this.value.length && this.forEach((n3, t2) => false !== e3(n3, t2) && ((!("walk" in n3.node) || !this.value.includes(n3.node) || false !== n3.node.walk(e3, n3.state)) && void 0), n2);
|
|
19501
19561
|
}
|
|
19502
19562
|
}
|
|
19503
19563
|
class FunctionNode extends ContainerNodeBaseClass {
|
|
@@ -19514,14 +19574,14 @@ class FunctionNode extends ContainerNodeBaseClass {
|
|
|
19514
19574
|
isTokenEOF(this.endToken) && (this.endToken = [c.CloseParen, ")", -1, -1, void 0]);
|
|
19515
19575
|
}
|
|
19516
19576
|
tokens() {
|
|
19517
|
-
return isTokenEOF(this.endToken) ? [this.name, ...this.value.flatMap((
|
|
19577
|
+
return isTokenEOF(this.endToken) ? [this.name, ...this.value.flatMap((e3) => e3.tokens())] : [this.name, ...this.value.flatMap((e3) => e3.tokens()), this.endToken];
|
|
19518
19578
|
}
|
|
19519
19579
|
toString() {
|
|
19520
|
-
const e3 = this.value.map((
|
|
19580
|
+
const e3 = this.value.map((e4) => isToken(e4) ? stringify(e4) : e4.toString()).join("");
|
|
19521
19581
|
return stringify(this.name) + e3 + stringify(this.endToken);
|
|
19522
19582
|
}
|
|
19523
19583
|
toJSON() {
|
|
19524
|
-
return { type: this.type, name: this.getName(), tokens: this.tokens(), value: this.value.map((
|
|
19584
|
+
return { type: this.type, name: this.getName(), tokens: this.tokens(), value: this.value.map((e3) => e3.toJSON()) };
|
|
19525
19585
|
}
|
|
19526
19586
|
isFunctionNode() {
|
|
19527
19587
|
return FunctionNode.isFunctionNode(this);
|
|
@@ -19560,14 +19620,14 @@ class SimpleBlockNode extends ContainerNodeBaseClass {
|
|
|
19560
19620
|
}
|
|
19561
19621
|
}
|
|
19562
19622
|
tokens() {
|
|
19563
|
-
return isTokenEOF(this.endToken) ? [this.startToken, ...this.value.flatMap((
|
|
19623
|
+
return isTokenEOF(this.endToken) ? [this.startToken, ...this.value.flatMap((e3) => e3.tokens())] : [this.startToken, ...this.value.flatMap((e3) => e3.tokens()), this.endToken];
|
|
19564
19624
|
}
|
|
19565
19625
|
toString() {
|
|
19566
|
-
const e3 = this.value.map((
|
|
19626
|
+
const e3 = this.value.map((e4) => isToken(e4) ? stringify(e4) : e4.toString()).join("");
|
|
19567
19627
|
return stringify(this.startToken) + e3 + stringify(this.endToken);
|
|
19568
19628
|
}
|
|
19569
19629
|
toJSON() {
|
|
19570
|
-
return { type: this.type, startToken: this.startToken, tokens: this.tokens(), value: this.value.map((
|
|
19630
|
+
return { type: this.type, startToken: this.startToken, tokens: this.tokens(), value: this.value.map((e3) => e3.toJSON()) };
|
|
19571
19631
|
}
|
|
19572
19632
|
isSimpleBlockNode() {
|
|
19573
19633
|
return SimpleBlockNode.isSimpleBlockNode(this);
|
|
@@ -19652,10 +19712,12 @@ function consumeComment(e3, n2) {
|
|
|
19652
19712
|
function consumeAllCommentsAndWhitespace(e3, n2) {
|
|
19653
19713
|
const t2 = [];
|
|
19654
19714
|
let o2 = 0;
|
|
19655
|
-
for (; ; )
|
|
19656
|
-
|
|
19657
|
-
|
|
19658
|
-
|
|
19715
|
+
for (; ; ) {
|
|
19716
|
+
if (isTokenWhitespace(n2[o2])) {
|
|
19717
|
+
const e4 = consumeWhitespace(0, n2.slice(o2));
|
|
19718
|
+
o2 += e4.advance, t2.push(e4.node);
|
|
19719
|
+
continue;
|
|
19720
|
+
}
|
|
19659
19721
|
if (!isTokenComment(n2[o2])) return { advance: o2, nodes: t2 };
|
|
19660
19722
|
t2.push(new CommentNode(n2[o2])), o2++;
|
|
19661
19723
|
}
|
|
@@ -19896,10 +19958,10 @@ class MediaQueryInvalid {
|
|
|
19896
19958
|
return [new MediaQueryInvalid(this.media)];
|
|
19897
19959
|
}
|
|
19898
19960
|
tokens() {
|
|
19899
|
-
return this.media.flatMap((
|
|
19961
|
+
return this.media.flatMap((e3) => e3.tokens());
|
|
19900
19962
|
}
|
|
19901
19963
|
toString() {
|
|
19902
|
-
return this.media.map((
|
|
19964
|
+
return this.media.map((e3) => e3.toString()).join("");
|
|
19903
19965
|
}
|
|
19904
19966
|
walk(t2, i2) {
|
|
19905
19967
|
if (0 === this.media.length) return;
|
|
@@ -20004,10 +20066,10 @@ class MediaConditionListWithAnd {
|
|
|
20004
20066
|
this.leading = e3, this.list = t2, this.before = i2, this.after = a2;
|
|
20005
20067
|
}
|
|
20006
20068
|
tokens() {
|
|
20007
|
-
return [...this.before, ...this.leading.tokens(), ...this.list.flatMap((
|
|
20069
|
+
return [...this.before, ...this.leading.tokens(), ...this.list.flatMap((e3) => e3.tokens()), ...this.after];
|
|
20008
20070
|
}
|
|
20009
20071
|
toString() {
|
|
20010
|
-
return stringify(...this.before) + this.leading.toString() + this.list.map((
|
|
20072
|
+
return stringify(...this.before) + this.leading.toString() + this.list.map((e3) => e3.toString()).join("") + stringify(...this.after);
|
|
20011
20073
|
}
|
|
20012
20074
|
hasLeadingSpace() {
|
|
20013
20075
|
return this.before.length ? isTokenWhiteSpaceOrComment(this.before[0]) : this.leading.hasLeadingSpace();
|
|
@@ -20033,7 +20095,7 @@ class MediaConditionListWithAnd {
|
|
|
20033
20095
|
}
|
|
20034
20096
|
}
|
|
20035
20097
|
toJSON() {
|
|
20036
|
-
return { type: this.type, leading: this.leading.toJSON(), list: this.list.map((
|
|
20098
|
+
return { type: this.type, leading: this.leading.toJSON(), list: this.list.map((e3) => e3.toJSON()), before: this.before, after: this.after };
|
|
20037
20099
|
}
|
|
20038
20100
|
isMediaConditionListWithAnd() {
|
|
20039
20101
|
return MediaConditionListWithAnd.isMediaConditionListWithAnd(this);
|
|
@@ -20052,10 +20114,10 @@ class MediaConditionListWithOr {
|
|
|
20052
20114
|
this.leading = e3, this.list = t2, this.before = i2, this.after = a2;
|
|
20053
20115
|
}
|
|
20054
20116
|
tokens() {
|
|
20055
|
-
return [...this.before, ...this.leading.tokens(), ...this.list.flatMap((
|
|
20117
|
+
return [...this.before, ...this.leading.tokens(), ...this.list.flatMap((e3) => e3.tokens()), ...this.after];
|
|
20056
20118
|
}
|
|
20057
20119
|
toString() {
|
|
20058
|
-
return stringify(...this.before) + this.leading.toString() + this.list.map((
|
|
20120
|
+
return stringify(...this.before) + this.leading.toString() + this.list.map((e3) => e3.toString()).join("") + stringify(...this.after);
|
|
20059
20121
|
}
|
|
20060
20122
|
hasLeadingSpace() {
|
|
20061
20123
|
return this.before.length ? isTokenWhiteSpaceOrComment(this.before[0]) : this.leading.hasLeadingSpace();
|
|
@@ -20081,7 +20143,7 @@ class MediaConditionListWithOr {
|
|
|
20081
20143
|
}
|
|
20082
20144
|
}
|
|
20083
20145
|
toJSON() {
|
|
20084
|
-
return { type: this.type, leading: this.leading.toJSON(), list: this.list.map((
|
|
20146
|
+
return { type: this.type, leading: this.leading.toJSON(), list: this.list.map((e3) => e3.toJSON()), before: this.before, after: this.after };
|
|
20085
20147
|
}
|
|
20086
20148
|
isMediaConditionListWithOr() {
|
|
20087
20149
|
return MediaConditionListWithOr.isMediaConditionListWithOr(this);
|
|
@@ -20149,7 +20211,7 @@ function parseMediaFeatureName(e3) {
|
|
|
20149
20211
|
t2 = i2;
|
|
20150
20212
|
}
|
|
20151
20213
|
}
|
|
20152
|
-
return -1 !== t2 && new MediaFeatureName(e3[t2], e3.slice(0, t2).flatMap((
|
|
20214
|
+
return -1 !== t2 && new MediaFeatureName(e3[t2], e3.slice(0, t2).flatMap((e4) => e4.tokens()), e3.slice(t2 + 1).flatMap((e4) => e4.tokens()));
|
|
20153
20215
|
}
|
|
20154
20216
|
class MediaFeatureBoolean {
|
|
20155
20217
|
type = O.MediaFeatureBoolean;
|
|
@@ -20198,10 +20260,10 @@ class MediaFeatureValue {
|
|
|
20198
20260
|
Array.isArray(e3) && 1 === e3.length ? this.value = e3[0] : this.value = e3, this.before = t2, this.after = i2;
|
|
20199
20261
|
}
|
|
20200
20262
|
tokens() {
|
|
20201
|
-
return Array.isArray(this.value) ? [...this.before, ...this.value.flatMap((
|
|
20263
|
+
return Array.isArray(this.value) ? [...this.before, ...this.value.flatMap((e3) => e3.tokens()), ...this.after] : [...this.before, ...this.value.tokens(), ...this.after];
|
|
20202
20264
|
}
|
|
20203
20265
|
toString() {
|
|
20204
|
-
return Array.isArray(this.value) ? stringify(...this.before) + this.value.map((
|
|
20266
|
+
return Array.isArray(this.value) ? stringify(...this.before) + this.value.map((e3) => e3.toString()).join("") + stringify(...this.after) : stringify(...this.before) + this.value.toString() + stringify(...this.after);
|
|
20205
20267
|
}
|
|
20206
20268
|
indexOf(e3) {
|
|
20207
20269
|
return e3 === this.value ? "value" : -1;
|
|
@@ -20228,7 +20290,7 @@ class MediaFeatureValue {
|
|
|
20228
20290
|
}
|
|
20229
20291
|
}
|
|
20230
20292
|
toJSON() {
|
|
20231
|
-
return Array.isArray(this.value) ? { type: this.type, value: this.value.map((
|
|
20293
|
+
return Array.isArray(this.value) ? { type: this.type, value: this.value.map((e3) => e3.toJSON()), tokens: this.tokens() } : { type: this.type, value: this.value.toJSON(), tokens: this.tokens() };
|
|
20232
20294
|
}
|
|
20233
20295
|
isMediaFeatureValue() {
|
|
20234
20296
|
return MediaFeatureValue.isMediaFeatureValue(this);
|
|
@@ -20250,7 +20312,9 @@ function parseMediaFeatureValue(e3, t2 = false) {
|
|
|
20250
20312
|
continue;
|
|
20251
20313
|
}
|
|
20252
20314
|
i2 = r2, n2 = r2;
|
|
20253
|
-
|
|
20315
|
+
continue;
|
|
20316
|
+
}
|
|
20317
|
+
if (isEnvironmentVariable(s2)) i2 = r2, n2 = r2;
|
|
20254
20318
|
else if (isDimension(s2)) i2 = r2, n2 = r2;
|
|
20255
20319
|
else {
|
|
20256
20320
|
if (t2 || !isIdent(s2)) return false;
|
|
@@ -20258,7 +20322,7 @@ function parseMediaFeatureValue(e3, t2 = false) {
|
|
|
20258
20322
|
}
|
|
20259
20323
|
}
|
|
20260
20324
|
}
|
|
20261
|
-
return -1 !== i2 && new MediaFeatureValue(e3.slice(i2, n2 + 1), e3.slice(0, i2).flatMap((
|
|
20325
|
+
return -1 !== i2 && new MediaFeatureValue(e3.slice(i2, n2 + 1), e3.slice(0, i2).flatMap((e4) => e4.tokens()), e3.slice(n2 + 1).flatMap((e4) => e4.tokens()));
|
|
20262
20326
|
}
|
|
20263
20327
|
function matchesRatioExactly(e3) {
|
|
20264
20328
|
let t2 = -1, i2 = -1;
|
|
@@ -20749,9 +20813,9 @@ function parseMediaQuery(e3) {
|
|
|
20749
20813
|
}
|
|
20750
20814
|
}
|
|
20751
20815
|
let r2 = [], s2 = [];
|
|
20752
|
-
-1 !== i2 ? (r2 = e3.slice(0, i2 + 1).flatMap((
|
|
20816
|
+
-1 !== i2 ? (r2 = e3.slice(0, i2 + 1).flatMap((e4) => e4.tokens()), -1 !== a2 && (s2 = e3.slice(i2 + 1, a2 + 1).flatMap((e4) => e4.tokens()))) : -1 !== a2 && (s2 = e3.slice(0, a2 + 1).flatMap((e4) => e4.tokens()));
|
|
20753
20817
|
const d2 = parseMediaConditionWithoutOr(e3.slice(Math.max(i2, a2, n2) + 1));
|
|
20754
|
-
return false === d2 ? new MediaQueryWithType(r2, [...s2, ...e3.slice(a2 + 1).flatMap((
|
|
20818
|
+
return false === d2 ? new MediaQueryWithType(r2, [...s2, ...e3.slice(a2 + 1).flatMap((e4) => e4.tokens())]) : new MediaQueryWithType(r2, s2, e3.slice(a2 + 1, n2 + 1).flatMap((e4) => e4.tokens()), d2);
|
|
20755
20819
|
}
|
|
20756
20820
|
}
|
|
20757
20821
|
function parseMediaConditionListWithOr(e3) {
|
|
@@ -20774,7 +20838,7 @@ function parseMediaConditionListWithOr(e3) {
|
|
|
20774
20838
|
n2 = s2;
|
|
20775
20839
|
}
|
|
20776
20840
|
}
|
|
20777
|
-
return !(!t2 || !i2.length) && new MediaConditionListWithOr(t2, i2, e3.slice(0, n2).flatMap((
|
|
20841
|
+
return !(!t2 || !i2.length) && new MediaConditionListWithOr(t2, i2, e3.slice(0, n2).flatMap((e4) => e4.tokens()), e3.slice(r2 + 1).flatMap((e4) => e4.tokens()));
|
|
20778
20842
|
}
|
|
20779
20843
|
function parseMediaConditionListWithAnd(e3) {
|
|
20780
20844
|
let t2 = false;
|
|
@@ -20796,7 +20860,7 @@ function parseMediaConditionListWithAnd(e3) {
|
|
|
20796
20860
|
n2 = s2;
|
|
20797
20861
|
}
|
|
20798
20862
|
}
|
|
20799
|
-
return !(!t2 || !i2.length) && new MediaConditionListWithAnd(t2, i2, e3.slice(0, n2).flatMap((
|
|
20863
|
+
return !(!t2 || !i2.length) && new MediaConditionListWithAnd(t2, i2, e3.slice(0, n2).flatMap((e4) => e4.tokens()), e3.slice(r2 + 1).flatMap((e4) => e4.tokens()));
|
|
20800
20864
|
}
|
|
20801
20865
|
function parseMediaCondition(e3) {
|
|
20802
20866
|
const t2 = parseMediaNot(e3);
|
|
@@ -20830,10 +20894,10 @@ function parseMediaInParens(e3) {
|
|
|
20830
20894
|
const i2 = e3[t2];
|
|
20831
20895
|
if (!isTokenOpenParen(i2.startToken)) return false;
|
|
20832
20896
|
i2.normalize();
|
|
20833
|
-
const n2 = [...e3.slice(0, t2).flatMap((
|
|
20897
|
+
const n2 = [...e3.slice(0, t2).flatMap((e4) => e4.tokens()), i2.startToken], r2 = [i2.endToken, ...e3.slice(t2 + 1).flatMap((e4) => e4.tokens())], s2 = parseMediaFeature(i2, n2, r2);
|
|
20834
20898
|
if (false !== s2) return new MediaInParens(s2);
|
|
20835
20899
|
const o2 = parseMediaCondition(i2.value);
|
|
20836
|
-
return false !== o2 ? new MediaInParens(o2, n2, r2) : new MediaInParens(new GeneralEnclosed(i2), e3.slice(0, t2).flatMap((
|
|
20900
|
+
return false !== o2 ? new MediaInParens(o2, n2, r2) : new MediaInParens(new GeneralEnclosed(i2), e3.slice(0, t2).flatMap((e4) => e4.tokens()), e3.slice(t2 + 1).flatMap((e4) => e4.tokens()));
|
|
20837
20901
|
}
|
|
20838
20902
|
function parseMediaInParensFromSimpleBlock(e3) {
|
|
20839
20903
|
if (!isTokenOpenParen(e3.startToken)) return false;
|
|
@@ -20860,13 +20924,14 @@ function parseMediaNot(e3) {
|
|
|
20860
20924
|
}
|
|
20861
20925
|
return false;
|
|
20862
20926
|
}
|
|
20863
|
-
if (
|
|
20864
|
-
{
|
|
20927
|
+
if (t2 && isSimpleBlockNode(r2)) {
|
|
20865
20928
|
r2.normalize();
|
|
20866
20929
|
const t3 = parseMediaInParensFromSimpleBlock(r2);
|
|
20867
20930
|
if (false === t3) return false;
|
|
20868
|
-
i2 = new MediaNot(e3.slice(0, n2).flatMap((
|
|
20931
|
+
i2 = new MediaNot(e3.slice(0, n2).flatMap((e4) => e4.tokens()), t3);
|
|
20932
|
+
continue;
|
|
20869
20933
|
}
|
|
20934
|
+
return false;
|
|
20870
20935
|
}
|
|
20871
20936
|
}
|
|
20872
20937
|
return i2 || false;
|
|
@@ -20889,7 +20954,7 @@ function parseMediaOr(e3) {
|
|
|
20889
20954
|
if (t2 && isSimpleBlockNode(n2)) {
|
|
20890
20955
|
n2.normalize();
|
|
20891
20956
|
const t3 = parseMediaInParensFromSimpleBlock(n2);
|
|
20892
|
-
return false !== t3 && { advance: i2, node: new MediaOr(e3.slice(0, i2).flatMap((
|
|
20957
|
+
return false !== t3 && { advance: i2, node: new MediaOr(e3.slice(0, i2).flatMap((e4) => e4.tokens()), t3) };
|
|
20893
20958
|
}
|
|
20894
20959
|
return false;
|
|
20895
20960
|
}
|
|
@@ -20914,7 +20979,7 @@ function parseMediaAnd(e3) {
|
|
|
20914
20979
|
if (t2 && isSimpleBlockNode(n2)) {
|
|
20915
20980
|
n2.normalize();
|
|
20916
20981
|
const t3 = parseMediaInParensFromSimpleBlock(n2);
|
|
20917
|
-
return false !== t3 && { advance: i2, node: new MediaAnd(e3.slice(0, i2).flatMap((
|
|
20982
|
+
return false !== t3 && { advance: i2, node: new MediaAnd(e3.slice(0, i2).flatMap((e4) => e4.tokens()), t3) };
|
|
20918
20983
|
}
|
|
20919
20984
|
return false;
|
|
20920
20985
|
}
|
|
@@ -20923,10 +20988,10 @@ function parseMediaAnd(e3) {
|
|
|
20923
20988
|
}
|
|
20924
20989
|
function parseFromTokens(e3, t2) {
|
|
20925
20990
|
const i2 = parseCommaSeparatedListOfComponentValues(e3, { onParseError: t2?.onParseError });
|
|
20926
|
-
return i2.map((
|
|
20991
|
+
return i2.map((e4, a2) => {
|
|
20927
20992
|
const n2 = parseMediaQuery(e4);
|
|
20928
20993
|
return false === n2 && true === t2?.preserveInvalidMediaQueries ? new MediaQueryInvalid(i2[a2]) : n2;
|
|
20929
|
-
})
|
|
20994
|
+
}).filter((e4) => !!e4);
|
|
20930
20995
|
}
|
|
20931
20996
|
function isGeneralEnclosed(e3) {
|
|
20932
20997
|
return GeneralEnclosed.isGeneralEnclosed(e3);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stylelint-config-silverwind",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.0.1",
|
|
4
4
|
"description": "Extensive stylelint configuration",
|
|
5
5
|
"author": "silverwind <me@silverwind.io>",
|
|
6
6
|
"repository": "silverwind/stylelint-config-silverwind",
|
|
@@ -14,24 +14,24 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"stylelint-config-recommended": "
|
|
17
|
+
"stylelint-config-recommended": "18.0.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@silverwind/postcss-html": "1.8.3",
|
|
21
|
-
"@stylelint-types/stylelint-stylistic": "
|
|
22
|
-
"@stylistic/stylelint-plugin": "
|
|
23
|
-
"eslint": "9.39.
|
|
24
|
-
"eslint-config-silverwind": "
|
|
25
|
-
"stylelint": "
|
|
21
|
+
"@stylelint-types/stylelint-stylistic": "5.0.0",
|
|
22
|
+
"@stylistic/stylelint-plugin": "5.0.0",
|
|
23
|
+
"eslint": "9.39.2",
|
|
24
|
+
"eslint-config-silverwind": "117.0.3",
|
|
25
|
+
"stylelint": "17.0.0",
|
|
26
26
|
"stylelint-declaration-block-no-ignored-properties": "2.8.0",
|
|
27
27
|
"stylelint-declaration-strict-value": "1.10.11",
|
|
28
|
-
"stylelint-value-no-unknown-custom-properties": "6.0
|
|
28
|
+
"stylelint-value-no-unknown-custom-properties": "6.1.0",
|
|
29
29
|
"typescript": "5.9.3",
|
|
30
30
|
"typescript-config-silverwind": "14.0.0",
|
|
31
|
-
"updates": "
|
|
31
|
+
"updates": "17.0.7",
|
|
32
32
|
"versions": "14.0.3",
|
|
33
|
-
"vite": "7.
|
|
34
|
-
"vite-config-silverwind": "6.0.
|
|
33
|
+
"vite": "7.3.1",
|
|
34
|
+
"vite-config-silverwind": "6.0.8"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"stylelint": "*"
|