@shikijs/twoslash 2.3.2 → 2.4.0
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/core.mjs +3 -3
- package/package.json +6 -6
package/dist/core.mjs
CHANGED
|
@@ -509,7 +509,7 @@ function rendererClassic() {
|
|
|
509
509
|
type: "element",
|
|
510
510
|
tagName: "li",
|
|
511
511
|
properties: {
|
|
512
|
-
class: "kindModifiers" in i && typeof i.kindModifiers === "string" && i.kindModifiers?.split(",").includes("deprecated") ? "deprecated" :
|
|
512
|
+
class: "kindModifiers" in i && typeof i.kindModifiers === "string" && i.kindModifiers?.split(",").includes("deprecated") ? "deprecated" : void 0
|
|
513
513
|
},
|
|
514
514
|
children: [{
|
|
515
515
|
type: "element",
|
|
@@ -823,7 +823,7 @@ function rendererRich(options = {}) {
|
|
|
823
823
|
type: "element",
|
|
824
824
|
tagName: "span",
|
|
825
825
|
properties: {
|
|
826
|
-
class: isDeprecated ? "deprecated" :
|
|
826
|
+
class: isDeprecated ? "deprecated" : void 0
|
|
827
827
|
},
|
|
828
828
|
children: [
|
|
829
829
|
{
|
|
@@ -959,7 +959,7 @@ function rendererRich(options = {}) {
|
|
|
959
959
|
if (queryRendering !== "line")
|
|
960
960
|
return [];
|
|
961
961
|
const themedContent = highlightPopupContent.call(this, query);
|
|
962
|
-
const targetNode = node?.type === "element" ? node.children[0] :
|
|
962
|
+
const targetNode = node?.type === "element" ? node.children[0] : void 0;
|
|
963
963
|
const targetText = targetNode?.type === "text" ? targetNode.value : "";
|
|
964
964
|
const offset = Math.max(0, (query.character || 0) + Math.floor(targetText.length / 2) - 2);
|
|
965
965
|
return [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/twoslash",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"description": "Shiki transformer for twoslash",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"twoslash": "^0.2.12",
|
|
53
|
-
"@shikijs/
|
|
54
|
-
"@shikijs/
|
|
53
|
+
"@shikijs/types": "2.4.0",
|
|
54
|
+
"@shikijs/core": "2.4.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@iconify-json/carbon": "^1.2.
|
|
58
|
-
"@iconify-json/codicon": "^1.2.
|
|
57
|
+
"@iconify-json/carbon": "^1.2.7",
|
|
58
|
+
"@iconify-json/codicon": "^1.2.10",
|
|
59
59
|
"hast-util-from-html": "^2.0.3",
|
|
60
60
|
"typescript": "^5.7.3",
|
|
61
|
-
"@shikijs/twoslash": "2.
|
|
61
|
+
"@shikijs/twoslash": "2.4.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "unbuild",
|