@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.
- 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 +27 -27
- package/build/HMRClient.js.map +1 -1
- package/build/HMRClient.native.js +1 -1
- 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 +2 -6
- 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 +6 -1
- package/build/LoadingView.native.js.map +1 -1
- package/build/async-require/buildAsyncRequire.js.map +1 -1
- package/build/async-require/buildUrlForBundle.js +1 -1
- package/build/async-require/buildUrlForBundle.js.map +1 -1
- package/build/async-require/buildUrlForBundle.native.js +5 -4
- 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 +2 -2
- 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 +10 -10
- 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 +2 -3
- 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 +13 -22
- package/build/async-require/fetchThenEval.web.js.map +1 -1
- package/build/async-require/index.js +1 -3
- 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 +8 -8
- package/build/async-require/loadBundle.js.map +1 -1
- package/build/effects.js +10 -10
- 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 +46 -48
- 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 +44 -40
- 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 +5 -5
- 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 +4 -4
- 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 +26 -31
- 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 +22 -21
- 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 +0 -1
- 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 +9 -12
- 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 +21 -22
- 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 +3 -5
- 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 +4 -4
- 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 +1 -1
- package/build/error-overlay/UI/LogBoxStyle.js.map +1 -1
- package/build/error-overlay/UI/constants.js +3 -3
- 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 +5 -7
- 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 +6 -5
- 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 +9 -14
- 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 +7 -2
- 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 +5 -5
- 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 +0 -1
- package/build/error-overlay/modules/NativeLogBox/index.native.js.map +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.js +4 -4
- 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 +0 -1
- 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 +5 -5
- 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.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 +14 -16
- 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 +5 -5
- 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.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 +10 -11
- 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 +27 -24
- 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 +18 -18
- 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 +6 -6
- 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 +4 -4
- 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 +13 -13
- 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 +9 -9
- 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 +24 -27
- 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 +35 -34
- 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.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 +6 -5
- 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 +4 -4
- 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 +11 -12
- package/build/error-overlay/useRejectionHandler.js.map +1 -1
- package/build/getDevServer.d.ts.map +1 -1
- package/build/getDevServer.js +4 -5
- 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 +6 -1
- package/build/getDevServer.native.js.map +1 -1
- package/build/index.d.ts +1 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/build/location/Location.native.d.ts.map +1 -1
- package/build/location/Location.native.js +21 -20
- 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 +16 -22
- 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 +1 -3
- package/build/setupHMR.js.map +1 -1
- package/build/symbolicate.d.ts +3 -3
- 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
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.LogBoxInspectorHeader = void 0;
|
|
30
30
|
/**
|
|
31
|
-
* Copyright (c)
|
|
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
|
|
@@ -42,7 +42,7 @@ const LogBoxStyle = __importStar(require("../UI/LogBoxStyle"));
|
|
|
42
42
|
function LogBoxInspectorHeader(props) {
|
|
43
43
|
const { selectedLogIndex: selectedIndex, logs } = (0, LogContext_1.useLogs)();
|
|
44
44
|
const total = logs.length;
|
|
45
|
-
if (props.level ===
|
|
45
|
+
if (props.level === 'syntax') {
|
|
46
46
|
return (react_1.default.createElement(react_native_1.View, { style: [styles.safeArea, styles[props.level]] },
|
|
47
47
|
react_1.default.createElement(react_native_1.View, { style: styles.header },
|
|
48
48
|
react_1.default.createElement(react_native_1.View, { style: styles.title },
|
|
@@ -53,41 +53,41 @@ function LogBoxInspectorHeader(props) {
|
|
|
53
53
|
const titleText = `Log ${selectedIndex + 1} of ${total}`;
|
|
54
54
|
return (react_1.default.createElement(react_native_1.View, { style: [styles.safeArea, styles[props.level]] },
|
|
55
55
|
react_1.default.createElement(react_native_1.View, { style: styles.header },
|
|
56
|
-
react_1.default.createElement(LogBoxInspectorHeaderButton, { disabled: total <= 1, level: props.level, image: require(
|
|
56
|
+
react_1.default.createElement(LogBoxInspectorHeaderButton, { disabled: total <= 1, level: props.level, image: require('@expo/metro-runtime/assets/chevron-left.png'), onPress: () => props.onSelectIndex(prevIndex) }),
|
|
57
57
|
react_1.default.createElement(react_native_1.View, { style: styles.title },
|
|
58
58
|
react_1.default.createElement(react_native_1.Text, { style: styles.titleText }, titleText)),
|
|
59
|
-
react_1.default.createElement(LogBoxInspectorHeaderButton, { disabled: total <= 1, level: props.level, image: require(
|
|
59
|
+
react_1.default.createElement(LogBoxInspectorHeaderButton, { disabled: total <= 1, level: props.level, image: require('@expo/metro-runtime/assets/chevron-right.png'), onPress: () => props.onSelectIndex(nextIndex) }))));
|
|
60
60
|
}
|
|
61
61
|
exports.LogBoxInspectorHeader = LogBoxInspectorHeader;
|
|
62
62
|
const backgroundForLevel = (level) => ({
|
|
63
63
|
warn: {
|
|
64
|
-
default:
|
|
64
|
+
default: 'transparent',
|
|
65
65
|
pressed: LogBoxStyle.getWarningDarkColor(),
|
|
66
66
|
},
|
|
67
67
|
error: {
|
|
68
|
-
default:
|
|
68
|
+
default: 'transparent',
|
|
69
69
|
pressed: LogBoxStyle.getErrorDarkColor(),
|
|
70
70
|
},
|
|
71
71
|
fatal: {
|
|
72
|
-
default:
|
|
72
|
+
default: 'transparent',
|
|
73
73
|
pressed: LogBoxStyle.getFatalDarkColor(),
|
|
74
74
|
},
|
|
75
75
|
syntax: {
|
|
76
|
-
default:
|
|
76
|
+
default: 'transparent',
|
|
77
77
|
pressed: LogBoxStyle.getFatalDarkColor(),
|
|
78
78
|
},
|
|
79
79
|
static: {
|
|
80
|
-
default:
|
|
80
|
+
default: 'transparent',
|
|
81
81
|
pressed: LogBoxStyle.getFatalDarkColor(),
|
|
82
82
|
},
|
|
83
|
-
}[level]
|
|
83
|
+
})[level];
|
|
84
84
|
function LogBoxInspectorHeaderButton(props) {
|
|
85
85
|
return (react_1.default.createElement(LogBoxButton_1.LogBoxButton, { backgroundColor: backgroundForLevel(props.level), onPress: props.disabled ? undefined : props.onPress, style: headerStyles.button }, props.disabled ? null : (react_1.default.createElement(react_native_1.Image, { source: props.image, tintColor: LogBoxStyle.getTextColor(), style: headerStyles.buttonImage }))));
|
|
86
86
|
}
|
|
87
87
|
const headerStyles = react_native_1.StyleSheet.create({
|
|
88
88
|
button: {
|
|
89
|
-
alignItems:
|
|
90
|
-
justifyContent:
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
justifyContent: 'center',
|
|
91
91
|
aspectRatio: 1,
|
|
92
92
|
marginRight: 6,
|
|
93
93
|
marginLeft: 6,
|
|
@@ -115,8 +115,8 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
115
115
|
backgroundColor: LogBoxStyle.getErrorColor(),
|
|
116
116
|
},
|
|
117
117
|
header: {
|
|
118
|
-
flexDirection:
|
|
119
|
-
alignItems:
|
|
118
|
+
flexDirection: 'row',
|
|
119
|
+
alignItems: 'center',
|
|
120
120
|
paddingHorizontal: 8,
|
|
121
121
|
height: react_native_1.Platform.select({
|
|
122
122
|
default: 48,
|
|
@@ -124,19 +124,19 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
124
124
|
}),
|
|
125
125
|
},
|
|
126
126
|
title: {
|
|
127
|
-
alignItems:
|
|
127
|
+
alignItems: 'center',
|
|
128
128
|
flex: 1,
|
|
129
|
-
justifyContent:
|
|
129
|
+
justifyContent: 'center',
|
|
130
130
|
},
|
|
131
131
|
titleText: {
|
|
132
132
|
color: LogBoxStyle.getTextColor(),
|
|
133
133
|
fontSize: 16,
|
|
134
|
-
fontWeight:
|
|
134
|
+
fontWeight: '600',
|
|
135
135
|
includeFontPadding: false,
|
|
136
136
|
lineHeight: 20,
|
|
137
137
|
},
|
|
138
138
|
safeArea: {
|
|
139
|
-
paddingTop: react_native_1.Platform.OS !==
|
|
139
|
+
paddingTop: react_native_1.Platform.OS !== 'ios' ? react_native_1.StatusBar.currentHeight : 40,
|
|
140
140
|
},
|
|
141
141
|
});
|
|
142
142
|
//# sourceMappingURL=LogBoxInspectorHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAkF;AAGlF,mDAA6C;AAC7C,qDAAkD;AAClD,+DAAiD;AAOjD,SAAgB,qBAAqB,CAAC,KAAY;IAChD,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,IAAA,oBAAO,GAAE,CAAC;IAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;IAE1B,IAAI,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE;QAC5B,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACjD,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM;gBACxB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK;oBACvB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,wBAA0B,CAClD,CACF,CACF,CACR,CAAC;KACH;IAED,MAAM,SAAS,GAAG,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC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,EAAE;KAC7C;IACD,MAAM,EAAE;QACN,eAAe,EAAE,WAAW,CAAC,aAAa,EAAE;KAC7C;IACD,KAAK,EAAE;QACL,eAAe,EAAE,WAAW,CAAC,aAAa,EAAE;KAC7C;IACD,IAAI,EAAE;QACJ,eAAe,EAAE,WAAW,CAAC,eAAe,EAAE;KAC/C;IACD,KAAK,EAAE;QACL,eAAe,EAAE,WAAW,CAAC,aAAa,EAAE;KAC7C;IACD,MAAM,EAAE;QACN,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QAEpB,iBAAiB,EAAE,CAAC;QACpB,MAAM,EAAE,uBAAQ,CAAC,MAAM,CAAC;YACtB,OAAO,EAAE,EAAE;YACX,GAAG,EAAE,EAAE;SACR,CAAC;KACH;IACD,KAAK,EAAE;QACL,UAAU,EAAE,QAAQ;QACpB,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;KACzB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,WAAW,CAAC,YAAY,EAAE;QACjC,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,wBAAS,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;KACjE;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 { Image, Platform, StatusBar, StyleSheet, Text, View } from 'react-native';\n\nimport type { LogLevel } from '../Data/LogBoxLog';\nimport { useLogs } from '../Data/LogContext';\nimport { LogBoxButton } from '../UI/LogBoxButton';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\n\ntype Props = {\n onSelectIndex: (selectedIndex: number) => void;\n level: LogLevel;\n};\n\nexport function LogBoxInspectorHeader(props: Props) {\n const { selectedLogIndex: selectedIndex, logs } = useLogs();\n const total = logs.length;\n\n if (props.level === 'syntax') {\n return (\n <View style={[styles.safeArea, styles[props.level]]}>\n <View style={styles.header}>\n <View style={styles.title}>\n <Text style={styles.titleText}>Failed to compile</Text>\n </View>\n </View>\n </View>\n );\n }\n\n const prevIndex = selectedIndex - 1 < 0 ? total - 1 : selectedIndex - 1;\n const nextIndex = selectedIndex + 1 > total - 1 ? 0 : selectedIndex + 1;\n\n const titleText = `Log ${selectedIndex + 1} of ${total}`;\n\n return (\n <View style={[styles.safeArea, styles[props.level]]}>\n <View style={styles.header}>\n <LogBoxInspectorHeaderButton\n disabled={total <= 1}\n level={props.level}\n image={require('@expo/metro-runtime/assets/chevron-left.png')}\n onPress={() => props.onSelectIndex(prevIndex)}\n />\n <View style={styles.title}>\n <Text style={styles.titleText}>{titleText}</Text>\n </View>\n <LogBoxInspectorHeaderButton\n disabled={total <= 1}\n level={props.level}\n image={require('@expo/metro-runtime/assets/chevron-right.png')}\n onPress={() => props.onSelectIndex(nextIndex)}\n />\n </View>\n </View>\n );\n}\n\nconst backgroundForLevel = (level: LogLevel) =>\n ({\n warn: {\n default: 'transparent',\n pressed: LogBoxStyle.getWarningDarkColor(),\n },\n error: {\n default: 'transparent',\n pressed: LogBoxStyle.getErrorDarkColor(),\n },\n fatal: {\n default: 'transparent',\n pressed: LogBoxStyle.getFatalDarkColor(),\n },\n syntax: {\n default: 'transparent',\n pressed: LogBoxStyle.getFatalDarkColor(),\n },\n static: {\n default: 'transparent',\n pressed: LogBoxStyle.getFatalDarkColor(),\n },\n })[level];\n\nfunction LogBoxInspectorHeaderButton(props: {\n disabled: boolean;\n image: number;\n level: LogLevel;\n onPress?: () => void;\n}) {\n return (\n <LogBoxButton\n backgroundColor={backgroundForLevel(props.level)}\n onPress={props.disabled ? undefined : props.onPress}\n style={headerStyles.button}>\n {props.disabled ? null : (\n <Image\n source={props.image}\n tintColor={LogBoxStyle.getTextColor()}\n style={headerStyles.buttonImage}\n />\n )}\n </LogBoxButton>\n );\n}\n\nconst headerStyles = StyleSheet.create({\n button: {\n alignItems: 'center',\n justifyContent: 'center',\n aspectRatio: 1,\n marginRight: 6,\n marginLeft: 6,\n borderRadius: 3,\n },\n buttonImage: {\n height: 14,\n width: 8,\n },\n});\n\nconst styles = StyleSheet.create({\n syntax: {\n backgroundColor: LogBoxStyle.getFatalColor(),\n },\n static: {\n backgroundColor: LogBoxStyle.getFatalColor(),\n },\n fatal: {\n backgroundColor: LogBoxStyle.getFatalColor(),\n },\n warn: {\n backgroundColor: LogBoxStyle.getWarningColor(),\n },\n error: {\n backgroundColor: LogBoxStyle.getErrorColor(),\n },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n\n paddingHorizontal: 8,\n height: Platform.select({\n default: 48,\n ios: 44,\n }),\n },\n title: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n },\n titleText: {\n color: LogBoxStyle.getTextColor(),\n fontSize: 16,\n fontWeight: '600',\n includeFontPadding: false,\n lineHeight: 20,\n },\n safeArea: {\n paddingTop: Platform.OS !== 'ios' ? StatusBar.currentHeight : 40,\n },\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LogLevel } from
|
|
2
|
-
import type { Message } from
|
|
1
|
+
import type { LogLevel } from '../Data/LogBoxLog';
|
|
2
|
+
import type { Message } from '../Data/parseLogBoxLog';
|
|
3
3
|
type Props = {
|
|
4
4
|
collapsed: boolean;
|
|
5
5
|
message: Message;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorMessageHeader.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorMessageHeader.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAItD,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAmBF,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorMessageHeader.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorMessageHeader.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAItD,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAmBF,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,KAAK,eAgBxD"}
|
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.LogBoxInspectorMessageHeader = void 0;
|
|
30
30
|
/**
|
|
31
|
-
* Copyright (c)
|
|
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
|
|
@@ -64,13 +64,13 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
64
64
|
fontSize: 14,
|
|
65
65
|
includeFontPadding: false,
|
|
66
66
|
lineHeight: 20,
|
|
67
|
-
fontWeight:
|
|
67
|
+
fontWeight: '500',
|
|
68
68
|
paddingHorizontal: 12,
|
|
69
69
|
paddingBottom: 10,
|
|
70
70
|
},
|
|
71
71
|
heading: {
|
|
72
|
-
alignItems:
|
|
73
|
-
flexDirection:
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
flexDirection: 'row',
|
|
74
74
|
paddingHorizontal: 12,
|
|
75
75
|
marginTop: 10,
|
|
76
76
|
marginBottom: 5,
|
|
@@ -78,7 +78,7 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
78
78
|
headingText: {
|
|
79
79
|
flex: 1,
|
|
80
80
|
fontSize: 20,
|
|
81
|
-
fontWeight:
|
|
81
|
+
fontWeight: '600',
|
|
82
82
|
includeFontPadding: false,
|
|
83
83
|
lineHeight: 28,
|
|
84
84
|
},
|
|
@@ -103,7 +103,7 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
103
103
|
collapse: {
|
|
104
104
|
color: LogBoxStyle.getTextColor(0.7),
|
|
105
105
|
fontSize: 14,
|
|
106
|
-
fontWeight:
|
|
106
|
+
fontWeight: '300',
|
|
107
107
|
lineHeight: 12,
|
|
108
108
|
},
|
|
109
109
|
button: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorMessageHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorMessageHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAsD;AAItD,uDAAoD;AACpD,+DAAiD;AAUjD,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAErC,SAAS,cAAc,CAAC,EACtB,OAAO,EACP,SAAS,EACT,OAAO,GAC0C;IACjD,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,wBAAwB,IAAI,CAAC,SAAS,EAAE;QACnE,OAAO,IAAI,CAAC;KACb;IACD,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,mBAEvC,CACR,CAAC;AACJ,CAAC;AAED,SAAgB,4BAA4B,CAAC,KAAY;IACvD,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI;QACtB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO;YACzB,8BAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorMessageHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorMessageHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAsD;AAItD,uDAAoD;AACpD,+DAAiD;AAUjD,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAErC,SAAS,cAAc,CAAC,EACtB,OAAO,EACP,SAAS,EACT,OAAO,GAC0C;IACjD,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,wBAAwB,IAAI,CAAC,SAAS,EAAE;QACnE,OAAO,IAAI,CAAC;KACb;IACD,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,mBAEvC,CACR,CAAC;AACJ,CAAC;AAED,SAAgB,4BAA4B,CAAC,KAAY;IACvD,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI;QACtB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO;YACzB,8BAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAG,KAAK,CAAC,KAAK,CAAQ,CACvE;QACP,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ;YAC1B,8BAAC,6BAAa,I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AM,EAAE;QACN,KAAK,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;KACpC;IACD,WAAW,EAAE;QACX,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACrC;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,EAAE;KACf;IACD,MAAM,EAAE;QACN,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,CAAC;KAChB;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 { StyleSheet, Text, View } from 'react-native';\n\nimport type { LogLevel } from '../Data/LogBoxLog';\nimport type { Message } from '../Data/parseLogBoxLog';\nimport { LogBoxMessage } from '../UI/LogBoxMessage';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\n\ntype Props = {\n collapsed: boolean;\n message: Message;\n level: LogLevel;\n title: string;\n onPress: () => void;\n};\n\nconst SHOW_MORE_MESSAGE_LENGTH = 300;\n\nfunction ShowMoreButton({\n message,\n collapsed,\n onPress,\n}: Pick<Props, 'collapsed' | 'message' | 'onPress'>) {\n if (message.content.length < SHOW_MORE_MESSAGE_LENGTH || !collapsed) {\n return null;\n }\n return (\n <Text style={styles.collapse} onPress={onPress}>\n ... See More\n </Text>\n );\n}\n\nexport function LogBoxInspectorMessageHeader(props: Props) {\n return (\n <View style={styles.body}>\n <View style={styles.heading}>\n <Text style={[styles.headingText, styles[props.level]]}>{props.title}</Text>\n </View>\n <Text style={styles.bodyText}>\n <LogBoxMessage\n maxLength={props.collapsed ? SHOW_MORE_MESSAGE_LENGTH : Infinity}\n message={props.message}\n style={styles.messageText}\n />\n <ShowMoreButton {...props} />\n </Text>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n body: {\n backgroundColor: LogBoxStyle.getBackgroundColor(1),\n boxShadow: `0 2px 0 2px #00000080`,\n },\n bodyText: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n includeFontPadding: false,\n lineHeight: 20,\n fontWeight: '500',\n paddingHorizontal: 12,\n paddingBottom: 10,\n },\n heading: {\n alignItems: 'center',\n flexDirection: 'row',\n paddingHorizontal: 12,\n marginTop: 10,\n marginBottom: 5,\n },\n headingText: {\n flex: 1,\n fontSize: 20,\n fontWeight: '600',\n includeFontPadding: false,\n lineHeight: 28,\n },\n warn: {\n color: LogBoxStyle.getWarningColor(1),\n },\n error: {\n color: LogBoxStyle.getErrorColor(1),\n },\n fatal: {\n color: LogBoxStyle.getFatalColor(1),\n },\n syntax: {\n color: LogBoxStyle.getFatalColor(1),\n },\n static: {\n color: LogBoxStyle.getFatalColor(1),\n },\n messageText: {\n color: LogBoxStyle.getTextColor(0.6),\n },\n collapse: {\n color: LogBoxStyle.getTextColor(0.7),\n fontSize: 14,\n fontWeight: '300',\n lineHeight: 12,\n },\n button: {\n paddingVertical: 5,\n paddingHorizontal: 10,\n borderRadius: 3,\n },\n});\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
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
|
|
8
|
+
import React from 'react';
|
|
9
9
|
type Props = {
|
|
10
10
|
heading: string;
|
|
11
11
|
children: React.ReactNode;
|
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.LogBoxInspectorSection = void 0;
|
|
30
30
|
/**
|
|
31
|
-
* Copyright (c)
|
|
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
|
|
@@ -50,8 +50,8 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
50
50
|
marginTop: 15,
|
|
51
51
|
},
|
|
52
52
|
heading: {
|
|
53
|
-
alignItems:
|
|
54
|
-
flexDirection:
|
|
53
|
+
alignItems: 'center',
|
|
54
|
+
flexDirection: 'row',
|
|
55
55
|
paddingHorizontal: 12,
|
|
56
56
|
marginBottom: 10,
|
|
57
57
|
},
|
|
@@ -59,7 +59,7 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
59
59
|
color: LogBoxStyle.getTextColor(1),
|
|
60
60
|
flex: 1,
|
|
61
61
|
fontSize: 18,
|
|
62
|
-
fontWeight:
|
|
62
|
+
fontWeight: '600',
|
|
63
63
|
includeFontPadding: false,
|
|
64
64
|
lineHeight: 20,
|
|
65
65
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorSection.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSection.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAsD;AAEtD,+DAAiD;AAQjD,SAAgB,sBAAsB,CAAC,KAAY;IACjD,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO;QACzB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO;YACzB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,WAAW,IAAG,KAAK,CAAC,OAAO,CAAQ;YACtD,KAAK,CAAC,MAAM,CACR;QACP,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,IAAG,KAAK,CAAC,QAAQ,CAAQ,CAC5C,CACR,CAAC;AACJ,CAAC;AAVD,wDAUC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,SAAS,EAAE,EAAE;KACd;IACD,OAAO,EAAE;QACP,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,KAAK;QACpB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;KACjB;IACD,WAAW,EAAE;QACX,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;IACD,IAAI,EAAE;QACJ,aAAa,EAAE,EAAE;KAClB;CACF,CAAC,CAAC","sourcesContent":["/**\n * Copyright (c)
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorSection.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSection.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAsD;AAEtD,+DAAiD;AAQjD,SAAgB,sBAAsB,CAAC,KAAY;IACjD,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO;QACzB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO;YACzB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,WAAW,IAAG,KAAK,CAAC,OAAO,CAAQ;YACtD,KAAK,CAAC,MAAM,CACR;QACP,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,IAAG,KAAK,CAAC,QAAQ,CAAQ,CAC5C,CACR,CAAC;AACJ,CAAC;AAVD,wDAUC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,SAAS,EAAE,EAAE;KACd;IACD,OAAO,EAAE;QACP,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,KAAK;QACpB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;KACjB;IACD,WAAW,EAAE;QACX,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;IACD,IAAI,EAAE;QACJ,aAAa,EAAE,EAAE;KAClB;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 { StyleSheet, Text, View } from 'react-native';\n\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\n\ntype Props = {\n heading: string;\n children: React.ReactNode;\n action?: any;\n};\n\nexport function LogBoxInspectorSection(props: Props) {\n return (\n <View style={styles.section}>\n <View style={styles.heading}>\n <Text style={styles.headingText}>{props.heading}</Text>\n {props.action}\n </View>\n <View style={styles.body}>{props.children}</View>\n </View>\n );\n}\n\nconst styles = 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: 18,\n fontWeight: '600',\n includeFontPadding: false,\n lineHeight: 20,\n },\n body: {\n paddingBottom: 10,\n },\n});\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GestureResponderEvent } from
|
|
1
|
+
import { GestureResponderEvent } from 'react-native';
|
|
2
2
|
type Props = {
|
|
3
3
|
onPress?: ((event: GestureResponderEvent) => void) | null;
|
|
4
|
-
status:
|
|
4
|
+
status: 'COMPLETE' | 'FAILED' | 'NONE' | 'PENDING';
|
|
5
5
|
};
|
|
6
6
|
export declare function LogBoxInspectorSourceMapStatus(props: Props): JSX.Element | null;
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorSourceMapStatus.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSourceMapStatus.tsx"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorSourceMapStatus.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSourceMapStatus.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAoB,qBAAqB,EAAoB,MAAM,cAAc,CAAC;AAKzF,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1D,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;CACpD,CAAC;AAEF,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,KAAK,sBAsF1D"}
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.LogBoxInspectorSourceMapStatus = void 0;
|
|
27
27
|
/**
|
|
28
|
-
* Copyright (c)
|
|
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
|
|
@@ -41,7 +41,7 @@ function LogBoxInspectorSourceMapStatus(props) {
|
|
|
41
41
|
rotate: null,
|
|
42
42
|
});
|
|
43
43
|
(0, react_1.useEffect)(() => {
|
|
44
|
-
if (props.status ===
|
|
44
|
+
if (props.status === 'PENDING') {
|
|
45
45
|
if (state.animation == null) {
|
|
46
46
|
const animated = new react_native_1.Animated.Value(0);
|
|
47
47
|
const animation = react_native_1.Animated.loop(react_native_1.Animated.timing(animated, {
|
|
@@ -54,7 +54,7 @@ function LogBoxInspectorSourceMapStatus(props) {
|
|
|
54
54
|
animation,
|
|
55
55
|
rotate: animated.interpolate({
|
|
56
56
|
inputRange: [0, 1],
|
|
57
|
-
outputRange: [
|
|
57
|
+
outputRange: ['0deg', '360deg'],
|
|
58
58
|
}),
|
|
59
59
|
});
|
|
60
60
|
animation.start();
|
|
@@ -78,25 +78,25 @@ function LogBoxInspectorSourceMapStatus(props) {
|
|
|
78
78
|
let image;
|
|
79
79
|
let color;
|
|
80
80
|
switch (props.status) {
|
|
81
|
-
case
|
|
82
|
-
image = require(
|
|
81
|
+
case 'FAILED':
|
|
82
|
+
image = require('@expo/metro-runtime/assets/alert-triangle.png');
|
|
83
83
|
color = LogBoxStyle.getErrorColor(1);
|
|
84
84
|
break;
|
|
85
|
-
case
|
|
86
|
-
image = require(
|
|
85
|
+
case 'PENDING':
|
|
86
|
+
image = require('@expo/metro-runtime/assets/loader.png');
|
|
87
87
|
color = LogBoxStyle.getWarningColor(1);
|
|
88
88
|
break;
|
|
89
89
|
}
|
|
90
|
-
if (props.status ===
|
|
90
|
+
if (props.status === 'COMPLETE' || image == null) {
|
|
91
91
|
return null;
|
|
92
92
|
}
|
|
93
93
|
return (react_1.default.createElement(LogBoxButton_1.LogBoxButton, { backgroundColor: {
|
|
94
|
-
default:
|
|
94
|
+
default: 'transparent',
|
|
95
95
|
pressed: LogBoxStyle.getBackgroundColor(1),
|
|
96
96
|
}, hitSlop: { bottom: 8, left: 8, right: 8, top: 8 }, onPress: props.onPress, style: styles.root },
|
|
97
|
-
react_1.default.createElement(react_native_1.Animated.Image, { source: image, tintColor: color
|
|
97
|
+
react_1.default.createElement(react_native_1.Animated.Image, { source: image, tintColor: color ?? LogBoxStyle.getTextColor(0.4), style: [
|
|
98
98
|
styles.image,
|
|
99
|
-
state.rotate == null || props.status !==
|
|
99
|
+
state.rotate == null || props.status !== 'PENDING'
|
|
100
100
|
? null
|
|
101
101
|
: { transform: [{ rotate: state.rotate }] },
|
|
102
102
|
] }),
|
|
@@ -105,9 +105,9 @@ function LogBoxInspectorSourceMapStatus(props) {
|
|
|
105
105
|
exports.LogBoxInspectorSourceMapStatus = LogBoxInspectorSourceMapStatus;
|
|
106
106
|
const styles = react_native_1.StyleSheet.create({
|
|
107
107
|
root: {
|
|
108
|
-
alignItems:
|
|
108
|
+
alignItems: 'center',
|
|
109
109
|
borderRadius: 12,
|
|
110
|
-
flexDirection:
|
|
110
|
+
flexDirection: 'row',
|
|
111
111
|
height: 24,
|
|
112
112
|
paddingHorizontal: 8,
|
|
113
113
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorSourceMapStatus.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSourceMapStatus.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAmD;AACnD,+
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorSourceMapStatus.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSourceMapStatus.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAmD;AACnD,+CAAyF;AAEzF,qDAAkD;AAClD,+DAAiD;AAOjD,SAAgB,8BAA8B,CAAC,KAAY;IACzD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAG/B;QACD,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE;YAC9B,IAAI,KAAK,CAAC,SAAS,IAAI,IAAI,EAAE;gBAC3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,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"}
|
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.LogBoxInspectorStackFrame = void 0;
|
|
30
30
|
/**
|
|
31
|
-
* Copyright (c)
|
|
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
|
|
@@ -45,8 +45,8 @@ function LogBoxInspectorStackFrame(props) {
|
|
|
45
45
|
const location = (0, formatProjectFilePath_1.getStackFormattedLocation)(process.env.EXPO_PROJECT_ROOT, frame);
|
|
46
46
|
return (react_1.default.createElement(react_native_1.View, { style: styles.frameContainer },
|
|
47
47
|
react_1.default.createElement(LogBoxButton_1.LogBoxButton, { backgroundColor: {
|
|
48
|
-
default:
|
|
49
|
-
pressed: onPress ? LogBoxStyle.getBackgroundColor(1) :
|
|
48
|
+
default: 'transparent',
|
|
49
|
+
pressed: onPress ? LogBoxStyle.getBackgroundColor(1) : 'transparent',
|
|
50
50
|
}, onPress: onPress, style: styles.frame },
|
|
51
51
|
react_1.default.createElement(react_native_1.Text, { style: [styles.name, frame.collapse === true && styles.dim] }, frame.methodName),
|
|
52
52
|
react_1.default.createElement(react_native_1.Text, { ellipsizeMode: "middle", numberOfLines: 1, style: [styles.location, frame.collapse === true && styles.dim] }, location))));
|
|
@@ -54,7 +54,7 @@ function LogBoxInspectorStackFrame(props) {
|
|
|
54
54
|
exports.LogBoxInspectorStackFrame = LogBoxInspectorStackFrame;
|
|
55
55
|
const styles = react_native_1.StyleSheet.create({
|
|
56
56
|
frameContainer: {
|
|
57
|
-
flexDirection:
|
|
57
|
+
flexDirection: 'row',
|
|
58
58
|
paddingHorizontal: 15,
|
|
59
59
|
},
|
|
60
60
|
frame: {
|
|
@@ -64,32 +64,32 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
64
64
|
borderRadius: 5,
|
|
65
65
|
},
|
|
66
66
|
lineLocation: {
|
|
67
|
-
flexDirection:
|
|
67
|
+
flexDirection: 'row',
|
|
68
68
|
},
|
|
69
69
|
name: {
|
|
70
70
|
color: LogBoxStyle.getTextColor(1),
|
|
71
71
|
fontSize: 14,
|
|
72
72
|
includeFontPadding: false,
|
|
73
73
|
lineHeight: 18,
|
|
74
|
-
fontWeight:
|
|
74
|
+
fontWeight: '400',
|
|
75
75
|
fontFamily: constants_1.CODE_FONT,
|
|
76
76
|
},
|
|
77
77
|
location: {
|
|
78
78
|
color: LogBoxStyle.getTextColor(0.8),
|
|
79
79
|
fontSize: 12,
|
|
80
|
-
fontWeight:
|
|
80
|
+
fontWeight: '300',
|
|
81
81
|
includeFontPadding: false,
|
|
82
82
|
lineHeight: 16,
|
|
83
83
|
paddingLeft: 10,
|
|
84
84
|
},
|
|
85
85
|
dim: {
|
|
86
86
|
color: LogBoxStyle.getTextColor(0.4),
|
|
87
|
-
fontWeight:
|
|
87
|
+
fontWeight: '300',
|
|
88
88
|
},
|
|
89
89
|
line: {
|
|
90
90
|
color: LogBoxStyle.getTextColor(0.8),
|
|
91
91
|
fontSize: 12,
|
|
92
|
-
fontWeight:
|
|
92
|
+
fontWeight: '300',
|
|
93
93
|
includeFontPadding: false,
|
|
94
94
|
lineHeight: 16,
|
|
95
95
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorStackFrame.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrame.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAA6E;AAG7E,qDAAkD;AAClD,+DAAiD;AACjD,+CAA4C;AAC5C,oEAAqE;AASrE,SAAgB,yBAAyB,CAAC,KAAY;IACpD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,QAAQ,GAAG,IAAA,iDAAyB,
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorStackFrame.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrame.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAA6E;AAG7E,qDAAkD;AAClD,+DAAiD;AACjD,+CAA4C;AAC5C,oEAAqE;AASrE,SAAgB,yBAAyB,CAAC,KAAY;IACpD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,QAAQ,GAAG,IAAA,iDAAyB,EAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IACjF,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,cAAc;QAChC,8BAAC,2BAAY,IACX,eAAe,EAAE;gBACf,OAAO,EAAE,aAAa;gBACtB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAA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AAY,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":"
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorStackFrames.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrames.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAMzD,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"}
|