nuxt-og-image 6.4.10 → 6.4.11
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/chunks/tw4.cjs +1 -1
- package/dist/chunks/tw4.mjs +1 -1
- package/dist/chunks/uno.cjs +1 -1
- package/dist/chunks/uno.mjs +1 -1
- package/dist/devtools/200.html +1 -1
- package/dist/devtools/404.html +1 -1
- package/dist/devtools/_nuxt/builds/latest.json +1 -1
- package/dist/devtools/_nuxt/builds/meta/f5ab59da-c358-4620-9199-a781a72853fc.json +1 -0
- package/dist/devtools/debug/index.html +1 -1
- package/dist/devtools/docs/index.html +1 -1
- package/dist/devtools/index.html +1 -1
- package/dist/devtools/templates/index.html +1 -1
- package/dist/module.cjs +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/shared/{nuxt-og-image.BDOahTU5.cjs → nuxt-og-image.BeFRTBhf.cjs} +148 -10
- package/dist/shared/{nuxt-og-image.C2Ejsw_g.mjs → nuxt-og-image.Buyb0q_F.mjs} +147 -9
- package/package.json +1 -1
- package/dist/devtools/_nuxt/builds/meta/dc070c1e-9f70-4119-bc66-db0dd8a0649d.json +0 -1
package/dist/chunks/tw4.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const node_url = require('node:url');
|
|
|
5
5
|
const exsolve = require('exsolve');
|
|
6
6
|
const pathe = require('pathe');
|
|
7
7
|
const cssProvider = require('./css-provider.cjs');
|
|
8
|
-
const module$1 = require('../shared/nuxt-og-image.
|
|
8
|
+
const module$1 = require('../shared/nuxt-og-image.BeFRTBhf.cjs');
|
|
9
9
|
require('node:fs');
|
|
10
10
|
require('@nuxt/kit');
|
|
11
11
|
require('defu');
|
package/dist/chunks/tw4.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { pathToFileURL } from 'node:url';
|
|
|
3
3
|
import { resolveModulePath } from 'exsolve';
|
|
4
4
|
import { dirname, join } from 'pathe';
|
|
5
5
|
import { extractVariantBaseClasses, resolveVariantPrefixes } from './css-provider.mjs';
|
|
6
|
-
import { g as resolveVarsDeep, s as simplifyCss, p as postProcessStyles, l as loadLightningCss, e as extractCssVars, b as extractUniversalVars, c as extractPerClassVars, d as extractClassStyles } from '../shared/nuxt-og-image.
|
|
6
|
+
import { g as resolveVarsDeep, s as simplifyCss, p as postProcessStyles, l as loadLightningCss, e as extractCssVars, b as extractUniversalVars, c as extractPerClassVars, d as extractClassStyles } from '../shared/nuxt-og-image.Buyb0q_F.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import '@nuxt/kit';
|
|
9
9
|
import 'defu';
|
package/dist/chunks/uno.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const promises = require('node:fs/promises');
|
|
|
4
4
|
const defu = require('defu');
|
|
5
5
|
const logger_js = require('../../dist/runtime/logger.js');
|
|
6
6
|
const cssProvider = require('./css-provider.cjs');
|
|
7
|
-
const module$1 = require('../shared/nuxt-og-image.
|
|
7
|
+
const module$1 = require('../shared/nuxt-og-image.BeFRTBhf.cjs');
|
|
8
8
|
require('exsolve');
|
|
9
9
|
require('node:fs');
|
|
10
10
|
require('node:url');
|
package/dist/chunks/uno.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { readFile } from 'node:fs/promises';
|
|
|
2
2
|
import { defu } from 'defu';
|
|
3
3
|
import { logger } from '../../dist/runtime/logger.js';
|
|
4
4
|
import { extractVariantBaseClasses, resolveVariantPrefixes } from './css-provider.mjs';
|
|
5
|
-
import { s as simplifyCss, e as extractCssVars, a as extractPropertyInitialValues, b as extractUniversalVars, c as extractPerClassVars, d as extractClassStyles, p as postProcessStyles, f as extractVarsFromCss, r as resolveExtractedVars } from '../shared/nuxt-og-image.
|
|
5
|
+
import { s as simplifyCss, e as extractCssVars, a as extractPropertyInitialValues, b as extractUniversalVars, c as extractPerClassVars, d as extractClassStyles, p as postProcessStyles, f as extractVarsFromCss, r as resolveExtractedVars } from '../shared/nuxt-og-image.Buyb0q_F.mjs';
|
|
6
6
|
import 'exsolve';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:url';
|
package/dist/devtools/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"f5ab59da-c358-4620-9199-a781a72853fc",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777875090615,false]</script></body></html>
|
package/dist/devtools/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"f5ab59da-c358-4620-9199-a781a72853fc",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777875090615,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"f5ab59da-c358-4620-9199-a781a72853fc","timestamp":1777875083321}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"f5ab59da-c358-4620-9199-a781a72853fc","timestamp":1777875083321,"prerendered":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"f5ab59da-c358-4620-9199-a781a72853fc",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777875090613,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"f5ab59da-c358-4620-9199-a781a72853fc",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777875090615,false]</script></body></html>
|
package/dist/devtools/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"f5ab59da-c358-4620-9199-a781a72853fc",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777875090615,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"f5ab59da-c358-4620-9199-a781a72853fc",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777875090615,false]</script></body></html>
|
package/dist/module.cjs
CHANGED
|
@@ -9,7 +9,7 @@ require('nuxt-site-config/kit');
|
|
|
9
9
|
require('ohash');
|
|
10
10
|
require('pathe');
|
|
11
11
|
require('pkg-types');
|
|
12
|
-
const module$1 = require('./shared/nuxt-og-image.
|
|
12
|
+
const module$1 = require('./shared/nuxt-og-image.BeFRTBhf.cjs');
|
|
13
13
|
require('nuxtseo-shared/kit');
|
|
14
14
|
require('../dist/runtime/logger.js');
|
|
15
15
|
require('node:crypto');
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import 'nuxt-site-config/kit';
|
|
|
7
7
|
import 'ohash';
|
|
8
8
|
import 'pathe';
|
|
9
9
|
import 'pkg-types';
|
|
10
|
-
export { m as default } from './shared/nuxt-og-image.
|
|
10
|
+
export { m as default } from './shared/nuxt-og-image.Buyb0q_F.mjs';
|
|
11
11
|
import 'nuxtseo-shared/kit';
|
|
12
12
|
import '../dist/runtime/logger.js';
|
|
13
13
|
import 'node:crypto';
|
|
@@ -1682,6 +1682,8 @@ const fontFace = {
|
|
|
1682
1682
|
|
|
1683
1683
|
const RE_FONT_FACE_BLOCK = /@font-face\s*\{[^}]+\}/g;
|
|
1684
1684
|
const RE_FONT_KEY = /^(.+)-(\d+)-(.+)$/;
|
|
1685
|
+
const RE_FONT_EXT = /\.(?:woff2?|ttf|otf)$/i;
|
|
1686
|
+
const RE_NON_WORD = /\W+/g;
|
|
1685
1687
|
const FONTS_URL_PREFIX = "/_fonts";
|
|
1686
1688
|
const STATIC_FONTS_PREFIX = "/_og-static-fonts";
|
|
1687
1689
|
function fontKey(f) {
|
|
@@ -1766,6 +1768,105 @@ async function parseAppCssFontFaces(nuxt) {
|
|
|
1766
1768
|
}
|
|
1767
1769
|
return results;
|
|
1768
1770
|
}
|
|
1771
|
+
function fontFamilyToSlug(family) {
|
|
1772
|
+
return family.toLowerCase().replace(RE_NON_WORD, "");
|
|
1773
|
+
}
|
|
1774
|
+
function normalizeConfiguredWeights(value) {
|
|
1775
|
+
if (!Array.isArray(value))
|
|
1776
|
+
return [400, 700];
|
|
1777
|
+
const weights = /* @__PURE__ */ new Set();
|
|
1778
|
+
for (const entry of value) {
|
|
1779
|
+
if (typeof entry === "number") {
|
|
1780
|
+
weights.add(entry);
|
|
1781
|
+
continue;
|
|
1782
|
+
}
|
|
1783
|
+
if (typeof entry === "string") {
|
|
1784
|
+
const matches = entry.match(/\d{3}/g) || [];
|
|
1785
|
+
for (const match of matches)
|
|
1786
|
+
weights.add(Number(match));
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
return weights.size > 0 ? [...weights] : [400, 700];
|
|
1790
|
+
}
|
|
1791
|
+
function normalizeConfiguredStyles(value) {
|
|
1792
|
+
if (!Array.isArray(value))
|
|
1793
|
+
return ["normal", "italic"];
|
|
1794
|
+
const styles = value.filter((style) => style === "normal" || style === "italic");
|
|
1795
|
+
return styles.length > 0 ? styles : ["normal"];
|
|
1796
|
+
}
|
|
1797
|
+
function detectWeight(filename) {
|
|
1798
|
+
const numeric = filename.match(/(?:^|[-_])([1-9]00)(?:[-_.]|$)/)?.[1];
|
|
1799
|
+
if (numeric)
|
|
1800
|
+
return Number(numeric);
|
|
1801
|
+
if (/(?:^|[-_])bold(?:[-_.]|$)/i.test(filename))
|
|
1802
|
+
return 700;
|
|
1803
|
+
if (/(?:^|[-_])regular(?:[-_.]|$)/i.test(filename))
|
|
1804
|
+
return 400;
|
|
1805
|
+
}
|
|
1806
|
+
function detectStyle(filename) {
|
|
1807
|
+
return /(?:^|[-_])(?:italic|oblique)(?:[-_.]|$)/i.test(filename) ? "italic" : "normal";
|
|
1808
|
+
}
|
|
1809
|
+
function stripFontDescriptors(filename) {
|
|
1810
|
+
return filename.replace(RE_FONT_EXT, "").replace(/(?:^|[-_])(?:[1-9]00|thin|extra[-_]?light|light|regular|normal|medium|semi[-_]?bold|bold|extra[-_]?bold|black|italic|oblique|latin(?:[-_]?ext)?|cyrillic(?:[-_]?ext)?|greek(?:[-_]?ext)?|vietnamese)(?=[-_.]|$)/gi, "").replace(/[-_]+$/g, "");
|
|
1811
|
+
}
|
|
1812
|
+
function parseConfiguredLocalFonts(nuxt) {
|
|
1813
|
+
const families = nuxt.options.fonts?.families || [];
|
|
1814
|
+
const localFamilies = families.filter(
|
|
1815
|
+
(f) => typeof f.name === "string" && f.global === true && (f.provider === "local" || typeof f.src === "string")
|
|
1816
|
+
);
|
|
1817
|
+
if (localFamilies.length === 0)
|
|
1818
|
+
return [];
|
|
1819
|
+
const publicDir = pathe.join(nuxt.options.rootDir, "public");
|
|
1820
|
+
const fontsDir = pathe.join(publicDir, "fonts");
|
|
1821
|
+
if (!fs.existsSync(fontsDir))
|
|
1822
|
+
return [];
|
|
1823
|
+
const files = [];
|
|
1824
|
+
const walk = (dir) => {
|
|
1825
|
+
for (const entry of fs__namespace.readdirSync(dir, { withFileTypes: true })) {
|
|
1826
|
+
const path = pathe.join(dir, entry.name);
|
|
1827
|
+
if (entry.isDirectory()) {
|
|
1828
|
+
walk(path);
|
|
1829
|
+
} else if (RE_FONT_EXT.test(entry.name)) {
|
|
1830
|
+
files.push(path);
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
};
|
|
1834
|
+
walk(fontsDir);
|
|
1835
|
+
files.sort();
|
|
1836
|
+
const results = [];
|
|
1837
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1838
|
+
for (const family of localFamilies) {
|
|
1839
|
+
const name = family.name;
|
|
1840
|
+
const familySlug = fontFamilyToSlug(name);
|
|
1841
|
+
const weights = normalizeConfiguredWeights(family.weights);
|
|
1842
|
+
const styles = normalizeConfiguredStyles(family.styles);
|
|
1843
|
+
for (const file of files) {
|
|
1844
|
+
const filename = file.split("/").pop() || file;
|
|
1845
|
+
if (fontFamilyToSlug(stripFontDescriptors(filename)) !== familySlug)
|
|
1846
|
+
continue;
|
|
1847
|
+
const weight = detectWeight(filename);
|
|
1848
|
+
const style = detectStyle(filename);
|
|
1849
|
+
if (!weight || !weights.includes(weight) || !styles.includes(style))
|
|
1850
|
+
continue;
|
|
1851
|
+
const src = `/${pathe.relative(publicDir, file)}`;
|
|
1852
|
+
const key = fontKey({ family: name, weight, style });
|
|
1853
|
+
if (seen.has(key))
|
|
1854
|
+
continue;
|
|
1855
|
+
seen.add(key);
|
|
1856
|
+
results.push({
|
|
1857
|
+
family: name,
|
|
1858
|
+
src,
|
|
1859
|
+
weight,
|
|
1860
|
+
style,
|
|
1861
|
+
satoriSrc: src.endsWith(".woff2") ? void 0 : src
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
results.sort(
|
|
1866
|
+
(a, b) => a.family.localeCompare(b.family) || a.weight - b.weight || (a.style === b.style ? 0 : a.style === "normal" ? -1 : 1) || a.src.localeCompare(b.src)
|
|
1867
|
+
);
|
|
1868
|
+
return results;
|
|
1869
|
+
}
|
|
1769
1870
|
async function parseFontsFromTemplate(nuxt, options) {
|
|
1770
1871
|
const weightsKey = options.requiredWeights?.toSorted((a, b) => a - b).join(",") || "";
|
|
1771
1872
|
const cacheKey = `${options.convertedWoff2Files.size}:${[...options.convertedWoff2Files.keys()].toSorted().join(",")}:${weightsKey}`;
|
|
@@ -1902,6 +2003,14 @@ const RE_NON_ALPHANUMERIC = /[^a-z0-9]/gi;
|
|
|
1902
2003
|
function getFontlessContext(nuxt) {
|
|
1903
2004
|
return nuxt._ogImageFontless;
|
|
1904
2005
|
}
|
|
2006
|
+
function getNuxtFontsFamilyConfig(nuxt, family) {
|
|
2007
|
+
const families = nuxt.options.fonts?.families;
|
|
2008
|
+
return families?.find((f) => typeof f?.name === "string" && f.name.toLowerCase() === family.toLowerCase());
|
|
2009
|
+
}
|
|
2010
|
+
function isConfiguredLocalFontFamily(nuxt, family) {
|
|
2011
|
+
const config = getNuxtFontsFamilyConfig(nuxt, family);
|
|
2012
|
+
return !!config && config.global === true && (config.provider === "local" || typeof config.src === "string");
|
|
2013
|
+
}
|
|
1905
2014
|
async function initFontless(options) {
|
|
1906
2015
|
if (getFontlessContext(options.nuxt))
|
|
1907
2016
|
return;
|
|
@@ -2076,20 +2185,33 @@ async function downloadStaticFonts(options) {
|
|
|
2076
2185
|
}).filter((x) => x.matches.length > 0);
|
|
2077
2186
|
for (const family of unresolvedFamilies) {
|
|
2078
2187
|
const local = matchedLocal.find((m) => m.family === family);
|
|
2188
|
+
const configuredFamily = getNuxtFontsFamilyConfig(options.nuxt, family);
|
|
2079
2189
|
const lines = [
|
|
2080
2190
|
`Could not resolve font "${family}" for OG images.`,
|
|
2081
2191
|
` Tried providers: ${providerList}.`
|
|
2082
2192
|
];
|
|
2083
|
-
if (
|
|
2193
|
+
if (configuredFamily && configuredFamily.global !== true) {
|
|
2194
|
+
lines.push(
|
|
2195
|
+
` "${family}" is declared in fonts.families, but it is not global so @nuxt/fonts did not emit it in nuxt-fonts-global.css.`,
|
|
2196
|
+
` Set global: true, e.g. fonts: { families: [{ name: '${family}', provider: 'local', weights: [400, 700], global: true }] }.`
|
|
2197
|
+
);
|
|
2198
|
+
} else if (configuredFamily) {
|
|
2199
|
+
lines.push(
|
|
2200
|
+
` "${family}" is declared with global: true, but @nuxt/fonts still did not emit @font-face for it.`,
|
|
2201
|
+
` Check that the configured provider/src, weights, styles, and file names match the available font files.`
|
|
2202
|
+
);
|
|
2203
|
+
if (local)
|
|
2204
|
+
lines.push(` Found ${local.matches.length} matching file(s) under public/fonts/ (e.g. ${local.matches.slice(0, 2).join(", ")}).`);
|
|
2205
|
+
} else if (local) {
|
|
2084
2206
|
lines.push(
|
|
2085
2207
|
` Found ${local.matches.length} matching file(s) under public/fonts/ (e.g. ${local.matches.slice(0, 2).join(", ")}) but @nuxt/fonts did not emit @font-face for "${family}".`,
|
|
2086
|
-
` Tailwind v4 @theme variables are not scanned by @nuxt/fonts
|
|
2087
|
-
`
|
|
2208
|
+
` Tailwind v4 @theme variables are not scanned by @nuxt/fonts, and OG images only read globally emitted font faces.`,
|
|
2209
|
+
` Declare it explicitly with global: true, e.g. fonts: { families: [{ name: '${family}', provider: 'local', weights: [400, 700], global: true }] }.`
|
|
2088
2210
|
);
|
|
2089
2211
|
} else {
|
|
2090
2212
|
lines.push(
|
|
2091
2213
|
` Not a known Google/Bunny/Fontsource font, and no matching files under public/fonts/.`,
|
|
2092
|
-
` If this is a custom/local font, add it to nuxt.config: fonts: { families: [{ name: '${family}', src: '/path/to/font.woff2' }] }.`,
|
|
2214
|
+
` If this is a custom/local font, add it to nuxt.config with global: true: fonts: { families: [{ name: '${family}', src: '/path/to/font.woff2', global: true }] }.`,
|
|
2093
2215
|
` If it should resolve from a remote provider, check the spelling or add the provider to fonts.priority.`
|
|
2094
2216
|
);
|
|
2095
2217
|
}
|
|
@@ -2156,13 +2278,13 @@ async function resolveAndDownloadFamily(options) {
|
|
|
2156
2278
|
return results;
|
|
2157
2279
|
}
|
|
2158
2280
|
async function convertWoff2ToTtf(options) {
|
|
2159
|
-
const { nuxt, logger, fontRequirements, convertedWoff2Files, fontSubsets } = options;
|
|
2281
|
+
const { nuxt, logger, fontRequirements, convertedWoff2Files, fontSubsets, warnOnMissingStaticFonts = true } = options;
|
|
2160
2282
|
const parsedFonts = await parseFontsFromTemplate(nuxt, { convertedWoff2Files });
|
|
2161
2283
|
const hasNonWoff2 = new Set(
|
|
2162
2284
|
parsedFonts.filter((f) => !f.src.endsWith(".woff2")).map((f) => fontKey(f))
|
|
2163
2285
|
);
|
|
2164
2286
|
const woff2Fonts = parsedFonts.filter(
|
|
2165
|
-
(f) => f.src.endsWith(".woff2") && !hasNonWoff2.has(fontKey(f)) && fontRequirements.weights.includes(f.weight) && fontRequirements.styles.includes(f.style)
|
|
2287
|
+
(f) => f.src.endsWith(".woff2") && !hasNonWoff2.has(fontKey(f)) && !isConfiguredLocalFontFamily(nuxt, f.family) && fontRequirements.weights.includes(f.weight) && fontRequirements.styles.includes(f.style)
|
|
2166
2288
|
);
|
|
2167
2289
|
if (woff2Fonts.length === 0) {
|
|
2168
2290
|
logger.debug("No WOFF2 fonts to process");
|
|
@@ -2193,7 +2315,7 @@ async function convertWoff2ToTtf(options) {
|
|
|
2193
2315
|
}
|
|
2194
2316
|
if (convertedWoff2Files.size > 0) {
|
|
2195
2317
|
logger.debug(`Resolved ${convertedWoff2Files.size} static font files via fontless`);
|
|
2196
|
-
} else {
|
|
2318
|
+
} else if (warnOnMissingStaticFonts) {
|
|
2197
2319
|
logger.warn(`No static fonts available for Satori. Falling back to bundled Inter font. Consider using 'takumi' renderer for variable font support.`);
|
|
2198
2320
|
}
|
|
2199
2321
|
} catch (err) {
|
|
@@ -2219,6 +2341,20 @@ async function resolveOgImageFonts(options) {
|
|
|
2219
2341
|
const { nuxt, hasNuxtFonts, hasSatoriRenderer, hasTakumiRenderer, convertedWoff2Files, fontSubsets, fontRequirements, tw4FontVars, logger, ogFontsDir } = options;
|
|
2220
2342
|
const staticInterFonts = getStaticInterFonts(ogFontsDir);
|
|
2221
2343
|
const allFonts = hasNuxtFonts ? await parseFontsFromTemplate(nuxt, { convertedWoff2Files, requiredWeights: fontRequirements.weights }) : [];
|
|
2344
|
+
if (hasNuxtFonts) {
|
|
2345
|
+
const configuredLocalFonts = parseConfiguredLocalFonts(nuxt);
|
|
2346
|
+
if (configuredLocalFonts.length > 0) {
|
|
2347
|
+
const existingKeys = new Set(allFonts.map((f) => `${f.family}-${f.weight}-${f.style}`));
|
|
2348
|
+
for (const font of configuredLocalFonts) {
|
|
2349
|
+
const key = `${font.family}-${font.weight}-${font.style}`;
|
|
2350
|
+
if (!existingKeys.has(key)) {
|
|
2351
|
+
allFonts.push(font);
|
|
2352
|
+
existingKeys.add(key);
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
logger.debug(`Resolved ${configuredLocalFonts.length} configured local font faces from public/fonts`);
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2222
2358
|
const detectedSubsets = extractSubsetNames(allFonts);
|
|
2223
2359
|
const effectiveSubsets = detectedSubsets.length > 0 ? detectedSubsets : fontSubsets || ["latin"];
|
|
2224
2360
|
const appCssFonts = await parseAppCssFontFaces(nuxt).catch(() => []);
|
|
@@ -4386,7 +4522,7 @@ const module$1 = kit.defineNuxtModule({
|
|
|
4386
4522
|
await onUpgrade(nuxt, options, previousVersion);
|
|
4387
4523
|
},
|
|
4388
4524
|
async setup(config, nuxt) {
|
|
4389
|
-
const _resolver = kit.createResolver((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/nuxt-og-image.
|
|
4525
|
+
const _resolver = kit.createResolver((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/nuxt-og-image.BeFRTBhf.cjs', document.baseURI).href)));
|
|
4390
4526
|
const fixSharedPath = (p) => {
|
|
4391
4527
|
if (p.includes("/shared/runtime/"))
|
|
4392
4528
|
return p.replace("/shared/runtime/", "/runtime/");
|
|
@@ -5161,7 +5297,8 @@ export const resolve = (import.meta.dev || import.meta.prerender) ? devResolve :
|
|
|
5161
5297
|
logger: logger_js.logger,
|
|
5162
5298
|
fontRequirements: fontRequirementsState,
|
|
5163
5299
|
convertedWoff2Files,
|
|
5164
|
-
fontSubsets: config.fontSubsets
|
|
5300
|
+
fontSubsets: config.fontSubsets,
|
|
5301
|
+
warnOnMissingStaticFonts: hasSatoriRenderer()
|
|
5165
5302
|
});
|
|
5166
5303
|
}
|
|
5167
5304
|
const fonts = await resolveOgImageFonts({
|
|
@@ -5232,7 +5369,8 @@ export const rootDir = ${JSON.stringify(nuxt.options.rootDir)}`;
|
|
|
5232
5369
|
logger: logger_js.logger,
|
|
5233
5370
|
fontRequirements: fontRequirementsState,
|
|
5234
5371
|
convertedWoff2Files,
|
|
5235
|
-
fontSubsets: config.fontSubsets
|
|
5372
|
+
fontSubsets: config.fontSubsets,
|
|
5373
|
+
warnOnMissingStaticFonts: hasSatoriRenderer()
|
|
5236
5374
|
});
|
|
5237
5375
|
fontProcessingDone = true;
|
|
5238
5376
|
});
|
|
@@ -1662,6 +1662,8 @@ const fontFace = {
|
|
|
1662
1662
|
|
|
1663
1663
|
const RE_FONT_FACE_BLOCK = /@font-face\s*\{[^}]+\}/g;
|
|
1664
1664
|
const RE_FONT_KEY = /^(.+)-(\d+)-(.+)$/;
|
|
1665
|
+
const RE_FONT_EXT = /\.(?:woff2?|ttf|otf)$/i;
|
|
1666
|
+
const RE_NON_WORD = /\W+/g;
|
|
1665
1667
|
const FONTS_URL_PREFIX = "/_fonts";
|
|
1666
1668
|
const STATIC_FONTS_PREFIX = "/_og-static-fonts";
|
|
1667
1669
|
function fontKey(f) {
|
|
@@ -1746,6 +1748,105 @@ async function parseAppCssFontFaces(nuxt) {
|
|
|
1746
1748
|
}
|
|
1747
1749
|
return results;
|
|
1748
1750
|
}
|
|
1751
|
+
function fontFamilyToSlug(family) {
|
|
1752
|
+
return family.toLowerCase().replace(RE_NON_WORD, "");
|
|
1753
|
+
}
|
|
1754
|
+
function normalizeConfiguredWeights(value) {
|
|
1755
|
+
if (!Array.isArray(value))
|
|
1756
|
+
return [400, 700];
|
|
1757
|
+
const weights = /* @__PURE__ */ new Set();
|
|
1758
|
+
for (const entry of value) {
|
|
1759
|
+
if (typeof entry === "number") {
|
|
1760
|
+
weights.add(entry);
|
|
1761
|
+
continue;
|
|
1762
|
+
}
|
|
1763
|
+
if (typeof entry === "string") {
|
|
1764
|
+
const matches = entry.match(/\d{3}/g) || [];
|
|
1765
|
+
for (const match of matches)
|
|
1766
|
+
weights.add(Number(match));
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
return weights.size > 0 ? [...weights] : [400, 700];
|
|
1770
|
+
}
|
|
1771
|
+
function normalizeConfiguredStyles(value) {
|
|
1772
|
+
if (!Array.isArray(value))
|
|
1773
|
+
return ["normal", "italic"];
|
|
1774
|
+
const styles = value.filter((style) => style === "normal" || style === "italic");
|
|
1775
|
+
return styles.length > 0 ? styles : ["normal"];
|
|
1776
|
+
}
|
|
1777
|
+
function detectWeight(filename) {
|
|
1778
|
+
const numeric = filename.match(/(?:^|[-_])([1-9]00)(?:[-_.]|$)/)?.[1];
|
|
1779
|
+
if (numeric)
|
|
1780
|
+
return Number(numeric);
|
|
1781
|
+
if (/(?:^|[-_])bold(?:[-_.]|$)/i.test(filename))
|
|
1782
|
+
return 700;
|
|
1783
|
+
if (/(?:^|[-_])regular(?:[-_.]|$)/i.test(filename))
|
|
1784
|
+
return 400;
|
|
1785
|
+
}
|
|
1786
|
+
function detectStyle(filename) {
|
|
1787
|
+
return /(?:^|[-_])(?:italic|oblique)(?:[-_.]|$)/i.test(filename) ? "italic" : "normal";
|
|
1788
|
+
}
|
|
1789
|
+
function stripFontDescriptors(filename) {
|
|
1790
|
+
return filename.replace(RE_FONT_EXT, "").replace(/(?:^|[-_])(?:[1-9]00|thin|extra[-_]?light|light|regular|normal|medium|semi[-_]?bold|bold|extra[-_]?bold|black|italic|oblique|latin(?:[-_]?ext)?|cyrillic(?:[-_]?ext)?|greek(?:[-_]?ext)?|vietnamese)(?=[-_.]|$)/gi, "").replace(/[-_]+$/g, "");
|
|
1791
|
+
}
|
|
1792
|
+
function parseConfiguredLocalFonts(nuxt) {
|
|
1793
|
+
const families = nuxt.options.fonts?.families || [];
|
|
1794
|
+
const localFamilies = families.filter(
|
|
1795
|
+
(f) => typeof f.name === "string" && f.global === true && (f.provider === "local" || typeof f.src === "string")
|
|
1796
|
+
);
|
|
1797
|
+
if (localFamilies.length === 0)
|
|
1798
|
+
return [];
|
|
1799
|
+
const publicDir = join(nuxt.options.rootDir, "public");
|
|
1800
|
+
const fontsDir = join(publicDir, "fonts");
|
|
1801
|
+
if (!existsSync(fontsDir))
|
|
1802
|
+
return [];
|
|
1803
|
+
const files = [];
|
|
1804
|
+
const walk = (dir) => {
|
|
1805
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
1806
|
+
const path = join(dir, entry.name);
|
|
1807
|
+
if (entry.isDirectory()) {
|
|
1808
|
+
walk(path);
|
|
1809
|
+
} else if (RE_FONT_EXT.test(entry.name)) {
|
|
1810
|
+
files.push(path);
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
};
|
|
1814
|
+
walk(fontsDir);
|
|
1815
|
+
files.sort();
|
|
1816
|
+
const results = [];
|
|
1817
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1818
|
+
for (const family of localFamilies) {
|
|
1819
|
+
const name = family.name;
|
|
1820
|
+
const familySlug = fontFamilyToSlug(name);
|
|
1821
|
+
const weights = normalizeConfiguredWeights(family.weights);
|
|
1822
|
+
const styles = normalizeConfiguredStyles(family.styles);
|
|
1823
|
+
for (const file of files) {
|
|
1824
|
+
const filename = file.split("/").pop() || file;
|
|
1825
|
+
if (fontFamilyToSlug(stripFontDescriptors(filename)) !== familySlug)
|
|
1826
|
+
continue;
|
|
1827
|
+
const weight = detectWeight(filename);
|
|
1828
|
+
const style = detectStyle(filename);
|
|
1829
|
+
if (!weight || !weights.includes(weight) || !styles.includes(style))
|
|
1830
|
+
continue;
|
|
1831
|
+
const src = `/${relative(publicDir, file)}`;
|
|
1832
|
+
const key = fontKey({ family: name, weight, style });
|
|
1833
|
+
if (seen.has(key))
|
|
1834
|
+
continue;
|
|
1835
|
+
seen.add(key);
|
|
1836
|
+
results.push({
|
|
1837
|
+
family: name,
|
|
1838
|
+
src,
|
|
1839
|
+
weight,
|
|
1840
|
+
style,
|
|
1841
|
+
satoriSrc: src.endsWith(".woff2") ? void 0 : src
|
|
1842
|
+
});
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
results.sort(
|
|
1846
|
+
(a, b) => a.family.localeCompare(b.family) || a.weight - b.weight || (a.style === b.style ? 0 : a.style === "normal" ? -1 : 1) || a.src.localeCompare(b.src)
|
|
1847
|
+
);
|
|
1848
|
+
return results;
|
|
1849
|
+
}
|
|
1749
1850
|
async function parseFontsFromTemplate(nuxt, options) {
|
|
1750
1851
|
const weightsKey = options.requiredWeights?.toSorted((a, b) => a - b).join(",") || "";
|
|
1751
1852
|
const cacheKey = `${options.convertedWoff2Files.size}:${[...options.convertedWoff2Files.keys()].toSorted().join(",")}:${weightsKey}`;
|
|
@@ -1882,6 +1983,14 @@ const RE_NON_ALPHANUMERIC = /[^a-z0-9]/gi;
|
|
|
1882
1983
|
function getFontlessContext(nuxt) {
|
|
1883
1984
|
return nuxt._ogImageFontless;
|
|
1884
1985
|
}
|
|
1986
|
+
function getNuxtFontsFamilyConfig(nuxt, family) {
|
|
1987
|
+
const families = nuxt.options.fonts?.families;
|
|
1988
|
+
return families?.find((f) => typeof f?.name === "string" && f.name.toLowerCase() === family.toLowerCase());
|
|
1989
|
+
}
|
|
1990
|
+
function isConfiguredLocalFontFamily(nuxt, family) {
|
|
1991
|
+
const config = getNuxtFontsFamilyConfig(nuxt, family);
|
|
1992
|
+
return !!config && config.global === true && (config.provider === "local" || typeof config.src === "string");
|
|
1993
|
+
}
|
|
1885
1994
|
async function initFontless(options) {
|
|
1886
1995
|
if (getFontlessContext(options.nuxt))
|
|
1887
1996
|
return;
|
|
@@ -2056,20 +2165,33 @@ async function downloadStaticFonts(options) {
|
|
|
2056
2165
|
}).filter((x) => x.matches.length > 0);
|
|
2057
2166
|
for (const family of unresolvedFamilies) {
|
|
2058
2167
|
const local = matchedLocal.find((m) => m.family === family);
|
|
2168
|
+
const configuredFamily = getNuxtFontsFamilyConfig(options.nuxt, family);
|
|
2059
2169
|
const lines = [
|
|
2060
2170
|
`Could not resolve font "${family}" for OG images.`,
|
|
2061
2171
|
` Tried providers: ${providerList}.`
|
|
2062
2172
|
];
|
|
2063
|
-
if (
|
|
2173
|
+
if (configuredFamily && configuredFamily.global !== true) {
|
|
2174
|
+
lines.push(
|
|
2175
|
+
` "${family}" is declared in fonts.families, but it is not global so @nuxt/fonts did not emit it in nuxt-fonts-global.css.`,
|
|
2176
|
+
` Set global: true, e.g. fonts: { families: [{ name: '${family}', provider: 'local', weights: [400, 700], global: true }] }.`
|
|
2177
|
+
);
|
|
2178
|
+
} else if (configuredFamily) {
|
|
2179
|
+
lines.push(
|
|
2180
|
+
` "${family}" is declared with global: true, but @nuxt/fonts still did not emit @font-face for it.`,
|
|
2181
|
+
` Check that the configured provider/src, weights, styles, and file names match the available font files.`
|
|
2182
|
+
);
|
|
2183
|
+
if (local)
|
|
2184
|
+
lines.push(` Found ${local.matches.length} matching file(s) under public/fonts/ (e.g. ${local.matches.slice(0, 2).join(", ")}).`);
|
|
2185
|
+
} else if (local) {
|
|
2064
2186
|
lines.push(
|
|
2065
2187
|
` Found ${local.matches.length} matching file(s) under public/fonts/ (e.g. ${local.matches.slice(0, 2).join(", ")}) but @nuxt/fonts did not emit @font-face for "${family}".`,
|
|
2066
|
-
` Tailwind v4 @theme variables are not scanned by @nuxt/fonts
|
|
2067
|
-
`
|
|
2188
|
+
` Tailwind v4 @theme variables are not scanned by @nuxt/fonts, and OG images only read globally emitted font faces.`,
|
|
2189
|
+
` Declare it explicitly with global: true, e.g. fonts: { families: [{ name: '${family}', provider: 'local', weights: [400, 700], global: true }] }.`
|
|
2068
2190
|
);
|
|
2069
2191
|
} else {
|
|
2070
2192
|
lines.push(
|
|
2071
2193
|
` Not a known Google/Bunny/Fontsource font, and no matching files under public/fonts/.`,
|
|
2072
|
-
` If this is a custom/local font, add it to nuxt.config: fonts: { families: [{ name: '${family}', src: '/path/to/font.woff2' }] }.`,
|
|
2194
|
+
` If this is a custom/local font, add it to nuxt.config with global: true: fonts: { families: [{ name: '${family}', src: '/path/to/font.woff2', global: true }] }.`,
|
|
2073
2195
|
` If it should resolve from a remote provider, check the spelling or add the provider to fonts.priority.`
|
|
2074
2196
|
);
|
|
2075
2197
|
}
|
|
@@ -2136,13 +2258,13 @@ async function resolveAndDownloadFamily(options) {
|
|
|
2136
2258
|
return results;
|
|
2137
2259
|
}
|
|
2138
2260
|
async function convertWoff2ToTtf(options) {
|
|
2139
|
-
const { nuxt, logger, fontRequirements, convertedWoff2Files, fontSubsets } = options;
|
|
2261
|
+
const { nuxt, logger, fontRequirements, convertedWoff2Files, fontSubsets, warnOnMissingStaticFonts = true } = options;
|
|
2140
2262
|
const parsedFonts = await parseFontsFromTemplate(nuxt, { convertedWoff2Files });
|
|
2141
2263
|
const hasNonWoff2 = new Set(
|
|
2142
2264
|
parsedFonts.filter((f) => !f.src.endsWith(".woff2")).map((f) => fontKey(f))
|
|
2143
2265
|
);
|
|
2144
2266
|
const woff2Fonts = parsedFonts.filter(
|
|
2145
|
-
(f) => f.src.endsWith(".woff2") && !hasNonWoff2.has(fontKey(f)) && fontRequirements.weights.includes(f.weight) && fontRequirements.styles.includes(f.style)
|
|
2267
|
+
(f) => f.src.endsWith(".woff2") && !hasNonWoff2.has(fontKey(f)) && !isConfiguredLocalFontFamily(nuxt, f.family) && fontRequirements.weights.includes(f.weight) && fontRequirements.styles.includes(f.style)
|
|
2146
2268
|
);
|
|
2147
2269
|
if (woff2Fonts.length === 0) {
|
|
2148
2270
|
logger.debug("No WOFF2 fonts to process");
|
|
@@ -2173,7 +2295,7 @@ async function convertWoff2ToTtf(options) {
|
|
|
2173
2295
|
}
|
|
2174
2296
|
if (convertedWoff2Files.size > 0) {
|
|
2175
2297
|
logger.debug(`Resolved ${convertedWoff2Files.size} static font files via fontless`);
|
|
2176
|
-
} else {
|
|
2298
|
+
} else if (warnOnMissingStaticFonts) {
|
|
2177
2299
|
logger.warn(`No static fonts available for Satori. Falling back to bundled Inter font. Consider using 'takumi' renderer for variable font support.`);
|
|
2178
2300
|
}
|
|
2179
2301
|
} catch (err) {
|
|
@@ -2199,6 +2321,20 @@ async function resolveOgImageFonts(options) {
|
|
|
2199
2321
|
const { nuxt, hasNuxtFonts, hasSatoriRenderer, hasTakumiRenderer, convertedWoff2Files, fontSubsets, fontRequirements, tw4FontVars, logger, ogFontsDir } = options;
|
|
2200
2322
|
const staticInterFonts = getStaticInterFonts(ogFontsDir);
|
|
2201
2323
|
const allFonts = hasNuxtFonts ? await parseFontsFromTemplate(nuxt, { convertedWoff2Files, requiredWeights: fontRequirements.weights }) : [];
|
|
2324
|
+
if (hasNuxtFonts) {
|
|
2325
|
+
const configuredLocalFonts = parseConfiguredLocalFonts(nuxt);
|
|
2326
|
+
if (configuredLocalFonts.length > 0) {
|
|
2327
|
+
const existingKeys = new Set(allFonts.map((f) => `${f.family}-${f.weight}-${f.style}`));
|
|
2328
|
+
for (const font of configuredLocalFonts) {
|
|
2329
|
+
const key = `${font.family}-${font.weight}-${font.style}`;
|
|
2330
|
+
if (!existingKeys.has(key)) {
|
|
2331
|
+
allFonts.push(font);
|
|
2332
|
+
existingKeys.add(key);
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
logger.debug(`Resolved ${configuredLocalFonts.length} configured local font faces from public/fonts`);
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2202
2338
|
const detectedSubsets = extractSubsetNames(allFonts);
|
|
2203
2339
|
const effectiveSubsets = detectedSubsets.length > 0 ? detectedSubsets : fontSubsets || ["latin"];
|
|
2204
2340
|
const appCssFonts = await parseAppCssFontFaces(nuxt).catch(() => []);
|
|
@@ -5141,7 +5277,8 @@ export const resolve = (import.meta.dev || import.meta.prerender) ? devResolve :
|
|
|
5141
5277
|
logger,
|
|
5142
5278
|
fontRequirements: fontRequirementsState,
|
|
5143
5279
|
convertedWoff2Files,
|
|
5144
|
-
fontSubsets: config.fontSubsets
|
|
5280
|
+
fontSubsets: config.fontSubsets,
|
|
5281
|
+
warnOnMissingStaticFonts: hasSatoriRenderer()
|
|
5145
5282
|
});
|
|
5146
5283
|
}
|
|
5147
5284
|
const fonts = await resolveOgImageFonts({
|
|
@@ -5212,7 +5349,8 @@ export const rootDir = ${JSON.stringify(nuxt.options.rootDir)}`;
|
|
|
5212
5349
|
logger,
|
|
5213
5350
|
fontRequirements: fontRequirementsState,
|
|
5214
5351
|
convertedWoff2Files,
|
|
5215
|
-
fontSubsets: config.fontSubsets
|
|
5352
|
+
fontSubsets: config.fontSubsets,
|
|
5353
|
+
warnOnMissingStaticFonts: hasSatoriRenderer()
|
|
5216
5354
|
});
|
|
5217
5355
|
fontProcessingDone = true;
|
|
5218
5356
|
});
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"dc070c1e-9f70-4119-bc66-db0dd8a0649d","timestamp":1777703106248,"prerendered":[]}
|