@farcaster/frame-sdk 0.0.0-canary-20250508234838 → 0.0.0-canary-20250509172815
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/dist/index.min.js +2 -18
- package/dist/index.min.js.map +4 -4
- package/dist/sdk.js +1 -15
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +1 -2
- package/package.json +2 -3
- package/src/sdk.ts +1 -23
- package/src/types.ts +0 -2
- package/dist/rn-func-proxy.d.ts +0 -8
- package/dist/rn-func-proxy.js +0 -67
- package/dist/rn.d.ts +0 -12
- package/dist/rn.js +0 -86
- package/src/rn-func-proxy.ts +0 -110
- package/src/rn.ts +0 -124
package/dist/sdk.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { AddFrame, SignIn
|
|
2
|
-
import { proxy } from 'comlink';
|
|
1
|
+
import { AddFrame, SignIn } from '@farcaster/frame-core';
|
|
3
2
|
import { EventEmitter } from 'eventemitter3';
|
|
4
3
|
import { frameHost } from './frameHost';
|
|
5
4
|
import { provider } from './provider';
|
|
6
|
-
import { initializeReactNativeSDK, isInReactNativeWebViewEnvironment, } from './rn';
|
|
7
|
-
// We need to ensure the React Native specific parts of the SDK are initialized
|
|
8
|
-
// before the SDK is used. Otherwise certain functionality, such as proxied function
|
|
9
|
-
// calls, will not work.
|
|
10
|
-
initializeReactNativeSDK();
|
|
11
5
|
export function createEmitter() {
|
|
12
6
|
const emitter = new EventEmitter();
|
|
13
7
|
return {
|
|
@@ -114,14 +108,6 @@ export const sdk = {
|
|
|
114
108
|
wallet: {
|
|
115
109
|
ethProvider: provider,
|
|
116
110
|
},
|
|
117
|
-
setShareStateProvider: (fn) => {
|
|
118
|
-
if (isInReactNativeWebViewEnvironment()) {
|
|
119
|
-
frameHost.setShareStateProvider.bind(frameHost)(fn);
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
frameHost.setShareStateProvider.bind(frameHost)(proxy(fn));
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
111
|
};
|
|
126
112
|
// Required to pass SSR
|
|
127
113
|
if (typeof document !== 'undefined') {
|