accessify-widget 0.3.15 → 0.3.16

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-5qbCfZ0S.js";
1
+ import { d, i } from "./index-DISuvl6x.js";
2
2
  export {
3
3
  d as destroy,
4
4
  i as init
@@ -6004,10 +6004,9 @@ const PROFILES = [
6004
6004
  features: ["animation-stop", "reading-mask", "hide-images"]
6005
6005
  }
6006
6006
  ];
6007
- var root_3$2 = /* @__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>`);
6008
- var root_2$2 = /* @__PURE__ */ from_html(`<button class="accessify-accordion-option"><span class="accessify-accordion-option-left"><span class="accessify-accordion-option-icon" aria-hidden="true"></span> <span class="accessify-accordion-option-text"><span class="accessify-accordion-option-name"> </span> <span class="accessify-accordion-option-desc"> </span></span></span> <!></button>`);
6009
- var root_1$3 = /* @__PURE__ */ from_html(`<div class="accessify-accordion-list" role="group"></div>`);
6010
- var root$3 = /* @__PURE__ */ from_html(`<div class="accessify-accordion" role="region"><button class="accessify-accordion-toggle"><span class="accessify-accordion-toggle-left"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M12 8v4l2 2"></path></svg> <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>`);
6007
+ var root_2$2 = /* @__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>`);
6008
+ var root_1$3 = /* @__PURE__ */ from_html(`<button class="accessify-accordion-option"><span class="accessify-accordion-option-left"><span class="accessify-accordion-option-icon" aria-hidden="true"></span> <span class="accessify-accordion-option-text"><span class="accessify-accordion-option-name"> </span> <span class="accessify-accordion-option-desc"> </span></span></span> <!></button>`);
6009
+ var root$3 = /* @__PURE__ */ from_html(`<div class="accessify-accordion" role="region"><button class="accessify-accordion-toggle"><span class="accessify-accordion-toggle-left"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M12 8v4l2 2"></path></svg> <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 class="accessify-accordion-list" role="group"></div></div>`);
6011
6010
  function ProfileSection($$anchor, $$props) {
6012
6011
  push($$props, true);
6013
6012
  let lang = prop($$props, "lang", 3, "en"), activeProfileId = prop($$props, "activeProfileId", 3, null);
@@ -6024,62 +6023,55 @@ function ProfileSection($$anchor, $$props) {
6024
6023
  var text = child(span_1);
6025
6024
  var svg = sibling(span, 2);
6026
6025
  let classes;
6027
- var node = sibling(button, 2);
6028
- {
6029
- var consequent_1 = ($$anchor2) => {
6030
- var div_1 = root_1$3();
6031
- each(div_1, 21, () => PROFILES, (profile) => profile.id, ($$anchor3, profile) => {
6032
- var button_1 = root_2$2();
6033
- var span_2 = child(button_1);
6034
- var span_3 = child(span_2);
6035
- html(span_3, () => getIcon(get(profile).iconId), true);
6036
- var span_4 = sibling(span_3, 2);
6037
- var span_5 = child(span_4);
6038
- var text_1 = child(span_5);
6039
- var span_6 = sibling(span_5, 2);
6040
- var text_2 = child(span_6);
6041
- var node_1 = sibling(span_2, 2);
6042
- {
6043
- var consequent = ($$anchor4) => {
6044
- var svg_1 = root_3$2();
6045
- append($$anchor4, svg_1);
6046
- };
6047
- if_block(node_1, ($$render) => {
6048
- if (activeProfileId() === get(profile).id) $$render(consequent);
6049
- });
6050
- }
6051
- template_effect(
6052
- ($0, $1) => {
6053
- set_attribute(button_1, "aria-pressed", activeProfileId() === get(profile).id);
6054
- set_attribute(button_1, "data-active", activeProfileId() === get(profile).id);
6055
- set_text(text_1, $0);
6056
- set_text(text_2, $1);
6057
- },
6058
- [
6059
- () => t(get(profile).nameKey, lang()),
6060
- () => t(get(profile).descKey, lang())
6061
- ]
6062
- );
6063
- delegated("click", button_1, () => $$props.onactivate(get(profile)));
6064
- append($$anchor3, button_1);
6026
+ var div_1 = sibling(button, 2);
6027
+ each(div_1, 21, () => PROFILES, (profile) => profile.id, ($$anchor2, profile) => {
6028
+ var button_1 = root_1$3();
6029
+ var span_2 = child(button_1);
6030
+ var span_3 = child(span_2);
6031
+ html(span_3, () => getIcon(get(profile).iconId), true);
6032
+ var span_4 = sibling(span_3, 2);
6033
+ var span_5 = child(span_4);
6034
+ var text_1 = child(span_5);
6035
+ var span_6 = sibling(span_5, 2);
6036
+ var text_2 = child(span_6);
6037
+ var node = sibling(span_2, 2);
6038
+ {
6039
+ var consequent = ($$anchor3) => {
6040
+ var svg_1 = root_2$2();
6041
+ append($$anchor3, svg_1);
6042
+ };
6043
+ if_block(node, ($$render) => {
6044
+ if (activeProfileId() === get(profile).id) $$render(consequent);
6065
6045
  });
6066
- template_effect(($0) => set_attribute(div_1, "aria-label", $0), [() => t("section.profiles", lang())]);
6067
- append($$anchor2, div_1);
6068
- };
6069
- if_block(node, ($$render) => {
6070
- if (get(isOpen)) $$render(consequent_1);
6071
- });
6072
- }
6046
+ }
6047
+ template_effect(
6048
+ ($0, $1) => {
6049
+ set_attribute(button_1, "aria-pressed", activeProfileId() === get(profile).id);
6050
+ set_attribute(button_1, "data-active", activeProfileId() === get(profile).id);
6051
+ set_text(text_1, $0);
6052
+ set_text(text_2, $1);
6053
+ },
6054
+ [
6055
+ () => t(get(profile).nameKey, lang()),
6056
+ () => t(get(profile).descKey, lang())
6057
+ ]
6058
+ );
6059
+ delegated("click", button_1, () => $$props.onactivate(get(profile)));
6060
+ append($$anchor2, button_1);
6061
+ });
6073
6062
  template_effect(
6074
- ($0, $1) => {
6063
+ ($0, $1, $2) => {
6075
6064
  set_attribute(div, "aria-label", $0);
6076
6065
  set_attribute(button, "aria-expanded", get(isOpen));
6077
6066
  set_text(text, $1);
6078
6067
  classes = set_class(svg, 0, "accessify-accordion-chevron", null, classes, { "accessify-accordion-chevron--open": get(isOpen) });
6068
+ set_attribute(div_1, "aria-label", $2);
6069
+ set_style(div_1, get(isOpen) ? "" : "display:none");
6079
6070
  },
6080
6071
  [
6081
6072
  () => t("section.profiles", lang()),
6082
- () => get(activeProfile) ? t(get(activeProfile).nameKey, lang()) : t("section.profiles", lang())
6073
+ () => get(activeProfile) ? t(get(activeProfile).nameKey, lang()) : t("section.profiles", lang()),
6074
+ () => t("section.profiles", lang())
6083
6075
  ]
6084
6076
  );
6085
6077
  delegated("click", button, () => {
@@ -6447,14 +6439,14 @@ function FeatureGrid($$anchor, $$props) {
6447
6439
  const FEATURE_LOADERS = {
6448
6440
  contrast: () => import("./contrast-CqsICAkU.js"),
6449
6441
  "text-size": () => import("./text-size-m_mHNPWo.js"),
6450
- "keyboard-nav": () => import("./keyboard-nav-CVsH7KMx.js"),
6442
+ "keyboard-nav": () => import("./keyboard-nav-CQ6IoNn_.js"),
6451
6443
  "link-highlight": () => import("./link-highlight-DBGm067Y.js"),
6452
6444
  "reading-guide": () => import("./reading-guide-VT8NciIL.js"),
6453
6445
  "reading-mask": () => import("./reading-mask-BABChuCz.js"),
6454
6446
  "animation-stop": () => import("./animation-stop-C0MwseK0.js"),
6455
6447
  "hide-images": () => import("./hide-images-B_LeCBcd.js"),
6456
6448
  "big-cursor": () => import("./big-cursor-B2UKu9dQ.js"),
6457
- "page-structure": () => import("./page-structure-aKtVG7q2.js"),
6449
+ "page-structure": () => import("./page-structure-DOlGisQu.js"),
6458
6450
  tts: () => import("./tts-CjszLRnb.js"),
6459
6451
  "text-simplify": () => import("./text-simplify-Cvhpio7g.js"),
6460
6452
  "alt-text": () => Promise.resolve().then(() => altText)
@@ -8270,6 +8262,8 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
8270
8262
  });
8271
8263
  badge.textContent = "i";
8272
8264
  badge.setAttribute("aria-hidden", "true");
8265
+ badge.setAttribute("translate", "no");
8266
+ badge.classList.add("notranslate");
8273
8267
  badge.setAttribute(BADGE_ATTR, "badge");
8274
8268
  const tooltip = document.createElement("span");
8275
8269
  Object.assign(tooltip.style, {
@@ -8292,6 +8286,8 @@ function createAltTextModule(aiService, initialLang = "de", serverConfig) {
8292
8286
  boxShadow: "0 2px 8px rgba(0,0,0,0.3)"
8293
8287
  });
8294
8288
  tooltip.textContent = altText2;
8289
+ tooltip.setAttribute("translate", "no");
8290
+ tooltip.classList.add("notranslate");
8295
8291
  tooltip.setAttribute(BADGE_ATTR, "tooltip");
8296
8292
  badge.addEventListener("mouseenter", () => {
8297
8293
  badge.style.background = "rgba(0,0,0,0.85)";
@@ -8758,4 +8754,4 @@ export {
8758
8754
  init as i,
8759
8755
  t
8760
8756
  };
8761
- //# sourceMappingURL=index-5qbCfZ0S.js.map
8757
+ //# sourceMappingURL=index-DISuvl6x.js.map