@simonbackx/vue-app-navigation 2.5.2 → 2.6.0

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.
@@ -1,380 +1,63 @@
1
1
  import { PushOptions } from './PushOptions';
2
- import { ComponentWithProperties } from './ComponentWithProperties';
3
- import { PropType, Ref } from 'vue';
2
+ import { ComponentWithProperties, ComponentWithPropertiesType } from './ComponentWithProperties';
4
3
 
5
- export declare function useModalStackComponent(): Ref<InstanceType<typeof ModalStackComponent>>;
6
- declare const ModalStackComponent: import('vue').DefineComponent<{
7
- root: {
8
- default: null;
9
- type: PropType<ComponentWithProperties | null>;
10
- };
11
- initialComponents: {
12
- default: null;
13
- type: PropType<ComponentWithProperties[] | null>;
14
- };
15
- initialPresents: {
16
- default: null;
17
- type: PropType<PushOptions[] | null>;
18
- };
19
- }, unknown, unknown, {
20
- stackComponent(): import('vue').CreateComponentPublicInstance<Readonly<import('vue').ExtractPropTypes<{}>> & {
21
- onPresent?: ((...args: any[]) => any) | undefined;
22
- onReturnToHistoryIndex?: ((...args: any[]) => any) | undefined;
23
- }, {}, {
24
- components: ComponentWithProperties[];
25
- }, {}, {
26
- getCustomProvide(index: number, key: number): {
27
- reactive_navigation_pop: () => void;
28
- reactive_navigation_can_pop: boolean;
29
- reactive_navigation_dismiss: () => void;
30
- reactive_navigation_can_dismiss: boolean;
31
- reactive_navigation_focused: boolean;
32
- };
33
- show(component: ComponentWithProperties): void;
34
- getFocusedComponent(): {
35
- component: any;
36
- properties: Record<string, any>;
37
- provide: Record<string, any>;
38
- inheritedDisplayerProvide: Record<string, any>;
39
- inheritedParentProvide: Record<string, any>;
40
- key: number;
41
- type: string | null;
42
- vnode: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
43
- [key: string]: any;
44
- }> | null;
45
- unmount: ((vnode: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
46
- [key: string]: any;
47
- }>) => void) | null;
48
- keepAlive: boolean;
49
- isKeptAlive: boolean;
50
- modalDisplayStyle: import('./ComponentWithProperties').ModalDisplayStyle;
51
- animated: boolean;
52
- checkRoutes: boolean;
53
- isDismissing: boolean;
54
- historyIndex: number | null;
55
- setCheckRoutes: () => ComponentWithProperties;
56
- readonly combinedProvide: {
57
- [x: string]: any;
58
- };
59
- inheritFromDisplayer: (component: ComponentWithProperties) => void;
60
- inheritFromParent: (component: ComponentWithProperties) => void;
61
- clone: () => ComponentWithProperties;
62
- beforeMount: () => void;
63
- getHistoryIndex: () => number | null | undefined;
64
- deleteHistoryIndex: () => void;
65
- hasHistoryIndex: () => boolean;
66
- assignHistoryIndex: () => void;
67
- inheritHistoryIndex: (index: number) => void;
68
- ownsHistoryIndex: () => boolean;
69
- overrideUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
70
- setUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
71
- setTitle: (title: string) => void;
72
- returnToHistoryIndex: () => boolean;
73
- componentInstance: () => import('vue').ComponentPublicInstance | null;
74
- shouldNavigateAway: () => Promise<boolean>;
75
- destroy: (vnode: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
76
- [key: string]: any;
77
- }>) => void;
78
- setDisplayStyle: (style: import('./ComponentWithProperties').ModalDisplayStyle) => ComponentWithProperties;
79
- setAnimated: (animated: boolean) => ComponentWithProperties;
80
- } | null;
81
- removeAt(index: number, key: number): void;
82
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("present" | "returnToHistoryIndex")[], import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{}>> & {
83
- onPresent?: ((...args: any[]) => any) | undefined;
4
+ declare function present(options: PushOptions): void;
5
+ declare function replace(component: ComponentWithPropertiesType, animated?: boolean): void;
6
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
7
+ root: ComponentWithPropertiesType;
8
+ initialComponents?: ComponentWithPropertiesType[] | null;
9
+ initialPresents?: PushOptions[] | null;
10
+ }>, {
11
+ initialComponents: null;
12
+ initialPresents: null;
13
+ }>>, {
14
+ present: import('vue').ShallowRef<typeof present, typeof present>;
15
+ stackComponent: import('vue').Ref<import('vue').DefineComponent<{}, {
16
+ show: (component: ComponentWithProperties) => void;
17
+ getFocusedComponent: () => ComponentWithProperties | null;
18
+ removeAt: (index: number, key: number) => void;
19
+ children: import('vue').Ref<ComponentWithProperties[], ComponentWithProperties[]>;
20
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ returnToHistoryIndex: (...args: any[]) => void;
22
+ }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
84
23
  onReturnToHistoryIndex?: ((...args: any[]) => any) | undefined;
85
- }, {}, true, {}, {}, {
86
- P: {};
87
- B: {};
88
- D: {};
89
- C: {};
90
- M: {};
91
- Defaults: {};
92
- }, Readonly<import('vue').ExtractPropTypes<{}>> & {
93
- onPresent?: ((...args: any[]) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | null, import('vue').DefineComponent<{}, {
25
+ show: (component: ComponentWithProperties) => void;
26
+ getFocusedComponent: () => ComponentWithProperties | null;
27
+ removeAt: (index: number, key: number) => void;
28
+ children: import('vue').Ref<ComponentWithProperties[], ComponentWithProperties[]>;
29
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
30
+ returnToHistoryIndex: (...args: any[]) => void;
31
+ }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
94
32
  onReturnToHistoryIndex?: ((...args: any[]) => any) | undefined;
95
- }, {}, {
96
- components: ComponentWithProperties[];
97
- }, {}, {
98
- getCustomProvide(index: number, key: number): {
99
- reactive_navigation_pop: () => void;
100
- reactive_navigation_can_pop: boolean;
101
- reactive_navigation_dismiss: () => void;
102
- reactive_navigation_can_dismiss: boolean;
103
- reactive_navigation_focused: boolean;
104
- };
105
- show(component: ComponentWithProperties): void;
106
- getFocusedComponent(): {
107
- component: any;
108
- properties: Record<string, any>;
109
- provide: Record<string, any>;
110
- inheritedDisplayerProvide: Record<string, any>;
111
- inheritedParentProvide: Record<string, any>;
112
- key: number;
113
- type: string | null;
114
- vnode: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
115
- [key: string]: any;
116
- }> | null;
117
- unmount: ((vnode: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
118
- [key: string]: any;
119
- }>) => void) | null;
120
- keepAlive: boolean;
121
- isKeptAlive: boolean;
122
- modalDisplayStyle: import('./ComponentWithProperties').ModalDisplayStyle;
123
- animated: boolean;
124
- checkRoutes: boolean;
125
- isDismissing: boolean;
126
- historyIndex: number | null;
127
- setCheckRoutes: () => ComponentWithProperties;
128
- readonly combinedProvide: {
129
- [x: string]: any;
130
- };
131
- inheritFromDisplayer: (component: ComponentWithProperties) => void;
132
- inheritFromParent: (component: ComponentWithProperties) => void;
133
- clone: () => ComponentWithProperties;
134
- beforeMount: () => void;
135
- getHistoryIndex: () => number | null | undefined;
136
- deleteHistoryIndex: () => void;
137
- hasHistoryIndex: () => boolean;
138
- assignHistoryIndex: () => void;
139
- inheritHistoryIndex: (index: number) => void;
140
- ownsHistoryIndex: () => boolean;
141
- overrideUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
142
- setUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
143
- setTitle: (title: string) => void;
144
- returnToHistoryIndex: () => boolean;
145
- componentInstance: () => import('vue').ComponentPublicInstance | null;
146
- shouldNavigateAway: () => Promise<boolean>;
147
- destroy: (vnode: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
148
- [key: string]: any;
149
- }>) => void;
150
- setDisplayStyle: (style: import('./ComponentWithProperties').ModalDisplayStyle) => ComponentWithProperties;
151
- setAnimated: (animated: boolean) => ComponentWithProperties;
152
- } | null;
153
- removeAt(index: number, key: number): void;
154
- }, {}>;
155
- navigationController(): import('vue').CreateComponentPublicInstance<Readonly<import('vue').ExtractPropTypes<{
156
- root: {
157
- default: null;
158
- type: PropType<ComponentWithProperties | null>;
159
- };
160
- initialComponents: {
161
- default: null;
162
- type: PropType<ComponentWithProperties[] | null>;
163
- };
164
- animationType: {
165
- default: string;
166
- type: StringConstructor;
167
- };
168
- customProvide: {
169
- type: ObjectConstructor;
170
- default: null;
171
- };
172
- }>> & {
173
- onDidPush?: ((...args: any[]) => any) | undefined;
174
- onDidPop?: ((...args: any[]) => any) | undefined;
175
- onShowDetail?: ((...args: any[]) => any) | undefined;
176
- onPresent?: ((...args: any[]) => any) | undefined;
177
- }, unknown, {
178
- components: import('vue').Raw<ComponentWithProperties>[];
179
- mainComponent: import('vue').Raw<ComponentWithProperties> | null;
180
- transitionName: string;
181
- savedScrollPositions: number[];
182
- nextScrollPosition: number;
183
- previousScrollPosition: number;
184
- nextInternalScrollPosition: number;
185
- savedInternalScrollPositions: number[];
186
- asyncQueue: (() => Promise<void>)[];
187
- asyncQueueRunning: boolean;
188
- cachedProvides: Map<number, any>;
189
- }, {}, {
190
- cacheComponentProvides(newComponent: ComponentWithProperties): void;
191
- provideForComponent(key: number): any;
192
- runQueue<T>(run: () => Promise<T>): Promise<T>;
193
- runQueueIfNeeded(): void;
194
- freezeSize(): void;
195
- growSize(width: number, height: number): void;
196
- unfreezeSize(): void;
197
- getInternalScrollElement(element?: Element | null): HTMLElement | null;
198
- getScrollElement(element?: HTMLElement | null): HTMLElement;
199
- shouldAnimate(): any;
200
- returnToHistoryIndex(): boolean;
201
- push(options: PushOptions): Promise<void>;
202
- shouldNavigateAway(): Promise<boolean>;
203
- popToRoot(options?: import('./PopOptions').PopOptions): Promise<ComponentWithProperties[] | undefined>;
204
- getPoppableParent(): import('vue').ComponentInternalInstance | null;
205
- pop(options?: import('./PopOptions').PopOptions): Promise<ComponentWithProperties[] | undefined>;
206
- beforeEnter(insertedElement: Element): void;
207
- beforeLeave(leavingElement: Element): void;
208
- beforeBeforeEnterAnimation(): void;
209
- finishedEnterAnimation(): void;
210
- enter(element: any, done: () => void): void;
211
- getScrollOuterHeight(scrollElement: HTMLElement): number;
212
- leave(element: any, done: () => void): void;
213
- afterLeave(element: any): void;
214
- afterEnter(element: any): void;
215
- enterCancelled(_element: any): void;
216
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("didPush" | "didPop" | "showDetail" | "present")[], import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
217
- root: {
218
- default: null;
219
- type: PropType<ComponentWithProperties | null>;
220
- };
221
- initialComponents: {
222
- default: null;
223
- type: PropType<ComponentWithProperties[] | null>;
224
- };
225
- animationType: {
226
- default: string;
227
- type: StringConstructor;
228
- };
229
- customProvide: {
230
- type: ObjectConstructor;
231
- default: null;
232
- };
233
- }>> & {
234
- onDidPush?: ((...args: any[]) => any) | undefined;
235
- onDidPop?: ((...args: any[]) => any) | undefined;
236
- onShowDetail?: ((...args: any[]) => any) | undefined;
237
- onPresent?: ((...args: any[]) => any) | undefined;
238
- }, {
239
- root: ComponentWithProperties | null;
240
- customProvide: Record<string, any>;
241
- initialComponents: ComponentWithProperties[] | null;
242
- animationType: string;
243
- }, true, {}, {}, {
244
- P: {};
245
- B: {};
246
- D: {};
247
- C: {};
248
- M: {};
249
- Defaults: {};
250
- }, Readonly<import('vue').ExtractPropTypes<{
251
- root: {
252
- default: null;
253
- type: PropType<ComponentWithProperties | null>;
254
- };
255
- initialComponents: {
256
- default: null;
257
- type: PropType<ComponentWithProperties[] | null>;
258
- };
259
- animationType: {
260
- default: string;
261
- type: StringConstructor;
262
- };
263
- customProvide: {
264
- type: ObjectConstructor;
265
- default: null;
266
- };
267
- }>> & {
268
- onDidPush?: ((...args: any[]) => any) | undefined;
269
- onDidPop?: ((...args: any[]) => any) | undefined;
270
- onShowDetail?: ((...args: any[]) => any) | undefined;
271
- onPresent?: ((...args: any[]) => any) | undefined;
272
- }, {}, {
273
- components: import('vue').Raw<ComponentWithProperties>[];
274
- mainComponent: import('vue').Raw<ComponentWithProperties> | null;
275
- transitionName: string;
276
- savedScrollPositions: number[];
277
- nextScrollPosition: number;
278
- previousScrollPosition: number;
279
- nextInternalScrollPosition: number;
280
- savedInternalScrollPositions: number[];
281
- asyncQueue: (() => Promise<void>)[];
282
- asyncQueueRunning: boolean;
283
- cachedProvides: Map<number, any>;
284
- }, {}, {
285
- cacheComponentProvides(newComponent: ComponentWithProperties): void;
286
- provideForComponent(key: number): any;
287
- runQueue<T>(run: () => Promise<T>): Promise<T>;
288
- runQueueIfNeeded(): void;
289
- freezeSize(): void;
290
- growSize(width: number, height: number): void;
291
- unfreezeSize(): void;
292
- getInternalScrollElement(element?: Element | null): HTMLElement | null;
293
- getScrollElement(element?: HTMLElement | null): HTMLElement;
294
- shouldAnimate(): any;
295
- returnToHistoryIndex(): boolean;
296
- push(options: PushOptions): Promise<void>;
297
- shouldNavigateAway(): Promise<boolean>;
298
- popToRoot(options?: import('./PopOptions').PopOptions): Promise<ComponentWithProperties[] | undefined>;
299
- getPoppableParent(): import('vue').ComponentInternalInstance | null;
300
- pop(options?: import('./PopOptions').PopOptions): Promise<ComponentWithProperties[] | undefined>;
301
- beforeEnter(insertedElement: Element): void;
302
- beforeLeave(leavingElement: Element): void;
303
- beforeBeforeEnterAnimation(): void;
304
- finishedEnterAnimation(): void;
305
- enter(element: any, done: () => void): void;
306
- getScrollOuterHeight(scrollElement: HTMLElement): number;
307
- leave(element: any, done: () => void): void;
308
- afterLeave(element: any): void;
309
- afterEnter(element: any): void;
310
- enterCancelled(_element: any): void;
311
- }, {
312
- root: ComponentWithProperties | null;
313
- customProvide: Record<string, any>;
314
- initialComponents: ComponentWithProperties[] | null;
315
- animationType: string;
316
- }>;
317
- modalStackComponent(): import('vue').CreateComponentPublicInstance<{
318
- readonly root: ComponentWithProperties | null;
319
- readonly initialComponents: ComponentWithProperties[] | null;
320
- readonly initialPresents: PushOptions[] | null;
321
- }, unknown, unknown, any, {
322
- present(options: PushOptions): void;
323
- returnToHistoryIndex(): boolean;
324
- replace(component: ComponentWithProperties, animated?: boolean): void;
325
- shouldNavigateAway(): Promise<boolean>;
326
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, {
327
- readonly root: ComponentWithProperties | null;
328
- readonly initialComponents: ComponentWithProperties[] | null;
329
- readonly initialPresents: PushOptions[] | null;
330
- }, {
331
- root: ComponentWithProperties | null;
332
- initialComponents: ComponentWithProperties[] | null;
333
- initialPresents: PushOptions[] | null;
334
- }, false, {}, {}, {
335
- P: {};
336
- B: {};
337
- D: {};
338
- C: {};
339
- M: {};
340
- Defaults: {};
341
- }, {
342
- readonly root: ComponentWithProperties | null;
343
- readonly initialComponents: ComponentWithProperties[] | null;
344
- readonly initialPresents: PushOptions[] | null;
345
- }, {}, {}, any, {
346
- present(options: PushOptions): void;
347
- returnToHistoryIndex(): boolean;
348
- replace(component: ComponentWithProperties, animated?: boolean): void;
349
- shouldNavigateAway(): Promise<boolean>;
350
- }, {
351
- root: ComponentWithProperties | null;
352
- initialComponents: ComponentWithProperties[] | null;
353
- initialPresents: PushOptions[] | null;
354
- }>;
355
- isFocused(): boolean;
356
- isNavigationControllerFocused(): boolean;
357
- }, {
358
- present(options: PushOptions): void;
359
- returnToHistoryIndex(): boolean;
360
- replace(component: ComponentWithProperties, animated?: boolean): void;
361
- shouldNavigateAway(): Promise<boolean>;
362
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
363
- root: {
364
- default: null;
365
- type: PropType<ComponentWithProperties | null>;
366
- };
367
- initialComponents: {
368
- default: null;
369
- type: PropType<ComponentWithProperties[] | null>;
370
- };
371
- initialPresents: {
372
- default: null;
373
- type: PropType<PushOptions[] | null>;
374
- };
375
- }>>, {
376
- root: ComponentWithProperties | null;
377
- initialComponents: ComponentWithProperties[] | null;
33
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | null>;
34
+ replace: typeof replace;
35
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
36
+ root: ComponentWithPropertiesType;
37
+ initialComponents?: ComponentWithPropertiesType[] | null;
38
+ initialPresents?: PushOptions[] | null;
39
+ }>, {
40
+ initialComponents: null;
41
+ initialPresents: null;
42
+ }>>> & Readonly<{}>, {
43
+ initialComponents: ComponentWithPropertiesType[] | null;
378
44
  initialPresents: PushOptions[] | null;
379
- }, {}>;
380
- export default ModalStackComponent;
45
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
46
+ export default _default;
47
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
48
+ type __VLS_TypePropsToRuntimeProps<T> = {
49
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
50
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
51
+ } : {
52
+ type: import('vue').PropType<T[K]>;
53
+ required: true;
54
+ };
55
+ };
56
+ type __VLS_WithDefaults<P, D> = {
57
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
58
+ default: D[K];
59
+ }> : P[K];
60
+ };
61
+ type __VLS_Prettify<T> = {
62
+ [K in keyof T]: T[K];
63
+ } & {};
@@ -2,4 +2,4 @@ import { default as ModalStackComponent } from './ModalStackComponent.vue';
2
2
 
3
3
  export declare const ModalStackComponentFinderMixin: import('vue').DefineComponent<{}, {}, {}, {
4
4
  modalStackComponent(): InstanceType<typeof ModalStackComponent> | null;
5
- }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
5
+ }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;