nuxt-og-image 3.0.0-beta.3 → 3.0.0-beta.31

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.
Files changed (128) hide show
  1. package/README.md +3 -3
  2. package/dist/client/200.html +5 -5
  3. package/dist/client/404.html +5 -5
  4. package/dist/client/_nuxt/{IconCSS.e8427024.js → IconCSS.06e6c904.js} +1 -1
  5. package/dist/client/_nuxt/IconCSS.7e8f1f7b.css +1 -0
  6. package/dist/client/_nuxt/builds/latest.json +1 -1
  7. package/dist/client/_nuxt/builds/meta/eb64321b-b694-4f04-b8be-8bfdecc73293.json +1 -0
  8. package/dist/client/_nuxt/entry.5625a982.js +137 -0
  9. package/dist/client/_nuxt/entry.f47d0628.css +1 -0
  10. package/dist/client/_nuxt/{error-404.b1c8e4c8.js → error-404.ab2243fa.js} +1 -1
  11. package/dist/client/_nuxt/{error-500.6b97e3ab.js → error-500.9440311e.js} +1 -1
  12. package/dist/client/index.html +5 -5
  13. package/dist/module.d.mts +44 -26
  14. package/dist/module.d.ts +44 -26
  15. package/dist/module.json +2 -2
  16. package/dist/module.mjs +152 -98
  17. package/dist/runtime/cache.d.ts +7 -10
  18. package/dist/runtime/cache.mjs +40 -27
  19. package/dist/runtime/components/OgImage/OgImage.d.ts +5 -0
  20. package/dist/runtime/components/OgImage/{index.mjs → OgImage.mjs} +1 -1
  21. package/dist/runtime/components/OgImage/OgImageScreenshot.d.ts +5 -0
  22. package/dist/runtime/components/OgImage/{Screenshot.mjs → OgImageScreenshot.mjs} +1 -1
  23. package/dist/runtime/components/Templates/{Official → Community}/BrandedLogo.vue +3 -2
  24. package/dist/runtime/components/Templates/Community/Nuxt.vue +6 -5
  25. package/dist/runtime/components/Templates/Community/NuxtSeo.vue +137 -0
  26. package/dist/runtime/components/Templates/{Official → Community}/SimpleBlog.vue +7 -5
  27. package/dist/runtime/components/Templates/Community/UnJs.vue +108 -0
  28. package/dist/runtime/components/Templates/{Official → Community}/Wave.vue +3 -2
  29. package/dist/runtime/components/Templates/{Official → Community}/WithEmoji.vue +3 -2
  30. package/dist/runtime/composables/defineOgImage.d.ts +2 -23
  31. package/dist/runtime/composables/defineOgImage.mjs +33 -116
  32. package/dist/runtime/composables/defineOgImageComponent.d.ts +3 -0
  33. package/dist/runtime/composables/defineOgImageComponent.mjs +8 -0
  34. package/dist/runtime/composables/defineOgImageScreenshot.d.ts +2 -0
  35. package/dist/runtime/composables/defineOgImageScreenshot.mjs +14 -0
  36. package/dist/runtime/core/bindings/css-inline/node.d.ts +2 -5
  37. package/dist/runtime/core/bindings/css-inline/node.mjs +2 -10
  38. package/dist/runtime/core/bindings/resvg/stackblitz.d.ts +40 -0
  39. package/dist/runtime/core/bindings/resvg/stackblitz.mjs +6 -0
  40. package/dist/runtime/core/bindings/resvg/wasm.mjs +2 -3
  41. package/dist/runtime/core/bindings/satori/stackblitz.mjs +13 -0
  42. package/dist/runtime/core/bindings/satori/wasm.d.ts +6 -0
  43. package/dist/runtime/core/bindings/satori/wasm.mjs +14 -0
  44. package/dist/runtime/core/cache/emojis.d.ts +1 -0
  45. package/dist/runtime/core/cache/emojis.mjs +5 -0
  46. package/dist/runtime/core/cache/htmlPayload.d.ts +5 -0
  47. package/dist/runtime/core/cache/htmlPayload.mjs +6 -0
  48. package/dist/runtime/core/cache/prerender.d.ts +1 -1
  49. package/dist/runtime/core/font/fetch.d.ts +2 -3
  50. package/dist/runtime/core/font/fetch.mjs +20 -8
  51. package/dist/runtime/core/html/applyEmojis.d.ts +3 -0
  52. package/dist/runtime/core/html/applyEmojis.mjs +37 -0
  53. package/dist/runtime/core/html/applyInlineCss.d.ts +3 -0
  54. package/dist/runtime/core/html/applyInlineCss.mjs +32 -0
  55. package/dist/runtime/core/html/devIframeTemplate.d.ts +2 -0
  56. package/dist/runtime/core/html/{fetch.mjs → devIframeTemplate.mjs} +33 -42
  57. package/dist/runtime/core/html/fetchIsland.d.ts +3 -0
  58. package/dist/runtime/core/html/fetchIsland.mjs +17 -0
  59. package/dist/runtime/core/options/fetch.d.ts +1 -1
  60. package/dist/runtime/core/options/fetch.mjs +10 -5
  61. package/dist/runtime/core/options/normalise.d.ts +2 -2
  62. package/dist/runtime/core/options/normalise.mjs +3 -2
  63. package/dist/runtime/core/renderers/chromium/index.mjs +6 -7
  64. package/dist/runtime/core/renderers/chromium/screenshot.d.ts +2 -3
  65. package/dist/runtime/core/renderers/chromium/screenshot.mjs +5 -4
  66. package/dist/runtime/core/renderers/satori/fonts.d.ts +2 -2
  67. package/dist/runtime/core/renderers/satori/fonts.mjs +2 -2
  68. package/dist/runtime/core/renderers/satori/index.d.ts +2 -3
  69. package/dist/runtime/core/renderers/satori/index.mjs +25 -22
  70. package/dist/runtime/core/renderers/satori/instances.d.ts +3 -0
  71. package/dist/runtime/core/renderers/satori/instances.mjs +15 -0
  72. package/dist/runtime/core/renderers/satori/plugins/emojis.mjs +15 -13
  73. package/dist/runtime/core/renderers/satori/plugins/imageSrc.mjs +8 -4
  74. package/dist/runtime/core/renderers/satori/plugins/unocss.d.ts +2 -0
  75. package/dist/runtime/core/renderers/satori/plugins/unocss.mjs +38 -0
  76. package/dist/runtime/core/renderers/satori/utils.d.ts +2 -3
  77. package/dist/runtime/core/renderers/satori/vnodes.d.ts +2 -3
  78. package/dist/runtime/core/renderers/satori/vnodes.mjs +16 -6
  79. package/dist/runtime/core/utils/resolveRendererContext.d.ts +2 -6
  80. package/dist/runtime/core/utils/resolveRendererContext.mjs +46 -23
  81. package/dist/runtime/core/utils/wasm.d.ts +3 -0
  82. package/dist/runtime/core/utils/wasm.mjs +16 -0
  83. package/dist/runtime/nitro/plugins/nuxt-content.mjs +3 -4
  84. package/dist/runtime/nitro/plugins/prerender.d.ts +1 -1
  85. package/dist/runtime/nitro/plugins/prerender.mjs +13 -5
  86. package/dist/runtime/nuxt/plugins/og-image-canonical-urls.server.mjs +31 -0
  87. package/dist/runtime/nuxt/plugins/route-rule-og-image.server.mjs +16 -50
  88. package/dist/runtime/nuxt/utils.d.ts +2 -0
  89. package/dist/runtime/nuxt/utils.mjs +53 -0
  90. package/dist/runtime/server/routes/__og-image__/debug.json.d.ts +1 -3
  91. package/dist/runtime/server/routes/__og-image__/debug.json.mjs +4 -8
  92. package/dist/runtime/server/routes/__og-image__/image.mjs +87 -0
  93. package/dist/runtime/types.d.ts +74 -25
  94. package/dist/runtime/utils.d.ts +4 -0
  95. package/dist/runtime/utils.mjs +11 -0
  96. package/dist/runtime/utils.pure.d.ts +5 -0
  97. package/dist/runtime/utils.pure.mjs +43 -0
  98. package/package.json +27 -29
  99. package/virtual.d.ts +49 -0
  100. package/dist/client/_nuxt/IconCSS.8f429b14.css +0 -1
  101. package/dist/client/_nuxt/builds/meta/af7b6f15-8224-4a19-bb3a-f685b2b145c3.json +0 -1
  102. package/dist/client/_nuxt/entry.434c2c45.css +0 -1
  103. package/dist/client/_nuxt/entry.8ea61ef1.js +0 -137
  104. package/dist/client/grid.png +0 -0
  105. package/dist/runtime/components/OgImage/Cached.d.ts +0 -5
  106. package/dist/runtime/components/OgImage/Cached.mjs +0 -10
  107. package/dist/runtime/components/OgImage/Dynamic.d.ts +0 -8
  108. package/dist/runtime/components/OgImage/Dynamic.mjs +0 -10
  109. package/dist/runtime/components/OgImage/Screenshot.d.ts +0 -6
  110. package/dist/runtime/components/OgImage/Static.d.ts +0 -8
  111. package/dist/runtime/components/OgImage/Static.mjs +0 -10
  112. package/dist/runtime/components/OgImage/WithoutCache.d.ts +0 -5
  113. package/dist/runtime/components/OgImage/WithoutCache.mjs +0 -10
  114. package/dist/runtime/components/OgImage/index.d.ts +0 -5
  115. package/dist/runtime/components/Templates/Official/Fallback.vue +0 -147
  116. package/dist/runtime/core/bindings/css-inline/mock.d.ts +0 -5
  117. package/dist/runtime/core/bindings/css-inline/mock.mjs +0 -3
  118. package/dist/runtime/core/bindings/satori/yoga-wasm.mjs +0 -7
  119. package/dist/runtime/core/bindings/sharp/wasm.d.ts +0 -2
  120. package/dist/runtime/core/bindings/sharp/wasm.mjs +0 -2
  121. package/dist/runtime/core/html/fetch.d.ts +0 -3
  122. package/dist/runtime/nuxt/plugins/nuxt-content-canonical-urls.mjs +0 -29
  123. package/dist/runtime/server/routes/__og-image__/image-[path]-og.[extension].mjs +0 -45
  124. package/dist/runtime/utilts.d.ts +0 -2
  125. package/dist/runtime/utilts.mjs +0 -8
  126. /package/dist/runtime/core/bindings/satori/{yoga-wasm.d.ts → stackblitz.d.ts} +0 -0
  127. /package/dist/runtime/nuxt/plugins/{nuxt-content-canonical-urls.d.ts → og-image-canonical-urls.server.d.ts} +0 -0
  128. /package/dist/runtime/server/routes/__og-image__/{image-[path]-og.[extension].d.ts → image.d.ts} +0 -0
package/README.md CHANGED
@@ -32,9 +32,9 @@ Generate OG Images with Vue templates in Nuxt.
32
32
 
33
33
  ## Features
34
34
 
35
- - ✨ Turn your Vue components into `og:image` templates
36
- - 🎨 Design them in the OG Image Playground with full HMR
37
- - ▲ Render using [Satori](https://github.com/vercel/satori): Tailwind classes, Google fonts, emoji support and more!
35
+ - ✨ Create an `og:image` using the built-in templates or make your own with Vue components
36
+ - 🎨 Design and test your `og:image` in the Nuxt DevTools OG Image Playground with full HMR
37
+ - ▲ Render using [Satori](https://github.com/vercel/satori): Tailwind / UnoCSS with your theme, Google fonts, 6 emoji families supported and more!
38
38
  - 🤖 Or prerender using the Browser: Supporting painless, complex templates
39
39
  - 📸 Feeling lazy? Just generate screenshots for every page: hide elements, wait for animations, and more
40
40
  - ⚙️ Works on the edge: Vercel Edge, Netlify Edge and Cloudflare Workers
@@ -2,13 +2,13 @@
2
2
  <html >
3
3
  <head><meta charset="utf-8">
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1">
5
- <link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.434c2c45.css">
6
- <link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.8ea61ef1.js">
5
+ <link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.f47d0628.css">
6
+ <link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.5625a982.js">
7
7
  <link rel="prefetch" as="style" href="/__nuxt-og-image/_nuxt/error-404.b751fa02.css">
8
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.b1c8e4c8.js">
8
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.ab2243fa.js">
9
9
  <link rel="prefetch" as="style" href="/__nuxt-og-image/_nuxt/error-500.69009e70.css">
10
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-500.6b97e3ab.js">
11
- <script type="module" src="/__nuxt-og-image/_nuxt/entry.8ea61ef1.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
10
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-500.9440311e.js">
11
+ <script type="module" src="/__nuxt-og-image/_nuxt/entry.5625a982.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
12
12
  </script></head>
13
13
  <body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script>
14
14
  <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
@@ -2,13 +2,13 @@
2
2
  <html >
3
3
  <head><meta charset="utf-8">
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1">
5
- <link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.434c2c45.css">
6
- <link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.8ea61ef1.js">
5
+ <link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.f47d0628.css">
6
+ <link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.5625a982.js">
7
7
  <link rel="prefetch" as="style" href="/__nuxt-og-image/_nuxt/error-404.b751fa02.css">
8
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.b1c8e4c8.js">
8
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.ab2243fa.js">
9
9
  <link rel="prefetch" as="style" href="/__nuxt-og-image/_nuxt/error-500.69009e70.css">
10
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-500.6b97e3ab.js">
11
- <script type="module" src="/__nuxt-og-image/_nuxt/entry.8ea61ef1.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
10
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-500.9440311e.js">
11
+ <script type="module" src="/__nuxt-og-image/_nuxt/entry.5625a982.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
12
12
  </script></head>
13
13
  <body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script>
14
14
  <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
@@ -1 +1 @@
1
- import{g as _,h as m,i as f,j as c,r as d,o as I,c as v,n as x,_ as S}from"./entry.8ea61ef1.js";const y=_({__name:"IconCSS",props:{name:{type:String,required:!0},size:{type:String,default:""}},setup(u){m(e=>({f4b1dbd8:p.value}));const t=f(),s=u,l=c(()=>{var e,n;return(n=(e=t.nuxtIcon)==null?void 0:e.aliases)!=null&&n[s.name]?t.nuxtIcon.aliases[s.name]:s.name}),r=c(()=>d(l.value)),p=c(()=>{var o,a;const e=(a=(o=t.nuxtIcon)==null?void 0:o.iconifyApiOptions)==null?void 0:a.url;if(e)try{new URL(e)}catch{console.warn("Nuxt IconCSS: Invalid custom Iconify API URL");return}return`url('${e||"https://api.iconify.design"}/${r.value.prefix}/${r.value.name}.svg')`}),i=c(()=>{var n,o,a;if(!s.size&&typeof((n=t.nuxtIcon)==null?void 0:n.size)=="boolean"&&!((o=t.nuxtIcon)!=null&&o.size))return;const e=s.size||((a=t.nuxtIcon)==null?void 0:a.size)||"1em";return String(Number(e))===e?`${e}px`:e});return(e,n)=>(I(),v("span",{style:x({width:i.value,height:i.value})},null,4))}});const C=S(y,[["__scopeId","data-v-2408e4e8"]]);export{C as default};
1
+ import{g as _,h as f,i as m,j as c,r as d,o as I,c as v,n as x,_ as S}from"./entry.5625a982.js";const y=_({__name:"IconCSS",props:{name:{type:String,required:!0},size:{type:String,default:""}},setup(u){f(e=>({79268360:p.value}));const t=m(),s=u,l=c(()=>{var e,n;return(n=(e=t.nuxtIcon)==null?void 0:e.aliases)!=null&&n[s.name]?t.nuxtIcon.aliases[s.name]:s.name}),r=c(()=>d(l.value)),p=c(()=>{var o,a;const e=(a=(o=t.nuxtIcon)==null?void 0:o.iconifyApiOptions)==null?void 0:a.url;if(e)try{new URL(e)}catch{console.warn("Nuxt IconCSS: Invalid custom Iconify API URL");return}return`url('${e||"https://api.iconify.design"}/${r.value.prefix}/${r.value.name}.svg')`}),i=c(()=>{var n,o,a;if(!s.size&&typeof((n=t.nuxtIcon)==null?void 0:n.size)=="boolean"&&!((o=t.nuxtIcon)!=null&&o.size))return;const e=s.size||((a=t.nuxtIcon)==null?void 0:a.size)||"1em";return String(Number(e))===e?`${e}px`:e});return(e,n)=>(I(),v("span",{style:x({width:i.value,height:i.value})},null,4))}});const b=S(y,[["__scopeId","data-v-6fdb97b6"]]);export{b as default};
@@ -0,0 +1 @@
1
+ span[data-v-6fdb97b6]{background-color:currentColor;display:inline-block;-webkit-mask-image:var(--79268360);mask-image:var(--79268360);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle}
@@ -1 +1 @@
1
- {"id":"af7b6f15-8224-4a19-bb3a-f685b2b145c3","timestamp":1701182903781}
1
+ {"id":"eb64321b-b694-4f04-b8be-8bfdecc73293","timestamp":1701698516427}
@@ -0,0 +1 @@
1
+ {"id":"eb64321b-b694-4f04-b8be-8bfdecc73293","timestamp":1701698516427,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}