nuxt-og-image 5.1.8 → 5.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/200.html +1 -15
- package/dist/client/404.html +1 -15
- package/dist/client/_nuxt/C0O1sPH1.js +4017 -0
- package/dist/client/_nuxt/C83k_r4_.js +1 -0
- package/dist/client/_nuxt/DAn4LZxu.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/9c728642-f464-4f02-9cbc-65fa9d60f818.json +1 -0
- package/dist/client/_nuxt/entry.Hpb5KO2G.css +1 -0
- package/dist/client/_nuxt/error-404.D1qMyH7R.css +1 -0
- package/dist/client/_nuxt/error-500.C-aGJHmP.css +1 -0
- package/dist/client/index.html +1 -15
- package/dist/module.cjs +32 -41
- package/dist/module.json +2 -3
- package/dist/module.mjs +34 -43
- package/dist/runtime/app/components/Templates/Community/BrandedLogo.vue.d.ts +1 -4
- package/dist/runtime/app/components/Templates/Community/Frame.vue.d.ts +1 -3
- package/dist/runtime/app/components/Templates/Community/Nuxt.vue.d.ts +1 -5
- package/dist/runtime/app/components/Templates/Community/NuxtSeo.vue.d.ts +1 -4
- package/dist/runtime/app/components/Templates/Community/Pergel.vue.d.ts +1 -5
- package/dist/runtime/app/components/Templates/Community/SimpleBlog.vue.d.ts +1 -3
- package/dist/runtime/app/components/Templates/Community/UnJs.vue.d.ts +1 -8
- package/dist/runtime/app/components/Templates/Community/Wave.vue.d.ts +1 -3
- package/dist/runtime/app/components/Templates/Community/WithEmoji.vue.d.ts +1 -4
- package/dist/runtime/app/utils/plugins.js +3 -3
- package/dist/runtime/server/og-image/context.js +1 -1
- package/dist/runtime/server/og-image/satori/plugins/imageSrc.js +1 -1
- package/dist/runtime/server/og-image/satori/plugins/unocss.js +13 -7
- package/dist/runtime/server/plugins/prerender.js +1 -1
- package/dist/runtime/server/util/eventHandlers.js +3 -3
- package/dist/runtime/server/util/kit.d.ts +1 -1
- package/dist/runtime/server/util/plugins.js +1 -1
- package/dist/runtime/shared.d.ts +1 -1
- package/dist/runtime/shared.js +1 -1
- package/package.json +30 -24
- package/dist/client/_nuxt/BM0SGHtW.js +0 -1
- package/dist/client/_nuxt/Cl0GRg1F.js +0 -4017
- package/dist/client/_nuxt/DH3TEEXq.js +0 -1
- package/dist/client/_nuxt/builds/meta/32731774-300b-4e2d-acf2-4e94bbd66b89.json +0 -1
- package/dist/client/_nuxt/entry.BVkKIlAn.css +0 -1
- package/dist/client/_nuxt/error-404.CWHu2lpK.css +0 -1
- package/dist/client/_nuxt/error-500.xMt3qmEl.css +0 -1
|
@@ -9,12 +9,5 @@ type __VLS_Props = {
|
|
|
9
9
|
stars?: string | number;
|
|
10
10
|
contributors?: string | number;
|
|
11
11
|
};
|
|
12
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
-
title: string;
|
|
14
|
-
description: string;
|
|
15
|
-
emoji: string;
|
|
16
|
-
downloads: string | number;
|
|
17
|
-
stars: string | number;
|
|
18
|
-
contributors: string | number;
|
|
19
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
13
|
export default _default;
|
|
@@ -4,7 +4,5 @@
|
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
title?: string;
|
|
6
6
|
};
|
|
7
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
8
|
-
title: string;
|
|
9
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
8
|
export default _default;
|
|
@@ -5,8 +5,5 @@ type __VLS_Props = {
|
|
|
5
5
|
emoji?: string;
|
|
6
6
|
title?: string;
|
|
7
7
|
};
|
|
8
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
-
title: string;
|
|
10
|
-
emoji: string;
|
|
11
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
9
|
export default _default;
|
|
@@ -38,14 +38,14 @@ export function ogImageCanonicalUrls(nuxtApp) {
|
|
|
38
38
|
}
|
|
39
39
|
ctx2.tags = ctx2.tags.filter(Boolean);
|
|
40
40
|
for (const tag of ctx2.tags) {
|
|
41
|
-
if (tag.tag === "meta" && (tag.props.property === "og:image" || ["twitter:image:src", "twitter:image"].includes(tag.props.name))) {
|
|
41
|
+
if (tag.tag === "meta" && (tag.props.property === "og:image" || ["twitter:image:src", "twitter:image"].includes(tag.props.name || ""))) {
|
|
42
42
|
if (!tag.props.content) {
|
|
43
43
|
tag.props = {};
|
|
44
44
|
continue;
|
|
45
45
|
}
|
|
46
46
|
if (!tag.props.content?.startsWith("https")) {
|
|
47
47
|
await nuxtApp.runWithContext(() => {
|
|
48
|
-
tag.props.content = toValue(withSiteUrl(tag.props.content, {
|
|
48
|
+
tag.props.content = toValue(withSiteUrl(tag.props.content || "", {
|
|
49
49
|
withBase: true
|
|
50
50
|
}));
|
|
51
51
|
});
|
|
@@ -70,7 +70,7 @@ export function routeRuleOgImage(nuxtApp) {
|
|
|
70
70
|
createRadixRouter({ routes: ssrContext?.runtimeConfig?.nitro?.routeRules })
|
|
71
71
|
);
|
|
72
72
|
const matchedRules = _routeRulesMatcher.matchAll(
|
|
73
|
-
withoutBase(path.split("?")[0], ssrContext?.runtimeConfig?.app.baseURL || "")
|
|
73
|
+
withoutBase(path.split("?")?.[0] || "", ssrContext?.runtimeConfig?.app.baseURL || "")
|
|
74
74
|
).reverse();
|
|
75
75
|
const combinedRules = defu({}, ...matchedRules);
|
|
76
76
|
let routeRules = combinedRules?.ogImage;
|
|
@@ -146,7 +146,7 @@ export async function resolveContext(e) {
|
|
|
146
146
|
const PAYLOAD_REGEX = /<script.+id="nuxt-og-image-options"[^>]*>(.+?)<\/script>/;
|
|
147
147
|
function getPayloadFromHtml(html) {
|
|
148
148
|
const match = String(html).match(PAYLOAD_REGEX);
|
|
149
|
-
return match ? match[1] : null;
|
|
149
|
+
return match ? String(match[1]) : null;
|
|
150
150
|
}
|
|
151
151
|
export function extractAndNormaliseOgImageOptions(html) {
|
|
152
152
|
const _payload = getPayloadFromHtml(html);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useNitroOrigin } from "#site-config/server/composables/useNitroOrigin";
|
|
2
2
|
import sizeOf from "image-size";
|
|
3
|
-
import { useStorage } from "nitropack/runtime
|
|
3
|
+
import { useStorage } from "nitropack/runtime";
|
|
4
4
|
import { withBase, withoutLeadingSlash } from "ufo";
|
|
5
5
|
import { toBase64Image } from "../../../../shared.js";
|
|
6
6
|
import { decodeHtml } from "../../../util/encoding.js";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { defineSatoriTransformer } from "../utils.js";
|
|
2
|
+
function safeSplit(s) {
|
|
3
|
+
const [key, value] = s.split(":");
|
|
4
|
+
return [String(key || "").trim(), String(value || "").trim()];
|
|
5
|
+
}
|
|
2
6
|
export default defineSatoriTransformer({
|
|
3
7
|
filter: (node) => !!node.props?.class,
|
|
4
8
|
transform: async (node, ctx) => {
|
|
@@ -8,7 +12,7 @@ export default defineSatoriTransformer({
|
|
|
8
12
|
for (const token of classes.split(" ").filter((c) => c.trim())) {
|
|
9
13
|
const parsedToken = await ctx.unocss.parseToken(token);
|
|
10
14
|
if (parsedToken) {
|
|
11
|
-
const inlineStyles = parsedToken[0][2].split(";").filter((s) => !!s?.trim());
|
|
15
|
+
const inlineStyles = String(parsedToken?.[0]?.[2]).split(";").filter((s) => !!s?.trim());
|
|
12
16
|
const vars = {
|
|
13
17
|
"--color-gray-50": "249 250 251",
|
|
14
18
|
"--color-gray-100": "243 244 246",
|
|
@@ -23,20 +27,22 @@ export default defineSatoriTransformer({
|
|
|
23
27
|
"--color-gray-950": "3 7 18"
|
|
24
28
|
};
|
|
25
29
|
inlineStyles.filter((s) => s.startsWith("--")).forEach((s) => {
|
|
26
|
-
const [key, value] = s
|
|
30
|
+
const [key, value] = safeSplit(s);
|
|
27
31
|
vars[key] = value;
|
|
28
32
|
});
|
|
29
33
|
inlineStyles.filter((s) => !s.startsWith("--")).forEach((s) => {
|
|
30
|
-
const [key, value] = s
|
|
34
|
+
const [key, value] = safeSplit(s);
|
|
31
35
|
const camelCasedKey = key.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
32
36
|
if (!styles[camelCasedKey])
|
|
33
37
|
styles[camelCasedKey] = value.replace(/var\((.*?)\)/g, (_, k) => vars[k.trim()]);
|
|
34
38
|
if (styles[camelCasedKey] && styles[camelCasedKey].includes("/")) {
|
|
35
39
|
const [rgb, opacity] = styles[camelCasedKey].split("/");
|
|
36
|
-
if (opacity
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
if (rgb && opacity) {
|
|
41
|
+
if (opacity.trim() === "1)")
|
|
42
|
+
styles[camelCasedKey] = rgb.replace(/(\d+) (\d+) (\d+).*/, (_, r, g, b) => `${r}, ${g}, ${b})`);
|
|
43
|
+
else
|
|
44
|
+
styles[camelCasedKey] = `${rgb.replace("rgb", "rgba").replaceAll(" ", ", ")}${opacity.trim()}`;
|
|
45
|
+
}
|
|
40
46
|
}
|
|
41
47
|
});
|
|
42
48
|
replacedClasses.add(token);
|
|
@@ -31,7 +31,7 @@ export default defineNitroPlugin(async (nitro) => {
|
|
|
31
31
|
await prerenderOptionsCache.setItem(key, options);
|
|
32
32
|
const index = html.bodyAppend.findIndex((script) => script.includes('id="nuxt-og-image-options"'));
|
|
33
33
|
if (index !== -1) {
|
|
34
|
-
html.bodyAppend[index] = html.bodyAppend[index].replace(/<script id="nuxt-og-image-options" type="application\/json">[\s\S]*?<\/script>/, "");
|
|
34
|
+
html.bodyAppend[index] = String(html.bodyAppend[index]).replace(/<script id="nuxt-og-image-options" type="application\/json">[\s\S]*?<\/script>/, "");
|
|
35
35
|
html.bodyAppend[index] = html.bodyAppend[index].replace(/<script id="nuxt-og-image-overrides" type="application\/json">[\s\S]*?<\/script>/, "");
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -10,7 +10,7 @@ export async function fontEventHandler(e) {
|
|
|
10
10
|
const path = parseURL(e.path).pathname;
|
|
11
11
|
const { fonts } = useOgImageRuntimeConfig();
|
|
12
12
|
const key = path.split("/font/")[1];
|
|
13
|
-
if (key.includes(":")) {
|
|
13
|
+
if (key && key.includes(":")) {
|
|
14
14
|
const font2 = fonts.find((f) => f.key === key);
|
|
15
15
|
if (font2?.key && await assets.hasItem(font2.key)) {
|
|
16
16
|
let fontData = await assets.getItem(font2.key);
|
|
@@ -28,10 +28,10 @@ export async function fontEventHandler(e) {
|
|
|
28
28
|
return Buffer.from(fontData, "base64");
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
const [_name, _weight] = key
|
|
31
|
+
const [_name, _weight] = String(key?.split(".")[0]).split("/");
|
|
32
32
|
if (!_name || !_weight)
|
|
33
33
|
return "Provide a font name and weight";
|
|
34
|
-
const name = _name[0].toUpperCase() + _name.slice(1);
|
|
34
|
+
const name = String(_name[0]).toUpperCase() + _name.slice(1);
|
|
35
35
|
const weight = Math.round(Number.parseInt(_weight) / 100) * 100;
|
|
36
36
|
const config = useOgImageRuntimeConfig();
|
|
37
37
|
const normalisedFonts = normaliseFontInput(config.fonts);
|
|
@@ -2,5 +2,5 @@ import type { H3Event } from 'h3';
|
|
|
2
2
|
import type { NitroRouteRules } from 'nitropack';
|
|
3
3
|
import type { NuxtIslandResponse } from 'nuxt/app';
|
|
4
4
|
export declare function fetchIsland(e: H3Event, component: string, props: Record<string, any>): Promise<NuxtIslandResponse>;
|
|
5
|
-
export declare function withoutQuery(path: string): string;
|
|
5
|
+
export declare function withoutQuery(path: string): string | undefined;
|
|
6
6
|
export declare function createNitroRouteRuleMatcher(): ((path: string) => NitroRouteRules);
|
|
@@ -33,7 +33,7 @@ export function nuxtContentPlugin(nitroApp) {
|
|
|
33
33
|
...content.ogImage
|
|
34
34
|
};
|
|
35
35
|
Object.entries(ogImageConfig).forEach(([key, val]) => {
|
|
36
|
-
payload[key.replace(/-([a-z])/g, (g) => g[1].toUpperCase())] = val;
|
|
36
|
+
payload[key.replace(/-([a-z])/g, (g) => String(g[1]).toUpperCase())] = val;
|
|
37
37
|
});
|
|
38
38
|
content.head = defu({
|
|
39
39
|
script: [
|
package/dist/runtime/shared.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare function separateProps(options: OgImageOptions | undefined, ignor
|
|
|
7
7
|
props: Record<string, any>;
|
|
8
8
|
};
|
|
9
9
|
export declare function normaliseFontInput(fonts: InputFontConfig[]): ResolvedFontConfig[];
|
|
10
|
-
export declare function withoutQuery(path: string): string;
|
|
10
|
+
export declare function withoutQuery(path: string): string | undefined;
|
|
11
11
|
export declare function getExtension(path: string): string;
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated Please use `#og-image/app/utils` instead.
|
package/dist/runtime/shared.js
CHANGED
|
@@ -77,7 +77,7 @@ export function separateProps(options, ignoreKeys = []) {
|
|
|
77
77
|
));
|
|
78
78
|
const props = {};
|
|
79
79
|
Object.entries(_props).forEach(([key, val]) => {
|
|
80
|
-
props[key.replace(/-([a-z])/g, (g) => g[1].toUpperCase())] = val;
|
|
80
|
+
props[key.replace(/-([a-z])/g, (g) => String(g[1]).toUpperCase())] = val;
|
|
81
81
|
});
|
|
82
82
|
return {
|
|
83
83
|
...Object.fromEntries(
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-og-image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.1.
|
|
4
|
+
"version": "5.1.9",
|
|
5
5
|
"description": "Enlightened OG Image generation for Nuxt.",
|
|
6
6
|
"author": {
|
|
7
7
|
"website": "https://harlanzw.com",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"unstorage": "^1.15.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@nuxt/devtools-kit": "^2.
|
|
52
|
-
"@nuxt/kit": "^3.17.
|
|
51
|
+
"@nuxt/devtools-kit": "^2.6.2",
|
|
52
|
+
"@nuxt/kit": "^3.17.6",
|
|
53
53
|
"@resvg/resvg-js": "^2.6.2",
|
|
54
54
|
"@resvg/resvg-wasm": "^2.6.2",
|
|
55
|
-
"@unocss/core": "^66.3.
|
|
56
|
-
"@unocss/preset-wind3": "^66.3.
|
|
55
|
+
"@unocss/core": "^66.3.2",
|
|
56
|
+
"@unocss/preset-wind3": "^66.3.2",
|
|
57
57
|
"chrome-launcher": "^1.2.0",
|
|
58
58
|
"consola": "^3.4.2",
|
|
59
59
|
"defu": "^6.1.4",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"ofetch": "^1.4.1",
|
|
67
67
|
"ohash": "^2.0.11",
|
|
68
68
|
"pathe": "^2.0.3",
|
|
69
|
-
"pkg-types": "^2.
|
|
70
|
-
"playwright-core": "^1.53.
|
|
69
|
+
"pkg-types": "^2.2.0",
|
|
70
|
+
"playwright-core": "^1.53.2",
|
|
71
71
|
"radix3": "^1.1.2",
|
|
72
72
|
"satori": "^0.15.2",
|
|
73
73
|
"satori-html": "^0.3.2",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"yoga-wasm-web": "^0.3.3"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@antfu/eslint-config": "^4.16.
|
|
83
|
+
"@antfu/eslint-config": "^4.16.2",
|
|
84
84
|
"@css-inline/css-inline": "^0.15.0",
|
|
85
85
|
"@headlessui/vue": "^1.7.23",
|
|
86
86
|
"@iconify-json/carbon": "^1.2.10",
|
|
@@ -89,34 +89,39 @@
|
|
|
89
89
|
"@iconify-json/ri": "^1.2.5",
|
|
90
90
|
"@iconify-json/tabler": "^1.2.19",
|
|
91
91
|
"@img/sharp-linux-x64": "^0.34.2",
|
|
92
|
-
"@nuxt/content": "^3.6.
|
|
93
|
-
"@nuxt/devtools": "^2.
|
|
94
|
-
"@nuxt/devtools-ui-kit": "^2.
|
|
95
|
-
"@nuxt/icon": "^1.
|
|
92
|
+
"@nuxt/content": "^3.6.3",
|
|
93
|
+
"@nuxt/devtools": "^2.6.2",
|
|
94
|
+
"@nuxt/devtools-ui-kit": "^2.6.2",
|
|
95
|
+
"@nuxt/icon": "^1.15.0",
|
|
96
96
|
"@nuxt/image": "^1.10.0",
|
|
97
97
|
"@nuxt/module-builder": "^1.0.1",
|
|
98
|
-
"@nuxt/test-utils": "^3.19.
|
|
98
|
+
"@nuxt/test-utils": "^3.19.2",
|
|
99
99
|
"@nuxt/ui": "^3.2.0",
|
|
100
100
|
"@nuxtjs/color-mode": "^3.5.2",
|
|
101
101
|
"@nuxtjs/eslint-config-typescript": "^12.1.0",
|
|
102
102
|
"@nuxtjs/i18n": "^9.5.6",
|
|
103
103
|
"@nuxtjs/tailwindcss": "^6.14.0",
|
|
104
|
-
"@unocss/nuxt": "^66.3.
|
|
105
|
-
"@unocss/preset-icons": "^66.3.
|
|
106
|
-
"@unocss/runtime": "^66.3.
|
|
107
|
-
"@vueuse/nuxt": "^13.
|
|
104
|
+
"@unocss/nuxt": "^66.3.2",
|
|
105
|
+
"@unocss/preset-icons": "^66.3.2",
|
|
106
|
+
"@unocss/runtime": "^66.3.2",
|
|
107
|
+
"@vueuse/nuxt": "^13.5.0",
|
|
108
108
|
"bumpp": "^10.2.0",
|
|
109
|
-
"eslint": "^9.
|
|
109
|
+
"eslint": "^9.30.1",
|
|
110
110
|
"happy-dom": "^18.0.1",
|
|
111
111
|
"jest-image-snapshot": "^6.5.1",
|
|
112
|
-
"nuxt": "^3.17.
|
|
113
|
-
"playwright": "^1.53.
|
|
112
|
+
"nuxt": "^3.17.6",
|
|
113
|
+
"playwright": "^1.53.2",
|
|
114
114
|
"sass": "^1.89.2",
|
|
115
115
|
"sharp": "^0.34.2",
|
|
116
116
|
"typescript": "^5.8.3",
|
|
117
|
-
"unocss": "^66.3.
|
|
117
|
+
"unocss": "^66.3.2",
|
|
118
118
|
"vitest": "^3.2.4",
|
|
119
|
-
"vue-tsc": "^
|
|
119
|
+
"vue-tsc": "^3.0.1"
|
|
120
|
+
},
|
|
121
|
+
"resolutions": {
|
|
122
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.0.0-29191554.69345c32",
|
|
123
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.0.0-29191554.69345c32",
|
|
124
|
+
"nuxt": "npm:nuxt-nightly@4.0.0-29191554.69345c32"
|
|
120
125
|
},
|
|
121
126
|
"scripts": {
|
|
122
127
|
"stub": "nuxt-build-module build --stub && nuxt-module-build prepare",
|
|
@@ -128,10 +133,11 @@
|
|
|
128
133
|
"lint:fix": "eslint . --fix",
|
|
129
134
|
"dev": "nuxi dev playground",
|
|
130
135
|
"dev:build": "nuxi build playground",
|
|
131
|
-
"
|
|
136
|
+
"prepare:fixtures": "nuxi prepare test/fixtures/basic",
|
|
137
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare client && pnpm run prepare:fixtures",
|
|
132
138
|
"release": "pnpm build && bumpp && pnpm -r publish --no-git-checks",
|
|
133
139
|
"typecheck": "tsc --noEmit",
|
|
134
|
-
"test": "vitest",
|
|
140
|
+
"test": "pnpm run prepare:fixtures && vitest",
|
|
135
141
|
"test:chrome": "HAS_CHROME=true vitest"
|
|
136
142
|
}
|
|
137
143
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as a,u as i,c as u,o as c,a as e,t as r,b as l,w as d,d as p,e as f}from"./Cl0GRg1F.js";const m={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},g={class:"max-w-520px text-center z-20"},h=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return i({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver((e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)})).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,o)=>{const s=f;return c(),u("div",m,[o[0]||(o[0]=e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),e("div",g,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:r(t.statusCode)},null,8,h),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:r(t.description)},null,8,b),e("div",x,[l(s,{to:"/",class:"cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"},{default:d(()=>[p(r(t.backHome),1)]),_:1})])])])}}},_=a(y,[["__scopeId","data-v-66c28054"]]);export{_ as default};
|