expo 52.0.0-preview.4 → 52.0.0-preview.5
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/android/build.gradle +2 -2
- package/build/dom/global-events.d.ts +4 -0
- package/build/dom/global-events.d.ts.map +1 -0
- package/build/dom/webview-wrapper.d.ts.map +1 -1
- package/bundledNativeModules.json +1 -1
- package/dom/global.d.ts +1 -0
- package/dom/global.js +1 -0
- package/package.json +2 -2
- package/src/dom/global-events.ts +16 -0
- package/src/dom/webview-wrapper.tsx +2 -0
package/android/build.gradle
CHANGED
|
@@ -33,7 +33,7 @@ def getRNVersion() {
|
|
|
33
33
|
ensureDependeciesWereEvaluated(project)
|
|
34
34
|
|
|
35
35
|
group = 'host.exp.exponent'
|
|
36
|
-
version = '52.0.0-preview.
|
|
36
|
+
version = '52.0.0-preview.5'
|
|
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.
|
|
49
|
+
versionName "52.0.0-preview.5"
|
|
50
50
|
consumerProguardFiles("proguard-rules.pro")
|
|
51
51
|
}
|
|
52
52
|
testOptions {
|
|
@@ -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"}
|
|
@@ -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;
|
|
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;AAarF,UAAU,KAAK;IACb,GAAG,EAAE,QAAQ,CAAC;IACd,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,QAAA,MAAM,UAAU,sEA+Jd,CAAC;AAaH,wBAAgB,cAAc,CAAC,iBAAiB,EAAE,OAAO,OASxD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"expo-network": "~7.0.0",
|
|
64
64
|
"expo-notifications": "~0.29.3",
|
|
65
65
|
"expo-print": "~14.0.2",
|
|
66
|
-
"expo-router": "~4.0.0-preview.
|
|
66
|
+
"expo-router": "~4.0.0-preview.3",
|
|
67
67
|
"expo-screen-capture": "~7.0.0",
|
|
68
68
|
"expo-screen-orientation": "~8.0.0",
|
|
69
69
|
"expo-secure-store": "~14.0.0",
|
package/dom/global.d.ts
ADDED
|
@@ -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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo",
|
|
3
|
-
"version": "52.0.0-preview.
|
|
3
|
+
"version": "52.0.0-preview.5",
|
|
4
4
|
"description": "The Expo SDK",
|
|
5
5
|
"main": "src/Expo.ts",
|
|
6
6
|
"module": "src/Expo.ts",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"optional": true
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "ff6689d083e2188544adb295cb9a63e84afa5c8c"
|
|
112
112
|
}
|
|
@@ -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
|
+
};
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { AppState } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import type { BridgeMessage, DOMProps, WebViewProps, WebViewRef } from './dom.types';
|
|
6
|
+
import { _emitGlobalEvent } from './global-events';
|
|
6
7
|
import {
|
|
7
8
|
getInjectBodySizeObserverScript,
|
|
8
9
|
getInjectEventScript,
|
|
@@ -177,6 +178,7 @@ const RawWebView = React.forwardRef<object, Props>(({ dom, source, ...marshalPro
|
|
|
177
178
|
} else {
|
|
178
179
|
dom?.onMessage?.(event);
|
|
179
180
|
}
|
|
181
|
+
_emitGlobalEvent({ type, data });
|
|
180
182
|
},
|
|
181
183
|
});
|
|
182
184
|
});
|