@tanstack/solid-router
Version:
Modern and scalable routing for Solid applications
1 lines • 1.04 kB
Source Map (JSON)
{"version":3,"file":"matchContext.cjs","names":["Solid","AnyRouteMatch","NearestMatchContextValue","matchId","Accessor","routeId","match","hasPending","defaultNearestMatchContext","undefined","nearestMatchContext","createContext"],"sources":["../../src/matchContext.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport type { AnyRouteMatch } from '@tanstack/router-core'\n\nexport type NearestMatchContextValue = {\n matchId: Solid.Accessor<string | undefined>\n routeId: Solid.Accessor<string | undefined>\n match: Solid.Accessor<AnyRouteMatch | undefined>\n hasPending: Solid.Accessor<boolean>\n}\n\nconst defaultNearestMatchContext: NearestMatchContextValue = {\n matchId: () => undefined,\n routeId: () => undefined,\n match: () => undefined,\n hasPending: () => false,\n}\n\nexport const nearestMatchContext =\n Solid.createContext<NearestMatchContextValue>(defaultNearestMatchContext)\n"],"mappings":";;;AAiBA,IAAaU,sBACXV,SAAMW,cARqD;CAC3DR,eAAeM,KAAAA;CACfJ,eAAeI,KAAAA;CACfH,aAAaG,KAAAA;CACbF,kBAAkB;CACnB,CAG0E"}