@hybridly/core
Advanced tools
Comparing version 0.0.1-alpha.17 to 0.0.1-alpha.18
@@ -6,10 +6,6 @@ import { RequestData } from '@hybridly/utils'; | ||
interface Hooks { | ||
interface RequestHooks { | ||
/** | ||
* Called when a back-forward navigation occurs. | ||
*/ | ||
backForward: (state: any, context: InternalRouterContext) => MaybePromise<any>; | ||
/** | ||
* Called before anything when a navigation is going to happen. | ||
*/ | ||
* Called before a navigation request is going to happen. | ||
*/ | ||
before: (options: HybridRequestOptions, context: InternalRouterContext) => MaybePromise<any | boolean>; | ||
@@ -56,5 +52,23 @@ /** | ||
after: (context: InternalRouterContext) => MaybePromise<void>; | ||
} | ||
interface Hooks extends RequestHooks { | ||
/** | ||
* Called when a navigation has been made and a page component has been navigated to. | ||
* Called when Hybridly's context is initialized. | ||
*/ | ||
initialized: (context: InternalRouterContext) => MaybePromise<void>; | ||
/** | ||
* Called after Hybridly's initial page load. | ||
*/ | ||
ready: (context: InternalRouterContext) => MaybePromise<void>; | ||
/** | ||
* Called when a back-forward navigation occurs. | ||
*/ | ||
backForward: (state: any, context: InternalRouterContext) => MaybePromise<any>; | ||
/** | ||
* Called when a component navigation is being made. | ||
*/ | ||
navigating: (options: NavigationOptions, context: InternalRouterContext) => MaybePromise<void>; | ||
/** | ||
* Called when a component has been navigated to. | ||
*/ | ||
navigated: (options: NavigationOptions, context: InternalRouterContext) => MaybePromise<void>; | ||
@@ -72,4 +86,4 @@ } | ||
interface Plugin extends Partial<Hooks> { | ||
/** Identifier of the plugin. */ | ||
name: string; | ||
initialized?: (context: InternalRouterContext) => MaybePromise<void>; | ||
} | ||
@@ -159,3 +173,3 @@ declare function definePlugin(plugin: Plugin): Plugin; | ||
/** Hooks for this navigation. */ | ||
hooks?: Partial<Hooks>; | ||
hooks?: Partial<RequestHooks>; | ||
/** If `true`, force the usage of a `FormData` object. */ | ||
@@ -162,0 +176,0 @@ useFormData?: boolean; |
{ | ||
"name": "@hybridly/core", | ||
"version": "0.0.1-alpha.17", | ||
"version": "0.0.1-alpha.18", | ||
"description": "A solution to develop server-driven, client-rendered applications", | ||
@@ -40,3 +40,3 @@ "keywords": [ | ||
"qs": "^6.11.0", | ||
"@hybridly/utils": "0.0.1-alpha.17" | ||
"@hybridly/utils": "0.0.1-alpha.18" | ||
}, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
80590
2039
+ Added@hybridly/utils@0.0.1-alpha.18(transitive)
- Removed@hybridly/utils@0.0.1-alpha.17(transitive)