@elmethis/qwik 0.0.19 → 0.0.21
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.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
-
import { component$, Slot, useSignal, useTask$, $, useComputed$, useOnDocument, useVisibleTask$, useContextProvider, createContextId, useContext } from "@builder.io/qwik";
|
|
2
|
+
import { component$, Slot, useSignal, useTask$, $, useComputed$, useOnDocument, useVisibleTask$, useContextProvider, createContextId, useContext, Fragment as Fragment$1 } 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
4
|
import { codeToHtml } from "shiki";
|
|
5
5
|
import { renderToString } from "katex";
|
|
6
6
|
import { kebabCase } from "lodash-es";
|
|
7
|
+
import { marked } from "marked";
|
|
7
8
|
const caption$1 = "_caption_1j0ec_27";
|
|
8
9
|
const divider = "_divider_1j0ec_50";
|
|
9
10
|
const code$2 = "_code_1j0ec_1";
|
|
10
|
-
const styles$
|
|
11
|
+
const styles$t = {
|
|
11
12
|
"code-block": "_code-block_1j0ec_1",
|
|
12
13
|
"language-icon": "_language-icon_1j0ec_22",
|
|
13
14
|
caption: caption$1,
|
|
@@ -67,7 +68,7 @@ const Typescript = component$(({ size = 24, ...props }) => {
|
|
|
67
68
|
});
|
|
68
69
|
});
|
|
69
70
|
const path = "_path_1ccs2_1";
|
|
70
|
-
const styles$
|
|
71
|
+
const styles$s = {
|
|
71
72
|
path
|
|
72
73
|
};
|
|
73
74
|
const Bash = component$(({ size = 24, ...props }) => {
|
|
@@ -83,7 +84,7 @@ const Bash = component$(({ size = 24, ...props }) => {
|
|
|
83
84
|
d: "M4.24 4.24h119.53v119.53H4.24z"
|
|
84
85
|
}),
|
|
85
86
|
/* @__PURE__ */ jsx("path", {
|
|
86
|
-
class: styles$
|
|
87
|
+
class: styles$s.path,
|
|
87
88
|
d: "M109.01 28.64L71.28 6.24c-2.25-1.33-4.77-2-7.28-2s-5.03.67-7.28 2.01l-37.74 22.4c-4.5 2.67-7.28 7.61-7.28 12.96v44.8c0 5.35 2.77 10.29 7.28 12.96l37.73 22.4c2.25 1.34 4.76 2 7.28 2c2.51 0 5.03-.67 7.28-2l37.74-22.4c4.5-2.67 7.28-7.62 7.28-12.96V41.6c0-5.34-2.77-10.29-7.28-12.96M79.79 98.59l.06 3.22c0 .39-.25.83-.55.99l-1.91 1.1c-.3.15-.56-.03-.56-.42l-.03-3.17c-1.63.68-3.29.84-4.34.42c-.2-.08-.29-.37-.21-.71l.69-2.91c.06-.23.18-.46.34-.6c.06-.06.12-.1.18-.13c.11-.06.22-.07.31-.03c1.14.38 2.59.2 3.99-.5c1.78-.9 2.97-2.72 2.95-4.52c-.02-1.64-.9-2.31-3.05-2.33c-2.74.01-5.3-.53-5.34-4.57c-.03-3.32 1.69-6.78 4.43-8.96l-.03-3.25c0-.4.24-.84.55-1l1.85-1.18c.3-.15.56.04.56.43l.03 3.25c1.36-.54 2.54-.69 3.61-.44c.23.06.34.38.24.75l-.72 2.88c-.06.22-.18.44-.33.58a.8.8 0 0 1-.19.14c-.1.05-.19.06-.28.05c-.49-.11-1.65-.36-3.48.56c-1.92.97-2.59 2.64-2.58 3.88c.02 1.48.77 1.93 3.39 1.97c3.49.06 4.99 1.58 5.03 5.09c.05 3.44-1.79 7.15-4.61 9.41m26.34-60.5l-35.7 22.05c-4.45 2.6-7.73 5.52-7.74 10.89v43.99c0 3.21 1.3 5.29 3.29 5.9c-.65.11-1.32.19-1.98.19c-2.09 0-4.15-.57-5.96-1.64l-37.73-22.4c-3.69-2.19-5.98-6.28-5.98-10.67V41.6c0-4.39 2.29-8.48 5.98-10.67l37.74-22.4c1.81-1.07 3.87-1.64 5.96-1.64s4.15.57 5.96 1.64l37.74 22.4c3.11 1.85 5.21 5.04 5.8 8.63c-1.27-2.67-4.09-3.39-7.38-1.47"
|
|
88
89
|
}),
|
|
89
90
|
/* @__PURE__ */ jsx("path", {
|
|
@@ -524,12 +525,12 @@ const C = component$(({ size = 24, ...props }) => {
|
|
|
524
525
|
});
|
|
525
526
|
});
|
|
526
527
|
const icon$3 = "_icon_1gvln_1";
|
|
527
|
-
const styles$
|
|
528
|
+
const styles$r = {
|
|
528
529
|
icon: icon$3
|
|
529
530
|
};
|
|
530
531
|
const ElmMdiIcon = component$(({ d, size = "1em", color, lightColor, darkColor }) => {
|
|
531
532
|
return /* @__PURE__ */ jsx("svg", {
|
|
532
|
-
class: styles$
|
|
533
|
+
class: styles$r.icon,
|
|
533
534
|
style: {
|
|
534
535
|
"--color": lightColor ?? color,
|
|
535
536
|
"--dark-color": darkColor ?? color
|
|
@@ -638,7 +639,7 @@ const text$3 = "_text_1gswr_1";
|
|
|
638
639
|
const code$1 = "_code_1gswr_12";
|
|
639
640
|
const kbd = "_kbd_1gswr_21";
|
|
640
641
|
const link$1 = "_link_1gswr_47";
|
|
641
|
-
const styles$
|
|
642
|
+
const styles$q = {
|
|
642
643
|
text: text$3,
|
|
643
644
|
code: code$1,
|
|
644
645
|
kbd,
|
|
@@ -649,16 +650,16 @@ const textStyles = {
|
|
|
649
650
|
text: text$2
|
|
650
651
|
};
|
|
651
652
|
const icon$2 = "_icon_19g82_1";
|
|
652
|
-
const styles$
|
|
653
|
+
const styles$p = {
|
|
653
654
|
icon: icon$2
|
|
654
655
|
};
|
|
655
656
|
const ElmInlineIcon = component$(({ src, alt }) => {
|
|
656
657
|
return /* @__PURE__ */ jsx("span", {
|
|
657
|
-
class: styles$
|
|
658
|
+
class: styles$p.icon,
|
|
658
659
|
children: /* @__PURE__ */ jsx("img", {
|
|
659
660
|
src,
|
|
660
661
|
alt,
|
|
661
|
-
class: styles$
|
|
662
|
+
class: styles$p.icon
|
|
662
663
|
})
|
|
663
664
|
});
|
|
664
665
|
});
|
|
@@ -669,7 +670,7 @@ const ElmInlineText = component$((props) => {
|
|
|
669
670
|
}) : /* @__PURE__ */ jsx(Slot, {});
|
|
670
671
|
if (props.kbd) {
|
|
671
672
|
vnode = /* @__PURE__ */ jsx("kbd", {
|
|
672
|
-
class: styles$
|
|
673
|
+
class: styles$q.kbd,
|
|
673
674
|
children: vnode
|
|
674
675
|
});
|
|
675
676
|
}
|
|
@@ -695,13 +696,13 @@ const ElmInlineText = component$((props) => {
|
|
|
695
696
|
}
|
|
696
697
|
if (code2) {
|
|
697
698
|
vnode = /* @__PURE__ */ jsx("code", {
|
|
698
|
-
class: styles$
|
|
699
|
+
class: styles$q.code,
|
|
699
700
|
children: vnode
|
|
700
701
|
});
|
|
701
702
|
}
|
|
702
703
|
if (props.ruby) {
|
|
703
704
|
vnode = /* @__PURE__ */ jsxs("ruby", {
|
|
704
|
-
class: styles$
|
|
705
|
+
class: styles$q.text,
|
|
705
706
|
children: [
|
|
706
707
|
/* @__PURE__ */ jsx("span", {
|
|
707
708
|
children: vnode
|
|
@@ -714,7 +715,7 @@ const ElmInlineText = component$((props) => {
|
|
|
714
715
|
}
|
|
715
716
|
const wrappedVnode = /* @__PURE__ */ jsx("span", {
|
|
716
717
|
class: [
|
|
717
|
-
styles$
|
|
718
|
+
styles$q.text,
|
|
718
719
|
textStyles.text
|
|
719
720
|
],
|
|
720
721
|
style: {
|
|
@@ -726,7 +727,7 @@ const ElmInlineText = component$((props) => {
|
|
|
726
727
|
});
|
|
727
728
|
if (props.href) {
|
|
728
729
|
return /* @__PURE__ */ jsxs("a", {
|
|
729
|
-
class: styles$
|
|
730
|
+
class: styles$q.link,
|
|
730
731
|
href: props.href,
|
|
731
732
|
style: {
|
|
732
733
|
"--font-size": size
|
|
@@ -744,7 +745,7 @@ const ElmInlineText = component$((props) => {
|
|
|
744
745
|
return wrappedVnode;
|
|
745
746
|
});
|
|
746
747
|
const code = "_code_1sw1e_1";
|
|
747
|
-
const styles$
|
|
748
|
+
const styles$o = {
|
|
748
749
|
code
|
|
749
750
|
};
|
|
750
751
|
const ElmShikiHighlighter = component$(({ code: code2, language = "txt" }) => {
|
|
@@ -769,7 +770,7 @@ const ElmShikiHighlighter = component$(({ code: code2, language = "txt" }) => {
|
|
|
769
770
|
}
|
|
770
771
|
});
|
|
771
772
|
return /* @__PURE__ */ jsx("pre", {
|
|
772
|
-
class: styles$
|
|
773
|
+
class: styles$o.code,
|
|
773
774
|
dangerouslySetInnerHTML: rawHtml.value
|
|
774
775
|
});
|
|
775
776
|
});
|
|
@@ -788,19 +789,19 @@ const ElmCodeBlock = component$(({ code: code2, language = "txt", caption: capti
|
|
|
788
789
|
}
|
|
789
790
|
});
|
|
790
791
|
return /* @__PURE__ */ jsxs("figure", {
|
|
791
|
-
class: styles$
|
|
792
|
+
class: styles$t["code-block"],
|
|
792
793
|
style: {
|
|
793
794
|
margin
|
|
794
795
|
},
|
|
795
796
|
children: [
|
|
796
797
|
/* @__PURE__ */ jsx("span", {
|
|
797
|
-
class: styles$
|
|
798
|
+
class: styles$t["language-icon"],
|
|
798
799
|
children: /* @__PURE__ */ jsx(ElmLanguageIcon, {
|
|
799
800
|
language
|
|
800
801
|
})
|
|
801
802
|
}),
|
|
802
803
|
/* @__PURE__ */ jsx("span", {
|
|
803
|
-
class: styles$
|
|
804
|
+
class: styles$t.caption,
|
|
804
805
|
children: /* @__PURE__ */ jsxs(ElmInlineText, {
|
|
805
806
|
children: [
|
|
806
807
|
caption2 || language,
|
|
@@ -809,7 +810,7 @@ const ElmCodeBlock = component$(({ code: code2, language = "txt", caption: capti
|
|
|
809
810
|
})
|
|
810
811
|
}),
|
|
811
812
|
/* @__PURE__ */ jsx("div", {
|
|
812
|
-
class: styles$
|
|
813
|
+
class: styles$t["copy-icon"],
|
|
813
814
|
onClick$: copyToClipboard,
|
|
814
815
|
children: /* @__PURE__ */ jsx(ElmMdiIcon, {
|
|
815
816
|
size: "1.25rem",
|
|
@@ -818,10 +819,10 @@ const ElmCodeBlock = component$(({ code: code2, language = "txt", caption: capti
|
|
|
818
819
|
})
|
|
819
820
|
}),
|
|
820
821
|
/* @__PURE__ */ jsx("hr", {
|
|
821
|
-
class: styles$
|
|
822
|
+
class: styles$t.divider
|
|
822
823
|
}),
|
|
823
824
|
/* @__PURE__ */ jsx("div", {
|
|
824
|
-
class: styles$
|
|
825
|
+
class: styles$t.code,
|
|
825
826
|
children: /* @__PURE__ */ jsx(ElmShikiHighlighter, {
|
|
826
827
|
code: code2,
|
|
827
828
|
language
|
|
@@ -841,7 +842,7 @@ const ElmKatex = component$(({ expression, block = false }) => {
|
|
|
841
842
|
});
|
|
842
843
|
});
|
|
843
844
|
const parallax = "_parallax_1kb0k_1";
|
|
844
|
-
const styles$
|
|
845
|
+
const styles$n = {
|
|
845
846
|
"parallax-watcher": "_parallax-watcher_1kb0k_1",
|
|
846
847
|
parallax
|
|
847
848
|
};
|
|
@@ -850,13 +851,13 @@ const ElmParallax = component$(({ images }) => {
|
|
|
850
851
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
851
852
|
children: [
|
|
852
853
|
/* @__PURE__ */ jsx("div", {
|
|
853
|
-
class: styles$
|
|
854
|
+
class: styles$n["parallax-watcher"],
|
|
854
855
|
"window:onScroll$": () => {
|
|
855
856
|
y.value = window.scrollY;
|
|
856
857
|
}
|
|
857
858
|
}),
|
|
858
859
|
images.map((image2, index) => /* @__PURE__ */ jsx("div", {
|
|
859
|
-
class: styles$
|
|
860
|
+
class: styles$n.parallax,
|
|
860
861
|
style: {
|
|
861
862
|
backgroundImage: `url(${image2})`,
|
|
862
863
|
transform: `scale(1.2) translateY(${y.value / (1e3 * (index + 1))}%)`,
|
|
@@ -870,7 +871,7 @@ const toggle = "_toggle_1nxqa_1";
|
|
|
870
871
|
const summary = "_summary_1nxqa_14";
|
|
871
872
|
const content$2 = "_content_1nxqa_60";
|
|
872
873
|
const footer = "_footer_1nxqa_80";
|
|
873
|
-
const styles$
|
|
874
|
+
const styles$m = {
|
|
874
875
|
toggle,
|
|
875
876
|
"toggle-closed": "_toggle-closed_1nxqa_7",
|
|
876
877
|
"toggle-open": "_toggle-open_1nxqa_10",
|
|
@@ -898,29 +899,29 @@ const ElmToggle = component$(({ summary: summary2 }) => {
|
|
|
898
899
|
});
|
|
899
900
|
return /* @__PURE__ */ jsxs("div", {
|
|
900
901
|
class: [
|
|
901
|
-
styles$
|
|
902
|
+
styles$m.toggle,
|
|
902
903
|
{
|
|
903
|
-
[styles$
|
|
904
|
-
[styles$
|
|
904
|
+
[styles$m["toggle-open"]]: isOpen.value,
|
|
905
|
+
[styles$m["toggle-closed"]]: !isOpen.value
|
|
905
906
|
}
|
|
906
907
|
],
|
|
907
908
|
children: [
|
|
908
909
|
/* @__PURE__ */ jsxs("div", {
|
|
909
910
|
class: [
|
|
910
|
-
styles$
|
|
911
|
+
styles$m.summary,
|
|
911
912
|
{
|
|
912
|
-
[styles$
|
|
913
|
-
[styles$
|
|
913
|
+
[styles$m["summary-open"]]: isOpen.value,
|
|
914
|
+
[styles$m["summary-closed"]]: !isOpen.value
|
|
914
915
|
}
|
|
915
916
|
],
|
|
916
917
|
onClick$: toggle2,
|
|
917
918
|
children: [
|
|
918
919
|
/* @__PURE__ */ jsx("span", {
|
|
919
920
|
class: [
|
|
920
|
-
styles$
|
|
921
|
+
styles$m["chevron-icon"],
|
|
921
922
|
{
|
|
922
|
-
[styles$
|
|
923
|
-
[styles$
|
|
923
|
+
[styles$m["chevron-icon-open"]]: isOpen.value,
|
|
924
|
+
[styles$m["chevron-icon-closed"]]: !isOpen.value
|
|
924
925
|
}
|
|
925
926
|
],
|
|
926
927
|
children: /* @__PURE__ */ jsx(ElmMdiIcon, {
|
|
@@ -928,17 +929,17 @@ const ElmToggle = component$(({ summary: summary2 }) => {
|
|
|
928
929
|
})
|
|
929
930
|
}),
|
|
930
931
|
/* @__PURE__ */ jsx("span", {
|
|
931
|
-
class: styles$
|
|
932
|
+
class: styles$m["summary-text"],
|
|
932
933
|
children: summary2 ? summary2 : /* @__PURE__ */ jsx(Slot, {
|
|
933
934
|
name: "summary"
|
|
934
935
|
})
|
|
935
936
|
}),
|
|
936
937
|
/* @__PURE__ */ jsx("span", {
|
|
937
938
|
class: [
|
|
938
|
-
styles$
|
|
939
|
+
styles$m["plus-icon"],
|
|
939
940
|
{
|
|
940
|
-
[styles$
|
|
941
|
-
[styles$
|
|
941
|
+
[styles$m["plus-icon-open"]]: isOpen.value,
|
|
942
|
+
[styles$m["plus-icon-closed"]]: !isOpen.value
|
|
942
943
|
}
|
|
943
944
|
],
|
|
944
945
|
children: /* @__PURE__ */ jsx(ElmMdiIcon, {
|
|
@@ -951,30 +952,30 @@ const ElmToggle = component$(({ summary: summary2 }) => {
|
|
|
951
952
|
}),
|
|
952
953
|
/* @__PURE__ */ jsx("div", {
|
|
953
954
|
class: [
|
|
954
|
-
styles$
|
|
955
|
+
styles$m.content,
|
|
955
956
|
{
|
|
956
|
-
[styles$
|
|
957
|
-
[styles$
|
|
957
|
+
[styles$m["content-open"]]: isOpen.value,
|
|
958
|
+
[styles$m["content-closed"]]: !isOpen.value
|
|
958
959
|
}
|
|
959
960
|
],
|
|
960
961
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
961
962
|
}),
|
|
962
963
|
/* @__PURE__ */ jsxs("div", {
|
|
963
|
-
class: styles$
|
|
964
|
+
class: styles$m.footer,
|
|
964
965
|
onClick$: toggle2,
|
|
965
966
|
children: [
|
|
966
967
|
/* @__PURE__ */ jsx("span", {
|
|
967
|
-
class: styles$
|
|
968
|
+
class: styles$m["footer-chevron-icon"],
|
|
968
969
|
children: /* @__PURE__ */ jsx(ElmMdiIcon, {
|
|
969
970
|
d: mdiChevronRight,
|
|
970
971
|
color: "gray"
|
|
971
972
|
})
|
|
972
973
|
}),
|
|
973
974
|
/* @__PURE__ */ jsx("hr", {
|
|
974
|
-
class: styles$
|
|
975
|
+
class: styles$m["footer-line"]
|
|
975
976
|
}),
|
|
976
977
|
/* @__PURE__ */ jsx("span", {
|
|
977
|
-
class: styles$
|
|
978
|
+
class: styles$m["footer-cross-icon"],
|
|
978
979
|
children: /* @__PURE__ */ jsx(ElmMdiIcon, {
|
|
979
980
|
d: mdiPlus,
|
|
980
981
|
color: "#c56565"
|
|
@@ -984,17 +985,17 @@ const ElmToggle = component$(({ summary: summary2 }) => {
|
|
|
984
985
|
children: "CLOSE"
|
|
985
986
|
}),
|
|
986
987
|
/* @__PURE__ */ jsx("span", {
|
|
987
|
-
class: styles$
|
|
988
|
+
class: styles$m["footer-cross-icon"],
|
|
988
989
|
children: /* @__PURE__ */ jsx(ElmMdiIcon, {
|
|
989
990
|
d: mdiPlus,
|
|
990
991
|
color: "#c56565"
|
|
991
992
|
})
|
|
992
993
|
}),
|
|
993
994
|
/* @__PURE__ */ jsx("hr", {
|
|
994
|
-
class: styles$
|
|
995
|
+
class: styles$m["footer-line"]
|
|
995
996
|
}),
|
|
996
997
|
/* @__PURE__ */ jsx("span", {
|
|
997
|
-
class: styles$
|
|
998
|
+
class: styles$m["footer-chevron-icon"],
|
|
998
999
|
children: /* @__PURE__ */ jsx(ElmMdiIcon, {
|
|
999
1000
|
d: mdiChevronRight,
|
|
1000
1001
|
color: "gray"
|
|
@@ -1005,50 +1006,50 @@ const ElmToggle = component$(({ summary: summary2 }) => {
|
|
|
1005
1006
|
]
|
|
1006
1007
|
});
|
|
1007
1008
|
});
|
|
1008
|
-
const styles$
|
|
1009
|
+
const styles$l = {
|
|
1009
1010
|
"block-fallback": "_block-fallback_rt986_1"
|
|
1010
1011
|
};
|
|
1011
1012
|
const wrapper$1 = "_wrapper_1yktj_12";
|
|
1012
1013
|
const dot = "_dot_1yktj_22";
|
|
1013
|
-
const styles$
|
|
1014
|
+
const styles$k = {
|
|
1014
1015
|
wrapper: wrapper$1,
|
|
1015
1016
|
dot
|
|
1016
1017
|
};
|
|
1017
1018
|
const ElmDotLoadingIcon = component$(({ size = "4em", color = "#606875" }) => {
|
|
1018
1019
|
return /* @__PURE__ */ jsxs("div", {
|
|
1019
|
-
class: styles$
|
|
1020
|
+
class: styles$k.wrapper,
|
|
1020
1021
|
style: {
|
|
1021
1022
|
"--size": size,
|
|
1022
1023
|
"--color": color
|
|
1023
1024
|
},
|
|
1024
1025
|
children: [
|
|
1025
1026
|
/* @__PURE__ */ jsx("div", {
|
|
1026
|
-
class: styles$
|
|
1027
|
+
class: styles$k.dot,
|
|
1027
1028
|
"aria-hidden": "true"
|
|
1028
1029
|
}),
|
|
1029
1030
|
/* @__PURE__ */ jsx("div", {
|
|
1030
|
-
class: styles$
|
|
1031
|
+
class: styles$k.dot,
|
|
1031
1032
|
"aria-hidden": "true"
|
|
1032
1033
|
}),
|
|
1033
1034
|
/* @__PURE__ */ jsx("div", {
|
|
1034
|
-
class: styles$
|
|
1035
|
+
class: styles$k.dot,
|
|
1035
1036
|
"aria-hidden": "true"
|
|
1036
1037
|
})
|
|
1037
1038
|
]
|
|
1038
1039
|
});
|
|
1039
1040
|
});
|
|
1040
|
-
const styles$
|
|
1041
|
+
const styles$j = {
|
|
1041
1042
|
"rectangle-wave": "_rectangle-wave_hej9g_17"
|
|
1042
1043
|
};
|
|
1043
1044
|
const ElmRectangleWave = component$(() => {
|
|
1044
1045
|
return /* @__PURE__ */ jsx("div", {
|
|
1045
1046
|
"aria-hidden": "true",
|
|
1046
|
-
class: styles$
|
|
1047
|
+
class: styles$j["rectangle-wave"]
|
|
1047
1048
|
});
|
|
1048
1049
|
});
|
|
1049
1050
|
const ElmBlockFallback = component$(({ height = "16rem" }) => {
|
|
1050
1051
|
return /* @__PURE__ */ jsxs("div", {
|
|
1051
|
-
class: styles$
|
|
1052
|
+
class: styles$l["block-fallback"],
|
|
1052
1053
|
style: {
|
|
1053
1054
|
"--height": height
|
|
1054
1055
|
},
|
|
@@ -1082,13 +1083,18 @@ function useElmethisTheme() {
|
|
|
1082
1083
|
}
|
|
1083
1084
|
}));
|
|
1084
1085
|
useVisibleTask$(() => {
|
|
1085
|
-
const
|
|
1086
|
-
if (
|
|
1087
|
-
isDarkTheme.value =
|
|
1086
|
+
const localStorageTheme = localStorage.getItem(LOCAL_STORAGE_KEY);
|
|
1087
|
+
if (localStorageTheme != null) {
|
|
1088
|
+
isDarkTheme.value = localStorageTheme === "dark";
|
|
1089
|
+
document.documentElement.setAttribute("data-theme", localStorageTheme);
|
|
1090
|
+
const body2 = document.querySelector("body");
|
|
1091
|
+
if (body2 != null) {
|
|
1092
|
+
body2.style.colorScheme = localStorageTheme;
|
|
1093
|
+
}
|
|
1088
1094
|
} else {
|
|
1089
|
-
const
|
|
1090
|
-
if (
|
|
1091
|
-
isDarkTheme.value =
|
|
1095
|
+
const currentTheme = document.documentElement.getAttribute("data-theme");
|
|
1096
|
+
if (currentTheme != null) {
|
|
1097
|
+
isDarkTheme.value = currentTheme === "dark";
|
|
1092
1098
|
}
|
|
1093
1099
|
}
|
|
1094
1100
|
}, {
|
|
@@ -1100,7 +1106,7 @@ function useElmethisTheme() {
|
|
|
1100
1106
|
};
|
|
1101
1107
|
}
|
|
1102
1108
|
const icon$1 = "_icon_1husg_1";
|
|
1103
|
-
const styles$
|
|
1109
|
+
const styles$i = {
|
|
1104
1110
|
icon: icon$1
|
|
1105
1111
|
};
|
|
1106
1112
|
const ElmToggleTheme = component$(({ size = "2rem" }) => {
|
|
@@ -1111,7 +1117,7 @@ const ElmToggleTheme = component$(({ size = "2rem" }) => {
|
|
|
1111
1117
|
width: size,
|
|
1112
1118
|
height: size,
|
|
1113
1119
|
viewBox: "0 0 24 24",
|
|
1114
|
-
class: styles$
|
|
1120
|
+
class: styles$i.icon,
|
|
1115
1121
|
onClick$: toggleTheme,
|
|
1116
1122
|
children: [
|
|
1117
1123
|
/* @__PURE__ */ jsxs("g", {
|
|
@@ -1319,7 +1325,7 @@ const ElmToggleTheme = component$(({ size = "2rem" }) => {
|
|
|
1319
1325
|
width: size,
|
|
1320
1326
|
height: size,
|
|
1321
1327
|
viewBox: "0 0 24 24",
|
|
1322
|
-
class: styles$
|
|
1328
|
+
class: styles$i.icon,
|
|
1323
1329
|
onClick$: toggleTheme,
|
|
1324
1330
|
children: [
|
|
1325
1331
|
/* @__PURE__ */ jsxs("path", {
|
|
@@ -1567,7 +1573,7 @@ const ElmToggleTheme = component$(({ size = "2rem" }) => {
|
|
|
1567
1573
|
});
|
|
1568
1574
|
const image$1 = "_image_5s2ag_11";
|
|
1569
1575
|
const fallback = "_fallback_5s2ag_33";
|
|
1570
|
-
const styles$
|
|
1576
|
+
const styles$h = {
|
|
1571
1577
|
"block-image": "_block-image_5s2ag_1",
|
|
1572
1578
|
"image-container": "_image-container_5s2ag_11",
|
|
1573
1579
|
image: image$1,
|
|
@@ -1587,7 +1593,7 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
|
|
|
1587
1593
|
}
|
|
1588
1594
|
});
|
|
1589
1595
|
const ImageComponent = /* @__PURE__ */ jsx("img", {
|
|
1590
|
-
class: styles$
|
|
1596
|
+
class: styles$h.image,
|
|
1591
1597
|
src,
|
|
1592
1598
|
alt: alt ?? caption2 ?? "Image",
|
|
1593
1599
|
width,
|
|
@@ -1600,7 +1606,7 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
|
|
|
1600
1606
|
}
|
|
1601
1607
|
});
|
|
1602
1608
|
const Modal = /* @__PURE__ */ jsx("div", {
|
|
1603
|
-
class: styles$
|
|
1609
|
+
class: styles$h["modal-container"],
|
|
1604
1610
|
style: {
|
|
1605
1611
|
pointerEvents: isShowModal.value ? "auto" : "none",
|
|
1606
1612
|
"--opacity": isShowModal.value ? 1 : 0
|
|
@@ -1609,10 +1615,10 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
|
|
|
1609
1615
|
children: ImageComponent
|
|
1610
1616
|
});
|
|
1611
1617
|
return /* @__PURE__ */ jsxs("figure", {
|
|
1612
|
-
class: styles$
|
|
1618
|
+
class: styles$h["block-image"],
|
|
1613
1619
|
children: [
|
|
1614
1620
|
/* @__PURE__ */ jsxs("div", {
|
|
1615
|
-
class: styles$
|
|
1621
|
+
class: styles$h["image-container"],
|
|
1616
1622
|
style: {
|
|
1617
1623
|
"--opacity": isLoading.value ? 1 : 0
|
|
1618
1624
|
},
|
|
@@ -1620,13 +1626,13 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
|
|
|
1620
1626
|
children: [
|
|
1621
1627
|
ImageComponent,
|
|
1622
1628
|
/* @__PURE__ */ jsx("div", {
|
|
1623
|
-
class: styles$
|
|
1629
|
+
class: styles$h.fallback,
|
|
1624
1630
|
children: /* @__PURE__ */ jsx(ElmRectangleWave, {})
|
|
1625
1631
|
})
|
|
1626
1632
|
]
|
|
1627
1633
|
}),
|
|
1628
1634
|
caption2 && /* @__PURE__ */ jsxs("figcaption", {
|
|
1629
|
-
class: styles$
|
|
1635
|
+
class: styles$h["caption-box"],
|
|
1630
1636
|
style: {
|
|
1631
1637
|
"--opacity": isLoading.value ? 0 : 1
|
|
1632
1638
|
},
|
|
@@ -1652,7 +1658,7 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
|
|
|
1652
1658
|
});
|
|
1653
1659
|
});
|
|
1654
1660
|
const file = "_file_14a0w_1";
|
|
1655
|
-
const styles$
|
|
1661
|
+
const styles$g = {
|
|
1656
1662
|
file,
|
|
1657
1663
|
"file-size": "_file-size_14a0w_16",
|
|
1658
1664
|
"download-icon": "_download-icon_14a0w_21"
|
|
@@ -1680,7 +1686,7 @@ const ElmFile = component$(({ name, src, filesize }) => {
|
|
|
1680
1686
|
}
|
|
1681
1687
|
});
|
|
1682
1688
|
return /* @__PURE__ */ jsxs("div", {
|
|
1683
|
-
class: styles$
|
|
1689
|
+
class: styles$g.file,
|
|
1684
1690
|
children: [
|
|
1685
1691
|
/* @__PURE__ */ jsx("div", {
|
|
1686
1692
|
children: /* @__PURE__ */ jsx(ElmMdiIcon, {
|
|
@@ -1694,13 +1700,13 @@ const ElmFile = component$(({ name, src, filesize }) => {
|
|
|
1694
1700
|
})
|
|
1695
1701
|
}),
|
|
1696
1702
|
/* @__PURE__ */ jsx("div", {
|
|
1697
|
-
class: styles$
|
|
1703
|
+
class: styles$g["file-size"],
|
|
1698
1704
|
children: /* @__PURE__ */ jsx(ElmInlineText, {
|
|
1699
1705
|
children: filesize
|
|
1700
1706
|
})
|
|
1701
1707
|
}),
|
|
1702
1708
|
/* @__PURE__ */ jsx("div", {
|
|
1703
|
-
class: styles$
|
|
1709
|
+
class: styles$g["download-icon"],
|
|
1704
1710
|
onClick$: downloadFile,
|
|
1705
1711
|
children: /* @__PURE__ */ jsx(ElmMdiIcon, {
|
|
1706
1712
|
d: mdiDownload,
|
|
@@ -1717,7 +1723,7 @@ const content$1 = "_content_rgq1s_53";
|
|
|
1717
1723
|
const title = "_title_rgq1s_73";
|
|
1718
1724
|
const description = "_description_rgq1s_76";
|
|
1719
1725
|
const link = "_link_rgq1s_80";
|
|
1720
|
-
const styles$
|
|
1726
|
+
const styles$f = {
|
|
1721
1727
|
bookmark,
|
|
1722
1728
|
container: container$1,
|
|
1723
1729
|
image,
|
|
@@ -1728,37 +1734,37 @@ const styles$e = {
|
|
|
1728
1734
|
};
|
|
1729
1735
|
const ElmBookmark = component$(({ url, image: image2, title: title2, description: description2, favicon }) => {
|
|
1730
1736
|
return /* @__PURE__ */ jsx("div", {
|
|
1731
|
-
class: styles$
|
|
1737
|
+
class: styles$f.bookmark,
|
|
1732
1738
|
children: /* @__PURE__ */ jsxs("a", {
|
|
1733
|
-
class: styles$
|
|
1739
|
+
class: styles$f.container,
|
|
1734
1740
|
href: url,
|
|
1735
1741
|
target: "_blank",
|
|
1736
1742
|
rel: "noopener noreferrer",
|
|
1737
1743
|
children: [
|
|
1738
1744
|
/* @__PURE__ */ jsx("img", {
|
|
1739
|
-
class: styles$
|
|
1745
|
+
class: styles$f.image,
|
|
1740
1746
|
src: image2,
|
|
1741
1747
|
alt: "OGP Image"
|
|
1742
1748
|
}),
|
|
1743
1749
|
/* @__PURE__ */ jsxs("div", {
|
|
1744
|
-
class: styles$
|
|
1750
|
+
class: styles$f.content,
|
|
1745
1751
|
children: [
|
|
1746
1752
|
/* @__PURE__ */ jsx("div", {
|
|
1747
|
-
class: styles$
|
|
1753
|
+
class: styles$f.title,
|
|
1748
1754
|
children: /* @__PURE__ */ jsx(ElmInlineText, {
|
|
1749
1755
|
bold: true,
|
|
1750
1756
|
children: title2
|
|
1751
1757
|
})
|
|
1752
1758
|
}),
|
|
1753
1759
|
/* @__PURE__ */ jsx("div", {
|
|
1754
|
-
class: styles$
|
|
1760
|
+
class: styles$f.description,
|
|
1755
1761
|
children: /* @__PURE__ */ jsx(ElmInlineText, {
|
|
1756
1762
|
size: "0.75rem",
|
|
1757
1763
|
children: description2
|
|
1758
1764
|
})
|
|
1759
1765
|
}),
|
|
1760
1766
|
/* @__PURE__ */ jsxs("div", {
|
|
1761
|
-
class: styles$
|
|
1767
|
+
class: styles$f.link,
|
|
1762
1768
|
children: [
|
|
1763
1769
|
favicon ? /* @__PURE__ */ jsx(ElmInlineIcon, {
|
|
1764
1770
|
src: favicon
|
|
@@ -1780,22 +1786,22 @@ const ElmBookmark = component$(({ url, image: image2, title: title2, description
|
|
|
1780
1786
|
});
|
|
1781
1787
|
const container = "_container_xsa12_1";
|
|
1782
1788
|
const text$1 = "_text_xsa12_30";
|
|
1783
|
-
const styles$
|
|
1789
|
+
const styles$e = {
|
|
1784
1790
|
container,
|
|
1785
1791
|
"link-container": "_link-container_xsa12_10",
|
|
1786
1792
|
text: text$1
|
|
1787
1793
|
};
|
|
1788
1794
|
const ElmBreadcrumb = component$(({ links }) => {
|
|
1789
1795
|
return /* @__PURE__ */ jsx("nav", {
|
|
1790
|
-
class: styles$
|
|
1796
|
+
class: styles$e.container,
|
|
1791
1797
|
children: links.map((link2, index) => /* @__PURE__ */ jsxs(Fragment, {
|
|
1792
1798
|
children: [
|
|
1793
1799
|
/* @__PURE__ */ jsxs("span", {
|
|
1794
|
-
class: styles$
|
|
1800
|
+
class: styles$e["link-container"],
|
|
1795
1801
|
onClick$: link2.onClick$,
|
|
1796
1802
|
children: [
|
|
1797
1803
|
/* @__PURE__ */ jsx("span", {
|
|
1798
|
-
class: styles$
|
|
1804
|
+
class: styles$e.icon,
|
|
1799
1805
|
style: {
|
|
1800
1806
|
"--delay": `${index * 100}ms`
|
|
1801
1807
|
},
|
|
@@ -1805,7 +1811,7 @@ const ElmBreadcrumb = component$(({ links }) => {
|
|
|
1805
1811
|
})
|
|
1806
1812
|
}),
|
|
1807
1813
|
/* @__PURE__ */ jsx("span", {
|
|
1808
|
-
class: styles$
|
|
1814
|
+
class: styles$e.text,
|
|
1809
1815
|
style: {
|
|
1810
1816
|
"--delay": `${index * 100 + 50}ms`
|
|
1811
1817
|
},
|
|
@@ -1816,7 +1822,7 @@ const ElmBreadcrumb = component$(({ links }) => {
|
|
|
1816
1822
|
]
|
|
1817
1823
|
}),
|
|
1818
1824
|
links.length !== index + 1 && /* @__PURE__ */ jsx("span", {
|
|
1819
|
-
class: styles$
|
|
1825
|
+
class: styles$e.text,
|
|
1820
1826
|
style: {
|
|
1821
1827
|
"--delay": `${index * 100 + 100}ms`
|
|
1822
1828
|
},
|
|
@@ -1833,7 +1839,7 @@ const ElmBreadcrumb = component$(({ links }) => {
|
|
|
1833
1839
|
const wrapper = "_wrapper_nud26_1";
|
|
1834
1840
|
const partial = "_partial_nud26_52";
|
|
1835
1841
|
const text = "_text_nud26_85";
|
|
1836
|
-
const styles$
|
|
1842
|
+
const styles$d = {
|
|
1837
1843
|
wrapper,
|
|
1838
1844
|
"wrapper--visible": "_wrapper--visible_nud26_20",
|
|
1839
1845
|
partial,
|
|
@@ -1861,9 +1867,9 @@ const ElmPageTop = component$(({ position = "right" }) => {
|
|
|
1861
1867
|
});
|
|
1862
1868
|
return /* @__PURE__ */ jsxs("nav", {
|
|
1863
1869
|
class: [
|
|
1864
|
-
styles$
|
|
1870
|
+
styles$d.wrapper,
|
|
1865
1871
|
{
|
|
1866
|
-
[styles$
|
|
1872
|
+
[styles$d["wrapper--visible"]]: isVisible.value
|
|
1867
1873
|
}
|
|
1868
1874
|
],
|
|
1869
1875
|
style: {
|
|
@@ -1875,18 +1881,18 @@ const ElmPageTop = component$(({ position = "right" }) => {
|
|
|
1875
1881
|
children: [
|
|
1876
1882
|
/* @__PURE__ */ jsx("div", {
|
|
1877
1883
|
"aria-hidden": "true",
|
|
1878
|
-
class: styles$
|
|
1884
|
+
class: styles$d.partial
|
|
1879
1885
|
}),
|
|
1880
1886
|
/* @__PURE__ */ jsx("div", {
|
|
1881
1887
|
"aria-hidden": "true",
|
|
1882
|
-
class: styles$
|
|
1888
|
+
class: styles$d.partial
|
|
1883
1889
|
}),
|
|
1884
1890
|
/* @__PURE__ */ jsx("div", {
|
|
1885
1891
|
"aria-hidden": "true",
|
|
1886
|
-
class: styles$
|
|
1892
|
+
class: styles$d.partial
|
|
1887
1893
|
}),
|
|
1888
1894
|
/* @__PURE__ */ jsx("span", {
|
|
1889
|
-
class: styles$
|
|
1895
|
+
class: styles$d.text,
|
|
1890
1896
|
children: "Back to Top"
|
|
1891
1897
|
})
|
|
1892
1898
|
]
|
|
@@ -1895,7 +1901,7 @@ const ElmPageTop = component$(({ position = "right" }) => {
|
|
|
1895
1901
|
const blockquote = "_blockquote_b5jd8_1";
|
|
1896
1902
|
const body = "_body_b5jd8_18";
|
|
1897
1903
|
const icon = "_icon_b5jd8_23";
|
|
1898
|
-
const styles$
|
|
1904
|
+
const styles$c = {
|
|
1899
1905
|
blockquote,
|
|
1900
1906
|
body,
|
|
1901
1907
|
icon
|
|
@@ -1903,13 +1909,13 @@ const styles$b = {
|
|
|
1903
1909
|
const ElmBlockQuote = component$(({ cite }) => {
|
|
1904
1910
|
return /* @__PURE__ */ jsxs("blockquote", {
|
|
1905
1911
|
class: [
|
|
1906
|
-
styles$
|
|
1912
|
+
styles$c.blockquote,
|
|
1907
1913
|
textStyles.text
|
|
1908
1914
|
],
|
|
1909
1915
|
cite,
|
|
1910
1916
|
children: [
|
|
1911
1917
|
/* @__PURE__ */ jsx("div", {
|
|
1912
|
-
class: styles$
|
|
1918
|
+
class: styles$c.icon,
|
|
1913
1919
|
style: {
|
|
1914
1920
|
"--inset": "0.25rem auto auto 0.5rem"
|
|
1915
1921
|
},
|
|
@@ -1918,11 +1924,11 @@ const ElmBlockQuote = component$(({ cite }) => {
|
|
|
1918
1924
|
})
|
|
1919
1925
|
}),
|
|
1920
1926
|
/* @__PURE__ */ jsx("div", {
|
|
1921
|
-
class: styles$
|
|
1927
|
+
class: styles$c.body,
|
|
1922
1928
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
1923
1929
|
}),
|
|
1924
1930
|
/* @__PURE__ */ jsx("div", {
|
|
1925
|
-
class: styles$
|
|
1931
|
+
class: styles$c.icon,
|
|
1926
1932
|
style: {
|
|
1927
1933
|
"--inset": "auto 0.25rem 0.25rem auto"
|
|
1928
1934
|
},
|
|
@@ -1936,7 +1942,7 @@ const ElmBlockQuote = component$(({ cite }) => {
|
|
|
1936
1942
|
const callout = "_callout_1d8l2_1";
|
|
1937
1943
|
const header = "_header_1d8l2_25";
|
|
1938
1944
|
const content = "_content_1d8l2_31";
|
|
1939
|
-
const styles$
|
|
1945
|
+
const styles$b = {
|
|
1940
1946
|
callout,
|
|
1941
1947
|
header,
|
|
1942
1948
|
content
|
|
@@ -1965,13 +1971,13 @@ const COLOR_MAP = Object.freeze({
|
|
|
1965
1971
|
});
|
|
1966
1972
|
const ElmCallout = component$(({ type = "note" }) => {
|
|
1967
1973
|
return /* @__PURE__ */ jsxs("aside", {
|
|
1968
|
-
class: styles$
|
|
1974
|
+
class: styles$b.callout,
|
|
1969
1975
|
style: {
|
|
1970
1976
|
"--callout-color": COLOR_MAP[type].code
|
|
1971
1977
|
},
|
|
1972
1978
|
children: [
|
|
1973
1979
|
/* @__PURE__ */ jsxs("div", {
|
|
1974
|
-
class: styles$
|
|
1980
|
+
class: styles$b.header,
|
|
1975
1981
|
children: [
|
|
1976
1982
|
/* @__PURE__ */ jsx(ElmMdiIcon, {
|
|
1977
1983
|
d: COLOR_MAP[type].icon,
|
|
@@ -1984,26 +1990,26 @@ const ElmCallout = component$(({ type = "note" }) => {
|
|
|
1984
1990
|
]
|
|
1985
1991
|
}),
|
|
1986
1992
|
/* @__PURE__ */ jsx("div", {
|
|
1987
|
-
class: styles$
|
|
1993
|
+
class: styles$b.content,
|
|
1988
1994
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
1989
1995
|
})
|
|
1990
1996
|
]
|
|
1991
1997
|
});
|
|
1992
1998
|
});
|
|
1993
1999
|
const hr = "_hr_1g58p_1";
|
|
1994
|
-
const styles$
|
|
2000
|
+
const styles$a = {
|
|
1995
2001
|
hr
|
|
1996
2002
|
};
|
|
1997
2003
|
const ElmDivider = component$(({ margin }) => {
|
|
1998
2004
|
return /* @__PURE__ */ jsx("hr", {
|
|
1999
|
-
class: styles$
|
|
2005
|
+
class: styles$a.hr,
|
|
2000
2006
|
style: {
|
|
2001
2007
|
marginBlock: margin
|
|
2002
2008
|
}
|
|
2003
2009
|
});
|
|
2004
2010
|
});
|
|
2005
2011
|
const fragment = "_fragment_1kofp_1";
|
|
2006
|
-
const styles$
|
|
2012
|
+
const styles$9 = {
|
|
2007
2013
|
fragment
|
|
2008
2014
|
};
|
|
2009
2015
|
const ElmFragmentIdentifier = component$(({ id }) => {
|
|
@@ -2019,7 +2025,7 @@ const ElmFragmentIdentifier = component$(({ id }) => {
|
|
|
2019
2025
|
}
|
|
2020
2026
|
});
|
|
2021
2027
|
return /* @__PURE__ */ jsx("span", {
|
|
2022
|
-
class: styles$
|
|
2028
|
+
class: styles$9.fragment,
|
|
2023
2029
|
onClick$: () => handleHashClick(id),
|
|
2024
2030
|
children: "#"
|
|
2025
2031
|
});
|
|
@@ -2031,7 +2037,7 @@ const h3 = "_h3_16jof_85";
|
|
|
2031
2037
|
const h4 = "_h4_16jof_102";
|
|
2032
2038
|
const h5 = "_h5_16jof_106";
|
|
2033
2039
|
const h6 = "_h6_16jof_110";
|
|
2034
|
-
const styles$
|
|
2040
|
+
const styles$8 = {
|
|
2035
2041
|
"heading-common": "_heading-common_16jof_1",
|
|
2036
2042
|
h1,
|
|
2037
2043
|
h2,
|
|
@@ -2053,9 +2059,9 @@ const ElmHeading = component$(({ level, text: text2, id }) => {
|
|
|
2053
2059
|
const Tag = `h${level}`;
|
|
2054
2060
|
return /* @__PURE__ */ jsxs(Tag, {
|
|
2055
2061
|
class: [
|
|
2056
|
-
styles$
|
|
2062
|
+
styles$8["heading-common"],
|
|
2057
2063
|
textStyles.text,
|
|
2058
|
-
styles$
|
|
2064
|
+
styles$8[`h${level}`]
|
|
2059
2065
|
],
|
|
2060
2066
|
style: {
|
|
2061
2067
|
"--font-size": `${SIZE_MAP[level]}em`
|
|
@@ -2074,13 +2080,13 @@ const ElmHeading = component$(({ level, text: text2, id }) => {
|
|
|
2074
2080
|
})
|
|
2075
2081
|
}),
|
|
2076
2082
|
level === 2 && /* @__PURE__ */ jsx("span", {
|
|
2077
|
-
class: styles$
|
|
2083
|
+
class: styles$8["h2__underline"],
|
|
2078
2084
|
"aria-hidden": "true"
|
|
2079
2085
|
})
|
|
2080
2086
|
]
|
|
2081
2087
|
});
|
|
2082
2088
|
});
|
|
2083
|
-
const styles$
|
|
2089
|
+
const styles$7 = {
|
|
2084
2090
|
"elmethis-list-common": "_elmethis-list-common_14epx_1",
|
|
2085
2091
|
"elmethis-bulleted-list": "_elmethis-bulleted-list_14epx_9",
|
|
2086
2092
|
"elmethis-numbered-list": "_elmethis-numbered-list_14epx_24"
|
|
@@ -2090,8 +2096,8 @@ const ElmList = component$(({ listStyle = "unordered" }) => {
|
|
|
2090
2096
|
return /* @__PURE__ */ jsx("ol", {
|
|
2091
2097
|
class: [
|
|
2092
2098
|
textStyles.text,
|
|
2093
|
-
styles$
|
|
2094
|
-
styles$
|
|
2099
|
+
styles$7["elmethis-list-common"],
|
|
2100
|
+
styles$7["elmethis-numbered-list"]
|
|
2095
2101
|
],
|
|
2096
2102
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
2097
2103
|
});
|
|
@@ -2099,15 +2105,15 @@ const ElmList = component$(({ listStyle = "unordered" }) => {
|
|
|
2099
2105
|
return /* @__PURE__ */ jsx("ul", {
|
|
2100
2106
|
class: [
|
|
2101
2107
|
textStyles.text,
|
|
2102
|
-
styles$
|
|
2103
|
-
styles$
|
|
2108
|
+
styles$7["elmethis-list-common"],
|
|
2109
|
+
styles$7["elmethis-bulleted-list"]
|
|
2104
2110
|
],
|
|
2105
2111
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
2106
2112
|
});
|
|
2107
2113
|
}
|
|
2108
2114
|
});
|
|
2109
2115
|
const paragraph = "_paragraph_jz10s_1";
|
|
2110
|
-
const styles$
|
|
2116
|
+
const styles$6 = {
|
|
2111
2117
|
paragraph
|
|
2112
2118
|
};
|
|
2113
2119
|
const useInView = (props) => {
|
|
@@ -2134,7 +2140,7 @@ const ElmParagraph = component$(({ color, backgroundColor }) => {
|
|
|
2134
2140
|
return /* @__PURE__ */ jsx("p", {
|
|
2135
2141
|
ref,
|
|
2136
2142
|
class: [
|
|
2137
|
-
styles$
|
|
2143
|
+
styles$6.paragraph,
|
|
2138
2144
|
textStyles.text
|
|
2139
2145
|
],
|
|
2140
2146
|
style: {
|
|
@@ -2148,7 +2154,7 @@ const ElmParagraph = component$(({ color, backgroundColor }) => {
|
|
|
2148
2154
|
const table = "_table_x2nyq_1";
|
|
2149
2155
|
const caption = "_caption_x2nyq_8";
|
|
2150
2156
|
const spacing = "_spacing_x2nyq_25";
|
|
2151
|
-
const styles$
|
|
2157
|
+
const styles$5 = {
|
|
2152
2158
|
table,
|
|
2153
2159
|
caption,
|
|
2154
2160
|
"caption-inner": "_caption-inner_x2nyq_18",
|
|
@@ -2161,7 +2167,7 @@ const ElmTable = component$((props) => {
|
|
|
2161
2167
|
useContextProvider(HasRowHeaderContext, hasRowHeaderComputed);
|
|
2162
2168
|
return /* @__PURE__ */ jsxs("table", {
|
|
2163
2169
|
class: [
|
|
2164
|
-
styles$
|
|
2170
|
+
styles$5.table,
|
|
2165
2171
|
textStyles.text
|
|
2166
2172
|
],
|
|
2167
2173
|
style: {
|
|
@@ -2170,13 +2176,13 @@ const ElmTable = component$((props) => {
|
|
|
2170
2176
|
children: [
|
|
2171
2177
|
caption2 && /* @__PURE__ */ jsx("caption", {
|
|
2172
2178
|
children: /* @__PURE__ */ jsxs("span", {
|
|
2173
|
-
class: styles$
|
|
2179
|
+
class: styles$5.caption,
|
|
2174
2180
|
children: [
|
|
2175
2181
|
/* @__PURE__ */ jsx("span", {
|
|
2176
|
-
class: styles$
|
|
2182
|
+
class: styles$5.spacing
|
|
2177
2183
|
}),
|
|
2178
2184
|
/* @__PURE__ */ jsxs("span", {
|
|
2179
|
-
class: styles$
|
|
2185
|
+
class: styles$5["caption-inner"],
|
|
2180
2186
|
children: [
|
|
2181
2187
|
/* @__PURE__ */ jsx("svg", {
|
|
2182
2188
|
viewBox: "0 0 24 24",
|
|
@@ -2193,7 +2199,7 @@ const ElmTable = component$((props) => {
|
|
|
2193
2199
|
]
|
|
2194
2200
|
}),
|
|
2195
2201
|
/* @__PURE__ */ jsx("span", {
|
|
2196
|
-
class: styles$
|
|
2202
|
+
class: styles$5.spacing
|
|
2197
2203
|
})
|
|
2198
2204
|
]
|
|
2199
2205
|
})
|
|
@@ -2203,14 +2209,14 @@ const ElmTable = component$((props) => {
|
|
|
2203
2209
|
});
|
|
2204
2210
|
});
|
|
2205
2211
|
const thead = "_thead_1brzu_1";
|
|
2206
|
-
const styles$
|
|
2212
|
+
const styles$4 = {
|
|
2207
2213
|
thead
|
|
2208
2214
|
};
|
|
2209
2215
|
const HasHeaderContext = createContextId("HasHeaderContext");
|
|
2210
2216
|
const ElmTableHeader = component$(() => {
|
|
2211
2217
|
useContextProvider(HasHeaderContext, true);
|
|
2212
2218
|
return /* @__PURE__ */ jsx("thead", {
|
|
2213
|
-
class: styles$
|
|
2219
|
+
class: styles$4.thead,
|
|
2214
2220
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
2215
2221
|
});
|
|
2216
2222
|
});
|
|
@@ -2221,7 +2227,7 @@ const ElmTableBody = component$(() => {
|
|
|
2221
2227
|
});
|
|
2222
2228
|
});
|
|
2223
2229
|
const tr = "_tr_2ogbz_1";
|
|
2224
|
-
const styles$
|
|
2230
|
+
const styles$3 = {
|
|
2225
2231
|
tr,
|
|
2226
2232
|
"has-row-header": "_has-row-header_2ogbz_20"
|
|
2227
2233
|
};
|
|
@@ -2229,8 +2235,8 @@ const ElmTableRow = component$(() => {
|
|
|
2229
2235
|
const hasRowHeader = useContext(HasRowHeaderContext);
|
|
2230
2236
|
return /* @__PURE__ */ jsx("tr", {
|
|
2231
2237
|
class: [
|
|
2232
|
-
styles$
|
|
2233
|
-
hasRowHeader.value && styles$
|
|
2238
|
+
styles$3.tr,
|
|
2239
|
+
hasRowHeader.value && styles$3["has-row-header"]
|
|
2234
2240
|
],
|
|
2235
2241
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
2236
2242
|
});
|
|
@@ -2238,7 +2244,7 @@ const ElmTableRow = component$(() => {
|
|
|
2238
2244
|
const common = "_common_1puhv_1";
|
|
2239
2245
|
const td = "_td_1puhv_24";
|
|
2240
2246
|
const th = "_th_1puhv_31";
|
|
2241
|
-
const styles$
|
|
2247
|
+
const styles$2 = {
|
|
2242
2248
|
common,
|
|
2243
2249
|
td,
|
|
2244
2250
|
th
|
|
@@ -2250,21 +2256,21 @@ const ElmTableCell = component$((props) => {
|
|
|
2250
2256
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
2251
2257
|
children: isHeader ? /* @__PURE__ */ jsx("th", {
|
|
2252
2258
|
class: [
|
|
2253
|
-
styles$
|
|
2254
|
-
styles$
|
|
2259
|
+
styles$2.common,
|
|
2260
|
+
styles$2.th
|
|
2255
2261
|
],
|
|
2256
2262
|
children: text2 ? text2 : /* @__PURE__ */ jsx(Slot, {})
|
|
2257
2263
|
}) : /* @__PURE__ */ jsx("td", {
|
|
2258
2264
|
class: [
|
|
2259
|
-
styles$
|
|
2260
|
-
styles$
|
|
2265
|
+
styles$2.common,
|
|
2266
|
+
styles$2.td
|
|
2261
2267
|
],
|
|
2262
2268
|
children: text2 ? text2 : /* @__PURE__ */ jsx(Slot, {})
|
|
2263
2269
|
})
|
|
2264
2270
|
});
|
|
2265
2271
|
});
|
|
2266
2272
|
const column = "_column_1l2bp_7";
|
|
2267
|
-
const styles = {
|
|
2273
|
+
const styles$1 = {
|
|
2268
2274
|
"jarkup-body": "_jarkup-body_1l2bp_1",
|
|
2269
2275
|
"column-list": "_column-list_1l2bp_7",
|
|
2270
2276
|
column
|
|
@@ -2405,12 +2411,12 @@ const ElmJarkup = component$((props) => {
|
|
|
2405
2411
|
}, key);
|
|
2406
2412
|
case "ColumnList":
|
|
2407
2413
|
return /* @__PURE__ */ jsx("div", {
|
|
2408
|
-
class: styles["column-list"],
|
|
2414
|
+
class: styles$1["column-list"],
|
|
2409
2415
|
children: render(component.slots.default)
|
|
2410
2416
|
}, key);
|
|
2411
2417
|
case "Column":
|
|
2412
2418
|
return /* @__PURE__ */ jsx("div", {
|
|
2413
|
-
class: styles.column,
|
|
2419
|
+
class: styles$1.column,
|
|
2414
2420
|
style: {
|
|
2415
2421
|
"--width-ratio": component.props?.widthRatio || 1,
|
|
2416
2422
|
width: component.props?.widthRatio ? `${component.props.widthRatio * 100}%` : void 0
|
|
@@ -2432,10 +2438,175 @@ const ElmJarkup = component$((props) => {
|
|
|
2432
2438
|
});
|
|
2433
2439
|
};
|
|
2434
2440
|
return /* @__PURE__ */ jsx("div", {
|
|
2435
|
-
class: styles["jarkup-body"],
|
|
2441
|
+
class: styles$1["jarkup-body"],
|
|
2436
2442
|
children: render(props.jsonComponents)
|
|
2437
2443
|
});
|
|
2438
2444
|
});
|
|
2445
|
+
const styles = {
|
|
2446
|
+
"markdown-body": "_markdown-body_11s6o_1"
|
|
2447
|
+
};
|
|
2448
|
+
const renderByToken = (tokens) => {
|
|
2449
|
+
const results = [];
|
|
2450
|
+
for (const token of tokens) {
|
|
2451
|
+
switch (token.type) {
|
|
2452
|
+
case "blockquote":
|
|
2453
|
+
if (token.tokens && token.tokens.length !== 0) {
|
|
2454
|
+
results.push(/* @__PURE__ */ jsx(ElmBlockQuote, {
|
|
2455
|
+
children: renderByToken(token.tokens)
|
|
2456
|
+
}));
|
|
2457
|
+
}
|
|
2458
|
+
break;
|
|
2459
|
+
case "br":
|
|
2460
|
+
results.push(/* @__PURE__ */ jsx("br", {}));
|
|
2461
|
+
break;
|
|
2462
|
+
case "code":
|
|
2463
|
+
results.push(/* @__PURE__ */ jsx(ElmCodeBlock, {
|
|
2464
|
+
code: token.text.trim(),
|
|
2465
|
+
language: token.lang
|
|
2466
|
+
}));
|
|
2467
|
+
break;
|
|
2468
|
+
case "codespan":
|
|
2469
|
+
results.push(/* @__PURE__ */ jsx(ElmInlineText, {
|
|
2470
|
+
text: token.text,
|
|
2471
|
+
code: true
|
|
2472
|
+
}));
|
|
2473
|
+
break;
|
|
2474
|
+
case "def":
|
|
2475
|
+
break;
|
|
2476
|
+
case "del":
|
|
2477
|
+
results.push(token.tokens && token.tokens.length !== 0 ? /* @__PURE__ */ jsx(ElmInlineText, {
|
|
2478
|
+
strikethrough: true,
|
|
2479
|
+
children: renderByToken(token.tokens)
|
|
2480
|
+
}) : /* @__PURE__ */ jsx(ElmInlineText, {
|
|
2481
|
+
text: token.text,
|
|
2482
|
+
strikethrough: true
|
|
2483
|
+
}));
|
|
2484
|
+
break;
|
|
2485
|
+
case "em":
|
|
2486
|
+
results.push(token.tokens && token.tokens.length !== 0 ? /* @__PURE__ */ jsx(ElmInlineText, {
|
|
2487
|
+
italic: true,
|
|
2488
|
+
children: renderByToken(token.tokens)
|
|
2489
|
+
}) : /* @__PURE__ */ jsx(ElmInlineText, {
|
|
2490
|
+
text: token.text,
|
|
2491
|
+
italic: true
|
|
2492
|
+
}));
|
|
2493
|
+
break;
|
|
2494
|
+
case "escape":
|
|
2495
|
+
break;
|
|
2496
|
+
case "heading": {
|
|
2497
|
+
const level = token.depth;
|
|
2498
|
+
if (token.tokens && token.tokens.length !== 0) {
|
|
2499
|
+
results.push(/* @__PURE__ */ jsx(ElmHeading, {
|
|
2500
|
+
level,
|
|
2501
|
+
children: renderByToken(token.tokens)
|
|
2502
|
+
}));
|
|
2503
|
+
} else {
|
|
2504
|
+
results.push(/* @__PURE__ */ jsx(ElmHeading, {
|
|
2505
|
+
level,
|
|
2506
|
+
text: token.text
|
|
2507
|
+
}));
|
|
2508
|
+
}
|
|
2509
|
+
break;
|
|
2510
|
+
}
|
|
2511
|
+
case "hr":
|
|
2512
|
+
results.push(/* @__PURE__ */ jsx(ElmDivider, {}));
|
|
2513
|
+
break;
|
|
2514
|
+
case "html":
|
|
2515
|
+
break;
|
|
2516
|
+
case "image":
|
|
2517
|
+
results.push(/* @__PURE__ */ jsx(ElmBlockImage, {
|
|
2518
|
+
enableModal: true,
|
|
2519
|
+
src: token.href,
|
|
2520
|
+
alt: token.text
|
|
2521
|
+
}));
|
|
2522
|
+
break;
|
|
2523
|
+
case "link":
|
|
2524
|
+
results.push(token.tokens && token.tokens.length !== 0 ? /* @__PURE__ */ jsx(ElmInlineText, {
|
|
2525
|
+
href: token.href,
|
|
2526
|
+
children: renderByToken(token.tokens)
|
|
2527
|
+
}) : /* @__PURE__ */ jsx(ElmInlineText, {
|
|
2528
|
+
text: token.text,
|
|
2529
|
+
href: token.href
|
|
2530
|
+
}));
|
|
2531
|
+
break;
|
|
2532
|
+
case "list": {
|
|
2533
|
+
const listItems = token.items.map((item, index) => /* @__PURE__ */ jsx("li", {
|
|
2534
|
+
children: renderByToken(item.tokens)
|
|
2535
|
+
}, index));
|
|
2536
|
+
results.push(/* @__PURE__ */ jsx(ElmList, {
|
|
2537
|
+
listStyle: token.ordered ? "ordered" : "unordered",
|
|
2538
|
+
children: listItems
|
|
2539
|
+
}));
|
|
2540
|
+
break;
|
|
2541
|
+
}
|
|
2542
|
+
case "list_item":
|
|
2543
|
+
results.push(/* @__PURE__ */ jsx("li", {
|
|
2544
|
+
children: token.tokens && token.tokens.length !== 0 ? renderByToken(token.tokens) : token.text
|
|
2545
|
+
}));
|
|
2546
|
+
break;
|
|
2547
|
+
case "paragraph":
|
|
2548
|
+
if (token.tokens && token.tokens.length !== 0) {
|
|
2549
|
+
results.push(/* @__PURE__ */ jsx(ElmParagraph, {
|
|
2550
|
+
children: renderByToken(token.tokens)
|
|
2551
|
+
}));
|
|
2552
|
+
}
|
|
2553
|
+
break;
|
|
2554
|
+
case "space":
|
|
2555
|
+
break;
|
|
2556
|
+
case "strong":
|
|
2557
|
+
results.push(token.tokens && token.tokens.length !== 0 ? /* @__PURE__ */ jsx(ElmInlineText, {
|
|
2558
|
+
bold: true,
|
|
2559
|
+
children: renderByToken(token.tokens)
|
|
2560
|
+
}) : /* @__PURE__ */ jsx(ElmInlineText, {
|
|
2561
|
+
text: token.text,
|
|
2562
|
+
bold: true
|
|
2563
|
+
}));
|
|
2564
|
+
break;
|
|
2565
|
+
case "table": {
|
|
2566
|
+
const renderTableCells = (cells) => cells.map((cell, index) => /* @__PURE__ */ jsx(ElmTableCell, {
|
|
2567
|
+
children: renderByToken(cell.tokens)
|
|
2568
|
+
}, index));
|
|
2569
|
+
const headerRow = /* @__PURE__ */ jsx(ElmTableRow, {
|
|
2570
|
+
children: renderTableCells(token.header)
|
|
2571
|
+
});
|
|
2572
|
+
const bodyRows = token.rows.map((row, index) => /* @__PURE__ */ jsx(ElmTableRow, {
|
|
2573
|
+
children: renderTableCells(row)
|
|
2574
|
+
}, index));
|
|
2575
|
+
results.push(/* @__PURE__ */ jsxs(ElmTable, {
|
|
2576
|
+
children: [
|
|
2577
|
+
/* @__PURE__ */ jsx(ElmTableHeader, {
|
|
2578
|
+
"q:slot": "header",
|
|
2579
|
+
children: headerRow
|
|
2580
|
+
}),
|
|
2581
|
+
/* @__PURE__ */ jsx(ElmTableBody, {
|
|
2582
|
+
"q:slot": "body",
|
|
2583
|
+
children: bodyRows
|
|
2584
|
+
})
|
|
2585
|
+
]
|
|
2586
|
+
}));
|
|
2587
|
+
break;
|
|
2588
|
+
}
|
|
2589
|
+
case "text":
|
|
2590
|
+
results.push(token.tokens && token.tokens.length !== 0 ? /* @__PURE__ */ jsx(ElmInlineText, {
|
|
2591
|
+
children: renderByToken(token.tokens)
|
|
2592
|
+
}) : /* @__PURE__ */ jsx(Fragment$1, {
|
|
2593
|
+
children: token.text
|
|
2594
|
+
}));
|
|
2595
|
+
break;
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
return results;
|
|
2599
|
+
};
|
|
2600
|
+
const ElmMarkdown = component$(({ markdown }) => {
|
|
2601
|
+
const tokens = marked.setOptions({
|
|
2602
|
+
gfm: true
|
|
2603
|
+
}).lexer(markdown);
|
|
2604
|
+
const elements = renderByToken(tokens);
|
|
2605
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2606
|
+
class: styles["markdown-body"],
|
|
2607
|
+
children: elements
|
|
2608
|
+
});
|
|
2609
|
+
});
|
|
2439
2610
|
export {
|
|
2440
2611
|
ElmBlockFallback,
|
|
2441
2612
|
ElmBlockImage,
|
|
@@ -2455,6 +2626,7 @@ export {
|
|
|
2455
2626
|
ElmKatex,
|
|
2456
2627
|
ElmLanguageIcon,
|
|
2457
2628
|
ElmList,
|
|
2629
|
+
ElmMarkdown,
|
|
2458
2630
|
ElmMdiIcon,
|
|
2459
2631
|
ElmPageTop,
|
|
2460
2632
|
ElmParagraph,
|