shogun-button-react 1.5.23 → 1.5.24
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/components/ShogunButton.d.ts +2 -18
- package/package.json +2 -2
- package/CHANGELOG.md +0 -54
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ShogunCore } from "shogun-core";
|
|
3
|
-
import { Observable } from "rxjs";
|
|
4
3
|
import "../styles/index.css";
|
|
5
|
-
|
|
6
|
-
sdk: ShogunCore | null;
|
|
7
|
-
options: any;
|
|
8
|
-
isLoggedIn: boolean;
|
|
9
|
-
userPub: string | null;
|
|
10
|
-
username: string | null;
|
|
11
|
-
login: (method: string, ...args: any[]) => Promise<any>;
|
|
12
|
-
signUp: (method: string, ...args: any[]) => Promise<any>;
|
|
13
|
-
logout: () => void;
|
|
14
|
-
observe: <T>(path: string) => Observable<T>;
|
|
15
|
-
hasPlugin: (name: string) => boolean;
|
|
16
|
-
getPlugin: <T>(name: string) => T | undefined;
|
|
17
|
-
exportGunPair: (password?: string) => Promise<string>;
|
|
18
|
-
importGunPair: (pairData: string, password?: string) => Promise<boolean>;
|
|
19
|
-
};
|
|
20
|
-
export declare const useShogun: () => ShogunContextType;
|
|
4
|
+
export declare const useShogun: () => any;
|
|
21
5
|
type ShogunButtonProviderProps = {
|
|
22
6
|
children: React.ReactNode;
|
|
23
7
|
sdk: ShogunCore;
|
|
@@ -37,7 +21,7 @@ type ShogunButtonProviderProps = {
|
|
|
37
21
|
onError?: (error: string) => void;
|
|
38
22
|
onLogout?: () => void;
|
|
39
23
|
};
|
|
40
|
-
export declare function ShogunButtonProvider({ children, sdk, options, onLoginSuccess, onSignupSuccess, onError, onLogout, }: ShogunButtonProviderProps):
|
|
24
|
+
export declare function ShogunButtonProvider({ children, sdk, options, onLoginSuccess, onSignupSuccess, onError, onLogout, }: ShogunButtonProviderProps): JSX.Element;
|
|
41
25
|
type ShogunButtonComponent = React.FC & {
|
|
42
26
|
Provider: typeof ShogunButtonProvider;
|
|
43
27
|
useShogun: typeof useShogun;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shogun-button-react",
|
|
3
3
|
"description": "Shogun connector button",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.24",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"src/styles/index.css"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ethers": "^6.13.5",
|
|
35
35
|
"prettier": "^3.5.3",
|
|
36
36
|
"rxjs": "^7.8.1",
|
|
37
|
-
"shogun-core": "^1.6.
|
|
37
|
+
"shogun-core": "^1.6.13"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": "^18.0.0",
|
package/CHANGELOG.md
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## Version 1.3.4 (Latest)
|
|
4
|
-
|
|
5
|
-
### 🐛 Bug Fixes
|
|
6
|
-
- **Export Gun Pair Fix**: Fixed issue where "Export Pair" option was not accessible from user dropdown - now works correctly without requiring disconnect
|
|
7
|
-
- **Modal Logic Improvement**: Enhanced modal rendering logic to allow export functionality when user is already authenticated
|
|
8
|
-
- **UX Enhancement**: Improved back button behavior in export modal - now properly closes modal when user is logged in instead of showing unnecessary auth options
|
|
9
|
-
|
|
10
|
-
### 🔧 Technical Changes
|
|
11
|
-
- Modified component render logic to show modal even when user is logged in
|
|
12
|
-
- Improved export form navigation for better user experience
|
|
13
|
-
- Reordered dropdown menu items for better flow (Export Pair before Disconnect)
|
|
14
|
-
|
|
15
|
-
## Version 1.3.3
|
|
16
|
-
|
|
17
|
-
### ✨ New Features
|
|
18
|
-
- **Import Gun Pair Login**: Aggiunta possibilità di effettuare login tramite importazione di un Gun pair esistente
|
|
19
|
-
- **Export Gun Pair**: Funzionalità per esportare il proprio Gun pair con opzione di crittografia tramite password
|
|
20
|
-
- **Improved UX**: Migliorata l'interfaccia utente con feedback visivi e messaggi informativi
|
|
21
|
-
|
|
22
|
-
### 🔧 Improvements
|
|
23
|
-
- **Navigation Fix**: Il toggle "Don't have account? Sign up" ora porta alla selezione dei metodi di autenticazione invece che direttamente al form password
|
|
24
|
-
- **Visual Feedback**: Sostituiti gli alert con feedback visivi eleganti per export/import
|
|
25
|
-
- **Better Icons**: Aggiunte icone SVG personalizzate per import/export
|
|
26
|
-
- **Auto-copy**: L'export del pair viene automaticamente copiato negli appunti (quando supportato dal browser)
|
|
27
|
-
- **Enhanced Security**: Messaggi informativi per guidare l'utente nell'uso sicuro delle funzionalità
|
|
28
|
-
|
|
29
|
-
### 🛠 Technical Changes
|
|
30
|
-
- Rimosso l'uso del metodo `on` non disponibile in ShogunCore
|
|
31
|
-
- Definiti tipi locali per `AuthResult` per compatibilità
|
|
32
|
-
- Migliorata gestione degli stati nel provider
|
|
33
|
-
- Aggiunto reset completo degli stati quando si chiude il modal
|
|
34
|
-
|
|
35
|
-
### 🎨 UI/UX Enhancements
|
|
36
|
-
- Box informativi colorati per import/export
|
|
37
|
-
- Feedback di successo con timer automatico
|
|
38
|
-
- Indicatori di caricamento migliorati
|
|
39
|
-
- Messaggi di fallback per browser senza supporto clipboard
|
|
40
|
-
|
|
41
|
-
## Version 1.3.2
|
|
42
|
-
|
|
43
|
-
### Features
|
|
44
|
-
- Basic Gun pair export/import functionality
|
|
45
|
-
- Multi-authentication support (Password, MetaMask, WebAuthn, Nostr, OAuth)
|
|
46
|
-
- Dark mode support
|
|
47
|
-
- Responsive design
|
|
48
|
-
|
|
49
|
-
## Version 1.3.1
|
|
50
|
-
|
|
51
|
-
### Features
|
|
52
|
-
- Initial release
|
|
53
|
-
- Basic authentication flow
|
|
54
|
-
- Provider integration
|