@strands.gg/accui 1.1.0 → 1.1.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.
package/README.md CHANGED
@@ -12,7 +12,7 @@ This library requires:
12
12
  - **Valid domain** registered with Strands Services
13
13
  - **Internal infrastructure** access
14
14
 
15
- **This package is published for internal convenience only and cannot be used by external applications.**
15
+ **This package is published for internal convenience only and cannot easily be used by external applications.**
16
16
 
17
17
  ## 🚀 Features (Internal Use Only)
18
18
 
@@ -62,17 +62,17 @@ export default defineNuxtConfig({
62
62
  // API endpoint (required)
63
63
  baseUrl: process.env.NODE_ENV === 'development'
64
64
  ? 'http://localhost:8000'
65
- : 'https://sessions.strands.gg',
65
+ : 'https://your-api.example.com',
66
66
 
67
67
  // Navigation
68
68
  onSignInUrl: '/dashboard',
69
69
  onSignOutUrl: '/',
70
70
 
71
71
  // OAuth2 configuration
72
- oauth2RedirectUrl: 'https://myapp.strands.gg/oauth2/callback', // Optional
72
+ oauth2RedirectUrl: 'https://your-app.example.com/oauth2/callback', // Optional
73
73
 
74
74
  // Support
75
- supportEmail: 'support@myapp.strands.gg', // Optional
75
+ supportEmail: 'support@your-app.example.com', // Optional
76
76
 
77
77
  // Development
78
78
  devMode: process.env.NODE_ENV === 'development',
@@ -90,17 +90,6 @@ export default defineNuxtConfig({
90
90
  guestOnlyRoutes: ['/auth', '/login', '/register']
91
91
  }
92
92
  })
93
- ```
94
-
95
- ### Required Backend Setup
96
-
97
- Your domain must be registered in our applications database:
98
-
99
- ```sql
100
- -- Applications are managed by Strands Services admins
101
- INSERT INTO applications (domain, name, logo_url)
102
- VALUES ('myapp.strands.gg', 'My App', 'https://myapp.strands.gg/logo.png');
103
- ```
104
93
 
105
94
  ## 🧩 Components
106
95
 
@@ -163,7 +152,7 @@ strandsAuth: {
163
152
  ## 🚨 Common Issues
164
153
 
165
154
  ### "Cannot connect to API"
166
- - Verify your domain is registered in applications table
155
+ - Verify your domain is registered with us
167
156
  - Check CORS is enabled for your origin
168
157
  - Ensure API is running (development: port 8000)
169
158
 
@@ -178,28 +167,19 @@ strandsAuth: {
178
167
 
179
168
  ## 🔧 Development Setup
180
169
 
181
- For local development of Strands applications:
170
+ For local development of Strands applications, configure your Nuxt app to use the development API endpoint:
182
171
 
183
- 1. Run the API locally:
184
- ```bash
185
- cd apps/accounts-api
186
- cargo run --bin accounts-api
187
- ```
188
-
189
- 2. Register your local domain:
190
- ```sql
191
- INSERT INTO applications (domain, name)
192
- VALUES ('localhost:3001', 'Local Dev');
193
- ```
194
-
195
- 3. Configure Nuxt:
196
172
  ```typescript
197
173
  strandsAuth: {
198
- baseUrl: 'http://localhost:8000',
174
+ baseUrl: process.env.NODE_ENV === 'development'
175
+ ? 'http://localhost:8000'
176
+ : 'https://your-api.example.com',
199
177
  devMode: true
200
178
  }
201
179
  ```
202
180
 
181
+ Contact the platform team to register your local development domain.
182
+
203
183
  ## 📋 TypeScript Types
204
184
 
205
185
  ```typescript
@@ -212,13 +192,10 @@ import type {
212
192
  } from '@strands.gg/accui'
213
193
  ```
214
194
 
215
- ## 🏗️ Infrastructure Requirements
195
+ ## 🏗️ Requirements
216
196
 
217
- - **Database**: PostgreSQL with migrations
218
- - **Cache**: Redis for sessions
219
- - **Email**: SMTP server for magic links
220
- - **Storage**: S3-compatible for avatars (optional)
221
- - **Domain**: Registered in applications table
197
+ - **Domain Registration**: Your application domain must be registered with Strands Services
198
+ - **HTTPS**: Required for production OAuth and hardware key authentication
222
199
 
223
200
  ## 📄 License
224
201
 
@@ -226,8 +203,4 @@ import type {
226
203
 
227
204
  This software is the proprietary property of Strands Services Limited and may only be used in accordance with the terms of your agreement with Strands Services.
228
205
 
229
- ---
230
-
231
- **Internal Support**: Contact the platform team via Slack #platform-support
232
-
233
- **External Inquiries**: This package is not available for external use. For partnership inquiries, contact business@strands.gg
206
+ ---
package/dist/accui.css CHANGED
@@ -454,9 +454,6 @@
454
454
  .inline-flex {
455
455
  display: inline-flex;
456
456
  }
457
- .table {
458
- display: table;
459
- }
460
457
  .h-3 {
461
458
  height: calc(var(--spacing) * 3);
462
459
  }
@@ -799,9 +796,6 @@
799
796
  .bg-red-400 {
800
797
  background-color: var(--color-red-400);
801
798
  }
802
- .bg-red-500 {
803
- background-color: var(--color-red-500);
804
- }
805
799
  .bg-strands-50 {
806
800
  background-color: var(--color-strands-50);
807
801
  }
@@ -1870,7 +1870,12 @@ function useOAuthProviders(options = {}) {
1870
1870
  const redirectUrl = options.redirectUrl || config.value?.oauth2RedirectUrl;
1871
1871
  if (redirectUrl) {
1872
1872
  const params = new URLSearchParams();
1873
- params.append("redirect_url", redirectUrl);
1873
+ let absoluteRedirectUrl = redirectUrl;
1874
+ if (redirectUrl.startsWith("/")) {
1875
+ const currentOrigin = window.location.origin;
1876
+ absoluteRedirectUrl = `${currentOrigin}${redirectUrl}`;
1877
+ }
1878
+ params.append("redirect_url", absoluteRedirectUrl);
1874
1879
  url = `${url}?${params.toString()}`;
1875
1880
  }
1876
1881
  const response = await fetch(url, {
@@ -1896,7 +1901,12 @@ function useOAuthProviders(options = {}) {
1896
1901
  const mergedOptions = { ...options, ...customOptions };
1897
1902
  const params = new URLSearchParams();
1898
1903
  if (mergedOptions.redirectUrl) {
1899
- params.append("redirect_url", mergedOptions.redirectUrl);
1904
+ let absoluteRedirectUrl = mergedOptions.redirectUrl;
1905
+ if (mergedOptions.redirectUrl.startsWith("/")) {
1906
+ const currentOrigin = window.location.origin;
1907
+ absoluteRedirectUrl = `${currentOrigin}${mergedOptions.redirectUrl}`;
1908
+ }
1909
+ params.append("redirect_url", absoluteRedirectUrl);
1900
1910
  }
1901
1911
  if (mergedOptions.scopes && mergedOptions.scopes.length > 0) {
1902
1912
  params.append("scopes", mergedOptions.scopes.join(","));
@@ -1977,7 +1987,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
1977
1987
  __name: "StrandsAuth",
1978
1988
  props: {
1979
1989
  mode: { type: String, required: false, default: "signin" },
1980
- redirectUrl: { type: String, required: false, default: "/" },
1990
+ redirectUrl: { type: String, required: false },
1981
1991
  config: { type: Object, required: false }
1982
1992
  },
1983
1993
  emits: ["success", "error", "forgot-password", "password-reset-sent", "mode-changed"],
@@ -2648,7 +2658,7 @@ const StrandsAuth = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_re
2648
2658
  const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2649
2659
  __name: "StrandsSignIn",
2650
2660
  props: {
2651
- redirectUrl: { type: String, required: false, default: "/" },
2661
+ redirectUrl: { type: String, required: false },
2652
2662
  oauthScopes: { type: Array, required: false, default: () => [] },
2653
2663
  config: { type: Object, required: false }
2654
2664
  },
@@ -3060,7 +3070,7 @@ const StrandsSignIn = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_
3060
3070
  const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
3061
3071
  __name: "StrandsSignUp",
3062
3072
  props: {
3063
- redirectUrl: { type: String, required: false, default: "/" },
3073
+ redirectUrl: { type: String, required: false },
3064
3074
  oauthScopes: { type: Array, required: false, default: () => [] },
3065
3075
  config: { type: Object, required: false }
3066
3076
  },
@@ -3563,7 +3573,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
3563
3573
  __name: "StrandsCompleteSignUp",
3564
3574
  props: {
3565
3575
  token: { type: String, required: false },
3566
- redirectUrl: { type: String, required: false, default: "/" },
3576
+ redirectUrl: { type: String, required: false },
3567
3577
  config: { type: Object, required: false }
3568
3578
  },
3569
3579
  emits: ["success", "error", "invalid-token", "request-new-link", "start-registration"],