accessibility-plugin-react 2.9.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -21
- package/dist/index.d.mts +40 -5
- package/dist/index.d.ts +40 -5
- package/dist/index.js +626 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +607 -61
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +28 -0
- package/docs/API.md +3 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +4 -4
- package/docs/DECORATIVE_IMAGES.md +176 -0
- package/docs/FEATURES.md +25 -25
- package/docs/READING_AIDS.md +139 -0
- package/docs/REGRESSION_AND_PERFORMANCE.md +127 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// src/styles/tailwind.css
|
|
27
|
-
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');
|
|
27
|
+
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');
|
|
28
28
|
|
|
29
29
|
// src/core/AccessibilityPlugin.tsx
|
|
30
30
|
import {
|
|
@@ -337,7 +337,6 @@ for (const key of [
|
|
|
337
337
|
"hideImages",
|
|
338
338
|
"hideVideos",
|
|
339
339
|
"bigCursor",
|
|
340
|
-
"readingMask",
|
|
341
340
|
"readingGuide",
|
|
342
341
|
"highlightFocus",
|
|
343
342
|
"focusHighlight",
|
|
@@ -348,6 +347,18 @@ for (const key of [
|
|
|
348
347
|
validate: (v) => typeof v === "boolean"
|
|
349
348
|
};
|
|
350
349
|
}
|
|
350
|
+
var DEFAULT_READING_MASK_HEIGHT = 100;
|
|
351
|
+
var MIN_READING_MASK_HEIGHT = 40;
|
|
352
|
+
var MAX_READING_MASK_HEIGHT = 400;
|
|
353
|
+
var READING_MASK_HEIGHT_PRESETS = [60, 100, 160, 240];
|
|
354
|
+
builtins.readingMask = {
|
|
355
|
+
defaultValue: false,
|
|
356
|
+
validate: (v) => typeof v === "boolean" || typeof v === "number" && v >= MIN_READING_MASK_HEIGHT && v <= MAX_READING_MASK_HEIGHT
|
|
357
|
+
};
|
|
358
|
+
builtins.readingMaskHeight = {
|
|
359
|
+
defaultValue: DEFAULT_READING_MASK_HEIGHT,
|
|
360
|
+
validate: (v) => typeof v === "number" && v >= MIN_READING_MASK_HEIGHT && v <= MAX_READING_MASK_HEIGHT
|
|
361
|
+
};
|
|
351
362
|
function validValue(key, value, fallback, validate) {
|
|
352
363
|
if (builtins[key]) return builtins[key].validate(value);
|
|
353
364
|
if (validate) {
|
|
@@ -405,6 +416,30 @@ function subscribeReducedMotion(callback) {
|
|
|
405
416
|
};
|
|
406
417
|
}
|
|
407
418
|
}
|
|
419
|
+
function hasFinePointer() {
|
|
420
|
+
if (typeof window === "undefined" || !window.matchMedia) return true;
|
|
421
|
+
try {
|
|
422
|
+
const fine = window.matchMedia("(pointer: fine)");
|
|
423
|
+
if (fine.matches) return true;
|
|
424
|
+
const coarse = window.matchMedia("(pointer: coarse)");
|
|
425
|
+
if (coarse.matches && !fine.matches) return false;
|
|
426
|
+
return true;
|
|
427
|
+
} catch {
|
|
428
|
+
return true;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
function subscribeFinePointer(callback) {
|
|
432
|
+
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
433
|
+
};
|
|
434
|
+
try {
|
|
435
|
+
const mql = window.matchMedia("(pointer: fine)");
|
|
436
|
+
mql.addEventListener("change", callback);
|
|
437
|
+
return () => mql.removeEventListener("change", callback);
|
|
438
|
+
} catch {
|
|
439
|
+
return () => {
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
}
|
|
408
443
|
var CONTRAST_PALETTES = {
|
|
409
444
|
light: {
|
|
410
445
|
text: "#0f172a",
|
|
@@ -818,6 +853,104 @@ function getScriptSpacingConstraints(element) {
|
|
|
818
853
|
script: "standard"
|
|
819
854
|
};
|
|
820
855
|
}
|
|
856
|
+
function isFunctionalOrMeaningfulImage(el) {
|
|
857
|
+
try {
|
|
858
|
+
if (el.closest(
|
|
859
|
+
"a, button, [role='button'], [role='link'], [role='menuitem'], [role='tab'], input, select, textarea, summary"
|
|
860
|
+
)) {
|
|
861
|
+
return true;
|
|
862
|
+
}
|
|
863
|
+
if (el.closest(
|
|
864
|
+
"[id*='captcha' i], [class*='captcha' i], [aria-label*='captcha' i], [data-captcha]"
|
|
865
|
+
) || el.matches(
|
|
866
|
+
"[src*='captcha' i], [alt*='captcha' i], [title*='captcha' i], [id*='captcha' i], [class*='captcha' i]"
|
|
867
|
+
)) {
|
|
868
|
+
return true;
|
|
869
|
+
}
|
|
870
|
+
if (el.closest(
|
|
871
|
+
"[role='graphics-document'], [role='graphics-symbol'], [role='figure'], figure, [class*='chart' i], [id*='chart' i], [class*='graph' i], [id*='graph' i], [class*='diagram' i], [id*='diagram' i]"
|
|
872
|
+
) || el.matches(
|
|
873
|
+
"[role='graphics-document'], [role='graphics-symbol'], [aria-roledescription*='chart' i]"
|
|
874
|
+
)) {
|
|
875
|
+
return true;
|
|
876
|
+
}
|
|
877
|
+
if (el.closest(
|
|
878
|
+
"[role='region'][aria-label*='map' i], [class*='map' i], [id*='map' i], [data-map]"
|
|
879
|
+
) || el.matches(
|
|
880
|
+
"[src*='maps' i], [src*='tiles' i], [src*='openstreetmap' i], [src*='mapbox' i]"
|
|
881
|
+
)) {
|
|
882
|
+
return true;
|
|
883
|
+
}
|
|
884
|
+
if (el.closest(
|
|
885
|
+
"[class*='qr' i], [id*='qr' i], [class*='barcode' i], [id*='barcode' i]"
|
|
886
|
+
) || el.matches(
|
|
887
|
+
"[src*='qr' i], [alt*='qr' i], [src*='barcode' i], [alt*='barcode' i]"
|
|
888
|
+
)) {
|
|
889
|
+
return true;
|
|
890
|
+
}
|
|
891
|
+
if (el.closest("[role='math'], math, [class*='math' i]")) {
|
|
892
|
+
return true;
|
|
893
|
+
}
|
|
894
|
+
if (el.hasAttribute("alt")) {
|
|
895
|
+
const alt = el.getAttribute("alt")?.trim();
|
|
896
|
+
if (alt && alt.length > 0) return true;
|
|
897
|
+
}
|
|
898
|
+
if (el.hasAttribute("aria-label")) {
|
|
899
|
+
const label = el.getAttribute("aria-label")?.trim();
|
|
900
|
+
if (label && label.length > 0) return true;
|
|
901
|
+
}
|
|
902
|
+
if (el.hasAttribute("aria-labelledby")) {
|
|
903
|
+
const labelledby = el.getAttribute("aria-labelledby")?.trim();
|
|
904
|
+
if (labelledby && labelledby.length > 0) return true;
|
|
905
|
+
}
|
|
906
|
+
if (el.hasAttribute("title")) {
|
|
907
|
+
const title = el.getAttribute("title")?.trim();
|
|
908
|
+
if (title && title.length > 0) return true;
|
|
909
|
+
}
|
|
910
|
+
const role = el.getAttribute("role");
|
|
911
|
+
if (role && role !== "presentation" && role !== "none" && role !== "img") {
|
|
912
|
+
return true;
|
|
913
|
+
}
|
|
914
|
+
if (role === "img" && (el.hasAttribute("aria-label") || el.hasAttribute("aria-labelledby") || el.hasAttribute("title") || el.hasAttribute("alt") && el.getAttribute("alt")?.trim() !== "")) {
|
|
915
|
+
return true;
|
|
916
|
+
}
|
|
917
|
+
} catch {
|
|
918
|
+
return false;
|
|
919
|
+
}
|
|
920
|
+
return false;
|
|
921
|
+
}
|
|
922
|
+
function isEligibleDecorativeImage(el) {
|
|
923
|
+
try {
|
|
924
|
+
if (isFunctionalOrMeaningfulImage(el)) {
|
|
925
|
+
return false;
|
|
926
|
+
}
|
|
927
|
+
if (el.matches("img, picture")) {
|
|
928
|
+
if (el.hasAttribute("alt") && el.getAttribute("alt")?.trim() === "") {
|
|
929
|
+
return true;
|
|
930
|
+
}
|
|
931
|
+
const role = el.getAttribute("role");
|
|
932
|
+
if (role === "presentation" || role === "none") {
|
|
933
|
+
return true;
|
|
934
|
+
}
|
|
935
|
+
if (el.getAttribute("aria-hidden") === "true") {
|
|
936
|
+
return true;
|
|
937
|
+
}
|
|
938
|
+
if (el.hasAttribute("data-decorative") || el.classList.contains("decorative") || el.classList.contains("deco")) {
|
|
939
|
+
return true;
|
|
940
|
+
}
|
|
941
|
+
if (el.matches("picture")) {
|
|
942
|
+
const childImg = el.querySelector("img");
|
|
943
|
+
if (childImg && isEligibleDecorativeImage(childImg)) {
|
|
944
|
+
return true;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
return false;
|
|
948
|
+
}
|
|
949
|
+
} catch {
|
|
950
|
+
return false;
|
|
951
|
+
}
|
|
952
|
+
return false;
|
|
953
|
+
}
|
|
821
954
|
function applyPage(values) {
|
|
822
955
|
const undo = [];
|
|
823
956
|
function set(element, property, value) {
|
|
@@ -1125,11 +1258,30 @@ function applyPage(values) {
|
|
|
1125
1258
|
}
|
|
1126
1259
|
});
|
|
1127
1260
|
}
|
|
1261
|
+
const isFinePointer = hasFinePointer();
|
|
1262
|
+
if (values.bigCursor && isFinePointer) {
|
|
1263
|
+
set(document.body, "cursor", cursor);
|
|
1264
|
+
}
|
|
1128
1265
|
for (const el of elements) {
|
|
1129
|
-
if (values.bigCursor) set(el, "cursor", cursor);
|
|
1266
|
+
if (values.bigCursor && isFinePointer) set(el, "cursor", cursor);
|
|
1130
1267
|
if (values.hideImages) {
|
|
1131
|
-
if (el
|
|
1132
|
-
|
|
1268
|
+
if (isEligibleDecorativeImage(el)) {
|
|
1269
|
+
set(el, "visibility", "hidden");
|
|
1270
|
+
}
|
|
1271
|
+
if (!isFunctionalOrMeaningfulImage(el)) {
|
|
1272
|
+
const inlineBg = el.style.backgroundImage;
|
|
1273
|
+
if (inlineBg && inlineBg !== "none") {
|
|
1274
|
+
set(el, "background-image", "none");
|
|
1275
|
+
} else {
|
|
1276
|
+
try {
|
|
1277
|
+
const computedBg = getComputedStyle(el).backgroundImage;
|
|
1278
|
+
if (computedBg && computedBg !== "none") {
|
|
1279
|
+
set(el, "background-image", "none");
|
|
1280
|
+
}
|
|
1281
|
+
} catch {
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1133
1285
|
}
|
|
1134
1286
|
if (values.hideVideos && el.matches(
|
|
1135
1287
|
'video, iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"], iframe[src*="player.vimeo.com/video/"]'
|
|
@@ -1166,7 +1318,20 @@ function applyPage(values) {
|
|
|
1166
1318
|
for (const restore of undo.reverse()) restore();
|
|
1167
1319
|
};
|
|
1168
1320
|
}
|
|
1169
|
-
function
|
|
1321
|
+
function nudgeReadingAid(feature, delta) {
|
|
1322
|
+
if (typeof document !== "undefined") {
|
|
1323
|
+
try {
|
|
1324
|
+
document.dispatchEvent(
|
|
1325
|
+
new CustomEvent("arap:nudge-reading-aid", {
|
|
1326
|
+
detail: { feature, delta }
|
|
1327
|
+
})
|
|
1328
|
+
);
|
|
1329
|
+
} catch {
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
function readingAid(mask, height = 100, onDisable) {
|
|
1334
|
+
const featureKey = mask ? "readingMask" : "readingGuide";
|
|
1170
1335
|
const existing = document.body.querySelectorAll(
|
|
1171
1336
|
mask ? ".arap-reading-mask" : ".arap-reading-guide"
|
|
1172
1337
|
);
|
|
@@ -1175,27 +1340,114 @@ function readingAid(mask) {
|
|
|
1175
1340
|
el.dataset.arapUi = "";
|
|
1176
1341
|
el.className = mask ? "arap-reading-mask" : "arap-reading-guide";
|
|
1177
1342
|
el.setAttribute("aria-hidden", "true");
|
|
1178
|
-
|
|
1343
|
+
const aidHeight = mask ? Math.max(40, Math.min(400, height)) : 4;
|
|
1344
|
+
const halfHeight = mask ? aidHeight / 2 : 0;
|
|
1345
|
+
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"}`;
|
|
1346
|
+
el.style.setProperty("pointer-events", "none", "important");
|
|
1347
|
+
el.style.setProperty("user-select", "none", "important");
|
|
1348
|
+
el.style.setProperty("-webkit-user-select", "none", "important");
|
|
1349
|
+
el.style.setProperty("touch-action", "none", "important");
|
|
1179
1350
|
document.body.appendChild(el);
|
|
1351
|
+
let currentY = typeof window !== "undefined" && window.innerHeight ? window.innerHeight / 2 : 300;
|
|
1352
|
+
let trackedFocusEl = null;
|
|
1353
|
+
const clampY = (y) => {
|
|
1354
|
+
const vh = typeof window !== "undefined" && window.innerHeight ? window.innerHeight : 600;
|
|
1355
|
+
return Math.max(halfHeight, Math.min(vh - halfHeight, y));
|
|
1356
|
+
};
|
|
1180
1357
|
const move = (y) => {
|
|
1181
|
-
|
|
1358
|
+
currentY = clampY(y);
|
|
1359
|
+
el.style.top = `${Math.max(0, currentY - halfHeight)}px`;
|
|
1360
|
+
};
|
|
1361
|
+
move(currentY);
|
|
1362
|
+
const pointer = (event) => {
|
|
1363
|
+
if (typeof event.clientY === "number" && !isNaN(event.clientY)) {
|
|
1364
|
+
trackedFocusEl = null;
|
|
1365
|
+
move(event.clientY);
|
|
1366
|
+
}
|
|
1367
|
+
};
|
|
1368
|
+
const touch = (event) => {
|
|
1369
|
+
if (event.touches && event.touches.length > 0) {
|
|
1370
|
+
trackedFocusEl = null;
|
|
1371
|
+
move(event.touches[0].clientY);
|
|
1372
|
+
}
|
|
1182
1373
|
};
|
|
1183
|
-
const pointer = (event) => move(event.clientY);
|
|
1184
1374
|
const focus = (event) => {
|
|
1185
1375
|
if (event.target instanceof HTMLElement && !event.target.closest("[data-arap-ui]")) {
|
|
1376
|
+
trackedFocusEl = event.target;
|
|
1186
1377
|
const rect = event.target.getBoundingClientRect();
|
|
1187
1378
|
move(rect.top + rect.height / 2);
|
|
1188
1379
|
}
|
|
1189
1380
|
};
|
|
1381
|
+
const scroll = () => {
|
|
1382
|
+
if (trackedFocusEl && document.contains(trackedFocusEl)) {
|
|
1383
|
+
const rect = trackedFocusEl.getBoundingClientRect();
|
|
1384
|
+
move(rect.top + rect.height / 2);
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
const keydown = (event) => {
|
|
1388
|
+
if (event.key === "Escape") {
|
|
1389
|
+
if (document.activeElement && document.activeElement.closest("[data-arap-ui]")) {
|
|
1390
|
+
return;
|
|
1391
|
+
}
|
|
1392
|
+
event.preventDefault();
|
|
1393
|
+
try {
|
|
1394
|
+
document.dispatchEvent(
|
|
1395
|
+
new CustomEvent("arap:disable-feature", { detail: featureKey })
|
|
1396
|
+
);
|
|
1397
|
+
} catch {
|
|
1398
|
+
}
|
|
1399
|
+
onDisable?.(featureKey);
|
|
1400
|
+
el.remove();
|
|
1401
|
+
return;
|
|
1402
|
+
}
|
|
1403
|
+
if (event.altKey && (event.key === "ArrowUp" || event.key === "ArrowDown")) {
|
|
1404
|
+
event.preventDefault();
|
|
1405
|
+
const delta = event.key === "ArrowUp" ? -30 : 30;
|
|
1406
|
+
move(currentY + delta);
|
|
1407
|
+
}
|
|
1408
|
+
};
|
|
1409
|
+
const nudge = (event) => {
|
|
1410
|
+
const custom = event;
|
|
1411
|
+
if (custom.detail && custom.detail.feature === featureKey) {
|
|
1412
|
+
move(currentY + (custom.detail.delta || 0));
|
|
1413
|
+
}
|
|
1414
|
+
};
|
|
1415
|
+
const viewport = () => {
|
|
1416
|
+
move(currentY);
|
|
1417
|
+
};
|
|
1190
1418
|
document.addEventListener("pointermove", pointer, { passive: true });
|
|
1419
|
+
document.addEventListener("mousemove", pointer, { passive: true });
|
|
1420
|
+
document.addEventListener("touchmove", touch, { passive: true });
|
|
1421
|
+
document.addEventListener("touchstart", touch, { passive: true });
|
|
1191
1422
|
document.addEventListener("focusin", focus);
|
|
1423
|
+
document.addEventListener("arap:nudge-reading-aid", nudge);
|
|
1424
|
+
document.addEventListener("keydown", keydown);
|
|
1425
|
+
window.addEventListener("scroll", scroll, { passive: true });
|
|
1426
|
+
window.addEventListener("resize", viewport, { passive: true });
|
|
1427
|
+
window.addEventListener("keydown", keydown);
|
|
1428
|
+
if (typeof window !== "undefined" && window.visualViewport) {
|
|
1429
|
+
window.visualViewport.addEventListener("resize", viewport);
|
|
1430
|
+
window.visualViewport.addEventListener("scroll", viewport);
|
|
1431
|
+
}
|
|
1192
1432
|
return () => {
|
|
1193
1433
|
document.removeEventListener("pointermove", pointer);
|
|
1434
|
+
document.removeEventListener("mousemove", pointer);
|
|
1435
|
+
document.removeEventListener("touchmove", touch);
|
|
1436
|
+
document.removeEventListener("touchstart", touch);
|
|
1194
1437
|
document.removeEventListener("focusin", focus);
|
|
1438
|
+
document.removeEventListener("arap:nudge-reading-aid", nudge);
|
|
1439
|
+
document.removeEventListener("keydown", keydown);
|
|
1440
|
+
window.removeEventListener("scroll", scroll);
|
|
1441
|
+
window.removeEventListener("resize", viewport);
|
|
1442
|
+
window.removeEventListener("keydown", keydown);
|
|
1443
|
+
if (typeof window !== "undefined" && window.visualViewport) {
|
|
1444
|
+
window.visualViewport.removeEventListener("resize", viewport);
|
|
1445
|
+
window.visualViewport.removeEventListener("scroll", viewport);
|
|
1446
|
+
}
|
|
1195
1447
|
el.remove();
|
|
1196
1448
|
};
|
|
1197
1449
|
}
|
|
1198
|
-
function useBuiltinEffects(values) {
|
|
1450
|
+
function useBuiltinEffects(values, onDisable) {
|
|
1199
1451
|
useEffect(() => {
|
|
1200
1452
|
if (!Object.entries(values).some(
|
|
1201
1453
|
([key, value]) => key in builtins && value !== builtins[key].defaultValue
|
|
@@ -1234,14 +1486,15 @@ function useBuiltinEffects(values) {
|
|
|
1234
1486
|
undo();
|
|
1235
1487
|
};
|
|
1236
1488
|
}, [values]);
|
|
1237
|
-
useEffect(
|
|
1238
|
-
(
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1489
|
+
useEffect(() => {
|
|
1490
|
+
if (!values.readingMask) return;
|
|
1491
|
+
const height = typeof values.readingMaskHeight === "number" ? values.readingMaskHeight : typeof values.readingMask === "number" ? values.readingMask : 100;
|
|
1492
|
+
return readingAid(true, height, onDisable);
|
|
1493
|
+
}, [values.readingMask, values.readingMaskHeight, onDisable]);
|
|
1494
|
+
useEffect(() => {
|
|
1495
|
+
if (!values.readingGuide) return;
|
|
1496
|
+
return readingAid(false, 4, onDisable);
|
|
1497
|
+
}, [values.readingGuide, onDisable]);
|
|
1245
1498
|
}
|
|
1246
1499
|
function CustomEffect({
|
|
1247
1500
|
definition,
|
|
@@ -1367,7 +1620,23 @@ function AccessibilityPlugin({
|
|
|
1367
1620
|
),
|
|
1368
1621
|
[definitions, getFeatureState]
|
|
1369
1622
|
);
|
|
1370
|
-
|
|
1623
|
+
const handleDisable = useCallback2(
|
|
1624
|
+
(key) => {
|
|
1625
|
+
setFeatureState(key, builtins[key]?.defaultValue ?? false);
|
|
1626
|
+
},
|
|
1627
|
+
[setFeatureState]
|
|
1628
|
+
);
|
|
1629
|
+
useEffect2(() => {
|
|
1630
|
+
const handler = (event) => {
|
|
1631
|
+
const custom = event;
|
|
1632
|
+
if (custom.detail && (custom.detail in builtins || custom.detail === "readingMask" || custom.detail === "readingGuide")) {
|
|
1633
|
+
handleDisable(custom.detail);
|
|
1634
|
+
}
|
|
1635
|
+
};
|
|
1636
|
+
document.addEventListener("arap:disable-feature", handler);
|
|
1637
|
+
return () => document.removeEventListener("arap:disable-feature", handler);
|
|
1638
|
+
}, [handleDisable]);
|
|
1639
|
+
useBuiltinEffects(active, handleDisable);
|
|
1371
1640
|
const value = useMemo(
|
|
1372
1641
|
() => ({
|
|
1373
1642
|
state: { isOpen, features },
|
|
@@ -3313,22 +3582,24 @@ function FontFamilyController() {
|
|
|
3313
3582
|
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3314
3583
|
var FEATURE_KEY15 = "hideImages";
|
|
3315
3584
|
var DEFAULT_VALUE15 = false;
|
|
3316
|
-
function HideImagesController(
|
|
3585
|
+
function HideImagesController({
|
|
3586
|
+
label = "Hide Images"
|
|
3587
|
+
} = {}) {
|
|
3317
3588
|
const { value, setValue } = useAccessibility(
|
|
3318
3589
|
FEATURE_KEY15,
|
|
3319
3590
|
DEFAULT_VALUE15
|
|
3320
3591
|
);
|
|
3321
|
-
return /* @__PURE__ */ jsxs20("div", { className: "arap-feature", role: "group", "aria-label":
|
|
3592
|
+
return /* @__PURE__ */ jsxs20("div", { className: "arap-feature", role: "group", "aria-label": label, children: [
|
|
3322
3593
|
/* @__PURE__ */ jsxs20("span", { className: "arap-label", children: [
|
|
3323
3594
|
/* @__PURE__ */ jsx22(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
3324
|
-
/* @__PURE__ */ jsx22("span", { children:
|
|
3595
|
+
/* @__PURE__ */ jsx22("span", { children: label })
|
|
3325
3596
|
] }),
|
|
3326
3597
|
/* @__PURE__ */ jsx22(
|
|
3327
3598
|
"button",
|
|
3328
3599
|
{
|
|
3329
3600
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3330
3601
|
onClick: () => setValue(!value),
|
|
3331
|
-
"aria-label":
|
|
3602
|
+
"aria-label": label,
|
|
3332
3603
|
"aria-pressed": value,
|
|
3333
3604
|
type: "button",
|
|
3334
3605
|
children: /* @__PURE__ */ jsx22("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -3336,6 +3607,7 @@ function HideImagesController() {
|
|
|
3336
3607
|
)
|
|
3337
3608
|
] });
|
|
3338
3609
|
}
|
|
3610
|
+
var HideDecorativeImagesController = HideImagesController;
|
|
3339
3611
|
|
|
3340
3612
|
// src/features/HideVideosController.tsx
|
|
3341
3613
|
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
@@ -3366,18 +3638,38 @@ function HideVideosController() {
|
|
|
3366
3638
|
}
|
|
3367
3639
|
|
|
3368
3640
|
// src/features/BigCursorController.tsx
|
|
3641
|
+
import { useEffect as useEffect6, useState as useState6 } from "react";
|
|
3369
3642
|
import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3370
3643
|
var FEATURE_KEY17 = "bigCursor";
|
|
3371
3644
|
var DEFAULT_VALUE17 = false;
|
|
3372
|
-
function BigCursorController(
|
|
3645
|
+
function BigCursorController({
|
|
3646
|
+
showCapabilityHint = true
|
|
3647
|
+
} = {}) {
|
|
3373
3648
|
const { value, setValue } = useAccessibility(
|
|
3374
3649
|
FEATURE_KEY17,
|
|
3375
3650
|
DEFAULT_VALUE17
|
|
3376
3651
|
);
|
|
3652
|
+
const [finePointer, setFinePointer] = useState6(
|
|
3653
|
+
() => hasFinePointer()
|
|
3654
|
+
);
|
|
3655
|
+
useEffect6(() => {
|
|
3656
|
+
return subscribeFinePointer(() => {
|
|
3657
|
+
setFinePointer(hasFinePointer());
|
|
3658
|
+
});
|
|
3659
|
+
}, []);
|
|
3377
3660
|
return /* @__PURE__ */ jsxs22("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
3378
3661
|
/* @__PURE__ */ jsxs22("span", { className: "arap-label", children: [
|
|
3379
3662
|
/* @__PURE__ */ jsx24(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
3380
|
-
/* @__PURE__ */ jsx24("span", { children: "Big Cursor" })
|
|
3663
|
+
/* @__PURE__ */ jsx24("span", { children: "Big Cursor" }),
|
|
3664
|
+
showCapabilityHint && !finePointer && /* @__PURE__ */ jsx24(
|
|
3665
|
+
"span",
|
|
3666
|
+
{
|
|
3667
|
+
className: "arap-badge",
|
|
3668
|
+
style: { fontSize: "0.75rem", opacity: 0.8, marginLeft: "4px" },
|
|
3669
|
+
title: "Custom cursor requires mouse or trackpad pointer hardware",
|
|
3670
|
+
children: "(Mouse)"
|
|
3671
|
+
}
|
|
3672
|
+
)
|
|
3381
3673
|
] }),
|
|
3382
3674
|
/* @__PURE__ */ jsx24(
|
|
3383
3675
|
"button",
|
|
@@ -3396,57 +3688,301 @@ function BigCursorController() {
|
|
|
3396
3688
|
// src/features/ReadingMaskController.tsx
|
|
3397
3689
|
import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3398
3690
|
var FEATURE_KEY18 = "readingMask";
|
|
3691
|
+
var HEIGHT_KEY = "readingMaskHeight";
|
|
3399
3692
|
var DEFAULT_VALUE18 = false;
|
|
3400
|
-
|
|
3693
|
+
var DEFAULT_HEIGHT = 100;
|
|
3694
|
+
var MIN_HEIGHT = 40;
|
|
3695
|
+
var MAX_HEIGHT = 300;
|
|
3696
|
+
var STEP_HEIGHT = 20;
|
|
3697
|
+
function ReadingMaskController({
|
|
3698
|
+
minHeight = MIN_HEIGHT,
|
|
3699
|
+
maxHeight = MAX_HEIGHT,
|
|
3700
|
+
step = STEP_HEIGHT
|
|
3701
|
+
} = {}) {
|
|
3401
3702
|
const { value, setValue } = useAccessibility(
|
|
3402
3703
|
FEATURE_KEY18,
|
|
3403
3704
|
DEFAULT_VALUE18
|
|
3404
3705
|
);
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
)
|
|
3421
|
-
|
|
3706
|
+
const { value: height, setValue: setHeight } = useAccessibility(
|
|
3707
|
+
HEIGHT_KEY,
|
|
3708
|
+
DEFAULT_HEIGHT
|
|
3709
|
+
);
|
|
3710
|
+
const currentHeight = typeof height === "number" ? height : DEFAULT_HEIGHT;
|
|
3711
|
+
const handleDecreaseHeight = () => {
|
|
3712
|
+
setHeight(Math.max(minHeight, currentHeight - step));
|
|
3713
|
+
};
|
|
3714
|
+
const handleIncreaseHeight = () => {
|
|
3715
|
+
setHeight(Math.min(maxHeight, currentHeight + step));
|
|
3716
|
+
};
|
|
3717
|
+
const handleNudgeUp = () => {
|
|
3718
|
+
nudgeReadingAid("readingMask", -30);
|
|
3719
|
+
};
|
|
3720
|
+
const handleNudgeDown = () => {
|
|
3721
|
+
nudgeReadingAid("readingMask", 30);
|
|
3722
|
+
};
|
|
3723
|
+
return /* @__PURE__ */ jsxs23(
|
|
3724
|
+
"div",
|
|
3725
|
+
{
|
|
3726
|
+
className: "arap-feature arap-feature-expandable",
|
|
3727
|
+
role: "group",
|
|
3728
|
+
"aria-label": "Reading Mask",
|
|
3729
|
+
children: [
|
|
3730
|
+
/* @__PURE__ */ jsxs23(
|
|
3731
|
+
"div",
|
|
3732
|
+
{
|
|
3733
|
+
className: "arap-feature-header",
|
|
3734
|
+
style: {
|
|
3735
|
+
display: "flex",
|
|
3736
|
+
alignItems: "center",
|
|
3737
|
+
justifyContent: "space-between",
|
|
3738
|
+
width: "100%"
|
|
3739
|
+
},
|
|
3740
|
+
children: [
|
|
3741
|
+
/* @__PURE__ */ jsxs23("span", { className: "arap-label", children: [
|
|
3742
|
+
/* @__PURE__ */ jsx25(FeatureIcon, { name: FEATURE_KEY18 }),
|
|
3743
|
+
/* @__PURE__ */ jsx25("span", { children: "Reading Mask" })
|
|
3744
|
+
] }),
|
|
3745
|
+
/* @__PURE__ */ jsx25(
|
|
3746
|
+
"button",
|
|
3747
|
+
{
|
|
3748
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3749
|
+
onClick: () => setValue(!value),
|
|
3750
|
+
"aria-label": "Reading Mask",
|
|
3751
|
+
"aria-pressed": value,
|
|
3752
|
+
type: "button",
|
|
3753
|
+
children: /* @__PURE__ */ jsx25("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3754
|
+
}
|
|
3755
|
+
)
|
|
3756
|
+
]
|
|
3757
|
+
}
|
|
3758
|
+
),
|
|
3759
|
+
value && /* @__PURE__ */ jsxs23(
|
|
3760
|
+
"div",
|
|
3761
|
+
{
|
|
3762
|
+
className: "arap-subcontrols",
|
|
3763
|
+
style: {
|
|
3764
|
+
marginTop: "8px",
|
|
3765
|
+
paddingTop: "8px",
|
|
3766
|
+
borderTop: "1px solid var(--arap-divider, #e5e7eb)",
|
|
3767
|
+
display: "flex",
|
|
3768
|
+
flexDirection: "column",
|
|
3769
|
+
gap: "8px",
|
|
3770
|
+
width: "100%"
|
|
3771
|
+
},
|
|
3772
|
+
children: [
|
|
3773
|
+
/* @__PURE__ */ jsxs23(
|
|
3774
|
+
"div",
|
|
3775
|
+
{
|
|
3776
|
+
style: {
|
|
3777
|
+
display: "flex",
|
|
3778
|
+
alignItems: "center",
|
|
3779
|
+
justifyContent: "space-between",
|
|
3780
|
+
width: "100%"
|
|
3781
|
+
},
|
|
3782
|
+
children: [
|
|
3783
|
+
/* @__PURE__ */ jsx25(
|
|
3784
|
+
"span",
|
|
3785
|
+
{
|
|
3786
|
+
style: {
|
|
3787
|
+
fontSize: "0.85rem",
|
|
3788
|
+
color: "var(--arap-muted, #4b5563)"
|
|
3789
|
+
},
|
|
3790
|
+
children: "Window Height"
|
|
3791
|
+
}
|
|
3792
|
+
),
|
|
3793
|
+
/* @__PURE__ */ jsxs23("div", { className: "arap-controls", children: [
|
|
3794
|
+
/* @__PURE__ */ jsx25(
|
|
3795
|
+
"button",
|
|
3796
|
+
{
|
|
3797
|
+
className: "arap-btn-sm",
|
|
3798
|
+
onClick: handleDecreaseHeight,
|
|
3799
|
+
disabled: currentHeight <= minHeight,
|
|
3800
|
+
"aria-label": "Decrease reading mask height",
|
|
3801
|
+
type: "button",
|
|
3802
|
+
children: "\u2212"
|
|
3803
|
+
}
|
|
3804
|
+
),
|
|
3805
|
+
/* @__PURE__ */ jsxs23("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
3806
|
+
currentHeight,
|
|
3807
|
+
"px"
|
|
3808
|
+
] }),
|
|
3809
|
+
/* @__PURE__ */ jsx25(
|
|
3810
|
+
"button",
|
|
3811
|
+
{
|
|
3812
|
+
className: "arap-btn-sm",
|
|
3813
|
+
onClick: handleIncreaseHeight,
|
|
3814
|
+
disabled: currentHeight >= maxHeight,
|
|
3815
|
+
"aria-label": "Increase reading mask height",
|
|
3816
|
+
type: "button",
|
|
3817
|
+
children: "+"
|
|
3818
|
+
}
|
|
3819
|
+
)
|
|
3820
|
+
] })
|
|
3821
|
+
]
|
|
3822
|
+
}
|
|
3823
|
+
),
|
|
3824
|
+
/* @__PURE__ */ jsxs23(
|
|
3825
|
+
"div",
|
|
3826
|
+
{
|
|
3827
|
+
style: {
|
|
3828
|
+
display: "flex",
|
|
3829
|
+
alignItems: "center",
|
|
3830
|
+
justifyContent: "space-between",
|
|
3831
|
+
width: "100%"
|
|
3832
|
+
},
|
|
3833
|
+
children: [
|
|
3834
|
+
/* @__PURE__ */ jsx25(
|
|
3835
|
+
"span",
|
|
3836
|
+
{
|
|
3837
|
+
style: {
|
|
3838
|
+
fontSize: "0.85rem",
|
|
3839
|
+
color: "var(--arap-muted, #4b5563)"
|
|
3840
|
+
},
|
|
3841
|
+
children: "Move Window"
|
|
3842
|
+
}
|
|
3843
|
+
),
|
|
3844
|
+
/* @__PURE__ */ jsxs23("div", { className: "arap-controls", children: [
|
|
3845
|
+
/* @__PURE__ */ jsx25(
|
|
3846
|
+
"button",
|
|
3847
|
+
{
|
|
3848
|
+
className: "arap-btn-sm",
|
|
3849
|
+
onClick: handleNudgeUp,
|
|
3850
|
+
"aria-label": "Move reading mask up",
|
|
3851
|
+
title: "Alt+Up Arrow",
|
|
3852
|
+
type: "button",
|
|
3853
|
+
children: "\u2191"
|
|
3854
|
+
}
|
|
3855
|
+
),
|
|
3856
|
+
/* @__PURE__ */ jsx25(
|
|
3857
|
+
"button",
|
|
3858
|
+
{
|
|
3859
|
+
className: "arap-btn-sm",
|
|
3860
|
+
onClick: handleNudgeDown,
|
|
3861
|
+
"aria-label": "Move reading mask down",
|
|
3862
|
+
title: "Alt+Down Arrow",
|
|
3863
|
+
type: "button",
|
|
3864
|
+
children: "\u2193"
|
|
3865
|
+
}
|
|
3866
|
+
)
|
|
3867
|
+
] })
|
|
3868
|
+
]
|
|
3869
|
+
}
|
|
3870
|
+
)
|
|
3871
|
+
]
|
|
3872
|
+
}
|
|
3873
|
+
)
|
|
3874
|
+
]
|
|
3875
|
+
}
|
|
3876
|
+
);
|
|
3422
3877
|
}
|
|
3423
3878
|
|
|
3424
3879
|
// src/features/ReadingGuideController.tsx
|
|
3425
3880
|
import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3426
3881
|
var FEATURE_KEY19 = "readingGuide";
|
|
3427
3882
|
var DEFAULT_VALUE19 = false;
|
|
3428
|
-
function ReadingGuideController(
|
|
3883
|
+
function ReadingGuideController({
|
|
3884
|
+
nudgeStep = 30
|
|
3885
|
+
} = {}) {
|
|
3429
3886
|
const { value, setValue } = useAccessibility(
|
|
3430
3887
|
FEATURE_KEY19,
|
|
3431
3888
|
DEFAULT_VALUE19
|
|
3432
3889
|
);
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3890
|
+
const handleNudgeUp = () => {
|
|
3891
|
+
nudgeReadingAid("readingGuide", -nudgeStep);
|
|
3892
|
+
};
|
|
3893
|
+
const handleNudgeDown = () => {
|
|
3894
|
+
nudgeReadingAid("readingGuide", nudgeStep);
|
|
3895
|
+
};
|
|
3896
|
+
return /* @__PURE__ */ jsxs24(
|
|
3897
|
+
"div",
|
|
3898
|
+
{
|
|
3899
|
+
className: "arap-feature arap-feature-expandable",
|
|
3900
|
+
role: "group",
|
|
3901
|
+
"aria-label": "Reading Guide",
|
|
3902
|
+
children: [
|
|
3903
|
+
/* @__PURE__ */ jsxs24(
|
|
3904
|
+
"div",
|
|
3905
|
+
{
|
|
3906
|
+
className: "arap-feature-header",
|
|
3907
|
+
style: {
|
|
3908
|
+
display: "flex",
|
|
3909
|
+
alignItems: "center",
|
|
3910
|
+
justifyContent: "space-between",
|
|
3911
|
+
width: "100%"
|
|
3912
|
+
},
|
|
3913
|
+
children: [
|
|
3914
|
+
/* @__PURE__ */ jsxs24("span", { className: "arap-label", children: [
|
|
3915
|
+
/* @__PURE__ */ jsx26(FeatureIcon, { name: FEATURE_KEY19 }),
|
|
3916
|
+
/* @__PURE__ */ jsx26("span", { children: "Reading Guide" })
|
|
3917
|
+
] }),
|
|
3918
|
+
/* @__PURE__ */ jsx26(
|
|
3919
|
+
"button",
|
|
3920
|
+
{
|
|
3921
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3922
|
+
onClick: () => setValue(!value),
|
|
3923
|
+
"aria-label": "Reading Guide",
|
|
3924
|
+
"aria-pressed": value,
|
|
3925
|
+
type: "button",
|
|
3926
|
+
children: /* @__PURE__ */ jsx26("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3927
|
+
}
|
|
3928
|
+
)
|
|
3929
|
+
]
|
|
3930
|
+
}
|
|
3931
|
+
),
|
|
3932
|
+
value && /* @__PURE__ */ jsxs24(
|
|
3933
|
+
"div",
|
|
3934
|
+
{
|
|
3935
|
+
className: "arap-subcontrols",
|
|
3936
|
+
style: {
|
|
3937
|
+
marginTop: "8px",
|
|
3938
|
+
paddingTop: "8px",
|
|
3939
|
+
borderTop: "1px solid var(--arap-divider, #e5e7eb)",
|
|
3940
|
+
display: "flex",
|
|
3941
|
+
alignItems: "center",
|
|
3942
|
+
justifyContent: "space-between",
|
|
3943
|
+
width: "100%"
|
|
3944
|
+
},
|
|
3945
|
+
children: [
|
|
3946
|
+
/* @__PURE__ */ jsx26(
|
|
3947
|
+
"span",
|
|
3948
|
+
{
|
|
3949
|
+
style: {
|
|
3950
|
+
fontSize: "0.85rem",
|
|
3951
|
+
color: "var(--arap-muted, #4b5563)"
|
|
3952
|
+
},
|
|
3953
|
+
children: "Move Guide"
|
|
3954
|
+
}
|
|
3955
|
+
),
|
|
3956
|
+
/* @__PURE__ */ jsxs24("div", { className: "arap-controls", children: [
|
|
3957
|
+
/* @__PURE__ */ jsx26(
|
|
3958
|
+
"button",
|
|
3959
|
+
{
|
|
3960
|
+
className: "arap-btn-sm",
|
|
3961
|
+
onClick: handleNudgeUp,
|
|
3962
|
+
"aria-label": "Move reading guide up",
|
|
3963
|
+
title: "Alt+Up Arrow",
|
|
3964
|
+
type: "button",
|
|
3965
|
+
children: "\u2191"
|
|
3966
|
+
}
|
|
3967
|
+
),
|
|
3968
|
+
/* @__PURE__ */ jsx26(
|
|
3969
|
+
"button",
|
|
3970
|
+
{
|
|
3971
|
+
className: "arap-btn-sm",
|
|
3972
|
+
onClick: handleNudgeDown,
|
|
3973
|
+
"aria-label": "Move reading guide down",
|
|
3974
|
+
title: "Alt+Down Arrow",
|
|
3975
|
+
type: "button",
|
|
3976
|
+
children: "\u2193"
|
|
3977
|
+
}
|
|
3978
|
+
)
|
|
3979
|
+
] })
|
|
3980
|
+
]
|
|
3981
|
+
}
|
|
3982
|
+
)
|
|
3983
|
+
]
|
|
3984
|
+
}
|
|
3985
|
+
);
|
|
3450
3986
|
}
|
|
3451
3987
|
|
|
3452
3988
|
// src/features/HighlightFocusController.tsx
|
|
@@ -4045,6 +4581,7 @@ export {
|
|
|
4045
4581
|
ContrastController,
|
|
4046
4582
|
ContrastModeController,
|
|
4047
4583
|
DEFAULT_PREFERENCES,
|
|
4584
|
+
DEFAULT_READING_MASK_HEIGHT,
|
|
4048
4585
|
DYSLEXIA_FONT_STACK,
|
|
4049
4586
|
EmptyState,
|
|
4050
4587
|
ErrorState,
|
|
@@ -4055,6 +4592,7 @@ export {
|
|
|
4055
4592
|
FontFamilyController,
|
|
4056
4593
|
FontSizeController,
|
|
4057
4594
|
GrayscaleController,
|
|
4595
|
+
HideDecorativeImagesController,
|
|
4058
4596
|
HideImagesController,
|
|
4059
4597
|
HideVideosController,
|
|
4060
4598
|
HighlightFocusController,
|
|
@@ -4065,9 +4603,12 @@ export {
|
|
|
4065
4603
|
LetterSpacingController,
|
|
4066
4604
|
LineHeightController,
|
|
4067
4605
|
LinkHighlightController,
|
|
4606
|
+
MAX_READING_MASK_HEIGHT,
|
|
4607
|
+
MIN_READING_MASK_HEIGHT,
|
|
4068
4608
|
PROFILE_DEFINITIONS,
|
|
4069
4609
|
ParagraphSpacingController,
|
|
4070
4610
|
ProfilePreviewCard,
|
|
4611
|
+
READING_MASK_HEIGHT_PRESETS,
|
|
4071
4612
|
ReadingGuideController,
|
|
4072
4613
|
ReadingMaskController,
|
|
4073
4614
|
ReduceMotionController,
|
|
@@ -4088,7 +4629,10 @@ export {
|
|
|
4088
4629
|
enLocale,
|
|
4089
4630
|
findMainLandmark,
|
|
4090
4631
|
getScriptSpacingConstraints,
|
|
4632
|
+
hasFinePointer,
|
|
4633
|
+
isEligibleDecorativeImage,
|
|
4091
4634
|
isForcedColorsActive,
|
|
4635
|
+
isFunctionalOrMeaningfulImage,
|
|
4092
4636
|
isProtectedFromContrast,
|
|
4093
4637
|
isProtectedFromFontFamily,
|
|
4094
4638
|
isProtectedFromTextAlign,
|
|
@@ -4098,10 +4642,12 @@ export {
|
|
|
4098
4642
|
isRtlLocale,
|
|
4099
4643
|
normalizePreferenceValue,
|
|
4100
4644
|
normalizePreferences,
|
|
4645
|
+
nudgeReadingAid,
|
|
4101
4646
|
preferencesReducer,
|
|
4102
4647
|
registerLocale,
|
|
4103
4648
|
resolveEffectivePreferences,
|
|
4104
4649
|
resolveLocaleStrings,
|
|
4650
|
+
subscribeFinePointer,
|
|
4105
4651
|
subscribeForcedColors,
|
|
4106
4652
|
subscribeReducedMotion,
|
|
4107
4653
|
useAccessibility
|