next-blurhash-previews 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/bin/markdown-sync.js +25 -0
  2. package/components/ImageWithPreview.tsx +99 -0
  3. package/components/NextWrapper.tsx +19 -0
  4. package/components/imagePreviewBootstrap.tsx +7 -0
  5. package/example.md +9 -0
  6. package/img1.png +0 -0
  7. package/img5.png +0 -0
  8. package/index.js +5 -0
  9. package/junk.js +1 -0
  10. package/next-runner/.eslintrc.json +3 -0
  11. package/next-runner/README.md +34 -0
  12. package/next-runner/next.config.js +6 -0
  13. package/next-runner/package-lock.json +5064 -0
  14. package/next-runner/package.json +23 -0
  15. package/next-runner/pages/_app.js +11 -0
  16. package/next-runner/pages/_document.js +19 -0
  17. package/next-runner/pages/index.js +26 -0
  18. package/next-runner/public/dynamo-introduction/img1.png +0 -0
  19. package/next-runner/public/dynamo-introduction/img10.png +0 -0
  20. package/next-runner/public/dynamo-introduction/img11.png +0 -0
  21. package/next-runner/public/dynamo-introduction/img12.png +0 -0
  22. package/next-runner/public/dynamo-introduction/img13.png +0 -0
  23. package/next-runner/public/dynamo-introduction/img14.png +0 -0
  24. package/next-runner/public/dynamo-introduction/img15.png +0 -0
  25. package/next-runner/public/dynamo-introduction/img2.png +0 -0
  26. package/next-runner/public/dynamo-introduction/img3.png +0 -0
  27. package/next-runner/public/dynamo-introduction/img4.png +0 -0
  28. package/next-runner/public/dynamo-introduction/img5.png +0 -0
  29. package/next-runner/public/dynamo-introduction/img5a.png +0 -0
  30. package/next-runner/public/dynamo-introduction/img6.png +0 -0
  31. package/next-runner/public/dynamo-introduction/img7.png +0 -0
  32. package/next-runner/public/dynamo-introduction/img8.png +0 -0
  33. package/next-runner/public/dynamo-introduction/img9.png +0 -0
  34. package/next-runner/public/favicon.ico +0 -0
  35. package/next-runner/public/vercel.svg +4 -0
  36. package/next-runner/styles/Home.module.css +0 -0
  37. package/next-runner/styles/globals.css +22 -0
  38. package/next-runner/yalc.lock +9 -0
  39. package/next-runner/yarn.lock +1645 -0
  40. package/output.md +15 -0
  41. package/package.json +42 -0
  42. package/plugin.js +78 -0
  43. package/tsconfig.json +21 -0
  44. package/tsconfig.node.json +8 -0
  45. package/util/setBootstrap.js +13 -0
  46. package/vite.config.ts +21 -0
  47. package/yalc.lock +9 -0
@@ -0,0 +1,23 @@
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
+ }
@@ -0,0 +1,11 @@
1
+ import "../styles/globals.css";
2
+
3
+ function MyApp({ Component, pageProps }) {
4
+ return (
5
+ <>
6
+ <Component {...pageProps} />
7
+ </>
8
+ );
9
+ }
10
+
11
+ export default MyApp;
@@ -0,0 +1,19 @@
1
+ import Document, { Html, Head, Main, NextScript } from "next/document";
2
+ import { imagePreviewBootstrap, src } from "next-static-image-previews";
3
+
4
+ import Script from "next/script";
5
+
6
+ export default class MyDocument extends Document {
7
+ render() {
8
+ return (
9
+ <Html>
10
+ <Head />
11
+ <body>
12
+ <Main />
13
+ <NextScript />
14
+ {imagePreviewBootstrap}
15
+ </body>
16
+ </Html>
17
+ );
18
+ }
19
+ }
@@ -0,0 +1,26 @@
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
+ <uikit-image key={val} url="/dynamo-introduction/img1.png" preview='{ "w": 364, "h": 196, "blurhash": "L8S6SsD*%gt7IVM|tRRj~qWBM{NG" }'>
17
+ <img slot="image" src="/dynamo-introduction/img1.png" />
18
+ <canvas slot="preview" width="364" height="196"></canvas>
19
+ </uikit-image>
20
+ <uikit-image key={val + 9} url="/dynamo-introduction/img5a.png" preview='{ "w": 2244, "h": 622, "blurhash": "LnPGmj_zIA:KS}j[s:ay-VWVRjay" }'>
21
+ <img slot="image" src="/dynamo-introduction/img5a.png" />
22
+ <canvas slot="preview" width="2244" height="622"></canvas>
23
+ </uikit-image>
24
+ </div>
25
+ );
26
+ }
Binary file
@@ -0,0 +1,4 @@
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>
File without changes
@@ -0,0 +1,22 @@
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
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "v1",
3
+ "packages": {
4
+ "next-static-image-previews": {
5
+ "signature": "d6ca28803e08581968aab99799422e6b",
6
+ "file": true
7
+ }
8
+ }
9
+ }