@monkeyplus/flow 6.0.5 → 6.0.6

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.5",
3
+ "version": "6.0.6",
4
4
  "description": "@monkeyplus/flow package-first runtime with Vite, Nitro, Vue and a workspace playground.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -95,18 +95,19 @@ async function renderBody(page) {
95
95
  head: head2
96
96
  };
97
97
  }
98
+ const context = {
99
+ page: page.definition,
100
+ context: page.context,
101
+ head: page.head,
102
+ seo: page.seo,
103
+ locale: page.locale,
104
+ params: page.params,
105
+ path: page.pathname
106
+ };
98
107
  const TemplateRoot = defineComponent({
99
108
  render() {
100
- const viewNode = h(TemplateComponent, {
101
- page: page.definition,
102
- context: page.context,
103
- head: page.head,
104
- seo: page.seo,
105
- locale: page.locale,
106
- params: page.params,
107
- path: page.pathname
108
- });
109
- const content = LayoutComponent ? h(LayoutComponent, {}, {
109
+ const viewNode = h(TemplateComponent, context);
110
+ const content = LayoutComponent ? h(LayoutComponent, context, {
110
111
  default: () => viewNode
111
112
  }) : viewNode;
112
113
  return h(UApp, {}, {
@@ -115,6 +116,7 @@ async function renderBody(page) {
115
116
  }
116
117
  });
117
118
  const app = createSSRApp(TemplateRoot);
119
+ app.provide("context", context);
118
120
  const head = createHead();
119
121
  head.push(normalizeSeoToHead(page.head, fallbackTitle, fallbackDescription));
120
122
  app.use(head);