react-native-stallion 2.4.2 → 2.4.3-alpha.2

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 (234) hide show
  1. package/android/src/main/java/com/stallion/storage/StallionConfig.java +2 -10
  2. package/ios/main/StallionConfig.m +2 -6
  3. package/package.json +1 -1
  4. package/src/index.js +1 -0
  5. package/src/index.js.map +1 -1
  6. package/src/main/components/StallionDevMenu.js +69 -0
  7. package/src/main/components/StallionDevMenu.js.map +1 -0
  8. package/src/main/components/common/BackButton/index.js +19 -42
  9. package/src/main/components/common/BackButton/index.js.map +1 -1
  10. package/src/main/components/common/Chevron/index.js +64 -0
  11. package/src/main/components/common/Chevron/index.js.map +1 -0
  12. package/src/main/components/common/CrossButton/index.js +18 -11
  13. package/src/main/components/common/CrossButton/index.js.map +1 -1
  14. package/src/main/components/common/Header/index.js +3 -15
  15. package/src/main/components/common/Header/index.js.map +1 -1
  16. package/src/main/components/common/Header/styles.js +0 -22
  17. package/src/main/components/common/Header/styles.js.map +1 -1
  18. package/src/main/components/modules/devMenu/components/ActionButton.js +45 -0
  19. package/src/main/components/modules/devMenu/components/ActionButton.js.map +1 -0
  20. package/src/main/components/modules/devMenu/components/AppHeader.js +17 -0
  21. package/src/main/components/modules/devMenu/components/AppHeader.js.map +1 -0
  22. package/src/main/components/modules/devMenu/components/BucketRow.js +34 -0
  23. package/src/main/components/modules/devMenu/components/BucketRow.js.map +1 -0
  24. package/src/main/components/modules/devMenu/components/BundleHistoryCard.js +92 -0
  25. package/src/main/components/modules/devMenu/components/BundleHistoryCard.js.map +1 -0
  26. package/src/main/components/modules/devMenu/components/Chip.js +16 -0
  27. package/src/main/components/modules/devMenu/components/Chip.js.map +1 -0
  28. package/src/main/components/modules/devMenu/components/DetailHeader.js +32 -0
  29. package/src/main/components/modules/devMenu/components/DetailHeader.js.map +1 -0
  30. package/src/main/components/modules/devMenu/components/DeviceCard.js +31 -0
  31. package/src/main/components/modules/devMenu/components/DeviceCard.js.map +1 -0
  32. package/src/main/components/modules/devMenu/components/ErrorBanner.js +17 -0
  33. package/src/main/components/modules/devMenu/components/ErrorBanner.js.map +1 -0
  34. package/src/main/components/modules/devMenu/components/ModeToggle.js +54 -0
  35. package/src/main/components/modules/devMenu/components/ModeToggle.js.map +1 -0
  36. package/src/main/components/modules/devMenu/components/ProdBundleCard.js +47 -0
  37. package/src/main/components/modules/devMenu/components/ProdBundleCard.js.map +1 -0
  38. package/src/main/components/modules/devMenu/components/ReleaseNote.js +44 -0
  39. package/src/main/components/modules/devMenu/components/ReleaseNote.js.map +1 -0
  40. package/src/main/components/modules/devMenu/components/SectionLabel.js +13 -0
  41. package/src/main/components/modules/devMenu/components/SectionLabel.js.map +1 -0
  42. package/src/main/components/modules/devMenu/components/StateCard.js +30 -0
  43. package/src/main/components/modules/devMenu/components/StateCard.js.map +1 -0
  44. package/src/main/components/modules/devMenu/components/Wordmark.js +35 -0
  45. package/src/main/components/modules/devMenu/components/Wordmark.js.map +1 -0
  46. package/src/main/components/modules/devMenu/components/styles/index.js +403 -0
  47. package/src/main/components/modules/devMenu/components/styles/index.js.map +1 -0
  48. package/src/main/components/modules/devMenu/index.js +47 -0
  49. package/src/main/components/modules/devMenu/index.js.map +1 -0
  50. package/src/main/components/modules/devMenu/screens/BundleHistory.js +142 -0
  51. package/src/main/components/modules/devMenu/screens/BundleHistory.js.map +1 -0
  52. package/src/main/components/modules/devMenu/screens/Production.js +65 -0
  53. package/src/main/components/modules/devMenu/screens/Production.js.map +1 -0
  54. package/src/main/components/modules/devMenu/screens/TestingBuckets.js +81 -0
  55. package/src/main/components/modules/devMenu/screens/TestingBuckets.js.map +1 -0
  56. package/src/main/components/modules/devMenu/styles.js +50 -0
  57. package/src/main/components/modules/devMenu/styles.js.map +1 -0
  58. package/src/main/components/modules/modal/StallionModal.js +15 -51
  59. package/src/main/components/modules/modal/StallionModal.js.map +1 -1
  60. package/src/main/components/modules/modal/hooks/useStallionModal.js +21 -19
  61. package/src/main/components/modules/modal/hooks/useStallionModal.js.map +1 -1
  62. package/src/main/constants/appConstants.js +56 -53
  63. package/src/main/constants/appConstants.js.map +1 -1
  64. package/src/main/constants/colors.js +1 -10
  65. package/src/main/constants/colors.js.map +1 -1
  66. package/src/main/constants/designTokens.js +80 -0
  67. package/src/main/constants/designTokens.js.map +1 -0
  68. package/src/main/index.js +3 -1
  69. package/src/main/index.js.map +1 -1
  70. package/src/main/utils/useStallionConfig.js +2 -2
  71. package/src/main/utils/useStallionConfig.js.map +1 -1
  72. package/src/types/bundle.types.js +7 -0
  73. package/src/types/bundle.types.js.map +1 -1
  74. package/types/index.d.ts +1 -0
  75. package/types/index.d.ts.map +1 -1
  76. package/types/main/components/StallionDevMenu.d.ts +5 -0
  77. package/types/main/components/StallionDevMenu.d.ts.map +1 -0
  78. package/types/main/components/common/BackButton/index.d.ts +4 -3
  79. package/types/main/components/common/BackButton/index.d.ts.map +1 -1
  80. package/types/main/components/common/Chevron/index.d.ts +11 -0
  81. package/types/main/components/common/Chevron/index.d.ts.map +1 -0
  82. package/types/main/components/common/CrossButton/index.d.ts +4 -3
  83. package/types/main/components/common/CrossButton/index.d.ts.map +1 -1
  84. package/types/main/components/common/Header/index.d.ts +0 -2
  85. package/types/main/components/common/Header/index.d.ts.map +1 -1
  86. package/types/main/components/common/Header/styles.d.ts +0 -21
  87. package/types/main/components/common/Header/styles.d.ts.map +1 -1
  88. package/types/main/components/modules/devMenu/components/ActionButton.d.ts +19 -0
  89. package/types/main/components/modules/devMenu/components/ActionButton.d.ts.map +1 -0
  90. package/types/main/components/modules/devMenu/components/AppHeader.d.ts +7 -0
  91. package/types/main/components/modules/devMenu/components/AppHeader.d.ts.map +1 -0
  92. package/types/main/components/modules/devMenu/components/BucketRow.d.ts +11 -0
  93. package/types/main/components/modules/devMenu/components/BucketRow.d.ts.map +1 -0
  94. package/types/main/components/modules/devMenu/components/BundleHistoryCard.d.ts +22 -0
  95. package/types/main/components/modules/devMenu/components/BundleHistoryCard.d.ts.map +1 -0
  96. package/types/main/components/modules/devMenu/components/Chip.d.ts +9 -0
  97. package/types/main/components/modules/devMenu/components/Chip.d.ts.map +1 -0
  98. package/types/main/components/modules/devMenu/components/DetailHeader.d.ts +10 -0
  99. package/types/main/components/modules/devMenu/components/DetailHeader.d.ts.map +1 -0
  100. package/types/main/components/modules/devMenu/components/DeviceCard.d.ts +8 -0
  101. package/types/main/components/modules/devMenu/components/DeviceCard.d.ts.map +1 -0
  102. package/types/main/components/modules/devMenu/components/ErrorBanner.d.ts +6 -0
  103. package/types/main/components/modules/devMenu/components/ErrorBanner.d.ts.map +1 -0
  104. package/types/main/components/modules/devMenu/components/ModeToggle.d.ts +8 -0
  105. package/types/main/components/modules/devMenu/components/ModeToggle.d.ts.map +1 -0
  106. package/types/main/components/modules/devMenu/components/ProdBundleCard.d.ts +13 -0
  107. package/types/main/components/modules/devMenu/components/ProdBundleCard.d.ts.map +1 -0
  108. package/types/main/components/modules/devMenu/components/ReleaseNote.d.ts +11 -0
  109. package/types/main/components/modules/devMenu/components/ReleaseNote.d.ts.map +1 -0
  110. package/types/main/components/modules/devMenu/components/SectionLabel.d.ts +6 -0
  111. package/types/main/components/modules/devMenu/components/SectionLabel.d.ts.map +1 -0
  112. package/types/main/components/modules/devMenu/components/StateCard.d.ts +9 -0
  113. package/types/main/components/modules/devMenu/components/StateCard.d.ts.map +1 -0
  114. package/types/main/components/modules/{listing/index.d.ts → devMenu/components/Wordmark.d.ts} +1 -1
  115. package/types/main/components/modules/devMenu/components/Wordmark.d.ts.map +1 -0
  116. package/types/main/components/modules/devMenu/components/styles/index.d.ts +353 -0
  117. package/types/main/components/modules/devMenu/components/styles/index.d.ts.map +1 -0
  118. package/types/main/components/modules/devMenu/index.d.ts +14 -0
  119. package/types/main/components/modules/devMenu/index.d.ts.map +1 -0
  120. package/types/main/components/modules/devMenu/screens/BundleHistory.d.ts +4 -0
  121. package/types/main/components/modules/devMenu/screens/BundleHistory.d.ts.map +1 -0
  122. package/types/main/components/modules/devMenu/screens/Production.d.ts +4 -0
  123. package/types/main/components/modules/devMenu/screens/Production.d.ts.map +1 -0
  124. package/types/main/components/modules/devMenu/screens/TestingBuckets.d.ts +4 -0
  125. package/types/main/components/modules/devMenu/screens/TestingBuckets.d.ts.map +1 -0
  126. package/types/main/components/modules/devMenu/styles.d.ts +46 -0
  127. package/types/main/components/modules/devMenu/styles.d.ts.map +1 -0
  128. package/types/main/components/modules/modal/StallionModal.d.ts.map +1 -1
  129. package/types/main/components/modules/modal/hooks/useStallionModal.d.ts +5 -6
  130. package/types/main/components/modules/modal/hooks/useStallionModal.d.ts.map +1 -1
  131. package/types/main/constants/appConstants.d.ts +46 -48
  132. package/types/main/constants/appConstants.d.ts.map +1 -1
  133. package/types/main/constants/colors.d.ts +0 -9
  134. package/types/main/constants/colors.d.ts.map +1 -1
  135. package/types/main/constants/designTokens.d.ts +73 -0
  136. package/types/main/constants/designTokens.d.ts.map +1 -0
  137. package/types/main/index.d.ts +1 -0
  138. package/types/main/index.d.ts.map +1 -1
  139. package/types/main/utils/useStallionConfig.d.ts.map +1 -1
  140. package/types/types/bundle.types.d.ts +7 -0
  141. package/types/types/bundle.types.d.ts.map +1 -1
  142. package/types/types/utils.types.d.ts +3 -0
  143. package/types/types/utils.types.d.ts.map +1 -1
  144. package/src/main/components/common/ErrorView/index.js +0 -24
  145. package/src/main/components/common/ErrorView/index.js.map +0 -1
  146. package/src/main/components/common/ErrorView/styles.js +0 -30
  147. package/src/main/components/common/ErrorView/styles.js.map +0 -1
  148. package/src/main/components/common/Footer/index.js +0 -50
  149. package/src/main/components/common/Footer/index.js.map +0 -1
  150. package/src/main/components/common/Footer/styles.js +0 -91
  151. package/src/main/components/common/Footer/styles.js.map +0 -1
  152. package/src/main/components/common/FooterLoader/index.js +0 -11
  153. package/src/main/components/common/FooterLoader/index.js.map +0 -1
  154. package/src/main/components/common/FooterLoader/styles.js +0 -12
  155. package/src/main/components/common/FooterLoader/styles.js.map +0 -1
  156. package/src/main/components/common/OverlayLoader/index.js +0 -26
  157. package/src/main/components/common/OverlayLoader/index.js.map +0 -1
  158. package/src/main/components/common/OverlayLoader/styles.js +0 -33
  159. package/src/main/components/common/OverlayLoader/styles.js.map +0 -1
  160. package/src/main/components/modules/listing/components/BucketCard.js +0 -33
  161. package/src/main/components/modules/listing/components/BucketCard.js.map +0 -1
  162. package/src/main/components/modules/listing/components/BucketCardInfoSection.js +0 -56
  163. package/src/main/components/modules/listing/components/BucketCardInfoSection.js.map +0 -1
  164. package/src/main/components/modules/listing/components/BundleCard.js +0 -42
  165. package/src/main/components/modules/listing/components/BundleCard.js.map +0 -1
  166. package/src/main/components/modules/listing/components/BundleCardInfoSection.js +0 -82
  167. package/src/main/components/modules/listing/components/BundleCardInfoSection.js.map +0 -1
  168. package/src/main/components/modules/listing/components/CardDescriptionContent.js +0 -36
  169. package/src/main/components/modules/listing/components/CardDescriptionContent.js.map +0 -1
  170. package/src/main/components/modules/listing/components/ConfigView.js +0 -29
  171. package/src/main/components/modules/listing/components/ConfigView.js.map +0 -1
  172. package/src/main/components/modules/listing/components/MetaCard.js +0 -39
  173. package/src/main/components/modules/listing/components/MetaCard.js.map +0 -1
  174. package/src/main/components/modules/listing/components/SlotView.js +0 -80
  175. package/src/main/components/modules/listing/components/SlotView.js.map +0 -1
  176. package/src/main/components/modules/listing/components/styles/index.js +0 -121
  177. package/src/main/components/modules/listing/components/styles/index.js.map +0 -1
  178. package/src/main/components/modules/listing/hooks/useListing.js +0 -84
  179. package/src/main/components/modules/listing/hooks/useListing.js.map +0 -1
  180. package/src/main/components/modules/listing/index.js +0 -75
  181. package/src/main/components/modules/listing/index.js.map +0 -1
  182. package/src/main/components/modules/listing/styles.js +0 -24
  183. package/src/main/components/modules/listing/styles.js.map +0 -1
  184. package/src/main/components/modules/prod/index.js +0 -3
  185. package/src/main/components/modules/prod/index.js.map +0 -1
  186. package/src/main/components/modules/prod/prod.js +0 -30
  187. package/src/main/components/modules/prod/prod.js.map +0 -1
  188. package/src/main/components/modules/prod/styles/index.js +0 -29
  189. package/src/main/components/modules/prod/styles/index.js.map +0 -1
  190. package/types/main/components/common/ErrorView/index.d.ts +0 -8
  191. package/types/main/components/common/ErrorView/index.d.ts.map +0 -1
  192. package/types/main/components/common/ErrorView/styles.d.ts +0 -27
  193. package/types/main/components/common/ErrorView/styles.d.ts.map +0 -1
  194. package/types/main/components/common/Footer/index.d.ts +0 -10
  195. package/types/main/components/common/Footer/index.d.ts.map +0 -1
  196. package/types/main/components/common/Footer/styles.d.ts +0 -88
  197. package/types/main/components/common/Footer/styles.d.ts.map +0 -1
  198. package/types/main/components/common/FooterLoader/index.d.ts +0 -4
  199. package/types/main/components/common/FooterLoader/index.d.ts.map +0 -1
  200. package/types/main/components/common/FooterLoader/styles.d.ts +0 -10
  201. package/types/main/components/common/FooterLoader/styles.d.ts.map +0 -1
  202. package/types/main/components/common/OverlayLoader/index.d.ts +0 -7
  203. package/types/main/components/common/OverlayLoader/index.d.ts.map +0 -1
  204. package/types/main/components/common/OverlayLoader/styles.d.ts +0 -30
  205. package/types/main/components/common/OverlayLoader/styles.d.ts.map +0 -1
  206. package/types/main/components/modules/listing/components/BucketCard.d.ts +0 -13
  207. package/types/main/components/modules/listing/components/BucketCard.d.ts.map +0 -1
  208. package/types/main/components/modules/listing/components/BucketCardInfoSection.d.ts +0 -11
  209. package/types/main/components/modules/listing/components/BucketCardInfoSection.d.ts.map +0 -1
  210. package/types/main/components/modules/listing/components/BundleCard.d.ts +0 -15
  211. package/types/main/components/modules/listing/components/BundleCard.d.ts.map +0 -1
  212. package/types/main/components/modules/listing/components/BundleCardInfoSection.d.ts +0 -15
  213. package/types/main/components/modules/listing/components/BundleCardInfoSection.d.ts.map +0 -1
  214. package/types/main/components/modules/listing/components/CardDescriptionContent.d.ts +0 -8
  215. package/types/main/components/modules/listing/components/CardDescriptionContent.d.ts.map +0 -1
  216. package/types/main/components/modules/listing/components/ConfigView.d.ts +0 -8
  217. package/types/main/components/modules/listing/components/ConfigView.d.ts.map +0 -1
  218. package/types/main/components/modules/listing/components/MetaCard.d.ts +0 -8
  219. package/types/main/components/modules/listing/components/MetaCard.d.ts.map +0 -1
  220. package/types/main/components/modules/listing/components/SlotView.d.ts +0 -5
  221. package/types/main/components/modules/listing/components/SlotView.d.ts.map +0 -1
  222. package/types/main/components/modules/listing/components/styles/index.d.ts +0 -118
  223. package/types/main/components/modules/listing/components/styles/index.d.ts.map +0 -1
  224. package/types/main/components/modules/listing/hooks/useListing.d.ts +0 -15
  225. package/types/main/components/modules/listing/hooks/useListing.d.ts.map +0 -1
  226. package/types/main/components/modules/listing/index.d.ts.map +0 -1
  227. package/types/main/components/modules/listing/styles.d.ts +0 -21
  228. package/types/main/components/modules/listing/styles.d.ts.map +0 -1
  229. package/types/main/components/modules/prod/index.d.ts +0 -3
  230. package/types/main/components/modules/prod/index.d.ts.map +0 -1
  231. package/types/main/components/modules/prod/prod.d.ts +0 -4
  232. package/types/main/components/modules/prod/prod.d.ts.map +0 -1
  233. package/types/main/components/modules/prod/styles/index.d.ts +0 -25
  234. package/types/main/components/modules/prod/styles/index.d.ts.map +0 -1
@@ -4,7 +4,6 @@ import android.content.Context;
4
4
  import android.content.SharedPreferences;
5
5
  import android.content.pm.PackageInfo;
6
6
  import android.content.res.Resources;
7
- import android.provider.Settings;
8
7
 
9
8
  import org.json.JSONException;
10
9
  import org.json.JSONObject;
@@ -53,7 +52,7 @@ public class StallionConfig {
53
52
  );
54
53
  this.publicSigningKey = stallionPublicKeyRes != 0 ? context.getString(stallionPublicKeyRes) : "";
55
54
 
56
- // get or generate UID
55
+ // get or generate UID (random install-scoped UUID)
57
56
  String cachedUniqueId = sharedPreferences.getString(
58
57
  StallionConfigConstants.UNIQUE_ID_IDENTIFIER,
59
58
  ""
@@ -61,14 +60,7 @@ public class StallionConfig {
61
60
  if(!cachedUniqueId.isEmpty()) {
62
61
  this.uid = cachedUniqueId;
63
62
  } else {
64
- try {
65
- this.uid = Settings.Secure.getString(
66
- context.getContentResolver(),
67
- Settings.Secure.ANDROID_ID
68
- );
69
- } catch (Exception ignored) {
70
- this.uid = UUID.randomUUID().toString();
71
- }
63
+ this.uid = UUID.randomUUID().toString();
72
64
  SharedPreferences.Editor editor = sharedPreferences.edit();
73
65
  editor.putString(StallionConfigConstants.UNIQUE_ID_IDENTIFIER, this.uid);
74
66
  editor.apply();
@@ -23,16 +23,12 @@
23
23
  _lastUnverifiedHash = [defaults stringForKey:LAST_UNVERIFIED_KEY_IDENTIFIER] ?: @"";
24
24
  _baseUrl = [defaults stringForKey:BASE_URL_IDENTIFIER] ?: @"";
25
25
 
26
+ // get or generate UID (random install-scoped UUID)
26
27
  NSString *cachedUid = [defaults stringForKey:UNIQUE_ID_IDENTIFIER];
27
28
  if (cachedUid && ![cachedUid isEqualToString:@""]) {
28
29
  _uid = cachedUid;
29
30
  } else {
30
- NSString *newUid = @"";
31
- if ([UIDevice currentDevice].identifierForVendor) {
32
- newUid = [UIDevice currentDevice].identifierForVendor.UUIDString;
33
- } else {
34
- newUid = [[NSUUID UUID] UUIDString];
35
- }
31
+ NSString *newUid = [[NSUUID UUID] UUIDString];
36
32
  [defaults setObject:newUid forKey:UNIQUE_ID_IDENTIFIER];
37
33
  [defaults synchronize];
38
34
  _uid = newUid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-stallion",
3
- "version": "2.4.2",
3
+ "version": "2.4.3-alpha.2",
4
4
  "description": "Official React Native OTA updates SDK — CodePush alternative with patch updates, rollback, and bundle signing.",
5
5
  "main": "src/index",
6
6
  "types": "types/index.d.ts",
package/src/index.js CHANGED
@@ -19,6 +19,7 @@ if (StallionNativeModule !== null && StallionNativeModule !== void 0 && Stallion
19
19
  withStallion = withStallionNoop;
20
20
  useStallionModal = useStallionModalNoop;
21
21
  }
22
+ export { default as StallionDevMenu } from './main/components/StallionDevMenu';
22
23
  export { sync, restart } from './main/utils/StallionNativeUtils';
23
24
  export { useStallionUpdate } from './main/utils/useStallionUpdate';
24
25
  export { default as useStallionConfig } from './main/utils/useStallionConfig';
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["StallionNativeModule","STALLION_DISABLED_ERROR","withStallionNoop","useStallionModalNoop","withStallionMain","useStallionModalMain","stallionEventEmitter","getActiveReleaseHashNative","withStallion","useStallionModal","getStallionConfig","console","warn","sync","restart","useStallionUpdate","default","useStallionConfig","addEventListener","bind","removeEventListener","ACTIVE_RELEASE_HASH"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,OAAOA,oBAAoB,IACzBC,uBAAuB,QAClB,wBAAwB;;AAE/B;AACA,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,oBAAoB,MAAM,yBAAyB;;AAE1D;AACA,OAAOC,gBAAgB,MAAM,2BAA2B;AACxD,OAAOC,oBAAoB,MAAM,+BAA+B;AAGhE,SAASC,oBAAoB,QAAQ,mCAAmC;AACxE,SAASC,0BAA0B,QAAQ,kCAAkC;AAE7E,OAAO,IAAIC,YAA2B;AACtC,OAAO,IAAIC,gBAAyC;AAEpD,IAAIT,oBAAoB,aAApBA,oBAAoB,eAApBA,oBAAoB,CAAEU,iBAAiB,EAAE;EAC3CF,YAAY,GAAGJ,gBAAgB;EAC/BK,gBAAgB,GAAGJ,oBAAoB;AACzC,CAAC,MAAM;EACLM,OAAO,CAACC,IAAI,CAACX,uBAAuB,CAAC;EACrCO,YAAY,GAAGN,gBAAgB;EAC/BO,gBAAgB,GAAGN,oBAAoB;AACzC;AAEA,SAASU,IAAI,EAAEC,OAAO,QAAQ,kCAAkC;AAChE,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,OAAO,IAAIC,iBAAiB,QAAQ,gCAAgC;AAC7E,OAAO,MAAMC,gBAAgB,GAC3BZ,oBAAoB,CAACY,gBAAgB,CAACC,IAAI,CAACb,oBAAoB,CAAC;AAClE,OAAO,MAAMc,mBAAmB,GAC9Bd,oBAAoB,CAACc,mBAAmB,CAACD,IAAI,CAACb,oBAAoB,CAAC;AAErE,OAAO,MAAMe,mBAAmB,GAAGd,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"names":["StallionNativeModule","STALLION_DISABLED_ERROR","withStallionNoop","useStallionModalNoop","withStallionMain","useStallionModalMain","stallionEventEmitter","getActiveReleaseHashNative","withStallion","useStallionModal","getStallionConfig","console","warn","default","StallionDevMenu","sync","restart","useStallionUpdate","useStallionConfig","addEventListener","bind","removeEventListener","ACTIVE_RELEASE_HASH"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,OAAOA,oBAAoB,IACzBC,uBAAuB,QAClB,wBAAwB;;AAE/B;AACA,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,oBAAoB,MAAM,yBAAyB;;AAE1D;AACA,OAAOC,gBAAgB,MAAM,2BAA2B;AACxD,OAAOC,oBAAoB,MAAM,+BAA+B;AAGhE,SAASC,oBAAoB,QAAQ,mCAAmC;AACxE,SAASC,0BAA0B,QAAQ,kCAAkC;AAE7E,OAAO,IAAIC,YAA2B;AACtC,OAAO,IAAIC,gBAAyC;AAEpD,IAAIT,oBAAoB,aAApBA,oBAAoB,eAApBA,oBAAoB,CAAEU,iBAAiB,EAAE;EAC3CF,YAAY,GAAGJ,gBAAgB;EAC/BK,gBAAgB,GAAGJ,oBAAoB;AACzC,CAAC,MAAM;EACLM,OAAO,CAACC,IAAI,CAACX,uBAAuB,CAAC;EACrCO,YAAY,GAAGN,gBAAgB;EAC/BO,gBAAgB,GAAGN,oBAAoB;AACzC;AAEA,SAASU,OAAO,IAAIC,eAAe,QAAQ,mCAAmC;AAC9E,SAASC,IAAI,EAAEC,OAAO,QAAQ,kCAAkC;AAChE,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASJ,OAAO,IAAIK,iBAAiB,QAAQ,gCAAgC;AAC7E,OAAO,MAAMC,gBAAgB,GAC3Bb,oBAAoB,CAACa,gBAAgB,CAACC,IAAI,CAACd,oBAAoB,CAAC;AAClE,OAAO,MAAMe,mBAAmB,GAC9Bf,oBAAoB,CAACe,mBAAmB,CAACD,IAAI,CAACd,oBAAoB,CAAC;AAErE,OAAO,MAAMgB,mBAAmB,GAAGf,0BAA0B,CAAC,CAAC"}
@@ -0,0 +1,69 @@
1
+ import React, { useContext, useEffect } from 'react';
2
+ import { StyleSheet, View } from 'react-native';
3
+ import Login from './modules/login';
4
+ import DevMenu from './modules/devMenu';
5
+ import AppHeader from './modules/devMenu/components/AppHeader';
6
+ import useStallionModal from './modules/modal/hooks/useStallionModal';
7
+ import { DS_COLORS } from '../constants/designTokens';
8
+ import { GlobalContext } from '../state';
9
+ const StallionDevMenu = _ref => {
10
+ let {
11
+ onClosePress
12
+ } = _ref;
13
+ const {
14
+ actions: {
15
+ refreshMeta
16
+ }
17
+ } = useContext(GlobalContext);
18
+ const {
19
+ onBackPress,
20
+ loginRequired,
21
+ isTesting,
22
+ isBundleHistory,
23
+ bucketTitle,
24
+ bucketSubtitle,
25
+ downloadError,
26
+ handleSwitch
27
+ } = useStallionModal();
28
+ useEffect(() => {
29
+ refreshMeta();
30
+ }, [refreshMeta]);
31
+ return /*#__PURE__*/React.createElement(View, {
32
+ style: styles.screen
33
+ }, loginRequired ? /*#__PURE__*/React.createElement(View, {
34
+ style: styles.loginContainer
35
+ }, /*#__PURE__*/React.createElement(AppHeader, {
36
+ onClosePress: onClosePress
37
+ }), /*#__PURE__*/React.createElement(View, {
38
+ style: styles.loginSection
39
+ }, /*#__PURE__*/React.createElement(Login, null))) : /*#__PURE__*/React.createElement(DevMenu, {
40
+ isTesting: isTesting,
41
+ isBundleHistory: isBundleHistory,
42
+ bucketTitle: bucketTitle,
43
+ bucketSubtitle: bucketSubtitle,
44
+ downloadError: downloadError,
45
+ onBackPress: onBackPress,
46
+ onClosePress: onClosePress,
47
+ onTabChange: handleSwitch
48
+ }));
49
+ };
50
+ const styles = StyleSheet.create({
51
+ // The dev menu takes the whole screen; there is no scrim behind it.
52
+ screen: {
53
+ flex: 1,
54
+ backgroundColor: DS_COLORS.screenBg
55
+ },
56
+ // Login is mode-agnostic — you cannot reach the Testing/Production toggle
57
+ // until you are signed in — so its header stays untinted.
58
+ loginContainer: {
59
+ flex: 1,
60
+ backgroundColor: DS_COLORS.cardBg
61
+ },
62
+ loginSection: {
63
+ flex: 1,
64
+ borderTopWidth: 1,
65
+ borderTopColor: DS_COLORS.headerHairline
66
+ }
67
+ });
68
+ export default StallionDevMenu;
69
+ //# sourceMappingURL=StallionDevMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useContext","useEffect","StyleSheet","View","Login","DevMenu","AppHeader","useStallionModal","DS_COLORS","GlobalContext","StallionDevMenu","_ref","onClosePress","actions","refreshMeta","onBackPress","loginRequired","isTesting","isBundleHistory","bucketTitle","bucketSubtitle","downloadError","handleSwitch","createElement","style","styles","screen","loginContainer","loginSection","onTabChange","create","flex","backgroundColor","screenBg","cardBg","borderTopWidth","borderTopColor","headerHairline"],"sourceRoot":"../../../../src","sources":["main/components/StallionDevMenu.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,SAAS,QAAQ,OAAO;AACpD,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,SAAS,MAAM,wCAAwC;AAC9D,OAAOC,gBAAgB,MAAM,wCAAwC;AAErE,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,aAAa,QAAQ,UAAU;AAGxC,MAAMC,eAAgD,GAAGC,IAAA,IAAsB;EAAA,IAArB;IAAEC;EAAa,CAAC,GAAAD,IAAA;EACxE,MAAM;IACJE,OAAO,EAAE;MAAEC;IAAY;EACzB,CAAC,GAAGd,UAAU,CAACS,aAAa,CAAC;EAE7B,MAAM;IACJM,WAAW;IACXC,aAAa;IACbC,SAAS;IACTC,eAAe;IACfC,WAAW;IACXC,cAAc;IACdC,aAAa;IACbC;EACF,CAAC,GAAGf,gBAAgB,CAAC,CAAC;EAEtBN,SAAS,CAAC,MAAM;IACda,WAAW,CAAC,CAAC;EACf,CAAC,EAAE,CAACA,WAAW,CAAC,CAAC;EAEjB,oBACEf,KAAA,CAAAwB,aAAA,CAACpB,IAAI;IAACqB,KAAK,EAAEC,MAAM,CAACC;EAAO,GACxBV,aAAa,gBACZjB,KAAA,CAAAwB,aAAA,CAACpB,IAAI;IAACqB,KAAK,EAAEC,MAAM,CAACE;EAAe,gBACjC5B,KAAA,CAAAwB,aAAA,CAACjB,SAAS;IAACM,YAAY,EAAEA;EAAa,CAAE,CAAC,eACzCb,KAAA,CAAAwB,aAAA,CAACpB,IAAI;IAACqB,KAAK,EAAEC,MAAM,CAACG;EAAa,gBAC/B7B,KAAA,CAAAwB,aAAA,CAACnB,KAAK,MAAE,CACJ,CACF,CAAC,gBAEPL,KAAA,CAAAwB,aAAA,CAAClB,OAAO;IACNY,SAAS,EAAEA,SAAU;IACrBC,eAAe,EAAEA,eAAgB;IACjCC,WAAW,EAAEA,WAAY;IACzBC,cAAc,EAAEA,cAAe;IAC/BC,aAAa,EAAEA,aAAc;IAC7BN,WAAW,EAAEA,WAAY;IACzBH,YAAY,EAAEA,YAAa;IAC3BiB,WAAW,EAAEP;EAAa,CAC3B,CAEC,CAAC;AAEX,CAAC;AAED,MAAMG,MAAM,GAAGvB,UAAU,CAAC4B,MAAM,CAAC;EAC/B;EACAJ,MAAM,EAAE;IACNK,IAAI,EAAE,CAAC;IACPC,eAAe,EAAExB,SAAS,CAACyB;EAC7B,CAAC;EACD;EACA;EACAN,cAAc,EAAE;IACdI,IAAI,EAAE,CAAC;IACPC,eAAe,EAAExB,SAAS,CAAC0B;EAC7B,CAAC;EACDN,YAAY,EAAE;IACZG,IAAI,EAAE,CAAC;IACPI,cAAc,EAAE,CAAC;IACjBC,cAAc,EAAE5B,SAAS,CAAC6B;EAC5B;AACF,CAAC,CAAC;AAEF,eAAe3B,eAAe"}
@@ -1,54 +1,31 @@
1
- import React from 'react';
2
- import { View, TouchableOpacity, StyleSheet } from 'react-native';
3
- import { COLORS } from '../../../constants/colors';
4
- import { HEADER_SLAB_HEIGHT } from '../../../constants/appConstants';
5
- export const BUTTON_SIZE = HEADER_SLAB_HEIGHT / 2.5; // Shared size reference
6
-
1
+ import React, { memo } from 'react';
2
+ import { Pressable, StyleSheet } from 'react-native';
3
+ import Chevron, { CHEVRON_SIZE } from '../Chevron';
4
+ import { DS_COLORS, DS_HIT_SLOP } from '../../../constants/designTokens';
5
+ export const BUTTON_SIZE = CHEVRON_SIZE;
7
6
  const BackButton = _ref => {
8
7
  let {
9
8
  onPress,
10
- size = BUTTON_SIZE
9
+ size = BUTTON_SIZE,
10
+ color = DS_COLORS.textMuted
11
11
  } = _ref;
12
- const arrowLength = size * 0.6;
13
- const offset = size * 0.28;
14
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
12
+ return /*#__PURE__*/React.createElement(Pressable, {
13
+ accessibilityRole: "button",
14
+ accessibilityLabel: "Back",
15
15
  onPress: onPress,
16
- style: [styles.container, {
17
- width: size,
18
- height: size
19
- }]
20
- }, /*#__PURE__*/React.createElement(View, {
21
- style: [styles.line, {
22
- width: arrowLength,
23
- transform: [{
24
- rotate: '-45deg'
25
- }, {
26
- translateX: offset
27
- }]
28
- }]
29
- }), /*#__PURE__*/React.createElement(View, {
30
- style: [styles.line, {
31
- width: arrowLength,
32
- transform: [{
33
- rotate: '45deg'
34
- }, {
35
- translateX: offset
36
- }]
37
- }]
16
+ hitSlop: DS_HIT_SLOP,
17
+ style: styles.hitTarget
18
+ }, /*#__PURE__*/React.createElement(Chevron, {
19
+ direction: "left",
20
+ size: size,
21
+ color: color
38
22
  }));
39
23
  };
40
24
  const styles = StyleSheet.create({
41
- container: {
25
+ hitTarget: {
42
26
  justifyContent: 'center',
43
- alignItems: 'flex-start',
44
- overflow: 'hidden'
45
- },
46
- line: {
47
- position: 'absolute',
48
- height: 3,
49
- borderRadius: 1,
50
- backgroundColor: COLORS.black7
27
+ alignItems: 'center'
51
28
  }
52
29
  });
53
- export default BackButton;
30
+ export default /*#__PURE__*/memo(BackButton);
54
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","TouchableOpacity","StyleSheet","COLORS","HEADER_SLAB_HEIGHT","BUTTON_SIZE","BackButton","_ref","onPress","size","arrowLength","offset","createElement","style","styles","container","width","height","line","transform","rotate","translateX","create","justifyContent","alignItems","overflow","position","borderRadius","backgroundColor","black7"],"sourceRoot":"../../../../../../src","sources":["main/components/common/BackButton/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AACjE,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE,OAAO,MAAMC,WAAW,GAAGD,kBAAkB,GAAG,GAAG,CAAC,CAAC;;AAOrD,MAAME,UAAqC,GAAGC,IAAA,IAGxC;EAAA,IAHyC;IAC7CC,OAAO;IACPC,IAAI,GAAGJ;EACT,CAAC,GAAAE,IAAA;EACC,MAAMG,WAAW,GAAGD,IAAI,GAAG,GAAG;EAC9B,MAAME,MAAM,GAAGF,IAAI,GAAG,IAAI;EAE1B,oBACEV,KAAA,CAAAa,aAAA,CAACX,gBAAgB;IACfO,OAAO,EAAEA,OAAQ;IACjBK,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAE;MAAEC,KAAK,EAAEP,IAAI;MAAEQ,MAAM,EAAER;IAAK,CAAC;EAAE,gBAEzDV,KAAA,CAAAa,aAAA,CAACZ,IAAI;IACHa,KAAK,EAAE,CACLC,MAAM,CAACI,IAAI,EACX;MACEF,KAAK,EAAEN,WAAW;MAClBS,SAAS,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAS,CAAC,EAAE;QAAEC,UAAU,EAAEV;MAAO,CAAC;IAC1D,CAAC;EACD,CACH,CAAC,eACFZ,KAAA,CAAAa,aAAA,CAACZ,IAAI;IACHa,KAAK,EAAE,CACLC,MAAM,CAACI,IAAI,EACX;MACEF,KAAK,EAAEN,WAAW;MAClBS,SAAS,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAQ,CAAC,EAAE;QAAEC,UAAU,EAAEV;MAAO,CAAC;IACzD,CAAC;EACD,CACH,CACe,CAAC;AAEvB,CAAC;AAED,MAAMG,MAAM,GAAGZ,UAAU,CAACoB,MAAM,CAAC;EAC/BP,SAAS,EAAE;IACTQ,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,YAAY;IACxBC,QAAQ,EAAE;EACZ,CAAC;EACDP,IAAI,EAAE;IACJQ,QAAQ,EAAE,UAAU;IACpBT,MAAM,EAAE,CAAC;IACTU,YAAY,EAAE,CAAC;IACfC,eAAe,EAAEzB,MAAM,CAAC0B;EAC1B;AACF,CAAC,CAAC;AAEF,eAAevB,UAAU"}
1
+ {"version":3,"names":["React","memo","Pressable","StyleSheet","Chevron","CHEVRON_SIZE","DS_COLORS","DS_HIT_SLOP","BUTTON_SIZE","BackButton","_ref","onPress","size","color","textMuted","createElement","accessibilityRole","accessibilityLabel","hitSlop","style","styles","hitTarget","direction","create","justifyContent","alignItems"],"sourceRoot":"../../../../../../src","sources":["main/components/common/BackButton/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AAEpD,OAAOC,OAAO,IAAIC,YAAY,QAAQ,YAAY;AAClD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iCAAiC;AAExE,OAAO,MAAMC,WAAW,GAAGH,YAAY;AAQvC,MAAMI,UAAqC,GAAGC,IAAA;EAAA,IAAC;IAC7CC,OAAO;IACPC,IAAI,GAAGJ,WAAW;IAClBK,KAAK,GAAGP,SAAS,CAACQ;EACpB,CAAC,GAAAJ,IAAA;EAAA,oBACCV,KAAA,CAAAe,aAAA,CAACb,SAAS;IACRc,iBAAiB,EAAC,QAAQ;IAC1BC,kBAAkB,EAAC,MAAM;IACzBN,OAAO,EAAEA,OAAQ;IACjBO,OAAO,EAAEX,WAAY;IACrBY,KAAK,EAAEC,MAAM,CAACC;EAAU,gBAExBrB,KAAA,CAAAe,aAAA,CAACX,OAAO;IAACkB,SAAS,EAAC,MAAM;IAACV,IAAI,EAAEA,IAAK;IAACC,KAAK,EAAEA;EAAM,CAAE,CAC5C,CAAC;AAAA,CACb;AAED,MAAMO,MAAM,GAAGjB,UAAU,CAACoB,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,4BAAexB,IAAI,CAACQ,UAAU,CAAC"}
@@ -0,0 +1,64 @@
1
+ import React, { memo } from 'react';
2
+ import { StyleSheet, View } from 'react-native';
3
+ import { DS_COLORS } from '../../../constants/designTokens';
4
+ export const CHEVRON_SIZE = 20;
5
+ /**
6
+ * Chevron drawn with rotated Views so weight and alignment stay identical on
7
+ * iOS and Android (Unicode ‹ › shift with font metrics).
8
+ */
9
+ const Chevron = _ref => {
10
+ let {
11
+ direction = 'right',
12
+ size = CHEVRON_SIZE,
13
+ color = DS_COLORS.chevron
14
+ } = _ref;
15
+ const arrowLength = size * 0.55;
16
+ // Nudge the V toward the open side of the box so it reads as a chevron,
17
+ // not a centered X fragment.
18
+ const offset = size * 0.22;
19
+ return /*#__PURE__*/React.createElement(View, {
20
+ style: [styles.container, {
21
+ width: size,
22
+ height: size
23
+ }, direction === 'left' ? styles.alignStart : styles.alignEnd]
24
+ }, /*#__PURE__*/React.createElement(View, {
25
+ style: [styles.line, {
26
+ width: arrowLength,
27
+ backgroundColor: color,
28
+ transform: [{
29
+ rotate: '-45deg'
30
+ }, {
31
+ translateX: direction === 'left' ? offset : -offset
32
+ }]
33
+ }]
34
+ }), /*#__PURE__*/React.createElement(View, {
35
+ style: [styles.line, {
36
+ width: arrowLength,
37
+ backgroundColor: color,
38
+ transform: [{
39
+ rotate: '45deg'
40
+ }, {
41
+ translateX: direction === 'left' ? offset : -offset
42
+ }]
43
+ }]
44
+ }));
45
+ };
46
+ const styles = StyleSheet.create({
47
+ container: {
48
+ justifyContent: 'center',
49
+ overflow: 'hidden'
50
+ },
51
+ alignStart: {
52
+ alignItems: 'flex-start'
53
+ },
54
+ alignEnd: {
55
+ alignItems: 'flex-end'
56
+ },
57
+ line: {
58
+ position: 'absolute',
59
+ height: 2.5,
60
+ borderRadius: 1
61
+ }
62
+ });
63
+ export default /*#__PURE__*/memo(Chevron);
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","memo","StyleSheet","View","DS_COLORS","CHEVRON_SIZE","Chevron","_ref","direction","size","color","chevron","arrowLength","offset","createElement","style","styles","container","width","height","alignStart","alignEnd","line","backgroundColor","transform","rotate","translateX","create","justifyContent","overflow","alignItems","position","borderRadius"],"sourceRoot":"../../../../../../src","sources":["main/components/common/Chevron/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,SAAS,QAAQ,iCAAiC;AAE3D,OAAO,MAAMC,YAAY,GAAG,EAAE;AAS9B;AACA;AACA;AACA;AACA,MAAMC,OAA+B,GAAGC,IAAA,IAIlC;EAAA,IAJmC;IACvCC,SAAS,GAAG,OAAO;IACnBC,IAAI,GAAGJ,YAAY;IACnBK,KAAK,GAAGN,SAAS,CAACO;EACpB,CAAC,GAAAJ,IAAA;EACC,MAAMK,WAAW,GAAGH,IAAI,GAAG,IAAI;EAC/B;EACA;EACA,MAAMI,MAAM,GAAGJ,IAAI,GAAG,IAAI;EAE1B,oBACET,KAAA,CAAAc,aAAA,CAACX,IAAI;IACHY,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MAAEC,KAAK,EAAET,IAAI;MAAEU,MAAM,EAAEV;IAAK,CAAC,EAC7BD,SAAS,KAAK,MAAM,GAAGQ,MAAM,CAACI,UAAU,GAAGJ,MAAM,CAACK,QAAQ;EAC1D,gBAEFrB,KAAA,CAAAc,aAAA,CAACX,IAAI;IACHY,KAAK,EAAE,CACLC,MAAM,CAACM,IAAI,EACX;MACEJ,KAAK,EAAEN,WAAW;MAClBW,eAAe,EAAEb,KAAK;MACtBc,SAAS,EAAE,CACT;QAAEC,MAAM,EAAE;MAAS,CAAC,EACpB;QAAEC,UAAU,EAAElB,SAAS,KAAK,MAAM,GAAGK,MAAM,GAAG,CAACA;MAAO,CAAC;IAE3D,CAAC;EACD,CACH,CAAC,eACFb,KAAA,CAAAc,aAAA,CAACX,IAAI;IACHY,KAAK,EAAE,CACLC,MAAM,CAACM,IAAI,EACX;MACEJ,KAAK,EAAEN,WAAW;MAClBW,eAAe,EAAEb,KAAK;MACtBc,SAAS,EAAE,CACT;QAAEC,MAAM,EAAE;MAAQ,CAAC,EACnB;QAAEC,UAAU,EAAElB,SAAS,KAAK,MAAM,GAAGK,MAAM,GAAG,CAACA;MAAO,CAAC;IAE3D,CAAC;EACD,CACH,CACG,CAAC;AAEX,CAAC;AAED,MAAMG,MAAM,GAAGd,UAAU,CAACyB,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE;EACZ,CAAC;EACDT,UAAU,EAAE;IACVU,UAAU,EAAE;EACd,CAAC;EACDT,QAAQ,EAAE;IACRS,UAAU,EAAE;EACd,CAAC;EACDR,IAAI,EAAE;IACJS,QAAQ,EAAE,UAAU;IACpBZ,MAAM,EAAE,GAAG;IACXa,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,4BAAe/B,IAAI,CAACK,OAAO,CAAC"}
@@ -1,22 +1,29 @@
1
- import React from 'react';
2
- import { View, TouchableOpacity, StyleSheet } from 'react-native';
3
- import { COLORS } from '../../../constants/colors';
4
- import { HEADER_SLAB_HEIGHT } from '../../../constants/appConstants';
5
- export const BUTTON_SIZE = HEADER_SLAB_HEIGHT / 2.5; // Change this to scale button
6
-
1
+ import React, { memo } from 'react';
2
+ import { Pressable, StyleSheet, View } from 'react-native';
3
+ import { DS_COLORS, DS_HIT_SLOP } from '../../../constants/designTokens';
4
+ export const BUTTON_SIZE = 18;
5
+ /**
6
+ * Close mark drawn with rotated Views so stroke weight and centering stay
7
+ * consistent across platforms (Unicode ✕ varies by font).
8
+ */
7
9
  const CrossButton = _ref => {
8
10
  let {
9
11
  onPress,
10
- size = BUTTON_SIZE
12
+ size = BUTTON_SIZE,
13
+ color = DS_COLORS.textMuted
11
14
  } = _ref;
12
15
  const strokeStyle = {
13
16
  position: 'absolute',
14
17
  width: size,
15
- height: 3,
16
- backgroundColor: COLORS.black7
18
+ height: 2,
19
+ borderRadius: 1,
20
+ backgroundColor: color
17
21
  };
18
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
22
+ return /*#__PURE__*/React.createElement(Pressable, {
23
+ accessibilityRole: "button",
24
+ accessibilityLabel: "Close",
19
25
  onPress: onPress,
26
+ hitSlop: DS_HIT_SLOP,
20
27
  style: [styles.container, {
21
28
  width: size,
22
29
  height: size
@@ -41,5 +48,5 @@ const styles = StyleSheet.create({
41
48
  alignItems: 'center'
42
49
  }
43
50
  });
44
- export default CrossButton;
51
+ export default /*#__PURE__*/memo(CrossButton);
45
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","TouchableOpacity","StyleSheet","COLORS","HEADER_SLAB_HEIGHT","BUTTON_SIZE","CrossButton","_ref","onPress","size","strokeStyle","position","width","height","backgroundColor","black7","createElement","style","styles","container","transform","rotate","create","justifyContent","alignItems"],"sourceRoot":"../../../../../../src","sources":["main/components/common/CrossButton/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,QAAmB,cAAc;AAC5E,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE,OAAO,MAAMC,WAAW,GAAGD,kBAAkB,GAAG,GAAG,CAAC,CAAC;;AAOrD,MAAME,WAAuC,GAAGC,IAAA,IAG1C;EAAA,IAH2C;IAC/CC,OAAO;IACPC,IAAI,GAAGJ;EACT,CAAC,GAAAE,IAAA;EACC,MAAMG,WAAsB,GAAG;IAC7BC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAEH,IAAI;IACXI,MAAM,EAAE,CAAC;IACTC,eAAe,EAAEX,MAAM,CAACY;EAC1B,CAAC;EAED,oBACEhB,KAAA,CAAAiB,aAAA,CAACf,gBAAgB;IACfO,OAAO,EAAEA,OAAQ;IACjBS,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAE;MAAEP,KAAK,EAAEH,IAAI;MAAEI,MAAM,EAAEJ;IAAK,CAAC;EAAE,gBAEzDV,KAAA,CAAAiB,aAAA,CAAChB,IAAI;IAACiB,KAAK,EAAE,CAACP,WAAW,EAAE;MAAEU,SAAS,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAQ,CAAC;IAAE,CAAC;EAAE,CAAE,CAAC,eACpEtB,KAAA,CAAAiB,aAAA,CAAChB,IAAI;IAACiB,KAAK,EAAE,CAACP,WAAW,EAAE;MAAEU,SAAS,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAS,CAAC;IAAE,CAAC;EAAE,CAAE,CACpD,CAAC;AAEvB,CAAC;AAED,MAAMH,MAAM,GAAGhB,UAAU,CAACoB,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAelB,WAAW"}
1
+ {"version":3,"names":["React","memo","Pressable","StyleSheet","View","DS_COLORS","DS_HIT_SLOP","BUTTON_SIZE","CrossButton","_ref","onPress","size","color","textMuted","strokeStyle","position","width","height","borderRadius","backgroundColor","createElement","accessibilityRole","accessibilityLabel","hitSlop","style","styles","container","transform","rotate","create","justifyContent","alignItems"],"sourceRoot":"../../../../../../src","sources":["main/components/common/CrossButton/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAErE,SAASC,SAAS,EAAEC,WAAW,QAAQ,iCAAiC;AAExE,OAAO,MAAMC,WAAW,GAAG,EAAE;AAQ7B;AACA;AACA;AACA;AACA,MAAMC,WAAuC,GAAGC,IAAA,IAI1C;EAAA,IAJ2C;IAC/CC,OAAO;IACPC,IAAI,GAAGJ,WAAW;IAClBK,KAAK,GAAGP,SAAS,CAACQ;EACpB,CAAC,GAAAJ,IAAA;EACC,MAAMK,WAAsB,GAAG;IAC7BC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAEL,IAAI;IACXM,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE,CAAC;IACfC,eAAe,EAAEP;EACnB,CAAC;EAED,oBACEZ,KAAA,CAAAoB,aAAA,CAAClB,SAAS;IACRmB,iBAAiB,EAAC,QAAQ;IAC1BC,kBAAkB,EAAC,OAAO;IAC1BZ,OAAO,EAAEA,OAAQ;IACjBa,OAAO,EAAEjB,WAAY;IACrBkB,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAE;MAAEV,KAAK,EAAEL,IAAI;MAAEM,MAAM,EAAEN;IAAK,CAAC;EAAE,gBAEzDX,KAAA,CAAAoB,aAAA,CAAChB,IAAI;IAACoB,KAAK,EAAE,CAACV,WAAW,EAAE;MAAEa,SAAS,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAQ,CAAC;IAAE,CAAC;EAAE,CAAE,CAAC,eACpE5B,KAAA,CAAAoB,aAAA,CAAChB,IAAI;IAACoB,KAAK,EAAE,CAACV,WAAW,EAAE;MAAEa,SAAS,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAS,CAAC;IAAE,CAAC;EAAE,CAAE,CAC3D,CAAC;AAEhB,CAAC;AAED,MAAMH,MAAM,GAAGtB,UAAU,CAAC0B,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,4BAAe9B,IAAI,CAACO,WAAW,CAAC"}
@@ -2,13 +2,9 @@ import React, { memo, useCallback, useState } from 'react';
2
2
  import { View, Text, Image } from 'react-native';
3
3
  import { STALLION_LOGO_URL } from '../../../constants/appConstants';
4
4
  import styles from './styles';
5
- import BackButton from '../BackButton';
6
- import CrossButton from '../CrossButton';
7
5
  const Header = _ref => {
8
6
  let {
9
- title,
10
- onBackPress,
11
- onClosePress
7
+ title
12
8
  } = _ref;
13
9
  const [errorLogoLoading, setErrorLogoLoading] = useState(false);
14
10
  const errorInLogoLoading = useCallback(() => {
@@ -16,11 +12,7 @@ const Header = _ref => {
16
12
  }, []);
17
13
  return /*#__PURE__*/React.createElement(View, {
18
14
  style: styles.headerContainer
19
- }, onBackPress ? /*#__PURE__*/React.createElement(View, {
20
- style: [styles.headerSideSection, styles.alignStart]
21
- }, /*#__PURE__*/React.createElement(BackButton, {
22
- onPress: onBackPress
23
- })) : /*#__PURE__*/React.createElement(View, {
15
+ }, /*#__PURE__*/React.createElement(View, {
24
16
  style: [styles.headerSideSection, styles.alignStart]
25
17
  }), /*#__PURE__*/React.createElement(View, {
26
18
  style: styles.headerCenterSection
@@ -33,11 +25,7 @@ const Header = _ref => {
33
25
  style: styles.headerLogo,
34
26
  resizeMode: "contain",
35
27
  onError: errorInLogoLoading
36
- }) : null), onClosePress ? /*#__PURE__*/React.createElement(View, {
37
- style: styles.headerSideSection
38
- }, /*#__PURE__*/React.createElement(CrossButton, {
39
- onPress: onClosePress
40
- })) : /*#__PURE__*/React.createElement(View, {
28
+ }) : null), /*#__PURE__*/React.createElement(View, {
41
29
  style: styles.headerSideSection
42
30
  }));
43
31
  };
@@ -1 +1 @@
1
- {"version":3,"names":["React","memo","useCallback","useState","View","Text","Image","STALLION_LOGO_URL","styles","BackButton","CrossButton","Header","_ref","title","onBackPress","onClosePress","errorLogoLoading","setErrorLogoLoading","errorInLogoLoading","createElement","style","headerContainer","headerSideSection","alignStart","onPress","headerCenterSection","headerText","source","uri","headerLogo","resizeMode","onError"],"sourceRoot":"../../../../../../src","sources":["main/components/common/Header/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,IAAI,EAAEC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAEhD,SAASC,iBAAiB,QAAQ,iCAAiC;AAEnE,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,UAAU,MAAM,eAAe;AACtC,OAAOC,WAAW,MAAM,gBAAgB;AAQxC,MAAMC,MAAyB,GAAGC,IAAA,IAA0C;EAAA,IAAzC;IAAEC,KAAK;IAAEC,WAAW;IAAEC;EAAa,CAAC,GAAAH,IAAA;EACrE,MAAM,CAACI,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGd,QAAQ,CAAC,KAAK,CAAC;EAC/D,MAAMe,kBAAkB,GAAGhB,WAAW,CAAC,MAAM;IAC3Ce,mBAAmB,CAAC,IAAI,CAAC;EAC3B,CAAC,EAAE,EAAE,CAAC;EACN,oBACEjB,KAAA,CAAAmB,aAAA,CAACf,IAAI;IAACgB,KAAK,EAAEZ,MAAM,CAACa;EAAgB,GACjCP,WAAW,gBACVd,KAAA,CAAAmB,aAAA,CAACf,IAAI;IAACgB,KAAK,EAAE,CAACZ,MAAM,CAACc,iBAAiB,EAAEd,MAAM,CAACe,UAAU;EAAE,gBACzDvB,KAAA,CAAAmB,aAAA,CAACV,UAAU;IAACe,OAAO,EAAEV;EAAY,CAAE,CAC/B,CAAC,gBAEPd,KAAA,CAAAmB,aAAA,CAACf,IAAI;IAACgB,KAAK,EAAE,CAACZ,MAAM,CAACc,iBAAiB,EAAEd,MAAM,CAACe,UAAU;EAAE,CAAE,CAC9D,eACDvB,KAAA,CAAAmB,aAAA,CAACf,IAAI;IAACgB,KAAK,EAAEZ,MAAM,CAACiB;EAAoB,GACrCZ,KAAK,GACJG,gBAAgB,gBACdhB,KAAA,CAAAmB,aAAA,CAACd,IAAI;IAACe,KAAK,EAAEZ,MAAM,CAACkB;EAAW,GAAEb,KAAY,CAAC,gBAE9Cb,KAAA,CAAAmB,aAAA,CAACb,KAAK;IACJqB,MAAM,EAAE;MACNC,GAAG,EAAErB;IACP,CAAE;IACFa,KAAK,EAAEZ,MAAM,CAACqB,UAAW;IACzBC,UAAU,EAAC,SAAS;IACpBC,OAAO,EAAEb;EAAmB,CAC7B,CACF,GACC,IACA,CAAC,EACNH,YAAY,gBACXf,KAAA,CAAAmB,aAAA,CAACf,IAAI;IAACgB,KAAK,EAAEZ,MAAM,CAACc;EAAkB,gBACpCtB,KAAA,CAAAmB,aAAA,CAACT,WAAW;IAACc,OAAO,EAAET;EAAa,CAAE,CACjC,CAAC,gBAEPf,KAAA,CAAAmB,aAAA,CAACf,IAAI;IAACgB,KAAK,EAAEZ,MAAM,CAACc;EAAkB,CAAE,CAEtC,CAAC;AAEX,CAAC;AAED,4BAAerB,IAAI,CAACU,MAAM,CAAC"}
1
+ {"version":3,"names":["React","memo","useCallback","useState","View","Text","Image","STALLION_LOGO_URL","styles","Header","_ref","title","errorLogoLoading","setErrorLogoLoading","errorInLogoLoading","createElement","style","headerContainer","headerSideSection","alignStart","headerCenterSection","headerText","source","uri","headerLogo","resizeMode","onError"],"sourceRoot":"../../../../../../src","sources":["main/components/common/Header/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,IAAI,EAAEC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAEhD,SAASC,iBAAiB,QAAQ,iCAAiC;AAEnE,OAAOC,MAAM,MAAM,UAAU;AAM7B,MAAMC,MAAyB,GAAGC,IAAA,IAAe;EAAA,IAAd;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAC1C,MAAM,CAACE,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGV,QAAQ,CAAC,KAAK,CAAC;EAC/D,MAAMW,kBAAkB,GAAGZ,WAAW,CAAC,MAAM;IAC3CW,mBAAmB,CAAC,IAAI,CAAC;EAC3B,CAAC,EAAE,EAAE,CAAC;EACN,oBACEb,KAAA,CAAAe,aAAA,CAACX,IAAI;IAACY,KAAK,EAAER,MAAM,CAACS;EAAgB,gBAClCjB,KAAA,CAAAe,aAAA,CAACX,IAAI;IAACY,KAAK,EAAE,CAACR,MAAM,CAACU,iBAAiB,EAAEV,MAAM,CAACW,UAAU;EAAE,CAAE,CAAC,eAC9DnB,KAAA,CAAAe,aAAA,CAACX,IAAI;IAACY,KAAK,EAAER,MAAM,CAACY;EAAoB,GACrCT,KAAK,GACJC,gBAAgB,gBACdZ,KAAA,CAAAe,aAAA,CAACV,IAAI;IAACW,KAAK,EAAER,MAAM,CAACa;EAAW,GAAEV,KAAY,CAAC,gBAE9CX,KAAA,CAAAe,aAAA,CAACT,KAAK;IACJgB,MAAM,EAAE;MACNC,GAAG,EAAEhB;IACP,CAAE;IACFS,KAAK,EAAER,MAAM,CAACgB,UAAW;IACzBC,UAAU,EAAC,SAAS;IACpBC,OAAO,EAAEZ;EAAmB,CAC7B,CACF,GACC,IACA,CAAC,eACPd,KAAA,CAAAe,aAAA,CAACX,IAAI;IAACY,KAAK,EAAER,MAAM,CAACU;EAAkB,CAAE,CACpC,CAAC;AAEX,CAAC;AAED,4BAAejB,IAAI,CAACQ,MAAM,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { StyleSheet } from 'react-native';
2
2
  import { HEADER_SLAB_HEIGHT, STD_MARGIN } from '../../../constants/appConstants';
3
3
  import { COLORS } from '../../../constants/colors';
4
- const PROFILE_BUTTON_EDGE = HEADER_SLAB_HEIGHT / 1.7;
5
4
  const styles = StyleSheet.create({
6
5
  headerContainer: {
7
6
  height: HEADER_SLAB_HEIGHT,
@@ -26,15 +25,6 @@ const styles = StyleSheet.create({
26
25
  alignItems: 'flex-end',
27
26
  paddingHorizontal: STD_MARGIN * 1.2
28
27
  },
29
- headerProfileButton: {
30
- height: PROFILE_BUTTON_EDGE,
31
- width: PROFILE_BUTTON_EDGE,
32
- borderRadius: PROFILE_BUTTON_EDGE / 2,
33
- justifyContent: 'center',
34
- alignItems: 'center',
35
- backgroundColor: COLORS.black,
36
- marginLeft: STD_MARGIN
37
- },
38
28
  headerCenterSection: {
39
29
  flex: 2,
40
30
  justifyContent: 'center',
@@ -45,24 +35,12 @@ const styles = StyleSheet.create({
45
35
  color: COLORS.black,
46
36
  fontWeight: 'bold'
47
37
  },
48
- actionButtonClickable: {
49
- padding: STD_MARGIN
50
- },
51
- actionButtonText: {
52
- fontSize: HEADER_SLAB_HEIGHT / 2.5,
53
- color: COLORS.black7,
54
- fontWeight: 'bold'
55
- },
56
38
  alignStart: {
57
39
  alignItems: 'flex-start'
58
40
  },
59
41
  headerLogo: {
60
42
  width: HEADER_SLAB_HEIGHT * 2,
61
43
  flex: 1
62
- },
63
- profileInitial: {
64
- fontSize: HEADER_SLAB_HEIGHT / 3,
65
- color: COLORS.white
66
44
  }
67
45
  });
68
46
  export default styles;
@@ -1 +1 @@
1
- {"version":3,"names":["StyleSheet","HEADER_SLAB_HEIGHT","STD_MARGIN","COLORS","PROFILE_BUTTON_EDGE","styles","create","headerContainer","height","width","flexDirection","justifyContent","alignItems","zIndex","elevation","shadowColor","black","shadowOpacity","shadowOffset","shadowRadius","backgroundColor","white","headerSideSection","flex","paddingHorizontal","headerProfileButton","borderRadius","marginLeft","headerCenterSection","headerText","fontSize","color","fontWeight","actionButtonClickable","padding","actionButtonText","black7","alignStart","headerLogo","profileInitial"],"sourceRoot":"../../../../../../src","sources":["main/components/common/Header/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SACEC,kBAAkB,EAClBC,UAAU,QACL,iCAAiC;AACxC,SAASC,MAAM,QAAQ,2BAA2B;AAElD,MAAMC,mBAAmB,GAAGH,kBAAkB,GAAG,GAAG;AAEpD,MAAMI,MAAM,GAAGL,UAAU,CAACM,MAAM,CAAC;EAC/BC,eAAe,EAAE;IACfC,MAAM,EAAEP,kBAAkB;IAC1BQ,KAAK,EAAE,MAAM;IACbC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAEZ,MAAM,CAACa,KAAK;IACzBC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;MAAEV,MAAM,EAAE,EAAE;MAAEC,KAAK,EAAE;IAAE,CAAC;IACtCU,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAEjB,MAAM,CAACkB;EAC1B,CAAC;EACDC,iBAAiB,EAAE;IACjBC,IAAI,EAAE,CAAC;IACPZ,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,UAAU;IACtBY,iBAAiB,EAAEtB,UAAU,GAAG;EAClC,CAAC;EACDuB,mBAAmB,EAAE;IACnBjB,MAAM,EAAEJ,mBAAmB;IAC3BK,KAAK,EAAEL,mBAAmB;IAC1BsB,YAAY,EAAEtB,mBAAmB,GAAG,CAAC;IACrCO,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBQ,eAAe,EAAEjB,MAAM,CAACa,KAAK;IAC7BW,UAAU,EAAEzB;EACd,CAAC;EACD0B,mBAAmB,EAAE;IACnBL,IAAI,EAAE,CAAC;IACPZ,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDiB,UAAU,EAAE;IACVC,QAAQ,EAAE7B,kBAAkB,GAAG,GAAG;IAClC8B,KAAK,EAAE5B,MAAM,CAACa,KAAK;IACnBgB,UAAU,EAAE;EACd,CAAC;EACDC,qBAAqB,EAAE;IACrBC,OAAO,EAAEhC;EACX,CAAC;EACDiC,gBAAgB,EAAE;IAChBL,QAAQ,EAAE7B,kBAAkB,GAAG,GAAG;IAClC8B,KAAK,EAAE5B,MAAM,CAACiC,MAAM;IACpBJ,UAAU,EAAE;EACd,CAAC;EACDK,UAAU,EAAE;IACVzB,UAAU,EAAE;EACd,CAAC;EACD0B,UAAU,EAAE;IACV7B,KAAK,EAAER,kBAAkB,GAAG,CAAC;IAC7BsB,IAAI,EAAE;EACR,CAAC;EACDgB,cAAc,EAAE;IACdT,QAAQ,EAAE7B,kBAAkB,GAAG,CAAC;IAChC8B,KAAK,EAAE5B,MAAM,CAACkB;EAChB;AACF,CAAC,CAAC;AAEF,eAAehB,MAAM"}
1
+ {"version":3,"names":["StyleSheet","HEADER_SLAB_HEIGHT","STD_MARGIN","COLORS","styles","create","headerContainer","height","width","flexDirection","justifyContent","alignItems","zIndex","elevation","shadowColor","black","shadowOpacity","shadowOffset","shadowRadius","backgroundColor","white","headerSideSection","flex","paddingHorizontal","headerCenterSection","headerText","fontSize","color","fontWeight","alignStart","headerLogo"],"sourceRoot":"../../../../../../src","sources":["main/components/common/Header/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SACEC,kBAAkB,EAClBC,UAAU,QACL,iCAAiC;AACxC,SAASC,MAAM,QAAQ,2BAA2B;AAElD,MAAMC,MAAM,GAAGJ,UAAU,CAACK,MAAM,CAAC;EAC/BC,eAAe,EAAE;IACfC,MAAM,EAAEN,kBAAkB;IAC1BO,KAAK,EAAE,MAAM;IACbC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAEX,MAAM,CAACY,KAAK;IACzBC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;MAAEV,MAAM,EAAE,EAAE;MAAEC,KAAK,EAAE;IAAE,CAAC;IACtCU,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAEhB,MAAM,CAACiB;EAC1B,CAAC;EACDC,iBAAiB,EAAE;IACjBC,IAAI,EAAE,CAAC;IACPZ,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,UAAU;IACtBY,iBAAiB,EAAErB,UAAU,GAAG;EAClC,CAAC;EACDsB,mBAAmB,EAAE;IACnBF,IAAI,EAAE,CAAC;IACPZ,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDc,UAAU,EAAE;IACVC,QAAQ,EAAEzB,kBAAkB,GAAG,GAAG;IAClC0B,KAAK,EAAExB,MAAM,CAACY,KAAK;IACnBa,UAAU,EAAE;EACd,CAAC;EACDC,UAAU,EAAE;IACVlB,UAAU,EAAE;EACd,CAAC;EACDmB,UAAU,EAAE;IACVtB,KAAK,EAAEP,kBAAkB,GAAG,CAAC;IAC7BqB,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,eAAelB,MAAM"}
@@ -0,0 +1,45 @@
1
+ import React, { memo } from 'react';
2
+ import { Pressable, Text, View } from 'react-native';
3
+ import { DS_BUTTON_HIT_SLOP } from '../../../../constants/designTokens';
4
+ import styles from './styles';
5
+ const ActionButton = _ref => {
6
+ let {
7
+ label,
8
+ variant,
9
+ onPress,
10
+ disabled,
11
+ style,
12
+ progress
13
+ } = _ref;
14
+ const isOutline = variant === 'outline';
15
+ const hasProgress = progress !== undefined;
16
+ const clampedProgress = Math.min(Math.max(progress || 0, 0), 1);
17
+ return /*#__PURE__*/React.createElement(Pressable, {
18
+ accessibilityRole: "button",
19
+ accessibilityState: {
20
+ disabled: !!disabled
21
+ },
22
+ accessibilityLabel: label,
23
+ onPress: onPress,
24
+ disabled: disabled,
25
+ hitSlop: DS_BUTTON_HIT_SLOP,
26
+ style: _ref2 => {
27
+ let {
28
+ pressed
29
+ } = _ref2;
30
+ return [styles.button, isOutline ? styles.buttonOutline : styles.buttonFilled, variant === 'primary' && styles.buttonPrimary, variant === 'success' && styles.buttonSuccess, pressed && variant === 'primary' && styles.buttonPrimaryPressed, pressed && variant === 'success' && styles.buttonSuccessPressed, pressed && isOutline && styles.buttonOutlinePressed,
31
+ // A filling button reads as busy on its own; dimming it as well only
32
+ // makes the fill harder to see.
33
+ disabled && !hasProgress && styles.buttonDisabled, hasProgress && styles.buttonProgressTrack, style];
34
+ }
35
+ }, hasProgress ? /*#__PURE__*/React.createElement(View, {
36
+ pointerEvents: "none",
37
+ style: [styles.buttonProgressFill, {
38
+ width: `${clampedProgress * 100}%`
39
+ }]
40
+ }) : null, /*#__PURE__*/React.createElement(Text, {
41
+ style: [styles.buttonText, isOutline ? styles.buttonTextOutline : styles.buttonTextFilled]
42
+ }, label));
43
+ };
44
+ export default /*#__PURE__*/memo(ActionButton);
45
+ //# sourceMappingURL=ActionButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","memo","Pressable","Text","View","DS_BUTTON_HIT_SLOP","styles","ActionButton","_ref","label","variant","onPress","disabled","style","progress","isOutline","hasProgress","undefined","clampedProgress","Math","min","max","createElement","accessibilityRole","accessibilityState","accessibilityLabel","hitSlop","_ref2","pressed","button","buttonOutline","buttonFilled","buttonPrimary","buttonSuccess","buttonPrimaryPressed","buttonSuccessPressed","buttonOutlinePressed","buttonDisabled","buttonProgressTrack","pointerEvents","buttonProgressFill","width","buttonText","buttonTextOutline","buttonTextFilled"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/devMenu/components/ActionButton.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,SAAS,EAAaC,IAAI,EAAEC,IAAI,QAAmB,cAAc;AAE1E,SAASC,kBAAkB,QAAQ,oCAAoC;AAEvE,OAAOC,MAAM,MAAM,UAAU;AAkB7B,MAAMC,YAAqC,GAAGC,IAAA,IAOxC;EAAA,IAPyC;IAC7CC,KAAK;IACLC,OAAO;IACPC,OAAO;IACPC,QAAQ;IACRC,KAAK;IACLC;EACF,CAAC,GAAAN,IAAA;EACC,MAAMO,SAAS,GAAGL,OAAO,KAAK,SAAS;EACvC,MAAMM,WAAW,GAAGF,QAAQ,KAAKG,SAAS;EAC1C,MAAMC,eAAe,GAAGC,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,GAAG,CAACP,QAAQ,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;EAE/D,oBACEd,KAAA,CAAAsB,aAAA,CAACpB,SAAS;IACRqB,iBAAiB,EAAC,QAAQ;IAC1BC,kBAAkB,EAAE;MAAEZ,QAAQ,EAAE,CAAC,CAACA;IAAS,CAAE;IAC7Ca,kBAAkB,EAAEhB,KAAM;IAC1BE,OAAO,EAAEA,OAAQ;IACjBC,QAAQ,EAAEA,QAAS;IACnBc,OAAO,EAAErB,kBAAmB;IAC5BQ,KAAK,EAAEc,KAAA;MAAA,IAAC;QAAEC;MAAQ,CAAC,GAAAD,KAAA;MAAA,OAAK,CACtBrB,MAAM,CAACuB,MAAM,EACbd,SAAS,GAAGT,MAAM,CAACwB,aAAa,GAAGxB,MAAM,CAACyB,YAAY,EACtDrB,OAAO,KAAK,SAAS,IAAIJ,MAAM,CAAC0B,aAAa,EAC7CtB,OAAO,KAAK,SAAS,IAAIJ,MAAM,CAAC2B,aAAa,EAC7CL,OAAO,IAAIlB,OAAO,KAAK,SAAS,IAAIJ,MAAM,CAAC4B,oBAAoB,EAC/DN,OAAO,IAAIlB,OAAO,KAAK,SAAS,IAAIJ,MAAM,CAAC6B,oBAAoB,EAC/DP,OAAO,IAAIb,SAAS,IAAIT,MAAM,CAAC8B,oBAAoB;MACnD;MACA;MACAxB,QAAQ,IAAI,CAACI,WAAW,IAAIV,MAAM,CAAC+B,cAAc,EACjDrB,WAAW,IAAIV,MAAM,CAACgC,mBAAmB,EACzCzB,KAAK,CACN;IAAA;EAAC,GAEDG,WAAW,gBACVhB,KAAA,CAAAsB,aAAA,CAAClB,IAAI;IACHmC,aAAa,EAAC,MAAM;IACpB1B,KAAK,EAAE,CACLP,MAAM,CAACkC,kBAAkB,EACzB;MAAEC,KAAK,EAAG,GAAEvB,eAAe,GAAG,GAAI;IAAG,CAAC;EACtC,CACH,CAAC,GACA,IAAI,eACRlB,KAAA,CAAAsB,aAAA,CAACnB,IAAI;IACHU,KAAK,EAAE,CACLP,MAAM,CAACoC,UAAU,EACjB3B,SAAS,GAAGT,MAAM,CAACqC,iBAAiB,GAAGrC,MAAM,CAACsC,gBAAgB;EAC9D,GAEDnC,KACG,CACG,CAAC;AAEhB,CAAC;AAED,4BAAeR,IAAI,CAACM,YAAY,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React, { memo } from 'react';
2
+ import { View } from 'react-native';
3
+ import CrossButton from '../../../common/CrossButton';
4
+ import Wordmark from './Wordmark';
5
+ import styles from './styles';
6
+ const AppHeader = _ref => {
7
+ let {
8
+ onClosePress
9
+ } = _ref;
10
+ return /*#__PURE__*/React.createElement(View, {
11
+ style: styles.appHeader
12
+ }, /*#__PURE__*/React.createElement(Wordmark, null), /*#__PURE__*/React.createElement(CrossButton, {
13
+ onPress: onClosePress
14
+ }));
15
+ };
16
+ export default /*#__PURE__*/memo(AppHeader);
17
+ //# sourceMappingURL=AppHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","memo","View","CrossButton","Wordmark","styles","AppHeader","_ref","onClosePress","createElement","style","appHeader","onPress"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/devMenu/components/AppHeader.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,WAAW,MAAM,6BAA6B;AACrD,OAAOC,QAAQ,MAAM,YAAY;AAEjC,OAAOC,MAAM,MAAM,UAAU;AAM7B,MAAMC,SAA+B,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAa,CAAC,GAAAD,IAAA;EAAA,oBACvDP,KAAA,CAAAS,aAAA,CAACP,IAAI;IAACQ,KAAK,EAAEL,MAAM,CAACM;EAAU,gBAC5BX,KAAA,CAAAS,aAAA,CAACL,QAAQ,MAAE,CAAC,eACZJ,KAAA,CAAAS,aAAA,CAACN,WAAW;IAACS,OAAO,EAAEJ;EAAa,CAAE,CACjC,CAAC;AAAA,CACR;AAED,4BAAeP,IAAI,CAACK,SAAS,CAAC"}
@@ -0,0 +1,34 @@
1
+ import React, { memo } from 'react';
2
+ import { Pressable, Text, View } from 'react-native';
3
+ import Chevron from '../../../common/Chevron';
4
+ import { BUCKET_UPDATED_PREFIX, BUNDLE_COUNT_SUFFIX, BUNDLE_COUNT_SUFFIX_SINGULAR, META_SEPARATOR, VERSION_PREFIX } from '../../../../constants/appConstants';
5
+ import { parseDateTime } from '../../../../utils/dateUtil';
6
+ import styles from './styles';
7
+ const BucketRow = _ref => {
8
+ let {
9
+ id,
10
+ name,
11
+ updatedAt,
12
+ latestVersion,
13
+ onPress
14
+ } = _ref;
15
+ const meta = [`${VERSION_PREFIX}${latestVersion}`, `${latestVersion}${latestVersion === 1 ? BUNDLE_COUNT_SUFFIX_SINGULAR : BUNDLE_COUNT_SUFFIX}`, `${BUCKET_UPDATED_PREFIX}${parseDateTime(updatedAt)}`].join(META_SEPARATOR);
16
+ return /*#__PURE__*/React.createElement(Pressable, {
17
+ accessibilityRole: "button",
18
+ accessibilityLabel: name,
19
+ onPress: () => onPress(id),
20
+ style: [styles.card, styles.bucketRow]
21
+ }, /*#__PURE__*/React.createElement(View, {
22
+ style: styles.bucketTextBlock
23
+ }, /*#__PURE__*/React.createElement(Text, {
24
+ style: styles.bucketName,
25
+ numberOfLines: 1
26
+ }, name), /*#__PURE__*/React.createElement(Text, {
27
+ style: styles.bucketMeta,
28
+ numberOfLines: 1
29
+ }, meta)), /*#__PURE__*/React.createElement(Chevron, {
30
+ direction: "right"
31
+ }));
32
+ };
33
+ export default /*#__PURE__*/memo(BucketRow);
34
+ //# sourceMappingURL=BucketRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","memo","Pressable","Text","View","Chevron","BUCKET_UPDATED_PREFIX","BUNDLE_COUNT_SUFFIX","BUNDLE_COUNT_SUFFIX_SINGULAR","META_SEPARATOR","VERSION_PREFIX","parseDateTime","styles","BucketRow","_ref","id","name","updatedAt","latestVersion","onPress","meta","join","createElement","accessibilityRole","accessibilityLabel","style","card","bucketRow","bucketTextBlock","bucketName","numberOfLines","bucketMeta","direction"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/devMenu/components/BucketRow.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEpD,OAAOC,OAAO,MAAM,yBAAyB;AAC7C,SACEC,qBAAqB,EACrBC,mBAAmB,EACnBC,4BAA4B,EAC5BC,cAAc,EACdC,cAAc,QACT,oCAAoC;AAC3C,SAASC,aAAa,QAAQ,4BAA4B;AAE1D,OAAOC,MAAM,MAAM,UAAU;AAU7B,MAAMC,SAA+B,GAAGC,IAAA,IAMlC;EAAA,IANmC;IACvCC,EAAE;IACFC,IAAI;IACJC,SAAS;IACTC,aAAa;IACbC;EACF,CAAC,GAAAL,IAAA;EACC,MAAMM,IAAI,GAAG,CACV,GAAEV,cAAe,GAAEQ,aAAc,EAAC,EAClC,GAAEA,aAAc,GACfA,aAAa,KAAK,CAAC,GAAGV,4BAA4B,GAAGD,mBACtD,EAAC,EACD,GAAED,qBAAsB,GAAEK,aAAa,CAACM,SAAS,CAAE,EAAC,CACtD,CAACI,IAAI,CAACZ,cAAc,CAAC;EAEtB,oBACET,KAAA,CAAAsB,aAAA,CAACpB,SAAS;IACRqB,iBAAiB,EAAC,QAAQ;IAC1BC,kBAAkB,EAAER,IAAK;IACzBG,OAAO,EAAEA,CAAA,KAAMA,OAAO,CAACJ,EAAE,CAAE;IAC3BU,KAAK,EAAE,CAACb,MAAM,CAACc,IAAI,EAAEd,MAAM,CAACe,SAAS;EAAE,gBAEvC3B,KAAA,CAAAsB,aAAA,CAAClB,IAAI;IAACqB,KAAK,EAAEb,MAAM,CAACgB;EAAgB,gBAClC5B,KAAA,CAAAsB,aAAA,CAACnB,IAAI;IAACsB,KAAK,EAAEb,MAAM,CAACiB,UAAW;IAACC,aAAa,EAAE;EAAE,GAC9Cd,IACG,CAAC,eACPhB,KAAA,CAAAsB,aAAA,CAACnB,IAAI;IAACsB,KAAK,EAAEb,MAAM,CAACmB,UAAW;IAACD,aAAa,EAAE;EAAE,GAC9CV,IACG,CACF,CAAC,eACPpB,KAAA,CAAAsB,aAAA,CAACjB,OAAO;IAAC2B,SAAS,EAAC;EAAO,CAAE,CACnB,CAAC;AAEhB,CAAC;AAED,4BAAe/B,IAAI,CAACY,SAAS,CAAC"}