accessify-widget 0.3.96 → 0.3.98

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.
@@ -1,4 +1,4 @@
1
- import { d, i } from "./index-gr8WUigm.js";
1
+ import { d, i } from "./index-BF8ksHVw.js";
2
2
  export {
3
3
  d as destroy,
4
4
  i as init
@@ -6006,7 +6006,8 @@ function TriggerButton($$anchor, $$props) {
6006
6006
  if (pointerId === null || e.pointerId !== pointerId) return;
6007
6007
  const dx = e.clientX - dragStartX;
6008
6008
  const dy = e.clientY - dragStartY;
6009
- if (!hasMoved && (Math.abs(dx) > 5 || Math.abs(dy) > 5)) {
6009
+ const dragThreshold = matchMedia("(pointer: coarse)").matches ? 15 : 5;
6010
+ if (!hasMoved && (Math.abs(dx) > dragThreshold || Math.abs(dy) > dragThreshold)) {
6010
6011
  hasMoved = true;
6011
6012
  set(isDragging, true);
6012
6013
  btn.style.transition = "none";
@@ -6642,15 +6643,15 @@ function FeatureGrid($$anchor, $$props) {
6642
6643
  const FEATURE_LOADERS = {
6643
6644
  contrast: () => import("./contrast-CqsOs6Uo.js"),
6644
6645
  "text-size": () => import("./text-size-m_mHNPWo.js"),
6645
- "keyboard-nav": () => import("./keyboard-nav-DSFHZbFq.js"),
6646
+ "keyboard-nav": () => import("./keyboard-nav-C6vqsm1k.js"),
6646
6647
  "link-highlight": () => import("./link-highlight-DBGm067Y.js"),
6647
6648
  "reading-guide": () => import("./reading-guide-VT8NciIL.js"),
6648
- "reading-mask": () => import("./reading-mask-BABChuCz.js"),
6649
+ "reading-mask": () => import("./reading-mask-CImlx88t.js"),
6649
6650
  "animation-stop": () => import("./animation-stop-C2Ced0LV.js"),
6650
6651
  "hide-images": () => import("./hide-images-DdZdru63.js"),
6651
6652
  "big-cursor": () => import("./big-cursor-B2UKu9dQ.js"),
6652
- "page-structure": () => import("./page-structure-C4_NzITI.js"),
6653
- tts: () => import("./tts-CjszLRnb.js"),
6653
+ "page-structure": () => import("./page-structure-8pIvzkO4.js"),
6654
+ tts: () => import("./tts-BytU4gzP.js"),
6654
6655
  "text-simplify": () => import("./text-simplify-W0rPYWpv.js"),
6655
6656
  "alt-text": () => Promise.resolve().then(() => altText)
6656
6657
  };
@@ -6942,6 +6943,7 @@ function FeatureGrid($$anchor, $$props) {
6942
6943
  var span_12 = sibling(button_2, 2);
6943
6944
  template_effect(
6944
6945
  ($0, $1, $2, $3) => {
6946
+ set_attribute(div_7, "data-feature", get(feature).id);
6945
6947
  set_attribute(button_2, "data-active", get(isActive));
6946
6948
  set_attribute(button_2, "aria-checked", get(isActive));
6947
6949
  set_attribute(button_2, "aria-label", $0);
@@ -7569,6 +7571,15 @@ function WidgetApp($$anchor, $$props) {
7569
7571
  }
7570
7572
  }
7571
7573
  let panelStyle = /* @__PURE__ */ user_derived(() => get(panelX) !== null ? `left: ${get(panelX)}px; right: auto;` : "");
7574
+ const mobileQuery = typeof window !== "undefined" ? window.matchMedia("(max-width: 640px)") : null;
7575
+ user_effect(() => {
7576
+ if (!get(isOpen) || !mobileQuery?.matches) return;
7577
+ const prev = document.body.style.overflow;
7578
+ document.body.style.overflow = "hidden";
7579
+ return () => {
7580
+ document.body.style.overflow = prev;
7581
+ };
7582
+ });
7572
7583
  onMount(() => {
7573
7584
  set(widgetLang, getSupportedLang(config2().lang || "en"), true);
7574
7585
  detectTheme();
@@ -7798,7 +7809,9 @@ function createWidgetStyles(config2) {
7798
7809
  transition: transform var(--fast), box-shadow var(--fast), opacity var(--fast);
7799
7810
  touch-action: none;
7800
7811
  }
7801
- .accessify-trigger:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(50,60,100,0.6); }
7812
+ @media (hover: hover) {
7813
+ .accessify-trigger:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(50,60,100,0.6); }
7814
+ }
7802
7815
  .accessify-trigger:active { transform: scale(0.96); }
7803
7816
  .accessify-trigger--hidden { display:none; }
7804
7817
  .accessify-trigger svg { width: 26px; height: 26px; }
@@ -7851,7 +7864,9 @@ function createWidgetStyles(config2) {
7851
7864
  background: var(--surface); color: var(--text-dim);
7852
7865
  cursor: pointer; transition: background var(--fast), color var(--fast);
7853
7866
  }
7854
- .accessify-header-btn:hover { background: var(--surface-hover); color: var(--text); }
7867
+ @media (hover: hover) {
7868
+ .accessify-header-btn:hover { background: var(--surface-hover); color: var(--text); }
7869
+ }
7855
7870
  .accessify-header-btn svg { width: 16px; height: 16px; }
7856
7871
  .accessify-header-btn--icon { padding: 0; }
7857
7872
  .accessify-header-btn--close { background: transparent; border-color: transparent; }
@@ -7880,8 +7895,10 @@ function createWidgetStyles(config2) {
7880
7895
  font-size: 15px; font-weight: 700;
7881
7896
  transition: background var(--fast);
7882
7897
  }
7883
- .accessify-lang-toggle:hover,
7884
- .accessify-accordion-toggle:hover { background: var(--surface-hover); }
7898
+ @media (hover: hover) {
7899
+ .accessify-lang-toggle:hover,
7900
+ .accessify-accordion-toggle:hover { background: var(--surface-hover); }
7901
+ }
7885
7902
 
7886
7903
  .accessify-lang-toggle-left,
7887
7904
  .accessify-accordion-toggle-left {
@@ -7921,7 +7938,9 @@ function createWidgetStyles(config2) {
7921
7938
  transition: background var(--fast);
7922
7939
  min-height: 44px;
7923
7940
  }
7924
- .accessify-lang-option:hover { background: var(--surface-hover); }
7941
+ @media (hover: hover) {
7942
+ .accessify-lang-option:hover { background: var(--surface-hover); }
7943
+ }
7925
7944
  .accessify-lang-option[data-active="true"] { color: var(--accent); font-weight: 700; }
7926
7945
  .accessify-lang-option svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
7927
7946
 
@@ -7934,7 +7953,9 @@ function createWidgetStyles(config2) {
7934
7953
  font-family: inherit; text-align: left;
7935
7954
  transition: background var(--fast);
7936
7955
  }
7937
- .accessify-accordion-option:hover { background: var(--surface-hover); }
7956
+ @media (hover: hover) {
7957
+ .accessify-accordion-option:hover { background: var(--surface-hover); }
7958
+ }
7938
7959
  .accessify-accordion-option[data-active="true"] { background: var(--accent-soft); }
7939
7960
 
7940
7961
  .accessify-accordion-option-left {
@@ -7999,7 +8020,9 @@ function createWidgetStyles(config2) {
7999
8020
  text-align: center; line-height: 1.25;
8000
8021
  transition: background var(--fast), color var(--fast), border-color var(--fast);
8001
8022
  }
8002
- .accessify-chip:hover { border-color: var(--border-hl); background: var(--surface-hover); }
8023
+ @media (hover: hover) {
8024
+ .accessify-chip:hover { border-color: var(--border-hl); background: var(--surface-hover); }
8025
+ }
8003
8026
  .accessify-chip[data-active="true"] {
8004
8027
  background: var(--accent); color: var(--accent-on);
8005
8028
  border-color: var(--accent);
@@ -8031,7 +8054,9 @@ function createWidgetStyles(config2) {
8031
8054
  color: var(--text); cursor: pointer; font-size: 18px; font-weight: 700;
8032
8055
  transition: background var(--fast); font-family: inherit;
8033
8056
  }
8034
- .accessify-stepper-btn:hover:not(:disabled) { background: var(--surface-hover); }
8057
+ @media (hover: hover) {
8058
+ .accessify-stepper-btn:hover:not(:disabled) { background: var(--surface-hover); }
8059
+ }
8035
8060
  .accessify-stepper-btn:disabled { opacity: 0.3; cursor: default; }
8036
8061
  .accessify-stepper-value {
8037
8062
  min-width: 48px; text-align: center;
@@ -8057,7 +8082,9 @@ function createWidgetStyles(config2) {
8057
8082
  cursor: pointer; text-align: center; font-family: inherit;
8058
8083
  transition: transform var(--fast), border-color var(--fast), background var(--fast), box-shadow var(--fast);
8059
8084
  }
8060
- .accessify-card:hover { transform: translateY(-2px); border-color: var(--border-hl); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
8085
+ @media (hover: hover) {
8086
+ .accessify-card:hover { transform: translateY(-2px); border-color: var(--border-hl); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
8087
+ }
8061
8088
  .accessify-card[data-active="true"] { border-color: var(--accent); background: var(--accent-soft); }
8062
8089
  .accessify-card-icon {
8063
8090
  display: inline-flex; align-items: center; justify-content: center;
@@ -8076,7 +8103,9 @@ function createWidgetStyles(config2) {
8076
8103
  opacity: 0.35; transition: opacity var(--fast), color var(--fast);
8077
8104
  }
8078
8105
  .accessify-card-info svg { width: 14px; height: 14px; }
8079
- .accessify-card-info:hover { opacity: 1; color: var(--accent); }
8106
+ @media (hover: hover) {
8107
+ .accessify-card-info:hover { opacity: 1; color: var(--accent); }
8108
+ }
8080
8109
 
8081
8110
  /* ─── Section Divider ─── */
8082
8111
  .accessify-section-divider {
@@ -8099,7 +8128,9 @@ function createWidgetStyles(config2) {
8099
8128
  display: flex; align-items: center; gap: 8px;
8100
8129
  }
8101
8130
  .accessify-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
8102
- .accessify-footer a:hover { text-decoration: underline; }
8131
+ @media (hover: hover) {
8132
+ .accessify-footer a:hover { text-decoration: underline; }
8133
+ }
8103
8134
 
8104
8135
  .accessify-footer-close {
8105
8136
  display: inline-flex; align-items: center; gap: 5px;
@@ -8110,7 +8141,9 @@ function createWidgetStyles(config2) {
8110
8141
  transition: background var(--fast), color var(--fast), border-color var(--fast);
8111
8142
  flex-shrink: 0;
8112
8143
  }
8113
- .accessify-footer-close:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
8144
+ @media (hover: hover) {
8145
+ .accessify-footer-close:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
8146
+ }
8114
8147
  .accessify-footer-close svg { width: 14px; height: 14px; flex-shrink: 0; }
8115
8148
 
8116
8149
  /* ─── Reduced Motion ─── */
@@ -8128,6 +8161,15 @@ function createWidgetStyles(config2) {
8128
8161
  ${isRight ? "right: 16px" : "left: 16px"};
8129
8162
  width: 50px; height: 50px; border-radius: 14px;
8130
8163
  }
8164
+ .accessify-card-wrap[data-feature="big-cursor"] { display: none; }
8165
+ .accessify-drag-handle { display: none; }
8166
+ .accessify-header { padding-top: max(14px, env(safe-area-inset-top, 0px)); }
8167
+ .accessify-footer { padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); }
8168
+ }
8169
+ @media (pointer: coarse) {
8170
+ .accessify-header-btn { min-width: 44px; min-height: 44px; }
8171
+ .accessify-footer-close { min-height: 44px; }
8172
+ .accessify-card-info { opacity: 0.7; }
8131
8173
  }
8132
8174
  `;
8133
8175
  }
@@ -8539,6 +8581,12 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
8539
8581
  badge.style.background = "rgba(0,0,0,0.6)";
8540
8582
  tooltip.style.display = "none";
8541
8583
  });
8584
+ badge.addEventListener("click", (e) => {
8585
+ e.stopPropagation();
8586
+ const isVisible = tooltip.style.display === "block";
8587
+ tooltip.style.display = isVisible ? "none" : "block";
8588
+ badge.style.background = isVisible ? "rgba(0,0,0,0.6)" : "rgba(0,0,0,0.85)";
8589
+ });
8542
8590
  overlay.appendChild(badge);
8543
8591
  overlay.appendChild(tooltip);
8544
8592
  positionBadge(target, badge, tooltip);
@@ -8913,8 +8961,6 @@ async function fetchSiteConfig(siteKey, proxyUrl) {
8913
8961
  }
8914
8962
  async function init(userConfig = {}) {
8915
8963
  if (widgetInstance) return;
8916
- const isMobile = navigator.maxTouchPoints > 0 && matchMedia("(pointer:coarse)").matches && !matchMedia("(pointer:fine)").matches;
8917
- if (isMobile) return;
8918
8964
  const dataConfig = window.__accessify_dataConfig || {};
8919
8965
  config = { ...DEFAULT_CONFIG, ...dataConfig, ...userConfig };
8920
8966
  const siteKey = config.siteKey || config.siteKey;
@@ -9063,4 +9109,4 @@ export {
9063
9109
  init as i,
9064
9110
  t
9065
9111
  };
9066
- //# sourceMappingURL=index-gr8WUigm.js.map
9112
+ //# sourceMappingURL=index-BF8ksHVw.js.map