accessibility-plugin-react 2.10.0 → 2.12.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 +21 -21
- package/dist/index.d.mts +23 -4
- package/dist/index.d.ts +23 -4
- package/dist/index.js +498 -64
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +482 -55
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +28 -0
- package/docs/API.md +3 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +3 -3
- package/docs/FEATURES.md +3 -3
- package/docs/READING_AIDS.md +139 -0
- package/docs/REGRESSION_AND_PERFORMANCE.md +127 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(index_exports, {
|
|
|
34
34
|
ContrastController: () => ContrastController,
|
|
35
35
|
ContrastModeController: () => ContrastModeController,
|
|
36
36
|
DEFAULT_PREFERENCES: () => DEFAULT_PREFERENCES,
|
|
37
|
+
DEFAULT_READING_MASK_HEIGHT: () => DEFAULT_READING_MASK_HEIGHT,
|
|
37
38
|
DYSLEXIA_FONT_STACK: () => DYSLEXIA_FONT_STACK,
|
|
38
39
|
EmptyState: () => EmptyState,
|
|
39
40
|
ErrorState: () => ErrorState,
|
|
@@ -55,9 +56,12 @@ __export(index_exports, {
|
|
|
55
56
|
LetterSpacingController: () => LetterSpacingController,
|
|
56
57
|
LineHeightController: () => LineHeightController,
|
|
57
58
|
LinkHighlightController: () => LinkHighlightController,
|
|
59
|
+
MAX_READING_MASK_HEIGHT: () => MAX_READING_MASK_HEIGHT,
|
|
60
|
+
MIN_READING_MASK_HEIGHT: () => MIN_READING_MASK_HEIGHT,
|
|
58
61
|
PROFILE_DEFINITIONS: () => PROFILE_DEFINITIONS,
|
|
59
62
|
ParagraphSpacingController: () => ParagraphSpacingController,
|
|
60
63
|
ProfilePreviewCard: () => ProfilePreviewCard,
|
|
64
|
+
READING_MASK_HEIGHT_PRESETS: () => READING_MASK_HEIGHT_PRESETS,
|
|
61
65
|
ReadingGuideController: () => ReadingGuideController,
|
|
62
66
|
ReadingMaskController: () => ReadingMaskController,
|
|
63
67
|
ReduceMotionController: () => ReduceMotionController,
|
|
@@ -78,6 +82,7 @@ __export(index_exports, {
|
|
|
78
82
|
enLocale: () => enLocale,
|
|
79
83
|
findMainLandmark: () => findMainLandmark,
|
|
80
84
|
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
85
|
+
hasFinePointer: () => hasFinePointer,
|
|
81
86
|
isEligibleDecorativeImage: () => isEligibleDecorativeImage,
|
|
82
87
|
isForcedColorsActive: () => isForcedColorsActive,
|
|
83
88
|
isFunctionalOrMeaningfulImage: () => isFunctionalOrMeaningfulImage,
|
|
@@ -90,10 +95,12 @@ __export(index_exports, {
|
|
|
90
95
|
isRtlLocale: () => isRtlLocale,
|
|
91
96
|
normalizePreferenceValue: () => normalizePreferenceValue,
|
|
92
97
|
normalizePreferences: () => normalizePreferences,
|
|
98
|
+
nudgeReadingAid: () => nudgeReadingAid,
|
|
93
99
|
preferencesReducer: () => preferencesReducer,
|
|
94
100
|
registerLocale: () => registerLocale,
|
|
95
101
|
resolveEffectivePreferences: () => resolveEffectivePreferences,
|
|
96
102
|
resolveLocaleStrings: () => resolveLocaleStrings,
|
|
103
|
+
subscribeFinePointer: () => subscribeFinePointer,
|
|
97
104
|
subscribeForcedColors: () => subscribeForcedColors,
|
|
98
105
|
subscribeReducedMotion: () => subscribeReducedMotion,
|
|
99
106
|
useAccessibility: () => useAccessibility
|
|
@@ -123,7 +130,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
123
130
|
}
|
|
124
131
|
|
|
125
132
|
// src/styles/tailwind.css
|
|
126
|
-
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');
|
|
133
|
+
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');
|
|
127
134
|
|
|
128
135
|
// src/core/AccessibilityPlugin.tsx
|
|
129
136
|
var import_react4 = require("react");
|
|
@@ -428,7 +435,6 @@ for (const key of [
|
|
|
428
435
|
"hideImages",
|
|
429
436
|
"hideVideos",
|
|
430
437
|
"bigCursor",
|
|
431
|
-
"readingMask",
|
|
432
438
|
"readingGuide",
|
|
433
439
|
"highlightFocus",
|
|
434
440
|
"focusHighlight",
|
|
@@ -439,6 +445,18 @@ for (const key of [
|
|
|
439
445
|
validate: (v) => typeof v === "boolean"
|
|
440
446
|
};
|
|
441
447
|
}
|
|
448
|
+
var DEFAULT_READING_MASK_HEIGHT = 100;
|
|
449
|
+
var MIN_READING_MASK_HEIGHT = 40;
|
|
450
|
+
var MAX_READING_MASK_HEIGHT = 400;
|
|
451
|
+
var READING_MASK_HEIGHT_PRESETS = [60, 100, 160, 240];
|
|
452
|
+
builtins.readingMask = {
|
|
453
|
+
defaultValue: false,
|
|
454
|
+
validate: (v) => typeof v === "boolean" || typeof v === "number" && v >= MIN_READING_MASK_HEIGHT && v <= MAX_READING_MASK_HEIGHT
|
|
455
|
+
};
|
|
456
|
+
builtins.readingMaskHeight = {
|
|
457
|
+
defaultValue: DEFAULT_READING_MASK_HEIGHT,
|
|
458
|
+
validate: (v) => typeof v === "number" && v >= MIN_READING_MASK_HEIGHT && v <= MAX_READING_MASK_HEIGHT
|
|
459
|
+
};
|
|
442
460
|
function validValue(key, value, fallback, validate) {
|
|
443
461
|
if (builtins[key]) return builtins[key].validate(value);
|
|
444
462
|
if (validate) {
|
|
@@ -496,6 +514,30 @@ function subscribeReducedMotion(callback) {
|
|
|
496
514
|
};
|
|
497
515
|
}
|
|
498
516
|
}
|
|
517
|
+
function hasFinePointer() {
|
|
518
|
+
if (typeof window === "undefined" || !window.matchMedia) return true;
|
|
519
|
+
try {
|
|
520
|
+
const fine = window.matchMedia("(pointer: fine)");
|
|
521
|
+
if (fine.matches) return true;
|
|
522
|
+
const coarse = window.matchMedia("(pointer: coarse)");
|
|
523
|
+
if (coarse.matches && !fine.matches) return false;
|
|
524
|
+
return true;
|
|
525
|
+
} catch {
|
|
526
|
+
return true;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
function subscribeFinePointer(callback) {
|
|
530
|
+
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
531
|
+
};
|
|
532
|
+
try {
|
|
533
|
+
const mql = window.matchMedia("(pointer: fine)");
|
|
534
|
+
mql.addEventListener("change", callback);
|
|
535
|
+
return () => mql.removeEventListener("change", callback);
|
|
536
|
+
} catch {
|
|
537
|
+
return () => {
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
}
|
|
499
541
|
var CONTRAST_PALETTES = {
|
|
500
542
|
light: {
|
|
501
543
|
text: "#0f172a",
|
|
@@ -1314,8 +1356,12 @@ function applyPage(values) {
|
|
|
1314
1356
|
}
|
|
1315
1357
|
});
|
|
1316
1358
|
}
|
|
1359
|
+
const isFinePointer = hasFinePointer();
|
|
1360
|
+
if (values.bigCursor && isFinePointer) {
|
|
1361
|
+
set(document.body, "cursor", cursor);
|
|
1362
|
+
}
|
|
1317
1363
|
for (const el of elements) {
|
|
1318
|
-
if (values.bigCursor) set(el, "cursor", cursor);
|
|
1364
|
+
if (values.bigCursor && isFinePointer) set(el, "cursor", cursor);
|
|
1319
1365
|
if (values.hideImages) {
|
|
1320
1366
|
if (isEligibleDecorativeImage(el)) {
|
|
1321
1367
|
set(el, "visibility", "hidden");
|
|
@@ -1370,7 +1416,20 @@ function applyPage(values) {
|
|
|
1370
1416
|
for (const restore of undo.reverse()) restore();
|
|
1371
1417
|
};
|
|
1372
1418
|
}
|
|
1373
|
-
function
|
|
1419
|
+
function nudgeReadingAid(feature, delta) {
|
|
1420
|
+
if (typeof document !== "undefined") {
|
|
1421
|
+
try {
|
|
1422
|
+
document.dispatchEvent(
|
|
1423
|
+
new CustomEvent("arap:nudge-reading-aid", {
|
|
1424
|
+
detail: { feature, delta }
|
|
1425
|
+
})
|
|
1426
|
+
);
|
|
1427
|
+
} catch {
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
function readingAid(mask, height = 100, onDisable) {
|
|
1432
|
+
const featureKey = mask ? "readingMask" : "readingGuide";
|
|
1374
1433
|
const existing = document.body.querySelectorAll(
|
|
1375
1434
|
mask ? ".arap-reading-mask" : ".arap-reading-guide"
|
|
1376
1435
|
);
|
|
@@ -1379,27 +1438,114 @@ function readingAid(mask) {
|
|
|
1379
1438
|
el.dataset.arapUi = "";
|
|
1380
1439
|
el.className = mask ? "arap-reading-mask" : "arap-reading-guide";
|
|
1381
1440
|
el.setAttribute("aria-hidden", "true");
|
|
1382
|
-
|
|
1441
|
+
const aidHeight = mask ? Math.max(40, Math.min(400, height)) : 4;
|
|
1442
|
+
const halfHeight = mask ? aidHeight / 2 : 0;
|
|
1443
|
+
el.style.cssText = `position:fixed;left:0;right:0;top:50%;height:${aidHeight}px;pointer-events:none;z-index:2147482999;${mask ? "background:transparent;box-shadow:0 0 0 200vmax rgba(0,0,0,.65)" : "background:#2563eb;border:1px solid white"}`;
|
|
1444
|
+
el.style.setProperty("pointer-events", "none", "important");
|
|
1445
|
+
el.style.setProperty("user-select", "none", "important");
|
|
1446
|
+
el.style.setProperty("-webkit-user-select", "none", "important");
|
|
1447
|
+
el.style.setProperty("touch-action", "none", "important");
|
|
1383
1448
|
document.body.appendChild(el);
|
|
1449
|
+
let currentY = typeof window !== "undefined" && window.innerHeight ? window.innerHeight / 2 : 300;
|
|
1450
|
+
let trackedFocusEl = null;
|
|
1451
|
+
const clampY = (y) => {
|
|
1452
|
+
const vh = typeof window !== "undefined" && window.innerHeight ? window.innerHeight : 600;
|
|
1453
|
+
return Math.max(halfHeight, Math.min(vh - halfHeight, y));
|
|
1454
|
+
};
|
|
1384
1455
|
const move = (y) => {
|
|
1385
|
-
|
|
1456
|
+
currentY = clampY(y);
|
|
1457
|
+
el.style.top = `${Math.max(0, currentY - halfHeight)}px`;
|
|
1458
|
+
};
|
|
1459
|
+
move(currentY);
|
|
1460
|
+
const pointer = (event) => {
|
|
1461
|
+
if (typeof event.clientY === "number" && !isNaN(event.clientY)) {
|
|
1462
|
+
trackedFocusEl = null;
|
|
1463
|
+
move(event.clientY);
|
|
1464
|
+
}
|
|
1465
|
+
};
|
|
1466
|
+
const touch = (event) => {
|
|
1467
|
+
if (event.touches && event.touches.length > 0) {
|
|
1468
|
+
trackedFocusEl = null;
|
|
1469
|
+
move(event.touches[0].clientY);
|
|
1470
|
+
}
|
|
1386
1471
|
};
|
|
1387
|
-
const pointer = (event) => move(event.clientY);
|
|
1388
1472
|
const focus = (event) => {
|
|
1389
1473
|
if (event.target instanceof HTMLElement && !event.target.closest("[data-arap-ui]")) {
|
|
1474
|
+
trackedFocusEl = event.target;
|
|
1390
1475
|
const rect = event.target.getBoundingClientRect();
|
|
1391
1476
|
move(rect.top + rect.height / 2);
|
|
1392
1477
|
}
|
|
1393
1478
|
};
|
|
1479
|
+
const scroll = () => {
|
|
1480
|
+
if (trackedFocusEl && document.contains(trackedFocusEl)) {
|
|
1481
|
+
const rect = trackedFocusEl.getBoundingClientRect();
|
|
1482
|
+
move(rect.top + rect.height / 2);
|
|
1483
|
+
}
|
|
1484
|
+
};
|
|
1485
|
+
const keydown = (event) => {
|
|
1486
|
+
if (event.key === "Escape") {
|
|
1487
|
+
if (document.activeElement && document.activeElement.closest("[data-arap-ui]")) {
|
|
1488
|
+
return;
|
|
1489
|
+
}
|
|
1490
|
+
event.preventDefault();
|
|
1491
|
+
try {
|
|
1492
|
+
document.dispatchEvent(
|
|
1493
|
+
new CustomEvent("arap:disable-feature", { detail: featureKey })
|
|
1494
|
+
);
|
|
1495
|
+
} catch {
|
|
1496
|
+
}
|
|
1497
|
+
onDisable?.(featureKey);
|
|
1498
|
+
el.remove();
|
|
1499
|
+
return;
|
|
1500
|
+
}
|
|
1501
|
+
if (event.altKey && (event.key === "ArrowUp" || event.key === "ArrowDown")) {
|
|
1502
|
+
event.preventDefault();
|
|
1503
|
+
const delta = event.key === "ArrowUp" ? -30 : 30;
|
|
1504
|
+
move(currentY + delta);
|
|
1505
|
+
}
|
|
1506
|
+
};
|
|
1507
|
+
const nudge = (event) => {
|
|
1508
|
+
const custom = event;
|
|
1509
|
+
if (custom.detail && custom.detail.feature === featureKey) {
|
|
1510
|
+
move(currentY + (custom.detail.delta || 0));
|
|
1511
|
+
}
|
|
1512
|
+
};
|
|
1513
|
+
const viewport = () => {
|
|
1514
|
+
move(currentY);
|
|
1515
|
+
};
|
|
1394
1516
|
document.addEventListener("pointermove", pointer, { passive: true });
|
|
1517
|
+
document.addEventListener("mousemove", pointer, { passive: true });
|
|
1518
|
+
document.addEventListener("touchmove", touch, { passive: true });
|
|
1519
|
+
document.addEventListener("touchstart", touch, { passive: true });
|
|
1395
1520
|
document.addEventListener("focusin", focus);
|
|
1521
|
+
document.addEventListener("arap:nudge-reading-aid", nudge);
|
|
1522
|
+
document.addEventListener("keydown", keydown);
|
|
1523
|
+
window.addEventListener("scroll", scroll, { passive: true });
|
|
1524
|
+
window.addEventListener("resize", viewport, { passive: true });
|
|
1525
|
+
window.addEventListener("keydown", keydown);
|
|
1526
|
+
if (typeof window !== "undefined" && window.visualViewport) {
|
|
1527
|
+
window.visualViewport.addEventListener("resize", viewport);
|
|
1528
|
+
window.visualViewport.addEventListener("scroll", viewport);
|
|
1529
|
+
}
|
|
1396
1530
|
return () => {
|
|
1397
1531
|
document.removeEventListener("pointermove", pointer);
|
|
1532
|
+
document.removeEventListener("mousemove", pointer);
|
|
1533
|
+
document.removeEventListener("touchmove", touch);
|
|
1534
|
+
document.removeEventListener("touchstart", touch);
|
|
1398
1535
|
document.removeEventListener("focusin", focus);
|
|
1536
|
+
document.removeEventListener("arap:nudge-reading-aid", nudge);
|
|
1537
|
+
document.removeEventListener("keydown", keydown);
|
|
1538
|
+
window.removeEventListener("scroll", scroll);
|
|
1539
|
+
window.removeEventListener("resize", viewport);
|
|
1540
|
+
window.removeEventListener("keydown", keydown);
|
|
1541
|
+
if (typeof window !== "undefined" && window.visualViewport) {
|
|
1542
|
+
window.visualViewport.removeEventListener("resize", viewport);
|
|
1543
|
+
window.visualViewport.removeEventListener("scroll", viewport);
|
|
1544
|
+
}
|
|
1399
1545
|
el.remove();
|
|
1400
1546
|
};
|
|
1401
1547
|
}
|
|
1402
|
-
function useBuiltinEffects(values) {
|
|
1548
|
+
function useBuiltinEffects(values, onDisable) {
|
|
1403
1549
|
(0, import_react3.useEffect)(() => {
|
|
1404
1550
|
if (!Object.entries(values).some(
|
|
1405
1551
|
([key, value]) => key in builtins && value !== builtins[key].defaultValue
|
|
@@ -1438,14 +1584,15 @@ function useBuiltinEffects(values) {
|
|
|
1438
1584
|
undo();
|
|
1439
1585
|
};
|
|
1440
1586
|
}, [values]);
|
|
1441
|
-
(0, import_react3.useEffect)(
|
|
1442
|
-
(
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1587
|
+
(0, import_react3.useEffect)(() => {
|
|
1588
|
+
if (!values.readingMask) return;
|
|
1589
|
+
const height = typeof values.readingMaskHeight === "number" ? values.readingMaskHeight : typeof values.readingMask === "number" ? values.readingMask : 100;
|
|
1590
|
+
return readingAid(true, height, onDisable);
|
|
1591
|
+
}, [values.readingMask, values.readingMaskHeight, onDisable]);
|
|
1592
|
+
(0, import_react3.useEffect)(() => {
|
|
1593
|
+
if (!values.readingGuide) return;
|
|
1594
|
+
return readingAid(false, 4, onDisable);
|
|
1595
|
+
}, [values.readingGuide, onDisable]);
|
|
1449
1596
|
}
|
|
1450
1597
|
function CustomEffect({
|
|
1451
1598
|
definition,
|
|
@@ -1571,7 +1718,23 @@ function AccessibilityPlugin({
|
|
|
1571
1718
|
),
|
|
1572
1719
|
[definitions, getFeatureState]
|
|
1573
1720
|
);
|
|
1574
|
-
|
|
1721
|
+
const handleDisable = (0, import_react4.useCallback)(
|
|
1722
|
+
(key) => {
|
|
1723
|
+
setFeatureState(key, builtins[key]?.defaultValue ?? false);
|
|
1724
|
+
},
|
|
1725
|
+
[setFeatureState]
|
|
1726
|
+
);
|
|
1727
|
+
(0, import_react4.useEffect)(() => {
|
|
1728
|
+
const handler = (event) => {
|
|
1729
|
+
const custom = event;
|
|
1730
|
+
if (custom.detail && (custom.detail in builtins || custom.detail === "readingMask" || custom.detail === "readingGuide")) {
|
|
1731
|
+
handleDisable(custom.detail);
|
|
1732
|
+
}
|
|
1733
|
+
};
|
|
1734
|
+
document.addEventListener("arap:disable-feature", handler);
|
|
1735
|
+
return () => document.removeEventListener("arap:disable-feature", handler);
|
|
1736
|
+
}, [handleDisable]);
|
|
1737
|
+
useBuiltinEffects(active, handleDisable);
|
|
1575
1738
|
const value = (0, import_react4.useMemo)(
|
|
1576
1739
|
() => ({
|
|
1577
1740
|
state: { isOpen, features },
|
|
@@ -3573,18 +3736,38 @@ function HideVideosController() {
|
|
|
3573
3736
|
}
|
|
3574
3737
|
|
|
3575
3738
|
// src/features/BigCursorController.tsx
|
|
3739
|
+
var import_react14 = require("react");
|
|
3576
3740
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3577
3741
|
var FEATURE_KEY17 = "bigCursor";
|
|
3578
3742
|
var DEFAULT_VALUE17 = false;
|
|
3579
|
-
function BigCursorController(
|
|
3743
|
+
function BigCursorController({
|
|
3744
|
+
showCapabilityHint = true
|
|
3745
|
+
} = {}) {
|
|
3580
3746
|
const { value, setValue } = useAccessibility(
|
|
3581
3747
|
FEATURE_KEY17,
|
|
3582
3748
|
DEFAULT_VALUE17
|
|
3583
3749
|
);
|
|
3750
|
+
const [finePointer, setFinePointer] = (0, import_react14.useState)(
|
|
3751
|
+
() => hasFinePointer()
|
|
3752
|
+
);
|
|
3753
|
+
(0, import_react14.useEffect)(() => {
|
|
3754
|
+
return subscribeFinePointer(() => {
|
|
3755
|
+
setFinePointer(hasFinePointer());
|
|
3756
|
+
});
|
|
3757
|
+
}, []);
|
|
3584
3758
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
3585
3759
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "arap-label", children: [
|
|
3586
3760
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
3587
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Big Cursor" })
|
|
3761
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Big Cursor" }),
|
|
3762
|
+
showCapabilityHint && !finePointer && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3763
|
+
"span",
|
|
3764
|
+
{
|
|
3765
|
+
className: "arap-badge",
|
|
3766
|
+
style: { fontSize: "0.75rem", opacity: 0.8, marginLeft: "4px" },
|
|
3767
|
+
title: "Custom cursor requires mouse or trackpad pointer hardware",
|
|
3768
|
+
children: "(Mouse)"
|
|
3769
|
+
}
|
|
3770
|
+
)
|
|
3588
3771
|
] }),
|
|
3589
3772
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3590
3773
|
"button",
|
|
@@ -3603,57 +3786,301 @@ function BigCursorController() {
|
|
|
3603
3786
|
// src/features/ReadingMaskController.tsx
|
|
3604
3787
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3605
3788
|
var FEATURE_KEY18 = "readingMask";
|
|
3789
|
+
var HEIGHT_KEY = "readingMaskHeight";
|
|
3606
3790
|
var DEFAULT_VALUE18 = false;
|
|
3607
|
-
|
|
3791
|
+
var DEFAULT_HEIGHT = 100;
|
|
3792
|
+
var MIN_HEIGHT = 40;
|
|
3793
|
+
var MAX_HEIGHT = 300;
|
|
3794
|
+
var STEP_HEIGHT = 20;
|
|
3795
|
+
function ReadingMaskController({
|
|
3796
|
+
minHeight = MIN_HEIGHT,
|
|
3797
|
+
maxHeight = MAX_HEIGHT,
|
|
3798
|
+
step = STEP_HEIGHT
|
|
3799
|
+
} = {}) {
|
|
3608
3800
|
const { value, setValue } = useAccessibility(
|
|
3609
3801
|
FEATURE_KEY18,
|
|
3610
3802
|
DEFAULT_VALUE18
|
|
3611
3803
|
);
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
)
|
|
3628
|
-
|
|
3804
|
+
const { value: height, setValue: setHeight } = useAccessibility(
|
|
3805
|
+
HEIGHT_KEY,
|
|
3806
|
+
DEFAULT_HEIGHT
|
|
3807
|
+
);
|
|
3808
|
+
const currentHeight = typeof height === "number" ? height : DEFAULT_HEIGHT;
|
|
3809
|
+
const handleDecreaseHeight = () => {
|
|
3810
|
+
setHeight(Math.max(minHeight, currentHeight - step));
|
|
3811
|
+
};
|
|
3812
|
+
const handleIncreaseHeight = () => {
|
|
3813
|
+
setHeight(Math.min(maxHeight, currentHeight + step));
|
|
3814
|
+
};
|
|
3815
|
+
const handleNudgeUp = () => {
|
|
3816
|
+
nudgeReadingAid("readingMask", -30);
|
|
3817
|
+
};
|
|
3818
|
+
const handleNudgeDown = () => {
|
|
3819
|
+
nudgeReadingAid("readingMask", 30);
|
|
3820
|
+
};
|
|
3821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3822
|
+
"div",
|
|
3823
|
+
{
|
|
3824
|
+
className: "arap-feature arap-feature-expandable",
|
|
3825
|
+
role: "group",
|
|
3826
|
+
"aria-label": "Reading Mask",
|
|
3827
|
+
children: [
|
|
3828
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3829
|
+
"div",
|
|
3830
|
+
{
|
|
3831
|
+
className: "arap-feature-header",
|
|
3832
|
+
style: {
|
|
3833
|
+
display: "flex",
|
|
3834
|
+
alignItems: "center",
|
|
3835
|
+
justifyContent: "space-between",
|
|
3836
|
+
width: "100%"
|
|
3837
|
+
},
|
|
3838
|
+
children: [
|
|
3839
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "arap-label", children: [
|
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FeatureIcon, { name: FEATURE_KEY18 }),
|
|
3841
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Reading Mask" })
|
|
3842
|
+
] }),
|
|
3843
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3844
|
+
"button",
|
|
3845
|
+
{
|
|
3846
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3847
|
+
onClick: () => setValue(!value),
|
|
3848
|
+
"aria-label": "Reading Mask",
|
|
3849
|
+
"aria-pressed": value,
|
|
3850
|
+
type: "button",
|
|
3851
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3852
|
+
}
|
|
3853
|
+
)
|
|
3854
|
+
]
|
|
3855
|
+
}
|
|
3856
|
+
),
|
|
3857
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3858
|
+
"div",
|
|
3859
|
+
{
|
|
3860
|
+
className: "arap-subcontrols",
|
|
3861
|
+
style: {
|
|
3862
|
+
marginTop: "8px",
|
|
3863
|
+
paddingTop: "8px",
|
|
3864
|
+
borderTop: "1px solid var(--arap-divider, #e5e7eb)",
|
|
3865
|
+
display: "flex",
|
|
3866
|
+
flexDirection: "column",
|
|
3867
|
+
gap: "8px",
|
|
3868
|
+
width: "100%"
|
|
3869
|
+
},
|
|
3870
|
+
children: [
|
|
3871
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3872
|
+
"div",
|
|
3873
|
+
{
|
|
3874
|
+
style: {
|
|
3875
|
+
display: "flex",
|
|
3876
|
+
alignItems: "center",
|
|
3877
|
+
justifyContent: "space-between",
|
|
3878
|
+
width: "100%"
|
|
3879
|
+
},
|
|
3880
|
+
children: [
|
|
3881
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3882
|
+
"span",
|
|
3883
|
+
{
|
|
3884
|
+
style: {
|
|
3885
|
+
fontSize: "0.85rem",
|
|
3886
|
+
color: "var(--arap-muted, #4b5563)"
|
|
3887
|
+
},
|
|
3888
|
+
children: "Window Height"
|
|
3889
|
+
}
|
|
3890
|
+
),
|
|
3891
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "arap-controls", children: [
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3893
|
+
"button",
|
|
3894
|
+
{
|
|
3895
|
+
className: "arap-btn-sm",
|
|
3896
|
+
onClick: handleDecreaseHeight,
|
|
3897
|
+
disabled: currentHeight <= minHeight,
|
|
3898
|
+
"aria-label": "Decrease reading mask height",
|
|
3899
|
+
type: "button",
|
|
3900
|
+
children: "\u2212"
|
|
3901
|
+
}
|
|
3902
|
+
),
|
|
3903
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
3904
|
+
currentHeight,
|
|
3905
|
+
"px"
|
|
3906
|
+
] }),
|
|
3907
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3908
|
+
"button",
|
|
3909
|
+
{
|
|
3910
|
+
className: "arap-btn-sm",
|
|
3911
|
+
onClick: handleIncreaseHeight,
|
|
3912
|
+
disabled: currentHeight >= maxHeight,
|
|
3913
|
+
"aria-label": "Increase reading mask height",
|
|
3914
|
+
type: "button",
|
|
3915
|
+
children: "+"
|
|
3916
|
+
}
|
|
3917
|
+
)
|
|
3918
|
+
] })
|
|
3919
|
+
]
|
|
3920
|
+
}
|
|
3921
|
+
),
|
|
3922
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3923
|
+
"div",
|
|
3924
|
+
{
|
|
3925
|
+
style: {
|
|
3926
|
+
display: "flex",
|
|
3927
|
+
alignItems: "center",
|
|
3928
|
+
justifyContent: "space-between",
|
|
3929
|
+
width: "100%"
|
|
3930
|
+
},
|
|
3931
|
+
children: [
|
|
3932
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3933
|
+
"span",
|
|
3934
|
+
{
|
|
3935
|
+
style: {
|
|
3936
|
+
fontSize: "0.85rem",
|
|
3937
|
+
color: "var(--arap-muted, #4b5563)"
|
|
3938
|
+
},
|
|
3939
|
+
children: "Move Window"
|
|
3940
|
+
}
|
|
3941
|
+
),
|
|
3942
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "arap-controls", children: [
|
|
3943
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3944
|
+
"button",
|
|
3945
|
+
{
|
|
3946
|
+
className: "arap-btn-sm",
|
|
3947
|
+
onClick: handleNudgeUp,
|
|
3948
|
+
"aria-label": "Move reading mask up",
|
|
3949
|
+
title: "Alt+Up Arrow",
|
|
3950
|
+
type: "button",
|
|
3951
|
+
children: "\u2191"
|
|
3952
|
+
}
|
|
3953
|
+
),
|
|
3954
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3955
|
+
"button",
|
|
3956
|
+
{
|
|
3957
|
+
className: "arap-btn-sm",
|
|
3958
|
+
onClick: handleNudgeDown,
|
|
3959
|
+
"aria-label": "Move reading mask down",
|
|
3960
|
+
title: "Alt+Down Arrow",
|
|
3961
|
+
type: "button",
|
|
3962
|
+
children: "\u2193"
|
|
3963
|
+
}
|
|
3964
|
+
)
|
|
3965
|
+
] })
|
|
3966
|
+
]
|
|
3967
|
+
}
|
|
3968
|
+
)
|
|
3969
|
+
]
|
|
3970
|
+
}
|
|
3971
|
+
)
|
|
3972
|
+
]
|
|
3973
|
+
}
|
|
3974
|
+
);
|
|
3629
3975
|
}
|
|
3630
3976
|
|
|
3631
3977
|
// src/features/ReadingGuideController.tsx
|
|
3632
3978
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3633
3979
|
var FEATURE_KEY19 = "readingGuide";
|
|
3634
3980
|
var DEFAULT_VALUE19 = false;
|
|
3635
|
-
function ReadingGuideController(
|
|
3981
|
+
function ReadingGuideController({
|
|
3982
|
+
nudgeStep = 30
|
|
3983
|
+
} = {}) {
|
|
3636
3984
|
const { value, setValue } = useAccessibility(
|
|
3637
3985
|
FEATURE_KEY19,
|
|
3638
3986
|
DEFAULT_VALUE19
|
|
3639
3987
|
);
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3988
|
+
const handleNudgeUp = () => {
|
|
3989
|
+
nudgeReadingAid("readingGuide", -nudgeStep);
|
|
3990
|
+
};
|
|
3991
|
+
const handleNudgeDown = () => {
|
|
3992
|
+
nudgeReadingAid("readingGuide", nudgeStep);
|
|
3993
|
+
};
|
|
3994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3995
|
+
"div",
|
|
3996
|
+
{
|
|
3997
|
+
className: "arap-feature arap-feature-expandable",
|
|
3998
|
+
role: "group",
|
|
3999
|
+
"aria-label": "Reading Guide",
|
|
4000
|
+
children: [
|
|
4001
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4002
|
+
"div",
|
|
4003
|
+
{
|
|
4004
|
+
className: "arap-feature-header",
|
|
4005
|
+
style: {
|
|
4006
|
+
display: "flex",
|
|
4007
|
+
alignItems: "center",
|
|
4008
|
+
justifyContent: "space-between",
|
|
4009
|
+
width: "100%"
|
|
4010
|
+
},
|
|
4011
|
+
children: [
|
|
4012
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "arap-label", children: [
|
|
4013
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FeatureIcon, { name: FEATURE_KEY19 }),
|
|
4014
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Reading Guide" })
|
|
4015
|
+
] }),
|
|
4016
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4017
|
+
"button",
|
|
4018
|
+
{
|
|
4019
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
4020
|
+
onClick: () => setValue(!value),
|
|
4021
|
+
"aria-label": "Reading Guide",
|
|
4022
|
+
"aria-pressed": value,
|
|
4023
|
+
type: "button",
|
|
4024
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
4025
|
+
}
|
|
4026
|
+
)
|
|
4027
|
+
]
|
|
4028
|
+
}
|
|
4029
|
+
),
|
|
4030
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4031
|
+
"div",
|
|
4032
|
+
{
|
|
4033
|
+
className: "arap-subcontrols",
|
|
4034
|
+
style: {
|
|
4035
|
+
marginTop: "8px",
|
|
4036
|
+
paddingTop: "8px",
|
|
4037
|
+
borderTop: "1px solid var(--arap-divider, #e5e7eb)",
|
|
4038
|
+
display: "flex",
|
|
4039
|
+
alignItems: "center",
|
|
4040
|
+
justifyContent: "space-between",
|
|
4041
|
+
width: "100%"
|
|
4042
|
+
},
|
|
4043
|
+
children: [
|
|
4044
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4045
|
+
"span",
|
|
4046
|
+
{
|
|
4047
|
+
style: {
|
|
4048
|
+
fontSize: "0.85rem",
|
|
4049
|
+
color: "var(--arap-muted, #4b5563)"
|
|
4050
|
+
},
|
|
4051
|
+
children: "Move Guide"
|
|
4052
|
+
}
|
|
4053
|
+
),
|
|
4054
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "arap-controls", children: [
|
|
4055
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4056
|
+
"button",
|
|
4057
|
+
{
|
|
4058
|
+
className: "arap-btn-sm",
|
|
4059
|
+
onClick: handleNudgeUp,
|
|
4060
|
+
"aria-label": "Move reading guide up",
|
|
4061
|
+
title: "Alt+Up Arrow",
|
|
4062
|
+
type: "button",
|
|
4063
|
+
children: "\u2191"
|
|
4064
|
+
}
|
|
4065
|
+
),
|
|
4066
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4067
|
+
"button",
|
|
4068
|
+
{
|
|
4069
|
+
className: "arap-btn-sm",
|
|
4070
|
+
onClick: handleNudgeDown,
|
|
4071
|
+
"aria-label": "Move reading guide down",
|
|
4072
|
+
title: "Alt+Down Arrow",
|
|
4073
|
+
type: "button",
|
|
4074
|
+
children: "\u2193"
|
|
4075
|
+
}
|
|
4076
|
+
)
|
|
4077
|
+
] })
|
|
4078
|
+
]
|
|
4079
|
+
}
|
|
4080
|
+
)
|
|
4081
|
+
]
|
|
4082
|
+
}
|
|
4083
|
+
);
|
|
3657
4084
|
}
|
|
3658
4085
|
|
|
3659
4086
|
// src/features/HighlightFocusController.tsx
|
|
@@ -3686,7 +4113,7 @@ function HighlightFocusController() {
|
|
|
3686
4113
|
var FocusHighlightController = HighlightFocusController;
|
|
3687
4114
|
|
|
3688
4115
|
// src/features/ReduceMotionController.tsx
|
|
3689
|
-
var
|
|
4116
|
+
var import_react15 = require("react");
|
|
3690
4117
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3691
4118
|
var FEATURE_KEY21 = "reduceMotion";
|
|
3692
4119
|
var DEFAULT_VALUE21 = false;
|
|
@@ -3695,7 +4122,7 @@ function ReduceMotionController() {
|
|
|
3695
4122
|
FEATURE_KEY21,
|
|
3696
4123
|
DEFAULT_VALUE21
|
|
3697
4124
|
);
|
|
3698
|
-
const osReducedMotion = (0,
|
|
4125
|
+
const osReducedMotion = (0, import_react15.useSyncExternalStore)(
|
|
3699
4126
|
subscribeReducedMotion,
|
|
3700
4127
|
isReducedMotionActive,
|
|
3701
4128
|
() => false
|
|
@@ -3722,16 +4149,16 @@ function ReduceMotionController() {
|
|
|
3722
4149
|
|
|
3723
4150
|
// src/features/ResetController.tsx
|
|
3724
4151
|
var import_react_dom2 = require("react-dom");
|
|
3725
|
-
var
|
|
4152
|
+
var import_react16 = require("react");
|
|
3726
4153
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3727
4154
|
function ResetController() {
|
|
3728
|
-
const ctx = (0,
|
|
4155
|
+
const ctx = (0, import_react16.useContext)(AccessibilityContext);
|
|
3729
4156
|
if (!ctx) {
|
|
3730
4157
|
throw new Error(
|
|
3731
4158
|
"ResetController must be used within an <AccessibilityPlugin> provider."
|
|
3732
4159
|
);
|
|
3733
4160
|
}
|
|
3734
|
-
const actionHost = (0,
|
|
4161
|
+
const actionHost = (0, import_react16.useContext)(PanelActionsContext);
|
|
3735
4162
|
const { resetAll } = ctx;
|
|
3736
4163
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
3737
4164
|
const button = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
@@ -3799,7 +4226,7 @@ function ToggleControl({
|
|
|
3799
4226
|
}
|
|
3800
4227
|
|
|
3801
4228
|
// src/core/controls/ChoiceControl.tsx
|
|
3802
|
-
var
|
|
4229
|
+
var import_react17 = require("react");
|
|
3803
4230
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3804
4231
|
function ChoiceControl({
|
|
3805
4232
|
id,
|
|
@@ -3814,12 +4241,12 @@ function ChoiceControl({
|
|
|
3814
4241
|
style,
|
|
3815
4242
|
orientation = "horizontal"
|
|
3816
4243
|
}) {
|
|
3817
|
-
const containerRef = (0,
|
|
3818
|
-
const allOptions = (0,
|
|
4244
|
+
const containerRef = (0, import_react17.useRef)(null);
|
|
4245
|
+
const allOptions = (0, import_react17.useMemo)(
|
|
3819
4246
|
() => groups ? groups.flatMap((g) => g.options) : options || [],
|
|
3820
4247
|
[groups, options]
|
|
3821
4248
|
);
|
|
3822
|
-
const handleKeyDown = (0,
|
|
4249
|
+
const handleKeyDown = (0, import_react17.useCallback)(
|
|
3823
4250
|
(e) => {
|
|
3824
4251
|
if (disabled || allOptions.length === 0) return;
|
|
3825
4252
|
const enabledOptions = allOptions.filter((opt) => !opt.disabled);
|
|
@@ -4253,6 +4680,7 @@ function ProfilePreviewCard({
|
|
|
4253
4680
|
ContrastController,
|
|
4254
4681
|
ContrastModeController,
|
|
4255
4682
|
DEFAULT_PREFERENCES,
|
|
4683
|
+
DEFAULT_READING_MASK_HEIGHT,
|
|
4256
4684
|
DYSLEXIA_FONT_STACK,
|
|
4257
4685
|
EmptyState,
|
|
4258
4686
|
ErrorState,
|
|
@@ -4274,9 +4702,12 @@ function ProfilePreviewCard({
|
|
|
4274
4702
|
LetterSpacingController,
|
|
4275
4703
|
LineHeightController,
|
|
4276
4704
|
LinkHighlightController,
|
|
4705
|
+
MAX_READING_MASK_HEIGHT,
|
|
4706
|
+
MIN_READING_MASK_HEIGHT,
|
|
4277
4707
|
PROFILE_DEFINITIONS,
|
|
4278
4708
|
ParagraphSpacingController,
|
|
4279
4709
|
ProfilePreviewCard,
|
|
4710
|
+
READING_MASK_HEIGHT_PRESETS,
|
|
4280
4711
|
ReadingGuideController,
|
|
4281
4712
|
ReadingMaskController,
|
|
4282
4713
|
ReduceMotionController,
|
|
@@ -4297,6 +4728,7 @@ function ProfilePreviewCard({
|
|
|
4297
4728
|
enLocale,
|
|
4298
4729
|
findMainLandmark,
|
|
4299
4730
|
getScriptSpacingConstraints,
|
|
4731
|
+
hasFinePointer,
|
|
4300
4732
|
isEligibleDecorativeImage,
|
|
4301
4733
|
isForcedColorsActive,
|
|
4302
4734
|
isFunctionalOrMeaningfulImage,
|
|
@@ -4309,10 +4741,12 @@ function ProfilePreviewCard({
|
|
|
4309
4741
|
isRtlLocale,
|
|
4310
4742
|
normalizePreferenceValue,
|
|
4311
4743
|
normalizePreferences,
|
|
4744
|
+
nudgeReadingAid,
|
|
4312
4745
|
preferencesReducer,
|
|
4313
4746
|
registerLocale,
|
|
4314
4747
|
resolveEffectivePreferences,
|
|
4315
4748
|
resolveLocaleStrings,
|
|
4749
|
+
subscribeFinePointer,
|
|
4316
4750
|
subscribeForcedColors,
|
|
4317
4751
|
subscribeReducedMotion,
|
|
4318
4752
|
useAccessibility
|