nuxt-og-image 3.0.0-beta.10 → 3.0.0-beta.12
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.389cad49.js → IconCSS.3f011790.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/f929037e-e674-4060-8070-9dfb30335a28.json +1 -0
- package/dist/client/_nuxt/{entry.e62f04d6.js → entry.6c0001e5.js} +3 -3
- package/dist/client/_nuxt/{error-404.91508473.js → error-404.0d8fb510.js} +1 -1
- package/dist/client/_nuxt/{error-500.b66f3aae.js → error-500.cefac4a7.js} +1 -1
- package/dist/client/index.html +4 -4
- package/dist/module.d.mts +4 -4
- package/dist/module.d.ts +4 -4
- package/dist/module.json +1 -1
- package/dist/module.mjs +21 -19
- package/dist/runtime/core/bindings/resvg/wasm.mjs +2 -5
- package/dist/runtime/core/bindings/satori/wasm.mjs +7 -0
- package/dist/runtime/core/utils/wasm.d.ts +1 -0
- package/dist/runtime/core/utils/wasm.mjs +6 -0
- package/package.json +1 -1
- package/dist/client/_nuxt/builds/meta/3185e4a0-6b15-4476-b2f3-85ef31d35fc6.json +0 -1
- package/dist/runtime/core/bindings/satori/yoga-wasm.mjs +0 -7
- package/dist/runtime/core/bindings/sharp/wasm.d.ts +0 -2
- package/dist/runtime/core/bindings/sharp/wasm.mjs +0 -2
- /package/dist/runtime/core/bindings/satori/{yoga-wasm.d.ts → wasm.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.
|
|
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.6c0001e5.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.
|
|
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.6c0001e5.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};
|
package/dist/client/index.html
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
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.434c2c45.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.6c0001e5.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.
|
|
8
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-404.0d8fb510.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.
|
|
11
|
-
<script type="module" src="/__nuxt-og-image/_nuxt/entry.
|
|
10
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/error-500.cefac4a7.js">
|
|
11
|
+
<script type="module" src="/__nuxt-og-image/_nuxt/entry.6c0001e5.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,6 +2,7 @@ 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/types';
|
|
5
6
|
|
|
6
7
|
interface OgImageComponent {
|
|
7
8
|
path?: string;
|
|
@@ -66,11 +67,10 @@ interface RuntimeCompatibilitySchema {
|
|
|
66
67
|
chromium: 'node' | false;
|
|
67
68
|
['css-inline']: 'node' | false;
|
|
68
69
|
resvg: 'node' | 'wasm' | false;
|
|
69
|
-
satori: 'node' | '
|
|
70
|
-
sharp: 'node' |
|
|
70
|
+
satori: 'node' | 'wasm' | false;
|
|
71
|
+
sharp: 'node' | false;
|
|
71
72
|
};
|
|
72
|
-
|
|
73
|
-
wasmImportQuery?: string;
|
|
73
|
+
wasm?: WasmOptions;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
interface ModuleOptions {
|
package/dist/module.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ 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/types';
|
|
5
6
|
|
|
6
7
|
interface OgImageComponent {
|
|
7
8
|
path?: string;
|
|
@@ -66,11 +67,10 @@ interface RuntimeCompatibilitySchema {
|
|
|
66
67
|
chromium: 'node' | false;
|
|
67
68
|
['css-inline']: 'node' | false;
|
|
68
69
|
resvg: 'node' | 'wasm' | false;
|
|
69
|
-
satori: 'node' | '
|
|
70
|
-
sharp: 'node' |
|
|
70
|
+
satori: 'node' | 'wasm' | false;
|
|
71
|
+
sharp: 'node' | false;
|
|
71
72
|
};
|
|
72
|
-
|
|
73
|
-
wasmImportQuery?: string;
|
|
73
|
+
wasm?: WasmOptions;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
interface ModuleOptions {
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import 'nypm';
|
|
|
9
9
|
import { defu } from 'defu';
|
|
10
10
|
import { onDevToolsInitialized, extendServerRpc } from '@nuxt/devtools-kit';
|
|
11
11
|
|
|
12
|
-
const version = "3.0.0-beta.
|
|
12
|
+
const version = "3.0.0-beta.12";
|
|
13
13
|
|
|
14
14
|
const autodetectableProviders = {
|
|
15
15
|
azure_static: "azure",
|
|
@@ -32,8 +32,7 @@ const NodeRuntime = {
|
|
|
32
32
|
"resvg": "node",
|
|
33
33
|
"satori": "node",
|
|
34
34
|
"sharp": "node"
|
|
35
|
-
}
|
|
36
|
-
wasmStrategy: "import"
|
|
35
|
+
}
|
|
37
36
|
};
|
|
38
37
|
const cloudflare = {
|
|
39
38
|
bindings: {
|
|
@@ -42,8 +41,8 @@ const cloudflare = {
|
|
|
42
41
|
"resvg": "wasm",
|
|
43
42
|
"satori": "node",
|
|
44
43
|
"sharp": false
|
|
45
|
-
}
|
|
46
|
-
|
|
44
|
+
}
|
|
45
|
+
// nitro configures wasm
|
|
47
46
|
};
|
|
48
47
|
const awsLambda = {
|
|
49
48
|
bindings: {
|
|
@@ -52,8 +51,7 @@ const awsLambda = {
|
|
|
52
51
|
"resvg": "node",
|
|
53
52
|
"satori": "node",
|
|
54
53
|
"sharp": "node"
|
|
55
|
-
}
|
|
56
|
-
wasmStrategy: "inline"
|
|
54
|
+
}
|
|
57
55
|
};
|
|
58
56
|
const RuntimeCompatibility = {
|
|
59
57
|
"nitro-dev": NodeRuntime,
|
|
@@ -66,8 +64,7 @@ const RuntimeCompatibility = {
|
|
|
66
64
|
"resvg": "wasm",
|
|
67
65
|
"satori": "node",
|
|
68
66
|
"sharp": "node"
|
|
69
|
-
}
|
|
70
|
-
wasmStrategy: "inline"
|
|
67
|
+
}
|
|
71
68
|
},
|
|
72
69
|
"aws-lambda": awsLambda,
|
|
73
70
|
"netlify": awsLambda,
|
|
@@ -79,7 +76,11 @@ const RuntimeCompatibility = {
|
|
|
79
76
|
"satori": "node",
|
|
80
77
|
"sharp": false
|
|
81
78
|
},
|
|
82
|
-
|
|
79
|
+
wasm: {
|
|
80
|
+
rollup: {
|
|
81
|
+
targetEnv: "auto-inline"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
83
84
|
},
|
|
84
85
|
"vercel": awsLambda,
|
|
85
86
|
"vercel-edge": {
|
|
@@ -90,8 +91,13 @@ const RuntimeCompatibility = {
|
|
|
90
91
|
"satori": "node",
|
|
91
92
|
"sharp": "node"
|
|
92
93
|
},
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
// requires vercel pro
|
|
95
|
+
// TODO support importing
|
|
96
|
+
wasm: {
|
|
97
|
+
rollup: {
|
|
98
|
+
targetEnv: "auto-inline"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
95
101
|
},
|
|
96
102
|
"cloudflare-pages": cloudflare,
|
|
97
103
|
"cloudflare": cloudflare
|
|
@@ -134,16 +140,12 @@ function applyNitroPresetCompatibility(nitroConfig, options) {
|
|
|
134
140
|
applyBinding("sharp"),
|
|
135
141
|
nitroConfig.alias || {}
|
|
136
142
|
);
|
|
137
|
-
|
|
138
|
-
if (target === "netlify-edge") {
|
|
139
|
-
nitroConfig.wasm = nitroConfig.wasm || {};
|
|
140
|
-
nitroConfig.wasm.rollup = nitroConfig.wasm.rollup || {};
|
|
141
|
-
nitroConfig.wasm.rollup.targetEnv = "auto-inline";
|
|
142
|
-
}
|
|
143
|
-
if (target.includes("edge") || target.includes("cloudflare")) {
|
|
143
|
+
if (Object.values(compatibility.bindings).includes("wasm")) {
|
|
144
144
|
nitroConfig.experimental = nitroConfig.experimental || {};
|
|
145
145
|
nitroConfig.experimental.wasm = true;
|
|
146
146
|
}
|
|
147
|
+
nitroConfig.rollupConfig = nitroConfig.rollupConfig || {};
|
|
148
|
+
nitroConfig.wasm = defu(compatibility.wasm || {}, nitroConfig.wasm);
|
|
147
149
|
return compatibility;
|
|
148
150
|
}
|
|
149
151
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { Resvg as _Resvg, initWasm } from "@resvg/resvg-wasm";
|
|
2
|
+
import { importWasm } from "../../utils/wasm.mjs";
|
|
2
3
|
export default {
|
|
3
|
-
initWasmPromise: initWasm(import("@resvg/resvg-wasm/index_bg.wasm")
|
|
4
|
-
let mod = m.default;
|
|
5
|
-
mod = typeof mod === "function" ? mod() : mod;
|
|
6
|
-
return "instance" in mod ? mod.instance : mod;
|
|
7
|
-
})),
|
|
4
|
+
initWasmPromise: initWasm(importWasm(import("@resvg/resvg-wasm/index_bg.wasm"))),
|
|
8
5
|
Resvg: _Resvg
|
|
9
6
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _satori, { init } from "satori/wasm";
|
|
2
|
+
import initYoga from "yoga-wasm-web";
|
|
3
|
+
import { importWasm } from "../../utils/wasm.mjs";
|
|
4
|
+
export default {
|
|
5
|
+
initWasmPromise: initYoga(importWasm(import("yoga-wasm-web/dist/yoga.wasm"))).then((yoga) => init(yoga)),
|
|
6
|
+
satori: _satori
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function importWasm(input: any): Promise<any>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export async function importWasm(input) {
|
|
2
|
+
const _input = await input;
|
|
3
|
+
const _module = _input.default || _input;
|
|
4
|
+
const _instance = typeof _module === "function" ? await _module({}).then((r) => r.instance || r) : await WebAssembly.instantiate(_module, {});
|
|
5
|
+
return _instance.exports;
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"3185e4a0-6b15-4476-b2f3-85ef31d35fc6","timestamp":1701256461771,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
File without changes
|