@strands.gg/accui 2.2.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";const t=require("@nuxt/kit");var e="undefined"!=typeof document?document.currentScript:null;const s=t.defineNuxtModule({meta:{name:"@strands.gg/accui/nuxt",configKey:"strandsAuth",compatibility:{nuxt:"^3.0.0"}},defaults:{baseUrl:"https://your-api.example.com",accentColor:"#EA00A8",redirectUrl:"/",onSignInUrl:"/dashboard",onSignOutUrl:"/",autoRefresh:1,refreshInterval:4,protectedRoutes:[],guestOnlyRoutes:["/auth","/login","/register"],devMode:0,styles:1,supportEmail:"",oauth2RedirectUrl:""},async setup(s,n){const r=t.createResolver("undefined"==typeof document?require("url").pathToFileURL(__filename).href:e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("nuxt/module.cjs.js",document.baseURI).href);n.options.runtimeConfig.public=n.options.runtimeConfig.public||{},n.options.runtimeConfig.public.strandsAuth={...s,styles:0!=s.styles},0!=s.styles&&n.options.css.push("@strands.gg/accui/style.css");const a="es.js";t.addPlugin({src:r.resolve(`./runtime/plugin.client.${a}`),mode:"client"}),t.addPlugin({src:r.resolve(`./runtime/plugin.server.${a}`),mode:"server"}),t.addPlugin({src:r.resolve(`./runtime/plugins/auth-interceptor.client.${a}`),mode:"client"}),t.addRouteMiddleware({name:"auth",path:r.resolve(`./runtime/middleware/auth.global.${a}`),global:1}),n.hook("pages:extend",t=>{}),t.addImports([{name:"useStrandsAuth",as:"useStrandsAuth",from:r.resolve(`./runtime/composables/useStrandsAuth.${a}`)},{name:"useAuthUser",as:"useAuthUser",from:r.resolve(`./runtime/composables/useStrandsAuth.${a}`)},{name:"useAuthState",as:"useAuthState",from:r.resolve(`./runtime/composables/useStrandsAuth.${a}`)},{name:"useAuthenticatedFetch",as:"useAuthenticatedFetch",from:r.resolve(`./runtime/composables/useAuthenticatedFetch.${a}`)}]);const u=["StrandsAuth","StrandsSignIn","StrandsSignUp","StrandsCompleteSignUp","StrandsUserProfile","StrandsUserButton","StrandsPasswordReset","StrandsMFASetup","StrandsConfigProvider","SignedIn","SignedOut","StrandsLogo","StrandsSecuredFooter","StrandsUiAlert","StrandsUiButton","StrandsUiCard","StrandsUiInput","StrandsUiLink","StrandsUiTabs","StrandsUiLoader"];for(const e of u)t.addComponent({name:e,export:e,filePath:"@strands.gg/accui"});n.hook("prepare:types",t=>{t.references.push({types:"@strands.gg/auth-nuxt"})})}});module.exports=s;
1
+ "use strict";const t=require("@nuxt/kit");var n="undefined"!=typeof document?document.currentScript:null;const r=t.defineNuxtModule({meta:{name:"@strands.gg/accui/nuxt",configKey:"strandsAuth",compatibility:{nuxt:"^3.0.0"}},defaults:{baseUrl:"https://your-api.example.com",accentColor:"#EA00A8",redirectUrl:"/",onSignInUrl:"/dashboard",onSignOutUrl:"/",autoRefresh:1,refreshInterval:4,protectedRoutes:[],guestOnlyRoutes:["/auth","/login","/register"],devMode:0,styles:1,supportEmail:"",oauth2RedirectUrl:""},async setup(r,s){const a=t.createResolver("undefined"==typeof document?require("url").pathToFileURL(__filename).href:n&&"SCRIPT"===n.tagName.toUpperCase()&&n.src||new URL("nuxt/module.cjs.js",document.baseURI).href);if(s.options.runtimeConfig.public=s.options.runtimeConfig.public||{},s.options.runtimeConfig.public.strandsAuth={...r,styles:0!=r.styles},0!=r.styles&&s.options.css.push("@strands.gg/accui/style.css"),r.accentColor&&"#EA00A8"!==r.accentColor){const t=r.accentColor,n=`\n :root {\n --strands-accent: ${t} !important;\n --accui-strands-accent: ${t} !important;\n --accui-strands-50: color-mix(in srgb, ${t} 10%, white) !important;\n --accui-strands-100: color-mix(in srgb, ${t} 20%, white) !important;\n --accui-strands-200: color-mix(in srgb, ${t} 30%, white) !important;\n --accui-strands-300: color-mix(in srgb, ${t} 40%, white) !important;\n --accui-strands-400: color-mix(in srgb, ${t} 70%, white) !important;\n --accui-strands-500: ${t} !important;\n --accui-strands-600: color-mix(in srgb, ${t} 85%, black) !important;\n --accui-strands-700: color-mix(in srgb, ${t} 70%, black) !important;\n --accui-strands-800: color-mix(in srgb, ${t} 55%, black) !important;\n --accui-strands-900: color-mix(in srgb, ${t} 40%, black) !important;\n --accui-strands-950: color-mix(in srgb, ${t} 25%, black) !important;\n }\n [data-theme="dark"] {\n --accui-strands-accent: ${t} !important;\n --accui-strands-50: color-mix(in srgb, ${t} 10%, white) !important;\n --accui-strands-100: color-mix(in srgb, ${t} 20%, white) !important;\n --accui-strands-200: color-mix(in srgb, ${t} 30%, white) !important;\n --accui-strands-300: color-mix(in srgb, ${t} 40%, white) !important;\n --accui-strands-400: color-mix(in srgb, ${t} 70%, white) !important;\n --accui-strands-500: ${t} !important;\n --accui-strands-600: color-mix(in srgb, ${t} 85%, black) !important;\n --accui-strands-700: color-mix(in srgb, ${t} 70%, black) !important;\n --accui-strands-800: color-mix(in srgb, ${t} 55%, black) !important;\n --accui-strands-900: color-mix(in srgb, ${t} 40%, black) !important;\n --accui-strands-950: color-mix(in srgb, ${t} 25%, black) !important;\n }\n `;s.options.app.head=s.options.app.head||{},s.options.app.head.style=s.options.app.head.style||[],s.options.app.head.style.unshift({children:n,type:"text/css",key:"strands-accent-override"})}const i="es.js";t.addPlugin({src:a.resolve(`./runtime/plugin.client.${i}`),mode:"client"}),t.addPlugin({src:a.resolve(`./runtime/plugin.server.${i}`),mode:"server"}),t.addPlugin({src:a.resolve(`./runtime/plugins/auth-interceptor.client.${i}`),mode:"client"}),t.addRouteMiddleware({name:"auth",path:a.resolve(`./runtime/middleware/auth.global.${i}`),global:1}),s.hook("pages:extend",t=>{}),t.addImports([{name:"useStrandsAuth",as:"useStrandsAuth",from:a.resolve(`./runtime/composables/useStrandsAuth.${i}`)},{name:"useAuthUser",as:"useAuthUser",from:a.resolve(`./runtime/composables/useStrandsAuth.${i}`)},{name:"useAuthState",as:"useAuthState",from:a.resolve(`./runtime/composables/useStrandsAuth.${i}`)},{name:"useAuthenticatedFetch",as:"useAuthenticatedFetch",from:a.resolve(`./runtime/composables/useAuthenticatedFetch.${i}`)}]);const e=["StrandsAuth","StrandsSignIn","StrandsSignUp","StrandsCompleteSignUp","StrandsUserProfile","StrandsUserButton","StrandsPasswordReset","StrandsMFASetup","StrandsConfigProvider","SignedIn","SignedOut","StrandsLogo","StrandsSecuredFooter","StrandsUiAlert","StrandsUiButton","StrandsUiCard","StrandsUiInput","StrandsUiLink","StrandsUiTabs","StrandsUiLoader"];for(const n of e)t.addComponent({name:n,export:n,filePath:"@strands.gg/accui"});s.hook("prepare:types",t=>{t.references.push({types:"@strands.gg/auth-nuxt"})})}});module.exports=r;
@@ -33,6 +33,47 @@ const module = defineNuxtModule({
33
33
  if (options.styles !== false) {
34
34
  nuxt.options.css.push("@strands.gg/accui/style.css");
35
35
  }
36
+ if (options.accentColor && options.accentColor !== "#EA00A8") {
37
+ const accentColor = options.accentColor;
38
+ const cssVariables = `
39
+ :root {
40
+ --strands-accent: ${accentColor} !important;
41
+ --accui-strands-accent: ${accentColor} !important;
42
+ --accui-strands-50: color-mix(in srgb, ${accentColor} 10%, white) !important;
43
+ --accui-strands-100: color-mix(in srgb, ${accentColor} 20%, white) !important;
44
+ --accui-strands-200: color-mix(in srgb, ${accentColor} 30%, white) !important;
45
+ --accui-strands-300: color-mix(in srgb, ${accentColor} 40%, white) !important;
46
+ --accui-strands-400: color-mix(in srgb, ${accentColor} 70%, white) !important;
47
+ --accui-strands-500: ${accentColor} !important;
48
+ --accui-strands-600: color-mix(in srgb, ${accentColor} 85%, black) !important;
49
+ --accui-strands-700: color-mix(in srgb, ${accentColor} 70%, black) !important;
50
+ --accui-strands-800: color-mix(in srgb, ${accentColor} 55%, black) !important;
51
+ --accui-strands-900: color-mix(in srgb, ${accentColor} 40%, black) !important;
52
+ --accui-strands-950: color-mix(in srgb, ${accentColor} 25%, black) !important;
53
+ }
54
+ [data-theme="dark"] {
55
+ --accui-strands-accent: ${accentColor} !important;
56
+ --accui-strands-50: color-mix(in srgb, ${accentColor} 10%, white) !important;
57
+ --accui-strands-100: color-mix(in srgb, ${accentColor} 20%, white) !important;
58
+ --accui-strands-200: color-mix(in srgb, ${accentColor} 30%, white) !important;
59
+ --accui-strands-300: color-mix(in srgb, ${accentColor} 40%, white) !important;
60
+ --accui-strands-400: color-mix(in srgb, ${accentColor} 70%, white) !important;
61
+ --accui-strands-500: ${accentColor} !important;
62
+ --accui-strands-600: color-mix(in srgb, ${accentColor} 85%, black) !important;
63
+ --accui-strands-700: color-mix(in srgb, ${accentColor} 70%, black) !important;
64
+ --accui-strands-800: color-mix(in srgb, ${accentColor} 55%, black) !important;
65
+ --accui-strands-900: color-mix(in srgb, ${accentColor} 40%, black) !important;
66
+ --accui-strands-950: color-mix(in srgb, ${accentColor} 25%, black) !important;
67
+ }
68
+ `;
69
+ nuxt.options.app.head = nuxt.options.app.head || {};
70
+ nuxt.options.app.head.style = nuxt.options.app.head.style || [];
71
+ nuxt.options.app.head.style.unshift({
72
+ children: cssVariables,
73
+ type: "text/css",
74
+ key: "strands-accent-override"
75
+ });
76
+ }
36
77
  const ext = "es.js";
37
78
  addPlugin({
38
79
  src: resolver.resolve(`./runtime/plugin.client.${ext}`),
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("nuxt/app"),s=require("../../../useStrandsAuth-s1xHo4S-.cjs.js"),a=()=>{const a=t.useRuntimeConfig().public.strandsAuth,e=s.useStrandsAuth();return{...e,initialize:async()=>{await e.initialize()},signIn:async s=>{const i=await e.signIn(s);return i&&a.onSignInUrl&&await t.navigateTo(a.onSignInUrl),i},signUp:async t=>await e.signUp({email:t.email,password:"",firstName:"",lastName:""}),signOut:async()=>{await e.signOut(),a.onSignOutUrl&&await t.navigateTo(a.onSignOutUrl)}}};exports.useAuthState=()=>{const{isAuthenticated:t,isLoading:s}=a();return{isAuthenticated:t,isLoading:s}},exports.useAuthUser=()=>{const{user:t}=a();return{user:t}},exports.useStrandsAuth=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("nuxt/app"),s=require("../../../useStrandsAuth-C4UY4aTP.cjs.js"),a=()=>{const a=t.useRuntimeConfig().public.strandsAuth,e=s.useStrandsAuth();return{...e,initialize:async()=>{await e.initialize()},signIn:async s=>{const i=await e.signIn(s);return i&&a.onSignInUrl&&await t.navigateTo(a.onSignInUrl),i},signUp:async t=>await e.signUp({email:t.email,password:"",firstName:"",lastName:""}),signOut:async()=>{await e.signOut(),a.onSignOutUrl&&await t.navigateTo(a.onSignOutUrl)}}};exports.useAuthState=()=>{const{isAuthenticated:t,isLoading:s}=a();return{isAuthenticated:t,isLoading:s}},exports.useAuthUser=()=>{const{user:t}=a();return{user:t}},exports.useStrandsAuth=a;
@@ -1,5 +1,5 @@
1
1
  import { useRuntimeConfig, navigateTo } from "nuxt/app";
2
- import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-Ce_6sRDL.es.js";
2
+ import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-B91u7n_t.es.js";
3
3
  const useStrandsAuth = () => {
4
4
  const config = useRuntimeConfig().public["strandsAuth"];
5
5
  const vueAuth = useStrandsAuth$1();
@@ -1 +1 @@
1
- "use strict";const e=require("nuxt/app"),s=require("../../useStrandsConfig-CzIbm2Z6.cjs.js"),n=e.defineNuxtPlugin({name:"strands-auth-client",async setup(){const n=e.useRuntimeConfig().public.strandsAuth,t={...s.STRANDS_AUTH_DEFAULTS,...n};s.setStrandsConfig(t),"undefined"!=typeof window&&(window.__STRANDS_CONFIG__=t),t?.accentColor&&"undefined"!=typeof window&&document.documentElement.style.setProperty("--strands-accent",t.accentColor);const{useStrandsAuth:i}=await Promise.resolve().then(()=>require("./composables/useStrandsAuth.cjs.js")),{initialize:a}=i();await a()}});module.exports=n;
1
+ "use strict";const e=require("nuxt/app"),s=require("../../useStrandsConfig-B6uW6Zkd.cjs.js"),n=e.defineNuxtPlugin({name:"strands-auth-client",async setup(){const n=e.useRuntimeConfig().public.strandsAuth,t={...s.STRANDS_AUTH_DEFAULTS,...n};s.setStrandsConfig(t),"undefined"!=typeof window&&(window.__STRANDS_CONFIG__=t),t?.accentColor&&"undefined"!=typeof window&&document.documentElement.style.setProperty("--strands-accent",t.accentColor);const{useStrandsAuth:i}=await Promise.resolve().then(()=>require("./composables/useStrandsAuth.cjs.js")),{initialize:a}=i();await a()}});module.exports=n;
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
2
- import { s as setStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-Dkr8gpzR.es.js";
2
+ import { s as setStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-C3gBJK6y.es.js";
3
3
  const plugin_client = defineNuxtPlugin({
4
4
  name: "strands-auth-client",
5
5
  async setup() {
@@ -1 +1 @@
1
- "use strict";const s=require("nuxt/app"),e=require("../../useStrandsConfig-CzIbm2Z6.cjs.js"),r=s.defineNuxtPlugin({name:"strands-auth-server",setup(){const r=s.useRuntimeConfig().public.strandsAuth,t={...e.STRANDS_AUTH_DEFAULTS,...r};e.setStrandsConfig(t)}});module.exports=r;
1
+ "use strict";const s=require("nuxt/app"),e=require("../../useStrandsConfig-B6uW6Zkd.cjs.js"),r=s.defineNuxtPlugin({name:"strands-auth-server",setup(){const r=s.useRuntimeConfig().public.strandsAuth,t={...e.STRANDS_AUTH_DEFAULTS,...r};e.setStrandsConfig(t)}});module.exports=r;
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
2
- import { s as setStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-Dkr8gpzR.es.js";
2
+ import { s as setStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-C3gBJK6y.es.js";
3
3
  const plugin_server = defineNuxtPlugin({
4
4
  name: "strands-auth-server",
5
5
  setup() {
@@ -1 +1 @@
1
- "use strict";const t=require("@nuxt/kit");var e="undefined"!=typeof document?document.currentScript:null;const s=t.defineNuxtModule({meta:{name:"@strands.gg/accui/nuxt-v4",configKey:"strandsAuth",compatibility:{nuxt:"^4.0.0"}},defaults:{baseUrl:"https://your-api.example.com",accentColor:"#EA00A8",redirectUrl:"/",onSignInUrl:"/dashboard",onSignOutUrl:"/",autoRefresh:1,refreshInterval:4,protectedRoutes:[],guestOnlyRoutes:["/auth","/login","/register"],devMode:0,styles:1,supportEmail:"",oauth2RedirectUrl:""},async setup(s,n){const r=t.createResolver("undefined"==typeof document?require("url").pathToFileURL(__filename).href:e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("nuxt-v4/module.cjs.js",document.baseURI).href);n.options.runtimeConfig.public=n.options.runtimeConfig.public||{};const u={...s,styles:0!=s.styles};n.options.runtimeConfig.public.strandsAuth=u,n.options.appConfig.strandsAuth=u,0!=s.styles&&n.options.css.push("@strands.gg/accui/style.css");const a="es.js",o=r.resolve(`./runtime/plugin.client.${a}`),d=r.resolve(`./runtime/plugin.server.${a}`),i=r.resolve(`./runtime/middleware/auth.global.${a}`);t.addPlugin({src:o,mode:"client"}),t.addPlugin({src:d,mode:"server"}),t.addPlugin({src:r.resolve(`./runtime/plugins/auth-interceptor.client.${a}`),mode:"client"}),t.addRouteMiddleware({name:"auth",path:i,global:1}),t.addImports([{name:"useStrandsAuth",as:"useStrandsAuth",from:r.resolve(`./runtime/composables/useStrandsAuth.${a}`)},{name:"useAuthUser",as:"useAuthUser",from:r.resolve(`./runtime/composables/useStrandsAuth.${a}`)},{name:"useAuthState",as:"useAuthState",from:r.resolve(`./runtime/composables/useStrandsAuth.${a}`)},{name:"useAuthenticatedFetch",as:"useAuthenticatedFetch",from:r.resolve(`./runtime/composables/useAuthenticatedFetch.${a}`)}]);const c=["StrandsAuth","StrandsSignIn","StrandsSignUp","StrandsCompleteSignUp","StrandsUserProfile","StrandsUserButton","StrandsPasswordReset","StrandsMFASetup","StrandsConfigProvider","SignedIn","SignedOut","StrandsLogo","StrandsSecuredFooter","StrandsUiAlert","StrandsUiButton","StrandsUiCard","StrandsUiInput","StrandsUiLink","StrandsUiTabs","StrandsUiLoader"];for(const e of c)t.addComponent({name:e,export:e,filePath:"@strands.gg/accui"});n.hook("prepare:types",t=>{t.references.push({types:"@strands.gg/auth-nuxt-v4"}),t.declarations.push(`\n declare global {\n const useStrandsAuth: typeof import('${r.resolve("./runtime/composables/useStrandsAuth.d.ts")}')['useStrandsAuth']\n const useAuthUser: typeof import('${r.resolve("./runtime/composables/useStrandsAuth.d.ts")}')['useAuthUser']\n const useAuthState: typeof import('${r.resolve("./runtime/composables/useStrandsAuth.d.ts")}')['useAuthState']\n }\n `)})}});module.exports=s;
1
+ "use strict";const t=require("@nuxt/kit");var n="undefined"!=typeof document?document.currentScript:null;const s=t.defineNuxtModule({meta:{name:"@strands.gg/accui/nuxt-v4",configKey:"strandsAuth",compatibility:{nuxt:"^4.0.0"}},defaults:{baseUrl:"https://your-api.example.com",accentColor:"#EA00A8",redirectUrl:"/",onSignInUrl:"/dashboard",onSignOutUrl:"/",autoRefresh:1,refreshInterval:4,protectedRoutes:[],guestOnlyRoutes:["/auth","/login","/register"],devMode:0,styles:1,supportEmail:"",oauth2RedirectUrl:""},async setup(s,r){const a=t.createResolver("undefined"==typeof document?require("url").pathToFileURL(__filename).href:n&&"SCRIPT"===n.tagName.toUpperCase()&&n.src||new URL("nuxt-v4/module.cjs.js",document.baseURI).href);r.options.runtimeConfig.public=r.options.runtimeConfig.public||{};const e={...s,styles:0!=s.styles};if(r.options.runtimeConfig.public.strandsAuth=e,r.options.appConfig.strandsAuth=e,0!=s.styles&&r.options.css.push("@strands.gg/accui/style.css"),s.accentColor&&"#EA00A8"!==s.accentColor){const t=s.accentColor,n=`\n :root {\n --strands-accent: ${t} !important;\n --accui-strands-accent: ${t} !important;\n --accui-strands-50: color-mix(in srgb, ${t} 10%, white) !important;\n --accui-strands-100: color-mix(in srgb, ${t} 20%, white) !important;\n --accui-strands-200: color-mix(in srgb, ${t} 30%, white) !important;\n --accui-strands-300: color-mix(in srgb, ${t} 40%, white) !important;\n --accui-strands-400: color-mix(in srgb, ${t} 70%, white) !important;\n --accui-strands-500: ${t} !important;\n --accui-strands-600: color-mix(in srgb, ${t} 85%, black) !important;\n --accui-strands-700: color-mix(in srgb, ${t} 70%, black) !important;\n --accui-strands-800: color-mix(in srgb, ${t} 55%, black) !important;\n --accui-strands-900: color-mix(in srgb, ${t} 40%, black) !important;\n --accui-strands-950: color-mix(in srgb, ${t} 25%, black) !important;\n }\n [data-theme="dark"] {\n --accui-strands-accent: ${t} !important;\n --accui-strands-50: color-mix(in srgb, ${t} 10%, white) !important;\n --accui-strands-100: color-mix(in srgb, ${t} 20%, white) !important;\n --accui-strands-200: color-mix(in srgb, ${t} 30%, white) !important;\n --accui-strands-300: color-mix(in srgb, ${t} 40%, white) !important;\n --accui-strands-400: color-mix(in srgb, ${t} 70%, white) !important;\n --accui-strands-500: ${t} !important;\n --accui-strands-600: color-mix(in srgb, ${t} 85%, black) !important;\n --accui-strands-700: color-mix(in srgb, ${t} 70%, black) !important;\n --accui-strands-800: color-mix(in srgb, ${t} 55%, black) !important;\n --accui-strands-900: color-mix(in srgb, ${t} 40%, black) !important;\n --accui-strands-950: color-mix(in srgb, ${t} 25%, black) !important;\n }\n `;r.options.app.head=r.options.app.head||{},r.options.app.head.style=r.options.app.head.style||[],r.options.app.head.style.unshift({children:n,type:"text/css",key:"strands-accent-override"})}const i="es.js",o=a.resolve(`./runtime/plugin.client.${i}`),c=a.resolve(`./runtime/plugin.server.${i}`),u=a.resolve(`./runtime/middleware/auth.global.${i}`);t.addPlugin({src:o,mode:"client"}),t.addPlugin({src:c,mode:"server"}),t.addPlugin({src:a.resolve(`./runtime/plugins/auth-interceptor.client.${i}`),mode:"client"}),t.addRouteMiddleware({name:"auth",path:u,global:1}),t.addImports([{name:"useStrandsAuth",as:"useStrandsAuth",from:a.resolve(`./runtime/composables/useStrandsAuth.${i}`)},{name:"useAuthUser",as:"useAuthUser",from:a.resolve(`./runtime/composables/useStrandsAuth.${i}`)},{name:"useAuthState",as:"useAuthState",from:a.resolve(`./runtime/composables/useStrandsAuth.${i}`)},{name:"useAuthenticatedFetch",as:"useAuthenticatedFetch",from:a.resolve(`./runtime/composables/useAuthenticatedFetch.${i}`)}]);const d=["StrandsAuth","StrandsSignIn","StrandsSignUp","StrandsCompleteSignUp","StrandsUserProfile","StrandsUserButton","StrandsPasswordReset","StrandsMFASetup","StrandsConfigProvider","SignedIn","SignedOut","StrandsLogo","StrandsSecuredFooter","StrandsUiAlert","StrandsUiButton","StrandsUiCard","StrandsUiInput","StrandsUiLink","StrandsUiTabs","StrandsUiLoader"];for(const n of d)t.addComponent({name:n,export:n,filePath:"@strands.gg/accui"});r.hook("prepare:types",t=>{t.references.push({types:"@strands.gg/auth-nuxt-v4"}),t.declarations.push(`\n declare global {\n const useStrandsAuth: typeof import('${a.resolve("./runtime/composables/useStrandsAuth.d.ts")}')['useStrandsAuth']\n const useAuthUser: typeof import('${a.resolve("./runtime/composables/useStrandsAuth.d.ts")}')['useAuthUser']\n const useAuthState: typeof import('${a.resolve("./runtime/composables/useStrandsAuth.d.ts")}')['useAuthState']\n }\n `)})}});module.exports=s;
@@ -35,6 +35,47 @@ const module = defineNuxtModule({
35
35
  if (options.styles !== false) {
36
36
  nuxt.options.css.push("@strands.gg/accui/style.css");
37
37
  }
38
+ if (options.accentColor && options.accentColor !== "#EA00A8") {
39
+ const accentColor = options.accentColor;
40
+ const cssVariables = `
41
+ :root {
42
+ --strands-accent: ${accentColor} !important;
43
+ --accui-strands-accent: ${accentColor} !important;
44
+ --accui-strands-50: color-mix(in srgb, ${accentColor} 10%, white) !important;
45
+ --accui-strands-100: color-mix(in srgb, ${accentColor} 20%, white) !important;
46
+ --accui-strands-200: color-mix(in srgb, ${accentColor} 30%, white) !important;
47
+ --accui-strands-300: color-mix(in srgb, ${accentColor} 40%, white) !important;
48
+ --accui-strands-400: color-mix(in srgb, ${accentColor} 70%, white) !important;
49
+ --accui-strands-500: ${accentColor} !important;
50
+ --accui-strands-600: color-mix(in srgb, ${accentColor} 85%, black) !important;
51
+ --accui-strands-700: color-mix(in srgb, ${accentColor} 70%, black) !important;
52
+ --accui-strands-800: color-mix(in srgb, ${accentColor} 55%, black) !important;
53
+ --accui-strands-900: color-mix(in srgb, ${accentColor} 40%, black) !important;
54
+ --accui-strands-950: color-mix(in srgb, ${accentColor} 25%, black) !important;
55
+ }
56
+ [data-theme="dark"] {
57
+ --accui-strands-accent: ${accentColor} !important;
58
+ --accui-strands-50: color-mix(in srgb, ${accentColor} 10%, white) !important;
59
+ --accui-strands-100: color-mix(in srgb, ${accentColor} 20%, white) !important;
60
+ --accui-strands-200: color-mix(in srgb, ${accentColor} 30%, white) !important;
61
+ --accui-strands-300: color-mix(in srgb, ${accentColor} 40%, white) !important;
62
+ --accui-strands-400: color-mix(in srgb, ${accentColor} 70%, white) !important;
63
+ --accui-strands-500: ${accentColor} !important;
64
+ --accui-strands-600: color-mix(in srgb, ${accentColor} 85%, black) !important;
65
+ --accui-strands-700: color-mix(in srgb, ${accentColor} 70%, black) !important;
66
+ --accui-strands-800: color-mix(in srgb, ${accentColor} 55%, black) !important;
67
+ --accui-strands-900: color-mix(in srgb, ${accentColor} 40%, black) !important;
68
+ --accui-strands-950: color-mix(in srgb, ${accentColor} 25%, black) !important;
69
+ }
70
+ `;
71
+ nuxt.options.app.head = nuxt.options.app.head || {};
72
+ nuxt.options.app.head.style = nuxt.options.app.head.style || [];
73
+ nuxt.options.app.head.style.unshift({
74
+ children: cssVariables,
75
+ type: "text/css",
76
+ key: "strands-accent-override"
77
+ });
78
+ }
38
79
  const ext = "es.js";
39
80
  const clientPluginPath = resolver.resolve(`./runtime/plugin.client.${ext}`);
40
81
  const serverPluginPath = resolver.resolve(`./runtime/plugin.server.${ext}`);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("nuxt/app"),e=require("../../../useStrandsAuth-s1xHo4S-.cjs.js"),s=()=>{const s=t.useRuntimeConfig().public.strandsAuth,a=e.useStrandsAuth();return{user:a.user,currentUser:a.currentUser,currentSession:a.currentSession,isAuthenticated:a.isAuthenticated,isLoading:a.isLoading,loading:a.loading,signIn:async e=>{const i=await a.signIn(e);return i&&s.onSignInUrl&&await t.navigateTo(s.onSignInUrl),i},signUp:async t=>await a.signUp({email:t.email,password:"",firstName:"",lastName:""}),signOut:async()=>{await a.signOut(),s.onSignOutUrl&&await t.navigateTo(s.onSignOutUrl)},refreshToken:a.refreshToken,updateProfile:a.updateProfile,setAuthData:a.setAuthData,getAuthHeaders:a.getAuthHeaders,initialize:async()=>{try{await a.initialize()}catch(t){}}}};exports.useAuthState=()=>{const{isAuthenticated:t,isLoading:e}=s();return{isAuthenticated:t,isLoading:e}},exports.useAuthUser=()=>{const{user:t}=s();return{user:t}},exports.useStrandsAuth=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("nuxt/app"),e=require("../../../useStrandsAuth-C4UY4aTP.cjs.js"),s=()=>{const s=t.useRuntimeConfig().public.strandsAuth,a=e.useStrandsAuth();return{user:a.user,currentUser:a.currentUser,currentSession:a.currentSession,isAuthenticated:a.isAuthenticated,isLoading:a.isLoading,loading:a.loading,signIn:async e=>{const i=await a.signIn(e);return i&&s.onSignInUrl&&await t.navigateTo(s.onSignInUrl),i},signUp:async t=>await a.signUp({email:t.email,password:"",firstName:"",lastName:""}),signOut:async()=>{await a.signOut(),s.onSignOutUrl&&await t.navigateTo(s.onSignOutUrl)},refreshToken:a.refreshToken,updateProfile:a.updateProfile,setAuthData:a.setAuthData,getAuthHeaders:a.getAuthHeaders,initialize:async()=>{try{await a.initialize()}catch(t){}}}};exports.useAuthState=()=>{const{isAuthenticated:t,isLoading:e}=s();return{isAuthenticated:t,isLoading:e}},exports.useAuthUser=()=>{const{user:t}=s();return{user:t}},exports.useStrandsAuth=s;
@@ -1,5 +1,5 @@
1
1
  import { useRuntimeConfig, navigateTo } from "nuxt/app";
2
- import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-Ce_6sRDL.es.js";
2
+ import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-B91u7n_t.es.js";
3
3
  const useStrandsAuth = () => {
4
4
  const config = useRuntimeConfig().public["strandsAuth"];
5
5
  const vueAuth = useStrandsAuth$1();
@@ -1 +1 @@
1
- "use strict";const e=require("nuxt/app"),s=require("../../useStrandsConfig-CzIbm2Z6.cjs.js"),n=e.defineNuxtPlugin({name:"strands-auth-client-v4",async setup(){const n=e.useRuntimeConfig().public.strandsAuth,t={...s.STRANDS_AUTH_DEFAULTS,...n};s.setStrandsConfig(t),"undefined"!=typeof window&&(window.__STRANDS_CONFIG__=t),t?.accentColor&&"undefined"!=typeof window&&document.documentElement.style.setProperty("--strands-accent",t.accentColor);const{useStrandsAuth:i}=await Promise.resolve().then(()=>require("./composables/useStrandsAuth.cjs.js")),{initialize:a}=i();await a()}});module.exports=n;
1
+ "use strict";const e=require("nuxt/app"),s=require("../../useStrandsConfig-B6uW6Zkd.cjs.js"),n=e.defineNuxtPlugin({name:"strands-auth-client-v4",async setup(){const n=e.useRuntimeConfig().public.strandsAuth,t={...s.STRANDS_AUTH_DEFAULTS,...n};s.setStrandsConfig(t),"undefined"!=typeof window&&(window.__STRANDS_CONFIG__=t),t?.accentColor&&"undefined"!=typeof window&&document.documentElement.style.setProperty("--strands-accent",t.accentColor);const{useStrandsAuth:i}=await Promise.resolve().then(()=>require("./composables/useStrandsAuth.cjs.js")),{initialize:a}=i();await a()}});module.exports=n;
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
2
- import { s as setStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-Dkr8gpzR.es.js";
2
+ import { s as setStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-C3gBJK6y.es.js";
3
3
  const plugin_client = defineNuxtPlugin({
4
4
  name: "strands-auth-client-v4",
5
5
  async setup() {
@@ -1 +1 @@
1
- "use strict";const s=require("nuxt/app"),e=require("../../useStrandsConfig-CzIbm2Z6.cjs.js"),t=s.defineNuxtPlugin({name:"strands-auth-server-v4",setup(){try{const t=s.useRuntimeConfig(),r=t.public?.strandsAuth,u={...e.STRANDS_AUTH_DEFAULTS,...r||{}};e.setStrandsConfig(u)}catch(t){e.setStrandsConfig(e.STRANDS_AUTH_DEFAULTS)}}});module.exports=t;
1
+ "use strict";const s=require("nuxt/app"),e=require("../../useStrandsConfig-B6uW6Zkd.cjs.js"),t=s.defineNuxtPlugin({name:"strands-auth-server-v4",setup(){try{const t=s.useRuntimeConfig(),r=t.public?.strandsAuth,u={...e.STRANDS_AUTH_DEFAULTS,...r||{}};e.setStrandsConfig(u)}catch(t){e.setStrandsConfig(e.STRANDS_AUTH_DEFAULTS)}}});module.exports=t;
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
2
- import { s as setStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-Dkr8gpzR.es.js";
2
+ import { s as setStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-C3gBJK6y.es.js";
3
3
  const plugin_server = defineNuxtPlugin({
4
4
  name: "strands-auth-server-v4",
5
5
  setup() {