@elmethis/qwik 0.0.25 → 0.0.27

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.
@@ -776,7 +776,7 @@ const ElmShikiHighlighter = qwik.component$(({ code: code2, language = "txt" })
776
776
  dangerouslySetInnerHTML: rawHtml.value
777
777
  });
778
778
  });
779
- const ElmCodeBlock = qwik.component$(({ code: code2, language = "txt", caption: caption2, margin }) => {
779
+ const ElmCodeBlock = qwik.component$(({ code: code2, language = "txt", caption: caption2, style }) => {
780
780
  const timerId = qwik.useSignal(null);
781
781
  const copyToClipboard = qwik.$(async () => {
782
782
  if (timerId.value !== null) {
@@ -792,9 +792,7 @@ const ElmCodeBlock = qwik.component$(({ code: code2, language = "txt", caption:
792
792
  });
793
793
  return /* @__PURE__ */ jsxRuntime.jsxs("figure", {
794
794
  class: styles$z["code-block"],
795
- style: {
796
- margin
797
- },
795
+ style,
798
796
  children: [
799
797
  /* @__PURE__ */ jsxRuntime.jsx("span", {
800
798
  class: styles$z["language-icon"],
@@ -869,31 +867,31 @@ const ElmParallax = qwik.component$(({ images }) => {
869
867
  ]
870
868
  });
871
869
  });
872
- const toggle = "_toggle_nwv84_1";
873
- const summary = "_summary_nwv84_14";
874
- const content$2 = "_content_nwv84_60";
875
- const footer = "_footer_nwv84_80";
870
+ const toggle = "_toggle_pbyu8_1";
871
+ const summary = "_summary_pbyu8_14";
872
+ const content$2 = "_content_pbyu8_60";
873
+ const footer = "_footer_pbyu8_80";
876
874
  const styles$s = {
877
875
  toggle,
878
- "toggle-closed": "_toggle-closed_nwv84_7",
879
- "toggle-open": "_toggle-open_nwv84_10",
876
+ "toggle-closed": "_toggle-closed_pbyu8_7",
877
+ "toggle-open": "_toggle-open_pbyu8_10",
880
878
  summary,
881
- "summary-open": "_summary-open_nwv84_29",
882
- "summary-closed": "_summary-closed_nwv84_33",
883
- "chevron-icon": "_chevron-icon_nwv84_37",
884
- "chevron-icon-open": "_chevron-icon-open_nwv84_40",
885
- "chevron-icon-closed": "_chevron-icon-closed_nwv84_43",
886
- "plus-icon": "_plus-icon_nwv84_47",
887
- "plus-icon-open": "_plus-icon-open_nwv84_53",
888
- "plus-icon-closed": "_plus-icon-closed_nwv84_56",
879
+ "summary-open": "_summary-open_pbyu8_29",
880
+ "summary-closed": "_summary-closed_pbyu8_33",
881
+ "chevron-icon": "_chevron-icon_pbyu8_37",
882
+ "chevron-icon-open": "_chevron-icon-open_pbyu8_40",
883
+ "chevron-icon-closed": "_chevron-icon-closed_pbyu8_43",
884
+ "plus-icon": "_plus-icon_pbyu8_47",
885
+ "plus-icon-open": "_plus-icon-open_pbyu8_53",
886
+ "plus-icon-closed": "_plus-icon-closed_pbyu8_56",
889
887
  content: content$2,
890
- "content-open": "_content-open_nwv84_73",
891
- "content-closed": "_content-closed_nwv84_76",
888
+ "content-open": "_content-open_pbyu8_73",
889
+ "content-closed": "_content-closed_pbyu8_76",
892
890
  footer,
893
- "footer-line": "_footer-line_nwv84_99",
894
- "footer-cross-icon": "_footer-cross-icon_nwv84_105"
891
+ "footer-line": "_footer-line_pbyu8_99",
892
+ "footer-cross-icon": "_footer-cross-icon_pbyu8_105"
895
893
  };
896
- const ElmToggle = qwik.component$(({ summary: summary2 }) => {
894
+ const ElmToggle = qwik.component$(({ summary: summary2, style }) => {
897
895
  const isOpen = qwik.useSignal(false);
898
896
  const toggle2 = qwik.$(() => {
899
897
  isOpen.value = !isOpen.value;
@@ -906,6 +904,7 @@ const ElmToggle = qwik.component$(({ summary: summary2 }) => {
906
904
  [styles$s["toggle-closed"]]: !isOpen.value
907
905
  }
908
906
  ],
907
+ style,
909
908
  children: [
910
909
  /* @__PURE__ */ jsxRuntime.jsxs("div", {
911
910
  class: [
@@ -2176,17 +2175,17 @@ const ElmToggleTheme = qwik.component$(({ size = "2rem" }) => {
2176
2175
  })
2177
2176
  });
2178
2177
  });
2179
- const image$1 = "_image_5s2ag_11";
2180
- const fallback = "_fallback_5s2ag_33";
2178
+ const image$1 = "_image_sf1wj_12";
2179
+ const fallback = "_fallback_sf1wj_34";
2181
2180
  const styles$h = {
2182
- "block-image": "_block-image_5s2ag_1",
2183
- "image-container": "_image-container_5s2ag_11",
2181
+ "block-image": "_block-image_sf1wj_1",
2182
+ "image-container": "_image-container_sf1wj_12",
2184
2183
  image: image$1,
2185
2184
  fallback,
2186
- "caption-box": "_caption-box_5s2ag_43",
2187
- "modal-container": "_modal-container_5s2ag_55"
2185
+ "caption-box": "_caption-box_sf1wj_44",
2186
+ "modal-container": "_modal-container_sf1wj_56"
2188
2187
  };
2189
- const ElmBlockImage = qwik.component$(({ src, alt, caption: caption2, width, height, enableModal = true }) => {
2188
+ const ElmBlockImage = qwik.component$(({ src, alt, caption: caption2, width, height, enableModal = true, srcset, sizes, style }) => {
2190
2189
  const isLoading = qwik.useSignal(true);
2191
2190
  const isShowModal = qwik.useSignal(false);
2192
2191
  const handleImageLoad = qwik.$(() => {
@@ -2201,6 +2200,8 @@ const ElmBlockImage = qwik.component$(({ src, alt, caption: caption2, width, hei
2201
2200
  class: styles$h.image,
2202
2201
  src,
2203
2202
  alt: alt ?? caption2 ?? "Image",
2203
+ srcset,
2204
+ sizes,
2204
2205
  width,
2205
2206
  height,
2206
2207
  onLoad$: handleImageLoad,
@@ -2221,6 +2222,7 @@ const ElmBlockImage = qwik.component$(({ src, alt, caption: caption2, width, hei
2221
2222
  });
2222
2223
  return /* @__PURE__ */ jsxRuntime.jsxs("figure", {
2223
2224
  class: styles$h["block-image"],
2225
+ style,
2224
2226
  children: [
2225
2227
  /* @__PURE__ */ jsxRuntime.jsxs("div", {
2226
2228
  class: styles$h["image-container"],
@@ -2262,18 +2264,18 @@ const ElmBlockImage = qwik.component$(({ src, alt, caption: caption2, width, hei
2262
2264
  ]
2263
2265
  });
2264
2266
  });
2265
- const file = "_file_14a0w_1";
2267
+ const file = "_file_eqa3m_1";
2266
2268
  const styles$g = {
2267
2269
  file,
2268
- "file-size": "_file-size_14a0w_16",
2269
- "download-icon": "_download-icon_14a0w_21"
2270
+ "file-size": "_file-size_eqa3m_16",
2271
+ "download-icon": "_download-icon_eqa3m_21"
2270
2272
  };
2271
2273
  function getLastPathSegmentWithoutQueryOrHash(urlString) {
2272
2274
  const cleanedUrl = urlString.split(/[?#]/)[0];
2273
2275
  const pathSegments = cleanedUrl.split("/").filter(Boolean);
2274
2276
  return pathSegments.length > 0 ? pathSegments[pathSegments.length - 1] : null;
2275
2277
  }
2276
- const ElmFile = qwik.component$(({ name, src, filesize }) => {
2278
+ const ElmFile = qwik.component$(({ name, src, filesize, style }) => {
2277
2279
  const downloadFile = qwik.$(async () => {
2278
2280
  let link2;
2279
2281
  try {
@@ -2292,6 +2294,7 @@ const ElmFile = qwik.component$(({ name, src, filesize }) => {
2292
2294
  });
2293
2295
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
2294
2296
  class: styles$g.file,
2297
+ style,
2295
2298
  children: [
2296
2299
  /* @__PURE__ */ jsxRuntime.jsx("div", {
2297
2300
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
@@ -2321,13 +2324,13 @@ const ElmFile = qwik.component$(({ name, src, filesize }) => {
2321
2324
  ]
2322
2325
  });
2323
2326
  });
2324
- const bookmark = "_bookmark_rgq1s_1";
2325
- const container$1 = "_container_rgq1s_19";
2326
- const image = "_image_rgq1s_32";
2327
- const content$1 = "_content_rgq1s_53";
2328
- const title = "_title_rgq1s_73";
2329
- const description = "_description_rgq1s_76";
2330
- const link = "_link_rgq1s_80";
2327
+ const bookmark = "_bookmark_xxvle_1";
2328
+ const container$1 = "_container_xxvle_20";
2329
+ const image = "_image_xxvle_33";
2330
+ const content$1 = "_content_xxvle_54";
2331
+ const title = "_title_xxvle_74";
2332
+ const description = "_description_xxvle_77";
2333
+ const link = "_link_xxvle_81";
2331
2334
  const styles$f = {
2332
2335
  bookmark,
2333
2336
  container: container$1,
@@ -2337,9 +2340,18 @@ const styles$f = {
2337
2340
  description,
2338
2341
  link
2339
2342
  };
2340
- const ElmBookmark = qwik.component$(({ url, image: image2, title: title2, description: description2, favicon }) => {
2343
+ const ElmBookmark = qwik.component$(({ url, image: image2, title: title2, description: description2, favicon, style }) => {
2344
+ const isError = qwik.useSignal(false);
2345
+ const handleImageOnError = qwik.$(() => {
2346
+ isError.value = true;
2347
+ });
2348
+ const hiddenStyle = {
2349
+ visibility: "hidden",
2350
+ width: "0"
2351
+ };
2341
2352
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
2342
2353
  class: styles$f.bookmark,
2354
+ style,
2343
2355
  children: /* @__PURE__ */ jsxRuntime.jsxs("a", {
2344
2356
  class: styles$f.container,
2345
2357
  href: url,
@@ -2349,7 +2361,9 @@ const ElmBookmark = qwik.component$(({ url, image: image2, title: title2, descri
2349
2361
  /* @__PURE__ */ jsxRuntime.jsx("img", {
2350
2362
  class: styles$f.image,
2351
2363
  src: image2,
2352
- alt: "OGP Image"
2364
+ alt: "OGP Image",
2365
+ onError$: handleImageOnError,
2366
+ style: isError.value || image2 == null ? hiddenStyle : {}
2353
2367
  }),
2354
2368
  /* @__PURE__ */ jsxRuntime.jsxs("div", {
2355
2369
  class: styles$f.content,
@@ -2503,21 +2517,22 @@ const ElmPageTop = qwik.component$(({ position = "right" }) => {
2503
2517
  ]
2504
2518
  });
2505
2519
  });
2506
- const blockquote = "_blockquote_b5jd8_1";
2507
- const body = "_body_b5jd8_18";
2508
- const icon = "_icon_b5jd8_23";
2520
+ const blockquote = "_blockquote_1s60i_1";
2521
+ const body = "_body_1s60i_19";
2522
+ const icon = "_icon_1s60i_24";
2509
2523
  const styles$c = {
2510
2524
  blockquote,
2511
2525
  body,
2512
2526
  icon
2513
2527
  };
2514
- const ElmBlockQuote = qwik.component$(({ cite }) => {
2528
+ const ElmBlockQuote = qwik.component$(({ cite, style }) => {
2515
2529
  return /* @__PURE__ */ jsxRuntime.jsxs("blockquote", {
2516
2530
  class: [
2517
2531
  styles$c.blockquote,
2518
2532
  textStyles.text
2519
2533
  ],
2520
2534
  cite,
2535
+ style,
2521
2536
  children: [
2522
2537
  /* @__PURE__ */ jsxRuntime.jsx("div", {
2523
2538
  class: styles$c.icon,
@@ -2544,9 +2559,9 @@ const ElmBlockQuote = qwik.component$(({ cite }) => {
2544
2559
  ]
2545
2560
  });
2546
2561
  });
2547
- const callout = "_callout_1d8l2_1";
2548
- const header = "_header_1d8l2_25";
2549
- const content = "_content_1d8l2_31";
2562
+ const callout = "_callout_ov76x_1";
2563
+ const header = "_header_ov76x_26";
2564
+ const content = "_content_ov76x_32";
2550
2565
  const styles$b = {
2551
2566
  callout,
2552
2567
  header,
@@ -2574,11 +2589,12 @@ const COLOR_MAP = Object.freeze({
2574
2589
  icon: js.mdiAlertOctagram
2575
2590
  }
2576
2591
  });
2577
- const ElmCallout = qwik.component$(({ type = "note" }) => {
2592
+ const ElmCallout = qwik.component$(({ type = "note", style }) => {
2578
2593
  return /* @__PURE__ */ jsxRuntime.jsxs("aside", {
2579
2594
  class: styles$b.callout,
2580
2595
  style: {
2581
- "--callout-color": COLOR_MAP[type].code
2596
+ "--callout-color": COLOR_MAP[type].code,
2597
+ ...style
2582
2598
  },
2583
2599
  children: [
2584
2600
  /* @__PURE__ */ jsxRuntime.jsxs("div", {
@@ -2601,16 +2617,14 @@ const ElmCallout = qwik.component$(({ type = "note" }) => {
2601
2617
  ]
2602
2618
  });
2603
2619
  });
2604
- const hr = "_hr_1g58p_1";
2620
+ const hr = "_hr_b790w_1";
2605
2621
  const styles$a = {
2606
2622
  hr
2607
2623
  };
2608
- const ElmDivider = qwik.component$(({ margin }) => {
2624
+ const ElmDivider = qwik.component$(({ style }) => {
2609
2625
  return /* @__PURE__ */ jsxRuntime.jsx("hr", {
2610
2626
  class: styles$a.hr,
2611
- style: {
2612
- marginBlock: margin
2613
- }
2627
+ style
2614
2628
  });
2615
2629
  });
2616
2630
  const fragment = "_fragment_1kofp_1";
@@ -2635,15 +2649,15 @@ const ElmFragmentIdentifier = qwik.component$(({ id }) => {
2635
2649
  children: "#"
2636
2650
  });
2637
2651
  });
2638
- const h1 = "_h1_16jof_10";
2639
- const h2 = "_h2_16jof_40";
2640
- const h2__underline = "_h2__underline_16jof_68";
2641
- const h3 = "_h3_16jof_85";
2642
- const h4 = "_h4_16jof_102";
2643
- const h5 = "_h5_16jof_106";
2644
- const h6 = "_h6_16jof_110";
2652
+ const h1 = "_h1_1c1xr_10";
2653
+ const h2 = "_h2_1c1xr_40";
2654
+ const h2__underline = "_h2__underline_1c1xr_68";
2655
+ const h3 = "_h3_1c1xr_85";
2656
+ const h4 = "_h4_1c1xr_102";
2657
+ const h5 = "_h5_1c1xr_106";
2658
+ const h6 = "_h6_1c1xr_110";
2645
2659
  const styles$8 = {
2646
- "heading-common": "_heading-common_16jof_1",
2660
+ "heading-common": "_heading-common_1c1xr_1",
2647
2661
  h1,
2648
2662
  h2,
2649
2663
  h2__underline,
@@ -2660,7 +2674,7 @@ const SIZE_MAP = Object.freeze({
2660
2674
  5: 1.15,
2661
2675
  6: 1.1
2662
2676
  });
2663
- const ElmHeading = qwik.component$(({ level, text: text2, id }) => {
2677
+ const ElmHeading = qwik.component$(({ level, text: text2, id, style }) => {
2664
2678
  const Tag = `h${level}`;
2665
2679
  return /* @__PURE__ */ jsxRuntime.jsxs(Tag, {
2666
2680
  class: [
@@ -2669,7 +2683,8 @@ const ElmHeading = qwik.component$(({ level, text: text2, id }) => {
2669
2683
  styles$8[`h${level}`]
2670
2684
  ],
2671
2685
  style: {
2672
- "--font-size": `${SIZE_MAP[level]}em`
2686
+ "--font-size": `${SIZE_MAP[level]}em`,
2687
+ ...style
2673
2688
  },
2674
2689
  children: [
2675
2690
  /* @__PURE__ */ jsxRuntime.jsx("span", {
@@ -2692,11 +2707,11 @@ const ElmHeading = qwik.component$(({ level, text: text2, id }) => {
2692
2707
  });
2693
2708
  });
2694
2709
  const styles$7 = {
2695
- "elmethis-list-common": "_elmethis-list-common_14epx_1",
2696
- "elmethis-bulleted-list": "_elmethis-bulleted-list_14epx_9",
2697
- "elmethis-numbered-list": "_elmethis-numbered-list_14epx_24"
2710
+ "elmethis-list-common": "_elmethis-list-common_6g6c5_1",
2711
+ "elmethis-bulleted-list": "_elmethis-bulleted-list_6g6c5_9",
2712
+ "elmethis-numbered-list": "_elmethis-numbered-list_6g6c5_24"
2698
2713
  };
2699
- const ElmList = qwik.component$(({ listStyle = "unordered" }) => {
2714
+ const ElmList = qwik.component$(({ listStyle = "unordered", style }) => {
2700
2715
  if (listStyle === "ordered") {
2701
2716
  return /* @__PURE__ */ jsxRuntime.jsx("ol", {
2702
2717
  class: [
@@ -2704,6 +2719,7 @@ const ElmList = qwik.component$(({ listStyle = "unordered" }) => {
2704
2719
  styles$7["elmethis-list-common"],
2705
2720
  styles$7["elmethis-numbered-list"]
2706
2721
  ],
2722
+ style,
2707
2723
  children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
2708
2724
  });
2709
2725
  } else {
@@ -2717,7 +2733,7 @@ const ElmList = qwik.component$(({ listStyle = "unordered" }) => {
2717
2733
  });
2718
2734
  }
2719
2735
  });
2720
- const paragraph = "_paragraph_jz10s_1";
2736
+ const paragraph = "_paragraph_1klqe_1";
2721
2737
  const styles$6 = {
2722
2738
  paragraph
2723
2739
  };
@@ -2767,7 +2783,7 @@ const styles$5 = {
2767
2783
  };
2768
2784
  const HasRowHeaderContext = qwik.createContextId("HasRowHeaderContext");
2769
2785
  const ElmTable = qwik.component$((props) => {
2770
- const { margin, caption: caption2, hasRowHeader = false } = props;
2786
+ const { caption: caption2, hasRowHeader = false, style } = props;
2771
2787
  const hasRowHeaderComputed = qwik.useComputed$(() => hasRowHeader);
2772
2788
  qwik.useContextProvider(HasRowHeaderContext, hasRowHeaderComputed);
2773
2789
  return /* @__PURE__ */ jsxRuntime.jsxs("table", {
@@ -2776,7 +2792,7 @@ const ElmTable = qwik.component$((props) => {
2776
2792
  textStyles.text
2777
2793
  ],
2778
2794
  style: {
2779
- "--margin-block": margin
2795
+ ...style
2780
2796
  },
2781
2797
  children: [
2782
2798
  caption2 && /* @__PURE__ */ jsxRuntime.jsx("caption", {
@@ -2874,10 +2890,9 @@ const ElmTableCell = qwik.component$((props) => {
2874
2890
  })
2875
2891
  });
2876
2892
  });
2877
- const column = "_column_1l2bp_7";
2893
+ const column = "_column_1yujg_1";
2878
2894
  const styles$1 = {
2879
- "jarkup-body": "_jarkup-body_1l2bp_1",
2880
- "column-list": "_column-list_1l2bp_7",
2895
+ "column-list": "_column-list_1yujg_1",
2881
2896
  column
2882
2897
  };
2883
2898
  const convertInlineComponentsToPlainText = (inlineComponents) => {
@@ -3043,7 +3058,10 @@ const ElmJarkup = qwik.component$((props) => {
3043
3058
  });
3044
3059
  };
3045
3060
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
3046
- class: styles$1["jarkup-body"],
3061
+ style: {
3062
+ "--margin-block": "3rem",
3063
+ ...props.style
3064
+ },
3047
3065
  children: render(props.jsonComponents)
3048
3066
  });
3049
3067
  });