@strands.gg/accui 2.9.1 → 2.9.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/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, provide, onMounted, onUnmounted, createElementBlock, openBlock, normalizeClass, createElementVNode, createBlock, renderSlot, Teleport, createCommentVNode, toDisplayString, createTextVNode, unref, normalizeStyle, useSlots, createVNode, Fragment as Fragment$1, withCtx, resolveComponent, resolveDynamicComponent, createSlots, useAttrs, h as h$1, ref, nextTick, withModifiers, renderList, watch, toRefs, withDirectives, vModelSelect, getCurrentInstance, watchEffect, onBeforeUnmount, shallowRef, markRaw, customRef, useCssVars, mergeProps, reactive, createStaticVNode, vModelText, Transition, inject, withKeys, isMemoSame } from "vue";
1
+ import { defineComponent, computed, provide, onMounted, onUnmounted, createElementBlock, openBlock, normalizeClass, createElementVNode, createBlock, renderSlot, Teleport, createCommentVNode, toDisplayString, createTextVNode, unref, normalizeStyle, useSlots, createVNode, Fragment as Fragment$1, withCtx, getCurrentInstance, resolveDynamicComponent, resolveComponent, createSlots, useAttrs, h as h$1, ref, nextTick, withModifiers, renderList, watch, toRefs, withDirectives, vModelSelect, watchEffect, onBeforeUnmount, shallowRef, markRaw, customRef, useCssVars, mergeProps, reactive, createStaticVNode, vModelText, Transition, inject, withKeys, isMemoSame } from "vue";
2
2
  import { u as useStrandsConfig, p as provideStrandsConfig } from "./useStrandsConfig-XmPqJn_B.es.js";
3
3
  import { s } from "./useStrandsConfig-XmPqJn_B.es.js";
4
4
  import { u as useStrandsAuth } from "./useStrandsAuth-Xz8lnhv7.es.js";
@@ -471,13 +471,17 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
471
471
  },
472
472
  emits: ["click"],
473
473
  setup(__props, { emit: __emit }) {
474
+ const instance = getCurrentInstance();
474
475
  const NuxtLinkComponent = computed(() => {
475
- try {
476
- const component = resolveComponent("NuxtLink");
477
- return typeof component === "string" ? "a" : component;
478
- } catch (error) {
479
- return "a";
476
+ const nuxtLinkComponent = instance?.appContext.app.component("NuxtLink");
477
+ if (nuxtLinkComponent) {
478
+ return "NuxtLink";
479
+ }
480
+ const routerLinkComponent = instance?.appContext.app.component("RouterLink");
481
+ if (routerLinkComponent) {
482
+ return "RouterLink";
480
483
  }
484
+ return "a";
481
485
  });
482
486
  const props = __props;
483
487
  const emit = __emit;
@@ -490,7 +494,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
490
494
  };
491
495
  return (_ctx, _cache) => {
492
496
  return openBlock(), createBlock(resolveDynamicComponent(NuxtLinkComponent.value), {
493
- to: NuxtLinkComponent.value === "a" ? void 0 : _ctx.to,
497
+ to: NuxtLinkComponent.value !== "a" ? _ctx.to : void 0,
494
498
  href: NuxtLinkComponent.value === "a" ? typeof _ctx.to === "string" ? _ctx.to : "/" : void 0,
495
499
  class: normalizeClass(_ctx.buttonClasses),
496
500
  style: normalizeStyle(_ctx.buttonStyles),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strands.gg/accui",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
4
4
  "description": "Strands Authentication UI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",