@amazon-devices/react-navigation__native 7.0.9000000000 → 8.0.9000000000-rn-83

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 (232) hide show
  1. package/SystemBundles/c0d77be093c9724f49566be215c67240e6443c16760f772a745108ddaef15503.bundle +9117 -0
  2. package/SystemBundles/c0d77be093c9724f49566be215c67240e6443c16760f772a745108ddaef15503.map +3543 -0
  3. package/SystemModules/amzn__react-navigation__native-8.modules.txt +24 -0
  4. package/SystemModules/amzn__react-navigation__native-8.private.modules.txt +77 -0
  5. package/SystemModules/keplerscript-system-bundle-config.json +4 -4
  6. package/kepler-compatibility.json +2 -2
  7. package/lib/module/Link.js +31 -10
  8. package/lib/module/Link.js.map +1 -1
  9. package/lib/module/LinkingContext.js +7 -3
  10. package/lib/module/LinkingContext.js.map +1 -1
  11. package/lib/module/LocaleDirContext.js +6 -0
  12. package/lib/module/LocaleDirContext.js.map +1 -0
  13. package/lib/module/NavigationContainer.js +87 -59
  14. package/lib/module/NavigationContainer.js.map +1 -1
  15. package/lib/module/ServerContainer.js +20 -10
  16. package/lib/module/ServerContainer.js.map +1 -1
  17. package/lib/module/ServerContext.js +3 -2
  18. package/lib/module/ServerContext.js.map +1 -1
  19. package/lib/module/UnhandledLinkingContext.js +14 -0
  20. package/lib/module/UnhandledLinkingContext.js.map +1 -0
  21. package/lib/module/__stubs__/createStackNavigator.js +18 -0
  22. package/lib/module/__stubs__/createStackNavigator.js.map +1 -0
  23. package/lib/module/__stubs__/window.js +75 -0
  24. package/lib/module/__stubs__/window.js.map +1 -0
  25. package/lib/module/createMemoryHistory.js +19 -17
  26. package/lib/module/createMemoryHistory.js.map +1 -1
  27. package/lib/module/createStaticNavigation.js +54 -0
  28. package/lib/module/createStaticNavigation.js.map +1 -0
  29. package/lib/module/extractPathFromURL.js +6 -5
  30. package/lib/module/extractPathFromURL.js.map +1 -1
  31. package/lib/module/index.js +18 -13
  32. package/lib/module/index.js.map +1 -1
  33. package/lib/module/package.json +1 -0
  34. package/lib/module/theming/DarkTheme.js +6 -3
  35. package/lib/module/theming/DarkTheme.js.map +1 -1
  36. package/lib/module/theming/DefaultTheme.js +6 -3
  37. package/lib/module/theming/DefaultTheme.js.map +1 -1
  38. package/lib/module/theming/fonts.js +61 -0
  39. package/lib/module/theming/fonts.js.map +1 -0
  40. package/lib/module/types.js +2 -0
  41. package/lib/module/types.js.map +1 -1
  42. package/lib/module/useBackButton.js +3 -1
  43. package/lib/module/useBackButton.js.map +1 -1
  44. package/lib/module/useBackButton.native.js +3 -1
  45. package/lib/module/useBackButton.native.js.map +1 -1
  46. package/lib/module/useDocumentTitle.js +6 -4
  47. package/lib/module/useDocumentTitle.js.map +1 -1
  48. package/lib/module/useDocumentTitle.native.js +4 -2
  49. package/lib/module/useDocumentTitle.native.js.map +1 -1
  50. package/lib/module/useLinkBuilder.js +71 -40
  51. package/lib/module/useLinkBuilder.js.map +1 -1
  52. package/lib/module/useLinkProps.js +41 -36
  53. package/lib/module/useLinkProps.js.map +1 -1
  54. package/lib/module/useLinkTo.js +18 -28
  55. package/lib/module/useLinkTo.js.map +1 -1
  56. package/lib/module/useLinking.js +47 -19
  57. package/lib/module/useLinking.js.map +1 -1
  58. package/lib/module/useLinking.native.js +33 -28
  59. package/lib/module/useLinking.native.js.map +1 -1
  60. package/lib/module/useLocale.js +18 -0
  61. package/lib/module/useLocale.js.map +1 -0
  62. package/lib/module/useRoutePath.js +30 -0
  63. package/lib/module/useRoutePath.js.map +1 -0
  64. package/lib/module/useScrollToTop.js +11 -7
  65. package/lib/module/useScrollToTop.js.map +1 -1
  66. package/lib/module/useThenable.js +4 -1
  67. package/lib/module/useThenable.js.map +1 -1
  68. package/lib/typescript/package.json +1 -0
  69. package/lib/typescript/src/Link.d.ts +8 -10
  70. package/lib/typescript/src/Link.d.ts.map +1 -1
  71. package/lib/typescript/src/LinkingContext.d.ts +2 -3
  72. package/lib/typescript/src/LinkingContext.d.ts.map +1 -1
  73. package/lib/typescript/src/LocaleDirContext.d.ts +4 -0
  74. package/lib/typescript/src/LocaleDirContext.d.ts.map +1 -0
  75. package/lib/typescript/src/NavigationContainer.d.ts +36 -13
  76. package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
  77. package/lib/typescript/src/ServerContainer.d.ts +2 -3
  78. package/lib/typescript/src/ServerContainer.d.ts.map +1 -1
  79. package/lib/typescript/src/ServerContext.d.ts +1 -2
  80. package/lib/typescript/src/ServerContext.d.ts.map +1 -1
  81. package/lib/typescript/src/UnhandledLinkingContext.d.ts +6 -0
  82. package/lib/typescript/src/UnhandledLinkingContext.d.ts.map +1 -0
  83. package/lib/typescript/src/__stubs__/createStackNavigator.d.ts +13 -0
  84. package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -0
  85. package/lib/typescript/src/{__mocks__ → __stubs__}/window.d.ts +5 -6
  86. package/lib/typescript/src/__stubs__/window.d.ts.map +1 -0
  87. package/lib/typescript/src/createMemoryHistory.d.ts +1 -1
  88. package/lib/typescript/src/createMemoryHistory.d.ts.map +1 -1
  89. package/lib/typescript/src/createStaticNavigation.d.ts +34 -0
  90. package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -0
  91. package/lib/typescript/src/extractPathFromURL.d.ts +1 -1
  92. package/lib/typescript/src/extractPathFromURL.d.ts.map +1 -1
  93. package/lib/typescript/src/index.d.ts +15 -12
  94. package/lib/typescript/src/index.d.ts.map +1 -1
  95. package/lib/typescript/src/theming/DarkTheme.d.ts +1 -2
  96. package/lib/typescript/src/theming/DarkTheme.d.ts.map +1 -1
  97. package/lib/typescript/src/theming/DefaultTheme.d.ts +1 -2
  98. package/lib/typescript/src/theming/DefaultTheme.d.ts.map +1 -1
  99. package/lib/typescript/src/theming/fonts.d.ts +53 -0
  100. package/lib/typescript/src/theming/fonts.d.ts.map +1 -0
  101. package/lib/typescript/src/types.d.ts +35 -3
  102. package/lib/typescript/src/types.d.ts.map +1 -1
  103. package/lib/typescript/src/useBackButton.d.ts +1 -2
  104. package/lib/typescript/src/useBackButton.d.ts.map +1 -1
  105. package/lib/typescript/src/useBackButton.native.d.ts +1 -1
  106. package/lib/typescript/src/useBackButton.native.d.ts.map +1 -1
  107. package/lib/typescript/src/useDocumentTitle.d.ts +1 -1
  108. package/lib/typescript/src/useDocumentTitle.d.ts.map +1 -1
  109. package/lib/typescript/src/useDocumentTitle.native.d.ts +1 -1
  110. package/lib/typescript/src/useDocumentTitle.native.d.ts.map +1 -1
  111. package/lib/typescript/src/useLinkBuilder.d.ts +97 -3
  112. package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -1
  113. package/lib/typescript/src/useLinkProps.d.ts +23 -10
  114. package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
  115. package/lib/typescript/src/useLinkTo.d.ts +6 -8
  116. package/lib/typescript/src/useLinkTo.d.ts.map +1 -1
  117. package/lib/typescript/src/useLinking.d.ts +5 -46
  118. package/lib/typescript/src/useLinking.d.ts.map +1 -1
  119. package/lib/typescript/src/useLinking.native.d.ts +11 -29
  120. package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
  121. package/lib/typescript/src/useLocale.d.ts +7 -0
  122. package/lib/typescript/src/useLocale.d.ts.map +1 -0
  123. package/lib/typescript/src/useRoutePath.d.ts +7 -0
  124. package/lib/typescript/src/useRoutePath.d.ts.map +1 -0
  125. package/lib/typescript/src/useScrollToTop.d.ts +2 -2
  126. package/lib/typescript/src/useScrollToTop.d.ts.map +1 -1
  127. package/lib/typescript/src/useThenable.d.ts +1 -1
  128. package/lib/typescript/src/useThenable.d.ts.map +1 -1
  129. package/oss-attribution/attribution.txt +50 -0
  130. package/oss-attribution/licenseInfos.json +18 -0
  131. package/package.json +97 -1
  132. package/src/Link.tsx +36 -20
  133. package/src/LinkingContext.tsx +9 -5
  134. package/src/LocaleDirContext.tsx +7 -0
  135. package/src/NavigationContainer.tsx +128 -69
  136. package/src/ServerContainer.tsx +4 -3
  137. package/src/ServerContext.tsx +1 -3
  138. package/src/UnhandledLinkingContext.tsx +18 -0
  139. package/src/__stubs__/createStackNavigator.tsx +46 -0
  140. package/src/{__mocks__ → __stubs__}/window.tsx +8 -8
  141. package/src/createMemoryHistory.tsx +16 -11
  142. package/src/createStaticNavigation.tsx +109 -0
  143. package/src/extractPathFromURL.tsx +3 -3
  144. package/src/index.tsx +15 -12
  145. package/src/theming/DarkTheme.tsx +3 -3
  146. package/src/theming/DefaultTheme.tsx +3 -3
  147. package/src/theming/fonts.tsx +63 -0
  148. package/src/types.tsx +49 -3
  149. package/src/useBackButton.native.tsx +2 -2
  150. package/src/useBackButton.tsx +2 -2
  151. package/src/useDocumentTitle.native.tsx +2 -2
  152. package/src/useDocumentTitle.tsx +2 -2
  153. package/src/useLinkBuilder.tsx +100 -55
  154. package/src/useLinkProps.tsx +80 -50
  155. package/src/useLinkTo.tsx +13 -53
  156. package/src/useLinking.native.tsx +33 -31
  157. package/src/useLinking.tsx +70 -23
  158. package/src/useLocale.tsx +18 -0
  159. package/src/useRoutePath.tsx +34 -0
  160. package/src/useScrollToTop.tsx +16 -12
  161. package/src/useThenable.tsx +2 -1
  162. package/SystemBundles/41869b563992545ca95a9a2f729e958cbdcada7391919e8e02112d791754072a.bundle +0 -14508
  163. package/SystemBundles/41869b563992545ca95a9a2f729e958cbdcada7391919e8e02112d791754072a.map +0 -5157
  164. package/SystemModules/amzn__react-navigation__native-7.modules.txt +0 -76
  165. package/SystemModules/amzn__react-navigation__native-7.private.modules.txt +0 -100
  166. package/THIRD_PARTY_NOTICES.txt +0 -24
  167. package/lib/commonjs/Link.js +0 -50
  168. package/lib/commonjs/Link.js.map +0 -1
  169. package/lib/commonjs/LinkingContext.js +0 -15
  170. package/lib/commonjs/LinkingContext.js.map +0 -1
  171. package/lib/commonjs/NavigationContainer.js +0 -109
  172. package/lib/commonjs/NavigationContainer.js.map +0 -1
  173. package/lib/commonjs/ServerContainer.js +0 -54
  174. package/lib/commonjs/ServerContainer.js.map +0 -1
  175. package/lib/commonjs/ServerContext.js +0 -12
  176. package/lib/commonjs/ServerContext.js.map +0 -1
  177. package/lib/commonjs/createMemoryHistory.js +0 -220
  178. package/lib/commonjs/createMemoryHistory.js.map +0 -1
  179. package/lib/commonjs/extractPathFromURL.js +0 -25
  180. package/lib/commonjs/extractPathFromURL.js.map +0 -1
  181. package/lib/commonjs/index.js +0 -129
  182. package/lib/commonjs/index.js.map +0 -1
  183. package/lib/commonjs/theming/DarkTheme.js +0 -19
  184. package/lib/commonjs/theming/DarkTheme.js.map +0 -1
  185. package/lib/commonjs/theming/DefaultTheme.js +0 -19
  186. package/lib/commonjs/theming/DefaultTheme.js.map +0 -1
  187. package/lib/commonjs/theming/ThemeContext.js +0 -15
  188. package/lib/commonjs/theming/ThemeContext.js.map +0 -1
  189. package/lib/commonjs/theming/ThemeProvider.js +0 -20
  190. package/lib/commonjs/theming/ThemeProvider.js.map +0 -1
  191. package/lib/commonjs/theming/useTheme.js +0 -16
  192. package/lib/commonjs/theming/useTheme.js.map +0 -1
  193. package/lib/commonjs/types.js +0 -6
  194. package/lib/commonjs/types.js.map +0 -1
  195. package/lib/commonjs/useBackButton.js +0 -11
  196. package/lib/commonjs/useBackButton.js.map +0 -1
  197. package/lib/commonjs/useBackButton.native.js +0 -27
  198. package/lib/commonjs/useBackButton.native.js.map +0 -1
  199. package/lib/commonjs/useDocumentTitle.js +0 -32
  200. package/lib/commonjs/useDocumentTitle.js.map +0 -1
  201. package/lib/commonjs/useDocumentTitle.native.js +0 -10
  202. package/lib/commonjs/useDocumentTitle.native.js.map +0 -1
  203. package/lib/commonjs/useLinkBuilder.js +0 -63
  204. package/lib/commonjs/useLinkBuilder.js.map +0 -1
  205. package/lib/commonjs/useLinkProps.js +0 -97
  206. package/lib/commonjs/useLinkProps.js.map +0 -1
  207. package/lib/commonjs/useLinkTo.js +0 -45
  208. package/lib/commonjs/useLinkTo.js.map +0 -1
  209. package/lib/commonjs/useLinking.js +0 -303
  210. package/lib/commonjs/useLinking.js.map +0 -1
  211. package/lib/commonjs/useLinking.native.js +0 -152
  212. package/lib/commonjs/useLinking.native.js.map +0 -1
  213. package/lib/commonjs/useScrollToTop.js +0 -95
  214. package/lib/commonjs/useScrollToTop.js.map +0 -1
  215. package/lib/commonjs/useThenable.js +0 -41
  216. package/lib/commonjs/useThenable.js.map +0 -1
  217. package/lib/module/theming/ThemeContext.js +0 -6
  218. package/lib/module/theming/ThemeContext.js.map +0 -1
  219. package/lib/module/theming/ThemeProvider.js +0 -11
  220. package/lib/module/theming/ThemeProvider.js.map +0 -1
  221. package/lib/module/theming/useTheme.js +0 -7
  222. package/lib/module/theming/useTheme.js.map +0 -1
  223. package/lib/typescript/src/__mocks__/window.d.ts.map +0 -1
  224. package/lib/typescript/src/theming/ThemeContext.d.ts +0 -5
  225. package/lib/typescript/src/theming/ThemeContext.d.ts.map +0 -1
  226. package/lib/typescript/src/theming/ThemeProvider.d.ts +0 -9
  227. package/lib/typescript/src/theming/ThemeProvider.d.ts.map +0 -1
  228. package/lib/typescript/src/theming/useTheme.d.ts +0 -2
  229. package/lib/typescript/src/theming/useTheme.d.ts.map +0 -1
  230. package/src/theming/ThemeContext.tsx +0 -10
  231. package/src/theming/ThemeProvider.tsx +0 -15
  232. package/src/theming/useTheme.tsx +0 -9
@@ -1,220 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = 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
- var _window$history$state;
27
- // We store an id in the state instead of an index
28
- // Index could get out of sync with in-memory values if page reloads
29
- const id = (_window$history$state = window.history.state) === null || _window$history$state === void 0 ? void 0 : _window$history$state.id;
30
- if (id) {
31
- const index = items.findIndex(item => item.id === id);
32
- return index > -1 ? index : 0;
33
- }
34
- return 0;
35
- },
36
- get(index) {
37
- return items[index];
38
- },
39
- backIndex({
40
- path
41
- }) {
42
- // We need to find the index from the element before current to get closest path to go back to
43
- for (let i = index - 1; i >= 0; i--) {
44
- const item = items[i];
45
- if (item.path === path) {
46
- return i;
47
- }
48
- }
49
- return -1;
50
- },
51
- push({
52
- path,
53
- state
54
- }) {
55
- interrupt();
56
- const id = (0, _nonSecure.nanoid)();
57
-
58
- // When a new entry is pushed, all the existing entries after index will be inaccessible
59
- // So we remove any existing entries after the current index to clean them up
60
- items = items.slice(0, index + 1);
61
- items.push({
62
- path,
63
- state,
64
- id
65
- });
66
- index = items.length - 1;
67
-
68
- // We pass empty string for title because it's ignored in all browsers except safari
69
- // We don't store state object in history.state because:
70
- // - browsers have limits on how big it can be, and we don't control the size
71
- // - while not recommended, there could be non-serializable data in state
72
- window.history.pushState({
73
- id
74
- }, '', path);
75
- },
76
- replace({
77
- path,
78
- state
79
- }) {
80
- var _window$history$state2;
81
- interrupt();
82
- const id = ((_window$history$state2 = window.history.state) === null || _window$history$state2 === void 0 ? void 0 : _window$history$state2.id) ?? (0, _nonSecure.nanoid)();
83
-
84
- // Need to keep the hash part of the path if there was no previous history entry
85
- // or the previous history entry had the same path
86
- let pathWithHash = path;
87
- if (!items.length || items.findIndex(item => item.id === id) < 0) {
88
- // There are two scenarios for creating an array with only one history record:
89
- // - When loaded id not found in the items array, this function by default will replace
90
- // the first item. We need to keep only the new updated object, otherwise it will break
91
- // the page when navigating forward in history.
92
- // - This is the first time any state modifications are done
93
- // So we need to push the entry as there's nothing to replace
94
- pathWithHash = pathWithHash + location.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 + location.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
- var _window$history$state3;
189
- const id = (_window$history$state3 = window.history.state) === null || _window$history$state3 === void 0 ? void 0 : _window$history$state3.id;
190
- const currentIndex = items.findIndex(item => item.id === id);
191
-
192
- // Fix createMemoryHistory.index variable's value
193
- // as it may go out of sync when navigating in the browser.
194
- index = Math.max(currentIndex, 0);
195
- const last = pending.pop();
196
- window.removeEventListener('popstate', onPopState);
197
- last === null || last === void 0 || last.cb();
198
- };
199
- window.addEventListener('popstate', onPopState);
200
- window.history.go(n);
201
- });
202
- },
203
- // The `popstate` event is triggered when history changes, except `pushState` and `replaceState`
204
- // If we call `history.go(n)` ourselves, we don't want it to trigger the listener
205
- // Here we normalize it so that only external changes (e.g. user pressing back/forward) trigger the listener
206
- listen(listener) {
207
- const onPopState = () => {
208
- if (pending.length) {
209
- // This was triggered by `history.go(n)`, we shouldn't call the listener
210
- return;
211
- }
212
- listener();
213
- };
214
- window.addEventListener('popstate', onPopState);
215
- return () => window.removeEventListener('popstate', onPopState);
216
- }
217
- };
218
- return history;
219
- }
220
- //# sourceMappingURL=createMemoryHistory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_nonSecure","require","createMemoryHistory","index","items","pending","interrupt","forEach","it","cb","history","_window$history$state","id","window","state","findIndex","item","get","backIndex","path","i","push","nanoid","slice","length","pushState","replace","_window$history$state2","pathWithHash","location","hash","replaceState","go","n","nextIndex","lastItemIndex","Promise","resolve","reject","done","interrupted","clearTimeout","timer","Error","title","document","ref","setTimeout","splice","onPopState","_window$history$state3","currentIndex","Math","max","last","pop","removeEventListener","addEventListener","listen","listener"],"sourceRoot":"../../src","sources":["createMemoryHistory.tsx"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAWe,SAASC,mBAAmBA,CAAA,EAAG;EAC5C,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;MAAA,IAAAQ,qBAAA;MAClB;MACA;MACA,MAAMC,EAAE,IAAAD,qBAAA,GAAGE,MAAM,CAACH,OAAO,CAACI,KAAK,cAAAH,qBAAA,uBAApBA,qBAAA,CAAsBC,EAAE;MAEnC,IAAIA,EAAE,EAAE;QACN,MAAMT,KAAK,GAAGC,KAAK,CAACW,SAAS,CAAEC,IAAI,IAAKA,IAAI,CAACJ,EAAE,KAAKA,EAAE,CAAC;QAEvD,OAAOT,KAAK,GAAG,CAAC,CAAC,GAAGA,KAAK,GAAG,CAAC;MAC/B;MAEA,OAAO,CAAC;IACV,CAAC;IAEDc,GAAGA,CAACd,KAAa,EAAE;MACjB,OAAOC,KAAK,CAACD,KAAK,CAAC;IACrB,CAAC;IAEDe,SAASA,CAAC;MAA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GAAG,CAACF,YAAY,EAAE,CAAC,CAAC;UAEjC,MAAMG,IAAI,GAAGjD,OAAO,CAACkD,GAAG,CAAC,CAAC;UAE1B1C,MAAM,CAAC2C,mBAAmB,CAAC,UAAU,EAAEP,UAAU,CAAC;UAClDK,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAE7C,EAAE,CAAC,CAAC;QACZ,CAAC;QAEDI,MAAM,CAAC4C,gBAAgB,CAAC,UAAU,EAAER,UAAU,CAAC;QAC/CpC,MAAM,CAACH,OAAO,CAACsB,EAAE,CAACC,CAAC,CAAC;MACtB,CAAC,CAAC;IACJ,CAAC;IAED;IACA;IACA;IACAyB,MAAMA,CAACC,QAAoB,EAAE;MAC3B,MAAMV,UAAU,GAAGA,CAAA,KAAM;QACvB,IAAI5C,OAAO,CAACmB,MAAM,EAAE;UAClB;UACA;QACF;QAEAmC,QAAQ,CAAC,CAAC;MACZ,CAAC;MAED9C,MAAM,CAAC4C,gBAAgB,CAAC,UAAU,EAAER,UAAU,CAAC;MAE/C,OAAO,MAAMpC,MAAM,CAAC2C,mBAAmB,CAAC,UAAU,EAAEP,UAAU,CAAC;IACjE;EACF,CAAC;EAED,OAAOvC,OAAO;AAChB","ignoreList":[]}
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = 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
- var _prefix$match;
12
- const protocol = ((_prefix$match = prefix.match(/^[^:]+:/)) === null || _prefix$match === void 0 ? void 0 : _prefix$match[0]) ?? '';
13
- const host = prefix.replace(new RegExp(`^${(0, _escapeStringRegexp.default)(protocol)}`), '').replace(/\/+/g, '/') // Replace multiple slash (//) with single ones
14
- .replace(/^\//, ''); // Remove extra leading slash
15
-
16
- const prefixRegex = new RegExp(`^${(0, _escapeStringRegexp.default)(protocol)}(/)*${host.split('.').map(it => it === '*' ? '[^/]+' : (0, _escapeStringRegexp.default)(it)).join('\\.')}`);
17
- const [originAndPath, searchParams] = url.split('?');
18
- const normalizedURL = originAndPath.replace(/\/+/g, '/').concat(searchParams ? `?${searchParams}` : '');
19
- if (prefixRegex.test(normalizedURL)) {
20
- return normalizedURL.replace(prefixRegex, '');
21
- }
22
- }
23
- return undefined;
24
- }
25
- //# sourceMappingURL=extractPathFromURL.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_escapeStringRegexp","_interopRequireDefault","require","e","__esModule","default","extractPathFromURL","prefixes","url","prefix","_prefix$match","protocol","match","host","replace","RegExp","escapeStringRegexp","prefixRegex","split","map","it","join","originAndPath","searchParams","normalizedURL","concat","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;AAEvC,SAASG,kBAAkBA,CAACC,QAAkB,EAAEC,GAAW,EAAE;EAC1E,KAAK,MAAMC,MAAM,IAAIF,QAAQ,EAAE;IAAA,IAAAG,aAAA;IAC7B,MAAMC,QAAQ,GAAG,EAAAD,aAAA,GAAAD,MAAM,CAACG,KAAK,CAAC,SAAS,CAAC,cAAAF,aAAA,uBAAvBA,aAAA,CAA0B,CAAC,CAAC,KAAI,EAAE;IACnD,MAAMG,IAAI,GAAGJ,MAAM,CAChBK,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,EAAEC,YAAY,CAAC,GAAGf,GAAG,CAACU,KAAK,CAAC,GAAG,CAAC;IACpD,MAAMM,aAAa,GAAGF,aAAa,CAChCR,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACpBW,MAAM,CAACF,YAAY,GAAG,IAAIA,YAAY,EAAE,GAAG,EAAE,CAAC;IAEjD,IAAIN,WAAW,CAACS,IAAI,CAACF,aAAa,CAAC,EAAE;MACnC,OAAOA,aAAa,CAACV,OAAO,CAACG,WAAW,EAAE,EAAE,CAAC;IAC/C;EACF;EAEA,OAAOU,SAAS;AAClB","ignoreList":[]}
@@ -1,129 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {
7
- Link: true,
8
- LinkingContext: true,
9
- NavigationContainer: true,
10
- ServerContainer: true,
11
- DarkTheme: true,
12
- DefaultTheme: true,
13
- ThemeProvider: true,
14
- useTheme: true,
15
- useLinkBuilder: true,
16
- useLinkProps: true,
17
- useLinkTo: true,
18
- useScrollToTop: true
19
- };
20
- Object.defineProperty(exports, "DarkTheme", {
21
- enumerable: true,
22
- get: function () {
23
- return _DarkTheme.default;
24
- }
25
- });
26
- Object.defineProperty(exports, "DefaultTheme", {
27
- enumerable: true,
28
- get: function () {
29
- return _DefaultTheme.default;
30
- }
31
- });
32
- Object.defineProperty(exports, "Link", {
33
- enumerable: true,
34
- get: function () {
35
- return _Link.default;
36
- }
37
- });
38
- Object.defineProperty(exports, "LinkingContext", {
39
- enumerable: true,
40
- get: function () {
41
- return _LinkingContext.default;
42
- }
43
- });
44
- Object.defineProperty(exports, "NavigationContainer", {
45
- enumerable: true,
46
- get: function () {
47
- return _NavigationContainer.default;
48
- }
49
- });
50
- Object.defineProperty(exports, "ServerContainer", {
51
- enumerable: true,
52
- get: function () {
53
- return _ServerContainer.default;
54
- }
55
- });
56
- Object.defineProperty(exports, "ThemeProvider", {
57
- enumerable: true,
58
- get: function () {
59
- return _ThemeProvider.default;
60
- }
61
- });
62
- Object.defineProperty(exports, "useLinkBuilder", {
63
- enumerable: true,
64
- get: function () {
65
- return _useLinkBuilder.default;
66
- }
67
- });
68
- Object.defineProperty(exports, "useLinkProps", {
69
- enumerable: true,
70
- get: function () {
71
- return _useLinkProps.default;
72
- }
73
- });
74
- Object.defineProperty(exports, "useLinkTo", {
75
- enumerable: true,
76
- get: function () {
77
- return _useLinkTo.default;
78
- }
79
- });
80
- Object.defineProperty(exports, "useScrollToTop", {
81
- enumerable: true,
82
- get: function () {
83
- return _useScrollToTop.default;
84
- }
85
- });
86
- Object.defineProperty(exports, "useTheme", {
87
- enumerable: true,
88
- get: function () {
89
- return _useTheme.default;
90
- }
91
- });
92
- var _Link = _interopRequireDefault(require("./Link"));
93
- var _LinkingContext = _interopRequireDefault(require("./LinkingContext"));
94
- var _NavigationContainer = _interopRequireDefault(require("./NavigationContainer"));
95
- var _ServerContainer = _interopRequireDefault(require("./ServerContainer"));
96
- var _DarkTheme = _interopRequireDefault(require("./theming/DarkTheme"));
97
- var _DefaultTheme = _interopRequireDefault(require("./theming/DefaultTheme"));
98
- var _ThemeProvider = _interopRequireDefault(require("./theming/ThemeProvider"));
99
- var _useTheme = _interopRequireDefault(require("./theming/useTheme"));
100
- var _types = require("./types");
101
- Object.keys(_types).forEach(function (key) {
102
- if (key === "default" || key === "__esModule") return;
103
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
104
- if (key in exports && exports[key] === _types[key]) return;
105
- Object.defineProperty(exports, key, {
106
- enumerable: true,
107
- get: function () {
108
- return _types[key];
109
- }
110
- });
111
- });
112
- var _useLinkBuilder = _interopRequireDefault(require("./useLinkBuilder"));
113
- var _useLinkProps = _interopRequireDefault(require("./useLinkProps"));
114
- var _useLinkTo = _interopRequireDefault(require("./useLinkTo"));
115
- var _useScrollToTop = _interopRequireDefault(require("./useScrollToTop"));
116
- var _reactNavigation__core = require("@amazon-devices/react-navigation__core");
117
- Object.keys(_reactNavigation__core).forEach(function (key) {
118
- if (key === "default" || key === "__esModule") return;
119
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
120
- if (key in exports && exports[key] === _reactNavigation__core[key]) return;
121
- Object.defineProperty(exports, key, {
122
- enumerable: true,
123
- get: function () {
124
- return _reactNavigation__core[key];
125
- }
126
- });
127
- });
128
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
129
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_Link","_interopRequireDefault","require","_LinkingContext","_NavigationContainer","_ServerContainer","_DarkTheme","_DefaultTheme","_ThemeProvider","_useTheme","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_useLinkBuilder","_useLinkProps","_useLinkTo","_useScrollToTop","_reactNavigation__core","e","__esModule","default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,oBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,gBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,aAAA,G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A2B,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- const DarkTheme = {
8
- dark: true,
9
- colors: {
10
- primary: 'rgb(10, 132, 255)',
11
- background: 'rgb(1, 1, 1)',
12
- card: 'rgb(18, 18, 18)',
13
- text: 'rgb(229, 229, 231)',
14
- border: 'rgb(39, 39, 41)',
15
- notification: 'rgb(255, 69, 58)'
16
- }
17
- };
18
- var _default = exports.default = DarkTheme;
19
- //# sourceMappingURL=DarkTheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["DarkTheme","dark","colors","primary","background","card","text","border","notification","_default","exports","default"],"sourceRoot":"../../../src","sources":["theming/DarkTheme.tsx"],"mappings":";;;;;;AAEA,MAAMA,SAAgB,GAAG;EACvBC,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;AACF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaX,SAAS","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- const DefaultTheme = {
8
- dark: false,
9
- colors: {
10
- primary: 'rgb(0, 122, 255)',
11
- background: 'rgb(242, 242, 242)',
12
- card: 'rgb(255, 255, 255)',
13
- text: 'rgb(28, 28, 30)',
14
- border: 'rgb(216, 216, 216)',
15
- notification: 'rgb(255, 59, 48)'
16
- }
17
- };
18
- var _default = exports.default = DefaultTheme;
19
- //# sourceMappingURL=DefaultTheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["DefaultTheme","dark","colors","primary","background","card","text","border","notification","_default","exports","default"],"sourceRoot":"../../../src","sources":["theming/DefaultTheme.tsx"],"mappings":";;;;;;AAEA,MAAMA,YAAmB,GAAG;EAC1BC,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;AACF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaX,YAAY","ignoreList":[]}
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _DefaultTheme = _interopRequireDefault(require("./DefaultTheme"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- 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); }
11
- 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; }
12
- const ThemeContext = /*#__PURE__*/React.createContext(_DefaultTheme.default);
13
- ThemeContext.displayName = 'ThemeContext';
14
- var _default = exports.default = ThemeContext;
15
- //# sourceMappingURL=ThemeContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_DefaultTheme","_interopRequireDefault","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ThemeContext","createContext","DefaultTheme","displayName","_default","exports"],"sourceRoot":"../../../src","sources":["theming/ThemeContext.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA0C,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAe,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAd,CAAA,EAAAe,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAf,CAAA,CAAAe,CAAA,YAAAN,CAAA,CAAAP,OAAA,GAAAF,CAAA,EAAAM,CAAA,IAAAA,CAAA,CAAAa,GAAA,CAAAnB,CAAA,EAAAS,CAAA,GAAAA,CAAA;AAE1C,MAAMW,YAAY,gBAAGzB,KAAK,CAAC0B,aAAa,CAAQC,qBAAY,CAAC;AAE7DF,YAAY,CAACG,WAAW,GAAG,cAAc;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAvB,OAAA,GAE3BkB,YAAY","ignoreList":[]}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = ThemeProvider;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _ThemeContext = _interopRequireDefault(require("./ThemeContext"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- 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); }
11
- 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; }
12
- function ThemeProvider({
13
- value,
14
- children
15
- }) {
16
- return /*#__PURE__*/React.createElement(_ThemeContext.default.Provider, {
17
- value: value
18
- }, children);
19
- }
20
- //# sourceMappingURL=ThemeProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_ThemeContext","_interopRequireDefault","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ThemeProvider","value","children","createElement","Provider"],"sourceRoot":"../../../src","sources":["theming/ThemeProvider.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA0C,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAe,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAd,CAAA,EAAAe,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAf,CAAA,CAAAe,CAAA,YAAAN,CAAA,CAAAP,OAAA,GAAAF,CAAA,EAAAM,CAAA,IAAAA,CAAA,CAAAa,GAAA,CAAAnB,CAAA,EAAAS,CAAA,GAAAA,CAAA;AAO3B,SAASW,aAAaA,CAAC;EAAEC,KAAK;EAAEC;AAAgB,CAAC,EAAE;EAChE,oBACE3B,KAAA,CAAA4B,aAAA,CAACzB,aAAA,CAAAI,OAAY,CAACsB,QAAQ;IAACH,KAAK,EAAEA;EAAM,GAAEC,QAAgC,CAAC;AAE3E","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = useTheme;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _ThemeContext = _interopRequireDefault(require("./ThemeContext"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- 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); }
11
- 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; }
12
- function useTheme() {
13
- const theme = React.useContext(_ThemeContext.default);
14
- return theme;
15
- }
16
- //# sourceMappingURL=useTheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_ThemeContext","_interopRequireDefault","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useTheme","theme","useContext","ThemeContext"],"sourceRoot":"../../../src","sources":["theming/useTheme.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA0C,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAe,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAd,CAAA,EAAAe,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAf,CAAA,CAAAe,CAAA,YAAAN,CAAA,CAAAP,OAAA,GAAAF,CAAA,EAAAM,CAAA,IAAAA,CAAA,CAAAa,GAAA,CAAAnB,CAAA,EAAAS,CAAA,GAAAA,CAAA;AAE3B,SAASW,QAAQA,CAAA,EAAG;EACjC,MAAMC,KAAK,GAAG1B,KAAK,CAAC2B,UAAU,CAACC,qBAAY,CAAC;EAE5C,OAAOF,KAAK;AACd","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":"","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = useBackButton;
7
- function useBackButton(_) {
8
- // No-op
9
- // BackHandler is not available on web
10
- }
11
- //# sourceMappingURL=useBackButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useBackButton","_"],"sourceRoot":"../../src","sources":["useBackButton.tsx"],"mappings":";;;;;;AAKe,SAASA,aAAaA,CACnCC,CAAyD,EACzD;EACA;EACA;AAAA","ignoreList":[]}
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = useBackButton;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- 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); }
10
- 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; }
11
- function useBackButton(ref) {
12
- React.useEffect(() => {
13
- const subscription = _reactNative.BackHandler.addEventListener('hardwareBackPress', () => {
14
- const navigation = ref.current;
15
- if (navigation == null) {
16
- return false;
17
- }
18
- if (navigation.canGoBack()) {
19
- navigation.goBack();
20
- return true;
21
- }
22
- return false;
23
- });
24
- return () => subscription.remove();
25
- }, [ref]);
26
- }
27
- //# sourceMappingURL=useBackButton.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useBackButton","ref","useEffect","subscription","BackHandler","addEventListener","navigation","current","canGoBack","goBack","remove"],"sourceRoot":"../../src","sources":["useBackButton.native.tsx"],"mappings":";;;;;;AAIA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA2C,SAAAE,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,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CAAC;EACpC,CAAC,EAAE,CAACT,GAAG,CAAC,CAAC;AACX","ignoreList":[]}
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = useDocumentTitle;
7
- var React = _interopRequireWildcard(require("react"));
8
- 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); }
9
- 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; }
10
- /**
11
- * Set the document title for the active screen
12
- */
13
- function useDocumentTitle(ref, {
14
- enabled = true,
15
- formatter = (options, route) => (options === null || options === void 0 ? void 0 : options.title) ?? (route === null || route === void 0 ? void 0 : route.name)
16
- } = {}) {
17
- React.useEffect(() => {
18
- if (!enabled) {
19
- return;
20
- }
21
- const navigation = ref.current;
22
- if (navigation) {
23
- const title = formatter(navigation.getCurrentOptions(), navigation.getCurrentRoute());
24
- document.title = title;
25
- }
26
- return navigation === null || navigation === void 0 ? void 0 : navigation.addListener('options', e => {
27
- const title = formatter(e.data.options, navigation === null || navigation === void 0 ? void 0 : navigation.getCurrentRoute());
28
- document.title = title;
29
- });
30
- });
31
- }
32
- //# sourceMappingURL=useDocumentTitle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useDocumentTitle","ref","enabled","formatter","options","route","title","name","useEffect","navigation","current","getCurrentOptions","getCurrentRoute","document","addListener","data"],"sourceRoot":"../../src","sources":["useDocumentTitle.tsx"],"mappings":";;;;;;AAIA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,SAAAC,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,SAAAH,wBAAAG,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,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAI/B;AACA;AACA;AACe,SAASW,gBAAgBA,CACtCC,GAA2D,EAC3D;EACEC,OAAO,GAAG,IAAI;EACdC,SAAS,GAAGA,CAACC,OAAO,EAAEC,KAAK,KAAK,CAAAD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,KAAK,MAAID,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEE,IAAI;AACzC,CAAC,GAAG,CAAC,CAAC,EAC5B;EACA9B,KAAK,CAAC+B,SAAS,CAAC,MAAM;IACpB,IAAI,CAACN,OAAO,EAAE;MACZ;IACF;IAEA,MAAMO,UAAU,GAAGR,GAAG,CAACS,OAAO;IAE9B,IAAID,UAAU,EAAE;MACd,MAAMH,KAAK,GAAGH,SAAS,CACrBM,UAAU,CAACE,iBAAiB,CAAC,CAAC,EAC9BF,UAAU,CAACG,eAAe,CAAC,CAC7B,CAAC;MAEDC,QAAQ,CAACP,KAAK,GAAGA,KAAK;IACxB;IAEA,OAAOG,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEK,WAAW,CAAC,SAAS,EAAGjC,CAAC,IAAK;MAC/C,MAAMyB,KAAK,GAAGH,SAAS,CAACtB,CAAC,CAACkC,IAAI,CAACX,OAAO,EAAEK,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEG,eAAe,CAAC,CAAC,CAAC;MAEtEC,QAAQ,CAACP,KAAK,GAAGA,KAAK;IACxB,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = useDocumentTitle;
7
- function useDocumentTitle() {
8
- // Noop for React Native
9
- }
10
- //# sourceMappingURL=useDocumentTitle.native.js.map