@strands.gg/accui 2.15.10 → 2.16.0
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-C9rrMU2i.cjs.js +1 -0
- package/dist/{StrandsUIPlugin-JP858JzQ.es.js → StrandsUIPlugin-tl7L52hZ.es.js} +15 -63
- package/dist/accui.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +149 -177
- package/dist/vite.cjs.js +1 -1
- package/dist/vite.es.js +1 -1
- package/dist/webcomponents/define-element.d.ts +24 -0
- package/dist/webcomponents/entries/strands-alert.d.ts +12 -0
- package/dist/webcomponents/entries/strands-button.d.ts +12 -0
- package/dist/webcomponents/entries/strands-card.d.ts +12 -0
- package/dist/webcomponents/entries/strands-checkbox-group.d.ts +11 -0
- package/dist/webcomponents/entries/strands-divider.d.ts +12 -0
- package/dist/webcomponents/entries/strands-input.d.ts +14 -0
- package/dist/webcomponents/entries/strands-link.d.ts +12 -0
- package/dist/webcomponents/entries/strands-loader-spinner.d.ts +10 -0
- package/dist/webcomponents/entries/strands-modal.d.ts +16 -0
- package/dist/webcomponents/entries/strands-pill.d.ts +11 -0
- package/dist/webcomponents/entries/strands-radio-group.d.ts +11 -0
- package/dist/webcomponents/entries/strands-slider.d.ts +10 -0
- package/dist/webcomponents/entries/strands-table.d.ts +13 -0
- package/dist/webcomponents/entries/strands-tabs.d.ts +12 -0
- package/dist/webcomponents/entries/strands-theme-toggle.d.ts +10 -0
- package/dist/webcomponents/entries/strands-toggle.d.ts +10 -0
- package/dist/webcomponents/entries/strands-tooltip.d.ts +12 -0
- package/dist/webcomponents/index.d.ts +8 -0
- package/dist/webcomponents/loader.d.ts +73 -0
- package/dist/webcomponents/registry.d.ts +41 -0
- package/package.json +3 -1
- package/dist/StrandsUIPlugin-DSCUXdBp.cjs.js +0 -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-tl7L52hZ.es.js";
|
|
2
|
+
import { m } from "./StrandsUIPlugin-tl7L52hZ.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$8 = ["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$8)
|
|
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-ecf47be6"]]);
|
|
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$7 = { 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$7, [
|
|
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$6 = {
|
|
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$6, [
|
|
5457
5457
|
(openBlock(true), createElementBlock(Fragment, null, renderList(internalColumns.value, (column, index) => {
|
|
5458
5458
|
return openBlock(), createElementBlock("div", {
|
|
5459
5459
|
key: `footer-${index}`,
|
|
@@ -5702,7 +5702,12 @@ function useDarkMode() {
|
|
|
5702
5702
|
mediaQuery.addListener(handleSystemThemeChange);
|
|
5703
5703
|
}
|
|
5704
5704
|
const storedTheme = getStoredTheme();
|
|
5705
|
-
|
|
5705
|
+
if (storedTheme === "system" && !localStorage.getItem(STORAGE_KEY)) {
|
|
5706
|
+
currentTheme.value = "light";
|
|
5707
|
+
setStoredTheme("light");
|
|
5708
|
+
} else {
|
|
5709
|
+
currentTheme.value = storedTheme;
|
|
5710
|
+
}
|
|
5706
5711
|
applyTheme(isDark.value);
|
|
5707
5712
|
watch(isDark, (newIsDark) => {
|
|
5708
5713
|
applyTheme(newIsDark);
|
|
@@ -5863,7 +5868,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
5863
5868
|
_ctx.variant === "button" ? (openBlock(), createBlock(StrandsUiButton, {
|
|
5864
5869
|
key: 0,
|
|
5865
5870
|
icon: !_ctx.includeLabel,
|
|
5866
|
-
squircle:
|
|
5871
|
+
squircle: true,
|
|
5867
5872
|
variant: "ghost",
|
|
5868
5873
|
size: _ctx.size,
|
|
5869
5874
|
disabled: isDisabled.value,
|
|
@@ -5981,7 +5986,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
5981
5986
|
};
|
|
5982
5987
|
}
|
|
5983
5988
|
});
|
|
5984
|
-
const UiThemeToggle = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-
|
|
5989
|
+
const UiThemeToggle = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-9feda151"]]);
|
|
5985
5990
|
const _hoisted_1$s = {
|
|
5986
5991
|
key: 0,
|
|
5987
5992
|
class: "slider-header"
|
|
@@ -6045,7 +6050,6 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
6045
6050
|
tickCount: { default: 5 },
|
|
6046
6051
|
unit: { default: "" },
|
|
6047
6052
|
size: { default: "md" },
|
|
6048
|
-
color: { default: "primary" },
|
|
6049
6053
|
inputId: {}
|
|
6050
6054
|
},
|
|
6051
6055
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
@@ -6067,9 +6071,6 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
6067
6071
|
const sizeClasses = computed(() => {
|
|
6068
6072
|
return `slider-size-${props.size}`;
|
|
6069
6073
|
});
|
|
6070
|
-
const colorClasses = computed(() => {
|
|
6071
|
-
return props.color ? `slider-color-${props.color}` : "";
|
|
6072
|
-
});
|
|
6073
6074
|
const tickMarks = computed(() => {
|
|
6074
6075
|
if (!props.showTicks) return [];
|
|
6075
6076
|
const ticks = [];
|
|
@@ -6128,7 +6129,6 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
6128
6129
|
return openBlock(), createElementBlock("div", {
|
|
6129
6130
|
class: normalizeClass(["slider-wrapper", [
|
|
6130
6131
|
sizeClasses.value,
|
|
6131
|
-
colorClasses.value,
|
|
6132
6132
|
{
|
|
6133
6133
|
"slider-disabled": _ctx.disabled,
|
|
6134
6134
|
"slider-dragging": isDragging.value
|
|
@@ -6204,7 +6204,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
6204
6204
|
};
|
|
6205
6205
|
}
|
|
6206
6206
|
});
|
|
6207
|
-
const UiSlider = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-
|
|
6207
|
+
const UiSlider = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-39aa55d9"]]);
|
|
6208
6208
|
const _hoisted_1$r = {
|
|
6209
6209
|
key: 0,
|
|
6210
6210
|
class: "radio-group-label"
|
|
@@ -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$5 = { 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$5, [
|
|
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$4 = {
|
|
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$4, [..._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$3 = { 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$3, [
|
|
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$2 = { 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$2, 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 = { class: "profile-field-section" };
|
|
12381
|
+
const _hoisted_22$1 = { 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$1, [
|
|
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,45 +13947,58 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13947
13947
|
};
|
|
13948
13948
|
}
|
|
13949
13949
|
});
|
|
13950
|
-
const _hoisted_1$3 =
|
|
13951
|
-
|
|
13952
|
-
|
|
13953
|
-
|
|
13950
|
+
const _hoisted_1$3 = {
|
|
13951
|
+
key: 0,
|
|
13952
|
+
class: "mini-profile-avatar-wrapper"
|
|
13953
|
+
};
|
|
13954
|
+
const _hoisted_2$2 = ["src", "alt", "width", "height"];
|
|
13955
|
+
const _hoisted_3$2 = {
|
|
13954
13956
|
key: 1,
|
|
13955
13957
|
class: "mini-profile-avatar-default"
|
|
13956
13958
|
};
|
|
13957
|
-
const
|
|
13958
|
-
|
|
13959
|
-
|
|
13960
|
-
|
|
13961
|
-
const
|
|
13959
|
+
const _hoisted_4$2 = {
|
|
13960
|
+
key: 1,
|
|
13961
|
+
class: "avatar-wrapper"
|
|
13962
|
+
};
|
|
13963
|
+
const _hoisted_5$1 = ["src", "alt", "width", "height"];
|
|
13964
|
+
const _hoisted_6$1 = {
|
|
13962
13965
|
key: 1,
|
|
13963
13966
|
class: "avatar-default"
|
|
13964
13967
|
};
|
|
13965
|
-
const
|
|
13966
|
-
const _hoisted_11$1 = ["onKeydown"];
|
|
13967
|
-
const _hoisted_12$1 = { class: "dropdown-content" };
|
|
13968
|
-
const _hoisted_13$1 = {
|
|
13968
|
+
const _hoisted_7$1 = {
|
|
13969
13969
|
key: 0,
|
|
13970
|
-
class: "
|
|
13970
|
+
class: "mini-profile-content"
|
|
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"
|
|
13971
13977
|
};
|
|
13978
|
+
const _hoisted_11$1 = { class: "user-name" };
|
|
13979
|
+
const _hoisted_12$1 = ["onKeydown"];
|
|
13980
|
+
const _hoisted_13$1 = { class: "dropdown-content" };
|
|
13972
13981
|
const _hoisted_14$1 = {
|
|
13982
|
+
key: 0,
|
|
13983
|
+
class: "dropdown-header"
|
|
13984
|
+
};
|
|
13985
|
+
const _hoisted_15$1 = {
|
|
13973
13986
|
key: 0,
|
|
13974
13987
|
class: "dropdown-avatar-container"
|
|
13975
13988
|
};
|
|
13976
|
-
const
|
|
13977
|
-
const
|
|
13989
|
+
const _hoisted_16$1 = ["src", "alt"];
|
|
13990
|
+
const _hoisted_17$1 = {
|
|
13978
13991
|
key: 1,
|
|
13979
13992
|
class: "dropdown-avatar-default"
|
|
13980
13993
|
};
|
|
13981
|
-
const
|
|
13982
|
-
const
|
|
13983
|
-
const
|
|
13984
|
-
const
|
|
13994
|
+
const _hoisted_18$1 = { class: "dropdown-user-details" };
|
|
13995
|
+
const _hoisted_19 = { class: "dropdown-user-name" };
|
|
13996
|
+
const _hoisted_20 = { class: "dropdown-user-email" };
|
|
13997
|
+
const _hoisted_21 = {
|
|
13985
13998
|
key: 1,
|
|
13986
13999
|
class: "dropdown-divider"
|
|
13987
14000
|
};
|
|
13988
|
-
const
|
|
14001
|
+
const _hoisted_22 = { class: "sign-in-auth-wrapper" };
|
|
13989
14002
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
13990
14003
|
__name: "StrandsUserButton",
|
|
13991
14004
|
props: {
|
|
@@ -13995,8 +14008,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
13995
14008
|
redirectUrl: { default: "/" },
|
|
13996
14009
|
user: { default: void 0 },
|
|
13997
14010
|
menuAlign: { default: "right" },
|
|
13998
|
-
menuVerticalAlign: { default: "bottom" }
|
|
13999
|
-
fullWidth: { type: Boolean, default: false }
|
|
14011
|
+
menuVerticalAlign: { default: "bottom" }
|
|
14000
14012
|
},
|
|
14001
14013
|
emits: ["profile-updated", "signed-out", "signed-in"],
|
|
14002
14014
|
setup(__props, { emit: __emit }) {
|
|
@@ -14009,7 +14021,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14009
14021
|
const containerRef = ref();
|
|
14010
14022
|
const triggerRef = ref();
|
|
14011
14023
|
const dropdownRef = ref();
|
|
14012
|
-
const triggerElement = computed(() =>
|
|
14024
|
+
const triggerElement = computed(() => {
|
|
14025
|
+
const element = triggerRef.value?.$el;
|
|
14026
|
+
return element;
|
|
14027
|
+
});
|
|
14013
14028
|
const { floatingStyle, updatePosition } = useFloatingPosition({
|
|
14014
14029
|
trigger: triggerElement,
|
|
14015
14030
|
floating: dropdownRef,
|
|
@@ -14024,18 +14039,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14024
14039
|
}
|
|
14025
14040
|
});
|
|
14026
14041
|
const avatarSize = computed(() => {
|
|
14027
|
-
if (props.variant === "mini-profile") {
|
|
14028
|
-
switch (props.size) {
|
|
14029
|
-
case "sm":
|
|
14030
|
-
return 32;
|
|
14031
|
-
case "md":
|
|
14032
|
-
return 44;
|
|
14033
|
-
case "lg":
|
|
14034
|
-
return 56;
|
|
14035
|
-
default:
|
|
14036
|
-
return 44;
|
|
14037
|
-
}
|
|
14038
|
-
}
|
|
14039
14042
|
switch (props.size) {
|
|
14040
14043
|
case "sm":
|
|
14041
14044
|
return 24;
|
|
@@ -14139,7 +14142,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14139
14142
|
onClick: openSignIn,
|
|
14140
14143
|
"aria-label": "Sign in"
|
|
14141
14144
|
}, {
|
|
14142
|
-
"leading-icon": withCtx(() => [..._cache[
|
|
14145
|
+
"leading-icon": withCtx(() => [..._cache[8] || (_cache[8] = [
|
|
14143
14146
|
createElementVNode("svg", {
|
|
14144
14147
|
class: "sign-in-icon",
|
|
14145
14148
|
fill: "none",
|
|
@@ -14155,7 +14158,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14155
14158
|
], -1)
|
|
14156
14159
|
])]),
|
|
14157
14160
|
default: withCtx(() => [
|
|
14158
|
-
_cache[
|
|
14161
|
+
_cache[9] || (_cache[9] = createTextVNode(" Sign In ", -1))
|
|
14159
14162
|
]),
|
|
14160
14163
|
_: 1
|
|
14161
14164
|
}),
|
|
@@ -14165,7 +14168,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14165
14168
|
"fullscreen-on-mobile": false
|
|
14166
14169
|
}, {
|
|
14167
14170
|
default: withCtx(() => [
|
|
14168
|
-
createElementVNode("div",
|
|
14171
|
+
createElementVNode("div", _hoisted_22, [
|
|
14169
14172
|
createVNode(unref(StrandsAuth), {
|
|
14170
14173
|
onSignedIn: handleSignedIn,
|
|
14171
14174
|
onError: handleSignInError,
|
|
@@ -14184,82 +14187,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14184
14187
|
})
|
|
14185
14188
|
]),
|
|
14186
14189
|
default: withCtx(() => [
|
|
14187
|
-
|
|
14188
|
-
|
|
14189
|
-
ref_key: "triggerRef",
|
|
14190
|
-
ref: triggerRef,
|
|
14191
|
-
class: normalizeClass(["mini-profile-static-card", `user-button-size-${_ctx.size}`, { "mini-profile-active": showDropdown.value, "full-width": _ctx.fullWidth }]),
|
|
14192
|
-
onClick: toggleDropdown,
|
|
14193
|
-
onKeydown: [
|
|
14194
|
-
withKeys(toggleDropdown, ["enter"]),
|
|
14195
|
-
withKeys(withModifiers(toggleDropdown, ["prevent"]), ["space"]),
|
|
14196
|
-
withKeys(closeDropdown, ["escape"]),
|
|
14197
|
-
withKeys(withModifiers(openDropdown, ["prevent"]), ["arrow-down"])
|
|
14198
|
-
],
|
|
14199
|
-
role: "button",
|
|
14200
|
-
tabindex: "0",
|
|
14201
|
-
"aria-haspopup": "true",
|
|
14202
|
-
"aria-expanded": showDropdown.value,
|
|
14203
|
-
"aria-label": "User menu"
|
|
14204
|
-
}, [
|
|
14205
|
-
createElementVNode("div", _hoisted_2$2, [
|
|
14206
|
-
createVNode(unref(UiLevelProgress), {
|
|
14207
|
-
size: avatarSizeWithProgress.value,
|
|
14208
|
-
value: user.value?.xp || 0,
|
|
14209
|
-
max: user.value?.next_level_xp || 100,
|
|
14210
|
-
level: user.value?.level || 1,
|
|
14211
|
-
"level-label": `LEVEL ${user.value?.level || 1}`,
|
|
14212
|
-
"user-settings": user.value?.settings,
|
|
14213
|
-
class: "mini-profile-level-progress"
|
|
14214
|
-
}, null, 8, ["size", "value", "max", "level", "level-label", "user-settings"]),
|
|
14215
|
-
user.value?.avatar ? (openBlock(), createElementBlock("img", {
|
|
14216
|
-
key: 0,
|
|
14217
|
-
src: user.value.avatar,
|
|
14218
|
-
alt: `${user.value?.firstName || user.value?.email}'s avatar`,
|
|
14219
|
-
class: "mini-profile-avatar-image",
|
|
14220
|
-
width: avatarSize.value,
|
|
14221
|
-
height: avatarSize.value,
|
|
14222
|
-
loading: "eager"
|
|
14223
|
-
}, null, 8, _hoisted_3$2)) : (openBlock(), createElementBlock("div", _hoisted_4$2, [..._cache[2] || (_cache[2] = [
|
|
14224
|
-
createElementVNode("svg", {
|
|
14225
|
-
class: "mini-profile-avatar-icon",
|
|
14226
|
-
fill: "currentColor",
|
|
14227
|
-
viewBox: "0 0 20 20"
|
|
14228
|
-
}, [
|
|
14229
|
-
createElementVNode("path", {
|
|
14230
|
-
"fill-rule": "evenodd",
|
|
14231
|
-
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
|
14232
|
-
"clip-rule": "evenodd"
|
|
14233
|
-
})
|
|
14234
|
-
], -1)
|
|
14235
|
-
])]))
|
|
14236
|
-
]),
|
|
14237
|
-
createElementVNode("div", _hoisted_5$1, [
|
|
14238
|
-
createElementVNode("div", _hoisted_6$1, toDisplayString(displayName.value), 1),
|
|
14239
|
-
createElementVNode("div", _hoisted_7$1, toDisplayString(user.value?.email), 1)
|
|
14240
|
-
]),
|
|
14241
|
-
(openBlock(), createElementBlock("svg", {
|
|
14242
|
-
class: normalizeClass(["mini-profile-dropdown-arrow", { "dropdown-arrow-open": showDropdown.value }]),
|
|
14243
|
-
fill: "none",
|
|
14244
|
-
stroke: "currentColor",
|
|
14245
|
-
viewBox: "0 0 24 24"
|
|
14246
|
-
}, [..._cache[3] || (_cache[3] = [
|
|
14247
|
-
createElementVNode("path", {
|
|
14248
|
-
"stroke-linecap": "round",
|
|
14249
|
-
"stroke-linejoin": "round",
|
|
14250
|
-
"stroke-width": "2",
|
|
14251
|
-
d: "M19 9l-7 7-7-7"
|
|
14252
|
-
}, null, -1)
|
|
14253
|
-
])], 2))
|
|
14254
|
-
], 42, _hoisted_1$3)) : (openBlock(), createElementBlock("div", {
|
|
14255
|
-
key: 1,
|
|
14256
|
-
ref_key: "triggerRef",
|
|
14257
|
-
ref: triggerRef,
|
|
14258
|
-
class: normalizeClass(["user-button-wrapper", { "full-width": _ctx.fullWidth }])
|
|
14190
|
+
createElementVNode("div", {
|
|
14191
|
+
class: normalizeClass(["user-button-wrapper", `user-button-size-${_ctx.size}`, _ctx.variant === "mini-profile" && "user-button-mini-profile"])
|
|
14259
14192
|
}, [
|
|
14260
14193
|
createVNode(unref(CompoundUiButton), {
|
|
14194
|
+
ref_key: "triggerRef",
|
|
14195
|
+
ref: triggerRef,
|
|
14261
14196
|
color: "secondary",
|
|
14262
|
-
size: _ctx.size,
|
|
14263
14197
|
active: showDropdown.value,
|
|
14264
14198
|
onClick: toggleDropdown,
|
|
14265
14199
|
onKeydown: [
|
|
@@ -14273,27 +14207,60 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14273
14207
|
"aria-label": "User menu"
|
|
14274
14208
|
}, {
|
|
14275
14209
|
"leading-icon": withCtx(() => [
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14282
|
-
|
|
14283
|
-
|
|
14284
|
-
|
|
14285
|
-
|
|
14286
|
-
|
|
14287
|
-
|
|
14288
|
-
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14210
|
+
_ctx.variant === "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
14211
|
+
createVNode(unref(UiLevelProgress), {
|
|
14212
|
+
size: avatarSizeWithProgress.value,
|
|
14213
|
+
value: user.value?.xp || 0,
|
|
14214
|
+
max: user.value?.next_level_xp || 100,
|
|
14215
|
+
level: user.value?.level || 1,
|
|
14216
|
+
"level-label": `${user.value?.level || 1}`,
|
|
14217
|
+
"user-settings": user.value?.settings,
|
|
14218
|
+
class: "mini-profile-level-progress"
|
|
14219
|
+
}, null, 8, ["size", "value", "max", "level", "level-label", "user-settings"]),
|
|
14220
|
+
user.value?.avatar ? (openBlock(), createElementBlock("img", {
|
|
14221
|
+
key: 0,
|
|
14222
|
+
src: user.value.avatar,
|
|
14223
|
+
alt: `${user.value?.firstName || user.value?.email}'s avatar`,
|
|
14224
|
+
class: "mini-profile-avatar-image",
|
|
14225
|
+
width: avatarSize.value,
|
|
14226
|
+
height: avatarSize.value,
|
|
14227
|
+
loading: "eager"
|
|
14228
|
+
}, null, 8, _hoisted_2$2)) : (openBlock(), createElementBlock("div", _hoisted_3$2, [..._cache[2] || (_cache[2] = [
|
|
14229
|
+
createElementVNode("svg", {
|
|
14230
|
+
class: "mini-profile-avatar-icon",
|
|
14231
|
+
fill: "currentColor",
|
|
14232
|
+
viewBox: "0 0 20 20"
|
|
14233
|
+
}, [
|
|
14234
|
+
createElementVNode("path", {
|
|
14235
|
+
"fill-rule": "evenodd",
|
|
14236
|
+
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
|
14237
|
+
"clip-rule": "evenodd"
|
|
14238
|
+
})
|
|
14239
|
+
], -1)
|
|
14240
|
+
])]))
|
|
14241
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
14242
|
+
user.value?.avatar ? (openBlock(), createElementBlock("img", {
|
|
14243
|
+
key: 0,
|
|
14244
|
+
src: user.value.avatar,
|
|
14245
|
+
alt: `${user.value?.firstName || user.value?.email}'s avatar`,
|
|
14246
|
+
class: "avatar-image",
|
|
14247
|
+
width: avatarSize.value,
|
|
14248
|
+
height: avatarSize.value,
|
|
14249
|
+
loading: "eager"
|
|
14250
|
+
}, null, 8, _hoisted_5$1)) : (openBlock(), createElementBlock("div", _hoisted_6$1, [..._cache[3] || (_cache[3] = [
|
|
14251
|
+
createElementVNode("svg", {
|
|
14252
|
+
class: "avatar-icon",
|
|
14253
|
+
fill: "currentColor",
|
|
14254
|
+
viewBox: "0 0 20 20"
|
|
14255
|
+
}, [
|
|
14256
|
+
createElementVNode("path", {
|
|
14257
|
+
"fill-rule": "evenodd",
|
|
14258
|
+
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
|
14259
|
+
"clip-rule": "evenodd"
|
|
14260
|
+
})
|
|
14261
|
+
], -1)
|
|
14262
|
+
])]))
|
|
14263
|
+
]))
|
|
14297
14264
|
]),
|
|
14298
14265
|
"trailing-icon": withCtx(() => [
|
|
14299
14266
|
(openBlock(), createElementBlock("svg", {
|
|
@@ -14301,7 +14268,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14301
14268
|
fill: "none",
|
|
14302
14269
|
stroke: "currentColor",
|
|
14303
14270
|
viewBox: "0 0 24 24"
|
|
14304
|
-
}, [..._cache[
|
|
14271
|
+
}, [..._cache[4] || (_cache[4] = [
|
|
14305
14272
|
createElementVNode("path", {
|
|
14306
14273
|
"stroke-linecap": "round",
|
|
14307
14274
|
"stroke-linejoin": "round",
|
|
@@ -14311,11 +14278,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14311
14278
|
])], 2))
|
|
14312
14279
|
]),
|
|
14313
14280
|
default: withCtx(() => [
|
|
14314
|
-
|
|
14281
|
+
_ctx.variant === "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
14282
|
+
createElementVNode("div", _hoisted_8$1, toDisplayString(displayName.value), 1),
|
|
14283
|
+
createElementVNode("div", _hoisted_9$1, toDisplayString(user.value?.email), 1)
|
|
14284
|
+
])) : !_ctx.hideUser ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
|
|
14285
|
+
createElementVNode("div", _hoisted_11$1, toDisplayString(displayName.value), 1)
|
|
14286
|
+
])) : createCommentVNode("", true)
|
|
14315
14287
|
]),
|
|
14316
14288
|
_: 1
|
|
14317
|
-
}, 8, ["
|
|
14318
|
-
], 2)
|
|
14289
|
+
}, 8, ["active", "onKeydown", "aria-expanded"])
|
|
14290
|
+
], 2),
|
|
14319
14291
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
14320
14292
|
showDropdown.value ? (openBlock(), createElementBlock("div", {
|
|
14321
14293
|
key: 0,
|
|
@@ -14333,9 +14305,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14333
14305
|
withKeys(withModifiers(focusLast, ["prevent"]), ["end"])
|
|
14334
14306
|
]
|
|
14335
14307
|
}, [
|
|
14336
|
-
createElementVNode("div",
|
|
14337
|
-
_ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div",
|
|
14338
|
-
user.value ? (openBlock(), createElementBlock("div",
|
|
14308
|
+
createElementVNode("div", _hoisted_13$1, [
|
|
14309
|
+
_ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
|
|
14310
|
+
user.value ? (openBlock(), createElementBlock("div", _hoisted_15$1, [
|
|
14339
14311
|
createVNode(unref(UiLevelProgress), {
|
|
14340
14312
|
size: 80,
|
|
14341
14313
|
value: user.value.xp,
|
|
@@ -14352,7 +14324,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14352
14324
|
class: "dropdown-avatar-image",
|
|
14353
14325
|
width: "64",
|
|
14354
14326
|
height: "64"
|
|
14355
|
-
}, null, 8,
|
|
14327
|
+
}, null, 8, _hoisted_16$1)) : (openBlock(), createElementBlock("div", _hoisted_17$1, [..._cache[5] || (_cache[5] = [
|
|
14356
14328
|
createElementVNode("svg", {
|
|
14357
14329
|
class: "dropdown-avatar-icon",
|
|
14358
14330
|
fill: "currentColor",
|
|
@@ -14366,20 +14338,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14366
14338
|
], -1)
|
|
14367
14339
|
])]))
|
|
14368
14340
|
])) : createCommentVNode("", true),
|
|
14369
|
-
createElementVNode("div",
|
|
14370
|
-
createElementVNode("div",
|
|
14371
|
-
createElementVNode("div",
|
|
14341
|
+
createElementVNode("div", _hoisted_18$1, [
|
|
14342
|
+
createElementVNode("div", _hoisted_19, toDisplayString(displayName.value), 1),
|
|
14343
|
+
createElementVNode("div", _hoisted_20, toDisplayString(user.value?.email), 1)
|
|
14372
14344
|
])
|
|
14373
14345
|
])) : createCommentVNode("", true),
|
|
14374
14346
|
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
14375
|
-
_ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div",
|
|
14347
|
+
_ctx.variant !== "mini-profile" ? (openBlock(), createElementBlock("div", _hoisted_21)) : createCommentVNode("", true),
|
|
14376
14348
|
createVNode(unref(StrandsNav), null, {
|
|
14377
14349
|
default: withCtx(() => [
|
|
14378
14350
|
createVNode(unref(StrandsNav).Item, {
|
|
14379
14351
|
color: "secondary",
|
|
14380
14352
|
onClick: openProfile
|
|
14381
14353
|
}, {
|
|
14382
|
-
default: withCtx(() => [..._cache[
|
|
14354
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
14383
14355
|
createTextVNode("Profile", -1)
|
|
14384
14356
|
])]),
|
|
14385
14357
|
_: 1
|
|
@@ -14388,7 +14360,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14388
14360
|
color: "danger",
|
|
14389
14361
|
onClick: handleSignOut
|
|
14390
14362
|
}, {
|
|
14391
|
-
default: withCtx(() => [..._cache[
|
|
14363
|
+
default: withCtx(() => [..._cache[7] || (_cache[7] = [
|
|
14392
14364
|
createTextVNode("Sign Out", -1)
|
|
14393
14365
|
])]),
|
|
14394
14366
|
_: 1
|
|
@@ -14397,7 +14369,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14397
14369
|
_: 1
|
|
14398
14370
|
})
|
|
14399
14371
|
])
|
|
14400
|
-
], 44,
|
|
14372
|
+
], 44, _hoisted_12$1)) : createCommentVNode("", true)
|
|
14401
14373
|
])),
|
|
14402
14374
|
createVNode(unref(UiModal), {
|
|
14403
14375
|
modelValue: showProfileModal.value,
|
|
@@ -14420,7 +14392,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14420
14392
|
};
|
|
14421
14393
|
}
|
|
14422
14394
|
});
|
|
14423
|
-
const StrandsUserButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
14395
|
+
const StrandsUserButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-18942543"]]);
|
|
14424
14396
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
14425
14397
|
__name: "StrandsNav",
|
|
14426
14398
|
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-C9rrMU2i.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;
|