accessify-widget 0.3.13 → 0.3.15

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-CWccrgpi.js";
1
+ import { d, i } from "./index-5qbCfZ0S.js";
2
2
  export {
3
3
  d as destroy,
4
4
  i as init
@@ -5986,7 +5986,7 @@ const PROFILES = [
5986
5986
  nameKey: "profile.cognitive",
5987
5987
  descKey: "profile.cognitive.desc",
5988
5988
  iconId: "brain",
5989
- features: ["reading-guide", "text-size", "spacing", "dyslexia-font", "animation-stop"],
5989
+ features: ["reading-guide", "text-size", "animation-stop", "tts"],
5990
5990
  featureSettings: { "text-size": 130 }
5991
5991
  },
5992
5992
  {
@@ -5994,8 +5994,7 @@ const PROFILES = [
5994
5994
  nameKey: "profile.seizureSafe",
5995
5995
  descKey: "profile.seizureSafe.desc",
5996
5996
  iconId: "shield",
5997
- features: ["animation-stop", "saturation"],
5998
- featureSettings: { saturation: "low" }
5997
+ features: ["animation-stop", "hide-images"]
5999
5998
  },
6000
5999
  {
6001
6000
  id: "adhd-friendly",
@@ -6448,14 +6447,14 @@ function FeatureGrid($$anchor, $$props) {
6448
6447
  const FEATURE_LOADERS = {
6449
6448
  contrast: () => import("./contrast-CqsICAkU.js"),
6450
6449
  "text-size": () => import("./text-size-m_mHNPWo.js"),
6451
- "keyboard-nav": () => import("./keyboard-nav-DX2xdXSe.js"),
6450
+ "keyboard-nav": () => import("./keyboard-nav-CVsH7KMx.js"),
6452
6451
  "link-highlight": () => import("./link-highlight-DBGm067Y.js"),
6453
6452
  "reading-guide": () => import("./reading-guide-VT8NciIL.js"),
6454
6453
  "reading-mask": () => import("./reading-mask-BABChuCz.js"),
6455
6454
  "animation-stop": () => import("./animation-stop-C0MwseK0.js"),
6456
6455
  "hide-images": () => import("./hide-images-B_LeCBcd.js"),
6457
6456
  "big-cursor": () => import("./big-cursor-B2UKu9dQ.js"),
6458
- "page-structure": () => import("./page-structure-tjDPoRal.js"),
6457
+ "page-structure": () => import("./page-structure-aKtVG7q2.js"),
6459
6458
  tts: () => import("./tts-CjszLRnb.js"),
6460
6459
  "text-simplify": () => import("./text-simplify-Cvhpio7g.js"),
6461
6460
  "alt-text": () => Promise.resolve().then(() => altText)
@@ -6685,7 +6684,10 @@ function FeatureGrid($$anchor, $$props) {
6685
6684
  ]
6686
6685
  );
6687
6686
  delegated("click", button_1, () => setTextSize(Math.max(TEXT_SIZE_MIN, get(textSize) - TEXT_SIZE_STEP)));
6688
- delegated("input", input, (e) => setTextSize(Number(e.target.value)));
6687
+ delegated("input", input, (e) => {
6688
+ set(textSize, Number(e.target.value), true);
6689
+ });
6690
+ delegated("change", input, (e) => setTextSize(Number(e.target.value)));
6689
6691
  delegated("click", button_2, () => setTextSize(Math.min(TEXT_SIZE_MAX, get(textSize) + TEXT_SIZE_STEP)));
6690
6692
  append($$anchor2, div_3);
6691
6693
  };
@@ -6747,7 +6749,7 @@ function FeatureGrid($$anchor, $$props) {
6747
6749
  append($$anchor, fragment);
6748
6750
  pop();
6749
6751
  }
6750
- delegate(["click", "input"]);
6752
+ delegate(["click", "input", "change"]);
6751
6753
  var root_1$1 = /* @__PURE__ */ from_html(`<span aria-hidden="true">&middot;</span> <a target="_blank" rel="noopener noreferrer"> </a>`, 1);
6752
6754
  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>`);
6753
6755
  function PanelFooter($$anchor, $$props) {
@@ -7173,7 +7175,6 @@ function WidgetApp($$anchor, $$props) {
7173
7175
  let activeProfileId = /* @__PURE__ */ state(null);
7174
7176
  let langDropdownOpen = /* @__PURE__ */ state(false);
7175
7177
  let panelX = /* @__PURE__ */ state(null);
7176
- let widgetZoom = /* @__PURE__ */ state(1);
7177
7178
  const PANEL_X_KEY = "accessify-panel-x";
7178
7179
  const textTransformService = createTextTransformService();
7179
7180
  const STORAGE_KEY = "accessify-prefs";
@@ -7290,20 +7291,13 @@ function WidgetApp($$anchor, $$props) {
7290
7291
  const action = enabled ? t("status.activated", get(widgetLang)) : t("status.deactivated", get(widgetLang));
7291
7292
  announce(`${name} ${action}`);
7292
7293
  }
7293
- function handleTextSize(size) {
7294
- const factor = size / 100;
7295
- set(widgetZoom, Math.min(1.35, Math.max(0.85, factor)), true);
7296
- const mount2 = $$props.shadow.getElementById("accessify-mount");
7297
- if (mount2) {
7298
- mount2.style.zoom = get(widgetZoom) === 1 ? "" : String(get(widgetZoom));
7299
- }
7294
+ function handleTextSize(_size) {
7300
7295
  }
7301
7296
  function resetAll() {
7302
7297
  set(activeFeatures, /* @__PURE__ */ new Map(), true);
7303
7298
  set(activeProfileId, null);
7304
7299
  savePrefs();
7305
7300
  textTransformService.restore();
7306
- handleTextSize(100);
7307
7301
  window.dispatchEvent(new CustomEvent("accessify:reset"));
7308
7302
  announce(t("widget.resetConfirm", get(widgetLang)));
7309
7303
  }
@@ -7505,9 +7499,6 @@ function WidgetApp($$anchor, $$props) {
7505
7499
  return pop($$exports);
7506
7500
  }
7507
7501
  delegate(["click"]);
7508
- const CHECKMARK_SVG = encodeURIComponent(
7509
- '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>'
7510
- );
7511
7502
  function createWidgetStyles(config2) {
7512
7503
  const pos = config2.position || "bottom-right";
7513
7504
  const isRight = pos.includes("right");
@@ -7533,7 +7524,7 @@ function createWidgetStyles(config2) {
7533
7524
  :host {
7534
7525
  all: initial;
7535
7526
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
7536
- font-size: 15px;
7527
+ font-size: 16px;
7537
7528
  line-height: 1.5;
7538
7529
  color-scheme: dark;
7539
7530
  }
@@ -7850,14 +7841,6 @@ function createWidgetStyles(config2) {
7850
7841
  }
7851
7842
  .accessify-card:hover { transform: translateY(-2px); border-color: var(--border-hl); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
7852
7843
  .accessify-card[data-active="true"] { border-color: var(--accent); background: var(--accent-soft); }
7853
- .accessify-card[data-active="true"]::after {
7854
- content: ''; position: absolute; top: 8px; ${isRight ? "right: 8px" : "left: 8px"};
7855
- width: 18px; height: 18px; border-radius: 999px; background: var(--accent);
7856
- mask-image: url("data:image/svg+xml,${CHECKMARK_SVG}");
7857
- mask-size: 10px; mask-repeat: no-repeat; mask-position: center;
7858
- -webkit-mask-image: url("data:image/svg+xml,${CHECKMARK_SVG}");
7859
- -webkit-mask-size: 10px; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center;
7860
- }
7861
7844
  .accessify-card-icon {
7862
7845
  display: inline-flex; align-items: center; justify-content: center;
7863
7846
  width: 48px; height: 48px; border-radius: 14px;
@@ -8235,16 +8218,30 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
8235
8218
  const isImg = target.tagName === "IMG";
8236
8219
  let anchor;
8237
8220
  if (isImg) {
8238
- const wrapper = document.createElement("span");
8239
- wrapper.setAttribute(WRAPPER_ATTR, "1");
8240
- Object.assign(wrapper.style, {
8241
- position: "relative",
8242
- display: "inline-block",
8243
- lineHeight: "0"
8244
- });
8245
- target.parentElement.insertBefore(wrapper, target);
8246
- wrapper.appendChild(target);
8247
- anchor = wrapper;
8221
+ let container = target.parentElement;
8222
+ while (container && container !== document.body) {
8223
+ const cs = getComputedStyle(container);
8224
+ if (cs.overflow === "hidden" && cs.position !== "static") {
8225
+ break;
8226
+ }
8227
+ container = container.parentElement;
8228
+ }
8229
+ if (container && container !== document.body && container !== target.parentElement) {
8230
+ const pos = getComputedStyle(container).position;
8231
+ if (pos === "static") container.style.position = "relative";
8232
+ anchor = container;
8233
+ } else {
8234
+ const wrapper = document.createElement("span");
8235
+ wrapper.setAttribute(WRAPPER_ATTR, "1");
8236
+ Object.assign(wrapper.style, {
8237
+ position: "relative",
8238
+ display: "inline-block",
8239
+ lineHeight: "0"
8240
+ });
8241
+ target.parentElement.insertBefore(wrapper, target);
8242
+ wrapper.appendChild(target);
8243
+ anchor = wrapper;
8244
+ }
8248
8245
  } else {
8249
8246
  const pos = getComputedStyle(target).position;
8250
8247
  if (pos === "static") target.style.position = "relative";
@@ -8761,4 +8758,4 @@ export {
8761
8758
  init as i,
8762
8759
  t
8763
8760
  };
8764
- //# sourceMappingURL=index-CWccrgpi.js.map
8761
+ //# sourceMappingURL=index-5qbCfZ0S.js.map