@simonbackx/vue-app-navigation 2.0.0-alpha.14 → 2.0.0-alpha.16

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;
@@ -172,8 +172,8 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
172
172
  onShowDetail?: ((...args: any[]) => any) | undefined;
173
173
  onPresent?: ((...args: any[]) => any) | undefined;
174
174
  }, unknown, {
175
- components: import('./ComponentWithProperties').ComponentWithProperties[];
176
- mainComponent: import('./ComponentWithProperties').ComponentWithProperties | null;
175
+ components: import('vue').Raw<import('./ComponentWithProperties').ComponentWithProperties>[];
176
+ mainComponent: import('vue').Raw<import('./ComponentWithProperties').ComponentWithProperties> | null;
177
177
  transitionName: string;
178
178
  savedScrollPositions: number[];
179
179
  nextScrollPosition: number;
@@ -182,7 +182,10 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
182
182
  savedInternalScrollPositions: number[];
183
183
  asyncQueue: (() => Promise<void>)[];
184
184
  asyncQueueRunning: boolean;
185
+ cachedProvides: Map<number, any>;
185
186
  }, {}, {
187
+ cacheComponentProvides(newComponent: import('./ComponentWithProperties').ComponentWithProperties): void;
188
+ provideForComponent(key: number): any;
186
189
  runQueue<T>(run: () => Promise<T>): Promise<T>;
187
190
  runQueueIfNeeded(): void;
188
191
  freezeSize(): void;
@@ -264,8 +267,8 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
264
267
  onShowDetail?: ((...args: any[]) => any) | undefined;
265
268
  onPresent?: ((...args: any[]) => any) | undefined;
266
269
  }, {}, {
267
- components: import('./ComponentWithProperties').ComponentWithProperties[];
268
- mainComponent: import('./ComponentWithProperties').ComponentWithProperties | null;
270
+ components: import('vue').Raw<import('./ComponentWithProperties').ComponentWithProperties>[];
271
+ mainComponent: import('vue').Raw<import('./ComponentWithProperties').ComponentWithProperties> | null;
269
272
  transitionName: string;
270
273
  savedScrollPositions: number[];
271
274
  nextScrollPosition: number;
@@ -274,7 +277,10 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
274
277
  savedInternalScrollPositions: number[];
275
278
  asyncQueue: (() => Promise<void>)[];
276
279
  asyncQueueRunning: boolean;
280
+ cachedProvides: Map<number, any>;
277
281
  }, {}, {
282
+ cacheComponentProvides(newComponent: import('./ComponentWithProperties').ComponentWithProperties): void;
283
+ provideForComponent(key: number): any;
278
284
  runQueue<T>(run: () => Promise<T>): Promise<T>;
279
285
  runQueueIfNeeded(): void;
280
286
  freezeSize(): void;
@@ -540,8 +546,8 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
540
546
  onShowDetail?: ((...args: any[]) => any) | undefined;
541
547
  onPresent?: ((...args: any[]) => any) | undefined;
542
548
  }, unknown, {
543
- components: import('./ComponentWithProperties').ComponentWithProperties[];
544
- mainComponent: import('./ComponentWithProperties').ComponentWithProperties | null;
549
+ components: import('vue').Raw<import('./ComponentWithProperties').ComponentWithProperties>[];
550
+ mainComponent: import('vue').Raw<import('./ComponentWithProperties').ComponentWithProperties> | null;
545
551
  transitionName: string;
546
552
  savedScrollPositions: number[];
547
553
  nextScrollPosition: number;
@@ -550,7 +556,10 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
550
556
  savedInternalScrollPositions: number[];
551
557
  asyncQueue: (() => Promise<void>)[];
552
558
  asyncQueueRunning: boolean;
559
+ cachedProvides: Map<number, any>;
553
560
  }, {}, {
561
+ cacheComponentProvides(newComponent: import('./ComponentWithProperties').ComponentWithProperties): void;
562
+ provideForComponent(key: number): any;
554
563
  runQueue<T>(run: () => Promise<T>): Promise<T>;
555
564
  runQueueIfNeeded(): void;
556
565
  freezeSize(): void;
@@ -632,8 +641,8 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
632
641
  onShowDetail?: ((...args: any[]) => any) | undefined;
633
642
  onPresent?: ((...args: any[]) => any) | undefined;
634
643
  }, {}, {
635
- components: import('./ComponentWithProperties').ComponentWithProperties[];
636
- mainComponent: import('./ComponentWithProperties').ComponentWithProperties | null;
644
+ components: import('vue').Raw<import('./ComponentWithProperties').ComponentWithProperties>[];
645
+ mainComponent: import('vue').Raw<import('./ComponentWithProperties').ComponentWithProperties> | null;
637
646
  transitionName: string;
638
647
  savedScrollPositions: number[];
639
648
  nextScrollPosition: number;
@@ -642,7 +651,10 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
642
651
  savedInternalScrollPositions: number[];
643
652
  asyncQueue: (() => Promise<void>)[];
644
653
  asyncQueueRunning: boolean;
654
+ cachedProvides: Map<number, any>;
645
655
  }, {}, {
656
+ cacheComponentProvides(newComponent: import('./ComponentWithProperties').ComponentWithProperties): void;
657
+ provideForComponent(key: number): any;
646
658
  runQueue<T>(run: () => Promise<T>): Promise<T>;
647
659
  runQueueIfNeeded(): void;
648
660
  freezeSize(): void;
@@ -171,8 +171,8 @@ declare const ModalStackComponent: import('vue').DefineComponent<{
171
171
  onShowDetail?: ((...args: any[]) => any) | undefined;
172
172
  onPresent?: ((...args: any[]) => any) | undefined;
173
173
  }, unknown, {
174
- components: ComponentWithProperties[];
175
- mainComponent: ComponentWithProperties | null;
174
+ components: import('vue').Raw<ComponentWithProperties>[];
175
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
176
176
  transitionName: string;
177
177
  savedScrollPositions: number[];
178
178
  nextScrollPosition: number;
@@ -181,7 +181,10 @@ declare const ModalStackComponent: import('vue').DefineComponent<{
181
181
  savedInternalScrollPositions: number[];
182
182
  asyncQueue: (() => Promise<void>)[];
183
183
  asyncQueueRunning: boolean;
184
+ cachedProvides: Map<number, any>;
184
185
  }, {}, {
186
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
187
+ provideForComponent(key: number): any;
185
188
  runQueue<T>(run: () => Promise<T>): Promise<T>;
186
189
  runQueueIfNeeded(): void;
187
190
  freezeSize(): void;
@@ -263,8 +266,8 @@ declare const ModalStackComponent: import('vue').DefineComponent<{
263
266
  onShowDetail?: ((...args: any[]) => any) | undefined;
264
267
  onPresent?: ((...args: any[]) => any) | undefined;
265
268
  }, {}, {
266
- components: ComponentWithProperties[];
267
- mainComponent: ComponentWithProperties | null;
269
+ components: import('vue').Raw<ComponentWithProperties>[];
270
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
268
271
  transitionName: string;
269
272
  savedScrollPositions: number[];
270
273
  nextScrollPosition: number;
@@ -273,7 +276,10 @@ declare const ModalStackComponent: import('vue').DefineComponent<{
273
276
  savedInternalScrollPositions: number[];
274
277
  asyncQueue: (() => Promise<void>)[];
275
278
  asyncQueueRunning: boolean;
279
+ cachedProvides: Map<number, any>;
276
280
  }, {}, {
281
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
282
+ provideForComponent(key: number): any;
277
283
  runQueue<T>(run: () => Promise<T>): Promise<T>;
278
284
  runQueueIfNeeded(): void;
279
285
  freezeSize(): void;
@@ -1,7 +1,7 @@
1
1
  import { PushOptions } from './PushOptions';
2
2
  import { PopOptions } from './PopOptions';
3
3
  import { ComponentWithProperties } from './ComponentWithProperties';
4
- import { PropType, Ref } from 'vue';
4
+ import { PropType, Raw, Ref } from 'vue';
5
5
 
6
6
  export declare function useNavigationController(): Ref<InstanceType<typeof NavigationController>>;
7
7
  declare const NavigationController: import('vue').DefineComponent<{
@@ -22,8 +22,8 @@ declare const NavigationController: import('vue').DefineComponent<{
22
22
  default: null;
23
23
  };
24
24
  }, unknown, {
25
- components: ComponentWithProperties[];
26
- mainComponent: ComponentWithProperties | null;
25
+ components: Raw<ComponentWithProperties>[];
26
+ mainComponent: Raw<ComponentWithProperties> | null;
27
27
  transitionName: string;
28
28
  savedScrollPositions: number[];
29
29
  nextScrollPosition: number;
@@ -32,7 +32,10 @@ declare const NavigationController: import('vue').DefineComponent<{
32
32
  savedInternalScrollPositions: number[];
33
33
  asyncQueue: (() => Promise<void>)[];
34
34
  asyncQueueRunning: boolean;
35
+ cachedProvides: Map<number, any>;
35
36
  }, {}, {
37
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
38
+ provideForComponent(key: number): any;
36
39
  runQueue<T>(run: () => Promise<T>): Promise<T>;
37
40
  runQueueIfNeeded(): void;
38
41
  freezeSize(): void;
@@ -187,8 +187,8 @@ declare const _default: import('vue').DefineComponent<{
187
187
  onShowDetail?: ((...args: any[]) => any) | undefined;
188
188
  onPresent?: ((...args: any[]) => any) | undefined;
189
189
  }, unknown, {
190
- components: ComponentWithProperties[];
191
- mainComponent: ComponentWithProperties | null;
190
+ components: import('vue').Raw<ComponentWithProperties>[];
191
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
192
192
  transitionName: string;
193
193
  savedScrollPositions: number[];
194
194
  nextScrollPosition: number;
@@ -197,7 +197,10 @@ declare const _default: import('vue').DefineComponent<{
197
197
  savedInternalScrollPositions: number[];
198
198
  asyncQueue: (() => Promise<void>)[];
199
199
  asyncQueueRunning: boolean;
200
+ cachedProvides: Map<number, any>;
200
201
  }, {}, {
202
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
203
+ provideForComponent(key: number): any;
201
204
  runQueue<T>(run: () => Promise<T>): Promise<T>;
202
205
  runQueueIfNeeded(): void;
203
206
  freezeSize(): void;
@@ -279,8 +282,8 @@ declare const _default: import('vue').DefineComponent<{
279
282
  onShowDetail?: ((...args: any[]) => any) | undefined;
280
283
  onPresent?: ((...args: any[]) => any) | undefined;
281
284
  }, {}, {
282
- components: ComponentWithProperties[];
283
- mainComponent: ComponentWithProperties | null;
285
+ components: import('vue').Raw<ComponentWithProperties>[];
286
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
284
287
  transitionName: string;
285
288
  savedScrollPositions: number[];
286
289
  nextScrollPosition: number;
@@ -289,7 +292,10 @@ declare const _default: import('vue').DefineComponent<{
289
292
  savedInternalScrollPositions: number[];
290
293
  asyncQueue: (() => Promise<void>)[];
291
294
  asyncQueueRunning: boolean;
295
+ cachedProvides: Map<number, any>;
292
296
  }, {}, {
297
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
298
+ provideForComponent(key: number): any;
293
299
  runQueue<T>(run: () => Promise<T>): Promise<T>;
294
300
  runQueueIfNeeded(): void;
295
301
  freezeSize(): void;
@@ -555,8 +561,8 @@ declare const _default: import('vue').DefineComponent<{
555
561
  onShowDetail?: ((...args: any[]) => any) | undefined;
556
562
  onPresent?: ((...args: any[]) => any) | undefined;
557
563
  }, unknown, {
558
- components: ComponentWithProperties[];
559
- mainComponent: ComponentWithProperties | null;
564
+ components: import('vue').Raw<ComponentWithProperties>[];
565
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
560
566
  transitionName: string;
561
567
  savedScrollPositions: number[];
562
568
  nextScrollPosition: number;
@@ -565,7 +571,10 @@ declare const _default: import('vue').DefineComponent<{
565
571
  savedInternalScrollPositions: number[];
566
572
  asyncQueue: (() => Promise<void>)[];
567
573
  asyncQueueRunning: boolean;
574
+ cachedProvides: Map<number, any>;
568
575
  }, {}, {
576
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
577
+ provideForComponent(key: number): any;
569
578
  runQueue<T>(run: () => Promise<T>): Promise<T>;
570
579
  runQueueIfNeeded(): void;
571
580
  freezeSize(): void;
@@ -647,8 +656,8 @@ declare const _default: import('vue').DefineComponent<{
647
656
  onShowDetail?: ((...args: any[]) => any) | undefined;
648
657
  onPresent?: ((...args: any[]) => any) | undefined;
649
658
  }, {}, {
650
- components: ComponentWithProperties[];
651
- mainComponent: ComponentWithProperties | null;
659
+ components: import('vue').Raw<ComponentWithProperties>[];
660
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
652
661
  transitionName: string;
653
662
  savedScrollPositions: number[];
654
663
  nextScrollPosition: number;
@@ -657,7 +666,10 @@ declare const _default: import('vue').DefineComponent<{
657
666
  savedInternalScrollPositions: number[];
658
667
  asyncQueue: (() => Promise<void>)[];
659
668
  asyncQueueRunning: boolean;
669
+ cachedProvides: Map<number, any>;
660
670
  }, {}, {
671
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
672
+ provideForComponent(key: number): any;
661
673
  runQueue<T>(run: () => Promise<T>): Promise<T>;
662
674
  runQueueIfNeeded(): void;
663
675
  freezeSize(): void;
@@ -188,8 +188,8 @@ declare const SideView: import('vue').DefineComponent<{
188
188
  onShowDetail?: ((...args: any[]) => any) | undefined;
189
189
  onPresent?: ((...args: any[]) => any) | undefined;
190
190
  }, unknown, {
191
- components: ComponentWithProperties[];
192
- mainComponent: ComponentWithProperties | null;
191
+ components: import('vue').Raw<ComponentWithProperties>[];
192
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
193
193
  transitionName: string;
194
194
  savedScrollPositions: number[];
195
195
  nextScrollPosition: number;
@@ -198,7 +198,10 @@ declare const SideView: import('vue').DefineComponent<{
198
198
  savedInternalScrollPositions: number[];
199
199
  asyncQueue: (() => Promise<void>)[];
200
200
  asyncQueueRunning: boolean;
201
+ cachedProvides: Map<number, any>;
201
202
  }, {}, {
203
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
204
+ provideForComponent(key: number): any;
202
205
  runQueue<T>(run: () => Promise<T>): Promise<T>;
203
206
  runQueueIfNeeded(): void;
204
207
  freezeSize(): void;
@@ -280,8 +283,8 @@ declare const SideView: import('vue').DefineComponent<{
280
283
  onShowDetail?: ((...args: any[]) => any) | undefined;
281
284
  onPresent?: ((...args: any[]) => any) | undefined;
282
285
  }, {}, {
283
- components: ComponentWithProperties[];
284
- mainComponent: ComponentWithProperties | null;
286
+ components: import('vue').Raw<ComponentWithProperties>[];
287
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
285
288
  transitionName: string;
286
289
  savedScrollPositions: number[];
287
290
  nextScrollPosition: number;
@@ -290,7 +293,10 @@ declare const SideView: import('vue').DefineComponent<{
290
293
  savedInternalScrollPositions: number[];
291
294
  asyncQueue: (() => Promise<void>)[];
292
295
  asyncQueueRunning: boolean;
296
+ cachedProvides: Map<number, any>;
293
297
  }, {}, {
298
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
299
+ provideForComponent(key: number): any;
294
300
  runQueue<T>(run: () => Promise<T>): Promise<T>;
295
301
  runQueueIfNeeded(): void;
296
302
  freezeSize(): void;
@@ -556,8 +562,8 @@ declare const SideView: import('vue').DefineComponent<{
556
562
  onShowDetail?: ((...args: any[]) => any) | undefined;
557
563
  onPresent?: ((...args: any[]) => any) | undefined;
558
564
  }, unknown, {
559
- components: ComponentWithProperties[];
560
- mainComponent: ComponentWithProperties | null;
565
+ components: import('vue').Raw<ComponentWithProperties>[];
566
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
561
567
  transitionName: string;
562
568
  savedScrollPositions: number[];
563
569
  nextScrollPosition: number;
@@ -566,7 +572,10 @@ declare const SideView: import('vue').DefineComponent<{
566
572
  savedInternalScrollPositions: number[];
567
573
  asyncQueue: (() => Promise<void>)[];
568
574
  asyncQueueRunning: boolean;
575
+ cachedProvides: Map<number, any>;
569
576
  }, {}, {
577
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
578
+ provideForComponent(key: number): any;
570
579
  runQueue<T>(run: () => Promise<T>): Promise<T>;
571
580
  runQueueIfNeeded(): void;
572
581
  freezeSize(): void;
@@ -648,8 +657,8 @@ declare const SideView: import('vue').DefineComponent<{
648
657
  onShowDetail?: ((...args: any[]) => any) | undefined;
649
658
  onPresent?: ((...args: any[]) => any) | undefined;
650
659
  }, {}, {
651
- components: ComponentWithProperties[];
652
- mainComponent: ComponentWithProperties | null;
660
+ components: import('vue').Raw<ComponentWithProperties>[];
661
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
653
662
  transitionName: string;
654
663
  savedScrollPositions: number[];
655
664
  nextScrollPosition: number;
@@ -658,7 +667,10 @@ declare const SideView: import('vue').DefineComponent<{
658
667
  savedInternalScrollPositions: number[];
659
668
  asyncQueue: (() => Promise<void>)[];
660
669
  asyncQueueRunning: boolean;
670
+ cachedProvides: Map<number, any>;
661
671
  }, {}, {
672
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
673
+ provideForComponent(key: number): any;
662
674
  runQueue<T>(run: () => Promise<T>): Promise<T>;
663
675
  runQueueIfNeeded(): void;
664
676
  freezeSize(): void;
@@ -47,8 +47,8 @@ declare const SplitViewController: import('vue').DefineComponent<{
47
47
  onShowDetail?: ((...args: any[]) => any) | undefined;
48
48
  onPresent?: ((...args: any[]) => any) | undefined;
49
49
  }, unknown, {
50
- components: ComponentWithProperties[];
51
- mainComponent: ComponentWithProperties | null;
50
+ components: import('vue').Raw<ComponentWithProperties>[];
51
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
52
52
  transitionName: string;
53
53
  savedScrollPositions: number[];
54
54
  nextScrollPosition: number;
@@ -57,7 +57,10 @@ declare const SplitViewController: import('vue').DefineComponent<{
57
57
  savedInternalScrollPositions: number[];
58
58
  asyncQueue: (() => Promise<void>)[];
59
59
  asyncQueueRunning: boolean;
60
+ cachedProvides: Map<number, any>;
60
61
  }, {}, {
62
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
63
+ provideForComponent(key: number): any;
61
64
  runQueue<T>(run: () => Promise<T>): Promise<T>;
62
65
  runQueueIfNeeded(): void;
63
66
  freezeSize(): void;
@@ -139,8 +142,8 @@ declare const SplitViewController: import('vue').DefineComponent<{
139
142
  onShowDetail?: ((...args: any[]) => any) | undefined;
140
143
  onPresent?: ((...args: any[]) => any) | undefined;
141
144
  }, {}, {
142
- components: ComponentWithProperties[];
143
- mainComponent: ComponentWithProperties | null;
145
+ components: import('vue').Raw<ComponentWithProperties>[];
146
+ mainComponent: import('vue').Raw<ComponentWithProperties> | null;
144
147
  transitionName: string;
145
148
  savedScrollPositions: number[];
146
149
  nextScrollPosition: number;
@@ -149,7 +152,10 @@ declare const SplitViewController: import('vue').DefineComponent<{
149
152
  savedInternalScrollPositions: number[];
150
153
  asyncQueue: (() => Promise<void>)[];
151
154
  asyncQueueRunning: boolean;
155
+ cachedProvides: Map<number, any>;
152
156
  }, {}, {
157
+ cacheComponentProvides(newComponent: ComponentWithProperties): void;
158
+ provideForComponent(key: number): any;
153
159
  runQueue<T>(run: () => Promise<T>): Promise<T>;
154
160
  runQueueIfNeeded(): void;
155
161
  freezeSize(): void;
@@ -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
  };