@flue3/router
Advanced tools
Comparing version 0.1.18-dev.0 to 0.2.0-dev.0
import { VNode } from 'vue'; | ||
declare const _default: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, { | ||
declare const _default: import("vue").DefineComponent<{ | ||
routeKey: { | ||
type: StringConstructor; | ||
}; | ||
transition: { | ||
type: import("vue").PropType<string | import("vue").TransitionProps>; | ||
}; | ||
}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, { | ||
[key: string]: any; | ||
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>; | ||
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
routeKey: { | ||
type: StringConstructor; | ||
}; | ||
transition: { | ||
type: import("vue").PropType<string | import("vue").TransitionProps>; | ||
}; | ||
}>>, {}, {}>; | ||
export default _default; |
@@ -5,6 +5,9 @@ import { defineComponent, Suspense, h, unref, } from 'vue'; | ||
import LayoutResolver from './LayoutResolver.js'; | ||
import { useView, viewProps } from '../composables/useView.js'; | ||
export default defineComponent({ | ||
name: 'RootView', | ||
setup() { | ||
props: viewProps, | ||
setup(props) { | ||
const { layoutName } = useLayout(); | ||
const { WithTransition, key } = useView(props); | ||
const Layout = (_) => { | ||
@@ -18,3 +21,5 @@ return h(LayoutResolver, { | ||
return h(RouterView, ({ Component: ViewComponent }) => { | ||
return h(Suspense, () => Layout(h(Suspense, () => h(ViewComponent)))); | ||
return h(Suspense, () => Layout(WithTransition(h(Suspense, () => h(ViewComponent, { | ||
key: unref(key), | ||
}))))); | ||
}); | ||
@@ -21,0 +26,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { AppContext } from 'flue3/lib/types/AppContext.js'; | ||
import { AppContext } from 'flue3'; | ||
export declare const createErrorStateMiddleware: (appContext: AppContext) => void; |
@@ -1,2 +0,2 @@ | ||
import { AppContext } from 'flue3/lib/types/AppContext.js'; | ||
import { AppContext } from 'flue3'; | ||
export declare const createRoutesMiddleware: (appContext: AppContext) => void; |
@@ -13,3 +13,3 @@ export const createRoutesMiddleware = (appContext) => { | ||
} | ||
await middleware(appContext); | ||
await appContext.callWithContext(() => middleware(appContext)); | ||
} | ||
@@ -16,0 +16,0 @@ next(); |
@@ -7,1 +7,2 @@ import { RouterPluginOptions } from './types.js'; | ||
export { default as RootView } from './components/RootView.js'; | ||
export { default as ChildView } from './components/ChildView.js'; |
@@ -19,3 +19,3 @@ import { createRouter, createWebHistory, createMemoryHistory, } from 'vue-router'; | ||
inject('router', router); | ||
inject('layouts', layouts); | ||
inject('layouts', layouts || {}); | ||
inject('clientRedirect', router.push, true); | ||
@@ -52,1 +52,2 @@ const reactiveRoute = {}; | ||
export { default as RootView } from './components/RootView.js'; | ||
export { default as ChildView } from './components/ChildView.js'; |
import { Component } from 'vue'; | ||
import { RouteRecordRaw, RouterScrollBehavior } from 'vue-router'; | ||
import { AppContext } from 'flue3/lib/types/AppContext.js'; | ||
import { AppContext } from 'flue3'; | ||
import { AppMiddleware } from 'flue3/src/types/AppMiddleware.js'; | ||
@@ -5,0 +5,0 @@ export type LayoutComponent = (() => Promise<Component | { |
{ | ||
"name": "@flue3/router", | ||
"version": "0.1.18-dev.0", | ||
"version": "0.2.0-dev.0", | ||
"description": "flue3 <head> tag manager plugin", | ||
@@ -22,4 +22,4 @@ "author": "FL3NKEY", | ||
"devDependencies": { | ||
"flue3": "^0.1.18-dev.0", | ||
"vue": "3.2.45" | ||
"flue3": "^0.2.0-dev.0", | ||
"vue": "3.3.1" | ||
}, | ||
@@ -31,4 +31,4 @@ "publishConfig": { | ||
"dependencies": { | ||
"vue-router": "4.1.6" | ||
"vue-router": "4.2.0" | ||
} | ||
} |
import { Router, RouteLocationNormalized } from 'vue-router'; | ||
import { LayoutComponentsRecord } from './src/types.js'; | ||
declare module 'flue3/lib/types/AppContext.js' { | ||
declare module 'flue3' { | ||
interface AppContext { | ||
@@ -6,0 +6,0 @@ router: Router; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15406
32
387
+ Addedvue-router@4.2.0(transitive)
- Removedvue-router@4.1.6(transitive)
Updatedvue-router@4.2.0