catalyst-core 0.3.0-beta.5 → 0.3.0-canary.2
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/changelog.md +185 -71
- package/dist/errors/generateDocs.js +100 -0
- package/dist/errors/index.js +243 -0
- package/dist/errors/registry.js +483 -0
- package/dist/errors-index.json +506 -0
- package/dist/globals.d.ts +62 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.jsx +5 -8
- package/dist/logger.js +1 -1
- package/dist/native/androidProject/app/build.gradle.kts +142 -7
- package/dist/native/androidProject/app/src/main/AndroidManifest.xml +4 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/NativeBridge.kt +2 -2
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/BarcodeDetector.kt +3 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/CameraSessionManager.kt +3 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/FrameworkServerUtils.kt +43 -8
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/BridgeUtilsTest.kt +181 -1
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/CameraUtilsTest.kt +156 -236
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/FileSizeRouterUtilsTest.kt +471 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/FileUtilsTest.kt +222 -226
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/FrameworkServerUtilsTest.kt +300 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/IntentUtilsTest.kt +244 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/MetricsMonitorTest.kt +359 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/NativeBridgeTest.kt +108 -63
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/NotificationUtilsTest.kt +329 -385
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/OfflineCacheServiceTest.kt +302 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/PerfEventBufferTest.kt +133 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/UtilsKtTest.kt +152 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/WebCacheManagerTest.kt +145 -324
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/BarcodeDetectorTest.kt +132 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/HoldControllerTest.kt +155 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/TorchControllerTest.kt +150 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/VideoStreamStateMachineTest.kt +120 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/VideoStreamStateTest.kt +62 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/ViewfinderMapperTest.kt +143 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/ZoomControllerTest.kt +421 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/design/DesignTokensTest.kt +207 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/plugins/PluginBridgeTest.kt +368 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/security/FridaDetectorTest.kt +193 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/security/SecurityCheckManagerTest.kt +260 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/security/SecurityCheckSchedulerTest.kt +166 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/utils/DeviceInfoUtilsTest.kt +167 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/utils/DownloadUtilsTest.kt +197 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/utils/NetworkMonitorTest.kt +271 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/utils/PushNotificationUtilsTest.kt +119 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/utils/SafeAreaUtilsTest.kt +108 -0
- package/dist/native/androidProject/build.gradle.kts +1 -0
- package/dist/native/androidProject/gradle/libs.versions.toml +26 -0
- package/dist/native/androidProject/settings.gradle.kts +11 -8
- package/dist/native/androidSetup.js +2 -2
- package/dist/native/bridge/WebBridge.d.ts +98 -0
- package/dist/native/bridge/WebBridge.js +40 -6
- package/dist/native/bridge/constants/NativeInterfaces.d.ts +391 -0
- package/dist/native/bridge/errors.d.ts +67 -0
- package/dist/native/bridge/errors.js +66 -151
- package/dist/native/bridge/hooks/index.d.ts +13 -0
- package/dist/native/bridge/hooks/index.js +0 -6
- package/dist/native/bridge/hooks/useAI.d.ts +1 -0
- package/dist/native/bridge/hooks/useAI.js +3 -1
- package/dist/native/bridge/hooks/useCamera.d.ts +86 -0
- package/dist/native/bridge/hooks/useCamera.js +35 -6
- package/dist/native/bridge/hooks/useDataProtection.d.ts +17 -0
- package/dist/native/bridge/hooks/useDeviceInfo.d.ts +34 -0
- package/dist/native/bridge/hooks/useDeviceInfo.js +5 -0
- package/dist/native/bridge/hooks/useFilePicker.d.ts +53 -0
- package/dist/native/bridge/hooks/useFilePicker.js +13 -0
- package/dist/native/bridge/hooks/useGoogleSignIn.d.ts +12 -0
- package/dist/native/bridge/hooks/useHapticFeedback.d.ts +76 -0
- package/dist/native/bridge/hooks/useHapticFeedback.js +6 -1
- package/dist/native/bridge/hooks/useIntent.d.ts +33 -0
- package/dist/native/bridge/hooks/useIntent.js +2 -0
- package/dist/native/bridge/hooks/useNativeTransition.d.ts +53 -0
- package/dist/native/bridge/hooks/useNativeTransition.js +12 -5
- package/dist/native/bridge/hooks/useNetworkStatus.d.ts +22 -0
- package/dist/native/bridge/hooks/useNetworkStatus.js +7 -0
- package/dist/native/bridge/hooks/useNotification.d.ts +83 -0
- package/dist/native/bridge/hooks/useNotification.js +81 -34
- package/dist/native/bridge/hooks/useSafeArea.d.ts +12 -0
- package/dist/native/bridge/hooks/useSafeArea.js +8 -0
- package/dist/native/bridge/hooks/useVideoStream.d.ts +67 -0
- package/dist/native/bridge/hooks/useVideoStream.js +38 -52
- package/dist/native/bridge/hooks/utils.d.ts +4 -0
- package/dist/native/bridge/hooks.d.ts +1 -0
- package/dist/native/bridge/perf/collectors/ApiCollector.d.ts +30 -0
- package/dist/native/bridge/perf/collectors/ApiCollector.js +4 -0
- package/dist/native/bridge/perf/collectors/CacheCollector.d.ts +43 -0
- package/dist/native/bridge/perf/collectors/CacheCollector.js +4 -0
- package/dist/native/bridge/perf/collectors/HookCollector.d.ts +37 -0
- package/dist/native/bridge/perf/collectors/HookCollector.js +4 -0
- package/dist/native/bridge/perf/collectors/InsightsCollector.d.ts +103 -0
- package/dist/native/bridge/perf/collectors/InsightsCollector.js +4 -0
- package/dist/native/bridge/perf/collectors/InteractionCollector.d.ts +53 -0
- package/dist/native/bridge/perf/collectors/InteractionCollector.js +4 -0
- package/dist/native/bridge/perf/collectors/KeyboardCollector.d.ts +30 -0
- package/dist/native/bridge/perf/collectors/KeyboardCollector.js +4 -0
- package/dist/native/bridge/perf/collectors/NavigationCollector.d.ts +37 -0
- package/dist/native/bridge/perf/collectors/NavigationCollector.js +4 -0
- package/dist/native/bridge/perf/collectors/NetworkTimingCollector.d.ts +30 -0
- package/dist/native/bridge/perf/collectors/NetworkTimingCollector.js +4 -0
- package/dist/native/bridge/perf/collectors/RenderCollector.d.ts +47 -0
- package/dist/native/bridge/perf/collectors/RenderCollector.js +8 -0
- package/dist/native/bridge/perf/collectors/ScrollCollector.d.ts +29 -0
- package/dist/native/bridge/perf/collectors/ScrollCollector.js +4 -0
- package/dist/native/bridge/perf/collectors/ThreadCollector.d.ts +31 -0
- package/dist/native/bridge/perf/collectors/ThreadCollector.js +4 -0
- package/dist/native/bridge/perf/core/constants.d.ts +76 -0
- package/dist/native/bridge/perf/core/measure.d.ts +39 -0
- package/dist/native/bridge/perf/core/measure.js +4 -0
- package/dist/native/bridge/perf/core/session.d.ts +49 -0
- package/dist/native/bridge/perf/core/session.js +4 -0
- package/dist/native/bridge/perf/core/store.d.ts +37 -0
- package/dist/native/bridge/perf/core/store.js +4 -0
- package/dist/native/bridge/perf/core/summary.d.ts +60 -0
- package/dist/native/bridge/perf/core/traceExport.d.ts +10 -0
- package/dist/native/bridge/perf/core/waterfalls.d.ts +2 -0
- package/dist/native/bridge/perf/index.d.ts +63 -0
- package/dist/native/bridge/perf/index.js +4 -0
- package/dist/native/bridge/safeArea.d.ts +11 -0
- package/dist/native/bridge/safeArea.js +2 -0
- package/dist/native/bridge/useBaseHook.d.ts +137 -0
- package/dist/native/bridge/useBaseHook.js +34 -4
- package/dist/native/bridge/utils/CameraUtils.d.ts +94 -0
- package/dist/native/bridge/utils/CameraUtils.js +4 -0
- package/dist/native/bridge/utils/FileObjectConverter.d.ts +36 -0
- package/dist/native/bridge/utils/NativeBridge.d.ts +270 -0
- package/dist/native/bridge/utils/NativeBridge.js +10 -0
- package/dist/native/buildAndroid/index.js +1 -1
- package/dist/native/buildAppAndroid.js +9 -0
- package/dist/native/buildAppIos.js +16 -1
- package/dist/native/buildErrorFormat.js +57 -0
- package/dist/native/buildIos/config.js +15 -1
- package/dist/native/buildIos/index.js +1 -1
- package/dist/native/buildIos/plugins.js +10 -1
- package/dist/native/iosnativeWebView/CoreLogic/Package.swift +36 -0
- package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Camera/VideoStreamState.swift +1 -1
- package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Camera/VideoStreamStateMachine.swift +6 -4
- package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/BootTimingUtility.swift +3 -3
- package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/FrameworkServerUtils.swift +14 -9
- package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/NetworkMonitor.swift +11 -9
- package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/NotificationHandlerProvider.swift +1 -1
- package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/URLWhitelistManager.swift +7 -7
- package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/AnyCodableTests.swift +154 -0
- package/dist/native/iosnativeWebView/{iosnativeWebViewTests → CoreLogic/Tests/CatalystCoreLogicTests}/BootTimingUtilityTests.swift +23 -5
- package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/CatalystConstantsTests.swift +192 -0
- package/dist/native/iosnativeWebView/{iosnativeWebViewTests → CoreLogic/Tests/CatalystCoreLogicTests}/ConfigMappingTests.swift +1 -1
- package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/FrameworkServerUtilsErrorPathTests.swift +106 -0
- package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/FrameworkServerUtilsLoopbackTests.swift +243 -0
- package/dist/native/iosnativeWebView/{iosnativeWebViewTests → CoreLogic/Tests/CatalystCoreLogicTests}/FrameworkServerUtilsTests.swift +1 -1
- package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/NetworkMonitorTests.swift +119 -0
- package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/NotificationHandlerProviderTests.swift +59 -0
- package/dist/native/iosnativeWebView/{iosnativeWebViewTests → CoreLogic/Tests/CatalystCoreLogicTests}/NotificationHandlerTests.swift +1 -1
- package/dist/native/iosnativeWebView/{iosnativeWebViewTests → CoreLogic/Tests/CatalystCoreLogicTests}/URLWhitelistManagerTests.swift +1 -1
- package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/VideoStreamStateMachineTests.swift +171 -0
- package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/VideoStreamStateTests.swift +91 -0
- package/dist/native/iosnativeWebView/Package.swift +10 -9
- package/dist/native/iosnativeWebView/Sources/CatalystNotifications/LocalNotificationHandler.swift +7 -2
- package/dist/native/iosnativeWebView/Sources/CatalystNotifications/NotificationManager.swift +1 -2
- package/dist/native/iosnativeWebView/Sources/CatalystNotifications/PushNotificationHandler.swift +5 -4
- package/dist/native/iosnativeWebView/Sources/Core/Camera/CameraSessionManager.swift +1 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/HoldController.swift +1 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/NativeCameraManager.swift +6 -5
- package/dist/native/iosnativeWebView/Sources/Core/Camera/ZoomController.swift +1 -0
- package/dist/native/iosnativeWebView/Sources/Core/Plugins/PluginBridge.swift +1 -0
- package/dist/native/iosnativeWebView/Sources/Core/Utils/CacheManager.swift +31 -30
- package/dist/native/iosnativeWebView/Sources/Core/Utils/CameraTransportUtils.swift +2 -1
- package/dist/native/iosnativeWebView/Sources/Core/Utils/DeviceInfoUtils.swift +1 -1
- package/dist/native/iosnativeWebView/Sources/Core/Utils/FilePickerHandler.swift +22 -19
- package/dist/native/iosnativeWebView/Sources/Core/Utils/ImageHandler.swift +40 -39
- package/dist/native/iosnativeWebView/Sources/Core/Utils/PerfEventBuffer.swift +1 -0
- package/dist/native/iosnativeWebView/Sources/Core/Utils/ResourceURLProtocol.swift +15 -15
- package/dist/native/iosnativeWebView/Sources/Core/Utils/WebKitConfig.swift +4 -3
- package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeCommandHandler.swift +6 -1
- package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeDelegateHandler.swift +1 -0
- package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeFileHandler.swift +2 -1
- package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeJavaScriptInterface.swift +2 -1
- package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeMessageValidator.swift +3 -5
- package/dist/native/iosnativeWebView/Sources/Core/WebView/NativeBridge.swift +20 -13
- package/dist/native/iosnativeWebView/Sources/Core/WebView/SplashView.swift +6 -5
- package/dist/native/iosnativeWebView/Sources/Core/WebView/SplashViewModel.swift +14 -13
- package/dist/native/iosnativeWebView/Sources/Core/WebView/TransitionManager.swift +3 -3
- package/dist/native/iosnativeWebView/Sources/Core/WebView/WebView.swift +9 -8
- package/dist/native/iosnativeWebView/Sources/Core/WebView/WebViewModel.swift +7 -6
- package/dist/native/iosnativeWebView/Sources/Core/WebView/WebViewNavigationDelegate.swift +24 -25
- package/dist/native/iosnativeWebView/iosnativeWebView/AppDelegate.swift +6 -1
- package/dist/native/iosnativeWebView/iosnativeWebView/ContentView.swift +1 -0
- package/dist/native/iosnativeWebView/iosnativeWebView/iosnativeWebViewApp.swift +4 -0
- package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/project.pbxproj +2 -22
- package/dist/native/iosnativeWebView/iosnativeWebViewTests/BridgeMessageValidatorTests.swift +1 -0
- package/dist/native/iosnativeWebView/iosnativeWebViewTests/CacheManagerTests.swift +1 -0
- package/dist/native/iosnativeWebView/iosnativeWebViewTests/FilePickerHandlerTests.swift +2 -1
- package/dist/native/iosnativeWebView/iosnativeWebViewTests/NativeBridgeTests.swift +15 -9
- package/dist/native/iosnativeWebView/iosnativeWebViewTests/WebViewTests.swift +1 -0
- package/dist/native/setupEmulatorIos.js +2 -2
- package/dist/native/terminalProgress.js +17 -17
- package/dist/router/ClientRouter.d.ts +8 -0
- package/dist/router/ClientRouter.js +13 -11
- package/dist/router/ServerRouter.d.ts +13 -0
- package/dist/router/ServerRouter.js +19 -7
- package/dist/scripts/build.js +14 -2
- package/dist/scripts/loadEnvironmentVariables.js +3 -2
- package/dist/scripts/plugins.js +1 -1
- package/dist/scripts/preServerInit.js +49 -3
- package/dist/scripts/preflight.js +111 -0
- package/dist/scripts/scriptUtils.js +46 -1
- package/dist/scripts/serve.js +7 -3
- package/dist/scripts/start.js +8 -3
- package/dist/server/expressServer.d.ts +1 -0
- package/dist/server/expressServer.js +247 -271
- package/dist/server/manifestCache.d.ts +2 -0
- package/dist/server/manifestCache.js +25 -33
- package/dist/server/renderer/ChunkExtractor.d.ts +44 -0
- package/dist/server/renderer/ChunkExtractor.js +113 -125
- package/dist/server/renderer/document/Body.d.ts +21 -0
- package/dist/server/renderer/document/Body.jsx +45 -45
- package/dist/server/renderer/document/FastRefresh.d.ts +3 -0
- package/dist/server/renderer/document/FastRefresh.jsx +7 -13
- package/dist/server/renderer/document/Head.d.ts +20 -0
- package/dist/server/renderer/document/Head.jsx +32 -32
- package/dist/server/renderer/document/index.d.ts +2 -0
- package/dist/server/renderer/document/index.jsx +2 -2
- package/dist/server/renderer/extract.d.ts +67 -0
- package/dist/server/renderer/extract.js +92 -89
- package/dist/server/renderer/handler.d.ts +2 -0
- package/dist/server/renderer/handler.jsx +401 -404
- package/dist/server/renderer/index.d.ts +2 -0
- package/dist/server/renderer/index.js +5 -8
- package/dist/server/renderer/render.d.ts +35 -0
- package/dist/server/renderer/render.js +25 -32
- package/dist/server/utils/botDetectionMiddleware.d.ts +1 -0
- package/dist/server/utils/botDetectionMiddleware.js +33 -23
- package/dist/server/utils/cjsRequire.d.ts +8 -0
- package/dist/server/utils/cjsRequire.js +2 -2
- package/dist/server/utils/userAgentUtil.d.ts +7 -0
- package/dist/server/utils/userAgentUtil.js +68 -71
- package/dist/server/utils/validator.d.ts +31 -0
- package/dist/server/utils/validator.js +133 -158
- package/dist/vite/inject-cache-key-plugin.js +3 -27
- package/dist/vite/moduleAliases.js +36 -0
- package/dist/vite/node-loader.mjs +2 -29
- package/dist/vite/resolveDevServerConfig.js +4 -1
- package/dist/vite/vite.config.js +2 -29
- package/dist/web-router/components/MetaTag.d.ts +4 -0
- package/dist/web-router/components/MetaTag.jsx +26 -28
- package/dist/web-router/components/MetaTag.test.jsx +100 -0
- package/dist/web-router/components/RouterDataProvider.d.ts +96 -0
- package/dist/web-router/components/RouterDataProvider.jsx +260 -259
- package/dist/web-router/components/RouterDataProvider.server.test.jsx +98 -0
- package/dist/web-router/components/RouterDataProvider.test.jsx +310 -0
- package/dist/web-router/components/Split.d.ts +74 -0
- package/dist/web-router/components/Split.jsx +147 -156
- package/dist/web-router/components/Split.server.test.jsx +52 -0
- package/dist/web-router/components/Split.test.jsx +167 -0
- package/dist/web-router/components/SplitInview.d.ts +22 -0
- package/dist/web-router/components/SplitInview.jsx +78 -89
- package/dist/web-router/components/SplitInview.test.jsx +112 -0
- package/dist/web-router/components/SsrRequestContext.d.ts +20 -0
- package/dist/web-router/components/SsrRequestContext.jsx +17 -7
- package/dist/web-router/components/SsrRequestContext.test.jsx +53 -0
- package/dist/web-router/context.d.ts +15 -0
- package/dist/web-router/context.jsx +5 -5
- package/dist/web-router/context.test.jsx +10 -0
- package/dist/web-router/utils/metaDataUtils.d.ts +24 -0
- package/dist/web-router/utils/metaDataUtils.jsx +86 -86
- package/dist/web-router/utils/metaDataUtils.test.jsx +188 -0
- package/dist/web-router/vitest.setup.js +12 -0
- package/mcp_v2/knowledge-base.json +115 -17
- package/mcp_v2/mcp.js +141 -3
- package/mcp_v2/package-lock.json +2031 -0
- package/mcp_v2/package.json +13 -2
- package/mcp_v2/scripts/copyErrorsIndex.cjs +34 -0
- package/mcp_v2/test/errors.test.ts +123 -0
- package/mcp_v2/test/github.test.ts +177 -0
- package/mcp_v2/tools/errors.d.ts +20 -0
- package/mcp_v2/tools/errors.js +63 -0
- package/mcp_v2/tools/github.d.ts +41 -0
- package/mcp_v2/tools/github.js +231 -0
- package/mcp_v2/vitest.config.mjs +22 -0
- package/package.json +60 -11
- package/test/errors/docsDrift.test.ts +113 -0
- package/test/errors/index.test.ts +200 -0
- package/test/errors/registry.test.ts +108 -0
- package/test/scripts/preflight.test.ts +118 -0
- package/test/server/ChunkExtractor.test.ts +97 -0
- package/test/server/extract.test.ts +128 -0
- package/test/server/fixtures/template/server/document.jsx +19 -0
- package/test/server/fixtures/template/server/index.js +10 -0
- package/test/server/fixtures/template/src/js/containers/App/index.jsx +33 -0
- package/test/server/fixtures/template/src/js/routes/index.jsx +72 -0
- package/test/server/fixtures/template/src/js/routes/utils.jsx +39 -0
- package/test/server/fixtures/template/src/js/store/index.js +19 -0
- package/test/server/handler.assets.test.ts +330 -0
- package/test/server/handler.test.ts +208 -0
- package/test/server/manifestCache.test.ts +71 -0
- package/test/server/render.test.ts +71 -0
- package/test/server/scriptUtils.test.ts +103 -0
- package/test/server/userAgentUtil.test.ts +48 -0
- package/test/server/validator.test.ts +225 -0
- package/test/vite/resolveDevServerConfig.test.js +4 -1
- package/tsconfig.test.json +23 -0
- package/vitest.config.ts +93 -0
- package/dist/caching.js +0 -1
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/DeviceInfoUtilsTest.kt +0 -187
- package/dist/native/bridge/standardizedHooks.js +0 -611
- package/dist/router.js +0 -1
- package/dist/scripts/validator.js +0 -149
- package/dist/web-router/hooks.jsx +0 -72
- package/dist/web-router/types/components/MetaTag.d.ts +0 -2
- package/dist/web-router/types/components/RouterDataProvider.d.ts +0 -95
- package/dist/web-router/types/context.d.ts +0 -14
- package/dist/web-router/types/hooks.d.ts +0 -1
- package/dist/web-router/types/index.d.ts +0 -3
- package/dist/web-router/types/utils/metaDataUtils.d.ts +0 -40
- /package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Constants/CatalystConstants.swift +0 -0
- /package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Constants/ConfigConstants.swift +0 -0
- /package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Notifications/NotificationModels.swift +0 -0
- /package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Protocols/NotificationHandlerProtocol.swift +0 -0
- /package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/NullNotificationHandler.swift +0 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
export declare const NATIVE_COMMANDS: {
|
|
2
|
+
OPEN_CAMERA: string;
|
|
3
|
+
REQUEST_CAMERA_PERMISSION: string;
|
|
4
|
+
START_VIDEO_STREAM: string;
|
|
5
|
+
STOP_VIDEO_STREAM: string;
|
|
6
|
+
SET_VIDEO_STREAM_ZOOM: string;
|
|
7
|
+
SET_VIDEO_STREAM_TORCH: string;
|
|
8
|
+
SET_VIDEO_STREAM_FPS: string;
|
|
9
|
+
FLIP_VIDEO_STREAM: string;
|
|
10
|
+
PICK_FILE: string;
|
|
11
|
+
OPEN_FILE_WITH_INTENT: string;
|
|
12
|
+
REQUEST_HAPTIC_FEEDBACK: string;
|
|
13
|
+
SCHEDULE_LOCAL_NOTIFICATION: string;
|
|
14
|
+
CANCEL_LOCAL_NOTIFICATION: string;
|
|
15
|
+
REQUEST_NOTIFICATION_PERMISSION: string;
|
|
16
|
+
REGISTER_FOR_PUSH_NOTIFICATIONS: string;
|
|
17
|
+
UPDATE_BADGE_COUNT: string;
|
|
18
|
+
SUBSCRIBE_TO_TOPIC: string;
|
|
19
|
+
UNSUBSCRIBE_FROM_TOPIC: string;
|
|
20
|
+
GET_SUBSCRIBED_TOPICS: string;
|
|
21
|
+
GET_DEVICE_INFO: string;
|
|
22
|
+
GET_NETWORK_STATUS: string;
|
|
23
|
+
GOOGLE_SIGN_IN: string;
|
|
24
|
+
START_TRANSITION: string;
|
|
25
|
+
COMMIT_TRANSITION: string;
|
|
26
|
+
CANCEL_TRANSITION: string;
|
|
27
|
+
GET_SAFE_AREA: string;
|
|
28
|
+
SET_SCREEN_SECURE: string;
|
|
29
|
+
GET_SCREEN_SECURE: string;
|
|
30
|
+
CLEAR_WEB_DATA: string;
|
|
31
|
+
INIT_AI: string;
|
|
32
|
+
GENERATE_NATIVE: string;
|
|
33
|
+
};
|
|
34
|
+
export declare const NATIVE_CALLBACKS: {
|
|
35
|
+
CAMERA_PERMISSION_STATUS: string;
|
|
36
|
+
ON_CAMERA_CAPTURE: string;
|
|
37
|
+
ON_CAMERA_ERROR: string;
|
|
38
|
+
ON_VIDEO_STREAM_READY: string;
|
|
39
|
+
ON_VIDEO_STREAM_STOPPED: string;
|
|
40
|
+
ON_QR_DETECTED: string;
|
|
41
|
+
ON_TORCH_CHANGED: string;
|
|
42
|
+
ON_ZOOM_CHANGED: string;
|
|
43
|
+
ON_FILE_PICKED: string;
|
|
44
|
+
ON_FILE_PICK_ERROR: string;
|
|
45
|
+
ON_FILE_PICK_CANCELLED: string;
|
|
46
|
+
ON_FILE_PICK_STATE_UPDATE: string;
|
|
47
|
+
ON_INTENT_SUCCESS: string;
|
|
48
|
+
ON_INTENT_ERROR: string;
|
|
49
|
+
ON_INTENT_CANCELLED: string;
|
|
50
|
+
HAPTIC_FEEDBACK: string;
|
|
51
|
+
NOTIFICATION_PERMISSION_STATUS: string;
|
|
52
|
+
LOCAL_NOTIFICATION_SCHEDULED: string;
|
|
53
|
+
LOCAL_NOTIFICATION_CANCELLED: string;
|
|
54
|
+
PUSH_NOTIFICATION_TOKEN: string;
|
|
55
|
+
NOTIFICATION_RECEIVED: string;
|
|
56
|
+
NOTIFICATION_ACTION_PERFORMED: string;
|
|
57
|
+
NOTIFICATION_TAPPED: string;
|
|
58
|
+
TOPIC_SUBSCRIPTION_RESULT: string;
|
|
59
|
+
SUBSCRIBED_TOPICS_RESULT: string;
|
|
60
|
+
ON_DEVICE_INFO_SUCCESS: string;
|
|
61
|
+
ON_DEVICE_INFO_ERROR: string;
|
|
62
|
+
ON_GOOGLE_SIGN_IN_SUCCESS: string;
|
|
63
|
+
ON_GOOGLE_SIGN_IN_ERROR: string;
|
|
64
|
+
ON_GOOGLE_SIGN_IN_CANCELLED: string;
|
|
65
|
+
NETWORK_STATUS_CHANGED: string;
|
|
66
|
+
ON_SAFE_AREA_INSETS_UPDATED: string;
|
|
67
|
+
ON_TRANSITION_COMMITTED: string;
|
|
68
|
+
ON_TRANSITION_CANCELLED: string;
|
|
69
|
+
ON_TRANSITION_TIMEOUT: string;
|
|
70
|
+
ON_SCREEN_SECURE_SET: string;
|
|
71
|
+
ON_SCREEN_SECURE_STATUS: string;
|
|
72
|
+
ON_SCREEN_SECURE_ERROR: string;
|
|
73
|
+
ON_WEB_DATA_CLEARED: string;
|
|
74
|
+
ON_WEB_DATA_CLEAR_ERROR: string;
|
|
75
|
+
ON_AI_READY: string;
|
|
76
|
+
ON_AI_TOKEN: string;
|
|
77
|
+
ON_AI_DONE: string;
|
|
78
|
+
ON_AI_ERROR: string;
|
|
79
|
+
ON_AI_PROGRESS: string;
|
|
80
|
+
ON_AI_LOG: string;
|
|
81
|
+
CATALYST_PERF_EVENT: string;
|
|
82
|
+
};
|
|
83
|
+
export declare const INTERFACE_CATEGORIES: {
|
|
84
|
+
CAMERA: {
|
|
85
|
+
commands: string[];
|
|
86
|
+
callbacks: string[];
|
|
87
|
+
};
|
|
88
|
+
FILE: {
|
|
89
|
+
commands: string[];
|
|
90
|
+
callbacks: string[];
|
|
91
|
+
};
|
|
92
|
+
INTENT: {
|
|
93
|
+
commands: string[];
|
|
94
|
+
callbacks: string[];
|
|
95
|
+
};
|
|
96
|
+
HAPTIC: {
|
|
97
|
+
commands: string[];
|
|
98
|
+
callbacks: string[];
|
|
99
|
+
};
|
|
100
|
+
NOTIFICATION: {
|
|
101
|
+
commands: string[];
|
|
102
|
+
callbacks: string[];
|
|
103
|
+
};
|
|
104
|
+
DEVICE_INFO: {
|
|
105
|
+
commands: string[];
|
|
106
|
+
callbacks: string[];
|
|
107
|
+
};
|
|
108
|
+
AUTH: {
|
|
109
|
+
commands: string[];
|
|
110
|
+
callbacks: string[];
|
|
111
|
+
};
|
|
112
|
+
NETWORK: {
|
|
113
|
+
commands: string[];
|
|
114
|
+
callbacks: string[];
|
|
115
|
+
};
|
|
116
|
+
SECURITY: {
|
|
117
|
+
commands: string[];
|
|
118
|
+
callbacks: string[];
|
|
119
|
+
};
|
|
120
|
+
TRANSITION: {
|
|
121
|
+
commands: string[];
|
|
122
|
+
callbacks: string[];
|
|
123
|
+
};
|
|
124
|
+
AI: {
|
|
125
|
+
commands: string[];
|
|
126
|
+
callbacks: string[];
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
export declare const ALL_COMMANDS: string[];
|
|
130
|
+
export declare const ALL_CALLBACKS: string[];
|
|
131
|
+
export declare const ALL_INTERFACES: string[];
|
|
132
|
+
export declare const PERMISSION_STATUS: {
|
|
133
|
+
GRANTED: string;
|
|
134
|
+
DENIED: string;
|
|
135
|
+
NOT_DETERMINED: string;
|
|
136
|
+
RESTRICTED: string;
|
|
137
|
+
};
|
|
138
|
+
export declare const HAPTIC_FEEDBACK_TYPES: {
|
|
139
|
+
VIRTUAL_KEY: string;
|
|
140
|
+
LONG_PRESS: string;
|
|
141
|
+
DEFAULT: string;
|
|
142
|
+
LIGHT: string;
|
|
143
|
+
MEDIUM: string;
|
|
144
|
+
HEAVY: string;
|
|
145
|
+
};
|
|
146
|
+
export declare const FILE_PICKER_STATES: {
|
|
147
|
+
OPENING: string;
|
|
148
|
+
PROCESSING: string;
|
|
149
|
+
IDLE: any;
|
|
150
|
+
};
|
|
151
|
+
export declare const INTENT_STATES: {
|
|
152
|
+
PROCESSING: string;
|
|
153
|
+
DOWNLOADING: string;
|
|
154
|
+
OPENING: string;
|
|
155
|
+
IDLE: any;
|
|
156
|
+
};
|
|
157
|
+
export declare const CAMERA_QUALITY: {
|
|
158
|
+
HIGH: string;
|
|
159
|
+
MEDIUM: string;
|
|
160
|
+
LOW: string;
|
|
161
|
+
};
|
|
162
|
+
export declare const CAMERA_FORMAT: {
|
|
163
|
+
JPEG: string;
|
|
164
|
+
PNG: string;
|
|
165
|
+
};
|
|
166
|
+
export declare const CAMERA_DEVICE: {
|
|
167
|
+
FRONT: string;
|
|
168
|
+
REAR: string;
|
|
169
|
+
BACK: string;
|
|
170
|
+
};
|
|
171
|
+
export declare const CAMERA_FLASH_MODE: {
|
|
172
|
+
AUTO: string;
|
|
173
|
+
ON: string;
|
|
174
|
+
OFF: string;
|
|
175
|
+
};
|
|
176
|
+
export declare const TRANSPORT_TYPES: {
|
|
177
|
+
BASE64: string;
|
|
178
|
+
FILE_URL: string;
|
|
179
|
+
FRAMEWORK_SERVER: string;
|
|
180
|
+
};
|
|
181
|
+
export declare const CAMERA_SOURCE: {
|
|
182
|
+
CAMERA: string;
|
|
183
|
+
FILE_PICKER: string;
|
|
184
|
+
};
|
|
185
|
+
export declare const RESPONSE_STATUS: {
|
|
186
|
+
SUCCESS: string;
|
|
187
|
+
ERROR: string;
|
|
188
|
+
CANCELLED: string;
|
|
189
|
+
};
|
|
190
|
+
export declare const isValidCommand: (command: any) => boolean;
|
|
191
|
+
export declare const isValidCallback: (callback: any) => boolean;
|
|
192
|
+
export declare const isValidInterface: (interfaceName: any) => boolean;
|
|
193
|
+
export declare const getInterfacesByCategory: (category: any) => any;
|
|
194
|
+
export declare const debugInterfaces: () => void;
|
|
195
|
+
declare const _default: {
|
|
196
|
+
NATIVE_COMMANDS: {
|
|
197
|
+
OPEN_CAMERA: string;
|
|
198
|
+
REQUEST_CAMERA_PERMISSION: string;
|
|
199
|
+
START_VIDEO_STREAM: string;
|
|
200
|
+
STOP_VIDEO_STREAM: string;
|
|
201
|
+
SET_VIDEO_STREAM_ZOOM: string;
|
|
202
|
+
SET_VIDEO_STREAM_TORCH: string;
|
|
203
|
+
SET_VIDEO_STREAM_FPS: string;
|
|
204
|
+
FLIP_VIDEO_STREAM: string;
|
|
205
|
+
PICK_FILE: string;
|
|
206
|
+
OPEN_FILE_WITH_INTENT: string;
|
|
207
|
+
REQUEST_HAPTIC_FEEDBACK: string;
|
|
208
|
+
SCHEDULE_LOCAL_NOTIFICATION: string;
|
|
209
|
+
CANCEL_LOCAL_NOTIFICATION: string;
|
|
210
|
+
REQUEST_NOTIFICATION_PERMISSION: string;
|
|
211
|
+
REGISTER_FOR_PUSH_NOTIFICATIONS: string;
|
|
212
|
+
UPDATE_BADGE_COUNT: string;
|
|
213
|
+
SUBSCRIBE_TO_TOPIC: string;
|
|
214
|
+
UNSUBSCRIBE_FROM_TOPIC: string;
|
|
215
|
+
GET_SUBSCRIBED_TOPICS: string;
|
|
216
|
+
GET_DEVICE_INFO: string;
|
|
217
|
+
GET_NETWORK_STATUS: string;
|
|
218
|
+
GOOGLE_SIGN_IN: string;
|
|
219
|
+
START_TRANSITION: string;
|
|
220
|
+
COMMIT_TRANSITION: string;
|
|
221
|
+
CANCEL_TRANSITION: string;
|
|
222
|
+
GET_SAFE_AREA: string;
|
|
223
|
+
SET_SCREEN_SECURE: string;
|
|
224
|
+
GET_SCREEN_SECURE: string;
|
|
225
|
+
CLEAR_WEB_DATA: string;
|
|
226
|
+
INIT_AI: string;
|
|
227
|
+
GENERATE_NATIVE: string;
|
|
228
|
+
};
|
|
229
|
+
NATIVE_CALLBACKS: {
|
|
230
|
+
CAMERA_PERMISSION_STATUS: string;
|
|
231
|
+
ON_CAMERA_CAPTURE: string;
|
|
232
|
+
ON_CAMERA_ERROR: string;
|
|
233
|
+
ON_VIDEO_STREAM_READY: string;
|
|
234
|
+
ON_VIDEO_STREAM_STOPPED: string;
|
|
235
|
+
ON_QR_DETECTED: string;
|
|
236
|
+
ON_TORCH_CHANGED: string;
|
|
237
|
+
ON_ZOOM_CHANGED: string;
|
|
238
|
+
ON_FILE_PICKED: string;
|
|
239
|
+
ON_FILE_PICK_ERROR: string;
|
|
240
|
+
ON_FILE_PICK_CANCELLED: string;
|
|
241
|
+
ON_FILE_PICK_STATE_UPDATE: string;
|
|
242
|
+
ON_INTENT_SUCCESS: string;
|
|
243
|
+
ON_INTENT_ERROR: string;
|
|
244
|
+
ON_INTENT_CANCELLED: string;
|
|
245
|
+
HAPTIC_FEEDBACK: string;
|
|
246
|
+
NOTIFICATION_PERMISSION_STATUS: string;
|
|
247
|
+
LOCAL_NOTIFICATION_SCHEDULED: string;
|
|
248
|
+
LOCAL_NOTIFICATION_CANCELLED: string;
|
|
249
|
+
PUSH_NOTIFICATION_TOKEN: string;
|
|
250
|
+
NOTIFICATION_RECEIVED: string;
|
|
251
|
+
NOTIFICATION_ACTION_PERFORMED: string;
|
|
252
|
+
NOTIFICATION_TAPPED: string;
|
|
253
|
+
TOPIC_SUBSCRIPTION_RESULT: string;
|
|
254
|
+
SUBSCRIBED_TOPICS_RESULT: string;
|
|
255
|
+
ON_DEVICE_INFO_SUCCESS: string;
|
|
256
|
+
ON_DEVICE_INFO_ERROR: string;
|
|
257
|
+
ON_GOOGLE_SIGN_IN_SUCCESS: string;
|
|
258
|
+
ON_GOOGLE_SIGN_IN_ERROR: string;
|
|
259
|
+
ON_GOOGLE_SIGN_IN_CANCELLED: string;
|
|
260
|
+
NETWORK_STATUS_CHANGED: string;
|
|
261
|
+
ON_SAFE_AREA_INSETS_UPDATED: string;
|
|
262
|
+
ON_TRANSITION_COMMITTED: string;
|
|
263
|
+
ON_TRANSITION_CANCELLED: string;
|
|
264
|
+
ON_TRANSITION_TIMEOUT: string;
|
|
265
|
+
ON_SCREEN_SECURE_SET: string;
|
|
266
|
+
ON_SCREEN_SECURE_STATUS: string;
|
|
267
|
+
ON_SCREEN_SECURE_ERROR: string;
|
|
268
|
+
ON_WEB_DATA_CLEARED: string;
|
|
269
|
+
ON_WEB_DATA_CLEAR_ERROR: string;
|
|
270
|
+
ON_AI_READY: string;
|
|
271
|
+
ON_AI_TOKEN: string;
|
|
272
|
+
ON_AI_DONE: string;
|
|
273
|
+
ON_AI_ERROR: string;
|
|
274
|
+
ON_AI_PROGRESS: string;
|
|
275
|
+
ON_AI_LOG: string;
|
|
276
|
+
CATALYST_PERF_EVENT: string;
|
|
277
|
+
};
|
|
278
|
+
INTERFACE_CATEGORIES: {
|
|
279
|
+
CAMERA: {
|
|
280
|
+
commands: string[];
|
|
281
|
+
callbacks: string[];
|
|
282
|
+
};
|
|
283
|
+
FILE: {
|
|
284
|
+
commands: string[];
|
|
285
|
+
callbacks: string[];
|
|
286
|
+
};
|
|
287
|
+
INTENT: {
|
|
288
|
+
commands: string[];
|
|
289
|
+
callbacks: string[];
|
|
290
|
+
};
|
|
291
|
+
HAPTIC: {
|
|
292
|
+
commands: string[];
|
|
293
|
+
callbacks: string[];
|
|
294
|
+
};
|
|
295
|
+
NOTIFICATION: {
|
|
296
|
+
commands: string[];
|
|
297
|
+
callbacks: string[];
|
|
298
|
+
};
|
|
299
|
+
DEVICE_INFO: {
|
|
300
|
+
commands: string[];
|
|
301
|
+
callbacks: string[];
|
|
302
|
+
};
|
|
303
|
+
AUTH: {
|
|
304
|
+
commands: string[];
|
|
305
|
+
callbacks: string[];
|
|
306
|
+
};
|
|
307
|
+
NETWORK: {
|
|
308
|
+
commands: string[];
|
|
309
|
+
callbacks: string[];
|
|
310
|
+
};
|
|
311
|
+
SECURITY: {
|
|
312
|
+
commands: string[];
|
|
313
|
+
callbacks: string[];
|
|
314
|
+
};
|
|
315
|
+
TRANSITION: {
|
|
316
|
+
commands: string[];
|
|
317
|
+
callbacks: string[];
|
|
318
|
+
};
|
|
319
|
+
AI: {
|
|
320
|
+
commands: string[];
|
|
321
|
+
callbacks: string[];
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
ALL_COMMANDS: string[];
|
|
325
|
+
ALL_CALLBACKS: string[];
|
|
326
|
+
ALL_INTERFACES: string[];
|
|
327
|
+
PERMISSION_STATUS: {
|
|
328
|
+
GRANTED: string;
|
|
329
|
+
DENIED: string;
|
|
330
|
+
NOT_DETERMINED: string;
|
|
331
|
+
RESTRICTED: string;
|
|
332
|
+
};
|
|
333
|
+
HAPTIC_FEEDBACK_TYPES: {
|
|
334
|
+
VIRTUAL_KEY: string;
|
|
335
|
+
LONG_PRESS: string;
|
|
336
|
+
DEFAULT: string;
|
|
337
|
+
LIGHT: string;
|
|
338
|
+
MEDIUM: string;
|
|
339
|
+
HEAVY: string;
|
|
340
|
+
};
|
|
341
|
+
FILE_PICKER_STATES: {
|
|
342
|
+
OPENING: string;
|
|
343
|
+
PROCESSING: string;
|
|
344
|
+
IDLE: any;
|
|
345
|
+
};
|
|
346
|
+
INTENT_STATES: {
|
|
347
|
+
PROCESSING: string;
|
|
348
|
+
DOWNLOADING: string;
|
|
349
|
+
OPENING: string;
|
|
350
|
+
IDLE: any;
|
|
351
|
+
};
|
|
352
|
+
CAMERA_QUALITY: {
|
|
353
|
+
HIGH: string;
|
|
354
|
+
MEDIUM: string;
|
|
355
|
+
LOW: string;
|
|
356
|
+
};
|
|
357
|
+
CAMERA_FORMAT: {
|
|
358
|
+
JPEG: string;
|
|
359
|
+
PNG: string;
|
|
360
|
+
};
|
|
361
|
+
CAMERA_DEVICE: {
|
|
362
|
+
FRONT: string;
|
|
363
|
+
REAR: string;
|
|
364
|
+
BACK: string;
|
|
365
|
+
};
|
|
366
|
+
CAMERA_FLASH_MODE: {
|
|
367
|
+
AUTO: string;
|
|
368
|
+
ON: string;
|
|
369
|
+
OFF: string;
|
|
370
|
+
};
|
|
371
|
+
TRANSPORT_TYPES: {
|
|
372
|
+
BASE64: string;
|
|
373
|
+
FILE_URL: string;
|
|
374
|
+
FRAMEWORK_SERVER: string;
|
|
375
|
+
};
|
|
376
|
+
CAMERA_SOURCE: {
|
|
377
|
+
CAMERA: string;
|
|
378
|
+
FILE_PICKER: string;
|
|
379
|
+
};
|
|
380
|
+
RESPONSE_STATUS: {
|
|
381
|
+
SUCCESS: string;
|
|
382
|
+
ERROR: string;
|
|
383
|
+
CANCELLED: string;
|
|
384
|
+
};
|
|
385
|
+
isValidCommand: typeof isValidCommand;
|
|
386
|
+
isValidCallback: typeof isValidCallback;
|
|
387
|
+
isValidInterface: typeof isValidInterface;
|
|
388
|
+
getInterfacesByCategory: typeof getInterfacesByCategory;
|
|
389
|
+
debugInterfaces: typeof debugInterfaces;
|
|
390
|
+
};
|
|
391
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { CatalystError } from "../../errors/index.js";
|
|
2
|
+
export declare const ERROR_CODES: {
|
|
3
|
+
PERMISSION_DENIED: any;
|
|
4
|
+
PERMISSION_REQUIRED: any;
|
|
5
|
+
NETWORK_UNAVAILABLE: any;
|
|
6
|
+
DOWNLOAD_FAILED: any;
|
|
7
|
+
FILE_NOT_FOUND: any;
|
|
8
|
+
FILE_TOO_LARGE: any;
|
|
9
|
+
STORAGE_FULL: any;
|
|
10
|
+
FILE_CORRUPTED: any;
|
|
11
|
+
OPERATION_CANCELLED: any;
|
|
12
|
+
NO_FILE_SELECTED: any;
|
|
13
|
+
INVALID_FILE_TYPE: any;
|
|
14
|
+
INVALID_PARAMETERS: any;
|
|
15
|
+
BRIDGE_UNAVAILABLE: any;
|
|
16
|
+
FEATURE_UNSUPPORTED: any;
|
|
17
|
+
INTERNAL_ERROR: any;
|
|
18
|
+
CAMERA_UNAVAILABLE: any;
|
|
19
|
+
CAMERA_IN_USE: any;
|
|
20
|
+
};
|
|
21
|
+
/** One of the {@link ERROR_CODES} values — a shared `RUNTIME-NATIVE-xxx` code. */
|
|
22
|
+
export type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];
|
|
23
|
+
/**
|
|
24
|
+
* Broad grouping an error code belongs to.
|
|
25
|
+
*
|
|
26
|
+
* Categories are owned by the shared registry (`../../errors/registry.js`) and
|
|
27
|
+
* are the code's prefix — every code this module aliases is `"RUNTIME-NATIVE"`.
|
|
28
|
+
* `"UNKNOWN"` is what the registry substitutes for a code it does not own.
|
|
29
|
+
*/
|
|
30
|
+
export type ErrorCategory = string;
|
|
31
|
+
/**
|
|
32
|
+
* The error object every hook reports through its `error` key.
|
|
33
|
+
*
|
|
34
|
+
* Now an alias of the shared {@link CatalystError} (a real `Error` subclass)
|
|
35
|
+
* rather than a plain object literal: the shared error system owns the shape.
|
|
36
|
+
* Compared with the pre-merge local shape, `message`/`details`/`code` survive,
|
|
37
|
+
* `category` is a registry category string, `action` is now `suggestedAction`,
|
|
38
|
+
* `nativeError` is now the standard `cause`, and `recoverable`/`timestamp` are
|
|
39
|
+
* gone — the registry does not track recoverability, and verbose/debug
|
|
40
|
+
* formatting stamps its own timestamp at print time.
|
|
41
|
+
*
|
|
42
|
+
* Two hooks predate this contract and still report a plain string: `error` on
|
|
43
|
+
* `useDeviceInfo` and `useNetworkStatus` stays a string until 2.0.
|
|
44
|
+
*/
|
|
45
|
+
export type StandardError = CatalystError;
|
|
46
|
+
/**
|
|
47
|
+
* Create a standardized error object (CatalystError instance) for a
|
|
48
|
+
* RUNTIME-NATIVE-xxx code, with the native error attached as `cause`.
|
|
49
|
+
*
|
|
50
|
+
* @param code - Error code from ERROR_CODES
|
|
51
|
+
* @param userMessage - Custom user-friendly message (optional)
|
|
52
|
+
* @param nativeError - Original native error for debugging
|
|
53
|
+
* @param customDetails - Custom details (optional)
|
|
54
|
+
* @returns Standardized error object
|
|
55
|
+
*/
|
|
56
|
+
export declare const createStandardError: (code: ErrorCode, userMessage?: string | null, nativeError?: any, customDetails?: string | null) => StandardError;
|
|
57
|
+
/**
|
|
58
|
+
* Translate native error to standardized error
|
|
59
|
+
* @param nativeError - Native error from Android/iOS
|
|
60
|
+
* @returns Standardized error object
|
|
61
|
+
*/
|
|
62
|
+
export declare const translateError: (nativeError: any) => StandardError;
|
|
63
|
+
/**
|
|
64
|
+
* Check if development mode is enabled
|
|
65
|
+
* @returns True if in development mode
|
|
66
|
+
*/
|
|
67
|
+
export declare const isDevelopment: () => boolean;
|