@elmethis/core 1.0.0-alpha.182 → 1.0.0-alpha.184
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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document != "undefined") {
|
|
5
5
|
var elementStyle = document.createElement("style");
|
|
6
|
-
elementStyle.appendChild(document.createTextNode(".v-enter-to[data-v-
|
|
6
|
+
elementStyle.appendChild(document.createTextNode(".v-enter-to[data-v-67c5b662],.v-leave-from[data-v-67c5b662]{opacity:1}.v-enter-active[data-v-67c5b662],.v-leave-active[data-v-67c5b662]{transition:opacity .3s}.v-enter-from[data-v-67c5b662],.v-leave-to[data-v-67c5b662]{opacity:0}"));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
@@ -16,7 +16,7 @@ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
|
16
16
|
const cssModules = {
|
|
17
17
|
"$style": style0
|
|
18
18
|
};
|
|
19
|
-
const ElmBlockImage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-
|
|
19
|
+
const ElmBlockImage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-67c5b662"]]);
|
|
20
20
|
export {
|
|
21
21
|
ElmBlockImage as default
|
|
22
22
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent, ref, createElementBlock, openBlock, Fragment, createElementVNode, createVNode, Transition, withCtx, unref,
|
|
1
|
+
import { defineComponent, ref, createElementBlock, openBlock, Fragment, createElementVNode, createVNode, normalizeClass, Transition, withCtx, unref, normalizeStyle, createCommentVNode } from "vue";
|
|
2
2
|
import ElmRectangleWave from "../fallback/ElmRectangleWave.vue.mjs";
|
|
3
3
|
import ElmDotLoadingIcon from "../icon/ElmDotLoadingIcon.vue.mjs";
|
|
4
4
|
import { useImage, onKeyStroke } from "@vueuse/core";
|
|
5
5
|
import ElmInlineText from "../inline/ElmInlineText.vue.mjs";
|
|
6
|
-
|
|
6
|
+
import { Icon } from "@iconify/vue";
|
|
7
|
+
const _hoisted_1 = ["src", "alt"];
|
|
7
8
|
const _hoisted_2 = ["src", "alt"];
|
|
8
|
-
const _hoisted_3 = ["src", "alt"];
|
|
9
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
10
|
__name: "ElmBlockImage",
|
|
11
11
|
props: {
|
|
@@ -22,7 +22,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
});
|
|
23
23
|
return (_ctx, _cache) => {
|
|
24
24
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
25
|
-
createElementVNode("div",
|
|
25
|
+
createElementVNode("div", {
|
|
26
|
+
class: normalizeClass(_ctx.$style.container)
|
|
27
|
+
}, [
|
|
26
28
|
createVNode(Transition, { mode: "out-in" }, {
|
|
27
29
|
default: withCtx(() => [
|
|
28
30
|
unref(error) ? (openBlock(), createElementBlock("div", {
|
|
@@ -42,28 +44,43 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
44
|
createElementVNode("div", null, [
|
|
43
45
|
createVNode(ElmDotLoadingIcon)
|
|
44
46
|
])
|
|
45
|
-
], 2)) : (openBlock(), createElementBlock("
|
|
47
|
+
], 2)) : (openBlock(), createElementBlock("img", {
|
|
46
48
|
key: 2,
|
|
47
|
-
class: normalizeClass(_ctx.$style.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
display: unref(isLoading) ? "none" : "block"
|
|
60
|
-
})
|
|
61
|
-
}, null, 14, _hoisted_2)
|
|
62
|
-
], 2))
|
|
49
|
+
class: normalizeClass(_ctx.$style.image),
|
|
50
|
+
src: _ctx.src,
|
|
51
|
+
alt: _ctx.alt,
|
|
52
|
+
onClick: _cache[0] || (_cache[0] = () => {
|
|
53
|
+
isModalOpen.value = true;
|
|
54
|
+
}),
|
|
55
|
+
style: normalizeStyle({
|
|
56
|
+
"--height": unref(isLoading) ? "0" : "auto",
|
|
57
|
+
"--opacity": unref(isLoading) ? 0 : 1,
|
|
58
|
+
display: unref(isLoading) ? "none" : "block"
|
|
59
|
+
})
|
|
60
|
+
}, null, 14, _hoisted_1))
|
|
63
61
|
]),
|
|
64
62
|
_: 1
|
|
65
63
|
})
|
|
66
|
-
]),
|
|
64
|
+
], 2),
|
|
65
|
+
createVNode(Transition, null, {
|
|
66
|
+
default: withCtx(() => [
|
|
67
|
+
!unref(isLoading) && _ctx.alt != null ? (openBlock(), createElementBlock("div", {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: normalizeClass(_ctx.$style["alt-container"])
|
|
70
|
+
}, [
|
|
71
|
+
createVNode(unref(Icon), { icon: "material-symbols:image-outline" }),
|
|
72
|
+
createElementVNode("div", {
|
|
73
|
+
class: normalizeClass(_ctx.$style["alt-text"])
|
|
74
|
+
}, [
|
|
75
|
+
createVNode(ElmInlineText, {
|
|
76
|
+
text: _ctx.alt,
|
|
77
|
+
size: "0.8rem"
|
|
78
|
+
}, null, 8, ["text"])
|
|
79
|
+
], 2)
|
|
80
|
+
], 2)) : createCommentVNode("", true)
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
}),
|
|
67
84
|
createVNode(Transition, null, {
|
|
68
85
|
default: withCtx(() => [
|
|
69
86
|
isModalOpen.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -77,7 +94,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
94
|
onClick: _cache[1] || (_cache[1] = () => {
|
|
78
95
|
isModalOpen.value = false;
|
|
79
96
|
})
|
|
80
|
-
}, null, 10,
|
|
97
|
+
}, null, 10, _hoisted_2)
|
|
81
98
|
], 2)) : createCommentVNode("", true)
|
|
82
99
|
]),
|
|
83
100
|
_: 1
|
|
@@ -3,25 +3,27 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document != "undefined") {
|
|
5
5
|
var elementStyle = document.createElement("style");
|
|
6
|
-
elementStyle.appendChild(document.createTextNode(".
|
|
6
|
+
elementStyle.appendChild(document.createTextNode("._container_24o6q_1{margin-block:1rem;width:100%;display:flex;justify-content:center;align-items:center}._image_24o6q_9{overflow:hidden;border-radius:.25rem;box-shadow:0 0 .125rem #0000004d;display:block;max-width:100%;height:var(--height);opacity:var(--opacity);transition:opacity .4s;cursor:zoom-in}._alt-container_24o6q_21{margin:1rem;display:flex;justify-content:center;align-items:center;gap:.5rem;color:#6987b8;opacity:.8}._alt-text_24o6q_31{width:-moz-fit-content;width:fit-content}._error_24o6q_35{display:flex;justify-content:center;align-items:center;gap:1rem;width:100%;height:100%;min-height:10rem;line-height:1.5rem;color:#c56565}._fallback_24o6q_47{margin-block:1rem;margin:0;padding:0;position:relative;width:100%;z-index:1;display:flex;justify-content:center;align-items:center;aspect-ratio:1200/630}._modal_24o6q_60{z-index:1000;position:fixed;width:100%;height:100vh;top:0;left:0;background-color:#000000b3;display:flex;justify-content:center;align-items:center;cursor:zoom-out}._modal_24o6q_60 ._modal-image_24o6q_73{width:100vw;height:100vh;-o-object-fit:contain;object-fit:contain}"));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
10
10
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
|
-
const container = "
|
|
14
|
-
const image = "
|
|
15
|
-
const error = "
|
|
16
|
-
const fallback = "
|
|
17
|
-
const modal = "
|
|
13
|
+
const container = "_container_24o6q_1";
|
|
14
|
+
const image = "_image_24o6q_9";
|
|
15
|
+
const error = "_error_24o6q_35";
|
|
16
|
+
const fallback = "_fallback_24o6q_47";
|
|
17
|
+
const modal = "_modal_24o6q_60";
|
|
18
18
|
const style0 = {
|
|
19
19
|
container,
|
|
20
20
|
image,
|
|
21
|
+
"alt-container": "_alt-container_24o6q_21",
|
|
22
|
+
"alt-text": "_alt-text_24o6q_31",
|
|
21
23
|
error,
|
|
22
24
|
fallback,
|
|
23
25
|
modal,
|
|
24
|
-
"modal-image": "_modal-
|
|
26
|
+
"modal-image": "_modal-image_24o6q_73"
|
|
25
27
|
};
|
|
26
28
|
export {
|
|
27
29
|
container,
|