@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,10 +1,10 @@
1
1
  import { PushOptions } from './PushOptions';
2
2
  import { PopOptions } from './PopOptions';
3
- import { ComponentWithProperties } from './ComponentWithProperties';
4
- import { PropType, Raw, Ref } from 'vue';
3
+ import { ComponentWithProperties, ComponentWithPropertiesType } from './ComponentWithProperties';
4
+ import { PropType, Ref } from 'vue';
5
5
 
6
6
  export declare function useNavigationController(): Ref<InstanceType<typeof NavigationController>>;
7
- declare const NavigationController: import('vue').DefineComponent<{
7
+ declare const NavigationController: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
8
8
  root: {
9
9
  default: null;
10
10
  type: PropType<ComponentWithProperties | null>;
@@ -21,9 +21,9 @@ declare const NavigationController: import('vue').DefineComponent<{
21
21
  type: ObjectConstructor;
22
22
  default: null;
23
23
  };
24
- }, unknown, {
25
- components: Raw<ComponentWithProperties>[];
26
- mainComponent: Raw<ComponentWithProperties> | null;
24
+ }>, {}, {
25
+ components: ComponentWithPropertiesType[];
26
+ mainComponent: ComponentWithPropertiesType | null;
27
27
  transitionName: string;
28
28
  savedScrollPositions: number[];
29
29
  nextScrollPosition: number;
@@ -34,7 +34,7 @@ declare const NavigationController: import('vue').DefineComponent<{
34
34
  asyncQueueRunning: boolean;
35
35
  cachedProvides: Map<number, any>;
36
36
  }, {}, {
37
- cacheComponentProvides(newComponent: ComponentWithProperties): void;
37
+ cacheComponentProvides(newComponent: ComponentWithPropertiesType): void;
38
38
  provideForComponent(key: number): any;
39
39
  runQueue<T>(run: () => Promise<T>): Promise<T>;
40
40
  runQueueIfNeeded(): void;
@@ -77,15 +77,218 @@ declare const NavigationController: import('vue').DefineComponent<{
77
77
  type: ObjectConstructor;
78
78
  default: null;
79
79
  };
80
- }>> & {
80
+ }>> & Readonly<{
81
81
  onDidPush?: ((...args: any[]) => any) | undefined;
82
82
  onDidPop?: ((...args: any[]) => any) | undefined;
83
83
  onShowDetail?: ((...args: any[]) => any) | undefined;
84
84
  onPresent?: ((...args: any[]) => any) | undefined;
85
- }, {
85
+ }>, {
86
86
  root: ComponentWithProperties | null;
87
87
  customProvide: Record<string, any>;
88
88
  initialComponents: ComponentWithProperties[] | null;
89
89
  animationType: string;
90
- }, {}>;
90
+ }, {}, {
91
+ FramedComponent: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
92
+ root: {
93
+ type: typeof ComponentWithProperties;
94
+ required: true;
95
+ };
96
+ customProvide: {
97
+ type: ObjectConstructor;
98
+ default: null;
99
+ };
100
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("pop" | "push" | "show")[], "pop" | "push" | "show", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
101
+ root: {
102
+ type: typeof ComponentWithProperties;
103
+ required: true;
104
+ };
105
+ customProvide: {
106
+ type: ObjectConstructor;
107
+ default: null;
108
+ };
109
+ }>> & Readonly<{
110
+ onPop?: ((...args: any[]) => any) | undefined;
111
+ onPush?: ((...args: any[]) => any) | undefined;
112
+ onShow?: ((...args: any[]) => any) | undefined;
113
+ }>, {
114
+ customProvide: Record<string, any>;
115
+ }, {}, {
116
+ ComponentWithPropertiesInstance: import('vue').ComponentOptions;
117
+ }, {}, string, () => {
118
+ [x: string]: any;
119
+ }, true, {}, any>;
120
+ }, {}, string, () => {
121
+ reactive_navigationController: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
122
+ root: {
123
+ default: null;
124
+ type: PropType<ComponentWithProperties | null>;
125
+ };
126
+ initialComponents: {
127
+ default: null;
128
+ type: PropType<ComponentWithProperties[] | null>;
129
+ };
130
+ animationType: {
131
+ default: string;
132
+ type: StringConstructor;
133
+ };
134
+ customProvide: {
135
+ type: ObjectConstructor;
136
+ default: null;
137
+ };
138
+ }>> & Readonly<{
139
+ onDidPush?: ((...args: any[]) => any) | undefined;
140
+ onDidPop?: ((...args: any[]) => any) | undefined;
141
+ onShowDetail?: ((...args: any[]) => any) | undefined;
142
+ onPresent?: ((...args: any[]) => any) | undefined;
143
+ }>, {}, {
144
+ components: ComponentWithPropertiesType[];
145
+ mainComponent: ComponentWithPropertiesType | null;
146
+ transitionName: string;
147
+ savedScrollPositions: number[];
148
+ nextScrollPosition: number;
149
+ previousScrollPosition: number;
150
+ nextInternalScrollPosition: number;
151
+ savedInternalScrollPositions: number[];
152
+ asyncQueue: (() => Promise<void>)[];
153
+ asyncQueueRunning: boolean;
154
+ cachedProvides: Map<number, any>;
155
+ }, {}, {
156
+ cacheComponentProvides(newComponent: ComponentWithPropertiesType): void;
157
+ provideForComponent(key: number): any;
158
+ runQueue<T>(run: () => Promise<T>): Promise<T>;
159
+ runQueueIfNeeded(): void;
160
+ freezeSize(): void;
161
+ growSize(width: number, height: number): void;
162
+ unfreezeSize(): void;
163
+ getInternalScrollElement(element?: Element | null): HTMLElement | null;
164
+ getScrollElement(element?: HTMLElement | null): HTMLElement;
165
+ shouldAnimate(): any;
166
+ returnToHistoryIndex(): boolean;
167
+ push(options: PushOptions): Promise<void>;
168
+ shouldNavigateAway(): Promise<boolean>;
169
+ popToRoot(options?: PopOptions): Promise<ComponentWithProperties[] | undefined>;
170
+ getPoppableParent(): import('vue').ComponentInternalInstance | null;
171
+ pop(options?: PopOptions): Promise<ComponentWithProperties[] | undefined>;
172
+ beforeEnter(insertedElement: Element): void;
173
+ beforeLeave(leavingElement: Element): void;
174
+ beforeBeforeEnterAnimation(): void;
175
+ finishedEnterAnimation(): void;
176
+ enter(element: any, done: () => void): void;
177
+ getScrollOuterHeight(scrollElement: HTMLElement): number;
178
+ leave(element: any, done: () => void): void;
179
+ afterLeave(element: any): void;
180
+ afterEnter(element: any): void;
181
+ enterCancelled(_element: any): void;
182
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("didPush" | "didPop" | "showDetail" | "present")[], {}, {}, false, {
183
+ reactive_navigation_pop: {
184
+ default: null;
185
+ };
186
+ reactive_navigation_can_pop: {
187
+ default: boolean;
188
+ };
189
+ reactive_navigation_can_dismiss: {
190
+ default: boolean;
191
+ };
192
+ }, {}, {
193
+ FramedComponent: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
194
+ root: {
195
+ type: typeof ComponentWithProperties;
196
+ required: true;
197
+ };
198
+ customProvide: {
199
+ type: ObjectConstructor;
200
+ default: null;
201
+ };
202
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("pop" | "push" | "show")[], "pop" | "push" | "show", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
203
+ root: {
204
+ type: typeof ComponentWithProperties;
205
+ required: true;
206
+ };
207
+ customProvide: {
208
+ type: ObjectConstructor;
209
+ default: null;
210
+ };
211
+ }>> & Readonly<{
212
+ onPop?: ((...args: any[]) => any) | undefined;
213
+ onPush?: ((...args: any[]) => any) | undefined;
214
+ onShow?: ((...args: any[]) => any) | undefined;
215
+ }>, {
216
+ customProvide: Record<string, any>;
217
+ }, {}, {
218
+ ComponentWithPropertiesInstance: import('vue').ComponentOptions;
219
+ }, {}, string, () => {
220
+ [x: string]: any;
221
+ }, true, {}, any>;
222
+ }, {}, string, {}, any, import('vue').ComponentProvideOptions, {
223
+ P: {};
224
+ B: {};
225
+ D: {};
226
+ C: {};
227
+ M: {};
228
+ Defaults: {};
229
+ }, Readonly<import('vue').ExtractPropTypes<{
230
+ root: {
231
+ default: null;
232
+ type: PropType<ComponentWithProperties | null>;
233
+ };
234
+ initialComponents: {
235
+ default: null;
236
+ type: PropType<ComponentWithProperties[] | null>;
237
+ };
238
+ animationType: {
239
+ default: string;
240
+ type: StringConstructor;
241
+ };
242
+ customProvide: {
243
+ type: ObjectConstructor;
244
+ default: null;
245
+ };
246
+ }>> & Readonly<{
247
+ onDidPush?: ((...args: any[]) => any) | undefined;
248
+ onDidPop?: ((...args: any[]) => any) | undefined;
249
+ onShowDetail?: ((...args: any[]) => any) | undefined;
250
+ onPresent?: ((...args: any[]) => any) | undefined;
251
+ }>, {}, {
252
+ components: ComponentWithPropertiesType[];
253
+ mainComponent: ComponentWithPropertiesType | null;
254
+ transitionName: string;
255
+ savedScrollPositions: number[];
256
+ nextScrollPosition: number;
257
+ previousScrollPosition: number;
258
+ nextInternalScrollPosition: number;
259
+ savedInternalScrollPositions: number[];
260
+ asyncQueue: (() => Promise<void>)[];
261
+ asyncQueueRunning: boolean;
262
+ cachedProvides: Map<number, any>;
263
+ }, {}, {
264
+ cacheComponentProvides(newComponent: ComponentWithPropertiesType): void;
265
+ provideForComponent(key: number): any;
266
+ runQueue<T>(run: () => Promise<T>): Promise<T>;
267
+ runQueueIfNeeded(): void;
268
+ freezeSize(): void;
269
+ growSize(width: number, height: number): void;
270
+ unfreezeSize(): void;
271
+ getInternalScrollElement(element?: Element | null): HTMLElement | null;
272
+ getScrollElement(element?: HTMLElement | null): HTMLElement;
273
+ shouldAnimate(): any;
274
+ returnToHistoryIndex(): boolean;
275
+ push(options: PushOptions): Promise<void>;
276
+ shouldNavigateAway(): Promise<boolean>;
277
+ popToRoot(options?: PopOptions): Promise<ComponentWithProperties[] | undefined>;
278
+ getPoppableParent(): import('vue').ComponentInternalInstance | null;
279
+ pop(options?: PopOptions): Promise<ComponentWithProperties[] | undefined>;
280
+ beforeEnter(insertedElement: Element): void;
281
+ beforeLeave(leavingElement: Element): void;
282
+ beforeBeforeEnterAnimation(): void;
283
+ finishedEnterAnimation(): void;
284
+ enter(element: any, done: () => void): void;
285
+ getScrollOuterHeight(scrollElement: HTMLElement): number;
286
+ leave(element: any, done: () => void): void;
287
+ afterLeave(element: any): void;
288
+ afterEnter(element: any): void;
289
+ enterCancelled(_element: any): void;
290
+ }, {}>;
291
+ reactive_navigation_show: (options: PushOptions) => Promise<void>;
292
+ reactive_navigation_pop: import('vue').ComputedRef<unknown>;
293
+ }, true, {}, any>;
91
294
  export default NavigationController;
@@ -1,8 +1,8 @@
1
+ import { useModalStackComponent } from './utils/useModalStackComponent';
1
2
  import { NavigationOptions, useCanDismiss, useCanPop, useDismiss, useFocused, useNavigate, usePop, usePresent, useShow, useShowDetail, useUrl } from './utils/navigationHooks';
2
3
  import { useSplitViewController } from './SplitViewController.vue';
3
4
  import { default as Popup } from './Popup.vue';
4
5
  import { default as NavigationController, useNavigationController } from './NavigationController.vue';
5
- import { useModalStackComponent } from './ModalStackComponent.vue';
6
6
  import { DefineComponent, Ref } from 'vue';
7
7
 
8
8
  /**
@@ -1,27 +1,27 @@
1
1
  import { PopOptions } from './PopOptions';
2
2
  import { ComponentWithProperties } from './ComponentWithProperties';
3
3
 
4
- declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
5
  root: ComponentWithProperties;
6
6
  className: string;
7
7
  style: string | Record<string, string>;
8
8
  }>, {
9
9
  className: string;
10
10
  style: string;
11
- }>, {
12
- dismiss: import('vue').ShallowRef<(options?: PopOptions | undefined) => Promise<false | undefined>>;
13
- pop: import('vue').ShallowRef<(options?: PopOptions | undefined) => Promise<false | undefined>>;
14
- }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
11
+ }>>, {
12
+ dismiss: import('vue').ShallowRef<(options?: PopOptions) => Promise<false | undefined>, (options?: PopOptions) => Promise<false | undefined>>;
13
+ pop: import('vue').ShallowRef<(options?: PopOptions) => Promise<false | undefined>, (options?: PopOptions) => Promise<false | undefined>>;
14
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
15
15
  root: ComponentWithProperties;
16
16
  className: string;
17
17
  style: string | Record<string, string>;
18
18
  }>, {
19
19
  className: string;
20
20
  style: string;
21
- }>>>, {
21
+ }>>> & Readonly<{}>, {
22
22
  style: string | Record<string, string>;
23
23
  className: string;
24
- }, {}>;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
25
  export default _default;
26
26
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
27
  type __VLS_TypePropsToRuntimeProps<T> = {