@simonbackx/vue-app-navigation 2.5.0 → 2.5.2

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.
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { inject, ref, reactive, markRaw, proxyRefs, getCurrentInstance, provide, computed, unref, onActivated, onMounted, queuePostFlushCb, onBeforeUnmount, onBeforeMount, onUpdated, warn, h, setTransitionHooks, callWithAsyncErrorHandling, ErrorCodes, shallowRef, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, defineComponent, Transition, withCtx, createBlock, createCommentVNode, customRef, onScopeDispose, onDeactivated, normalizeClass, normalizeStyle, TransitionGroup, Fragment, renderList, isRef } from "vue";
7
+ import { inject, ref, reactive, markRaw, proxyRefs, getCurrentInstance, provide, computed, unref, onActivated, onMounted, queuePostFlushCb, onBeforeUnmount, onBeforeMount, onUpdated, warn, h, setTransitionHooks, callWithAsyncErrorHandling, ErrorCodes, shallowRef, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, defineComponent, Transition, withCtx, createBlock, createCommentVNode, customRef, onScopeDispose, onDeactivated, normalizeClass, normalizeStyle, isRef, TransitionGroup, Fragment, renderList } from "vue";
8
8
  const _UrlHelper = class _UrlHelper {
9
9
  constructor(url, localFixedPrefix) {
10
10
  __publicField(this, "url");
@@ -276,6 +276,16 @@ class HistoryManagerStatic {
276
276
  });
277
277
  });
278
278
  }
279
+ resolveUrl(url, index) {
280
+ if (url !== null) {
281
+ return "/" + UrlHelper.trim(UrlHelper.transformUrl(url));
282
+ }
283
+ if (!this.states[index - 1]) {
284
+ return "/" + UrlHelper.trim(UrlHelper.transformUrl("/"));
285
+ }
286
+ const previousUrl = this.states[index - 1].url;
287
+ return this.resolveUrl(previousUrl ?? null, index - 1);
288
+ }
279
289
  /// Set the current URL without modifying states
280
290
  setUrl(url, title, index) {
281
291
  if (!this.active) {
@@ -302,7 +312,7 @@ class HistoryManagerStatic {
302
312
  if (ComponentWithProperties.debug) {
303
313
  console.log("history.replaceState", count, url);
304
314
  }
305
- const formattedUrl = "/" + UrlHelper.trim(UrlHelper.transformUrl(url));
315
+ const formattedUrl = this.resolveUrl(url, count);
306
316
  history.replaceState({ counter: count }, "", formattedUrl);
307
317
  if (state.title) {
308
318
  window.document.title = this.formatTitle(state.title);
@@ -343,12 +353,8 @@ class HistoryManagerStatic {
343
353
  if (ComponentWithProperties.debug) {
344
354
  console.log("history.replaceState - updateUrl");
345
355
  }
346
- const current = new UrlHelper();
347
- const formattedUrl = "/" + UrlHelper.trim(
348
- UrlHelper.transformUrl(
349
- current.getPath()
350
- )
351
- );
356
+ const lastState = this.states[this.states.length - 1];
357
+ const formattedUrl = this.resolveUrl(lastState.url ?? null, lastState.index);
352
358
  history.replaceState({ counter: this.counter }, "", formattedUrl);
353
359
  });
354
360
  }
@@ -2130,7 +2136,8 @@ function useCanDismiss() {
2130
2136
  return computed(() => !!unref(rawDismiss));
2131
2137
  }
2132
2138
  function useFocused() {
2133
- return inject("reactive_navigation_focused", true);
2139
+ const rawFocused = inject("reactive_navigation_focused", true);
2140
+ return computed(() => !!unref(rawFocused));
2134
2141
  }
2135
2142
  function extendUrl(url) {
2136
2143
  const urlHelpers = useUrl();
@@ -2250,15 +2257,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2250
2257
  const j = Object.keys(vvv).filter((p) => !!vvv[p]).join(" ");
2251
2258
  return j + (j ? " " : "") + (props.className ? props.className : "popup") + (props.root.animated ? " animated" : "");
2252
2259
  });
2253
- const isFocused = computed(() => {
2254
- var _a;
2255
- const popups = (_a = modalStackComponent.value.stackComponent) == null ? void 0 : _a.getFocusedComponent();
2256
- if (popups !== component) {
2257
- return false;
2258
- }
2259
- return true;
2260
- });
2261
- provide("reactive_navigation_focused", isFocused);
2260
+ const isFocused = useFocused();
2262
2261
  const onKey = (event) => {
2263
2262
  if (event.defaultPrevented || event.repeat) {
2264
2263
  return;
@@ -2326,6 +2325,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2326
2325
  };
2327
2326
  }
2328
2327
  });
2328
+ function injectHooks(instanceProxy, definitions) {
2329
+ const ctx = instanceProxy.$.ctx;
2330
+ for (const key in definitions) {
2331
+ if (!isRef(definitions[key])) {
2332
+ ctx[key] = definitions[key];
2333
+ } else {
2334
+ const val = definitions[key];
2335
+ Object.defineProperty(ctx, key, {
2336
+ enumerable: true,
2337
+ configurable: true,
2338
+ get: () => {
2339
+ return val.value;
2340
+ },
2341
+ set: () => {
2342
+ warn(`Cannot assign to '${key}' of navigation mixin. This is a read-only property.`);
2343
+ }
2344
+ });
2345
+ }
2346
+ }
2347
+ }
2329
2348
  const StackComponent$1 = defineComponent({
2330
2349
  name: "StackComponent",
2331
2350
  components: {
@@ -2340,6 +2359,12 @@ const StackComponent$1 = defineComponent({
2340
2359
  beforeUnmount() {
2341
2360
  this.components = [];
2342
2361
  },
2362
+ created() {
2363
+ const definitions = {
2364
+ parentIsFocused: useFocused()
2365
+ };
2366
+ injectHooks(this, definitions);
2367
+ },
2343
2368
  methods: {
2344
2369
  getCustomProvide(index, key) {
2345
2370
  return {
@@ -2351,7 +2376,8 @@ const StackComponent$1 = defineComponent({
2351
2376
  console.warn("Avoid calling dismiss in components on the StackComponent, since options are not supported here");
2352
2377
  this.removeAt(index, key);
2353
2378
  },
2354
- reactive_navigation_can_dismiss: false
2379
+ reactive_navigation_can_dismiss: false,
2380
+ reactive_navigation_focused: !!this.parentIsFocused && this.getFocusedComponent() === this.components[index]
2355
2381
  };
2356
2382
  },
2357
2383
  show(component) {
@@ -2417,26 +2443,6 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
2417
2443
  ]);
2418
2444
  }
2419
2445
  const StackComponent = /* @__PURE__ */ _export_sfc(StackComponent$1, [["render", _sfc_render$2]]);
2420
- function injectHooks(instanceProxy, definitions) {
2421
- const ctx = instanceProxy.$.ctx;
2422
- for (const key in definitions) {
2423
- if (!isRef(definitions[key])) {
2424
- ctx[key] = definitions[key];
2425
- } else {
2426
- const val = definitions[key];
2427
- Object.defineProperty(ctx, key, {
2428
- enumerable: true,
2429
- configurable: true,
2430
- get: () => {
2431
- return val.value;
2432
- },
2433
- set: () => {
2434
- warn(`Cannot assign to '${key}' of navigation mixin. This is a read-only property.`);
2435
- }
2436
- });
2437
- }
2438
- }
2439
- }
2440
2446
  function useModalStackComponent() {
2441
2447
  const c = inject("reactive_modalStackComponent");
2442
2448
  return shallowRef(c);
@@ -2477,6 +2483,12 @@ const ModalStackComponent$1 = defineComponent({
2477
2483
  // Can also be wrapped in modal stack component
2478
2484
  modalStackComponent() {
2479
2485
  return this;
2486
+ },
2487
+ isFocused() {
2488
+ return !!this.parentIsFocused;
2489
+ },
2490
+ isNavigationControllerFocused() {
2491
+ return this.isFocused && !this.stackComponent.getFocusedComponent();
2480
2492
  }
2481
2493
  },
2482
2494
  created() {
@@ -2484,7 +2496,8 @@ const ModalStackComponent$1 = defineComponent({
2484
2496
  parentPresent: usePresent(),
2485
2497
  parentDismiss: useDismiss(),
2486
2498
  parentPop: usePop(),
2487
- parentShow: useShow()
2499
+ parentShow: useShow(),
2500
+ parentIsFocused: useFocused()
2488
2501
  };
2489
2502
  injectHooks(this, definitions);
2490
2503
  },
@@ -2549,8 +2562,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
2549
2562
  ref: "navigationController",
2550
2563
  "animation-type": "modal",
2551
2564
  root: _ctx.root,
2552
- "initial-components": _ctx.initialComponents
2553
- }, null, 8, ["root", "initial-components"]),
2565
+ "initial-components": _ctx.initialComponents,
2566
+ "custom-provide": {
2567
+ reactive_navigation_focused: _ctx.isNavigationControllerFocused
2568
+ }
2569
+ }, null, 8, ["root", "initial-components", "custom-provide"]),
2554
2570
  createVNode(_component_StackComponent, {
2555
2571
  ref: "stackComponent",
2556
2572
  onReturnToHistoryIndex: _ctx.returnToHistoryIndex
@@ -1,3 +1,4 @@
1
+ import { HistoryUrl } from './HistoryManager';
1
2
  import { ComponentPublicInstance, VNode } from 'vue';
2
3
 
3
4
  export type ModalDisplayStyle = "cover" | "popup" | "overlay" | "sheet" | "side-view";
@@ -46,8 +47,8 @@ export declare class ComponentWithProperties {
46
47
  assignHistoryIndex(): void;
47
48
  inheritHistoryIndex(index: number): void;
48
49
  ownsHistoryIndex(): boolean;
49
- overrideUrl(url: string, title?: string): void;
50
- setUrl(url: string, title?: string): void;
50
+ overrideUrl(url: HistoryUrl, title?: string): void;
51
+ setUrl(url: HistoryUrl, title?: string): void;
51
52
  setTitle(title: string): void;
52
53
  /**
53
54
  * This will get called when the user returned to this component
@@ -1,6 +1,10 @@
1
1
  /// <reference types="node" />
2
+ /**
3
+ * null makes sure the previous URL is used for this route
4
+ */
5
+ export type HistoryUrl = string | null;
2
6
  type HistoryState = {
3
- url?: string;
7
+ url?: HistoryUrl;
4
8
  title?: string;
5
9
  index: number;
6
10
  adjustHistory: boolean;
@@ -26,7 +30,8 @@ declare class HistoryManagerStatic {
26
30
  private addToQueue;
27
31
  private runQueue;
28
32
  private go;
29
- setUrl(url: string, title?: string, index?: number): void;
33
+ resolveUrl(url: HistoryUrl, index: number): string;
34
+ setUrl(url: HistoryUrl, title?: string, index?: number): void;
30
35
  updateUrl(): void;
31
36
  formatTitle(title: string): string;
32
37
  /**
@@ -29,6 +29,7 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
29
29
  reactive_navigation_can_pop: boolean;
30
30
  reactive_navigation_dismiss: () => void;
31
31
  reactive_navigation_can_dismiss: boolean;
32
+ reactive_navigation_focused: boolean;
32
33
  };
33
34
  show(component: import('./ComponentWithProperties').ComponentWithProperties): void;
34
35
  getFocusedComponent(): {
@@ -66,8 +67,8 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
66
67
  assignHistoryIndex: () => void;
67
68
  inheritHistoryIndex: (index: number) => void;
68
69
  ownsHistoryIndex: () => boolean;
69
- overrideUrl: (url: string, title?: string | undefined) => void;
70
- setUrl: (url: string, title?: string | undefined) => void;
70
+ overrideUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
71
+ setUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
71
72
  setTitle: (title: string) => void;
72
73
  returnToHistoryIndex: () => boolean;
73
74
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -100,6 +101,7 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
100
101
  reactive_navigation_can_pop: boolean;
101
102
  reactive_navigation_dismiss: () => void;
102
103
  reactive_navigation_can_dismiss: boolean;
104
+ reactive_navigation_focused: boolean;
103
105
  };
104
106
  show(component: import('./ComponentWithProperties').ComponentWithProperties): void;
105
107
  getFocusedComponent(): {
@@ -137,8 +139,8 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
137
139
  assignHistoryIndex: () => void;
138
140
  inheritHistoryIndex: (index: number) => void;
139
141
  ownsHistoryIndex: () => boolean;
140
- overrideUrl: (url: string, title?: string | undefined) => void;
141
- setUrl: (url: string, title?: string | undefined) => void;
142
+ overrideUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
143
+ setUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
142
144
  setTitle: (title: string) => void;
143
145
  returnToHistoryIndex: () => boolean;
144
146
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -351,6 +353,8 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
351
353
  initialComponents: import('./ComponentWithProperties').ComponentWithProperties[] | null;
352
354
  initialPresents: import('./PushOptions').PushOptions[] | null;
353
355
  }>;
356
+ isFocused(): boolean;
357
+ isNavigationControllerFocused(): boolean;
354
358
  }, {
355
359
  present(options: import('./PushOptions').PushOptions): void;
356
360
  returnToHistoryIndex(): boolean;
@@ -405,6 +409,7 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
405
409
  reactive_navigation_can_pop: boolean;
406
410
  reactive_navigation_dismiss: () => void;
407
411
  reactive_navigation_can_dismiss: boolean;
412
+ reactive_navigation_focused: boolean;
408
413
  };
409
414
  show(component: import('./ComponentWithProperties').ComponentWithProperties): void;
410
415
  getFocusedComponent(): {
@@ -442,8 +447,8 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
442
447
  assignHistoryIndex: () => void;
443
448
  inheritHistoryIndex: (index: number) => void;
444
449
  ownsHistoryIndex: () => boolean;
445
- overrideUrl: (url: string, title?: string | undefined) => void;
446
- setUrl: (url: string, title?: string | undefined) => void;
450
+ overrideUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
451
+ setUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
447
452
  setTitle: (title: string) => void;
448
453
  returnToHistoryIndex: () => boolean;
449
454
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -476,6 +481,7 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
476
481
  reactive_navigation_can_pop: boolean;
477
482
  reactive_navigation_dismiss: () => void;
478
483
  reactive_navigation_can_dismiss: boolean;
484
+ reactive_navigation_focused: boolean;
479
485
  };
480
486
  show(component: import('./ComponentWithProperties').ComponentWithProperties): void;
481
487
  getFocusedComponent(): {
@@ -513,8 +519,8 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
513
519
  assignHistoryIndex: () => void;
514
520
  inheritHistoryIndex: (index: number) => void;
515
521
  ownsHistoryIndex: () => boolean;
516
- overrideUrl: (url: string, title?: string | undefined) => void;
517
- setUrl: (url: string, title?: string | undefined) => void;
522
+ overrideUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
523
+ setUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
518
524
  setTitle: (title: string) => void;
519
525
  returnToHistoryIndex: () => boolean;
520
526
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -727,6 +733,8 @@ export declare const ModalMixin: import('vue').DefineComponent<{}, {}, {}, {}, {
727
733
  initialComponents: import('./ComponentWithProperties').ComponentWithProperties[] | null;
728
734
  initialPresents: import('./PushOptions').PushOptions[] | null;
729
735
  }>;
736
+ isFocused(): boolean;
737
+ isNavigationControllerFocused(): boolean;
730
738
  }, {
731
739
  present(options: import('./PushOptions').PushOptions): void;
732
740
  returnToHistoryIndex(): boolean;
@@ -28,6 +28,7 @@ declare const ModalStackComponent: import('vue').DefineComponent<{
28
28
  reactive_navigation_can_pop: boolean;
29
29
  reactive_navigation_dismiss: () => void;
30
30
  reactive_navigation_can_dismiss: boolean;
31
+ reactive_navigation_focused: boolean;
31
32
  };
32
33
  show(component: ComponentWithProperties): void;
33
34
  getFocusedComponent(): {
@@ -65,8 +66,8 @@ declare const ModalStackComponent: import('vue').DefineComponent<{
65
66
  assignHistoryIndex: () => void;
66
67
  inheritHistoryIndex: (index: number) => void;
67
68
  ownsHistoryIndex: () => boolean;
68
- overrideUrl: (url: string, title?: string | undefined) => void;
69
- setUrl: (url: string, title?: string | undefined) => void;
69
+ overrideUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
70
+ setUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
70
71
  setTitle: (title: string) => void;
71
72
  returnToHistoryIndex: () => boolean;
72
73
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -99,6 +100,7 @@ declare const ModalStackComponent: import('vue').DefineComponent<{
99
100
  reactive_navigation_can_pop: boolean;
100
101
  reactive_navigation_dismiss: () => void;
101
102
  reactive_navigation_can_dismiss: boolean;
103
+ reactive_navigation_focused: boolean;
102
104
  };
103
105
  show(component: ComponentWithProperties): void;
104
106
  getFocusedComponent(): {
@@ -136,8 +138,8 @@ declare const ModalStackComponent: import('vue').DefineComponent<{
136
138
  assignHistoryIndex: () => void;
137
139
  inheritHistoryIndex: (index: number) => void;
138
140
  ownsHistoryIndex: () => boolean;
139
- overrideUrl: (url: string, title?: string | undefined) => void;
140
- setUrl: (url: string, title?: string | undefined) => void;
141
+ overrideUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
142
+ setUrl: (url: import('./HistoryManager').HistoryUrl, title?: string | undefined) => void;
141
143
  setTitle: (title: string) => void;
142
144
  returnToHistoryIndex: () => boolean;
143
145
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -350,6 +352,8 @@ declare const ModalStackComponent: import('vue').DefineComponent<{
350
352
  initialComponents: ComponentWithProperties[] | null;
351
353
  initialPresents: PushOptions[] | null;
352
354
  }>;
355
+ isFocused(): boolean;
356
+ isNavigationControllerFocused(): boolean;
353
357
  }, {
354
358
  present(options: PushOptions): void;
355
359
  returnToHistoryIndex(): boolean;
@@ -8,6 +8,7 @@ declare const StackComponent: import('vue').DefineComponent<{}, {}, {
8
8
  reactive_navigation_can_pop: boolean;
9
9
  reactive_navigation_dismiss: () => void;
10
10
  reactive_navigation_can_dismiss: boolean;
11
+ reactive_navigation_focused: boolean;
11
12
  };
12
13
  show(component: ComponentWithProperties): void;
13
14
  getFocusedComponent(): {
@@ -45,8 +46,8 @@ declare const StackComponent: import('vue').DefineComponent<{}, {}, {
45
46
  assignHistoryIndex: () => void;
46
47
  inheritHistoryIndex: (index: number) => void;
47
48
  ownsHistoryIndex: () => boolean;
48
- overrideUrl: (url: string, title?: string | undefined) => void;
49
- setUrl: (url: string, title?: string | undefined) => void;
49
+ overrideUrl: (url: import('./HistoryManager.ts').HistoryUrl, title?: string | undefined) => void;
50
+ setUrl: (url: import('./HistoryManager.ts').HistoryUrl, title?: string | undefined) => void;
50
51
  setTitle: (title: string) => void;
51
52
  returnToHistoryIndex: () => boolean;
52
53
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -1,6 +1,7 @@
1
1
  import { UrlMatchResult, UrlParamsConstructors } from './UrlHelper';
2
2
  import { PushOptions } from '../PushOptions';
3
3
  import { PopOptions } from '../PopOptions';
4
+ import { HistoryUrl } from '../HistoryManager';
4
5
  import { ComponentWithProperties } from '../ComponentWithProperties';
5
6
  import { ComponentOptions, Ref } from 'vue';
6
7
 
@@ -79,14 +80,14 @@ export declare function usePresent(): (options: PushOptions | ComponentWithPrope
79
80
  export declare function useDismiss(): (options?: PopOptions) => Promise<void>;
80
81
  export declare function useCanPop(): Ref<boolean>;
81
82
  export declare function useCanDismiss(): Ref<boolean>;
82
- export declare function useFocused(): boolean | Ref<boolean>;
83
+ export declare function useFocused(): import('vue').ComputedRef<boolean>;
83
84
  /**
84
85
  * Add a url 'prefix' to the current url and all its children
85
86
  */
86
87
  export declare function extendUrl(url: string | Ref<string>): void;
87
88
  export declare function setTitleSuffix(title: string): void;
88
89
  export declare function setTitle(title: string): void;
89
- export declare function setUrl(url: string, title?: string): void;
90
+ export declare function setUrl(url: HistoryUrl, title?: string): void;
90
91
  export declare function useUrl(): {
91
92
  getUrl(): string;
92
93
  /**
@@ -96,5 +97,5 @@ export declare function useUrl(): {
96
97
  extendUrl(url: string): string;
97
98
  match<Params>(template: string, params?: UrlParamsConstructors<Params>): UrlMatchResult<Params> | undefined;
98
99
  matchCurrent<Params_1>(template: string, params?: UrlParamsConstructors<Params_1> | undefined): UrlMatchResult<Params_1> | undefined;
99
- overrideUrl(url: string, title?: string): void;
100
+ overrideUrl(url: HistoryUrl, title?: string): void;
100
101
  };
@@ -92,6 +92,7 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
92
92
  reactive_navigation_can_pop: boolean;
93
93
  reactive_navigation_dismiss: () => void;
94
94
  reactive_navigation_can_dismiss: boolean;
95
+ reactive_navigation_focused: boolean;
95
96
  };
96
97
  show(component: import('..').ComponentWithProperties): void;
97
98
  getFocusedComponent(): {
@@ -129,8 +130,8 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
129
130
  assignHistoryIndex: () => void;
130
131
  inheritHistoryIndex: (index: number) => void;
131
132
  ownsHistoryIndex: () => boolean;
132
- overrideUrl: (url: string, title?: string | undefined) => void;
133
- setUrl: (url: string, title?: string | undefined) => void;
133
+ overrideUrl: (url: import('..').HistoryUrl, title?: string | undefined) => void;
134
+ setUrl: (url: import('..').HistoryUrl, title?: string | undefined) => void;
134
135
  setTitle: (title: string) => void;
135
136
  returnToHistoryIndex: () => boolean;
136
137
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -163,6 +164,7 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
163
164
  reactive_navigation_can_pop: boolean;
164
165
  reactive_navigation_dismiss: () => void;
165
166
  reactive_navigation_can_dismiss: boolean;
167
+ reactive_navigation_focused: boolean;
166
168
  };
167
169
  show(component: import('..').ComponentWithProperties): void;
168
170
  getFocusedComponent(): {
@@ -200,8 +202,8 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
200
202
  assignHistoryIndex: () => void;
201
203
  inheritHistoryIndex: (index: number) => void;
202
204
  ownsHistoryIndex: () => boolean;
203
- overrideUrl: (url: string, title?: string | undefined) => void;
204
- setUrl: (url: string, title?: string | undefined) => void;
205
+ overrideUrl: (url: import('..').HistoryUrl, title?: string | undefined) => void;
206
+ setUrl: (url: import('..').HistoryUrl, title?: string | undefined) => void;
205
207
  setTitle: (title: string) => void;
206
208
  returnToHistoryIndex: () => boolean;
207
209
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -414,6 +416,8 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
414
416
  initialComponents: import('..').ComponentWithProperties[] | null;
415
417
  initialPresents: import('..').PushOptions[] | null;
416
418
  }>;
419
+ isFocused(): boolean;
420
+ isNavigationControllerFocused(): boolean;
417
421
  }, {
418
422
  present(options: import('..').PushOptions): void;
419
423
  returnToHistoryIndex(): boolean;
@@ -468,6 +472,7 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
468
472
  reactive_navigation_can_pop: boolean;
469
473
  reactive_navigation_dismiss: () => void;
470
474
  reactive_navigation_can_dismiss: boolean;
475
+ reactive_navigation_focused: boolean;
471
476
  };
472
477
  show(component: import('..').ComponentWithProperties): void;
473
478
  getFocusedComponent(): {
@@ -505,8 +510,8 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
505
510
  assignHistoryIndex: () => void;
506
511
  inheritHistoryIndex: (index: number) => void;
507
512
  ownsHistoryIndex: () => boolean;
508
- overrideUrl: (url: string, title?: string | undefined) => void;
509
- setUrl: (url: string, title?: string | undefined) => void;
513
+ overrideUrl: (url: import('..').HistoryUrl, title?: string | undefined) => void;
514
+ setUrl: (url: import('..').HistoryUrl, title?: string | undefined) => void;
510
515
  setTitle: (title: string) => void;
511
516
  returnToHistoryIndex: () => boolean;
512
517
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -539,6 +544,7 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
539
544
  reactive_navigation_can_pop: boolean;
540
545
  reactive_navigation_dismiss: () => void;
541
546
  reactive_navigation_can_dismiss: boolean;
547
+ reactive_navigation_focused: boolean;
542
548
  };
543
549
  show(component: import('..').ComponentWithProperties): void;
544
550
  getFocusedComponent(): {
@@ -576,8 +582,8 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
576
582
  assignHistoryIndex: () => void;
577
583
  inheritHistoryIndex: (index: number) => void;
578
584
  ownsHistoryIndex: () => boolean;
579
- overrideUrl: (url: string, title?: string | undefined) => void;
580
- setUrl: (url: string, title?: string | undefined) => void;
585
+ overrideUrl: (url: import('..').HistoryUrl, title?: string | undefined) => void;
586
+ setUrl: (url: import('..').HistoryUrl, title?: string | undefined) => void;
581
587
  setTitle: (title: string) => void;
582
588
  returnToHistoryIndex: () => boolean;
583
589
  componentInstance: () => import('vue').ComponentPublicInstance | null;
@@ -790,6 +796,8 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
790
796
  initialComponents: import('..').ComponentWithProperties[] | null;
791
797
  initialPresents: import('..').PushOptions[] | null;
792
798
  }>;
799
+ isFocused(): boolean;
800
+ isNavigationControllerFocused(): boolean;
793
801
  }, {
794
802
  present(options: import('..').PushOptions): void;
795
803
  returnToHistoryIndex(): boolean;
@@ -1537,7 +1545,7 @@ declare const EditWebshopMixin_base: new (...args: any) => import('../src/class-
1537
1545
  extendUrl(url: string): string;
1538
1546
  match<Params>(template: string, params?: import('..').UrlParamsConstructors<Params> | undefined): import('..').UrlMatchResult<Params> | undefined;
1539
1547
  matchCurrent<Params_1>(template: string, params?: import('..').UrlParamsConstructors<Params_1> | undefined): import('..').UrlMatchResult<Params_1> | undefined;
1540
- overrideUrl(url: string, title?: string | undefined): void;
1548
+ overrideUrl(url: import('..').HistoryUrl, title?: string | undefined): void;
1541
1549
  };
1542
1550
  $navigate: <Params_2 extends Record<string, unknown>>(prop1: string | import('..').Route<Params_2, unknown>, prop2?: import('..').RouteNavigationOptions<Params_2> | undefined) => Promise<void>;
1543
1551
  }, {}, {
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.5.0",
5
+ "version": "2.5.2",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": "./dist/index.js",