@cssdoc/providers 0.6.0 → 0.6.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.mjs +5 -3
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -222,15 +222,17 @@ const globMatch = (pattern, value) => {
|
|
|
222
222
|
/**
|
|
223
223
|
* Serialize an authored `@structure` tree back to nested CSS for a syntax-highlighted hover block. Leaf
|
|
224
224
|
* selectors are left bare (no `{}`) — VS Code's CSS grammar still colours them, and it reads like the
|
|
225
|
-
* authored `@structure` declaration; only nesting keeps braces.
|
|
225
|
+
* authored `@structure` declaration; only nesting keeps braces. A node's authored prose (`@wrapper`)
|
|
226
|
+
* trails its selector as a CSS comment.
|
|
226
227
|
*/
|
|
227
228
|
const renderStructureTree = (nodes, depth = 0) => nodes.flatMap((n) => {
|
|
228
229
|
const pad = " ".repeat(depth);
|
|
230
|
+
const note = n.description ? ` /* ${n.description} */` : "";
|
|
229
231
|
return n.children.length ? [
|
|
230
|
-
`${pad}${n.selector} {`,
|
|
232
|
+
`${pad}${n.selector} {${note}`,
|
|
231
233
|
...renderStructureTree(n.children, depth + 1),
|
|
232
234
|
`${pad}}`
|
|
233
|
-
] : [`${pad}${n.selector}`];
|
|
235
|
+
] : [`${pad}${n.selector}${note}`];
|
|
234
236
|
});
|
|
235
237
|
const record = {
|
|
236
238
|
model(index, naming, structureIgnore = [], siblingIndex = index) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cssdoc/providers",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Host-agnostic aspect providers over the @cssdoc/index — diagnostics, completions, hover, and definitions for modifiers, custom properties, structure, functions, states, and conditions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"css-tree": "^3.2.1",
|
|
32
|
-
"@cssdoc/
|
|
33
|
-
"@cssdoc/
|
|
32
|
+
"@cssdoc/core": "0.6.1",
|
|
33
|
+
"@cssdoc/index": "0.6.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/css-tree": "^2.3.11",
|