UNPKG

@tanstack/vue-router

Version:

Modern and scalable routing for Vue applications

23 lines (22 loc) 908 B
import * as Vue from "vue"; //#region src/matchContext.tsx var matchContext = Symbol("TanStackRouterMatch"); var pendingMatchContext = Symbol("TanStackRouterPendingMatch"); var dummyPendingMatchContext = Symbol("TanStackRouterDummyPendingMatch"); var routeIdContext = Symbol("TanStackRouterRouteId"); /** * Retrieves nearest pending-match state from the component tree */ function injectPendingMatch() { return Vue.inject(pendingMatchContext, Vue.ref(false)); } /** * Retrieves dummy pending-match state from the component tree * This only exists so we can conditionally inject a value when we are not interested in the nearest pending match */ function injectDummyPendingMatch() { return Vue.inject(dummyPendingMatchContext, Vue.ref(false)); } //#endregion export { injectDummyPendingMatch, injectPendingMatch, matchContext, pendingMatchContext, routeIdContext }; //# sourceMappingURL=matchContext.js.map