@monkeyplus/flow 6.0.55 → 6.0.56
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/package.json +1 -1
- package/server/lib/pages.mjs +0 -1
- package/server/lib/render.mjs +1 -2
- package/src/public/index.d.ts +1 -1
- package/src/public/index.mjs +1 -0
- package/src/public/vite.mjs +1 -0
- package/src/runtime/composables.d.ts +2 -1
- package/src/runtime/composables.mjs +4 -0
- package/src/runtime/pages.d.ts +4 -2
package/package.json
CHANGED
package/server/lib/pages.mjs
CHANGED
package/server/lib/render.mjs
CHANGED
|
@@ -103,7 +103,7 @@ async function renderBody(page) {
|
|
|
103
103
|
page: page.definition,
|
|
104
104
|
context: page.context,
|
|
105
105
|
head: page.head,
|
|
106
|
-
seo: page.seo,
|
|
106
|
+
seo: page.head.seo,
|
|
107
107
|
locale: page.locale,
|
|
108
108
|
params: page.params,
|
|
109
109
|
path: page.pathname
|
|
@@ -150,7 +150,6 @@ ${cleanTrace}`);
|
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
head.push(normalizeSeoToHead(page.head, fallbackTitle, fallbackDescription));
|
|
153
|
-
console.log("head", head);
|
|
154
153
|
app.use(head);
|
|
155
154
|
installFlowVuePlugins(app);
|
|
156
155
|
return {
|
package/src/public/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { ContentDirectoryNode, ContentEntry, ContentFileNode, ContentTreeNode, } from '../../modules/content/query.ts';
|
|
2
2
|
export type { FlowBootPayload } from '../runtime/boot.ts';
|
|
3
|
-
export { useContext, useGlobal, useLocale, usePage, useSeo, useSharedContext, useUtils, useView, } from '../runtime/composables.ts';
|
|
3
|
+
export { useContext, useGlobal, useHead, useLocale, usePage, useSeo, useSharedContext, useUtils, useView, } from '../runtime/composables.ts';
|
|
4
4
|
export { defineFlowConfig, defineFlowModule, resolveFlowConfig } from '../runtime/config.ts';
|
|
5
5
|
export type { FlowConfig, UserFlowConfig, } from '../runtime/config.ts';
|
|
6
6
|
export { useSchemaOrg } from '../runtime/head.ts';
|
package/src/public/index.mjs
CHANGED
package/src/public/vite.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FlowLocale, PageContextUtils, PageDefinition } from './pages.ts';
|
|
2
2
|
export declare function useContext<T = any>(): T;
|
|
3
|
-
export declare function useSeo
|
|
3
|
+
export declare function useSeo(): any;
|
|
4
|
+
export declare function useHead<T = any>(): T;
|
|
4
5
|
export declare function useUtils(): PageContextUtils;
|
|
5
6
|
export declare function useSharedContext<T = any>(): T;
|
|
6
7
|
export declare function useGlobal<T = any>(): T;
|
|
@@ -10,6 +10,10 @@ export function useSeo() {
|
|
|
10
10
|
const ctx = inject("context", {});
|
|
11
11
|
return ctx.seo || {};
|
|
12
12
|
}
|
|
13
|
+
export function useHead() {
|
|
14
|
+
const ctx = inject("context", {});
|
|
15
|
+
return ctx.head || {};
|
|
16
|
+
}
|
|
13
17
|
export function useUtils() {
|
|
14
18
|
return inject("utils", {});
|
|
15
19
|
}
|
package/src/runtime/pages.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UseHeadInput } from '@unhead/vue';
|
|
1
|
+
import type { UseHeadInput, UseSeoMetaInput } from '@unhead/vue';
|
|
2
2
|
export type MaybePromise<T> = T | Promise<T>;
|
|
3
3
|
export interface FlowLocale {
|
|
4
4
|
code: string;
|
|
@@ -36,7 +36,9 @@ export interface LegacySeoDefinition {
|
|
|
36
36
|
*/
|
|
37
37
|
facebook?: boolean;
|
|
38
38
|
}
|
|
39
|
-
export type HeadDefinition = UseHeadInput & LegacySeoDefinition
|
|
39
|
+
export type HeadDefinition = UseHeadInput & LegacySeoDefinition & {
|
|
40
|
+
seo: UseSeoMetaInput;
|
|
41
|
+
};
|
|
40
42
|
/**
|
|
41
43
|
* @deprecated Use HeadDefinition.
|
|
42
44
|
*/
|