@elmethis/qwik 0.0.34 → 0.0.36
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
CHANGED
|
@@ -655,13 +655,15 @@ const icon$3 = "_icon_19g82_1";
|
|
|
655
655
|
const styles$w = {
|
|
656
656
|
icon: icon$3
|
|
657
657
|
};
|
|
658
|
-
const ElmInlineIcon = qwik.component$(({ src, alt }) => {
|
|
658
|
+
const ElmInlineIcon = qwik.component$(({ src, alt, width, height, size = 16 }) => {
|
|
659
659
|
return /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
660
660
|
class: styles$w.icon,
|
|
661
661
|
children: /* @__PURE__ */ jsxRuntime.jsx("img", {
|
|
662
662
|
src,
|
|
663
663
|
alt,
|
|
664
|
-
class: styles$w.icon
|
|
664
|
+
class: styles$w.icon,
|
|
665
|
+
width: width ?? size,
|
|
666
|
+
height: height ?? size
|
|
665
667
|
})
|
|
666
668
|
});
|
|
667
669
|
});
|
|
@@ -2222,7 +2224,14 @@ const ElmBlockImage = qwik.component$(({ src, alt, caption: caption2, width, hei
|
|
|
2222
2224
|
isShowModal.value = !isShowModal.value;
|
|
2223
2225
|
}
|
|
2224
2226
|
});
|
|
2227
|
+
const imgRef = qwik.useSignal();
|
|
2228
|
+
qwik.useVisibleTask$(() => {
|
|
2229
|
+
imgRef.value.decode().then(() => {
|
|
2230
|
+
isLoading.value = false;
|
|
2231
|
+
});
|
|
2232
|
+
});
|
|
2225
2233
|
const ImageComponent = /* @__PURE__ */ jsxRuntime.jsx("img", {
|
|
2234
|
+
ref: imgRef,
|
|
2226
2235
|
class: styles$h.image,
|
|
2227
2236
|
src,
|
|
2228
2237
|
alt: alt ?? caption2 ?? "Image",
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -653,13 +653,15 @@ const icon$3 = "_icon_19g82_1";
|
|
|
653
653
|
const styles$w = {
|
|
654
654
|
icon: icon$3
|
|
655
655
|
};
|
|
656
|
-
const ElmInlineIcon = component$(({ src, alt }) => {
|
|
656
|
+
const ElmInlineIcon = component$(({ src, alt, width, height, size = 16 }) => {
|
|
657
657
|
return /* @__PURE__ */ jsx("span", {
|
|
658
658
|
class: styles$w.icon,
|
|
659
659
|
children: /* @__PURE__ */ jsx("img", {
|
|
660
660
|
src,
|
|
661
661
|
alt,
|
|
662
|
-
class: styles$w.icon
|
|
662
|
+
class: styles$w.icon,
|
|
663
|
+
width: width ?? size,
|
|
664
|
+
height: height ?? size
|
|
663
665
|
})
|
|
664
666
|
});
|
|
665
667
|
});
|
|
@@ -2220,7 +2222,14 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
|
|
|
2220
2222
|
isShowModal.value = !isShowModal.value;
|
|
2221
2223
|
}
|
|
2222
2224
|
});
|
|
2225
|
+
const imgRef = useSignal();
|
|
2226
|
+
useVisibleTask$(() => {
|
|
2227
|
+
imgRef.value.decode().then(() => {
|
|
2228
|
+
isLoading.value = false;
|
|
2229
|
+
});
|
|
2230
|
+
});
|
|
2223
2231
|
const ImageComponent = /* @__PURE__ */ jsx("img", {
|
|
2232
|
+
ref: imgRef,
|
|
2224
2233
|
class: styles$h.image,
|
|
2225
2234
|
src,
|
|
2226
2235
|
alt: alt ?? caption2 ?? "Image",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Numberish } from "@builder.io/qwik";
|
|
1
2
|
export interface ElmInlineIconProps {
|
|
2
3
|
/**
|
|
3
4
|
* The source URL of the icon.
|
|
@@ -7,5 +8,8 @@ export interface ElmInlineIconProps {
|
|
|
7
8
|
* The alt text for the icon.
|
|
8
9
|
*/
|
|
9
10
|
alt?: string;
|
|
11
|
+
width?: Numberish;
|
|
12
|
+
height?: Numberish;
|
|
13
|
+
size?: Numberish;
|
|
10
14
|
}
|
|
11
15
|
export declare const ElmInlineIcon: import("@builder.io/qwik").Component<ElmInlineIconProps>;
|