accessibility-plugin-react 2.6.0 → 2.7.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
@@ -249,6 +249,14 @@ var FONT_FAMILY_PRESETS = [
249
249
  "legible",
250
250
  "dyslexia-option"
251
251
  ];
252
+ var CONTRAST_MODES = [
253
+ "off",
254
+ "original",
255
+ "light",
256
+ "dark",
257
+ "high",
258
+ "invert"
259
+ ];
252
260
  var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
253
261
  fontSize: { defaultValue: 100, validate: numberIn(50, 200) },
254
262
  fontScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
@@ -279,12 +287,23 @@ var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
279
287
  1,
280
288
  2,
281
289
  3,
290
+ "off",
291
+ "original",
292
+ "light",
293
+ "dark",
294
+ "high",
295
+ "invert",
282
296
  "reduced",
283
297
  "yellow-on-black",
284
298
  "white-on-black",
285
- "blue-on-yellow"
299
+ "blue-on-yellow",
300
+ "black-on-white"
286
301
  )
287
302
  },
303
+ contrastMode: {
304
+ defaultValue: "off",
305
+ validate: oneOf("off", "original", "light", "dark", "high", "invert")
306
+ },
288
307
  saturation: { defaultValue: 0, validate: oneOf(0, 1, 2) },
289
308
  textAlign: {
290
309
  defaultValue: "default",
@@ -342,22 +361,146 @@ import { useEffect } from "react";
342
361
  var EXCLUDED = "[data-arap-ui], [data-arap-ui] *, script, style, link, meta, noscript, template";
343
362
  var MAX_HOST_ELEMENTS = 4e3;
344
363
  var cursor = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M4 2v32l9-9 7 13 6-3-7-12h14z' fill='black' stroke='white' stroke-width='2'/%3E%3C/svg%3E") 4 2, auto`;
364
+ function isForcedColorsActive() {
365
+ if (typeof window === "undefined" || !window.matchMedia) return false;
366
+ try {
367
+ return window.matchMedia("(forced-colors: active)").matches;
368
+ } catch {
369
+ return false;
370
+ }
371
+ }
372
+ function subscribeForcedColors(callback) {
373
+ if (typeof window === "undefined" || !window.matchMedia) return () => {
374
+ };
375
+ try {
376
+ const mql = window.matchMedia("(forced-colors: active)");
377
+ mql.addEventListener("change", callback);
378
+ return () => mql.removeEventListener("change", callback);
379
+ } catch {
380
+ return () => {
381
+ };
382
+ }
383
+ }
384
+ var CONTRAST_PALETTES = {
385
+ light: {
386
+ text: "#0f172a",
387
+ background: "#ffffff",
388
+ border: "#94a3b8",
389
+ link: "#0284c7"
390
+ },
391
+ dark: {
392
+ text: "#f8fafc",
393
+ background: "#0f172a",
394
+ border: "#475569",
395
+ link: "#38bdf8"
396
+ },
397
+ high: {
398
+ text: "#ffffff",
399
+ background: "#000000",
400
+ border: "#ffffff",
401
+ link: "#93c5fd"
402
+ },
403
+ "yellow-on-black": {
404
+ text: "#ffff00",
405
+ background: "#000000",
406
+ border: "#ffff00",
407
+ link: "#00ffff"
408
+ },
409
+ "white-on-black": {
410
+ text: "#ffffff",
411
+ background: "#000000",
412
+ border: "#ffffff",
413
+ link: "#ffff00"
414
+ },
415
+ "blue-on-yellow": {
416
+ text: "#005a9c",
417
+ background: "#ffd740",
418
+ border: "#005a9c",
419
+ link: "#002b49"
420
+ },
421
+ "black-on-white": {
422
+ text: "#000000",
423
+ background: "#ffffff",
424
+ border: "#000000",
425
+ link: "#0000ee"
426
+ }
427
+ };
345
428
  var palette = {
346
429
  "yellow-on-black": ["#ffff00", "#000000"],
347
430
  "white-on-black": ["#ffffff", "#000000"],
348
431
  "blue-on-yellow": ["#005a9c", "#ffd740"],
349
- "black-on-white": ["#000000", "#ffffff"]
432
+ "black-on-white": ["#000000", "#ffffff"],
433
+ light: ["#0f172a", "#ffffff"],
434
+ dark: ["#f8fafc", "#0f172a"],
435
+ high: ["#ffffff", "#000000"]
350
436
  };
351
437
  function composeFilter(values) {
438
+ if (isForcedColorsActive()) return "";
352
439
  const contrast = values.contrast === "reduced" ? 0.5 : [1, 1.25, 1.5, 2][Number(values.contrast)] ?? 1;
440
+ const isInvert = Boolean(values.invertColors) || values.contrast === "invert" || values.contrastMode === "invert";
353
441
  return [
354
442
  contrast !== 1 && `contrast(${contrast})`,
355
443
  values.saturation === 1 && "saturate(0.2)",
356
444
  values.saturation === 2 && "saturate(2)",
357
- values.invertColors && "invert(1)",
445
+ isInvert && "invert(1)",
358
446
  values.grayscale && "grayscale(1)"
359
447
  ].filter(Boolean).join(" ");
360
448
  }
449
+ var CONTRAST_PROTECTED_SELECTOR = [
450
+ "img",
451
+ "picture",
452
+ "picture *",
453
+ "video",
454
+ "canvas",
455
+ "svg",
456
+ "svg *",
457
+ "[role='img']",
458
+ "[role='img'] *",
459
+ "[role='graphics-document']",
460
+ "[role='graphics-document'] *",
461
+ "[role='graphics-symbol']",
462
+ "[role='graphics-symbol'] *",
463
+ "[data-icon]",
464
+ "[data-icon] *",
465
+ 'i[class*="icon"]',
466
+ 'span[class*="icon"]',
467
+ 'i[class*="fa-"]',
468
+ 'span[class*="fa-"]',
469
+ 'i[class*="material-symbols"]',
470
+ 'span[class*="material-symbols"]',
471
+ 'i[class*="lucide"]',
472
+ 'span[class*="lucide"]',
473
+ '[aria-invalid="true"]',
474
+ '[aria-invalid="true"] *',
475
+ ":invalid",
476
+ ".is-invalid",
477
+ ".invalid-feedback",
478
+ ":disabled",
479
+ "[aria-disabled='true']",
480
+ "[disabled]",
481
+ "[data-arap-ignore]",
482
+ "[data-arap-ignore] *",
483
+ "[data-arap-exempt]",
484
+ "[data-arap-exempt] *",
485
+ "[data-arap-ui]",
486
+ "[data-arap-ui] *",
487
+ ".arap-root",
488
+ ".arap-root *"
489
+ ].join(", ");
490
+ function isProtectedFromContrast(element) {
491
+ try {
492
+ if (element.matches(EXCLUDED)) return true;
493
+ if (element.matches(CONTRAST_PROTECTED_SELECTOR)) return true;
494
+ if (element.closest(
495
+ "svg, [role='img'], [data-icon], [aria-invalid='true'], :disabled, [aria-disabled='true'], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
496
+ )) {
497
+ return true;
498
+ }
499
+ } catch {
500
+ return false;
501
+ }
502
+ return false;
503
+ }
361
504
  var TEXT_SCALE_PROTECTED_SELECTOR = [
362
505
  "input",
363
506
  "textarea",
@@ -827,6 +970,38 @@ function applyPage(values) {
827
970
  set(el, "font-family", targetStack);
828
971
  }
829
972
  }
973
+ const isInvert = Boolean(values.invertColors) || values.contrast === "invert" || values.contrastMode === "invert";
974
+ if (isInvert && !isForcedColorsActive()) {
975
+ const mediaElements = Array.from(
976
+ document.body.querySelectorAll(
977
+ "img, video, canvas, picture, [role='img']"
978
+ )
979
+ ).filter((el) => !el.closest("[data-arap-ui]"));
980
+ for (const mediaEl of mediaElements) {
981
+ set(mediaEl, "filter", "invert(1)");
982
+ }
983
+ }
984
+ const activeContrastKey = values.contrastMode && values.contrastMode !== "off" && values.contrastMode !== "original" ? String(values.contrastMode) : values.contrast !== void 0 && values.contrast !== 0 && values.contrast !== "0" && values.contrast !== "off" && values.contrast !== "original" ? String(values.contrast) : null;
985
+ const activePalette = activeContrastKey && !isForcedColorsActive() ? CONTRAST_PALETTES[activeContrastKey] : null;
986
+ if (activePalette) {
987
+ for (const el of elements) {
988
+ if (isProtectedFromContrast(el)) continue;
989
+ set(el, "color", activePalette.text);
990
+ if (el.matches("a[href]") && activePalette.link) {
991
+ set(el, "color", activePalette.link);
992
+ }
993
+ if (el.matches(
994
+ "main, section, article, div, p, h1, h2, h3, h4, h5, h6, ul, ol, li, table, thead, tbody, tr, th, td, button, input, select, textarea, form, blockquote, header, footer, aside, nav"
995
+ )) {
996
+ set(el, "background-color", activePalette.background);
997
+ }
998
+ if (activePalette.border && el.matches(
999
+ "button, input, select, textarea, [role='button'], fieldset, hr, table, th, td"
1000
+ )) {
1001
+ set(el, "border-color", activePalette.border);
1002
+ }
1003
+ }
1004
+ }
830
1005
  for (const el of elements) {
831
1006
  if (values.bigCursor) set(el, "cursor", cursor);
832
1007
  if (values.hideImages) {
@@ -838,7 +1013,7 @@ function applyPage(values) {
838
1013
  ))
839
1014
  set(el, "visibility", "hidden");
840
1015
  const colors = palette[String(values.contrast)];
841
- if (colors) {
1016
+ if (colors && !activePalette && !isForcedColorsActive()) {
842
1017
  set(el, "color", colors[0]);
843
1018
  set(el, "background-color", colors[1]);
844
1019
  }
@@ -2022,6 +2197,10 @@ var drawings = {
2022
2197
  /* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "9" }),
2023
2198
  /* @__PURE__ */ jsx6("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
2024
2199
  ] }),
2200
+ contrastMode: /* @__PURE__ */ jsxs5(Fragment, { children: [
2201
+ /* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "9" }),
2202
+ /* @__PURE__ */ jsx6("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
2203
+ ] }),
2025
2204
  saturation: /* @__PURE__ */ jsxs5(Fragment, { children: [
2026
2205
  /* @__PURE__ */ jsx6("path", { d: "M12 3c-2 4-7 8-7 12a7 7 0 0 0 14 0c0-4-5-8-7-12Z" }),
2027
2206
  /* @__PURE__ */ jsx6("path", { d: "M8 15a4 4 0 0 0 4 4" })
@@ -2599,11 +2778,16 @@ function ParagraphSpacingController({
2599
2778
  }
2600
2779
 
2601
2780
  // src/features/ContrastController.tsx
2781
+ import { useSyncExternalStore as useSyncExternalStore4 } from "react";
2602
2782
  import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
2603
2783
  var FEATURE_KEY7 = "contrast";
2604
2784
  var DEFAULT_VALUE7 = 0;
2605
2785
  var LEVELS = [
2606
2786
  { label: "Off", value: 0 },
2787
+ { label: "Light", value: "light" },
2788
+ { label: "Dark", value: "dark" },
2789
+ { label: "High Contrast", value: "high" },
2790
+ { label: "Invert", value: "invert" },
2607
2791
  { label: "Reduced", value: "reduced" },
2608
2792
  { label: "Low", value: 1 },
2609
2793
  { label: "High", value: 2 },
@@ -2617,32 +2801,89 @@ function ContrastController() {
2617
2801
  FEATURE_KEY7,
2618
2802
  DEFAULT_VALUE7
2619
2803
  );
2804
+ const forcedColors = useSyncExternalStore4(
2805
+ subscribeForcedColors,
2806
+ isForcedColorsActive,
2807
+ () => false
2808
+ );
2620
2809
  return /* @__PURE__ */ jsxs12("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
2621
2810
  /* @__PURE__ */ jsxs12("span", { className: "arap-label", children: [
2622
2811
  /* @__PURE__ */ jsx13(FeatureIcon, { name: FEATURE_KEY7 }),
2623
2812
  /* @__PURE__ */ jsx13("span", { children: "Contrast" })
2624
2813
  ] }),
2625
- /* @__PURE__ */ jsx13("div", { className: "arap-segmented", children: LEVELS.map((level) => /* @__PURE__ */ jsxs12(
2626
- "button",
2627
- {
2628
- className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
2629
- onClick: () => setValue(level.value),
2630
- "aria-pressed": value === level.value,
2631
- type: "button",
2632
- children: [
2633
- value === level.value && /* @__PURE__ */ jsx13("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2634
- level.label
2635
- ]
2636
- },
2637
- level.value
2638
- )) })
2814
+ /* @__PURE__ */ jsx13("div", { className: "arap-segmented", children: LEVELS.map((level) => {
2815
+ const isActive = value === level.value || level.value === 0 && (value === "off" || value === "original");
2816
+ return /* @__PURE__ */ jsxs12(
2817
+ "button",
2818
+ {
2819
+ className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
2820
+ onClick: () => setValue(level.value),
2821
+ "aria-pressed": isActive,
2822
+ type: "button",
2823
+ children: [
2824
+ isActive && /* @__PURE__ */ jsx13("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2825
+ level.label
2826
+ ]
2827
+ },
2828
+ String(level.value)
2829
+ );
2830
+ }) }),
2831
+ forcedColors && /* @__PURE__ */ jsx13("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system high contrast (forced colors) is active." })
2639
2832
  ] });
2640
2833
  }
2641
2834
 
2642
- // src/features/SaturationController.tsx
2835
+ // src/features/ContrastModeController.tsx
2836
+ import { useSyncExternalStore as useSyncExternalStore5 } from "react";
2643
2837
  import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
2644
- var FEATURE_KEY8 = "saturation";
2645
- var DEFAULT_VALUE8 = 0;
2838
+ var FEATURE_KEY8 = "contrastMode";
2839
+ var DEFAULT_VALUE8 = "off";
2840
+ var OPTIONS = [
2841
+ { label: "Original", value: "off" },
2842
+ { label: "Light", value: "light" },
2843
+ { label: "Dark", value: "dark" },
2844
+ { label: "High", value: "high" },
2845
+ { label: "Invert", value: "invert" }
2846
+ ];
2847
+ function ContrastModeController() {
2848
+ const { value, setValue } = useAccessibility(
2849
+ FEATURE_KEY8,
2850
+ DEFAULT_VALUE8
2851
+ );
2852
+ const forcedColors = useSyncExternalStore5(
2853
+ subscribeForcedColors,
2854
+ isForcedColorsActive,
2855
+ () => false
2856
+ );
2857
+ return /* @__PURE__ */ jsxs13("div", { className: "arap-feature", role: "group", "aria-label": "Contrast Mode", children: [
2858
+ /* @__PURE__ */ jsxs13("span", { className: "arap-label", children: [
2859
+ /* @__PURE__ */ jsx14(FeatureIcon, { name: FEATURE_KEY8 }),
2860
+ /* @__PURE__ */ jsx14("span", { children: "Contrast Mode" })
2861
+ ] }),
2862
+ /* @__PURE__ */ jsx14("div", { className: "arap-segmented", children: OPTIONS.map((option) => {
2863
+ const isActive = value === option.value || option.value === "off" && (value === "original" || !value);
2864
+ return /* @__PURE__ */ jsxs13(
2865
+ "button",
2866
+ {
2867
+ className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
2868
+ onClick: () => setValue(option.value),
2869
+ "aria-pressed": isActive,
2870
+ type: "button",
2871
+ children: [
2872
+ isActive && /* @__PURE__ */ jsx14("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2873
+ option.label
2874
+ ]
2875
+ },
2876
+ option.value
2877
+ );
2878
+ }) }),
2879
+ forcedColors && /* @__PURE__ */ jsx14("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system high contrast (forced colors) is active." })
2880
+ ] });
2881
+ }
2882
+
2883
+ // src/features/SaturationController.tsx
2884
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
2885
+ var FEATURE_KEY9 = "saturation";
2886
+ var DEFAULT_VALUE9 = 0;
2646
2887
  var LEVELS2 = [
2647
2888
  { label: "Off", value: 0 },
2648
2889
  { label: "Low", value: 1 },
@@ -2650,15 +2891,15 @@ var LEVELS2 = [
2650
2891
  ];
2651
2892
  function SaturationController() {
2652
2893
  const { value, setValue } = useAccessibility(
2653
- FEATURE_KEY8,
2654
- DEFAULT_VALUE8
2894
+ FEATURE_KEY9,
2895
+ DEFAULT_VALUE9
2655
2896
  );
2656
- return /* @__PURE__ */ jsxs13("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
2657
- /* @__PURE__ */ jsxs13("span", { className: "arap-label", children: [
2658
- /* @__PURE__ */ jsx14(FeatureIcon, { name: FEATURE_KEY8 }),
2659
- /* @__PURE__ */ jsx14("span", { children: "Saturation" })
2897
+ return /* @__PURE__ */ jsxs14("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
2898
+ /* @__PURE__ */ jsxs14("span", { className: "arap-label", children: [
2899
+ /* @__PURE__ */ jsx15(FeatureIcon, { name: FEATURE_KEY9 }),
2900
+ /* @__PURE__ */ jsx15("span", { children: "Saturation" })
2660
2901
  ] }),
2661
- /* @__PURE__ */ jsx14("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ jsxs13(
2902
+ /* @__PURE__ */ jsx15("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ jsxs14(
2662
2903
  "button",
2663
2904
  {
2664
2905
  className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
@@ -2666,7 +2907,7 @@ function SaturationController() {
2666
2907
  "aria-pressed": value === level.value,
2667
2908
  type: "button",
2668
2909
  children: [
2669
- value === level.value && /* @__PURE__ */ jsx14("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2910
+ value === level.value && /* @__PURE__ */ jsx15("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2670
2911
  level.label
2671
2912
  ]
2672
2913
  },
@@ -2676,20 +2917,20 @@ function SaturationController() {
2676
2917
  }
2677
2918
 
2678
2919
  // src/features/InvertColorsController.tsx
2679
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
2680
- var FEATURE_KEY9 = "invertColors";
2681
- var DEFAULT_VALUE9 = false;
2920
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2921
+ var FEATURE_KEY10 = "invertColors";
2922
+ var DEFAULT_VALUE10 = false;
2682
2923
  function InvertColorsController() {
2683
2924
  const { value, setValue } = useAccessibility(
2684
- FEATURE_KEY9,
2685
- DEFAULT_VALUE9
2925
+ FEATURE_KEY10,
2926
+ DEFAULT_VALUE10
2686
2927
  );
2687
- return /* @__PURE__ */ jsxs14("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
2688
- /* @__PURE__ */ jsxs14("span", { className: "arap-label", children: [
2689
- /* @__PURE__ */ jsx15(FeatureIcon, { name: FEATURE_KEY9 }),
2690
- /* @__PURE__ */ jsx15("span", { children: "Invert Colors" })
2928
+ return /* @__PURE__ */ jsxs15("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
2929
+ /* @__PURE__ */ jsxs15("span", { className: "arap-label", children: [
2930
+ /* @__PURE__ */ jsx16(FeatureIcon, { name: FEATURE_KEY10 }),
2931
+ /* @__PURE__ */ jsx16("span", { children: "Invert Colors" })
2691
2932
  ] }),
2692
- /* @__PURE__ */ jsx15(
2933
+ /* @__PURE__ */ jsx16(
2693
2934
  "button",
2694
2935
  {
2695
2936
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
@@ -2697,27 +2938,27 @@ function InvertColorsController() {
2697
2938
  "aria-label": "Invert Colors",
2698
2939
  "aria-pressed": value,
2699
2940
  type: "button",
2700
- children: /* @__PURE__ */ jsx15("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2941
+ children: /* @__PURE__ */ jsx16("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2701
2942
  }
2702
2943
  )
2703
2944
  ] });
2704
2945
  }
2705
2946
 
2706
2947
  // src/features/GrayscaleController.tsx
2707
- import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2708
- var FEATURE_KEY10 = "grayscale";
2709
- var DEFAULT_VALUE10 = false;
2948
+ import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
2949
+ var FEATURE_KEY11 = "grayscale";
2950
+ var DEFAULT_VALUE11 = false;
2710
2951
  function GrayscaleController() {
2711
2952
  const { value, setValue } = useAccessibility(
2712
- FEATURE_KEY10,
2713
- DEFAULT_VALUE10
2953
+ FEATURE_KEY11,
2954
+ DEFAULT_VALUE11
2714
2955
  );
2715
- return /* @__PURE__ */ jsxs15("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
2716
- /* @__PURE__ */ jsxs15("span", { className: "arap-label", children: [
2717
- /* @__PURE__ */ jsx16(FeatureIcon, { name: FEATURE_KEY10 }),
2718
- /* @__PURE__ */ jsx16("span", { children: "Grayscale" })
2956
+ return /* @__PURE__ */ jsxs16("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
2957
+ /* @__PURE__ */ jsxs16("span", { className: "arap-label", children: [
2958
+ /* @__PURE__ */ jsx17(FeatureIcon, { name: FEATURE_KEY11 }),
2959
+ /* @__PURE__ */ jsx17("span", { children: "Grayscale" })
2719
2960
  ] }),
2720
- /* @__PURE__ */ jsx16(
2961
+ /* @__PURE__ */ jsx17(
2721
2962
  "button",
2722
2963
  {
2723
2964
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
@@ -2725,27 +2966,27 @@ function GrayscaleController() {
2725
2966
  "aria-label": "Grayscale",
2726
2967
  "aria-pressed": value,
2727
2968
  type: "button",
2728
- children: /* @__PURE__ */ jsx16("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2969
+ children: /* @__PURE__ */ jsx17("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2729
2970
  }
2730
2971
  )
2731
2972
  ] });
2732
2973
  }
2733
2974
 
2734
2975
  // src/features/LinkHighlightController.tsx
2735
- import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
2736
- var FEATURE_KEY11 = "linkHighlight";
2737
- var DEFAULT_VALUE11 = false;
2976
+ import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2977
+ var FEATURE_KEY12 = "linkHighlight";
2978
+ var DEFAULT_VALUE12 = false;
2738
2979
  function LinkHighlightController() {
2739
2980
  const { value, setValue } = useAccessibility(
2740
- FEATURE_KEY11,
2741
- DEFAULT_VALUE11
2981
+ FEATURE_KEY12,
2982
+ DEFAULT_VALUE12
2742
2983
  );
2743
- return /* @__PURE__ */ jsxs16("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
2744
- /* @__PURE__ */ jsxs16("span", { className: "arap-label", children: [
2745
- /* @__PURE__ */ jsx17(FeatureIcon, { name: FEATURE_KEY11 }),
2746
- /* @__PURE__ */ jsx17("span", { children: "Link Highlight" })
2984
+ return /* @__PURE__ */ jsxs17("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
2985
+ /* @__PURE__ */ jsxs17("span", { className: "arap-label", children: [
2986
+ /* @__PURE__ */ jsx18(FeatureIcon, { name: FEATURE_KEY12 }),
2987
+ /* @__PURE__ */ jsx18("span", { children: "Link Highlight" })
2747
2988
  ] }),
2748
- /* @__PURE__ */ jsx17(
2989
+ /* @__PURE__ */ jsx18(
2749
2990
  "button",
2750
2991
  {
2751
2992
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
@@ -2753,10 +2994,10 @@ function LinkHighlightController() {
2753
2994
  "aria-label": "Link Highlight",
2754
2995
  "aria-pressed": !!value,
2755
2996
  type: "button",
2756
- children: /* @__PURE__ */ jsx17("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2997
+ children: /* @__PURE__ */ jsx18("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2757
2998
  }
2758
2999
  ),
2759
- /* @__PURE__ */ jsx17("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ jsxs16(
3000
+ /* @__PURE__ */ jsx18("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ jsxs17(
2760
3001
  "button",
2761
3002
  {
2762
3003
  type: "button",
@@ -2764,7 +3005,7 @@ function LinkHighlightController() {
2764
3005
  "aria-pressed": value === mode,
2765
3006
  onClick: () => setValue(mode),
2766
3007
  children: [
2767
- value === mode && /* @__PURE__ */ jsx17("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
3008
+ value === mode && /* @__PURE__ */ jsx18("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2768
3009
  mode.split("-").join(" ")
2769
3010
  ]
2770
3011
  },
@@ -2774,21 +3015,21 @@ function LinkHighlightController() {
2774
3015
  }
2775
3016
 
2776
3017
  // src/features/TextAlignController.tsx
2777
- import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2778
- var FEATURE_KEY12 = "textAlign";
2779
- var DEFAULT_VALUE12 = "default";
2780
- var OPTIONS = ["default", "left", "center", "right", "justify"];
3018
+ import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
3019
+ var FEATURE_KEY13 = "textAlign";
3020
+ var DEFAULT_VALUE13 = "default";
3021
+ var OPTIONS2 = ["default", "left", "center", "right", "justify"];
2781
3022
  function TextAlignController() {
2782
3023
  const { value, setValue } = useAccessibility(
2783
- FEATURE_KEY12,
2784
- DEFAULT_VALUE12
3024
+ FEATURE_KEY13,
3025
+ DEFAULT_VALUE13
2785
3026
  );
2786
- return /* @__PURE__ */ jsxs17("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
2787
- /* @__PURE__ */ jsxs17("span", { className: "arap-label", children: [
2788
- /* @__PURE__ */ jsx18(FeatureIcon, { name: FEATURE_KEY12 }),
2789
- /* @__PURE__ */ jsx18("span", { children: "Text Alignment" })
3027
+ return /* @__PURE__ */ jsxs18("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
3028
+ /* @__PURE__ */ jsxs18("span", { className: "arap-label", children: [
3029
+ /* @__PURE__ */ jsx19(FeatureIcon, { name: FEATURE_KEY13 }),
3030
+ /* @__PURE__ */ jsx19("span", { children: "Text Alignment" })
2790
3031
  ] }),
2791
- /* @__PURE__ */ jsx18("div", { className: "arap-segmented", children: OPTIONS.map((option) => /* @__PURE__ */ jsxs17(
3032
+ /* @__PURE__ */ jsx19("div", { className: "arap-segmented", children: OPTIONS2.map((option) => /* @__PURE__ */ jsxs18(
2792
3033
  "button",
2793
3034
  {
2794
3035
  className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
@@ -2797,13 +3038,13 @@ function TextAlignController() {
2797
3038
  type: "button",
2798
3039
  style: { textTransform: "capitalize" },
2799
3040
  children: [
2800
- value === option && /* @__PURE__ */ jsx18("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
3041
+ value === option && /* @__PURE__ */ jsx19("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2801
3042
  option
2802
3043
  ]
2803
3044
  },
2804
3045
  option
2805
3046
  )) }),
2806
- value === "justify" && /* @__PURE__ */ jsx18(
3047
+ value === "justify" && /* @__PURE__ */ jsx19(
2807
3048
  "div",
2808
3049
  {
2809
3050
  className: "arap-notice arap-notice-warning",
@@ -2816,27 +3057,27 @@ function TextAlignController() {
2816
3057
  }
2817
3058
 
2818
3059
  // src/features/FontFamilyController.tsx
2819
- import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
2820
- var FEATURE_KEY13 = "fontFamily";
2821
- var DEFAULT_VALUE13 = "default";
2822
- var OPTIONS2 = [
3060
+ import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
3061
+ var FEATURE_KEY14 = "fontFamily";
3062
+ var DEFAULT_VALUE14 = "default";
3063
+ var OPTIONS3 = [
2823
3064
  { label: "Default", value: "default" },
2824
3065
  { label: "Legible", value: "legible" },
2825
3066
  { label: "Dyslexia", value: "dyslexia-option" }
2826
3067
  ];
2827
3068
  function FontFamilyController() {
2828
3069
  const { value, setValue } = useAccessibility(
2829
- FEATURE_KEY13,
2830
- DEFAULT_VALUE13
3070
+ FEATURE_KEY14,
3071
+ DEFAULT_VALUE14
2831
3072
  );
2832
- return /* @__PURE__ */ jsxs18("div", { className: "arap-feature", role: "group", "aria-label": "Font Family", children: [
2833
- /* @__PURE__ */ jsxs18("span", { className: "arap-label", children: [
2834
- /* @__PURE__ */ jsx19(FeatureIcon, { name: FEATURE_KEY13 }),
2835
- /* @__PURE__ */ jsx19("span", { children: "Font Family" })
3073
+ return /* @__PURE__ */ jsxs19("div", { className: "arap-feature", role: "group", "aria-label": "Font Family", children: [
3074
+ /* @__PURE__ */ jsxs19("span", { className: "arap-label", children: [
3075
+ /* @__PURE__ */ jsx20(FeatureIcon, { name: FEATURE_KEY14 }),
3076
+ /* @__PURE__ */ jsx20("span", { children: "Font Family" })
2836
3077
  ] }),
2837
- /* @__PURE__ */ jsx19("div", { className: "arap-segmented", children: OPTIONS2.map((option) => {
3078
+ /* @__PURE__ */ jsx20("div", { className: "arap-segmented", children: OPTIONS3.map((option) => {
2838
3079
  const isActive = value === option.value || option.value === "default" && (value === "original" || !value || value === "default");
2839
- return /* @__PURE__ */ jsxs18(
3080
+ return /* @__PURE__ */ jsxs19(
2840
3081
  "button",
2841
3082
  {
2842
3083
  className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
@@ -2844,7 +3085,7 @@ function FontFamilyController() {
2844
3085
  "aria-pressed": isActive,
2845
3086
  type: "button",
2846
3087
  children: [
2847
- isActive && /* @__PURE__ */ jsx19("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
3088
+ isActive && /* @__PURE__ */ jsx20("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
2848
3089
  option.label
2849
3090
  ]
2850
3091
  },
@@ -2855,53 +3096,25 @@ function FontFamilyController() {
2855
3096
  }
2856
3097
 
2857
3098
  // src/features/HideImagesController.tsx
2858
- import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
2859
- var FEATURE_KEY14 = "hideImages";
2860
- var DEFAULT_VALUE14 = false;
2861
- function HideImagesController() {
2862
- const { value, setValue } = useAccessibility(
2863
- FEATURE_KEY14,
2864
- DEFAULT_VALUE14
2865
- );
2866
- return /* @__PURE__ */ jsxs19("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
2867
- /* @__PURE__ */ jsxs19("span", { className: "arap-label", children: [
2868
- /* @__PURE__ */ jsx20(FeatureIcon, { name: FEATURE_KEY14 }),
2869
- /* @__PURE__ */ jsx20("span", { children: "Hide Images" })
2870
- ] }),
2871
- /* @__PURE__ */ jsx20(
2872
- "button",
2873
- {
2874
- className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
2875
- onClick: () => setValue(!value),
2876
- "aria-label": "Hide Images",
2877
- "aria-pressed": value,
2878
- type: "button",
2879
- children: /* @__PURE__ */ jsx20("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
2880
- }
2881
- )
2882
- ] });
2883
- }
2884
-
2885
- // src/features/HideVideosController.tsx
2886
3099
  import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
2887
- var FEATURE_KEY15 = "hideVideos";
3100
+ var FEATURE_KEY15 = "hideImages";
2888
3101
  var DEFAULT_VALUE15 = false;
2889
- function HideVideosController() {
3102
+ function HideImagesController() {
2890
3103
  const { value, setValue } = useAccessibility(
2891
3104
  FEATURE_KEY15,
2892
3105
  DEFAULT_VALUE15
2893
3106
  );
2894
- return /* @__PURE__ */ jsxs20("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
3107
+ return /* @__PURE__ */ jsxs20("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
2895
3108
  /* @__PURE__ */ jsxs20("span", { className: "arap-label", children: [
2896
3109
  /* @__PURE__ */ jsx21(FeatureIcon, { name: FEATURE_KEY15 }),
2897
- /* @__PURE__ */ jsx21("span", { children: "Hide Videos" })
3110
+ /* @__PURE__ */ jsx21("span", { children: "Hide Images" })
2898
3111
  ] }),
2899
3112
  /* @__PURE__ */ jsx21(
2900
3113
  "button",
2901
3114
  {
2902
3115
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
2903
3116
  onClick: () => setValue(!value),
2904
- "aria-label": "Hide Videos",
3117
+ "aria-label": "Hide Images",
2905
3118
  "aria-pressed": value,
2906
3119
  type: "button",
2907
3120
  children: /* @__PURE__ */ jsx21("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
@@ -2910,26 +3123,26 @@ function HideVideosController() {
2910
3123
  ] });
2911
3124
  }
2912
3125
 
2913
- // src/features/BigCursorController.tsx
3126
+ // src/features/HideVideosController.tsx
2914
3127
  import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
2915
- var FEATURE_KEY16 = "bigCursor";
3128
+ var FEATURE_KEY16 = "hideVideos";
2916
3129
  var DEFAULT_VALUE16 = false;
2917
- function BigCursorController() {
3130
+ function HideVideosController() {
2918
3131
  const { value, setValue } = useAccessibility(
2919
3132
  FEATURE_KEY16,
2920
3133
  DEFAULT_VALUE16
2921
3134
  );
2922
- return /* @__PURE__ */ jsxs21("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
3135
+ return /* @__PURE__ */ jsxs21("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
2923
3136
  /* @__PURE__ */ jsxs21("span", { className: "arap-label", children: [
2924
3137
  /* @__PURE__ */ jsx22(FeatureIcon, { name: FEATURE_KEY16 }),
2925
- /* @__PURE__ */ jsx22("span", { children: "Big Cursor" })
3138
+ /* @__PURE__ */ jsx22("span", { children: "Hide Videos" })
2926
3139
  ] }),
2927
3140
  /* @__PURE__ */ jsx22(
2928
3141
  "button",
2929
3142
  {
2930
3143
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
2931
3144
  onClick: () => setValue(!value),
2932
- "aria-label": "Big Cursor",
3145
+ "aria-label": "Hide Videos",
2933
3146
  "aria-pressed": value,
2934
3147
  type: "button",
2935
3148
  children: /* @__PURE__ */ jsx22("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
@@ -2938,26 +3151,26 @@ function BigCursorController() {
2938
3151
  ] });
2939
3152
  }
2940
3153
 
2941
- // src/features/ReadingMaskController.tsx
3154
+ // src/features/BigCursorController.tsx
2942
3155
  import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
2943
- var FEATURE_KEY17 = "readingMask";
3156
+ var FEATURE_KEY17 = "bigCursor";
2944
3157
  var DEFAULT_VALUE17 = false;
2945
- function ReadingMaskController() {
3158
+ function BigCursorController() {
2946
3159
  const { value, setValue } = useAccessibility(
2947
3160
  FEATURE_KEY17,
2948
3161
  DEFAULT_VALUE17
2949
3162
  );
2950
- return /* @__PURE__ */ jsxs22("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
3163
+ return /* @__PURE__ */ jsxs22("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
2951
3164
  /* @__PURE__ */ jsxs22("span", { className: "arap-label", children: [
2952
3165
  /* @__PURE__ */ jsx23(FeatureIcon, { name: FEATURE_KEY17 }),
2953
- /* @__PURE__ */ jsx23("span", { children: "Reading Mask" })
3166
+ /* @__PURE__ */ jsx23("span", { children: "Big Cursor" })
2954
3167
  ] }),
2955
3168
  /* @__PURE__ */ jsx23(
2956
3169
  "button",
2957
3170
  {
2958
3171
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
2959
3172
  onClick: () => setValue(!value),
2960
- "aria-label": "Reading Mask",
3173
+ "aria-label": "Big Cursor",
2961
3174
  "aria-pressed": value,
2962
3175
  type: "button",
2963
3176
  children: /* @__PURE__ */ jsx23("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
@@ -2966,26 +3179,26 @@ function ReadingMaskController() {
2966
3179
  ] });
2967
3180
  }
2968
3181
 
2969
- // src/features/ReadingGuideController.tsx
3182
+ // src/features/ReadingMaskController.tsx
2970
3183
  import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
2971
- var FEATURE_KEY18 = "readingGuide";
3184
+ var FEATURE_KEY18 = "readingMask";
2972
3185
  var DEFAULT_VALUE18 = false;
2973
- function ReadingGuideController() {
3186
+ function ReadingMaskController() {
2974
3187
  const { value, setValue } = useAccessibility(
2975
3188
  FEATURE_KEY18,
2976
3189
  DEFAULT_VALUE18
2977
3190
  );
2978
- return /* @__PURE__ */ jsxs23("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
3191
+ return /* @__PURE__ */ jsxs23("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
2979
3192
  /* @__PURE__ */ jsxs23("span", { className: "arap-label", children: [
2980
3193
  /* @__PURE__ */ jsx24(FeatureIcon, { name: FEATURE_KEY18 }),
2981
- /* @__PURE__ */ jsx24("span", { children: "Reading Guide" })
3194
+ /* @__PURE__ */ jsx24("span", { children: "Reading Mask" })
2982
3195
  ] }),
2983
3196
  /* @__PURE__ */ jsx24(
2984
3197
  "button",
2985
3198
  {
2986
3199
  className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
2987
3200
  onClick: () => setValue(!value),
2988
- "aria-label": "Reading Guide",
3201
+ "aria-label": "Reading Mask",
2989
3202
  "aria-pressed": value,
2990
3203
  type: "button",
2991
3204
  children: /* @__PURE__ */ jsx24("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
@@ -2994,10 +3207,38 @@ function ReadingGuideController() {
2994
3207
  ] });
2995
3208
  }
2996
3209
 
3210
+ // src/features/ReadingGuideController.tsx
3211
+ import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
3212
+ var FEATURE_KEY19 = "readingGuide";
3213
+ var DEFAULT_VALUE19 = false;
3214
+ function ReadingGuideController() {
3215
+ const { value, setValue } = useAccessibility(
3216
+ FEATURE_KEY19,
3217
+ DEFAULT_VALUE19
3218
+ );
3219
+ return /* @__PURE__ */ jsxs24("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
3220
+ /* @__PURE__ */ jsxs24("span", { className: "arap-label", children: [
3221
+ /* @__PURE__ */ jsx25(FeatureIcon, { name: FEATURE_KEY19 }),
3222
+ /* @__PURE__ */ jsx25("span", { children: "Reading Guide" })
3223
+ ] }),
3224
+ /* @__PURE__ */ jsx25(
3225
+ "button",
3226
+ {
3227
+ className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
3228
+ onClick: () => setValue(!value),
3229
+ "aria-label": "Reading Guide",
3230
+ "aria-pressed": value,
3231
+ type: "button",
3232
+ children: /* @__PURE__ */ jsx25("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
3233
+ }
3234
+ )
3235
+ ] });
3236
+ }
3237
+
2997
3238
  // src/features/ResetController.tsx
2998
3239
  import { createPortal as createPortal2 } from "react-dom";
2999
3240
  import { useContext as useContext5 } from "react";
3000
- import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
3241
+ import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
3001
3242
  function ResetController() {
3002
3243
  const ctx = useContext5(AccessibilityContext);
3003
3244
  if (!ctx) {
@@ -3008,15 +3249,15 @@ function ResetController() {
3008
3249
  const actionHost = useContext5(PanelActionsContext);
3009
3250
  const { resetAll } = ctx;
3010
3251
  const strings = resolveLocaleStrings(ctx.locale);
3011
- const button = /* @__PURE__ */ jsx25("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ jsxs24("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
3012
- /* @__PURE__ */ jsx25(FeatureIcon, { name: "reset" }),
3252
+ const button = /* @__PURE__ */ jsx26("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ jsxs25("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
3253
+ /* @__PURE__ */ jsx26(FeatureIcon, { name: "reset" }),
3013
3254
  strings.resetAll
3014
3255
  ] }) });
3015
3256
  return actionHost ? createPortal2(button, actionHost) : button;
3016
3257
  }
3017
3258
 
3018
3259
  // src/core/controls/ToggleControl.tsx
3019
- import { jsx as jsx26 } from "react/jsx-runtime";
3260
+ import { jsx as jsx27 } from "react/jsx-runtime";
3020
3261
  function ToggleControl({
3021
3262
  id,
3022
3263
  label,
@@ -3038,12 +3279,12 @@ function ToggleControl({
3038
3279
  onChange(!checked);
3039
3280
  }
3040
3281
  };
3041
- return /* @__PURE__ */ jsx26(
3282
+ return /* @__PURE__ */ jsx27(
3042
3283
  "div",
3043
3284
  {
3044
3285
  className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
3045
3286
  style,
3046
- children: /* @__PURE__ */ jsx26(
3287
+ children: /* @__PURE__ */ jsx27(
3047
3288
  "button",
3048
3289
  {
3049
3290
  id,
@@ -3057,7 +3298,7 @@ function ToggleControl({
3057
3298
  disabled: !isInteractive,
3058
3299
  onClick: handleClick,
3059
3300
  title: unavailableReason || description || toggleLabel,
3060
- children: /* @__PURE__ */ jsx26(
3301
+ children: /* @__PURE__ */ jsx27(
3061
3302
  "span",
3062
3303
  {
3063
3304
  className: "arap-toggle-knob",
@@ -3074,7 +3315,7 @@ function ToggleControl({
3074
3315
 
3075
3316
  // src/core/controls/ChoiceControl.tsx
3076
3317
  import { useCallback as useCallback4, useMemo as useMemo2, useRef as useRef5 } from "react";
3077
- import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
3318
+ import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
3078
3319
  function ChoiceControl({
3079
3320
  id,
3080
3321
  label,
@@ -3130,7 +3371,7 @@ function ChoiceControl({
3130
3371
  const renderOptionButton = (opt) => {
3131
3372
  const isSelected = value === opt.value;
3132
3373
  const isOptionDisabled = disabled || Boolean(opt.disabled);
3133
- return /* @__PURE__ */ jsxs25(
3374
+ return /* @__PURE__ */ jsxs26(
3134
3375
  "button",
3135
3376
  {
3136
3377
  type: "button",
@@ -3144,15 +3385,15 @@ function ChoiceControl({
3144
3385
  onClick: () => !isOptionDisabled && onChange(opt.value),
3145
3386
  title: opt.description,
3146
3387
  children: [
3147
- isSelected && /* @__PURE__ */ jsx27("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
3148
- /* @__PURE__ */ jsx27("span", { children: opt.label }),
3149
- opt.badge && /* @__PURE__ */ jsx27("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
3388
+ isSelected && /* @__PURE__ */ jsx28("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
3389
+ /* @__PURE__ */ jsx28("span", { children: opt.label }),
3390
+ opt.badge && /* @__PURE__ */ jsx28("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
3150
3391
  ]
3151
3392
  },
3152
3393
  String(opt.value)
3153
3394
  );
3154
3395
  };
3155
- return /* @__PURE__ */ jsx27(
3396
+ return /* @__PURE__ */ jsx28(
3156
3397
  "div",
3157
3398
  {
3158
3399
  ref: containerRef,
@@ -3163,15 +3404,15 @@ function ChoiceControl({
3163
3404
  className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
3164
3405
  style,
3165
3406
  onKeyDown: handleKeyDown,
3166
- children: groups ? groups.map((group) => /* @__PURE__ */ jsxs25(
3407
+ children: groups ? groups.map((group) => /* @__PURE__ */ jsxs26(
3167
3408
  "div",
3168
3409
  {
3169
3410
  className: "arap-choice-group",
3170
3411
  role: "group",
3171
3412
  "aria-label": group.label,
3172
3413
  children: [
3173
- /* @__PURE__ */ jsx27("span", { className: "arap-choice-group-title", children: group.label }),
3174
- /* @__PURE__ */ jsx27("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
3414
+ /* @__PURE__ */ jsx28("span", { className: "arap-choice-group-title", children: group.label }),
3415
+ /* @__PURE__ */ jsx28("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
3175
3416
  ]
3176
3417
  },
3177
3418
  group.label
@@ -3181,7 +3422,7 @@ function ChoiceControl({
3181
3422
  }
3182
3423
 
3183
3424
  // src/core/controls/StepperControl.tsx
3184
- import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
3425
+ import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
3185
3426
  function StepperControl({
3186
3427
  id,
3187
3428
  label,
@@ -3211,15 +3452,15 @@ function StepperControl({
3211
3452
  onChange(Math.min(max, Number((value + step).toFixed(2))));
3212
3453
  }
3213
3454
  };
3214
- return /* @__PURE__ */ jsxs26(
3455
+ return /* @__PURE__ */ jsxs27(
3215
3456
  "div",
3216
3457
  {
3217
3458
  id,
3218
3459
  className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
3219
3460
  style,
3220
3461
  children: [
3221
- /* @__PURE__ */ jsxs26("div", { className: "arap-controls", children: [
3222
- /* @__PURE__ */ jsx28(
3462
+ /* @__PURE__ */ jsxs27("div", { className: "arap-controls", children: [
3463
+ /* @__PURE__ */ jsx29(
3223
3464
  "button",
3224
3465
  {
3225
3466
  type: "button",
@@ -3230,8 +3471,8 @@ function StepperControl({
3230
3471
  children: "\u2212"
3231
3472
  }
3232
3473
  ),
3233
- /* @__PURE__ */ jsx28("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
3234
- /* @__PURE__ */ jsx28(
3474
+ /* @__PURE__ */ jsx29("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
3475
+ /* @__PURE__ */ jsx29(
3235
3476
  "button",
3236
3477
  {
3237
3478
  type: "button",
@@ -3243,7 +3484,7 @@ function StepperControl({
3243
3484
  }
3244
3485
  )
3245
3486
  ] }),
3246
- showSlider && /* @__PURE__ */ jsx28("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx28(
3487
+ showSlider && /* @__PURE__ */ jsx29("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx29(
3247
3488
  "input",
3248
3489
  {
3249
3490
  type: "range",
@@ -3267,7 +3508,7 @@ function StepperControl({
3267
3508
  }
3268
3509
 
3269
3510
  // src/core/controls/FeatureCard.tsx
3270
- import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
3511
+ import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
3271
3512
  function FeatureCard({
3272
3513
  id,
3273
3514
  featureKey,
@@ -3286,7 +3527,7 @@ function FeatureCard({
3286
3527
  largeControls = false
3287
3528
  }) {
3288
3529
  const cardTitle = typeof title === "string" ? title : void 0;
3289
- return /* @__PURE__ */ jsxs27(
3530
+ return /* @__PURE__ */ jsxs28(
3290
3531
  "div",
3291
3532
  {
3292
3533
  id,
@@ -3295,27 +3536,27 @@ function FeatureCard({
3295
3536
  className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
3296
3537
  style,
3297
3538
  children: [
3298
- /* @__PURE__ */ jsxs27("div", { className: "arap-card-header", children: [
3299
- /* @__PURE__ */ jsxs27("span", { className: "arap-label", children: [
3300
- icon ?? (featureKey ? /* @__PURE__ */ jsx29(FeatureIcon, { name: featureKey }) : null),
3301
- /* @__PURE__ */ jsx29("span", { className: "arap-card-title", children: title })
3539
+ /* @__PURE__ */ jsxs28("div", { className: "arap-card-header", children: [
3540
+ /* @__PURE__ */ jsxs28("span", { className: "arap-label", children: [
3541
+ icon ?? (featureKey ? /* @__PURE__ */ jsx30(FeatureIcon, { name: featureKey }) : null),
3542
+ /* @__PURE__ */ jsx30("span", { className: "arap-card-title", children: title })
3302
3543
  ] }),
3303
- statusBadge && /* @__PURE__ */ jsx29("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
3544
+ statusBadge && /* @__PURE__ */ jsx30("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
3304
3545
  ] }),
3305
- description && /* @__PURE__ */ jsx29("p", { className: "arap-card-desc", children: description }),
3306
- status === "error" && errorMessage && /* @__PURE__ */ jsxs27("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
3307
- /* @__PURE__ */ jsx29("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
3308
- /* @__PURE__ */ jsx29("span", { children: errorMessage })
3546
+ description && /* @__PURE__ */ jsx30("p", { className: "arap-card-desc", children: description }),
3547
+ status === "error" && errorMessage && /* @__PURE__ */ jsxs28("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
3548
+ /* @__PURE__ */ jsx30("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
3549
+ /* @__PURE__ */ jsx30("span", { children: errorMessage })
3309
3550
  ] }),
3310
- status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs27("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
3311
- /* @__PURE__ */ jsx29("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
3312
- /* @__PURE__ */ jsx29("span", { children: unavailableMessage })
3551
+ status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs28("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
3552
+ /* @__PURE__ */ jsx30("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
3553
+ /* @__PURE__ */ jsx30("span", { children: unavailableMessage })
3313
3554
  ] }),
3314
- status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs27("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
3315
- /* @__PURE__ */ jsx29("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
3316
- /* @__PURE__ */ jsxs27("div", { className: "arap-permission-content", children: [
3317
- /* @__PURE__ */ jsx29("span", { children: permissionMessage }),
3318
- onRequestPermission && /* @__PURE__ */ jsx29(
3555
+ status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs28("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
3556
+ /* @__PURE__ */ jsx30("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
3557
+ /* @__PURE__ */ jsxs28("div", { className: "arap-permission-content", children: [
3558
+ /* @__PURE__ */ jsx30("span", { children: permissionMessage }),
3559
+ onRequestPermission && /* @__PURE__ */ jsx30(
3319
3560
  "button",
3320
3561
  {
3321
3562
  type: "button",
@@ -3326,14 +3567,14 @@ function FeatureCard({
3326
3567
  )
3327
3568
  ] })
3328
3569
  ] }),
3329
- /* @__PURE__ */ jsx29("div", { className: "arap-card-content", children })
3570
+ /* @__PURE__ */ jsx30("div", { className: "arap-card-content", children })
3330
3571
  ]
3331
3572
  }
3332
3573
  );
3333
3574
  }
3334
3575
 
3335
3576
  // src/core/controls/FeatureStatusState.tsx
3336
- import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
3577
+ import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
3337
3578
  function SearchCount({
3338
3579
  totalCount,
3339
3580
  matchedCount,
@@ -3342,7 +3583,7 @@ function SearchCount({
3342
3583
  style
3343
3584
  }) {
3344
3585
  const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
3345
- return /* @__PURE__ */ jsx30(
3586
+ return /* @__PURE__ */ jsx31(
3346
3587
  "div",
3347
3588
  {
3348
3589
  role: "status",
@@ -3362,17 +3603,17 @@ function EmptyState({
3362
3603
  className = "",
3363
3604
  style
3364
3605
  }) {
3365
- return /* @__PURE__ */ jsxs28(
3606
+ return /* @__PURE__ */ jsxs29(
3366
3607
  "div",
3367
3608
  {
3368
3609
  role: "status",
3369
3610
  className: `arap-empty-state ${className}`,
3370
3611
  style,
3371
3612
  children: [
3372
- /* @__PURE__ */ jsx30("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
3373
- /* @__PURE__ */ jsx30("h3", { className: "arap-empty-title", children: title }),
3374
- /* @__PURE__ */ jsx30("p", { className: "arap-empty-desc", children: description }),
3375
- onAction && /* @__PURE__ */ jsx30("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
3613
+ /* @__PURE__ */ jsx31("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
3614
+ /* @__PURE__ */ jsx31("h3", { className: "arap-empty-title", children: title }),
3615
+ /* @__PURE__ */ jsx31("p", { className: "arap-empty-desc", children: description }),
3616
+ onAction && /* @__PURE__ */ jsx31("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
3376
3617
  ]
3377
3618
  }
3378
3619
  );
@@ -3385,18 +3626,18 @@ function ErrorState({
3385
3626
  className = "",
3386
3627
  style
3387
3628
  }) {
3388
- return /* @__PURE__ */ jsxs28(
3629
+ return /* @__PURE__ */ jsxs29(
3389
3630
  "div",
3390
3631
  {
3391
3632
  role: "alert",
3392
3633
  className: `arap-error-state arap-card-alert arap-card-error ${className}`,
3393
3634
  style,
3394
3635
  children: [
3395
- /* @__PURE__ */ jsx30("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
3396
- /* @__PURE__ */ jsxs28("div", { className: "arap-error-content", children: [
3397
- title && /* @__PURE__ */ jsx30("h4", { className: "arap-error-title", children: title }),
3398
- /* @__PURE__ */ jsx30("p", { className: "arap-error-message", children: message }),
3399
- onRetry && /* @__PURE__ */ jsx30("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
3636
+ /* @__PURE__ */ jsx31("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
3637
+ /* @__PURE__ */ jsxs29("div", { className: "arap-error-content", children: [
3638
+ title && /* @__PURE__ */ jsx31("h4", { className: "arap-error-title", children: title }),
3639
+ /* @__PURE__ */ jsx31("p", { className: "arap-error-message", children: message }),
3640
+ onRetry && /* @__PURE__ */ jsx31("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
3400
3641
  ] })
3401
3642
  ]
3402
3643
  }
@@ -3404,7 +3645,7 @@ function ErrorState({
3404
3645
  }
3405
3646
 
3406
3647
  // src/core/controls/ProfilePreviewCard.tsx
3407
- import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
3648
+ import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
3408
3649
  function ProfilePreviewCard({
3409
3650
  profile,
3410
3651
  isActive,
@@ -3454,7 +3695,7 @@ function ProfilePreviewCard({
3454
3695
  if (val === null || val === void 0) return "Original";
3455
3696
  return String(val);
3456
3697
  };
3457
- return /* @__PURE__ */ jsxs29(
3698
+ return /* @__PURE__ */ jsxs30(
3458
3699
  "div",
3459
3700
  {
3460
3701
  role: "group",
@@ -3462,10 +3703,10 @@ function ProfilePreviewCard({
3462
3703
  className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
3463
3704
  style,
3464
3705
  children: [
3465
- /* @__PURE__ */ jsxs29("div", { className: "arap-profile-header", children: [
3466
- /* @__PURE__ */ jsxs29("div", { className: "arap-profile-title-row", children: [
3467
- /* @__PURE__ */ jsx31("h4", { className: "arap-profile-title", children: profile.label }),
3468
- isActive && /* @__PURE__ */ jsx31(
3706
+ /* @__PURE__ */ jsxs30("div", { className: "arap-profile-header", children: [
3707
+ /* @__PURE__ */ jsxs30("div", { className: "arap-profile-title-row", children: [
3708
+ /* @__PURE__ */ jsx32("h4", { className: "arap-profile-title", children: profile.label }),
3709
+ isActive && /* @__PURE__ */ jsx32(
3469
3710
  "span",
3470
3711
  {
3471
3712
  className: "arap-profile-active-badge",
@@ -3474,14 +3715,14 @@ function ProfilePreviewCard({
3474
3715
  }
3475
3716
  )
3476
3717
  ] }),
3477
- /* @__PURE__ */ jsx31("p", { className: "arap-profile-desc", children: profile.description })
3718
+ /* @__PURE__ */ jsx32("p", { className: "arap-profile-desc", children: profile.description })
3478
3719
  ] }),
3479
- /* @__PURE__ */ jsxs29("div", { className: "arap-profile-affected", children: [
3480
- /* @__PURE__ */ jsx31("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
3481
- /* @__PURE__ */ jsx31("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
3720
+ /* @__PURE__ */ jsxs30("div", { className: "arap-profile-affected", children: [
3721
+ /* @__PURE__ */ jsx32("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
3722
+ /* @__PURE__ */ jsx32("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
3482
3723
  const val = profile.settings[key];
3483
- return /* @__PURE__ */ jsxs29("span", { className: "arap-profile-chip", children: [
3484
- /* @__PURE__ */ jsxs29("strong", { children: [
3724
+ return /* @__PURE__ */ jsxs30("span", { className: "arap-profile-chip", children: [
3725
+ /* @__PURE__ */ jsxs30("strong", { children: [
3485
3726
  formatKeyName(key),
3486
3727
  ":"
3487
3728
  ] }),
@@ -3490,7 +3731,7 @@ function ProfilePreviewCard({
3490
3731
  ] }, key);
3491
3732
  }) })
3492
3733
  ] }),
3493
- /* @__PURE__ */ jsx31("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ jsx31(
3734
+ /* @__PURE__ */ jsx32("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ jsx32(
3494
3735
  "button",
3495
3736
  {
3496
3737
  type: "button",
@@ -3499,7 +3740,7 @@ function ProfilePreviewCard({
3499
3740
  "aria-label": `Revert ${profile.label} profile`,
3500
3741
  children: "Revert to custom settings"
3501
3742
  }
3502
- ) : /* @__PURE__ */ jsx31(
3743
+ ) : /* @__PURE__ */ jsx32(
3503
3744
  "button",
3504
3745
  {
3505
3746
  type: "button",
@@ -3519,8 +3760,12 @@ export {
3519
3760
  AccessibilityList,
3520
3761
  AccessibilityPlugin,
3521
3762
  BigCursorController,
3763
+ CONTRAST_MODES,
3764
+ CONTRAST_PALETTES,
3765
+ CONTRAST_PROTECTED_SELECTOR,
3522
3766
  ChoiceControl,
3523
3767
  ContrastController,
3768
+ ContrastModeController,
3524
3769
  DEFAULT_PREFERENCES,
3525
3770
  DYSLEXIA_FONT_STACK,
3526
3771
  EmptyState,
@@ -3560,6 +3805,8 @@ export {
3560
3805
  createInitialPreferencesState,
3561
3806
  enLocale,
3562
3807
  getScriptSpacingConstraints,
3808
+ isForcedColorsActive,
3809
+ isProtectedFromContrast,
3563
3810
  isProtectedFromFontFamily,
3564
3811
  isProtectedFromTextAlign,
3565
3812
  isProtectedFromTextScale,