next-blurhash-previews 0.0.3-beta46 → 0.0.3-beta47
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/bin/remark-plugin.js
CHANGED
@@ -39,7 +39,7 @@ export const blurhashPlugin = publicPath => () => {
|
|
39
39
|
|
40
40
|
const newNode = `
|
41
41
|
<blurhash-image url="${originalImg}" preview='${JSON.stringify(blurHash)}'>
|
42
|
-
<img alt="${alt}" width="${w}"
|
42
|
+
<img alt="${alt}" width="${w}" src="${originalImg}" slot="image" />
|
43
43
|
<canvas width="${blurHash.w}" height="${blurHash.h}" slot="preview"></canvas>
|
44
44
|
</blurhash-image>`.trim();
|
45
45
|
|
@@ -53,7 +53,9 @@ class ImageWithPreview extends HTMLElement {
|
|
53
53
|
}
|
54
54
|
|
55
55
|
#imgLoad = () => {
|
56
|
-
|
56
|
+
setTimeout(() => {
|
57
|
+
this.sd.innerHTML = `<slot name="image"></slot>`;
|
58
|
+
}, 4000);
|
57
59
|
};
|
58
60
|
|
59
61
|
attributeChangedCallback(name) {
|
package/imagePreviewBootstrap.js
CHANGED
@@ -44,7 +44,9 @@ class ImageWithPreview extends HTMLElement {
|
|
44
44
|
}
|
45
45
|
}
|
46
46
|
#imgLoad = () => {
|
47
|
-
|
47
|
+
setTimeout(() => {
|
48
|
+
this.sd.innerHTML = \`<slot name="image"></slot>\`;
|
49
|
+
}, 4e3);
|
48
50
|
};
|
49
51
|
attributeChangedCallback(name) {
|
50
52
|
if (this.#canvasEl && name === "preview") {
|