@tuwaio/satellite-react 1.0.0-fix-adapters-independ-alpha.4.fd3acdc → 1.0.0-fix-adapters-independ-alpha.5.ff9cd27
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/dist/solana/index.cjs +1 -1
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.js +1 -1
- package/dist/solana/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
|
|
1
|
+
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');function m(n){let[t,r]=react.useState(null);return react.useEffect(()=>{(async()=>{try{let o=typeof window>"u"||typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",e=!1;if(o)try{e=new Function('try { return typeof require !== "undefined" && Boolean(require("@wagmi/core") && require("viem")); } catch (e) { return false; }')();}catch{e=!1;}else try{await Promise.all([import('@wagmi/core'),import('viem')]),e=!0;}catch{e=!1;}if(e){let a=await new Function('return import("./EVMConnectorsWatcherImpl").then(module => module.EVMConnectorsWatcherImpl).catch(error => { console.warn("Failed to load EVMConnectorsWatcherImpl:", error); return null; })')();r(()=>a);}}catch(o){console.warn("Failed to load EVM watcher:",o);}})();},[]),t?jsxRuntime.jsx(t,{...n}):null}exports.EVMConnectorsWatcher=m;//# 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","hasDependencies","WatcherImpl","error","jsx"],"mappings":"gFAwCO,SAASA,CAAAA,CAAqBC,
|
|
1
|
+
{"version":3,"sources":["../../src/evm/EVMConnectorsWatcherDynamic.tsx"],"names":["EVMConnectorsWatcher","props","WatcherComponent","setWatcherComponent","useState","useEffect","isBundlerEnv","hasDependencies","WatcherImpl","error","jsx"],"mappings":"gFAwCO,SAASA,CAAAA,CAAqBC,CAAAA,CAAkC,CACrE,GAAM,CAACC,CAAAA,CAAkBC,CAAmB,CAAA,CAAIC,cAAAA,CAAgE,IAAI,CAAA,CAsDpH,OAnDAC,eAAAA,CAAU,IAAM,CAAA,CACM,SAAY,CAC9B,GAAI,CAGF,IAAMC,EAAe,OAAO,MAAA,CAAW,GAAA,EAClB,OAAO,MAAA,CAAW,GAAA,EAClB,OAAO,MAAA,CAAO,QAAA,CAAa,GAAA,EAC3B,OAAO,MAAA,CAAO,QAAA,CAAS,aAAA,CAAkB,GAAA,CAE1DC,CAAAA,CAAkB,CAAA,CAAA,CAEtB,GAAID,CAAAA,CAEF,GAAI,CAKFC,CAAAA,CAHoB,IAAI,QAAA,CACtB,kIACF,CAAA,GAEF,CAAA,KAAQ,CACNA,CAAAA,CAAkB,GACpB,CAAA,KAGA,GAAI,CACF,MAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,OAAO,aAAa,CAAA,CAAG,OAAO,MAAM,CAAC,CAAC,CAAA,CACzDA,CAAAA,CAAkB,CAAA,EACpB,CAAA,KAAQ,CACNA,CAAAA,CAAkB,CAAA,EACpB,CAGF,GAAIA,CAAAA,CAAiB,CAMnB,IAAMC,CAAAA,CAAc,MAJE,IAAI,QAAA,CACxB,+LACF,CAAA,EAEwC,CACxCL,CAAAA,CAAoB,IAAMK,CAAW,EACvC,CACF,CAAA,MAASC,CAAAA,CAAO,CACd,OAAA,CAAQ,IAAA,CAAK,6BAAA,CAA+BA,CAAK,EACnD,CACF,CAAA,IAGF,CAAA,CAAG,EAAE,CAAA,CAGDP,CAAAA,CACKQ,cAAAA,CAACR,CAAAA,CAAA,CAAkB,GAAGD,CAAAA,CAAO,CAAA,CAI/B,IACT","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 // Use a browser-compatible way to detect bundler environment\n const isBundlerEnv = typeof window === 'undefined' || \n (typeof window !== 'undefined' && \n typeof window.document !== 'undefined' && \n typeof window.document.createElement !== 'undefined');\n\n let hasDependencies = false;\n\n if (isBundlerEnv) {\n // In bundler environment, use require\n try {\n // Use globalThis to access global scope\n const checkImport = new Function(\n 'try { return typeof require !== \"undefined\" && Boolean(require(\"@wagmi/core\") && require(\"viem\")); } catch (e) { return false; }',\n );\n hasDependencies = checkImport();\n } catch {\n hasDependencies = false;\n }\n } else {\n // In non-bundler environment, use dynamic imports\n try {\n await Promise.all([import('@wagmi/core'), import('viem')]);\n hasDependencies = true;\n } catch {\n hasDependencies = false;\n }\n }\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 return <WatcherComponent {...props} />;\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
|
|
1
|
+
import {useState,useEffect}from'react';import {jsx}from'react/jsx-runtime';function m(n){let[t,r]=useState(null);return useEffect(()=>{(async()=>{try{let o=typeof window>"u"||typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",e=!1;if(o)try{e=new Function('try { return typeof require !== "undefined" && Boolean(require("@wagmi/core") && require("viem")); } catch (e) { return false; }')();}catch{e=!1;}else try{await Promise.all([import('@wagmi/core'),import('viem')]),e=!0;}catch{e=!1;}if(e){let a=await new Function('return import("./EVMConnectorsWatcherImpl").then(module => module.EVMConnectorsWatcherImpl).catch(error => { console.warn("Failed to load EVMConnectorsWatcherImpl:", error); return null; })')();r(()=>a);}}catch(o){console.warn("Failed to load EVM watcher:",o);}})();},[]),t?jsx(t,{...n}):null}export{m 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","hasDependencies","WatcherImpl","error","jsx"],"mappings":"2EAwCO,SAASA,CAAAA,CAAqBC,
|
|
1
|
+
{"version":3,"sources":["../../src/evm/EVMConnectorsWatcherDynamic.tsx"],"names":["EVMConnectorsWatcher","props","WatcherComponent","setWatcherComponent","useState","useEffect","isBundlerEnv","hasDependencies","WatcherImpl","error","jsx"],"mappings":"2EAwCO,SAASA,CAAAA,CAAqBC,CAAAA,CAAkC,CACrE,GAAM,CAACC,CAAAA,CAAkBC,CAAmB,CAAA,CAAIC,QAAAA,CAAgE,IAAI,CAAA,CAsDpH,OAnDAC,SAAAA,CAAU,IAAM,CAAA,CACM,SAAY,CAC9B,GAAI,CAGF,IAAMC,EAAe,OAAO,MAAA,CAAW,GAAA,EAClB,OAAO,MAAA,CAAW,GAAA,EAClB,OAAO,MAAA,CAAO,QAAA,CAAa,GAAA,EAC3B,OAAO,MAAA,CAAO,QAAA,CAAS,aAAA,CAAkB,GAAA,CAE1DC,CAAAA,CAAkB,CAAA,CAAA,CAEtB,GAAID,CAAAA,CAEF,GAAI,CAKFC,CAAAA,CAHoB,IAAI,QAAA,CACtB,kIACF,CAAA,GAEF,CAAA,KAAQ,CACNA,CAAAA,CAAkB,GACpB,CAAA,KAGA,GAAI,CACF,MAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,OAAO,aAAa,CAAA,CAAG,OAAO,MAAM,CAAC,CAAC,CAAA,CACzDA,CAAAA,CAAkB,CAAA,EACpB,CAAA,KAAQ,CACNA,CAAAA,CAAkB,CAAA,EACpB,CAGF,GAAIA,CAAAA,CAAiB,CAMnB,IAAMC,CAAAA,CAAc,MAJE,IAAI,QAAA,CACxB,+LACF,CAAA,EAEwC,CACxCL,CAAAA,CAAoB,IAAMK,CAAW,EACvC,CACF,CAAA,MAASC,CAAAA,CAAO,CACd,OAAA,CAAQ,IAAA,CAAK,6BAAA,CAA+BA,CAAK,EACnD,CACF,CAAA,IAGF,CAAA,CAAG,EAAE,CAAA,CAGDP,CAAAA,CACKQ,GAAAA,CAACR,CAAAA,CAAA,CAAkB,GAAGD,CAAAA,CAAO,CAAA,CAI/B,IACT","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 // Use a browser-compatible way to detect bundler environment\n const isBundlerEnv = typeof window === 'undefined' || \n (typeof window !== 'undefined' && \n typeof window.document !== 'undefined' && \n typeof window.document.createElement !== 'undefined');\n\n let hasDependencies = false;\n\n if (isBundlerEnv) {\n // In bundler environment, use require\n try {\n // Use globalThis to access global scope\n const checkImport = new Function(\n 'try { return typeof require !== \"undefined\" && Boolean(require(\"@wagmi/core\") && require(\"viem\")); } catch (e) { return false; }',\n );\n hasDependencies = checkImport();\n } catch {\n hasDependencies = false;\n }\n } else {\n // In non-bundler environment, use dynamic imports\n try {\n await Promise.all([import('@wagmi/core'), import('viem')]);\n hasDependencies = true;\n } catch {\n hasDependencies = false;\n }\n }\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 return <WatcherComponent {...props} />;\n }\n\n // This is a headless component, so return null\n return null;\n}\n"]}
|
package/dist/solana/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');function
|
|
1
|
+
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');function u(){let[t,o]=react.useState(null);return react.useEffect(()=>{(async()=>{try{let n=typeof window>"u"||typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",e=!1;if(n)try{e=new Function('try { return typeof require !== "undefined" && Boolean(require("@wallet-standard/react")); } catch (e) { return false; }')();}catch{e=!1;}else try{await import('@wallet-standard/react'),e=!0;}catch{e=!1;}if(e){let a=await new Function('return import("./SolanaConnectorsWatcherImpl").then(module => module.SolanaConnectorsWatcherImpl).catch(error => { console.warn("Failed to load SolanaConnectorsWatcherImpl:", error); return null; })')();o(()=>a);}}catch(n){console.warn("Failed to load Solana watcher:",n);}})();},[]),t?jsxRuntime.jsx(t,{}):null}exports.SolanaConnectorsWatcher=u;//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/solana/SolanaConnectorsWatcherDynamic.tsx"],"names":["SolanaConnectorsWatcher","WatcherComponent","setWatcherComponent","useState","useEffect","WatcherImpl","error","jsx"],"mappings":"gFAQO,SAASA,CAAAA,EAA0B,CACxC,GAAM,CAACC,CAAAA,CAAkBC,CAAmB,CAAA,CAAIC,cAAAA,CAAqC,IAAI,CAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/solana/SolanaConnectorsWatcherDynamic.tsx"],"names":["SolanaConnectorsWatcher","WatcherComponent","setWatcherComponent","useState","useEffect","isBundlerEnv","hasDependencies","WatcherImpl","error","jsx"],"mappings":"gFAQO,SAASA,CAAAA,EAA0B,CACxC,GAAM,CAACC,CAAAA,CAAkBC,CAAmB,CAAA,CAAIC,cAAAA,CAAqC,IAAI,CAAA,CAsDzF,OAnDAC,eAAAA,CAAU,IAAM,CAAA,CACM,SAAY,CAC9B,GAAI,CAGF,IAAMC,CAAAA,CAAe,OAAO,MAAA,CAAW,GAAA,EAClB,OAAO,OAAW,GAAA,EAClB,OAAO,MAAA,CAAO,QAAA,CAAa,GAAA,EAC3B,OAAO,OAAO,QAAA,CAAS,aAAA,CAAkB,GAAA,CAE1DC,CAAAA,CAAkB,CAAA,CAAA,CAEtB,GAAID,CAAAA,CAEF,GAAI,CAKFC,CAAAA,CAHoB,IAAI,QAAA,CACtB,0HACF,CAAA,GAEF,CAAA,KAAQ,CACNA,CAAAA,CAAkB,CAAA,EACpB,CAAA,KAGA,GAAI,CACF,MAAM,OAAO,wBAAwB,CAAA,CACrCA,CAAAA,CAAkB,CAAA,EACpB,MAAQ,CACNA,CAAAA,CAAkB,CAAA,EACpB,CAGF,GAAIA,CAAAA,CAAiB,CAMnB,IAAMC,CAAAA,CAAc,MAJE,IAAI,QAAA,CACxB,wMACF,GAEwC,CACxCL,CAAAA,CAAoB,IAAMK,CAAW,EACvC,CACF,OAASC,CAAAA,CAAO,CACd,OAAA,CAAQ,IAAA,CAAK,gCAAA,CAAkCA,CAAK,EACtD,CACF,CAAA,IAGF,CAAA,CAAG,EAAE,CAAA,CAGDP,CAAAA,CACKQ,cAAAA,CAACR,CAAAA,CAAA,EAAiB,CAAA,CAIpB,IACT","file":"index.cjs","sourcesContent":["import { useEffect, useState } from 'react';\n\n/**\n * A dynamic version of the SolanaConnectorsWatcher component that avoids static imports.\n * This component dynamically imports the dependencies only when they are available.\n *\n * @returns null - This is a headless component\n */\nexport function SolanaConnectorsWatcher() {\n const [WatcherComponent, setWatcherComponent] = useState<React.ComponentType | 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 // Use a browser-compatible way to detect bundler environment\n const isBundlerEnv = typeof window === 'undefined' || \n (typeof window !== 'undefined' && \n typeof window.document !== 'undefined' && \n typeof window.document.createElement !== 'undefined');\n\n let hasDependencies = false;\n\n if (isBundlerEnv) {\n // In bundler environment, use require\n try {\n // Use globalThis to access global scope\n const checkImport = new Function(\n 'try { return typeof require !== \"undefined\" && Boolean(require(\"@wallet-standard/react\")); } catch (e) { return false; }'\n );\n hasDependencies = checkImport();\n } catch {\n hasDependencies = false;\n }\n } else {\n // In non-bundler environment, use dynamic imports\n try {\n await import('@wallet-standard/react');\n hasDependencies = true;\n } catch {\n hasDependencies = false;\n }\n }\n\n if (hasDependencies) {\n // Dynamically import the actual implementation\n const dynamicImport = new Function(\n 'return import(\"./SolanaConnectorsWatcherImpl\").then(module => module.SolanaConnectorsWatcherImpl).catch(error => { console.warn(\"Failed to load SolanaConnectorsWatcherImpl:\", error); return null; })',\n );\n\n const WatcherImpl = await dynamicImport();\n setWatcherComponent(() => WatcherImpl);\n }\n } catch (error) {\n console.warn('Failed to load Solana watcher:', error);\n }\n };\n\n loadWatcher();\n }, []);\n\n // Render the actual watcher if it's loaded\n if (WatcherComponent) {\n return <WatcherComponent />;\n }\n\n // This is a headless component, so return null\n return null;\n}\n"]}
|
package/dist/solana/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {useState,useEffect}from'react';import {jsx}from'react/jsx-runtime';function
|
|
1
|
+
import {useState,useEffect}from'react';import {jsx}from'react/jsx-runtime';function u(){let[t,o]=useState(null);return useEffect(()=>{(async()=>{try{let n=typeof window>"u"||typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",e=!1;if(n)try{e=new Function('try { return typeof require !== "undefined" && Boolean(require("@wallet-standard/react")); } catch (e) { return false; }')();}catch{e=!1;}else try{await import('@wallet-standard/react'),e=!0;}catch{e=!1;}if(e){let a=await new Function('return import("./SolanaConnectorsWatcherImpl").then(module => module.SolanaConnectorsWatcherImpl).catch(error => { console.warn("Failed to load SolanaConnectorsWatcherImpl:", error); return null; })')();o(()=>a);}}catch(n){console.warn("Failed to load Solana watcher:",n);}})();},[]),t?jsx(t,{}):null}export{u as SolanaConnectorsWatcher};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/solana/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/solana/SolanaConnectorsWatcherDynamic.tsx"],"names":["SolanaConnectorsWatcher","WatcherComponent","setWatcherComponent","useState","useEffect","WatcherImpl","error","jsx"],"mappings":"2EAQO,SAASA,CAAAA,EAA0B,CACxC,GAAM,CAACC,CAAAA,CAAkBC,CAAmB,CAAA,CAAIC,QAAAA,CAAqC,IAAI,CAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/solana/SolanaConnectorsWatcherDynamic.tsx"],"names":["SolanaConnectorsWatcher","WatcherComponent","setWatcherComponent","useState","useEffect","isBundlerEnv","hasDependencies","WatcherImpl","error","jsx"],"mappings":"2EAQO,SAASA,CAAAA,EAA0B,CACxC,GAAM,CAACC,CAAAA,CAAkBC,CAAmB,CAAA,CAAIC,QAAAA,CAAqC,IAAI,CAAA,CAsDzF,OAnDAC,SAAAA,CAAU,IAAM,CAAA,CACM,SAAY,CAC9B,GAAI,CAGF,IAAMC,CAAAA,CAAe,OAAO,MAAA,CAAW,GAAA,EAClB,OAAO,OAAW,GAAA,EAClB,OAAO,MAAA,CAAO,QAAA,CAAa,GAAA,EAC3B,OAAO,OAAO,QAAA,CAAS,aAAA,CAAkB,GAAA,CAE1DC,CAAAA,CAAkB,CAAA,CAAA,CAEtB,GAAID,CAAAA,CAEF,GAAI,CAKFC,CAAAA,CAHoB,IAAI,QAAA,CACtB,0HACF,CAAA,GAEF,CAAA,KAAQ,CACNA,CAAAA,CAAkB,CAAA,EACpB,CAAA,KAGA,GAAI,CACF,MAAM,OAAO,wBAAwB,CAAA,CACrCA,CAAAA,CAAkB,CAAA,EACpB,MAAQ,CACNA,CAAAA,CAAkB,CAAA,EACpB,CAGF,GAAIA,CAAAA,CAAiB,CAMnB,IAAMC,CAAAA,CAAc,MAJE,IAAI,QAAA,CACxB,wMACF,GAEwC,CACxCL,CAAAA,CAAoB,IAAMK,CAAW,EACvC,CACF,OAASC,CAAAA,CAAO,CACd,OAAA,CAAQ,IAAA,CAAK,gCAAA,CAAkCA,CAAK,EACtD,CACF,CAAA,IAGF,CAAA,CAAG,EAAE,CAAA,CAGDP,CAAAA,CACKQ,GAAAA,CAACR,CAAAA,CAAA,EAAiB,CAAA,CAIpB,IACT","file":"index.js","sourcesContent":["import { useEffect, useState } from 'react';\n\n/**\n * A dynamic version of the SolanaConnectorsWatcher component that avoids static imports.\n * This component dynamically imports the dependencies only when they are available.\n *\n * @returns null - This is a headless component\n */\nexport function SolanaConnectorsWatcher() {\n const [WatcherComponent, setWatcherComponent] = useState<React.ComponentType | 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 // Use a browser-compatible way to detect bundler environment\n const isBundlerEnv = typeof window === 'undefined' || \n (typeof window !== 'undefined' && \n typeof window.document !== 'undefined' && \n typeof window.document.createElement !== 'undefined');\n\n let hasDependencies = false;\n\n if (isBundlerEnv) {\n // In bundler environment, use require\n try {\n // Use globalThis to access global scope\n const checkImport = new Function(\n 'try { return typeof require !== \"undefined\" && Boolean(require(\"@wallet-standard/react\")); } catch (e) { return false; }'\n );\n hasDependencies = checkImport();\n } catch {\n hasDependencies = false;\n }\n } else {\n // In non-bundler environment, use dynamic imports\n try {\n await import('@wallet-standard/react');\n hasDependencies = true;\n } catch {\n hasDependencies = false;\n }\n }\n\n if (hasDependencies) {\n // Dynamically import the actual implementation\n const dynamicImport = new Function(\n 'return import(\"./SolanaConnectorsWatcherImpl\").then(module => module.SolanaConnectorsWatcherImpl).catch(error => { console.warn(\"Failed to load SolanaConnectorsWatcherImpl:\", error); return null; })',\n );\n\n const WatcherImpl = await dynamicImport();\n setWatcherComponent(() => WatcherImpl);\n }\n } catch (error) {\n console.warn('Failed to load Solana watcher:', error);\n }\n };\n\n loadWatcher();\n }, []);\n\n // Render the actual watcher if it's loaded\n if (WatcherComponent) {\n return <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.5.ff9cd27",
|
|
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-
|
|
135
|
-
"@tuwaio/satellite-
|
|
136
|
-
"@tuwaio/satellite-
|
|
134
|
+
"@tuwaio/satellite-core": "^1.0.0-fix-adapters-independ-alpha.5.ff9cd27",
|
|
135
|
+
"@tuwaio/satellite-evm": "^1.0.0-fix-adapters-independ-alpha.5.ff9cd27",
|
|
136
|
+
"@tuwaio/satellite-solana": "^1.0.0-fix-adapters-independ-alpha.5.ff9cd27"
|
|
137
137
|
},
|
|
138
138
|
"scripts": {
|
|
139
139
|
"start": "tsup src/index.ts --watch",
|