@elmethis/qwik 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.qwik.cjs +9 -8
- package/lib/index.qwik.mjs +9 -8
- package/lib/style.css +9 -7
- package/package.json +1 -1
package/lib/index.qwik.cjs
CHANGED
|
@@ -1060,15 +1060,15 @@ const ElmBlockFallback = qwik.component$(({ height = "16rem" }) => {
|
|
|
1060
1060
|
]
|
|
1061
1061
|
});
|
|
1062
1062
|
});
|
|
1063
|
-
const image$1 = "
|
|
1064
|
-
const fallback = "
|
|
1063
|
+
const image$1 = "_image_5s2ag_11";
|
|
1064
|
+
const fallback = "_fallback_5s2ag_33";
|
|
1065
1065
|
const styles$g = {
|
|
1066
|
-
"block-image": "_block-
|
|
1067
|
-
"image-container": "_image-
|
|
1066
|
+
"block-image": "_block-image_5s2ag_1",
|
|
1067
|
+
"image-container": "_image-container_5s2ag_11",
|
|
1068
1068
|
image: image$1,
|
|
1069
1069
|
fallback,
|
|
1070
|
-
"caption-box": "_caption-
|
|
1071
|
-
"modal-container": "_modal-
|
|
1070
|
+
"caption-box": "_caption-box_5s2ag_43",
|
|
1071
|
+
"modal-container": "_modal-container_5s2ag_55"
|
|
1072
1072
|
};
|
|
1073
1073
|
const ElmBlockImage = qwik.component$(({ src, alt, caption: caption2, width, height, enableModal = true }) => {
|
|
1074
1074
|
const isLoading = qwik.useSignal(true);
|
|
@@ -1077,7 +1077,7 @@ const ElmBlockImage = qwik.component$(({ src, alt, caption: caption2, width, hei
|
|
|
1077
1077
|
isLoading.value = false;
|
|
1078
1078
|
});
|
|
1079
1079
|
const handleToggleModal = qwik.$(() => {
|
|
1080
|
-
if (enableModal) {
|
|
1080
|
+
if (enableModal && !isLoading.value) {
|
|
1081
1081
|
isShowModal.value = !isShowModal.value;
|
|
1082
1082
|
}
|
|
1083
1083
|
});
|
|
@@ -1090,7 +1090,8 @@ const ElmBlockImage = qwik.component$(({ src, alt, caption: caption2, width, hei
|
|
|
1090
1090
|
onLoad$: handleImageLoad,
|
|
1091
1091
|
style: {
|
|
1092
1092
|
"--opacity": isLoading.value ? 0 : 1,
|
|
1093
|
-
"--cursor": enableModal ? isShowModal.value ? "zoom-out" : "zoom-in" : "default"
|
|
1093
|
+
"--cursor": enableModal ? isShowModal.value ? "zoom-out" : "zoom-in" : "default",
|
|
1094
|
+
"--aspect-ratio": width && height ? `${width} / ${height}` : "auto"
|
|
1094
1095
|
}
|
|
1095
1096
|
});
|
|
1096
1097
|
const Modal = /* @__PURE__ */ jsxRuntime.jsx("div", {
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -1058,15 +1058,15 @@ const ElmBlockFallback = component$(({ height = "16rem" }) => {
|
|
|
1058
1058
|
]
|
|
1059
1059
|
});
|
|
1060
1060
|
});
|
|
1061
|
-
const image$1 = "
|
|
1062
|
-
const fallback = "
|
|
1061
|
+
const image$1 = "_image_5s2ag_11";
|
|
1062
|
+
const fallback = "_fallback_5s2ag_33";
|
|
1063
1063
|
const styles$g = {
|
|
1064
|
-
"block-image": "_block-
|
|
1065
|
-
"image-container": "_image-
|
|
1064
|
+
"block-image": "_block-image_5s2ag_1",
|
|
1065
|
+
"image-container": "_image-container_5s2ag_11",
|
|
1066
1066
|
image: image$1,
|
|
1067
1067
|
fallback,
|
|
1068
|
-
"caption-box": "_caption-
|
|
1069
|
-
"modal-container": "_modal-
|
|
1068
|
+
"caption-box": "_caption-box_5s2ag_43",
|
|
1069
|
+
"modal-container": "_modal-container_5s2ag_55"
|
|
1070
1070
|
};
|
|
1071
1071
|
const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height, enableModal = true }) => {
|
|
1072
1072
|
const isLoading = useSignal(true);
|
|
@@ -1075,7 +1075,7 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
|
|
|
1075
1075
|
isLoading.value = false;
|
|
1076
1076
|
});
|
|
1077
1077
|
const handleToggleModal = $(() => {
|
|
1078
|
-
if (enableModal) {
|
|
1078
|
+
if (enableModal && !isLoading.value) {
|
|
1079
1079
|
isShowModal.value = !isShowModal.value;
|
|
1080
1080
|
}
|
|
1081
1081
|
});
|
|
@@ -1088,7 +1088,8 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
|
|
|
1088
1088
|
onLoad$: handleImageLoad,
|
|
1089
1089
|
style: {
|
|
1090
1090
|
"--opacity": isLoading.value ? 0 : 1,
|
|
1091
|
-
"--cursor": enableModal ? isShowModal.value ? "zoom-out" : "zoom-in" : "default"
|
|
1091
|
+
"--cursor": enableModal ? isShowModal.value ? "zoom-out" : "zoom-in" : "default",
|
|
1092
|
+
"--aspect-ratio": width && height ? `${width} / ${height}` : "auto"
|
|
1092
1093
|
}
|
|
1093
1094
|
});
|
|
1094
1095
|
const Modal = /* @__PURE__ */ jsx("div", {
|
package/lib/style.css
CHANGED
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
}
|
|
435
435
|
[data-theme=dark] ._rectangle-wave_hej9g_17 {
|
|
436
436
|
border-color: rgba(255, 255, 255, 0.7);
|
|
437
|
-
}._block-
|
|
437
|
+
}._block-image_5s2ag_1 {
|
|
438
438
|
margin: 0;
|
|
439
439
|
display: flex;
|
|
440
440
|
justify-content: center;
|
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
width: 100%;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
._image-
|
|
447
|
+
._image-container_5s2ag_11 {
|
|
448
448
|
width: 100%;
|
|
449
449
|
height: 100%;
|
|
450
450
|
position: relative;
|
|
@@ -453,18 +453,20 @@
|
|
|
453
453
|
align-items: center;
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
.
|
|
456
|
+
._image_5s2ag_11 {
|
|
457
457
|
max-width: 100%;
|
|
458
|
-
max-height: 100
|
|
458
|
+
max-height: min(100%, 100vh);
|
|
459
|
+
height: auto;
|
|
459
460
|
border-radius: 0.25rem;
|
|
460
461
|
box-shadow: 0 0 0.125rem rgba(0, 0, 0, 0.1);
|
|
461
462
|
transition: opacity 400ms;
|
|
462
463
|
opacity: var(--opacity, 1);
|
|
463
464
|
user-select: none;
|
|
465
|
+
aspect-ratio: var(--aspect-ratio, auto);
|
|
464
466
|
cursor: var(--cursor);
|
|
465
467
|
}
|
|
466
468
|
|
|
467
|
-
.
|
|
469
|
+
._fallback_5s2ag_33 {
|
|
468
470
|
width: 100%;
|
|
469
471
|
height: 100%;
|
|
470
472
|
inset: 0 0 auto auto;
|
|
@@ -474,7 +476,7 @@
|
|
|
474
476
|
pointer-events: none;
|
|
475
477
|
}
|
|
476
478
|
|
|
477
|
-
._caption-
|
|
479
|
+
._caption-box_5s2ag_43 {
|
|
478
480
|
box-sizing: border-box;
|
|
479
481
|
padding: 0rem 1rem;
|
|
480
482
|
display: flex;
|
|
@@ -486,7 +488,7 @@
|
|
|
486
488
|
transition: opacity 400ms;
|
|
487
489
|
}
|
|
488
490
|
|
|
489
|
-
._modal-
|
|
491
|
+
._modal-container_5s2ag_55 {
|
|
490
492
|
width: 100vw;
|
|
491
493
|
height: 100vh;
|
|
492
494
|
display: flex;
|