next-blurhash-previews 0.0.3-beta6 → 0.0.3-beta60
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/.vscode/settings.json +10 -0
 - package/bin/generateBlurhash.js +15 -1
 - package/bin/remark-plugin.js +5 -3
 - package/components/ImageWithPreview.tsx +20 -10
 - package/components/imagePreviewBootstrap.tsx +13 -6
 - package/components/workerScript.ts +17 -0
 - package/imagePreviewBootstrap.js +302 -0
 - package/index.js +1 -3
 - package/package.json +3 -3
 - package/util/setBootstrap.js +19 -20
 - package/{vite.config.ts → vite.wc.config.ts} +4 -7
 - package/vite.worker.config.ts +18 -0
 - package/.prettierrc +0 -3
 - package/img1.png +0 -0
 - package/img5.png +0 -0
 - package/junk.js +0 -1
 - package/next-runner/.eslintrc.json +0 -3
 - package/next-runner/README.md +0 -34
 - package/next-runner/blog-posts/post1.md +0 -303
 - package/next-runner/blog-posts/post2.md +0 -10
 - package/next-runner/blog-posts/post3.md +0 -10
 - package/next-runner/blog-posts/post4.md +0 -10
 - package/next-runner/next.config.js +0 -6
 - package/next-runner/package-lock.json +0 -5080
 - package/next-runner/package.json +0 -23
 - package/next-runner/pages/_app.js +0 -11
 - package/next-runner/pages/_document.js +0 -17
 - package/next-runner/pages/index.js +0 -47
 - package/next-runner/public/css-modules/loadingError.png +0 -0
 - package/next-runner/public/css-modules/styledComponent.png +0 -0
 - package/next-runner/public/css-modules/styledSass.png +0 -0
 - package/next-runner/public/css-modules/unstyledComp.png +0 -0
 - package/next-runner/public/dynamo-introduction/img1.png +0 -0
 - package/next-runner/public/dynamo-introduction/img10.png +0 -0
 - package/next-runner/public/dynamo-introduction/img11.png +0 -0
 - package/next-runner/public/dynamo-introduction/img12.png +0 -0
 - package/next-runner/public/dynamo-introduction/img13.png +0 -0
 - package/next-runner/public/dynamo-introduction/img14.png +0 -0
 - package/next-runner/public/dynamo-introduction/img15.png +0 -0
 - package/next-runner/public/dynamo-introduction/img2.png +0 -0
 - package/next-runner/public/dynamo-introduction/img3.png +0 -0
 - package/next-runner/public/dynamo-introduction/img4.png +0 -0
 - package/next-runner/public/dynamo-introduction/img5.png +0 -0
 - package/next-runner/public/dynamo-introduction/img5a.png +0 -0
 - package/next-runner/public/dynamo-introduction/img6.png +0 -0
 - package/next-runner/public/dynamo-introduction/img7.png +0 -0
 - package/next-runner/public/dynamo-introduction/img8.png +0 -0
 - package/next-runner/public/dynamo-introduction/img9.png +0 -0
 - package/next-runner/public/favicon.ico +0 -0
 - package/next-runner/public/img1.png +0 -0
 - package/next-runner/public/img5.png +0 -0
 - package/next-runner/public/vercel.svg +0 -4
 - package/next-runner/styles/Home.module.css +0 -3
 - package/next-runner/styles/globals.css +0 -22
 - package/next-runner/yalc.lock +0 -9
 - package/next-runner/yarn.lock +0 -1650
 - package/tsconfig.json +0 -21
 - package/tsconfig.node.json +0 -8
 - package/yalc.lock +0 -9
 
    
        package/next-runner/package.json
    DELETED
    
    | 
         @@ -1,23 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {
         
     | 
| 
       2 
     | 
    
         
            -
              "name": "next-runner",
         
     | 
| 
       3 
     | 
    
         
            -
              "version": "0.1.0",
         
     | 
| 
       4 
     | 
    
         
            -
              "private": true,
         
     | 
| 
       5 
     | 
    
         
            -
              "scripts": {
         
     | 
| 
       6 
     | 
    
         
            -
                "dev": "next dev",
         
     | 
| 
       7 
     | 
    
         
            -
                "build": "next build",
         
     | 
| 
       8 
     | 
    
         
            -
                "start": "next start",
         
     | 
| 
       9 
     | 
    
         
            -
                "lint": "next lint"
         
     | 
| 
       10 
     | 
    
         
            -
              },
         
     | 
| 
       11 
     | 
    
         
            -
              "dependencies": {
         
     | 
| 
       12 
     | 
    
         
            -
                "next": "12.2.0",
         
     | 
| 
       13 
     | 
    
         
            -
                "react": "18.2.0",
         
     | 
| 
       14 
     | 
    
         
            -
                "react-dom": "18.2.0"
         
     | 
| 
       15 
     | 
    
         
            -
              },
         
     | 
| 
       16 
     | 
    
         
            -
              "devDependencies": {
         
     | 
| 
       17 
     | 
    
         
            -
                "eslint": "8.19.0",
         
     | 
| 
       18 
     | 
    
         
            -
                "eslint-config-next": "12.2.0"
         
     | 
| 
       19 
     | 
    
         
            -
              },
         
     | 
| 
       20 
     | 
    
         
            -
              "workspaces": [
         
     | 
| 
       21 
     | 
    
         
            -
                ".."
         
     | 
| 
       22 
     | 
    
         
            -
              ]
         
     | 
| 
       23 
     | 
    
         
            -
            }
         
     | 
| 
         @@ -1,17 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import Document, { Html, Head, Main, NextScript } from "next/document";
         
     | 
| 
       2 
     | 
    
         
            -
            import { imagePreviewBootstrap, src } from "next-blurhash-previews";
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            export default class MyDocument extends Document {
         
     | 
| 
       5 
     | 
    
         
            -
              render() {
         
     | 
| 
       6 
     | 
    
         
            -
                return (
         
     | 
| 
       7 
     | 
    
         
            -
                  <Html>
         
     | 
| 
       8 
     | 
    
         
            -
                    <Head />
         
     | 
| 
       9 
     | 
    
         
            -
                    <body>
         
     | 
| 
       10 
     | 
    
         
            -
                      <Main />
         
     | 
| 
       11 
     | 
    
         
            -
                      <NextScript />
         
     | 
| 
       12 
     | 
    
         
            -
                      {imagePreviewBootstrap}
         
     | 
| 
       13 
     | 
    
         
            -
                    </body>
         
     | 
| 
       14 
     | 
    
         
            -
                  </Html>
         
     | 
| 
       15 
     | 
    
         
            -
                );
         
     | 
| 
       16 
     | 
    
         
            -
              }
         
     | 
| 
       17 
     | 
    
         
            -
            }
         
     | 
| 
         @@ -1,47 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import Head from "next/head";
         
     | 
| 
       2 
     | 
    
         
            -
            import Image from "next/image";
         
     | 
| 
       3 
     | 
    
         
            -
            import styles from "../styles/Home.module.css";
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            import { useState } from "react";
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            export default function Home() {
         
     | 
| 
       8 
     | 
    
         
            -
              const [val, setVal] = useState(0);
         
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
              return (
         
     | 
| 
       11 
     | 
    
         
            -
                <div className={styles.container}>
         
     | 
| 
       12 
     | 
    
         
            -
                  Root
         
     | 
| 
       13 
     | 
    
         
            -
                  <br />
         
     | 
| 
       14 
     | 
    
         
            -
                  <button onClick={() => setVal(x => x + 1)}>Refresh</button>
         
     | 
| 
       15 
     | 
    
         
            -
                  {val}
         
     | 
| 
       16 
     | 
    
         
            -
                  <div style={{ display: "flex" }}>
         
     | 
| 
       17 
     | 
    
         
            -
                    <blurhash-image
         
     | 
| 
       18 
     | 
    
         
            -
                      key={val}
         
     | 
| 
       19 
     | 
    
         
            -
                      url="/dynamo-introduction/img1.png"
         
     | 
| 
       20 
     | 
    
         
            -
                      preview='{ "w": 364, "h": 196, "blurhash": "L8S6SsD*%gt7IVM|tRRj~qWBM{NG" }'
         
     | 
| 
       21 
     | 
    
         
            -
                    >
         
     | 
| 
       22 
     | 
    
         
            -
                      <img slot="image" src="/dynamo-introduction/img1.png" />
         
     | 
| 
       23 
     | 
    
         
            -
                      <canvas slot="preview" width="364" height="196"></canvas>
         
     | 
| 
       24 
     | 
    
         
            -
                    </blurhash-image>
         
     | 
| 
       25 
     | 
    
         
            -
                    <blurhash-image
         
     | 
| 
       26 
     | 
    
         
            -
                      key={val + 2}
         
     | 
| 
       27 
     | 
    
         
            -
                      url="/dynamo-introduction/img5a.png"
         
     | 
| 
       28 
     | 
    
         
            -
                      preview='{ "w": 500, "h": 139, "blurhash": "LnPGmj_zIA:KS}j[s:ay-VWVRjay" }'
         
     | 
| 
       29 
     | 
    
         
            -
                    >
         
     | 
| 
       30 
     | 
    
         
            -
                      <img slot="image" src="/dynamo-introduction/img5a.png" />
         
     | 
| 
       31 
     | 
    
         
            -
                      <canvas slot="preview" width="500" height="139"></canvas>
         
     | 
| 
       32 
     | 
    
         
            -
                    </blurhash-image>
         
     | 
| 
       33 
     | 
    
         
            -
                    <blurhash-image
         
     | 
| 
       34 
     | 
    
         
            -
                      key={val + 5}
         
     | 
| 
       35 
     | 
    
         
            -
                      url="https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg"
         
     | 
| 
       36 
     | 
    
         
            -
                      preview='{ "w": 106, "h": 160, "blurhash": "U38|kkTJ01}A;{Or57;N01NG+?IW01rX^NAW" }'
         
     | 
| 
       37 
     | 
    
         
            -
                    >
         
     | 
| 
       38 
     | 
    
         
            -
                      <img
         
     | 
| 
       39 
     | 
    
         
            -
                        slot="image"
         
     | 
| 
       40 
     | 
    
         
            -
                        src="https://d193qjyckdxivp.cloudfront.net/medium-covers/573d1b97120426ef0078aa92/fcb820e4-36e3-4741-a3de-6994c46a66cc.jpg"
         
     | 
| 
       41 
     | 
    
         
            -
                      />
         
     | 
| 
       42 
     | 
    
         
            -
                      <canvas slot="preview" width="106" height="160"></canvas>
         
     | 
| 
       43 
     | 
    
         
            -
                    </blurhash-image>
         
     | 
| 
       44 
     | 
    
         
            -
                  </div>
         
     | 
| 
       45 
     | 
    
         
            -
                </div>
         
     | 
| 
       46 
     | 
    
         
            -
              );
         
     | 
| 
       47 
     | 
    
         
            -
            }
         
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         @@ -1,4 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            <svg width="283" height="64" viewBox="0 0 283 64" fill="none" 
         
     | 
| 
       2 
     | 
    
         
            -
                xmlns="http://www.w3.org/2000/svg">
         
     | 
| 
       3 
     | 
    
         
            -
                <path d="M141.04 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.46 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM248.72 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.45 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM200.24 34c0 6 3.92 10 10 10 4.12 0 7.21-1.87 8.8-4.92l7.68 4.43c-3.18 5.3-9.14 8.49-16.48 8.49-11.05 0-19-7.2-19-18s7.96-18 19-18c7.34 0 13.29 3.19 16.48 8.49l-7.68 4.43c-1.59-3.05-4.68-4.92-8.8-4.92-6.07 0-10 4-10 10zm82.48-29v46h-9V5h9zM36.95 0L73.9 64H0L36.95 0zm92.38 5l-27.71 48L73.91 5H84.3l17.32 30 17.32-30h10.39zm58.91 12v9.69c-1-.29-2.06-.49-3.2-.49-5.81 0-10 4-10 10V51h-9V17h9v9.2c0-5.08 5.91-9.2 13.2-9.2z" fill="#000"/>
         
     | 
| 
       4 
     | 
    
         
            -
            </svg>
         
     | 
| 
         @@ -1,22 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            html,
         
     | 
| 
       2 
     | 
    
         
            -
            body {
         
     | 
| 
       3 
     | 
    
         
            -
              padding: 0;
         
     | 
| 
       4 
     | 
    
         
            -
              margin: 0;
         
     | 
| 
       5 
     | 
    
         
            -
              font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
              /* background-color: lightslategrey; */
         
     | 
| 
       8 
     | 
    
         
            -
            }
         
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
            a {
         
     | 
| 
       11 
     | 
    
         
            -
              color: inherit;
         
     | 
| 
       12 
     | 
    
         
            -
              text-decoration: none;
         
     | 
| 
       13 
     | 
    
         
            -
            }
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            * {
         
     | 
| 
       16 
     | 
    
         
            -
              box-sizing: border-box;
         
     | 
| 
       17 
     | 
    
         
            -
            }
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
            img,
         
     | 
| 
       20 
     | 
    
         
            -
            canvas {
         
     | 
| 
       21 
     | 
    
         
            -
              max-width: 500px;
         
     | 
| 
       22 
     | 
    
         
            -
            }
         
     |