@elmethis/qwik 0.0.1

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.
Files changed (153) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +55 -0
  3. package/lib/assets/6FDiDjPb-elmethis.css +955 -0
  4. package/lib/elmethis.js +56 -0
  5. package/lib/elmethis10.js +108 -0
  6. package/lib/elmethis11.js +25 -0
  7. package/lib/elmethis12.js +87 -0
  8. package/lib/elmethis13.js +62 -0
  9. package/lib/elmethis14.js +62 -0
  10. package/lib/elmethis15.js +44 -0
  11. package/lib/elmethis16.js +58 -0
  12. package/lib/elmethis17.js +14 -0
  13. package/lib/elmethis18.js +24 -0
  14. package/lib/elmethis19.js +41 -0
  15. package/lib/elmethis2.js +68 -0
  16. package/lib/elmethis20.js +89 -0
  17. package/lib/elmethis21.js +28 -0
  18. package/lib/elmethis22.js +24 -0
  19. package/lib/elmethis23.js +57 -0
  20. package/lib/elmethis24.js +15 -0
  21. package/lib/elmethis25.js +12 -0
  22. package/lib/elmethis26.js +17 -0
  23. package/lib/elmethis27.js +27 -0
  24. package/lib/elmethis28.js +193 -0
  25. package/lib/elmethis29.js +17 -0
  26. package/lib/elmethis3.js +17 -0
  27. package/lib/elmethis30.js +8 -0
  28. package/lib/elmethis31.js +79 -0
  29. package/lib/elmethis33.js +32 -0
  30. package/lib/elmethis34.js +6 -0
  31. package/lib/elmethis35.js +6 -0
  32. package/lib/elmethis36.js +11 -0
  33. package/lib/elmethis37.js +8 -0
  34. package/lib/elmethis38.js +18 -0
  35. package/lib/elmethis39.js +24 -0
  36. package/lib/elmethis4.js +33 -0
  37. package/lib/elmethis40.js +24 -0
  38. package/lib/elmethis41.js +29 -0
  39. package/lib/elmethis42.js +31 -0
  40. package/lib/elmethis43.js +32 -0
  41. package/lib/elmethis44.js +18 -0
  42. package/lib/elmethis45.js +24 -0
  43. package/lib/elmethis46.js +36 -0
  44. package/lib/elmethis47.js +45 -0
  45. package/lib/elmethis48.js +27 -0
  46. package/lib/elmethis49.js +89 -0
  47. package/lib/elmethis5.js +123 -0
  48. package/lib/elmethis50.js +18 -0
  49. package/lib/elmethis51.js +64 -0
  50. package/lib/elmethis52.js +28 -0
  51. package/lib/elmethis53.js +28 -0
  52. package/lib/elmethis54.js +32 -0
  53. package/lib/elmethis55.js +28 -0
  54. package/lib/elmethis56.js +8 -0
  55. package/lib/elmethis57.js +15 -0
  56. package/lib/elmethis58.js +10 -0
  57. package/lib/elmethis59.js +26 -0
  58. package/lib/elmethis6.js +20 -0
  59. package/lib/elmethis60.js +14 -0
  60. package/lib/elmethis61.js +14 -0
  61. package/lib/elmethis62.js +8 -0
  62. package/lib/elmethis63.js +8 -0
  63. package/lib/elmethis64.js +24 -0
  64. package/lib/elmethis65.js +17 -0
  65. package/lib/elmethis67.js +8 -0
  66. package/lib/elmethis68.js +23 -0
  67. package/lib/elmethis69.js +15 -0
  68. package/lib/elmethis7.js +12 -0
  69. package/lib/elmethis70.js +8 -0
  70. package/lib/elmethis71.js +9 -0
  71. package/lib/elmethis72.js +14 -0
  72. package/lib/elmethis73.js +10 -0
  73. package/lib/elmethis74.js +8 -0
  74. package/lib/elmethis8.js +29 -0
  75. package/lib/elmethis9.js +16 -0
  76. package/lib-types/components/code/elm-code-block.d.ts +21 -0
  77. package/lib-types/components/code/elm-code-block.stories.d.ts +9 -0
  78. package/lib-types/components/code/elm-katex.d.ts +15 -0
  79. package/lib-types/components/code/elm-katex.stories.d.ts +8 -0
  80. package/lib-types/components/code/elm-shiki-highlighter.d.ts +12 -0
  81. package/lib-types/components/code/elm-shiki-highlighter.stories.d.ts +6 -0
  82. package/lib-types/components/code/shikiInstance.d.ts +2 -0
  83. package/lib-types/components/containments/elm-toggle.d.ts +7 -0
  84. package/lib-types/components/containments/elm-toggle.stories.d.ts +6 -0
  85. package/lib-types/components/fallback/elm-block-fallback.d.ts +5 -0
  86. package/lib-types/components/fallback/elm-block-fallback.stories.d.ts +6 -0
  87. package/lib-types/components/fallback/elm-rectangle-wave.d.ts +4 -0
  88. package/lib-types/components/fallback/elm-rectangle-wave.stories.d.ts +6 -0
  89. package/lib-types/components/icon/elm-dot-loading-icon.d.ts +14 -0
  90. package/lib-types/components/icon/elm-dot-loading-icon.stories.d.ts +6 -0
  91. package/lib-types/components/icon/elm-inline-icon.d.ts +11 -0
  92. package/lib-types/components/icon/elm-inline-icon.stories.d.ts +6 -0
  93. package/lib-types/components/icon/elm-language-icon.d.ts +14 -0
  94. package/lib-types/components/icon/elm-language-icon.stories.d.ts +6 -0
  95. package/lib-types/components/icon/elm-mdi-icon.d.ts +8 -0
  96. package/lib-types/components/icon/elm-mdi-icon.stories.d.ts +6 -0
  97. package/lib-types/components/icon/languages/bash.d.ts +2 -0
  98. package/lib-types/components/icon/languages/c-plus-plus.d.ts +2 -0
  99. package/lib-types/components/icon/languages/c-sharp.d.ts +2 -0
  100. package/lib-types/components/icon/languages/c.d.ts +2 -0
  101. package/lib-types/components/icon/languages/css.d.ts +2 -0
  102. package/lib-types/components/icon/languages/go.d.ts +2 -0
  103. package/lib-types/components/icon/languages/html.d.ts +2 -0
  104. package/lib-types/components/icon/languages/java.d.ts +2 -0
  105. package/lib-types/components/icon/languages/javascript.d.ts +2 -0
  106. package/lib-types/components/icon/languages/json.d.ts +2 -0
  107. package/lib-types/components/icon/languages/kotlin.d.ts +2 -0
  108. package/lib-types/components/icon/languages/language-interface.d.ts +4 -0
  109. package/lib-types/components/icon/languages/lua.d.ts +2 -0
  110. package/lib-types/components/icon/languages/npm.d.ts +2 -0
  111. package/lib-types/components/icon/languages/python.d.ts +2 -0
  112. package/lib-types/components/icon/languages/rust.d.ts +2 -0
  113. package/lib-types/components/icon/languages/sql.d.ts +2 -0
  114. package/lib-types/components/icon/languages/terraform.d.ts +2 -0
  115. package/lib-types/components/icon/languages/typescript.d.ts +2 -0
  116. package/lib-types/components/media/elm-block-image.d.ts +16 -0
  117. package/lib-types/components/media/elm-block-image.stories.d.ts +12 -0
  118. package/lib-types/components/media/elm-file.d.ts +15 -0
  119. package/lib-types/components/media/elm-file.stories.d.ts +7 -0
  120. package/lib-types/components/navigation/elm-bookmark.d.ts +24 -0
  121. package/lib-types/components/navigation/elm-bookmark.stories.d.ts +12 -0
  122. package/lib-types/components/others/elm-jarkup.d.ts +5 -0
  123. package/lib-types/components/others/elm-jarkup.stories.d.ts +6 -0
  124. package/lib-types/components/table/elm-table-body.d.ts +2 -0
  125. package/lib-types/components/table/elm-table-cell.d.ts +12 -0
  126. package/lib-types/components/table/elm-table-header.d.ts +3 -0
  127. package/lib-types/components/table/elm-table-row.d.ts +2 -0
  128. package/lib-types/components/table/elm-table.d.ts +13 -0
  129. package/lib-types/components/table/elm-table.stories.d.ts +6 -0
  130. package/lib-types/components/table/index.d.ts +5 -0
  131. package/lib-types/components/typography/elm-block-quote.d.ts +4 -0
  132. package/lib-types/components/typography/elm-block-quote.stories.d.ts +6 -0
  133. package/lib-types/components/typography/elm-callout.d.ts +8 -0
  134. package/lib-types/components/typography/elm-callout.stories.d.ts +10 -0
  135. package/lib-types/components/typography/elm-divider.d.ts +8 -0
  136. package/lib-types/components/typography/elm-divider.stories.d.ts +6 -0
  137. package/lib-types/components/typography/elm-fragment-identifier.d.ts +7 -0
  138. package/lib-types/components/typography/elm-fragment-identifier.stories.d.ts +6 -0
  139. package/lib-types/components/typography/elm-heading.d.ts +6 -0
  140. package/lib-types/components/typography/elm-heading.stories.d.ts +7 -0
  141. package/lib-types/components/typography/elm-inline-text.d.ts +54 -0
  142. package/lib-types/components/typography/elm-inline-text.stories.d.ts +13 -0
  143. package/lib-types/components/typography/elm-list.d.ts +5 -0
  144. package/lib-types/components/typography/elm-list.stories.d.ts +8 -0
  145. package/lib-types/components/typography/elm-paragraph.d.ts +5 -0
  146. package/lib-types/components/typography/elm-paragraph.stories.d.ts +9 -0
  147. package/lib-types/entry.dev.d.ts +2 -0
  148. package/lib-types/entry.ssr.d.ts +14 -0
  149. package/lib-types/hooks/useDelayedSignal.d.ts +6 -0
  150. package/lib-types/hooks/useInView.d.ts +6 -0
  151. package/lib-types/index.d.ts +27 -0
  152. package/lib-types/root.d.ts +2 -0
  153. package/package.json +72 -0
@@ -0,0 +1,56 @@
1
+ import { ElmCodeBlock } from "./elmethis2.js";
2
+ import { ElmKatex } from "./elmethis3.js";
3
+ import { ElmShikiHighlighter } from "./elmethis4.js";
4
+ import { ElmToggle } from "./elmethis5.js";
5
+ import { ElmBlockFallback } from "./elmethis6.js";
6
+ import { ElmRectangleWave } from "./elmethis7.js";
7
+ import { ElmDotLoadingIcon } from "./elmethis8.js";
8
+ import { ElmInlineIcon } from "./elmethis9.js";
9
+ import { ElmLanguageIcon } from "./elmethis10.js";
10
+ import { ElmMdiIcon } from "./elmethis11.js";
11
+ import { ElmBlockImage } from "./elmethis12.js";
12
+ import { ElmFile } from "./elmethis13.js";
13
+ import { ElmBookmark } from "./elmethis14.js";
14
+ import { ElmBlockQuote } from "./elmethis15.js";
15
+ import { ElmCallout } from "./elmethis16.js";
16
+ import { ElmDivider } from "./elmethis17.js";
17
+ import { ElmFragmentIdentifier } from "./elmethis18.js";
18
+ import { ElmHeading } from "./elmethis19.js";
19
+ import { ElmInlineText } from "./elmethis20.js";
20
+ import { ElmList } from "./elmethis21.js";
21
+ import { ElmParagraph } from "./elmethis22.js";
22
+ import { ElmTable } from "./elmethis23.js";
23
+ import { ElmTableHeader } from "./elmethis24.js";
24
+ import { ElmTableBody } from "./elmethis25.js";
25
+ import { ElmTableRow } from "./elmethis26.js";
26
+ import { ElmTableCell } from "./elmethis27.js";
27
+ import { ElmJarkup } from "./elmethis28.js";
28
+ export {
29
+ ElmBlockFallback,
30
+ ElmBlockImage,
31
+ ElmBlockQuote,
32
+ ElmBookmark,
33
+ ElmCallout,
34
+ ElmCodeBlock,
35
+ ElmDivider,
36
+ ElmDotLoadingIcon,
37
+ ElmFile,
38
+ ElmFragmentIdentifier,
39
+ ElmHeading,
40
+ ElmInlineIcon,
41
+ ElmInlineText,
42
+ ElmJarkup,
43
+ ElmKatex,
44
+ ElmLanguageIcon,
45
+ ElmList,
46
+ ElmMdiIcon,
47
+ ElmParagraph,
48
+ ElmRectangleWave,
49
+ ElmShikiHighlighter,
50
+ ElmTable,
51
+ ElmTableBody,
52
+ ElmTableCell,
53
+ ElmTableHeader,
54
+ ElmTableRow,
55
+ ElmToggle
56
+ };
@@ -0,0 +1,108 @@
1
+ import { jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$ } from "@builder.io/qwik";
3
+ import { Rust } from "./elmethis38.js";
4
+ import { Javascript } from "./elmethis39.js";
5
+ import { Typescript } from "./elmethis40.js";
6
+ import { Bash } from "./elmethis41.js";
7
+ import { Terraform } from "./elmethis42.js";
8
+ import { Html } from "./elmethis43.js";
9
+ import { Css } from "./elmethis44.js";
10
+ import { Npm } from "./elmethis45.js";
11
+ import { Java } from "./elmethis46.js";
12
+ import { Kotlin } from "./elmethis47.js";
13
+ import { Go } from "./elmethis48.js";
14
+ import { Python } from "./elmethis49.js";
15
+ import { Sql } from "./elmethis50.js";
16
+ import { Json } from "./elmethis51.js";
17
+ import { Lua } from "./elmethis52.js";
18
+ import { Csharp } from "./elmethis53.js";
19
+ import { Cplusplus } from "./elmethis54.js";
20
+ import { C } from "./elmethis55.js";
21
+ const normalizeLanguage = (language) => {
22
+ switch (language) {
23
+ case "rust":
24
+ case "rs":
25
+ return "rust";
26
+ case "javascript":
27
+ case "js":
28
+ return "javascript";
29
+ case "typescript":
30
+ case "ts":
31
+ return "typescript";
32
+ case "bash":
33
+ case "sh":
34
+ case "shell":
35
+ return "shell";
36
+ case "tf":
37
+ case "terraform":
38
+ case "hcl":
39
+ return "terraform";
40
+ case "html":
41
+ case "html5":
42
+ return "html";
43
+ case "css":
44
+ case "css3":
45
+ return "css";
46
+ case "npm":
47
+ return "npm";
48
+ case "java":
49
+ return "java";
50
+ case "kotlin":
51
+ case "kt":
52
+ return "kotlin";
53
+ case "go":
54
+ case "golang":
55
+ return "go";
56
+ case "python":
57
+ case "py":
58
+ return "python";
59
+ case "sql":
60
+ return "sql";
61
+ case "json":
62
+ return "json";
63
+ case "lua":
64
+ return "lua";
65
+ case "cs":
66
+ case "c#":
67
+ case "csharp":
68
+ return "csharp";
69
+ case "cpp":
70
+ case "c++":
71
+ return "cpp";
72
+ case "c":
73
+ case "clang":
74
+ return "c";
75
+ default:
76
+ return "file";
77
+ }
78
+ };
79
+ const renderMap = {
80
+ rust: Rust,
81
+ javascript: Javascript,
82
+ typescript: Typescript,
83
+ shell: Bash,
84
+ terraform: Terraform,
85
+ html: Html,
86
+ css: Css,
87
+ npm: Npm,
88
+ java: Java,
89
+ kotlin: Kotlin,
90
+ go: Go,
91
+ python: Python,
92
+ sql: Sql,
93
+ json: Json,
94
+ lua: Lua,
95
+ csharp: Csharp,
96
+ cpp: Cplusplus,
97
+ c: C,
98
+ file: () => null
99
+ };
100
+ const ElmLanguageIcon = component$(({ size = 24, language }) => {
101
+ const Component2 = renderMap[normalizeLanguage(language)];
102
+ return /* @__PURE__ */ jsx(Component2, {
103
+ size
104
+ });
105
+ });
106
+ export {
107
+ ElmLanguageIcon
108
+ };
@@ -0,0 +1,25 @@
1
+ import { jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$ } from "@builder.io/qwik";
3
+ import styles from "./elmethis56.js";
4
+ const ElmMdiIcon = component$(({ d, size = "1em", color, lightColor, darkColor }) => {
5
+ return /* @__PURE__ */ jsx("svg", {
6
+ class: styles.icon,
7
+ style: {
8
+ "--color": lightColor ?? color,
9
+ "--dark-color": darkColor ?? color
10
+ },
11
+ width: size,
12
+ height: size,
13
+ viewBox: "0 0 24 24",
14
+ fill: color,
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ focusable: "false",
17
+ role: "img",
18
+ children: /* @__PURE__ */ jsx("path", {
19
+ d
20
+ })
21
+ });
22
+ });
23
+ export {
24
+ ElmMdiIcon
25
+ };
@@ -0,0 +1,87 @@
1
+ import { jsx, jsxs } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, useSignal, $ } from "@builder.io/qwik";
3
+ import styles from "./elmethis57.js";
4
+ import { ElmInlineText } from "./elmethis20.js";
5
+ import { ElmMdiIcon } from "./elmethis11.js";
6
+ import { ElmRectangleWave } from "./elmethis7.js";
7
+ import { mdiMessageImageOutline } from "@mdi/js";
8
+ const ElmBlockImage = component$(({ src, alt, caption, width, height, enableModal = true }) => {
9
+ const isLoading = useSignal(true);
10
+ const isShowModal = useSignal(false);
11
+ const handleImageLoad = $(() => {
12
+ isLoading.value = false;
13
+ });
14
+ const handleToggleModal = $(() => {
15
+ if (enableModal) {
16
+ isShowModal.value = !isShowModal.value;
17
+ }
18
+ });
19
+ const ImageComponent = /* @__PURE__ */ jsx("img", {
20
+ class: [
21
+ styles.image
22
+ ],
23
+ src,
24
+ alt: alt ?? caption ?? "Image",
25
+ width,
26
+ height,
27
+ onLoad$: handleImageLoad,
28
+ style: {
29
+ "--opacity": isLoading.value ? 0 : 1,
30
+ "--cursor": enableModal ? isShowModal.value ? "zoom-out" : "zoom-in" : "default"
31
+ }
32
+ });
33
+ const Modal = /* @__PURE__ */ jsx("div", {
34
+ class: styles["modal-container"],
35
+ style: {
36
+ pointerEvents: isShowModal.value ? "auto" : "none",
37
+ "--opacity": isShowModal.value ? 1 : 0
38
+ },
39
+ onClick$: handleToggleModal,
40
+ children: ImageComponent
41
+ });
42
+ return /* @__PURE__ */ jsxs("figure", {
43
+ class: styles["block-image"],
44
+ children: [
45
+ /* @__PURE__ */ jsxs("div", {
46
+ class: styles["image-container"],
47
+ style: {
48
+ "--opacity": isLoading.value ? 1 : 0
49
+ },
50
+ onClick$: handleToggleModal,
51
+ children: [
52
+ ImageComponent,
53
+ /* @__PURE__ */ jsx("div", {
54
+ class: styles["fallback"],
55
+ children: /* @__PURE__ */ jsx(ElmRectangleWave, {})
56
+ })
57
+ ]
58
+ }),
59
+ caption && /* @__PURE__ */ jsxs("figcaption", {
60
+ class: styles["caption-box"],
61
+ style: {
62
+ "--opacity": isLoading.value ? 0 : 1
63
+ },
64
+ children: [
65
+ /* @__PURE__ */ jsx("span", {
66
+ style: {
67
+ flex: "1"
68
+ },
69
+ children: /* @__PURE__ */ jsx(ElmMdiIcon, {
70
+ d: mdiMessageImageOutline,
71
+ color: "#cdb57b",
72
+ size: "1.25rem"
73
+ })
74
+ }),
75
+ /* @__PURE__ */ jsx(ElmInlineText, {
76
+ size: "1rem",
77
+ children: caption
78
+ })
79
+ ]
80
+ }),
81
+ Modal
82
+ ]
83
+ });
84
+ });
85
+ export {
86
+ ElmBlockImage
87
+ };
@@ -0,0 +1,62 @@
1
+ import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, $ } from "@builder.io/qwik";
3
+ import styles from "./elmethis58.js";
4
+ import { ElmMdiIcon } from "./elmethis11.js";
5
+ import { mdiFile, mdiDownload } from "@mdi/js";
6
+ import { ElmInlineText } from "./elmethis20.js";
7
+ function getLastPathSegmentWithoutQueryOrHash(urlString) {
8
+ const cleanedUrl = urlString.split(/[?#]/)[0];
9
+ const pathSegments = cleanedUrl.split("/").filter(Boolean);
10
+ return pathSegments.length > 0 ? pathSegments[pathSegments.length - 1] : null;
11
+ }
12
+ const ElmFile = component$(({ name, src, filesize }) => {
13
+ const downloadFile = $(async () => {
14
+ let link;
15
+ try {
16
+ const response = await fetch(src);
17
+ if (!response.ok) throw new Error("Failed to download file");
18
+ const blob = await response.blob();
19
+ link = document.createElement("a");
20
+ link.href = URL.createObjectURL(blob);
21
+ link.download = name ?? getLastPathSegmentWithoutQueryOrHash(src) ?? "file";
22
+ link.click();
23
+ } catch (error) {
24
+ console.error("ERROR:", error);
25
+ } finally {
26
+ if (link) URL.revokeObjectURL(link.href);
27
+ }
28
+ });
29
+ return /* @__PURE__ */ jsxs("div", {
30
+ class: styles.file,
31
+ children: [
32
+ /* @__PURE__ */ jsx("div", {
33
+ children: /* @__PURE__ */ jsx(ElmMdiIcon, {
34
+ d: mdiFile,
35
+ size: "1.25rem"
36
+ })
37
+ }),
38
+ /* @__PURE__ */ jsx("div", {
39
+ children: /* @__PURE__ */ jsx(ElmInlineText, {
40
+ children: name ?? getLastPathSegmentWithoutQueryOrHash(src)
41
+ })
42
+ }),
43
+ /* @__PURE__ */ jsx("div", {
44
+ class: styles["file-size"],
45
+ children: /* @__PURE__ */ jsx(ElmInlineText, {
46
+ children: filesize
47
+ })
48
+ }),
49
+ /* @__PURE__ */ jsx("div", {
50
+ class: styles["download-icon"],
51
+ onClick$: downloadFile,
52
+ children: /* @__PURE__ */ jsx(ElmMdiIcon, {
53
+ d: mdiDownload,
54
+ size: "1.25rem"
55
+ })
56
+ })
57
+ ]
58
+ });
59
+ });
60
+ export {
61
+ ElmFile
62
+ };
@@ -0,0 +1,62 @@
1
+ import { jsx, jsxs } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$ } from "@builder.io/qwik";
3
+ import styles from "./elmethis59.js";
4
+ import { ElmInlineText } from "./elmethis20.js";
5
+ import { mdiLinkVariant } from "@mdi/js";
6
+ import { ElmMdiIcon } from "./elmethis11.js";
7
+ import { ElmInlineIcon } from "./elmethis9.js";
8
+ const ElmBookmark = component$(({ url, image, title, description, favicon }) => {
9
+ return /* @__PURE__ */ jsx("div", {
10
+ class: styles.bookmark,
11
+ children: /* @__PURE__ */ jsxs("a", {
12
+ class: styles.container,
13
+ href: url,
14
+ target: "_blank",
15
+ rel: "noopener noreferrer",
16
+ children: [
17
+ /* @__PURE__ */ jsx("img", {
18
+ class: styles.image,
19
+ src: image,
20
+ alt: "OGP Image"
21
+ }),
22
+ /* @__PURE__ */ jsxs("div", {
23
+ class: styles.content,
24
+ children: [
25
+ /* @__PURE__ */ jsx("div", {
26
+ class: styles.title,
27
+ children: /* @__PURE__ */ jsx(ElmInlineText, {
28
+ bold: true,
29
+ children: title
30
+ })
31
+ }),
32
+ /* @__PURE__ */ jsx("div", {
33
+ class: styles.description,
34
+ children: /* @__PURE__ */ jsx(ElmInlineText, {
35
+ size: "0.75rem",
36
+ children: description
37
+ })
38
+ }),
39
+ /* @__PURE__ */ jsxs("div", {
40
+ class: styles.link,
41
+ children: [
42
+ favicon ? /* @__PURE__ */ jsx(ElmInlineIcon, {
43
+ src: favicon
44
+ }) : /* @__PURE__ */ jsx(ElmMdiIcon, {
45
+ d: mdiLinkVariant,
46
+ color: "#6987b8"
47
+ }),
48
+ /* @__PURE__ */ jsx(ElmInlineText, {
49
+ size: "0.75rem",
50
+ children: url
51
+ })
52
+ ]
53
+ })
54
+ ]
55
+ })
56
+ ]
57
+ })
58
+ });
59
+ });
60
+ export {
61
+ ElmBookmark
62
+ };
@@ -0,0 +1,44 @@
1
+ import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, Slot } from "@builder.io/qwik";
3
+ import styles from "./elmethis60.js";
4
+ import textStyles from "./elmethis30.js";
5
+ import { ElmMdiIcon } from "./elmethis11.js";
6
+ import { mdiFormatQuoteOpen, mdiFormatQuoteClose } from "@mdi/js";
7
+ const ElmBlockQuote = component$(({ cite }) => {
8
+ return /* @__PURE__ */ jsxs("blockquote", {
9
+ class: [
10
+ styles.blockquote,
11
+ textStyles.text
12
+ ],
13
+ cite,
14
+ children: [
15
+ /* @__PURE__ */ jsx("div", {
16
+ class: styles.icon,
17
+ style: {
18
+ "--inset": "0.25rem auto auto 0.5rem"
19
+ },
20
+ children: /* @__PURE__ */ jsx(ElmMdiIcon, {
21
+ d: mdiFormatQuoteOpen
22
+ })
23
+ }),
24
+ /* @__PURE__ */ jsx("div", {
25
+ class: [
26
+ styles.body
27
+ ],
28
+ children: /* @__PURE__ */ jsx(Slot, {})
29
+ }),
30
+ /* @__PURE__ */ jsx("div", {
31
+ class: styles.icon,
32
+ style: {
33
+ "--inset": "auto 0.25rem 0.25rem auto"
34
+ },
35
+ children: /* @__PURE__ */ jsx(ElmMdiIcon, {
36
+ d: mdiFormatQuoteClose
37
+ })
38
+ })
39
+ ]
40
+ });
41
+ });
42
+ export {
43
+ ElmBlockQuote
44
+ };
@@ -0,0 +1,58 @@
1
+ import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, Slot } from "@builder.io/qwik";
3
+ import styles from "./elmethis61.js";
4
+ import { mdiAlertOctagram, mdiAlert, mdiShieldAlert, mdiLightbulbOn, mdiInformation } from "@mdi/js";
5
+ import { ElmMdiIcon } from "./elmethis11.js";
6
+ import { ElmInlineText } from "./elmethis20.js";
7
+ const COLOR_MAP = Object.freeze({
8
+ note: {
9
+ code: "#6987b8",
10
+ icon: mdiInformation
11
+ },
12
+ tip: {
13
+ code: "#59b57c",
14
+ icon: mdiLightbulbOn
15
+ },
16
+ important: {
17
+ code: "#9771bd",
18
+ icon: mdiShieldAlert
19
+ },
20
+ warning: {
21
+ code: "#b8a36e",
22
+ icon: mdiAlert
23
+ },
24
+ caution: {
25
+ code: "#b36472",
26
+ icon: mdiAlertOctagram
27
+ }
28
+ });
29
+ const ElmCallout = component$(({ type = "note" }) => {
30
+ return /* @__PURE__ */ jsxs("aside", {
31
+ class: styles.callout,
32
+ style: {
33
+ "--callout-color": COLOR_MAP[type].code
34
+ },
35
+ children: [
36
+ /* @__PURE__ */ jsxs("div", {
37
+ class: styles.header,
38
+ children: [
39
+ /* @__PURE__ */ jsx(ElmMdiIcon, {
40
+ d: COLOR_MAP[type].icon,
41
+ color: COLOR_MAP[type].code,
42
+ size: "1.25rem"
43
+ }),
44
+ /* @__PURE__ */ jsx(ElmInlineText, {
45
+ children: type.toLocaleUpperCase()
46
+ })
47
+ ]
48
+ }),
49
+ /* @__PURE__ */ jsx("div", {
50
+ class: styles.content,
51
+ children: /* @__PURE__ */ jsx(Slot, {})
52
+ })
53
+ ]
54
+ });
55
+ });
56
+ export {
57
+ ElmCallout
58
+ };
@@ -0,0 +1,14 @@
1
+ import { jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$ } from "@builder.io/qwik";
3
+ import styles from "./elmethis62.js";
4
+ const ElmDivider = component$(({ margin }) => {
5
+ return /* @__PURE__ */ jsx("hr", {
6
+ class: styles.hr,
7
+ style: {
8
+ marginBlock: margin
9
+ }
10
+ });
11
+ });
12
+ export {
13
+ ElmDivider
14
+ };
@@ -0,0 +1,24 @@
1
+ import { jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, $ } from "@builder.io/qwik";
3
+ import styles from "./elmethis63.js";
4
+ const ElmFragmentIdentifier = component$(({ id }) => {
5
+ const handleHashClick = $((id2) => {
6
+ const url = new URL(window.location.href);
7
+ url.hash = id2;
8
+ window.history.replaceState(null, "", url.toString());
9
+ const target = document.getElementById(id2);
10
+ if (target != null) {
11
+ target.scrollIntoView({
12
+ behavior: "smooth"
13
+ });
14
+ }
15
+ });
16
+ return /* @__PURE__ */ jsx("span", {
17
+ class: styles.fragment,
18
+ onClick$: () => handleHashClick(id),
19
+ children: "#"
20
+ });
21
+ });
22
+ export {
23
+ ElmFragmentIdentifier
24
+ };
@@ -0,0 +1,41 @@
1
+ import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, Slot } from "@builder.io/qwik";
3
+ import styles from "./elmethis64.js";
4
+ import textStyles from "./elmethis30.js";
5
+ import { ElmFragmentIdentifier } from "./elmethis18.js";
6
+ const SIZE_MAP = Object.freeze({
7
+ 1: 1.5,
8
+ 2: 1.4,
9
+ 3: 1.3,
10
+ 4: 1.2,
11
+ 5: 1.15,
12
+ 6: 1.1
13
+ });
14
+ const ElmHeading = component$(({ level, text, id }) => {
15
+ const Tag = `h${level}`;
16
+ return /* @__PURE__ */ jsxs(Tag, {
17
+ class: [
18
+ styles["heading-common"],
19
+ textStyles.text,
20
+ styles[`h${level}`]
21
+ ],
22
+ style: {
23
+ "--font-size": `${SIZE_MAP[level]}em`
24
+ },
25
+ children: [
26
+ text,
27
+ /* @__PURE__ */ jsx(Slot, {}),
28
+ id && /* @__PURE__ */ jsx("span", {
29
+ style: {
30
+ padding: "0.5rem"
31
+ },
32
+ children: /* @__PURE__ */ jsx(ElmFragmentIdentifier, {
33
+ id
34
+ })
35
+ })
36
+ ]
37
+ });
38
+ });
39
+ export {
40
+ ElmHeading
41
+ };
@@ -0,0 +1,68 @@
1
+ import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, useSignal, $, Slot } from "@builder.io/qwik";
3
+ import styles from "./elmethis29.js";
4
+ import { ElmLanguageIcon } from "./elmethis10.js";
5
+ import { ElmInlineText } from "./elmethis20.js";
6
+ import { ElmShikiHighlighter } from "./elmethis4.js";
7
+ import { mdiClipboardCheckMultipleOutline, mdiClipboardMultipleOutline } from "@mdi/js";
8
+ import { ElmMdiIcon } from "./elmethis11.js";
9
+ const ElmCodeBlock = component$(({ code, language = "txt", caption, margin }) => {
10
+ const timerId = useSignal(null);
11
+ const copyToClipboard = $(async () => {
12
+ if (timerId.value !== null) {
13
+ window.clearTimeout(timerId.value);
14
+ timerId.value = null;
15
+ }
16
+ try {
17
+ await navigator.clipboard.writeText(code);
18
+ timerId.value = window.setTimeout(() => timerId.value = null, 1500);
19
+ } catch (err) {
20
+ console.error("Failed to copy: ", err);
21
+ }
22
+ });
23
+ return /* @__PURE__ */ jsxs("figure", {
24
+ class: styles["code-block"],
25
+ style: {
26
+ margin
27
+ },
28
+ children: [
29
+ /* @__PURE__ */ jsx("span", {
30
+ class: styles["language-icon"],
31
+ children: /* @__PURE__ */ jsx(ElmLanguageIcon, {
32
+ language
33
+ })
34
+ }),
35
+ /* @__PURE__ */ jsx("span", {
36
+ class: styles["caption"],
37
+ children: /* @__PURE__ */ jsxs(ElmInlineText, {
38
+ children: [
39
+ caption || language,
40
+ /* @__PURE__ */ jsx(Slot, {})
41
+ ]
42
+ })
43
+ }),
44
+ /* @__PURE__ */ jsx("div", {
45
+ class: styles["copy-icon"],
46
+ onClick$: copyToClipboard,
47
+ children: /* @__PURE__ */ jsx(ElmMdiIcon, {
48
+ size: "1.25rem",
49
+ d: timerId.value !== null ? mdiClipboardCheckMultipleOutline : mdiClipboardMultipleOutline,
50
+ color: timerId.value !== null ? "#59b57c" : void 0
51
+ })
52
+ }),
53
+ /* @__PURE__ */ jsx("hr", {
54
+ class: styles["divider"]
55
+ }),
56
+ /* @__PURE__ */ jsx("div", {
57
+ class: styles["code"],
58
+ children: /* @__PURE__ */ jsx(ElmShikiHighlighter, {
59
+ code,
60
+ language
61
+ })
62
+ })
63
+ ]
64
+ });
65
+ });
66
+ export {
67
+ ElmCodeBlock
68
+ };