nuxt-og-image 3.0.0-rc.20 → 3.0.0-rc.22
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/README.md +4 -4
- package/dist/client/200.html +8 -12
- package/dist/client/404.html +8 -12
- package/dist/client/_nuxt/{IconCSS.5O0-SmyH.js → IconCSS.2T3mzzGy.js} +1 -1
- package/dist/client/_nuxt/IconCSS.6oz918NR.css +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/185665d2-7763-4db7-8b4f-c0990ede9ef9.json +1 -0
- package/dist/client/_nuxt/{entry.1-ZveGsq.css → entry.4NCgbL5v.css} +1 -1
- package/dist/client/_nuxt/{entry.Nh9pQ4Ti.js → entry.hBpxE0F3.js} +52 -52
- package/dist/client/_nuxt/{error-404.F86mkCGj.js → error-404.ijR0h6rZ.js} +1 -1
- package/dist/client/_nuxt/{error-500.L0AVuHMw.js → error-500.HSqygLPT.js} +1 -1
- package/dist/client/index.html +8 -12
- package/dist/module.json +1 -1
- package/dist/module.mjs +6 -8
- package/dist/runtime/core/bindings/chromium/node.mjs +1 -1
- package/dist/runtime/server/routes/__og-image__/image.mjs +1 -1
- package/package.json +9 -9
- package/dist/client/_nuxt/IconCSS.6C__fd0x.css +0 -1
- package/dist/client/_nuxt/builds/meta/dadcb033-8bc6-47cc-a46a-9ba69b83d96c.json +0 -1
|
@@ -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 h,f as m}from"./entry.
|
|
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 h,f as m}from"./entry.hBpxE0F3.js";const x=t=>(h("data-v-05a2b8a3"),t=t(),m(),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=x(()=>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,N)=>{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.
|
|
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.hBpxE0F3.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}'}]}),(b,u)=>(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)])]))}},_=i(x,[["__scopeId","data-v-c967d9a9"]]);export{_ as default};
|
package/dist/client/index.html
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html >
|
|
3
|
-
<head><meta charset="utf-8">
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
4
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
-
<link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.
|
|
3
|
+
<link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.4NCgbL5v.css">
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.hBpxE0F3.js">
|
|
7
5
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/vanilla-picker-NKbIFE8h.vtyeXros.js">
|
|
8
6
|
<link rel="prefetch" as="style" href="/__nuxt-og-image/_nuxt/error-404.DkXpI38i.css">
|
|
9
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.
|
|
7
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.ijR0h6rZ.js">
|
|
10
8
|
<link rel="prefetch" as="style" href="/__nuxt-og-image/_nuxt/error-500.SLhS9LVu.css">
|
|
11
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-500.
|
|
12
|
-
<script type="module" src="/__nuxt-og-image/_nuxt/entry.
|
|
13
|
-
</script></head>
|
|
14
|
-
<
|
|
15
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
|
|
16
|
-
</html>
|
|
9
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-500.HSqygLPT.js">
|
|
10
|
+
<script type="module" src="/__nuxt-og-image/_nuxt/entry.hBpxE0F3.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"}})();
|
|
11
|
+
</script></head><body><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { createHash } from 'node:crypto';
|
|
|
14
14
|
import { execa } from 'execa';
|
|
15
15
|
import terminate from 'terminate';
|
|
16
16
|
|
|
17
|
-
const version = "3.0.0-rc.
|
|
17
|
+
const version = "3.0.0-rc.21";
|
|
18
18
|
|
|
19
19
|
const autodetectableProviders = {
|
|
20
20
|
azure_static: "azure",
|
|
@@ -40,7 +40,7 @@ const NodeRuntime = {
|
|
|
40
40
|
};
|
|
41
41
|
const cloudflare = {
|
|
42
42
|
"chromium": false,
|
|
43
|
-
"css-inline":
|
|
43
|
+
"css-inline": false,
|
|
44
44
|
"resvg": "wasm",
|
|
45
45
|
"satori": "node",
|
|
46
46
|
"sharp": false,
|
|
@@ -342,10 +342,6 @@ async function setupBuildHandler(config, resolve, nuxt = useNuxt()) {
|
|
|
342
342
|
const postfix = target === "vercel-edge" ? "?module" : "";
|
|
343
343
|
const path = isCloudflarePages ? `../wasm/` : `./wasm/`;
|
|
344
344
|
await writeFile(serverEntry, contents.replaceAll('"@resvg/resvg-wasm/index_bg.wasm"', `"${path}index_bg-${resvgHash}.wasm${postfix}"`).replaceAll('"@css-inline/css-inline-wasm/index_bg.wasm"', `"${path}index_bg-${cssInlineHash}.wasm${postfix}"`).replaceAll('"yoga-wasm-web/dist/yoga.wasm"', `"${path}yoga-${yogaHash}.wasm${postfix}"`), { encoding: "utf-8" });
|
|
345
|
-
if (isCloudflarePages) {
|
|
346
|
-
const imgChunk = resolve(dirname(serverEntry), "./handlers/image.mjs");
|
|
347
|
-
existsSync(imgChunk) && await writeFile(imgChunk, (await readFile(serverEntry, "utf-8")).replaceAll('"@resvg/resvg-wasm/index_bg.wasm"', `"../${path}/index_bg-${resvgHash}.wasm${postfix}"`).replaceAll('"@css-inline/css-inline-wasm/index_bg.wasm"', `"../${path}index_bg-${cssInlineHash}.wasm${postfix}"`).replaceAll('"yoga-wasm-web/dist/yoga.wasm"', `"../${path}yoga-${yogaHash}.wasm${postfix}"`), { encoding: "utf-8" });
|
|
348
|
-
}
|
|
349
345
|
});
|
|
350
346
|
});
|
|
351
347
|
}
|
|
@@ -668,8 +664,10 @@ ${componentImports}
|
|
|
668
664
|
nuxt.options.nitro.prerender.routes = nuxt.options.nitro.prerender.routes || [];
|
|
669
665
|
normalisedFonts.filter((f) => !f.path && !f.key).forEach((entry, key) => {
|
|
670
666
|
const { name, weight } = entry;
|
|
671
|
-
|
|
672
|
-
|
|
667
|
+
if (preset !== "cloudflare") {
|
|
668
|
+
entry.path = `/__og-image__/font/${name}/${weight}.ttf`;
|
|
669
|
+
nuxt.options.nitro.prerender.routes.unshift(entry.path);
|
|
670
|
+
}
|
|
673
671
|
if (name === "Inter" && [400, 700].includes(Number(weight)))
|
|
674
672
|
entry.key = `nuxt-og-image:fonts:inter-latin-ext-${weight}-normal.woff`;
|
|
675
673
|
normalisedFonts[key] = entry;
|
|
@@ -26,7 +26,7 @@ export async function createBrowser() {
|
|
|
26
26
|
if (import.meta.dev) {
|
|
27
27
|
console.warn("Failed to load chromium instance. Ensure you have chrome installed, otherwise add the dependency: `npm add -D playwright`.");
|
|
28
28
|
} else {
|
|
29
|
-
console.error("Failed to load browser instance. Please open an issue with the exception: https://github.com/
|
|
29
|
+
console.error("Failed to load browser instance. Please open an issue with the exception: https://github.com/nuxt-modules/og-image/issues.");
|
|
30
30
|
throw e;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -19,7 +19,7 @@ export default defineEventHandler(async (e) => {
|
|
|
19
19
|
if (options.renderer === "chromium")
|
|
20
20
|
compatibilityHints.push("Using Chromium to generate images is only supported in Node based environments. It's recommended to only use this if you're prerendering");
|
|
21
21
|
if (options.component !== "PageScreenshot" && await applyInlineCss(ctx, await fetchIsland(ctx)))
|
|
22
|
-
compatibilityHints.push("Inlining CSS is
|
|
22
|
+
compatibilityHints.push("Inlining CSS is not supported on Cloudflare.");
|
|
23
23
|
setHeader(e, "Content-Type", "application/json");
|
|
24
24
|
return {
|
|
25
25
|
siteConfig: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-og-image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-rc.
|
|
4
|
+
"version": "3.0.0-rc.22",
|
|
5
5
|
"packageManager": "pnpm@8.14.0",
|
|
6
6
|
"description": "Enlightened OG Image generation for Nuxt.",
|
|
7
7
|
"author": {
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
14
|
-
"homepage": "https://
|
|
14
|
+
"homepage": "https://nuxtseo.com/og-image",
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "git+https://github.com/
|
|
17
|
+
"url": "git+https://github.com/nuxt-modules/og-image.git"
|
|
18
18
|
},
|
|
19
19
|
"bugs": {
|
|
20
|
-
"url": "https://github.com/
|
|
20
|
+
"url": "https://github.com/nuxt-modules/og-image/issues"
|
|
21
21
|
},
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"@css-inline/css-inline-wasm": "^0.12.1",
|
|
38
38
|
"@iconify-json/noto": "^1.1.18",
|
|
39
39
|
"@nuxt/devtools-kit": "^1.0.6",
|
|
40
|
-
"@nuxt/kit": "^3.9.
|
|
40
|
+
"@nuxt/kit": "^3.9.1",
|
|
41
41
|
"@resvg/resvg-js": "^2.6.0",
|
|
42
42
|
"@resvg/resvg-wasm": "^2.6.0",
|
|
43
43
|
"@unocss/core": "^0.58.3",
|
|
44
44
|
"@unocss/preset-wind": "^0.58.3",
|
|
45
45
|
"@vueuse/core": "^10.7.1",
|
|
46
46
|
"chrome-launcher": "^1.1.0",
|
|
47
|
-
"defu": "^6.1.
|
|
47
|
+
"defu": "^6.1.4",
|
|
48
48
|
"execa": "^8.0.1",
|
|
49
49
|
"floating-vue": "2.0.0-beta.24",
|
|
50
50
|
"image-size": "^1.1.1",
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"bumpp": "^9.2.1",
|
|
80
80
|
"eslint": "8.56.0",
|
|
81
81
|
"jest-image-snapshot": "^6.4.0",
|
|
82
|
-
"nuxt": "^3.9.
|
|
82
|
+
"nuxt": "^3.9.1",
|
|
83
83
|
"nuxt-icon": "0.6.8",
|
|
84
84
|
"playwright": "^1.40.1",
|
|
85
85
|
"sass": "^1.69.7",
|
|
86
86
|
"sharp": "^0.33.1",
|
|
87
87
|
"typescript": "^5.3.3",
|
|
88
|
-
"vitest": "^1.1.
|
|
88
|
+
"vitest": "^1.1.3"
|
|
89
89
|
},
|
|
90
90
|
"build": {
|
|
91
91
|
"externals": [
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"dev": "nuxi dev .playground",
|
|
106
106
|
"dev:build": "nuxi build .playground",
|
|
107
107
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare .playground && nuxi prepare client",
|
|
108
|
-
"release": "bumpp && pnpm -r publish --no-git-checks",
|
|
108
|
+
"release": "pnpm build && bumpp && pnpm -r publish --no-git-checks",
|
|
109
109
|
"typecheck": "tsc --noEmit",
|
|
110
110
|
"test": "vitest"
|
|
111
111
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
span[data-v-d495a76f]{background-color:currentColor;display:inline-block;-webkit-mask-image:var(--5937546e);mask-image:var(--5937546e);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"dadcb033-8bc6-47cc-a46a-9ba69b83d96c","timestamp":1704292938755,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|