@strands.gg/accui 2.17.56 → 2.17.58
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/package.json +2 -2
- package/dist/StrandsUIPlugin-CiAAY2sN.cjs.js +0 -143
- package/dist/StrandsUIPlugin-Dar_Az2V.es.js +0 -20430
- package/dist/StrandsUIPlugin-fHS0GmiX.cjs.js +0 -143
- package/dist/StrandsUIPlugin-hYC1FxeG.es.js +0 -20577
- package/dist/accui.css +0 -1
- package/dist/index.cjs.js +0 -5
- package/dist/index.es.js +0 -12931
- package/dist/nuxt/module.cjs.js +0 -23
- package/dist/nuxt/module.es.js +0 -182
- package/dist/nuxt/runtime/composables/useAuthenticatedFetch.cjs.js +0 -1
- package/dist/nuxt/runtime/composables/useAuthenticatedFetch.es.js +0 -103
- package/dist/nuxt/runtime/composables/useStrandsAuth.cjs.js +0 -1
- package/dist/nuxt/runtime/composables/useStrandsAuth.d.ts +0 -111
- package/dist/nuxt/runtime/composables/useStrandsAuth.es.js +0 -100
- package/dist/nuxt/runtime/composables/useStrandsOAuth.d.ts +0 -8
- package/dist/nuxt/runtime/middleware/auth.global.cjs.js +0 -1
- package/dist/nuxt/runtime/middleware/auth.global.es.js +0 -35
- package/dist/nuxt/runtime/plugin.client.cjs.js +0 -1
- package/dist/nuxt/runtime/plugin.client.es.js +0 -21
- package/dist/nuxt/runtime/plugin.server.cjs.js +0 -1
- package/dist/nuxt/runtime/plugin.server.es.js +0 -15
- package/dist/nuxt/runtime/plugins/auth-interceptor.client.cjs.js +0 -1
- package/dist/nuxt/runtime/plugins/auth-interceptor.client.d.ts +0 -9
- package/dist/nuxt/runtime/plugins/auth-interceptor.client.es.js +0 -46
- package/dist/nuxt/types.d.ts +0 -51
- package/dist/nuxt.cjs.js +0 -1
- package/dist/nuxt.es.js +0 -11
- package/dist/robots.txt +0 -4
- package/dist/shared/defaults.d.ts +0 -2
- package/dist/sitemap.xml +0 -9
- package/dist/types/composables.d.ts +0 -97
- package/dist/types/index.d.ts +0 -263
- package/dist/types/oauth.d.ts +0 -420
- package/dist/useDarkMode-BdG1G2mj.es.js +0 -102
- package/dist/useDarkMode-BvBnG5kF.cjs.js +0 -1
- package/dist/useDarkMode-Dd0Q5Nnz.cjs.js +0 -1
- package/dist/useDarkMode-FTkHLBsX.es.js +0 -102
- package/dist/useDarkMode-OZ_A8-6H.es.js +0 -102
- package/dist/useStrandsAuth-CetpoBNk.cjs.js +0 -1
- package/dist/useStrandsAuth-DEWj1bFC.cjs.js +0 -1
- package/dist/useStrandsAuth-DTJ5fn33.es.js +0 -666
- package/dist/useStrandsAuth-Z7P9ujqQ.es.js +0 -666
- package/dist/useStrandsAuth-wzl2F9DE.es.js +0 -702
- package/dist/useStrandsConfig-B2UXxIbT.es.js +0 -213
- package/dist/useStrandsConfig-BGJg1LlC.es.js +0 -213
- package/dist/useStrandsConfig-BYOAEt9d.cjs.js +0 -1
- package/dist/vite.cjs.js +0 -29
- package/dist/vite.es.js +0 -92
- package/dist/vue/components/index.d.ts +0 -29
- package/dist/vue/composables/useAuthenticatedFetch.d.ts +0 -22
- package/dist/vue/composables/useDarkMode.d.ts +0 -53
- package/dist/vue/composables/useStrandsOAuth.d.ts +0 -10
- package/dist/vue/ui/UiButton/index.d.ts +0 -11
- package/dist/vue/ui/UiMegaMenu/index.d.ts +0 -4
- package/dist/vue/ui/index.d.ts +0 -62
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { ref as g, getCurrentInstance as h, inject as S, computed as f, provide as y } from "vue";
|
|
2
|
-
const w = {
|
|
3
|
-
baseUrl: "https://your-api.example.com",
|
|
4
|
-
accentColor: "#EA00A8",
|
|
5
|
-
autoRefresh: !0,
|
|
6
|
-
refreshInterval: 4,
|
|
7
|
-
protectedRoutes: [],
|
|
8
|
-
guestOnlyRoutes: ["/auth", "/login", "/register"],
|
|
9
|
-
devMode: !1,
|
|
10
|
-
styles: !0,
|
|
11
|
-
endpoints: {},
|
|
12
|
-
useSquircle: !0,
|
|
13
|
-
theme: "system"
|
|
14
|
-
};
|
|
15
|
-
let d = !1;
|
|
16
|
-
const a = {
|
|
17
|
-
signIn: "/api/v1/auth/sign-in",
|
|
18
|
-
signUp: "/api/v1/auth/sign-up",
|
|
19
|
-
signOut: "/api/v1/auth/sign-out",
|
|
20
|
-
refresh: "/api/v1/auth/refresh",
|
|
21
|
-
authStatus: "/api/v1/auth/status",
|
|
22
|
-
passwordReset: "/api/v1/auth/password-reset",
|
|
23
|
-
passwordResetConfirm: "/api/v1/auth/password-reset/confirm",
|
|
24
|
-
completeRegistration: "/api/v1/auth/complete-registration",
|
|
25
|
-
profile: "/api/v1/user/profile",
|
|
26
|
-
verifyEmail: "/api/v1/auth/verify-email",
|
|
27
|
-
oauthProviders: "/api/v1/oauth/providers",
|
|
28
|
-
oauthProvider: "/api/v1/oauth/providers/{provider_id}",
|
|
29
|
-
changeEmail: "/api/v1/user/change-email",
|
|
30
|
-
avatar: "/api/v1/user/avatar",
|
|
31
|
-
settings: "/api/v1/user/settings",
|
|
32
|
-
// Username endpoints
|
|
33
|
-
changeUsername: "/api/v1/user/username",
|
|
34
|
-
usernameCooldown: "/api/v1/user/username/cooldown",
|
|
35
|
-
checkUsernameAvailability: "/api/v1/username/{username}/available",
|
|
36
|
-
// MFA endpoints
|
|
37
|
-
mfaDevices: "/api/v1/mfa/devices",
|
|
38
|
-
mfaTotpSetup: "/api/v1/mfa/totp/setup",
|
|
39
|
-
mfaTotpVerify: "/api/v1/mfa/totp/verify",
|
|
40
|
-
mfaEmailSetup: "/api/v1/mfa/email/setup",
|
|
41
|
-
mfaEmailSend: "/api/v1/mfa/email/send",
|
|
42
|
-
mfaEmailVerify: "/api/v1/mfa/email/verify",
|
|
43
|
-
mfaDeviceDisable: "/api/v1/mfa/device/disable",
|
|
44
|
-
mfaBackupCodes: "/api/v1/mfa/backup-codes/regenerate",
|
|
45
|
-
// Hardware key endpoints
|
|
46
|
-
mfaHardwareStartRegistration: "/api/v1/mfa/hardware/start-registration",
|
|
47
|
-
mfaHardwareCompleteRegistration: "/api/v1/mfa/hardware/complete-registration",
|
|
48
|
-
// MFA sign-in specific endpoints
|
|
49
|
-
mfaSigninSendEmail: "/api/v1/auth/mfa/email/send",
|
|
50
|
-
mfaSigninVerify: "/api/v1/auth/mfa/verify",
|
|
51
|
-
mfaBackupCodeVerify: "/api/v1/auth/mfa/backup-code/verify",
|
|
52
|
-
mfaWebAuthnChallenge: "/api/v1/auth/mfa/webauthn/challenge",
|
|
53
|
-
// Session management endpoints
|
|
54
|
-
sessions: "/api/v1/sessions",
|
|
55
|
-
sessionsStats: "/api/v1/sessions/stats",
|
|
56
|
-
sessionRevoke: "/api/v1/sessions/{session_id}/revoke",
|
|
57
|
-
sessionsRevokeAll: "/api/v1/sessions/revoke-all"
|
|
58
|
-
}, p = /* @__PURE__ */ Symbol("strands-config"), l = g(null);
|
|
59
|
-
function v(s) {
|
|
60
|
-
if (typeof window > "u" || !document.documentElement) return;
|
|
61
|
-
if (typeof CSS < "u" && CSS.registerProperty)
|
|
62
|
-
try {
|
|
63
|
-
CSS.registerProperty({
|
|
64
|
-
name: "--strands-accent",
|
|
65
|
-
syntax: "<color>",
|
|
66
|
-
inherits: !0,
|
|
67
|
-
initialValue: s
|
|
68
|
-
});
|
|
69
|
-
} catch {
|
|
70
|
-
}
|
|
71
|
-
document.documentElement.style.setProperty("--strands-accent", s), document.documentElement.style.setProperty("--accui-strands-accent", s);
|
|
72
|
-
const i = {
|
|
73
|
-
"--accui-strands-50": `color-mix(in srgb, ${s} 10%, white)`,
|
|
74
|
-
"--accui-strands-100": `color-mix(in srgb, ${s} 20%, white)`,
|
|
75
|
-
"--accui-strands-200": `color-mix(in srgb, ${s} 30%, white)`,
|
|
76
|
-
"--accui-strands-300": `color-mix(in srgb, ${s} 40%, white)`,
|
|
77
|
-
"--accui-strands-400": `color-mix(in srgb, ${s} 70%, white)`,
|
|
78
|
-
"--accui-strands-500": s,
|
|
79
|
-
"--accui-strands-600": `color-mix(in srgb, ${s} 85%, black)`,
|
|
80
|
-
"--accui-strands-700": `color-mix(in srgb, ${s} 70%, black)`,
|
|
81
|
-
"--accui-strands-800": `color-mix(in srgb, ${s} 55%, black)`,
|
|
82
|
-
"--accui-strands-900": `color-mix(in srgb, ${s} 40%, black)`,
|
|
83
|
-
"--accui-strands-950": `color-mix(in srgb, ${s} 25%, black)`
|
|
84
|
-
};
|
|
85
|
-
for (const [r, n] of Object.entries(i))
|
|
86
|
-
document.documentElement.style.setProperty(r, n);
|
|
87
|
-
}
|
|
88
|
-
function b(s) {
|
|
89
|
-
if (l.value = s, typeof window < "u" && document.documentElement) {
|
|
90
|
-
const i = s.useSquircle !== void 0 ? s.useSquircle : !0;
|
|
91
|
-
document.documentElement.style.setProperty("--strands-allow-squircle", i ? "1" : "0"), s.accentColor && v(s.accentColor);
|
|
92
|
-
}
|
|
93
|
-
try {
|
|
94
|
-
y(p, s);
|
|
95
|
-
} catch (i) {
|
|
96
|
-
console.warn("[Strands Auth] Could not provide config via Vue provide/inject. Config available via global state only.", i);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function E(s) {
|
|
100
|
-
let i = null;
|
|
101
|
-
try {
|
|
102
|
-
h() && (i = S(p, null));
|
|
103
|
-
} catch {
|
|
104
|
-
i = null;
|
|
105
|
-
}
|
|
106
|
-
let r = null;
|
|
107
|
-
try {
|
|
108
|
-
if (typeof window < "u") {
|
|
109
|
-
if (window.__STRANDS_CONFIG__)
|
|
110
|
-
r = window.__STRANDS_CONFIG__;
|
|
111
|
-
else if (window.__NUXT__) {
|
|
112
|
-
const t = window.__NUXT__;
|
|
113
|
-
r = t?.config?.public?.strandsAuth || t?.public?.strandsAuth || t?.strandsAuth;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
} catch (t) {
|
|
117
|
-
console.error("[Strands Auth] Error accessing runtime configuration:", t);
|
|
118
|
-
}
|
|
119
|
-
const n = f(() => {
|
|
120
|
-
const t = {
|
|
121
|
-
...w,
|
|
122
|
-
...s || {},
|
|
123
|
-
...i || {},
|
|
124
|
-
...l.value || {},
|
|
125
|
-
...r || {}
|
|
126
|
-
};
|
|
127
|
-
if (typeof window < "u" && document.documentElement) {
|
|
128
|
-
const e = t.useSquircle !== void 0 ? t.useSquircle : !0;
|
|
129
|
-
document.documentElement.style.setProperty("--strands-allow-squircle", e ? "1" : "0"), t.accentColor && document.documentElement.style.setProperty("--strands-accent", t.accentColor);
|
|
130
|
-
}
|
|
131
|
-
return t;
|
|
132
|
-
});
|
|
133
|
-
typeof window > "u" && !d && (l.value?.baseUrl || i?.baseUrl || s?.baseUrl || (d = !0, console.warn("[Strands Auth] No baseUrl configured for SSR. Please provide a baseUrl in your strandsAuth configuration.")));
|
|
134
|
-
const u = f(() => {
|
|
135
|
-
const e = n.value.endpoints || {};
|
|
136
|
-
return {
|
|
137
|
-
signIn: e.signIn || a.signIn,
|
|
138
|
-
signUp: e.signUp || a.signUp,
|
|
139
|
-
signOut: e.signOut || a.signOut,
|
|
140
|
-
refresh: e.refresh || a.refresh,
|
|
141
|
-
authStatus: e.authStatus || a.authStatus,
|
|
142
|
-
passwordReset: e.passwordReset || a.passwordReset,
|
|
143
|
-
passwordResetConfirm: e.passwordResetConfirm || a.passwordResetConfirm,
|
|
144
|
-
completeRegistration: e.completeRegistration || a.completeRegistration,
|
|
145
|
-
profile: e.profile || a.profile,
|
|
146
|
-
verifyEmail: e.verifyEmail || a.verifyEmail,
|
|
147
|
-
oauthProviders: e.oauthProviders || a.oauthProviders,
|
|
148
|
-
oauthProvider: e.oauthProvider || a.oauthProvider,
|
|
149
|
-
changeEmail: e.changeEmail || a.changeEmail,
|
|
150
|
-
avatar: e.avatar || a.avatar,
|
|
151
|
-
settings: e.settings || a.settings,
|
|
152
|
-
// Username endpoints
|
|
153
|
-
changeUsername: e.changeUsername || a.changeUsername,
|
|
154
|
-
usernameCooldown: e.usernameCooldown || a.usernameCooldown,
|
|
155
|
-
checkUsernameAvailability: e.checkUsernameAvailability || a.checkUsernameAvailability,
|
|
156
|
-
// MFA endpoints
|
|
157
|
-
mfaDevices: e.mfaDevices || a.mfaDevices,
|
|
158
|
-
mfaTotpSetup: e.mfaTotpSetup || a.mfaTotpSetup,
|
|
159
|
-
mfaTotpVerify: e.mfaTotpVerify || a.mfaTotpVerify,
|
|
160
|
-
mfaEmailSetup: e.mfaEmailSetup || a.mfaEmailSetup,
|
|
161
|
-
mfaEmailSend: e.mfaEmailSend || a.mfaEmailSend,
|
|
162
|
-
mfaEmailVerify: e.mfaEmailVerify || a.mfaEmailVerify,
|
|
163
|
-
mfaDeviceDisable: e.mfaDeviceDisable || a.mfaDeviceDisable,
|
|
164
|
-
mfaBackupCodes: e.mfaBackupCodes || a.mfaBackupCodes,
|
|
165
|
-
// Hardware key endpoints
|
|
166
|
-
mfaHardwareStartRegistration: e.mfaHardwareStartRegistration || a.mfaHardwareStartRegistration,
|
|
167
|
-
mfaHardwareCompleteRegistration: e.mfaHardwareCompleteRegistration || a.mfaHardwareCompleteRegistration,
|
|
168
|
-
// MFA sign-in specific endpoints
|
|
169
|
-
mfaSigninSendEmail: e.mfaSigninSendEmail || a.mfaSigninSendEmail,
|
|
170
|
-
mfaSigninVerify: e.mfaSigninVerify || a.mfaSigninVerify,
|
|
171
|
-
mfaBackupCodeVerify: e.mfaBackupCodeVerify || a.mfaBackupCodeVerify,
|
|
172
|
-
mfaWebAuthnChallenge: e.mfaWebAuthnChallenge || a.mfaWebAuthnChallenge,
|
|
173
|
-
// Session management endpoints
|
|
174
|
-
sessions: e.sessions || a.sessions,
|
|
175
|
-
sessionsStats: e.sessionsStats || a.sessionsStats,
|
|
176
|
-
sessionRevoke: e.sessionRevoke || a.sessionRevoke,
|
|
177
|
-
sessionsRevokeAll: e.sessionsRevokeAll || a.sessionsRevokeAll
|
|
178
|
-
};
|
|
179
|
-
});
|
|
180
|
-
return {
|
|
181
|
-
config: n,
|
|
182
|
-
endpoints: u,
|
|
183
|
-
getUrl: (t) => {
|
|
184
|
-
const e = n.value;
|
|
185
|
-
if (!e.baseUrl)
|
|
186
|
-
throw new Error("Base URL is required in configuration");
|
|
187
|
-
let o;
|
|
188
|
-
typeof t == "string" && t in u.value ? o = u.value[t] : typeof t == "string" ? o = t : o = u.value[t];
|
|
189
|
-
const m = e.baseUrl.replace(/\/$/, ""), c = o.startsWith("/") ? o : `/${o}`;
|
|
190
|
-
return console.debug(`[Strands Auth] Constructing URL for endpoint "${t}": ${m}${c}`), `${m}${c}`;
|
|
191
|
-
},
|
|
192
|
-
getSupportEmail: () => n.value.supportEmail || null
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
function C(s) {
|
|
196
|
-
if (l.value = s, typeof window < "u" && document.documentElement) {
|
|
197
|
-
const i = s.useSquircle !== void 0 ? s.useSquircle : !0;
|
|
198
|
-
document.documentElement.style.setProperty("--strands-allow-squircle", i ? "1" : "0"), s.accentColor && v(s.accentColor);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
const _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
202
|
-
__proto__: null,
|
|
203
|
-
provideStrandsConfig: b,
|
|
204
|
-
setStrandsConfig: C,
|
|
205
|
-
useStrandsConfig: E
|
|
206
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
207
|
-
export {
|
|
208
|
-
w as S,
|
|
209
|
-
_ as a,
|
|
210
|
-
b as p,
|
|
211
|
-
C as s,
|
|
212
|
-
E as u
|
|
213
|
-
};
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { ref as g, getCurrentInstance as h, inject as S, computed as f, provide as y } from "vue";
|
|
2
|
-
const w = {
|
|
3
|
-
baseUrl: "https://your-api.example.com",
|
|
4
|
-
accentColor: "#EA00A8",
|
|
5
|
-
autoRefresh: !0,
|
|
6
|
-
refreshInterval: 4,
|
|
7
|
-
protectedRoutes: [],
|
|
8
|
-
guestOnlyRoutes: ["/auth", "/login", "/register"],
|
|
9
|
-
devMode: !1,
|
|
10
|
-
styles: !0,
|
|
11
|
-
endpoints: {},
|
|
12
|
-
useSquircle: !0,
|
|
13
|
-
theme: "system"
|
|
14
|
-
};
|
|
15
|
-
let d = !1;
|
|
16
|
-
const a = {
|
|
17
|
-
signIn: "/api/v1/auth/sign-in",
|
|
18
|
-
signUp: "/api/v1/auth/sign-up",
|
|
19
|
-
signOut: "/api/v1/auth/sign-out",
|
|
20
|
-
refresh: "/api/v1/auth/refresh",
|
|
21
|
-
authStatus: "/api/v1/auth/status",
|
|
22
|
-
passwordReset: "/api/v1/auth/password-reset",
|
|
23
|
-
passwordResetConfirm: "/api/v1/auth/password-reset/confirm",
|
|
24
|
-
completeRegistration: "/api/v1/auth/complete-registration",
|
|
25
|
-
profile: "/api/v1/user/profile",
|
|
26
|
-
verifyEmail: "/api/v1/auth/verify-email",
|
|
27
|
-
oauthProviders: "/api/v1/oauth/providers",
|
|
28
|
-
oauthProvider: "/api/v1/oauth/providers/{provider_id}",
|
|
29
|
-
changeEmail: "/api/v1/user/change-email",
|
|
30
|
-
avatar: "/api/v1/user/avatar",
|
|
31
|
-
settings: "/api/v1/user/settings",
|
|
32
|
-
// Username endpoints
|
|
33
|
-
changeUsername: "/api/v1/user/username",
|
|
34
|
-
usernameCooldown: "/api/v1/user/username/cooldown",
|
|
35
|
-
checkUsernameAvailability: "/api/v1/username/{username}/available",
|
|
36
|
-
// MFA endpoints
|
|
37
|
-
mfaDevices: "/api/v1/mfa/devices",
|
|
38
|
-
mfaTotpSetup: "/api/v1/mfa/totp/setup",
|
|
39
|
-
mfaTotpVerify: "/api/v1/mfa/totp/verify",
|
|
40
|
-
mfaEmailSetup: "/api/v1/mfa/email/setup",
|
|
41
|
-
mfaEmailSend: "/api/v1/mfa/email/send",
|
|
42
|
-
mfaEmailVerify: "/api/v1/mfa/email/verify",
|
|
43
|
-
mfaDeviceDisable: "/api/v1/mfa/device/disable",
|
|
44
|
-
mfaBackupCodes: "/api/v1/mfa/backup-codes/regenerate",
|
|
45
|
-
// Hardware key endpoints
|
|
46
|
-
mfaHardwareStartRegistration: "/api/v1/mfa/hardware/start-registration",
|
|
47
|
-
mfaHardwareCompleteRegistration: "/api/v1/mfa/hardware/complete-registration",
|
|
48
|
-
// MFA sign-in specific endpoints
|
|
49
|
-
mfaSigninSendEmail: "/api/v1/auth/mfa/email/send",
|
|
50
|
-
mfaSigninVerify: "/api/v1/auth/mfa/verify",
|
|
51
|
-
mfaBackupCodeVerify: "/api/v1/auth/mfa/backup-code/verify",
|
|
52
|
-
mfaWebAuthnChallenge: "/api/v1/auth/mfa/webauthn/challenge",
|
|
53
|
-
// Session management endpoints
|
|
54
|
-
sessions: "/api/v1/sessions",
|
|
55
|
-
sessionsStats: "/api/v1/sessions/stats",
|
|
56
|
-
sessionRevoke: "/api/v1/sessions/{session_id}/revoke",
|
|
57
|
-
sessionsRevokeAll: "/api/v1/sessions/revoke-all"
|
|
58
|
-
}, p = Symbol("strands-config"), l = g(null);
|
|
59
|
-
function v(s) {
|
|
60
|
-
if (typeof window > "u" || !document.documentElement) return;
|
|
61
|
-
if (typeof CSS < "u" && CSS.registerProperty)
|
|
62
|
-
try {
|
|
63
|
-
CSS.registerProperty({
|
|
64
|
-
name: "--strands-accent",
|
|
65
|
-
syntax: "<color>",
|
|
66
|
-
inherits: !0,
|
|
67
|
-
initialValue: s
|
|
68
|
-
});
|
|
69
|
-
} catch {
|
|
70
|
-
}
|
|
71
|
-
document.documentElement.style.setProperty("--strands-accent", s), document.documentElement.style.setProperty("--accui-strands-accent", s);
|
|
72
|
-
const i = {
|
|
73
|
-
"--accui-strands-50": `color-mix(in srgb, ${s} 10%, white)`,
|
|
74
|
-
"--accui-strands-100": `color-mix(in srgb, ${s} 20%, white)`,
|
|
75
|
-
"--accui-strands-200": `color-mix(in srgb, ${s} 30%, white)`,
|
|
76
|
-
"--accui-strands-300": `color-mix(in srgb, ${s} 40%, white)`,
|
|
77
|
-
"--accui-strands-400": `color-mix(in srgb, ${s} 70%, white)`,
|
|
78
|
-
"--accui-strands-500": s,
|
|
79
|
-
"--accui-strands-600": `color-mix(in srgb, ${s} 85%, black)`,
|
|
80
|
-
"--accui-strands-700": `color-mix(in srgb, ${s} 70%, black)`,
|
|
81
|
-
"--accui-strands-800": `color-mix(in srgb, ${s} 55%, black)`,
|
|
82
|
-
"--accui-strands-900": `color-mix(in srgb, ${s} 40%, black)`,
|
|
83
|
-
"--accui-strands-950": `color-mix(in srgb, ${s} 25%, black)`
|
|
84
|
-
};
|
|
85
|
-
for (const [r, n] of Object.entries(i))
|
|
86
|
-
document.documentElement.style.setProperty(r, n);
|
|
87
|
-
}
|
|
88
|
-
function b(s) {
|
|
89
|
-
if (l.value = s, typeof window < "u" && document.documentElement) {
|
|
90
|
-
const i = s.useSquircle !== void 0 ? s.useSquircle : !0;
|
|
91
|
-
document.documentElement.style.setProperty("--strands-allow-squircle", i ? "1" : "0"), s.accentColor && v(s.accentColor);
|
|
92
|
-
}
|
|
93
|
-
try {
|
|
94
|
-
y(p, s);
|
|
95
|
-
} catch (i) {
|
|
96
|
-
console.warn("[Strands Auth] Could not provide config via Vue provide/inject. Config available via global state only.", i);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function E(s) {
|
|
100
|
-
let i = null;
|
|
101
|
-
try {
|
|
102
|
-
h() && (i = S(p, null));
|
|
103
|
-
} catch {
|
|
104
|
-
i = null;
|
|
105
|
-
}
|
|
106
|
-
let r = null;
|
|
107
|
-
try {
|
|
108
|
-
if (typeof window < "u") {
|
|
109
|
-
if (window.__STRANDS_CONFIG__)
|
|
110
|
-
r = window.__STRANDS_CONFIG__;
|
|
111
|
-
else if (window.__NUXT__) {
|
|
112
|
-
const t = window.__NUXT__;
|
|
113
|
-
r = t?.config?.public?.strandsAuth || t?.public?.strandsAuth || t?.strandsAuth;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
} catch (t) {
|
|
117
|
-
console.error("[Strands Auth] Error accessing runtime configuration:", t);
|
|
118
|
-
}
|
|
119
|
-
const n = f(() => {
|
|
120
|
-
const t = {
|
|
121
|
-
...w,
|
|
122
|
-
...s || {},
|
|
123
|
-
...i || {},
|
|
124
|
-
...l.value || {},
|
|
125
|
-
...r || {}
|
|
126
|
-
};
|
|
127
|
-
if (typeof window < "u" && document.documentElement) {
|
|
128
|
-
const e = t.useSquircle !== void 0 ? t.useSquircle : !0;
|
|
129
|
-
document.documentElement.style.setProperty("--strands-allow-squircle", e ? "1" : "0"), t.accentColor && document.documentElement.style.setProperty("--strands-accent", t.accentColor);
|
|
130
|
-
}
|
|
131
|
-
return t;
|
|
132
|
-
});
|
|
133
|
-
typeof window > "u" && !d && (l.value?.baseUrl || i?.baseUrl || s?.baseUrl || (d = !0, console.warn("[Strands Auth] No baseUrl configured for SSR. Please provide a baseUrl in your strandsAuth configuration.")));
|
|
134
|
-
const u = f(() => {
|
|
135
|
-
const e = n.value.endpoints || {};
|
|
136
|
-
return {
|
|
137
|
-
signIn: e.signIn || a.signIn,
|
|
138
|
-
signUp: e.signUp || a.signUp,
|
|
139
|
-
signOut: e.signOut || a.signOut,
|
|
140
|
-
refresh: e.refresh || a.refresh,
|
|
141
|
-
authStatus: e.authStatus || a.authStatus,
|
|
142
|
-
passwordReset: e.passwordReset || a.passwordReset,
|
|
143
|
-
passwordResetConfirm: e.passwordResetConfirm || a.passwordResetConfirm,
|
|
144
|
-
completeRegistration: e.completeRegistration || a.completeRegistration,
|
|
145
|
-
profile: e.profile || a.profile,
|
|
146
|
-
verifyEmail: e.verifyEmail || a.verifyEmail,
|
|
147
|
-
oauthProviders: e.oauthProviders || a.oauthProviders,
|
|
148
|
-
oauthProvider: e.oauthProvider || a.oauthProvider,
|
|
149
|
-
changeEmail: e.changeEmail || a.changeEmail,
|
|
150
|
-
avatar: e.avatar || a.avatar,
|
|
151
|
-
settings: e.settings || a.settings,
|
|
152
|
-
// Username endpoints
|
|
153
|
-
changeUsername: e.changeUsername || a.changeUsername,
|
|
154
|
-
usernameCooldown: e.usernameCooldown || a.usernameCooldown,
|
|
155
|
-
checkUsernameAvailability: e.checkUsernameAvailability || a.checkUsernameAvailability,
|
|
156
|
-
// MFA endpoints
|
|
157
|
-
mfaDevices: e.mfaDevices || a.mfaDevices,
|
|
158
|
-
mfaTotpSetup: e.mfaTotpSetup || a.mfaTotpSetup,
|
|
159
|
-
mfaTotpVerify: e.mfaTotpVerify || a.mfaTotpVerify,
|
|
160
|
-
mfaEmailSetup: e.mfaEmailSetup || a.mfaEmailSetup,
|
|
161
|
-
mfaEmailSend: e.mfaEmailSend || a.mfaEmailSend,
|
|
162
|
-
mfaEmailVerify: e.mfaEmailVerify || a.mfaEmailVerify,
|
|
163
|
-
mfaDeviceDisable: e.mfaDeviceDisable || a.mfaDeviceDisable,
|
|
164
|
-
mfaBackupCodes: e.mfaBackupCodes || a.mfaBackupCodes,
|
|
165
|
-
// Hardware key endpoints
|
|
166
|
-
mfaHardwareStartRegistration: e.mfaHardwareStartRegistration || a.mfaHardwareStartRegistration,
|
|
167
|
-
mfaHardwareCompleteRegistration: e.mfaHardwareCompleteRegistration || a.mfaHardwareCompleteRegistration,
|
|
168
|
-
// MFA sign-in specific endpoints
|
|
169
|
-
mfaSigninSendEmail: e.mfaSigninSendEmail || a.mfaSigninSendEmail,
|
|
170
|
-
mfaSigninVerify: e.mfaSigninVerify || a.mfaSigninVerify,
|
|
171
|
-
mfaBackupCodeVerify: e.mfaBackupCodeVerify || a.mfaBackupCodeVerify,
|
|
172
|
-
mfaWebAuthnChallenge: e.mfaWebAuthnChallenge || a.mfaWebAuthnChallenge,
|
|
173
|
-
// Session management endpoints
|
|
174
|
-
sessions: e.sessions || a.sessions,
|
|
175
|
-
sessionsStats: e.sessionsStats || a.sessionsStats,
|
|
176
|
-
sessionRevoke: e.sessionRevoke || a.sessionRevoke,
|
|
177
|
-
sessionsRevokeAll: e.sessionsRevokeAll || a.sessionsRevokeAll
|
|
178
|
-
};
|
|
179
|
-
});
|
|
180
|
-
return {
|
|
181
|
-
config: n,
|
|
182
|
-
endpoints: u,
|
|
183
|
-
getUrl: (t) => {
|
|
184
|
-
const e = n.value;
|
|
185
|
-
if (!e.baseUrl)
|
|
186
|
-
throw new Error("Base URL is required in configuration");
|
|
187
|
-
let o;
|
|
188
|
-
typeof t == "string" && t in u.value ? o = u.value[t] : typeof t == "string" ? o = t : o = u.value[t];
|
|
189
|
-
const m = e.baseUrl.replace(/\/$/, ""), c = o.startsWith("/") ? o : `/${o}`;
|
|
190
|
-
return console.debug(`[Strands Auth] Constructing URL for endpoint "${t}": ${m}${c}`), `${m}${c}`;
|
|
191
|
-
},
|
|
192
|
-
getSupportEmail: () => n.value.supportEmail || null
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
function C(s) {
|
|
196
|
-
if (l.value = s, typeof window < "u" && document.documentElement) {
|
|
197
|
-
const i = s.useSquircle !== void 0 ? s.useSquircle : !0;
|
|
198
|
-
document.documentElement.style.setProperty("--strands-allow-squircle", i ? "1" : "0"), s.accentColor && v(s.accentColor);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
const _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
202
|
-
__proto__: null,
|
|
203
|
-
provideStrandsConfig: b,
|
|
204
|
-
setStrandsConfig: C,
|
|
205
|
-
useStrandsConfig: E
|
|
206
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
207
|
-
export {
|
|
208
|
-
w as S,
|
|
209
|
-
_ as a,
|
|
210
|
-
b as p,
|
|
211
|
-
C as s,
|
|
212
|
-
E as u
|
|
213
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("vue"),p={baseUrl:"https://your-api.example.com",accentColor:"#EA00A8",autoRefresh:!0,refreshInterval:4,protectedRoutes:[],guestOnlyRoutes:["/auth","/login","/register"],devMode:!1,styles:!0,endpoints:{},useSquircle:!0,theme:"system"};let d=!1;const a={signIn:"/api/v1/auth/sign-in",signUp:"/api/v1/auth/sign-up",signOut:"/api/v1/auth/sign-out",refresh:"/api/v1/auth/refresh",authStatus:"/api/v1/auth/status",passwordReset:"/api/v1/auth/password-reset",passwordResetConfirm:"/api/v1/auth/password-reset/confirm",completeRegistration:"/api/v1/auth/complete-registration",profile:"/api/v1/user/profile",verifyEmail:"/api/v1/auth/verify-email",oauthProviders:"/api/v1/oauth/providers",oauthProvider:"/api/v1/oauth/providers/{provider_id}",changeEmail:"/api/v1/user/change-email",avatar:"/api/v1/user/avatar",settings:"/api/v1/user/settings",changeUsername:"/api/v1/user/username",usernameCooldown:"/api/v1/user/username/cooldown",checkUsernameAvailability:"/api/v1/username/{username}/available",mfaDevices:"/api/v1/mfa/devices",mfaTotpSetup:"/api/v1/mfa/totp/setup",mfaTotpVerify:"/api/v1/mfa/totp/verify",mfaEmailSetup:"/api/v1/mfa/email/setup",mfaEmailSend:"/api/v1/mfa/email/send",mfaEmailVerify:"/api/v1/mfa/email/verify",mfaDeviceDisable:"/api/v1/mfa/device/disable",mfaBackupCodes:"/api/v1/mfa/backup-codes/regenerate",mfaHardwareStartRegistration:"/api/v1/mfa/hardware/start-registration",mfaHardwareCompleteRegistration:"/api/v1/mfa/hardware/complete-registration",mfaSigninSendEmail:"/api/v1/auth/mfa/email/send",mfaSigninVerify:"/api/v1/auth/mfa/verify",mfaBackupCodeVerify:"/api/v1/auth/mfa/backup-code/verify",mfaWebAuthnChallenge:"/api/v1/auth/mfa/webauthn/challenge",sessions:"/api/v1/sessions",sessionsStats:"/api/v1/sessions/stats",sessionRevoke:"/api/v1/sessions/{session_id}/revoke",sessionsRevokeAll:"/api/v1/sessions/revoke-all"},v=Symbol("strands-config"),c=u.ref(null);function g(s){if(typeof window>"u"||!document.documentElement)return;if(typeof CSS<"u"&&CSS.registerProperty)try{CSS.registerProperty({name:"--strands-accent",syntax:"<color>",inherits:!0,initialValue:s})}catch{}document.documentElement.style.setProperty("--strands-accent",s),document.documentElement.style.setProperty("--accui-strands-accent",s);const i={"--accui-strands-50":`color-mix(in srgb, ${s} 10%, white)`,"--accui-strands-100":`color-mix(in srgb, ${s} 20%, white)`,"--accui-strands-200":`color-mix(in srgb, ${s} 30%, white)`,"--accui-strands-300":`color-mix(in srgb, ${s} 40%, white)`,"--accui-strands-400":`color-mix(in srgb, ${s} 70%, white)`,"--accui-strands-500":s,"--accui-strands-600":`color-mix(in srgb, ${s} 85%, black)`,"--accui-strands-700":`color-mix(in srgb, ${s} 70%, black)`,"--accui-strands-800":`color-mix(in srgb, ${s} 55%, black)`,"--accui-strands-900":`color-mix(in srgb, ${s} 40%, black)`,"--accui-strands-950":`color-mix(in srgb, ${s} 25%, black)`};for(const[r,n]of Object.entries(i))document.documentElement.style.setProperty(r,n)}function h(s){if(c.value=s,typeof window<"u"&&document.documentElement){const i=s.useSquircle!==void 0?s.useSquircle:!0;document.documentElement.style.setProperty("--strands-allow-squircle",i?"1":"0"),s.accentColor&&g(s.accentColor)}try{u.provide(v,s)}catch(i){console.warn("[Strands Auth] Could not provide config via Vue provide/inject. Config available via global state only.",i)}}function S(s){let i=null;try{u.getCurrentInstance()&&(i=u.inject(v,null))}catch{i=null}let r=null;try{if(typeof window<"u"){if(window.__STRANDS_CONFIG__)r=window.__STRANDS_CONFIG__;else if(window.__NUXT__){const t=window.__NUXT__;r=t?.config?.public?.strandsAuth||t?.public?.strandsAuth||t?.strandsAuth}}}catch(t){console.error("[Strands Auth] Error accessing runtime configuration:",t)}const n=u.computed(()=>{const t={...p,...s||{},...i||{},...c.value||{},...r||{}};if(typeof window<"u"&&document.documentElement){const e=t.useSquircle!==void 0?t.useSquircle:!0;document.documentElement.style.setProperty("--strands-allow-squircle",e?"1":"0"),t.accentColor&&document.documentElement.style.setProperty("--strands-accent",t.accentColor)}return t});typeof window>"u"&&!d&&(c.value?.baseUrl||i?.baseUrl||s?.baseUrl||(d=!0,console.warn("[Strands Auth] No baseUrl configured for SSR. Please provide a baseUrl in your strandsAuth configuration.")));const l=u.computed(()=>{const e=n.value.endpoints||{};return{signIn:e.signIn||a.signIn,signUp:e.signUp||a.signUp,signOut:e.signOut||a.signOut,refresh:e.refresh||a.refresh,authStatus:e.authStatus||a.authStatus,passwordReset:e.passwordReset||a.passwordReset,passwordResetConfirm:e.passwordResetConfirm||a.passwordResetConfirm,completeRegistration:e.completeRegistration||a.completeRegistration,profile:e.profile||a.profile,verifyEmail:e.verifyEmail||a.verifyEmail,oauthProviders:e.oauthProviders||a.oauthProviders,oauthProvider:e.oauthProvider||a.oauthProvider,changeEmail:e.changeEmail||a.changeEmail,avatar:e.avatar||a.avatar,settings:e.settings||a.settings,changeUsername:e.changeUsername||a.changeUsername,usernameCooldown:e.usernameCooldown||a.usernameCooldown,checkUsernameAvailability:e.checkUsernameAvailability||a.checkUsernameAvailability,mfaDevices:e.mfaDevices||a.mfaDevices,mfaTotpSetup:e.mfaTotpSetup||a.mfaTotpSetup,mfaTotpVerify:e.mfaTotpVerify||a.mfaTotpVerify,mfaEmailSetup:e.mfaEmailSetup||a.mfaEmailSetup,mfaEmailSend:e.mfaEmailSend||a.mfaEmailSend,mfaEmailVerify:e.mfaEmailVerify||a.mfaEmailVerify,mfaDeviceDisable:e.mfaDeviceDisable||a.mfaDeviceDisable,mfaBackupCodes:e.mfaBackupCodes||a.mfaBackupCodes,mfaHardwareStartRegistration:e.mfaHardwareStartRegistration||a.mfaHardwareStartRegistration,mfaHardwareCompleteRegistration:e.mfaHardwareCompleteRegistration||a.mfaHardwareCompleteRegistration,mfaSigninSendEmail:e.mfaSigninSendEmail||a.mfaSigninSendEmail,mfaSigninVerify:e.mfaSigninVerify||a.mfaSigninVerify,mfaBackupCodeVerify:e.mfaBackupCodeVerify||a.mfaBackupCodeVerify,mfaWebAuthnChallenge:e.mfaWebAuthnChallenge||a.mfaWebAuthnChallenge,sessions:e.sessions||a.sessions,sessionsStats:e.sessionsStats||a.sessionsStats,sessionRevoke:e.sessionRevoke||a.sessionRevoke,sessionsRevokeAll:e.sessionsRevokeAll||a.sessionsRevokeAll}});return{config:n,endpoints:l,getUrl:t=>{const e=n.value;if(!e.baseUrl)throw new Error("Base URL is required in configuration");let o;typeof t=="string"&&t in l.value?o=l.value[t]:typeof t=="string"?o=t:o=l.value[t];const m=e.baseUrl.replace(/\/$/,""),f=o.startsWith("/")?o:`/${o}`;return console.debug(`[Strands Auth] Constructing URL for endpoint "${t}": ${m}${f}`),`${m}${f}`},getSupportEmail:()=>n.value.supportEmail||null}}function y(s){if(c.value=s,typeof window<"u"&&document.documentElement){const i=s.useSquircle!==void 0?s.useSquircle:!0;document.documentElement.style.setProperty("--strands-allow-squircle",i?"1":"0"),s.accentColor&&g(s.accentColor)}}const w=Object.freeze(Object.defineProperty({__proto__:null,provideStrandsConfig:h,setStrandsConfig:y,useStrandsConfig:S},Symbol.toStringTag,{value:"Module"}));exports.STRANDS_AUTH_DEFAULTS=p;exports.provideStrandsConfig=h;exports.setStrandsConfig=y;exports.useStrandsConfig=S;exports.useStrandsConfig$1=w;
|
package/dist/vite.cjs.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function e(i={}){const{styles:a=!0,accentColor:n="#EA00A8",useSquircle:r=!0,...u}=i;let c;return{name:"@strands.gg/accui:vite-plugin",enforce:"pre",config(s,{command:t}){return c={accentColor:n,useSquircle:r,...u},{define:{__STRANDS_CONFIG__:JSON.stringify(c)}}},transformIndexHtml:{order:"pre",handler(s){if(n&&n!=="#EA00A8"){const o=`<style data-strands-accent>${`
|
|
2
|
-
:root {
|
|
3
|
-
--strands-accent: ${n};
|
|
4
|
-
--accui-strands-accent: ${n};
|
|
5
|
-
--accui-strands-50: color-mix(in srgb, ${n} 10%, white);
|
|
6
|
-
--accui-strands-100: color-mix(in srgb, ${n} 20%, white);
|
|
7
|
-
--accui-strands-200: color-mix(in srgb, ${n} 30%, white);
|
|
8
|
-
--accui-strands-300: color-mix(in srgb, ${n} 40%, white);
|
|
9
|
-
--accui-strands-400: color-mix(in srgb, ${n} 70%, white);
|
|
10
|
-
--accui-strands-500: ${n};
|
|
11
|
-
--accui-strands-600: color-mix(in srgb, ${n} 85%, black);
|
|
12
|
-
--accui-strands-700: color-mix(in srgb, ${n} 70%, black);
|
|
13
|
-
--accui-strands-800: color-mix(in srgb, ${n} 55%, black);
|
|
14
|
-
--accui-strands-900: color-mix(in srgb, ${n} 40%, black);
|
|
15
|
-
--accui-strands-950: color-mix(in srgb, ${n} 25%, black);
|
|
16
|
-
}`}</style>`;return s.replace("</head>",` ${o}
|
|
17
|
-
</head>`)}return s}},async transform(s,t){return(a&&t.endsWith("main.ts")||t.endsWith("main.js"))&&!s.includes("@strands.gg/accui/style.css")?{code:`import '@strands.gg/accui/style.css'
|
|
18
|
-
${s}`,map:null}:(t.endsWith("main.ts")||t.endsWith("main.js"))&&!s.includes("setStrandsConfig")&&!s.includes("__STRANDS_INJECTED__")?{code:`${`
|
|
19
|
-
// Auto-injected by @strands.gg/accui Vite plugin
|
|
20
|
-
import { setStrandsConfig } from '@strands.gg/accui'
|
|
21
|
-
|
|
22
|
-
if (typeof window !== 'undefined') {
|
|
23
|
-
const strandsConfig = ${JSON.stringify(c)}
|
|
24
|
-
setStrandsConfig(strandsConfig)
|
|
25
|
-
window.__STRANDS_CONFIG__ = strandsConfig
|
|
26
|
-
window.__STRANDS_INJECTED__ = true
|
|
27
|
-
}
|
|
28
|
-
`}
|
|
29
|
-
${s}`,map:null}:null}}}function d(i={}){return{install(a){Promise.resolve().then(()=>require("./StrandsUIPlugin-CiAAY2sN.cjs.js")).then(n=>n.StrandsUIPlugin$1).then(n=>{const r=n.default;a.use(r)}),Promise.resolve().then(()=>require("./useStrandsConfig-BYOAEt9d.cjs.js")).then(n=>n.useStrandsConfig$1).then(n=>{const{setStrandsConfig:r}=n;r(i),typeof window<"u"&&(window.__STRANDS_CONFIG__=i)})}}}exports.StrandsAuth=e;exports.StrandsAuthVitePlugin=e;exports.createStrandsAuth=d;exports.default=e;exports.strandsAuth=e;
|
package/dist/vite.es.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
function u(r = {}) {
|
|
2
|
-
const {
|
|
3
|
-
styles: a = !0,
|
|
4
|
-
accentColor: n = "#EA00A8",
|
|
5
|
-
useSquircle: i = !0,
|
|
6
|
-
...o
|
|
7
|
-
} = r;
|
|
8
|
-
let c;
|
|
9
|
-
return {
|
|
10
|
-
name: "@strands.gg/accui:vite-plugin",
|
|
11
|
-
enforce: "pre",
|
|
12
|
-
config(s, { command: t }) {
|
|
13
|
-
return c = {
|
|
14
|
-
accentColor: n,
|
|
15
|
-
useSquircle: i,
|
|
16
|
-
...o
|
|
17
|
-
}, {
|
|
18
|
-
define: {
|
|
19
|
-
// Make config available at build time
|
|
20
|
-
__STRANDS_CONFIG__: JSON.stringify(c)
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
},
|
|
24
|
-
transformIndexHtml: {
|
|
25
|
-
order: "pre",
|
|
26
|
-
handler(s) {
|
|
27
|
-
if (n && n !== "#EA00A8") {
|
|
28
|
-
const e = `<style data-strands-accent>${`
|
|
29
|
-
:root {
|
|
30
|
-
--strands-accent: ${n};
|
|
31
|
-
--accui-strands-accent: ${n};
|
|
32
|
-
--accui-strands-50: color-mix(in srgb, ${n} 10%, white);
|
|
33
|
-
--accui-strands-100: color-mix(in srgb, ${n} 20%, white);
|
|
34
|
-
--accui-strands-200: color-mix(in srgb, ${n} 30%, white);
|
|
35
|
-
--accui-strands-300: color-mix(in srgb, ${n} 40%, white);
|
|
36
|
-
--accui-strands-400: color-mix(in srgb, ${n} 70%, white);
|
|
37
|
-
--accui-strands-500: ${n};
|
|
38
|
-
--accui-strands-600: color-mix(in srgb, ${n} 85%, black);
|
|
39
|
-
--accui-strands-700: color-mix(in srgb, ${n} 70%, black);
|
|
40
|
-
--accui-strands-800: color-mix(in srgb, ${n} 55%, black);
|
|
41
|
-
--accui-strands-900: color-mix(in srgb, ${n} 40%, black);
|
|
42
|
-
--accui-strands-950: color-mix(in srgb, ${n} 25%, black);
|
|
43
|
-
}`}</style>`;
|
|
44
|
-
return s.replace("</head>", ` ${e}
|
|
45
|
-
</head>`);
|
|
46
|
-
}
|
|
47
|
-
return s;
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
async transform(s, t) {
|
|
51
|
-
return (a && t.endsWith("main.ts") || t.endsWith("main.js")) && !s.includes("@strands.gg/accui/style.css") ? {
|
|
52
|
-
code: `import '@strands.gg/accui/style.css'
|
|
53
|
-
${s}`,
|
|
54
|
-
map: null
|
|
55
|
-
} : (t.endsWith("main.ts") || t.endsWith("main.js")) && !s.includes("setStrandsConfig") && !s.includes("__STRANDS_INJECTED__") ? {
|
|
56
|
-
code: `${`
|
|
57
|
-
// Auto-injected by @strands.gg/accui Vite plugin
|
|
58
|
-
import { setStrandsConfig } from '@strands.gg/accui'
|
|
59
|
-
|
|
60
|
-
if (typeof window !== 'undefined') {
|
|
61
|
-
const strandsConfig = ${JSON.stringify(c)}
|
|
62
|
-
setStrandsConfig(strandsConfig)
|
|
63
|
-
window.__STRANDS_CONFIG__ = strandsConfig
|
|
64
|
-
window.__STRANDS_INJECTED__ = true
|
|
65
|
-
}
|
|
66
|
-
`}
|
|
67
|
-
${s}`,
|
|
68
|
-
map: null
|
|
69
|
-
} : null;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function d(r = {}) {
|
|
74
|
-
return {
|
|
75
|
-
install(a) {
|
|
76
|
-
import("./StrandsUIPlugin-hYC1FxeG.es.js").then((n) => n.m).then((n) => {
|
|
77
|
-
const i = n.default;
|
|
78
|
-
a.use(i);
|
|
79
|
-
}), import("./useStrandsConfig-B2UXxIbT.es.js").then((n) => n.a).then((n) => {
|
|
80
|
-
const { setStrandsConfig: i } = n;
|
|
81
|
-
i(r), typeof window < "u" && (window.__STRANDS_CONFIG__ = r);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
export {
|
|
87
|
-
u as StrandsAuth,
|
|
88
|
-
u as StrandsAuthVitePlugin,
|
|
89
|
-
d as createStrandsAuth,
|
|
90
|
-
u as default,
|
|
91
|
-
u as strandsAuth
|
|
92
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
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';
|
|
28
|
-
export { default as StrandsOAuthButton } from './StrandsOAuthButton.vue';
|
|
29
|
-
export { default as StrandsOAuthCallback } from './StrandsOAuthCallback.vue';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { AuthenticatedFetchOptions } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Enhanced fetch composable that automatically includes credentials (cookies)
|
|
4
|
-
* and handles token refresh for API requests (Vue version)
|
|
5
|
-
*
|
|
6
|
-
* With HTTP-only cookies, auth tokens are sent automatically via credentials: 'include'
|
|
7
|
-
*/
|
|
8
|
-
export declare function useAuthenticatedFetch(): {
|
|
9
|
-
authenticatedFetch: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
10
|
-
get: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
11
|
-
post: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
12
|
-
put: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
13
|
-
delete: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
14
|
-
patch: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
15
|
-
};
|
|
16
|
-
export declare const $authFetch: {
|
|
17
|
-
get: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
18
|
-
post: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
19
|
-
put: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
20
|
-
delete: (url: string | URL, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
21
|
-
patch: (url: string | URL, body?: any, options?: AuthenticatedFetchOptions) => Promise<Response>;
|
|
22
|
-
};
|