@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
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.LogBoxInspectorStackFrames = exports.getCollapseMessage = void 0;
30
30
  /**
31
- * Copyright (c) Evan Bacon.
31
+ * Copyright (c) 650 Industries.
32
32
  * Copyright (c) Meta Platforms, Inc. and affiliates.
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
@@ -36,16 +36,16 @@ exports.LogBoxInspectorStackFrames = exports.getCollapseMessage = void 0;
36
36
  */
37
37
  const react_1 = __importStar(require("react"));
38
38
  const react_native_1 = require("react-native");
39
+ const LogBoxInspectorSection_1 = require("./LogBoxInspectorSection");
40
+ const LogBoxInspectorSourceMapStatus_1 = require("./LogBoxInspectorSourceMapStatus");
41
+ const LogBoxInspectorStackFrame_1 = require("./LogBoxInspectorStackFrame");
39
42
  const LogContext_1 = require("../Data/LogContext");
40
43
  const LogBoxButton_1 = require("../UI/LogBoxButton");
41
44
  const LogBoxStyle = __importStar(require("../UI/LogBoxStyle"));
42
45
  const openFileInEditor_1 = __importDefault(require("../modules/openFileInEditor"));
43
- const LogBoxInspectorSection_1 = require("./LogBoxInspectorSection");
44
- const LogBoxInspectorSourceMapStatus_1 = require("./LogBoxInspectorSourceMapStatus");
45
- const LogBoxInspectorStackFrame_1 = require("./LogBoxInspectorStackFrame");
46
46
  function getCollapseMessage(stackFrames, collapsed) {
47
47
  if (stackFrames.length === 0) {
48
- return "No frames to show";
48
+ return 'No frames to show';
49
49
  }
50
50
  const collapsedCount = stackFrames.reduce((count, { collapse }) => {
51
51
  if (collapse === true) {
@@ -54,13 +54,13 @@ function getCollapseMessage(stackFrames, collapsed) {
54
54
  return count;
55
55
  }, 0);
56
56
  if (collapsedCount === 0) {
57
- return "Showing all frames";
57
+ return 'Showing all frames';
58
58
  }
59
- const framePlural = `frame${collapsedCount > 1 ? "s" : ""}`;
59
+ const framePlural = `frame${collapsedCount > 1 ? 's' : ''}`;
60
60
  if (collapsedCount === stackFrames.length) {
61
61
  return collapsed
62
- ? `See${collapsedCount > 1 ? " all " : " "}${collapsedCount} collapsed ${framePlural}`
63
- : `Collapse${collapsedCount > 1 ? " all " : " "}${collapsedCount} ${framePlural}`;
62
+ ? `See${collapsedCount > 1 ? ' all ' : ' '}${collapsedCount} collapsed ${framePlural}`
63
+ : `Collapse${collapsedCount > 1 ? ' all ' : ' '}${collapsedCount} ${framePlural}`;
64
64
  }
65
65
  else {
66
66
  return collapsed
@@ -70,27 +70,24 @@ function getCollapseMessage(stackFrames, collapsed) {
70
70
  }
71
71
  exports.getCollapseMessage = getCollapseMessage;
72
72
  function LogBoxInspectorStackFrames({ onRetry, type }) {
73
- var _a;
74
73
  const log = (0, LogContext_1.useSelectedLog)();
75
74
  const [collapsed, setCollapsed] = (0, react_1.useState)(() => {
76
- var _a;
77
75
  // Only collapse frames initially if some frames are not collapsed.
78
- return (_a = log.getAvailableStack(type)) === null || _a === void 0 ? void 0 : _a.some(({ collapse }) => !collapse);
76
+ return log.getAvailableStack(type)?.some(({ collapse }) => !collapse);
79
77
  });
80
78
  function getStackList() {
81
- var _a;
82
79
  if (collapsed === true) {
83
- return (_a = log.getAvailableStack(type)) === null || _a === void 0 ? void 0 : _a.filter(({ collapse }) => !collapse);
80
+ return log.getAvailableStack(type)?.filter(({ collapse }) => !collapse);
84
81
  }
85
82
  else {
86
83
  return log.getAvailableStack(type);
87
84
  }
88
85
  }
89
- if (((_a = log.getAvailableStack(type)) === null || _a === void 0 ? void 0 : _a.length) === 0) {
86
+ if (log.getAvailableStack(type)?.length === 0) {
90
87
  return null;
91
88
  }
92
- return (react_1.default.createElement(LogBoxInspectorSection_1.LogBoxInspectorSection, { heading: type === "component" ? "Component Stack" : "Call Stack", action: react_1.default.createElement(LogBoxInspectorSourceMapStatus_1.LogBoxInspectorSourceMapStatus, { onPress: log.symbolicated[type].status === "FAILED" ? onRetry : null, status: log.symbolicated[type].status }) },
93
- log.symbolicated[type].status !== "COMPLETE" && (react_1.default.createElement(react_native_1.View, { style: stackStyles.hintBox },
89
+ return (react_1.default.createElement(LogBoxInspectorSection_1.LogBoxInspectorSection, { heading: type === 'component' ? 'Component Stack' : 'Call Stack', action: react_1.default.createElement(LogBoxInspectorSourceMapStatus_1.LogBoxInspectorSourceMapStatus, { onPress: log.symbolicated[type].status === 'FAILED' ? onRetry : null, status: log.symbolicated[type].status }) },
90
+ log.symbolicated[type].status !== 'COMPLETE' && (react_1.default.createElement(react_native_1.View, { style: stackStyles.hintBox },
94
91
  react_1.default.createElement(react_native_1.Text, { style: stackStyles.hintText }, "This call stack is not symbolicated. Some features are unavailable such as viewing the function name or tapping to open files."))),
95
92
  react_1.default.createElement(StackFrameList, { list: getStackList(), status: log.symbolicated[type].status }),
96
93
  react_1.default.createElement(StackFrameFooter, { onPress: () => setCollapsed(!collapsed), message: getCollapseMessage(log.getAvailableStack(type), !!collapsed) })));
@@ -99,15 +96,15 @@ exports.LogBoxInspectorStackFrames = LogBoxInspectorStackFrames;
99
96
  function StackFrameList({ list, status, }) {
100
97
  return list.map((frame, index) => {
101
98
  const { file, lineNumber } = frame;
102
- return (react_1.default.createElement(LogBoxInspectorStackFrame_1.LogBoxInspectorStackFrame, { key: index, frame: frame, onPress: status === "COMPLETE" && file != null && lineNumber != null
99
+ return (react_1.default.createElement(LogBoxInspectorStackFrame_1.LogBoxInspectorStackFrame, { key: index, frame: frame, onPress: status === 'COMPLETE' && file != null && lineNumber != null
103
100
  ? () => (0, openFileInEditor_1.default)(file, lineNumber)
104
101
  : undefined }));
105
102
  });
106
103
  }
107
- function StackFrameFooter({ message, onPress, }) {
104
+ function StackFrameFooter({ message, onPress }) {
108
105
  return (react_1.default.createElement(react_native_1.View, { style: stackStyles.collapseContainer },
109
106
  react_1.default.createElement(LogBoxButton_1.LogBoxButton, { backgroundColor: {
110
- default: "transparent",
107
+ default: 'transparent',
111
108
  pressed: LogBoxStyle.getBackgroundColor(1),
112
109
  }, onPress: onPress, style: stackStyles.collapseButton },
113
110
  react_1.default.createElement(react_native_1.Text, { style: stackStyles.collapse }, message))));
@@ -117,8 +114,8 @@ const stackStyles = react_native_1.StyleSheet.create({
117
114
  marginTop: 15,
118
115
  },
119
116
  heading: {
120
- alignItems: "center",
121
- flexDirection: "row",
117
+ alignItems: 'center',
118
+ flexDirection: 'row',
122
119
  paddingHorizontal: 12,
123
120
  marginBottom: 10,
124
121
  },
@@ -126,7 +123,7 @@ const stackStyles = react_native_1.StyleSheet.create({
126
123
  color: LogBoxStyle.getTextColor(1),
127
124
  flex: 1,
128
125
  fontSize: 20,
129
- fontWeight: "600",
126
+ fontWeight: '600',
130
127
  includeFontPadding: false,
131
128
  lineHeight: 20,
132
129
  },
@@ -138,7 +135,7 @@ const stackStyles = react_native_1.StyleSheet.create({
138
135
  fontSize: 14,
139
136
  includeFontPadding: false,
140
137
  lineHeight: 18,
141
- fontWeight: "500",
138
+ fontWeight: '500',
142
139
  paddingHorizontal: 27,
143
140
  },
144
141
  hintText: {
@@ -146,7 +143,7 @@ const stackStyles = react_native_1.StyleSheet.create({
146
143
  fontSize: 13,
147
144
  includeFontPadding: false,
148
145
  lineHeight: 18,
149
- fontWeight: "400",
146
+ fontWeight: '400',
150
147
  marginHorizontal: 10,
151
148
  },
152
149
  hintBox: {
@@ -159,7 +156,7 @@ const stackStyles = react_native_1.StyleSheet.create({
159
156
  },
160
157
  collapseContainer: {
161
158
  marginLeft: 15,
162
- flexDirection: "row",
159
+ flexDirection: 'row',
163
160
  },
164
161
  collapseButton: {
165
162
  borderRadius: 5,
@@ -167,7 +164,7 @@ const stackStyles = react_native_1.StyleSheet.create({
167
164
  collapse: {
168
165
  color: LogBoxStyle.getTextColor(0.7),
169
166
  fontSize: 12,
170
- fontWeight: "300",
167
+ fontWeight: '300',
171
168
  lineHeight: 20,
172
169
  marginTop: 0,
173
170
  paddingHorizontal: 10,
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxInspectorStackFrames.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrames.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAwC;AACxC,+CAAsD;AAItD,mDAAoD;AACpD,qDAAkD;AAClD,+DAAiD;AACjD,mFAA2D;AAC3D,qEAAkE;AAClE,qFAAkF;AAClF,2EAAwE;AAOxE,SAAgB,kBAAkB,CAChC,WAAkB,EAClB,SAAkB;IAElB,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAC5B,OAAO,mB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CACF,CAAC,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 */\nimport React, { useState } from \"react\";\nimport { StyleSheet, Text, View } from \"react-native\";\n\nimport type { StackType } from \"../Data/LogBoxLog\";\nimport type { Stack } from \"../Data/LogBoxSymbolication\";\nimport { useSelectedLog } from \"../Data/LogContext\";\nimport { LogBoxButton } from \"../UI/LogBoxButton\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\nimport openFileInEditor from \"../modules/openFileInEditor\";\nimport { LogBoxInspectorSection } from \"./LogBoxInspectorSection\";\nimport { LogBoxInspectorSourceMapStatus } from \"./LogBoxInspectorSourceMapStatus\";\nimport { LogBoxInspectorStackFrame } from \"./LogBoxInspectorStackFrame\";\n\ntype Props = {\n type: StackType;\n onRetry: () => void;\n};\n\nexport function getCollapseMessage(\n stackFrames: Stack,\n collapsed: boolean\n): string {\n if (stackFrames.length === 0) {\n return \"No frames to show\";\n }\n\n const collapsedCount = stackFrames.reduce((count, { collapse }) => {\n if (collapse === true) {\n return count + 1;\n }\n\n return count;\n }, 0);\n\n if (collapsedCount === 0) {\n return \"Showing all frames\";\n }\n\n const framePlural = `frame${collapsedCount > 1 ? \"s\" : \"\"}`;\n if (collapsedCount === stackFrames.length) {\n return collapsed\n ? `See${\n collapsedCount > 1 ? \" all \" : \" \"\n }${collapsedCount} collapsed ${framePlural}`\n : `Collapse${\n collapsedCount > 1 ? \" all \" : \" \"\n }${collapsedCount} ${framePlural}`;\n } else {\n return collapsed\n ? `See ${collapsedCount} more ${framePlural}`\n : `Collapse ${collapsedCount} ${framePlural}`;\n }\n}\n\nexport function LogBoxInspectorStackFrames({ onRetry, type }: Props) {\n const log = useSelectedLog();\n\n const [collapsed, setCollapsed] = useState(() => {\n // Only collapse frames initially if some frames are not collapsed.\n return log.getAvailableStack(type)?.some(({ collapse }) => !collapse);\n });\n\n function getStackList() {\n if (collapsed === true) {\n return log.getAvailableStack(type)?.filter(({ collapse }) => !collapse);\n } else {\n return log.getAvailableStack(type);\n }\n }\n\n if (log.getAvailableStack(type)?.length === 0) {\n return null;\n }\n\n return (\n <LogBoxInspectorSection\n heading={type === \"component\" ? \"Component Stack\" : \"Call Stack\"}\n action={\n <LogBoxInspectorSourceMapStatus\n onPress={log.symbolicated[type].status === \"FAILED\" ? onRetry : null}\n status={log.symbolicated[type].status}\n />\n }\n >\n {log.symbolicated[type].status !== \"COMPLETE\" && (\n <View style={stackStyles.hintBox}>\n <Text style={stackStyles.hintText}>\n This call stack is not symbolicated. Some features are unavailable\n such as viewing the function name or tapping to open files.\n </Text>\n </View>\n )}\n <StackFrameList\n list={getStackList()!}\n status={log.symbolicated[type].status}\n />\n <StackFrameFooter\n onPress={() => setCollapsed(!collapsed)}\n message={getCollapseMessage(log.getAvailableStack(type)!, !!collapsed)}\n />\n </LogBoxInspectorSection>\n );\n}\n\nfunction StackFrameList({\n list,\n status,\n}: {\n list: Stack;\n status: \"NONE\" | \"PENDING\" | \"COMPLETE\" | \"FAILED\";\n}): any {\n return list.map((frame, index) => {\n const { file, lineNumber } = frame;\n return (\n <LogBoxInspectorStackFrame\n key={index}\n frame={frame}\n onPress={\n status === \"COMPLETE\" && file != null && lineNumber != null\n ? () => openFileInEditor(file, lineNumber)\n : undefined\n }\n />\n );\n });\n}\n\nfunction StackFrameFooter({\n message,\n onPress,\n}: {\n message: string;\n onPress: () => void;\n}) {\n return (\n <View style={stackStyles.collapseContainer}>\n <LogBoxButton\n backgroundColor={{\n default: \"transparent\",\n pressed: LogBoxStyle.getBackgroundColor(1),\n }}\n onPress={onPress}\n style={stackStyles.collapseButton}\n >\n <Text style={stackStyles.collapse}>{message}</Text>\n </LogBoxButton>\n </View>\n );\n}\n\nconst stackStyles = StyleSheet.create({\n section: {\n marginTop: 15,\n },\n heading: {\n alignItems: \"center\",\n flexDirection: \"row\",\n paddingHorizontal: 12,\n marginBottom: 10,\n },\n headingText: {\n color: LogBoxStyle.getTextColor(1),\n flex: 1,\n fontSize: 20,\n fontWeight: \"600\",\n includeFontPadding: false,\n lineHeight: 20,\n },\n body: {\n paddingBottom: 10,\n },\n bodyText: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n includeFontPadding: false,\n lineHeight: 18,\n fontWeight: \"500\",\n paddingHorizontal: 27,\n },\n hintText: {\n color: LogBoxStyle.getTextColor(0.7),\n fontSize: 13,\n includeFontPadding: false,\n lineHeight: 18,\n fontWeight: \"400\",\n marginHorizontal: 10,\n },\n hintBox: {\n backgroundColor: LogBoxStyle.getBackgroundColor(),\n marginHorizontal: 10,\n paddingHorizontal: 5,\n paddingVertical: 10,\n borderRadius: 5,\n marginBottom: 5,\n },\n collapseContainer: {\n marginLeft: 15,\n flexDirection: \"row\",\n },\n collapseButton: {\n borderRadius: 5,\n },\n collapse: {\n color: LogBoxStyle.getTextColor(0.7),\n fontSize: 12,\n fontWeight: \"300\",\n lineHeight: 20,\n marginTop: 0,\n paddingHorizontal: 10,\n paddingVertical: 5,\n },\n});\n"]}
1
+ {"version":3,"file":"LogBoxInspectorStackFrames.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrames.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAwC;AACxC,+CAAsD;AAEtD,qEAAkE;AAClE,qFAAkF;AAClF,2EAAwE;AAGxE,mDAAoD;AACpD,qDAAkD;AAClD,+DAAiD;AACjD,mFAA2D;AAO3D,SAAgB,kBAAkB,CAAC,WAAkB,EAAE,SAAkB;IACvE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAC5B,OAAO,mBAAmB,CAAC;KAC5B;IAED,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChE,IAAI,QAAQ,KA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,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;IACD,IAAI,EAAE;QACJ,aAAa,EAAE,EAAE;KAClB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,KAAK;QACjB,iBAAiB,EAAE,EAAE;KACtB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,KAAK;QACjB,gBAAgB,EAAE,EAAE;KACrB;IACD,OAAO,EAAE;QACP,eAAe,EAAE,WAAW,CAAC,kBAAkB,EAAE;QACjD,gBAAgB,EAAE,EAAE;QACpB,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,CAAC;KAChB;IACD,iBAAiB,EAAE;QACjB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,KAAK;KACrB;IACD,cAAc,EAAE;QACd,YAAY,EAAE,CAAC;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,EAAE;QACd,SAAS,EAAE,CAAC;QACZ,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,CAAC;KACnB;CACF,CAAC,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 */\nimport React, { useState } from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport { LogBoxInspectorSection } from './LogBoxInspectorSection';\nimport { LogBoxInspectorSourceMapStatus } from './LogBoxInspectorSourceMapStatus';\nimport { LogBoxInspectorStackFrame } from './LogBoxInspectorStackFrame';\nimport type { StackType } from '../Data/LogBoxLog';\nimport type { Stack } from '../Data/LogBoxSymbolication';\nimport { useSelectedLog } from '../Data/LogContext';\nimport { LogBoxButton } from '../UI/LogBoxButton';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\nimport openFileInEditor from '../modules/openFileInEditor';\n\ntype Props = {\n type: StackType;\n onRetry: () => void;\n};\n\nexport function getCollapseMessage(stackFrames: Stack, collapsed: boolean): string {\n if (stackFrames.length === 0) {\n return 'No frames to show';\n }\n\n const collapsedCount = stackFrames.reduce((count, { collapse }) => {\n if (collapse === true) {\n return count + 1;\n }\n\n return count;\n }, 0);\n\n if (collapsedCount === 0) {\n return 'Showing all frames';\n }\n\n const framePlural = `frame${collapsedCount > 1 ? 's' : ''}`;\n if (collapsedCount === stackFrames.length) {\n return collapsed\n ? `See${collapsedCount > 1 ? ' all ' : ' '}${collapsedCount} collapsed ${framePlural}`\n : `Collapse${collapsedCount > 1 ? ' all ' : ' '}${collapsedCount} ${framePlural}`;\n } else {\n return collapsed\n ? `See ${collapsedCount} more ${framePlural}`\n : `Collapse ${collapsedCount} ${framePlural}`;\n }\n}\n\nexport function LogBoxInspectorStackFrames({ onRetry, type }: Props) {\n const log = useSelectedLog();\n\n const [collapsed, setCollapsed] = useState(() => {\n // Only collapse frames initially if some frames are not collapsed.\n return log.getAvailableStack(type)?.some(({ collapse }) => !collapse);\n });\n\n function getStackList() {\n if (collapsed === true) {\n return log.getAvailableStack(type)?.filter(({ collapse }) => !collapse);\n } else {\n return log.getAvailableStack(type);\n }\n }\n\n if (log.getAvailableStack(type)?.length === 0) {\n return null;\n }\n\n return (\n <LogBoxInspectorSection\n heading={type === 'component' ? 'Component Stack' : 'Call Stack'}\n action={\n <LogBoxInspectorSourceMapStatus\n onPress={log.symbolicated[type].status === 'FAILED' ? onRetry : null}\n status={log.symbolicated[type].status}\n />\n }>\n {log.symbolicated[type].status !== 'COMPLETE' && (\n <View style={stackStyles.hintBox}>\n <Text style={stackStyles.hintText}>\n This call stack is not symbolicated. Some features are unavailable such as viewing the\n function name or tapping to open files.\n </Text>\n </View>\n )}\n <StackFrameList list={getStackList()!} status={log.symbolicated[type].status} />\n <StackFrameFooter\n onPress={() => setCollapsed(!collapsed)}\n message={getCollapseMessage(log.getAvailableStack(type)!, !!collapsed)}\n />\n </LogBoxInspectorSection>\n );\n}\n\nfunction StackFrameList({\n list,\n status,\n}: {\n list: Stack;\n status: 'NONE' | 'PENDING' | 'COMPLETE' | 'FAILED';\n}): any {\n return list.map((frame, index) => {\n const { file, lineNumber } = frame;\n return (\n <LogBoxInspectorStackFrame\n key={index}\n frame={frame}\n onPress={\n status === 'COMPLETE' && file != null && lineNumber != null\n ? () => openFileInEditor(file, lineNumber)\n : undefined\n }\n />\n );\n });\n}\n\nfunction StackFrameFooter({ message, onPress }: { message: string; onPress: () => void }) {\n return (\n <View style={stackStyles.collapseContainer}>\n <LogBoxButton\n backgroundColor={{\n default: 'transparent',\n pressed: LogBoxStyle.getBackgroundColor(1),\n }}\n onPress={onPress}\n style={stackStyles.collapseButton}>\n <Text style={stackStyles.collapse}>{message}</Text>\n </LogBoxButton>\n </View>\n );\n}\n\nconst stackStyles = StyleSheet.create({\n section: {\n marginTop: 15,\n },\n heading: {\n alignItems: 'center',\n flexDirection: 'row',\n paddingHorizontal: 12,\n marginBottom: 10,\n },\n headingText: {\n color: LogBoxStyle.getTextColor(1),\n flex: 1,\n fontSize: 20,\n fontWeight: '600',\n includeFontPadding: false,\n lineHeight: 20,\n },\n body: {\n paddingBottom: 10,\n },\n bodyText: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n includeFontPadding: false,\n lineHeight: 18,\n fontWeight: '500',\n paddingHorizontal: 27,\n },\n hintText: {\n color: LogBoxStyle.getTextColor(0.7),\n fontSize: 13,\n includeFontPadding: false,\n lineHeight: 18,\n fontWeight: '400',\n marginHorizontal: 10,\n },\n hintBox: {\n backgroundColor: LogBoxStyle.getBackgroundColor(),\n marginHorizontal: 10,\n paddingHorizontal: 5,\n paddingVertical: 10,\n borderRadius: 5,\n marginBottom: 5,\n },\n collapseContainer: {\n marginLeft: 15,\n flexDirection: 'row',\n },\n collapseButton: {\n borderRadius: 5,\n },\n collapse: {\n color: LogBoxStyle.getTextColor(0.7),\n fontSize: 12,\n fontWeight: '300',\n lineHeight: 20,\n marginTop: 0,\n paddingHorizontal: 10,\n paddingVertical: 5,\n },\n});\n"]}
@@ -1,8 +1,8 @@
1
- import { LogBoxLog } from "../Data/LogBoxLog";
1
+ import { LogBoxLog } from '../Data/LogBoxLog';
2
2
  type Props = {
3
3
  log: LogBoxLog;
4
4
  totalLogCount: number;
5
- level: "warn" | "error";
5
+ level: 'warn' | 'error';
6
6
  onPressOpen: () => void;
7
7
  onPressDismiss: () => void;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorToast.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToast.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI9C,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,SAAS,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AAUF,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,eA8BtC"}
1
+ {"version":3,"file":"ErrorToast.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToast.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,SAAS,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AAUF,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,eAkCtC"}
@@ -25,36 +25,39 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.ErrorToast = 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
32
32
  * LICENSE file in the root directory of this source tree.
33
33
  */
34
- const react_views_1 = require("@bacons/react-views");
35
34
  const react_1 = __importStar(require("react"));
35
+ const react_native_1 = require("react-native");
36
+ const ErrorToastMessage_1 = require("./ErrorToastMessage");
36
37
  const LogBoxData = __importStar(require("../Data/LogBoxData"));
37
38
  const LogBoxStyle = __importStar(require("../UI/LogBoxStyle"));
38
- const ErrorToastMessage_1 = require("./ErrorToastMessage");
39
39
  function useSymbolicatedLog(log) {
40
40
  // Eagerly symbolicate so the stack is available when pressing to inspect.
41
41
  (0, react_1.useEffect)(() => {
42
- LogBoxData.symbolicateLogLazy("stack", log);
43
- LogBoxData.symbolicateLogLazy("component", log);
42
+ LogBoxData.symbolicateLogLazy('stack', log);
43
+ LogBoxData.symbolicateLogLazy('component', log);
44
44
  }, [log]);
45
45
  }
46
46
  function ErrorToast(props) {
47
47
  const { totalLogCount, level, log } = props;
48
48
  useSymbolicatedLog(log);
49
- return (react_1.default.createElement(react_views_1.View, { style: toastStyles.container },
50
- react_1.default.createElement(react_views_1.Pressable, { style: { flex: 1 }, onPress: props.onPressOpen }, ({ hovered, pressed }) => (react_1.default.createElement(react_views_1.View, { style: [
49
+ return (react_1.default.createElement(react_native_1.View, { style: toastStyles.container },
50
+ react_1.default.createElement(react_native_1.Pressable, { style: { flex: 1 }, onPress: props.onPressOpen }, ({
51
+ /** @ts-expect-error: react-native types are broken. */
52
+ hovered, pressed, }) => (react_1.default.createElement(react_native_1.View, { style: [
51
53
  toastStyles.press,
52
54
  {
53
- transitionDuration: "150ms",
55
+ // @ts-expect-error: web-only type
56
+ transitionDuration: '150ms',
54
57
  backgroundColor: pressed
55
- ? "#323232"
58
+ ? '#323232'
56
59
  : hovered
57
- ? "#111111"
60
+ ? '#111111'
58
61
  : LogBoxStyle.getBackgroundColor(),
59
62
  },
60
63
  ] },
@@ -64,25 +67,23 @@ function ErrorToast(props) {
64
67
  }
65
68
  exports.ErrorToast = ErrorToast;
66
69
  function Count({ count, level }) {
67
- return (react_1.default.createElement(react_views_1.View, { style: [countStyles.inside, countStyles[level]] },
68
- react_1.default.createElement(react_views_1.Text, { style: countStyles.text }, count <= 1 ? "!" : count)));
70
+ return (react_1.default.createElement(react_native_1.View, { style: [countStyles.inside, countStyles[level]] },
71
+ react_1.default.createElement(react_native_1.Text, { style: countStyles.text }, count <= 1 ? '!' : count)));
69
72
  }
70
73
  function Dismiss({ onPress }) {
71
- return (react_1.default.createElement(react_views_1.Pressable, { style: {
74
+ return (react_1.default.createElement(react_native_1.Pressable, { style: {
72
75
  marginLeft: 5,
73
76
  }, hitSlop: {
74
77
  top: 12,
75
78
  right: 10,
76
79
  bottom: 12,
77
80
  left: 10,
78
- }, onPress: onPress }, ({ hovered, pressed }) => (react_1.default.createElement(react_views_1.View, { style: [
79
- dismissStyles.press,
80
- hovered && { opacity: 0.8 },
81
- pressed && { opacity: 0.5 },
82
- ] },
83
- react_1.default.createElement(react_views_1.Image, { source: require("@expo/metro-runtime/assets/close.png"), style: dismissStyles.image })))));
81
+ }, onPress: onPress }, ({
82
+ /** @ts-expect-error: react-native types are broken. */
83
+ hovered, pressed, }) => (react_1.default.createElement(react_native_1.View, { style: [dismissStyles.press, hovered && { opacity: 0.8 }, pressed && { opacity: 0.5 }] },
84
+ react_1.default.createElement(react_native_1.Image, { source: require('@expo/metro-runtime/assets/close.png'), style: dismissStyles.image })))));
84
85
  }
85
- const countStyles = react_views_1.StyleSheet.create({
86
+ const countStyles = react_native_1.StyleSheet.create({
86
87
  warn: {
87
88
  backgroundColor: LogBoxStyle.getWarningColor(1),
88
89
  },
@@ -98,45 +99,45 @@ const countStyles = react_views_1.StyleSheet.create({
98
99
  aspectRatio: 1,
99
100
  paddingHorizontal: 4,
100
101
  borderRadius: 11,
101
- justifyContent: "center",
102
- alignItems: "center",
102
+ justifyContent: 'center',
103
+ alignItems: 'center',
103
104
  },
104
105
  text: {
105
106
  color: LogBoxStyle.getTextColor(1),
106
107
  fontSize: 14,
107
108
  lineHeight: 18,
108
- textAlign: "center",
109
- fontWeight: "600",
109
+ textAlign: 'center',
110
+ fontWeight: '600',
110
111
  textShadow: `0px 0px 3px ${LogBoxStyle.getBackgroundColor(0.8)}`,
111
112
  },
112
113
  });
113
- const dismissStyles = react_views_1.StyleSheet.create({
114
+ const dismissStyles = react_native_1.StyleSheet.create({
114
115
  press: {
115
- backgroundColor: "#323232",
116
+ backgroundColor: '#323232',
116
117
  height: 20,
117
118
  width: 20,
118
119
  borderRadius: 25,
119
- alignItems: "center",
120
- justifyContent: "center",
120
+ alignItems: 'center',
121
+ justifyContent: 'center',
121
122
  },
122
123
  image: {
123
124
  height: 8,
124
125
  width: 8,
125
126
  },
126
127
  });
127
- const toastStyles = react_views_1.StyleSheet.create({
128
+ const toastStyles = react_native_1.StyleSheet.create({
128
129
  container: {
129
130
  height: 48,
130
- justifyContent: "center",
131
+ justifyContent: 'center',
131
132
  marginBottom: 4,
132
133
  },
133
134
  press: {
134
135
  borderWidth: 1,
135
136
  borderRadius: 8,
136
- overflow: "hidden",
137
- flexDirection: "row",
138
- alignItems: "center",
139
- borderColor: "#323232",
137
+ overflow: 'hidden',
138
+ flexDirection: 'row',
139
+ alignItems: 'center',
140
+ borderColor: '#323232',
140
141
  backgroundColor: LogBoxStyle.getBackgroundColor(),
141
142
  flex: 1,
142
143
  paddingHorizontal: 12,
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorToast.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToast.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,qDAA+E;AAC/E,+CAAyC;AAEzC,+DAAiD;AAEjD,+DAAiD;AACjD,2DAAwD;AAUxD,SAAS,kBAAkB,CAAC,GAAc;IACxC,0EAA0E;IAC1E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC5C,UAAU,CAAC,kBAAkB,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACZ,CAAC;AAED,SAAgB,UAAU,CAAC,KAAY;IACrC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IAE5C,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAExB,OAAO,CACL,8BAAC,kBAAI,IAAC,KAAK,EAAE,WAAW,CAAC,SAAS;QAChC,8BAAC,uBAAS,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,WAAW,IACtD,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACzB,8BAAC,kBAAI,IACH,KAAK,EAAE;gBACL,WAAW,CAAC,KAAK;gBACjB;oBACE,kBAAkB,EAAE,OAAO;oBAC3B,eAAe,EAAE,OAAO;wBACtB,CAAC,CAAC,SAAS;wBACX,CAAC,CAAC,OAAO;4BACT,CAAC,CAAC,SAAS;4BACX,CAAC,CAAC,WAAW,CAAC,kBAAkB,EAAE;iBACrC;aACF;YAED,8BAAC,KAAK,IAAC,KA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,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,SAAS;QACtB,eAAe,EAAE,WAAW,CAAC,kBAAkB,EAAE;QACjD,IAAI,EAAE,CAAC;QACP,iBAAiB,EAAE,EAAE;KACtB;CACF,CAAC,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 */\nimport { Image, Pressable, StyleSheet, Text, View } from \"@bacons/react-views\";\nimport React, { useEffect } from \"react\";\n\nimport * as LogBoxData from \"../Data/LogBoxData\";\nimport { LogBoxLog } from \"../Data/LogBoxLog\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\nimport { ErrorToastMessage } from \"./ErrorToastMessage\";\n\ntype Props = {\n log: LogBoxLog;\n totalLogCount: number;\n level: \"warn\" | \"error\";\n onPressOpen: () => void;\n onPressDismiss: () => void;\n};\n\nfunction useSymbolicatedLog(log: LogBoxLog) {\n // Eagerly symbolicate so the stack is available when pressing to inspect.\n useEffect(() => {\n LogBoxData.symbolicateLogLazy(\"stack\", log);\n LogBoxData.symbolicateLogLazy(\"component\", log);\n }, [log]);\n}\n\nexport function ErrorToast(props: Props) {\n const { totalLogCount, level, log } = props;\n\n useSymbolicatedLog(log);\n\n return (\n <View style={toastStyles.container}>\n <Pressable style={{ flex: 1 }} onPress={props.onPressOpen}>\n {({ hovered, pressed }) => (\n <View\n style={[\n toastStyles.press,\n {\n transitionDuration: \"150ms\",\n backgroundColor: pressed\n ? \"#323232\"\n : hovered\n ? \"#111111\"\n : LogBoxStyle.getBackgroundColor(),\n },\n ]}\n >\n <Count count={totalLogCount} level={level} />\n <ErrorToastMessage message={log.message} />\n <Dismiss onPress={props.onPressDismiss} />\n </View>\n )}\n </Pressable>\n </View>\n );\n}\n\nfunction Count({ count, level }: { count: number; level: Props[\"level\"] }) {\n return (\n <View style={[countStyles.inside, countStyles[level]]}>\n <Text style={countStyles.text}>{count <= 1 ? \"!\" : count}</Text>\n </View>\n );\n}\n\nfunction Dismiss({ onPress }: { onPress: () => void }) {\n return (\n <Pressable\n style={{\n marginLeft: 5,\n }}\n hitSlop={{\n top: 12,\n right: 10,\n bottom: 12,\n left: 10,\n }}\n onPress={onPress}\n >\n {({ hovered, pressed }) => (\n <View\n style={[\n dismissStyles.press,\n hovered && { opacity: 0.8 },\n pressed && { opacity: 0.5 },\n ]}\n >\n <Image\n source={require(\"@expo/metro-runtime/assets/close.png\")}\n style={dismissStyles.image}\n />\n </View>\n )}\n </Pressable>\n );\n}\n\nconst countStyles = StyleSheet.create({\n warn: {\n backgroundColor: LogBoxStyle.getWarningColor(1),\n },\n error: {\n backgroundColor: LogBoxStyle.getErrorColor(1),\n },\n log: {\n backgroundColor: LogBoxStyle.getLogColor(1),\n },\n inside: {\n marginRight: 8,\n minWidth: 22,\n aspectRatio: 1,\n paddingHorizontal: 4,\n borderRadius: 11,\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n text: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n lineHeight: 18,\n textAlign: \"center\",\n fontWeight: \"600\",\n textShadow: `0px 0px 3px ${LogBoxStyle.getBackgroundColor(0.8)}`,\n },\n});\n\nconst dismissStyles = StyleSheet.create({\n press: {\n backgroundColor: \"#323232\",\n height: 20,\n width: 20,\n borderRadius: 25,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n image: {\n height: 8,\n width: 8,\n },\n});\n\nconst toastStyles = StyleSheet.create({\n container: {\n height: 48,\n justifyContent: \"center\",\n marginBottom: 4,\n },\n press: {\n borderWidth: 1,\n borderRadius: 8,\n overflow: \"hidden\",\n flexDirection: \"row\",\n alignItems: \"center\",\n borderColor: \"#323232\",\n backgroundColor: LogBoxStyle.getBackgroundColor(),\n flex: 1,\n paddingHorizontal: 12,\n },\n});\n"]}
1
+ {"version":3,"file":"ErrorToast.js","sourceRoot":"","sources":["../../../src/error-overlay/toast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E,CAAC;QACP,iBAAiB,EAAE,EAAE;KACtB;CACF,CAAC,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 */\nimport React, { useEffect } from 'react';\nimport { Image, Pressable, StyleSheet, Text, View } from 'react-native';\n\nimport { ErrorToastMessage } from './ErrorToastMessage';\nimport * as LogBoxData from '../Data/LogBoxData';\nimport { LogBoxLog } from '../Data/LogBoxLog';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\n\ntype Props = {\n log: LogBoxLog;\n totalLogCount: number;\n level: 'warn' | 'error';\n onPressOpen: () => void;\n onPressDismiss: () => void;\n};\n\nfunction useSymbolicatedLog(log: LogBoxLog) {\n // Eagerly symbolicate so the stack is available when pressing to inspect.\n useEffect(() => {\n LogBoxData.symbolicateLogLazy('stack', log);\n LogBoxData.symbolicateLogLazy('component', log);\n }, [log]);\n}\n\nexport function ErrorToast(props: Props) {\n const { totalLogCount, level, log } = props;\n\n useSymbolicatedLog(log);\n\n return (\n <View style={toastStyles.container}>\n <Pressable style={{ flex: 1 }} onPress={props.onPressOpen}>\n {({\n /** @ts-expect-error: react-native types are broken. */\n hovered,\n pressed,\n }) => (\n <View\n style={[\n toastStyles.press,\n {\n // @ts-expect-error: web-only type\n transitionDuration: '150ms',\n backgroundColor: pressed\n ? '#323232'\n : hovered\n ? '#111111'\n : LogBoxStyle.getBackgroundColor(),\n },\n ]}>\n <Count count={totalLogCount} level={level} />\n <ErrorToastMessage message={log.message} />\n <Dismiss onPress={props.onPressDismiss} />\n </View>\n )}\n </Pressable>\n </View>\n );\n}\n\nfunction Count({ count, level }: { count: number; level: Props['level'] }) {\n return (\n <View style={[countStyles.inside, countStyles[level]]}>\n <Text style={countStyles.text}>{count <= 1 ? '!' : count}</Text>\n </View>\n );\n}\n\nfunction Dismiss({ onPress }: { onPress: () => void }) {\n return (\n <Pressable\n style={{\n marginLeft: 5,\n }}\n hitSlop={{\n top: 12,\n right: 10,\n bottom: 12,\n left: 10,\n }}\n onPress={onPress}>\n {({\n /** @ts-expect-error: react-native types are broken. */\n hovered,\n pressed,\n }) => (\n <View\n style={[dismissStyles.press, hovered && { opacity: 0.8 }, pressed && { opacity: 0.5 }]}>\n <Image\n source={require('@expo/metro-runtime/assets/close.png')}\n style={dismissStyles.image}\n />\n </View>\n )}\n </Pressable>\n );\n}\n\nconst countStyles = StyleSheet.create({\n warn: {\n backgroundColor: LogBoxStyle.getWarningColor(1),\n },\n error: {\n backgroundColor: LogBoxStyle.getErrorColor(1),\n },\n log: {\n backgroundColor: LogBoxStyle.getLogColor(1),\n },\n inside: {\n marginRight: 8,\n minWidth: 22,\n aspectRatio: 1,\n paddingHorizontal: 4,\n borderRadius: 11,\n justifyContent: 'center',\n alignItems: 'center',\n },\n text: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n lineHeight: 18,\n textAlign: 'center',\n fontWeight: '600',\n textShadow: `0px 0px 3px ${LogBoxStyle.getBackgroundColor(0.8)}`,\n },\n});\n\nconst dismissStyles = StyleSheet.create({\n press: {\n backgroundColor: '#323232',\n height: 20,\n width: 20,\n borderRadius: 25,\n alignItems: 'center',\n justifyContent: 'center',\n },\n image: {\n height: 8,\n width: 8,\n },\n});\n\nconst toastStyles = StyleSheet.create({\n container: {\n height: 48,\n justifyContent: 'center',\n marginBottom: 4,\n },\n press: {\n borderWidth: 1,\n borderRadius: 8,\n overflow: 'hidden',\n flexDirection: 'row',\n alignItems: 'center',\n borderColor: '#323232',\n backgroundColor: LogBoxStyle.getBackgroundColor(),\n flex: 1,\n paddingHorizontal: 12,\n },\n});\n"]}
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export default function ErrorToastContainer({ children, }: {
3
3
  children: React.ReactNode;
4
4
  }): React.ReactElement;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorToastContainer.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastContainer.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAE1B,SAAwB,mBAAmB,CAAC,EAC1C,QAAQ,GAGT;IACC,OAAO,8DAAG,QAAQ,CAAI,CAAC;AACzB,CAAC;AAND,sCAMC","sourcesContent":["import React from \"react\";\n\nexport default function ErrorToastContainer({\n children,\n}: {\n children: React.ReactNode;\n}): React.ReactElement {\n return <>{children}</>;\n}\n"]}
1
+ {"version":3,"file":"ErrorToastContainer.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastContainer.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAE1B,SAAwB,mBAAmB,CAAC,EAC1C,QAAQ,GAGT;IACC,OAAO,8DAAG,QAAQ,CAAI,CAAC;AACzB,CAAC;AAND,sCAMC","sourcesContent":["import React from 'react';\n\nexport default function ErrorToastContainer({\n children,\n}: {\n children: React.ReactNode;\n}): React.ReactElement {\n return <>{children}</>;\n}\n"]}
@@ -1,11 +1,11 @@
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
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import React from "react";
8
+ import React from 'react';
9
9
  export declare function ErrorToastContainer(): JSX.Element | null;
10
10
  declare const _default: React.Component<object, {}, any>;
11
11
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorToastContainer.web.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastContainer.web.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAA+B,MAAM,OAAO,CAAC;AASpD,wBAAgB,mBAAmB,uBAOlC;;AAsED,wBAAgE"}
1
+ {"version":3,"file":"ErrorToastContainer.web.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastContainer.web.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAA+B,MAAM,OAAO,CAAC;AASpD,wBAAgB,mBAAmB,uBAOlC;;AAoED,wBAAgE"}
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.ErrorToastContainer = 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
@@ -33,10 +33,10 @@ exports.ErrorToastContainer = void 0;
33
33
  */
34
34
  const react_1 = __importStar(require("react"));
35
35
  const react_native_1 = require("react-native");
36
+ const ErrorToast_1 = require("./ErrorToast");
36
37
  const LogBoxData = __importStar(require("../Data/LogBoxData"));
37
38
  const LogContext_1 = require("../Data/LogContext");
38
39
  const useRejectionHandler_1 = require("../useRejectionHandler");
39
- const ErrorToast_1 = require("./ErrorToast");
40
40
  function ErrorToastContainer() {
41
41
  (0, useRejectionHandler_1.useRejectionHandler)();
42
42
  const { logs, isDisabled } = (0, LogContext_1.useLogs)();
@@ -64,8 +64,8 @@ function ErrorToastStack({ logs }) {
64
64
  }
65
65
  setSelectedLog(index);
66
66
  }
67
- const warnings = (0, react_1.useMemo)(() => logs.filter((log) => log.level === "warn"), [logs]);
68
- const errors = (0, react_1.useMemo)(() => logs.filter((log) => log.level === "error" || log.level === "fatal"), [logs]);
67
+ const warnings = (0, react_1.useMemo)(() => logs.filter((log) => log.level === 'warn'), [logs]);
68
+ const errors = (0, react_1.useMemo)(() => logs.filter((log) => log.level === 'error' || log.level === 'fatal'), [logs]);
69
69
  return (react_1.default.createElement(react_native_1.View, { style: styles.list },
70
70
  warnings.length > 0 && (react_1.default.createElement(ErrorToast_1.ErrorToast, { log: warnings[warnings.length - 1], level: "warn", totalLogCount: warnings.length, onPressOpen: () => openLog(warnings[warnings.length - 1]), onPressDismiss: onDismissWarns })),
71
71
  errors.length > 0 && (react_1.default.createElement(ErrorToast_1.ErrorToast, { log: errors[errors.length - 1], level: "error", totalLogCount: errors.length, onPressOpen: () => openLog(errors[errors.length - 1]), onPressDismiss: onDismissErrors }))));
@@ -75,8 +75,9 @@ const styles = react_native_1.StyleSheet.create({
75
75
  bottom: 6,
76
76
  left: 10,
77
77
  right: 10,
78
- position: "absolute",
79
78
  maxWidth: 320,
79
+ // @ts-expect-error
80
+ position: 'fixed',
80
81
  },
81
82
  });
82
83
  exports.default = LogBoxData.withSubscription(ErrorToastContainer);
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorToastContainer.web.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastContainer.web.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAoD;AACpD,+CAAgD;AAEhD,+DAAiD;AAEjD,mDAA6C;AAC7C,gEAA6D;AAC7D,6CAA0C;AAE1C,SAAgB,mBAAmB;IACjC,IAAA,yCAAmB,GAAE,CAAC;IACtB,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,IAAA,oBAAO,GAAE,CAAC;IACvC,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,UAAU,EAAE;QAC9B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,8BAAC,eAAe,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;AACzC,CAAC;AAPD,kDAOC;AAED,SAAS,eAAe,CAAC,EAAE,IAAI,EAAyB;IACtD,MAAM,cAAc,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACtC,UAAU,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,eAAe,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACvC,UAAU,CAAC,WAAW,EAAE,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,cAAc,GAAG,IAAA,mBAAW,EAAC,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ACpB,8BAAC,uBAAU,IACT,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,EAC9B,KAAK,EAAC,OAAO,EACb,aAAa,EAAE,MAAM,CAAC,MAAM,EAC5B,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EACrD,cAAc,EAAE,eAAe,GAC/B,CACH,CACI,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,GAAG;KACd;CACF,CAAC,CAAC;AAEH,kBAAe,UAAU,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,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 */\nimport React, { useCallback, useMemo } from \"react\";\nimport { StyleSheet, View } from \"react-native\";\n\nimport * as LogBoxData from \"../Data/LogBoxData\";\nimport { LogBoxLog } from \"../Data/LogBoxLog\";\nimport { useLogs } from \"../Data/LogContext\";\nimport { useRejectionHandler } from \"../useRejectionHandler\";\nimport { ErrorToast } from \"./ErrorToast\";\n\nexport function ErrorToastContainer() {\n useRejectionHandler();\n const { logs, isDisabled } = useLogs();\n if (!logs.length || isDisabled) {\n return null;\n }\n return <ErrorToastStack logs={logs} />;\n}\n\nfunction ErrorToastStack({ logs }: { logs: LogBoxLog[] }) {\n const onDismissWarns = useCallback(() => {\n LogBoxData.clearWarnings();\n }, []);\n\n const onDismissErrors = useCallback(() => {\n LogBoxData.clearErrors();\n }, []);\n\n const setSelectedLog = useCallback((index: number): void => {\n LogBoxData.setSelectedLog(index);\n }, []);\n\n function openLog(log: LogBoxLog) {\n let index = logs.length - 1;\n\n // Stop at zero because if we don't find any log, we'll open the first log.\n while (index > 0 && logs[index] !== log) {\n index -= 1;\n }\n setSelectedLog(index);\n }\n\n const warnings = useMemo(\n () => logs.filter((log) => log.level === \"warn\"),\n [logs]\n );\n\n const errors = useMemo(\n () => logs.filter((log) => log.level === \"error\" || log.level === \"fatal\"),\n [logs]\n );\n\n return (\n <View style={styles.list}>\n {warnings.length > 0 && (\n <ErrorToast\n log={warnings[warnings.length - 1]}\n level=\"warn\"\n totalLogCount={warnings.length}\n onPressOpen={() => openLog(warnings[warnings.length - 1])}\n onPressDismiss={onDismissWarns}\n />\n )}\n\n {errors.length > 0 && (\n <ErrorToast\n log={errors[errors.length - 1]}\n level=\"error\"\n totalLogCount={errors.length}\n onPressOpen={() => openLog(errors[errors.length - 1])}\n onPressDismiss={onDismissErrors}\n />\n )}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n list: {\n bottom: 6,\n left: 10,\n right: 10,\n position: \"absolute\",\n maxWidth: 320,\n },\n});\n\nexport default LogBoxData.withSubscription(ErrorToastContainer);\n"]}
1
+ {"version":3,"file":"ErrorToastContainer.web.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastContainer.web.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAoD;AACpD,+CAAgD;AAEhD,6CAA0C;AAC1C,+DAAiD;AAEjD,mDAA6C;AAC7C,gEAA6D;AAE7D,SAAgB,mBAAmB;IACjC,IAAA,yCAAmB,GAAE,CAAC;IACtB,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,IAAA,oBAAO,GAAE,CAAC;IACvC,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,UAAU,EAAE;QAC9B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,8BAAC,eAAe,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;AACzC,CAAC;A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AAM,GAAG,CAAC,IAAI,CACtB,8BAAC,uBAAU,IACT,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,EAClC,KAAK,EAAC,MAAM,EACZ,aAAa,EAAE,QAAQ,CAAC,MAAM,EAC9B,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EACzD,cAAc,EAAE,cAAc,GAC9B,CACH;QAEA,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CACpB,8BAAC,uBAAU,IACT,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,EAC9B,KAAK,EAAC,OAAO,EACb,aAAa,EAAE,MAAM,CAAC,MAAM,EAC5B,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EACrD,cAAc,EAAE,eAAe,GAC/B,CACH,CACI,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,GAAG;QACb,mBAAmB;QACnB,QAAQ,EAAE,OAAO;KAClB;CACF,CAAC,CAAC;AAEH,kBAAe,UAAU,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,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 */\nimport React, { useCallback, useMemo } from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { ErrorToast } from './ErrorToast';\nimport * as LogBoxData from '../Data/LogBoxData';\nimport { LogBoxLog } from '../Data/LogBoxLog';\nimport { useLogs } from '../Data/LogContext';\nimport { useRejectionHandler } from '../useRejectionHandler';\n\nexport function ErrorToastContainer() {\n useRejectionHandler();\n const { logs, isDisabled } = useLogs();\n if (!logs.length || isDisabled) {\n return null;\n }\n return <ErrorToastStack logs={logs} />;\n}\n\nfunction ErrorToastStack({ logs }: { logs: LogBoxLog[] }) {\n const onDismissWarns = useCallback(() => {\n LogBoxData.clearWarnings();\n }, []);\n\n const onDismissErrors = useCallback(() => {\n LogBoxData.clearErrors();\n }, []);\n\n const setSelectedLog = useCallback((index: number): void => {\n LogBoxData.setSelectedLog(index);\n }, []);\n\n function openLog(log: LogBoxLog) {\n let index = logs.length - 1;\n\n // Stop at zero because if we don't find any log, we'll open the first log.\n while (index > 0 && logs[index] !== log) {\n index -= 1;\n }\n setSelectedLog(index);\n }\n\n const warnings = useMemo(() => logs.filter((log) => log.level === 'warn'), [logs]);\n\n const errors = useMemo(\n () => logs.filter((log) => log.level === 'error' || log.level === 'fatal'),\n [logs]\n );\n\n return (\n <View style={styles.list}>\n {warnings.length > 0 && (\n <ErrorToast\n log={warnings[warnings.length - 1]}\n level=\"warn\"\n totalLogCount={warnings.length}\n onPressOpen={() => openLog(warnings[warnings.length - 1])}\n onPressDismiss={onDismissWarns}\n />\n )}\n\n {errors.length > 0 && (\n <ErrorToast\n log={errors[errors.length - 1]}\n level=\"error\"\n totalLogCount={errors.length}\n onPressOpen={() => openLog(errors[errors.length - 1])}\n onPressDismiss={onDismissErrors}\n />\n )}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n list: {\n bottom: 6,\n left: 10,\n right: 10,\n maxWidth: 320,\n // @ts-expect-error\n position: 'fixed',\n },\n});\n\nexport default LogBoxData.withSubscription(ErrorToastContainer);\n"]}
@@ -1,4 +1,4 @@
1
- import type { Message as MessageType } from "../Data/parseLogBoxLog";
1
+ import type { Message as MessageType } from '../Data/parseLogBoxLog';
2
2
  export declare function ErrorToastMessage({ message }: {
3
3
  message?: MessageType;
4
4
  }): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorToastMessage.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastMessage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrE,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,WAAW,CAAA;CAAE,eAYvE"}
1
+ {"version":3,"file":"ErrorToastMessage.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastMessage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrE,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,WAAW,CAAA;CAAE,eAMvE"}
@@ -27,17 +27,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ErrorToastMessage = void 0;
30
- const react_views_1 = require("@bacons/react-views");
31
30
  const react_1 = __importDefault(require("react"));
31
+ const react_native_1 = require("react-native");
32
32
  const LogBoxMessage_1 = require("../UI/LogBoxMessage");
33
33
  const LogBoxStyle = __importStar(require("../UI/LogBoxStyle"));
34
34
  function ErrorToastMessage({ message }) {
35
- return (react_1.default.createElement(react_views_1.Text, { numberOfLines: 1, style: styles.text }, message && (react_1.default.createElement(LogBoxMessage_1.LogBoxMessage, { plaintext: true, message: message, style: styles.substitutionText }))));
35
+ return (react_1.default.createElement(react_native_1.Text, { numberOfLines: 1, style: styles.text }, message && react_1.default.createElement(LogBoxMessage_1.LogBoxMessage, { plaintext: true, message: message, style: styles.substitutionText })));
36
36
  }
37
37
  exports.ErrorToastMessage = ErrorToastMessage;
38
- const styles = react_views_1.StyleSheet.create({
38
+ const styles = react_native_1.StyleSheet.create({
39
39
  text: {
40
- userSelect: "none",
40
+ userSelect: 'none',
41
41
  paddingLeft: 8,
42
42
  color: LogBoxStyle.getTextColor(1),
43
43
  flex: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorToastMessage.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuD;AACvD,kDAA0B;AAG1B,uDAAoD;AACpD,+DAAiD;AAEjD,SAAgB,iBAAiB,CAAC,EAAE,OAAO,EAA6B;IACtE,OAAO,CACL,8BAAC,kBAAI,IAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,IACvC,OAAO,IAAI,CACV,8BAAC,6BAAa,IACZ,SAAS,QACT,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,CAAC,gBAAgB,GAC9B,CACH,CACI,CACR,CAAC;AACJ,CAAC;AAZD,8CAYC;AAED,MAAM,MAAM,GAAG,wBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;KACf;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACrC;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet, Text } from \"@bacons/react-views\";\nimport React from \"react\";\n\nimport type { Message as MessageType } from \"../Data/parseLogBoxLog\";\nimport { LogBoxMessage } from \"../UI/LogBoxMessage\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\n\nexport function ErrorToastMessage({ message }: { message?: MessageType }) {\n return (\n <Text numberOfLines={1} style={styles.text}>\n {message && (\n <LogBoxMessage\n plaintext\n message={message}\n style={styles.substitutionText}\n />\n )}\n </Text>\n );\n}\n\nconst styles = StyleSheet.create({\n text: {\n userSelect: \"none\",\n paddingLeft: 8,\n color: LogBoxStyle.getTextColor(1),\n flex: 1,\n fontSize: 14,\n lineHeight: 22,\n },\n substitutionText: {\n color: LogBoxStyle.getTextColor(0.6),\n },\n});\n"]}
1
+ {"version":3,"file":"ErrorToastMessage.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+CAAgD;AAGhD,uDAAoD;AACpD,+DAAiD;AAEjD,SAAgB,iBAAiB,CAAC,EAAE,OAAO,EAA6B;IACtE,OAAO,CACL,8BAAC,mBAAI,IAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,IACvC,OAAO,IAAI,8BAAC,6BAAa,IAAC,SAAS,QAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,gBAAgB,GAAI,CACpF,CACR,CAAC;AACJ,CAAC;AAND,8CAMC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;KACf;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACrC;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet, Text } from 'react-native';\n\nimport type { Message as MessageType } from '../Data/parseLogBoxLog';\nimport { LogBoxMessage } from '../UI/LogBoxMessage';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\n\nexport function ErrorToastMessage({ message }: { message?: MessageType }) {\n return (\n <Text numberOfLines={1} style={styles.text}>\n {message && <LogBoxMessage plaintext message={message} style={styles.substitutionText} />}\n </Text>\n );\n}\n\nconst styles = StyleSheet.create({\n text: {\n userSelect: 'none',\n paddingLeft: 8,\n color: LogBoxStyle.getTextColor(1),\n flex: 1,\n fontSize: 14,\n lineHeight: 22,\n },\n substitutionText: {\n color: LogBoxStyle.getTextColor(0.6),\n },\n});\n"]}
@@ -1,3 +1,3 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export declare function useRejectionHandler(): React.MutableRefObject<boolean>;
3
3
  //# sourceMappingURL=useRejectionHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRejectionHandler.d.ts","sourceRoot":"","sources":["../../src/error-overlay/useRejectionHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B,wBAAgB,mBAAmB,oCA6ClC"}
1
+ {"version":3,"file":"useRejectionHandler.d.ts","sourceRoot":"","sources":["../../src/error-overlay/useRejectionHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAuB1B,wBAAgB,mBAAmB,oCAqClC"}