nuxt-og-image 3.0.0-beta.5 → 3.0.0-beta.50

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 (138) hide show
  1. package/README.md +4 -4
  2. package/dist/client/200.html +5 -5
  3. package/dist/client/404.html +5 -5
  4. package/dist/client/_nuxt/IconCSS.4bbe2613.css +1 -0
  5. package/dist/client/_nuxt/IconCSS.d8f7e776.js +1 -0
  6. package/dist/client/_nuxt/builds/latest.json +1 -1
  7. package/dist/client/_nuxt/builds/meta/f9e0dbe6-38fd-47dd-8f6b-48b4397277f5.json +1 -0
  8. package/dist/client/_nuxt/entry.33a59bbf.css +1 -0
  9. package/dist/client/_nuxt/entry.38814731.js +138 -0
  10. package/dist/client/_nuxt/{error-404.b07f263f.js → error-404.7bf54a75.js} +1 -1
  11. package/dist/client/_nuxt/{error-500.ed41d8f2.js → error-500.f7cb671d.js} +1 -1
  12. package/dist/client/index.html +5 -5
  13. package/dist/module.d.mts +55 -46
  14. package/dist/module.d.ts +55 -46
  15. package/dist/module.json +2 -2
  16. package/dist/module.mjs +306 -162
  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/Community/Pergel.vue +104 -0
  27. package/dist/runtime/components/Templates/{Official → Community}/SimpleBlog.vue +7 -5
  28. package/dist/runtime/components/Templates/Community/UnJs.vue +108 -0
  29. package/dist/runtime/components/Templates/{Official → Community}/Wave.vue +3 -2
  30. package/dist/runtime/components/Templates/{Official → Community}/WithEmoji.vue +3 -2
  31. package/dist/runtime/composables/defineOgImage.d.ts +2 -23
  32. package/dist/runtime/composables/defineOgImage.mjs +33 -117
  33. package/dist/runtime/composables/defineOgImageComponent.d.ts +3 -0
  34. package/dist/runtime/composables/defineOgImageComponent.mjs +8 -0
  35. package/dist/runtime/composables/defineOgImageScreenshot.d.ts +2 -0
  36. package/dist/runtime/composables/defineOgImageScreenshot.mjs +13 -0
  37. package/dist/runtime/core/bindings/css-inline/node.d.ts +2 -5
  38. package/dist/runtime/core/bindings/css-inline/node.mjs +2 -10
  39. package/dist/runtime/core/bindings/resvg/wasm-fs.d.ts +40 -0
  40. package/dist/runtime/core/bindings/resvg/wasm-fs.mjs +6 -0
  41. package/dist/runtime/core/bindings/resvg/wasm.mjs +2 -2
  42. package/dist/runtime/core/bindings/satori/wasm-fs.mjs +13 -0
  43. package/dist/runtime/core/bindings/satori/wasm.d.ts +6 -0
  44. package/dist/runtime/core/bindings/satori/wasm.mjs +14 -0
  45. package/dist/runtime/core/cache/emojis.d.ts +1 -0
  46. package/dist/runtime/core/cache/emojis.mjs +5 -0
  47. package/dist/runtime/core/cache/htmlPayload.d.ts +5 -0
  48. package/dist/runtime/core/cache/htmlPayload.mjs +6 -0
  49. package/dist/runtime/core/cache/prerender.d.ts +1 -1
  50. package/dist/runtime/core/cache/prerender.mjs +1 -1
  51. package/dist/runtime/core/env/assets.d.ts +0 -1
  52. package/dist/runtime/core/env/assets.mjs +0 -4
  53. package/dist/runtime/core/font/fetch.d.ts +2 -3
  54. package/dist/runtime/core/font/fetch.mjs +32 -15
  55. package/dist/runtime/core/html/applyEmojis.d.ts +3 -0
  56. package/dist/runtime/core/html/applyEmojis.mjs +37 -0
  57. package/dist/runtime/core/html/applyInlineCss.d.ts +3 -0
  58. package/dist/runtime/core/html/applyInlineCss.mjs +32 -0
  59. package/dist/runtime/core/html/devIframeTemplate.d.ts +2 -0
  60. package/dist/runtime/core/html/{fetch.mjs → devIframeTemplate.mjs} +33 -42
  61. package/dist/runtime/core/html/fetchIsland.d.ts +3 -0
  62. package/dist/runtime/core/html/fetchIsland.mjs +17 -0
  63. package/dist/runtime/core/options/fetch.d.ts +1 -1
  64. package/dist/runtime/core/options/fetch.mjs +10 -5
  65. package/dist/runtime/core/renderers/chromium/index.mjs +16 -13
  66. package/dist/runtime/core/renderers/chromium/screenshot.d.ts +2 -3
  67. package/dist/runtime/core/renderers/chromium/screenshot.mjs +18 -13
  68. package/dist/runtime/core/renderers/satori/fonts.d.ts +2 -2
  69. package/dist/runtime/core/renderers/satori/fonts.mjs +2 -2
  70. package/dist/runtime/core/renderers/satori/index.d.ts +2 -3
  71. package/dist/runtime/core/renderers/satori/index.mjs +26 -22
  72. package/dist/runtime/core/renderers/satori/instances.d.ts +3 -0
  73. package/dist/runtime/core/renderers/satori/instances.mjs +15 -0
  74. package/dist/runtime/core/renderers/satori/plugins/emojis.mjs +15 -13
  75. package/dist/runtime/core/renderers/satori/plugins/imageSrc.mjs +23 -10
  76. package/dist/runtime/core/renderers/satori/plugins/unocss.d.ts +2 -0
  77. package/dist/runtime/core/renderers/satori/plugins/unocss.mjs +45 -0
  78. package/dist/runtime/core/renderers/satori/utils.d.ts +2 -3
  79. package/dist/runtime/core/renderers/satori/vnodes.d.ts +2 -3
  80. package/dist/runtime/core/renderers/satori/vnodes.mjs +16 -6
  81. package/dist/runtime/core/utils/resolveRendererContext.d.ts +2 -6
  82. package/dist/runtime/core/utils/resolveRendererContext.mjs +47 -29
  83. package/dist/runtime/core/utils/wasm.d.ts +3 -0
  84. package/dist/runtime/core/utils/wasm.mjs +16 -0
  85. package/dist/runtime/nitro/plugins/nuxt-content.mjs +3 -4
  86. package/dist/runtime/nitro/plugins/prerender.d.ts +1 -1
  87. package/dist/runtime/nitro/plugins/prerender.mjs +22 -14
  88. package/dist/runtime/nitro/utils.d.ts +2 -0
  89. package/dist/runtime/nitro/utils.mjs +17 -0
  90. package/dist/runtime/nuxt/plugins/og-image-canonical-urls.server.mjs +31 -0
  91. package/dist/runtime/nuxt/plugins/route-rule-og-image.server.mjs +16 -51
  92. package/dist/runtime/nuxt/utils.d.ts +3 -0
  93. package/dist/runtime/nuxt/utils.mjs +69 -0
  94. package/dist/runtime/server/routes/__og-image__/debug.json.d.ts +2 -3
  95. package/dist/runtime/server/routes/__og-image__/debug.json.mjs +5 -7
  96. package/dist/runtime/server/routes/__og-image__/image.mjs +88 -0
  97. package/dist/runtime/types.d.ts +89 -25
  98. package/dist/runtime/utils.d.ts +4 -0
  99. package/dist/runtime/utils.mjs +11 -0
  100. package/dist/runtime/utils.pure.d.ts +5 -0
  101. package/dist/runtime/utils.pure.mjs +43 -0
  102. package/package.json +30 -31
  103. package/virtual.d.ts +49 -0
  104. package/dist/client/_nuxt/IconCSS.8f429b14.css +0 -1
  105. package/dist/client/_nuxt/IconCSS.b16882c0.js +0 -1
  106. package/dist/client/_nuxt/builds/meta/df74ddc4-3ccb-4ada-8e61-014943e6befc.json +0 -1
  107. package/dist/client/_nuxt/entry.434c2c45.css +0 -1
  108. package/dist/client/_nuxt/entry.d4edd2a5.js +0 -137
  109. package/dist/client/grid.png +0 -0
  110. package/dist/runtime/components/OgImage/Cached.d.ts +0 -5
  111. package/dist/runtime/components/OgImage/Cached.mjs +0 -10
  112. package/dist/runtime/components/OgImage/Dynamic.d.ts +0 -8
  113. package/dist/runtime/components/OgImage/Dynamic.mjs +0 -10
  114. package/dist/runtime/components/OgImage/Screenshot.d.ts +0 -6
  115. package/dist/runtime/components/OgImage/Static.d.ts +0 -8
  116. package/dist/runtime/components/OgImage/Static.mjs +0 -10
  117. package/dist/runtime/components/OgImage/WithoutCache.d.ts +0 -5
  118. package/dist/runtime/components/OgImage/WithoutCache.mjs +0 -10
  119. package/dist/runtime/components/OgImage/index.d.ts +0 -5
  120. package/dist/runtime/components/Templates/Official/Fallback.vue +0 -147
  121. package/dist/runtime/core/bindings/css-inline/mock.d.ts +0 -5
  122. package/dist/runtime/core/bindings/css-inline/mock.mjs +0 -3
  123. package/dist/runtime/core/bindings/satori/yoga-wasm.mjs +0 -7
  124. package/dist/runtime/core/bindings/sharp/wasm.d.ts +0 -2
  125. package/dist/runtime/core/bindings/sharp/wasm.mjs +0 -2
  126. package/dist/runtime/core/html/fetch.d.ts +0 -3
  127. package/dist/runtime/core/options/normalise.d.ts +0 -2
  128. package/dist/runtime/core/options/normalise.mjs +0 -26
  129. package/dist/runtime/nuxt/plugins/nuxt-content-canonical-urls.mjs +0 -29
  130. package/dist/runtime/public-assets/__nuxt_og_image__/browser-provider-not-supported.png +0 -0
  131. package/dist/runtime/server/routes/__og-image__/image-[path]-og.[extension].mjs +0 -45
  132. package/dist/runtime/utilts.d.ts +0 -2
  133. package/dist/runtime/utilts.mjs +0 -8
  134. /package/dist/runtime/core/bindings/satori/{yoga-wasm.d.ts → wasm-fs.d.ts} +0 -0
  135. /package/dist/runtime/nuxt/plugins/{nuxt-content-canonical-urls.d.ts → og-image-canonical-urls.server.d.ts} +0 -0
  136. /package/dist/runtime/{public-assets-optional/inter-font → server/assets}/inter-latin-ext-400-normal.woff +0 -0
  137. /package/dist/runtime/{public-assets-optional/inter-font → server/assets}/inter-latin-ext-700-normal.woff +0 -0
  138. /package/dist/runtime/server/routes/__og-image__/{image-[path]-og.[extension].d.ts → image.d.ts} +0 -0
@@ -1 +1 @@
1
- import{_ as a,u as n,o as r,c as l,a as e,t as s,b as d,w as c,d as p,e as f,p as x,f as h}from"./entry.d4edd2a5.js";const m=t=>(x("data-v-05a2b8a3"),t=t(),h(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=m(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),b={class:"max-w-520px text-center z-20"},_=["textContent"],w=["textContent"],y={class:"w-full flex items-center justify-center"},S={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return n({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(k,v)=>{const i=f;return r(),l("div",u,[g,e("div",b,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,_),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,w),e("div",y,[d(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:c(()=>[p(s(t.backHome),1)]),_:1})])])])}}},z=a(S,[["__scopeId","data-v-05a2b8a3"]]);export{z as default};
1
+ import{_ as a,u as n,o as r,c as l,a as e,t as s,b as d,w as c,d as p,e as f,p as x,f as h}from"./entry.38814731.js";const m=t=>(x("data-v-05a2b8a3"),t=t(),h(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=m(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),b={class:"max-w-520px text-center z-20"},_=["textContent"],w=["textContent"],y={class:"w-full flex items-center justify-center"},S={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return n({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(k,v)=>{const i=f;return r(),l("div",u,[g,e("div",b,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,_),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,w),e("div",y,[d(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:c(()=>[p(s(t.backHome),1)]),_:1})])])])}}},z=a(S,[["__scopeId","data-v-05a2b8a3"]]);export{z as default};
@@ -1 +1 @@
1
- import{_ as i,u as a,o as r,c as n,a as e,t as s,p as l,f as d}from"./entry.d4edd2a5.js";const c=t=>(l("data-v-c967d9a9"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},g=["textContent"],m=["textContent"],x={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(u,b)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,m)])]))}},w=i(x,[["__scopeId","data-v-c967d9a9"]]);export{w as default};
1
+ import{_ as i,u as a,o as r,c as n,a as e,t as s,p as l,f as d}from"./entry.38814731.js";const c=t=>(l("data-v-c967d9a9"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},g=["textContent"],m=["textContent"],x={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(u,b)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,m)])]))}},w=i(x,[["__scopeId","data-v-c967d9a9"]]);export{w as default};
@@ -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.d4edd2a5.js">
5
+ <link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.33a59bbf.css">
6
+ <link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.38814731.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.b07f263f.js">
8
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.7bf54a75.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.ed41d8f2.js">
11
- <script type="module" src="/__nuxt-og-image/_nuxt/entry.d4edd2a5.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.f7cb671d.js">
11
+ <script type="module" src="/__nuxt-og-image/_nuxt/entry.38814731.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>
package/dist/module.d.mts CHANGED
@@ -2,13 +2,16 @@ import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { SatoriOptions } from 'satori';
3
3
  import { ResvgRenderOptions } from '@resvg/resvg-js';
4
4
  import { SharpOptions } from 'sharp';
5
+ import { WasmOptions } from 'nitropack';
6
+ import { OgImageComponents } from '#nuxt-og-image/components';
5
7
 
8
+ type IconifyEmojiIconSets = 'twemoji' | 'noto' | 'fluent-emoji' | 'fluent-emoji-flat' | 'fluent-emoji-high-contrast' | 'noto-v1' | 'emojione' | 'emojione-monotone' | 'emojione-v1' | 'streamline-emojis' | 'openmoji';
6
9
  interface OgImageComponent {
7
10
  path?: string;
8
11
  pascalName: string;
9
12
  kebabName: string;
10
13
  hash: string;
11
- category: 'app' | 'official' | 'community' | 'pro';
14
+ category: 'app' | 'community' | 'pro';
12
15
  credits?: string;
13
16
  }
14
17
  interface ScreenshotOptions {
@@ -32,45 +35,70 @@ interface ScreenshotOptions {
32
35
  */
33
36
  delay?: number;
34
37
  }
35
- interface OgImageOptions extends Partial<ScreenshotOptions> {
36
- component?: string;
37
- renderer?: 'chromium' | 'satori';
38
- extension?: 'png' | 'jpeg' | 'jpg';
38
+ interface OgImageOptions<T extends keyof OgImageComponents = 'NuxtSeo'> {
39
+ /**
40
+ * The width of the screenshot.
41
+ *
42
+ * @default 1200
43
+ */
44
+ width?: number;
45
+ /**
46
+ * The height of the screenshot.
47
+ *
48
+ * @default 630
49
+ */
50
+ height?: number;
51
+ /**
52
+ * The alt text for the image.
53
+ */
54
+ alt?: string;
55
+ /**
56
+ * Use a prebuilt image instead of generating one.
57
+ *
58
+ * Should be an absolute URL.
59
+ */
60
+ url?: string;
61
+ /**
62
+ * The name of the component to render.
63
+ */
64
+ component?: T | string;
39
65
  /**
40
- * @deprecated use renderer. Replace `browser` with `chromium`
66
+ * Props to pass to the component.
41
67
  */
42
- provider?: 'browser' | 'satori';
68
+ props?: OgImageComponents[T] | Record<string, any>;
69
+ renderer?: 'chromium' | 'satori';
70
+ extension?: 'png' | 'jpeg' | 'jpg';
71
+ emojis?: IconifyEmojiIconSets;
43
72
  /**
44
73
  * Provide a static HTML template to render the OG Image instead of a component.
45
74
  */
46
75
  html?: string;
47
- cache?: boolean;
48
- cacheKey?: string;
49
76
  resvg?: ResvgRenderOptions;
50
77
  satori?: SatoriOptions;
51
- /**
52
- * The time to live of the cache in milliseconds.
53
- */
54
- cacheTtl?: number;
55
- [key: string]: any;
78
+ screenshot?: Partial<ScreenshotOptions>;
79
+ sharp?: SharpOptions;
80
+ cacheMaxAgeSeconds?: number;
56
81
  }
57
82
  interface FontConfig {
58
83
  name: string;
59
84
  weight: string | number;
60
85
  path?: string;
86
+ key?: string;
61
87
  }
62
88
  type InputFontConfig = (`${string}:${number}` | FontConfig);
63
-
64
89
  interface RuntimeCompatibilitySchema {
65
- bindings: {
66
- chromium: 'node' | false;
67
- ['css-inline']: 'node' | false;
68
- resvg: 'node' | 'wasm' | false;
69
- satori: 'node' | 'yoga-wasm' | false;
70
- sharp: 'node' | 'lambda' | false;
71
- };
72
- wasmStrategy?: 'inline' | 'import' | 'fetch';
73
- wasmImportQuery?: string;
90
+ chromium: 'node' | false;
91
+ ['css-inline']: 'node' | false;
92
+ resvg: 'node' | 'wasm' | 'wasm-fs' | false;
93
+ satori: 'node' | 'wasm' | 'wasm-fs' | false;
94
+ sharp: 'node' | false;
95
+ wasm?: WasmOptions;
96
+ }
97
+ type CompatibilityFlags = Partial<Omit<RuntimeCompatibilitySchema, 'wasm'>>;
98
+ interface CompatibilityFlagEnvOverrides {
99
+ dev?: CompatibilityFlags;
100
+ runtime?: CompatibilityFlags;
101
+ prerender?: CompatibilityFlags;
74
102
  }
75
103
 
76
104
  interface ModuleOptions {
@@ -112,25 +140,6 @@ interface ModuleOptions {
112
140
  * @see https://sharp.pixelplumbing.com/api-constructor
113
141
  */
114
142
  sharpOptions?: Partial<SharpOptions>;
115
- /**
116
- * Should the playground at <path>/__og_image__ be enabled in development.
117
- *
118
- * @default true
119
- */
120
- playground: boolean;
121
- /**
122
- * Include Satori runtime.
123
- *
124
- * @default true
125
- */
126
- runtimeSatori: boolean;
127
- /**
128
- * Include the Browser runtime.
129
- * This will need to be manually enabled for production environments.
130
- *
131
- * @default `process.dev`
132
- */
133
- runtimeBrowser: boolean;
134
143
  /**
135
144
  * Enables debug logs and a debug endpoint.
136
145
  *
@@ -158,15 +167,15 @@ interface ModuleOptions {
158
167
  */
159
168
  componentDirs: string[];
160
169
  /**
161
- * Manually modify the deployment compatibility.
170
+ * Manually modify the compatibility.
162
171
  */
163
- runtimeCompatibility?: RuntimeCompatibilitySchema;
172
+ compatibility?: CompatibilityFlagEnvOverrides;
164
173
  }
165
174
  interface ModuleHooks {
166
175
  'nuxt-og-image:components': (ctx: {
167
176
  components: OgImageComponent[];
168
177
  }) => Promise<void> | void;
169
- 'og-image:config': (config: ModuleOptions) => Promise<void> | void;
178
+ 'nuxt-og-image:runtime-config': (config: ModuleOptions) => Promise<void> | void;
170
179
  }
171
180
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
172
181
 
package/dist/module.d.ts CHANGED
@@ -2,13 +2,16 @@ import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { SatoriOptions } from 'satori';
3
3
  import { ResvgRenderOptions } from '@resvg/resvg-js';
4
4
  import { SharpOptions } from 'sharp';
5
+ import { WasmOptions } from 'nitropack';
6
+ import { OgImageComponents } from '#nuxt-og-image/components';
5
7
 
8
+ type IconifyEmojiIconSets = 'twemoji' | 'noto' | 'fluent-emoji' | 'fluent-emoji-flat' | 'fluent-emoji-high-contrast' | 'noto-v1' | 'emojione' | 'emojione-monotone' | 'emojione-v1' | 'streamline-emojis' | 'openmoji';
6
9
  interface OgImageComponent {
7
10
  path?: string;
8
11
  pascalName: string;
9
12
  kebabName: string;
10
13
  hash: string;
11
- category: 'app' | 'official' | 'community' | 'pro';
14
+ category: 'app' | 'community' | 'pro';
12
15
  credits?: string;
13
16
  }
14
17
  interface ScreenshotOptions {
@@ -32,45 +35,70 @@ interface ScreenshotOptions {
32
35
  */
33
36
  delay?: number;
34
37
  }
35
- interface OgImageOptions extends Partial<ScreenshotOptions> {
36
- component?: string;
37
- renderer?: 'chromium' | 'satori';
38
- extension?: 'png' | 'jpeg' | 'jpg';
38
+ interface OgImageOptions<T extends keyof OgImageComponents = 'NuxtSeo'> {
39
+ /**
40
+ * The width of the screenshot.
41
+ *
42
+ * @default 1200
43
+ */
44
+ width?: number;
45
+ /**
46
+ * The height of the screenshot.
47
+ *
48
+ * @default 630
49
+ */
50
+ height?: number;
51
+ /**
52
+ * The alt text for the image.
53
+ */
54
+ alt?: string;
55
+ /**
56
+ * Use a prebuilt image instead of generating one.
57
+ *
58
+ * Should be an absolute URL.
59
+ */
60
+ url?: string;
61
+ /**
62
+ * The name of the component to render.
63
+ */
64
+ component?: T | string;
39
65
  /**
40
- * @deprecated use renderer. Replace `browser` with `chromium`
66
+ * Props to pass to the component.
41
67
  */
42
- provider?: 'browser' | 'satori';
68
+ props?: OgImageComponents[T] | Record<string, any>;
69
+ renderer?: 'chromium' | 'satori';
70
+ extension?: 'png' | 'jpeg' | 'jpg';
71
+ emojis?: IconifyEmojiIconSets;
43
72
  /**
44
73
  * Provide a static HTML template to render the OG Image instead of a component.
45
74
  */
46
75
  html?: string;
47
- cache?: boolean;
48
- cacheKey?: string;
49
76
  resvg?: ResvgRenderOptions;
50
77
  satori?: SatoriOptions;
51
- /**
52
- * The time to live of the cache in milliseconds.
53
- */
54
- cacheTtl?: number;
55
- [key: string]: any;
78
+ screenshot?: Partial<ScreenshotOptions>;
79
+ sharp?: SharpOptions;
80
+ cacheMaxAgeSeconds?: number;
56
81
  }
57
82
  interface FontConfig {
58
83
  name: string;
59
84
  weight: string | number;
60
85
  path?: string;
86
+ key?: string;
61
87
  }
62
88
  type InputFontConfig = (`${string}:${number}` | FontConfig);
63
-
64
89
  interface RuntimeCompatibilitySchema {
65
- bindings: {
66
- chromium: 'node' | false;
67
- ['css-inline']: 'node' | false;
68
- resvg: 'node' | 'wasm' | false;
69
- satori: 'node' | 'yoga-wasm' | false;
70
- sharp: 'node' | 'lambda' | false;
71
- };
72
- wasmStrategy?: 'inline' | 'import' | 'fetch';
73
- wasmImportQuery?: string;
90
+ chromium: 'node' | false;
91
+ ['css-inline']: 'node' | false;
92
+ resvg: 'node' | 'wasm' | 'wasm-fs' | false;
93
+ satori: 'node' | 'wasm' | 'wasm-fs' | false;
94
+ sharp: 'node' | false;
95
+ wasm?: WasmOptions;
96
+ }
97
+ type CompatibilityFlags = Partial<Omit<RuntimeCompatibilitySchema, 'wasm'>>;
98
+ interface CompatibilityFlagEnvOverrides {
99
+ dev?: CompatibilityFlags;
100
+ runtime?: CompatibilityFlags;
101
+ prerender?: CompatibilityFlags;
74
102
  }
75
103
 
76
104
  interface ModuleOptions {
@@ -112,25 +140,6 @@ interface ModuleOptions {
112
140
  * @see https://sharp.pixelplumbing.com/api-constructor
113
141
  */
114
142
  sharpOptions?: Partial<SharpOptions>;
115
- /**
116
- * Should the playground at <path>/__og_image__ be enabled in development.
117
- *
118
- * @default true
119
- */
120
- playground: boolean;
121
- /**
122
- * Include Satori runtime.
123
- *
124
- * @default true
125
- */
126
- runtimeSatori: boolean;
127
- /**
128
- * Include the Browser runtime.
129
- * This will need to be manually enabled for production environments.
130
- *
131
- * @default `process.dev`
132
- */
133
- runtimeBrowser: boolean;
134
143
  /**
135
144
  * Enables debug logs and a debug endpoint.
136
145
  *
@@ -158,15 +167,15 @@ interface ModuleOptions {
158
167
  */
159
168
  componentDirs: string[];
160
169
  /**
161
- * Manually modify the deployment compatibility.
170
+ * Manually modify the compatibility.
162
171
  */
163
- runtimeCompatibility?: RuntimeCompatibilitySchema;
172
+ compatibility?: CompatibilityFlagEnvOverrides;
164
173
  }
165
174
  interface ModuleHooks {
166
175
  'nuxt-og-image:components': (ctx: {
167
176
  components: OgImageComponent[];
168
177
  }) => Promise<void> | void;
169
- 'og-image:config': (config: ModuleOptions) => Promise<void> | void;
178
+ 'nuxt-og-image:runtime-config': (config: ModuleOptions) => Promise<void> | void;
170
179
  }
171
180
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
172
181
 
package/dist/module.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "nuxt-og-image",
3
3
  "compatibility": {
4
- "nuxt": "^3.7.0",
4
+ "nuxt": "^3.8.2",
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "ogImage",
8
- "version": "3.0.0-beta.5"
8
+ "version": "3.0.0-beta.50"
9
9
  }