accessibility-plugin-react 2.10.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -21
- package/dist/index.d.mts +44 -4
- package/dist/index.d.ts +44 -4
- package/dist/index.js +913 -135
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +892 -126
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +82 -0
- package/docs/API.md +3 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +4 -4
- package/docs/FEATURES.md +4 -3
- package/docs/READING_AIDS.md +139 -0
- package/docs/REGRESSION_AND_PERFORMANCE.md +127 -0
- package/docs/TOOLTIPS.md +102 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
AccessibilityContext: () => AccessibilityContext,
|
|
27
27
|
AccessibilityList: () => AccessibilityList,
|
|
28
28
|
AccessibilityPlugin: () => AccessibilityPlugin,
|
|
29
|
+
AccessibleTooltipsController: () => AccessibleTooltipsController,
|
|
29
30
|
BigCursorController: () => BigCursorController,
|
|
30
31
|
CONTRAST_MODES: () => CONTRAST_MODES,
|
|
31
32
|
CONTRAST_PALETTES: () => CONTRAST_PALETTES,
|
|
@@ -34,6 +35,7 @@ __export(index_exports, {
|
|
|
34
35
|
ContrastController: () => ContrastController,
|
|
35
36
|
ContrastModeController: () => ContrastModeController,
|
|
36
37
|
DEFAULT_PREFERENCES: () => DEFAULT_PREFERENCES,
|
|
38
|
+
DEFAULT_READING_MASK_HEIGHT: () => DEFAULT_READING_MASK_HEIGHT,
|
|
37
39
|
DYSLEXIA_FONT_STACK: () => DYSLEXIA_FONT_STACK,
|
|
38
40
|
EmptyState: () => EmptyState,
|
|
39
41
|
ErrorState: () => ErrorState,
|
|
@@ -55,9 +57,12 @@ __export(index_exports, {
|
|
|
55
57
|
LetterSpacingController: () => LetterSpacingController,
|
|
56
58
|
LineHeightController: () => LineHeightController,
|
|
57
59
|
LinkHighlightController: () => LinkHighlightController,
|
|
60
|
+
MAX_READING_MASK_HEIGHT: () => MAX_READING_MASK_HEIGHT,
|
|
61
|
+
MIN_READING_MASK_HEIGHT: () => MIN_READING_MASK_HEIGHT,
|
|
58
62
|
PROFILE_DEFINITIONS: () => PROFILE_DEFINITIONS,
|
|
59
63
|
ParagraphSpacingController: () => ParagraphSpacingController,
|
|
60
64
|
ProfilePreviewCard: () => ProfilePreviewCard,
|
|
65
|
+
READING_MASK_HEIGHT_PRESETS: () => READING_MASK_HEIGHT_PRESETS,
|
|
61
66
|
ReadingGuideController: () => ReadingGuideController,
|
|
62
67
|
ReadingMaskController: () => ReadingMaskController,
|
|
63
68
|
ReduceMotionController: () => ReduceMotionController,
|
|
@@ -73,11 +78,15 @@ __export(index_exports, {
|
|
|
73
78
|
TextAlignController: () => TextAlignController,
|
|
74
79
|
TextScaleController: () => TextScaleController,
|
|
75
80
|
ToggleControl: () => ToggleControl,
|
|
81
|
+
TooltipsController: () => TooltipsController,
|
|
76
82
|
WordSpacingController: () => WordSpacingController,
|
|
77
83
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
78
84
|
enLocale: () => enLocale,
|
|
85
|
+
enableAccessibleTooltips: () => enableAccessibleTooltips,
|
|
79
86
|
findMainLandmark: () => findMainLandmark,
|
|
87
|
+
getAuthoredDescription: () => getAuthoredDescription,
|
|
80
88
|
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
89
|
+
hasFinePointer: () => hasFinePointer,
|
|
81
90
|
isEligibleDecorativeImage: () => isEligibleDecorativeImage,
|
|
82
91
|
isForcedColorsActive: () => isForcedColorsActive,
|
|
83
92
|
isFunctionalOrMeaningfulImage: () => isFunctionalOrMeaningfulImage,
|
|
@@ -90,10 +99,13 @@ __export(index_exports, {
|
|
|
90
99
|
isRtlLocale: () => isRtlLocale,
|
|
91
100
|
normalizePreferenceValue: () => normalizePreferenceValue,
|
|
92
101
|
normalizePreferences: () => normalizePreferences,
|
|
102
|
+
nudgeReadingAid: () => nudgeReadingAid,
|
|
103
|
+
positionTooltip: () => positionTooltip,
|
|
93
104
|
preferencesReducer: () => preferencesReducer,
|
|
94
105
|
registerLocale: () => registerLocale,
|
|
95
106
|
resolveEffectivePreferences: () => resolveEffectivePreferences,
|
|
96
107
|
resolveLocaleStrings: () => resolveLocaleStrings,
|
|
108
|
+
subscribeFinePointer: () => subscribeFinePointer,
|
|
97
109
|
subscribeForcedColors: () => subscribeForcedColors,
|
|
98
110
|
subscribeReducedMotion: () => subscribeReducedMotion,
|
|
99
111
|
useAccessibility: () => useAccessibility
|
|
@@ -123,7 +135,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
123
135
|
}
|
|
124
136
|
|
|
125
137
|
// 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');
|
|
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');
|
|
127
139
|
|
|
128
140
|
// src/core/AccessibilityPlugin.tsx
|
|
129
141
|
var import_react4 = require("react");
|
|
@@ -428,17 +440,30 @@ for (const key of [
|
|
|
428
440
|
"hideImages",
|
|
429
441
|
"hideVideos",
|
|
430
442
|
"bigCursor",
|
|
431
|
-
"readingMask",
|
|
432
443
|
"readingGuide",
|
|
433
444
|
"highlightFocus",
|
|
434
445
|
"focusHighlight",
|
|
435
|
-
"reduceMotion"
|
|
446
|
+
"reduceMotion",
|
|
447
|
+
"tooltips",
|
|
448
|
+
"accessibleTooltips"
|
|
436
449
|
]) {
|
|
437
450
|
builtins[key] = {
|
|
438
451
|
defaultValue: false,
|
|
439
452
|
validate: (v) => typeof v === "boolean"
|
|
440
453
|
};
|
|
441
454
|
}
|
|
455
|
+
var DEFAULT_READING_MASK_HEIGHT = 100;
|
|
456
|
+
var MIN_READING_MASK_HEIGHT = 40;
|
|
457
|
+
var MAX_READING_MASK_HEIGHT = 400;
|
|
458
|
+
var READING_MASK_HEIGHT_PRESETS = [60, 100, 160, 240];
|
|
459
|
+
builtins.readingMask = {
|
|
460
|
+
defaultValue: false,
|
|
461
|
+
validate: (v) => typeof v === "boolean" || typeof v === "number" && v >= MIN_READING_MASK_HEIGHT && v <= MAX_READING_MASK_HEIGHT
|
|
462
|
+
};
|
|
463
|
+
builtins.readingMaskHeight = {
|
|
464
|
+
defaultValue: DEFAULT_READING_MASK_HEIGHT,
|
|
465
|
+
validate: (v) => typeof v === "number" && v >= MIN_READING_MASK_HEIGHT && v <= MAX_READING_MASK_HEIGHT
|
|
466
|
+
};
|
|
442
467
|
function validValue(key, value, fallback, validate) {
|
|
443
468
|
if (builtins[key]) return builtins[key].validate(value);
|
|
444
469
|
if (validate) {
|
|
@@ -496,6 +521,30 @@ function subscribeReducedMotion(callback) {
|
|
|
496
521
|
};
|
|
497
522
|
}
|
|
498
523
|
}
|
|
524
|
+
function hasFinePointer() {
|
|
525
|
+
if (typeof window === "undefined" || !window.matchMedia) return true;
|
|
526
|
+
try {
|
|
527
|
+
const fine = window.matchMedia("(pointer: fine)");
|
|
528
|
+
if (fine.matches) return true;
|
|
529
|
+
const coarse = window.matchMedia("(pointer: coarse)");
|
|
530
|
+
if (coarse.matches && !fine.matches) return false;
|
|
531
|
+
return true;
|
|
532
|
+
} catch {
|
|
533
|
+
return true;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
function subscribeFinePointer(callback) {
|
|
537
|
+
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
538
|
+
};
|
|
539
|
+
try {
|
|
540
|
+
const mql = window.matchMedia("(pointer: fine)");
|
|
541
|
+
mql.addEventListener("change", callback);
|
|
542
|
+
return () => mql.removeEventListener("change", callback);
|
|
543
|
+
} catch {
|
|
544
|
+
return () => {
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
}
|
|
499
548
|
var CONTRAST_PALETTES = {
|
|
500
549
|
light: {
|
|
501
550
|
text: "#0f172a",
|
|
@@ -1314,8 +1363,12 @@ function applyPage(values) {
|
|
|
1314
1363
|
}
|
|
1315
1364
|
});
|
|
1316
1365
|
}
|
|
1366
|
+
const isFinePointer = hasFinePointer();
|
|
1367
|
+
if (values.bigCursor && isFinePointer) {
|
|
1368
|
+
set(document.body, "cursor", cursor);
|
|
1369
|
+
}
|
|
1317
1370
|
for (const el of elements) {
|
|
1318
|
-
if (values.bigCursor) set(el, "cursor", cursor);
|
|
1371
|
+
if (values.bigCursor && isFinePointer) set(el, "cursor", cursor);
|
|
1319
1372
|
if (values.hideImages) {
|
|
1320
1373
|
if (isEligibleDecorativeImage(el)) {
|
|
1321
1374
|
set(el, "visibility", "hidden");
|
|
@@ -1370,7 +1423,20 @@ function applyPage(values) {
|
|
|
1370
1423
|
for (const restore of undo.reverse()) restore();
|
|
1371
1424
|
};
|
|
1372
1425
|
}
|
|
1373
|
-
function
|
|
1426
|
+
function nudgeReadingAid(feature, delta) {
|
|
1427
|
+
if (typeof document !== "undefined") {
|
|
1428
|
+
try {
|
|
1429
|
+
document.dispatchEvent(
|
|
1430
|
+
new CustomEvent("arap:nudge-reading-aid", {
|
|
1431
|
+
detail: { feature, delta }
|
|
1432
|
+
})
|
|
1433
|
+
);
|
|
1434
|
+
} catch {
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
function readingAid(mask, height = 100, onDisable) {
|
|
1439
|
+
const featureKey = mask ? "readingMask" : "readingGuide";
|
|
1374
1440
|
const existing = document.body.querySelectorAll(
|
|
1375
1441
|
mask ? ".arap-reading-mask" : ".arap-reading-guide"
|
|
1376
1442
|
);
|
|
@@ -1379,27 +1445,114 @@ function readingAid(mask) {
|
|
|
1379
1445
|
el.dataset.arapUi = "";
|
|
1380
1446
|
el.className = mask ? "arap-reading-mask" : "arap-reading-guide";
|
|
1381
1447
|
el.setAttribute("aria-hidden", "true");
|
|
1382
|
-
|
|
1448
|
+
const aidHeight = mask ? Math.max(40, Math.min(400, height)) : 4;
|
|
1449
|
+
const halfHeight = mask ? aidHeight / 2 : 0;
|
|
1450
|
+
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"}`;
|
|
1451
|
+
el.style.setProperty("pointer-events", "none", "important");
|
|
1452
|
+
el.style.setProperty("user-select", "none", "important");
|
|
1453
|
+
el.style.setProperty("-webkit-user-select", "none", "important");
|
|
1454
|
+
el.style.setProperty("touch-action", "none", "important");
|
|
1383
1455
|
document.body.appendChild(el);
|
|
1456
|
+
let currentY = typeof window !== "undefined" && window.innerHeight ? window.innerHeight / 2 : 300;
|
|
1457
|
+
let trackedFocusEl = null;
|
|
1458
|
+
const clampY = (y) => {
|
|
1459
|
+
const vh = typeof window !== "undefined" && window.innerHeight ? window.innerHeight : 600;
|
|
1460
|
+
return Math.max(halfHeight, Math.min(vh - halfHeight, y));
|
|
1461
|
+
};
|
|
1384
1462
|
const move = (y) => {
|
|
1385
|
-
|
|
1463
|
+
currentY = clampY(y);
|
|
1464
|
+
el.style.top = `${Math.max(0, currentY - halfHeight)}px`;
|
|
1465
|
+
};
|
|
1466
|
+
move(currentY);
|
|
1467
|
+
const pointer = (event) => {
|
|
1468
|
+
if (typeof event.clientY === "number" && !isNaN(event.clientY)) {
|
|
1469
|
+
trackedFocusEl = null;
|
|
1470
|
+
move(event.clientY);
|
|
1471
|
+
}
|
|
1472
|
+
};
|
|
1473
|
+
const touch = (event) => {
|
|
1474
|
+
if (event.touches && event.touches.length > 0) {
|
|
1475
|
+
trackedFocusEl = null;
|
|
1476
|
+
move(event.touches[0].clientY);
|
|
1477
|
+
}
|
|
1386
1478
|
};
|
|
1387
|
-
const pointer = (event) => move(event.clientY);
|
|
1388
1479
|
const focus = (event) => {
|
|
1389
1480
|
if (event.target instanceof HTMLElement && !event.target.closest("[data-arap-ui]")) {
|
|
1481
|
+
trackedFocusEl = event.target;
|
|
1390
1482
|
const rect = event.target.getBoundingClientRect();
|
|
1391
1483
|
move(rect.top + rect.height / 2);
|
|
1392
1484
|
}
|
|
1393
1485
|
};
|
|
1486
|
+
const scroll = () => {
|
|
1487
|
+
if (trackedFocusEl && document.contains(trackedFocusEl)) {
|
|
1488
|
+
const rect = trackedFocusEl.getBoundingClientRect();
|
|
1489
|
+
move(rect.top + rect.height / 2);
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
const keydown = (event) => {
|
|
1493
|
+
if (event.key === "Escape") {
|
|
1494
|
+
if (document.activeElement && document.activeElement.closest("[data-arap-ui]")) {
|
|
1495
|
+
return;
|
|
1496
|
+
}
|
|
1497
|
+
event.preventDefault();
|
|
1498
|
+
try {
|
|
1499
|
+
document.dispatchEvent(
|
|
1500
|
+
new CustomEvent("arap:disable-feature", { detail: featureKey })
|
|
1501
|
+
);
|
|
1502
|
+
} catch {
|
|
1503
|
+
}
|
|
1504
|
+
onDisable?.(featureKey);
|
|
1505
|
+
el.remove();
|
|
1506
|
+
return;
|
|
1507
|
+
}
|
|
1508
|
+
if (event.altKey && (event.key === "ArrowUp" || event.key === "ArrowDown")) {
|
|
1509
|
+
event.preventDefault();
|
|
1510
|
+
const delta = event.key === "ArrowUp" ? -30 : 30;
|
|
1511
|
+
move(currentY + delta);
|
|
1512
|
+
}
|
|
1513
|
+
};
|
|
1514
|
+
const nudge = (event) => {
|
|
1515
|
+
const custom = event;
|
|
1516
|
+
if (custom.detail && custom.detail.feature === featureKey) {
|
|
1517
|
+
move(currentY + (custom.detail.delta || 0));
|
|
1518
|
+
}
|
|
1519
|
+
};
|
|
1520
|
+
const viewport = () => {
|
|
1521
|
+
move(currentY);
|
|
1522
|
+
};
|
|
1394
1523
|
document.addEventListener("pointermove", pointer, { passive: true });
|
|
1524
|
+
document.addEventListener("mousemove", pointer, { passive: true });
|
|
1525
|
+
document.addEventListener("touchmove", touch, { passive: true });
|
|
1526
|
+
document.addEventListener("touchstart", touch, { passive: true });
|
|
1395
1527
|
document.addEventListener("focusin", focus);
|
|
1528
|
+
document.addEventListener("arap:nudge-reading-aid", nudge);
|
|
1529
|
+
document.addEventListener("keydown", keydown);
|
|
1530
|
+
window.addEventListener("scroll", scroll, { passive: true });
|
|
1531
|
+
window.addEventListener("resize", viewport, { passive: true });
|
|
1532
|
+
window.addEventListener("keydown", keydown);
|
|
1533
|
+
if (typeof window !== "undefined" && window.visualViewport) {
|
|
1534
|
+
window.visualViewport.addEventListener("resize", viewport);
|
|
1535
|
+
window.visualViewport.addEventListener("scroll", viewport);
|
|
1536
|
+
}
|
|
1396
1537
|
return () => {
|
|
1397
1538
|
document.removeEventListener("pointermove", pointer);
|
|
1539
|
+
document.removeEventListener("mousemove", pointer);
|
|
1540
|
+
document.removeEventListener("touchmove", touch);
|
|
1541
|
+
document.removeEventListener("touchstart", touch);
|
|
1398
1542
|
document.removeEventListener("focusin", focus);
|
|
1543
|
+
document.removeEventListener("arap:nudge-reading-aid", nudge);
|
|
1544
|
+
document.removeEventListener("keydown", keydown);
|
|
1545
|
+
window.removeEventListener("scroll", scroll);
|
|
1546
|
+
window.removeEventListener("resize", viewport);
|
|
1547
|
+
window.removeEventListener("keydown", keydown);
|
|
1548
|
+
if (typeof window !== "undefined" && window.visualViewport) {
|
|
1549
|
+
window.visualViewport.removeEventListener("resize", viewport);
|
|
1550
|
+
window.visualViewport.removeEventListener("scroll", viewport);
|
|
1551
|
+
}
|
|
1399
1552
|
el.remove();
|
|
1400
1553
|
};
|
|
1401
1554
|
}
|
|
1402
|
-
function useBuiltinEffects(values) {
|
|
1555
|
+
function useBuiltinEffects(values, onDisable) {
|
|
1403
1556
|
(0, import_react3.useEffect)(() => {
|
|
1404
1557
|
if (!Object.entries(values).some(
|
|
1405
1558
|
([key, value]) => key in builtins && value !== builtins[key].defaultValue
|
|
@@ -1438,14 +1591,283 @@ function useBuiltinEffects(values) {
|
|
|
1438
1591
|
undo();
|
|
1439
1592
|
};
|
|
1440
1593
|
}, [values]);
|
|
1441
|
-
(0, import_react3.useEffect)(
|
|
1442
|
-
(
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1594
|
+
(0, import_react3.useEffect)(() => {
|
|
1595
|
+
if (!values.readingMask) return;
|
|
1596
|
+
const height = typeof values.readingMaskHeight === "number" ? values.readingMaskHeight : typeof values.readingMask === "number" ? values.readingMask : 100;
|
|
1597
|
+
return readingAid(true, height, onDisable);
|
|
1598
|
+
}, [values.readingMask, values.readingMaskHeight, onDisable]);
|
|
1599
|
+
(0, import_react3.useEffect)(() => {
|
|
1600
|
+
if (!values.readingGuide) return;
|
|
1601
|
+
return readingAid(false, 4, onDisable);
|
|
1602
|
+
}, [values.readingGuide, onDisable]);
|
|
1603
|
+
(0, import_react3.useEffect)(() => {
|
|
1604
|
+
if (!values.tooltips && !values.accessibleTooltips) return;
|
|
1605
|
+
return enableAccessibleTooltips();
|
|
1606
|
+
}, [values.tooltips, values.accessibleTooltips]);
|
|
1607
|
+
}
|
|
1608
|
+
var SENSITIVE_AUTOCOMPLETE_PATTERN = /password|credit-card|cc-|card-|security-code|cvc|cvv|one-time-code/i;
|
|
1609
|
+
function getAuthoredDescription(element) {
|
|
1610
|
+
if (!(element instanceof HTMLElement || element instanceof SVGElement)) {
|
|
1611
|
+
return null;
|
|
1612
|
+
}
|
|
1613
|
+
if (element.closest("[data-arap-ui]")) {
|
|
1614
|
+
return null;
|
|
1615
|
+
}
|
|
1616
|
+
if (element.matches("script, style, link, meta, noscript, template")) {
|
|
1617
|
+
return null;
|
|
1618
|
+
}
|
|
1619
|
+
if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement) {
|
|
1620
|
+
if (element instanceof HTMLInputElement && element.type === "password") {
|
|
1621
|
+
return null;
|
|
1622
|
+
}
|
|
1623
|
+
const ac = element.getAttribute("autocomplete");
|
|
1624
|
+
if (ac && SENSITIVE_AUTOCOMPLETE_PATTERN.test(ac)) {
|
|
1625
|
+
return null;
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
if (element.getAttribute("data-sensitive") === "true") {
|
|
1629
|
+
return null;
|
|
1630
|
+
}
|
|
1631
|
+
if (element.getAttribute("aria-hidden") === "true" || element.getAttribute("role") === "presentation" || element.getAttribute("role") === "none") {
|
|
1632
|
+
return null;
|
|
1633
|
+
}
|
|
1634
|
+
const ariaDesc = element.getAttribute("aria-description")?.trim();
|
|
1635
|
+
let describedByText = "";
|
|
1636
|
+
const describedBy = element.getAttribute("aria-describedby");
|
|
1637
|
+
if (describedBy) {
|
|
1638
|
+
const ids = describedBy.trim().split(/\s+/);
|
|
1639
|
+
const parts = [];
|
|
1640
|
+
for (const id of ids) {
|
|
1641
|
+
const target = document.getElementById(id);
|
|
1642
|
+
if (target) {
|
|
1643
|
+
const text = target.textContent?.trim();
|
|
1644
|
+
if (text) parts.push(text);
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
if (parts.length > 0) {
|
|
1648
|
+
describedByText = parts.join(" ");
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
const explicitDesc = ariaDesc || describedByText || null;
|
|
1652
|
+
const ariaLabel = element.getAttribute("aria-label")?.trim() || null;
|
|
1653
|
+
const visibleText = (element.textContent || "").trim();
|
|
1654
|
+
const alt = element instanceof HTMLImageElement || element instanceof HTMLAreaElement || element instanceof HTMLInputElement && element.type === "image" ? element.getAttribute("alt")?.trim() || null : null;
|
|
1655
|
+
const title = element.getAttribute("title")?.trim() || null;
|
|
1656
|
+
if (explicitDesc) {
|
|
1657
|
+
if (ariaLabel && ariaLabel.toLowerCase() !== visibleText.toLowerCase() && ariaLabel.toLowerCase() !== explicitDesc.toLowerCase()) {
|
|
1658
|
+
return `${ariaLabel} \u2014 ${explicitDesc}`;
|
|
1659
|
+
}
|
|
1660
|
+
if (explicitDesc.toLowerCase() !== visibleText.toLowerCase()) {
|
|
1661
|
+
return explicitDesc;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
if (ariaLabel && ariaLabel.toLowerCase() !== visibleText.toLowerCase()) {
|
|
1665
|
+
return ariaLabel;
|
|
1666
|
+
}
|
|
1667
|
+
if (alt && alt !== "") {
|
|
1668
|
+
return alt;
|
|
1669
|
+
}
|
|
1670
|
+
if (title && title.toLowerCase() !== visibleText.toLowerCase()) {
|
|
1671
|
+
return title;
|
|
1672
|
+
}
|
|
1673
|
+
return null;
|
|
1674
|
+
}
|
|
1675
|
+
function positionTooltip(tooltip, target) {
|
|
1676
|
+
const rect = target.getBoundingClientRect();
|
|
1677
|
+
const tooltipRect = tooltip.getBoundingClientRect();
|
|
1678
|
+
const tooltipWidth = tooltipRect.width || tooltip.offsetWidth || 180;
|
|
1679
|
+
const tooltipHeight = tooltipRect.height || tooltip.offsetHeight || 32;
|
|
1680
|
+
const gap = 8;
|
|
1681
|
+
const vw = typeof window !== "undefined" && window.innerWidth || document.documentElement.clientWidth || 800;
|
|
1682
|
+
const vh = typeof window !== "undefined" && window.innerHeight || document.documentElement.clientHeight || 600;
|
|
1683
|
+
let placement = "top";
|
|
1684
|
+
let top = rect.top - tooltipHeight - gap;
|
|
1685
|
+
if (top < gap) {
|
|
1686
|
+
top = rect.bottom + gap;
|
|
1687
|
+
placement = "bottom";
|
|
1688
|
+
}
|
|
1689
|
+
if (top + tooltipHeight > vh - gap) {
|
|
1690
|
+
top = Math.max(gap, vh - tooltipHeight - gap);
|
|
1691
|
+
}
|
|
1692
|
+
let left = rect.left + (rect.width - tooltipWidth) / 2;
|
|
1693
|
+
left = Math.max(gap, Math.min(vw - tooltipWidth - gap, left));
|
|
1694
|
+
tooltip.style.top = `${Math.round(top)}px`;
|
|
1695
|
+
tooltip.style.left = `${Math.round(left)}px`;
|
|
1696
|
+
tooltip.setAttribute("data-placement", placement);
|
|
1697
|
+
}
|
|
1698
|
+
function enableAccessibleTooltips() {
|
|
1699
|
+
if (typeof document === "undefined") return () => {
|
|
1700
|
+
};
|
|
1701
|
+
let tooltipEl = document.createElement("div");
|
|
1702
|
+
tooltipEl.className = "arap-accessible-tooltip";
|
|
1703
|
+
tooltipEl.setAttribute("role", "presentation");
|
|
1704
|
+
tooltipEl.setAttribute("aria-hidden", "true");
|
|
1705
|
+
tooltipEl.setAttribute("data-arap-ui", "true");
|
|
1706
|
+
document.body.appendChild(tooltipEl);
|
|
1707
|
+
let activeTarget = null;
|
|
1708
|
+
let dismissedTarget = null;
|
|
1709
|
+
let hideTimeout = null;
|
|
1710
|
+
let isPointerOverTooltip = false;
|
|
1711
|
+
function show(target, text) {
|
|
1712
|
+
if (hideTimeout) {
|
|
1713
|
+
clearTimeout(hideTimeout);
|
|
1714
|
+
hideTimeout = null;
|
|
1715
|
+
}
|
|
1716
|
+
activeTarget = target;
|
|
1717
|
+
if (!tooltipEl || !document.body.contains(tooltipEl)) {
|
|
1718
|
+
tooltipEl = document.createElement("div");
|
|
1719
|
+
tooltipEl.className = "arap-accessible-tooltip";
|
|
1720
|
+
tooltipEl.setAttribute("role", "presentation");
|
|
1721
|
+
tooltipEl.setAttribute("aria-hidden", "true");
|
|
1722
|
+
tooltipEl.setAttribute("data-arap-ui", "true");
|
|
1723
|
+
document.body.appendChild(tooltipEl);
|
|
1724
|
+
}
|
|
1725
|
+
tooltipEl.textContent = text;
|
|
1726
|
+
tooltipEl.setAttribute("data-visible", "true");
|
|
1727
|
+
positionTooltip(tooltipEl, target);
|
|
1728
|
+
}
|
|
1729
|
+
function hide(immediate = false) {
|
|
1730
|
+
if (hideTimeout) {
|
|
1731
|
+
clearTimeout(hideTimeout);
|
|
1732
|
+
hideTimeout = null;
|
|
1733
|
+
}
|
|
1734
|
+
const doHide = () => {
|
|
1735
|
+
if (isPointerOverTooltip) return;
|
|
1736
|
+
if (tooltipEl) {
|
|
1737
|
+
tooltipEl.removeAttribute("data-visible");
|
|
1738
|
+
tooltipEl.style.top = "-9999px";
|
|
1739
|
+
tooltipEl.style.left = "-9999px";
|
|
1740
|
+
}
|
|
1741
|
+
activeTarget = null;
|
|
1742
|
+
};
|
|
1743
|
+
if (immediate) {
|
|
1744
|
+
doHide();
|
|
1745
|
+
} else {
|
|
1746
|
+
hideTimeout = setTimeout(doHide, 100);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
function findTargetWithDescription(node) {
|
|
1750
|
+
if (!(node instanceof Element)) return null;
|
|
1751
|
+
if (node.closest("[data-arap-ui]")) return null;
|
|
1752
|
+
let curr = node;
|
|
1753
|
+
while (curr && curr !== document.body && curr !== document.documentElement) {
|
|
1754
|
+
const desc = getAuthoredDescription(curr);
|
|
1755
|
+
if (desc) return { element: curr, text: desc };
|
|
1756
|
+
curr = curr.parentElement;
|
|
1757
|
+
}
|
|
1758
|
+
return null;
|
|
1759
|
+
}
|
|
1760
|
+
const handlePointerOver = (event) => {
|
|
1761
|
+
if (tooltipEl && (event.target === tooltipEl || tooltipEl.contains(event.target))) {
|
|
1762
|
+
isPointerOverTooltip = true;
|
|
1763
|
+
if (hideTimeout) {
|
|
1764
|
+
clearTimeout(hideTimeout);
|
|
1765
|
+
hideTimeout = null;
|
|
1766
|
+
}
|
|
1767
|
+
return;
|
|
1768
|
+
}
|
|
1769
|
+
const match = findTargetWithDescription(event.target);
|
|
1770
|
+
if (!match) {
|
|
1771
|
+
if (activeTarget && !isPointerOverTooltip) {
|
|
1772
|
+
hide();
|
|
1773
|
+
}
|
|
1774
|
+
return;
|
|
1775
|
+
}
|
|
1776
|
+
if (match.element === dismissedTarget) {
|
|
1777
|
+
return;
|
|
1778
|
+
}
|
|
1779
|
+
if (match.element === activeTarget) {
|
|
1780
|
+
if (hideTimeout) {
|
|
1781
|
+
clearTimeout(hideTimeout);
|
|
1782
|
+
hideTimeout = null;
|
|
1783
|
+
}
|
|
1784
|
+
return;
|
|
1785
|
+
}
|
|
1786
|
+
show(match.element, match.text);
|
|
1787
|
+
};
|
|
1788
|
+
const handlePointerOut = (event) => {
|
|
1789
|
+
if (dismissedTarget === event.target) {
|
|
1790
|
+
dismissedTarget = null;
|
|
1791
|
+
}
|
|
1792
|
+
if (tooltipEl && (event.target === tooltipEl || tooltipEl.contains(event.target))) {
|
|
1793
|
+
isPointerOverTooltip = false;
|
|
1794
|
+
const related = event.relatedTarget;
|
|
1795
|
+
if (activeTarget && (activeTarget === related || activeTarget.contains(related))) {
|
|
1796
|
+
return;
|
|
1797
|
+
}
|
|
1798
|
+
hide();
|
|
1799
|
+
return;
|
|
1800
|
+
}
|
|
1801
|
+
const match = findTargetWithDescription(event.target);
|
|
1802
|
+
if (match && match.element === activeTarget) {
|
|
1803
|
+
const related = event.relatedTarget;
|
|
1804
|
+
if (tooltipEl && (related === tooltipEl || tooltipEl.contains(related))) {
|
|
1805
|
+
return;
|
|
1806
|
+
}
|
|
1807
|
+
hide();
|
|
1808
|
+
}
|
|
1809
|
+
};
|
|
1810
|
+
const handleFocusIn = (event) => {
|
|
1811
|
+
const match = findTargetWithDescription(event.target);
|
|
1812
|
+
if (!match) {
|
|
1813
|
+
hide(true);
|
|
1814
|
+
return;
|
|
1815
|
+
}
|
|
1816
|
+
if (match.element === dismissedTarget) {
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
show(match.element, match.text);
|
|
1820
|
+
};
|
|
1821
|
+
const handleFocusOut = (event) => {
|
|
1822
|
+
if (dismissedTarget === event.target) {
|
|
1823
|
+
dismissedTarget = null;
|
|
1824
|
+
}
|
|
1825
|
+
if (activeTarget && activeTarget === event.target) {
|
|
1826
|
+
hide(true);
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1829
|
+
const handleKeyDown = (event) => {
|
|
1830
|
+
if (event.key === "Escape" && activeTarget) {
|
|
1831
|
+
dismissedTarget = activeTarget;
|
|
1832
|
+
hide(true);
|
|
1833
|
+
}
|
|
1834
|
+
};
|
|
1835
|
+
const handleReposition = () => {
|
|
1836
|
+
if (activeTarget && tooltipEl && tooltipEl.getAttribute("data-visible") === "true") {
|
|
1837
|
+
if (!document.contains(activeTarget)) {
|
|
1838
|
+
hide(true);
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
positionTooltip(tooltipEl, activeTarget);
|
|
1842
|
+
}
|
|
1843
|
+
};
|
|
1844
|
+
document.addEventListener("pointerover", handlePointerOver, {
|
|
1845
|
+
passive: true
|
|
1846
|
+
});
|
|
1847
|
+
document.addEventListener("mouseover", handlePointerOver, { passive: true });
|
|
1848
|
+
document.addEventListener("pointerout", handlePointerOut, { passive: true });
|
|
1849
|
+
document.addEventListener("mouseout", handlePointerOut, { passive: true });
|
|
1850
|
+
document.addEventListener("focusin", handleFocusIn);
|
|
1851
|
+
document.addEventListener("focusout", handleFocusOut);
|
|
1852
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
1853
|
+
window.addEventListener("scroll", handleReposition, { passive: true });
|
|
1854
|
+
window.addEventListener("resize", handleReposition, { passive: true });
|
|
1855
|
+
return () => {
|
|
1856
|
+
if (hideTimeout) clearTimeout(hideTimeout);
|
|
1857
|
+
document.removeEventListener("pointerover", handlePointerOver);
|
|
1858
|
+
document.removeEventListener("mouseover", handlePointerOver);
|
|
1859
|
+
document.removeEventListener("pointerout", handlePointerOut);
|
|
1860
|
+
document.removeEventListener("mouseout", handlePointerOut);
|
|
1861
|
+
document.removeEventListener("focusin", handleFocusIn);
|
|
1862
|
+
document.removeEventListener("focusout", handleFocusOut);
|
|
1863
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
1864
|
+
window.removeEventListener("scroll", handleReposition);
|
|
1865
|
+
window.removeEventListener("resize", handleReposition);
|
|
1866
|
+
if (tooltipEl) {
|
|
1867
|
+
tooltipEl.remove();
|
|
1868
|
+
tooltipEl = null;
|
|
1869
|
+
}
|
|
1870
|
+
};
|
|
1449
1871
|
}
|
|
1450
1872
|
function CustomEffect({
|
|
1451
1873
|
definition,
|
|
@@ -1571,7 +1993,23 @@ function AccessibilityPlugin({
|
|
|
1571
1993
|
),
|
|
1572
1994
|
[definitions, getFeatureState]
|
|
1573
1995
|
);
|
|
1574
|
-
|
|
1996
|
+
const handleDisable = (0, import_react4.useCallback)(
|
|
1997
|
+
(key) => {
|
|
1998
|
+
setFeatureState(key, builtins[key]?.defaultValue ?? false);
|
|
1999
|
+
},
|
|
2000
|
+
[setFeatureState]
|
|
2001
|
+
);
|
|
2002
|
+
(0, import_react4.useEffect)(() => {
|
|
2003
|
+
const handler = (event) => {
|
|
2004
|
+
const custom = event;
|
|
2005
|
+
if (custom.detail && (custom.detail in builtins || custom.detail === "readingMask" || custom.detail === "readingGuide")) {
|
|
2006
|
+
handleDisable(custom.detail);
|
|
2007
|
+
}
|
|
2008
|
+
};
|
|
2009
|
+
document.addEventListener("arap:disable-feature", handler);
|
|
2010
|
+
return () => document.removeEventListener("arap:disable-feature", handler);
|
|
2011
|
+
}, [handleDisable]);
|
|
2012
|
+
useBuiltinEffects(active, handleDisable);
|
|
1575
2013
|
const value = (0, import_react4.useMemo)(
|
|
1576
2014
|
() => ({
|
|
1577
2015
|
state: { isOpen, features },
|
|
@@ -2654,6 +3092,14 @@ var drawings = {
|
|
|
2654
3092
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 5h18M3 10h12M3 19h18" }),
|
|
2655
3093
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M2 15h20", strokeWidth: "3" })
|
|
2656
3094
|
] }),
|
|
3095
|
+
tooltips: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
3096
|
+
/* @__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" }),
|
|
3097
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M8 9h8M8 13h5" })
|
|
3098
|
+
] }),
|
|
3099
|
+
accessibleTooltips: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
3100
|
+
/* @__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
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M8 9h8M8 13h5" })
|
|
3102
|
+
] }),
|
|
2657
3103
|
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" }) })
|
|
2658
3104
|
};
|
|
2659
3105
|
function FeatureIcon({ name }) {
|
|
@@ -3573,18 +4019,38 @@ function HideVideosController() {
|
|
|
3573
4019
|
}
|
|
3574
4020
|
|
|
3575
4021
|
// src/features/BigCursorController.tsx
|
|
4022
|
+
var import_react14 = require("react");
|
|
3576
4023
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3577
4024
|
var FEATURE_KEY17 = "bigCursor";
|
|
3578
4025
|
var DEFAULT_VALUE17 = false;
|
|
3579
|
-
function BigCursorController(
|
|
4026
|
+
function BigCursorController({
|
|
4027
|
+
showCapabilityHint = true
|
|
4028
|
+
} = {}) {
|
|
3580
4029
|
const { value, setValue } = useAccessibility(
|
|
3581
4030
|
FEATURE_KEY17,
|
|
3582
4031
|
DEFAULT_VALUE17
|
|
3583
4032
|
);
|
|
4033
|
+
const [finePointer, setFinePointer] = (0, import_react14.useState)(
|
|
4034
|
+
() => hasFinePointer()
|
|
4035
|
+
);
|
|
4036
|
+
(0, import_react14.useEffect)(() => {
|
|
4037
|
+
return subscribeFinePointer(() => {
|
|
4038
|
+
setFinePointer(hasFinePointer());
|
|
4039
|
+
});
|
|
4040
|
+
}, []);
|
|
3584
4041
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
3585
4042
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "arap-label", children: [
|
|
3586
4043
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
3587
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Big Cursor" })
|
|
4044
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Big Cursor" }),
|
|
4045
|
+
showCapabilityHint && !finePointer && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4046
|
+
"span",
|
|
4047
|
+
{
|
|
4048
|
+
className: "arap-badge",
|
|
4049
|
+
style: { fontSize: "0.75rem", opacity: 0.8, marginLeft: "4px" },
|
|
4050
|
+
title: "Custom cursor requires mouse or trackpad pointer hardware",
|
|
4051
|
+
children: "(Mouse)"
|
|
4052
|
+
}
|
|
4053
|
+
)
|
|
3588
4054
|
] }),
|
|
3589
4055
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3590
4056
|
"button",
|
|
@@ -3603,57 +4069,301 @@ function BigCursorController() {
|
|
|
3603
4069
|
// src/features/ReadingMaskController.tsx
|
|
3604
4070
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3605
4071
|
var FEATURE_KEY18 = "readingMask";
|
|
4072
|
+
var HEIGHT_KEY = "readingMaskHeight";
|
|
3606
4073
|
var DEFAULT_VALUE18 = false;
|
|
3607
|
-
|
|
4074
|
+
var DEFAULT_HEIGHT = 100;
|
|
4075
|
+
var MIN_HEIGHT = 40;
|
|
4076
|
+
var MAX_HEIGHT = 300;
|
|
4077
|
+
var STEP_HEIGHT = 20;
|
|
4078
|
+
function ReadingMaskController({
|
|
4079
|
+
minHeight = MIN_HEIGHT,
|
|
4080
|
+
maxHeight = MAX_HEIGHT,
|
|
4081
|
+
step = STEP_HEIGHT
|
|
4082
|
+
} = {}) {
|
|
3608
4083
|
const { value, setValue } = useAccessibility(
|
|
3609
4084
|
FEATURE_KEY18,
|
|
3610
4085
|
DEFAULT_VALUE18
|
|
3611
4086
|
);
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
)
|
|
3628
|
-
|
|
4087
|
+
const { value: height, setValue: setHeight } = useAccessibility(
|
|
4088
|
+
HEIGHT_KEY,
|
|
4089
|
+
DEFAULT_HEIGHT
|
|
4090
|
+
);
|
|
4091
|
+
const currentHeight = typeof height === "number" ? height : DEFAULT_HEIGHT;
|
|
4092
|
+
const handleDecreaseHeight = () => {
|
|
4093
|
+
setHeight(Math.max(minHeight, currentHeight - step));
|
|
4094
|
+
};
|
|
4095
|
+
const handleIncreaseHeight = () => {
|
|
4096
|
+
setHeight(Math.min(maxHeight, currentHeight + step));
|
|
4097
|
+
};
|
|
4098
|
+
const handleNudgeUp = () => {
|
|
4099
|
+
nudgeReadingAid("readingMask", -30);
|
|
4100
|
+
};
|
|
4101
|
+
const handleNudgeDown = () => {
|
|
4102
|
+
nudgeReadingAid("readingMask", 30);
|
|
4103
|
+
};
|
|
4104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4105
|
+
"div",
|
|
4106
|
+
{
|
|
4107
|
+
className: "arap-feature arap-feature-expandable",
|
|
4108
|
+
role: "group",
|
|
4109
|
+
"aria-label": "Reading Mask",
|
|
4110
|
+
children: [
|
|
4111
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4112
|
+
"div",
|
|
4113
|
+
{
|
|
4114
|
+
className: "arap-feature-header",
|
|
4115
|
+
style: {
|
|
4116
|
+
display: "flex",
|
|
4117
|
+
alignItems: "center",
|
|
4118
|
+
justifyContent: "space-between",
|
|
4119
|
+
width: "100%"
|
|
4120
|
+
},
|
|
4121
|
+
children: [
|
|
4122
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "arap-label", children: [
|
|
4123
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FeatureIcon, { name: FEATURE_KEY18 }),
|
|
4124
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Reading Mask" })
|
|
4125
|
+
] }),
|
|
4126
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4127
|
+
"button",
|
|
4128
|
+
{
|
|
4129
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
4130
|
+
onClick: () => setValue(!value),
|
|
4131
|
+
"aria-label": "Reading Mask",
|
|
4132
|
+
"aria-pressed": value,
|
|
4133
|
+
type: "button",
|
|
4134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
4135
|
+
}
|
|
4136
|
+
)
|
|
4137
|
+
]
|
|
4138
|
+
}
|
|
4139
|
+
),
|
|
4140
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4141
|
+
"div",
|
|
4142
|
+
{
|
|
4143
|
+
className: "arap-subcontrols",
|
|
4144
|
+
style: {
|
|
4145
|
+
marginTop: "8px",
|
|
4146
|
+
paddingTop: "8px",
|
|
4147
|
+
borderTop: "1px solid var(--arap-divider, #e5e7eb)",
|
|
4148
|
+
display: "flex",
|
|
4149
|
+
flexDirection: "column",
|
|
4150
|
+
gap: "8px",
|
|
4151
|
+
width: "100%"
|
|
4152
|
+
},
|
|
4153
|
+
children: [
|
|
4154
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4155
|
+
"div",
|
|
4156
|
+
{
|
|
4157
|
+
style: {
|
|
4158
|
+
display: "flex",
|
|
4159
|
+
alignItems: "center",
|
|
4160
|
+
justifyContent: "space-between",
|
|
4161
|
+
width: "100%"
|
|
4162
|
+
},
|
|
4163
|
+
children: [
|
|
4164
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4165
|
+
"span",
|
|
4166
|
+
{
|
|
4167
|
+
style: {
|
|
4168
|
+
fontSize: "0.85rem",
|
|
4169
|
+
color: "var(--arap-muted, #4b5563)"
|
|
4170
|
+
},
|
|
4171
|
+
children: "Window Height"
|
|
4172
|
+
}
|
|
4173
|
+
),
|
|
4174
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "arap-controls", children: [
|
|
4175
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4176
|
+
"button",
|
|
4177
|
+
{
|
|
4178
|
+
className: "arap-btn-sm",
|
|
4179
|
+
onClick: handleDecreaseHeight,
|
|
4180
|
+
disabled: currentHeight <= minHeight,
|
|
4181
|
+
"aria-label": "Decrease reading mask height",
|
|
4182
|
+
type: "button",
|
|
4183
|
+
children: "\u2212"
|
|
4184
|
+
}
|
|
4185
|
+
),
|
|
4186
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
4187
|
+
currentHeight,
|
|
4188
|
+
"px"
|
|
4189
|
+
] }),
|
|
4190
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4191
|
+
"button",
|
|
4192
|
+
{
|
|
4193
|
+
className: "arap-btn-sm",
|
|
4194
|
+
onClick: handleIncreaseHeight,
|
|
4195
|
+
disabled: currentHeight >= maxHeight,
|
|
4196
|
+
"aria-label": "Increase reading mask height",
|
|
4197
|
+
type: "button",
|
|
4198
|
+
children: "+"
|
|
4199
|
+
}
|
|
4200
|
+
)
|
|
4201
|
+
] })
|
|
4202
|
+
]
|
|
4203
|
+
}
|
|
4204
|
+
),
|
|
4205
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4206
|
+
"div",
|
|
4207
|
+
{
|
|
4208
|
+
style: {
|
|
4209
|
+
display: "flex",
|
|
4210
|
+
alignItems: "center",
|
|
4211
|
+
justifyContent: "space-between",
|
|
4212
|
+
width: "100%"
|
|
4213
|
+
},
|
|
4214
|
+
children: [
|
|
4215
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4216
|
+
"span",
|
|
4217
|
+
{
|
|
4218
|
+
style: {
|
|
4219
|
+
fontSize: "0.85rem",
|
|
4220
|
+
color: "var(--arap-muted, #4b5563)"
|
|
4221
|
+
},
|
|
4222
|
+
children: "Move Window"
|
|
4223
|
+
}
|
|
4224
|
+
),
|
|
4225
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "arap-controls", children: [
|
|
4226
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4227
|
+
"button",
|
|
4228
|
+
{
|
|
4229
|
+
className: "arap-btn-sm",
|
|
4230
|
+
onClick: handleNudgeUp,
|
|
4231
|
+
"aria-label": "Move reading mask up",
|
|
4232
|
+
title: "Alt+Up Arrow",
|
|
4233
|
+
type: "button",
|
|
4234
|
+
children: "\u2191"
|
|
4235
|
+
}
|
|
4236
|
+
),
|
|
4237
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4238
|
+
"button",
|
|
4239
|
+
{
|
|
4240
|
+
className: "arap-btn-sm",
|
|
4241
|
+
onClick: handleNudgeDown,
|
|
4242
|
+
"aria-label": "Move reading mask down",
|
|
4243
|
+
title: "Alt+Down Arrow",
|
|
4244
|
+
type: "button",
|
|
4245
|
+
children: "\u2193"
|
|
4246
|
+
}
|
|
4247
|
+
)
|
|
4248
|
+
] })
|
|
4249
|
+
]
|
|
4250
|
+
}
|
|
4251
|
+
)
|
|
4252
|
+
]
|
|
4253
|
+
}
|
|
4254
|
+
)
|
|
4255
|
+
]
|
|
4256
|
+
}
|
|
4257
|
+
);
|
|
3629
4258
|
}
|
|
3630
4259
|
|
|
3631
4260
|
// src/features/ReadingGuideController.tsx
|
|
3632
4261
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3633
4262
|
var FEATURE_KEY19 = "readingGuide";
|
|
3634
4263
|
var DEFAULT_VALUE19 = false;
|
|
3635
|
-
function ReadingGuideController(
|
|
4264
|
+
function ReadingGuideController({
|
|
4265
|
+
nudgeStep = 30
|
|
4266
|
+
} = {}) {
|
|
3636
4267
|
const { value, setValue } = useAccessibility(
|
|
3637
4268
|
FEATURE_KEY19,
|
|
3638
4269
|
DEFAULT_VALUE19
|
|
3639
4270
|
);
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
4271
|
+
const handleNudgeUp = () => {
|
|
4272
|
+
nudgeReadingAid("readingGuide", -nudgeStep);
|
|
4273
|
+
};
|
|
4274
|
+
const handleNudgeDown = () => {
|
|
4275
|
+
nudgeReadingAid("readingGuide", nudgeStep);
|
|
4276
|
+
};
|
|
4277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4278
|
+
"div",
|
|
4279
|
+
{
|
|
4280
|
+
className: "arap-feature arap-feature-expandable",
|
|
4281
|
+
role: "group",
|
|
4282
|
+
"aria-label": "Reading Guide",
|
|
4283
|
+
children: [
|
|
4284
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4285
|
+
"div",
|
|
4286
|
+
{
|
|
4287
|
+
className: "arap-feature-header",
|
|
4288
|
+
style: {
|
|
4289
|
+
display: "flex",
|
|
4290
|
+
alignItems: "center",
|
|
4291
|
+
justifyContent: "space-between",
|
|
4292
|
+
width: "100%"
|
|
4293
|
+
},
|
|
4294
|
+
children: [
|
|
4295
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "arap-label", children: [
|
|
4296
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FeatureIcon, { name: FEATURE_KEY19 }),
|
|
4297
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Reading Guide" })
|
|
4298
|
+
] }),
|
|
4299
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4300
|
+
"button",
|
|
4301
|
+
{
|
|
4302
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
4303
|
+
onClick: () => setValue(!value),
|
|
4304
|
+
"aria-label": "Reading Guide",
|
|
4305
|
+
"aria-pressed": value,
|
|
4306
|
+
type: "button",
|
|
4307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
4308
|
+
}
|
|
4309
|
+
)
|
|
4310
|
+
]
|
|
4311
|
+
}
|
|
4312
|
+
),
|
|
4313
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4314
|
+
"div",
|
|
4315
|
+
{
|
|
4316
|
+
className: "arap-subcontrols",
|
|
4317
|
+
style: {
|
|
4318
|
+
marginTop: "8px",
|
|
4319
|
+
paddingTop: "8px",
|
|
4320
|
+
borderTop: "1px solid var(--arap-divider, #e5e7eb)",
|
|
4321
|
+
display: "flex",
|
|
4322
|
+
alignItems: "center",
|
|
4323
|
+
justifyContent: "space-between",
|
|
4324
|
+
width: "100%"
|
|
4325
|
+
},
|
|
4326
|
+
children: [
|
|
4327
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4328
|
+
"span",
|
|
4329
|
+
{
|
|
4330
|
+
style: {
|
|
4331
|
+
fontSize: "0.85rem",
|
|
4332
|
+
color: "var(--arap-muted, #4b5563)"
|
|
4333
|
+
},
|
|
4334
|
+
children: "Move Guide"
|
|
4335
|
+
}
|
|
4336
|
+
),
|
|
4337
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "arap-controls", children: [
|
|
4338
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4339
|
+
"button",
|
|
4340
|
+
{
|
|
4341
|
+
className: "arap-btn-sm",
|
|
4342
|
+
onClick: handleNudgeUp,
|
|
4343
|
+
"aria-label": "Move reading guide up",
|
|
4344
|
+
title: "Alt+Up Arrow",
|
|
4345
|
+
type: "button",
|
|
4346
|
+
children: "\u2191"
|
|
4347
|
+
}
|
|
4348
|
+
),
|
|
4349
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4350
|
+
"button",
|
|
4351
|
+
{
|
|
4352
|
+
className: "arap-btn-sm",
|
|
4353
|
+
onClick: handleNudgeDown,
|
|
4354
|
+
"aria-label": "Move reading guide down",
|
|
4355
|
+
title: "Alt+Down Arrow",
|
|
4356
|
+
type: "button",
|
|
4357
|
+
children: "\u2193"
|
|
4358
|
+
}
|
|
4359
|
+
)
|
|
4360
|
+
] })
|
|
4361
|
+
]
|
|
4362
|
+
}
|
|
4363
|
+
)
|
|
4364
|
+
]
|
|
4365
|
+
}
|
|
4366
|
+
);
|
|
3657
4367
|
}
|
|
3658
4368
|
|
|
3659
4369
|
// src/features/HighlightFocusController.tsx
|
|
@@ -3686,7 +4396,7 @@ function HighlightFocusController() {
|
|
|
3686
4396
|
var FocusHighlightController = HighlightFocusController;
|
|
3687
4397
|
|
|
3688
4398
|
// src/features/ReduceMotionController.tsx
|
|
3689
|
-
var
|
|
4399
|
+
var import_react15 = require("react");
|
|
3690
4400
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3691
4401
|
var FEATURE_KEY21 = "reduceMotion";
|
|
3692
4402
|
var DEFAULT_VALUE21 = false;
|
|
@@ -3695,7 +4405,7 @@ function ReduceMotionController() {
|
|
|
3695
4405
|
FEATURE_KEY21,
|
|
3696
4406
|
DEFAULT_VALUE21
|
|
3697
4407
|
);
|
|
3698
|
-
const osReducedMotion = (0,
|
|
4408
|
+
const osReducedMotion = (0, import_react15.useSyncExternalStore)(
|
|
3699
4409
|
subscribeReducedMotion,
|
|
3700
4410
|
isReducedMotionActive,
|
|
3701
4411
|
() => false
|
|
@@ -3720,29 +4430,85 @@ function ReduceMotionController() {
|
|
|
3720
4430
|
] });
|
|
3721
4431
|
}
|
|
3722
4432
|
|
|
4433
|
+
// src/features/TooltipsController.tsx
|
|
4434
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4435
|
+
var FEATURE_KEY22 = "tooltips";
|
|
4436
|
+
var DEFAULT_VALUE22 = false;
|
|
4437
|
+
function TooltipsController({
|
|
4438
|
+
className = "",
|
|
4439
|
+
label = "Accessible Tooltips",
|
|
4440
|
+
description = "Show authored alt text and descriptions on hover or focus"
|
|
4441
|
+
}) {
|
|
4442
|
+
const { value, setValue } = useAccessibility(
|
|
4443
|
+
FEATURE_KEY22,
|
|
4444
|
+
DEFAULT_VALUE22
|
|
4445
|
+
);
|
|
4446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4447
|
+
"div",
|
|
4448
|
+
{
|
|
4449
|
+
className: `arap-feature ${className}`,
|
|
4450
|
+
role: "group",
|
|
4451
|
+
"aria-label": label,
|
|
4452
|
+
children: [
|
|
4453
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "arap-label", children: [
|
|
4454
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FeatureIcon, { name: FEATURE_KEY22 }),
|
|
4455
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { children: [
|
|
4456
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { style: { display: "block" }, children: label }),
|
|
4457
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4458
|
+
"span",
|
|
4459
|
+
{
|
|
4460
|
+
style: {
|
|
4461
|
+
display: "block",
|
|
4462
|
+
fontSize: "11px",
|
|
4463
|
+
fontWeight: 400,
|
|
4464
|
+
color: "var(--arap-muted, #64748b)",
|
|
4465
|
+
marginTop: "1px"
|
|
4466
|
+
},
|
|
4467
|
+
children: description
|
|
4468
|
+
}
|
|
4469
|
+
)
|
|
4470
|
+
] })
|
|
4471
|
+
] }),
|
|
4472
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4473
|
+
"button",
|
|
4474
|
+
{
|
|
4475
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
4476
|
+
onClick: () => setValue(!value),
|
|
4477
|
+
"aria-label": label,
|
|
4478
|
+
"aria-pressed": Boolean(value),
|
|
4479
|
+
type: "button",
|
|
4480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
4481
|
+
}
|
|
4482
|
+
)
|
|
4483
|
+
]
|
|
4484
|
+
}
|
|
4485
|
+
);
|
|
4486
|
+
}
|
|
4487
|
+
var AccessibleTooltipsController = TooltipsController;
|
|
4488
|
+
|
|
3723
4489
|
// src/features/ResetController.tsx
|
|
3724
4490
|
var import_react_dom2 = require("react-dom");
|
|
3725
|
-
var
|
|
3726
|
-
var
|
|
4491
|
+
var import_react16 = require("react");
|
|
4492
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3727
4493
|
function ResetController() {
|
|
3728
|
-
const ctx = (0,
|
|
4494
|
+
const ctx = (0, import_react16.useContext)(AccessibilityContext);
|
|
3729
4495
|
if (!ctx) {
|
|
3730
4496
|
throw new Error(
|
|
3731
4497
|
"ResetController must be used within an <AccessibilityPlugin> provider."
|
|
3732
4498
|
);
|
|
3733
4499
|
}
|
|
3734
|
-
const actionHost = (0,
|
|
4500
|
+
const actionHost = (0, import_react16.useContext)(PanelActionsContext);
|
|
3735
4501
|
const { resetAll } = ctx;
|
|
3736
4502
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
3737
|
-
const button = /* @__PURE__ */ (0,
|
|
3738
|
-
/* @__PURE__ */ (0,
|
|
4503
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
4504
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FeatureIcon, { name: "reset" }),
|
|
3739
4505
|
strings.resetAll
|
|
3740
4506
|
] }) });
|
|
3741
4507
|
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
3742
4508
|
}
|
|
3743
4509
|
|
|
3744
4510
|
// src/core/controls/ToggleControl.tsx
|
|
3745
|
-
var
|
|
4511
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3746
4512
|
function ToggleControl({
|
|
3747
4513
|
id,
|
|
3748
4514
|
label,
|
|
@@ -3764,12 +4530,12 @@ function ToggleControl({
|
|
|
3764
4530
|
onChange(!checked);
|
|
3765
4531
|
}
|
|
3766
4532
|
};
|
|
3767
|
-
return /* @__PURE__ */ (0,
|
|
4533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3768
4534
|
"div",
|
|
3769
4535
|
{
|
|
3770
4536
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3771
4537
|
style,
|
|
3772
|
-
children: /* @__PURE__ */ (0,
|
|
4538
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3773
4539
|
"button",
|
|
3774
4540
|
{
|
|
3775
4541
|
id,
|
|
@@ -3783,7 +4549,7 @@ function ToggleControl({
|
|
|
3783
4549
|
disabled: !isInteractive,
|
|
3784
4550
|
onClick: handleClick,
|
|
3785
4551
|
title: unavailableReason || description || toggleLabel,
|
|
3786
|
-
children: /* @__PURE__ */ (0,
|
|
4552
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3787
4553
|
"span",
|
|
3788
4554
|
{
|
|
3789
4555
|
className: "arap-toggle-knob",
|
|
@@ -3799,8 +4565,8 @@ function ToggleControl({
|
|
|
3799
4565
|
}
|
|
3800
4566
|
|
|
3801
4567
|
// src/core/controls/ChoiceControl.tsx
|
|
3802
|
-
var
|
|
3803
|
-
var
|
|
4568
|
+
var import_react17 = require("react");
|
|
4569
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3804
4570
|
function ChoiceControl({
|
|
3805
4571
|
id,
|
|
3806
4572
|
label,
|
|
@@ -3814,12 +4580,12 @@ function ChoiceControl({
|
|
|
3814
4580
|
style,
|
|
3815
4581
|
orientation = "horizontal"
|
|
3816
4582
|
}) {
|
|
3817
|
-
const containerRef = (0,
|
|
3818
|
-
const allOptions = (0,
|
|
4583
|
+
const containerRef = (0, import_react17.useRef)(null);
|
|
4584
|
+
const allOptions = (0, import_react17.useMemo)(
|
|
3819
4585
|
() => groups ? groups.flatMap((g) => g.options) : options || [],
|
|
3820
4586
|
[groups, options]
|
|
3821
4587
|
);
|
|
3822
|
-
const handleKeyDown = (0,
|
|
4588
|
+
const handleKeyDown = (0, import_react17.useCallback)(
|
|
3823
4589
|
(e) => {
|
|
3824
4590
|
if (disabled || allOptions.length === 0) return;
|
|
3825
4591
|
const enabledOptions = allOptions.filter((opt) => !opt.disabled);
|
|
@@ -3856,7 +4622,7 @@ function ChoiceControl({
|
|
|
3856
4622
|
const renderOptionButton = (opt) => {
|
|
3857
4623
|
const isSelected = value === opt.value;
|
|
3858
4624
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
3859
|
-
return /* @__PURE__ */ (0,
|
|
4625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3860
4626
|
"button",
|
|
3861
4627
|
{
|
|
3862
4628
|
type: "button",
|
|
@@ -3870,15 +4636,15 @@ function ChoiceControl({
|
|
|
3870
4636
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
3871
4637
|
title: opt.description,
|
|
3872
4638
|
children: [
|
|
3873
|
-
isSelected && /* @__PURE__ */ (0,
|
|
3874
|
-
/* @__PURE__ */ (0,
|
|
3875
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
4639
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
4640
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: opt.label }),
|
|
4641
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
3876
4642
|
]
|
|
3877
4643
|
},
|
|
3878
4644
|
String(opt.value)
|
|
3879
4645
|
);
|
|
3880
4646
|
};
|
|
3881
|
-
return /* @__PURE__ */ (0,
|
|
4647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3882
4648
|
"div",
|
|
3883
4649
|
{
|
|
3884
4650
|
ref: containerRef,
|
|
@@ -3889,15 +4655,15 @@ function ChoiceControl({
|
|
|
3889
4655
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3890
4656
|
style,
|
|
3891
4657
|
onKeyDown: handleKeyDown,
|
|
3892
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
4658
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3893
4659
|
"div",
|
|
3894
4660
|
{
|
|
3895
4661
|
className: "arap-choice-group",
|
|
3896
4662
|
role: "group",
|
|
3897
4663
|
"aria-label": group.label,
|
|
3898
4664
|
children: [
|
|
3899
|
-
/* @__PURE__ */ (0,
|
|
3900
|
-
/* @__PURE__ */ (0,
|
|
4665
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
4666
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
3901
4667
|
]
|
|
3902
4668
|
},
|
|
3903
4669
|
group.label
|
|
@@ -3907,7 +4673,7 @@ function ChoiceControl({
|
|
|
3907
4673
|
}
|
|
3908
4674
|
|
|
3909
4675
|
// src/core/controls/StepperControl.tsx
|
|
3910
|
-
var
|
|
4676
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3911
4677
|
function StepperControl({
|
|
3912
4678
|
id,
|
|
3913
4679
|
label,
|
|
@@ -3937,15 +4703,15 @@ function StepperControl({
|
|
|
3937
4703
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
3938
4704
|
}
|
|
3939
4705
|
};
|
|
3940
|
-
return /* @__PURE__ */ (0,
|
|
4706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
3941
4707
|
"div",
|
|
3942
4708
|
{
|
|
3943
4709
|
id,
|
|
3944
4710
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3945
4711
|
style,
|
|
3946
4712
|
children: [
|
|
3947
|
-
/* @__PURE__ */ (0,
|
|
3948
|
-
/* @__PURE__ */ (0,
|
|
4713
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-controls", children: [
|
|
4714
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3949
4715
|
"button",
|
|
3950
4716
|
{
|
|
3951
4717
|
type: "button",
|
|
@@ -3956,8 +4722,8 @@ function StepperControl({
|
|
|
3956
4722
|
children: "\u2212"
|
|
3957
4723
|
}
|
|
3958
4724
|
),
|
|
3959
|
-
/* @__PURE__ */ (0,
|
|
3960
|
-
/* @__PURE__ */ (0,
|
|
4725
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
4726
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3961
4727
|
"button",
|
|
3962
4728
|
{
|
|
3963
4729
|
type: "button",
|
|
@@ -3969,7 +4735,7 @@ function StepperControl({
|
|
|
3969
4735
|
}
|
|
3970
4736
|
)
|
|
3971
4737
|
] }),
|
|
3972
|
-
showSlider && /* @__PURE__ */ (0,
|
|
4738
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3973
4739
|
"input",
|
|
3974
4740
|
{
|
|
3975
4741
|
type: "range",
|
|
@@ -3993,7 +4759,7 @@ function StepperControl({
|
|
|
3993
4759
|
}
|
|
3994
4760
|
|
|
3995
4761
|
// src/core/controls/FeatureCard.tsx
|
|
3996
|
-
var
|
|
4762
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3997
4763
|
function FeatureCard({
|
|
3998
4764
|
id,
|
|
3999
4765
|
featureKey,
|
|
@@ -4012,7 +4778,7 @@ function FeatureCard({
|
|
|
4012
4778
|
largeControls = false
|
|
4013
4779
|
}) {
|
|
4014
4780
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
4015
|
-
return /* @__PURE__ */ (0,
|
|
4781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
4016
4782
|
"div",
|
|
4017
4783
|
{
|
|
4018
4784
|
id,
|
|
@@ -4021,27 +4787,27 @@ function FeatureCard({
|
|
|
4021
4787
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4022
4788
|
style,
|
|
4023
4789
|
children: [
|
|
4024
|
-
/* @__PURE__ */ (0,
|
|
4025
|
-
/* @__PURE__ */ (0,
|
|
4026
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
4027
|
-
/* @__PURE__ */ (0,
|
|
4790
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-card-header", children: [
|
|
4791
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "arap-label", children: [
|
|
4792
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
4793
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-card-title", children: title })
|
|
4028
4794
|
] }),
|
|
4029
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
4795
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
4030
4796
|
] }),
|
|
4031
|
-
description && /* @__PURE__ */ (0,
|
|
4032
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
4033
|
-
/* @__PURE__ */ (0,
|
|
4034
|
-
/* @__PURE__ */ (0,
|
|
4797
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
4798
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
4799
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
4800
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: errorMessage })
|
|
4035
4801
|
] }),
|
|
4036
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
4037
|
-
/* @__PURE__ */ (0,
|
|
4038
|
-
/* @__PURE__ */ (0,
|
|
4802
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
4803
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
4804
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: unavailableMessage })
|
|
4039
4805
|
] }),
|
|
4040
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
4041
|
-
/* @__PURE__ */ (0,
|
|
4042
|
-
/* @__PURE__ */ (0,
|
|
4043
|
-
/* @__PURE__ */ (0,
|
|
4044
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
4806
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
4807
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
4808
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-permission-content", children: [
|
|
4809
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: permissionMessage }),
|
|
4810
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4045
4811
|
"button",
|
|
4046
4812
|
{
|
|
4047
4813
|
type: "button",
|
|
@@ -4052,14 +4818,14 @@ function FeatureCard({
|
|
|
4052
4818
|
)
|
|
4053
4819
|
] })
|
|
4054
4820
|
] }),
|
|
4055
|
-
/* @__PURE__ */ (0,
|
|
4821
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "arap-card-content", children })
|
|
4056
4822
|
]
|
|
4057
4823
|
}
|
|
4058
4824
|
);
|
|
4059
4825
|
}
|
|
4060
4826
|
|
|
4061
4827
|
// src/core/controls/FeatureStatusState.tsx
|
|
4062
|
-
var
|
|
4828
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4063
4829
|
function SearchCount({
|
|
4064
4830
|
totalCount,
|
|
4065
4831
|
matchedCount,
|
|
@@ -4068,7 +4834,7 @@ function SearchCount({
|
|
|
4068
4834
|
style
|
|
4069
4835
|
}) {
|
|
4070
4836
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
4071
|
-
return /* @__PURE__ */ (0,
|
|
4837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4072
4838
|
"div",
|
|
4073
4839
|
{
|
|
4074
4840
|
role: "status",
|
|
@@ -4088,17 +4854,17 @@ function EmptyState({
|
|
|
4088
4854
|
className = "",
|
|
4089
4855
|
style
|
|
4090
4856
|
}) {
|
|
4091
|
-
return /* @__PURE__ */ (0,
|
|
4857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4092
4858
|
"div",
|
|
4093
4859
|
{
|
|
4094
4860
|
role: "status",
|
|
4095
4861
|
className: `arap-empty-state ${className}`,
|
|
4096
4862
|
style,
|
|
4097
4863
|
children: [
|
|
4098
|
-
/* @__PURE__ */ (0,
|
|
4099
|
-
/* @__PURE__ */ (0,
|
|
4100
|
-
/* @__PURE__ */ (0,
|
|
4101
|
-
onAction && /* @__PURE__ */ (0,
|
|
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 })
|
|
4102
4868
|
]
|
|
4103
4869
|
}
|
|
4104
4870
|
);
|
|
@@ -4111,18 +4877,18 @@ function ErrorState({
|
|
|
4111
4877
|
className = "",
|
|
4112
4878
|
style
|
|
4113
4879
|
}) {
|
|
4114
|
-
return /* @__PURE__ */ (0,
|
|
4880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4115
4881
|
"div",
|
|
4116
4882
|
{
|
|
4117
4883
|
role: "alert",
|
|
4118
4884
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
4119
4885
|
style,
|
|
4120
4886
|
children: [
|
|
4121
|
-
/* @__PURE__ */ (0,
|
|
4122
|
-
/* @__PURE__ */ (0,
|
|
4123
|
-
title && /* @__PURE__ */ (0,
|
|
4124
|
-
/* @__PURE__ */ (0,
|
|
4125
|
-
onRetry && /* @__PURE__ */ (0,
|
|
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 })
|
|
4126
4892
|
] })
|
|
4127
4893
|
]
|
|
4128
4894
|
}
|
|
@@ -4130,7 +4896,7 @@ function ErrorState({
|
|
|
4130
4896
|
}
|
|
4131
4897
|
|
|
4132
4898
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
4133
|
-
var
|
|
4899
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4134
4900
|
function ProfilePreviewCard({
|
|
4135
4901
|
profile,
|
|
4136
4902
|
isActive,
|
|
@@ -4180,7 +4946,7 @@ function ProfilePreviewCard({
|
|
|
4180
4946
|
if (val === null || val === void 0) return "Original";
|
|
4181
4947
|
return String(val);
|
|
4182
4948
|
};
|
|
4183
|
-
return /* @__PURE__ */ (0,
|
|
4949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4184
4950
|
"div",
|
|
4185
4951
|
{
|
|
4186
4952
|
role: "group",
|
|
@@ -4188,10 +4954,10 @@ function ProfilePreviewCard({
|
|
|
4188
4954
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4189
4955
|
style,
|
|
4190
4956
|
children: [
|
|
4191
|
-
/* @__PURE__ */ (0,
|
|
4192
|
-
/* @__PURE__ */ (0,
|
|
4193
|
-
/* @__PURE__ */ (0,
|
|
4194
|
-
isActive && /* @__PURE__ */ (0,
|
|
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)(
|
|
4195
4961
|
"span",
|
|
4196
4962
|
{
|
|
4197
4963
|
className: "arap-profile-active-badge",
|
|
@@ -4200,14 +4966,14 @@ function ProfilePreviewCard({
|
|
|
4200
4966
|
}
|
|
4201
4967
|
)
|
|
4202
4968
|
] }),
|
|
4203
|
-
/* @__PURE__ */ (0,
|
|
4969
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
4204
4970
|
] }),
|
|
4205
|
-
/* @__PURE__ */ (0,
|
|
4206
|
-
/* @__PURE__ */ (0,
|
|
4207
|
-
/* @__PURE__ */ (0,
|
|
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) => {
|
|
4208
4974
|
const val = profile.settings[key];
|
|
4209
|
-
return /* @__PURE__ */ (0,
|
|
4210
|
-
/* @__PURE__ */ (0,
|
|
4975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
4976
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("strong", { children: [
|
|
4211
4977
|
formatKeyName(key),
|
|
4212
4978
|
":"
|
|
4213
4979
|
] }),
|
|
@@ -4216,7 +4982,7 @@ function ProfilePreviewCard({
|
|
|
4216
4982
|
] }, key);
|
|
4217
4983
|
}) })
|
|
4218
4984
|
] }),
|
|
4219
|
-
/* @__PURE__ */ (0,
|
|
4985
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4220
4986
|
"button",
|
|
4221
4987
|
{
|
|
4222
4988
|
type: "button",
|
|
@@ -4225,7 +4991,7 @@ function ProfilePreviewCard({
|
|
|
4225
4991
|
"aria-label": `Revert ${profile.label} profile`,
|
|
4226
4992
|
children: "Revert to custom settings"
|
|
4227
4993
|
}
|
|
4228
|
-
) : /* @__PURE__ */ (0,
|
|
4994
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4229
4995
|
"button",
|
|
4230
4996
|
{
|
|
4231
4997
|
type: "button",
|
|
@@ -4245,6 +5011,7 @@ function ProfilePreviewCard({
|
|
|
4245
5011
|
AccessibilityContext,
|
|
4246
5012
|
AccessibilityList,
|
|
4247
5013
|
AccessibilityPlugin,
|
|
5014
|
+
AccessibleTooltipsController,
|
|
4248
5015
|
BigCursorController,
|
|
4249
5016
|
CONTRAST_MODES,
|
|
4250
5017
|
CONTRAST_PALETTES,
|
|
@@ -4253,6 +5020,7 @@ function ProfilePreviewCard({
|
|
|
4253
5020
|
ContrastController,
|
|
4254
5021
|
ContrastModeController,
|
|
4255
5022
|
DEFAULT_PREFERENCES,
|
|
5023
|
+
DEFAULT_READING_MASK_HEIGHT,
|
|
4256
5024
|
DYSLEXIA_FONT_STACK,
|
|
4257
5025
|
EmptyState,
|
|
4258
5026
|
ErrorState,
|
|
@@ -4274,9 +5042,12 @@ function ProfilePreviewCard({
|
|
|
4274
5042
|
LetterSpacingController,
|
|
4275
5043
|
LineHeightController,
|
|
4276
5044
|
LinkHighlightController,
|
|
5045
|
+
MAX_READING_MASK_HEIGHT,
|
|
5046
|
+
MIN_READING_MASK_HEIGHT,
|
|
4277
5047
|
PROFILE_DEFINITIONS,
|
|
4278
5048
|
ParagraphSpacingController,
|
|
4279
5049
|
ProfilePreviewCard,
|
|
5050
|
+
READING_MASK_HEIGHT_PRESETS,
|
|
4280
5051
|
ReadingGuideController,
|
|
4281
5052
|
ReadingMaskController,
|
|
4282
5053
|
ReduceMotionController,
|
|
@@ -4292,11 +5063,15 @@ function ProfilePreviewCard({
|
|
|
4292
5063
|
TextAlignController,
|
|
4293
5064
|
TextScaleController,
|
|
4294
5065
|
ToggleControl,
|
|
5066
|
+
TooltipsController,
|
|
4295
5067
|
WordSpacingController,
|
|
4296
5068
|
createInitialPreferencesState,
|
|
4297
5069
|
enLocale,
|
|
5070
|
+
enableAccessibleTooltips,
|
|
4298
5071
|
findMainLandmark,
|
|
5072
|
+
getAuthoredDescription,
|
|
4299
5073
|
getScriptSpacingConstraints,
|
|
5074
|
+
hasFinePointer,
|
|
4300
5075
|
isEligibleDecorativeImage,
|
|
4301
5076
|
isForcedColorsActive,
|
|
4302
5077
|
isFunctionalOrMeaningfulImage,
|
|
@@ -4309,10 +5084,13 @@ function ProfilePreviewCard({
|
|
|
4309
5084
|
isRtlLocale,
|
|
4310
5085
|
normalizePreferenceValue,
|
|
4311
5086
|
normalizePreferences,
|
|
5087
|
+
nudgeReadingAid,
|
|
5088
|
+
positionTooltip,
|
|
4312
5089
|
preferencesReducer,
|
|
4313
5090
|
registerLocale,
|
|
4314
5091
|
resolveEffectivePreferences,
|
|
4315
5092
|
resolveLocaleStrings,
|
|
5093
|
+
subscribeFinePointer,
|
|
4316
5094
|
subscribeForcedColors,
|
|
4317
5095
|
subscribeReducedMotion,
|
|
4318
5096
|
useAccessibility
|