accessibility-plugin-react 2.13.0 → 2.17.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 +26 -22
- package/dist/index.d.mts +269 -6
- package/dist/index.d.ts +269 -6
- package/dist/index.js +2476 -316
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2473 -346
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +371 -1
- package/docs/API.md +7 -4
- package/docs/BUILD_AND_RELEASE_PLAN.md +4 -4
- package/docs/FEATURES.md +30 -26
- package/docs/LOCALES.md +149 -0
- package/docs/PAGE_NAVIGATOR.md +90 -0
- package/docs/PRESETS.md +134 -0
- package/docs/PROFILES.md +113 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22,10 +22,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
// src/index.ts
|
|
23
23
|
var index_exports = {};
|
|
24
24
|
__export(index_exports, {
|
|
25
|
+
ALLOWED_PREFERENCE_KEYS: () => ALLOWED_PREFERENCE_KEYS,
|
|
26
|
+
ALL_PROFILE_IDS: () => ALL_PROFILE_IDS,
|
|
25
27
|
AccessibilityButton: () => AccessibilityButton,
|
|
26
28
|
AccessibilityContext: () => AccessibilityContext,
|
|
27
29
|
AccessibilityList: () => AccessibilityList,
|
|
28
30
|
AccessibilityPlugin: () => AccessibilityPlugin,
|
|
31
|
+
AccessibilityProfilesController: () => AccessibilityProfilesController,
|
|
29
32
|
AccessibleTooltipsController: () => AccessibleTooltipsController,
|
|
30
33
|
BigCursorController: () => BigCursorController,
|
|
31
34
|
CONTRAST_MODES: () => CONTRAST_MODES,
|
|
@@ -34,6 +37,7 @@ __export(index_exports, {
|
|
|
34
37
|
ChoiceControl: () => ChoiceControl,
|
|
35
38
|
ContrastController: () => ContrastController,
|
|
36
39
|
ContrastModeController: () => ContrastModeController,
|
|
40
|
+
CustomPresetsController: () => CustomPresetsController,
|
|
37
41
|
DEFAULT_PREFERENCES: () => DEFAULT_PREFERENCES,
|
|
38
42
|
DEFAULT_READING_MASK_HEIGHT: () => DEFAULT_READING_MASK_HEIGHT,
|
|
39
43
|
DYSLEXIA_FONT_STACK: () => DYSLEXIA_FONT_STACK,
|
|
@@ -46,6 +50,7 @@ __export(index_exports, {
|
|
|
46
50
|
FontFamilyController: () => FontFamilyController,
|
|
47
51
|
FontSizeController: () => FontSizeController,
|
|
48
52
|
GrayscaleController: () => GrayscaleController,
|
|
53
|
+
HeadingsNavigatorController: () => HeadingsNavigatorController,
|
|
49
54
|
HideDecorativeImagesController: () => HideDecorativeImagesController,
|
|
50
55
|
HideImagesController: () => HideImagesController,
|
|
51
56
|
HideVideosController: () => HideVideosController,
|
|
@@ -60,8 +65,14 @@ __export(index_exports, {
|
|
|
60
65
|
MAX_READING_MASK_HEIGHT: () => MAX_READING_MASK_HEIGHT,
|
|
61
66
|
MIN_READING_MASK_HEIGHT: () => MIN_READING_MASK_HEIGHT,
|
|
62
67
|
PROFILE_DEFINITIONS: () => PROFILE_DEFINITIONS,
|
|
68
|
+
PageNavigatorController: () => PageNavigatorController,
|
|
69
|
+
PageStructureController: () => PageStructureController,
|
|
63
70
|
ParagraphSpacingController: () => ParagraphSpacingController,
|
|
71
|
+
PresetsBackupController: () => PresetsBackupController,
|
|
72
|
+
PresetsController: () => PresetsController,
|
|
73
|
+
ProfileController: () => ProfileController,
|
|
64
74
|
ProfilePreviewCard: () => ProfilePreviewCard,
|
|
75
|
+
ProfilesController: () => ProfilesController,
|
|
65
76
|
READING_MASK_HEIGHT_PRESETS: () => READING_MASK_HEIGHT_PRESETS,
|
|
66
77
|
ReadingGuideController: () => ReadingGuideController,
|
|
67
78
|
ReadingMaskController: () => ReadingMaskController,
|
|
@@ -69,6 +80,7 @@ __export(index_exports, {
|
|
|
69
80
|
ResetController: () => ResetController,
|
|
70
81
|
SaturationController: () => SaturationController,
|
|
71
82
|
SearchCount: () => SearchCount,
|
|
83
|
+
SettingsImportExportController: () => SettingsImportExportController,
|
|
72
84
|
SkipToMainLink: () => SkipToMainLink,
|
|
73
85
|
StepperControl: () => StepperControl,
|
|
74
86
|
TEXT_ALIGN_BLOCK_SELECTOR: () => TEXT_ALIGN_BLOCK_SELECTOR,
|
|
@@ -80,11 +92,17 @@ __export(index_exports, {
|
|
|
80
92
|
ToggleControl: () => ToggleControl,
|
|
81
93
|
TooltipsController: () => TooltipsController,
|
|
82
94
|
WordSpacingController: () => WordSpacingController,
|
|
95
|
+
applyCustomPresetToStore: () => applyCustomPresetToStore,
|
|
96
|
+
applyProfileToStore: () => applyProfileToStore,
|
|
97
|
+
createCustomPreset: () => createCustomPreset,
|
|
83
98
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
99
|
+
downloadJsonFile: () => downloadJsonFile,
|
|
84
100
|
enLocale: () => enLocale,
|
|
85
101
|
enableAccessibleTooltips: () => enableAccessibleTooltips,
|
|
102
|
+
exportPresetsToJson: () => exportPresetsToJson,
|
|
86
103
|
findMainLandmark: () => findMainLandmark,
|
|
87
104
|
getAuthoredDescription: () => getAuthoredDescription,
|
|
105
|
+
getProfileDefinition: () => getProfileDefinition,
|
|
88
106
|
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
89
107
|
hasFinePointer: () => hasFinePointer,
|
|
90
108
|
isEligibleDecorativeImage: () => isEligibleDecorativeImage,
|
|
@@ -97,18 +115,33 @@ __export(index_exports, {
|
|
|
97
115
|
isProtectedFromTextSpacing: () => isProtectedFromTextSpacing,
|
|
98
116
|
isReducedMotionActive: () => isReducedMotionActive,
|
|
99
117
|
isRtlLocale: () => isRtlLocale,
|
|
118
|
+
isValidCustomPreset: () => isValidCustomPreset,
|
|
119
|
+
mapFeaturesToProfileSettings: () => mapFeaturesToProfileSettings,
|
|
120
|
+
mapProfileSettingsToFeatures: () => mapProfileSettingsToFeatures,
|
|
121
|
+
navigateToElement: () => navigateToElement,
|
|
100
122
|
normalizePreferenceValue: () => normalizePreferenceValue,
|
|
101
123
|
normalizePreferences: () => normalizePreferences,
|
|
102
124
|
nudgeReadingAid: () => nudgeReadingAid,
|
|
103
125
|
positionTooltip: () => positionTooltip,
|
|
104
126
|
preferencesReducer: () => preferencesReducer,
|
|
127
|
+
recordProfileOverride: () => recordProfileOverride,
|
|
105
128
|
registerLocale: () => registerLocale,
|
|
106
129
|
resolveEffectivePreferences: () => resolveEffectivePreferences,
|
|
107
130
|
resolveLocaleStrings: () => resolveLocaleStrings,
|
|
131
|
+
revertProfileFromStore: () => revertProfileFromStore,
|
|
132
|
+
sanitizePreferences: () => sanitizePreferences,
|
|
133
|
+
scanHeadings: () => scanHeadings,
|
|
134
|
+
scanLandmarks: () => scanLandmarks,
|
|
135
|
+
siLocale: () => siLocale,
|
|
108
136
|
subscribeFinePointer: () => subscribeFinePointer,
|
|
109
137
|
subscribeForcedColors: () => subscribeForcedColors,
|
|
138
|
+
subscribePageStructure: () => subscribePageStructure,
|
|
110
139
|
subscribeReducedMotion: () => subscribeReducedMotion,
|
|
111
|
-
|
|
140
|
+
taLocale: () => taLocale,
|
|
141
|
+
useAccessibility: () => useAccessibility,
|
|
142
|
+
usePresets: () => usePresets,
|
|
143
|
+
useProfiles: () => useProfiles,
|
|
144
|
+
validateAndParseImport: () => validateAndParseImport
|
|
112
145
|
});
|
|
113
146
|
module.exports = __toCommonJS(index_exports);
|
|
114
147
|
|
|
@@ -135,7 +168,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
135
168
|
}
|
|
136
169
|
|
|
137
170
|
// src/styles/tailwind.css
|
|
138
|
-
styleInject('.arap-root {\n --arap-surface: #fff;\n --arap-text: #111827;\n --arap-muted: #475569;\n --arap-border: #cbd5e1;\n --arap-divider: #e2e8f0;\n --arap-accent: #1d4ed8;\n --arap-accent-hover: #1e40af;\n --arap-selected: #eff6ff;\n --arap-control: #f8fafc;\n color-scheme: light;\n font: 15px/1.5 system-ui, sans-serif;\n color: var(--arap-text);\n text-align: left;\n letter-spacing: normal;\n}\n.arap-root *,\n.arap-root *::before,\n.arap-root *::after {\n box-sizing: border-box;\n}\n.arap-root button {\n font: inherit;\n cursor: pointer;\n color: inherit;\n text-transform: none;\n letter-spacing: normal;\n transition: background-color 0.15s, border-color 0.15s;\n}\n.arap-root button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.arap-root button:focus-visible,\n.arap-panel:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 3px;\n}\n.arap-root .arap-btn {\n position: fixed;\n z-index: 2147483001;\n bottom: max(16px, env(safe-area-inset-bottom));\n right: max(16px, env(safe-area-inset-right));\n width: 56px;\n height: 56px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--arap-surface);\n border-radius: 50%;\n background: var(--arap-accent);\n color: #fff;\n box-shadow: 0 4px 12px #0f172a26, 0 10px 24px #0f172a14;\n}\n.arap-root .arap-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-root .arap-btn[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-position=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-panel {\n position: fixed;\n z-index: 2147483000;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n right: max(16px, env(safe-area-inset-right));\n width: min(400px, calc(100vw - 32px));\n max-height: calc(100vh - 120px);\n max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 20px;\n border: 1px solid var(--arap-divider);\n border-radius: 16px;\n background: var(--arap-surface);\n box-shadow: 0 8px 16px #0f172a0d, 0 20px 48px #0f172a1a;\n}\n.arap-root .arap-panel[hidden] {\n display: none !important;\n}\n.arap-root .arap-panel[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-panel[data-position=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-heading {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n padding-bottom: 18px;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-heading-copy {\n min-width: 0;\n}\n.arap-heading h2 {\n margin: 0;\n font: 700 22px/1.3 system-ui, sans-serif;\n letter-spacing: -0.025em;\n color: var(--arap-text);\n overflow-wrap: anywhere;\n}\n.arap-description {\n margin: 6px 0 0;\n color: var(--arap-muted);\n font: 14px/1.5 system-ui, sans-serif;\n overflow-wrap: anywhere;\n}\n.arap-heading button {\n flex: none;\n width: 44px;\n height: 44px;\n margin-top: -6px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--arap-muted);\n font-size: 28px;\n line-height: 1;\n}\n.arap-heading button:hover {\n background: var(--arap-control);\n border-color: var(--arap-border);\n}\n.arap-feature {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px 12px;\n padding: 18px 0;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-feature:last-child {\n border: 0;\n padding-bottom: 0;\n}\n.arap-label {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.arap-icon {\n flex: none;\n width: 22px;\n height: 22px;\n display: inline-block;\n vertical-align: middle;\n}\n.arap-controls {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--arap-border);\n border-radius: 9px;\n overflow: hidden;\n background: var(--arap-control);\n}\n.arap-root .arap-btn-sm {\n flex: none;\n width: 44px;\n height: 44px;\n border: 0;\n border-radius: 0;\n background: transparent;\n font-size: 22px;\n}\n.arap-root .arap-btn-sm:hover:not(:disabled) {\n background: var(--arap-selected);\n color: var(--arap-accent);\n}\n.arap-root .arap-controls button:focus-visible {\n outline-offset: -4px;\n}\n.arap-value {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 56px;\n padding: 0 6px;\n text-align: center;\n font-weight: 600;\n border-inline: 1px solid var(--arap-divider);\n background: var(--arap-surface);\n}\n.arap-segmented {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.arap-root .arap-segment {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-muted);\n overflow-wrap: anywhere;\n}\n.arap-root .arap-segment:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-root .arap-segment-active {\n background: var(--arap-accent);\n color: #fff;\n border-color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-segment-active:hover {\n background: var(--arap-accent-hover);\n color: #fff;\n}\n.arap-check {\n flex: none;\n font-size: 15px;\n line-height: 1;\n}\n.arap-root .arap-toggle {\n position: relative;\n width: 56px;\n height: 44px;\n padding: 0;\n border: 0;\n border-radius: 10px;\n background: transparent;\n}\n.arap-toggle::before {\n content: "";\n position: absolute;\n inset: 6px 0;\n border: 2px solid #64748b;\n border-radius: 20px;\n background: #e2e8f0;\n}\n.arap-toggle-knob {\n position: absolute;\n top: 10px;\n left: 4px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: #475569;\n pointer-events: none;\n transition: transform 0.15s;\n}\n.arap-toggle-active::before {\n background: var(--arap-accent);\n border-color: var(--arap-accent);\n}\n.arap-toggle-active .arap-toggle-knob {\n transform: translateX(24px);\n background: #fff;\n}\n.arap-toggle-active .arap-toggle-knob::after {\n content: "\\2713";\n display: block;\n color: var(--arap-accent);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n text-align: center;\n}\n.arap-root .arap-toggle:hover::before {\n border-color: var(--arap-accent);\n}\n.arap-feature-reset {\n display: block;\n}\n.arap-root .arap-reset-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 10px;\n border: 1px solid var(--arap-border);\n border-radius: 10px;\n background: var(--arap-control);\n color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-reset-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n@media (max-width: 380px) {\n .arap-root .arap-panel {\n padding: 16px;\n }\n .arap-heading h2 {\n font-size: 20px;\n }\n .arap-feature-stepper {\n grid-template-columns: minmax(0, 1fr);\n }\n .arap-controls {\n width: 100%;\n }\n .arap-value {\n flex: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-root *,\n .arap-root *::before,\n .arap-root *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .arap-root {\n --arap-surface: Canvas;\n --arap-text: CanvasText;\n --arap-muted: CanvasText;\n --arap-border: ButtonText;\n --arap-divider: ButtonText;\n --arap-accent: Highlight;\n --arap-control: Canvas;\n --arap-selected: Canvas;\n }\n .arap-root button[aria-pressed=true] {\n outline: 2px solid Highlight;\n outline-offset: -4px;\n }\n .arap-root .arap-segment-active {\n color: HighlightText;\n background: Highlight;\n }\n .arap-toggle::before {\n border-color: ButtonText;\n background: Canvas;\n }\n .arap-toggle-knob {\n background: ButtonText;\n }\n .arap-toggle-active .arap-toggle-knob {\n background: Highlight;\n }\n .arap-toggle-active .arap-toggle-knob::after {\n color: HighlightText;\n }\n}\n.arap-root .arap-panel {\n display: flex;\n flex-direction: column;\n overflow: visible;\n}\n.arap-heading {\n flex: none;\n}\n.arap-tools {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 0 3px;\n margin: 0 -3px;\n}\n.arap-tools:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: -3px;\n}\n.arap-quick-actions {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 14px;\n margin-top: 8px;\n border-top: 1px solid var(--arap-divider);\n}\n.arap-actions {\n flex: 1;\n min-width: 0;\n}\n.arap-actions:empty {\n display: none;\n}\n.arap-actions .arap-feature-reset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n.arap-root .arap-position-button,\n.arap-root .arap-position-default,\n.arap-root .arap-position-arrows button {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-accent);\n}\n.arap-root .arap-position-button:hover,\n.arap-root .arap-position-default:hover,\n.arap-root .arap-position-arrows button:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-position-popover {\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 0;\n width: 100%;\n max-height: calc(100dvh - 160px);\n overflow: auto;\n padding: 14px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n box-shadow: 0 8px 24px #0f172a26;\n}\n.arap-position-popover[hidden] {\n display: none !important;\n}\n.arap-position-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.arap-position-popover select {\n width: 100%;\n min-height: 44px;\n padding: 8px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n font: inherit;\n color: var(--arap-text);\n background: var(--arap-surface);\n}\n.arap-position-popover select:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-position-arrows {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 10px;\n}\n.arap-position-default {\n width: 100%;\n margin-top: 8px;\n}\n.arap-root .arap-btn[data-draggable=true] {\n touch-action: none;\n user-select: none;\n cursor: grab;\n}\n.arap-root .arap-btn[data-dragging=true] {\n cursor: grabbing;\n}\n.arap-root .arap-btn[data-corner$=left],\n.arap-root .arap-panel[data-corner$=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-corner$=right],\n.arap-root .arap-panel[data-corner$=right] {\n left: auto;\n right: max(16px, env(safe-area-inset-right));\n}\n.arap-root .arap-btn[data-corner^=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-btn[data-corner^=bottom] {\n top: auto;\n bottom: max(16px, env(safe-area-inset-bottom));\n}\n.arap-root .arap-panel[data-corner^=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-root .arap-panel[data-corner^=bottom] {\n top: auto;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n}\n.arap-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.arap-root .arap-skip-actions {\n position: absolute;\n top: 12px;\n left: 20px;\n width: 44px;\n height: 44px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n}\n.arap-root .arap-skip-actions:focus-visible {\n right: 20px;\n width: auto;\n height: auto;\n min-height: 44px;\n clip-path: none;\n pointer-events: auto;\n z-index: 2;\n padding: 8px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-accent);\n}\n.arap-skip-to-main {\n position: fixed;\n top: 12px;\n left: 16px;\n z-index: 2147483647;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n pointer-events: none;\n font-family: inherit;\n font-size: 0.9375rem;\n font-weight: 600;\n text-decoration: none;\n color: var(--arap-accent, #008060);\n background: var(--arap-surface, #ffffff);\n border-radius: 8px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n}\n.arap-skip-to-main:focus,\n.arap-skip-to-main:focus-visible {\n width: auto;\n height: auto;\n min-height: 44px;\n margin: 0;\n padding: 10px 18px;\n clip-path: none;\n overflow: visible;\n white-space: normal;\n pointer-events: auto;\n border: 2px solid var(--arap-accent, #008060);\n outline: 3px solid var(--arap-accent, #008060);\n outline-offset: 3px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n@media (forced-colors: active) {\n .arap-skip-to-main {\n background: Canvas;\n color: CanvasText;\n border-color: Highlight;\n }\n .arap-skip-to-main:focus,\n .arap-skip-to-main:focus-visible {\n outline: 3px solid Highlight;\n }\n}\n@media (max-height: 480px) {\n .arap-root .arap-panel {\n top: max(16px, env(safe-area-inset-top)) !important;\n bottom: max(16px, env(safe-area-inset-bottom)) !important;\n max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;\n padding: 8px;\n }\n .arap-heading {\n padding-bottom: 8px;\n }\n .arap-heading h2 {\n font-size: 18px;\n }\n .arap-heading button {\n margin-top: 0;\n }\n .arap-description {\n display: none;\n }\n .arap-quick-actions {\n padding-top: 8px;\n margin-top: 0;\n }\n .arap-root .arap-reset-btn {\n min-height: 44px;\n }\n .arap-root .arap-btn[data-open=true] {\n visibility: hidden;\n }\n .arap-position-popover {\n max-height: calc(100dvh - 96px);\n }\n}\n.arap-statement {\n flex: none;\n padding-top: 10px;\n text-align: center;\n}\n.arap-statement-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 44px;\n padding: 6px 12px;\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 4px;\n font-size: 14px;\n font-weight: 500;\n border-radius: 8px;\n}\n.arap-statement-link:hover {\n color: var(--arap-accent-hover);\n background: var(--arap-selected);\n}\n.arap-statement-link:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-credits {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 2px;\n padding-top: 8px;\n color: var(--arap-muted);\n text-align: center;\n font-size: 11px;\n line-height: 1.4;\n}\n.arap-credits a {\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.arap-credits a:hover {\n color: var(--arap-accent-hover);\n}\n.arap-credits a:focus-visible {\n outline: 2px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-root .arap-btn[data-large-controls=true] {\n width: 64px;\n height: 64px;\n min-width: 48px;\n min-height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] {\n width: min(440px, calc(100vw - 32px));\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-heading button {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 32px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-btn-sm {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 24px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-value {\n min-width: 64px;\n font-size: 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-segment {\n min-width: 48px;\n min-height: 48px;\n padding: 10px 14px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle {\n width: 64px;\n height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle::before {\n inset: 8px 0;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-knob {\n top: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-active .arap-toggle-knob {\n transform: translateX(28px);\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-reset-btn {\n min-height: 52px;\n font-size: 16px;\n padding: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-button,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-default,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-arrows button {\n min-width: 48px;\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-popover select {\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-statement-link {\n min-height: 48px;\n font-size: 15px;\n padding: 10px 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-skip-actions {\n min-width: 48px;\n min-height: 48px;\n}\n.arap-feature-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n}\n.arap-card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-card-title {\n font-weight: 600;\n font-size: 15px;\n color: var(--arap-text);\n}\n.arap-card-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-status-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 11px;\n font-weight: 600;\n background: var(--arap-control);\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-card-alert {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 1.4;\n}\n.arap-alert-icon {\n flex: none;\n font-size: 16px;\n line-height: 1;\n}\n.arap-card-error {\n background: #fef2f2;\n border: 1px solid #fecaca;\n color: #991b1b;\n}\n.arap-card-unavailable {\n background: #f8fafc;\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n}\n.arap-card-permission {\n background: #fffbeb;\n border: 1px solid #fde68a;\n color: #92400e;\n}\n.arap-permission-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-permission-btn {\n align-self: flex-start;\n padding: 4px 10px;\n border: 1px solid #d97706;\n border-radius: 6px;\n background: #f59e0b;\n color: #fff;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n.arap-permission-btn:hover {\n background: #d97706;\n}\n.arap-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.arap-choice-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n.arap-choice-group-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-choice-badge {\n font-size: 11px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--arap-divider);\n color: var(--arap-muted);\n}\n.arap-segment-active .arap-choice-badge {\n background: rgba(255, 255, 255, 0.25);\n color: #fff;\n}\n.arap-stepper-control-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n}\n.arap-slider-container {\n display: flex;\n align-items: center;\n padding: 4px 0;\n}\n.arap-slider {\n width: 100%;\n accent-color: var(--arap-accent);\n cursor: pointer;\n}\n.arap-search-count {\n padding: 6px 0;\n font-size: 12px;\n font-weight: 500;\n color: var(--arap-muted);\n}\n.arap-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 24px 16px;\n gap: 8px;\n}\n.arap-empty-icon {\n font-size: 32px;\n}\n.arap-empty-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-empty-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n}\n.arap-empty-btn,\n.arap-retry-btn {\n margin-top: 6px;\n padding: 8px 16px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n font-weight: 500;\n font-size: 13px;\n color: var(--arap-text);\n cursor: pointer;\n}\n.arap-empty-btn:hover,\n.arap-retry-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n color: var(--arap-accent);\n}\n.arap-profile-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.arap-profile-card-active {\n border-color: var(--arap-accent);\n background: var(--arap-selected);\n box-shadow: 0 0 0 1px var(--arap-accent);\n}\n.arap-profile-header {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-profile-active-badge {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-accent);\n background: #dbeafe;\n padding: 2px 8px;\n border-radius: 9999px;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-profile-affected {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-profile-affected-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.arap-profile-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--arap-control);\n border: 1px solid var(--arap-divider);\n font-size: 12px;\n color: var(--arap-text);\n}\n.arap-profile-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n.arap-profile-apply-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-apply-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-profile-revert-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-muted);\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-revert-btn:hover {\n background: var(--arap-control);\n color: var(--arap-text);\n border-color: var(--arap-text);\n}\n.arap-notice {\n grid-column: 1 / -1;\n margin-top: 6px;\n padding: 8px 12px;\n border-radius: 8px;\n font-size: 12px;\n line-height: 1.45;\n background: #fefce8;\n border: 1px solid #fef08a;\n color: #854d0e;\n}\n.arap-notice-warning {\n background: #fffbeb;\n border-color: #fde68a;\n color: #92400e;\n}\n.arap-reading-mask {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-reading-guide {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-feature-expandable {\n flex-direction: column !important;\n align-items: stretch !important;\n}\n.arap-accessible-tooltip {\n position: fixed !important;\n z-index: 2147483646 !important;\n max-width: 320px !important;\n min-width: 48px !important;\n box-sizing: border-box !important;\n padding: 6px 12px !important;\n background: #0f172a !important;\n color: #ffffff !important;\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif !important;\n font-size: 13px !important;\n line-height: 1.4 !important;\n font-weight: 500 !important;\n border-radius: 6px !important;\n box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;\n pointer-events: auto !important;\n word-break: break-word !important;\n white-space: normal !important;\n opacity: 0 !important;\n visibility: hidden !important;\n transition: opacity 120ms ease, transform 120ms ease !important;\n transform: translateY(2px) !important;\n}\n.arap-accessible-tooltip[data-visible=true] {\n opacity: 1 !important;\n visibility: visible !important;\n transform: translateY(0) !important;\n}\n.arap-accessible-tooltip[data-placement=top] {\n transform: translateY(-2px) !important;\n}\n.arap-accessible-tooltip[data-placement=top][data-visible=true] {\n transform: translateY(0) !important;\n}\n@media (forced-colors: active) {\n .arap-accessible-tooltip {\n background: Canvas !important;\n color: CanvasText !important;\n border: 2px solid Highlight !important;\n box-shadow: none !important;\n }\n}\n');
|
|
171
|
+
styleInject('.arap-root {\n --arap-surface: #fff;\n --arap-text: #111827;\n --arap-muted: #475569;\n --arap-border: #cbd5e1;\n --arap-divider: #e2e8f0;\n --arap-accent: #1d4ed8;\n --arap-accent-hover: #1e40af;\n --arap-selected: #eff6ff;\n --arap-control: #f8fafc;\n color-scheme: light;\n font:\n 15px/1.5 system-ui,\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Noto Sans Sinhala",\n "Iskoola Pota",\n "Noto Sans Tamil",\n "Latha",\n "Nirmala UI",\n sans-serif;\n color: var(--arap-text);\n text-align: start;\n letter-spacing: normal;\n}\n.arap-root *,\n.arap-root *::before,\n.arap-root *::after {\n box-sizing: border-box;\n}\n.arap-root button {\n font: inherit;\n cursor: pointer;\n color: inherit;\n text-transform: none;\n letter-spacing: normal;\n transition: background-color 0.15s, border-color 0.15s;\n}\n.arap-root button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.arap-root button:focus-visible,\n.arap-panel:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 3px;\n}\n.arap-root .arap-btn {\n position: fixed;\n z-index: 2147483001;\n bottom: max(16px, env(safe-area-inset-bottom));\n right: max(16px, env(safe-area-inset-right));\n width: 56px;\n height: 56px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--arap-surface);\n border-radius: 50%;\n background: var(--arap-accent);\n color: #fff;\n box-shadow: 0 4px 12px #0f172a26, 0 10px 24px #0f172a14;\n}\n.arap-root .arap-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-root .arap-btn[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-position=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-panel {\n position: fixed;\n z-index: 2147483000;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n right: max(16px, env(safe-area-inset-right));\n width: min(400px, calc(100vw - 32px));\n max-height: calc(100vh - 120px);\n max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 20px;\n border: 1px solid var(--arap-divider);\n border-radius: 16px;\n background: var(--arap-surface);\n box-shadow: 0 8px 16px #0f172a0d, 0 20px 48px #0f172a1a;\n}\n.arap-root .arap-panel[hidden] {\n display: none !important;\n}\n.arap-root .arap-panel[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-panel[data-position=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-heading {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n padding-bottom: 18px;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-heading-copy {\n min-width: 0;\n}\n.arap-heading h2 {\n margin: 0;\n font: 700 22px/1.3 system-ui, sans-serif;\n letter-spacing: -0.025em;\n color: var(--arap-text);\n overflow-wrap: anywhere;\n}\n.arap-description {\n margin: 6px 0 0;\n color: var(--arap-muted);\n font: 14px/1.5 system-ui, sans-serif;\n overflow-wrap: anywhere;\n}\n.arap-heading button {\n flex: none;\n width: 44px;\n height: 44px;\n margin-top: -6px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--arap-muted);\n font-size: 28px;\n line-height: 1;\n}\n.arap-heading button:hover {\n background: var(--arap-control);\n border-color: var(--arap-border);\n}\n.arap-feature {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px 12px;\n padding: 18px 0;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-feature:last-child {\n border: 0;\n padding-bottom: 0;\n}\n.arap-label {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.arap-icon {\n flex: none;\n width: 22px;\n height: 22px;\n display: inline-block;\n vertical-align: middle;\n}\n.arap-controls {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--arap-border);\n border-radius: 9px;\n overflow: hidden;\n background: var(--arap-control);\n}\n.arap-root .arap-btn-sm {\n flex: none;\n width: 44px;\n height: 44px;\n border: 0;\n border-radius: 0;\n background: transparent;\n font-size: 22px;\n}\n.arap-root .arap-btn-sm:hover:not(:disabled) {\n background: var(--arap-selected);\n color: var(--arap-accent);\n}\n.arap-root .arap-controls button:focus-visible {\n outline-offset: -4px;\n}\n.arap-value {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 56px;\n padding: 0 6px;\n text-align: center;\n font-weight: 600;\n border-inline: 1px solid var(--arap-divider);\n background: var(--arap-surface);\n}\n.arap-segmented {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.arap-root .arap-segment {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-muted);\n overflow-wrap: anywhere;\n}\n.arap-root .arap-segment:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-root .arap-segment-active {\n background: var(--arap-accent);\n color: #fff;\n border-color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-segment-active:hover {\n background: var(--arap-accent-hover);\n color: #fff;\n}\n.arap-check {\n flex: none;\n font-size: 15px;\n line-height: 1;\n}\n.arap-root .arap-toggle {\n position: relative;\n width: 56px;\n height: 44px;\n padding: 0;\n border: 0;\n border-radius: 10px;\n background: transparent;\n}\n.arap-toggle::before {\n content: "";\n position: absolute;\n inset: 6px 0;\n border: 2px solid #64748b;\n border-radius: 20px;\n background: #e2e8f0;\n}\n.arap-toggle-knob {\n position: absolute;\n top: 10px;\n left: 4px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: #475569;\n pointer-events: none;\n transition: transform 0.15s;\n}\n.arap-toggle-active::before {\n background: var(--arap-accent);\n border-color: var(--arap-accent);\n}\n.arap-toggle-active .arap-toggle-knob {\n transform: translateX(24px);\n background: #fff;\n}\n.arap-toggle-active .arap-toggle-knob::after {\n content: "\\2713";\n display: block;\n color: var(--arap-accent);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n text-align: center;\n}\n.arap-root .arap-toggle:hover::before {\n border-color: var(--arap-accent);\n}\n.arap-feature-reset {\n display: block;\n}\n.arap-root .arap-reset-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 10px;\n border: 1px solid var(--arap-border);\n border-radius: 10px;\n background: var(--arap-control);\n color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-reset-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n@media (max-width: 380px) {\n .arap-root .arap-panel {\n padding: 16px;\n }\n .arap-heading h2 {\n font-size: 20px;\n }\n .arap-feature-stepper {\n grid-template-columns: minmax(0, 1fr);\n }\n .arap-controls {\n width: 100%;\n }\n .arap-value {\n flex: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-root *,\n .arap-root *::before,\n .arap-root *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .arap-root {\n --arap-surface: Canvas;\n --arap-text: CanvasText;\n --arap-muted: CanvasText;\n --arap-border: ButtonText;\n --arap-divider: ButtonText;\n --arap-accent: Highlight;\n --arap-control: Canvas;\n --arap-selected: Canvas;\n }\n .arap-root button[aria-pressed=true] {\n outline: 2px solid Highlight;\n outline-offset: -4px;\n }\n .arap-root .arap-segment-active {\n color: HighlightText;\n background: Highlight;\n }\n .arap-toggle::before {\n border-color: ButtonText;\n background: Canvas;\n }\n .arap-toggle-knob {\n background: ButtonText;\n }\n .arap-toggle-active .arap-toggle-knob {\n background: Highlight;\n }\n .arap-toggle-active .arap-toggle-knob::after {\n color: HighlightText;\n }\n}\n.arap-root .arap-panel {\n display: flex;\n flex-direction: column;\n overflow: visible;\n}\n.arap-heading {\n flex: none;\n}\n.arap-tools {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 0 3px;\n margin: 0 -3px;\n}\n.arap-tools:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: -3px;\n}\n.arap-quick-actions {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 14px;\n margin-top: 8px;\n border-top: 1px solid var(--arap-divider);\n}\n.arap-actions {\n flex: 1;\n min-width: 0;\n}\n.arap-actions:empty {\n display: none;\n}\n.arap-actions .arap-feature-reset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n.arap-root .arap-position-button,\n.arap-root .arap-position-default,\n.arap-root .arap-position-arrows button {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-accent);\n}\n.arap-root .arap-position-button:hover,\n.arap-root .arap-position-default:hover,\n.arap-root .arap-position-arrows button:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-position-popover {\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 0;\n width: 100%;\n max-height: calc(100dvh - 160px);\n overflow: auto;\n padding: 14px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n box-shadow: 0 8px 24px #0f172a26;\n}\n.arap-position-popover[hidden] {\n display: none !important;\n}\n.arap-position-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.arap-position-popover select {\n width: 100%;\n min-height: 44px;\n padding: 8px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n font: inherit;\n color: var(--arap-text);\n background: var(--arap-surface);\n}\n.arap-position-popover select:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-position-arrows {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 10px;\n}\n.arap-position-default {\n width: 100%;\n margin-top: 8px;\n}\n.arap-root .arap-btn[data-draggable=true] {\n touch-action: none;\n user-select: none;\n cursor: grab;\n}\n.arap-root .arap-btn[data-dragging=true] {\n cursor: grabbing;\n}\n.arap-root .arap-btn[data-corner$=left],\n.arap-root .arap-panel[data-corner$=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-corner$=right],\n.arap-root .arap-panel[data-corner$=right] {\n left: auto;\n right: max(16px, env(safe-area-inset-right));\n}\n.arap-root .arap-btn[data-corner^=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-btn[data-corner^=bottom] {\n top: auto;\n bottom: max(16px, env(safe-area-inset-bottom));\n}\n.arap-root .arap-panel[data-corner^=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-root .arap-panel[data-corner^=bottom] {\n top: auto;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n}\n.arap-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.arap-root .arap-skip-actions {\n position: absolute;\n top: 12px;\n left: 20px;\n width: 44px;\n height: 44px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n}\n.arap-root .arap-skip-actions:focus-visible {\n right: 20px;\n width: auto;\n height: auto;\n min-height: 44px;\n clip-path: none;\n pointer-events: auto;\n z-index: 2;\n padding: 8px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-accent);\n}\n.arap-skip-to-main {\n position: fixed;\n top: 12px;\n left: 16px;\n z-index: 2147483647;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n pointer-events: none;\n font-family: inherit;\n font-size: 0.9375rem;\n font-weight: 600;\n text-decoration: none;\n color: var(--arap-accent, #008060);\n background: var(--arap-surface, #ffffff);\n border-radius: 8px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n}\n.arap-skip-to-main:focus,\n.arap-skip-to-main:focus-visible {\n width: auto;\n height: auto;\n min-height: 44px;\n margin: 0;\n padding: 10px 18px;\n clip-path: none;\n overflow: visible;\n white-space: normal;\n pointer-events: auto;\n border: 2px solid var(--arap-accent, #008060);\n outline: 3px solid var(--arap-accent, #008060);\n outline-offset: 3px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n@media (forced-colors: active) {\n .arap-skip-to-main {\n background: Canvas;\n color: CanvasText;\n border-color: Highlight;\n }\n .arap-skip-to-main:focus,\n .arap-skip-to-main:focus-visible {\n outline: 3px solid Highlight;\n }\n}\n@media (max-height: 480px) {\n .arap-root .arap-panel {\n top: max(16px, env(safe-area-inset-top)) !important;\n bottom: max(16px, env(safe-area-inset-bottom)) !important;\n max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;\n padding: 8px;\n }\n .arap-heading {\n padding-bottom: 8px;\n }\n .arap-heading h2 {\n font-size: 18px;\n }\n .arap-heading button {\n margin-top: 0;\n }\n .arap-description {\n display: none;\n }\n .arap-quick-actions {\n padding-top: 8px;\n margin-top: 0;\n }\n .arap-root .arap-reset-btn {\n min-height: 44px;\n }\n .arap-root .arap-btn[data-open=true] {\n visibility: hidden;\n }\n .arap-position-popover {\n max-height: calc(100dvh - 96px);\n }\n}\n.arap-statement {\n flex: none;\n padding-top: 10px;\n text-align: center;\n}\n.arap-statement-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 44px;\n padding: 6px 12px;\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 4px;\n font-size: 14px;\n font-weight: 500;\n border-radius: 8px;\n}\n.arap-statement-link:hover {\n color: var(--arap-accent-hover);\n background: var(--arap-selected);\n}\n.arap-statement-link:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-credits {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 2px;\n padding-top: 8px;\n color: var(--arap-muted);\n text-align: center;\n font-size: 11px;\n line-height: 1.4;\n}\n.arap-credits a {\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.arap-credits a:hover {\n color: var(--arap-accent-hover);\n}\n.arap-credits a:focus-visible {\n outline: 2px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-root .arap-btn[data-large-controls=true] {\n width: 64px;\n height: 64px;\n min-width: 48px;\n min-height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] {\n width: min(440px, calc(100vw - 32px));\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-heading button {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 32px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-btn-sm {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 24px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-value {\n min-width: 64px;\n font-size: 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-segment {\n min-width: 48px;\n min-height: 48px;\n padding: 10px 14px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle {\n width: 64px;\n height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle::before {\n inset: 8px 0;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-knob {\n top: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-active .arap-toggle-knob {\n transform: translateX(28px);\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-reset-btn {\n min-height: 52px;\n font-size: 16px;\n padding: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-button,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-default,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-arrows button {\n min-width: 48px;\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-popover select {\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-statement-link {\n min-height: 48px;\n font-size: 15px;\n padding: 10px 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-skip-actions {\n min-width: 48px;\n min-height: 48px;\n}\n.arap-feature-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n}\n.arap-card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-card-title {\n font-weight: 600;\n font-size: 15px;\n color: var(--arap-text);\n}\n.arap-card-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-status-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 11px;\n font-weight: 600;\n background: var(--arap-control);\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-card-alert {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 1.4;\n}\n.arap-alert-icon {\n flex: none;\n font-size: 16px;\n line-height: 1;\n}\n.arap-card-error {\n background: #fef2f2;\n border: 1px solid #fecaca;\n color: #991b1b;\n}\n.arap-card-unavailable {\n background: #f8fafc;\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n}\n.arap-card-permission {\n background: #fffbeb;\n border: 1px solid #fde68a;\n color: #92400e;\n}\n.arap-permission-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-permission-btn {\n align-self: flex-start;\n padding: 4px 10px;\n border: 1px solid #d97706;\n border-radius: 6px;\n background: #f59e0b;\n color: #fff;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n.arap-permission-btn:hover {\n background: #d97706;\n}\n.arap-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.arap-choice-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n.arap-choice-group-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-choice-badge {\n font-size: 11px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--arap-divider);\n color: var(--arap-muted);\n}\n.arap-segment-active .arap-choice-badge {\n background: rgba(255, 255, 255, 0.25);\n color: #fff;\n}\n.arap-stepper-control-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n}\n.arap-slider-container {\n display: flex;\n align-items: center;\n padding: 4px 0;\n}\n.arap-slider {\n width: 100%;\n accent-color: var(--arap-accent);\n cursor: pointer;\n}\n.arap-search-count {\n padding: 6px 0;\n font-size: 12px;\n font-weight: 500;\n color: var(--arap-muted);\n}\n.arap-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 24px 16px;\n gap: 8px;\n}\n.arap-empty-icon {\n font-size: 32px;\n}\n.arap-empty-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-empty-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n}\n.arap-empty-btn,\n.arap-retry-btn {\n margin-top: 6px;\n padding: 8px 16px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n font-weight: 500;\n font-size: 13px;\n color: var(--arap-text);\n cursor: pointer;\n}\n.arap-empty-btn:hover,\n.arap-retry-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n color: var(--arap-accent);\n}\n.arap-profile-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.arap-profile-card-active {\n border-color: var(--arap-accent);\n background: var(--arap-selected);\n box-shadow: 0 0 0 1px var(--arap-accent);\n}\n.arap-profile-header {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-profile-active-badge {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-accent);\n background: #dbeafe;\n padding: 2px 8px;\n border-radius: 9999px;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-profile-affected {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-profile-affected-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.arap-profile-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--arap-control);\n border: 1px solid var(--arap-divider);\n font-size: 12px;\n color: var(--arap-text);\n}\n.arap-profile-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n.arap-profile-apply-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-apply-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-profile-revert-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-muted);\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-revert-btn:hover {\n background: var(--arap-control);\n color: var(--arap-text);\n border-color: var(--arap-text);\n}\n.arap-notice {\n grid-column: 1 / -1;\n margin-top: 6px;\n padding: 8px 12px;\n border-radius: 8px;\n font-size: 12px;\n line-height: 1.45;\n background: #fefce8;\n border: 1px solid #fef08a;\n color: #854d0e;\n}\n.arap-notice-warning {\n background: #fffbeb;\n border-color: #fde68a;\n color: #92400e;\n}\n.arap-reading-mask {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-reading-guide {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-feature-expandable {\n flex-direction: column !important;\n align-items: stretch !important;\n}\n.arap-accessible-tooltip {\n position: fixed !important;\n z-index: 2147483646 !important;\n max-width: 320px !important;\n min-width: 48px !important;\n box-sizing: border-box !important;\n padding: 6px 12px !important;\n background: #0f172a !important;\n color: #ffffff !important;\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif !important;\n font-size: 13px !important;\n line-height: 1.4 !important;\n font-weight: 500 !important;\n border-radius: 6px !important;\n box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;\n pointer-events: auto !important;\n word-break: break-word !important;\n white-space: normal !important;\n opacity: 0 !important;\n visibility: hidden !important;\n transition: opacity 120ms ease, transform 120ms ease !important;\n transform: translateY(2px) !important;\n}\n.arap-accessible-tooltip[data-visible=true] {\n opacity: 1 !important;\n visibility: visible !important;\n transform: translateY(0) !important;\n}\n.arap-accessible-tooltip[data-placement=top] {\n transform: translateY(-2px) !important;\n}\n.arap-accessible-tooltip[data-placement=top][data-visible=true] {\n transform: translateY(0) !important;\n}\n@media (forced-colors: active) {\n .arap-accessible-tooltip {\n background: Canvas !important;\n color: CanvasText !important;\n border: 2px solid Highlight !important;\n box-shadow: none !important;\n }\n}\n.arap-navigator-dialog {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n margin-top: 10px;\n padding: 10px;\n background: var(--arap-control, #f1f5f9);\n border: 1px solid var(--arap-border, #e2e8f0);\n border-radius: 8px;\n box-sizing: border-box;\n}\n.arap-navigator-tabs {\n display: flex;\n gap: 4px;\n border-bottom: 1px solid var(--arap-border, #cbd5e1);\n padding-bottom: 6px;\n}\n.arap-navigator-tab {\n flex: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 6px 10px;\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted, #64748b);\n background: transparent;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n transition: all 120ms ease;\n}\n.arap-navigator-tab:hover {\n color: var(--arap-text, #0f172a);\n background: rgba(0, 0, 0, 0.04);\n}\n.arap-navigator-tab-active {\n color: var(--arap-accent, #008060) !important;\n background: var(--arap-selected, #f0fdf4) !important;\n}\n.arap-navigator-search-box {\n width: 100%;\n}\n.arap-navigator-search {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 10px;\n font-size: 12px;\n border: 1px solid var(--arap-border, #cbd5e1);\n border-radius: 6px;\n background: var(--arap-surface, #ffffff);\n color: var(--arap-text, #0f172a);\n}\n.arap-navigator-search:focus {\n outline: 2px solid var(--arap-accent, #008060);\n outline-offset: 1px;\n}\n.arap-navigator-content {\n max-height: 240px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.arap-navigator-list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-navigator-item {\n margin: 0;\n padding: 0;\n}\n.arap-navigator-jump-btn {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n font-size: 12px;\n font-weight: 500;\n text-align: left;\n background: var(--arap-surface, #ffffff);\n border: 1px solid var(--arap-border, #e2e8f0);\n border-radius: 6px;\n color: var(--arap-text, #0f172a);\n cursor: pointer;\n transition: background 100ms ease, border-color 100ms ease;\n}\n.arap-navigator-jump-btn:hover,\n.arap-navigator-jump-btn:focus-visible {\n background: var(--arap-selected, #f0fdf4);\n border-color: var(--arap-accent, #008060);\n outline: 2px solid var(--arap-accent, #008060);\n outline-offset: -1px;\n}\n.arap-navigator-badge {\n display: inline-block;\n padding: 2px 6px;\n font-size: 10px;\n font-weight: 700;\n border-radius: 4px;\n flex-shrink: 0;\n}\n.arap-navigator-badge-h {\n background: #e0f2fe;\n color: #0369a1;\n}\n.arap-navigator-badge-l {\n background: #fef3c7;\n color: #b45309;\n}\n.arap-navigator-item-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.arap-navigator-empty {\n padding: 16px;\n font-size: 12px;\n text-align: center;\n color: var(--arap-muted, #64748b);\n font-style: italic;\n}\n.arap-profile-card {\n padding: 12px;\n border: 1px solid var(--arap-border, #e2e8f0);\n border-radius: 8px;\n background: var(--arap-card-bg, #ffffff);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.arap-profile-card:hover {\n border-color: var(--arap-primary, #2563eb);\n}\n.arap-profile-card-active {\n border-color: var(--arap-primary, #2563eb);\n background: rgba(37, 99, 235, 0.03);\n box-shadow: 0 0 0 1px var(--arap-primary, #2563eb);\n}\n.arap-profile-header {\n margin-bottom: 8px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 4px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--arap-text, #1e293b);\n}\n.arap-profile-active-badge {\n display: inline-block;\n padding: 2px 8px;\n font-size: 11px;\n font-weight: 600;\n border-radius: 9999px;\n background: #dbeafe;\n color: #1d4ed8;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 11px;\n color: var(--arap-muted, #64748b);\n line-height: 1.4;\n}\n.arap-profile-affected {\n margin-top: 8px;\n margin-bottom: 10px;\n}\n.arap-profile-affected-label {\n display: block;\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: var(--arap-muted, #94a3b8);\n margin-bottom: 4px;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n.arap-profile-chip {\n display: inline-block;\n padding: 2px 6px;\n font-size: 10px;\n background: var(--arap-chip-bg, #f1f5f9);\n color: var(--arap-text, #334155);\n border-radius: 4px;\n border: 1px solid var(--arap-chip-border, #e2e8f0);\n}\n.arap-profile-actions {\n display: flex;\n justify-content: flex-end;\n margin-top: 8px;\n}\n.arap-profile-apply-btn,\n.arap-profile-revert-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 36px;\n padding: 6px 14px;\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n cursor: pointer;\n transition: background 0.15s ease, border-color 0.15s ease;\n}\n.arap-profile-apply-btn {\n background: var(--arap-primary, #2563eb);\n color: #ffffff;\n border: 1px solid var(--arap-primary, #2563eb);\n}\n.arap-profile-apply-btn:hover {\n background: #1d4ed8;\n}\n.arap-profile-revert-btn {\n background: #ffffff;\n color: #dc2626;\n border: 1px solid #fca5a5;\n}\n.arap-profile-revert-btn:hover {\n background: #fef2f2;\n border-color: #f87171;\n}\n.arap-large-controls .arap-profile-apply-btn,\n.arap-large-controls .arap-profile-revert-btn {\n min-height: 48px;\n padding: 10px 18px;\n font-size: 14px;\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-profile-card,\n .arap-profile-apply-btn,\n .arap-profile-revert-btn,\n .arap-preset-card {\n transition: none !important;\n }\n}\n.arap-preset-card {\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.arap-preset-card:hover {\n border-color: var(--arap-border-hover, #cbd5e1);\n}\n.arap-large-controls .arap-preset-card button {\n min-height: 48px;\n padding: 10px 16px;\n font-size: 14px;\n}\n.arap-root[dir=rtl],\n.arap-panel[dir=rtl] {\n direction: rtl;\n text-align: right;\n}\n.arap-panel[dir=rtl] .arap-heading {\n flex-direction: row-reverse;\n}\n.arap-panel[dir=rtl] .arap-position-arrows {\n direction: ltr;\n}\n.arap-search-input {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 28px 6px 10px;\n font-size: 12px;\n border: 1px solid var(--arap-border, #cbd5e1);\n border-radius: 6px;\n background: var(--arap-surface, #ffffff);\n color: var(--arap-text, #0f172a);\n}\n.arap-panel[dir=rtl] .arap-search-input {\n padding: 6px 10px 6px 28px;\n}\n.arap-search-clear {\n position: absolute;\n inset-inline-end: 8px;\n top: 50%;\n transform: translateY(-50%);\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 2px 6px;\n font-size: 14px;\n color: var(--arap-muted, #64748b);\n border-radius: 4px;\n}\n.arap-search-clear:hover {\n background: var(--arap-selected, #eff6ff);\n color: var(--arap-text, #0f172a);\n}\n');
|
|
139
172
|
|
|
140
173
|
// src/core/AccessibilityPlugin.tsx
|
|
141
174
|
var import_react4 = require("react");
|
|
@@ -464,6 +497,16 @@ builtins.readingMaskHeight = {
|
|
|
464
497
|
defaultValue: DEFAULT_READING_MASK_HEIGHT,
|
|
465
498
|
validate: (v) => typeof v === "number" && v >= MIN_READING_MASK_HEIGHT && v <= MAX_READING_MASK_HEIGHT
|
|
466
499
|
};
|
|
500
|
+
builtins.activeProfile = {
|
|
501
|
+
defaultValue: null,
|
|
502
|
+
validate: (v) => v === null || typeof v === "object" && v !== null && "profileId" in v && typeof v.profileId === "string"
|
|
503
|
+
};
|
|
504
|
+
builtins.customPresets = {
|
|
505
|
+
defaultValue: [],
|
|
506
|
+
validate: (v) => Array.isArray(v) && v.every(
|
|
507
|
+
(item) => typeof item === "object" && item !== null && typeof item.id === "string" && typeof item.name === "string" && typeof item.createdAt === "string" && typeof item.settings === "object" && item.settings !== null
|
|
508
|
+
)
|
|
509
|
+
};
|
|
467
510
|
function validValue(key, value, fallback, validate) {
|
|
468
511
|
if (builtins[key]) return builtins[key].validate(value);
|
|
469
512
|
if (validate) {
|
|
@@ -1966,15 +2009,39 @@ function AccessibilityPlugin({
|
|
|
1966
2009
|
const definition = registrations.current.get(key);
|
|
1967
2010
|
if (!validKey(key) || !definition || !validValue(key, value2, definition.defaultValue, definition.validate))
|
|
1968
2011
|
throw new Error(`Invalid value or unregistered feature: ${key}`);
|
|
1969
|
-
setFeatures((previous) =>
|
|
2012
|
+
setFeatures((previous) => {
|
|
2013
|
+
const copy = { ...previous, [key]: value2 };
|
|
2014
|
+
if (key !== "activeProfile" && key !== PLACEMENT_KEY && previous.activeProfile && typeof previous.activeProfile === "object") {
|
|
2015
|
+
const profileState = previous.activeProfile;
|
|
2016
|
+
const targetKey = key === "fontSize" || key === "textScale" ? "fontScale" : key === "focusHighlight" ? "highlightFocus" : key === "linkHighlight" ? "highlightLinks" : key === "bigCursor" ? "cursorSize" : key === "readingGuide" || key === "readingMask" ? "readerMode" : key;
|
|
2017
|
+
if (profileState.baseSnapshot && (targetKey in profileState.baseSnapshot || key in profileState.baseSnapshot)) {
|
|
2018
|
+
copy.activeProfile = {
|
|
2019
|
+
...profileState,
|
|
2020
|
+
overrides: {
|
|
2021
|
+
...profileState.overrides,
|
|
2022
|
+
[targetKey]: value2,
|
|
2023
|
+
[key]: value2
|
|
2024
|
+
}
|
|
2025
|
+
};
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
return copy;
|
|
2029
|
+
});
|
|
1970
2030
|
},
|
|
1971
2031
|
[setFeatures]
|
|
1972
2032
|
);
|
|
1973
2033
|
const resetAll = (0, import_react4.useCallback)(() => {
|
|
1974
2034
|
resetFns.current.forEach((fn) => fn());
|
|
1975
|
-
setFeatures(
|
|
1976
|
-
|
|
1977
|
-
|
|
2035
|
+
setFeatures((previous) => {
|
|
2036
|
+
const preserved = {};
|
|
2037
|
+
if (validPlacement(previous[PLACEMENT_KEY])) {
|
|
2038
|
+
preserved[PLACEMENT_KEY] = previous[PLACEMENT_KEY];
|
|
2039
|
+
}
|
|
2040
|
+
if (Array.isArray(previous.customPresets)) {
|
|
2041
|
+
preserved.customPresets = previous.customPresets;
|
|
2042
|
+
}
|
|
2043
|
+
return preserved;
|
|
2044
|
+
});
|
|
1978
2045
|
}, [setFeatures]);
|
|
1979
2046
|
const registerReset = (0, import_react4.useCallback)((key, fn) => {
|
|
1980
2047
|
resetFns.current.set(key, fn);
|
|
@@ -2009,6 +2076,7 @@ function AccessibilityPlugin({
|
|
|
2009
2076
|
document.addEventListener("arap:disable-feature", handler);
|
|
2010
2077
|
return () => document.removeEventListener("arap:disable-feature", handler);
|
|
2011
2078
|
}, [handleDisable]);
|
|
2079
|
+
const effectiveLocale = locale || (typeof document !== "undefined" ? document.documentElement.lang : void 0) || void 0;
|
|
2012
2080
|
useBuiltinEffects(active, handleDisable);
|
|
2013
2081
|
const value = (0, import_react4.useMemo)(
|
|
2014
2082
|
() => ({
|
|
@@ -2026,7 +2094,7 @@ function AccessibilityPlugin({
|
|
|
2026
2094
|
resetAll,
|
|
2027
2095
|
registerReset,
|
|
2028
2096
|
unregisterReset,
|
|
2029
|
-
locale,
|
|
2097
|
+
locale: effectiveLocale,
|
|
2030
2098
|
statementUrl,
|
|
2031
2099
|
largeControls
|
|
2032
2100
|
}),
|
|
@@ -2045,7 +2113,7 @@ function AccessibilityPlugin({
|
|
|
2045
2113
|
resetAll,
|
|
2046
2114
|
registerReset,
|
|
2047
2115
|
unregisterReset,
|
|
2048
|
-
|
|
2116
|
+
effectiveLocale,
|
|
2049
2117
|
statementUrl,
|
|
2050
2118
|
largeControls
|
|
2051
2119
|
]
|
|
@@ -2090,6 +2158,12 @@ function WidgetPortal({ children }) {
|
|
|
2090
2158
|
var import_react6 = require("react");
|
|
2091
2159
|
|
|
2092
2160
|
// src/core/i18n/en.ts
|
|
2161
|
+
var enCornerNames = {
|
|
2162
|
+
"bottom-right": "bottom right",
|
|
2163
|
+
"bottom-left": "bottom left",
|
|
2164
|
+
"top-right": "top right",
|
|
2165
|
+
"top-left": "top left"
|
|
2166
|
+
};
|
|
2093
2167
|
var enLocale = Object.freeze({
|
|
2094
2168
|
title: "Accessibility settings",
|
|
2095
2169
|
description: "Adjust your reading experience",
|
|
@@ -2119,13 +2193,199 @@ var enLocale = Object.freeze({
|
|
|
2119
2193
|
moveDown: "Move accessibility button down",
|
|
2120
2194
|
moveRight: "Move accessibility button right",
|
|
2121
2195
|
largeControlsLabel: "Oversized widget controls",
|
|
2196
|
+
cornerNames: enCornerNames,
|
|
2122
2197
|
formatPointPosition: (x, y) => `Button position: ${Math.round(x * 100)}% horizontally, ${Math.round(y * 100)}% vertically.`,
|
|
2123
|
-
formatCornerPosition: (corner) => `Button position: ${corner.split("-").join(" ")}
|
|
2198
|
+
formatCornerPosition: (corner) => `Button position: ${corner.split("-").join(" ")}.`,
|
|
2199
|
+
searchPlaceholder: "Search tools or profiles...",
|
|
2200
|
+
searchClearLabel: "Clear search query",
|
|
2201
|
+
formatSearchCount: (matched, total, query) => query ? `Showing ${matched} of ${total} tools matching "${query}"` : `Showing all ${total} tools`,
|
|
2202
|
+
emptySearchTitle: "No matching tools found",
|
|
2203
|
+
emptySearchDescription: "Try adjusting your search query or reset filters.",
|
|
2204
|
+
clearSearchLabel: "Clear search",
|
|
2205
|
+
formatProfileApplied: (profileName) => `\u2713 Profile "${profileName}" applied.`,
|
|
2206
|
+
formatProfileReverted: () => "Reverted to custom settings.",
|
|
2207
|
+
formatPresetSaved: (presetName) => `Preset "${presetName}" saved successfully.`,
|
|
2208
|
+
formatPresetApplied: (presetName) => `Preset "${presetName}" applied.`,
|
|
2209
|
+
formatPresetDeleted: (presetName) => `Preset "${presetName}" deleted.`,
|
|
2210
|
+
decreaseTextSize: "Decrease text size",
|
|
2211
|
+
increaseTextSize: "Increase text size",
|
|
2212
|
+
features: {
|
|
2213
|
+
textScale: "Bigger Text",
|
|
2214
|
+
lineHeight: "Line Height",
|
|
2215
|
+
letterSpacing: "Letter Spacing",
|
|
2216
|
+
wordSpacing: "Word Spacing",
|
|
2217
|
+
paragraphSpacing: "Paragraph Spacing",
|
|
2218
|
+
textAlign: "Text Align",
|
|
2219
|
+
fontFamily: "Readable Font",
|
|
2220
|
+
contrast: "Contrast",
|
|
2221
|
+
highlightLinks: "Highlight Links",
|
|
2222
|
+
focusOutline: "Focus Outline",
|
|
2223
|
+
reduceMotion: "Reduce Motion",
|
|
2224
|
+
cursorGuide: "Reading Guide",
|
|
2225
|
+
headingsNavigator: "Page Navigator",
|
|
2226
|
+
profiles: "Accessibility Profiles",
|
|
2227
|
+
presets: "Saved Presets",
|
|
2228
|
+
readingMode: "Reading Mode"
|
|
2229
|
+
}
|
|
2230
|
+
});
|
|
2231
|
+
|
|
2232
|
+
// src/core/i18n/si.ts
|
|
2233
|
+
var siCornerNames = {
|
|
2234
|
+
"bottom-right": "\u0DB4\u0DC4\u0DC5 \u0DAF\u0D9A\u0DD4\u0DAB",
|
|
2235
|
+
"bottom-left": "\u0DB4\u0DC4\u0DC5 \u0DC0\u0DB8",
|
|
2236
|
+
"top-right": "\u0D89\u0DC4\u0DC5 \u0DAF\u0D9A\u0DD4\u0DAB",
|
|
2237
|
+
"top-left": "\u0D89\u0DC4\u0DC5 \u0DC0\u0DB8"
|
|
2238
|
+
};
|
|
2239
|
+
var siLocale = Object.freeze({
|
|
2240
|
+
title: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DC3\u0DD0\u0D9A\u0DC3\u0DD4\u0DB8\u0DCA",
|
|
2241
|
+
description: "\u0D94\u0DB6\u0DDA \u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8\u0DDA \u0D85\u0DAD\u0DCA\u0DAF\u0DD0\u0D9A\u0DD3\u0DB8 \u0DC3\u0D9A\u0DC3\u0DCF \u0D9C\u0DB1\u0DCA\u0DB1",
|
|
2242
|
+
closeLabel: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DC3\u0DD0\u0D9A\u0DC3\u0DD4\u0DB8\u0DCA \u0DC0\u0DC3\u0DB1\u0DCA\u0DB1",
|
|
2243
|
+
skipToActions: "\u0D9A\u0DCA\u0DC2\u0DAB\u0DD2\u0D9A \u0D9A\u0DCA\u200D\u0DBB\u0DD2\u0DBA\u0DCF \u0DC0\u0DD9\u0DAD \u0DB8\u0D9F \u0DC4\u0DBB\u0DD2\u0DB1\u0DCA\u0DB1",
|
|
2244
|
+
skipToMain: "\u0DB4\u0DCA\u200D\u0DBB\u0DB0\u0DCF\u0DB1 \u0D85\u0DB1\u0DCA\u0DAD\u0DBB\u0DCA\u0D9C\u0DAD\u0DBA \u0DC0\u0DD9\u0DAD \u0DB8\u0D9F \u0DC4\u0DBB\u0DD2\u0DB1\u0DCA\u0DB1",
|
|
2245
|
+
toolsLabel: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DB8\u0DD9\u0DC0\u0DBD\u0DB8\u0DCA",
|
|
2246
|
+
quickActionsLabel: "\u0D9A\u0DCA\u0DC2\u0DAB\u0DD2\u0D9A \u0D9A\u0DCA\u200D\u0DBB\u0DD2\u0DBA\u0DCF",
|
|
2247
|
+
resetLabel: "\u0DC3\u0DD2\u0DBA\u0DBD\u0DD4 \u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DC3\u0DD0\u0D9A\u0DC3\u0DD4\u0DB8\u0DCA \u0DBA\u0DC5\u0DD2 \u0DC3\u0D9A\u0DC3\u0DB1\u0DCA\u0DB1",
|
|
2248
|
+
resetAll: "\u0DC3\u0DD2\u0DBA\u0DBD\u0DCA\u0DBD \u0DBA\u0DC5\u0DD2 \u0DC3\u0D9A\u0DC3\u0DB1\u0DCA\u0DB1",
|
|
2249
|
+
statementLink: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DB4\u0DCA\u200D\u0DBB\u0D9A\u0DCF\u0DC1\u0DBA",
|
|
2250
|
+
openInNewTab: "\u0DB1\u0DC0 \u0DA7\u0DD0\u0DB6\u0DBA\u0D9A \u0DC0\u0DD2\u0DC0\u0DD8\u0DAD \u0DC0\u0DDA",
|
|
2251
|
+
creditsPrefix: "\u0DC3\u0DD0\u0DBD\u0DC3\u0DD4\u0DB8\u0DCA \u0D9A\u0DBB \u0DB1\u0DD2\u0DBB\u0DCA\u0DB8\u0DCF\u0DAB\u0DBA \u0D9A\u0DC5\u0DDA",
|
|
2252
|
+
creditsName: "\u0DB4\u0DCA\u200D\u0DBB\u0DB6\u0DDD\u0DAF\u0DCA",
|
|
2253
|
+
documentationLink: "\u0DB1\u0DD2\u0DBD \u0DBD\u0DDA\u0D9B\u0DB1\u0D9C\u0DAD \u0D9A\u0DD2\u0DBB\u0DD3\u0DB8",
|
|
2254
|
+
buttonTitle: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF\u0DC0",
|
|
2255
|
+
dragHelp: "\u0DC3\u0DCA\u0DAE\u0DCF\u0DB1\u0DBA \u0DB8\u0DCF\u0DBB\u0DD4 \u0D9A\u0DD2\u0DBB\u0DD3\u0DB8\u0DA7 \u0D85\u0DAF\u0DD2\u0DB1\u0DCA\u0DB1, \u0DB1\u0DD0\u0DAD\u0DC4\u0DDC\u0DAD\u0DCA Alt \u0DC3\u0DB8\u0D9F \u0D8A\u0DAD\u0DBD \u0DBA\u0DAD\u0DD4\u0DBB\u0DD4 \u0DB7\u0DCF\u0DC0\u0DD2\u0DAD\u0DCF \u0D9A\u0DBB\u0DB1\u0DCA\u0DB1. \u0DA0\u0DBD\u0DB1 \u0DB8\u0DD9\u0DB1\u0DD4\u0DC0 \u0D9A\u0DCA\u0DBD\u0DD2\u0D9A\u0DCA \u0DC3\u0DC4 \u0DBA\u0DAD\u0DD4\u0DBB\u0DD4\u0DB4\u0DD4\u0DC0\u0DBB\u0DD4 \u0DB4\u0DCF\u0DBD\u0DB1 \u0DC3\u0DB4\u0DBA\u0DBA\u0DD2.",
|
|
2256
|
+
positionLabel: "\u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8\u0DDA \u0DB4\u0DD2\u0DC4\u0DD2\u0DA7\u0DD3\u0DB8",
|
|
2257
|
+
moveButton: "\u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8 \u0D9C\u0DD9\u0DB1\u0DBA\u0DB1\u0DCA\u0DB1",
|
|
2258
|
+
moveButtonLabel: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8 \u0D9C\u0DD9\u0DB1\u0DBA\u0DB1\u0DCA\u0DB1",
|
|
2259
|
+
buttonPositionSelectLabel: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8\u0DDA \u0DB4\u0DD2\u0DC4\u0DD2\u0DA7\u0DD3\u0DB8",
|
|
2260
|
+
customPosition: "\u0D85\u0DB7\u0DD2\u0DBB\u0DD4\u0DA0\u0DD2 \u0DB4\u0DD2\u0DC4\u0DD2\u0DA7\u0DD3\u0DB8",
|
|
2261
|
+
resetPosition: "\u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8\u0DDA \u0DB4\u0DD2\u0DC4\u0DD2\u0DA7\u0DD3\u0DB8 \u0DBA\u0DC5\u0DD2 \u0DC3\u0D9A\u0DC3\u0DB1\u0DCA\u0DB1",
|
|
2262
|
+
doneMoving: "\u0DA0\u0DBD\u0DB1\u0DBA \u0D85\u0DC0\u0DC3\u0DB1\u0DCA",
|
|
2263
|
+
moveLeft: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8 \u0DC0\u0DB8\u0DA7 \u0D9C\u0DD9\u0DB1\u0DBA\u0DB1\u0DCA\u0DB1",
|
|
2264
|
+
moveUp: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8 \u0D89\u0DC4\u0DC5\u0DA7 \u0D9C\u0DD9\u0DB1\u0DBA\u0DB1\u0DCA\u0DB1",
|
|
2265
|
+
moveDown: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8 \u0DB4\u0DC4\u0DC5\u0DA7 \u0D9C\u0DD9\u0DB1\u0DBA\u0DB1\u0DCA\u0DB1",
|
|
2266
|
+
moveRight: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8 \u0DAF\u0D9A\u0DD4\u0DAB\u0DA7 \u0D9C\u0DD9\u0DB1\u0DBA\u0DB1\u0DCA\u0DB1",
|
|
2267
|
+
largeControlsLabel: "\u0DC0\u0DD2\u0DC1\u0DCF\u0DBD \u0DB4\u0DCA\u200D\u0DBB\u0DB8\u0DCF\u0DAB\u0DBA\u0DDA \u0DB4\u0DCF\u0DBD\u0DB1",
|
|
2268
|
+
cornerNames: siCornerNames,
|
|
2269
|
+
formatPointPosition: (x, y) => `\u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8\u0DDA \u0DB4\u0DD2\u0DC4\u0DD2\u0DA7\u0DD3\u0DB8: \u0DAD\u0DD2\u0DBB\u0DC3\u0DCA \u0D85\u0DAD\u0DA7 ${Math.round(x * 100)}%, \u0DC3\u0DD2\u0DBB\u0DC3\u0DCA \u0D85\u0DAD\u0DA7 ${Math.round(y * 100)}%.`,
|
|
2270
|
+
formatCornerPosition: (corner) => {
|
|
2271
|
+
const translated = siCornerNames[corner] ?? corner.split("-").join(" ");
|
|
2272
|
+
return `\u0DB6\u0DDC\u0DAD\u0DCA\u0DAD\u0DB8\u0DDA \u0DB4\u0DD2\u0DC4\u0DD2\u0DA7\u0DD3\u0DB8: ${translated}.`;
|
|
2273
|
+
},
|
|
2274
|
+
searchPlaceholder: "\u0DB8\u0DD9\u0DC0\u0DBD\u0DB8\u0DCA \u0DC4\u0DDD \u0DB4\u0DD0\u0DAD\u0DD2\u0D9A\u0DA9 \u0DC3\u0DDC\u0DBA\u0DB1\u0DCA\u0DB1...",
|
|
2275
|
+
searchClearLabel: "\u0DC3\u0DD9\u0DC0\u0DD4\u0DB8 \u0DC4\u0DD2\u0DC3\u0DCA \u0D9A\u0DBB\u0DB1\u0DCA\u0DB1",
|
|
2276
|
+
formatSearchCount: (matched, total, query) => query ? `\u0DB8\u0DD9\u0DC0\u0DBD\u0DB8\u0DCA ${total} \u0DB1\u0DCA "${query}" \u0DA7 \u0D9C\u0DD0\u0DBD\u0DB4\u0DD9\u0DB1 ${matched} \u0D9A\u0DCA \u0DB4\u0DD9\u0DB1\u0DCA\u0DC0\u0DBA\u0DD2` : `\u0DC3\u0DD2\u0DBA\u0DBD\u0DD4 \u0DB8\u0DD9\u0DC0\u0DBD\u0DB8\u0DCA ${total} \u0DB8 \u0DB4\u0DD9\u0DB1\u0DCA\u0DC0\u0DBA\u0DD2`,
|
|
2277
|
+
emptySearchTitle: "\u0D9C\u0DD0\u0DBD\u0DB4\u0DD9\u0DB1 \u0DB8\u0DD9\u0DC0\u0DBD\u0DB8\u0DCA \u0DC4\u0DB8\u0DD4 \u0DB1\u0DDC\u0DC0\u0DD3\u0DBA",
|
|
2278
|
+
emptySearchDescription: "\u0DC0\u0DD9\u0DB1\u0DAD\u0DCA \u0DC3\u0DD9\u0DC0\u0DD4\u0DB8\u0DCA \u0DB4\u0DAF\u0DBA\u0D9A\u0DCA \u0DB7\u0DCF\u0DC0\u0DD2\u0DAD\u0DCF \u0D9A\u0DBB \u0DB6\u0DBD\u0DB1\u0DCA\u0DB1 \u0DC4\u0DDD \u0DB4\u0DD9\u0DBB\u0DC4\u0DB1\u0DCA \u0DBA\u0DC5\u0DD2 \u0DC3\u0D9A\u0DC3\u0DB1\u0DCA\u0DB1.",
|
|
2279
|
+
clearSearchLabel: "\u0DC3\u0DD9\u0DC0\u0DD4\u0DB8 \u0DC4\u0DD2\u0DC3\u0DCA \u0D9A\u0DBB\u0DB1\u0DCA\u0DB1",
|
|
2280
|
+
formatProfileApplied: (profileName) => `\u2713 "${profileName}" \u0DB4\u0DD0\u0DAD\u0DD2\u0D9A\u0DA9 \u0DC3\u0D9A\u0DCA\u200D\u0DBB\u0DD2\u0DBA \u0D9A\u0DBB\u0DB1 \u0DBD\u0DAF\u0DD3.`,
|
|
2281
|
+
formatProfileReverted: () => "\u0DB4\u0DD0\u0DAD\u0DD2\u0D9A\u0DA9 \u0D89\u0DC0\u0DAD\u0DCA \u0D9A\u0DBB \u0D85\u0DB7\u0DD2\u0DBB\u0DD4\u0DA0\u0DD2 \u0DC3\u0DD0\u0D9A\u0DC3\u0DD4\u0DB8\u0DCA \u0DC0\u0DD9\u0DAD \u0DB8\u0DCF\u0DBB\u0DD4 \u0DC0\u0DD2\u0DBA.",
|
|
2282
|
+
formatPresetSaved: (presetName) => `"${presetName}" \u0DB4\u0DD9\u0DBB\u0DC3\u0DD0\u0D9A\u0DC3\u0DD4\u0DB8 \u0DC3\u0DCF\u0DBB\u0DCA\u0DAE\u0D9A\u0DC0 \u0DC3\u0DD4\u0DBB\u0D9A\u0DD2\u0DB1 \u0DBD\u0DAF\u0DD3.`,
|
|
2283
|
+
formatPresetApplied: (presetName) => `"${presetName}" \u0DB4\u0DD9\u0DBB\u0DC3\u0DD0\u0D9A\u0DC3\u0DD4\u0DB8 \u0D9A\u0DCA\u200D\u0DBB\u0DD2\u0DBA\u0DCF\u0DAD\u0DCA\u0DB8\u0D9A \u0D9A\u0DBB\u0DB1 \u0DBD\u0DAF\u0DD3.`,
|
|
2284
|
+
formatPresetDeleted: (presetName) => `"${presetName}" \u0DB4\u0DD9\u0DBB\u0DC3\u0DD0\u0D9A\u0DC3\u0DD4\u0DB8 \u0D89\u0DC0\u0DAD\u0DCA \u0D9A\u0DBB\u0DB1 \u0DBD\u0DAF\u0DD3.`,
|
|
2285
|
+
decreaseTextSize: "\u0D85\u0D9A\u0DD4\u0DBB\u0DD4 \u0DB4\u0DCA\u200D\u0DBB\u0DB8\u0DCF\u0DAB\u0DBA \u0D85\u0DA9\u0DD4 \u0D9A\u0DBB\u0DB1\u0DCA\u0DB1",
|
|
2286
|
+
increaseTextSize: "\u0D85\u0D9A\u0DD4\u0DBB\u0DD4 \u0DB4\u0DCA\u200D\u0DBB\u0DB8\u0DCF\u0DAB\u0DBA \u0DC0\u0DD0\u0DA9\u0DD2 \u0D9A\u0DBB\u0DB1\u0DCA\u0DB1",
|
|
2287
|
+
features: {
|
|
2288
|
+
textScale: "\u0DC0\u0DD2\u0DC1\u0DCF\u0DBD \u0D85\u0D9A\u0DD4\u0DBB\u0DD4",
|
|
2289
|
+
lineHeight: "\u0DB4\u0DDA\u0DC5\u0DD2 \u0DB4\u0DBB\u0DAD\u0DBB\u0DBA",
|
|
2290
|
+
letterSpacing: "\u0D85\u0D9A\u0DD4\u0DBB\u0DD4 \u0DB4\u0DBB\u0DAD\u0DBB\u0DBA",
|
|
2291
|
+
wordSpacing: "\u0DC0\u0DA0\u0DB1 \u0DB4\u0DBB\u0DAD\u0DBB\u0DBA",
|
|
2292
|
+
paragraphSpacing: "\u0DA1\u0DDA\u0DAF \u0DB4\u0DBB\u0DAD\u0DBB\u0DBA",
|
|
2293
|
+
textAlign: "\u0DB4\u0DD9\u0DC5 \u0DB4\u0DD9\u0DC5\u0D9C\u0DD0\u0DC3\u0DCA\u0DB8",
|
|
2294
|
+
fontFamily: "\u0DB4\u0DD0\u0DC4\u0DD0\u0DAF\u0DD2\u0DBD\u0DD2 \u0D85\u0D9A\u0DD4\u0DBB\u0DD4",
|
|
2295
|
+
contrast: "\u0DC0\u0DBB\u0DCA\u0DAB \u0DC0\u0DD9\u0DB1\u0DC3",
|
|
2296
|
+
highlightLinks: "\u0DC3\u0DB6\u0DD0\u0DB3\u0DD2 \u0D89\u0DC3\u0DCA\u0DB8\u0DAD\u0DD4 \u0D9A\u0DD2\u0DBB\u0DD3\u0DB8",
|
|
2297
|
+
focusOutline: "\u0DB1\u0DCF\u0DB7\u0DD2\u0D9C\u0DAD \u0DB8\u0DCF\u0DBA\u0DD2\u0DB8",
|
|
2298
|
+
reduceMotion: "\u0DA0\u0DBD\u0DB1\u0DBA \u0D85\u0DC0\u0DB8 \u0D9A\u0DD2\u0DBB\u0DD3\u0DB8",
|
|
2299
|
+
cursorGuide: "\u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8\u0DDA \u0DB8\u0D9F\u0DB4\u0DD9\u0DB1\u0DCA\u0DC0\u0DD4\u0DB8",
|
|
2300
|
+
headingsNavigator: "\u0DB4\u0DD2\u0DA7\u0DD4 \u0D9C\u0DC0\u0DDA\u0DC1\u0D9A\u0DBA",
|
|
2301
|
+
profiles: "\u0DB4\u0DCA\u200D\u0DBB\u0DC0\u0DDA\u0DC1\u0DCA\u200D\u0DBA\u0DAD\u0DCF \u0DB4\u0DD0\u0DAD\u0DD2\u0D9A\u0DA9",
|
|
2302
|
+
presets: "\u0DC3\u0DD4\u0DBB\u0D9A\u0DD2\u0DB1 \u0DBD\u0DAF \u0DB4\u0DD9\u0DBB\u0DC3\u0DD0\u0D9A\u0DC3\u0DD4\u0DB8\u0DCA",
|
|
2303
|
+
readingMode: "\u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8\u0DDA \u0DB8\u0DCF\u0DAF\u0DD2\u0DBD\u0DD2\u0DBA"
|
|
2304
|
+
}
|
|
2305
|
+
});
|
|
2306
|
+
|
|
2307
|
+
// src/core/i18n/ta.ts
|
|
2308
|
+
var taCornerNames = {
|
|
2309
|
+
"bottom-right": "\u0B95\u0BC0\u0BB4\u0BCD \u0BB5\u0BB2\u0BA4\u0BC1",
|
|
2310
|
+
"bottom-left": "\u0B95\u0BC0\u0BB4\u0BCD \u0B87\u0B9F\u0BA4\u0BC1",
|
|
2311
|
+
"top-right": "\u0BAE\u0BC7\u0BB2\u0BCD \u0BB5\u0BB2\u0BA4\u0BC1",
|
|
2312
|
+
"top-left": "\u0BAE\u0BC7\u0BB2\u0BCD \u0B87\u0B9F\u0BA4\u0BC1"
|
|
2313
|
+
};
|
|
2314
|
+
var taLocale = Object.freeze({
|
|
2315
|
+
title: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0B85\u0BAE\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",
|
|
2316
|
+
description: "\u0B89\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0BB5\u0BBE\u0B9A\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1 \u0B85\u0BA9\u0BC1\u0BAA\u0BB5\u0BA4\u0BCD\u0BA4\u0BC8 \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BBF\u0BAF\u0BAE\u0BC8\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD",
|
|
2317
|
+
closeLabel: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0B85\u0BAE\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC8 \u0BAE\u0BC2\u0B9F\u0BC1\u0B95",
|
|
2318
|
+
skipToActions: "\u0BB5\u0BBF\u0BB0\u0BC8\u0BB5\u0BC1\u0B9A\u0BCD \u0B9A\u0BC6\u0BAF\u0BB2\u0BCD\u0B95\u0BB3\u0BC1\u0B95\u0BCD\u0B95\u0BC1\u0B9A\u0BCD \u0B9A\u0BC6\u0BB2\u0BCD\u0B95",
|
|
2319
|
+
skipToMain: "\u0BAE\u0BC1\u0B95\u0BCD\u0B95\u0BBF\u0BAF \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95\u0BA4\u0BCD\u0BA4\u0BBF\u0BB1\u0BCD\u0B95\u0BC1\u0B9A\u0BCD \u0B9A\u0BC6\u0BB2\u0BCD\u0B95",
|
|
2320
|
+
toolsLabel: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0B95\u0BB0\u0BC1\u0BB5\u0BBF\u0B95\u0BB3\u0BCD",
|
|
2321
|
+
quickActionsLabel: "\u0BB5\u0BBF\u0BB0\u0BC8\u0BB5\u0BC1\u0B9A\u0BCD \u0B9A\u0BC6\u0BAF\u0BB2\u0BCD\u0B95\u0BB3\u0BCD",
|
|
2322
|
+
resetLabel: "\u0B85\u0BA9\u0BC8\u0BA4\u0BCD\u0BA4\u0BC1 \u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0B85\u0BAE\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC8\u0BAF\u0BC1\u0BAE\u0BCD \u0BAE\u0BC0\u0B9F\u0BCD\u0B9F\u0BAE\u0BC8",
|
|
2323
|
+
resetAll: "\u0B85\u0BA9\u0BC8\u0BA4\u0BCD\u0BA4\u0BC8\u0BAF\u0BC1\u0BAE\u0BCD \u0BAE\u0BC0\u0B9F\u0BCD\u0B9F\u0BAE\u0BC8",
|
|
2324
|
+
statementLink: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0B85\u0BB1\u0BBF\u0B95\u0BCD\u0B95\u0BC8",
|
|
2325
|
+
openInNewTab: "\u0BAA\u0BC1\u0BA4\u0BBF\u0BAF \u0BA4\u0BBE\u0BB5\u0BB2\u0BBF\u0BB2\u0BCD \u0BA4\u0BBF\u0BB1\u0B95\u0BCD\u0B95\u0BC1\u0BAE\u0BCD",
|
|
2326
|
+
creditsPrefix: "\u0BB5\u0B9F\u0BBF\u0BB5\u0BAE\u0BC8\u0BA4\u0BCD\u0BA4\u0BC1 \u0B89\u0BB0\u0BC1\u0BB5\u0BBE\u0B95\u0BCD\u0B95\u0BBF\u0BAF\u0BB5\u0BB0\u0BCD",
|
|
2327
|
+
creditsName: "\u0BAA\u0BBF\u0BB0\u0BAA\u0BCB\u0BA4\u0BCD",
|
|
2328
|
+
documentationLink: "\u0B85\u0BA4\u0BBF\u0B95\u0BBE\u0BB0\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD\u0BB5 \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
|
|
2329
|
+
buttonTitle: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8",
|
|
2330
|
+
dragHelp: "\u0BA8\u0B95\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4 \u0B87\u0BB4\u0BC1\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD, \u0B85\u0BB2\u0BCD\u0BB2\u0BA4\u0BC1 Alt \u0BAE\u0BB1\u0BCD\u0BB1\u0BC1\u0BAE\u0BCD \u0B85\u0BAE\u0BCD\u0BAA\u0BC1\u0B95\u0BCD\u0B95\u0BC1\u0BB1\u0BBF\u0B95\u0BB3\u0BC8\u0BAA\u0BCD \u0BAA\u0BAF\u0BA9\u0BCD\u0BAA\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4\u0BB5\u0BC1\u0BAE\u0BCD. \u0BA8\u0B95\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC1 \u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BCD \u0BAE\u0BC6\u0BA9\u0BC1 \u0B95\u0BBF\u0BB3\u0BBF\u0B95\u0BCD \u0BAE\u0BB1\u0BCD\u0BB1\u0BC1\u0BAE\u0BCD \u0BB5\u0BBF\u0B9A\u0BC8\u0BAA\u0BCD\u0BAA\u0BB2\u0B95\u0BC8 \u0B95\u0B9F\u0BCD\u0B9F\u0BC1\u0BAA\u0BCD\u0BAA\u0BBE\u0B9F\u0BC1\u0B95\u0BB3\u0BC8 \u0BB5\u0BB4\u0B99\u0BCD\u0B95\u0BC1\u0B95\u0BBF\u0BB1\u0BA4\u0BC1.",
|
|
2331
|
+
positionLabel: "\u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BCD \u0B85\u0BAE\u0BC8\u0BB5\u0BBF\u0B9F\u0BAE\u0BCD",
|
|
2332
|
+
moveButton: "\u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BC8 \u0BA8\u0B95\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC1",
|
|
2333
|
+
moveButtonLabel: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BC8 \u0BA8\u0B95\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC1",
|
|
2334
|
+
buttonPositionSelectLabel: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BCD \u0B85\u0BAE\u0BC8\u0BB5\u0BBF\u0B9F\u0BAE\u0BCD",
|
|
2335
|
+
customPosition: "\u0BA4\u0BA9\u0BBF\u0BAA\u0BCD\u0BAA\u0BAF\u0BA9\u0BCD \u0B85\u0BAE\u0BC8\u0BB5\u0BBF\u0B9F\u0BAE\u0BCD",
|
|
2336
|
+
resetPosition: "\u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BCD \u0B85\u0BAE\u0BC8\u0BB5\u0BBF\u0B9F\u0BA4\u0BCD\u0BA4\u0BC8 \u0BAE\u0BC0\u0B9F\u0BCD\u0B9F\u0BAE\u0BC8",
|
|
2337
|
+
doneMoving: "\u0BA8\u0B95\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BA8\u0BCD\u0BA4\u0BA4\u0BC1",
|
|
2338
|
+
moveLeft: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BC8 \u0B87\u0B9F\u0BA4\u0BC1\u0BAA\u0BC1\u0BB1\u0BAE\u0BCD \u0BA8\u0B95\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC1",
|
|
2339
|
+
moveUp: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BC8 \u0BAE\u0BC7\u0BB2\u0BC7 \u0BA8\u0B95\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC1",
|
|
2340
|
+
moveDown: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BC8 \u0B95\u0BC0\u0BB4\u0BC7 \u0BA8\u0B95\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC1",
|
|
2341
|
+
moveRight: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BC8 \u0BB5\u0BB2\u0BA4\u0BC1\u0BAA\u0BC1\u0BB1\u0BAE\u0BCD \u0BA8\u0B95\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC1",
|
|
2342
|
+
largeControlsLabel: "\u0BAA\u0BC6\u0BB0\u0BBF\u0BAF \u0BB5\u0BBF\u0B9F\u0BCD\u0B9C\u0BC6\u0B9F\u0BCD \u0B95\u0B9F\u0BCD\u0B9F\u0BC1\u0BAA\u0BCD\u0BAA\u0BBE\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",
|
|
2343
|
+
cornerNames: taCornerNames,
|
|
2344
|
+
formatPointPosition: (x, y) => `\u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BCD \u0B85\u0BAE\u0BC8\u0BB5\u0BBF\u0B9F\u0BAE\u0BCD: \u0B95\u0BBF\u0B9F\u0BC8\u0BAE\u0B9F\u0BCD\u0B9F\u0BAE\u0BBE\u0B95 ${Math.round(x * 100)}%, \u0B9A\u0BC6\u0B99\u0BCD\u0B95\u0BC1\u0BA4\u0BCD\u0BA4\u0BBE\u0B95 ${Math.round(y * 100)}%.`,
|
|
2345
|
+
formatCornerPosition: (corner) => {
|
|
2346
|
+
const translated = taCornerNames[corner] ?? corner.split("-").join(" ");
|
|
2347
|
+
return `\u0BAA\u0BCA\u0BA4\u0BCD\u0BA4\u0BBE\u0BA9\u0BCD \u0B85\u0BAE\u0BC8\u0BB5\u0BBF\u0B9F\u0BAE\u0BCD: ${translated}.`;
|
|
2348
|
+
},
|
|
2349
|
+
searchPlaceholder: "\u0B95\u0BB0\u0BC1\u0BB5\u0BBF\u0B95\u0BB3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BA4\u0BC1 \u0B9A\u0BC1\u0BAF\u0BB5\u0BBF\u0BB5\u0BB0\u0B99\u0BCD\u0B95\u0BB3\u0BC8\u0BA4\u0BCD \u0BA4\u0BC7\u0B9F\u0BC1\u0B95...",
|
|
2350
|
+
searchClearLabel: "\u0BA4\u0BC7\u0B9F\u0BB2\u0BC8 \u0B85\u0BB4\u0BBF",
|
|
2351
|
+
formatSearchCount: (matched, total, query) => query ? `\u0BAE\u0BCA\u0BA4\u0BCD\u0BA4\u0BAE\u0BC1\u0BB3\u0BCD\u0BB3 ${total} \u0B95\u0BB0\u0BC1\u0BB5\u0BBF\u0B95\u0BB3\u0BBF\u0BB2\u0BCD "${query}" \u0B89\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4\u0BC1\u0BAE\u0BCD ${matched} \u0B95\u0BBE\u0B9F\u0BCD\u0B9F\u0BAA\u0BCD\u0BAA\u0B9F\u0BC1\u0B95\u0BBF\u0BA9\u0BCD\u0BB1\u0BA9` : `\u0B85\u0BA9\u0BC8\u0BA4\u0BCD\u0BA4\u0BC1 ${total} \u0B95\u0BB0\u0BC1\u0BB5\u0BBF\u0B95\u0BB3\u0BC1\u0BAE\u0BCD \u0B95\u0BBE\u0B9F\u0BCD\u0B9F\u0BAA\u0BCD\u0BAA\u0B9F\u0BC1\u0B95\u0BBF\u0BA9\u0BCD\u0BB1\u0BA9`,
|
|
2352
|
+
emptySearchTitle: "\u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4\u0BC1\u0BAE\u0BCD \u0B95\u0BB0\u0BC1\u0BB5\u0BBF\u0B95\u0BB3\u0BCD \u0B8E\u0BA4\u0BC1\u0BB5\u0BC1\u0BAE\u0BCD \u0B95\u0BBF\u0B9F\u0BC8\u0B95\u0BCD\u0B95\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8",
|
|
2353
|
+
emptySearchDescription: "\u0BB5\u0BC7\u0BB1\u0BC1 \u0BA4\u0BC7\u0B9F\u0BB2\u0BCD \u0BB5\u0BBE\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC8\u0BAF\u0BC8 \u0BAE\u0BC1\u0BAF\u0BB1\u0BCD\u0B9A\u0BBF\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BA4\u0BC1 \u0BB5\u0B9F\u0BBF\u0BAA\u0BCD\u0BAA\u0BBE\u0BA9\u0BCD\u0B95\u0BB3\u0BC8 \u0BAE\u0BC0\u0B9F\u0BCD\u0B9F\u0BAE\u0BC8\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD.",
|
|
2354
|
+
clearSearchLabel: "\u0BA4\u0BC7\u0B9F\u0BB2\u0BC8 \u0B85\u0BB4\u0BBF",
|
|
2355
|
+
formatProfileApplied: (profileName) => `\u2713 "${profileName}" \u0B9A\u0BC1\u0BAF\u0BB5\u0BBF\u0BB5\u0BB0\u0BAE\u0BCD \u0B9A\u0BC6\u0BAF\u0BB2\u0BCD\u0BAA\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1.`,
|
|
2356
|
+
formatProfileReverted: () => "\u0B9A\u0BC1\u0BAF\u0BB5\u0BBF\u0BB5\u0BB0\u0BAE\u0BCD \u0B85\u0B95\u0BB1\u0BCD\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BC1 \u0BA4\u0BA9\u0BBF\u0BAA\u0BCD\u0BAA\u0BAF\u0BA9\u0BCD \u0B85\u0BAE\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC1\u0B95\u0BCD\u0B95\u0BC1 \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1.",
|
|
2357
|
+
formatPresetSaved: (presetName) => `"${presetName}" \u0BAE\u0BC1\u0BA9\u0BCD\u0BA9\u0BAE\u0BC8\u0BB5\u0BC1 \u0BB5\u0BC6\u0BB1\u0BCD\u0BB1\u0BBF\u0B95\u0BB0\u0BAE\u0BBE\u0B95\u0B9A\u0BCD \u0B9A\u0BC7\u0BAE\u0BBF\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1.`,
|
|
2358
|
+
formatPresetApplied: (presetName) => `"${presetName}" \u0BAE\u0BC1\u0BA9\u0BCD\u0BA9\u0BAE\u0BC8\u0BB5\u0BC1 \u0B9A\u0BC6\u0BAF\u0BB2\u0BCD\u0BAA\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1.`,
|
|
2359
|
+
formatPresetDeleted: (presetName) => `"${presetName}" \u0BAE\u0BC1\u0BA9\u0BCD\u0BA9\u0BAE\u0BC8\u0BB5\u0BC1 \u0BA8\u0BC0\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1.`,
|
|
2360
|
+
decreaseTextSize: "\u0B89\u0BB0\u0BC8 \u0B85\u0BB3\u0BB5\u0BC8\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BC8\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD",
|
|
2361
|
+
increaseTextSize: "\u0B89\u0BB0\u0BC8 \u0B85\u0BB3\u0BB5\u0BC8 \u0B85\u0BA4\u0BBF\u0B95\u0BB0\u0BBF\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD",
|
|
2362
|
+
features: {
|
|
2363
|
+
textScale: "\u0BAA\u0BC6\u0BB0\u0BBF\u0BAF \u0B89\u0BB0\u0BC8",
|
|
2364
|
+
lineHeight: "\u0BB5\u0BB0\u0BBF \u0B87\u0B9F\u0BC8\u0BB5\u0BC6\u0BB3\u0BBF",
|
|
2365
|
+
letterSpacing: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1 \u0B87\u0B9F\u0BC8\u0BB5\u0BC6\u0BB3\u0BBF",
|
|
2366
|
+
wordSpacing: "\u0B9A\u0BCA\u0BB2\u0BCD \u0B87\u0B9F\u0BC8\u0BB5\u0BC6\u0BB3\u0BBF",
|
|
2367
|
+
paragraphSpacing: "\u0BAA\u0BA4\u0BCD\u0BA4\u0BBF \u0B87\u0B9F\u0BC8\u0BB5\u0BC6\u0BB3\u0BBF",
|
|
2368
|
+
textAlign: "\u0B89\u0BB0\u0BC8 \u0B9A\u0BC0\u0BB0\u0BAE\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1",
|
|
2369
|
+
fontFamily: "\u0BA4\u0BC6\u0BB3\u0BBF\u0BB5\u0BBE\u0BA9 \u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0BB0\u0BC1",
|
|
2370
|
+
contrast: "\u0BAE\u0BBE\u0BB1\u0BC1\u0BAA\u0B9F\u0BCD\u0B9F \u0BB5\u0BA3\u0BCD\u0BA3\u0BAE\u0BCD",
|
|
2371
|
+
highlightLinks: "\u0B87\u0BA3\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC8 \u0BAE\u0BC1\u0BA9\u0BCD\u0BA9\u0BBF\u0BB2\u0BC8\u0BAA\u0BCD\u0BAA\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1",
|
|
2372
|
+
focusOutline: "\u0B95\u0BB5\u0BA9 \u0B8E\u0BB2\u0BCD\u0BB2\u0BC8\u0B95\u0BCD\u0B95\u0BCB\u0B9F\u0BCD\u0B9F\u0BC1",
|
|
2373
|
+
reduceMotion: "\u0B87\u0BAF\u0B95\u0BCD\u0B95\u0BA4\u0BCD\u0BA4\u0BC8\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BC8\u0BA4\u0BCD\u0BA4\u0BB2\u0BCD",
|
|
2374
|
+
cursorGuide: "\u0BB5\u0BBE\u0B9A\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1 \u0BB5\u0BB4\u0BBF\u0B95\u0BBE\u0B9F\u0BCD\u0B9F\u0BBF",
|
|
2375
|
+
headingsNavigator: "\u0BAA\u0B95\u0BCD\u0B95 \u0BB5\u0BB4\u0BBF\u0B95\u0BBE\u0B9F\u0BCD\u0B9F\u0BBF",
|
|
2376
|
+
profiles: "\u0B85\u0BA3\u0BC1\u0B95\u0BB2\u0BCD\u0BA4\u0BA9\u0BCD\u0BAE\u0BC8 \u0B9A\u0BC1\u0BAF\u0BB5\u0BBF\u0BB5\u0BB0\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
|
|
2377
|
+
presets: "\u0B9A\u0BC7\u0BAE\u0BBF\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F \u0BAE\u0BC1\u0BA9\u0BCD\u0BA9\u0BAE\u0BC8\u0BB5\u0BC1\u0B95\u0BB3\u0BCD",
|
|
2378
|
+
readingMode: "\u0BB5\u0BBE\u0B9A\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1 \u0BAE\u0BC1\u0BB1\u0BC8"
|
|
2379
|
+
}
|
|
2124
2380
|
});
|
|
2125
2381
|
|
|
2126
2382
|
// src/core/i18n/index.ts
|
|
2127
2383
|
var dictionaries = {
|
|
2128
|
-
en: enLocale
|
|
2384
|
+
en: enLocale,
|
|
2385
|
+
si: siLocale,
|
|
2386
|
+
"si-lk": siLocale,
|
|
2387
|
+
ta: taLocale,
|
|
2388
|
+
"ta-lk": taLocale
|
|
2129
2389
|
};
|
|
2130
2390
|
var RTL_LOCALES = /* @__PURE__ */ new Set([
|
|
2131
2391
|
"ar",
|
|
@@ -2460,7 +2720,7 @@ function PositionControls() {
|
|
|
2460
2720
|
}),
|
|
2461
2721
|
children: [
|
|
2462
2722
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "custom", disabled: true, children: strings.customPosition }),
|
|
2463
|
-
corners.map((corner) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: corner, children: corner.split("-").join(" ") }, corner))
|
|
2723
|
+
corners.map((corner) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: corner, children: strings.cornerNames?.[corner] ?? corner.split("-").join(" ") }, corner))
|
|
2464
2724
|
]
|
|
2465
2725
|
}
|
|
2466
2726
|
),
|
|
@@ -2516,7 +2776,7 @@ function Panel({
|
|
|
2516
2776
|
locale
|
|
2517
2777
|
}) {
|
|
2518
2778
|
const ctx = (0, import_react10.useContext)(AccessibilityContext);
|
|
2519
|
-
const effectiveLocale = locale
|
|
2779
|
+
const effectiveLocale = locale || ctx.locale || (typeof document !== "undefined" ? document.documentElement.lang : void 0) || "en";
|
|
2520
2780
|
const strings = resolveLocaleStrings(effectiveLocale);
|
|
2521
2781
|
const panelTitle = title ?? strings.title;
|
|
2522
2782
|
const panelDescription = description === void 0 ? strings.description : description;
|
|
@@ -2749,6 +3009,16 @@ var DEFAULT_PREFERENCES = Object.freeze({
|
|
|
2749
3009
|
saturation: "original",
|
|
2750
3010
|
tooltips: false
|
|
2751
3011
|
});
|
|
3012
|
+
var ALL_PROFILE_IDS = [
|
|
3013
|
+
"motor",
|
|
3014
|
+
"blind",
|
|
3015
|
+
"color-blind",
|
|
3016
|
+
"dyslexia",
|
|
3017
|
+
"low-vision",
|
|
3018
|
+
"cognitive",
|
|
3019
|
+
"seizure",
|
|
3020
|
+
"adhd"
|
|
3021
|
+
];
|
|
2752
3022
|
var PROFILE_DEFINITIONS = {
|
|
2753
3023
|
motor: {
|
|
2754
3024
|
id: "motor",
|
|
@@ -3028,6 +3298,249 @@ function preferencesReducer(state, action) {
|
|
|
3028
3298
|
}
|
|
3029
3299
|
}
|
|
3030
3300
|
|
|
3301
|
+
// src/core/profiles.ts
|
|
3302
|
+
function getProfileDefinition(id) {
|
|
3303
|
+
return PROFILE_DEFINITIONS[id];
|
|
3304
|
+
}
|
|
3305
|
+
function mapProfileSettingsToFeatures(settings) {
|
|
3306
|
+
const features = {};
|
|
3307
|
+
if (settings.fontScale !== void 0) {
|
|
3308
|
+
features.fontScale = settings.fontScale;
|
|
3309
|
+
features.textScale = settings.fontScale;
|
|
3310
|
+
features.fontSize = Math.round(settings.fontScale * 100);
|
|
3311
|
+
}
|
|
3312
|
+
if (settings.lineHeight !== void 0) {
|
|
3313
|
+
features.lineHeight = settings.lineHeight !== null ? Math.round(settings.lineHeight * 100) : 100;
|
|
3314
|
+
}
|
|
3315
|
+
if (settings.letterSpacingEm !== void 0) {
|
|
3316
|
+
features.letterSpacingEm = settings.letterSpacingEm;
|
|
3317
|
+
}
|
|
3318
|
+
if (settings.wordSpacingEm !== void 0) {
|
|
3319
|
+
features.wordSpacingEm = settings.wordSpacingEm;
|
|
3320
|
+
}
|
|
3321
|
+
if (settings.paragraphSpacingEm !== void 0) {
|
|
3322
|
+
features.paragraphSpacingEm = settings.paragraphSpacingEm;
|
|
3323
|
+
}
|
|
3324
|
+
if (settings.textAlign !== void 0) {
|
|
3325
|
+
features.textAlign = settings.textAlign === "original" ? "default" : settings.textAlign;
|
|
3326
|
+
}
|
|
3327
|
+
if (settings.contrastMode !== void 0) {
|
|
3328
|
+
features.contrastMode = settings.contrastMode;
|
|
3329
|
+
features.contrast = settings.contrastMode;
|
|
3330
|
+
}
|
|
3331
|
+
if (settings.highlightLinks !== void 0) {
|
|
3332
|
+
features.linkHighlight = settings.highlightLinks;
|
|
3333
|
+
}
|
|
3334
|
+
if (settings.highlightFocus !== void 0) {
|
|
3335
|
+
features.highlightFocus = settings.highlightFocus;
|
|
3336
|
+
features.focusHighlight = settings.highlightFocus;
|
|
3337
|
+
}
|
|
3338
|
+
if (settings.reduceMotion !== void 0) {
|
|
3339
|
+
features.reduceMotion = settings.reduceMotion;
|
|
3340
|
+
}
|
|
3341
|
+
if (settings.hideDecorativeImages !== void 0) {
|
|
3342
|
+
features.hideImages = settings.hideDecorativeImages;
|
|
3343
|
+
}
|
|
3344
|
+
if (settings.fontFamily !== void 0) {
|
|
3345
|
+
features.fontFamily = settings.fontFamily === "original" ? "default" : settings.fontFamily;
|
|
3346
|
+
}
|
|
3347
|
+
if (settings.cursorSize !== void 0) {
|
|
3348
|
+
features.bigCursor = settings.cursorSize === "large";
|
|
3349
|
+
}
|
|
3350
|
+
if (settings.readerMode !== void 0) {
|
|
3351
|
+
if (settings.readerMode === "guide") {
|
|
3352
|
+
features.readingGuide = true;
|
|
3353
|
+
features.readingMask = false;
|
|
3354
|
+
} else if (settings.readerMode === "mask") {
|
|
3355
|
+
features.readingMask = true;
|
|
3356
|
+
features.readingGuide = false;
|
|
3357
|
+
} else {
|
|
3358
|
+
features.readingGuide = false;
|
|
3359
|
+
features.readingMask = false;
|
|
3360
|
+
}
|
|
3361
|
+
}
|
|
3362
|
+
if (settings.saturation !== void 0) {
|
|
3363
|
+
features.saturation = settings.saturation === "low" ? 1 : settings.saturation === "high" ? 2 : 0;
|
|
3364
|
+
}
|
|
3365
|
+
if (settings.tooltips !== void 0) {
|
|
3366
|
+
features.tooltips = settings.tooltips;
|
|
3367
|
+
features.accessibleTooltips = settings.tooltips;
|
|
3368
|
+
}
|
|
3369
|
+
return features;
|
|
3370
|
+
}
|
|
3371
|
+
function mapFeaturesToProfileSettings(features) {
|
|
3372
|
+
const result = {
|
|
3373
|
+
...DEFAULT_PREFERENCES
|
|
3374
|
+
};
|
|
3375
|
+
if (typeof features.fontScale === "number") {
|
|
3376
|
+
result.fontScale = features.fontScale;
|
|
3377
|
+
} else if (typeof features.textScale === "number") {
|
|
3378
|
+
result.fontScale = features.textScale;
|
|
3379
|
+
} else if (typeof features.fontSize === "number") {
|
|
3380
|
+
result.fontScale = features.fontSize / 100;
|
|
3381
|
+
}
|
|
3382
|
+
if (features.lineHeight !== void 0) {
|
|
3383
|
+
result.lineHeight = typeof features.lineHeight === "number" ? features.lineHeight / 100 : null;
|
|
3384
|
+
}
|
|
3385
|
+
if (typeof features.contrastMode === "string") {
|
|
3386
|
+
result.contrastMode = features.contrastMode === "original" ? "off" : features.contrastMode;
|
|
3387
|
+
}
|
|
3388
|
+
if (features.linkHighlight !== void 0) {
|
|
3389
|
+
result.highlightLinks = Boolean(features.linkHighlight);
|
|
3390
|
+
}
|
|
3391
|
+
if (features.highlightFocus !== void 0 || features.focusHighlight !== void 0) {
|
|
3392
|
+
result.highlightFocus = Boolean(
|
|
3393
|
+
features.highlightFocus ?? features.focusHighlight
|
|
3394
|
+
);
|
|
3395
|
+
}
|
|
3396
|
+
if (features.reduceMotion !== void 0) {
|
|
3397
|
+
result.reduceMotion = Boolean(features.reduceMotion);
|
|
3398
|
+
}
|
|
3399
|
+
if (features.hideImages !== void 0) {
|
|
3400
|
+
result.hideDecorativeImages = Boolean(features.hideImages);
|
|
3401
|
+
}
|
|
3402
|
+
if (typeof features.fontFamily === "string") {
|
|
3403
|
+
result.fontFamily = features.fontFamily === "default" ? "original" : features.fontFamily;
|
|
3404
|
+
}
|
|
3405
|
+
if (features.bigCursor !== void 0) {
|
|
3406
|
+
result.cursorSize = features.bigCursor ? "large" : "original";
|
|
3407
|
+
}
|
|
3408
|
+
if (features.readingMask) {
|
|
3409
|
+
result.readerMode = "mask";
|
|
3410
|
+
} else if (features.readingGuide) {
|
|
3411
|
+
result.readerMode = "guide";
|
|
3412
|
+
} else if (features.readingMask === false || features.readingGuide === false) {
|
|
3413
|
+
result.readerMode = "off";
|
|
3414
|
+
}
|
|
3415
|
+
if (features.tooltips !== void 0 || features.accessibleTooltips !== void 0) {
|
|
3416
|
+
result.tooltips = Boolean(features.tooltips ?? features.accessibleTooltips);
|
|
3417
|
+
}
|
|
3418
|
+
return result;
|
|
3419
|
+
}
|
|
3420
|
+
function applyProfileToStore(profileId, currentFeatures, setFeatureState, existingActiveState) {
|
|
3421
|
+
const profile = PROFILE_DEFINITIONS[profileId];
|
|
3422
|
+
if (!profile) {
|
|
3423
|
+
throw new Error(`Unknown profile identifier: ${profileId}`);
|
|
3424
|
+
}
|
|
3425
|
+
const currentSettings = mapFeaturesToProfileSettings(currentFeatures);
|
|
3426
|
+
const targetSettings = profile.settings;
|
|
3427
|
+
const baseSnapshot = {
|
|
3428
|
+
...existingActiveState?.baseSnapshot ?? {}
|
|
3429
|
+
};
|
|
3430
|
+
for (const k of Object.keys(targetSettings)) {
|
|
3431
|
+
if (!(k in baseSnapshot)) {
|
|
3432
|
+
baseSnapshot[k] = currentSettings[k];
|
|
3433
|
+
}
|
|
3434
|
+
}
|
|
3435
|
+
const activeProfileState = {
|
|
3436
|
+
profileId,
|
|
3437
|
+
baseSnapshot,
|
|
3438
|
+
overrides: {}
|
|
3439
|
+
};
|
|
3440
|
+
const targetFeatures = mapProfileSettingsToFeatures(targetSettings);
|
|
3441
|
+
for (const [key, val] of Object.entries(targetFeatures)) {
|
|
3442
|
+
try {
|
|
3443
|
+
setFeatureState(key, val);
|
|
3444
|
+
} catch {
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
try {
|
|
3448
|
+
setFeatureState("activeProfile", activeProfileState);
|
|
3449
|
+
} catch {
|
|
3450
|
+
}
|
|
3451
|
+
return activeProfileState;
|
|
3452
|
+
}
|
|
3453
|
+
function revertProfileFromStore(activeProfileState, setFeatureState) {
|
|
3454
|
+
const { baseSnapshot, overrides } = activeProfileState;
|
|
3455
|
+
const restoredSettings = {};
|
|
3456
|
+
for (const [k, baseVal] of Object.entries(baseSnapshot)) {
|
|
3457
|
+
const key = k;
|
|
3458
|
+
if (key in overrides) {
|
|
3459
|
+
restoredSettings[key] = overrides[key];
|
|
3460
|
+
} else {
|
|
3461
|
+
restoredSettings[key] = baseVal;
|
|
3462
|
+
}
|
|
3463
|
+
}
|
|
3464
|
+
const restoredFeatures = mapProfileSettingsToFeatures(restoredSettings);
|
|
3465
|
+
for (const [key, val] of Object.entries(restoredFeatures)) {
|
|
3466
|
+
try {
|
|
3467
|
+
setFeatureState(key, val);
|
|
3468
|
+
} catch {
|
|
3469
|
+
}
|
|
3470
|
+
}
|
|
3471
|
+
try {
|
|
3472
|
+
setFeatureState("activeProfile", null);
|
|
3473
|
+
} catch {
|
|
3474
|
+
}
|
|
3475
|
+
}
|
|
3476
|
+
function recordProfileOverride(key, value, activeProfileState, setFeatureState) {
|
|
3477
|
+
if (!activeProfileState) return null;
|
|
3478
|
+
const nextOverrides = {
|
|
3479
|
+
...activeProfileState.overrides,
|
|
3480
|
+
[key]: value
|
|
3481
|
+
};
|
|
3482
|
+
const nextState = {
|
|
3483
|
+
...activeProfileState,
|
|
3484
|
+
overrides: nextOverrides
|
|
3485
|
+
};
|
|
3486
|
+
try {
|
|
3487
|
+
setFeatureState("activeProfile", nextState);
|
|
3488
|
+
} catch {
|
|
3489
|
+
}
|
|
3490
|
+
return nextState;
|
|
3491
|
+
}
|
|
3492
|
+
|
|
3493
|
+
// src/core/useProfiles.ts
|
|
3494
|
+
var import_react12 = require("react");
|
|
3495
|
+
function useProfiles() {
|
|
3496
|
+
const ctx = (0, import_react12.useContext)(AccessibilityContext);
|
|
3497
|
+
if (!ctx) {
|
|
3498
|
+
throw new Error(
|
|
3499
|
+
"useProfiles must be used within an <AccessibilityPlugin> provider."
|
|
3500
|
+
);
|
|
3501
|
+
}
|
|
3502
|
+
const { value: activeProfileState, setValue: setActiveProfileState } = useAccessibility("activeProfile", null);
|
|
3503
|
+
const applyProfile = (0, import_react12.useCallback)(
|
|
3504
|
+
(profileId) => {
|
|
3505
|
+
const nextState = applyProfileToStore(
|
|
3506
|
+
profileId,
|
|
3507
|
+
ctx.state.features,
|
|
3508
|
+
ctx.setFeatureState,
|
|
3509
|
+
activeProfileState
|
|
3510
|
+
);
|
|
3511
|
+
setActiveProfileState(nextState);
|
|
3512
|
+
},
|
|
3513
|
+
[
|
|
3514
|
+
ctx.state.features,
|
|
3515
|
+
ctx.setFeatureState,
|
|
3516
|
+
activeProfileState,
|
|
3517
|
+
setActiveProfileState
|
|
3518
|
+
]
|
|
3519
|
+
);
|
|
3520
|
+
const revertProfile = (0, import_react12.useCallback)(() => {
|
|
3521
|
+
if (activeProfileState) {
|
|
3522
|
+
revertProfileFromStore(activeProfileState, ctx.setFeatureState);
|
|
3523
|
+
setActiveProfileState(null);
|
|
3524
|
+
}
|
|
3525
|
+
}, [activeProfileState, ctx.setFeatureState, setActiveProfileState]);
|
|
3526
|
+
const activeProfileId = activeProfileState?.profileId ?? null;
|
|
3527
|
+
const activeProfile = activeProfileId ? getProfileDefinition(activeProfileId) ?? null : null;
|
|
3528
|
+
const isProfileActive = (0, import_react12.useCallback)(
|
|
3529
|
+
(id) => activeProfileId === id,
|
|
3530
|
+
[activeProfileId]
|
|
3531
|
+
);
|
|
3532
|
+
const allProfiles = ALL_PROFILE_IDS.map((id) => PROFILE_DEFINITIONS[id]);
|
|
3533
|
+
return {
|
|
3534
|
+
profiles: allProfiles,
|
|
3535
|
+
activeProfileId,
|
|
3536
|
+
activeProfile,
|
|
3537
|
+
activeProfileState,
|
|
3538
|
+
applyProfile,
|
|
3539
|
+
revertProfile,
|
|
3540
|
+
isProfileActive
|
|
3541
|
+
};
|
|
3542
|
+
}
|
|
3543
|
+
|
|
3031
3544
|
// src/core/FeatureIcon.tsx
|
|
3032
3545
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
3033
3546
|
var drawings = {
|
|
@@ -3100,6 +3613,19 @@ var drawings = {
|
|
|
3100
3613
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
|
|
3101
3614
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M8 9h8M8 13h5" })
|
|
3102
3615
|
] }),
|
|
3616
|
+
pageNavigator: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
3617
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
3618
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polygon", { points: "12 3 15.5 10.5 12 9 8.5 10.5 12 3", fill: "currentColor" }),
|
|
3619
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polygon", { points: "12 21 8.5 13.5 12 15 15.5 13.5 12 21" })
|
|
3620
|
+
] }),
|
|
3621
|
+
headings: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 6v12M14 6v12M4 12h10M18 10h3M18 14h3M18 18h3" }) }),
|
|
3622
|
+
landmarks: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1zM4 22v-7" }) }),
|
|
3623
|
+
profiles: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
3624
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
3625
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
|
|
3626
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75" })
|
|
3627
|
+
] }),
|
|
3628
|
+
presets: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" }) }),
|
|
3103
3629
|
reset: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 10a9 9 0 1 1 1 7M3 4v6h6" }) })
|
|
3104
3630
|
};
|
|
3105
3631
|
function FeatureIcon({ name }) {
|
|
@@ -3210,13 +3736,17 @@ function FontSizeController({
|
|
|
3210
3736
|
}
|
|
3211
3737
|
|
|
3212
3738
|
// src/features/TextScaleController.tsx
|
|
3739
|
+
var import_react13 = require("react");
|
|
3213
3740
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
3214
3741
|
var FEATURE_KEY2 = "fontScale";
|
|
3215
3742
|
var DEFAULT_VALUE2 = 1;
|
|
3216
3743
|
function TextScaleController({
|
|
3217
3744
|
steps = TEXT_SCALE_STEPS,
|
|
3218
|
-
label
|
|
3745
|
+
label
|
|
3219
3746
|
} = {}) {
|
|
3747
|
+
const ctx = (0, import_react13.useContext)(AccessibilityContext);
|
|
3748
|
+
const strings = resolveLocaleStrings(ctx?.locale);
|
|
3749
|
+
const effectiveLabel = label ?? strings.features?.textScale ?? "Bigger Text";
|
|
3220
3750
|
const { value, setValue } = useAccessibility(
|
|
3221
3751
|
FEATURE_KEY2,
|
|
3222
3752
|
DEFAULT_VALUE2
|
|
@@ -3246,11 +3776,11 @@ function TextScaleController({
|
|
|
3246
3776
|
{
|
|
3247
3777
|
className: "arap-feature arap-feature-stepper",
|
|
3248
3778
|
role: "group",
|
|
3249
|
-
"aria-label":
|
|
3779
|
+
"aria-label": effectiveLabel,
|
|
3250
3780
|
children: [
|
|
3251
3781
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "arap-label", children: [
|
|
3252
3782
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FeatureIcon, { name: "fontSize" }),
|
|
3253
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children:
|
|
3783
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: effectiveLabel })
|
|
3254
3784
|
] }),
|
|
3255
3785
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "arap-controls", children: [
|
|
3256
3786
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -3259,7 +3789,7 @@ function TextScaleController({
|
|
|
3259
3789
|
className: "arap-btn-sm",
|
|
3260
3790
|
onClick: handleDecrease,
|
|
3261
3791
|
disabled: isMin,
|
|
3262
|
-
"aria-label": "Decrease text size",
|
|
3792
|
+
"aria-label": strings.decreaseTextSize ?? "Decrease text size",
|
|
3263
3793
|
type: "button",
|
|
3264
3794
|
children: "\u2212"
|
|
3265
3795
|
}
|
|
@@ -3274,7 +3804,7 @@ function TextScaleController({
|
|
|
3274
3804
|
className: "arap-btn-sm",
|
|
3275
3805
|
onClick: handleIncrease,
|
|
3276
3806
|
disabled: isMax,
|
|
3277
|
-
"aria-label": "Increase text size",
|
|
3807
|
+
"aria-label": strings.increaseTextSize ?? "Increase text size",
|
|
3278
3808
|
type: "button",
|
|
3279
3809
|
children: "+"
|
|
3280
3810
|
}
|
|
@@ -3642,7 +4172,7 @@ function ParagraphSpacingController({
|
|
|
3642
4172
|
}
|
|
3643
4173
|
|
|
3644
4174
|
// src/features/ContrastController.tsx
|
|
3645
|
-
var
|
|
4175
|
+
var import_react14 = require("react");
|
|
3646
4176
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3647
4177
|
var FEATURE_KEY7 = "contrast";
|
|
3648
4178
|
var DEFAULT_VALUE7 = 0;
|
|
@@ -3665,7 +4195,7 @@ function ContrastController() {
|
|
|
3665
4195
|
FEATURE_KEY7,
|
|
3666
4196
|
DEFAULT_VALUE7
|
|
3667
4197
|
);
|
|
3668
|
-
const forcedColors = (0,
|
|
4198
|
+
const forcedColors = (0, import_react14.useSyncExternalStore)(
|
|
3669
4199
|
subscribeForcedColors,
|
|
3670
4200
|
isForcedColorsActive,
|
|
3671
4201
|
() => false
|
|
@@ -3697,7 +4227,7 @@ function ContrastController() {
|
|
|
3697
4227
|
}
|
|
3698
4228
|
|
|
3699
4229
|
// src/features/ContrastModeController.tsx
|
|
3700
|
-
var
|
|
4230
|
+
var import_react15 = require("react");
|
|
3701
4231
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3702
4232
|
var FEATURE_KEY8 = "contrastMode";
|
|
3703
4233
|
var DEFAULT_VALUE8 = "off";
|
|
@@ -3713,7 +4243,7 @@ function ContrastModeController() {
|
|
|
3713
4243
|
FEATURE_KEY8,
|
|
3714
4244
|
DEFAULT_VALUE8
|
|
3715
4245
|
);
|
|
3716
|
-
const forcedColors = (0,
|
|
4246
|
+
const forcedColors = (0, import_react15.useSyncExternalStore)(
|
|
3717
4247
|
subscribeForcedColors,
|
|
3718
4248
|
isForcedColorsActive,
|
|
3719
4249
|
() => false
|
|
@@ -4019,7 +4549,7 @@ function HideVideosController() {
|
|
|
4019
4549
|
}
|
|
4020
4550
|
|
|
4021
4551
|
// src/features/BigCursorController.tsx
|
|
4022
|
-
var
|
|
4552
|
+
var import_react16 = require("react");
|
|
4023
4553
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4024
4554
|
var FEATURE_KEY17 = "bigCursor";
|
|
4025
4555
|
var DEFAULT_VALUE17 = false;
|
|
@@ -4030,10 +4560,10 @@ function BigCursorController({
|
|
|
4030
4560
|
FEATURE_KEY17,
|
|
4031
4561
|
DEFAULT_VALUE17
|
|
4032
4562
|
);
|
|
4033
|
-
const [finePointer, setFinePointer] = (0,
|
|
4563
|
+
const [finePointer, setFinePointer] = (0, import_react16.useState)(
|
|
4034
4564
|
() => hasFinePointer()
|
|
4035
4565
|
);
|
|
4036
|
-
(0,
|
|
4566
|
+
(0, import_react16.useEffect)(() => {
|
|
4037
4567
|
return subscribeFinePointer(() => {
|
|
4038
4568
|
setFinePointer(hasFinePointer());
|
|
4039
4569
|
});
|
|
@@ -4396,7 +4926,7 @@ function HighlightFocusController() {
|
|
|
4396
4926
|
var FocusHighlightController = HighlightFocusController;
|
|
4397
4927
|
|
|
4398
4928
|
// src/features/ReduceMotionController.tsx
|
|
4399
|
-
var
|
|
4929
|
+
var import_react17 = require("react");
|
|
4400
4930
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4401
4931
|
var FEATURE_KEY21 = "reduceMotion";
|
|
4402
4932
|
var DEFAULT_VALUE21 = false;
|
|
@@ -4405,7 +4935,7 @@ function ReduceMotionController() {
|
|
|
4405
4935
|
FEATURE_KEY21,
|
|
4406
4936
|
DEFAULT_VALUE21
|
|
4407
4937
|
);
|
|
4408
|
-
const osReducedMotion = (0,
|
|
4938
|
+
const osReducedMotion = (0, import_react17.useSyncExternalStore)(
|
|
4409
4939
|
subscribeReducedMotion,
|
|
4410
4940
|
isReducedMotionActive,
|
|
4411
4941
|
() => false
|
|
@@ -4486,87 +5016,1866 @@ function TooltipsController({
|
|
|
4486
5016
|
}
|
|
4487
5017
|
var AccessibleTooltipsController = TooltipsController;
|
|
4488
5018
|
|
|
4489
|
-
// src/features/
|
|
4490
|
-
var
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
5019
|
+
// src/features/PageNavigatorController.tsx
|
|
5020
|
+
var import_react18 = require("react");
|
|
5021
|
+
|
|
5022
|
+
// src/core/pageNavigator.ts
|
|
5023
|
+
var EXCLUDED_TAGS = /* @__PURE__ */ new Set([
|
|
5024
|
+
"SCRIPT",
|
|
5025
|
+
"STYLE",
|
|
5026
|
+
"LINK",
|
|
5027
|
+
"META",
|
|
5028
|
+
"NOSCRIPT",
|
|
5029
|
+
"TEMPLATE"
|
|
5030
|
+
]);
|
|
5031
|
+
function isElementVisible(el) {
|
|
5032
|
+
if (el.getAttribute("aria-hidden") === "true") return false;
|
|
5033
|
+
if (el.getAttribute("hidden") !== null) return false;
|
|
5034
|
+
if (el.closest("[aria-hidden='true']")) return false;
|
|
5035
|
+
if (el.style.display === "none" || el.style.visibility === "hidden") {
|
|
5036
|
+
return false;
|
|
4499
5037
|
}
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
const
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
5038
|
+
return true;
|
|
5039
|
+
}
|
|
5040
|
+
function scanHeadings(root) {
|
|
5041
|
+
const doc = root || (typeof document !== "undefined" ? document : null);
|
|
5042
|
+
if (!doc) return [];
|
|
5043
|
+
const candidates = doc.querySelectorAll(
|
|
5044
|
+
"h1, h2, h3, h4, h5, h6, [role='heading']"
|
|
5045
|
+
);
|
|
5046
|
+
const items = [];
|
|
5047
|
+
let index = 0;
|
|
5048
|
+
candidates.forEach((node) => {
|
|
5049
|
+
if (!(node instanceof HTMLElement)) return;
|
|
5050
|
+
if (EXCLUDED_TAGS.has(node.tagName)) return;
|
|
5051
|
+
if (node.closest("[data-arap-ui]")) return;
|
|
5052
|
+
if (!isElementVisible(node)) return;
|
|
5053
|
+
let level = 2;
|
|
5054
|
+
const match = node.tagName.match(/^H([1-6])$/i);
|
|
5055
|
+
if (match) {
|
|
5056
|
+
level = parseInt(match[1], 10);
|
|
5057
|
+
} else if (node.getAttribute("role") === "heading") {
|
|
5058
|
+
const ariaLevel = parseInt(node.getAttribute("aria-level") || "2", 10);
|
|
5059
|
+
level = Math.max(1, Math.min(6, isNaN(ariaLevel) ? 2 : ariaLevel));
|
|
5060
|
+
}
|
|
5061
|
+
const text = node.getAttribute("aria-label")?.trim() || node.textContent?.trim() || "";
|
|
5062
|
+
if (!text) return;
|
|
5063
|
+
items.push({
|
|
5064
|
+
id: node.id || `arap-heading-${++index}`,
|
|
5065
|
+
level,
|
|
5066
|
+
text,
|
|
5067
|
+
element: node
|
|
5068
|
+
});
|
|
5069
|
+
});
|
|
5070
|
+
return items;
|
|
5071
|
+
}
|
|
5072
|
+
var LANDMARK_TAGS = {
|
|
5073
|
+
HEADER: "banner",
|
|
5074
|
+
NAV: "navigation",
|
|
5075
|
+
MAIN: "main",
|
|
5076
|
+
ASIDE: "complementary",
|
|
5077
|
+
FOOTER: "contentinfo",
|
|
5078
|
+
FORM: "form",
|
|
5079
|
+
SECTION: "region"
|
|
5080
|
+
};
|
|
5081
|
+
var LANDMARK_TITLES = {
|
|
5082
|
+
banner: "Header (Banner)",
|
|
5083
|
+
navigation: "Navigation",
|
|
5084
|
+
main: "Main Content",
|
|
5085
|
+
complementary: "Sidebar (Complementary)",
|
|
5086
|
+
contentinfo: "Footer (Content Info)",
|
|
5087
|
+
search: "Search",
|
|
5088
|
+
region: "Region",
|
|
5089
|
+
form: "Form"
|
|
5090
|
+
};
|
|
5091
|
+
function isScopedHeaderOrFooter(el) {
|
|
5092
|
+
const parentSection = el.parentElement?.closest(
|
|
5093
|
+
"article, aside, main, nav, section"
|
|
5094
|
+
);
|
|
5095
|
+
return Boolean(parentSection && !parentSection.closest("[data-arap-ui]"));
|
|
5096
|
+
}
|
|
5097
|
+
function scanLandmarks(root) {
|
|
5098
|
+
const doc = root || (typeof document !== "undefined" ? document : null);
|
|
5099
|
+
if (!doc) return [];
|
|
5100
|
+
const candidates = doc.querySelectorAll(
|
|
5101
|
+
"header, nav, main, aside, footer, form[role='search'], [role='banner'], [role='navigation'], [role='main'], [role='complementary'], [role='contentinfo'], [role='search'], [role='region'][aria-label], [role='region'][aria-labelledby], section[aria-label], section[aria-labelledby], a[id]:not([href]), a[name]"
|
|
5102
|
+
);
|
|
5103
|
+
const items = [];
|
|
5104
|
+
let index = 0;
|
|
5105
|
+
candidates.forEach((node) => {
|
|
5106
|
+
if (!(node instanceof HTMLElement)) return;
|
|
5107
|
+
if (EXCLUDED_TAGS.has(node.tagName)) return;
|
|
5108
|
+
if (node.closest("[data-arap-ui]")) return;
|
|
5109
|
+
if (!isElementVisible(node)) return;
|
|
5110
|
+
let type = "";
|
|
5111
|
+
const explicitRole = node.getAttribute("role");
|
|
5112
|
+
if (explicitRole && [
|
|
5113
|
+
"banner",
|
|
5114
|
+
"navigation",
|
|
5115
|
+
"main",
|
|
5116
|
+
"complementary",
|
|
5117
|
+
"contentinfo",
|
|
5118
|
+
"search",
|
|
5119
|
+
"region",
|
|
5120
|
+
"form"
|
|
5121
|
+
].includes(explicitRole)) {
|
|
5122
|
+
type = explicitRole;
|
|
5123
|
+
} else if (node.tagName in LANDMARK_TAGS) {
|
|
5124
|
+
if ((node.tagName === "HEADER" || node.tagName === "FOOTER") && isScopedHeaderOrFooter(node)) {
|
|
5125
|
+
return;
|
|
5126
|
+
}
|
|
5127
|
+
type = LANDMARK_TAGS[node.tagName];
|
|
5128
|
+
} else if (node.tagName === "A" && (node.id || node.getAttribute("name"))) {
|
|
5129
|
+
type = "anchor";
|
|
5130
|
+
}
|
|
5131
|
+
if (!type) return;
|
|
5132
|
+
let label = node.getAttribute("aria-label")?.trim() || "";
|
|
5133
|
+
if (!label && node.getAttribute("aria-labelledby")) {
|
|
5134
|
+
const labelId = node.getAttribute("aria-labelledby").trim();
|
|
5135
|
+
const labelEl = document.getElementById(labelId);
|
|
5136
|
+
if (labelEl) {
|
|
5137
|
+
label = labelEl.textContent?.trim() || "";
|
|
5138
|
+
}
|
|
5139
|
+
}
|
|
5140
|
+
if (!label) {
|
|
5141
|
+
if (type === "anchor") {
|
|
5142
|
+
label = node.textContent?.trim() || node.id || node.getAttribute("name") || "Named Anchor";
|
|
5143
|
+
} else {
|
|
5144
|
+
label = LANDMARK_TITLES[type] || type.charAt(0).toUpperCase() + type.slice(1);
|
|
5145
|
+
}
|
|
5146
|
+
}
|
|
5147
|
+
items.push({
|
|
5148
|
+
id: node.id || `arap-landmark-${++index}`,
|
|
5149
|
+
type,
|
|
5150
|
+
label,
|
|
5151
|
+
element: node
|
|
5152
|
+
});
|
|
5153
|
+
});
|
|
5154
|
+
return items;
|
|
5155
|
+
}
|
|
5156
|
+
function navigateToElement(element, options = {}) {
|
|
5157
|
+
if (!element || !element.isConnected) return;
|
|
5158
|
+
const isNaturallyFocusable = element instanceof HTMLAnchorElement || element instanceof HTMLButtonElement || element instanceof HTMLInputElement || element instanceof HTMLSelectElement || element instanceof HTMLTextAreaElement || element.hasAttribute("tabindex");
|
|
5159
|
+
const hadTabIndex = element.hasAttribute("tabindex");
|
|
5160
|
+
const previousTabIndex = element.getAttribute("tabindex");
|
|
5161
|
+
if (!isNaturallyFocusable) {
|
|
5162
|
+
element.setAttribute("tabindex", "-1");
|
|
5163
|
+
}
|
|
5164
|
+
const isReduced = typeof window !== "undefined" && window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
5165
|
+
const behavior = options.behavior ?? (isReduced ? "auto" : "smooth");
|
|
5166
|
+
element.scrollIntoView({ behavior, block: "start" });
|
|
5167
|
+
element.focus();
|
|
5168
|
+
if (!isNaturallyFocusable) {
|
|
5169
|
+
const handleBlur = () => {
|
|
5170
|
+
if (hadTabIndex && previousTabIndex !== null) {
|
|
5171
|
+
element.setAttribute("tabindex", previousTabIndex);
|
|
5172
|
+
} else {
|
|
5173
|
+
element.removeAttribute("tabindex");
|
|
5174
|
+
}
|
|
5175
|
+
element.removeEventListener("blur", handleBlur);
|
|
5176
|
+
};
|
|
5177
|
+
element.addEventListener("blur", handleBlur, { once: true });
|
|
5178
|
+
}
|
|
5179
|
+
options.onComplete?.();
|
|
5180
|
+
}
|
|
5181
|
+
function subscribePageStructure(callback) {
|
|
5182
|
+
if (typeof MutationObserver === "undefined" || typeof document === "undefined" || !document.body) {
|
|
5183
|
+
return () => {
|
|
5184
|
+
};
|
|
5185
|
+
}
|
|
5186
|
+
let timer = null;
|
|
5187
|
+
const observer = new MutationObserver((mutations) => {
|
|
5188
|
+
const isExternal = mutations.some((m) => {
|
|
5189
|
+
const target = m.target;
|
|
5190
|
+
if (target instanceof Element && target.closest("[data-arap-ui]")) {
|
|
5191
|
+
return false;
|
|
5192
|
+
}
|
|
5193
|
+
return [...m.addedNodes, ...m.removedNodes].some((node) => {
|
|
5194
|
+
return !(node instanceof Element && node.closest("[data-arap-ui]"));
|
|
5195
|
+
});
|
|
5196
|
+
});
|
|
5197
|
+
if (!isExternal) return;
|
|
5198
|
+
if (timer) clearTimeout(timer);
|
|
5199
|
+
timer = setTimeout(() => {
|
|
5200
|
+
callback();
|
|
5201
|
+
}, 100);
|
|
5202
|
+
});
|
|
5203
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
5204
|
+
return () => {
|
|
5205
|
+
if (timer) clearTimeout(timer);
|
|
5206
|
+
observer.disconnect();
|
|
5207
|
+
};
|
|
4508
5208
|
}
|
|
4509
5209
|
|
|
4510
|
-
// src/
|
|
4511
|
-
var
|
|
4512
|
-
function
|
|
4513
|
-
id,
|
|
4514
|
-
label,
|
|
4515
|
-
checked,
|
|
4516
|
-
onChange,
|
|
4517
|
-
disabled = false,
|
|
4518
|
-
unavailable = false,
|
|
4519
|
-
unavailableReason,
|
|
4520
|
-
name,
|
|
4521
|
-
description,
|
|
4522
|
-
largeControls = false,
|
|
5210
|
+
// src/features/PageNavigatorController.tsx
|
|
5211
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5212
|
+
function PageNavigatorController({
|
|
4523
5213
|
className = "",
|
|
4524
|
-
|
|
5214
|
+
label = "Page Navigator",
|
|
5215
|
+
description = "Explore headings and landmarks",
|
|
5216
|
+
closeOnNavigate = false
|
|
4525
5217
|
}) {
|
|
4526
|
-
const
|
|
4527
|
-
const
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
5218
|
+
const [isOpen, setIsOpen] = (0, import_react18.useState)(false);
|
|
5219
|
+
const [activeTab, setActiveTab] = (0, import_react18.useState)(
|
|
5220
|
+
"headings"
|
|
5221
|
+
);
|
|
5222
|
+
const [headings, setHeadings] = (0, import_react18.useState)([]);
|
|
5223
|
+
const [landmarks, setLandmarks] = (0, import_react18.useState)([]);
|
|
5224
|
+
const [search, setSearch] = (0, import_react18.useState)("");
|
|
5225
|
+
const triggerRef = (0, import_react18.useRef)(null);
|
|
5226
|
+
const dialogRef = (0, import_react18.useRef)(null);
|
|
5227
|
+
const refreshStructure = (0, import_react18.useCallback)(() => {
|
|
5228
|
+
setHeadings(scanHeadings());
|
|
5229
|
+
setLandmarks(scanLandmarks());
|
|
5230
|
+
}, []);
|
|
5231
|
+
const handleOpen = () => {
|
|
5232
|
+
refreshStructure();
|
|
5233
|
+
setIsOpen(true);
|
|
5234
|
+
};
|
|
5235
|
+
const handleClose = () => {
|
|
5236
|
+
setIsOpen(false);
|
|
5237
|
+
triggerRef.current?.focus();
|
|
5238
|
+
};
|
|
5239
|
+
(0, import_react18.useEffect)(() => {
|
|
5240
|
+
if (!isOpen) return;
|
|
5241
|
+
return subscribePageStructure(refreshStructure);
|
|
5242
|
+
}, [isOpen, refreshStructure]);
|
|
5243
|
+
(0, import_react18.useEffect)(() => {
|
|
5244
|
+
if (isOpen) {
|
|
5245
|
+
dialogRef.current?.focus();
|
|
4531
5246
|
}
|
|
5247
|
+
}, [isOpen]);
|
|
5248
|
+
const handleNavigate = (element) => {
|
|
5249
|
+
navigateToElement(element, {
|
|
5250
|
+
onComplete: () => {
|
|
5251
|
+
if (closeOnNavigate) {
|
|
5252
|
+
setIsOpen(false);
|
|
5253
|
+
}
|
|
5254
|
+
}
|
|
5255
|
+
});
|
|
4532
5256
|
};
|
|
4533
|
-
|
|
5257
|
+
const filteredHeadings = search.trim() ? headings.filter(
|
|
5258
|
+
(h) => h.text.toLowerCase().includes(search.toLowerCase())
|
|
5259
|
+
) : headings;
|
|
5260
|
+
const filteredLandmarks = search.trim() ? landmarks.filter(
|
|
5261
|
+
(l) => l.label.toLowerCase().includes(search.toLowerCase())
|
|
5262
|
+
) : landmarks;
|
|
5263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4534
5264
|
"div",
|
|
4535
5265
|
{
|
|
4536
|
-
className: `arap-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
5266
|
+
className: `arap-feature arap-feature-expandable ${className}`,
|
|
5267
|
+
role: "group",
|
|
5268
|
+
"aria-label": label,
|
|
5269
|
+
children: [
|
|
5270
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5271
|
+
"div",
|
|
5272
|
+
{
|
|
5273
|
+
style: {
|
|
5274
|
+
display: "flex",
|
|
5275
|
+
alignItems: "center",
|
|
5276
|
+
justifyContent: "space-between",
|
|
5277
|
+
width: "100%"
|
|
5278
|
+
},
|
|
5279
|
+
children: [
|
|
5280
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "arap-label", children: [
|
|
5281
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FeatureIcon, { name: "pageNavigator" }),
|
|
5282
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { children: [
|
|
5283
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { style: { display: "block" }, children: label }),
|
|
5284
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5285
|
+
"span",
|
|
5286
|
+
{
|
|
5287
|
+
style: {
|
|
5288
|
+
display: "block",
|
|
5289
|
+
fontSize: "11px",
|
|
5290
|
+
fontWeight: 400,
|
|
5291
|
+
color: "var(--arap-muted, #64748b)",
|
|
5292
|
+
marginTop: "1px"
|
|
5293
|
+
},
|
|
5294
|
+
children: description
|
|
5295
|
+
}
|
|
5296
|
+
)
|
|
5297
|
+
] })
|
|
5298
|
+
] }),
|
|
5299
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5300
|
+
"button",
|
|
5301
|
+
{
|
|
5302
|
+
ref: triggerRef,
|
|
5303
|
+
className: "arap-btn-sm",
|
|
5304
|
+
type: "button",
|
|
5305
|
+
"aria-expanded": isOpen,
|
|
5306
|
+
"aria-controls": "arap-page-navigator-dialog",
|
|
5307
|
+
onClick: () => {
|
|
5308
|
+
if (isOpen) {
|
|
5309
|
+
handleClose();
|
|
5310
|
+
} else {
|
|
5311
|
+
handleOpen();
|
|
5312
|
+
}
|
|
5313
|
+
},
|
|
5314
|
+
children: isOpen ? "Close" : "Explore"
|
|
5315
|
+
}
|
|
5316
|
+
)
|
|
5317
|
+
]
|
|
5318
|
+
}
|
|
5319
|
+
),
|
|
5320
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5321
|
+
"div",
|
|
5322
|
+
{
|
|
5323
|
+
ref: dialogRef,
|
|
5324
|
+
id: "arap-page-navigator-dialog",
|
|
5325
|
+
className: "arap-navigator-dialog",
|
|
5326
|
+
role: "region",
|
|
5327
|
+
"aria-label": "Page Structure Explorer",
|
|
5328
|
+
tabIndex: -1,
|
|
5329
|
+
onKeyDown: (event) => {
|
|
5330
|
+
if (event.key === "Escape") {
|
|
5331
|
+
event.stopPropagation();
|
|
5332
|
+
handleClose();
|
|
4558
5333
|
}
|
|
4559
|
-
}
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
5334
|
+
},
|
|
5335
|
+
children: [
|
|
5336
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5337
|
+
"div",
|
|
5338
|
+
{
|
|
5339
|
+
className: "arap-navigator-tabs",
|
|
5340
|
+
role: "tablist",
|
|
5341
|
+
"aria-label": "Structure views",
|
|
5342
|
+
children: [
|
|
5343
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5344
|
+
"button",
|
|
5345
|
+
{
|
|
5346
|
+
id: "arap-tab-headings",
|
|
5347
|
+
className: `arap-navigator-tab ${activeTab === "headings" ? "arap-navigator-tab-active" : ""}`,
|
|
5348
|
+
role: "tab",
|
|
5349
|
+
"aria-selected": activeTab === "headings",
|
|
5350
|
+
"aria-controls": "arap-panel-headings",
|
|
5351
|
+
type: "button",
|
|
5352
|
+
onClick: () => setActiveTab("headings"),
|
|
5353
|
+
onKeyDown: (e) => {
|
|
5354
|
+
if (e.key === "ArrowRight") {
|
|
5355
|
+
document.getElementById("arap-tab-landmarks")?.focus();
|
|
5356
|
+
setActiveTab("landmarks");
|
|
5357
|
+
}
|
|
5358
|
+
},
|
|
5359
|
+
children: [
|
|
5360
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FeatureIcon, { name: "headings" }),
|
|
5361
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { children: [
|
|
5362
|
+
"Headings (",
|
|
5363
|
+
headings.length,
|
|
5364
|
+
")"
|
|
5365
|
+
] })
|
|
5366
|
+
]
|
|
5367
|
+
}
|
|
5368
|
+
),
|
|
5369
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5370
|
+
"button",
|
|
5371
|
+
{
|
|
5372
|
+
id: "arap-tab-landmarks",
|
|
5373
|
+
className: `arap-navigator-tab ${activeTab === "landmarks" ? "arap-navigator-tab-active" : ""}`,
|
|
5374
|
+
role: "tab",
|
|
5375
|
+
"aria-selected": activeTab === "landmarks",
|
|
5376
|
+
"aria-controls": "arap-panel-landmarks",
|
|
5377
|
+
type: "button",
|
|
5378
|
+
onClick: () => setActiveTab("landmarks"),
|
|
5379
|
+
onKeyDown: (e) => {
|
|
5380
|
+
if (e.key === "ArrowLeft") {
|
|
5381
|
+
document.getElementById("arap-tab-headings")?.focus();
|
|
5382
|
+
setActiveTab("headings");
|
|
5383
|
+
}
|
|
5384
|
+
},
|
|
5385
|
+
children: [
|
|
5386
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FeatureIcon, { name: "landmarks" }),
|
|
5387
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { children: [
|
|
5388
|
+
"Landmarks (",
|
|
5389
|
+
landmarks.length,
|
|
5390
|
+
")"
|
|
5391
|
+
] })
|
|
5392
|
+
]
|
|
5393
|
+
}
|
|
5394
|
+
)
|
|
5395
|
+
]
|
|
5396
|
+
}
|
|
5397
|
+
),
|
|
5398
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-navigator-search-box", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5399
|
+
"input",
|
|
5400
|
+
{
|
|
5401
|
+
type: "search",
|
|
5402
|
+
className: "arap-navigator-search",
|
|
5403
|
+
placeholder: `Filter ${activeTab}...`,
|
|
5404
|
+
value: search,
|
|
5405
|
+
onChange: (e) => setSearch(e.target.value),
|
|
5406
|
+
"aria-label": `Filter ${activeTab}`
|
|
5407
|
+
}
|
|
5408
|
+
) }),
|
|
5409
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-navigator-content", children: [
|
|
5410
|
+
activeTab === "headings" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5411
|
+
"div",
|
|
5412
|
+
{
|
|
5413
|
+
id: "arap-panel-headings",
|
|
5414
|
+
role: "tabpanel",
|
|
5415
|
+
"aria-labelledby": "arap-tab-headings",
|
|
5416
|
+
children: filteredHeadings.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-navigator-empty", role: "status", children: headings.length === 0 ? "No headings found on this page." : "No matching headings." }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { className: "arap-navigator-list", role: "list", children: filteredHeadings.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { className: "arap-navigator-item", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5417
|
+
"button",
|
|
5418
|
+
{
|
|
5419
|
+
type: "button",
|
|
5420
|
+
className: "arap-navigator-jump-btn",
|
|
5421
|
+
style: {
|
|
5422
|
+
paddingLeft: `${Math.max(8, (h.level - 1) * 12 + 8)}px`
|
|
5423
|
+
},
|
|
5424
|
+
onClick: () => handleNavigate(h.element),
|
|
5425
|
+
children: [
|
|
5426
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5427
|
+
"span",
|
|
5428
|
+
{
|
|
5429
|
+
className: "arap-navigator-badge arap-navigator-badge-h",
|
|
5430
|
+
"aria-hidden": "true",
|
|
5431
|
+
children: [
|
|
5432
|
+
"H",
|
|
5433
|
+
h.level
|
|
5434
|
+
]
|
|
5435
|
+
}
|
|
5436
|
+
),
|
|
5437
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-navigator-item-text", children: h.text })
|
|
5438
|
+
]
|
|
5439
|
+
}
|
|
5440
|
+
) }, `${h.id}-${i}`)) })
|
|
5441
|
+
}
|
|
5442
|
+
),
|
|
5443
|
+
activeTab === "landmarks" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5444
|
+
"div",
|
|
5445
|
+
{
|
|
5446
|
+
id: "arap-panel-landmarks",
|
|
5447
|
+
role: "tabpanel",
|
|
5448
|
+
"aria-labelledby": "arap-tab-landmarks",
|
|
5449
|
+
children: filteredLandmarks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-navigator-empty", role: "status", children: landmarks.length === 0 ? "No landmarks found on this page." : "No matching landmarks." }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { className: "arap-navigator-list", role: "list", children: filteredLandmarks.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { className: "arap-navigator-item", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5450
|
+
"button",
|
|
5451
|
+
{
|
|
5452
|
+
type: "button",
|
|
5453
|
+
className: "arap-navigator-jump-btn",
|
|
5454
|
+
onClick: () => handleNavigate(l.element),
|
|
5455
|
+
children: [
|
|
5456
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5457
|
+
"span",
|
|
5458
|
+
{
|
|
5459
|
+
className: "arap-navigator-badge arap-navigator-badge-l",
|
|
5460
|
+
"aria-hidden": "true",
|
|
5461
|
+
children: l.type.toUpperCase()
|
|
5462
|
+
}
|
|
5463
|
+
),
|
|
5464
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-navigator-item-text", children: l.label })
|
|
5465
|
+
]
|
|
5466
|
+
}
|
|
5467
|
+
) }, `${l.id}-${i}`)) })
|
|
5468
|
+
}
|
|
5469
|
+
)
|
|
5470
|
+
] })
|
|
5471
|
+
]
|
|
5472
|
+
}
|
|
5473
|
+
)
|
|
5474
|
+
]
|
|
5475
|
+
}
|
|
5476
|
+
);
|
|
5477
|
+
}
|
|
5478
|
+
var HeadingsNavigatorController = PageNavigatorController;
|
|
5479
|
+
var PageStructureController = PageNavigatorController;
|
|
5480
|
+
|
|
5481
|
+
// src/features/ProfilesController.tsx
|
|
5482
|
+
var import_react20 = require("react");
|
|
5483
|
+
|
|
5484
|
+
// src/core/controls/ProfilePreviewCard.tsx
|
|
5485
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5486
|
+
function ProfilePreviewCard({
|
|
5487
|
+
profile,
|
|
5488
|
+
isActive,
|
|
5489
|
+
onApply,
|
|
5490
|
+
onRevert,
|
|
5491
|
+
largeControls = false,
|
|
5492
|
+
className = "",
|
|
5493
|
+
style
|
|
5494
|
+
}) {
|
|
5495
|
+
const affectedKeys = Object.keys(
|
|
5496
|
+
profile.settings
|
|
5497
|
+
);
|
|
5498
|
+
const formatKeyName = (key) => {
|
|
5499
|
+
switch (key) {
|
|
5500
|
+
case "fontScale":
|
|
5501
|
+
return "Font Size";
|
|
5502
|
+
case "lineHeight":
|
|
5503
|
+
return "Line Height";
|
|
5504
|
+
case "contrastMode":
|
|
5505
|
+
return "Contrast";
|
|
5506
|
+
case "reduceMotion":
|
|
5507
|
+
return "Reduce Motion";
|
|
5508
|
+
case "textAlign":
|
|
5509
|
+
return "Text Align";
|
|
5510
|
+
case "highlightLinks":
|
|
5511
|
+
return "Highlight Links";
|
|
5512
|
+
case "highlightFocus":
|
|
5513
|
+
return "Highlight Focus";
|
|
5514
|
+
case "cursorSize":
|
|
5515
|
+
return "Cursor Size";
|
|
5516
|
+
case "readerMode":
|
|
5517
|
+
return "Reading Mode";
|
|
5518
|
+
case "saturation":
|
|
5519
|
+
return "Saturation";
|
|
5520
|
+
case "hideDecorativeImages":
|
|
5521
|
+
return "Hide Images";
|
|
5522
|
+
default:
|
|
5523
|
+
return key.replace(/([A-Z])/g, " $1").trim();
|
|
5524
|
+
}
|
|
5525
|
+
};
|
|
5526
|
+
const formatSettingValue = (key, val) => {
|
|
5527
|
+
if (typeof val === "boolean") return val ? "On" : "Off";
|
|
5528
|
+
if (key === "fontScale" && typeof val === "number")
|
|
5529
|
+
return `${Math.round(val * 100)}%`;
|
|
5530
|
+
if (key === "lineHeight" && typeof val === "number")
|
|
5531
|
+
return `${Math.round(val * 100)}%`;
|
|
5532
|
+
if (val === null || val === void 0) return "Original";
|
|
5533
|
+
return String(val);
|
|
5534
|
+
};
|
|
5535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
5536
|
+
"div",
|
|
5537
|
+
{
|
|
5538
|
+
role: "group",
|
|
5539
|
+
"aria-label": `${profile.label} profile`,
|
|
5540
|
+
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
5541
|
+
style,
|
|
5542
|
+
children: [
|
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-profile-header", children: [
|
|
5544
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
5545
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
5546
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5547
|
+
"span",
|
|
5548
|
+
{
|
|
5549
|
+
className: "arap-profile-active-badge",
|
|
5550
|
+
"aria-label": "Active profile",
|
|
5551
|
+
children: "\u2713 Active"
|
|
5552
|
+
}
|
|
5553
|
+
)
|
|
5554
|
+
] }),
|
|
5555
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
5556
|
+
] }),
|
|
5557
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
5558
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
5559
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
5560
|
+
const val = profile.settings[key];
|
|
5561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
5562
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("strong", { children: [
|
|
5563
|
+
formatKeyName(key),
|
|
5564
|
+
":"
|
|
5565
|
+
] }),
|
|
5566
|
+
" ",
|
|
5567
|
+
formatSettingValue(key, val)
|
|
5568
|
+
] }, key);
|
|
5569
|
+
}) })
|
|
5570
|
+
] }),
|
|
5571
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5572
|
+
"button",
|
|
5573
|
+
{
|
|
5574
|
+
type: "button",
|
|
5575
|
+
className: "arap-profile-revert-btn",
|
|
5576
|
+
onClick: onRevert,
|
|
5577
|
+
"aria-label": `Revert ${profile.label} profile`,
|
|
5578
|
+
children: "Revert to custom settings"
|
|
5579
|
+
}
|
|
5580
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5581
|
+
"button",
|
|
5582
|
+
{
|
|
5583
|
+
type: "button",
|
|
5584
|
+
className: "arap-profile-apply-btn",
|
|
5585
|
+
onClick: () => onApply(profile),
|
|
5586
|
+
"aria-label": `Apply ${profile.label} profile`,
|
|
5587
|
+
children: "Apply Profile"
|
|
5588
|
+
}
|
|
5589
|
+
) })
|
|
5590
|
+
]
|
|
5591
|
+
}
|
|
5592
|
+
);
|
|
5593
|
+
}
|
|
5594
|
+
|
|
5595
|
+
// src/core/controls/FeatureStatusState.tsx
|
|
5596
|
+
var import_react19 = require("react");
|
|
5597
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5598
|
+
function SearchCount({
|
|
5599
|
+
totalCount,
|
|
5600
|
+
matchedCount,
|
|
5601
|
+
query,
|
|
5602
|
+
className = "",
|
|
5603
|
+
style,
|
|
5604
|
+
locale
|
|
5605
|
+
}) {
|
|
5606
|
+
const ctx = (0, import_react19.useContext)(AccessibilityContext);
|
|
5607
|
+
const strings = resolveLocaleStrings(locale ?? ctx?.locale);
|
|
5608
|
+
const text = strings.formatSearchCount ? strings.formatSearchCount(matchedCount, totalCount, query) : query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
5609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5610
|
+
"div",
|
|
5611
|
+
{
|
|
5612
|
+
role: "status",
|
|
5613
|
+
"aria-live": "polite",
|
|
5614
|
+
className: `arap-search-count ${className}`,
|
|
5615
|
+
style,
|
|
5616
|
+
children: text
|
|
5617
|
+
}
|
|
5618
|
+
);
|
|
5619
|
+
}
|
|
5620
|
+
function EmptyState({
|
|
5621
|
+
title,
|
|
5622
|
+
description,
|
|
5623
|
+
actionLabel,
|
|
5624
|
+
onAction,
|
|
5625
|
+
icon,
|
|
5626
|
+
className = "",
|
|
5627
|
+
style,
|
|
5628
|
+
locale
|
|
5629
|
+
}) {
|
|
5630
|
+
const ctx = (0, import_react19.useContext)(AccessibilityContext);
|
|
5631
|
+
const strings = resolveLocaleStrings(locale ?? ctx?.locale);
|
|
5632
|
+
const resolvedTitle = title ?? strings.emptySearchTitle ?? "No matching tools found";
|
|
5633
|
+
const resolvedDescription = description ?? strings.emptySearchDescription ?? "Try adjusting your search query or reset filters.";
|
|
5634
|
+
const resolvedActionLabel = actionLabel ?? strings.clearSearchLabel ?? "Clear search";
|
|
5635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
5636
|
+
"div",
|
|
5637
|
+
{
|
|
5638
|
+
role: "status",
|
|
5639
|
+
className: `arap-empty-state ${className}`,
|
|
5640
|
+
style,
|
|
5641
|
+
children: [
|
|
5642
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
5643
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { className: "arap-empty-title", children: resolvedTitle }),
|
|
5644
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "arap-empty-desc", children: resolvedDescription }),
|
|
5645
|
+
onAction && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: resolvedActionLabel })
|
|
5646
|
+
]
|
|
5647
|
+
}
|
|
5648
|
+
);
|
|
5649
|
+
}
|
|
5650
|
+
function ErrorState({
|
|
5651
|
+
title = "Something went wrong",
|
|
5652
|
+
message,
|
|
5653
|
+
onRetry,
|
|
5654
|
+
retryLabel = "Try again",
|
|
5655
|
+
className = "",
|
|
5656
|
+
style
|
|
5657
|
+
}) {
|
|
5658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
5659
|
+
"div",
|
|
5660
|
+
{
|
|
5661
|
+
role: "alert",
|
|
5662
|
+
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
5663
|
+
style,
|
|
5664
|
+
children: [
|
|
5665
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
5666
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-error-content", children: [
|
|
5667
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
5668
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "arap-error-message", children: message }),
|
|
5669
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
5670
|
+
] })
|
|
5671
|
+
]
|
|
5672
|
+
}
|
|
5673
|
+
);
|
|
5674
|
+
}
|
|
5675
|
+
|
|
5676
|
+
// src/features/ProfilesController.tsx
|
|
5677
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5678
|
+
function ProfilesController({
|
|
5679
|
+
className = "",
|
|
5680
|
+
label,
|
|
5681
|
+
description = "Explore suggested preference combinations",
|
|
5682
|
+
largeControls = false,
|
|
5683
|
+
onProfileChange
|
|
5684
|
+
}) {
|
|
5685
|
+
const ctx = (0, import_react20.useContext)(AccessibilityContext);
|
|
5686
|
+
const strings = resolveLocaleStrings(ctx?.locale);
|
|
5687
|
+
const effectiveLabel = label ?? strings.features?.profiles ?? "Accessibility Profiles";
|
|
5688
|
+
const [isOpen, setIsOpen] = (0, import_react20.useState)(false);
|
|
5689
|
+
const [search, setSearch] = (0, import_react20.useState)("");
|
|
5690
|
+
const dialogId = "arap-profiles-dialog";
|
|
5691
|
+
const searchInputId = (0, import_react20.useId)();
|
|
5692
|
+
const triggerRef = (0, import_react20.useRef)(null);
|
|
5693
|
+
const {
|
|
5694
|
+
profiles,
|
|
5695
|
+
activeProfile,
|
|
5696
|
+
activeProfileState,
|
|
5697
|
+
applyProfile,
|
|
5698
|
+
revertProfile,
|
|
5699
|
+
isProfileActive
|
|
5700
|
+
} = useProfiles();
|
|
5701
|
+
const handleApply = (profileId) => {
|
|
5702
|
+
applyProfile(profileId);
|
|
5703
|
+
onProfileChange?.(profileId);
|
|
5704
|
+
};
|
|
5705
|
+
const handleRevert = () => {
|
|
5706
|
+
revertProfile();
|
|
5707
|
+
onProfileChange?.(null);
|
|
5708
|
+
};
|
|
5709
|
+
const filteredProfiles = (0, import_react20.useMemo)(() => {
|
|
5710
|
+
const q = search.trim().toLowerCase();
|
|
5711
|
+
if (!q) return profiles;
|
|
5712
|
+
return profiles.filter((p) => {
|
|
5713
|
+
const nameMatch = p.label.toLowerCase().includes(q);
|
|
5714
|
+
const descMatch = p.description.toLowerCase().includes(q);
|
|
5715
|
+
const settingMatch = Object.keys(p.settings).some(
|
|
5716
|
+
(k) => k.toLowerCase().includes(q)
|
|
5717
|
+
);
|
|
5718
|
+
return nameMatch || descMatch || settingMatch;
|
|
5719
|
+
});
|
|
5720
|
+
}, [profiles, search]);
|
|
5721
|
+
const hasOverrides = Boolean(activeProfileState?.overrides) && Object.keys(activeProfileState?.overrides ?? {}).length > 0;
|
|
5722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5723
|
+
"div",
|
|
5724
|
+
{
|
|
5725
|
+
className: `arap-feature arap-feature-expandable ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
5726
|
+
role: "group",
|
|
5727
|
+
"aria-label": effectiveLabel,
|
|
5728
|
+
children: [
|
|
5729
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5730
|
+
"div",
|
|
5731
|
+
{
|
|
5732
|
+
style: {
|
|
5733
|
+
display: "flex",
|
|
5734
|
+
alignItems: "center",
|
|
5735
|
+
justifyContent: "space-between",
|
|
5736
|
+
width: "100%"
|
|
5737
|
+
},
|
|
5738
|
+
children: [
|
|
5739
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "arap-label", children: [
|
|
5740
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FeatureIcon, { name: "profiles" }),
|
|
5741
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { children: [
|
|
5742
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { style: { display: "block" }, children: effectiveLabel }),
|
|
5743
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5744
|
+
"span",
|
|
5745
|
+
{
|
|
5746
|
+
style: {
|
|
5747
|
+
display: "block",
|
|
5748
|
+
fontSize: "11px",
|
|
5749
|
+
fontWeight: 400,
|
|
5750
|
+
color: "var(--arap-muted, #64748b)",
|
|
5751
|
+
marginTop: "1px"
|
|
5752
|
+
},
|
|
5753
|
+
children: activeProfile ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5754
|
+
"span",
|
|
5755
|
+
{
|
|
5756
|
+
style: {
|
|
5757
|
+
color: "var(--arap-primary, #2563eb)",
|
|
5758
|
+
fontWeight: 500
|
|
5759
|
+
},
|
|
5760
|
+
children: [
|
|
5761
|
+
"Active: ",
|
|
5762
|
+
activeProfile.label,
|
|
5763
|
+
hasOverrides && " (Customized)"
|
|
5764
|
+
]
|
|
5765
|
+
}
|
|
5766
|
+
) : description
|
|
5767
|
+
}
|
|
5768
|
+
)
|
|
5769
|
+
] })
|
|
5770
|
+
] }),
|
|
5771
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center" }, children: [
|
|
5772
|
+
activeProfile && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5773
|
+
"button",
|
|
5774
|
+
{
|
|
5775
|
+
type: "button",
|
|
5776
|
+
className: "arap-btn-sm",
|
|
5777
|
+
onClick: handleRevert,
|
|
5778
|
+
"aria-label": "Revert active profile to custom settings",
|
|
5779
|
+
title: "Revert to custom settings",
|
|
5780
|
+
children: "Revert"
|
|
5781
|
+
}
|
|
5782
|
+
),
|
|
5783
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5784
|
+
"button",
|
|
5785
|
+
{
|
|
5786
|
+
ref: triggerRef,
|
|
5787
|
+
className: "arap-btn-sm",
|
|
5788
|
+
type: "button",
|
|
5789
|
+
"aria-expanded": isOpen,
|
|
5790
|
+
"aria-controls": dialogId,
|
|
5791
|
+
onClick: () => setIsOpen(!isOpen),
|
|
5792
|
+
children: isOpen ? "Close" : "Browse"
|
|
5793
|
+
}
|
|
5794
|
+
)
|
|
5795
|
+
] })
|
|
5796
|
+
]
|
|
5797
|
+
}
|
|
5798
|
+
),
|
|
5799
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5800
|
+
"div",
|
|
5801
|
+
{
|
|
5802
|
+
id: dialogId,
|
|
5803
|
+
className: "arap-profiles-panel",
|
|
5804
|
+
style: {
|
|
5805
|
+
marginTop: "12px",
|
|
5806
|
+
paddingTop: "12px",
|
|
5807
|
+
borderTop: "1px solid var(--arap-divider, #e2e8f0)"
|
|
5808
|
+
},
|
|
5809
|
+
children: [
|
|
5810
|
+
activeProfile && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5811
|
+
"div",
|
|
5812
|
+
{
|
|
5813
|
+
className: "arap-profile-active-banner",
|
|
5814
|
+
style: {
|
|
5815
|
+
display: "flex",
|
|
5816
|
+
alignItems: "center",
|
|
5817
|
+
justifyContent: "space-between",
|
|
5818
|
+
padding: "8px 12px",
|
|
5819
|
+
marginBottom: "12px",
|
|
5820
|
+
background: "rgba(37, 99, 235, 0.08)",
|
|
5821
|
+
border: "1px solid rgba(37, 99, 235, 0.2)",
|
|
5822
|
+
borderRadius: "6px"
|
|
5823
|
+
},
|
|
5824
|
+
children: [
|
|
5825
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
|
|
5826
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5827
|
+
"span",
|
|
5828
|
+
{
|
|
5829
|
+
style: {
|
|
5830
|
+
display: "block",
|
|
5831
|
+
fontWeight: 600,
|
|
5832
|
+
fontSize: "13px",
|
|
5833
|
+
color: "var(--arap-primary, #2563eb)"
|
|
5834
|
+
},
|
|
5835
|
+
children: [
|
|
5836
|
+
"\u2713 Current Profile: ",
|
|
5837
|
+
activeProfile.label
|
|
5838
|
+
]
|
|
5839
|
+
}
|
|
5840
|
+
),
|
|
5841
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5842
|
+
"span",
|
|
5843
|
+
{
|
|
5844
|
+
style: {
|
|
5845
|
+
display: "block",
|
|
5846
|
+
fontSize: "11px",
|
|
5847
|
+
color: "var(--arap-muted, #64748b)"
|
|
5848
|
+
},
|
|
5849
|
+
children: hasOverrides ? "Your custom adjustments survive alongside this profile." : "Neutral suggestion applied. Adjust any setting freely."
|
|
5850
|
+
}
|
|
5851
|
+
)
|
|
5852
|
+
] }),
|
|
5853
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5854
|
+
"button",
|
|
5855
|
+
{
|
|
5856
|
+
type: "button",
|
|
5857
|
+
className: "arap-btn-sm",
|
|
5858
|
+
onClick: handleRevert,
|
|
5859
|
+
"aria-label": "Revert active profile",
|
|
5860
|
+
children: "Revert to Custom"
|
|
5861
|
+
}
|
|
5862
|
+
)
|
|
5863
|
+
]
|
|
5864
|
+
}
|
|
5865
|
+
),
|
|
5866
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5867
|
+
"div",
|
|
5868
|
+
{
|
|
5869
|
+
className: "arap-navigator-search",
|
|
5870
|
+
style: { marginBottom: "10px" },
|
|
5871
|
+
children: [
|
|
5872
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("label", { htmlFor: searchInputId, className: "arap-sr-only", children: "Filter profiles" }),
|
|
5873
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5874
|
+
"input",
|
|
5875
|
+
{
|
|
5876
|
+
id: searchInputId,
|
|
5877
|
+
type: "search",
|
|
5878
|
+
className: "arap-search-input",
|
|
5879
|
+
value: search,
|
|
5880
|
+
onChange: (e) => setSearch(e.target.value),
|
|
5881
|
+
placeholder: strings.searchPlaceholder ?? "Search 8 accessibility profiles...",
|
|
5882
|
+
"aria-label": "Filter profiles"
|
|
5883
|
+
}
|
|
5884
|
+
),
|
|
5885
|
+
search && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5886
|
+
"button",
|
|
5887
|
+
{
|
|
5888
|
+
type: "button",
|
|
5889
|
+
className: "arap-search-clear",
|
|
5890
|
+
onClick: () => setSearch(""),
|
|
5891
|
+
"aria-label": strings.searchClearLabel ?? "Clear profile filter",
|
|
5892
|
+
children: "\xD7"
|
|
5893
|
+
}
|
|
5894
|
+
)
|
|
5895
|
+
]
|
|
5896
|
+
}
|
|
5897
|
+
),
|
|
5898
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5899
|
+
SearchCount,
|
|
5900
|
+
{
|
|
5901
|
+
totalCount: profiles.length,
|
|
5902
|
+
matchedCount: filteredProfiles.length,
|
|
5903
|
+
query: search
|
|
5904
|
+
}
|
|
5905
|
+
),
|
|
5906
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5907
|
+
"div",
|
|
5908
|
+
{
|
|
5909
|
+
className: "arap-profiles-list",
|
|
5910
|
+
style: {
|
|
5911
|
+
display: "flex",
|
|
5912
|
+
flexDirection: "column",
|
|
5913
|
+
gap: "10px",
|
|
5914
|
+
marginTop: "8px"
|
|
5915
|
+
},
|
|
5916
|
+
children: filteredProfiles.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5917
|
+
EmptyState,
|
|
5918
|
+
{
|
|
5919
|
+
title: "No profiles found",
|
|
5920
|
+
description: `No accessibility profiles match "${search}".`,
|
|
5921
|
+
actionLabel: "Clear filter",
|
|
5922
|
+
onAction: () => setSearch("")
|
|
5923
|
+
}
|
|
5924
|
+
) : filteredProfiles.map((p) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5925
|
+
ProfilePreviewCard,
|
|
5926
|
+
{
|
|
5927
|
+
profile: p,
|
|
5928
|
+
isActive: isProfileActive(p.id),
|
|
5929
|
+
onApply: () => handleApply(p.id),
|
|
5930
|
+
onRevert: handleRevert,
|
|
5931
|
+
largeControls
|
|
5932
|
+
},
|
|
5933
|
+
p.id
|
|
5934
|
+
))
|
|
5935
|
+
}
|
|
5936
|
+
)
|
|
5937
|
+
]
|
|
5938
|
+
}
|
|
5939
|
+
)
|
|
5940
|
+
]
|
|
5941
|
+
}
|
|
5942
|
+
);
|
|
5943
|
+
}
|
|
5944
|
+
var ProfileController = ProfilesController;
|
|
5945
|
+
var AccessibilityProfilesController = ProfilesController;
|
|
5946
|
+
|
|
5947
|
+
// src/features/ResetController.tsx
|
|
5948
|
+
var import_react_dom2 = require("react-dom");
|
|
5949
|
+
var import_react21 = require("react");
|
|
5950
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5951
|
+
function ResetController() {
|
|
5952
|
+
const ctx = (0, import_react21.useContext)(AccessibilityContext);
|
|
5953
|
+
if (!ctx) {
|
|
5954
|
+
throw new Error(
|
|
5955
|
+
"ResetController must be used within an <AccessibilityPlugin> provider."
|
|
5956
|
+
);
|
|
5957
|
+
}
|
|
5958
|
+
const actionHost = (0, import_react21.useContext)(PanelActionsContext);
|
|
5959
|
+
const { resetAll } = ctx;
|
|
5960
|
+
const strings = resolveLocaleStrings(ctx.locale);
|
|
5961
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
5962
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FeatureIcon, { name: "reset" }),
|
|
5963
|
+
strings.resetAll
|
|
5964
|
+
] }) });
|
|
5965
|
+
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
5966
|
+
}
|
|
5967
|
+
|
|
5968
|
+
// src/features/PresetsController.tsx
|
|
5969
|
+
var import_react23 = require("react");
|
|
5970
|
+
|
|
5971
|
+
// src/core/usePresets.ts
|
|
5972
|
+
var import_react22 = require("react");
|
|
5973
|
+
|
|
5974
|
+
// src/core/presets.ts
|
|
5975
|
+
var ALLOWED_PREFERENCE_KEYS = Object.freeze([
|
|
5976
|
+
"fontScale",
|
|
5977
|
+
"lineHeight",
|
|
5978
|
+
"letterSpacingEm",
|
|
5979
|
+
"wordSpacingEm",
|
|
5980
|
+
"paragraphSpacingEm",
|
|
5981
|
+
"textAlign",
|
|
5982
|
+
"contrastMode",
|
|
5983
|
+
"highlightLinks",
|
|
5984
|
+
"highlightFocus",
|
|
5985
|
+
"reduceMotion",
|
|
5986
|
+
"hideDecorativeImages",
|
|
5987
|
+
"fontFamily",
|
|
5988
|
+
"cursorSize",
|
|
5989
|
+
"readerMode",
|
|
5990
|
+
"saturation",
|
|
5991
|
+
"tooltips"
|
|
5992
|
+
]);
|
|
5993
|
+
var FORBIDDEN_KEYS = /* @__PURE__ */ new Set([
|
|
5994
|
+
"__proto__",
|
|
5995
|
+
"constructor",
|
|
5996
|
+
"prototype",
|
|
5997
|
+
"token",
|
|
5998
|
+
"auth",
|
|
5999
|
+
"password",
|
|
6000
|
+
"email",
|
|
6001
|
+
"user",
|
|
6002
|
+
"userId",
|
|
6003
|
+
"session",
|
|
6004
|
+
"cookie",
|
|
6005
|
+
"transcript",
|
|
6006
|
+
"recording",
|
|
6007
|
+
"pageContent",
|
|
6008
|
+
"notes",
|
|
6009
|
+
"input"
|
|
6010
|
+
]);
|
|
6011
|
+
function sanitizePreferences(raw) {
|
|
6012
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
6013
|
+
return {};
|
|
6014
|
+
}
|
|
6015
|
+
const record = raw;
|
|
6016
|
+
const clean = {};
|
|
6017
|
+
for (const key of ALLOWED_PREFERENCE_KEYS) {
|
|
6018
|
+
if (key in record && record[key] !== void 0 && !FORBIDDEN_KEYS.has(key)) {
|
|
6019
|
+
clean[key] = normalizePreferenceValue(
|
|
6020
|
+
key,
|
|
6021
|
+
record[key]
|
|
6022
|
+
);
|
|
6023
|
+
}
|
|
6024
|
+
}
|
|
6025
|
+
return clean;
|
|
6026
|
+
}
|
|
6027
|
+
function generatePresetId() {
|
|
6028
|
+
const timestamp = Date.now();
|
|
6029
|
+
const randomPart = Math.random().toString(36).substring(2, 9);
|
|
6030
|
+
return `preset_${timestamp}_${randomPart}`;
|
|
6031
|
+
}
|
|
6032
|
+
function createCustomPreset(name, settings) {
|
|
6033
|
+
const trimmedName = (name || "").trim() || `Preset ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`;
|
|
6034
|
+
const sanitizedSettings = sanitizePreferences(settings);
|
|
6035
|
+
return {
|
|
6036
|
+
id: generatePresetId(),
|
|
6037
|
+
name: trimmedName.slice(0, 60),
|
|
6038
|
+
// clamp name length
|
|
6039
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6040
|
+
settings: sanitizedSettings
|
|
6041
|
+
};
|
|
6042
|
+
}
|
|
6043
|
+
function isValidCustomPreset(item) {
|
|
6044
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) {
|
|
6045
|
+
return false;
|
|
6046
|
+
}
|
|
6047
|
+
const candidate = item;
|
|
6048
|
+
return typeof candidate.id === "string" && candidate.id.length > 0 && typeof candidate.name === "string" && candidate.name.length > 0 && typeof candidate.createdAt === "string" && typeof candidate.settings === "object" && candidate.settings !== null && !Array.isArray(candidate.settings);
|
|
6049
|
+
}
|
|
6050
|
+
function exportPresetsToJson(options) {
|
|
6051
|
+
const envelope = {
|
|
6052
|
+
$schema: "https://accessibility-plugin.org/schemas/presets-v1.json",
|
|
6053
|
+
version: 1,
|
|
6054
|
+
app: "accessibility-plugin-react",
|
|
6055
|
+
exportedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6056
|
+
presets: options.presets.map((p) => ({
|
|
6057
|
+
id: p.id,
|
|
6058
|
+
name: p.name,
|
|
6059
|
+
createdAt: p.createdAt,
|
|
6060
|
+
updatedAt: p.updatedAt,
|
|
6061
|
+
settings: sanitizePreferences(p.settings)
|
|
6062
|
+
}))
|
|
6063
|
+
};
|
|
6064
|
+
if (options.currentSettings) {
|
|
6065
|
+
envelope.currentSettings = sanitizePreferences(options.currentSettings);
|
|
6066
|
+
}
|
|
6067
|
+
return JSON.stringify(envelope, null, 2);
|
|
6068
|
+
}
|
|
6069
|
+
function downloadJsonFile(filename, jsonContent) {
|
|
6070
|
+
if (typeof window === "undefined" || typeof document === "undefined") return;
|
|
6071
|
+
const blob = new Blob([jsonContent], {
|
|
6072
|
+
type: "application/json;charset=utf-8"
|
|
6073
|
+
});
|
|
6074
|
+
const url = URL.createObjectURL(blob);
|
|
6075
|
+
const anchor = document.createElement("a");
|
|
6076
|
+
anchor.href = url;
|
|
6077
|
+
anchor.download = filename.endsWith(".json") ? filename : `${filename}.json`;
|
|
6078
|
+
anchor.style.display = "none";
|
|
6079
|
+
document.body.appendChild(anchor);
|
|
6080
|
+
anchor.click();
|
|
6081
|
+
document.body.removeChild(anchor);
|
|
6082
|
+
URL.revokeObjectURL(url);
|
|
6083
|
+
}
|
|
6084
|
+
function validateAndParseImport(jsonString) {
|
|
6085
|
+
if (!jsonString || typeof jsonString !== "string" || !jsonString.trim()) {
|
|
6086
|
+
return {
|
|
6087
|
+
success: false,
|
|
6088
|
+
error: "Import file is empty."
|
|
6089
|
+
};
|
|
6090
|
+
}
|
|
6091
|
+
let raw;
|
|
6092
|
+
try {
|
|
6093
|
+
raw = JSON.parse(jsonString);
|
|
6094
|
+
} catch {
|
|
6095
|
+
return {
|
|
6096
|
+
success: false,
|
|
6097
|
+
error: "Invalid JSON format: syntax error in file."
|
|
6098
|
+
};
|
|
6099
|
+
}
|
|
6100
|
+
if (!raw || typeof raw !== "object") {
|
|
6101
|
+
return {
|
|
6102
|
+
success: false,
|
|
6103
|
+
error: "Malformed import: file root must be an object or array."
|
|
6104
|
+
};
|
|
6105
|
+
}
|
|
6106
|
+
if (Array.isArray(raw)) {
|
|
6107
|
+
const validPresets = [];
|
|
6108
|
+
for (const item of raw) {
|
|
6109
|
+
if (typeof item === "object" && item !== null && !Array.isArray(item)) {
|
|
6110
|
+
const p = item;
|
|
6111
|
+
const name = typeof p.name === "string" ? p.name : "Imported Preset";
|
|
6112
|
+
const id = typeof p.id === "string" && p.id ? p.id : generatePresetId();
|
|
6113
|
+
const createdAt = typeof p.createdAt === "string" ? p.createdAt : (/* @__PURE__ */ new Date()).toISOString();
|
|
6114
|
+
const settings = sanitizePreferences(p.settings || p);
|
|
6115
|
+
if (Object.keys(settings).length > 0) {
|
|
6116
|
+
validPresets.push({ id, name, createdAt, settings });
|
|
6117
|
+
}
|
|
6118
|
+
}
|
|
6119
|
+
}
|
|
6120
|
+
if (validPresets.length === 0) {
|
|
6121
|
+
return {
|
|
6122
|
+
success: false,
|
|
6123
|
+
error: "Array did not contain any valid accessibility presets."
|
|
6124
|
+
};
|
|
6125
|
+
}
|
|
6126
|
+
return {
|
|
6127
|
+
success: true,
|
|
6128
|
+
presets: validPresets,
|
|
6129
|
+
message: `Successfully imported ${validPresets.length} preset(s).`
|
|
6130
|
+
};
|
|
6131
|
+
}
|
|
6132
|
+
const obj = raw;
|
|
6133
|
+
if ("version" in obj && typeof obj.version === "number") {
|
|
6134
|
+
if (obj.version > 1) {
|
|
6135
|
+
return {
|
|
6136
|
+
success: false,
|
|
6137
|
+
error: `Unsupported schema version: version ${obj.version} is newer than supported version 1.`
|
|
6138
|
+
};
|
|
6139
|
+
}
|
|
6140
|
+
if (obj.version < 1) {
|
|
6141
|
+
return {
|
|
6142
|
+
success: false,
|
|
6143
|
+
error: `Unsupported schema version: version ${obj.version} is not recognized.`
|
|
6144
|
+
};
|
|
6145
|
+
}
|
|
6146
|
+
}
|
|
6147
|
+
const importedPresets = [];
|
|
6148
|
+
if (Array.isArray(obj.presets)) {
|
|
6149
|
+
for (const item of obj.presets) {
|
|
6150
|
+
if (isValidCustomPreset(item)) {
|
|
6151
|
+
importedPresets.push({
|
|
6152
|
+
id: item.id,
|
|
6153
|
+
name: item.name,
|
|
6154
|
+
createdAt: item.createdAt,
|
|
6155
|
+
updatedAt: item.updatedAt,
|
|
6156
|
+
settings: sanitizePreferences(item.settings)
|
|
6157
|
+
});
|
|
6158
|
+
} else if (typeof item === "object" && item !== null) {
|
|
6159
|
+
const record = item;
|
|
6160
|
+
const name = typeof record.name === "string" ? record.name : "Imported Preset";
|
|
6161
|
+
const id = typeof record.id === "string" && record.id ? record.id : generatePresetId();
|
|
6162
|
+
const createdAt = typeof record.createdAt === "string" ? record.createdAt : (/* @__PURE__ */ new Date()).toISOString();
|
|
6163
|
+
const settings = sanitizePreferences(record.settings || record);
|
|
6164
|
+
if (Object.keys(settings).length > 0) {
|
|
6165
|
+
importedPresets.push({ id, name, createdAt, settings });
|
|
6166
|
+
}
|
|
6167
|
+
}
|
|
6168
|
+
}
|
|
6169
|
+
}
|
|
6170
|
+
let currentSettings;
|
|
6171
|
+
if ("currentSettings" in obj && typeof obj.currentSettings === "object") {
|
|
6172
|
+
currentSettings = sanitizePreferences(obj.currentSettings);
|
|
6173
|
+
} else if (!("presets" in obj) && !("version" in obj)) {
|
|
6174
|
+
const flat = sanitizePreferences(obj);
|
|
6175
|
+
if (Object.keys(flat).length > 0) {
|
|
6176
|
+
currentSettings = flat;
|
|
6177
|
+
}
|
|
6178
|
+
}
|
|
6179
|
+
if (importedPresets.length === 0 && (!currentSettings || Object.keys(currentSettings).length === 0)) {
|
|
6180
|
+
return {
|
|
6181
|
+
success: false,
|
|
6182
|
+
error: "No valid presets or accessibility settings found in the file."
|
|
6183
|
+
};
|
|
6184
|
+
}
|
|
6185
|
+
const parts = [];
|
|
6186
|
+
if (importedPresets.length > 0)
|
|
6187
|
+
parts.push(`${importedPresets.length} preset(s)`);
|
|
6188
|
+
if (currentSettings && Object.keys(currentSettings).length > 0)
|
|
6189
|
+
parts.push("current settings");
|
|
6190
|
+
return {
|
|
6191
|
+
success: true,
|
|
6192
|
+
presets: importedPresets,
|
|
6193
|
+
currentSettings,
|
|
6194
|
+
message: `Successfully imported ${parts.join(" and ")}.`
|
|
6195
|
+
};
|
|
6196
|
+
}
|
|
6197
|
+
function applyCustomPresetToStore(preset, setFeatureState) {
|
|
6198
|
+
const mapped = mapProfileSettingsToFeatures(preset.settings);
|
|
6199
|
+
for (const [key, value] of Object.entries(mapped)) {
|
|
6200
|
+
try {
|
|
6201
|
+
setFeatureState(key, value);
|
|
6202
|
+
} catch {
|
|
6203
|
+
}
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
|
|
6207
|
+
// src/core/usePresets.ts
|
|
6208
|
+
function usePresets() {
|
|
6209
|
+
const ctx = (0, import_react22.useContext)(AccessibilityContext);
|
|
6210
|
+
if (!ctx) {
|
|
6211
|
+
throw new Error(
|
|
6212
|
+
"usePresets must be used within an <AccessibilityPlugin> provider."
|
|
6213
|
+
);
|
|
6214
|
+
}
|
|
6215
|
+
const { value: rawPresets, setValue: setPresets } = useAccessibility("customPresets", []);
|
|
6216
|
+
const presets = (0, import_react22.useMemo)(
|
|
6217
|
+
() => Array.isArray(rawPresets) ? rawPresets : [],
|
|
6218
|
+
[rawPresets]
|
|
6219
|
+
);
|
|
6220
|
+
const currentSettings = (0, import_react22.useMemo)(
|
|
6221
|
+
() => mapFeaturesToProfileSettings(ctx.state.features),
|
|
6222
|
+
[ctx.state.features]
|
|
6223
|
+
);
|
|
6224
|
+
const saveCurrentAsPreset = (0, import_react22.useCallback)(
|
|
6225
|
+
(name) => {
|
|
6226
|
+
const newPreset = createCustomPreset(name, currentSettings);
|
|
6227
|
+
setPresets([...presets, newPreset]);
|
|
6228
|
+
return newPreset;
|
|
6229
|
+
},
|
|
6230
|
+
[currentSettings, presets, setPresets]
|
|
6231
|
+
);
|
|
6232
|
+
const applyPreset = (0, import_react22.useCallback)(
|
|
6233
|
+
(presetId) => {
|
|
6234
|
+
const found = presets.find((p) => p.id === presetId);
|
|
6235
|
+
if (!found) return false;
|
|
6236
|
+
applyCustomPresetToStore(found, ctx.setFeatureState);
|
|
6237
|
+
return true;
|
|
6238
|
+
},
|
|
6239
|
+
[ctx.setFeatureState, presets]
|
|
6240
|
+
);
|
|
6241
|
+
const deletePreset = (0, import_react22.useCallback)(
|
|
6242
|
+
(presetId) => {
|
|
6243
|
+
const next = presets.filter((p) => p.id !== presetId);
|
|
6244
|
+
if (next.length === presets.length) return false;
|
|
6245
|
+
setPresets(next);
|
|
6246
|
+
return true;
|
|
6247
|
+
},
|
|
6248
|
+
[presets, setPresets]
|
|
6249
|
+
);
|
|
6250
|
+
const exportPresets = (0, import_react22.useCallback)(() => {
|
|
6251
|
+
return exportPresetsToJson({ presets, currentSettings });
|
|
6252
|
+
}, [currentSettings, presets]);
|
|
6253
|
+
const downloadExport = (0, import_react22.useCallback)(
|
|
6254
|
+
(filename) => {
|
|
6255
|
+
const json = exportPresetsToJson({ presets, currentSettings });
|
|
6256
|
+
const dateStr = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
6257
|
+
const targetName = filename || `accessibility-preferences-${dateStr}.json`;
|
|
6258
|
+
downloadJsonFile(targetName, json);
|
|
6259
|
+
},
|
|
6260
|
+
[currentSettings, presets]
|
|
6261
|
+
);
|
|
6262
|
+
const importFromJson = (0, import_react22.useCallback)(
|
|
6263
|
+
(jsonStr) => {
|
|
6264
|
+
const result = validateAndParseImport(jsonStr);
|
|
6265
|
+
if (!result.success) {
|
|
6266
|
+
return result;
|
|
6267
|
+
}
|
|
6268
|
+
if (result.presets.length > 0) {
|
|
6269
|
+
const existingMap = new Map(presets.map((p) => [p.id, p]));
|
|
6270
|
+
for (const p of result.presets) {
|
|
6271
|
+
existingMap.set(p.id, p);
|
|
6272
|
+
}
|
|
6273
|
+
setPresets(Array.from(existingMap.values()));
|
|
6274
|
+
}
|
|
6275
|
+
if (result.currentSettings && Object.keys(result.currentSettings).length > 0) {
|
|
6276
|
+
applyCustomPresetToStore(
|
|
6277
|
+
{
|
|
6278
|
+
id: "temp_import",
|
|
6279
|
+
name: "Imported Settings",
|
|
6280
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6281
|
+
settings: result.currentSettings
|
|
6282
|
+
},
|
|
6283
|
+
ctx.setFeatureState
|
|
6284
|
+
);
|
|
6285
|
+
}
|
|
6286
|
+
return result;
|
|
6287
|
+
},
|
|
6288
|
+
[ctx.setFeatureState, presets, setPresets]
|
|
6289
|
+
);
|
|
6290
|
+
const importFromFile = (0, import_react22.useCallback)(
|
|
6291
|
+
async (file) => {
|
|
6292
|
+
try {
|
|
6293
|
+
const text = await file.text();
|
|
6294
|
+
return importFromJson(text);
|
|
6295
|
+
} catch (err) {
|
|
6296
|
+
return {
|
|
6297
|
+
success: false,
|
|
6298
|
+
error: `Failed to read file: ${err instanceof Error ? err.message : String(err)}`
|
|
6299
|
+
};
|
|
6300
|
+
}
|
|
6301
|
+
},
|
|
6302
|
+
[importFromJson]
|
|
6303
|
+
);
|
|
6304
|
+
return {
|
|
6305
|
+
presets,
|
|
6306
|
+
currentSettings,
|
|
6307
|
+
saveCurrentAsPreset,
|
|
6308
|
+
applyPreset,
|
|
6309
|
+
deletePreset,
|
|
6310
|
+
exportPresets,
|
|
6311
|
+
downloadExport,
|
|
6312
|
+
importFromJson,
|
|
6313
|
+
importFromFile
|
|
6314
|
+
};
|
|
6315
|
+
}
|
|
6316
|
+
|
|
6317
|
+
// src/features/PresetsController.tsx
|
|
6318
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
6319
|
+
function PresetsController({
|
|
6320
|
+
className = "",
|
|
6321
|
+
label,
|
|
6322
|
+
description = "Save, restore, and transfer your settings",
|
|
6323
|
+
largeControls = false
|
|
6324
|
+
} = {}) {
|
|
6325
|
+
const ctx = (0, import_react23.useContext)(AccessibilityContext);
|
|
6326
|
+
const strings = resolveLocaleStrings(ctx?.locale);
|
|
6327
|
+
const effectiveLabel = label ?? strings.features?.presets ?? "Custom Presets";
|
|
6328
|
+
const [isOpen, setIsOpen] = (0, import_react23.useState)(false);
|
|
6329
|
+
const [presetName, setPresetName] = (0, import_react23.useState)("");
|
|
6330
|
+
const [statusMessage, setStatusMessage] = (0, import_react23.useState)("");
|
|
6331
|
+
const [errorMessage, setErrorMessage] = (0, import_react23.useState)("");
|
|
6332
|
+
const dialogId = "arap-presets-dialog";
|
|
6333
|
+
const nameInputId = (0, import_react23.useId)();
|
|
6334
|
+
const fileInputRef = (0, import_react23.useRef)(null);
|
|
6335
|
+
const triggerRef = (0, import_react23.useRef)(null);
|
|
6336
|
+
const {
|
|
6337
|
+
presets,
|
|
6338
|
+
saveCurrentAsPreset,
|
|
6339
|
+
applyPreset,
|
|
6340
|
+
deletePreset,
|
|
6341
|
+
downloadExport,
|
|
6342
|
+
importFromFile
|
|
6343
|
+
} = usePresets();
|
|
6344
|
+
const handleSave = () => {
|
|
6345
|
+
const trimmed = presetName.trim();
|
|
6346
|
+
if (!trimmed) {
|
|
6347
|
+
setErrorMessage("Please enter a name for your preset.");
|
|
6348
|
+
setStatusMessage("");
|
|
6349
|
+
return;
|
|
6350
|
+
}
|
|
6351
|
+
const created = saveCurrentAsPreset(trimmed);
|
|
6352
|
+
setPresetName("");
|
|
6353
|
+
setErrorMessage("");
|
|
6354
|
+
setStatusMessage(
|
|
6355
|
+
strings.formatPresetSaved ? strings.formatPresetSaved(created.name) : `Preset "${created.name}" saved successfully.`
|
|
6356
|
+
);
|
|
6357
|
+
};
|
|
6358
|
+
const handleApply = (preset) => {
|
|
6359
|
+
const success = applyPreset(preset.id);
|
|
6360
|
+
if (success) {
|
|
6361
|
+
setErrorMessage("");
|
|
6362
|
+
setStatusMessage(
|
|
6363
|
+
strings.formatPresetApplied ? strings.formatPresetApplied(preset.name) : `Preset "${preset.name}" applied.`
|
|
6364
|
+
);
|
|
6365
|
+
}
|
|
6366
|
+
};
|
|
6367
|
+
const handleDelete = (preset) => {
|
|
6368
|
+
const success = deletePreset(preset.id);
|
|
6369
|
+
if (success) {
|
|
6370
|
+
setErrorMessage("");
|
|
6371
|
+
setStatusMessage(
|
|
6372
|
+
strings.formatPresetDeleted ? strings.formatPresetDeleted(preset.name) : `Preset "${preset.name}" deleted.`
|
|
6373
|
+
);
|
|
6374
|
+
}
|
|
6375
|
+
};
|
|
6376
|
+
const handleExport = () => {
|
|
6377
|
+
downloadExport();
|
|
6378
|
+
setErrorMessage("");
|
|
6379
|
+
setStatusMessage("Settings and presets exported to JSON file.");
|
|
6380
|
+
};
|
|
6381
|
+
const handleFileInputChange = async (e) => {
|
|
6382
|
+
const file = e.target.files?.[0];
|
|
6383
|
+
if (!file) return;
|
|
6384
|
+
const result = await importFromFile(file);
|
|
6385
|
+
if (result.success) {
|
|
6386
|
+
setErrorMessage("");
|
|
6387
|
+
setStatusMessage(result.message);
|
|
6388
|
+
} else {
|
|
6389
|
+
setStatusMessage("");
|
|
6390
|
+
setErrorMessage(result.error);
|
|
6391
|
+
}
|
|
6392
|
+
if (fileInputRef.current) {
|
|
6393
|
+
fileInputRef.current.value = "";
|
|
6394
|
+
}
|
|
6395
|
+
};
|
|
6396
|
+
const formatKeyName = (key) => {
|
|
6397
|
+
switch (key) {
|
|
6398
|
+
case "fontScale":
|
|
6399
|
+
return "Font Size";
|
|
6400
|
+
case "lineHeight":
|
|
6401
|
+
return "Line Height";
|
|
6402
|
+
case "contrastMode":
|
|
6403
|
+
return "Contrast";
|
|
6404
|
+
case "reduceMotion":
|
|
6405
|
+
return "Reduce Motion";
|
|
6406
|
+
case "textAlign":
|
|
6407
|
+
return "Text Align";
|
|
6408
|
+
case "highlightLinks":
|
|
6409
|
+
return "Highlight Links";
|
|
6410
|
+
case "highlightFocus":
|
|
6411
|
+
return "Highlight Focus";
|
|
6412
|
+
case "cursorSize":
|
|
6413
|
+
return "Cursor Size";
|
|
6414
|
+
case "readerMode":
|
|
6415
|
+
return "Reading Mode";
|
|
6416
|
+
case "saturation":
|
|
6417
|
+
return "Saturation";
|
|
6418
|
+
case "hideDecorativeImages":
|
|
6419
|
+
return "Hide Images";
|
|
6420
|
+
default:
|
|
6421
|
+
return key.replace(/([A-Z])/g, " $1").trim();
|
|
6422
|
+
}
|
|
6423
|
+
};
|
|
6424
|
+
const formatSettingValue = (key, val) => {
|
|
6425
|
+
if (typeof val === "boolean") return val ? "On" : "Off";
|
|
6426
|
+
if (key === "fontScale" && typeof val === "number")
|
|
6427
|
+
return `${Math.round(val * 100)}%`;
|
|
6428
|
+
if (key === "lineHeight" && typeof val === "number")
|
|
6429
|
+
return `${Math.round(val * 100)}%`;
|
|
6430
|
+
if (val === null || val === void 0) return "Original";
|
|
6431
|
+
return String(val);
|
|
6432
|
+
};
|
|
6433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6434
|
+
"div",
|
|
6435
|
+
{
|
|
6436
|
+
className: `arap-feature arap-feature-expandable ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
6437
|
+
role: "group",
|
|
6438
|
+
"aria-label": effectiveLabel,
|
|
6439
|
+
children: [
|
|
6440
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6441
|
+
"div",
|
|
6442
|
+
{
|
|
6443
|
+
style: {
|
|
6444
|
+
display: "flex",
|
|
6445
|
+
alignItems: "center",
|
|
6446
|
+
justifyContent: "space-between",
|
|
6447
|
+
width: "100%"
|
|
6448
|
+
},
|
|
6449
|
+
children: [
|
|
6450
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "arap-label", children: [
|
|
6451
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FeatureIcon, { name: "presets" }),
|
|
6452
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { children: [
|
|
6453
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { style: { display: "block" }, children: effectiveLabel }),
|
|
6454
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6455
|
+
"span",
|
|
6456
|
+
{
|
|
6457
|
+
style: {
|
|
6458
|
+
display: "block",
|
|
6459
|
+
fontSize: "11px",
|
|
6460
|
+
fontWeight: 400,
|
|
6461
|
+
color: "var(--arap-muted, #64748b)",
|
|
6462
|
+
marginTop: "1px"
|
|
6463
|
+
},
|
|
6464
|
+
children: presets.length > 0 ? `${presets.length} custom preset${presets.length === 1 ? "" : "s"} saved` : description
|
|
6465
|
+
}
|
|
6466
|
+
)
|
|
6467
|
+
] })
|
|
6468
|
+
] }),
|
|
6469
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6470
|
+
"button",
|
|
6471
|
+
{
|
|
6472
|
+
ref: triggerRef,
|
|
6473
|
+
className: "arap-btn-sm",
|
|
6474
|
+
type: "button",
|
|
6475
|
+
"aria-expanded": isOpen,
|
|
6476
|
+
"aria-controls": dialogId,
|
|
6477
|
+
onClick: () => setIsOpen(!isOpen),
|
|
6478
|
+
children: isOpen ? "Close" : "Presets"
|
|
6479
|
+
}
|
|
6480
|
+
)
|
|
6481
|
+
]
|
|
6482
|
+
}
|
|
6483
|
+
),
|
|
6484
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6485
|
+
"div",
|
|
6486
|
+
{
|
|
6487
|
+
id: dialogId,
|
|
6488
|
+
role: "region",
|
|
6489
|
+
"aria-label": "Custom Presets and Settings",
|
|
6490
|
+
tabIndex: -1,
|
|
6491
|
+
style: {
|
|
6492
|
+
marginTop: "12px",
|
|
6493
|
+
padding: "12px",
|
|
6494
|
+
borderRadius: "6px",
|
|
6495
|
+
backgroundColor: "var(--arap-card-bg, #f8fafc)",
|
|
6496
|
+
border: "1px solid var(--arap-border, #e2e8f0)"
|
|
6497
|
+
},
|
|
6498
|
+
onKeyDown: (e) => {
|
|
6499
|
+
if (e.key === "Escape") {
|
|
6500
|
+
e.stopPropagation();
|
|
6501
|
+
setIsOpen(false);
|
|
6502
|
+
triggerRef.current?.focus();
|
|
6503
|
+
}
|
|
6504
|
+
},
|
|
6505
|
+
children: [
|
|
6506
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6507
|
+
"div",
|
|
6508
|
+
{
|
|
6509
|
+
role: "status",
|
|
6510
|
+
"aria-live": "polite",
|
|
6511
|
+
className: "arap-presets-status",
|
|
6512
|
+
style: {
|
|
6513
|
+
minHeight: statusMessage || errorMessage ? "24px" : "0",
|
|
6514
|
+
marginBottom: statusMessage || errorMessage ? "8px" : "0"
|
|
6515
|
+
},
|
|
6516
|
+
children: [
|
|
6517
|
+
statusMessage && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6518
|
+
"div",
|
|
6519
|
+
{
|
|
6520
|
+
style: {
|
|
6521
|
+
fontSize: "12px",
|
|
6522
|
+
fontWeight: 500,
|
|
6523
|
+
color: "var(--arap-success, #16a34a)",
|
|
6524
|
+
padding: "4px 8px",
|
|
6525
|
+
backgroundColor: "rgba(22, 163, 74, 0.1)",
|
|
6526
|
+
borderRadius: "4px"
|
|
6527
|
+
},
|
|
6528
|
+
children: [
|
|
6529
|
+
"\u2713 ",
|
|
6530
|
+
statusMessage
|
|
6531
|
+
]
|
|
6532
|
+
}
|
|
6533
|
+
),
|
|
6534
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6535
|
+
"div",
|
|
6536
|
+
{
|
|
6537
|
+
role: "alert",
|
|
6538
|
+
style: {
|
|
6539
|
+
fontSize: "12px",
|
|
6540
|
+
fontWeight: 500,
|
|
6541
|
+
color: "var(--arap-error, #dc2626)",
|
|
6542
|
+
padding: "4px 8px",
|
|
6543
|
+
backgroundColor: "rgba(220, 38, 38, 0.1)",
|
|
6544
|
+
borderRadius: "4px"
|
|
6545
|
+
},
|
|
6546
|
+
children: [
|
|
6547
|
+
"\u26A0 ",
|
|
6548
|
+
errorMessage
|
|
6549
|
+
]
|
|
6550
|
+
}
|
|
6551
|
+
)
|
|
6552
|
+
]
|
|
6553
|
+
}
|
|
6554
|
+
),
|
|
6555
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6556
|
+
"div",
|
|
6557
|
+
{
|
|
6558
|
+
className: "arap-presets-save-section",
|
|
6559
|
+
style: { marginBottom: "14px" },
|
|
6560
|
+
children: [
|
|
6561
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6562
|
+
"label",
|
|
6563
|
+
{
|
|
6564
|
+
htmlFor: nameInputId,
|
|
6565
|
+
style: {
|
|
6566
|
+
display: "block",
|
|
6567
|
+
fontSize: "12px",
|
|
6568
|
+
fontWeight: 600,
|
|
6569
|
+
marginBottom: "4px",
|
|
6570
|
+
color: "var(--arap-text, #1e293b)"
|
|
6571
|
+
},
|
|
6572
|
+
children: "Save current settings as preset:"
|
|
6573
|
+
}
|
|
6574
|
+
),
|
|
6575
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { style: { display: "flex", gap: "6px" }, children: [
|
|
6576
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6577
|
+
"input",
|
|
6578
|
+
{
|
|
6579
|
+
id: nameInputId,
|
|
6580
|
+
type: "text",
|
|
6581
|
+
className: "arap-search-input",
|
|
6582
|
+
style: { flex: 1, padding: "6px 10px", fontSize: "13px" },
|
|
6583
|
+
value: presetName,
|
|
6584
|
+
onChange: (e) => {
|
|
6585
|
+
setPresetName(e.target.value);
|
|
6586
|
+
if (errorMessage) setErrorMessage("");
|
|
6587
|
+
},
|
|
6588
|
+
onKeyDown: (e) => {
|
|
6589
|
+
if (e.key === "Enter") {
|
|
6590
|
+
e.preventDefault();
|
|
6591
|
+
handleSave();
|
|
6592
|
+
}
|
|
6593
|
+
},
|
|
6594
|
+
placeholder: "Preset name (e.g. My Reading Setup)",
|
|
6595
|
+
"aria-label": "Preset name"
|
|
6596
|
+
}
|
|
6597
|
+
),
|
|
6598
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6599
|
+
"button",
|
|
6600
|
+
{
|
|
6601
|
+
type: "button",
|
|
6602
|
+
className: "arap-btn-sm",
|
|
6603
|
+
onClick: handleSave,
|
|
6604
|
+
"aria-label": "Save current preset",
|
|
6605
|
+
children: "Save"
|
|
6606
|
+
}
|
|
6607
|
+
)
|
|
6608
|
+
] })
|
|
6609
|
+
]
|
|
6610
|
+
}
|
|
6611
|
+
),
|
|
6612
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6613
|
+
"div",
|
|
6614
|
+
{
|
|
6615
|
+
className: "arap-presets-transfer-section",
|
|
6616
|
+
style: {
|
|
6617
|
+
display: "flex",
|
|
6618
|
+
gap: "8px",
|
|
6619
|
+
marginBottom: "14px",
|
|
6620
|
+
paddingBottom: "12px",
|
|
6621
|
+
borderBottom: "1px solid var(--arap-border, #e2e8f0)"
|
|
6622
|
+
},
|
|
6623
|
+
children: [
|
|
6624
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6625
|
+
"button",
|
|
6626
|
+
{
|
|
6627
|
+
type: "button",
|
|
6628
|
+
className: "arap-btn-sm",
|
|
6629
|
+
style: { flex: 1 },
|
|
6630
|
+
onClick: handleExport,
|
|
6631
|
+
"aria-label": "Export settings and presets to JSON file",
|
|
6632
|
+
children: "Export JSON"
|
|
6633
|
+
}
|
|
6634
|
+
),
|
|
6635
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6636
|
+
"button",
|
|
6637
|
+
{
|
|
6638
|
+
type: "button",
|
|
6639
|
+
className: "arap-btn-sm",
|
|
6640
|
+
style: { flex: 1 },
|
|
6641
|
+
onClick: () => fileInputRef.current?.click(),
|
|
6642
|
+
"aria-label": "Import settings and presets from JSON file",
|
|
6643
|
+
children: "Import JSON"
|
|
6644
|
+
}
|
|
6645
|
+
),
|
|
6646
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6647
|
+
"input",
|
|
6648
|
+
{
|
|
6649
|
+
ref: fileInputRef,
|
|
6650
|
+
type: "file",
|
|
6651
|
+
accept: ".json,application/json",
|
|
6652
|
+
style: { display: "none" },
|
|
6653
|
+
"aria-label": "Upload JSON settings file",
|
|
6654
|
+
onChange: handleFileInputChange
|
|
6655
|
+
}
|
|
6656
|
+
)
|
|
6657
|
+
]
|
|
6658
|
+
}
|
|
6659
|
+
),
|
|
6660
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "arap-presets-list-section", children: [
|
|
6661
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6662
|
+
"h4",
|
|
6663
|
+
{
|
|
6664
|
+
style: {
|
|
6665
|
+
fontSize: "12px",
|
|
6666
|
+
fontWeight: 600,
|
|
6667
|
+
marginBottom: "6px",
|
|
6668
|
+
color: "var(--arap-text, #1e293b)"
|
|
6669
|
+
},
|
|
6670
|
+
children: [
|
|
6671
|
+
"Saved Presets (",
|
|
6672
|
+
presets.length,
|
|
6673
|
+
"):"
|
|
6674
|
+
]
|
|
6675
|
+
}
|
|
6676
|
+
),
|
|
6677
|
+
presets.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6678
|
+
EmptyState,
|
|
6679
|
+
{
|
|
6680
|
+
title: "No saved presets yet",
|
|
6681
|
+
description: "Configure your preferences and save them above for quick 1-click access."
|
|
6682
|
+
}
|
|
6683
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6684
|
+
"div",
|
|
6685
|
+
{
|
|
6686
|
+
style: {
|
|
6687
|
+
display: "flex",
|
|
6688
|
+
flexDirection: "column",
|
|
6689
|
+
gap: "8px"
|
|
6690
|
+
},
|
|
6691
|
+
children: presets.map((p) => {
|
|
6692
|
+
const affectedKeys = Object.keys(
|
|
6693
|
+
p.settings
|
|
6694
|
+
);
|
|
6695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6696
|
+
"div",
|
|
6697
|
+
{
|
|
6698
|
+
className: "arap-preset-card",
|
|
6699
|
+
role: "group",
|
|
6700
|
+
"aria-label": `${p.name} preset`,
|
|
6701
|
+
style: {
|
|
6702
|
+
padding: "8px 10px",
|
|
6703
|
+
borderRadius: "6px",
|
|
6704
|
+
backgroundColor: "var(--arap-bg, #ffffff)",
|
|
6705
|
+
border: "1px solid var(--arap-border, #e2e8f0)"
|
|
6706
|
+
},
|
|
6707
|
+
children: [
|
|
6708
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6709
|
+
"div",
|
|
6710
|
+
{
|
|
6711
|
+
style: {
|
|
6712
|
+
display: "flex",
|
|
6713
|
+
alignItems: "center",
|
|
6714
|
+
justifyContent: "space-between",
|
|
6715
|
+
marginBottom: "4px"
|
|
6716
|
+
},
|
|
6717
|
+
children: [
|
|
6718
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
|
|
6719
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6720
|
+
"strong",
|
|
6721
|
+
{
|
|
6722
|
+
style: {
|
|
6723
|
+
fontSize: "13px",
|
|
6724
|
+
color: "var(--arap-text, #1e293b)"
|
|
6725
|
+
},
|
|
6726
|
+
children: p.name
|
|
6727
|
+
}
|
|
6728
|
+
),
|
|
6729
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6730
|
+
"span",
|
|
6731
|
+
{
|
|
6732
|
+
style: {
|
|
6733
|
+
display: "block",
|
|
6734
|
+
fontSize: "10px",
|
|
6735
|
+
color: "var(--arap-muted, #64748b)"
|
|
6736
|
+
},
|
|
6737
|
+
children: [
|
|
6738
|
+
"Saved ",
|
|
6739
|
+
new Date(p.createdAt).toLocaleDateString()
|
|
6740
|
+
]
|
|
6741
|
+
}
|
|
6742
|
+
)
|
|
6743
|
+
] }),
|
|
6744
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6745
|
+
"div",
|
|
6746
|
+
{
|
|
6747
|
+
style: {
|
|
6748
|
+
display: "flex",
|
|
6749
|
+
gap: "6px",
|
|
6750
|
+
alignItems: "center"
|
|
6751
|
+
},
|
|
6752
|
+
children: [
|
|
6753
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6754
|
+
"button",
|
|
6755
|
+
{
|
|
6756
|
+
type: "button",
|
|
6757
|
+
className: "arap-btn-sm",
|
|
6758
|
+
onClick: () => handleApply(p),
|
|
6759
|
+
"aria-label": `Apply preset ${p.name}`,
|
|
6760
|
+
children: "Apply"
|
|
6761
|
+
}
|
|
6762
|
+
),
|
|
6763
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6764
|
+
"button",
|
|
6765
|
+
{
|
|
6766
|
+
type: "button",
|
|
6767
|
+
className: "arap-btn-sm",
|
|
6768
|
+
onClick: () => handleDelete(p),
|
|
6769
|
+
"aria-label": `Delete preset ${p.name}`,
|
|
6770
|
+
style: {
|
|
6771
|
+
color: "var(--arap-error, #dc2626)"
|
|
6772
|
+
},
|
|
6773
|
+
children: "Delete"
|
|
6774
|
+
}
|
|
6775
|
+
)
|
|
6776
|
+
]
|
|
6777
|
+
}
|
|
6778
|
+
)
|
|
6779
|
+
]
|
|
6780
|
+
}
|
|
6781
|
+
),
|
|
6782
|
+
affectedKeys.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6783
|
+
"div",
|
|
6784
|
+
{
|
|
6785
|
+
className: "arap-profile-chips",
|
|
6786
|
+
style: { marginTop: "4px" },
|
|
6787
|
+
children: affectedKeys.map((key) => {
|
|
6788
|
+
const val = p.settings[key];
|
|
6789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
6790
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("strong", { children: [
|
|
6791
|
+
formatKeyName(key),
|
|
6792
|
+
":"
|
|
6793
|
+
] }),
|
|
6794
|
+
" ",
|
|
6795
|
+
formatSettingValue(key, val)
|
|
6796
|
+
] }, key);
|
|
6797
|
+
})
|
|
6798
|
+
}
|
|
6799
|
+
)
|
|
6800
|
+
]
|
|
6801
|
+
},
|
|
6802
|
+
p.id
|
|
6803
|
+
);
|
|
6804
|
+
})
|
|
6805
|
+
}
|
|
6806
|
+
)
|
|
6807
|
+
] })
|
|
6808
|
+
]
|
|
6809
|
+
}
|
|
6810
|
+
)
|
|
6811
|
+
]
|
|
6812
|
+
}
|
|
6813
|
+
);
|
|
6814
|
+
}
|
|
6815
|
+
var CustomPresetsController = PresetsController;
|
|
6816
|
+
var SettingsImportExportController = PresetsController;
|
|
6817
|
+
var PresetsBackupController = PresetsController;
|
|
6818
|
+
|
|
6819
|
+
// src/core/controls/ToggleControl.tsx
|
|
6820
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6821
|
+
function ToggleControl({
|
|
6822
|
+
id,
|
|
6823
|
+
label,
|
|
6824
|
+
checked,
|
|
6825
|
+
onChange,
|
|
6826
|
+
disabled = false,
|
|
6827
|
+
unavailable = false,
|
|
6828
|
+
unavailableReason,
|
|
6829
|
+
name,
|
|
6830
|
+
description,
|
|
6831
|
+
largeControls = false,
|
|
6832
|
+
className = "",
|
|
6833
|
+
style
|
|
6834
|
+
}) {
|
|
6835
|
+
const isInteractive = !disabled && !unavailable;
|
|
6836
|
+
const toggleLabel = typeof label === "string" ? label : void 0;
|
|
6837
|
+
const handleClick = () => {
|
|
6838
|
+
if (isInteractive) {
|
|
6839
|
+
onChange(!checked);
|
|
6840
|
+
}
|
|
6841
|
+
};
|
|
6842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6843
|
+
"div",
|
|
6844
|
+
{
|
|
6845
|
+
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
6846
|
+
style,
|
|
6847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6848
|
+
"button",
|
|
6849
|
+
{
|
|
6850
|
+
id,
|
|
6851
|
+
name,
|
|
6852
|
+
type: "button",
|
|
6853
|
+
className: `arap-toggle ${checked ? "arap-toggle-active" : ""}`,
|
|
6854
|
+
role: "switch",
|
|
6855
|
+
"aria-checked": checked,
|
|
6856
|
+
"aria-label": toggleLabel,
|
|
6857
|
+
"aria-disabled": !isInteractive,
|
|
6858
|
+
disabled: !isInteractive,
|
|
6859
|
+
onClick: handleClick,
|
|
6860
|
+
title: unavailableReason || description || toggleLabel,
|
|
6861
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6862
|
+
"span",
|
|
6863
|
+
{
|
|
6864
|
+
className: "arap-toggle-knob",
|
|
6865
|
+
style: {
|
|
6866
|
+
transform: checked ? largeControls ? "translateX(28px)" : "translateX(24px)" : "translateX(0)"
|
|
6867
|
+
}
|
|
6868
|
+
}
|
|
6869
|
+
)
|
|
6870
|
+
}
|
|
6871
|
+
)
|
|
6872
|
+
}
|
|
6873
|
+
);
|
|
6874
|
+
}
|
|
4566
6875
|
|
|
4567
6876
|
// src/core/controls/ChoiceControl.tsx
|
|
4568
|
-
var
|
|
4569
|
-
var
|
|
6877
|
+
var import_react24 = require("react");
|
|
6878
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4570
6879
|
function ChoiceControl({
|
|
4571
6880
|
id,
|
|
4572
6881
|
label,
|
|
@@ -4580,12 +6889,12 @@ function ChoiceControl({
|
|
|
4580
6889
|
style,
|
|
4581
6890
|
orientation = "horizontal"
|
|
4582
6891
|
}) {
|
|
4583
|
-
const containerRef = (0,
|
|
4584
|
-
const allOptions = (0,
|
|
6892
|
+
const containerRef = (0, import_react24.useRef)(null);
|
|
6893
|
+
const allOptions = (0, import_react24.useMemo)(
|
|
4585
6894
|
() => groups ? groups.flatMap((g) => g.options) : options || [],
|
|
4586
6895
|
[groups, options]
|
|
4587
6896
|
);
|
|
4588
|
-
const handleKeyDown = (0,
|
|
6897
|
+
const handleKeyDown = (0, import_react24.useCallback)(
|
|
4589
6898
|
(e) => {
|
|
4590
6899
|
if (disabled || allOptions.length === 0) return;
|
|
4591
6900
|
const enabledOptions = allOptions.filter((opt) => !opt.disabled);
|
|
@@ -4622,7 +6931,7 @@ function ChoiceControl({
|
|
|
4622
6931
|
const renderOptionButton = (opt) => {
|
|
4623
6932
|
const isSelected = value === opt.value;
|
|
4624
6933
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
4625
|
-
return /* @__PURE__ */ (0,
|
|
6934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
4626
6935
|
"button",
|
|
4627
6936
|
{
|
|
4628
6937
|
type: "button",
|
|
@@ -4636,15 +6945,15 @@ function ChoiceControl({
|
|
|
4636
6945
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
4637
6946
|
title: opt.description,
|
|
4638
6947
|
children: [
|
|
4639
|
-
isSelected && /* @__PURE__ */ (0,
|
|
4640
|
-
/* @__PURE__ */ (0,
|
|
4641
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
6948
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
6949
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: opt.label }),
|
|
6950
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
4642
6951
|
]
|
|
4643
6952
|
},
|
|
4644
6953
|
String(opt.value)
|
|
4645
6954
|
);
|
|
4646
6955
|
};
|
|
4647
|
-
return /* @__PURE__ */ (0,
|
|
6956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4648
6957
|
"div",
|
|
4649
6958
|
{
|
|
4650
6959
|
ref: containerRef,
|
|
@@ -4655,15 +6964,15 @@ function ChoiceControl({
|
|
|
4655
6964
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4656
6965
|
style,
|
|
4657
6966
|
onKeyDown: handleKeyDown,
|
|
4658
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
6967
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
4659
6968
|
"div",
|
|
4660
6969
|
{
|
|
4661
6970
|
className: "arap-choice-group",
|
|
4662
6971
|
role: "group",
|
|
4663
6972
|
"aria-label": group.label,
|
|
4664
6973
|
children: [
|
|
4665
|
-
/* @__PURE__ */ (0,
|
|
4666
|
-
/* @__PURE__ */ (0,
|
|
6974
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
6975
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
4667
6976
|
]
|
|
4668
6977
|
},
|
|
4669
6978
|
group.label
|
|
@@ -4673,7 +6982,7 @@ function ChoiceControl({
|
|
|
4673
6982
|
}
|
|
4674
6983
|
|
|
4675
6984
|
// src/core/controls/StepperControl.tsx
|
|
4676
|
-
var
|
|
6985
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4677
6986
|
function StepperControl({
|
|
4678
6987
|
id,
|
|
4679
6988
|
label,
|
|
@@ -4703,15 +7012,15 @@ function StepperControl({
|
|
|
4703
7012
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
4704
7013
|
}
|
|
4705
7014
|
};
|
|
4706
|
-
return /* @__PURE__ */ (0,
|
|
7015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
4707
7016
|
"div",
|
|
4708
7017
|
{
|
|
4709
7018
|
id,
|
|
4710
7019
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4711
7020
|
style,
|
|
4712
7021
|
children: [
|
|
4713
|
-
/* @__PURE__ */ (0,
|
|
4714
|
-
/* @__PURE__ */ (0,
|
|
7022
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "arap-controls", children: [
|
|
7023
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4715
7024
|
"button",
|
|
4716
7025
|
{
|
|
4717
7026
|
type: "button",
|
|
@@ -4722,8 +7031,8 @@ function StepperControl({
|
|
|
4722
7031
|
children: "\u2212"
|
|
4723
7032
|
}
|
|
4724
7033
|
),
|
|
4725
|
-
/* @__PURE__ */ (0,
|
|
4726
|
-
/* @__PURE__ */ (0,
|
|
7034
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
7035
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4727
7036
|
"button",
|
|
4728
7037
|
{
|
|
4729
7038
|
type: "button",
|
|
@@ -4735,7 +7044,7 @@ function StepperControl({
|
|
|
4735
7044
|
}
|
|
4736
7045
|
)
|
|
4737
7046
|
] }),
|
|
4738
|
-
showSlider && /* @__PURE__ */ (0,
|
|
7047
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4739
7048
|
"input",
|
|
4740
7049
|
{
|
|
4741
7050
|
type: "range",
|
|
@@ -4759,7 +7068,7 @@ function StepperControl({
|
|
|
4759
7068
|
}
|
|
4760
7069
|
|
|
4761
7070
|
// src/core/controls/FeatureCard.tsx
|
|
4762
|
-
var
|
|
7071
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4763
7072
|
function FeatureCard({
|
|
4764
7073
|
id,
|
|
4765
7074
|
featureKey,
|
|
@@ -4778,7 +7087,7 @@ function FeatureCard({
|
|
|
4778
7087
|
largeControls = false
|
|
4779
7088
|
}) {
|
|
4780
7089
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
4781
|
-
return /* @__PURE__ */ (0,
|
|
7090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
4782
7091
|
"div",
|
|
4783
7092
|
{
|
|
4784
7093
|
id,
|
|
@@ -4787,27 +7096,27 @@ function FeatureCard({
|
|
|
4787
7096
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4788
7097
|
style,
|
|
4789
7098
|
children: [
|
|
4790
|
-
/* @__PURE__ */ (0,
|
|
4791
|
-
/* @__PURE__ */ (0,
|
|
4792
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
4793
|
-
/* @__PURE__ */ (0,
|
|
7099
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "arap-card-header", children: [
|
|
7100
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "arap-label", children: [
|
|
7101
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
7102
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "arap-card-title", children: title })
|
|
4794
7103
|
] }),
|
|
4795
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
7104
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
4796
7105
|
] }),
|
|
4797
|
-
description && /* @__PURE__ */ (0,
|
|
4798
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
4799
|
-
/* @__PURE__ */ (0,
|
|
4800
|
-
/* @__PURE__ */ (0,
|
|
7106
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
7107
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
7108
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
7109
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: errorMessage })
|
|
4801
7110
|
] }),
|
|
4802
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
4803
|
-
/* @__PURE__ */ (0,
|
|
4804
|
-
/* @__PURE__ */ (0,
|
|
7111
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
7112
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
7113
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: unavailableMessage })
|
|
4805
7114
|
] }),
|
|
4806
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
4807
|
-
/* @__PURE__ */ (0,
|
|
4808
|
-
/* @__PURE__ */ (0,
|
|
4809
|
-
/* @__PURE__ */ (0,
|
|
4810
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
7115
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
7116
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
7117
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "arap-permission-content", children: [
|
|
7118
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: permissionMessage }),
|
|
7119
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4811
7120
|
"button",
|
|
4812
7121
|
{
|
|
4813
7122
|
type: "button",
|
|
@@ -4818,199 +7127,20 @@ function FeatureCard({
|
|
|
4818
7127
|
)
|
|
4819
7128
|
] })
|
|
4820
7129
|
] }),
|
|
4821
|
-
/* @__PURE__ */ (0,
|
|
4822
|
-
]
|
|
4823
|
-
}
|
|
4824
|
-
);
|
|
4825
|
-
}
|
|
4826
|
-
|
|
4827
|
-
// src/core/controls/FeatureStatusState.tsx
|
|
4828
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4829
|
-
function SearchCount({
|
|
4830
|
-
totalCount,
|
|
4831
|
-
matchedCount,
|
|
4832
|
-
query,
|
|
4833
|
-
className = "",
|
|
4834
|
-
style
|
|
4835
|
-
}) {
|
|
4836
|
-
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
4837
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4838
|
-
"div",
|
|
4839
|
-
{
|
|
4840
|
-
role: "status",
|
|
4841
|
-
"aria-live": "polite",
|
|
4842
|
-
className: `arap-search-count ${className}`,
|
|
4843
|
-
style,
|
|
4844
|
-
children: text
|
|
4845
|
-
}
|
|
4846
|
-
);
|
|
4847
|
-
}
|
|
4848
|
-
function EmptyState({
|
|
4849
|
-
title = "No matching tools found",
|
|
4850
|
-
description = "Try adjusting your search query or reset filters.",
|
|
4851
|
-
actionLabel = "Clear search",
|
|
4852
|
-
onAction,
|
|
4853
|
-
icon,
|
|
4854
|
-
className = "",
|
|
4855
|
-
style
|
|
4856
|
-
}) {
|
|
4857
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4858
|
-
"div",
|
|
4859
|
-
{
|
|
4860
|
-
role: "status",
|
|
4861
|
-
className: `arap-empty-state ${className}`,
|
|
4862
|
-
style,
|
|
4863
|
-
children: [
|
|
4864
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
4865
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "arap-empty-title", children: title }),
|
|
4866
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "arap-empty-desc", children: description }),
|
|
4867
|
-
onAction && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
4868
|
-
]
|
|
4869
|
-
}
|
|
4870
|
-
);
|
|
4871
|
-
}
|
|
4872
|
-
function ErrorState({
|
|
4873
|
-
title = "Something went wrong",
|
|
4874
|
-
message,
|
|
4875
|
-
onRetry,
|
|
4876
|
-
retryLabel = "Try again",
|
|
4877
|
-
className = "",
|
|
4878
|
-
style
|
|
4879
|
-
}) {
|
|
4880
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4881
|
-
"div",
|
|
4882
|
-
{
|
|
4883
|
-
role: "alert",
|
|
4884
|
-
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
4885
|
-
style,
|
|
4886
|
-
children: [
|
|
4887
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
4888
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "arap-error-content", children: [
|
|
4889
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
4890
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "arap-error-message", children: message }),
|
|
4891
|
-
onRetry && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
4892
|
-
] })
|
|
4893
|
-
]
|
|
4894
|
-
}
|
|
4895
|
-
);
|
|
4896
|
-
}
|
|
4897
|
-
|
|
4898
|
-
// src/core/controls/ProfilePreviewCard.tsx
|
|
4899
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4900
|
-
function ProfilePreviewCard({
|
|
4901
|
-
profile,
|
|
4902
|
-
isActive,
|
|
4903
|
-
onApply,
|
|
4904
|
-
onRevert,
|
|
4905
|
-
largeControls = false,
|
|
4906
|
-
className = "",
|
|
4907
|
-
style
|
|
4908
|
-
}) {
|
|
4909
|
-
const affectedKeys = Object.keys(
|
|
4910
|
-
profile.settings
|
|
4911
|
-
);
|
|
4912
|
-
const formatKeyName = (key) => {
|
|
4913
|
-
switch (key) {
|
|
4914
|
-
case "fontScale":
|
|
4915
|
-
return "Font Size";
|
|
4916
|
-
case "lineHeight":
|
|
4917
|
-
return "Line Height";
|
|
4918
|
-
case "contrastMode":
|
|
4919
|
-
return "Contrast";
|
|
4920
|
-
case "reduceMotion":
|
|
4921
|
-
return "Reduce Motion";
|
|
4922
|
-
case "textAlign":
|
|
4923
|
-
return "Text Align";
|
|
4924
|
-
case "highlightLinks":
|
|
4925
|
-
return "Highlight Links";
|
|
4926
|
-
case "highlightFocus":
|
|
4927
|
-
return "Highlight Focus";
|
|
4928
|
-
case "cursorSize":
|
|
4929
|
-
return "Cursor Size";
|
|
4930
|
-
case "readerMode":
|
|
4931
|
-
return "Reading Mode";
|
|
4932
|
-
case "saturation":
|
|
4933
|
-
return "Saturation";
|
|
4934
|
-
case "hideDecorativeImages":
|
|
4935
|
-
return "Hide Images";
|
|
4936
|
-
default:
|
|
4937
|
-
return key.replace(/([A-Z])/g, " $1").trim();
|
|
4938
|
-
}
|
|
4939
|
-
};
|
|
4940
|
-
const formatSettingValue = (key, val) => {
|
|
4941
|
-
if (typeof val === "boolean") return val ? "On" : "Off";
|
|
4942
|
-
if (key === "fontScale" && typeof val === "number")
|
|
4943
|
-
return `${Math.round(val * 100)}%`;
|
|
4944
|
-
if (key === "lineHeight" && typeof val === "number")
|
|
4945
|
-
return `${Math.round(val * 100)}%`;
|
|
4946
|
-
if (val === null || val === void 0) return "Original";
|
|
4947
|
-
return String(val);
|
|
4948
|
-
};
|
|
4949
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4950
|
-
"div",
|
|
4951
|
-
{
|
|
4952
|
-
role: "group",
|
|
4953
|
-
"aria-label": `${profile.label} profile`,
|
|
4954
|
-
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4955
|
-
style,
|
|
4956
|
-
children: [
|
|
4957
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "arap-profile-header", children: [
|
|
4958
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
4959
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
4960
|
-
isActive && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4961
|
-
"span",
|
|
4962
|
-
{
|
|
4963
|
-
className: "arap-profile-active-badge",
|
|
4964
|
-
"aria-label": "Active profile",
|
|
4965
|
-
children: "\u2713 Active"
|
|
4966
|
-
}
|
|
4967
|
-
)
|
|
4968
|
-
] }),
|
|
4969
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
4970
|
-
] }),
|
|
4971
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
4972
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
4973
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
4974
|
-
const val = profile.settings[key];
|
|
4975
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
4976
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("strong", { children: [
|
|
4977
|
-
formatKeyName(key),
|
|
4978
|
-
":"
|
|
4979
|
-
] }),
|
|
4980
|
-
" ",
|
|
4981
|
-
formatSettingValue(key, val)
|
|
4982
|
-
] }, key);
|
|
4983
|
-
}) })
|
|
4984
|
-
] }),
|
|
4985
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4986
|
-
"button",
|
|
4987
|
-
{
|
|
4988
|
-
type: "button",
|
|
4989
|
-
className: "arap-profile-revert-btn",
|
|
4990
|
-
onClick: onRevert,
|
|
4991
|
-
"aria-label": `Revert ${profile.label} profile`,
|
|
4992
|
-
children: "Revert to custom settings"
|
|
4993
|
-
}
|
|
4994
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4995
|
-
"button",
|
|
4996
|
-
{
|
|
4997
|
-
type: "button",
|
|
4998
|
-
className: "arap-profile-apply-btn",
|
|
4999
|
-
onClick: () => onApply(profile),
|
|
5000
|
-
"aria-label": `Apply ${profile.label} profile`,
|
|
5001
|
-
children: "Apply Profile"
|
|
5002
|
-
}
|
|
5003
|
-
) })
|
|
7130
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "arap-card-content", children })
|
|
5004
7131
|
]
|
|
5005
7132
|
}
|
|
5006
7133
|
);
|
|
5007
7134
|
}
|
|
5008
7135
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5009
7136
|
0 && (module.exports = {
|
|
7137
|
+
ALLOWED_PREFERENCE_KEYS,
|
|
7138
|
+
ALL_PROFILE_IDS,
|
|
5010
7139
|
AccessibilityButton,
|
|
5011
7140
|
AccessibilityContext,
|
|
5012
7141
|
AccessibilityList,
|
|
5013
7142
|
AccessibilityPlugin,
|
|
7143
|
+
AccessibilityProfilesController,
|
|
5014
7144
|
AccessibleTooltipsController,
|
|
5015
7145
|
BigCursorController,
|
|
5016
7146
|
CONTRAST_MODES,
|
|
@@ -5019,6 +7149,7 @@ function ProfilePreviewCard({
|
|
|
5019
7149
|
ChoiceControl,
|
|
5020
7150
|
ContrastController,
|
|
5021
7151
|
ContrastModeController,
|
|
7152
|
+
CustomPresetsController,
|
|
5022
7153
|
DEFAULT_PREFERENCES,
|
|
5023
7154
|
DEFAULT_READING_MASK_HEIGHT,
|
|
5024
7155
|
DYSLEXIA_FONT_STACK,
|
|
@@ -5031,6 +7162,7 @@ function ProfilePreviewCard({
|
|
|
5031
7162
|
FontFamilyController,
|
|
5032
7163
|
FontSizeController,
|
|
5033
7164
|
GrayscaleController,
|
|
7165
|
+
HeadingsNavigatorController,
|
|
5034
7166
|
HideDecorativeImagesController,
|
|
5035
7167
|
HideImagesController,
|
|
5036
7168
|
HideVideosController,
|
|
@@ -5045,8 +7177,14 @@ function ProfilePreviewCard({
|
|
|
5045
7177
|
MAX_READING_MASK_HEIGHT,
|
|
5046
7178
|
MIN_READING_MASK_HEIGHT,
|
|
5047
7179
|
PROFILE_DEFINITIONS,
|
|
7180
|
+
PageNavigatorController,
|
|
7181
|
+
PageStructureController,
|
|
5048
7182
|
ParagraphSpacingController,
|
|
7183
|
+
PresetsBackupController,
|
|
7184
|
+
PresetsController,
|
|
7185
|
+
ProfileController,
|
|
5049
7186
|
ProfilePreviewCard,
|
|
7187
|
+
ProfilesController,
|
|
5050
7188
|
READING_MASK_HEIGHT_PRESETS,
|
|
5051
7189
|
ReadingGuideController,
|
|
5052
7190
|
ReadingMaskController,
|
|
@@ -5054,6 +7192,7 @@ function ProfilePreviewCard({
|
|
|
5054
7192
|
ResetController,
|
|
5055
7193
|
SaturationController,
|
|
5056
7194
|
SearchCount,
|
|
7195
|
+
SettingsImportExportController,
|
|
5057
7196
|
SkipToMainLink,
|
|
5058
7197
|
StepperControl,
|
|
5059
7198
|
TEXT_ALIGN_BLOCK_SELECTOR,
|
|
@@ -5065,11 +7204,17 @@ function ProfilePreviewCard({
|
|
|
5065
7204
|
ToggleControl,
|
|
5066
7205
|
TooltipsController,
|
|
5067
7206
|
WordSpacingController,
|
|
7207
|
+
applyCustomPresetToStore,
|
|
7208
|
+
applyProfileToStore,
|
|
7209
|
+
createCustomPreset,
|
|
5068
7210
|
createInitialPreferencesState,
|
|
7211
|
+
downloadJsonFile,
|
|
5069
7212
|
enLocale,
|
|
5070
7213
|
enableAccessibleTooltips,
|
|
7214
|
+
exportPresetsToJson,
|
|
5071
7215
|
findMainLandmark,
|
|
5072
7216
|
getAuthoredDescription,
|
|
7217
|
+
getProfileDefinition,
|
|
5073
7218
|
getScriptSpacingConstraints,
|
|
5074
7219
|
hasFinePointer,
|
|
5075
7220
|
isEligibleDecorativeImage,
|
|
@@ -5082,17 +7227,32 @@ function ProfilePreviewCard({
|
|
|
5082
7227
|
isProtectedFromTextSpacing,
|
|
5083
7228
|
isReducedMotionActive,
|
|
5084
7229
|
isRtlLocale,
|
|
7230
|
+
isValidCustomPreset,
|
|
7231
|
+
mapFeaturesToProfileSettings,
|
|
7232
|
+
mapProfileSettingsToFeatures,
|
|
7233
|
+
navigateToElement,
|
|
5085
7234
|
normalizePreferenceValue,
|
|
5086
7235
|
normalizePreferences,
|
|
5087
7236
|
nudgeReadingAid,
|
|
5088
7237
|
positionTooltip,
|
|
5089
7238
|
preferencesReducer,
|
|
7239
|
+
recordProfileOverride,
|
|
5090
7240
|
registerLocale,
|
|
5091
7241
|
resolveEffectivePreferences,
|
|
5092
7242
|
resolveLocaleStrings,
|
|
7243
|
+
revertProfileFromStore,
|
|
7244
|
+
sanitizePreferences,
|
|
7245
|
+
scanHeadings,
|
|
7246
|
+
scanLandmarks,
|
|
7247
|
+
siLocale,
|
|
5093
7248
|
subscribeFinePointer,
|
|
5094
7249
|
subscribeForcedColors,
|
|
7250
|
+
subscribePageStructure,
|
|
5095
7251
|
subscribeReducedMotion,
|
|
5096
|
-
|
|
7252
|
+
taLocale,
|
|
7253
|
+
useAccessibility,
|
|
7254
|
+
usePresets,
|
|
7255
|
+
useProfiles,
|
|
7256
|
+
validateAndParseImport
|
|
5097
7257
|
});
|
|
5098
7258
|
//# sourceMappingURL=index.js.map
|