next-blurhash-previews 0.0.3-beta3 → 0.0.3-beta4

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.
@@ -15,6 +15,10 @@ export const blurhashPlugin = publicPath => () => {
15
15
 
16
16
  const originalImg = imagePath;
17
17
  if (!/http/.test(imagePath)) {
18
+ if (imagePath.startsWith("/")) {
19
+ imagePath = imagePath.substr(1);
20
+ }
21
+
18
22
  imagePath = path.resolve(publicPath, imagePath);
19
23
  }
20
24
 
@@ -1,4 +1,10 @@
1
- ![A](./img1.png)
1
+ <blurhash-image
2
+ url="./img1.png"
3
+ preview='{"blurhash":"U8SF;LD*%gofIUM|xuRj~qaeM{RjxtoIWBWC","w":364,"h":196}'
4
+ >
5
+ <img alt="A" src="./img1.png" slot="image" />
6
+ <canvas width="364" height="196" slot="preview"></canvas>
7
+ </blurhash-image>
2
8
 
3
9
  <some-component>
4
10
  <p>Hello</p>
@@ -6,6 +12,22 @@
6
12
 
7
13
  Yo
8
14
 
9
- ![external image](https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg)
15
+ <blurhash-image
16
+ url="https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg"
17
+ preview='{"blurhash":"U38|kkTJ01}A;{Or57;N01NG+?IW01rX^NAW","w":106,"h":160}'
18
+ >
19
+ <img
20
+ alt="external image"
21
+ src="https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg"
22
+ slot="image"
23
+ />
24
+ <canvas width="106" height="160" slot="preview"></canvas>
25
+ </blurhash-image>
10
26
 
11
- ![](./img1.png)
27
+ <blurhash-image
28
+ url="./img1.png"
29
+ preview='{"blurhash":"U8SF;LD*%gofIUM|xuRj~qaeM{RjxtoIWBWC","w":364,"h":196}'
30
+ >
31
+ <img alt="" src="./img1.png" slot="image" />
32
+ <canvas width="364" height="196" slot="preview"></canvas>
33
+ </blurhash-image>
@@ -1,4 +1,10 @@
1
- ![A](./img1.png)
1
+ <blurhash-image
2
+ url="./img1.png"
3
+ preview='{"blurhash":"U8SF;LD*%gofIUM|xuRj~qaeM{RjxtoIWBWC","w":364,"h":196}'
4
+ >
5
+ <img alt="A" src="./img1.png" slot="image" />
6
+ <canvas width="364" height="196" slot="preview"></canvas>
7
+ </blurhash-image>
2
8
 
3
9
  <some-component>
4
10
  <p>Hello</p>
@@ -6,5 +12,14 @@
6
12
 
7
13
  Yo
8
14
 
9
- ![external image](https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg)
10
-
15
+ <blurhash-image
16
+ url="https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg"
17
+ preview='{"blurhash":"U38|kkTJ01}A;{Or57;N01NG+?IW01rX^NAW","w":106,"h":160}'
18
+ >
19
+ <img
20
+ alt="external image"
21
+ src="https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg"
22
+ slot="image"
23
+ />
24
+ <canvas width="106" height="160" slot="preview"></canvas>
25
+ </blurhash-image>
@@ -1,4 +1,10 @@
1
- ![A](./img1.png)
1
+ <blurhash-image
2
+ url="./img1.png"
3
+ preview='{"blurhash":"U8SF;LD*%gofIUM|xuRj~qaeM{RjxtoIWBWC","w":364,"h":196}'
4
+ >
5
+ <img alt="A" src="./img1.png" slot="image" />
6
+ <canvas width="364" height="196" slot="preview"></canvas>
7
+ </blurhash-image>
2
8
 
3
9
  <some-component>
4
10
  <p>Hello</p>
@@ -6,5 +12,14 @@
6
12
 
7
13
  Yo
8
14
 
9
- ![external image](https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg)
10
-
15
+ <blurhash-image
16
+ url="https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg"
17
+ preview='{"blurhash":"U38|kkTJ01}A;{Or57;N01NG+?IW01rX^NAW","w":106,"h":160}'
18
+ >
19
+ <img
20
+ alt="external image"
21
+ src="https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg"
22
+ slot="image"
23
+ />
24
+ <canvas width="106" height="160" slot="preview"></canvas>
25
+ </blurhash-image>
@@ -1,4 +1,10 @@
1
- ![A](./img1.png)
1
+ <blurhash-image
2
+ url="./img1.png"
3
+ preview='{"blurhash":"U8SF;LD*%gofIUM|xuRj~qaeM{RjxtoIWBWC","w":364,"h":196}'
4
+ >
5
+ <img alt="A" src="./img1.png" slot="image" />
6
+ <canvas width="364" height="196" slot="preview"></canvas>
7
+ </blurhash-image>
2
8
 
3
9
  <some-component>
4
10
  <p>Hello</p>
@@ -6,5 +12,14 @@
6
12
 
7
13
  Yo
8
14
 
9
- ![external image](https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg)
10
-
15
+ <blurhash-image
16
+ url="https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg"
17
+ preview='{"blurhash":"U38|kkTJ01}A;{Or57;N01NG+?IW01rX^NAW","w":106,"h":160}'
18
+ >
19
+ <img
20
+ alt="external image"
21
+ src="https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg"
22
+ slot="image"
23
+ />
24
+ <canvas width="106" height="160" slot="preview"></canvas>
25
+ </blurhash-image>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-blurhash-previews",
3
- "version": "0.0.3-beta3",
3
+ "version": "0.0.3-beta4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {