@strands.gg/accui 2.8.0 → 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.
- package/dist/index.d.ts +3 -17
- package/dist/nuxt/module.d.ts +4 -5
- package/dist/nuxt/runtime/composables/useAuthenticatedFetch.d.ts +20 -0
- package/dist/nuxt/runtime/composables/useStrandsAuth.d.ts +65 -0
- package/dist/nuxt/runtime/middleware/auth.d.ts +6 -0
- package/dist/nuxt/runtime/middleware/auth.global.d.ts +2 -0
- package/dist/nuxt/runtime/middleware/guest.d.ts +6 -0
- package/dist/nuxt/runtime/plugin.client.d.ts +2 -0
- package/dist/nuxt/runtime/plugin.server.d.ts +2 -0
- package/dist/nuxt/runtime/plugins/auth-interceptor.client.d.ts +2 -0
- package/dist/nuxt/types.d.ts +45 -0
- package/dist/nuxt.d.ts +3 -1
- package/dist/shared/defaults.d.ts +2 -0
- package/dist/types/composables.d.ts +96 -0
- package/dist/types/index.d.ts +210 -260
- package/dist/utils/colors.d.ts +10 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/slots.d.ts +1 -0
- package/dist/utils/validation.d.ts +12 -0
- package/dist/vue/components/StrandsNav/index.d.ts +8 -0
- package/dist/vue/components/StrandsNav/types.d.ts +12 -0
- package/dist/vue/components/icons/index.d.ts +2 -0
- package/dist/vue/components/index.d.ts +27 -0
- package/dist/vue/composables/useAuthenticatedFetch.d.ts +20 -0
- package/dist/vue/composables/useDarkMode.d.ts +48 -0
- package/dist/vue/composables/useFloatingPosition.d.ts +22 -0
- package/dist/vue/composables/useModalStack.d.ts +86 -0
- package/dist/vue/composables/useOAuthProviders.d.ts +73 -0
- package/dist/vue/composables/useStrandsAuth.d.ts +2 -0
- package/dist/vue/composables/useStrandsConfig.d.ts +5 -0
- package/dist/vue/composables/useStrandsMfa.d.ts +36 -0
- package/dist/vue/composables/useTheme.d.ts +18 -0
- package/dist/vue/index.d.ts +16 -0
- package/dist/vue/plugins/StrandsUIPlugin.d.ts +20 -0
- package/dist/vue/ui/UiButton/index.d.ts +13 -0
- package/dist/vue/ui/index.d.ts +54 -0
- package/dist/vue/utils/contrast.d.ts +75 -0
- package/dist/vue/utils/debounce.d.ts +12 -0
- package/dist/vue/utils/fontPreloader.d.ts +11 -0
- package/dist/vue/utils/iconProps.d.ts +9 -0
- package/dist/vue/utils/lazyComponents.d.ts +4 -0
- package/dist/vue/utils/levels.d.ts +27 -0
- package/dist/vue/utils/modalStack.d.ts +31 -0
- package/dist/vue/utils/performanceInit.d.ts +40 -0
- package/dist/vue/utils/requestCache.d.ts +49 -0
- package/dist/vue/utils/sounds.d.ts +57 -0
- package/package.json +2 -3
- package/dist/accui.css +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.es.js +0 -40821
- package/dist/nuxt/module.cjs.js +0 -1
- package/dist/nuxt/module.es.js +0 -193
- package/dist/nuxt/runtime/composables/useAuthenticatedFetch.cjs.js +0 -1
- package/dist/nuxt/runtime/composables/useAuthenticatedFetch.es.js +0 -134
- package/dist/nuxt/runtime/composables/useStrandsAuth.cjs.js +0 -1
- package/dist/nuxt/runtime/composables/useStrandsAuth.es.js +0 -56
- package/dist/nuxt/runtime/middleware/auth.global.cjs.js +0 -1
- package/dist/nuxt/runtime/middleware/auth.global.es.js +0 -54
- package/dist/nuxt/runtime/plugin.client.cjs.js +0 -1
- package/dist/nuxt/runtime/plugin.client.es.js +0 -26
- package/dist/nuxt/runtime/plugin.server.cjs.js +0 -1
- package/dist/nuxt/runtime/plugin.server.es.js +0 -17
- package/dist/nuxt/runtime/plugins/auth-interceptor.client.cjs.js +0 -1
- package/dist/nuxt/runtime/plugins/auth-interceptor.client.es.js +0 -77
- package/dist/nuxt.cjs.js +0 -1
- package/dist/nuxt.es.js +0 -11
- package/dist/useStrandsAuth-Ca9Zqmfy.cjs.js +0 -1
- package/dist/useStrandsAuth-jI_X_wiK.es.js +0 -916
- package/dist/useStrandsConfig-CLSzvTvE.cjs.js +0 -1
- package/dist/useStrandsConfig-XmPqJn_B.es.js +0 -241
package/dist/types/index.d.ts
CHANGED
|
@@ -1,292 +1,242 @@
|
|
|
1
|
-
// Re-export types from shared-types when available
|
|
2
|
-
// export * from '@strands.gg/auth-types'
|
|
3
|
-
|
|
4
|
-
// Core authentication types
|
|
5
1
|
export interface User {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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;
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
// Authenticated fetch types
|
|
25
19
|
export interface AuthenticatedFetchOptions extends RequestInit {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
baseURL?: string
|
|
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;
|
|
43
35
|
}
|
|
44
|
-
|
|
45
36
|
export interface Session {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
37
|
+
id?: string;
|
|
38
|
+
userId?: string;
|
|
39
|
+
accessToken: string;
|
|
40
|
+
refreshToken: string;
|
|
41
|
+
expiresAt: Date;
|
|
42
|
+
createdAt?: Date;
|
|
52
43
|
}
|
|
53
|
-
|
|
54
|
-
// Enhanced session response type for session management
|
|
55
44
|
export interface SessionInfo {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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;
|
|
67
56
|
}
|
|
68
|
-
|
|
69
57
|
export interface SessionStats {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
58
|
+
total_sessions: number;
|
|
59
|
+
active_sessions: number;
|
|
60
|
+
devices_by_type: Record<string, number>;
|
|
61
|
+
unique_locations: string[];
|
|
74
62
|
}
|
|
75
|
-
|
|
76
63
|
export interface AuthConfig {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
64
|
+
apiUrl: string;
|
|
65
|
+
applicationId: string;
|
|
66
|
+
publicKey: string;
|
|
67
|
+
autoRefresh?: boolean;
|
|
68
|
+
redirectUrl?: string;
|
|
82
69
|
}
|
|
83
|
-
|
|
84
|
-
// Component prop types
|
|
85
70
|
export interface SignInCredentials {
|
|
86
|
-
|
|
87
|
-
|
|
71
|
+
email: string;
|
|
72
|
+
password: string;
|
|
88
73
|
}
|
|
89
|
-
|
|
90
74
|
export interface SignUpData {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
75
|
+
email: string;
|
|
76
|
+
password: string;
|
|
77
|
+
firstName: string;
|
|
78
|
+
lastName: string;
|
|
95
79
|
}
|
|
96
|
-
|
|
97
|
-
// OAuth provider types
|
|
98
80
|
export interface OAuthProvider {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
enabled: boolean;
|
|
84
|
+
clientId?: string;
|
|
85
|
+
scopes?: string[];
|
|
104
86
|
}
|
|
105
|
-
|
|
106
|
-
// Configuration types for Nuxt modules
|
|
107
87
|
export interface StrandsAuthConfig {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
* Set to false if you want to manually import styles or use custom styling
|
|
189
|
-
* @default true
|
|
190
|
-
*/
|
|
191
|
-
styles?: boolean
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Custom API endpoints
|
|
195
|
-
*/
|
|
196
|
-
endpoints?: Partial<StrandsAuthEndpoints>
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Enable squircle corners for UI components
|
|
200
|
-
* @default true
|
|
201
|
-
*/
|
|
202
|
-
useSquircle?: boolean
|
|
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;
|
|
203
168
|
}
|
|
204
|
-
|
|
205
169
|
export interface StrandsAuthEndpoints {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
// Session management endpoints
|
|
242
|
-
sessions: string
|
|
243
|
-
sessionsStats: string
|
|
244
|
-
sessionRevoke: string
|
|
245
|
-
sessionsRevokeAll: string
|
|
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;
|
|
246
205
|
}
|
|
247
|
-
|
|
248
|
-
// API Response types
|
|
249
206
|
export interface AuthResponse {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// MFA Types
|
|
259
|
-
export type MfaDeviceType = 'totp' | 'email' | 'hardware' | 'passkey'
|
|
260
|
-
|
|
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';
|
|
261
215
|
export interface MfaDevice {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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;
|
|
268
222
|
}
|
|
269
|
-
|
|
270
223
|
export interface MfaDevicesResponse {
|
|
271
|
-
|
|
272
|
-
|
|
224
|
+
devices: MfaDevice[];
|
|
225
|
+
mfa_enabled: boolean;
|
|
273
226
|
}
|
|
274
|
-
|
|
275
227
|
export interface TotpSetupResponse {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
228
|
+
device_id: string;
|
|
229
|
+
secret: string;
|
|
230
|
+
qr_code_url: string;
|
|
231
|
+
backup_codes: string[];
|
|
280
232
|
}
|
|
281
|
-
|
|
282
233
|
export interface BackupCodesResponse {
|
|
283
|
-
|
|
234
|
+
backup_codes: string[];
|
|
284
235
|
}
|
|
285
|
-
|
|
286
|
-
// MFA Error Response types
|
|
287
236
|
export interface MfaErrorResponse {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
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 @@
|
|
|
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,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
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export type ThemeMode = 'light' | 'dark' | 'system';
|
|
2
|
+
/**
|
|
3
|
+
* Dark mode composable
|
|
4
|
+
*/
|
|
5
|
+
export declare function useDarkMode(): {
|
|
6
|
+
currentTheme: import("vue").ComputedRef<ThemeMode>;
|
|
7
|
+
isDark: import("vue").ComputedRef<boolean>;
|
|
8
|
+
themeLabel: import("vue").ComputedRef<"Light" | "Dark" | "System">;
|
|
9
|
+
setTheme: (theme: ThemeMode) => void;
|
|
10
|
+
toggle: () => void;
|
|
11
|
+
cycleTheme: () => void;
|
|
12
|
+
initialize: () => void;
|
|
13
|
+
themeOptions: ({
|
|
14
|
+
value: "light";
|
|
15
|
+
label: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
} | {
|
|
18
|
+
value: "dark";
|
|
19
|
+
label: string;
|
|
20
|
+
icon: string;
|
|
21
|
+
} | {
|
|
22
|
+
value: "system";
|
|
23
|
+
label: string;
|
|
24
|
+
icon: string;
|
|
25
|
+
})[];
|
|
26
|
+
};
|
|
27
|
+
export declare function useGlobalDarkMode(): {
|
|
28
|
+
currentTheme: import("vue").ComputedRef<ThemeMode>;
|
|
29
|
+
isDark: import("vue").ComputedRef<boolean>;
|
|
30
|
+
themeLabel: import("vue").ComputedRef<"Light" | "Dark" | "System">;
|
|
31
|
+
setTheme: (theme: ThemeMode) => void;
|
|
32
|
+
toggle: () => void;
|
|
33
|
+
cycleTheme: () => void;
|
|
34
|
+
initialize: () => void;
|
|
35
|
+
themeOptions: ({
|
|
36
|
+
value: "light";
|
|
37
|
+
label: string;
|
|
38
|
+
icon: string;
|
|
39
|
+
} | {
|
|
40
|
+
value: "dark";
|
|
41
|
+
label: string;
|
|
42
|
+
icon: string;
|
|
43
|
+
} | {
|
|
44
|
+
value: "system";
|
|
45
|
+
label: string;
|
|
46
|
+
icon: string;
|
|
47
|
+
})[];
|
|
48
|
+
};
|