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.
Files changed (325) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cli/basalt.d.ts +3 -0
  3. package/dist/cli/basalt.d.ts.map +1 -0
  4. package/dist/cli/basalt.js +47 -0
  5. package/dist/cli/basalt.js.map +1 -0
  6. package/dist/cli/bundle-cli.d.ts +12 -0
  7. package/dist/cli/bundle-cli.d.ts.map +1 -0
  8. package/dist/cli/bundle-cli.js +124 -0
  9. package/dist/cli/bundle-cli.js.map +1 -0
  10. package/dist/cli/bundleWithAssets.d.ts +79 -0
  11. package/dist/cli/bundleWithAssets.d.ts.map +1 -0
  12. package/dist/cli/bundleWithAssets.js +198 -0
  13. package/dist/cli/bundleWithAssets.js.map +1 -0
  14. package/dist/cli/desktop.d.ts +339 -0
  15. package/dist/cli/desktop.d.ts.map +1 -0
  16. package/dist/cli/desktop.js +1029 -0
  17. package/dist/cli/desktop.js.map +1 -0
  18. package/dist/cli/doctor.d.ts +31 -0
  19. package/dist/cli/doctor.d.ts.map +1 -0
  20. package/dist/cli/doctor.js +283 -0
  21. package/dist/cli/doctor.js.map +1 -0
  22. package/dist/cli/init.d.ts +77 -0
  23. package/dist/cli/init.d.ts.map +1 -0
  24. package/dist/cli/init.js +442 -0
  25. package/dist/cli/init.js.map +1 -0
  26. package/dist/cli/metro.d.ts +49 -0
  27. package/dist/cli/metro.d.ts.map +1 -0
  28. package/dist/cli/metro.js +148 -0
  29. package/dist/cli/metro.js.map +1 -0
  30. package/dist/cli/packageApp.d.ts +102 -0
  31. package/dist/cli/packageApp.d.ts.map +1 -0
  32. package/dist/cli/packageApp.js +319 -0
  33. package/dist/cli/packageApp.js.map +1 -0
  34. package/dist/cli/steps.d.ts +34 -0
  35. package/dist/cli/steps.d.ts.map +1 -0
  36. package/dist/cli/steps.js +53 -0
  37. package/dist/cli/steps.js.map +1 -0
  38. package/dist/metro-config.d.ts +168 -0
  39. package/dist/metro-config.d.ts.map +1 -0
  40. package/dist/metro-config.js +671 -0
  41. package/dist/metro-config.js.map +1 -0
  42. package/dist/react-native.config.d.ts +7 -0
  43. package/dist/react-native.config.d.ts.map +1 -0
  44. package/dist/react-native.config.js +80 -0
  45. package/dist/react-native.config.js.map +1 -0
  46. package/dist/src/DragSource.d.ts +52 -0
  47. package/dist/src/DragSource.d.ts.map +1 -0
  48. package/dist/src/DragSource.js +97 -0
  49. package/dist/src/DragSource.js.map +1 -0
  50. package/dist/src/DropTarget.d.ts +58 -0
  51. package/dist/src/DropTarget.d.ts.map +1 -0
  52. package/dist/src/DropTarget.js +131 -0
  53. package/dist/src/DropTarget.js.map +1 -0
  54. package/dist/src/KeyHandler.d.ts +57 -0
  55. package/dist/src/KeyHandler.d.ts.map +1 -0
  56. package/dist/src/KeyHandler.js +48 -0
  57. package/dist/src/KeyHandler.js.map +1 -0
  58. package/dist/src/Menu.d.ts +72 -0
  59. package/dist/src/Menu.d.ts.map +1 -0
  60. package/dist/src/Menu.js +179 -0
  61. package/dist/src/Menu.js.map +1 -0
  62. package/dist/src/TitleBar.d.ts +75 -0
  63. package/dist/src/TitleBar.d.ts.map +1 -0
  64. package/dist/src/TitleBar.js +236 -0
  65. package/dist/src/TitleBar.js.map +1 -0
  66. package/dist/src/Window.d.ts +87 -0
  67. package/dist/src/Window.d.ts.map +1 -0
  68. package/dist/src/Window.js +248 -0
  69. package/dist/src/Window.js.map +1 -0
  70. package/dist/src/closeRequest.d.ts +55 -0
  71. package/dist/src/closeRequest.d.ts.map +1 -0
  72. package/dist/src/closeRequest.js +134 -0
  73. package/dist/src/closeRequest.js.map +1 -0
  74. package/dist/src/index.d.ts +45 -0
  75. package/dist/src/index.d.ts.map +1 -0
  76. package/dist/src/index.js +92 -0
  77. package/dist/src/index.js.map +1 -0
  78. package/dist/src/overrides/Alert.d.ts +69 -0
  79. package/dist/src/overrides/Alert.d.ts.map +1 -0
  80. package/dist/src/overrides/Alert.js +112 -0
  81. package/dist/src/overrides/Alert.js.map +1 -0
  82. package/dist/src/overrides/BaseViewConfig.d.ts +28 -0
  83. package/dist/src/overrides/BaseViewConfig.d.ts.map +1 -0
  84. package/dist/src/overrides/BaseViewConfig.js +72 -0
  85. package/dist/src/overrides/BaseViewConfig.js.map +1 -0
  86. package/dist/src/overrides/Platform.linux.d.ts +10 -0
  87. package/dist/src/overrides/Platform.linux.d.ts.map +1 -0
  88. package/dist/src/overrides/Platform.linux.js +15 -0
  89. package/dist/src/overrides/Platform.linux.js.map +1 -0
  90. package/dist/src/overrides/Platform.macos.d.ts +10 -0
  91. package/dist/src/overrides/Platform.macos.d.ts.map +1 -0
  92. package/dist/src/overrides/Platform.macos.js +15 -0
  93. package/dist/src/overrides/Platform.macos.js.map +1 -0
  94. package/dist/src/overrides/Platform.windows.d.ts +10 -0
  95. package/dist/src/overrides/Platform.windows.d.ts.map +1 -0
  96. package/dist/src/overrides/Platform.windows.js +15 -0
  97. package/dist/src/overrides/Platform.windows.js.map +1 -0
  98. package/dist/src/overrides/ReactDevToolsSettingsManager.d.ts +24 -0
  99. package/dist/src/overrides/ReactDevToolsSettingsManager.d.ts.map +1 -0
  100. package/dist/src/overrides/ReactDevToolsSettingsManager.js +30 -0
  101. package/dist/src/overrides/ReactDevToolsSettingsManager.js.map +1 -0
  102. package/dist/src/overrides/RefreshControl.d.ts +52 -0
  103. package/dist/src/overrides/RefreshControl.d.ts.map +1 -0
  104. package/dist/src/overrides/RefreshControl.js +92 -0
  105. package/dist/src/overrides/RefreshControl.js.map +1 -0
  106. package/dist/src/overrides/ScrollView.d.ts +39 -0
  107. package/dist/src/overrides/ScrollView.d.ts.map +1 -0
  108. package/dist/src/overrides/ScrollView.js +59 -0
  109. package/dist/src/overrides/ScrollView.js.map +1 -0
  110. package/dist/src/overrides/Share.d.ts +96 -0
  111. package/dist/src/overrides/Share.d.ts.map +1 -0
  112. package/dist/src/overrides/Share.js +97 -0
  113. package/dist/src/overrides/Share.js.map +1 -0
  114. package/dist/src/overrides/TextInput.d.ts +81 -0
  115. package/dist/src/overrides/TextInput.d.ts.map +1 -0
  116. package/dist/src/overrides/TextInput.js +213 -0
  117. package/dist/src/overrides/TextInput.js.map +1 -0
  118. package/dist/src/overrides/View.d.ts +36 -0
  119. package/dist/src/overrides/View.d.ts.map +1 -0
  120. package/dist/src/overrides/View.js +99 -0
  121. package/dist/src/overrides/View.js.map +1 -0
  122. package/dist/src/overrides/createPlatform.d.ts +32 -0
  123. package/dist/src/overrides/createPlatform.d.ts.map +1 -0
  124. package/dist/src/overrides/createPlatform.js +84 -0
  125. package/dist/src/overrides/createPlatform.js.map +1 -0
  126. package/dist/src/overrides/setUpDeveloperTools.d.ts +28 -0
  127. package/dist/src/overrides/setUpDeveloperTools.d.ts.map +1 -0
  128. package/dist/src/overrides/setUpDeveloperTools.js +84 -0
  129. package/dist/src/overrides/setUpDeveloperTools.js.map +1 -0
  130. package/dist/src/overrides/setUpXHR.d.ts +46 -0
  131. package/dist/src/overrides/setUpXHR.d.ts.map +1 -0
  132. package/dist/src/overrides/setUpXHR.js +236 -0
  133. package/dist/src/overrides/setUpXHR.js.map +1 -0
  134. package/dist/src/quitRequest.d.ts +55 -0
  135. package/dist/src/quitRequest.d.ts.map +1 -0
  136. package/dist/src/quitRequest.js +121 -0
  137. package/dist/src/quitRequest.js.map +1 -0
  138. package/dist/src/resourcePath.d.ts +18 -0
  139. package/dist/src/resourcePath.d.ts.map +1 -0
  140. package/dist/src/resourcePath.js +31 -0
  141. package/dist/src/resourcePath.js.map +1 -0
  142. package/dist/src/responseBody.d.ts +76 -0
  143. package/dist/src/responseBody.d.ts.map +1 -0
  144. package/dist/src/responseBody.js +94 -0
  145. package/dist/src/responseBody.js.map +1 -0
  146. package/dist/src/responseHeaders.d.ts +40 -0
  147. package/dist/src/responseHeaders.d.ts.map +1 -0
  148. package/dist/src/responseHeaders.js +75 -0
  149. package/dist/src/responseHeaders.js.map +1 -0
  150. package/dist/src/titleBarState.d.ts +43 -0
  151. package/dist/src/titleBarState.d.ts.map +1 -0
  152. package/dist/src/titleBarState.js +77 -0
  153. package/dist/src/titleBarState.js.map +1 -0
  154. package/dist/src/useContextMenu.d.ts +113 -0
  155. package/dist/src/useContextMenu.d.ts.map +1 -0
  156. package/dist/src/useContextMenu.js +109 -0
  157. package/dist/src/useContextMenu.js.map +1 -0
  158. package/dist/src/useDialog.d.ts +98 -0
  159. package/dist/src/useDialog.d.ts.map +1 -0
  160. package/dist/src/useDialog.js +112 -0
  161. package/dist/src/useDialog.js.map +1 -0
  162. package/dist/src/useDisplays.d.ts +70 -0
  163. package/dist/src/useDisplays.d.ts.map +1 -0
  164. package/dist/src/useDisplays.js +118 -0
  165. package/dist/src/useDisplays.js.map +1 -0
  166. package/dist/src/useHandledKeys.d.ts +38 -0
  167. package/dist/src/useHandledKeys.d.ts.map +1 -0
  168. package/dist/src/useHandledKeys.js +70 -0
  169. package/dist/src/useHandledKeys.js.map +1 -0
  170. package/dist/src/useWindow.d.ts +140 -0
  171. package/dist/src/useWindow.d.ts.map +1 -0
  172. package/dist/src/useWindow.js +233 -0
  173. package/dist/src/useWindow.js.map +1 -0
  174. package/dist/tsconfig.tsbuildinfo +1 -0
  175. package/native/CMakeLists.txt +355 -0
  176. package/native/bootstrap.sh +613 -0
  177. package/native/cmake/CompilerFlags.cmake +49 -0
  178. package/native/cmake/Expo.cmake +125 -0
  179. package/native/cmake/ReactNativeCore.cmake +612 -0
  180. package/native/cmake/Reanimated.cmake +108 -0
  181. package/native/cmake/Skia.cmake +379 -0
  182. package/native/cmake/ThirdParty.cmake +290 -0
  183. package/native/cmake/Worklets.cmake +67 -0
  184. package/native/cmake/codegen/CMakeLists.txt +32 -0
  185. package/native/core/AppIdentity.cpp +85 -0
  186. package/native/core/AppIdentity.h +59 -0
  187. package/native/core/AppPaths.cpp +96 -0
  188. package/native/core/AppPaths.h +53 -0
  189. package/native/core/AppearanceModule.cpp +60 -0
  190. package/native/core/AppearanceModule.h +40 -0
  191. package/native/core/Backface.h +59 -0
  192. package/native/core/BlobModule.cpp +283 -0
  193. package/native/core/BlobModule.h +76 -0
  194. package/native/core/BlobRegistry.cpp +75 -0
  195. package/native/core/BlobRegistry.h +44 -0
  196. package/native/core/ColorScheme.cpp +105 -0
  197. package/native/core/ColorScheme.h +59 -0
  198. package/native/core/ComponentRegistry.h +30 -0
  199. package/native/core/ControlMetrics.h +37 -0
  200. package/native/core/CoreModules.cpp +592 -0
  201. package/native/core/CoreModules.h +308 -0
  202. package/native/core/DebuggingOverlay.cpp +106 -0
  203. package/native/core/DebuggingOverlay.h +65 -0
  204. package/native/core/DesktopControls.cpp +232 -0
  205. package/native/core/DesktopControls.h +170 -0
  206. package/native/core/DevBundle.cpp +108 -0
  207. package/native/core/DevBundle.h +69 -0
  208. package/native/core/DevMenu.cpp +99 -0
  209. package/native/core/DevMenu.h +75 -0
  210. package/native/core/DialogModule.cpp +150 -0
  211. package/native/core/DialogModule.h +51 -0
  212. package/native/core/DragAndDrop.cpp +45 -0
  213. package/native/core/DragAndDrop.h +225 -0
  214. package/native/core/ExpoImageComponent.cpp +79 -0
  215. package/native/core/ExpoImageComponent.h +80 -0
  216. package/native/core/ExpoModules.cpp +415 -0
  217. package/native/core/ExpoModules.h +115 -0
  218. package/native/core/ExpoRuntime.cpp +366 -0
  219. package/native/core/ExpoRuntime.h +42 -0
  220. package/native/core/FocusRing.h +36 -0
  221. package/native/core/FontRegistry.h +51 -0
  222. package/native/core/GestureHandlerModule.cpp +136 -0
  223. package/native/core/GestureHandlerModule.h +71 -0
  224. package/native/core/Gestures.cpp +533 -0
  225. package/native/core/Gestures.h +145 -0
  226. package/native/core/HoverTracker.cpp +69 -0
  227. package/native/core/HoverTracker.h +109 -0
  228. package/native/core/HttpClient.cpp +282 -0
  229. package/native/core/ImageBytes.cpp +205 -0
  230. package/native/core/ImageBytes.h +29 -0
  231. package/native/core/ImageCache.cpp +51 -0
  232. package/native/core/ImageCache.h +89 -0
  233. package/native/core/JsRuntimeAccess.cpp +70 -0
  234. package/native/core/JsRuntimeAccess.h +60 -0
  235. package/native/core/JsiPromise.h +51 -0
  236. package/native/core/KeyEvents.cpp +116 -0
  237. package/native/core/KeyEvents.h +144 -0
  238. package/native/core/LogBoxSurface.cpp +46 -0
  239. package/native/core/LogBoxSurface.h +68 -0
  240. package/native/core/MenuModel.h +117 -0
  241. package/native/core/MenuModule.cpp +209 -0
  242. package/native/core/MenuModule.h +66 -0
  243. package/native/core/MountingWalk.h +524 -0
  244. package/native/core/PackageModules.cpp.in +25 -0
  245. package/native/core/PackageModules.h +50 -0
  246. package/native/core/PlatformConstantsModule.cpp +63 -0
  247. package/native/core/PlatformConstantsModule.h +64 -0
  248. package/native/core/PlatformServices.h +213 -0
  249. package/native/core/PointerButtons.h +63 -0
  250. package/native/core/PullToRefresh.cpp +57 -0
  251. package/native/core/PullToRefresh.h +73 -0
  252. package/native/core/ReanimatedCompat.h +47 -0
  253. package/native/core/ReanimatedModule.cpp +203 -0
  254. package/native/core/ReanimatedModule.h +55 -0
  255. package/native/core/ScrollAnimation.cpp +59 -0
  256. package/native/core/ScrollAnimation.h +70 -0
  257. package/native/core/ScrollBounds.cpp +26 -0
  258. package/native/core/ScrollBounds.h +68 -0
  259. package/native/core/ScrollIndicator.cpp +50 -0
  260. package/native/core/ScrollIndicator.h +69 -0
  261. package/native/core/ScrollMomentum.cpp +71 -0
  262. package/native/core/ScrollMomentum.h +73 -0
  263. package/native/core/ScrollSnap.cpp +123 -0
  264. package/native/core/ScrollSnap.h +80 -0
  265. package/native/core/ShareFallback.cpp +101 -0
  266. package/native/core/ShareFallback.h +45 -0
  267. package/native/core/SkiaPictureViewComponent.cpp +11 -0
  268. package/native/core/SkiaPictureViewComponent.h +47 -0
  269. package/native/core/SourceCodeModule.cpp +55 -0
  270. package/native/core/SourceCodeModule.h +53 -0
  271. package/native/core/StatusBarModule.cpp +23 -0
  272. package/native/core/StatusBarModule.h +42 -0
  273. package/native/core/TestDialog.cpp +148 -0
  274. package/native/core/TestDialog.h +96 -0
  275. package/native/core/TestKeys.cpp +78 -0
  276. package/native/core/TestKeys.h +50 -0
  277. package/native/core/TestQuitFile.cpp +33 -0
  278. package/native/core/TestQuitFile.h +60 -0
  279. package/native/core/TestSettle.h +192 -0
  280. package/native/core/TitleBarRegions.h +31 -0
  281. package/native/core/TurboModuleProxy.cpp +51 -0
  282. package/native/core/TurboModuleProxy.h +46 -0
  283. package/native/core/UIManagerAccess.cpp +43 -0
  284. package/native/core/UIManagerAccess.h +43 -0
  285. package/native/core/WindowBoundsCache.cpp +319 -0
  286. package/native/core/WindowControl.h +235 -0
  287. package/native/core/WindowHost.h +158 -0
  288. package/native/core/WindowMethods.cpp +167 -0
  289. package/native/core/WindowMethods.h +84 -0
  290. package/native/core/WindowsModule.cpp +448 -0
  291. package/native/core/WindowsModule.h +133 -0
  292. package/native/core/WorkletsModule.cpp +199 -0
  293. package/native/core/WorkletsModule.h +57 -0
  294. package/native/core/portability_probe.cpp +210 -0
  295. package/native/tests/EventRecorder.h +124 -0
  296. package/native/tests/TestHarness.cpp +109 -0
  297. package/native/tests/TestHarness.h +89 -0
  298. package/native/tests/TreeDump.h +49 -0
  299. package/native/tests/test_app_identity.cpp +114 -0
  300. package/native/tests/test_app_paths.cpp +48 -0
  301. package/native/tests/test_appearance.cpp +107 -0
  302. package/native/tests/test_backface.cpp +79 -0
  303. package/native/tests/test_blobs.cpp +157 -0
  304. package/native/tests/test_controls.cpp +185 -0
  305. package/native/tests/test_devbundle.cpp +103 -0
  306. package/native/tests/test_drag_and_drop.cpp +143 -0
  307. package/native/tests/test_gestures.cpp +331 -0
  308. package/native/tests/test_hover.cpp +92 -0
  309. package/native/tests/test_image_cache.cpp +109 -0
  310. package/native/tests/test_js_runtime_access.cpp +137 -0
  311. package/native/tests/test_key_events.cpp +235 -0
  312. package/native/tests/test_momentum.cpp +138 -0
  313. package/native/tests/test_quit_file.cpp +104 -0
  314. package/native/tests/test_scroll_animation.cpp +120 -0
  315. package/native/tests/test_scroll_bounds.cpp +66 -0
  316. package/native/tests/test_scroll_indicator.cpp +149 -0
  317. package/native/tests/test_scroll_snap.cpp +112 -0
  318. package/native/tests/test_settle.cpp +115 -0
  319. package/native/tests/test_share.cpp +75 -0
  320. package/native/tests/test_sourcecode.cpp +62 -0
  321. package/native/tests/test_window_close.cpp +119 -0
  322. package/native/tests/test_window_limits.cpp +123 -0
  323. package/package.json +43 -0
  324. package/react-native.config.js +86 -0
  325. 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"}