@incodetech/web 0.0.0-dev-20260126-4504c5b
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/aligndevicelottie-DlQCRPfM.js +29 -0
- package/dist/backdevicelottie-B4NgyWmX.js +29 -0
- package/dist/base.css +1634 -0
- package/dist/baseTutorial-Be85FuyO.js +383 -0
- package/dist/blurdevicelottie-_BZRug1c.js +29 -0
- package/dist/browser-ponyfill-B6W6hHVY.js +344 -0
- package/dist/email/email.es.js +137 -0
- package/dist/email/styles.css +123 -0
- package/dist/flip-animation-COR596wy.js +29 -0
- package/dist/flow/flow.es.js +540 -0
- package/dist/flow/styles.css +3204 -0
- package/dist/frontdevicelottie-KhKxT5n9.js +29 -0
- package/dist/glaredevicelottie-DLuIStvb.js +29 -0
- package/dist/id/id.es.js +1497 -0
- package/dist/id/styles.css +1587 -0
- package/dist/id-laser-h-BBV3r3rz.js +29 -0
- package/dist/id-laser-v-BTHJaSfx.js +29 -0
- package/dist/id-tutorial-B-F5Q28m.js +29 -0
- package/dist/incodeModule-DR92HDjR.js +257 -0
- package/dist/index.es.js +6 -0
- package/dist/instance-B-q0ZREN.js +2140 -0
- package/dist/otpInput-Dm1LhnDm.js +151 -0
- package/dist/page-CITAo3qf.js +189 -0
- package/dist/passport-tutorial-CaYBFTqt.js +29 -0
- package/dist/phone/phone.es.js +3442 -0
- package/dist/phone/styles.css +305 -0
- package/dist/selfie/selfie.es.js +570 -0
- package/dist/selfie/styles.css +638 -0
- package/dist/selfieTutorial-Dm_p0ke9.js +29 -0
- package/dist/setup-BhetRn4n.js +20 -0
- package/dist/spinner-CQtj_FFo.js +65 -0
- package/dist/themes/dark.css +797 -0
- package/dist/themes/light.css +688 -0
- package/dist/types/base.d.ts +1 -0
- package/dist/types/dark.d.ts +1 -0
- package/dist/types/email.d.ts +57 -0
- package/dist/types/flow.d.ts +69 -0
- package/dist/types/id.d.ts +34 -0
- package/dist/types/index.d.ts +38 -0
- package/dist/types/light.d.ts +1 -0
- package/dist/types/phone.d.ts +58 -0
- package/dist/types/selfie.d.ts +31 -0
- package/dist/types/styles.d.ts +1 -0
- package/dist/types/themes/dark.d.ts +1 -0
- package/dist/types/themes/light.d.ts +1 -0
- package/dist/uiConfig-DEqynrWx.js +23 -0
- package/dist/vendor-preact-CjD4WiuC.js +593 -0
- package/package.json +100 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { EmailConfig } from '@incodetech/core/email';
|
|
2
|
+
import { FC } from 'preact/compat';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Email verification UI component.
|
|
6
|
+
*
|
|
7
|
+
* Provides a complete email verification experience including:
|
|
8
|
+
* - Email address input with validation
|
|
9
|
+
* - OTP code entry with resend functionality
|
|
10
|
+
* - Loading states and error handling
|
|
11
|
+
*
|
|
12
|
+
* @example Basic usage
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <Email
|
|
15
|
+
* config={{
|
|
16
|
+
* otpVerification: true,
|
|
17
|
+
* otpExpirationInMinutes: 5,
|
|
18
|
+
* prefill: false,
|
|
19
|
+
* }}
|
|
20
|
+
* onFinish={() => router.push('/next-step')}
|
|
21
|
+
* onError={(err) => toast.error(err)}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @see {@link createEmailManager} for headless usage
|
|
26
|
+
*/
|
|
27
|
+
export declare const Email: FC<EmailProps>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Props for the Email component
|
|
31
|
+
*/
|
|
32
|
+
declare type EmailProps = IncodeModuleProps<EmailConfig>;
|
|
33
|
+
|
|
34
|
+
declare type IncodeModuleProps<TConfig, TResult = void> = {
|
|
35
|
+
/**
|
|
36
|
+
* Module configuration required to render the flow.
|
|
37
|
+
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
38
|
+
*/
|
|
39
|
+
config?: TConfig;
|
|
40
|
+
/**
|
|
41
|
+
* Callback invoked when the module completes successfully.
|
|
42
|
+
* @param result - Optional result data from the module completion
|
|
43
|
+
*/
|
|
44
|
+
onFinish?: (result?: TResult) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Callback invoked when a fatal module error occurs.
|
|
47
|
+
*/
|
|
48
|
+
onError?: (error: string | undefined) => void;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export { }
|
|
52
|
+
|
|
53
|
+
declare global {
|
|
54
|
+
interface HTMLElementTagNameMap {
|
|
55
|
+
'incode-email': HTMLElement & IncodeModuleProps<EmailConfig>;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { FC } from 'preact/compat';
|
|
2
|
+
import { FinishStatus } from '@incodetech/core/flow';
|
|
3
|
+
import { WasmConfig } from '@incodetech/core';
|
|
4
|
+
|
|
5
|
+
export declare type FlowConfig = {
|
|
6
|
+
apiURL: string;
|
|
7
|
+
token: string;
|
|
8
|
+
wasmConfig?: WasmConfig;
|
|
9
|
+
lang?: string;
|
|
10
|
+
disableDashboardTheme?: boolean;
|
|
11
|
+
onModuleLoading?: (moduleKey: string) => void;
|
|
12
|
+
onModuleLoaded?: (moduleKey: string) => void;
|
|
13
|
+
onWasmWarmup?: (pipelines: string[]) => void;
|
|
14
|
+
spinnerConfig?: SpinnerConfig;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export declare const IncodeFlow: FC<IncodeFlowProps>;
|
|
18
|
+
|
|
19
|
+
declare type IncodeFlowProps = IncodeModuleProps<FlowConfig, FinishStatus>;
|
|
20
|
+
|
|
21
|
+
declare type IncodeModuleProps<TConfig, TResult = void> = {
|
|
22
|
+
/**
|
|
23
|
+
* Module configuration required to render the flow.
|
|
24
|
+
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
25
|
+
*/
|
|
26
|
+
config?: TConfig;
|
|
27
|
+
/**
|
|
28
|
+
* Callback invoked when the module completes successfully.
|
|
29
|
+
* @param result - Optional result data from the module completion
|
|
30
|
+
*/
|
|
31
|
+
onFinish?: (result?: TResult) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Callback invoked when a fatal module error occurs.
|
|
34
|
+
*/
|
|
35
|
+
onError?: (error: string | undefined) => void;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
declare type PreloadConfig = {
|
|
39
|
+
apiURL: string;
|
|
40
|
+
token: string;
|
|
41
|
+
lang?: string;
|
|
42
|
+
disableDashboardTheme?: boolean;
|
|
43
|
+
wasmConfig?: WasmConfig;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export declare type PreloadHandle = {
|
|
47
|
+
get isReady(): boolean;
|
|
48
|
+
get error(): string | null;
|
|
49
|
+
waitUntilReady(): Promise<void>;
|
|
50
|
+
cancel(): void;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export declare function preloadIncodeFlow(config: PreloadConfig): PreloadHandle;
|
|
54
|
+
|
|
55
|
+
export declare type SpinnerConfig = {
|
|
56
|
+
title?: string;
|
|
57
|
+
subtitle?: string;
|
|
58
|
+
size?: SpinnerSize;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
declare type SpinnerSize = 'small' | 'medium' | 'large';
|
|
62
|
+
|
|
63
|
+
export { }
|
|
64
|
+
|
|
65
|
+
declare global {
|
|
66
|
+
interface HTMLElementTagNameMap {
|
|
67
|
+
'incode-flow': HTMLElement & IncodeModuleProps<FlowConfig, FinishStatus>;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FC } from 'preact/compat';
|
|
2
|
+
import { IdCaptureConfig } from '@incodetech/core/id';
|
|
3
|
+
import { IIdCaptureCapability } from '@incodetech/core/id';
|
|
4
|
+
|
|
5
|
+
export declare const Id: FC<IdProps>;
|
|
6
|
+
|
|
7
|
+
declare type IdProps = IncodeModuleProps<IdCaptureConfig> & {
|
|
8
|
+
provider?: IIdCaptureCapability;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
declare type IncodeModuleProps<TConfig, TResult = void> = {
|
|
12
|
+
/**
|
|
13
|
+
* Module configuration required to render the flow.
|
|
14
|
+
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
15
|
+
*/
|
|
16
|
+
config?: TConfig;
|
|
17
|
+
/**
|
|
18
|
+
* Callback invoked when the module completes successfully.
|
|
19
|
+
* @param result - Optional result data from the module completion
|
|
20
|
+
*/
|
|
21
|
+
onFinish?: (result?: TResult) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Callback invoked when a fatal module error occurs.
|
|
24
|
+
*/
|
|
25
|
+
onError?: (error: string | undefined) => void;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { }
|
|
29
|
+
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
'incode-id': HTMLElement & IncodeModuleProps<IdCaptureConfig>;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { WasmConfig } from '@incodetech/core';
|
|
2
|
+
|
|
3
|
+
declare type I18nOptions = {
|
|
4
|
+
lang?: string;
|
|
5
|
+
translations?: Translations;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
declare type LanguageTranslations = Record<string, TranslationValue>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Sets global UI configuration defaults for `@incodetech/ui`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function setUiConfig(next: UiConfig): void;
|
|
14
|
+
|
|
15
|
+
export declare function setup({ apiURL, token, customHeaders, timeout, wasm, i18n, uiConfig, }: SetupOptions): Promise<void>;
|
|
16
|
+
|
|
17
|
+
declare type SetupOptions = {
|
|
18
|
+
apiURL: string;
|
|
19
|
+
token: string;
|
|
20
|
+
customHeaders?: Record<string, string>;
|
|
21
|
+
timeout?: number;
|
|
22
|
+
wasm?: WasmConfig;
|
|
23
|
+
i18n?: I18nOptions;
|
|
24
|
+
uiConfig?: UiConfig;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare type Translations = Partial<Record<string, LanguageTranslations>>;
|
|
28
|
+
|
|
29
|
+
declare type TranslationValue = string | Record<string, unknown>;
|
|
30
|
+
|
|
31
|
+
export declare type UiConfig = {
|
|
32
|
+
logoSrc?: string;
|
|
33
|
+
logoHeight?: string;
|
|
34
|
+
hideHeader?: boolean;
|
|
35
|
+
hideFooterBranding?: boolean;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { }
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { FC } from 'preact/compat';
|
|
2
|
+
import { PhoneConfig } from '@incodetech/core/phone';
|
|
3
|
+
|
|
4
|
+
declare type IncodeModuleProps<TConfig, TResult = void> = {
|
|
5
|
+
/**
|
|
6
|
+
* Module configuration required to render the flow.
|
|
7
|
+
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
8
|
+
*/
|
|
9
|
+
config?: TConfig;
|
|
10
|
+
/**
|
|
11
|
+
* Callback invoked when the module completes successfully.
|
|
12
|
+
* @param result - Optional result data from the module completion
|
|
13
|
+
*/
|
|
14
|
+
onFinish?: (result?: TResult) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Callback invoked when a fatal module error occurs.
|
|
17
|
+
*/
|
|
18
|
+
onError?: (error: string | undefined) => void;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Phone verification UI component.
|
|
23
|
+
*
|
|
24
|
+
* Provides a complete phone verification experience including:
|
|
25
|
+
* - Country code selector with flag emojis
|
|
26
|
+
* - Phone number input with validation
|
|
27
|
+
* - OTP code entry with resend functionality
|
|
28
|
+
* - Loading states and error handling
|
|
29
|
+
*
|
|
30
|
+
* @example Basic usage
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <Phone
|
|
33
|
+
* config={{
|
|
34
|
+
* otpVerification: true,
|
|
35
|
+
* otpExpirationInMinutes: 5,
|
|
36
|
+
* prefill: false,
|
|
37
|
+
* }}
|
|
38
|
+
* onFinish={() => router.push('/next-step')}
|
|
39
|
+
* onError={(err) => toast.error(err)}
|
|
40
|
+
* />
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @see {@link createPhoneManager} for headless usage
|
|
44
|
+
*/
|
|
45
|
+
export declare const Phone: FC<PhoneProps>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Props for the Phone component
|
|
49
|
+
*/
|
|
50
|
+
declare type PhoneProps = IncodeModuleProps<PhoneConfig>;
|
|
51
|
+
|
|
52
|
+
export { }
|
|
53
|
+
|
|
54
|
+
declare global {
|
|
55
|
+
interface HTMLElementTagNameMap {
|
|
56
|
+
'incode-phone': HTMLElement & IncodeModuleProps<PhoneConfig>;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FC } from 'preact/compat';
|
|
2
|
+
import { SelfieConfig } from '@incodetech/core/selfie';
|
|
3
|
+
|
|
4
|
+
declare type IncodeModuleProps<TConfig, TResult = void> = {
|
|
5
|
+
/**
|
|
6
|
+
* Module configuration required to render the flow.
|
|
7
|
+
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
8
|
+
*/
|
|
9
|
+
config?: TConfig;
|
|
10
|
+
/**
|
|
11
|
+
* Callback invoked when the module completes successfully.
|
|
12
|
+
* @param result - Optional result data from the module completion
|
|
13
|
+
*/
|
|
14
|
+
onFinish?: (result?: TResult) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Callback invoked when a fatal module error occurs.
|
|
17
|
+
*/
|
|
18
|
+
onError?: (error: string | undefined) => void;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export declare const Selfie: FC<SelfieProps>;
|
|
22
|
+
|
|
23
|
+
declare type SelfieProps = IncodeModuleProps<SelfieConfig>;
|
|
24
|
+
|
|
25
|
+
export { }
|
|
26
|
+
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLElementTagNameMap {
|
|
29
|
+
'incode-selfie': HTMLElement & IncodeModuleProps<SelfieConfig>;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { C as i } from "./vendor-preact-CjD4WiuC.js";
|
|
2
|
+
let e = {};
|
|
3
|
+
const t = /* @__PURE__ */ new Set();
|
|
4
|
+
function r(n) {
|
|
5
|
+
return t.add(n), () => {
|
|
6
|
+
t.delete(n);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function s() {
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
function f(n) {
|
|
13
|
+
e = n;
|
|
14
|
+
for (const o of t)
|
|
15
|
+
o();
|
|
16
|
+
}
|
|
17
|
+
function c() {
|
|
18
|
+
return i(r, s);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
f as s,
|
|
22
|
+
c as u
|
|
23
|
+
};
|