expo 52.0.0-preview.2 → 52.0.0-preview.20

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/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # expo
2
2
 
3
- The `expo` package is a single package you can install in any React Native app to begin using Expo modules.
3
+ The `expo` package is a single package you can install in any React Native app to begin using Expo modules. [API Reference](https://docs.expo.dev/versions/latest/sdk/expo/).
4
4
 
5
5
  - includes core infrastructure for Expo modules: `expo-modules-core` and `expo-modules-autolinking`.
6
6
  - bundles a minimal set of Expo modules that are required by nearly every app, such as `expo-asset`.
7
7
  - provides [`@expo/cli`](https://github.com/expo/expo/blob/main/packages/%40expo/cli/README.md), a small CLI that provides a clean interface around both bundlers (such as Metro and Webpack) and native build tools (Xcode, Simulator.app, Android Studio, ADB, etc.), can generate native projects with `npx expo prebuild`, and aligns compatible package versions with `npx expo install`.
8
8
  - exposes a JavaScript module that configures an app at runtime as needed to use `expo-font` and to function in Expo Go (optional, only if applicable).
9
9
 
10
+
10
11
  See [CONTRIBUTING](./CONTRIBUTING.md) for instructions on working on this package.
@@ -33,7 +33,7 @@ def getRNVersion() {
33
33
  ensureDependeciesWereEvaluated(project)
34
34
 
35
35
  group = 'host.exp.exponent'
36
- version = '52.0.0-preview.2'
36
+ version = '52.0.0-preview.20'
37
37
 
38
38
  buildscript {
39
39
  // Simple helper that allows the root project to override versions declared by this library.
@@ -46,7 +46,7 @@ android {
46
46
  namespace "expo.core"
47
47
  defaultConfig {
48
48
  versionCode 1
49
- versionName "52.0.0-preview.2"
49
+ versionName "52.0.0-preview.20"
50
50
  consumerProguardFiles("proguard-rules.pro")
51
51
  }
52
52
  testOptions {
package/build/Expo.d.ts CHANGED
@@ -2,6 +2,6 @@ import './Expo.fx';
2
2
  export { disableErrorHandling } from './errors/ExpoErrorManager';
3
3
  export { default as registerRootComponent } from './launch/registerRootComponent';
4
4
  export { isRunningInExpoGo, getExpoGoProjectConfig } from './environment/ExpoGo';
5
- export { EventEmitter, SharedObject, SharedRef, NativeModule, requireNativeModule, requireOptionalNativeModule, reloadAppAsync, } from 'expo-modules-core';
5
+ export { EventEmitter, SharedObject, SharedRef, NativeModule, requireNativeModule, requireOptionalNativeModule, requireNativeViewManager as requireNativeView, registerWebModule, reloadAppAsync, } from 'expo-modules-core';
6
6
  export { useEvent, useEventListener } from './hooks/useEvent';
7
7
  //# sourceMappingURL=Expo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Expo.d.ts","sourceRoot":"","sources":["../src/Expo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,YAAY,EAGZ,mBAAmB,EACnB,2BAA2B,EAC3B,cAAc,GACf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"Expo.d.ts","sourceRoot":"","sources":["../src/Expo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,YAAY,EAGZ,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,IAAI,iBAAiB,EAC7C,iBAAiB,EACjB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Get the base URL for the DOM Components HTML
3
+ */
4
+ export declare function getBaseURL(): string;
5
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/dom/base.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAkCnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"dom-hooks.d.ts","sourceRoot":"","sources":["../../src/dom/dom-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEnG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,oBAAoB,EACnE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EACX,IAAI,EAAE,MAAM,CAAC,EACb,IAAI,CAAC,EAAE,cAAc,QAqBtB"}
1
+ {"version":3,"file":"dom-hooks.d.ts","sourceRoot":"","sources":["../../src/dom/dom-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEnG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGxD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,oBAAoB,EACnE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EACX,IAAI,EAAE,MAAM,CAAC,EACb,IAAI,CAAC,EAAE,cAAc,QA4BtB"}
@@ -0,0 +1,4 @@
1
+ import { BridgeMessage, JSONValue } from './dom.types';
2
+ export declare function _emitGlobalEvent<TData extends JSONValue>(message: BridgeMessage<TData>): void;
3
+ export declare const addGlobalDomEventListener: <TData extends JSONValue>(onSubscribe: (message: BridgeMessage<TData>) => void) => (() => void);
4
+ //# sourceMappingURL=global-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-events.d.ts","sourceRoot":"","sources":["../../src/dom/global-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIvD,wBAAgB,gBAAgB,CAAC,KAAK,SAAS,SAAS,EAAE,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,QAEtF;AAED,eAAO,MAAM,yBAAyB,4EACY,IAAI,KACnD,CAAC,MAAM,IAAI,CAKb,CAAC"}
@@ -3,6 +3,7 @@ export declare const NATIVE_ACTION = "$$native_action";
3
3
  export declare const NATIVE_ACTION_RESULT = "$$native_action_result";
4
4
  export declare const DOM_EVENT = "$$dom_event";
5
5
  export declare const MATCH_CONTENTS_EVENT = "$$match_contents_event";
6
+ export declare const REGISTER_DOM_IMPERATIVE_HANDLE_PROPS = "$$register_dom_imperative_handle_props";
6
7
  export declare const getInjectEventScript: <T extends BridgeMessage<any>>(detail: T) => string;
7
8
  export declare function getInjectEnvsScript(): string;
8
9
  export declare function getInjectBodySizeObserverScript(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../src/dom/injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,SAAS,gBAAgB,CAAC;AACvC,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAE7D,eAAO,MAAM,oBAAoB,qDAOhC,CAAC;AAEF,wBAAgB,mBAAmB,WAalC;AAED,wBAAgB,+BAA+B,WAwB9C"}
1
+ {"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../src/dom/injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,SAAS,gBAAgB,CAAC;AACvC,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,oCAAoC,2CAA2C,CAAC;AAE7F,eAAO,MAAM,oBAAoB,qDAOhC,CAAC;AAEF,wBAAgB,mBAAmB,WAalC;AAED,wBAAgB,+BAA+B,WAwB9C"}
@@ -2,9 +2,7 @@ import React from 'react';
2
2
  import type { DOMProps } from './dom.types';
3
3
  interface Props {
4
4
  dom: DOMProps;
5
- source: {
6
- uri: string;
7
- };
5
+ filePath: string;
8
6
  }
9
7
  declare const RawWebView: React.ForwardRefExoticComponent<Props & React.RefAttributes<object>>;
10
8
  export declare function resolveWebView(useExpoDOMWebView: boolean): any;
@@ -1 +1 @@
1
- {"version":3,"file":"webview-wrapper.d.ts","sourceRoot":"","sources":["../../src/dom/webview-wrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAiB,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAYrF,UAAU,KAAK;IACb,GAAG,EAAE,QAAQ,CAAC;IACd,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,QAAA,MAAM,UAAU,sEA8Jd,CAAC;AAaH,wBAAgB,cAAc,CAAC,iBAAiB,EAAE,OAAO,OASxD;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"webview-wrapper.d.ts","sourceRoot":"","sources":["../../src/dom/webview-wrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAiB,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAcrF,UAAU,KAAK;IACb,GAAG,EAAE,QAAQ,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,UAAU,sEAkLd,CAAC;AAaH,wBAAgB,cAAc,CAAC,iBAAiB,EAAE,OAAO,OASxD;AAED,eAAe,UAAU,CAAC"}
@@ -17,7 +17,6 @@ type InitialProps = {
17
17
  * - Invokes React Native's `AppRegistry.registerComponent`.
18
18
  * - Invokes React Native web's `AppRegistry.runApplication` on web to render to the root `index.html` file.
19
19
  * - Polyfills the `process.nextTick` function globally.
20
- * - Adds support for using the `fontFamily` React Native style with the `expo-font` package.
21
20
  *
22
21
  * This method also adds the following dev-only features that are removed in production bundles.
23
22
  * - Adds the Fast Refresh and bundle splitting indicator to the app.
@@ -1 +1 @@
1
- {"version":3,"file":"registerRootComponent.d.ts","sourceRoot":"","sources":["../../src/launch/registerRootComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AAEpB,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,KAAK,YAAY,GAAG;IAClB,GAAG,CAAC,EAAE;QACJ,YAAY,CAAC,EAAE,GAAG,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAGF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,CAAC,SAAS,YAAY,EAClE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,GAC1B,IAAI,CAwBN"}
1
+ {"version":3,"file":"registerRootComponent.d.ts","sourceRoot":"","sources":["../../src/launch/registerRootComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AAEpB,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,KAAK,YAAY,GAAG;IAClB,GAAG,CAAC,EAAE;QACJ,YAAY,CAAC,EAAE,GAAG,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAGF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,CAAC,SAAS,YAAY,EAClE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,GAC1B,IAAI,CAwBN"}
@@ -1,13 +1,13 @@
1
1
  {
2
- "@expo/metro-runtime": "~4.0.0-preview.0",
2
+ "@expo/metro-runtime": "~4.0.0-preview.2",
3
3
  "@expo/vector-icons": "^14.0.2",
4
4
  "@react-native-async-storage/async-storage": "1.23.1",
5
5
  "@react-native-community/datetimepicker": "8.2.0",
6
6
  "@react-native-masked-view/masked-view": "0.3.1",
7
7
  "@react-native-community/netinfo": "11.4.1",
8
- "@react-native-community/slider": "4.5.2",
8
+ "@react-native-community/slider": "4.5.5",
9
9
  "@react-native-community/viewpager": "5.0.11",
10
- "@react-native-picker/picker": "2.8.1",
10
+ "@react-native-picker/picker": "2.9.0",
11
11
  "@react-native-segmented-control/segmented-control": "2.5.4",
12
12
  "@stripe/stripe-react-native": "0.38.6",
13
13
  "eslint-config-expo": "~8.0.1",
@@ -17,92 +17,91 @@
17
17
  "expo-apple-authentication": "~7.0.1",
18
18
  "expo-application": "~6.0.1",
19
19
  "expo-asset": "~11.0.0",
20
- "expo-audio": "~0.2.1",
20
+ "expo-audio": "~0.2.3",
21
21
  "expo-auth-session": "~6.0.0",
22
22
  "expo-av": "~15.0.1",
23
23
  "expo-background-fetch": "~13.0.1",
24
- "expo-barcode-scanner": "~14.0.1",
25
24
  "expo-battery": "~9.0.1",
26
25
  "expo-blur": "~14.0.1",
27
- "expo-brightness": "~13.0.1",
28
- "expo-build-properties": "~0.13.0",
29
- "expo-calendar": "~14.0.1",
30
- "expo-camera": "~16.0.0",
26
+ "expo-brightness": "~13.0.2",
27
+ "expo-build-properties": "~0.13.1",
28
+ "expo-calendar": "~14.0.2",
29
+ "expo-camera": "~16.0.3",
31
30
  "expo-cellular": "~7.0.1",
32
31
  "expo-checkbox": "~4.0.0",
33
32
  "expo-clipboard": "~7.0.0",
34
- "expo-constants": "~17.0.1",
33
+ "expo-constants": "~17.0.2",
35
34
  "expo-contacts": "~14.0.1",
36
35
  "expo-crypto": "~14.0.1",
37
- "expo-dev-client": "~5.0.0-preview.1",
36
+ "expo-dev-client": "~5.0.0-preview.7",
38
37
  "expo-device": "~7.0.1",
39
38
  "expo-document-picker": "~13.0.1",
40
39
  "expo-face-detector": "~13.0.1",
41
40
  "expo-file-system": "~18.0.0",
42
- "expo-font": "~13.0.0",
41
+ "expo-font": "~13.0.1",
43
42
  "expo-gl": "~15.0.0",
44
43
  "expo-google-app-auth": "~8.3.0",
45
44
  "expo-haptics": "~14.0.0",
46
- "expo-image": "~2.0.0-preview.0",
45
+ "expo-image": "~2.0.0-preview.1",
47
46
  "expo-image-loader": "~5.0.0",
48
- "expo-image-manipulator": "~13.0.1",
49
- "expo-image-picker": "~16.0.0",
47
+ "expo-image-manipulator": "~13.0.5",
48
+ "expo-image-picker": "~16.0.1",
50
49
  "expo-intent-launcher": "~12.0.1",
51
50
  "expo-insights": "~0.8.1",
52
51
  "expo-keep-awake": "~14.0.1",
53
- "expo-linear-gradient": "~14.0.0",
54
- "expo-linking": "~7.0.1",
52
+ "expo-linear-gradient": "~14.0.1",
53
+ "expo-linking": "~7.0.2",
55
54
  "expo-local-authentication": "~15.0.1",
56
55
  "expo-localization": "~16.0.0",
57
56
  "expo-location": "~18.0.1",
58
57
  "expo-mail-composer": "~14.0.1",
59
- "expo-media-library": "~17.0.0",
60
- "expo-module-template": "~10.15.1",
61
- "expo-modules-core": "~2.0.0-preview.2",
62
- "expo-navigation-bar": "~4.0.1",
58
+ "expo-media-library": "~17.0.2",
59
+ "expo-module-template": "~10.15.6",
60
+ "expo-modules-core": "~2.0.0-preview.9",
61
+ "expo-navigation-bar": "~4.0.2",
63
62
  "expo-network": "~7.0.0",
64
- "expo-notifications": "~0.29.1",
65
- "expo-print": "~14.0.0",
66
- "expo-router": "~4.0.0-preview.1",
63
+ "expo-notifications": "~0.29.4",
64
+ "expo-print": "~14.0.2",
65
+ "expo-router": "~4.0.0-preview.13",
67
66
  "expo-screen-capture": "~7.0.0",
68
67
  "expo-screen-orientation": "~8.0.0",
69
68
  "expo-secure-store": "~14.0.0",
70
- "expo-sensors": "~14.0.0",
69
+ "expo-sensors": "~14.0.1",
71
70
  "expo-sharing": "~13.0.0",
72
71
  "expo-sms": "~13.0.0",
73
72
  "expo-speech": "~13.0.0",
74
- "expo-splash-screen": "~0.28.1",
75
- "expo-sqlite": "~15.0.0",
73
+ "expo-splash-screen": "~0.29.2",
74
+ "expo-sqlite": "~15.0.1",
76
75
  "expo-status-bar": "~2.0.0",
77
76
  "expo-store-review": "~8.0.0",
78
77
  "expo-symbols": "~0.2.0",
79
- "expo-system-ui": "~4.0.1",
80
- "expo-task-manager": "~12.0.0",
78
+ "expo-system-ui": "~4.0.2",
79
+ "expo-task-manager": "~12.0.2",
81
80
  "expo-tracking-transparency": "~5.0.0",
82
- "expo-updates": "~0.26.2",
81
+ "expo-updates": "~0.26.4",
83
82
  "expo-video-thumbnails": "~9.0.0",
84
- "expo-video": "~2.0.0-preview.0",
83
+ "expo-video": "~2.0.0-preview.1",
85
84
  "expo-web-browser": "~14.0.0",
86
- "jest-expo": "~52.0.0-preview.0",
85
+ "jest-expo": "~52.0.0-preview.4",
87
86
  "lottie-react-native": "7.0.0",
88
87
  "react": "18.3.1",
89
88
  "react-dom": "18.3.1",
90
- "react-native": "0.76.0",
89
+ "react-native": "0.76.1",
91
90
  "react-native-web": "~0.19.13",
92
- "react-native-gesture-handler": "~2.20.1",
91
+ "react-native-gesture-handler": "~2.20.2",
93
92
  "react-native-get-random-values": "~1.11.0",
94
93
  "react-native-maps": "1.18.0",
95
94
  "react-native-pager-view": "6.4.1",
96
95
  "react-native-reanimated": "~3.16.1",
97
- "react-native-screens": "4.0.0-beta.13",
98
- "react-native-safe-area-context": "4.11.0",
96
+ "react-native-screens": "4.0.0-beta.16",
97
+ "react-native-safe-area-context": "4.12.0",
99
98
  "react-native-svg": "15.8.0",
100
- "react-native-view-shot": "3.8.0",
99
+ "react-native-view-shot": "~4.0.0",
101
100
  "react-native-webview": "13.12.2",
102
101
  "sentry-expo": "~7.0.0",
103
102
  "unimodules-app-loader": "~5.0.0",
104
103
  "unimodules-image-loader-interface": "~6.1.0",
105
104
  "@shopify/react-native-skia": "1.5.0",
106
105
  "@shopify/flash-list": "1.7.1",
107
- "@sentry/react-native": "~5.33.1"
106
+ "@sentry/react-native": "~6.1.0"
108
107
  }
@@ -0,0 +1 @@
1
+ export * from '../build/dom/global-events';
package/dom/global.js ADDED
@@ -0,0 +1 @@
1
+ export * from '../src/dom/global-events';
@@ -0,0 +1 @@
1
+ export * from '@expo/fingerprint';
package/fingerprint.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('@expo/fingerprint');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo",
3
- "version": "52.0.0-preview.2",
3
+ "version": "52.0.0-preview.20",
4
4
  "description": "The Expo SDK",
5
5
  "main": "src/Expo.ts",
6
6
  "module": "src/Expo.ts",
@@ -33,6 +33,8 @@
33
33
  "devtools.d.ts",
34
34
  "fetch.js",
35
35
  "fetch.d.ts",
36
+ "fingerprint.js",
37
+ "fingerprint.d.ts",
36
38
  "react-native.config.js",
37
39
  "requiresExtraSetup.json",
38
40
  "tsconfig.base.json",
@@ -66,29 +68,30 @@
66
68
  "homepage": "https://github.com/expo/expo/tree/main/packages/expo",
67
69
  "dependencies": {
68
70
  "@babel/runtime": "^7.20.0",
69
- "@expo/cli": "0.19.1",
70
- "@expo/config": "10.0.0",
71
- "@expo/config-plugins": "9.0.2",
72
- "@expo/metro-config": "0.19.0-preview.1",
71
+ "@expo/cli": "0.20.0",
72
+ "@expo/config": "10.0.2",
73
+ "@expo/config-plugins": "9.0.6",
74
+ "@expo/fingerprint": "0.11.2",
75
+ "@expo/metro-config": "0.19.0-preview.3",
73
76
  "@expo/vector-icons": "^14.0.0",
74
- "babel-preset-expo": "~12.0.0-preview.1",
77
+ "babel-preset-expo": "~12.0.0-preview.5",
75
78
  "expo-asset": "~11.0.0",
76
79
  "expo-file-system": "~18.0.0",
77
- "expo-font": "~13.0.0",
80
+ "expo-font": "~13.0.1",
78
81
  "expo-keep-awake": "~14.0.1",
79
- "expo-modules-autolinking": "2.0.0-preview.0",
80
- "expo-modules-core": "2.0.0-preview.2",
82
+ "expo-modules-autolinking": "2.0.0-preview.3",
83
+ "expo-modules-core": "2.0.0-preview.9",
81
84
  "fbemitter": "^3.0.0",
82
85
  "web-streams-polyfill": "^3.3.2",
83
86
  "whatwg-url-without-unicode": "8.0.0-3"
84
87
  },
85
88
  "devDependencies": {
86
- "@types/react": "~18.2.79",
87
- "@types/react-test-renderer": "^18.0.0",
89
+ "@types/react": "~18.3.12",
90
+ "@types/react-test-renderer": "^18.3.0",
88
91
  "expo-module-scripts": "^4.0.0",
89
92
  "react": "18.3.1",
90
93
  "react-dom": "18.3.1",
91
- "react-native": "0.76.0"
94
+ "react-native": "0.76.1"
92
95
  },
93
96
  "peerDependencies": {
94
97
  "@expo/dom-webview": "*",
@@ -108,5 +111,5 @@
108
111
  "optional": true
109
112
  }
110
113
  },
111
- "gitHead": "0a07b965c4bef67e7718355a0dc770d524ad3cee"
114
+ "gitHead": "a64603dce90981bf7688657f87dfa4be3e24f58b"
112
115
  }
package/src/Expo.fx.tsx CHANGED
@@ -2,18 +2,12 @@
2
2
  import './winter';
3
3
  import 'expo-asset';
4
4
 
5
- import * as Font from 'expo-font';
6
- import { AppRegistry, StyleSheet } from 'react-native';
5
+ import { AppRegistry } from 'react-native';
7
6
 
8
7
  import { isRunningInExpoGo } from './environment/ExpoGo';
9
8
  import { AppEntryNotFound } from './errors/AppEntryNotFound';
10
9
  import { createErrorHandler } from './errors/ExpoErrorManager';
11
10
 
12
- // If expo-font is installed and the style preprocessor is available, use it to parse fonts.
13
- if (StyleSheet.setStyleAttributePreprocessor) {
14
- StyleSheet.setStyleAttributePreprocessor('fontFamily', Font.processFontFamily);
15
- }
16
-
17
11
  if (isRunningInExpoGo()) {
18
12
  // set up some improvements to commonly logged error messages stemming from react-native
19
13
  const globalHandler = ErrorUtils.getGlobalHandler();
package/src/Expo.ts CHANGED
@@ -15,6 +15,8 @@ export {
15
15
  // Methods
16
16
  requireNativeModule,
17
17
  requireOptionalNativeModule,
18
+ requireNativeViewManager as requireNativeView,
19
+ registerWebModule,
18
20
  reloadAppAsync,
19
21
  } from 'expo-modules-core';
20
22
 
@@ -0,0 +1,102 @@
1
+ jest.mock('react-native/Libraries/Core/Devtools/getDevServer', () =>
2
+ jest.fn().mockReturnValue({ url: 'http://localhost:8081' })
3
+ );
4
+
5
+ describe('getBaseURL', () => {
6
+ let getBaseURL;
7
+
8
+ const originalProcessEnv = process.env;
9
+ const originalExpo = globalThis.expo;
10
+ beforeEach(() => {
11
+ // Reset the module to clear the `getBaseURL` underlying cache
12
+ jest.resetModules();
13
+ getBaseURL = require('../base').getBaseURL;
14
+ });
15
+
16
+ afterEach(() => {
17
+ globalThis.expo = originalExpo;
18
+ process.env = originalProcessEnv;
19
+ });
20
+
21
+ it('should serve from updates directory when using updates', () => {
22
+ // @ts-expect-error: mock partial properties
23
+ globalThis.expo = {
24
+ modules: {
25
+ ExpoUpdates: {
26
+ isEnabled: true,
27
+ isEmbeddedLaunch: false,
28
+ localAssets: {
29
+ '5d41402abc4b2a76b9719d911017c592':
30
+ 'file:///path/to/.expo-internal/5d41402abc4b2a76b9719d911017c592.png',
31
+ },
32
+ },
33
+ },
34
+ };
35
+
36
+ expect(getBaseURL()).toBe('file:///path/to/.expo-internal');
37
+ });
38
+
39
+ it('should serve from app builtin directory when using updates with embedded bundle', () => {
40
+ // @ts-expect-error: mock partial properties
41
+ globalThis.expo = {
42
+ modules: {
43
+ ExpoUpdates: {
44
+ isEnabled: true,
45
+ isEmbeddedLaunch: true,
46
+ localAssets: {
47
+ '5d41402abc4b2a76b9719d911017c592':
48
+ 'file:///path/to/.expo-internal/5d41402abc4b2a76b9719d911017c592.png',
49
+ },
50
+ },
51
+ },
52
+ };
53
+ process.env.NODE_ENV = 'production';
54
+ switch (process.env.EXPO_OS) {
55
+ case 'android': {
56
+ expect(getBaseURL()).toBe('file:///android_asset/www.bundle');
57
+ break;
58
+ }
59
+ case 'ios': {
60
+ expect(getBaseURL()).toBe('www.bundle');
61
+ break;
62
+ }
63
+ default: {
64
+ expect(getBaseURL()).toBe('');
65
+ break;
66
+ }
67
+ }
68
+ });
69
+
70
+ it('should serve from app builtin directory for production builds', () => {
71
+ process.env.NODE_ENV = 'production';
72
+ switch (process.env.EXPO_OS) {
73
+ case 'android': {
74
+ expect(getBaseURL()).toBe('file:///android_asset/www.bundle');
75
+ break;
76
+ }
77
+ case 'ios': {
78
+ expect(getBaseURL()).toBe('www.bundle');
79
+ break;
80
+ }
81
+ default: {
82
+ expect(getBaseURL()).toBe('');
83
+ break;
84
+ }
85
+ }
86
+ });
87
+
88
+ it('should serve from dev server for development builds', () => {
89
+ process.env.NODE_ENV = 'development';
90
+ switch (process.env.EXPO_OS) {
91
+ case 'android':
92
+ case 'ios': {
93
+ expect(getBaseURL()).toBe('http://localhost:8081/_expo/@dom');
94
+ break;
95
+ }
96
+ default: {
97
+ expect(getBaseURL()).toBe('');
98
+ break;
99
+ }
100
+ }
101
+ });
102
+ });
@@ -0,0 +1,62 @@
1
+ let cachedBaseUrl: string | null = null;
2
+
3
+ /**
4
+ * Get the base URL for the DOM Components HTML
5
+ */
6
+ export function getBaseURL(): string {
7
+ if (cachedBaseUrl != null) {
8
+ return cachedBaseUrl;
9
+ }
10
+
11
+ // Serving from updates
12
+ const updatesBaseUrl = getUpdatesBaseURL();
13
+ if (updatesBaseUrl != null) {
14
+ cachedBaseUrl = updatesBaseUrl;
15
+ return cachedBaseUrl;
16
+ }
17
+
18
+ if (process.env.EXPO_OS === 'web') {
19
+ cachedBaseUrl = process.env.EXPO_BASE_URL ?? '';
20
+ return cachedBaseUrl;
21
+ }
22
+
23
+ // Serving from local production
24
+ if (process.env.NODE_ENV === 'production') {
25
+ if (process.env.EXPO_OS === 'android') {
26
+ cachedBaseUrl = 'file:///android_asset/www.bundle';
27
+ } else if (process.env.EXPO_OS === 'ios') {
28
+ cachedBaseUrl = 'www.bundle';
29
+ } else {
30
+ cachedBaseUrl = process.env.EXPO_BASE_URL ?? '';
31
+ }
32
+ return cachedBaseUrl;
33
+ }
34
+
35
+ // Serving from local dev server
36
+ const getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');
37
+ const devServer = getDevServer();
38
+ cachedBaseUrl = new URL('/_expo/@dom', devServer.url).toString();
39
+ return cachedBaseUrl;
40
+ }
41
+
42
+ /**
43
+ * Get the base URL for the DOM Components when serving from updates
44
+ */
45
+ function getUpdatesBaseURL(): string | null {
46
+ const ExpoUpdates = globalThis.expo?.modules?.['ExpoUpdates'] as
47
+ | import('expo-updates').ExpoUpdatesModule
48
+ | undefined;
49
+ const updatesIsInstalledAndEnabled = ExpoUpdates?.isEnabled ?? false;
50
+ const updatesIsEmbeddedLaunch = ExpoUpdates?.isEmbeddedLaunch ?? false;
51
+ const shouldServeDomFromUpdates = updatesIsInstalledAndEnabled && !updatesIsEmbeddedLaunch;
52
+ // If updates is installed and enabled, and we're not running from an embedded launch, we should serve the DOM Components from the `.expo-internal` directory
53
+ if (shouldServeDomFromUpdates) {
54
+ const localAssets = ExpoUpdates?.localAssets ?? {};
55
+ const anyLocalAsset = Object.values(localAssets)[0];
56
+ if (anyLocalAsset) {
57
+ // Try to get the `.expo-internal` directory from the first local asset
58
+ return anyLocalAsset.slice(0, anyLocalAsset.lastIndexOf('/'));
59
+ }
60
+ }
61
+ return null;
62
+ }
@@ -1,6 +1,7 @@
1
1
  import { useCallback, useEffect, useImperativeHandle, type DependencyList, type Ref } from 'react';
2
2
 
3
3
  import type { DOMImperativeFactory } from './dom.types';
4
+ import { REGISTER_DOM_IMPERATIVE_HANDLE_PROPS } from './injection';
4
5
 
5
6
  /**
6
7
  * A React `useImperativeHandle` like hook for DOM components.
@@ -23,6 +24,13 @@ export function useDOMImperativeHandle<T extends DOMImperativeFactory>(
23
24
  useEffect(() => {
24
25
  if (!isTargetWeb) {
25
26
  globalThis._domRefProxy = init();
27
+ // @ts-expect-error: Added via react-native-webview
28
+ window.ReactNativeWebView.postMessage(
29
+ JSON.stringify({
30
+ type: REGISTER_DOM_IMPERATIVE_HANDLE_PROPS,
31
+ data: Object.keys(globalThis._domRefProxy),
32
+ })
33
+ );
26
34
  }
27
35
  return () => {
28
36
  if (!isTargetWeb) {
@@ -0,0 +1,16 @@
1
+ import { BridgeMessage, JSONValue } from './dom.types';
2
+
3
+ const globalListeners = new Set<(message: BridgeMessage<any>) => void>();
4
+
5
+ export function _emitGlobalEvent<TData extends JSONValue>(message: BridgeMessage<TData>) {
6
+ globalListeners.forEach((listener) => listener(message));
7
+ }
8
+
9
+ export const addGlobalDomEventListener = <TData extends JSONValue>(
10
+ onSubscribe: (message: BridgeMessage<TData>) => void
11
+ ): (() => void) => {
12
+ globalListeners.add(onSubscribe);
13
+ return () => {
14
+ globalListeners.delete(onSubscribe);
15
+ };
16
+ };
@@ -4,6 +4,7 @@ export const NATIVE_ACTION = '$$native_action';
4
4
  export const NATIVE_ACTION_RESULT = '$$native_action_result';
5
5
  export const DOM_EVENT = '$$dom_event';
6
6
  export const MATCH_CONTENTS_EVENT = '$$match_contents_event';
7
+ export const REGISTER_DOM_IMPERATIVE_HANDLE_PROPS = '$$register_dom_imperative_handle_props';
7
8
 
8
9
  export const getInjectEventScript = <T extends BridgeMessage<any>>(detail: T) => {
9
10
  return `;(function() {
@@ -16,14 +17,14 @@ export const getInjectEventScript = <T extends BridgeMessage<any>>(detail: T) =>
16
17
 
17
18
  export function getInjectEnvsScript() {
18
19
  return `;(function injectEnvs() {
19
- let domBaseUrl = '';
20
+ let baseUrl = '';
20
21
  if (window.location.protocol === 'file:') {
21
- domBaseUrl = window.location.href.substring(0, window.location.href.lastIndexOf('/'));
22
+ baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf('/'));
22
23
  }
23
24
  window.process = window.process || {};
24
25
  window.process.env = {
25
26
  ...(window.process.env || {}),
26
- EXPO_DOM_BASE_URL: domBaseUrl,
27
+ EXPO_BASE_URL: baseUrl,
27
28
  };
28
29
  })();
29
30
  true;`;
@@ -2,7 +2,9 @@
2
2
  import React from 'react';
3
3
  import { AppState } from 'react-native';
4
4
 
5
+ import { getBaseURL } from './base';
5
6
  import type { BridgeMessage, DOMProps, WebViewProps, WebViewRef } from './dom.types';
7
+ import { _emitGlobalEvent } from './global-events';
6
8
  import {
7
9
  getInjectBodySizeObserverScript,
8
10
  getInjectEventScript,
@@ -10,30 +12,37 @@ import {
10
12
  MATCH_CONTENTS_EVENT,
11
13
  NATIVE_ACTION,
12
14
  NATIVE_ACTION_RESULT,
15
+ REGISTER_DOM_IMPERATIVE_HANDLE_PROPS,
13
16
  } from './injection';
14
17
  import ExpoDomWebView from './webview/ExpoDOMWebView';
15
18
  import RNWebView from './webview/RNWebView';
16
19
 
17
20
  interface Props {
18
21
  dom: DOMProps;
19
- source: {
20
- uri: string;
21
- };
22
+ filePath: string;
22
23
  }
23
24
 
24
- const RawWebView = React.forwardRef<object, Props>(({ dom, source, ...marshalProps }, ref) => {
25
- if (ref != null && typeof ref == 'object' && ref.current == null) {
25
+ const RawWebView = React.forwardRef<object, Props>(({ dom, filePath, ...marshalProps }, ref) => {
26
+ if (ref != null && typeof ref === 'object' && ref.current == null) {
26
27
  ref.current = new Proxy(
27
28
  {},
28
29
  {
29
- get(target, prop) {
30
+ get(_, prop) {
30
31
  const propName = String(prop);
31
- return function (...args) {
32
- const serializedArgs = args.map((arg) => JSON.stringify(arg)).join(',');
33
- webviewRef.current?.injectJavaScript(
34
- `window._domRefProxy.${propName}(${serializedArgs})`
35
- );
36
- };
32
+ if (domImperativeHandlePropsRef.current?.includes(propName)) {
33
+ return function (...args) {
34
+ const serializedArgs = args.map((arg) => JSON.stringify(arg)).join(',');
35
+ webviewRef.current?.injectJavaScript(
36
+ `window._domRefProxy.${propName}(${serializedArgs})`
37
+ );
38
+ };
39
+ }
40
+ if (typeof webviewRef.current?.[propName] === 'function') {
41
+ return function (...args) {
42
+ return webviewRef.current?.[propName](...args);
43
+ };
44
+ }
45
+ return undefined;
37
46
  },
38
47
  }
39
48
  );
@@ -41,6 +50,8 @@ const RawWebView = React.forwardRef<object, Props>(({ dom, source, ...marshalPro
41
50
 
42
51
  const webView = resolveWebView(dom?.useExpoDOMWebView ?? false);
43
52
  const webviewRef = React.useRef<WebViewRef>(null);
53
+ const domImperativeHandlePropsRef = React.useRef<string[]>([]);
54
+ const source = { uri: `${getBaseURL()}/${filePath}` };
44
55
  const [containerStyle, setContainerStyle] = React.useState<WebViewProps['containerStyle']>(null);
45
56
 
46
57
  const emit = React.useCallback(
@@ -76,7 +87,11 @@ const RawWebView = React.forwardRef<object, Props>(({ dom, source, ...marshalPro
76
87
  return React.createElement(webView, {
77
88
  webviewDebuggingEnabled: __DEV__,
78
89
  // Make iOS scrolling feel native.
79
- decelerationRate: 'normal',
90
+ decelerationRate: process.env.EXPO_OS === 'ios' ? 'normal' : undefined,
91
+ // This is a better default for integrating with native navigation.
92
+ contentInsetAdjustmentBehavior: 'automatic',
93
+ // This is the default in ScrollView and upstream native.
94
+ automaticallyAdjustsScrollIndicatorInsets: true,
80
95
  originWhitelist: ['*'],
81
96
  allowFileAccess: true,
82
97
  allowFileAccessFromFileURLs: true,
@@ -127,6 +142,11 @@ const RawWebView = React.forwardRef<object, Props>(({ dom, source, ...marshalPro
127
142
  return;
128
143
  }
129
144
 
145
+ if (type === REGISTER_DOM_IMPERATIVE_HANDLE_PROPS) {
146
+ domImperativeHandlePropsRef.current = data;
147
+ return;
148
+ }
149
+
130
150
  if (type === NATIVE_ACTION) {
131
151
  const action = marshalProps[data.actionId];
132
152
  if (action == null) {
@@ -177,6 +197,7 @@ const RawWebView = React.forwardRef<object, Props>(({ dom, source, ...marshalPro
177
197
  } else {
178
198
  dom?.onMessage?.(event);
179
199
  }
200
+ _emitGlobalEvent({ type, data });
180
201
  },
181
202
  });
182
203
  });
@@ -22,7 +22,6 @@ type InitialProps = {
22
22
  * - Invokes React Native's `AppRegistry.registerComponent`.
23
23
  * - Invokes React Native web's `AppRegistry.runApplication` on web to render to the root `index.html` file.
24
24
  * - Polyfills the `process.nextTick` function globally.
25
- * - Adds support for using the `fontFamily` React Native style with the `expo-font` package.
26
25
  *
27
26
  * This method also adds the following dev-only features that are removed in production bundles.
28
27
  * - Adds the Fast Refresh and bundle splitting indicator to the app.