@mevbg/nuxt-kit 0.4.3 → 0.5.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/dist/module.d.mts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +6 -2
- package/dist/runtime/composables/index.d.ts +2 -1
- package/dist/runtime/composables/index.js +2 -1
- package/dist/runtime/composables/{useMetaData.d.ts → useAppMeta.d.ts} +2 -6
- package/dist/runtime/composables/{useMetaData.js → useAppMeta.js} +2 -20
- package/dist/runtime/composables/usePageMeta.d.ts +18 -0
- package/dist/runtime/composables/usePageMeta.js +27 -0
- package/package.json +1 -1
package/dist/module.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ interface NuxtKitOptions {
|
|
|
9
9
|
designEssentials?: MasterGeneratorParams;
|
|
10
10
|
colorScheme?: ColorSchemeOptions;
|
|
11
11
|
toastify?: ToastContainerOptions;
|
|
12
|
-
floating?:
|
|
12
|
+
floating?: unknown;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
declare const _default: _nuxt_schema.NuxtModule<NuxtKitOptions, NuxtKitOptions, false>;
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -52,8 +52,12 @@ const module = defineNuxtModule({
|
|
|
52
52
|
from: resolver.resolve("./runtime/composables/useScrollDirectionUp")
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
name: "
|
|
56
|
-
from: resolver.resolve("./runtime/composables/
|
|
55
|
+
name: "useAppMeta",
|
|
56
|
+
from: resolver.resolve("./runtime/composables/useAppMeta")
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "usePageMeta",
|
|
60
|
+
from: resolver.resolve("./runtime/composables/usePageMeta")
|
|
57
61
|
},
|
|
58
62
|
{
|
|
59
63
|
name: "useHeadLinks",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './useErrorHandler.js';
|
|
2
2
|
export * from './useHeadLinks.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './useAppMeta.js';
|
|
4
|
+
export * from './usePageMeta.js';
|
|
4
5
|
export * from './useNetworkListener.js';
|
|
5
6
|
export * from './useNotificationSystem.js';
|
|
6
7
|
export * from './useScrollDirectionUp.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./useErrorHandler.js";
|
|
2
2
|
export * from "./useHeadLinks.js";
|
|
3
|
-
export * from "./
|
|
3
|
+
export * from "./useAppMeta.js";
|
|
4
|
+
export * from "./usePageMeta.js";
|
|
4
5
|
export * from "./useNetworkListener.js";
|
|
5
6
|
export * from "./useNotificationSystem.js";
|
|
6
7
|
export * from "./useScrollDirectionUp.js";
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
type
|
|
1
|
+
type AppMeta = {
|
|
2
2
|
path: string;
|
|
3
3
|
locale: string;
|
|
4
|
-
homepage: string;
|
|
5
4
|
themeColor: string;
|
|
6
5
|
robots: boolean;
|
|
7
6
|
siteTitle: string;
|
|
8
|
-
siteDescription: string;
|
|
9
|
-
siteKeywords: string;
|
|
10
7
|
siteOwner: string;
|
|
11
|
-
siteImage: string;
|
|
12
8
|
googleSiteVerification?: string;
|
|
13
9
|
};
|
|
14
|
-
export declare function
|
|
10
|
+
export declare function useAppMeta({ path, locale, themeColor, robots, siteTitle, siteOwner, googleSiteVerification }: AppMeta): ({
|
|
15
11
|
charset: string;
|
|
16
12
|
'http-equiv'?: undefined;
|
|
17
13
|
content?: undefined;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function useAppMeta({
|
|
2
2
|
path = "/assets",
|
|
3
3
|
locale,
|
|
4
|
-
homepage,
|
|
5
4
|
themeColor,
|
|
6
5
|
robots,
|
|
7
6
|
siteTitle,
|
|
8
|
-
siteDescription,
|
|
9
|
-
siteKeywords,
|
|
10
7
|
siteOwner,
|
|
11
|
-
siteImage,
|
|
12
8
|
googleSiteVerification
|
|
13
9
|
}) {
|
|
14
10
|
return [
|
|
@@ -18,8 +14,6 @@ export function useMetaData({
|
|
|
18
14
|
{ name: "author", content: siteOwner },
|
|
19
15
|
{ name: "copyright", content: siteOwner },
|
|
20
16
|
...googleSiteVerification ? [{ name: "google-site-verification", content: googleSiteVerification }] : [],
|
|
21
|
-
{ name: "description", content: siteDescription },
|
|
22
|
-
{ name: "keywords", content: siteKeywords },
|
|
23
17
|
...!robots ? [{ name: "robots", content: "noindex,nofollow" }] : [],
|
|
24
18
|
{ name: "viewport", content: "width=device-width, initial-scale=1" },
|
|
25
19
|
{ name: "application-name", content: siteTitle },
|
|
@@ -33,19 +27,7 @@ export function useMetaData({
|
|
|
33
27
|
{ name: "msapplication-TileImage", content: `${path}/mstile-144x144.png` },
|
|
34
28
|
{ name: "msapplication-config", content: `${path}/browserconfig.xml` },
|
|
35
29
|
{ property: "og:site_name", content: siteTitle },
|
|
36
|
-
{ property: "og:title", content: siteTitle },
|
|
37
|
-
{ property: "og:description", content: siteDescription },
|
|
38
|
-
{ property: "og:type", content: "website" },
|
|
39
|
-
{ property: "og:url", content: homepage },
|
|
40
30
|
{ property: "og:locale", content: locale },
|
|
41
|
-
{
|
|
42
|
-
{ property: "og:image:type", content: "image/png" },
|
|
43
|
-
{ property: "og:image:width", content: "1200" },
|
|
44
|
-
{ property: "og:image:height", content: "630" },
|
|
45
|
-
{ property: "og:image:alt", content: siteTitle },
|
|
46
|
-
{ name: "twitter:card", content: "summary_large_image" },
|
|
47
|
-
{ name: "twitter:title", content: siteTitle },
|
|
48
|
-
{ name: "twitter:description", content: siteDescription },
|
|
49
|
-
{ name: "twitter:image", content: siteImage }
|
|
31
|
+
{ name: "twitter:card", content: "summary_large_image" }
|
|
50
32
|
];
|
|
51
33
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type PageMeta = {
|
|
2
|
+
pageType: string;
|
|
3
|
+
pageTitle: string;
|
|
4
|
+
pageUrl: string;
|
|
5
|
+
pageDescription: string;
|
|
6
|
+
pageKeywords: string;
|
|
7
|
+
pageImage?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function usePageMeta({ pageType, pageTitle, pageUrl, pageDescription, pageKeywords, pageImage }: PageMeta): ({
|
|
10
|
+
name: string;
|
|
11
|
+
content: string;
|
|
12
|
+
property?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
property: string;
|
|
15
|
+
content: string;
|
|
16
|
+
name?: undefined;
|
|
17
|
+
})[];
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function usePageMeta({
|
|
2
|
+
pageType,
|
|
3
|
+
pageTitle,
|
|
4
|
+
pageUrl,
|
|
5
|
+
pageDescription,
|
|
6
|
+
pageKeywords,
|
|
7
|
+
pageImage
|
|
8
|
+
}) {
|
|
9
|
+
return [
|
|
10
|
+
{ name: "description", content: pageDescription },
|
|
11
|
+
{ name: "keywords", content: pageKeywords },
|
|
12
|
+
{ property: "og:title", content: pageTitle },
|
|
13
|
+
{ property: "og:description", content: pageDescription },
|
|
14
|
+
{ property: "og:type", content: pageType },
|
|
15
|
+
{ property: "og:url", content: pageUrl },
|
|
16
|
+
...pageImage ? [
|
|
17
|
+
{ property: "og:image", content: pageImage },
|
|
18
|
+
{ property: "og:image:type", content: "image/png" },
|
|
19
|
+
{ property: "og:image:width", content: "1200" },
|
|
20
|
+
{ property: "og:image:height", content: "630" },
|
|
21
|
+
{ property: "og:image:alt", content: pageTitle }
|
|
22
|
+
] : [],
|
|
23
|
+
{ name: "twitter:title", content: pageTitle },
|
|
24
|
+
{ name: "twitter:description", content: pageDescription },
|
|
25
|
+
...pageImage ? [{ name: "twitter:image", content: pageImage }] : []
|
|
26
|
+
];
|
|
27
|
+
}
|