accessibility-plugin-react 2.3.1 → 2.4.0

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.
package/dist/index.mjs CHANGED
@@ -241,8 +241,11 @@ function createPreferenceStore(key, persist, storageMode) {
241
241
  // src/core/featureSchema.ts
242
242
  var numberIn = (min, max) => (v) => typeof v === "number" && Number.isFinite(v) && v >= min && v <= max;
243
243
  var oneOf = (...values) => (v) => values.includes(v);
244
+ var TEXT_SCALE_STEPS = [1, 1.125, 1.25, 1.5, 2];
244
245
  var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
245
246
  fontSize: { defaultValue: 100, validate: numberIn(50, 200) },
247
+ fontScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
248
+ textScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
246
249
  lineHeight: { defaultValue: 100, validate: numberIn(50, 200) },
247
250
  letterSpacing: { defaultValue: 0, validate: numberIn(0, 10) },
248
251
  contrast: {
@@ -321,6 +324,60 @@ function composeFilter(values) {
321
324
  values.grayscale && "grayscale(1)"
322
325
  ].filter(Boolean).join(" ");
323
326
  }
327
+ var TEXT_SCALE_PROTECTED_SELECTOR = [
328
+ "input",
329
+ "textarea",
330
+ "select",
331
+ "select *",
332
+ "option",
333
+ "optgroup",
334
+ "button",
335
+ "button *",
336
+ "datalist",
337
+ "output",
338
+ "progress",
339
+ "meter",
340
+ "label",
341
+ "label *",
342
+ "legend",
343
+ "legend *",
344
+ "pre",
345
+ "pre *",
346
+ "code",
347
+ "kbd",
348
+ "samp",
349
+ "var",
350
+ "svg",
351
+ "svg *",
352
+ "[data-icon]",
353
+ "[data-icon] *",
354
+ 'i[class*="icon"]',
355
+ 'span[class*="icon"]',
356
+ 'i[class*="fa-"]',
357
+ 'span[class*="fa-"]',
358
+ 'i[class*="material-symbols"]',
359
+ 'span[class*="material-symbols"]',
360
+ 'i[class*="lucide"]',
361
+ 'span[class*="lucide"]',
362
+ "[data-arap-ignore]",
363
+ "[data-arap-ignore] *",
364
+ "[data-arap-exempt]",
365
+ "[data-arap-exempt] *"
366
+ ].join(", ");
367
+ function isProtectedFromTextScale(element) {
368
+ try {
369
+ if (element.matches(EXCLUDED)) return true;
370
+ if (element.matches(TEXT_SCALE_PROTECTED_SELECTOR)) return true;
371
+ if (element.closest(
372
+ "pre, button, label, legend, select, [data-arap-ignore], [data-arap-exempt], [data-arap-ui]"
373
+ )) {
374
+ return true;
375
+ }
376
+ } catch {
377
+ return false;
378
+ }
379
+ return false;
380
+ }
324
381
  function applyPage(values) {
325
382
  const undo = [];
326
383
  function set(element, property, value) {
@@ -339,9 +396,11 @@ function applyPage(values) {
339
396
  document.body.querySelectorAll("*")
340
397
  ).filter((el) => el instanceof HTMLElement && !el.matches(EXCLUDED));
341
398
  const elements = allElements.length > MAX_HOST_ELEMENTS ? allElements.slice(0, MAX_HOST_ELEMENTS) : allElements;
342
- const font = Number(values.fontSize ?? 100) / 100;
399
+ const fontScaleValue = typeof values.fontScale === "number" && values.fontScale !== 1 ? values.fontScale : typeof values.textScale === "number" && values.textScale !== 1 ? values.textScale : void 0;
400
+ const fontSizeScale = typeof values.fontSize === "number" && values.fontSize !== 100 ? values.fontSize / 100 : void 0;
401
+ const font = fontScaleValue ?? fontSizeScale ?? 1;
343
402
  const line = Number(values.lineHeight ?? 100) / 100;
344
- const measurements = font !== 1 || line !== 1 ? elements.map((el) => {
403
+ const measurements = font !== 1 || line !== 1 ? elements.filter((el) => !isProtectedFromTextScale(el)).map((el) => {
345
404
  const computed = getComputedStyle(el);
346
405
  return {
347
406
  el,
@@ -1587,11 +1646,44 @@ var DEFAULT_VALUE = 100;
1587
1646
  var MIN = 50;
1588
1647
  var MAX = 200;
1589
1648
  var STEP = 10;
1590
- function FontSizeController() {
1649
+ var DEFAULT_STEP_SCALE = [100, 112.5, 125, 150, 200];
1650
+ function FontSizeController({
1651
+ steps: customSteps,
1652
+ stepScale
1653
+ } = {}) {
1591
1654
  const { value, setValue } = useAccessibility(
1592
1655
  FEATURE_KEY,
1593
1656
  DEFAULT_VALUE
1594
1657
  );
1658
+ const steps = customSteps ? customSteps.map((s) => s <= 2.5 ? Math.round(s * 1e3) / 10 : s) : stepScale ? DEFAULT_STEP_SCALE : null;
1659
+ const handleDecrease = () => {
1660
+ if (steps && steps.length > 0) {
1661
+ const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
1662
+ if (idx > 0) {
1663
+ setValue(steps[idx - 1]);
1664
+ } else if (idx === -1) {
1665
+ const lower = [...steps].reverse().find((s) => s < value);
1666
+ setValue(lower ?? steps[0]);
1667
+ }
1668
+ } else {
1669
+ setValue(Math.max(MIN, value - STEP));
1670
+ }
1671
+ };
1672
+ const handleIncrease = () => {
1673
+ if (steps && steps.length > 0) {
1674
+ const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
1675
+ if (idx !== -1 && idx < steps.length - 1) {
1676
+ setValue(steps[idx + 1]);
1677
+ } else if (idx === -1) {
1678
+ const higher = steps.find((s) => s > value);
1679
+ setValue(higher ?? steps[steps.length - 1]);
1680
+ }
1681
+ } else {
1682
+ setValue(Math.min(MAX, value + STEP));
1683
+ }
1684
+ };
1685
+ const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= MIN;
1686
+ const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= MAX;
1595
1687
  return /* @__PURE__ */ jsxs6(
1596
1688
  "div",
1597
1689
  {
@@ -1608,23 +1700,23 @@ function FontSizeController() {
1608
1700
  "button",
1609
1701
  {
1610
1702
  className: "arap-btn-sm",
1611
- onClick: () => setValue(Math.max(MIN, value - STEP)),
1612
- disabled: value <= MIN,
1703
+ onClick: handleDecrease,
1704
+ disabled: isMin,
1613
1705
  "aria-label": "Decrease font size",
1614
1706
  type: "button",
1615
1707
  children: "\u2212"
1616
1708
  }
1617
1709
  ),
1618
1710
  /* @__PURE__ */ jsxs6("output", { className: "arap-value", "aria-live": "polite", children: [
1619
- value,
1711
+ Math.round(value),
1620
1712
  "%"
1621
1713
  ] }),
1622
1714
  /* @__PURE__ */ jsx7(
1623
1715
  "button",
1624
1716
  {
1625
1717
  className: "arap-btn-sm",
1626
- onClick: () => setValue(Math.min(MAX, value + STEP)),
1627
- disabled: value >= MAX,
1718
+ onClick: handleIncrease,
1719
+ disabled: isMax,
1628
1720
  "aria-label": "Increase font size",
1629
1721
  type: "button",
1630
1722
  children: "+"
@@ -1636,31 +1728,107 @@ function FontSizeController() {
1636
1728
  );
1637
1729
  }
1638
1730
 
1639
- // src/features/LineHeightController.tsx
1731
+ // src/features/TextScaleController.tsx
1640
1732
  import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1641
- var FEATURE_KEY2 = "lineHeight";
1642
- var DEFAULT_VALUE2 = 100;
1643
- var MIN2 = 50;
1644
- var MAX2 = 200;
1645
- var STEP2 = 10;
1646
- function LineHeightController() {
1733
+ var FEATURE_KEY2 = "fontScale";
1734
+ var DEFAULT_VALUE2 = 1;
1735
+ function TextScaleController({
1736
+ steps = TEXT_SCALE_STEPS,
1737
+ label = "Bigger Text"
1738
+ } = {}) {
1647
1739
  const { value, setValue } = useAccessibility(
1648
1740
  FEATURE_KEY2,
1649
1741
  DEFAULT_VALUE2
1650
1742
  );
1743
+ const currentIndex = steps.findIndex((s) => Math.abs(s - value) < 0.01);
1744
+ const isMin = currentIndex === 0 || value <= steps[0];
1745
+ const isMax = currentIndex === steps.length - 1 || value >= steps[steps.length - 1];
1746
+ const handleDecrease = () => {
1747
+ if (currentIndex > 0) {
1748
+ setValue(steps[currentIndex - 1]);
1749
+ } else if (currentIndex === -1) {
1750
+ const lower = [...steps].reverse().find((s) => s < value);
1751
+ setValue(lower ?? steps[0]);
1752
+ }
1753
+ };
1754
+ const handleIncrease = () => {
1755
+ if (currentIndex !== -1 && currentIndex < steps.length - 1) {
1756
+ setValue(steps[currentIndex + 1]);
1757
+ } else if (currentIndex === -1) {
1758
+ const higher = steps.find((s) => s > value);
1759
+ setValue(higher ?? steps[steps.length - 1]);
1760
+ }
1761
+ };
1762
+ const percentage = Math.round(value * 100);
1651
1763
  return /* @__PURE__ */ jsxs7(
1652
1764
  "div",
1653
1765
  {
1654
1766
  className: "arap-feature arap-feature-stepper",
1655
1767
  role: "group",
1656
- "aria-label": "Line Height",
1768
+ "aria-label": label,
1657
1769
  children: [
1658
1770
  /* @__PURE__ */ jsxs7("span", { className: "arap-label", children: [
1659
- /* @__PURE__ */ jsx8(FeatureIcon, { name: FEATURE_KEY2 }),
1660
- /* @__PURE__ */ jsx8("span", { children: "Line Height" })
1771
+ /* @__PURE__ */ jsx8(FeatureIcon, { name: "fontSize" }),
1772
+ /* @__PURE__ */ jsx8("span", { children: label })
1661
1773
  ] }),
1662
1774
  /* @__PURE__ */ jsxs7("div", { className: "arap-controls", children: [
1663
1775
  /* @__PURE__ */ jsx8(
1776
+ "button",
1777
+ {
1778
+ className: "arap-btn-sm",
1779
+ onClick: handleDecrease,
1780
+ disabled: isMin,
1781
+ "aria-label": "Decrease text size",
1782
+ type: "button",
1783
+ children: "\u2212"
1784
+ }
1785
+ ),
1786
+ /* @__PURE__ */ jsxs7("output", { className: "arap-value", "aria-live": "polite", children: [
1787
+ percentage,
1788
+ "%"
1789
+ ] }),
1790
+ /* @__PURE__ */ jsx8(
1791
+ "button",
1792
+ {
1793
+ className: "arap-btn-sm",
1794
+ onClick: handleIncrease,
1795
+ disabled: isMax,
1796
+ "aria-label": "Increase text size",
1797
+ type: "button",
1798
+ children: "+"
1799
+ }
1800
+ )
1801
+ ] })
1802
+ ]
1803
+ }
1804
+ );
1805
+ }
1806
+
1807
+ // src/features/LineHeightController.tsx
1808
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1809
+ var FEATURE_KEY3 = "lineHeight";
1810
+ var DEFAULT_VALUE3 = 100;
1811
+ var MIN2 = 50;
1812
+ var MAX2 = 200;
1813
+ var STEP2 = 10;
1814
+ function LineHeightController() {
1815
+ const { value, setValue } = useAccessibility(
1816
+ FEATURE_KEY3,
1817
+ DEFAULT_VALUE3
1818
+ );
1819
+ return /* @__PURE__ */ jsxs8(
1820
+ "div",
1821
+ {
1822
+ className: "arap-feature arap-feature-stepper",
1823
+ role: "group",
1824
+ "aria-label": "Line Height",
1825
+ children: [
1826
+ /* @__PURE__ */ jsxs8("span", { className: "arap-label", children: [
1827
+ /* @__PURE__ */ jsx9(FeatureIcon, { name: FEATURE_KEY3 }),
1828
+ /* @__PURE__ */ jsx9("span", { children: "Line Height" })
1829
+ ] }),
1830
+ /* @__PURE__ */ jsxs8("div", { className: "arap-controls", children: [
1831
+ /* @__PURE__ */ jsx9(
1664
1832
  "button",
1665
1833
  {
1666
1834
  className: "arap-btn-sm",
@@ -1671,11 +1839,11 @@ function LineHeightController() {
1671
1839
  children: "\u2212"
1672
1840
  }
1673
1841
  ),
1674
- /* @__PURE__ */ jsxs7("output", { className: "arap-value", "aria-live": "polite", children: [
1842
+ /* @__PURE__ */ jsxs8("output", { className: "arap-value", "aria-live": "polite", children: [
1675
1843
  value,
1676
1844
  "%"
1677
1845
  ] }),
1678
- /* @__PURE__ */ jsx8(
1846
+ /* @__PURE__ */ jsx9(
1679
1847
  "button",
1680
1848
  {
1681
1849
  className: "arap-btn-sm",
@@ -1693,30 +1861,30 @@ function LineHeightController() {
1693
1861
  }
1694
1862
 
1695
1863
  // src/features/LetterSpacingController.tsx
1696
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1697
- var FEATURE_KEY3 = "letterSpacing";
1698
- var DEFAULT_VALUE3 = 0;
1864
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1865
+ var FEATURE_KEY4 = "letterSpacing";
1866
+ var DEFAULT_VALUE4 = 0;
1699
1867
  var MIN3 = 0;
1700
1868
  var MAX3 = 10;
1701
1869
  var STEP3 = 1;
1702
1870
  function LetterSpacingController() {
1703
1871
  const { value, setValue } = useAccessibility(
1704
- FEATURE_KEY3,
1705
- DEFAULT_VALUE3
1872
+ FEATURE_KEY4,
1873
+ DEFAULT_VALUE4
1706
1874
  );
1707
- return /* @__PURE__ */ jsxs8(
1875
+ return /* @__PURE__ */ jsxs9(
1708
1876
  "div",
1709
1877
  {
1710
1878
  className: "arap-feature arap-feature-stepper",
1711
1879
  role: "group",
1712
1880
  "aria-label": "Letter Spacing",
1713
1881
  children: [
1714
- /* @__PURE__ */ jsxs8("span", { className: "arap-label", children: [
1715
- /* @__PURE__ */ jsx9(FeatureIcon, { name: FEATURE_KEY3 }),
1716
- /* @__PURE__ */ jsx9("span", { children: "Letter Spacing" })
1882
+ /* @__PURE__ */ jsxs9("span", { className: "arap-label", children: [
1883
+ /* @__PURE__ */ jsx10(FeatureIcon, { name: FEATURE_KEY4 }),
1884
+ /* @__PURE__ */ jsx10("span", { children: "Letter Spacing" })
1717
1885
  ] }),
1718
- /* @__PURE__ */ jsxs8("div", { className: "arap-controls", children: [
1719
- /* @__PURE__ */ jsx9(
1886
+ /* @__PURE__ */ jsxs9("div", { className: "arap-controls", children: [
1887
+ /* @__PURE__ */ jsx10(
1720
1888
  "button",
1721
1889
  {
1722
1890
  className: "arap-btn-sm",
@@ -1727,11 +1895,11 @@ function LetterSpacingController() {
1727
1895
  children: "\u2212"
1728
1896
  }
1729
1897
  ),
1730
- /* @__PURE__ */ jsxs8("output", { className: "arap-value", "aria-live": "polite", children: [
1898
+ /* @__PURE__ */ jsxs9("output", { className: "arap-value", "aria-live": "polite", children: [
1731
1899
  value,
1732
1900
  "px"
1733
1901
  ] }),
1734
- /* @__PURE__ */ jsx9(
1902
+ /* @__PURE__ */ jsx10(
1735
1903
  "button",
1736
1904
  {
1737
1905
  className: "arap-btn-sm",
@@ -1749,9 +1917,9 @@ function LetterSpacingController() {
1749
1917
  }
1750
1918
 
1751
1919
  // src/features/ContrastController.tsx
1752
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1753
- var FEATURE_KEY4 = "contrast";
1754
- var DEFAULT_VALUE4 = 0;
1920
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1921
+ var FEATURE_KEY5 = "contrast";
1922
+ var DEFAULT_VALUE5 = 0;
1755
1923
  var LEVELS = [
1756
1924
  { label: "Off", value: 0 },
1757
1925
  { label: "Reduced", value: "reduced" },
@@ -1764,15 +1932,15 @@ var LEVELS = [
1764
1932
  ];
1765
1933
  function ContrastController() {
1766
1934
  const { value, setValue } = useAccessibility(
1767
- FEATURE_KEY4,
1768
- DEFAULT_VALUE4
1935
+ FEATURE_KEY5,
1936
+ DEFAULT_VALUE5
1769
1937
  );
1770
- return /* @__PURE__ */ jsxs9("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
1771
- /* @__PURE__ */ jsxs9("span", { className: "arap-label", children: [
1772
- /* @__PURE__ */ jsx10(FeatureIcon, { name: FEATURE_KEY4 }),
1773
- /* @__PURE__ */ jsx10("span", { children: "Contrast" })
1938
+ return /* @__PURE__ */ jsxs10("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
1939
+ /* @__PURE__ */ jsxs10("span", { className: "arap-label", children: [
1940
+ /* @__PURE__ */ jsx11(FeatureIcon, { name: FEATURE_KEY5 }),
1941
+ /* @__PURE__ */ jsx11("span", { children: "Contrast" })
1774
1942
  ] }),
1775
- /* @__PURE__ */ jsx10("div", { className: "arap-segmented", children: LEVELS.map((level) => /* @__PURE__ */ jsxs9(
1943
+ /* @__PURE__ */ jsx11("div", { className: "arap-segmented", children: LEVELS.map((level) => /* @__PURE__ */ jsxs10(
1776
1944
  "button",
1777
1945
  {
1778
1946
  className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
@@ -1780,7 +1948,7 @@ function ContrastController() {
1780
1948
  "aria-pressed": value === level.value,
1781
1949
  type: "button",
1782
1950
  children: [
1783
- value === level.value && /* @__PURE__ */ jsx10("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
1951
+ value === level.value && /* @__PURE__ */ jsx11("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
1784
1952
  level.label
1785
1953
  ]
1786
1954
  },
@@ -1790,9 +1958,9 @@ function ContrastController() {
1790
1958
  }
1791
1959
 
1792
1960
  // src/features/SaturationController.tsx
1793
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1794
- var FEATURE_KEY5 = "saturation";
1795
- var DEFAULT_VALUE5 = 0;
1961
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1962
+ var FEATURE_KEY6 = "saturation";
1963
+ var DEFAULT_VALUE6 = 0;
1796
1964
  var LEVELS2 = [
1797
1965
  { label: "Off", value: 0 },
1798
1966
  { label: "Low", value: 1 },
@@ -1800,15 +1968,15 @@ var LEVELS2 = [
1800
1968
  ];
1801
1969
  function SaturationController() {
1802
1970
  const { value, setValue } = useAccessibility(
1803
- FEATURE_KEY5,
1804
- DEFAULT_VALUE5
1971
+ FEATURE_KEY6,
1972
+ DEFAULT_VALUE6
1805
1973
  );
1806
- return /* @__PURE__ */ jsxs10("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
1807
- /* @__PURE__ */ jsxs10("span", { className: "arap-label", children: [
1808
- /* @__PURE__ */ jsx11(FeatureIcon, { name: FEATURE_KEY5 }),
1809
- /* @__PURE__ */ jsx11("span", { children: "Saturation" })
1974
+ return /* @__PURE__ */ jsxs11("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
1975
+ /* @__PURE__ */ jsxs11("span", { className: "arap-label", children: [
1976
+ /* @__PURE__ */ jsx12(FeatureIcon, { name: FEATURE_KEY6 }),
1977
+ /* @__PURE__ */ jsx12("span", { children: "Saturation" })
1810
1978
  ] }),
1811
- /* @__PURE__ */ jsx11("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ jsxs10(
1979
+ /* @__PURE__ */ jsx12("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ jsxs11(
1812
1980
  "button",
1813
1981
  {
1814
1982
  className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
@@ -1816,7 +1984,7 @@ function SaturationController() {
1816
1984
  "aria-pressed": value === level.value,
1817
1985
  type: "button",
1818
1986
  children: [
1819
- value === level.value && /* @__PURE__ */ jsx11("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
1987
+ value === level.value && /* @__PURE__ */ jsx12("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
1820
1988
  level.label
1821
1989
  ]
1822
1990
  },
@@ -1826,20 +1994,20 @@ function SaturationController() {
1826
1994
  }
1827
1995
 
1828
1996
  // src/features/InvertColorsController.tsx
1829
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1830
- var FEATURE_KEY6 = "invertColors";
1831
- var DEFAULT_VALUE6 = false;
1997
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1998
+ var FEATURE_KEY7 = "invertColors";
1999
+ var DEFAULT_VALUE7 = false;
1832
2000
  function InvertColorsController() {
1833
2001
  const { value, setValue } = useAccessibility(
1834
- FEATURE_KEY6,
1835
- DEFAULT_VALUE6
2002
+ FEATURE_KEY7,
2003
+ DEFAULT_VALUE7
1836
2004
  );
1837
- return /* @__PURE__ */ jsxs11("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
1838
- /* @__PURE__ */ jsxs11("span", { className: "arap-label", children: [
1839
- /* @__PURE__ */ jsx12(FeatureIcon, { name: FEATURE_KEY6 }),
1840
- /* @__PURE__ */ jsx12("span", { children: "Invert Colors" })
2005
+ return /* @__PURE__ */ jsxs12("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
2006
+ /* @__PURE__ */ jsxs12("span", { className: "arap-label", children: [
2007
+ /* @__PURE__ */ jsx13(FeatureIcon, { name: FEATURE_KEY7 }),
2008
+ /* @__PURE__ */ jsx13("span", { children: "Invert Colors" })
1841
2009
  ] }),
1842
- /* @__PURE__ */ jsx12(
2010
+ /* @__PURE__ */ jsx13(
1843
2011
  "button",
1844
2012
  {
1845
2013
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
@@ -1847,27 +2015,27 @@ function InvertColorsController() {
1847
2015
  "aria-label": "Invert Colors",
1848
2016
  "aria-pressed": value,
1849
2017
  type: "button",
1850
- children: /* @__PURE__ */ jsx12("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2018
+ children: /* @__PURE__ */ jsx13("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
1851
2019
  }
1852
2020
  )
1853
2021
  ] });
1854
2022
  }
1855
2023
 
1856
2024
  // src/features/GrayscaleController.tsx
1857
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1858
- var FEATURE_KEY7 = "grayscale";
1859
- var DEFAULT_VALUE7 = false;
2025
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
2026
+ var FEATURE_KEY8 = "grayscale";
2027
+ var DEFAULT_VALUE8 = false;
1860
2028
  function GrayscaleController() {
1861
2029
  const { value, setValue } = useAccessibility(
1862
- FEATURE_KEY7,
1863
- DEFAULT_VALUE7
2030
+ FEATURE_KEY8,
2031
+ DEFAULT_VALUE8
1864
2032
  );
1865
- return /* @__PURE__ */ jsxs12("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
1866
- /* @__PURE__ */ jsxs12("span", { className: "arap-label", children: [
1867
- /* @__PURE__ */ jsx13(FeatureIcon, { name: FEATURE_KEY7 }),
1868
- /* @__PURE__ */ jsx13("span", { children: "Grayscale" })
2033
+ return /* @__PURE__ */ jsxs13("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
2034
+ /* @__PURE__ */ jsxs13("span", { className: "arap-label", children: [
2035
+ /* @__PURE__ */ jsx14(FeatureIcon, { name: FEATURE_KEY8 }),
2036
+ /* @__PURE__ */ jsx14("span", { children: "Grayscale" })
1869
2037
  ] }),
1870
- /* @__PURE__ */ jsx13(
2038
+ /* @__PURE__ */ jsx14(
1871
2039
  "button",
1872
2040
  {
1873
2041
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
@@ -1875,27 +2043,27 @@ function GrayscaleController() {
1875
2043
  "aria-label": "Grayscale",
1876
2044
  "aria-pressed": value,
1877
2045
  type: "button",
1878
- children: /* @__PURE__ */ jsx13("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2046
+ children: /* @__PURE__ */ jsx14("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
1879
2047
  }
1880
2048
  )
1881
2049
  ] });
1882
2050
  }
1883
2051
 
1884
2052
  // src/features/LinkHighlightController.tsx
1885
- import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1886
- var FEATURE_KEY8 = "linkHighlight";
1887
- var DEFAULT_VALUE8 = false;
2053
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
2054
+ var FEATURE_KEY9 = "linkHighlight";
2055
+ var DEFAULT_VALUE9 = false;
1888
2056
  function LinkHighlightController() {
1889
2057
  const { value, setValue } = useAccessibility(
1890
- FEATURE_KEY8,
1891
- DEFAULT_VALUE8
2058
+ FEATURE_KEY9,
2059
+ DEFAULT_VALUE9
1892
2060
  );
1893
- return /* @__PURE__ */ jsxs13("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
1894
- /* @__PURE__ */ jsxs13("span", { className: "arap-label", children: [
1895
- /* @__PURE__ */ jsx14(FeatureIcon, { name: FEATURE_KEY8 }),
1896
- /* @__PURE__ */ jsx14("span", { children: "Link Highlight" })
2061
+ return /* @__PURE__ */ jsxs14("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
2062
+ /* @__PURE__ */ jsxs14("span", { className: "arap-label", children: [
2063
+ /* @__PURE__ */ jsx15(FeatureIcon, { name: FEATURE_KEY9 }),
2064
+ /* @__PURE__ */ jsx15("span", { children: "Link Highlight" })
1897
2065
  ] }),
1898
- /* @__PURE__ */ jsx14(
2066
+ /* @__PURE__ */ jsx15(
1899
2067
  "button",
1900
2068
  {
1901
2069
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
@@ -1903,10 +2071,10 @@ function LinkHighlightController() {
1903
2071
  "aria-label": "Link Highlight",
1904
2072
  "aria-pressed": !!value,
1905
2073
  type: "button",
1906
- children: /* @__PURE__ */ jsx14("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2074
+ children: /* @__PURE__ */ jsx15("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
1907
2075
  }
1908
2076
  ),
1909
- /* @__PURE__ */ jsx14("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ jsxs13(
2077
+ /* @__PURE__ */ jsx15("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ jsxs14(
1910
2078
  "button",
1911
2079
  {
1912
2080
  type: "button",
@@ -1914,7 +2082,7 @@ function LinkHighlightController() {
1914
2082
  "aria-pressed": value === mode,
1915
2083
  onClick: () => setValue(mode),
1916
2084
  children: [
1917
- value === mode && /* @__PURE__ */ jsx14("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2085
+ value === mode && /* @__PURE__ */ jsx15("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
1918
2086
  mode.split("-").join(" ")
1919
2087
  ]
1920
2088
  },
@@ -1924,21 +2092,21 @@ function LinkHighlightController() {
1924
2092
  }
1925
2093
 
1926
2094
  // src/features/TextAlignController.tsx
1927
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1928
- var FEATURE_KEY9 = "textAlign";
1929
- var DEFAULT_VALUE9 = "default";
2095
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2096
+ var FEATURE_KEY10 = "textAlign";
2097
+ var DEFAULT_VALUE10 = "default";
1930
2098
  var OPTIONS = ["default", "left", "center", "right", "justify"];
1931
2099
  function TextAlignController() {
1932
2100
  const { value, setValue } = useAccessibility(
1933
- FEATURE_KEY9,
1934
- DEFAULT_VALUE9
2101
+ FEATURE_KEY10,
2102
+ DEFAULT_VALUE10
1935
2103
  );
1936
- return /* @__PURE__ */ jsxs14("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
1937
- /* @__PURE__ */ jsxs14("span", { className: "arap-label", children: [
1938
- /* @__PURE__ */ jsx15(FeatureIcon, { name: FEATURE_KEY9 }),
1939
- /* @__PURE__ */ jsx15("span", { children: "Text Alignment" })
2104
+ return /* @__PURE__ */ jsxs15("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
2105
+ /* @__PURE__ */ jsxs15("span", { className: "arap-label", children: [
2106
+ /* @__PURE__ */ jsx16(FeatureIcon, { name: FEATURE_KEY10 }),
2107
+ /* @__PURE__ */ jsx16("span", { children: "Text Alignment" })
1940
2108
  ] }),
1941
- /* @__PURE__ */ jsx15("div", { className: "arap-segmented", children: OPTIONS.map((option) => /* @__PURE__ */ jsxs14(
2109
+ /* @__PURE__ */ jsx16("div", { className: "arap-segmented", children: OPTIONS.map((option) => /* @__PURE__ */ jsxs15(
1942
2110
  "button",
1943
2111
  {
1944
2112
  className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
@@ -1947,7 +2115,7 @@ function TextAlignController() {
1947
2115
  type: "button",
1948
2116
  style: { textTransform: "capitalize" },
1949
2117
  children: [
1950
- value === option && /* @__PURE__ */ jsx15("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2118
+ value === option && /* @__PURE__ */ jsx16("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
1951
2119
  option
1952
2120
  ]
1953
2121
  },
@@ -1957,53 +2125,25 @@ function TextAlignController() {
1957
2125
  }
1958
2126
 
1959
2127
  // src/features/HideImagesController.tsx
1960
- import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
1961
- var FEATURE_KEY10 = "hideImages";
1962
- var DEFAULT_VALUE10 = false;
1963
- function HideImagesController() {
1964
- const { value, setValue } = useAccessibility(
1965
- FEATURE_KEY10,
1966
- DEFAULT_VALUE10
1967
- );
1968
- return /* @__PURE__ */ jsxs15("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
1969
- /* @__PURE__ */ jsxs15("span", { className: "arap-label", children: [
1970
- /* @__PURE__ */ jsx16(FeatureIcon, { name: FEATURE_KEY10 }),
1971
- /* @__PURE__ */ jsx16("span", { children: "Hide Images" })
1972
- ] }),
1973
- /* @__PURE__ */ jsx16(
1974
- "button",
1975
- {
1976
- className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
1977
- onClick: () => setValue(!value),
1978
- "aria-label": "Hide Images",
1979
- "aria-pressed": value,
1980
- type: "button",
1981
- children: /* @__PURE__ */ jsx16("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
1982
- }
1983
- )
1984
- ] });
1985
- }
1986
-
1987
- // src/features/HideVideosController.tsx
1988
2128
  import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
1989
- var FEATURE_KEY11 = "hideVideos";
2129
+ var FEATURE_KEY11 = "hideImages";
1990
2130
  var DEFAULT_VALUE11 = false;
1991
- function HideVideosController() {
2131
+ function HideImagesController() {
1992
2132
  const { value, setValue } = useAccessibility(
1993
2133
  FEATURE_KEY11,
1994
2134
  DEFAULT_VALUE11
1995
2135
  );
1996
- return /* @__PURE__ */ jsxs16("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
2136
+ return /* @__PURE__ */ jsxs16("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
1997
2137
  /* @__PURE__ */ jsxs16("span", { className: "arap-label", children: [
1998
2138
  /* @__PURE__ */ jsx17(FeatureIcon, { name: FEATURE_KEY11 }),
1999
- /* @__PURE__ */ jsx17("span", { children: "Hide Videos" })
2139
+ /* @__PURE__ */ jsx17("span", { children: "Hide Images" })
2000
2140
  ] }),
2001
2141
  /* @__PURE__ */ jsx17(
2002
2142
  "button",
2003
2143
  {
2004
2144
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
2005
2145
  onClick: () => setValue(!value),
2006
- "aria-label": "Hide Videos",
2146
+ "aria-label": "Hide Images",
2007
2147
  "aria-pressed": value,
2008
2148
  type: "button",
2009
2149
  children: /* @__PURE__ */ jsx17("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
@@ -2012,26 +2152,26 @@ function HideVideosController() {
2012
2152
  ] });
2013
2153
  }
2014
2154
 
2015
- // src/features/BigCursorController.tsx
2155
+ // src/features/HideVideosController.tsx
2016
2156
  import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2017
- var FEATURE_KEY12 = "bigCursor";
2157
+ var FEATURE_KEY12 = "hideVideos";
2018
2158
  var DEFAULT_VALUE12 = false;
2019
- function BigCursorController() {
2159
+ function HideVideosController() {
2020
2160
  const { value, setValue } = useAccessibility(
2021
2161
  FEATURE_KEY12,
2022
2162
  DEFAULT_VALUE12
2023
2163
  );
2024
- return /* @__PURE__ */ jsxs17("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
2164
+ return /* @__PURE__ */ jsxs17("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
2025
2165
  /* @__PURE__ */ jsxs17("span", { className: "arap-label", children: [
2026
2166
  /* @__PURE__ */ jsx18(FeatureIcon, { name: FEATURE_KEY12 }),
2027
- /* @__PURE__ */ jsx18("span", { children: "Big Cursor" })
2167
+ /* @__PURE__ */ jsx18("span", { children: "Hide Videos" })
2028
2168
  ] }),
2029
2169
  /* @__PURE__ */ jsx18(
2030
2170
  "button",
2031
2171
  {
2032
2172
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
2033
2173
  onClick: () => setValue(!value),
2034
- "aria-label": "Big Cursor",
2174
+ "aria-label": "Hide Videos",
2035
2175
  "aria-pressed": value,
2036
2176
  type: "button",
2037
2177
  children: /* @__PURE__ */ jsx18("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
@@ -2040,26 +2180,26 @@ function BigCursorController() {
2040
2180
  ] });
2041
2181
  }
2042
2182
 
2043
- // src/features/ReadingMaskController.tsx
2183
+ // src/features/BigCursorController.tsx
2044
2184
  import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
2045
- var FEATURE_KEY13 = "readingMask";
2185
+ var FEATURE_KEY13 = "bigCursor";
2046
2186
  var DEFAULT_VALUE13 = false;
2047
- function ReadingMaskController() {
2187
+ function BigCursorController() {
2048
2188
  const { value, setValue } = useAccessibility(
2049
2189
  FEATURE_KEY13,
2050
2190
  DEFAULT_VALUE13
2051
2191
  );
2052
- return /* @__PURE__ */ jsxs18("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
2192
+ return /* @__PURE__ */ jsxs18("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
2053
2193
  /* @__PURE__ */ jsxs18("span", { className: "arap-label", children: [
2054
2194
  /* @__PURE__ */ jsx19(FeatureIcon, { name: FEATURE_KEY13 }),
2055
- /* @__PURE__ */ jsx19("span", { children: "Reading Mask" })
2195
+ /* @__PURE__ */ jsx19("span", { children: "Big Cursor" })
2056
2196
  ] }),
2057
2197
  /* @__PURE__ */ jsx19(
2058
2198
  "button",
2059
2199
  {
2060
2200
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
2061
2201
  onClick: () => setValue(!value),
2062
- "aria-label": "Reading Mask",
2202
+ "aria-label": "Big Cursor",
2063
2203
  "aria-pressed": value,
2064
2204
  type: "button",
2065
2205
  children: /* @__PURE__ */ jsx19("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
@@ -2068,26 +2208,26 @@ function ReadingMaskController() {
2068
2208
  ] });
2069
2209
  }
2070
2210
 
2071
- // src/features/ReadingGuideController.tsx
2211
+ // src/features/ReadingMaskController.tsx
2072
2212
  import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
2073
- var FEATURE_KEY14 = "readingGuide";
2213
+ var FEATURE_KEY14 = "readingMask";
2074
2214
  var DEFAULT_VALUE14 = false;
2075
- function ReadingGuideController() {
2215
+ function ReadingMaskController() {
2076
2216
  const { value, setValue } = useAccessibility(
2077
2217
  FEATURE_KEY14,
2078
2218
  DEFAULT_VALUE14
2079
2219
  );
2080
- return /* @__PURE__ */ jsxs19("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
2220
+ return /* @__PURE__ */ jsxs19("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
2081
2221
  /* @__PURE__ */ jsxs19("span", { className: "arap-label", children: [
2082
2222
  /* @__PURE__ */ jsx20(FeatureIcon, { name: FEATURE_KEY14 }),
2083
- /* @__PURE__ */ jsx20("span", { children: "Reading Guide" })
2223
+ /* @__PURE__ */ jsx20("span", { children: "Reading Mask" })
2084
2224
  ] }),
2085
2225
  /* @__PURE__ */ jsx20(
2086
2226
  "button",
2087
2227
  {
2088
2228
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
2089
2229
  onClick: () => setValue(!value),
2090
- "aria-label": "Reading Guide",
2230
+ "aria-label": "Reading Mask",
2091
2231
  "aria-pressed": value,
2092
2232
  type: "button",
2093
2233
  children: /* @__PURE__ */ jsx20("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
@@ -2096,10 +2236,38 @@ function ReadingGuideController() {
2096
2236
  ] });
2097
2237
  }
2098
2238
 
2239
+ // src/features/ReadingGuideController.tsx
2240
+ import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
2241
+ var FEATURE_KEY15 = "readingGuide";
2242
+ var DEFAULT_VALUE15 = false;
2243
+ function ReadingGuideController() {
2244
+ const { value, setValue } = useAccessibility(
2245
+ FEATURE_KEY15,
2246
+ DEFAULT_VALUE15
2247
+ );
2248
+ return /* @__PURE__ */ jsxs20("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
2249
+ /* @__PURE__ */ jsxs20("span", { className: "arap-label", children: [
2250
+ /* @__PURE__ */ jsx21(FeatureIcon, { name: FEATURE_KEY15 }),
2251
+ /* @__PURE__ */ jsx21("span", { children: "Reading Guide" })
2252
+ ] }),
2253
+ /* @__PURE__ */ jsx21(
2254
+ "button",
2255
+ {
2256
+ className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
2257
+ onClick: () => setValue(!value),
2258
+ "aria-label": "Reading Guide",
2259
+ "aria-pressed": value,
2260
+ type: "button",
2261
+ children: /* @__PURE__ */ jsx21("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2262
+ }
2263
+ )
2264
+ ] });
2265
+ }
2266
+
2099
2267
  // src/features/ResetController.tsx
2100
2268
  import { createPortal as createPortal2 } from "react-dom";
2101
2269
  import { useContext as useContext5 } from "react";
2102
- import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
2270
+ import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
2103
2271
  function ResetController() {
2104
2272
  const ctx = useContext5(AccessibilityContext);
2105
2273
  if (!ctx) {
@@ -2110,15 +2278,15 @@ function ResetController() {
2110
2278
  const actionHost = useContext5(PanelActionsContext);
2111
2279
  const { resetAll } = ctx;
2112
2280
  const strings = resolveLocaleStrings(ctx.locale);
2113
- const button = /* @__PURE__ */ jsx21("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ jsxs20("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
2114
- /* @__PURE__ */ jsx21(FeatureIcon, { name: "reset" }),
2281
+ const button = /* @__PURE__ */ jsx22("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ jsxs21("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
2282
+ /* @__PURE__ */ jsx22(FeatureIcon, { name: "reset" }),
2115
2283
  strings.resetAll
2116
2284
  ] }) });
2117
2285
  return actionHost ? createPortal2(button, actionHost) : button;
2118
2286
  }
2119
2287
 
2120
2288
  // src/core/controls/ToggleControl.tsx
2121
- import { jsx as jsx22 } from "react/jsx-runtime";
2289
+ import { jsx as jsx23 } from "react/jsx-runtime";
2122
2290
  function ToggleControl({
2123
2291
  id,
2124
2292
  label,
@@ -2140,12 +2308,12 @@ function ToggleControl({
2140
2308
  onChange(!checked);
2141
2309
  }
2142
2310
  };
2143
- return /* @__PURE__ */ jsx22(
2311
+ return /* @__PURE__ */ jsx23(
2144
2312
  "div",
2145
2313
  {
2146
2314
  className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
2147
2315
  style,
2148
- children: /* @__PURE__ */ jsx22(
2316
+ children: /* @__PURE__ */ jsx23(
2149
2317
  "button",
2150
2318
  {
2151
2319
  id,
@@ -2159,7 +2327,7 @@ function ToggleControl({
2159
2327
  disabled: !isInteractive,
2160
2328
  onClick: handleClick,
2161
2329
  title: unavailableReason || description || toggleLabel,
2162
- children: /* @__PURE__ */ jsx22(
2330
+ children: /* @__PURE__ */ jsx23(
2163
2331
  "span",
2164
2332
  {
2165
2333
  className: "arap-toggle-knob",
@@ -2176,7 +2344,7 @@ function ToggleControl({
2176
2344
 
2177
2345
  // src/core/controls/ChoiceControl.tsx
2178
2346
  import { useCallback as useCallback4, useMemo as useMemo2, useRef as useRef5 } from "react";
2179
- import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
2347
+ import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
2180
2348
  function ChoiceControl({
2181
2349
  id,
2182
2350
  label,
@@ -2232,7 +2400,7 @@ function ChoiceControl({
2232
2400
  const renderOptionButton = (opt) => {
2233
2401
  const isSelected = value === opt.value;
2234
2402
  const isOptionDisabled = disabled || Boolean(opt.disabled);
2235
- return /* @__PURE__ */ jsxs21(
2403
+ return /* @__PURE__ */ jsxs22(
2236
2404
  "button",
2237
2405
  {
2238
2406
  type: "button",
@@ -2246,15 +2414,15 @@ function ChoiceControl({
2246
2414
  onClick: () => !isOptionDisabled && onChange(opt.value),
2247
2415
  title: opt.description,
2248
2416
  children: [
2249
- isSelected && /* @__PURE__ */ jsx23("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2250
- /* @__PURE__ */ jsx23("span", { children: opt.label }),
2251
- opt.badge && /* @__PURE__ */ jsx23("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
2417
+ isSelected && /* @__PURE__ */ jsx24("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2418
+ /* @__PURE__ */ jsx24("span", { children: opt.label }),
2419
+ opt.badge && /* @__PURE__ */ jsx24("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
2252
2420
  ]
2253
2421
  },
2254
2422
  String(opt.value)
2255
2423
  );
2256
2424
  };
2257
- return /* @__PURE__ */ jsx23(
2425
+ return /* @__PURE__ */ jsx24(
2258
2426
  "div",
2259
2427
  {
2260
2428
  ref: containerRef,
@@ -2265,15 +2433,15 @@ function ChoiceControl({
2265
2433
  className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
2266
2434
  style,
2267
2435
  onKeyDown: handleKeyDown,
2268
- children: groups ? groups.map((group) => /* @__PURE__ */ jsxs21(
2436
+ children: groups ? groups.map((group) => /* @__PURE__ */ jsxs22(
2269
2437
  "div",
2270
2438
  {
2271
2439
  className: "arap-choice-group",
2272
2440
  role: "group",
2273
2441
  "aria-label": group.label,
2274
2442
  children: [
2275
- /* @__PURE__ */ jsx23("span", { className: "arap-choice-group-title", children: group.label }),
2276
- /* @__PURE__ */ jsx23("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
2443
+ /* @__PURE__ */ jsx24("span", { className: "arap-choice-group-title", children: group.label }),
2444
+ /* @__PURE__ */ jsx24("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
2277
2445
  ]
2278
2446
  },
2279
2447
  group.label
@@ -2283,7 +2451,7 @@ function ChoiceControl({
2283
2451
  }
2284
2452
 
2285
2453
  // src/core/controls/StepperControl.tsx
2286
- import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
2454
+ import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
2287
2455
  function StepperControl({
2288
2456
  id,
2289
2457
  label,
@@ -2313,15 +2481,15 @@ function StepperControl({
2313
2481
  onChange(Math.min(max, Number((value + step).toFixed(2))));
2314
2482
  }
2315
2483
  };
2316
- return /* @__PURE__ */ jsxs22(
2484
+ return /* @__PURE__ */ jsxs23(
2317
2485
  "div",
2318
2486
  {
2319
2487
  id,
2320
2488
  className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
2321
2489
  style,
2322
2490
  children: [
2323
- /* @__PURE__ */ jsxs22("div", { className: "arap-controls", children: [
2324
- /* @__PURE__ */ jsx24(
2491
+ /* @__PURE__ */ jsxs23("div", { className: "arap-controls", children: [
2492
+ /* @__PURE__ */ jsx25(
2325
2493
  "button",
2326
2494
  {
2327
2495
  type: "button",
@@ -2332,8 +2500,8 @@ function StepperControl({
2332
2500
  children: "\u2212"
2333
2501
  }
2334
2502
  ),
2335
- /* @__PURE__ */ jsx24("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
2336
- /* @__PURE__ */ jsx24(
2503
+ /* @__PURE__ */ jsx25("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
2504
+ /* @__PURE__ */ jsx25(
2337
2505
  "button",
2338
2506
  {
2339
2507
  type: "button",
@@ -2345,7 +2513,7 @@ function StepperControl({
2345
2513
  }
2346
2514
  )
2347
2515
  ] }),
2348
- showSlider && /* @__PURE__ */ jsx24("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx24(
2516
+ showSlider && /* @__PURE__ */ jsx25("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx25(
2349
2517
  "input",
2350
2518
  {
2351
2519
  type: "range",
@@ -2369,7 +2537,7 @@ function StepperControl({
2369
2537
  }
2370
2538
 
2371
2539
  // src/core/controls/FeatureCard.tsx
2372
- import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
2540
+ import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2373
2541
  function FeatureCard({
2374
2542
  id,
2375
2543
  featureKey,
@@ -2388,7 +2556,7 @@ function FeatureCard({
2388
2556
  largeControls = false
2389
2557
  }) {
2390
2558
  const cardTitle = typeof title === "string" ? title : void 0;
2391
- return /* @__PURE__ */ jsxs23(
2559
+ return /* @__PURE__ */ jsxs24(
2392
2560
  "div",
2393
2561
  {
2394
2562
  id,
@@ -2397,27 +2565,27 @@ function FeatureCard({
2397
2565
  className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
2398
2566
  style,
2399
2567
  children: [
2400
- /* @__PURE__ */ jsxs23("div", { className: "arap-card-header", children: [
2401
- /* @__PURE__ */ jsxs23("span", { className: "arap-label", children: [
2402
- icon ?? (featureKey ? /* @__PURE__ */ jsx25(FeatureIcon, { name: featureKey }) : null),
2403
- /* @__PURE__ */ jsx25("span", { className: "arap-card-title", children: title })
2568
+ /* @__PURE__ */ jsxs24("div", { className: "arap-card-header", children: [
2569
+ /* @__PURE__ */ jsxs24("span", { className: "arap-label", children: [
2570
+ icon ?? (featureKey ? /* @__PURE__ */ jsx26(FeatureIcon, { name: featureKey }) : null),
2571
+ /* @__PURE__ */ jsx26("span", { className: "arap-card-title", children: title })
2404
2572
  ] }),
2405
- statusBadge && /* @__PURE__ */ jsx25("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
2573
+ statusBadge && /* @__PURE__ */ jsx26("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
2406
2574
  ] }),
2407
- description && /* @__PURE__ */ jsx25("p", { className: "arap-card-desc", children: description }),
2408
- status === "error" && errorMessage && /* @__PURE__ */ jsxs23("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
2409
- /* @__PURE__ */ jsx25("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
2410
- /* @__PURE__ */ jsx25("span", { children: errorMessage })
2575
+ description && /* @__PURE__ */ jsx26("p", { className: "arap-card-desc", children: description }),
2576
+ status === "error" && errorMessage && /* @__PURE__ */ jsxs24("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
2577
+ /* @__PURE__ */ jsx26("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
2578
+ /* @__PURE__ */ jsx26("span", { children: errorMessage })
2411
2579
  ] }),
2412
- status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs23("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
2413
- /* @__PURE__ */ jsx25("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
2414
- /* @__PURE__ */ jsx25("span", { children: unavailableMessage })
2580
+ status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs24("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
2581
+ /* @__PURE__ */ jsx26("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
2582
+ /* @__PURE__ */ jsx26("span", { children: unavailableMessage })
2415
2583
  ] }),
2416
- status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs23("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
2417
- /* @__PURE__ */ jsx25("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
2418
- /* @__PURE__ */ jsxs23("div", { className: "arap-permission-content", children: [
2419
- /* @__PURE__ */ jsx25("span", { children: permissionMessage }),
2420
- onRequestPermission && /* @__PURE__ */ jsx25(
2584
+ status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs24("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
2585
+ /* @__PURE__ */ jsx26("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
2586
+ /* @__PURE__ */ jsxs24("div", { className: "arap-permission-content", children: [
2587
+ /* @__PURE__ */ jsx26("span", { children: permissionMessage }),
2588
+ onRequestPermission && /* @__PURE__ */ jsx26(
2421
2589
  "button",
2422
2590
  {
2423
2591
  type: "button",
@@ -2428,14 +2596,14 @@ function FeatureCard({
2428
2596
  )
2429
2597
  ] })
2430
2598
  ] }),
2431
- /* @__PURE__ */ jsx25("div", { className: "arap-card-content", children })
2599
+ /* @__PURE__ */ jsx26("div", { className: "arap-card-content", children })
2432
2600
  ]
2433
2601
  }
2434
2602
  );
2435
2603
  }
2436
2604
 
2437
2605
  // src/core/controls/FeatureStatusState.tsx
2438
- import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2606
+ import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2439
2607
  function SearchCount({
2440
2608
  totalCount,
2441
2609
  matchedCount,
@@ -2444,7 +2612,7 @@ function SearchCount({
2444
2612
  style
2445
2613
  }) {
2446
2614
  const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
2447
- return /* @__PURE__ */ jsx26(
2615
+ return /* @__PURE__ */ jsx27(
2448
2616
  "div",
2449
2617
  {
2450
2618
  role: "status",
@@ -2464,17 +2632,17 @@ function EmptyState({
2464
2632
  className = "",
2465
2633
  style
2466
2634
  }) {
2467
- return /* @__PURE__ */ jsxs24(
2635
+ return /* @__PURE__ */ jsxs25(
2468
2636
  "div",
2469
2637
  {
2470
2638
  role: "status",
2471
2639
  className: `arap-empty-state ${className}`,
2472
2640
  style,
2473
2641
  children: [
2474
- /* @__PURE__ */ jsx26("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
2475
- /* @__PURE__ */ jsx26("h3", { className: "arap-empty-title", children: title }),
2476
- /* @__PURE__ */ jsx26("p", { className: "arap-empty-desc", children: description }),
2477
- onAction && /* @__PURE__ */ jsx26("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
2642
+ /* @__PURE__ */ jsx27("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
2643
+ /* @__PURE__ */ jsx27("h3", { className: "arap-empty-title", children: title }),
2644
+ /* @__PURE__ */ jsx27("p", { className: "arap-empty-desc", children: description }),
2645
+ onAction && /* @__PURE__ */ jsx27("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
2478
2646
  ]
2479
2647
  }
2480
2648
  );
@@ -2487,18 +2655,18 @@ function ErrorState({
2487
2655
  className = "",
2488
2656
  style
2489
2657
  }) {
2490
- return /* @__PURE__ */ jsxs24(
2658
+ return /* @__PURE__ */ jsxs25(
2491
2659
  "div",
2492
2660
  {
2493
2661
  role: "alert",
2494
2662
  className: `arap-error-state arap-card-alert arap-card-error ${className}`,
2495
2663
  style,
2496
2664
  children: [
2497
- /* @__PURE__ */ jsx26("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
2498
- /* @__PURE__ */ jsxs24("div", { className: "arap-error-content", children: [
2499
- title && /* @__PURE__ */ jsx26("h4", { className: "arap-error-title", children: title }),
2500
- /* @__PURE__ */ jsx26("p", { className: "arap-error-message", children: message }),
2501
- onRetry && /* @__PURE__ */ jsx26("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
2665
+ /* @__PURE__ */ jsx27("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
2666
+ /* @__PURE__ */ jsxs25("div", { className: "arap-error-content", children: [
2667
+ title && /* @__PURE__ */ jsx27("h4", { className: "arap-error-title", children: title }),
2668
+ /* @__PURE__ */ jsx27("p", { className: "arap-error-message", children: message }),
2669
+ onRetry && /* @__PURE__ */ jsx27("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
2502
2670
  ] })
2503
2671
  ]
2504
2672
  }
@@ -2506,7 +2674,7 @@ function ErrorState({
2506
2674
  }
2507
2675
 
2508
2676
  // src/core/controls/ProfilePreviewCard.tsx
2509
- import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2677
+ import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
2510
2678
  function ProfilePreviewCard({
2511
2679
  profile,
2512
2680
  isActive,
@@ -2556,7 +2724,7 @@ function ProfilePreviewCard({
2556
2724
  if (val === null || val === void 0) return "Original";
2557
2725
  return String(val);
2558
2726
  };
2559
- return /* @__PURE__ */ jsxs25(
2727
+ return /* @__PURE__ */ jsxs26(
2560
2728
  "div",
2561
2729
  {
2562
2730
  role: "group",
@@ -2564,10 +2732,10 @@ function ProfilePreviewCard({
2564
2732
  className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
2565
2733
  style,
2566
2734
  children: [
2567
- /* @__PURE__ */ jsxs25("div", { className: "arap-profile-header", children: [
2568
- /* @__PURE__ */ jsxs25("div", { className: "arap-profile-title-row", children: [
2569
- /* @__PURE__ */ jsx27("h4", { className: "arap-profile-title", children: profile.label }),
2570
- isActive && /* @__PURE__ */ jsx27(
2735
+ /* @__PURE__ */ jsxs26("div", { className: "arap-profile-header", children: [
2736
+ /* @__PURE__ */ jsxs26("div", { className: "arap-profile-title-row", children: [
2737
+ /* @__PURE__ */ jsx28("h4", { className: "arap-profile-title", children: profile.label }),
2738
+ isActive && /* @__PURE__ */ jsx28(
2571
2739
  "span",
2572
2740
  {
2573
2741
  className: "arap-profile-active-badge",
@@ -2576,14 +2744,14 @@ function ProfilePreviewCard({
2576
2744
  }
2577
2745
  )
2578
2746
  ] }),
2579
- /* @__PURE__ */ jsx27("p", { className: "arap-profile-desc", children: profile.description })
2747
+ /* @__PURE__ */ jsx28("p", { className: "arap-profile-desc", children: profile.description })
2580
2748
  ] }),
2581
- /* @__PURE__ */ jsxs25("div", { className: "arap-profile-affected", children: [
2582
- /* @__PURE__ */ jsx27("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
2583
- /* @__PURE__ */ jsx27("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
2749
+ /* @__PURE__ */ jsxs26("div", { className: "arap-profile-affected", children: [
2750
+ /* @__PURE__ */ jsx28("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
2751
+ /* @__PURE__ */ jsx28("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
2584
2752
  const val = profile.settings[key];
2585
- return /* @__PURE__ */ jsxs25("span", { className: "arap-profile-chip", children: [
2586
- /* @__PURE__ */ jsxs25("strong", { children: [
2753
+ return /* @__PURE__ */ jsxs26("span", { className: "arap-profile-chip", children: [
2754
+ /* @__PURE__ */ jsxs26("strong", { children: [
2587
2755
  formatKeyName(key),
2588
2756
  ":"
2589
2757
  ] }),
@@ -2592,7 +2760,7 @@ function ProfilePreviewCard({
2592
2760
  ] }, key);
2593
2761
  }) })
2594
2762
  ] }),
2595
- /* @__PURE__ */ jsx27("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ jsx27(
2763
+ /* @__PURE__ */ jsx28("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ jsx28(
2596
2764
  "button",
2597
2765
  {
2598
2766
  type: "button",
@@ -2601,7 +2769,7 @@ function ProfilePreviewCard({
2601
2769
  "aria-label": `Revert ${profile.label} profile`,
2602
2770
  children: "Revert to custom settings"
2603
2771
  }
2604
- ) : /* @__PURE__ */ jsx27(
2772
+ ) : /* @__PURE__ */ jsx28(
2605
2773
  "button",
2606
2774
  {
2607
2775
  type: "button",
@@ -2643,10 +2811,14 @@ export {
2643
2811
  SaturationController,
2644
2812
  SearchCount,
2645
2813
  StepperControl,
2814
+ TEXT_SCALE_PROTECTED_SELECTOR,
2815
+ TEXT_SCALE_STEPS,
2646
2816
  TextAlignController,
2817
+ TextScaleController,
2647
2818
  ToggleControl,
2648
2819
  createInitialPreferencesState,
2649
2820
  enLocale,
2821
+ isProtectedFromTextScale,
2650
2822
  isRtlLocale,
2651
2823
  normalizePreferenceValue,
2652
2824
  normalizePreferences,