@elmethis/qwik 0.0.15 → 0.0.17
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/lib/index.qwik.cjs +8 -7
- package/lib/index.qwik.mjs +8 -7
- package/package.json +10 -10
- package/lib/shikiInstance-BxkUyfqr.cjs +0 -79
- package/lib/shikiInstance-igs7t2fe.js +0 -79
package/lib/index.qwik.cjs
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
4
4
|
const qwik = require("@builder.io/qwik");
|
|
5
5
|
const js = require("@mdi/js");
|
|
6
|
+
const shiki = require("shiki");
|
|
6
7
|
const katex = require("katex");
|
|
7
8
|
const lodashEs = require("lodash-es");
|
|
8
9
|
const caption$1 = "_caption_1j0ec_27";
|
|
@@ -751,13 +752,11 @@ const styles$m = {
|
|
|
751
752
|
const ElmShikiHighlighter = qwik.component$(({ code: code2, language = "txt" }) => {
|
|
752
753
|
const rawHtml = qwik.useSignal("");
|
|
753
754
|
qwik.useTask$(async ({ track }) => {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
const { getHighlighterSingleton } = await Promise.resolve().then(() => require("./shikiInstance-BxkUyfqr.cjs"));
|
|
757
|
-
const highlighter = await getHighlighterSingleton();
|
|
755
|
+
track(() => code2);
|
|
756
|
+
track(() => language);
|
|
758
757
|
try {
|
|
759
|
-
rawHtml.value =
|
|
760
|
-
lang:
|
|
758
|
+
rawHtml.value = await shiki.codeToHtml(code2, {
|
|
759
|
+
lang: language,
|
|
761
760
|
themes: {
|
|
762
761
|
dark: "vitesse-dark",
|
|
763
762
|
light: "vitesse-light"
|
|
@@ -768,7 +767,7 @@ const ElmShikiHighlighter = qwik.component$(({ code: code2, language = "txt" })
|
|
|
768
767
|
}
|
|
769
768
|
});
|
|
770
769
|
} catch {
|
|
771
|
-
rawHtml.value = `<pre>${
|
|
770
|
+
rawHtml.value = `<pre>${code2.replace(/</g, "<")}</pre>`;
|
|
772
771
|
}
|
|
773
772
|
});
|
|
774
773
|
return /* @__PURE__ */ jsxRuntime.jsx("pre", {
|
|
@@ -1345,6 +1344,8 @@ const ElmPageTop = qwik.component$(({ position = "right" }) => {
|
|
|
1345
1344
|
});
|
|
1346
1345
|
checkScroll();
|
|
1347
1346
|
cleanup(() => window.removeEventListener("scroll", checkScroll));
|
|
1347
|
+
}, {
|
|
1348
|
+
strategy: "document-idle"
|
|
1348
1349
|
});
|
|
1349
1350
|
const toTop = qwik.$(() => {
|
|
1350
1351
|
window.scrollTo({
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
2
2
|
import { component$, Slot, useSignal, useTask$, $, useComputed$, useVisibleTask$, useContextProvider, createContextId, useContext } from "@builder.io/qwik";
|
|
3
3
|
import { mdiCodeTags, mdiClipboardCheckMultipleOutline, mdiClipboardMultipleOutline, mdiChevronRight, mdiPlus, mdiMessageImageOutline, mdiFile, mdiDownload, mdiLinkVariant, mdiHome, mdiApplicationOutline, mdiFolderOpen, mdiFormatQuoteOpen, mdiFormatQuoteClose, mdiAlertOctagram, mdiAlert, mdiShieldAlert, mdiLightbulbOn, mdiInformation } from "@mdi/js";
|
|
4
|
+
import { codeToHtml } from "shiki";
|
|
4
5
|
import { renderToString } from "katex";
|
|
5
6
|
import { kebabCase } from "lodash-es";
|
|
6
7
|
const caption$1 = "_caption_1j0ec_27";
|
|
@@ -749,13 +750,11 @@ const styles$m = {
|
|
|
749
750
|
const ElmShikiHighlighter = component$(({ code: code2, language = "txt" }) => {
|
|
750
751
|
const rawHtml = useSignal("");
|
|
751
752
|
useTask$(async ({ track }) => {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
const { getHighlighterSingleton } = await import("./shikiInstance-igs7t2fe.js");
|
|
755
|
-
const highlighter = await getHighlighterSingleton();
|
|
753
|
+
track(() => code2);
|
|
754
|
+
track(() => language);
|
|
756
755
|
try {
|
|
757
|
-
rawHtml.value =
|
|
758
|
-
lang:
|
|
756
|
+
rawHtml.value = await codeToHtml(code2, {
|
|
757
|
+
lang: language,
|
|
759
758
|
themes: {
|
|
760
759
|
dark: "vitesse-dark",
|
|
761
760
|
light: "vitesse-light"
|
|
@@ -766,7 +765,7 @@ const ElmShikiHighlighter = component$(({ code: code2, language = "txt" }) => {
|
|
|
766
765
|
}
|
|
767
766
|
});
|
|
768
767
|
} catch {
|
|
769
|
-
rawHtml.value = `<pre>${
|
|
768
|
+
rawHtml.value = `<pre>${code2.replace(/</g, "<")}</pre>`;
|
|
770
769
|
}
|
|
771
770
|
});
|
|
772
771
|
return /* @__PURE__ */ jsx("pre", {
|
|
@@ -1343,6 +1342,8 @@ const ElmPageTop = component$(({ position = "right" }) => {
|
|
|
1343
1342
|
});
|
|
1344
1343
|
checkScroll();
|
|
1345
1344
|
cleanup(() => window.removeEventListener("scroll", checkScroll));
|
|
1345
|
+
}, {
|
|
1346
|
+
strategy: "document-idle"
|
|
1346
1347
|
});
|
|
1347
1348
|
const toTop = $(() => {
|
|
1348
1349
|
window.scrollTo({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elmethis/qwik",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,31 +38,31 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@builder.io/qwik": "1.19.0",
|
|
40
40
|
"@eslint/js": "latest",
|
|
41
|
-
"@storybook/addon-docs": "
|
|
42
|
-
"@storybook/addon-essentials": "
|
|
41
|
+
"@storybook/addon-docs": "8",
|
|
42
|
+
"@storybook/addon-essentials": "8",
|
|
43
43
|
"@types/lodash-es": "^4.17.12",
|
|
44
44
|
"@types/node": "20.19.0",
|
|
45
|
-
"eslint": "
|
|
46
|
-
"eslint-plugin-qwik": "1.19.
|
|
47
|
-
"globals": "
|
|
45
|
+
"eslint": "10.0.2",
|
|
46
|
+
"eslint-plugin-qwik": "1.19.1",
|
|
47
|
+
"globals": "17.4.0",
|
|
48
48
|
"jarkup-ts": "^0.8.0",
|
|
49
49
|
"np": "^8.0.4",
|
|
50
50
|
"prettier": "3.6.2",
|
|
51
51
|
"sass": "^1.97.3",
|
|
52
|
-
"storybook": "
|
|
52
|
+
"storybook": "8",
|
|
53
53
|
"storybook-framework-qwik": "^0.4.0",
|
|
54
54
|
"typescript": "5.4.5",
|
|
55
|
-
"typescript-eslint": "8.
|
|
55
|
+
"typescript-eslint": "8.56.1",
|
|
56
56
|
"undici": "*",
|
|
57
57
|
"vite": "7.3.1",
|
|
58
|
-
"vite-tsconfig-paths": "^
|
|
58
|
+
"vite-tsconfig-paths": "^6.1.1"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@mdi/js": "^7.4.47",
|
|
62
62
|
"katex": "^0.16.33",
|
|
63
63
|
"lodash-es": "^4.17.23",
|
|
64
64
|
"polished": "^4.3.1",
|
|
65
|
-
"shiki": "^4.0.
|
|
65
|
+
"shiki": "^4.0.1"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"build": "qwik build",
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const shiki = require("shiki");
|
|
4
|
-
let highlighterPromise = null;
|
|
5
|
-
function getHighlighterSingleton() {
|
|
6
|
-
if (!highlighterPromise) {
|
|
7
|
-
highlighterPromise = shiki.createHighlighter({
|
|
8
|
-
langs: [
|
|
9
|
-
"abap",
|
|
10
|
-
"bash",
|
|
11
|
-
"c",
|
|
12
|
-
"clojure",
|
|
13
|
-
"coffeescript",
|
|
14
|
-
"c++",
|
|
15
|
-
"c#",
|
|
16
|
-
"css",
|
|
17
|
-
"dart",
|
|
18
|
-
"diff",
|
|
19
|
-
"docker",
|
|
20
|
-
"elixir",
|
|
21
|
-
"elm",
|
|
22
|
-
"erlang",
|
|
23
|
-
"f#",
|
|
24
|
-
"gherkin",
|
|
25
|
-
"glsl",
|
|
26
|
-
"go",
|
|
27
|
-
"graphql",
|
|
28
|
-
"groovy",
|
|
29
|
-
"haskell",
|
|
30
|
-
"html",
|
|
31
|
-
"java",
|
|
32
|
-
"javascript",
|
|
33
|
-
"json",
|
|
34
|
-
"julia",
|
|
35
|
-
"kotlin",
|
|
36
|
-
"latex",
|
|
37
|
-
"less",
|
|
38
|
-
"lisp",
|
|
39
|
-
"lua",
|
|
40
|
-
"makefile",
|
|
41
|
-
"markdown",
|
|
42
|
-
"matlab",
|
|
43
|
-
"mermaid",
|
|
44
|
-
"nix",
|
|
45
|
-
"objective-c",
|
|
46
|
-
"ocaml",
|
|
47
|
-
"pascal",
|
|
48
|
-
"perl",
|
|
49
|
-
"php",
|
|
50
|
-
"plaintext",
|
|
51
|
-
"powershell",
|
|
52
|
-
"prolog",
|
|
53
|
-
"protobuf",
|
|
54
|
-
"python",
|
|
55
|
-
"r",
|
|
56
|
-
"ruby",
|
|
57
|
-
"rust",
|
|
58
|
-
"sass",
|
|
59
|
-
"scala",
|
|
60
|
-
"scheme",
|
|
61
|
-
"scss",
|
|
62
|
-
"shell",
|
|
63
|
-
"sql",
|
|
64
|
-
"swift",
|
|
65
|
-
"toml",
|
|
66
|
-
"typescript",
|
|
67
|
-
"wasm",
|
|
68
|
-
"xml",
|
|
69
|
-
"yaml"
|
|
70
|
-
],
|
|
71
|
-
themes: [
|
|
72
|
-
"vitesse-light",
|
|
73
|
-
"vitesse-dark"
|
|
74
|
-
]
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
return highlighterPromise;
|
|
78
|
-
}
|
|
79
|
-
exports.getHighlighterSingleton = getHighlighterSingleton;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { createHighlighter } from "shiki";
|
|
2
|
-
let highlighterPromise = null;
|
|
3
|
-
function getHighlighterSingleton() {
|
|
4
|
-
if (!highlighterPromise) {
|
|
5
|
-
highlighterPromise = createHighlighter({
|
|
6
|
-
langs: [
|
|
7
|
-
"abap",
|
|
8
|
-
"bash",
|
|
9
|
-
"c",
|
|
10
|
-
"clojure",
|
|
11
|
-
"coffeescript",
|
|
12
|
-
"c++",
|
|
13
|
-
"c#",
|
|
14
|
-
"css",
|
|
15
|
-
"dart",
|
|
16
|
-
"diff",
|
|
17
|
-
"docker",
|
|
18
|
-
"elixir",
|
|
19
|
-
"elm",
|
|
20
|
-
"erlang",
|
|
21
|
-
"f#",
|
|
22
|
-
"gherkin",
|
|
23
|
-
"glsl",
|
|
24
|
-
"go",
|
|
25
|
-
"graphql",
|
|
26
|
-
"groovy",
|
|
27
|
-
"haskell",
|
|
28
|
-
"html",
|
|
29
|
-
"java",
|
|
30
|
-
"javascript",
|
|
31
|
-
"json",
|
|
32
|
-
"julia",
|
|
33
|
-
"kotlin",
|
|
34
|
-
"latex",
|
|
35
|
-
"less",
|
|
36
|
-
"lisp",
|
|
37
|
-
"lua",
|
|
38
|
-
"makefile",
|
|
39
|
-
"markdown",
|
|
40
|
-
"matlab",
|
|
41
|
-
"mermaid",
|
|
42
|
-
"nix",
|
|
43
|
-
"objective-c",
|
|
44
|
-
"ocaml",
|
|
45
|
-
"pascal",
|
|
46
|
-
"perl",
|
|
47
|
-
"php",
|
|
48
|
-
"plaintext",
|
|
49
|
-
"powershell",
|
|
50
|
-
"prolog",
|
|
51
|
-
"protobuf",
|
|
52
|
-
"python",
|
|
53
|
-
"r",
|
|
54
|
-
"ruby",
|
|
55
|
-
"rust",
|
|
56
|
-
"sass",
|
|
57
|
-
"scala",
|
|
58
|
-
"scheme",
|
|
59
|
-
"scss",
|
|
60
|
-
"shell",
|
|
61
|
-
"sql",
|
|
62
|
-
"swift",
|
|
63
|
-
"toml",
|
|
64
|
-
"typescript",
|
|
65
|
-
"wasm",
|
|
66
|
-
"xml",
|
|
67
|
-
"yaml"
|
|
68
|
-
],
|
|
69
|
-
themes: [
|
|
70
|
-
"vitesse-light",
|
|
71
|
-
"vitesse-dark"
|
|
72
|
-
]
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
return highlighterPromise;
|
|
76
|
-
}
|
|
77
|
-
export {
|
|
78
|
-
getHighlighterSingleton
|
|
79
|
-
};
|