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.js
CHANGED
|
@@ -76,6 +76,7 @@ __export(index_exports, {
|
|
|
76
76
|
READING_MASK_HEIGHT_PRESETS: () => READING_MASK_HEIGHT_PRESETS,
|
|
77
77
|
ReadingGuideController: () => ReadingGuideController,
|
|
78
78
|
ReadingMaskController: () => ReadingMaskController,
|
|
79
|
+
ReadingModeController: () => ReadingModeController,
|
|
79
80
|
ReduceMotionController: () => ReduceMotionController,
|
|
80
81
|
ResetController: () => ResetController,
|
|
81
82
|
SaturationController: () => SaturationController,
|
|
@@ -94,12 +95,16 @@ __export(index_exports, {
|
|
|
94
95
|
WordSpacingController: () => WordSpacingController,
|
|
95
96
|
applyCustomPresetToStore: () => applyCustomPresetToStore,
|
|
96
97
|
applyProfileToStore: () => applyProfileToStore,
|
|
98
|
+
countWords: () => countWords,
|
|
97
99
|
createCustomPreset: () => createCustomPreset,
|
|
98
100
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
99
101
|
downloadJsonFile: () => downloadJsonFile,
|
|
100
102
|
enLocale: () => enLocale,
|
|
101
103
|
enableAccessibleTooltips: () => enableAccessibleTooltips,
|
|
104
|
+
estimateReadingTime: () => estimateReadingTime,
|
|
102
105
|
exportPresetsToJson: () => exportPresetsToJson,
|
|
106
|
+
extractArticleContent: () => extractArticleContent,
|
|
107
|
+
findArticleCandidate: () => findArticleCandidate,
|
|
103
108
|
findMainLandmark: () => findMainLandmark,
|
|
104
109
|
getAuthoredDescription: () => getAuthoredDescription,
|
|
105
110
|
getProfileDefinition: () => getProfileDefinition,
|
|
@@ -168,7 +173,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
168
173
|
}
|
|
169
174
|
|
|
170
175
|
// src/styles/tailwind.css
|
|
171
|
-
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');
|
|
176
|
+
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');
|
|
172
177
|
|
|
173
178
|
// src/core/AccessibilityPlugin.tsx
|
|
174
179
|
var import_react4 = require("react");
|
|
@@ -478,7 +483,8 @@ for (const key of [
|
|
|
478
483
|
"focusHighlight",
|
|
479
484
|
"reduceMotion",
|
|
480
485
|
"tooltips",
|
|
481
|
-
"accessibleTooltips"
|
|
486
|
+
"accessibleTooltips",
|
|
487
|
+
"readingMode"
|
|
482
488
|
]) {
|
|
483
489
|
builtins[key] = {
|
|
484
490
|
defaultValue: false,
|
|
@@ -2209,6 +2215,12 @@ var enLocale = Object.freeze({
|
|
|
2209
2215
|
formatPresetDeleted: (presetName) => `Preset "${presetName}" deleted.`,
|
|
2210
2216
|
decreaseTextSize: "Decrease text size",
|
|
2211
2217
|
increaseTextSize: "Increase text size",
|
|
2218
|
+
readingModeDescription: "Distraction-free article view",
|
|
2219
|
+
readingModeOpen: "Open Reading Mode",
|
|
2220
|
+
readingModeClose: "Close Reading Mode",
|
|
2221
|
+
readingModeFailed: "No readable article content found on this page.",
|
|
2222
|
+
formatReadingWords: (words) => `${words} words`,
|
|
2223
|
+
formatReadingTime: (minutes) => `${minutes} min read`,
|
|
2212
2224
|
features: {
|
|
2213
2225
|
textScale: "Bigger Text",
|
|
2214
2226
|
lineHeight: "Line Height",
|
|
@@ -2284,6 +2296,12 @@ var siLocale = Object.freeze({
|
|
|
2284
2296
|
formatPresetDeleted: (presetName) => `"${presetName}" \u0DB4\u0DD9\u0DBB\u0DC3\u0DD0\u0D9A\u0DC3\u0DD4\u0DB8 \u0D89\u0DC0\u0DAD\u0DCA \u0D9A\u0DBB\u0DB1 \u0DBD\u0DAF\u0DD3.`,
|
|
2285
2297
|
decreaseTextSize: "\u0D85\u0D9A\u0DD4\u0DBB\u0DD4 \u0DB4\u0DCA\u200D\u0DBB\u0DB8\u0DCF\u0DAB\u0DBA \u0D85\u0DA9\u0DD4 \u0D9A\u0DBB\u0DB1\u0DCA\u0DB1",
|
|
2286
2298
|
increaseTextSize: "\u0D85\u0D9A\u0DD4\u0DBB\u0DD4 \u0DB4\u0DCA\u200D\u0DBB\u0DB8\u0DCF\u0DAB\u0DBA \u0DC0\u0DD0\u0DA9\u0DD2 \u0D9A\u0DBB\u0DB1\u0DCA\u0DB1",
|
|
2299
|
+
readingModeDescription: "\u0DB6\u0DCF\u0DB0\u0DCF\u0DC0\u0D9A\u0DD2\u0DB1\u0DCA \u0DAD\u0DDC\u0DBB \u0DBD\u0DD2\u0DB4\u0DD2 \u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8",
|
|
2300
|
+
readingModeOpen: "\u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8\u0DDA \u0DB4\u0DCA\u200D\u0DBB\u0D9A\u0DCF\u0DBB\u0DBA \u0D85\u0DBB\u0DB9\u0DB1\u0DCA\u0DB1",
|
|
2301
|
+
readingModeClose: "\u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8\u0DDA \u0DB4\u0DCA\u200D\u0DBB\u0D9A\u0DCF\u0DBB\u0DBA \u0DC0\u0DC3\u0DB1\u0DCA\u0DB1",
|
|
2302
|
+
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.",
|
|
2303
|
+
formatReadingWords: (words) => `\u0DC0\u0DA0\u0DB1 ${words}\u0D9A\u0DCA`,
|
|
2304
|
+
formatReadingTime: (minutes) => `\u0DB8\u0DD2\u0DB1\u0DD2\u0DAD\u0DCA\u0DAD\u0DD4 ${minutes}\u0D9A \u0D9A\u0DD2\u0DBA\u0DC0\u0DD3\u0DB8\u0D9A\u0DCA`,
|
|
2287
2305
|
features: {
|
|
2288
2306
|
textScale: "\u0DC0\u0DD2\u0DC1\u0DCF\u0DBD \u0D85\u0D9A\u0DD4\u0DBB\u0DD4",
|
|
2289
2307
|
lineHeight: "\u0DB4\u0DDA\u0DC5\u0DD2 \u0DB4\u0DBB\u0DAD\u0DBB\u0DBA",
|
|
@@ -2359,6 +2377,12 @@ var taLocale = Object.freeze({
|
|
|
2359
2377
|
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.`,
|
|
2360
2378
|
decreaseTextSize: "\u0B89\u0BB0\u0BC8 \u0B85\u0BB3\u0BB5\u0BC8\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BC8\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD",
|
|
2361
2379
|
increaseTextSize: "\u0B89\u0BB0\u0BC8 \u0B85\u0BB3\u0BB5\u0BC8 \u0B85\u0BA4\u0BBF\u0B95\u0BB0\u0BBF\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD",
|
|
2380
|
+
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",
|
|
2381
|
+
readingModeOpen: "\u0BB5\u0BBE\u0B9A\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1 \u0BAA\u0BAF\u0BA9\u0BCD\u0BAE\u0BC1\u0BB1\u0BC8\u0BAF\u0BC8\u0BA4\u0BCD \u0BA4\u0BBF\u0BB1",
|
|
2382
|
+
readingModeClose: "\u0BB5\u0BBE\u0B9A\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1 \u0BAA\u0BAF\u0BA9\u0BCD\u0BAE\u0BC1\u0BB1\u0BC8\u0BAF\u0BC8 \u0BAE\u0BC2\u0B9F\u0BC1",
|
|
2383
|
+
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.",
|
|
2384
|
+
formatReadingWords: (words) => `${words} \u0BB5\u0BBE\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC8\u0B95\u0BB3\u0BCD`,
|
|
2385
|
+
formatReadingTime: (minutes) => `${minutes} \u0BA8\u0BBF\u0BAE\u0BBF\u0B9F \u0BB5\u0BBE\u0B9A\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`,
|
|
2362
2386
|
features: {
|
|
2363
2387
|
textScale: "\u0BAA\u0BC6\u0BB0\u0BBF\u0BAF \u0B89\u0BB0\u0BC8",
|
|
2364
2388
|
lineHeight: "\u0BB5\u0BB0\u0BBF \u0B87\u0B9F\u0BC8\u0BB5\u0BC6\u0BB3\u0BBF",
|
|
@@ -3626,6 +3650,10 @@ var drawings = {
|
|
|
3626
3650
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75" })
|
|
3627
3651
|
] }),
|
|
3628
3652
|
presets: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" }) }),
|
|
3653
|
+
readingMode: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
3654
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" }),
|
|
3655
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" })
|
|
3656
|
+
] }),
|
|
3629
3657
|
reset: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 10a9 9 0 1 1 1 7M3 4v6h6" }) })
|
|
3630
3658
|
};
|
|
3631
3659
|
function FeatureIcon({ name }) {
|
|
@@ -6816,8 +6844,613 @@ var CustomPresetsController = PresetsController;
|
|
|
6816
6844
|
var SettingsImportExportController = PresetsController;
|
|
6817
6845
|
var PresetsBackupController = PresetsController;
|
|
6818
6846
|
|
|
6819
|
-
// src/
|
|
6847
|
+
// src/features/ReadingModeController.tsx
|
|
6848
|
+
var import_react24 = require("react");
|
|
6849
|
+
var import_react_dom3 = require("react-dom");
|
|
6850
|
+
|
|
6851
|
+
// src/core/readingMode.ts
|
|
6852
|
+
var EXCLUDED_SELECTORS = [
|
|
6853
|
+
"[data-arap-ui]",
|
|
6854
|
+
"script",
|
|
6855
|
+
"style",
|
|
6856
|
+
"noscript",
|
|
6857
|
+
"template",
|
|
6858
|
+
"iframe",
|
|
6859
|
+
"object",
|
|
6860
|
+
"embed",
|
|
6861
|
+
"canvas",
|
|
6862
|
+
"audio",
|
|
6863
|
+
"video",
|
|
6864
|
+
"form",
|
|
6865
|
+
"input",
|
|
6866
|
+
"select",
|
|
6867
|
+
"textarea",
|
|
6868
|
+
"button",
|
|
6869
|
+
"nav",
|
|
6870
|
+
'[role="navigation"]',
|
|
6871
|
+
"header",
|
|
6872
|
+
'[role="banner"]',
|
|
6873
|
+
"footer",
|
|
6874
|
+
'[role="contentinfo"]',
|
|
6875
|
+
"aside",
|
|
6876
|
+
'[role="complementary"]',
|
|
6877
|
+
'[role="dialog"]',
|
|
6878
|
+
'[role="alertdialog"]',
|
|
6879
|
+
"[aria-modal='true']",
|
|
6880
|
+
"[hidden]",
|
|
6881
|
+
'[aria-hidden="true"]',
|
|
6882
|
+
".ad",
|
|
6883
|
+
".ads",
|
|
6884
|
+
".advertisement",
|
|
6885
|
+
".cookie-banner",
|
|
6886
|
+
".cookie-consent",
|
|
6887
|
+
".social-share",
|
|
6888
|
+
".comments",
|
|
6889
|
+
".sidebar"
|
|
6890
|
+
];
|
|
6891
|
+
var SENSITIVE_SELECTORS = [
|
|
6892
|
+
'input[type="password"]',
|
|
6893
|
+
'input[type="hidden"]',
|
|
6894
|
+
"[data-sensitive]",
|
|
6895
|
+
'[autocomplete*="password"]',
|
|
6896
|
+
'[autocomplete*="cc-"]',
|
|
6897
|
+
'[autocomplete*="credit-card"]'
|
|
6898
|
+
];
|
|
6899
|
+
var ALLOWED_TAGS = /* @__PURE__ */ new Set([
|
|
6900
|
+
"h1",
|
|
6901
|
+
"h2",
|
|
6902
|
+
"h3",
|
|
6903
|
+
"h4",
|
|
6904
|
+
"h5",
|
|
6905
|
+
"h6",
|
|
6906
|
+
"p",
|
|
6907
|
+
"ul",
|
|
6908
|
+
"ol",
|
|
6909
|
+
"li",
|
|
6910
|
+
"blockquote",
|
|
6911
|
+
"pre",
|
|
6912
|
+
"code",
|
|
6913
|
+
"a",
|
|
6914
|
+
"img",
|
|
6915
|
+
"figure",
|
|
6916
|
+
"figcaption",
|
|
6917
|
+
"strong",
|
|
6918
|
+
"em",
|
|
6919
|
+
"b",
|
|
6920
|
+
"i",
|
|
6921
|
+
"mark",
|
|
6922
|
+
"time",
|
|
6923
|
+
"hr",
|
|
6924
|
+
"table",
|
|
6925
|
+
"thead",
|
|
6926
|
+
"tbody",
|
|
6927
|
+
"tr",
|
|
6928
|
+
"th",
|
|
6929
|
+
"td",
|
|
6930
|
+
"div",
|
|
6931
|
+
"section",
|
|
6932
|
+
"article",
|
|
6933
|
+
"span",
|
|
6934
|
+
"br"
|
|
6935
|
+
]);
|
|
6936
|
+
function isSafeUrl(url) {
|
|
6937
|
+
if (!url) return false;
|
|
6938
|
+
const trimmed = url.trim().toLowerCase();
|
|
6939
|
+
if (trimmed.startsWith("javascript:") || trimmed.startsWith("vbscript:")) {
|
|
6940
|
+
return false;
|
|
6941
|
+
}
|
|
6942
|
+
return trimmed.startsWith("http://") || trimmed.startsWith("https://") || trimmed.startsWith("/") || trimmed.startsWith("#") || trimmed.startsWith("./") || trimmed.startsWith("../") || trimmed.startsWith("data:image/");
|
|
6943
|
+
}
|
|
6944
|
+
function countWords(text) {
|
|
6945
|
+
const matches = text.trim().match(/\S+/g);
|
|
6946
|
+
return matches ? matches.length : 0;
|
|
6947
|
+
}
|
|
6948
|
+
function estimateReadingTime(words) {
|
|
6949
|
+
return Math.max(1, Math.ceil(words / 200));
|
|
6950
|
+
}
|
|
6951
|
+
function scoreElement(el) {
|
|
6952
|
+
let score = 0;
|
|
6953
|
+
const tagName = el.tagName.toLowerCase();
|
|
6954
|
+
if (tagName === "article" || el.getAttribute("role") === "article")
|
|
6955
|
+
score += 50;
|
|
6956
|
+
if (tagName === "main" || el.getAttribute("role") === "main") score += 30;
|
|
6957
|
+
if (el.getAttribute("itemprop") === "articleBody") score += 60;
|
|
6958
|
+
if (el.id === "content" || el.id === "article" || el.id === "main-content")
|
|
6959
|
+
score += 20;
|
|
6960
|
+
const paragraphs = el.querySelectorAll("p");
|
|
6961
|
+
score += paragraphs.length * 5;
|
|
6962
|
+
const text = el.textContent || "";
|
|
6963
|
+
const words = countWords(text);
|
|
6964
|
+
score += Math.min(words / 10, 50);
|
|
6965
|
+
const links = el.querySelectorAll("a");
|
|
6966
|
+
let linkTextLength = 0;
|
|
6967
|
+
links.forEach((a) => {
|
|
6968
|
+
linkTextLength += (a.textContent || "").length;
|
|
6969
|
+
});
|
|
6970
|
+
const totalTextLength = text.length;
|
|
6971
|
+
if (totalTextLength > 0) {
|
|
6972
|
+
const linkDensity = linkTextLength / totalTextLength;
|
|
6973
|
+
if (linkDensity > 0.5) {
|
|
6974
|
+
score -= 50;
|
|
6975
|
+
}
|
|
6976
|
+
}
|
|
6977
|
+
return score;
|
|
6978
|
+
}
|
|
6979
|
+
function findArticleCandidate(root) {
|
|
6980
|
+
const articles = Array.from(
|
|
6981
|
+
root.querySelectorAll("article, [role='article']")
|
|
6982
|
+
);
|
|
6983
|
+
const substantiveArticles = articles.filter(
|
|
6984
|
+
(a) => !a.closest("[data-arap-ui]") && (a.textContent?.trim().length ?? 0) >= 60
|
|
6985
|
+
);
|
|
6986
|
+
if (substantiveArticles.length === 1) {
|
|
6987
|
+
return substantiveArticles[0];
|
|
6988
|
+
}
|
|
6989
|
+
const main = root.querySelector("main, [role='main']");
|
|
6990
|
+
if (main && !main.closest("[data-arap-ui]") && (main.textContent?.trim().length ?? 0) >= 60) {
|
|
6991
|
+
const innerArticle = main.querySelector("article");
|
|
6992
|
+
if (innerArticle && (innerArticle.textContent?.trim().length ?? 0) >= 60) {
|
|
6993
|
+
return innerArticle;
|
|
6994
|
+
}
|
|
6995
|
+
return main;
|
|
6996
|
+
}
|
|
6997
|
+
const candidates = Array.from(
|
|
6998
|
+
root.querySelectorAll(
|
|
6999
|
+
"article, section, div.content, div.post, div.entry, #content, #article, div"
|
|
7000
|
+
)
|
|
7001
|
+
).filter((el) => {
|
|
7002
|
+
if (el.closest("[data-arap-ui]")) return false;
|
|
7003
|
+
const text = el.textContent?.trim() || "";
|
|
7004
|
+
return text.length >= 60 && el.querySelectorAll("p").length >= 1;
|
|
7005
|
+
});
|
|
7006
|
+
if (candidates.length === 0) return null;
|
|
7007
|
+
let bestCandidate = null;
|
|
7008
|
+
let highestScore = -1;
|
|
7009
|
+
for (const candidate of candidates) {
|
|
7010
|
+
const score = scoreElement(candidate);
|
|
7011
|
+
if (score > highestScore) {
|
|
7012
|
+
highestScore = score;
|
|
7013
|
+
bestCandidate = candidate;
|
|
7014
|
+
}
|
|
7015
|
+
}
|
|
7016
|
+
return highestScore > 0 ? bestCandidate : null;
|
|
7017
|
+
}
|
|
7018
|
+
function sanitizeClone(node) {
|
|
7019
|
+
for (const selector of SENSITIVE_SELECTORS) {
|
|
7020
|
+
node.querySelectorAll(selector).forEach((el) => el.remove());
|
|
7021
|
+
}
|
|
7022
|
+
for (const selector of EXCLUDED_SELECTORS) {
|
|
7023
|
+
node.querySelectorAll(selector).forEach((el) => el.remove());
|
|
7024
|
+
}
|
|
7025
|
+
const allElements = Array.from(node.querySelectorAll("*"));
|
|
7026
|
+
for (const el of allElements) {
|
|
7027
|
+
const tagName = el.tagName.toLowerCase();
|
|
7028
|
+
if (!ALLOWED_TAGS.has(tagName)) {
|
|
7029
|
+
el.remove();
|
|
7030
|
+
continue;
|
|
7031
|
+
}
|
|
7032
|
+
const attributeNames = Array.from(el.attributes).map((attr) => attr.name);
|
|
7033
|
+
for (const attr of attributeNames) {
|
|
7034
|
+
const lower = attr.toLowerCase();
|
|
7035
|
+
if (lower.startsWith("on") || lower === "style") {
|
|
7036
|
+
el.removeAttribute(attr);
|
|
7037
|
+
} else if (tagName === "a") {
|
|
7038
|
+
if (lower === "href") {
|
|
7039
|
+
const href = el.getAttribute("href") || "";
|
|
7040
|
+
if (!isSafeUrl(href)) {
|
|
7041
|
+
el.removeAttribute("href");
|
|
7042
|
+
} else {
|
|
7043
|
+
el.setAttribute("target", "_blank");
|
|
7044
|
+
el.setAttribute("rel", "noopener noreferrer");
|
|
7045
|
+
}
|
|
7046
|
+
} else if (lower !== "title" && lower !== "id") {
|
|
7047
|
+
el.removeAttribute(attr);
|
|
7048
|
+
}
|
|
7049
|
+
} else if (tagName === "img") {
|
|
7050
|
+
if (lower === "src") {
|
|
7051
|
+
const src = el.getAttribute("src") || "";
|
|
7052
|
+
if (!isSafeUrl(src)) {
|
|
7053
|
+
el.removeAttribute("src");
|
|
7054
|
+
}
|
|
7055
|
+
} else if (lower !== "alt" && lower !== "title" && lower !== "width" && lower !== "height") {
|
|
7056
|
+
el.removeAttribute(attr);
|
|
7057
|
+
}
|
|
7058
|
+
} else if (lower !== "id" && lower !== "lang" && lower !== "dir" && lower !== "class") {
|
|
7059
|
+
el.removeAttribute(attr);
|
|
7060
|
+
}
|
|
7061
|
+
}
|
|
7062
|
+
if (tagName === "img" && !el.hasAttribute("alt")) {
|
|
7063
|
+
el.setAttribute("alt", "");
|
|
7064
|
+
}
|
|
7065
|
+
}
|
|
7066
|
+
}
|
|
7067
|
+
function extractTitle(candidate, doc) {
|
|
7068
|
+
const firstHeading = candidate.querySelector("h1, h2");
|
|
7069
|
+
if (firstHeading && firstHeading.textContent?.trim()) {
|
|
7070
|
+
return firstHeading.textContent.trim();
|
|
7071
|
+
}
|
|
7072
|
+
const docH1 = doc.querySelector("h1");
|
|
7073
|
+
if (docH1 && docH1.textContent?.trim()) {
|
|
7074
|
+
return docH1.textContent.trim();
|
|
7075
|
+
}
|
|
7076
|
+
return doc.title?.trim() || "Article";
|
|
7077
|
+
}
|
|
7078
|
+
function extractByline(candidate) {
|
|
7079
|
+
const bylineEl = candidate.querySelector(
|
|
7080
|
+
"[rel='author'], .byline, .author, time, [itemprop='author'], [itemprop='datePublished']"
|
|
7081
|
+
);
|
|
7082
|
+
if (bylineEl && bylineEl.textContent?.trim()) {
|
|
7083
|
+
return bylineEl.textContent.trim();
|
|
7084
|
+
}
|
|
7085
|
+
return void 0;
|
|
7086
|
+
}
|
|
7087
|
+
function extractArticleContent(root) {
|
|
7088
|
+
if (typeof document === "undefined") return null;
|
|
7089
|
+
const doc = root instanceof Document ? root : root?.ownerDocument || document;
|
|
7090
|
+
const targetRoot = root || doc.body;
|
|
7091
|
+
const candidate = findArticleCandidate(targetRoot);
|
|
7092
|
+
if (!candidate) return null;
|
|
7093
|
+
const clone = candidate.cloneNode(true);
|
|
7094
|
+
sanitizeClone(clone);
|
|
7095
|
+
const text = (clone.textContent || "").trim();
|
|
7096
|
+
const wordCount = countWords(text);
|
|
7097
|
+
if (wordCount < 20 && text.length < 60) {
|
|
7098
|
+
return null;
|
|
7099
|
+
}
|
|
7100
|
+
const title = extractTitle(candidate, doc);
|
|
7101
|
+
const byline = extractByline(candidate);
|
|
7102
|
+
const readingTimeMinutes = estimateReadingTime(wordCount);
|
|
7103
|
+
const topHeading = clone.querySelector("h1, h2");
|
|
7104
|
+
if (topHeading && topHeading.textContent?.trim().toLowerCase() === title.trim().toLowerCase()) {
|
|
7105
|
+
topHeading.remove();
|
|
7106
|
+
}
|
|
7107
|
+
return {
|
|
7108
|
+
title,
|
|
7109
|
+
byline,
|
|
7110
|
+
wordCount,
|
|
7111
|
+
readingTimeMinutes,
|
|
7112
|
+
html: clone.innerHTML.trim(),
|
|
7113
|
+
text
|
|
7114
|
+
};
|
|
7115
|
+
}
|
|
7116
|
+
|
|
7117
|
+
// src/features/ReadingModeController.tsx
|
|
6820
7118
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
7119
|
+
var FEATURE_KEY23 = "readingMode";
|
|
7120
|
+
var DEFAULT_VALUE23 = false;
|
|
7121
|
+
var emptySubscribe = () => () => {
|
|
7122
|
+
};
|
|
7123
|
+
function useMounted() {
|
|
7124
|
+
return (0, import_react24.useSyncExternalStore)(
|
|
7125
|
+
emptySubscribe,
|
|
7126
|
+
() => true,
|
|
7127
|
+
() => false
|
|
7128
|
+
);
|
|
7129
|
+
}
|
|
7130
|
+
function ReadingModeController({
|
|
7131
|
+
className = "",
|
|
7132
|
+
label,
|
|
7133
|
+
description,
|
|
7134
|
+
onActivate,
|
|
7135
|
+
onDeactivate,
|
|
7136
|
+
onError
|
|
7137
|
+
} = {}) {
|
|
7138
|
+
const { value, setValue } = useAccessibility(
|
|
7139
|
+
FEATURE_KEY23,
|
|
7140
|
+
DEFAULT_VALUE23
|
|
7141
|
+
);
|
|
7142
|
+
const context = (0, import_react24.useContext)(AccessibilityContext);
|
|
7143
|
+
const strings = resolveLocaleStrings(context?.locale);
|
|
7144
|
+
const [article, setArticle] = (0, import_react24.useState)(null);
|
|
7145
|
+
const [statusMessage, setStatusMessage] = (0, import_react24.useState)(null);
|
|
7146
|
+
const [readerTheme, setReaderTheme] = (0, import_react24.useState)(
|
|
7147
|
+
"light"
|
|
7148
|
+
);
|
|
7149
|
+
const [readerScale, setReaderScale] = (0, import_react24.useState)(100);
|
|
7150
|
+
const mounted = useMounted();
|
|
7151
|
+
const triggerRef = (0, import_react24.useRef)(null);
|
|
7152
|
+
const dialogRef = (0, import_react24.useRef)(null);
|
|
7153
|
+
const previousActiveElement = (0, import_react24.useRef)(null);
|
|
7154
|
+
const titleId = (0, import_react24.useId)();
|
|
7155
|
+
const featureLabel = label ?? strings.features?.readingMode ?? "Reading Mode";
|
|
7156
|
+
const featureDescription = description ?? strings.readingModeDescription ?? "Distraction-free article view";
|
|
7157
|
+
const closeLabel = strings.readingModeClose ?? "Close Reading Mode";
|
|
7158
|
+
const openLabel = strings.readingModeOpen ?? "Open Reading Mode";
|
|
7159
|
+
const failedMessage = strings.readingModeFailed ?? "No readable article content found on this page.";
|
|
7160
|
+
const activeArticle = value ? article : null;
|
|
7161
|
+
const handleClose = () => {
|
|
7162
|
+
setValue(false);
|
|
7163
|
+
setArticle(null);
|
|
7164
|
+
onDeactivate?.();
|
|
7165
|
+
if (previousActiveElement.current) {
|
|
7166
|
+
previousActiveElement.current.focus();
|
|
7167
|
+
} else {
|
|
7168
|
+
triggerRef.current?.focus();
|
|
7169
|
+
}
|
|
7170
|
+
};
|
|
7171
|
+
const handleToggle = () => {
|
|
7172
|
+
if (value) {
|
|
7173
|
+
handleClose();
|
|
7174
|
+
} else {
|
|
7175
|
+
if (typeof document !== "undefined") {
|
|
7176
|
+
previousActiveElement.current = document.activeElement;
|
|
7177
|
+
const extracted = extractArticleContent(document.body);
|
|
7178
|
+
if (extracted) {
|
|
7179
|
+
setArticle(extracted);
|
|
7180
|
+
setStatusMessage(null);
|
|
7181
|
+
setValue(true);
|
|
7182
|
+
onActivate?.(extracted);
|
|
7183
|
+
} else {
|
|
7184
|
+
setValue(false);
|
|
7185
|
+
setArticle(null);
|
|
7186
|
+
setStatusMessage(failedMessage);
|
|
7187
|
+
onError?.(new Error(failedMessage));
|
|
7188
|
+
if (previousActiveElement.current) {
|
|
7189
|
+
previousActiveElement.current.focus();
|
|
7190
|
+
} else {
|
|
7191
|
+
triggerRef.current?.focus();
|
|
7192
|
+
}
|
|
7193
|
+
}
|
|
7194
|
+
}
|
|
7195
|
+
}
|
|
7196
|
+
};
|
|
7197
|
+
const handleCloseRef = (0, import_react24.useRef)(handleClose);
|
|
7198
|
+
(0, import_react24.useEffect)(() => {
|
|
7199
|
+
handleCloseRef.current = handleClose;
|
|
7200
|
+
});
|
|
7201
|
+
(0, import_react24.useEffect)(() => {
|
|
7202
|
+
if (!activeArticle || !dialogRef.current) return;
|
|
7203
|
+
dialogRef.current.focus();
|
|
7204
|
+
const handleKeyDown = (event) => {
|
|
7205
|
+
if (event.key === "Escape") {
|
|
7206
|
+
event.preventDefault();
|
|
7207
|
+
event.stopPropagation();
|
|
7208
|
+
handleCloseRef.current();
|
|
7209
|
+
return;
|
|
7210
|
+
}
|
|
7211
|
+
if (event.key === "Tab") {
|
|
7212
|
+
const dialog = dialogRef.current;
|
|
7213
|
+
if (!dialog) return;
|
|
7214
|
+
const focusable = dialog.querySelectorAll(
|
|
7215
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
7216
|
+
);
|
|
7217
|
+
if (focusable.length === 0) return;
|
|
7218
|
+
const first = focusable[0];
|
|
7219
|
+
const last = focusable[focusable.length - 1];
|
|
7220
|
+
if (event.shiftKey && document.activeElement === first) {
|
|
7221
|
+
event.preventDefault();
|
|
7222
|
+
last.focus();
|
|
7223
|
+
} else if (!event.shiftKey && document.activeElement === last) {
|
|
7224
|
+
event.preventDefault();
|
|
7225
|
+
first.focus();
|
|
7226
|
+
}
|
|
7227
|
+
}
|
|
7228
|
+
};
|
|
7229
|
+
document.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
7230
|
+
return () => {
|
|
7231
|
+
document.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
7232
|
+
};
|
|
7233
|
+
}, [activeArticle]);
|
|
7234
|
+
const handleZoomOut = () => {
|
|
7235
|
+
setReaderScale((prev) => Math.max(90, prev - 15));
|
|
7236
|
+
};
|
|
7237
|
+
const handleZoomIn = () => {
|
|
7238
|
+
setReaderScale((prev) => Math.min(160, prev + 15));
|
|
7239
|
+
};
|
|
7240
|
+
const wordCountDisplay = activeArticle ? strings.formatReadingWords ? strings.formatReadingWords(activeArticle.wordCount) : `${activeArticle.wordCount} words` : "";
|
|
7241
|
+
const readingTimeDisplay = activeArticle ? strings.formatReadingTime ? strings.formatReadingTime(activeArticle.readingTimeMinutes) : `${activeArticle.readingTimeMinutes} min read` : "";
|
|
7242
|
+
const readerDialog = mounted && activeArticle && typeof document !== "undefined" ? (0, import_react_dom3.createPortal)(
|
|
7243
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7244
|
+
"div",
|
|
7245
|
+
{
|
|
7246
|
+
className: "arap-reading-mode-backdrop",
|
|
7247
|
+
"data-arap-ui": "",
|
|
7248
|
+
"data-theme": readerTheme,
|
|
7249
|
+
onClick: (e) => {
|
|
7250
|
+
if (e.target === e.currentTarget) {
|
|
7251
|
+
handleClose();
|
|
7252
|
+
}
|
|
7253
|
+
},
|
|
7254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
7255
|
+
"div",
|
|
7256
|
+
{
|
|
7257
|
+
ref: dialogRef,
|
|
7258
|
+
className: "arap-reading-mode-dialog",
|
|
7259
|
+
role: "dialog",
|
|
7260
|
+
"aria-modal": "true",
|
|
7261
|
+
"aria-labelledby": titleId,
|
|
7262
|
+
tabIndex: -1,
|
|
7263
|
+
style: { fontSize: `${readerScale}%` },
|
|
7264
|
+
onKeyDown: (e) => {
|
|
7265
|
+
if (e.key === "Escape") {
|
|
7266
|
+
e.stopPropagation();
|
|
7267
|
+
handleClose();
|
|
7268
|
+
}
|
|
7269
|
+
},
|
|
7270
|
+
children: [
|
|
7271
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "arap-reading-mode-header", children: [
|
|
7272
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "arap-reading-mode-meta", children: [
|
|
7273
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "arap-reading-mode-badge", "aria-hidden": "true", children: featureLabel }),
|
|
7274
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "arap-reading-mode-stat", children: wordCountDisplay }),
|
|
7275
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7276
|
+
"span",
|
|
7277
|
+
{
|
|
7278
|
+
className: "arap-reading-mode-divider",
|
|
7279
|
+
"aria-hidden": "true",
|
|
7280
|
+
children: "\u2022"
|
|
7281
|
+
}
|
|
7282
|
+
),
|
|
7283
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "arap-reading-mode-stat", children: readingTimeDisplay })
|
|
7284
|
+
] }),
|
|
7285
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
7286
|
+
"div",
|
|
7287
|
+
{
|
|
7288
|
+
className: "arap-reading-mode-toolbar",
|
|
7289
|
+
role: "toolbar",
|
|
7290
|
+
"aria-label": "Reader tools",
|
|
7291
|
+
children: [
|
|
7292
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
7293
|
+
"div",
|
|
7294
|
+
{
|
|
7295
|
+
className: "arap-reading-mode-theme-group",
|
|
7296
|
+
role: "group",
|
|
7297
|
+
"aria-label": "Reader theme",
|
|
7298
|
+
children: [
|
|
7299
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7300
|
+
"button",
|
|
7301
|
+
{
|
|
7302
|
+
type: "button",
|
|
7303
|
+
className: `arap-reader-theme-btn ${readerTheme === "light" ? "arap-active" : ""}`,
|
|
7304
|
+
onClick: () => setReaderTheme("light"),
|
|
7305
|
+
"aria-pressed": readerTheme === "light",
|
|
7306
|
+
"aria-label": "Light theme",
|
|
7307
|
+
children: "Light"
|
|
7308
|
+
}
|
|
7309
|
+
),
|
|
7310
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7311
|
+
"button",
|
|
7312
|
+
{
|
|
7313
|
+
type: "button",
|
|
7314
|
+
className: `arap-reader-theme-btn ${readerTheme === "sepia" ? "arap-active" : ""}`,
|
|
7315
|
+
onClick: () => setReaderTheme("sepia"),
|
|
7316
|
+
"aria-pressed": readerTheme === "sepia",
|
|
7317
|
+
"aria-label": "Sepia theme",
|
|
7318
|
+
children: "Sepia"
|
|
7319
|
+
}
|
|
7320
|
+
),
|
|
7321
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7322
|
+
"button",
|
|
7323
|
+
{
|
|
7324
|
+
type: "button",
|
|
7325
|
+
className: `arap-reader-theme-btn ${readerTheme === "dark" ? "arap-active" : ""}`,
|
|
7326
|
+
onClick: () => setReaderTheme("dark"),
|
|
7327
|
+
"aria-pressed": readerTheme === "dark",
|
|
7328
|
+
"aria-label": "Dark theme",
|
|
7329
|
+
children: "Dark"
|
|
7330
|
+
}
|
|
7331
|
+
)
|
|
7332
|
+
]
|
|
7333
|
+
}
|
|
7334
|
+
),
|
|
7335
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
7336
|
+
"div",
|
|
7337
|
+
{
|
|
7338
|
+
className: "arap-reading-mode-zoom-group",
|
|
7339
|
+
role: "group",
|
|
7340
|
+
"aria-label": "Text zoom",
|
|
7341
|
+
children: [
|
|
7342
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7343
|
+
"button",
|
|
7344
|
+
{
|
|
7345
|
+
type: "button",
|
|
7346
|
+
className: "arap-reader-zoom-btn",
|
|
7347
|
+
onClick: handleZoomOut,
|
|
7348
|
+
"aria-label": "Decrease reader text size",
|
|
7349
|
+
disabled: readerScale <= 90,
|
|
7350
|
+
children: "A-"
|
|
7351
|
+
}
|
|
7352
|
+
),
|
|
7353
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7354
|
+
"button",
|
|
7355
|
+
{
|
|
7356
|
+
type: "button",
|
|
7357
|
+
className: "arap-reader-zoom-btn",
|
|
7358
|
+
onClick: handleZoomIn,
|
|
7359
|
+
"aria-label": "Increase reader text size",
|
|
7360
|
+
disabled: readerScale >= 160,
|
|
7361
|
+
children: "A+"
|
|
7362
|
+
}
|
|
7363
|
+
)
|
|
7364
|
+
]
|
|
7365
|
+
}
|
|
7366
|
+
),
|
|
7367
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7368
|
+
"button",
|
|
7369
|
+
{
|
|
7370
|
+
type: "button",
|
|
7371
|
+
className: "arap-reading-mode-close",
|
|
7372
|
+
onClick: handleClose,
|
|
7373
|
+
"aria-label": closeLabel,
|
|
7374
|
+
title: closeLabel,
|
|
7375
|
+
children: "\xD7"
|
|
7376
|
+
}
|
|
7377
|
+
)
|
|
7378
|
+
]
|
|
7379
|
+
}
|
|
7380
|
+
)
|
|
7381
|
+
] }),
|
|
7382
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("main", { className: "arap-reading-mode-content", children: [
|
|
7383
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h1", { id: titleId, className: "arap-reading-mode-title", children: activeArticle.title }),
|
|
7384
|
+
activeArticle.byline && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "arap-reading-mode-byline", children: activeArticle.byline }),
|
|
7385
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7386
|
+
"div",
|
|
7387
|
+
{
|
|
7388
|
+
className: "arap-reading-mode-body",
|
|
7389
|
+
dangerouslySetInnerHTML: { __html: activeArticle.html }
|
|
7390
|
+
}
|
|
7391
|
+
)
|
|
7392
|
+
] }),
|
|
7393
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("footer", { className: "arap-reading-mode-footer", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7394
|
+
"button",
|
|
7395
|
+
{
|
|
7396
|
+
type: "button",
|
|
7397
|
+
className: "arap-reading-mode-exit-btn",
|
|
7398
|
+
onClick: handleClose,
|
|
7399
|
+
children: closeLabel
|
|
7400
|
+
}
|
|
7401
|
+
) })
|
|
7402
|
+
]
|
|
7403
|
+
}
|
|
7404
|
+
)
|
|
7405
|
+
}
|
|
7406
|
+
),
|
|
7407
|
+
document.body
|
|
7408
|
+
) : null;
|
|
7409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
7410
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
7411
|
+
"div",
|
|
7412
|
+
{
|
|
7413
|
+
className: `arap-feature ${className}`,
|
|
7414
|
+
role: "group",
|
|
7415
|
+
"aria-label": featureLabel,
|
|
7416
|
+
children: [
|
|
7417
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "arap-label", children: [
|
|
7418
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FeatureIcon, { name: FEATURE_KEY23 }),
|
|
7419
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: featureLabel }),
|
|
7420
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "arap-sr-only", children: featureDescription })
|
|
7421
|
+
] }),
|
|
7422
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7423
|
+
"button",
|
|
7424
|
+
{
|
|
7425
|
+
ref: triggerRef,
|
|
7426
|
+
type: "button",
|
|
7427
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
7428
|
+
onClick: handleToggle,
|
|
7429
|
+
"aria-label": value ? closeLabel : openLabel,
|
|
7430
|
+
"aria-pressed": value,
|
|
7431
|
+
title: value ? closeLabel : openLabel,
|
|
7432
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
7433
|
+
}
|
|
7434
|
+
)
|
|
7435
|
+
]
|
|
7436
|
+
}
|
|
7437
|
+
),
|
|
7438
|
+
statusMessage && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7439
|
+
"div",
|
|
7440
|
+
{
|
|
7441
|
+
className: "arap-feature-status",
|
|
7442
|
+
role: "status",
|
|
7443
|
+
"aria-live": "polite",
|
|
7444
|
+
style: { fontSize: "0.85rem", color: "#dc2626", marginTop: "4px" },
|
|
7445
|
+
children: statusMessage
|
|
7446
|
+
}
|
|
7447
|
+
),
|
|
7448
|
+
readerDialog
|
|
7449
|
+
] });
|
|
7450
|
+
}
|
|
7451
|
+
|
|
7452
|
+
// src/core/controls/ToggleControl.tsx
|
|
7453
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6821
7454
|
function ToggleControl({
|
|
6822
7455
|
id,
|
|
6823
7456
|
label,
|
|
@@ -6839,12 +7472,12 @@ function ToggleControl({
|
|
|
6839
7472
|
onChange(!checked);
|
|
6840
7473
|
}
|
|
6841
7474
|
};
|
|
6842
|
-
return /* @__PURE__ */ (0,
|
|
7475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6843
7476
|
"div",
|
|
6844
7477
|
{
|
|
6845
7478
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
6846
7479
|
style,
|
|
6847
|
-
children: /* @__PURE__ */ (0,
|
|
7480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6848
7481
|
"button",
|
|
6849
7482
|
{
|
|
6850
7483
|
id,
|
|
@@ -6858,7 +7491,7 @@ function ToggleControl({
|
|
|
6858
7491
|
disabled: !isInteractive,
|
|
6859
7492
|
onClick: handleClick,
|
|
6860
7493
|
title: unavailableReason || description || toggleLabel,
|
|
6861
|
-
children: /* @__PURE__ */ (0,
|
|
7494
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6862
7495
|
"span",
|
|
6863
7496
|
{
|
|
6864
7497
|
className: "arap-toggle-knob",
|
|
@@ -6874,8 +7507,8 @@ function ToggleControl({
|
|
|
6874
7507
|
}
|
|
6875
7508
|
|
|
6876
7509
|
// src/core/controls/ChoiceControl.tsx
|
|
6877
|
-
var
|
|
6878
|
-
var
|
|
7510
|
+
var import_react25 = require("react");
|
|
7511
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6879
7512
|
function ChoiceControl({
|
|
6880
7513
|
id,
|
|
6881
7514
|
label,
|
|
@@ -6889,12 +7522,12 @@ function ChoiceControl({
|
|
|
6889
7522
|
style,
|
|
6890
7523
|
orientation = "horizontal"
|
|
6891
7524
|
}) {
|
|
6892
|
-
const containerRef = (0,
|
|
6893
|
-
const allOptions = (0,
|
|
7525
|
+
const containerRef = (0, import_react25.useRef)(null);
|
|
7526
|
+
const allOptions = (0, import_react25.useMemo)(
|
|
6894
7527
|
() => groups ? groups.flatMap((g) => g.options) : options || [],
|
|
6895
7528
|
[groups, options]
|
|
6896
7529
|
);
|
|
6897
|
-
const handleKeyDown = (0,
|
|
7530
|
+
const handleKeyDown = (0, import_react25.useCallback)(
|
|
6898
7531
|
(e) => {
|
|
6899
7532
|
if (disabled || allOptions.length === 0) return;
|
|
6900
7533
|
const enabledOptions = allOptions.filter((opt) => !opt.disabled);
|
|
@@ -6931,7 +7564,7 @@ function ChoiceControl({
|
|
|
6931
7564
|
const renderOptionButton = (opt) => {
|
|
6932
7565
|
const isSelected = value === opt.value;
|
|
6933
7566
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
6934
|
-
return /* @__PURE__ */ (0,
|
|
7567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6935
7568
|
"button",
|
|
6936
7569
|
{
|
|
6937
7570
|
type: "button",
|
|
@@ -6945,15 +7578,15 @@ function ChoiceControl({
|
|
|
6945
7578
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
6946
7579
|
title: opt.description,
|
|
6947
7580
|
children: [
|
|
6948
|
-
isSelected && /* @__PURE__ */ (0,
|
|
6949
|
-
/* @__PURE__ */ (0,
|
|
6950
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
7581
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
7582
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: opt.label }),
|
|
7583
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
6951
7584
|
]
|
|
6952
7585
|
},
|
|
6953
7586
|
String(opt.value)
|
|
6954
7587
|
);
|
|
6955
7588
|
};
|
|
6956
|
-
return /* @__PURE__ */ (0,
|
|
7589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6957
7590
|
"div",
|
|
6958
7591
|
{
|
|
6959
7592
|
ref: containerRef,
|
|
@@ -6964,15 +7597,15 @@ function ChoiceControl({
|
|
|
6964
7597
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
6965
7598
|
style,
|
|
6966
7599
|
onKeyDown: handleKeyDown,
|
|
6967
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
7600
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6968
7601
|
"div",
|
|
6969
7602
|
{
|
|
6970
7603
|
className: "arap-choice-group",
|
|
6971
7604
|
role: "group",
|
|
6972
7605
|
"aria-label": group.label,
|
|
6973
7606
|
children: [
|
|
6974
|
-
/* @__PURE__ */ (0,
|
|
6975
|
-
/* @__PURE__ */ (0,
|
|
7607
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
7608
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
6976
7609
|
]
|
|
6977
7610
|
},
|
|
6978
7611
|
group.label
|
|
@@ -6982,7 +7615,7 @@ function ChoiceControl({
|
|
|
6982
7615
|
}
|
|
6983
7616
|
|
|
6984
7617
|
// src/core/controls/StepperControl.tsx
|
|
6985
|
-
var
|
|
7618
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6986
7619
|
function StepperControl({
|
|
6987
7620
|
id,
|
|
6988
7621
|
label,
|
|
@@ -7012,15 +7645,15 @@ function StepperControl({
|
|
|
7012
7645
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
7013
7646
|
}
|
|
7014
7647
|
};
|
|
7015
|
-
return /* @__PURE__ */ (0,
|
|
7648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
7016
7649
|
"div",
|
|
7017
7650
|
{
|
|
7018
7651
|
id,
|
|
7019
7652
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
7020
7653
|
style,
|
|
7021
7654
|
children: [
|
|
7022
|
-
/* @__PURE__ */ (0,
|
|
7023
|
-
/* @__PURE__ */ (0,
|
|
7655
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "arap-controls", children: [
|
|
7656
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7024
7657
|
"button",
|
|
7025
7658
|
{
|
|
7026
7659
|
type: "button",
|
|
@@ -7031,8 +7664,8 @@ function StepperControl({
|
|
|
7031
7664
|
children: "\u2212"
|
|
7032
7665
|
}
|
|
7033
7666
|
),
|
|
7034
|
-
/* @__PURE__ */ (0,
|
|
7035
|
-
/* @__PURE__ */ (0,
|
|
7667
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
7668
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7036
7669
|
"button",
|
|
7037
7670
|
{
|
|
7038
7671
|
type: "button",
|
|
@@ -7044,7 +7677,7 @@ function StepperControl({
|
|
|
7044
7677
|
}
|
|
7045
7678
|
)
|
|
7046
7679
|
] }),
|
|
7047
|
-
showSlider && /* @__PURE__ */ (0,
|
|
7680
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7048
7681
|
"input",
|
|
7049
7682
|
{
|
|
7050
7683
|
type: "range",
|
|
@@ -7068,7 +7701,7 @@ function StepperControl({
|
|
|
7068
7701
|
}
|
|
7069
7702
|
|
|
7070
7703
|
// src/core/controls/FeatureCard.tsx
|
|
7071
|
-
var
|
|
7704
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
7072
7705
|
function FeatureCard({
|
|
7073
7706
|
id,
|
|
7074
7707
|
featureKey,
|
|
@@ -7087,7 +7720,7 @@ function FeatureCard({
|
|
|
7087
7720
|
largeControls = false
|
|
7088
7721
|
}) {
|
|
7089
7722
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
7090
|
-
return /* @__PURE__ */ (0,
|
|
7723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
7091
7724
|
"div",
|
|
7092
7725
|
{
|
|
7093
7726
|
id,
|
|
@@ -7096,27 +7729,27 @@ function FeatureCard({
|
|
|
7096
7729
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
7097
7730
|
style,
|
|
7098
7731
|
children: [
|
|
7099
|
-
/* @__PURE__ */ (0,
|
|
7100
|
-
/* @__PURE__ */ (0,
|
|
7101
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
7102
|
-
/* @__PURE__ */ (0,
|
|
7732
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "arap-card-header", children: [
|
|
7733
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "arap-label", children: [
|
|
7734
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
7735
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "arap-card-title", children: title })
|
|
7103
7736
|
] }),
|
|
7104
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
7737
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
7105
7738
|
] }),
|
|
7106
|
-
description && /* @__PURE__ */ (0,
|
|
7107
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
7108
|
-
/* @__PURE__ */ (0,
|
|
7109
|
-
/* @__PURE__ */ (0,
|
|
7739
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
7740
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
7741
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
7742
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: errorMessage })
|
|
7110
7743
|
] }),
|
|
7111
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
7112
|
-
/* @__PURE__ */ (0,
|
|
7113
|
-
/* @__PURE__ */ (0,
|
|
7744
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
7745
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
7746
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: unavailableMessage })
|
|
7114
7747
|
] }),
|
|
7115
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
7116
|
-
/* @__PURE__ */ (0,
|
|
7117
|
-
/* @__PURE__ */ (0,
|
|
7118
|
-
/* @__PURE__ */ (0,
|
|
7119
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
7748
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
7749
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
7750
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "arap-permission-content", children: [
|
|
7751
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: permissionMessage }),
|
|
7752
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7120
7753
|
"button",
|
|
7121
7754
|
{
|
|
7122
7755
|
type: "button",
|
|
@@ -7127,7 +7760,7 @@ function FeatureCard({
|
|
|
7127
7760
|
)
|
|
7128
7761
|
] })
|
|
7129
7762
|
] }),
|
|
7130
|
-
/* @__PURE__ */ (0,
|
|
7763
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "arap-card-content", children })
|
|
7131
7764
|
]
|
|
7132
7765
|
}
|
|
7133
7766
|
);
|
|
@@ -7188,6 +7821,7 @@ function FeatureCard({
|
|
|
7188
7821
|
READING_MASK_HEIGHT_PRESETS,
|
|
7189
7822
|
ReadingGuideController,
|
|
7190
7823
|
ReadingMaskController,
|
|
7824
|
+
ReadingModeController,
|
|
7191
7825
|
ReduceMotionController,
|
|
7192
7826
|
ResetController,
|
|
7193
7827
|
SaturationController,
|
|
@@ -7206,12 +7840,16 @@ function FeatureCard({
|
|
|
7206
7840
|
WordSpacingController,
|
|
7207
7841
|
applyCustomPresetToStore,
|
|
7208
7842
|
applyProfileToStore,
|
|
7843
|
+
countWords,
|
|
7209
7844
|
createCustomPreset,
|
|
7210
7845
|
createInitialPreferencesState,
|
|
7211
7846
|
downloadJsonFile,
|
|
7212
7847
|
enLocale,
|
|
7213
7848
|
enableAccessibleTooltips,
|
|
7849
|
+
estimateReadingTime,
|
|
7214
7850
|
exportPresetsToJson,
|
|
7851
|
+
extractArticleContent,
|
|
7852
|
+
findArticleCandidate,
|
|
7215
7853
|
findMainLandmark,
|
|
7216
7854
|
getAuthoredDescription,
|
|
7217
7855
|
getProfileDefinition,
|