1 | {"version":3,"names":["Group","Screen","createNavigatorFactory","Navigator","arguments","undefined","Error"],"sources":["createNavigatorFactory.tsx"],"sourcesContent":["import type { NavigationState, ParamListBase } from '@react-navigation/routers';\nimport type * as React from 'react';\n\nimport Group from './Group';\nimport Screen from './Screen';\nimport type { EventMapBase, TypedNavigator } from './types';\n\n/**\n * Higher order component to create a `Navigator` and `Screen` pair.\n * Custom navigators should wrap the navigator component in `createNavigator` before exporting.\n *\n * @param Navigator The navigtor component to wrap.\n * @returns Factory method to create a `Navigator` and `Screen` pair.\n */\nexport default function createNavigatorFactory<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase,\n NavigatorComponent extends React.ComponentType<any>\n>(Navigator: NavigatorComponent) {\n return function <ParamList extends ParamListBase>(): TypedNavigator<\n ParamList,\n State,\n ScreenOptions,\n EventMap,\n typeof Navigator\n > {\n if (arguments[0] !== undefined) {\n throw new Error(\n \"Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API? See https://reactnavigation.org/docs/hello-react-navigation for the latest API and guides.\"\n );\n }\n\n return {\n Navigator,\n Group,\n Screen,\n };\n };\n}\n"],"mappings":"AAGA,OAAOA,KAAP,MAAkB,SAAlB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,sBAAT,CAKbC,SALa,EAKkB;EAC/B,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAD,CAAT,KAAiBC,SAArB,EAAgC;MAC9B,MAAM,IAAIC,KAAJ,CACJ,+LADI,CAAN;IAGD;;IAED,OAAO;MACLH,SADK;MAELH,KAFK;MAGLC;IAHK,CAAP;EAKD,CAlBD;AAmBD"} |