@strands.gg/accui 1.1.2 → 1.1.3

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.
Files changed (31) hide show
  1. package/dist/nuxt/runtime/composables/useStrandsAuth.cjs.js +1 -1
  2. package/dist/nuxt/runtime/composables/useStrandsAuth.es.js +1 -1
  3. package/dist/nuxt/runtime/plugin.client.cjs.js +1 -1
  4. package/dist/nuxt/runtime/plugin.client.es.js +1 -1
  5. package/dist/nuxt/runtime/plugin.server.cjs.js +1 -1
  6. package/dist/nuxt/runtime/plugin.server.es.js +1 -1
  7. package/dist/nuxt-v4/runtime/composables/useStrandsAuth.cjs.js +1 -1
  8. package/dist/nuxt-v4/runtime/composables/useStrandsAuth.es.js +1 -1
  9. package/dist/nuxt-v4/runtime/plugin.client.cjs.js +1 -1
  10. package/dist/nuxt-v4/runtime/plugin.client.es.js +1 -1
  11. package/dist/nuxt-v4/runtime/plugin.server.cjs.js +1 -1
  12. package/dist/nuxt-v4/runtime/plugin.server.es.js +1 -1
  13. package/dist/strands-auth-ui.cjs.js +8 -11
  14. package/dist/strands-auth-ui.cjs.js.map +1 -1
  15. package/dist/strands-auth-ui.es.js +9 -12
  16. package/dist/strands-auth-ui.es.js.map +1 -1
  17. package/dist/types/index.d.ts +1 -0
  18. package/dist/types/index.d.ts.map +1 -1
  19. package/dist/{useStrandsAuth-CZ7inSUU.js → useStrandsAuth-CQVn1lPb.js} +2 -2
  20. package/dist/{useStrandsAuth-CZ7inSUU.js.map → useStrandsAuth-CQVn1lPb.js.map} +1 -1
  21. package/dist/{useStrandsAuth-fa48rk-t.cjs → useStrandsAuth-DsgsSSDi.cjs} +2 -2
  22. package/dist/{useStrandsAuth-fa48rk-t.cjs.map → useStrandsAuth-DsgsSSDi.cjs.map} +1 -1
  23. package/dist/{useStrandsConfig-CtKyh8RT.cjs → useStrandsConfig-CjQTmiYi.cjs} +3 -1
  24. package/dist/useStrandsConfig-CjQTmiYi.cjs.map +1 -0
  25. package/dist/{useStrandsConfig-Cbpo8XZg.js → useStrandsConfig-EVnsLNNn.js} +3 -1
  26. package/dist/useStrandsConfig-EVnsLNNn.js.map +1 -0
  27. package/dist/vue/components/StrandsCompleteSignUp.vue.d.ts.map +1 -1
  28. package/dist/vue/composables/useStrandsConfig.d.ts.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/useStrandsConfig-Cbpo8XZg.js.map +0 -1
  31. package/dist/useStrandsConfig-CtKyh8RT.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const app = require("nuxt/app");
4
- const useStrandsAuth$1 = require("../../../useStrandsAuth-fa48rk-t.cjs");
4
+ const useStrandsAuth$1 = require("../../../useStrandsAuth-DsgsSSDi.cjs");
5
5
  const useStrandsAuth = () => {
6
6
  const config = app.useRuntimeConfig().public["strandsAuth"];
7
7
  const vueAuth = useStrandsAuth$1.useStrandsAuth();
@@ -1,5 +1,5 @@
1
1
  import { useRuntimeConfig, navigateTo } from "nuxt/app";
2
- import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-CZ7inSUU.js";
2
+ import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-CQVn1lPb.js";
3
3
  const useStrandsAuth = () => {
4
4
  const config = useRuntimeConfig().public["strandsAuth"];
5
5
  const vueAuth = useStrandsAuth$1();
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const app = require("nuxt/app");
3
- const useStrandsConfig = require("../../useStrandsConfig-CtKyh8RT.cjs");
3
+ const useStrandsConfig = require("../../useStrandsConfig-CjQTmiYi.cjs");
4
4
  const plugin_client = app.defineNuxtPlugin({
5
5
  name: "strands-auth-client",
6
6
  async setup() {
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
2
- import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-Cbpo8XZg.js";
2
+ import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-EVnsLNNn.js";
3
3
  const plugin_client = defineNuxtPlugin({
4
4
  name: "strands-auth-client",
5
5
  async setup() {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const app = require("nuxt/app");
3
- const useStrandsConfig = require("../../useStrandsConfig-CtKyh8RT.cjs");
3
+ const useStrandsConfig = require("../../useStrandsConfig-CjQTmiYi.cjs");
4
4
  const plugin_server = app.defineNuxtPlugin({
5
5
  name: "strands-auth-server",
6
6
  setup() {
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
2
- import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-Cbpo8XZg.js";
2
+ import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-EVnsLNNn.js";
3
3
  const plugin_server = defineNuxtPlugin({
4
4
  name: "strands-auth-server",
5
5
  setup() {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const app = require("nuxt/app");
4
- const useStrandsAuth$1 = require("../../../useStrandsAuth-fa48rk-t.cjs");
4
+ const useStrandsAuth$1 = require("../../../useStrandsAuth-DsgsSSDi.cjs");
5
5
  const useStrandsAuth = () => {
6
6
  const config = app.useRuntimeConfig().public["strandsAuth"];
7
7
  const vueAuth = useStrandsAuth$1.useStrandsAuth();
@@ -1,5 +1,5 @@
1
1
  import { useRuntimeConfig, navigateTo } from "nuxt/app";
2
- import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-CZ7inSUU.js";
2
+ import { u as useStrandsAuth$1 } from "../../../useStrandsAuth-CQVn1lPb.js";
3
3
  const useStrandsAuth = () => {
4
4
  const config = useRuntimeConfig().public["strandsAuth"];
5
5
  const vueAuth = useStrandsAuth$1();
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const app = require("nuxt/app");
3
- const useStrandsConfig = require("../../useStrandsConfig-CtKyh8RT.cjs");
3
+ const useStrandsConfig = require("../../useStrandsConfig-CjQTmiYi.cjs");
4
4
  const plugin_client = app.defineNuxtPlugin({
5
5
  name: "strands-auth-client-v4",
6
6
  async setup() {
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
2
- import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-Cbpo8XZg.js";
2
+ import { p as provideStrandsConfig, S as STRANDS_AUTH_DEFAULTS } from "../../useStrandsConfig-EVnsLNNn.js";
3
3
  const plugin_client = defineNuxtPlugin({
4
4
  name: "strands-auth-client-v4",
5
5
  async setup() {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const app = require("nuxt/app");
3
- const useStrandsConfig = require("../../useStrandsConfig-CtKyh8RT.cjs");
3
+ const useStrandsConfig = require("../../useStrandsConfig-CjQTmiYi.cjs");
4
4
  const plugin_server = app.defineNuxtPlugin({
5
5
  name: "strands-auth-server-v4",
6
6
  setup() {
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
2
- import { S as STRANDS_AUTH_DEFAULTS, p as provideStrandsConfig } from "../../useStrandsConfig-Cbpo8XZg.js";
2
+ import { S as STRANDS_AUTH_DEFAULTS, p as provideStrandsConfig } from "../../useStrandsConfig-EVnsLNNn.js";
3
3
  const plugin_server = defineNuxtPlugin({
4
4
  name: "strands-auth-server-v4",
5
5
  setup() {
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("vue");
4
- const useStrandsConfig = require("./useStrandsConfig-CtKyh8RT.cjs");
5
- const useStrandsAuth = require("./useStrandsAuth-fa48rk-t.cjs");
4
+ const useStrandsConfig = require("./useStrandsConfig-CjQTmiYi.cjs");
5
+ const useStrandsAuth = require("./useStrandsAuth-DsgsSSDi.cjs");
6
6
  const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
7
7
  __name: "UiAlert",
8
8
  props: {
@@ -3626,10 +3626,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
3626
3626
  }
3627
3627
  }
3628
3628
  );
3629
- const authConfig = vue.computed(() => ({
3630
- baseUrl: props.config?.baseUrl || "http://localhost:8000",
3631
- referrerUrl: props.redirectUrl || "http://localhost:3001"
3632
- }));
3629
+ const redirectUrl = vue.computed(() => props.redirectUrl || window.location.origin);
3633
3630
  vue.onMounted(() => {
3634
3631
  if (props.token) {
3635
3632
  try {
@@ -3646,9 +3643,9 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
3646
3643
  }
3647
3644
  });
3648
3645
  const redirectToReferrer = () => {
3649
- if (authConfig.value.referrerUrl) {
3650
- console.log("Redirecting to referrer:", authConfig.value.referrerUrl);
3651
- window.location.href = authConfig.value.referrerUrl;
3646
+ if (redirectUrl.value) {
3647
+ console.log("Redirecting to referrer:", redirectUrl.value);
3648
+ window.location.href = redirectUrl.value;
3652
3649
  }
3653
3650
  };
3654
3651
  const handleCompleteSignUp = async () => {
@@ -3666,7 +3663,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
3666
3663
  }
3667
3664
  loading2.value = true;
3668
3665
  try {
3669
- const response = await fetch(`${authConfig.value.baseUrl}/api/v1/auth/complete-registration`, {
3666
+ const response = await fetch(getUrl("completeRegistration"), {
3670
3667
  method: "POST",
3671
3668
  headers: {
3672
3669
  "Content-Type": "application/json"
@@ -3715,7 +3712,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
3715
3712
  loading2.value = false;
3716
3713
  }
3717
3714
  };
3718
- const __returned__ = { props, emit, getUrl, getSupportEmail, setAuthData, registrationComplete, invalidToken, loading: loading2, error, email, form, fieldErrors, isFormValid, authConfig, redirectToReferrer, handleCompleteSignUp, get StrandsUiCard() {
3715
+ const __returned__ = { props, emit, getUrl, getSupportEmail, setAuthData, registrationComplete, invalidToken, loading: loading2, error, email, form, fieldErrors, isFormValid, redirectUrl, redirectToReferrer, handleCompleteSignUp, get StrandsUiCard() {
3719
3716
  return StrandsUiCard;
3720
3717
  }, get StrandsUiButton() {
3721
3718
  return StrandsUiButton;