@authsome/ui-core 0.1.5 → 0.1.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.
@@ -1,4 +1,4 @@
1
- import { c as AuthProvider, E as ProviderConfig, S as SignInRequest, D as AuthResponse, d as SignUpRequest, t as User, u as Session, w as SessionData, U as UpdateUserRequest, P as PasswordChangeRequest, e as PasswordResetRequest, f as PasswordResetConfirmRequest, O as OAuthSignInRequest, g as OAuthCallbackRequest, h as OAuthProvider, M as MagicLinkRequest, i as MagicLinkVerifyRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, n as TwoFactorMethod, o as PasskeyRegisterRequest, p as PasskeyCredential, q as PasskeyAuthRequest, R as RequestContext, C as CookieData, a as AuthError } from '../provider-KGfwPsXv.mjs';
1
+ import { c as AuthProvider, G as ProviderConfig, S as SignInRequest, E as AuthResponse, d as SignUpRequest, t as User, u as Session, w as SessionData, U as UpdateUserRequest, P as PasswordChangeRequest, e as PasswordResetRequest, f as PasswordResetConfirmRequest, O as OAuthSignInRequest, g as OAuthCallbackRequest, h as OAuthProvider, M as MagicLinkRequest, i as MagicLinkVerifyRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, n as TwoFactorMethod, o as PasskeyRegisterRequest, p as PasskeyCredential, q as PasskeyAuthRequest, R as RequestContext, C as CookieData, a as AuthError } from '../provider-Du6Oe4tD.mjs';
2
2
 
3
3
  /**
4
4
  * Base auth provider implementation
@@ -1,4 +1,4 @@
1
- import { c as AuthProvider, E as ProviderConfig, S as SignInRequest, D as AuthResponse, d as SignUpRequest, t as User, u as Session, w as SessionData, U as UpdateUserRequest, P as PasswordChangeRequest, e as PasswordResetRequest, f as PasswordResetConfirmRequest, O as OAuthSignInRequest, g as OAuthCallbackRequest, h as OAuthProvider, M as MagicLinkRequest, i as MagicLinkVerifyRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, n as TwoFactorMethod, o as PasskeyRegisterRequest, p as PasskeyCredential, q as PasskeyAuthRequest, R as RequestContext, C as CookieData, a as AuthError } from '../provider-KGfwPsXv.js';
1
+ import { c as AuthProvider, G as ProviderConfig, S as SignInRequest, E as AuthResponse, d as SignUpRequest, t as User, u as Session, w as SessionData, U as UpdateUserRequest, P as PasswordChangeRequest, e as PasswordResetRequest, f as PasswordResetConfirmRequest, O as OAuthSignInRequest, g as OAuthCallbackRequest, h as OAuthProvider, M as MagicLinkRequest, i as MagicLinkVerifyRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, n as TwoFactorMethod, o as PasskeyRegisterRequest, p as PasskeyCredential, q as PasskeyAuthRequest, R as RequestContext, C as CookieData, a as AuthError } from '../provider-Du6Oe4tD.js';
2
2
 
3
3
  /**
4
4
  * Base auth provider implementation
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AuthErrorType, a as AuthError, V as ValidationError, C as CookieData, b as AuthContext, c as AuthProvider, S as SignInRequest, d as SignUpRequest, U as UpdateUserRequest, P as PasswordChangeRequest, e as PasswordResetRequest, f as PasswordResetConfirmRequest, O as OAuthSignInRequest, g as OAuthCallbackRequest, h as OAuthProvider, M as MagicLinkRequest, i as MagicLinkVerifyRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, n as TwoFactorMethod, o as PasskeyRegisterRequest, p as PasskeyCredential, q as PasskeyAuthRequest, r as Organization, s as OrganizationMembership, t as User, u as Session } from './provider-KGfwPsXv.mjs';
2
- export { D as AuthResponse, v as AuthState, z as FieldDefinition, F as FieldValidation, x as OAuthConfig, E as ProviderConfig, R as RequestContext, w as SessionData, B as SignupFieldsResponse, y as TwoFactorConfig } from './provider-KGfwPsXv.mjs';
1
+ import { A as AuthErrorType, a as AuthError, V as ValidationError, C as CookieData, b as AuthContext, c as AuthProvider, S as SignInRequest, d as SignUpRequest, U as UpdateUserRequest, P as PasswordChangeRequest, e as PasswordResetRequest, f as PasswordResetConfirmRequest, O as OAuthSignInRequest, g as OAuthCallbackRequest, h as OAuthProvider, M as MagicLinkRequest, i as MagicLinkVerifyRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, n as TwoFactorMethod, o as PasskeyRegisterRequest, p as PasskeyCredential, q as PasskeyAuthRequest, r as Organization, s as OrganizationMembership, t as User, u as Session } from './provider-Du6Oe4tD.mjs';
2
+ export { E as AuthResponse, v as AuthState, B as FieldDefinition, z as FieldType, F as FieldValidation, x as OAuthConfig, G as ProviderConfig, R as RequestContext, w as SessionData, D as SignupFieldsResponse, y as TwoFactorConfig } from './provider-Du6Oe4tD.mjs';
3
3
  import { Storage, Observable, Unsubscribe } from './types/index.mjs';
4
4
  export { Listener, LocalStorageAdapter, MemoryStorageAdapter, SessionStorageAdapter } from './types/index.mjs';
5
5
  export { BaseAuthProvider } from './adapters/index.mjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AuthErrorType, a as AuthError, V as ValidationError, C as CookieData, b as AuthContext, c as AuthProvider, S as SignInRequest, d as SignUpRequest, U as UpdateUserRequest, P as PasswordChangeRequest, e as PasswordResetRequest, f as PasswordResetConfirmRequest, O as OAuthSignInRequest, g as OAuthCallbackRequest, h as OAuthProvider, M as MagicLinkRequest, i as MagicLinkVerifyRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, n as TwoFactorMethod, o as PasskeyRegisterRequest, p as PasskeyCredential, q as PasskeyAuthRequest, r as Organization, s as OrganizationMembership, t as User, u as Session } from './provider-KGfwPsXv.js';
2
- export { D as AuthResponse, v as AuthState, z as FieldDefinition, F as FieldValidation, x as OAuthConfig, E as ProviderConfig, R as RequestContext, w as SessionData, B as SignupFieldsResponse, y as TwoFactorConfig } from './provider-KGfwPsXv.js';
1
+ import { A as AuthErrorType, a as AuthError, V as ValidationError, C as CookieData, b as AuthContext, c as AuthProvider, S as SignInRequest, d as SignUpRequest, U as UpdateUserRequest, P as PasswordChangeRequest, e as PasswordResetRequest, f as PasswordResetConfirmRequest, O as OAuthSignInRequest, g as OAuthCallbackRequest, h as OAuthProvider, M as MagicLinkRequest, i as MagicLinkVerifyRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, n as TwoFactorMethod, o as PasskeyRegisterRequest, p as PasskeyCredential, q as PasskeyAuthRequest, r as Organization, s as OrganizationMembership, t as User, u as Session } from './provider-Du6Oe4tD.js';
2
+ export { E as AuthResponse, v as AuthState, B as FieldDefinition, z as FieldType, F as FieldValidation, x as OAuthConfig, G as ProviderConfig, R as RequestContext, w as SessionData, D as SignupFieldsResponse, y as TwoFactorConfig } from './provider-Du6Oe4tD.js';
3
3
  import { Storage, Observable, Unsubscribe } from './types/index.js';
4
4
  export { Listener, LocalStorageAdapter, MemoryStorageAdapter, SessionStorageAdapter } from './types/index.js';
5
5
  export { BaseAuthProvider } from './adapters/index.js';
@@ -318,13 +318,17 @@ interface FieldValidation {
318
318
  pattern?: string;
319
319
  errorMessage?: string;
320
320
  }
321
+ /**
322
+ * Field type for dynamic signup forms
323
+ */
324
+ type FieldType = 'text' | 'email' | 'tel' | 'number' | 'select' | 'checkbox' | 'textarea' | 'date' | 'url' | 'password' | 'group';
321
325
  /**
322
326
  * Dynamic field definition for signup forms
323
327
  */
324
328
  interface FieldDefinition {
325
329
  name: string;
326
330
  label: string;
327
- type: 'text' | 'email' | 'tel' | 'number' | 'select' | 'checkbox' | 'textarea' | 'date' | 'url' | 'password';
331
+ type: FieldType;
328
332
  placeholder?: string;
329
333
  helperText?: string;
330
334
  defaultValue?: string | number | boolean;
@@ -333,6 +337,22 @@ interface FieldDefinition {
333
337
  label: string;
334
338
  }>;
335
339
  validation?: FieldValidation;
340
+ /**
341
+ * Nested fields for 'group' type
342
+ * Groups render multiple fields in a horizontal row with a gap
343
+ */
344
+ fields?: FieldDefinition[];
345
+ /**
346
+ * Gap between fields in a group (CSS gap value)
347
+ * @default '1rem'
348
+ */
349
+ gap?: string;
350
+ /**
351
+ * Order priority for field positioning
352
+ * Lower numbers appear first. Fields without order are sorted after ordered fields.
353
+ * @default undefined
354
+ */
355
+ order?: number;
336
356
  }
337
357
  /**
338
358
  * Response containing dynamic signup fields
@@ -551,4 +571,4 @@ interface AuthProvider {
551
571
  clearContext?(): void;
552
572
  }
553
573
 
554
- export { AuthErrorType as A, type SignupFieldsResponse as B, type CookieData as C, type AuthResponse as D, type ProviderConfig as E, type FieldValidation as F, type MagicLinkRequest as M, type OAuthSignInRequest as O, type PasswordChangeRequest as P, type RequestContext as R, type SignInRequest as S, type TwoFactorSetupRequest as T, type UpdateUserRequest as U, type ValidationError as V, AuthError as a, type AuthContext as b, type AuthProvider as c, type SignUpRequest as d, type PasswordResetRequest as e, type PasswordResetConfirmRequest as f, type OAuthCallbackRequest as g, OAuthProvider as h, type MagicLinkVerifyRequest as i, type PhoneAuthRequest as j, type PhoneVerifyRequest as k, type TwoFactorSetupResponse as l, type TwoFactorVerifyRequest as m, TwoFactorMethod as n, type PasskeyRegisterRequest as o, type PasskeyCredential as p, type PasskeyAuthRequest as q, type Organization as r, type OrganizationMembership as s, type User as t, type Session as u, AuthState as v, type SessionData as w, type OAuthConfig as x, type TwoFactorConfig as y, type FieldDefinition as z };
574
+ export { AuthErrorType as A, type FieldDefinition as B, type CookieData as C, type SignupFieldsResponse as D, type AuthResponse as E, type FieldValidation as F, type ProviderConfig as G, type MagicLinkRequest as M, type OAuthSignInRequest as O, type PasswordChangeRequest as P, type RequestContext as R, type SignInRequest as S, type TwoFactorSetupRequest as T, type UpdateUserRequest as U, type ValidationError as V, AuthError as a, type AuthContext as b, type AuthProvider as c, type SignUpRequest as d, type PasswordResetRequest as e, type PasswordResetConfirmRequest as f, type OAuthCallbackRequest as g, OAuthProvider as h, type MagicLinkVerifyRequest as i, type PhoneAuthRequest as j, type PhoneVerifyRequest as k, type TwoFactorSetupResponse as l, type TwoFactorVerifyRequest as m, TwoFactorMethod as n, type PasskeyRegisterRequest as o, type PasskeyCredential as p, type PasskeyAuthRequest as q, type Organization as r, type OrganizationMembership as s, type User as t, type Session as u, AuthState as v, type SessionData as w, type OAuthConfig as x, type TwoFactorConfig as y, type FieldType as z };
@@ -318,13 +318,17 @@ interface FieldValidation {
318
318
  pattern?: string;
319
319
  errorMessage?: string;
320
320
  }
321
+ /**
322
+ * Field type for dynamic signup forms
323
+ */
324
+ type FieldType = 'text' | 'email' | 'tel' | 'number' | 'select' | 'checkbox' | 'textarea' | 'date' | 'url' | 'password' | 'group';
321
325
  /**
322
326
  * Dynamic field definition for signup forms
323
327
  */
324
328
  interface FieldDefinition {
325
329
  name: string;
326
330
  label: string;
327
- type: 'text' | 'email' | 'tel' | 'number' | 'select' | 'checkbox' | 'textarea' | 'date' | 'url' | 'password';
331
+ type: FieldType;
328
332
  placeholder?: string;
329
333
  helperText?: string;
330
334
  defaultValue?: string | number | boolean;
@@ -333,6 +337,22 @@ interface FieldDefinition {
333
337
  label: string;
334
338
  }>;
335
339
  validation?: FieldValidation;
340
+ /**
341
+ * Nested fields for 'group' type
342
+ * Groups render multiple fields in a horizontal row with a gap
343
+ */
344
+ fields?: FieldDefinition[];
345
+ /**
346
+ * Gap between fields in a group (CSS gap value)
347
+ * @default '1rem'
348
+ */
349
+ gap?: string;
350
+ /**
351
+ * Order priority for field positioning
352
+ * Lower numbers appear first. Fields without order are sorted after ordered fields.
353
+ * @default undefined
354
+ */
355
+ order?: number;
336
356
  }
337
357
  /**
338
358
  * Response containing dynamic signup fields
@@ -551,4 +571,4 @@ interface AuthProvider {
551
571
  clearContext?(): void;
552
572
  }
553
573
 
554
- export { AuthErrorType as A, type SignupFieldsResponse as B, type CookieData as C, type AuthResponse as D, type ProviderConfig as E, type FieldValidation as F, type MagicLinkRequest as M, type OAuthSignInRequest as O, type PasswordChangeRequest as P, type RequestContext as R, type SignInRequest as S, type TwoFactorSetupRequest as T, type UpdateUserRequest as U, type ValidationError as V, AuthError as a, type AuthContext as b, type AuthProvider as c, type SignUpRequest as d, type PasswordResetRequest as e, type PasswordResetConfirmRequest as f, type OAuthCallbackRequest as g, OAuthProvider as h, type MagicLinkVerifyRequest as i, type PhoneAuthRequest as j, type PhoneVerifyRequest as k, type TwoFactorSetupResponse as l, type TwoFactorVerifyRequest as m, TwoFactorMethod as n, type PasskeyRegisterRequest as o, type PasskeyCredential as p, type PasskeyAuthRequest as q, type Organization as r, type OrganizationMembership as s, type User as t, type Session as u, AuthState as v, type SessionData as w, type OAuthConfig as x, type TwoFactorConfig as y, type FieldDefinition as z };
574
+ export { AuthErrorType as A, type FieldDefinition as B, type CookieData as C, type SignupFieldsResponse as D, type AuthResponse as E, type FieldValidation as F, type ProviderConfig as G, type MagicLinkRequest as M, type OAuthSignInRequest as O, type PasswordChangeRequest as P, type RequestContext as R, type SignInRequest as S, type TwoFactorSetupRequest as T, type UpdateUserRequest as U, type ValidationError as V, AuthError as a, type AuthContext as b, type AuthProvider as c, type SignUpRequest as d, type PasswordResetRequest as e, type PasswordResetConfirmRequest as f, type OAuthCallbackRequest as g, OAuthProvider as h, type MagicLinkVerifyRequest as i, type PhoneAuthRequest as j, type PhoneVerifyRequest as k, type TwoFactorSetupResponse as l, type TwoFactorVerifyRequest as m, TwoFactorMethod as n, type PasskeyRegisterRequest as o, type PasskeyCredential as p, type PasskeyAuthRequest as q, type Organization as r, type OrganizationMembership as s, type User as t, type Session as u, AuthState as v, type SessionData as w, type OAuthConfig as x, type TwoFactorConfig as y, type FieldType as z };
@@ -1,4 +1,4 @@
1
- export { b as AuthContext, a as AuthError, A as AuthErrorType, c as AuthProvider, D as AuthResponse, v as AuthState, C as CookieData, z as FieldDefinition, F as FieldValidation, M as MagicLinkRequest, i as MagicLinkVerifyRequest, g as OAuthCallbackRequest, x as OAuthConfig, h as OAuthProvider, O as OAuthSignInRequest, r as Organization, s as OrganizationMembership, q as PasskeyAuthRequest, p as PasskeyCredential, o as PasskeyRegisterRequest, P as PasswordChangeRequest, f as PasswordResetConfirmRequest, e as PasswordResetRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, E as ProviderConfig, R as RequestContext, u as Session, w as SessionData, S as SignInRequest, d as SignUpRequest, B as SignupFieldsResponse, y as TwoFactorConfig, n as TwoFactorMethod, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, U as UpdateUserRequest, t as User, V as ValidationError } from '../provider-KGfwPsXv.mjs';
1
+ export { b as AuthContext, a as AuthError, A as AuthErrorType, c as AuthProvider, E as AuthResponse, v as AuthState, C as CookieData, B as FieldDefinition, z as FieldType, F as FieldValidation, M as MagicLinkRequest, i as MagicLinkVerifyRequest, g as OAuthCallbackRequest, x as OAuthConfig, h as OAuthProvider, O as OAuthSignInRequest, r as Organization, s as OrganizationMembership, q as PasskeyAuthRequest, p as PasskeyCredential, o as PasskeyRegisterRequest, P as PasswordChangeRequest, f as PasswordResetConfirmRequest, e as PasswordResetRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, G as ProviderConfig, R as RequestContext, u as Session, w as SessionData, S as SignInRequest, d as SignUpRequest, D as SignupFieldsResponse, y as TwoFactorConfig, n as TwoFactorMethod, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, U as UpdateUserRequest, t as User, V as ValidationError } from '../provider-Du6Oe4tD.mjs';
2
2
 
3
3
  /**
4
4
  * Storage abstraction for auth tokens and data
@@ -1,4 +1,4 @@
1
- export { b as AuthContext, a as AuthError, A as AuthErrorType, c as AuthProvider, D as AuthResponse, v as AuthState, C as CookieData, z as FieldDefinition, F as FieldValidation, M as MagicLinkRequest, i as MagicLinkVerifyRequest, g as OAuthCallbackRequest, x as OAuthConfig, h as OAuthProvider, O as OAuthSignInRequest, r as Organization, s as OrganizationMembership, q as PasskeyAuthRequest, p as PasskeyCredential, o as PasskeyRegisterRequest, P as PasswordChangeRequest, f as PasswordResetConfirmRequest, e as PasswordResetRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, E as ProviderConfig, R as RequestContext, u as Session, w as SessionData, S as SignInRequest, d as SignUpRequest, B as SignupFieldsResponse, y as TwoFactorConfig, n as TwoFactorMethod, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, U as UpdateUserRequest, t as User, V as ValidationError } from '../provider-KGfwPsXv.js';
1
+ export { b as AuthContext, a as AuthError, A as AuthErrorType, c as AuthProvider, E as AuthResponse, v as AuthState, C as CookieData, B as FieldDefinition, z as FieldType, F as FieldValidation, M as MagicLinkRequest, i as MagicLinkVerifyRequest, g as OAuthCallbackRequest, x as OAuthConfig, h as OAuthProvider, O as OAuthSignInRequest, r as Organization, s as OrganizationMembership, q as PasskeyAuthRequest, p as PasskeyCredential, o as PasskeyRegisterRequest, P as PasswordChangeRequest, f as PasswordResetConfirmRequest, e as PasswordResetRequest, j as PhoneAuthRequest, k as PhoneVerifyRequest, G as ProviderConfig, R as RequestContext, u as Session, w as SessionData, S as SignInRequest, d as SignUpRequest, D as SignupFieldsResponse, y as TwoFactorConfig, n as TwoFactorMethod, T as TwoFactorSetupRequest, l as TwoFactorSetupResponse, m as TwoFactorVerifyRequest, U as UpdateUserRequest, t as User, V as ValidationError } from '../provider-Du6Oe4tD.js';
2
2
 
3
3
  /**
4
4
  * Storage abstraction for auth tokens and data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authsome/ui-core",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Framework-agnostic authentication core for AuthSome UI",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",