nuxt-og-image 6.1.2 → 6.2.0
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/README.md +4 -1
- package/dist/chunks/tw4.cjs +4 -3
- package/dist/chunks/tw4.mjs +4 -3
- package/dist/chunks/uno.cjs +4 -3
- package/dist/chunks/uno.mjs +4 -3
- package/dist/content.cjs +14 -15
- package/dist/content.d.cts +9 -29
- package/dist/content.d.mts +9 -29
- package/dist/content.d.ts +9 -29
- package/dist/content.mjs +13 -15
- package/dist/devtools/200.html +1 -0
- package/dist/devtools/404.html +1 -0
- package/dist/devtools/_fonts/4ppnHhMi-pBsWSPo7mY0avYxlDoAg1N3PTzCwXLZ5rA-d9oibkGnTd1JL3tc_xnaVgBLYmOB8kjrK2cvZaqwj9s.woff2 +0 -0
- package/dist/devtools/_fonts/4qBuU9MRVUlPZNPSF7Xom_sK8RBEnfYu-9VXFrdq8A8-8TDwLE1HAj1sQn7XxVWtM_7sIaPM-DTdO3Pf8U2DF1U.woff2 +0 -0
- package/dist/devtools/_fonts/6dYsbWUd_BpKJ7mdDihgOcya1gHXLpJBuMYXux3WMjE-q3fYNS8YbW5n7ZeXI2vSNgkRWW5VDPKAl51SNTjG2qk.woff2 +0 -0
- package/dist/devtools/_fonts/Lr-hqqZZsYmCt0ITUlr1CUrWim9fsKvoDFZliMxgNHY-iTa_Yt_PzhOY9TX7ZXdSlEPim6iRt92xhECwaxWxd5w.woff2 +0 -0
- package/dist/devtools/_fonts/OknHvWI6KtYn1JQBzX7eSpNDBQ8520F9TvSUJYkVf6A-xeZn9253svK_8Q2LD0XEruY_MnEsuCRO5LenPoggC0Y.woff2 +0 -0
- package/dist/devtools/_fonts/PV2hrQG6wq5BlIPDjdL1IcOflycaghyt5MHzlBqZtlo-lb_WexLz3VZqfTN0oi554iBH5tT2j2UFEV-XErCAS3E.woff2 +0 -0
- package/dist/devtools/_fonts/UA7OtwYHwGN_HjcVGTdmiQxUit7FlqkCwxVUWSeXVnQ-B4OXCFOL_tWrYODpQTc07aMaj0c2cewTOmBRWR9tD-A.woff2 +0 -0
- package/dist/devtools/_fonts/VE4cDVCv5MxbFM7ZLoLCGbIpNd71zhp7MDI9lmN5Y7I-xZyDYCUVrd6LV8eVGF3Um3UZjBFuUtDGtvdyTBBRYBo.woff2 +0 -0
- package/dist/devtools/_fonts/fVoGbnMbBFd5L9BBp9fUPavUSkZ_EmsQNSyadkT-108-U4T0khaeLQSIhtt9eVvaCEKJjtWJ4ioRJOf8hvqkWY0.woff2 +0 -0
- package/dist/devtools/_fonts/lQAxeCEs1R0Lw-H9XRU1RlOARQN8J6npRsPjyEDMe5s-_DUSLEkO3tKTuun_gSnDLoQPVEnpOnyqZMOw0ByZ6PA.woff2 +0 -0
- package/dist/devtools/_fonts/lntlqNHKLV2n82yTwMde70QqOjcfLE2XJ5oKZ3vRPWc-z6TxpIZQdWXztWLr9_OFWqt_WJJoeGtuK_-XQMZGQwE.woff2 +0 -0
- package/dist/devtools/_fonts/qxAYvKsXWeYv731eb-h5TRurcdIP_W44mpNdX-HABAk-zUDeMEFlNtNbrwvT9JxLEBg0TphGy70O6RfIoIX_ZwU.woff2 +0 -0
- package/dist/devtools/_nuxt/B78iZWPg.js +1 -0
- package/dist/{client/_nuxt/D1lfPgTt.js → devtools/_nuxt/BGlUVBvU.js} +1 -1
- package/dist/devtools/_nuxt/BL4rmk_W.js +3 -0
- package/dist/devtools/_nuxt/BXH6Xx3v.js +3860 -0
- package/dist/devtools/_nuxt/CIJ7xJ8b.js +1 -0
- package/dist/devtools/_nuxt/CSSHjAxs.js +1 -0
- package/dist/{client/_nuxt/Cktc5--N.js → devtools/_nuxt/CsKs7wwl.js} +1 -1
- package/dist/{client/_nuxt/Vmj2QZYx.js → devtools/_nuxt/CstUYNOH.js} +1 -1
- package/dist/devtools/_nuxt/CxnX_MvN.js +173 -0
- package/dist/devtools/_nuxt/CzeCuK1q.js +1 -0
- package/dist/devtools/_nuxt/D7bfXIZ-.js +6 -0
- package/dist/devtools/_nuxt/DCmYAnXe.js +2 -0
- package/dist/devtools/_nuxt/DevtoolsSection.Bxijw5im.css +1 -0
- package/dist/devtools/_nuxt/DevtoolsSnippet.CbB_PUej.css +1 -0
- package/dist/{client/_nuxt/Dk-IKZND.js → devtools/_nuxt/DmM2Yt1_.js} +1 -1
- package/dist/devtools/_nuxt/builds/latest.json +1 -0
- package/dist/devtools/_nuxt/builds/meta/22b67a5a-b859-4a85-ad96-a4de4f79168b.json +1 -0
- package/dist/devtools/_nuxt/entry.CYlLP9qU.css +2 -0
- package/dist/devtools/_nuxt/error-404.BGfO7-QM.css +1 -0
- package/dist/devtools/_nuxt/error-500.CIongMTI.css +1 -0
- package/dist/{client/_nuxt/CwCh3_ha.js → devtools/_nuxt/o_f3Li2p.js} +1 -1
- package/dist/devtools/_nuxt/pages.BAzvGALH.css +1 -0
- package/dist/{client/_nuxt/templates.DAFgwCzd.css → devtools/_nuxt/templates.C7e57cTp.css} +1 -1
- package/dist/devtools/_nuxt/u4npBYiO.js +3 -0
- package/dist/devtools/_nuxt/ws2lPK1y.js +1 -0
- package/dist/{client/_nuxt/OW9R-PIP.js → devtools/_nuxt/ynN9sMNI.js} +1 -1
- package/dist/devtools/debug/index.html +1 -0
- package/dist/devtools/docs/index.html +1 -0
- package/dist/devtools/index.html +1 -0
- package/dist/devtools/templates/index.html +1 -0
- package/dist/module.cjs +4 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -3
- package/dist/runtime/server/og-image/bindings/font-assets/cloudflare.js +8 -5
- package/dist/runtime/server/og-image/browser/screenshot.js +3 -3
- package/dist/runtime/server/og-image/context.js +2 -2
- package/dist/runtime/server/og-image/core/plugins/imageSrc.js +4 -4
- package/dist/runtime/server/og-image/fonts.d.ts +5 -10
- package/dist/runtime/server/og-image/fonts.js +15 -6
- package/dist/runtime/server/og-image/satori/renderer.js +1 -1
- package/dist/runtime/server/og-image/takumi/renderer.js +2 -2
- package/dist/runtime/server/util/kit.d.ts +1 -1
- package/dist/runtime/server/util/kit.js +2 -5
- package/dist/runtime/shared/urlEncoding.d.ts +7 -0
- package/dist/runtime/shared/urlEncoding.js +13 -1
- package/dist/runtime/shared.d.ts +1 -1
- package/dist/runtime/shared.js +1 -1
- package/dist/shared/{nuxt-og-image.DuUfHPCI.mjs → nuxt-og-image.Bd7Znc-u.mjs} +82 -158
- package/dist/shared/{nuxt-og-image.DFZD-Kf4.cjs → nuxt-og-image.CBzKFXjI.cjs} +86 -162
- package/package.json +16 -14
- package/dist/client/200.html +0 -1
- package/dist/client/404.html +0 -1
- package/dist/client/_fonts/0xp3SbCWC1OhX7q1-uF6kilMZFm-alJNkUtkLTPCy_A-tN9KwPUWhhXvtqh74sU9FIkI4W6hsbm85r0X24hjOfM.woff2 +0 -0
- package/dist/client/_fonts/4HA9tc4y8BVQeLXvLn3JgQqilAj1xrAnUSprQGHIPSw-ZPswEL_UDOYaxTLQDUySPjoOHDxhD83pD19HMfKfK9s.woff2 +0 -0
- package/dist/client/_fonts/Bmul3LaKlc7BUKqJHE_UmEoF40Sg_2ga52yJjwyDcKs-TnYmYl1DNYkiWMu0Vx49DakCPBuiCCj9zoLIuQjUdKY.woff2 +0 -0
- package/dist/client/_fonts/DfgmjWGpWte3Q3a54Nevr_BYmMM5YEJXRI1CdI2VwO0-ox5RadQfCyVTmKl_hubTaIJjtRw9oaQz2GDBeZR6l1M.woff2 +0 -0
- package/dist/client/_fonts/LK8hREFNeTe-EIzvbfgusJBg3CJ7Q7NFgYIiGb2LZ8-qiyWl0ATLJjOsRPZC_7a8mTMFxEMKEv6JTK_kHtMzbM.woff2 +0 -0
- package/dist/client/_fonts/Lc_5lWuBuZcZ166p1-s-mnGkMJwIYJE_QDCkws8iCkI-r45Qbm2hCykrfOZ0kowz__uTTTUOPDN9hz34QcRNTY4.woff2 +0 -0
- package/dist/client/_fonts/UBlOS9e0BmJuiF5yVs0YcJrFWaa-iN8zx9TP_lmKs8c-iH3Naewt5UjJ0AQ38QZs4lkEo4zdjMIVkLs4y7EiwIE.woff2 +0 -0
- package/dist/client/_fonts/gRxGIWazSFZVyzU0s62U9IArK3RJLkOoUmXx0C8Npsw-kMFNQG6iwjw2nvqS3ut9jMSVn__HlJ28slvxjE4hYfc.woff2 +0 -0
- package/dist/client/_fonts/hIKtJJBMNYGPUppSYZpyuF6c24cKhBkhsgaCTgzYgqw-jRJyBPlfGDXClyrgfO6GK_Pfs1RmTsB-wWX6MOgpsRA.woff2 +0 -0
- package/dist/client/_fonts/iEvApgDRmzKzNqOYocBTrmcHZmuGAJloawKDP1S0nyE-T3oc_9We24QGwfw5naik4cM0g7VxylWVaQwKm4dy3cw.woff2 +0 -0
- package/dist/client/_fonts/kokcBTWRechd97ZdVUpUxrOFbsRt8whO21yA1vQ6iJ8-O7CCbVvFgg_MFLTdyFF9FMeMvIoEmxJLubqVDYTUoWY.woff2 +0 -0
- package/dist/client/_fonts/oFzdhjQtZFydTZ757bmiVFXgReR2bBSYm_CjQ7B1Jjs-F6oFbDhOWKYJbgrlC93wkLkPlIV7mzgvqwqEDxQMeHA.woff2 +0 -0
- package/dist/client/_nuxt/BKAklG_t.js +0 -1
- package/dist/client/_nuxt/C8-_X1H0.js +0 -1
- package/dist/client/_nuxt/CZ3ilSZL.js +0 -3860
- package/dist/client/_nuxt/CZT7uv4X.js +0 -1
- package/dist/client/_nuxt/CfKtH86J.js +0 -3
- package/dist/client/_nuxt/CoV50A8g.js +0 -6
- package/dist/client/_nuxt/DHgFLo6c.js +0 -2
- package/dist/client/_nuxt/JeQLwE-R.js +0 -1
- package/dist/client/_nuxt/OSectionBlock.BVHnMsIr.css +0 -1
- package/dist/client/_nuxt/W-5Wci_Y.js +0 -1
- package/dist/client/_nuxt/builds/latest.json +0 -1
- package/dist/client/_nuxt/builds/meta/1e1bd3b0-a510-4582-8d5c-6be1220c8d28.json +0 -1
- package/dist/client/_nuxt/entry.CjxjoX5J.css +0 -2
- package/dist/client/_nuxt/error-404.DFn4r7cG.css +0 -1
- package/dist/client/_nuxt/error-500.DDG-bAQG.css +0 -1
- package/dist/client/_nuxt/pages.CVzrVadZ.css +0 -1
- package/dist/client/_nuxt/uVtaRSp0.js +0 -174
- package/dist/client/debug/index.html +0 -1
- package/dist/client/docs/index.html +0 -1
- package/dist/client/index.html +0 -1
- package/dist/client/templates/index.html +0 -1
- /package/dist/{client/_nuxt/CM-t-6ZT.js → devtools/_nuxt/C5jzcy9i.js} +0 -0
- /package/dist/{client/_nuxt/HWyD49jH.js → devtools/_nuxt/CCTv7mmB.js} +0 -0
- /package/dist/{client/_nuxt/DMFL1JmN.js → devtools/_nuxt/CnH6h21e.js} +0 -0
- /package/dist/{client/_nuxt/BsRKQH5X.js → devtools/_nuxt/CuJezOxb.js} +0 -0
- /package/dist/{client/_nuxt/CDaXKRRu.js → devtools/_nuxt/E8AZ6HoH.js} +0 -0
- /package/dist/{client → devtools}/_nuxt/IFrameLoader.HTWy4e5S.css +0 -0
- /package/dist/{client/_nuxt/PONEy9N-.js → devtools/_nuxt/O5eLyffU.js} +0 -0
|
@@ -5,17 +5,18 @@ const promises = require('node:fs/promises');
|
|
|
5
5
|
const node_url = require('node:url');
|
|
6
6
|
const kit = require('@nuxt/kit');
|
|
7
7
|
const defu = require('defu');
|
|
8
|
-
const kit$
|
|
8
|
+
const kit$2 = require('nuxt-site-config/kit');
|
|
9
9
|
const ohash = require('ohash');
|
|
10
10
|
const pathe = require('pathe');
|
|
11
11
|
const pkgTypes = require('pkg-types');
|
|
12
12
|
const node_crypto = require('node:crypto');
|
|
13
13
|
const oxcWalker = require('oxc-walker');
|
|
14
|
-
const
|
|
14
|
+
const kit$1 = require('nuxtseo-shared/kit');
|
|
15
15
|
const logger_js = require('../../dist/runtime/logger.js');
|
|
16
16
|
const chromeLauncher = require('chrome-launcher');
|
|
17
|
+
const stdEnv = require('std-env');
|
|
17
18
|
const nypm = require('nypm');
|
|
18
|
-
const
|
|
19
|
+
const devtools = require('nuxtseo-shared/devtools');
|
|
19
20
|
const unstorage = require('unstorage');
|
|
20
21
|
const fsDriver = require('unstorage/drivers/fs-lite');
|
|
21
22
|
const css_js = require('../../dist/runtime/server/og-image/utils/css.js');
|
|
@@ -101,19 +102,6 @@ function getRegisteredBaseNames(registeredPascalName) {
|
|
|
101
102
|
return names;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
const autodetectableProviders = {
|
|
105
|
-
azure_static: "azure",
|
|
106
|
-
cloudflare_pages: "cloudflare-pages",
|
|
107
|
-
netlify: "netlify",
|
|
108
|
-
stormkit: "stormkit",
|
|
109
|
-
vercel: "vercel",
|
|
110
|
-
cleavr: "cleavr",
|
|
111
|
-
stackblitz: "stackblitz"
|
|
112
|
-
};
|
|
113
|
-
const autodetectableStaticProviders = {
|
|
114
|
-
netlify: "netlify-static",
|
|
115
|
-
vercel: "vercel-static"
|
|
116
|
-
};
|
|
117
105
|
const NodeRuntime = {
|
|
118
106
|
// node-server runtime
|
|
119
107
|
browser: "on-demand",
|
|
@@ -220,23 +208,13 @@ const RuntimeCompatibility = {
|
|
|
220
208
|
"cloudflare-module": cloudflare,
|
|
221
209
|
"cloudflare-durable": cloudflare
|
|
222
210
|
};
|
|
223
|
-
function
|
|
224
|
-
return options?.static ? autodetectableStaticProviders[stdEnv.provider] : autodetectableProviders[stdEnv.provider];
|
|
225
|
-
}
|
|
226
|
-
function resolveNitroPreset(nitroConfig) {
|
|
227
|
-
if (stdEnv.provider === "stackblitz" || stdEnv.provider === "codesandbox")
|
|
228
|
-
return stdEnv.provider;
|
|
211
|
+
function resolveOgImagePreset(nitroConfig) {
|
|
229
212
|
const nuxt = kit.useNuxt();
|
|
230
213
|
if (nuxt.options.dev)
|
|
231
214
|
return "nitro-dev";
|
|
232
215
|
if (nuxt.options.nitro.static)
|
|
233
216
|
return "nitro-prerender";
|
|
234
|
-
|
|
235
|
-
if (nitroConfig && nitroConfig?.preset)
|
|
236
|
-
preset = nitroConfig.preset;
|
|
237
|
-
if (!preset)
|
|
238
|
-
preset = stdEnv.env.NITRO_PRESET || stdEnv.env.SERVER_PRESET || detectTarget() || "node-server";
|
|
239
|
-
return preset.replace("_", "-");
|
|
217
|
+
return kit$1.resolveNitroPreset(nitroConfig);
|
|
240
218
|
}
|
|
241
219
|
function getPresetNitroPresetCompatibility(target) {
|
|
242
220
|
const normalizedTarget = target.replace(RE_LEGACY_SUFFIX, "");
|
|
@@ -248,7 +226,7 @@ function getPresetNitroPresetCompatibility(target) {
|
|
|
248
226
|
return compatibility;
|
|
249
227
|
}
|
|
250
228
|
async function applyNitroPresetCompatibility(nitroConfig, options) {
|
|
251
|
-
const target =
|
|
229
|
+
const target = resolveOgImagePreset(nitroConfig);
|
|
252
230
|
const compatibility = getPresetNitroPresetCompatibility(target);
|
|
253
231
|
const { resolve, detectedRenderers } = options;
|
|
254
232
|
const satoriEnabled = detectedRenderers.has("satori");
|
|
@@ -291,7 +269,7 @@ async function applyNitroPresetCompatibility(nitroConfig, options) {
|
|
|
291
269
|
await applyBinding("sharp"),
|
|
292
270
|
nitroConfig.alias || {}
|
|
293
271
|
);
|
|
294
|
-
if (Object.values(
|
|
272
|
+
if (Object.values(resolvedCompatibility).includes("wasm")) {
|
|
295
273
|
nitroConfig.experimental = nitroConfig.experimental || {};
|
|
296
274
|
nitroConfig.experimental.wasm = true;
|
|
297
275
|
}
|
|
@@ -340,7 +318,7 @@ async function setupBuildHandler(config, resolve, getDetectedRenderers, nuxt = k
|
|
|
340
318
|
nuxt.hooks.hook("nitro:init", async (nitro) => {
|
|
341
319
|
const renderers = getDetectedRenderers();
|
|
342
320
|
await applyNitroPresetCompatibility(nitro.options, { compatibility: config.compatibility?.runtime, resolve, detectedRenderers: renderers });
|
|
343
|
-
const target =
|
|
321
|
+
const target = resolveOgImagePreset(nitro.options);
|
|
344
322
|
const normalizedTarget = target.replace(RE_LEGACY_SUFFIX, "");
|
|
345
323
|
const isEdgePreset = ["cloudflare", "cloudflare-pages", "cloudflare-pages-static", "cloudflare-module", "cloudflare-durable", "vercel-edge", "netlify-edge"].includes(normalizedTarget);
|
|
346
324
|
const isCloudflarePreset = normalizedTarget.startsWith("cloudflare");
|
|
@@ -373,9 +351,10 @@ async function setupBuildHandler(config, resolve, getDetectedRenderers, nuxt = k
|
|
|
373
351
|
}
|
|
374
352
|
}
|
|
375
353
|
}
|
|
376
|
-
const [resvgHash, yogaHash] = await Promise.all([
|
|
354
|
+
const [resvgHash, yogaHash, takumiHash] = await Promise.all([
|
|
377
355
|
resolveFilePathSha1("@resvg/resvg-wasm/index_bg.wasm"),
|
|
378
|
-
resolveFilePathSha1("satori/yoga.wasm")
|
|
356
|
+
resolveFilePathSha1("satori/yoga.wasm"),
|
|
357
|
+
resolveFilePathSha1("@takumi-rs/wasm/takumi_wasm_bg.wasm")
|
|
379
358
|
]);
|
|
380
359
|
for (const entry of wasmEntries) {
|
|
381
360
|
if (!fs.existsSync(entry))
|
|
@@ -393,7 +372,7 @@ async function setupBuildHandler(config, resolve, getDetectedRenderers, nuxt = k
|
|
|
393
372
|
if (compatibility.wasm?.esmImport) {
|
|
394
373
|
const postfix = normalizedTarget === "vercel-edge" ? "?module" : "";
|
|
395
374
|
const wasmPath = isCloudflarePagesOrModule ? `../wasm/` : `./wasm/`;
|
|
396
|
-
contents = contents.replaceAll('"@resvg/resvg-wasm/index_bg.wasm?module"', `"${wasmPath}index_bg-${resvgHash}.wasm${postfix}"`).replaceAll('"satori/yoga.wasm?module"', `"${wasmPath}yoga-${yogaHash}.wasm${postfix}"`).replaceAll('"yoga-wasm-web/dist/yoga.wasm?module"', `"${wasmPath}yoga-${yogaHash}.wasm${postfix}"`);
|
|
375
|
+
contents = contents.replaceAll('"@resvg/resvg-wasm/index_bg.wasm?module"', `"${wasmPath}index_bg-${resvgHash}.wasm${postfix}"`).replaceAll('"satori/yoga.wasm?module"', `"${wasmPath}yoga-${yogaHash}.wasm${postfix}"`).replaceAll('"@takumi-rs/wasm/takumi_wasm_bg.wasm?module"', `"${wasmPath}takumi_wasm_bg-${takumiHash}.wasm${postfix}"`).replaceAll('"yoga-wasm-web/dist/yoga.wasm?module"', `"${wasmPath}yoga-${yogaHash}.wasm${postfix}"`);
|
|
397
376
|
if (postfix) {
|
|
398
377
|
contents = contents.replaceAll(RE_WASM_IMPORT, `import("$1${postfix}")`);
|
|
399
378
|
}
|
|
@@ -407,7 +386,7 @@ async function setupBuildHandler(config, resolve, getDetectedRenderers, nuxt = k
|
|
|
407
386
|
});
|
|
408
387
|
}
|
|
409
388
|
async function resolveFilePathSha1(path) {
|
|
410
|
-
const _path = await kit.resolvePath(path);
|
|
389
|
+
const _path = await kit.resolvePath(path).catch(() => path);
|
|
411
390
|
return sha1(fs.existsSync(_path) ? await promises.readFile(_path) : Buffer.from(path));
|
|
412
391
|
}
|
|
413
392
|
function sha1(source) {
|
|
@@ -558,7 +537,7 @@ function getProviderDependencies(provider, binding = "node") {
|
|
|
558
537
|
return deps.map((d) => d.name);
|
|
559
538
|
}
|
|
560
539
|
function getRecommendedBindingFromPreset(provider) {
|
|
561
|
-
const preset =
|
|
540
|
+
const preset = resolveOgImagePreset();
|
|
562
541
|
const compatibility = getPresetNitroPresetCompatibility(preset);
|
|
563
542
|
return getRecommendedBinding(provider, compatibility);
|
|
564
543
|
}
|
|
@@ -641,7 +620,7 @@ async function validateProviderSetup(renderer, compatibility) {
|
|
|
641
620
|
function setupDevHandler(options, resolve, getDetectedRenderers, nuxt = kit.useNuxt()) {
|
|
642
621
|
nuxt.hooks.hook("nitro:init", async (nitro) => {
|
|
643
622
|
const detectedRenderers = new Set(getDetectedRenderers());
|
|
644
|
-
const targetCompatibility = getPresetNitroPresetCompatibility(
|
|
623
|
+
const targetCompatibility = getPresetNitroPresetCompatibility(resolveOgImagePreset(nitro.options));
|
|
645
624
|
for (const renderer of ["satori", "takumi", "browser"]) {
|
|
646
625
|
if (!detectedRenderers.has(renderer)) {
|
|
647
626
|
const binding = getRecommendedBinding(renderer, targetCompatibility);
|
|
@@ -654,8 +633,6 @@ function setupDevHandler(options, resolve, getDetectedRenderers, nuxt = kit.useN
|
|
|
654
633
|
});
|
|
655
634
|
}
|
|
656
635
|
|
|
657
|
-
const DEVTOOLS_UI_ROUTE = "/__nuxt-og-image";
|
|
658
|
-
const DEVTOOLS_UI_LOCAL_PORT = 3030;
|
|
659
636
|
const RE_TILDE_SLASH = /^~\//;
|
|
660
637
|
const RE_WORD_CHARS_ONLY = /^\w+$/;
|
|
661
638
|
const RE_SCRIPT_SETUP = /<script\s+setup[^>]*>\n?/;
|
|
@@ -738,31 +715,13 @@ p {
|
|
|
738
715
|
`;
|
|
739
716
|
}
|
|
740
717
|
function setupDevToolsUI(options, resolve, nuxt = kit.useNuxt(), cssFramework = "none") {
|
|
741
|
-
|
|
718
|
+
devtools.setupDevToolsUI({
|
|
719
|
+
route: "/__nuxt-og-image",
|
|
720
|
+
name: "nuxt-og-image",
|
|
721
|
+
title: "OG Image",
|
|
722
|
+
icon: "carbon:image-search"
|
|
723
|
+
}, resolve, nuxt);
|
|
742
724
|
const communityTemplatesDir = resolve("./runtime/app/components/Templates/Community");
|
|
743
|
-
const isProductionBuild = fs.existsSync(clientPath);
|
|
744
|
-
if (isProductionBuild) {
|
|
745
|
-
nuxt.hook("vite:serverCreated", async (server) => {
|
|
746
|
-
const sirv = await import('sirv').then((r) => r.default || r);
|
|
747
|
-
server.middlewares.use(
|
|
748
|
-
DEVTOOLS_UI_ROUTE,
|
|
749
|
-
sirv(clientPath, { dev: true, single: true })
|
|
750
|
-
);
|
|
751
|
-
});
|
|
752
|
-
} else {
|
|
753
|
-
nuxt.hook("vite:extendConfig", (config) => {
|
|
754
|
-
if (!config.server) {
|
|
755
|
-
config.server = {};
|
|
756
|
-
}
|
|
757
|
-
config.server.proxy ||= {};
|
|
758
|
-
config.server.proxy[DEVTOOLS_UI_ROUTE] = {
|
|
759
|
-
target: `http://localhost:${DEVTOOLS_UI_LOCAL_PORT}${DEVTOOLS_UI_ROUTE}`,
|
|
760
|
-
changeOrigin: true,
|
|
761
|
-
followRedirects: true,
|
|
762
|
-
rewrite: (path) => path.replace(DEVTOOLS_UI_ROUTE, "")
|
|
763
|
-
};
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
725
|
const useNitro = new Promise((resolve2) => {
|
|
767
726
|
nuxt.hooks.hook("nitro:init", resolve2);
|
|
768
727
|
});
|
|
@@ -788,61 +747,60 @@ ${content}`, "utf-8");
|
|
|
788
747
|
}
|
|
789
748
|
return true;
|
|
790
749
|
}
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
dotNotationName = `${baseName}.${renderer}.vue`;
|
|
804
|
-
}
|
|
805
|
-
const dir = pathe.join(nuxt.options.srcDir, "components", dirName || "");
|
|
806
|
-
if (!fs.existsSync(dir)) {
|
|
807
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
808
|
-
}
|
|
809
|
-
const newPath = pathe.join(dir, dotNotationName);
|
|
810
|
-
const templatePath = pathe.join(communityTemplatesDir, dotNotationName);
|
|
811
|
-
const template = (await promises.readFile(templatePath, "utf-8")).replace("{{ title }}", `{{ title }} - Ejected!`);
|
|
812
|
-
await promises.writeFile(newPath, template, { encoding: "utf-8" });
|
|
813
|
-
await kit.updateTemplates({ filter: (t) => t.filename.includes("nuxt-og-image/components.mjs") });
|
|
814
|
-
const nitro = await useNitro;
|
|
815
|
-
await nitro.hooks.callHook("rollup:reload");
|
|
816
|
-
return newPath;
|
|
817
|
-
},
|
|
818
|
-
async createComponent({ name, renderer, pageFile }) {
|
|
819
|
-
const validRenderers = ["satori", "browser", "takumi"];
|
|
820
|
-
if (!validRenderers.includes(renderer))
|
|
821
|
-
throw new Error(`Invalid renderer: ${renderer}`);
|
|
822
|
-
if (!RE_WORD_CHARS_ONLY.test(name))
|
|
823
|
-
throw new Error(`Invalid component name: ${name}`);
|
|
824
|
-
const baseDir = fs.existsSync(pathe.join(nuxt.options.srcDir, "app")) ? pathe.join(nuxt.options.srcDir, "app") : nuxt.options.srcDir;
|
|
825
|
-
const outputDir = pathe.join(baseDir, "components", "OgImage");
|
|
826
|
-
if (!fs.existsSync(outputDir))
|
|
827
|
-
fs.mkdirSync(outputDir, { recursive: true });
|
|
828
|
-
const filename = `${name}.${renderer}.vue`;
|
|
829
|
-
const outputPath = pathe.join(outputDir, filename);
|
|
830
|
-
if (fs.existsSync(outputPath))
|
|
831
|
-
throw new Error(`File already exists: ${pathe.relative(nuxt.options.rootDir, outputPath)}`);
|
|
832
|
-
const template = getStarterTemplate(renderer, cssFramework);
|
|
833
|
-
await promises.writeFile(outputPath, template, { encoding: "utf-8" });
|
|
834
|
-
await insertDefineOgImage(name, pageFile);
|
|
835
|
-
await kit.updateTemplates({ filter: (t) => t.filename.includes("nuxt-og-image/components.mjs") });
|
|
836
|
-
const nitro = await useNitro;
|
|
837
|
-
await nitro.hooks.callHook("rollup:reload");
|
|
838
|
-
return outputPath;
|
|
839
|
-
},
|
|
840
|
-
async addOgImageToPage(componentName, pageFile) {
|
|
841
|
-
if (!RE_WORD_CHARS_ONLY.test(componentName))
|
|
842
|
-
throw new Error(`Invalid component name: ${componentName}`);
|
|
843
|
-
return insertDefineOgImage(componentName, pageFile);
|
|
750
|
+
devtools.setupDevToolsRpc("nuxt-og-image", {
|
|
751
|
+
async ejectCommunityTemplate(path) {
|
|
752
|
+
const [dirName, componentName] = path.split("/");
|
|
753
|
+
const nameWithoutExt = componentName?.replace(".vue", "") || "";
|
|
754
|
+
let dotNotationName;
|
|
755
|
+
if (nameWithoutExt.includes(".")) {
|
|
756
|
+
dotNotationName = `${nameWithoutExt}.vue`;
|
|
757
|
+
} else {
|
|
758
|
+
const rendererMatch = nameWithoutExt.match(RE_RENDERER_SUFFIX);
|
|
759
|
+
const renderer = rendererMatch?.[1]?.toLowerCase() || "satori";
|
|
760
|
+
const baseName = nameWithoutExt.replace(RE_RENDERER_SUFFIX, "");
|
|
761
|
+
dotNotationName = `${baseName}.${renderer}.vue`;
|
|
844
762
|
}
|
|
845
|
-
|
|
763
|
+
const dir = pathe.join(nuxt.options.srcDir, "components", dirName || "");
|
|
764
|
+
if (!fs.existsSync(dir)) {
|
|
765
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
766
|
+
}
|
|
767
|
+
const newPath = pathe.join(dir, dotNotationName);
|
|
768
|
+
const templatePath = pathe.join(communityTemplatesDir, dotNotationName);
|
|
769
|
+
const template = (await promises.readFile(templatePath, "utf-8")).replace("{{ title }}", `{{ title }} - Ejected!`);
|
|
770
|
+
await promises.writeFile(newPath, template, { encoding: "utf-8" });
|
|
771
|
+
await kit.updateTemplates({ filter: (t) => t.filename.includes("nuxt-og-image/components.mjs") });
|
|
772
|
+
const nitro = await useNitro;
|
|
773
|
+
await nitro.hooks.callHook("rollup:reload");
|
|
774
|
+
return newPath;
|
|
775
|
+
},
|
|
776
|
+
async createComponent({ name, renderer, pageFile }) {
|
|
777
|
+
const validRenderers = ["satori", "browser", "takumi"];
|
|
778
|
+
if (!validRenderers.includes(renderer))
|
|
779
|
+
throw new Error(`Invalid renderer: ${renderer}`);
|
|
780
|
+
if (!RE_WORD_CHARS_ONLY.test(name))
|
|
781
|
+
throw new Error(`Invalid component name: ${name}`);
|
|
782
|
+
const baseDir = fs.existsSync(pathe.join(nuxt.options.srcDir, "app")) ? pathe.join(nuxt.options.srcDir, "app") : nuxt.options.srcDir;
|
|
783
|
+
const outputDir = pathe.join(baseDir, "components", "OgImage");
|
|
784
|
+
if (!fs.existsSync(outputDir))
|
|
785
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
786
|
+
const filename = `${name}.${renderer}.vue`;
|
|
787
|
+
const outputPath = pathe.join(outputDir, filename);
|
|
788
|
+
if (fs.existsSync(outputPath))
|
|
789
|
+
throw new Error(`File already exists: ${pathe.relative(nuxt.options.rootDir, outputPath)}`);
|
|
790
|
+
const template = getStarterTemplate(renderer, cssFramework);
|
|
791
|
+
await promises.writeFile(outputPath, template, { encoding: "utf-8" });
|
|
792
|
+
await insertDefineOgImage(name, pageFile);
|
|
793
|
+
await kit.updateTemplates({ filter: (t) => t.filename.includes("nuxt-og-image/components.mjs") });
|
|
794
|
+
const nitro = await useNitro;
|
|
795
|
+
await nitro.hooks.callHook("rollup:reload");
|
|
796
|
+
return outputPath;
|
|
797
|
+
},
|
|
798
|
+
async addOgImageToPage(componentName, pageFile) {
|
|
799
|
+
if (!RE_WORD_CHARS_ONLY.test(componentName))
|
|
800
|
+
throw new Error(`Invalid component name: ${componentName}`);
|
|
801
|
+
return insertDefineOgImage(componentName, pageFile);
|
|
802
|
+
}
|
|
803
|
+
}, nuxt).then((rpc) => {
|
|
846
804
|
let cssRefreshTimer;
|
|
847
805
|
nuxt.hook("builder:watch", (e, watchPath) => {
|
|
848
806
|
if (!e || !watchPath)
|
|
@@ -876,15 +834,6 @@ ${content}`, "utf-8");
|
|
|
876
834
|
}
|
|
877
835
|
});
|
|
878
836
|
});
|
|
879
|
-
devtoolsKit.addCustomTab({
|
|
880
|
-
name: "nuxt-og-image",
|
|
881
|
-
title: "OG Image",
|
|
882
|
-
icon: "carbon:image-search",
|
|
883
|
-
view: {
|
|
884
|
-
type: "iframe",
|
|
885
|
-
src: DEVTOOLS_UI_ROUTE
|
|
886
|
-
}
|
|
887
|
-
});
|
|
888
837
|
}
|
|
889
838
|
|
|
890
839
|
const _warnedVars = /* @__PURE__ */ new Set();
|
|
@@ -3503,29 +3452,6 @@ ${importStatements}
|
|
|
3503
3452
|
};
|
|
3504
3453
|
});
|
|
3505
3454
|
|
|
3506
|
-
async function getNuxtModuleOptions(module, nuxt = kit.useNuxt()) {
|
|
3507
|
-
const moduleMeta = ({ name: module } ) || {};
|
|
3508
|
-
const { nuxtModule } = await kit.loadNuxtModuleInstance(module, nuxt);
|
|
3509
|
-
let moduleEntry;
|
|
3510
|
-
for (const m of nuxt.options.modules) {
|
|
3511
|
-
if (Array.isArray(m) && m.length >= 2) {
|
|
3512
|
-
const _module = m[0];
|
|
3513
|
-
const _moduleEntryName = typeof _module === "string" ? _module : (await _module.getMeta?.())?.name || "";
|
|
3514
|
-
if (_moduleEntryName === moduleMeta.name)
|
|
3515
|
-
moduleEntry = m;
|
|
3516
|
-
}
|
|
3517
|
-
}
|
|
3518
|
-
let inlineOptions = {};
|
|
3519
|
-
if (moduleEntry)
|
|
3520
|
-
inlineOptions = moduleEntry[1];
|
|
3521
|
-
if (nuxtModule.getOptions)
|
|
3522
|
-
return nuxtModule.getOptions(inlineOptions, nuxt);
|
|
3523
|
-
return inlineOptions;
|
|
3524
|
-
}
|
|
3525
|
-
function isNuxtGenerate(nuxt = kit.useNuxt()) {
|
|
3526
|
-
return nuxt.options.nitro.static || nuxt.options.nitro.preset === "static";
|
|
3527
|
-
}
|
|
3528
|
-
|
|
3529
3455
|
const warnings = [];
|
|
3530
3456
|
const counts = {
|
|
3531
3457
|
config: /* @__PURE__ */ new Map(),
|
|
@@ -3861,7 +3787,7 @@ async function onUpgrade(nuxt, _options, previousVersion) {
|
|
|
3861
3787
|
}
|
|
3862
3788
|
if (detectedRenderers.size === 0)
|
|
3863
3789
|
detectedRenderers.add("satori");
|
|
3864
|
-
const preset =
|
|
3790
|
+
const preset = resolveOgImagePreset();
|
|
3865
3791
|
const compatibility = getPresetNitroPresetCompatibility(preset);
|
|
3866
3792
|
for (const renderer of detectedRenderers) {
|
|
3867
3793
|
const validation = await validateProviderSetup(renderer, compatibility);
|
|
@@ -4151,6 +4077,9 @@ const module$1 = kit.defineNuxtModule({
|
|
|
4151
4077
|
},
|
|
4152
4078
|
"@nuxt/fonts": {
|
|
4153
4079
|
optional: true
|
|
4080
|
+
},
|
|
4081
|
+
"nuxt-site-config": {
|
|
4082
|
+
version: ">=3.2"
|
|
4154
4083
|
}
|
|
4155
4084
|
},
|
|
4156
4085
|
defaults() {
|
|
@@ -4177,7 +4106,7 @@ const module$1 = kit.defineNuxtModule({
|
|
|
4177
4106
|
await onUpgrade(nuxt, options, previousVersion);
|
|
4178
4107
|
},
|
|
4179
4108
|
async setup(config, nuxt) {
|
|
4180
|
-
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.
|
|
4109
|
+
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.CBzKFXjI.cjs', document.baseURI).href)));
|
|
4181
4110
|
const fixSharedPath = (p) => {
|
|
4182
4111
|
if (p.includes("/shared/runtime/"))
|
|
4183
4112
|
return p.replace("/shared/runtime/", "/runtime/");
|
|
@@ -4242,7 +4171,7 @@ Or pin to a specific version in package.json:
|
|
|
4242
4171
|
}
|
|
4243
4172
|
nuxt.options.alias["#og-image"] = resolve("./runtime");
|
|
4244
4173
|
nuxt.options.alias["#og-image-cache"] = resolve("./runtime/server/og-image/cache/lru");
|
|
4245
|
-
const preset =
|
|
4174
|
+
const preset = resolveOgImagePreset(nuxt.options.nitro);
|
|
4246
4175
|
const targetCompatibility = getPresetNitroPresetCompatibility(preset);
|
|
4247
4176
|
const normalizedPreset = preset.replace(RE_LEGACY_SUFFIX, "");
|
|
4248
4177
|
const isCloudflareWorkers = ["cloudflare", "cloudflare-module", "cloudflare-durable"].includes(normalizedPreset);
|
|
@@ -4570,7 +4499,7 @@ ${familyInfo}`);
|
|
|
4570
4499
|
prerender: { browser: browserBinding.prerender }
|
|
4571
4500
|
});
|
|
4572
4501
|
}
|
|
4573
|
-
await kit$
|
|
4502
|
+
await kit$2.installNuxtSiteConfig();
|
|
4574
4503
|
nuxt.options.experimental.componentIslands ||= true;
|
|
4575
4504
|
if (config.debug || nuxt.options.dev) {
|
|
4576
4505
|
kit.addServerHandler({
|
|
@@ -4886,7 +4815,7 @@ export const resolve = (import.meta.dev || import.meta.prerender) ? devResolve :
|
|
|
4886
4815
|
if (hasNuxtFonts && fontContext) {
|
|
4887
4816
|
persistFontUrlMapping({ fontContext, buildDir: nuxt.options.buildDir, logger: logger_js.logger });
|
|
4888
4817
|
}
|
|
4889
|
-
if (!fontProcessingDone && convertedWoff2Files.size === 0 &&
|
|
4818
|
+
if (!fontProcessingDone && convertedWoff2Files.size === 0 && hasSatoriRenderer() && hasNuxtFonts) {
|
|
4890
4819
|
if (pendingFontRequirements.length > 0)
|
|
4891
4820
|
await Promise.all(pendingFontRequirements);
|
|
4892
4821
|
await convertWoff2ToTtf({
|
|
@@ -4955,7 +4884,7 @@ export const rootDir = ${JSON.stringify(nuxt.options.rootDir)}`;
|
|
|
4955
4884
|
});
|
|
4956
4885
|
nuxt.hook("vite:compiled", async () => {
|
|
4957
4886
|
persistFontUrlMapping({ fontContext, buildDir: nuxt.options.buildDir, logger: logger_js.logger });
|
|
4958
|
-
if (fontProcessingDone || !hasSatoriRenderer()
|
|
4887
|
+
if (fontProcessingDone || !hasSatoriRenderer())
|
|
4959
4888
|
return;
|
|
4960
4889
|
if (pendingFontRequirements.length === 0)
|
|
4961
4890
|
return;
|
|
@@ -5011,13 +4940,8 @@ export const rootDir = ${JSON.stringify(nuxt.options.rootDir)}`;
|
|
|
5011
4940
|
const buildCachePath = typeof config.buildCache === "object" && config.buildCache.base ? config.buildCache.base : "node_modules/.cache/nuxt-seo/og-image";
|
|
5012
4941
|
const buildCacheDir = config.buildCache ? pathe.join(nuxt.options.rootDir, buildCachePath) : void 0;
|
|
5013
4942
|
nuxt.hooks.hook("modules:done", async () => {
|
|
5014
|
-
if (!isNuxtGenerate() && nuxt.options.build) {
|
|
5015
|
-
nuxt.options.nitro = nuxt.options.nitro || {};
|
|
5016
|
-
nuxt.options.nitro.prerender = nuxt.options.nitro.prerender || {};
|
|
5017
|
-
nuxt.options.nitro.prerender.routes = nuxt.options.nitro.prerender.routes || [];
|
|
5018
|
-
}
|
|
5019
4943
|
const hasColorModeModule = kit.hasNuxtModule("@nuxtjs/color-mode");
|
|
5020
|
-
const colorModeOptions = hasColorModeModule ? await getNuxtModuleOptions("@nuxtjs/color-mode") : {};
|
|
4944
|
+
const colorModeOptions = hasColorModeModule ? await kit$1.getNuxtModuleOptions("@nuxtjs/color-mode") : {};
|
|
5021
4945
|
let colorPreference = colorModeOptions.preference;
|
|
5022
4946
|
if (!colorPreference || colorPreference === "system")
|
|
5023
4947
|
colorPreference = colorModeOptions.fallback;
|
|
@@ -5089,7 +5013,7 @@ export const rootDir = ${JSON.stringify(nuxt.options.rootDir)}`;
|
|
|
5089
5013
|
await nitro.hooks.callHook("rollup:reload");
|
|
5090
5014
|
}
|
|
5091
5015
|
});
|
|
5092
|
-
} else if (isNuxtGenerate()) {
|
|
5016
|
+
} else if (kit$1.isNuxtGenerate()) {
|
|
5093
5017
|
setupGenerateHandler(config, resolver);
|
|
5094
5018
|
} else if (nuxt.options.build) {
|
|
5095
5019
|
await setupBuildHandler(config, resolver, getDetectedRenderers);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-og-image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.2.0",
|
|
5
5
|
"description": "Enlightened OG Image generation for Nuxt.",
|
|
6
6
|
"author": {
|
|
7
7
|
"website": "https://harlanzw.com",
|
|
@@ -108,7 +108,9 @@
|
|
|
108
108
|
"magic-string": "^0.30.21",
|
|
109
109
|
"magicast": "^0.5.2",
|
|
110
110
|
"mocked-exports": "^0.1.1",
|
|
111
|
-
"nuxt-site-config": "^
|
|
111
|
+
"nuxt-site-config": "^4.0.0",
|
|
112
|
+
"nuxtseo-layer-devtools": "^0.3.0",
|
|
113
|
+
"nuxtseo-shared": "^0.7.0",
|
|
112
114
|
"nypm": "^0.6.5",
|
|
113
115
|
"ofetch": "^1.5.1",
|
|
114
116
|
"ohash": "^2.0.11",
|
|
@@ -132,7 +134,7 @@
|
|
|
132
134
|
"@iconify-json/logos": "^1.2.10",
|
|
133
135
|
"@iconify-json/noto": "^1.2.7",
|
|
134
136
|
"@iconify-json/ri": "^1.2.10",
|
|
135
|
-
"@iconify-json/tabler": "^1.2.
|
|
137
|
+
"@iconify-json/tabler": "^1.2.32",
|
|
136
138
|
"@img/sharp-linux-x64": "^0.34.5",
|
|
137
139
|
"@nuxt/content": "^3.12.0",
|
|
138
140
|
"@nuxt/devtools": "^3.2.4",
|
|
@@ -142,28 +144,28 @@
|
|
|
142
144
|
"@nuxt/image": "^2.0.0",
|
|
143
145
|
"@nuxt/module-builder": "^1.0.2",
|
|
144
146
|
"@nuxt/test-utils": "^4.0.0",
|
|
145
|
-
"@nuxt/ui": "^4.
|
|
147
|
+
"@nuxt/ui": "^4.6.0",
|
|
146
148
|
"@nuxtjs/color-mode": "^4.0.0",
|
|
147
149
|
"@nuxtjs/eslint-config-typescript": "^12.1.0",
|
|
148
|
-
"@nuxtjs/i18n": "^10.2.
|
|
150
|
+
"@nuxtjs/i18n": "^10.2.4",
|
|
149
151
|
"@nuxtjs/tailwindcss": "7.0.0-beta.1",
|
|
150
152
|
"@resvg/resvg-js": "^2.6.2",
|
|
151
153
|
"@resvg/resvg-wasm": "^2.6.2",
|
|
152
154
|
"@shikijs/langs": "^4.0.2",
|
|
153
155
|
"@shikijs/themes": "^4.0.2",
|
|
154
156
|
"@tailwindcss/vite": "^4.2.2",
|
|
155
|
-
"@takumi-rs/core": "
|
|
156
|
-
"@takumi-rs/wasm": "
|
|
157
|
+
"@takumi-rs/core": "1.0.0-beta.13",
|
|
158
|
+
"@takumi-rs/wasm": "1.0.0-beta.13",
|
|
157
159
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
158
160
|
"@vueuse/nuxt": "^14.2.1",
|
|
159
161
|
"birpc": "^4.0.0",
|
|
160
162
|
"bumpp": "^11.0.1",
|
|
161
163
|
"eslint": "^10.1.0",
|
|
162
|
-
"eslint-plugin-harlanzw": "^0.
|
|
164
|
+
"eslint-plugin-harlanzw": "^0.11.0",
|
|
163
165
|
"fontless": "^0.2.1",
|
|
164
166
|
"get-image-colors": "^4.0.1",
|
|
165
167
|
"globby": "^16.1.1",
|
|
166
|
-
"happy-dom": "^20.8.
|
|
168
|
+
"happy-dom": "^20.8.7",
|
|
167
169
|
"jest-image-snapshot": "^6.5.2",
|
|
168
170
|
"lightningcss": "^1.32.0",
|
|
169
171
|
"nuxt": "^4.4.2",
|
|
@@ -173,20 +175,20 @@
|
|
|
173
175
|
"satori": "^0.26.0",
|
|
174
176
|
"sharp": "^0.34.5",
|
|
175
177
|
"tailwindcss": "^4.2.2",
|
|
176
|
-
"typescript": "^
|
|
178
|
+
"typescript": "^6.0.2",
|
|
177
179
|
"unifont": "^0.7.4",
|
|
178
|
-
"vitest": "^4.1.
|
|
180
|
+
"vitest": "^4.1.1",
|
|
179
181
|
"vue-tsc": "^3.2.6",
|
|
180
|
-
"wrangler": "^4.
|
|
182
|
+
"wrangler": "^4.77.0",
|
|
181
183
|
"yoga-wasm-web": "^0.3.3"
|
|
182
184
|
},
|
|
183
185
|
"scripts": {
|
|
184
186
|
"snapshots": "node --import jiti/register scripts/generate-template-snapshots.ts",
|
|
185
187
|
"stub": "nuxt-build-module build --stub && nuxt-module-build prepare",
|
|
186
188
|
"build": "pnpm stub && nuxt-module-build build && pnpm run build:client",
|
|
187
|
-
"build:client": "nuxt generate
|
|
189
|
+
"build:client": "nuxt generate devtools",
|
|
188
190
|
"build:module": "nuxt-build-module build",
|
|
189
|
-
"
|
|
191
|
+
"devtools": "nuxt dev devtools --port 3030",
|
|
190
192
|
"lint": "eslint .",
|
|
191
193
|
"lint:fix": "eslint . --fix",
|
|
192
194
|
"dev": "nuxt dev playground",
|
package/dist/client/200.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/uVtaRSp0.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CjxjoX5J.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/uVtaRSp0.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Vmj2QZYx.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CoV50A8g.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CwCh3_ha.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D1lfPgTt.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/OW9R-PIP.js"><script type="module" src="/__nuxt-og-image/_nuxt/uVtaRSp0.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:"1e1bd3b0-a510-4582-8d5c-6be1220c8d28",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774170167284,false]</script></body></html>
|
package/dist/client/404.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/uVtaRSp0.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CjxjoX5J.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/uVtaRSp0.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Vmj2QZYx.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CoV50A8g.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CwCh3_ha.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D1lfPgTt.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/OW9R-PIP.js"><script type="module" src="/__nuxt-og-image/_nuxt/uVtaRSp0.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:"1e1bd3b0-a510-4582-8d5c-6be1220c8d28",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774170167285,false]</script></body></html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as e,K as t,Ot as n,S as r,St as i,T as a,Tt as o,_ as s,g as c,v as l,y as u}from"./Vmj2QZYx.js";import{F as d,j as f,x as p}from"#entry";var m=[`open`],h={class:`flex-1 min-w-0`},g={class:`section-label`},_={key:0,class:`section-description`},v=Object.assign(d(a({__name:`OSectionBlock`,props:{icon:{},text:{},description:{},containerClass:{default:``},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(a){let d=f(a,`open`);function v(e){d.value=e.target.open}return(f,y)=>{let b=p;return e(),u(`details`,{open:i(d),class:`section-block`,onToggle:v},[c(`summary`,{class:o([`section-header`,a.collapse?``:`pointer-events-none`])},[c(`div`,{class:o([`section-title`,[i(d)?``:`opacity-60`,a.headerClass]])},[a.icon?(e(),s(b,{key:0,name:a.icon,class:`section-icon`},null,8,[`name`])):l(``,!0),c(`div`,h,[c(`div`,g,[t(f.$slots,`text`,{},()=>[r(n(a.text),1)],!0)]),a.description||f.$slots.description?(e(),u(`div`,_,[t(f.$slots,`description`,{},()=>[r(n(a.description),1)],!0)])):l(``,!0)]),t(f.$slots,`actions`,{},void 0,!0),a.collapse?(e(),s(b,{key:1,name:`carbon:chevron-down`,class:`chevron`})):l(``,!0)],2)],2),c(`div`,{class:o([`section-content`,typeof a.padding==`string`?a.padding:a.padding?`px-4`:``])},[t(f.$slots,`details`,{},void 0,!0),c(`div`,{class:o(a.containerClass)},[t(f.$slots,`default`,{},void 0,!0)],2),t(f.$slots,`footer`,{},void 0,!0)],2)],40,m)}}}),[[`__scopeId`,`data-v-da1034ef`]]),{__name:`OSectionBlock`});export{v as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./CwCh3_ha.js";import{t as e}from"./CoV50A8g.js";export{e as default};
|