@strands.gg/accui 2.6.0 → 2.6.1

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.
@@ -458,7 +458,14 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
458
458
  },
459
459
  emits: ["click"],
460
460
  setup(__props, { emit: __emit }) {
461
- const NuxtLinkComponent = resolveComponent("NuxtLink");
461
+ const NuxtLinkComponent = computed(() => {
462
+ try {
463
+ const component = resolveComponent("NuxtLink");
464
+ return typeof component === "string" ? "a" : component;
465
+ } catch (error) {
466
+ return "a";
467
+ }
468
+ });
462
469
  const props = __props;
463
470
  const emit = __emit;
464
471
  const handleLinkClick = (event) => {
@@ -469,8 +476,9 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
469
476
  emit("click", event);
470
477
  };
471
478
  return (_ctx, _cache) => {
472
- return openBlock(), createBlock(resolveDynamicComponent(unref(NuxtLinkComponent)), {
473
- to: _ctx.to,
479
+ return openBlock(), createBlock(resolveDynamicComponent(NuxtLinkComponent.value), {
480
+ to: NuxtLinkComponent.value === "a" ? void 0 : _ctx.to,
481
+ href: NuxtLinkComponent.value === "a" ? typeof _ctx.to === "string" ? _ctx.to : "/" : void 0,
474
482
  class: normalizeClass(_ctx.buttonClasses),
475
483
  style: normalizeStyle(_ctx.buttonStyles),
476
484
  onClick: handleLinkClick
@@ -497,7 +505,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
497
505
  }, 8, ["loading", "loading-text", "icon"])
498
506
  ]),
499
507
  _: 3
500
- }, 8, ["to", "class", "style"]);
508
+ }, 8, ["to", "href", "class", "style"]);
501
509
  };
502
510
  }
503
511
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strands.gg/accui",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "Strands Authentication UI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/strands-auth-ui.cjs.js",