@incodetech/web 2.0.0-alpha.9 → 2.0.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.
@@ -1,38 +0,0 @@
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 { }
@@ -1 +0,0 @@
1
- export { }
@@ -1,58 +0,0 @@
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
- }
@@ -1,31 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- export { }
@@ -1 +0,0 @@
1
- export {}
@@ -1 +0,0 @@
1
- export {}
@@ -1,23 +0,0 @@
1
- import { C as i } from "./vendor-preact-CK0WeTOR.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
- };