one 1.15.10 → 1.16.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/dist/cjs/cli/build.cjs +98 -58
- package/dist/cjs/cli/build.native.js +106 -63
- package/dist/cjs/cli/build.native.js.map +1 -1
- package/dist/cjs/cli/buildPage.cjs +3 -3
- package/dist/cjs/cli/buildPage.native.js +3 -3
- package/dist/cjs/cli/buildPage.native.js.map +1 -1
- package/dist/cjs/constants.cjs +2 -0
- package/dist/cjs/constants.native.js +2 -0
- package/dist/cjs/constants.native.js.map +1 -1
- package/dist/cjs/createAPIRoute.native.js.map +1 -1
- package/dist/cjs/createApp.cjs +2 -6
- package/dist/cjs/createHandleRequest.cjs +2 -2
- package/dist/cjs/createHandleRequest.native.js +2 -2
- package/dist/cjs/createHandleRequest.native.js.map +1 -1
- package/dist/cjs/hooks.cjs +5 -1
- package/dist/cjs/hooks.native.js +7 -1
- package/dist/cjs/hooks.native.js.map +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/metro-config/getViteMetroPluginOptions.cjs +10 -7
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js +13 -10
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
- package/dist/cjs/metro-config/getViteMetroPluginOptions.test.cjs +23 -0
- package/dist/cjs/metro-config/getViteMetroPluginOptions.test.native.js +26 -0
- package/dist/cjs/metro-config/getViteMetroPluginOptions.test.native.js.map +1 -0
- package/dist/cjs/router/Route.cjs +21 -1
- package/dist/cjs/router/Route.native.js +22 -1
- package/dist/cjs/router/Route.native.js.map +1 -1
- package/dist/cjs/router/interceptRoutes.cjs +6 -6
- package/dist/cjs/router/interceptRoutes.native.js +6 -6
- package/dist/cjs/router/interceptRoutes.native.js.map +1 -1
- package/dist/cjs/router/params.cjs +46 -0
- package/dist/cjs/router/params.native.js +70 -0
- package/dist/cjs/router/params.native.js.map +1 -0
- package/dist/cjs/router/useScreens.cjs +3 -0
- package/dist/cjs/router/useScreens.native.js +2 -0
- package/dist/cjs/router/useScreens.native.js.map +1 -1
- package/dist/cjs/serve-worker.native.js.map +1 -1
- package/dist/cjs/server/getServerManifest.cjs +6 -6
- package/dist/cjs/server/getServerManifest.native.js +6 -6
- package/dist/cjs/server/getServerManifest.native.js.map +1 -1
- package/dist/cjs/server/oneServe.cjs +9 -5
- package/dist/cjs/server/oneServe.native.js +9 -5
- package/dist/cjs/server/oneServe.native.js.map +1 -1
- package/dist/cjs/server/workerHandler.cjs +2 -2
- package/dist/cjs/server/workerHandler.native.js +2 -2
- package/dist/cjs/server/workerHandler.native.js.map +1 -1
- package/dist/cjs/skewProtection.cjs +48 -7
- package/dist/cjs/skewProtection.native.js +48 -7
- package/dist/cjs/skewProtection.native.js.map +1 -1
- package/dist/cjs/useLoader.cjs +67 -69
- package/dist/cjs/useLoader.native.js +113 -117
- package/dist/cjs/useLoader.native.js.map +1 -1
- package/dist/cjs/utils/dynamicImport.cjs +3 -1
- package/dist/cjs/utils/dynamicImport.native.js +22 -1
- package/dist/cjs/utils/dynamicImport.native.js.map +1 -1
- package/dist/cjs/utils/toAbsolute.cjs +5 -2
- package/dist/cjs/utils/toAbsolute.native.js +6 -1
- package/dist/cjs/utils/toAbsolute.native.js.map +1 -1
- package/dist/cjs/utils/workerImport.cjs +1 -1
- package/dist/cjs/utils/workerImport.native.js +1 -1
- package/dist/cjs/utils/workerImport.native.js.map +1 -1
- package/dist/cjs/views/RootErrorBoundary.cjs +114 -117
- package/dist/cjs/views/RootErrorBoundary.native.js +126 -146
- package/dist/cjs/views/RootErrorBoundary.native.js.map +1 -1
- package/dist/cjs/views/Try.cjs +17 -18
- package/dist/cjs/views/Try.native.js +28 -42
- package/dist/cjs/views/Try.native.js.map +1 -1
- package/dist/cjs/vite/plugins/criticalCSSPlugin.cjs +2 -1
- package/dist/cjs/vite/plugins/criticalCSSPlugin.native.js +2 -1
- package/dist/cjs/vite/plugins/criticalCSSPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/criticalCSSPlugin.test.cjs +26 -20
- package/dist/cjs/vite/plugins/criticalCSSPlugin.test.native.js +28 -20
- package/dist/cjs/vite/plugins/criticalCSSPlugin.test.native.js.map +1 -1
- package/dist/cjs/vite/plugins/imageDataPlugin.cjs +3 -2
- package/dist/cjs/vite/plugins/imageDataPlugin.native.js +3 -2
- package/dist/cjs/vite/plugins/imageDataPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/imageDataPlugin.test.cjs +34 -69
- package/dist/cjs/vite/plugins/imageDataPlugin.test.native.js +34 -69
- package/dist/cjs/vite/plugins/imageDataPlugin.test.native.js.map +1 -1
- package/dist/cjs/vite/plugins/sourceInspectorPlugin.cjs +20 -2
- package/dist/cjs/vite/plugins/sourceInspectorPlugin.native.js +23 -2
- package/dist/cjs/vite/plugins/sourceInspectorPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/sourceInspectorPlugin.test.cjs +21 -0
- package/dist/cjs/vite/plugins/sourceInspectorPlugin.test.native.js +28 -0
- package/dist/cjs/vite/plugins/sourceInspectorPlugin.test.native.js.map +1 -0
- package/dist/cjs/vite/resolveResponse.cjs +7 -2
- package/dist/cjs/vite/resolveResponse.native.js +7 -2
- package/dist/cjs/vite/resolveResponse.native.js.map +1 -1
- package/dist/esm/cli/build.mjs +100 -60
- package/dist/esm/cli/build.mjs.map +1 -1
- package/dist/esm/cli/build.native.js +108 -65
- package/dist/esm/cli/build.native.js.map +1 -1
- package/dist/esm/cli/buildPage.mjs +4 -4
- package/dist/esm/cli/buildPage.mjs.map +1 -1
- package/dist/esm/cli/buildPage.native.js +4 -4
- package/dist/esm/cli/buildPage.native.js.map +1 -1
- package/dist/esm/constants.mjs +2 -1
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/constants.native.js +2 -1
- package/dist/esm/constants.native.js.map +1 -1
- package/dist/esm/createAPIRoute.mjs.map +1 -1
- package/dist/esm/createAPIRoute.native.js.map +1 -1
- package/dist/esm/createApp.mjs +2 -6
- package/dist/esm/createApp.mjs.map +1 -1
- package/dist/esm/createHandleRequest.mjs +2 -2
- package/dist/esm/createHandleRequest.mjs.map +1 -1
- package/dist/esm/createHandleRequest.native.js +2 -2
- package/dist/esm/createHandleRequest.native.js.map +1 -1
- package/dist/esm/hooks.mjs +5 -1
- package/dist/esm/hooks.mjs.map +1 -1
- package/dist/esm/hooks.native.js +7 -1
- package/dist/esm/hooks.native.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.mjs +9 -7
- package/dist/esm/metro-config/getViteMetroPluginOptions.mjs.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.native.js +12 -10
- package/dist/esm/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.test.mjs +24 -0
- package/dist/esm/metro-config/getViteMetroPluginOptions.test.mjs.map +1 -0
- package/dist/esm/metro-config/getViteMetroPluginOptions.test.native.js +24 -0
- package/dist/esm/metro-config/getViteMetroPluginOptions.test.native.js.map +1 -0
- package/dist/esm/router/Route.mjs +21 -1
- package/dist/esm/router/Route.mjs.map +1 -1
- package/dist/esm/router/Route.native.js +22 -1
- package/dist/esm/router/Route.native.js.map +1 -1
- package/dist/esm/router/interceptRoutes.mjs +7 -7
- package/dist/esm/router/interceptRoutes.mjs.map +1 -1
- package/dist/esm/router/interceptRoutes.native.js +7 -7
- package/dist/esm/router/interceptRoutes.native.js.map +1 -1
- package/dist/esm/router/params.mjs +21 -0
- package/dist/esm/router/params.mjs.map +1 -0
- package/dist/esm/router/params.native.js +42 -0
- package/dist/esm/router/params.native.js.map +1 -0
- package/dist/esm/router/useScreens.mjs +3 -0
- package/dist/esm/router/useScreens.mjs.map +1 -1
- package/dist/esm/router/useScreens.native.js +2 -0
- package/dist/esm/router/useScreens.native.js.map +1 -1
- package/dist/esm/serve-worker.mjs.map +1 -1
- package/dist/esm/serve-worker.native.js.map +1 -1
- package/dist/esm/server/getServerManifest.mjs +6 -6
- package/dist/esm/server/getServerManifest.mjs.map +1 -1
- package/dist/esm/server/getServerManifest.native.js +6 -6
- package/dist/esm/server/getServerManifest.native.js.map +1 -1
- package/dist/esm/server/oneServe.mjs +11 -7
- package/dist/esm/server/oneServe.mjs.map +1 -1
- package/dist/esm/server/oneServe.native.js +11 -7
- package/dist/esm/server/oneServe.native.js.map +1 -1
- package/dist/esm/server/workerHandler.mjs +2 -2
- package/dist/esm/server/workerHandler.mjs.map +1 -1
- package/dist/esm/server/workerHandler.native.js +2 -2
- package/dist/esm/server/workerHandler.native.js.map +1 -1
- package/dist/esm/skewProtection.mjs +48 -8
- package/dist/esm/skewProtection.mjs.map +1 -1
- package/dist/esm/skewProtection.native.js +48 -8
- package/dist/esm/skewProtection.native.js.map +1 -1
- package/dist/esm/useLoader.mjs +64 -66
- package/dist/esm/useLoader.mjs.map +1 -1
- package/dist/esm/useLoader.native.js +112 -116
- package/dist/esm/useLoader.native.js.map +1 -1
- package/dist/esm/utils/dynamicImport.mjs +1 -1
- package/dist/esm/utils/dynamicImport.mjs.map +1 -1
- package/dist/esm/utils/dynamicImport.native.js +20 -1
- package/dist/esm/utils/dynamicImport.native.js.map +1 -1
- package/dist/esm/utils/toAbsolute.mjs +3 -1
- package/dist/esm/utils/toAbsolute.mjs.map +1 -1
- package/dist/esm/utils/toAbsolute.native.js +5 -1
- package/dist/esm/utils/toAbsolute.native.js.map +1 -1
- package/dist/esm/utils/workerImport.mjs +2 -2
- package/dist/esm/utils/workerImport.mjs.map +1 -1
- package/dist/esm/utils/workerImport.native.js +2 -2
- package/dist/esm/utils/workerImport.native.js.map +1 -1
- package/dist/esm/views/RootErrorBoundary.mjs +114 -117
- package/dist/esm/views/RootErrorBoundary.mjs.map +1 -1
- package/dist/esm/views/RootErrorBoundary.native.js +126 -146
- package/dist/esm/views/RootErrorBoundary.native.js.map +1 -1
- package/dist/esm/views/Try.mjs +17 -18
- package/dist/esm/views/Try.mjs.map +1 -1
- package/dist/esm/views/Try.native.js +28 -42
- package/dist/esm/views/Try.native.js.map +1 -1
- package/dist/esm/vite/plugins/criticalCSSPlugin.mjs +2 -1
- package/dist/esm/vite/plugins/criticalCSSPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/criticalCSSPlugin.native.js +2 -1
- package/dist/esm/vite/plugins/criticalCSSPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/criticalCSSPlugin.test.mjs +26 -20
- package/dist/esm/vite/plugins/criticalCSSPlugin.test.mjs.map +1 -1
- package/dist/esm/vite/plugins/criticalCSSPlugin.test.native.js +28 -20
- package/dist/esm/vite/plugins/criticalCSSPlugin.test.native.js.map +1 -1
- package/dist/esm/vite/plugins/imageDataPlugin.mjs +4 -3
- package/dist/esm/vite/plugins/imageDataPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/imageDataPlugin.native.js +4 -3
- package/dist/esm/vite/plugins/imageDataPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/imageDataPlugin.test.mjs +34 -69
- package/dist/esm/vite/plugins/imageDataPlugin.test.mjs.map +1 -1
- package/dist/esm/vite/plugins/imageDataPlugin.test.native.js +34 -69
- package/dist/esm/vite/plugins/imageDataPlugin.test.native.js.map +1 -1
- package/dist/esm/vite/plugins/sourceInspectorPlugin.mjs +19 -3
- package/dist/esm/vite/plugins/sourceInspectorPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/sourceInspectorPlugin.native.js +22 -3
- package/dist/esm/vite/plugins/sourceInspectorPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/sourceInspectorPlugin.test.mjs +22 -0
- package/dist/esm/vite/plugins/sourceInspectorPlugin.test.mjs.map +1 -0
- package/dist/esm/vite/plugins/sourceInspectorPlugin.test.native.js +26 -0
- package/dist/esm/vite/plugins/sourceInspectorPlugin.test.native.js.map +1 -0
- package/dist/esm/vite/resolveResponse.mjs +7 -2
- package/dist/esm/vite/resolveResponse.mjs.map +1 -1
- package/dist/esm/vite/resolveResponse.native.js +7 -2
- package/dist/esm/vite/resolveResponse.native.js.map +1 -1
- package/expo-plugin.cjs +1 -0
- package/package.json +15 -10
- package/react-native-commands.cjs +1 -0
- package/src/cli/build.ts +156 -99
- package/src/cli/buildPage.ts +4 -4
- package/src/constants.ts +15 -0
- package/src/createAPIRoute.ts +35 -2
- package/src/createApp.tsx +2 -6
- package/src/createHandleRequest.ts +6 -2
- package/src/hooks.tsx +9 -1
- package/src/index.ts +8 -1
- package/src/metro-config/getViteMetroPluginOptions.test.ts +34 -0
- package/src/metro-config/getViteMetroPluginOptions.ts +14 -11
- package/src/router/Route.tsx +52 -2
- package/src/router/interceptRoutes.ts +7 -7
- package/src/router/params.ts +32 -0
- package/src/router/useScreens.tsx +18 -0
- package/src/serve-worker.ts +4 -2
- package/src/server/getServerManifest.ts +11 -7
- package/src/server/oneServe.ts +12 -14
- package/src/server/workerHandler.ts +13 -2
- package/src/skewProtection.ts +45 -5
- package/src/useLoader.ts +6 -4
- package/src/utils/dynamicImport.ts +2 -2
- package/src/utils/toAbsolute.ts +5 -0
- package/src/utils/workerImport.ts +2 -2
- package/src/views/RootErrorBoundary.tsx +18 -0
- package/src/views/Try.tsx +18 -0
- package/src/vite/plugins/criticalCSSPlugin.test.ts +34 -24
- package/src/vite/plugins/criticalCSSPlugin.ts +3 -2
- package/src/vite/plugins/imageDataPlugin.test.ts +39 -83
- package/src/vite/plugins/imageDataPlugin.ts +5 -4
- package/src/vite/plugins/sourceInspectorPlugin.test.ts +40 -0
- package/src/vite/plugins/sourceInspectorPlugin.ts +30 -2
- package/src/vite/resolveResponse.ts +6 -2
- package/types/cli/build.d.ts.map +1 -1
- package/types/constants.d.ts +9 -0
- package/types/constants.d.ts.map +1 -1
- package/types/createAPIRoute.d.ts +28 -3
- package/types/createAPIRoute.d.ts.map +1 -1
- package/types/createApp.d.ts.map +1 -1
- package/types/createHandleRequest.d.ts +1 -1
- package/types/createHandleRequest.d.ts.map +1 -1
- package/types/headless-server.d.ts +1 -1
- package/types/hooks.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/metro-config/getViteMetroPluginOptions.d.ts +5 -0
- package/types/metro-config/getViteMetroPluginOptions.d.ts.map +1 -1
- package/types/metro-config/getViteMetroPluginOptions.test.d.ts +2 -0
- package/types/metro-config/getViteMetroPluginOptions.test.d.ts.map +1 -0
- package/types/router/Route.d.ts +1 -0
- package/types/router/Route.d.ts.map +1 -1
- package/types/router/params.d.ts +3 -0
- package/types/router/params.d.ts.map +1 -0
- package/types/router/useScreens.d.ts.map +1 -1
- package/types/serve-worker.d.ts +5 -3
- package/types/serve-worker.d.ts.map +1 -1
- package/types/server/getServerManifest.d.ts.map +1 -1
- package/types/server/oneServe.d.ts.map +1 -1
- package/types/server/workerHandler.d.ts +1 -1
- package/types/server/workerHandler.d.ts.map +1 -1
- package/types/skewProtection.d.ts +1 -0
- package/types/skewProtection.d.ts.map +1 -1
- package/types/useLoader.d.ts.map +1 -1
- package/types/utils/dynamicImport.d.ts +2 -0
- package/types/utils/dynamicImport.d.ts.map +1 -1
- package/types/utils/toAbsolute.d.ts +3 -0
- package/types/utils/toAbsolute.d.ts.map +1 -1
- package/types/views/RootErrorBoundary.d.ts.map +1 -1
- package/types/views/Try.d.ts.map +1 -1
- package/types/vite/plugins/criticalCSSPlugin.d.ts.map +1 -1
- package/types/vite/plugins/imageDataPlugin.d.ts.map +1 -1
- package/types/vite/plugins/sourceInspectorPlugin.d.ts +2 -0
- package/types/vite/plugins/sourceInspectorPlugin.d.ts.map +1 -1
- package/types/vite/plugins/sourceInspectorPlugin.test.d.ts +2 -0
- package/types/vite/plugins/sourceInspectorPlugin.test.d.ts.map +1 -0
- package/types/vite/resolveResponse.d.ts +1 -1
- package/types/vite/resolveResponse.d.ts.map +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Platform, Text, View } from "react-native-web";
|
|
3
|
+
import { checkSkewAndReload } from "../skewProtection.mjs";
|
|
4
|
+
import { handleSkewError, isChunkLoadError } from "../utils/dynamicImport.mjs";
|
|
3
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
6
|
class RootErrorBoundary extends React.Component {
|
|
5
7
|
state = {
|
|
@@ -20,20 +22,19 @@ class RootErrorBoundary extends React.Component {
|
|
|
20
22
|
console.error(`[One] Root error boundary caught error:
|
|
21
23
|
${printError(error)}
|
|
22
24
|
${info.componentStack}`);
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
25
|
+
if (process.env.NODE_ENV === "production" && process.env.ONE_SKEW_PROTECTION !== "false") if (isChunkLoadError(error)) handleSkewError();else checkSkewAndReload();
|
|
26
|
+
if (typeof window !== "undefined" && typeof CustomEvent !== "undefined") window.dispatchEvent(new CustomEvent("one-error", {
|
|
27
|
+
detail: {
|
|
28
|
+
error: {
|
|
29
|
+
message: error.message,
|
|
30
|
+
stack: error.stack,
|
|
31
|
+
name: error.name
|
|
32
|
+
},
|
|
33
|
+
componentStack: info.componentStack,
|
|
34
|
+
timestamp: Date.now(),
|
|
35
|
+
type: "render"
|
|
36
|
+
}
|
|
37
|
+
}));
|
|
37
38
|
}
|
|
38
39
|
handleRetry = () => {
|
|
39
40
|
this.setState({
|
|
@@ -49,120 +50,116 @@ ${info.componentStack}`);
|
|
|
49
50
|
componentStack
|
|
50
51
|
} = this.state;
|
|
51
52
|
const isDev = process.env.NODE_ENV === "development";
|
|
52
|
-
if (Platform.OS === "web") {
|
|
53
|
-
|
|
53
|
+
if (Platform.OS === "web") return /* @__PURE__ */jsx("div", {
|
|
54
|
+
style: {
|
|
55
|
+
minHeight: "100vh",
|
|
56
|
+
display: "flex",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
justifyContent: "center",
|
|
59
|
+
backgroundColor: "#0a0a0f",
|
|
60
|
+
fontFamily: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif",
|
|
61
|
+
color: "#e8e8e8",
|
|
62
|
+
padding: 24
|
|
63
|
+
},
|
|
64
|
+
children: /* @__PURE__ */jsxs("div", {
|
|
54
65
|
style: {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
justifyContent: "center",
|
|
59
|
-
backgroundColor: "#0a0a0f",
|
|
60
|
-
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
|
|
61
|
-
color: "#e8e8e8",
|
|
62
|
-
padding: 24
|
|
66
|
+
maxWidth: 500,
|
|
67
|
+
width: "100%",
|
|
68
|
+
textAlign: "center"
|
|
63
69
|
},
|
|
64
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */jsx("div", {
|
|
65
71
|
style: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
width: 64,
|
|
73
|
+
height: 64,
|
|
74
|
+
backgroundColor: "#ef4444",
|
|
75
|
+
borderRadius: "50%",
|
|
76
|
+
display: "flex",
|
|
77
|
+
alignItems: "center",
|
|
78
|
+
justifyContent: "center",
|
|
79
|
+
margin: "0 auto 24px"
|
|
69
80
|
},
|
|
70
|
-
children:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
81
|
+
children: /* @__PURE__ */jsxs("svg", {
|
|
82
|
+
width: "32",
|
|
83
|
+
height: "32",
|
|
84
|
+
viewBox: "0 0 24 24",
|
|
85
|
+
fill: "none",
|
|
86
|
+
stroke: "white",
|
|
87
|
+
strokeWidth: "2",
|
|
88
|
+
children: [/* @__PURE__ */jsx("circle", {
|
|
89
|
+
cx: "12",
|
|
90
|
+
cy: "12",
|
|
91
|
+
r: "10"
|
|
92
|
+
}), /* @__PURE__ */jsx("line", {
|
|
93
|
+
x1: "12",
|
|
94
|
+
y1: "8",
|
|
95
|
+
x2: "12",
|
|
96
|
+
y2: "12"
|
|
97
|
+
}), /* @__PURE__ */jsx("line", {
|
|
98
|
+
x1: "12",
|
|
99
|
+
y1: "16",
|
|
100
|
+
x2: "12.01",
|
|
101
|
+
y2: "16"
|
|
102
|
+
})]
|
|
103
|
+
})
|
|
104
|
+
}), /* @__PURE__ */jsx("h1", {
|
|
105
|
+
style: {
|
|
106
|
+
fontSize: 24,
|
|
107
|
+
fontWeight: 600,
|
|
108
|
+
marginBottom: 8
|
|
109
|
+
},
|
|
110
|
+
children: "Something went wrong"
|
|
111
|
+
}), /* @__PURE__ */jsx("p", {
|
|
112
|
+
style: {
|
|
113
|
+
fontSize: 14,
|
|
114
|
+
color: "#888",
|
|
115
|
+
marginBottom: 24
|
|
116
|
+
},
|
|
117
|
+
children: error?.message || "An unexpected error occurred"
|
|
118
|
+
}), /* @__PURE__ */jsxs("div", {
|
|
119
|
+
style: {
|
|
120
|
+
display: "flex",
|
|
121
|
+
gap: 12,
|
|
122
|
+
justifyContent: "center"
|
|
123
|
+
},
|
|
124
|
+
children: [/* @__PURE__ */jsx("button", {
|
|
125
|
+
onClick: this.handleRetry,
|
|
112
126
|
style: {
|
|
127
|
+
padding: "12px 24px",
|
|
128
|
+
backgroundColor: "#3b82f6",
|
|
129
|
+
color: "white",
|
|
130
|
+
border: "none",
|
|
131
|
+
borderRadius: 8,
|
|
113
132
|
fontSize: 14,
|
|
114
|
-
|
|
115
|
-
|
|
133
|
+
fontWeight: 500,
|
|
134
|
+
cursor: "pointer"
|
|
116
135
|
},
|
|
117
|
-
children:
|
|
118
|
-
}), /* @__PURE__ */
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
gap: 12,
|
|
122
|
-
justifyContent: "center"
|
|
136
|
+
children: "Try Again"
|
|
137
|
+
}), /* @__PURE__ */jsx("button", {
|
|
138
|
+
onClick: () => {
|
|
139
|
+
if (typeof window !== "undefined") window.location.href = "/";
|
|
123
140
|
},
|
|
124
|
-
children: [/* @__PURE__ */jsx("button", {
|
|
125
|
-
onClick: this.handleRetry,
|
|
126
|
-
style: {
|
|
127
|
-
padding: "12px 24px",
|
|
128
|
-
backgroundColor: "#3b82f6",
|
|
129
|
-
color: "white",
|
|
130
|
-
border: "none",
|
|
131
|
-
borderRadius: 8,
|
|
132
|
-
fontSize: 14,
|
|
133
|
-
fontWeight: 500,
|
|
134
|
-
cursor: "pointer"
|
|
135
|
-
},
|
|
136
|
-
children: "Try Again"
|
|
137
|
-
}), /* @__PURE__ */jsx("button", {
|
|
138
|
-
onClick: () => {
|
|
139
|
-
if (typeof window !== "undefined") {
|
|
140
|
-
window.location.href = "/";
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
style: {
|
|
144
|
-
padding: "12px 24px",
|
|
145
|
-
backgroundColor: "transparent",
|
|
146
|
-
color: "#888",
|
|
147
|
-
border: "1px solid #3a3a5a",
|
|
148
|
-
borderRadius: 8,
|
|
149
|
-
fontSize: 14,
|
|
150
|
-
fontWeight: 500,
|
|
151
|
-
cursor: "pointer"
|
|
152
|
-
},
|
|
153
|
-
children: "Go Home"
|
|
154
|
-
})]
|
|
155
|
-
}), isDev && /* @__PURE__ */jsx("p", {
|
|
156
141
|
style: {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
142
|
+
padding: "12px 24px",
|
|
143
|
+
backgroundColor: "transparent",
|
|
144
|
+
color: "#888",
|
|
145
|
+
border: "1px solid #3a3a5a",
|
|
146
|
+
borderRadius: 8,
|
|
147
|
+
fontSize: 14,
|
|
148
|
+
fontWeight: 500,
|
|
149
|
+
cursor: "pointer"
|
|
160
150
|
},
|
|
161
|
-
children: "
|
|
151
|
+
children: "Go Home"
|
|
162
152
|
})]
|
|
163
|
-
})
|
|
164
|
-
|
|
165
|
-
|
|
153
|
+
}), isDev && /* @__PURE__ */jsx("p", {
|
|
154
|
+
style: {
|
|
155
|
+
fontSize: 11,
|
|
156
|
+
color: "#666",
|
|
157
|
+
marginTop: 24
|
|
158
|
+
},
|
|
159
|
+
children: "Press Alt+E to view error details"
|
|
160
|
+
})]
|
|
161
|
+
})
|
|
162
|
+
});
|
|
166
163
|
return /* @__PURE__ */jsxs(View, {
|
|
167
164
|
style: {
|
|
168
165
|
flex: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","Text","View","jsx","jsxs","RootErrorBoundary","Component","state","hasError","error","componentStack","getDerivedStateFromError","componentDidCatch","info","setState","console","printError","window","CustomEvent","dispatchEvent","detail","message","stack","name","timestamp","Date","now","type","handleRetry","render","isDev","
|
|
1
|
+
{"version":3,"names":["React","Platform","Text","View","checkSkewAndReload","handleSkewError","isChunkLoadError","jsx","jsxs","RootErrorBoundary","Component","state","hasError","error","componentStack","getDerivedStateFromError","componentDidCatch","info","setState","console","printError","process","env","NODE_ENV","ONE_SKEW_PROTECTION","window","CustomEvent","dispatchEvent","detail","message","stack","name","timestamp","Date","now","type","handleRetry","render","isDev","OS","style","minHeight","display","alignItems","justifyContent","backgroundColor","fontFamily","color","padding","children","maxWidth","width","textAlign","height","borderRadius","margin","viewBox","fill","stroke","strokeWidth","cx","cy","r","x1","y1","x2","y2","fontSize","fontWeight","marginBottom","gap","onClick","border","cursor","location","href","marginTop","flex","props","err","Error","String"],"sources":["../../../src/views/RootErrorBoundary.tsx"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Platform, Text, View } from "react-native";
|
|
4
|
+
import { checkSkewAndReload } from "../skewProtection.native.js";
|
|
5
|
+
import { handleSkewError, isChunkLoadError } from "../utils/dynamicImport.native.js";
|
|
4
6
|
function _assert_this_initialized(self) {
|
|
5
|
-
if (self === void 0)
|
|
6
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
7
|
-
}
|
|
7
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
8
8
|
return self;
|
|
9
9
|
}
|
|
10
10
|
function _call_super(_this, derived, args) {
|
|
@@ -12,9 +12,7 @@ function _call_super(_this, derived, args) {
|
|
|
12
12
|
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
13
13
|
}
|
|
14
14
|
function _class_call_check(instance, Constructor) {
|
|
15
|
-
if (!(instance instanceof Constructor))
|
|
16
|
-
throw new TypeError("Cannot call a class as a function");
|
|
17
|
-
}
|
|
15
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
18
16
|
}
|
|
19
17
|
function _defineProperties(target, props) {
|
|
20
18
|
for (var i = 0; i < props.length; i++) {
|
|
@@ -31,16 +29,12 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
31
29
|
return Constructor;
|
|
32
30
|
}
|
|
33
31
|
function _define_property(obj, key, value) {
|
|
34
|
-
if (key in obj) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
} else {
|
|
42
|
-
obj[key] = value;
|
|
43
|
-
}
|
|
32
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
33
|
+
value,
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true
|
|
37
|
+
});else obj[key] = value;
|
|
44
38
|
return obj;
|
|
45
39
|
}
|
|
46
40
|
function _get_prototype_of(o) {
|
|
@@ -50,9 +44,7 @@ function _get_prototype_of(o) {
|
|
|
50
44
|
return _get_prototype_of(o);
|
|
51
45
|
}
|
|
52
46
|
function _inherits(subClass, superClass) {
|
|
53
|
-
if (typeof superClass !== "function" && superClass !== null)
|
|
54
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
55
|
-
}
|
|
47
|
+
if (typeof superClass !== "function" && superClass !== null) throw new TypeError("Super expression must either be null or a function");
|
|
56
48
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
57
49
|
constructor: {
|
|
58
50
|
value: subClass,
|
|
@@ -63,16 +55,10 @@ function _inherits(subClass, superClass) {
|
|
|
63
55
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
64
56
|
}
|
|
65
57
|
function _instanceof(left, right) {
|
|
66
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance])
|
|
67
|
-
return !!right[Symbol.hasInstance](left);
|
|
68
|
-
} else {
|
|
69
|
-
return left instanceof right;
|
|
70
|
-
}
|
|
58
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) return !!right[Symbol.hasInstance](left);else return left instanceof right;
|
|
71
59
|
}
|
|
72
60
|
function _possible_constructor_return(self, call) {
|
|
73
|
-
if (call && (_type_of(call) === "object" || typeof call === "function"))
|
|
74
|
-
return call;
|
|
75
|
-
}
|
|
61
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
76
62
|
return _assert_this_initialized(self);
|
|
77
63
|
}
|
|
78
64
|
function _set_prototype_of(o, p) {
|
|
@@ -101,8 +87,8 @@ var RootErrorBoundary = /* @__PURE__ */function (_React_Component) {
|
|
|
101
87
|
_inherits(RootErrorBoundary2, _React_Component);
|
|
102
88
|
function RootErrorBoundary2() {
|
|
103
89
|
_class_call_check(this, RootErrorBoundary2);
|
|
104
|
-
var _this;
|
|
105
|
-
|
|
90
|
+
var _this = _call_super(this, RootErrorBoundary2, arguments);
|
|
91
|
+
_define_property(_this, "state", {
|
|
106
92
|
hasError: false,
|
|
107
93
|
error: null,
|
|
108
94
|
componentStack: null
|
|
@@ -124,20 +110,18 @@ var RootErrorBoundary = /* @__PURE__ */function (_React_Component) {
|
|
|
124
110
|
console.error(`[One] Root error boundary caught error:
|
|
125
111
|
${printError(error)}
|
|
126
112
|
${info.componentStack}`);
|
|
127
|
-
if (typeof window !== "undefined" && typeof CustomEvent !== "undefined") {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}));
|
|
140
|
-
}
|
|
113
|
+
if (typeof window !== "undefined" && typeof CustomEvent !== "undefined") window.dispatchEvent(new CustomEvent("one-error", {
|
|
114
|
+
detail: {
|
|
115
|
+
error: {
|
|
116
|
+
message: error.message,
|
|
117
|
+
stack: error.stack,
|
|
118
|
+
name: error.name
|
|
119
|
+
},
|
|
120
|
+
componentStack: info.componentStack,
|
|
121
|
+
timestamp: Date.now(),
|
|
122
|
+
type: "render"
|
|
123
|
+
}
|
|
124
|
+
}));
|
|
141
125
|
}
|
|
142
126
|
}, {
|
|
143
127
|
key: "render",
|
|
@@ -148,120 +132,116 @@ ${info.componentStack}`);
|
|
|
148
132
|
componentStack
|
|
149
133
|
} = this.state;
|
|
150
134
|
var isDev = process.env.NODE_ENV === "development";
|
|
151
|
-
if (Platform.OS === "web") {
|
|
152
|
-
|
|
135
|
+
if (Platform.OS === "web") return /* @__PURE__ */_jsx("div", {
|
|
136
|
+
style: {
|
|
137
|
+
minHeight: "100vh",
|
|
138
|
+
display: "flex",
|
|
139
|
+
alignItems: "center",
|
|
140
|
+
justifyContent: "center",
|
|
141
|
+
backgroundColor: "#0a0a0f",
|
|
142
|
+
fontFamily: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif",
|
|
143
|
+
color: "#e8e8e8",
|
|
144
|
+
padding: 24
|
|
145
|
+
},
|
|
146
|
+
children: /* @__PURE__ */_jsxs("div", {
|
|
153
147
|
style: {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
justifyContent: "center",
|
|
158
|
-
backgroundColor: "#0a0a0f",
|
|
159
|
-
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
|
|
160
|
-
color: "#e8e8e8",
|
|
161
|
-
padding: 24
|
|
148
|
+
maxWidth: 500,
|
|
149
|
+
width: "100%",
|
|
150
|
+
textAlign: "center"
|
|
162
151
|
},
|
|
163
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: [/* @__PURE__ */_jsx("div", {
|
|
164
153
|
style: {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
154
|
+
width: 64,
|
|
155
|
+
height: 64,
|
|
156
|
+
backgroundColor: "#ef4444",
|
|
157
|
+
borderRadius: "50%",
|
|
158
|
+
display: "flex",
|
|
159
|
+
alignItems: "center",
|
|
160
|
+
justifyContent: "center",
|
|
161
|
+
margin: "0 auto 24px"
|
|
168
162
|
},
|
|
169
|
-
children:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
163
|
+
children: /* @__PURE__ */_jsxs("svg", {
|
|
164
|
+
width: "32",
|
|
165
|
+
height: "32",
|
|
166
|
+
viewBox: "0 0 24 24",
|
|
167
|
+
fill: "none",
|
|
168
|
+
stroke: "white",
|
|
169
|
+
strokeWidth: "2",
|
|
170
|
+
children: [/* @__PURE__ */_jsx("circle", {
|
|
171
|
+
cx: "12",
|
|
172
|
+
cy: "12",
|
|
173
|
+
r: "10"
|
|
174
|
+
}), /* @__PURE__ */_jsx("line", {
|
|
175
|
+
x1: "12",
|
|
176
|
+
y1: "8",
|
|
177
|
+
x2: "12",
|
|
178
|
+
y2: "12"
|
|
179
|
+
}), /* @__PURE__ */_jsx("line", {
|
|
180
|
+
x1: "12",
|
|
181
|
+
y1: "16",
|
|
182
|
+
x2: "12.01",
|
|
183
|
+
y2: "16"
|
|
184
|
+
})]
|
|
185
|
+
})
|
|
186
|
+
}), /* @__PURE__ */_jsx("h1", {
|
|
187
|
+
style: {
|
|
188
|
+
fontSize: 24,
|
|
189
|
+
fontWeight: 600,
|
|
190
|
+
marginBottom: 8
|
|
191
|
+
},
|
|
192
|
+
children: "Something went wrong"
|
|
193
|
+
}), /* @__PURE__ */_jsx("p", {
|
|
194
|
+
style: {
|
|
195
|
+
fontSize: 14,
|
|
196
|
+
color: "#888",
|
|
197
|
+
marginBottom: 24
|
|
198
|
+
},
|
|
199
|
+
children: (error === null || error === void 0 ? void 0 : error.message) || "An unexpected error occurred"
|
|
200
|
+
}), /* @__PURE__ */_jsxs("div", {
|
|
201
|
+
style: {
|
|
202
|
+
display: "flex",
|
|
203
|
+
gap: 12,
|
|
204
|
+
justifyContent: "center"
|
|
205
|
+
},
|
|
206
|
+
children: [/* @__PURE__ */_jsx("button", {
|
|
207
|
+
onClick: this.handleRetry,
|
|
211
208
|
style: {
|
|
209
|
+
padding: "12px 24px",
|
|
210
|
+
backgroundColor: "#3b82f6",
|
|
211
|
+
color: "white",
|
|
212
|
+
border: "none",
|
|
213
|
+
borderRadius: 8,
|
|
212
214
|
fontSize: 14,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
+
fontWeight: 500,
|
|
216
|
+
cursor: "pointer"
|
|
215
217
|
},
|
|
216
|
-
children:
|
|
217
|
-
}), /* @__PURE__ */
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
gap: 12,
|
|
221
|
-
justifyContent: "center"
|
|
218
|
+
children: "Try Again"
|
|
219
|
+
}), /* @__PURE__ */_jsx("button", {
|
|
220
|
+
onClick: function () {
|
|
221
|
+
if (typeof window !== "undefined") window.location.href = "/";
|
|
222
222
|
},
|
|
223
|
-
children: [/* @__PURE__ */_jsx("button", {
|
|
224
|
-
onClick: this.handleRetry,
|
|
225
|
-
style: {
|
|
226
|
-
padding: "12px 24px",
|
|
227
|
-
backgroundColor: "#3b82f6",
|
|
228
|
-
color: "white",
|
|
229
|
-
border: "none",
|
|
230
|
-
borderRadius: 8,
|
|
231
|
-
fontSize: 14,
|
|
232
|
-
fontWeight: 500,
|
|
233
|
-
cursor: "pointer"
|
|
234
|
-
},
|
|
235
|
-
children: "Try Again"
|
|
236
|
-
}), /* @__PURE__ */_jsx("button", {
|
|
237
|
-
onClick: function () {
|
|
238
|
-
if (typeof window !== "undefined") {
|
|
239
|
-
window.location.href = "/";
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
style: {
|
|
243
|
-
padding: "12px 24px",
|
|
244
|
-
backgroundColor: "transparent",
|
|
245
|
-
color: "#888",
|
|
246
|
-
border: "1px solid #3a3a5a",
|
|
247
|
-
borderRadius: 8,
|
|
248
|
-
fontSize: 14,
|
|
249
|
-
fontWeight: 500,
|
|
250
|
-
cursor: "pointer"
|
|
251
|
-
},
|
|
252
|
-
children: "Go Home"
|
|
253
|
-
})]
|
|
254
|
-
}), isDev && /* @__PURE__ */_jsx("p", {
|
|
255
223
|
style: {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
224
|
+
padding: "12px 24px",
|
|
225
|
+
backgroundColor: "transparent",
|
|
226
|
+
color: "#888",
|
|
227
|
+
border: "1px solid #3a3a5a",
|
|
228
|
+
borderRadius: 8,
|
|
229
|
+
fontSize: 14,
|
|
230
|
+
fontWeight: 500,
|
|
231
|
+
cursor: "pointer"
|
|
259
232
|
},
|
|
260
|
-
children: "
|
|
233
|
+
children: "Go Home"
|
|
261
234
|
})]
|
|
262
|
-
})
|
|
263
|
-
|
|
264
|
-
|
|
235
|
+
}), isDev && /* @__PURE__ */_jsx("p", {
|
|
236
|
+
style: {
|
|
237
|
+
fontSize: 11,
|
|
238
|
+
color: "#666",
|
|
239
|
+
marginTop: 24
|
|
240
|
+
},
|
|
241
|
+
children: "Press Alt+E to view error details"
|
|
242
|
+
})]
|
|
243
|
+
})
|
|
244
|
+
});
|
|
265
245
|
return /* @__PURE__ */_jsxs(View, {
|
|
266
246
|
style: {
|
|
267
247
|
flex: 1,
|