@expo/metro-runtime 2.2.7 → 3.0.1

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 (216) hide show
  1. package/README.md +17 -1
  2. package/async-require.d.ts +1 -1
  3. package/async-require.js +1 -1
  4. package/build/HMRClient.d.ts +1 -1
  5. package/build/HMRClient.d.ts.map +1 -1
  6. package/build/HMRClient.js +27 -27
  7. package/build/HMRClient.js.map +1 -1
  8. package/build/HMRClient.native.js +1 -1
  9. package/build/HMRClient.native.js.map +1 -1
  10. package/build/LoadingView.d.ts +1 -1
  11. package/build/LoadingView.d.ts.map +1 -1
  12. package/build/LoadingView.js +2 -6
  13. package/build/LoadingView.js.map +1 -1
  14. package/build/LoadingView.native.d.ts +2 -0
  15. package/build/LoadingView.native.d.ts.map +1 -1
  16. package/build/LoadingView.native.js +6 -1
  17. package/build/LoadingView.native.js.map +1 -1
  18. package/build/async-require/buildAsyncRequire.js.map +1 -1
  19. package/build/async-require/buildUrlForBundle.js +1 -1
  20. package/build/async-require/buildUrlForBundle.js.map +1 -1
  21. package/build/async-require/buildUrlForBundle.native.js +5 -4
  22. package/build/async-require/buildUrlForBundle.native.js.map +1 -1
  23. package/build/async-require/fetchAsync.d.ts.map +1 -1
  24. package/build/async-require/fetchAsync.js +2 -2
  25. package/build/async-require/fetchAsync.js.map +1 -1
  26. package/build/async-require/fetchAsync.native.d.ts +1 -1
  27. package/build/async-require/fetchAsync.native.d.ts.map +1 -1
  28. package/build/async-require/fetchAsync.native.js +10 -10
  29. package/build/async-require/fetchAsync.native.js.map +1 -1
  30. package/build/async-require/fetchThenEval.d.ts.map +1 -1
  31. package/build/async-require/fetchThenEval.js +2 -3
  32. package/build/async-require/fetchThenEval.js.map +1 -1
  33. package/build/async-require/fetchThenEval.web.d.ts.map +1 -1
  34. package/build/async-require/fetchThenEval.web.js +13 -22
  35. package/build/async-require/fetchThenEval.web.js.map +1 -1
  36. package/build/async-require/index.js +1 -3
  37. package/build/async-require/index.js.map +1 -1
  38. package/build/async-require/loadBundle.d.ts.map +1 -1
  39. package/build/async-require/loadBundle.js +8 -8
  40. package/build/async-require/loadBundle.js.map +1 -1
  41. package/build/effects.js +10 -10
  42. package/build/effects.js.map +1 -1
  43. package/build/effects.native.js +0 -1
  44. package/build/error-overlay/Data/LogBoxData.d.ts +5 -5
  45. package/build/error-overlay/Data/LogBoxData.d.ts.map +1 -1
  46. package/build/error-overlay/Data/LogBoxData.js +46 -48
  47. package/build/error-overlay/Data/LogBoxData.js.map +1 -1
  48. package/build/error-overlay/Data/LogBoxLog.d.ts +10 -10
  49. package/build/error-overlay/Data/LogBoxLog.d.ts.map +1 -1
  50. package/build/error-overlay/Data/LogBoxLog.js +44 -40
  51. package/build/error-overlay/Data/LogBoxLog.js.map +1 -1
  52. package/build/error-overlay/Data/LogBoxSymbolication.d.ts +2 -2
  53. package/build/error-overlay/Data/LogBoxSymbolication.js +5 -5
  54. package/build/error-overlay/Data/LogBoxSymbolication.js.map +1 -1
  55. package/build/error-overlay/Data/LogContext.d.ts +2 -2
  56. package/build/error-overlay/Data/LogContext.d.ts.map +1 -1
  57. package/build/error-overlay/Data/LogContext.js +4 -4
  58. package/build/error-overlay/Data/LogContext.js.map +1 -1
  59. package/build/error-overlay/Data/parseLogBoxLog.d.ts +2 -2
  60. package/build/error-overlay/Data/parseLogBoxLog.d.ts.map +1 -1
  61. package/build/error-overlay/Data/parseLogBoxLog.js +26 -31
  62. package/build/error-overlay/Data/parseLogBoxLog.js.map +1 -1
  63. package/build/error-overlay/ErrorOverlay.d.ts +10 -3
  64. package/build/error-overlay/ErrorOverlay.d.ts.map +1 -1
  65. package/build/error-overlay/ErrorOverlay.js +22 -21
  66. package/build/error-overlay/ErrorOverlay.js.map +1 -1
  67. package/build/error-overlay/LogBox.d.ts +2 -2
  68. package/build/error-overlay/LogBox.d.ts.map +1 -1
  69. package/build/error-overlay/LogBox.js +0 -1
  70. package/build/error-overlay/LogBox.js.map +1 -1
  71. package/build/error-overlay/LogBox.web.d.ts +3 -3
  72. package/build/error-overlay/LogBox.web.d.ts.map +1 -1
  73. package/build/error-overlay/LogBox.web.js +9 -12
  74. package/build/error-overlay/LogBox.web.js.map +1 -1
  75. package/build/error-overlay/UI/AnsiHighlight.d.ts +2 -2
  76. package/build/error-overlay/UI/AnsiHighlight.d.ts.map +1 -1
  77. package/build/error-overlay/UI/AnsiHighlight.js +21 -22
  78. package/build/error-overlay/UI/AnsiHighlight.js.map +1 -1
  79. package/build/error-overlay/UI/LogBoxButton.d.ts +1 -1
  80. package/build/error-overlay/UI/LogBoxButton.d.ts.map +1 -1
  81. package/build/error-overlay/UI/LogBoxButton.js +3 -5
  82. package/build/error-overlay/UI/LogBoxButton.js.map +1 -1
  83. package/build/error-overlay/UI/LogBoxMessage.d.ts +2 -2
  84. package/build/error-overlay/UI/LogBoxMessage.d.ts.map +1 -1
  85. package/build/error-overlay/UI/LogBoxMessage.js +4 -4
  86. package/build/error-overlay/UI/LogBoxMessage.js.map +1 -1
  87. package/build/error-overlay/UI/LogBoxStyle.d.ts +1 -1
  88. package/build/error-overlay/UI/LogBoxStyle.js +1 -1
  89. package/build/error-overlay/UI/LogBoxStyle.js.map +1 -1
  90. package/build/error-overlay/UI/constants.js +3 -3
  91. package/build/error-overlay/UI/constants.js.map +1 -1
  92. package/build/error-overlay/formatProjectFilePath.d.ts +1 -1
  93. package/build/error-overlay/formatProjectFilePath.d.ts.map +1 -1
  94. package/build/error-overlay/formatProjectFilePath.js +5 -7
  95. package/build/error-overlay/formatProjectFilePath.js.map +1 -1
  96. package/build/error-overlay/index.d.ts +1 -1
  97. package/build/error-overlay/index.d.ts.map +1 -1
  98. package/build/error-overlay/index.js +6 -5
  99. package/build/error-overlay/index.js.map +1 -1
  100. package/build/error-overlay/modules/ExceptionsManager/index.d.ts +1 -1
  101. package/build/error-overlay/modules/ExceptionsManager/index.d.ts.map +1 -1
  102. package/build/error-overlay/modules/ExceptionsManager/index.js +9 -14
  103. package/build/error-overlay/modules/ExceptionsManager/index.js.map +1 -1
  104. package/build/error-overlay/modules/ExceptionsManager/index.native.d.ts +2 -1
  105. package/build/error-overlay/modules/ExceptionsManager/index.native.d.ts.map +1 -1
  106. package/build/error-overlay/modules/ExceptionsManager/index.native.js +7 -2
  107. package/build/error-overlay/modules/ExceptionsManager/index.native.js.map +1 -1
  108. package/build/error-overlay/modules/NativeLogBox/index.d.ts.map +1 -1
  109. package/build/error-overlay/modules/NativeLogBox/index.js +5 -5
  110. package/build/error-overlay/modules/NativeLogBox/index.js.map +1 -1
  111. package/build/error-overlay/modules/NativeLogBox/index.native.d.ts +1 -1
  112. package/build/error-overlay/modules/NativeLogBox/index.native.d.ts.map +1 -1
  113. package/build/error-overlay/modules/NativeLogBox/index.native.js +0 -1
  114. package/build/error-overlay/modules/NativeLogBox/index.native.js.map +1 -1
  115. package/build/error-overlay/modules/openFileInEditor/index.js +4 -4
  116. package/build/error-overlay/modules/openFileInEditor/index.js.map +1 -1
  117. package/build/error-overlay/modules/openFileInEditor/index.native.d.ts +1 -1
  118. package/build/error-overlay/modules/openFileInEditor/index.native.d.ts.map +1 -1
  119. package/build/error-overlay/modules/openFileInEditor/index.native.js +0 -1
  120. package/build/error-overlay/modules/openFileInEditor/index.native.js.map +1 -1
  121. package/build/error-overlay/modules/parseErrorStack/index.d.ts +1 -1
  122. package/build/error-overlay/modules/parseErrorStack/index.d.ts.map +1 -1
  123. package/build/error-overlay/modules/parseErrorStack/index.js +5 -5
  124. package/build/error-overlay/modules/parseErrorStack/index.js.map +1 -1
  125. package/build/error-overlay/modules/parseErrorStack/parseHermesStack.d.ts +1 -1
  126. package/build/error-overlay/modules/parseErrorStack/parseHermesStack.js.map +1 -1
  127. package/build/error-overlay/modules/stringifySafe/index.d.ts +1 -1
  128. package/build/error-overlay/modules/stringifySafe/index.d.ts.map +1 -1
  129. package/build/error-overlay/modules/stringifySafe/index.js +14 -16
  130. package/build/error-overlay/modules/stringifySafe/index.js.map +1 -1
  131. package/build/error-overlay/modules/symbolicateStackTrace/index.d.ts +2 -2
  132. package/build/error-overlay/modules/symbolicateStackTrace/index.d.ts.map +1 -1
  133. package/build/error-overlay/modules/symbolicateStackTrace/index.js +5 -5
  134. package/build/error-overlay/modules/symbolicateStackTrace/index.js.map +1 -1
  135. package/build/error-overlay/modules/symbolicateStackTrace/index.native.d.ts +1 -1
  136. package/build/error-overlay/modules/symbolicateStackTrace/index.native.js.map +1 -1
  137. package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.d.ts +2 -2
  138. package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.d.ts.map +1 -1
  139. package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js +10 -11
  140. package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js.map +1 -1
  141. package/build/error-overlay/overlay/LogBoxInspectorFooter.d.ts.map +1 -1
  142. package/build/error-overlay/overlay/LogBoxInspectorFooter.js +27 -24
  143. package/build/error-overlay/overlay/LogBoxInspectorFooter.js.map +1 -1
  144. package/build/error-overlay/overlay/LogBoxInspectorHeader.d.ts +1 -1
  145. package/build/error-overlay/overlay/LogBoxInspectorHeader.d.ts.map +1 -1
  146. package/build/error-overlay/overlay/LogBoxInspectorHeader.js +18 -18
  147. package/build/error-overlay/overlay/LogBoxInspectorHeader.js.map +1 -1
  148. package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.d.ts +2 -2
  149. package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.d.ts.map +1 -1
  150. package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js +6 -6
  151. package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js.map +1 -1
  152. package/build/error-overlay/overlay/LogBoxInspectorSection.d.ts +2 -2
  153. package/build/error-overlay/overlay/LogBoxInspectorSection.js +4 -4
  154. package/build/error-overlay/overlay/LogBoxInspectorSection.js.map +1 -1
  155. package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.d.ts +2 -2
  156. package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.d.ts.map +1 -1
  157. package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js +13 -13
  158. package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js.map +1 -1
  159. package/build/error-overlay/overlay/LogBoxInspectorStackFrame.d.ts +2 -2
  160. package/build/error-overlay/overlay/LogBoxInspectorStackFrame.d.ts.map +1 -1
  161. package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js +9 -9
  162. package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js.map +1 -1
  163. package/build/error-overlay/overlay/LogBoxInspectorStackFrames.d.ts +2 -2
  164. package/build/error-overlay/overlay/LogBoxInspectorStackFrames.d.ts.map +1 -1
  165. package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js +24 -27
  166. package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js.map +1 -1
  167. package/build/error-overlay/toast/ErrorToast.d.ts +2 -2
  168. package/build/error-overlay/toast/ErrorToast.d.ts.map +1 -1
  169. package/build/error-overlay/toast/ErrorToast.js +35 -34
  170. package/build/error-overlay/toast/ErrorToast.js.map +1 -1
  171. package/build/error-overlay/toast/ErrorToastContainer.d.ts +1 -1
  172. package/build/error-overlay/toast/ErrorToastContainer.js.map +1 -1
  173. package/build/error-overlay/toast/ErrorToastContainer.web.d.ts +2 -2
  174. package/build/error-overlay/toast/ErrorToastContainer.web.d.ts.map +1 -1
  175. package/build/error-overlay/toast/ErrorToastContainer.web.js +6 -5
  176. package/build/error-overlay/toast/ErrorToastContainer.web.js.map +1 -1
  177. package/build/error-overlay/toast/ErrorToastMessage.d.ts +1 -1
  178. package/build/error-overlay/toast/ErrorToastMessage.d.ts.map +1 -1
  179. package/build/error-overlay/toast/ErrorToastMessage.js +4 -4
  180. package/build/error-overlay/toast/ErrorToastMessage.js.map +1 -1
  181. package/build/error-overlay/useRejectionHandler.d.ts +1 -1
  182. package/build/error-overlay/useRejectionHandler.d.ts.map +1 -1
  183. package/build/error-overlay/useRejectionHandler.js +11 -12
  184. package/build/error-overlay/useRejectionHandler.js.map +1 -1
  185. package/build/getDevServer.d.ts.map +1 -1
  186. package/build/getDevServer.js +4 -5
  187. package/build/getDevServer.js.map +1 -1
  188. package/build/getDevServer.native.d.ts +2 -0
  189. package/build/getDevServer.native.d.ts.map +1 -1
  190. package/build/getDevServer.native.js +6 -1
  191. package/build/getDevServer.native.js.map +1 -1
  192. package/build/index.d.ts +1 -2
  193. package/build/index.d.ts.map +1 -1
  194. package/build/index.js +4 -4
  195. package/build/index.js.map +1 -1
  196. package/build/location/Location.native.d.ts.map +1 -1
  197. package/build/location/Location.native.js +21 -20
  198. package/build/location/Location.native.js.map +1 -1
  199. package/build/location/install.js +0 -1
  200. package/build/location/install.native.d.ts +1 -1
  201. package/build/location/install.native.js +16 -22
  202. package/build/location/install.native.js.map +1 -1
  203. package/build/messageSocket.d.ts.map +1 -1
  204. package/build/messageSocket.js +5 -6
  205. package/build/messageSocket.js.map +1 -1
  206. package/build/setupFastRefresh.d.ts.map +1 -1
  207. package/build/setupFastRefresh.js +2 -4
  208. package/build/setupFastRefresh.js.map +1 -1
  209. package/build/setupHMR.js +1 -3
  210. package/build/setupHMR.js.map +1 -1
  211. package/build/symbolicate.d.ts +3 -3
  212. package/build/symbolicate.js.map +1 -1
  213. package/error-overlay.d.ts +1 -1
  214. package/error-overlay.js +1 -1
  215. package/package.json +25 -14
  216. package/LICENSE +0 -13
@@ -1,4 +1,4 @@
1
- import { GestureResponderEvent, Insets, ViewStyle } from "react-native";
1
+ import { GestureResponderEvent, Insets, ViewStyle } from 'react-native';
2
2
  type Props = {
3
3
  backgroundColor: {
4
4
  default: string;
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxButton.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxButton.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,qBAAqB,EACrB,MAAM,EAIN,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,KAAK,KAAK,GAAG;IACX,eAAe,EAAE;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1D,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,eA2CxC"}
1
+ {"version":3,"file":"LogBoxButton.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxButton.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAA6B,SAAS,EAAE,MAAM,cAAc,CAAC;AAInG,KAAK,KAAK,GAAG;IACX,eAAe,EAAE;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1D,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,eAuCxC"}
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.LogBoxButton = void 0;
27
27
  /**
28
- * Copyright (c) Evan Bacon.
28
+ * Copyright (c) 650 Industries.
29
29
  * Copyright (c) Meta Platforms, Inc. and affiliates.
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
@@ -45,12 +45,10 @@ function LogBoxButton(props) {
45
45
  }
46
46
  const content = (react_1.default.createElement(react_native_1.View, { style: [
47
47
  {
48
- backgroundColor: pressed
49
- ? backgroundColor.pressed
50
- : backgroundColor.default,
48
+ backgroundColor: pressed ? backgroundColor.pressed : backgroundColor.default,
51
49
  ...react_native_1.Platform.select({
52
50
  web: {
53
- cursor: "pointer",
51
+ cursor: 'pointer',
54
52
  },
55
53
  }),
56
54
  },
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxButton.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAwC;AACxC,+CAOsB;AAEtB,2DAA6C;AAa7C,SAAgB,YAAY,CAAC,KAAY;IACvC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,IAAI,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;IAC5C,IAAI,CAAC,eAAe,EAAE;QACpB,eAAe,GAAG;YAChB,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC7C,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,GAAG,CAAC;SAC7C,CAAC;KACH;IAED,MAAM,OAAO,GAAG,CACd,8BAAC,mBAAI,IACH,KAAK,EAAE;YACL;gBACE,eAAe,EAAE,OAAO;oBACtB,CAAC,CAAC,eAAe,CAAC,OAAO;oBACzB,CAAC,CAAC,eAAe,CAAC,OAAO;gBAC3B,GAAG,uBAAQ,CAAC,MAAM,CAAC;oBACjB,GAAG,EAAE;wBACH,MAAM,EAAE,SAAS;qBAClB;iBACF,CAAC;aACH;YACD,KAAK,CAAC,KAAK;SACZ,IAEA,KAAK,CAAC,QAAQ,CACV,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAC7B,OAAO,CACR,CAAC,CAAC,CAAC,CACF,8BAAC,wBAAS,IACR,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EACjC,UAAU,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAElC,OAAO,CACE,CACb,CAAC;AACJ,CAAC;AA3CD,oCA2CC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React, { useState } from \"react\";\nimport {\n GestureResponderEvent,\n Insets,\n Platform,\n Pressable,\n View,\n ViewStyle,\n} from \"react-native\";\n\nimport * as LogBoxStyle from \"./LogBoxStyle\";\n\ntype Props = {\n backgroundColor: {\n default: string;\n pressed: string;\n };\n children?: any;\n hitSlop?: Insets;\n onPress?: ((event: GestureResponderEvent) => void) | null;\n style?: ViewStyle;\n};\n\nexport function LogBoxButton(props: Props) {\n const [pressed, setPressed] = useState(false);\n\n let backgroundColor = props.backgroundColor;\n if (!backgroundColor) {\n backgroundColor = {\n default: LogBoxStyle.getBackgroundColor(0.95),\n pressed: LogBoxStyle.getBackgroundColor(0.6),\n };\n }\n\n const content = (\n <View\n style={[\n {\n backgroundColor: pressed\n ? backgroundColor.pressed\n : backgroundColor.default,\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n },\n }),\n },\n props.style,\n ]}\n >\n {props.children}\n </View>\n );\n\n return props.onPress == null ? (\n content\n ) : (\n <Pressable\n hitSlop={props.hitSlop}\n onPress={props.onPress}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n >\n {content}\n </Pressable>\n );\n}\n"]}
1
+ {"version":3,"file":"LogBoxButton.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAwC;AACxC,+CAAmG;AAEnG,2DAA6C;AAa7C,SAAgB,YAAY,CAAC,KAAY;IACvC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,IAAI,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;IAC5C,IAAI,CAAC,eAAe,EAAE;QACpB,eAAe,GAAG;YAChB,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC7C,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,GAAG,CAAC;SAC7C,CAAC;KACH;IAED,MAAM,OAAO,GAAG,CACd,8BAAC,mBAAI,IACH,KAAK,EAAE;YACL;gBACE,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO;gBAC5E,GAAG,uBAAQ,CAAC,MAAM,CAAC;oBACjB,GAAG,EAAE;wBACH,MAAM,EAAE,SAAS;qBAClB;iBACF,CAAC;aACH;YACD,KAAK,CAAC,KAAK;SACZ,IACA,KAAK,CAAC,QAAQ,CACV,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAC7B,OAAO,CACR,CAAC,CAAC,CAAC,CACF,8BAAC,wBAAS,IACR,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EACjC,UAAU,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAClC,OAAO,CACE,CACb,CAAC;AACJ,CAAC;AAvCD,oCAuCC","sourcesContent":["/**\n * Copyright (c) 650 Industries.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React, { useState } from 'react';\nimport { GestureResponderEvent, Insets, Platform, Pressable, View, ViewStyle } from 'react-native';\n\nimport * as LogBoxStyle from './LogBoxStyle';\n\ntype Props = {\n backgroundColor: {\n default: string;\n pressed: string;\n };\n children?: any;\n hitSlop?: Insets;\n onPress?: ((event: GestureResponderEvent) => void) | null;\n style?: ViewStyle;\n};\n\nexport function LogBoxButton(props: Props) {\n const [pressed, setPressed] = useState(false);\n\n let backgroundColor = props.backgroundColor;\n if (!backgroundColor) {\n backgroundColor = {\n default: LogBoxStyle.getBackgroundColor(0.95),\n pressed: LogBoxStyle.getBackgroundColor(0.6),\n };\n }\n\n const content = (\n <View\n style={[\n {\n backgroundColor: pressed ? backgroundColor.pressed : backgroundColor.default,\n ...Platform.select({\n web: {\n cursor: 'pointer',\n },\n }),\n },\n props.style,\n ]}>\n {props.children}\n </View>\n );\n\n return props.onPress == null ? (\n content\n ) : (\n <Pressable\n hitSlop={props.hitSlop}\n onPress={props.onPress}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}>\n {content}\n </Pressable>\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { StyleProp, TextStyle } from "react-native";
2
- import type { Message } from "../Data/parseLogBoxLog";
1
+ import { StyleProp, TextStyle } from 'react-native';
2
+ import type { Message } from '../Data/parseLogBoxLog';
3
3
  type Props = {
4
4
  message: Message;
5
5
  style: StyleProp<TextStyle>;
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxMessage.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxMessage.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAKF,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA4DvD"}
1
+ {"version":3,"file":"LogBoxMessage.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxMessage.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAKF,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAkDvD"}
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.LogBoxMessage = void 0;
7
7
  /**
8
- * Copyright (c) Evan Bacon.
8
+ * Copyright (c) 650 Industries.
9
9
  * Copyright (c) Meta Platforms, Inc. and affiliates.
10
10
  *
11
11
  * This source code is licensed under the MIT license found in the
@@ -13,7 +13,7 @@ exports.LogBoxMessage = void 0;
13
13
  */
14
14
  const react_1 = __importDefault(require("react"));
15
15
  const react_native_1 = require("react-native");
16
- const cleanContent = (content) => content.replace(/^(TransformError |Warning: (Warning: )?|Error: )/g, "");
16
+ const cleanContent = (content) => content.replace(/^(TransformError |Warning: (Warning: )?|Error: )/g, '');
17
17
  function LogBoxMessage(props) {
18
18
  const { content, substitutions } = props.message;
19
19
  if (props.plaintext === true) {
@@ -40,12 +40,12 @@ function LogBoxMessage(props) {
40
40
  createUnderLength(key, prevPart);
41
41
  }
42
42
  const substititionPart = content.substr(substitution.offset, substitution.length);
43
- createUnderLength(key + ".5", substititionPart, substitutionStyle);
43
+ createUnderLength(key + '.5', substititionPart, substitutionStyle);
44
44
  return substitution.offset + substitution.length;
45
45
  }, 0);
46
46
  if (lastOffset < content.length) {
47
47
  const lastPart = content.substr(lastOffset);
48
- createUnderLength("-1", lastPart);
48
+ createUnderLength('-1', lastPart);
49
49
  }
50
50
  return react_1.default.createElement(react_1.default.Fragment, null, elements);
51
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxMessage.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxMessage.tsx"],"names":[],"mappings":";;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAA0D;AAW1D,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,EAAE,CACvC,OAAO,CAAC,OAAO,CAAC,mDAAmD,EAAE,EAAE,CAAC,CAAC;AAE3E,SAAgB,aAAa,CAAC,KAAY;IACxC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAY,KAAK,CAAC,OAAO,CAAC;IAE1D,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI,EAAE;QAC5B,OAAO,8BAAC,mBAAI,QAAE,YAAY,CAAC,OAAO,CAAC,CAAQ,CAAC;KAC7C;IAED,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvE,MAAM,iBAAiB,GAAyB,KAAK,CAAC,KAAK,CAAC;IAC5D,MAAM,QAAQ,GAAkB,EAAE,CAAC;IACnC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,iBAAiB,GAAG,CACxB,GAAkB,EAClB,OAAe,EACf,KAA4B,EAC5B,EAAE;QACF,IAAI,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QAEzC,IAAI,KAAK,CAAC,SAAS,IAAI,IAAI,EAAE;YAC3B,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC;SAChE;QAED,IAAI,MAAM,GAAG,SAAS,EAAE;YACtB,QAAQ,CAAC,IAAI,CACX,8BAAC,mBAAI,IAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,IACzB,YAAY,CACR,CACR,CAAC;SACH;QAED,MAAM,IAAI,YAAY,CAAC,MAAM,CAAC;IAChC,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE;QAC1E,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAE1B,IAAI,YAAY,CAAC,MAAM,GAAG,UAAU,EAAE;YACpC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAC7B,UAAU,EACV,YAAY,CAAC,MAAM,GAAG,UAAU,CACjC,CAAC;YAEF,iBAAiB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;SAClC;QAED,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,CACrC,YAAY,CAAC,MAAM,EACnB,YAAY,CAAC,MAAM,CACpB,CAAC;QAEF,iBAAiB,CAAC,GAAG,GAAG,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;QACnE,OAAO,YAAY,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;IACnD,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,IAAI,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE;QAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5C,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KACnC;IAED,OAAO,8DAAG,QAAQ,CAAI,CAAC;AACzB,CAAC;AA5DD,sCA4DC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from \"react\";\nimport { StyleProp, Text, TextStyle } from \"react-native\";\n\nimport type { Message } from \"../Data/parseLogBoxLog\";\n\ntype Props = {\n message: Message;\n style: StyleProp<TextStyle>;\n plaintext?: boolean;\n maxLength?: number;\n};\n\nconst cleanContent = (content: string) =>\n content.replace(/^(TransformError |Warning: (Warning: )?|Error: )/g, \"\");\n\nexport function LogBoxMessage(props: Props): JSX.Element {\n const { content, substitutions }: Message = props.message;\n\n if (props.plaintext === true) {\n return <Text>{cleanContent(content)}</Text>;\n }\n\n const maxLength = props.maxLength != null ? props.maxLength : Infinity;\n const substitutionStyle: StyleProp<TextStyle> = props.style;\n const elements: JSX.Element[] = [];\n let length = 0;\n const createUnderLength = (\n key: string | \"-1\",\n message: string,\n style?: StyleProp<TextStyle>\n ) => {\n let cleanMessage = cleanContent(message);\n\n if (props.maxLength != null) {\n cleanMessage = cleanMessage.slice(0, props.maxLength - length);\n }\n\n if (length < maxLength) {\n elements.push(\n <Text key={key} style={style}>\n {cleanMessage}\n </Text>\n );\n }\n\n length += cleanMessage.length;\n };\n\n const lastOffset = substitutions.reduce((prevOffset, substitution, index) => {\n const key = String(index);\n\n if (substitution.offset > prevOffset) {\n const prevPart = content.substr(\n prevOffset,\n substitution.offset - prevOffset\n );\n\n createUnderLength(key, prevPart);\n }\n\n const substititionPart = content.substr(\n substitution.offset,\n substitution.length\n );\n\n createUnderLength(key + \".5\", substititionPart, substitutionStyle);\n return substitution.offset + substitution.length;\n }, 0);\n\n if (lastOffset < content.length) {\n const lastPart = content.substr(lastOffset);\n createUnderLength(\"-1\", lastPart);\n }\n\n return <>{elements}</>;\n}\n"]}
1
+ {"version":3,"file":"LogBoxMessage.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxMessage.tsx"],"names":[],"mappings":";;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAA0D;AAW1D,MAAM,YAAY,GAAG,CAAC,OAAe,E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,MAAM,GAAG,UAAU,EAAE;YACpC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC;YAE9E,iBAAiB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;SAClC;QAED,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;QAElF,iBAAiB,CAAC,GAAG,GAAG,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;QACnE,OAAO,YAAY,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;IACnD,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,IAAI,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE;QAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5C,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KACnC;IAED,OAAO,8DAAG,QAAQ,CAAI,CAAC;AACzB,CAAC;AAlDD,sCAkDC","sourcesContent":["/**\n * Copyright (c) 650 Industries.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from 'react';\nimport { StyleProp, Text, TextStyle } from 'react-native';\n\nimport type { Message } from '../Data/parseLogBoxLog';\n\ntype Props = {\n message: Message;\n style: StyleProp<TextStyle>;\n plaintext?: boolean;\n maxLength?: number;\n};\n\nconst cleanContent = (content: string) =>\n content.replace(/^(TransformError |Warning: (Warning: )?|Error: )/g, '');\n\nexport function LogBoxMessage(props: Props): JSX.Element {\n const { content, substitutions }: Message = props.message;\n\n if (props.plaintext === true) {\n return <Text>{cleanContent(content)}</Text>;\n }\n\n const maxLength = props.maxLength != null ? props.maxLength : Infinity;\n const substitutionStyle: StyleProp<TextStyle> = props.style;\n const elements: JSX.Element[] = [];\n let length = 0;\n const createUnderLength = (key: string | '-1', message: string, style?: StyleProp<TextStyle>) => {\n let cleanMessage = cleanContent(message);\n\n if (props.maxLength != null) {\n cleanMessage = cleanMessage.slice(0, props.maxLength - length);\n }\n\n if (length < maxLength) {\n elements.push(\n <Text key={key} style={style}>\n {cleanMessage}\n </Text>\n );\n }\n\n length += cleanMessage.length;\n };\n\n const lastOffset = substitutions.reduce((prevOffset, substitution, index) => {\n const key = String(index);\n\n if (substitution.offset > prevOffset) {\n const prevPart = content.substr(prevOffset, substitution.offset - prevOffset);\n\n createUnderLength(key, prevPart);\n }\n\n const substititionPart = content.substr(substitution.offset, substitution.length);\n\n createUnderLength(key + '.5', substititionPart, substitutionStyle);\n return substitution.offset + substitution.length;\n }, 0);\n\n if (lastOffset < content.length) {\n const lastPart = content.substr(lastOffset);\n createUnderLength('-1', lastPart);\n }\n\n return <>{elements}</>;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) Evan Bacon.
2
+ * Copyright (c) 650 Industries.
3
3
  * Copyright (c) Meta Platforms, Inc. and affiliates.
4
4
  *
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) Evan Bacon.
3
+ * Copyright (c) 650 Industries.
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
6
6
  * This source code is licensed under the MIT license found in the
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxStyle.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxStyle.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,SAAgB,kBAAkB,CAAC,OAAgB;IACjD,OAAO,iBAAiB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;IACzD,+DAA+D;AACjE,CAAC;AAHD,gDAGC;AAED,SAAgB,uBAAuB,CAAC,OAAgB;IACtD,OAAO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AAW,CAAC,OAAgB;IAC1C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC;AAFD,kCAEC;AAED,SAAgB,wBAAwB,CAAC,OAAgB;IACvD,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAFD,4DAEC;AAED,SAAgB,eAAe,CAAC,OAAgB;IAC9C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC;AAFD,0CAEC;AAED,SAAgB,iBAAiB,CAAC,OAAgB;IAChD,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAFD,8CAEC;AAED,SAAgB,YAAY,CAAC,OAAgB;IAC3C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC;AAFD,oCAEC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport function getBackgroundColor(opacity?: number): string {\n return `rgba(0, 0, 0, ${opacity == null ? 1 : opacity})`;\n // return `rgba(51, 51, 51, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getBackgroundLightColor(opacity?: number): string {\n return `rgba(69, 69, 69, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getBackgroundDarkColor(opacity?: number): string {\n return `rgba(34, 34, 34, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getWarningColor(opacity?: number): string {\n return `rgba(250, 186, 48, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getWarningDarkColor(opacity?: number): string {\n return `rgba(224, 167, 8, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getFatalColor(opacity?: number): string {\n return `rgba(243, 83, 105, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getFatalDarkColor(opacity?: number): string {\n return `rgba(208, 75, 95, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getErrorColor(opacity?: number): string {\n return `rgba(243, 83, 105, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getErrorDarkColor(opacity?: number): string {\n return `rgba(208, 75, 95, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getLogColor(opacity?: number): string {\n return `rgba(119, 119, 119, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getWarningHighlightColor(opacity?: number): string {\n return `rgba(252, 176, 29, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getDividerColor(opacity?: number): string {\n return `rgba(255, 255, 255, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getHighlightColor(opacity?: number): string {\n return `rgba(252, 176, 29, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getTextColor(opacity?: number): string {\n return `rgba(255, 255, 255, ${opacity == null ? 1 : opacity})`;\n}\n"]}
1
+ {"version":3,"file":"LogBoxStyle.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxStyle.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,SAAgB,kBAAkB,CAAC,OAAgB;IACjD,OAAO,iBAAiB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;IACzD,+DAA+D;AACjE,CAAC;AAHD,gDAGC;AAED,SAAgB,uBAAuB,CAAC,OAAgB;IACtD,OAAO,oBAAoB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAC9D,CAAC;AAFD,0DAEC;AAED,SAAgB,sBAAsB,C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kCAEC;AAED,SAAgB,wBAAwB,CAAC,OAAgB;IACvD,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAFD,4DAEC;AAED,SAAgB,eAAe,CAAC,OAAgB;IAC9C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC;AAFD,0CAEC;AAED,SAAgB,iBAAiB,CAAC,OAAgB;IAChD,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAFD,8CAEC;AAED,SAAgB,YAAY,CAAC,OAAgB;IAC3C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC;AAFD,oCAEC","sourcesContent":["/**\n * Copyright (c) 650 Industries.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport function getBackgroundColor(opacity?: number): string {\n return `rgba(0, 0, 0, ${opacity == null ? 1 : opacity})`;\n // return `rgba(51, 51, 51, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getBackgroundLightColor(opacity?: number): string {\n return `rgba(69, 69, 69, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getBackgroundDarkColor(opacity?: number): string {\n return `rgba(34, 34, 34, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getWarningColor(opacity?: number): string {\n return `rgba(250, 186, 48, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getWarningDarkColor(opacity?: number): string {\n return `rgba(224, 167, 8, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getFatalColor(opacity?: number): string {\n return `rgba(243, 83, 105, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getFatalDarkColor(opacity?: number): string {\n return `rgba(208, 75, 95, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getErrorColor(opacity?: number): string {\n return `rgba(243, 83, 105, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getErrorDarkColor(opacity?: number): string {\n return `rgba(208, 75, 95, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getLogColor(opacity?: number): string {\n return `rgba(119, 119, 119, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getWarningHighlightColor(opacity?: number): string {\n return `rgba(252, 176, 29, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getDividerColor(opacity?: number): string {\n return `rgba(255, 255, 255, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getHighlightColor(opacity?: number): string {\n return `rgba(252, 176, 29, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getTextColor(opacity?: number): string {\n return `rgba(255, 255, 255, ${opacity == null ? 1 : opacity})`;\n}\n"]}
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CODE_FONT = void 0;
4
4
  const react_native_1 = require("react-native");
5
5
  exports.CODE_FONT = react_native_1.Platform.select({
6
- default: "Courier",
7
- ios: "Courier New",
8
- android: "monospace",
6
+ default: 'Courier',
7
+ ios: 'Courier New',
8
+ android: 'monospace',
9
9
  });
10
10
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/constants.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AAE3B,QAAA,SAAS,GAAG,uBAAQ,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,aAAa;IAClB,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC","sourcesContent":["import { Platform } from \"react-native\";\n\nexport const CODE_FONT = Platform.select({\n default: \"Courier\",\n ios: \"Courier New\",\n android: \"monospace\",\n});\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/constants.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AAE3B,QAAA,SAAS,GAAG,uBAAQ,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,aAAa;IAClB,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC","sourcesContent":["import { Platform } from 'react-native';\n\nexport const CODE_FONT = Platform.select({\n default: 'Courier',\n ios: 'Courier New',\n android: 'monospace',\n});\n"]}
@@ -1,4 +1,4 @@
1
- import type { StackFrame } from "stacktrace-parser";
1
+ import type { StackFrame } from 'stacktrace-parser';
2
2
  export type MetroStackFrame = StackFrame & {
3
3
  collapse?: boolean;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"formatProjectFilePath.d.ts","sourceRoot":"","sources":["../../src/error-overlay/formatProjectFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAElE,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GACnB,MAAM,CASR;AAeD,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,eAAe,UAYvB"}
1
+ {"version":3,"file":"formatProjectFilePath.d.ts","sourceRoot":"","sources":["../../src/error-overlay/formatProjectFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAElE,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CASvF;AAeD,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,UASpF"}
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getStackFormattedLocation = exports.formatProjectFilePath = void 0;
4
4
  function formatProjectFilePath(projectRoot, file) {
5
5
  if (file == null) {
6
- return "<unknown>";
6
+ return '<unknown>';
7
7
  }
8
- return pathRelativeToPath(file.replace(/\\/g, "/"), projectRoot.replace(/\\/g, "/")).replace(/\?.*$/, "");
8
+ return pathRelativeToPath(file.replace(/\\/g, '/'), projectRoot.replace(/\\/g, '/')).replace(/\?.*$/, '');
9
9
  }
10
10
  exports.formatProjectFilePath = formatProjectFilePath;
11
- function pathRelativeToPath(path, relativeTo, sep = "/") {
11
+ function pathRelativeToPath(path, relativeTo, sep = '/') {
12
12
  const relativeToParts = relativeTo.split(sep);
13
13
  const pathParts = path.split(sep);
14
14
  let i = 0;
@@ -24,10 +24,8 @@ function getStackFormattedLocation(projectRoot, frame) {
24
24
  const column = frame.column != null && parseInt(String(frame.column), 10);
25
25
  const location = formatProjectFilePath(projectRoot, frame.file) +
26
26
  (frame.lineNumber != null
27
- ? ":" +
28
- frame.lineNumber +
29
- (column && !isNaN(column) ? ":" + (column + 1) : "")
30
- : "");
27
+ ? ':' + frame.lineNumber + (column && !isNaN(column) ? ':' + (column + 1) : '')
28
+ : '');
31
29
  return location;
32
30
  }
33
31
  exports.getStackFormattedLocation = getStackFormattedLocation;
@@ -1 +1 @@
1
- {"version":3,"file":"formatProjectFilePath.js","sourceRoot":"","sources":["../../src/error-overlay/formatProjectFilePath.ts"],"names":[],"mappings":";;;AAIA,SAAgB,qBAAqB,CACnC,WAAmB,EACnB,IAAoB;IAEpB,IAAI,IAAI,IAAI,IAAI,EAAE;QAChB,OAAO,WAAW,CAAC;KACpB;IAED,OAAO,kBAAkB,CACvB,IAAI,CAAC,OAAO,C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,OAAO,QAAQ,CAAC;AAClB,CAAC;AAdD,8DAcC","sourcesContent":["import type { StackFrame } from \"stacktrace-parser\";\n\nexport type MetroStackFrame = StackFrame & { collapse?: boolean };\n\nexport function formatProjectFilePath(\n projectRoot: string,\n file?: string | null\n): string {\n if (file == null) {\n return \"<unknown>\";\n }\n\n return pathRelativeToPath(\n file.replace(/\\\\/g, \"/\"),\n projectRoot.replace(/\\\\/g, \"/\")\n ).replace(/\\?.*$/, \"\");\n}\n\nfunction pathRelativeToPath(path: string, relativeTo: string, sep = \"/\") {\n const relativeToParts = relativeTo.split(sep);\n const pathParts = path.split(sep);\n let i = 0;\n while (i < relativeToParts.length && i < pathParts.length) {\n if (relativeToParts[i] !== pathParts[i]) {\n break;\n }\n i++;\n }\n return pathParts.slice(i).join(sep);\n}\n\nexport function getStackFormattedLocation(\n projectRoot: string,\n frame: MetroStackFrame\n) {\n const column = frame.column != null && parseInt(String(frame.column), 10);\n const location =\n formatProjectFilePath(projectRoot, frame.file) +\n (frame.lineNumber != null\n ? \":\" +\n frame.lineNumber +\n (column && !isNaN(column) ? \":\" + (column + 1) : \"\")\n : \"\");\n\n return location;\n}\n"]}
1
+ {"version":3,"file":"formatProjectFilePath.js","sourceRoot":"","sources":["../../src/error-overlay/formatProjectFilePath.ts"],"names":[],"mappings":";;;AAIA,SAAgB,qBAAqB,CAAC,WAAmB,EAAE,IAAoB;IAC7E,IAAI,IAAI,IAAI,IAAI,EAAE;QAChB,OAAO,WAAW,CAAC;KACpB;IAED,OAAO,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAC1F,OAAO,EACP,EAAE,CACH,CAAC;AACJ,CAAC;AATD,sDASC;AAED,SAAS,kBAAkB,CAAC,IAAY,EAAE,UAAkB,EAAE,GAAG,GAAG,GAAG;IACrE,MAAM,eAAe,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,CAAC,GAAG,eAAe,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE;QACzD,IAAI,eAAe,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE;YACvC,MAAM;SACP;QACD,CAAC,EAAE,CAAC;KACL;IACD,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC;AAED,SAAgB,yBAAyB,CAAC,WAAmB,EAAE,KAAsB;IACnF,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1E,MAAM,QAAQ,GACZ,qBAAqB,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC;QAC9C,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI;YACvB,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/E,CAAC,CAAC,EAAE,CAAC,CAAC;IAEV,OAAO,QAAQ,CAAC;AAClB,CAAC;AATD,8DASC","sourcesContent":["import type { StackFrame } from 'stacktrace-parser';\n\nexport type MetroStackFrame = StackFrame & { collapse?: boolean };\n\nexport function formatProjectFilePath(projectRoot: string, file?: string | null): string {\n if (file == null) {\n return '<unknown>';\n }\n\n return pathRelativeToPath(file.replace(/\\\\/g, '/'), projectRoot.replace(/\\\\/g, '/')).replace(\n /\\?.*$/,\n ''\n );\n}\n\nfunction pathRelativeToPath(path: string, relativeTo: string, sep = '/') {\n const relativeToParts = relativeTo.split(sep);\n const pathParts = path.split(sep);\n let i = 0;\n while (i < relativeToParts.length && i < pathParts.length) {\n if (relativeToParts[i] !== pathParts[i]) {\n break;\n }\n i++;\n }\n return pathParts.slice(i).join(sep);\n}\n\nexport function getStackFormattedLocation(projectRoot: string, frame: MetroStackFrame) {\n const column = frame.column != null && parseInt(String(frame.column), 10);\n const location =\n formatProjectFilePath(projectRoot, frame.file) +\n (frame.lineNumber != null\n ? ':' + frame.lineNumber + (column && !isNaN(column) ? ':' + (column + 1) : '')\n : '');\n\n return location;\n}\n"]}
@@ -1,3 +1,3 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export declare function withErrorOverlay(Comp: React.ComponentType<any>): React.ComponentType<any> | ((props: any) => JSX.Element);
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error-overlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,uCAIzB,GAAG,kBAOxC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error-overlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAqB1B,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,uCAIzB,GAAG,kBAOxC"}
@@ -8,17 +8,18 @@ const react_1 = __importDefault(require("react"));
8
8
  const react_native_1 = require("react-native");
9
9
  const ErrorToastContainer_1 = __importDefault(require("./toast/ErrorToastContainer"));
10
10
  if (!global.setImmediate) {
11
- // @ts-expect-error: setImmediate is not defined in the global scope
12
11
  global.setImmediate = function (fn) {
13
12
  return setTimeout(fn, 0);
14
13
  };
15
14
  }
16
- if (process.env.NODE_ENV === "development" && react_native_1.Platform.OS === "web") {
17
- // Stack traces are big with React Navigation
18
- require("./LogBox").install();
15
+ if (process.env.NODE_ENV === 'development') {
16
+ if (react_native_1.Platform.OS === 'web') {
17
+ // Stack traces are big with React Navigation
18
+ require('./LogBox').default.install();
19
+ }
19
20
  }
20
21
  function withErrorOverlay(Comp) {
21
- if (process.env.NODE_ENV === "production") {
22
+ if (process.env.NODE_ENV === 'production') {
22
23
  return Comp;
23
24
  }
24
25
  return function ErrorOverlay(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error-overlay/index.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAwC;AAExC,sFAA8D;AAI9D,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;IACxB,oEAAoE;IACpE,MAAM,CAAC,YAAY,GAAG,UAAU,EAAE;QAChC,OAAO,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;CACH;AAED,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;IACnE,6CAA6C;IAE7C,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC;CAC/B;AAED,SAAgB,gBAAgB,CAAC,IAA8B;IAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,OAAO,IAAI,CAAC;KACb;IACD,OAAO,SAAS,YAAY,CAAC,KAAU;QACrC,OAAO,CACL,8BAAC,6BAAmB;YAClB,8BAAC,IAAI,OAAK,KAAK,GAAI,CACC,CACvB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAXD,4CAWC","sourcesContent":["import React from \"react\";\nimport { Platform } from \"react-native\";\n\nimport ErrorToastContainer from \"./toast/ErrorToastContainer\";\n\ndeclare const process: any;\n\nif (!global.setImmediate) {\n // @ts-expect-error: setImmediate is not defined in the global scope\n global.setImmediate = function (fn) {\n return setTimeout(fn, 0);\n };\n}\n\nif (process.env.NODE_ENV === \"development\" && Platform.OS === \"web\") {\n // Stack traces are big with React Navigation\n\n require(\"./LogBox\").install();\n}\n\nexport function withErrorOverlay(Comp: React.ComponentType<any>) {\n if (process.env.NODE_ENV === \"production\") {\n return Comp;\n }\n return function ErrorOverlay(props: any) {\n return (\n <ErrorToastContainer>\n <Comp {...props} />\n </ErrorToastContainer>\n );\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error-overlay/index.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAwC;AAExC,sFAA8D;AAI9D,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;IACxB,MAAM,CAAC,YAAY,GAAG,UAAU,EAAE;QAChC,OAAO,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;CACH;AAED,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;IAC1C,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QACzB,6CAA6C;QAE7C,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;KACvC;CACF;AAED,SAAgB,gBAAgB,CAAC,IAA8B;IAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,OAAO,IAAI,CAAC;KACb;IACD,OAAO,SAAS,YAAY,CAAC,KAAU;QACrC,OAAO,CACL,8BAAC,6BAAmB;YAClB,8BAAC,IAAI,OAAK,KAAK,GAAI,CACC,CACvB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAXD,4CAWC","sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\n\nimport ErrorToastContainer from './toast/ErrorToastContainer';\n\ndeclare const process: any;\n\nif (!global.setImmediate) {\n global.setImmediate = function (fn) {\n return setTimeout(fn, 0);\n };\n}\n\nif (process.env.NODE_ENV === 'development') {\n if (Platform.OS === 'web') {\n // Stack traces are big with React Navigation\n\n require('./LogBox').default.install();\n }\n}\n\nexport function withErrorOverlay(Comp: React.ComponentType<any>) {\n if (process.env.NODE_ENV === 'production') {\n return Comp;\n }\n return function ErrorOverlay(props: any) {\n return (\n <ErrorToastContainer>\n <Comp {...props} />\n </ErrorToastContainer>\n );\n };\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) Evan Bacon.
2
+ * Copyright (c) 650 Industries.
3
3
  * Copyright (c) Meta Platforms, Inc. and affiliates.
4
4
  *
5
5
  * This source code is licensed under the MIT license found in the
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,KAAK,aAAa,GAAG,GAAG,CAAC;AAEzB,cAAM,cAAe,SAAQ,KAAK;IAChC,IAAI,EAAE,MAAM,CAAM;CACnB;AAOD,iBAAS,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;EAoCzD;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,CAAC,EAAE,GAAG,QAa9B;AAED,QAAA,MAAM,UAAU;;;;CAIf,CAAC;AAGF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,KAAK,aAAa,GAAG,GAAG,CAAC;AAEzB,cAAM,cAAe,SAAQ,KAAK;IAChC,IAAI,EAAE,MAAM,CAAM;CACnB;AAOD,iBAAS,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;EAkCzD;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,CAAC,EAAE,GAAG,QAa9B;AAED,QAAA,MAAM,UAAU;;;;CAIf,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) Evan Bacon.
3
+ * Copyright (c) 650 Industries.
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
6
6
  * This source code is licensed under the MIT license found in the
@@ -12,34 +12,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  const parseErrorStack_1 = __importDefault(require("../parseErrorStack"));
14
14
  class SyntheticError extends Error {
15
- constructor() {
16
- super(...arguments);
17
- this.name = "";
18
- }
15
+ name = '';
19
16
  }
20
17
  /**
21
18
  * Handles the developer-visible aspect of errors and exceptions
22
19
  */
23
20
  let exceptionID = 0;
24
21
  function parseException(e, isFatal) {
25
- const stack = (0, parseErrorStack_1.default)(e === null || e === void 0 ? void 0 : e.stack);
22
+ const stack = (0, parseErrorStack_1.default)(e?.stack);
26
23
  const currentExceptionID = ++exceptionID;
27
- const originalMessage = e.message || "";
24
+ const originalMessage = e.message || '';
28
25
  let message = originalMessage;
29
26
  if (e.componentStack != null) {
30
27
  message += `\n\nThis error is located at:${e.componentStack}`;
31
28
  }
32
- const namePrefix = e.name == null || e.name === "" ? "" : `${e.name}: `;
29
+ const namePrefix = e.name == null || e.name === '' ? '' : `${e.name}: `;
33
30
  if (!message.startsWith(namePrefix)) {
34
31
  message = namePrefix + message;
35
32
  }
36
- message =
37
- e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;
33
+ message = e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;
38
34
  const data = {
39
35
  message,
40
36
  originalMessage: message === originalMessage ? null : originalMessage,
41
- name: e.name == null || e.name === "" ? null : e.name,
42
- componentStack: typeof e.componentStack === "string" ? e.componentStack : null,
37
+ name: e.name == null || e.name === '' ? null : e.name,
38
+ componentStack: typeof e.componentStack === 'string' ? e.componentStack : null,
43
39
  stack,
44
40
  id: currentExceptionID,
45
41
  isFatal,
@@ -68,13 +64,12 @@ function handleException(e) {
68
64
  // `throw '<error message>'` somewhere in your codebase.
69
65
  error = new SyntheticError(e);
70
66
  }
71
- require("../../LogBox").addException(parseException(error, true));
67
+ require('../../LogBox').default.addException(parseException(error, true));
72
68
  }
73
69
  const ErrorUtils = {
74
70
  parseException,
75
71
  handleException,
76
72
  SyntheticError,
77
73
  };
78
- module.exports = ErrorUtils;
79
74
  exports.default = ErrorUtils;
80
75
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAEH,yEAAiD;AAIjD,MAAM,cAAe,SAAQ,KAAK;IAAlC;;QACE,SAAI,GAAW,EAAE,CAAC;IACpB,CAAC;CAAA;AAED;;GAEG;AACH,IAAI,WAAW,GAAG,CAAC,CAAC;AAEpB,SAAS,cAAc,CAAC,CAAgB,EAAE,OAAgB;IACxD,MAAM,KAAK,GAAG,IAAA,yBAAe,EAAC,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,KAAK,CAAC,CAAC;IACxC,MAAM,kBAAkB,GAAG,EAAE,WAAW,CAAC;IACzC,MAAM,eAAe,GAAG,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IACxC,IAAI,OAAO,GAAG,eAAe,CAAC;IAC9B,IAAI,CAAC,CAAC,cAAc,IAAI,IAAI,EAAE;QAC5B,OAAO,IAAI,gCAAgC,CAAC,CAAC,cAAc,EAAE,CAAC;KAC/D;IACD,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;IAExE,IAAI,CAAC,OAAO,C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AAED,MAAM,UAAU,GAAG;IACjB,cAAc;IACd,eAAe;IACf,cAAc;CACf,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC;AAC5B,kBAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport parseErrorStack from \"../parseErrorStack\";\n\ntype ExtendedError = any;\n\nclass SyntheticError extends Error {\n name: string = \"\";\n}\n\n/**\n * Handles the developer-visible aspect of errors and exceptions\n */\nlet exceptionID = 0;\n\nfunction parseException(e: ExtendedError, isFatal: boolean) {\n const stack = parseErrorStack(e?.stack);\n const currentExceptionID = ++exceptionID;\n const originalMessage = e.message || \"\";\n let message = originalMessage;\n if (e.componentStack != null) {\n message += `\\n\\nThis error is located at:${e.componentStack}`;\n }\n const namePrefix = e.name == null || e.name === \"\" ? \"\" : `${e.name}: `;\n\n if (!message.startsWith(namePrefix)) {\n message = namePrefix + message;\n }\n\n message =\n e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;\n\n const data = {\n message,\n originalMessage: message === originalMessage ? null : originalMessage,\n name: e.name == null || e.name === \"\" ? null : e.name,\n componentStack:\n typeof e.componentStack === \"string\" ? e.componentStack : null,\n stack,\n id: currentExceptionID,\n isFatal,\n extraData: {\n jsEngine: e.jsEngine,\n rawStack: e.stack,\n },\n };\n\n return {\n ...data,\n isComponentError: !!e.isComponentError,\n };\n}\n\n/**\n * Logs exceptions to the (native) console and displays them\n */\nfunction handleException(e: any) {\n let error: Error;\n if (e instanceof Error) {\n error = e;\n } else {\n // Workaround for reporting errors caused by `throw 'some string'`\n // Unfortunately there is no way to figure out the stacktrace in this\n // case, so if you ended up here trying to trace an error, look for\n // `throw '<error message>'` somewhere in your codebase.\n error = new SyntheticError(e);\n }\n\n require(\"../../LogBox\").addException(parseException(error, true));\n}\n\nconst ErrorUtils = {\n parseException,\n handleException,\n SyntheticError,\n};\n\nmodule.exports = ErrorUtils;\nexport default ErrorUtils;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAEH,yEAAiD;AAIjD,MAAM,cAAe,SAAQ,KAAK;IAChC,IAAI,GAAW,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,IAAI,WAAW,GAAG,CAAC,CAAC;AAEpB,SAAS,cAAc,CAAC,CAAgB,EAAE,OAAgB;IACxD,MAAM,KAAK,GAAG,IAAA,yBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACxC,MAAM,kBAAkB,GAAG,EAAE,WAAW,CAAC;IACzC,MAAM,eAAe,GAAG,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IACxC,IAAI,OAAO,GAAG,eAAe,CAAC;IAC9B,IAAI,CAAC,CAAC,cAAc,IAAI,IAAI,EAAE;QAC5B,OAAO,IAAI,gCAAgC,CAAC,CAAC,cAAc,EAAE,CAAC;KAC/D;IACD,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;IAExE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;QACnC,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;KAChC;IAED,OAAO,GAAG,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,gBAAgB,CAAC,CAAC,QAAQ,EAAE,CAAC;IAEhF,MAAM,IAAI,GAAG;QACX,OAAO;QACP,eAAe,EAAE,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe;QACrE,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QACrD,cAAc,EAAE,OAAO,CAAC,CAAC,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI;QAC9E,KAAK;QACL,EAAE,EAAE,kBAAkB;QACtB,OAAO;QACP,SAAS,EAAE;YACT,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,QAAQ,EAAE,CAAC,CAAC,KAAK;SAClB;KACF,CAAC;IAEF,OAAO;QACL,GAAG,IAAI;QACP,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,gBAAgB;KACvC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,CAAM;IAC7B,IAAI,KAAY,CAAC;IACjB,IAAI,CAAC,YAAY,KAAK,EAAE;QACtB,KAAK,GAAG,CAAC,CAAC;KACX;SAAM;QACL,kEAAkE;QAClE,qEAAqE;QACrE,mEAAmE;QACnE,wDAAwD;QACxD,KAAK,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;KAC/B;IAED,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,GAAG;IACjB,cAAc;IACd,eAAe;IACf,cAAc;CACf,CAAC;AAEF,kBAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright (c) 650 Industries.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport parseErrorStack from '../parseErrorStack';\n\ntype ExtendedError = any;\n\nclass SyntheticError extends Error {\n name: string = '';\n}\n\n/**\n * Handles the developer-visible aspect of errors and exceptions\n */\nlet exceptionID = 0;\n\nfunction parseException(e: ExtendedError, isFatal: boolean) {\n const stack = parseErrorStack(e?.stack);\n const currentExceptionID = ++exceptionID;\n const originalMessage = e.message || '';\n let message = originalMessage;\n if (e.componentStack != null) {\n message += `\\n\\nThis error is located at:${e.componentStack}`;\n }\n const namePrefix = e.name == null || e.name === '' ? '' : `${e.name}: `;\n\n if (!message.startsWith(namePrefix)) {\n message = namePrefix + message;\n }\n\n message = e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;\n\n const data = {\n message,\n originalMessage: message === originalMessage ? null : originalMessage,\n name: e.name == null || e.name === '' ? null : e.name,\n componentStack: typeof e.componentStack === 'string' ? e.componentStack : null,\n stack,\n id: currentExceptionID,\n isFatal,\n extraData: {\n jsEngine: e.jsEngine,\n rawStack: e.stack,\n },\n };\n\n return {\n ...data,\n isComponentError: !!e.isComponentError,\n };\n}\n\n/**\n * Logs exceptions to the (native) console and displays them\n */\nfunction handleException(e: any) {\n let error: Error;\n if (e instanceof Error) {\n error = e;\n } else {\n // Workaround for reporting errors caused by `throw 'some string'`\n // Unfortunately there is no way to figure out the stacktrace in this\n // case, so if you ended up here trying to trace an error, look for\n // `throw '<error message>'` somewhere in your codebase.\n error = new SyntheticError(e);\n }\n\n require('../../LogBox').default.addException(parseException(error, true));\n}\n\nconst ErrorUtils = {\n parseException,\n handleException,\n SyntheticError,\n};\n\nexport default ErrorUtils;\n"]}
@@ -1,2 +1,3 @@
1
- declare const ExceptionsManager: any;
1
+ import ExceptionsManager from 'react-native/Library/Core/ExceptionsManager';
2
+ export default ExceptionsManager;
2
3
  //# sourceMappingURL=index.native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.native.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,iBAAiB,KAAyD,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.native.ts"],"names":[],"mappings":"AACA,OAAO,iBAAiB,MAAM,6CAA6C,CAAC;AAE5E,eAAe,iBAAiB,CAAC"}
@@ -1,4 +1,9 @@
1
1
  "use strict";
2
- const ExceptionsManager = require("react-native/Library/Core/ExceptionsManager");
3
- module.exports = ExceptionsManager;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ // @ts-expect-error
7
+ const ExceptionsManager_1 = __importDefault(require("react-native/Library/Core/ExceptionsManager"));
8
+ exports.default = ExceptionsManager_1.default;
4
9
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.native.ts"],"names":[],"mappings":";AAAA,MAAM,iBAAiB,GAAG,OAAO,CAAC,6CAA6C,CAAC,CAAC;AAEjF,MAAM,CAAC,OAAO,GAAG,iBAAiB,CAAC","sourcesContent":["const ExceptionsManager = require(\"react-native/Library/Core/ExceptionsManager\");\n\nmodule.exports = ExceptionsManager;\n"]}
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.native.ts"],"names":[],"mappings":";;;;;AAAA,mBAAmB;AACnB,oGAA4E;AAE5E,kBAAe,2BAAiB,CAAC","sourcesContent":["// @ts-expect-error\nimport ExceptionsManager from 'react-native/Library/Core/ExceptionsManager';\n\nexport default ExceptionsManager;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.tsx"],"names":[],"mappings":";;;;AAGA,wBAwBE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.tsx"],"names":[],"mappings":";;;;AAGA,wBAuBE"}
@@ -11,10 +11,10 @@ exports.default = {
11
11
  if (currentRoot) {
12
12
  return;
13
13
  }
14
- const ErrorOverlay = require("../../ErrorOverlay").default;
14
+ const ErrorOverlay = require('../../ErrorOverlay').default;
15
15
  // Create a new div with ID `error-overlay` element and render LogBoxInspector into it.
16
- const div = document.createElement("div");
17
- div.id = "error-overlay";
16
+ const div = document.createElement('div');
17
+ div.id = 'error-overlay';
18
18
  document.body.appendChild(div);
19
19
  currentRoot = client_1.default.createRoot(div);
20
20
  currentRoot.render(react_1.default.createElement(ErrorOverlay, null));
@@ -25,8 +25,8 @@ exports.default = {
25
25
  currentRoot.unmount();
26
26
  currentRoot = null;
27
27
  }
28
- const div = document.getElementById("error-overlay");
29
- div === null || div === void 0 ? void 0 : div.remove();
28
+ const div = document.getElementById('error-overlay');
29
+ div?.remove();
30
30
  },
31
31
  };
32
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,8DAAwC;AACxC,IAAI,WAAW,GAAyB,IAAI,CAAC;AAC7C,kBAAe;IACb,IAAI;QACF,IAAI,WAAW,EAAE;YACf,OAAO;SACR;QACD,MAAM,YAAY,GAChB,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;QACxC,uFAAuF;QACvF,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,EAAE,GAAG,eAAe,CAAC;QACzB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAE/B,WAAW,GAAG,gBAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACvC,WAAW,CAAC,MAAM,CAAC,8BAAC,YAAY,OAAG,CAAC,CAAC;IACvC,CAAC;IACD,IAAI;QACF,qCAAqC;QACrC,IAAI,WAAW,EAAE;YACf,WAAW,CAAC,OAAO,EAAE,CAAC;YACtB,WAAW,GAAG,IAAI,CAAC;SACpB;QACD,MAAM,GAAG,GAAG,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;QACrD,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,EAAE,CAAC;IAChB,CAAC;CACF,CAAC","sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom/client\";\nlet currentRoot: ReactDOM.Root | null = null;\nexport default {\n show() {\n if (currentRoot) {\n return;\n }\n const ErrorOverlay: React.ComponentType =\n require(\"../../ErrorOverlay\").default;\n // Create a new div with ID `error-overlay` element and render LogBoxInspector into it.\n const div = document.createElement(\"div\");\n div.id = \"error-overlay\";\n document.body.appendChild(div);\n\n currentRoot = ReactDOM.createRoot(div);\n currentRoot.render(<ErrorOverlay />);\n },\n hide() {\n // Remove div with ID `error-overlay`\n if (currentRoot) {\n currentRoot.unmount();\n currentRoot = null;\n }\n const div = document.getElementById(\"error-overlay\");\n div?.remove();\n },\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,8DAAwC;AACxC,IAAI,WAAW,GAAyB,IAAI,CAAC;AAC7C,kBAAe;IACb,IAAI;QACF,IAAI,WAAW,EAAE;YACf,OAAO;SACR;QACD,MAAM,YAAY,GAAwB,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;QAChF,uFAAuF;QACvF,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,EAAE,GAAG,eAAe,CAAC;QACzB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAE/B,WAAW,GAAG,gBAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACvC,WAAW,CAAC,MAAM,CAAC,8BAAC,YAAY,OAAG,CAAC,CAAC;IACvC,CAAC;IACD,IAAI;QACF,qCAAqC;QACrC,IAAI,WAAW,EAAE;YACf,WAAW,CAAC,OAAO,EAAE,CAAC;YACtB,WAAW,GAAG,IAAI,CAAC;SACpB;QACD,MAAM,GAAG,GAAG,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;QACrD,GAAG,EAAE,MAAM,EAAE,CAAC;IAChB,CAAC;CACF,CAAC","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom/client';\nlet currentRoot: ReactDOM.Root | null = null;\nexport default {\n show() {\n if (currentRoot) {\n return;\n }\n const ErrorOverlay: React.ComponentType = require('../../ErrorOverlay').default;\n // Create a new div with ID `error-overlay` element and render LogBoxInspector into it.\n const div = document.createElement('div');\n div.id = 'error-overlay';\n document.body.appendChild(div);\n\n currentRoot = ReactDOM.createRoot(div);\n currentRoot.render(<ErrorOverlay />);\n },\n hide() {\n // Remove div with ID `error-overlay`\n if (currentRoot) {\n currentRoot.unmount();\n currentRoot = null;\n }\n const div = document.getElementById('error-overlay');\n div?.remove();\n },\n};\n"]}
@@ -1,3 +1,3 @@
1
- import NativeLogBox from "react-native/Libraries/NativeModules/specs/NativeLogBox";
1
+ import NativeLogBox from 'react-native/Libraries/NativeModules/specs/NativeLogBox';
2
2
  export default NativeLogBox;
3
3
  //# sourceMappingURL=index.native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.native.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,yDAAyD,CAAC;AAEnF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,yDAAyD,CAAC;AAEnF,eAAe,YAAY,CAAC"}
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- // @ts-expect-error
7
6
  const NativeLogBox_1 = __importDefault(require("react-native/Libraries/NativeModules/specs/NativeLogBox"));
8
7
  exports.default = NativeLogBox_1.default;
9
8
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.native.ts"],"names":[],"mappings":";;;;;AAAA,mBAAmB;AACnB,2GAAmF;AAEnF,kBAAe,sBAAY,CAAC","sourcesContent":["// @ts-expect-error\nimport NativeLogBox from \"react-native/Libraries/NativeModules/specs/NativeLogBox\";\n\nexport default NativeLogBox;\n"]}
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.native.ts"],"names":[],"mappings":";;;;;AAAA,2GAAmF;AAEnF,kBAAe,sBAAY,CAAC","sourcesContent":["import NativeLogBox from 'react-native/Libraries/NativeModules/specs/NativeLogBox';\n\nexport default NativeLogBox;\n"]}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function openFileInEditor(file, lineNumber) {
4
- if (process.env.NODE_ENV !== "production") {
4
+ if (process.env.NODE_ENV !== 'production') {
5
5
  // TODO: This is not a great URL since it now blocks users from accessing the `/open-stack-frame` url in their router
6
6
  // ideally it would be something like `/_devtools/open-stack-frame`.
7
- const baseUrl = window.location.protocol + "//" + window.location.host;
8
- fetch(baseUrl + "/open-stack-frame", {
9
- method: "POST",
7
+ const baseUrl = window.location.protocol + '//' + window.location.host;
8
+ fetch(baseUrl + '/open-stack-frame', {
9
+ method: 'POST',
10
10
  body: JSON.stringify({ file, lineNumber }),
11
11
  });
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.ts"],"names":[],"mappings":";;AAEA,SAAS,gBAAgB,CAAC,IAAY,EAAE,UAAkB;IACxD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,qHAAqH;QACrH,oEAAoE;QACpE,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEvE,KAAK,CAAC,OAAO,GAAG,mBAAmB,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;SAC3C,CAAC,CAAC;KACJ;AACH,CAAC;AAED,kBAAe,gBAAgB,CAAC","sourcesContent":["declare const process: any;\n\nfunction openFileInEditor(file: string, lineNumber: number) {\n if (process.env.NODE_ENV !== \"production\") {\n // TODO: This is not a great URL since it now blocks users from accessing the `/open-stack-frame` url in their router\n // ideally it would be something like `/_devtools/open-stack-frame`.\n const baseUrl = window.location.protocol + \"//\" + window.location.host;\n\n fetch(baseUrl + \"/open-stack-frame\", {\n method: \"POST\",\n body: JSON.stringify({ file, lineNumber }),\n });\n }\n}\n\nexport default openFileInEditor;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.ts"],"names":[],"mappings":";;AAEA,SAAS,gBAAgB,CAAC,IAAY,EAAE,UAAkB;IACxD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,qHAAqH;QACrH,oEAAoE;QACpE,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEvE,KAAK,CAAC,OAAO,GAAG,mBAAmB,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;SAC3C,CAAC,CAAC;KACJ;AACH,CAAC;AAED,kBAAe,gBAAgB,CAAC","sourcesContent":["declare const process: any;\n\nfunction openFileInEditor(file: string, lineNumber: number) {\n if (process.env.NODE_ENV !== 'production') {\n // TODO: This is not a great URL since it now blocks users from accessing the `/open-stack-frame` url in their router\n // ideally it would be something like `/_devtools/open-stack-frame`.\n const baseUrl = window.location.protocol + '//' + window.location.host;\n\n fetch(baseUrl + '/open-stack-frame', {\n method: 'POST',\n body: JSON.stringify({ file, lineNumber }),\n });\n }\n}\n\nexport default openFileInEditor;\n"]}
@@ -1,3 +1,3 @@
1
- import openFileInEditor from "react-native/Libraries/Core/Devtools/openFileInEditor";
1
+ import openFileInEditor from 'react-native/Libraries/Core/Devtools/openFileInEditor';
2
2
  export default openFileInEditor;
3
3
  //# sourceMappingURL=index.native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.native.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AAErF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AAErF,eAAe,gBAAgB,CAAC"}
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- // @ts-expect-error
7
6
  const openFileInEditor_1 = __importDefault(require("react-native/Libraries/Core/Devtools/openFileInEditor"));
8
7
  exports.default = openFileInEditor_1.default;
9
8
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.native.ts"],"names":[],"mappings":";;;;;AAAA,mBAAmB;AACnB,6GAAqF;AAErF,kBAAe,0BAAgB,CAAC","sourcesContent":["// @ts-expect-error\nimport openFileInEditor from \"react-native/Libraries/Core/Devtools/openFileInEditor\";\n\nexport default openFileInEditor;\n"]}
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.native.ts"],"names":[],"mappings":";;;;;AAAA,6GAAqF;AAErF,kBAAe,0BAAgB,CAAC","sourcesContent":["import openFileInEditor from 'react-native/Libraries/Core/Devtools/openFileInEditor';\n\nexport default openFileInEditor;\n"]}
@@ -1,4 +1,4 @@
1
- import { StackFrame } from "stacktrace-parser";
1
+ import { StackFrame } from 'stacktrace-parser';
2
2
  declare function parseErrorStack(stack?: string): (StackFrame & {
3
3
  collapse?: boolean;
4
4
  })[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/parseErrorStack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEtD,iBAAS,eAAe,CACtB,KAAK,CAAC,EAAE,MAAM,GACb,CAAC,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,EAAE,CAqBzC;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/parseErrorStack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEtD,iBAAS,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,EAAE,CAqBhF;AAED,eAAe,eAAe,CAAC"}