nuxt-og-image 2.0.26 → 2.0.28
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.fb90e69a.js → IconCSS.d3e12840.js} +1 -1
- package/dist/client/_nuxt/{ImageLoader.9c38acd9.js → ImageLoader.ad92439f.js} +1 -1
- package/dist/client/_nuxt/{entry.6bb89c31.js → entry.00dd4948.js} +3 -3
- package/dist/client/_nuxt/{error-404.0a1715ef.js → error-404.95b4b668.js} +1 -1
- package/dist/client/_nuxt/{error-500.e5a203da.js → error-500.d22f8b54.js} +1 -1
- package/dist/client/_nuxt/{index.532d8eff.js → index.f2702f88.js} +1 -1
- package/dist/client/_nuxt/{options.d4d86b2e.js → options.ddf310be.js} +1 -1
- package/dist/client/_nuxt/{png.1ee49492.js → png.51e9bf00.js} +1 -1
- package/dist/client/_nuxt/{shiki.303b2a09.js → shiki.721a43ba.js} +1 -1
- package/dist/client/_nuxt/{svg.f181ef45.js → svg.f31a00cf.js} +1 -1
- package/dist/client/_nuxt/{vnodes.accdbda6.js → vnodes.89b4b57e.js} +1 -1
- package/dist/client/index.html +4 -4
- package/dist/client/options/index.html +4 -4
- package/dist/client/png/index.html +4 -4
- package/dist/client/svg/index.html +4 -4
- package/dist/client/vnodes/index.html +4 -4
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -4
- package/dist/runtime/composables/defineOgImage.d.ts +2 -0
- package/dist/runtime/nitro/providers/{inline-css → css-inline}/node.d.ts +1 -1
- package/dist/runtime/nitro/providers/css-inline/node.mjs +10 -0
- package/dist/runtime/nitro/routes/html.mjs +4 -4
- package/package.json +13 -13
- package/dist/runtime/nitro/providers/inline-css/node.mjs +0 -11
- /package/dist/runtime/nitro/providers/{inline-css → css-inline}/mock.d.ts +0 -0
- /package/dist/runtime/nitro/providers/{inline-css → css-inline}/mock.mjs +0 -0
|
@@ -7,7 +7,7 @@ import twemoji from "twemoji";
|
|
|
7
7
|
import { defu } from "defu";
|
|
8
8
|
import { fetchOptionsCached } from "../utils.mjs";
|
|
9
9
|
import { useNitroOrigin, useRuntimeConfig } from "#imports";
|
|
10
|
-
import
|
|
10
|
+
import loadCSSInline from "#nuxt-og-image/css-inline";
|
|
11
11
|
export default defineEventHandler(async (e) => {
|
|
12
12
|
const { fonts, satoriOptions } = useRuntimeConfig()["nuxt-og-image"];
|
|
13
13
|
const query = getQuery(e);
|
|
@@ -130,8 +130,8 @@ img.emoji {
|
|
|
130
130
|
<head>${headChunk.headTags}</head>
|
|
131
131
|
<body ${headChunk.bodyAttrs}>${headChunk.bodyTagsOpen}<div style="position: relative; display: flex; margin: 0 auto; width: ${options.width}px; height: ${options.height}px; overflow: hidden;">${html}</div>${headChunk.bodyTags}</body>
|
|
132
132
|
</html>`;
|
|
133
|
-
const
|
|
134
|
-
if (!
|
|
133
|
+
const cssInline = loadCSSInline();
|
|
134
|
+
if (!cssInline.__mock) {
|
|
135
135
|
let hasInlineStyles = false;
|
|
136
136
|
const stylesheets = htmlTemplate.match(/<link rel="stylesheet" href=".*?">/g);
|
|
137
137
|
if (stylesheets) {
|
|
@@ -157,7 +157,7 @@ img.emoji {
|
|
|
157
157
|
}
|
|
158
158
|
if (hasInlineStyles) {
|
|
159
159
|
try {
|
|
160
|
-
htmlTemplate = await
|
|
160
|
+
htmlTemplate = await cssInline(htmlTemplate, {
|
|
161
161
|
url: nitroOrigin
|
|
162
162
|
});
|
|
163
163
|
} catch {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-og-image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
5
|
-
"packageManager": "pnpm@8.7.
|
|
4
|
+
"version": "2.0.28",
|
|
5
|
+
"packageManager": "pnpm@8.7.5",
|
|
6
6
|
"description": "Enlightened OG Image generation for Nuxt.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -27,13 +27,14 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@nuxt/kit": "^3.7.
|
|
30
|
+
"@nuxt/kit": "^3.7.3",
|
|
31
31
|
"@resvg/resvg-js": "^2.4.1",
|
|
32
32
|
"@resvg/resvg-wasm": "^2.4.1",
|
|
33
33
|
"@types/fs-extra": "^11.0.1",
|
|
34
34
|
"birpc": "0.2.14",
|
|
35
35
|
"chalk": "^5.3.0",
|
|
36
36
|
"chrome-launcher": "^1.0.0",
|
|
37
|
+
"css-inline": "^0.10.5",
|
|
37
38
|
"defu": "^6.1.2",
|
|
38
39
|
"execa": "^8.0.1",
|
|
39
40
|
"fast-glob": "^3.3.1",
|
|
@@ -41,15 +42,14 @@
|
|
|
41
42
|
"fs-extra": "^11.1.1",
|
|
42
43
|
"globby": "^13.2.2",
|
|
43
44
|
"image-size": "^1.0.2",
|
|
44
|
-
"inline-css": "^4.0.2",
|
|
45
45
|
"launch-editor": "^2.6.0",
|
|
46
|
-
"nuxt-site-config": "^1.1
|
|
47
|
-
"nuxt-site-config-kit": "^1.1
|
|
48
|
-
"nypm": "^0.3.
|
|
46
|
+
"nuxt-site-config": "^1.2.1",
|
|
47
|
+
"nuxt-site-config-kit": "^1.2.1",
|
|
48
|
+
"nypm": "^0.3.3",
|
|
49
49
|
"ofetch": "^1.3.3",
|
|
50
50
|
"ohash": "^1.1.3",
|
|
51
51
|
"pathe": "^1.1.1",
|
|
52
|
-
"playwright-core": "^1.
|
|
52
|
+
"playwright-core": "^1.38.0",
|
|
53
53
|
"radix3": "^1.1.0",
|
|
54
54
|
"satori": "0.10.4",
|
|
55
55
|
"satori-html": "^0.3.2",
|
|
@@ -64,19 +64,19 @@
|
|
|
64
64
|
"yoga-wasm-web": "^0.3.3"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@antfu/eslint-config": "^0.
|
|
67
|
+
"@antfu/eslint-config": "^0.42.0",
|
|
68
68
|
"@nuxt/devtools": "0.8.3",
|
|
69
69
|
"@nuxt/module-builder": "^0.5.1",
|
|
70
|
-
"@nuxt/test-utils": "3.7.
|
|
70
|
+
"@nuxt/test-utils": "3.7.3",
|
|
71
71
|
"@nuxtjs/eslint-config-typescript": "^12.1.0",
|
|
72
72
|
"@types/ws": "^8.5.5",
|
|
73
73
|
"bumpp": "^9.2.0",
|
|
74
74
|
"eslint": "8.49.0",
|
|
75
75
|
"jest-image-snapshot": "^6.2.0",
|
|
76
|
-
"nuxt": "^3.7.
|
|
76
|
+
"nuxt": "^3.7.3",
|
|
77
77
|
"nuxt-icon": "^0.5.0",
|
|
78
|
-
"playwright": "^1.
|
|
79
|
-
"sass": "^1.
|
|
78
|
+
"playwright": "^1.38.0",
|
|
79
|
+
"sass": "^1.67.0",
|
|
80
80
|
"vitest": "^0.34.4"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
File without changes
|
|
File without changes
|