accessify-widget 0.2.22 → 0.3.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.
- package/dist/accessify.min.js +1 -1
- package/dist/accessify.min.js.map +1 -1
- package/dist/accessify.mjs +1 -1
- package/dist/{index-B9BgMU66.js → index-CFoky8Ty.js} +210 -44
- package/dist/index-CFoky8Ty.js.map +1 -0
- package/dist/{keyboard-nav-cvuhPLSY.js → keyboard-nav-B66DnefL.js} +2 -2
- package/dist/{keyboard-nav-cvuhPLSY.js.map → keyboard-nav-B66DnefL.js.map} +1 -1
- package/dist/{page-structure-XImoLRLq.js → page-structure-C76rueHv.js} +2 -2
- package/dist/{page-structure-XImoLRLq.js.map → page-structure-C76rueHv.js.map} +1 -1
- package/dist/widget.js +1 -1
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/dist/index-B9BgMU66.js.map +0 -1
package/dist/accessify.mjs
CHANGED
|
@@ -4245,6 +4245,9 @@ function to_class(value, hash, directives) {
|
|
|
4245
4245
|
}
|
|
4246
4246
|
return classname === "" ? null : classname;
|
|
4247
4247
|
}
|
|
4248
|
+
function to_style(value, styles) {
|
|
4249
|
+
return value == null ? null : String(value);
|
|
4250
|
+
}
|
|
4248
4251
|
function set_class(dom, is_html, value, hash, prev_classes, next_classes) {
|
|
4249
4252
|
var prev = dom.__className;
|
|
4250
4253
|
if (prev !== value || prev === void 0) {
|
|
@@ -4269,6 +4272,21 @@ function set_class(dom, is_html, value, hash, prev_classes, next_classes) {
|
|
|
4269
4272
|
}
|
|
4270
4273
|
return next_classes;
|
|
4271
4274
|
}
|
|
4275
|
+
function set_style(dom, value, prev_styles, next_styles) {
|
|
4276
|
+
var prev = dom.__style;
|
|
4277
|
+
if (prev !== value) {
|
|
4278
|
+
var next_style_attr = to_style(value);
|
|
4279
|
+
{
|
|
4280
|
+
if (next_style_attr == null) {
|
|
4281
|
+
dom.removeAttribute("style");
|
|
4282
|
+
} else {
|
|
4283
|
+
dom.style.cssText = next_style_attr;
|
|
4284
|
+
}
|
|
4285
|
+
}
|
|
4286
|
+
dom.__style = value;
|
|
4287
|
+
}
|
|
4288
|
+
return next_styles;
|
|
4289
|
+
}
|
|
4272
4290
|
const IS_CUSTOM_ELEMENT = Symbol("is custom element");
|
|
4273
4291
|
const IS_HTML = Symbol("is html");
|
|
4274
4292
|
function set_attribute(element, attribute, value, skip_warning) {
|
|
@@ -5773,7 +5791,6 @@ function TriggerButton($$anchor, $$props) {
|
|
|
5773
5791
|
let hasMoved = false;
|
|
5774
5792
|
let pointerId = null;
|
|
5775
5793
|
function onDown(e) {
|
|
5776
|
-
if ($$props.isOpen) return;
|
|
5777
5794
|
const rect = btn.getBoundingClientRect();
|
|
5778
5795
|
dragStartX = e.clientX;
|
|
5779
5796
|
dragStartY = e.clientY;
|
|
@@ -5822,11 +5839,14 @@ function TriggerButton($$anchor, $$props) {
|
|
|
5822
5839
|
});
|
|
5823
5840
|
var button = root$5();
|
|
5824
5841
|
let classes;
|
|
5825
|
-
html(button,
|
|
5842
|
+
html(button, iconAccessibility, true);
|
|
5826
5843
|
bind_this(button, ($$value) => el($$value), () => el());
|
|
5827
5844
|
template_effect(
|
|
5828
5845
|
($0) => {
|
|
5829
|
-
classes = set_class(button, 1, "accessify-trigger", null, classes, {
|
|
5846
|
+
classes = set_class(button, 1, "accessify-trigger", null, classes, {
|
|
5847
|
+
"accessify-trigger--dragging": get(isDragging),
|
|
5848
|
+
"accessify-trigger--hidden": $$props.isOpen
|
|
5849
|
+
});
|
|
5830
5850
|
set_attribute(button, "aria-expanded", $$props.isOpen);
|
|
5831
5851
|
set_attribute(button, "aria-label", $0);
|
|
5832
5852
|
},
|
|
@@ -5837,31 +5857,93 @@ function TriggerButton($$anchor, $$props) {
|
|
|
5837
5857
|
append($$anchor, button);
|
|
5838
5858
|
pop();
|
|
5839
5859
|
}
|
|
5840
|
-
var root$4 = /* @__PURE__ */ from_html(`<header class="accessify-header"><div class="accessify-header-left"><span class="accessify-logo" aria-label="Accessify"><svg viewBox="0 0 480 80" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><text x="0" y="64" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="72" font-weight="700" letter-spacing="-2">accessify</text></svg></span></div> <div class="accessify-header-actions"><button class="accessify-header-btn"></button> <button class="accessify-header-btn accessify-header-btn--icon accessify-header-btn--close"></button></div></header>`);
|
|
5860
|
+
var root$4 = /* @__PURE__ */ from_html(`<header class="accessify-header"><div class="accessify-header-left"><span class="accessify-logo" aria-label="Accessify"><svg viewBox="0 0 480 80" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><text x="0" y="64" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="72" font-weight="700" letter-spacing="-2">accessify</text></svg></span></div> <div class="accessify-header-actions"><button class="accessify-header-btn accessify-drag-handle"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><line x1="8" y1="6" x2="8" y2="6.01"></line><line x1="16" y1="6" x2="16" y2="6.01"></line><line x1="8" y1="12" x2="8" y2="12.01"></line><line x1="16" y1="12" x2="16" y2="12.01"></line><line x1="8" y1="18" x2="8" y2="18.01"></line><line x1="16" y1="18" x2="16" y2="18.01"></line></svg></button> <button class="accessify-header-btn"></button> <button class="accessify-header-btn accessify-header-btn--icon accessify-header-btn--close"></button></div></header>`);
|
|
5841
5861
|
function PanelHeader($$anchor, $$props) {
|
|
5842
5862
|
push($$props, true);
|
|
5843
5863
|
let lang = prop($$props, "lang", 3, "en");
|
|
5844
5864
|
prop($$props, "activeCount", 3, 0);
|
|
5865
|
+
let panelEl = prop($$props, "panelEl", 3, null);
|
|
5866
|
+
let dragHandleEl = /* @__PURE__ */ state(null);
|
|
5867
|
+
onMount(() => {
|
|
5868
|
+
const handle = get(dragHandleEl);
|
|
5869
|
+
if (!handle) return;
|
|
5870
|
+
let dragStartX = 0;
|
|
5871
|
+
let startLeft = 0;
|
|
5872
|
+
let hasMoved = false;
|
|
5873
|
+
let pointerId = null;
|
|
5874
|
+
function onDown(e) {
|
|
5875
|
+
const panel = panelEl();
|
|
5876
|
+
if (!panel) return;
|
|
5877
|
+
const rect = panel.getBoundingClientRect();
|
|
5878
|
+
dragStartX = e.clientX;
|
|
5879
|
+
startLeft = rect.left;
|
|
5880
|
+
hasMoved = false;
|
|
5881
|
+
pointerId = e.pointerId;
|
|
5882
|
+
handle.setPointerCapture(e.pointerId);
|
|
5883
|
+
e.preventDefault();
|
|
5884
|
+
}
|
|
5885
|
+
function onMove(e) {
|
|
5886
|
+
if (pointerId === null || e.pointerId !== pointerId) return;
|
|
5887
|
+
const panel = panelEl();
|
|
5888
|
+
if (!panel) return;
|
|
5889
|
+
const dx = e.clientX - dragStartX;
|
|
5890
|
+
if (!hasMoved && Math.abs(dx) > 5) {
|
|
5891
|
+
hasMoved = true;
|
|
5892
|
+
panel.style.transition = "none";
|
|
5893
|
+
}
|
|
5894
|
+
if (hasMoved) {
|
|
5895
|
+
const panelW = panel.offsetWidth;
|
|
5896
|
+
const newLeft = Math.max(0, Math.min(window.innerWidth - panelW, startLeft + dx));
|
|
5897
|
+
panel.style.left = newLeft + "px";
|
|
5898
|
+
panel.style.right = "auto";
|
|
5899
|
+
}
|
|
5900
|
+
}
|
|
5901
|
+
function onUp(e) {
|
|
5902
|
+
if (pointerId === null || e.pointerId !== pointerId) return;
|
|
5903
|
+
handle.releasePointerCapture(e.pointerId);
|
|
5904
|
+
const panel = panelEl();
|
|
5905
|
+
if (panel) {
|
|
5906
|
+
panel.style.transition = "";
|
|
5907
|
+
if (hasMoved) {
|
|
5908
|
+
const rect = panel.getBoundingClientRect();
|
|
5909
|
+
$$props.ondrag(rect.left);
|
|
5910
|
+
}
|
|
5911
|
+
}
|
|
5912
|
+
pointerId = null;
|
|
5913
|
+
hasMoved = false;
|
|
5914
|
+
}
|
|
5915
|
+
handle.addEventListener("pointerdown", onDown);
|
|
5916
|
+
handle.addEventListener("pointermove", onMove);
|
|
5917
|
+
handle.addEventListener("pointerup", onUp);
|
|
5918
|
+
return () => {
|
|
5919
|
+
handle.removeEventListener("pointerdown", onDown);
|
|
5920
|
+
handle.removeEventListener("pointermove", onMove);
|
|
5921
|
+
handle.removeEventListener("pointerup", onUp);
|
|
5922
|
+
};
|
|
5923
|
+
});
|
|
5845
5924
|
var header = root$4();
|
|
5846
5925
|
var div = sibling(child(header), 2);
|
|
5847
5926
|
var button = child(div);
|
|
5848
|
-
|
|
5927
|
+
bind_this(button, ($$value) => set(dragHandleEl, $$value), () => get(dragHandleEl));
|
|
5849
5928
|
var button_1 = sibling(button, 2);
|
|
5850
|
-
html(button_1,
|
|
5929
|
+
html(button_1, iconReset, true);
|
|
5930
|
+
var button_2 = sibling(button_1, 2);
|
|
5931
|
+
html(button_2, iconClose, true);
|
|
5851
5932
|
template_effect(
|
|
5852
5933
|
($0, $1) => {
|
|
5853
|
-
set_attribute(button, "aria-label",
|
|
5854
|
-
set_attribute(button_1, "aria-label", $
|
|
5934
|
+
set_attribute(button, "aria-label", lang() === "de" ? "Panel verschieben" : "Move panel");
|
|
5935
|
+
set_attribute(button_1, "aria-label", $0);
|
|
5936
|
+
set_attribute(button_2, "aria-label", $1);
|
|
5855
5937
|
},
|
|
5856
5938
|
[
|
|
5857
5939
|
() => t("widget.reset", lang()),
|
|
5858
5940
|
() => t("widget.close", lang())
|
|
5859
5941
|
]
|
|
5860
5942
|
);
|
|
5861
|
-
delegated("click",
|
|
5943
|
+
delegated("click", button_1, function(...$$args) {
|
|
5862
5944
|
$$props.onreset?.apply(this, $$args);
|
|
5863
5945
|
});
|
|
5864
|
-
delegated("click",
|
|
5946
|
+
delegated("click", button_2, function(...$$args) {
|
|
5865
5947
|
$$props.onclose?.apply(this, $$args);
|
|
5866
5948
|
});
|
|
5867
5949
|
append($$anchor, header);
|
|
@@ -6351,14 +6433,14 @@ function FeatureGrid($$anchor, $$props) {
|
|
|
6351
6433
|
const FEATURE_LOADERS = {
|
|
6352
6434
|
contrast: () => import("./contrast-CqsICAkU.js"),
|
|
6353
6435
|
"text-size": () => import("./text-size-C6OFhCGi.js"),
|
|
6354
|
-
"keyboard-nav": () => import("./keyboard-nav-
|
|
6436
|
+
"keyboard-nav": () => import("./keyboard-nav-B66DnefL.js"),
|
|
6355
6437
|
"link-highlight": () => import("./link-highlight-DBGm067Y.js"),
|
|
6356
6438
|
"reading-guide": () => import("./reading-guide-VT8NciIL.js"),
|
|
6357
6439
|
"reading-mask": () => import("./reading-mask-BABChuCz.js"),
|
|
6358
6440
|
"animation-stop": () => import("./animation-stop-C0MwseK0.js"),
|
|
6359
6441
|
"hide-images": () => import("./hide-images-B_LeCBcd.js"),
|
|
6360
6442
|
"big-cursor": () => import("./big-cursor-B2UKu9dQ.js"),
|
|
6361
|
-
"page-structure": () => import("./page-structure-
|
|
6443
|
+
"page-structure": () => import("./page-structure-C76rueHv.js"),
|
|
6362
6444
|
tts: () => import("./tts-CjszLRnb.js"),
|
|
6363
6445
|
"text-simplify": () => import("./text-simplify-Cvhpio7g.js"),
|
|
6364
6446
|
"alt-text": () => Promise.resolve().then(() => altText)
|
|
@@ -6636,12 +6718,13 @@ function FeatureGrid($$anchor, $$props) {
|
|
|
6636
6718
|
}
|
|
6637
6719
|
delegate(["click"]);
|
|
6638
6720
|
var root_1$1 = /* @__PURE__ */ from_html(`<span aria-hidden="true">·</span> <a target="_blank" rel="noopener noreferrer"> </a>`, 1);
|
|
6639
|
-
var root$1 = /* @__PURE__ */ from_html(`<div class="accessify-footer"><a target="_blank" rel="noopener noreferrer">Accessify Dashboard</a> <!></div>`);
|
|
6721
|
+
var root$1 = /* @__PURE__ */ from_html(`<div class="accessify-footer"><div class="accessify-footer-links"><a target="_blank" rel="noopener noreferrer">Accessify Dashboard</a> <!></div> <button class="accessify-footer-close"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg> <span> </span></button></div>`);
|
|
6640
6722
|
function PanelFooter($$anchor, $$props) {
|
|
6641
6723
|
push($$props, true);
|
|
6642
6724
|
let lang = prop($$props, "lang", 3, "en");
|
|
6643
6725
|
var div = root$1();
|
|
6644
|
-
var
|
|
6726
|
+
var div_1 = child(div);
|
|
6727
|
+
var a = child(div_1);
|
|
6645
6728
|
var node = sibling(a, 2);
|
|
6646
6729
|
{
|
|
6647
6730
|
var consequent = ($$anchor2) => {
|
|
@@ -6661,10 +6744,27 @@ function PanelFooter($$anchor, $$props) {
|
|
|
6661
6744
|
if ($$props.statementUrl) $$render(consequent);
|
|
6662
6745
|
});
|
|
6663
6746
|
}
|
|
6664
|
-
|
|
6747
|
+
var button = sibling(div_1, 2);
|
|
6748
|
+
var span = sibling(child(button), 2);
|
|
6749
|
+
var text_1 = child(span);
|
|
6750
|
+
template_effect(
|
|
6751
|
+
($0, $1) => {
|
|
6752
|
+
set_attribute(a, "href", $$props.dashboardUrl || "https://accessify-dashboard.pages.dev");
|
|
6753
|
+
set_attribute(button, "aria-label", $0);
|
|
6754
|
+
set_text(text_1, $1);
|
|
6755
|
+
},
|
|
6756
|
+
[
|
|
6757
|
+
() => t("widget.close", lang()),
|
|
6758
|
+
() => t("widget.close", lang())
|
|
6759
|
+
]
|
|
6760
|
+
);
|
|
6761
|
+
delegated("click", button, function(...$$args) {
|
|
6762
|
+
$$props.onclose?.apply(this, $$args);
|
|
6763
|
+
});
|
|
6665
6764
|
append($$anchor, div);
|
|
6666
6765
|
pop();
|
|
6667
6766
|
}
|
|
6767
|
+
delegate(["click"]);
|
|
6668
6768
|
let savedTextNodes = [];
|
|
6669
6769
|
let savedAttrs = [];
|
|
6670
6770
|
let currentTranslateLang = null;
|
|
@@ -6936,8 +7036,8 @@ function createTextTransformService() {
|
|
|
6936
7036
|
}
|
|
6937
7037
|
var root_3 = /* @__PURE__ */ from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"></path></svg>`);
|
|
6938
7038
|
var root_2 = /* @__PURE__ */ from_html(`<button class="accessify-lang-option" role="option"><span> </span> <!></button>`);
|
|
6939
|
-
var root_1 = /* @__PURE__ */ from_html(`<div class="accessify-lang-list" role="listbox"></div>`);
|
|
6940
|
-
var root = /* @__PURE__ */ from_html(`<div class="sr-only" role="status" aria-live="polite" aria-atomic="true"> </div> <!> <div class="accessify-panel" role="dialog"><!> <div class="accessify-body"><div class="accessify-lang-dropdown"><button class="accessify-lang-toggle"><span class="accessify-lang-toggle-left"><!> <span> </span></span> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg></button> <!></div> <div class="accessify-section-divider"></div> <!> <div class="accessify-section-divider"></div> <!></div> <!></div>`, 1);
|
|
7039
|
+
var root_1 = /* @__PURE__ */ from_html(`<div id="accessify-lang-list" class="accessify-lang-list" role="listbox"></div>`);
|
|
7040
|
+
var root = /* @__PURE__ */ from_html(`<div class="sr-only" role="status" aria-live="polite" aria-atomic="true"> </div> <!> <div class="accessify-panel" role="dialog"><!> <div class="accessify-body"><div class="accessify-lang-dropdown"><button class="accessify-lang-toggle" aria-controls="accessify-lang-list"><span class="accessify-lang-toggle-left"><!> <span> </span></span> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg></button> <!></div> <div class="accessify-section-divider"></div> <!> <div class="accessify-section-divider"></div> <!></div> <!></div>`, 1);
|
|
6941
7041
|
function WidgetApp($$anchor, $$props) {
|
|
6942
7042
|
push($$props, true);
|
|
6943
7043
|
let config2 = prop($$props, "config", 7);
|
|
@@ -6950,6 +7050,8 @@ function WidgetApp($$anchor, $$props) {
|
|
|
6950
7050
|
let widgetLang = /* @__PURE__ */ state("en");
|
|
6951
7051
|
let activeProfileId = /* @__PURE__ */ state(null);
|
|
6952
7052
|
let langDropdownOpen = /* @__PURE__ */ state(false);
|
|
7053
|
+
let panelX = /* @__PURE__ */ state(null);
|
|
7054
|
+
const PANEL_X_KEY = "accessify-panel-x";
|
|
6953
7055
|
const textTransformService = createTextTransformService();
|
|
6954
7056
|
const STORAGE_KEY = "accessify-prefs";
|
|
6955
7057
|
let activeCount = /* @__PURE__ */ user_derived(() => Array.from(get(activeFeatures).values()).filter(Boolean).length);
|
|
@@ -6967,6 +7069,10 @@ function WidgetApp($$anchor, $$props) {
|
|
|
6967
7069
|
const prefs = JSON.parse(saved);
|
|
6968
7070
|
set(activeFeatures, new Map(Object.entries(prefs)), true);
|
|
6969
7071
|
}
|
|
7072
|
+
const savedX = localStorage.getItem(PANEL_X_KEY);
|
|
7073
|
+
if (savedX !== null) {
|
|
7074
|
+
set(panelX, parseFloat(savedX), true);
|
|
7075
|
+
}
|
|
6970
7076
|
} catch {
|
|
6971
7077
|
}
|
|
6972
7078
|
}
|
|
@@ -7020,12 +7126,37 @@ function WidgetApp($$anchor, $$props) {
|
|
|
7020
7126
|
}
|
|
7021
7127
|
function close() {
|
|
7022
7128
|
set(isOpen, false);
|
|
7023
|
-
|
|
7024
|
-
|
|
7129
|
+
set(langDropdownOpen, false);
|
|
7130
|
+
requestAnimationFrame(() => {
|
|
7131
|
+
const trigger = $$props.shadow.querySelector(".accessify-trigger");
|
|
7132
|
+
trigger?.focus();
|
|
7133
|
+
});
|
|
7025
7134
|
}
|
|
7026
7135
|
function toggleOpen() {
|
|
7027
|
-
if (get(isOpen))
|
|
7028
|
-
|
|
7136
|
+
if (get(isOpen)) {
|
|
7137
|
+
close();
|
|
7138
|
+
} else {
|
|
7139
|
+
open();
|
|
7140
|
+
}
|
|
7141
|
+
}
|
|
7142
|
+
function handleLangChange(newLang) {
|
|
7143
|
+
set(widgetLang, getSupportedLang(newLang), true);
|
|
7144
|
+
config2().lang = get(widgetLang);
|
|
7145
|
+
set(langDropdownOpen, false);
|
|
7146
|
+
applyLanguage();
|
|
7147
|
+
const pageLang = document.documentElement.lang?.split("-")[0] || "en";
|
|
7148
|
+
if (get(widgetLang) !== pageLang) {
|
|
7149
|
+
textTransformService.translate(get(widgetLang));
|
|
7150
|
+
} else {
|
|
7151
|
+
textTransformService.restore();
|
|
7152
|
+
}
|
|
7153
|
+
}
|
|
7154
|
+
function handlePanelDrag(x) {
|
|
7155
|
+
set(panelX, x, true);
|
|
7156
|
+
try {
|
|
7157
|
+
localStorage.setItem(PANEL_X_KEY, String(x));
|
|
7158
|
+
} catch {
|
|
7159
|
+
}
|
|
7029
7160
|
}
|
|
7030
7161
|
function handleFeatureToggle(id, enabled) {
|
|
7031
7162
|
get(activeFeatures).set(id, enabled);
|
|
@@ -7064,23 +7195,18 @@ function WidgetApp($$anchor, $$props) {
|
|
|
7064
7195
|
savePrefs();
|
|
7065
7196
|
announce(`${t(profile.nameKey, get(widgetLang))} ${t("status.activated", get(widgetLang))}`);
|
|
7066
7197
|
}
|
|
7067
|
-
function handleLangChange(newLang) {
|
|
7068
|
-
set(widgetLang, getSupportedLang(newLang), true);
|
|
7069
|
-
config2().lang = get(widgetLang);
|
|
7070
|
-
set(langDropdownOpen, false);
|
|
7071
|
-
applyLanguage();
|
|
7072
|
-
const pageLang = document.documentElement.lang?.split("-")[0] || "en";
|
|
7073
|
-
if (get(widgetLang) !== pageLang) {
|
|
7074
|
-
textTransformService.translate(get(widgetLang));
|
|
7075
|
-
} else {
|
|
7076
|
-
textTransformService.restore();
|
|
7077
|
-
}
|
|
7078
|
-
}
|
|
7079
7198
|
function handleKeydown(e) {
|
|
7080
|
-
if (e.key === "Escape"
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7199
|
+
if (e.key === "Escape") {
|
|
7200
|
+
if (get(langDropdownOpen)) {
|
|
7201
|
+
set(langDropdownOpen, false);
|
|
7202
|
+
e.preventDefault();
|
|
7203
|
+
return;
|
|
7204
|
+
}
|
|
7205
|
+
if (get(isOpen)) {
|
|
7206
|
+
e.preventDefault();
|
|
7207
|
+
close();
|
|
7208
|
+
return;
|
|
7209
|
+
}
|
|
7084
7210
|
}
|
|
7085
7211
|
if (e.key === "Tab" && get(isOpen) && get(panelEl)) {
|
|
7086
7212
|
const focusable = get(panelEl).querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
@@ -7097,6 +7223,7 @@ function WidgetApp($$anchor, $$props) {
|
|
|
7097
7223
|
}
|
|
7098
7224
|
}
|
|
7099
7225
|
}
|
|
7226
|
+
let panelStyle = /* @__PURE__ */ user_derived(() => get(panelX) !== null ? `left: ${get(panelX)}px; right: auto;` : "");
|
|
7100
7227
|
onMount(() => {
|
|
7101
7228
|
set(widgetLang, getSupportedLang(config2().lang || "en"), true);
|
|
7102
7229
|
detectTheme();
|
|
@@ -7135,7 +7262,11 @@ function WidgetApp($$anchor, $$props) {
|
|
|
7135
7262
|
return get(activeCount);
|
|
7136
7263
|
},
|
|
7137
7264
|
onclose: close,
|
|
7138
|
-
onreset: resetAll
|
|
7265
|
+
onreset: resetAll,
|
|
7266
|
+
ondrag: handlePanelDrag,
|
|
7267
|
+
get panelEl() {
|
|
7268
|
+
return get(panelEl);
|
|
7269
|
+
}
|
|
7139
7270
|
});
|
|
7140
7271
|
var div_2 = sibling(node_1, 2);
|
|
7141
7272
|
var div_3 = child(div_2);
|
|
@@ -7173,7 +7304,7 @@ function WidgetApp($$anchor, $$props) {
|
|
|
7173
7304
|
delegated("click", button_1, () => handleLangChange(get(option).code));
|
|
7174
7305
|
append($$anchor3, button_1);
|
|
7175
7306
|
});
|
|
7176
|
-
template_effect(($0) => set_attribute(div_4, "aria-label", $0), [() => t("widget.
|
|
7307
|
+
template_effect(($0) => set_attribute(div_4, "aria-label", $0), [() => t("widget.title", get(widgetLang))]);
|
|
7177
7308
|
append($$anchor2, div_4);
|
|
7178
7309
|
};
|
|
7179
7310
|
if_block(node_3, ($$render) => {
|
|
@@ -7213,7 +7344,8 @@ function WidgetApp($$anchor, $$props) {
|
|
|
7213
7344
|
},
|
|
7214
7345
|
get dashboardUrl() {
|
|
7215
7346
|
return config2().dashboardUrl;
|
|
7216
|
-
}
|
|
7347
|
+
},
|
|
7348
|
+
onclose: close
|
|
7217
7349
|
});
|
|
7218
7350
|
bind_this(div_1, ($$value) => set(panelEl, $$value), () => get(panelEl));
|
|
7219
7351
|
template_effect(
|
|
@@ -7222,6 +7354,7 @@ function WidgetApp($$anchor, $$props) {
|
|
|
7222
7354
|
set_attribute(div_1, "aria-label", $0);
|
|
7223
7355
|
set_attribute(div_1, "aria-hidden", !get(isOpen));
|
|
7224
7356
|
set_attribute(div_1, "dir", $1);
|
|
7357
|
+
set_style(div_1, get(panelStyle));
|
|
7225
7358
|
set_attribute(button, "aria-expanded", get(langDropdownOpen));
|
|
7226
7359
|
set_text(text_1, `${(get(currentLangOption)?.flag || "") ?? ""} ${(get(currentLangOption)?.label || get(widgetLang)) ?? ""}`);
|
|
7227
7360
|
classes = set_class(svg, 0, "accessify-lang-chevron", null, classes, { "accessify-lang-chevron--open": get(langDropdownOpen) });
|
|
@@ -7317,10 +7450,19 @@ function createWidgetStyles(config2) {
|
|
|
7317
7450
|
}
|
|
7318
7451
|
.accessify-trigger:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(50,60,100,0.6); }
|
|
7319
7452
|
.accessify-trigger:active { transform: scale(0.96); }
|
|
7320
|
-
.accessify-trigger
|
|
7453
|
+
.accessify-trigger--hidden { opacity:0; pointer-events:none; transform:scale(0.9); }
|
|
7321
7454
|
.accessify-trigger svg { width: 26px; height: 26px; }
|
|
7322
7455
|
.accessify-trigger--dragging { cursor: grabbing !important; opacity: 0.85; }
|
|
7323
7456
|
|
|
7457
|
+
/* Active count badge on trigger */
|
|
7458
|
+
.accessify-trigger-badge {
|
|
7459
|
+
position: absolute; top: -4px; right: -4px;
|
|
7460
|
+
min-width: 20px; height: 20px; padding: 0 5px;
|
|
7461
|
+
border-radius: 999px; background: var(--accent); color: #fff;
|
|
7462
|
+
font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
|
|
7463
|
+
pointer-events: none;
|
|
7464
|
+
}
|
|
7465
|
+
|
|
7324
7466
|
/* ─── Panel ─── */
|
|
7325
7467
|
.accessify-panel {
|
|
7326
7468
|
position: fixed; top: 0; bottom: 0;
|
|
@@ -7363,6 +7505,13 @@ function createWidgetStyles(config2) {
|
|
|
7363
7505
|
.accessify-header-btn--icon { padding: 0; }
|
|
7364
7506
|
.accessify-header-btn--close { background: transparent; border-color: transparent; }
|
|
7365
7507
|
|
|
7508
|
+
/* Drag handle */
|
|
7509
|
+
.accessify-drag-handle {
|
|
7510
|
+
cursor: grab; touch-action: none;
|
|
7511
|
+
}
|
|
7512
|
+
.accessify-drag-handle:active { cursor: grabbing; }
|
|
7513
|
+
.accessify-drag-handle svg { stroke-width: 3; }
|
|
7514
|
+
|
|
7366
7515
|
/* ─── Shared Accordion (Language + Profiles) ─── */
|
|
7367
7516
|
.accessify-lang-dropdown,
|
|
7368
7517
|
.accessify-accordion {
|
|
@@ -7419,6 +7568,7 @@ function createWidgetStyles(config2) {
|
|
|
7419
7568
|
color: var(--text); cursor: pointer;
|
|
7420
7569
|
font-size: 14px; font-weight: 500; font-family: inherit;
|
|
7421
7570
|
transition: background var(--fast);
|
|
7571
|
+
min-height: 44px;
|
|
7422
7572
|
}
|
|
7423
7573
|
.accessify-lang-option:hover { background: var(--surface-hover); }
|
|
7424
7574
|
.accessify-lang-option[data-active="true"] { color: var(--accent); font-weight: 700; }
|
|
@@ -7599,15 +7749,31 @@ function createWidgetStyles(config2) {
|
|
|
7599
7749
|
|
|
7600
7750
|
/* ─── Footer ─── */
|
|
7601
7751
|
.accessify-footer {
|
|
7602
|
-
display: flex; align-items: center; justify-content:
|
|
7603
|
-
padding:
|
|
7752
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
7753
|
+
padding: 10px var(--pad);
|
|
7604
7754
|
border-top: 1px solid var(--border);
|
|
7605
7755
|
color: var(--text-dim); font-size: 11px;
|
|
7606
7756
|
background: var(--surface-dim); flex-shrink: 0;
|
|
7757
|
+
gap: 8px;
|
|
7758
|
+
}
|
|
7759
|
+
.accessify-footer-links {
|
|
7760
|
+
display: flex; align-items: center; gap: 8px;
|
|
7607
7761
|
}
|
|
7608
7762
|
.accessify-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
|
|
7609
7763
|
.accessify-footer a:hover { text-decoration: underline; }
|
|
7610
7764
|
|
|
7765
|
+
.accessify-footer-close {
|
|
7766
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
7767
|
+
padding: 6px 14px; min-height: 34px;
|
|
7768
|
+
border: 1px solid var(--border); border-radius: 10px;
|
|
7769
|
+
background: var(--surface); color: var(--text-dim);
|
|
7770
|
+
cursor: pointer; font-size: 12px; font-weight: 600; font-family: inherit;
|
|
7771
|
+
transition: background var(--fast), color var(--fast), border-color var(--fast);
|
|
7772
|
+
flex-shrink: 0;
|
|
7773
|
+
}
|
|
7774
|
+
.accessify-footer-close:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
|
7775
|
+
.accessify-footer-close svg { width: 14px; height: 14px; flex-shrink: 0; }
|
|
7776
|
+
|
|
7611
7777
|
/* ─── Reduced Motion ─── */
|
|
7612
7778
|
@media (prefers-reduced-motion: reduce) {
|
|
7613
7779
|
*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
|
|
@@ -8630,4 +8796,4 @@ export {
|
|
|
8630
8796
|
init as i,
|
|
8631
8797
|
t
|
|
8632
8798
|
};
|
|
8633
|
-
//# sourceMappingURL=index-
|
|
8799
|
+
//# sourceMappingURL=index-CFoky8Ty.js.map
|