@orangecheck/auth-client 0.6.0 → 1.1.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/dist/index.d.mts +22 -5
- package/dist/index.d.ts +22 -5
- package/dist/index.js +523 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +523 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -2,8 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
interface OcAccount {
|
|
4
4
|
accountId: string;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
didOc: string;
|
|
6
|
+
primaryBtc?: string | null;
|
|
7
|
+
hasEmail?: boolean;
|
|
7
8
|
displayName?: string | null;
|
|
8
9
|
nostrNpub?: string | null;
|
|
9
10
|
homeFederation?: string | null;
|
|
@@ -38,18 +39,20 @@ declare function useOptionalOcSession(): OcSessionState | null;
|
|
|
38
39
|
|
|
39
40
|
interface OcAccountChipProps {
|
|
40
41
|
dashboardUrl?: string;
|
|
42
|
+
signInUrl?: string;
|
|
41
43
|
signInLabel?: string;
|
|
42
44
|
className?: string;
|
|
43
45
|
triggerClassName?: string;
|
|
44
46
|
popoverClassName?: string;
|
|
45
47
|
menuItemClassName?: string;
|
|
46
48
|
}
|
|
47
|
-
declare function OcAccountChip({ dashboardUrl, signInLabel, className, triggerClassName, popoverClassName, menuItemClassName, }: OcAccountChipProps): React.ReactElement | null;
|
|
49
|
+
declare function OcAccountChip({ dashboardUrl, signInUrl: signInUrlOverride, signInLabel, className, triggerClassName, popoverClassName, menuItemClassName, }: OcAccountChipProps): React.ReactElement | null;
|
|
48
50
|
interface OcSignInButtonProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
49
51
|
label?: string;
|
|
50
52
|
eager?: boolean;
|
|
53
|
+
signInUrl?: string;
|
|
51
54
|
}
|
|
52
|
-
declare function OcSignInButton({ label, eager, className, ...rest }: OcSignInButtonProps): React.ReactElement | null;
|
|
55
|
+
declare function OcSignInButton({ label, eager, className, signInUrl: signInUrlOverride, ...rest }: OcSignInButtonProps): React.ReactElement | null;
|
|
53
56
|
interface OcAccountPillProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
54
57
|
dashboardUrl?: string;
|
|
55
58
|
render?: (account: {
|
|
@@ -91,4 +94,18 @@ interface UseOcAddressSuggestionReturn {
|
|
|
91
94
|
declare function useOcAddressSuggestion(options: UseOcAddressSuggestionOptions): UseOcAddressSuggestionReturn;
|
|
92
95
|
declare const OcAddressInput: React.ForwardRefExoticComponent<OcAddressInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
93
96
|
|
|
94
|
-
|
|
97
|
+
interface OcSignInProps {
|
|
98
|
+
audience: string;
|
|
99
|
+
returnTo?: string;
|
|
100
|
+
onSuccess?: (account: OcAccount) => void;
|
|
101
|
+
authOrigin?: string;
|
|
102
|
+
initialPath?: 'wallet' | 'email';
|
|
103
|
+
paths?: {
|
|
104
|
+
wallet?: boolean;
|
|
105
|
+
email?: boolean;
|
|
106
|
+
};
|
|
107
|
+
className?: string;
|
|
108
|
+
}
|
|
109
|
+
declare function OcSignIn({ audience, returnTo, onSuccess, authOrigin, initialPath, paths, className, }: OcSignInProps): React.ReactElement;
|
|
110
|
+
|
|
111
|
+
export { DEFAULT_CONFIG, type OcAccount, OcAccountChip, type OcAccountChipProps, OcAccountPill, type OcAccountPillProps, OcAddressInput, type OcAddressInputProps, type OcAuthConfig, OcSessionProvider, type OcSessionState, type OcSessionStatus, OcSignIn, OcSignInButton, type OcSignInButtonProps, type OcSignInProps, type UseOcAddressSuggestionOptions, type UseOcAddressSuggestionReturn, buildSignInUrl, useOcAddressSuggestion, useOcSession, useOptionalOcSession };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
interface OcAccount {
|
|
4
4
|
accountId: string;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
didOc: string;
|
|
6
|
+
primaryBtc?: string | null;
|
|
7
|
+
hasEmail?: boolean;
|
|
7
8
|
displayName?: string | null;
|
|
8
9
|
nostrNpub?: string | null;
|
|
9
10
|
homeFederation?: string | null;
|
|
@@ -38,18 +39,20 @@ declare function useOptionalOcSession(): OcSessionState | null;
|
|
|
38
39
|
|
|
39
40
|
interface OcAccountChipProps {
|
|
40
41
|
dashboardUrl?: string;
|
|
42
|
+
signInUrl?: string;
|
|
41
43
|
signInLabel?: string;
|
|
42
44
|
className?: string;
|
|
43
45
|
triggerClassName?: string;
|
|
44
46
|
popoverClassName?: string;
|
|
45
47
|
menuItemClassName?: string;
|
|
46
48
|
}
|
|
47
|
-
declare function OcAccountChip({ dashboardUrl, signInLabel, className, triggerClassName, popoverClassName, menuItemClassName, }: OcAccountChipProps): React.ReactElement | null;
|
|
49
|
+
declare function OcAccountChip({ dashboardUrl, signInUrl: signInUrlOverride, signInLabel, className, triggerClassName, popoverClassName, menuItemClassName, }: OcAccountChipProps): React.ReactElement | null;
|
|
48
50
|
interface OcSignInButtonProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
49
51
|
label?: string;
|
|
50
52
|
eager?: boolean;
|
|
53
|
+
signInUrl?: string;
|
|
51
54
|
}
|
|
52
|
-
declare function OcSignInButton({ label, eager, className, ...rest }: OcSignInButtonProps): React.ReactElement | null;
|
|
55
|
+
declare function OcSignInButton({ label, eager, className, signInUrl: signInUrlOverride, ...rest }: OcSignInButtonProps): React.ReactElement | null;
|
|
53
56
|
interface OcAccountPillProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
54
57
|
dashboardUrl?: string;
|
|
55
58
|
render?: (account: {
|
|
@@ -91,4 +94,18 @@ interface UseOcAddressSuggestionReturn {
|
|
|
91
94
|
declare function useOcAddressSuggestion(options: UseOcAddressSuggestionOptions): UseOcAddressSuggestionReturn;
|
|
92
95
|
declare const OcAddressInput: React.ForwardRefExoticComponent<OcAddressInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
93
96
|
|
|
94
|
-
|
|
97
|
+
interface OcSignInProps {
|
|
98
|
+
audience: string;
|
|
99
|
+
returnTo?: string;
|
|
100
|
+
onSuccess?: (account: OcAccount) => void;
|
|
101
|
+
authOrigin?: string;
|
|
102
|
+
initialPath?: 'wallet' | 'email';
|
|
103
|
+
paths?: {
|
|
104
|
+
wallet?: boolean;
|
|
105
|
+
email?: boolean;
|
|
106
|
+
};
|
|
107
|
+
className?: string;
|
|
108
|
+
}
|
|
109
|
+
declare function OcSignIn({ audience, returnTo, onSuccess, authOrigin, initialPath, paths, className, }: OcSignInProps): React.ReactElement;
|
|
110
|
+
|
|
111
|
+
export { DEFAULT_CONFIG, type OcAccount, OcAccountChip, type OcAccountChipProps, OcAccountPill, type OcAccountPillProps, OcAddressInput, type OcAddressInputProps, type OcAuthConfig, OcSessionProvider, type OcSessionState, type OcSessionStatus, OcSignIn, OcSignInButton, type OcSignInButtonProps, type OcSignInProps, type UseOcAddressSuggestionOptions, type UseOcAddressSuggestionReturn, buildSignInUrl, useOcAddressSuggestion, useOcSession, useOptionalOcSession };
|