Repository navigation
Releases: rafaelaugustos/vue-router-ns
Releases · rafaelaugustos/vue-router-ns
Release list
v0.1.0-beta.6
- Fixed: HMR reloads routed pages through NativeScript-Vue's native Page replacement. Covered pages wait until the Frame finishes returning to them, preserving the navigation history on iOS and Android.
- Documented the explicit manifest opt-in required for predictive back progress on Android 14 and 15, including apps targeting API 36.
v0.1.0-beta.5
<RouterSplitView list="/messages">keeps list and detail pages in one logical history, showing them side by side in wide windows and as a single pane in narrow ones. Resizing preserves page instances and native detail history.- Android 14+ back swipes now reveal the previous page in the same stack, including inside modals. Cancellation restores the views, and completion goes through router guards. Set
createRouter({ backPreview: false, routes })to keep onlyuseBackGesture()for a custom animation. - Fixed: an iOS tab that has never loaded no longer holds up navigation in the other tabs when NativeScript reports its
isLoadedstate as undefined.
v0.1.0-beta.4
push(to, { zoomFrom: view })and<RouterLink zoom>: on iOS 18 and later, the page grows out of the view through UIKit's zoom transition, and shrinks back into it when it closes. The drag to dismiss is held while a leave guard is active. Elsewhere the page gets its usual transition, and a shared transition passed along is used there instead.SharedTransition.custom(...)from@nativescript/coreis documented as atransition, and checked on both platforms with pages the router mounts.<Deferred>renders its content once the page is on screen, after the transition, and afallbackslot until then, so a page with a lot to lay out still animates in on time.- iOS sheet options for modal routes, under
modal.ios:detents('medium','large'or a fraction of the screen),selectedDetent,largestUndimmedDetent,grabberandcornerRadius. Set before the sheet is presented.pushmerges itsmodal.ioswith the record's.
v0.1.0-beta.3
- On iOS 16 and later, the ActionBar's back button goes through the leave guards while one is active, instead of popping the page on its own. It still looks like the system button.
- Typed routes with pages imported up front:
component: () => Messagekeeps the page's type out of the route table's, so<script setup>pages can useuseRoute('message')without the cycle thatcomponent: Messagecauses. The function form is now part of thecomponenttype. createRouter({ restore: { save, load } })saves the paths of every stack after each navigation and rebuilds them when the app comes back after being killed, through the guards and without animating. Saves older thanmaxAge(30 minutes) are ignored, and the app forgets them when it exits on its own.- On iOS, swiping down a modal whose page has an active leave guard, or tapping outside it, now runs the guard with the sheet staying put, and closes the modal if the guard allows it. Before, the swipe was only blocked.
v0.1.0-beta.2
router.setStack([...])sets a stack as a list of locations: it keeps the pages both stacks share, goes back to the last of them and pushes the rest, animating only the last step.router.back({ animated: false }).<RouterView backToRootOnReselect>goes back to the tab's first page when its tab is tapped while selected, like native tab bars.router.backToRoot()does it on demand.push(to, { withParents: true })pushes the route's parents first, so a deep link's back goes up the route tree. Parents come fromchildrennesting.<RouterLink>takes it too.
v0.1.0-beta.1
useBackGesture(): the progress of the Android 14+ predictive back swipe, for the page it would close. Releasing the swipe still goes back through the router and its guards.- Fixed: on iOS, navigating did nothing until every tab had been opened once. A tab iOS hasn't shown yet no longer holds up navigations elsewhere.
v0.1.0-beta.0
First beta of vue-router-ns: Vue Router's API for NativeScript-Vue 3, built on the native navigation stack.
push,replace,back, guards, named routes and params, with each page keeping its own route- leave guards that also catch the Android back button, and only block the iOS swipe while they matter
- modal routes with their own stack, and
pushForResult()to get a value back from a page - one stack per tab with named
<RouterView>s - route names and params type-checked from your route table, no codegen
It hasn't been through real apps on iOS and Android yet, so it's published under next:
npm install vue-router-ns@next
See the README for the differences from Vue Router.