accessibility-plugin-react 2.7.0 → 2.9.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 +4 -0
- package/dist/index.d.mts +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +648 -354
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +539 -253
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +54 -0
- package/docs/API.md +3 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +2 -2
- package/docs/FEATURES.md +4 -0
- package/docs/LINKS_AND_FOCUS.md +65 -0
- package/docs/REDUCE_MOTION.md +64 -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@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');
|
|
28
28
|
|
|
29
29
|
// src/core/AccessibilityPlugin.tsx
|
|
30
30
|
import {
|
|
@@ -324,6 +324,7 @@ var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
|
324
324
|
validate: oneOf(
|
|
325
325
|
false,
|
|
326
326
|
true,
|
|
327
|
+
"underline",
|
|
327
328
|
"yellow-on-black",
|
|
328
329
|
"blue-on-yellow",
|
|
329
330
|
"black-on-white"
|
|
@@ -337,7 +338,10 @@ for (const key of [
|
|
|
337
338
|
"hideVideos",
|
|
338
339
|
"bigCursor",
|
|
339
340
|
"readingMask",
|
|
340
|
-
"readingGuide"
|
|
341
|
+
"readingGuide",
|
|
342
|
+
"highlightFocus",
|
|
343
|
+
"focusHighlight",
|
|
344
|
+
"reduceMotion"
|
|
341
345
|
]) {
|
|
342
346
|
builtins[key] = {
|
|
343
347
|
defaultValue: false,
|
|
@@ -381,6 +385,26 @@ function subscribeForcedColors(callback) {
|
|
|
381
385
|
};
|
|
382
386
|
}
|
|
383
387
|
}
|
|
388
|
+
function isReducedMotionActive() {
|
|
389
|
+
if (typeof window === "undefined" || !window.matchMedia) return false;
|
|
390
|
+
try {
|
|
391
|
+
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
392
|
+
} catch {
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
function subscribeReducedMotion(callback) {
|
|
397
|
+
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
398
|
+
};
|
|
399
|
+
try {
|
|
400
|
+
const mql = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
401
|
+
mql.addEventListener("change", callback);
|
|
402
|
+
return () => mql.removeEventListener("change", callback);
|
|
403
|
+
} catch {
|
|
404
|
+
return () => {
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
}
|
|
384
408
|
var CONTRAST_PALETTES = {
|
|
385
409
|
light: {
|
|
386
410
|
text: "#0f172a",
|
|
@@ -1002,6 +1026,105 @@ function applyPage(values) {
|
|
|
1002
1026
|
}
|
|
1003
1027
|
}
|
|
1004
1028
|
}
|
|
1029
|
+
if (values.highlightFocus || values.focusHighlight) {
|
|
1030
|
+
const FOCUS_STYLE_ID = "arap-focus-highlight-style";
|
|
1031
|
+
let styleEl = document.getElementById(
|
|
1032
|
+
FOCUS_STYLE_ID
|
|
1033
|
+
);
|
|
1034
|
+
if (!styleEl) {
|
|
1035
|
+
styleEl = document.createElement("style");
|
|
1036
|
+
styleEl.id = FOCUS_STYLE_ID;
|
|
1037
|
+
styleEl.dataset.arapUi = "";
|
|
1038
|
+
styleEl.textContent = `
|
|
1039
|
+
*:not([data-arap-ui]):not([data-arap-ui] *):focus-visible {
|
|
1040
|
+
outline: 3px solid #2563eb !important;
|
|
1041
|
+
outline-offset: 3px !important;
|
|
1042
|
+
box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9) !important;
|
|
1043
|
+
}
|
|
1044
|
+
@media (forced-colors: active) {
|
|
1045
|
+
*:not([data-arap-ui]):not([data-arap-ui] *):focus-visible {
|
|
1046
|
+
outline: 3px solid Highlight !important;
|
|
1047
|
+
outline-offset: 3px !important;
|
|
1048
|
+
box-shadow: none !important;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
*:disabled:focus-visible,
|
|
1052
|
+
*[aria-disabled="true"]:focus-visible {
|
|
1053
|
+
outline: none !important;
|
|
1054
|
+
box-shadow: none !important;
|
|
1055
|
+
}
|
|
1056
|
+
`;
|
|
1057
|
+
document.head.appendChild(styleEl);
|
|
1058
|
+
undo.push(() => {
|
|
1059
|
+
styleEl?.remove();
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
if (values.reduceMotion) {
|
|
1064
|
+
const MOTION_STYLE_ID = "arap-reduce-motion-style";
|
|
1065
|
+
let styleEl = document.getElementById(
|
|
1066
|
+
MOTION_STYLE_ID
|
|
1067
|
+
);
|
|
1068
|
+
if (!styleEl) {
|
|
1069
|
+
styleEl = document.createElement("style");
|
|
1070
|
+
styleEl.id = MOTION_STYLE_ID;
|
|
1071
|
+
styleEl.dataset.arapUi = "";
|
|
1072
|
+
styleEl.textContent = `
|
|
1073
|
+
*:not([data-arap-ui]):not([data-arap-ui] *),
|
|
1074
|
+
*:not([data-arap-ui]):not([data-arap-ui] *)::before,
|
|
1075
|
+
*:not([data-arap-ui]):not([data-arap-ui] *)::after {
|
|
1076
|
+
animation-duration: 0.001ms !important;
|
|
1077
|
+
animation-iteration-count: 1 !important;
|
|
1078
|
+
transition-duration: 0.001ms !important;
|
|
1079
|
+
scroll-behavior: auto !important;
|
|
1080
|
+
}
|
|
1081
|
+
`;
|
|
1082
|
+
document.head.appendChild(styleEl);
|
|
1083
|
+
undo.push(() => {
|
|
1084
|
+
styleEl?.remove();
|
|
1085
|
+
});
|
|
1086
|
+
}
|
|
1087
|
+
const trackedAnimations = /* @__PURE__ */ new Set();
|
|
1088
|
+
if (typeof document !== "undefined" && typeof document.getAnimations === "function") {
|
|
1089
|
+
try {
|
|
1090
|
+
const animations = document.getAnimations();
|
|
1091
|
+
for (const anim of animations) {
|
|
1092
|
+
const target = anim.effect?.target;
|
|
1093
|
+
if (target instanceof Element && target.closest("[data-arap-ui]")) {
|
|
1094
|
+
continue;
|
|
1095
|
+
}
|
|
1096
|
+
if (anim.playState === "running") {
|
|
1097
|
+
anim.pause();
|
|
1098
|
+
trackedAnimations.add(anim);
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
} catch {
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
if (typeof document !== "undefined") {
|
|
1105
|
+
const mediaList = Array.from(
|
|
1106
|
+
document.querySelectorAll("video, audio")
|
|
1107
|
+
).filter((media) => !media.closest("[data-arap-ui]"));
|
|
1108
|
+
for (const media of mediaList) {
|
|
1109
|
+
if (!media.paused) {
|
|
1110
|
+
try {
|
|
1111
|
+
media.pause();
|
|
1112
|
+
} catch {
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
undo.push(() => {
|
|
1118
|
+
for (const anim of trackedAnimations) {
|
|
1119
|
+
if (anim.playState === "paused") {
|
|
1120
|
+
try {
|
|
1121
|
+
anim.play();
|
|
1122
|
+
} catch {
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1005
1128
|
for (const el of elements) {
|
|
1006
1129
|
if (values.bigCursor) set(el, "cursor", cursor);
|
|
1007
1130
|
if (values.hideImages) {
|
|
@@ -1017,14 +1140,26 @@ function applyPage(values) {
|
|
|
1017
1140
|
set(el, "color", colors[0]);
|
|
1018
1141
|
set(el, "background-color", colors[1]);
|
|
1019
1142
|
}
|
|
1020
|
-
if (values.linkHighlight && el.matches("a[href]")) {
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1143
|
+
if (values.linkHighlight && el.matches("a[href]") && !el.closest("[data-arap-ui]")) {
|
|
1144
|
+
const isDisabled = el.getAttribute("aria-disabled") === "true" || el.hasAttribute("disabled") || el.classList.contains("disabled");
|
|
1145
|
+
if (!isDisabled) {
|
|
1146
|
+
if (isForcedColorsActive()) {
|
|
1147
|
+
set(el, "color", "LinkText");
|
|
1148
|
+
set(el, "text-decoration", "underline");
|
|
1149
|
+
set(el, "text-decoration-thickness", "2px");
|
|
1150
|
+
set(el, "text-underline-offset", "3px");
|
|
1151
|
+
} else {
|
|
1152
|
+
const colors2 = palette[String(values.linkHighlight)] ?? [
|
|
1153
|
+
"#111827",
|
|
1154
|
+
"#fef08a"
|
|
1155
|
+
];
|
|
1156
|
+
set(el, "color", colors2[0]);
|
|
1157
|
+
set(el, "background-color", colors2[1]);
|
|
1158
|
+
set(el, "text-decoration", "underline");
|
|
1159
|
+
set(el, "text-decoration-thickness", "2px");
|
|
1160
|
+
set(el, "text-underline-offset", "3px");
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1028
1163
|
}
|
|
1029
1164
|
}
|
|
1030
1165
|
return () => {
|
|
@@ -1287,7 +1422,7 @@ function AccessibilityPlugin({
|
|
|
1287
1422
|
}
|
|
1288
1423
|
|
|
1289
1424
|
// src/core/AccessibilityButton.tsx
|
|
1290
|
-
import { useContext, useRef as useRef2, useState as useState2 } from "react";
|
|
1425
|
+
import { useContext as useContext2, useRef as useRef2, useState as useState2 } from "react";
|
|
1291
1426
|
|
|
1292
1427
|
// src/core/WidgetPortal.tsx
|
|
1293
1428
|
import { useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
@@ -1309,12 +1444,16 @@ function WidgetPortal({ children }) {
|
|
|
1309
1444
|
) : null;
|
|
1310
1445
|
}
|
|
1311
1446
|
|
|
1447
|
+
// src/core/SkipToMainLink.tsx
|
|
1448
|
+
import { useContext, useSyncExternalStore as useSyncExternalStore4 } from "react";
|
|
1449
|
+
|
|
1312
1450
|
// src/core/i18n/en.ts
|
|
1313
1451
|
var enLocale = Object.freeze({
|
|
1314
1452
|
title: "Accessibility settings",
|
|
1315
1453
|
description: "Adjust your reading experience",
|
|
1316
1454
|
closeLabel: "Close accessibility settings",
|
|
1317
1455
|
skipToActions: "Jump to quick actions",
|
|
1456
|
+
skipToMain: "Skip to main content",
|
|
1318
1457
|
toolsLabel: "Accessibility tools",
|
|
1319
1458
|
quickActionsLabel: "Quick actions",
|
|
1320
1459
|
resetLabel: "Reset all accessibility settings",
|
|
@@ -1380,8 +1519,69 @@ function resolveLocaleStrings(localeProp) {
|
|
|
1380
1519
|
return enLocale;
|
|
1381
1520
|
}
|
|
1382
1521
|
|
|
1522
|
+
// src/core/SkipToMainLink.tsx
|
|
1523
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1524
|
+
function findMainLandmark() {
|
|
1525
|
+
if (typeof document === "undefined") return null;
|
|
1526
|
+
const main = document.querySelector("main, [role='main']");
|
|
1527
|
+
return main instanceof HTMLElement ? main : null;
|
|
1528
|
+
}
|
|
1529
|
+
function subscribeLandmark(callback) {
|
|
1530
|
+
if (typeof MutationObserver === "undefined" || typeof document === "undefined" || !document.body) {
|
|
1531
|
+
return () => {
|
|
1532
|
+
};
|
|
1533
|
+
}
|
|
1534
|
+
const observer = new MutationObserver(callback);
|
|
1535
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
1536
|
+
return () => observer.disconnect();
|
|
1537
|
+
}
|
|
1538
|
+
function getMainTargetId() {
|
|
1539
|
+
if (typeof document === "undefined") return null;
|
|
1540
|
+
const main = findMainLandmark();
|
|
1541
|
+
if (main) {
|
|
1542
|
+
if (!main.id) {
|
|
1543
|
+
main.id = "arap-main-content";
|
|
1544
|
+
}
|
|
1545
|
+
if (!main.hasAttribute("tabindex")) {
|
|
1546
|
+
main.setAttribute("tabindex", "-1");
|
|
1547
|
+
}
|
|
1548
|
+
return main.id;
|
|
1549
|
+
}
|
|
1550
|
+
return null;
|
|
1551
|
+
}
|
|
1552
|
+
function SkipToMainLink({ className = "", label }) {
|
|
1553
|
+
const ctx = useContext(AccessibilityContext);
|
|
1554
|
+
const strings = resolveLocaleStrings(ctx?.locale);
|
|
1555
|
+
const text = label ?? strings.skipToMain ?? "Skip to main content";
|
|
1556
|
+
const targetId = useSyncExternalStore4(
|
|
1557
|
+
subscribeLandmark,
|
|
1558
|
+
getMainTargetId,
|
|
1559
|
+
() => null
|
|
1560
|
+
);
|
|
1561
|
+
if (!targetId) return null;
|
|
1562
|
+
return /* @__PURE__ */ jsx3(
|
|
1563
|
+
"a",
|
|
1564
|
+
{
|
|
1565
|
+
href: `#${targetId}`,
|
|
1566
|
+
className: `arap-skip-to-main ${className}`,
|
|
1567
|
+
onClick: (e) => {
|
|
1568
|
+
const main = document.getElementById(targetId);
|
|
1569
|
+
if (main) {
|
|
1570
|
+
e.preventDefault();
|
|
1571
|
+
if (!main.hasAttribute("tabindex")) {
|
|
1572
|
+
main.setAttribute("tabindex", "-1");
|
|
1573
|
+
}
|
|
1574
|
+
main.focus();
|
|
1575
|
+
main.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
1576
|
+
}
|
|
1577
|
+
},
|
|
1578
|
+
children: text
|
|
1579
|
+
}
|
|
1580
|
+
);
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1383
1583
|
// src/core/AccessibilityButton.tsx
|
|
1384
|
-
import { jsx as
|
|
1584
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1385
1585
|
function AccessibilityButton({
|
|
1386
1586
|
icon,
|
|
1387
1587
|
draggable = true,
|
|
@@ -1391,7 +1591,7 @@ function AccessibilityButton({
|
|
|
1391
1591
|
style,
|
|
1392
1592
|
largeControls
|
|
1393
1593
|
}) {
|
|
1394
|
-
const ctx =
|
|
1594
|
+
const ctx = useContext2(AccessibilityContext);
|
|
1395
1595
|
if (!ctx)
|
|
1396
1596
|
throw new Error(
|
|
1397
1597
|
"AccessibilityButton must be used within an <AccessibilityPlugin> provider."
|
|
@@ -1407,6 +1607,7 @@ function AccessibilityButton({
|
|
|
1407
1607
|
const placement = preview ?? ctx.widgetPlacement;
|
|
1408
1608
|
const corner = placement?.kind === "corner" ? placement.corner : defaultCorner(ctx.position);
|
|
1409
1609
|
return /* @__PURE__ */ jsxs2(WidgetPortal, { children: [
|
|
1610
|
+
/* @__PURE__ */ jsx4(SkipToMainLink, {}),
|
|
1410
1611
|
/* @__PURE__ */ jsxs2(
|
|
1411
1612
|
"button",
|
|
1412
1613
|
{
|
|
@@ -1505,7 +1706,7 @@ function AccessibilityButton({
|
|
|
1505
1706
|
"aria-expanded": ctx.isOpen,
|
|
1506
1707
|
"aria-controls": ctx.panelId,
|
|
1507
1708
|
children: [
|
|
1508
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ jsx4("span", { "aria-hidden": "true", children: icon ?? /* @__PURE__ */ jsxs2(
|
|
1509
1710
|
"svg",
|
|
1510
1711
|
{
|
|
1511
1712
|
width: "28",
|
|
@@ -1515,8 +1716,8 @@ function AccessibilityButton({
|
|
|
1515
1716
|
stroke: "currentColor",
|
|
1516
1717
|
strokeWidth: "2",
|
|
1517
1718
|
children: [
|
|
1518
|
-
/* @__PURE__ */
|
|
1519
|
-
/* @__PURE__ */
|
|
1719
|
+
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "4", r: "2" }),
|
|
1720
|
+
/* @__PURE__ */ jsx4("path", { d: "M4 9l8 2 8-2M12 11v5m0 0-5 6m5-6 5 6" })
|
|
1520
1721
|
]
|
|
1521
1722
|
}
|
|
1522
1723
|
) }),
|
|
@@ -1527,7 +1728,7 @@ function AccessibilityButton({
|
|
|
1527
1728
|
]
|
|
1528
1729
|
}
|
|
1529
1730
|
),
|
|
1530
|
-
/* @__PURE__ */
|
|
1731
|
+
/* @__PURE__ */ jsx4("span", { className: "arap-sr-only", role: "status", children: ctx.widgetPlacement?.kind === "point" ? strings.formatPointPosition ? strings.formatPointPosition(
|
|
1531
1732
|
ctx.widgetPlacement.x,
|
|
1532
1733
|
ctx.widgetPlacement.y
|
|
1533
1734
|
) : `Button position: ${Math.round(ctx.widgetPlacement.x * 100)}% horizontally, ${Math.round(ctx.widgetPlacement.y * 100)}% vertically.` : strings.formatCornerPosition ? strings.formatCornerPosition(corner) : `Button position: ${corner.split("-").join(" ")}.` })
|
|
@@ -1535,17 +1736,17 @@ function AccessibilityButton({
|
|
|
1535
1736
|
}
|
|
1536
1737
|
|
|
1537
1738
|
// src/core/AccessibilityList.tsx
|
|
1538
|
-
import { useContext as
|
|
1739
|
+
import { useContext as useContext4, useEffect as useEffect4, useRef as useRef4, useState as useState4 } from "react";
|
|
1539
1740
|
|
|
1540
1741
|
// src/core/PanelActionsContext.ts
|
|
1541
1742
|
import { createContext as createContext2 } from "react";
|
|
1542
1743
|
var PanelActionsContext = createContext2(null);
|
|
1543
1744
|
|
|
1544
1745
|
// src/core/PositionControls.tsx
|
|
1545
|
-
import { useContext as
|
|
1546
|
-
import { jsx as
|
|
1746
|
+
import { useContext as useContext3, useEffect as useEffect3, useRef as useRef3, useState as useState3 } from "react";
|
|
1747
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1547
1748
|
function PositionControls() {
|
|
1548
|
-
const ctx =
|
|
1749
|
+
const ctx = useContext3(AccessibilityContext);
|
|
1549
1750
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
1550
1751
|
const [open, setOpen] = useState3(false);
|
|
1551
1752
|
const select = useRef3(null);
|
|
@@ -1566,7 +1767,7 @@ function PositionControls() {
|
|
|
1566
1767
|
);
|
|
1567
1768
|
};
|
|
1568
1769
|
return /* @__PURE__ */ jsxs3("div", { className: "arap-position-tools", children: [
|
|
1569
|
-
/* @__PURE__ */
|
|
1770
|
+
/* @__PURE__ */ jsx5(
|
|
1570
1771
|
"button",
|
|
1571
1772
|
{
|
|
1572
1773
|
ref: opener,
|
|
@@ -1596,7 +1797,7 @@ function PositionControls() {
|
|
|
1596
1797
|
}
|
|
1597
1798
|
},
|
|
1598
1799
|
children: [
|
|
1599
|
-
/* @__PURE__ */
|
|
1800
|
+
/* @__PURE__ */ jsx5(
|
|
1600
1801
|
"label",
|
|
1601
1802
|
{
|
|
1602
1803
|
className: "arap-position-label",
|
|
@@ -1616,17 +1817,17 @@ function PositionControls() {
|
|
|
1616
1817
|
corner: event.target.value
|
|
1617
1818
|
}),
|
|
1618
1819
|
children: [
|
|
1619
|
-
/* @__PURE__ */
|
|
1620
|
-
corners.map((corner) => /* @__PURE__ */
|
|
1820
|
+
/* @__PURE__ */ jsx5("option", { value: "custom", disabled: true, children: strings.customPosition }),
|
|
1821
|
+
corners.map((corner) => /* @__PURE__ */ jsx5("option", { value: corner, children: corner.split("-").join(" ") }, corner))
|
|
1621
1822
|
]
|
|
1622
1823
|
}
|
|
1623
1824
|
),
|
|
1624
|
-
/* @__PURE__ */
|
|
1825
|
+
/* @__PURE__ */ jsx5("div", { className: "arap-position-arrows", children: [
|
|
1625
1826
|
["left", -20, 0, "\u2190", strings.moveLeft],
|
|
1626
1827
|
["up", 0, -20, "\u2191", strings.moveUp],
|
|
1627
1828
|
["down", 0, 20, "\u2193", strings.moveDown],
|
|
1628
1829
|
["right", 20, 0, "\u2192", strings.moveRight]
|
|
1629
|
-
].map(([direction, dx, dy, arrowChar, label]) => /* @__PURE__ */
|
|
1830
|
+
].map(([direction, dx, dy, arrowChar, label]) => /* @__PURE__ */ jsx5(
|
|
1630
1831
|
"button",
|
|
1631
1832
|
{
|
|
1632
1833
|
type: "button",
|
|
@@ -1639,7 +1840,7 @@ function PositionControls() {
|
|
|
1639
1840
|
},
|
|
1640
1841
|
direction
|
|
1641
1842
|
)) }),
|
|
1642
|
-
/* @__PURE__ */
|
|
1843
|
+
/* @__PURE__ */ jsx5(
|
|
1643
1844
|
"button",
|
|
1644
1845
|
{
|
|
1645
1846
|
className: "arap-position-default",
|
|
@@ -1651,7 +1852,7 @@ function PositionControls() {
|
|
|
1651
1852
|
children: strings.resetPosition
|
|
1652
1853
|
}
|
|
1653
1854
|
),
|
|
1654
|
-
/* @__PURE__ */
|
|
1855
|
+
/* @__PURE__ */ jsx5("button", { className: "arap-position-default", type: "button", onClick: close, children: strings.doneMoving })
|
|
1655
1856
|
]
|
|
1656
1857
|
}
|
|
1657
1858
|
)
|
|
@@ -1659,7 +1860,7 @@ function PositionControls() {
|
|
|
1659
1860
|
}
|
|
1660
1861
|
|
|
1661
1862
|
// src/core/AccessibilityList.tsx
|
|
1662
|
-
import { jsx as
|
|
1863
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1663
1864
|
function Panel({
|
|
1664
1865
|
children,
|
|
1665
1866
|
footer,
|
|
@@ -1672,7 +1873,7 @@ function Panel({
|
|
|
1672
1873
|
largeControls,
|
|
1673
1874
|
locale
|
|
1674
1875
|
}) {
|
|
1675
|
-
const ctx =
|
|
1876
|
+
const ctx = useContext4(AccessibilityContext);
|
|
1676
1877
|
const effectiveLocale = locale ?? ctx.locale;
|
|
1677
1878
|
const strings = resolveLocaleStrings(effectiveLocale);
|
|
1678
1879
|
const panelTitle = title ?? strings.title;
|
|
@@ -1732,10 +1933,10 @@ function Panel({
|
|
|
1732
1933
|
children: [
|
|
1733
1934
|
/* @__PURE__ */ jsxs4("div", { className: "arap-heading", children: [
|
|
1734
1935
|
/* @__PURE__ */ jsxs4("div", { className: "arap-heading-copy", children: [
|
|
1735
|
-
/* @__PURE__ */
|
|
1736
|
-
panelDescription && /* @__PURE__ */
|
|
1936
|
+
/* @__PURE__ */ jsx6("h2", { children: panelTitle }),
|
|
1937
|
+
panelDescription && /* @__PURE__ */ jsx6("p", { id: `${ctx.panelId}-description`, className: "arap-description", children: panelDescription })
|
|
1737
1938
|
] }),
|
|
1738
|
-
/* @__PURE__ */
|
|
1939
|
+
/* @__PURE__ */ jsx6(
|
|
1739
1940
|
"button",
|
|
1740
1941
|
{
|
|
1741
1942
|
type: "button",
|
|
@@ -1745,7 +1946,7 @@ function Panel({
|
|
|
1745
1946
|
}
|
|
1746
1947
|
)
|
|
1747
1948
|
] }),
|
|
1748
|
-
/* @__PURE__ */
|
|
1949
|
+
/* @__PURE__ */ jsx6(
|
|
1749
1950
|
"button",
|
|
1750
1951
|
{
|
|
1751
1952
|
type: "button",
|
|
@@ -1759,7 +1960,7 @@ function Panel({
|
|
|
1759
1960
|
children: strings.skipToActions
|
|
1760
1961
|
}
|
|
1761
1962
|
),
|
|
1762
|
-
/* @__PURE__ */
|
|
1963
|
+
/* @__PURE__ */ jsx6(PanelActionsContext.Provider, { value: actions, children: /* @__PURE__ */ jsx6(
|
|
1763
1964
|
"div",
|
|
1764
1965
|
{
|
|
1765
1966
|
className: "arap-tools",
|
|
@@ -1776,12 +1977,12 @@ function Panel({
|
|
|
1776
1977
|
role: "group",
|
|
1777
1978
|
"aria-label": strings.quickActionsLabel,
|
|
1778
1979
|
children: [
|
|
1779
|
-
/* @__PURE__ */
|
|
1780
|
-
/* @__PURE__ */
|
|
1980
|
+
/* @__PURE__ */ jsx6(PositionControls, {}, ctx.isOpen ? "open" : "closed"),
|
|
1981
|
+
/* @__PURE__ */ jsx6("div", { className: "arap-actions", ref: setActions, children: footer })
|
|
1781
1982
|
]
|
|
1782
1983
|
}
|
|
1783
1984
|
),
|
|
1784
|
-
effectiveStatementUrl && /* @__PURE__ */
|
|
1985
|
+
effectiveStatementUrl && /* @__PURE__ */ jsx6("div", { className: "arap-statement", children: /* @__PURE__ */ jsxs4(
|
|
1785
1986
|
"a",
|
|
1786
1987
|
{
|
|
1787
1988
|
href: effectiveStatementUrl,
|
|
@@ -1841,18 +2042,18 @@ function Panel({
|
|
|
1841
2042
|
);
|
|
1842
2043
|
}
|
|
1843
2044
|
function AccessibilityList(props) {
|
|
1844
|
-
const ctx =
|
|
2045
|
+
const ctx = useContext4(AccessibilityContext);
|
|
1845
2046
|
if (!ctx)
|
|
1846
2047
|
throw new Error(
|
|
1847
2048
|
"AccessibilityList must be used within an <AccessibilityPlugin> provider."
|
|
1848
2049
|
);
|
|
1849
|
-
return /* @__PURE__ */
|
|
2050
|
+
return /* @__PURE__ */ jsx6(WidgetPortal, { children: /* @__PURE__ */ jsx6(Panel, { ...props }) });
|
|
1850
2051
|
}
|
|
1851
2052
|
|
|
1852
2053
|
// src/core/useAccessibility.ts
|
|
1853
|
-
import { useCallback as useCallback3, useContext as
|
|
2054
|
+
import { useCallback as useCallback3, useContext as useContext5, useEffect as useEffect5, useState as useState5 } from "react";
|
|
1854
2055
|
function useAccessibility(featureKey, defaultValue, options) {
|
|
1855
|
-
const ctx =
|
|
2056
|
+
const ctx = useContext5(AccessibilityContext);
|
|
1856
2057
|
if (!ctx)
|
|
1857
2058
|
throw new Error(
|
|
1858
2059
|
"useAccessibility must be used within an <AccessibilityPlugin> provider."
|
|
@@ -2186,60 +2387,73 @@ function preferencesReducer(state, action) {
|
|
|
2186
2387
|
}
|
|
2187
2388
|
|
|
2188
2389
|
// src/core/FeatureIcon.tsx
|
|
2189
|
-
import { Fragment, jsx as
|
|
2390
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2190
2391
|
var drawings = {
|
|
2191
|
-
fontSize: /* @__PURE__ */
|
|
2192
|
-
lineHeight: /* @__PURE__ */
|
|
2193
|
-
letterSpacing: /* @__PURE__ */
|
|
2194
|
-
wordSpacing: /* @__PURE__ */
|
|
2195
|
-
paragraphSpacing: /* @__PURE__ */
|
|
2392
|
+
fontSize: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M3 18 8 5l5 13M5 13h6M15 18l3-8 3 8M16 15h4" }) }),
|
|
2393
|
+
lineHeight: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M9 6h12M9 12h9M9 18h12M4 4v16m-2-2 2 2 2-2M2 6l2-2 2 2" }) }),
|
|
2394
|
+
letterSpacing: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M3 13 7 3l4 10M4.5 9h5M14 13l4-10 4 10m-6.5-4h5M3 19h18m-3-2 3 2-3 2M6 17l-3 2 3 2" }) }),
|
|
2395
|
+
wordSpacing: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M4 6v12M20 6v12M9 12h6m-2-3 3 3-3 3m-4-3-3-3 3 3" }) }),
|
|
2396
|
+
paragraphSpacing: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M4 5h16M4 9h12M4 19h16M4 15h12M18 10v4m-2-2 2-2 2 2m-4 2 2 2 2-2" }) }),
|
|
2196
2397
|
contrast: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2398
|
+
/* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "9" }),
|
|
2399
|
+
/* @__PURE__ */ jsx7("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
2199
2400
|
] }),
|
|
2200
2401
|
contrastMode: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2201
|
-
/* @__PURE__ */
|
|
2202
|
-
/* @__PURE__ */
|
|
2402
|
+
/* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "9" }),
|
|
2403
|
+
/* @__PURE__ */ jsx7("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
2203
2404
|
] }),
|
|
2204
2405
|
saturation: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2205
|
-
/* @__PURE__ */
|
|
2206
|
-
/* @__PURE__ */
|
|
2406
|
+
/* @__PURE__ */ jsx7("path", { d: "M12 3c-2 4-7 8-7 12a7 7 0 0 0 14 0c0-4-5-8-7-12Z" }),
|
|
2407
|
+
/* @__PURE__ */ jsx7("path", { d: "M8 15a4 4 0 0 0 4 4" })
|
|
2207
2408
|
] }),
|
|
2208
2409
|
invertColors: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2209
|
-
/* @__PURE__ */
|
|
2210
|
-
/* @__PURE__ */
|
|
2410
|
+
/* @__PURE__ */ jsx7("path", { d: "M12 3c-2 4-7 8-7 12a7 7 0 0 0 14 0c0-4-5-8-7-12Z" }),
|
|
2411
|
+
/* @__PURE__ */ jsx7("path", { d: "M12 3v19" })
|
|
2211
2412
|
] }),
|
|
2212
2413
|
grayscale: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2213
|
-
/* @__PURE__ */
|
|
2214
|
-
/* @__PURE__ */
|
|
2215
|
-
/* @__PURE__ */
|
|
2414
|
+
/* @__PURE__ */ jsx7("circle", { cx: "8", cy: "12", r: "5" }),
|
|
2415
|
+
/* @__PURE__ */ jsx7("circle", { cx: "16", cy: "12", r: "5" }),
|
|
2416
|
+
/* @__PURE__ */ jsx7("path", { d: "M8 7v10M16 7v10" })
|
|
2417
|
+
] }),
|
|
2418
|
+
linkHighlight: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "m10 14 4-4M8 16l-1 1a4 4 0 0 1-6-6l4-4a4 4 0 0 1 6 0M16 8l1-1a4 4 0 0 1 6 6l-4 4a4 4 0 0 1-6 0" }) }),
|
|
2419
|
+
highlightFocus: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2420
|
+
/* @__PURE__ */ jsx7("path", { d: "M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4" }),
|
|
2421
|
+
/* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "3" })
|
|
2422
|
+
] }),
|
|
2423
|
+
focusHighlight: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2424
|
+
/* @__PURE__ */ jsx7("path", { d: "M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4" }),
|
|
2425
|
+
/* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "3" })
|
|
2426
|
+
] }),
|
|
2427
|
+
reduceMotion: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2428
|
+
/* @__PURE__ */ jsx7("path", { d: "M3 8h4M3 12h6M3 16h4" }),
|
|
2429
|
+
/* @__PURE__ */ jsx7("rect", { x: "14", y: "6", width: "2", height: "12", rx: "1" }),
|
|
2430
|
+
/* @__PURE__ */ jsx7("rect", { x: "18", y: "6", width: "2", height: "12", rx: "1" })
|
|
2216
2431
|
] }),
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
fontFamily: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) }),
|
|
2432
|
+
textAlign: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M3 5h18M3 10h12M3 15h18M3 20h12" }) }),
|
|
2433
|
+
fontFamily: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) }),
|
|
2220
2434
|
hideImages: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
/* @__PURE__ */
|
|
2435
|
+
/* @__PURE__ */ jsx7("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
2436
|
+
/* @__PURE__ */ jsx7("circle", { cx: "8", cy: "9", r: "1" }),
|
|
2437
|
+
/* @__PURE__ */ jsx7("path", { d: "m3 17 5-5 4 4 3-3 6 5M2 2l20 20" })
|
|
2224
2438
|
] }),
|
|
2225
2439
|
hideVideos: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2226
|
-
/* @__PURE__ */
|
|
2227
|
-
/* @__PURE__ */
|
|
2440
|
+
/* @__PURE__ */ jsx7("rect", { x: "3", y: "5", width: "13", height: "14", rx: "2" }),
|
|
2441
|
+
/* @__PURE__ */ jsx7("path", { d: "m16 10 5-3v10l-5-3M2 2l20 20" })
|
|
2228
2442
|
] }),
|
|
2229
|
-
bigCursor: /* @__PURE__ */
|
|
2443
|
+
bigCursor: /* @__PURE__ */ jsx7("path", { d: "m5 3 14 11-7 1-3 6Z" }),
|
|
2230
2444
|
readingMask: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2231
|
-
/* @__PURE__ */
|
|
2232
|
-
/* @__PURE__ */
|
|
2233
|
-
/* @__PURE__ */
|
|
2445
|
+
/* @__PURE__ */ jsx7("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
2446
|
+
/* @__PURE__ */ jsx7("path", { d: "M3 9h18M3 15h18" }),
|
|
2447
|
+
/* @__PURE__ */ jsx7("path", { d: "M6 12h12" })
|
|
2234
2448
|
] }),
|
|
2235
2449
|
readingGuide: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2236
|
-
/* @__PURE__ */
|
|
2237
|
-
/* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ jsx7("path", { d: "M3 5h18M3 10h12M3 19h18" }),
|
|
2451
|
+
/* @__PURE__ */ jsx7("path", { d: "M2 15h20", strokeWidth: "3" })
|
|
2238
2452
|
] }),
|
|
2239
|
-
reset: /* @__PURE__ */
|
|
2453
|
+
reset: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M3 10a9 9 0 1 1 1 7M3 4v6h6" }) })
|
|
2240
2454
|
};
|
|
2241
2455
|
function FeatureIcon({ name }) {
|
|
2242
|
-
return /* @__PURE__ */
|
|
2456
|
+
return /* @__PURE__ */ jsx7(
|
|
2243
2457
|
"svg",
|
|
2244
2458
|
{
|
|
2245
2459
|
className: "arap-icon",
|
|
@@ -2257,7 +2471,7 @@ function FeatureIcon({ name }) {
|
|
|
2257
2471
|
}
|
|
2258
2472
|
|
|
2259
2473
|
// src/features/FontSizeController.tsx
|
|
2260
|
-
import { jsx as
|
|
2474
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2261
2475
|
var FEATURE_KEY = "fontSize";
|
|
2262
2476
|
var DEFAULT_VALUE = 100;
|
|
2263
2477
|
var MIN = 50;
|
|
@@ -2309,11 +2523,11 @@ function FontSizeController({
|
|
|
2309
2523
|
"aria-label": "Font Size",
|
|
2310
2524
|
children: [
|
|
2311
2525
|
/* @__PURE__ */ jsxs6("span", { className: "arap-label", children: [
|
|
2312
|
-
/* @__PURE__ */
|
|
2313
|
-
/* @__PURE__ */
|
|
2526
|
+
/* @__PURE__ */ jsx8(FeatureIcon, { name: FEATURE_KEY }),
|
|
2527
|
+
/* @__PURE__ */ jsx8("span", { children: "Font Size" })
|
|
2314
2528
|
] }),
|
|
2315
2529
|
/* @__PURE__ */ jsxs6("div", { className: "arap-controls", children: [
|
|
2316
|
-
/* @__PURE__ */
|
|
2530
|
+
/* @__PURE__ */ jsx8(
|
|
2317
2531
|
"button",
|
|
2318
2532
|
{
|
|
2319
2533
|
className: "arap-btn-sm",
|
|
@@ -2328,7 +2542,7 @@ function FontSizeController({
|
|
|
2328
2542
|
Math.round(value),
|
|
2329
2543
|
"%"
|
|
2330
2544
|
] }),
|
|
2331
|
-
/* @__PURE__ */
|
|
2545
|
+
/* @__PURE__ */ jsx8(
|
|
2332
2546
|
"button",
|
|
2333
2547
|
{
|
|
2334
2548
|
className: "arap-btn-sm",
|
|
@@ -2346,7 +2560,7 @@ function FontSizeController({
|
|
|
2346
2560
|
}
|
|
2347
2561
|
|
|
2348
2562
|
// src/features/TextScaleController.tsx
|
|
2349
|
-
import { jsx as
|
|
2563
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2350
2564
|
var FEATURE_KEY2 = "fontScale";
|
|
2351
2565
|
var DEFAULT_VALUE2 = 1;
|
|
2352
2566
|
function TextScaleController({
|
|
@@ -2385,11 +2599,11 @@ function TextScaleController({
|
|
|
2385
2599
|
"aria-label": label,
|
|
2386
2600
|
children: [
|
|
2387
2601
|
/* @__PURE__ */ jsxs7("span", { className: "arap-label", children: [
|
|
2388
|
-
/* @__PURE__ */
|
|
2389
|
-
/* @__PURE__ */
|
|
2602
|
+
/* @__PURE__ */ jsx9(FeatureIcon, { name: "fontSize" }),
|
|
2603
|
+
/* @__PURE__ */ jsx9("span", { children: label })
|
|
2390
2604
|
] }),
|
|
2391
2605
|
/* @__PURE__ */ jsxs7("div", { className: "arap-controls", children: [
|
|
2392
|
-
/* @__PURE__ */
|
|
2606
|
+
/* @__PURE__ */ jsx9(
|
|
2393
2607
|
"button",
|
|
2394
2608
|
{
|
|
2395
2609
|
className: "arap-btn-sm",
|
|
@@ -2404,7 +2618,7 @@ function TextScaleController({
|
|
|
2404
2618
|
percentage,
|
|
2405
2619
|
"%"
|
|
2406
2620
|
] }),
|
|
2407
|
-
/* @__PURE__ */
|
|
2621
|
+
/* @__PURE__ */ jsx9(
|
|
2408
2622
|
"button",
|
|
2409
2623
|
{
|
|
2410
2624
|
className: "arap-btn-sm",
|
|
@@ -2422,7 +2636,7 @@ function TextScaleController({
|
|
|
2422
2636
|
}
|
|
2423
2637
|
|
|
2424
2638
|
// src/features/LineHeightController.tsx
|
|
2425
|
-
import { jsx as
|
|
2639
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2426
2640
|
var FEATURE_KEY3 = "lineHeight";
|
|
2427
2641
|
var DEFAULT_VALUE3 = 100;
|
|
2428
2642
|
var MIN2 = 50;
|
|
@@ -2474,11 +2688,11 @@ function LineHeightController({
|
|
|
2474
2688
|
"aria-label": "Line Height",
|
|
2475
2689
|
children: [
|
|
2476
2690
|
/* @__PURE__ */ jsxs8("span", { className: "arap-label", children: [
|
|
2477
|
-
/* @__PURE__ */
|
|
2478
|
-
/* @__PURE__ */
|
|
2691
|
+
/* @__PURE__ */ jsx10(FeatureIcon, { name: FEATURE_KEY3 }),
|
|
2692
|
+
/* @__PURE__ */ jsx10("span", { children: "Line Height" })
|
|
2479
2693
|
] }),
|
|
2480
2694
|
/* @__PURE__ */ jsxs8("div", { className: "arap-controls", children: [
|
|
2481
|
-
/* @__PURE__ */
|
|
2695
|
+
/* @__PURE__ */ jsx10(
|
|
2482
2696
|
"button",
|
|
2483
2697
|
{
|
|
2484
2698
|
className: "arap-btn-sm",
|
|
@@ -2493,7 +2707,7 @@ function LineHeightController({
|
|
|
2493
2707
|
Math.round(normalizedValue),
|
|
2494
2708
|
"%"
|
|
2495
2709
|
] }),
|
|
2496
|
-
/* @__PURE__ */
|
|
2710
|
+
/* @__PURE__ */ jsx10(
|
|
2497
2711
|
"button",
|
|
2498
2712
|
{
|
|
2499
2713
|
className: "arap-btn-sm",
|
|
@@ -2511,7 +2725,7 @@ function LineHeightController({
|
|
|
2511
2725
|
}
|
|
2512
2726
|
|
|
2513
2727
|
// src/features/LetterSpacingController.tsx
|
|
2514
|
-
import { jsx as
|
|
2728
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2515
2729
|
var FEATURE_KEY4 = "letterSpacing";
|
|
2516
2730
|
var DEFAULT_VALUE4 = 0;
|
|
2517
2731
|
var MIN3 = 0;
|
|
@@ -2563,11 +2777,11 @@ function LetterSpacingController({
|
|
|
2563
2777
|
"aria-label": "Letter Spacing",
|
|
2564
2778
|
children: [
|
|
2565
2779
|
/* @__PURE__ */ jsxs9("span", { className: "arap-label", children: [
|
|
2566
|
-
/* @__PURE__ */
|
|
2567
|
-
/* @__PURE__ */
|
|
2780
|
+
/* @__PURE__ */ jsx11(FeatureIcon, { name: FEATURE_KEY4 }),
|
|
2781
|
+
/* @__PURE__ */ jsx11("span", { children: "Letter Spacing" })
|
|
2568
2782
|
] }),
|
|
2569
2783
|
/* @__PURE__ */ jsxs9("div", { className: "arap-controls", children: [
|
|
2570
|
-
/* @__PURE__ */
|
|
2784
|
+
/* @__PURE__ */ jsx11(
|
|
2571
2785
|
"button",
|
|
2572
2786
|
{
|
|
2573
2787
|
className: "arap-btn-sm",
|
|
@@ -2582,7 +2796,7 @@ function LetterSpacingController({
|
|
|
2582
2796
|
value,
|
|
2583
2797
|
"px"
|
|
2584
2798
|
] }),
|
|
2585
|
-
/* @__PURE__ */
|
|
2799
|
+
/* @__PURE__ */ jsx11(
|
|
2586
2800
|
"button",
|
|
2587
2801
|
{
|
|
2588
2802
|
className: "arap-btn-sm",
|
|
@@ -2600,7 +2814,7 @@ function LetterSpacingController({
|
|
|
2600
2814
|
}
|
|
2601
2815
|
|
|
2602
2816
|
// src/features/WordSpacingController.tsx
|
|
2603
|
-
import { jsx as
|
|
2817
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2604
2818
|
var FEATURE_KEY5 = "wordSpacing";
|
|
2605
2819
|
var DEFAULT_VALUE5 = 0;
|
|
2606
2820
|
var MIN4 = 0;
|
|
@@ -2652,11 +2866,11 @@ function WordSpacingController({
|
|
|
2652
2866
|
"aria-label": "Word Spacing",
|
|
2653
2867
|
children: [
|
|
2654
2868
|
/* @__PURE__ */ jsxs10("span", { className: "arap-label", children: [
|
|
2655
|
-
/* @__PURE__ */
|
|
2656
|
-
/* @__PURE__ */
|
|
2869
|
+
/* @__PURE__ */ jsx12(FeatureIcon, { name: FEATURE_KEY5 }),
|
|
2870
|
+
/* @__PURE__ */ jsx12("span", { children: "Word Spacing" })
|
|
2657
2871
|
] }),
|
|
2658
2872
|
/* @__PURE__ */ jsxs10("div", { className: "arap-controls", children: [
|
|
2659
|
-
/* @__PURE__ */
|
|
2873
|
+
/* @__PURE__ */ jsx12(
|
|
2660
2874
|
"button",
|
|
2661
2875
|
{
|
|
2662
2876
|
className: "arap-btn-sm",
|
|
@@ -2671,7 +2885,7 @@ function WordSpacingController({
|
|
|
2671
2885
|
value,
|
|
2672
2886
|
"px"
|
|
2673
2887
|
] }),
|
|
2674
|
-
/* @__PURE__ */
|
|
2888
|
+
/* @__PURE__ */ jsx12(
|
|
2675
2889
|
"button",
|
|
2676
2890
|
{
|
|
2677
2891
|
className: "arap-btn-sm",
|
|
@@ -2689,7 +2903,7 @@ function WordSpacingController({
|
|
|
2689
2903
|
}
|
|
2690
2904
|
|
|
2691
2905
|
// src/features/ParagraphSpacingController.tsx
|
|
2692
|
-
import { jsx as
|
|
2906
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2693
2907
|
var FEATURE_KEY6 = "paragraphSpacing";
|
|
2694
2908
|
var DEFAULT_VALUE6 = 0;
|
|
2695
2909
|
var MIN5 = 0;
|
|
@@ -2741,11 +2955,11 @@ function ParagraphSpacingController({
|
|
|
2741
2955
|
"aria-label": "Paragraph Spacing",
|
|
2742
2956
|
children: [
|
|
2743
2957
|
/* @__PURE__ */ jsxs11("span", { className: "arap-label", children: [
|
|
2744
|
-
/* @__PURE__ */
|
|
2745
|
-
/* @__PURE__ */
|
|
2958
|
+
/* @__PURE__ */ jsx13(FeatureIcon, { name: FEATURE_KEY6 }),
|
|
2959
|
+
/* @__PURE__ */ jsx13("span", { children: "Paragraph Spacing" })
|
|
2746
2960
|
] }),
|
|
2747
2961
|
/* @__PURE__ */ jsxs11("div", { className: "arap-controls", children: [
|
|
2748
|
-
/* @__PURE__ */
|
|
2962
|
+
/* @__PURE__ */ jsx13(
|
|
2749
2963
|
"button",
|
|
2750
2964
|
{
|
|
2751
2965
|
className: "arap-btn-sm",
|
|
@@ -2760,7 +2974,7 @@ function ParagraphSpacingController({
|
|
|
2760
2974
|
value,
|
|
2761
2975
|
"px"
|
|
2762
2976
|
] }),
|
|
2763
|
-
/* @__PURE__ */
|
|
2977
|
+
/* @__PURE__ */ jsx13(
|
|
2764
2978
|
"button",
|
|
2765
2979
|
{
|
|
2766
2980
|
className: "arap-btn-sm",
|
|
@@ -2778,8 +2992,8 @@ function ParagraphSpacingController({
|
|
|
2778
2992
|
}
|
|
2779
2993
|
|
|
2780
2994
|
// src/features/ContrastController.tsx
|
|
2781
|
-
import { useSyncExternalStore as
|
|
2782
|
-
import { jsx as
|
|
2995
|
+
import { useSyncExternalStore as useSyncExternalStore5 } from "react";
|
|
2996
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2783
2997
|
var FEATURE_KEY7 = "contrast";
|
|
2784
2998
|
var DEFAULT_VALUE7 = 0;
|
|
2785
2999
|
var LEVELS = [
|
|
@@ -2801,17 +3015,17 @@ function ContrastController() {
|
|
|
2801
3015
|
FEATURE_KEY7,
|
|
2802
3016
|
DEFAULT_VALUE7
|
|
2803
3017
|
);
|
|
2804
|
-
const forcedColors =
|
|
3018
|
+
const forcedColors = useSyncExternalStore5(
|
|
2805
3019
|
subscribeForcedColors,
|
|
2806
3020
|
isForcedColorsActive,
|
|
2807
3021
|
() => false
|
|
2808
3022
|
);
|
|
2809
3023
|
return /* @__PURE__ */ jsxs12("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
|
|
2810
3024
|
/* @__PURE__ */ jsxs12("span", { className: "arap-label", children: [
|
|
2811
|
-
/* @__PURE__ */
|
|
2812
|
-
/* @__PURE__ */
|
|
3025
|
+
/* @__PURE__ */ jsx14(FeatureIcon, { name: FEATURE_KEY7 }),
|
|
3026
|
+
/* @__PURE__ */ jsx14("span", { children: "Contrast" })
|
|
2813
3027
|
] }),
|
|
2814
|
-
/* @__PURE__ */
|
|
3028
|
+
/* @__PURE__ */ jsx14("div", { className: "arap-segmented", children: LEVELS.map((level) => {
|
|
2815
3029
|
const isActive = value === level.value || level.value === 0 && (value === "off" || value === "original");
|
|
2816
3030
|
return /* @__PURE__ */ jsxs12(
|
|
2817
3031
|
"button",
|
|
@@ -2821,20 +3035,20 @@ function ContrastController() {
|
|
|
2821
3035
|
"aria-pressed": isActive,
|
|
2822
3036
|
type: "button",
|
|
2823
3037
|
children: [
|
|
2824
|
-
isActive && /* @__PURE__ */
|
|
3038
|
+
isActive && /* @__PURE__ */ jsx14("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2825
3039
|
level.label
|
|
2826
3040
|
]
|
|
2827
3041
|
},
|
|
2828
3042
|
String(level.value)
|
|
2829
3043
|
);
|
|
2830
3044
|
}) }),
|
|
2831
|
-
forcedColors && /* @__PURE__ */
|
|
3045
|
+
forcedColors && /* @__PURE__ */ jsx14("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system high contrast (forced colors) is active." })
|
|
2832
3046
|
] });
|
|
2833
3047
|
}
|
|
2834
3048
|
|
|
2835
3049
|
// src/features/ContrastModeController.tsx
|
|
2836
|
-
import { useSyncExternalStore as
|
|
2837
|
-
import { jsx as
|
|
3050
|
+
import { useSyncExternalStore as useSyncExternalStore6 } from "react";
|
|
3051
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2838
3052
|
var FEATURE_KEY8 = "contrastMode";
|
|
2839
3053
|
var DEFAULT_VALUE8 = "off";
|
|
2840
3054
|
var OPTIONS = [
|
|
@@ -2849,17 +3063,17 @@ function ContrastModeController() {
|
|
|
2849
3063
|
FEATURE_KEY8,
|
|
2850
3064
|
DEFAULT_VALUE8
|
|
2851
3065
|
);
|
|
2852
|
-
const forcedColors =
|
|
3066
|
+
const forcedColors = useSyncExternalStore6(
|
|
2853
3067
|
subscribeForcedColors,
|
|
2854
3068
|
isForcedColorsActive,
|
|
2855
3069
|
() => false
|
|
2856
3070
|
);
|
|
2857
3071
|
return /* @__PURE__ */ jsxs13("div", { className: "arap-feature", role: "group", "aria-label": "Contrast Mode", children: [
|
|
2858
3072
|
/* @__PURE__ */ jsxs13("span", { className: "arap-label", children: [
|
|
2859
|
-
/* @__PURE__ */
|
|
2860
|
-
/* @__PURE__ */
|
|
3073
|
+
/* @__PURE__ */ jsx15(FeatureIcon, { name: FEATURE_KEY8 }),
|
|
3074
|
+
/* @__PURE__ */ jsx15("span", { children: "Contrast Mode" })
|
|
2861
3075
|
] }),
|
|
2862
|
-
/* @__PURE__ */
|
|
3076
|
+
/* @__PURE__ */ jsx15("div", { className: "arap-segmented", children: OPTIONS.map((option) => {
|
|
2863
3077
|
const isActive = value === option.value || option.value === "off" && (value === "original" || !value);
|
|
2864
3078
|
return /* @__PURE__ */ jsxs13(
|
|
2865
3079
|
"button",
|
|
@@ -2869,19 +3083,19 @@ function ContrastModeController() {
|
|
|
2869
3083
|
"aria-pressed": isActive,
|
|
2870
3084
|
type: "button",
|
|
2871
3085
|
children: [
|
|
2872
|
-
isActive && /* @__PURE__ */
|
|
3086
|
+
isActive && /* @__PURE__ */ jsx15("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2873
3087
|
option.label
|
|
2874
3088
|
]
|
|
2875
3089
|
},
|
|
2876
3090
|
option.value
|
|
2877
3091
|
);
|
|
2878
3092
|
}) }),
|
|
2879
|
-
forcedColors && /* @__PURE__ */
|
|
3093
|
+
forcedColors && /* @__PURE__ */ jsx15("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system high contrast (forced colors) is active." })
|
|
2880
3094
|
] });
|
|
2881
3095
|
}
|
|
2882
3096
|
|
|
2883
3097
|
// src/features/SaturationController.tsx
|
|
2884
|
-
import { jsx as
|
|
3098
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2885
3099
|
var FEATURE_KEY9 = "saturation";
|
|
2886
3100
|
var DEFAULT_VALUE9 = 0;
|
|
2887
3101
|
var LEVELS2 = [
|
|
@@ -2896,10 +3110,10 @@ function SaturationController() {
|
|
|
2896
3110
|
);
|
|
2897
3111
|
return /* @__PURE__ */ jsxs14("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
|
|
2898
3112
|
/* @__PURE__ */ jsxs14("span", { className: "arap-label", children: [
|
|
2899
|
-
/* @__PURE__ */
|
|
2900
|
-
/* @__PURE__ */
|
|
3113
|
+
/* @__PURE__ */ jsx16(FeatureIcon, { name: FEATURE_KEY9 }),
|
|
3114
|
+
/* @__PURE__ */ jsx16("span", { children: "Saturation" })
|
|
2901
3115
|
] }),
|
|
2902
|
-
/* @__PURE__ */
|
|
3116
|
+
/* @__PURE__ */ jsx16("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ jsxs14(
|
|
2903
3117
|
"button",
|
|
2904
3118
|
{
|
|
2905
3119
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -2907,7 +3121,7 @@ function SaturationController() {
|
|
|
2907
3121
|
"aria-pressed": value === level.value,
|
|
2908
3122
|
type: "button",
|
|
2909
3123
|
children: [
|
|
2910
|
-
value === level.value && /* @__PURE__ */
|
|
3124
|
+
value === level.value && /* @__PURE__ */ jsx16("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2911
3125
|
level.label
|
|
2912
3126
|
]
|
|
2913
3127
|
},
|
|
@@ -2917,7 +3131,7 @@ function SaturationController() {
|
|
|
2917
3131
|
}
|
|
2918
3132
|
|
|
2919
3133
|
// src/features/InvertColorsController.tsx
|
|
2920
|
-
import { jsx as
|
|
3134
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2921
3135
|
var FEATURE_KEY10 = "invertColors";
|
|
2922
3136
|
var DEFAULT_VALUE10 = false;
|
|
2923
3137
|
function InvertColorsController() {
|
|
@@ -2927,10 +3141,10 @@ function InvertColorsController() {
|
|
|
2927
3141
|
);
|
|
2928
3142
|
return /* @__PURE__ */ jsxs15("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
|
|
2929
3143
|
/* @__PURE__ */ jsxs15("span", { className: "arap-label", children: [
|
|
2930
|
-
/* @__PURE__ */
|
|
2931
|
-
/* @__PURE__ */
|
|
3144
|
+
/* @__PURE__ */ jsx17(FeatureIcon, { name: FEATURE_KEY10 }),
|
|
3145
|
+
/* @__PURE__ */ jsx17("span", { children: "Invert Colors" })
|
|
2932
3146
|
] }),
|
|
2933
|
-
/* @__PURE__ */
|
|
3147
|
+
/* @__PURE__ */ jsx17(
|
|
2934
3148
|
"button",
|
|
2935
3149
|
{
|
|
2936
3150
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2938,14 +3152,14 @@ function InvertColorsController() {
|
|
|
2938
3152
|
"aria-label": "Invert Colors",
|
|
2939
3153
|
"aria-pressed": value,
|
|
2940
3154
|
type: "button",
|
|
2941
|
-
children: /* @__PURE__ */
|
|
3155
|
+
children: /* @__PURE__ */ jsx17("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2942
3156
|
}
|
|
2943
3157
|
)
|
|
2944
3158
|
] });
|
|
2945
3159
|
}
|
|
2946
3160
|
|
|
2947
3161
|
// src/features/GrayscaleController.tsx
|
|
2948
|
-
import { jsx as
|
|
3162
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2949
3163
|
var FEATURE_KEY11 = "grayscale";
|
|
2950
3164
|
var DEFAULT_VALUE11 = false;
|
|
2951
3165
|
function GrayscaleController() {
|
|
@@ -2955,10 +3169,10 @@ function GrayscaleController() {
|
|
|
2955
3169
|
);
|
|
2956
3170
|
return /* @__PURE__ */ jsxs16("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
|
|
2957
3171
|
/* @__PURE__ */ jsxs16("span", { className: "arap-label", children: [
|
|
2958
|
-
/* @__PURE__ */
|
|
2959
|
-
/* @__PURE__ */
|
|
3172
|
+
/* @__PURE__ */ jsx18(FeatureIcon, { name: FEATURE_KEY11 }),
|
|
3173
|
+
/* @__PURE__ */ jsx18("span", { children: "Grayscale" })
|
|
2960
3174
|
] }),
|
|
2961
|
-
/* @__PURE__ */
|
|
3175
|
+
/* @__PURE__ */ jsx18(
|
|
2962
3176
|
"button",
|
|
2963
3177
|
{
|
|
2964
3178
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2966,14 +3180,14 @@ function GrayscaleController() {
|
|
|
2966
3180
|
"aria-label": "Grayscale",
|
|
2967
3181
|
"aria-pressed": value,
|
|
2968
3182
|
type: "button",
|
|
2969
|
-
children: /* @__PURE__ */
|
|
3183
|
+
children: /* @__PURE__ */ jsx18("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2970
3184
|
}
|
|
2971
3185
|
)
|
|
2972
3186
|
] });
|
|
2973
3187
|
}
|
|
2974
3188
|
|
|
2975
3189
|
// src/features/LinkHighlightController.tsx
|
|
2976
|
-
import { jsx as
|
|
3190
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2977
3191
|
var FEATURE_KEY12 = "linkHighlight";
|
|
2978
3192
|
var DEFAULT_VALUE12 = false;
|
|
2979
3193
|
function LinkHighlightController() {
|
|
@@ -2983,10 +3197,10 @@ function LinkHighlightController() {
|
|
|
2983
3197
|
);
|
|
2984
3198
|
return /* @__PURE__ */ jsxs17("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
|
|
2985
3199
|
/* @__PURE__ */ jsxs17("span", { className: "arap-label", children: [
|
|
2986
|
-
/* @__PURE__ */
|
|
2987
|
-
/* @__PURE__ */
|
|
3200
|
+
/* @__PURE__ */ jsx19(FeatureIcon, { name: FEATURE_KEY12 }),
|
|
3201
|
+
/* @__PURE__ */ jsx19("span", { children: "Link Highlight" })
|
|
2988
3202
|
] }),
|
|
2989
|
-
/* @__PURE__ */
|
|
3203
|
+
/* @__PURE__ */ jsx19(
|
|
2990
3204
|
"button",
|
|
2991
3205
|
{
|
|
2992
3206
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2994,10 +3208,10 @@ function LinkHighlightController() {
|
|
|
2994
3208
|
"aria-label": "Link Highlight",
|
|
2995
3209
|
"aria-pressed": !!value,
|
|
2996
3210
|
type: "button",
|
|
2997
|
-
children: /* @__PURE__ */
|
|
3211
|
+
children: /* @__PURE__ */ jsx19("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2998
3212
|
}
|
|
2999
3213
|
),
|
|
3000
|
-
/* @__PURE__ */
|
|
3214
|
+
/* @__PURE__ */ jsx19("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ jsxs17(
|
|
3001
3215
|
"button",
|
|
3002
3216
|
{
|
|
3003
3217
|
type: "button",
|
|
@@ -3005,7 +3219,7 @@ function LinkHighlightController() {
|
|
|
3005
3219
|
"aria-pressed": value === mode,
|
|
3006
3220
|
onClick: () => setValue(mode),
|
|
3007
3221
|
children: [
|
|
3008
|
-
value === mode && /* @__PURE__ */
|
|
3222
|
+
value === mode && /* @__PURE__ */ jsx19("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3009
3223
|
mode.split("-").join(" ")
|
|
3010
3224
|
]
|
|
3011
3225
|
},
|
|
@@ -3015,7 +3229,7 @@ function LinkHighlightController() {
|
|
|
3015
3229
|
}
|
|
3016
3230
|
|
|
3017
3231
|
// src/features/TextAlignController.tsx
|
|
3018
|
-
import { jsx as
|
|
3232
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3019
3233
|
var FEATURE_KEY13 = "textAlign";
|
|
3020
3234
|
var DEFAULT_VALUE13 = "default";
|
|
3021
3235
|
var OPTIONS2 = ["default", "left", "center", "right", "justify"];
|
|
@@ -3026,10 +3240,10 @@ function TextAlignController() {
|
|
|
3026
3240
|
);
|
|
3027
3241
|
return /* @__PURE__ */ jsxs18("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
|
|
3028
3242
|
/* @__PURE__ */ jsxs18("span", { className: "arap-label", children: [
|
|
3029
|
-
/* @__PURE__ */
|
|
3030
|
-
/* @__PURE__ */
|
|
3243
|
+
/* @__PURE__ */ jsx20(FeatureIcon, { name: FEATURE_KEY13 }),
|
|
3244
|
+
/* @__PURE__ */ jsx20("span", { children: "Text Alignment" })
|
|
3031
3245
|
] }),
|
|
3032
|
-
/* @__PURE__ */
|
|
3246
|
+
/* @__PURE__ */ jsx20("div", { className: "arap-segmented", children: OPTIONS2.map((option) => /* @__PURE__ */ jsxs18(
|
|
3033
3247
|
"button",
|
|
3034
3248
|
{
|
|
3035
3249
|
className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
|
|
@@ -3038,13 +3252,13 @@ function TextAlignController() {
|
|
|
3038
3252
|
type: "button",
|
|
3039
3253
|
style: { textTransform: "capitalize" },
|
|
3040
3254
|
children: [
|
|
3041
|
-
value === option && /* @__PURE__ */
|
|
3255
|
+
value === option && /* @__PURE__ */ jsx20("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3042
3256
|
option
|
|
3043
3257
|
]
|
|
3044
3258
|
},
|
|
3045
3259
|
option
|
|
3046
3260
|
)) }),
|
|
3047
|
-
value === "justify" && /* @__PURE__ */
|
|
3261
|
+
value === "justify" && /* @__PURE__ */ jsx20(
|
|
3048
3262
|
"div",
|
|
3049
3263
|
{
|
|
3050
3264
|
className: "arap-notice arap-notice-warning",
|
|
@@ -3057,7 +3271,7 @@ function TextAlignController() {
|
|
|
3057
3271
|
}
|
|
3058
3272
|
|
|
3059
3273
|
// src/features/FontFamilyController.tsx
|
|
3060
|
-
import { jsx as
|
|
3274
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3061
3275
|
var FEATURE_KEY14 = "fontFamily";
|
|
3062
3276
|
var DEFAULT_VALUE14 = "default";
|
|
3063
3277
|
var OPTIONS3 = [
|
|
@@ -3072,10 +3286,10 @@ function FontFamilyController() {
|
|
|
3072
3286
|
);
|
|
3073
3287
|
return /* @__PURE__ */ jsxs19("div", { className: "arap-feature", role: "group", "aria-label": "Font Family", children: [
|
|
3074
3288
|
/* @__PURE__ */ jsxs19("span", { className: "arap-label", children: [
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
3289
|
+
/* @__PURE__ */ jsx21(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
3290
|
+
/* @__PURE__ */ jsx21("span", { children: "Font Family" })
|
|
3077
3291
|
] }),
|
|
3078
|
-
/* @__PURE__ */
|
|
3292
|
+
/* @__PURE__ */ jsx21("div", { className: "arap-segmented", children: OPTIONS3.map((option) => {
|
|
3079
3293
|
const isActive = value === option.value || option.value === "default" && (value === "original" || !value || value === "default");
|
|
3080
3294
|
return /* @__PURE__ */ jsxs19(
|
|
3081
3295
|
"button",
|
|
@@ -3085,7 +3299,7 @@ function FontFamilyController() {
|
|
|
3085
3299
|
"aria-pressed": isActive,
|
|
3086
3300
|
type: "button",
|
|
3087
3301
|
children: [
|
|
3088
|
-
isActive && /* @__PURE__ */
|
|
3302
|
+
isActive && /* @__PURE__ */ jsx21("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3089
3303
|
option.label
|
|
3090
3304
|
]
|
|
3091
3305
|
},
|
|
@@ -3096,7 +3310,7 @@ function FontFamilyController() {
|
|
|
3096
3310
|
}
|
|
3097
3311
|
|
|
3098
3312
|
// src/features/HideImagesController.tsx
|
|
3099
|
-
import { jsx as
|
|
3313
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3100
3314
|
var FEATURE_KEY15 = "hideImages";
|
|
3101
3315
|
var DEFAULT_VALUE15 = false;
|
|
3102
3316
|
function HideImagesController() {
|
|
@@ -3106,10 +3320,10 @@ function HideImagesController() {
|
|
|
3106
3320
|
);
|
|
3107
3321
|
return /* @__PURE__ */ jsxs20("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
3108
3322
|
/* @__PURE__ */ jsxs20("span", { className: "arap-label", children: [
|
|
3109
|
-
/* @__PURE__ */
|
|
3110
|
-
/* @__PURE__ */
|
|
3323
|
+
/* @__PURE__ */ jsx22(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
3324
|
+
/* @__PURE__ */ jsx22("span", { children: "Hide Images" })
|
|
3111
3325
|
] }),
|
|
3112
|
-
/* @__PURE__ */
|
|
3326
|
+
/* @__PURE__ */ jsx22(
|
|
3113
3327
|
"button",
|
|
3114
3328
|
{
|
|
3115
3329
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3117,14 +3331,14 @@ function HideImagesController() {
|
|
|
3117
3331
|
"aria-label": "Hide Images",
|
|
3118
3332
|
"aria-pressed": value,
|
|
3119
3333
|
type: "button",
|
|
3120
|
-
children: /* @__PURE__ */
|
|
3334
|
+
children: /* @__PURE__ */ jsx22("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3121
3335
|
}
|
|
3122
3336
|
)
|
|
3123
3337
|
] });
|
|
3124
3338
|
}
|
|
3125
3339
|
|
|
3126
3340
|
// src/features/HideVideosController.tsx
|
|
3127
|
-
import { jsx as
|
|
3341
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3128
3342
|
var FEATURE_KEY16 = "hideVideos";
|
|
3129
3343
|
var DEFAULT_VALUE16 = false;
|
|
3130
3344
|
function HideVideosController() {
|
|
@@ -3134,10 +3348,10 @@ function HideVideosController() {
|
|
|
3134
3348
|
);
|
|
3135
3349
|
return /* @__PURE__ */ jsxs21("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
|
|
3136
3350
|
/* @__PURE__ */ jsxs21("span", { className: "arap-label", children: [
|
|
3137
|
-
/* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */
|
|
3351
|
+
/* @__PURE__ */ jsx23(FeatureIcon, { name: FEATURE_KEY16 }),
|
|
3352
|
+
/* @__PURE__ */ jsx23("span", { children: "Hide Videos" })
|
|
3139
3353
|
] }),
|
|
3140
|
-
/* @__PURE__ */
|
|
3354
|
+
/* @__PURE__ */ jsx23(
|
|
3141
3355
|
"button",
|
|
3142
3356
|
{
|
|
3143
3357
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3145,14 +3359,14 @@ function HideVideosController() {
|
|
|
3145
3359
|
"aria-label": "Hide Videos",
|
|
3146
3360
|
"aria-pressed": value,
|
|
3147
3361
|
type: "button",
|
|
3148
|
-
children: /* @__PURE__ */
|
|
3362
|
+
children: /* @__PURE__ */ jsx23("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3149
3363
|
}
|
|
3150
3364
|
)
|
|
3151
3365
|
] });
|
|
3152
3366
|
}
|
|
3153
3367
|
|
|
3154
3368
|
// src/features/BigCursorController.tsx
|
|
3155
|
-
import { jsx as
|
|
3369
|
+
import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3156
3370
|
var FEATURE_KEY17 = "bigCursor";
|
|
3157
3371
|
var DEFAULT_VALUE17 = false;
|
|
3158
3372
|
function BigCursorController() {
|
|
@@ -3162,10 +3376,10 @@ function BigCursorController() {
|
|
|
3162
3376
|
);
|
|
3163
3377
|
return /* @__PURE__ */ jsxs22("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
3164
3378
|
/* @__PURE__ */ jsxs22("span", { className: "arap-label", children: [
|
|
3165
|
-
/* @__PURE__ */
|
|
3166
|
-
/* @__PURE__ */
|
|
3379
|
+
/* @__PURE__ */ jsx24(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
3380
|
+
/* @__PURE__ */ jsx24("span", { children: "Big Cursor" })
|
|
3167
3381
|
] }),
|
|
3168
|
-
/* @__PURE__ */
|
|
3382
|
+
/* @__PURE__ */ jsx24(
|
|
3169
3383
|
"button",
|
|
3170
3384
|
{
|
|
3171
3385
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3173,14 +3387,14 @@ function BigCursorController() {
|
|
|
3173
3387
|
"aria-label": "Big Cursor",
|
|
3174
3388
|
"aria-pressed": value,
|
|
3175
3389
|
type: "button",
|
|
3176
|
-
children: /* @__PURE__ */
|
|
3390
|
+
children: /* @__PURE__ */ jsx24("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3177
3391
|
}
|
|
3178
3392
|
)
|
|
3179
3393
|
] });
|
|
3180
3394
|
}
|
|
3181
3395
|
|
|
3182
3396
|
// src/features/ReadingMaskController.tsx
|
|
3183
|
-
import { jsx as
|
|
3397
|
+
import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3184
3398
|
var FEATURE_KEY18 = "readingMask";
|
|
3185
3399
|
var DEFAULT_VALUE18 = false;
|
|
3186
3400
|
function ReadingMaskController() {
|
|
@@ -3190,10 +3404,10 @@ function ReadingMaskController() {
|
|
|
3190
3404
|
);
|
|
3191
3405
|
return /* @__PURE__ */ jsxs23("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
|
|
3192
3406
|
/* @__PURE__ */ jsxs23("span", { className: "arap-label", children: [
|
|
3193
|
-
/* @__PURE__ */
|
|
3194
|
-
/* @__PURE__ */
|
|
3407
|
+
/* @__PURE__ */ jsx25(FeatureIcon, { name: FEATURE_KEY18 }),
|
|
3408
|
+
/* @__PURE__ */ jsx25("span", { children: "Reading Mask" })
|
|
3195
3409
|
] }),
|
|
3196
|
-
/* @__PURE__ */
|
|
3410
|
+
/* @__PURE__ */ jsx25(
|
|
3197
3411
|
"button",
|
|
3198
3412
|
{
|
|
3199
3413
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3201,14 +3415,14 @@ function ReadingMaskController() {
|
|
|
3201
3415
|
"aria-label": "Reading Mask",
|
|
3202
3416
|
"aria-pressed": value,
|
|
3203
3417
|
type: "button",
|
|
3204
|
-
children: /* @__PURE__ */
|
|
3418
|
+
children: /* @__PURE__ */ jsx25("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3205
3419
|
}
|
|
3206
3420
|
)
|
|
3207
3421
|
] });
|
|
3208
3422
|
}
|
|
3209
3423
|
|
|
3210
3424
|
// src/features/ReadingGuideController.tsx
|
|
3211
|
-
import { jsx as
|
|
3425
|
+
import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3212
3426
|
var FEATURE_KEY19 = "readingGuide";
|
|
3213
3427
|
var DEFAULT_VALUE19 = false;
|
|
3214
3428
|
function ReadingGuideController() {
|
|
@@ -3218,10 +3432,10 @@ function ReadingGuideController() {
|
|
|
3218
3432
|
);
|
|
3219
3433
|
return /* @__PURE__ */ jsxs24("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
|
|
3220
3434
|
/* @__PURE__ */ jsxs24("span", { className: "arap-label", children: [
|
|
3221
|
-
/* @__PURE__ */
|
|
3222
|
-
/* @__PURE__ */
|
|
3435
|
+
/* @__PURE__ */ jsx26(FeatureIcon, { name: FEATURE_KEY19 }),
|
|
3436
|
+
/* @__PURE__ */ jsx26("span", { children: "Reading Guide" })
|
|
3223
3437
|
] }),
|
|
3224
|
-
/* @__PURE__ */
|
|
3438
|
+
/* @__PURE__ */ jsx26(
|
|
3225
3439
|
"button",
|
|
3226
3440
|
{
|
|
3227
3441
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3229,35 +3443,99 @@ function ReadingGuideController() {
|
|
|
3229
3443
|
"aria-label": "Reading Guide",
|
|
3230
3444
|
"aria-pressed": value,
|
|
3231
3445
|
type: "button",
|
|
3232
|
-
children: /* @__PURE__ */
|
|
3446
|
+
children: /* @__PURE__ */ jsx26("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3447
|
+
}
|
|
3448
|
+
)
|
|
3449
|
+
] });
|
|
3450
|
+
}
|
|
3451
|
+
|
|
3452
|
+
// src/features/HighlightFocusController.tsx
|
|
3453
|
+
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3454
|
+
var FEATURE_KEY20 = "highlightFocus";
|
|
3455
|
+
var DEFAULT_VALUE20 = false;
|
|
3456
|
+
function HighlightFocusController() {
|
|
3457
|
+
const { value, setValue } = useAccessibility(
|
|
3458
|
+
FEATURE_KEY20,
|
|
3459
|
+
DEFAULT_VALUE20
|
|
3460
|
+
);
|
|
3461
|
+
return /* @__PURE__ */ jsxs25("div", { className: "arap-feature", role: "group", "aria-label": "Highlight Focus", children: [
|
|
3462
|
+
/* @__PURE__ */ jsxs25("span", { className: "arap-label", children: [
|
|
3463
|
+
/* @__PURE__ */ jsx27(FeatureIcon, { name: FEATURE_KEY20 }),
|
|
3464
|
+
/* @__PURE__ */ jsx27("span", { children: "Highlight Focus" })
|
|
3465
|
+
] }),
|
|
3466
|
+
/* @__PURE__ */ jsx27(
|
|
3467
|
+
"button",
|
|
3468
|
+
{
|
|
3469
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3470
|
+
onClick: () => setValue(!value),
|
|
3471
|
+
"aria-label": "Highlight Focus",
|
|
3472
|
+
"aria-pressed": Boolean(value),
|
|
3473
|
+
type: "button",
|
|
3474
|
+
children: /* @__PURE__ */ jsx27("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3233
3475
|
}
|
|
3234
3476
|
)
|
|
3235
3477
|
] });
|
|
3236
3478
|
}
|
|
3479
|
+
var FocusHighlightController = HighlightFocusController;
|
|
3480
|
+
|
|
3481
|
+
// src/features/ReduceMotionController.tsx
|
|
3482
|
+
import { useSyncExternalStore as useSyncExternalStore7 } from "react";
|
|
3483
|
+
import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3484
|
+
var FEATURE_KEY21 = "reduceMotion";
|
|
3485
|
+
var DEFAULT_VALUE21 = false;
|
|
3486
|
+
function ReduceMotionController() {
|
|
3487
|
+
const { value, setValue } = useAccessibility(
|
|
3488
|
+
FEATURE_KEY21,
|
|
3489
|
+
DEFAULT_VALUE21
|
|
3490
|
+
);
|
|
3491
|
+
const osReducedMotion = useSyncExternalStore7(
|
|
3492
|
+
subscribeReducedMotion,
|
|
3493
|
+
isReducedMotionActive,
|
|
3494
|
+
() => false
|
|
3495
|
+
);
|
|
3496
|
+
return /* @__PURE__ */ jsxs26("div", { className: "arap-feature", role: "group", "aria-label": "Reduce Motion", children: [
|
|
3497
|
+
/* @__PURE__ */ jsxs26("span", { className: "arap-label", children: [
|
|
3498
|
+
/* @__PURE__ */ jsx28(FeatureIcon, { name: FEATURE_KEY21 }),
|
|
3499
|
+
/* @__PURE__ */ jsx28("span", { children: "Reduce Motion" })
|
|
3500
|
+
] }),
|
|
3501
|
+
/* @__PURE__ */ jsx28(
|
|
3502
|
+
"button",
|
|
3503
|
+
{
|
|
3504
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3505
|
+
onClick: () => setValue(!value),
|
|
3506
|
+
"aria-label": "Reduce Motion",
|
|
3507
|
+
"aria-pressed": Boolean(value),
|
|
3508
|
+
type: "button",
|
|
3509
|
+
children: /* @__PURE__ */ jsx28("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3510
|
+
}
|
|
3511
|
+
),
|
|
3512
|
+
osReducedMotion && /* @__PURE__ */ jsx28("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system prefers-reduced-motion is active." })
|
|
3513
|
+
] });
|
|
3514
|
+
}
|
|
3237
3515
|
|
|
3238
3516
|
// src/features/ResetController.tsx
|
|
3239
3517
|
import { createPortal as createPortal2 } from "react-dom";
|
|
3240
|
-
import { useContext as
|
|
3241
|
-
import { jsx as
|
|
3518
|
+
import { useContext as useContext6 } from "react";
|
|
3519
|
+
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3242
3520
|
function ResetController() {
|
|
3243
|
-
const ctx =
|
|
3521
|
+
const ctx = useContext6(AccessibilityContext);
|
|
3244
3522
|
if (!ctx) {
|
|
3245
3523
|
throw new Error(
|
|
3246
3524
|
"ResetController must be used within an <AccessibilityPlugin> provider."
|
|
3247
3525
|
);
|
|
3248
3526
|
}
|
|
3249
|
-
const actionHost =
|
|
3527
|
+
const actionHost = useContext6(PanelActionsContext);
|
|
3250
3528
|
const { resetAll } = ctx;
|
|
3251
3529
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
3252
|
-
const button = /* @__PURE__ */
|
|
3253
|
-
/* @__PURE__ */
|
|
3530
|
+
const button = /* @__PURE__ */ jsx29("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ jsxs27("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
3531
|
+
/* @__PURE__ */ jsx29(FeatureIcon, { name: "reset" }),
|
|
3254
3532
|
strings.resetAll
|
|
3255
3533
|
] }) });
|
|
3256
3534
|
return actionHost ? createPortal2(button, actionHost) : button;
|
|
3257
3535
|
}
|
|
3258
3536
|
|
|
3259
3537
|
// src/core/controls/ToggleControl.tsx
|
|
3260
|
-
import { jsx as
|
|
3538
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
3261
3539
|
function ToggleControl({
|
|
3262
3540
|
id,
|
|
3263
3541
|
label,
|
|
@@ -3279,12 +3557,12 @@ function ToggleControl({
|
|
|
3279
3557
|
onChange(!checked);
|
|
3280
3558
|
}
|
|
3281
3559
|
};
|
|
3282
|
-
return /* @__PURE__ */
|
|
3560
|
+
return /* @__PURE__ */ jsx30(
|
|
3283
3561
|
"div",
|
|
3284
3562
|
{
|
|
3285
3563
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3286
3564
|
style,
|
|
3287
|
-
children: /* @__PURE__ */
|
|
3565
|
+
children: /* @__PURE__ */ jsx30(
|
|
3288
3566
|
"button",
|
|
3289
3567
|
{
|
|
3290
3568
|
id,
|
|
@@ -3298,7 +3576,7 @@ function ToggleControl({
|
|
|
3298
3576
|
disabled: !isInteractive,
|
|
3299
3577
|
onClick: handleClick,
|
|
3300
3578
|
title: unavailableReason || description || toggleLabel,
|
|
3301
|
-
children: /* @__PURE__ */
|
|
3579
|
+
children: /* @__PURE__ */ jsx30(
|
|
3302
3580
|
"span",
|
|
3303
3581
|
{
|
|
3304
3582
|
className: "arap-toggle-knob",
|
|
@@ -3315,7 +3593,7 @@ function ToggleControl({
|
|
|
3315
3593
|
|
|
3316
3594
|
// src/core/controls/ChoiceControl.tsx
|
|
3317
3595
|
import { useCallback as useCallback4, useMemo as useMemo2, useRef as useRef5 } from "react";
|
|
3318
|
-
import { jsx as
|
|
3596
|
+
import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3319
3597
|
function ChoiceControl({
|
|
3320
3598
|
id,
|
|
3321
3599
|
label,
|
|
@@ -3371,7 +3649,7 @@ function ChoiceControl({
|
|
|
3371
3649
|
const renderOptionButton = (opt) => {
|
|
3372
3650
|
const isSelected = value === opt.value;
|
|
3373
3651
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
3374
|
-
return /* @__PURE__ */
|
|
3652
|
+
return /* @__PURE__ */ jsxs28(
|
|
3375
3653
|
"button",
|
|
3376
3654
|
{
|
|
3377
3655
|
type: "button",
|
|
@@ -3385,15 +3663,15 @@ function ChoiceControl({
|
|
|
3385
3663
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
3386
3664
|
title: opt.description,
|
|
3387
3665
|
children: [
|
|
3388
|
-
isSelected && /* @__PURE__ */
|
|
3389
|
-
/* @__PURE__ */
|
|
3390
|
-
opt.badge && /* @__PURE__ */
|
|
3666
|
+
isSelected && /* @__PURE__ */ jsx31("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3667
|
+
/* @__PURE__ */ jsx31("span", { children: opt.label }),
|
|
3668
|
+
opt.badge && /* @__PURE__ */ jsx31("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
3391
3669
|
]
|
|
3392
3670
|
},
|
|
3393
3671
|
String(opt.value)
|
|
3394
3672
|
);
|
|
3395
3673
|
};
|
|
3396
|
-
return /* @__PURE__ */
|
|
3674
|
+
return /* @__PURE__ */ jsx31(
|
|
3397
3675
|
"div",
|
|
3398
3676
|
{
|
|
3399
3677
|
ref: containerRef,
|
|
@@ -3404,15 +3682,15 @@ function ChoiceControl({
|
|
|
3404
3682
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3405
3683
|
style,
|
|
3406
3684
|
onKeyDown: handleKeyDown,
|
|
3407
|
-
children: groups ? groups.map((group) => /* @__PURE__ */
|
|
3685
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ jsxs28(
|
|
3408
3686
|
"div",
|
|
3409
3687
|
{
|
|
3410
3688
|
className: "arap-choice-group",
|
|
3411
3689
|
role: "group",
|
|
3412
3690
|
"aria-label": group.label,
|
|
3413
3691
|
children: [
|
|
3414
|
-
/* @__PURE__ */
|
|
3415
|
-
/* @__PURE__ */
|
|
3692
|
+
/* @__PURE__ */ jsx31("span", { className: "arap-choice-group-title", children: group.label }),
|
|
3693
|
+
/* @__PURE__ */ jsx31("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
3416
3694
|
]
|
|
3417
3695
|
},
|
|
3418
3696
|
group.label
|
|
@@ -3422,7 +3700,7 @@ function ChoiceControl({
|
|
|
3422
3700
|
}
|
|
3423
3701
|
|
|
3424
3702
|
// src/core/controls/StepperControl.tsx
|
|
3425
|
-
import { jsx as
|
|
3703
|
+
import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3426
3704
|
function StepperControl({
|
|
3427
3705
|
id,
|
|
3428
3706
|
label,
|
|
@@ -3452,15 +3730,15 @@ function StepperControl({
|
|
|
3452
3730
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
3453
3731
|
}
|
|
3454
3732
|
};
|
|
3455
|
-
return /* @__PURE__ */
|
|
3733
|
+
return /* @__PURE__ */ jsxs29(
|
|
3456
3734
|
"div",
|
|
3457
3735
|
{
|
|
3458
3736
|
id,
|
|
3459
3737
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3460
3738
|
style,
|
|
3461
3739
|
children: [
|
|
3462
|
-
/* @__PURE__ */
|
|
3463
|
-
/* @__PURE__ */
|
|
3740
|
+
/* @__PURE__ */ jsxs29("div", { className: "arap-controls", children: [
|
|
3741
|
+
/* @__PURE__ */ jsx32(
|
|
3464
3742
|
"button",
|
|
3465
3743
|
{
|
|
3466
3744
|
type: "button",
|
|
@@ -3471,8 +3749,8 @@ function StepperControl({
|
|
|
3471
3749
|
children: "\u2212"
|
|
3472
3750
|
}
|
|
3473
3751
|
),
|
|
3474
|
-
/* @__PURE__ */
|
|
3475
|
-
/* @__PURE__ */
|
|
3752
|
+
/* @__PURE__ */ jsx32("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
3753
|
+
/* @__PURE__ */ jsx32(
|
|
3476
3754
|
"button",
|
|
3477
3755
|
{
|
|
3478
3756
|
type: "button",
|
|
@@ -3484,7 +3762,7 @@ function StepperControl({
|
|
|
3484
3762
|
}
|
|
3485
3763
|
)
|
|
3486
3764
|
] }),
|
|
3487
|
-
showSlider && /* @__PURE__ */
|
|
3765
|
+
showSlider && /* @__PURE__ */ jsx32("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx32(
|
|
3488
3766
|
"input",
|
|
3489
3767
|
{
|
|
3490
3768
|
type: "range",
|
|
@@ -3508,7 +3786,7 @@ function StepperControl({
|
|
|
3508
3786
|
}
|
|
3509
3787
|
|
|
3510
3788
|
// src/core/controls/FeatureCard.tsx
|
|
3511
|
-
import { jsx as
|
|
3789
|
+
import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3512
3790
|
function FeatureCard({
|
|
3513
3791
|
id,
|
|
3514
3792
|
featureKey,
|
|
@@ -3527,7 +3805,7 @@ function FeatureCard({
|
|
|
3527
3805
|
largeControls = false
|
|
3528
3806
|
}) {
|
|
3529
3807
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
3530
|
-
return /* @__PURE__ */
|
|
3808
|
+
return /* @__PURE__ */ jsxs30(
|
|
3531
3809
|
"div",
|
|
3532
3810
|
{
|
|
3533
3811
|
id,
|
|
@@ -3536,27 +3814,27 @@ function FeatureCard({
|
|
|
3536
3814
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3537
3815
|
style,
|
|
3538
3816
|
children: [
|
|
3539
|
-
/* @__PURE__ */
|
|
3540
|
-
/* @__PURE__ */
|
|
3541
|
-
icon ?? (featureKey ? /* @__PURE__ */
|
|
3542
|
-
/* @__PURE__ */
|
|
3817
|
+
/* @__PURE__ */ jsxs30("div", { className: "arap-card-header", children: [
|
|
3818
|
+
/* @__PURE__ */ jsxs30("span", { className: "arap-label", children: [
|
|
3819
|
+
icon ?? (featureKey ? /* @__PURE__ */ jsx33(FeatureIcon, { name: featureKey }) : null),
|
|
3820
|
+
/* @__PURE__ */ jsx33("span", { className: "arap-card-title", children: title })
|
|
3543
3821
|
] }),
|
|
3544
|
-
statusBadge && /* @__PURE__ */
|
|
3822
|
+
statusBadge && /* @__PURE__ */ jsx33("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
3545
3823
|
] }),
|
|
3546
|
-
description && /* @__PURE__ */
|
|
3547
|
-
status === "error" && errorMessage && /* @__PURE__ */
|
|
3548
|
-
/* @__PURE__ */
|
|
3549
|
-
/* @__PURE__ */
|
|
3824
|
+
description && /* @__PURE__ */ jsx33("p", { className: "arap-card-desc", children: description }),
|
|
3825
|
+
status === "error" && errorMessage && /* @__PURE__ */ jsxs30("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
3826
|
+
/* @__PURE__ */ jsx33("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3827
|
+
/* @__PURE__ */ jsx33("span", { children: errorMessage })
|
|
3550
3828
|
] }),
|
|
3551
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */
|
|
3552
|
-
/* @__PURE__ */
|
|
3553
|
-
/* @__PURE__ */
|
|
3829
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs30("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
3830
|
+
/* @__PURE__ */ jsx33("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
3831
|
+
/* @__PURE__ */ jsx33("span", { children: unavailableMessage })
|
|
3554
3832
|
] }),
|
|
3555
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */
|
|
3556
|
-
/* @__PURE__ */
|
|
3557
|
-
/* @__PURE__ */
|
|
3558
|
-
/* @__PURE__ */
|
|
3559
|
-
onRequestPermission && /* @__PURE__ */
|
|
3833
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs30("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
3834
|
+
/* @__PURE__ */ jsx33("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
3835
|
+
/* @__PURE__ */ jsxs30("div", { className: "arap-permission-content", children: [
|
|
3836
|
+
/* @__PURE__ */ jsx33("span", { children: permissionMessage }),
|
|
3837
|
+
onRequestPermission && /* @__PURE__ */ jsx33(
|
|
3560
3838
|
"button",
|
|
3561
3839
|
{
|
|
3562
3840
|
type: "button",
|
|
@@ -3567,14 +3845,14 @@ function FeatureCard({
|
|
|
3567
3845
|
)
|
|
3568
3846
|
] })
|
|
3569
3847
|
] }),
|
|
3570
|
-
/* @__PURE__ */
|
|
3848
|
+
/* @__PURE__ */ jsx33("div", { className: "arap-card-content", children })
|
|
3571
3849
|
]
|
|
3572
3850
|
}
|
|
3573
3851
|
);
|
|
3574
3852
|
}
|
|
3575
3853
|
|
|
3576
3854
|
// src/core/controls/FeatureStatusState.tsx
|
|
3577
|
-
import { jsx as
|
|
3855
|
+
import { jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3578
3856
|
function SearchCount({
|
|
3579
3857
|
totalCount,
|
|
3580
3858
|
matchedCount,
|
|
@@ -3583,7 +3861,7 @@ function SearchCount({
|
|
|
3583
3861
|
style
|
|
3584
3862
|
}) {
|
|
3585
3863
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
3586
|
-
return /* @__PURE__ */
|
|
3864
|
+
return /* @__PURE__ */ jsx34(
|
|
3587
3865
|
"div",
|
|
3588
3866
|
{
|
|
3589
3867
|
role: "status",
|
|
@@ -3603,17 +3881,17 @@ function EmptyState({
|
|
|
3603
3881
|
className = "",
|
|
3604
3882
|
style
|
|
3605
3883
|
}) {
|
|
3606
|
-
return /* @__PURE__ */
|
|
3884
|
+
return /* @__PURE__ */ jsxs31(
|
|
3607
3885
|
"div",
|
|
3608
3886
|
{
|
|
3609
3887
|
role: "status",
|
|
3610
3888
|
className: `arap-empty-state ${className}`,
|
|
3611
3889
|
style,
|
|
3612
3890
|
children: [
|
|
3613
|
-
/* @__PURE__ */
|
|
3614
|
-
/* @__PURE__ */
|
|
3615
|
-
/* @__PURE__ */
|
|
3616
|
-
onAction && /* @__PURE__ */
|
|
3891
|
+
/* @__PURE__ */ jsx34("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
3892
|
+
/* @__PURE__ */ jsx34("h3", { className: "arap-empty-title", children: title }),
|
|
3893
|
+
/* @__PURE__ */ jsx34("p", { className: "arap-empty-desc", children: description }),
|
|
3894
|
+
onAction && /* @__PURE__ */ jsx34("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
3617
3895
|
]
|
|
3618
3896
|
}
|
|
3619
3897
|
);
|
|
@@ -3626,18 +3904,18 @@ function ErrorState({
|
|
|
3626
3904
|
className = "",
|
|
3627
3905
|
style
|
|
3628
3906
|
}) {
|
|
3629
|
-
return /* @__PURE__ */
|
|
3907
|
+
return /* @__PURE__ */ jsxs31(
|
|
3630
3908
|
"div",
|
|
3631
3909
|
{
|
|
3632
3910
|
role: "alert",
|
|
3633
3911
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
3634
3912
|
style,
|
|
3635
3913
|
children: [
|
|
3636
|
-
/* @__PURE__ */
|
|
3637
|
-
/* @__PURE__ */
|
|
3638
|
-
title && /* @__PURE__ */
|
|
3639
|
-
/* @__PURE__ */
|
|
3640
|
-
onRetry && /* @__PURE__ */
|
|
3914
|
+
/* @__PURE__ */ jsx34("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3915
|
+
/* @__PURE__ */ jsxs31("div", { className: "arap-error-content", children: [
|
|
3916
|
+
title && /* @__PURE__ */ jsx34("h4", { className: "arap-error-title", children: title }),
|
|
3917
|
+
/* @__PURE__ */ jsx34("p", { className: "arap-error-message", children: message }),
|
|
3918
|
+
onRetry && /* @__PURE__ */ jsx34("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
3641
3919
|
] })
|
|
3642
3920
|
]
|
|
3643
3921
|
}
|
|
@@ -3645,7 +3923,7 @@ function ErrorState({
|
|
|
3645
3923
|
}
|
|
3646
3924
|
|
|
3647
3925
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
3648
|
-
import { jsx as
|
|
3926
|
+
import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3649
3927
|
function ProfilePreviewCard({
|
|
3650
3928
|
profile,
|
|
3651
3929
|
isActive,
|
|
@@ -3695,7 +3973,7 @@ function ProfilePreviewCard({
|
|
|
3695
3973
|
if (val === null || val === void 0) return "Original";
|
|
3696
3974
|
return String(val);
|
|
3697
3975
|
};
|
|
3698
|
-
return /* @__PURE__ */
|
|
3976
|
+
return /* @__PURE__ */ jsxs32(
|
|
3699
3977
|
"div",
|
|
3700
3978
|
{
|
|
3701
3979
|
role: "group",
|
|
@@ -3703,10 +3981,10 @@ function ProfilePreviewCard({
|
|
|
3703
3981
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3704
3982
|
style,
|
|
3705
3983
|
children: [
|
|
3706
|
-
/* @__PURE__ */
|
|
3707
|
-
/* @__PURE__ */
|
|
3708
|
-
/* @__PURE__ */
|
|
3709
|
-
isActive && /* @__PURE__ */
|
|
3984
|
+
/* @__PURE__ */ jsxs32("div", { className: "arap-profile-header", children: [
|
|
3985
|
+
/* @__PURE__ */ jsxs32("div", { className: "arap-profile-title-row", children: [
|
|
3986
|
+
/* @__PURE__ */ jsx35("h4", { className: "arap-profile-title", children: profile.label }),
|
|
3987
|
+
isActive && /* @__PURE__ */ jsx35(
|
|
3710
3988
|
"span",
|
|
3711
3989
|
{
|
|
3712
3990
|
className: "arap-profile-active-badge",
|
|
@@ -3715,14 +3993,14 @@ function ProfilePreviewCard({
|
|
|
3715
3993
|
}
|
|
3716
3994
|
)
|
|
3717
3995
|
] }),
|
|
3718
|
-
/* @__PURE__ */
|
|
3996
|
+
/* @__PURE__ */ jsx35("p", { className: "arap-profile-desc", children: profile.description })
|
|
3719
3997
|
] }),
|
|
3720
|
-
/* @__PURE__ */
|
|
3721
|
-
/* @__PURE__ */
|
|
3722
|
-
/* @__PURE__ */
|
|
3998
|
+
/* @__PURE__ */ jsxs32("div", { className: "arap-profile-affected", children: [
|
|
3999
|
+
/* @__PURE__ */ jsx35("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
4000
|
+
/* @__PURE__ */ jsx35("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
3723
4001
|
const val = profile.settings[key];
|
|
3724
|
-
return /* @__PURE__ */
|
|
3725
|
-
/* @__PURE__ */
|
|
4002
|
+
return /* @__PURE__ */ jsxs32("span", { className: "arap-profile-chip", children: [
|
|
4003
|
+
/* @__PURE__ */ jsxs32("strong", { children: [
|
|
3726
4004
|
formatKeyName(key),
|
|
3727
4005
|
":"
|
|
3728
4006
|
] }),
|
|
@@ -3731,7 +4009,7 @@ function ProfilePreviewCard({
|
|
|
3731
4009
|
] }, key);
|
|
3732
4010
|
}) })
|
|
3733
4011
|
] }),
|
|
3734
|
-
/* @__PURE__ */
|
|
4012
|
+
/* @__PURE__ */ jsx35("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ jsx35(
|
|
3735
4013
|
"button",
|
|
3736
4014
|
{
|
|
3737
4015
|
type: "button",
|
|
@@ -3740,7 +4018,7 @@ function ProfilePreviewCard({
|
|
|
3740
4018
|
"aria-label": `Revert ${profile.label} profile`,
|
|
3741
4019
|
children: "Revert to custom settings"
|
|
3742
4020
|
}
|
|
3743
|
-
) : /* @__PURE__ */
|
|
4021
|
+
) : /* @__PURE__ */ jsx35(
|
|
3744
4022
|
"button",
|
|
3745
4023
|
{
|
|
3746
4024
|
type: "button",
|
|
@@ -3773,11 +4051,13 @@ export {
|
|
|
3773
4051
|
FONT_FAMILY_PRESETS,
|
|
3774
4052
|
FONT_FAMILY_PROTECTED_SELECTOR,
|
|
3775
4053
|
FeatureCard,
|
|
4054
|
+
FocusHighlightController,
|
|
3776
4055
|
FontFamilyController,
|
|
3777
4056
|
FontSizeController,
|
|
3778
4057
|
GrayscaleController,
|
|
3779
4058
|
HideImagesController,
|
|
3780
4059
|
HideVideosController,
|
|
4060
|
+
HighlightFocusController,
|
|
3781
4061
|
InvertColorsController,
|
|
3782
4062
|
LEGIBLE_FONT_STACK,
|
|
3783
4063
|
LINE_HEIGHT_RATIOS,
|
|
@@ -3790,9 +4070,11 @@ export {
|
|
|
3790
4070
|
ProfilePreviewCard,
|
|
3791
4071
|
ReadingGuideController,
|
|
3792
4072
|
ReadingMaskController,
|
|
4073
|
+
ReduceMotionController,
|
|
3793
4074
|
ResetController,
|
|
3794
4075
|
SaturationController,
|
|
3795
4076
|
SearchCount,
|
|
4077
|
+
SkipToMainLink,
|
|
3796
4078
|
StepperControl,
|
|
3797
4079
|
TEXT_ALIGN_BLOCK_SELECTOR,
|
|
3798
4080
|
TEXT_SCALE_PROTECTED_SELECTOR,
|
|
@@ -3804,6 +4086,7 @@ export {
|
|
|
3804
4086
|
WordSpacingController,
|
|
3805
4087
|
createInitialPreferencesState,
|
|
3806
4088
|
enLocale,
|
|
4089
|
+
findMainLandmark,
|
|
3807
4090
|
getScriptSpacingConstraints,
|
|
3808
4091
|
isForcedColorsActive,
|
|
3809
4092
|
isProtectedFromContrast,
|
|
@@ -3811,6 +4094,7 @@ export {
|
|
|
3811
4094
|
isProtectedFromTextAlign,
|
|
3812
4095
|
isProtectedFromTextScale,
|
|
3813
4096
|
isProtectedFromTextSpacing,
|
|
4097
|
+
isReducedMotionActive,
|
|
3814
4098
|
isRtlLocale,
|
|
3815
4099
|
normalizePreferenceValue,
|
|
3816
4100
|
normalizePreferences,
|
|
@@ -3818,6 +4102,8 @@ export {
|
|
|
3818
4102
|
registerLocale,
|
|
3819
4103
|
resolveEffectivePreferences,
|
|
3820
4104
|
resolveLocaleStrings,
|
|
4105
|
+
subscribeForcedColors,
|
|
4106
|
+
subscribeReducedMotion,
|
|
3821
4107
|
useAccessibility
|
|
3822
4108
|
};
|
|
3823
4109
|
//# sourceMappingURL=index.mjs.map
|