nuxt-og-image 3.0.0-rc.14 → 3.0.0-rc.16
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/dist/client/200.html +4 -4
- package/dist/client/404.html +4 -4
- package/dist/client/_nuxt/{IconCSS.OyGT7eGd.js → IconCSS.oP9xqHs6.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/4ddaf52f-ac02-4dc0-9ff9-fece1a5002e1.json +1 -0
- package/dist/client/_nuxt/{entry.3-KzyOmg.js → entry.DG5oAMPa.js} +4 -4
- package/dist/client/_nuxt/{error-404.CkPhWImo.js → error-404.qApZt-ee.js} +1 -1
- package/dist/client/_nuxt/{error-500.vjkc_n7W.js → error-500.wgDSbXBQ.js} +1 -1
- package/dist/client/index.html +4 -4
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +8 -7
- package/dist/runtime/core/bindings/css-inline/node.d.ts +8 -2
- package/dist/runtime/core/bindings/css-inline/node.mjs +7 -2
- package/dist/runtime/core/bindings/css-inline/wasm-fs.d.ts +8 -0
- package/dist/runtime/core/bindings/css-inline/wasm-fs.mjs +8 -0
- package/dist/runtime/core/bindings/css-inline/wasm.d.ts +8 -0
- package/dist/runtime/core/bindings/css-inline/wasm.mjs +8 -0
- package/dist/runtime/core/html/applyInlineCss.mjs +2 -2
- package/dist/runtime/core/renderers/satori/instances.mjs +2 -1
- package/dist/runtime/types.d.ts +1 -1
- package/package.json +8 -7
- package/dist/client/_nuxt/builds/meta/7277d2dd-9b1b-49b9-9106-3297555c358d.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.DG5oAMPa.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.DG5oAMPa.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
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<head><meta charset="utf-8">
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
5
|
<link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.1-ZveGsq.css">
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/entry.DG5oAMPa.js">
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/vanilla-picker-NKbIFE8h.vtyeXros.js">
|
|
8
8
|
<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.
|
|
9
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.qApZt-ee.js">
|
|
10
10
|
<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.
|
|
11
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-500.wgDSbXBQ.js">
|
|
12
|
+
<script type="module" src="/__nuxt-og-image/_nuxt/entry.DG5oAMPa.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"}})();
|
|
13
13
|
</script></head>
|
|
14
14
|
<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>
|
|
15
15
|
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
|
package/dist/module.d.mts
CHANGED
|
@@ -95,7 +95,7 @@ interface FontConfig {
|
|
|
95
95
|
type InputFontConfig = (`${string}:${number}` | string | FontConfig);
|
|
96
96
|
interface RuntimeCompatibilitySchema {
|
|
97
97
|
chromium: 'node' | false;
|
|
98
|
-
['css-inline']: 'node' | false;
|
|
98
|
+
['css-inline']: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
99
99
|
resvg: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
100
100
|
satori: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
101
101
|
sharp: 'node' | false;
|
package/dist/module.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ interface FontConfig {
|
|
|
95
95
|
type InputFontConfig = (`${string}:${number}` | string | FontConfig);
|
|
96
96
|
interface RuntimeCompatibilitySchema {
|
|
97
97
|
chromium: 'node' | false;
|
|
98
|
-
['css-inline']: 'node' | false;
|
|
98
|
+
['css-inline']: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
99
99
|
resvg: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
100
100
|
satori: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
101
101
|
sharp: 'node' | false;
|
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.15";
|
|
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": "wasm",
|
|
44
44
|
"resvg": "wasm",
|
|
45
45
|
"satori": "node",
|
|
46
46
|
"sharp": false,
|
|
@@ -62,7 +62,7 @@ const RuntimeCompatibility = {
|
|
|
62
62
|
"node-server": NodeRuntime,
|
|
63
63
|
"stackblitz": {
|
|
64
64
|
"chromium": false,
|
|
65
|
-
"css-inline":
|
|
65
|
+
"css-inline": "wasm-fs",
|
|
66
66
|
"resvg": "wasm-fs",
|
|
67
67
|
"satori": "wasm-fs",
|
|
68
68
|
"sharp": false
|
|
@@ -71,7 +71,7 @@ const RuntimeCompatibility = {
|
|
|
71
71
|
"netlify": awsLambda,
|
|
72
72
|
"netlify-edge": {
|
|
73
73
|
"chromium": false,
|
|
74
|
-
"css-inline":
|
|
74
|
+
"css-inline": "wasm",
|
|
75
75
|
"resvg": "wasm",
|
|
76
76
|
"satori": "node",
|
|
77
77
|
"sharp": false,
|
|
@@ -86,7 +86,7 @@ const RuntimeCompatibility = {
|
|
|
86
86
|
"vercel": awsLambda,
|
|
87
87
|
"vercel-edge": {
|
|
88
88
|
"chromium": false,
|
|
89
|
-
"css-inline":
|
|
89
|
+
"css-inline": "wasm",
|
|
90
90
|
"resvg": "wasm",
|
|
91
91
|
"satori": "node",
|
|
92
92
|
"sharp": false,
|
|
@@ -337,9 +337,10 @@ async function setupBuildHandler(config, resolve, nuxt = useNuxt()) {
|
|
|
337
337
|
const contents = await readFile(serverEntry, "utf-8");
|
|
338
338
|
const resvgHash = sha1(await readFile(await resolvePath("@resvg/resvg-wasm/index_bg.wasm")));
|
|
339
339
|
const yogaHash = sha1(await readFile(await resolvePath("yoga-wasm-web/dist/yoga.wasm")));
|
|
340
|
+
const cssInlineHash = sha1(await readFile(await resolvePath("@css-inline/css-inline-wasm/index_bg.wasm")));
|
|
340
341
|
const postfix = target === "vercel-edge" ? "?module" : "";
|
|
341
342
|
const path = target === "cloudflare-pages" ? `../wasm/` : `./wasm/`;
|
|
342
|
-
await writeFile(serverEntry, contents.replaceAll('"@resvg/resvg-wasm/index_bg.wasm"', `"${path}index_bg-${resvgHash}.wasm${postfix}"`).replaceAll('"yoga-wasm-web/dist/yoga.wasm"', `"${path}yoga-${yogaHash}.wasm${postfix}"`), { encoding: "utf-8" });
|
|
343
|
+
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" });
|
|
343
344
|
});
|
|
344
345
|
});
|
|
345
346
|
}
|
|
@@ -388,7 +389,7 @@ const module = defineNuxtModule({
|
|
|
388
389
|
meta: {
|
|
389
390
|
name: "nuxt-og-image",
|
|
390
391
|
compatibility: {
|
|
391
|
-
nuxt: "^3.
|
|
392
|
+
nuxt: "^3.9.0",
|
|
392
393
|
bridge: false
|
|
393
394
|
},
|
|
394
395
|
configKey: "ogImage"
|
|
@@ -20,8 +20,8 @@ export async function applyInlineCss({ e }, island) {
|
|
|
20
20
|
const cssToInline = `${linksToCss}${css}`;
|
|
21
21
|
const cssInline2 = await useCssInline();
|
|
22
22
|
html = cssInline2.inline(island.html, {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
loadRemoteStylesheets: false,
|
|
24
|
+
extraCss: cssToInline
|
|
25
25
|
});
|
|
26
26
|
const classes = cssToInline.match(/\.([a-zA-Z0-9-_]+)/g)?.map((c) => c.replace(".", ""));
|
|
27
27
|
if (classes)
|
|
@@ -28,5 +28,6 @@ export async function useSharp() {
|
|
|
28
28
|
}
|
|
29
29
|
export async function useCssInline() {
|
|
30
30
|
cssInlineInstance.instance = cssInlineInstance.instance || await import("#nuxt-og-image/bindings/css-inline").then((m) => m.default);
|
|
31
|
-
|
|
31
|
+
await cssInlineInstance.instance.initWasmPromise;
|
|
32
|
+
return cssInlineInstance.instance.cssInline;
|
|
32
33
|
}
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -125,7 +125,7 @@ export interface ResolvedFontConfig extends FontConfig {
|
|
|
125
125
|
export type InputFontConfig = (`${string}:${number}` | string | FontConfig);
|
|
126
126
|
export interface RuntimeCompatibilitySchema {
|
|
127
127
|
chromium: 'node' | false;
|
|
128
|
-
['css-inline']: 'node' | false;
|
|
128
|
+
['css-inline']: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
129
129
|
resvg: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
130
130
|
satori: 'node' | 'wasm' | 'wasm-fs' | false;
|
|
131
131
|
sharp: 'node' | false;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-og-image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-rc.
|
|
5
|
-
"packageManager": "pnpm@8.
|
|
4
|
+
"version": "3.0.0-rc.16",
|
|
5
|
+
"packageManager": "pnpm@8.14.0",
|
|
6
6
|
"description": "Enlightened OG Image generation for Nuxt.",
|
|
7
7
|
"author": {
|
|
8
8
|
"website": "https://harlanzw.com",
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"virtual.d.ts"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
+
"@css-inline/css-inline": "^0.12.1",
|
|
37
|
+
"@css-inline/css-inline-wasm": "^0.12.1",
|
|
36
38
|
"@iconify-json/noto": "^1.1.18",
|
|
37
39
|
"@nuxt/devtools-kit": "^1.0.6",
|
|
38
40
|
"@nuxt/kit": "^3.9.0",
|
|
@@ -42,13 +44,12 @@
|
|
|
42
44
|
"@unocss/preset-wind": "^0.58.3",
|
|
43
45
|
"@vueuse/core": "^10.7.1",
|
|
44
46
|
"chrome-launcher": "^1.1.0",
|
|
45
|
-
"css-inline": "^0.11.2",
|
|
46
47
|
"defu": "^6.1.3",
|
|
47
48
|
"execa": "^8.0.1",
|
|
48
49
|
"floating-vue": "2.0.0-beta.24",
|
|
49
|
-
"image-size": "^1.1.
|
|
50
|
-
"nuxt-site-config": "^2.
|
|
51
|
-
"nuxt-site-config-kit": "^2.
|
|
50
|
+
"image-size": "^1.1.1",
|
|
51
|
+
"nuxt-site-config": "^2.2.0",
|
|
52
|
+
"nuxt-site-config-kit": "^2.2.0",
|
|
52
53
|
"nypm": "^0.3.4",
|
|
53
54
|
"ofetch": "^1.3.3",
|
|
54
55
|
"ohash": "^1.1.3",
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
"nuxt": "^3.9.0",
|
|
82
83
|
"nuxt-icon": "0.6.8",
|
|
83
84
|
"playwright": "^1.40.1",
|
|
84
|
-
"sass": "^1.69.
|
|
85
|
+
"sass": "^1.69.7",
|
|
85
86
|
"sharp": "^0.33.1",
|
|
86
87
|
"typescript": "^5.3.3",
|
|
87
88
|
"vitest": "^1.1.1"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"7277d2dd-9b1b-49b9-9106-3297555c358d","timestamp":1704169047830,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|