@strands.gg/accui 2.8.1 → 2.9.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.
Files changed (77) hide show
  1. package/dist/index.d.ts +7 -1
  2. package/dist/nuxt/module.d.ts +4 -1
  3. package/dist/nuxt/runtime/composables/useAuthenticatedFetch.d.ts +20 -1
  4. package/dist/nuxt/runtime/composables/useStrandsAuth.d.ts +65 -1
  5. package/dist/nuxt/runtime/middleware/auth.d.ts +6 -0
  6. package/dist/nuxt/runtime/middleware/auth.global.d.ts +2 -1
  7. package/dist/nuxt/runtime/middleware/guest.d.ts +6 -0
  8. package/dist/nuxt/runtime/plugin.client.d.ts +2 -1
  9. package/dist/nuxt/runtime/plugin.server.d.ts +2 -1
  10. package/dist/nuxt/runtime/plugins/auth-interceptor.client.d.ts +2 -1
  11. package/dist/nuxt/types.d.ts +45 -0
  12. package/dist/nuxt.d.ts +4 -1
  13. package/dist/shared/defaults.d.ts +2 -0
  14. package/dist/types/composables.d.ts +96 -0
  15. package/dist/types/index.d.ts +242 -0
  16. package/dist/utils/colors.d.ts +10 -0
  17. package/dist/utils/index.d.ts +2 -0
  18. package/dist/utils/slots.d.ts +1 -0
  19. package/dist/utils/validation.d.ts +12 -0
  20. package/dist/vue/components/StrandsNav/index.d.ts +8 -0
  21. package/dist/vue/components/StrandsNav/types.d.ts +12 -0
  22. package/dist/vue/components/icons/index.d.ts +2 -0
  23. package/dist/vue/components/index.d.ts +27 -0
  24. package/dist/vue/composables/useAuthenticatedFetch.d.ts +20 -0
  25. package/dist/vue/composables/useDarkMode.d.ts +48 -0
  26. package/dist/vue/composables/useFloatingPosition.d.ts +22 -0
  27. package/dist/vue/composables/useModalStack.d.ts +86 -0
  28. package/dist/vue/composables/useOAuthProviders.d.ts +73 -0
  29. package/dist/vue/composables/useStrandsAuth.d.ts +2 -0
  30. package/dist/vue/composables/useStrandsConfig.d.ts +5 -0
  31. package/dist/vue/composables/useStrandsMfa.d.ts +36 -0
  32. package/dist/vue/composables/useTheme.d.ts +18 -0
  33. package/dist/vue/index.d.ts +16 -0
  34. package/dist/vue/plugins/StrandsUIPlugin.d.ts +20 -0
  35. package/dist/vue/ui/UiButton/index.d.ts +13 -0
  36. package/dist/vue/ui/index.d.ts +54 -0
  37. package/dist/vue/utils/contrast.d.ts +75 -0
  38. package/dist/vue/utils/debounce.d.ts +12 -0
  39. package/dist/vue/utils/fontPreloader.d.ts +11 -0
  40. package/dist/vue/utils/iconProps.d.ts +9 -0
  41. package/dist/vue/utils/lazyComponents.d.ts +4 -0
  42. package/dist/vue/utils/levels.d.ts +27 -0
  43. package/dist/vue/utils/modalStack.d.ts +31 -0
  44. package/dist/vue/utils/performanceInit.d.ts +40 -0
  45. package/dist/vue/utils/requestCache.d.ts +49 -0
  46. package/dist/vue/utils/sounds.d.ts +57 -0
  47. package/package.json +2 -3
  48. package/dist/accui.css +0 -1
  49. package/dist/auth-interceptor.client.d.ts +0 -1
  50. package/dist/auth.global.d.ts +0 -1
  51. package/dist/index.cjs.js +0 -1
  52. package/dist/index.es.js +0 -40821
  53. package/dist/module.d.ts +0 -1
  54. package/dist/nuxt/module.cjs.js +0 -1
  55. package/dist/nuxt/module.es.js +0 -193
  56. package/dist/nuxt/runtime/composables/useAuthenticatedFetch.cjs.js +0 -1
  57. package/dist/nuxt/runtime/composables/useAuthenticatedFetch.es.js +0 -134
  58. package/dist/nuxt/runtime/composables/useStrandsAuth.cjs.js +0 -1
  59. package/dist/nuxt/runtime/composables/useStrandsAuth.es.js +0 -56
  60. package/dist/nuxt/runtime/middleware/auth.global.cjs.js +0 -1
  61. package/dist/nuxt/runtime/middleware/auth.global.es.js +0 -54
  62. package/dist/nuxt/runtime/plugin.client.cjs.js +0 -1
  63. package/dist/nuxt/runtime/plugin.client.es.js +0 -26
  64. package/dist/nuxt/runtime/plugin.server.cjs.js +0 -1
  65. package/dist/nuxt/runtime/plugin.server.es.js +0 -17
  66. package/dist/nuxt/runtime/plugins/auth-interceptor.client.cjs.js +0 -1
  67. package/dist/nuxt/runtime/plugins/auth-interceptor.client.es.js +0 -77
  68. package/dist/nuxt.cjs.js +0 -1
  69. package/dist/nuxt.es.js +0 -11
  70. package/dist/plugin.client.d.ts +0 -1
  71. package/dist/plugin.server.d.ts +0 -1
  72. package/dist/useAuthenticatedFetch.d.ts +0 -1
  73. package/dist/useStrandsAuth-Ca9Zqmfy.cjs.js +0 -1
  74. package/dist/useStrandsAuth-jI_X_wiK.es.js +0 -916
  75. package/dist/useStrandsAuth.d.ts +0 -1
  76. package/dist/useStrandsConfig-CLSzvTvE.cjs.js +0 -1
  77. package/dist/useStrandsConfig-XmPqJn_B.es.js +0 -241
package/dist/index.d.ts CHANGED
@@ -1 +1,7 @@
1
- export { }
1
+ import './styles/base.css';
2
+ export * from './vue/components';
3
+ export * from './vue/ui';
4
+ export { default as StrandsUIPlugin } from './vue/plugins/StrandsUIPlugin';
5
+ export { useStrandsAuth, useStrandsConfig, setStrandsConfig, provideStrandsConfig, useOAuthProviders, useAuthenticatedFetch, $authFetch, useTheme, useFloatingPosition, useModalStack, useModalTeleport, useGlobalModalStack } from './vue';
6
+ export * from './utils';
7
+ export type * from './types/index';
@@ -1 +1,4 @@
1
- export {}
1
+ export type { StrandsAuthConfig, StrandsAuthEndpoints } from '../types';
2
+ import type { StrandsAuthConfig } from '../types';
3
+ declare const _default: import("@nuxt/schema").NuxtModule<StrandsAuthConfig, StrandsAuthConfig, false>;
4
+ export default _default;
@@ -1 +1,20 @@
1
- export {}
1
+ import type { AuthenticatedFetchOptions } from '../../../types';
2
+ /**
3
+ * Enhanced fetch composable that automatically includes auth headers
4
+ * and handles token refresh for API requests
5
+ */
6
+ export declare function useAuthenticatedFetch(): {
7
+ authenticatedFetch: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
8
+ get: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
9
+ post: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
10
+ put: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
11
+ delete: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
12
+ patch: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
13
+ };
14
+ export declare const $authFetch: {
15
+ get: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
16
+ post: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
17
+ put: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
18
+ delete: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
19
+ patch: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
20
+ };
@@ -1 +1,65 @@
1
- export {}
1
+ import type { ComputedRef } from 'vue';
2
+ import type { User } from '../../../types';
3
+ export declare const useStrandsAuth: () => {
4
+ initialize: () => Promise<void>;
5
+ signIn: (credentials: {
6
+ email: string;
7
+ password: string;
8
+ }) => Promise<any>;
9
+ signUp: (userData: {
10
+ email: string;
11
+ }) => Promise<void>;
12
+ signOut: () => Promise<void>;
13
+ user: ComputedRef<User | null>;
14
+ currentUser: ComputedRef<User | null>;
15
+ currentSession: ComputedRef<import("../../..").Session | null>;
16
+ isAuthenticated: ComputedRef<boolean>;
17
+ isLoading: ComputedRef<boolean>;
18
+ loading: ComputedRef<boolean>;
19
+ loadingMessage: ComputedRef<string>;
20
+ isInitializing: ComputedRef<boolean>;
21
+ isSigningIn: ComputedRef<boolean>;
22
+ isSigningUp: ComputedRef<boolean>;
23
+ isSigningOut: ComputedRef<boolean>;
24
+ isRefreshingToken: ComputedRef<boolean>;
25
+ isSendingMfaEmail: ComputedRef<boolean>;
26
+ isVerifyingMfa: ComputedRef<boolean>;
27
+ mfaRequired: ComputedRef<boolean>;
28
+ mfaSessionId: ComputedRef<string | null>;
29
+ availableMfaMethods: ComputedRef<import("../../..").MfaDevice[]>;
30
+ refreshToken: () => Promise<boolean>;
31
+ fetchProfile: () => Promise<User>;
32
+ updateProfile: (updates: Partial<User>) => Promise<User>;
33
+ updateUserSettings: (settings: any) => Promise<User>;
34
+ changeEmail: (newEmail: string, password: string) => Promise<void>;
35
+ changeUsername: (newUsername: string) => Promise<void>;
36
+ getUsernameCooldown: () => Promise<{
37
+ canChange: boolean;
38
+ cooldownEndsAt?: Date;
39
+ }>;
40
+ checkUsernameAvailability: (username: string) => Promise<{
41
+ available: boolean;
42
+ suggestion?: string;
43
+ }>;
44
+ getUserSessions: () => Promise<import("../../..").SessionInfo[]>;
45
+ getSessionStats: () => Promise<import("../../..").SessionStats>;
46
+ revokeSession: (sessionId: string) => Promise<boolean>;
47
+ revokeAllOtherSessions: () => Promise<boolean>;
48
+ forceReInit: () => void;
49
+ setAuthData: (authData: any) => Promise<void>;
50
+ verifyMfa: (code: string, method?: string) => Promise<any>;
51
+ sendMfaEmailCode: (deviceId: string) => Promise<any>;
52
+ getMfaWebAuthnChallenge: (deviceId: string) => Promise<any>;
53
+ registerHardwareKey: (deviceName: string, accessToken: string, deviceType?: "hardware" | "passkey") => Promise<any>;
54
+ completeHardwareKeyRegistration: (deviceId: string, credential: any, accessToken: string) => Promise<any>;
55
+ startTokenRefreshTimer: () => void;
56
+ stopTokenRefreshTimer: () => void;
57
+ getAuthHeaders: () => Record<string, string>;
58
+ };
59
+ export declare const useAuthUser: () => {
60
+ user: ComputedRef<User | null>;
61
+ };
62
+ export declare const useAuthState: () => {
63
+ isAuthenticated: ComputedRef<boolean>;
64
+ isLoading: ComputedRef<boolean>;
65
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Middleware to protect routes - requires authentication
3
+ * Usage: Add `middleware: 'auth'` to your page
4
+ */
5
+ declare const _default: import("nuxt/app").RouteMiddleware;
6
+ export default _default;
@@ -1 +1,2 @@
1
- export {}
1
+ declare const _default: import("nuxt/app").RouteMiddleware;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Middleware for guest-only routes - redirects if authenticated
3
+ * Usage: Add `middleware: 'guest'` to your page
4
+ */
5
+ declare const _default: import("nuxt/app").RouteMiddleware;
6
+ export default _default;
@@ -1 +1,2 @@
1
- export {}
1
+ declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -1 +1,2 @@
1
- export {}
1
+ declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -1 +1,2 @@
1
- export {}
1
+ declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -0,0 +1,45 @@
1
+ export interface StrandsUser {
2
+ id: string;
3
+ email: string;
4
+ firstName: string;
5
+ lastName: string;
6
+ avatar?: string;
7
+ mfaEnabled: boolean;
8
+ emailVerified: boolean;
9
+ createdAt: string;
10
+ updatedAt: string;
11
+ }
12
+ export interface StrandsSession {
13
+ accessToken: string;
14
+ refreshToken: string;
15
+ expiresAt: Date;
16
+ user: StrandsUser;
17
+ }
18
+ declare module '@nuxt/schema' {
19
+ interface PublicRuntimeConfig {
20
+ strandsAuth?: {
21
+ baseUrl?: string;
22
+ applicationId?: string;
23
+ publicKey?: string;
24
+ accentColor?: string;
25
+ redirectUrl?: string;
26
+ onSignInUrl?: string;
27
+ onSignOutUrl?: string;
28
+ /** @deprecated OAuth providers are now dynamically fetched from API */
29
+ oauthProviders?: string[];
30
+ autoRefresh?: boolean;
31
+ refreshInterval?: number;
32
+ protectedRoutes?: string[];
33
+ guestOnlyRoutes?: string[];
34
+ devMode?: boolean;
35
+ };
36
+ }
37
+ }
38
+ declare module 'nuxt/app' {
39
+ interface NuxtApp {
40
+ $strandsAuth: {
41
+ accentColor: string;
42
+ };
43
+ }
44
+ }
45
+ export {};
package/dist/nuxt.d.ts CHANGED
@@ -1 +1,4 @@
1
- export { }
1
+ export { default } from './nuxt/module';
2
+ export type { StrandsAuthConfig, StrandsAuthEndpoints } from './types';
3
+ export { useStrandsAuth, useAuthUser, useAuthState } from './nuxt/runtime/composables/useStrandsAuth';
4
+ export { useAuthenticatedFetch, $authFetch } from './nuxt/runtime/composables/useAuthenticatedFetch';
@@ -0,0 +1,2 @@
1
+ import type { StrandsAuthConfig } from '../types';
2
+ export declare const STRANDS_AUTH_DEFAULTS: Required<Omit<StrandsAuthConfig, 'clientId' | 'supportEmail' | 'oauth2RedirectUrl'>>;
@@ -0,0 +1,96 @@
1
+ import type { ComputedRef, Ref } from 'vue';
2
+ import type { User, Session, SignInCredentials, SignUpData, SessionInfo, SessionStats, MfaDevice, StrandsAuthConfig, StrandsAuthEndpoints, AuthenticatedFetchOptions } from './index';
3
+ export interface UseStrandsAuthReturn {
4
+ user: ComputedRef<User | null>;
5
+ currentUser: ComputedRef<User | null>;
6
+ currentSession: ComputedRef<Session | null>;
7
+ isAuthenticated: ComputedRef<boolean>;
8
+ isLoading: ComputedRef<boolean>;
9
+ loading: ComputedRef<boolean>;
10
+ loadingMessage: ComputedRef<string>;
11
+ isInitializing: ComputedRef<boolean>;
12
+ isSigningIn: ComputedRef<boolean>;
13
+ isSigningUp: ComputedRef<boolean>;
14
+ isSigningOut: ComputedRef<boolean>;
15
+ isRefreshingToken: ComputedRef<boolean>;
16
+ isSendingMfaEmail: ComputedRef<boolean>;
17
+ isVerifyingMfa: ComputedRef<boolean>;
18
+ mfaRequired: ComputedRef<boolean>;
19
+ mfaSessionId: ComputedRef<string | null>;
20
+ availableMfaMethods: ComputedRef<MfaDevice[]>;
21
+ signIn: (credentials: SignInCredentials) => Promise<any>;
22
+ signUp: (userData: SignUpData) => Promise<void>;
23
+ signOut: () => Promise<void>;
24
+ refreshToken: () => Promise<boolean>;
25
+ fetchProfile: () => Promise<User>;
26
+ updateProfile: (updates: Partial<User>) => Promise<User>;
27
+ updateUserSettings: (settings: any) => Promise<User>;
28
+ changeEmail: (newEmail: string, password: string) => Promise<void>;
29
+ changeUsername: (newUsername: string) => Promise<void>;
30
+ getUsernameCooldown: () => Promise<{
31
+ canChange: boolean;
32
+ cooldownEndsAt?: Date;
33
+ }>;
34
+ checkUsernameAvailability: (username: string) => Promise<{
35
+ available: boolean;
36
+ suggestion?: string;
37
+ }>;
38
+ getUserSessions: () => Promise<SessionInfo[]>;
39
+ getSessionStats: () => Promise<SessionStats>;
40
+ revokeSession: (sessionId: string) => Promise<boolean>;
41
+ revokeAllOtherSessions: () => Promise<boolean>;
42
+ initialize: () => Promise<void>;
43
+ forceReInit: () => void;
44
+ setAuthData: (authData: any) => Promise<void>;
45
+ verifyMfa: (code: string, method?: string) => Promise<any>;
46
+ sendMfaEmailCode: (deviceId: string) => Promise<any>;
47
+ getMfaWebAuthnChallenge: (deviceId: string) => Promise<any>;
48
+ registerHardwareKey: (deviceName: string, accessToken: string, deviceType?: 'hardware' | 'passkey') => Promise<any>;
49
+ completeHardwareKeyRegistration: (deviceId: string, credential: any, accessToken: string) => Promise<any>;
50
+ startTokenRefreshTimer: () => void;
51
+ stopTokenRefreshTimer: () => void;
52
+ getAuthHeaders: () => Record<string, string>;
53
+ }
54
+ export interface UseStrandsConfigReturn {
55
+ config: ComputedRef<StrandsAuthConfig>;
56
+ endpoints: ComputedRef<StrandsAuthEndpoints>;
57
+ getUrl: (endpoint: keyof StrandsAuthEndpoints | string) => string;
58
+ getSupportEmail: () => string | null;
59
+ }
60
+ export interface UseAuthenticatedFetchReturn {
61
+ $fetch: <T = any>(url: string, options?: AuthenticatedFetchOptions) => Promise<T>;
62
+ isLoading: Ref<boolean>;
63
+ error: Ref<Error | null>;
64
+ }
65
+ export interface UseOAuthProvidersReturn {
66
+ providers: ComputedRef<any[]>;
67
+ loading: Ref<boolean>;
68
+ fetchProviders: () => Promise<void>;
69
+ }
70
+ export interface UseThemeReturn {
71
+ isDark: Ref<boolean>;
72
+ toggleTheme: () => void;
73
+ setTheme: (dark: boolean) => void;
74
+ }
75
+ export interface UseFloatingPositionReturn {
76
+ x: Ref<number>;
77
+ y: Ref<number>;
78
+ placement: Ref<string>;
79
+ update: () => void;
80
+ }
81
+ export interface UseModalStackReturn {
82
+ modalStack: Ref<string[]>;
83
+ pushModal: (id: string) => void;
84
+ popModal: () => void;
85
+ isTopModal: (id: string) => boolean;
86
+ }
87
+ export interface UseModalTeleportReturn {
88
+ teleportTarget: Ref<string>;
89
+ updateTeleportTarget: () => void;
90
+ }
91
+ export interface UseGlobalModalStackReturn {
92
+ globalModalStack: Ref<string[]>;
93
+ addModal: (id: string) => void;
94
+ removeModal: (id: string) => void;
95
+ isTopModal: (id: string) => boolean;
96
+ }
@@ -0,0 +1,242 @@
1
+ export interface User {
2
+ id: string;
3
+ email: string;
4
+ firstName: string;
5
+ lastName: string;
6
+ avatar?: string;
7
+ mfaEnabled: boolean;
8
+ emailVerified: boolean;
9
+ passwordUpdatedAt?: string | Date;
10
+ settings?: any;
11
+ xp: number;
12
+ level: number;
13
+ next_level_xp: number;
14
+ username?: string;
15
+ usernameLastChangedAt?: string | Date;
16
+ createdAt: string | Date;
17
+ updatedAt: string | Date;
18
+ }
19
+ export interface AuthenticatedFetchOptions extends RequestInit {
20
+ /**
21
+ * Whether to automatically refresh token if the request fails with 401
22
+ * @default true
23
+ */
24
+ autoRefresh?: boolean;
25
+ /**
26
+ * Whether to throw an error if user is not authenticated
27
+ * @default true
28
+ */
29
+ requireAuth?: boolean;
30
+ /**
31
+ * Base URL for the API requests
32
+ * If not provided, will use the current origin
33
+ */
34
+ baseURL?: string;
35
+ }
36
+ export interface Session {
37
+ id?: string;
38
+ userId?: string;
39
+ accessToken: string;
40
+ refreshToken: string;
41
+ expiresAt: Date;
42
+ createdAt?: Date;
43
+ }
44
+ export interface SessionInfo {
45
+ id: string;
46
+ device_name?: string;
47
+ device_type?: string;
48
+ ip_address?: string;
49
+ country?: string;
50
+ city?: string;
51
+ application_domain?: string;
52
+ application_name?: string;
53
+ created_at: string | Date;
54
+ last_activity_at?: string | Date;
55
+ is_current: boolean;
56
+ }
57
+ export interface SessionStats {
58
+ total_sessions: number;
59
+ active_sessions: number;
60
+ devices_by_type: Record<string, number>;
61
+ unique_locations: string[];
62
+ }
63
+ export interface AuthConfig {
64
+ apiUrl: string;
65
+ applicationId: string;
66
+ publicKey: string;
67
+ autoRefresh?: boolean;
68
+ redirectUrl?: string;
69
+ }
70
+ export interface SignInCredentials {
71
+ email: string;
72
+ password: string;
73
+ }
74
+ export interface SignUpData {
75
+ email: string;
76
+ password: string;
77
+ firstName: string;
78
+ lastName: string;
79
+ }
80
+ export interface OAuthProvider {
81
+ id: string;
82
+ name: string;
83
+ enabled: boolean;
84
+ clientId?: string;
85
+ scopes?: string[];
86
+ }
87
+ export interface StrandsAuthConfig {
88
+ /**
89
+ * Base URL for the Strands Auth API
90
+ * @default 'https://your-api.example.com'
91
+ */
92
+ baseUrl?: string;
93
+ /**
94
+ * Client ID for authentication (optional - authentication is now based on domain)
95
+ */
96
+ clientId?: string;
97
+ /**
98
+ * Primary accent color for the auth components
99
+ * @default '#EA00A8'
100
+ */
101
+ accentColor?: string;
102
+ /**
103
+ * Default redirect URL after successful authentication
104
+ * @default '/'
105
+ */
106
+ redirectUrl?: string;
107
+ /**
108
+ * URL to redirect to after successful sign in
109
+ * @default '/dashboard'
110
+ */
111
+ onSignInUrl?: string;
112
+ /**
113
+ * URL to redirect to after successful sign out
114
+ * @default '/'
115
+ */
116
+ onSignOutUrl?: string;
117
+ /**
118
+ * Enable automatic token refresh
119
+ * @default true
120
+ */
121
+ autoRefresh?: boolean;
122
+ /**
123
+ * Token refresh interval in minutes
124
+ * @default 4
125
+ */
126
+ refreshInterval?: number;
127
+ /**
128
+ * Pages that should redirect to sign in if user is not authenticated
129
+ * @default []
130
+ */
131
+ protectedRoutes?: string[];
132
+ /**
133
+ * Pages that should redirect away if user IS authenticated
134
+ * @default ['/auth', '/login', '/register']
135
+ */
136
+ guestOnlyRoutes?: string[];
137
+ /**
138
+ * Enable development mode (shows debug info)
139
+ * @default false
140
+ */
141
+ devMode?: boolean;
142
+ /**
143
+ * Support email address for contact links
144
+ * @optional
145
+ */
146
+ supportEmail?: string;
147
+ /**
148
+ * OAuth2 redirect URL for OAuth providers
149
+ * If not specified, will use {origin}/auth/callback
150
+ * @optional
151
+ */
152
+ oauth2RedirectUrl?: string;
153
+ /**
154
+ * Automatically import CSS styles
155
+ * Set to false if you want to manually import styles or use custom styling
156
+ * @default true
157
+ */
158
+ styles?: boolean;
159
+ /**
160
+ * Custom API endpoints
161
+ */
162
+ endpoints?: Partial<StrandsAuthEndpoints>;
163
+ /**
164
+ * Enable squircle corners for UI components
165
+ * @default true
166
+ */
167
+ useSquircle?: boolean;
168
+ }
169
+ export interface StrandsAuthEndpoints {
170
+ signIn: string;
171
+ signUp: string;
172
+ signOut: string;
173
+ refresh: string;
174
+ passwordReset: string;
175
+ passwordResetConfirm: string;
176
+ completeRegistration: string;
177
+ profile: string;
178
+ verifyEmail: string;
179
+ oauthProviders: string;
180
+ oauthProvider: string;
181
+ changeEmail: string;
182
+ avatar: string;
183
+ settings: string;
184
+ changeUsername: string;
185
+ usernameCooldown: string;
186
+ checkUsernameAvailability: string;
187
+ mfaDevices: string;
188
+ mfaTotpSetup: string;
189
+ mfaTotpVerify: string;
190
+ mfaEmailSetup: string;
191
+ mfaEmailSend: string;
192
+ mfaEmailVerify: string;
193
+ mfaDeviceDisable: string;
194
+ mfaBackupCodes: string;
195
+ mfaHardwareStartRegistration: string;
196
+ mfaHardwareCompleteRegistration: string;
197
+ mfaSigninSendEmail: string;
198
+ mfaSigninVerify: string;
199
+ mfaBackupCodeVerify: string;
200
+ mfaWebAuthnChallenge: string;
201
+ sessions: string;
202
+ sessionsStats: string;
203
+ sessionRevoke: string;
204
+ sessionsRevokeAll: string;
205
+ }
206
+ export interface AuthResponse {
207
+ access_token: string;
208
+ refresh_token: string;
209
+ user: User;
210
+ mfa_required?: boolean;
211
+ mfa_session_id?: string;
212
+ available_mfa_methods?: MfaDevice[];
213
+ }
214
+ export type MfaDeviceType = 'totp' | 'email' | 'hardware' | 'passkey';
215
+ export interface MfaDevice {
216
+ id: string;
217
+ device_type: MfaDeviceType;
218
+ device_name: string;
219
+ is_active: boolean;
220
+ last_used_at?: string | Date;
221
+ created_at: string | Date;
222
+ }
223
+ export interface MfaDevicesResponse {
224
+ devices: MfaDevice[];
225
+ mfa_enabled: boolean;
226
+ }
227
+ export interface TotpSetupResponse {
228
+ device_id: string;
229
+ secret: string;
230
+ qr_code_url: string;
231
+ backup_codes: string[];
232
+ }
233
+ export interface BackupCodesResponse {
234
+ backup_codes: string[];
235
+ }
236
+ export interface MfaErrorResponse {
237
+ code: string;
238
+ message: string;
239
+ mfa_session_id?: string;
240
+ available_methods?: string[];
241
+ }
242
+ export type * from './composables';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Complete Tailwind CSS color palette with shades
3
+ * Provides all 22 Tailwind colors with their full shade ranges (50-950)
4
+ */
5
+ interface SwatchConfig {
6
+ label?: string;
7
+ shades?: string[];
8
+ }
9
+ export declare const tailwindColors: Record<string, SwatchConfig>;
10
+ export type { SwatchConfig };
@@ -0,0 +1,2 @@
1
+ export * from './validation';
2
+ export * from './colors';
@@ -0,0 +1 @@
1
+ export declare const slotHasContent: (slotName: string, slots: any) => boolean;
@@ -0,0 +1,12 @@
1
+ export declare const isValidEmail: (email: string) => boolean;
2
+ export declare const validatePassword: (password: string) => {
3
+ isValid: boolean;
4
+ strength: "weak" | "medium" | "strong";
5
+ errors: string[];
6
+ };
7
+ export declare const isValidName: (name: string) => boolean;
8
+ export declare const isRequired: (value: string) => boolean;
9
+ export declare const passwordsMatch: (password: string, confirmation: string) => boolean;
10
+ export declare const getInitials: (firstName?: string, lastName?: string) => string;
11
+ export declare const formatDate: (date: string | Date) => string;
12
+ export declare const debounce: <T extends (...args: any[]) => any>(func: T, wait: number) => ((...args: Parameters<T>) => void);
@@ -0,0 +1,8 @@
1
+ import StrandsNavComponent from './StrandsNav.vue';
2
+ import StrandsNavItem from './StrandsNavItem.vue';
3
+ declare const StrandsNav: typeof StrandsNavComponent & {
4
+ Item: typeof StrandsNavItem;
5
+ };
6
+ export default StrandsNav;
7
+ export { StrandsNavItem };
8
+ export type { NavItem } from './types';
@@ -0,0 +1,12 @@
1
+ export interface NavItem {
2
+ id: string;
3
+ label: string;
4
+ to?: string;
5
+ href?: string;
6
+ icon?: string;
7
+ badge?: string | number;
8
+ active?: boolean;
9
+ disabled?: boolean;
10
+ children?: NavItem[];
11
+ [key: string]: any;
12
+ }
@@ -0,0 +1,2 @@
1
+ export { default as IconGoogle } from './IconGoogle.vue';
2
+ export { default as IconGithub } from './IconGithub.vue';
@@ -0,0 +1,27 @@
1
+ export { default as StrandsAuth } from './StrandsAuth.vue';
2
+ export { default as StrandsSignIn } from './StrandsSignIn.vue';
3
+ export { default as StrandsSignUp } from './StrandsSignUp.vue';
4
+ export { default as StrandsCompleteSignUp } from './StrandsCompleteSignUp.vue';
5
+ export { default as StrandsUserProfile } from './StrandsUserProfile.vue';
6
+ export { default as StrandsPasswordReset } from './StrandsPasswordReset.vue';
7
+ export { default as StrandsMfaVerification } from './StrandsMfaVerification.vue';
8
+ export { default as StrandsSessionsModal } from './StrandsSessionsModal.vue';
9
+ export { default as StrandsConfirmModal } from './StrandsConfirmModal.vue';
10
+ export { default as SignedIn } from './SignedIn.vue';
11
+ export { default as StrandsLogo } from './StrandsLogo.vue';
12
+ export { default as StrandsSecuredFooter } from './StrandsSecuredFooter.vue';
13
+ export { default as StrandsConfigProvider } from './StrandsConfigProvider.vue';
14
+ export { default as SvgIcon } from './SvgIcon.vue';
15
+ export { default as StrandsUserButton } from './StrandsUserButton.vue';
16
+ export { default as StrandsNav, StrandsNavItem } from './StrandsNav';
17
+ export type { NavItem } from './StrandsNav';
18
+ export { default as VirtualList } from './VirtualList.vue';
19
+ export * from './icons';
20
+ export { preloadCriticalComponents } from '../utils/lazyComponents';
21
+ export { default as StrandsMFASetup } from './StrandsMFASetup.vue';
22
+ export { default as StrandsMfaModal } from './StrandsMfaModal.vue';
23
+ export { default as StrandsTotpSetupModal } from './StrandsTotpSetupModal.vue';
24
+ export { default as StrandsEmailMfaSetupModal } from './StrandsEmailMfaSetupModal.vue';
25
+ export { default as StrandsHardwareKeySetupModal } from './StrandsHardwareKeySetupModal.vue';
26
+ export { default as StrandsBackupCodesModal } from './StrandsBackupCodesModal.vue';
27
+ export { default as StrandsSettingsModal } from './StrandsSettingsModal.vue';
@@ -0,0 +1,20 @@
1
+ import type { AuthenticatedFetchOptions } from '../../types';
2
+ /**
3
+ * Enhanced fetch composable that automatically includes auth headers
4
+ * and handles token refresh for API requests (Vue version)
5
+ */
6
+ export declare function useAuthenticatedFetch(): {
7
+ authenticatedFetch: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
8
+ get: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
9
+ post: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
10
+ put: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
11
+ delete: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
12
+ patch: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
13
+ };
14
+ export declare const $authFetch: {
15
+ get: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
16
+ post: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
17
+ put: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
18
+ delete: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
19
+ patch: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
20
+ };