svelte-remote-image 0.4.2 → 0.4.4
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,8 +1,8 @@
|
|
|
1
1
|
<script>import { browser } from "$app/environment";
|
|
2
2
|
import { afterUpdate } from "svelte";
|
|
3
3
|
export let src;
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export let alt = "";
|
|
5
|
+
export let title = "";
|
|
6
6
|
export let style = "";
|
|
7
7
|
let className = "";
|
|
8
8
|
export { className as class };
|
|
@@ -27,6 +27,7 @@ afterUpdate(async () => {
|
|
|
27
27
|
});
|
|
28
28
|
const handleImgError = () => {
|
|
29
29
|
if (!imgSrc.fallback) {
|
|
30
|
+
visibilityStyle = "visible";
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
33
|
visibilityStyle = "invisible";
|
|
@@ -44,6 +45,7 @@ const handleImgError = () => {
|
|
|
44
45
|
fallbackUrl = imgSrc.fallback[index + 1];
|
|
45
46
|
}
|
|
46
47
|
if (!fallbackUrl) {
|
|
48
|
+
visibilityStyle = "visible";
|
|
47
49
|
return;
|
|
48
50
|
}
|
|
49
51
|
imgSrc = {
|
|
@@ -19,7 +19,5 @@ export type ImgProps = typeof __propDef.props;
|
|
|
19
19
|
export type ImgEvents = typeof __propDef.events;
|
|
20
20
|
export type ImgSlots = typeof __propDef.slots;
|
|
21
21
|
export default class Img extends SvelteComponent<ImgProps, ImgEvents, ImgSlots> {
|
|
22
|
-
get alt(): string;
|
|
23
|
-
get title(): string;
|
|
24
22
|
}
|
|
25
23
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script>import { browser } from "$app/environment";
|
|
2
2
|
import { afterUpdate } from "svelte";
|
|
3
3
|
export let src;
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export let alt = "";
|
|
5
|
+
export let title = "";
|
|
6
6
|
export let style = "";
|
|
7
7
|
let className = "";
|
|
8
8
|
export { className as class };
|
|
@@ -19,7 +19,5 @@ export type PictureProps = typeof __propDef.props;
|
|
|
19
19
|
export type PictureEvents = typeof __propDef.events;
|
|
20
20
|
export type PictureSlots = typeof __propDef.slots;
|
|
21
21
|
export default class Picture extends SvelteComponent<PictureProps, PictureEvents, PictureSlots> {
|
|
22
|
-
get alt(): string;
|
|
23
|
-
get title(): string;
|
|
24
22
|
}
|
|
25
23
|
export {};
|