@authhero/widget 0.4.1 → 0.6.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 +21 -1
- package/dist/authhero-widget/authhero-widget.esm.js +1 -1
- package/dist/authhero-widget/index.esm.js +1 -1
- package/dist/authhero-widget/p-7989dabd.entry.js +1 -0
- package/dist/authhero-widget/{p-Doiemx6o.js → p-bMtPc5Dm.js} +1 -1
- package/dist/authhero-widget/p-fa60ab6e.entry.js +1 -0
- package/dist/cjs/authhero-node.cjs.entry.js +97 -9
- package/dist/cjs/authhero-widget.cjs.entry.js +82 -18
- package/dist/cjs/authhero-widget.cjs.js +2 -2
- package/dist/cjs/{index-D0xitTOL.js → index-Db4bZu99.js} +28 -3
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/authhero-node/authhero-node.css +237 -94
- package/dist/collection/components/authhero-node/authhero-node.js +101 -8
- package/dist/collection/components/authhero-widget/authhero-widget.css +128 -70
- package/dist/collection/components/authhero-widget/authhero-widget.js +30 -5
- package/dist/collection/utils/branding.js +52 -13
- package/dist/components/authhero-node.js +1 -1
- package/dist/components/authhero-widget.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-pupmqprs.js +1 -0
- package/dist/components/p-uIy4ySa4.js +1 -0
- package/dist/esm/authhero-node.entry.js +97 -9
- package/dist/esm/authhero-widget.entry.js +82 -18
- package/dist/esm/authhero-widget.js +3 -3
- package/dist/esm/{index-Doiemx6o.js → index-bMtPc5Dm.js} +28 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/authhero-node/authhero-node.d.ts +14 -1
- package/dist/types/components/authhero-widget/authhero-widget.d.ts +8 -0
- package/hydrate/index.js +207 -29
- package/hydrate/index.mjs +207 -29
- package/package.json +10 -4
- package/dist/authhero-widget/p-2e93c814.entry.js +0 -1
- package/dist/authhero-widget/p-539fc666.entry.js +0 -1
- package/dist/collection/server/index.js +0 -453
- package/dist/components/p-086EZrPM.js +0 -1
- package/dist/components/p-DS6y_iDJ.js +0 -1
- package/dist/types/server/index.d.ts +0 -85
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hono SSR Helper for AuthHero Widget
|
|
3
|
-
*
|
|
4
|
-
* This module provides utilities for server-side rendering
|
|
5
|
-
* the AuthHero widget in Hono applications.
|
|
6
|
-
*/
|
|
7
|
-
import type { UiScreen, FormComponent, ScreenLink, ComponentMessage } from "../types/components";
|
|
8
|
-
export type { UiScreen, FormComponent, ScreenLink, ComponentMessage };
|
|
9
|
-
type ScreenBranding = {
|
|
10
|
-
logo_url?: string;
|
|
11
|
-
primaryColor?: string;
|
|
12
|
-
backgroundColor?: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Creates a basic login screen configuration using the new UiScreen format.
|
|
16
|
-
*/
|
|
17
|
-
export declare function createLoginScreen(options: {
|
|
18
|
-
action: string;
|
|
19
|
-
title?: string;
|
|
20
|
-
showSocialProviders?: string[];
|
|
21
|
-
showForgotPassword?: boolean;
|
|
22
|
-
showSignUp?: boolean;
|
|
23
|
-
branding?: ScreenBranding;
|
|
24
|
-
}): UiScreen;
|
|
25
|
-
/**
|
|
26
|
-
* Creates an identifier-first screen (email first, then password or social)
|
|
27
|
-
*/
|
|
28
|
-
export declare function createIdentifierScreen(options: {
|
|
29
|
-
action: string;
|
|
30
|
-
title?: string;
|
|
31
|
-
tenantName?: string;
|
|
32
|
-
logoUrl?: string;
|
|
33
|
-
showSocialProviders?: string[];
|
|
34
|
-
showSignUp?: boolean;
|
|
35
|
-
signUpUrl?: string;
|
|
36
|
-
branding?: ScreenBranding;
|
|
37
|
-
}): UiScreen;
|
|
38
|
-
/**
|
|
39
|
-
* Creates a registration screen configuration
|
|
40
|
-
*/
|
|
41
|
-
export declare function createSignupScreen(options: {
|
|
42
|
-
action: string;
|
|
43
|
-
title?: string;
|
|
44
|
-
fields?: Array<{
|
|
45
|
-
name: string;
|
|
46
|
-
type?: "email" | "password" | "text" | "tel" | "url" | "number" | "date";
|
|
47
|
-
label: string;
|
|
48
|
-
required?: boolean;
|
|
49
|
-
placeholder?: string;
|
|
50
|
-
}>;
|
|
51
|
-
showSocialProviders?: string[];
|
|
52
|
-
showLogin?: boolean;
|
|
53
|
-
branding?: ScreenBranding;
|
|
54
|
-
}): UiScreen;
|
|
55
|
-
/**
|
|
56
|
-
* Creates an MFA verification screen
|
|
57
|
-
*/
|
|
58
|
-
export declare function createMfaScreen(options: {
|
|
59
|
-
action: string;
|
|
60
|
-
title?: string;
|
|
61
|
-
codeLength?: number;
|
|
62
|
-
method?: "totp" | "sms" | "email";
|
|
63
|
-
branding?: ScreenBranding;
|
|
64
|
-
}): UiScreen;
|
|
65
|
-
/**
|
|
66
|
-
* Creates a password reset request screen
|
|
67
|
-
*/
|
|
68
|
-
export declare function createForgotPasswordScreen(options: {
|
|
69
|
-
action: string;
|
|
70
|
-
title?: string;
|
|
71
|
-
branding?: ScreenBranding;
|
|
72
|
-
}): UiScreen;
|
|
73
|
-
/**
|
|
74
|
-
* Adds an error message to a screen
|
|
75
|
-
*/
|
|
76
|
-
export declare function withError(screen: UiScreen, error: string): UiScreen;
|
|
77
|
-
/**
|
|
78
|
-
* Adds a success message to a screen
|
|
79
|
-
*/
|
|
80
|
-
export declare function withSuccess(screen: UiScreen, success: string): UiScreen;
|
|
81
|
-
/**
|
|
82
|
-
* Adds a field-level error to a specific component.
|
|
83
|
-
* Recursively searches nested components/children.
|
|
84
|
-
*/
|
|
85
|
-
export declare function withFieldError(screen: UiScreen, componentId: string, error: string): UiScreen;
|