@expo/metro-runtime 2.2.3 → 2.2.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxButton.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxButton.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,qBAAqB,EACrB,MAAM,EAKN,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,KAAK,KAAK,GAAG;IACX,eAAe,EAAE;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1D,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,eA2CxC"}
1
+ {"version":3,"file":"LogBoxButton.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxButton.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,qBAAqB,EACrB,MAAM,EAIN,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,KAAK,KAAK,GAAG;IACX,eAAe,EAAE;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1D,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,eA2CxC"}
@@ -43,17 +43,20 @@ function LogBoxButton(props) {
43
43
  pressed: LogBoxStyle.getBackgroundColor(0.6),
44
44
  };
45
45
  }
46
- const content = (react_1.default.createElement(react_native_1.View, { style: react_native_1.StyleSheet.compose({
47
- backgroundColor: pressed
48
- ? backgroundColor.pressed
49
- : backgroundColor.default,
50
- ...react_native_1.Platform.select({
51
- web: {
52
- cursor: "pointer",
53
- },
54
- }),
55
- }, props.style) }, props.children));
56
- return props.onPress == null ? (content) : (react_1.default.createElement(react_native_1.TouchableWithoutFeedback, { hitSlop: props.hitSlop, onPress: props.onPress, onPressIn: () => setPressed(true), onPressOut: () => setPressed(false) }, content));
46
+ const content = (react_1.default.createElement(react_native_1.View, { style: [
47
+ {
48
+ backgroundColor: pressed
49
+ ? backgroundColor.pressed
50
+ : backgroundColor.default,
51
+ ...react_native_1.Platform.select({
52
+ web: {
53
+ cursor: "pointer",
54
+ },
55
+ }),
56
+ },
57
+ props.style,
58
+ ] }, props.children));
59
+ return props.onPress == null ? (content) : (react_1.default.createElement(react_native_1.Pressable, { hitSlop: props.hitSlop, onPress: props.onPress, onPressIn: () => setPressed(true), onPressOut: () => setPressed(false) }, content));
57
60
  }
58
61
  exports.LogBoxButton = LogBoxButton;
59
62
  //# sourceMappingURL=LogBoxButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxButton.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAwC;AACxC,+CAQsB;AAEtB,2DAA6C;AAa7C,SAAgB,YAAY,CAAC,KAAY;IACvC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,IAAI,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;IAC5C,IAAI,CAAC,eAAe,EAAE;QACpB,eAAe,GAAG;YAChB,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC7C,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,GAAG,CAAC;SAC7C,CAAC;KACH;IAED,MAAM,OAAO,GAAG,CACd,8BAAC,mBAAI,IACH,KAAK,EAAE,yBAAU,CAAC,OAAO,CACvB;YACE,eAAe,EAAE,OAAO;gBACtB,CAAC,CAAC,eAAe,CAAC,OAAO;gBACzB,CAAC,CAAC,eAAe,CAAC,OAAO;YAC3B,GAAG,uBAAQ,CAAC,MAAM,CAAC;gBACjB,GAAG,EAAE;oBACH,MAAM,EAAE,SAAS;iBAClB;aACF,CAAC;SACH,EACD,KAAK,CAAC,KAAK,CACZ,IAEA,KAAK,CAAC,QAAQ,CACV,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAC7B,OAAO,CACR,CAAC,CAAC,CAAC,CACF,8BAAC,uCAAwB,IACvB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EACjC,UAAU,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAElC,OAAO,CACiB,CAC5B,CAAC;AACJ,CAAC;AA3CD,oCA2CC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React, { useState } from \"react\";\nimport {\n GestureResponderEvent,\n Insets,\n Platform,\n StyleSheet,\n TouchableWithoutFeedback,\n View,\n ViewStyle,\n} from \"react-native\";\n\nimport * as LogBoxStyle from \"./LogBoxStyle\";\n\ntype Props = {\n backgroundColor: {\n default: string;\n pressed: string;\n };\n children?: any;\n hitSlop?: Insets;\n onPress?: ((event: GestureResponderEvent) => void) | null;\n style?: ViewStyle;\n};\n\nexport function LogBoxButton(props: Props) {\n const [pressed, setPressed] = useState(false);\n\n let backgroundColor = props.backgroundColor;\n if (!backgroundColor) {\n backgroundColor = {\n default: LogBoxStyle.getBackgroundColor(0.95),\n pressed: LogBoxStyle.getBackgroundColor(0.6),\n };\n }\n\n const content = (\n <View\n style={StyleSheet.compose(\n {\n backgroundColor: pressed\n ? backgroundColor.pressed\n : backgroundColor.default,\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n },\n }),\n },\n props.style\n )}\n >\n {props.children}\n </View>\n );\n\n return props.onPress == null ? (\n content\n ) : (\n <TouchableWithoutFeedback\n hitSlop={props.hitSlop}\n onPress={props.onPress}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n >\n {content}\n </TouchableWithoutFeedback>\n );\n}\n"]}
1
+ {"version":3,"file":"LogBoxButton.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAwC;AACxC,+CAOsB;AAEtB,2DAA6C;AAa7C,SAAgB,YAAY,CAAC,KAAY;IACvC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,IAAI,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;IAC5C,IAAI,CAAC,eAAe,EAAE;QACpB,eAAe,GAAG;YAChB,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC7C,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,GAAG,CAAC;SAC7C,CAAC;KACH;IAED,MAAM,OAAO,GAAG,CACd,8BAAC,mBAAI,IACH,KAAK,EAAE;YACL;gBACE,eAAe,EAAE,OAAO;oBACtB,CAAC,CAAC,eAAe,CAAC,OAAO;oBACzB,CAAC,CAAC,eAAe,CAAC,OAAO;gBAC3B,GAAG,uBAAQ,CAAC,MAAM,CAAC;oBACjB,GAAG,EAAE;wBACH,MAAM,EAAE,SAAS;qBAClB;iBACF,CAAC;aACH;YACD,KAAK,CAAC,KAAK;SACZ,IAEA,KAAK,CAAC,QAAQ,CACV,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAC7B,OAAO,CACR,CAAC,CAAC,CAAC,CACF,8BAAC,wBAAS,IACR,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EACjC,UAAU,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAElC,OAAO,CACE,CACb,CAAC;AACJ,CAAC;AA3CD,oCA2CC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React, { useState } from \"react\";\nimport {\n GestureResponderEvent,\n Insets,\n Platform,\n Pressable,\n View,\n ViewStyle,\n} from \"react-native\";\n\nimport * as LogBoxStyle from \"./LogBoxStyle\";\n\ntype Props = {\n backgroundColor: {\n default: string;\n pressed: string;\n };\n children?: any;\n hitSlop?: Insets;\n onPress?: ((event: GestureResponderEvent) => void) | null;\n style?: ViewStyle;\n};\n\nexport function LogBoxButton(props: Props) {\n const [pressed, setPressed] = useState(false);\n\n let backgroundColor = props.backgroundColor;\n if (!backgroundColor) {\n backgroundColor = {\n default: LogBoxStyle.getBackgroundColor(0.95),\n pressed: LogBoxStyle.getBackgroundColor(0.6),\n };\n }\n\n const content = (\n <View\n style={[\n {\n backgroundColor: pressed\n ? backgroundColor.pressed\n : backgroundColor.default,\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n },\n }),\n },\n props.style,\n ]}\n >\n {props.children}\n </View>\n );\n\n return props.onPress == null ? (\n content\n ) : (\n <Pressable\n hitSlop={props.hitSlop}\n onPress={props.onPress}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n >\n {content}\n </Pressable>\n );\n}\n"]}
@@ -69,7 +69,7 @@ function LogBoxInspectorCodeFrame({ codeFrame, }) {
69
69
  var _a, _b;
70
70
  (0, openFileInEditor_1.default)(codeFrame.fileName, (_b = (_a = codeFrame.location) === null || _a === void 0 ? void 0 : _a.row) !== null && _b !== void 0 ? _b : 0);
71
71
  } },
72
- react_1.default.createElement(react_native_1.Text, { selectable: false, style: styles.fileText },
72
+ react_1.default.createElement(react_native_1.Text, { style: styles.fileText },
73
73
  getFileName(),
74
74
  getLocation())))));
75
75
  }
@@ -101,6 +101,7 @@ const styles = react_native_1.StyleSheet.create({
101
101
  fontFamily: constants_1.CODE_FONT,
102
102
  },
103
103
  fileText: {
104
+ userSelect: "none",
104
105
  color: LogBoxStyle.getTextColor(0.5),
105
106
  textAlign: "center",
106
107
  flex: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxInspectorCodeFrame.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorCodeFrame.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAkE;AAGlE,uDAA2C;AAC3C,qDAAkD;AAClD,+DAAiD;AACjD,+CAA4C;AAC5C,oEAAiE;AACjE,mFAA2D;AAC3D,qEAAkE;AAIlE,SAAgB,wBAAwB,CAAC,EACvC,SAAS,GAGV;IACC,IAAI,SAAS,IAAI,IAAI,EAAE;QACrB,OAAO,IAAI,CAAC;KACb;IAED,SAAS,WAAW;QAClB,OAAO,IAAA,6CAAqB,EAC1B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAC7B,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,CACpB,CAAC;IACJ,CAAC;IAED,SAAS,WAAW;QAClB,MAAM,QAAQ,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAA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AAE,CAAC;QACZ,YAAY,EAAE,CAAC;KAChB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,EAAE;QACX,iBAAiB,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QAChD,iBAAiB,EAAE,CAAC;KACrB;IACD,MAAM,EAAE;QACN,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,EAAE;KAClB;IACD,OAAO,EAAE;QACP,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,qBAAS;KACtB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,SAAS,EAAE,QAAQ;QACnB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,qBAAS;KACtB;CACF,CAAC,CAAC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from \"react\";\nimport { ScrollView, StyleSheet, Text, View } from \"react-native\";\n\nimport type { CodeFrame } from \"../Data/parseLogBoxLog\";\nimport { Ansi } from \"../UI/AnsiHighlight\";\nimport { LogBoxButton } from \"../UI/LogBoxButton\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\nimport { CODE_FONT } from \"../UI/constants\";\nimport { formatProjectFilePath } from \"../formatProjectFilePath\";\nimport openFileInEditor from \"../modules/openFileInEditor\";\nimport { LogBoxInspectorSection } from \"./LogBoxInspectorSection\";\n\ndeclare const process: any;\n\nexport function LogBoxInspectorCodeFrame({\n codeFrame,\n}: {\n codeFrame?: CodeFrame;\n}) {\n if (codeFrame == null) {\n return null;\n }\n\n function getFileName() {\n return formatProjectFilePath(\n process.env.EXPO_PROJECT_ROOT,\n codeFrame?.fileName\n );\n }\n\n function getLocation() {\n const location = codeFrame?.location;\n if (location != null) {\n return ` (${location.row}:${\n location.column + 1 /* Code frame columns are zero indexed */\n })`;\n }\n\n return null;\n }\n\n return (\n <LogBoxInspectorSection heading=\"Source\">\n <View style={styles.box}>\n <View style={styles.frame}>\n <ScrollView horizontal>\n <Ansi style={styles.content} text={codeFrame.content} />\n </ScrollView>\n </View>\n <LogBoxButton\n backgroundColor={{\n default: \"transparent\",\n pressed: LogBoxStyle.getBackgroundDarkColor(1),\n }}\n style={styles.button}\n onPress={() => {\n openFileInEditor(codeFrame.fileName, codeFrame.location?.row ?? 0);\n }}\n >\n <Text selectable={false} style={styles.fileText}>\n {getFileName()}\n {getLocation()}\n </Text>\n </LogBoxButton>\n </View>\n </LogBoxInspectorSection>\n );\n}\n\nconst styles = StyleSheet.create({\n box: {\n backgroundColor: LogBoxStyle.getBackgroundColor(),\n borderWidth: 1,\n borderColor: \"#323232\",\n marginLeft: 10,\n marginRight: 10,\n marginTop: 5,\n borderRadius: 3,\n },\n frame: {\n padding: 10,\n borderBottomColor: LogBoxStyle.getTextColor(0.1),\n borderBottomWidth: 1,\n },\n button: {\n paddingTop: 10,\n paddingBottom: 10,\n },\n content: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 12,\n includeFontPadding: false,\n lineHeight: 20,\n fontFamily: CODE_FONT,\n },\n fileText: {\n color: LogBoxStyle.getTextColor(0.5),\n textAlign: \"center\",\n flex: 1,\n fontSize: 16,\n includeFontPadding: false,\n fontFamily: CODE_FONT,\n },\n});\n"]}
1
+ {"version":3,"file":"LogBoxInspectorCodeFrame.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorCodeFrame.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAkE;AAGlE,uDAA2C;AAC3C,qDAAkD;AAClD,+DAAiD;A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E,CAAC;gBAED,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ;oBACzB,WAAW,EAAE;oBACb,WAAW,EAAE,CACT,CACM,CACV,CACgB,CAC1B,CAAC;AACJ,CAAC;AArDD,4DAqDC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE;QACH,eAAe,EAAE,WAAW,CAAC,kBAAkB,EAAE;QACjD,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,SAAS;QACtB,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,EAAE;QACf,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,CAAC;KAChB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,EAAE;QACX,iBAAiB,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QAChD,iBAAiB,EAAE,CAAC;KACrB;IACD,MAAM,EAAE;QACN,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,EAAE;KAClB;IACD,OAAO,EAAE;QACP,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,qBAAS;KACtB;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,SAAS,EAAE,QAAQ;QACnB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,qBAAS;KACtB;CACF,CAAC,CAAC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from \"react\";\nimport { ScrollView, StyleSheet, Text, View } from \"react-native\";\n\nimport type { CodeFrame } from \"../Data/parseLogBoxLog\";\nimport { Ansi } from \"../UI/AnsiHighlight\";\nimport { LogBoxButton } from \"../UI/LogBoxButton\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\nimport { CODE_FONT } from \"../UI/constants\";\nimport { formatProjectFilePath } from \"../formatProjectFilePath\";\nimport openFileInEditor from \"../modules/openFileInEditor\";\nimport { LogBoxInspectorSection } from \"./LogBoxInspectorSection\";\n\ndeclare const process: any;\n\nexport function LogBoxInspectorCodeFrame({\n codeFrame,\n}: {\n codeFrame?: CodeFrame;\n}) {\n if (codeFrame == null) {\n return null;\n }\n\n function getFileName() {\n return formatProjectFilePath(\n process.env.EXPO_PROJECT_ROOT,\n codeFrame?.fileName\n );\n }\n\n function getLocation() {\n const location = codeFrame?.location;\n if (location != null) {\n return ` (${location.row}:${\n location.column + 1 /* Code frame columns are zero indexed */\n })`;\n }\n\n return null;\n }\n\n return (\n <LogBoxInspectorSection heading=\"Source\">\n <View style={styles.box}>\n <View style={styles.frame}>\n <ScrollView horizontal>\n <Ansi style={styles.content} text={codeFrame.content} />\n </ScrollView>\n </View>\n <LogBoxButton\n backgroundColor={{\n default: \"transparent\",\n pressed: LogBoxStyle.getBackgroundDarkColor(1),\n }}\n style={styles.button}\n onPress={() => {\n openFileInEditor(codeFrame.fileName, codeFrame.location?.row ?? 0);\n }}\n >\n <Text style={styles.fileText}>\n {getFileName()}\n {getLocation()}\n </Text>\n </LogBoxButton>\n </View>\n </LogBoxInspectorSection>\n );\n}\n\nconst styles = StyleSheet.create({\n box: {\n backgroundColor: LogBoxStyle.getBackgroundColor(),\n borderWidth: 1,\n borderColor: \"#323232\",\n marginLeft: 10,\n marginRight: 10,\n marginTop: 5,\n borderRadius: 3,\n },\n frame: {\n padding: 10,\n borderBottomColor: LogBoxStyle.getTextColor(0.1),\n borderBottomWidth: 1,\n },\n button: {\n paddingTop: 10,\n paddingBottom: 10,\n },\n content: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 12,\n includeFontPadding: false,\n lineHeight: 20,\n fontFamily: CODE_FONT,\n },\n fileText: {\n userSelect: \"none\",\n color: LogBoxStyle.getTextColor(0.5),\n textAlign: \"center\",\n flex: 1,\n fontSize: 16,\n includeFontPadding: false,\n fontFamily: CODE_FONT,\n },\n});\n"]}
@@ -63,7 +63,7 @@ function FooterButton({ text, onPress, }) {
63
63
  },
64
64
  ] },
65
65
  react_1.default.createElement(react_views_1.View, { style: buttonStyles.content },
66
- react_1.default.createElement(react_views_1.Text, { selectable: false, style: buttonStyles.label }, text))))));
66
+ react_1.default.createElement(react_views_1.Text, { style: buttonStyles.label }, text))))));
67
67
  }
68
68
  const buttonStyles = react_views_1.StyleSheet.create({
69
69
  safeArea: {
@@ -78,6 +78,7 @@ const buttonStyles = react_views_1.StyleSheet.create({
78
78
  justifyContent: "center",
79
79
  },
80
80
  label: {
81
+ userSelect: "none",
81
82
  color: LogBoxStyle.getTextColor(1),
82
83
  fontSize: 14,
83
84
  includeFontPadding: false,
@@ -87,10 +88,7 @@ const buttonStyles = react_views_1.StyleSheet.create({
87
88
  const styles = react_views_1.StyleSheet.create({
88
89
  root: {
89
90
  backgroundColor: LogBoxStyle.getBackgroundColor(1),
90
- shadowColor: "#000",
91
- shadowOffset: { width: 0, height: -2 },
92
- shadowRadius: 2,
93
- shadowOpacity: 0.5,
91
+ boxShadow: `0 -2px 0 2px #000`,
94
92
  flexDirection: "row",
95
93
  },
96
94
  button: {
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxInspectorFooter.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorFooter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,qDAAwE;AACxE,kDAA0B;AAE1B,mDAAoD;AACpD,+DAAiD;AAOjD,SAAgB,qBAAqB,CAAC,KAAY;IAChD,MAAM,GAAG,GAAG,IAAA,2BAAc,GAAE,CAAC;IAE7B,IAAI,CAAC,QAAQ,EAAE,QAA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AY,GAAG,wBAAU,CAAC,MAAM,CAAC;IACrC,QAAQ,EAAE;QACR,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,CAAC;QACjB,WAAW,EAAE,SAAS;QACtB,0EAA0E;KAC3E;IACD,OAAO,EAAE;QACP,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,EAAE;QACV,cAAc,EAAE,QAAQ;KACzB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,wBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,eAAe,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAClD,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE;QACtC,YAAY,EAAE,CAAC;QACf,aAAa,EAAE,GAAG;QAClB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC;KACR;IACD,eAAe,EAAE;QACf,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,EAAE;QACjB,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACrC;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 { Pressable, StyleSheet, Text, View } from \"@bacons/react-views\";\nimport React from \"react\";\n\nimport { useSelectedLog } from \"../Data/LogContext\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\n\ntype Props = {\n onDismiss: () => void;\n onMinimize: () => void;\n};\n\nexport function LogBoxInspectorFooter(props: Props) {\n const log = useSelectedLog();\n\n if ([\"static\", \"syntax\"].includes(log.level)) {\n return (\n <View style={styles.root}>\n <View style={styles.button}>\n <Text style={styles.syntaxErrorText}>\n This error cannot be dismissed.\n </Text>\n </View>\n </View>\n );\n }\n\n return (\n <View style={styles.root}>\n <FooterButton text=\"Dismiss\" onPress={props.onDismiss} />\n <FooterButton text=\"Minimize\" onPress={props.onMinimize} />\n </View>\n );\n}\n\nfunction FooterButton({\n text,\n onPress,\n}: {\n onPress: () => void;\n text: string;\n}) {\n return (\n <Pressable onPress={onPress} style={{ flex: 1 }}>\n {({ hovered, pressed }) => (\n <View\n style={[\n buttonStyles.safeArea,\n {\n transitionDuration: \"150ms\",\n backgroundColor: pressed\n ? \"#323232\"\n : hovered\n ? \"#111111\"\n : LogBoxStyle.getBackgroundColor(),\n },\n ]}\n >\n <View style={buttonStyles.content}>\n <Text selectable={false} style={buttonStyles.label}>\n {text}\n </Text>\n </View>\n </View>\n )}\n </Pressable>\n );\n}\n\nconst buttonStyles = StyleSheet.create({\n safeArea: {\n flex: 1,\n borderTopWidth: 1,\n borderColor: \"#323232\",\n // paddingBottom: DeviceInfo.getConstants().isIPhoneX_deprecated ? 30 : 0,\n },\n content: {\n alignItems: \"center\",\n height: 48,\n justifyContent: \"center\",\n },\n label: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n includeFontPadding: false,\n lineHeight: 20,\n },\n});\n\nconst styles = StyleSheet.create({\n root: {\n backgroundColor: LogBoxStyle.getBackgroundColor(1),\n shadowColor: \"#000\",\n shadowOffset: { width: 0, height: -2 },\n shadowRadius: 2,\n shadowOpacity: 0.5,\n flexDirection: \"row\",\n },\n button: {\n flex: 1,\n },\n syntaxErrorText: {\n textAlign: \"center\",\n width: \"100%\",\n height: 48,\n fontSize: 14,\n lineHeight: 20,\n paddingTop: 20,\n paddingBottom: 50,\n fontStyle: \"italic\",\n color: LogBoxStyle.getTextColor(0.6),\n },\n});\n"]}
1
+ {"version":3,"file":"LogBoxInspectorFooter.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorFooter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,qDAAwE;AACxE,kDAA0B;AAE1B,mDAAoD;AACpD,+DAAiD;AAOjD,SAAgB,qBAAqB,CAAC,KAAY;IAChD,MAAM,GAAG,GAAG,IAAA,2BAAc,GAAE,CAAC;IAE7B,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAC5C,OAAO,CACL,8BAAC,kBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI;YACtB,8BAAC,kBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM;gBACxB,8BAAC,kBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,eAAe,sCAE5B,CACF,CACF,CACR,CAAC;KACH;IAED,OAAO,CACL,8BAAC,kBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI;QACtB,8BAAC,YAAY,IAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,KAAK,CAAC,SAAS,GAAI;QACzD,8BAAC,YAAY,IAAC,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,KAAK,CAAC,UAAU,GAAI,CACtD,CACR,CAAC;AACJ,CAAC;AArBD,sDAqBC;AAED,SAAS,YAAY,CAAC,EACpB,IAAI,EACJ,OAAO,GAIR;IACC,OAAO,CACL,8BAAC,uBAAS,IAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAC5C,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACzB,8BAAC,kBAA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EAAE;QACd,aAAa,EAAE,EAAE;QACjB,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACrC;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 { Pressable, StyleSheet, Text, View } from \"@bacons/react-views\";\nimport React from \"react\";\n\nimport { useSelectedLog } from \"../Data/LogContext\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\n\ntype Props = {\n onDismiss: () => void;\n onMinimize: () => void;\n};\n\nexport function LogBoxInspectorFooter(props: Props) {\n const log = useSelectedLog();\n\n if ([\"static\", \"syntax\"].includes(log.level)) {\n return (\n <View style={styles.root}>\n <View style={styles.button}>\n <Text style={styles.syntaxErrorText}>\n This error cannot be dismissed.\n </Text>\n </View>\n </View>\n );\n }\n\n return (\n <View style={styles.root}>\n <FooterButton text=\"Dismiss\" onPress={props.onDismiss} />\n <FooterButton text=\"Minimize\" onPress={props.onMinimize} />\n </View>\n );\n}\n\nfunction FooterButton({\n text,\n onPress,\n}: {\n onPress: () => void;\n text: string;\n}) {\n return (\n <Pressable onPress={onPress} style={{ flex: 1 }}>\n {({ hovered, pressed }) => (\n <View\n style={[\n buttonStyles.safeArea,\n {\n transitionDuration: \"150ms\",\n backgroundColor: pressed\n ? \"#323232\"\n : hovered\n ? \"#111111\"\n : LogBoxStyle.getBackgroundColor(),\n },\n ]}\n >\n <View style={buttonStyles.content}>\n <Text style={buttonStyles.label}>{text}</Text>\n </View>\n </View>\n )}\n </Pressable>\n );\n}\n\nconst buttonStyles = StyleSheet.create({\n safeArea: {\n flex: 1,\n borderTopWidth: 1,\n borderColor: \"#323232\",\n // paddingBottom: DeviceInfo.getConstants().isIPhoneX_deprecated ? 30 : 0,\n },\n content: {\n alignItems: \"center\",\n height: 48,\n justifyContent: \"center\",\n },\n label: {\n userSelect: \"none\",\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n includeFontPadding: false,\n lineHeight: 20,\n },\n});\n\nconst styles = StyleSheet.create({\n root: {\n backgroundColor: LogBoxStyle.getBackgroundColor(1),\n boxShadow: `0 -2px 0 2px #000`,\n flexDirection: \"row\",\n },\n button: {\n flex: 1,\n },\n syntaxErrorText: {\n textAlign: \"center\",\n width: \"100%\",\n height: 48,\n fontSize: 14,\n lineHeight: 20,\n paddingTop: 20,\n paddingBottom: 50,\n fontStyle: \"italic\",\n color: LogBoxStyle.getTextColor(0.6),\n },\n});\n"]}
@@ -82,26 +82,20 @@ const backgroundForLevel = (level) => ({
82
82
  },
83
83
  }[level]);
84
84
  function LogBoxInspectorHeaderButton(props) {
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, style: headerStyles.buttonImage }))));
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
89
  alignItems: "center",
90
- aspectRatio: 1,
91
90
  justifyContent: "center",
92
- marginTop: 5,
91
+ aspectRatio: 1,
93
92
  marginRight: 6,
94
93
  marginLeft: 6,
95
- marginBottom: react_native_1.Platform.select({
96
- web: 0,
97
- default: -8,
98
- }),
99
94
  borderRadius: 3,
100
95
  },
101
96
  buttonImage: {
102
97
  height: 14,
103
98
  width: 8,
104
- tintColor: LogBoxStyle.getTextColor(),
105
99
  },
106
100
  });
107
101
  const styles = react_native_1.StyleSheet.create({
@@ -122,6 +116,8 @@ const styles = react_native_1.StyleSheet.create({
122
116
  },
123
117
  header: {
124
118
  flexDirection: "row",
119
+ alignItems: "center",
120
+ paddingHorizontal: 8,
125
121
  height: react_native_1.Platform.select({
126
122
  default: 48,
127
123
  ios: 44,
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxInspectorHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAOsB;AAGtB,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;IACxE,MAAM,SAAS,GAAG,aAAa,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC;IAExE,MAAM,SAAS,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D,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,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) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from \"react\";\nimport {\n Image,\n Platform,\n StatusBar,\n StyleSheet,\n Text,\n View,\n} 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 >\n {props.disabled ? null : (\n <Image source={props.image} style={headerStyles.buttonImage} />\n )}\n </LogBoxButton>\n );\n}\n\nconst headerStyles = StyleSheet.create({\n button: {\n alignItems: \"center\",\n aspectRatio: 1,\n justifyContent: \"center\",\n marginTop: 5,\n marginRight: 6,\n marginLeft: 6,\n marginBottom: Platform.select({\n web: 0,\n default: -8,\n }),\n borderRadius: 3,\n },\n buttonImage: {\n height: 14,\n width: 8,\n tintColor: LogBoxStyle.getTextColor(),\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 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
+ {"version":3,"file":"LogBoxInspectorHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAOsB;AAGtB,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,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AK,KAAK,CAAC,CAAC,CAAC,wBAAS,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;KACjE;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 from \"react\";\nimport {\n Image,\n Platform,\n StatusBar,\n StyleSheet,\n Text,\n View,\n} 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 >\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"]}
@@ -57,11 +57,7 @@ exports.LogBoxInspectorMessageHeader = LogBoxInspectorMessageHeader;
57
57
  const styles = react_native_1.StyleSheet.create({
58
58
  body: {
59
59
  backgroundColor: LogBoxStyle.getBackgroundColor(1),
60
- shadowColor: "#000",
61
- shadowOffset: { width: 0, height: 2 },
62
- shadowRadius: 2,
63
- shadowOpacity: 0.5,
64
- // flex: 0,
60
+ boxShadow: `0 2px 0 2px #00000080`,
65
61
  },
66
62
  bodyText: {
67
63
  color: LogBoxStyle.getTextColor(1),
@@ -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,IACnD,KAAK,CAAC,KAAK,CACP,CACF;QACP,8BAAC,m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CAAC,aAAa,CAAC,CAAC,CAAC;KACpC;IACD,KAAK,EAAE;QACL,KAAK,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;KACpC;IACD,MAAM,EAAE;QACN,KAAK,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;KACpC;IACD,MAAM,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) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from \"react\";\nimport { 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]]}>\n {props.title}\n </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 shadowColor: \"#000\",\n shadowOffset: { width: 0, height: 2 },\n shadowRadius: 2,\n shadowOpacity: 0.5,\n // flex: 0,\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
+ {"version":3,"file":"LogBoxInspectorMessageHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorMessageHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;A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ates.\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]]}>\n {props.title}\n </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"]}
@@ -94,9 +94,8 @@ function LogBoxInspectorSourceMapStatus(props) {
94
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, style: [
97
+ react_1.default.createElement(react_native_1.Animated.Image, { source: image, tintColor: color !== null && color !== void 0 ? color : LogBoxStyle.getTextColor(0.4), style: [
98
98
  styles.image,
99
- { tintColor: color },
100
99
  state.rotate == null || props.status !== "PENDING"
101
100
  ? null
102
101
  : { transform: [{ rotate: state.rotate }] },
@@ -116,7 +115,6 @@ const styles = react_native_1.StyleSheet.create({
116
115
  height: 14,
117
116
  width: 16,
118
117
  marginEnd: 4,
119
- tintColor: LogBoxStyle.getTextColor(0.4),
120
118
  },
121
119
  text: {
122
120
  fontSize: 12,
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxInspectorSourceMapStatus.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSourceMapStatus.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAmD;AACnD,+CAMsB;AAEtB,qDAAkD;AAClD,+DAAiD;AAOjD,SAAgB,8BAA8B,CAAC,KAAY;IACzD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAG/B;QAC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C;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;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;QACZ,SAAS,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACzC;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;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, { useEffect, useState } from \"react\";\nimport {\n Animated,\n Easing,\n GestureResponderEvent,\n StyleSheet,\n Text,\n} 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 >\n <Animated.Image\n source={image}\n style={[\n styles.image,\n { tintColor: color },\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 tintColor: LogBoxStyle.getTextColor(0.4),\n },\n text: {\n fontSize: 12,\n includeFontPadding: false,\n lineHeight: 16,\n },\n});\n"]}
1
+ {"version":3,"file":"LogBoxInspectorSourceMapStatus.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSourceMapStatus.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAmD;AACnD,+CAMsB;AAEtB,qDAAkD;AAClD,+DAAiD;AAOjD,SAAgB,8BAA8B,CAAC,KAAY;IACzD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAG/B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AC,iBAAmB,CAC3C,CAChB,CAAC;AACJ,CAAC;AAvFD,wEAuFC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;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) 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, { useEffect, useState } from \"react\";\nimport {\n Animated,\n Easing,\n GestureResponderEvent,\n StyleSheet,\n Text,\n} 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 >\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"]}
@@ -107,9 +107,7 @@ const countStyles = react_views_1.StyleSheet.create({
107
107
  lineHeight: 18,
108
108
  textAlign: "center",
109
109
  fontWeight: "600",
110
- textShadowColor: LogBoxStyle.getBackgroundColor(0.8),
111
- textShadowOffset: { width: 0, height: 0 },
112
- textShadowRadius: 3,
110
+ textShadow: `0px 0px 3px ${LogBoxStyle.getBackgroundColor(0.8)}`,
113
111
  },
114
112
  });
115
113
  const dismissStyles = react_views_1.StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorToast.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AQ;QACpB,WAAW,EAAE,SAAS;QACtB,eAAe,EAAE,WAAW,CAAC,kBAAkB,EAAE;QACjD,IAAI,EAAE,CAAC;QACP,iBAAiB,EAAE,EAAE;KACtB;CACF,CAAC,CAAC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Image, Pressable, StyleSheet, Text, View } from \"@bacons/react-views\";\nimport React, { useEffect } from \"react\";\n\nimport * as LogBoxData from \"../Data/LogBoxData\";\nimport { LogBoxLog } from \"../Data/LogBoxLog\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\nimport { ErrorToastMessage } from \"./ErrorToastMessage\";\n\ntype Props = {\n log: LogBoxLog;\n totalLogCount: number;\n level: \"warn\" | \"error\";\n onPressOpen: () => void;\n onPressDismiss: () => void;\n};\n\nfunction useSymbolicatedLog(log: LogBoxLog) {\n // Eagerly symbolicate so the stack is available when pressing to inspect.\n useEffect(() => {\n LogBoxData.symbolicateLogLazy(\"stack\", log);\n LogBoxData.symbolicateLogLazy(\"component\", log);\n }, [log]);\n}\n\nexport function ErrorToast(props: Props) {\n const { totalLogCount, level, log } = props;\n\n useSymbolicatedLog(log);\n\n return (\n <View style={toastStyles.container}>\n <Pressable style={{ flex: 1 }} onPress={props.onPressOpen}>\n {({ hovered, pressed }) => (\n <View\n style={[\n toastStyles.press,\n {\n transitionDuration: \"150ms\",\n backgroundColor: pressed\n ? \"#323232\"\n : hovered\n ? \"#111111\"\n : LogBoxStyle.getBackgroundColor(),\n },\n ]}\n >\n <Count count={totalLogCount} level={level} />\n <ErrorToastMessage message={log.message} />\n <Dismiss onPress={props.onPressDismiss} />\n </View>\n )}\n </Pressable>\n </View>\n );\n}\n\nfunction Count({ count, level }: { count: number; level: Props[\"level\"] }) {\n return (\n <View style={[countStyles.inside, countStyles[level]]}>\n <Text style={countStyles.text}>{count <= 1 ? \"!\" : count}</Text>\n </View>\n );\n}\n\nfunction Dismiss({ onPress }: { onPress: () => void }) {\n return (\n <Pressable\n style={{\n marginLeft: 5,\n }}\n hitSlop={{\n top: 12,\n right: 10,\n bottom: 12,\n left: 10,\n }}\n onPress={onPress}\n >\n {({ hovered, pressed }) => (\n <View\n style={[\n dismissStyles.press,\n hovered && { opacity: 0.8 },\n pressed && { opacity: 0.5 },\n ]}\n >\n <Image\n source={require(\"@expo/metro-runtime/assets/close.png\")}\n style={dismissStyles.image}\n />\n </View>\n )}\n </Pressable>\n );\n}\n\nconst countStyles = StyleSheet.create({\n warn: {\n backgroundColor: LogBoxStyle.getWarningColor(1),\n },\n error: {\n backgroundColor: LogBoxStyle.getErrorColor(1),\n },\n log: {\n backgroundColor: LogBoxStyle.getLogColor(1),\n },\n inside: {\n marginRight: 8,\n minWidth: 22,\n aspectRatio: 1,\n paddingHorizontal: 4,\n borderRadius: 11,\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n text: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n lineHeight: 18,\n textAlign: \"center\",\n fontWeight: \"600\",\n textShadowColor: LogBoxStyle.getBackgroundColor(0.8),\n textShadowOffset: { width: 0, height: 0 },\n textShadowRadius: 3,\n },\n});\n\nconst dismissStyles = StyleSheet.create({\n press: {\n backgroundColor: \"#323232\",\n height: 20,\n width: 20,\n borderRadius: 25,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n image: {\n height: 8,\n width: 8,\n },\n});\n\nconst toastStyles = StyleSheet.create({\n container: {\n height: 48,\n justifyContent: \"center\",\n marginBottom: 4,\n },\n press: {\n borderWidth: 1,\n borderRadius: 8,\n overflow: \"hidden\",\n flexDirection: \"row\",\n alignItems: \"center\",\n borderColor: \"#323232\",\n backgroundColor: LogBoxStyle.getBackgroundColor(),\n flex: 1,\n paddingHorizontal: 12,\n },\n});\n"]}
1
+ {"version":3,"file":"ErrorToast.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/Error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CACF,CAAC,CAAC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Image, Pressable, StyleSheet, Text, View } from \"@bacons/react-views\";\nimport React, { useEffect } from \"react\";\n\nimport * as LogBoxData from \"../Data/LogBoxData\";\nimport { LogBoxLog } from \"../Data/LogBoxLog\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\nimport { ErrorToastMessage } from \"./ErrorToastMessage\";\n\ntype Props = {\n log: LogBoxLog;\n totalLogCount: number;\n level: \"warn\" | \"error\";\n onPressOpen: () => void;\n onPressDismiss: () => void;\n};\n\nfunction useSymbolicatedLog(log: LogBoxLog) {\n // Eagerly symbolicate so the stack is available when pressing to inspect.\n useEffect(() => {\n LogBoxData.symbolicateLogLazy(\"stack\", log);\n LogBoxData.symbolicateLogLazy(\"component\", log);\n }, [log]);\n}\n\nexport function ErrorToast(props: Props) {\n const { totalLogCount, level, log } = props;\n\n useSymbolicatedLog(log);\n\n return (\n <View style={toastStyles.container}>\n <Pressable style={{ flex: 1 }} onPress={props.onPressOpen}>\n {({ hovered, pressed }) => (\n <View\n style={[\n toastStyles.press,\n {\n transitionDuration: \"150ms\",\n backgroundColor: pressed\n ? \"#323232\"\n : hovered\n ? \"#111111\"\n : LogBoxStyle.getBackgroundColor(),\n },\n ]}\n >\n <Count count={totalLogCount} level={level} />\n <ErrorToastMessage message={log.message} />\n <Dismiss onPress={props.onPressDismiss} />\n </View>\n )}\n </Pressable>\n </View>\n );\n}\n\nfunction Count({ count, level }: { count: number; level: Props[\"level\"] }) {\n return (\n <View style={[countStyles.inside, countStyles[level]]}>\n <Text style={countStyles.text}>{count <= 1 ? \"!\" : count}</Text>\n </View>\n );\n}\n\nfunction Dismiss({ onPress }: { onPress: () => void }) {\n return (\n <Pressable\n style={{\n marginLeft: 5,\n }}\n hitSlop={{\n top: 12,\n right: 10,\n bottom: 12,\n left: 10,\n }}\n onPress={onPress}\n >\n {({ hovered, pressed }) => (\n <View\n style={[\n dismissStyles.press,\n hovered && { opacity: 0.8 },\n pressed && { opacity: 0.5 },\n ]}\n >\n <Image\n source={require(\"@expo/metro-runtime/assets/close.png\")}\n style={dismissStyles.image}\n />\n </View>\n )}\n </Pressable>\n );\n}\n\nconst countStyles = StyleSheet.create({\n warn: {\n backgroundColor: LogBoxStyle.getWarningColor(1),\n },\n error: {\n backgroundColor: LogBoxStyle.getErrorColor(1),\n },\n log: {\n backgroundColor: LogBoxStyle.getLogColor(1),\n },\n inside: {\n marginRight: 8,\n minWidth: 22,\n aspectRatio: 1,\n paddingHorizontal: 4,\n borderRadius: 11,\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n text: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n lineHeight: 18,\n textAlign: \"center\",\n fontWeight: \"600\",\n textShadow: `0px 0px 3px ${LogBoxStyle.getBackgroundColor(0.8)}`,\n },\n});\n\nconst dismissStyles = StyleSheet.create({\n press: {\n backgroundColor: \"#323232\",\n height: 20,\n width: 20,\n borderRadius: 25,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n image: {\n height: 8,\n width: 8,\n },\n});\n\nconst toastStyles = StyleSheet.create({\n container: {\n height: 48,\n justifyContent: \"center\",\n marginBottom: 4,\n },\n press: {\n borderWidth: 1,\n borderRadius: 8,\n overflow: \"hidden\",\n flexDirection: \"row\",\n alignItems: \"center\",\n borderColor: \"#323232\",\n backgroundColor: LogBoxStyle.getBackgroundColor(),\n flex: 1,\n paddingHorizontal: 12,\n },\n});\n"]}
@@ -32,11 +32,12 @@ const react_1 = __importDefault(require("react"));
32
32
  const LogBoxMessage_1 = require("../UI/LogBoxMessage");
33
33
  const LogBoxStyle = __importStar(require("../UI/LogBoxStyle"));
34
34
  function ErrorToastMessage({ message }) {
35
- return (react_1.default.createElement(react_views_1.Text, { numberOfLines: 1, selectable: false, style: styles.text }, message && (react_1.default.createElement(LogBoxMessage_1.LogBoxMessage, { plaintext: true, message: message, style: styles.substitutionText }))));
35
+ return (react_1.default.createElement(react_views_1.Text, { numberOfLines: 1, style: styles.text }, message && (react_1.default.createElement(LogBoxMessage_1.LogBoxMessage, { plaintext: true, message: message, style: styles.substitutionText }))));
36
36
  }
37
37
  exports.ErrorToastMessage = ErrorToastMessage;
38
38
  const styles = react_views_1.StyleSheet.create({
39
39
  text: {
40
+ userSelect: "none",
40
41
  paddingLeft: 8,
41
42
  color: LogBoxStyle.getTextColor(1),
42
43
  flex: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorToastMessage.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuD;AACvD,kDAA0B;AAG1B,uDAAoD;AACpD,+DAAiD;AAEjD,SAAgB,iBAAiB,CAAC,EAAE,OAAO,EAA6B;IACtE,OAAO,CACL,8BAAC,kBAAI,IAAC,aAAa,EAAE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,IAC1D,OAAO,IAAI,CACV,8BAAC,6BAAa,IACZ,SAAS,QACT,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,CAAC,gBAAgB,GAC9B,CACH,CACI,CACR,CAAC;AACJ,CAAC;AAZD,8CAYC;AAED,MAAM,MAAM,GAAG,wBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;KACf;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACrC;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet, Text } from \"@bacons/react-views\";\nimport React from \"react\";\n\nimport type { Message as MessageType } from \"../Data/parseLogBoxLog\";\nimport { LogBoxMessage } from \"../UI/LogBoxMessage\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\n\nexport function ErrorToastMessage({ message }: { message?: MessageType }) {\n return (\n <Text numberOfLines={1} selectable={false} style={styles.text}>\n {message && (\n <LogBoxMessage\n plaintext\n message={message}\n style={styles.substitutionText}\n />\n )}\n </Text>\n );\n}\n\nconst styles = StyleSheet.create({\n text: {\n paddingLeft: 8,\n color: LogBoxStyle.getTextColor(1),\n flex: 1,\n fontSize: 14,\n lineHeight: 22,\n },\n substitutionText: {\n color: LogBoxStyle.getTextColor(0.6),\n },\n});\n"]}
1
+ {"version":3,"file":"ErrorToastMessage.js","sourceRoot":"","sources":["../../../src/error-overlay/toast/ErrorToastMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuD;AACvD,kDAA0B;AAG1B,uDAAoD;AACpD,+DAAiD;AAEjD,SAAgB,iBAAiB,CAAC,EAAE,OAAO,EAA6B;IACtE,OAAO,CACL,8BAAC,kBAAI,IAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,IACvC,OAAO,IAAI,CACV,8BAAC,6BAAa,IACZ,SAAS,QACT,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,CAAC,gBAAgB,GAC9B,CACH,CACI,CACR,CAAC;AACJ,CAAC;AAZD,8CAYC;AAED,MAAM,MAAM,GAAG,wBAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;KACf;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACrC;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet, Text } from \"@bacons/react-views\";\nimport React from \"react\";\n\nimport type { Message as MessageType } from \"../Data/parseLogBoxLog\";\nimport { LogBoxMessage } from \"../UI/LogBoxMessage\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\n\nexport function ErrorToastMessage({ message }: { message?: MessageType }) {\n return (\n <Text numberOfLines={1} style={styles.text}>\n {message && (\n <LogBoxMessage\n plaintext\n message={message}\n style={styles.substitutionText}\n />\n )}\n </Text>\n );\n}\n\nconst styles = StyleSheet.create({\n text: {\n userSelect: \"none\",\n paddingLeft: 8,\n color: LogBoxStyle.getTextColor(1),\n flex: 1,\n fontSize: 14,\n lineHeight: 22,\n },\n substitutionText: {\n color: LogBoxStyle.getTextColor(0.6),\n },\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/metro-runtime",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
4
4
  "description": "Tools for making experimental Metro bundler features work",
5
5
  "main": "build",
6
6
  "homepage": "https://github.com/expo/router/tree/main/packages/expo-metro-runtime",