1"use strict"; 2var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 if (k2 === undefined) k2 = k; 4 var desc = Object.getOwnPropertyDescriptor(m, k); 5 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 6 desc = { enumerable: true, get: function() { return m[k]; } }; 7 } 8 Object.defineProperty(o, k2, desc); 9}) : (function(o, m, k, k2) { 10 if (k2 === undefined) k2 = k; 11 o[k2] = m[k]; 12})); 13var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 14 Object.defineProperty(o, "default", { enumerable: true, value: v }); 15}) : function(o, v) { 16 o["default"] = v; 17}); 18var __importStar = (this && this.__importStar) || function (mod) { 19 if (mod && mod.__esModule) return mod; 20 var result = {}; 21 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 22 __setModuleDefault(result, mod); 23 return result; 24}; 25var __importDefault = (this && this.__importDefault) || function (mod) { 26 return (mod && mod.__esModule) ? mod : { "default": mod }; 27}; 28Object.defineProperty(exports, "__esModule", { value: true }); 29exports.LogBoxInspectorStackFrame = void 0; 30/** 31 * Copyright (c) 650 Industries. 32 * Copyright (c) Meta Platforms, Inc. and affiliates. 33 * 34 * This source code is licensed under the MIT license found in the 35 * LICENSE file in the root directory of this source tree. 36 */ 37const react_1 = __importDefault(require("react")); 38const react_native_1 = require("react-native"); 39const LogBoxButton_1 = require("../UI/LogBoxButton"); 40const LogBoxStyle = __importStar(require("../UI/LogBoxStyle")); 41const constants_1 = require("../UI/constants"); 42const formatProjectFilePath_1 = require("../formatProjectFilePath"); 43function LogBoxInspectorStackFrame(props) { 44 const { frame, onPress } = props; 45 const location = (0, formatProjectFilePath_1.getStackFormattedLocation)(process.env.EXPO_PROJECT_ROOT, frame); 46 return (react_1.default.createElement(react_native_1.View, { style: styles.frameContainer }, 47 react_1.default.createElement(LogBoxButton_1.LogBoxButton, { backgroundColor: { 48 default: 'transparent', 49 pressed: onPress ? LogBoxStyle.getBackgroundColor(1) : 'transparent', 50 }, onPress: onPress, style: styles.frame }, 51 react_1.default.createElement(react_native_1.Text, { style: [styles.name, frame.collapse === true && styles.dim] }, frame.methodName), 52 react_1.default.createElement(react_native_1.Text, { ellipsizeMode: "middle", numberOfLines: 1, style: [styles.location, frame.collapse === true && styles.dim] }, location)))); 53} 54exports.LogBoxInspectorStackFrame = LogBoxInspectorStackFrame; 55const styles = react_native_1.StyleSheet.create({ 56 frameContainer: { 57 flexDirection: 'row', 58 paddingHorizontal: 15, 59 }, 60 frame: { 61 flex: 1, 62 paddingVertical: 4, 63 paddingHorizontal: 10, 64 borderRadius: 5, 65 }, 66 lineLocation: { 67 flexDirection: 'row', 68 }, 69 name: { 70 color: LogBoxStyle.getTextColor(1), 71 fontSize: 14, 72 includeFontPadding: false, 73 lineHeight: 18, 74 fontWeight: '400', 75 fontFamily: constants_1.CODE_FONT, 76 }, 77 location: { 78 color: LogBoxStyle.getTextColor(0.8), 79 fontSize: 12, 80 fontWeight: '300', 81 includeFontPadding: false, 82 lineHeight: 16, 83 paddingLeft: 10, 84 }, 85 dim: { 86 color: LogBoxStyle.getTextColor(0.4), 87 fontWeight: '300', 88 }, 89 line: { 90 color: LogBoxStyle.getTextColor(0.8), 91 fontSize: 12, 92 fontWeight: '300', 93 includeFontPadding: false, 94 lineHeight: 16, 95 }, 96}); 97//# sourceMappingURL=LogBoxInspectorStackFrame.js.map