@strands.gg/accui 2.14.0 → 2.14.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/{StrandsUIPlugin-tl7L52hZ.es.js → StrandsUIPlugin-CE4-QxEo.es.js} +2 -2
- package/dist/{StrandsUIPlugin-C9rrMU2i.cjs.js → StrandsUIPlugin-Dl-CMqkQ.cjs.js} +1 -1
- package/dist/accui.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +170 -140
- package/dist/vite.cjs.js +1 -1
- package/dist/vite.es.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _export_sfc, S as StrandsUiButton, U as UiButtonContent, a as _sfc_main$G, b as _sfc_main$H, c as _sfc_main$I, d as createLucideIcon, M as Minus, e as StrandsUiCard, f as UiTooltip, g as UiDivider, u as useFloatingPosition, C as ChevronDown, h as StrandsUiInput, i as StrandsUiLoader, j as StrandsUiTabs, k as StrandsUiLink, l as StrandsUiAlert } from "./StrandsUIPlugin-
|
|
2
|
-
import { m } from "./StrandsUIPlugin-
|
|
1
|
+
import { _ as _export_sfc, S as StrandsUiButton, U as UiButtonContent, a as _sfc_main$G, b as _sfc_main$H, c as _sfc_main$I, d as createLucideIcon, M as Minus, e as StrandsUiCard, f as UiTooltip, g as UiDivider, u as useFloatingPosition, C as ChevronDown, h as StrandsUiInput, i as StrandsUiLoader, j as StrandsUiTabs, k as StrandsUiLink, l as StrandsUiAlert } from "./StrandsUIPlugin-CE4-QxEo.es.js";
|
|
2
|
+
import { m } from "./StrandsUIPlugin-CE4-QxEo.es.js";
|
|
3
3
|
import { defineComponent, computed, provide, onMounted, onUnmounted, createElementBlock, openBlock, normalizeClass, createElementVNode, createBlock, renderSlot, Teleport, createCommentVNode, toDisplayString, createTextVNode, ref, reactive, watch, withModifiers, createStaticVNode, createVNode, withDirectives, withCtx, unref, vModelText, nextTick, Fragment, Transition, createSlots, normalizeStyle, renderList, mergeProps, useSlots, inject, resolveDynamicComponent, onBeforeUnmount, withKeys, h, isMemoSame, getCurrentInstance } from "vue";
|
|
4
4
|
import { u as useStrandsConfig, p as provideStrandsConfig } from "./useStrandsConfig-fRu-OG08.es.js";
|
|
5
5
|
import { s } from "./useStrandsConfig-fRu-OG08.es.js";
|
|
@@ -296,7 +296,7 @@ const _hoisted_18$e = ["min", "max"];
|
|
|
296
296
|
const _hoisted_19$d = { class: "action-buttons" };
|
|
297
297
|
const _hoisted_20$b = { class: "preview-section" };
|
|
298
298
|
const _hoisted_21$b = { class: "preview-container" };
|
|
299
|
-
const _hoisted_22$
|
|
299
|
+
const _hoisted_22$7 = ["width", "height"];
|
|
300
300
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
301
301
|
__name: "UiAvatarEditor",
|
|
302
302
|
props: {
|
|
@@ -766,7 +766,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
766
766
|
width: previewSize.value,
|
|
767
767
|
height: previewSize.value,
|
|
768
768
|
class: "preview-canvas"
|
|
769
|
-
}, null, 8, _hoisted_22$
|
|
769
|
+
}, null, 8, _hoisted_22$7)
|
|
770
770
|
]),
|
|
771
771
|
_cache[10] || (_cache[10] = createElementVNode("p", { class: "preview-instructions" }, [
|
|
772
772
|
createTextVNode(" Drag image to reposition"),
|
|
@@ -1806,7 +1806,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
1806
1806
|
};
|
|
1807
1807
|
}
|
|
1808
1808
|
});
|
|
1809
|
-
const UiModal = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-
|
|
1809
|
+
const UiModal = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-2decdbca"]]);
|
|
1810
1810
|
const tailwindColors = {
|
|
1811
1811
|
"#000000": {
|
|
1812
1812
|
label: "Black"
|
|
@@ -2436,7 +2436,7 @@ const _hoisted_20$a = {
|
|
|
2436
2436
|
class: "ui-color-picker-contrast-svg"
|
|
2437
2437
|
};
|
|
2438
2438
|
const _hoisted_21$a = ["cx", "fill"];
|
|
2439
|
-
const _hoisted_22$
|
|
2439
|
+
const _hoisted_22$6 = { class: "ui-color-picker-inputs" };
|
|
2440
2440
|
const _hoisted_23$5 = {
|
|
2441
2441
|
key: 0,
|
|
2442
2442
|
class: "ui-color-picker-input-row"
|
|
@@ -4295,7 +4295,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
4295
4295
|
style: normalizeStyle({ left: `${alpha.value * 100}%` })
|
|
4296
4296
|
}, null, 4)
|
|
4297
4297
|
], 544)) : createCommentVNode("", true),
|
|
4298
|
-
createElementVNode("div", _hoisted_22$
|
|
4298
|
+
createElementVNode("div", _hoisted_22$6, [
|
|
4299
4299
|
currentColorFormat.value === "hex" ? (openBlock(), createElementBlock("div", _hoisted_23$5, [
|
|
4300
4300
|
createElementVNode("div", _hoisted_24$5, [
|
|
4301
4301
|
_cache[24] || (_cache[24] = createElementVNode("label", { class: "ui-color-picker-label" }, "Hex", -1)),
|
|
@@ -4897,7 +4897,7 @@ const _hoisted_21$9 = {
|
|
|
4897
4897
|
key: 0,
|
|
4898
4898
|
class: "ui-table-empty"
|
|
4899
4899
|
};
|
|
4900
|
-
const _hoisted_22$
|
|
4900
|
+
const _hoisted_22$5 = {
|
|
4901
4901
|
key: 1,
|
|
4902
4902
|
class: "ui-table-footer"
|
|
4903
4903
|
};
|
|
@@ -5453,7 +5453,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5453
5453
|
], true)
|
|
5454
5454
|
])) : createCommentVNode("", true)
|
|
5455
5455
|
]),
|
|
5456
|
-
hasFooterSlots.value ? (openBlock(), createElementBlock("div", _hoisted_22$
|
|
5456
|
+
hasFooterSlots.value ? (openBlock(), createElementBlock("div", _hoisted_22$5, [
|
|
5457
5457
|
(openBlock(true), createElementBlock(Fragment, null, renderList(internalColumns.value, (column, index) => {
|
|
5458
5458
|
return openBlock(), createElementBlock("div", {
|
|
5459
5459
|
key: `footer-${index}`,
|
|
@@ -5868,7 +5868,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
5868
5868
|
_ctx.variant === "button" ? (openBlock(), createBlock(StrandsUiButton, {
|
|
5869
5869
|
key: 0,
|
|
5870
5870
|
icon: !_ctx.includeLabel,
|
|
5871
|
-
squircle:
|
|
5871
|
+
squircle: "",
|
|
5872
5872
|
variant: "ghost",
|
|
5873
5873
|
size: _ctx.size,
|
|
5874
5874
|
disabled: isDisabled.value,
|
|
@@ -5986,7 +5986,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
5986
5986
|
};
|
|
5987
5987
|
}
|
|
5988
5988
|
});
|
|
5989
|
-
const UiThemeToggle = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-
|
|
5989
|
+
const UiThemeToggle = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-1edc8bae"]]);
|
|
5990
5990
|
const _hoisted_1$s = {
|
|
5991
5991
|
key: 0,
|
|
5992
5992
|
class: "slider-header"
|
|
@@ -7010,7 +7010,7 @@ const _hoisted_18$a = {
|
|
|
7010
7010
|
const _hoisted_19$9 = { class: "mfa-hardware-prompt" };
|
|
7011
7011
|
const _hoisted_20$7 = { class: "mfa-hardware-prompt-content" };
|
|
7012
7012
|
const _hoisted_21$7 = { class: "mfa-hardware-prompt-icon" };
|
|
7013
|
-
const _hoisted_22$
|
|
7013
|
+
const _hoisted_22$4 = { class: "mfa-hardware-prompt-text" };
|
|
7014
7014
|
const _hoisted_23$4 = { class: "mfa-hardware-prompt-title" };
|
|
7015
7015
|
const _hoisted_24$4 = { class: "mfa-hardware-prompt-description" };
|
|
7016
7016
|
const _hoisted_25$4 = { class: "mfa-backup-option" };
|
|
@@ -7514,7 +7514,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
7514
7514
|
class: "mfa-hardware-icon-svg"
|
|
7515
7515
|
}))
|
|
7516
7516
|
]),
|
|
7517
|
-
createElementVNode("div", _hoisted_22$
|
|
7517
|
+
createElementVNode("div", _hoisted_22$4, [
|
|
7518
7518
|
createElementVNode("h4", _hoisted_23$4, toDisplayString(selectedMethod.value.device_type === "passkey" ? "Use your passkey" : "Touch your hardware key"), 1),
|
|
7519
7519
|
createElementVNode("p", _hoisted_24$4, toDisplayString(selectedMethod.value.device_type === "passkey" ? "Use biometrics, PIN, or device security to authenticate" : "Insert and touch your hardware key to authenticate"), 1)
|
|
7520
7520
|
])
|
|
@@ -8943,7 +8943,7 @@ const _hoisted_19$6 = {
|
|
|
8943
8943
|
};
|
|
8944
8944
|
const _hoisted_20$5 = { class: "oauth-icon-fallback-text" };
|
|
8945
8945
|
const _hoisted_21$5 = { class: "oauth-button-text" };
|
|
8946
|
-
const _hoisted_22$
|
|
8946
|
+
const _hoisted_22$3 = {
|
|
8947
8947
|
key: 1,
|
|
8948
8948
|
class: "divider-with-text"
|
|
8949
8949
|
};
|
|
@@ -9170,7 +9170,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9170
9170
|
}, 1032, ["disabled", "onClick"]);
|
|
9171
9171
|
}), 128))
|
|
9172
9172
|
])) : createCommentVNode("", true),
|
|
9173
|
-
unref(enabledProviders)?.length ? (openBlock(), createElementBlock("div", _hoisted_22$
|
|
9173
|
+
unref(enabledProviders)?.length ? (openBlock(), createElementBlock("div", _hoisted_22$3, [..._cache[8] || (_cache[8] = [
|
|
9174
9174
|
createElementVNode("span", { class: "divider-text" }, "Or create account with email", -1)
|
|
9175
9175
|
])])) : createCommentVNode("", true),
|
|
9176
9176
|
createElementVNode("form", {
|
|
@@ -11247,7 +11247,7 @@ const _hoisted_18$4 = { class: "mfa-device-option" };
|
|
|
11247
11247
|
const _hoisted_19$3 = { class: "mfa-device-option-content" };
|
|
11248
11248
|
const _hoisted_20$3 = { class: "mfa-device-option-icon" };
|
|
11249
11249
|
const _hoisted_21$3 = { class: "mfa-device-option" };
|
|
11250
|
-
const _hoisted_22$
|
|
11250
|
+
const _hoisted_22$2 = { class: "mfa-device-option-content" };
|
|
11251
11251
|
const _hoisted_23$2 = { class: "mfa-device-option-icon" };
|
|
11252
11252
|
const _hoisted_24$2 = {
|
|
11253
11253
|
key: 1,
|
|
@@ -11557,7 +11557,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
11557
11557
|
})
|
|
11558
11558
|
]),
|
|
11559
11559
|
createElementVNode("div", _hoisted_21$3, [
|
|
11560
|
-
createElementVNode("div", _hoisted_22$
|
|
11560
|
+
createElementVNode("div", _hoisted_22$2, [
|
|
11561
11561
|
createElementVNode("div", _hoisted_23$2, [
|
|
11562
11562
|
createVNode(Fingerprint, { size: 24 })
|
|
11563
11563
|
]),
|
|
@@ -11996,7 +11996,7 @@ const _hoisted_18$3 = {
|
|
|
11996
11996
|
const _hoisted_19$2 = { class: "session-details" };
|
|
11997
11997
|
const _hoisted_20$2 = { class: "detail-row" };
|
|
11998
11998
|
const _hoisted_21$2 = { class: "detail-icon" };
|
|
11999
|
-
const _hoisted_22$
|
|
11999
|
+
const _hoisted_22$1 = { class: "detail-text" };
|
|
12000
12000
|
const _hoisted_23$1 = { class: "detail-row" };
|
|
12001
12001
|
const _hoisted_24$1 = { class: "detail-icon" };
|
|
12002
12002
|
const _hoisted_25$1 = { class: "detail-text" };
|
|
@@ -12290,7 +12290,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
12290
12290
|
createElementVNode("span", _hoisted_21$2, [
|
|
12291
12291
|
createVNode(Monitor2, { size: 14 })
|
|
12292
12292
|
]),
|
|
12293
|
-
createElementVNode("span", _hoisted_22$
|
|
12293
|
+
createElementVNode("span", _hoisted_22$1, toDisplayString(session.user_agent || "Unknown device"), 1)
|
|
12294
12294
|
]),
|
|
12295
12295
|
createElementVNode("div", _hoisted_23$1, [
|
|
12296
12296
|
createElementVNode("span", _hoisted_24$1, [
|
|
@@ -12378,7 +12378,7 @@ const _hoisted_20$1 = {
|
|
|
12378
12378
|
class: "profile-change-form"
|
|
12379
12379
|
};
|
|
12380
12380
|
const _hoisted_21$1 = { class: "profile-password-section" };
|
|
12381
|
-
const _hoisted_22
|
|
12381
|
+
const _hoisted_22 = { class: "profile-field-section" };
|
|
12382
12382
|
const _hoisted_23 = { class: "profile-field-header" };
|
|
12383
12383
|
const _hoisted_24 = { class: "profile-field-subtitle" };
|
|
12384
12384
|
const _hoisted_25 = {
|
|
@@ -13287,7 +13287,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13287
13287
|
]),
|
|
13288
13288
|
createElementVNode("div", _hoisted_21$1, [
|
|
13289
13289
|
_cache[23] || (_cache[23] = createElementVNode("h3", { class: "profile-section-title" }, "Security Settings", -1)),
|
|
13290
|
-
createElementVNode("div", _hoisted_22
|
|
13290
|
+
createElementVNode("div", _hoisted_22, [
|
|
13291
13291
|
createElementVNode("div", _hoisted_23, [
|
|
13292
13292
|
createElementVNode("div", null, [
|
|
13293
13293
|
_cache[18] || (_cache[18] = createElementVNode("h4", { class: "profile-field-title" }, "Password", -1)),
|
|
@@ -13947,58 +13947,45 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13947
13947
|
};
|
|
13948
13948
|
}
|
|
13949
13949
|
});
|
|
13950
|
-
const _hoisted_1$3 =
|
|
13951
|
-
|
|
13952
|
-
|
|
13953
|
-
};
|
|
13954
|
-
const _hoisted_2$2 = ["src", "alt", "width", "height"];
|
|
13955
|
-
const _hoisted_3$2 = {
|
|
13956
|
-
key: 1,
|
|
13957
|
-
class: "mini-profile-avatar-default"
|
|
13958
|
-
};
|
|
13950
|
+
const _hoisted_1$3 = ["onKeydown", "aria-expanded"];
|
|
13951
|
+
const _hoisted_2$2 = { class: "mini-profile-avatar-container" };
|
|
13952
|
+
const _hoisted_3$2 = ["src", "alt", "width", "height"];
|
|
13959
13953
|
const _hoisted_4$2 = {
|
|
13960
13954
|
key: 1,
|
|
13961
|
-
class: "avatar-
|
|
13955
|
+
class: "mini-profile-avatar-default"
|
|
13962
13956
|
};
|
|
13963
|
-
const _hoisted_5$1 =
|
|
13964
|
-
const _hoisted_6$1 = {
|
|
13957
|
+
const _hoisted_5$1 = { class: "mini-profile-content" };
|
|
13958
|
+
const _hoisted_6$1 = { class: "mini-profile-name" };
|
|
13959
|
+
const _hoisted_7$1 = { class: "mini-profile-email" };
|
|
13960
|
+
const _hoisted_8$1 = ["src", "alt", "width", "height"];
|
|
13961
|
+
const _hoisted_9$1 = {
|
|
13965
13962
|
key: 1,
|
|
13966
13963
|
class: "avatar-default"
|
|
13967
13964
|
};
|
|
13968
|
-
const
|
|
13969
|
-
|
|
13970
|
-
|
|
13971
|
-
|
|
13972
|
-
const _hoisted_8$1 = { class: "mini-profile-name" };
|
|
13973
|
-
const _hoisted_9$1 = { class: "mini-profile-email" };
|
|
13974
|
-
const _hoisted_10$1 = {
|
|
13975
|
-
key: 1,
|
|
13976
|
-
class: "user-info"
|
|
13977
|
-
};
|
|
13978
|
-
const _hoisted_11$1 = { class: "user-name" };
|
|
13979
|
-
const _hoisted_12$1 = ["onKeydown"];
|
|
13980
|
-
const _hoisted_13$1 = { class: "dropdown-content" };
|
|
13981
|
-
const _hoisted_14$1 = {
|
|
13965
|
+
const _hoisted_10$1 = { key: 0 };
|
|
13966
|
+
const _hoisted_11$1 = ["onKeydown"];
|
|
13967
|
+
const _hoisted_12$1 = { class: "dropdown-content" };
|
|
13968
|
+
const _hoisted_13$1 = {
|
|
13982
13969
|
key: 0,
|
|
13983
13970
|
class: "dropdown-header"
|
|
13984
13971
|
};
|
|
13985
|
-
const
|
|
13972
|
+
const _hoisted_14$1 = {
|
|
13986
13973
|
key: 0,
|
|
13987
13974
|
class: "dropdown-avatar-container"
|
|
13988
13975
|
};
|
|
13989
|
-
const
|
|
13990
|
-
const
|
|
13976
|
+
const _hoisted_15$1 = ["src", "alt"];
|
|
13977
|
+
const _hoisted_16$1 = {
|
|
13991
13978
|
key: 1,
|
|
13992
13979
|
class: "dropdown-avatar-default"
|
|
13993
13980
|
};
|
|
13994
|
-
const
|
|
13995
|
-
const
|
|
13996
|
-
const
|
|
13997
|
-
const
|
|
13981
|
+
const _hoisted_17$1 = { class: "dropdown-user-details" };
|
|
13982
|
+
const _hoisted_18$1 = { class: "dropdown-user-name" };
|
|
13983
|
+
const _hoisted_19 = { class: "dropdown-user-email" };
|
|
13984
|
+
const _hoisted_20 = {
|
|
13998
13985
|
key: 1,
|
|
13999
13986
|
class: "dropdown-divider"
|
|
14000
13987
|
};
|
|
14001
|
-
const
|
|
13988
|
+
const _hoisted_21 = { class: "sign-in-auth-wrapper" };
|
|
14002
13989
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
14003
13990
|
__name: "StrandsUserButton",
|
|
14004
13991
|
props: {
|
|
@@ -14021,10 +14008,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14021
14008
|
const containerRef = ref();
|
|
14022
14009
|
const triggerRef = ref();
|
|
14023
14010
|
const dropdownRef = ref();
|
|
14024
|
-
const triggerElement = computed(() =>
|
|
14025
|
-
const element = triggerRef.value?.$el;
|
|
14026
|
-
return element;
|
|
14027
|
-
});
|
|
14011
|
+
const triggerElement = computed(() => triggerRef.value);
|
|
14028
14012
|
const { floatingStyle, updatePosition } = useFloatingPosition({
|
|
14029
14013
|
trigger: triggerElement,
|
|
14030
14014
|
floating: dropdownRef,
|
|
@@ -14039,6 +14023,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14039
14023
|
}
|
|
14040
14024
|
});
|
|
14041
14025
|
const avatarSize = computed(() => {
|
|
14026
|
+
if (props.variant === "mini-profile") {
|
|
14027
|
+
switch (props.size) {
|
|
14028
|
+
case "sm":
|
|
14029
|
+
return 32;
|
|
14030
|
+
case "md":
|
|
14031
|
+
return 44;
|
|
14032
|
+
case "lg":
|
|
14033
|
+
return 56;
|
|
14034
|
+
default:
|
|
14035
|
+
return 44;
|
|
14036
|
+
}
|
|
14037
|
+
}
|
|
14042
14038
|
switch (props.size) {
|
|
14043
14039
|
case "sm":
|
|
14044
14040
|
return 24;
|
|
@@ -14142,7 +14138,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14142
14138
|
onClick: openSignIn,
|
|
14143
14139
|
"aria-label": "Sign in"
|
|
14144
14140
|
}, {
|
|
14145
|
-
"leading-icon": withCtx(() => [..._cache[
|
|
14141
|
+
"leading-icon": withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
14146
14142
|
createElementVNode("svg", {
|
|
14147
14143
|
class: "sign-in-icon",
|
|
14148
14144
|
fill: "none",
|
|
@@ -14158,7 +14154,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14158
14154
|
], -1)
|
|
14159
14155
|
])]),
|
|
14160
14156
|
default: withCtx(() => [
|
|
14161
|
-
_cache[
|
|
14157
|
+
_cache[10] || (_cache[10] = createTextVNode(" Sign In ", -1))
|
|
14162
14158
|
]),
|
|
14163
14159
|
_: 1
|
|
14164
14160
|
}),
|
|
@@ -14168,7 +14164,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14168
14164
|
"fullscreen-on-mobile": false
|
|
14169
14165
|
}, {
|
|
14170
14166
|
default: withCtx(() => [
|
|
14171
|
-
createElementVNode("div",
|
|
14167
|
+
createElementVNode("div", _hoisted_21, [
|
|
14172
14168
|
createVNode(unref(StrandsAuth), {
|
|
14173
14169
|
onSignedIn: handleSignedIn,
|
|
14174
14170
|
onError: handleSignInError,
|
|
@@ -14187,12 +14183,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14187
14183
|
})
|
|
14188
14184
|
]),
|
|
14189
14185
|
default: withCtx(() => [
|
|
14190
|
-
|
|
14186
|
+
_ctx.variant === "mini-profile" ? (openBlock(), createElementBlock("div", {
|
|
14187
|
+
key: 0,
|
|
14191
14188
|
ref_key: "triggerRef",
|
|
14192
14189
|
ref: triggerRef,
|
|
14193
|
-
|
|
14194
|
-
active: showDropdown.value,
|
|
14195
|
-
class: normalizeClass([`user-button-size-${_ctx.size}`, _ctx.variant === "mini-profile" && "user-button-mini-profile"]),
|
|
14190
|
+
class: normalizeClass(["mini-profile-static-card", `user-button-size-${_ctx.size}`, { "mini-profile-active": showDropdown.value }]),
|
|
14196
14191
|
onClick: toggleDropdown,
|
|
14197
14192
|
onKeydown: [
|
|
14198
14193
|
withKeys(toggleDropdown, ["enter"]),
|
|
@@ -14200,43 +14195,83 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14200
14195
|
withKeys(closeDropdown, ["escape"]),
|
|
14201
14196
|
withKeys(withModifiers(openDropdown, ["prevent"]), ["arrow-down"])
|
|
14202
14197
|
],
|
|
14198
|
+
role: "button",
|
|
14199
|
+
tabindex: "0",
|
|
14203
14200
|
"aria-haspopup": "true",
|
|
14204
14201
|
"aria-expanded": showDropdown.value,
|
|
14205
14202
|
"aria-label": "User menu"
|
|
14206
|
-
},
|
|
14207
|
-
"
|
|
14208
|
-
|
|
14209
|
-
|
|
14210
|
-
|
|
14211
|
-
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
|
|
14219
|
-
|
|
14220
|
-
|
|
14221
|
-
|
|
14222
|
-
|
|
14223
|
-
|
|
14224
|
-
|
|
14225
|
-
|
|
14226
|
-
|
|
14227
|
-
|
|
14228
|
-
|
|
14229
|
-
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
|
|
14234
|
-
|
|
14235
|
-
|
|
14236
|
-
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
|
|
14203
|
+
}, [
|
|
14204
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
14205
|
+
createVNode(unref(UiLevelProgress), {
|
|
14206
|
+
size: avatarSizeWithProgress.value,
|
|
14207
|
+
value: user.value?.xp || 0,
|
|
14208
|
+
max: user.value?.next_level_xp || 100,
|
|
14209
|
+
level: user.value?.level || 1,
|
|
14210
|
+
"level-label": `LEVEL ${user.value?.level || 1}`,
|
|
14211
|
+
"user-settings": user.value?.settings,
|
|
14212
|
+
class: "mini-profile-level-progress"
|
|
14213
|
+
}, null, 8, ["size", "value", "max", "level", "level-label", "user-settings"]),
|
|
14214
|
+
user.value?.avatar ? (openBlock(), createElementBlock("img", {
|
|
14215
|
+
key: 0,
|
|
14216
|
+
src: user.value.avatar,
|
|
14217
|
+
alt: `${user.value?.firstName || user.value?.email}'s avatar`,
|
|
14218
|
+
class: "mini-profile-avatar-image",
|
|
14219
|
+
width: avatarSize.value,
|
|
14220
|
+
height: avatarSize.value,
|
|
14221
|
+
loading: "eager"
|
|
14222
|
+
}, null, 8, _hoisted_3$2)) : (openBlock(), createElementBlock("div", _hoisted_4$2, [..._cache[2] || (_cache[2] = [
|
|
14223
|
+
createElementVNode("svg", {
|
|
14224
|
+
class: "mini-profile-avatar-icon",
|
|
14225
|
+
fill: "currentColor",
|
|
14226
|
+
viewBox: "0 0 20 20"
|
|
14227
|
+
}, [
|
|
14228
|
+
createElementVNode("path", {
|
|
14229
|
+
"fill-rule": "evenodd",
|
|
14230
|
+
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
|
14231
|
+
"clip-rule": "evenodd"
|
|
14232
|
+
})
|
|
14233
|
+
], -1)
|
|
14234
|
+
])]))
|
|
14235
|
+
]),
|
|
14236
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
14237
|
+
createElementVNode("div", _hoisted_6$1, toDisplayString(displayName.value), 1),
|
|
14238
|
+
createElementVNode("div", _hoisted_7$1, toDisplayString(user.value?.email), 1)
|
|
14239
|
+
]),
|
|
14240
|
+
(openBlock(), createElementBlock("svg", {
|
|
14241
|
+
class: normalizeClass(["mini-profile-dropdown-arrow", { "dropdown-arrow-open": showDropdown.value }]),
|
|
14242
|
+
fill: "none",
|
|
14243
|
+
stroke: "currentColor",
|
|
14244
|
+
viewBox: "0 0 24 24"
|
|
14245
|
+
}, [..._cache[3] || (_cache[3] = [
|
|
14246
|
+
createElementVNode("path", {
|
|
14247
|
+
"stroke-linecap": "round",
|
|
14248
|
+
"stroke-linejoin": "round",
|
|
14249
|
+
"stroke-width": "2",
|
|
14250
|
+
d: "M19 9l-7 7-7-7"
|
|
14251
|
+
}, null, -1)
|
|
14252
|
+
])], 2))
|
|
14253
|
+
], 42, _hoisted_1$3)) : (openBlock(), createElementBlock("div", {
|
|
14254
|
+
key: 1,
|
|
14255
|
+
ref_key: "triggerRef",
|
|
14256
|
+
ref: triggerRef,
|
|
14257
|
+
class: "user-button-wrapper"
|
|
14258
|
+
}, [
|
|
14259
|
+
createVNode(unref(CompoundUiButton), {
|
|
14260
|
+
color: "secondary",
|
|
14261
|
+
size: _ctx.size,
|
|
14262
|
+
active: showDropdown.value,
|
|
14263
|
+
onClick: toggleDropdown,
|
|
14264
|
+
onKeydown: [
|
|
14265
|
+
withKeys(toggleDropdown, ["enter"]),
|
|
14266
|
+
withKeys(withModifiers(toggleDropdown, ["prevent"]), ["space"]),
|
|
14267
|
+
withKeys(closeDropdown, ["escape"]),
|
|
14268
|
+
withKeys(withModifiers(openDropdown, ["prevent"]), ["arrow-down"])
|
|
14269
|
+
],
|
|
14270
|
+
"aria-haspopup": "true",
|
|
14271
|
+
"aria-expanded": showDropdown.value,
|
|
14272
|
+
"aria-label": "User menu"
|
|
14273
|
+
}, {
|
|
14274
|
+
"leading-icon": withCtx(() => [
|
|
14240
14275
|
user.value?.avatar ? (openBlock(), createElementBlock("img", {
|
|
14241
14276
|
key: 0,
|
|
14242
14277
|
src: user.value.avatar,
|
|
@@ -14245,7 +14280,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14245
14280
|
width: avatarSize.value,
|
|
14246
14281
|
height: avatarSize.value,
|
|
14247
14282
|
loading: "eager"
|
|
14248
|
-
}, null, 8,
|
|
14283
|
+
}, null, 8, _hoisted_8$1)) : (openBlock(), createElementBlock("div", _hoisted_9$1, [..._cache[4] || (_cache[4] = [
|
|
14249
14284
|
createElementVNode("svg", {
|
|
14250
14285
|
class: "avatar-icon",
|
|
14251
14286
|
fill: "currentColor",
|
|
@@ -14258,33 +14293,28 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14258
14293
|
})
|
|
14259
14294
|
], -1)
|
|
14260
14295
|
])]))
|
|
14261
|
-
])
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14265
|
-
|
|
14266
|
-
|
|
14267
|
-
|
|
14268
|
-
|
|
14269
|
-
|
|
14270
|
-
|
|
14271
|
-
|
|
14272
|
-
|
|
14273
|
-
|
|
14274
|
-
|
|
14275
|
-
|
|
14276
|
-
])
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14282
|
-
|
|
14283
|
-
createElementVNode("div", _hoisted_11$1, toDisplayString(displayName.value), 1)
|
|
14284
|
-
])) : createCommentVNode("", true)
|
|
14285
|
-
]),
|
|
14286
|
-
_: 1
|
|
14287
|
-
}, 8, ["active", "class", "onKeydown", "aria-expanded"]),
|
|
14296
|
+
]),
|
|
14297
|
+
"trailing-icon": withCtx(() => [
|
|
14298
|
+
(openBlock(), createElementBlock("svg", {
|
|
14299
|
+
class: normalizeClass(["dropdown-arrow", { "dropdown-arrow-open": showDropdown.value }]),
|
|
14300
|
+
fill: "none",
|
|
14301
|
+
stroke: "currentColor",
|
|
14302
|
+
viewBox: "0 0 24 24"
|
|
14303
|
+
}, [..._cache[5] || (_cache[5] = [
|
|
14304
|
+
createElementVNode("path", {
|
|
14305
|
+
"stroke-linecap": "round",
|
|
14306
|
+
"stroke-linejoin": "round",
|
|
14307
|
+
"stroke-width": "2",
|
|
14308
|
+
d: "M19 9l-7 7-7-7"
|
|
14309
|
+
}, null, -1)
|
|
14310
|
+
])], 2))
|
|
14311
|
+
]),
|
|
14312
|
+
default: withCtx(() => [
|
|
14313
|
+
!_ctx.hideUser ? (openBlock(), createElementBlock("span", _hoisted_10$1, toDisplayString(displayName.value), 1)) : createCommentVNode("", true)
|
|
14314
|
+
]),
|
|
14315
|
+
_: 1
|
|
14316
|
+
}, 8, ["size", "active", "onKeydown", "aria-expanded"])
|
|
14317
|
+
], 512)),
|
|
14288
14318
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
14289
14319
|
showDropdown.value ? (openBlock(), createElementBlock("div", {
|
|
14290
14320
|
key: 0,
|
|
@@ -14302,9 +14332,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14302
14332
|
withKeys(withModifiers(focusLast, ["prevent"]), ["end"])
|
|
14303
14333
|
]
|
|
14304
14334
|
}, [
|
|
14305
|
-
createElementVNode("div",
|
|
14306
|
-
_ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div",
|
|
14307
|
-
user.value ? (openBlock(), createElementBlock("div",
|
|
14335
|
+
createElementVNode("div", _hoisted_12$1, [
|
|
14336
|
+
_ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
|
|
14337
|
+
user.value ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
|
|
14308
14338
|
createVNode(unref(UiLevelProgress), {
|
|
14309
14339
|
size: 80,
|
|
14310
14340
|
value: user.value.xp,
|
|
@@ -14321,7 +14351,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14321
14351
|
class: "dropdown-avatar-image",
|
|
14322
14352
|
width: "64",
|
|
14323
14353
|
height: "64"
|
|
14324
|
-
}, null, 8,
|
|
14354
|
+
}, null, 8, _hoisted_15$1)) : (openBlock(), createElementBlock("div", _hoisted_16$1, [..._cache[6] || (_cache[6] = [
|
|
14325
14355
|
createElementVNode("svg", {
|
|
14326
14356
|
class: "dropdown-avatar-icon",
|
|
14327
14357
|
fill: "currentColor",
|
|
@@ -14335,20 +14365,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14335
14365
|
], -1)
|
|
14336
14366
|
])]))
|
|
14337
14367
|
])) : createCommentVNode("", true),
|
|
14338
|
-
createElementVNode("div",
|
|
14339
|
-
createElementVNode("div",
|
|
14340
|
-
createElementVNode("div",
|
|
14368
|
+
createElementVNode("div", _hoisted_17$1, [
|
|
14369
|
+
createElementVNode("div", _hoisted_18$1, toDisplayString(displayName.value), 1),
|
|
14370
|
+
createElementVNode("div", _hoisted_19, toDisplayString(user.value?.email), 1)
|
|
14341
14371
|
])
|
|
14342
14372
|
])) : createCommentVNode("", true),
|
|
14343
14373
|
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
14344
|
-
_ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div",
|
|
14374
|
+
_ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_20)) : createCommentVNode("", true),
|
|
14345
14375
|
createVNode(unref(StrandsNav), null, {
|
|
14346
14376
|
default: withCtx(() => [
|
|
14347
14377
|
createVNode(unref(StrandsNav).Item, {
|
|
14348
14378
|
color: "secondary",
|
|
14349
14379
|
onClick: openProfile
|
|
14350
14380
|
}, {
|
|
14351
|
-
default: withCtx(() => [..._cache[
|
|
14381
|
+
default: withCtx(() => [..._cache[7] || (_cache[7] = [
|
|
14352
14382
|
createTextVNode("Profile", -1)
|
|
14353
14383
|
])]),
|
|
14354
14384
|
_: 1
|
|
@@ -14357,7 +14387,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14357
14387
|
color: "danger",
|
|
14358
14388
|
onClick: handleSignOut
|
|
14359
14389
|
}, {
|
|
14360
|
-
default: withCtx(() => [..._cache[
|
|
14390
|
+
default: withCtx(() => [..._cache[8] || (_cache[8] = [
|
|
14361
14391
|
createTextVNode("Sign Out", -1)
|
|
14362
14392
|
])]),
|
|
14363
14393
|
_: 1
|
|
@@ -14366,7 +14396,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14366
14396
|
_: 1
|
|
14367
14397
|
})
|
|
14368
14398
|
])
|
|
14369
|
-
], 44,
|
|
14399
|
+
], 44, _hoisted_11$1)) : createCommentVNode("", true)
|
|
14370
14400
|
])),
|
|
14371
14401
|
createVNode(unref(UiModal), {
|
|
14372
14402
|
modelValue: showProfileModal.value,
|
|
@@ -14389,7 +14419,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14389
14419
|
};
|
|
14390
14420
|
}
|
|
14391
14421
|
});
|
|
14392
|
-
const StrandsUserButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
14422
|
+
const StrandsUserButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-c84f825d"]]);
|
|
14393
14423
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
14394
14424
|
__name: "StrandsNav",
|
|
14395
14425
|
props: {
|
package/dist/vite.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function n(n={}){const{styles:s=1,accentColor:r="#EA00A8",useSquircle:t=1,...i}=n;let c;return{name:"@strands.gg/accui:vite-plugin",enforce:"pre",config:(n,{command:s})=>(c={accentColor:r,useSquircle:t,...i},{define:{t:JSON.stringify(c)}}),transformIndexHtml:{order:"pre",handler(n){if(r&&"#EA00A8"!==r){const s=`<style data-strands-accent>\n :root {\n --strands-accent: ${r};\n --accui-strands-accent: ${r};\n --accui-strands-50: color-mix(in srgb, ${r} 10%, white);\n --accui-strands-100: color-mix(in srgb, ${r} 20%, white);\n --accui-strands-200: color-mix(in srgb, ${r} 30%, white);\n --accui-strands-300: color-mix(in srgb, ${r} 40%, white);\n --accui-strands-400: color-mix(in srgb, ${r} 70%, white);\n --accui-strands-500: ${r};\n --accui-strands-600: color-mix(in srgb, ${r} 85%, black);\n --accui-strands-700: color-mix(in srgb, ${r} 70%, black);\n --accui-strands-800: color-mix(in srgb, ${r} 55%, black);\n --accui-strands-900: color-mix(in srgb, ${r} 40%, black);\n --accui-strands-950: color-mix(in srgb, ${r} 25%, black);\n }</style>`;return n.replace("</head>",` ${s}\n </head>`)}return n}},transform:async(n,r)=>(s&&r.endsWith("main.ts")||r.endsWith("main.js"))&&!n.includes("@strands.gg/accui/style.css")?{code:`import '@strands.gg/accui/style.css'\n${n}`,map:null}:!r.endsWith("main.ts")&&!r.endsWith("main.js")||n.includes("setStrandsConfig")||n.includes("__STRANDS_INJECTED__")?null:{code:`\n// Auto-injected by @strands.gg/accui Vite plugin\nimport { setStrandsConfig } from '@strands.gg/accui'\n\nif (typeof window !== 'undefined') {\n const strandsConfig = ${JSON.stringify(c)}\n setStrandsConfig(strandsConfig)\n window.__STRANDS_CONFIG__ = strandsConfig\n window.__STRANDS_INJECTED__ = true\n}\n\n${n}`,map:null}}}Object.defineProperties(exports,{i:{value:1},[Symbol.toStringTag]:{value:"Module"}}),exports.StrandsAuth=n,exports.StrandsAuthVitePlugin=n,exports.createStrandsAuth=function(n={}){return{install(s){Promise.resolve().then(()=>require("./StrandsUIPlugin-
|
|
1
|
+
"use strict";function n(n={}){const{styles:s=1,accentColor:r="#EA00A8",useSquircle:t=1,...i}=n;let c;return{name:"@strands.gg/accui:vite-plugin",enforce:"pre",config:(n,{command:s})=>(c={accentColor:r,useSquircle:t,...i},{define:{t:JSON.stringify(c)}}),transformIndexHtml:{order:"pre",handler(n){if(r&&"#EA00A8"!==r){const s=`<style data-strands-accent>\n :root {\n --strands-accent: ${r};\n --accui-strands-accent: ${r};\n --accui-strands-50: color-mix(in srgb, ${r} 10%, white);\n --accui-strands-100: color-mix(in srgb, ${r} 20%, white);\n --accui-strands-200: color-mix(in srgb, ${r} 30%, white);\n --accui-strands-300: color-mix(in srgb, ${r} 40%, white);\n --accui-strands-400: color-mix(in srgb, ${r} 70%, white);\n --accui-strands-500: ${r};\n --accui-strands-600: color-mix(in srgb, ${r} 85%, black);\n --accui-strands-700: color-mix(in srgb, ${r} 70%, black);\n --accui-strands-800: color-mix(in srgb, ${r} 55%, black);\n --accui-strands-900: color-mix(in srgb, ${r} 40%, black);\n --accui-strands-950: color-mix(in srgb, ${r} 25%, black);\n }</style>`;return n.replace("</head>",` ${s}\n </head>`)}return n}},transform:async(n,r)=>(s&&r.endsWith("main.ts")||r.endsWith("main.js"))&&!n.includes("@strands.gg/accui/style.css")?{code:`import '@strands.gg/accui/style.css'\n${n}`,map:null}:!r.endsWith("main.ts")&&!r.endsWith("main.js")||n.includes("setStrandsConfig")||n.includes("__STRANDS_INJECTED__")?null:{code:`\n// Auto-injected by @strands.gg/accui Vite plugin\nimport { setStrandsConfig } from '@strands.gg/accui'\n\nif (typeof window !== 'undefined') {\n const strandsConfig = ${JSON.stringify(c)}\n setStrandsConfig(strandsConfig)\n window.__STRANDS_CONFIG__ = strandsConfig\n window.__STRANDS_INJECTED__ = true\n}\n\n${n}`,map:null}}}Object.defineProperties(exports,{i:{value:1},[Symbol.toStringTag]:{value:"Module"}}),exports.StrandsAuth=n,exports.StrandsAuthVitePlugin=n,exports.createStrandsAuth=function(n={}){return{install(s){Promise.resolve().then(()=>require("./StrandsUIPlugin-Dl-CMqkQ.cjs.js")).then(n=>n.StrandsUIPlugin$1).then(n=>{const r=n.default;s.use(r)}),Promise.resolve().then(()=>require("./useStrandsConfig-Sr6NG90B.cjs.js")).then(n=>n.useStrandsConfig$1).then(s=>{const{setStrandsConfig:r}=s;r(n),"undefined"!=typeof window&&(window.t=n)})}}},exports.default=n,exports.strandsAuth=n;
|
package/dist/vite.es.js
CHANGED
|
@@ -86,7 +86,7 @@ ${code}`,
|
|
|
86
86
|
function createStrandsAuth(config = {}) {
|
|
87
87
|
return {
|
|
88
88
|
install(app) {
|
|
89
|
-
import("./StrandsUIPlugin-
|
|
89
|
+
import("./StrandsUIPlugin-CE4-QxEo.es.js").then((n) => n.n).then((module) => {
|
|
90
90
|
const StrandsUIPlugin = module.default;
|
|
91
91
|
app.use(StrandsUIPlugin);
|
|
92
92
|
});
|