accessibility-plugin-react 2.8.0 → 2.9.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
@@ -340,7 +340,8 @@ for (const key of [
340
340
  "readingMask",
341
341
  "readingGuide",
342
342
  "highlightFocus",
343
- "focusHighlight"
343
+ "focusHighlight",
344
+ "reduceMotion"
344
345
  ]) {
345
346
  builtins[key] = {
346
347
  defaultValue: false,
@@ -384,6 +385,26 @@ function subscribeForcedColors(callback) {
384
385
  };
385
386
  }
386
387
  }
388
+ function isReducedMotionActive() {
389
+ if (typeof window === "undefined" || !window.matchMedia) return false;
390
+ try {
391
+ return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
392
+ } catch {
393
+ return false;
394
+ }
395
+ }
396
+ function subscribeReducedMotion(callback) {
397
+ if (typeof window === "undefined" || !window.matchMedia) return () => {
398
+ };
399
+ try {
400
+ const mql = window.matchMedia("(prefers-reduced-motion: reduce)");
401
+ mql.addEventListener("change", callback);
402
+ return () => mql.removeEventListener("change", callback);
403
+ } catch {
404
+ return () => {
405
+ };
406
+ }
407
+ }
387
408
  var CONTRAST_PALETTES = {
388
409
  light: {
389
410
  text: "#0f172a",
@@ -1039,6 +1060,71 @@ function applyPage(values) {
1039
1060
  });
1040
1061
  }
1041
1062
  }
1063
+ if (values.reduceMotion) {
1064
+ const MOTION_STYLE_ID = "arap-reduce-motion-style";
1065
+ let styleEl = document.getElementById(
1066
+ MOTION_STYLE_ID
1067
+ );
1068
+ if (!styleEl) {
1069
+ styleEl = document.createElement("style");
1070
+ styleEl.id = MOTION_STYLE_ID;
1071
+ styleEl.dataset.arapUi = "";
1072
+ styleEl.textContent = `
1073
+ *:not([data-arap-ui]):not([data-arap-ui] *),
1074
+ *:not([data-arap-ui]):not([data-arap-ui] *)::before,
1075
+ *:not([data-arap-ui]):not([data-arap-ui] *)::after {
1076
+ animation-duration: 0.001ms !important;
1077
+ animation-iteration-count: 1 !important;
1078
+ transition-duration: 0.001ms !important;
1079
+ scroll-behavior: auto !important;
1080
+ }
1081
+ `;
1082
+ document.head.appendChild(styleEl);
1083
+ undo.push(() => {
1084
+ styleEl?.remove();
1085
+ });
1086
+ }
1087
+ const trackedAnimations = /* @__PURE__ */ new Set();
1088
+ if (typeof document !== "undefined" && typeof document.getAnimations === "function") {
1089
+ try {
1090
+ const animations = document.getAnimations();
1091
+ for (const anim of animations) {
1092
+ const target = anim.effect?.target;
1093
+ if (target instanceof Element && target.closest("[data-arap-ui]")) {
1094
+ continue;
1095
+ }
1096
+ if (anim.playState === "running") {
1097
+ anim.pause();
1098
+ trackedAnimations.add(anim);
1099
+ }
1100
+ }
1101
+ } catch {
1102
+ }
1103
+ }
1104
+ if (typeof document !== "undefined") {
1105
+ const mediaList = Array.from(
1106
+ document.querySelectorAll("video, audio")
1107
+ ).filter((media) => !media.closest("[data-arap-ui]"));
1108
+ for (const media of mediaList) {
1109
+ if (!media.paused) {
1110
+ try {
1111
+ media.pause();
1112
+ } catch {
1113
+ }
1114
+ }
1115
+ }
1116
+ }
1117
+ undo.push(() => {
1118
+ for (const anim of trackedAnimations) {
1119
+ if (anim.playState === "paused") {
1120
+ try {
1121
+ anim.play();
1122
+ } catch {
1123
+ }
1124
+ }
1125
+ }
1126
+ });
1127
+ }
1042
1128
  for (const el of elements) {
1043
1129
  if (values.bigCursor) set(el, "cursor", cursor);
1044
1130
  if (values.hideImages) {
@@ -2338,6 +2424,11 @@ var drawings = {
2338
2424
  /* @__PURE__ */ jsx7("path", { d: "M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4" }),
2339
2425
  /* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "3" })
2340
2426
  ] }),
2427
+ reduceMotion: /* @__PURE__ */ jsxs5(Fragment, { children: [
2428
+ /* @__PURE__ */ jsx7("path", { d: "M3 8h4M3 12h6M3 16h4" }),
2429
+ /* @__PURE__ */ jsx7("rect", { x: "14", y: "6", width: "2", height: "12", rx: "1" }),
2430
+ /* @__PURE__ */ jsx7("rect", { x: "18", y: "6", width: "2", height: "12", rx: "1" })
2431
+ ] }),
2341
2432
  textAlign: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M3 5h18M3 10h12M3 15h18M3 20h12" }) }),
2342
2433
  fontFamily: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) }),
2343
2434
  hideImages: /* @__PURE__ */ jsxs5(Fragment, { children: [
@@ -3387,10 +3478,45 @@ function HighlightFocusController() {
3387
3478
  }
3388
3479
  var FocusHighlightController = HighlightFocusController;
3389
3480
 
3481
+ // src/features/ReduceMotionController.tsx
3482
+ import { useSyncExternalStore as useSyncExternalStore7 } from "react";
3483
+ import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
3484
+ var FEATURE_KEY21 = "reduceMotion";
3485
+ var DEFAULT_VALUE21 = false;
3486
+ function ReduceMotionController() {
3487
+ const { value, setValue } = useAccessibility(
3488
+ FEATURE_KEY21,
3489
+ DEFAULT_VALUE21
3490
+ );
3491
+ const osReducedMotion = useSyncExternalStore7(
3492
+ subscribeReducedMotion,
3493
+ isReducedMotionActive,
3494
+ () => false
3495
+ );
3496
+ return /* @__PURE__ */ jsxs26("div", { className: "arap-feature", role: "group", "aria-label": "Reduce Motion", children: [
3497
+ /* @__PURE__ */ jsxs26("span", { className: "arap-label", children: [
3498
+ /* @__PURE__ */ jsx28(FeatureIcon, { name: FEATURE_KEY21 }),
3499
+ /* @__PURE__ */ jsx28("span", { children: "Reduce Motion" })
3500
+ ] }),
3501
+ /* @__PURE__ */ jsx28(
3502
+ "button",
3503
+ {
3504
+ className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
3505
+ onClick: () => setValue(!value),
3506
+ "aria-label": "Reduce Motion",
3507
+ "aria-pressed": Boolean(value),
3508
+ type: "button",
3509
+ children: /* @__PURE__ */ jsx28("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
3510
+ }
3511
+ ),
3512
+ osReducedMotion && /* @__PURE__ */ jsx28("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system prefers-reduced-motion is active." })
3513
+ ] });
3514
+ }
3515
+
3390
3516
  // src/features/ResetController.tsx
3391
3517
  import { createPortal as createPortal2 } from "react-dom";
3392
3518
  import { useContext as useContext6 } from "react";
3393
- import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
3519
+ import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
3394
3520
  function ResetController() {
3395
3521
  const ctx = useContext6(AccessibilityContext);
3396
3522
  if (!ctx) {
@@ -3401,15 +3527,15 @@ function ResetController() {
3401
3527
  const actionHost = useContext6(PanelActionsContext);
3402
3528
  const { resetAll } = ctx;
3403
3529
  const strings = resolveLocaleStrings(ctx.locale);
3404
- const button = /* @__PURE__ */ jsx28("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ jsxs26("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
3405
- /* @__PURE__ */ jsx28(FeatureIcon, { name: "reset" }),
3530
+ const button = /* @__PURE__ */ jsx29("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ jsxs27("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
3531
+ /* @__PURE__ */ jsx29(FeatureIcon, { name: "reset" }),
3406
3532
  strings.resetAll
3407
3533
  ] }) });
3408
3534
  return actionHost ? createPortal2(button, actionHost) : button;
3409
3535
  }
3410
3536
 
3411
3537
  // src/core/controls/ToggleControl.tsx
3412
- import { jsx as jsx29 } from "react/jsx-runtime";
3538
+ import { jsx as jsx30 } from "react/jsx-runtime";
3413
3539
  function ToggleControl({
3414
3540
  id,
3415
3541
  label,
@@ -3431,12 +3557,12 @@ function ToggleControl({
3431
3557
  onChange(!checked);
3432
3558
  }
3433
3559
  };
3434
- return /* @__PURE__ */ jsx29(
3560
+ return /* @__PURE__ */ jsx30(
3435
3561
  "div",
3436
3562
  {
3437
3563
  className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
3438
3564
  style,
3439
- children: /* @__PURE__ */ jsx29(
3565
+ children: /* @__PURE__ */ jsx30(
3440
3566
  "button",
3441
3567
  {
3442
3568
  id,
@@ -3450,7 +3576,7 @@ function ToggleControl({
3450
3576
  disabled: !isInteractive,
3451
3577
  onClick: handleClick,
3452
3578
  title: unavailableReason || description || toggleLabel,
3453
- children: /* @__PURE__ */ jsx29(
3579
+ children: /* @__PURE__ */ jsx30(
3454
3580
  "span",
3455
3581
  {
3456
3582
  className: "arap-toggle-knob",
@@ -3467,7 +3593,7 @@ function ToggleControl({
3467
3593
 
3468
3594
  // src/core/controls/ChoiceControl.tsx
3469
3595
  import { useCallback as useCallback4, useMemo as useMemo2, useRef as useRef5 } from "react";
3470
- import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
3596
+ import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
3471
3597
  function ChoiceControl({
3472
3598
  id,
3473
3599
  label,
@@ -3523,7 +3649,7 @@ function ChoiceControl({
3523
3649
  const renderOptionButton = (opt) => {
3524
3650
  const isSelected = value === opt.value;
3525
3651
  const isOptionDisabled = disabled || Boolean(opt.disabled);
3526
- return /* @__PURE__ */ jsxs27(
3652
+ return /* @__PURE__ */ jsxs28(
3527
3653
  "button",
3528
3654
  {
3529
3655
  type: "button",
@@ -3537,15 +3663,15 @@ function ChoiceControl({
3537
3663
  onClick: () => !isOptionDisabled && onChange(opt.value),
3538
3664
  title: opt.description,
3539
3665
  children: [
3540
- isSelected && /* @__PURE__ */ jsx30("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
3541
- /* @__PURE__ */ jsx30("span", { children: opt.label }),
3542
- opt.badge && /* @__PURE__ */ jsx30("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
3666
+ isSelected && /* @__PURE__ */ jsx31("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
3667
+ /* @__PURE__ */ jsx31("span", { children: opt.label }),
3668
+ opt.badge && /* @__PURE__ */ jsx31("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
3543
3669
  ]
3544
3670
  },
3545
3671
  String(opt.value)
3546
3672
  );
3547
3673
  };
3548
- return /* @__PURE__ */ jsx30(
3674
+ return /* @__PURE__ */ jsx31(
3549
3675
  "div",
3550
3676
  {
3551
3677
  ref: containerRef,
@@ -3556,15 +3682,15 @@ function ChoiceControl({
3556
3682
  className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
3557
3683
  style,
3558
3684
  onKeyDown: handleKeyDown,
3559
- children: groups ? groups.map((group) => /* @__PURE__ */ jsxs27(
3685
+ children: groups ? groups.map((group) => /* @__PURE__ */ jsxs28(
3560
3686
  "div",
3561
3687
  {
3562
3688
  className: "arap-choice-group",
3563
3689
  role: "group",
3564
3690
  "aria-label": group.label,
3565
3691
  children: [
3566
- /* @__PURE__ */ jsx30("span", { className: "arap-choice-group-title", children: group.label }),
3567
- /* @__PURE__ */ jsx30("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
3692
+ /* @__PURE__ */ jsx31("span", { className: "arap-choice-group-title", children: group.label }),
3693
+ /* @__PURE__ */ jsx31("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
3568
3694
  ]
3569
3695
  },
3570
3696
  group.label
@@ -3574,7 +3700,7 @@ function ChoiceControl({
3574
3700
  }
3575
3701
 
3576
3702
  // src/core/controls/StepperControl.tsx
3577
- import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
3703
+ import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
3578
3704
  function StepperControl({
3579
3705
  id,
3580
3706
  label,
@@ -3604,15 +3730,15 @@ function StepperControl({
3604
3730
  onChange(Math.min(max, Number((value + step).toFixed(2))));
3605
3731
  }
3606
3732
  };
3607
- return /* @__PURE__ */ jsxs28(
3733
+ return /* @__PURE__ */ jsxs29(
3608
3734
  "div",
3609
3735
  {
3610
3736
  id,
3611
3737
  className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
3612
3738
  style,
3613
3739
  children: [
3614
- /* @__PURE__ */ jsxs28("div", { className: "arap-controls", children: [
3615
- /* @__PURE__ */ jsx31(
3740
+ /* @__PURE__ */ jsxs29("div", { className: "arap-controls", children: [
3741
+ /* @__PURE__ */ jsx32(
3616
3742
  "button",
3617
3743
  {
3618
3744
  type: "button",
@@ -3623,8 +3749,8 @@ function StepperControl({
3623
3749
  children: "\u2212"
3624
3750
  }
3625
3751
  ),
3626
- /* @__PURE__ */ jsx31("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
3627
- /* @__PURE__ */ jsx31(
3752
+ /* @__PURE__ */ jsx32("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
3753
+ /* @__PURE__ */ jsx32(
3628
3754
  "button",
3629
3755
  {
3630
3756
  type: "button",
@@ -3636,7 +3762,7 @@ function StepperControl({
3636
3762
  }
3637
3763
  )
3638
3764
  ] }),
3639
- showSlider && /* @__PURE__ */ jsx31("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx31(
3765
+ showSlider && /* @__PURE__ */ jsx32("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx32(
3640
3766
  "input",
3641
3767
  {
3642
3768
  type: "range",
@@ -3660,7 +3786,7 @@ function StepperControl({
3660
3786
  }
3661
3787
 
3662
3788
  // src/core/controls/FeatureCard.tsx
3663
- import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
3789
+ import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
3664
3790
  function FeatureCard({
3665
3791
  id,
3666
3792
  featureKey,
@@ -3679,7 +3805,7 @@ function FeatureCard({
3679
3805
  largeControls = false
3680
3806
  }) {
3681
3807
  const cardTitle = typeof title === "string" ? title : void 0;
3682
- return /* @__PURE__ */ jsxs29(
3808
+ return /* @__PURE__ */ jsxs30(
3683
3809
  "div",
3684
3810
  {
3685
3811
  id,
@@ -3688,27 +3814,27 @@ function FeatureCard({
3688
3814
  className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
3689
3815
  style,
3690
3816
  children: [
3691
- /* @__PURE__ */ jsxs29("div", { className: "arap-card-header", children: [
3692
- /* @__PURE__ */ jsxs29("span", { className: "arap-label", children: [
3693
- icon ?? (featureKey ? /* @__PURE__ */ jsx32(FeatureIcon, { name: featureKey }) : null),
3694
- /* @__PURE__ */ jsx32("span", { className: "arap-card-title", children: title })
3817
+ /* @__PURE__ */ jsxs30("div", { className: "arap-card-header", children: [
3818
+ /* @__PURE__ */ jsxs30("span", { className: "arap-label", children: [
3819
+ icon ?? (featureKey ? /* @__PURE__ */ jsx33(FeatureIcon, { name: featureKey }) : null),
3820
+ /* @__PURE__ */ jsx33("span", { className: "arap-card-title", children: title })
3695
3821
  ] }),
3696
- statusBadge && /* @__PURE__ */ jsx32("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
3822
+ statusBadge && /* @__PURE__ */ jsx33("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
3697
3823
  ] }),
3698
- description && /* @__PURE__ */ jsx32("p", { className: "arap-card-desc", children: description }),
3699
- status === "error" && errorMessage && /* @__PURE__ */ jsxs29("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
3700
- /* @__PURE__ */ jsx32("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
3701
- /* @__PURE__ */ jsx32("span", { children: errorMessage })
3824
+ description && /* @__PURE__ */ jsx33("p", { className: "arap-card-desc", children: description }),
3825
+ status === "error" && errorMessage && /* @__PURE__ */ jsxs30("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
3826
+ /* @__PURE__ */ jsx33("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
3827
+ /* @__PURE__ */ jsx33("span", { children: errorMessage })
3702
3828
  ] }),
3703
- status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs29("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
3704
- /* @__PURE__ */ jsx32("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
3705
- /* @__PURE__ */ jsx32("span", { children: unavailableMessage })
3829
+ status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs30("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
3830
+ /* @__PURE__ */ jsx33("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
3831
+ /* @__PURE__ */ jsx33("span", { children: unavailableMessage })
3706
3832
  ] }),
3707
- status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs29("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
3708
- /* @__PURE__ */ jsx32("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
3709
- /* @__PURE__ */ jsxs29("div", { className: "arap-permission-content", children: [
3710
- /* @__PURE__ */ jsx32("span", { children: permissionMessage }),
3711
- onRequestPermission && /* @__PURE__ */ jsx32(
3833
+ status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs30("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
3834
+ /* @__PURE__ */ jsx33("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
3835
+ /* @__PURE__ */ jsxs30("div", { className: "arap-permission-content", children: [
3836
+ /* @__PURE__ */ jsx33("span", { children: permissionMessage }),
3837
+ onRequestPermission && /* @__PURE__ */ jsx33(
3712
3838
  "button",
3713
3839
  {
3714
3840
  type: "button",
@@ -3719,14 +3845,14 @@ function FeatureCard({
3719
3845
  )
3720
3846
  ] })
3721
3847
  ] }),
3722
- /* @__PURE__ */ jsx32("div", { className: "arap-card-content", children })
3848
+ /* @__PURE__ */ jsx33("div", { className: "arap-card-content", children })
3723
3849
  ]
3724
3850
  }
3725
3851
  );
3726
3852
  }
3727
3853
 
3728
3854
  // src/core/controls/FeatureStatusState.tsx
3729
- import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
3855
+ import { jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
3730
3856
  function SearchCount({
3731
3857
  totalCount,
3732
3858
  matchedCount,
@@ -3735,7 +3861,7 @@ function SearchCount({
3735
3861
  style
3736
3862
  }) {
3737
3863
  const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
3738
- return /* @__PURE__ */ jsx33(
3864
+ return /* @__PURE__ */ jsx34(
3739
3865
  "div",
3740
3866
  {
3741
3867
  role: "status",
@@ -3755,17 +3881,17 @@ function EmptyState({
3755
3881
  className = "",
3756
3882
  style
3757
3883
  }) {
3758
- return /* @__PURE__ */ jsxs30(
3884
+ return /* @__PURE__ */ jsxs31(
3759
3885
  "div",
3760
3886
  {
3761
3887
  role: "status",
3762
3888
  className: `arap-empty-state ${className}`,
3763
3889
  style,
3764
3890
  children: [
3765
- /* @__PURE__ */ jsx33("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
3766
- /* @__PURE__ */ jsx33("h3", { className: "arap-empty-title", children: title }),
3767
- /* @__PURE__ */ jsx33("p", { className: "arap-empty-desc", children: description }),
3768
- onAction && /* @__PURE__ */ jsx33("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
3891
+ /* @__PURE__ */ jsx34("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
3892
+ /* @__PURE__ */ jsx34("h3", { className: "arap-empty-title", children: title }),
3893
+ /* @__PURE__ */ jsx34("p", { className: "arap-empty-desc", children: description }),
3894
+ onAction && /* @__PURE__ */ jsx34("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
3769
3895
  ]
3770
3896
  }
3771
3897
  );
@@ -3778,18 +3904,18 @@ function ErrorState({
3778
3904
  className = "",
3779
3905
  style
3780
3906
  }) {
3781
- return /* @__PURE__ */ jsxs30(
3907
+ return /* @__PURE__ */ jsxs31(
3782
3908
  "div",
3783
3909
  {
3784
3910
  role: "alert",
3785
3911
  className: `arap-error-state arap-card-alert arap-card-error ${className}`,
3786
3912
  style,
3787
3913
  children: [
3788
- /* @__PURE__ */ jsx33("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
3789
- /* @__PURE__ */ jsxs30("div", { className: "arap-error-content", children: [
3790
- title && /* @__PURE__ */ jsx33("h4", { className: "arap-error-title", children: title }),
3791
- /* @__PURE__ */ jsx33("p", { className: "arap-error-message", children: message }),
3792
- onRetry && /* @__PURE__ */ jsx33("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
3914
+ /* @__PURE__ */ jsx34("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
3915
+ /* @__PURE__ */ jsxs31("div", { className: "arap-error-content", children: [
3916
+ title && /* @__PURE__ */ jsx34("h4", { className: "arap-error-title", children: title }),
3917
+ /* @__PURE__ */ jsx34("p", { className: "arap-error-message", children: message }),
3918
+ onRetry && /* @__PURE__ */ jsx34("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
3793
3919
  ] })
3794
3920
  ]
3795
3921
  }
@@ -3797,7 +3923,7 @@ function ErrorState({
3797
3923
  }
3798
3924
 
3799
3925
  // src/core/controls/ProfilePreviewCard.tsx
3800
- import { jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
3926
+ import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
3801
3927
  function ProfilePreviewCard({
3802
3928
  profile,
3803
3929
  isActive,
@@ -3847,7 +3973,7 @@ function ProfilePreviewCard({
3847
3973
  if (val === null || val === void 0) return "Original";
3848
3974
  return String(val);
3849
3975
  };
3850
- return /* @__PURE__ */ jsxs31(
3976
+ return /* @__PURE__ */ jsxs32(
3851
3977
  "div",
3852
3978
  {
3853
3979
  role: "group",
@@ -3855,10 +3981,10 @@ function ProfilePreviewCard({
3855
3981
  className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
3856
3982
  style,
3857
3983
  children: [
3858
- /* @__PURE__ */ jsxs31("div", { className: "arap-profile-header", children: [
3859
- /* @__PURE__ */ jsxs31("div", { className: "arap-profile-title-row", children: [
3860
- /* @__PURE__ */ jsx34("h4", { className: "arap-profile-title", children: profile.label }),
3861
- isActive && /* @__PURE__ */ jsx34(
3984
+ /* @__PURE__ */ jsxs32("div", { className: "arap-profile-header", children: [
3985
+ /* @__PURE__ */ jsxs32("div", { className: "arap-profile-title-row", children: [
3986
+ /* @__PURE__ */ jsx35("h4", { className: "arap-profile-title", children: profile.label }),
3987
+ isActive && /* @__PURE__ */ jsx35(
3862
3988
  "span",
3863
3989
  {
3864
3990
  className: "arap-profile-active-badge",
@@ -3867,14 +3993,14 @@ function ProfilePreviewCard({
3867
3993
  }
3868
3994
  )
3869
3995
  ] }),
3870
- /* @__PURE__ */ jsx34("p", { className: "arap-profile-desc", children: profile.description })
3996
+ /* @__PURE__ */ jsx35("p", { className: "arap-profile-desc", children: profile.description })
3871
3997
  ] }),
3872
- /* @__PURE__ */ jsxs31("div", { className: "arap-profile-affected", children: [
3873
- /* @__PURE__ */ jsx34("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
3874
- /* @__PURE__ */ jsx34("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
3998
+ /* @__PURE__ */ jsxs32("div", { className: "arap-profile-affected", children: [
3999
+ /* @__PURE__ */ jsx35("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
4000
+ /* @__PURE__ */ jsx35("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
3875
4001
  const val = profile.settings[key];
3876
- return /* @__PURE__ */ jsxs31("span", { className: "arap-profile-chip", children: [
3877
- /* @__PURE__ */ jsxs31("strong", { children: [
4002
+ return /* @__PURE__ */ jsxs32("span", { className: "arap-profile-chip", children: [
4003
+ /* @__PURE__ */ jsxs32("strong", { children: [
3878
4004
  formatKeyName(key),
3879
4005
  ":"
3880
4006
  ] }),
@@ -3883,7 +4009,7 @@ function ProfilePreviewCard({
3883
4009
  ] }, key);
3884
4010
  }) })
3885
4011
  ] }),
3886
- /* @__PURE__ */ jsx34("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ jsx34(
4012
+ /* @__PURE__ */ jsx35("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ jsx35(
3887
4013
  "button",
3888
4014
  {
3889
4015
  type: "button",
@@ -3892,7 +4018,7 @@ function ProfilePreviewCard({
3892
4018
  "aria-label": `Revert ${profile.label} profile`,
3893
4019
  children: "Revert to custom settings"
3894
4020
  }
3895
- ) : /* @__PURE__ */ jsx34(
4021
+ ) : /* @__PURE__ */ jsx35(
3896
4022
  "button",
3897
4023
  {
3898
4024
  type: "button",
@@ -3944,6 +4070,7 @@ export {
3944
4070
  ProfilePreviewCard,
3945
4071
  ReadingGuideController,
3946
4072
  ReadingMaskController,
4073
+ ReduceMotionController,
3947
4074
  ResetController,
3948
4075
  SaturationController,
3949
4076
  SearchCount,
@@ -3967,6 +4094,7 @@ export {
3967
4094
  isProtectedFromTextAlign,
3968
4095
  isProtectedFromTextScale,
3969
4096
  isProtectedFromTextSpacing,
4097
+ isReducedMotionActive,
3970
4098
  isRtlLocale,
3971
4099
  normalizePreferenceValue,
3972
4100
  normalizePreferences,
@@ -3974,6 +4102,8 @@ export {
3974
4102
  registerLocale,
3975
4103
  resolveEffectivePreferences,
3976
4104
  resolveLocaleStrings,
4105
+ subscribeForcedColors,
4106
+ subscribeReducedMotion,
3977
4107
  useAccessibility
3978
4108
  };
3979
4109
  //# sourceMappingURL=index.mjs.map