accessibility-plugin-react 2.8.0 → 2.10.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/README.md +22 -21
- package/dist/index.d.mts +29 -2
- package/dist/index.d.ts +29 -2
- package/dist/index.js +340 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +326 -77
- package/dist/index.mjs.map +1 -1
- package/docs/API.md +3 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +2 -2
- package/docs/DECORATIVE_IMAGES.md +176 -0
- package/docs/FEATURES.md +25 -24
- package/docs/REDUCE_MOTION.md +64 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44,6 +44,7 @@ __export(index_exports, {
|
|
|
44
44
|
FontFamilyController: () => FontFamilyController,
|
|
45
45
|
FontSizeController: () => FontSizeController,
|
|
46
46
|
GrayscaleController: () => GrayscaleController,
|
|
47
|
+
HideDecorativeImagesController: () => HideDecorativeImagesController,
|
|
47
48
|
HideImagesController: () => HideImagesController,
|
|
48
49
|
HideVideosController: () => HideVideosController,
|
|
49
50
|
HighlightFocusController: () => HighlightFocusController,
|
|
@@ -59,6 +60,7 @@ __export(index_exports, {
|
|
|
59
60
|
ProfilePreviewCard: () => ProfilePreviewCard,
|
|
60
61
|
ReadingGuideController: () => ReadingGuideController,
|
|
61
62
|
ReadingMaskController: () => ReadingMaskController,
|
|
63
|
+
ReduceMotionController: () => ReduceMotionController,
|
|
62
64
|
ResetController: () => ResetController,
|
|
63
65
|
SaturationController: () => SaturationController,
|
|
64
66
|
SearchCount: () => SearchCount,
|
|
@@ -76,12 +78,15 @@ __export(index_exports, {
|
|
|
76
78
|
enLocale: () => enLocale,
|
|
77
79
|
findMainLandmark: () => findMainLandmark,
|
|
78
80
|
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
81
|
+
isEligibleDecorativeImage: () => isEligibleDecorativeImage,
|
|
79
82
|
isForcedColorsActive: () => isForcedColorsActive,
|
|
83
|
+
isFunctionalOrMeaningfulImage: () => isFunctionalOrMeaningfulImage,
|
|
80
84
|
isProtectedFromContrast: () => isProtectedFromContrast,
|
|
81
85
|
isProtectedFromFontFamily: () => isProtectedFromFontFamily,
|
|
82
86
|
isProtectedFromTextAlign: () => isProtectedFromTextAlign,
|
|
83
87
|
isProtectedFromTextScale: () => isProtectedFromTextScale,
|
|
84
88
|
isProtectedFromTextSpacing: () => isProtectedFromTextSpacing,
|
|
89
|
+
isReducedMotionActive: () => isReducedMotionActive,
|
|
85
90
|
isRtlLocale: () => isRtlLocale,
|
|
86
91
|
normalizePreferenceValue: () => normalizePreferenceValue,
|
|
87
92
|
normalizePreferences: () => normalizePreferences,
|
|
@@ -89,6 +94,8 @@ __export(index_exports, {
|
|
|
89
94
|
registerLocale: () => registerLocale,
|
|
90
95
|
resolveEffectivePreferences: () => resolveEffectivePreferences,
|
|
91
96
|
resolveLocaleStrings: () => resolveLocaleStrings,
|
|
97
|
+
subscribeForcedColors: () => subscribeForcedColors,
|
|
98
|
+
subscribeReducedMotion: () => subscribeReducedMotion,
|
|
92
99
|
useAccessibility: () => useAccessibility
|
|
93
100
|
});
|
|
94
101
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -424,7 +431,8 @@ for (const key of [
|
|
|
424
431
|
"readingMask",
|
|
425
432
|
"readingGuide",
|
|
426
433
|
"highlightFocus",
|
|
427
|
-
"focusHighlight"
|
|
434
|
+
"focusHighlight",
|
|
435
|
+
"reduceMotion"
|
|
428
436
|
]) {
|
|
429
437
|
builtins[key] = {
|
|
430
438
|
defaultValue: false,
|
|
@@ -468,6 +476,26 @@ function subscribeForcedColors(callback) {
|
|
|
468
476
|
};
|
|
469
477
|
}
|
|
470
478
|
}
|
|
479
|
+
function isReducedMotionActive() {
|
|
480
|
+
if (typeof window === "undefined" || !window.matchMedia) return false;
|
|
481
|
+
try {
|
|
482
|
+
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
483
|
+
} catch {
|
|
484
|
+
return false;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
function subscribeReducedMotion(callback) {
|
|
488
|
+
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
489
|
+
};
|
|
490
|
+
try {
|
|
491
|
+
const mql = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
492
|
+
mql.addEventListener("change", callback);
|
|
493
|
+
return () => mql.removeEventListener("change", callback);
|
|
494
|
+
} catch {
|
|
495
|
+
return () => {
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
}
|
|
471
499
|
var CONTRAST_PALETTES = {
|
|
472
500
|
light: {
|
|
473
501
|
text: "#0f172a",
|
|
@@ -881,6 +909,104 @@ function getScriptSpacingConstraints(element) {
|
|
|
881
909
|
script: "standard"
|
|
882
910
|
};
|
|
883
911
|
}
|
|
912
|
+
function isFunctionalOrMeaningfulImage(el) {
|
|
913
|
+
try {
|
|
914
|
+
if (el.closest(
|
|
915
|
+
"a, button, [role='button'], [role='link'], [role='menuitem'], [role='tab'], input, select, textarea, summary"
|
|
916
|
+
)) {
|
|
917
|
+
return true;
|
|
918
|
+
}
|
|
919
|
+
if (el.closest(
|
|
920
|
+
"[id*='captcha' i], [class*='captcha' i], [aria-label*='captcha' i], [data-captcha]"
|
|
921
|
+
) || el.matches(
|
|
922
|
+
"[src*='captcha' i], [alt*='captcha' i], [title*='captcha' i], [id*='captcha' i], [class*='captcha' i]"
|
|
923
|
+
)) {
|
|
924
|
+
return true;
|
|
925
|
+
}
|
|
926
|
+
if (el.closest(
|
|
927
|
+
"[role='graphics-document'], [role='graphics-symbol'], [role='figure'], figure, [class*='chart' i], [id*='chart' i], [class*='graph' i], [id*='graph' i], [class*='diagram' i], [id*='diagram' i]"
|
|
928
|
+
) || el.matches(
|
|
929
|
+
"[role='graphics-document'], [role='graphics-symbol'], [aria-roledescription*='chart' i]"
|
|
930
|
+
)) {
|
|
931
|
+
return true;
|
|
932
|
+
}
|
|
933
|
+
if (el.closest(
|
|
934
|
+
"[role='region'][aria-label*='map' i], [class*='map' i], [id*='map' i], [data-map]"
|
|
935
|
+
) || el.matches(
|
|
936
|
+
"[src*='maps' i], [src*='tiles' i], [src*='openstreetmap' i], [src*='mapbox' i]"
|
|
937
|
+
)) {
|
|
938
|
+
return true;
|
|
939
|
+
}
|
|
940
|
+
if (el.closest(
|
|
941
|
+
"[class*='qr' i], [id*='qr' i], [class*='barcode' i], [id*='barcode' i]"
|
|
942
|
+
) || el.matches(
|
|
943
|
+
"[src*='qr' i], [alt*='qr' i], [src*='barcode' i], [alt*='barcode' i]"
|
|
944
|
+
)) {
|
|
945
|
+
return true;
|
|
946
|
+
}
|
|
947
|
+
if (el.closest("[role='math'], math, [class*='math' i]")) {
|
|
948
|
+
return true;
|
|
949
|
+
}
|
|
950
|
+
if (el.hasAttribute("alt")) {
|
|
951
|
+
const alt = el.getAttribute("alt")?.trim();
|
|
952
|
+
if (alt && alt.length > 0) return true;
|
|
953
|
+
}
|
|
954
|
+
if (el.hasAttribute("aria-label")) {
|
|
955
|
+
const label = el.getAttribute("aria-label")?.trim();
|
|
956
|
+
if (label && label.length > 0) return true;
|
|
957
|
+
}
|
|
958
|
+
if (el.hasAttribute("aria-labelledby")) {
|
|
959
|
+
const labelledby = el.getAttribute("aria-labelledby")?.trim();
|
|
960
|
+
if (labelledby && labelledby.length > 0) return true;
|
|
961
|
+
}
|
|
962
|
+
if (el.hasAttribute("title")) {
|
|
963
|
+
const title = el.getAttribute("title")?.trim();
|
|
964
|
+
if (title && title.length > 0) return true;
|
|
965
|
+
}
|
|
966
|
+
const role = el.getAttribute("role");
|
|
967
|
+
if (role && role !== "presentation" && role !== "none" && role !== "img") {
|
|
968
|
+
return true;
|
|
969
|
+
}
|
|
970
|
+
if (role === "img" && (el.hasAttribute("aria-label") || el.hasAttribute("aria-labelledby") || el.hasAttribute("title") || el.hasAttribute("alt") && el.getAttribute("alt")?.trim() !== "")) {
|
|
971
|
+
return true;
|
|
972
|
+
}
|
|
973
|
+
} catch {
|
|
974
|
+
return false;
|
|
975
|
+
}
|
|
976
|
+
return false;
|
|
977
|
+
}
|
|
978
|
+
function isEligibleDecorativeImage(el) {
|
|
979
|
+
try {
|
|
980
|
+
if (isFunctionalOrMeaningfulImage(el)) {
|
|
981
|
+
return false;
|
|
982
|
+
}
|
|
983
|
+
if (el.matches("img, picture")) {
|
|
984
|
+
if (el.hasAttribute("alt") && el.getAttribute("alt")?.trim() === "") {
|
|
985
|
+
return true;
|
|
986
|
+
}
|
|
987
|
+
const role = el.getAttribute("role");
|
|
988
|
+
if (role === "presentation" || role === "none") {
|
|
989
|
+
return true;
|
|
990
|
+
}
|
|
991
|
+
if (el.getAttribute("aria-hidden") === "true") {
|
|
992
|
+
return true;
|
|
993
|
+
}
|
|
994
|
+
if (el.hasAttribute("data-decorative") || el.classList.contains("decorative") || el.classList.contains("deco")) {
|
|
995
|
+
return true;
|
|
996
|
+
}
|
|
997
|
+
if (el.matches("picture")) {
|
|
998
|
+
const childImg = el.querySelector("img");
|
|
999
|
+
if (childImg && isEligibleDecorativeImage(childImg)) {
|
|
1000
|
+
return true;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
return false;
|
|
1004
|
+
}
|
|
1005
|
+
} catch {
|
|
1006
|
+
return false;
|
|
1007
|
+
}
|
|
1008
|
+
return false;
|
|
1009
|
+
}
|
|
884
1010
|
function applyPage(values) {
|
|
885
1011
|
const undo = [];
|
|
886
1012
|
function set(element, property, value) {
|
|
@@ -1123,11 +1249,91 @@ function applyPage(values) {
|
|
|
1123
1249
|
});
|
|
1124
1250
|
}
|
|
1125
1251
|
}
|
|
1252
|
+
if (values.reduceMotion) {
|
|
1253
|
+
const MOTION_STYLE_ID = "arap-reduce-motion-style";
|
|
1254
|
+
let styleEl = document.getElementById(
|
|
1255
|
+
MOTION_STYLE_ID
|
|
1256
|
+
);
|
|
1257
|
+
if (!styleEl) {
|
|
1258
|
+
styleEl = document.createElement("style");
|
|
1259
|
+
styleEl.id = MOTION_STYLE_ID;
|
|
1260
|
+
styleEl.dataset.arapUi = "";
|
|
1261
|
+
styleEl.textContent = `
|
|
1262
|
+
*:not([data-arap-ui]):not([data-arap-ui] *),
|
|
1263
|
+
*:not([data-arap-ui]):not([data-arap-ui] *)::before,
|
|
1264
|
+
*:not([data-arap-ui]):not([data-arap-ui] *)::after {
|
|
1265
|
+
animation-duration: 0.001ms !important;
|
|
1266
|
+
animation-iteration-count: 1 !important;
|
|
1267
|
+
transition-duration: 0.001ms !important;
|
|
1268
|
+
scroll-behavior: auto !important;
|
|
1269
|
+
}
|
|
1270
|
+
`;
|
|
1271
|
+
document.head.appendChild(styleEl);
|
|
1272
|
+
undo.push(() => {
|
|
1273
|
+
styleEl?.remove();
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
const trackedAnimations = /* @__PURE__ */ new Set();
|
|
1277
|
+
if (typeof document !== "undefined" && typeof document.getAnimations === "function") {
|
|
1278
|
+
try {
|
|
1279
|
+
const animations = document.getAnimations();
|
|
1280
|
+
for (const anim of animations) {
|
|
1281
|
+
const target = anim.effect?.target;
|
|
1282
|
+
if (target instanceof Element && target.closest("[data-arap-ui]")) {
|
|
1283
|
+
continue;
|
|
1284
|
+
}
|
|
1285
|
+
if (anim.playState === "running") {
|
|
1286
|
+
anim.pause();
|
|
1287
|
+
trackedAnimations.add(anim);
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
} catch {
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
if (typeof document !== "undefined") {
|
|
1294
|
+
const mediaList = Array.from(
|
|
1295
|
+
document.querySelectorAll("video, audio")
|
|
1296
|
+
).filter((media) => !media.closest("[data-arap-ui]"));
|
|
1297
|
+
for (const media of mediaList) {
|
|
1298
|
+
if (!media.paused) {
|
|
1299
|
+
try {
|
|
1300
|
+
media.pause();
|
|
1301
|
+
} catch {
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
undo.push(() => {
|
|
1307
|
+
for (const anim of trackedAnimations) {
|
|
1308
|
+
if (anim.playState === "paused") {
|
|
1309
|
+
try {
|
|
1310
|
+
anim.play();
|
|
1311
|
+
} catch {
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1126
1317
|
for (const el of elements) {
|
|
1127
1318
|
if (values.bigCursor) set(el, "cursor", cursor);
|
|
1128
1319
|
if (values.hideImages) {
|
|
1129
|
-
if (el
|
|
1130
|
-
|
|
1320
|
+
if (isEligibleDecorativeImage(el)) {
|
|
1321
|
+
set(el, "visibility", "hidden");
|
|
1322
|
+
}
|
|
1323
|
+
if (!isFunctionalOrMeaningfulImage(el)) {
|
|
1324
|
+
const inlineBg = el.style.backgroundImage;
|
|
1325
|
+
if (inlineBg && inlineBg !== "none") {
|
|
1326
|
+
set(el, "background-image", "none");
|
|
1327
|
+
} else {
|
|
1328
|
+
try {
|
|
1329
|
+
const computedBg = getComputedStyle(el).backgroundImage;
|
|
1330
|
+
if (computedBg && computedBg !== "none") {
|
|
1331
|
+
set(el, "background-image", "none");
|
|
1332
|
+
}
|
|
1333
|
+
} catch {
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1131
1337
|
}
|
|
1132
1338
|
if (values.hideVideos && el.matches(
|
|
1133
1339
|
'video, iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"], iframe[src*="player.vimeo.com/video/"]'
|
|
@@ -2422,6 +2628,11 @@ var drawings = {
|
|
|
2422
2628
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4" }),
|
|
2423
2629
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
2424
2630
|
] }),
|
|
2631
|
+
reduceMotion: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2632
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 8h4M3 12h6M3 16h4" }),
|
|
2633
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "14", y: "6", width: "2", height: "12", rx: "1" }),
|
|
2634
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "18", y: "6", width: "2", height: "12", rx: "1" })
|
|
2635
|
+
] }),
|
|
2425
2636
|
textAlign: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 5h18M3 10h12M3 15h18M3 20h12" }) }),
|
|
2426
2637
|
fontFamily: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) }),
|
|
2427
2638
|
hideImages: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
@@ -3306,22 +3517,24 @@ function FontFamilyController() {
|
|
|
3306
3517
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3307
3518
|
var FEATURE_KEY15 = "hideImages";
|
|
3308
3519
|
var DEFAULT_VALUE15 = false;
|
|
3309
|
-
function HideImagesController(
|
|
3520
|
+
function HideImagesController({
|
|
3521
|
+
label = "Hide Images"
|
|
3522
|
+
} = {}) {
|
|
3310
3523
|
const { value, setValue } = useAccessibility(
|
|
3311
3524
|
FEATURE_KEY15,
|
|
3312
3525
|
DEFAULT_VALUE15
|
|
3313
3526
|
);
|
|
3314
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "arap-feature", role: "group", "aria-label":
|
|
3527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": label, children: [
|
|
3315
3528
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "arap-label", children: [
|
|
3316
3529
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
3317
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children:
|
|
3530
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: label })
|
|
3318
3531
|
] }),
|
|
3319
3532
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3320
3533
|
"button",
|
|
3321
3534
|
{
|
|
3322
3535
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3323
3536
|
onClick: () => setValue(!value),
|
|
3324
|
-
"aria-label":
|
|
3537
|
+
"aria-label": label,
|
|
3325
3538
|
"aria-pressed": value,
|
|
3326
3539
|
type: "button",
|
|
3327
3540
|
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -3329,6 +3542,7 @@ function HideImagesController() {
|
|
|
3329
3542
|
)
|
|
3330
3543
|
] });
|
|
3331
3544
|
}
|
|
3545
|
+
var HideDecorativeImagesController = HideImagesController;
|
|
3332
3546
|
|
|
3333
3547
|
// src/features/HideVideosController.tsx
|
|
3334
3548
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
@@ -3471,29 +3685,64 @@ function HighlightFocusController() {
|
|
|
3471
3685
|
}
|
|
3472
3686
|
var FocusHighlightController = HighlightFocusController;
|
|
3473
3687
|
|
|
3474
|
-
// src/features/
|
|
3475
|
-
var import_react_dom2 = require("react-dom");
|
|
3688
|
+
// src/features/ReduceMotionController.tsx
|
|
3476
3689
|
var import_react14 = require("react");
|
|
3477
3690
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3691
|
+
var FEATURE_KEY21 = "reduceMotion";
|
|
3692
|
+
var DEFAULT_VALUE21 = false;
|
|
3693
|
+
function ReduceMotionController() {
|
|
3694
|
+
const { value, setValue } = useAccessibility(
|
|
3695
|
+
FEATURE_KEY21,
|
|
3696
|
+
DEFAULT_VALUE21
|
|
3697
|
+
);
|
|
3698
|
+
const osReducedMotion = (0, import_react14.useSyncExternalStore)(
|
|
3699
|
+
subscribeReducedMotion,
|
|
3700
|
+
isReducedMotionActive,
|
|
3701
|
+
() => false
|
|
3702
|
+
);
|
|
3703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reduce Motion", children: [
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "arap-label", children: [
|
|
3705
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FeatureIcon, { name: FEATURE_KEY21 }),
|
|
3706
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: "Reduce Motion" })
|
|
3707
|
+
] }),
|
|
3708
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3709
|
+
"button",
|
|
3710
|
+
{
|
|
3711
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3712
|
+
onClick: () => setValue(!value),
|
|
3713
|
+
"aria-label": "Reduce Motion",
|
|
3714
|
+
"aria-pressed": Boolean(value),
|
|
3715
|
+
type: "button",
|
|
3716
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3717
|
+
}
|
|
3718
|
+
),
|
|
3719
|
+
osReducedMotion && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system prefers-reduced-motion is active." })
|
|
3720
|
+
] });
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3723
|
+
// src/features/ResetController.tsx
|
|
3724
|
+
var import_react_dom2 = require("react-dom");
|
|
3725
|
+
var import_react15 = require("react");
|
|
3726
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3478
3727
|
function ResetController() {
|
|
3479
|
-
const ctx = (0,
|
|
3728
|
+
const ctx = (0, import_react15.useContext)(AccessibilityContext);
|
|
3480
3729
|
if (!ctx) {
|
|
3481
3730
|
throw new Error(
|
|
3482
3731
|
"ResetController must be used within an <AccessibilityPlugin> provider."
|
|
3483
3732
|
);
|
|
3484
3733
|
}
|
|
3485
|
-
const actionHost = (0,
|
|
3734
|
+
const actionHost = (0, import_react15.useContext)(PanelActionsContext);
|
|
3486
3735
|
const { resetAll } = ctx;
|
|
3487
3736
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
3488
|
-
const button = /* @__PURE__ */ (0,
|
|
3489
|
-
/* @__PURE__ */ (0,
|
|
3737
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
3738
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FeatureIcon, { name: "reset" }),
|
|
3490
3739
|
strings.resetAll
|
|
3491
3740
|
] }) });
|
|
3492
3741
|
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
3493
3742
|
}
|
|
3494
3743
|
|
|
3495
3744
|
// src/core/controls/ToggleControl.tsx
|
|
3496
|
-
var
|
|
3745
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3497
3746
|
function ToggleControl({
|
|
3498
3747
|
id,
|
|
3499
3748
|
label,
|
|
@@ -3515,12 +3764,12 @@ function ToggleControl({
|
|
|
3515
3764
|
onChange(!checked);
|
|
3516
3765
|
}
|
|
3517
3766
|
};
|
|
3518
|
-
return /* @__PURE__ */ (0,
|
|
3767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3519
3768
|
"div",
|
|
3520
3769
|
{
|
|
3521
3770
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3522
3771
|
style,
|
|
3523
|
-
children: /* @__PURE__ */ (0,
|
|
3772
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3524
3773
|
"button",
|
|
3525
3774
|
{
|
|
3526
3775
|
id,
|
|
@@ -3534,7 +3783,7 @@ function ToggleControl({
|
|
|
3534
3783
|
disabled: !isInteractive,
|
|
3535
3784
|
onClick: handleClick,
|
|
3536
3785
|
title: unavailableReason || description || toggleLabel,
|
|
3537
|
-
children: /* @__PURE__ */ (0,
|
|
3786
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3538
3787
|
"span",
|
|
3539
3788
|
{
|
|
3540
3789
|
className: "arap-toggle-knob",
|
|
@@ -3550,8 +3799,8 @@ function ToggleControl({
|
|
|
3550
3799
|
}
|
|
3551
3800
|
|
|
3552
3801
|
// src/core/controls/ChoiceControl.tsx
|
|
3553
|
-
var
|
|
3554
|
-
var
|
|
3802
|
+
var import_react16 = require("react");
|
|
3803
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3555
3804
|
function ChoiceControl({
|
|
3556
3805
|
id,
|
|
3557
3806
|
label,
|
|
@@ -3565,12 +3814,12 @@ function ChoiceControl({
|
|
|
3565
3814
|
style,
|
|
3566
3815
|
orientation = "horizontal"
|
|
3567
3816
|
}) {
|
|
3568
|
-
const containerRef = (0,
|
|
3569
|
-
const allOptions = (0,
|
|
3817
|
+
const containerRef = (0, import_react16.useRef)(null);
|
|
3818
|
+
const allOptions = (0, import_react16.useMemo)(
|
|
3570
3819
|
() => groups ? groups.flatMap((g) => g.options) : options || [],
|
|
3571
3820
|
[groups, options]
|
|
3572
3821
|
);
|
|
3573
|
-
const handleKeyDown = (0,
|
|
3822
|
+
const handleKeyDown = (0, import_react16.useCallback)(
|
|
3574
3823
|
(e) => {
|
|
3575
3824
|
if (disabled || allOptions.length === 0) return;
|
|
3576
3825
|
const enabledOptions = allOptions.filter((opt) => !opt.disabled);
|
|
@@ -3607,7 +3856,7 @@ function ChoiceControl({
|
|
|
3607
3856
|
const renderOptionButton = (opt) => {
|
|
3608
3857
|
const isSelected = value === opt.value;
|
|
3609
3858
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
3610
|
-
return /* @__PURE__ */ (0,
|
|
3859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3611
3860
|
"button",
|
|
3612
3861
|
{
|
|
3613
3862
|
type: "button",
|
|
@@ -3621,15 +3870,15 @@ function ChoiceControl({
|
|
|
3621
3870
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
3622
3871
|
title: opt.description,
|
|
3623
3872
|
children: [
|
|
3624
|
-
isSelected && /* @__PURE__ */ (0,
|
|
3625
|
-
/* @__PURE__ */ (0,
|
|
3626
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
3873
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3874
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: opt.label }),
|
|
3875
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
3627
3876
|
]
|
|
3628
3877
|
},
|
|
3629
3878
|
String(opt.value)
|
|
3630
3879
|
);
|
|
3631
3880
|
};
|
|
3632
|
-
return /* @__PURE__ */ (0,
|
|
3881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3633
3882
|
"div",
|
|
3634
3883
|
{
|
|
3635
3884
|
ref: containerRef,
|
|
@@ -3640,15 +3889,15 @@ function ChoiceControl({
|
|
|
3640
3889
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3641
3890
|
style,
|
|
3642
3891
|
onKeyDown: handleKeyDown,
|
|
3643
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
3892
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3644
3893
|
"div",
|
|
3645
3894
|
{
|
|
3646
3895
|
className: "arap-choice-group",
|
|
3647
3896
|
role: "group",
|
|
3648
3897
|
"aria-label": group.label,
|
|
3649
3898
|
children: [
|
|
3650
|
-
/* @__PURE__ */ (0,
|
|
3651
|
-
/* @__PURE__ */ (0,
|
|
3899
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
3900
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
3652
3901
|
]
|
|
3653
3902
|
},
|
|
3654
3903
|
group.label
|
|
@@ -3658,7 +3907,7 @@ function ChoiceControl({
|
|
|
3658
3907
|
}
|
|
3659
3908
|
|
|
3660
3909
|
// src/core/controls/StepperControl.tsx
|
|
3661
|
-
var
|
|
3910
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3662
3911
|
function StepperControl({
|
|
3663
3912
|
id,
|
|
3664
3913
|
label,
|
|
@@ -3688,15 +3937,15 @@ function StepperControl({
|
|
|
3688
3937
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
3689
3938
|
}
|
|
3690
3939
|
};
|
|
3691
|
-
return /* @__PURE__ */ (0,
|
|
3940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3692
3941
|
"div",
|
|
3693
3942
|
{
|
|
3694
3943
|
id,
|
|
3695
3944
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3696
3945
|
style,
|
|
3697
3946
|
children: [
|
|
3698
|
-
/* @__PURE__ */ (0,
|
|
3699
|
-
/* @__PURE__ */ (0,
|
|
3947
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-controls", children: [
|
|
3948
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3700
3949
|
"button",
|
|
3701
3950
|
{
|
|
3702
3951
|
type: "button",
|
|
@@ -3707,8 +3956,8 @@ function StepperControl({
|
|
|
3707
3956
|
children: "\u2212"
|
|
3708
3957
|
}
|
|
3709
3958
|
),
|
|
3710
|
-
/* @__PURE__ */ (0,
|
|
3711
|
-
/* @__PURE__ */ (0,
|
|
3959
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
3960
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3712
3961
|
"button",
|
|
3713
3962
|
{
|
|
3714
3963
|
type: "button",
|
|
@@ -3720,7 +3969,7 @@ function StepperControl({
|
|
|
3720
3969
|
}
|
|
3721
3970
|
)
|
|
3722
3971
|
] }),
|
|
3723
|
-
showSlider && /* @__PURE__ */ (0,
|
|
3972
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3724
3973
|
"input",
|
|
3725
3974
|
{
|
|
3726
3975
|
type: "range",
|
|
@@ -3744,7 +3993,7 @@ function StepperControl({
|
|
|
3744
3993
|
}
|
|
3745
3994
|
|
|
3746
3995
|
// src/core/controls/FeatureCard.tsx
|
|
3747
|
-
var
|
|
3996
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3748
3997
|
function FeatureCard({
|
|
3749
3998
|
id,
|
|
3750
3999
|
featureKey,
|
|
@@ -3763,7 +4012,7 @@ function FeatureCard({
|
|
|
3763
4012
|
largeControls = false
|
|
3764
4013
|
}) {
|
|
3765
4014
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
3766
|
-
return /* @__PURE__ */ (0,
|
|
4015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
3767
4016
|
"div",
|
|
3768
4017
|
{
|
|
3769
4018
|
id,
|
|
@@ -3772,27 +4021,27 @@ function FeatureCard({
|
|
|
3772
4021
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3773
4022
|
style,
|
|
3774
4023
|
children: [
|
|
3775
|
-
/* @__PURE__ */ (0,
|
|
3776
|
-
/* @__PURE__ */ (0,
|
|
3777
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
3778
|
-
/* @__PURE__ */ (0,
|
|
4024
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-card-header", children: [
|
|
4025
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "arap-label", children: [
|
|
4026
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
4027
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-card-title", children: title })
|
|
3779
4028
|
] }),
|
|
3780
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
4029
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
3781
4030
|
] }),
|
|
3782
|
-
description && /* @__PURE__ */ (0,
|
|
3783
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
3784
|
-
/* @__PURE__ */ (0,
|
|
3785
|
-
/* @__PURE__ */ (0,
|
|
4031
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
4032
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
4033
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
4034
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: errorMessage })
|
|
3786
4035
|
] }),
|
|
3787
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
3788
|
-
/* @__PURE__ */ (0,
|
|
3789
|
-
/* @__PURE__ */ (0,
|
|
4036
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
4037
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
4038
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: unavailableMessage })
|
|
3790
4039
|
] }),
|
|
3791
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
3792
|
-
/* @__PURE__ */ (0,
|
|
3793
|
-
/* @__PURE__ */ (0,
|
|
3794
|
-
/* @__PURE__ */ (0,
|
|
3795
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
4040
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
4041
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
4042
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-permission-content", children: [
|
|
4043
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: permissionMessage }),
|
|
4044
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3796
4045
|
"button",
|
|
3797
4046
|
{
|
|
3798
4047
|
type: "button",
|
|
@@ -3803,14 +4052,14 @@ function FeatureCard({
|
|
|
3803
4052
|
)
|
|
3804
4053
|
] })
|
|
3805
4054
|
] }),
|
|
3806
|
-
/* @__PURE__ */ (0,
|
|
4055
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "arap-card-content", children })
|
|
3807
4056
|
]
|
|
3808
4057
|
}
|
|
3809
4058
|
);
|
|
3810
4059
|
}
|
|
3811
4060
|
|
|
3812
4061
|
// src/core/controls/FeatureStatusState.tsx
|
|
3813
|
-
var
|
|
4062
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3814
4063
|
function SearchCount({
|
|
3815
4064
|
totalCount,
|
|
3816
4065
|
matchedCount,
|
|
@@ -3819,7 +4068,7 @@ function SearchCount({
|
|
|
3819
4068
|
style
|
|
3820
4069
|
}) {
|
|
3821
4070
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
3822
|
-
return /* @__PURE__ */ (0,
|
|
4071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3823
4072
|
"div",
|
|
3824
4073
|
{
|
|
3825
4074
|
role: "status",
|
|
@@ -3839,17 +4088,17 @@ function EmptyState({
|
|
|
3839
4088
|
className = "",
|
|
3840
4089
|
style
|
|
3841
4090
|
}) {
|
|
3842
|
-
return /* @__PURE__ */ (0,
|
|
4091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3843
4092
|
"div",
|
|
3844
4093
|
{
|
|
3845
4094
|
role: "status",
|
|
3846
4095
|
className: `arap-empty-state ${className}`,
|
|
3847
4096
|
style,
|
|
3848
4097
|
children: [
|
|
3849
|
-
/* @__PURE__ */ (0,
|
|
3850
|
-
/* @__PURE__ */ (0,
|
|
3851
|
-
/* @__PURE__ */ (0,
|
|
3852
|
-
onAction && /* @__PURE__ */ (0,
|
|
4098
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
4099
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "arap-empty-title", children: title }),
|
|
4100
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "arap-empty-desc", children: description }),
|
|
4101
|
+
onAction && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
3853
4102
|
]
|
|
3854
4103
|
}
|
|
3855
4104
|
);
|
|
@@ -3862,18 +4111,18 @@ function ErrorState({
|
|
|
3862
4111
|
className = "",
|
|
3863
4112
|
style
|
|
3864
4113
|
}) {
|
|
3865
|
-
return /* @__PURE__ */ (0,
|
|
4114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3866
4115
|
"div",
|
|
3867
4116
|
{
|
|
3868
4117
|
role: "alert",
|
|
3869
4118
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
3870
4119
|
style,
|
|
3871
4120
|
children: [
|
|
3872
|
-
/* @__PURE__ */ (0,
|
|
3873
|
-
/* @__PURE__ */ (0,
|
|
3874
|
-
title && /* @__PURE__ */ (0,
|
|
3875
|
-
/* @__PURE__ */ (0,
|
|
3876
|
-
onRetry && /* @__PURE__ */ (0,
|
|
4121
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
4122
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-error-content", children: [
|
|
4123
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
4124
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "arap-error-message", children: message }),
|
|
4125
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
3877
4126
|
] })
|
|
3878
4127
|
]
|
|
3879
4128
|
}
|
|
@@ -3881,7 +4130,7 @@ function ErrorState({
|
|
|
3881
4130
|
}
|
|
3882
4131
|
|
|
3883
4132
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
3884
|
-
var
|
|
4133
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3885
4134
|
function ProfilePreviewCard({
|
|
3886
4135
|
profile,
|
|
3887
4136
|
isActive,
|
|
@@ -3931,7 +4180,7 @@ function ProfilePreviewCard({
|
|
|
3931
4180
|
if (val === null || val === void 0) return "Original";
|
|
3932
4181
|
return String(val);
|
|
3933
4182
|
};
|
|
3934
|
-
return /* @__PURE__ */ (0,
|
|
4183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3935
4184
|
"div",
|
|
3936
4185
|
{
|
|
3937
4186
|
role: "group",
|
|
@@ -3939,10 +4188,10 @@ function ProfilePreviewCard({
|
|
|
3939
4188
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3940
4189
|
style,
|
|
3941
4190
|
children: [
|
|
3942
|
-
/* @__PURE__ */ (0,
|
|
3943
|
-
/* @__PURE__ */ (0,
|
|
3944
|
-
/* @__PURE__ */ (0,
|
|
3945
|
-
isActive && /* @__PURE__ */ (0,
|
|
4191
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "arap-profile-header", children: [
|
|
4192
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
4193
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
4194
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3946
4195
|
"span",
|
|
3947
4196
|
{
|
|
3948
4197
|
className: "arap-profile-active-badge",
|
|
@@ -3951,14 +4200,14 @@ function ProfilePreviewCard({
|
|
|
3951
4200
|
}
|
|
3952
4201
|
)
|
|
3953
4202
|
] }),
|
|
3954
|
-
/* @__PURE__ */ (0,
|
|
4203
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
3955
4204
|
] }),
|
|
3956
|
-
/* @__PURE__ */ (0,
|
|
3957
|
-
/* @__PURE__ */ (0,
|
|
3958
|
-
/* @__PURE__ */ (0,
|
|
4205
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
4206
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
4207
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
3959
4208
|
const val = profile.settings[key];
|
|
3960
|
-
return /* @__PURE__ */ (0,
|
|
3961
|
-
/* @__PURE__ */ (0,
|
|
4209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
4210
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("strong", { children: [
|
|
3962
4211
|
formatKeyName(key),
|
|
3963
4212
|
":"
|
|
3964
4213
|
] }),
|
|
@@ -3967,7 +4216,7 @@ function ProfilePreviewCard({
|
|
|
3967
4216
|
] }, key);
|
|
3968
4217
|
}) })
|
|
3969
4218
|
] }),
|
|
3970
|
-
/* @__PURE__ */ (0,
|
|
4219
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3971
4220
|
"button",
|
|
3972
4221
|
{
|
|
3973
4222
|
type: "button",
|
|
@@ -3976,7 +4225,7 @@ function ProfilePreviewCard({
|
|
|
3976
4225
|
"aria-label": `Revert ${profile.label} profile`,
|
|
3977
4226
|
children: "Revert to custom settings"
|
|
3978
4227
|
}
|
|
3979
|
-
) : /* @__PURE__ */ (0,
|
|
4228
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3980
4229
|
"button",
|
|
3981
4230
|
{
|
|
3982
4231
|
type: "button",
|
|
@@ -4014,6 +4263,7 @@ function ProfilePreviewCard({
|
|
|
4014
4263
|
FontFamilyController,
|
|
4015
4264
|
FontSizeController,
|
|
4016
4265
|
GrayscaleController,
|
|
4266
|
+
HideDecorativeImagesController,
|
|
4017
4267
|
HideImagesController,
|
|
4018
4268
|
HideVideosController,
|
|
4019
4269
|
HighlightFocusController,
|
|
@@ -4029,6 +4279,7 @@ function ProfilePreviewCard({
|
|
|
4029
4279
|
ProfilePreviewCard,
|
|
4030
4280
|
ReadingGuideController,
|
|
4031
4281
|
ReadingMaskController,
|
|
4282
|
+
ReduceMotionController,
|
|
4032
4283
|
ResetController,
|
|
4033
4284
|
SaturationController,
|
|
4034
4285
|
SearchCount,
|
|
@@ -4046,12 +4297,15 @@ function ProfilePreviewCard({
|
|
|
4046
4297
|
enLocale,
|
|
4047
4298
|
findMainLandmark,
|
|
4048
4299
|
getScriptSpacingConstraints,
|
|
4300
|
+
isEligibleDecorativeImage,
|
|
4049
4301
|
isForcedColorsActive,
|
|
4302
|
+
isFunctionalOrMeaningfulImage,
|
|
4050
4303
|
isProtectedFromContrast,
|
|
4051
4304
|
isProtectedFromFontFamily,
|
|
4052
4305
|
isProtectedFromTextAlign,
|
|
4053
4306
|
isProtectedFromTextScale,
|
|
4054
4307
|
isProtectedFromTextSpacing,
|
|
4308
|
+
isReducedMotionActive,
|
|
4055
4309
|
isRtlLocale,
|
|
4056
4310
|
normalizePreferenceValue,
|
|
4057
4311
|
normalizePreferences,
|
|
@@ -4059,6 +4313,8 @@ function ProfilePreviewCard({
|
|
|
4059
4313
|
registerLocale,
|
|
4060
4314
|
resolveEffectivePreferences,
|
|
4061
4315
|
resolveLocaleStrings,
|
|
4316
|
+
subscribeForcedColors,
|
|
4317
|
+
subscribeReducedMotion,
|
|
4062
4318
|
useAccessibility
|
|
4063
4319
|
});
|
|
4064
4320
|
//# sourceMappingURL=index.js.map
|