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,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Alert`, for a platform React Native's own copy has no branch for.
|
|
3
|
+
*
|
|
4
|
+
* The same problem `Share.js` has, in a module this project believed was
|
|
5
|
+
* finished. `Alert.alert()` reads
|
|
6
|
+
*
|
|
7
|
+
* if (Platform.OS === 'ios') { ... } else if (Platform.OS === 'android') { ... }
|
|
8
|
+
*
|
|
9
|
+
* with no `else`, so on a desktop it returns having done nothing at all -- no
|
|
10
|
+
* dialog, no error, no warning. `AlertManager` was implemented in phase 32 and
|
|
11
|
+
* was never once reached; js/alert.js logs "showing the alert" and then asserts
|
|
12
|
+
* only that the main queue kept running, which it does whether or not anything
|
|
13
|
+
* appeared. Found while implementing Share, which fails the same way for the
|
|
14
|
+
* same reason.
|
|
15
|
+
*
|
|
16
|
+
* ## Two breaks, not one
|
|
17
|
+
*
|
|
18
|
+
* Fixing `Alert.js` alone changed nothing, because `RCTAlertManager.js` is one
|
|
19
|
+
* of the self-importing shims and resolves to its `.android.js` sibling, which
|
|
20
|
+
* calls `DialogManagerAndroid` -- a module this platform does not have -- and
|
|
21
|
+
* returns. So this goes to `NativeAlertManager` directly.
|
|
22
|
+
*
|
|
23
|
+
* ## Which shape this uses
|
|
24
|
+
*
|
|
25
|
+
* The iOS one, because `AlertManager` is the iOS-shaped module: one method,
|
|
26
|
+
* `alertWithArgs(args, callback)`, answering with an index. Android's is
|
|
27
|
+
* `DialogManagerAndroid`, which is a different module this platform does not
|
|
28
|
+
* have.
|
|
29
|
+
*
|
|
30
|
+
* With one difference, and it is the module's rather than this file's. React
|
|
31
|
+
* Native's iOS path builds `buttons` as `[{0: 'Cancel'}, {1: 'Delete'}]` --
|
|
32
|
+
* objects keyed by index -- and `DesktopAlertModule` reads `[{text: 'Cancel'}]`.
|
|
33
|
+
* The second is the shape the rest of React Native uses for a button, and it is
|
|
34
|
+
* the one kept here; nothing but this file calls that module.
|
|
35
|
+
*
|
|
36
|
+
* @format
|
|
37
|
+
*/
|
|
38
|
+
export type AlertType = 'default' | 'plain-text' | 'secure-text' | 'login-password';
|
|
39
|
+
export type AlertButtonStyle = 'default' | 'cancel' | 'destructive';
|
|
40
|
+
export type AlertButton = {
|
|
41
|
+
text?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The value is the text a prompt collected; `alert`'s buttons are called
|
|
44
|
+
* with nothing. One signature covers both, which is what React Native's own
|
|
45
|
+
* does.
|
|
46
|
+
*/
|
|
47
|
+
onPress?: ((value?: string) => unknown) | null;
|
|
48
|
+
isPreferred?: boolean;
|
|
49
|
+
style?: AlertButtonStyle;
|
|
50
|
+
};
|
|
51
|
+
export type AlertButtons = Array<AlertButton>;
|
|
52
|
+
export type AlertOptions = {
|
|
53
|
+
cancelable?: boolean | null;
|
|
54
|
+
userInterfaceStyle?: 'unspecified' | 'light' | 'dark';
|
|
55
|
+
onDismiss?: (() => void) | null;
|
|
56
|
+
};
|
|
57
|
+
declare class Alert {
|
|
58
|
+
static alert(title: string | null | undefined, message?: string | null, buttons?: AlertButtons, options?: AlertOptions): void;
|
|
59
|
+
/**
|
|
60
|
+
* A prompt with a text field.
|
|
61
|
+
*
|
|
62
|
+
* `login-password` is not offered: it is two fields and a layout, and
|
|
63
|
+
* answering it with one would silently lose the password. `DesktopAlertModule`
|
|
64
|
+
* warns and shows a plain alert if it is asked for.
|
|
65
|
+
*/
|
|
66
|
+
static prompt(title: string | null | undefined, message?: string | null, callbackOrButtons?: ((text: string) => void) | AlertButtons | null, type?: AlertType | null, defaultValue?: string, keyboardType?: string, options?: AlertOptions): void;
|
|
67
|
+
}
|
|
68
|
+
export default Alert;
|
|
69
|
+
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/overrides/Alert.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAWH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,aAAa,GAAG,gBAAgB,CAAC;AACpF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEpE,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,kBAAkB,CAAC,EAAE,aAAa,GAAG,OAAO,GAAG,MAAM,CAAC;IACtD,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;CACjC,CAAC;AAiEF,cAAM,KAAK;IACT,MAAM,CAAC,KAAK,CACV,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,EACvB,OAAO,CAAC,EAAE,YAAY,EACtB,OAAO,CAAC,EAAE,YAAY,GACrB,IAAI;IAIP;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,CACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,EACvB,iBAAiB,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,YAAY,GAAG,IAAI,EAClE,IAAI,GAAE,SAAS,GAAG,IAAmB,EACrC,YAAY,CAAC,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,YAAY,GACrB,IAAI;CAIR;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Alert`, for a platform React Native's own copy has no branch for.
|
|
3
|
+
*
|
|
4
|
+
* The same problem `Share.js` has, in a module this project believed was
|
|
5
|
+
* finished. `Alert.alert()` reads
|
|
6
|
+
*
|
|
7
|
+
* if (Platform.OS === 'ios') { ... } else if (Platform.OS === 'android') { ... }
|
|
8
|
+
*
|
|
9
|
+
* with no `else`, so on a desktop it returns having done nothing at all -- no
|
|
10
|
+
* dialog, no error, no warning. `AlertManager` was implemented in phase 32 and
|
|
11
|
+
* was never once reached; js/alert.js logs "showing the alert" and then asserts
|
|
12
|
+
* only that the main queue kept running, which it does whether or not anything
|
|
13
|
+
* appeared. Found while implementing Share, which fails the same way for the
|
|
14
|
+
* same reason.
|
|
15
|
+
*
|
|
16
|
+
* ## Two breaks, not one
|
|
17
|
+
*
|
|
18
|
+
* Fixing `Alert.js` alone changed nothing, because `RCTAlertManager.js` is one
|
|
19
|
+
* of the self-importing shims and resolves to its `.android.js` sibling, which
|
|
20
|
+
* calls `DialogManagerAndroid` -- a module this platform does not have -- and
|
|
21
|
+
* returns. So this goes to `NativeAlertManager` directly.
|
|
22
|
+
*
|
|
23
|
+
* ## Which shape this uses
|
|
24
|
+
*
|
|
25
|
+
* The iOS one, because `AlertManager` is the iOS-shaped module: one method,
|
|
26
|
+
* `alertWithArgs(args, callback)`, answering with an index. Android's is
|
|
27
|
+
* `DialogManagerAndroid`, which is a different module this platform does not
|
|
28
|
+
* have.
|
|
29
|
+
*
|
|
30
|
+
* With one difference, and it is the module's rather than this file's. React
|
|
31
|
+
* Native's iOS path builds `buttons` as `[{0: 'Cancel'}, {1: 'Delete'}]` --
|
|
32
|
+
* objects keyed by index -- and `DesktopAlertModule` reads `[{text: 'Cancel'}]`.
|
|
33
|
+
* The second is the shape the rest of React Native uses for a button, and it is
|
|
34
|
+
* the one kept here; nothing but this file calls that module.
|
|
35
|
+
*
|
|
36
|
+
* @format
|
|
37
|
+
*/
|
|
38
|
+
'use strict';
|
|
39
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
40
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
// `NativeAlertManager` directly, not `RCTAlertManager`. That file is one of the
|
|
44
|
+
// self-importing shims, so it resolves to its `.android.js` sibling -- which
|
|
45
|
+
// calls `DialogManagerAndroid`, a module this platform does not have, and
|
|
46
|
+
// returns having done nothing. It is the second break in the same chain and the
|
|
47
|
+
// reason the first fix alone changed nothing.
|
|
48
|
+
const NativeAlertManager_1 = __importDefault(require("basalt-core/upstream/Libraries/Alert/NativeAlertManager"));
|
|
49
|
+
// One place, because `alert` and `prompt` differ only in whether there is a
|
|
50
|
+
// field and what the buttons were given as.
|
|
51
|
+
function show(title, message, callbackOrButtons, type, defaultValue, options) {
|
|
52
|
+
const callbacks = [];
|
|
53
|
+
const buttons = [];
|
|
54
|
+
if (typeof callbackOrButtons === 'function') {
|
|
55
|
+
// `Alert.prompt(title, message, callback)`: one button, and the callback is
|
|
56
|
+
// what it does.
|
|
57
|
+
// `Alert.prompt`'s callback is declared as taking the text, and every
|
|
58
|
+
// caller below may pass undefined -- which for a prompt cannot happen,
|
|
59
|
+
// because the native side always answers with the field's contents. The
|
|
60
|
+
// cast records that rather than widening React Native's own signature.
|
|
61
|
+
callbacks[0] = callbackOrButtons;
|
|
62
|
+
buttons.push({ text: 'OK' });
|
|
63
|
+
}
|
|
64
|
+
else if (Array.isArray(callbackOrButtons)) {
|
|
65
|
+
callbackOrButtons.forEach((button, index) => {
|
|
66
|
+
callbacks[index] = button.onPress;
|
|
67
|
+
buttons.push({ text: button.text || 'OK' });
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (buttons.length === 0) {
|
|
71
|
+
// What `Alert.alert(title)` means everywhere: one button that dismisses it.
|
|
72
|
+
buttons.push({ text: 'OK' });
|
|
73
|
+
}
|
|
74
|
+
if (NativeAlertManager_1.default == null) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
NativeAlertManager_1.default.alertWithArgs({
|
|
78
|
+
title: title || '',
|
|
79
|
+
message: message || undefined,
|
|
80
|
+
buttons,
|
|
81
|
+
type: type || undefined,
|
|
82
|
+
defaultValue,
|
|
83
|
+
}, (index, value) => {
|
|
84
|
+
const callback = callbacks[index];
|
|
85
|
+
if (callback) {
|
|
86
|
+
callback(value);
|
|
87
|
+
}
|
|
88
|
+
// `options.onDismiss` is Android's, and a desktop dialog is dismissed
|
|
89
|
+
// however it closes -- so it runs whichever button was pressed.
|
|
90
|
+
if (options && typeof options.onDismiss === 'function') {
|
|
91
|
+
options.onDismiss();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
class Alert {
|
|
96
|
+
static alert(title, message, buttons, options) {
|
|
97
|
+
show(title, message, buttons, 'default', undefined, options);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* A prompt with a text field.
|
|
101
|
+
*
|
|
102
|
+
* `login-password` is not offered: it is two fields and a layout, and
|
|
103
|
+
* answering it with one would silently lose the password. `DesktopAlertModule`
|
|
104
|
+
* warns and shows a plain alert if it is asked for.
|
|
105
|
+
*/
|
|
106
|
+
static prompt(title, message, callbackOrButtons, type = 'plain-text', defaultValue, keyboardType, options) {
|
|
107
|
+
void keyboardType;
|
|
108
|
+
show(title, message, callbackOrButtons, type, defaultValue, options);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.default = Alert;
|
|
112
|
+
//# sourceMappingURL=Alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/overrides/Alert.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,YAAY,CAAC;;;;;AAEb,gFAAgF;AAChF,6EAA6E;AAC7E,0EAA0E;AAC1E,gFAAgF;AAChF,8CAA8C;AAC9C,iHAAyF;AA4BzF,4EAA4E;AAC5E,4CAA4C;AAC5C,SAAS,IAAI,CACX,KAAgC,EAChC,OAAuB,EACvB,iBAAkE,EAClE,IAAuB,EACvB,YAAqB,EACrB,OAAsB;IAEtB,MAAM,SAAS,GAAoB,EAAE,CAAC;IACtC,MAAM,OAAO,GAA0B,EAAE,CAAC;IAE1C,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE,CAAC;QAC5C,4EAA4E;QAC5E,gBAAgB;QAChB,sEAAsE;QACtE,uEAAuE;QACvE,wEAAwE;QACxE,uEAAuE;QACvE,SAAS,CAAC,CAAC,CAAC,GAAG,iBAAgD,CAAC;QAChE,OAAO,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;IAC7B,CAAC;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAC5C,iBAAiB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAC1C,SAAS,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;YAClC,OAAO,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,IAAI,EAAC,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,4EAA4E;QAC5E,OAAO,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;IAC7B,CAAC;IAED,IAAI,4BAAkB,IAAI,IAAI,EAAE,CAAC;QAC/B,OAAO;IACT,CAAC;IAED,4BAAkB,CAAC,aAAa,CAC9B;QACE,KAAK,EAAE,KAAK,IAAI,EAAE;QAClB,OAAO,EAAE,OAAO,IAAI,SAAS;QAC7B,OAAO;QACP,IAAI,EAAE,IAAI,IAAI,SAAS;QACvB,YAAY;KACb,EACD,CAAC,KAAa,EAAE,KAAc,EAAE,EAAE;QAChC,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,QAAQ,EAAE,CAAC;YACb,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;QACD,sEAAsE;QACtE,gEAAgE;QAChE,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,SAAS,KAAK,UAAU,EAAE,CAAC;YACvD,OAAO,CAAC,SAAS,EAAE,CAAC;QACtB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,KAAK;IACT,MAAM,CAAC,KAAK,CACV,KAAgC,EAChC,OAAuB,EACvB,OAAsB,EACtB,OAAsB;QAEtB,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,CACX,KAAgC,EAChC,OAAuB,EACvB,iBAAkE,EAClE,OAAyB,YAAY,EACrC,YAAqB,EACrB,YAAqB,EACrB,OAAsB;QAEtB,KAAK,YAAY,CAAC;QAClB,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AAED,kBAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native's own base view config, plus three props it forgot to declare.
|
|
3
|
+
*
|
|
4
|
+
* `onPointerDown`, `onPointerUp` and `onPointerCancel` are registered in
|
|
5
|
+
* `bubblingEventTypes` -- `topPointerDown` and friends, with their bubbled and
|
|
6
|
+
* captured names -- and are supported the whole way down: `propsConversions.h`
|
|
7
|
+
* parses them into `ViewProps::events`, `PointerEventsProcessor` handles them,
|
|
8
|
+
* and `TouchEventEmitter::onPointerDown` exists to dispatch one.
|
|
9
|
+
*
|
|
10
|
+
* What is missing is one line in `validAttributes`, which lists
|
|
11
|
+
* `onPointerEnter`, `onPointerLeave`, `onPointerMove`, `onPointerOut` and
|
|
12
|
+
* `onPointerOver` and stops there. Without it React never sends the prop, so
|
|
13
|
+
* `ViewProps::events` never has the bit, so `shouldEmitPointerEvent` returns
|
|
14
|
+
* false and the event is dropped in C++ -- silently, and only for the three
|
|
15
|
+
* that were left out.
|
|
16
|
+
*
|
|
17
|
+
* The effect on a phone is nothing, because no phone has a mouse button to
|
|
18
|
+
* press. The effect here is that a right-click cannot be answered at all, which
|
|
19
|
+
* is what this platform needed them for; see core/PointerButtons.h.
|
|
20
|
+
*
|
|
21
|
+
* Reported rather than forked: the whole file is React Native's, this adds five
|
|
22
|
+
* keys, and it goes away when upstream adds them. See docs/BACKLOG.md.
|
|
23
|
+
*
|
|
24
|
+
* @format
|
|
25
|
+
*/
|
|
26
|
+
declare const _default: any;
|
|
27
|
+
export default _default;
|
|
28
|
+
//# sourceMappingURL=BaseViewConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseViewConfig.d.ts","sourceRoot":"","sources":["../../../src/overrides/BaseViewConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;AAiCH,wBAeE"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native's own base view config, plus three props it forgot to declare.
|
|
3
|
+
*
|
|
4
|
+
* `onPointerDown`, `onPointerUp` and `onPointerCancel` are registered in
|
|
5
|
+
* `bubblingEventTypes` -- `topPointerDown` and friends, with their bubbled and
|
|
6
|
+
* captured names -- and are supported the whole way down: `propsConversions.h`
|
|
7
|
+
* parses them into `ViewProps::events`, `PointerEventsProcessor` handles them,
|
|
8
|
+
* and `TouchEventEmitter::onPointerDown` exists to dispatch one.
|
|
9
|
+
*
|
|
10
|
+
* What is missing is one line in `validAttributes`, which lists
|
|
11
|
+
* `onPointerEnter`, `onPointerLeave`, `onPointerMove`, `onPointerOut` and
|
|
12
|
+
* `onPointerOver` and stops there. Without it React never sends the prop, so
|
|
13
|
+
* `ViewProps::events` never has the bit, so `shouldEmitPointerEvent` returns
|
|
14
|
+
* false and the event is dropped in C++ -- silently, and only for the three
|
|
15
|
+
* that were left out.
|
|
16
|
+
*
|
|
17
|
+
* The effect on a phone is nothing, because no phone has a mouse button to
|
|
18
|
+
* press. The effect here is that a right-click cannot be answered at all, which
|
|
19
|
+
* is what this platform needed them for; see core/PointerButtons.h.
|
|
20
|
+
*
|
|
21
|
+
* Reported rather than forked: the whole file is React Native's, this adds five
|
|
22
|
+
* keys, and it goes away when upstream adds them. See docs/BACKLOG.md.
|
|
23
|
+
*
|
|
24
|
+
* @format
|
|
25
|
+
*/
|
|
26
|
+
'use strict';
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
// Android's, for the reason every self-importing shim here is answered with
|
|
29
|
+
// Android's: these platforms report `PlatformConstantsAndroid` from C++, share
|
|
30
|
+
// ReactCommon's prop parsing, and drive the same components Android's
|
|
31
|
+
// JavaScript drives.
|
|
32
|
+
// A deep import into React Native, resolved by Metro and not through
|
|
33
|
+
// `exports`, so TypeScript cannot follow it -- hence the declaration rather
|
|
34
|
+
// than an import. The shape is React Native's own view config, for which it
|
|
35
|
+
// publishes no type.
|
|
36
|
+
//
|
|
37
|
+
// `.default` explicitly: that module is ESM and this is a `require`, so the
|
|
38
|
+
// interop an `import` would have done has to be done here. Without it the
|
|
39
|
+
// spread below copies a module namespace instead of the config, `validAttributes`
|
|
40
|
+
// is undefined, and every prop is dropped in JavaScript before it can reach
|
|
41
|
+
// C++. What that looks like from the outside is an app whose buttons have no
|
|
42
|
+
// accessibility role and whose fields cannot be focused -- which is how it was
|
|
43
|
+
// found.
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
+
//
|
|
46
|
+
// Through this package's own upstream prefix rather than by React Native's
|
|
47
|
+
// package path. Both reach the same file -- metro-config.ts turns the prefix
|
|
48
|
+
// into an absolute path -- but the literal specifier is a deep import into
|
|
49
|
+
// another package's internals, and React Native warns about those by name. That
|
|
50
|
+
// warning opened LogBox in front of every app on start-up, for a file the app
|
|
51
|
+
// did not write and cannot change, which is the whole of the reason the prefix
|
|
52
|
+
// exists. The other overrides in this directory already use it; this one was
|
|
53
|
+
// missed.
|
|
54
|
+
const upstream = require('basalt-core/upstream/Libraries/NativeComponent/BaseViewConfig.android');
|
|
55
|
+
const BaseViewConfig = upstream.default ?? upstream;
|
|
56
|
+
exports.default = {
|
|
57
|
+
...BaseViewConfig,
|
|
58
|
+
validAttributes: {
|
|
59
|
+
...BaseViewConfig.validAttributes,
|
|
60
|
+
// The three registered events upstream does not declare, with their capture
|
|
61
|
+
// phases. `onPointerCancel` is here for completeness rather than because
|
|
62
|
+
// anything emits one yet: a desktop pointer is cancelled by the window
|
|
63
|
+
// losing capture, which the hosts do not report.
|
|
64
|
+
onPointerDown: true,
|
|
65
|
+
onPointerDownCapture: true,
|
|
66
|
+
onPointerUp: true,
|
|
67
|
+
onPointerUpCapture: true,
|
|
68
|
+
onPointerCancel: true,
|
|
69
|
+
onPointerCancelCapture: true,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=BaseViewConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseViewConfig.js","sourceRoot":"","sources":["../../../src/overrides/BaseViewConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,YAAY,CAAC;;AAEb,4EAA4E;AAC5E,+EAA+E;AAC/E,sEAAsE;AACtE,qBAAqB;AACrB,qEAAqE;AACrE,4EAA4E;AAC5E,4EAA4E;AAC5E,qBAAqB;AACrB,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,kFAAkF;AAClF,4EAA4E;AAC5E,6EAA6E;AAC7E,+EAA+E;AAC/E,SAAS;AACT,8DAA8D;AAC9D,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,2EAA2E;AAC3E,gFAAgF;AAChF,8EAA8E;AAC9E,+EAA+E;AAC/E,6EAA6E;AAC7E,UAAU;AACV,MAAM,QAAQ,GAAQ,OAAO,CAAC,uEAAuE,CAAC,CAAC;AACvG,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC;AAEpD,kBAAe;IACb,GAAG,cAAc;IACjB,eAAe,EAAE;QACf,GAAG,cAAc,CAAC,eAAe;QACjC,4EAA4E;QAC5E,yEAAyE;QACzE,uEAAuE;QACvE,iDAAiD;QACjD,aAAa,EAAE,IAAI;QACnB,oBAAoB,EAAE,IAAI;QAC1B,WAAW,EAAE,IAAI;QACjB,kBAAkB,EAAE,IAAI;QACxB,eAAe,EAAE,IAAI;QACrB,sBAAsB,EAAE,IAAI;KAC7B;CACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Platform` for linux. See createPlatform.js for everything that is not this
|
|
3
|
+
* string, and metro-config.js for what puts this file in React Native's
|
|
4
|
+
* `Platform.js` shim's place.
|
|
5
|
+
*
|
|
6
|
+
* @format
|
|
7
|
+
*/
|
|
8
|
+
declare const _default: import("./Platform").DesktopPlatform;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=Platform.linux.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Platform.linux.d.ts","sourceRoot":"","sources":["../../../src/overrides/Platform.linux.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAMH,wBAAuC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Platform` for linux. See createPlatform.js for everything that is not this
|
|
3
|
+
* string, and metro-config.js for what puts this file in React Native's
|
|
4
|
+
* `Platform.js` shim's place.
|
|
5
|
+
*
|
|
6
|
+
* @format
|
|
7
|
+
*/
|
|
8
|
+
'use strict';
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
const createPlatform_1 = __importDefault(require("./createPlatform"));
|
|
14
|
+
exports.default = (0, createPlatform_1.default)('linux');
|
|
15
|
+
//# sourceMappingURL=Platform.linux.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Platform.linux.js","sourceRoot":"","sources":["../../../src/overrides/Platform.linux.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,CAAC;;;;;AAEb,sEAA8C;AAE9C,kBAAe,IAAA,wBAAc,EAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Platform` for macos. See createPlatform.js for everything that is not this
|
|
3
|
+
* string, and metro-config.js for what puts this file in React Native's
|
|
4
|
+
* `Platform.js` shim's place.
|
|
5
|
+
*
|
|
6
|
+
* @format
|
|
7
|
+
*/
|
|
8
|
+
declare const _default: import("./Platform").DesktopPlatform;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=Platform.macos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Platform.macos.d.ts","sourceRoot":"","sources":["../../../src/overrides/Platform.macos.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAMH,wBAAuC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Platform` for macos. See createPlatform.js for everything that is not this
|
|
3
|
+
* string, and metro-config.js for what puts this file in React Native's
|
|
4
|
+
* `Platform.js` shim's place.
|
|
5
|
+
*
|
|
6
|
+
* @format
|
|
7
|
+
*/
|
|
8
|
+
'use strict';
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
const createPlatform_1 = __importDefault(require("./createPlatform"));
|
|
14
|
+
exports.default = (0, createPlatform_1.default)('macos');
|
|
15
|
+
//# sourceMappingURL=Platform.macos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Platform.macos.js","sourceRoot":"","sources":["../../../src/overrides/Platform.macos.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,CAAC;;;;;AAEb,sEAA8C;AAE9C,kBAAe,IAAA,wBAAc,EAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Platform` for windows. See createPlatform.js for everything that is not this
|
|
3
|
+
* string, and metro-config.js for what puts this file in React Native's
|
|
4
|
+
* `Platform.js` shim's place.
|
|
5
|
+
*
|
|
6
|
+
* @format
|
|
7
|
+
*/
|
|
8
|
+
declare const _default: import("./Platform").DesktopPlatform;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=Platform.windows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Platform.windows.d.ts","sourceRoot":"","sources":["../../../src/overrides/Platform.windows.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAMH,wBAAyC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Platform` for windows. See createPlatform.js for everything that is not this
|
|
3
|
+
* string, and metro-config.js for what puts this file in React Native's
|
|
4
|
+
* `Platform.js` shim's place.
|
|
5
|
+
*
|
|
6
|
+
* @format
|
|
7
|
+
*/
|
|
8
|
+
'use strict';
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
const createPlatform_1 = __importDefault(require("./createPlatform"));
|
|
14
|
+
exports.default = (0, createPlatform_1.default)('windows');
|
|
15
|
+
//# sourceMappingURL=Platform.windows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Platform.windows.js","sourceRoot":"","sources":["../../../src/overrides/Platform.windows.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,CAAC;;;;;AAEb,sEAA8C;AAE9C,kBAAe,IAAA,wBAAc,EAAC,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ReactDevToolsSettingsManager`, for every desktop platform here.
|
|
3
|
+
*
|
|
4
|
+
* React Native ships this only as `.android.js` and `.ios.js`. There is no
|
|
5
|
+
* platform-neutral fallback, and `Libraries/Core/setUpReactDevTools.js` imports
|
|
6
|
+
* it unconditionally, so bundling for any other platform fails outright:
|
|
7
|
+
*
|
|
8
|
+
* Unable to resolve module ../../src/private/devsupport/rndevtools/
|
|
9
|
+
* ReactDevToolsSettingsManager
|
|
10
|
+
*
|
|
11
|
+
* Only in a development bundle -- the production one never reaches
|
|
12
|
+
* setUpReactDevTools, which is why this only appears with --dev true.
|
|
13
|
+
*
|
|
14
|
+
* Both real implementations forward to a `ReactDevToolsSettingsManager`
|
|
15
|
+
* TurboModule, which ReactCxxPlatform does not provide: the host already logs
|
|
16
|
+
* "Failed to load TurboModule: ReactDevToolsSettingsManager" and carries on.
|
|
17
|
+
* So these are no-ops that keep the shape rather than stubs that throw. The
|
|
18
|
+
* only thing lost is React DevTools remembering its settings between runs.
|
|
19
|
+
*
|
|
20
|
+
* @format
|
|
21
|
+
*/
|
|
22
|
+
export declare function setGlobalHookSettings(_settings: string): void;
|
|
23
|
+
export declare function getGlobalHookSettings(): null;
|
|
24
|
+
//# sourceMappingURL=ReactDevToolsSettingsManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactDevToolsSettingsManager.d.ts","sourceRoot":"","sources":["../../../src/overrides/ReactDevToolsSettingsManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,QAAI;AAE3D,wBAAgB,qBAAqB,SAEpC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ReactDevToolsSettingsManager`, for every desktop platform here.
|
|
3
|
+
*
|
|
4
|
+
* React Native ships this only as `.android.js` and `.ios.js`. There is no
|
|
5
|
+
* platform-neutral fallback, and `Libraries/Core/setUpReactDevTools.js` imports
|
|
6
|
+
* it unconditionally, so bundling for any other platform fails outright:
|
|
7
|
+
*
|
|
8
|
+
* Unable to resolve module ../../src/private/devsupport/rndevtools/
|
|
9
|
+
* ReactDevToolsSettingsManager
|
|
10
|
+
*
|
|
11
|
+
* Only in a development bundle -- the production one never reaches
|
|
12
|
+
* setUpReactDevTools, which is why this only appears with --dev true.
|
|
13
|
+
*
|
|
14
|
+
* Both real implementations forward to a `ReactDevToolsSettingsManager`
|
|
15
|
+
* TurboModule, which ReactCxxPlatform does not provide: the host already logs
|
|
16
|
+
* "Failed to load TurboModule: ReactDevToolsSettingsManager" and carries on.
|
|
17
|
+
* So these are no-ops that keep the shape rather than stubs that throw. The
|
|
18
|
+
* only thing lost is React DevTools remembering its settings between runs.
|
|
19
|
+
*
|
|
20
|
+
* @format
|
|
21
|
+
*/
|
|
22
|
+
'use strict';
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.setGlobalHookSettings = setGlobalHookSettings;
|
|
25
|
+
exports.getGlobalHookSettings = getGlobalHookSettings;
|
|
26
|
+
function setGlobalHookSettings(_settings) { }
|
|
27
|
+
function getGlobalHookSettings() {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=ReactDevToolsSettingsManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactDevToolsSettingsManager.js","sourceRoot":"","sources":["../../../src/overrides/ReactDevToolsSettingsManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,YAAY,CAAC;;AAEb,sDAA2D;AAE3D,sDAEC;AAJD,SAAgB,qBAAqB,CAAC,SAAiB,IAAG,CAAC;AAE3D,SAAgB,qBAAqB;IACnC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `RefreshControl`, for a desktop React Native platform.
|
|
3
|
+
*
|
|
4
|
+
* Not a shim. React Native's own file branches on `Platform.OS === 'ios'` with
|
|
5
|
+
* an `else` that renders `AndroidSwipeRefreshLayout` -- a component whose
|
|
6
|
+
* shadow node needs fbjni and which no desktop registers -- so on `linux`,
|
|
7
|
+
* `macos` or `windows` the app mounts a component nothing can put on screen.
|
|
8
|
+
* That is the third time this has happened (`TextInput`, `Alert`, `Share`), and
|
|
9
|
+
* the answer here is the same: render the iOS-shaped component, which is
|
|
10
|
+
* ordinary portable C++ all the way down.
|
|
11
|
+
*
|
|
12
|
+
* Two differences from the original, both deliberate.
|
|
13
|
+
*
|
|
14
|
+
* The imperative `setNativeRefreshing` command is gone. It exists because
|
|
15
|
+
* UIKit's own refresh control moves on its own and has to be told to stop; the
|
|
16
|
+
* desktop control draws only what `refreshing` says, so the prop is the only
|
|
17
|
+
* path and the controlled-component bookkeeping has nothing to do.
|
|
18
|
+
*
|
|
19
|
+
* The control has a height while it is refreshing and none otherwise. On a
|
|
20
|
+
* phone the spinner lives in the rubber band above the list, which a desktop
|
|
21
|
+
* scroll view does not have; here it takes a row at the top of the content and
|
|
22
|
+
* gives it back, which is what a web app does and what the pull gesture in
|
|
23
|
+
* `core/PullToRefresh.h` is counting towards. The number matches
|
|
24
|
+
* `kRefreshControlHeight` there.
|
|
25
|
+
*
|
|
26
|
+
* @format
|
|
27
|
+
*/
|
|
28
|
+
import * as React from 'react';
|
|
29
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
30
|
+
/**
|
|
31
|
+
* React Native's own `RefreshControlProps`, which it does not export a usable
|
|
32
|
+
* type for. Android's four are named so that destructuring them out is a
|
|
33
|
+
* statement rather than an accident.
|
|
34
|
+
*/
|
|
35
|
+
export type RefreshControlProps = {
|
|
36
|
+
refreshing?: boolean;
|
|
37
|
+
onRefresh?: () => void;
|
|
38
|
+
tintColor?: string;
|
|
39
|
+
title?: string;
|
|
40
|
+
titleColor?: string;
|
|
41
|
+
style?: StyleProp<ViewStyle>;
|
|
42
|
+
/** Android's half of the prop type, and meaningless here. */
|
|
43
|
+
enabled?: boolean;
|
|
44
|
+
colors?: ReadonlyArray<string>;
|
|
45
|
+
progressBackgroundColor?: string;
|
|
46
|
+
size?: number;
|
|
47
|
+
};
|
|
48
|
+
export default class RefreshControl extends React.Component<RefreshControlProps> {
|
|
49
|
+
render(): React.ReactNode;
|
|
50
|
+
_onRefresh: () => void;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=RefreshControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RefreshControl.d.ts","sourceRoot":"","sources":["../../../src/overrides/RefreshControl.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAMF,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC;IAC9E,MAAM,IAAI,KAAK,CAAC,SAAS;IA6BzB,UAAU,QAAO,IAAI,CAEnB;CACH"}
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
* `RefreshControl`, for a desktop React Native platform.
|
|
42
|
+
*
|
|
43
|
+
* Not a shim. React Native's own file branches on `Platform.OS === 'ios'` with
|
|
44
|
+
* an `else` that renders `AndroidSwipeRefreshLayout` -- a component whose
|
|
45
|
+
* shadow node needs fbjni and which no desktop registers -- so on `linux`,
|
|
46
|
+
* `macos` or `windows` the app mounts a component nothing can put on screen.
|
|
47
|
+
* That is the third time this has happened (`TextInput`, `Alert`, `Share`), and
|
|
48
|
+
* the answer here is the same: render the iOS-shaped component, which is
|
|
49
|
+
* ordinary portable C++ all the way down.
|
|
50
|
+
*
|
|
51
|
+
* Two differences from the original, both deliberate.
|
|
52
|
+
*
|
|
53
|
+
* The imperative `setNativeRefreshing` command is gone. It exists because
|
|
54
|
+
* UIKit's own refresh control moves on its own and has to be told to stop; the
|
|
55
|
+
* desktop control draws only what `refreshing` says, so the prop is the only
|
|
56
|
+
* path and the controlled-component bookkeeping has nothing to do.
|
|
57
|
+
*
|
|
58
|
+
* The control has a height while it is refreshing and none otherwise. On a
|
|
59
|
+
* phone the spinner lives in the rubber band above the list, which a desktop
|
|
60
|
+
* scroll view does not have; here it takes a row at the top of the content and
|
|
61
|
+
* gives it back, which is what a web app does and what the pull gesture in
|
|
62
|
+
* `core/PullToRefresh.h` is counting towards. The number matches
|
|
63
|
+
* `kRefreshControlHeight` there.
|
|
64
|
+
*
|
|
65
|
+
* @format
|
|
66
|
+
*/
|
|
67
|
+
const PullToRefreshViewNativeComponent_1 = __importDefault(require("basalt-core/upstream/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent"));
|
|
68
|
+
const React = __importStar(require("react"));
|
|
69
|
+
// core/DesktopControls.h's kRefreshControlHeight. Both numbers describe the
|
|
70
|
+
// same row and neither can move without the other.
|
|
71
|
+
const REFRESH_CONTROL_HEIGHT = 40;
|
|
72
|
+
class RefreshControl extends React.Component {
|
|
73
|
+
render() {
|
|
74
|
+
// `colors`, `progressBackgroundColor`, `size` and `enabled` are Android's
|
|
75
|
+
// half of the prop type and mean nothing to this component, exactly as
|
|
76
|
+
// they mean nothing to the iOS one.
|
|
77
|
+
const { enabled, colors, progressBackgroundColor, size, style, ...props } = this.props;
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(PullToRefreshViewNativeComponent_1.default, { ...props, style: [
|
|
79
|
+
{
|
|
80
|
+
height: this.props.refreshing === true ? REFRESH_CONTROL_HEIGHT : 0,
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
justifyContent: 'center',
|
|
83
|
+
},
|
|
84
|
+
style,
|
|
85
|
+
], onRefresh: this._onRefresh }));
|
|
86
|
+
}
|
|
87
|
+
_onRefresh = () => {
|
|
88
|
+
this.props.onRefresh && this.props.onRefresh();
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
exports.default = RefreshControl;
|
|
92
|
+
//# sourceMappingURL=RefreshControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RefreshControl.js","sourceRoot":"","sources":["../../../src/overrides/RefreshControl.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,iKAAyI;AACzI,6CAA+B;AAsB/B,4EAA4E;AAC5E,mDAAmD;AACnD,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAElC,MAAqB,cAAe,SAAQ,KAAK,CAAC,SAA8B;IAC9E,MAAM;QACJ,0EAA0E;QAC1E,uEAAuE;QACvE,oCAAoC;QACpC,MAAM,EACJ,OAAO,EACP,MAAM,EACN,uBAAuB,EACvB,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACT,GAAG,IAAI,CAAC,KAAK,CAAC;QAEf,OAAO,CACL,uBAAC,0CAAgC,OAC3B,KAAK,EACT,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;oBACnE,UAAU,EAAE,QAAQ;oBACpB,cAAc,EAAE,QAAQ;iBACzB;gBACD,KAAK;aACN,EACD,SAAS,EAAE,IAAI,CAAC,UAAU,GAC1B,CACH,CAAC;IACJ,CAAC;IAED,UAAU,GAAG,GAAS,EAAE;QACtB,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;IACjD,CAAC,CAAC;CACH;AAjCD,iCAiCC"}
|