accessibility-plugin-react 2.17.0 → 2.18.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 +1 -0
- package/dist/index.d.mts +70 -1
- package/dist/index.d.ts +70 -1
- package/dist/index.js +684 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +684 -44
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +309 -0
- package/docs/API.md +3 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +1 -1
- package/docs/FEATURES.md +1 -0
- package/docs/READING_MODE.md +128 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// src/styles/tailwind.css
|
|
27
|
-
styleInject('.arap-root {\n --arap-surface: #fff;\n --arap-text: #111827;\n --arap-muted: #475569;\n --arap-border: #cbd5e1;\n --arap-divider: #e2e8f0;\n --arap-accent: #1d4ed8;\n --arap-accent-hover: #1e40af;\n --arap-selected: #eff6ff;\n --arap-control: #f8fafc;\n color-scheme: light;\n font:\n 15px/1.5 system-ui,\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Noto Sans Sinhala",\n "Iskoola Pota",\n "Noto Sans Tamil",\n "Latha",\n "Nirmala UI",\n sans-serif;\n color: var(--arap-text);\n text-align: start;\n letter-spacing: normal;\n}\n.arap-root *,\n.arap-root *::before,\n.arap-root *::after {\n box-sizing: border-box;\n}\n.arap-root button {\n font: inherit;\n cursor: pointer;\n color: inherit;\n text-transform: none;\n letter-spacing: normal;\n transition: background-color 0.15s, border-color 0.15s;\n}\n.arap-root button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.arap-root button:focus-visible,\n.arap-panel:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 3px;\n}\n.arap-root .arap-btn {\n position: fixed;\n z-index: 2147483001;\n bottom: max(16px, env(safe-area-inset-bottom));\n right: max(16px, env(safe-area-inset-right));\n width: 56px;\n height: 56px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--arap-surface);\n border-radius: 50%;\n background: var(--arap-accent);\n color: #fff;\n box-shadow: 0 4px 12px #0f172a26, 0 10px 24px #0f172a14;\n}\n.arap-root .arap-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-root .arap-btn[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-position=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-panel {\n position: fixed;\n z-index: 2147483000;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n right: max(16px, env(safe-area-inset-right));\n width: min(400px, calc(100vw - 32px));\n max-height: calc(100vh - 120px);\n max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 20px;\n border: 1px solid var(--arap-divider);\n border-radius: 16px;\n background: var(--arap-surface);\n box-shadow: 0 8px 16px #0f172a0d, 0 20px 48px #0f172a1a;\n}\n.arap-root .arap-panel[hidden] {\n display: none !important;\n}\n.arap-root .arap-panel[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-panel[data-position=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-heading {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n padding-bottom: 18px;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-heading-copy {\n min-width: 0;\n}\n.arap-heading h2 {\n margin: 0;\n font: 700 22px/1.3 system-ui, sans-serif;\n letter-spacing: -0.025em;\n color: var(--arap-text);\n overflow-wrap: anywhere;\n}\n.arap-description {\n margin: 6px 0 0;\n color: var(--arap-muted);\n font: 14px/1.5 system-ui, sans-serif;\n overflow-wrap: anywhere;\n}\n.arap-heading button {\n flex: none;\n width: 44px;\n height: 44px;\n margin-top: -6px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--arap-muted);\n font-size: 28px;\n line-height: 1;\n}\n.arap-heading button:hover {\n background: var(--arap-control);\n border-color: var(--arap-border);\n}\n.arap-feature {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px 12px;\n padding: 18px 0;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-feature:last-child {\n border: 0;\n padding-bottom: 0;\n}\n.arap-label {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.arap-icon {\n flex: none;\n width: 22px;\n height: 22px;\n display: inline-block;\n vertical-align: middle;\n}\n.arap-controls {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--arap-border);\n border-radius: 9px;\n overflow: hidden;\n background: var(--arap-control);\n}\n.arap-root .arap-btn-sm {\n flex: none;\n width: 44px;\n height: 44px;\n border: 0;\n border-radius: 0;\n background: transparent;\n font-size: 22px;\n}\n.arap-root .arap-btn-sm:hover:not(:disabled) {\n background: var(--arap-selected);\n color: var(--arap-accent);\n}\n.arap-root .arap-controls button:focus-visible {\n outline-offset: -4px;\n}\n.arap-value {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 56px;\n padding: 0 6px;\n text-align: center;\n font-weight: 600;\n border-inline: 1px solid var(--arap-divider);\n background: var(--arap-surface);\n}\n.arap-segmented {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.arap-root .arap-segment {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-muted);\n overflow-wrap: anywhere;\n}\n.arap-root .arap-segment:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-root .arap-segment-active {\n background: var(--arap-accent);\n color: #fff;\n border-color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-segment-active:hover {\n background: var(--arap-accent-hover);\n color: #fff;\n}\n.arap-check {\n flex: none;\n font-size: 15px;\n line-height: 1;\n}\n.arap-root .arap-toggle {\n position: relative;\n width: 56px;\n height: 44px;\n padding: 0;\n border: 0;\n border-radius: 10px;\n background: transparent;\n}\n.arap-toggle::before {\n content: "";\n position: absolute;\n inset: 6px 0;\n border: 2px solid #64748b;\n border-radius: 20px;\n background: #e2e8f0;\n}\n.arap-toggle-knob {\n position: absolute;\n top: 10px;\n left: 4px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: #475569;\n pointer-events: none;\n transition: transform 0.15s;\n}\n.arap-toggle-active::before {\n background: var(--arap-accent);\n border-color: var(--arap-accent);\n}\n.arap-toggle-active .arap-toggle-knob {\n transform: translateX(24px);\n background: #fff;\n}\n.arap-toggle-active .arap-toggle-knob::after {\n content: "\\2713";\n display: block;\n color: var(--arap-accent);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n text-align: center;\n}\n.arap-root .arap-toggle:hover::before {\n border-color: var(--arap-accent);\n}\n.arap-feature-reset {\n display: block;\n}\n.arap-root .arap-reset-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 10px;\n border: 1px solid var(--arap-border);\n border-radius: 10px;\n background: var(--arap-control);\n color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-reset-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n@media (max-width: 380px) {\n .arap-root .arap-panel {\n padding: 16px;\n }\n .arap-heading h2 {\n font-size: 20px;\n }\n .arap-feature-stepper {\n grid-template-columns: minmax(0, 1fr);\n }\n .arap-controls {\n width: 100%;\n }\n .arap-value {\n flex: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-root *,\n .arap-root *::before,\n .arap-root *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .arap-root {\n --arap-surface: Canvas;\n --arap-text: CanvasText;\n --arap-muted: CanvasText;\n --arap-border: ButtonText;\n --arap-divider: ButtonText;\n --arap-accent: Highlight;\n --arap-control: Canvas;\n --arap-selected: Canvas;\n }\n .arap-root button[aria-pressed=true] {\n outline: 2px solid Highlight;\n outline-offset: -4px;\n }\n .arap-root .arap-segment-active {\n color: HighlightText;\n background: Highlight;\n }\n .arap-toggle::before {\n border-color: ButtonText;\n background: Canvas;\n }\n .arap-toggle-knob {\n background: ButtonText;\n }\n .arap-toggle-active .arap-toggle-knob {\n background: Highlight;\n }\n .arap-toggle-active .arap-toggle-knob::after {\n color: HighlightText;\n }\n}\n.arap-root .arap-panel {\n display: flex;\n flex-direction: column;\n overflow: visible;\n}\n.arap-heading {\n flex: none;\n}\n.arap-tools {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 0 3px;\n margin: 0 -3px;\n}\n.arap-tools:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: -3px;\n}\n.arap-quick-actions {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 14px;\n margin-top: 8px;\n border-top: 1px solid var(--arap-divider);\n}\n.arap-actions {\n flex: 1;\n min-width: 0;\n}\n.arap-actions:empty {\n display: none;\n}\n.arap-actions .arap-feature-reset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n.arap-root .arap-position-button,\n.arap-root .arap-position-default,\n.arap-root .arap-position-arrows button {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-accent);\n}\n.arap-root .arap-position-button:hover,\n.arap-root .arap-position-default:hover,\n.arap-root .arap-position-arrows button:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-position-popover {\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 0;\n width: 100%;\n max-height: calc(100dvh - 160px);\n overflow: auto;\n padding: 14px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n box-shadow: 0 8px 24px #0f172a26;\n}\n.arap-position-popover[hidden] {\n display: none !important;\n}\n.arap-position-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.arap-position-popover select {\n width: 100%;\n min-height: 44px;\n padding: 8px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n font: inherit;\n color: var(--arap-text);\n background: var(--arap-surface);\n}\n.arap-position-popover select:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-position-arrows {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 10px;\n}\n.arap-position-default {\n width: 100%;\n margin-top: 8px;\n}\n.arap-root .arap-btn[data-draggable=true] {\n touch-action: none;\n user-select: none;\n cursor: grab;\n}\n.arap-root .arap-btn[data-dragging=true] {\n cursor: grabbing;\n}\n.arap-root .arap-btn[data-corner$=left],\n.arap-root .arap-panel[data-corner$=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-corner$=right],\n.arap-root .arap-panel[data-corner$=right] {\n left: auto;\n right: max(16px, env(safe-area-inset-right));\n}\n.arap-root .arap-btn[data-corner^=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-btn[data-corner^=bottom] {\n top: auto;\n bottom: max(16px, env(safe-area-inset-bottom));\n}\n.arap-root .arap-panel[data-corner^=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-root .arap-panel[data-corner^=bottom] {\n top: auto;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n}\n.arap-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.arap-root .arap-skip-actions {\n position: absolute;\n top: 12px;\n left: 20px;\n width: 44px;\n height: 44px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n}\n.arap-root .arap-skip-actions:focus-visible {\n right: 20px;\n width: auto;\n height: auto;\n min-height: 44px;\n clip-path: none;\n pointer-events: auto;\n z-index: 2;\n padding: 8px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-accent);\n}\n.arap-skip-to-main {\n position: fixed;\n top: 12px;\n left: 16px;\n z-index: 2147483647;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n pointer-events: none;\n font-family: inherit;\n font-size: 0.9375rem;\n font-weight: 600;\n text-decoration: none;\n color: var(--arap-accent, #008060);\n background: var(--arap-surface, #ffffff);\n border-radius: 8px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n}\n.arap-skip-to-main:focus,\n.arap-skip-to-main:focus-visible {\n width: auto;\n height: auto;\n min-height: 44px;\n margin: 0;\n padding: 10px 18px;\n clip-path: none;\n overflow: visible;\n white-space: normal;\n pointer-events: auto;\n border: 2px solid var(--arap-accent, #008060);\n outline: 3px solid var(--arap-accent, #008060);\n outline-offset: 3px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n@media (forced-colors: active) {\n .arap-skip-to-main {\n background: Canvas;\n color: CanvasText;\n border-color: Highlight;\n }\n .arap-skip-to-main:focus,\n .arap-skip-to-main:focus-visible {\n outline: 3px solid Highlight;\n }\n}\n@media (max-height: 480px) {\n .arap-root .arap-panel {\n top: max(16px, env(safe-area-inset-top)) !important;\n bottom: max(16px, env(safe-area-inset-bottom)) !important;\n max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;\n padding: 8px;\n }\n .arap-heading {\n padding-bottom: 8px;\n }\n .arap-heading h2 {\n font-size: 18px;\n }\n .arap-heading button {\n margin-top: 0;\n }\n .arap-description {\n display: none;\n }\n .arap-quick-actions {\n padding-top: 8px;\n margin-top: 0;\n }\n .arap-root .arap-reset-btn {\n min-height: 44px;\n }\n .arap-root .arap-btn[data-open=true] {\n visibility: hidden;\n }\n .arap-position-popover {\n max-height: calc(100dvh - 96px);\n }\n}\n.arap-statement {\n flex: none;\n padding-top: 10px;\n text-align: center;\n}\n.arap-statement-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 44px;\n padding: 6px 12px;\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 4px;\n font-size: 14px;\n font-weight: 500;\n border-radius: 8px;\n}\n.arap-statement-link:hover {\n color: var(--arap-accent-hover);\n background: var(--arap-selected);\n}\n.arap-statement-link:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-credits {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 2px;\n padding-top: 8px;\n color: var(--arap-muted);\n text-align: center;\n font-size: 11px;\n line-height: 1.4;\n}\n.arap-credits a {\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.arap-credits a:hover {\n color: var(--arap-accent-hover);\n}\n.arap-credits a:focus-visible {\n outline: 2px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-root .arap-btn[data-large-controls=true] {\n width: 64px;\n height: 64px;\n min-width: 48px;\n min-height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] {\n width: min(440px, calc(100vw - 32px));\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-heading button {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 32px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-btn-sm {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 24px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-value {\n min-width: 64px;\n font-size: 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-segment {\n min-width: 48px;\n min-height: 48px;\n padding: 10px 14px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle {\n width: 64px;\n height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle::before {\n inset: 8px 0;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-knob {\n top: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-active .arap-toggle-knob {\n transform: translateX(28px);\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-reset-btn {\n min-height: 52px;\n font-size: 16px;\n padding: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-button,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-default,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-arrows button {\n min-width: 48px;\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-popover select {\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-statement-link {\n min-height: 48px;\n font-size: 15px;\n padding: 10px 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-skip-actions {\n min-width: 48px;\n min-height: 48px;\n}\n.arap-feature-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n}\n.arap-card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-card-title {\n font-weight: 600;\n font-size: 15px;\n color: var(--arap-text);\n}\n.arap-card-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-status-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 11px;\n font-weight: 600;\n background: var(--arap-control);\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-card-alert {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 1.4;\n}\n.arap-alert-icon {\n flex: none;\n font-size: 16px;\n line-height: 1;\n}\n.arap-card-error {\n background: #fef2f2;\n border: 1px solid #fecaca;\n color: #991b1b;\n}\n.arap-card-unavailable {\n background: #f8fafc;\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n}\n.arap-card-permission {\n background: #fffbeb;\n border: 1px solid #fde68a;\n color: #92400e;\n}\n.arap-permission-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-permission-btn {\n align-self: flex-start;\n padding: 4px 10px;\n border: 1px solid #d97706;\n border-radius: 6px;\n background: #f59e0b;\n color: #fff;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n.arap-permission-btn:hover {\n background: #d97706;\n}\n.arap-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.arap-choice-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n.arap-choice-group-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-choice-badge {\n font-size: 11px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--arap-divider);\n color: var(--arap-muted);\n}\n.arap-segment-active .arap-choice-badge {\n background: rgba(255, 255, 255, 0.25);\n color: #fff;\n}\n.arap-stepper-control-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n}\n.arap-slider-container {\n display: flex;\n align-items: center;\n padding: 4px 0;\n}\n.arap-slider {\n width: 100%;\n accent-color: var(--arap-accent);\n cursor: pointer;\n}\n.arap-search-count {\n padding: 6px 0;\n font-size: 12px;\n font-weight: 500;\n color: var(--arap-muted);\n}\n.arap-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 24px 16px;\n gap: 8px;\n}\n.arap-empty-icon {\n font-size: 32px;\n}\n.arap-empty-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-empty-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n}\n.arap-empty-btn,\n.arap-retry-btn {\n margin-top: 6px;\n padding: 8px 16px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n font-weight: 500;\n font-size: 13px;\n color: var(--arap-text);\n cursor: pointer;\n}\n.arap-empty-btn:hover,\n.arap-retry-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n color: var(--arap-accent);\n}\n.arap-profile-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.arap-profile-card-active {\n border-color: var(--arap-accent);\n background: var(--arap-selected);\n box-shadow: 0 0 0 1px var(--arap-accent);\n}\n.arap-profile-header {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-profile-active-badge {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-accent);\n background: #dbeafe;\n padding: 2px 8px;\n border-radius: 9999px;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-profile-affected {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-profile-affected-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.arap-profile-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--arap-control);\n border: 1px solid var(--arap-divider);\n font-size: 12px;\n color: var(--arap-text);\n}\n.arap-profile-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n.arap-profile-apply-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-apply-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-profile-revert-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-muted);\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-revert-btn:hover {\n background: var(--arap-control);\n color: var(--arap-text);\n border-color: var(--arap-text);\n}\n.arap-notice {\n grid-column: 1 / -1;\n margin-top: 6px;\n padding: 8px 12px;\n border-radius: 8px;\n font-size: 12px;\n line-height: 1.45;\n background: #fefce8;\n border: 1px solid #fef08a;\n color: #854d0e;\n}\n.arap-notice-warning {\n background: #fffbeb;\n border-color: #fde68a;\n color: #92400e;\n}\n.arap-reading-mask {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-reading-guide {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-feature-expandable {\n flex-direction: column !important;\n align-items: stretch !important;\n}\n.arap-accessible-tooltip {\n position: fixed !important;\n z-index: 2147483646 !important;\n max-width: 320px !important;\n min-width: 48px !important;\n box-sizing: border-box !important;\n padding: 6px 12px !important;\n background: #0f172a !important;\n color: #ffffff !important;\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif !important;\n font-size: 13px !important;\n line-height: 1.4 !important;\n font-weight: 500 !important;\n border-radius: 6px !important;\n box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;\n pointer-events: auto !important;\n word-break: break-word !important;\n white-space: normal !important;\n opacity: 0 !important;\n visibility: hidden !important;\n transition: opacity 120ms ease, transform 120ms ease !important;\n transform: translateY(2px) !important;\n}\n.arap-accessible-tooltip[data-visible=true] {\n opacity: 1 !important;\n visibility: visible !important;\n transform: translateY(0) !important;\n}\n.arap-accessible-tooltip[data-placement=top] {\n transform: translateY(-2px) !important;\n}\n.arap-accessible-tooltip[data-placement=top][data-visible=true] {\n transform: translateY(0) !important;\n}\n@media (forced-colors: active) {\n .arap-accessible-tooltip {\n background: Canvas !important;\n color: CanvasText !important;\n border: 2px solid Highlight !important;\n box-shadow: none !important;\n }\n}\n.arap-navigator-dialog {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n margin-top: 10px;\n padding: 10px;\n background: var(--arap-control, #f1f5f9);\n border: 1px solid var(--arap-border, #e2e8f0);\n border-radius: 8px;\n box-sizing: border-box;\n}\n.arap-navigator-tabs {\n display: flex;\n gap: 4px;\n border-bottom: 1px solid var(--arap-border, #cbd5e1);\n padding-bottom: 6px;\n}\n.arap-navigator-tab {\n flex: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 6px 10px;\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted, #64748b);\n background: transparent;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n transition: all 120ms ease;\n}\n.arap-navigator-tab:hover {\n color: var(--arap-text, #0f172a);\n background: rgba(0, 0, 0, 0.04);\n}\n.arap-navigator-tab-active {\n color: var(--arap-accent, #008060) !important;\n background: var(--arap-selected, #f0fdf4) !important;\n}\n.arap-navigator-search-box {\n width: 100%;\n}\n.arap-navigator-search {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 10px;\n font-size: 12px;\n border: 1px solid var(--arap-border, #cbd5e1);\n border-radius: 6px;\n background: var(--arap-surface, #ffffff);\n color: var(--arap-text, #0f172a);\n}\n.arap-navigator-search:focus {\n outline: 2px solid var(--arap-accent, #008060);\n outline-offset: 1px;\n}\n.arap-navigator-content {\n max-height: 240px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.arap-navigator-list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-navigator-item {\n margin: 0;\n padding: 0;\n}\n.arap-navigator-jump-btn {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n font-size: 12px;\n font-weight: 500;\n text-align: left;\n background: var(--arap-surface, #ffffff);\n border: 1px solid var(--arap-border, #e2e8f0);\n border-radius: 6px;\n color: var(--arap-text, #0f172a);\n cursor: pointer;\n transition: background 100ms ease, border-color 100ms ease;\n}\n.arap-navigator-jump-btn:hover,\n.arap-navigator-jump-btn:focus-visible {\n background: var(--arap-selected, #f0fdf4);\n border-color: var(--arap-accent, #008060);\n outline: 2px solid var(--arap-accent, #008060);\n outline-offset: -1px;\n}\n.arap-navigator-badge {\n display: inline-block;\n padding: 2px 6px;\n font-size: 10px;\n font-weight: 700;\n border-radius: 4px;\n flex-shrink: 0;\n}\n.arap-navigator-badge-h {\n background: #e0f2fe;\n color: #0369a1;\n}\n.arap-navigator-badge-l {\n background: #fef3c7;\n color: #b45309;\n}\n.arap-navigator-item-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.arap-navigator-empty {\n padding: 16px;\n font-size: 12px;\n text-align: center;\n color: var(--arap-muted, #64748b);\n font-style: italic;\n}\n.arap-profile-card {\n padding: 12px;\n border: 1px solid var(--arap-border, #e2e8f0);\n border-radius: 8px;\n background: var(--arap-card-bg, #ffffff);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.arap-profile-card:hover {\n border-color: var(--arap-primary, #2563eb);\n}\n.arap-profile-card-active {\n border-color: var(--arap-primary, #2563eb);\n background: rgba(37, 99, 235, 0.03);\n box-shadow: 0 0 0 1px var(--arap-primary, #2563eb);\n}\n.arap-profile-header {\n margin-bottom: 8px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 4px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--arap-text, #1e293b);\n}\n.arap-profile-active-badge {\n display: inline-block;\n padding: 2px 8px;\n font-size: 11px;\n font-weight: 600;\n border-radius: 9999px;\n background: #dbeafe;\n color: #1d4ed8;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 11px;\n color: var(--arap-muted, #64748b);\n line-height: 1.4;\n}\n.arap-profile-affected {\n margin-top: 8px;\n margin-bottom: 10px;\n}\n.arap-profile-affected-label {\n display: block;\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: var(--arap-muted, #94a3b8);\n margin-bottom: 4px;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n.arap-profile-chip {\n display: inline-block;\n padding: 2px 6px;\n font-size: 10px;\n background: var(--arap-chip-bg, #f1f5f9);\n color: var(--arap-text, #334155);\n border-radius: 4px;\n border: 1px solid var(--arap-chip-border, #e2e8f0);\n}\n.arap-profile-actions {\n display: flex;\n justify-content: flex-end;\n margin-top: 8px;\n}\n.arap-profile-apply-btn,\n.arap-profile-revert-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 36px;\n padding: 6px 14px;\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n cursor: pointer;\n transition: background 0.15s ease, border-color 0.15s ease;\n}\n.arap-profile-apply-btn {\n background: var(--arap-primary, #2563eb);\n color: #ffffff;\n border: 1px solid var(--arap-primary, #2563eb);\n}\n.arap-profile-apply-btn:hover {\n background: #1d4ed8;\n}\n.arap-profile-revert-btn {\n background: #ffffff;\n color: #dc2626;\n border: 1px solid #fca5a5;\n}\n.arap-profile-revert-btn:hover {\n background: #fef2f2;\n border-color: #f87171;\n}\n.arap-large-controls .arap-profile-apply-btn,\n.arap-large-controls .arap-profile-revert-btn {\n min-height: 48px;\n padding: 10px 18px;\n font-size: 14px;\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-profile-card,\n .arap-profile-apply-btn,\n .arap-profile-revert-btn,\n .arap-preset-card {\n transition: none !important;\n }\n}\n.arap-preset-card {\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.arap-preset-card:hover {\n border-color: var(--arap-border-hover, #cbd5e1);\n}\n.arap-large-controls .arap-preset-card button {\n min-height: 48px;\n padding: 10px 16px;\n font-size: 14px;\n}\n.arap-root[dir=rtl],\n.arap-panel[dir=rtl] {\n direction: rtl;\n text-align: right;\n}\n.arap-panel[dir=rtl] .arap-heading {\n flex-direction: row-reverse;\n}\n.arap-panel[dir=rtl] .arap-position-arrows {\n direction: ltr;\n}\n.arap-search-input {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 28px 6px 10px;\n font-size: 12px;\n border: 1px solid var(--arap-border, #cbd5e1);\n border-radius: 6px;\n background: var(--arap-surface, #ffffff);\n color: var(--arap-text, #0f172a);\n}\n.arap-panel[dir=rtl] .arap-search-input {\n padding: 6px 10px 6px 28px;\n}\n.arap-search-clear {\n position: absolute;\n inset-inline-end: 8px;\n top: 50%;\n transform: translateY(-50%);\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 2px 6px;\n font-size: 14px;\n color: var(--arap-muted, #64748b);\n border-radius: 4px;\n}\n.arap-search-clear:hover {\n background: var(--arap-selected, #eff6ff);\n color: var(--arap-text, #0f172a);\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:\n 15px/1.5 system-ui,\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Noto Sans Sinhala",\n "Iskoola Pota",\n "Noto Sans Tamil",\n "Latha",\n "Nirmala UI",\n sans-serif;\n color: var(--arap-text);\n text-align: start;\n letter-spacing: normal;\n}\n.arap-root *,\n.arap-root *::before,\n.arap-root *::after {\n box-sizing: border-box;\n}\n.arap-root button {\n font: inherit;\n cursor: pointer;\n color: inherit;\n text-transform: none;\n letter-spacing: normal;\n transition: background-color 0.15s, border-color 0.15s;\n}\n.arap-root button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.arap-root button:focus-visible,\n.arap-panel:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 3px;\n}\n.arap-root .arap-btn {\n position: fixed;\n z-index: 2147483001;\n bottom: max(16px, env(safe-area-inset-bottom));\n right: max(16px, env(safe-area-inset-right));\n width: 56px;\n height: 56px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--arap-surface);\n border-radius: 50%;\n background: var(--arap-accent);\n color: #fff;\n box-shadow: 0 4px 12px #0f172a26, 0 10px 24px #0f172a14;\n}\n.arap-root .arap-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-root .arap-btn[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-position=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-panel {\n position: fixed;\n z-index: 2147483000;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n right: max(16px, env(safe-area-inset-right));\n width: min(400px, calc(100vw - 32px));\n max-height: calc(100vh - 120px);\n max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 20px;\n border: 1px solid var(--arap-divider);\n border-radius: 16px;\n background: var(--arap-surface);\n box-shadow: 0 8px 16px #0f172a0d, 0 20px 48px #0f172a1a;\n}\n.arap-root .arap-panel[hidden] {\n display: none !important;\n}\n.arap-root .arap-panel[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-panel[data-position=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-heading {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n padding-bottom: 18px;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-heading-copy {\n min-width: 0;\n}\n.arap-heading h2 {\n margin: 0;\n font: 700 22px/1.3 system-ui, sans-serif;\n letter-spacing: -0.025em;\n color: var(--arap-text);\n overflow-wrap: anywhere;\n}\n.arap-description {\n margin: 6px 0 0;\n color: var(--arap-muted);\n font: 14px/1.5 system-ui, sans-serif;\n overflow-wrap: anywhere;\n}\n.arap-heading button {\n flex: none;\n width: 44px;\n height: 44px;\n margin-top: -6px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--arap-muted);\n font-size: 28px;\n line-height: 1;\n}\n.arap-heading button:hover {\n background: var(--arap-control);\n border-color: var(--arap-border);\n}\n.arap-feature {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px 12px;\n padding: 18px 0;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-feature:last-child {\n border: 0;\n padding-bottom: 0;\n}\n.arap-label {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.arap-icon {\n flex: none;\n width: 22px;\n height: 22px;\n display: inline-block;\n vertical-align: middle;\n}\n.arap-controls {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--arap-border);\n border-radius: 9px;\n overflow: hidden;\n background: var(--arap-control);\n}\n.arap-root .arap-btn-sm {\n flex: none;\n width: 44px;\n height: 44px;\n border: 0;\n border-radius: 0;\n background: transparent;\n font-size: 22px;\n}\n.arap-root .arap-btn-sm:hover:not(:disabled) {\n background: var(--arap-selected);\n color: var(--arap-accent);\n}\n.arap-root .arap-controls button:focus-visible {\n outline-offset: -4px;\n}\n.arap-value {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 56px;\n padding: 0 6px;\n text-align: center;\n font-weight: 600;\n border-inline: 1px solid var(--arap-divider);\n background: var(--arap-surface);\n}\n.arap-segmented {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.arap-root .arap-segment {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-muted);\n overflow-wrap: anywhere;\n}\n.arap-root .arap-segment:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-root .arap-segment-active {\n background: var(--arap-accent);\n color: #fff;\n border-color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-segment-active:hover {\n background: var(--arap-accent-hover);\n color: #fff;\n}\n.arap-check {\n flex: none;\n font-size: 15px;\n line-height: 1;\n}\n.arap-root .arap-toggle {\n position: relative;\n width: 56px;\n height: 44px;\n padding: 0;\n border: 0;\n border-radius: 10px;\n background: transparent;\n}\n.arap-toggle::before {\n content: "";\n position: absolute;\n inset: 6px 0;\n border: 2px solid #64748b;\n border-radius: 20px;\n background: #e2e8f0;\n}\n.arap-toggle-knob {\n position: absolute;\n top: 10px;\n left: 4px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: #475569;\n pointer-events: none;\n transition: transform 0.15s;\n}\n.arap-toggle-active::before {\n background: var(--arap-accent);\n border-color: var(--arap-accent);\n}\n.arap-toggle-active .arap-toggle-knob {\n transform: translateX(24px);\n background: #fff;\n}\n.arap-toggle-active .arap-toggle-knob::after {\n content: "\\2713";\n display: block;\n color: var(--arap-accent);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n text-align: center;\n}\n.arap-root .arap-toggle:hover::before {\n border-color: var(--arap-accent);\n}\n.arap-feature-reset {\n display: block;\n}\n.arap-root .arap-reset-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 10px;\n border: 1px solid var(--arap-border);\n border-radius: 10px;\n background: var(--arap-control);\n color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-reset-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n@media (max-width: 380px) {\n .arap-root .arap-panel {\n padding: 16px;\n }\n .arap-heading h2 {\n font-size: 20px;\n }\n .arap-feature-stepper {\n grid-template-columns: minmax(0, 1fr);\n }\n .arap-controls {\n width: 100%;\n }\n .arap-value {\n flex: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-root *,\n .arap-root *::before,\n .arap-root *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .arap-root {\n --arap-surface: Canvas;\n --arap-text: CanvasText;\n --arap-muted: CanvasText;\n --arap-border: ButtonText;\n --arap-divider: ButtonText;\n --arap-accent: Highlight;\n --arap-control: Canvas;\n --arap-selected: Canvas;\n }\n .arap-root button[aria-pressed=true] {\n outline: 2px solid Highlight;\n outline-offset: -4px;\n }\n .arap-root .arap-segment-active {\n color: HighlightText;\n background: Highlight;\n }\n .arap-toggle::before {\n border-color: ButtonText;\n background: Canvas;\n }\n .arap-toggle-knob {\n background: ButtonText;\n }\n .arap-toggle-active .arap-toggle-knob {\n background: Highlight;\n }\n .arap-toggle-active .arap-toggle-knob::after {\n color: HighlightText;\n }\n}\n.arap-root .arap-panel {\n display: flex;\n flex-direction: column;\n overflow: visible;\n}\n.arap-heading {\n flex: none;\n}\n.arap-tools {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 0 3px;\n margin: 0 -3px;\n}\n.arap-tools:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: -3px;\n}\n.arap-quick-actions {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 14px;\n margin-top: 8px;\n border-top: 1px solid var(--arap-divider);\n}\n.arap-actions {\n flex: 1;\n min-width: 0;\n}\n.arap-actions:empty {\n display: none;\n}\n.arap-actions .arap-feature-reset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n.arap-root .arap-position-button,\n.arap-root .arap-position-default,\n.arap-root .arap-position-arrows button {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-accent);\n}\n.arap-root .arap-position-button:hover,\n.arap-root .arap-position-default:hover,\n.arap-root .arap-position-arrows button:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-position-popover {\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 0;\n width: 100%;\n max-height: calc(100dvh - 160px);\n overflow: auto;\n padding: 14px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n box-shadow: 0 8px 24px #0f172a26;\n}\n.arap-position-popover[hidden] {\n display: none !important;\n}\n.arap-position-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.arap-position-popover select {\n width: 100%;\n min-height: 44px;\n padding: 8px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n font: inherit;\n color: var(--arap-text);\n background: var(--arap-surface);\n}\n.arap-position-popover select:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-position-arrows {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 10px;\n}\n.arap-position-default {\n width: 100%;\n margin-top: 8px;\n}\n.arap-root .arap-btn[data-draggable=true] {\n touch-action: none;\n user-select: none;\n cursor: grab;\n}\n.arap-root .arap-btn[data-dragging=true] {\n cursor: grabbing;\n}\n.arap-root .arap-btn[data-corner$=left],\n.arap-root .arap-panel[data-corner$=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-corner$=right],\n.arap-root .arap-panel[data-corner$=right] {\n left: auto;\n right: max(16px, env(safe-area-inset-right));\n}\n.arap-root .arap-btn[data-corner^=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-btn[data-corner^=bottom] {\n top: auto;\n bottom: max(16px, env(safe-area-inset-bottom));\n}\n.arap-root .arap-panel[data-corner^=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-root .arap-panel[data-corner^=bottom] {\n top: auto;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n}\n.arap-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.arap-root .arap-skip-actions {\n position: absolute;\n top: 12px;\n left: 20px;\n width: 44px;\n height: 44px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n}\n.arap-root .arap-skip-actions:focus-visible {\n right: 20px;\n width: auto;\n height: auto;\n min-height: 44px;\n clip-path: none;\n pointer-events: auto;\n z-index: 2;\n padding: 8px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-accent);\n}\n.arap-skip-to-main {\n position: fixed;\n top: 12px;\n left: 16px;\n z-index: 2147483647;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n pointer-events: none;\n font-family: inherit;\n font-size: 0.9375rem;\n font-weight: 600;\n text-decoration: none;\n color: var(--arap-accent, #008060);\n background: var(--arap-surface, #ffffff);\n border-radius: 8px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n}\n.arap-skip-to-main:focus,\n.arap-skip-to-main:focus-visible {\n width: auto;\n height: auto;\n min-height: 44px;\n margin: 0;\n padding: 10px 18px;\n clip-path: none;\n overflow: visible;\n white-space: normal;\n pointer-events: auto;\n border: 2px solid var(--arap-accent, #008060);\n outline: 3px solid var(--arap-accent, #008060);\n outline-offset: 3px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n@media (forced-colors: active) {\n .arap-skip-to-main {\n background: Canvas;\n color: CanvasText;\n border-color: Highlight;\n }\n .arap-skip-to-main:focus,\n .arap-skip-to-main:focus-visible {\n outline: 3px solid Highlight;\n }\n}\n@media (max-height: 480px) {\n .arap-root .arap-panel {\n top: max(16px, env(safe-area-inset-top)) !important;\n bottom: max(16px, env(safe-area-inset-bottom)) !important;\n max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;\n padding: 8px;\n }\n .arap-heading {\n padding-bottom: 8px;\n }\n .arap-heading h2 {\n font-size: 18px;\n }\n .arap-heading button {\n margin-top: 0;\n }\n .arap-description {\n display: none;\n }\n .arap-quick-actions {\n padding-top: 8px;\n margin-top: 0;\n }\n .arap-root .arap-reset-btn {\n min-height: 44px;\n }\n .arap-root .arap-btn[data-open=true] {\n visibility: hidden;\n }\n .arap-position-popover {\n max-height: calc(100dvh - 96px);\n }\n}\n.arap-statement {\n flex: none;\n padding-top: 10px;\n text-align: center;\n}\n.arap-statement-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 44px;\n padding: 6px 12px;\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 4px;\n font-size: 14px;\n font-weight: 500;\n border-radius: 8px;\n}\n.arap-statement-link:hover {\n color: var(--arap-accent-hover);\n background: var(--arap-selected);\n}\n.arap-statement-link:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-credits {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 2px;\n padding-top: 8px;\n color: var(--arap-muted);\n text-align: center;\n font-size: 11px;\n line-height: 1.4;\n}\n.arap-credits a {\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.arap-credits a:hover {\n color: var(--arap-accent-hover);\n}\n.arap-credits a:focus-visible {\n outline: 2px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-root .arap-btn[data-large-controls=true] {\n width: 64px;\n height: 64px;\n min-width: 48px;\n min-height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] {\n width: min(440px, calc(100vw - 32px));\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-heading button {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 32px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-btn-sm {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 24px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-value {\n min-width: 64px;\n font-size: 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-segment {\n min-width: 48px;\n min-height: 48px;\n padding: 10px 14px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle {\n width: 64px;\n height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle::before {\n inset: 8px 0;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-knob {\n top: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-active .arap-toggle-knob {\n transform: translateX(28px);\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-reset-btn {\n min-height: 52px;\n font-size: 16px;\n padding: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-button,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-default,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-arrows button {\n min-width: 48px;\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-popover select {\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-statement-link {\n min-height: 48px;\n font-size: 15px;\n padding: 10px 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-skip-actions {\n min-width: 48px;\n min-height: 48px;\n}\n.arap-feature-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n}\n.arap-card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-card-title {\n font-weight: 600;\n font-size: 15px;\n color: var(--arap-text);\n}\n.arap-card-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-status-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 11px;\n font-weight: 600;\n background: var(--arap-control);\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-card-alert {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 1.4;\n}\n.arap-alert-icon {\n flex: none;\n font-size: 16px;\n line-height: 1;\n}\n.arap-card-error {\n background: #fef2f2;\n border: 1px solid #fecaca;\n color: #991b1b;\n}\n.arap-card-unavailable {\n background: #f8fafc;\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n}\n.arap-card-permission {\n background: #fffbeb;\n border: 1px solid #fde68a;\n color: #92400e;\n}\n.arap-permission-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-permission-btn {\n align-self: flex-start;\n padding: 4px 10px;\n border: 1px solid #d97706;\n border-radius: 6px;\n background: #f59e0b;\n color: #fff;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n.arap-permission-btn:hover {\n background: #d97706;\n}\n.arap-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.arap-choice-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n.arap-choice-group-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-choice-badge {\n font-size: 11px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--arap-divider);\n color: var(--arap-muted);\n}\n.arap-segment-active .arap-choice-badge {\n background: rgba(255, 255, 255, 0.25);\n color: #fff;\n}\n.arap-stepper-control-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n}\n.arap-slider-container {\n display: flex;\n align-items: center;\n padding: 4px 0;\n}\n.arap-slider {\n width: 100%;\n accent-color: var(--arap-accent);\n cursor: pointer;\n}\n.arap-search-count {\n padding: 6px 0;\n font-size: 12px;\n font-weight: 500;\n color: var(--arap-muted);\n}\n.arap-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 24px 16px;\n gap: 8px;\n}\n.arap-empty-icon {\n font-size: 32px;\n}\n.arap-empty-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-empty-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n}\n.arap-empty-btn,\n.arap-retry-btn {\n margin-top: 6px;\n padding: 8px 16px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n font-weight: 500;\n font-size: 13px;\n color: var(--arap-text);\n cursor: pointer;\n}\n.arap-empty-btn:hover,\n.arap-retry-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n color: var(--arap-accent);\n}\n.arap-profile-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.arap-profile-card-active {\n border-color: var(--arap-accent);\n background: var(--arap-selected);\n box-shadow: 0 0 0 1px var(--arap-accent);\n}\n.arap-profile-header {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-profile-active-badge {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-accent);\n background: #dbeafe;\n padding: 2px 8px;\n border-radius: 9999px;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-profile-affected {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-profile-affected-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.arap-profile-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--arap-control);\n border: 1px solid var(--arap-divider);\n font-size: 12px;\n color: var(--arap-text);\n}\n.arap-profile-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n.arap-profile-apply-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-apply-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-profile-revert-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-muted);\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-revert-btn:hover {\n background: var(--arap-control);\n color: var(--arap-text);\n border-color: var(--arap-text);\n}\n.arap-notice {\n grid-column: 1 / -1;\n margin-top: 6px;\n padding: 8px 12px;\n border-radius: 8px;\n font-size: 12px;\n line-height: 1.45;\n background: #fefce8;\n border: 1px solid #fef08a;\n color: #854d0e;\n}\n.arap-notice-warning {\n background: #fffbeb;\n border-color: #fde68a;\n color: #92400e;\n}\n.arap-reading-mask {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-reading-guide {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-feature-expandable {\n flex-direction: column !important;\n align-items: stretch !important;\n}\n.arap-accessible-tooltip {\n position: fixed !important;\n z-index: 2147483646 !important;\n max-width: 320px !important;\n min-width: 48px !important;\n box-sizing: border-box !important;\n padding: 6px 12px !important;\n background: #0f172a !important;\n color: #ffffff !important;\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif !important;\n font-size: 13px !important;\n line-height: 1.4 !important;\n font-weight: 500 !important;\n border-radius: 6px !important;\n box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;\n pointer-events: auto !important;\n word-break: break-word !important;\n white-space: normal !important;\n opacity: 0 !important;\n visibility: hidden !important;\n transition: opacity 120ms ease, transform 120ms ease !important;\n transform: translateY(2px) !important;\n}\n.arap-accessible-tooltip[data-visible=true] {\n opacity: 1 !important;\n visibility: visible !important;\n transform: translateY(0) !important;\n}\n.arap-accessible-tooltip[data-placement=top] {\n transform: translateY(-2px) !important;\n}\n.arap-accessible-tooltip[data-placement=top][data-visible=true] {\n transform: translateY(0) !important;\n}\n@media (forced-colors: active) {\n .arap-accessible-tooltip {\n background: Canvas !important;\n color: CanvasText !important;\n border: 2px solid Highlight !important;\n box-shadow: none !important;\n }\n}\n.arap-navigator-dialog {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n margin-top: 10px;\n padding: 10px;\n background: var(--arap-control, #f1f5f9);\n border: 1px solid var(--arap-border, #e2e8f0);\n border-radius: 8px;\n box-sizing: border-box;\n}\n.arap-navigator-tabs {\n display: flex;\n gap: 4px;\n border-bottom: 1px solid var(--arap-border, #cbd5e1);\n padding-bottom: 6px;\n}\n.arap-navigator-tab {\n flex: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 6px 10px;\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted, #64748b);\n background: transparent;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n transition: all 120ms ease;\n}\n.arap-navigator-tab:hover {\n color: var(--arap-text, #0f172a);\n background: rgba(0, 0, 0, 0.04);\n}\n.arap-navigator-tab-active {\n color: var(--arap-accent, #008060) !important;\n background: var(--arap-selected, #f0fdf4) !important;\n}\n.arap-navigator-search-box {\n width: 100%;\n}\n.arap-navigator-search {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 10px;\n font-size: 12px;\n border: 1px solid var(--arap-border, #cbd5e1);\n border-radius: 6px;\n background: var(--arap-surface, #ffffff);\n color: var(--arap-text, #0f172a);\n}\n.arap-navigator-search:focus {\n outline: 2px solid var(--arap-accent, #008060);\n outline-offset: 1px;\n}\n.arap-navigator-content {\n max-height: 240px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.arap-navigator-list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-navigator-item {\n margin: 0;\n padding: 0;\n}\n.arap-navigator-jump-btn {\n width: 100%;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n font-size: 12px;\n font-weight: 500;\n text-align: left;\n background: var(--arap-surface, #ffffff);\n border: 1px solid var(--arap-border, #e2e8f0);\n border-radius: 6px;\n color: var(--arap-text, #0f172a);\n cursor: pointer;\n transition: background 100ms ease, border-color 100ms ease;\n}\n.arap-navigator-jump-btn:hover,\n.arap-navigator-jump-btn:focus-visible {\n background: var(--arap-selected, #f0fdf4);\n border-color: var(--arap-accent, #008060);\n outline: 2px solid var(--arap-accent, #008060);\n outline-offset: -1px;\n}\n.arap-navigator-badge {\n display: inline-block;\n padding: 2px 6px;\n font-size: 10px;\n font-weight: 700;\n border-radius: 4px;\n flex-shrink: 0;\n}\n.arap-navigator-badge-h {\n background: #e0f2fe;\n color: #0369a1;\n}\n.arap-navigator-badge-l {\n background: #fef3c7;\n color: #b45309;\n}\n.arap-navigator-item-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.arap-navigator-empty {\n padding: 16px;\n font-size: 12px;\n text-align: center;\n color: var(--arap-muted, #64748b);\n font-style: italic;\n}\n.arap-profile-card {\n padding: 12px;\n border: 1px solid var(--arap-border, #e2e8f0);\n border-radius: 8px;\n background: var(--arap-card-bg, #ffffff);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.arap-profile-card:hover {\n border-color: var(--arap-primary, #2563eb);\n}\n.arap-profile-card-active {\n border-color: var(--arap-primary, #2563eb);\n background: rgba(37, 99, 235, 0.03);\n box-shadow: 0 0 0 1px var(--arap-primary, #2563eb);\n}\n.arap-profile-header {\n margin-bottom: 8px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 4px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--arap-text, #1e293b);\n}\n.arap-profile-active-badge {\n display: inline-block;\n padding: 2px 8px;\n font-size: 11px;\n font-weight: 600;\n border-radius: 9999px;\n background: #dbeafe;\n color: #1d4ed8;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 11px;\n color: var(--arap-muted, #64748b);\n line-height: 1.4;\n}\n.arap-profile-affected {\n margin-top: 8px;\n margin-bottom: 10px;\n}\n.arap-profile-affected-label {\n display: block;\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: var(--arap-muted, #94a3b8);\n margin-bottom: 4px;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n.arap-profile-chip {\n display: inline-block;\n padding: 2px 6px;\n font-size: 10px;\n background: var(--arap-chip-bg, #f1f5f9);\n color: var(--arap-text, #334155);\n border-radius: 4px;\n border: 1px solid var(--arap-chip-border, #e2e8f0);\n}\n.arap-profile-actions {\n display: flex;\n justify-content: flex-end;\n margin-top: 8px;\n}\n.arap-profile-apply-btn,\n.arap-profile-revert-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 36px;\n padding: 6px 14px;\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n cursor: pointer;\n transition: background 0.15s ease, border-color 0.15s ease;\n}\n.arap-profile-apply-btn {\n background: var(--arap-primary, #2563eb);\n color: #ffffff;\n border: 1px solid var(--arap-primary, #2563eb);\n}\n.arap-profile-apply-btn:hover {\n background: #1d4ed8;\n}\n.arap-profile-revert-btn {\n background: #ffffff;\n color: #dc2626;\n border: 1px solid #fca5a5;\n}\n.arap-profile-revert-btn:hover {\n background: #fef2f2;\n border-color: #f87171;\n}\n.arap-large-controls .arap-profile-apply-btn,\n.arap-large-controls .arap-profile-revert-btn {\n min-height: 48px;\n padding: 10px 18px;\n font-size: 14px;\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-profile-card,\n .arap-profile-apply-btn,\n .arap-profile-revert-btn,\n .arap-preset-card {\n transition: none !important;\n }\n}\n.arap-preset-card {\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.arap-preset-card:hover {\n border-color: var(--arap-border-hover, #cbd5e1);\n}\n.arap-large-controls .arap-preset-card button {\n min-height: 48px;\n padding: 10px 16px;\n font-size: 14px;\n}\n.arap-root[dir=rtl],\n.arap-panel[dir=rtl] {\n direction: rtl;\n text-align: right;\n}\n.arap-panel[dir=rtl] .arap-heading {\n flex-direction: row-reverse;\n}\n.arap-panel[dir=rtl] .arap-position-arrows {\n direction: ltr;\n}\n.arap-search-input {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 28px 6px 10px;\n font-size: 12px;\n border: 1px solid var(--arap-border, #cbd5e1);\n border-radius: 6px;\n background: var(--arap-surface, #ffffff);\n color: var(--arap-text, #0f172a);\n}\n.arap-panel[dir=rtl] .arap-search-input {\n padding: 6px 10px 6px 28px;\n}\n.arap-search-clear {\n position: absolute;\n inset-inline-end: 8px;\n top: 50%;\n transform: translateY(-50%);\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 2px 6px;\n font-size: 14px;\n color: var(--arap-muted, #64748b);\n border-radius: 4px;\n}\n.arap-search-clear:hover {\n background: var(--arap-selected, #eff6ff);\n color: var(--arap-text, #0f172a);\n}\n.arap-reading-mode-backdrop {\n position: fixed;\n inset: 0;\n z-index: 2147483646;\n overflow-y: auto;\n display: flex;\n justify-content: center;\n align-items: flex-start;\n padding: 24px 16px;\n background: rgba(15, 23, 42, 0.45);\n backdrop-filter: blur(4px);\n -webkit-backdrop-filter: blur(4px);\n box-sizing: border-box;\n}\n.arap-reading-mode-backdrop[data-theme=sepia] {\n background: rgba(68, 51, 34, 0.45);\n}\n.arap-reading-mode-backdrop[data-theme=dark] {\n background: rgba(0, 0, 0, 0.75);\n}\n.arap-reading-mode-dialog {\n position: relative;\n width: 100%;\n max-width: 760px;\n min-height: 50vh;\n margin: 16px auto;\n border-radius: 12px;\n box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n outline: none;\n box-sizing: border-box;\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Noto Sans Sinhala",\n "Noto Sans Tamil",\n sans-serif;\n transition: background-color 0.2s ease, color 0.2s ease;\n}\n.arap-reading-mode-backdrop[data-theme=light] .arap-reading-mode-dialog {\n background: #ffffff;\n color: #1e293b;\n border: 1px solid #e2e8f0;\n}\n.arap-reading-mode-backdrop[data-theme=sepia] .arap-reading-mode-dialog {\n background: #fbf0d9;\n color: #5f4b32;\n border: 1px solid #ebd5b3;\n}\n.arap-reading-mode-backdrop[data-theme=dark] .arap-reading-mode-dialog {\n background: #18181b;\n color: #f4f4f5;\n border: 1px solid #27272a;\n}\n.arap-reading-mode-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 12px;\n padding: 16px 24px;\n border-bottom: 1px solid rgba(148, 163, 184, 0.2);\n}\n.arap-reading-mode-meta {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 0.875rem;\n opacity: 0.85;\n}\n.arap-reading-mode-badge {\n font-weight: 600;\n text-transform: uppercase;\n font-size: 0.75rem;\n letter-spacing: 0.05em;\n padding: 2px 8px;\n border-radius: 4px;\n background: rgba(148, 163, 184, 0.15);\n}\n.arap-reading-mode-toolbar {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.arap-reading-mode-theme-group,\n.arap-reading-mode-zoom-group {\n display: inline-flex;\n border-radius: 6px;\n border: 1px solid rgba(148, 163, 184, 0.25);\n overflow: hidden;\n}\n.arap-reader-theme-btn,\n.arap-reader-zoom-btn {\n min-height: 36px;\n min-width: 44px;\n padding: 4px 10px;\n border: none;\n background: transparent;\n color: inherit;\n font-size: 0.8125rem;\n font-weight: 500;\n cursor: pointer;\n transition: background-color 0.15s ease;\n}\n.arap-reader-theme-btn:not(:last-child),\n.arap-reader-zoom-btn:not(:last-child) {\n border-right: 1px solid rgba(148, 163, 184, 0.25);\n}\n.arap-reader-theme-btn.arap-active {\n background: rgba(148, 163, 184, 0.25);\n font-weight: 600;\n}\n.arap-reader-zoom-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n.arap-reading-mode-close {\n min-width: 44px;\n min-height: 44px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n font-size: 1.5rem;\n line-height: 1;\n color: inherit;\n cursor: pointer;\n border-radius: 6px;\n}\n.arap-reading-mode-close:hover,\n.arap-reader-theme-btn:hover:not(:disabled),\n.arap-reader-zoom-btn:hover:not(:disabled) {\n background: rgba(148, 163, 184, 0.15);\n}\n.arap-reading-mode-content {\n padding: 32px 36px;\n flex: 1 1 auto;\n}\n.arap-reading-mode-title {\n margin: 0 0 12px 0;\n font-size: 2.125rem;\n line-height: 1.25;\n font-weight: 700;\n}\n.arap-reading-mode-byline {\n margin: 0 0 24px 0;\n font-size: 0.9375rem;\n opacity: 0.75;\n font-style: italic;\n}\n.arap-reading-mode-body {\n line-height: 1.8;\n font-size: 1.0625rem;\n}\n.arap-reading-mode-body p {\n margin: 0 0 1.5em 0;\n}\n.arap-reading-mode-body h2 {\n font-size: 1.5rem;\n margin: 1.75em 0 0.75em 0;\n font-weight: 600;\n}\n.arap-reading-mode-body h3 {\n font-size: 1.25rem;\n margin: 1.5em 0 0.5em 0;\n font-weight: 600;\n}\n.arap-reading-mode-body ul,\n.arap-reading-mode-body ol {\n margin: 0 0 1.5em 0;\n padding-left: 1.75em;\n}\n.arap-reading-mode-body li {\n margin-bottom: 0.5em;\n}\n.arap-reading-mode-body a {\n color: #0284c7;\n text-decoration: underline;\n text-underline-offset: 3px;\n}\n.arap-reading-mode-backdrop[data-theme=dark] .arap-reading-mode-body a {\n color: #38bdf8;\n}\n.arap-reading-mode-backdrop[data-theme=sepia] .arap-reading-mode-body a {\n color: #8c5b00;\n}\n.arap-reading-mode-body img {\n max-width: 100%;\n height: auto;\n border-radius: 8px;\n margin: 1.5em 0;\n display: block;\n}\n.arap-reading-mode-body figure {\n margin: 1.5em 0;\n}\n.arap-reading-mode-body figcaption {\n font-size: 0.875rem;\n opacity: 0.75;\n text-align: center;\n margin-top: 6px;\n}\n.arap-reading-mode-body blockquote {\n margin: 1.5em 0;\n padding: 12px 20px;\n border-left: 4px solid currentColor;\n opacity: 0.9;\n font-style: italic;\n}\n.arap-reading-mode-body pre {\n margin: 1.5em 0;\n padding: 16px;\n border-radius: 8px;\n background: rgba(148, 163, 184, 0.15);\n overflow-x: auto;\n font-size: 0.9rem;\n}\n.arap-reading-mode-body code {\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n monospace;\n}\n.arap-reading-mode-footer {\n padding: 16px 24px;\n border-top: 1px solid rgba(148, 163, 184, 0.2);\n display: flex;\n justify-content: center;\n}\n.arap-reading-mode-exit-btn {\n min-height: 44px;\n padding: 8px 24px;\n border-radius: 6px;\n border: 1px solid rgba(148, 163, 184, 0.35);\n background: transparent;\n color: inherit;\n font-size: 0.9375rem;\n font-weight: 500;\n cursor: pointer;\n transition: background-color 0.15s ease;\n}\n.arap-reading-mode-exit-btn:hover {\n background: rgba(148, 163, 184, 0.15);\n}\n@media (max-width: 640px) {\n .arap-reading-mode-backdrop {\n padding: 0;\n }\n .arap-reading-mode-dialog {\n margin: 0;\n min-height: 100vh;\n border-radius: 0;\n border: none;\n }\n .arap-reading-mode-content {\n padding: 20px 16px;\n }\n .arap-reading-mode-title {\n font-size: 1.75rem;\n }\n}\n');
|
|
28
28
|
|
|
29
29
|
// src/core/AccessibilityPlugin.tsx
|
|
30
30
|
import {
|
|
@@ -342,7 +342,8 @@ for (const key of [
|
|
|
342
342
|
"focusHighlight",
|
|
343
343
|
"reduceMotion",
|
|
344
344
|
"tooltips",
|
|
345
|
-
"accessibleTooltips"
|
|
345
|
+
"accessibleTooltips",
|
|
346
|
+
"readingMode"
|
|
346
347
|
]) {
|
|
347
348
|
builtins[key] = {
|
|
348
349
|
defaultValue: false,
|
|
@@ -2073,6 +2074,12 @@ var enLocale = Object.freeze({
|
|
|
2073
2074
|
formatPresetDeleted: (presetName) => `Preset "${presetName}" deleted.`,
|
|
2074
2075
|
decreaseTextSize: "Decrease text size",
|
|
2075
2076
|
increaseTextSize: "Increase text size",
|
|
2077
|
+
readingModeDescription: "Distraction-free article view",
|
|
2078
|
+
readingModeOpen: "Open Reading Mode",
|
|
2079
|
+
readingModeClose: "Close Reading Mode",
|
|
2080
|
+
readingModeFailed: "No readable article content found on this page.",
|
|
2081
|
+
formatReadingWords: (words) => `${words} words`,
|
|
2082
|
+
formatReadingTime: (minutes) => `${minutes} min read`,
|
|
2076
2083
|
features: {
|
|
2077
2084
|
textScale: "Bigger Text",
|
|
2078
2085
|
lineHeight: "Line Height",
|
|
@@ -2148,6 +2155,12 @@ var siLocale = Object.freeze({
|
|
|
2148
2155
|
formatPresetDeleted: (presetName) => `"${presetName}" \u0DB4\u0DD9\u0DBB\u0DC3\u0DD0\u0D9A\u0DC3\u0DD4\u0DB8 \u0D89\u0DC0\u0DAD\u0DCA \u0D9A\u0DBB\u0DB1 \u0DBD\u0DAF\u0DD3.`,
|
|
2149
2156
|
decreaseTextSize: "\u0D85\u0D9A\u0DD4\u0DBB\u0DD4 \u0DB4\u0DCA\u200D\u0DBB\u0DB8\u0DCF\u0DAB\u0DBA \u0D85\u0DA9\u0DD4 \u0D9A\u0DBB\u0DB1\u0DCA\u0DB1",
|
|
2150
2157
|
increaseTextSize: "\u0D85\u0D9A\u0DD4\u0DBB\u0DD4 \u0DB4\u0DCA\u200D\u0DBB\u0DB8\u0DCF\u0DAB\u0DBA \u0DC0\u0DD0\u0DA9\u0DD2 \u0D9A\u0DBB\u0DB1\u0DCA\u0DB1",
|
|
2158
|
+
readingModeDescription: "\u0DB6\u0DCF\u0DB0\u0DCF\u0DC0\u0D9A\u0DD2\u0DB1\u0DCA \u0DAD\u0DDC\u0DBB \u0DBD\u0DD2\u0DB4\u0DD2 \u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8",
|
|
2159
|
+
readingModeOpen: "\u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8\u0DDA \u0DB4\u0DCA\u200D\u0DBB\u0D9A\u0DCF\u0DBB\u0DBA \u0D85\u0DBB\u0DB9\u0DB1\u0DCA\u0DB1",
|
|
2160
|
+
readingModeClose: "\u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8\u0DDA \u0DB4\u0DCA\u200D\u0DBB\u0D9A\u0DCF\u0DBB\u0DBA \u0DC0\u0DC3\u0DB1\u0DCA\u0DB1",
|
|
2161
|
+
readingModeFailed: "\u0DB8\u0DD9\u0DB8 \u0DB4\u0DD2\u0DA7\u0DD4\u0DC0\u0DD9\u0DC4\u0DD2 \u0D9A\u0DD2\u0DBA\u0DC0\u0DD2\u0DBA \u0DC4\u0DD0\u0D9A\u0DD2 \u0DBD\u0DD2\u0DB4\u0DD2 \u0D85\u0DB1\u0DCA\u0DAD\u0DBB\u0DCA\u0D9C\u0DAD\u0DBA\u0D9A\u0DCA \u0DC4\u0DB8\u0DD4 \u0DB1\u0DDC\u0DC0\u0DD3\u0DBA.",
|
|
2162
|
+
formatReadingWords: (words) => `\u0DC0\u0DA0\u0DB1 ${words}\u0D9A\u0DCA`,
|
|
2163
|
+
formatReadingTime: (minutes) => `\u0DB8\u0DD2\u0DB1\u0DD2\u0DAD\u0DCA\u0DAD\u0DD4 ${minutes}\u0D9A \u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8\u0D9A\u0DCA`,
|
|
2151
2164
|
features: {
|
|
2152
2165
|
textScale: "\u0DC0\u0DD2\u0DC1\u0DCF\u0DBD \u0D85\u0D9A\u0DD4\u0DBB\u0DD4",
|
|
2153
2166
|
lineHeight: "\u0DB4\u0DDA\u0DC5\u0DD2 \u0DB4\u0DBB\u0DAD\u0DBB\u0DBA",
|
|
@@ -2223,6 +2236,12 @@ var taLocale = Object.freeze({
|
|
|
2223
2236
|
formatPresetDeleted: (presetName) => `"${presetName}" \u0BAE\u0BC1\u0BA9\u0BCD\u0BA9\u0BAE\u0BC8\u0BB5\u0BC1 \u0BA8\u0BC0\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1.`,
|
|
2224
2237
|
decreaseTextSize: "\u0B89\u0BB0\u0BC8 \u0B85\u0BB3\u0BB5\u0BC8\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BC8\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD",
|
|
2225
2238
|
increaseTextSize: "\u0B89\u0BB0\u0BC8 \u0B85\u0BB3\u0BB5\u0BC8 \u0B85\u0BA4\u0BBF\u0B95\u0BB0\u0BBF\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD",
|
|
2239
|
+
readingModeDescription: "\u0B95\u0BB5\u0BA9\u0B9A\u0BCD\u0B9A\u0BBF\u0BA4\u0BB1\u0BB2\u0BB1\u0BCD\u0BB1 \u0B95\u0B9F\u0BCD\u0B9F\u0BC1\u0BB0\u0BC8 \u0BB5\u0BBE\u0B9A\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1",
|
|
2240
|
+
readingModeOpen: "\u0BB5\u0BBE\u0B9A\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1 \u0BAA\u0BAF\u0BA9\u0BCD\u0BAE\u0BC1\u0BB1\u0BC8\u0BAF\u0BC8\u0BA4\u0BCD \u0BA4\u0BBF\u0BB1",
|
|
2241
|
+
readingModeClose: "\u0BB5\u0BBE\u0B9A\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1 \u0BAA\u0BAF\u0BA9\u0BCD\u0BAE\u0BC1\u0BB1\u0BC8\u0BAF\u0BC8 \u0BAE\u0BC2\u0B9F\u0BC1",
|
|
2242
|
+
readingModeFailed: "\u0B87\u0BAA\u0BCD\u0BAA\u0B95\u0BCD\u0B95\u0BA4\u0BCD\u0BA4\u0BBF\u0BB2\u0BCD \u0BAA\u0B9F\u0BBF\u0B95\u0BCD\u0B95\u0B95\u0BCD\u0B95\u0BC2\u0B9F\u0BBF\u0BAF \u0B95\u0B9F\u0BCD\u0B9F\u0BC1\u0BB0\u0BC8 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95\u0BAE\u0BCD \u0B8E\u0BA4\u0BC1\u0BB5\u0BC1\u0BAE\u0BCD \u0B87\u0BB2\u0BCD\u0BB2\u0BC8.",
|
|
2243
|
+
formatReadingWords: (words) => `${words} \u0BB5\u0BBE\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC8\u0B95\u0BB3\u0BCD`,
|
|
2244
|
+
formatReadingTime: (minutes) => `${minutes} \u0BA8\u0BBF\u0BAE\u0BBF\u0B9F \u0BB5\u0BBE\u0B9A\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`,
|
|
2226
2245
|
features: {
|
|
2227
2246
|
textScale: "\u0BAA\u0BC6\u0BB0\u0BBF\u0BAF \u0B89\u0BB0\u0BC8",
|
|
2228
2247
|
lineHeight: "\u0BB5\u0BB0\u0BBF \u0B87\u0B9F\u0BC8\u0BB5\u0BC6\u0BB3\u0BBF",
|
|
@@ -3490,6 +3509,10 @@ var drawings = {
|
|
|
3490
3509
|
/* @__PURE__ */ jsx7("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75" })
|
|
3491
3510
|
] }),
|
|
3492
3511
|
presets: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" }) }),
|
|
3512
|
+
readingMode: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
3513
|
+
/* @__PURE__ */ jsx7("path", { d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" }),
|
|
3514
|
+
/* @__PURE__ */ jsx7("path", { d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" })
|
|
3515
|
+
] }),
|
|
3493
3516
|
reset: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M3 10a9 9 0 1 1 1 7M3 4v6h6" }) })
|
|
3494
3517
|
};
|
|
3495
3518
|
function FeatureIcon({ name }) {
|
|
@@ -6680,8 +6703,620 @@ var CustomPresetsController = PresetsController;
|
|
|
6680
6703
|
var SettingsImportExportController = PresetsController;
|
|
6681
6704
|
var PresetsBackupController = PresetsController;
|
|
6682
6705
|
|
|
6706
|
+
// src/features/ReadingModeController.tsx
|
|
6707
|
+
import {
|
|
6708
|
+
useState as useState10,
|
|
6709
|
+
useEffect as useEffect8,
|
|
6710
|
+
useRef as useRef8,
|
|
6711
|
+
useId as useId4,
|
|
6712
|
+
useContext as useContext13,
|
|
6713
|
+
useSyncExternalStore as useSyncExternalStore8
|
|
6714
|
+
} from "react";
|
|
6715
|
+
import { createPortal as createPortal3 } from "react-dom";
|
|
6716
|
+
|
|
6717
|
+
// src/core/readingMode.ts
|
|
6718
|
+
var EXCLUDED_SELECTORS = [
|
|
6719
|
+
"[data-arap-ui]",
|
|
6720
|
+
"script",
|
|
6721
|
+
"style",
|
|
6722
|
+
"noscript",
|
|
6723
|
+
"template",
|
|
6724
|
+
"iframe",
|
|
6725
|
+
"object",
|
|
6726
|
+
"embed",
|
|
6727
|
+
"canvas",
|
|
6728
|
+
"audio",
|
|
6729
|
+
"video",
|
|
6730
|
+
"form",
|
|
6731
|
+
"input",
|
|
6732
|
+
"select",
|
|
6733
|
+
"textarea",
|
|
6734
|
+
"button",
|
|
6735
|
+
"nav",
|
|
6736
|
+
'[role="navigation"]',
|
|
6737
|
+
"header",
|
|
6738
|
+
'[role="banner"]',
|
|
6739
|
+
"footer",
|
|
6740
|
+
'[role="contentinfo"]',
|
|
6741
|
+
"aside",
|
|
6742
|
+
'[role="complementary"]',
|
|
6743
|
+
'[role="dialog"]',
|
|
6744
|
+
'[role="alertdialog"]',
|
|
6745
|
+
"[aria-modal='true']",
|
|
6746
|
+
"[hidden]",
|
|
6747
|
+
'[aria-hidden="true"]',
|
|
6748
|
+
".ad",
|
|
6749
|
+
".ads",
|
|
6750
|
+
".advertisement",
|
|
6751
|
+
".cookie-banner",
|
|
6752
|
+
".cookie-consent",
|
|
6753
|
+
".social-share",
|
|
6754
|
+
".comments",
|
|
6755
|
+
".sidebar"
|
|
6756
|
+
];
|
|
6757
|
+
var SENSITIVE_SELECTORS = [
|
|
6758
|
+
'input[type="password"]',
|
|
6759
|
+
'input[type="hidden"]',
|
|
6760
|
+
"[data-sensitive]",
|
|
6761
|
+
'[autocomplete*="password"]',
|
|
6762
|
+
'[autocomplete*="cc-"]',
|
|
6763
|
+
'[autocomplete*="credit-card"]'
|
|
6764
|
+
];
|
|
6765
|
+
var ALLOWED_TAGS = /* @__PURE__ */ new Set([
|
|
6766
|
+
"h1",
|
|
6767
|
+
"h2",
|
|
6768
|
+
"h3",
|
|
6769
|
+
"h4",
|
|
6770
|
+
"h5",
|
|
6771
|
+
"h6",
|
|
6772
|
+
"p",
|
|
6773
|
+
"ul",
|
|
6774
|
+
"ol",
|
|
6775
|
+
"li",
|
|
6776
|
+
"blockquote",
|
|
6777
|
+
"pre",
|
|
6778
|
+
"code",
|
|
6779
|
+
"a",
|
|
6780
|
+
"img",
|
|
6781
|
+
"figure",
|
|
6782
|
+
"figcaption",
|
|
6783
|
+
"strong",
|
|
6784
|
+
"em",
|
|
6785
|
+
"b",
|
|
6786
|
+
"i",
|
|
6787
|
+
"mark",
|
|
6788
|
+
"time",
|
|
6789
|
+
"hr",
|
|
6790
|
+
"table",
|
|
6791
|
+
"thead",
|
|
6792
|
+
"tbody",
|
|
6793
|
+
"tr",
|
|
6794
|
+
"th",
|
|
6795
|
+
"td",
|
|
6796
|
+
"div",
|
|
6797
|
+
"section",
|
|
6798
|
+
"article",
|
|
6799
|
+
"span",
|
|
6800
|
+
"br"
|
|
6801
|
+
]);
|
|
6802
|
+
function isSafeUrl(url) {
|
|
6803
|
+
if (!url) return false;
|
|
6804
|
+
const trimmed = url.trim().toLowerCase();
|
|
6805
|
+
if (trimmed.startsWith("javascript:") || trimmed.startsWith("vbscript:")) {
|
|
6806
|
+
return false;
|
|
6807
|
+
}
|
|
6808
|
+
return trimmed.startsWith("http://") || trimmed.startsWith("https://") || trimmed.startsWith("/") || trimmed.startsWith("#") || trimmed.startsWith("./") || trimmed.startsWith("../") || trimmed.startsWith("data:image/");
|
|
6809
|
+
}
|
|
6810
|
+
function countWords(text) {
|
|
6811
|
+
const matches = text.trim().match(/\S+/g);
|
|
6812
|
+
return matches ? matches.length : 0;
|
|
6813
|
+
}
|
|
6814
|
+
function estimateReadingTime(words) {
|
|
6815
|
+
return Math.max(1, Math.ceil(words / 200));
|
|
6816
|
+
}
|
|
6817
|
+
function scoreElement(el) {
|
|
6818
|
+
let score = 0;
|
|
6819
|
+
const tagName = el.tagName.toLowerCase();
|
|
6820
|
+
if (tagName === "article" || el.getAttribute("role") === "article")
|
|
6821
|
+
score += 50;
|
|
6822
|
+
if (tagName === "main" || el.getAttribute("role") === "main") score += 30;
|
|
6823
|
+
if (el.getAttribute("itemprop") === "articleBody") score += 60;
|
|
6824
|
+
if (el.id === "content" || el.id === "article" || el.id === "main-content")
|
|
6825
|
+
score += 20;
|
|
6826
|
+
const paragraphs = el.querySelectorAll("p");
|
|
6827
|
+
score += paragraphs.length * 5;
|
|
6828
|
+
const text = el.textContent || "";
|
|
6829
|
+
const words = countWords(text);
|
|
6830
|
+
score += Math.min(words / 10, 50);
|
|
6831
|
+
const links = el.querySelectorAll("a");
|
|
6832
|
+
let linkTextLength = 0;
|
|
6833
|
+
links.forEach((a) => {
|
|
6834
|
+
linkTextLength += (a.textContent || "").length;
|
|
6835
|
+
});
|
|
6836
|
+
const totalTextLength = text.length;
|
|
6837
|
+
if (totalTextLength > 0) {
|
|
6838
|
+
const linkDensity = linkTextLength / totalTextLength;
|
|
6839
|
+
if (linkDensity > 0.5) {
|
|
6840
|
+
score -= 50;
|
|
6841
|
+
}
|
|
6842
|
+
}
|
|
6843
|
+
return score;
|
|
6844
|
+
}
|
|
6845
|
+
function findArticleCandidate(root) {
|
|
6846
|
+
const articles = Array.from(
|
|
6847
|
+
root.querySelectorAll("article, [role='article']")
|
|
6848
|
+
);
|
|
6849
|
+
const substantiveArticles = articles.filter(
|
|
6850
|
+
(a) => !a.closest("[data-arap-ui]") && (a.textContent?.trim().length ?? 0) >= 60
|
|
6851
|
+
);
|
|
6852
|
+
if (substantiveArticles.length === 1) {
|
|
6853
|
+
return substantiveArticles[0];
|
|
6854
|
+
}
|
|
6855
|
+
const main = root.querySelector("main, [role='main']");
|
|
6856
|
+
if (main && !main.closest("[data-arap-ui]") && (main.textContent?.trim().length ?? 0) >= 60) {
|
|
6857
|
+
const innerArticle = main.querySelector("article");
|
|
6858
|
+
if (innerArticle && (innerArticle.textContent?.trim().length ?? 0) >= 60) {
|
|
6859
|
+
return innerArticle;
|
|
6860
|
+
}
|
|
6861
|
+
return main;
|
|
6862
|
+
}
|
|
6863
|
+
const candidates = Array.from(
|
|
6864
|
+
root.querySelectorAll(
|
|
6865
|
+
"article, section, div.content, div.post, div.entry, #content, #article, div"
|
|
6866
|
+
)
|
|
6867
|
+
).filter((el) => {
|
|
6868
|
+
if (el.closest("[data-arap-ui]")) return false;
|
|
6869
|
+
const text = el.textContent?.trim() || "";
|
|
6870
|
+
return text.length >= 60 && el.querySelectorAll("p").length >= 1;
|
|
6871
|
+
});
|
|
6872
|
+
if (candidates.length === 0) return null;
|
|
6873
|
+
let bestCandidate = null;
|
|
6874
|
+
let highestScore = -1;
|
|
6875
|
+
for (const candidate of candidates) {
|
|
6876
|
+
const score = scoreElement(candidate);
|
|
6877
|
+
if (score > highestScore) {
|
|
6878
|
+
highestScore = score;
|
|
6879
|
+
bestCandidate = candidate;
|
|
6880
|
+
}
|
|
6881
|
+
}
|
|
6882
|
+
return highestScore > 0 ? bestCandidate : null;
|
|
6883
|
+
}
|
|
6884
|
+
function sanitizeClone(node) {
|
|
6885
|
+
for (const selector of SENSITIVE_SELECTORS) {
|
|
6886
|
+
node.querySelectorAll(selector).forEach((el) => el.remove());
|
|
6887
|
+
}
|
|
6888
|
+
for (const selector of EXCLUDED_SELECTORS) {
|
|
6889
|
+
node.querySelectorAll(selector).forEach((el) => el.remove());
|
|
6890
|
+
}
|
|
6891
|
+
const allElements = Array.from(node.querySelectorAll("*"));
|
|
6892
|
+
for (const el of allElements) {
|
|
6893
|
+
const tagName = el.tagName.toLowerCase();
|
|
6894
|
+
if (!ALLOWED_TAGS.has(tagName)) {
|
|
6895
|
+
el.remove();
|
|
6896
|
+
continue;
|
|
6897
|
+
}
|
|
6898
|
+
const attributeNames = Array.from(el.attributes).map((attr) => attr.name);
|
|
6899
|
+
for (const attr of attributeNames) {
|
|
6900
|
+
const lower = attr.toLowerCase();
|
|
6901
|
+
if (lower.startsWith("on") || lower === "style") {
|
|
6902
|
+
el.removeAttribute(attr);
|
|
6903
|
+
} else if (tagName === "a") {
|
|
6904
|
+
if (lower === "href") {
|
|
6905
|
+
const href = el.getAttribute("href") || "";
|
|
6906
|
+
if (!isSafeUrl(href)) {
|
|
6907
|
+
el.removeAttribute("href");
|
|
6908
|
+
} else {
|
|
6909
|
+
el.setAttribute("target", "_blank");
|
|
6910
|
+
el.setAttribute("rel", "noopener noreferrer");
|
|
6911
|
+
}
|
|
6912
|
+
} else if (lower !== "title" && lower !== "id") {
|
|
6913
|
+
el.removeAttribute(attr);
|
|
6914
|
+
}
|
|
6915
|
+
} else if (tagName === "img") {
|
|
6916
|
+
if (lower === "src") {
|
|
6917
|
+
const src = el.getAttribute("src") || "";
|
|
6918
|
+
if (!isSafeUrl(src)) {
|
|
6919
|
+
el.removeAttribute("src");
|
|
6920
|
+
}
|
|
6921
|
+
} else if (lower !== "alt" && lower !== "title" && lower !== "width" && lower !== "height") {
|
|
6922
|
+
el.removeAttribute(attr);
|
|
6923
|
+
}
|
|
6924
|
+
} else if (lower !== "id" && lower !== "lang" && lower !== "dir" && lower !== "class") {
|
|
6925
|
+
el.removeAttribute(attr);
|
|
6926
|
+
}
|
|
6927
|
+
}
|
|
6928
|
+
if (tagName === "img" && !el.hasAttribute("alt")) {
|
|
6929
|
+
el.setAttribute("alt", "");
|
|
6930
|
+
}
|
|
6931
|
+
}
|
|
6932
|
+
}
|
|
6933
|
+
function extractTitle(candidate, doc) {
|
|
6934
|
+
const firstHeading = candidate.querySelector("h1, h2");
|
|
6935
|
+
if (firstHeading && firstHeading.textContent?.trim()) {
|
|
6936
|
+
return firstHeading.textContent.trim();
|
|
6937
|
+
}
|
|
6938
|
+
const docH1 = doc.querySelector("h1");
|
|
6939
|
+
if (docH1 && docH1.textContent?.trim()) {
|
|
6940
|
+
return docH1.textContent.trim();
|
|
6941
|
+
}
|
|
6942
|
+
return doc.title?.trim() || "Article";
|
|
6943
|
+
}
|
|
6944
|
+
function extractByline(candidate) {
|
|
6945
|
+
const bylineEl = candidate.querySelector(
|
|
6946
|
+
"[rel='author'], .byline, .author, time, [itemprop='author'], [itemprop='datePublished']"
|
|
6947
|
+
);
|
|
6948
|
+
if (bylineEl && bylineEl.textContent?.trim()) {
|
|
6949
|
+
return bylineEl.textContent.trim();
|
|
6950
|
+
}
|
|
6951
|
+
return void 0;
|
|
6952
|
+
}
|
|
6953
|
+
function extractArticleContent(root) {
|
|
6954
|
+
if (typeof document === "undefined") return null;
|
|
6955
|
+
const doc = root instanceof Document ? root : root?.ownerDocument || document;
|
|
6956
|
+
const targetRoot = root || doc.body;
|
|
6957
|
+
const candidate = findArticleCandidate(targetRoot);
|
|
6958
|
+
if (!candidate) return null;
|
|
6959
|
+
const clone = candidate.cloneNode(true);
|
|
6960
|
+
sanitizeClone(clone);
|
|
6961
|
+
const text = (clone.textContent || "").trim();
|
|
6962
|
+
const wordCount = countWords(text);
|
|
6963
|
+
if (wordCount < 20 && text.length < 60) {
|
|
6964
|
+
return null;
|
|
6965
|
+
}
|
|
6966
|
+
const title = extractTitle(candidate, doc);
|
|
6967
|
+
const byline = extractByline(candidate);
|
|
6968
|
+
const readingTimeMinutes = estimateReadingTime(wordCount);
|
|
6969
|
+
const topHeading = clone.querySelector("h1, h2");
|
|
6970
|
+
if (topHeading && topHeading.textContent?.trim().toLowerCase() === title.trim().toLowerCase()) {
|
|
6971
|
+
topHeading.remove();
|
|
6972
|
+
}
|
|
6973
|
+
return {
|
|
6974
|
+
title,
|
|
6975
|
+
byline,
|
|
6976
|
+
wordCount,
|
|
6977
|
+
readingTimeMinutes,
|
|
6978
|
+
html: clone.innerHTML.trim(),
|
|
6979
|
+
text
|
|
6980
|
+
};
|
|
6981
|
+
}
|
|
6982
|
+
|
|
6983
|
+
// src/features/ReadingModeController.tsx
|
|
6984
|
+
import { Fragment as Fragment2, jsx as jsx36, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6985
|
+
var FEATURE_KEY23 = "readingMode";
|
|
6986
|
+
var DEFAULT_VALUE23 = false;
|
|
6987
|
+
var emptySubscribe = () => () => {
|
|
6988
|
+
};
|
|
6989
|
+
function useMounted() {
|
|
6990
|
+
return useSyncExternalStore8(
|
|
6991
|
+
emptySubscribe,
|
|
6992
|
+
() => true,
|
|
6993
|
+
() => false
|
|
6994
|
+
);
|
|
6995
|
+
}
|
|
6996
|
+
function ReadingModeController({
|
|
6997
|
+
className = "",
|
|
6998
|
+
label,
|
|
6999
|
+
description,
|
|
7000
|
+
onActivate,
|
|
7001
|
+
onDeactivate,
|
|
7002
|
+
onError
|
|
7003
|
+
} = {}) {
|
|
7004
|
+
const { value, setValue } = useAccessibility(
|
|
7005
|
+
FEATURE_KEY23,
|
|
7006
|
+
DEFAULT_VALUE23
|
|
7007
|
+
);
|
|
7008
|
+
const context = useContext13(AccessibilityContext);
|
|
7009
|
+
const strings = resolveLocaleStrings(context?.locale);
|
|
7010
|
+
const [article, setArticle] = useState10(null);
|
|
7011
|
+
const [statusMessage, setStatusMessage] = useState10(null);
|
|
7012
|
+
const [readerTheme, setReaderTheme] = useState10(
|
|
7013
|
+
"light"
|
|
7014
|
+
);
|
|
7015
|
+
const [readerScale, setReaderScale] = useState10(100);
|
|
7016
|
+
const mounted = useMounted();
|
|
7017
|
+
const triggerRef = useRef8(null);
|
|
7018
|
+
const dialogRef = useRef8(null);
|
|
7019
|
+
const previousActiveElement = useRef8(null);
|
|
7020
|
+
const titleId = useId4();
|
|
7021
|
+
const featureLabel = label ?? strings.features?.readingMode ?? "Reading Mode";
|
|
7022
|
+
const featureDescription = description ?? strings.readingModeDescription ?? "Distraction-free article view";
|
|
7023
|
+
const closeLabel = strings.readingModeClose ?? "Close Reading Mode";
|
|
7024
|
+
const openLabel = strings.readingModeOpen ?? "Open Reading Mode";
|
|
7025
|
+
const failedMessage = strings.readingModeFailed ?? "No readable article content found on this page.";
|
|
7026
|
+
const activeArticle = value ? article : null;
|
|
7027
|
+
const handleClose = () => {
|
|
7028
|
+
setValue(false);
|
|
7029
|
+
setArticle(null);
|
|
7030
|
+
onDeactivate?.();
|
|
7031
|
+
if (previousActiveElement.current) {
|
|
7032
|
+
previousActiveElement.current.focus();
|
|
7033
|
+
} else {
|
|
7034
|
+
triggerRef.current?.focus();
|
|
7035
|
+
}
|
|
7036
|
+
};
|
|
7037
|
+
const handleToggle = () => {
|
|
7038
|
+
if (value) {
|
|
7039
|
+
handleClose();
|
|
7040
|
+
} else {
|
|
7041
|
+
if (typeof document !== "undefined") {
|
|
7042
|
+
previousActiveElement.current = document.activeElement;
|
|
7043
|
+
const extracted = extractArticleContent(document.body);
|
|
7044
|
+
if (extracted) {
|
|
7045
|
+
setArticle(extracted);
|
|
7046
|
+
setStatusMessage(null);
|
|
7047
|
+
setValue(true);
|
|
7048
|
+
onActivate?.(extracted);
|
|
7049
|
+
} else {
|
|
7050
|
+
setValue(false);
|
|
7051
|
+
setArticle(null);
|
|
7052
|
+
setStatusMessage(failedMessage);
|
|
7053
|
+
onError?.(new Error(failedMessage));
|
|
7054
|
+
if (previousActiveElement.current) {
|
|
7055
|
+
previousActiveElement.current.focus();
|
|
7056
|
+
} else {
|
|
7057
|
+
triggerRef.current?.focus();
|
|
7058
|
+
}
|
|
7059
|
+
}
|
|
7060
|
+
}
|
|
7061
|
+
}
|
|
7062
|
+
};
|
|
7063
|
+
const handleCloseRef = useRef8(handleClose);
|
|
7064
|
+
useEffect8(() => {
|
|
7065
|
+
handleCloseRef.current = handleClose;
|
|
7066
|
+
});
|
|
7067
|
+
useEffect8(() => {
|
|
7068
|
+
if (!activeArticle || !dialogRef.current) return;
|
|
7069
|
+
dialogRef.current.focus();
|
|
7070
|
+
const handleKeyDown = (event) => {
|
|
7071
|
+
if (event.key === "Escape") {
|
|
7072
|
+
event.preventDefault();
|
|
7073
|
+
event.stopPropagation();
|
|
7074
|
+
handleCloseRef.current();
|
|
7075
|
+
return;
|
|
7076
|
+
}
|
|
7077
|
+
if (event.key === "Tab") {
|
|
7078
|
+
const dialog = dialogRef.current;
|
|
7079
|
+
if (!dialog) return;
|
|
7080
|
+
const focusable = dialog.querySelectorAll(
|
|
7081
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
7082
|
+
);
|
|
7083
|
+
if (focusable.length === 0) return;
|
|
7084
|
+
const first = focusable[0];
|
|
7085
|
+
const last = focusable[focusable.length - 1];
|
|
7086
|
+
if (event.shiftKey && document.activeElement === first) {
|
|
7087
|
+
event.preventDefault();
|
|
7088
|
+
last.focus();
|
|
7089
|
+
} else if (!event.shiftKey && document.activeElement === last) {
|
|
7090
|
+
event.preventDefault();
|
|
7091
|
+
first.focus();
|
|
7092
|
+
}
|
|
7093
|
+
}
|
|
7094
|
+
};
|
|
7095
|
+
document.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
7096
|
+
return () => {
|
|
7097
|
+
document.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
7098
|
+
};
|
|
7099
|
+
}, [activeArticle]);
|
|
7100
|
+
const handleZoomOut = () => {
|
|
7101
|
+
setReaderScale((prev) => Math.max(90, prev - 15));
|
|
7102
|
+
};
|
|
7103
|
+
const handleZoomIn = () => {
|
|
7104
|
+
setReaderScale((prev) => Math.min(160, prev + 15));
|
|
7105
|
+
};
|
|
7106
|
+
const wordCountDisplay = activeArticle ? strings.formatReadingWords ? strings.formatReadingWords(activeArticle.wordCount) : `${activeArticle.wordCount} words` : "";
|
|
7107
|
+
const readingTimeDisplay = activeArticle ? strings.formatReadingTime ? strings.formatReadingTime(activeArticle.readingTimeMinutes) : `${activeArticle.readingTimeMinutes} min read` : "";
|
|
7108
|
+
const readerDialog = mounted && activeArticle && typeof document !== "undefined" ? createPortal3(
|
|
7109
|
+
/* @__PURE__ */ jsx36(
|
|
7110
|
+
"div",
|
|
7111
|
+
{
|
|
7112
|
+
className: "arap-reading-mode-backdrop",
|
|
7113
|
+
"data-arap-ui": "",
|
|
7114
|
+
"data-theme": readerTheme,
|
|
7115
|
+
onClick: (e) => {
|
|
7116
|
+
if (e.target === e.currentTarget) {
|
|
7117
|
+
handleClose();
|
|
7118
|
+
}
|
|
7119
|
+
},
|
|
7120
|
+
children: /* @__PURE__ */ jsxs34(
|
|
7121
|
+
"div",
|
|
7122
|
+
{
|
|
7123
|
+
ref: dialogRef,
|
|
7124
|
+
className: "arap-reading-mode-dialog",
|
|
7125
|
+
role: "dialog",
|
|
7126
|
+
"aria-modal": "true",
|
|
7127
|
+
"aria-labelledby": titleId,
|
|
7128
|
+
tabIndex: -1,
|
|
7129
|
+
style: { fontSize: `${readerScale}%` },
|
|
7130
|
+
onKeyDown: (e) => {
|
|
7131
|
+
if (e.key === "Escape") {
|
|
7132
|
+
e.stopPropagation();
|
|
7133
|
+
handleClose();
|
|
7134
|
+
}
|
|
7135
|
+
},
|
|
7136
|
+
children: [
|
|
7137
|
+
/* @__PURE__ */ jsxs34("div", { className: "arap-reading-mode-header", children: [
|
|
7138
|
+
/* @__PURE__ */ jsxs34("div", { className: "arap-reading-mode-meta", children: [
|
|
7139
|
+
/* @__PURE__ */ jsx36("span", { className: "arap-reading-mode-badge", "aria-hidden": "true", children: featureLabel }),
|
|
7140
|
+
/* @__PURE__ */ jsx36("span", { className: "arap-reading-mode-stat", children: wordCountDisplay }),
|
|
7141
|
+
/* @__PURE__ */ jsx36(
|
|
7142
|
+
"span",
|
|
7143
|
+
{
|
|
7144
|
+
className: "arap-reading-mode-divider",
|
|
7145
|
+
"aria-hidden": "true",
|
|
7146
|
+
children: "\u2022"
|
|
7147
|
+
}
|
|
7148
|
+
),
|
|
7149
|
+
/* @__PURE__ */ jsx36("span", { className: "arap-reading-mode-stat", children: readingTimeDisplay })
|
|
7150
|
+
] }),
|
|
7151
|
+
/* @__PURE__ */ jsxs34(
|
|
7152
|
+
"div",
|
|
7153
|
+
{
|
|
7154
|
+
className: "arap-reading-mode-toolbar",
|
|
7155
|
+
role: "toolbar",
|
|
7156
|
+
"aria-label": "Reader tools",
|
|
7157
|
+
children: [
|
|
7158
|
+
/* @__PURE__ */ jsxs34(
|
|
7159
|
+
"div",
|
|
7160
|
+
{
|
|
7161
|
+
className: "arap-reading-mode-theme-group",
|
|
7162
|
+
role: "group",
|
|
7163
|
+
"aria-label": "Reader theme",
|
|
7164
|
+
children: [
|
|
7165
|
+
/* @__PURE__ */ jsx36(
|
|
7166
|
+
"button",
|
|
7167
|
+
{
|
|
7168
|
+
type: "button",
|
|
7169
|
+
className: `arap-reader-theme-btn ${readerTheme === "light" ? "arap-active" : ""}`,
|
|
7170
|
+
onClick: () => setReaderTheme("light"),
|
|
7171
|
+
"aria-pressed": readerTheme === "light",
|
|
7172
|
+
"aria-label": "Light theme",
|
|
7173
|
+
children: "Light"
|
|
7174
|
+
}
|
|
7175
|
+
),
|
|
7176
|
+
/* @__PURE__ */ jsx36(
|
|
7177
|
+
"button",
|
|
7178
|
+
{
|
|
7179
|
+
type: "button",
|
|
7180
|
+
className: `arap-reader-theme-btn ${readerTheme === "sepia" ? "arap-active" : ""}`,
|
|
7181
|
+
onClick: () => setReaderTheme("sepia"),
|
|
7182
|
+
"aria-pressed": readerTheme === "sepia",
|
|
7183
|
+
"aria-label": "Sepia theme",
|
|
7184
|
+
children: "Sepia"
|
|
7185
|
+
}
|
|
7186
|
+
),
|
|
7187
|
+
/* @__PURE__ */ jsx36(
|
|
7188
|
+
"button",
|
|
7189
|
+
{
|
|
7190
|
+
type: "button",
|
|
7191
|
+
className: `arap-reader-theme-btn ${readerTheme === "dark" ? "arap-active" : ""}`,
|
|
7192
|
+
onClick: () => setReaderTheme("dark"),
|
|
7193
|
+
"aria-pressed": readerTheme === "dark",
|
|
7194
|
+
"aria-label": "Dark theme",
|
|
7195
|
+
children: "Dark"
|
|
7196
|
+
}
|
|
7197
|
+
)
|
|
7198
|
+
]
|
|
7199
|
+
}
|
|
7200
|
+
),
|
|
7201
|
+
/* @__PURE__ */ jsxs34(
|
|
7202
|
+
"div",
|
|
7203
|
+
{
|
|
7204
|
+
className: "arap-reading-mode-zoom-group",
|
|
7205
|
+
role: "group",
|
|
7206
|
+
"aria-label": "Text zoom",
|
|
7207
|
+
children: [
|
|
7208
|
+
/* @__PURE__ */ jsx36(
|
|
7209
|
+
"button",
|
|
7210
|
+
{
|
|
7211
|
+
type: "button",
|
|
7212
|
+
className: "arap-reader-zoom-btn",
|
|
7213
|
+
onClick: handleZoomOut,
|
|
7214
|
+
"aria-label": "Decrease reader text size",
|
|
7215
|
+
disabled: readerScale <= 90,
|
|
7216
|
+
children: "A-"
|
|
7217
|
+
}
|
|
7218
|
+
),
|
|
7219
|
+
/* @__PURE__ */ jsx36(
|
|
7220
|
+
"button",
|
|
7221
|
+
{
|
|
7222
|
+
type: "button",
|
|
7223
|
+
className: "arap-reader-zoom-btn",
|
|
7224
|
+
onClick: handleZoomIn,
|
|
7225
|
+
"aria-label": "Increase reader text size",
|
|
7226
|
+
disabled: readerScale >= 160,
|
|
7227
|
+
children: "A+"
|
|
7228
|
+
}
|
|
7229
|
+
)
|
|
7230
|
+
]
|
|
7231
|
+
}
|
|
7232
|
+
),
|
|
7233
|
+
/* @__PURE__ */ jsx36(
|
|
7234
|
+
"button",
|
|
7235
|
+
{
|
|
7236
|
+
type: "button",
|
|
7237
|
+
className: "arap-reading-mode-close",
|
|
7238
|
+
onClick: handleClose,
|
|
7239
|
+
"aria-label": closeLabel,
|
|
7240
|
+
title: closeLabel,
|
|
7241
|
+
children: "\xD7"
|
|
7242
|
+
}
|
|
7243
|
+
)
|
|
7244
|
+
]
|
|
7245
|
+
}
|
|
7246
|
+
)
|
|
7247
|
+
] }),
|
|
7248
|
+
/* @__PURE__ */ jsxs34("main", { className: "arap-reading-mode-content", children: [
|
|
7249
|
+
/* @__PURE__ */ jsx36("h1", { id: titleId, className: "arap-reading-mode-title", children: activeArticle.title }),
|
|
7250
|
+
activeArticle.byline && /* @__PURE__ */ jsx36("p", { className: "arap-reading-mode-byline", children: activeArticle.byline }),
|
|
7251
|
+
/* @__PURE__ */ jsx36(
|
|
7252
|
+
"div",
|
|
7253
|
+
{
|
|
7254
|
+
className: "arap-reading-mode-body",
|
|
7255
|
+
dangerouslySetInnerHTML: { __html: activeArticle.html }
|
|
7256
|
+
}
|
|
7257
|
+
)
|
|
7258
|
+
] }),
|
|
7259
|
+
/* @__PURE__ */ jsx36("footer", { className: "arap-reading-mode-footer", children: /* @__PURE__ */ jsx36(
|
|
7260
|
+
"button",
|
|
7261
|
+
{
|
|
7262
|
+
type: "button",
|
|
7263
|
+
className: "arap-reading-mode-exit-btn",
|
|
7264
|
+
onClick: handleClose,
|
|
7265
|
+
children: closeLabel
|
|
7266
|
+
}
|
|
7267
|
+
) })
|
|
7268
|
+
]
|
|
7269
|
+
}
|
|
7270
|
+
)
|
|
7271
|
+
}
|
|
7272
|
+
),
|
|
7273
|
+
document.body
|
|
7274
|
+
) : null;
|
|
7275
|
+
return /* @__PURE__ */ jsxs34(Fragment2, { children: [
|
|
7276
|
+
/* @__PURE__ */ jsxs34(
|
|
7277
|
+
"div",
|
|
7278
|
+
{
|
|
7279
|
+
className: `arap-feature ${className}`,
|
|
7280
|
+
role: "group",
|
|
7281
|
+
"aria-label": featureLabel,
|
|
7282
|
+
children: [
|
|
7283
|
+
/* @__PURE__ */ jsxs34("span", { className: "arap-label", children: [
|
|
7284
|
+
/* @__PURE__ */ jsx36(FeatureIcon, { name: FEATURE_KEY23 }),
|
|
7285
|
+
/* @__PURE__ */ jsx36("span", { children: featureLabel }),
|
|
7286
|
+
/* @__PURE__ */ jsx36("span", { className: "arap-sr-only", children: featureDescription })
|
|
7287
|
+
] }),
|
|
7288
|
+
/* @__PURE__ */ jsx36(
|
|
7289
|
+
"button",
|
|
7290
|
+
{
|
|
7291
|
+
ref: triggerRef,
|
|
7292
|
+
type: "button",
|
|
7293
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
7294
|
+
onClick: handleToggle,
|
|
7295
|
+
"aria-label": value ? closeLabel : openLabel,
|
|
7296
|
+
"aria-pressed": value,
|
|
7297
|
+
title: value ? closeLabel : openLabel,
|
|
7298
|
+
children: /* @__PURE__ */ jsx36("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
7299
|
+
}
|
|
7300
|
+
)
|
|
7301
|
+
]
|
|
7302
|
+
}
|
|
7303
|
+
),
|
|
7304
|
+
statusMessage && /* @__PURE__ */ jsx36(
|
|
7305
|
+
"div",
|
|
7306
|
+
{
|
|
7307
|
+
className: "arap-feature-status",
|
|
7308
|
+
role: "status",
|
|
7309
|
+
"aria-live": "polite",
|
|
7310
|
+
style: { fontSize: "0.85rem", color: "#dc2626", marginTop: "4px" },
|
|
7311
|
+
children: statusMessage
|
|
7312
|
+
}
|
|
7313
|
+
),
|
|
7314
|
+
readerDialog
|
|
7315
|
+
] });
|
|
7316
|
+
}
|
|
7317
|
+
|
|
6683
7318
|
// src/core/controls/ToggleControl.tsx
|
|
6684
|
-
import { jsx as
|
|
7319
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
6685
7320
|
function ToggleControl({
|
|
6686
7321
|
id,
|
|
6687
7322
|
label,
|
|
@@ -6703,12 +7338,12 @@ function ToggleControl({
|
|
|
6703
7338
|
onChange(!checked);
|
|
6704
7339
|
}
|
|
6705
7340
|
};
|
|
6706
|
-
return /* @__PURE__ */
|
|
7341
|
+
return /* @__PURE__ */ jsx37(
|
|
6707
7342
|
"div",
|
|
6708
7343
|
{
|
|
6709
7344
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
6710
7345
|
style,
|
|
6711
|
-
children: /* @__PURE__ */
|
|
7346
|
+
children: /* @__PURE__ */ jsx37(
|
|
6712
7347
|
"button",
|
|
6713
7348
|
{
|
|
6714
7349
|
id,
|
|
@@ -6722,7 +7357,7 @@ function ToggleControl({
|
|
|
6722
7357
|
disabled: !isInteractive,
|
|
6723
7358
|
onClick: handleClick,
|
|
6724
7359
|
title: unavailableReason || description || toggleLabel,
|
|
6725
|
-
children: /* @__PURE__ */
|
|
7360
|
+
children: /* @__PURE__ */ jsx37(
|
|
6726
7361
|
"span",
|
|
6727
7362
|
{
|
|
6728
7363
|
className: "arap-toggle-knob",
|
|
@@ -6738,8 +7373,8 @@ function ToggleControl({
|
|
|
6738
7373
|
}
|
|
6739
7374
|
|
|
6740
7375
|
// src/core/controls/ChoiceControl.tsx
|
|
6741
|
-
import { useCallback as useCallback7, useMemo as useMemo4, useRef as
|
|
6742
|
-
import { jsx as
|
|
7376
|
+
import { useCallback as useCallback7, useMemo as useMemo4, useRef as useRef9 } from "react";
|
|
7377
|
+
import { jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6743
7378
|
function ChoiceControl({
|
|
6744
7379
|
id,
|
|
6745
7380
|
label,
|
|
@@ -6753,7 +7388,7 @@ function ChoiceControl({
|
|
|
6753
7388
|
style,
|
|
6754
7389
|
orientation = "horizontal"
|
|
6755
7390
|
}) {
|
|
6756
|
-
const containerRef =
|
|
7391
|
+
const containerRef = useRef9(null);
|
|
6757
7392
|
const allOptions = useMemo4(
|
|
6758
7393
|
() => groups ? groups.flatMap((g) => g.options) : options || [],
|
|
6759
7394
|
[groups, options]
|
|
@@ -6795,7 +7430,7 @@ function ChoiceControl({
|
|
|
6795
7430
|
const renderOptionButton = (opt) => {
|
|
6796
7431
|
const isSelected = value === opt.value;
|
|
6797
7432
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
6798
|
-
return /* @__PURE__ */
|
|
7433
|
+
return /* @__PURE__ */ jsxs35(
|
|
6799
7434
|
"button",
|
|
6800
7435
|
{
|
|
6801
7436
|
type: "button",
|
|
@@ -6809,15 +7444,15 @@ function ChoiceControl({
|
|
|
6809
7444
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
6810
7445
|
title: opt.description,
|
|
6811
7446
|
children: [
|
|
6812
|
-
isSelected && /* @__PURE__ */
|
|
6813
|
-
/* @__PURE__ */
|
|
6814
|
-
opt.badge && /* @__PURE__ */
|
|
7447
|
+
isSelected && /* @__PURE__ */ jsx38("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
7448
|
+
/* @__PURE__ */ jsx38("span", { children: opt.label }),
|
|
7449
|
+
opt.badge && /* @__PURE__ */ jsx38("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
6815
7450
|
]
|
|
6816
7451
|
},
|
|
6817
7452
|
String(opt.value)
|
|
6818
7453
|
);
|
|
6819
7454
|
};
|
|
6820
|
-
return /* @__PURE__ */
|
|
7455
|
+
return /* @__PURE__ */ jsx38(
|
|
6821
7456
|
"div",
|
|
6822
7457
|
{
|
|
6823
7458
|
ref: containerRef,
|
|
@@ -6828,15 +7463,15 @@ function ChoiceControl({
|
|
|
6828
7463
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
6829
7464
|
style,
|
|
6830
7465
|
onKeyDown: handleKeyDown,
|
|
6831
|
-
children: groups ? groups.map((group) => /* @__PURE__ */
|
|
7466
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ jsxs35(
|
|
6832
7467
|
"div",
|
|
6833
7468
|
{
|
|
6834
7469
|
className: "arap-choice-group",
|
|
6835
7470
|
role: "group",
|
|
6836
7471
|
"aria-label": group.label,
|
|
6837
7472
|
children: [
|
|
6838
|
-
/* @__PURE__ */
|
|
6839
|
-
/* @__PURE__ */
|
|
7473
|
+
/* @__PURE__ */ jsx38("span", { className: "arap-choice-group-title", children: group.label }),
|
|
7474
|
+
/* @__PURE__ */ jsx38("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
6840
7475
|
]
|
|
6841
7476
|
},
|
|
6842
7477
|
group.label
|
|
@@ -6846,7 +7481,7 @@ function ChoiceControl({
|
|
|
6846
7481
|
}
|
|
6847
7482
|
|
|
6848
7483
|
// src/core/controls/StepperControl.tsx
|
|
6849
|
-
import { jsx as
|
|
7484
|
+
import { jsx as jsx39, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6850
7485
|
function StepperControl({
|
|
6851
7486
|
id,
|
|
6852
7487
|
label,
|
|
@@ -6876,15 +7511,15 @@ function StepperControl({
|
|
|
6876
7511
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
6877
7512
|
}
|
|
6878
7513
|
};
|
|
6879
|
-
return /* @__PURE__ */
|
|
7514
|
+
return /* @__PURE__ */ jsxs36(
|
|
6880
7515
|
"div",
|
|
6881
7516
|
{
|
|
6882
7517
|
id,
|
|
6883
7518
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
6884
7519
|
style,
|
|
6885
7520
|
children: [
|
|
6886
|
-
/* @__PURE__ */
|
|
6887
|
-
/* @__PURE__ */
|
|
7521
|
+
/* @__PURE__ */ jsxs36("div", { className: "arap-controls", children: [
|
|
7522
|
+
/* @__PURE__ */ jsx39(
|
|
6888
7523
|
"button",
|
|
6889
7524
|
{
|
|
6890
7525
|
type: "button",
|
|
@@ -6895,8 +7530,8 @@ function StepperControl({
|
|
|
6895
7530
|
children: "\u2212"
|
|
6896
7531
|
}
|
|
6897
7532
|
),
|
|
6898
|
-
/* @__PURE__ */
|
|
6899
|
-
/* @__PURE__ */
|
|
7533
|
+
/* @__PURE__ */ jsx39("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
7534
|
+
/* @__PURE__ */ jsx39(
|
|
6900
7535
|
"button",
|
|
6901
7536
|
{
|
|
6902
7537
|
type: "button",
|
|
@@ -6908,7 +7543,7 @@ function StepperControl({
|
|
|
6908
7543
|
}
|
|
6909
7544
|
)
|
|
6910
7545
|
] }),
|
|
6911
|
-
showSlider && /* @__PURE__ */
|
|
7546
|
+
showSlider && /* @__PURE__ */ jsx39("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx39(
|
|
6912
7547
|
"input",
|
|
6913
7548
|
{
|
|
6914
7549
|
type: "range",
|
|
@@ -6932,7 +7567,7 @@ function StepperControl({
|
|
|
6932
7567
|
}
|
|
6933
7568
|
|
|
6934
7569
|
// src/core/controls/FeatureCard.tsx
|
|
6935
|
-
import { jsx as
|
|
7570
|
+
import { jsx as jsx40, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6936
7571
|
function FeatureCard({
|
|
6937
7572
|
id,
|
|
6938
7573
|
featureKey,
|
|
@@ -6951,7 +7586,7 @@ function FeatureCard({
|
|
|
6951
7586
|
largeControls = false
|
|
6952
7587
|
}) {
|
|
6953
7588
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
6954
|
-
return /* @__PURE__ */
|
|
7589
|
+
return /* @__PURE__ */ jsxs37(
|
|
6955
7590
|
"div",
|
|
6956
7591
|
{
|
|
6957
7592
|
id,
|
|
@@ -6960,27 +7595,27 @@ function FeatureCard({
|
|
|
6960
7595
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
6961
7596
|
style,
|
|
6962
7597
|
children: [
|
|
6963
|
-
/* @__PURE__ */
|
|
6964
|
-
/* @__PURE__ */
|
|
6965
|
-
icon ?? (featureKey ? /* @__PURE__ */
|
|
6966
|
-
/* @__PURE__ */
|
|
7598
|
+
/* @__PURE__ */ jsxs37("div", { className: "arap-card-header", children: [
|
|
7599
|
+
/* @__PURE__ */ jsxs37("span", { className: "arap-label", children: [
|
|
7600
|
+
icon ?? (featureKey ? /* @__PURE__ */ jsx40(FeatureIcon, { name: featureKey }) : null),
|
|
7601
|
+
/* @__PURE__ */ jsx40("span", { className: "arap-card-title", children: title })
|
|
6967
7602
|
] }),
|
|
6968
|
-
statusBadge && /* @__PURE__ */
|
|
7603
|
+
statusBadge && /* @__PURE__ */ jsx40("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
6969
7604
|
] }),
|
|
6970
|
-
description && /* @__PURE__ */
|
|
6971
|
-
status === "error" && errorMessage && /* @__PURE__ */
|
|
6972
|
-
/* @__PURE__ */
|
|
6973
|
-
/* @__PURE__ */
|
|
7605
|
+
description && /* @__PURE__ */ jsx40("p", { className: "arap-card-desc", children: description }),
|
|
7606
|
+
status === "error" && errorMessage && /* @__PURE__ */ jsxs37("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
7607
|
+
/* @__PURE__ */ jsx40("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
7608
|
+
/* @__PURE__ */ jsx40("span", { children: errorMessage })
|
|
6974
7609
|
] }),
|
|
6975
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */
|
|
6976
|
-
/* @__PURE__ */
|
|
6977
|
-
/* @__PURE__ */
|
|
7610
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs37("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
7611
|
+
/* @__PURE__ */ jsx40("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
7612
|
+
/* @__PURE__ */ jsx40("span", { children: unavailableMessage })
|
|
6978
7613
|
] }),
|
|
6979
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */
|
|
6980
|
-
/* @__PURE__ */
|
|
6981
|
-
/* @__PURE__ */
|
|
6982
|
-
/* @__PURE__ */
|
|
6983
|
-
onRequestPermission && /* @__PURE__ */
|
|
7614
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs37("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
7615
|
+
/* @__PURE__ */ jsx40("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
7616
|
+
/* @__PURE__ */ jsxs37("div", { className: "arap-permission-content", children: [
|
|
7617
|
+
/* @__PURE__ */ jsx40("span", { children: permissionMessage }),
|
|
7618
|
+
onRequestPermission && /* @__PURE__ */ jsx40(
|
|
6984
7619
|
"button",
|
|
6985
7620
|
{
|
|
6986
7621
|
type: "button",
|
|
@@ -6991,7 +7626,7 @@ function FeatureCard({
|
|
|
6991
7626
|
)
|
|
6992
7627
|
] })
|
|
6993
7628
|
] }),
|
|
6994
|
-
/* @__PURE__ */
|
|
7629
|
+
/* @__PURE__ */ jsx40("div", { className: "arap-card-content", children })
|
|
6995
7630
|
]
|
|
6996
7631
|
}
|
|
6997
7632
|
);
|
|
@@ -7051,6 +7686,7 @@ export {
|
|
|
7051
7686
|
READING_MASK_HEIGHT_PRESETS,
|
|
7052
7687
|
ReadingGuideController,
|
|
7053
7688
|
ReadingMaskController,
|
|
7689
|
+
ReadingModeController,
|
|
7054
7690
|
ReduceMotionController,
|
|
7055
7691
|
ResetController,
|
|
7056
7692
|
SaturationController,
|
|
@@ -7069,12 +7705,16 @@ export {
|
|
|
7069
7705
|
WordSpacingController,
|
|
7070
7706
|
applyCustomPresetToStore,
|
|
7071
7707
|
applyProfileToStore,
|
|
7708
|
+
countWords,
|
|
7072
7709
|
createCustomPreset,
|
|
7073
7710
|
createInitialPreferencesState,
|
|
7074
7711
|
downloadJsonFile,
|
|
7075
7712
|
enLocale,
|
|
7076
7713
|
enableAccessibleTooltips,
|
|
7714
|
+
estimateReadingTime,
|
|
7077
7715
|
exportPresetsToJson,
|
|
7716
|
+
extractArticleContent,
|
|
7717
|
+
findArticleCandidate,
|
|
7078
7718
|
findMainLandmark,
|
|
7079
7719
|
getAuthoredDescription,
|
|
7080
7720
|
getProfileDefinition,
|