@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "6.0.55",
3
+ "version": "6.0.56",
4
4
  "description": "@monkeyplus/flow package-first runtime with Vite, Nitro, Vue and a workspace playground.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -31,7 +31,6 @@ function mergeHeadDefinitions(...heads) {
31
31
  }
32
32
  }
33
33
  }
34
- console.log("mergeHeadDefinitions", result);
35
34
  return result;
36
35
  }
37
36
  const dynamicRouteCache = /* @__PURE__ */ new Map();
@@ -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 {
@@ -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';
@@ -1,6 +1,7 @@
1
1
  export {
2
2
  useContext,
3
3
  useGlobal,
4
+ useHead,
4
5
  useLocale,
5
6
  usePage,
6
7
  useSeo,
@@ -378,6 +378,7 @@ export function createFlowViteConfig(options = {}) {
378
378
  "useSchemaOrg",
379
379
  "useContext",
380
380
  "useSeo",
381
+ "useHead",
381
382
  "useUtils",
382
383
  "useSharedContext",
383
384
  "useGlobal",
@@ -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<T = any>(): T;
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
  }
@@ -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
  */