nuxt-og-image 2.0.0-beta.57 → 2.0.0-beta.59
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 +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/_nuxt/{IconCSS.3275c98c.js → IconCSS.3ed6665a.js} +1 -1
- package/dist/client/_nuxt/ImageLoader.98cdc4fb.js +1 -0
- package/dist/client/_nuxt/entry.725a580a.js +7 -0
- package/dist/client/_nuxt/{entry.f4586a2b.css → entry.ddd5fc7b.css} +1 -1
- package/dist/client/_nuxt/{error-404.cc80c5f1.js → error-404.c6d590bd.js} +1 -1
- package/dist/client/_nuxt/error-404.f3dd5020.css +1 -0
- package/dist/client/_nuxt/{error-500.dc06de67.js → error-500.05e72b5f.js} +1 -1
- package/dist/client/_nuxt/error-500.06915589.css +1 -0
- package/dist/client/_nuxt/index.80d41946.js +1 -0
- package/dist/client/_nuxt/options.334f5ba2.js +1 -0
- package/dist/client/_nuxt/png.823fe00d.js +1 -0
- package/dist/client/_nuxt/{shiki.31e8f44a.js → shiki.eefdab7f.js} +1 -1
- package/dist/client/_nuxt/svg.04e74616.js +1 -0
- package/dist/client/_nuxt/{vnodes.0022f1ec.js → vnodes.1f91e005.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/options/index.html +2 -2
- package/dist/client/png/index.html +2 -2
- package/dist/client/svg/index.html +2 -2
- package/dist/client/vnodes/index.html +2 -2
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/nitro/routes/html.mjs +1 -1
- package/dist/runtime/nitro/routes/options.mjs +2 -2
- package/dist/runtime/nitro/utils.mjs +3 -1
- package/package.json +12 -17
- package/dist/client/_nuxt/ImageLoader.f8c23aba.js +0 -1
- package/dist/client/_nuxt/entry.10f3a36e.js +0 -5
- package/dist/client/_nuxt/error-404.1469f10f.css +0 -1
- package/dist/client/_nuxt/error-500.92b94fae.css +0 -1
- package/dist/client/_nuxt/error-component.a2873650.js +0 -3
- package/dist/client/_nuxt/index.8f17abab.js +0 -1
- package/dist/client/_nuxt/options.9ec6995d.js +0 -1
- package/dist/client/_nuxt/png.3d951d00.js +0 -1
- package/dist/client/_nuxt/svg.6ca87cf3.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html >
|
|
3
3
|
<head><meta charset="utf-8">
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/entry.
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/entry.725a580a.js"><link rel="preload" as="style" href="/__nuxt_og_image__/client/_nuxt/entry.ddd5fc7b.css"><link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-404.f3dd5020.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/error-404.c6d590bd.js"><link rel="prefetch" as="style" href="/__nuxt_og_image__/client/_nuxt/error-500.06915589.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_og_image__/client/_nuxt/error-500.05e72b5f.js"><link rel="stylesheet" href="/__nuxt_og_image__/client/_nuxt/entry.ddd5fc7b.css"><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(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 f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
|
|
5
5
|
</script></head>
|
|
6
|
-
<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><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt_og_image__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_og_image__/client/_nuxt/entry.
|
|
6
|
+
<body ><div id="__nuxt"><svg class="nuxt-spa-loading" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 25" fill="none" width="80"><path d="M24.236 22.006h10.742L25.563 5.822l-8.979 14.31a4 4 0 0 1-3.388 1.874H2.978l11.631-20 5.897 10.567"></path></svg><style>.nuxt-spa-loading{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%)}.nuxt-spa-loading>path{fill:none;stroke:#00DC82;stroke-width:4px;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:128;stroke-dashoffset:128;animation:nuxt-spa-loading-move 3s linear infinite}@keyframes nuxt-spa-loading-move{100%{stroke-dashoffset:-128}}</style></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt_og_image__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_og_image__/client/_nuxt/entry.725a580a.js" crossorigin></script></body>
|
|
7
7
|
</html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -32,7 +32,7 @@ export default defineEventHandler(async (e) => {
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
const hashId = hash([options.component, options]);
|
|
35
|
-
const island = await $fetch(`/__nuxt_island/${options.component}
|
|
35
|
+
const island = await $fetch(`/__nuxt_island/${options.component}_${hashId}`, {
|
|
36
36
|
params: {
|
|
37
37
|
props: JSON.stringify(options)
|
|
38
38
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createError, defineEventHandler, getQuery } from "h3";
|
|
2
2
|
import { withoutBase } from "ufo";
|
|
3
3
|
import { defu } from "defu";
|
|
4
|
-
import { extractOgImageOptions
|
|
4
|
+
import { extractOgImageOptions } from "../utils.mjs";
|
|
5
5
|
import { getRouteRules } from "#internal/nitro";
|
|
6
6
|
import { useRuntimeConfig } from "#imports";
|
|
7
7
|
export default defineEventHandler(async (e) => {
|
|
@@ -36,7 +36,7 @@ export default defineEventHandler(async (e) => {
|
|
|
36
36
|
extractedPayload,
|
|
37
37
|
routeRules,
|
|
38
38
|
// runtime options
|
|
39
|
-
{ path
|
|
39
|
+
{ path },
|
|
40
40
|
defaults
|
|
41
41
|
);
|
|
42
42
|
});
|
|
@@ -4,6 +4,7 @@ import { getQuery } from "h3";
|
|
|
4
4
|
import { join } from "pathe";
|
|
5
5
|
import { prefixStorage } from "unstorage";
|
|
6
6
|
import sizeOf from "image-size";
|
|
7
|
+
import { useHostname } from "./util-hostname.mjs";
|
|
7
8
|
import { useRuntimeConfig, useStorage } from "#imports";
|
|
8
9
|
export * from "./util-hostname.mjs";
|
|
9
10
|
export function wasmLoader(asyncModuleLoad, fallback) {
|
|
@@ -65,7 +66,8 @@ export async function fetchOptions(e, path) {
|
|
|
65
66
|
return {
|
|
66
67
|
...options,
|
|
67
68
|
// use query data
|
|
68
|
-
...getQuery(e)
|
|
69
|
+
...getQuery(e),
|
|
70
|
+
requestOrigin: useHostname(e)
|
|
69
71
|
};
|
|
70
72
|
}
|
|
71
73
|
export function base64ToArrayBuffer(base64) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-og-image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.59",
|
|
5
5
|
"packageManager": "pnpm@8.6.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@nuxt/kit": "^3.
|
|
29
|
+
"@nuxt/kit": "^3.6.1",
|
|
30
30
|
"@resvg/resvg-js": "^2.4.1",
|
|
31
31
|
"@resvg/resvg-wasm": "^2.4.1",
|
|
32
32
|
"@types/fs-extra": "^11.0.1",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"fast-glob": "^3.2.12",
|
|
39
39
|
"flatted": "^3.2.7",
|
|
40
40
|
"fs-extra": "^11.1.1",
|
|
41
|
-
"globby": "^13.
|
|
41
|
+
"globby": "^13.2.0",
|
|
42
42
|
"image-size": "^1.0.2",
|
|
43
43
|
"inline-css": "^4.0.2",
|
|
44
44
|
"launch-editor": "^2.6.0",
|
|
45
45
|
"nuxt-icon": "^0.4.1",
|
|
46
|
-
"nuxt-site-config": "^0.
|
|
46
|
+
"nuxt-site-config": "^0.3.1",
|
|
47
47
|
"nypm": "^0.2.1",
|
|
48
|
-
"ofetch": "^1.1.
|
|
48
|
+
"ofetch": "^1.1.1",
|
|
49
49
|
"ohash": "^1.1.2",
|
|
50
50
|
"pathe": "^1.1.1",
|
|
51
|
-
"playwright-core": "^1.35.
|
|
51
|
+
"playwright-core": "^1.35.1",
|
|
52
52
|
"radix3": "^1.0.1",
|
|
53
53
|
"satori": "0.10.1",
|
|
54
54
|
"satori-html": "^0.3.2",
|
|
@@ -63,22 +63,17 @@
|
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@antfu/eslint-config": "^0.39.5",
|
|
66
|
-
"@nuxt/devtools-edge": "0.
|
|
66
|
+
"@nuxt/devtools-edge": "0.6.4-28129679.fb5a846",
|
|
67
67
|
"@nuxt/module-builder": "^0.4.0",
|
|
68
|
-
"@nuxt/test-utils": "3.
|
|
68
|
+
"@nuxt/test-utils": "3.6.1",
|
|
69
69
|
"@nuxtjs/eslint-config-typescript": "^12.0.0",
|
|
70
70
|
"@types/ws": "^8.5.5",
|
|
71
71
|
"bumpp": "^9.1.1",
|
|
72
|
-
"eslint": "8.
|
|
72
|
+
"eslint": "8.43.0",
|
|
73
73
|
"jest-image-snapshot": "^6.1.0",
|
|
74
|
-
"nuxt": "^3.
|
|
75
|
-
"sass": "^1.63.
|
|
76
|
-
"vitest": "^0.32.
|
|
77
|
-
},
|
|
78
|
-
"resolutions": {
|
|
79
|
-
"nitropack": "npm:nitropack-edge@2.4.0-28027501.1cf01bf",
|
|
80
|
-
"unstorage": "^1.5.0",
|
|
81
|
-
"unenv": "^1.4.1"
|
|
74
|
+
"nuxt": "^3.6.1",
|
|
75
|
+
"sass": "^1.63.6",
|
|
76
|
+
"vitest": "^0.32.2"
|
|
82
77
|
},
|
|
83
78
|
"scripts": {
|
|
84
79
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as _,r as c,m,w as r,f as u,s as d,o as g,h as f,i as y,j as v}from"./entry.10f3a36e.js";const x=_({__name:"ImageLoader",props:{src:String,aspectRatio:Number,description:String},setup(a){const s=a,n=c(),o=c(0);function i(e){const t=n.value,p=Date.now();t.src="",o.value=0,t.style.opacity="0",t.onload=()=>{t.style.opacity="1",o.value=Date.now()-p},t.src=e}m(()=>{r(()=>s.src,e=>{i(e)},{immediate:!0})});const l=u(()=>s.description.replace("%s",o.value.toString()));return r(l,e=>{d.value=e}),(e,t)=>(g(),f("img",{ref_key:"image",ref:n,class:"max-h-full border-1 border-light-500 rounded",style:y({aspectRatio:a.aspectRatio})},null,4))}});const w=v(x,[["__scopeId","data-v-23ec6856"]]);export{w as _};
|