@strands.gg/accui 2.8.0 → 2.8.1

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.
@@ -0,0 +1 @@
1
+ export { }
@@ -0,0 +1 @@
1
+ export { }
package/dist/index.d.ts CHANGED
@@ -1,21 +1 @@
1
- // Main exports
2
- export * from './vue/components';
3
- export * from './vue/ui';
4
- export { default as StrandsUIPlugin } from './vue/plugins/StrandsUIPlugin';
5
-
6
- // Export Vue composables directly (matches src/index.ts)
7
- export declare function useStrandsAuth(): any;
8
- export declare function useStrandsConfig(fallbackConfig?: any): any;
9
- export declare function setStrandsConfig(config: any): void;
10
- export declare function provideStrandsConfig(config: any): void;
11
- export declare function useOAuthProviders(): any;
12
- export declare function useAuthenticatedFetch(): any;
13
- export declare const $authFetch: any;
14
- export declare function useTheme(): any;
15
- export declare function useFloatingPosition(reference: any, floating: any, options?: any): any;
16
- export declare function useModalStack(): any;
17
- export declare function useModalTeleport(): any;
18
- export declare function useGlobalModalStack(): any;
19
-
20
- export * from './utils';
21
- export type * from './types/index';
1
+ export { }
@@ -0,0 +1 @@
1
+ export { }
@@ -1,5 +1 @@
1
- import type { StrandsAuthConfig } from '../types/index';
2
- export type { StrandsAuthConfig, StrandsAuthEndpoints } from '../types/index';
3
-
4
- declare const _default: any;
5
- export default _default;
1
+ export {}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ export {}
package/dist/nuxt.d.ts CHANGED
@@ -1,2 +1 @@
1
- export { default } from './nuxt/module';
2
- export type { StrandsAuthConfig, StrandsAuthEndpoints } from './types/index';
1
+ export { }
@@ -0,0 +1 @@
1
+ export { }
@@ -0,0 +1 @@
1
+ export { }
@@ -0,0 +1 @@
1
+ export { }
@@ -0,0 +1 @@
1
+ export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strands.gg/accui",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "description": "Strands Authentication UI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",
@@ -56,7 +56,7 @@
56
56
  "author": "Strands Services Limited",
57
57
  "license": "MIT",
58
58
  "scripts": {
59
- "build": "vite build && npm run build-runtime",
59
+ "build": "vite build",
60
60
  "build-runtime": "node scripts/build-runtime.js",
61
61
  "build-demo": "vite build --config vite.demo.config.ts",
62
62
  "serve": "vite",
@@ -1,292 +0,0 @@
1
- // Re-export types from shared-types when available
2
- // export * from '@strands.gg/auth-types'
3
-
4
- // Core authentication types
5
- export interface User {
6
- id: string
7
- email: string
8
- firstName: string
9
- lastName: string
10
- avatar?: string
11
- mfaEnabled: boolean
12
- emailVerified: boolean
13
- passwordUpdatedAt?: string | Date
14
- settings?: any
15
- xp: number
16
- level: number
17
- next_level_xp: number
18
- username?: string
19
- usernameLastChangedAt?: string | Date
20
- createdAt: string | Date
21
- updatedAt: string | Date
22
- }
23
-
24
- // Authenticated fetch types
25
- export interface AuthenticatedFetchOptions extends RequestInit {
26
- /**
27
- * Whether to automatically refresh token if the request fails with 401
28
- * @default true
29
- */
30
- autoRefresh?: boolean
31
-
32
- /**
33
- * Whether to throw an error if user is not authenticated
34
- * @default true
35
- */
36
- requireAuth?: boolean
37
-
38
- /**
39
- * Base URL for the API requests
40
- * If not provided, will use the current origin
41
- */
42
- baseURL?: string
43
- }
44
-
45
- export interface Session {
46
- id?: string
47
- userId?: string
48
- accessToken: string
49
- refreshToken: string
50
- expiresAt: Date
51
- createdAt?: Date
52
- }
53
-
54
- // Enhanced session response type for session management
55
- export interface SessionInfo {
56
- id: string
57
- device_name?: string
58
- device_type?: string
59
- ip_address?: string
60
- country?: string
61
- city?: string
62
- application_domain?: string
63
- application_name?: string
64
- created_at: string | Date
65
- last_activity_at?: string | Date
66
- is_current: boolean
67
- }
68
-
69
- export interface SessionStats {
70
- total_sessions: number
71
- active_sessions: number
72
- devices_by_type: Record<string, number>
73
- unique_locations: string[]
74
- }
75
-
76
- export interface AuthConfig {
77
- apiUrl: string
78
- applicationId: string
79
- publicKey: string
80
- autoRefresh?: boolean
81
- redirectUrl?: string
82
- }
83
-
84
- // Component prop types
85
- export interface SignInCredentials {
86
- email: string
87
- password: string
88
- }
89
-
90
- export interface SignUpData {
91
- email: string
92
- password: string
93
- firstName: string
94
- lastName: string
95
- }
96
-
97
- // OAuth provider types
98
- export interface OAuthProvider {
99
- id: string
100
- name: string
101
- enabled: boolean
102
- clientId?: string // Optional - may still be used for OAuth provider configuration
103
- scopes?: string[]
104
- }
105
-
106
- // Configuration types for Nuxt modules
107
- export interface StrandsAuthConfig {
108
- /**
109
- * Base URL for the Strands Auth API
110
- * @default 'https://your-api.example.com'
111
- */
112
- baseUrl?: string
113
-
114
- /**
115
- * Client ID for authentication (optional - authentication is now based on domain)
116
- */
117
- clientId?: string
118
-
119
- /**
120
- * Primary accent color for the auth components
121
- * @default '#EA00A8'
122
- */
123
- accentColor?: string
124
-
125
- /**
126
- * Default redirect URL after successful authentication
127
- * @default '/'
128
- */
129
- redirectUrl?: string
130
-
131
- /**
132
- * URL to redirect to after successful sign in
133
- * @default '/dashboard'
134
- */
135
- onSignInUrl?: string
136
-
137
- /**
138
- * URL to redirect to after successful sign out
139
- * @default '/'
140
- */
141
- onSignOutUrl?: string
142
-
143
- /**
144
- * Enable automatic token refresh
145
- * @default true
146
- */
147
- autoRefresh?: boolean
148
-
149
- /**
150
- * Token refresh interval in minutes
151
- * @default 4
152
- */
153
- refreshInterval?: number
154
-
155
- /**
156
- * Pages that should redirect to sign in if user is not authenticated
157
- * @default []
158
- */
159
- protectedRoutes?: string[]
160
-
161
- /**
162
- * Pages that should redirect away if user IS authenticated
163
- * @default ['/auth', '/login', '/register']
164
- */
165
- guestOnlyRoutes?: string[]
166
-
167
- /**
168
- * Enable development mode (shows debug info)
169
- * @default false
170
- */
171
- devMode?: boolean
172
-
173
- /**
174
- * Support email address for contact links
175
- * @optional
176
- */
177
- supportEmail?: string
178
-
179
- /**
180
- * OAuth2 redirect URL for OAuth providers
181
- * If not specified, will use {origin}/auth/callback
182
- * @optional
183
- */
184
- oauth2RedirectUrl?: string
185
-
186
- /**
187
- * Automatically import CSS styles
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
203
- }
204
-
205
- export interface StrandsAuthEndpoints {
206
- signIn: string
207
- signUp: string
208
- signOut: string
209
- refresh: string
210
- passwordReset: string
211
- passwordResetConfirm: string
212
- completeRegistration: string
213
- profile: string
214
- verifyEmail: string
215
- oauthProviders: string
216
- oauthProvider: string
217
- changeEmail: string
218
- avatar: string
219
- settings: string
220
- // Username endpoints
221
- changeUsername: string
222
- usernameCooldown: string
223
- checkUsernameAvailability: string
224
- // MFA endpoints
225
- mfaDevices: string
226
- mfaTotpSetup: string
227
- mfaTotpVerify: string
228
- mfaEmailSetup: string
229
- mfaEmailSend: string
230
- mfaEmailVerify: string
231
- mfaDeviceDisable: string
232
- mfaBackupCodes: string
233
- // Hardware key endpoints
234
- mfaHardwareStartRegistration: string
235
- mfaHardwareCompleteRegistration: string
236
- // MFA sign-in specific endpoints
237
- mfaSigninSendEmail: string
238
- mfaSigninVerify: string
239
- mfaBackupCodeVerify: string
240
- mfaWebAuthnChallenge: string
241
- // Session management endpoints
242
- sessions: string
243
- sessionsStats: string
244
- sessionRevoke: string
245
- sessionsRevokeAll: string
246
- }
247
-
248
- // API Response types
249
- export interface AuthResponse {
250
- access_token: string
251
- refresh_token: string
252
- user: User
253
- mfa_required?: boolean
254
- mfa_session_id?: string
255
- available_mfa_methods?: MfaDevice[]
256
- }
257
-
258
- // MFA Types
259
- export type MfaDeviceType = 'totp' | 'email' | 'hardware' | 'passkey'
260
-
261
- export interface MfaDevice {
262
- id: string
263
- device_type: MfaDeviceType
264
- device_name: string
265
- is_active: boolean
266
- last_used_at?: string | Date
267
- created_at: string | Date
268
- }
269
-
270
- export interface MfaDevicesResponse {
271
- devices: MfaDevice[]
272
- mfa_enabled: boolean
273
- }
274
-
275
- export interface TotpSetupResponse {
276
- device_id: string
277
- secret: string
278
- qr_code_url: string
279
- backup_codes: string[]
280
- }
281
-
282
- export interface BackupCodesResponse {
283
- backup_codes: string[]
284
- }
285
-
286
- // MFA Error Response types
287
- export interface MfaErrorResponse {
288
- code: string
289
- message: string
290
- mfa_session_id?: string
291
- available_methods?: string[]
292
- }