accessify-widget 0.3.41 → 0.3.42

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-Bpz3Pgxd.js";
1
+ import { d, i } from "./index-lQVz5TBk.js";
2
2
  export {
3
3
  d as destroy,
4
4
  i as init
@@ -6597,15 +6597,7 @@ function FeatureGrid($$anchor, $$props) {
6597
6597
  iconId: "alt-text"
6598
6598
  }
6599
6599
  };
6600
- const VISUAL_IDS = [
6601
- "keyboard-nav",
6602
- "link-highlight",
6603
- "animation-stop",
6604
- "hide-images",
6605
- "big-cursor"
6606
- ];
6607
- const READING_IDS = ["reading-guide", "reading-mask", "tts"];
6608
- const AI_IDS = ["text-simplify", "alt-text"];
6600
+ const INLINE_CONTROLS = /* @__PURE__ */ new Set(["contrast", "text-size"]);
6609
6601
  const CONTRAST_MODES = [
6610
6602
  {
6611
6603
  id: "light",
@@ -6628,14 +6620,14 @@ function FeatureGrid($$anchor, $$props) {
6628
6620
  const FEATURE_LOADERS = {
6629
6621
  contrast: () => import("./contrast-BcTWODsK.js"),
6630
6622
  "text-size": () => import("./text-size-m_mHNPWo.js"),
6631
- "keyboard-nav": () => import("./keyboard-nav-BY-Xbs7a.js"),
6623
+ "keyboard-nav": () => import("./keyboard-nav-BqdopG_-.js"),
6632
6624
  "link-highlight": () => import("./link-highlight-DBGm067Y.js"),
6633
6625
  "reading-guide": () => import("./reading-guide-VT8NciIL.js"),
6634
6626
  "reading-mask": () => import("./reading-mask-BABChuCz.js"),
6635
6627
  "animation-stop": () => import("./animation-stop-_chC8bg1.js"),
6636
6628
  "hide-images": () => import("./hide-images-B_LeCBcd.js"),
6637
6629
  "big-cursor": () => import("./big-cursor-B2UKu9dQ.js"),
6638
- "page-structure": () => import("./page-structure-B4O7IdeA.js"),
6630
+ "page-structure": () => import("./page-structure-D74Eg0X5.js"),
6639
6631
  tts: () => import("./tts-CjszLRnb.js"),
6640
6632
  "text-simplify": () => import("./text-simplify-CK2GFhq2.js"),
6641
6633
  "alt-text": () => Promise.resolve().then(() => altText)
@@ -6669,9 +6661,6 @@ function FeatureGrid($$anchor, $$props) {
6669
6661
  const iconFn = icons[iconId];
6670
6662
  return iconFn ? iconFn() : "";
6671
6663
  }
6672
- function getVisibleFeatures(ids) {
6673
- return ids.filter((id) => get(visibleFeatureIds).has(id)).map((id) => FEATURE_REGISTRY[id]).filter(Boolean);
6674
- }
6675
6664
  function updateControlState(id, module) {
6676
6665
  if (!module) return;
6677
6666
  const state2 = module.getState();
@@ -6774,9 +6763,7 @@ function FeatureGrid($$anchor, $$props) {
6774
6763
  $$props.ontoggle("text-size", true);
6775
6764
  $$props.ontextsize?.(value);
6776
6765
  }
6777
- let visualFeatures = /* @__PURE__ */ user_derived(() => getVisibleFeatures(VISUAL_IDS));
6778
- let readingFeatures = /* @__PURE__ */ user_derived(() => getVisibleFeatures(READING_IDS));
6779
- let aiFeatures = /* @__PURE__ */ user_derived(() => getVisibleFeatures(AI_IDS));
6766
+ let cardFeatures = /* @__PURE__ */ user_derived(() => $$props.config.features.filter((id) => !INLINE_CONTROLS.has(id) && FEATURE_REGISTRY[id]).map((id) => FEATURE_REGISTRY[id]));
6780
6767
  user_effect(() => {
6781
6768
  `${$$props.config.features.join("|")}|${get(activeSignature)}`;
6782
6769
  void syncActiveModules();
@@ -6921,48 +6908,38 @@ function FeatureGrid($$anchor, $$props) {
6921
6908
  {
6922
6909
  var consequent_4 = ($$anchor2) => {
6923
6910
  var div_6 = root_9();
6924
- each(
6925
- div_6,
6926
- 21,
6927
- () => [
6928
- ...get(visualFeatures),
6929
- ...get(readingFeatures),
6930
- ...get(aiFeatures)
6931
- ],
6932
- (feature) => feature.id,
6933
- ($$anchor3, feature) => {
6934
- const isActive = /* @__PURE__ */ user_derived(() => $$props.activeFeatures.get(get(feature).id) ?? false);
6935
- var div_7 = root_10();
6936
- var button_2 = child(div_7);
6937
- var span_10 = child(button_2);
6938
- html(span_10, () => getIcon(get(feature).iconId), true);
6939
- var span_11 = sibling(span_10, 2);
6940
- var text_4 = child(span_11);
6941
- var span_12 = sibling(button_2, 2);
6942
- template_effect(
6943
- ($0, $1, $2, $3) => {
6944
- set_attribute(button_2, "data-active", get(isActive));
6945
- set_attribute(button_2, "aria-checked", get(isActive));
6946
- set_attribute(button_2, "aria-label", $0);
6947
- set_text(text_4, $1);
6948
- set_attribute(span_12, "aria-label", $2);
6949
- set_attribute(span_12, "title", $3);
6950
- },
6951
- [
6952
- () => t(get(feature).nameKey, $$props.config.lang),
6953
- () => t(get(feature).nameKey, $$props.config.lang),
6954
- () => t(get(feature).descKey, $$props.config.lang),
6955
- () => t(get(feature).descKey, $$props.config.lang)
6956
- ]
6957
- );
6958
- delegated("click", button_2, () => handleToggle(get(feature).id));
6959
- append($$anchor3, div_7);
6960
- }
6961
- );
6911
+ each(div_6, 21, () => get(cardFeatures), (feature) => feature.id, ($$anchor3, feature) => {
6912
+ const isActive = /* @__PURE__ */ user_derived(() => $$props.activeFeatures.get(get(feature).id) ?? false);
6913
+ var div_7 = root_10();
6914
+ var button_2 = child(div_7);
6915
+ var span_10 = child(button_2);
6916
+ html(span_10, () => getIcon(get(feature).iconId), true);
6917
+ var span_11 = sibling(span_10, 2);
6918
+ var text_4 = child(span_11);
6919
+ var span_12 = sibling(button_2, 2);
6920
+ template_effect(
6921
+ ($0, $1, $2, $3) => {
6922
+ set_attribute(button_2, "data-active", get(isActive));
6923
+ set_attribute(button_2, "aria-checked", get(isActive));
6924
+ set_attribute(button_2, "aria-label", $0);
6925
+ set_text(text_4, $1);
6926
+ set_attribute(span_12, "aria-label", $2);
6927
+ set_attribute(span_12, "title", $3);
6928
+ },
6929
+ [
6930
+ () => t(get(feature).nameKey, $$props.config.lang),
6931
+ () => t(get(feature).nameKey, $$props.config.lang),
6932
+ () => t(get(feature).descKey, $$props.config.lang),
6933
+ () => t(get(feature).descKey, $$props.config.lang)
6934
+ ]
6935
+ );
6936
+ delegated("click", button_2, () => handleToggle(get(feature).id));
6937
+ append($$anchor3, div_7);
6938
+ });
6962
6939
  append($$anchor2, div_6);
6963
6940
  };
6964
6941
  if_block(node_4, ($$render) => {
6965
- if (get(visualFeatures).length > 0 || get(readingFeatures).length > 0 || get(aiFeatures).length > 0) $$render(consequent_4);
6942
+ if (get(cardFeatures).length > 0) $$render(consequent_4);
6966
6943
  });
6967
6944
  }
6968
6945
  append($$anchor, fragment);
@@ -8988,4 +8965,4 @@ export {
8988
8965
  init as i,
8989
8966
  t
8990
8967
  };
8991
- //# sourceMappingURL=index-Bpz3Pgxd.js.map
8968
+ //# sourceMappingURL=index-lQVz5TBk.js.map