@connect-xyz/auth-react 0.64.0 → 0.66.0

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/README.md CHANGED
@@ -65,6 +65,10 @@ function App() {
65
65
  console.log('Auth event:', type, 'Data:', data);
66
66
  };
67
67
 
68
+ const handleLoaded = () => {
69
+ console.log('Auth widget loaded and ready');
70
+ };
71
+
68
72
  return (
69
73
  <Auth
70
74
  jwt={jwt}
@@ -74,6 +78,7 @@ function App() {
74
78
  onClose={handleClose}
75
79
  onDeposit={handleDeposit}
76
80
  onEvent={handleEvent}
81
+ onLoaded={handleLoaded}
77
82
  />
78
83
  );
79
84
  }
@@ -116,6 +121,9 @@ function App() {
116
121
  onEvent={({ type, data }) => {
117
122
  console.log('Event type:', type, 'Event data:', data);
118
123
  }}
124
+ onLoaded={() => {
125
+ console.log('Auth widget loaded and ready');
126
+ }}
119
127
  />
120
128
  </div>
121
129
  );
@@ -137,6 +145,7 @@ export default App;
137
145
  | `onClose` | `() => void` | No | - | Callback when the widget is closed |
138
146
  | `onDeposit` | `({ data }) => void` | No | - | Callback for deposit received |
139
147
  | `onEvent` | `({ type, data }) => void` | No | - | Callback for general events |
148
+ | `onLoaded` | `() => void` | No | - | Callback when the widget is loaded and ready |
140
149
 
141
150
  ## More Information & Support
142
151
 
package/dist/index.d.ts CHANGED
@@ -59,8 +59,6 @@ export declare const Auth: default_2.FC<AuthWrapperProps>;
59
59
  declare type AuthCallbacks = CommonCallbacks<AuthEvent> & {
60
60
  /** Called when a deposit action occurs */
61
61
  onDeposit?: (deposit: DepositCompletedPayload) => void;
62
- /** Called when the Auth component has finished loading and is ready */
63
- onLoaded?: () => void;
64
62
  };
65
63
 
66
64
  /**
@@ -140,6 +138,8 @@ declare type CommonCallbacks<TEvent = AppEvent> = {
140
138
  onClose?: () => void;
141
139
  /** Called when a general event occurs */
142
140
  onEvent?: (event: TEvent) => void;
141
+ /** Called when the widget has loaded and is ready */
142
+ onLoaded?: () => void;
143
143
  };
144
144
 
145
145
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connect-xyz/auth-react",
3
- "version": "0.64.0",
3
+ "version": "0.66.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",