@tuwaio/satellite-react 1.0.0-fix-adapters-independ-alpha.2.821adb2 → 1.0.0-fix-adapters-independ-alpha.3.172f7e1
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/evm/index.cjs +1 -1
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.js +1 -1
- package/dist/evm/index.js.map +1 -1
- package/package.json +4 -4
package/dist/evm/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');function d(
|
|
1
|
+
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');function d(n){let[e,t]=react.useState(null);return react.useEffect(()=>{(async()=>{try{if(new Function('try { return Boolean(require("@wagmi/core") && require("viem")); } catch { return false; }')()){let r=await new Function('return import("./EVMConnectorsWatcherImpl").then(module => module.EVMConnectorsWatcherImpl).catch(error => { console.warn("Failed to load EVMConnectorsWatcherImpl:", error); return null; })')();t(()=>r);}}catch(o){console.warn("Failed to load EVM watcher:",o);}})();},[]),e?(console.log("WatcherComponent loaded",e),jsxRuntime.jsx(e,{...n})):(console.log("WatcherComponent initial",e),null)}exports.EVMConnectorsWatcher=d;//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/evm/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/evm/EVMConnectorsWatcherDynamic.tsx"],"names":["EVMConnectorsWatcher","props","WatcherComponent","setWatcherComponent","useState","useEffect","WatcherImpl","error","jsx"],"mappings":"gFAwCO,SAASA,CAAAA,CAAqBC,
|
|
1
|
+
{"version":3,"sources":["../../src/evm/EVMConnectorsWatcherDynamic.tsx"],"names":["EVMConnectorsWatcher","props","WatcherComponent","setWatcherComponent","useState","useEffect","WatcherImpl","error","jsx"],"mappings":"gFAwCO,SAASA,CAAAA,CAAqBC,EAAkC,CACrE,GAAM,CAACC,CAAAA,CAAkBC,CAAmB,EAAIC,cAAAA,CAAgE,IAAI,CAAA,CA+BpH,OA5BAC,gBAAU,IAAM,CAAA,CACM,SAAY,CAC9B,GAAI,CAQF,GAN0B,IAAI,QAAA,CAC5B,4FACF,CAAA,EAE0C,CAErB,CAMnB,IAAMC,CAAAA,CAAc,MAJE,IAAI,QAAA,CACxB,+LACF,CAAA,GAGAH,CAAAA,CAAoB,IAAMG,CAAW,EACvC,CACF,CAAA,MAASC,CAAAA,CAAO,CACd,OAAA,CAAQ,KAAK,6BAAA,CAA+BA,CAAK,EACnD,CACF,CAAA,IAGF,CAAA,CAAG,EAAE,CAAA,CAGDL,GAEA,OAAA,CAAQ,GAAA,CAAI,yBAAA,CAA2BA,CAAgB,EAElDM,cAAAA,CAACN,CAAAA,CAAA,CAAkB,GAAGD,EAAO,CAAA,GAIpC,OAAA,CAAQ,IAAI,0BAAA,CAA4BC,CAAgB,EAInD,IAAA,CACT","file":"index.cjs","sourcesContent":["import { useEffect, useState } from 'react';\n\n/**\n * Props for the {@link EVMConnectorsWatcher} component.\n */\nexport interface EVMConnectorsWatcherProps {\n /**\n * The configuration object from `@wagmi/core`.\n * This is required to initialize the account watcher.\n */\n wagmiConfig: any; // Using 'any' to avoid direct import of @wagmi/core types\n\n /**\n * Optional object representing the Sign-In With Ethereum (SIWE) state.\n * If provided, the watcher will use this state to manage updates\n * and disconnections based on SIWE status.\n */\n siwe?: {\n /**\n * Flag indicating if the SIWE authentication request was rejected by the user.\n */\n isRejected: boolean;\n /**\n * Flag indicating if the user is successfully signed in via SIWE.\n */\n isSignedIn: boolean;\n /**\n * Flag indicating if the SIWE flow is enabled.\n */\n enabled?: boolean;\n };\n}\n\n/**\n * A dynamic version of the EVMConnectorsWatcher component that avoids static imports.\n * This component dynamically imports the dependencies only when they are available.\n *\n * @param props - The component's props. See {@link EVMConnectorsWatcherProps} for details.\n * @returns {null} This component does not render any UI.\n */\nexport function EVMConnectorsWatcher(props: EVMConnectorsWatcherProps) {\n const [WatcherComponent, setWatcherComponent] = useState<React.ComponentType<EVMConnectorsWatcherProps> | null>(null);\n\n // Load the actual watcher component dynamically\n useEffect(() => {\n const loadWatcher = async () => {\n try {\n // Check if the required dependencies are available\n const checkDependencies = new Function(\n 'try { return Boolean(require(\"@wagmi/core\") && require(\"viem\")); } catch { return false; }',\n );\n\n const hasDependencies = checkDependencies();\n\n if (hasDependencies) {\n // Dynamically import the actual implementation\n const dynamicImport = new Function(\n 'return import(\"./EVMConnectorsWatcherImpl\").then(module => module.EVMConnectorsWatcherImpl).catch(error => { console.warn(\"Failed to load EVMConnectorsWatcherImpl:\", error); return null; })',\n );\n\n const WatcherImpl = await dynamicImport();\n setWatcherComponent(() => WatcherImpl);\n }\n } catch (error) {\n console.warn('Failed to load EVM watcher:', error);\n }\n };\n\n loadWatcher();\n }, []);\n\n // Render the actual watcher if it's loaded\n if (WatcherComponent) {\n {\n console.log('WatcherComponent loaded', WatcherComponent);\n }\n return <WatcherComponent {...props} />;\n }\n\n {\n console.log('WatcherComponent initial', WatcherComponent);\n }\n\n // This is a headless component, so return null\n return null;\n}\n"]}
|
package/dist/evm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {useState,useEffect}from'react';import {jsx}from'react/jsx-runtime';function d(
|
|
1
|
+
import {useState,useEffect}from'react';import {jsx}from'react/jsx-runtime';function d(n){let[e,t]=useState(null);return useEffect(()=>{(async()=>{try{if(new Function('try { return Boolean(require("@wagmi/core") && require("viem")); } catch { return false; }')()){let r=await new Function('return import("./EVMConnectorsWatcherImpl").then(module => module.EVMConnectorsWatcherImpl).catch(error => { console.warn("Failed to load EVMConnectorsWatcherImpl:", error); return null; })')();t(()=>r);}}catch(o){console.warn("Failed to load EVM watcher:",o);}})();},[]),e?(console.log("WatcherComponent loaded",e),jsx(e,{...n})):(console.log("WatcherComponent initial",e),null)}export{d as EVMConnectorsWatcher};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/evm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/evm/EVMConnectorsWatcherDynamic.tsx"],"names":["EVMConnectorsWatcher","props","WatcherComponent","setWatcherComponent","useState","useEffect","WatcherImpl","error","jsx"],"mappings":"2EAwCO,SAASA,CAAAA,CAAqBC,
|
|
1
|
+
{"version":3,"sources":["../../src/evm/EVMConnectorsWatcherDynamic.tsx"],"names":["EVMConnectorsWatcher","props","WatcherComponent","setWatcherComponent","useState","useEffect","WatcherImpl","error","jsx"],"mappings":"2EAwCO,SAASA,CAAAA,CAAqBC,EAAkC,CACrE,GAAM,CAACC,CAAAA,CAAkBC,CAAmB,EAAIC,QAAAA,CAAgE,IAAI,CAAA,CA+BpH,OA5BAC,UAAU,IAAM,CAAA,CACM,SAAY,CAC9B,GAAI,CAQF,GAN0B,IAAI,QAAA,CAC5B,4FACF,CAAA,EAE0C,CAErB,CAMnB,IAAMC,CAAAA,CAAc,MAJE,IAAI,QAAA,CACxB,+LACF,CAAA,GAGAH,CAAAA,CAAoB,IAAMG,CAAW,EACvC,CACF,CAAA,MAASC,CAAAA,CAAO,CACd,OAAA,CAAQ,KAAK,6BAAA,CAA+BA,CAAK,EACnD,CACF,CAAA,IAGF,CAAA,CAAG,EAAE,CAAA,CAGDL,GAEA,OAAA,CAAQ,GAAA,CAAI,yBAAA,CAA2BA,CAAgB,EAElDM,GAAAA,CAACN,CAAAA,CAAA,CAAkB,GAAGD,EAAO,CAAA,GAIpC,OAAA,CAAQ,IAAI,0BAAA,CAA4BC,CAAgB,EAInD,IAAA,CACT","file":"index.js","sourcesContent":["import { useEffect, useState } from 'react';\n\n/**\n * Props for the {@link EVMConnectorsWatcher} component.\n */\nexport interface EVMConnectorsWatcherProps {\n /**\n * The configuration object from `@wagmi/core`.\n * This is required to initialize the account watcher.\n */\n wagmiConfig: any; // Using 'any' to avoid direct import of @wagmi/core types\n\n /**\n * Optional object representing the Sign-In With Ethereum (SIWE) state.\n * If provided, the watcher will use this state to manage updates\n * and disconnections based on SIWE status.\n */\n siwe?: {\n /**\n * Flag indicating if the SIWE authentication request was rejected by the user.\n */\n isRejected: boolean;\n /**\n * Flag indicating if the user is successfully signed in via SIWE.\n */\n isSignedIn: boolean;\n /**\n * Flag indicating if the SIWE flow is enabled.\n */\n enabled?: boolean;\n };\n}\n\n/**\n * A dynamic version of the EVMConnectorsWatcher component that avoids static imports.\n * This component dynamically imports the dependencies only when they are available.\n *\n * @param props - The component's props. See {@link EVMConnectorsWatcherProps} for details.\n * @returns {null} This component does not render any UI.\n */\nexport function EVMConnectorsWatcher(props: EVMConnectorsWatcherProps) {\n const [WatcherComponent, setWatcherComponent] = useState<React.ComponentType<EVMConnectorsWatcherProps> | null>(null);\n\n // Load the actual watcher component dynamically\n useEffect(() => {\n const loadWatcher = async () => {\n try {\n // Check if the required dependencies are available\n const checkDependencies = new Function(\n 'try { return Boolean(require(\"@wagmi/core\") && require(\"viem\")); } catch { return false; }',\n );\n\n const hasDependencies = checkDependencies();\n\n if (hasDependencies) {\n // Dynamically import the actual implementation\n const dynamicImport = new Function(\n 'return import(\"./EVMConnectorsWatcherImpl\").then(module => module.EVMConnectorsWatcherImpl).catch(error => { console.warn(\"Failed to load EVMConnectorsWatcherImpl:\", error); return null; })',\n );\n\n const WatcherImpl = await dynamicImport();\n setWatcherComponent(() => WatcherImpl);\n }\n } catch (error) {\n console.warn('Failed to load EVM watcher:', error);\n }\n };\n\n loadWatcher();\n }, []);\n\n // Render the actual watcher if it's loaded\n if (WatcherComponent) {\n {\n console.log('WatcherComponent loaded', WatcherComponent);\n }\n return <WatcherComponent {...props} />;\n }\n\n {\n console.log('WatcherComponent initial', WatcherComponent);\n }\n\n // This is a headless component, so return null\n return null;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuwaio/satellite-react",
|
|
3
|
-
"version": "1.0.0-fix-adapters-independ-alpha.
|
|
3
|
+
"version": "1.0.0-fix-adapters-independ-alpha.3.172f7e1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Oleksandr Tkach",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -131,9 +131,9 @@
|
|
|
131
131
|
"viem": "^2.42.1",
|
|
132
132
|
"typescript": "^5.9.3",
|
|
133
133
|
"zustand": "^5.0.9",
|
|
134
|
-
"@tuwaio/satellite-core": "^1.0.0-fix-adapters-independ-alpha.
|
|
135
|
-
"@tuwaio/satellite-
|
|
136
|
-
"@tuwaio/satellite-
|
|
134
|
+
"@tuwaio/satellite-core": "^1.0.0-fix-adapters-independ-alpha.3.172f7e1",
|
|
135
|
+
"@tuwaio/satellite-evm": "^1.0.0-fix-adapters-independ-alpha.3.172f7e1",
|
|
136
|
+
"@tuwaio/satellite-solana": "^1.0.0-fix-adapters-independ-alpha.3.172f7e1"
|
|
137
137
|
},
|
|
138
138
|
"scripts": {
|
|
139
139
|
"start": "tsup src/index.ts --watch",
|