accessibility-plugin-react 2.4.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -18
- package/dist/index.d.mts +73 -3
- package/dist/index.d.ts +73 -3
- package/dist/index.js +1006 -246
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +970 -225
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +39 -0
- package/docs/API.md +7 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +2 -2
- package/docs/FEATURES.md +20 -18
- package/docs/FONTS.md +97 -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-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');
|
|
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');
|
|
28
28
|
|
|
29
29
|
// src/core/AccessibilityPlugin.tsx
|
|
30
30
|
import {
|
|
@@ -242,12 +242,36 @@ function createPreferenceStore(key, persist, storageMode) {
|
|
|
242
242
|
var numberIn = (min, max) => (v) => typeof v === "number" && Number.isFinite(v) && v >= min && v <= max;
|
|
243
243
|
var oneOf = (...values) => (v) => values.includes(v);
|
|
244
244
|
var TEXT_SCALE_STEPS = [1, 1.125, 1.25, 1.5, 2];
|
|
245
|
+
var LINE_HEIGHT_STEPS = [100, 150, 175, 200];
|
|
246
|
+
var LINE_HEIGHT_RATIOS = [1, 1.5, 1.75, 2];
|
|
247
|
+
var FONT_FAMILY_PRESETS = [
|
|
248
|
+
"default",
|
|
249
|
+
"legible",
|
|
250
|
+
"dyslexia-option"
|
|
251
|
+
];
|
|
245
252
|
var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
246
253
|
fontSize: { defaultValue: 100, validate: numberIn(50, 200) },
|
|
247
254
|
fontScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
248
255
|
textScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
249
|
-
lineHeight: {
|
|
250
|
-
|
|
256
|
+
lineHeight: {
|
|
257
|
+
defaultValue: 100,
|
|
258
|
+
validate: (v) => typeof v === "number" && Number.isFinite(v) && (v >= 0.5 && v <= 2.5 || v >= 50 && v <= 200)
|
|
259
|
+
},
|
|
260
|
+
letterSpacing: { defaultValue: 0, validate: numberIn(0, 20) },
|
|
261
|
+
wordSpacing: { defaultValue: 0, validate: numberIn(0, 20) },
|
|
262
|
+
paragraphSpacing: { defaultValue: 0, validate: numberIn(0, 64) },
|
|
263
|
+
letterSpacingEm: {
|
|
264
|
+
defaultValue: null,
|
|
265
|
+
validate: (v) => v === null || numberIn(0, 1)(v)
|
|
266
|
+
},
|
|
267
|
+
wordSpacingEm: {
|
|
268
|
+
defaultValue: null,
|
|
269
|
+
validate: (v) => v === null || numberIn(0, 1)(v)
|
|
270
|
+
},
|
|
271
|
+
paragraphSpacingEm: {
|
|
272
|
+
defaultValue: null,
|
|
273
|
+
validate: (v) => v === null || numberIn(0, 2)(v)
|
|
274
|
+
},
|
|
251
275
|
contrast: {
|
|
252
276
|
defaultValue: 0,
|
|
253
277
|
validate: oneOf(
|
|
@@ -266,6 +290,16 @@ var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
|
266
290
|
defaultValue: "default",
|
|
267
291
|
validate: oneOf("default", "left", "center", "right", "justify")
|
|
268
292
|
},
|
|
293
|
+
fontFamily: {
|
|
294
|
+
defaultValue: "default",
|
|
295
|
+
validate: oneOf(
|
|
296
|
+
"default",
|
|
297
|
+
"original",
|
|
298
|
+
"legible",
|
|
299
|
+
"dyslexia-option",
|
|
300
|
+
"dyslexia"
|
|
301
|
+
)
|
|
302
|
+
},
|
|
269
303
|
linkHighlight: {
|
|
270
304
|
defaultValue: false,
|
|
271
305
|
validate: oneOf(
|
|
@@ -378,6 +412,245 @@ function isProtectedFromTextScale(element) {
|
|
|
378
412
|
}
|
|
379
413
|
return false;
|
|
380
414
|
}
|
|
415
|
+
var TEXT_SPACING_EXCLUDED_SELECTOR = [
|
|
416
|
+
"input",
|
|
417
|
+
"textarea",
|
|
418
|
+
"select",
|
|
419
|
+
"select *",
|
|
420
|
+
"option",
|
|
421
|
+
"optgroup",
|
|
422
|
+
"button",
|
|
423
|
+
"button *",
|
|
424
|
+
"datalist",
|
|
425
|
+
"output",
|
|
426
|
+
"progress",
|
|
427
|
+
"meter",
|
|
428
|
+
"label",
|
|
429
|
+
"label *",
|
|
430
|
+
"legend",
|
|
431
|
+
"legend *",
|
|
432
|
+
'[role="button"]',
|
|
433
|
+
'[role="button"] *',
|
|
434
|
+
'[role="checkbox"]',
|
|
435
|
+
'[role="combobox"]',
|
|
436
|
+
'[role="menuitem"]',
|
|
437
|
+
'[role="tab"]',
|
|
438
|
+
"pre",
|
|
439
|
+
"pre *",
|
|
440
|
+
"code",
|
|
441
|
+
"kbd",
|
|
442
|
+
"samp",
|
|
443
|
+
"var",
|
|
444
|
+
"table",
|
|
445
|
+
"table *",
|
|
446
|
+
"thead",
|
|
447
|
+
"thead *",
|
|
448
|
+
"tbody",
|
|
449
|
+
"tbody *",
|
|
450
|
+
"tfoot",
|
|
451
|
+
"tfoot *",
|
|
452
|
+
"tr",
|
|
453
|
+
"tr *",
|
|
454
|
+
"th",
|
|
455
|
+
"th *",
|
|
456
|
+
"td",
|
|
457
|
+
"td *",
|
|
458
|
+
"caption",
|
|
459
|
+
"colgroup",
|
|
460
|
+
"col",
|
|
461
|
+
'[role="table"]',
|
|
462
|
+
'[role="table"] *',
|
|
463
|
+
'[role="grid"]',
|
|
464
|
+
'[role="grid"] *',
|
|
465
|
+
'[role="row"]',
|
|
466
|
+
'[role="row"] *',
|
|
467
|
+
'[role="cell"]',
|
|
468
|
+
'[role="cell"] *',
|
|
469
|
+
'[role="columnheader"]',
|
|
470
|
+
'[role="columnheader"] *',
|
|
471
|
+
'[role="rowheader"]',
|
|
472
|
+
'[role="rowheader"] *',
|
|
473
|
+
"svg",
|
|
474
|
+
"svg *",
|
|
475
|
+
"[data-icon]",
|
|
476
|
+
"[data-icon] *",
|
|
477
|
+
'i[class*="icon"]',
|
|
478
|
+
'span[class*="icon"]',
|
|
479
|
+
'i[class*="fa-"]',
|
|
480
|
+
'span[class*="fa-"]',
|
|
481
|
+
'i[class*="material-symbols"]',
|
|
482
|
+
'span[class*="material-symbols"]',
|
|
483
|
+
'i[class*="lucide"]',
|
|
484
|
+
'span[class*="lucide"]',
|
|
485
|
+
"[data-arap-ignore]",
|
|
486
|
+
"[data-arap-ignore] *",
|
|
487
|
+
"[data-arap-exempt]",
|
|
488
|
+
"[data-arap-exempt] *",
|
|
489
|
+
"[data-arap-ui]",
|
|
490
|
+
"[data-arap-ui] *",
|
|
491
|
+
".arap-root",
|
|
492
|
+
".arap-root *"
|
|
493
|
+
].join(", ");
|
|
494
|
+
function isProtectedFromTextSpacing(element) {
|
|
495
|
+
try {
|
|
496
|
+
if (element.matches(EXCLUDED)) return true;
|
|
497
|
+
if (element.matches(TEXT_SPACING_EXCLUDED_SELECTOR)) return true;
|
|
498
|
+
if (element.closest(
|
|
499
|
+
"pre, button, label, legend, select, textarea, [role='button'], table, [role='table'], [role='grid'], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
500
|
+
)) {
|
|
501
|
+
return true;
|
|
502
|
+
}
|
|
503
|
+
} catch {
|
|
504
|
+
return false;
|
|
505
|
+
}
|
|
506
|
+
return false;
|
|
507
|
+
}
|
|
508
|
+
var TEXT_ALIGN_BLOCK_SELECTOR = [
|
|
509
|
+
"p",
|
|
510
|
+
"h1",
|
|
511
|
+
"h2",
|
|
512
|
+
"h3",
|
|
513
|
+
"h4",
|
|
514
|
+
"h5",
|
|
515
|
+
"h6",
|
|
516
|
+
"li",
|
|
517
|
+
"blockquote",
|
|
518
|
+
"dt",
|
|
519
|
+
"dd",
|
|
520
|
+
"figcaption",
|
|
521
|
+
'[role="paragraph"]',
|
|
522
|
+
'[role="heading"]'
|
|
523
|
+
].join(", ");
|
|
524
|
+
function isProtectedFromTextAlign(element) {
|
|
525
|
+
try {
|
|
526
|
+
if (element.matches(EXCLUDED)) return true;
|
|
527
|
+
if (element.matches(TEXT_SPACING_EXCLUDED_SELECTOR)) return true;
|
|
528
|
+
if (element.closest(
|
|
529
|
+
"pre, code, kbd, samp, var, button, input, select, textarea, [role='button'], table, [role='table'], [role='grid'], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
530
|
+
)) {
|
|
531
|
+
return true;
|
|
532
|
+
}
|
|
533
|
+
} catch {
|
|
534
|
+
return false;
|
|
535
|
+
}
|
|
536
|
+
return false;
|
|
537
|
+
}
|
|
538
|
+
var LEGIBLE_FONT_STACK = [
|
|
539
|
+
"system-ui",
|
|
540
|
+
"-apple-system",
|
|
541
|
+
"BlinkMacSystemFont",
|
|
542
|
+
'"Segoe UI"',
|
|
543
|
+
"Roboto",
|
|
544
|
+
'"Helvetica Neue"',
|
|
545
|
+
"Arial",
|
|
546
|
+
'"Noto Sans Sinhala"',
|
|
547
|
+
'"Iskoola Pota"',
|
|
548
|
+
'"Noto Sans Tamil"',
|
|
549
|
+
'"Latha"',
|
|
550
|
+
'"Nirmala UI"',
|
|
551
|
+
"sans-serif"
|
|
552
|
+
].join(", ");
|
|
553
|
+
var DYSLEXIA_FONT_STACK = [
|
|
554
|
+
"OpenDyslexic",
|
|
555
|
+
'"Comic Sans MS"',
|
|
556
|
+
'"Trebuchet MS"',
|
|
557
|
+
'"Arial Rounded MT Bold"',
|
|
558
|
+
'"Noto Sans Sinhala"',
|
|
559
|
+
'"Iskoola Pota"',
|
|
560
|
+
'"Noto Sans Tamil"',
|
|
561
|
+
'"Latha"',
|
|
562
|
+
"sans-serif"
|
|
563
|
+
].join(", ");
|
|
564
|
+
var FONT_FAMILY_PROTECTED_SELECTOR = [
|
|
565
|
+
"pre",
|
|
566
|
+
"pre *",
|
|
567
|
+
"code",
|
|
568
|
+
"code *",
|
|
569
|
+
"kbd",
|
|
570
|
+
"kbd *",
|
|
571
|
+
"samp",
|
|
572
|
+
"samp *",
|
|
573
|
+
"var",
|
|
574
|
+
"var *",
|
|
575
|
+
"svg",
|
|
576
|
+
"svg *",
|
|
577
|
+
"[data-icon]",
|
|
578
|
+
"[data-icon] *",
|
|
579
|
+
'i[class*="icon"]',
|
|
580
|
+
'span[class*="icon"]',
|
|
581
|
+
'i[class*="fa-"]',
|
|
582
|
+
'span[class*="fa-"]',
|
|
583
|
+
'i[class*="material-symbols"]',
|
|
584
|
+
'span[class*="material-symbols"]',
|
|
585
|
+
'i[class*="lucide"]',
|
|
586
|
+
'span[class*="lucide"]',
|
|
587
|
+
"[data-arap-ignore]",
|
|
588
|
+
"[data-arap-ignore] *",
|
|
589
|
+
"[data-arap-exempt]",
|
|
590
|
+
"[data-arap-exempt] *",
|
|
591
|
+
"[data-arap-ui]",
|
|
592
|
+
"[data-arap-ui] *",
|
|
593
|
+
".arap-root",
|
|
594
|
+
".arap-root *"
|
|
595
|
+
].join(", ");
|
|
596
|
+
function isProtectedFromFontFamily(element) {
|
|
597
|
+
try {
|
|
598
|
+
if (element.matches(EXCLUDED)) return true;
|
|
599
|
+
if (element.matches(FONT_FAMILY_PROTECTED_SELECTOR)) return true;
|
|
600
|
+
if (element.closest(
|
|
601
|
+
"pre, code, kbd, samp, var, svg, [data-icon], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
602
|
+
)) {
|
|
603
|
+
return true;
|
|
604
|
+
}
|
|
605
|
+
} catch {
|
|
606
|
+
return false;
|
|
607
|
+
}
|
|
608
|
+
return false;
|
|
609
|
+
}
|
|
610
|
+
var ARABIC_SCRIPT_REGEX = /[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/;
|
|
611
|
+
var INDIC_SCRIPT_REGEX = /[\u0900-\u0DFF]/;
|
|
612
|
+
var CURSIVE_LANG_REGEX = /^(ar|fa|ur|ug|dv|ps|ku)($|-)/i;
|
|
613
|
+
var INDIC_LANG_REGEX = /^(si|ta|hi|bn|te|kn|ml|gu|pa|mr|ne|sa)($|-)/i;
|
|
614
|
+
function getScriptSpacingConstraints(element) {
|
|
615
|
+
const lang = element.closest("[lang]")?.getAttribute("lang") || document.documentElement.lang || "";
|
|
616
|
+
const dir = element.closest("[dir]")?.getAttribute("dir") || document.documentElement.dir || "";
|
|
617
|
+
if (CURSIVE_LANG_REGEX.test(lang) || dir.toLowerCase() === "rtl") {
|
|
618
|
+
return {
|
|
619
|
+
allowLetterSpacing: false,
|
|
620
|
+
maxLetterSpacingPx: 0,
|
|
621
|
+
script: "cursive"
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
if (INDIC_LANG_REGEX.test(lang)) {
|
|
625
|
+
return {
|
|
626
|
+
allowLetterSpacing: true,
|
|
627
|
+
maxLetterSpacingPx: 1,
|
|
628
|
+
script: "indic"
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
const text = element.textContent || "";
|
|
632
|
+
if (text.length > 0) {
|
|
633
|
+
if (ARABIC_SCRIPT_REGEX.test(text)) {
|
|
634
|
+
return {
|
|
635
|
+
allowLetterSpacing: false,
|
|
636
|
+
maxLetterSpacingPx: 0,
|
|
637
|
+
script: "cursive"
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
if (INDIC_SCRIPT_REGEX.test(text)) {
|
|
641
|
+
return {
|
|
642
|
+
allowLetterSpacing: true,
|
|
643
|
+
maxLetterSpacingPx: 1,
|
|
644
|
+
script: "indic"
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
return {
|
|
649
|
+
allowLetterSpacing: true,
|
|
650
|
+
maxLetterSpacingPx: Infinity,
|
|
651
|
+
script: "standard"
|
|
652
|
+
};
|
|
653
|
+
}
|
|
381
654
|
function applyPage(values) {
|
|
382
655
|
const undo = [];
|
|
383
656
|
function set(element, property, value) {
|
|
@@ -399,19 +672,46 @@ function applyPage(values) {
|
|
|
399
672
|
const fontScaleValue = typeof values.fontScale === "number" && values.fontScale !== 1 ? values.fontScale : typeof values.textScale === "number" && values.textScale !== 1 ? values.textScale : void 0;
|
|
400
673
|
const fontSizeScale = typeof values.fontSize === "number" && values.fontSize !== 100 ? values.fontSize / 100 : void 0;
|
|
401
674
|
const font = fontScaleValue ?? fontSizeScale ?? 1;
|
|
402
|
-
const
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
675
|
+
const rawLineHeight = typeof values.lineHeight === "number" ? values.lineHeight : 100;
|
|
676
|
+
const lineRatio = rawLineHeight <= 2.5 ? rawLineHeight : rawLineHeight / 100;
|
|
677
|
+
const fontActive = font !== 1;
|
|
678
|
+
const lineActive = lineRatio !== 1;
|
|
679
|
+
if (fontActive || lineActive) {
|
|
680
|
+
const measurements = elements.filter(
|
|
681
|
+
(el) => !isProtectedFromTextScale(el) || !isProtectedFromTextSpacing(el)
|
|
682
|
+
).map((el) => {
|
|
683
|
+
const computed = getComputedStyle(el);
|
|
684
|
+
return {
|
|
685
|
+
el,
|
|
686
|
+
protectScale: isProtectedFromTextScale(el),
|
|
687
|
+
protectSpacing: isProtectedFromTextSpacing(el),
|
|
688
|
+
font: parseFloat(computed.fontSize) || 16,
|
|
689
|
+
line: parseFloat(computed.lineHeight) || (parseFloat(computed.fontSize) || 16) * 1.2
|
|
690
|
+
};
|
|
691
|
+
});
|
|
692
|
+
for (const measured of measurements) {
|
|
693
|
+
if (fontActive && !measured.protectScale) {
|
|
694
|
+
set(measured.el, "font-size", `${measured.font * font}px`);
|
|
695
|
+
}
|
|
696
|
+
if (measured.protectSpacing) {
|
|
697
|
+
if (fontActive && !measured.protectScale) {
|
|
698
|
+
set(measured.el, "line-height", `${measured.line * font}px`);
|
|
699
|
+
} else if (lineActive) {
|
|
700
|
+
const prev = measured.el.style.getPropertyValue("line-height");
|
|
701
|
+
if (!prev) {
|
|
702
|
+
set(measured.el, "line-height", `${measured.line}px`);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
} else {
|
|
706
|
+
if (lineActive || fontActive) {
|
|
707
|
+
set(
|
|
708
|
+
measured.el,
|
|
709
|
+
"line-height",
|
|
710
|
+
`${measured.line * lineRatio * font}px`
|
|
711
|
+
);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
415
715
|
}
|
|
416
716
|
const filter = composeFilter(values);
|
|
417
717
|
for (const el of Array.from(document.body.children)) {
|
|
@@ -429,11 +729,105 @@ function applyPage(values) {
|
|
|
429
729
|
const base = computed.filter;
|
|
430
730
|
set(el, "filter", `${base && base !== "none" ? base + " " : ""}${filter}`);
|
|
431
731
|
}
|
|
732
|
+
const letterSpacingVal = typeof values.letterSpacing === "number" && values.letterSpacing > 0 ? values.letterSpacing : 0;
|
|
733
|
+
const letterSpacingEmVal = typeof values.letterSpacingEm === "number" && values.letterSpacingEm > 0 ? values.letterSpacingEm : null;
|
|
734
|
+
if (letterSpacingVal > 0 || letterSpacingEmVal !== null) {
|
|
735
|
+
for (const el of elements) {
|
|
736
|
+
if (isProtectedFromTextSpacing(el)) {
|
|
737
|
+
if (el.matches(
|
|
738
|
+
"table, [role='table'], td, th, pre, code, kbd, samp, var, button, input, select, textarea, [data-arap-ui]"
|
|
739
|
+
)) {
|
|
740
|
+
const previous = el.style.getPropertyValue("letter-spacing");
|
|
741
|
+
if (!previous) {
|
|
742
|
+
set(el, "letter-spacing", "normal");
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
continue;
|
|
746
|
+
}
|
|
747
|
+
const scriptLimits = getScriptSpacingConstraints(el);
|
|
748
|
+
if (!scriptLimits.allowLetterSpacing) {
|
|
749
|
+
const previous = el.style.getPropertyValue("letter-spacing");
|
|
750
|
+
if (!previous) {
|
|
751
|
+
set(el, "letter-spacing", "normal");
|
|
752
|
+
}
|
|
753
|
+
continue;
|
|
754
|
+
}
|
|
755
|
+
let targetSpacing;
|
|
756
|
+
if (letterSpacingEmVal !== null) {
|
|
757
|
+
const clampedEm = scriptLimits.maxLetterSpacingPx === 1 ? Math.min(letterSpacingEmVal, 0.05) : letterSpacingEmVal;
|
|
758
|
+
targetSpacing = `${clampedEm}em`;
|
|
759
|
+
} else {
|
|
760
|
+
const clampedPx = Math.min(
|
|
761
|
+
letterSpacingVal,
|
|
762
|
+
scriptLimits.maxLetterSpacingPx
|
|
763
|
+
);
|
|
764
|
+
targetSpacing = `${clampedPx}px`;
|
|
765
|
+
}
|
|
766
|
+
set(el, "letter-spacing", targetSpacing);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
const wordSpacingVal = typeof values.wordSpacing === "number" && values.wordSpacing > 0 ? values.wordSpacing : 0;
|
|
770
|
+
const wordSpacingEmVal = typeof values.wordSpacingEm === "number" && values.wordSpacingEm > 0 ? values.wordSpacingEm : null;
|
|
771
|
+
if (wordSpacingVal > 0 || wordSpacingEmVal !== null) {
|
|
772
|
+
for (const el of elements) {
|
|
773
|
+
if (isProtectedFromTextSpacing(el)) {
|
|
774
|
+
if (el.matches(
|
|
775
|
+
"table, [role='table'], td, th, pre, code, kbd, samp, var, button, input, select, textarea, [data-arap-ui]"
|
|
776
|
+
)) {
|
|
777
|
+
const previous = el.style.getPropertyValue("word-spacing");
|
|
778
|
+
if (!previous) {
|
|
779
|
+
set(el, "word-spacing", "normal");
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
continue;
|
|
783
|
+
}
|
|
784
|
+
const targetSpacing = wordSpacingEmVal !== null ? `${wordSpacingEmVal}em` : `${wordSpacingVal}px`;
|
|
785
|
+
set(el, "word-spacing", targetSpacing);
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
const paragraphSpacingVal = typeof values.paragraphSpacing === "number" && values.paragraphSpacing > 0 ? values.paragraphSpacing : 0;
|
|
789
|
+
const paragraphSpacingEmVal = typeof values.paragraphSpacingEm === "number" && values.paragraphSpacingEm > 0 ? values.paragraphSpacingEm : null;
|
|
790
|
+
if (paragraphSpacingVal > 0 || paragraphSpacingEmVal !== null) {
|
|
791
|
+
for (const el of elements) {
|
|
792
|
+
if (isProtectedFromTextSpacing(el)) continue;
|
|
793
|
+
if (el.matches("p, [role='paragraph']")) {
|
|
794
|
+
const computed = getComputedStyle(el);
|
|
795
|
+
const baseMargin = parseFloat(computed.marginBottom) || 0;
|
|
796
|
+
const targetMargin = paragraphSpacingEmVal !== null ? `${paragraphSpacingEmVal}em` : `${baseMargin + paragraphSpacingVal}px`;
|
|
797
|
+
set(el, "margin-bottom", targetMargin);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
const textAlignVal = values.textAlign ? String(values.textAlign) : "default";
|
|
802
|
+
if (textAlignVal !== "default" && textAlignVal !== "original") {
|
|
803
|
+
for (const el of elements) {
|
|
804
|
+
if (isProtectedFromTextAlign(el)) continue;
|
|
805
|
+
if (el.matches(TEXT_ALIGN_BLOCK_SELECTOR)) {
|
|
806
|
+
set(el, "text-align", textAlignVal);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
const fontFamilyVal = values.fontFamily ? String(values.fontFamily) : "default";
|
|
811
|
+
if (fontFamilyVal !== "default" && fontFamilyVal !== "original") {
|
|
812
|
+
const targetStack = fontFamilyVal === "dyslexia-option" || fontFamilyVal === "dyslexia" ? DYSLEXIA_FONT_STACK : LEGIBLE_FONT_STACK;
|
|
813
|
+
for (const el of elements) {
|
|
814
|
+
if (isProtectedFromFontFamily(el)) {
|
|
815
|
+
if (el.matches("pre, code, kbd, samp, var")) {
|
|
816
|
+
const previous = el.style.getPropertyValue("font-family");
|
|
817
|
+
if (!previous) {
|
|
818
|
+
set(
|
|
819
|
+
el,
|
|
820
|
+
"font-family",
|
|
821
|
+
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
|
|
822
|
+
);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
continue;
|
|
826
|
+
}
|
|
827
|
+
set(el, "font-family", targetStack);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
432
830
|
for (const el of elements) {
|
|
433
|
-
if (Number(values.letterSpacing) > 0)
|
|
434
|
-
set(el, "letter-spacing", `${values.letterSpacing}px`);
|
|
435
|
-
if (values.textAlign && values.textAlign !== "default")
|
|
436
|
-
set(el, "text-align", String(values.textAlign));
|
|
437
831
|
if (values.bigCursor) set(el, "cursor", cursor);
|
|
438
832
|
if (values.hideImages) {
|
|
439
833
|
if (el.matches("img, picture")) set(el, "visibility", "hidden");
|
|
@@ -752,6 +1146,9 @@ var enLocale = Object.freeze({
|
|
|
752
1146
|
resetAll: "Reset All",
|
|
753
1147
|
statementLink: "Accessibility Statement",
|
|
754
1148
|
openInNewTab: "opens in a new tab",
|
|
1149
|
+
creditsPrefix: "Designed and developed by",
|
|
1150
|
+
creditsName: "Praboth",
|
|
1151
|
+
documentationLink: "Official documentation",
|
|
755
1152
|
buttonTitle: "Accessibility",
|
|
756
1153
|
dragHelp: "Drag to move, or use Alt and arrow keys. The Move button menu offers click and keyboard controls.",
|
|
757
1154
|
positionLabel: "Button position",
|
|
@@ -1225,7 +1622,45 @@ function Panel({
|
|
|
1225
1622
|
] })
|
|
1226
1623
|
]
|
|
1227
1624
|
}
|
|
1228
|
-
) })
|
|
1625
|
+
) }),
|
|
1626
|
+
/* @__PURE__ */ jsxs4("div", { className: "arap-credits", children: [
|
|
1627
|
+
/* @__PURE__ */ jsxs4("span", { children: [
|
|
1628
|
+
strings.creditsPrefix ?? "Designed and developed by",
|
|
1629
|
+
" ",
|
|
1630
|
+
/* @__PURE__ */ jsxs4(
|
|
1631
|
+
"a",
|
|
1632
|
+
{
|
|
1633
|
+
href: "https://www.praboth.com",
|
|
1634
|
+
target: "_blank",
|
|
1635
|
+
rel: "noopener noreferrer",
|
|
1636
|
+
children: [
|
|
1637
|
+
strings.creditsName ?? "Praboth",
|
|
1638
|
+
/* @__PURE__ */ jsxs4("span", { className: "arap-sr-only", children: [
|
|
1639
|
+
" (",
|
|
1640
|
+
strings.openInNewTab,
|
|
1641
|
+
")"
|
|
1642
|
+
] })
|
|
1643
|
+
]
|
|
1644
|
+
}
|
|
1645
|
+
)
|
|
1646
|
+
] }),
|
|
1647
|
+
/* @__PURE__ */ jsxs4(
|
|
1648
|
+
"a",
|
|
1649
|
+
{
|
|
1650
|
+
href: "https://www.praboth.com/accessibility-plugin-react",
|
|
1651
|
+
target: "_blank",
|
|
1652
|
+
rel: "noopener noreferrer",
|
|
1653
|
+
children: [
|
|
1654
|
+
strings.documentationLink ?? "Official documentation",
|
|
1655
|
+
/* @__PURE__ */ jsxs4("span", { className: "arap-sr-only", children: [
|
|
1656
|
+
" (",
|
|
1657
|
+
strings.openInNewTab,
|
|
1658
|
+
")"
|
|
1659
|
+
] })
|
|
1660
|
+
]
|
|
1661
|
+
}
|
|
1662
|
+
)
|
|
1663
|
+
] })
|
|
1229
1664
|
]
|
|
1230
1665
|
}
|
|
1231
1666
|
);
|
|
@@ -1581,6 +2016,8 @@ var drawings = {
|
|
|
1581
2016
|
fontSize: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("path", { d: "M3 18 8 5l5 13M5 13h6M15 18l3-8 3 8M16 15h4" }) }),
|
|
1582
2017
|
lineHeight: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("path", { d: "M9 6h12M9 12h9M9 18h12M4 4v16m-2-2 2 2 2-2M2 6l2-2 2 2" }) }),
|
|
1583
2018
|
letterSpacing: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("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" }) }),
|
|
2019
|
+
wordSpacing: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("path", { d: "M4 6v12M20 6v12M9 12h6m-2-3 3 3-3 3m-4-3-3-3 3 3" }) }),
|
|
2020
|
+
paragraphSpacing: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("path", { d: "M4 5h16M4 9h12M4 19h16M4 15h12M18 10v4m-2-2 2-2 2 2m-4 2 2 2 2-2" }) }),
|
|
1584
2021
|
contrast: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1585
2022
|
/* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1586
2023
|
/* @__PURE__ */ jsx6("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
@@ -1600,6 +2037,7 @@ var drawings = {
|
|
|
1600
2037
|
] }),
|
|
1601
2038
|
linkHighlight: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("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" }) }),
|
|
1602
2039
|
textAlign: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("path", { d: "M3 5h18M3 10h12M3 15h18M3 20h12" }) }),
|
|
2040
|
+
fontFamily: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) }),
|
|
1603
2041
|
hideImages: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1604
2042
|
/* @__PURE__ */ jsx6("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
1605
2043
|
/* @__PURE__ */ jsx6("circle", { cx: "8", cy: "9", r: "1" }),
|
|
@@ -1811,11 +2249,44 @@ var DEFAULT_VALUE3 = 100;
|
|
|
1811
2249
|
var MIN2 = 50;
|
|
1812
2250
|
var MAX2 = 200;
|
|
1813
2251
|
var STEP2 = 10;
|
|
1814
|
-
function LineHeightController(
|
|
2252
|
+
function LineHeightController({
|
|
2253
|
+
steps: customSteps,
|
|
2254
|
+
stepPresets
|
|
2255
|
+
} = {}) {
|
|
1815
2256
|
const { value, setValue } = useAccessibility(
|
|
1816
2257
|
FEATURE_KEY3,
|
|
1817
2258
|
DEFAULT_VALUE3
|
|
1818
2259
|
);
|
|
2260
|
+
const normalizedValue = typeof value === "number" && value <= 2.5 ? Math.round(value * 100) : value ?? DEFAULT_VALUE3;
|
|
2261
|
+
const steps = customSteps ? customSteps.map((s) => s <= 2.5 ? Math.round(s * 100) : s) : stepPresets ? LINE_HEIGHT_STEPS : null;
|
|
2262
|
+
const handleDecrease = () => {
|
|
2263
|
+
if (steps && steps.length > 0) {
|
|
2264
|
+
const idx = steps.findIndex((s) => Math.abs(s - normalizedValue) < 0.1);
|
|
2265
|
+
if (idx > 0) {
|
|
2266
|
+
setValue(steps[idx - 1]);
|
|
2267
|
+
} else if (idx === -1) {
|
|
2268
|
+
const lower = [...steps].reverse().find((s) => s < normalizedValue);
|
|
2269
|
+
setValue(lower ?? steps[0]);
|
|
2270
|
+
}
|
|
2271
|
+
} else {
|
|
2272
|
+
setValue(Math.max(MIN2, normalizedValue - STEP2));
|
|
2273
|
+
}
|
|
2274
|
+
};
|
|
2275
|
+
const handleIncrease = () => {
|
|
2276
|
+
if (steps && steps.length > 0) {
|
|
2277
|
+
const idx = steps.findIndex((s) => Math.abs(s - normalizedValue) < 0.1);
|
|
2278
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2279
|
+
setValue(steps[idx + 1]);
|
|
2280
|
+
} else if (idx === -1) {
|
|
2281
|
+
const higher = steps.find((s) => s > normalizedValue);
|
|
2282
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2283
|
+
}
|
|
2284
|
+
} else {
|
|
2285
|
+
setValue(Math.min(MAX2, normalizedValue + STEP2));
|
|
2286
|
+
}
|
|
2287
|
+
};
|
|
2288
|
+
const isMin = steps && steps.length > 0 ? normalizedValue <= steps[0] : normalizedValue <= MIN2;
|
|
2289
|
+
const isMax = steps && steps.length > 0 ? normalizedValue >= steps[steps.length - 1] : normalizedValue >= MAX2;
|
|
1819
2290
|
return /* @__PURE__ */ jsxs8(
|
|
1820
2291
|
"div",
|
|
1821
2292
|
{
|
|
@@ -1832,23 +2303,23 @@ function LineHeightController() {
|
|
|
1832
2303
|
"button",
|
|
1833
2304
|
{
|
|
1834
2305
|
className: "arap-btn-sm",
|
|
1835
|
-
onClick:
|
|
1836
|
-
disabled:
|
|
2306
|
+
onClick: handleDecrease,
|
|
2307
|
+
disabled: isMin,
|
|
1837
2308
|
"aria-label": "Decrease line height",
|
|
1838
2309
|
type: "button",
|
|
1839
2310
|
children: "\u2212"
|
|
1840
2311
|
}
|
|
1841
2312
|
),
|
|
1842
2313
|
/* @__PURE__ */ jsxs8("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1843
|
-
|
|
2314
|
+
Math.round(normalizedValue),
|
|
1844
2315
|
"%"
|
|
1845
2316
|
] }),
|
|
1846
2317
|
/* @__PURE__ */ jsx9(
|
|
1847
2318
|
"button",
|
|
1848
2319
|
{
|
|
1849
2320
|
className: "arap-btn-sm",
|
|
1850
|
-
onClick:
|
|
1851
|
-
disabled:
|
|
2321
|
+
onClick: handleIncrease,
|
|
2322
|
+
disabled: isMax,
|
|
1852
2323
|
"aria-label": "Increase line height",
|
|
1853
2324
|
type: "button",
|
|
1854
2325
|
children: "+"
|
|
@@ -1867,11 +2338,44 @@ var DEFAULT_VALUE4 = 0;
|
|
|
1867
2338
|
var MIN3 = 0;
|
|
1868
2339
|
var MAX3 = 10;
|
|
1869
2340
|
var STEP3 = 1;
|
|
1870
|
-
function LetterSpacingController(
|
|
2341
|
+
function LetterSpacingController({
|
|
2342
|
+
min = MIN3,
|
|
2343
|
+
max = MAX3,
|
|
2344
|
+
step = STEP3,
|
|
2345
|
+
steps
|
|
2346
|
+
} = {}) {
|
|
1871
2347
|
const { value, setValue } = useAccessibility(
|
|
1872
2348
|
FEATURE_KEY4,
|
|
1873
2349
|
DEFAULT_VALUE4
|
|
1874
2350
|
);
|
|
2351
|
+
const handleDecrease = () => {
|
|
2352
|
+
if (steps && steps.length > 0) {
|
|
2353
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2354
|
+
if (idx > 0) {
|
|
2355
|
+
setValue(steps[idx - 1]);
|
|
2356
|
+
} else if (idx === -1) {
|
|
2357
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2358
|
+
setValue(lower ?? steps[0]);
|
|
2359
|
+
}
|
|
2360
|
+
} else {
|
|
2361
|
+
setValue(Math.max(min, value - step));
|
|
2362
|
+
}
|
|
2363
|
+
};
|
|
2364
|
+
const handleIncrease = () => {
|
|
2365
|
+
if (steps && steps.length > 0) {
|
|
2366
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2367
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2368
|
+
setValue(steps[idx + 1]);
|
|
2369
|
+
} else if (idx === -1) {
|
|
2370
|
+
const higher = steps.find((s) => s > value);
|
|
2371
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2372
|
+
}
|
|
2373
|
+
} else {
|
|
2374
|
+
setValue(Math.min(max, value + step));
|
|
2375
|
+
}
|
|
2376
|
+
};
|
|
2377
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2378
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
1875
2379
|
return /* @__PURE__ */ jsxs9(
|
|
1876
2380
|
"div",
|
|
1877
2381
|
{
|
|
@@ -1888,8 +2392,8 @@ function LetterSpacingController() {
|
|
|
1888
2392
|
"button",
|
|
1889
2393
|
{
|
|
1890
2394
|
className: "arap-btn-sm",
|
|
1891
|
-
onClick:
|
|
1892
|
-
disabled:
|
|
2395
|
+
onClick: handleDecrease,
|
|
2396
|
+
disabled: isMin,
|
|
1893
2397
|
"aria-label": "Decrease letter spacing",
|
|
1894
2398
|
type: "button",
|
|
1895
2399
|
children: "\u2212"
|
|
@@ -1903,8 +2407,8 @@ function LetterSpacingController() {
|
|
|
1903
2407
|
"button",
|
|
1904
2408
|
{
|
|
1905
2409
|
className: "arap-btn-sm",
|
|
1906
|
-
onClick:
|
|
1907
|
-
disabled:
|
|
2410
|
+
onClick: handleIncrease,
|
|
2411
|
+
disabled: isMax,
|
|
1908
2412
|
"aria-label": "Increase letter spacing",
|
|
1909
2413
|
type: "button",
|
|
1910
2414
|
children: "+"
|
|
@@ -1916,10 +2420,188 @@ function LetterSpacingController() {
|
|
|
1916
2420
|
);
|
|
1917
2421
|
}
|
|
1918
2422
|
|
|
1919
|
-
// src/features/
|
|
2423
|
+
// src/features/WordSpacingController.tsx
|
|
1920
2424
|
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1921
|
-
var FEATURE_KEY5 = "
|
|
2425
|
+
var FEATURE_KEY5 = "wordSpacing";
|
|
1922
2426
|
var DEFAULT_VALUE5 = 0;
|
|
2427
|
+
var MIN4 = 0;
|
|
2428
|
+
var MAX4 = 10;
|
|
2429
|
+
var STEP4 = 1;
|
|
2430
|
+
function WordSpacingController({
|
|
2431
|
+
min = MIN4,
|
|
2432
|
+
max = MAX4,
|
|
2433
|
+
step = STEP4,
|
|
2434
|
+
steps
|
|
2435
|
+
} = {}) {
|
|
2436
|
+
const { value, setValue } = useAccessibility(
|
|
2437
|
+
FEATURE_KEY5,
|
|
2438
|
+
DEFAULT_VALUE5
|
|
2439
|
+
);
|
|
2440
|
+
const handleDecrease = () => {
|
|
2441
|
+
if (steps && steps.length > 0) {
|
|
2442
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2443
|
+
if (idx > 0) {
|
|
2444
|
+
setValue(steps[idx - 1]);
|
|
2445
|
+
} else if (idx === -1) {
|
|
2446
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2447
|
+
setValue(lower ?? steps[0]);
|
|
2448
|
+
}
|
|
2449
|
+
} else {
|
|
2450
|
+
setValue(Math.max(min, value - step));
|
|
2451
|
+
}
|
|
2452
|
+
};
|
|
2453
|
+
const handleIncrease = () => {
|
|
2454
|
+
if (steps && steps.length > 0) {
|
|
2455
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2456
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2457
|
+
setValue(steps[idx + 1]);
|
|
2458
|
+
} else if (idx === -1) {
|
|
2459
|
+
const higher = steps.find((s) => s > value);
|
|
2460
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2461
|
+
}
|
|
2462
|
+
} else {
|
|
2463
|
+
setValue(Math.min(max, value + step));
|
|
2464
|
+
}
|
|
2465
|
+
};
|
|
2466
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2467
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2468
|
+
return /* @__PURE__ */ jsxs10(
|
|
2469
|
+
"div",
|
|
2470
|
+
{
|
|
2471
|
+
className: "arap-feature arap-feature-stepper",
|
|
2472
|
+
role: "group",
|
|
2473
|
+
"aria-label": "Word Spacing",
|
|
2474
|
+
children: [
|
|
2475
|
+
/* @__PURE__ */ jsxs10("span", { className: "arap-label", children: [
|
|
2476
|
+
/* @__PURE__ */ jsx11(FeatureIcon, { name: FEATURE_KEY5 }),
|
|
2477
|
+
/* @__PURE__ */ jsx11("span", { children: "Word Spacing" })
|
|
2478
|
+
] }),
|
|
2479
|
+
/* @__PURE__ */ jsxs10("div", { className: "arap-controls", children: [
|
|
2480
|
+
/* @__PURE__ */ jsx11(
|
|
2481
|
+
"button",
|
|
2482
|
+
{
|
|
2483
|
+
className: "arap-btn-sm",
|
|
2484
|
+
onClick: handleDecrease,
|
|
2485
|
+
disabled: isMin,
|
|
2486
|
+
"aria-label": "Decrease word spacing",
|
|
2487
|
+
type: "button",
|
|
2488
|
+
children: "\u2212"
|
|
2489
|
+
}
|
|
2490
|
+
),
|
|
2491
|
+
/* @__PURE__ */ jsxs10("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2492
|
+
value,
|
|
2493
|
+
"px"
|
|
2494
|
+
] }),
|
|
2495
|
+
/* @__PURE__ */ jsx11(
|
|
2496
|
+
"button",
|
|
2497
|
+
{
|
|
2498
|
+
className: "arap-btn-sm",
|
|
2499
|
+
onClick: handleIncrease,
|
|
2500
|
+
disabled: isMax,
|
|
2501
|
+
"aria-label": "Increase word spacing",
|
|
2502
|
+
type: "button",
|
|
2503
|
+
children: "+"
|
|
2504
|
+
}
|
|
2505
|
+
)
|
|
2506
|
+
] })
|
|
2507
|
+
]
|
|
2508
|
+
}
|
|
2509
|
+
);
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
// src/features/ParagraphSpacingController.tsx
|
|
2513
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2514
|
+
var FEATURE_KEY6 = "paragraphSpacing";
|
|
2515
|
+
var DEFAULT_VALUE6 = 0;
|
|
2516
|
+
var MIN5 = 0;
|
|
2517
|
+
var MAX5 = 32;
|
|
2518
|
+
var STEP5 = 4;
|
|
2519
|
+
function ParagraphSpacingController({
|
|
2520
|
+
min = MIN5,
|
|
2521
|
+
max = MAX5,
|
|
2522
|
+
step = STEP5,
|
|
2523
|
+
steps
|
|
2524
|
+
} = {}) {
|
|
2525
|
+
const { value, setValue } = useAccessibility(
|
|
2526
|
+
FEATURE_KEY6,
|
|
2527
|
+
DEFAULT_VALUE6
|
|
2528
|
+
);
|
|
2529
|
+
const handleDecrease = () => {
|
|
2530
|
+
if (steps && steps.length > 0) {
|
|
2531
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2532
|
+
if (idx > 0) {
|
|
2533
|
+
setValue(steps[idx - 1]);
|
|
2534
|
+
} else if (idx === -1) {
|
|
2535
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2536
|
+
setValue(lower ?? steps[0]);
|
|
2537
|
+
}
|
|
2538
|
+
} else {
|
|
2539
|
+
setValue(Math.max(min, value - step));
|
|
2540
|
+
}
|
|
2541
|
+
};
|
|
2542
|
+
const handleIncrease = () => {
|
|
2543
|
+
if (steps && steps.length > 0) {
|
|
2544
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2545
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2546
|
+
setValue(steps[idx + 1]);
|
|
2547
|
+
} else if (idx === -1) {
|
|
2548
|
+
const higher = steps.find((s) => s > value);
|
|
2549
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2550
|
+
}
|
|
2551
|
+
} else {
|
|
2552
|
+
setValue(Math.min(max, value + step));
|
|
2553
|
+
}
|
|
2554
|
+
};
|
|
2555
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2556
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2557
|
+
return /* @__PURE__ */ jsxs11(
|
|
2558
|
+
"div",
|
|
2559
|
+
{
|
|
2560
|
+
className: "arap-feature arap-feature-stepper",
|
|
2561
|
+
role: "group",
|
|
2562
|
+
"aria-label": "Paragraph Spacing",
|
|
2563
|
+
children: [
|
|
2564
|
+
/* @__PURE__ */ jsxs11("span", { className: "arap-label", children: [
|
|
2565
|
+
/* @__PURE__ */ jsx12(FeatureIcon, { name: FEATURE_KEY6 }),
|
|
2566
|
+
/* @__PURE__ */ jsx12("span", { children: "Paragraph Spacing" })
|
|
2567
|
+
] }),
|
|
2568
|
+
/* @__PURE__ */ jsxs11("div", { className: "arap-controls", children: [
|
|
2569
|
+
/* @__PURE__ */ jsx12(
|
|
2570
|
+
"button",
|
|
2571
|
+
{
|
|
2572
|
+
className: "arap-btn-sm",
|
|
2573
|
+
onClick: handleDecrease,
|
|
2574
|
+
disabled: isMin,
|
|
2575
|
+
"aria-label": "Decrease paragraph spacing",
|
|
2576
|
+
type: "button",
|
|
2577
|
+
children: "\u2212"
|
|
2578
|
+
}
|
|
2579
|
+
),
|
|
2580
|
+
/* @__PURE__ */ jsxs11("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2581
|
+
value,
|
|
2582
|
+
"px"
|
|
2583
|
+
] }),
|
|
2584
|
+
/* @__PURE__ */ jsx12(
|
|
2585
|
+
"button",
|
|
2586
|
+
{
|
|
2587
|
+
className: "arap-btn-sm",
|
|
2588
|
+
onClick: handleIncrease,
|
|
2589
|
+
disabled: isMax,
|
|
2590
|
+
"aria-label": "Increase paragraph spacing",
|
|
2591
|
+
type: "button",
|
|
2592
|
+
children: "+"
|
|
2593
|
+
}
|
|
2594
|
+
)
|
|
2595
|
+
] })
|
|
2596
|
+
]
|
|
2597
|
+
}
|
|
2598
|
+
);
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
// src/features/ContrastController.tsx
|
|
2602
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2603
|
+
var FEATURE_KEY7 = "contrast";
|
|
2604
|
+
var DEFAULT_VALUE7 = 0;
|
|
1923
2605
|
var LEVELS = [
|
|
1924
2606
|
{ label: "Off", value: 0 },
|
|
1925
2607
|
{ label: "Reduced", value: "reduced" },
|
|
@@ -1932,15 +2614,15 @@ var LEVELS = [
|
|
|
1932
2614
|
];
|
|
1933
2615
|
function ContrastController() {
|
|
1934
2616
|
const { value, setValue } = useAccessibility(
|
|
1935
|
-
|
|
1936
|
-
|
|
2617
|
+
FEATURE_KEY7,
|
|
2618
|
+
DEFAULT_VALUE7
|
|
1937
2619
|
);
|
|
1938
|
-
return /* @__PURE__ */
|
|
1939
|
-
/* @__PURE__ */
|
|
1940
|
-
/* @__PURE__ */
|
|
1941
|
-
/* @__PURE__ */
|
|
2620
|
+
return /* @__PURE__ */ jsxs12("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
|
|
2621
|
+
/* @__PURE__ */ jsxs12("span", { className: "arap-label", children: [
|
|
2622
|
+
/* @__PURE__ */ jsx13(FeatureIcon, { name: FEATURE_KEY7 }),
|
|
2623
|
+
/* @__PURE__ */ jsx13("span", { children: "Contrast" })
|
|
1942
2624
|
] }),
|
|
1943
|
-
/* @__PURE__ */
|
|
2625
|
+
/* @__PURE__ */ jsx13("div", { className: "arap-segmented", children: LEVELS.map((level) => /* @__PURE__ */ jsxs12(
|
|
1944
2626
|
"button",
|
|
1945
2627
|
{
|
|
1946
2628
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -1948,7 +2630,7 @@ function ContrastController() {
|
|
|
1948
2630
|
"aria-pressed": value === level.value,
|
|
1949
2631
|
type: "button",
|
|
1950
2632
|
children: [
|
|
1951
|
-
value === level.value && /* @__PURE__ */
|
|
2633
|
+
value === level.value && /* @__PURE__ */ jsx13("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1952
2634
|
level.label
|
|
1953
2635
|
]
|
|
1954
2636
|
},
|
|
@@ -1958,9 +2640,9 @@ function ContrastController() {
|
|
|
1958
2640
|
}
|
|
1959
2641
|
|
|
1960
2642
|
// src/features/SaturationController.tsx
|
|
1961
|
-
import { jsx as
|
|
1962
|
-
var
|
|
1963
|
-
var
|
|
2643
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2644
|
+
var FEATURE_KEY8 = "saturation";
|
|
2645
|
+
var DEFAULT_VALUE8 = 0;
|
|
1964
2646
|
var LEVELS2 = [
|
|
1965
2647
|
{ label: "Off", value: 0 },
|
|
1966
2648
|
{ label: "Low", value: 1 },
|
|
@@ -1968,15 +2650,15 @@ var LEVELS2 = [
|
|
|
1968
2650
|
];
|
|
1969
2651
|
function SaturationController() {
|
|
1970
2652
|
const { value, setValue } = useAccessibility(
|
|
1971
|
-
|
|
1972
|
-
|
|
2653
|
+
FEATURE_KEY8,
|
|
2654
|
+
DEFAULT_VALUE8
|
|
1973
2655
|
);
|
|
1974
|
-
return /* @__PURE__ */
|
|
1975
|
-
/* @__PURE__ */
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
/* @__PURE__ */
|
|
2656
|
+
return /* @__PURE__ */ jsxs13("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
|
|
2657
|
+
/* @__PURE__ */ jsxs13("span", { className: "arap-label", children: [
|
|
2658
|
+
/* @__PURE__ */ jsx14(FeatureIcon, { name: FEATURE_KEY8 }),
|
|
2659
|
+
/* @__PURE__ */ jsx14("span", { children: "Saturation" })
|
|
1978
2660
|
] }),
|
|
1979
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ jsx14("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ jsxs13(
|
|
1980
2662
|
"button",
|
|
1981
2663
|
{
|
|
1982
2664
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -1984,7 +2666,7 @@ function SaturationController() {
|
|
|
1984
2666
|
"aria-pressed": value === level.value,
|
|
1985
2667
|
type: "button",
|
|
1986
2668
|
children: [
|
|
1987
|
-
value === level.value && /* @__PURE__ */
|
|
2669
|
+
value === level.value && /* @__PURE__ */ jsx14("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1988
2670
|
level.label
|
|
1989
2671
|
]
|
|
1990
2672
|
},
|
|
@@ -1994,20 +2676,20 @@ function SaturationController() {
|
|
|
1994
2676
|
}
|
|
1995
2677
|
|
|
1996
2678
|
// src/features/InvertColorsController.tsx
|
|
1997
|
-
import { jsx as
|
|
1998
|
-
var
|
|
1999
|
-
var
|
|
2679
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2680
|
+
var FEATURE_KEY9 = "invertColors";
|
|
2681
|
+
var DEFAULT_VALUE9 = false;
|
|
2000
2682
|
function InvertColorsController() {
|
|
2001
2683
|
const { value, setValue } = useAccessibility(
|
|
2002
|
-
|
|
2003
|
-
|
|
2684
|
+
FEATURE_KEY9,
|
|
2685
|
+
DEFAULT_VALUE9
|
|
2004
2686
|
);
|
|
2005
|
-
return /* @__PURE__ */
|
|
2006
|
-
/* @__PURE__ */
|
|
2007
|
-
/* @__PURE__ */
|
|
2008
|
-
/* @__PURE__ */
|
|
2687
|
+
return /* @__PURE__ */ jsxs14("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
|
|
2688
|
+
/* @__PURE__ */ jsxs14("span", { className: "arap-label", children: [
|
|
2689
|
+
/* @__PURE__ */ jsx15(FeatureIcon, { name: FEATURE_KEY9 }),
|
|
2690
|
+
/* @__PURE__ */ jsx15("span", { children: "Invert Colors" })
|
|
2009
2691
|
] }),
|
|
2010
|
-
/* @__PURE__ */
|
|
2692
|
+
/* @__PURE__ */ jsx15(
|
|
2011
2693
|
"button",
|
|
2012
2694
|
{
|
|
2013
2695
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2015,27 +2697,27 @@ function InvertColorsController() {
|
|
|
2015
2697
|
"aria-label": "Invert Colors",
|
|
2016
2698
|
"aria-pressed": value,
|
|
2017
2699
|
type: "button",
|
|
2018
|
-
children: /* @__PURE__ */
|
|
2700
|
+
children: /* @__PURE__ */ jsx15("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2019
2701
|
}
|
|
2020
2702
|
)
|
|
2021
2703
|
] });
|
|
2022
2704
|
}
|
|
2023
2705
|
|
|
2024
2706
|
// src/features/GrayscaleController.tsx
|
|
2025
|
-
import { jsx as
|
|
2026
|
-
var
|
|
2027
|
-
var
|
|
2707
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2708
|
+
var FEATURE_KEY10 = "grayscale";
|
|
2709
|
+
var DEFAULT_VALUE10 = false;
|
|
2028
2710
|
function GrayscaleController() {
|
|
2029
2711
|
const { value, setValue } = useAccessibility(
|
|
2030
|
-
|
|
2031
|
-
|
|
2712
|
+
FEATURE_KEY10,
|
|
2713
|
+
DEFAULT_VALUE10
|
|
2032
2714
|
);
|
|
2033
|
-
return /* @__PURE__ */
|
|
2034
|
-
/* @__PURE__ */
|
|
2035
|
-
/* @__PURE__ */
|
|
2036
|
-
/* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ jsxs15("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
|
|
2716
|
+
/* @__PURE__ */ jsxs15("span", { className: "arap-label", children: [
|
|
2717
|
+
/* @__PURE__ */ jsx16(FeatureIcon, { name: FEATURE_KEY10 }),
|
|
2718
|
+
/* @__PURE__ */ jsx16("span", { children: "Grayscale" })
|
|
2037
2719
|
] }),
|
|
2038
|
-
/* @__PURE__ */
|
|
2720
|
+
/* @__PURE__ */ jsx16(
|
|
2039
2721
|
"button",
|
|
2040
2722
|
{
|
|
2041
2723
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2043,27 +2725,27 @@ function GrayscaleController() {
|
|
|
2043
2725
|
"aria-label": "Grayscale",
|
|
2044
2726
|
"aria-pressed": value,
|
|
2045
2727
|
type: "button",
|
|
2046
|
-
children: /* @__PURE__ */
|
|
2728
|
+
children: /* @__PURE__ */ jsx16("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2047
2729
|
}
|
|
2048
2730
|
)
|
|
2049
2731
|
] });
|
|
2050
2732
|
}
|
|
2051
2733
|
|
|
2052
2734
|
// src/features/LinkHighlightController.tsx
|
|
2053
|
-
import { jsx as
|
|
2054
|
-
var
|
|
2055
|
-
var
|
|
2735
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2736
|
+
var FEATURE_KEY11 = "linkHighlight";
|
|
2737
|
+
var DEFAULT_VALUE11 = false;
|
|
2056
2738
|
function LinkHighlightController() {
|
|
2057
2739
|
const { value, setValue } = useAccessibility(
|
|
2058
|
-
|
|
2059
|
-
|
|
2740
|
+
FEATURE_KEY11,
|
|
2741
|
+
DEFAULT_VALUE11
|
|
2060
2742
|
);
|
|
2061
|
-
return /* @__PURE__ */
|
|
2062
|
-
/* @__PURE__ */
|
|
2063
|
-
/* @__PURE__ */
|
|
2064
|
-
/* @__PURE__ */
|
|
2743
|
+
return /* @__PURE__ */ jsxs16("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
|
|
2744
|
+
/* @__PURE__ */ jsxs16("span", { className: "arap-label", children: [
|
|
2745
|
+
/* @__PURE__ */ jsx17(FeatureIcon, { name: FEATURE_KEY11 }),
|
|
2746
|
+
/* @__PURE__ */ jsx17("span", { children: "Link Highlight" })
|
|
2065
2747
|
] }),
|
|
2066
|
-
/* @__PURE__ */
|
|
2748
|
+
/* @__PURE__ */ jsx17(
|
|
2067
2749
|
"button",
|
|
2068
2750
|
{
|
|
2069
2751
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2071,10 +2753,10 @@ function LinkHighlightController() {
|
|
|
2071
2753
|
"aria-label": "Link Highlight",
|
|
2072
2754
|
"aria-pressed": !!value,
|
|
2073
2755
|
type: "button",
|
|
2074
|
-
children: /* @__PURE__ */
|
|
2756
|
+
children: /* @__PURE__ */ jsx17("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2075
2757
|
}
|
|
2076
2758
|
),
|
|
2077
|
-
/* @__PURE__ */
|
|
2759
|
+
/* @__PURE__ */ jsx17("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ jsxs16(
|
|
2078
2760
|
"button",
|
|
2079
2761
|
{
|
|
2080
2762
|
type: "button",
|
|
@@ -2082,7 +2764,7 @@ function LinkHighlightController() {
|
|
|
2082
2764
|
"aria-pressed": value === mode,
|
|
2083
2765
|
onClick: () => setValue(mode),
|
|
2084
2766
|
children: [
|
|
2085
|
-
value === mode && /* @__PURE__ */
|
|
2767
|
+
value === mode && /* @__PURE__ */ jsx17("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2086
2768
|
mode.split("-").join(" ")
|
|
2087
2769
|
]
|
|
2088
2770
|
},
|
|
@@ -2092,21 +2774,21 @@ function LinkHighlightController() {
|
|
|
2092
2774
|
}
|
|
2093
2775
|
|
|
2094
2776
|
// src/features/TextAlignController.tsx
|
|
2095
|
-
import { jsx as
|
|
2096
|
-
var
|
|
2097
|
-
var
|
|
2777
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2778
|
+
var FEATURE_KEY12 = "textAlign";
|
|
2779
|
+
var DEFAULT_VALUE12 = "default";
|
|
2098
2780
|
var OPTIONS = ["default", "left", "center", "right", "justify"];
|
|
2099
2781
|
function TextAlignController() {
|
|
2100
2782
|
const { value, setValue } = useAccessibility(
|
|
2101
|
-
|
|
2102
|
-
|
|
2783
|
+
FEATURE_KEY12,
|
|
2784
|
+
DEFAULT_VALUE12
|
|
2103
2785
|
);
|
|
2104
|
-
return /* @__PURE__ */
|
|
2105
|
-
/* @__PURE__ */
|
|
2106
|
-
/* @__PURE__ */
|
|
2107
|
-
/* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ jsxs17("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
|
|
2787
|
+
/* @__PURE__ */ jsxs17("span", { className: "arap-label", children: [
|
|
2788
|
+
/* @__PURE__ */ jsx18(FeatureIcon, { name: FEATURE_KEY12 }),
|
|
2789
|
+
/* @__PURE__ */ jsx18("span", { children: "Text Alignment" })
|
|
2108
2790
|
] }),
|
|
2109
|
-
/* @__PURE__ */
|
|
2791
|
+
/* @__PURE__ */ jsx18("div", { className: "arap-segmented", children: OPTIONS.map((option) => /* @__PURE__ */ jsxs17(
|
|
2110
2792
|
"button",
|
|
2111
2793
|
{
|
|
2112
2794
|
className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
|
|
@@ -2115,30 +2797,78 @@ function TextAlignController() {
|
|
|
2115
2797
|
type: "button",
|
|
2116
2798
|
style: { textTransform: "capitalize" },
|
|
2117
2799
|
children: [
|
|
2118
|
-
value === option && /* @__PURE__ */
|
|
2800
|
+
value === option && /* @__PURE__ */ jsx18("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2119
2801
|
option
|
|
2120
2802
|
]
|
|
2121
2803
|
},
|
|
2122
2804
|
option
|
|
2123
|
-
)) })
|
|
2805
|
+
)) }),
|
|
2806
|
+
value === "justify" && /* @__PURE__ */ jsx18(
|
|
2807
|
+
"div",
|
|
2808
|
+
{
|
|
2809
|
+
className: "arap-notice arap-notice-warning",
|
|
2810
|
+
role: "note",
|
|
2811
|
+
"aria-live": "polite",
|
|
2812
|
+
children: "Justified text creates uneven word spacing (\u201Crivers of white\u201D) that can impair readability."
|
|
2813
|
+
}
|
|
2814
|
+
)
|
|
2815
|
+
] });
|
|
2816
|
+
}
|
|
2817
|
+
|
|
2818
|
+
// src/features/FontFamilyController.tsx
|
|
2819
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2820
|
+
var FEATURE_KEY13 = "fontFamily";
|
|
2821
|
+
var DEFAULT_VALUE13 = "default";
|
|
2822
|
+
var OPTIONS2 = [
|
|
2823
|
+
{ label: "Default", value: "default" },
|
|
2824
|
+
{ label: "Legible", value: "legible" },
|
|
2825
|
+
{ label: "Dyslexia", value: "dyslexia-option" }
|
|
2826
|
+
];
|
|
2827
|
+
function FontFamilyController() {
|
|
2828
|
+
const { value, setValue } = useAccessibility(
|
|
2829
|
+
FEATURE_KEY13,
|
|
2830
|
+
DEFAULT_VALUE13
|
|
2831
|
+
);
|
|
2832
|
+
return /* @__PURE__ */ jsxs18("div", { className: "arap-feature", role: "group", "aria-label": "Font Family", children: [
|
|
2833
|
+
/* @__PURE__ */ jsxs18("span", { className: "arap-label", children: [
|
|
2834
|
+
/* @__PURE__ */ jsx19(FeatureIcon, { name: FEATURE_KEY13 }),
|
|
2835
|
+
/* @__PURE__ */ jsx19("span", { children: "Font Family" })
|
|
2836
|
+
] }),
|
|
2837
|
+
/* @__PURE__ */ jsx19("div", { className: "arap-segmented", children: OPTIONS2.map((option) => {
|
|
2838
|
+
const isActive = value === option.value || option.value === "default" && (value === "original" || !value || value === "default");
|
|
2839
|
+
return /* @__PURE__ */ jsxs18(
|
|
2840
|
+
"button",
|
|
2841
|
+
{
|
|
2842
|
+
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
2843
|
+
onClick: () => setValue(option.value),
|
|
2844
|
+
"aria-pressed": isActive,
|
|
2845
|
+
type: "button",
|
|
2846
|
+
children: [
|
|
2847
|
+
isActive && /* @__PURE__ */ jsx19("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2848
|
+
option.label
|
|
2849
|
+
]
|
|
2850
|
+
},
|
|
2851
|
+
option.value
|
|
2852
|
+
);
|
|
2853
|
+
}) })
|
|
2124
2854
|
] });
|
|
2125
2855
|
}
|
|
2126
2856
|
|
|
2127
2857
|
// src/features/HideImagesController.tsx
|
|
2128
|
-
import { jsx as
|
|
2129
|
-
var
|
|
2130
|
-
var
|
|
2858
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2859
|
+
var FEATURE_KEY14 = "hideImages";
|
|
2860
|
+
var DEFAULT_VALUE14 = false;
|
|
2131
2861
|
function HideImagesController() {
|
|
2132
2862
|
const { value, setValue } = useAccessibility(
|
|
2133
|
-
|
|
2134
|
-
|
|
2863
|
+
FEATURE_KEY14,
|
|
2864
|
+
DEFAULT_VALUE14
|
|
2135
2865
|
);
|
|
2136
|
-
return /* @__PURE__ */
|
|
2137
|
-
/* @__PURE__ */
|
|
2138
|
-
/* @__PURE__ */
|
|
2139
|
-
/* @__PURE__ */
|
|
2866
|
+
return /* @__PURE__ */ jsxs19("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
2867
|
+
/* @__PURE__ */ jsxs19("span", { className: "arap-label", children: [
|
|
2868
|
+
/* @__PURE__ */ jsx20(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
2869
|
+
/* @__PURE__ */ jsx20("span", { children: "Hide Images" })
|
|
2140
2870
|
] }),
|
|
2141
|
-
/* @__PURE__ */
|
|
2871
|
+
/* @__PURE__ */ jsx20(
|
|
2142
2872
|
"button",
|
|
2143
2873
|
{
|
|
2144
2874
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2146,27 +2876,27 @@ function HideImagesController() {
|
|
|
2146
2876
|
"aria-label": "Hide Images",
|
|
2147
2877
|
"aria-pressed": value,
|
|
2148
2878
|
type: "button",
|
|
2149
|
-
children: /* @__PURE__ */
|
|
2879
|
+
children: /* @__PURE__ */ jsx20("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2150
2880
|
}
|
|
2151
2881
|
)
|
|
2152
2882
|
] });
|
|
2153
2883
|
}
|
|
2154
2884
|
|
|
2155
2885
|
// src/features/HideVideosController.tsx
|
|
2156
|
-
import { jsx as
|
|
2157
|
-
var
|
|
2158
|
-
var
|
|
2886
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2887
|
+
var FEATURE_KEY15 = "hideVideos";
|
|
2888
|
+
var DEFAULT_VALUE15 = false;
|
|
2159
2889
|
function HideVideosController() {
|
|
2160
2890
|
const { value, setValue } = useAccessibility(
|
|
2161
|
-
|
|
2162
|
-
|
|
2891
|
+
FEATURE_KEY15,
|
|
2892
|
+
DEFAULT_VALUE15
|
|
2163
2893
|
);
|
|
2164
|
-
return /* @__PURE__ */
|
|
2165
|
-
/* @__PURE__ */
|
|
2166
|
-
/* @__PURE__ */
|
|
2167
|
-
/* @__PURE__ */
|
|
2894
|
+
return /* @__PURE__ */ jsxs20("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
|
|
2895
|
+
/* @__PURE__ */ jsxs20("span", { className: "arap-label", children: [
|
|
2896
|
+
/* @__PURE__ */ jsx21(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
2897
|
+
/* @__PURE__ */ jsx21("span", { children: "Hide Videos" })
|
|
2168
2898
|
] }),
|
|
2169
|
-
/* @__PURE__ */
|
|
2899
|
+
/* @__PURE__ */ jsx21(
|
|
2170
2900
|
"button",
|
|
2171
2901
|
{
|
|
2172
2902
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2174,27 +2904,27 @@ function HideVideosController() {
|
|
|
2174
2904
|
"aria-label": "Hide Videos",
|
|
2175
2905
|
"aria-pressed": value,
|
|
2176
2906
|
type: "button",
|
|
2177
|
-
children: /* @__PURE__ */
|
|
2907
|
+
children: /* @__PURE__ */ jsx21("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2178
2908
|
}
|
|
2179
2909
|
)
|
|
2180
2910
|
] });
|
|
2181
2911
|
}
|
|
2182
2912
|
|
|
2183
2913
|
// src/features/BigCursorController.tsx
|
|
2184
|
-
import { jsx as
|
|
2185
|
-
var
|
|
2186
|
-
var
|
|
2914
|
+
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2915
|
+
var FEATURE_KEY16 = "bigCursor";
|
|
2916
|
+
var DEFAULT_VALUE16 = false;
|
|
2187
2917
|
function BigCursorController() {
|
|
2188
2918
|
const { value, setValue } = useAccessibility(
|
|
2189
|
-
|
|
2190
|
-
|
|
2919
|
+
FEATURE_KEY16,
|
|
2920
|
+
DEFAULT_VALUE16
|
|
2191
2921
|
);
|
|
2192
|
-
return /* @__PURE__ */
|
|
2193
|
-
/* @__PURE__ */
|
|
2194
|
-
/* @__PURE__ */
|
|
2195
|
-
/* @__PURE__ */
|
|
2922
|
+
return /* @__PURE__ */ jsxs21("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
2923
|
+
/* @__PURE__ */ jsxs21("span", { className: "arap-label", children: [
|
|
2924
|
+
/* @__PURE__ */ jsx22(FeatureIcon, { name: FEATURE_KEY16 }),
|
|
2925
|
+
/* @__PURE__ */ jsx22("span", { children: "Big Cursor" })
|
|
2196
2926
|
] }),
|
|
2197
|
-
/* @__PURE__ */
|
|
2927
|
+
/* @__PURE__ */ jsx22(
|
|
2198
2928
|
"button",
|
|
2199
2929
|
{
|
|
2200
2930
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2202,27 +2932,27 @@ function BigCursorController() {
|
|
|
2202
2932
|
"aria-label": "Big Cursor",
|
|
2203
2933
|
"aria-pressed": value,
|
|
2204
2934
|
type: "button",
|
|
2205
|
-
children: /* @__PURE__ */
|
|
2935
|
+
children: /* @__PURE__ */ jsx22("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2206
2936
|
}
|
|
2207
2937
|
)
|
|
2208
2938
|
] });
|
|
2209
2939
|
}
|
|
2210
2940
|
|
|
2211
2941
|
// src/features/ReadingMaskController.tsx
|
|
2212
|
-
import { jsx as
|
|
2213
|
-
var
|
|
2214
|
-
var
|
|
2942
|
+
import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2943
|
+
var FEATURE_KEY17 = "readingMask";
|
|
2944
|
+
var DEFAULT_VALUE17 = false;
|
|
2215
2945
|
function ReadingMaskController() {
|
|
2216
2946
|
const { value, setValue } = useAccessibility(
|
|
2217
|
-
|
|
2218
|
-
|
|
2947
|
+
FEATURE_KEY17,
|
|
2948
|
+
DEFAULT_VALUE17
|
|
2219
2949
|
);
|
|
2220
|
-
return /* @__PURE__ */
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
/* @__PURE__ */
|
|
2950
|
+
return /* @__PURE__ */ jsxs22("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
|
|
2951
|
+
/* @__PURE__ */ jsxs22("span", { className: "arap-label", children: [
|
|
2952
|
+
/* @__PURE__ */ jsx23(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
2953
|
+
/* @__PURE__ */ jsx23("span", { children: "Reading Mask" })
|
|
2224
2954
|
] }),
|
|
2225
|
-
/* @__PURE__ */
|
|
2955
|
+
/* @__PURE__ */ jsx23(
|
|
2226
2956
|
"button",
|
|
2227
2957
|
{
|
|
2228
2958
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2230,27 +2960,27 @@ function ReadingMaskController() {
|
|
|
2230
2960
|
"aria-label": "Reading Mask",
|
|
2231
2961
|
"aria-pressed": value,
|
|
2232
2962
|
type: "button",
|
|
2233
|
-
children: /* @__PURE__ */
|
|
2963
|
+
children: /* @__PURE__ */ jsx23("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2234
2964
|
}
|
|
2235
2965
|
)
|
|
2236
2966
|
] });
|
|
2237
2967
|
}
|
|
2238
2968
|
|
|
2239
2969
|
// src/features/ReadingGuideController.tsx
|
|
2240
|
-
import { jsx as
|
|
2241
|
-
var
|
|
2242
|
-
var
|
|
2970
|
+
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2971
|
+
var FEATURE_KEY18 = "readingGuide";
|
|
2972
|
+
var DEFAULT_VALUE18 = false;
|
|
2243
2973
|
function ReadingGuideController() {
|
|
2244
2974
|
const { value, setValue } = useAccessibility(
|
|
2245
|
-
|
|
2246
|
-
|
|
2975
|
+
FEATURE_KEY18,
|
|
2976
|
+
DEFAULT_VALUE18
|
|
2247
2977
|
);
|
|
2248
|
-
return /* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
-
/* @__PURE__ */
|
|
2251
|
-
/* @__PURE__ */
|
|
2978
|
+
return /* @__PURE__ */ jsxs23("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
|
|
2979
|
+
/* @__PURE__ */ jsxs23("span", { className: "arap-label", children: [
|
|
2980
|
+
/* @__PURE__ */ jsx24(FeatureIcon, { name: FEATURE_KEY18 }),
|
|
2981
|
+
/* @__PURE__ */ jsx24("span", { children: "Reading Guide" })
|
|
2252
2982
|
] }),
|
|
2253
|
-
/* @__PURE__ */
|
|
2983
|
+
/* @__PURE__ */ jsx24(
|
|
2254
2984
|
"button",
|
|
2255
2985
|
{
|
|
2256
2986
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2258,7 +2988,7 @@ function ReadingGuideController() {
|
|
|
2258
2988
|
"aria-label": "Reading Guide",
|
|
2259
2989
|
"aria-pressed": value,
|
|
2260
2990
|
type: "button",
|
|
2261
|
-
children: /* @__PURE__ */
|
|
2991
|
+
children: /* @__PURE__ */ jsx24("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2262
2992
|
}
|
|
2263
2993
|
)
|
|
2264
2994
|
] });
|
|
@@ -2267,7 +2997,7 @@ function ReadingGuideController() {
|
|
|
2267
2997
|
// src/features/ResetController.tsx
|
|
2268
2998
|
import { createPortal as createPortal2 } from "react-dom";
|
|
2269
2999
|
import { useContext as useContext5 } from "react";
|
|
2270
|
-
import { jsx as
|
|
3000
|
+
import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2271
3001
|
function ResetController() {
|
|
2272
3002
|
const ctx = useContext5(AccessibilityContext);
|
|
2273
3003
|
if (!ctx) {
|
|
@@ -2278,15 +3008,15 @@ function ResetController() {
|
|
|
2278
3008
|
const actionHost = useContext5(PanelActionsContext);
|
|
2279
3009
|
const { resetAll } = ctx;
|
|
2280
3010
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
2281
|
-
const button = /* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
3011
|
+
const button = /* @__PURE__ */ jsx25("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ jsxs24("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
3012
|
+
/* @__PURE__ */ jsx25(FeatureIcon, { name: "reset" }),
|
|
2283
3013
|
strings.resetAll
|
|
2284
3014
|
] }) });
|
|
2285
3015
|
return actionHost ? createPortal2(button, actionHost) : button;
|
|
2286
3016
|
}
|
|
2287
3017
|
|
|
2288
3018
|
// src/core/controls/ToggleControl.tsx
|
|
2289
|
-
import { jsx as
|
|
3019
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2290
3020
|
function ToggleControl({
|
|
2291
3021
|
id,
|
|
2292
3022
|
label,
|
|
@@ -2308,12 +3038,12 @@ function ToggleControl({
|
|
|
2308
3038
|
onChange(!checked);
|
|
2309
3039
|
}
|
|
2310
3040
|
};
|
|
2311
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ jsx26(
|
|
2312
3042
|
"div",
|
|
2313
3043
|
{
|
|
2314
3044
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2315
3045
|
style,
|
|
2316
|
-
children: /* @__PURE__ */
|
|
3046
|
+
children: /* @__PURE__ */ jsx26(
|
|
2317
3047
|
"button",
|
|
2318
3048
|
{
|
|
2319
3049
|
id,
|
|
@@ -2327,7 +3057,7 @@ function ToggleControl({
|
|
|
2327
3057
|
disabled: !isInteractive,
|
|
2328
3058
|
onClick: handleClick,
|
|
2329
3059
|
title: unavailableReason || description || toggleLabel,
|
|
2330
|
-
children: /* @__PURE__ */
|
|
3060
|
+
children: /* @__PURE__ */ jsx26(
|
|
2331
3061
|
"span",
|
|
2332
3062
|
{
|
|
2333
3063
|
className: "arap-toggle-knob",
|
|
@@ -2344,7 +3074,7 @@ function ToggleControl({
|
|
|
2344
3074
|
|
|
2345
3075
|
// src/core/controls/ChoiceControl.tsx
|
|
2346
3076
|
import { useCallback as useCallback4, useMemo as useMemo2, useRef as useRef5 } from "react";
|
|
2347
|
-
import { jsx as
|
|
3077
|
+
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2348
3078
|
function ChoiceControl({
|
|
2349
3079
|
id,
|
|
2350
3080
|
label,
|
|
@@ -2400,7 +3130,7 @@ function ChoiceControl({
|
|
|
2400
3130
|
const renderOptionButton = (opt) => {
|
|
2401
3131
|
const isSelected = value === opt.value;
|
|
2402
3132
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
2403
|
-
return /* @__PURE__ */
|
|
3133
|
+
return /* @__PURE__ */ jsxs25(
|
|
2404
3134
|
"button",
|
|
2405
3135
|
{
|
|
2406
3136
|
type: "button",
|
|
@@ -2414,15 +3144,15 @@ function ChoiceControl({
|
|
|
2414
3144
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
2415
3145
|
title: opt.description,
|
|
2416
3146
|
children: [
|
|
2417
|
-
isSelected && /* @__PURE__ */
|
|
2418
|
-
/* @__PURE__ */
|
|
2419
|
-
opt.badge && /* @__PURE__ */
|
|
3147
|
+
isSelected && /* @__PURE__ */ jsx27("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3148
|
+
/* @__PURE__ */ jsx27("span", { children: opt.label }),
|
|
3149
|
+
opt.badge && /* @__PURE__ */ jsx27("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
2420
3150
|
]
|
|
2421
3151
|
},
|
|
2422
3152
|
String(opt.value)
|
|
2423
3153
|
);
|
|
2424
3154
|
};
|
|
2425
|
-
return /* @__PURE__ */
|
|
3155
|
+
return /* @__PURE__ */ jsx27(
|
|
2426
3156
|
"div",
|
|
2427
3157
|
{
|
|
2428
3158
|
ref: containerRef,
|
|
@@ -2433,15 +3163,15 @@ function ChoiceControl({
|
|
|
2433
3163
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2434
3164
|
style,
|
|
2435
3165
|
onKeyDown: handleKeyDown,
|
|
2436
|
-
children: groups ? groups.map((group) => /* @__PURE__ */
|
|
3166
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ jsxs25(
|
|
2437
3167
|
"div",
|
|
2438
3168
|
{
|
|
2439
3169
|
className: "arap-choice-group",
|
|
2440
3170
|
role: "group",
|
|
2441
3171
|
"aria-label": group.label,
|
|
2442
3172
|
children: [
|
|
2443
|
-
/* @__PURE__ */
|
|
2444
|
-
/* @__PURE__ */
|
|
3173
|
+
/* @__PURE__ */ jsx27("span", { className: "arap-choice-group-title", children: group.label }),
|
|
3174
|
+
/* @__PURE__ */ jsx27("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
2445
3175
|
]
|
|
2446
3176
|
},
|
|
2447
3177
|
group.label
|
|
@@ -2451,7 +3181,7 @@ function ChoiceControl({
|
|
|
2451
3181
|
}
|
|
2452
3182
|
|
|
2453
3183
|
// src/core/controls/StepperControl.tsx
|
|
2454
|
-
import { jsx as
|
|
3184
|
+
import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2455
3185
|
function StepperControl({
|
|
2456
3186
|
id,
|
|
2457
3187
|
label,
|
|
@@ -2481,15 +3211,15 @@ function StepperControl({
|
|
|
2481
3211
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
2482
3212
|
}
|
|
2483
3213
|
};
|
|
2484
|
-
return /* @__PURE__ */
|
|
3214
|
+
return /* @__PURE__ */ jsxs26(
|
|
2485
3215
|
"div",
|
|
2486
3216
|
{
|
|
2487
3217
|
id,
|
|
2488
3218
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2489
3219
|
style,
|
|
2490
3220
|
children: [
|
|
2491
|
-
/* @__PURE__ */
|
|
2492
|
-
/* @__PURE__ */
|
|
3221
|
+
/* @__PURE__ */ jsxs26("div", { className: "arap-controls", children: [
|
|
3222
|
+
/* @__PURE__ */ jsx28(
|
|
2493
3223
|
"button",
|
|
2494
3224
|
{
|
|
2495
3225
|
type: "button",
|
|
@@ -2500,8 +3230,8 @@ function StepperControl({
|
|
|
2500
3230
|
children: "\u2212"
|
|
2501
3231
|
}
|
|
2502
3232
|
),
|
|
2503
|
-
/* @__PURE__ */
|
|
2504
|
-
/* @__PURE__ */
|
|
3233
|
+
/* @__PURE__ */ jsx28("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
3234
|
+
/* @__PURE__ */ jsx28(
|
|
2505
3235
|
"button",
|
|
2506
3236
|
{
|
|
2507
3237
|
type: "button",
|
|
@@ -2513,7 +3243,7 @@ function StepperControl({
|
|
|
2513
3243
|
}
|
|
2514
3244
|
)
|
|
2515
3245
|
] }),
|
|
2516
|
-
showSlider && /* @__PURE__ */
|
|
3246
|
+
showSlider && /* @__PURE__ */ jsx28("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx28(
|
|
2517
3247
|
"input",
|
|
2518
3248
|
{
|
|
2519
3249
|
type: "range",
|
|
@@ -2537,7 +3267,7 @@ function StepperControl({
|
|
|
2537
3267
|
}
|
|
2538
3268
|
|
|
2539
3269
|
// src/core/controls/FeatureCard.tsx
|
|
2540
|
-
import { jsx as
|
|
3270
|
+
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2541
3271
|
function FeatureCard({
|
|
2542
3272
|
id,
|
|
2543
3273
|
featureKey,
|
|
@@ -2556,7 +3286,7 @@ function FeatureCard({
|
|
|
2556
3286
|
largeControls = false
|
|
2557
3287
|
}) {
|
|
2558
3288
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
2559
|
-
return /* @__PURE__ */
|
|
3289
|
+
return /* @__PURE__ */ jsxs27(
|
|
2560
3290
|
"div",
|
|
2561
3291
|
{
|
|
2562
3292
|
id,
|
|
@@ -2565,27 +3295,27 @@ function FeatureCard({
|
|
|
2565
3295
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2566
3296
|
style,
|
|
2567
3297
|
children: [
|
|
2568
|
-
/* @__PURE__ */
|
|
2569
|
-
/* @__PURE__ */
|
|
2570
|
-
icon ?? (featureKey ? /* @__PURE__ */
|
|
2571
|
-
/* @__PURE__ */
|
|
3298
|
+
/* @__PURE__ */ jsxs27("div", { className: "arap-card-header", children: [
|
|
3299
|
+
/* @__PURE__ */ jsxs27("span", { className: "arap-label", children: [
|
|
3300
|
+
icon ?? (featureKey ? /* @__PURE__ */ jsx29(FeatureIcon, { name: featureKey }) : null),
|
|
3301
|
+
/* @__PURE__ */ jsx29("span", { className: "arap-card-title", children: title })
|
|
2572
3302
|
] }),
|
|
2573
|
-
statusBadge && /* @__PURE__ */
|
|
3303
|
+
statusBadge && /* @__PURE__ */ jsx29("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
2574
3304
|
] }),
|
|
2575
|
-
description && /* @__PURE__ */
|
|
2576
|
-
status === "error" && errorMessage && /* @__PURE__ */
|
|
2577
|
-
/* @__PURE__ */
|
|
2578
|
-
/* @__PURE__ */
|
|
3305
|
+
description && /* @__PURE__ */ jsx29("p", { className: "arap-card-desc", children: description }),
|
|
3306
|
+
status === "error" && errorMessage && /* @__PURE__ */ jsxs27("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
3307
|
+
/* @__PURE__ */ jsx29("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3308
|
+
/* @__PURE__ */ jsx29("span", { children: errorMessage })
|
|
2579
3309
|
] }),
|
|
2580
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */
|
|
2581
|
-
/* @__PURE__ */
|
|
2582
|
-
/* @__PURE__ */
|
|
3310
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs27("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
3311
|
+
/* @__PURE__ */ jsx29("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
3312
|
+
/* @__PURE__ */ jsx29("span", { children: unavailableMessage })
|
|
2583
3313
|
] }),
|
|
2584
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */
|
|
2585
|
-
/* @__PURE__ */
|
|
2586
|
-
/* @__PURE__ */
|
|
2587
|
-
/* @__PURE__ */
|
|
2588
|
-
onRequestPermission && /* @__PURE__ */
|
|
3314
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs27("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
3315
|
+
/* @__PURE__ */ jsx29("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
3316
|
+
/* @__PURE__ */ jsxs27("div", { className: "arap-permission-content", children: [
|
|
3317
|
+
/* @__PURE__ */ jsx29("span", { children: permissionMessage }),
|
|
3318
|
+
onRequestPermission && /* @__PURE__ */ jsx29(
|
|
2589
3319
|
"button",
|
|
2590
3320
|
{
|
|
2591
3321
|
type: "button",
|
|
@@ -2596,14 +3326,14 @@ function FeatureCard({
|
|
|
2596
3326
|
)
|
|
2597
3327
|
] })
|
|
2598
3328
|
] }),
|
|
2599
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx29("div", { className: "arap-card-content", children })
|
|
2600
3330
|
]
|
|
2601
3331
|
}
|
|
2602
3332
|
);
|
|
2603
3333
|
}
|
|
2604
3334
|
|
|
2605
3335
|
// src/core/controls/FeatureStatusState.tsx
|
|
2606
|
-
import { jsx as
|
|
3336
|
+
import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2607
3337
|
function SearchCount({
|
|
2608
3338
|
totalCount,
|
|
2609
3339
|
matchedCount,
|
|
@@ -2612,7 +3342,7 @@ function SearchCount({
|
|
|
2612
3342
|
style
|
|
2613
3343
|
}) {
|
|
2614
3344
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
2615
|
-
return /* @__PURE__ */
|
|
3345
|
+
return /* @__PURE__ */ jsx30(
|
|
2616
3346
|
"div",
|
|
2617
3347
|
{
|
|
2618
3348
|
role: "status",
|
|
@@ -2632,17 +3362,17 @@ function EmptyState({
|
|
|
2632
3362
|
className = "",
|
|
2633
3363
|
style
|
|
2634
3364
|
}) {
|
|
2635
|
-
return /* @__PURE__ */
|
|
3365
|
+
return /* @__PURE__ */ jsxs28(
|
|
2636
3366
|
"div",
|
|
2637
3367
|
{
|
|
2638
3368
|
role: "status",
|
|
2639
3369
|
className: `arap-empty-state ${className}`,
|
|
2640
3370
|
style,
|
|
2641
3371
|
children: [
|
|
2642
|
-
/* @__PURE__ */
|
|
2643
|
-
/* @__PURE__ */
|
|
2644
|
-
/* @__PURE__ */
|
|
2645
|
-
onAction && /* @__PURE__ */
|
|
3372
|
+
/* @__PURE__ */ jsx30("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
3373
|
+
/* @__PURE__ */ jsx30("h3", { className: "arap-empty-title", children: title }),
|
|
3374
|
+
/* @__PURE__ */ jsx30("p", { className: "arap-empty-desc", children: description }),
|
|
3375
|
+
onAction && /* @__PURE__ */ jsx30("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
2646
3376
|
]
|
|
2647
3377
|
}
|
|
2648
3378
|
);
|
|
@@ -2655,18 +3385,18 @@ function ErrorState({
|
|
|
2655
3385
|
className = "",
|
|
2656
3386
|
style
|
|
2657
3387
|
}) {
|
|
2658
|
-
return /* @__PURE__ */
|
|
3388
|
+
return /* @__PURE__ */ jsxs28(
|
|
2659
3389
|
"div",
|
|
2660
3390
|
{
|
|
2661
3391
|
role: "alert",
|
|
2662
3392
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
2663
3393
|
style,
|
|
2664
3394
|
children: [
|
|
2665
|
-
/* @__PURE__ */
|
|
2666
|
-
/* @__PURE__ */
|
|
2667
|
-
title && /* @__PURE__ */
|
|
2668
|
-
/* @__PURE__ */
|
|
2669
|
-
onRetry && /* @__PURE__ */
|
|
3395
|
+
/* @__PURE__ */ jsx30("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3396
|
+
/* @__PURE__ */ jsxs28("div", { className: "arap-error-content", children: [
|
|
3397
|
+
title && /* @__PURE__ */ jsx30("h4", { className: "arap-error-title", children: title }),
|
|
3398
|
+
/* @__PURE__ */ jsx30("p", { className: "arap-error-message", children: message }),
|
|
3399
|
+
onRetry && /* @__PURE__ */ jsx30("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
2670
3400
|
] })
|
|
2671
3401
|
]
|
|
2672
3402
|
}
|
|
@@ -2674,7 +3404,7 @@ function ErrorState({
|
|
|
2674
3404
|
}
|
|
2675
3405
|
|
|
2676
3406
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
2677
|
-
import { jsx as
|
|
3407
|
+
import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2678
3408
|
function ProfilePreviewCard({
|
|
2679
3409
|
profile,
|
|
2680
3410
|
isActive,
|
|
@@ -2724,7 +3454,7 @@ function ProfilePreviewCard({
|
|
|
2724
3454
|
if (val === null || val === void 0) return "Original";
|
|
2725
3455
|
return String(val);
|
|
2726
3456
|
};
|
|
2727
|
-
return /* @__PURE__ */
|
|
3457
|
+
return /* @__PURE__ */ jsxs29(
|
|
2728
3458
|
"div",
|
|
2729
3459
|
{
|
|
2730
3460
|
role: "group",
|
|
@@ -2732,10 +3462,10 @@ function ProfilePreviewCard({
|
|
|
2732
3462
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2733
3463
|
style,
|
|
2734
3464
|
children: [
|
|
2735
|
-
/* @__PURE__ */
|
|
2736
|
-
/* @__PURE__ */
|
|
2737
|
-
/* @__PURE__ */
|
|
2738
|
-
isActive && /* @__PURE__ */
|
|
3465
|
+
/* @__PURE__ */ jsxs29("div", { className: "arap-profile-header", children: [
|
|
3466
|
+
/* @__PURE__ */ jsxs29("div", { className: "arap-profile-title-row", children: [
|
|
3467
|
+
/* @__PURE__ */ jsx31("h4", { className: "arap-profile-title", children: profile.label }),
|
|
3468
|
+
isActive && /* @__PURE__ */ jsx31(
|
|
2739
3469
|
"span",
|
|
2740
3470
|
{
|
|
2741
3471
|
className: "arap-profile-active-badge",
|
|
@@ -2744,14 +3474,14 @@ function ProfilePreviewCard({
|
|
|
2744
3474
|
}
|
|
2745
3475
|
)
|
|
2746
3476
|
] }),
|
|
2747
|
-
/* @__PURE__ */
|
|
3477
|
+
/* @__PURE__ */ jsx31("p", { className: "arap-profile-desc", children: profile.description })
|
|
2748
3478
|
] }),
|
|
2749
|
-
/* @__PURE__ */
|
|
2750
|
-
/* @__PURE__ */
|
|
2751
|
-
/* @__PURE__ */
|
|
3479
|
+
/* @__PURE__ */ jsxs29("div", { className: "arap-profile-affected", children: [
|
|
3480
|
+
/* @__PURE__ */ jsx31("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
3481
|
+
/* @__PURE__ */ jsx31("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
2752
3482
|
const val = profile.settings[key];
|
|
2753
|
-
return /* @__PURE__ */
|
|
2754
|
-
/* @__PURE__ */
|
|
3483
|
+
return /* @__PURE__ */ jsxs29("span", { className: "arap-profile-chip", children: [
|
|
3484
|
+
/* @__PURE__ */ jsxs29("strong", { children: [
|
|
2755
3485
|
formatKeyName(key),
|
|
2756
3486
|
":"
|
|
2757
3487
|
] }),
|
|
@@ -2760,7 +3490,7 @@ function ProfilePreviewCard({
|
|
|
2760
3490
|
] }, key);
|
|
2761
3491
|
}) })
|
|
2762
3492
|
] }),
|
|
2763
|
-
/* @__PURE__ */
|
|
3493
|
+
/* @__PURE__ */ jsx31("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ jsx31(
|
|
2764
3494
|
"button",
|
|
2765
3495
|
{
|
|
2766
3496
|
type: "button",
|
|
@@ -2769,7 +3499,7 @@ function ProfilePreviewCard({
|
|
|
2769
3499
|
"aria-label": `Revert ${profile.label} profile`,
|
|
2770
3500
|
children: "Revert to custom settings"
|
|
2771
3501
|
}
|
|
2772
|
-
) : /* @__PURE__ */
|
|
3502
|
+
) : /* @__PURE__ */ jsx31(
|
|
2773
3503
|
"button",
|
|
2774
3504
|
{
|
|
2775
3505
|
type: "button",
|
|
@@ -2792,18 +3522,26 @@ export {
|
|
|
2792
3522
|
ChoiceControl,
|
|
2793
3523
|
ContrastController,
|
|
2794
3524
|
DEFAULT_PREFERENCES,
|
|
3525
|
+
DYSLEXIA_FONT_STACK,
|
|
2795
3526
|
EmptyState,
|
|
2796
3527
|
ErrorState,
|
|
3528
|
+
FONT_FAMILY_PRESETS,
|
|
3529
|
+
FONT_FAMILY_PROTECTED_SELECTOR,
|
|
2797
3530
|
FeatureCard,
|
|
3531
|
+
FontFamilyController,
|
|
2798
3532
|
FontSizeController,
|
|
2799
3533
|
GrayscaleController,
|
|
2800
3534
|
HideImagesController,
|
|
2801
3535
|
HideVideosController,
|
|
2802
3536
|
InvertColorsController,
|
|
3537
|
+
LEGIBLE_FONT_STACK,
|
|
3538
|
+
LINE_HEIGHT_RATIOS,
|
|
3539
|
+
LINE_HEIGHT_STEPS,
|
|
2803
3540
|
LetterSpacingController,
|
|
2804
3541
|
LineHeightController,
|
|
2805
3542
|
LinkHighlightController,
|
|
2806
3543
|
PROFILE_DEFINITIONS,
|
|
3544
|
+
ParagraphSpacingController,
|
|
2807
3545
|
ProfilePreviewCard,
|
|
2808
3546
|
ReadingGuideController,
|
|
2809
3547
|
ReadingMaskController,
|
|
@@ -2811,14 +3549,21 @@ export {
|
|
|
2811
3549
|
SaturationController,
|
|
2812
3550
|
SearchCount,
|
|
2813
3551
|
StepperControl,
|
|
3552
|
+
TEXT_ALIGN_BLOCK_SELECTOR,
|
|
2814
3553
|
TEXT_SCALE_PROTECTED_SELECTOR,
|
|
2815
3554
|
TEXT_SCALE_STEPS,
|
|
3555
|
+
TEXT_SPACING_EXCLUDED_SELECTOR,
|
|
2816
3556
|
TextAlignController,
|
|
2817
3557
|
TextScaleController,
|
|
2818
3558
|
ToggleControl,
|
|
3559
|
+
WordSpacingController,
|
|
2819
3560
|
createInitialPreferencesState,
|
|
2820
3561
|
enLocale,
|
|
3562
|
+
getScriptSpacingConstraints,
|
|
3563
|
+
isProtectedFromFontFamily,
|
|
3564
|
+
isProtectedFromTextAlign,
|
|
2821
3565
|
isProtectedFromTextScale,
|
|
3566
|
+
isProtectedFromTextSpacing,
|
|
2822
3567
|
isRtlLocale,
|
|
2823
3568
|
normalizePreferenceValue,
|
|
2824
3569
|
normalizePreferences,
|