@statorjs/language-server 0.1.33-next.0 → 0.1.33-next.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/server.cjs +32 -18
- package/package.json +2 -2
package/dist/server.cjs
CHANGED
|
@@ -45213,28 +45213,42 @@ function scopeSelectorList(selector, attr) {
|
|
|
45213
45213
|
}
|
|
45214
45214
|
});
|
|
45215
45215
|
if (subjectIsGlobal) return;
|
|
45216
|
-
|
|
45217
|
-
let insertAfter;
|
|
45218
|
-
for (const node of nodes) {
|
|
45219
|
-
if (node.type === "combinator") {
|
|
45220
|
-
insertAfter = void 0;
|
|
45221
|
-
continue;
|
|
45222
|
-
}
|
|
45223
|
-
if (node.type === "pseudo" && node.value.startsWith("::")) continue;
|
|
45224
|
-
insertAfter = node;
|
|
45225
|
-
}
|
|
45226
|
-
const attrNode = import_postcss_selector_parser.default.attribute({
|
|
45227
|
-
attribute: attr,
|
|
45228
|
-
value: void 0,
|
|
45229
|
-
raws: {},
|
|
45230
|
-
quoteMark: null
|
|
45231
|
-
});
|
|
45232
|
-
if (insertAfter) sel.insertAfter(insertAfter, attrNode);
|
|
45233
|
-
else sel.append(attrNode);
|
|
45216
|
+
attachScopeAttr(sel, attr);
|
|
45234
45217
|
});
|
|
45235
45218
|
});
|
|
45236
45219
|
return transform.processSync(selector);
|
|
45237
45220
|
}
|
|
45221
|
+
function makeAttrNode(attr) {
|
|
45222
|
+
return import_postcss_selector_parser.default.attribute({
|
|
45223
|
+
attribute: attr,
|
|
45224
|
+
value: void 0,
|
|
45225
|
+
raws: {},
|
|
45226
|
+
quoteMark: null
|
|
45227
|
+
});
|
|
45228
|
+
}
|
|
45229
|
+
function attachScopeAttr(sel, attr) {
|
|
45230
|
+
const nodes = sel.nodes;
|
|
45231
|
+
let insertAfter;
|
|
45232
|
+
for (const node of nodes) {
|
|
45233
|
+
if (node.type === "combinator") {
|
|
45234
|
+
insertAfter = void 0;
|
|
45235
|
+
continue;
|
|
45236
|
+
}
|
|
45237
|
+
if (node.type === "pseudo" && node.value.startsWith("::")) continue;
|
|
45238
|
+
insertAfter = node;
|
|
45239
|
+
}
|
|
45240
|
+
if (!insertAfter) {
|
|
45241
|
+
sel.append(makeAttrNode(attr));
|
|
45242
|
+
return;
|
|
45243
|
+
}
|
|
45244
|
+
if (insertAfter.type === "pseudo" && insertAfter.value === ":where") {
|
|
45245
|
+
for (const inner of insertAfter.nodes) {
|
|
45246
|
+
attachScopeAttr(inner, attr);
|
|
45247
|
+
}
|
|
45248
|
+
return;
|
|
45249
|
+
}
|
|
45250
|
+
sel.insertAfter(insertAfter, makeAttrNode(attr));
|
|
45251
|
+
}
|
|
45238
45252
|
function isSubjectGlobal(sel) {
|
|
45239
45253
|
const nodes = sel.nodes;
|
|
45240
45254
|
let lastCombinator = -1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statorjs/language-server",
|
|
3
|
-
"version": "0.1.33-next.
|
|
3
|
+
"version": "0.1.33-next.1",
|
|
4
4
|
"description": "Volar-based language server for .stator files.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"volar-service-typescript": "0.0.71",
|
|
34
34
|
"vscode-css-languageservice": "^6.3.0",
|
|
35
35
|
"vscode-uri": "^3.0.8",
|
|
36
|
-
"@statorjs/stator": "2.11.0-next.
|
|
36
|
+
"@statorjs/stator": "2.11.0-next.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"typescript": "^5.6.0"
|