@simonbackx/vue-app-navigation 2.0.0-alpha.15 → 2.0.0-alpha.17

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.
@@ -19,6 +19,10 @@ declare class HistoryManagerStatic {
19
19
  changeUrlTimeout: NodeJS.Timeout | null;
20
20
  titleSuffix: string;
21
21
  pageLoadedAt: number;
22
+ listeners: Map<unknown, () => void>;
23
+ addListener(owner: unknown, handler: () => void): void;
24
+ removeListener(owner: unknown): void;
25
+ callListeners(): void;
22
26
  private addToQueue;
23
27
  private runQueue;
24
28
  private go;
@@ -67,6 +67,8 @@ export declare function usePop(): (options?: PopOptions) => Promise<void> | unde
67
67
  export declare function useNavigate(): <Params extends Record<string, unknown>>(prop1: string | Route<Params, unknown>, prop2?: RouteNavigationOptions<Params>) => Promise<void>;
68
68
  export type DefaultRouteHandler = () => Promise<boolean>;
69
69
  export declare function defineRoutes(routes: (Route<any, undefined>[]) | (() => Promise<boolean | (Route<any, undefined>[])>)): void;
70
+ export declare function useCurrentHref(): Ref<string>;
71
+ export declare function useCheckRoute(): <Params extends Record<string, unknown>>(prop1: string | Route<Params, unknown>, prop2?: RouteNavigationOptions<Params>) => boolean;
70
72
  export declare function normalizePushOptions(o: PushOptions | ComponentWithProperties, currentComponent: ComponentWithProperties | null, urlHelpers: ReturnType<typeof useUrl>): PushOptions;
71
73
  export declare function useShow(): (options: PushOptions | ComponentWithProperties) => Promise<void>;
72
74
  export declare function useShowDetail(): (options: PushOptions | ComponentWithProperties) => Promise<void>;
@@ -89,4 +91,5 @@ export declare function useUrl(): {
89
91
  setTitle(title: string): void;
90
92
  extendUrl(url: string): string;
91
93
  match<Params>(template: string, params?: UrlParamsConstructors<Params>): UrlMatchResult<Params> | undefined;
94
+ matchCurrent<Params_1>(template: string, params?: UrlParamsConstructors<Params_1> | undefined): UrlMatchResult<Params_1> | undefined;
92
95
  };
@@ -1532,8 +1532,9 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
1532
1532
  setTitle(title: string): void;
1533
1533
  extendUrl(url: string): string;
1534
1534
  match<Params>(template: string, params?: import('..').UrlParamsConstructors<Params> | undefined): import('..').UrlMatchResult<Params> | undefined;
1535
+ matchCurrent<Params_1>(template: string, params?: import('..').UrlParamsConstructors<Params_1> | undefined): import('..').UrlMatchResult<Params_1> | undefined;
1535
1536
  };
1536
- $navigate: <Params_1 extends Record<string, unknown>>(prop1: string | import('..').Route<Params_1, unknown>, prop2?: import('..').RouteNavigationOptions<Params_1> | undefined) => Promise<void>;
1537
+ $navigate: <Params_2 extends Record<string, unknown>>(prop1: string | import('..').Route<Params_2, unknown>, prop2?: import('..').RouteNavigationOptions<Params_2> | undefined) => Promise<void>;
1537
1538
  }, {}, {
1538
1539
  show: (options: import('..').ComponentWithProperties | import('..').PushOptions) => Promise<void>;
1539
1540
  showDetail: (options: import('..').ComponentWithProperties | import('..').PushOptions) => Promise<void>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@simonbackx/vue-app-navigation",
3
3
  "main": "./dist/index.js",
4
4
  "types": "./dist/index.d.ts",
5
- "version": "2.0.0-alpha.15",
5
+ "version": "2.0.0-alpha.17",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": "./dist/index.js",