nuxt-og-image 3.0.6 → 3.0.7

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.
@@ -1 +1 @@
1
- {"id":"1c6351cf-9fce-42b7-83f6-082f24455f16","timestamp":1729059411704}
1
+ {"id":"7b5267c6-e23f-4386-bec3-f9adec39833b","timestamp":1730262972216}
@@ -0,0 +1 @@
1
+ {"id":"7b5267c6-e23f-4386-bec3-f9adec39833b","timestamp":1730262972216,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -0,0 +1 @@
1
+ .spotlight[data-v-5213c595]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-5213c595]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media (prefers-color-scheme:light){.gradient-border[data-v-5213c595]{background-color:#ffffff4d}.gradient-border[data-v-5213c595]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-5213c595]{background-color:#1414144d}.gradient-border[data-v-5213c595]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82,#36e4da 75%,#0047e1)}}.gradient-border[data-v-5213c595]:before{background-size:400% auto;border-radius:.5rem;bottom:0;content:"";left:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;right:0;top:0;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-5213c595]:hover:before{background-position:-50% 0;opacity:1}.fixed[data-v-5213c595]{position:fixed}.left-0[data-v-5213c595]{left:0}.right-0[data-v-5213c595]{right:0}.z-10[data-v-5213c595]{z-index:10}.z-20[data-v-5213c595]{z-index:20}.grid[data-v-5213c595]{display:grid}.mb-16[data-v-5213c595]{margin-bottom:4rem}.mb-8[data-v-5213c595]{margin-bottom:2rem}.max-w-520px[data-v-5213c595]{max-width:520px}.min-h-screen[data-v-5213c595]{min-height:100vh}.w-full[data-v-5213c595]{width:100%}.flex[data-v-5213c595]{display:flex}.cursor-pointer[data-v-5213c595]{cursor:pointer}.place-content-center[data-v-5213c595]{place-content:center}.items-center[data-v-5213c595]{align-items:center}.justify-center[data-v-5213c595]{justify-content:center}.overflow-hidden[data-v-5213c595]{overflow:hidden}.bg-white[data-v-5213c595]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-4[data-v-5213c595]{padding-left:1rem;padding-right:1rem}.px-8[data-v-5213c595]{padding-left:2rem;padding-right:2rem}.py-2[data-v-5213c595]{padding-bottom:.5rem;padding-top:.5rem}.text-center[data-v-5213c595]{text-align:center}.text-8xl[data-v-5213c595]{font-size:6rem;line-height:1}.text-xl[data-v-5213c595]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-5213c595]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-5213c595]{font-weight:300}.font-medium[data-v-5213c595]{font-weight:500}.leading-tight[data-v-5213c595]{line-height:1.25}.font-sans[data-v-5213c595]{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}.antialiased[data-v-5213c595]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-5213c595]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-5213c595]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-5213c595]{padding-left:0;padding-right:0}.sm\:px-6[data-v-5213c595]{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3[data-v-5213c595]{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-4xl[data-v-5213c595]{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl[data-v-5213c595]{font-size:1.25rem;line-height:1.75rem}}
@@ -0,0 +1 @@
1
+ .spotlight[data-v-731bf5dc]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.fixed[data-v-731bf5dc]{position:fixed}.-bottom-1\/2[data-v-731bf5dc]{bottom:-50%}.left-0[data-v-731bf5dc]{left:0}.right-0[data-v-731bf5dc]{right:0}.grid[data-v-731bf5dc]{display:grid}.mb-16[data-v-731bf5dc]{margin-bottom:4rem}.mb-8[data-v-731bf5dc]{margin-bottom:2rem}.h-1\/2[data-v-731bf5dc]{height:50%}.max-w-520px[data-v-731bf5dc]{max-width:520px}.min-h-screen[data-v-731bf5dc]{min-height:100vh}.place-content-center[data-v-731bf5dc]{place-content:center}.overflow-hidden[data-v-731bf5dc]{overflow:hidden}.bg-white[data-v-731bf5dc]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8[data-v-731bf5dc]{padding-left:2rem;padding-right:2rem}.text-center[data-v-731bf5dc]{text-align:center}.text-8xl[data-v-731bf5dc]{font-size:6rem;line-height:1}.text-xl[data-v-731bf5dc]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-731bf5dc]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-731bf5dc]{font-weight:300}.font-medium[data-v-731bf5dc]{font-weight:500}.leading-tight[data-v-731bf5dc]{line-height:1.25}.font-sans[data-v-731bf5dc]{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}.antialiased[data-v-731bf5dc]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-731bf5dc]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-731bf5dc]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-731bf5dc]{padding-left:0;padding-right:0}.sm\:text-4xl[data-v-731bf5dc]{font-size:2.25rem;line-height:2.5rem}}
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html><html data-capo=""><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
- <link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.Dgcy1m_i.css">
4
- <link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CqVQiNS-.js">
3
+ <link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.ChwSb1tJ.css">
4
+ <link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DnBisYsJ.js">
5
5
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/35JD59R_.js">
6
6
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Ci-La1BS.js">
7
7
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DOAn35dn.js">
@@ -268,9 +268,9 @@
268
268
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CVO1_9PV.js">
269
269
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CG6Dc4jp.js">
270
270
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/B6E6ObS_.js">
271
- <link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-404.B1my0GLW.css">
272
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C8Z5-t5y.js">
273
- <link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-500.CqHIQwTo.css">
274
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/rcTrcRWB.js">
275
- <script type="module" src="/__nuxt-og-image/_nuxt/CqVQiNS-.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1729059443015,false]</script>
276
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"1c6351cf-9fce-42b7-83f6-082f24455f16",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
271
+ <link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-404.D4k1dunI.css">
272
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BMGF3Z6I.js">
273
+ <link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-500.Q7NSr7sn.css">
274
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/1EdnXNuB.js">
275
+ <script type="module" src="/__nuxt-og-image/_nuxt/DnBisYsJ.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1730263010859,false]</script>
276
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"7b5267c6-e23f-4386-bec3-f9adec39833b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "ogImage",
8
- "version": "3.0.5",
8
+ "version": "3.0.6",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "0.8.4",
11
11
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as fs from 'node:fs';
2
2
  import { existsSync } from 'node:fs';
3
3
  import { readFile, writeFile } from 'node:fs/promises';
4
- import { useNuxt, tryResolveModule, addTemplate, useLogger, resolvePath, loadNuxtModuleInstance, createResolver, defineNuxtModule, addImports, addBuildPlugin, hasNuxtModule, addServerPlugin, addServerHandler, addComponentsDir, addComponent, addPlugin } from '@nuxt/kit';
4
+ import { useNuxt, tryResolveModule, addTemplate, resolvePath, loadNuxtModuleInstance, createResolver, defineNuxtModule, useLogger, addImports, addBuildPlugin, hasNuxtModule, addServerPlugin, addServerHandler, addComponentsDir, addComponent, addPlugin } from '@nuxt/kit';
5
5
  import { defu } from 'defu';
6
6
  import { assertSiteConfig, installNuxtSiteConfig } from 'nuxt-site-config-kit';
7
7
  import { hash } from 'ohash';
@@ -13,7 +13,6 @@ import { createStorage } from 'unstorage';
13
13
  import fsDriver from 'unstorage/drivers/fs';
14
14
  import { createHash } from 'node:crypto';
15
15
  import { ensureDependencyInstalled } from 'nypm';
16
- import { colorize } from 'consola/utils';
17
16
  import { relative } from 'node:path';
18
17
  import { onDevToolsInitialized, extendServerRpc } from '@nuxt/devtools-kit';
19
18
  import { pathToFileURL } from 'node:url';
@@ -196,9 +195,6 @@ function ensureDependencies(dep, nuxt = useNuxt()) {
196
195
  }));
197
196
  }
198
197
 
199
- const logger = useLogger("@nuxtjs/og-image");
200
- const gray = (s) => colorize("gray", s);
201
-
202
198
  async function setupBuildHandler(config, resolve, nuxt = useNuxt()) {
203
199
  nuxt.options.nitro.storage = nuxt.options.nitro.storage || {};
204
200
  if (typeof config.runtimeCacheStorage === "object")
@@ -211,30 +207,24 @@ async function setupBuildHandler(config, resolve, nuxt = useNuxt()) {
211
207
  nitroConfig.alias.queue = "unenv/runtime/mock/proxy-cjs";
212
208
  });
213
209
  nuxt.hooks.hook("nitro:init", async (nitro) => {
210
+ const target = resolveNitroPreset(nitro.options);
211
+ const isCloudflarePagesOrModule = target === "cloudflare-pages" || target === "cloudflare-module";
212
+ if (isCloudflarePagesOrModule) {
213
+ nitro.options.cloudflare.pages.routes = nitro.options.cloudflare.pages.routes || { exclude: [] };
214
+ nitro.options.cloudflare.pages.routes.exclude = nitro.options.cloudflare.pages.routes.exclude || [];
215
+ nitro.options.cloudflare.pages.routes.exclude.push("/__og-image__/static/*");
216
+ }
214
217
  nitro.hooks.hook("compiled", async (_nitro) => {
215
- const target = resolveNitroPreset(_nitro.options);
216
218
  const compatibility = getPresetNitroPresetCompatibility(target);
217
219
  if (compatibility.wasm?.esmImport !== true)
218
220
  return;
219
221
  const configuredEntry = nitro.options.rollupConfig?.output.entryFileNames;
220
222
  const serverEntry = resolve(_nitro.options.output.serverDir, typeof configuredEntry === "string" ? configuredEntry : "index.mjs");
221
223
  const wasmEntries = [serverEntry];
222
- const isCloudflarePagesOrModule = target === "cloudflare-pages" || target === "cloudflare-module";
223
224
  if (isCloudflarePagesOrModule) {
224
225
  wasmEntries.push(resolve(dirname(serverEntry), "./chunks/wasm.mjs"));
225
226
  wasmEntries.push(resolve(dirname(serverEntry), "./chunks/_/wasm.mjs"));
226
227
  wasmEntries.push(resolve(dirname(serverEntry), "./chunks/index_bg.mjs"));
227
- const routesPath = resolve(nitro.options.output.publicDir, "_routes.json");
228
- if (existsSync(routesPath)) {
229
- const routes = await readFile(routesPath).then((buffer) => JSON.parse(buffer.toString()));
230
- const preSize = routes.exclude.length;
231
- routes.exclude = routes.exclude.filter((path) => !path.startsWith("/__og-image__/static"));
232
- routes.exclude.push("/__og-image__/static/*");
233
- if (preSize !== routes.exclude.length) {
234
- logger.info(`Optimizing CloudFlare \`_routes.json\` for prerendered OG Images ${gray(`(${100 - Math.round(routes.exclude.length / preSize * 100)}% smaller)`)}`);
235
- }
236
- await writeFile(routesPath, JSON.stringify(routes, void 0, 2));
237
- }
238
228
  }
239
229
  const resvgHash = await resolveFilePathSha1("@resvg/resvg-wasm/index_bg.wasm");
240
230
  const yogaHash = await resolveFilePathSha1("yoga-wasm-web/dist/yoga.wasm");
@@ -720,7 +710,7 @@ const module = defineNuxtModule({
720
710
  nuxt.options.nitro.serverAssets = nuxt.options.nitro.serverAssets || [];
721
711
  nuxt.options.nitro.serverAssets.push({ baseName: "nuxt-og-image:fonts", dir: serverFontsDir });
722
712
  }
723
- nuxt.options.experimental.componentIslands = true;
713
+ nuxt.options.experimental.componentIslands ||= true;
724
714
  const basePath = config.zeroRuntime ? "./runtime/nitro/routes/__zero-runtime" : "./runtime/nitro/routes";
725
715
  addServerHandler({
726
716
  lazy: true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-og-image",
3
3
  "type": "module",
4
- "version": "3.0.6",
4
+ "version": "3.0.7",
5
5
  "description": "Enlightened OG Image generation for Nuxt.",
6
6
  "author": {
7
7
  "website": "https://harlanzw.com",
@@ -39,11 +39,11 @@
39
39
  "@nuxt/kit": "^3.13.2",
40
40
  "@resvg/resvg-js": "^2.6.2",
41
41
  "@resvg/resvg-wasm": "^2.6.2",
42
- "@unocss/core": "^0.63.4",
43
- "@unocss/preset-wind": "^0.63.4",
42
+ "@unocss/core": "^0.63.6",
43
+ "@unocss/preset-wind": "^0.63.6",
44
44
  "chrome-launcher": "^1.1.2",
45
45
  "defu": "^6.1.4",
46
- "execa": "^9.4.0",
46
+ "execa": "^9.5.1",
47
47
  "image-size": "^1.1.1",
48
48
  "magic-string": "^0.30.12",
49
49
  "nuxt-site-config": "^2.2.18",
@@ -53,7 +53,7 @@
53
53
  "ohash": "^1.1.4",
54
54
  "pathe": "^1.1.2",
55
55
  "pkg-types": "^1.2.1",
56
- "playwright-core": "^1.48.0",
56
+ "playwright-core": "^1.48.2",
57
57
  "radix3": "^1.1.2",
58
58
  "satori": "^0.11.2",
59
59
  "satori-html": "^0.3.2",
@@ -61,50 +61,51 @@
61
61
  "std-env": "^3.7.0",
62
62
  "strip-literal": "^2.1.0",
63
63
  "ufo": "^1.5.4",
64
- "unplugin": "^1.14.1",
64
+ "unplugin": "^1.15.0",
65
65
  "unwasm": "^0.3.9",
66
66
  "yoga-wasm-web": "^0.3.3"
67
67
  },
68
68
  "devDependencies": {
69
- "@antfu/eslint-config": "^3.7.3",
69
+ "@antfu/eslint-config": "^3.8.0",
70
70
  "@css-inline/css-inline": "^0.14.1",
71
71
  "@headlessui/vue": "^1.7.23",
72
- "@iconify-json/carbon": "^1.2.3",
72
+ "@iconify-json/carbon": "^1.2.4",
73
73
  "@iconify-json/logos": "^1.2.3",
74
74
  "@iconify-json/noto": "^1.2.1",
75
- "@iconify-json/ri": "^1.2.1",
76
- "@iconify-json/tabler": "^1.2.5",
75
+ "@iconify-json/ri": "^1.2.2",
76
+ "@iconify-json/tabler": "^1.2.6",
77
77
  "@img/sharp-linux-x64": "0.33.5",
78
78
  "@nuxt/content": "^2.13.4",
79
- "@nuxt/devtools": "1.5.1",
79
+ "@nuxt/devtools": "1.6.0",
80
80
  "@nuxt/devtools-ui-kit": "^1.6.0",
81
- "@nuxt/icon": "^1.5.6",
81
+ "@nuxt/icon": "^1.6.1",
82
82
  "@nuxt/image": "^1.8.1",
83
83
  "@nuxt/module-builder": "^0.8.4",
84
- "@nuxt/test-utils": "3.14.2",
84
+ "@nuxt/test-utils": "3.14.4",
85
85
  "@nuxt/ui": "^2.18.7",
86
- "@nuxtjs/color-mode": "^3.5.1",
86
+ "@nuxtjs/color-mode": "^3.5.2",
87
87
  "@nuxtjs/eslint-config-typescript": "^12.1.0",
88
88
  "@nuxtjs/i18n": "^8.5.5",
89
- "@nuxtjs/tailwindcss": "^6.12.1",
90
- "@unocss/nuxt": "^0.63.4",
91
- "@unocss/preset-icons": "^0.63.4",
92
- "@unocss/preset-uno": "^0.63.4",
93
- "@unocss/runtime": "^0.63.4",
89
+ "@nuxtjs/tailwindcss": "^6.12.2",
90
+ "@unocss/nuxt": "^0.63.6",
91
+ "@unocss/preset-icons": "^0.63.6",
92
+ "@unocss/preset-uno": "^0.63.6",
93
+ "@unocss/runtime": "^0.63.6",
94
94
  "@vueuse/nuxt": "^11.1.0",
95
- "bumpp": "^9.7.1",
96
- "eslint": "9.11.1",
95
+ "bumpp": "^9.8.0",
96
+ "eslint": "9.13.0",
97
97
  "jest-image-snapshot": "^6.4.0",
98
98
  "nuxt": "^3.13.2",
99
- "playwright": "^1.48.0",
100
- "sass": "^1.79.5",
99
+ "playwright": "^1.48.2",
100
+ "sass": "^1.80.5",
101
101
  "sharp": "^0.33.5",
102
102
  "typescript": "^5.6.3",
103
- "unocss": "^0.63.4",
104
- "vitest": "^2.1.3"
103
+ "unocss": "^0.63.6",
104
+ "vitest": "^2.1.4"
105
105
  },
106
106
  "resolutions": {
107
- "vue": "3.5.4",
107
+ "@vue/server-renderer": "3.5.12",
108
+ "vue": "3.5.12",
108
109
  "vue-router": "4.4.4"
109
110
  },
110
111
  "build": {