accessibility-plugin-react 2.3.2 → 2.5.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 +20 -17
- package/dist/index.d.mts +85 -4
- package/dist/index.d.ts +85 -4
- package/dist/index.js +978 -251
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +967 -251
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +23 -0
- package/docs/API.md +21 -14
- package/docs/BUILD_AND_RELEASE_PLAN.md +2 -2
- package/docs/FEATURES.md +20 -17
- 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');
|
|
28
28
|
|
|
29
29
|
// src/core/AccessibilityPlugin.tsx
|
|
30
30
|
import {
|
|
@@ -241,10 +241,32 @@ function createPreferenceStore(key, persist, storageMode) {
|
|
|
241
241
|
// src/core/featureSchema.ts
|
|
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
|
+
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];
|
|
244
247
|
var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
245
248
|
fontSize: { defaultValue: 100, validate: numberIn(50, 200) },
|
|
246
|
-
|
|
247
|
-
|
|
249
|
+
fontScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
250
|
+
textScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
251
|
+
lineHeight: {
|
|
252
|
+
defaultValue: 100,
|
|
253
|
+
validate: (v) => typeof v === "number" && Number.isFinite(v) && (v >= 0.5 && v <= 2.5 || v >= 50 && v <= 200)
|
|
254
|
+
},
|
|
255
|
+
letterSpacing: { defaultValue: 0, validate: numberIn(0, 20) },
|
|
256
|
+
wordSpacing: { defaultValue: 0, validate: numberIn(0, 20) },
|
|
257
|
+
paragraphSpacing: { defaultValue: 0, validate: numberIn(0, 64) },
|
|
258
|
+
letterSpacingEm: {
|
|
259
|
+
defaultValue: null,
|
|
260
|
+
validate: (v) => v === null || numberIn(0, 1)(v)
|
|
261
|
+
},
|
|
262
|
+
wordSpacingEm: {
|
|
263
|
+
defaultValue: null,
|
|
264
|
+
validate: (v) => v === null || numberIn(0, 1)(v)
|
|
265
|
+
},
|
|
266
|
+
paragraphSpacingEm: {
|
|
267
|
+
defaultValue: null,
|
|
268
|
+
validate: (v) => v === null || numberIn(0, 2)(v)
|
|
269
|
+
},
|
|
248
270
|
contrast: {
|
|
249
271
|
defaultValue: 0,
|
|
250
272
|
validate: oneOf(
|
|
@@ -321,6 +343,197 @@ function composeFilter(values) {
|
|
|
321
343
|
values.grayscale && "grayscale(1)"
|
|
322
344
|
].filter(Boolean).join(" ");
|
|
323
345
|
}
|
|
346
|
+
var TEXT_SCALE_PROTECTED_SELECTOR = [
|
|
347
|
+
"input",
|
|
348
|
+
"textarea",
|
|
349
|
+
"select",
|
|
350
|
+
"select *",
|
|
351
|
+
"option",
|
|
352
|
+
"optgroup",
|
|
353
|
+
"button",
|
|
354
|
+
"button *",
|
|
355
|
+
"datalist",
|
|
356
|
+
"output",
|
|
357
|
+
"progress",
|
|
358
|
+
"meter",
|
|
359
|
+
"label",
|
|
360
|
+
"label *",
|
|
361
|
+
"legend",
|
|
362
|
+
"legend *",
|
|
363
|
+
"pre",
|
|
364
|
+
"pre *",
|
|
365
|
+
"code",
|
|
366
|
+
"kbd",
|
|
367
|
+
"samp",
|
|
368
|
+
"var",
|
|
369
|
+
"svg",
|
|
370
|
+
"svg *",
|
|
371
|
+
"[data-icon]",
|
|
372
|
+
"[data-icon] *",
|
|
373
|
+
'i[class*="icon"]',
|
|
374
|
+
'span[class*="icon"]',
|
|
375
|
+
'i[class*="fa-"]',
|
|
376
|
+
'span[class*="fa-"]',
|
|
377
|
+
'i[class*="material-symbols"]',
|
|
378
|
+
'span[class*="material-symbols"]',
|
|
379
|
+
'i[class*="lucide"]',
|
|
380
|
+
'span[class*="lucide"]',
|
|
381
|
+
"[data-arap-ignore]",
|
|
382
|
+
"[data-arap-ignore] *",
|
|
383
|
+
"[data-arap-exempt]",
|
|
384
|
+
"[data-arap-exempt] *"
|
|
385
|
+
].join(", ");
|
|
386
|
+
function isProtectedFromTextScale(element) {
|
|
387
|
+
try {
|
|
388
|
+
if (element.matches(EXCLUDED)) return true;
|
|
389
|
+
if (element.matches(TEXT_SCALE_PROTECTED_SELECTOR)) return true;
|
|
390
|
+
if (element.closest(
|
|
391
|
+
"pre, button, label, legend, select, [data-arap-ignore], [data-arap-exempt], [data-arap-ui]"
|
|
392
|
+
)) {
|
|
393
|
+
return true;
|
|
394
|
+
}
|
|
395
|
+
} catch {
|
|
396
|
+
return false;
|
|
397
|
+
}
|
|
398
|
+
return false;
|
|
399
|
+
}
|
|
400
|
+
var TEXT_SPACING_EXCLUDED_SELECTOR = [
|
|
401
|
+
"input",
|
|
402
|
+
"textarea",
|
|
403
|
+
"select",
|
|
404
|
+
"select *",
|
|
405
|
+
"option",
|
|
406
|
+
"optgroup",
|
|
407
|
+
"button",
|
|
408
|
+
"button *",
|
|
409
|
+
"datalist",
|
|
410
|
+
"output",
|
|
411
|
+
"progress",
|
|
412
|
+
"meter",
|
|
413
|
+
"label",
|
|
414
|
+
"label *",
|
|
415
|
+
"legend",
|
|
416
|
+
"legend *",
|
|
417
|
+
'[role="button"]',
|
|
418
|
+
'[role="button"] *',
|
|
419
|
+
'[role="checkbox"]',
|
|
420
|
+
'[role="combobox"]',
|
|
421
|
+
'[role="menuitem"]',
|
|
422
|
+
'[role="tab"]',
|
|
423
|
+
"pre",
|
|
424
|
+
"pre *",
|
|
425
|
+
"code",
|
|
426
|
+
"kbd",
|
|
427
|
+
"samp",
|
|
428
|
+
"var",
|
|
429
|
+
"table",
|
|
430
|
+
"table *",
|
|
431
|
+
"thead",
|
|
432
|
+
"thead *",
|
|
433
|
+
"tbody",
|
|
434
|
+
"tbody *",
|
|
435
|
+
"tfoot",
|
|
436
|
+
"tfoot *",
|
|
437
|
+
"tr",
|
|
438
|
+
"tr *",
|
|
439
|
+
"th",
|
|
440
|
+
"th *",
|
|
441
|
+
"td",
|
|
442
|
+
"td *",
|
|
443
|
+
"caption",
|
|
444
|
+
"colgroup",
|
|
445
|
+
"col",
|
|
446
|
+
'[role="table"]',
|
|
447
|
+
'[role="table"] *',
|
|
448
|
+
'[role="grid"]',
|
|
449
|
+
'[role="grid"] *',
|
|
450
|
+
'[role="row"]',
|
|
451
|
+
'[role="row"] *',
|
|
452
|
+
'[role="cell"]',
|
|
453
|
+
'[role="cell"] *',
|
|
454
|
+
'[role="columnheader"]',
|
|
455
|
+
'[role="columnheader"] *',
|
|
456
|
+
'[role="rowheader"]',
|
|
457
|
+
'[role="rowheader"] *',
|
|
458
|
+
"svg",
|
|
459
|
+
"svg *",
|
|
460
|
+
"[data-icon]",
|
|
461
|
+
"[data-icon] *",
|
|
462
|
+
'i[class*="icon"]',
|
|
463
|
+
'span[class*="icon"]',
|
|
464
|
+
'i[class*="fa-"]',
|
|
465
|
+
'span[class*="fa-"]',
|
|
466
|
+
'i[class*="material-symbols"]',
|
|
467
|
+
'span[class*="material-symbols"]',
|
|
468
|
+
'i[class*="lucide"]',
|
|
469
|
+
'span[class*="lucide"]',
|
|
470
|
+
"[data-arap-ignore]",
|
|
471
|
+
"[data-arap-ignore] *",
|
|
472
|
+
"[data-arap-exempt]",
|
|
473
|
+
"[data-arap-exempt] *",
|
|
474
|
+
"[data-arap-ui]",
|
|
475
|
+
"[data-arap-ui] *",
|
|
476
|
+
".arap-root",
|
|
477
|
+
".arap-root *"
|
|
478
|
+
].join(", ");
|
|
479
|
+
function isProtectedFromTextSpacing(element) {
|
|
480
|
+
try {
|
|
481
|
+
if (element.matches(EXCLUDED)) return true;
|
|
482
|
+
if (element.matches(TEXT_SPACING_EXCLUDED_SELECTOR)) return true;
|
|
483
|
+
if (element.closest(
|
|
484
|
+
"pre, button, label, legend, select, textarea, [role='button'], table, [role='table'], [role='grid'], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
485
|
+
)) {
|
|
486
|
+
return true;
|
|
487
|
+
}
|
|
488
|
+
} catch {
|
|
489
|
+
return false;
|
|
490
|
+
}
|
|
491
|
+
return false;
|
|
492
|
+
}
|
|
493
|
+
var ARABIC_SCRIPT_REGEX = /[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/;
|
|
494
|
+
var INDIC_SCRIPT_REGEX = /[\u0900-\u0DFF]/;
|
|
495
|
+
var CURSIVE_LANG_REGEX = /^(ar|fa|ur|ug|dv|ps|ku)($|-)/i;
|
|
496
|
+
var INDIC_LANG_REGEX = /^(si|ta|hi|bn|te|kn|ml|gu|pa|mr|ne|sa)($|-)/i;
|
|
497
|
+
function getScriptSpacingConstraints(element) {
|
|
498
|
+
const lang = element.closest("[lang]")?.getAttribute("lang") || document.documentElement.lang || "";
|
|
499
|
+
const dir = element.closest("[dir]")?.getAttribute("dir") || document.documentElement.dir || "";
|
|
500
|
+
if (CURSIVE_LANG_REGEX.test(lang) || dir.toLowerCase() === "rtl") {
|
|
501
|
+
return {
|
|
502
|
+
allowLetterSpacing: false,
|
|
503
|
+
maxLetterSpacingPx: 0,
|
|
504
|
+
script: "cursive"
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
if (INDIC_LANG_REGEX.test(lang)) {
|
|
508
|
+
return {
|
|
509
|
+
allowLetterSpacing: true,
|
|
510
|
+
maxLetterSpacingPx: 1,
|
|
511
|
+
script: "indic"
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
const text = element.textContent || "";
|
|
515
|
+
if (text.length > 0) {
|
|
516
|
+
if (ARABIC_SCRIPT_REGEX.test(text)) {
|
|
517
|
+
return {
|
|
518
|
+
allowLetterSpacing: false,
|
|
519
|
+
maxLetterSpacingPx: 0,
|
|
520
|
+
script: "cursive"
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
if (INDIC_SCRIPT_REGEX.test(text)) {
|
|
524
|
+
return {
|
|
525
|
+
allowLetterSpacing: true,
|
|
526
|
+
maxLetterSpacingPx: 1,
|
|
527
|
+
script: "indic"
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
return {
|
|
532
|
+
allowLetterSpacing: true,
|
|
533
|
+
maxLetterSpacingPx: Infinity,
|
|
534
|
+
script: "standard"
|
|
535
|
+
};
|
|
536
|
+
}
|
|
324
537
|
function applyPage(values) {
|
|
325
538
|
const undo = [];
|
|
326
539
|
function set(element, property, value) {
|
|
@@ -339,20 +552,49 @@ function applyPage(values) {
|
|
|
339
552
|
document.body.querySelectorAll("*")
|
|
340
553
|
).filter((el) => el instanceof HTMLElement && !el.matches(EXCLUDED));
|
|
341
554
|
const elements = allElements.length > MAX_HOST_ELEMENTS ? allElements.slice(0, MAX_HOST_ELEMENTS) : allElements;
|
|
342
|
-
const
|
|
343
|
-
const
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
555
|
+
const fontScaleValue = typeof values.fontScale === "number" && values.fontScale !== 1 ? values.fontScale : typeof values.textScale === "number" && values.textScale !== 1 ? values.textScale : void 0;
|
|
556
|
+
const fontSizeScale = typeof values.fontSize === "number" && values.fontSize !== 100 ? values.fontSize / 100 : void 0;
|
|
557
|
+
const font = fontScaleValue ?? fontSizeScale ?? 1;
|
|
558
|
+
const rawLineHeight = typeof values.lineHeight === "number" ? values.lineHeight : 100;
|
|
559
|
+
const lineRatio = rawLineHeight <= 2.5 ? rawLineHeight : rawLineHeight / 100;
|
|
560
|
+
const fontActive = font !== 1;
|
|
561
|
+
const lineActive = lineRatio !== 1;
|
|
562
|
+
if (fontActive || lineActive) {
|
|
563
|
+
const measurements = elements.filter(
|
|
564
|
+
(el) => !isProtectedFromTextScale(el) || !isProtectedFromTextSpacing(el)
|
|
565
|
+
).map((el) => {
|
|
566
|
+
const computed = getComputedStyle(el);
|
|
567
|
+
return {
|
|
568
|
+
el,
|
|
569
|
+
protectScale: isProtectedFromTextScale(el),
|
|
570
|
+
protectSpacing: isProtectedFromTextSpacing(el),
|
|
571
|
+
font: parseFloat(computed.fontSize) || 16,
|
|
572
|
+
line: parseFloat(computed.lineHeight) || (parseFloat(computed.fontSize) || 16) * 1.2
|
|
573
|
+
};
|
|
574
|
+
});
|
|
575
|
+
for (const measured of measurements) {
|
|
576
|
+
if (fontActive && !measured.protectScale) {
|
|
577
|
+
set(measured.el, "font-size", `${measured.font * font}px`);
|
|
578
|
+
}
|
|
579
|
+
if (measured.protectSpacing) {
|
|
580
|
+
if (fontActive && !measured.protectScale) {
|
|
581
|
+
set(measured.el, "line-height", `${measured.line * font}px`);
|
|
582
|
+
} else if (lineActive) {
|
|
583
|
+
const prev = measured.el.style.getPropertyValue("line-height");
|
|
584
|
+
if (!prev) {
|
|
585
|
+
set(measured.el, "line-height", `${measured.line}px`);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
} else {
|
|
589
|
+
if (lineActive || fontActive) {
|
|
590
|
+
set(
|
|
591
|
+
measured.el,
|
|
592
|
+
"line-height",
|
|
593
|
+
`${measured.line * lineRatio * font}px`
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
356
598
|
}
|
|
357
599
|
const filter = composeFilter(values);
|
|
358
600
|
for (const el of Array.from(document.body.children)) {
|
|
@@ -370,9 +612,76 @@ function applyPage(values) {
|
|
|
370
612
|
const base = computed.filter;
|
|
371
613
|
set(el, "filter", `${base && base !== "none" ? base + " " : ""}${filter}`);
|
|
372
614
|
}
|
|
615
|
+
const letterSpacingVal = typeof values.letterSpacing === "number" && values.letterSpacing > 0 ? values.letterSpacing : 0;
|
|
616
|
+
const letterSpacingEmVal = typeof values.letterSpacingEm === "number" && values.letterSpacingEm > 0 ? values.letterSpacingEm : null;
|
|
617
|
+
if (letterSpacingVal > 0 || letterSpacingEmVal !== null) {
|
|
618
|
+
for (const el of elements) {
|
|
619
|
+
if (isProtectedFromTextSpacing(el)) {
|
|
620
|
+
if (el.matches(
|
|
621
|
+
"table, [role='table'], td, th, pre, code, kbd, samp, var, button, input, select, textarea, [data-arap-ui]"
|
|
622
|
+
)) {
|
|
623
|
+
const previous = el.style.getPropertyValue("letter-spacing");
|
|
624
|
+
if (!previous) {
|
|
625
|
+
set(el, "letter-spacing", "normal");
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
continue;
|
|
629
|
+
}
|
|
630
|
+
const scriptLimits = getScriptSpacingConstraints(el);
|
|
631
|
+
if (!scriptLimits.allowLetterSpacing) {
|
|
632
|
+
const previous = el.style.getPropertyValue("letter-spacing");
|
|
633
|
+
if (!previous) {
|
|
634
|
+
set(el, "letter-spacing", "normal");
|
|
635
|
+
}
|
|
636
|
+
continue;
|
|
637
|
+
}
|
|
638
|
+
let targetSpacing;
|
|
639
|
+
if (letterSpacingEmVal !== null) {
|
|
640
|
+
const clampedEm = scriptLimits.maxLetterSpacingPx === 1 ? Math.min(letterSpacingEmVal, 0.05) : letterSpacingEmVal;
|
|
641
|
+
targetSpacing = `${clampedEm}em`;
|
|
642
|
+
} else {
|
|
643
|
+
const clampedPx = Math.min(
|
|
644
|
+
letterSpacingVal,
|
|
645
|
+
scriptLimits.maxLetterSpacingPx
|
|
646
|
+
);
|
|
647
|
+
targetSpacing = `${clampedPx}px`;
|
|
648
|
+
}
|
|
649
|
+
set(el, "letter-spacing", targetSpacing);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
const wordSpacingVal = typeof values.wordSpacing === "number" && values.wordSpacing > 0 ? values.wordSpacing : 0;
|
|
653
|
+
const wordSpacingEmVal = typeof values.wordSpacingEm === "number" && values.wordSpacingEm > 0 ? values.wordSpacingEm : null;
|
|
654
|
+
if (wordSpacingVal > 0 || wordSpacingEmVal !== null) {
|
|
655
|
+
for (const el of elements) {
|
|
656
|
+
if (isProtectedFromTextSpacing(el)) {
|
|
657
|
+
if (el.matches(
|
|
658
|
+
"table, [role='table'], td, th, pre, code, kbd, samp, var, button, input, select, textarea, [data-arap-ui]"
|
|
659
|
+
)) {
|
|
660
|
+
const previous = el.style.getPropertyValue("word-spacing");
|
|
661
|
+
if (!previous) {
|
|
662
|
+
set(el, "word-spacing", "normal");
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
667
|
+
const targetSpacing = wordSpacingEmVal !== null ? `${wordSpacingEmVal}em` : `${wordSpacingVal}px`;
|
|
668
|
+
set(el, "word-spacing", targetSpacing);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
const paragraphSpacingVal = typeof values.paragraphSpacing === "number" && values.paragraphSpacing > 0 ? values.paragraphSpacing : 0;
|
|
672
|
+
const paragraphSpacingEmVal = typeof values.paragraphSpacingEm === "number" && values.paragraphSpacingEm > 0 ? values.paragraphSpacingEm : null;
|
|
673
|
+
if (paragraphSpacingVal > 0 || paragraphSpacingEmVal !== null) {
|
|
674
|
+
for (const el of elements) {
|
|
675
|
+
if (isProtectedFromTextSpacing(el)) continue;
|
|
676
|
+
if (el.matches("p, [role='paragraph']")) {
|
|
677
|
+
const computed = getComputedStyle(el);
|
|
678
|
+
const baseMargin = parseFloat(computed.marginBottom) || 0;
|
|
679
|
+
const targetMargin = paragraphSpacingEmVal !== null ? `${paragraphSpacingEmVal}em` : `${baseMargin + paragraphSpacingVal}px`;
|
|
680
|
+
set(el, "margin-bottom", targetMargin);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
373
684
|
for (const el of elements) {
|
|
374
|
-
if (Number(values.letterSpacing) > 0)
|
|
375
|
-
set(el, "letter-spacing", `${values.letterSpacing}px`);
|
|
376
685
|
if (values.textAlign && values.textAlign !== "default")
|
|
377
686
|
set(el, "text-align", String(values.textAlign));
|
|
378
687
|
if (values.bigCursor) set(el, "cursor", cursor);
|
|
@@ -693,6 +1002,9 @@ var enLocale = Object.freeze({
|
|
|
693
1002
|
resetAll: "Reset All",
|
|
694
1003
|
statementLink: "Accessibility Statement",
|
|
695
1004
|
openInNewTab: "opens in a new tab",
|
|
1005
|
+
creditsPrefix: "Designed and developed by",
|
|
1006
|
+
creditsName: "Praboth",
|
|
1007
|
+
documentationLink: "Official documentation",
|
|
696
1008
|
buttonTitle: "Accessibility",
|
|
697
1009
|
dragHelp: "Drag to move, or use Alt and arrow keys. The Move button menu offers click and keyboard controls.",
|
|
698
1010
|
positionLabel: "Button position",
|
|
@@ -1166,7 +1478,45 @@ function Panel({
|
|
|
1166
1478
|
] })
|
|
1167
1479
|
]
|
|
1168
1480
|
}
|
|
1169
|
-
) })
|
|
1481
|
+
) }),
|
|
1482
|
+
/* @__PURE__ */ jsxs4("div", { className: "arap-credits", children: [
|
|
1483
|
+
/* @__PURE__ */ jsxs4("span", { children: [
|
|
1484
|
+
strings.creditsPrefix ?? "Designed and developed by",
|
|
1485
|
+
" ",
|
|
1486
|
+
/* @__PURE__ */ jsxs4(
|
|
1487
|
+
"a",
|
|
1488
|
+
{
|
|
1489
|
+
href: "https://www.praboth.com",
|
|
1490
|
+
target: "_blank",
|
|
1491
|
+
rel: "noopener noreferrer",
|
|
1492
|
+
children: [
|
|
1493
|
+
strings.creditsName ?? "Praboth",
|
|
1494
|
+
/* @__PURE__ */ jsxs4("span", { className: "arap-sr-only", children: [
|
|
1495
|
+
" (",
|
|
1496
|
+
strings.openInNewTab,
|
|
1497
|
+
")"
|
|
1498
|
+
] })
|
|
1499
|
+
]
|
|
1500
|
+
}
|
|
1501
|
+
)
|
|
1502
|
+
] }),
|
|
1503
|
+
/* @__PURE__ */ jsxs4(
|
|
1504
|
+
"a",
|
|
1505
|
+
{
|
|
1506
|
+
href: "https://www.praboth.com/accessibility-plugin-react",
|
|
1507
|
+
target: "_blank",
|
|
1508
|
+
rel: "noopener noreferrer",
|
|
1509
|
+
children: [
|
|
1510
|
+
strings.documentationLink ?? "Official documentation",
|
|
1511
|
+
/* @__PURE__ */ jsxs4("span", { className: "arap-sr-only", children: [
|
|
1512
|
+
" (",
|
|
1513
|
+
strings.openInNewTab,
|
|
1514
|
+
")"
|
|
1515
|
+
] })
|
|
1516
|
+
]
|
|
1517
|
+
}
|
|
1518
|
+
)
|
|
1519
|
+
] })
|
|
1170
1520
|
]
|
|
1171
1521
|
}
|
|
1172
1522
|
);
|
|
@@ -1522,6 +1872,8 @@ var drawings = {
|
|
|
1522
1872
|
fontSize: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("path", { d: "M3 18 8 5l5 13M5 13h6M15 18l3-8 3 8M16 15h4" }) }),
|
|
1523
1873
|
lineHeight: /* @__PURE__ */ jsx6(Fragment, { children: /* @__PURE__ */ jsx6("path", { d: "M9 6h12M9 12h9M9 18h12M4 4v16m-2-2 2 2 2-2M2 6l2-2 2 2" }) }),
|
|
1524
1874
|
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" }) }),
|
|
1875
|
+
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" }) }),
|
|
1876
|
+
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" }) }),
|
|
1525
1877
|
contrast: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1526
1878
|
/* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1527
1879
|
/* @__PURE__ */ jsx6("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
@@ -1587,11 +1939,44 @@ var DEFAULT_VALUE = 100;
|
|
|
1587
1939
|
var MIN = 50;
|
|
1588
1940
|
var MAX = 200;
|
|
1589
1941
|
var STEP = 10;
|
|
1590
|
-
|
|
1942
|
+
var DEFAULT_STEP_SCALE = [100, 112.5, 125, 150, 200];
|
|
1943
|
+
function FontSizeController({
|
|
1944
|
+
steps: customSteps,
|
|
1945
|
+
stepScale
|
|
1946
|
+
} = {}) {
|
|
1591
1947
|
const { value, setValue } = useAccessibility(
|
|
1592
1948
|
FEATURE_KEY,
|
|
1593
1949
|
DEFAULT_VALUE
|
|
1594
1950
|
);
|
|
1951
|
+
const steps = customSteps ? customSteps.map((s) => s <= 2.5 ? Math.round(s * 1e3) / 10 : s) : stepScale ? DEFAULT_STEP_SCALE : null;
|
|
1952
|
+
const handleDecrease = () => {
|
|
1953
|
+
if (steps && steps.length > 0) {
|
|
1954
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
1955
|
+
if (idx > 0) {
|
|
1956
|
+
setValue(steps[idx - 1]);
|
|
1957
|
+
} else if (idx === -1) {
|
|
1958
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
1959
|
+
setValue(lower ?? steps[0]);
|
|
1960
|
+
}
|
|
1961
|
+
} else {
|
|
1962
|
+
setValue(Math.max(MIN, value - STEP));
|
|
1963
|
+
}
|
|
1964
|
+
};
|
|
1965
|
+
const handleIncrease = () => {
|
|
1966
|
+
if (steps && steps.length > 0) {
|
|
1967
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
1968
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
1969
|
+
setValue(steps[idx + 1]);
|
|
1970
|
+
} else if (idx === -1) {
|
|
1971
|
+
const higher = steps.find((s) => s > value);
|
|
1972
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
1973
|
+
}
|
|
1974
|
+
} else {
|
|
1975
|
+
setValue(Math.min(MAX, value + STEP));
|
|
1976
|
+
}
|
|
1977
|
+
};
|
|
1978
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= MIN;
|
|
1979
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= MAX;
|
|
1595
1980
|
return /* @__PURE__ */ jsxs6(
|
|
1596
1981
|
"div",
|
|
1597
1982
|
{
|
|
@@ -1608,23 +1993,23 @@ function FontSizeController() {
|
|
|
1608
1993
|
"button",
|
|
1609
1994
|
{
|
|
1610
1995
|
className: "arap-btn-sm",
|
|
1611
|
-
onClick:
|
|
1612
|
-
disabled:
|
|
1996
|
+
onClick: handleDecrease,
|
|
1997
|
+
disabled: isMin,
|
|
1613
1998
|
"aria-label": "Decrease font size",
|
|
1614
1999
|
type: "button",
|
|
1615
2000
|
children: "\u2212"
|
|
1616
2001
|
}
|
|
1617
2002
|
),
|
|
1618
2003
|
/* @__PURE__ */ jsxs6("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1619
|
-
value,
|
|
2004
|
+
Math.round(value),
|
|
1620
2005
|
"%"
|
|
1621
2006
|
] }),
|
|
1622
2007
|
/* @__PURE__ */ jsx7(
|
|
1623
2008
|
"button",
|
|
1624
2009
|
{
|
|
1625
2010
|
className: "arap-btn-sm",
|
|
1626
|
-
onClick:
|
|
1627
|
-
disabled:
|
|
2011
|
+
onClick: handleIncrease,
|
|
2012
|
+
disabled: isMax,
|
|
1628
2013
|
"aria-label": "Increase font size",
|
|
1629
2014
|
type: "button",
|
|
1630
2015
|
children: "+"
|
|
@@ -1636,52 +2021,72 @@ function FontSizeController() {
|
|
|
1636
2021
|
);
|
|
1637
2022
|
}
|
|
1638
2023
|
|
|
1639
|
-
// src/features/
|
|
2024
|
+
// src/features/TextScaleController.tsx
|
|
1640
2025
|
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1641
|
-
var FEATURE_KEY2 = "
|
|
1642
|
-
var DEFAULT_VALUE2 =
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
2026
|
+
var FEATURE_KEY2 = "fontScale";
|
|
2027
|
+
var DEFAULT_VALUE2 = 1;
|
|
2028
|
+
function TextScaleController({
|
|
2029
|
+
steps = TEXT_SCALE_STEPS,
|
|
2030
|
+
label = "Bigger Text"
|
|
2031
|
+
} = {}) {
|
|
1647
2032
|
const { value, setValue } = useAccessibility(
|
|
1648
2033
|
FEATURE_KEY2,
|
|
1649
2034
|
DEFAULT_VALUE2
|
|
1650
2035
|
);
|
|
2036
|
+
const currentIndex = steps.findIndex((s) => Math.abs(s - value) < 0.01);
|
|
2037
|
+
const isMin = currentIndex === 0 || value <= steps[0];
|
|
2038
|
+
const isMax = currentIndex === steps.length - 1 || value >= steps[steps.length - 1];
|
|
2039
|
+
const handleDecrease = () => {
|
|
2040
|
+
if (currentIndex > 0) {
|
|
2041
|
+
setValue(steps[currentIndex - 1]);
|
|
2042
|
+
} else if (currentIndex === -1) {
|
|
2043
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2044
|
+
setValue(lower ?? steps[0]);
|
|
2045
|
+
}
|
|
2046
|
+
};
|
|
2047
|
+
const handleIncrease = () => {
|
|
2048
|
+
if (currentIndex !== -1 && currentIndex < steps.length - 1) {
|
|
2049
|
+
setValue(steps[currentIndex + 1]);
|
|
2050
|
+
} else if (currentIndex === -1) {
|
|
2051
|
+
const higher = steps.find((s) => s > value);
|
|
2052
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2053
|
+
}
|
|
2054
|
+
};
|
|
2055
|
+
const percentage = Math.round(value * 100);
|
|
1651
2056
|
return /* @__PURE__ */ jsxs7(
|
|
1652
2057
|
"div",
|
|
1653
2058
|
{
|
|
1654
2059
|
className: "arap-feature arap-feature-stepper",
|
|
1655
2060
|
role: "group",
|
|
1656
|
-
"aria-label":
|
|
2061
|
+
"aria-label": label,
|
|
1657
2062
|
children: [
|
|
1658
2063
|
/* @__PURE__ */ jsxs7("span", { className: "arap-label", children: [
|
|
1659
|
-
/* @__PURE__ */ jsx8(FeatureIcon, { name:
|
|
1660
|
-
/* @__PURE__ */ jsx8("span", { children:
|
|
2064
|
+
/* @__PURE__ */ jsx8(FeatureIcon, { name: "fontSize" }),
|
|
2065
|
+
/* @__PURE__ */ jsx8("span", { children: label })
|
|
1661
2066
|
] }),
|
|
1662
2067
|
/* @__PURE__ */ jsxs7("div", { className: "arap-controls", children: [
|
|
1663
2068
|
/* @__PURE__ */ jsx8(
|
|
1664
2069
|
"button",
|
|
1665
2070
|
{
|
|
1666
2071
|
className: "arap-btn-sm",
|
|
1667
|
-
onClick:
|
|
1668
|
-
disabled:
|
|
1669
|
-
"aria-label": "Decrease
|
|
2072
|
+
onClick: handleDecrease,
|
|
2073
|
+
disabled: isMin,
|
|
2074
|
+
"aria-label": "Decrease text size",
|
|
1670
2075
|
type: "button",
|
|
1671
2076
|
children: "\u2212"
|
|
1672
2077
|
}
|
|
1673
2078
|
),
|
|
1674
2079
|
/* @__PURE__ */ jsxs7("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1675
|
-
|
|
2080
|
+
percentage,
|
|
1676
2081
|
"%"
|
|
1677
2082
|
] }),
|
|
1678
2083
|
/* @__PURE__ */ jsx8(
|
|
1679
2084
|
"button",
|
|
1680
2085
|
{
|
|
1681
2086
|
className: "arap-btn-sm",
|
|
1682
|
-
onClick:
|
|
1683
|
-
disabled:
|
|
1684
|
-
"aria-label": "Increase
|
|
2087
|
+
onClick: handleIncrease,
|
|
2088
|
+
disabled: isMax,
|
|
2089
|
+
"aria-label": "Increase text size",
|
|
1685
2090
|
type: "button",
|
|
1686
2091
|
children: "+"
|
|
1687
2092
|
}
|
|
@@ -1692,51 +2097,173 @@ function LineHeightController() {
|
|
|
1692
2097
|
);
|
|
1693
2098
|
}
|
|
1694
2099
|
|
|
1695
|
-
// src/features/
|
|
2100
|
+
// src/features/LineHeightController.tsx
|
|
1696
2101
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1697
|
-
var FEATURE_KEY3 = "
|
|
1698
|
-
var DEFAULT_VALUE3 =
|
|
1699
|
-
var
|
|
1700
|
-
var
|
|
1701
|
-
var
|
|
1702
|
-
function
|
|
2102
|
+
var FEATURE_KEY3 = "lineHeight";
|
|
2103
|
+
var DEFAULT_VALUE3 = 100;
|
|
2104
|
+
var MIN2 = 50;
|
|
2105
|
+
var MAX2 = 200;
|
|
2106
|
+
var STEP2 = 10;
|
|
2107
|
+
function LineHeightController({
|
|
2108
|
+
steps: customSteps,
|
|
2109
|
+
stepPresets
|
|
2110
|
+
} = {}) {
|
|
1703
2111
|
const { value, setValue } = useAccessibility(
|
|
1704
2112
|
FEATURE_KEY3,
|
|
1705
2113
|
DEFAULT_VALUE3
|
|
1706
2114
|
);
|
|
2115
|
+
const normalizedValue = typeof value === "number" && value <= 2.5 ? Math.round(value * 100) : value ?? DEFAULT_VALUE3;
|
|
2116
|
+
const steps = customSteps ? customSteps.map((s) => s <= 2.5 ? Math.round(s * 100) : s) : stepPresets ? LINE_HEIGHT_STEPS : null;
|
|
2117
|
+
const handleDecrease = () => {
|
|
2118
|
+
if (steps && steps.length > 0) {
|
|
2119
|
+
const idx = steps.findIndex((s) => Math.abs(s - normalizedValue) < 0.1);
|
|
2120
|
+
if (idx > 0) {
|
|
2121
|
+
setValue(steps[idx - 1]);
|
|
2122
|
+
} else if (idx === -1) {
|
|
2123
|
+
const lower = [...steps].reverse().find((s) => s < normalizedValue);
|
|
2124
|
+
setValue(lower ?? steps[0]);
|
|
2125
|
+
}
|
|
2126
|
+
} else {
|
|
2127
|
+
setValue(Math.max(MIN2, normalizedValue - STEP2));
|
|
2128
|
+
}
|
|
2129
|
+
};
|
|
2130
|
+
const handleIncrease = () => {
|
|
2131
|
+
if (steps && steps.length > 0) {
|
|
2132
|
+
const idx = steps.findIndex((s) => Math.abs(s - normalizedValue) < 0.1);
|
|
2133
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2134
|
+
setValue(steps[idx + 1]);
|
|
2135
|
+
} else if (idx === -1) {
|
|
2136
|
+
const higher = steps.find((s) => s > normalizedValue);
|
|
2137
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2138
|
+
}
|
|
2139
|
+
} else {
|
|
2140
|
+
setValue(Math.min(MAX2, normalizedValue + STEP2));
|
|
2141
|
+
}
|
|
2142
|
+
};
|
|
2143
|
+
const isMin = steps && steps.length > 0 ? normalizedValue <= steps[0] : normalizedValue <= MIN2;
|
|
2144
|
+
const isMax = steps && steps.length > 0 ? normalizedValue >= steps[steps.length - 1] : normalizedValue >= MAX2;
|
|
1707
2145
|
return /* @__PURE__ */ jsxs8(
|
|
1708
2146
|
"div",
|
|
1709
2147
|
{
|
|
1710
2148
|
className: "arap-feature arap-feature-stepper",
|
|
1711
2149
|
role: "group",
|
|
1712
|
-
"aria-label": "
|
|
2150
|
+
"aria-label": "Line Height",
|
|
1713
2151
|
children: [
|
|
1714
2152
|
/* @__PURE__ */ jsxs8("span", { className: "arap-label", children: [
|
|
1715
2153
|
/* @__PURE__ */ jsx9(FeatureIcon, { name: FEATURE_KEY3 }),
|
|
1716
|
-
/* @__PURE__ */ jsx9("span", { children: "
|
|
2154
|
+
/* @__PURE__ */ jsx9("span", { children: "Line Height" })
|
|
1717
2155
|
] }),
|
|
1718
2156
|
/* @__PURE__ */ jsxs8("div", { className: "arap-controls", children: [
|
|
1719
2157
|
/* @__PURE__ */ jsx9(
|
|
1720
2158
|
"button",
|
|
1721
2159
|
{
|
|
1722
2160
|
className: "arap-btn-sm",
|
|
1723
|
-
onClick:
|
|
1724
|
-
disabled:
|
|
1725
|
-
"aria-label": "Decrease
|
|
2161
|
+
onClick: handleDecrease,
|
|
2162
|
+
disabled: isMin,
|
|
2163
|
+
"aria-label": "Decrease line height",
|
|
1726
2164
|
type: "button",
|
|
1727
2165
|
children: "\u2212"
|
|
1728
2166
|
}
|
|
1729
2167
|
),
|
|
1730
2168
|
/* @__PURE__ */ jsxs8("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2169
|
+
Math.round(normalizedValue),
|
|
2170
|
+
"%"
|
|
2171
|
+
] }),
|
|
2172
|
+
/* @__PURE__ */ jsx9(
|
|
2173
|
+
"button",
|
|
2174
|
+
{
|
|
2175
|
+
className: "arap-btn-sm",
|
|
2176
|
+
onClick: handleIncrease,
|
|
2177
|
+
disabled: isMax,
|
|
2178
|
+
"aria-label": "Increase line height",
|
|
2179
|
+
type: "button",
|
|
2180
|
+
children: "+"
|
|
2181
|
+
}
|
|
2182
|
+
)
|
|
2183
|
+
] })
|
|
2184
|
+
]
|
|
2185
|
+
}
|
|
2186
|
+
);
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
// src/features/LetterSpacingController.tsx
|
|
2190
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2191
|
+
var FEATURE_KEY4 = "letterSpacing";
|
|
2192
|
+
var DEFAULT_VALUE4 = 0;
|
|
2193
|
+
var MIN3 = 0;
|
|
2194
|
+
var MAX3 = 10;
|
|
2195
|
+
var STEP3 = 1;
|
|
2196
|
+
function LetterSpacingController({
|
|
2197
|
+
min = MIN3,
|
|
2198
|
+
max = MAX3,
|
|
2199
|
+
step = STEP3,
|
|
2200
|
+
steps
|
|
2201
|
+
} = {}) {
|
|
2202
|
+
const { value, setValue } = useAccessibility(
|
|
2203
|
+
FEATURE_KEY4,
|
|
2204
|
+
DEFAULT_VALUE4
|
|
2205
|
+
);
|
|
2206
|
+
const handleDecrease = () => {
|
|
2207
|
+
if (steps && steps.length > 0) {
|
|
2208
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2209
|
+
if (idx > 0) {
|
|
2210
|
+
setValue(steps[idx - 1]);
|
|
2211
|
+
} else if (idx === -1) {
|
|
2212
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2213
|
+
setValue(lower ?? steps[0]);
|
|
2214
|
+
}
|
|
2215
|
+
} else {
|
|
2216
|
+
setValue(Math.max(min, value - step));
|
|
2217
|
+
}
|
|
2218
|
+
};
|
|
2219
|
+
const handleIncrease = () => {
|
|
2220
|
+
if (steps && steps.length > 0) {
|
|
2221
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2222
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2223
|
+
setValue(steps[idx + 1]);
|
|
2224
|
+
} else if (idx === -1) {
|
|
2225
|
+
const higher = steps.find((s) => s > value);
|
|
2226
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2227
|
+
}
|
|
2228
|
+
} else {
|
|
2229
|
+
setValue(Math.min(max, value + step));
|
|
2230
|
+
}
|
|
2231
|
+
};
|
|
2232
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2233
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2234
|
+
return /* @__PURE__ */ jsxs9(
|
|
2235
|
+
"div",
|
|
2236
|
+
{
|
|
2237
|
+
className: "arap-feature arap-feature-stepper",
|
|
2238
|
+
role: "group",
|
|
2239
|
+
"aria-label": "Letter Spacing",
|
|
2240
|
+
children: [
|
|
2241
|
+
/* @__PURE__ */ jsxs9("span", { className: "arap-label", children: [
|
|
2242
|
+
/* @__PURE__ */ jsx10(FeatureIcon, { name: FEATURE_KEY4 }),
|
|
2243
|
+
/* @__PURE__ */ jsx10("span", { children: "Letter Spacing" })
|
|
2244
|
+
] }),
|
|
2245
|
+
/* @__PURE__ */ jsxs9("div", { className: "arap-controls", children: [
|
|
2246
|
+
/* @__PURE__ */ jsx10(
|
|
2247
|
+
"button",
|
|
2248
|
+
{
|
|
2249
|
+
className: "arap-btn-sm",
|
|
2250
|
+
onClick: handleDecrease,
|
|
2251
|
+
disabled: isMin,
|
|
2252
|
+
"aria-label": "Decrease letter spacing",
|
|
2253
|
+
type: "button",
|
|
2254
|
+
children: "\u2212"
|
|
2255
|
+
}
|
|
2256
|
+
),
|
|
2257
|
+
/* @__PURE__ */ jsxs9("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1731
2258
|
value,
|
|
1732
2259
|
"px"
|
|
1733
2260
|
] }),
|
|
1734
|
-
/* @__PURE__ */
|
|
2261
|
+
/* @__PURE__ */ jsx10(
|
|
1735
2262
|
"button",
|
|
1736
2263
|
{
|
|
1737
2264
|
className: "arap-btn-sm",
|
|
1738
|
-
onClick:
|
|
1739
|
-
disabled:
|
|
2265
|
+
onClick: handleIncrease,
|
|
2266
|
+
disabled: isMax,
|
|
1740
2267
|
"aria-label": "Increase letter spacing",
|
|
1741
2268
|
type: "button",
|
|
1742
2269
|
children: "+"
|
|
@@ -1748,10 +2275,188 @@ function LetterSpacingController() {
|
|
|
1748
2275
|
);
|
|
1749
2276
|
}
|
|
1750
2277
|
|
|
2278
|
+
// src/features/WordSpacingController.tsx
|
|
2279
|
+
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2280
|
+
var FEATURE_KEY5 = "wordSpacing";
|
|
2281
|
+
var DEFAULT_VALUE5 = 0;
|
|
2282
|
+
var MIN4 = 0;
|
|
2283
|
+
var MAX4 = 10;
|
|
2284
|
+
var STEP4 = 1;
|
|
2285
|
+
function WordSpacingController({
|
|
2286
|
+
min = MIN4,
|
|
2287
|
+
max = MAX4,
|
|
2288
|
+
step = STEP4,
|
|
2289
|
+
steps
|
|
2290
|
+
} = {}) {
|
|
2291
|
+
const { value, setValue } = useAccessibility(
|
|
2292
|
+
FEATURE_KEY5,
|
|
2293
|
+
DEFAULT_VALUE5
|
|
2294
|
+
);
|
|
2295
|
+
const handleDecrease = () => {
|
|
2296
|
+
if (steps && steps.length > 0) {
|
|
2297
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2298
|
+
if (idx > 0) {
|
|
2299
|
+
setValue(steps[idx - 1]);
|
|
2300
|
+
} else if (idx === -1) {
|
|
2301
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2302
|
+
setValue(lower ?? steps[0]);
|
|
2303
|
+
}
|
|
2304
|
+
} else {
|
|
2305
|
+
setValue(Math.max(min, value - step));
|
|
2306
|
+
}
|
|
2307
|
+
};
|
|
2308
|
+
const handleIncrease = () => {
|
|
2309
|
+
if (steps && steps.length > 0) {
|
|
2310
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2311
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2312
|
+
setValue(steps[idx + 1]);
|
|
2313
|
+
} else if (idx === -1) {
|
|
2314
|
+
const higher = steps.find((s) => s > value);
|
|
2315
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2316
|
+
}
|
|
2317
|
+
} else {
|
|
2318
|
+
setValue(Math.min(max, value + step));
|
|
2319
|
+
}
|
|
2320
|
+
};
|
|
2321
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2322
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2323
|
+
return /* @__PURE__ */ jsxs10(
|
|
2324
|
+
"div",
|
|
2325
|
+
{
|
|
2326
|
+
className: "arap-feature arap-feature-stepper",
|
|
2327
|
+
role: "group",
|
|
2328
|
+
"aria-label": "Word Spacing",
|
|
2329
|
+
children: [
|
|
2330
|
+
/* @__PURE__ */ jsxs10("span", { className: "arap-label", children: [
|
|
2331
|
+
/* @__PURE__ */ jsx11(FeatureIcon, { name: FEATURE_KEY5 }),
|
|
2332
|
+
/* @__PURE__ */ jsx11("span", { children: "Word Spacing" })
|
|
2333
|
+
] }),
|
|
2334
|
+
/* @__PURE__ */ jsxs10("div", { className: "arap-controls", children: [
|
|
2335
|
+
/* @__PURE__ */ jsx11(
|
|
2336
|
+
"button",
|
|
2337
|
+
{
|
|
2338
|
+
className: "arap-btn-sm",
|
|
2339
|
+
onClick: handleDecrease,
|
|
2340
|
+
disabled: isMin,
|
|
2341
|
+
"aria-label": "Decrease word spacing",
|
|
2342
|
+
type: "button",
|
|
2343
|
+
children: "\u2212"
|
|
2344
|
+
}
|
|
2345
|
+
),
|
|
2346
|
+
/* @__PURE__ */ jsxs10("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2347
|
+
value,
|
|
2348
|
+
"px"
|
|
2349
|
+
] }),
|
|
2350
|
+
/* @__PURE__ */ jsx11(
|
|
2351
|
+
"button",
|
|
2352
|
+
{
|
|
2353
|
+
className: "arap-btn-sm",
|
|
2354
|
+
onClick: handleIncrease,
|
|
2355
|
+
disabled: isMax,
|
|
2356
|
+
"aria-label": "Increase word spacing",
|
|
2357
|
+
type: "button",
|
|
2358
|
+
children: "+"
|
|
2359
|
+
}
|
|
2360
|
+
)
|
|
2361
|
+
] })
|
|
2362
|
+
]
|
|
2363
|
+
}
|
|
2364
|
+
);
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
// src/features/ParagraphSpacingController.tsx
|
|
2368
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2369
|
+
var FEATURE_KEY6 = "paragraphSpacing";
|
|
2370
|
+
var DEFAULT_VALUE6 = 0;
|
|
2371
|
+
var MIN5 = 0;
|
|
2372
|
+
var MAX5 = 32;
|
|
2373
|
+
var STEP5 = 4;
|
|
2374
|
+
function ParagraphSpacingController({
|
|
2375
|
+
min = MIN5,
|
|
2376
|
+
max = MAX5,
|
|
2377
|
+
step = STEP5,
|
|
2378
|
+
steps
|
|
2379
|
+
} = {}) {
|
|
2380
|
+
const { value, setValue } = useAccessibility(
|
|
2381
|
+
FEATURE_KEY6,
|
|
2382
|
+
DEFAULT_VALUE6
|
|
2383
|
+
);
|
|
2384
|
+
const handleDecrease = () => {
|
|
2385
|
+
if (steps && steps.length > 0) {
|
|
2386
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2387
|
+
if (idx > 0) {
|
|
2388
|
+
setValue(steps[idx - 1]);
|
|
2389
|
+
} else if (idx === -1) {
|
|
2390
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2391
|
+
setValue(lower ?? steps[0]);
|
|
2392
|
+
}
|
|
2393
|
+
} else {
|
|
2394
|
+
setValue(Math.max(min, value - step));
|
|
2395
|
+
}
|
|
2396
|
+
};
|
|
2397
|
+
const handleIncrease = () => {
|
|
2398
|
+
if (steps && steps.length > 0) {
|
|
2399
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2400
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2401
|
+
setValue(steps[idx + 1]);
|
|
2402
|
+
} else if (idx === -1) {
|
|
2403
|
+
const higher = steps.find((s) => s > value);
|
|
2404
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2405
|
+
}
|
|
2406
|
+
} else {
|
|
2407
|
+
setValue(Math.min(max, value + step));
|
|
2408
|
+
}
|
|
2409
|
+
};
|
|
2410
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2411
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2412
|
+
return /* @__PURE__ */ jsxs11(
|
|
2413
|
+
"div",
|
|
2414
|
+
{
|
|
2415
|
+
className: "arap-feature arap-feature-stepper",
|
|
2416
|
+
role: "group",
|
|
2417
|
+
"aria-label": "Paragraph Spacing",
|
|
2418
|
+
children: [
|
|
2419
|
+
/* @__PURE__ */ jsxs11("span", { className: "arap-label", children: [
|
|
2420
|
+
/* @__PURE__ */ jsx12(FeatureIcon, { name: FEATURE_KEY6 }),
|
|
2421
|
+
/* @__PURE__ */ jsx12("span", { children: "Paragraph Spacing" })
|
|
2422
|
+
] }),
|
|
2423
|
+
/* @__PURE__ */ jsxs11("div", { className: "arap-controls", children: [
|
|
2424
|
+
/* @__PURE__ */ jsx12(
|
|
2425
|
+
"button",
|
|
2426
|
+
{
|
|
2427
|
+
className: "arap-btn-sm",
|
|
2428
|
+
onClick: handleDecrease,
|
|
2429
|
+
disabled: isMin,
|
|
2430
|
+
"aria-label": "Decrease paragraph spacing",
|
|
2431
|
+
type: "button",
|
|
2432
|
+
children: "\u2212"
|
|
2433
|
+
}
|
|
2434
|
+
),
|
|
2435
|
+
/* @__PURE__ */ jsxs11("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2436
|
+
value,
|
|
2437
|
+
"px"
|
|
2438
|
+
] }),
|
|
2439
|
+
/* @__PURE__ */ jsx12(
|
|
2440
|
+
"button",
|
|
2441
|
+
{
|
|
2442
|
+
className: "arap-btn-sm",
|
|
2443
|
+
onClick: handleIncrease,
|
|
2444
|
+
disabled: isMax,
|
|
2445
|
+
"aria-label": "Increase paragraph spacing",
|
|
2446
|
+
type: "button",
|
|
2447
|
+
children: "+"
|
|
2448
|
+
}
|
|
2449
|
+
)
|
|
2450
|
+
] })
|
|
2451
|
+
]
|
|
2452
|
+
}
|
|
2453
|
+
);
|
|
2454
|
+
}
|
|
2455
|
+
|
|
1751
2456
|
// src/features/ContrastController.tsx
|
|
1752
|
-
import { jsx as
|
|
1753
|
-
var
|
|
1754
|
-
var
|
|
2457
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2458
|
+
var FEATURE_KEY7 = "contrast";
|
|
2459
|
+
var DEFAULT_VALUE7 = 0;
|
|
1755
2460
|
var LEVELS = [
|
|
1756
2461
|
{ label: "Off", value: 0 },
|
|
1757
2462
|
{ label: "Reduced", value: "reduced" },
|
|
@@ -1764,15 +2469,15 @@ var LEVELS = [
|
|
|
1764
2469
|
];
|
|
1765
2470
|
function ContrastController() {
|
|
1766
2471
|
const { value, setValue } = useAccessibility(
|
|
1767
|
-
|
|
1768
|
-
|
|
2472
|
+
FEATURE_KEY7,
|
|
2473
|
+
DEFAULT_VALUE7
|
|
1769
2474
|
);
|
|
1770
|
-
return /* @__PURE__ */
|
|
1771
|
-
/* @__PURE__ */
|
|
1772
|
-
/* @__PURE__ */
|
|
1773
|
-
/* @__PURE__ */
|
|
2475
|
+
return /* @__PURE__ */ jsxs12("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
|
|
2476
|
+
/* @__PURE__ */ jsxs12("span", { className: "arap-label", children: [
|
|
2477
|
+
/* @__PURE__ */ jsx13(FeatureIcon, { name: FEATURE_KEY7 }),
|
|
2478
|
+
/* @__PURE__ */ jsx13("span", { children: "Contrast" })
|
|
1774
2479
|
] }),
|
|
1775
|
-
/* @__PURE__ */
|
|
2480
|
+
/* @__PURE__ */ jsx13("div", { className: "arap-segmented", children: LEVELS.map((level) => /* @__PURE__ */ jsxs12(
|
|
1776
2481
|
"button",
|
|
1777
2482
|
{
|
|
1778
2483
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -1780,7 +2485,7 @@ function ContrastController() {
|
|
|
1780
2485
|
"aria-pressed": value === level.value,
|
|
1781
2486
|
type: "button",
|
|
1782
2487
|
children: [
|
|
1783
|
-
value === level.value && /* @__PURE__ */
|
|
2488
|
+
value === level.value && /* @__PURE__ */ jsx13("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1784
2489
|
level.label
|
|
1785
2490
|
]
|
|
1786
2491
|
},
|
|
@@ -1790,9 +2495,9 @@ function ContrastController() {
|
|
|
1790
2495
|
}
|
|
1791
2496
|
|
|
1792
2497
|
// src/features/SaturationController.tsx
|
|
1793
|
-
import { jsx as
|
|
1794
|
-
var
|
|
1795
|
-
var
|
|
2498
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2499
|
+
var FEATURE_KEY8 = "saturation";
|
|
2500
|
+
var DEFAULT_VALUE8 = 0;
|
|
1796
2501
|
var LEVELS2 = [
|
|
1797
2502
|
{ label: "Off", value: 0 },
|
|
1798
2503
|
{ label: "Low", value: 1 },
|
|
@@ -1800,15 +2505,15 @@ var LEVELS2 = [
|
|
|
1800
2505
|
];
|
|
1801
2506
|
function SaturationController() {
|
|
1802
2507
|
const { value, setValue } = useAccessibility(
|
|
1803
|
-
|
|
1804
|
-
|
|
2508
|
+
FEATURE_KEY8,
|
|
2509
|
+
DEFAULT_VALUE8
|
|
1805
2510
|
);
|
|
1806
|
-
return /* @__PURE__ */
|
|
1807
|
-
/* @__PURE__ */
|
|
1808
|
-
/* @__PURE__ */
|
|
1809
|
-
/* @__PURE__ */
|
|
2511
|
+
return /* @__PURE__ */ jsxs13("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
|
|
2512
|
+
/* @__PURE__ */ jsxs13("span", { className: "arap-label", children: [
|
|
2513
|
+
/* @__PURE__ */ jsx14(FeatureIcon, { name: FEATURE_KEY8 }),
|
|
2514
|
+
/* @__PURE__ */ jsx14("span", { children: "Saturation" })
|
|
1810
2515
|
] }),
|
|
1811
|
-
/* @__PURE__ */
|
|
2516
|
+
/* @__PURE__ */ jsx14("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ jsxs13(
|
|
1812
2517
|
"button",
|
|
1813
2518
|
{
|
|
1814
2519
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -1816,7 +2521,7 @@ function SaturationController() {
|
|
|
1816
2521
|
"aria-pressed": value === level.value,
|
|
1817
2522
|
type: "button",
|
|
1818
2523
|
children: [
|
|
1819
|
-
value === level.value && /* @__PURE__ */
|
|
2524
|
+
value === level.value && /* @__PURE__ */ jsx14("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1820
2525
|
level.label
|
|
1821
2526
|
]
|
|
1822
2527
|
},
|
|
@@ -1826,20 +2531,20 @@ function SaturationController() {
|
|
|
1826
2531
|
}
|
|
1827
2532
|
|
|
1828
2533
|
// src/features/InvertColorsController.tsx
|
|
1829
|
-
import { jsx as
|
|
1830
|
-
var
|
|
1831
|
-
var
|
|
2534
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2535
|
+
var FEATURE_KEY9 = "invertColors";
|
|
2536
|
+
var DEFAULT_VALUE9 = false;
|
|
1832
2537
|
function InvertColorsController() {
|
|
1833
2538
|
const { value, setValue } = useAccessibility(
|
|
1834
|
-
|
|
1835
|
-
|
|
2539
|
+
FEATURE_KEY9,
|
|
2540
|
+
DEFAULT_VALUE9
|
|
1836
2541
|
);
|
|
1837
|
-
return /* @__PURE__ */
|
|
1838
|
-
/* @__PURE__ */
|
|
1839
|
-
/* @__PURE__ */
|
|
1840
|
-
/* @__PURE__ */
|
|
2542
|
+
return /* @__PURE__ */ jsxs14("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
|
|
2543
|
+
/* @__PURE__ */ jsxs14("span", { className: "arap-label", children: [
|
|
2544
|
+
/* @__PURE__ */ jsx15(FeatureIcon, { name: FEATURE_KEY9 }),
|
|
2545
|
+
/* @__PURE__ */ jsx15("span", { children: "Invert Colors" })
|
|
1841
2546
|
] }),
|
|
1842
|
-
/* @__PURE__ */
|
|
2547
|
+
/* @__PURE__ */ jsx15(
|
|
1843
2548
|
"button",
|
|
1844
2549
|
{
|
|
1845
2550
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -1847,27 +2552,27 @@ function InvertColorsController() {
|
|
|
1847
2552
|
"aria-label": "Invert Colors",
|
|
1848
2553
|
"aria-pressed": value,
|
|
1849
2554
|
type: "button",
|
|
1850
|
-
children: /* @__PURE__ */
|
|
2555
|
+
children: /* @__PURE__ */ jsx15("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
1851
2556
|
}
|
|
1852
2557
|
)
|
|
1853
2558
|
] });
|
|
1854
2559
|
}
|
|
1855
2560
|
|
|
1856
2561
|
// src/features/GrayscaleController.tsx
|
|
1857
|
-
import { jsx as
|
|
1858
|
-
var
|
|
1859
|
-
var
|
|
2562
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2563
|
+
var FEATURE_KEY10 = "grayscale";
|
|
2564
|
+
var DEFAULT_VALUE10 = false;
|
|
1860
2565
|
function GrayscaleController() {
|
|
1861
2566
|
const { value, setValue } = useAccessibility(
|
|
1862
|
-
|
|
1863
|
-
|
|
2567
|
+
FEATURE_KEY10,
|
|
2568
|
+
DEFAULT_VALUE10
|
|
1864
2569
|
);
|
|
1865
|
-
return /* @__PURE__ */
|
|
1866
|
-
/* @__PURE__ */
|
|
1867
|
-
/* @__PURE__ */
|
|
1868
|
-
/* @__PURE__ */
|
|
2570
|
+
return /* @__PURE__ */ jsxs15("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
|
|
2571
|
+
/* @__PURE__ */ jsxs15("span", { className: "arap-label", children: [
|
|
2572
|
+
/* @__PURE__ */ jsx16(FeatureIcon, { name: FEATURE_KEY10 }),
|
|
2573
|
+
/* @__PURE__ */ jsx16("span", { children: "Grayscale" })
|
|
1869
2574
|
] }),
|
|
1870
|
-
/* @__PURE__ */
|
|
2575
|
+
/* @__PURE__ */ jsx16(
|
|
1871
2576
|
"button",
|
|
1872
2577
|
{
|
|
1873
2578
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -1875,27 +2580,27 @@ function GrayscaleController() {
|
|
|
1875
2580
|
"aria-label": "Grayscale",
|
|
1876
2581
|
"aria-pressed": value,
|
|
1877
2582
|
type: "button",
|
|
1878
|
-
children: /* @__PURE__ */
|
|
2583
|
+
children: /* @__PURE__ */ jsx16("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
1879
2584
|
}
|
|
1880
2585
|
)
|
|
1881
2586
|
] });
|
|
1882
2587
|
}
|
|
1883
2588
|
|
|
1884
2589
|
// src/features/LinkHighlightController.tsx
|
|
1885
|
-
import { jsx as
|
|
1886
|
-
var
|
|
1887
|
-
var
|
|
2590
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2591
|
+
var FEATURE_KEY11 = "linkHighlight";
|
|
2592
|
+
var DEFAULT_VALUE11 = false;
|
|
1888
2593
|
function LinkHighlightController() {
|
|
1889
2594
|
const { value, setValue } = useAccessibility(
|
|
1890
|
-
|
|
1891
|
-
|
|
2595
|
+
FEATURE_KEY11,
|
|
2596
|
+
DEFAULT_VALUE11
|
|
1892
2597
|
);
|
|
1893
|
-
return /* @__PURE__ */
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
1896
|
-
/* @__PURE__ */
|
|
2598
|
+
return /* @__PURE__ */ jsxs16("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
|
|
2599
|
+
/* @__PURE__ */ jsxs16("span", { className: "arap-label", children: [
|
|
2600
|
+
/* @__PURE__ */ jsx17(FeatureIcon, { name: FEATURE_KEY11 }),
|
|
2601
|
+
/* @__PURE__ */ jsx17("span", { children: "Link Highlight" })
|
|
1897
2602
|
] }),
|
|
1898
|
-
/* @__PURE__ */
|
|
2603
|
+
/* @__PURE__ */ jsx17(
|
|
1899
2604
|
"button",
|
|
1900
2605
|
{
|
|
1901
2606
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -1903,10 +2608,10 @@ function LinkHighlightController() {
|
|
|
1903
2608
|
"aria-label": "Link Highlight",
|
|
1904
2609
|
"aria-pressed": !!value,
|
|
1905
2610
|
type: "button",
|
|
1906
|
-
children: /* @__PURE__ */
|
|
2611
|
+
children: /* @__PURE__ */ jsx17("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
1907
2612
|
}
|
|
1908
2613
|
),
|
|
1909
|
-
/* @__PURE__ */
|
|
2614
|
+
/* @__PURE__ */ jsx17("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ jsxs16(
|
|
1910
2615
|
"button",
|
|
1911
2616
|
{
|
|
1912
2617
|
type: "button",
|
|
@@ -1914,7 +2619,7 @@ function LinkHighlightController() {
|
|
|
1914
2619
|
"aria-pressed": value === mode,
|
|
1915
2620
|
onClick: () => setValue(mode),
|
|
1916
2621
|
children: [
|
|
1917
|
-
value === mode && /* @__PURE__ */
|
|
2622
|
+
value === mode && /* @__PURE__ */ jsx17("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1918
2623
|
mode.split("-").join(" ")
|
|
1919
2624
|
]
|
|
1920
2625
|
},
|
|
@@ -1924,21 +2629,21 @@ function LinkHighlightController() {
|
|
|
1924
2629
|
}
|
|
1925
2630
|
|
|
1926
2631
|
// src/features/TextAlignController.tsx
|
|
1927
|
-
import { jsx as
|
|
1928
|
-
var
|
|
1929
|
-
var
|
|
2632
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2633
|
+
var FEATURE_KEY12 = "textAlign";
|
|
2634
|
+
var DEFAULT_VALUE12 = "default";
|
|
1930
2635
|
var OPTIONS = ["default", "left", "center", "right", "justify"];
|
|
1931
2636
|
function TextAlignController() {
|
|
1932
2637
|
const { value, setValue } = useAccessibility(
|
|
1933
|
-
|
|
1934
|
-
|
|
2638
|
+
FEATURE_KEY12,
|
|
2639
|
+
DEFAULT_VALUE12
|
|
1935
2640
|
);
|
|
1936
|
-
return /* @__PURE__ */
|
|
1937
|
-
/* @__PURE__ */
|
|
1938
|
-
/* @__PURE__ */
|
|
1939
|
-
/* @__PURE__ */
|
|
2641
|
+
return /* @__PURE__ */ jsxs17("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
|
|
2642
|
+
/* @__PURE__ */ jsxs17("span", { className: "arap-label", children: [
|
|
2643
|
+
/* @__PURE__ */ jsx18(FeatureIcon, { name: FEATURE_KEY12 }),
|
|
2644
|
+
/* @__PURE__ */ jsx18("span", { children: "Text Alignment" })
|
|
1940
2645
|
] }),
|
|
1941
|
-
/* @__PURE__ */
|
|
2646
|
+
/* @__PURE__ */ jsx18("div", { className: "arap-segmented", children: OPTIONS.map((option) => /* @__PURE__ */ jsxs17(
|
|
1942
2647
|
"button",
|
|
1943
2648
|
{
|
|
1944
2649
|
className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
|
|
@@ -1947,7 +2652,7 @@ function TextAlignController() {
|
|
|
1947
2652
|
type: "button",
|
|
1948
2653
|
style: { textTransform: "capitalize" },
|
|
1949
2654
|
children: [
|
|
1950
|
-
value === option && /* @__PURE__ */
|
|
2655
|
+
value === option && /* @__PURE__ */ jsx18("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1951
2656
|
option
|
|
1952
2657
|
]
|
|
1953
2658
|
},
|
|
@@ -1957,20 +2662,20 @@ function TextAlignController() {
|
|
|
1957
2662
|
}
|
|
1958
2663
|
|
|
1959
2664
|
// src/features/HideImagesController.tsx
|
|
1960
|
-
import { jsx as
|
|
1961
|
-
var
|
|
1962
|
-
var
|
|
2665
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2666
|
+
var FEATURE_KEY13 = "hideImages";
|
|
2667
|
+
var DEFAULT_VALUE13 = false;
|
|
1963
2668
|
function HideImagesController() {
|
|
1964
2669
|
const { value, setValue } = useAccessibility(
|
|
1965
|
-
|
|
1966
|
-
|
|
2670
|
+
FEATURE_KEY13,
|
|
2671
|
+
DEFAULT_VALUE13
|
|
1967
2672
|
);
|
|
1968
|
-
return /* @__PURE__ */
|
|
1969
|
-
/* @__PURE__ */
|
|
1970
|
-
/* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
2673
|
+
return /* @__PURE__ */ jsxs18("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
2674
|
+
/* @__PURE__ */ jsxs18("span", { className: "arap-label", children: [
|
|
2675
|
+
/* @__PURE__ */ jsx19(FeatureIcon, { name: FEATURE_KEY13 }),
|
|
2676
|
+
/* @__PURE__ */ jsx19("span", { children: "Hide Images" })
|
|
1972
2677
|
] }),
|
|
1973
|
-
/* @__PURE__ */
|
|
2678
|
+
/* @__PURE__ */ jsx19(
|
|
1974
2679
|
"button",
|
|
1975
2680
|
{
|
|
1976
2681
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -1978,27 +2683,27 @@ function HideImagesController() {
|
|
|
1978
2683
|
"aria-label": "Hide Images",
|
|
1979
2684
|
"aria-pressed": value,
|
|
1980
2685
|
type: "button",
|
|
1981
|
-
children: /* @__PURE__ */
|
|
2686
|
+
children: /* @__PURE__ */ jsx19("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
1982
2687
|
}
|
|
1983
2688
|
)
|
|
1984
2689
|
] });
|
|
1985
2690
|
}
|
|
1986
2691
|
|
|
1987
2692
|
// src/features/HideVideosController.tsx
|
|
1988
|
-
import { jsx as
|
|
1989
|
-
var
|
|
1990
|
-
var
|
|
2693
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2694
|
+
var FEATURE_KEY14 = "hideVideos";
|
|
2695
|
+
var DEFAULT_VALUE14 = false;
|
|
1991
2696
|
function HideVideosController() {
|
|
1992
2697
|
const { value, setValue } = useAccessibility(
|
|
1993
|
-
|
|
1994
|
-
|
|
2698
|
+
FEATURE_KEY14,
|
|
2699
|
+
DEFAULT_VALUE14
|
|
1995
2700
|
);
|
|
1996
|
-
return /* @__PURE__ */
|
|
1997
|
-
/* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
/* @__PURE__ */
|
|
2701
|
+
return /* @__PURE__ */ jsxs19("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
|
|
2702
|
+
/* @__PURE__ */ jsxs19("span", { className: "arap-label", children: [
|
|
2703
|
+
/* @__PURE__ */ jsx20(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
2704
|
+
/* @__PURE__ */ jsx20("span", { children: "Hide Videos" })
|
|
2000
2705
|
] }),
|
|
2001
|
-
/* @__PURE__ */
|
|
2706
|
+
/* @__PURE__ */ jsx20(
|
|
2002
2707
|
"button",
|
|
2003
2708
|
{
|
|
2004
2709
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2006,27 +2711,27 @@ function HideVideosController() {
|
|
|
2006
2711
|
"aria-label": "Hide Videos",
|
|
2007
2712
|
"aria-pressed": value,
|
|
2008
2713
|
type: "button",
|
|
2009
|
-
children: /* @__PURE__ */
|
|
2714
|
+
children: /* @__PURE__ */ jsx20("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2010
2715
|
}
|
|
2011
2716
|
)
|
|
2012
2717
|
] });
|
|
2013
2718
|
}
|
|
2014
2719
|
|
|
2015
2720
|
// src/features/BigCursorController.tsx
|
|
2016
|
-
import { jsx as
|
|
2017
|
-
var
|
|
2018
|
-
var
|
|
2721
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2722
|
+
var FEATURE_KEY15 = "bigCursor";
|
|
2723
|
+
var DEFAULT_VALUE15 = false;
|
|
2019
2724
|
function BigCursorController() {
|
|
2020
2725
|
const { value, setValue } = useAccessibility(
|
|
2021
|
-
|
|
2022
|
-
|
|
2726
|
+
FEATURE_KEY15,
|
|
2727
|
+
DEFAULT_VALUE15
|
|
2023
2728
|
);
|
|
2024
|
-
return /* @__PURE__ */
|
|
2025
|
-
/* @__PURE__ */
|
|
2026
|
-
/* @__PURE__ */
|
|
2027
|
-
/* @__PURE__ */
|
|
2729
|
+
return /* @__PURE__ */ jsxs20("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
2730
|
+
/* @__PURE__ */ jsxs20("span", { className: "arap-label", children: [
|
|
2731
|
+
/* @__PURE__ */ jsx21(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
2732
|
+
/* @__PURE__ */ jsx21("span", { children: "Big Cursor" })
|
|
2028
2733
|
] }),
|
|
2029
|
-
/* @__PURE__ */
|
|
2734
|
+
/* @__PURE__ */ jsx21(
|
|
2030
2735
|
"button",
|
|
2031
2736
|
{
|
|
2032
2737
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2034,27 +2739,27 @@ function BigCursorController() {
|
|
|
2034
2739
|
"aria-label": "Big Cursor",
|
|
2035
2740
|
"aria-pressed": value,
|
|
2036
2741
|
type: "button",
|
|
2037
|
-
children: /* @__PURE__ */
|
|
2742
|
+
children: /* @__PURE__ */ jsx21("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2038
2743
|
}
|
|
2039
2744
|
)
|
|
2040
2745
|
] });
|
|
2041
2746
|
}
|
|
2042
2747
|
|
|
2043
2748
|
// src/features/ReadingMaskController.tsx
|
|
2044
|
-
import { jsx as
|
|
2045
|
-
var
|
|
2046
|
-
var
|
|
2749
|
+
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2750
|
+
var FEATURE_KEY16 = "readingMask";
|
|
2751
|
+
var DEFAULT_VALUE16 = false;
|
|
2047
2752
|
function ReadingMaskController() {
|
|
2048
2753
|
const { value, setValue } = useAccessibility(
|
|
2049
|
-
|
|
2050
|
-
|
|
2754
|
+
FEATURE_KEY16,
|
|
2755
|
+
DEFAULT_VALUE16
|
|
2051
2756
|
);
|
|
2052
|
-
return /* @__PURE__ */
|
|
2053
|
-
/* @__PURE__ */
|
|
2054
|
-
/* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2757
|
+
return /* @__PURE__ */ jsxs21("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
|
|
2758
|
+
/* @__PURE__ */ jsxs21("span", { className: "arap-label", children: [
|
|
2759
|
+
/* @__PURE__ */ jsx22(FeatureIcon, { name: FEATURE_KEY16 }),
|
|
2760
|
+
/* @__PURE__ */ jsx22("span", { children: "Reading Mask" })
|
|
2056
2761
|
] }),
|
|
2057
|
-
/* @__PURE__ */
|
|
2762
|
+
/* @__PURE__ */ jsx22(
|
|
2058
2763
|
"button",
|
|
2059
2764
|
{
|
|
2060
2765
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2062,27 +2767,27 @@ function ReadingMaskController() {
|
|
|
2062
2767
|
"aria-label": "Reading Mask",
|
|
2063
2768
|
"aria-pressed": value,
|
|
2064
2769
|
type: "button",
|
|
2065
|
-
children: /* @__PURE__ */
|
|
2770
|
+
children: /* @__PURE__ */ jsx22("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2066
2771
|
}
|
|
2067
2772
|
)
|
|
2068
2773
|
] });
|
|
2069
2774
|
}
|
|
2070
2775
|
|
|
2071
2776
|
// src/features/ReadingGuideController.tsx
|
|
2072
|
-
import { jsx as
|
|
2073
|
-
var
|
|
2074
|
-
var
|
|
2777
|
+
import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2778
|
+
var FEATURE_KEY17 = "readingGuide";
|
|
2779
|
+
var DEFAULT_VALUE17 = false;
|
|
2075
2780
|
function ReadingGuideController() {
|
|
2076
2781
|
const { value, setValue } = useAccessibility(
|
|
2077
|
-
|
|
2078
|
-
|
|
2782
|
+
FEATURE_KEY17,
|
|
2783
|
+
DEFAULT_VALUE17
|
|
2079
2784
|
);
|
|
2080
|
-
return /* @__PURE__ */
|
|
2081
|
-
/* @__PURE__ */
|
|
2082
|
-
/* @__PURE__ */
|
|
2083
|
-
/* @__PURE__ */
|
|
2785
|
+
return /* @__PURE__ */ jsxs22("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
|
|
2786
|
+
/* @__PURE__ */ jsxs22("span", { className: "arap-label", children: [
|
|
2787
|
+
/* @__PURE__ */ jsx23(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
2788
|
+
/* @__PURE__ */ jsx23("span", { children: "Reading Guide" })
|
|
2084
2789
|
] }),
|
|
2085
|
-
/* @__PURE__ */
|
|
2790
|
+
/* @__PURE__ */ jsx23(
|
|
2086
2791
|
"button",
|
|
2087
2792
|
{
|
|
2088
2793
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2090,7 +2795,7 @@ function ReadingGuideController() {
|
|
|
2090
2795
|
"aria-label": "Reading Guide",
|
|
2091
2796
|
"aria-pressed": value,
|
|
2092
2797
|
type: "button",
|
|
2093
|
-
children: /* @__PURE__ */
|
|
2798
|
+
children: /* @__PURE__ */ jsx23("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2094
2799
|
}
|
|
2095
2800
|
)
|
|
2096
2801
|
] });
|
|
@@ -2099,7 +2804,7 @@ function ReadingGuideController() {
|
|
|
2099
2804
|
// src/features/ResetController.tsx
|
|
2100
2805
|
import { createPortal as createPortal2 } from "react-dom";
|
|
2101
2806
|
import { useContext as useContext5 } from "react";
|
|
2102
|
-
import { jsx as
|
|
2807
|
+
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2103
2808
|
function ResetController() {
|
|
2104
2809
|
const ctx = useContext5(AccessibilityContext);
|
|
2105
2810
|
if (!ctx) {
|
|
@@ -2110,15 +2815,15 @@ function ResetController() {
|
|
|
2110
2815
|
const actionHost = useContext5(PanelActionsContext);
|
|
2111
2816
|
const { resetAll } = ctx;
|
|
2112
2817
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
2113
|
-
const button = /* @__PURE__ */
|
|
2114
|
-
/* @__PURE__ */
|
|
2818
|
+
const button = /* @__PURE__ */ jsx24("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ jsxs23("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
2819
|
+
/* @__PURE__ */ jsx24(FeatureIcon, { name: "reset" }),
|
|
2115
2820
|
strings.resetAll
|
|
2116
2821
|
] }) });
|
|
2117
2822
|
return actionHost ? createPortal2(button, actionHost) : button;
|
|
2118
2823
|
}
|
|
2119
2824
|
|
|
2120
2825
|
// src/core/controls/ToggleControl.tsx
|
|
2121
|
-
import { jsx as
|
|
2826
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2122
2827
|
function ToggleControl({
|
|
2123
2828
|
id,
|
|
2124
2829
|
label,
|
|
@@ -2140,12 +2845,12 @@ function ToggleControl({
|
|
|
2140
2845
|
onChange(!checked);
|
|
2141
2846
|
}
|
|
2142
2847
|
};
|
|
2143
|
-
return /* @__PURE__ */
|
|
2848
|
+
return /* @__PURE__ */ jsx25(
|
|
2144
2849
|
"div",
|
|
2145
2850
|
{
|
|
2146
2851
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2147
2852
|
style,
|
|
2148
|
-
children: /* @__PURE__ */
|
|
2853
|
+
children: /* @__PURE__ */ jsx25(
|
|
2149
2854
|
"button",
|
|
2150
2855
|
{
|
|
2151
2856
|
id,
|
|
@@ -2159,7 +2864,7 @@ function ToggleControl({
|
|
|
2159
2864
|
disabled: !isInteractive,
|
|
2160
2865
|
onClick: handleClick,
|
|
2161
2866
|
title: unavailableReason || description || toggleLabel,
|
|
2162
|
-
children: /* @__PURE__ */
|
|
2867
|
+
children: /* @__PURE__ */ jsx25(
|
|
2163
2868
|
"span",
|
|
2164
2869
|
{
|
|
2165
2870
|
className: "arap-toggle-knob",
|
|
@@ -2176,7 +2881,7 @@ function ToggleControl({
|
|
|
2176
2881
|
|
|
2177
2882
|
// src/core/controls/ChoiceControl.tsx
|
|
2178
2883
|
import { useCallback as useCallback4, useMemo as useMemo2, useRef as useRef5 } from "react";
|
|
2179
|
-
import { jsx as
|
|
2884
|
+
import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2180
2885
|
function ChoiceControl({
|
|
2181
2886
|
id,
|
|
2182
2887
|
label,
|
|
@@ -2232,7 +2937,7 @@ function ChoiceControl({
|
|
|
2232
2937
|
const renderOptionButton = (opt) => {
|
|
2233
2938
|
const isSelected = value === opt.value;
|
|
2234
2939
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
2235
|
-
return /* @__PURE__ */
|
|
2940
|
+
return /* @__PURE__ */ jsxs24(
|
|
2236
2941
|
"button",
|
|
2237
2942
|
{
|
|
2238
2943
|
type: "button",
|
|
@@ -2246,15 +2951,15 @@ function ChoiceControl({
|
|
|
2246
2951
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
2247
2952
|
title: opt.description,
|
|
2248
2953
|
children: [
|
|
2249
|
-
isSelected && /* @__PURE__ */
|
|
2250
|
-
/* @__PURE__ */
|
|
2251
|
-
opt.badge && /* @__PURE__ */
|
|
2954
|
+
isSelected && /* @__PURE__ */ jsx26("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2955
|
+
/* @__PURE__ */ jsx26("span", { children: opt.label }),
|
|
2956
|
+
opt.badge && /* @__PURE__ */ jsx26("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
2252
2957
|
]
|
|
2253
2958
|
},
|
|
2254
2959
|
String(opt.value)
|
|
2255
2960
|
);
|
|
2256
2961
|
};
|
|
2257
|
-
return /* @__PURE__ */
|
|
2962
|
+
return /* @__PURE__ */ jsx26(
|
|
2258
2963
|
"div",
|
|
2259
2964
|
{
|
|
2260
2965
|
ref: containerRef,
|
|
@@ -2265,15 +2970,15 @@ function ChoiceControl({
|
|
|
2265
2970
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2266
2971
|
style,
|
|
2267
2972
|
onKeyDown: handleKeyDown,
|
|
2268
|
-
children: groups ? groups.map((group) => /* @__PURE__ */
|
|
2973
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ jsxs24(
|
|
2269
2974
|
"div",
|
|
2270
2975
|
{
|
|
2271
2976
|
className: "arap-choice-group",
|
|
2272
2977
|
role: "group",
|
|
2273
2978
|
"aria-label": group.label,
|
|
2274
2979
|
children: [
|
|
2275
|
-
/* @__PURE__ */
|
|
2276
|
-
/* @__PURE__ */
|
|
2980
|
+
/* @__PURE__ */ jsx26("span", { className: "arap-choice-group-title", children: group.label }),
|
|
2981
|
+
/* @__PURE__ */ jsx26("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
2277
2982
|
]
|
|
2278
2983
|
},
|
|
2279
2984
|
group.label
|
|
@@ -2283,7 +2988,7 @@ function ChoiceControl({
|
|
|
2283
2988
|
}
|
|
2284
2989
|
|
|
2285
2990
|
// src/core/controls/StepperControl.tsx
|
|
2286
|
-
import { jsx as
|
|
2991
|
+
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2287
2992
|
function StepperControl({
|
|
2288
2993
|
id,
|
|
2289
2994
|
label,
|
|
@@ -2313,15 +3018,15 @@ function StepperControl({
|
|
|
2313
3018
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
2314
3019
|
}
|
|
2315
3020
|
};
|
|
2316
|
-
return /* @__PURE__ */
|
|
3021
|
+
return /* @__PURE__ */ jsxs25(
|
|
2317
3022
|
"div",
|
|
2318
3023
|
{
|
|
2319
3024
|
id,
|
|
2320
3025
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2321
3026
|
style,
|
|
2322
3027
|
children: [
|
|
2323
|
-
/* @__PURE__ */
|
|
2324
|
-
/* @__PURE__ */
|
|
3028
|
+
/* @__PURE__ */ jsxs25("div", { className: "arap-controls", children: [
|
|
3029
|
+
/* @__PURE__ */ jsx27(
|
|
2325
3030
|
"button",
|
|
2326
3031
|
{
|
|
2327
3032
|
type: "button",
|
|
@@ -2332,8 +3037,8 @@ function StepperControl({
|
|
|
2332
3037
|
children: "\u2212"
|
|
2333
3038
|
}
|
|
2334
3039
|
),
|
|
2335
|
-
/* @__PURE__ */
|
|
2336
|
-
/* @__PURE__ */
|
|
3040
|
+
/* @__PURE__ */ jsx27("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
3041
|
+
/* @__PURE__ */ jsx27(
|
|
2337
3042
|
"button",
|
|
2338
3043
|
{
|
|
2339
3044
|
type: "button",
|
|
@@ -2345,7 +3050,7 @@ function StepperControl({
|
|
|
2345
3050
|
}
|
|
2346
3051
|
)
|
|
2347
3052
|
] }),
|
|
2348
|
-
showSlider && /* @__PURE__ */
|
|
3053
|
+
showSlider && /* @__PURE__ */ jsx27("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx27(
|
|
2349
3054
|
"input",
|
|
2350
3055
|
{
|
|
2351
3056
|
type: "range",
|
|
@@ -2369,7 +3074,7 @@ function StepperControl({
|
|
|
2369
3074
|
}
|
|
2370
3075
|
|
|
2371
3076
|
// src/core/controls/FeatureCard.tsx
|
|
2372
|
-
import { jsx as
|
|
3077
|
+
import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2373
3078
|
function FeatureCard({
|
|
2374
3079
|
id,
|
|
2375
3080
|
featureKey,
|
|
@@ -2388,7 +3093,7 @@ function FeatureCard({
|
|
|
2388
3093
|
largeControls = false
|
|
2389
3094
|
}) {
|
|
2390
3095
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
2391
|
-
return /* @__PURE__ */
|
|
3096
|
+
return /* @__PURE__ */ jsxs26(
|
|
2392
3097
|
"div",
|
|
2393
3098
|
{
|
|
2394
3099
|
id,
|
|
@@ -2397,27 +3102,27 @@ function FeatureCard({
|
|
|
2397
3102
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2398
3103
|
style,
|
|
2399
3104
|
children: [
|
|
2400
|
-
/* @__PURE__ */
|
|
2401
|
-
/* @__PURE__ */
|
|
2402
|
-
icon ?? (featureKey ? /* @__PURE__ */
|
|
2403
|
-
/* @__PURE__ */
|
|
3105
|
+
/* @__PURE__ */ jsxs26("div", { className: "arap-card-header", children: [
|
|
3106
|
+
/* @__PURE__ */ jsxs26("span", { className: "arap-label", children: [
|
|
3107
|
+
icon ?? (featureKey ? /* @__PURE__ */ jsx28(FeatureIcon, { name: featureKey }) : null),
|
|
3108
|
+
/* @__PURE__ */ jsx28("span", { className: "arap-card-title", children: title })
|
|
2404
3109
|
] }),
|
|
2405
|
-
statusBadge && /* @__PURE__ */
|
|
3110
|
+
statusBadge && /* @__PURE__ */ jsx28("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
2406
3111
|
] }),
|
|
2407
|
-
description && /* @__PURE__ */
|
|
2408
|
-
status === "error" && errorMessage && /* @__PURE__ */
|
|
2409
|
-
/* @__PURE__ */
|
|
2410
|
-
/* @__PURE__ */
|
|
3112
|
+
description && /* @__PURE__ */ jsx28("p", { className: "arap-card-desc", children: description }),
|
|
3113
|
+
status === "error" && errorMessage && /* @__PURE__ */ jsxs26("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
3114
|
+
/* @__PURE__ */ jsx28("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3115
|
+
/* @__PURE__ */ jsx28("span", { children: errorMessage })
|
|
2411
3116
|
] }),
|
|
2412
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */
|
|
2413
|
-
/* @__PURE__ */
|
|
2414
|
-
/* @__PURE__ */
|
|
3117
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs26("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
3118
|
+
/* @__PURE__ */ jsx28("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
3119
|
+
/* @__PURE__ */ jsx28("span", { children: unavailableMessage })
|
|
2415
3120
|
] }),
|
|
2416
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */
|
|
2417
|
-
/* @__PURE__ */
|
|
2418
|
-
/* @__PURE__ */
|
|
2419
|
-
/* @__PURE__ */
|
|
2420
|
-
onRequestPermission && /* @__PURE__ */
|
|
3121
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs26("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
3122
|
+
/* @__PURE__ */ jsx28("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
3123
|
+
/* @__PURE__ */ jsxs26("div", { className: "arap-permission-content", children: [
|
|
3124
|
+
/* @__PURE__ */ jsx28("span", { children: permissionMessage }),
|
|
3125
|
+
onRequestPermission && /* @__PURE__ */ jsx28(
|
|
2421
3126
|
"button",
|
|
2422
3127
|
{
|
|
2423
3128
|
type: "button",
|
|
@@ -2428,14 +3133,14 @@ function FeatureCard({
|
|
|
2428
3133
|
)
|
|
2429
3134
|
] })
|
|
2430
3135
|
] }),
|
|
2431
|
-
/* @__PURE__ */
|
|
3136
|
+
/* @__PURE__ */ jsx28("div", { className: "arap-card-content", children })
|
|
2432
3137
|
]
|
|
2433
3138
|
}
|
|
2434
3139
|
);
|
|
2435
3140
|
}
|
|
2436
3141
|
|
|
2437
3142
|
// src/core/controls/FeatureStatusState.tsx
|
|
2438
|
-
import { jsx as
|
|
3143
|
+
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2439
3144
|
function SearchCount({
|
|
2440
3145
|
totalCount,
|
|
2441
3146
|
matchedCount,
|
|
@@ -2444,7 +3149,7 @@ function SearchCount({
|
|
|
2444
3149
|
style
|
|
2445
3150
|
}) {
|
|
2446
3151
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
2447
|
-
return /* @__PURE__ */
|
|
3152
|
+
return /* @__PURE__ */ jsx29(
|
|
2448
3153
|
"div",
|
|
2449
3154
|
{
|
|
2450
3155
|
role: "status",
|
|
@@ -2464,17 +3169,17 @@ function EmptyState({
|
|
|
2464
3169
|
className = "",
|
|
2465
3170
|
style
|
|
2466
3171
|
}) {
|
|
2467
|
-
return /* @__PURE__ */
|
|
3172
|
+
return /* @__PURE__ */ jsxs27(
|
|
2468
3173
|
"div",
|
|
2469
3174
|
{
|
|
2470
3175
|
role: "status",
|
|
2471
3176
|
className: `arap-empty-state ${className}`,
|
|
2472
3177
|
style,
|
|
2473
3178
|
children: [
|
|
2474
|
-
/* @__PURE__ */
|
|
2475
|
-
/* @__PURE__ */
|
|
2476
|
-
/* @__PURE__ */
|
|
2477
|
-
onAction && /* @__PURE__ */
|
|
3179
|
+
/* @__PURE__ */ jsx29("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
3180
|
+
/* @__PURE__ */ jsx29("h3", { className: "arap-empty-title", children: title }),
|
|
3181
|
+
/* @__PURE__ */ jsx29("p", { className: "arap-empty-desc", children: description }),
|
|
3182
|
+
onAction && /* @__PURE__ */ jsx29("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
2478
3183
|
]
|
|
2479
3184
|
}
|
|
2480
3185
|
);
|
|
@@ -2487,18 +3192,18 @@ function ErrorState({
|
|
|
2487
3192
|
className = "",
|
|
2488
3193
|
style
|
|
2489
3194
|
}) {
|
|
2490
|
-
return /* @__PURE__ */
|
|
3195
|
+
return /* @__PURE__ */ jsxs27(
|
|
2491
3196
|
"div",
|
|
2492
3197
|
{
|
|
2493
3198
|
role: "alert",
|
|
2494
3199
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
2495
3200
|
style,
|
|
2496
3201
|
children: [
|
|
2497
|
-
/* @__PURE__ */
|
|
2498
|
-
/* @__PURE__ */
|
|
2499
|
-
title && /* @__PURE__ */
|
|
2500
|
-
/* @__PURE__ */
|
|
2501
|
-
onRetry && /* @__PURE__ */
|
|
3202
|
+
/* @__PURE__ */ jsx29("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3203
|
+
/* @__PURE__ */ jsxs27("div", { className: "arap-error-content", children: [
|
|
3204
|
+
title && /* @__PURE__ */ jsx29("h4", { className: "arap-error-title", children: title }),
|
|
3205
|
+
/* @__PURE__ */ jsx29("p", { className: "arap-error-message", children: message }),
|
|
3206
|
+
onRetry && /* @__PURE__ */ jsx29("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
2502
3207
|
] })
|
|
2503
3208
|
]
|
|
2504
3209
|
}
|
|
@@ -2506,7 +3211,7 @@ function ErrorState({
|
|
|
2506
3211
|
}
|
|
2507
3212
|
|
|
2508
3213
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
2509
|
-
import { jsx as
|
|
3214
|
+
import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2510
3215
|
function ProfilePreviewCard({
|
|
2511
3216
|
profile,
|
|
2512
3217
|
isActive,
|
|
@@ -2556,7 +3261,7 @@ function ProfilePreviewCard({
|
|
|
2556
3261
|
if (val === null || val === void 0) return "Original";
|
|
2557
3262
|
return String(val);
|
|
2558
3263
|
};
|
|
2559
|
-
return /* @__PURE__ */
|
|
3264
|
+
return /* @__PURE__ */ jsxs28(
|
|
2560
3265
|
"div",
|
|
2561
3266
|
{
|
|
2562
3267
|
role: "group",
|
|
@@ -2564,10 +3269,10 @@ function ProfilePreviewCard({
|
|
|
2564
3269
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2565
3270
|
style,
|
|
2566
3271
|
children: [
|
|
2567
|
-
/* @__PURE__ */
|
|
2568
|
-
/* @__PURE__ */
|
|
2569
|
-
/* @__PURE__ */
|
|
2570
|
-
isActive && /* @__PURE__ */
|
|
3272
|
+
/* @__PURE__ */ jsxs28("div", { className: "arap-profile-header", children: [
|
|
3273
|
+
/* @__PURE__ */ jsxs28("div", { className: "arap-profile-title-row", children: [
|
|
3274
|
+
/* @__PURE__ */ jsx30("h4", { className: "arap-profile-title", children: profile.label }),
|
|
3275
|
+
isActive && /* @__PURE__ */ jsx30(
|
|
2571
3276
|
"span",
|
|
2572
3277
|
{
|
|
2573
3278
|
className: "arap-profile-active-badge",
|
|
@@ -2576,14 +3281,14 @@ function ProfilePreviewCard({
|
|
|
2576
3281
|
}
|
|
2577
3282
|
)
|
|
2578
3283
|
] }),
|
|
2579
|
-
/* @__PURE__ */
|
|
3284
|
+
/* @__PURE__ */ jsx30("p", { className: "arap-profile-desc", children: profile.description })
|
|
2580
3285
|
] }),
|
|
2581
|
-
/* @__PURE__ */
|
|
2582
|
-
/* @__PURE__ */
|
|
2583
|
-
/* @__PURE__ */
|
|
3286
|
+
/* @__PURE__ */ jsxs28("div", { className: "arap-profile-affected", children: [
|
|
3287
|
+
/* @__PURE__ */ jsx30("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
3288
|
+
/* @__PURE__ */ jsx30("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
2584
3289
|
const val = profile.settings[key];
|
|
2585
|
-
return /* @__PURE__ */
|
|
2586
|
-
/* @__PURE__ */
|
|
3290
|
+
return /* @__PURE__ */ jsxs28("span", { className: "arap-profile-chip", children: [
|
|
3291
|
+
/* @__PURE__ */ jsxs28("strong", { children: [
|
|
2587
3292
|
formatKeyName(key),
|
|
2588
3293
|
":"
|
|
2589
3294
|
] }),
|
|
@@ -2592,7 +3297,7 @@ function ProfilePreviewCard({
|
|
|
2592
3297
|
] }, key);
|
|
2593
3298
|
}) })
|
|
2594
3299
|
] }),
|
|
2595
|
-
/* @__PURE__ */
|
|
3300
|
+
/* @__PURE__ */ jsx30("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ jsx30(
|
|
2596
3301
|
"button",
|
|
2597
3302
|
{
|
|
2598
3303
|
type: "button",
|
|
@@ -2601,7 +3306,7 @@ function ProfilePreviewCard({
|
|
|
2601
3306
|
"aria-label": `Revert ${profile.label} profile`,
|
|
2602
3307
|
children: "Revert to custom settings"
|
|
2603
3308
|
}
|
|
2604
|
-
) : /* @__PURE__ */
|
|
3309
|
+
) : /* @__PURE__ */ jsx30(
|
|
2605
3310
|
"button",
|
|
2606
3311
|
{
|
|
2607
3312
|
type: "button",
|
|
@@ -2632,10 +3337,13 @@ export {
|
|
|
2632
3337
|
HideImagesController,
|
|
2633
3338
|
HideVideosController,
|
|
2634
3339
|
InvertColorsController,
|
|
3340
|
+
LINE_HEIGHT_RATIOS,
|
|
3341
|
+
LINE_HEIGHT_STEPS,
|
|
2635
3342
|
LetterSpacingController,
|
|
2636
3343
|
LineHeightController,
|
|
2637
3344
|
LinkHighlightController,
|
|
2638
3345
|
PROFILE_DEFINITIONS,
|
|
3346
|
+
ParagraphSpacingController,
|
|
2639
3347
|
ProfilePreviewCard,
|
|
2640
3348
|
ReadingGuideController,
|
|
2641
3349
|
ReadingMaskController,
|
|
@@ -2643,10 +3351,18 @@ export {
|
|
|
2643
3351
|
SaturationController,
|
|
2644
3352
|
SearchCount,
|
|
2645
3353
|
StepperControl,
|
|
3354
|
+
TEXT_SCALE_PROTECTED_SELECTOR,
|
|
3355
|
+
TEXT_SCALE_STEPS,
|
|
3356
|
+
TEXT_SPACING_EXCLUDED_SELECTOR,
|
|
2646
3357
|
TextAlignController,
|
|
3358
|
+
TextScaleController,
|
|
2647
3359
|
ToggleControl,
|
|
3360
|
+
WordSpacingController,
|
|
2648
3361
|
createInitialPreferencesState,
|
|
2649
3362
|
enLocale,
|
|
3363
|
+
getScriptSpacingConstraints,
|
|
3364
|
+
isProtectedFromTextScale,
|
|
3365
|
+
isProtectedFromTextSpacing,
|
|
2650
3366
|
isRtlLocale,
|
|
2651
3367
|
normalizePreferenceValue,
|
|
2652
3368
|
normalizePreferences,
|