accessibility-react-widget 2.0.5 → 2.0.6

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.
@@ -3319,7 +3319,7 @@ var sc = I.forwardRef(function(e, t) {
3319
3319
  return V <= T && T <= X ? T : null;
3320
3320
  }
3321
3321
  return null;
3322
- }, [O, V, X, pe]), ye = I.useCallback(function(le) {
3322
+ }, [O, V, X, pe]), Ie = I.useCallback(function(le) {
3323
3323
  var xe = pe(le), F = de.map(function(ue) {
3324
3324
  return ue.value;
3325
3325
  });
@@ -3365,8 +3365,8 @@ var sc = I.forwardRef(function(e, t) {
3365
3365
  }, et = function(le) {
3366
3366
  return me === null && le === 0 || typeof me == "number" && le < me;
3367
3367
  };
3368
- return [ye, function(le, xe, F) {
3369
- var Ve = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "unit", T = le.map(ye), ue = T[F], Pe = Le(T, xe, F, Ve);
3368
+ return [Ie, function(le, xe, F) {
3369
+ var Ve = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "unit", T = le.map(Ie), ue = T[F], Pe = Le(T, xe, F, Ve);
3370
3370
  if (T[F] = Pe, ae === !1) {
3371
3371
  var it = me || 0;
3372
3372
  F > 0 && T[F - 1] !== ue && (T[F] = Math.max(T[F], T[F - 1] + it)), F < T.length - 1 && T[F + 1] !== ue && (T[F] = Math.min(T[F], T[F + 1] - it));
@@ -3393,10 +3393,10 @@ var sc = I.forwardRef(function(e, t) {
3393
3393
  }(qe, Tt, Gt, vn, k, Sc), $r = fe(Ac, 2), yn = $r[0], Ur = $r[1], wc = function(V, X) {
3394
3394
  var O = X || {}, de = O.defaultValue, ae = O.value, me = O.onChange, pe = O.postState, ce = fe(xa(function() {
3395
3395
  return Ho(ae) ? ae : Ho(de) ? typeof de == "function" ? de() : de : typeof V == "function" ? V() : V;
3396
- }), 2), ye = ce[0], Le = ce[1], Ee = ae !== void 0 ? ae : ye, et = pe ? pe(Ee) : Ee, le = Xo(me), xe = fe(xa([Ee]), 2), F = xe[0], Ve = xe[1];
3396
+ }), 2), Ie = ce[0], Le = ce[1], Ee = ae !== void 0 ? ae : Ie, et = pe ? pe(Ee) : Ee, le = Xo(me), xe = fe(xa([Ee]), 2), F = xe[0], Ve = xe[1];
3397
3397
  return Ca(function() {
3398
3398
  var T = F[0];
3399
- ye !== T && le(ye, T);
3399
+ Ie !== T && le(Ie, T);
3400
3400
  }, [F]), Ca(function() {
3401
3401
  Ho(ae) || Le(ae);
3402
3402
  }, [ae]), [et, Xo(function(T, ue) {
@@ -3429,22 +3429,22 @@ var sc = I.forwardRef(function(e, t) {
3429
3429
  });
3430
3430
  Z && !function(O, de) {
3431
3431
  var ae = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], me = /* @__PURE__ */ new Set();
3432
- return function pe(ce, ye) {
3432
+ return function pe(ce, Ie) {
3433
3433
  var Le = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, Ee = me.has(ce);
3434
3434
  if (Jt(!Ee, "Warning: There may be circular references"), Ee) return !1;
3435
- if (ce === ye) return !0;
3435
+ if (ce === Ie) return !0;
3436
3436
  if (ae && Le > 1) return !1;
3437
3437
  me.add(ce);
3438
3438
  var et = Le + 1;
3439
3439
  if (Array.isArray(ce)) {
3440
- if (!Array.isArray(ye) || ce.length !== ye.length) return !1;
3441
- for (var le = 0; le < ce.length; le++) if (!pe(ce[le], ye[le], et)) return !1;
3440
+ if (!Array.isArray(Ie) || ce.length !== Ie.length) return !1;
3441
+ for (var le = 0; le < ce.length; le++) if (!pe(ce[le], Ie[le], et)) return !1;
3442
3442
  return !0;
3443
3443
  }
3444
- if (ce && ye && bt(ce) === "object" && bt(ye) === "object") {
3444
+ if (ce && Ie && bt(ce) === "object" && bt(Ie) === "object") {
3445
3445
  var xe = Object.keys(ce);
3446
- return xe.length === Object.keys(ye).length && xe.every(function(F) {
3447
- return pe(ce[F], ye[F], et);
3446
+ return xe.length === Object.keys(Ie).length && xe.every(function(F) {
3447
+ return pe(ce[F], Ie[F], et);
3448
3448
  });
3449
3449
  }
3450
3450
  return !1;
@@ -3453,7 +3453,7 @@ var sc = I.forwardRef(function(e, t) {
3453
3453
  }, Kr = function() {
3454
3454
  var V = Ut(In.current);
3455
3455
  Y == null || Y(V), Jt(!Y, "[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."), j == null || j(V);
3456
- }, kc = function(V, X, O, de, ae, me, pe, ce, ye) {
3456
+ }, kc = function(V, X, O, de, ae, me, pe, ce, Ie) {
3457
3457
  var Le = fe(I.useState(null), 2), Ee = Le[0], et = Le[1], le = fe(I.useState(-1), 2), xe = le[0], F = le[1], Ve = fe(I.useState(O), 2), T = Ve[0], ue = Ve[1], Pe = fe(I.useState(O), 2), it = Pe[0], Se = Pe[1], dt = I.useRef(null), gt = I.useRef(null);
3458
3458
  I.useLayoutEffect(function() {
3459
3459
  xe === -1 && ue(O);
@@ -3479,7 +3479,7 @@ var sc = I.forwardRef(function(e, t) {
3479
3479
  } else {
3480
3480
  var Qt = (ae - de) * Fe, At = at(T);
3481
3481
  At[he] = it[he];
3482
- var pt = ye(At, Qt, he, "dist");
3482
+ var pt = Ie(At, Qt, he, "dist");
3483
3483
  tt(pt.values, pt.value);
3484
3484
  }
3485
3485
  }), Oe = I.useMemo(function() {
@@ -3521,9 +3521,9 @@ var sc = I.forwardRef(function(e, t) {
3521
3521
  }(rt, It, ut, qe, Tt, yn, fo, Kr, Ur), Cn = fe(kc, 4), qr = Cn[0], Nc = Cn[1], bo = Cn[2], ei = Cn[3], ti = function(V, X) {
3522
3522
  if (!l) {
3523
3523
  var O = 0, de = Tt - qe;
3524
- ut.forEach(function(ce, ye) {
3524
+ ut.forEach(function(ce, Ie) {
3525
3525
  var Le = Math.abs(V - ce);
3526
- Le <= de && (de = Le, O = ye);
3526
+ Le <= de && (de = Le, O = Ie);
3527
3527
  });
3528
3528
  var ae, me, pe = at(ut);
3529
3529
  pe[O] = V, G && !ut.length && L === void 0 && pe.push(V), R == null || R(Ut(pe)), fo(pe), X && ((ae = document.activeElement) === null || ae === void 0 || (me = ae.blur) === null || me === void 0 || me.call(ae), ot.current.focus(O), ei(X, O, pe));
@@ -3569,7 +3569,7 @@ var sc = I.forwardRef(function(e, t) {
3569
3569
  }, [qe, Tt, It, l, h, Gt, _, si, ci, G, nt, ct, lt, _e, s, a]);
3570
3570
  return I.createElement(Rt.Provider, { value: Mc }, I.createElement("div", { ref: rt, className: yt(n, r, je(je(je(je({}, "".concat(n, "-disabled"), l), "".concat(n, "-vertical"), N), "".concat(n, "-horizontal"), !N), "".concat(n, "-with-marks"), vn.length)), style: i, onMouseDown: function(V) {
3571
3571
  V.preventDefault();
3572
- var X, O = rt.current.getBoundingClientRect(), de = O.width, ae = O.height, me = O.left, pe = O.top, ce = O.bottom, ye = O.right, Le = V.clientX, Ee = V.clientY;
3572
+ var X, O = rt.current.getBoundingClientRect(), de = O.width, ae = O.height, me = O.left, pe = O.top, ce = O.bottom, Ie = O.right, Le = V.clientX, Ee = V.clientY;
3573
3573
  switch (It) {
3574
3574
  case "btt":
3575
3575
  X = (ce - Ee) / ae;
@@ -3578,7 +3578,7 @@ var sc = I.forwardRef(function(e, t) {
3578
3578
  X = (Ee - pe) / ae;
3579
3579
  break;
3580
3580
  case "rtl":
3581
- X = (ye - Le) / de;
3581
+ X = (Ie - Le) / de;
3582
3582
  break;
3583
3583
  default:
3584
3584
  X = (Le - me) / de;
@@ -4833,15 +4833,15 @@ class hn extends ho {
4833
4833
  return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
4834
4834
  }
4835
4835
  }
4836
- const Ie = hn.createInstance();
4837
- Ie.createInstance = hn.createInstance, Ie.createInstance, Ie.dir, Ie.init, Ie.loadResources, Ie.reloadResources, Ie.use, Ie.changeLanguage, Ie.getFixedT, Ie.t, Ie.exists, Ie.setDefaultNamespace, Ie.hasLoadedNamespace, Ie.loadNamespaces, Ie.loadLanguages;
4836
+ const ye = hn.createInstance();
4837
+ ye.createInstance = hn.createInstance, ye.createInstance, ye.dir, ye.init, ye.loadResources, ye.reloadResources, ye.use, ye.changeLanguage, ye.getFixedT, ye.t, ye.exists, ye.setDefaultNamespace, ye.hasLoadedNamespace, ye.loadNamespaces, ye.loadLanguages;
4838
4838
  const ja = (e, t) => {
4839
4839
  const o = document.querySelectorAll(t.selectorText);
4840
4840
  return Array.from(o).includes(e);
4841
4841
  }, jt = (e) => {
4842
4842
  const { fontSize: t } = window.getComputedStyle(e);
4843
4843
  e.dataset.accOrgfontsize = parseFloat(t).toString(), e.style.fontSize = t;
4844
- }, Fa = () => ({ language: localStorage.getItem("i18nextLng") ?? Ie.language, isBlueLightFilter: !1, brightness: { isBrightness: !1, brightness: 150 }, isDarkContrast: !1, isLightContrast: !1, highContrast: { isHighContrast: !1, contrast: 125 }, highSaturation: { isHighSaturation: !1, saturation: 200 }, lowSaturation: { isLowSaturation: !1, saturation: 50 }, isMonochrome: !1, color: "", isVisualImpairment: !1, adjustFontSizePercentage: 100, textAlign: { left: null, center: null, right: null }, isDyslexiaFont: !1, isFontWeightBold: !1, highlightLinks: !1, highlightTitles: !1, letterSpacing: 0, lineHeight: { isLineHeight: !1, lineHeight: 0 }, wordSpacing: 0, zoom: { isZoom: !1, zoom: 1 }, isBigCursor: !1, showReadingGuide: !1, activateTextToSpeech: !1 }), Wo = "acc-big-cursor-style", Zo = "acc-big-cursor", bc = (e, t) => {
4844
+ }, Fa = () => ({ language: typeof window < "u" ? localStorage.getItem("i18nextLng") ?? ye.language : ye.language, isBlueLightFilter: !1, brightness: { isBrightness: !1, brightness: 150 }, isDarkContrast: !1, isLightContrast: !1, highContrast: { isHighContrast: !1, contrast: 125 }, highSaturation: { isHighSaturation: !1, saturation: 200 }, lowSaturation: { isLowSaturation: !1, saturation: 50 }, isMonochrome: !1, color: "", isVisualImpairment: !1, adjustFontSizePercentage: 100, textAlign: { left: null, center: null, right: null }, isDyslexiaFont: !1, isFontWeightBold: !1, highlightLinks: !1, highlightTitles: !1, letterSpacing: 0, lineHeight: { isLineHeight: !1, lineHeight: 0 }, wordSpacing: 0, zoom: { isZoom: !1, zoom: 1 }, isBigCursor: !1, showReadingGuide: !1, activateTextToSpeech: !1 }), Wo = "acc-big-cursor-style", Zo = "acc-big-cursor", bc = (e, t) => {
4845
4845
  oe(() => {
4846
4846
  if (t) return;
4847
4847
  const o = document.getElementById(Wo);
@@ -5150,7 +5150,7 @@ const $a = "portal", Ua = ({ children: e, wrapperElementId: t }) => {
5150
5150
  }
5151
5151
  });
5152
5152
  }, rn = "acc-align-text", Do = "acc-highlight-links-style", Yo = "acc-highlight-links", _o = "acc-highlight-titles-style", $o = "acc-highlight-titles", Uo = "acc-letter-spacing-style", Tn = "acc-letter-spacing", Qo = "acc-line-height-style", On = "acc-line-height", Ko = "acc-word-spacing-style", zn = "acc-word-spacing", qo = "acc-zoom-style", Xn = "acc-zoom", es = "acc-blueLight-filter-style", er = "acc-blue-light-filter", ts = "acc-dark-contrast-style", tr = "acc-dark-contrast", ns = "acc-light-contrast-style", nr = "acc-light-contrast", os = "acc-visual-impairment-style", or = "acc-visual-impairment", rs = "acc-monochrome-style", rr = "acc-monochrome", is = "acc-high-contrast-style", Hn = "acc-high-contrast", as = "acc-brightness-control-style", Pn = "acc-brightness-control", ss = "acc-high-saturation-style", jn = "acc-high-saturation", cs = "acc-low-saturation-style", Fn = "acc-low-saturation", ls = "acc-text-color-picker-style", ir = "acc-text-color-picker";
5153
- Ie.use(xc).use(Uc);
5153
+ ye.use(xc).use(Uc);
5154
5154
  const gg = () => {
5155
5155
  const [e, t] = Ge(!0), [o, n] = Ge(!1), r = (() => {
5156
5156
  const [p, m] = Ge(!0);
@@ -5636,9 +5636,9 @@ const gg = () => {
5636
5636
  Promise.all(p).then((y) => {
5637
5637
  Qa.forEach((g, b) => {
5638
5638
  m[g.lang] = { translation: y[b] };
5639
- }), Ie.init({ fallbackLng: "he-IL", resources: m }), Ie.languages = ag, n(!0);
5639
+ }), ye.init({ fallbackLng: "he-IL", resources: m }), ye.languages = ag, n(!0);
5640
5640
  }).catch(() => {
5641
- Ie.init({ fallbackLng: "en", resources: { en: { translation: cg } } });
5641
+ ye.init({ fallbackLng: "en", resources: { en: { translation: cg } } });
5642
5642
  }).finally(() => {
5643
5643
  t(!1), (async () => {
5644
5644
  try {
@@ -5649,7 +5649,7 @@ const gg = () => {
5649
5649
  })();
5650
5650
  });
5651
5651
  }, []), u ? S.jsx(wi, { showSpinner: u }) : S.jsxs(S.Fragment, { children: [S.jsx(Ua, { wrapperElementId: "acc-portal-[readingGuide-container]", children: "." }), S.jsx(Ua, { wrapperElementId: Ae, children: S.jsxs("div", { id: sn, style: { direction: h, fontSize: 50 }, className: Wc.Accessibilik, "data-acc-language": a.language, children: [S.jsx(wi, { onShow: d }), S.jsx($d, { display: c ? "block" : "none", showAcc: c, accState: a, onLangChange: (p) => {
5652
- Ie.changeLanguage(p, () => {
5652
+ ye.changeLanguage(p, () => {
5653
5653
  s((m) => hr(m, (y) => {
5654
5654
  y.language = p;
5655
5655
  }));
package/dist/main.min.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{A as o}from"./index-CZ15L50O.js";export{o as default};
2
+ import{A as o}from"./index-BUqySQzU.js";export{o as default};
package/dist/next.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { A as f } from "./index-CZ15L50O.js";
2
+ import { A as f } from "./index-BUqySQzU.js";
3
3
  export {
4
4
  f as default
5
5
  };
package/package.json CHANGED
@@ -54,7 +54,7 @@
54
54
  "Web accessibility standards",
55
55
  "Universal web access solutions"
56
56
  ],
57
- "version": "2.0.5",
57
+ "version": "2.0.6",
58
58
  "type": "module",
59
59
  "main": "dist/main.min.js",
60
60
  "types": "dist/main.d.ts",