@shikijs/twoslash 1.2.4 → 1.3.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 +14 -8
- package/package.json +4 -4
package/dist/core.mjs
CHANGED
|
@@ -415,14 +415,20 @@ function rendererRich(options = {}) {
|
|
|
415
415
|
if (!content || content === "any")
|
|
416
416
|
return [];
|
|
417
417
|
const popupContents = [];
|
|
418
|
-
const typeCode =
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
418
|
+
const typeCode = {
|
|
419
|
+
type: "element",
|
|
420
|
+
tagName: "code",
|
|
421
|
+
properties: {},
|
|
422
|
+
children: this.codeToHast(
|
|
423
|
+
content,
|
|
424
|
+
{
|
|
425
|
+
...this.options,
|
|
426
|
+
transformers: [],
|
|
427
|
+
lang: this.options.lang === "tsx" || this.options.lang === "jsx" ? "tsx" : "ts",
|
|
428
|
+
structure: "inline"
|
|
429
|
+
}
|
|
430
|
+
).children
|
|
431
|
+
};
|
|
426
432
|
typeCode.properties.class = "twoslash-popup-code";
|
|
427
433
|
popupContents.push(
|
|
428
434
|
extend(
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/twoslash",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"description": "Shiki transformer for twoslash",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"twoslash": "^0.2.5",
|
|
53
|
-
"@shikijs/core": "1.
|
|
53
|
+
"@shikijs/core": "1.3.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@iconify-json/carbon": "^1.1.31",
|
|
57
|
-
"@iconify-json/codicon": "^1.1.
|
|
57
|
+
"@iconify-json/codicon": "^1.1.46",
|
|
58
58
|
"@shikijs/twoslash": "^3.1.2",
|
|
59
59
|
"hast-util-from-html": "^2.0.1",
|
|
60
|
-
"typescript": "^5.4.
|
|
60
|
+
"typescript": "^5.4.4"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "unbuild",
|