@expo/metro-runtime 3.1.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/HMRClient.d.ts.map +1 -1
- package/build/HMRClient.js +1 -0
- package/build/HMRClient.js.map +1 -1
- package/build/async-require/buildAsyncRequire.js +1 -2
- package/build/async-require/buildAsyncRequire.js.map +1 -1
- package/build/async-require/buildUrlForBundle.js +1 -2
- package/build/async-require/buildUrlForBundle.js.map +1 -1
- package/build/async-require/buildUrlForBundle.native.js +1 -2
- package/build/async-require/buildUrlForBundle.native.js.map +1 -1
- package/build/async-require/fetchAsync.js +1 -2
- package/build/async-require/fetchAsync.js.map +1 -1
- package/build/async-require/fetchAsync.native.d.ts.map +1 -1
- package/build/async-require/fetchAsync.native.js +2 -4
- package/build/async-require/fetchAsync.native.js.map +1 -1
- package/build/async-require/fetchThenEval.web.d.ts.map +1 -1
- package/build/async-require/fetchThenEval.web.js +15 -5
- package/build/async-require/fetchThenEval.web.js.map +1 -1
- package/build/async-require/fetchThenEvalJs.js +1 -2
- package/build/async-require/fetchThenEvalJs.js.map +1 -1
- package/build/async-require/index.native.js.map +1 -1
- package/build/async-require/loadBundle.d.ts.map +1 -1
- package/build/async-require/loadBundle.js +3 -5
- package/build/async-require/loadBundle.js.map +1 -1
- package/build/effects.js.map +1 -1
- package/build/error-overlay/Data/LogBoxData.d.ts.map +1 -1
- package/build/error-overlay/Data/LogBoxData.js +22 -22
- package/build/error-overlay/Data/LogBoxData.js.map +1 -1
- package/build/error-overlay/Data/LogBoxLog.js.map +1 -1
- package/build/error-overlay/Data/LogBoxSymbolication.js +2 -3
- package/build/error-overlay/Data/LogBoxSymbolication.js.map +1 -1
- package/build/error-overlay/Data/LogContext.d.ts.map +1 -1
- package/build/error-overlay/Data/LogContext.js +4 -5
- package/build/error-overlay/Data/LogContext.js.map +1 -1
- package/build/error-overlay/Data/parseLogBoxLog.js +5 -6
- package/build/error-overlay/Data/parseLogBoxLog.js.map +1 -1
- package/build/error-overlay/ErrorOverlay.js +4 -5
- package/build/error-overlay/ErrorOverlay.js.map +1 -1
- package/build/error-overlay/LogBox.web.js.map +1 -1
- package/build/error-overlay/UI/AnsiHighlight.js +1 -2
- package/build/error-overlay/UI/AnsiHighlight.js.map +1 -1
- package/build/error-overlay/UI/LogBoxButton.js +1 -2
- package/build/error-overlay/UI/LogBoxButton.js.map +1 -1
- package/build/error-overlay/UI/LogBoxMessage.js +1 -2
- package/build/error-overlay/UI/LogBoxMessage.js.map +1 -1
- package/build/error-overlay/UI/LogBoxStyle.js +14 -15
- package/build/error-overlay/UI/LogBoxStyle.js.map +1 -1
- package/build/error-overlay/UI/constants.d.ts.map +1 -1
- package/build/error-overlay/UI/constants.js +8 -6
- package/build/error-overlay/UI/constants.js.map +1 -1
- package/build/error-overlay/formatProjectFilePath.js +2 -3
- package/build/error-overlay/formatProjectFilePath.js.map +1 -1
- package/build/error-overlay/index.d.ts.map +1 -1
- package/build/error-overlay/index.js +6 -11
- package/build/error-overlay/index.js.map +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.js.map +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.js.map +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.js.map +1 -1
- package/build/error-overlay/modules/parseErrorStack/index.js.map +1 -1
- package/build/error-overlay/modules/stringifySafe/index.js +1 -2
- package/build/error-overlay/modules/stringifySafe/index.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js +1 -2
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorFooter.js +1 -2
- package/build/error-overlay/overlay/LogBoxInspectorFooter.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorHeader.js +2 -3
- package/build/error-overlay/overlay/LogBoxInspectorHeader.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js +1 -2
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSection.js +1 -2
- package/build/error-overlay/overlay/LogBoxInspectorSection.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.d.ts +7 -0
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js +9 -9
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js +1 -2
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js +2 -3
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js.map +1 -1
- package/build/error-overlay/toast/ErrorToast.js +1 -2
- package/build/error-overlay/toast/ErrorToast.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.js +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.web.js +1 -2
- package/build/error-overlay/toast/ErrorToastContainer.web.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastMessage.js +1 -2
- package/build/error-overlay/toast/ErrorToastMessage.js.map +1 -1
- package/build/error-overlay/useRejectionHandler.js +1 -2
- package/build/error-overlay/useRejectionHandler.js.map +1 -1
- package/build/getDevServer.js.map +1 -1
- package/build/location/Location.js +2 -3
- package/build/location/Location.js.map +1 -1
- package/build/location/Location.native.js +2 -3
- package/build/location/Location.native.js.map +1 -1
- package/build/location/install.native.js.map +1 -1
- package/build/messageSocket.js.map +1 -1
- package/build/setupFastRefresh.js.map +1 -1
- package/package.json +2 -2
- package/src/HMRClient.ts +1 -0
- package/src/async-require/fetchAsync.native.ts +1 -2
- package/src/async-require/fetchThenEval.web.ts +16 -2
- package/src/async-require/loadBundle.ts +2 -3
- package/src/error-overlay/Data/LogBoxData.tsx +2 -0
- package/src/error-overlay/Data/LogContext.tsx +1 -2
- package/src/error-overlay/UI/constants.ts +9 -7
- package/src/error-overlay/index.tsx +7 -12
- package/src/error-overlay/overlay/LogBoxInspectorFooter.tsx +2 -2
- package/src/error-overlay/overlay/LogBoxInspectorHeader.tsx +1 -1
- package/src/error-overlay/overlay/LogBoxInspectorSourceMapStatus.tsx +3 -0
- package/src/error-overlay/toast/ErrorToast.tsx +2 -2
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useRejectionHandler =
|
|
6
|
+
exports.useRejectionHandler = useRejectionHandler;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const ExceptionsManager_1 = __importDefault(require("./modules/ExceptionsManager"));
|
|
9
9
|
function useStackTraceLimit(limit) {
|
|
@@ -55,5 +55,4 @@ function useRejectionHandler() {
|
|
|
55
55
|
}, []);
|
|
56
56
|
return hasError;
|
|
57
57
|
}
|
|
58
|
-
exports.useRejectionHandler = useRejectionHandler;
|
|
59
58
|
//# sourceMappingURL=useRejectionHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRejectionHandler.js","sourceRoot":"","sources":["../../src/error-overlay/useRejectionHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRejectionHandler.js","sourceRoot":"","sources":["../../src/error-overlay/useRejectionHandler.ts"],"names":[],"mappings":";;;;;AAuBA,kDAqCC;AA5DD,kDAA0B;AAE1B,oFAA4D;AAE5D,SAAS,kBAAkB,CAAC,KAAa;IACvC,MAAM,OAAO,GAAG,eAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAChC,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC;YACH,qEAAqE;YACrE,MAA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AC;QAC5C,CAAC;QAED,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;QACpE,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;QACnD,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;YACtD,MAAM,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;QACzE,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import React from 'react';\n\nimport ExceptionsManager from './modules/ExceptionsManager';\n\nfunction useStackTraceLimit(limit: number) {\n const current = React.useRef(0);\n React.useEffect(() => {\n try {\n // @ts-expect-error: StackTraceLimit is not defined in the Error type\n const currentLimit = Error.stackTraceLimit;\n // @ts-expect-error: StackTraceLimit is not defined in the Error type\n Error.stackTraceLimit = limit;\n current.current = currentLimit;\n } catch {}\n return () => {\n try {\n // @ts-expect-error: StackTraceLimit is not defined in the Error type\n Error.stackTraceLimit = current.current;\n } catch {}\n };\n }, [limit]);\n}\n\nexport function useRejectionHandler() {\n const hasError = React.useRef(false);\n\n useStackTraceLimit(35);\n\n React.useEffect(() => {\n function onUnhandledError(ev: ErrorEvent) {\n hasError.current = true;\n\n const error = ev?.error;\n if (!error || !(error instanceof Error) || typeof error.stack !== 'string') {\n return;\n }\n\n ExceptionsManager.handleException(error);\n }\n\n function onUnhandledRejection(ev: PromiseRejectionEvent) {\n hasError.current = true;\n\n const reason = ev?.reason;\n if (!reason || !(reason instanceof Error) || typeof reason.stack !== 'string') {\n return;\n }\n\n ExceptionsManager.handleException(reason);\n }\n\n window.addEventListener('unhandledrejection', onUnhandledRejection);\n window.addEventListener('error', onUnhandledError);\n return () => {\n window.removeEventListener('error', onUnhandledError);\n window.removeEventListener('unhandledrejection', onUnhandledRejection);\n };\n }, []);\n\n return hasError;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDevServer.js","sourceRoot":"","sources":["../src/getDevServer.ts"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,kBAAkB;IAClB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"getDevServer.js","sourceRoot":"","sources":["../src/getDevServer.ts"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,kBAAkB;IAClB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO;YACL,sBAAsB,EAAE,IAAI;YAC5B,aAAa,EAAE,EAAE;YACjB,GAAG,EAAE,EAAE;SACR,CAAC;IACJ,CAAC;IAED,OAAO;QACL,4DAA4D;QAC5D,sBAAsB,EAAE,IAAI;QAE5B,0DAA0D;QAC1D,IAAI,aAAa;YACf,IAAI,QAAQ,EAAE,aAAa,IAAI,KAAK,IAAI,QAAQ,CAAC,aAAa,EAAE,CAAC;gBAC/D,OAAO,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC;YACpC,CAAC;YAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAEzC,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;YAE9C,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;QACD,GAAG,EAAE,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,QAAQ;KACzC,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC","sourcesContent":["const getDevServer = () => {\n // Disable for SSR\n if (typeof window === 'undefined') {\n return {\n bundleLoadedFromServer: true,\n fullBundleUrl: '',\n url: '',\n };\n }\n\n return {\n // The bundle is always loaded from a server in the browser.\n bundleLoadedFromServer: true,\n\n /** URL but ensures that platform query param is added. */\n get fullBundleUrl() {\n if (document?.currentScript && 'src' in document.currentScript) {\n return document.currentScript.src;\n }\n\n const bundleUrl = new URL(location.href);\n\n bundleUrl.searchParams.set('platform', 'web');\n\n return bundleUrl.toString();\n },\n url: location.origin + location.pathname,\n };\n};\n\nexport default getDevServer;\n"]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setLocationHref = exports.install = void 0;
|
|
4
|
-
function install() { }
|
|
5
3
|
exports.install = install;
|
|
6
|
-
function setLocationHref(href) { }
|
|
7
4
|
exports.setLocationHref = setLocationHref;
|
|
5
|
+
function install() { }
|
|
6
|
+
function setLocationHref(href) { }
|
|
8
7
|
//# sourceMappingURL=Location.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Location.js","sourceRoot":"","sources":["../../src/location/Location.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Location.js","sourceRoot":"","sources":["../../src/location/Location.ts"],"names":[],"mappings":";;AAAA,0BAA4B;AAE5B,0CAAgD;AAFhD,SAAgB,OAAO,KAAI,CAAC;AAE5B,SAAgB,eAAe,CAAC,IAAY,IAAG,CAAC","sourcesContent":["export function install() {}\n\nexport function setLocationHref(href: string) {}\n"]}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Copyright © 2023 650 Industries.
|
|
3
3
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.setLocationHref = setLocationHref;
|
|
6
|
+
exports.install = install;
|
|
6
7
|
class DOMException extends Error {
|
|
7
8
|
constructor(message, name) {
|
|
8
9
|
super(message);
|
|
@@ -174,7 +175,6 @@ let location = undefined;
|
|
|
174
175
|
function setLocationHref(href) {
|
|
175
176
|
location = new Location(href);
|
|
176
177
|
}
|
|
177
|
-
exports.setLocationHref = setLocationHref;
|
|
178
178
|
function install() {
|
|
179
179
|
Object.defineProperty(global, 'Location', {
|
|
180
180
|
value: Location,
|
|
@@ -191,5 +191,4 @@ function install() {
|
|
|
191
191
|
enumerable: true,
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
|
-
exports.install = install;
|
|
195
194
|
//# sourceMappingURL=Location.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Location.native.js","sourceRoot":"","sources":["../../src/location/Location.native.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,0EAA0E
|
|
1
|
+
{"version":3,"file":"Location.native.js","sourceRoot":"","sources":["../../src/location/Location.native.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,0EAA0E;;AAgL1E,0CAEC;AAED,0BAgBC;AAlMD,MAAM,YAAa,SAAQ,KAAK;IAC9B,YAAY,OAAe,EAAE,IAAY;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED,6EAA6E;AAC7E,uEAAuE;AACvE,gCAAgC;AAChC,+EAA+E;AAC/E,uDAAuD;AACvD,MAAM,QAAQ;IACZ,YAAY,OAAsB,IAAI;QACpC,MAAM,GAAG,GAAG,IAAI,GAAG;QACjB,mBAAmB;QACnB,IAAI,CACL,CAAC;QAEF,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC;QAElB,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC;QAClB,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE;YAC5B,IAAI,EAAE;gBACJ,GAAG;oBACD,OAAO,GAAG,CAAC,IAAI,CAAC;gBAClB,CAAC;gBACD,GAAG;oBACD,MAAM,IAAI,YAAY,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;gBAC7E,CAAC;gBACD,UAAU,EAAE,IAAI;aACjB;YACD,IAAI,EAAE;gBACJ,GAAG;oBACD,OAAO,GAAG,CAA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xC,GAAG;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,GAAG;YACD,MAAM,IAAI,YAAY,CAAC,wBAAwB,EAAE,mBAAmB,CAAC,CAAC;QACxE,CAAC;QACD,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright © 2023 650 Industries.\n// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.\n\nclass DOMException extends Error {\n constructor(message: string, name: string) {\n super(message);\n this.name = name;\n }\n}\n\n// The differences between the definitions of `Location` and `WorkerLocation`\n// are because of the `LegacyUnforgeable` attribute only specified upon\n// `Location`'s properties. See:\n// - https://html.spec.whatwg.org/multipage/history.html#the-location-interface\n// - https://heycam.github.io/webidl/#LegacyUnforgeable\nclass Location {\n constructor(href: string | null = null) {\n const url = new URL(\n // @ts-expect-error\n href\n );\n\n url.username = '';\n\n url.password = '';\n Object.defineProperties(this, {\n hash: {\n get() {\n return url.hash;\n },\n set() {\n throw new DOMException(`Cannot set \"location.hash\".`, 'NotSupportedError');\n },\n enumerable: true,\n },\n host: {\n get() {\n return url.host;\n },\n set() {\n throw new DOMException(`Cannot set \"location.host\".`, 'NotSupportedError');\n },\n enumerable: true,\n },\n hostname: {\n get() {\n return url.hostname;\n },\n set() {\n throw new DOMException(`Cannot set \"location.hostname\".`, 'NotSupportedError');\n },\n enumerable: true,\n },\n href: {\n get() {\n return url.href;\n },\n set() {\n throw new DOMException(`Cannot set \"location.href\".`, 'NotSupportedError');\n },\n enumerable: true,\n },\n origin: {\n get() {\n return url.origin;\n },\n enumerable: true,\n },\n pathname: {\n get() {\n return url.pathname;\n },\n set() {\n throw new DOMException(`Cannot set \"location.pathname\".`, 'NotSupportedError');\n },\n enumerable: true,\n },\n port: {\n get() {\n return url.port;\n },\n set() {\n throw new DOMException(`Cannot set \"location.port\".`, 'NotSupportedError');\n },\n enumerable: true,\n },\n protocol: {\n get() {\n return url.protocol;\n },\n set() {\n throw new DOMException(`Cannot set \"location.protocol\".`, 'NotSupportedError');\n },\n enumerable: true,\n },\n search: {\n get() {\n return url.search;\n },\n set() {\n throw new DOMException(`Cannot set \"location.search\".`, 'NotSupportedError');\n },\n enumerable: true,\n },\n ancestorOrigins: {\n get() {\n return {\n length: 0,\n item: () => null,\n contains: () => false,\n };\n },\n enumerable: true,\n },\n assign: {\n value: function assign() {\n throw new DOMException(`Cannot call \"location.assign()\".`, 'NotSupportedError');\n },\n enumerable: true,\n },\n reload: {\n value: function reload() {\n if (process.env.NODE_ENV !== 'production') {\n // NOTE: This does change how native fast refresh works. The upstream metro-runtime will check\n // if `location.reload` exists before falling back on an implementation that is nearly identical to\n // this. The main difference is that on iOS there is a \"reason\" message sent, but at the time of writing\n // this, that message is unused (ref: `RCTTriggerReloadCommandNotification`).\n const DevSettings = (require('react-native') as typeof import('react-native'))\n .DevSettings;\n return DevSettings.reload();\n } else {\n throw new DOMException(`Cannot call \"location.reload()\".`, 'NotSupportedError');\n }\n },\n enumerable: true,\n },\n replace: {\n value: function replace() {\n throw new DOMException(`Cannot call \"location.replace()\".`, 'NotSupportedError');\n },\n enumerable: true,\n },\n toString: {\n value: function toString() {\n return url.href;\n },\n enumerable: true,\n },\n [Symbol.for('Expo.privateCustomInspect')]: {\n value(inspect: any) {\n const object = {\n hash: this.hash,\n host: this.host,\n hostname: this.hostname,\n href: this.href,\n origin: this.origin,\n pathname: this.pathname,\n port: this.port,\n protocol: this.protocol,\n search: this.search,\n };\n return `${this.constructor.name} ${inspect(object)}`;\n },\n },\n });\n }\n}\n\nObject.defineProperties(Location.prototype, {\n [Symbol.toString()]: {\n value: 'Location',\n configurable: true,\n },\n});\n\nlet location: Location | undefined = undefined;\n\nexport function setLocationHref(href: string) {\n location = new Location(href);\n}\n\nexport function install() {\n Object.defineProperty(global, 'Location', {\n value: Location,\n configurable: true,\n writable: true,\n });\n\n Object.defineProperty(window, 'location', {\n get() {\n return location;\n },\n set() {\n throw new DOMException(`Cannot set \"location\".`, 'NotSupportedError');\n },\n enumerable: true,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.native.js","sourceRoot":"","sources":["../../src/location/install.native.ts"],"names":[],"mappings":";;;;;AAAA,wFAAwF;AACxF,sDAAoD;AAEpD,oEAAuC;AAEvC,yCAAsD;AACtD,mEAA2C;AAE3C,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,MAAM,QAAQ,GAAG,wBAAS,CAAC,UAAwC,CAAC;AAEpE,mEAAmE;AACnE,uEAAuE;AACvE,2EAA2E;AAC3E,SAAS,iCAAiC,CAAC,UAAkB;IAC3D,IAAI,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"install.native.js","sourceRoot":"","sources":["../../src/location/install.native.ts"],"names":[],"mappings":";;;;;AAAA,wFAAwF;AACxF,sDAAoD;AAEpD,oEAAuC;AAEvC,yCAAsD;AACtD,mEAA2C;AAE3C,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,MAAM,QAAQ,GAAG,wBAAS,CAAC,UAAwC,CAAC;AAEpE,mEAAmE;AACnE,uEAAuE;AACvE,2EAA2E;AAC3E,SAAS,iCAAiC,CAAC,UAAkB;IAC3D,IAAI,SAAS,EAAE,CAAC;QACd,OAAO;IACT,CAAC;IACD,SAAS,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QACrC,OAAO,CAAC,IAAI,CACV,+BAA+B,UAAU,+RAA+R,CACzU,CAAC;IACJ,CAAC;AACH,CAAC;AAED,sGAAsG;AACtG,+DAA+D;AAC/D,SAAS,UAAU;IACjB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC1C,8BAA8B;QAC9B,OAAO,IAAA,sBAAY,GAAE,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,kDAAkD;IAClD,MAAM,iBAAiB,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AK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC9C,CAAC;gBAED,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;YAC3E,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;IACzB,CAAC,CAAC;IAEF,MAAM,CAAC,0BAA0B,GAAG,IAAI,CAAC;IAEzC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,IAAI,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,KAAK,EAAE,CAAC;IAC9C,+CAA+C;IAC/C,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACtD,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;QACzB,IAAI,GAAG,EAAE,CAAC;YACR,IAAA,0BAAe,EAAC,GAAG,CAAC,CAAC;YACrB,IAAA,kBAAO,GAAE,CAAC;QACZ,CAAC;IACH,CAAC;IACD,iDAAiD;IACjD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE;QACrC,KAAK,EAAE,2BAA2B,CAAC,KAAK,CAAC;KAC1C,CAAC,CAAC;AACL,CAAC","sourcesContent":["// This MUST be first to ensure that `fetch` is defined in the React Native environment.\nimport 'react-native/Libraries/Core/InitializeCore';\n\nimport Constants from 'expo-constants';\n\nimport { install, setLocationHref } from './Location';\nimport getDevServer from '../getDevServer';\n\nlet hasWarned = false;\n\nconst manifest = Constants.expoConfig as Record<string, any> | null;\n\n// Add a development warning for fetch requests with relative paths\n// to ensure developers are aware of the need to configure a production\n// base URL in the Expo config (app.json) under `expo.extra.router.origin`.\nfunction warnProductionOriginNotConfigured(requestUrl: string) {\n if (hasWarned) {\n return;\n }\n hasWarned = true;\n if (!manifest?.extra?.router?.origin) {\n console.warn(\n `The relative fetch request \"${requestUrl}\" will not work in production until the Expo Router Config Plugin (app.json) is configured with the \\`origin\\` prop set to the base URL of your web server, e.g. \\`{ plugins: [[\"expo-router\", { origin: \"...\" }]] }\\`. [Learn more](https://expo.github.io/router/docs/lab/runtime-location)`\n );\n }\n}\n\n// TODO: This would be better if native and tied as close to the JS engine as possible, i.e. it should\n// reflect the exact location of the JS file that was executed.\nfunction getBaseUrl() {\n if (process.env.NODE_ENV !== 'production') {\n // e.g. http://localhost:19006\n return getDevServer().url?.replace(/\\/$/, '');\n }\n\n // TODO: Make it official by moving out of `extra`\n const productionBaseUrl = manifest?.extra?.router?.origin;\n\n if (!productionBaseUrl) {\n return null;\n }\n\n // Ensure no trailing slash\n return productionBaseUrl?.replace(/\\/$/, '');\n}\n\nfunction wrapFetchWithWindowLocation(fetch: Function & { __EXPO_BASE_URL_POLYFILLED?: boolean }) {\n if (fetch.__EXPO_BASE_URL_POLYFILLED) {\n return fetch;\n }\n\n const _fetch = (...props: any[]) => {\n if (props[0] && typeof props[0] === 'string' && props[0].startsWith('/')) {\n if (process.env.NODE_ENV !== 'production') {\n warnProductionOriginNotConfigured(props[0]);\n }\n\n props[0] = new URL(props[0], window.location?.origin).toString();\n } else if (props[0] && typeof props[0] === 'object') {\n if (props[0].url && typeof props[0].url === 'string' && props[0].url.startsWith('/')) {\n if (process.env.NODE_ENV !== 'production') {\n warnProductionOriginNotConfigured(props[0]);\n }\n\n props[0].url = new URL(props[0].url, window.location?.origin).toString();\n }\n }\n return fetch(...props);\n };\n\n _fetch.__EXPO_BASE_URL_POLYFILLED = true;\n\n return _fetch;\n}\n\nif (manifest?.extra?.router?.origin !== false) {\n // Polyfill window.location in native runtimes.\n if (typeof window !== 'undefined' && !window.location) {\n const url = getBaseUrl();\n if (url) {\n setLocationHref(url);\n install();\n }\n }\n // Polyfill native fetch to support relative URLs\n Object.defineProperty(global, 'fetch', {\n value: wrapFetchWithWindowLocation(fetch),\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageSocket.js","sourceRoot":"","sources":["../src/messageSocket.ts"],"names":[],"mappings":"AAAA,wBAAwB;AAExB,yEAAyE;AACzE,+CAA+C;AAE/C,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AACtE,MAAM,aAAa,GAAG,IAAI,SAAS,CAAC,GAAG,QAAQ,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,CAAC;AACrF,aAAa,CAAC,SAAS,GAAG,CAAC,OAAO,EAAE,EAAE;IACpC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,QAAQ,IAAI,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"messageSocket.js","sourceRoot":"","sources":["../src/messageSocket.ts"],"names":[],"mappings":"AAAA,wBAAwB;AAExB,yEAAyE;AACzE,+CAA+C;AAE/C,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AACtE,MAAM,aAAa,GAAG,IAAI,SAAS,CAAC,GAAG,QAAQ,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,CAAC;AACrF,aAAa,CAAC,SAAS,GAAG,CAAC,OAAO,EAAE,EAAE;IACpC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;QACpB,KAAK,gBAAgB;YACnB,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBACzB,KAAK,QAAQ;oBACX,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;oBACzB,MAAM;YACV,CAAC;YACD,MAAM;QACR,KAAK,QAAQ;YACX,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACzB,MAAM;QACR,KAAK,SAAS;YACZ,QAAQ;YACR,MAAM;IACV,CAAC;AACH,CAAC,CAAC","sourcesContent":["/* eslint-env browser */\n\n// Setup websocket messages for reloading the page from the command line.\n// This is normally setup on the native client.\n\nconst protocol = window.location.protocol === 'https:' ? 'wss' : 'ws';\nconst messageSocket = new WebSocket(`${protocol}://${window.location.host}/message`);\nmessageSocket.onmessage = (message) => {\n const data = JSON.parse(String(message.data));\n switch (data.method) {\n case 'sendDevCommand':\n switch (data.params.name) {\n case 'reload':\n window.location.reload();\n break;\n }\n break;\n case 'reload':\n window.location.reload();\n break;\n case 'devMenu':\n // no-op\n break;\n }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupFastRefresh.js","sourceRoot":"","sources":["../src/setupFastRefresh.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,MAAM,mBAAmB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAC7D,mBAAmB,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,OAAO,GAAG;IACd,kBAAkB;QAChB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACpB,CAAC;IAED,mCAAmC,EAAE,mBAAmB,CAAC,mCAAmC;IAE5F,qBAAqB,EAAE,mBAAmB,CAAC,qBAAqB;IAEhE,eAAe,EAAE,mBAAmB,CAAC,eAAe;IAEpD,QAAQ,EAAE,mBAAmB,CAAC,QAAQ;IAEtC,mBAAmB;QACjB,IAAI,mBAAmB,CAAC,sBAAsB,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"setupFastRefresh.js","sourceRoot":"","sources":["../src/setupFastRefresh.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,MAAM,mBAAmB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAC7D,mBAAmB,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,OAAO,GAAG;IACd,kBAAkB;QAChB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACpB,CAAC;IAED,mCAAmC,EAAE,mBAAmB,CAAC,mCAAmC;IAE5F,qBAAqB,EAAE,mBAAmB,CAAC,qBAAqB;IAEhE,eAAe,EAAE,mBAAmB,CAAC,eAAe;IAEpD,QAAQ,EAAE,mBAAmB,CAAC,QAAQ;IAEtC,mBAAmB;QACjB,IAAI,mBAAmB,CAAC,sBAAsB,EAAE,EAAE,CAAC;YACjD,QAAQ,CAAC,MAAM,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QACD,mBAAmB,CAAC,mBAAmB,EAAE,CAAC;IAC5C,CAAC;CACF,CAAC;AAEF,oFAAoF;AACpF,mFAAmF;AACnF,MAAM,CAAC,CAAC,MAAM,CAAC,uBAAuB,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,GAAG,OAAO,CAAC","sourcesContent":["// This needs to run before the renderer initializes.\n\nconst ReactRefreshRuntime = require('react-refresh/runtime');\nReactRefreshRuntime.injectIntoGlobalHook(global);\n\nconst Refresh = {\n performFullRefresh() {\n location.reload();\n },\n\n createSignatureFunctionForTransform: ReactRefreshRuntime.createSignatureFunctionForTransform,\n\n isLikelyComponentType: ReactRefreshRuntime.isLikelyComponentType,\n\n getFamilyByType: ReactRefreshRuntime.getFamilyByType,\n\n register: ReactRefreshRuntime.register,\n\n performReactRefresh() {\n if (ReactRefreshRuntime.hasUnrecoverableErrors()) {\n location.reload();\n return;\n }\n ReactRefreshRuntime.performReactRefresh();\n },\n};\n\n// The metro require polyfill can not have dependencies (applies for all polyfills).\n// Expose `Refresh` by assigning it to global to make it available in the polyfill.\nglobal[(global.__METRO_GLOBAL_PREFIX__ || '') + '__ReactRefresh'] = Refresh;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/metro-runtime",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Tools for making advanced Metro bundler features work",
|
|
5
5
|
"sideEffects": true,
|
|
6
6
|
"types": "build",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react-native": "*"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "4165b8d72e1b9a1889c2767534cc619e21468110"
|
|
40
40
|
}
|
package/src/HMRClient.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Platform } from 'react-native';
|
|
10
9
|
// @ts-expect-error
|
|
11
10
|
import Networking from 'react-native/Libraries/Network/RCTNetworking';
|
|
12
11
|
|
|
@@ -56,7 +55,7 @@ export function fetchAsync(
|
|
|
56
55
|
'asyncRequest',
|
|
57
56
|
url,
|
|
58
57
|
{
|
|
59
|
-
'expo-platform':
|
|
58
|
+
'expo-platform': process.env.EXPO_OS,
|
|
60
59
|
},
|
|
61
60
|
'',
|
|
62
61
|
'text',
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
+
|
|
8
|
+
const currentSrc =
|
|
9
|
+
typeof document !== 'undefined' && document.currentScript
|
|
10
|
+
? ('src' in document.currentScript && document.currentScript.src) || null
|
|
11
|
+
: null;
|
|
12
|
+
|
|
7
13
|
// Basically `__webpack_require__.l`.
|
|
8
14
|
export function fetchThenEvalAsync(
|
|
9
15
|
url: string,
|
|
@@ -13,7 +19,7 @@ export function fetchThenEvalAsync(
|
|
|
13
19
|
crossOrigin,
|
|
14
20
|
}: { scriptType?: string; nonce?: string; crossOrigin?: string } = {}
|
|
15
21
|
): Promise<void> {
|
|
16
|
-
if (typeof
|
|
22
|
+
if (typeof window === 'undefined') {
|
|
17
23
|
return require('./fetchThenEvalJs').fetchThenEvalAsync(url);
|
|
18
24
|
}
|
|
19
25
|
return new Promise<void>((resolve, reject) => {
|
|
@@ -59,7 +65,15 @@ export function fetchThenEvalAsync(
|
|
|
59
65
|
script.parentNode && script.parentNode.removeChild(script);
|
|
60
66
|
reject(error);
|
|
61
67
|
};
|
|
62
|
-
|
|
68
|
+
|
|
69
|
+
if (script.src === currentSrc) {
|
|
70
|
+
// NOTE(kitten): We always prevent `fetchThenEval` from loading the "current script".
|
|
71
|
+
// This points at our entrypoint bundle, and we should never reload and reevaluate the
|
|
72
|
+
// entrypoint bundle
|
|
73
|
+
resolve();
|
|
74
|
+
} else {
|
|
75
|
+
document.head.appendChild(script);
|
|
76
|
+
}
|
|
63
77
|
});
|
|
64
78
|
}
|
|
65
79
|
|
|
@@ -20,10 +20,9 @@ export async function loadBundleAsync(bundlePath: string): Promise<void> {
|
|
|
20
20
|
if (process.env.NODE_ENV === 'production') {
|
|
21
21
|
return fetchThenEvalAsync(requestUrl);
|
|
22
22
|
} else {
|
|
23
|
-
const Platform = require('react-native').Platform;
|
|
24
23
|
const LoadingView = require('../LoadingView')
|
|
25
24
|
.default as typeof import('../LoadingView').default;
|
|
26
|
-
if (
|
|
25
|
+
if (process.env.EXPO_OS !== 'web') {
|
|
27
26
|
// Send a signal to the `expo` package to show the loading indicator.
|
|
28
27
|
LoadingView.showMessage('Downloading...', 'load');
|
|
29
28
|
}
|
|
@@ -35,7 +34,7 @@ export async function loadBundleAsync(bundlePath: string): Promise<void> {
|
|
|
35
34
|
HMRClient.registerBundle(requestUrl);
|
|
36
35
|
})
|
|
37
36
|
.finally(() => {
|
|
38
|
-
if (!--pendingRequests &&
|
|
37
|
+
if (!--pendingRequests && process.env.EXPO_OS !== 'web') {
|
|
39
38
|
LoadingView.hide();
|
|
40
39
|
}
|
|
41
40
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
2
|
|
|
4
3
|
import { LogBoxLog } from './LogBoxLog';
|
|
5
4
|
|
|
@@ -18,7 +17,7 @@ export function useLogs(): {
|
|
|
18
17
|
} {
|
|
19
18
|
const logs = React.useContext(LogContext);
|
|
20
19
|
if (!logs) {
|
|
21
|
-
if (
|
|
20
|
+
if (process.env.EXPO_OS === 'web' && typeof window !== 'undefined') {
|
|
22
21
|
// Logbox data that is pre-fetched on the dev server and rendered here.
|
|
23
22
|
const expoCliStaticErrorElement = document.getElementById('_expo-static-error');
|
|
24
23
|
if (expoCliStaticErrorElement?.textContent) {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export const CODE_FONT =
|
|
2
|
+
process.env.EXPO_OS === 'ios'
|
|
3
|
+
? // iOS
|
|
4
|
+
'Courier New'
|
|
5
|
+
: process.env.EXPO_OS === 'android'
|
|
6
|
+
? // Android
|
|
7
|
+
'monospace'
|
|
8
|
+
: // Default
|
|
9
|
+
'Courier';
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
// TODO: This will break tree shaking due to how we transpile this package.
|
|
3
|
-
import { Platform } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import ErrorToastContainer from './toast/ErrorToastContainer';
|
|
6
|
-
|
|
7
|
-
declare const process: any;
|
|
8
2
|
|
|
9
3
|
if (!global.setImmediate) {
|
|
10
4
|
global.setImmediate = function (fn) {
|
|
@@ -12,18 +6,19 @@ if (!global.setImmediate) {
|
|
|
12
6
|
};
|
|
13
7
|
}
|
|
14
8
|
|
|
15
|
-
if (process.env.NODE_ENV === 'development') {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
require('./LogBox').default.install();
|
|
20
|
-
}
|
|
9
|
+
if (process.env.NODE_ENV === 'development' && process.env.EXPO_OS === 'web') {
|
|
10
|
+
// Stack traces are big with React Navigation
|
|
11
|
+
require('./LogBox').default.install();
|
|
21
12
|
}
|
|
22
13
|
|
|
23
14
|
export function withErrorOverlay(Comp: React.ComponentType<any>) {
|
|
24
15
|
if (process.env.NODE_ENV === 'production') {
|
|
25
16
|
return Comp;
|
|
26
17
|
}
|
|
18
|
+
|
|
19
|
+
const { default: ErrorToastContainer } =
|
|
20
|
+
require('./toast/ErrorToastContainer') as typeof import('./toast/ErrorToastContainer');
|
|
21
|
+
|
|
27
22
|
return function ErrorOverlay(props: any) {
|
|
28
23
|
return (
|
|
29
24
|
<ErrorToastContainer>
|
|
@@ -54,8 +54,8 @@ function FooterButton({ text, onPress }: { onPress: () => void; text: string })
|
|
|
54
54
|
backgroundColor: pressed
|
|
55
55
|
? '#323232'
|
|
56
56
|
: hovered
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
? '#111111'
|
|
58
|
+
: LogBoxStyle.getBackgroundColor(),
|
|
59
59
|
},
|
|
60
60
|
]}>
|
|
61
61
|
<View style={buttonStyles.content}>
|
|
@@ -5,6 +5,9 @@
|
|
|
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
|
+
|
|
9
|
+
'use client';
|
|
10
|
+
|
|
8
11
|
import React, { useEffect, useState } from 'react';
|
|
9
12
|
import { Animated, Easing, GestureResponderEvent, StyleSheet, Text } from 'react-native';
|
|
10
13
|
|
|
@@ -51,8 +51,8 @@ export function ErrorToast(props: Props) {
|
|
|
51
51
|
backgroundColor: pressed
|
|
52
52
|
? '#323232'
|
|
53
53
|
: hovered
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
? '#111111'
|
|
55
|
+
: LogBoxStyle.getBackgroundColor(),
|
|
56
56
|
},
|
|
57
57
|
]}>
|
|
58
58
|
<Count count={totalLogCount} level={level} />
|