@react-navigation/native 7.1.4 → 7.1.6

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.
Files changed (214) hide show
  1. package/lib/typescript/src/Link.d.ts.map +1 -0
  2. package/lib/typescript/src/LinkingContext.d.ts.map +1 -0
  3. package/lib/typescript/src/LocaleDirContext.d.ts.map +1 -0
  4. package/lib/typescript/src/NavigationContainer.d.ts.map +1 -0
  5. package/lib/typescript/src/ServerContainer.d.ts.map +1 -0
  6. package/lib/typescript/src/ServerContext.d.ts.map +1 -0
  7. package/lib/typescript/src/UnhandledLinkingContext.d.ts.map +1 -0
  8. package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -0
  9. package/lib/typescript/src/__stubs__/window.d.ts.map +1 -0
  10. package/lib/typescript/src/createMemoryHistory.d.ts.map +1 -0
  11. package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -0
  12. package/lib/typescript/src/extractPathFromURL.d.ts.map +1 -0
  13. package/lib/typescript/src/index.d.ts.map +1 -0
  14. package/lib/typescript/src/theming/DarkTheme.d.ts.map +1 -0
  15. package/lib/typescript/src/theming/DefaultTheme.d.ts.map +1 -0
  16. package/lib/typescript/src/theming/fonts.d.ts.map +1 -0
  17. package/lib/typescript/src/types.d.ts.map +1 -0
  18. package/lib/typescript/src/useBackButton.d.ts.map +1 -0
  19. package/lib/typescript/src/useBackButton.native.d.ts.map +1 -0
  20. package/lib/typescript/src/useDocumentTitle.d.ts.map +1 -0
  21. package/lib/typescript/src/useDocumentTitle.native.d.ts.map +1 -0
  22. package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -0
  23. package/lib/typescript/src/useLinkProps.d.ts.map +1 -0
  24. package/lib/typescript/src/useLinkTo.d.ts.map +1 -0
  25. package/lib/typescript/src/useLinking.d.ts.map +1 -0
  26. package/lib/typescript/src/useLinking.native.d.ts.map +1 -0
  27. package/lib/typescript/src/useLocale.d.ts.map +1 -0
  28. package/lib/typescript/src/useRoutePath.d.ts.map +1 -0
  29. package/lib/typescript/src/useScrollToTop.d.ts.map +1 -0
  30. package/lib/typescript/src/useThenable.d.ts.map +1 -0
  31. package/package.json +12 -24
  32. package/lib/commonjs/Link.js +0 -68
  33. package/lib/commonjs/Link.js.map +0 -1
  34. package/lib/commonjs/LinkingContext.js +0 -17
  35. package/lib/commonjs/LinkingContext.js.map +0 -1
  36. package/lib/commonjs/LocaleDirContext.js +0 -12
  37. package/lib/commonjs/LocaleDirContext.js.map +0 -1
  38. package/lib/commonjs/NavigationContainer.js +0 -143
  39. package/lib/commonjs/NavigationContainer.js.map +0 -1
  40. package/lib/commonjs/ServerContainer.js +0 -62
  41. package/lib/commonjs/ServerContainer.js.map +0 -1
  42. package/lib/commonjs/ServerContext.js +0 -11
  43. package/lib/commonjs/ServerContext.js.map +0 -1
  44. package/lib/commonjs/UnhandledLinkingContext.js +0 -20
  45. package/lib/commonjs/UnhandledLinkingContext.js.map +0 -1
  46. package/lib/commonjs/__stubs__/createStackNavigator.js +0 -22
  47. package/lib/commonjs/__stubs__/createStackNavigator.js.map +0 -1
  48. package/lib/commonjs/__stubs__/window.js +0 -79
  49. package/lib/commonjs/__stubs__/window.js.map +0 -1
  50. package/lib/commonjs/createMemoryHistory.js +0 -219
  51. package/lib/commonjs/createMemoryHistory.js.map +0 -1
  52. package/lib/commonjs/createStaticNavigation.js +0 -60
  53. package/lib/commonjs/createStaticNavigation.js.map +0 -1
  54. package/lib/commonjs/extractPathFromURL.js +0 -24
  55. package/lib/commonjs/extractPathFromURL.js.map +0 -1
  56. package/lib/commonjs/index.js +0 -144
  57. package/lib/commonjs/index.js.map +0 -1
  58. package/lib/commonjs/package.json +0 -1
  59. package/lib/commonjs/theming/DarkTheme.js +0 -20
  60. package/lib/commonjs/theming/DarkTheme.js.map +0 -1
  61. package/lib/commonjs/theming/DefaultTheme.js +0 -20
  62. package/lib/commonjs/theming/DefaultTheme.js.map +0 -1
  63. package/lib/commonjs/theming/fonts.js +0 -65
  64. package/lib/commonjs/theming/fonts.js.map +0 -1
  65. package/lib/commonjs/types.js +0 -6
  66. package/lib/commonjs/types.js.map +0 -1
  67. package/lib/commonjs/useBackButton.js +0 -11
  68. package/lib/commonjs/useBackButton.js.map +0 -1
  69. package/lib/commonjs/useBackButton.native.js +0 -27
  70. package/lib/commonjs/useBackButton.native.js.map +0 -1
  71. package/lib/commonjs/useDocumentTitle.js +0 -32
  72. package/lib/commonjs/useDocumentTitle.js.map +0 -1
  73. package/lib/commonjs/useDocumentTitle.native.js +0 -10
  74. package/lib/commonjs/useDocumentTitle.native.js.map +0 -1
  75. package/lib/commonjs/useLinkBuilder.js +0 -91
  76. package/lib/commonjs/useLinkBuilder.js.map +0 -1
  77. package/lib/commonjs/useLinkProps.js +0 -99
  78. package/lib/commonjs/useLinkProps.js.map +0 -1
  79. package/lib/commonjs/useLinkTo.js +0 -31
  80. package/lib/commonjs/useLinkTo.js.map +0 -1
  81. package/lib/commonjs/useLinking.js +0 -329
  82. package/lib/commonjs/useLinking.js.map +0 -1
  83. package/lib/commonjs/useLinking.native.js +0 -158
  84. package/lib/commonjs/useLinking.native.js.map +0 -1
  85. package/lib/commonjs/useLocale.js +0 -23
  86. package/lib/commonjs/useLocale.js.map +0 -1
  87. package/lib/commonjs/useRoutePath.js +0 -35
  88. package/lib/commonjs/useRoutePath.js.map +0 -1
  89. package/lib/commonjs/useScrollToTop.js +0 -97
  90. package/lib/commonjs/useScrollToTop.js.map +0 -1
  91. package/lib/commonjs/useThenable.js +0 -42
  92. package/lib/commonjs/useThenable.js.map +0 -1
  93. package/lib/typescript/commonjs/package.json +0 -1
  94. package/lib/typescript/commonjs/src/Link.d.ts.map +0 -1
  95. package/lib/typescript/commonjs/src/LinkingContext.d.ts.map +0 -1
  96. package/lib/typescript/commonjs/src/LocaleDirContext.d.ts.map +0 -1
  97. package/lib/typescript/commonjs/src/NavigationContainer.d.ts.map +0 -1
  98. package/lib/typescript/commonjs/src/ServerContainer.d.ts.map +0 -1
  99. package/lib/typescript/commonjs/src/ServerContext.d.ts.map +0 -1
  100. package/lib/typescript/commonjs/src/UnhandledLinkingContext.d.ts.map +0 -1
  101. package/lib/typescript/commonjs/src/__stubs__/createStackNavigator.d.ts.map +0 -1
  102. package/lib/typescript/commonjs/src/__stubs__/window.d.ts.map +0 -1
  103. package/lib/typescript/commonjs/src/createMemoryHistory.d.ts.map +0 -1
  104. package/lib/typescript/commonjs/src/createStaticNavigation.d.ts.map +0 -1
  105. package/lib/typescript/commonjs/src/extractPathFromURL.d.ts.map +0 -1
  106. package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
  107. package/lib/typescript/commonjs/src/theming/DarkTheme.d.ts.map +0 -1
  108. package/lib/typescript/commonjs/src/theming/DefaultTheme.d.ts.map +0 -1
  109. package/lib/typescript/commonjs/src/theming/fonts.d.ts.map +0 -1
  110. package/lib/typescript/commonjs/src/types.d.ts.map +0 -1
  111. package/lib/typescript/commonjs/src/useBackButton.d.ts.map +0 -1
  112. package/lib/typescript/commonjs/src/useBackButton.native.d.ts.map +0 -1
  113. package/lib/typescript/commonjs/src/useDocumentTitle.d.ts.map +0 -1
  114. package/lib/typescript/commonjs/src/useDocumentTitle.native.d.ts.map +0 -1
  115. package/lib/typescript/commonjs/src/useLinkBuilder.d.ts.map +0 -1
  116. package/lib/typescript/commonjs/src/useLinkProps.d.ts.map +0 -1
  117. package/lib/typescript/commonjs/src/useLinkTo.d.ts.map +0 -1
  118. package/lib/typescript/commonjs/src/useLinking.d.ts.map +0 -1
  119. package/lib/typescript/commonjs/src/useLinking.native.d.ts.map +0 -1
  120. package/lib/typescript/commonjs/src/useLocale.d.ts.map +0 -1
  121. package/lib/typescript/commonjs/src/useRoutePath.d.ts.map +0 -1
  122. package/lib/typescript/commonjs/src/useScrollToTop.d.ts.map +0 -1
  123. package/lib/typescript/commonjs/src/useThenable.d.ts.map +0 -1
  124. package/lib/typescript/module/src/Link.d.ts +0 -22
  125. package/lib/typescript/module/src/Link.d.ts.map +0 -1
  126. package/lib/typescript/module/src/LinkingContext.d.ts +0 -7
  127. package/lib/typescript/module/src/LinkingContext.d.ts.map +0 -1
  128. package/lib/typescript/module/src/LocaleDirContext.d.ts +0 -4
  129. package/lib/typescript/module/src/LocaleDirContext.d.ts.map +0 -1
  130. package/lib/typescript/module/src/NavigationContainer.d.ts +0 -19
  131. package/lib/typescript/module/src/NavigationContainer.d.ts.map +0 -1
  132. package/lib/typescript/module/src/ServerContainer.d.ts +0 -14
  133. package/lib/typescript/module/src/ServerContainer.d.ts.map +0 -1
  134. package/lib/typescript/module/src/ServerContext.d.ts +0 -9
  135. package/lib/typescript/module/src/ServerContext.d.ts.map +0 -1
  136. package/lib/typescript/module/src/UnhandledLinkingContext.d.ts +0 -6
  137. package/lib/typescript/module/src/UnhandledLinkingContext.d.ts.map +0 -1
  138. package/lib/typescript/module/src/__stubs__/createStackNavigator.d.ts +0 -13
  139. package/lib/typescript/module/src/__stubs__/createStackNavigator.d.ts.map +0 -1
  140. package/lib/typescript/module/src/__stubs__/window.d.ts +0 -18
  141. package/lib/typescript/module/src/__stubs__/window.d.ts.map +0 -1
  142. package/lib/typescript/module/src/createMemoryHistory.d.ts +0 -25
  143. package/lib/typescript/module/src/createMemoryHistory.d.ts.map +0 -1
  144. package/lib/typescript/module/src/createStaticNavigation.d.ts +0 -34
  145. package/lib/typescript/module/src/createStaticNavigation.d.ts.map +0 -1
  146. package/lib/typescript/module/src/extractPathFromURL.d.ts +0 -2
  147. package/lib/typescript/module/src/extractPathFromURL.d.ts.map +0 -1
  148. package/lib/typescript/module/src/index.d.ts +0 -17
  149. package/lib/typescript/module/src/index.d.ts.map +0 -1
  150. package/lib/typescript/module/src/theming/DarkTheme.d.ts +0 -3
  151. package/lib/typescript/module/src/theming/DarkTheme.d.ts.map +0 -1
  152. package/lib/typescript/module/src/theming/DefaultTheme.d.ts +0 -3
  153. package/lib/typescript/module/src/theming/DefaultTheme.d.ts.map +0 -1
  154. package/lib/typescript/module/src/theming/fonts.d.ts +0 -53
  155. package/lib/typescript/module/src/theming/fonts.d.ts.map +0 -1
  156. package/lib/typescript/module/src/types.d.ts +0 -159
  157. package/lib/typescript/module/src/types.d.ts.map +0 -1
  158. package/lib/typescript/module/src/useBackButton.d.ts +0 -3
  159. package/lib/typescript/module/src/useBackButton.d.ts.map +0 -1
  160. package/lib/typescript/module/src/useBackButton.native.d.ts +0 -4
  161. package/lib/typescript/module/src/useBackButton.native.d.ts.map +0 -1
  162. package/lib/typescript/module/src/useDocumentTitle.d.ts +0 -8
  163. package/lib/typescript/module/src/useDocumentTitle.d.ts.map +0 -1
  164. package/lib/typescript/module/src/useDocumentTitle.native.d.ts +0 -2
  165. package/lib/typescript/module/src/useDocumentTitle.native.d.ts.map +0 -1
  166. package/lib/typescript/module/src/useLinkBuilder.d.ts +0 -26
  167. package/lib/typescript/module/src/useLinkBuilder.d.ts.map +0 -1
  168. package/lib/typescript/module/src/useLinkProps.d.ts +0 -32
  169. package/lib/typescript/module/src/useLinkProps.d.ts.map +0 -1
  170. package/lib/typescript/module/src/useLinkTo.d.ts +0 -7
  171. package/lib/typescript/module/src/useLinkTo.d.ts.map +0 -1
  172. package/lib/typescript/module/src/useLinking.d.ts +0 -14
  173. package/lib/typescript/module/src/useLinking.d.ts.map +0 -1
  174. package/lib/typescript/module/src/useLinking.native.d.ts +0 -33
  175. package/lib/typescript/module/src/useLinking.native.d.ts.map +0 -1
  176. package/lib/typescript/module/src/useLocale.d.ts +0 -7
  177. package/lib/typescript/module/src/useLocale.d.ts.map +0 -1
  178. package/lib/typescript/module/src/useRoutePath.d.ts +0 -7
  179. package/lib/typescript/module/src/useRoutePath.d.ts.map +0 -1
  180. package/lib/typescript/module/src/useScrollToTop.d.ts +0 -27
  181. package/lib/typescript/module/src/useScrollToTop.d.ts.map +0 -1
  182. package/lib/typescript/module/src/useThenable.d.ts +0 -2
  183. package/lib/typescript/module/src/useThenable.d.ts.map +0 -1
  184. /package/lib/typescript/{module/package.json → package.json} +0 -0
  185. /package/lib/typescript/{commonjs/src → src}/Link.d.ts +0 -0
  186. /package/lib/typescript/{commonjs/src → src}/LinkingContext.d.ts +0 -0
  187. /package/lib/typescript/{commonjs/src → src}/LocaleDirContext.d.ts +0 -0
  188. /package/lib/typescript/{commonjs/src → src}/NavigationContainer.d.ts +0 -0
  189. /package/lib/typescript/{commonjs/src → src}/ServerContainer.d.ts +0 -0
  190. /package/lib/typescript/{commonjs/src → src}/ServerContext.d.ts +0 -0
  191. /package/lib/typescript/{commonjs/src → src}/UnhandledLinkingContext.d.ts +0 -0
  192. /package/lib/typescript/{commonjs/src → src}/__stubs__/createStackNavigator.d.ts +0 -0
  193. /package/lib/typescript/{commonjs/src → src}/__stubs__/window.d.ts +0 -0
  194. /package/lib/typescript/{commonjs/src → src}/createMemoryHistory.d.ts +0 -0
  195. /package/lib/typescript/{commonjs/src → src}/createStaticNavigation.d.ts +0 -0
  196. /package/lib/typescript/{commonjs/src → src}/extractPathFromURL.d.ts +0 -0
  197. /package/lib/typescript/{commonjs/src → src}/index.d.ts +0 -0
  198. /package/lib/typescript/{commonjs/src → src}/theming/DarkTheme.d.ts +0 -0
  199. /package/lib/typescript/{commonjs/src → src}/theming/DefaultTheme.d.ts +0 -0
  200. /package/lib/typescript/{commonjs/src → src}/theming/fonts.d.ts +0 -0
  201. /package/lib/typescript/{commonjs/src → src}/types.d.ts +0 -0
  202. /package/lib/typescript/{commonjs/src → src}/useBackButton.d.ts +0 -0
  203. /package/lib/typescript/{commonjs/src → src}/useBackButton.native.d.ts +0 -0
  204. /package/lib/typescript/{commonjs/src → src}/useDocumentTitle.d.ts +0 -0
  205. /package/lib/typescript/{commonjs/src → src}/useDocumentTitle.native.d.ts +0 -0
  206. /package/lib/typescript/{commonjs/src → src}/useLinkBuilder.d.ts +0 -0
  207. /package/lib/typescript/{commonjs/src → src}/useLinkProps.d.ts +0 -0
  208. /package/lib/typescript/{commonjs/src → src}/useLinkTo.d.ts +0 -0
  209. /package/lib/typescript/{commonjs/src → src}/useLinking.d.ts +0 -0
  210. /package/lib/typescript/{commonjs/src → src}/useLinking.native.d.ts +0 -0
  211. /package/lib/typescript/{commonjs/src → src}/useLocale.d.ts +0 -0
  212. /package/lib/typescript/{commonjs/src → src}/useRoutePath.d.ts +0 -0
  213. /package/lib/typescript/{commonjs/src → src}/useScrollToTop.d.ts +0 -0
  214. /package/lib/typescript/{commonjs/src → src}/useThenable.d.ts +0 -0
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createStackNavigator = createStackNavigator;
7
- var _core = require("@react-navigation/core");
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- const StackNavigator = props => {
10
- const {
11
- state,
12
- descriptors,
13
- NavigationContent
14
- } = (0, _core.useNavigationBuilder)(_core.StackRouter, props);
15
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(NavigationContent, {
16
- children: descriptors[state.routes[state.index].key].render()
17
- });
18
- };
19
- function createStackNavigator() {
20
- return (0, _core.createNavigatorFactory)(StackNavigator)();
21
- }
22
- //# sourceMappingURL=createStackNavigator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_core","require","_jsxRuntime","StackNavigator","props","state","descriptors","NavigationContent","useNavigationBuilder","StackRouter","jsx","children","routes","index","key","render","createStackNavigator","createNavigatorFactory"],"sourceRoot":"../../../src","sources":["__stubs__/createStackNavigator.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AASgC,IAAAC,WAAA,GAAAD,OAAA;AAEhC,MAAME,cAAc,GAClBC,KAOC,IACE;EACH,MAAM;IAAEC,KAAK;IAAEC,WAAW;IAAEC;EAAkB,CAAC,GAAG,IAAAC,0BAAoB,EACpEC,iBAAW,EACXL,KACF,CAAC;EAED,oBACE,IAAAF,WAAA,CAAAQ,GAAA,EAACH,iBAAiB;IAAAI,QAAA,EACfL,WAAW,CAACD,KAAK,CAACO,MAAM,CAACP,KAAK,CAACQ,KAAK,CAAC,CAACC,GAAG,CAAC,CAACC,MAAM,CAAC;EAAC,CACnC,CAAC;AAExB,CAAC;AAEM,SAASC,oBAAoBA,CAAA,EAUjC;EACD,OAAO,IAAAC,4BAAsB,EAACd,cAAc,CAAC,CAAC,CAAC;AACjD","ignoreList":[]}
@@ -1,79 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.window = void 0;
7
- let location = new URL('', 'http://example.com');
8
- let listeners = [];
9
- let entries = [{
10
- state: null,
11
- href: location.href
12
- }];
13
- let index = 0;
14
- let currentState = null;
15
- const history = {
16
- get state() {
17
- return currentState;
18
- },
19
- pushState(state, _, path) {
20
- location = new URL(path, location.origin);
21
- currentState = state;
22
- entries = entries.slice(0, index + 1);
23
- entries.push({
24
- state,
25
- href: location.href
26
- });
27
- index = entries.length - 1;
28
- },
29
- replaceState(state, _, path) {
30
- location = new URL(path, location.origin);
31
- currentState = state;
32
- entries[index] = {
33
- state,
34
- href: location.href
35
- };
36
- },
37
- go(n) {
38
- setTimeout(() => {
39
- if (n > 0 && n < entries.length - index || n < 0 && Math.abs(n) <= index) {
40
- index += n;
41
- const entry = entries[index];
42
- location = new URL(entry.href);
43
- currentState = entry.state;
44
- listeners.forEach(cb => cb());
45
- }
46
- }, 0);
47
- },
48
- back() {
49
- this.go(-1);
50
- },
51
- forward() {
52
- this.go(1);
53
- }
54
- };
55
- const addEventListener = (type, listener) => {
56
- if (type === 'popstate') {
57
- listeners.push(listener);
58
- }
59
- };
60
- const removeEventListener = (type, listener) => {
61
- if (type === 'popstate') {
62
- listeners = listeners.filter(cb => cb !== listener);
63
- }
64
- };
65
- const window = exports.window = {
66
- document: {
67
- title: ''
68
- },
69
- get location() {
70
- return location;
71
- },
72
- history,
73
- addEventListener,
74
- removeEventListener,
75
- get window() {
76
- return window;
77
- }
78
- };
79
- //# sourceMappingURL=window.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["location","URL","listeners","entries","state","href","index","currentState","history","pushState","_","path","origin","slice","push","length","replaceState","go","n","setTimeout","Math","abs","entry","forEach","cb","back","forward","addEventListener","type","listener","removeEventListener","filter","window","exports","document","title"],"sourceRoot":"../../../src","sources":["__stubs__/window.tsx"],"mappings":";;;;;;AAAA,IAAIA,QAAQ,GAAG,IAAIC,GAAG,CAAC,EAAE,EAAE,oBAAoB,CAAC;AAEhD,IAAIC,SAAyB,GAAG,EAAE;AAClC,IAAIC,OAAO,GAAG,CAAC;EAAEC,KAAK,EAAE,IAAI;EAAEC,IAAI,EAAEL,QAAQ,CAACK;AAAK,CAAC,CAAC;AACpD,IAAIC,KAAK,GAAG,CAAC;AAEb,IAAIC,YAAiB,GAAG,IAAI;AAE5B,MAAMC,OAAO,GAAG;EACd,IAAIJ,KAAKA,CAAA,EAAG;IACV,OAAOG,YAAY;EACrB,CAAC;EAEDE,SAASA,CAACL,KAAU,EAAEM,CAAS,EAAEC,IAAY,EAAE;IAC7CX,QAAQ,GAAG,IAAIC,GAAG,CAACU,IAAI,EAAEX,QAAQ,CAACY,MAAM,CAAC;IAEzCL,YAAY,GAAGH,KAAK;IACpBD,OAAO,GAAGA,OAAO,CAACU,KAAK,CAAC,CAAC,EAAEP,KAAK,GAAG,CAAC,CAAC;IACrCH,OAAO,CAACW,IAAI,CAAC;MAAEV,KAAK;MAAEC,IAAI,EAAEL,QAAQ,CAACK;IAAK,CAAC,CAAC;IAC5CC,KAAK,GAAGH,OAAO,CAACY,MAAM,GAAG,CAAC;EAC5B,CAAC;EAEDC,YAAYA,CAACZ,KAAU,EAAEM,CAAS,EAAEC,IAAY,EAAE;IAChDX,QAAQ,GAAG,IAAIC,GAAG,CAACU,IAAI,EAAEX,QAAQ,CAACY,MAAM,CAAC;IAEzCL,YAAY,GAAGH,KAAK;IACpBD,OAAO,CAACG,KAAK,CAAC,GAAG;MAAEF,KAAK;MAAEC,IAAI,EAAEL,QAAQ,CAACK;IAAK,CAAC;EACjD,CAAC;EAEDY,E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O;EACPmB,gBAAgB;EAChBG,mBAAmB;EACnB,IAAIE,MAAMA,CAAA,EAAG;IACX,OAAOA,MAAM;EACf;AACF,CAAC","ignoreList":[]}
@@ -1,219 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createMemoryHistory = createMemoryHistory;
7
- var _nonSecure = require("nanoid/non-secure");
8
- function createMemoryHistory() {
9
- let index = 0;
10
- let items = [];
11
-
12
- // Pending callbacks for `history.go(n)`
13
- // We might modify the callback stored if it was interrupted, so we have a ref to identify it
14
- const pending = [];
15
- const interrupt = () => {
16
- // If another history operation was performed we need to interrupt existing ones
17
- // This makes sure that calls such as `history.replace` after `history.go` don't happen
18
- // Since otherwise it won't be correct if something else has changed
19
- pending.forEach(it => {
20
- const cb = it.cb;
21
- it.cb = () => cb(true);
22
- });
23
- };
24
- const history = {
25
- get index() {
26
- // We store an id in the state instead of an index
27
- // Index could get out of sync with in-memory values if page reloads
28
- const id = window.history.state?.id;
29
- if (id) {
30
- const index = items.findIndex(item => item.id === id);
31
- return index > -1 ? index : 0;
32
- }
33
- return 0;
34
- },
35
- get(index) {
36
- return items[index];
37
- },
38
- backIndex({
39
- path
40
- }) {
41
- // We need to find the index from the element before current to get closest path to go back to
42
- for (let i = index - 1; i >= 0; i--) {
43
- const item = items[i];
44
- if (item.path === path) {
45
- return i;
46
- }
47
- }
48
- return -1;
49
- },
50
- push({
51
- path,
52
- state
53
- }) {
54
- interrupt();
55
- const id = (0, _nonSecure.nanoid)();
56
-
57
- // When a new entry is pushed, all the existing entries after index will be inaccessible
58
- // So we remove any existing entries after the current index to clean them up
59
- items = items.slice(0, index + 1);
60
- items.push({
61
- path,
62
- state,
63
- id
64
- });
65
- index = items.length - 1;
66
-
67
- // We pass empty string for title because it's ignored in all browsers except safari
68
- // We don't store state object in history.state because:
69
- // - browsers have limits on how big it can be, and we don't control the size
70
- // - while not recommended, there could be non-serializable data in state
71
- window.history.pushState({
72
- id
73
- }, '', path);
74
- },
75
- replace({
76
- path,
77
- state
78
- }) {
79
- interrupt();
80
- const id = window.history.state?.id ?? (0, _nonSecure.nanoid)();
81
-
82
- // Need to keep the hash part of the path if there was no previous history entry
83
- // or the previous history entry had the same path
84
- let pathWithHash = path;
85
- const hash = pathWithHash.includes('#') ? '' : location.hash;
86
- if (!items.length || items.findIndex(item => item.id === id) < 0) {
87
- // There are two scenarios for creating an array with only one history record:
88
- // - When loaded id not found in the items array, this function by default will replace
89
- // the first item. We need to keep only the new updated object, otherwise it will break
90
- // the page when navigating forward in history.
91
- // - This is the first time any state modifications are done
92
- // So we need to push the entry as there's nothing to replace
93
-
94
- pathWithHash = pathWithHash + hash;
95
- items = [{
96
- path: pathWithHash,
97
- state,
98
- id
99
- }];
100
- index = 0;
101
- } else {
102
- if (items[index].path === path) {
103
- pathWithHash = pathWithHash + hash;
104
- }
105
- items[index] = {
106
- path,
107
- state,
108
- id
109
- };
110
- }
111
- window.history.replaceState({
112
- id
113
- }, '', pathWithHash);
114
- },
115
- // `history.go(n)` is asynchronous, there are couple of things to keep in mind:
116
- // - it won't do anything if we can't go `n` steps, the `popstate` event won't fire.
117
- // - each `history.go(n)` call will trigger a separate `popstate` event with correct location.
118
- // - the `popstate` event fires before the next frame after calling `history.go(n)`.
119
- // This method differs from `history.go(n)` in the sense that it'll go back as many steps it can.
120
- go(n) {
121
- interrupt();
122
-
123
- // To guard against unexpected navigation out of the app we will assume that browser history is only as deep as the length of our memory
124
- // history. If we don't have an item to navigate to then update our index and navigate as far as we can without taking the user out of the app.
125
- const nextIndex = index + n;
126
- const lastItemIndex = items.length - 1;
127
- if (n < 0 && !items[nextIndex]) {
128
- // Attempted to navigate beyond the first index. Negating the current index will align the browser history with the first item.
129
- n = -index;
130
- index = 0;
131
- } else if (n > 0 && nextIndex > lastItemIndex) {
132
- // Attempted to navigate past the last index. Calculate how many indices away from the last index and go there.
133
- n = lastItemIndex - index;
134
- index = lastItemIndex;
135
- } else {
136
- index = nextIndex;
137
- }
138
- if (n === 0) {
139
- return;
140
- }
141
-
142
- // When we call `history.go`, `popstate` will fire when there's history to go back to
143
- // So we need to somehow handle following cases:
144
- // - There's history to go back, `history.go` is called, and `popstate` fires
145
- // - `history.go` is called multiple times, we need to resolve on respective `popstate`
146
- // - No history to go back, but `history.go` was called, browser has no API to detect it
147
- return new Promise((resolve, reject) => {
148
- const done = interrupted => {
149
- clearTimeout(timer);
150
- if (interrupted) {
151
- reject(new Error('History was changed during navigation.'));
152
- return;
153
- }
154
-
155
- // There seems to be a bug in Chrome regarding updating the title
156
- // If we set a title just before calling `history.go`, the title gets lost
157
- // However the value of `document.title` is still what we set it to
158
- // It's just not displayed in the tab bar
159
- // To update the tab bar, we need to reset the title to something else first (e.g. '')
160
- // And set the title to what it was before so it gets applied
161
- // It won't work without setting it to empty string coz otherwise title isn't changing
162
- // Which means that the browser won't do anything after setting the title
163
- const {
164
- title
165
- } = window.document;
166
- window.document.title = '';
167
- window.document.title = title;
168
- resolve();
169
- };
170
- pending.push({
171
- ref: done,
172
- cb: done
173
- });
174
-
175
- // If navigation didn't happen within 100ms, assume that it won't happen
176
- // This may not be accurate, but hopefully it won't take so much time
177
- // In Chrome, navigation seems to happen instantly in next microtask
178
- // But on Firefox, it seems to take much longer, around 50ms from our testing
179
- // We're using a hacky timeout since there doesn't seem to be way to know for sure
180
- const timer = setTimeout(() => {
181
- const index = pending.findIndex(it => it.ref === done);
182
- if (index > -1) {
183
- pending[index].cb();
184
- pending.splice(index, 1);
185
- }
186
- }, 100);
187
- const onPopState = () => {
188
- const id = window.history.state?.id;
189
- const currentIndex = items.findIndex(item => item.id === id);
190
-
191
- // Fix createMemoryHistory.index variable's value
192
- // as it may go out of sync when navigating in the browser.
193
- index = Math.max(currentIndex, 0);
194
- const last = pending.pop();
195
- window.removeEventListener('popstate', onPopState);
196
- last?.cb();
197
- };
198
- window.addEventListener('popstate', onPopState);
199
- window.history.go(n);
200
- });
201
- },
202
- // The `popstate` event is triggered when history changes, except `pushState` and `replaceState`
203
- // If we call `history.go(n)` ourselves, we don't want it to trigger the listener
204
- // Here we normalize it so that only external changes (e.g. user pressing back/forward) trigger the listener
205
- listen(listener) {
206
- const onPopState = () => {
207
- if (pending.length) {
208
- // This was triggered by `history.go(n)`, we shouldn't call the listener
209
- return;
210
- }
211
- listener();
212
- };
213
- window.addEventListener('popstate', onPopState);
214
- return () => window.removeEventListener('popstate', onPopState);
215
- }
216
- };
217
- return history;
218
- }
219
- //# sourceMappingURL=createMemoryHistory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_nonSecure","require","createMemoryHistory","index","items","pending","interrupt","forEach","it","cb","history","id","window","state","findIndex","item","get","backIndex","path","i","push","nanoid","slice","length","pushState","replace","pathWithHash","hash","includes","location","replaceState","go","n","nextIndex","lastItemIndex","Promise","resolve","reject","done","interrupted","clearTimeout","timer","Error","title","document","ref","setTimeout","splice","onPopState","currentIndex","Math","max","last","pop","removeEventListener","addEventListener","listen","listener"],"sourceRoot":"../../src","sources":["createMemoryHistory.tsx"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAWO,SAASC,mBAAmBA,CAAA,EAAG;EACpC,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIC,KAAsB,GAAG,EAAE;;EAE/B;EACA;EACA,MAAMC,OAAgE,GAAG,EAAE;EAE3E,MAAMC,SAAS,GAAGA,CAAA,KAAM;IACtB;IACA;IACA;IACAD,OAAO,CAACE,OAAO,CAAEC,EAAE,IAAK;MACtB,MAAMC,EAAE,GAAGD,EAAE,CAACC,EAAE;MAChBD,EAAE,CAACC,EAAE,GAAG,MAAMA,EAAE,CAAC,IAAI,CAAC;IACxB,CAAC,CAAC;EACJ,CAAC;EAED,MAAMC,OAAO,GAAG;IACd,IAAIP,KAAKA,CAAA,EAAW;MAClB;MACA;MACA,MAAMQ,EAAE,GAAGC,MAAM,CAACF,OAAO,CAACG,KAAK,EAAEF,EAAE;MAEnC,IAAIA,EAAE,EA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,CAAA,KAAM;UACvB,MAAMrC,EAAE,GAAGC,MAAM,CAACF,OAAO,CAACG,KAAK,EAAEF,EAAE;UACnC,MAAMsC,YAAY,GAAG7C,KAAK,CAACU,SAAS,CAAEC,IAAI,IAAKA,IAAI,CAACJ,EAAE,KAAKA,EAAE,CAAC;;UAE9D;UACA;UACAR,KAAK,GAAG+C,IAAI,CAACC,GAAG,CAACF,YAAY,EAAE,CAAC,CAAC;UAEjC,MAAMG,IAAI,GAAG/C,OAAO,CAACgD,GAAG,CAAC,CAAC;UAE1BzC,MAAM,CAAC0C,mBAAmB,CAAC,UAAU,EAAEN,UAAU,CAAC;UAClDI,IAAI,EAAE3C,EAAE,CAAC,CAAC;QACZ,CAAC;QAEDG,MAAM,CAAC2C,gBAAgB,CAAC,UAAU,EAAEP,UAAU,CAAC;QAC/CpC,MAAM,CAACF,OAAO,CAACqB,EAAE,CAACC,CAAC,CAAC;MACtB,CAAC,CAAC;IACJ,CAAC;IAED;IACA;IACA;IACAwB,MAAMA,CAACC,QAAoB,EAAE;MAC3B,MAAMT,UAAU,GAAGA,CAAA,KAAM;QACvB,IAAI3C,OAAO,CAACkB,MAAM,EAAE;UAClB;UACA;QACF;QAEAkC,QAAQ,CAAC,CAAC;MACZ,CAAC;MAED7C,MAAM,CAAC2C,gBAAgB,CAAC,UAAU,EAAEP,UAAU,CAAC;MAE/C,OAAO,MAAMpC,MAAM,CAAC0C,mBAAmB,CAAC,UAAU,EAAEN,UAAU,CAAC;IACjE;EACF,CAAC;EAED,OAAOtC,OAAO;AAChB","ignoreList":[]}
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createStaticNavigation = createStaticNavigation;
7
- var _core = require("@react-navigation/core");
8
- var React = _interopRequireWildcard(require("react"));
9
- var _NavigationContainer = require("./NavigationContainer.js");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
- /**
14
- * Create a navigation component from a static navigation config.
15
- * The returned component is a wrapper around `NavigationContainer`.
16
- *
17
- * @param tree Static navigation config.
18
- * @returns Navigation component to use in your app.
19
- */
20
- function createStaticNavigation(tree) {
21
- const Component = (0, _core.createComponentForStaticNavigation)(tree, 'RootNavigator');
22
- function Navigation({
23
- linking,
24
- ...rest
25
- }, ref) {
26
- const linkingConfig = React.useMemo(() => {
27
- const screens = (0, _core.createPathConfigForStaticNavigation)(tree, {
28
- initialRouteName: linking?.config?.initialRouteName
29
- }, linking?.enabled === 'auto');
30
- if (!screens) return;
31
- return {
32
- path: linking?.config?.path,
33
- initialRouteName: linking?.config?.initialRouteName,
34
- screens
35
- };
36
- }, [linking?.enabled, linking?.config?.path, linking?.config?.initialRouteName]);
37
- const memoizedLinking = React.useMemo(() => {
38
- if (!linking) {
39
- return undefined;
40
- }
41
- const enabled = typeof linking.enabled === 'boolean' ? linking.enabled : linkingConfig?.screens != null;
42
- return {
43
- ...linking,
44
- enabled,
45
- config: linkingConfig
46
- };
47
- }, [linking, linkingConfig]);
48
- if (linking?.enabled === true && linkingConfig?.screens == null) {
49
- throw new Error('Linking is enabled but no linking configuration was found for the screens.\n\n' + 'To solve this:\n' + "- Specify a 'linking' property for the screens you want to link to.\n" + "- Or set 'linking.enabled' to 'auto' to generate paths automatically.\n\n" + 'See usage guide: https://reactnavigation.org/docs/static-configuration#linking');
50
- }
51
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationContainer.NavigationContainer, {
52
- ...rest,
53
- ref: ref,
54
- linking: memoizedLinking,
55
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {})
56
- });
57
- }
58
- return /*#__PURE__*/React.forwardRef(Navigation);
59
- }
60
- //# sourceMappingURL=createStaticNavigation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_core","require","React","_interopRequireWildcard","_NavigationContainer","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","createStaticNavigation","tree","Component","createComponentForStaticNavigation","Navigation","linking","rest","ref","linkingConfig","useMemo","screens","createPathConfigForStaticNavigation","initialRouteName","config","enabled","path","memoizedLinking","undefined","Error","jsx","NavigationContainer","children","forwardRef"],"sourceRoot":"../../src","sources":["createStaticNavigation.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,oBAAA,GAAAH,OAAA;AAA4D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAA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,EAAED,gBAAgB;QACnDF;MACF,CAAC;IACH,CAAC,EAAE,CACDL,OAAO,EAAES,OAAO,EAChBT,OAAO,EAAEQ,MAAM,EAAEE,IAAI,EACrBV,OAAO,EAAEQ,MAAM,EAAED,gBAAgB,CAClC,CAAC;IAEF,MAAMI,eAAe,GAAGxC,KAAK,CAACiC,OAAO,CAAC,MAAM;MAC1C,IAAI,CAACJ,OAAO,EAAE;QACZ,OAAOY,SAAS;MAClB;MAEA,MAAMH,OAAO,GACX,OAAOT,OAAO,CAACS,OAAO,KAAK,SAAS,GAChCT,OAAO,CAACS,OAAO,GACfN,aAAa,EAAEE,OAAO,IAAI,IAAI;MAEpC,OAAO;QACL,GAAGL,OAAO;QACVS,OAAO;QACPD,MAAM,EAAEL;MACV,CAAC;IACH,CAAC,EAAE,CAACH,OAAO,EAAEG,aAAa,CAAC,CAAC;IAE5B,IAAIH,OAAO,EAAES,OAAO,KAAK,IAAI,IAAIN,aAAa,EAAEE,OAAO,IAAI,IAAI,EAAE;MAC/D,MAAM,IAAIQ,KAAK,CACb,gFAAgF,GAC9E,kBAAkB,GAClB,uEAAuE,GACvE,2EAA2E,GAC3E,gFACJ,CAAC;IACH;IAEA,oBACE,IAAAvC,WAAA,CAAAwC,GAAA,EAACzC,oBAAA,CAAA0C,mBAAmB;MAAA,GAAKd,IAAI;MAAEC,GAAG,EAAEA,GAAI;MAACF,OAAO,EAAEW,eAAgB;MAAAK,QAAA,eAChE,IAAA1C,WAAA,CAAAwC,GAAA,EAACjB,SAAS,IAAE;IAAC,CACM,CAAC;EAE1B;EAEA,oBAAO1B,KAAK,CAAC8C,UAAU,CAAClB,UAAU,CAAC;AACrC","ignoreList":[]}
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.extractPathFromURL = extractPathFromURL;
7
- var _escapeStringRegexp = _interopRequireDefault(require("escape-string-regexp"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- function extractPathFromURL(prefixes, url) {
10
- for (const prefix of prefixes) {
11
- const protocol = prefix.match(/^[^:]+:/)?.[0] ?? '';
12
- const host = prefix.replace(new RegExp(`^${(0, _escapeStringRegexp.default)(protocol)}`), '').replace(/\/+/g, '/') // Replace multiple slash (//) with single ones
13
- .replace(/^\//, ''); // Remove extra leading slash
14
-
15
- const prefixRegex = new RegExp(`^${(0, _escapeStringRegexp.default)(protocol)}(/)*${host.split('.').map(it => it === '*' ? '[^/]+' : (0, _escapeStringRegexp.default)(it)).join('\\.')}`);
16
- const [originAndPath, ...searchParams] = url.split('?');
17
- const normalizedURL = originAndPath.replace(/\/+/g, '/').concat(searchParams.length ? `?${searchParams.join('?')}` : '');
18
- if (prefixRegex.test(normalizedURL)) {
19
- return normalizedURL.replace(prefixRegex, '');
20
- }
21
- }
22
- return undefined;
23
- }
24
- //# sourceMappingURL=extractPathFromURL.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_escapeStringRegexp","_interopRequireDefault","require","e","__esModule","default","extractPathFromURL","prefixes","url","prefix","protocol","match","host","replace","RegExp","escapeStringRegexp","prefixRegex","split","map","it","join","originAndPath","searchParams","normalizedURL","concat","length","test","undefined"],"sourceRoot":"../../src","sources":["extractPathFromURL.tsx"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAsD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/C,SAASG,kBAAkBA,CAACC,QAAkB,EAAEC,GAAW,EAAE;EAClE,KAAK,MAAMC,MAAM,IAAIF,QAAQ,EAAE;IAC7B,MAAMG,QAAQ,GAAGD,MAAM,CAACE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IACnD,MAAMC,IAAI,GAAGH,MAAM,CAChBI,OAAO,CAAC,IAAIC,MAAM,CAAC,IAAI,IAAAC,2BAAkB,EAACL,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAC3DG,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAA,CACrBA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;;IAEvB,MAAMG,WAAW,GAAG,IAAIF,MAAM,CAC5B,IAAI,IAAAC,2BAAkB,EAACL,QAAQ,CAAC,OAAOE,IAAI,CACxCK,KAAK,CAAC,GAAG,CAAC,CACVC,GAAG,CAAEC,EAAE,IAAMA,EAAE,KAAK,GAAG,GAAG,OAAO,GAAG,IAAAJ,2BAAkB,EAACI,EAAE,CAAE,CAAC,CAC5DC,IAAI,CAAC,KAAK,CAAC,EAChB,CAAC;IAED,MAAM,CAACC,aAAa,EAAE,GAAGC,YAAY,CAAC,GAAGd,GAAG,CAACS,KAAK,CAAC,GAAG,CAAC;IACvD,MAAMM,aAAa,GAAGF,aAAa,CAChCR,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACpBW,MAAM,CAACF,YAAY,CAACG,MAAM,GAAG,IAAIH,YAAY,CAACF,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IAElE,IAAIJ,WAAW,CAACU,IAAI,CAACH,aAAa,CAAC,EAAE;MACnC,OAAOA,aAAa,CAACV,OAAO,CAACG,WAAW,EAAE,EAAE,CAAC;IAC/C;EACF;EAEA,OAAOW,SAAS;AAClB","ignoreList":[]}
@@ -1,144 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {
7
- createStaticNavigation: true,
8
- Link: true,
9
- LinkingContext: true,
10
- LocaleDirContext: true,
11
- NavigationContainer: true,
12
- ServerContainer: true,
13
- DarkTheme: true,
14
- DefaultTheme: true,
15
- UNSTABLE_UnhandledLinkingContext: true,
16
- useLinkBuilder: true,
17
- useLinkProps: true,
18
- useLinkTo: true,
19
- useLocale: true,
20
- useScrollToTop: true
21
- };
22
- Object.defineProperty(exports, "DarkTheme", {
23
- enumerable: true,
24
- get: function () {
25
- return _DarkTheme.DarkTheme;
26
- }
27
- });
28
- Object.defineProperty(exports, "DefaultTheme", {
29
- enumerable: true,
30
- get: function () {
31
- return _DefaultTheme.DefaultTheme;
32
- }
33
- });
34
- Object.defineProperty(exports, "Link", {
35
- enumerable: true,
36
- get: function () {
37
- return _Link.Link;
38
- }
39
- });
40
- Object.defineProperty(exports, "LinkingContext", {
41
- enumerable: true,
42
- get: function () {
43
- return _LinkingContext.LinkingContext;
44
- }
45
- });
46
- Object.defineProperty(exports, "LocaleDirContext", {
47
- enumerable: true,
48
- get: function () {
49
- return _LocaleDirContext.LocaleDirContext;
50
- }
51
- });
52
- Object.defineProperty(exports, "NavigationContainer", {
53
- enumerable: true,
54
- get: function () {
55
- return _NavigationContainer.NavigationContainer;
56
- }
57
- });
58
- Object.defineProperty(exports, "ServerContainer", {
59
- enumerable: true,
60
- get: function () {
61
- return _ServerContainer.ServerContainer;
62
- }
63
- });
64
- Object.defineProperty(exports, "UNSTABLE_UnhandledLinkingContext", {
65
- enumerable: true,
66
- get: function () {
67
- return _UnhandledLinkingContext.UnhandledLinkingContext;
68
- }
69
- });
70
- Object.defineProperty(exports, "createStaticNavigation", {
71
- enumerable: true,
72
- get: function () {
73
- return _createStaticNavigation.createStaticNavigation;
74
- }
75
- });
76
- Object.defineProperty(exports, "useLinkBuilder", {
77
- enumerable: true,
78
- get: function () {
79
- return _useLinkBuilder.useLinkBuilder;
80
- }
81
- });
82
- Object.defineProperty(exports, "useLinkProps", {
83
- enumerable: true,
84
- get: function () {
85
- return _useLinkProps.useLinkProps;
86
- }
87
- });
88
- Object.defineProperty(exports, "useLinkTo", {
89
- enumerable: true,
90
- get: function () {
91
- return _useLinkTo.useLinkTo;
92
- }
93
- });
94
- Object.defineProperty(exports, "useLocale", {
95
- enumerable: true,
96
- get: function () {
97
- return _useLocale.useLocale;
98
- }
99
- });
100
- Object.defineProperty(exports, "useScrollToTop", {
101
- enumerable: true,
102
- get: function () {
103
- return _useScrollToTop.useScrollToTop;
104
- }
105
- });
106
- var _createStaticNavigation = require("./createStaticNavigation.js");
107
- var _Link = require("./Link.js");
108
- var _LinkingContext = require("./LinkingContext.js");
109
- var _LocaleDirContext = require("./LocaleDirContext.js");
110
- var _NavigationContainer = require("./NavigationContainer.js");
111
- var _ServerContainer = require("./ServerContainer.js");
112
- var _DarkTheme = require("./theming/DarkTheme.js");
113
- var _DefaultTheme = require("./theming/DefaultTheme.js");
114
- var _types = require("./types.js");
115
- Object.keys(_types).forEach(function (key) {
116
- if (key === "default" || key === "__esModule") return;
117
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
118
- if (key in exports && exports[key] === _types[key]) return;
119
- Object.defineProperty(exports, key, {
120
- enumerable: true,
121
- get: function () {
122
- return _types[key];
123
- }
124
- });
125
- });
126
- var _UnhandledLinkingContext = require("./UnhandledLinkingContext.js");
127
- var _useLinkBuilder = require("./useLinkBuilder.js");
128
- var _useLinkProps = require("./useLinkProps.js");
129
- var _useLinkTo = require("./useLinkTo.js");
130
- var _useLocale = require("./useLocale.js");
131
- var _useScrollToTop = require("./useScrollToTop.js");
132
- var _core = require("@react-navigation/core");
133
- Object.keys(_core).forEach(function (key) {
134
- if (key === "default" || key === "__esModule") return;
135
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
136
- if (key in exports && exports[key] === _core[key]) return;
137
- Object.defineProperty(exports, key, {
138
- enumerable: true,
139
- get: function () {
140
- return _core[key];
141
- }
142
- });
143
- });
144
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_createStaticNavigation","require","_Link","_LinkingContext","_LocaleDirContext","_NavigationContainer","_ServerContainer","_DarkTheme","_DefaultTheme","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_UnhandledLinkingContext","_useLinkBuilder","_useLinkProps","_useLinkTo","_useLoc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AAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAe,KAAA,CAAAf,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,KAAA,CAAAf,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"type":"commonjs"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DarkTheme = void 0;
7
- var _fonts = require("./fonts.js");
8
- const DarkTheme = exports.DarkTheme = {
9
- dark: true,
10
- colors: {
11
- primary: 'rgb(10, 132, 255)',
12
- background: 'rgb(1, 1, 1)',
13
- card: 'rgb(18, 18, 18)',
14
- text: 'rgb(229, 229, 231)',
15
- border: 'rgb(39, 39, 41)',
16
- notification: 'rgb(255, 69, 58)'
17
- },
18
- fonts: _fonts.fonts
19
- };
20
- //# sourceMappingURL=DarkTheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_fonts","require","DarkTheme","exports","dark","colors","primary","background","card","text","border","notification","fonts"],"sourceRoot":"../../../src","sources":["theming/DarkTheme.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,SAAgB,GAAAC,OAAA,CAAAD,SAAA,GAAG;EAC9BE,IAAI,EAAE,IAAI;EACVC,MAAM,EAAE;IACNC,OAAO,EAAE,mBAAmB;IAC5BC,UAAU,EAAE,cAAc;IAC1BC,IAAI,EAAE,iBAAiB;IACvBC,IAAI,EAAE,oBAAoB;IAC1BC,MAAM,EAAE,iBAAiB;IACzBC,YAAY,EAAE;EAChB,CAAC;EACDC,KAAK,EAALA;AACF,CAAC","ignoreList":[]}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DefaultTheme = void 0;
7
- var _fonts = require("./fonts.js");
8
- const DefaultTheme = exports.DefaultTheme = {
9
- dark: false,
10
- colors: {
11
- primary: 'rgb(0, 122, 255)',
12
- background: 'rgb(242, 242, 242)',
13
- card: 'rgb(255, 255, 255)',
14
- text: 'rgb(28, 28, 30)',
15
- border: 'rgb(216, 216, 216)',
16
- notification: 'rgb(255, 59, 48)'
17
- },
18
- fonts: _fonts.fonts
19
- };
20
- //# sourceMappingURL=DefaultTheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_fonts","require","DefaultTheme","exports","dark","colors","primary","background","card","text","border","notification","fonts"],"sourceRoot":"../../../src","sources":["theming/DefaultTheme.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,YAAmB,GAAAC,OAAA,CAAAD,YAAA,GAAG;EACjCE,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE;IACNC,OAAO,EAAE,kBAAkB;IAC3BC,UAAU,EAAE,oBAAoB;IAChCC,IAAI,EAAE,oBAAoB;IAC1BC,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE,oBAAoB;IAC5BC,YAAY,EAAE;EAChB,CAAC;EACDC,KAAK,EAALA;AACF,CAAC","ignoreList":[]}