basalt-core 0.0.0-rc5
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/LICENSE +21 -0
- package/dist/cli/basalt.d.ts +3 -0
- package/dist/cli/basalt.d.ts.map +1 -0
- package/dist/cli/basalt.js +47 -0
- package/dist/cli/basalt.js.map +1 -0
- package/dist/cli/bundle-cli.d.ts +12 -0
- package/dist/cli/bundle-cli.d.ts.map +1 -0
- package/dist/cli/bundle-cli.js +124 -0
- package/dist/cli/bundle-cli.js.map +1 -0
- package/dist/cli/bundleWithAssets.d.ts +79 -0
- package/dist/cli/bundleWithAssets.d.ts.map +1 -0
- package/dist/cli/bundleWithAssets.js +198 -0
- package/dist/cli/bundleWithAssets.js.map +1 -0
- package/dist/cli/desktop.d.ts +339 -0
- package/dist/cli/desktop.d.ts.map +1 -0
- package/dist/cli/desktop.js +1029 -0
- package/dist/cli/desktop.js.map +1 -0
- package/dist/cli/doctor.d.ts +31 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +283 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/init.d.ts +77 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +442 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/metro.d.ts +49 -0
- package/dist/cli/metro.d.ts.map +1 -0
- package/dist/cli/metro.js +148 -0
- package/dist/cli/metro.js.map +1 -0
- package/dist/cli/packageApp.d.ts +102 -0
- package/dist/cli/packageApp.d.ts.map +1 -0
- package/dist/cli/packageApp.js +319 -0
- package/dist/cli/packageApp.js.map +1 -0
- package/dist/cli/steps.d.ts +34 -0
- package/dist/cli/steps.d.ts.map +1 -0
- package/dist/cli/steps.js +53 -0
- package/dist/cli/steps.js.map +1 -0
- package/dist/metro-config.d.ts +168 -0
- package/dist/metro-config.d.ts.map +1 -0
- package/dist/metro-config.js +671 -0
- package/dist/metro-config.js.map +1 -0
- package/dist/react-native.config.d.ts +7 -0
- package/dist/react-native.config.d.ts.map +1 -0
- package/dist/react-native.config.js +80 -0
- package/dist/react-native.config.js.map +1 -0
- package/dist/src/DragSource.d.ts +52 -0
- package/dist/src/DragSource.d.ts.map +1 -0
- package/dist/src/DragSource.js +97 -0
- package/dist/src/DragSource.js.map +1 -0
- package/dist/src/DropTarget.d.ts +58 -0
- package/dist/src/DropTarget.d.ts.map +1 -0
- package/dist/src/DropTarget.js +131 -0
- package/dist/src/DropTarget.js.map +1 -0
- package/dist/src/KeyHandler.d.ts +57 -0
- package/dist/src/KeyHandler.d.ts.map +1 -0
- package/dist/src/KeyHandler.js +48 -0
- package/dist/src/KeyHandler.js.map +1 -0
- package/dist/src/Menu.d.ts +72 -0
- package/dist/src/Menu.d.ts.map +1 -0
- package/dist/src/Menu.js +179 -0
- package/dist/src/Menu.js.map +1 -0
- package/dist/src/TitleBar.d.ts +75 -0
- package/dist/src/TitleBar.d.ts.map +1 -0
- package/dist/src/TitleBar.js +236 -0
- package/dist/src/TitleBar.js.map +1 -0
- package/dist/src/Window.d.ts +87 -0
- package/dist/src/Window.d.ts.map +1 -0
- package/dist/src/Window.js +248 -0
- package/dist/src/Window.js.map +1 -0
- package/dist/src/closeRequest.d.ts +55 -0
- package/dist/src/closeRequest.d.ts.map +1 -0
- package/dist/src/closeRequest.js +134 -0
- package/dist/src/closeRequest.js.map +1 -0
- package/dist/src/index.d.ts +45 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +92 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/overrides/Alert.d.ts +69 -0
- package/dist/src/overrides/Alert.d.ts.map +1 -0
- package/dist/src/overrides/Alert.js +112 -0
- package/dist/src/overrides/Alert.js.map +1 -0
- package/dist/src/overrides/BaseViewConfig.d.ts +28 -0
- package/dist/src/overrides/BaseViewConfig.d.ts.map +1 -0
- package/dist/src/overrides/BaseViewConfig.js +72 -0
- package/dist/src/overrides/BaseViewConfig.js.map +1 -0
- package/dist/src/overrides/Platform.linux.d.ts +10 -0
- package/dist/src/overrides/Platform.linux.d.ts.map +1 -0
- package/dist/src/overrides/Platform.linux.js +15 -0
- package/dist/src/overrides/Platform.linux.js.map +1 -0
- package/dist/src/overrides/Platform.macos.d.ts +10 -0
- package/dist/src/overrides/Platform.macos.d.ts.map +1 -0
- package/dist/src/overrides/Platform.macos.js +15 -0
- package/dist/src/overrides/Platform.macos.js.map +1 -0
- package/dist/src/overrides/Platform.windows.d.ts +10 -0
- package/dist/src/overrides/Platform.windows.d.ts.map +1 -0
- package/dist/src/overrides/Platform.windows.js +15 -0
- package/dist/src/overrides/Platform.windows.js.map +1 -0
- package/dist/src/overrides/ReactDevToolsSettingsManager.d.ts +24 -0
- package/dist/src/overrides/ReactDevToolsSettingsManager.d.ts.map +1 -0
- package/dist/src/overrides/ReactDevToolsSettingsManager.js +30 -0
- package/dist/src/overrides/ReactDevToolsSettingsManager.js.map +1 -0
- package/dist/src/overrides/RefreshControl.d.ts +52 -0
- package/dist/src/overrides/RefreshControl.d.ts.map +1 -0
- package/dist/src/overrides/RefreshControl.js +92 -0
- package/dist/src/overrides/RefreshControl.js.map +1 -0
- package/dist/src/overrides/ScrollView.d.ts +39 -0
- package/dist/src/overrides/ScrollView.d.ts.map +1 -0
- package/dist/src/overrides/ScrollView.js +59 -0
- package/dist/src/overrides/ScrollView.js.map +1 -0
- package/dist/src/overrides/Share.d.ts +96 -0
- package/dist/src/overrides/Share.d.ts.map +1 -0
- package/dist/src/overrides/Share.js +97 -0
- package/dist/src/overrides/Share.js.map +1 -0
- package/dist/src/overrides/TextInput.d.ts +81 -0
- package/dist/src/overrides/TextInput.d.ts.map +1 -0
- package/dist/src/overrides/TextInput.js +213 -0
- package/dist/src/overrides/TextInput.js.map +1 -0
- package/dist/src/overrides/View.d.ts +36 -0
- package/dist/src/overrides/View.d.ts.map +1 -0
- package/dist/src/overrides/View.js +99 -0
- package/dist/src/overrides/View.js.map +1 -0
- package/dist/src/overrides/createPlatform.d.ts +32 -0
- package/dist/src/overrides/createPlatform.d.ts.map +1 -0
- package/dist/src/overrides/createPlatform.js +84 -0
- package/dist/src/overrides/createPlatform.js.map +1 -0
- package/dist/src/overrides/setUpDeveloperTools.d.ts +28 -0
- package/dist/src/overrides/setUpDeveloperTools.d.ts.map +1 -0
- package/dist/src/overrides/setUpDeveloperTools.js +84 -0
- package/dist/src/overrides/setUpDeveloperTools.js.map +1 -0
- package/dist/src/overrides/setUpXHR.d.ts +46 -0
- package/dist/src/overrides/setUpXHR.d.ts.map +1 -0
- package/dist/src/overrides/setUpXHR.js +236 -0
- package/dist/src/overrides/setUpXHR.js.map +1 -0
- package/dist/src/quitRequest.d.ts +55 -0
- package/dist/src/quitRequest.d.ts.map +1 -0
- package/dist/src/quitRequest.js +121 -0
- package/dist/src/quitRequest.js.map +1 -0
- package/dist/src/resourcePath.d.ts +18 -0
- package/dist/src/resourcePath.d.ts.map +1 -0
- package/dist/src/resourcePath.js +31 -0
- package/dist/src/resourcePath.js.map +1 -0
- package/dist/src/responseBody.d.ts +76 -0
- package/dist/src/responseBody.d.ts.map +1 -0
- package/dist/src/responseBody.js +94 -0
- package/dist/src/responseBody.js.map +1 -0
- package/dist/src/responseHeaders.d.ts +40 -0
- package/dist/src/responseHeaders.d.ts.map +1 -0
- package/dist/src/responseHeaders.js +75 -0
- package/dist/src/responseHeaders.js.map +1 -0
- package/dist/src/titleBarState.d.ts +43 -0
- package/dist/src/titleBarState.d.ts.map +1 -0
- package/dist/src/titleBarState.js +77 -0
- package/dist/src/titleBarState.js.map +1 -0
- package/dist/src/useContextMenu.d.ts +113 -0
- package/dist/src/useContextMenu.d.ts.map +1 -0
- package/dist/src/useContextMenu.js +109 -0
- package/dist/src/useContextMenu.js.map +1 -0
- package/dist/src/useDialog.d.ts +98 -0
- package/dist/src/useDialog.d.ts.map +1 -0
- package/dist/src/useDialog.js +112 -0
- package/dist/src/useDialog.js.map +1 -0
- package/dist/src/useDisplays.d.ts +70 -0
- package/dist/src/useDisplays.d.ts.map +1 -0
- package/dist/src/useDisplays.js +118 -0
- package/dist/src/useDisplays.js.map +1 -0
- package/dist/src/useHandledKeys.d.ts +38 -0
- package/dist/src/useHandledKeys.d.ts.map +1 -0
- package/dist/src/useHandledKeys.js +70 -0
- package/dist/src/useHandledKeys.js.map +1 -0
- package/dist/src/useWindow.d.ts +140 -0
- package/dist/src/useWindow.d.ts.map +1 -0
- package/dist/src/useWindow.js +233 -0
- package/dist/src/useWindow.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/native/CMakeLists.txt +355 -0
- package/native/bootstrap.sh +613 -0
- package/native/cmake/CompilerFlags.cmake +49 -0
- package/native/cmake/Expo.cmake +125 -0
- package/native/cmake/ReactNativeCore.cmake +612 -0
- package/native/cmake/Reanimated.cmake +108 -0
- package/native/cmake/Skia.cmake +379 -0
- package/native/cmake/ThirdParty.cmake +290 -0
- package/native/cmake/Worklets.cmake +67 -0
- package/native/cmake/codegen/CMakeLists.txt +32 -0
- package/native/core/AppIdentity.cpp +85 -0
- package/native/core/AppIdentity.h +59 -0
- package/native/core/AppPaths.cpp +96 -0
- package/native/core/AppPaths.h +53 -0
- package/native/core/AppearanceModule.cpp +60 -0
- package/native/core/AppearanceModule.h +40 -0
- package/native/core/Backface.h +59 -0
- package/native/core/BlobModule.cpp +283 -0
- package/native/core/BlobModule.h +76 -0
- package/native/core/BlobRegistry.cpp +75 -0
- package/native/core/BlobRegistry.h +44 -0
- package/native/core/ColorScheme.cpp +105 -0
- package/native/core/ColorScheme.h +59 -0
- package/native/core/ComponentRegistry.h +30 -0
- package/native/core/ControlMetrics.h +37 -0
- package/native/core/CoreModules.cpp +592 -0
- package/native/core/CoreModules.h +308 -0
- package/native/core/DebuggingOverlay.cpp +106 -0
- package/native/core/DebuggingOverlay.h +65 -0
- package/native/core/DesktopControls.cpp +232 -0
- package/native/core/DesktopControls.h +170 -0
- package/native/core/DevBundle.cpp +108 -0
- package/native/core/DevBundle.h +69 -0
- package/native/core/DevMenu.cpp +99 -0
- package/native/core/DevMenu.h +75 -0
- package/native/core/DialogModule.cpp +150 -0
- package/native/core/DialogModule.h +51 -0
- package/native/core/DragAndDrop.cpp +45 -0
- package/native/core/DragAndDrop.h +225 -0
- package/native/core/ExpoImageComponent.cpp +79 -0
- package/native/core/ExpoImageComponent.h +80 -0
- package/native/core/ExpoModules.cpp +415 -0
- package/native/core/ExpoModules.h +115 -0
- package/native/core/ExpoRuntime.cpp +366 -0
- package/native/core/ExpoRuntime.h +42 -0
- package/native/core/FocusRing.h +36 -0
- package/native/core/FontRegistry.h +51 -0
- package/native/core/GestureHandlerModule.cpp +136 -0
- package/native/core/GestureHandlerModule.h +71 -0
- package/native/core/Gestures.cpp +533 -0
- package/native/core/Gestures.h +145 -0
- package/native/core/HoverTracker.cpp +69 -0
- package/native/core/HoverTracker.h +109 -0
- package/native/core/HttpClient.cpp +282 -0
- package/native/core/ImageBytes.cpp +205 -0
- package/native/core/ImageBytes.h +29 -0
- package/native/core/ImageCache.cpp +51 -0
- package/native/core/ImageCache.h +89 -0
- package/native/core/JsRuntimeAccess.cpp +70 -0
- package/native/core/JsRuntimeAccess.h +60 -0
- package/native/core/JsiPromise.h +51 -0
- package/native/core/KeyEvents.cpp +116 -0
- package/native/core/KeyEvents.h +144 -0
- package/native/core/LogBoxSurface.cpp +46 -0
- package/native/core/LogBoxSurface.h +68 -0
- package/native/core/MenuModel.h +117 -0
- package/native/core/MenuModule.cpp +209 -0
- package/native/core/MenuModule.h +66 -0
- package/native/core/MountingWalk.h +524 -0
- package/native/core/PackageModules.cpp.in +25 -0
- package/native/core/PackageModules.h +50 -0
- package/native/core/PlatformConstantsModule.cpp +63 -0
- package/native/core/PlatformConstantsModule.h +64 -0
- package/native/core/PlatformServices.h +213 -0
- package/native/core/PointerButtons.h +63 -0
- package/native/core/PullToRefresh.cpp +57 -0
- package/native/core/PullToRefresh.h +73 -0
- package/native/core/ReanimatedCompat.h +47 -0
- package/native/core/ReanimatedModule.cpp +203 -0
- package/native/core/ReanimatedModule.h +55 -0
- package/native/core/ScrollAnimation.cpp +59 -0
- package/native/core/ScrollAnimation.h +70 -0
- package/native/core/ScrollBounds.cpp +26 -0
- package/native/core/ScrollBounds.h +68 -0
- package/native/core/ScrollIndicator.cpp +50 -0
- package/native/core/ScrollIndicator.h +69 -0
- package/native/core/ScrollMomentum.cpp +71 -0
- package/native/core/ScrollMomentum.h +73 -0
- package/native/core/ScrollSnap.cpp +123 -0
- package/native/core/ScrollSnap.h +80 -0
- package/native/core/ShareFallback.cpp +101 -0
- package/native/core/ShareFallback.h +45 -0
- package/native/core/SkiaPictureViewComponent.cpp +11 -0
- package/native/core/SkiaPictureViewComponent.h +47 -0
- package/native/core/SourceCodeModule.cpp +55 -0
- package/native/core/SourceCodeModule.h +53 -0
- package/native/core/StatusBarModule.cpp +23 -0
- package/native/core/StatusBarModule.h +42 -0
- package/native/core/TestDialog.cpp +148 -0
- package/native/core/TestDialog.h +96 -0
- package/native/core/TestKeys.cpp +78 -0
- package/native/core/TestKeys.h +50 -0
- package/native/core/TestQuitFile.cpp +33 -0
- package/native/core/TestQuitFile.h +60 -0
- package/native/core/TestSettle.h +192 -0
- package/native/core/TitleBarRegions.h +31 -0
- package/native/core/TurboModuleProxy.cpp +51 -0
- package/native/core/TurboModuleProxy.h +46 -0
- package/native/core/UIManagerAccess.cpp +43 -0
- package/native/core/UIManagerAccess.h +43 -0
- package/native/core/WindowBoundsCache.cpp +319 -0
- package/native/core/WindowControl.h +235 -0
- package/native/core/WindowHost.h +158 -0
- package/native/core/WindowMethods.cpp +167 -0
- package/native/core/WindowMethods.h +84 -0
- package/native/core/WindowsModule.cpp +448 -0
- package/native/core/WindowsModule.h +133 -0
- package/native/core/WorkletsModule.cpp +199 -0
- package/native/core/WorkletsModule.h +57 -0
- package/native/core/portability_probe.cpp +210 -0
- package/native/tests/EventRecorder.h +124 -0
- package/native/tests/TestHarness.cpp +109 -0
- package/native/tests/TestHarness.h +89 -0
- package/native/tests/TreeDump.h +49 -0
- package/native/tests/test_app_identity.cpp +114 -0
- package/native/tests/test_app_paths.cpp +48 -0
- package/native/tests/test_appearance.cpp +107 -0
- package/native/tests/test_backface.cpp +79 -0
- package/native/tests/test_blobs.cpp +157 -0
- package/native/tests/test_controls.cpp +185 -0
- package/native/tests/test_devbundle.cpp +103 -0
- package/native/tests/test_drag_and_drop.cpp +143 -0
- package/native/tests/test_gestures.cpp +331 -0
- package/native/tests/test_hover.cpp +92 -0
- package/native/tests/test_image_cache.cpp +109 -0
- package/native/tests/test_js_runtime_access.cpp +137 -0
- package/native/tests/test_key_events.cpp +235 -0
- package/native/tests/test_momentum.cpp +138 -0
- package/native/tests/test_quit_file.cpp +104 -0
- package/native/tests/test_scroll_animation.cpp +120 -0
- package/native/tests/test_scroll_bounds.cpp +66 -0
- package/native/tests/test_scroll_indicator.cpp +149 -0
- package/native/tests/test_scroll_snap.cpp +112 -0
- package/native/tests/test_settle.cpp +115 -0
- package/native/tests/test_share.cpp +75 -0
- package/native/tests/test_sourcecode.cpp +62 -0
- package/native/tests/test_window_close.cpp +119 -0
- package/native/tests/test_window_limits.cpp +123 -0
- package/package.json +43 -0
- package/react-native.config.js +86 -0
- package/supported-versions.json +66 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
|
+
/**
|
|
41
|
+
* React Native's `View`, plus the keyboard props react-native-macos has.
|
|
42
|
+
*
|
|
43
|
+
* `keyDownEvents`, `onKeyDown` and `focusable` are how an app written against
|
|
44
|
+
* react-native-macos declares a keyboard shortcut, and an app that has them is
|
|
45
|
+
* an app this platform was supposed to be able to replace. Without them the
|
|
46
|
+
* props are dropped in JavaScript, silently -- no error, no warning, and every
|
|
47
|
+
* binding in the app simply never fires, which is exactly how it was found.
|
|
48
|
+
*
|
|
49
|
+
* `<KeyHandler>` already did this under names of this project's own. Those names
|
|
50
|
+
* are better -- a component that takes `keys` cannot be spread onto a view that
|
|
51
|
+
* does nothing with it -- and they are no use to an app that is not being
|
|
52
|
+
* rewritten. Both work now, through one implementation: see useHandledKeys.ts.
|
|
53
|
+
*
|
|
54
|
+
* **Two components, not one branch.** A view without `keyDownEvents` renders
|
|
55
|
+
* React Native's own with no hooks added, because hooks cannot be conditional
|
|
56
|
+
* and three of them on every view in an app is not a cost to impose for a prop
|
|
57
|
+
* almost nothing uses. The consequence is that a view which *gains* the prop
|
|
58
|
+
* changes component type and remounts, which is the right trade for a prop that
|
|
59
|
+
* is either on a view for its lifetime or not on it at all.
|
|
60
|
+
*
|
|
61
|
+
* The callback is handed `{nativeEvent}`, which is react-native-macos's shape
|
|
62
|
+
* and what an app already written for it expects -- not the bare object
|
|
63
|
+
* `<KeyHandler>` passes. Different names, different shapes; both are contracts
|
|
64
|
+
* and neither gets to change the other.
|
|
65
|
+
*
|
|
66
|
+
* @format
|
|
67
|
+
*/
|
|
68
|
+
const View_1 = __importDefault(require("basalt-core/upstream/Libraries/Components/View/View"));
|
|
69
|
+
const React = __importStar(require("react"));
|
|
70
|
+
const useHandledKeys_1 = require("../useHandledKeys");
|
|
71
|
+
/** The one that listens. Only mounted for a view that asked. */
|
|
72
|
+
function KeyboardView(props) {
|
|
73
|
+
const { keyDownEvents, onKeyDown, ref, ...rest } = props;
|
|
74
|
+
const own = React.useRef(null);
|
|
75
|
+
// The caller's ref and ours, both. A view that declares shortcuts is usually
|
|
76
|
+
// also one an app holds a reference to -- kino's root view is both -- so
|
|
77
|
+
// taking the ref for ourselves would break the app in a second way while
|
|
78
|
+
// fixing the first.
|
|
79
|
+
const setRef = React.useCallback((node) => {
|
|
80
|
+
own.current = node;
|
|
81
|
+
if (typeof ref === 'function') {
|
|
82
|
+
ref(node);
|
|
83
|
+
}
|
|
84
|
+
else if (ref != null) {
|
|
85
|
+
ref.current = node;
|
|
86
|
+
}
|
|
87
|
+
}, [ref]);
|
|
88
|
+
const onPress = React.useCallback((pressed) => onKeyDown?.({ nativeEvent: pressed }), [onKeyDown]);
|
|
89
|
+
(0, useHandledKeys_1.useHandledKeys)(own, keyDownEvents, onPress);
|
|
90
|
+
return (0, jsx_runtime_1.jsx)(View_1.default, { ...rest, ref: setRef });
|
|
91
|
+
}
|
|
92
|
+
function BasaltView(props) {
|
|
93
|
+
// Read, not destructured, so that every other prop reaches React Native's
|
|
94
|
+
// View exactly as it was given.
|
|
95
|
+
return props.keyDownEvents == null ? ((0, jsx_runtime_1.jsx)(View_1.default, { ...props })) : ((0, jsx_runtime_1.jsx)(KeyboardView, { ...props }));
|
|
96
|
+
}
|
|
97
|
+
BasaltView.displayName = 'View';
|
|
98
|
+
exports.default = BasaltView;
|
|
99
|
+
//# sourceMappingURL=View.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"View.js","sourceRoot":"","sources":["../../../src/overrides/View.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,+FAAuE;AACvE,6CAA+B;AAG/B,sDAAiD;AAcjD,gEAAgE;AAChE,SAAS,YAAY,CAAC,KAAY;IAChC,MAAM,EAAC,aAAa,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,EAAC,GAAG,KAAyB,CAAC;IAC3E,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE/C,6EAA6E;IAC7E,yEAAyE;IACzE,yEAAyE;IACzE,oBAAoB;IACpB,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,CAC9B,CAAC,IAAoB,EAAE,EAAE;QACvB,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;QACnB,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;YAC9B,GAAG,CAAC,IAAI,CAAC,CAAC;QACZ,CAAC;aAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACtB,GAAiC,CAAC,OAAO,GAAG,IAAI,CAAC;QACpD,CAAC;IACH,CAAC,EACD,CAAC,GAAG,CAAC,CACN,CAAC;IAEF,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAC/B,CAAC,OAAmB,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,EAAC,WAAW,EAAE,OAAO,EAAC,CAAC,EAC5D,CAAC,SAAS,CAAC,CACZ,CAAC;IACF,IAAA,+BAAc,EAAC,GAAG,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;IAE5C,OAAO,uBAAC,cAAI,OAAK,IAAI,EAAE,GAAG,EAAE,MAAM,GAAI,CAAC;AACzC,CAAC;AAED,SAAS,UAAU,CAAC,KAAY;IAC9B,0EAA0E;IAC1E,gCAAgC;IAChC,OAAQ,KAAkB,CAAC,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC,CACjD,uBAAC,cAAI,OAAK,KAAK,GAAI,CACpB,CAAC,CAAC,CAAC,CACF,uBAAC,YAAY,OAAK,KAAK,GAAI,CAC5B,CAAC;AACJ,CAAC;AAED,UAAU,CAAC,WAAW,GAAG,MAAM,CAAC;AAEhC,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Platform`, for a desktop React Native platform.
|
|
3
|
+
*
|
|
4
|
+
* React Native ships `Platform.android.js` and `Platform.ios.js`, and a
|
|
5
|
+
* `Platform.js` whose entire body is `import Platform from './Platform'` -- a
|
|
6
|
+
* shim that exists so deep imports keep working, and which relies on a
|
|
7
|
+
* platform-specific file winning the resolution. Bundle for a platform React
|
|
8
|
+
* Native has never heard of and that import resolves to the shim itself, so
|
|
9
|
+
* `Platform.constants` comes out undefined and the first thing to touch it
|
|
10
|
+
* dies:
|
|
11
|
+
*
|
|
12
|
+
* TypeError: Cannot read property 'isDisableAnimations' of undefined
|
|
13
|
+
*
|
|
14
|
+
* So a `Platform` has to exist for each of them, and `metro-config.js` is what
|
|
15
|
+
* puts it in the shim's place.
|
|
16
|
+
*
|
|
17
|
+
* The only thing that differs between linux, macos and windows is the string.
|
|
18
|
+
* Three copies of this file would be three chances for them to drift, and the
|
|
19
|
+
* drift would be silent -- so there is one implementation and three two-line
|
|
20
|
+
* modules beside it, which is also what makes `Platform.select` behave
|
|
21
|
+
* identically on all three without anybody having to check.
|
|
22
|
+
*
|
|
23
|
+
* Constants come from `NativePlatformConstantsAndroid`. That is not a
|
|
24
|
+
* placeholder: ReactCxxPlatform's PlatformConstantsModule genuinely returns
|
|
25
|
+
* `PlatformConstantsAndroid`, so this is the spec the native side implements,
|
|
26
|
+
* on every desktop.
|
|
27
|
+
*
|
|
28
|
+
* @format
|
|
29
|
+
*/
|
|
30
|
+
import type { DesktopOS, DesktopPlatform } from './Platform';
|
|
31
|
+
export default function createPlatform(os: DesktopOS): DesktopPlatform;
|
|
32
|
+
//# sourceMappingURL=createPlatform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPlatform.d.ts","sourceRoot":"","sources":["../../../src/overrides/createPlatform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAMH,OAAO,KAAK,EAAC,SAAS,EAAE,eAAe,EAAoB,MAAM,YAAY,CAAC;AAE9E,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,EAAE,SAAS,GAAG,eAAe,CAsDrE"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Platform`, for a desktop React Native platform.
|
|
3
|
+
*
|
|
4
|
+
* React Native ships `Platform.android.js` and `Platform.ios.js`, and a
|
|
5
|
+
* `Platform.js` whose entire body is `import Platform from './Platform'` -- a
|
|
6
|
+
* shim that exists so deep imports keep working, and which relies on a
|
|
7
|
+
* platform-specific file winning the resolution. Bundle for a platform React
|
|
8
|
+
* Native has never heard of and that import resolves to the shim itself, so
|
|
9
|
+
* `Platform.constants` comes out undefined and the first thing to touch it
|
|
10
|
+
* dies:
|
|
11
|
+
*
|
|
12
|
+
* TypeError: Cannot read property 'isDisableAnimations' of undefined
|
|
13
|
+
*
|
|
14
|
+
* So a `Platform` has to exist for each of them, and `metro-config.js` is what
|
|
15
|
+
* puts it in the shim's place.
|
|
16
|
+
*
|
|
17
|
+
* The only thing that differs between linux, macos and windows is the string.
|
|
18
|
+
* Three copies of this file would be three chances for them to drift, and the
|
|
19
|
+
* drift would be silent -- so there is one implementation and three two-line
|
|
20
|
+
* modules beside it, which is also what makes `Platform.select` behave
|
|
21
|
+
* identically on all three without anybody having to check.
|
|
22
|
+
*
|
|
23
|
+
* Constants come from `NativePlatformConstantsAndroid`. That is not a
|
|
24
|
+
* placeholder: ReactCxxPlatform's PlatformConstantsModule genuinely returns
|
|
25
|
+
* `PlatformConstantsAndroid`, so this is the spec the native side implements,
|
|
26
|
+
* on every desktop.
|
|
27
|
+
*
|
|
28
|
+
* @format
|
|
29
|
+
*/
|
|
30
|
+
'use strict';
|
|
31
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.default = createPlatform;
|
|
36
|
+
const NativePlatformConstantsAndroid_1 = __importDefault(require("basalt-core/upstream/Libraries/Utilities/NativePlatformConstantsAndroid"));
|
|
37
|
+
function createPlatform(os) {
|
|
38
|
+
return {
|
|
39
|
+
__constants: null,
|
|
40
|
+
OS: os,
|
|
41
|
+
get Version() {
|
|
42
|
+
return this.constants.Version;
|
|
43
|
+
},
|
|
44
|
+
get constants() {
|
|
45
|
+
// Assigned on the line above, which the compiler cannot see through a
|
|
46
|
+
// getter reading `this`.
|
|
47
|
+
if (this.__constants == null) {
|
|
48
|
+
this.__constants = NativePlatformConstantsAndroid_1.default.getConstants();
|
|
49
|
+
}
|
|
50
|
+
return this.__constants;
|
|
51
|
+
},
|
|
52
|
+
get isTesting() {
|
|
53
|
+
if (__DEV__) {
|
|
54
|
+
return this.constants.isTesting;
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
},
|
|
58
|
+
get isDisableAnimations() {
|
|
59
|
+
return this.constants.isDisableAnimations ?? this.isTesting;
|
|
60
|
+
},
|
|
61
|
+
// Neither is a thing on a desktop, and both are read unconditionally by
|
|
62
|
+
// React Native's own code, so they answer rather than throw.
|
|
63
|
+
get isTV() {
|
|
64
|
+
return false;
|
|
65
|
+
},
|
|
66
|
+
get isVision() {
|
|
67
|
+
return false;
|
|
68
|
+
},
|
|
69
|
+
// This platform first, then `native`, then `default` -- the same shape as
|
|
70
|
+
// every other platform's select, so `Platform.select({native: ...,
|
|
71
|
+
// default: ...})` keeps working in shared code.
|
|
72
|
+
//
|
|
73
|
+
// `desktop` is deliberately *not* a key here. It would be useful, and
|
|
74
|
+
// adding it would mean shared code written against this project behaves
|
|
75
|
+
// differently under React Native's own Platform.select on iOS -- which is
|
|
76
|
+
// exactly the kind of divergence a project about consistency should not
|
|
77
|
+
// introduce. If desktop-vs-mobile branching is wanted, it belongs in an
|
|
78
|
+
// explicit helper rather than smuggled into an API React Native owns.
|
|
79
|
+
select(spec) {
|
|
80
|
+
return os in spec ? spec[os] : 'native' in spec ? spec.native : spec.default;
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=createPlatform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPlatform.js","sourceRoot":"","sources":["../../../src/overrides/createPlatform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,YAAY,CAAC;;;;;AAMb,iCAsDC;AA1DD,6IAA8G;AAI9G,SAAwB,cAAc,CAAC,EAAa;IAClD,OAAO;QACL,WAAW,EAAE,IAAgC;QAE7C,EAAE,EAAE,EAAE;QAEN,IAAI,OAAO;YACT,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;QAChC,CAAC;QAED,IAAI,SAAS;YACX,sEAAsE;YACtE,yBAAyB;YACzB,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;gBAC7B,IAAI,CAAC,WAAW,GAAG,wCAAuB,CAAC,YAAY,EAAuB,CAAC;YACjF,CAAC;YACD,OAAO,IAAI,CAAC,WAAW,CAAC;QAC1B,CAAC;QAED,IAAI,SAAS;YACX,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;YAClC,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,mBAAmB;YACrB,OAAO,IAAI,CAAC,SAAS,CAAC,mBAAmB,IAAI,IAAI,CAAC,SAAS,CAAC;QAC9D,CAAC;QAED,wEAAwE;QACxE,6DAA6D;QAC7D,IAAI,IAAI;YACN,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,QAAQ;YACV,OAAO,KAAK,CAAC;QACf,CAAC;QAED,0EAA0E;QAC1E,mEAAmE;QACnE,gDAAgD;QAChD,EAAE;QACF,sEAAsE;QACtE,wEAAwE;QACxE,0EAA0E;QAC1E,wEAAwE;QACxE,wEAAwE;QACxE,sEAAsE;QACtE,MAAM,CAAI,IAAmD;YAC3D,OAAO,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/E,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `setUpDeveloperTools`, for a desktop React Native platform.
|
|
3
|
+
*
|
|
4
|
+
* React Native's own file, with one thing added: a listener that lets the host
|
|
5
|
+
* drive the developer menu.
|
|
6
|
+
*
|
|
7
|
+
* Of the three things that menu does, two need nothing from here.
|
|
8
|
+
* `toggleElementInspector` is React Native's own device event and
|
|
9
|
+
* `AppContainer-dev.js` already listens for it; `openDebugger` is a method on
|
|
10
|
+
* `ReactHost`. Reload is the odd one out, and the reason this override exists:
|
|
11
|
+
* it lives on `ReactHost::reloadReactInstance`, which is private, and the only
|
|
12
|
+
* thing wired to it is the callback React Native's `DevSettings` module holds.
|
|
13
|
+
* So the host asks JavaScript to make the call, and this is what hears it.
|
|
14
|
+
*
|
|
15
|
+
* Why here rather than in a module an app imports: this file runs from
|
|
16
|
+
* `InitializeCore` in every development bundle, before any application code,
|
|
17
|
+
* and an app that imports nothing from `basalt-core` still gets a
|
|
18
|
+
* working dev menu. That is also why it is a copy of upstream plus a listener
|
|
19
|
+
* rather than something of our own -- the file has to keep doing its own job.
|
|
20
|
+
*
|
|
21
|
+
* The upstream half is deliberately unmodified. When it changes, this should be
|
|
22
|
+
* recopied rather than merged: everything below the marker is ours and
|
|
23
|
+
* everything above it is React Native's.
|
|
24
|
+
*
|
|
25
|
+
* @format
|
|
26
|
+
*/
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=setUpDeveloperTools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setUpDeveloperTools.d.ts","sourceRoot":"","sources":["../../../src/overrides/setUpDeveloperTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `setUpDeveloperTools`, for a desktop React Native platform.
|
|
4
|
+
*
|
|
5
|
+
* React Native's own file, with one thing added: a listener that lets the host
|
|
6
|
+
* drive the developer menu.
|
|
7
|
+
*
|
|
8
|
+
* Of the three things that menu does, two need nothing from here.
|
|
9
|
+
* `toggleElementInspector` is React Native's own device event and
|
|
10
|
+
* `AppContainer-dev.js` already listens for it; `openDebugger` is a method on
|
|
11
|
+
* `ReactHost`. Reload is the odd one out, and the reason this override exists:
|
|
12
|
+
* it lives on `ReactHost::reloadReactInstance`, which is private, and the only
|
|
13
|
+
* thing wired to it is the callback React Native's `DevSettings` module holds.
|
|
14
|
+
* So the host asks JavaScript to make the call, and this is what hears it.
|
|
15
|
+
*
|
|
16
|
+
* Why here rather than in a module an app imports: this file runs from
|
|
17
|
+
* `InitializeCore` in every development bundle, before any application code,
|
|
18
|
+
* and an app that imports nothing from `basalt-core` still gets a
|
|
19
|
+
* working dev menu. That is also why it is a copy of upstream plus a listener
|
|
20
|
+
* rather than something of our own -- the file has to keep doing its own job.
|
|
21
|
+
*
|
|
22
|
+
* The upstream half is deliberately unmodified. When it changes, this should be
|
|
23
|
+
* recopied rather than merged: everything below the marker is ours and
|
|
24
|
+
* everything above it is React Native's.
|
|
25
|
+
*
|
|
26
|
+
* @format
|
|
27
|
+
*/
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
const Platform_1 = __importDefault(require("basalt-core/upstream/Libraries/Utilities/Platform"));
|
|
33
|
+
/**
|
|
34
|
+
* Sets up developer tools for React Native.
|
|
35
|
+
* You can use this module directly, or just require InitializeCore.
|
|
36
|
+
*/
|
|
37
|
+
if (__DEV__) {
|
|
38
|
+
if (!Platform_1.default.isTesting) {
|
|
39
|
+
const HMRClient = require('basalt-core/upstream/Libraries/Utilities/HMRClient').default;
|
|
40
|
+
// TODO(T214991636): Remove legacy Metro log forwarding
|
|
41
|
+
if (console._isPolyfilled) {
|
|
42
|
+
// We assume full control over the console and send JavaScript logs to Metro.
|
|
43
|
+
([
|
|
44
|
+
'trace',
|
|
45
|
+
'info',
|
|
46
|
+
'warn',
|
|
47
|
+
'error',
|
|
48
|
+
'log',
|
|
49
|
+
'group',
|
|
50
|
+
'groupCollapsed',
|
|
51
|
+
'groupEnd',
|
|
52
|
+
'debug',
|
|
53
|
+
]).forEach(level => {
|
|
54
|
+
const originalFunction = console[level];
|
|
55
|
+
console[level] = function (...args) {
|
|
56
|
+
HMRClient.log(level, args);
|
|
57
|
+
originalFunction.apply(console, args);
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
require('basalt-core/upstream/Libraries/Core/setUpReactRefresh');
|
|
63
|
+
// Metro's own global, whose name carries a configurable prefix, so it cannot
|
|
64
|
+
// be a declared property of anything.
|
|
65
|
+
global[`${global.__METRO_GLOBAL_PREFIX__ ?? ''}__loadBundleAsync`] =
|
|
66
|
+
require('basalt-core/upstream/Libraries/Core/Devtools/loadBundleFromServer').default;
|
|
67
|
+
// --- basalt-core -------------------------------------------------
|
|
68
|
+
//
|
|
69
|
+
// The host's half of the developer menu. `basaltDevMenu` and `reload` are
|
|
70
|
+
// spelled in native/core/DevMenu.h, which is the only other place they
|
|
71
|
+
// appear.
|
|
72
|
+
const RCTDeviceEventEmitter = require('basalt-core/upstream/Libraries/EventEmitter/RCTDeviceEventEmitter').default;
|
|
73
|
+
const DevSettings = require('basalt-core/upstream/Libraries/Utilities/DevSettings').default;
|
|
74
|
+
RCTDeviceEventEmitter.addListener('basaltDevMenu', (action) => {
|
|
75
|
+
switch (action) {
|
|
76
|
+
case 'reload':
|
|
77
|
+
DevSettings.reload('dev menu');
|
|
78
|
+
break;
|
|
79
|
+
default:
|
|
80
|
+
console.warn(`basalt: unknown dev menu action '${action}'`);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=setUpDeveloperTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setUpDeveloperTools.js","sourceRoot":"","sources":["../../../src/overrides/setUpDeveloperTools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;;;AAEH,iGAAyE;AAOzE;;;GAGG;AACH,IAAI,OAAO,EAAE,CAAC;IACZ,IAAI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AM;YACR;gBACE,OAAO,CAAC,IAAI,CAAC,oCAAoC,MAAM,GAAG,CAAC,CAAC;QAChE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native's XHR/fetch globals, with one of them repaired.
|
|
3
|
+
*
|
|
4
|
+
* This file exists for a single defect, and everything else in it is a copy of
|
|
5
|
+
* React Native's own `Libraries/Core/setUpXHR.js`.
|
|
6
|
+
*
|
|
7
|
+
* ## The defect
|
|
8
|
+
*
|
|
9
|
+
* `fetch` is whatwg-fetch, and whatwg-fetch sets `xhr.responseType = 'blob'`
|
|
10
|
+
* on *every* request whenever `Blob` and `FileReader` are globals -- which they
|
|
11
|
+
* are here, since phase 31. React Native's XMLHttpRequest then asks the
|
|
12
|
+
* platform for a `blob` response and expects `{blobId, offset, size}` back.
|
|
13
|
+
*
|
|
14
|
+
* ReactCxxPlatform's NetworkingModule has no blob case at all: its
|
|
15
|
+
* `encodeResponseBody` handles `base64` and returns every other body as a
|
|
16
|
+
* string. So the response arrives as a string, and the `response` getter throws
|
|
17
|
+
*
|
|
18
|
+
* Invalid response for blob - expecting object, was string: ...
|
|
19
|
+
*
|
|
20
|
+
* before whatwg-fetch has even built a Response. That is not a failure mode of
|
|
21
|
+
* `.blob()` -- it takes down `.text()` and `.json()` too, on a 200, in release
|
|
22
|
+
* builds as much as in development. Every `fetch` in an app, in other words.
|
|
23
|
+
* Supplying `Blob` is what triggered it: the polyfill upgraded itself onto a
|
|
24
|
+
* path the platform had never implemented.
|
|
25
|
+
*
|
|
26
|
+
* ## The repair
|
|
27
|
+
*
|
|
28
|
+
* A `blob` response type is served through `base64`, which upstream *does*
|
|
29
|
+
* implement and which is the only response type that survives the trip
|
|
30
|
+
* intact -- a JavaScript string cannot carry arbitrary bytes, so `text` would
|
|
31
|
+
* corrupt anything that is not UTF-8, and corrupting binary downloads silently
|
|
32
|
+
* would be worse than the throw this replaces.
|
|
33
|
+
*
|
|
34
|
+
* So: ask for `arraybuffer` (which the XHR maps to a native `base64` request),
|
|
35
|
+
* re-encode those bytes as base64, and hand them to BlobModule's `base64` part
|
|
36
|
+
* type -- which core/BlobModule.cpp decodes back to the original bytes. The
|
|
37
|
+
* round trip is lossless, and `.blob()` on a PNG gives back that PNG.
|
|
38
|
+
*
|
|
39
|
+
* The proper fix is upstream: a blob case in ReactCxxPlatform's
|
|
40
|
+
* NetworkingModule, at which point this file can go. NetworkingModule is a CRTP
|
|
41
|
+
* TurboModule spec whose delivery method is private and non-virtual, so it
|
|
42
|
+
* cannot be subclassed from here -- replacing it wholesale would mean
|
|
43
|
+
* reimplementing every method to change one.
|
|
44
|
+
*/
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=setUpXHR.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setUpXHR.d.ts","sourceRoot":"","sources":["../../../src/overrides/setUpXHR.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native's XHR/fetch globals, with one of them repaired.
|
|
3
|
+
*
|
|
4
|
+
* This file exists for a single defect, and everything else in it is a copy of
|
|
5
|
+
* React Native's own `Libraries/Core/setUpXHR.js`.
|
|
6
|
+
*
|
|
7
|
+
* ## The defect
|
|
8
|
+
*
|
|
9
|
+
* `fetch` is whatwg-fetch, and whatwg-fetch sets `xhr.responseType = 'blob'`
|
|
10
|
+
* on *every* request whenever `Blob` and `FileReader` are globals -- which they
|
|
11
|
+
* are here, since phase 31. React Native's XMLHttpRequest then asks the
|
|
12
|
+
* platform for a `blob` response and expects `{blobId, offset, size}` back.
|
|
13
|
+
*
|
|
14
|
+
* ReactCxxPlatform's NetworkingModule has no blob case at all: its
|
|
15
|
+
* `encodeResponseBody` handles `base64` and returns every other body as a
|
|
16
|
+
* string. So the response arrives as a string, and the `response` getter throws
|
|
17
|
+
*
|
|
18
|
+
* Invalid response for blob - expecting object, was string: ...
|
|
19
|
+
*
|
|
20
|
+
* before whatwg-fetch has even built a Response. That is not a failure mode of
|
|
21
|
+
* `.blob()` -- it takes down `.text()` and `.json()` too, on a 200, in release
|
|
22
|
+
* builds as much as in development. Every `fetch` in an app, in other words.
|
|
23
|
+
* Supplying `Blob` is what triggered it: the polyfill upgraded itself onto a
|
|
24
|
+
* path the platform had never implemented.
|
|
25
|
+
*
|
|
26
|
+
* ## The repair
|
|
27
|
+
*
|
|
28
|
+
* A `blob` response type is served through `base64`, which upstream *does*
|
|
29
|
+
* implement and which is the only response type that survives the trip
|
|
30
|
+
* intact -- a JavaScript string cannot carry arbitrary bytes, so `text` would
|
|
31
|
+
* corrupt anything that is not UTF-8, and corrupting binary downloads silently
|
|
32
|
+
* would be worse than the throw this replaces.
|
|
33
|
+
*
|
|
34
|
+
* So: ask for `arraybuffer` (which the XHR maps to a native `base64` request),
|
|
35
|
+
* re-encode those bytes as base64, and hand them to BlobModule's `base64` part
|
|
36
|
+
* type -- which core/BlobModule.cpp decodes back to the original bytes. The
|
|
37
|
+
* round trip is lossless, and `.blob()` on a PNG gives back that PNG.
|
|
38
|
+
*
|
|
39
|
+
* The proper fix is upstream: a blob case in ReactCxxPlatform's
|
|
40
|
+
* NetworkingModule, at which point this file can go. NetworkingModule is a CRTP
|
|
41
|
+
* TurboModule spec whose delivery method is private and non-virtual, so it
|
|
42
|
+
* cannot be subclassed from here -- replacing it wholesale would mean
|
|
43
|
+
* reimplementing every method to change one.
|
|
44
|
+
*/
|
|
45
|
+
'use strict';
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
const { polyfillGlobal } = require('basalt-core/upstream/Libraries/Utilities/PolyfillFunctions');
|
|
48
|
+
const base64 = require('base64-js');
|
|
49
|
+
const { createResponseBodyReader } = require('../responseBody');
|
|
50
|
+
const { headersToObject } = require('../responseHeaders');
|
|
51
|
+
// One reader for the process: what it learns about this platform on the first
|
|
52
|
+
// decisive body applies to every response after it.
|
|
53
|
+
const readResponseBody = createResponseBodyReader();
|
|
54
|
+
let warnedAboutUnencodedBodies = false;
|
|
55
|
+
/**
|
|
56
|
+
* Said once, in the log, because it is a property of the build rather than of a
|
|
57
|
+
* request.
|
|
58
|
+
*
|
|
59
|
+
* **Not `console.warn`**, which is what this was: a warning opens LogBox, and
|
|
60
|
+
* LogBox is for something the person can do something about. Every app on a
|
|
61
|
+
* React Native at or below 0.86 hits this on its first blob response -- which is
|
|
62
|
+
* every `fetch(...).json()` -- so it appeared on start-up, in front of the app,
|
|
63
|
+
* for a fact about ReactCxxPlatform that no app can change. That is the thing
|
|
64
|
+
* core/BlobModule.cpp declines to do two files away: "a warning every app sees
|
|
65
|
+
* and nobody can act on is noise."
|
|
66
|
+
*
|
|
67
|
+
* Still said, because it is not nothing: a developer whose downloaded image is
|
|
68
|
+
* corrupt needs this sentence, and the log is where they will be looking. A text
|
|
69
|
+
* body -- the common case -- is unaffected either way.
|
|
70
|
+
*/
|
|
71
|
+
function warnOnceAboutUnencodedBodies() {
|
|
72
|
+
if (warnedAboutUnencodedBodies) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
warnedAboutUnencodedBodies = true;
|
|
76
|
+
console.log("basalt: this React Native's ReactCxxPlatform delivers response bodies " +
|
|
77
|
+
'unencoded even when base64 was asked for, so a binary body read through ' +
|
|
78
|
+
'`.blob()` or `.arrayBuffer()` will be damaged. Text bodies, including ' +
|
|
79
|
+
'every `.json()`, are unaffected. Fixed upstream after 0.86 by ' +
|
|
80
|
+
"NetworkingModule's encodeResponseBody; see src/responseBody.ts.");
|
|
81
|
+
}
|
|
82
|
+
const BaseXMLHttpRequest = require('basalt-core/upstream/Libraries/Network/XMLHttpRequest').default;
|
|
83
|
+
const BlobManager = require('basalt-core/upstream/Libraries/Blob/BlobManager').default;
|
|
84
|
+
const NativeBlobModule = require('basalt-core/upstream/Libraries/Blob/NativeBlobModule').default;
|
|
85
|
+
// Same shape as the one inside BlobManager, which is not exported.
|
|
86
|
+
function uuidv4() {
|
|
87
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|
|
88
|
+
const r = (Math.random() * 16) | 0;
|
|
89
|
+
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
90
|
+
return v.toString(16);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
// Patched on the prototype rather than in a subclass.
|
|
94
|
+
//
|
|
95
|
+
// A subclass only fixes the class it is: anything that imports
|
|
96
|
+
// `Libraries/Network/XMLHttpRequest` directly rather than reading the global
|
|
97
|
+
// gets the unpatched one, and the two are indistinguishable until a response
|
|
98
|
+
// arrives. Patching the prototype fixes every instance however it was made.
|
|
99
|
+
const proto = BaseXMLHttpRequest.prototype;
|
|
100
|
+
/**
|
|
101
|
+
* The accessors this file wraps, on React Native's own XMLHttpRequest.
|
|
102
|
+
*
|
|
103
|
+
* A getter is required and a setter is not, which is not laxness: `response`
|
|
104
|
+
* is read-only on every XMLHttpRequest, including React Native's, so demanding
|
|
105
|
+
* a setter for it fails on a perfectly correct one. That mistake was made here
|
|
106
|
+
* once and only the running app found it -- the types were happy either way.
|
|
107
|
+
*
|
|
108
|
+
* A missing *getter* is a different thing: it means this override no longer
|
|
109
|
+
* matches the React Native it is shadowing, which is worth failing loudly on
|
|
110
|
+
* rather than quietly not wrapping.
|
|
111
|
+
*/
|
|
112
|
+
function getterOf(name) {
|
|
113
|
+
const descriptor = Object.getOwnPropertyDescriptor(proto, name);
|
|
114
|
+
if (descriptor?.get == null) {
|
|
115
|
+
throw new Error(`basalt-core: XMLHttpRequest has no ${name} getter to wrap; ` +
|
|
116
|
+
'this override no longer matches this React Native.');
|
|
117
|
+
}
|
|
118
|
+
return descriptor.get;
|
|
119
|
+
}
|
|
120
|
+
function setterOf(name) {
|
|
121
|
+
const descriptor = Object.getOwnPropertyDescriptor(proto, name);
|
|
122
|
+
if (descriptor?.set == null) {
|
|
123
|
+
throw new Error(`basalt-core: XMLHttpRequest has no ${name} setter to wrap; ` +
|
|
124
|
+
'this override no longer matches this React Native.');
|
|
125
|
+
}
|
|
126
|
+
return descriptor.set;
|
|
127
|
+
}
|
|
128
|
+
const baseResponseType = { get: getterOf('responseType'), set: setterOf('responseType') };
|
|
129
|
+
const baseResponse = { get: getterOf('response') };
|
|
130
|
+
Object.defineProperty(proto, 'responseType', {
|
|
131
|
+
configurable: true,
|
|
132
|
+
get() {
|
|
133
|
+
// The caller asked for a blob and should be told it is getting one, even
|
|
134
|
+
// though `arraybuffer` is what was really requested.
|
|
135
|
+
return this.__rnbBlobRequested === true ? 'blob' : baseResponseType.get.call(this);
|
|
136
|
+
},
|
|
137
|
+
set(responseType) {
|
|
138
|
+
const wantsBlob = responseType === 'blob';
|
|
139
|
+
this.__rnbBlobRequested = wantsBlob;
|
|
140
|
+
this.__rnbBlob = undefined;
|
|
141
|
+
// Everything other than 'blob' is passed straight through, so this changes
|
|
142
|
+
// the behaviour of exactly one response type.
|
|
143
|
+
baseResponseType.set.call(this, wantsBlob ? 'arraybuffer' : responseType);
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
Object.defineProperty(proto, 'response', {
|
|
147
|
+
configurable: true,
|
|
148
|
+
get() {
|
|
149
|
+
if (this.__rnbBlobRequested !== true) {
|
|
150
|
+
return baseResponse.get.call(this);
|
|
151
|
+
}
|
|
152
|
+
if (this.__rnbBlob !== undefined) {
|
|
153
|
+
return this.__rnbBlob;
|
|
154
|
+
}
|
|
155
|
+
// Deliberately not `baseResponse.get`: that getter switches on the private
|
|
156
|
+
// `_responseType`, and going through it again is what this is working
|
|
157
|
+
// around. `_response` is the base64 text the platform delivered, because
|
|
158
|
+
// the setter above asked for `arraybuffer` -- so the bytes are the
|
|
159
|
+
// server's, exactly, and decoding them here needs nothing from the base
|
|
160
|
+
// class.
|
|
161
|
+
const encoded = this._response;
|
|
162
|
+
if (typeof encoded !== 'string' || encoded === '' || !NativeBlobModule) {
|
|
163
|
+
this.__rnbBlob = BlobManager.createFromParts([]);
|
|
164
|
+
return this.__rnbBlob;
|
|
165
|
+
}
|
|
166
|
+
// Whether that string is base64 is not something to assume: the encoding
|
|
167
|
+
// this asked for is only applied by ReactCxxPlatform after 0.86, and the
|
|
168
|
+
// version in use is the app's. See src/responseBody.ts, and the failure it
|
|
169
|
+
// was written for.
|
|
170
|
+
// The server's own byte count, now that response headers survive the bridge
|
|
171
|
+
// (see src/responseHeaders.ts). Absent on a chunked response, which is why
|
|
172
|
+
// the reader still has to be able to work it out without one.
|
|
173
|
+
const declared = Number.parseInt(this.getResponseHeader('content-length') ?? '', 10);
|
|
174
|
+
const { part, size, encoded: wasEncoded } = readResponseBody(encoded, Number.isNaN(declared) ? null : declared);
|
|
175
|
+
if (!wasEncoded) {
|
|
176
|
+
warnOnceAboutUnencodedBodies();
|
|
177
|
+
}
|
|
178
|
+
const blobId = uuidv4();
|
|
179
|
+
NativeBlobModule.createFromParts([part], blobId);
|
|
180
|
+
this.__rnbBlob = BlobManager.createFromOptions({
|
|
181
|
+
blobId,
|
|
182
|
+
offset: 0,
|
|
183
|
+
size,
|
|
184
|
+
type: this.getResponseHeader('content-type') ?? '',
|
|
185
|
+
});
|
|
186
|
+
return this.__rnbBlob;
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
/**
|
|
190
|
+
* The response headers, reshaped on the way in.
|
|
191
|
+
*
|
|
192
|
+
* `setResponseHeaders` is the one funnel: `__didReceiveResponse` calls it with
|
|
193
|
+
* whatever the platform sent, and it both stores the value and builds the
|
|
194
|
+
* lower-cased lookup that `getResponseHeader` and `Response.headers` read. So
|
|
195
|
+
* converting here fixes every reader at once, including `fetch`'s, which never
|
|
196
|
+
* touches the XHR itself.
|
|
197
|
+
*
|
|
198
|
+
* A method rather than an accessor, so it is wrapped by assignment; the
|
|
199
|
+
* accessors above need defineProperty because that is what they are.
|
|
200
|
+
*/
|
|
201
|
+
const baseSetResponseHeaders = proto.setResponseHeaders;
|
|
202
|
+
if (typeof baseSetResponseHeaders !== 'function') {
|
|
203
|
+
// The same argument the accessor check above makes: a missing one means this
|
|
204
|
+
// override no longer matches the React Native it is shadowing, and finding
|
|
205
|
+
// that out here beats finding it out from a header lookup that returns null.
|
|
206
|
+
throw new Error('basalt-core: XMLHttpRequest.prototype.setResponseHeaders is missing, ' +
|
|
207
|
+
'so response headers cannot be reshaped. See src/responseHeaders.ts.');
|
|
208
|
+
}
|
|
209
|
+
proto.setResponseHeaders = function setResponseHeaders(responseHeaders) {
|
|
210
|
+
baseSetResponseHeaders.call(this, headersToObject(responseHeaders));
|
|
211
|
+
};
|
|
212
|
+
polyfillGlobal('XMLHttpRequest', () => BaseXMLHttpRequest);
|
|
213
|
+
polyfillGlobal('FormData', () => require('basalt-core/upstream/Libraries/Network/FormData').default);
|
|
214
|
+
polyfillGlobal('fetch', () => require('basalt-core/upstream/Libraries/Network/fetch').fetch);
|
|
215
|
+
polyfillGlobal('Headers', () => require('basalt-core/upstream/Libraries/Network/fetch').Headers);
|
|
216
|
+
polyfillGlobal('Request', () => require('basalt-core/upstream/Libraries/Network/fetch').Request);
|
|
217
|
+
polyfillGlobal('Response', () => require('basalt-core/upstream/Libraries/Network/fetch').Response);
|
|
218
|
+
polyfillGlobal('WebSocket', () => require('basalt-core/upstream/Libraries/WebSocket/WebSocket').default);
|
|
219
|
+
polyfillGlobal('Blob', () => require('basalt-core/upstream/Libraries/Blob/Blob').default);
|
|
220
|
+
polyfillGlobal('File', () => require('basalt-core/upstream/Libraries/Blob/File').default);
|
|
221
|
+
polyfillGlobal('FileReader', () => require('basalt-core/upstream/Libraries/Blob/FileReader').default);
|
|
222
|
+
polyfillGlobal('URL', () => require('basalt-core/upstream/Libraries/Blob/URL').URL);
|
|
223
|
+
polyfillGlobal('URLSearchParams', () => require('basalt-core/upstream/Libraries/Blob/URL').URLSearchParams);
|
|
224
|
+
// The abort API moved into React Native's own source in 0.87; 0.86 polyfills
|
|
225
|
+
// it from the `abort-controller` package, which exports `AbortSignal` where
|
|
226
|
+
// React Native's exports `AbortSignal_public`. The resolver sends both
|
|
227
|
+
// specifiers to whichever exists -- see UPSTREAM_FALLBACKS in metro-config --
|
|
228
|
+
// and this takes whichever name came back, because a missing module is a
|
|
229
|
+
// bundling error that no try/catch here could have caught anyway.
|
|
230
|
+
polyfillGlobal('AbortController', () => require('basalt-core/upstream/src/private/webapis/dom/abort-api/AbortController')
|
|
231
|
+
.AbortController);
|
|
232
|
+
polyfillGlobal('AbortSignal', () => {
|
|
233
|
+
const module = require('basalt-core/upstream/src/private/webapis/dom/abort-api/AbortSignal');
|
|
234
|
+
return module.AbortSignal_public ?? module.AbortSignal;
|
|
235
|
+
});
|
|
236
|
+
//# sourceMappingURL=setUpXHR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setUpXHR.js","sourceRoot":"","sources":["../../../src/overrides/setUpXHR.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,YAAY,CAAC;;AAEb,MAAM,EAAC,cAAc,EAAC,GAAG,OAAO,CAAC,4DAA4D,CAAC,CAAC;AAC/F,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACpC,MAAM,EAAC,wBAAwB,EAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC9D,MAAM,EAAC,eAAe,EAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAExD,8EAA8E;AAC9E,oDAAoD;AACpD,MAAM,gBAAgB,GAAG,wBAAwB,EAAE,CAAC;AAEpD,IAAI,0BAA0B,GAAG,KAAK,CAAC;AAEvC;;;;;;;;;;;;;;;GAeG;AACH,SAAS,4BAA4B;IACnC,IAAI,0BAA0B,EAAE,CAAC;QAC/B,OAAO;IACT,CAAC;IACD,0BAA0B,GAAG,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