@shikijs/vitepress-twoslash 3.4.0 → 3.4.2
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 +4 -0
- package/package.json +3 -3
- package/style-core.css +8 -0
- package/style.css +8 -0
package/dist/index.mjs
CHANGED
|
@@ -143,6 +143,10 @@ function renderMarkdownInline(md, context) {
|
|
|
143
143
|
return children;
|
|
144
144
|
}
|
|
145
145
|
function compose(parts) {
|
|
146
|
+
if (parts.token.type === "element" && parts.token.children.length < 1) {
|
|
147
|
+
const classes = parts.token.properties.class || "";
|
|
148
|
+
parts.token.properties.class = `${classes} twoslash-error-empty`;
|
|
149
|
+
}
|
|
146
150
|
return [
|
|
147
151
|
{
|
|
148
152
|
type: "element",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/vitepress-twoslash",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.4.
|
|
4
|
+
"version": "3.4.2",
|
|
5
5
|
"description": "Enable Twoslash support in VitePress",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"mdast-util-to-hast": "^13.2.0",
|
|
41
41
|
"twoslash": "^0.3.1",
|
|
42
42
|
"twoslash-vue": "^0.3.1",
|
|
43
|
-
"vue": "^3.5.
|
|
44
|
-
"shiki": "3.4.
|
|
43
|
+
"vue": "^3.5.14",
|
|
44
|
+
"shiki": "3.4.2"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "unbuild",
|
package/style-core.css
CHANGED
|
@@ -141,3 +141,11 @@
|
|
|
141
141
|
.twoslash-floating.twoslash-completion .twoslash-completion-list li {
|
|
142
142
|
padding: 3px 0;
|
|
143
143
|
}
|
|
144
|
+
|
|
145
|
+
.twoslash-error:empty,
|
|
146
|
+
.twoslash-error-empty {
|
|
147
|
+
display: inline-block;
|
|
148
|
+
min-width: 0.55em;
|
|
149
|
+
min-height: 1.2em;
|
|
150
|
+
vertical-align: middle;
|
|
151
|
+
}
|
package/style.css
CHANGED
|
@@ -437,3 +437,11 @@
|
|
|
437
437
|
.twoslash-floating.twoslash-completion .twoslash-completion-list li {
|
|
438
438
|
padding: 3px 0;
|
|
439
439
|
}
|
|
440
|
+
|
|
441
|
+
.twoslash-error:empty,
|
|
442
|
+
.twoslash-error-empty {
|
|
443
|
+
display: inline-block;
|
|
444
|
+
min-width: 0.55em;
|
|
445
|
+
min-height: 1.2em;
|
|
446
|
+
vertical-align: middle;
|
|
447
|
+
}
|