@expo/metro-runtime 2.2.3 → 3.0.0
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.
- package/README.md +17 -1
- package/async-require.d.ts +1 -1
- package/async-require.js +1 -1
- package/build/HMRClient.d.ts +1 -1
- package/build/HMRClient.d.ts.map +1 -1
- package/build/HMRClient.js +40 -68
- package/build/HMRClient.js.map +1 -1
- package/build/HMRClient.native.js +2 -4
- package/build/HMRClient.native.js.map +1 -1
- package/build/LoadingView.d.ts +1 -1
- package/build/LoadingView.d.ts.map +1 -1
- package/build/LoadingView.js +4 -10
- package/build/LoadingView.js.map +1 -1
- package/build/LoadingView.native.d.ts +2 -0
- package/build/LoadingView.native.d.ts.map +1 -1
- package/build/LoadingView.native.js +2 -2
- package/build/LoadingView.native.js.map +1 -1
- package/build/async-require/buildAsyncRequire.js +3 -7
- package/build/async-require/buildAsyncRequire.js.map +1 -1
- package/build/async-require/buildUrlForBundle.js +2 -6
- package/build/async-require/buildUrlForBundle.js.map +1 -1
- package/build/async-require/buildUrlForBundle.native.js +6 -9
- package/build/async-require/buildUrlForBundle.native.js.map +1 -1
- package/build/async-require/fetchAsync.d.ts.map +1 -1
- package/build/async-require/fetchAsync.js +4 -8
- package/build/async-require/fetchAsync.js.map +1 -1
- package/build/async-require/fetchAsync.native.d.ts +1 -1
- package/build/async-require/fetchAsync.native.d.ts.map +1 -1
- package/build/async-require/fetchAsync.native.js +14 -21
- package/build/async-require/fetchAsync.native.js.map +1 -1
- package/build/async-require/fetchThenEval.d.ts.map +1 -1
- package/build/async-require/fetchThenEval.js +5 -10
- package/build/async-require/fetchThenEval.js.map +1 -1
- package/build/async-require/fetchThenEval.web.d.ts.map +1 -1
- package/build/async-require/fetchThenEval.web.js +14 -27
- package/build/async-require/fetchThenEval.web.js.map +1 -1
- package/build/async-require/index.js +2 -6
- package/build/async-require/index.js.map +1 -1
- package/build/async-require/loadBundle.d.ts.map +1 -1
- package/build/async-require/loadBundle.js +14 -18
- package/build/async-require/loadBundle.js.map +1 -1
- package/build/effects.js +5 -7
- package/build/effects.js.map +1 -1
- package/build/effects.native.js +0 -1
- package/build/error-overlay/Data/LogBoxData.d.ts +5 -5
- package/build/error-overlay/Data/LogBoxData.d.ts.map +1 -1
- package/build/error-overlay/Data/LogBoxData.js +76 -127
- package/build/error-overlay/Data/LogBoxData.js.map +1 -1
- package/build/error-overlay/Data/LogBoxLog.d.ts +10 -10
- package/build/error-overlay/Data/LogBoxLog.d.ts.map +1 -1
- package/build/error-overlay/Data/LogBoxLog.js +46 -69
- package/build/error-overlay/Data/LogBoxLog.js.map +1 -1
- package/build/error-overlay/Data/LogBoxSymbolication.d.ts +2 -2
- package/build/error-overlay/Data/LogBoxSymbolication.js +9 -17
- package/build/error-overlay/Data/LogBoxSymbolication.js.map +1 -1
- package/build/error-overlay/Data/LogContext.d.ts +2 -2
- package/build/error-overlay/Data/LogContext.d.ts.map +1 -1
- package/build/error-overlay/Data/LogContext.js +12 -20
- package/build/error-overlay/Data/LogContext.js.map +1 -1
- package/build/error-overlay/Data/parseLogBoxLog.d.ts +2 -2
- package/build/error-overlay/Data/parseLogBoxLog.d.ts.map +1 -1
- package/build/error-overlay/Data/parseLogBoxLog.js +35 -50
- package/build/error-overlay/Data/parseLogBoxLog.js.map +1 -1
- package/build/error-overlay/ErrorOverlay.d.ts +10 -3
- package/build/error-overlay/ErrorOverlay.d.ts.map +1 -1
- package/build/error-overlay/ErrorOverlay.js +55 -86
- package/build/error-overlay/ErrorOverlay.js.map +1 -1
- package/build/error-overlay/LogBox.d.ts +2 -2
- package/build/error-overlay/LogBox.d.ts.map +1 -1
- package/build/error-overlay/LogBox.js +1 -4
- package/build/error-overlay/LogBox.js.map +1 -1
- package/build/error-overlay/LogBox.web.d.ts +3 -3
- package/build/error-overlay/LogBox.web.d.ts.map +1 -1
- package/build/error-overlay/LogBox.web.js +12 -17
- package/build/error-overlay/LogBox.web.js.map +1 -1
- package/build/error-overlay/UI/AnsiHighlight.d.ts +2 -2
- package/build/error-overlay/UI/AnsiHighlight.d.ts.map +1 -1
- package/build/error-overlay/UI/AnsiHighlight.js +28 -36
- package/build/error-overlay/UI/AnsiHighlight.js.map +1 -1
- package/build/error-overlay/UI/LogBoxButton.d.ts +1 -1
- package/build/error-overlay/UI/LogBoxButton.d.ts.map +1 -1
- package/build/error-overlay/UI/LogBoxButton.js +18 -44
- package/build/error-overlay/UI/LogBoxButton.js.map +1 -1
- package/build/error-overlay/UI/LogBoxMessage.d.ts +2 -2
- package/build/error-overlay/UI/LogBoxMessage.d.ts.map +1 -1
- package/build/error-overlay/UI/LogBoxMessage.js +10 -17
- package/build/error-overlay/UI/LogBoxMessage.js.map +1 -1
- package/build/error-overlay/UI/LogBoxStyle.d.ts +1 -1
- package/build/error-overlay/UI/LogBoxStyle.js +15 -32
- package/build/error-overlay/UI/LogBoxStyle.js.map +1 -1
- package/build/error-overlay/UI/constants.js +5 -8
- package/build/error-overlay/UI/constants.js.map +1 -1
- package/build/error-overlay/formatProjectFilePath.d.ts +1 -1
- package/build/error-overlay/formatProjectFilePath.d.ts.map +1 -1
- package/build/error-overlay/formatProjectFilePath.js +7 -14
- package/build/error-overlay/formatProjectFilePath.js.map +1 -1
- package/build/error-overlay/index.d.ts +1 -1
- package/build/error-overlay/index.d.ts.map +1 -1
- package/build/error-overlay/index.js +9 -17
- package/build/error-overlay/index.js.map +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.d.ts +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.d.ts.map +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.js +11 -21
- package/build/error-overlay/modules/ExceptionsManager/index.js.map +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.native.d.ts +2 -1
- package/build/error-overlay/modules/ExceptionsManager/index.native.d.ts.map +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.native.js +3 -3
- package/build/error-overlay/modules/ExceptionsManager/index.native.js.map +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.d.ts.map +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.js +10 -15
- package/build/error-overlay/modules/NativeLogBox/index.js.map +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.native.d.ts +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.native.d.ts.map +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.native.js +2 -8
- package/build/error-overlay/modules/NativeLogBox/index.native.js.map +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.js +5 -7
- package/build/error-overlay/modules/openFileInEditor/index.js.map +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.native.d.ts +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.native.d.ts.map +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.native.js +2 -8
- package/build/error-overlay/modules/openFileInEditor/index.native.js.map +1 -1
- package/build/error-overlay/modules/parseErrorStack/index.d.ts +1 -1
- package/build/error-overlay/modules/parseErrorStack/index.d.ts.map +1 -1
- package/build/error-overlay/modules/parseErrorStack/index.js +4 -7
- package/build/error-overlay/modules/parseErrorStack/index.js.map +1 -1
- package/build/error-overlay/modules/parseErrorStack/parseHermesStack.d.ts +1 -1
- package/build/error-overlay/modules/parseErrorStack/parseHermesStack.js +2 -8
- package/build/error-overlay/modules/parseErrorStack/parseHermesStack.js.map +1 -1
- package/build/error-overlay/modules/stringifySafe/index.d.ts +1 -1
- package/build/error-overlay/modules/stringifySafe/index.d.ts.map +1 -1
- package/build/error-overlay/modules/stringifySafe/index.js +16 -22
- package/build/error-overlay/modules/stringifySafe/index.js.map +1 -1
- package/build/error-overlay/modules/symbolicateStackTrace/index.d.ts +2 -2
- package/build/error-overlay/modules/symbolicateStackTrace/index.d.ts.map +1 -1
- package/build/error-overlay/modules/symbolicateStackTrace/index.js +6 -8
- package/build/error-overlay/modules/symbolicateStackTrace/index.js.map +1 -1
- package/build/error-overlay/modules/symbolicateStackTrace/index.native.d.ts +1 -1
- package/build/error-overlay/modules/symbolicateStackTrace/index.native.js +2 -7
- package/build/error-overlay/modules/symbolicateStackTrace/index.native.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js +28 -58
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorFooter.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorFooter.js +35 -64
- package/build/error-overlay/overlay/LogBoxInspectorFooter.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorHeader.d.ts +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorHeader.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorHeader.js +37 -71
- package/build/error-overlay/overlay/LogBoxInspectorHeader.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js +20 -54
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSection.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorSection.js +13 -43
- package/build/error-overlay/overlay/LogBoxInspectorSection.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js +26 -55
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js +23 -53
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js +42 -76
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js.map +1 -1
- package/build/error-overlay/toast/ErrorToast.d.ts +2 -2
- package/build/error-overlay/toast/ErrorToast.d.ts.map +1 -1
- package/build/error-overlay/toast/ErrorToast.js +44 -72
- package/build/error-overlay/toast/ErrorToast.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.d.ts +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.js +3 -9
- package/build/error-overlay/toast/ErrorToastContainer.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.web.d.ts +2 -2
- package/build/error-overlay/toast/ErrorToastContainer.web.d.ts.map +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.web.js +22 -49
- package/build/error-overlay/toast/ErrorToastContainer.web.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastMessage.d.ts +1 -1
- package/build/error-overlay/toast/ErrorToastMessage.d.ts.map +1 -1
- package/build/error-overlay/toast/ErrorToastMessage.js +8 -37
- package/build/error-overlay/toast/ErrorToastMessage.js.map +1 -1
- package/build/error-overlay/useRejectionHandler.d.ts +1 -1
- package/build/error-overlay/useRejectionHandler.d.ts.map +1 -1
- package/build/error-overlay/useRejectionHandler.js +20 -28
- package/build/error-overlay/useRejectionHandler.js.map +1 -1
- package/build/getDevServer.d.ts.map +1 -1
- package/build/getDevServer.js +10 -16
- package/build/getDevServer.js.map +1 -1
- package/build/getDevServer.native.d.ts +2 -0
- package/build/getDevServer.native.d.ts.map +1 -1
- package/build/getDevServer.native.js +2 -2
- package/build/getDevServer.native.js.map +1 -1
- package/build/index.d.ts +2 -2
- package/build/index.js +4 -6
- package/build/index.js.map +1 -1
- package/build/location/Location.js +2 -7
- package/build/location/Location.js.map +1 -1
- package/build/location/Location.native.d.ts.map +1 -1
- package/build/location/Location.native.js +25 -32
- package/build/location/Location.native.js.map +1 -1
- package/build/location/install.js +0 -1
- package/build/location/install.native.d.ts +1 -1
- package/build/location/install.native.js +23 -34
- package/build/location/install.native.js.map +1 -1
- package/build/messageSocket.d.ts.map +1 -1
- package/build/messageSocket.js +5 -6
- package/build/messageSocket.js.map +1 -1
- package/build/setupFastRefresh.d.ts.map +1 -1
- package/build/setupFastRefresh.js +2 -4
- package/build/setupFastRefresh.js.map +1 -1
- package/build/setupHMR.js +5 -12
- package/build/setupHMR.js.map +1 -1
- package/build/symbolicate.d.ts +3 -3
- package/build/symbolicate.js +4 -25
- package/build/symbolicate.js.map +1 -1
- package/error-overlay.d.ts +1 -1
- package/error-overlay.js +1 -1
- package/package.json +25 -14
- package/LICENSE +0 -13
|
@@ -1,52 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.LogBoxInspectorSourceMapStatus = void 0;
|
|
27
1
|
/**
|
|
28
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 650 Industries.
|
|
29
3
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
4
|
*
|
|
31
5
|
* This source code is licensed under the MIT license found in the
|
|
32
6
|
* LICENSE file in the root directory of this source tree.
|
|
33
7
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
function LogBoxInspectorSourceMapStatus(props) {
|
|
39
|
-
const [state, setState] =
|
|
8
|
+
import React, { useEffect, useState } from 'react';
|
|
9
|
+
import { Animated, Easing, StyleSheet, Text } from 'react-native';
|
|
10
|
+
import { LogBoxButton } from '../UI/LogBoxButton';
|
|
11
|
+
import * as LogBoxStyle from '../UI/LogBoxStyle';
|
|
12
|
+
export function LogBoxInspectorSourceMapStatus(props) {
|
|
13
|
+
const [state, setState] = useState({
|
|
40
14
|
animation: null,
|
|
41
15
|
rotate: null,
|
|
42
16
|
});
|
|
43
|
-
|
|
44
|
-
if (props.status ===
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (props.status === 'PENDING') {
|
|
45
19
|
if (state.animation == null) {
|
|
46
|
-
const animated = new
|
|
47
|
-
const animation =
|
|
20
|
+
const animated = new Animated.Value(0);
|
|
21
|
+
const animation = Animated.loop(Animated.timing(animated, {
|
|
48
22
|
duration: 2000,
|
|
49
|
-
easing:
|
|
23
|
+
easing: Easing.linear,
|
|
50
24
|
toValue: 1,
|
|
51
25
|
useNativeDriver: true,
|
|
52
26
|
}));
|
|
@@ -54,7 +28,7 @@ function LogBoxInspectorSourceMapStatus(props) {
|
|
|
54
28
|
animation,
|
|
55
29
|
rotate: animated.interpolate({
|
|
56
30
|
inputRange: [0, 1],
|
|
57
|
-
outputRange: [
|
|
31
|
+
outputRange: ['0deg', '360deg'],
|
|
58
32
|
}),
|
|
59
33
|
});
|
|
60
34
|
animation.start();
|
|
@@ -78,37 +52,35 @@ function LogBoxInspectorSourceMapStatus(props) {
|
|
|
78
52
|
let image;
|
|
79
53
|
let color;
|
|
80
54
|
switch (props.status) {
|
|
81
|
-
case
|
|
82
|
-
image = require(
|
|
55
|
+
case 'FAILED':
|
|
56
|
+
image = require('@expo/metro-runtime/assets/alert-triangle.png');
|
|
83
57
|
color = LogBoxStyle.getErrorColor(1);
|
|
84
58
|
break;
|
|
85
|
-
case
|
|
86
|
-
image = require(
|
|
59
|
+
case 'PENDING':
|
|
60
|
+
image = require('@expo/metro-runtime/assets/loader.png');
|
|
87
61
|
color = LogBoxStyle.getWarningColor(1);
|
|
88
62
|
break;
|
|
89
63
|
}
|
|
90
|
-
if (props.status ===
|
|
64
|
+
if (props.status === 'COMPLETE' || image == null) {
|
|
91
65
|
return null;
|
|
92
66
|
}
|
|
93
|
-
return (
|
|
94
|
-
default:
|
|
67
|
+
return (React.createElement(LogBoxButton, { backgroundColor: {
|
|
68
|
+
default: 'transparent',
|
|
95
69
|
pressed: LogBoxStyle.getBackgroundColor(1),
|
|
96
70
|
}, hitSlop: { bottom: 8, left: 8, right: 8, top: 8 }, onPress: props.onPress, style: styles.root },
|
|
97
|
-
|
|
71
|
+
React.createElement(Animated.Image, { source: image, tintColor: color ?? LogBoxStyle.getTextColor(0.4), style: [
|
|
98
72
|
styles.image,
|
|
99
|
-
|
|
100
|
-
state.rotate == null || props.status !== "PENDING"
|
|
73
|
+
state.rotate == null || props.status !== 'PENDING'
|
|
101
74
|
? null
|
|
102
75
|
: { transform: [{ rotate: state.rotate }] },
|
|
103
76
|
] }),
|
|
104
|
-
|
|
77
|
+
React.createElement(Text, { style: [styles.text, { color }] }, "Source Map")));
|
|
105
78
|
}
|
|
106
|
-
|
|
107
|
-
const styles = react_native_1.StyleSheet.create({
|
|
79
|
+
const styles = StyleSheet.create({
|
|
108
80
|
root: {
|
|
109
|
-
alignItems:
|
|
81
|
+
alignItems: 'center',
|
|
110
82
|
borderRadius: 12,
|
|
111
|
-
flexDirection:
|
|
83
|
+
flexDirection: 'row',
|
|
112
84
|
height: 24,
|
|
113
85
|
paddingHorizontal: 8,
|
|
114
86
|
},
|
|
@@ -116,7 +88,6 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
116
88
|
height: 14,
|
|
117
89
|
width: 16,
|
|
118
90
|
marginEnd: 4,
|
|
119
|
-
tintColor: LogBoxStyle.getTextColor(0.4),
|
|
120
91
|
},
|
|
121
92
|
text: {
|
|
122
93
|
fontSize: 12,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorSourceMapStatus.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSourceMapStatus.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorSourceMapStatus.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSourceMapStatus.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAyB,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AAOjD,MAAM,UAAU,8BAA8B,CAAC,KAAY;IACzD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAG/B;QACD,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,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QACJ,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,KAAK;QACpB,MAAM,EAAE,EAAE;QACV,iBAAiB,EAAE,CAAC;KACrB;IACD,KAAK,EAAE;QACL,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC;KACb;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;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, useState } from 'react';\nimport { Animated, Easing, GestureResponderEvent, StyleSheet, Text } from 'react-native';\n\nimport { LogBoxButton } from '../UI/LogBoxButton';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\n\ntype Props = {\n onPress?: ((event: GestureResponderEvent) => void) | null;\n status: 'COMPLETE' | 'FAILED' | 'NONE' | 'PENDING';\n};\n\nexport function LogBoxInspectorSourceMapStatus(props: Props) {\n const [state, setState] = useState<{\n animation: null | Animated.CompositeAnimation;\n rotate: null | Animated.AnimatedInterpolation<string>;\n }>({\n animation: null,\n rotate: null,\n });\n\n useEffect(() => {\n if (props.status === 'PENDING') {\n if (state.animation == null) {\n const animated = new Animated.Value(0);\n const animation = Animated.loop(\n Animated.timing(animated, {\n duration: 2000,\n easing: Easing.linear,\n toValue: 1,\n useNativeDriver: true,\n })\n );\n setState({\n animation,\n rotate: animated.interpolate({\n inputRange: [0, 1],\n outputRange: ['0deg', '360deg'],\n }),\n });\n animation.start();\n }\n } else {\n if (state.animation != null) {\n state.animation.stop();\n setState({\n animation: null,\n rotate: null,\n });\n }\n }\n\n return () => {\n if (state.animation != null) {\n state.animation.stop();\n }\n };\n }, [props.status, state.animation]);\n\n let image;\n let color;\n switch (props.status) {\n case 'FAILED':\n image = require('@expo/metro-runtime/assets/alert-triangle.png');\n color = LogBoxStyle.getErrorColor(1);\n break;\n case 'PENDING':\n image = require('@expo/metro-runtime/assets/loader.png');\n color = LogBoxStyle.getWarningColor(1);\n break;\n }\n\n if (props.status === 'COMPLETE' || image == null) {\n return null;\n }\n\n return (\n <LogBoxButton\n backgroundColor={{\n default: 'transparent',\n pressed: LogBoxStyle.getBackgroundColor(1),\n }}\n hitSlop={{ bottom: 8, left: 8, right: 8, top: 8 }}\n onPress={props.onPress}\n style={styles.root}>\n <Animated.Image\n source={image}\n tintColor={color ?? LogBoxStyle.getTextColor(0.4)}\n style={[\n styles.image,\n state.rotate == null || props.status !== 'PENDING'\n ? null\n : { transform: [{ rotate: state.rotate }] },\n ]}\n />\n <Text style={[styles.text, { color }]}>Source Map</Text>\n </LogBoxButton>\n );\n}\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n borderRadius: 12,\n flexDirection: 'row',\n height: 24,\n paddingHorizontal: 8,\n },\n image: {\n height: 14,\n width: 16,\n marginEnd: 4,\n },\n text: {\n fontSize: 12,\n includeFontPadding: false,\n lineHeight: 16,\n },\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GestureResponderEvent } from
|
|
2
|
-
import { StackFrame } from
|
|
1
|
+
import { GestureResponderEvent } from 'react-native';
|
|
2
|
+
import { StackFrame } from 'stacktrace-parser';
|
|
3
3
|
type Props = {
|
|
4
4
|
frame: StackFrame & {
|
|
5
5
|
collapse?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorStackFrame.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrame.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,qBAAqB,EAA0B,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAS/C,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,UAAU,GAAG;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorStackFrame.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrame.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,qBAAqB,EAA0B,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAS/C,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,UAAU,GAAG;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,KAAK,eAsBrD"}
|
|
@@ -1,60 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.LogBoxInspectorStackFrame = void 0;
|
|
30
1
|
/**
|
|
31
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 650 Industries.
|
|
32
3
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
33
4
|
*
|
|
34
5
|
* This source code is licensed under the MIT license found in the
|
|
35
6
|
* LICENSE file in the root directory of this source tree.
|
|
36
7
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
function LogBoxInspectorStackFrame(props) {
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
10
|
+
import { LogBoxButton } from '../UI/LogBoxButton';
|
|
11
|
+
import * as LogBoxStyle from '../UI/LogBoxStyle';
|
|
12
|
+
import { CODE_FONT } from '../UI/constants';
|
|
13
|
+
import { getStackFormattedLocation } from '../formatProjectFilePath';
|
|
14
|
+
export function LogBoxInspectorStackFrame(props) {
|
|
44
15
|
const { frame, onPress } = props;
|
|
45
|
-
const location =
|
|
46
|
-
return (
|
|
47
|
-
|
|
48
|
-
default:
|
|
49
|
-
pressed: onPress ? LogBoxStyle.getBackgroundColor(1) :
|
|
16
|
+
const location = getStackFormattedLocation(process.env.EXPO_PROJECT_ROOT, frame);
|
|
17
|
+
return (React.createElement(View, { style: styles.frameContainer },
|
|
18
|
+
React.createElement(LogBoxButton, { backgroundColor: {
|
|
19
|
+
default: 'transparent',
|
|
20
|
+
pressed: onPress ? LogBoxStyle.getBackgroundColor(1) : 'transparent',
|
|
50
21
|
}, onPress: onPress, style: styles.frame },
|
|
51
|
-
|
|
52
|
-
|
|
22
|
+
React.createElement(Text, { style: [styles.name, frame.collapse === true && styles.dim] }, frame.methodName),
|
|
23
|
+
React.createElement(Text, { ellipsizeMode: "middle", numberOfLines: 1, style: [styles.location, frame.collapse === true && styles.dim] }, location))));
|
|
53
24
|
}
|
|
54
|
-
|
|
55
|
-
const styles = react_native_1.StyleSheet.create({
|
|
25
|
+
const styles = StyleSheet.create({
|
|
56
26
|
frameContainer: {
|
|
57
|
-
flexDirection:
|
|
27
|
+
flexDirection: 'row',
|
|
58
28
|
paddingHorizontal: 15,
|
|
59
29
|
},
|
|
60
30
|
frame: {
|
|
@@ -64,32 +34,32 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
64
34
|
borderRadius: 5,
|
|
65
35
|
},
|
|
66
36
|
lineLocation: {
|
|
67
|
-
flexDirection:
|
|
37
|
+
flexDirection: 'row',
|
|
68
38
|
},
|
|
69
39
|
name: {
|
|
70
40
|
color: LogBoxStyle.getTextColor(1),
|
|
71
41
|
fontSize: 14,
|
|
72
42
|
includeFontPadding: false,
|
|
73
43
|
lineHeight: 18,
|
|
74
|
-
fontWeight:
|
|
75
|
-
fontFamily:
|
|
44
|
+
fontWeight: '400',
|
|
45
|
+
fontFamily: CODE_FONT,
|
|
76
46
|
},
|
|
77
47
|
location: {
|
|
78
48
|
color: LogBoxStyle.getTextColor(0.8),
|
|
79
49
|
fontSize: 12,
|
|
80
|
-
fontWeight:
|
|
50
|
+
fontWeight: '300',
|
|
81
51
|
includeFontPadding: false,
|
|
82
52
|
lineHeight: 16,
|
|
83
53
|
paddingLeft: 10,
|
|
84
54
|
},
|
|
85
55
|
dim: {
|
|
86
56
|
color: LogBoxStyle.getTextColor(0.4),
|
|
87
|
-
fontWeight:
|
|
57
|
+
fontWeight: '300',
|
|
88
58
|
},
|
|
89
59
|
line: {
|
|
90
60
|
color: LogBoxStyle.getTextColor(0.8),
|
|
91
61
|
fontSize: 12,
|
|
92
|
-
fontWeight:
|
|
62
|
+
fontWeight: '300',
|
|
93
63
|
includeFontPadding: false,
|
|
94
64
|
lineHeight: 16,
|
|
95
65
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorStackFrame.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrame.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorStackFrame.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrame.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAyB,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAG7E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AASrE,MAAM,UAAU,yBAAyB,CAAC,KAAY;IACpD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,QAAQ,GAAG,yBAAyB,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IACjF,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,cAAc;QAChC,oBAAC,YAAY,IACX,eAAe,EAAE;gBACf,OAAO,EAAE,aAAa;gBACtB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAA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AAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,UAAU,EAAE,KAAK;KAClB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;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 from 'react';\nimport { GestureResponderEvent, StyleSheet, Text, View } from 'react-native';\nimport { StackFrame } from 'stacktrace-parser';\n\nimport { LogBoxButton } from '../UI/LogBoxButton';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\nimport { CODE_FONT } from '../UI/constants';\nimport { getStackFormattedLocation } from '../formatProjectFilePath';\n\ndeclare const process: any;\n\ntype Props = {\n frame: StackFrame & { collapse?: boolean };\n onPress?: (event: GestureResponderEvent) => void;\n};\n\nexport function LogBoxInspectorStackFrame(props: Props) {\n const { frame, onPress } = props;\n const location = getStackFormattedLocation(process.env.EXPO_PROJECT_ROOT, frame);\n return (\n <View style={styles.frameContainer}>\n <LogBoxButton\n backgroundColor={{\n default: 'transparent',\n pressed: onPress ? LogBoxStyle.getBackgroundColor(1) : 'transparent',\n }}\n onPress={onPress}\n style={styles.frame}>\n <Text style={[styles.name, frame.collapse === true && styles.dim]}>{frame.methodName}</Text>\n <Text\n ellipsizeMode=\"middle\"\n numberOfLines={1}\n style={[styles.location, frame.collapse === true && styles.dim]}>\n {location}\n </Text>\n </LogBoxButton>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n frameContainer: {\n flexDirection: 'row',\n paddingHorizontal: 15,\n },\n frame: {\n flex: 1,\n paddingVertical: 4,\n paddingHorizontal: 10,\n borderRadius: 5,\n },\n lineLocation: {\n flexDirection: 'row',\n },\n name: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n includeFontPadding: false,\n lineHeight: 18,\n fontWeight: '400',\n fontFamily: CODE_FONT,\n },\n location: {\n color: LogBoxStyle.getTextColor(0.8),\n fontSize: 12,\n fontWeight: '300',\n includeFontPadding: false,\n lineHeight: 16,\n paddingLeft: 10,\n },\n dim: {\n color: LogBoxStyle.getTextColor(0.4),\n fontWeight: '300',\n },\n line: {\n color: LogBoxStyle.getTextColor(0.8),\n fontSize: 12,\n fontWeight: '300',\n includeFontPadding: false,\n lineHeight: 16,\n },\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { StackType } from
|
|
2
|
-
import type { Stack } from
|
|
1
|
+
import type { StackType } from '../Data/LogBoxLog';
|
|
2
|
+
import type { Stack } from '../Data/LogBoxSymbolication';
|
|
3
3
|
type Props = {
|
|
4
4
|
type: StackType;
|
|
5
5
|
onRetry: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorStackFrames.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrames.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AASzD,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorStackFrames.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrames.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AASzD,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,CA2BjF;AAED,wBAAgB,0BAA0B,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,sBA4ClE"}
|
|
@@ -1,51 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.LogBoxInspectorStackFrames = exports.getCollapseMessage = void 0;
|
|
30
1
|
/**
|
|
31
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 650 Industries.
|
|
32
3
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
33
4
|
*
|
|
34
5
|
* This source code is licensed under the MIT license found in the
|
|
35
6
|
* LICENSE file in the root directory of this source tree.
|
|
36
7
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function getCollapseMessage(stackFrames, collapsed) {
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
10
|
+
import { useSelectedLog } from '../Data/LogContext';
|
|
11
|
+
import { LogBoxButton } from '../UI/LogBoxButton';
|
|
12
|
+
import * as LogBoxStyle from '../UI/LogBoxStyle';
|
|
13
|
+
import openFileInEditor from '../modules/openFileInEditor';
|
|
14
|
+
import { LogBoxInspectorSection } from './LogBoxInspectorSection';
|
|
15
|
+
import { LogBoxInspectorSourceMapStatus } from './LogBoxInspectorSourceMapStatus';
|
|
16
|
+
import { LogBoxInspectorStackFrame } from './LogBoxInspectorStackFrame';
|
|
17
|
+
export function getCollapseMessage(stackFrames, collapsed) {
|
|
47
18
|
if (stackFrames.length === 0) {
|
|
48
|
-
return
|
|
19
|
+
return 'No frames to show';
|
|
49
20
|
}
|
|
50
21
|
const collapsedCount = stackFrames.reduce((count, { collapse }) => {
|
|
51
22
|
if (collapse === true) {
|
|
@@ -54,13 +25,13 @@ function getCollapseMessage(stackFrames, collapsed) {
|
|
|
54
25
|
return count;
|
|
55
26
|
}, 0);
|
|
56
27
|
if (collapsedCount === 0) {
|
|
57
|
-
return
|
|
28
|
+
return 'Showing all frames';
|
|
58
29
|
}
|
|
59
|
-
const framePlural = `frame${collapsedCount > 1 ?
|
|
30
|
+
const framePlural = `frame${collapsedCount > 1 ? 's' : ''}`;
|
|
60
31
|
if (collapsedCount === stackFrames.length) {
|
|
61
32
|
return collapsed
|
|
62
|
-
? `See${collapsedCount > 1 ?
|
|
63
|
-
: `Collapse${collapsedCount > 1 ?
|
|
33
|
+
? `See${collapsedCount > 1 ? ' all ' : ' '}${collapsedCount} collapsed ${framePlural}`
|
|
34
|
+
: `Collapse${collapsedCount > 1 ? ' all ' : ' '}${collapsedCount} ${framePlural}`;
|
|
64
35
|
}
|
|
65
36
|
else {
|
|
66
37
|
return collapsed
|
|
@@ -68,57 +39,52 @@ function getCollapseMessage(stackFrames, collapsed) {
|
|
|
68
39
|
: `Collapse ${collapsedCount} ${framePlural}`;
|
|
69
40
|
}
|
|
70
41
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const log = (0, LogContext_1.useSelectedLog)();
|
|
75
|
-
const [collapsed, setCollapsed] = (0, react_1.useState)(() => {
|
|
76
|
-
var _a;
|
|
42
|
+
export function LogBoxInspectorStackFrames({ onRetry, type }) {
|
|
43
|
+
const log = useSelectedLog();
|
|
44
|
+
const [collapsed, setCollapsed] = useState(() => {
|
|
77
45
|
// Only collapse frames initially if some frames are not collapsed.
|
|
78
|
-
return
|
|
46
|
+
return log.getAvailableStack(type)?.some(({ collapse }) => !collapse);
|
|
79
47
|
});
|
|
80
48
|
function getStackList() {
|
|
81
|
-
var _a;
|
|
82
49
|
if (collapsed === true) {
|
|
83
|
-
return
|
|
50
|
+
return log.getAvailableStack(type)?.filter(({ collapse }) => !collapse);
|
|
84
51
|
}
|
|
85
52
|
else {
|
|
86
53
|
return log.getAvailableStack(type);
|
|
87
54
|
}
|
|
88
55
|
}
|
|
89
|
-
if (
|
|
56
|
+
if (log.getAvailableStack(type)?.length === 0) {
|
|
90
57
|
return null;
|
|
91
58
|
}
|
|
92
|
-
return (
|
|
93
|
-
log.symbolicated[type].status !==
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
59
|
+
return (React.createElement(LogBoxInspectorSection, { heading: type === 'component' ? 'Component Stack' : 'Call Stack', action: React.createElement(LogBoxInspectorSourceMapStatus, { onPress: log.symbolicated[type].status === 'FAILED' ? onRetry : null, status: log.symbolicated[type].status }) },
|
|
60
|
+
log.symbolicated[type].status !== 'COMPLETE' && (React.createElement(View, { style: stackStyles.hintBox },
|
|
61
|
+
React.createElement(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."))),
|
|
62
|
+
React.createElement(StackFrameList, { list: getStackList(), status: log.symbolicated[type].status }),
|
|
63
|
+
React.createElement(StackFrameFooter, { onPress: () => setCollapsed(!collapsed), message: getCollapseMessage(log.getAvailableStack(type), !!collapsed) })));
|
|
97
64
|
}
|
|
98
|
-
exports.LogBoxInspectorStackFrames = LogBoxInspectorStackFrames;
|
|
99
65
|
function StackFrameList({ list, status, }) {
|
|
100
66
|
return list.map((frame, index) => {
|
|
101
67
|
const { file, lineNumber } = frame;
|
|
102
|
-
return (
|
|
103
|
-
? () => (
|
|
68
|
+
return (React.createElement(LogBoxInspectorStackFrame, { key: index, frame: frame, onPress: status === 'COMPLETE' && file != null && lineNumber != null
|
|
69
|
+
? () => openFileInEditor(file, lineNumber)
|
|
104
70
|
: undefined }));
|
|
105
71
|
});
|
|
106
72
|
}
|
|
107
|
-
function StackFrameFooter({ message, onPress
|
|
108
|
-
return (
|
|
109
|
-
|
|
110
|
-
default:
|
|
73
|
+
function StackFrameFooter({ message, onPress }) {
|
|
74
|
+
return (React.createElement(View, { style: stackStyles.collapseContainer },
|
|
75
|
+
React.createElement(LogBoxButton, { backgroundColor: {
|
|
76
|
+
default: 'transparent',
|
|
111
77
|
pressed: LogBoxStyle.getBackgroundColor(1),
|
|
112
78
|
}, onPress: onPress, style: stackStyles.collapseButton },
|
|
113
|
-
|
|
79
|
+
React.createElement(Text, { style: stackStyles.collapse }, message))));
|
|
114
80
|
}
|
|
115
|
-
const stackStyles =
|
|
81
|
+
const stackStyles = StyleSheet.create({
|
|
116
82
|
section: {
|
|
117
83
|
marginTop: 15,
|
|
118
84
|
},
|
|
119
85
|
heading: {
|
|
120
|
-
alignItems:
|
|
121
|
-
flexDirection:
|
|
86
|
+
alignItems: 'center',
|
|
87
|
+
flexDirection: 'row',
|
|
122
88
|
paddingHorizontal: 12,
|
|
123
89
|
marginBottom: 10,
|
|
124
90
|
},
|
|
@@ -126,7 +92,7 @@ const stackStyles = react_native_1.StyleSheet.create({
|
|
|
126
92
|
color: LogBoxStyle.getTextColor(1),
|
|
127
93
|
flex: 1,
|
|
128
94
|
fontSize: 20,
|
|
129
|
-
fontWeight:
|
|
95
|
+
fontWeight: '600',
|
|
130
96
|
includeFontPadding: false,
|
|
131
97
|
lineHeight: 20,
|
|
132
98
|
},
|
|
@@ -138,7 +104,7 @@ const stackStyles = react_native_1.StyleSheet.create({
|
|
|
138
104
|
fontSize: 14,
|
|
139
105
|
includeFontPadding: false,
|
|
140
106
|
lineHeight: 18,
|
|
141
|
-
fontWeight:
|
|
107
|
+
fontWeight: '500',
|
|
142
108
|
paddingHorizontal: 27,
|
|
143
109
|
},
|
|
144
110
|
hintText: {
|
|
@@ -146,7 +112,7 @@ const stackStyles = react_native_1.StyleSheet.create({
|
|
|
146
112
|
fontSize: 13,
|
|
147
113
|
includeFontPadding: false,
|
|
148
114
|
lineHeight: 18,
|
|
149
|
-
fontWeight:
|
|
115
|
+
fontWeight: '400',
|
|
150
116
|
marginHorizontal: 10,
|
|
151
117
|
},
|
|
152
118
|
hintBox: {
|
|
@@ -159,7 +125,7 @@ const stackStyles = react_native_1.StyleSheet.create({
|
|
|
159
125
|
},
|
|
160
126
|
collapseContainer: {
|
|
161
127
|
marginLeft: 15,
|
|
162
|
-
flexDirection:
|
|
128
|
+
flexDirection: 'row',
|
|
163
129
|
},
|
|
164
130
|
collapseButton: {
|
|
165
131
|
borderRadius: 5,
|
|
@@ -167,7 +133,7 @@ const stackStyles = react_native_1.StyleSheet.create({
|
|
|
167
133
|
collapse: {
|
|
168
134
|
color: LogBoxStyle.getTextColor(0.7),
|
|
169
135
|
fontSize: 12,
|
|
170
|
-
fontWeight:
|
|
136
|
+
fontWeight: '300',
|
|
171
137
|
lineHeight: 20,
|
|
172
138
|
marginTop: 0,
|
|
173
139
|
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,mBAAmB,CAAC;KAC5B;IAED,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChE,IAAI,QAAQ,KAAK,IAAI,EAAE;YACrB,OAAO,KAAK,GAAG,CAAC,CAAC;SAClB;QAED,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,IAAI,cAAc,KAAK,CAAC,EAAE;QACxB,OAAO,oBAAoB,CAAC;KAC7B;IAED,MAAM,WAAW,GAAG,QAAQ,cAAc,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC5D,IAAI,cAAc,KAAK,WAAW,CAAC,MAAM,EAAE;QACzC,OAAO,SAAS;YACd,CAAC,CAAC,MACE,cAAc,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GACjC,GAAG,cAAc,cAAc,WAAW,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AAE,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) 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,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAItD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAOxE,MAAM,UAAU,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,KAAK,IAAI,EAAE;YACrB,OAAO,KAAK,GAAG,CAAC,CAAC;SAClB;QAED,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,IAAI,cAAc,KAAK,CAAC,EAAE;QACxB,OAAO,oBAAoB,CAAC;KAC7B;IAED,MAAM,WAAW,GAAG,QAAQ,cAAc,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EA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D,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 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(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
|
|
1
|
+
import { LogBoxLog } from '../Data/LogBoxLog';
|
|
2
2
|
type Props = {
|
|
3
3
|
log: LogBoxLog;
|
|
4
4
|
totalLogCount: number;
|
|
5
|
-
level:
|
|
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,
|
|
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,eAkCtC"}
|