@elmethis/qwik 0.0.19 → 0.0.20

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.
@@ -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$s = {
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$r = {
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$r.path,
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$q = {
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$q.icon,
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$p = {
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$o = {
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$o.icon,
658
+ class: styles$p.icon,
658
659
  children: /* @__PURE__ */ jsx("img", {
659
660
  src,
660
661
  alt,
661
- class: styles$o.icon
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$p.kbd,
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$p.code,
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$p.text,
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$p.text,
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$p.link,
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$n = {
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$n.code,
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$s["code-block"],
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$s["language-icon"],
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$s.caption,
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$s["copy-icon"],
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$s.divider
822
+ class: styles$t.divider
822
823
  }),
823
824
  /* @__PURE__ */ jsx("div", {
824
- class: styles$s.code,
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$m = {
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$m["parallax-watcher"],
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$m.parallax,
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$l = {
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$l.toggle,
902
+ styles$m.toggle,
902
903
  {
903
- [styles$l["toggle-open"]]: isOpen.value,
904
- [styles$l["toggle-closed"]]: !isOpen.value
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$l.summary,
911
+ styles$m.summary,
911
912
  {
912
- [styles$l["summary-open"]]: isOpen.value,
913
- [styles$l["summary-closed"]]: !isOpen.value
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$l["chevron-icon"],
921
+ styles$m["chevron-icon"],
921
922
  {
922
- [styles$l["chevron-icon-open"]]: isOpen.value,
923
- [styles$l["chevron-icon-closed"]]: !isOpen.value
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$l["summary-text"],
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$l["plus-icon"],
939
+ styles$m["plus-icon"],
939
940
  {
940
- [styles$l["plus-icon-open"]]: isOpen.value,
941
- [styles$l["plus-icon-closed"]]: !isOpen.value
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$l.content,
955
+ styles$m.content,
955
956
  {
956
- [styles$l["content-open"]]: isOpen.value,
957
- [styles$l["content-closed"]]: !isOpen.value
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$l.footer,
964
+ class: styles$m.footer,
964
965
  onClick$: toggle2,
965
966
  children: [
966
967
  /* @__PURE__ */ jsx("span", {
967
- class: styles$l["footer-chevron-icon"],
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$l["footer-line"]
975
+ class: styles$m["footer-line"]
975
976
  }),
976
977
  /* @__PURE__ */ jsx("span", {
977
- class: styles$l["footer-cross-icon"],
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$l["footer-cross-icon"],
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$l["footer-line"]
995
+ class: styles$m["footer-line"]
995
996
  }),
996
997
  /* @__PURE__ */ jsx("span", {
997
- class: styles$l["footer-chevron-icon"],
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$k = {
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$j = {
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$j.wrapper,
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$j.dot,
1027
+ class: styles$k.dot,
1027
1028
  "aria-hidden": "true"
1028
1029
  }),
1029
1030
  /* @__PURE__ */ jsx("div", {
1030
- class: styles$j.dot,
1031
+ class: styles$k.dot,
1031
1032
  "aria-hidden": "true"
1032
1033
  }),
1033
1034
  /* @__PURE__ */ jsx("div", {
1034
- class: styles$j.dot,
1035
+ class: styles$k.dot,
1035
1036
  "aria-hidden": "true"
1036
1037
  })
1037
1038
  ]
1038
1039
  });
1039
1040
  });
1040
- const styles$i = {
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$i["rectangle-wave"]
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$k["block-fallback"],
1052
+ class: styles$l["block-fallback"],
1052
1053
  style: {
1053
1054
  "--height": height
1054
1055
  },
@@ -1100,7 +1101,7 @@ function useElmethisTheme() {
1100
1101
  };
1101
1102
  }
1102
1103
  const icon$1 = "_icon_1husg_1";
1103
- const styles$h = {
1104
+ const styles$i = {
1104
1105
  icon: icon$1
1105
1106
  };
1106
1107
  const ElmToggleTheme = component$(({ size = "2rem" }) => {
@@ -1111,7 +1112,7 @@ const ElmToggleTheme = component$(({ size = "2rem" }) => {
1111
1112
  width: size,
1112
1113
  height: size,
1113
1114
  viewBox: "0 0 24 24",
1114
- class: styles$h.icon,
1115
+ class: styles$i.icon,
1115
1116
  onClick$: toggleTheme,
1116
1117
  children: [
1117
1118
  /* @__PURE__ */ jsxs("g", {
@@ -1319,7 +1320,7 @@ const ElmToggleTheme = component$(({ size = "2rem" }) => {
1319
1320
  width: size,
1320
1321
  height: size,
1321
1322
  viewBox: "0 0 24 24",
1322
- class: styles$h.icon,
1323
+ class: styles$i.icon,
1323
1324
  onClick$: toggleTheme,
1324
1325
  children: [
1325
1326
  /* @__PURE__ */ jsxs("path", {
@@ -1567,7 +1568,7 @@ const ElmToggleTheme = component$(({ size = "2rem" }) => {
1567
1568
  });
1568
1569
  const image$1 = "_image_5s2ag_11";
1569
1570
  const fallback = "_fallback_5s2ag_33";
1570
- const styles$g = {
1571
+ const styles$h = {
1571
1572
  "block-image": "_block-image_5s2ag_1",
1572
1573
  "image-container": "_image-container_5s2ag_11",
1573
1574
  image: image$1,
@@ -1587,7 +1588,7 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
1587
1588
  }
1588
1589
  });
1589
1590
  const ImageComponent = /* @__PURE__ */ jsx("img", {
1590
- class: styles$g.image,
1591
+ class: styles$h.image,
1591
1592
  src,
1592
1593
  alt: alt ?? caption2 ?? "Image",
1593
1594
  width,
@@ -1600,7 +1601,7 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
1600
1601
  }
1601
1602
  });
1602
1603
  const Modal = /* @__PURE__ */ jsx("div", {
1603
- class: styles$g["modal-container"],
1604
+ class: styles$h["modal-container"],
1604
1605
  style: {
1605
1606
  pointerEvents: isShowModal.value ? "auto" : "none",
1606
1607
  "--opacity": isShowModal.value ? 1 : 0
@@ -1609,10 +1610,10 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
1609
1610
  children: ImageComponent
1610
1611
  });
1611
1612
  return /* @__PURE__ */ jsxs("figure", {
1612
- class: styles$g["block-image"],
1613
+ class: styles$h["block-image"],
1613
1614
  children: [
1614
1615
  /* @__PURE__ */ jsxs("div", {
1615
- class: styles$g["image-container"],
1616
+ class: styles$h["image-container"],
1616
1617
  style: {
1617
1618
  "--opacity": isLoading.value ? 1 : 0
1618
1619
  },
@@ -1620,13 +1621,13 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
1620
1621
  children: [
1621
1622
  ImageComponent,
1622
1623
  /* @__PURE__ */ jsx("div", {
1623
- class: styles$g.fallback,
1624
+ class: styles$h.fallback,
1624
1625
  children: /* @__PURE__ */ jsx(ElmRectangleWave, {})
1625
1626
  })
1626
1627
  ]
1627
1628
  }),
1628
1629
  caption2 && /* @__PURE__ */ jsxs("figcaption", {
1629
- class: styles$g["caption-box"],
1630
+ class: styles$h["caption-box"],
1630
1631
  style: {
1631
1632
  "--opacity": isLoading.value ? 0 : 1
1632
1633
  },
@@ -1652,7 +1653,7 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
1652
1653
  });
1653
1654
  });
1654
1655
  const file = "_file_14a0w_1";
1655
- const styles$f = {
1656
+ const styles$g = {
1656
1657
  file,
1657
1658
  "file-size": "_file-size_14a0w_16",
1658
1659
  "download-icon": "_download-icon_14a0w_21"
@@ -1680,7 +1681,7 @@ const ElmFile = component$(({ name, src, filesize }) => {
1680
1681
  }
1681
1682
  });
1682
1683
  return /* @__PURE__ */ jsxs("div", {
1683
- class: styles$f.file,
1684
+ class: styles$g.file,
1684
1685
  children: [
1685
1686
  /* @__PURE__ */ jsx("div", {
1686
1687
  children: /* @__PURE__ */ jsx(ElmMdiIcon, {
@@ -1694,13 +1695,13 @@ const ElmFile = component$(({ name, src, filesize }) => {
1694
1695
  })
1695
1696
  }),
1696
1697
  /* @__PURE__ */ jsx("div", {
1697
- class: styles$f["file-size"],
1698
+ class: styles$g["file-size"],
1698
1699
  children: /* @__PURE__ */ jsx(ElmInlineText, {
1699
1700
  children: filesize
1700
1701
  })
1701
1702
  }),
1702
1703
  /* @__PURE__ */ jsx("div", {
1703
- class: styles$f["download-icon"],
1704
+ class: styles$g["download-icon"],
1704
1705
  onClick$: downloadFile,
1705
1706
  children: /* @__PURE__ */ jsx(ElmMdiIcon, {
1706
1707
  d: mdiDownload,
@@ -1717,7 +1718,7 @@ const content$1 = "_content_rgq1s_53";
1717
1718
  const title = "_title_rgq1s_73";
1718
1719
  const description = "_description_rgq1s_76";
1719
1720
  const link = "_link_rgq1s_80";
1720
- const styles$e = {
1721
+ const styles$f = {
1721
1722
  bookmark,
1722
1723
  container: container$1,
1723
1724
  image,
@@ -1728,37 +1729,37 @@ const styles$e = {
1728
1729
  };
1729
1730
  const ElmBookmark = component$(({ url, image: image2, title: title2, description: description2, favicon }) => {
1730
1731
  return /* @__PURE__ */ jsx("div", {
1731
- class: styles$e.bookmark,
1732
+ class: styles$f.bookmark,
1732
1733
  children: /* @__PURE__ */ jsxs("a", {
1733
- class: styles$e.container,
1734
+ class: styles$f.container,
1734
1735
  href: url,
1735
1736
  target: "_blank",
1736
1737
  rel: "noopener noreferrer",
1737
1738
  children: [
1738
1739
  /* @__PURE__ */ jsx("img", {
1739
- class: styles$e.image,
1740
+ class: styles$f.image,
1740
1741
  src: image2,
1741
1742
  alt: "OGP Image"
1742
1743
  }),
1743
1744
  /* @__PURE__ */ jsxs("div", {
1744
- class: styles$e.content,
1745
+ class: styles$f.content,
1745
1746
  children: [
1746
1747
  /* @__PURE__ */ jsx("div", {
1747
- class: styles$e.title,
1748
+ class: styles$f.title,
1748
1749
  children: /* @__PURE__ */ jsx(ElmInlineText, {
1749
1750
  bold: true,
1750
1751
  children: title2
1751
1752
  })
1752
1753
  }),
1753
1754
  /* @__PURE__ */ jsx("div", {
1754
- class: styles$e.description,
1755
+ class: styles$f.description,
1755
1756
  children: /* @__PURE__ */ jsx(ElmInlineText, {
1756
1757
  size: "0.75rem",
1757
1758
  children: description2
1758
1759
  })
1759
1760
  }),
1760
1761
  /* @__PURE__ */ jsxs("div", {
1761
- class: styles$e.link,
1762
+ class: styles$f.link,
1762
1763
  children: [
1763
1764
  favicon ? /* @__PURE__ */ jsx(ElmInlineIcon, {
1764
1765
  src: favicon
@@ -1780,22 +1781,22 @@ const ElmBookmark = component$(({ url, image: image2, title: title2, description
1780
1781
  });
1781
1782
  const container = "_container_xsa12_1";
1782
1783
  const text$1 = "_text_xsa12_30";
1783
- const styles$d = {
1784
+ const styles$e = {
1784
1785
  container,
1785
1786
  "link-container": "_link-container_xsa12_10",
1786
1787
  text: text$1
1787
1788
  };
1788
1789
  const ElmBreadcrumb = component$(({ links }) => {
1789
1790
  return /* @__PURE__ */ jsx("nav", {
1790
- class: styles$d.container,
1791
+ class: styles$e.container,
1791
1792
  children: links.map((link2, index) => /* @__PURE__ */ jsxs(Fragment, {
1792
1793
  children: [
1793
1794
  /* @__PURE__ */ jsxs("span", {
1794
- class: styles$d["link-container"],
1795
+ class: styles$e["link-container"],
1795
1796
  onClick$: link2.onClick$,
1796
1797
  children: [
1797
1798
  /* @__PURE__ */ jsx("span", {
1798
- class: styles$d.icon,
1799
+ class: styles$e.icon,
1799
1800
  style: {
1800
1801
  "--delay": `${index * 100}ms`
1801
1802
  },
@@ -1805,7 +1806,7 @@ const ElmBreadcrumb = component$(({ links }) => {
1805
1806
  })
1806
1807
  }),
1807
1808
  /* @__PURE__ */ jsx("span", {
1808
- class: styles$d.text,
1809
+ class: styles$e.text,
1809
1810
  style: {
1810
1811
  "--delay": `${index * 100 + 50}ms`
1811
1812
  },
@@ -1816,7 +1817,7 @@ const ElmBreadcrumb = component$(({ links }) => {
1816
1817
  ]
1817
1818
  }),
1818
1819
  links.length !== index + 1 && /* @__PURE__ */ jsx("span", {
1819
- class: styles$d.text,
1820
+ class: styles$e.text,
1820
1821
  style: {
1821
1822
  "--delay": `${index * 100 + 100}ms`
1822
1823
  },
@@ -1833,7 +1834,7 @@ const ElmBreadcrumb = component$(({ links }) => {
1833
1834
  const wrapper = "_wrapper_nud26_1";
1834
1835
  const partial = "_partial_nud26_52";
1835
1836
  const text = "_text_nud26_85";
1836
- const styles$c = {
1837
+ const styles$d = {
1837
1838
  wrapper,
1838
1839
  "wrapper--visible": "_wrapper--visible_nud26_20",
1839
1840
  partial,
@@ -1861,9 +1862,9 @@ const ElmPageTop = component$(({ position = "right" }) => {
1861
1862
  });
1862
1863
  return /* @__PURE__ */ jsxs("nav", {
1863
1864
  class: [
1864
- styles$c.wrapper,
1865
+ styles$d.wrapper,
1865
1866
  {
1866
- [styles$c["wrapper--visible"]]: isVisible.value
1867
+ [styles$d["wrapper--visible"]]: isVisible.value
1867
1868
  }
1868
1869
  ],
1869
1870
  style: {
@@ -1875,18 +1876,18 @@ const ElmPageTop = component$(({ position = "right" }) => {
1875
1876
  children: [
1876
1877
  /* @__PURE__ */ jsx("div", {
1877
1878
  "aria-hidden": "true",
1878
- class: styles$c.partial
1879
+ class: styles$d.partial
1879
1880
  }),
1880
1881
  /* @__PURE__ */ jsx("div", {
1881
1882
  "aria-hidden": "true",
1882
- class: styles$c.partial
1883
+ class: styles$d.partial
1883
1884
  }),
1884
1885
  /* @__PURE__ */ jsx("div", {
1885
1886
  "aria-hidden": "true",
1886
- class: styles$c.partial
1887
+ class: styles$d.partial
1887
1888
  }),
1888
1889
  /* @__PURE__ */ jsx("span", {
1889
- class: styles$c.text,
1890
+ class: styles$d.text,
1890
1891
  children: "Back to Top"
1891
1892
  })
1892
1893
  ]
@@ -1895,7 +1896,7 @@ const ElmPageTop = component$(({ position = "right" }) => {
1895
1896
  const blockquote = "_blockquote_b5jd8_1";
1896
1897
  const body = "_body_b5jd8_18";
1897
1898
  const icon = "_icon_b5jd8_23";
1898
- const styles$b = {
1899
+ const styles$c = {
1899
1900
  blockquote,
1900
1901
  body,
1901
1902
  icon
@@ -1903,13 +1904,13 @@ const styles$b = {
1903
1904
  const ElmBlockQuote = component$(({ cite }) => {
1904
1905
  return /* @__PURE__ */ jsxs("blockquote", {
1905
1906
  class: [
1906
- styles$b.blockquote,
1907
+ styles$c.blockquote,
1907
1908
  textStyles.text
1908
1909
  ],
1909
1910
  cite,
1910
1911
  children: [
1911
1912
  /* @__PURE__ */ jsx("div", {
1912
- class: styles$b.icon,
1913
+ class: styles$c.icon,
1913
1914
  style: {
1914
1915
  "--inset": "0.25rem auto auto 0.5rem"
1915
1916
  },
@@ -1918,11 +1919,11 @@ const ElmBlockQuote = component$(({ cite }) => {
1918
1919
  })
1919
1920
  }),
1920
1921
  /* @__PURE__ */ jsx("div", {
1921
- class: styles$b.body,
1922
+ class: styles$c.body,
1922
1923
  children: /* @__PURE__ */ jsx(Slot, {})
1923
1924
  }),
1924
1925
  /* @__PURE__ */ jsx("div", {
1925
- class: styles$b.icon,
1926
+ class: styles$c.icon,
1926
1927
  style: {
1927
1928
  "--inset": "auto 0.25rem 0.25rem auto"
1928
1929
  },
@@ -1936,7 +1937,7 @@ const ElmBlockQuote = component$(({ cite }) => {
1936
1937
  const callout = "_callout_1d8l2_1";
1937
1938
  const header = "_header_1d8l2_25";
1938
1939
  const content = "_content_1d8l2_31";
1939
- const styles$a = {
1940
+ const styles$b = {
1940
1941
  callout,
1941
1942
  header,
1942
1943
  content
@@ -1965,13 +1966,13 @@ const COLOR_MAP = Object.freeze({
1965
1966
  });
1966
1967
  const ElmCallout = component$(({ type = "note" }) => {
1967
1968
  return /* @__PURE__ */ jsxs("aside", {
1968
- class: styles$a.callout,
1969
+ class: styles$b.callout,
1969
1970
  style: {
1970
1971
  "--callout-color": COLOR_MAP[type].code
1971
1972
  },
1972
1973
  children: [
1973
1974
  /* @__PURE__ */ jsxs("div", {
1974
- class: styles$a.header,
1975
+ class: styles$b.header,
1975
1976
  children: [
1976
1977
  /* @__PURE__ */ jsx(ElmMdiIcon, {
1977
1978
  d: COLOR_MAP[type].icon,
@@ -1984,26 +1985,26 @@ const ElmCallout = component$(({ type = "note" }) => {
1984
1985
  ]
1985
1986
  }),
1986
1987
  /* @__PURE__ */ jsx("div", {
1987
- class: styles$a.content,
1988
+ class: styles$b.content,
1988
1989
  children: /* @__PURE__ */ jsx(Slot, {})
1989
1990
  })
1990
1991
  ]
1991
1992
  });
1992
1993
  });
1993
1994
  const hr = "_hr_1g58p_1";
1994
- const styles$9 = {
1995
+ const styles$a = {
1995
1996
  hr
1996
1997
  };
1997
1998
  const ElmDivider = component$(({ margin }) => {
1998
1999
  return /* @__PURE__ */ jsx("hr", {
1999
- class: styles$9.hr,
2000
+ class: styles$a.hr,
2000
2001
  style: {
2001
2002
  marginBlock: margin
2002
2003
  }
2003
2004
  });
2004
2005
  });
2005
2006
  const fragment = "_fragment_1kofp_1";
2006
- const styles$8 = {
2007
+ const styles$9 = {
2007
2008
  fragment
2008
2009
  };
2009
2010
  const ElmFragmentIdentifier = component$(({ id }) => {
@@ -2019,7 +2020,7 @@ const ElmFragmentIdentifier = component$(({ id }) => {
2019
2020
  }
2020
2021
  });
2021
2022
  return /* @__PURE__ */ jsx("span", {
2022
- class: styles$8.fragment,
2023
+ class: styles$9.fragment,
2023
2024
  onClick$: () => handleHashClick(id),
2024
2025
  children: "#"
2025
2026
  });
@@ -2031,7 +2032,7 @@ const h3 = "_h3_16jof_85";
2031
2032
  const h4 = "_h4_16jof_102";
2032
2033
  const h5 = "_h5_16jof_106";
2033
2034
  const h6 = "_h6_16jof_110";
2034
- const styles$7 = {
2035
+ const styles$8 = {
2035
2036
  "heading-common": "_heading-common_16jof_1",
2036
2037
  h1,
2037
2038
  h2,
@@ -2053,9 +2054,9 @@ const ElmHeading = component$(({ level, text: text2, id }) => {
2053
2054
  const Tag = `h${level}`;
2054
2055
  return /* @__PURE__ */ jsxs(Tag, {
2055
2056
  class: [
2056
- styles$7["heading-common"],
2057
+ styles$8["heading-common"],
2057
2058
  textStyles.text,
2058
- styles$7[`h${level}`]
2059
+ styles$8[`h${level}`]
2059
2060
  ],
2060
2061
  style: {
2061
2062
  "--font-size": `${SIZE_MAP[level]}em`
@@ -2074,13 +2075,13 @@ const ElmHeading = component$(({ level, text: text2, id }) => {
2074
2075
  })
2075
2076
  }),
2076
2077
  level === 2 && /* @__PURE__ */ jsx("span", {
2077
- class: styles$7["h2__underline"],
2078
+ class: styles$8["h2__underline"],
2078
2079
  "aria-hidden": "true"
2079
2080
  })
2080
2081
  ]
2081
2082
  });
2082
2083
  });
2083
- const styles$6 = {
2084
+ const styles$7 = {
2084
2085
  "elmethis-list-common": "_elmethis-list-common_14epx_1",
2085
2086
  "elmethis-bulleted-list": "_elmethis-bulleted-list_14epx_9",
2086
2087
  "elmethis-numbered-list": "_elmethis-numbered-list_14epx_24"
@@ -2090,8 +2091,8 @@ const ElmList = component$(({ listStyle = "unordered" }) => {
2090
2091
  return /* @__PURE__ */ jsx("ol", {
2091
2092
  class: [
2092
2093
  textStyles.text,
2093
- styles$6["elmethis-list-common"],
2094
- styles$6["elmethis-numbered-list"]
2094
+ styles$7["elmethis-list-common"],
2095
+ styles$7["elmethis-numbered-list"]
2095
2096
  ],
2096
2097
  children: /* @__PURE__ */ jsx(Slot, {})
2097
2098
  });
@@ -2099,15 +2100,15 @@ const ElmList = component$(({ listStyle = "unordered" }) => {
2099
2100
  return /* @__PURE__ */ jsx("ul", {
2100
2101
  class: [
2101
2102
  textStyles.text,
2102
- styles$6["elmethis-list-common"],
2103
- styles$6["elmethis-bulleted-list"]
2103
+ styles$7["elmethis-list-common"],
2104
+ styles$7["elmethis-bulleted-list"]
2104
2105
  ],
2105
2106
  children: /* @__PURE__ */ jsx(Slot, {})
2106
2107
  });
2107
2108
  }
2108
2109
  });
2109
2110
  const paragraph = "_paragraph_jz10s_1";
2110
- const styles$5 = {
2111
+ const styles$6 = {
2111
2112
  paragraph
2112
2113
  };
2113
2114
  const useInView = (props) => {
@@ -2134,7 +2135,7 @@ const ElmParagraph = component$(({ color, backgroundColor }) => {
2134
2135
  return /* @__PURE__ */ jsx("p", {
2135
2136
  ref,
2136
2137
  class: [
2137
- styles$5.paragraph,
2138
+ styles$6.paragraph,
2138
2139
  textStyles.text
2139
2140
  ],
2140
2141
  style: {
@@ -2148,7 +2149,7 @@ const ElmParagraph = component$(({ color, backgroundColor }) => {
2148
2149
  const table = "_table_x2nyq_1";
2149
2150
  const caption = "_caption_x2nyq_8";
2150
2151
  const spacing = "_spacing_x2nyq_25";
2151
- const styles$4 = {
2152
+ const styles$5 = {
2152
2153
  table,
2153
2154
  caption,
2154
2155
  "caption-inner": "_caption-inner_x2nyq_18",
@@ -2161,7 +2162,7 @@ const ElmTable = component$((props) => {
2161
2162
  useContextProvider(HasRowHeaderContext, hasRowHeaderComputed);
2162
2163
  return /* @__PURE__ */ jsxs("table", {
2163
2164
  class: [
2164
- styles$4.table,
2165
+ styles$5.table,
2165
2166
  textStyles.text
2166
2167
  ],
2167
2168
  style: {
@@ -2170,13 +2171,13 @@ const ElmTable = component$((props) => {
2170
2171
  children: [
2171
2172
  caption2 && /* @__PURE__ */ jsx("caption", {
2172
2173
  children: /* @__PURE__ */ jsxs("span", {
2173
- class: styles$4.caption,
2174
+ class: styles$5.caption,
2174
2175
  children: [
2175
2176
  /* @__PURE__ */ jsx("span", {
2176
- class: styles$4.spacing
2177
+ class: styles$5.spacing
2177
2178
  }),
2178
2179
  /* @__PURE__ */ jsxs("span", {
2179
- class: styles$4["caption-inner"],
2180
+ class: styles$5["caption-inner"],
2180
2181
  children: [
2181
2182
  /* @__PURE__ */ jsx("svg", {
2182
2183
  viewBox: "0 0 24 24",
@@ -2193,7 +2194,7 @@ const ElmTable = component$((props) => {
2193
2194
  ]
2194
2195
  }),
2195
2196
  /* @__PURE__ */ jsx("span", {
2196
- class: styles$4.spacing
2197
+ class: styles$5.spacing
2197
2198
  })
2198
2199
  ]
2199
2200
  })
@@ -2203,14 +2204,14 @@ const ElmTable = component$((props) => {
2203
2204
  });
2204
2205
  });
2205
2206
  const thead = "_thead_1brzu_1";
2206
- const styles$3 = {
2207
+ const styles$4 = {
2207
2208
  thead
2208
2209
  };
2209
2210
  const HasHeaderContext = createContextId("HasHeaderContext");
2210
2211
  const ElmTableHeader = component$(() => {
2211
2212
  useContextProvider(HasHeaderContext, true);
2212
2213
  return /* @__PURE__ */ jsx("thead", {
2213
- class: styles$3.thead,
2214
+ class: styles$4.thead,
2214
2215
  children: /* @__PURE__ */ jsx(Slot, {})
2215
2216
  });
2216
2217
  });
@@ -2221,7 +2222,7 @@ const ElmTableBody = component$(() => {
2221
2222
  });
2222
2223
  });
2223
2224
  const tr = "_tr_2ogbz_1";
2224
- const styles$2 = {
2225
+ const styles$3 = {
2225
2226
  tr,
2226
2227
  "has-row-header": "_has-row-header_2ogbz_20"
2227
2228
  };
@@ -2229,8 +2230,8 @@ const ElmTableRow = component$(() => {
2229
2230
  const hasRowHeader = useContext(HasRowHeaderContext);
2230
2231
  return /* @__PURE__ */ jsx("tr", {
2231
2232
  class: [
2232
- styles$2.tr,
2233
- hasRowHeader.value && styles$2["has-row-header"]
2233
+ styles$3.tr,
2234
+ hasRowHeader.value && styles$3["has-row-header"]
2234
2235
  ],
2235
2236
  children: /* @__PURE__ */ jsx(Slot, {})
2236
2237
  });
@@ -2238,7 +2239,7 @@ const ElmTableRow = component$(() => {
2238
2239
  const common = "_common_1puhv_1";
2239
2240
  const td = "_td_1puhv_24";
2240
2241
  const th = "_th_1puhv_31";
2241
- const styles$1 = {
2242
+ const styles$2 = {
2242
2243
  common,
2243
2244
  td,
2244
2245
  th
@@ -2250,21 +2251,21 @@ const ElmTableCell = component$((props) => {
2250
2251
  return /* @__PURE__ */ jsx(Fragment, {
2251
2252
  children: isHeader ? /* @__PURE__ */ jsx("th", {
2252
2253
  class: [
2253
- styles$1.common,
2254
- styles$1.th
2254
+ styles$2.common,
2255
+ styles$2.th
2255
2256
  ],
2256
2257
  children: text2 ? text2 : /* @__PURE__ */ jsx(Slot, {})
2257
2258
  }) : /* @__PURE__ */ jsx("td", {
2258
2259
  class: [
2259
- styles$1.common,
2260
- styles$1.td
2260
+ styles$2.common,
2261
+ styles$2.td
2261
2262
  ],
2262
2263
  children: text2 ? text2 : /* @__PURE__ */ jsx(Slot, {})
2263
2264
  })
2264
2265
  });
2265
2266
  });
2266
2267
  const column = "_column_1l2bp_7";
2267
- const styles = {
2268
+ const styles$1 = {
2268
2269
  "jarkup-body": "_jarkup-body_1l2bp_1",
2269
2270
  "column-list": "_column-list_1l2bp_7",
2270
2271
  column
@@ -2405,12 +2406,12 @@ const ElmJarkup = component$((props) => {
2405
2406
  }, key);
2406
2407
  case "ColumnList":
2407
2408
  return /* @__PURE__ */ jsx("div", {
2408
- class: styles["column-list"],
2409
+ class: styles$1["column-list"],
2409
2410
  children: render(component.slots.default)
2410
2411
  }, key);
2411
2412
  case "Column":
2412
2413
  return /* @__PURE__ */ jsx("div", {
2413
- class: styles.column,
2414
+ class: styles$1.column,
2414
2415
  style: {
2415
2416
  "--width-ratio": component.props?.widthRatio || 1,
2416
2417
  width: component.props?.widthRatio ? `${component.props.widthRatio * 100}%` : void 0
@@ -2432,10 +2433,175 @@ const ElmJarkup = component$((props) => {
2432
2433
  });
2433
2434
  };
2434
2435
  return /* @__PURE__ */ jsx("div", {
2435
- class: styles["jarkup-body"],
2436
+ class: styles$1["jarkup-body"],
2436
2437
  children: render(props.jsonComponents)
2437
2438
  });
2438
2439
  });
2440
+ const styles = {
2441
+ "markdown-body": "_markdown-body_11s6o_1"
2442
+ };
2443
+ const renderByToken = (tokens) => {
2444
+ const results = [];
2445
+ for (const token of tokens) {
2446
+ switch (token.type) {
2447
+ case "blockquote":
2448
+ if (token.tokens && token.tokens.length !== 0) {
2449
+ results.push(/* @__PURE__ */ jsx(ElmBlockQuote, {
2450
+ children: renderByToken(token.tokens)
2451
+ }));
2452
+ }
2453
+ break;
2454
+ case "br":
2455
+ results.push(/* @__PURE__ */ jsx("br", {}));
2456
+ break;
2457
+ case "code":
2458
+ results.push(/* @__PURE__ */ jsx(ElmCodeBlock, {
2459
+ code: token.text.trim(),
2460
+ language: token.lang
2461
+ }));
2462
+ break;
2463
+ case "codespan":
2464
+ results.push(/* @__PURE__ */ jsx(ElmInlineText, {
2465
+ text: token.text,
2466
+ code: true
2467
+ }));
2468
+ break;
2469
+ case "def":
2470
+ break;
2471
+ case "del":
2472
+ results.push(token.tokens && token.tokens.length !== 0 ? /* @__PURE__ */ jsx(ElmInlineText, {
2473
+ strikethrough: true,
2474
+ children: renderByToken(token.tokens)
2475
+ }) : /* @__PURE__ */ jsx(ElmInlineText, {
2476
+ text: token.text,
2477
+ strikethrough: true
2478
+ }));
2479
+ break;
2480
+ case "em":
2481
+ results.push(token.tokens && token.tokens.length !== 0 ? /* @__PURE__ */ jsx(ElmInlineText, {
2482
+ italic: true,
2483
+ children: renderByToken(token.tokens)
2484
+ }) : /* @__PURE__ */ jsx(ElmInlineText, {
2485
+ text: token.text,
2486
+ italic: true
2487
+ }));
2488
+ break;
2489
+ case "escape":
2490
+ break;
2491
+ case "heading": {
2492
+ const level = token.depth;
2493
+ if (token.tokens && token.tokens.length !== 0) {
2494
+ results.push(/* @__PURE__ */ jsx(ElmHeading, {
2495
+ level,
2496
+ children: renderByToken(token.tokens)
2497
+ }));
2498
+ } else {
2499
+ results.push(/* @__PURE__ */ jsx(ElmHeading, {
2500
+ level,
2501
+ text: token.text
2502
+ }));
2503
+ }
2504
+ break;
2505
+ }
2506
+ case "hr":
2507
+ results.push(/* @__PURE__ */ jsx(ElmDivider, {}));
2508
+ break;
2509
+ case "html":
2510
+ break;
2511
+ case "image":
2512
+ results.push(/* @__PURE__ */ jsx(ElmBlockImage, {
2513
+ enableModal: true,
2514
+ src: token.href,
2515
+ alt: token.text
2516
+ }));
2517
+ break;
2518
+ case "link":
2519
+ results.push(token.tokens && token.tokens.length !== 0 ? /* @__PURE__ */ jsx(ElmInlineText, {
2520
+ href: token.href,
2521
+ children: renderByToken(token.tokens)
2522
+ }) : /* @__PURE__ */ jsx(ElmInlineText, {
2523
+ text: token.text,
2524
+ href: token.href
2525
+ }));
2526
+ break;
2527
+ case "list": {
2528
+ const listItems = token.items.map((item, index) => /* @__PURE__ */ jsx("li", {
2529
+ children: renderByToken(item.tokens)
2530
+ }, index));
2531
+ results.push(/* @__PURE__ */ jsx(ElmList, {
2532
+ listStyle: token.ordered ? "ordered" : "unordered",
2533
+ children: listItems
2534
+ }));
2535
+ break;
2536
+ }
2537
+ case "list_item":
2538
+ results.push(/* @__PURE__ */ jsx("li", {
2539
+ children: token.tokens && token.tokens.length !== 0 ? renderByToken(token.tokens) : token.text
2540
+ }));
2541
+ break;
2542
+ case "paragraph":
2543
+ if (token.tokens && token.tokens.length !== 0) {
2544
+ results.push(/* @__PURE__ */ jsx(ElmParagraph, {
2545
+ children: renderByToken(token.tokens)
2546
+ }));
2547
+ }
2548
+ break;
2549
+ case "space":
2550
+ break;
2551
+ case "strong":
2552
+ results.push(token.tokens && token.tokens.length !== 0 ? /* @__PURE__ */ jsx(ElmInlineText, {
2553
+ bold: true,
2554
+ children: renderByToken(token.tokens)
2555
+ }) : /* @__PURE__ */ jsx(ElmInlineText, {
2556
+ text: token.text,
2557
+ bold: true
2558
+ }));
2559
+ break;
2560
+ case "table": {
2561
+ const renderTableCells = (cells) => cells.map((cell, index) => /* @__PURE__ */ jsx(ElmTableCell, {
2562
+ children: renderByToken(cell.tokens)
2563
+ }, index));
2564
+ const headerRow = /* @__PURE__ */ jsx(ElmTableRow, {
2565
+ children: renderTableCells(token.header)
2566
+ });
2567
+ const bodyRows = token.rows.map((row, index) => /* @__PURE__ */ jsx(ElmTableRow, {
2568
+ children: renderTableCells(row)
2569
+ }, index));
2570
+ results.push(/* @__PURE__ */ jsxs(ElmTable, {
2571
+ children: [
2572
+ /* @__PURE__ */ jsx(ElmTableHeader, {
2573
+ "q:slot": "header",
2574
+ children: headerRow
2575
+ }),
2576
+ /* @__PURE__ */ jsx(ElmTableBody, {
2577
+ "q:slot": "body",
2578
+ children: bodyRows
2579
+ })
2580
+ ]
2581
+ }));
2582
+ break;
2583
+ }
2584
+ case "text":
2585
+ results.push(token.tokens && token.tokens.length !== 0 ? /* @__PURE__ */ jsx(ElmInlineText, {
2586
+ children: renderByToken(token.tokens)
2587
+ }) : /* @__PURE__ */ jsx(Fragment$1, {
2588
+ children: token.text
2589
+ }));
2590
+ break;
2591
+ }
2592
+ }
2593
+ return results;
2594
+ };
2595
+ const ElmMarkdown = component$(({ markdown }) => {
2596
+ const tokens = marked.setOptions({
2597
+ gfm: true
2598
+ }).lexer(markdown);
2599
+ const elements = renderByToken(tokens);
2600
+ return /* @__PURE__ */ jsx("div", {
2601
+ class: styles["markdown-body"],
2602
+ children: elements
2603
+ });
2604
+ });
2439
2605
  export {
2440
2606
  ElmBlockFallback,
2441
2607
  ElmBlockImage,
@@ -2455,6 +2621,7 @@ export {
2455
2621
  ElmKatex,
2456
2622
  ElmLanguageIcon,
2457
2623
  ElmList,
2624
+ ElmMarkdown,
2458
2625
  ElmMdiIcon,
2459
2626
  ElmPageTop,
2460
2627
  ElmParagraph,