Comparing version 0.6.3 to 0.6.4
@@ -0,6 +1,6 @@ | ||
import { Plugin } from 'vue'; | ||
import { Component } from './types/PageContext'; | ||
import { ConfigEffect, PageContext } from 'vike/types'; | ||
import { OnCreateAppSync, OnCreateAppAsync, OnAfterRenderSSRAppSync, OnAfterRenderSSRAppAsync, OnBeforeMountAppSync, OnBeforeMountAppAsync } from './hooks/types'; | ||
export { config }; | ||
import type { OnCreateAppSync, OnCreateAppAsync, OnAfterRenderSSRAppSync, OnAfterRenderSSRAppAsync, OnBeforeMountAppSync, OnBeforeMountAppAsync } from './hooks/types'; | ||
import type { ConfigEffect, PageContext } from 'vike/types'; | ||
import type { Component } from './types/PageContext'; | ||
import type { Plugin } from 'vue'; | ||
declare const config: { | ||
@@ -111,9 +111,8 @@ name: string; | ||
/** | ||
* If true, render mode is SSR or pre-rendering (aka SSG). In other words, the | ||
* page's HTML will be rendered at build-time or request-time. | ||
* If false, render mode is SPA. In other words, the page will only be | ||
* rendered in the browser. | ||
* If `true`, the page is rendered twice: on the server-side (to HTML) and on the client-side (hydration). | ||
* | ||
* See https://vike.dev/render-modes | ||
* If `false`, the page is rendered only once in the browser. | ||
* | ||
* https://vike.dev/ssr | ||
* | ||
* @default true | ||
@@ -120,0 +119,0 @@ * |
@@ -1,6 +0,7 @@ | ||
import { type AsyncComponentLoader } from 'vue'; | ||
import type { Component } from '../types/PageContext'; | ||
import { Component } from '../types/PageContext'; | ||
import { AsyncComponentLoader } from 'vue'; | ||
declare const _default: <T extends AsyncComponentLoader>(__VLS_props: { | ||
load: T; | ||
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: { | ||
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, __VLS_ctx?: { | ||
slots: Readonly<{ | ||
@@ -16,3 +17,3 @@ fallback?: (() => Component) | undefined; | ||
load: T; | ||
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps; | ||
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps; | ||
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void; | ||
@@ -26,3 +27,3 @@ attrs: any; | ||
emit: any; | ||
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { | ||
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, { | ||
[key: string]: any; | ||
@@ -33,3 +34,3 @@ }> & { | ||
load: T; | ||
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps; | ||
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps; | ||
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void; | ||
@@ -36,0 +37,0 @@ attrs: any; |
@@ -0,4 +1,4 @@ | ||
import { PageContextWithApp } from '../types/PageContext'; | ||
import { PageContext } from 'vike/types'; | ||
export type { OnCreateAppSync, OnCreateAppAsync, OnAfterRenderSSRAppSync, OnAfterRenderSSRAppAsync, OnBeforeMountAppSync, OnBeforeMountAppAsync }; | ||
import type { PageContext } from 'vike/types'; | ||
import type { PageContextWithApp } from '../types/PageContext'; | ||
/** | ||
@@ -5,0 +5,0 @@ * Hook called right after creating Vue's `app` instance. |
@@ -1,3 +0,4 @@ | ||
import type { App } from 'vue'; | ||
import type { PageContext } from 'vike/types'; | ||
import { PageContext } from 'vike/types'; | ||
import { App } from 'vue'; | ||
export { usePageContext }; | ||
@@ -4,0 +5,0 @@ export { setPageContext }; |
import { config } from "./+config.js"; | ||
console.warn( | ||
"[vike-vue][warning][deprecation] Replace `import vikeVue from 'vike-vue'` with `import vikeVue from 'vike-vue/config'` (typically in your /pages/+config.h.js)" | ||
"[vike-vue][warning][deprecation] Replace `import vikeVue from 'vike-vue'` with `import vikeVue from 'vike-vue/config'` (typically in your /pages/+config.js)" | ||
); | ||
@@ -5,0 +5,0 @@ export { |
@@ -0,3 +1,3 @@ | ||
import { PageContext } from 'vike/types'; | ||
export { getHeadSetting }; | ||
import type { PageContext } from 'vike/types'; | ||
declare function getHeadSetting(headSetting: 'title' | 'favicon' | 'lang', pageContext: PageContext): undefined | null | string; |
@@ -0,3 +1,3 @@ | ||
import { OnRenderClientAsync } from 'vike/types'; | ||
export { onRenderClient }; | ||
import type { OnRenderClientAsync } from 'vike/types'; | ||
declare const onRenderClient: OnRenderClientAsync; |
@@ -1,2 +0,2 @@ | ||
import { c as createVueApp, g as getHeadSetting } from "../getHeadSetting-DcuSkotZ.js"; | ||
import { c as createVueApp, g as getHeadSetting } from "../getHeadSetting-zzevPpKo.js"; | ||
let app = void 0; | ||
@@ -6,5 +6,5 @@ const onRenderClient = async (pageContext) => { | ||
if (!app) { | ||
const container = document.getElementById("page-view"); | ||
const container = document.getElementById("vue-root"); | ||
const ssr = container.innerHTML !== ""; | ||
const ctxWithApp = await createVueApp(pageContext, ssr); | ||
const ctxWithApp = await createVueApp(pageContext, ssr, "Page"); | ||
app = ctxWithApp.app; | ||
@@ -11,0 +11,0 @@ await ((_b = (_a = pageContext.config).onBeforeMountApp) == null ? void 0 : _b.call(_a, ctxWithApp)); |
@@ -0,3 +1,3 @@ | ||
import { OnRenderHtmlAsync } from 'vike/types'; | ||
export { onRenderHtml }; | ||
import type { OnRenderHtmlAsync } from 'vike/types'; | ||
declare const onRenderHtml: OnRenderHtmlAsync; |
import { renderToString, renderToNodeStream } from "vue/server-renderer"; | ||
import { version, escapeInject, dangerouslySkipEscape } from "vike/server"; | ||
import { g as getHeadSetting, c as createVueApp } from "../getHeadSetting-DcuSkotZ.js"; | ||
import { g as getHeadSetting, c as createVueApp } from "../getHeadSetting-zzevPpKo.js"; | ||
checkVikeVersion(); | ||
@@ -15,3 +15,3 @@ const onRenderHtml = async (pageContext) => { | ||
if (!!pageContext.Page) { | ||
const ctxWithApp = await createVueApp(pageContext); | ||
const ctxWithApp = await createVueApp(pageContext, true, "Page"); | ||
const { app } = ctxWithApp; | ||
@@ -22,10 +22,4 @@ pageView = !pageContext.config.stream ? dangerouslySkipEscape(await renderToStringWithErrorHandling(app)) : renderToNodeStreamWithErrorHandling(app); | ||
let headHtml = ""; | ||
if (!!pageContext.config.Head) { | ||
const { app } = await createVueApp( | ||
pageContext, | ||
/*ssrApp*/ | ||
true, | ||
/*renderHead*/ | ||
true | ||
); | ||
if (pageContext.config.Head) { | ||
const { app } = await createVueApp(pageContext, true, "Head"); | ||
headHtml = dangerouslySkipEscape(await renderToStringWithErrorHandling(app)); | ||
@@ -42,3 +36,3 @@ } | ||
<body> | ||
<div id="page-view">${pageView}</div> | ||
<div id="vue-root">${pageView}</div> | ||
</body> | ||
@@ -45,0 +39,0 @@ <!-- built with https://github.com/vikejs/vike-vue --> |
@@ -0,6 +1,6 @@ | ||
import { App, defineComponent } from 'vue'; | ||
import { PageContext } from 'vike/types'; | ||
export type { Component }; | ||
export type { PageContextWithApp, PageContextWithoutApp }; | ||
export type { VikeVueApp }; | ||
import type { PageContext } from 'vike/types'; | ||
import type { App, defineComponent } from 'vue'; | ||
type Component = ReturnType<typeof defineComponent>; | ||
@@ -7,0 +7,0 @@ type VikeVueApp = App<Element> & { |
{ | ||
"name": "vike-vue", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"type": "module", | ||
@@ -14,4 +14,18 @@ "main": "./dist/index.js", | ||
"./useData": "./dist/hooks/useData.js", | ||
"./ClientOnly": "./dist/components/ClientOnly.js" | ||
"./ClientOnly": { | ||
"default": "./dist/components/ClientOnly.js", | ||
"types": "./dist/components/ClientOnly.vue.d.ts" | ||
}, | ||
"./types": { | ||
"default": "./dist/types/index.js", | ||
"types": "./dist/types/index.d.ts" | ||
} | ||
}, | ||
"scripts": { | ||
"dev": "vite build --watch", | ||
"build": "rm -rf dist/ && vue-tsc --noEmit && vite build", | ||
"release": "release-me --git-prefix vike-vue --changelog-dir packages/vike-vue/ patch", | ||
"release:minor": "release-me --git-prefix vike-vue --changelog-dir packages/vike-vue/ minor", | ||
"release:commit": "release-me --git-prefix vike-vue --changelog-dir packages/vike-vue/ commit" | ||
}, | ||
"peerDependencies": { | ||
@@ -23,9 +37,10 @@ "vike": "^0.4.160", | ||
"@brillout/release-me": "^0.1.14", | ||
"@types/node": "^20.11.17", | ||
"@types/node": "^20.12.7", | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"vike": "^0.4.161", | ||
"vite": "^5.1.1", | ||
"vite-plugin-dts": "^3.7.2", | ||
"vue": "^3.4.18", | ||
"vue-tsc": "^1.8.27" | ||
"typescript": "^5.4.5", | ||
"vike": "^0.4.168", | ||
"vite": "^5.2.9", | ||
"vite-plugin-dts": "^3.8.3", | ||
"vue": "^3.4.23", | ||
"vue-tsc": "^2.0.13" | ||
}, | ||
@@ -65,10 +80,3 @@ "typesVersions": { | ||
"repository": "github:vikejs/vike-vue", | ||
"license": "MIT", | ||
"scripts": { | ||
"dev": "vite build --watch", | ||
"build": "rm -rf dist/ && vue-tsc --noEmit && vite build", | ||
"release": "release-me --git-prefix vike-vue --changelog-dir packages/vike-vue/ patch", | ||
"release:minor": "release-me --git-prefix vike-vue --changelog-dir packages/vike-vue/ minor", | ||
"release:commit": "release-me --git-prefix vike-vue --changelog-dir packages/vike-vue/ commit" | ||
} | ||
} | ||
"license": "MIT" | ||
} |
@@ -41,3 +41,3 @@ <!-- WARNING: keep links absolute in this file so they work on NPM too --> | ||
```diff | ||
// /pages/+config.h.js | ||
// /pages/+config.js | ||
@@ -44,0 +44,0 @@ +import vikeVue from 'vike-vue/config' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
53558
9
35
677
1