@halo-dev/shiki-code-element 1.0.7 → 1.0.11
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.js +5 -6
- package/dist/types/index.d.ts +0 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -641,7 +641,6 @@ var ShikiCodeBaseVariant = class extends i$1 {
|
|
|
641
641
|
constructor(...b) {
|
|
642
642
|
super(...b), this.options = {
|
|
643
643
|
html: "",
|
|
644
|
-
code: "",
|
|
645
644
|
languageName: "Unknown",
|
|
646
645
|
colorScheme: "light",
|
|
647
646
|
theme: null,
|
|
@@ -652,7 +651,8 @@ var ShikiCodeBaseVariant = class extends i$1 {
|
|
|
652
651
|
b.has("options") && (this.setAttribute("color-scheme", this.options.colorScheme), this.style.setProperty("--shiki-theme-type", this.options.theme?.type || "light"), this.style.setProperty("--font-size", this.options.fontSize || "0.875em"));
|
|
653
652
|
}
|
|
654
653
|
handleCopyCode() {
|
|
655
|
-
|
|
654
|
+
let b = this.shadowRoot?.querySelector("pre");
|
|
655
|
+
copyText(b?.innerText || b?.textContent || "", () => {
|
|
656
656
|
this.copied = !0, setTimeout(() => {
|
|
657
657
|
this.copied = !1;
|
|
658
658
|
}, 2e3);
|
|
@@ -682,7 +682,7 @@ var ShikiCodeSimpleVariant = class extends ShikiCodeBaseVariant {
|
|
|
682
682
|
</div>
|
|
683
683
|
`;
|
|
684
684
|
}
|
|
685
|
-
static #
|
|
685
|
+
static #e = this.styles = [
|
|
686
686
|
r(tailwind_default),
|
|
687
687
|
r(shiki_default),
|
|
688
688
|
i`
|
|
@@ -764,7 +764,7 @@ var ShikiCodeMacVariant = class extends ShikiCodeBaseVariant {
|
|
|
764
764
|
</div>
|
|
765
765
|
`;
|
|
766
766
|
}
|
|
767
|
-
static #
|
|
767
|
+
static #e = this.styles = [
|
|
768
768
|
r(tailwind_default),
|
|
769
769
|
r(shiki_default),
|
|
770
770
|
i`
|
|
@@ -834,7 +834,6 @@ var ShikiCode = class extends i$1 {
|
|
|
834
834
|
if (this.loading) return x``;
|
|
835
835
|
if (this.error) return x`<div class="text-sm text-red-500">错误: ${this.error}</div>`;
|
|
836
836
|
let b = {
|
|
837
|
-
code: this.code,
|
|
838
837
|
html: this.html,
|
|
839
838
|
languageName: this.languageName,
|
|
840
839
|
colorScheme: this._colorScheme,
|
|
@@ -893,7 +892,7 @@ var ShikiCode = class extends i$1 {
|
|
|
893
892
|
]
|
|
894
893
|
});
|
|
895
894
|
}
|
|
896
|
-
static #
|
|
895
|
+
static #e = this.styles = [r(tailwind_default), i`
|
|
897
896
|
:host {
|
|
898
897
|
display: block;
|
|
899
898
|
margin: 1rem 0 !important;
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@halo-dev/shiki-code-element",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/halo-sigs/plugin-shiki.git",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"lit": "^3.3.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@iconify/json": "^2.2.
|
|
28
|
-
"@unocss/reset": "^66.5.
|
|
29
|
-
"unocss": "^66.5.
|
|
27
|
+
"@iconify/json": "^2.2.412",
|
|
28
|
+
"@unocss/reset": "^66.5.9",
|
|
29
|
+
"unocss": "^66.5.9",
|
|
30
30
|
"vite-plugin-dts": "^4.5.4"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|