@strands.gg/accui 2.11.33 → 2.11.35

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/README.md CHANGED
@@ -48,6 +48,75 @@ npm install @strands.gg/accui
48
48
 
49
49
  ## 🎯 Configuration
50
50
 
51
+ ### Vite + Vue 3 Configuration
52
+
53
+ **Option 1: Vite Plugin (Recommended)**
54
+
55
+ ```typescript
56
+ // vite.config.ts
57
+ import { defineConfig } from 'vite'
58
+ import vue from '@vitejs/plugin-vue'
59
+ import StrandsAuth from '@strands.gg/accui/vite'
60
+
61
+ export default defineConfig({
62
+ plugins: [
63
+ vue(),
64
+ StrandsAuth({
65
+ // API Configuration
66
+ baseUrl: 'http://localhost:8000',
67
+
68
+ // Theme Configuration
69
+ accentColor: '#EA00A8',
70
+ useSquircle: true,
71
+
72
+ // Auto-import styles (default: true)
73
+ styles: true,
74
+
75
+ // Navigation
76
+ onSignInUrl: '/dashboard',
77
+ onSignOutUrl: '/',
78
+
79
+ // Support
80
+ supportEmail: 'support@your-app.example.com',
81
+ })
82
+ ]
83
+ })
84
+ ```
85
+
86
+ ```typescript
87
+ // main.ts
88
+ import { createApp } from 'vue'
89
+ import { createStrandsAuth } from '@strands.gg/accui/vite'
90
+ import App from './App.vue'
91
+
92
+ const app = createApp(App)
93
+ app.use(createStrandsAuth())
94
+ app.mount('#app')
95
+ ```
96
+
97
+ **Option 2: Manual Configuration**
98
+
99
+ ```typescript
100
+ // main.ts
101
+ import { createApp } from 'vue'
102
+ import { setStrandsConfig } from '@strands.gg/accui'
103
+ import StrandsUIPlugin from '@strands.gg/accui/plugin'
104
+ import '@strands.gg/accui/style.css'
105
+ import App from './App.vue'
106
+
107
+ setStrandsConfig({
108
+ baseUrl: 'http://localhost:8000',
109
+ accentColor: '#EA00A8',
110
+ useSquircle: true,
111
+ })
112
+
113
+ const app = createApp(App)
114
+ app.use(StrandsUIPlugin)
115
+ app.mount('#app')
116
+ ```
117
+
118
+ See [VITE_PLUGIN.md](./VITE_PLUGIN.md) for full documentation.
119
+
51
120
  ### Nuxt 3/4 Configuration
52
121
 
53
122
  ```typescript
@@ -55,34 +124,34 @@ export default defineNuxtConfig({
55
124
  modules: [
56
125
  '@strands.gg/accui/nuxt', // Supports both Nuxt 3 and 4
57
126
  ],
58
-
127
+
59
128
  strandsAuth: {
60
129
  // API endpoint (required)
61
- baseUrl: process.env.NODE_ENV === 'development'
62
- ? 'http://localhost:8000'
130
+ baseUrl: process.env.NODE_ENV === 'development'
131
+ ? 'http://localhost:8000'
63
132
  : 'https://your-api.example.com',
64
-
133
+
65
134
  // Navigation
66
135
  onSignInUrl: '/dashboard',
67
136
  onSignOutUrl: '/',
68
-
137
+
69
138
  // OAuth2 configuration
70
139
  oauth2RedirectUrl: 'https://your-app.example.com/oauth2/callback', // Optional
71
-
140
+
72
141
  // Support
73
142
  supportEmail: 'support@your-app.example.com', // Optional
74
-
143
+
75
144
  // Development
76
145
  devMode: process.env.NODE_ENV === 'development',
77
-
146
+
78
147
  // Styling
79
148
  accentColor: '#EA00A8',
80
149
  styles: true, // Auto-import CSS
81
-
150
+
82
151
  // Security
83
152
  autoRefresh: true,
84
153
  refreshInterval: 4, // minutes
85
-
154
+
86
155
  // Route protection
87
156
  protectedRoutes: ['/dashboard/*', '/admin/*'],
88
157
  guestOnlyRoutes: ['/auth', '/login', '/register']