@insforge/react 1.0.5-dev.4 → 1.0.6
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/atoms.cjs.map +1 -1
- package/dist/atoms.js.map +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +1 -1
- package/dist/components.js.map +1 -1
- package/dist/forms.cjs.map +1 -1
- package/dist/forms.js.map +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -6
- package/dist/index.d.ts +19 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +114 -114
package/dist/index.d.cts
CHANGED
|
@@ -19,7 +19,16 @@ interface InitialAuthState {
|
|
|
19
19
|
userId?: string | null;
|
|
20
20
|
}
|
|
21
21
|
interface InsforgeProviderProps {
|
|
22
|
+
/**
|
|
23
|
+
* The base URL of the InsForge backend.
|
|
24
|
+
* @deprecated This prop is no longer used.
|
|
25
|
+
* Use the client prop instead.
|
|
26
|
+
*/
|
|
27
|
+
baseUrl?: string;
|
|
22
28
|
children: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* The InsForge SDK client instance.
|
|
31
|
+
*/
|
|
23
32
|
client: InsForgeClient;
|
|
24
33
|
/**
|
|
25
34
|
* URL to redirect to after successful sign in (when token is detected in URL)
|
|
@@ -46,13 +55,16 @@ interface InsforgeProviderProps {
|
|
|
46
55
|
* ```tsx
|
|
47
56
|
* // Basic usage (React/Vite)
|
|
48
57
|
* import { InsforgeProvider } from '@insforge/react';
|
|
58
|
+
* import { createClient } from '@insforge/sdk';
|
|
59
|
+
*
|
|
60
|
+
* const client = createClient({
|
|
61
|
+
* baseUrl: import.meta.env.VITE_INSFORGE_BASE_URL,
|
|
62
|
+
* });
|
|
49
63
|
*
|
|
50
|
-
* export default function
|
|
64
|
+
* export default function MyApp() {
|
|
51
65
|
* return (
|
|
52
|
-
* <InsforgeProvider
|
|
53
|
-
*
|
|
54
|
-
* >
|
|
55
|
-
* {children}
|
|
66
|
+
* <InsforgeProvider client={client}>
|
|
67
|
+
* <App />
|
|
56
68
|
* </InsforgeProvider>
|
|
57
69
|
* );
|
|
58
70
|
* }
|
|
@@ -62,7 +74,8 @@ interface InsforgeProviderProps {
|
|
|
62
74
|
* ```tsx
|
|
63
75
|
* // With cookie sync (Next.js optimization)
|
|
64
76
|
* <InsforgeProvider
|
|
65
|
-
*
|
|
77
|
+
* client={client}
|
|
78
|
+
* afterSignInUrl="/dashboard"
|
|
66
79
|
* onSignIn={async (authToken) => {
|
|
67
80
|
* await signIn(authToken);
|
|
68
81
|
* }}
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,16 @@ interface InitialAuthState {
|
|
|
19
19
|
userId?: string | null;
|
|
20
20
|
}
|
|
21
21
|
interface InsforgeProviderProps {
|
|
22
|
+
/**
|
|
23
|
+
* The base URL of the InsForge backend.
|
|
24
|
+
* @deprecated This prop is no longer used.
|
|
25
|
+
* Use the client prop instead.
|
|
26
|
+
*/
|
|
27
|
+
baseUrl?: string;
|
|
22
28
|
children: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* The InsForge SDK client instance.
|
|
31
|
+
*/
|
|
23
32
|
client: InsForgeClient;
|
|
24
33
|
/**
|
|
25
34
|
* URL to redirect to after successful sign in (when token is detected in URL)
|
|
@@ -46,13 +55,16 @@ interface InsforgeProviderProps {
|
|
|
46
55
|
* ```tsx
|
|
47
56
|
* // Basic usage (React/Vite)
|
|
48
57
|
* import { InsforgeProvider } from '@insforge/react';
|
|
58
|
+
* import { createClient } from '@insforge/sdk';
|
|
59
|
+
*
|
|
60
|
+
* const client = createClient({
|
|
61
|
+
* baseUrl: import.meta.env.VITE_INSFORGE_BASE_URL,
|
|
62
|
+
* });
|
|
49
63
|
*
|
|
50
|
-
* export default function
|
|
64
|
+
* export default function MyApp() {
|
|
51
65
|
* return (
|
|
52
|
-
* <InsforgeProvider
|
|
53
|
-
*
|
|
54
|
-
* >
|
|
55
|
-
* {children}
|
|
66
|
+
* <InsforgeProvider client={client}>
|
|
67
|
+
* <App />
|
|
56
68
|
* </InsforgeProvider>
|
|
57
69
|
* );
|
|
58
70
|
* }
|
|
@@ -62,7 +74,8 @@ interface InsforgeProviderProps {
|
|
|
62
74
|
* ```tsx
|
|
63
75
|
* // With cookie sync (Next.js optimization)
|
|
64
76
|
* <InsforgeProvider
|
|
65
|
-
*
|
|
77
|
+
* client={client}
|
|
78
|
+
* afterSignInUrl="/dashboard"
|
|
66
79
|
* onSignIn={async (authToken) => {
|
|
67
80
|
* await signIn(authToken);
|
|
68
81
|
* }}
|
package/dist/index.js
CHANGED
|
@@ -5480,7 +5480,7 @@ function UserProfileModal({ onClose, onError }) {
|
|
|
5480
5480
|
if (!user) return;
|
|
5481
5481
|
setIsSaving(true);
|
|
5482
5482
|
try {
|
|
5483
|
-
const result = await updateUser({
|
|
5483
|
+
const result = await updateUser({ name });
|
|
5484
5484
|
if (result?.error) {
|
|
5485
5485
|
onError?.(result.error);
|
|
5486
5486
|
} else {
|