accessibility-plugin-react 2.7.0 → 2.8.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 +3 -0
- package/dist/index.d.mts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +514 -354
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +409 -253
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +54 -0
- package/docs/API.md +3 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +1 -1
- package/docs/FEATURES.md +3 -0
- package/docs/LINKS_AND_FOCUS.md +65 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -40,11 +40,13 @@ __export(index_exports, {
|
|
|
40
40
|
FONT_FAMILY_PRESETS: () => FONT_FAMILY_PRESETS,
|
|
41
41
|
FONT_FAMILY_PROTECTED_SELECTOR: () => FONT_FAMILY_PROTECTED_SELECTOR,
|
|
42
42
|
FeatureCard: () => FeatureCard,
|
|
43
|
+
FocusHighlightController: () => FocusHighlightController,
|
|
43
44
|
FontFamilyController: () => FontFamilyController,
|
|
44
45
|
FontSizeController: () => FontSizeController,
|
|
45
46
|
GrayscaleController: () => GrayscaleController,
|
|
46
47
|
HideImagesController: () => HideImagesController,
|
|
47
48
|
HideVideosController: () => HideVideosController,
|
|
49
|
+
HighlightFocusController: () => HighlightFocusController,
|
|
48
50
|
InvertColorsController: () => InvertColorsController,
|
|
49
51
|
LEGIBLE_FONT_STACK: () => LEGIBLE_FONT_STACK,
|
|
50
52
|
LINE_HEIGHT_RATIOS: () => LINE_HEIGHT_RATIOS,
|
|
@@ -60,6 +62,7 @@ __export(index_exports, {
|
|
|
60
62
|
ResetController: () => ResetController,
|
|
61
63
|
SaturationController: () => SaturationController,
|
|
62
64
|
SearchCount: () => SearchCount,
|
|
65
|
+
SkipToMainLink: () => SkipToMainLink,
|
|
63
66
|
StepperControl: () => StepperControl,
|
|
64
67
|
TEXT_ALIGN_BLOCK_SELECTOR: () => TEXT_ALIGN_BLOCK_SELECTOR,
|
|
65
68
|
TEXT_SCALE_PROTECTED_SELECTOR: () => TEXT_SCALE_PROTECTED_SELECTOR,
|
|
@@ -71,6 +74,7 @@ __export(index_exports, {
|
|
|
71
74
|
WordSpacingController: () => WordSpacingController,
|
|
72
75
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
73
76
|
enLocale: () => enLocale,
|
|
77
|
+
findMainLandmark: () => findMainLandmark,
|
|
74
78
|
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
75
79
|
isForcedColorsActive: () => isForcedColorsActive,
|
|
76
80
|
isProtectedFromContrast: () => isProtectedFromContrast,
|
|
@@ -112,7 +116,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
// src/styles/tailwind.css
|
|
115
|
-
styleInject('.arap-root {\n --arap-surface: #fff;\n --arap-text: #111827;\n --arap-muted: #475569;\n --arap-border: #cbd5e1;\n --arap-divider: #e2e8f0;\n --arap-accent: #1d4ed8;\n --arap-accent-hover: #1e40af;\n --arap-selected: #eff6ff;\n --arap-control: #f8fafc;\n color-scheme: light;\n font: 15px/1.5 system-ui, sans-serif;\n color: var(--arap-text);\n text-align: left;\n letter-spacing: normal;\n}\n.arap-root *,\n.arap-root *::before,\n.arap-root *::after {\n box-sizing: border-box;\n}\n.arap-root button {\n font: inherit;\n cursor: pointer;\n color: inherit;\n text-transform: none;\n letter-spacing: normal;\n transition: background-color 0.15s, border-color 0.15s;\n}\n.arap-root button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.arap-root button:focus-visible,\n.arap-panel:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 3px;\n}\n.arap-root .arap-btn {\n position: fixed;\n z-index: 2147483001;\n bottom: max(16px, env(safe-area-inset-bottom));\n right: max(16px, env(safe-area-inset-right));\n width: 56px;\n height: 56px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--arap-surface);\n border-radius: 50%;\n background: var(--arap-accent);\n color: #fff;\n box-shadow: 0 4px 12px #0f172a26, 0 10px 24px #0f172a14;\n}\n.arap-root .arap-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-root .arap-btn[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-position=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-panel {\n position: fixed;\n z-index: 2147483000;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n right: max(16px, env(safe-area-inset-right));\n width: min(400px, calc(100vw - 32px));\n max-height: calc(100vh - 120px);\n max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 20px;\n border: 1px solid var(--arap-divider);\n border-radius: 16px;\n background: var(--arap-surface);\n box-shadow: 0 8px 16px #0f172a0d, 0 20px 48px #0f172a1a;\n}\n.arap-root .arap-panel[hidden] {\n display: none !important;\n}\n.arap-root .arap-panel[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-panel[data-position=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-heading {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n padding-bottom: 18px;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-heading-copy {\n min-width: 0;\n}\n.arap-heading h2 {\n margin: 0;\n font: 700 22px/1.3 system-ui, sans-serif;\n letter-spacing: -0.025em;\n color: var(--arap-text);\n overflow-wrap: anywhere;\n}\n.arap-description {\n margin: 6px 0 0;\n color: var(--arap-muted);\n font: 14px/1.5 system-ui, sans-serif;\n overflow-wrap: anywhere;\n}\n.arap-heading button {\n flex: none;\n width: 44px;\n height: 44px;\n margin-top: -6px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--arap-muted);\n font-size: 28px;\n line-height: 1;\n}\n.arap-heading button:hover {\n background: var(--arap-control);\n border-color: var(--arap-border);\n}\n.arap-feature {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px 12px;\n padding: 18px 0;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-feature:last-child {\n border: 0;\n padding-bottom: 0;\n}\n.arap-label {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.arap-icon {\n flex: none;\n width: 22px;\n height: 22px;\n display: inline-block;\n vertical-align: middle;\n}\n.arap-controls {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--arap-border);\n border-radius: 9px;\n overflow: hidden;\n background: var(--arap-control);\n}\n.arap-root .arap-btn-sm {\n flex: none;\n width: 44px;\n height: 44px;\n border: 0;\n border-radius: 0;\n background: transparent;\n font-size: 22px;\n}\n.arap-root .arap-btn-sm:hover:not(:disabled) {\n background: var(--arap-selected);\n color: var(--arap-accent);\n}\n.arap-root .arap-controls button:focus-visible {\n outline-offset: -4px;\n}\n.arap-value {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 56px;\n padding: 0 6px;\n text-align: center;\n font-weight: 600;\n border-inline: 1px solid var(--arap-divider);\n background: var(--arap-surface);\n}\n.arap-segmented {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.arap-root .arap-segment {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-muted);\n overflow-wrap: anywhere;\n}\n.arap-root .arap-segment:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-root .arap-segment-active {\n background: var(--arap-accent);\n color: #fff;\n border-color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-segment-active:hover {\n background: var(--arap-accent-hover);\n color: #fff;\n}\n.arap-check {\n flex: none;\n font-size: 15px;\n line-height: 1;\n}\n.arap-root .arap-toggle {\n position: relative;\n width: 56px;\n height: 44px;\n padding: 0;\n border: 0;\n border-radius: 10px;\n background: transparent;\n}\n.arap-toggle::before {\n content: "";\n position: absolute;\n inset: 6px 0;\n border: 2px solid #64748b;\n border-radius: 20px;\n background: #e2e8f0;\n}\n.arap-toggle-knob {\n position: absolute;\n top: 10px;\n left: 4px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: #475569;\n pointer-events: none;\n transition: transform 0.15s;\n}\n.arap-toggle-active::before {\n background: var(--arap-accent);\n border-color: var(--arap-accent);\n}\n.arap-toggle-active .arap-toggle-knob {\n transform: translateX(24px);\n background: #fff;\n}\n.arap-toggle-active .arap-toggle-knob::after {\n content: "\\2713";\n display: block;\n color: var(--arap-accent);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n text-align: center;\n}\n.arap-root .arap-toggle:hover::before {\n border-color: var(--arap-accent);\n}\n.arap-feature-reset {\n display: block;\n}\n.arap-root .arap-reset-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 10px;\n border: 1px solid var(--arap-border);\n border-radius: 10px;\n background: var(--arap-control);\n color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-reset-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n@media (max-width: 380px) {\n .arap-root .arap-panel {\n padding: 16px;\n }\n .arap-heading h2 {\n font-size: 20px;\n }\n .arap-feature-stepper {\n grid-template-columns: minmax(0, 1fr);\n }\n .arap-controls {\n width: 100%;\n }\n .arap-value {\n flex: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-root *,\n .arap-root *::before,\n .arap-root *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .arap-root {\n --arap-surface: Canvas;\n --arap-text: CanvasText;\n --arap-muted: CanvasText;\n --arap-border: ButtonText;\n --arap-divider: ButtonText;\n --arap-accent: Highlight;\n --arap-control: Canvas;\n --arap-selected: Canvas;\n }\n .arap-root button[aria-pressed=true] {\n outline: 2px solid Highlight;\n outline-offset: -4px;\n }\n .arap-root .arap-segment-active {\n color: HighlightText;\n background: Highlight;\n }\n .arap-toggle::before {\n border-color: ButtonText;\n background: Canvas;\n }\n .arap-toggle-knob {\n background: ButtonText;\n }\n .arap-toggle-active .arap-toggle-knob {\n background: Highlight;\n }\n .arap-toggle-active .arap-toggle-knob::after {\n color: HighlightText;\n }\n}\n.arap-root .arap-panel {\n display: flex;\n flex-direction: column;\n overflow: visible;\n}\n.arap-heading {\n flex: none;\n}\n.arap-tools {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 0 3px;\n margin: 0 -3px;\n}\n.arap-tools:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: -3px;\n}\n.arap-quick-actions {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 14px;\n margin-top: 8px;\n border-top: 1px solid var(--arap-divider);\n}\n.arap-actions {\n flex: 1;\n min-width: 0;\n}\n.arap-actions:empty {\n display: none;\n}\n.arap-actions .arap-feature-reset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n.arap-root .arap-position-button,\n.arap-root .arap-position-default,\n.arap-root .arap-position-arrows button {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-accent);\n}\n.arap-root .arap-position-button:hover,\n.arap-root .arap-position-default:hover,\n.arap-root .arap-position-arrows button:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-position-popover {\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 0;\n width: 100%;\n max-height: calc(100dvh - 160px);\n overflow: auto;\n padding: 14px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n box-shadow: 0 8px 24px #0f172a26;\n}\n.arap-position-popover[hidden] {\n display: none !important;\n}\n.arap-position-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.arap-position-popover select {\n width: 100%;\n min-height: 44px;\n padding: 8px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n font: inherit;\n color: var(--arap-text);\n background: var(--arap-surface);\n}\n.arap-position-popover select:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-position-arrows {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 10px;\n}\n.arap-position-default {\n width: 100%;\n margin-top: 8px;\n}\n.arap-root .arap-btn[data-draggable=true] {\n touch-action: none;\n user-select: none;\n cursor: grab;\n}\n.arap-root .arap-btn[data-dragging=true] {\n cursor: grabbing;\n}\n.arap-root .arap-btn[data-corner$=left],\n.arap-root .arap-panel[data-corner$=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-corner$=right],\n.arap-root .arap-panel[data-corner$=right] {\n left: auto;\n right: max(16px, env(safe-area-inset-right));\n}\n.arap-root .arap-btn[data-corner^=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-btn[data-corner^=bottom] {\n top: auto;\n bottom: max(16px, env(safe-area-inset-bottom));\n}\n.arap-root .arap-panel[data-corner^=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-root .arap-panel[data-corner^=bottom] {\n top: auto;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n}\n.arap-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.arap-root .arap-skip-actions {\n position: absolute;\n top: 12px;\n left: 20px;\n width: 44px;\n height: 44px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n}\n.arap-root .arap-skip-actions:focus-visible {\n right: 20px;\n width: auto;\n height: auto;\n min-height: 44px;\n clip-path: none;\n pointer-events: auto;\n z-index: 2;\n padding: 8px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-accent);\n}\n@media (max-height: 480px) {\n .arap-root .arap-panel {\n top: max(16px, env(safe-area-inset-top)) !important;\n bottom: max(16px, env(safe-area-inset-bottom)) !important;\n max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;\n padding: 8px;\n }\n .arap-heading {\n padding-bottom: 8px;\n }\n .arap-heading h2 {\n font-size: 18px;\n }\n .arap-heading button {\n margin-top: 0;\n }\n .arap-description {\n display: none;\n }\n .arap-quick-actions {\n padding-top: 8px;\n margin-top: 0;\n }\n .arap-root .arap-reset-btn {\n min-height: 44px;\n }\n .arap-root .arap-btn[data-open=true] {\n visibility: hidden;\n }\n .arap-position-popover {\n max-height: calc(100dvh - 96px);\n }\n}\n.arap-statement {\n flex: none;\n padding-top: 10px;\n text-align: center;\n}\n.arap-statement-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 44px;\n padding: 6px 12px;\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 4px;\n font-size: 14px;\n font-weight: 500;\n border-radius: 8px;\n}\n.arap-statement-link:hover {\n color: var(--arap-accent-hover);\n background: var(--arap-selected);\n}\n.arap-statement-link:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-credits {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 2px;\n padding-top: 8px;\n color: var(--arap-muted);\n text-align: center;\n font-size: 11px;\n line-height: 1.4;\n}\n.arap-credits a {\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.arap-credits a:hover {\n color: var(--arap-accent-hover);\n}\n.arap-credits a:focus-visible {\n outline: 2px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-root .arap-btn[data-large-controls=true] {\n width: 64px;\n height: 64px;\n min-width: 48px;\n min-height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] {\n width: min(440px, calc(100vw - 32px));\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-heading button {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 32px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-btn-sm {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 24px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-value {\n min-width: 64px;\n font-size: 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-segment {\n min-width: 48px;\n min-height: 48px;\n padding: 10px 14px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle {\n width: 64px;\n height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle::before {\n inset: 8px 0;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-knob {\n top: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-active .arap-toggle-knob {\n transform: translateX(28px);\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-reset-btn {\n min-height: 52px;\n font-size: 16px;\n padding: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-button,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-default,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-arrows button {\n min-width: 48px;\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-popover select {\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-statement-link {\n min-height: 48px;\n font-size: 15px;\n padding: 10px 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-skip-actions {\n min-width: 48px;\n min-height: 48px;\n}\n.arap-feature-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n}\n.arap-card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-card-title {\n font-weight: 600;\n font-size: 15px;\n color: var(--arap-text);\n}\n.arap-card-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-status-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 11px;\n font-weight: 600;\n background: var(--arap-control);\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-card-alert {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 1.4;\n}\n.arap-alert-icon {\n flex: none;\n font-size: 16px;\n line-height: 1;\n}\n.arap-card-error {\n background: #fef2f2;\n border: 1px solid #fecaca;\n color: #991b1b;\n}\n.arap-card-unavailable {\n background: #f8fafc;\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n}\n.arap-card-permission {\n background: #fffbeb;\n border: 1px solid #fde68a;\n color: #92400e;\n}\n.arap-permission-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-permission-btn {\n align-self: flex-start;\n padding: 4px 10px;\n border: 1px solid #d97706;\n border-radius: 6px;\n background: #f59e0b;\n color: #fff;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n.arap-permission-btn:hover {\n background: #d97706;\n}\n.arap-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.arap-choice-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n.arap-choice-group-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-choice-badge {\n font-size: 11px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--arap-divider);\n color: var(--arap-muted);\n}\n.arap-segment-active .arap-choice-badge {\n background: rgba(255, 255, 255, 0.25);\n color: #fff;\n}\n.arap-stepper-control-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n}\n.arap-slider-container {\n display: flex;\n align-items: center;\n padding: 4px 0;\n}\n.arap-slider {\n width: 100%;\n accent-color: var(--arap-accent);\n cursor: pointer;\n}\n.arap-search-count {\n padding: 6px 0;\n font-size: 12px;\n font-weight: 500;\n color: var(--arap-muted);\n}\n.arap-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 24px 16px;\n gap: 8px;\n}\n.arap-empty-icon {\n font-size: 32px;\n}\n.arap-empty-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-empty-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n}\n.arap-empty-btn,\n.arap-retry-btn {\n margin-top: 6px;\n padding: 8px 16px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n font-weight: 500;\n font-size: 13px;\n color: var(--arap-text);\n cursor: pointer;\n}\n.arap-empty-btn:hover,\n.arap-retry-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n color: var(--arap-accent);\n}\n.arap-profile-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.arap-profile-card-active {\n border-color: var(--arap-accent);\n background: var(--arap-selected);\n box-shadow: 0 0 0 1px var(--arap-accent);\n}\n.arap-profile-header {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-profile-active-badge {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-accent);\n background: #dbeafe;\n padding: 2px 8px;\n border-radius: 9999px;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-profile-affected {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-profile-affected-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.arap-profile-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--arap-control);\n border: 1px solid var(--arap-divider);\n font-size: 12px;\n color: var(--arap-text);\n}\n.arap-profile-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n.arap-profile-apply-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-apply-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-profile-revert-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-muted);\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-revert-btn:hover {\n background: var(--arap-control);\n color: var(--arap-text);\n border-color: var(--arap-text);\n}\n.arap-notice {\n grid-column: 1 / -1;\n margin-top: 6px;\n padding: 8px 12px;\n border-radius: 8px;\n font-size: 12px;\n line-height: 1.45;\n background: #fefce8;\n border: 1px solid #fef08a;\n color: #854d0e;\n}\n.arap-notice-warning {\n background: #fffbeb;\n border-color: #fde68a;\n color: #92400e;\n}\n');
|
|
119
|
+
styleInject('.arap-root {\n --arap-surface: #fff;\n --arap-text: #111827;\n --arap-muted: #475569;\n --arap-border: #cbd5e1;\n --arap-divider: #e2e8f0;\n --arap-accent: #1d4ed8;\n --arap-accent-hover: #1e40af;\n --arap-selected: #eff6ff;\n --arap-control: #f8fafc;\n color-scheme: light;\n font: 15px/1.5 system-ui, sans-serif;\n color: var(--arap-text);\n text-align: left;\n letter-spacing: normal;\n}\n.arap-root *,\n.arap-root *::before,\n.arap-root *::after {\n box-sizing: border-box;\n}\n.arap-root button {\n font: inherit;\n cursor: pointer;\n color: inherit;\n text-transform: none;\n letter-spacing: normal;\n transition: background-color 0.15s, border-color 0.15s;\n}\n.arap-root button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.arap-root button:focus-visible,\n.arap-panel:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 3px;\n}\n.arap-root .arap-btn {\n position: fixed;\n z-index: 2147483001;\n bottom: max(16px, env(safe-area-inset-bottom));\n right: max(16px, env(safe-area-inset-right));\n width: 56px;\n height: 56px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--arap-surface);\n border-radius: 50%;\n background: var(--arap-accent);\n color: #fff;\n box-shadow: 0 4px 12px #0f172a26, 0 10px 24px #0f172a14;\n}\n.arap-root .arap-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-root .arap-btn[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-position=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-panel {\n position: fixed;\n z-index: 2147483000;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n right: max(16px, env(safe-area-inset-right));\n width: min(400px, calc(100vw - 32px));\n max-height: calc(100vh - 120px);\n max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 20px;\n border: 1px solid var(--arap-divider);\n border-radius: 16px;\n background: var(--arap-surface);\n box-shadow: 0 8px 16px #0f172a0d, 0 20px 48px #0f172a1a;\n}\n.arap-root .arap-panel[hidden] {\n display: none !important;\n}\n.arap-root .arap-panel[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-panel[data-position=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-heading {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n padding-bottom: 18px;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-heading-copy {\n min-width: 0;\n}\n.arap-heading h2 {\n margin: 0;\n font: 700 22px/1.3 system-ui, sans-serif;\n letter-spacing: -0.025em;\n color: var(--arap-text);\n overflow-wrap: anywhere;\n}\n.arap-description {\n margin: 6px 0 0;\n color: var(--arap-muted);\n font: 14px/1.5 system-ui, sans-serif;\n overflow-wrap: anywhere;\n}\n.arap-heading button {\n flex: none;\n width: 44px;\n height: 44px;\n margin-top: -6px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--arap-muted);\n font-size: 28px;\n line-height: 1;\n}\n.arap-heading button:hover {\n background: var(--arap-control);\n border-color: var(--arap-border);\n}\n.arap-feature {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px 12px;\n padding: 18px 0;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-feature:last-child {\n border: 0;\n padding-bottom: 0;\n}\n.arap-label {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.arap-icon {\n flex: none;\n width: 22px;\n height: 22px;\n display: inline-block;\n vertical-align: middle;\n}\n.arap-controls {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--arap-border);\n border-radius: 9px;\n overflow: hidden;\n background: var(--arap-control);\n}\n.arap-root .arap-btn-sm {\n flex: none;\n width: 44px;\n height: 44px;\n border: 0;\n border-radius: 0;\n background: transparent;\n font-size: 22px;\n}\n.arap-root .arap-btn-sm:hover:not(:disabled) {\n background: var(--arap-selected);\n color: var(--arap-accent);\n}\n.arap-root .arap-controls button:focus-visible {\n outline-offset: -4px;\n}\n.arap-value {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 56px;\n padding: 0 6px;\n text-align: center;\n font-weight: 600;\n border-inline: 1px solid var(--arap-divider);\n background: var(--arap-surface);\n}\n.arap-segmented {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.arap-root .arap-segment {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-muted);\n overflow-wrap: anywhere;\n}\n.arap-root .arap-segment:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-root .arap-segment-active {\n background: var(--arap-accent);\n color: #fff;\n border-color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-segment-active:hover {\n background: var(--arap-accent-hover);\n color: #fff;\n}\n.arap-check {\n flex: none;\n font-size: 15px;\n line-height: 1;\n}\n.arap-root .arap-toggle {\n position: relative;\n width: 56px;\n height: 44px;\n padding: 0;\n border: 0;\n border-radius: 10px;\n background: transparent;\n}\n.arap-toggle::before {\n content: "";\n position: absolute;\n inset: 6px 0;\n border: 2px solid #64748b;\n border-radius: 20px;\n background: #e2e8f0;\n}\n.arap-toggle-knob {\n position: absolute;\n top: 10px;\n left: 4px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: #475569;\n pointer-events: none;\n transition: transform 0.15s;\n}\n.arap-toggle-active::before {\n background: var(--arap-accent);\n border-color: var(--arap-accent);\n}\n.arap-toggle-active .arap-toggle-knob {\n transform: translateX(24px);\n background: #fff;\n}\n.arap-toggle-active .arap-toggle-knob::after {\n content: "\\2713";\n display: block;\n color: var(--arap-accent);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n text-align: center;\n}\n.arap-root .arap-toggle:hover::before {\n border-color: var(--arap-accent);\n}\n.arap-feature-reset {\n display: block;\n}\n.arap-root .arap-reset-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 10px;\n border: 1px solid var(--arap-border);\n border-radius: 10px;\n background: var(--arap-control);\n color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-reset-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n@media (max-width: 380px) {\n .arap-root .arap-panel {\n padding: 16px;\n }\n .arap-heading h2 {\n font-size: 20px;\n }\n .arap-feature-stepper {\n grid-template-columns: minmax(0, 1fr);\n }\n .arap-controls {\n width: 100%;\n }\n .arap-value {\n flex: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-root *,\n .arap-root *::before,\n .arap-root *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .arap-root {\n --arap-surface: Canvas;\n --arap-text: CanvasText;\n --arap-muted: CanvasText;\n --arap-border: ButtonText;\n --arap-divider: ButtonText;\n --arap-accent: Highlight;\n --arap-control: Canvas;\n --arap-selected: Canvas;\n }\n .arap-root button[aria-pressed=true] {\n outline: 2px solid Highlight;\n outline-offset: -4px;\n }\n .arap-root .arap-segment-active {\n color: HighlightText;\n background: Highlight;\n }\n .arap-toggle::before {\n border-color: ButtonText;\n background: Canvas;\n }\n .arap-toggle-knob {\n background: ButtonText;\n }\n .arap-toggle-active .arap-toggle-knob {\n background: Highlight;\n }\n .arap-toggle-active .arap-toggle-knob::after {\n color: HighlightText;\n }\n}\n.arap-root .arap-panel {\n display: flex;\n flex-direction: column;\n overflow: visible;\n}\n.arap-heading {\n flex: none;\n}\n.arap-tools {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 0 3px;\n margin: 0 -3px;\n}\n.arap-tools:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: -3px;\n}\n.arap-quick-actions {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 14px;\n margin-top: 8px;\n border-top: 1px solid var(--arap-divider);\n}\n.arap-actions {\n flex: 1;\n min-width: 0;\n}\n.arap-actions:empty {\n display: none;\n}\n.arap-actions .arap-feature-reset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n.arap-root .arap-position-button,\n.arap-root .arap-position-default,\n.arap-root .arap-position-arrows button {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-accent);\n}\n.arap-root .arap-position-button:hover,\n.arap-root .arap-position-default:hover,\n.arap-root .arap-position-arrows button:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-position-popover {\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 0;\n width: 100%;\n max-height: calc(100dvh - 160px);\n overflow: auto;\n padding: 14px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n box-shadow: 0 8px 24px #0f172a26;\n}\n.arap-position-popover[hidden] {\n display: none !important;\n}\n.arap-position-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.arap-position-popover select {\n width: 100%;\n min-height: 44px;\n padding: 8px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n font: inherit;\n color: var(--arap-text);\n background: var(--arap-surface);\n}\n.arap-position-popover select:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-position-arrows {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 10px;\n}\n.arap-position-default {\n width: 100%;\n margin-top: 8px;\n}\n.arap-root .arap-btn[data-draggable=true] {\n touch-action: none;\n user-select: none;\n cursor: grab;\n}\n.arap-root .arap-btn[data-dragging=true] {\n cursor: grabbing;\n}\n.arap-root .arap-btn[data-corner$=left],\n.arap-root .arap-panel[data-corner$=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-corner$=right],\n.arap-root .arap-panel[data-corner$=right] {\n left: auto;\n right: max(16px, env(safe-area-inset-right));\n}\n.arap-root .arap-btn[data-corner^=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-btn[data-corner^=bottom] {\n top: auto;\n bottom: max(16px, env(safe-area-inset-bottom));\n}\n.arap-root .arap-panel[data-corner^=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-root .arap-panel[data-corner^=bottom] {\n top: auto;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n}\n.arap-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.arap-root .arap-skip-actions {\n position: absolute;\n top: 12px;\n left: 20px;\n width: 44px;\n height: 44px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n}\n.arap-root .arap-skip-actions:focus-visible {\n right: 20px;\n width: auto;\n height: auto;\n min-height: 44px;\n clip-path: none;\n pointer-events: auto;\n z-index: 2;\n padding: 8px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-accent);\n}\n.arap-skip-to-main {\n position: fixed;\n top: 12px;\n left: 16px;\n z-index: 2147483647;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n pointer-events: none;\n font-family: inherit;\n font-size: 0.9375rem;\n font-weight: 600;\n text-decoration: none;\n color: var(--arap-accent, #008060);\n background: var(--arap-surface, #ffffff);\n border-radius: 8px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n}\n.arap-skip-to-main:focus,\n.arap-skip-to-main:focus-visible {\n width: auto;\n height: auto;\n min-height: 44px;\n margin: 0;\n padding: 10px 18px;\n clip-path: none;\n overflow: visible;\n white-space: normal;\n pointer-events: auto;\n border: 2px solid var(--arap-accent, #008060);\n outline: 3px solid var(--arap-accent, #008060);\n outline-offset: 3px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n@media (forced-colors: active) {\n .arap-skip-to-main {\n background: Canvas;\n color: CanvasText;\n border-color: Highlight;\n }\n .arap-skip-to-main:focus,\n .arap-skip-to-main:focus-visible {\n outline: 3px solid Highlight;\n }\n}\n@media (max-height: 480px) {\n .arap-root .arap-panel {\n top: max(16px, env(safe-area-inset-top)) !important;\n bottom: max(16px, env(safe-area-inset-bottom)) !important;\n max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;\n padding: 8px;\n }\n .arap-heading {\n padding-bottom: 8px;\n }\n .arap-heading h2 {\n font-size: 18px;\n }\n .arap-heading button {\n margin-top: 0;\n }\n .arap-description {\n display: none;\n }\n .arap-quick-actions {\n padding-top: 8px;\n margin-top: 0;\n }\n .arap-root .arap-reset-btn {\n min-height: 44px;\n }\n .arap-root .arap-btn[data-open=true] {\n visibility: hidden;\n }\n .arap-position-popover {\n max-height: calc(100dvh - 96px);\n }\n}\n.arap-statement {\n flex: none;\n padding-top: 10px;\n text-align: center;\n}\n.arap-statement-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 44px;\n padding: 6px 12px;\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 4px;\n font-size: 14px;\n font-weight: 500;\n border-radius: 8px;\n}\n.arap-statement-link:hover {\n color: var(--arap-accent-hover);\n background: var(--arap-selected);\n}\n.arap-statement-link:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-credits {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 2px;\n padding-top: 8px;\n color: var(--arap-muted);\n text-align: center;\n font-size: 11px;\n line-height: 1.4;\n}\n.arap-credits a {\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.arap-credits a:hover {\n color: var(--arap-accent-hover);\n}\n.arap-credits a:focus-visible {\n outline: 2px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-root .arap-btn[data-large-controls=true] {\n width: 64px;\n height: 64px;\n min-width: 48px;\n min-height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] {\n width: min(440px, calc(100vw - 32px));\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-heading button {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 32px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-btn-sm {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 24px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-value {\n min-width: 64px;\n font-size: 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-segment {\n min-width: 48px;\n min-height: 48px;\n padding: 10px 14px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle {\n width: 64px;\n height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle::before {\n inset: 8px 0;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-knob {\n top: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-active .arap-toggle-knob {\n transform: translateX(28px);\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-reset-btn {\n min-height: 52px;\n font-size: 16px;\n padding: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-button,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-default,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-arrows button {\n min-width: 48px;\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-popover select {\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-statement-link {\n min-height: 48px;\n font-size: 15px;\n padding: 10px 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-skip-actions {\n min-width: 48px;\n min-height: 48px;\n}\n.arap-feature-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n}\n.arap-card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-card-title {\n font-weight: 600;\n font-size: 15px;\n color: var(--arap-text);\n}\n.arap-card-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-status-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 11px;\n font-weight: 600;\n background: var(--arap-control);\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-card-alert {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 1.4;\n}\n.arap-alert-icon {\n flex: none;\n font-size: 16px;\n line-height: 1;\n}\n.arap-card-error {\n background: #fef2f2;\n border: 1px solid #fecaca;\n color: #991b1b;\n}\n.arap-card-unavailable {\n background: #f8fafc;\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n}\n.arap-card-permission {\n background: #fffbeb;\n border: 1px solid #fde68a;\n color: #92400e;\n}\n.arap-permission-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-permission-btn {\n align-self: flex-start;\n padding: 4px 10px;\n border: 1px solid #d97706;\n border-radius: 6px;\n background: #f59e0b;\n color: #fff;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n.arap-permission-btn:hover {\n background: #d97706;\n}\n.arap-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.arap-choice-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n.arap-choice-group-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-choice-badge {\n font-size: 11px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--arap-divider);\n color: var(--arap-muted);\n}\n.arap-segment-active .arap-choice-badge {\n background: rgba(255, 255, 255, 0.25);\n color: #fff;\n}\n.arap-stepper-control-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n}\n.arap-slider-container {\n display: flex;\n align-items: center;\n padding: 4px 0;\n}\n.arap-slider {\n width: 100%;\n accent-color: var(--arap-accent);\n cursor: pointer;\n}\n.arap-search-count {\n padding: 6px 0;\n font-size: 12px;\n font-weight: 500;\n color: var(--arap-muted);\n}\n.arap-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 24px 16px;\n gap: 8px;\n}\n.arap-empty-icon {\n font-size: 32px;\n}\n.arap-empty-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-empty-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n}\n.arap-empty-btn,\n.arap-retry-btn {\n margin-top: 6px;\n padding: 8px 16px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n font-weight: 500;\n font-size: 13px;\n color: var(--arap-text);\n cursor: pointer;\n}\n.arap-empty-btn:hover,\n.arap-retry-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n color: var(--arap-accent);\n}\n.arap-profile-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.arap-profile-card-active {\n border-color: var(--arap-accent);\n background: var(--arap-selected);\n box-shadow: 0 0 0 1px var(--arap-accent);\n}\n.arap-profile-header {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-profile-active-badge {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-accent);\n background: #dbeafe;\n padding: 2px 8px;\n border-radius: 9999px;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-profile-affected {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-profile-affected-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.arap-profile-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--arap-control);\n border: 1px solid var(--arap-divider);\n font-size: 12px;\n color: var(--arap-text);\n}\n.arap-profile-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n.arap-profile-apply-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-apply-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-profile-revert-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-muted);\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-revert-btn:hover {\n background: var(--arap-control);\n color: var(--arap-text);\n border-color: var(--arap-text);\n}\n.arap-notice {\n grid-column: 1 / -1;\n margin-top: 6px;\n padding: 8px 12px;\n border-radius: 8px;\n font-size: 12px;\n line-height: 1.45;\n background: #fefce8;\n border: 1px solid #fef08a;\n color: #854d0e;\n}\n.arap-notice-warning {\n background: #fffbeb;\n border-color: #fde68a;\n color: #92400e;\n}\n');
|
|
116
120
|
|
|
117
121
|
// src/core/AccessibilityPlugin.tsx
|
|
118
122
|
var import_react4 = require("react");
|
|
@@ -404,6 +408,7 @@ var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
|
404
408
|
validate: oneOf(
|
|
405
409
|
false,
|
|
406
410
|
true,
|
|
411
|
+
"underline",
|
|
407
412
|
"yellow-on-black",
|
|
408
413
|
"blue-on-yellow",
|
|
409
414
|
"black-on-white"
|
|
@@ -417,7 +422,9 @@ for (const key of [
|
|
|
417
422
|
"hideVideos",
|
|
418
423
|
"bigCursor",
|
|
419
424
|
"readingMask",
|
|
420
|
-
"readingGuide"
|
|
425
|
+
"readingGuide",
|
|
426
|
+
"highlightFocus",
|
|
427
|
+
"focusHighlight"
|
|
421
428
|
]) {
|
|
422
429
|
builtins[key] = {
|
|
423
430
|
defaultValue: false,
|
|
@@ -1082,6 +1089,40 @@ function applyPage(values) {
|
|
|
1082
1089
|
}
|
|
1083
1090
|
}
|
|
1084
1091
|
}
|
|
1092
|
+
if (values.highlightFocus || values.focusHighlight) {
|
|
1093
|
+
const FOCUS_STYLE_ID = "arap-focus-highlight-style";
|
|
1094
|
+
let styleEl = document.getElementById(
|
|
1095
|
+
FOCUS_STYLE_ID
|
|
1096
|
+
);
|
|
1097
|
+
if (!styleEl) {
|
|
1098
|
+
styleEl = document.createElement("style");
|
|
1099
|
+
styleEl.id = FOCUS_STYLE_ID;
|
|
1100
|
+
styleEl.dataset.arapUi = "";
|
|
1101
|
+
styleEl.textContent = `
|
|
1102
|
+
*:not([data-arap-ui]):not([data-arap-ui] *):focus-visible {
|
|
1103
|
+
outline: 3px solid #2563eb !important;
|
|
1104
|
+
outline-offset: 3px !important;
|
|
1105
|
+
box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9) !important;
|
|
1106
|
+
}
|
|
1107
|
+
@media (forced-colors: active) {
|
|
1108
|
+
*:not([data-arap-ui]):not([data-arap-ui] *):focus-visible {
|
|
1109
|
+
outline: 3px solid Highlight !important;
|
|
1110
|
+
outline-offset: 3px !important;
|
|
1111
|
+
box-shadow: none !important;
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
*:disabled:focus-visible,
|
|
1115
|
+
*[aria-disabled="true"]:focus-visible {
|
|
1116
|
+
outline: none !important;
|
|
1117
|
+
box-shadow: none !important;
|
|
1118
|
+
}
|
|
1119
|
+
`;
|
|
1120
|
+
document.head.appendChild(styleEl);
|
|
1121
|
+
undo.push(() => {
|
|
1122
|
+
styleEl?.remove();
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1085
1126
|
for (const el of elements) {
|
|
1086
1127
|
if (values.bigCursor) set(el, "cursor", cursor);
|
|
1087
1128
|
if (values.hideImages) {
|
|
@@ -1097,14 +1138,26 @@ function applyPage(values) {
|
|
|
1097
1138
|
set(el, "color", colors[0]);
|
|
1098
1139
|
set(el, "background-color", colors[1]);
|
|
1099
1140
|
}
|
|
1100
|
-
if (values.linkHighlight && el.matches("a[href]")) {
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1141
|
+
if (values.linkHighlight && el.matches("a[href]") && !el.closest("[data-arap-ui]")) {
|
|
1142
|
+
const isDisabled = el.getAttribute("aria-disabled") === "true" || el.hasAttribute("disabled") || el.classList.contains("disabled");
|
|
1143
|
+
if (!isDisabled) {
|
|
1144
|
+
if (isForcedColorsActive()) {
|
|
1145
|
+
set(el, "color", "LinkText");
|
|
1146
|
+
set(el, "text-decoration", "underline");
|
|
1147
|
+
set(el, "text-decoration-thickness", "2px");
|
|
1148
|
+
set(el, "text-underline-offset", "3px");
|
|
1149
|
+
} else {
|
|
1150
|
+
const colors2 = palette[String(values.linkHighlight)] ?? [
|
|
1151
|
+
"#111827",
|
|
1152
|
+
"#fef08a"
|
|
1153
|
+
];
|
|
1154
|
+
set(el, "color", colors2[0]);
|
|
1155
|
+
set(el, "background-color", colors2[1]);
|
|
1156
|
+
set(el, "text-decoration", "underline");
|
|
1157
|
+
set(el, "text-decoration-thickness", "2px");
|
|
1158
|
+
set(el, "text-underline-offset", "3px");
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1108
1161
|
}
|
|
1109
1162
|
}
|
|
1110
1163
|
return () => {
|
|
@@ -1367,7 +1420,7 @@ function AccessibilityPlugin({
|
|
|
1367
1420
|
}
|
|
1368
1421
|
|
|
1369
1422
|
// src/core/AccessibilityButton.tsx
|
|
1370
|
-
var
|
|
1423
|
+
var import_react7 = require("react");
|
|
1371
1424
|
|
|
1372
1425
|
// src/core/WidgetPortal.tsx
|
|
1373
1426
|
var import_react5 = require("react");
|
|
@@ -1389,12 +1442,16 @@ function WidgetPortal({ children }) {
|
|
|
1389
1442
|
) : null;
|
|
1390
1443
|
}
|
|
1391
1444
|
|
|
1445
|
+
// src/core/SkipToMainLink.tsx
|
|
1446
|
+
var import_react6 = require("react");
|
|
1447
|
+
|
|
1392
1448
|
// src/core/i18n/en.ts
|
|
1393
1449
|
var enLocale = Object.freeze({
|
|
1394
1450
|
title: "Accessibility settings",
|
|
1395
1451
|
description: "Adjust your reading experience",
|
|
1396
1452
|
closeLabel: "Close accessibility settings",
|
|
1397
1453
|
skipToActions: "Jump to quick actions",
|
|
1454
|
+
skipToMain: "Skip to main content",
|
|
1398
1455
|
toolsLabel: "Accessibility tools",
|
|
1399
1456
|
quickActionsLabel: "Quick actions",
|
|
1400
1457
|
resetLabel: "Reset all accessibility settings",
|
|
@@ -1460,8 +1517,69 @@ function resolveLocaleStrings(localeProp) {
|
|
|
1460
1517
|
return enLocale;
|
|
1461
1518
|
}
|
|
1462
1519
|
|
|
1463
|
-
// src/core/
|
|
1520
|
+
// src/core/SkipToMainLink.tsx
|
|
1464
1521
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1522
|
+
function findMainLandmark() {
|
|
1523
|
+
if (typeof document === "undefined") return null;
|
|
1524
|
+
const main = document.querySelector("main, [role='main']");
|
|
1525
|
+
return main instanceof HTMLElement ? main : null;
|
|
1526
|
+
}
|
|
1527
|
+
function subscribeLandmark(callback) {
|
|
1528
|
+
if (typeof MutationObserver === "undefined" || typeof document === "undefined" || !document.body) {
|
|
1529
|
+
return () => {
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
const observer = new MutationObserver(callback);
|
|
1533
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
1534
|
+
return () => observer.disconnect();
|
|
1535
|
+
}
|
|
1536
|
+
function getMainTargetId() {
|
|
1537
|
+
if (typeof document === "undefined") return null;
|
|
1538
|
+
const main = findMainLandmark();
|
|
1539
|
+
if (main) {
|
|
1540
|
+
if (!main.id) {
|
|
1541
|
+
main.id = "arap-main-content";
|
|
1542
|
+
}
|
|
1543
|
+
if (!main.hasAttribute("tabindex")) {
|
|
1544
|
+
main.setAttribute("tabindex", "-1");
|
|
1545
|
+
}
|
|
1546
|
+
return main.id;
|
|
1547
|
+
}
|
|
1548
|
+
return null;
|
|
1549
|
+
}
|
|
1550
|
+
function SkipToMainLink({ className = "", label }) {
|
|
1551
|
+
const ctx = (0, import_react6.useContext)(AccessibilityContext);
|
|
1552
|
+
const strings = resolveLocaleStrings(ctx?.locale);
|
|
1553
|
+
const text = label ?? strings.skipToMain ?? "Skip to main content";
|
|
1554
|
+
const targetId = (0, import_react6.useSyncExternalStore)(
|
|
1555
|
+
subscribeLandmark,
|
|
1556
|
+
getMainTargetId,
|
|
1557
|
+
() => null
|
|
1558
|
+
);
|
|
1559
|
+
if (!targetId) return null;
|
|
1560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1561
|
+
"a",
|
|
1562
|
+
{
|
|
1563
|
+
href: `#${targetId}`,
|
|
1564
|
+
className: `arap-skip-to-main ${className}`,
|
|
1565
|
+
onClick: (e) => {
|
|
1566
|
+
const main = document.getElementById(targetId);
|
|
1567
|
+
if (main) {
|
|
1568
|
+
e.preventDefault();
|
|
1569
|
+
if (!main.hasAttribute("tabindex")) {
|
|
1570
|
+
main.setAttribute("tabindex", "-1");
|
|
1571
|
+
}
|
|
1572
|
+
main.focus();
|
|
1573
|
+
main.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
1574
|
+
}
|
|
1575
|
+
},
|
|
1576
|
+
children: text
|
|
1577
|
+
}
|
|
1578
|
+
);
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
// src/core/AccessibilityButton.tsx
|
|
1582
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1465
1583
|
function AccessibilityButton({
|
|
1466
1584
|
icon,
|
|
1467
1585
|
draggable = true,
|
|
@@ -1471,7 +1589,7 @@ function AccessibilityButton({
|
|
|
1471
1589
|
style,
|
|
1472
1590
|
largeControls
|
|
1473
1591
|
}) {
|
|
1474
|
-
const ctx = (0,
|
|
1592
|
+
const ctx = (0, import_react7.useContext)(AccessibilityContext);
|
|
1475
1593
|
if (!ctx)
|
|
1476
1594
|
throw new Error(
|
|
1477
1595
|
"AccessibilityButton must be used within an <AccessibilityPlugin> provider."
|
|
@@ -1481,13 +1599,14 @@ function AccessibilityButton({
|
|
|
1481
1599
|
const isLarge = largeControls ?? ctx.largeControls ?? false;
|
|
1482
1600
|
const viewport = useViewport();
|
|
1483
1601
|
const triggerSize = useTriggerSize(`${ctx.panelId}-trigger`);
|
|
1484
|
-
const [preview, setPreview] = (0,
|
|
1485
|
-
const drag = (0,
|
|
1486
|
-
const suppressClick = (0,
|
|
1602
|
+
const [preview, setPreview] = (0, import_react7.useState)(null);
|
|
1603
|
+
const drag = (0, import_react7.useRef)(null);
|
|
1604
|
+
const suppressClick = (0, import_react7.useRef)(false);
|
|
1487
1605
|
const placement = preview ?? ctx.widgetPlacement;
|
|
1488
1606
|
const corner = placement?.kind === "corner" ? placement.corner : defaultCorner(ctx.position);
|
|
1489
|
-
return /* @__PURE__ */ (0,
|
|
1490
|
-
/* @__PURE__ */ (0,
|
|
1607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(WidgetPortal, { children: [
|
|
1608
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkipToMainLink, {}),
|
|
1609
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1491
1610
|
"button",
|
|
1492
1611
|
{
|
|
1493
1612
|
type: "button",
|
|
@@ -1585,7 +1704,7 @@ function AccessibilityButton({
|
|
|
1585
1704
|
"aria-expanded": ctx.isOpen,
|
|
1586
1705
|
"aria-controls": ctx.panelId,
|
|
1587
1706
|
children: [
|
|
1588
|
-
/* @__PURE__ */ (0,
|
|
1707
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": "true", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1589
1708
|
"svg",
|
|
1590
1709
|
{
|
|
1591
1710
|
width: "28",
|
|
@@ -1595,19 +1714,19 @@ function AccessibilityButton({
|
|
|
1595
1714
|
stroke: "currentColor",
|
|
1596
1715
|
strokeWidth: "2",
|
|
1597
1716
|
children: [
|
|
1598
|
-
/* @__PURE__ */ (0,
|
|
1599
|
-
/* @__PURE__ */ (0,
|
|
1717
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "4", r: "2" }),
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M4 9l8 2 8-2M12 11v5m0 0-5 6m5-6 5 6" })
|
|
1600
1719
|
]
|
|
1601
1720
|
}
|
|
1602
1721
|
) }),
|
|
1603
|
-
(description || draggable) && /* @__PURE__ */ (0,
|
|
1722
|
+
(description || draggable) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { id: `${ctx.panelId}-trigger-description`, hidden: true, children: [
|
|
1604
1723
|
description ? `${description} ` : "",
|
|
1605
1724
|
draggable && strings.dragHelp
|
|
1606
1725
|
] })
|
|
1607
1726
|
]
|
|
1608
1727
|
}
|
|
1609
1728
|
),
|
|
1610
|
-
/* @__PURE__ */ (0,
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "arap-sr-only", role: "status", children: ctx.widgetPlacement?.kind === "point" ? strings.formatPointPosition ? strings.formatPointPosition(
|
|
1611
1730
|
ctx.widgetPlacement.x,
|
|
1612
1731
|
ctx.widgetPlacement.y
|
|
1613
1732
|
) : `Button position: ${Math.round(ctx.widgetPlacement.x * 100)}% horizontally, ${Math.round(ctx.widgetPlacement.y * 100)}% vertically.` : strings.formatCornerPosition ? strings.formatCornerPosition(corner) : `Button position: ${corner.split("-").join(" ")}.` })
|
|
@@ -1615,22 +1734,22 @@ function AccessibilityButton({
|
|
|
1615
1734
|
}
|
|
1616
1735
|
|
|
1617
1736
|
// src/core/AccessibilityList.tsx
|
|
1618
|
-
var
|
|
1737
|
+
var import_react10 = require("react");
|
|
1619
1738
|
|
|
1620
1739
|
// src/core/PanelActionsContext.ts
|
|
1621
|
-
var
|
|
1622
|
-
var PanelActionsContext = (0,
|
|
1740
|
+
var import_react8 = require("react");
|
|
1741
|
+
var PanelActionsContext = (0, import_react8.createContext)(null);
|
|
1623
1742
|
|
|
1624
1743
|
// src/core/PositionControls.tsx
|
|
1625
|
-
var
|
|
1626
|
-
var
|
|
1744
|
+
var import_react9 = require("react");
|
|
1745
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1627
1746
|
function PositionControls() {
|
|
1628
|
-
const ctx = (0,
|
|
1747
|
+
const ctx = (0, import_react9.useContext)(AccessibilityContext);
|
|
1629
1748
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
1630
|
-
const [open, setOpen] = (0,
|
|
1631
|
-
const select = (0,
|
|
1632
|
-
const opener = (0,
|
|
1633
|
-
(0,
|
|
1749
|
+
const [open, setOpen] = (0, import_react9.useState)(false);
|
|
1750
|
+
const select = (0, import_react9.useRef)(null);
|
|
1751
|
+
const opener = (0, import_react9.useRef)(null);
|
|
1752
|
+
(0, import_react9.useEffect)(() => {
|
|
1634
1753
|
if (open) select.current?.focus();
|
|
1635
1754
|
}, [open]);
|
|
1636
1755
|
const close = () => {
|
|
@@ -1645,8 +1764,8 @@ function PositionControls() {
|
|
|
1645
1764
|
pointFromPixels(rect.left + dx, rect.top + dy, rect.width, rect.height)
|
|
1646
1765
|
);
|
|
1647
1766
|
};
|
|
1648
|
-
return /* @__PURE__ */ (0,
|
|
1649
|
-
/* @__PURE__ */ (0,
|
|
1767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "arap-position-tools", children: [
|
|
1768
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1650
1769
|
"button",
|
|
1651
1770
|
{
|
|
1652
1771
|
ref: opener,
|
|
@@ -1661,7 +1780,7 @@ function PositionControls() {
|
|
|
1661
1780
|
children: strings.moveButton
|
|
1662
1781
|
}
|
|
1663
1782
|
),
|
|
1664
|
-
/* @__PURE__ */ (0,
|
|
1783
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1665
1784
|
"div",
|
|
1666
1785
|
{
|
|
1667
1786
|
id: `${ctx.panelId}-position`,
|
|
@@ -1676,7 +1795,7 @@ function PositionControls() {
|
|
|
1676
1795
|
}
|
|
1677
1796
|
},
|
|
1678
1797
|
children: [
|
|
1679
|
-
/* @__PURE__ */ (0,
|
|
1798
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1680
1799
|
"label",
|
|
1681
1800
|
{
|
|
1682
1801
|
className: "arap-position-label",
|
|
@@ -1684,7 +1803,7 @@ function PositionControls() {
|
|
|
1684
1803
|
children: strings.positionLabel
|
|
1685
1804
|
}
|
|
1686
1805
|
),
|
|
1687
|
-
/* @__PURE__ */ (0,
|
|
1806
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1688
1807
|
"select",
|
|
1689
1808
|
{
|
|
1690
1809
|
ref: select,
|
|
@@ -1696,17 +1815,17 @@ function PositionControls() {
|
|
|
1696
1815
|
corner: event.target.value
|
|
1697
1816
|
}),
|
|
1698
1817
|
children: [
|
|
1699
|
-
/* @__PURE__ */ (0,
|
|
1700
|
-
corners.map((corner) => /* @__PURE__ */ (0,
|
|
1818
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "custom", disabled: true, children: strings.customPosition }),
|
|
1819
|
+
corners.map((corner) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: corner, children: corner.split("-").join(" ") }, corner))
|
|
1701
1820
|
]
|
|
1702
1821
|
}
|
|
1703
1822
|
),
|
|
1704
|
-
/* @__PURE__ */ (0,
|
|
1823
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "arap-position-arrows", children: [
|
|
1705
1824
|
["left", -20, 0, "\u2190", strings.moveLeft],
|
|
1706
1825
|
["up", 0, -20, "\u2191", strings.moveUp],
|
|
1707
1826
|
["down", 0, 20, "\u2193", strings.moveDown],
|
|
1708
1827
|
["right", 20, 0, "\u2192", strings.moveRight]
|
|
1709
|
-
].map(([direction, dx, dy, arrowChar, label]) => /* @__PURE__ */ (0,
|
|
1828
|
+
].map(([direction, dx, dy, arrowChar, label]) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1710
1829
|
"button",
|
|
1711
1830
|
{
|
|
1712
1831
|
type: "button",
|
|
@@ -1719,7 +1838,7 @@ function PositionControls() {
|
|
|
1719
1838
|
},
|
|
1720
1839
|
direction
|
|
1721
1840
|
)) }),
|
|
1722
|
-
/* @__PURE__ */ (0,
|
|
1841
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1723
1842
|
"button",
|
|
1724
1843
|
{
|
|
1725
1844
|
className: "arap-position-default",
|
|
@@ -1731,7 +1850,7 @@ function PositionControls() {
|
|
|
1731
1850
|
children: strings.resetPosition
|
|
1732
1851
|
}
|
|
1733
1852
|
),
|
|
1734
|
-
/* @__PURE__ */ (0,
|
|
1853
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { className: "arap-position-default", type: "button", onClick: close, children: strings.doneMoving })
|
|
1735
1854
|
]
|
|
1736
1855
|
}
|
|
1737
1856
|
)
|
|
@@ -1739,7 +1858,7 @@ function PositionControls() {
|
|
|
1739
1858
|
}
|
|
1740
1859
|
|
|
1741
1860
|
// src/core/AccessibilityList.tsx
|
|
1742
|
-
var
|
|
1861
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1743
1862
|
function Panel({
|
|
1744
1863
|
children,
|
|
1745
1864
|
footer,
|
|
@@ -1752,7 +1871,7 @@ function Panel({
|
|
|
1752
1871
|
largeControls,
|
|
1753
1872
|
locale
|
|
1754
1873
|
}) {
|
|
1755
|
-
const ctx = (0,
|
|
1874
|
+
const ctx = (0, import_react10.useContext)(AccessibilityContext);
|
|
1756
1875
|
const effectiveLocale = locale ?? ctx.locale;
|
|
1757
1876
|
const strings = resolveLocaleStrings(effectiveLocale);
|
|
1758
1877
|
const panelTitle = title ?? strings.title;
|
|
@@ -1761,13 +1880,13 @@ function Panel({
|
|
|
1761
1880
|
const effectiveStatementUrl = statementUrl ?? ctx.statementUrl;
|
|
1762
1881
|
const isLarge = largeControls ?? ctx.largeControls ?? false;
|
|
1763
1882
|
const isRtl = isRtlLocale(effectiveLocale);
|
|
1764
|
-
const panel = (0,
|
|
1765
|
-
const [actions, setActions] = (0,
|
|
1883
|
+
const panel = (0, import_react10.useRef)(null);
|
|
1884
|
+
const [actions, setActions] = (0, import_react10.useState)(null);
|
|
1766
1885
|
const viewport = useViewport();
|
|
1767
1886
|
const triggerSize = useTriggerSize(`${ctx.panelId}-trigger`);
|
|
1768
1887
|
const corner = ctx.widgetPlacement?.kind === "corner" ? ctx.widgetPlacement.corner : defaultCorner(ctx.position);
|
|
1769
|
-
const previous = (0,
|
|
1770
|
-
(0,
|
|
1888
|
+
const previous = (0, import_react10.useRef)(null);
|
|
1889
|
+
(0, import_react10.useEffect)(() => {
|
|
1771
1890
|
if (ctx.isOpen) {
|
|
1772
1891
|
previous.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
1773
1892
|
panel.current?.focus();
|
|
@@ -1776,13 +1895,13 @@ function Panel({
|
|
|
1776
1895
|
previous.current = null;
|
|
1777
1896
|
}
|
|
1778
1897
|
}, [ctx.isOpen]);
|
|
1779
|
-
(0,
|
|
1898
|
+
(0, import_react10.useEffect)(
|
|
1780
1899
|
() => () => {
|
|
1781
1900
|
if (previous.current?.isConnected) previous.current.focus();
|
|
1782
1901
|
},
|
|
1783
1902
|
[]
|
|
1784
1903
|
);
|
|
1785
|
-
return /* @__PURE__ */ (0,
|
|
1904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1786
1905
|
"div",
|
|
1787
1906
|
{
|
|
1788
1907
|
ref: panel,
|
|
@@ -1810,12 +1929,12 @@ function Panel({
|
|
|
1810
1929
|
}
|
|
1811
1930
|
},
|
|
1812
1931
|
children: [
|
|
1813
|
-
/* @__PURE__ */ (0,
|
|
1814
|
-
/* @__PURE__ */ (0,
|
|
1815
|
-
/* @__PURE__ */ (0,
|
|
1816
|
-
panelDescription && /* @__PURE__ */ (0,
|
|
1932
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "arap-heading", children: [
|
|
1933
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "arap-heading-copy", children: [
|
|
1934
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { children: panelTitle }),
|
|
1935
|
+
panelDescription && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { id: `${ctx.panelId}-description`, className: "arap-description", children: panelDescription })
|
|
1817
1936
|
] }),
|
|
1818
|
-
/* @__PURE__ */ (0,
|
|
1937
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1819
1938
|
"button",
|
|
1820
1939
|
{
|
|
1821
1940
|
type: "button",
|
|
@@ -1825,7 +1944,7 @@ function Panel({
|
|
|
1825
1944
|
}
|
|
1826
1945
|
)
|
|
1827
1946
|
] }),
|
|
1828
|
-
/* @__PURE__ */ (0,
|
|
1947
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1829
1948
|
"button",
|
|
1830
1949
|
{
|
|
1831
1950
|
type: "button",
|
|
@@ -1839,7 +1958,7 @@ function Panel({
|
|
|
1839
1958
|
children: strings.skipToActions
|
|
1840
1959
|
}
|
|
1841
1960
|
),
|
|
1842
|
-
/* @__PURE__ */ (0,
|
|
1961
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PanelActionsContext.Provider, { value: actions, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1843
1962
|
"div",
|
|
1844
1963
|
{
|
|
1845
1964
|
className: "arap-tools",
|
|
@@ -1849,19 +1968,19 @@ function Panel({
|
|
|
1849
1968
|
children
|
|
1850
1969
|
}
|
|
1851
1970
|
) }),
|
|
1852
|
-
/* @__PURE__ */ (0,
|
|
1971
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1853
1972
|
"div",
|
|
1854
1973
|
{
|
|
1855
1974
|
className: "arap-quick-actions",
|
|
1856
1975
|
role: "group",
|
|
1857
1976
|
"aria-label": strings.quickActionsLabel,
|
|
1858
1977
|
children: [
|
|
1859
|
-
/* @__PURE__ */ (0,
|
|
1860
|
-
/* @__PURE__ */ (0,
|
|
1978
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PositionControls, {}, ctx.isOpen ? "open" : "closed"),
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "arap-actions", ref: setActions, children: footer })
|
|
1861
1980
|
]
|
|
1862
1981
|
}
|
|
1863
1982
|
),
|
|
1864
|
-
effectiveStatementUrl && /* @__PURE__ */ (0,
|
|
1983
|
+
effectiveStatementUrl && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "arap-statement", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1865
1984
|
"a",
|
|
1866
1985
|
{
|
|
1867
1986
|
href: effectiveStatementUrl,
|
|
@@ -1870,7 +1989,7 @@ function Panel({
|
|
|
1870
1989
|
rel: "noopener noreferrer",
|
|
1871
1990
|
children: [
|
|
1872
1991
|
strings.statementLink,
|
|
1873
|
-
/* @__PURE__ */ (0,
|
|
1992
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "arap-sr-only", children: [
|
|
1874
1993
|
" (",
|
|
1875
1994
|
strings.openInNewTab,
|
|
1876
1995
|
")"
|
|
@@ -1878,11 +1997,11 @@ function Panel({
|
|
|
1878
1997
|
]
|
|
1879
1998
|
}
|
|
1880
1999
|
) }),
|
|
1881
|
-
/* @__PURE__ */ (0,
|
|
1882
|
-
/* @__PURE__ */ (0,
|
|
2000
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "arap-credits", children: [
|
|
2001
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { children: [
|
|
1883
2002
|
strings.creditsPrefix ?? "Designed and developed by",
|
|
1884
2003
|
" ",
|
|
1885
|
-
/* @__PURE__ */ (0,
|
|
2004
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1886
2005
|
"a",
|
|
1887
2006
|
{
|
|
1888
2007
|
href: "https://www.praboth.com",
|
|
@@ -1890,7 +2009,7 @@ function Panel({
|
|
|
1890
2009
|
rel: "noopener noreferrer",
|
|
1891
2010
|
children: [
|
|
1892
2011
|
strings.creditsName ?? "Praboth",
|
|
1893
|
-
/* @__PURE__ */ (0,
|
|
2012
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "arap-sr-only", children: [
|
|
1894
2013
|
" (",
|
|
1895
2014
|
strings.openInNewTab,
|
|
1896
2015
|
")"
|
|
@@ -1899,7 +2018,7 @@ function Panel({
|
|
|
1899
2018
|
}
|
|
1900
2019
|
)
|
|
1901
2020
|
] }),
|
|
1902
|
-
/* @__PURE__ */ (0,
|
|
2021
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1903
2022
|
"a",
|
|
1904
2023
|
{
|
|
1905
2024
|
href: "https://www.praboth.com/accessibility-plugin-react",
|
|
@@ -1907,7 +2026,7 @@ function Panel({
|
|
|
1907
2026
|
rel: "noopener noreferrer",
|
|
1908
2027
|
children: [
|
|
1909
2028
|
strings.documentationLink ?? "Official documentation",
|
|
1910
|
-
/* @__PURE__ */ (0,
|
|
2029
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "arap-sr-only", children: [
|
|
1911
2030
|
" (",
|
|
1912
2031
|
strings.openInNewTab,
|
|
1913
2032
|
")"
|
|
@@ -1921,18 +2040,18 @@ function Panel({
|
|
|
1921
2040
|
);
|
|
1922
2041
|
}
|
|
1923
2042
|
function AccessibilityList(props) {
|
|
1924
|
-
const ctx = (0,
|
|
2043
|
+
const ctx = (0, import_react10.useContext)(AccessibilityContext);
|
|
1925
2044
|
if (!ctx)
|
|
1926
2045
|
throw new Error(
|
|
1927
2046
|
"AccessibilityList must be used within an <AccessibilityPlugin> provider."
|
|
1928
2047
|
);
|
|
1929
|
-
return /* @__PURE__ */ (0,
|
|
2048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(WidgetPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Panel, { ...props }) });
|
|
1930
2049
|
}
|
|
1931
2050
|
|
|
1932
2051
|
// src/core/useAccessibility.ts
|
|
1933
|
-
var
|
|
2052
|
+
var import_react11 = require("react");
|
|
1934
2053
|
function useAccessibility(featureKey, defaultValue, options) {
|
|
1935
|
-
const ctx = (0,
|
|
2054
|
+
const ctx = (0, import_react11.useContext)(AccessibilityContext);
|
|
1936
2055
|
if (!ctx)
|
|
1937
2056
|
throw new Error(
|
|
1938
2057
|
"useAccessibility must be used within an <AccessibilityPlugin> provider."
|
|
@@ -1941,16 +2060,16 @@ function useAccessibility(featureKey, defaultValue, options) {
|
|
|
1941
2060
|
throw new Error(
|
|
1942
2061
|
"Feature keys must be nonempty and cannot be prototype keys."
|
|
1943
2062
|
);
|
|
1944
|
-
const [definition] = (0,
|
|
2063
|
+
const [definition] = (0, import_react11.useState)({ defaultValue, ...options });
|
|
1945
2064
|
const { registerFeature, setFeatureState } = ctx;
|
|
1946
|
-
(0,
|
|
2065
|
+
(0, import_react11.useEffect)(() => {
|
|
1947
2066
|
registerFeature(featureKey, definition);
|
|
1948
2067
|
}, [featureKey, registerFeature, definition]);
|
|
1949
|
-
const setValue = (0,
|
|
2068
|
+
const setValue = (0, import_react11.useCallback)(
|
|
1950
2069
|
(next) => setFeatureState(featureKey, next),
|
|
1951
2070
|
[featureKey, setFeatureState]
|
|
1952
2071
|
);
|
|
1953
|
-
const reset = (0,
|
|
2072
|
+
const reset = (0, import_react11.useCallback)(
|
|
1954
2073
|
() => setFeatureState(featureKey, definition.defaultValue),
|
|
1955
2074
|
[featureKey, setFeatureState, definition]
|
|
1956
2075
|
);
|
|
@@ -2266,60 +2385,68 @@ function preferencesReducer(state, action) {
|
|
|
2266
2385
|
}
|
|
2267
2386
|
|
|
2268
2387
|
// src/core/FeatureIcon.tsx
|
|
2269
|
-
var
|
|
2388
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2270
2389
|
var drawings = {
|
|
2271
|
-
fontSize: /* @__PURE__ */ (0,
|
|
2272
|
-
lineHeight: /* @__PURE__ */ (0,
|
|
2273
|
-
letterSpacing: /* @__PURE__ */ (0,
|
|
2274
|
-
wordSpacing: /* @__PURE__ */ (0,
|
|
2275
|
-
paragraphSpacing: /* @__PURE__ */ (0,
|
|
2276
|
-
contrast: /* @__PURE__ */ (0,
|
|
2277
|
-
/* @__PURE__ */ (0,
|
|
2278
|
-
/* @__PURE__ */ (0,
|
|
2390
|
+
fontSize: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 18 8 5l5 13M5 13h6M15 18l3-8 3 8M16 15h4" }) }),
|
|
2391
|
+
lineHeight: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M9 6h12M9 12h9M9 18h12M4 4v16m-2-2 2 2 2-2M2 6l2-2 2 2" }) }),
|
|
2392
|
+
letterSpacing: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 13 7 3l4 10M4.5 9h5M14 13l4-10 4 10m-6.5-4h5M3 19h18m-3-2 3 2-3 2M6 17l-3 2 3 2" }) }),
|
|
2393
|
+
wordSpacing: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 6v12M20 6v12M9 12h6m-2-3 3 3-3 3m-4-3-3-3 3 3" }) }),
|
|
2394
|
+
paragraphSpacing: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 5h16M4 9h12M4 19h16M4 15h12M18 10v4m-2-2 2-2 2 2m-4 2 2 2 2-2" }) }),
|
|
2395
|
+
contrast: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2396
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
2397
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
2398
|
+
] }),
|
|
2399
|
+
contrastMode: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2400
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
2401
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
2279
2402
|
] }),
|
|
2280
|
-
|
|
2281
|
-
/* @__PURE__ */ (0,
|
|
2282
|
-
/* @__PURE__ */ (0,
|
|
2403
|
+
saturation: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2404
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M12 3c-2 4-7 8-7 12a7 7 0 0 0 14 0c0-4-5-8-7-12Z" }),
|
|
2405
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M8 15a4 4 0 0 0 4 4" })
|
|
2283
2406
|
] }),
|
|
2284
|
-
|
|
2285
|
-
/* @__PURE__ */ (0,
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2407
|
+
invertColors: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2408
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M12 3c-2 4-7 8-7 12a7 7 0 0 0 14 0c0-4-5-8-7-12Z" }),
|
|
2409
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M12 3v19" })
|
|
2287
2410
|
] }),
|
|
2288
|
-
|
|
2289
|
-
/* @__PURE__ */ (0,
|
|
2290
|
-
/* @__PURE__ */ (0,
|
|
2411
|
+
grayscale: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2412
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "8", cy: "12", r: "5" }),
|
|
2413
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "16", cy: "12", r: "5" }),
|
|
2414
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M8 7v10M16 7v10" })
|
|
2291
2415
|
] }),
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
/* @__PURE__ */ (0,
|
|
2295
|
-
/* @__PURE__ */ (0,
|
|
2416
|
+
linkHighlight: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "m10 14 4-4M8 16l-1 1a4 4 0 0 1-6-6l4-4a4 4 0 0 1 6 0M16 8l1-1a4 4 0 0 1 6 6l-4 4a4 4 0 0 1-6 0" }) }),
|
|
2417
|
+
highlightFocus: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2418
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4" }),
|
|
2419
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
2296
2420
|
] }),
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
hideImages: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
2301
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
2302
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "8", cy: "9", r: "1" }),
|
|
2303
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m3 17 5-5 4 4 3-3 6 5M2 2l20 20" })
|
|
2421
|
+
focusHighlight: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2422
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4" }),
|
|
2423
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
2304
2424
|
] }),
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2425
|
+
textAlign: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 5h18M3 10h12M3 15h18M3 20h12" }) }),
|
|
2426
|
+
fontFamily: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) }),
|
|
2427
|
+
hideImages: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
2429
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "8", cy: "9", r: "1" }),
|
|
2430
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "m3 17 5-5 4 4 3-3 6 5M2 2l20 20" })
|
|
2308
2431
|
] }),
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
/* @__PURE__ */ (0,
|
|
2312
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 9h18M3 15h18" }),
|
|
2313
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M6 12h12" })
|
|
2432
|
+
hideVideos: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2433
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "3", y: "5", width: "13", height: "14", rx: "2" }),
|
|
2434
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "m16 10 5-3v10l-5-3M2 2l20 20" })
|
|
2314
2435
|
] }),
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
/* @__PURE__ */ (0,
|
|
2436
|
+
bigCursor: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "m5 3 14 11-7 1-3 6Z" }),
|
|
2437
|
+
readingMask: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2438
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 9h18M3 15h18" }),
|
|
2440
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M6 12h12" })
|
|
2318
2441
|
] }),
|
|
2319
|
-
|
|
2442
|
+
readingGuide: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2443
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 5h18M3 10h12M3 19h18" }),
|
|
2444
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M2 15h20", strokeWidth: "3" })
|
|
2445
|
+
] }),
|
|
2446
|
+
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" }) })
|
|
2320
2447
|
};
|
|
2321
2448
|
function FeatureIcon({ name }) {
|
|
2322
|
-
return /* @__PURE__ */ (0,
|
|
2449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2323
2450
|
"svg",
|
|
2324
2451
|
{
|
|
2325
2452
|
className: "arap-icon",
|
|
@@ -2337,7 +2464,7 @@ function FeatureIcon({ name }) {
|
|
|
2337
2464
|
}
|
|
2338
2465
|
|
|
2339
2466
|
// src/features/FontSizeController.tsx
|
|
2340
|
-
var
|
|
2467
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2341
2468
|
var FEATURE_KEY = "fontSize";
|
|
2342
2469
|
var DEFAULT_VALUE = 100;
|
|
2343
2470
|
var MIN = 50;
|
|
@@ -2381,19 +2508,19 @@ function FontSizeController({
|
|
|
2381
2508
|
};
|
|
2382
2509
|
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= MIN;
|
|
2383
2510
|
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= MAX;
|
|
2384
|
-
return /* @__PURE__ */ (0,
|
|
2511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2385
2512
|
"div",
|
|
2386
2513
|
{
|
|
2387
2514
|
className: "arap-feature arap-feature-stepper",
|
|
2388
2515
|
role: "group",
|
|
2389
2516
|
"aria-label": "Font Size",
|
|
2390
2517
|
children: [
|
|
2391
|
-
/* @__PURE__ */ (0,
|
|
2392
|
-
/* @__PURE__ */ (0,
|
|
2393
|
-
/* @__PURE__ */ (0,
|
|
2518
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "arap-label", children: [
|
|
2519
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FeatureIcon, { name: FEATURE_KEY }),
|
|
2520
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Font Size" })
|
|
2394
2521
|
] }),
|
|
2395
|
-
/* @__PURE__ */ (0,
|
|
2396
|
-
/* @__PURE__ */ (0,
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "arap-controls", children: [
|
|
2523
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2397
2524
|
"button",
|
|
2398
2525
|
{
|
|
2399
2526
|
className: "arap-btn-sm",
|
|
@@ -2404,11 +2531,11 @@ function FontSizeController({
|
|
|
2404
2531
|
children: "\u2212"
|
|
2405
2532
|
}
|
|
2406
2533
|
),
|
|
2407
|
-
/* @__PURE__ */ (0,
|
|
2534
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2408
2535
|
Math.round(value),
|
|
2409
2536
|
"%"
|
|
2410
2537
|
] }),
|
|
2411
|
-
/* @__PURE__ */ (0,
|
|
2538
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2412
2539
|
"button",
|
|
2413
2540
|
{
|
|
2414
2541
|
className: "arap-btn-sm",
|
|
@@ -2426,7 +2553,7 @@ function FontSizeController({
|
|
|
2426
2553
|
}
|
|
2427
2554
|
|
|
2428
2555
|
// src/features/TextScaleController.tsx
|
|
2429
|
-
var
|
|
2556
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2430
2557
|
var FEATURE_KEY2 = "fontScale";
|
|
2431
2558
|
var DEFAULT_VALUE2 = 1;
|
|
2432
2559
|
function TextScaleController({
|
|
@@ -2457,19 +2584,19 @@ function TextScaleController({
|
|
|
2457
2584
|
}
|
|
2458
2585
|
};
|
|
2459
2586
|
const percentage = Math.round(value * 100);
|
|
2460
|
-
return /* @__PURE__ */ (0,
|
|
2587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2461
2588
|
"div",
|
|
2462
2589
|
{
|
|
2463
2590
|
className: "arap-feature arap-feature-stepper",
|
|
2464
2591
|
role: "group",
|
|
2465
2592
|
"aria-label": label,
|
|
2466
2593
|
children: [
|
|
2467
|
-
/* @__PURE__ */ (0,
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2594
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "arap-label", children: [
|
|
2595
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FeatureIcon, { name: "fontSize" }),
|
|
2596
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: label })
|
|
2470
2597
|
] }),
|
|
2471
|
-
/* @__PURE__ */ (0,
|
|
2472
|
-
/* @__PURE__ */ (0,
|
|
2598
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "arap-controls", children: [
|
|
2599
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2473
2600
|
"button",
|
|
2474
2601
|
{
|
|
2475
2602
|
className: "arap-btn-sm",
|
|
@@ -2480,11 +2607,11 @@ function TextScaleController({
|
|
|
2480
2607
|
children: "\u2212"
|
|
2481
2608
|
}
|
|
2482
2609
|
),
|
|
2483
|
-
/* @__PURE__ */ (0,
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2484
2611
|
percentage,
|
|
2485
2612
|
"%"
|
|
2486
2613
|
] }),
|
|
2487
|
-
/* @__PURE__ */ (0,
|
|
2614
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2488
2615
|
"button",
|
|
2489
2616
|
{
|
|
2490
2617
|
className: "arap-btn-sm",
|
|
@@ -2502,7 +2629,7 @@ function TextScaleController({
|
|
|
2502
2629
|
}
|
|
2503
2630
|
|
|
2504
2631
|
// src/features/LineHeightController.tsx
|
|
2505
|
-
var
|
|
2632
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2506
2633
|
var FEATURE_KEY3 = "lineHeight";
|
|
2507
2634
|
var DEFAULT_VALUE3 = 100;
|
|
2508
2635
|
var MIN2 = 50;
|
|
@@ -2546,19 +2673,19 @@ function LineHeightController({
|
|
|
2546
2673
|
};
|
|
2547
2674
|
const isMin = steps && steps.length > 0 ? normalizedValue <= steps[0] : normalizedValue <= MIN2;
|
|
2548
2675
|
const isMax = steps && steps.length > 0 ? normalizedValue >= steps[steps.length - 1] : normalizedValue >= MAX2;
|
|
2549
|
-
return /* @__PURE__ */ (0,
|
|
2676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2550
2677
|
"div",
|
|
2551
2678
|
{
|
|
2552
2679
|
className: "arap-feature arap-feature-stepper",
|
|
2553
2680
|
role: "group",
|
|
2554
2681
|
"aria-label": "Line Height",
|
|
2555
2682
|
children: [
|
|
2556
|
-
/* @__PURE__ */ (0,
|
|
2557
|
-
/* @__PURE__ */ (0,
|
|
2558
|
-
/* @__PURE__ */ (0,
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "arap-label", children: [
|
|
2684
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FeatureIcon, { name: FEATURE_KEY3 }),
|
|
2685
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Line Height" })
|
|
2559
2686
|
] }),
|
|
2560
|
-
/* @__PURE__ */ (0,
|
|
2561
|
-
/* @__PURE__ */ (0,
|
|
2687
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "arap-controls", children: [
|
|
2688
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2562
2689
|
"button",
|
|
2563
2690
|
{
|
|
2564
2691
|
className: "arap-btn-sm",
|
|
@@ -2569,11 +2696,11 @@ function LineHeightController({
|
|
|
2569
2696
|
children: "\u2212"
|
|
2570
2697
|
}
|
|
2571
2698
|
),
|
|
2572
|
-
/* @__PURE__ */ (0,
|
|
2699
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2573
2700
|
Math.round(normalizedValue),
|
|
2574
2701
|
"%"
|
|
2575
2702
|
] }),
|
|
2576
|
-
/* @__PURE__ */ (0,
|
|
2703
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2577
2704
|
"button",
|
|
2578
2705
|
{
|
|
2579
2706
|
className: "arap-btn-sm",
|
|
@@ -2591,7 +2718,7 @@ function LineHeightController({
|
|
|
2591
2718
|
}
|
|
2592
2719
|
|
|
2593
2720
|
// src/features/LetterSpacingController.tsx
|
|
2594
|
-
var
|
|
2721
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2595
2722
|
var FEATURE_KEY4 = "letterSpacing";
|
|
2596
2723
|
var DEFAULT_VALUE4 = 0;
|
|
2597
2724
|
var MIN3 = 0;
|
|
@@ -2635,19 +2762,19 @@ function LetterSpacingController({
|
|
|
2635
2762
|
};
|
|
2636
2763
|
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2637
2764
|
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2638
|
-
return /* @__PURE__ */ (0,
|
|
2765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2639
2766
|
"div",
|
|
2640
2767
|
{
|
|
2641
2768
|
className: "arap-feature arap-feature-stepper",
|
|
2642
2769
|
role: "group",
|
|
2643
2770
|
"aria-label": "Letter Spacing",
|
|
2644
2771
|
children: [
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2646
|
-
/* @__PURE__ */ (0,
|
|
2647
|
-
/* @__PURE__ */ (0,
|
|
2772
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "arap-label", children: [
|
|
2773
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FeatureIcon, { name: FEATURE_KEY4 }),
|
|
2774
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "Letter Spacing" })
|
|
2648
2775
|
] }),
|
|
2649
|
-
/* @__PURE__ */ (0,
|
|
2650
|
-
/* @__PURE__ */ (0,
|
|
2776
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "arap-controls", children: [
|
|
2777
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2651
2778
|
"button",
|
|
2652
2779
|
{
|
|
2653
2780
|
className: "arap-btn-sm",
|
|
@@ -2658,11 +2785,11 @@ function LetterSpacingController({
|
|
|
2658
2785
|
children: "\u2212"
|
|
2659
2786
|
}
|
|
2660
2787
|
),
|
|
2661
|
-
/* @__PURE__ */ (0,
|
|
2788
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2662
2789
|
value,
|
|
2663
2790
|
"px"
|
|
2664
2791
|
] }),
|
|
2665
|
-
/* @__PURE__ */ (0,
|
|
2792
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2666
2793
|
"button",
|
|
2667
2794
|
{
|
|
2668
2795
|
className: "arap-btn-sm",
|
|
@@ -2680,7 +2807,7 @@ function LetterSpacingController({
|
|
|
2680
2807
|
}
|
|
2681
2808
|
|
|
2682
2809
|
// src/features/WordSpacingController.tsx
|
|
2683
|
-
var
|
|
2810
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2684
2811
|
var FEATURE_KEY5 = "wordSpacing";
|
|
2685
2812
|
var DEFAULT_VALUE5 = 0;
|
|
2686
2813
|
var MIN4 = 0;
|
|
@@ -2724,19 +2851,19 @@ function WordSpacingController({
|
|
|
2724
2851
|
};
|
|
2725
2852
|
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2726
2853
|
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2727
|
-
return /* @__PURE__ */ (0,
|
|
2854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2728
2855
|
"div",
|
|
2729
2856
|
{
|
|
2730
2857
|
className: "arap-feature arap-feature-stepper",
|
|
2731
2858
|
role: "group",
|
|
2732
2859
|
"aria-label": "Word Spacing",
|
|
2733
2860
|
children: [
|
|
2734
|
-
/* @__PURE__ */ (0,
|
|
2735
|
-
/* @__PURE__ */ (0,
|
|
2736
|
-
/* @__PURE__ */ (0,
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "arap-label", children: [
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FeatureIcon, { name: FEATURE_KEY5 }),
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Word Spacing" })
|
|
2737
2864
|
] }),
|
|
2738
|
-
/* @__PURE__ */ (0,
|
|
2739
|
-
/* @__PURE__ */ (0,
|
|
2865
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "arap-controls", children: [
|
|
2866
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2740
2867
|
"button",
|
|
2741
2868
|
{
|
|
2742
2869
|
className: "arap-btn-sm",
|
|
@@ -2747,11 +2874,11 @@ function WordSpacingController({
|
|
|
2747
2874
|
children: "\u2212"
|
|
2748
2875
|
}
|
|
2749
2876
|
),
|
|
2750
|
-
/* @__PURE__ */ (0,
|
|
2877
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2751
2878
|
value,
|
|
2752
2879
|
"px"
|
|
2753
2880
|
] }),
|
|
2754
|
-
/* @__PURE__ */ (0,
|
|
2881
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2755
2882
|
"button",
|
|
2756
2883
|
{
|
|
2757
2884
|
className: "arap-btn-sm",
|
|
@@ -2769,7 +2896,7 @@ function WordSpacingController({
|
|
|
2769
2896
|
}
|
|
2770
2897
|
|
|
2771
2898
|
// src/features/ParagraphSpacingController.tsx
|
|
2772
|
-
var
|
|
2899
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2773
2900
|
var FEATURE_KEY6 = "paragraphSpacing";
|
|
2774
2901
|
var DEFAULT_VALUE6 = 0;
|
|
2775
2902
|
var MIN5 = 0;
|
|
@@ -2813,19 +2940,19 @@ function ParagraphSpacingController({
|
|
|
2813
2940
|
};
|
|
2814
2941
|
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2815
2942
|
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2816
|
-
return /* @__PURE__ */ (0,
|
|
2943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2817
2944
|
"div",
|
|
2818
2945
|
{
|
|
2819
2946
|
className: "arap-feature arap-feature-stepper",
|
|
2820
2947
|
role: "group",
|
|
2821
2948
|
"aria-label": "Paragraph Spacing",
|
|
2822
2949
|
children: [
|
|
2823
|
-
/* @__PURE__ */ (0,
|
|
2824
|
-
/* @__PURE__ */ (0,
|
|
2825
|
-
/* @__PURE__ */ (0,
|
|
2950
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "arap-label", children: [
|
|
2951
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FeatureIcon, { name: FEATURE_KEY6 }),
|
|
2952
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Paragraph Spacing" })
|
|
2826
2953
|
] }),
|
|
2827
|
-
/* @__PURE__ */ (0,
|
|
2828
|
-
/* @__PURE__ */ (0,
|
|
2954
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "arap-controls", children: [
|
|
2955
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2829
2956
|
"button",
|
|
2830
2957
|
{
|
|
2831
2958
|
className: "arap-btn-sm",
|
|
@@ -2836,11 +2963,11 @@ function ParagraphSpacingController({
|
|
|
2836
2963
|
children: "\u2212"
|
|
2837
2964
|
}
|
|
2838
2965
|
),
|
|
2839
|
-
/* @__PURE__ */ (0,
|
|
2966
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2840
2967
|
value,
|
|
2841
2968
|
"px"
|
|
2842
2969
|
] }),
|
|
2843
|
-
/* @__PURE__ */ (0,
|
|
2970
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2844
2971
|
"button",
|
|
2845
2972
|
{
|
|
2846
2973
|
className: "arap-btn-sm",
|
|
@@ -2858,8 +2985,8 @@ function ParagraphSpacingController({
|
|
|
2858
2985
|
}
|
|
2859
2986
|
|
|
2860
2987
|
// src/features/ContrastController.tsx
|
|
2861
|
-
var
|
|
2862
|
-
var
|
|
2988
|
+
var import_react12 = require("react");
|
|
2989
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2863
2990
|
var FEATURE_KEY7 = "contrast";
|
|
2864
2991
|
var DEFAULT_VALUE7 = 0;
|
|
2865
2992
|
var LEVELS = [
|
|
@@ -2881,19 +3008,19 @@ function ContrastController() {
|
|
|
2881
3008
|
FEATURE_KEY7,
|
|
2882
3009
|
DEFAULT_VALUE7
|
|
2883
3010
|
);
|
|
2884
|
-
const forcedColors = (0,
|
|
3011
|
+
const forcedColors = (0, import_react12.useSyncExternalStore)(
|
|
2885
3012
|
subscribeForcedColors,
|
|
2886
3013
|
isForcedColorsActive,
|
|
2887
3014
|
() => false
|
|
2888
3015
|
);
|
|
2889
|
-
return /* @__PURE__ */ (0,
|
|
2890
|
-
/* @__PURE__ */ (0,
|
|
2891
|
-
/* @__PURE__ */ (0,
|
|
2892
|
-
/* @__PURE__ */ (0,
|
|
3016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
|
|
3017
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "arap-label", children: [
|
|
3018
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FeatureIcon, { name: FEATURE_KEY7 }),
|
|
3019
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Contrast" })
|
|
2893
3020
|
] }),
|
|
2894
|
-
/* @__PURE__ */ (0,
|
|
3021
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "arap-segmented", children: LEVELS.map((level) => {
|
|
2895
3022
|
const isActive = value === level.value || level.value === 0 && (value === "off" || value === "original");
|
|
2896
|
-
return /* @__PURE__ */ (0,
|
|
3023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2897
3024
|
"button",
|
|
2898
3025
|
{
|
|
2899
3026
|
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
@@ -2901,20 +3028,20 @@ function ContrastController() {
|
|
|
2901
3028
|
"aria-pressed": isActive,
|
|
2902
3029
|
type: "button",
|
|
2903
3030
|
children: [
|
|
2904
|
-
isActive && /* @__PURE__ */ (0,
|
|
3031
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2905
3032
|
level.label
|
|
2906
3033
|
]
|
|
2907
3034
|
},
|
|
2908
3035
|
String(level.value)
|
|
2909
3036
|
);
|
|
2910
3037
|
}) }),
|
|
2911
|
-
forcedColors && /* @__PURE__ */ (0,
|
|
3038
|
+
forcedColors && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system high contrast (forced colors) is active." })
|
|
2912
3039
|
] });
|
|
2913
3040
|
}
|
|
2914
3041
|
|
|
2915
3042
|
// src/features/ContrastModeController.tsx
|
|
2916
|
-
var
|
|
2917
|
-
var
|
|
3043
|
+
var import_react13 = require("react");
|
|
3044
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2918
3045
|
var FEATURE_KEY8 = "contrastMode";
|
|
2919
3046
|
var DEFAULT_VALUE8 = "off";
|
|
2920
3047
|
var OPTIONS = [
|
|
@@ -2929,19 +3056,19 @@ function ContrastModeController() {
|
|
|
2929
3056
|
FEATURE_KEY8,
|
|
2930
3057
|
DEFAULT_VALUE8
|
|
2931
3058
|
);
|
|
2932
|
-
const forcedColors = (0,
|
|
3059
|
+
const forcedColors = (0, import_react13.useSyncExternalStore)(
|
|
2933
3060
|
subscribeForcedColors,
|
|
2934
3061
|
isForcedColorsActive,
|
|
2935
3062
|
() => false
|
|
2936
3063
|
);
|
|
2937
|
-
return /* @__PURE__ */ (0,
|
|
2938
|
-
/* @__PURE__ */ (0,
|
|
2939
|
-
/* @__PURE__ */ (0,
|
|
2940
|
-
/* @__PURE__ */ (0,
|
|
3064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Contrast Mode", children: [
|
|
3065
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "arap-label", children: [
|
|
3066
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FeatureIcon, { name: FEATURE_KEY8 }),
|
|
3067
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Contrast Mode" })
|
|
2941
3068
|
] }),
|
|
2942
|
-
/* @__PURE__ */ (0,
|
|
3069
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "arap-segmented", children: OPTIONS.map((option) => {
|
|
2943
3070
|
const isActive = value === option.value || option.value === "off" && (value === "original" || !value);
|
|
2944
|
-
return /* @__PURE__ */ (0,
|
|
3071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2945
3072
|
"button",
|
|
2946
3073
|
{
|
|
2947
3074
|
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
@@ -2949,19 +3076,19 @@ function ContrastModeController() {
|
|
|
2949
3076
|
"aria-pressed": isActive,
|
|
2950
3077
|
type: "button",
|
|
2951
3078
|
children: [
|
|
2952
|
-
isActive && /* @__PURE__ */ (0,
|
|
3079
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2953
3080
|
option.label
|
|
2954
3081
|
]
|
|
2955
3082
|
},
|
|
2956
3083
|
option.value
|
|
2957
3084
|
);
|
|
2958
3085
|
}) }),
|
|
2959
|
-
forcedColors && /* @__PURE__ */ (0,
|
|
3086
|
+
forcedColors && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system high contrast (forced colors) is active." })
|
|
2960
3087
|
] });
|
|
2961
3088
|
}
|
|
2962
3089
|
|
|
2963
3090
|
// src/features/SaturationController.tsx
|
|
2964
|
-
var
|
|
3091
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2965
3092
|
var FEATURE_KEY9 = "saturation";
|
|
2966
3093
|
var DEFAULT_VALUE9 = 0;
|
|
2967
3094
|
var LEVELS2 = [
|
|
@@ -2974,12 +3101,12 @@ function SaturationController() {
|
|
|
2974
3101
|
FEATURE_KEY9,
|
|
2975
3102
|
DEFAULT_VALUE9
|
|
2976
3103
|
);
|
|
2977
|
-
return /* @__PURE__ */ (0,
|
|
2978
|
-
/* @__PURE__ */ (0,
|
|
2979
|
-
/* @__PURE__ */ (0,
|
|
2980
|
-
/* @__PURE__ */ (0,
|
|
3104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
|
|
3105
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "arap-label", children: [
|
|
3106
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FeatureIcon, { name: FEATURE_KEY9 }),
|
|
3107
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Saturation" })
|
|
2981
3108
|
] }),
|
|
2982
|
-
/* @__PURE__ */ (0,
|
|
3109
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2983
3110
|
"button",
|
|
2984
3111
|
{
|
|
2985
3112
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -2987,7 +3114,7 @@ function SaturationController() {
|
|
|
2987
3114
|
"aria-pressed": value === level.value,
|
|
2988
3115
|
type: "button",
|
|
2989
3116
|
children: [
|
|
2990
|
-
value === level.value && /* @__PURE__ */ (0,
|
|
3117
|
+
value === level.value && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2991
3118
|
level.label
|
|
2992
3119
|
]
|
|
2993
3120
|
},
|
|
@@ -2997,7 +3124,7 @@ function SaturationController() {
|
|
|
2997
3124
|
}
|
|
2998
3125
|
|
|
2999
3126
|
// src/features/InvertColorsController.tsx
|
|
3000
|
-
var
|
|
3127
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3001
3128
|
var FEATURE_KEY10 = "invertColors";
|
|
3002
3129
|
var DEFAULT_VALUE10 = false;
|
|
3003
3130
|
function InvertColorsController() {
|
|
@@ -3005,12 +3132,12 @@ function InvertColorsController() {
|
|
|
3005
3132
|
FEATURE_KEY10,
|
|
3006
3133
|
DEFAULT_VALUE10
|
|
3007
3134
|
);
|
|
3008
|
-
return /* @__PURE__ */ (0,
|
|
3009
|
-
/* @__PURE__ */ (0,
|
|
3010
|
-
/* @__PURE__ */ (0,
|
|
3011
|
-
/* @__PURE__ */ (0,
|
|
3135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
|
|
3136
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "arap-label", children: [
|
|
3137
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FeatureIcon, { name: FEATURE_KEY10 }),
|
|
3138
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Invert Colors" })
|
|
3012
3139
|
] }),
|
|
3013
|
-
/* @__PURE__ */ (0,
|
|
3140
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3014
3141
|
"button",
|
|
3015
3142
|
{
|
|
3016
3143
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3018,14 +3145,14 @@ function InvertColorsController() {
|
|
|
3018
3145
|
"aria-label": "Invert Colors",
|
|
3019
3146
|
"aria-pressed": value,
|
|
3020
3147
|
type: "button",
|
|
3021
|
-
children: /* @__PURE__ */ (0,
|
|
3148
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3022
3149
|
}
|
|
3023
3150
|
)
|
|
3024
3151
|
] });
|
|
3025
3152
|
}
|
|
3026
3153
|
|
|
3027
3154
|
// src/features/GrayscaleController.tsx
|
|
3028
|
-
var
|
|
3155
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3029
3156
|
var FEATURE_KEY11 = "grayscale";
|
|
3030
3157
|
var DEFAULT_VALUE11 = false;
|
|
3031
3158
|
function GrayscaleController() {
|
|
@@ -3033,12 +3160,12 @@ function GrayscaleController() {
|
|
|
3033
3160
|
FEATURE_KEY11,
|
|
3034
3161
|
DEFAULT_VALUE11
|
|
3035
3162
|
);
|
|
3036
|
-
return /* @__PURE__ */ (0,
|
|
3037
|
-
/* @__PURE__ */ (0,
|
|
3038
|
-
/* @__PURE__ */ (0,
|
|
3039
|
-
/* @__PURE__ */ (0,
|
|
3163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
|
|
3164
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "arap-label", children: [
|
|
3165
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FeatureIcon, { name: FEATURE_KEY11 }),
|
|
3166
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Grayscale" })
|
|
3040
3167
|
] }),
|
|
3041
|
-
/* @__PURE__ */ (0,
|
|
3168
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3042
3169
|
"button",
|
|
3043
3170
|
{
|
|
3044
3171
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3046,14 +3173,14 @@ function GrayscaleController() {
|
|
|
3046
3173
|
"aria-label": "Grayscale",
|
|
3047
3174
|
"aria-pressed": value,
|
|
3048
3175
|
type: "button",
|
|
3049
|
-
children: /* @__PURE__ */ (0,
|
|
3176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3050
3177
|
}
|
|
3051
3178
|
)
|
|
3052
3179
|
] });
|
|
3053
3180
|
}
|
|
3054
3181
|
|
|
3055
3182
|
// src/features/LinkHighlightController.tsx
|
|
3056
|
-
var
|
|
3183
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3057
3184
|
var FEATURE_KEY12 = "linkHighlight";
|
|
3058
3185
|
var DEFAULT_VALUE12 = false;
|
|
3059
3186
|
function LinkHighlightController() {
|
|
@@ -3061,12 +3188,12 @@ function LinkHighlightController() {
|
|
|
3061
3188
|
FEATURE_KEY12,
|
|
3062
3189
|
DEFAULT_VALUE12
|
|
3063
3190
|
);
|
|
3064
|
-
return /* @__PURE__ */ (0,
|
|
3065
|
-
/* @__PURE__ */ (0,
|
|
3066
|
-
/* @__PURE__ */ (0,
|
|
3067
|
-
/* @__PURE__ */ (0,
|
|
3191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
|
|
3192
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "arap-label", children: [
|
|
3193
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FeatureIcon, { name: FEATURE_KEY12 }),
|
|
3194
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Link Highlight" })
|
|
3068
3195
|
] }),
|
|
3069
|
-
/* @__PURE__ */ (0,
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3070
3197
|
"button",
|
|
3071
3198
|
{
|
|
3072
3199
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3074,10 +3201,10 @@ function LinkHighlightController() {
|
|
|
3074
3201
|
"aria-label": "Link Highlight",
|
|
3075
3202
|
"aria-pressed": !!value,
|
|
3076
3203
|
type: "button",
|
|
3077
|
-
children: /* @__PURE__ */ (0,
|
|
3204
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3078
3205
|
}
|
|
3079
3206
|
),
|
|
3080
|
-
/* @__PURE__ */ (0,
|
|
3207
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3081
3208
|
"button",
|
|
3082
3209
|
{
|
|
3083
3210
|
type: "button",
|
|
@@ -3085,7 +3212,7 @@ function LinkHighlightController() {
|
|
|
3085
3212
|
"aria-pressed": value === mode,
|
|
3086
3213
|
onClick: () => setValue(mode),
|
|
3087
3214
|
children: [
|
|
3088
|
-
value === mode && /* @__PURE__ */ (0,
|
|
3215
|
+
value === mode && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3089
3216
|
mode.split("-").join(" ")
|
|
3090
3217
|
]
|
|
3091
3218
|
},
|
|
@@ -3095,7 +3222,7 @@ function LinkHighlightController() {
|
|
|
3095
3222
|
}
|
|
3096
3223
|
|
|
3097
3224
|
// src/features/TextAlignController.tsx
|
|
3098
|
-
var
|
|
3225
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3099
3226
|
var FEATURE_KEY13 = "textAlign";
|
|
3100
3227
|
var DEFAULT_VALUE13 = "default";
|
|
3101
3228
|
var OPTIONS2 = ["default", "left", "center", "right", "justify"];
|
|
@@ -3104,12 +3231,12 @@ function TextAlignController() {
|
|
|
3104
3231
|
FEATURE_KEY13,
|
|
3105
3232
|
DEFAULT_VALUE13
|
|
3106
3233
|
);
|
|
3107
|
-
return /* @__PURE__ */ (0,
|
|
3108
|
-
/* @__PURE__ */ (0,
|
|
3109
|
-
/* @__PURE__ */ (0,
|
|
3110
|
-
/* @__PURE__ */ (0,
|
|
3234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
|
|
3235
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "arap-label", children: [
|
|
3236
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FeatureIcon, { name: FEATURE_KEY13 }),
|
|
3237
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Text Alignment" })
|
|
3111
3238
|
] }),
|
|
3112
|
-
/* @__PURE__ */ (0,
|
|
3239
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "arap-segmented", children: OPTIONS2.map((option) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3113
3240
|
"button",
|
|
3114
3241
|
{
|
|
3115
3242
|
className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
|
|
@@ -3118,13 +3245,13 @@ function TextAlignController() {
|
|
|
3118
3245
|
type: "button",
|
|
3119
3246
|
style: { textTransform: "capitalize" },
|
|
3120
3247
|
children: [
|
|
3121
|
-
value === option && /* @__PURE__ */ (0,
|
|
3248
|
+
value === option && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3122
3249
|
option
|
|
3123
3250
|
]
|
|
3124
3251
|
},
|
|
3125
3252
|
option
|
|
3126
3253
|
)) }),
|
|
3127
|
-
value === "justify" && /* @__PURE__ */ (0,
|
|
3254
|
+
value === "justify" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3128
3255
|
"div",
|
|
3129
3256
|
{
|
|
3130
3257
|
className: "arap-notice arap-notice-warning",
|
|
@@ -3137,7 +3264,7 @@ function TextAlignController() {
|
|
|
3137
3264
|
}
|
|
3138
3265
|
|
|
3139
3266
|
// src/features/FontFamilyController.tsx
|
|
3140
|
-
var
|
|
3267
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3141
3268
|
var FEATURE_KEY14 = "fontFamily";
|
|
3142
3269
|
var DEFAULT_VALUE14 = "default";
|
|
3143
3270
|
var OPTIONS3 = [
|
|
@@ -3150,14 +3277,14 @@ function FontFamilyController() {
|
|
|
3150
3277
|
FEATURE_KEY14,
|
|
3151
3278
|
DEFAULT_VALUE14
|
|
3152
3279
|
);
|
|
3153
|
-
return /* @__PURE__ */ (0,
|
|
3154
|
-
/* @__PURE__ */ (0,
|
|
3155
|
-
/* @__PURE__ */ (0,
|
|
3156
|
-
/* @__PURE__ */ (0,
|
|
3280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Font Family", children: [
|
|
3281
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "arap-label", children: [
|
|
3282
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
3283
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Font Family" })
|
|
3157
3284
|
] }),
|
|
3158
|
-
/* @__PURE__ */ (0,
|
|
3285
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "arap-segmented", children: OPTIONS3.map((option) => {
|
|
3159
3286
|
const isActive = value === option.value || option.value === "default" && (value === "original" || !value || value === "default");
|
|
3160
|
-
return /* @__PURE__ */ (0,
|
|
3287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3161
3288
|
"button",
|
|
3162
3289
|
{
|
|
3163
3290
|
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
@@ -3165,7 +3292,7 @@ function FontFamilyController() {
|
|
|
3165
3292
|
"aria-pressed": isActive,
|
|
3166
3293
|
type: "button",
|
|
3167
3294
|
children: [
|
|
3168
|
-
isActive && /* @__PURE__ */ (0,
|
|
3295
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3169
3296
|
option.label
|
|
3170
3297
|
]
|
|
3171
3298
|
},
|
|
@@ -3176,7 +3303,7 @@ function FontFamilyController() {
|
|
|
3176
3303
|
}
|
|
3177
3304
|
|
|
3178
3305
|
// src/features/HideImagesController.tsx
|
|
3179
|
-
var
|
|
3306
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3180
3307
|
var FEATURE_KEY15 = "hideImages";
|
|
3181
3308
|
var DEFAULT_VALUE15 = false;
|
|
3182
3309
|
function HideImagesController() {
|
|
@@ -3184,12 +3311,12 @@ function HideImagesController() {
|
|
|
3184
3311
|
FEATURE_KEY15,
|
|
3185
3312
|
DEFAULT_VALUE15
|
|
3186
3313
|
);
|
|
3187
|
-
return /* @__PURE__ */ (0,
|
|
3188
|
-
/* @__PURE__ */ (0,
|
|
3189
|
-
/* @__PURE__ */ (0,
|
|
3190
|
-
/* @__PURE__ */ (0,
|
|
3314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
3315
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "arap-label", children: [
|
|
3316
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
3317
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "Hide Images" })
|
|
3191
3318
|
] }),
|
|
3192
|
-
/* @__PURE__ */ (0,
|
|
3319
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3193
3320
|
"button",
|
|
3194
3321
|
{
|
|
3195
3322
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3197,14 +3324,14 @@ function HideImagesController() {
|
|
|
3197
3324
|
"aria-label": "Hide Images",
|
|
3198
3325
|
"aria-pressed": value,
|
|
3199
3326
|
type: "button",
|
|
3200
|
-
children: /* @__PURE__ */ (0,
|
|
3327
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3201
3328
|
}
|
|
3202
3329
|
)
|
|
3203
3330
|
] });
|
|
3204
3331
|
}
|
|
3205
3332
|
|
|
3206
3333
|
// src/features/HideVideosController.tsx
|
|
3207
|
-
var
|
|
3334
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3208
3335
|
var FEATURE_KEY16 = "hideVideos";
|
|
3209
3336
|
var DEFAULT_VALUE16 = false;
|
|
3210
3337
|
function HideVideosController() {
|
|
@@ -3212,12 +3339,12 @@ function HideVideosController() {
|
|
|
3212
3339
|
FEATURE_KEY16,
|
|
3213
3340
|
DEFAULT_VALUE16
|
|
3214
3341
|
);
|
|
3215
|
-
return /* @__PURE__ */ (0,
|
|
3216
|
-
/* @__PURE__ */ (0,
|
|
3217
|
-
/* @__PURE__ */ (0,
|
|
3218
|
-
/* @__PURE__ */ (0,
|
|
3342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
|
|
3343
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "arap-label", children: [
|
|
3344
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureIcon, { name: FEATURE_KEY16 }),
|
|
3345
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "Hide Videos" })
|
|
3219
3346
|
] }),
|
|
3220
|
-
/* @__PURE__ */ (0,
|
|
3347
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3221
3348
|
"button",
|
|
3222
3349
|
{
|
|
3223
3350
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3225,14 +3352,14 @@ function HideVideosController() {
|
|
|
3225
3352
|
"aria-label": "Hide Videos",
|
|
3226
3353
|
"aria-pressed": value,
|
|
3227
3354
|
type: "button",
|
|
3228
|
-
children: /* @__PURE__ */ (0,
|
|
3355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3229
3356
|
}
|
|
3230
3357
|
)
|
|
3231
3358
|
] });
|
|
3232
3359
|
}
|
|
3233
3360
|
|
|
3234
3361
|
// src/features/BigCursorController.tsx
|
|
3235
|
-
var
|
|
3362
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3236
3363
|
var FEATURE_KEY17 = "bigCursor";
|
|
3237
3364
|
var DEFAULT_VALUE17 = false;
|
|
3238
3365
|
function BigCursorController() {
|
|
@@ -3240,12 +3367,12 @@ function BigCursorController() {
|
|
|
3240
3367
|
FEATURE_KEY17,
|
|
3241
3368
|
DEFAULT_VALUE17
|
|
3242
3369
|
);
|
|
3243
|
-
return /* @__PURE__ */ (0,
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3245
|
-
/* @__PURE__ */ (0,
|
|
3246
|
-
/* @__PURE__ */ (0,
|
|
3370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
3371
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "arap-label", children: [
|
|
3372
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
3373
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Big Cursor" })
|
|
3247
3374
|
] }),
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3249
3376
|
"button",
|
|
3250
3377
|
{
|
|
3251
3378
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3253,14 +3380,14 @@ function BigCursorController() {
|
|
|
3253
3380
|
"aria-label": "Big Cursor",
|
|
3254
3381
|
"aria-pressed": value,
|
|
3255
3382
|
type: "button",
|
|
3256
|
-
children: /* @__PURE__ */ (0,
|
|
3383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3257
3384
|
}
|
|
3258
3385
|
)
|
|
3259
3386
|
] });
|
|
3260
3387
|
}
|
|
3261
3388
|
|
|
3262
3389
|
// src/features/ReadingMaskController.tsx
|
|
3263
|
-
var
|
|
3390
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3264
3391
|
var FEATURE_KEY18 = "readingMask";
|
|
3265
3392
|
var DEFAULT_VALUE18 = false;
|
|
3266
3393
|
function ReadingMaskController() {
|
|
@@ -3268,12 +3395,12 @@ function ReadingMaskController() {
|
|
|
3268
3395
|
FEATURE_KEY18,
|
|
3269
3396
|
DEFAULT_VALUE18
|
|
3270
3397
|
);
|
|
3271
|
-
return /* @__PURE__ */ (0,
|
|
3272
|
-
/* @__PURE__ */ (0,
|
|
3273
|
-
/* @__PURE__ */ (0,
|
|
3274
|
-
/* @__PURE__ */ (0,
|
|
3398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
|
|
3399
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "arap-label", children: [
|
|
3400
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FeatureIcon, { name: FEATURE_KEY18 }),
|
|
3401
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Reading Mask" })
|
|
3275
3402
|
] }),
|
|
3276
|
-
/* @__PURE__ */ (0,
|
|
3403
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3277
3404
|
"button",
|
|
3278
3405
|
{
|
|
3279
3406
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3281,14 +3408,14 @@ function ReadingMaskController() {
|
|
|
3281
3408
|
"aria-label": "Reading Mask",
|
|
3282
3409
|
"aria-pressed": value,
|
|
3283
3410
|
type: "button",
|
|
3284
|
-
children: /* @__PURE__ */ (0,
|
|
3411
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3285
3412
|
}
|
|
3286
3413
|
)
|
|
3287
3414
|
] });
|
|
3288
3415
|
}
|
|
3289
3416
|
|
|
3290
3417
|
// src/features/ReadingGuideController.tsx
|
|
3291
|
-
var
|
|
3418
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3292
3419
|
var FEATURE_KEY19 = "readingGuide";
|
|
3293
3420
|
var DEFAULT_VALUE19 = false;
|
|
3294
3421
|
function ReadingGuideController() {
|
|
@@ -3296,12 +3423,12 @@ function ReadingGuideController() {
|
|
|
3296
3423
|
FEATURE_KEY19,
|
|
3297
3424
|
DEFAULT_VALUE19
|
|
3298
3425
|
);
|
|
3299
|
-
return /* @__PURE__ */ (0,
|
|
3300
|
-
/* @__PURE__ */ (0,
|
|
3301
|
-
/* @__PURE__ */ (0,
|
|
3302
|
-
/* @__PURE__ */ (0,
|
|
3426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
|
|
3427
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "arap-label", children: [
|
|
3428
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FeatureIcon, { name: FEATURE_KEY19 }),
|
|
3429
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Reading Guide" })
|
|
3303
3430
|
] }),
|
|
3304
|
-
/* @__PURE__ */ (0,
|
|
3431
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3305
3432
|
"button",
|
|
3306
3433
|
{
|
|
3307
3434
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3309,35 +3436,64 @@ function ReadingGuideController() {
|
|
|
3309
3436
|
"aria-label": "Reading Guide",
|
|
3310
3437
|
"aria-pressed": value,
|
|
3311
3438
|
type: "button",
|
|
3312
|
-
children: /* @__PURE__ */ (0,
|
|
3439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3440
|
+
}
|
|
3441
|
+
)
|
|
3442
|
+
] });
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
// src/features/HighlightFocusController.tsx
|
|
3446
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3447
|
+
var FEATURE_KEY20 = "highlightFocus";
|
|
3448
|
+
var DEFAULT_VALUE20 = false;
|
|
3449
|
+
function HighlightFocusController() {
|
|
3450
|
+
const { value, setValue } = useAccessibility(
|
|
3451
|
+
FEATURE_KEY20,
|
|
3452
|
+
DEFAULT_VALUE20
|
|
3453
|
+
);
|
|
3454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Highlight Focus", children: [
|
|
3455
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "arap-label", children: [
|
|
3456
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FeatureIcon, { name: FEATURE_KEY20 }),
|
|
3457
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: "Highlight Focus" })
|
|
3458
|
+
] }),
|
|
3459
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3460
|
+
"button",
|
|
3461
|
+
{
|
|
3462
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3463
|
+
onClick: () => setValue(!value),
|
|
3464
|
+
"aria-label": "Highlight Focus",
|
|
3465
|
+
"aria-pressed": Boolean(value),
|
|
3466
|
+
type: "button",
|
|
3467
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3313
3468
|
}
|
|
3314
3469
|
)
|
|
3315
3470
|
] });
|
|
3316
3471
|
}
|
|
3472
|
+
var FocusHighlightController = HighlightFocusController;
|
|
3317
3473
|
|
|
3318
3474
|
// src/features/ResetController.tsx
|
|
3319
3475
|
var import_react_dom2 = require("react-dom");
|
|
3320
|
-
var
|
|
3321
|
-
var
|
|
3476
|
+
var import_react14 = require("react");
|
|
3477
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3322
3478
|
function ResetController() {
|
|
3323
|
-
const ctx = (0,
|
|
3479
|
+
const ctx = (0, import_react14.useContext)(AccessibilityContext);
|
|
3324
3480
|
if (!ctx) {
|
|
3325
3481
|
throw new Error(
|
|
3326
3482
|
"ResetController must be used within an <AccessibilityPlugin> provider."
|
|
3327
3483
|
);
|
|
3328
3484
|
}
|
|
3329
|
-
const actionHost = (0,
|
|
3485
|
+
const actionHost = (0, import_react14.useContext)(PanelActionsContext);
|
|
3330
3486
|
const { resetAll } = ctx;
|
|
3331
3487
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
3332
|
-
const button = /* @__PURE__ */ (0,
|
|
3333
|
-
/* @__PURE__ */ (0,
|
|
3488
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
3489
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FeatureIcon, { name: "reset" }),
|
|
3334
3490
|
strings.resetAll
|
|
3335
3491
|
] }) });
|
|
3336
3492
|
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
3337
3493
|
}
|
|
3338
3494
|
|
|
3339
3495
|
// src/core/controls/ToggleControl.tsx
|
|
3340
|
-
var
|
|
3496
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3341
3497
|
function ToggleControl({
|
|
3342
3498
|
id,
|
|
3343
3499
|
label,
|
|
@@ -3359,12 +3515,12 @@ function ToggleControl({
|
|
|
3359
3515
|
onChange(!checked);
|
|
3360
3516
|
}
|
|
3361
3517
|
};
|
|
3362
|
-
return /* @__PURE__ */ (0,
|
|
3518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3363
3519
|
"div",
|
|
3364
3520
|
{
|
|
3365
3521
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3366
3522
|
style,
|
|
3367
|
-
children: /* @__PURE__ */ (0,
|
|
3523
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3368
3524
|
"button",
|
|
3369
3525
|
{
|
|
3370
3526
|
id,
|
|
@@ -3378,7 +3534,7 @@ function ToggleControl({
|
|
|
3378
3534
|
disabled: !isInteractive,
|
|
3379
3535
|
onClick: handleClick,
|
|
3380
3536
|
title: unavailableReason || description || toggleLabel,
|
|
3381
|
-
children: /* @__PURE__ */ (0,
|
|
3537
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3382
3538
|
"span",
|
|
3383
3539
|
{
|
|
3384
3540
|
className: "arap-toggle-knob",
|
|
@@ -3394,8 +3550,8 @@ function ToggleControl({
|
|
|
3394
3550
|
}
|
|
3395
3551
|
|
|
3396
3552
|
// src/core/controls/ChoiceControl.tsx
|
|
3397
|
-
var
|
|
3398
|
-
var
|
|
3553
|
+
var import_react15 = require("react");
|
|
3554
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3399
3555
|
function ChoiceControl({
|
|
3400
3556
|
id,
|
|
3401
3557
|
label,
|
|
@@ -3409,12 +3565,12 @@ function ChoiceControl({
|
|
|
3409
3565
|
style,
|
|
3410
3566
|
orientation = "horizontal"
|
|
3411
3567
|
}) {
|
|
3412
|
-
const containerRef = (0,
|
|
3413
|
-
const allOptions = (0,
|
|
3568
|
+
const containerRef = (0, import_react15.useRef)(null);
|
|
3569
|
+
const allOptions = (0, import_react15.useMemo)(
|
|
3414
3570
|
() => groups ? groups.flatMap((g) => g.options) : options || [],
|
|
3415
3571
|
[groups, options]
|
|
3416
3572
|
);
|
|
3417
|
-
const handleKeyDown = (0,
|
|
3573
|
+
const handleKeyDown = (0, import_react15.useCallback)(
|
|
3418
3574
|
(e) => {
|
|
3419
3575
|
if (disabled || allOptions.length === 0) return;
|
|
3420
3576
|
const enabledOptions = allOptions.filter((opt) => !opt.disabled);
|
|
@@ -3451,7 +3607,7 @@ function ChoiceControl({
|
|
|
3451
3607
|
const renderOptionButton = (opt) => {
|
|
3452
3608
|
const isSelected = value === opt.value;
|
|
3453
3609
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
3454
|
-
return /* @__PURE__ */ (0,
|
|
3610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3455
3611
|
"button",
|
|
3456
3612
|
{
|
|
3457
3613
|
type: "button",
|
|
@@ -3465,15 +3621,15 @@ function ChoiceControl({
|
|
|
3465
3621
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
3466
3622
|
title: opt.description,
|
|
3467
3623
|
children: [
|
|
3468
|
-
isSelected && /* @__PURE__ */ (0,
|
|
3469
|
-
/* @__PURE__ */ (0,
|
|
3470
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
3624
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3625
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: opt.label }),
|
|
3626
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
3471
3627
|
]
|
|
3472
3628
|
},
|
|
3473
3629
|
String(opt.value)
|
|
3474
3630
|
);
|
|
3475
3631
|
};
|
|
3476
|
-
return /* @__PURE__ */ (0,
|
|
3632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3477
3633
|
"div",
|
|
3478
3634
|
{
|
|
3479
3635
|
ref: containerRef,
|
|
@@ -3484,15 +3640,15 @@ function ChoiceControl({
|
|
|
3484
3640
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3485
3641
|
style,
|
|
3486
3642
|
onKeyDown: handleKeyDown,
|
|
3487
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
3643
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3488
3644
|
"div",
|
|
3489
3645
|
{
|
|
3490
3646
|
className: "arap-choice-group",
|
|
3491
3647
|
role: "group",
|
|
3492
3648
|
"aria-label": group.label,
|
|
3493
3649
|
children: [
|
|
3494
|
-
/* @__PURE__ */ (0,
|
|
3495
|
-
/* @__PURE__ */ (0,
|
|
3650
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
3651
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
3496
3652
|
]
|
|
3497
3653
|
},
|
|
3498
3654
|
group.label
|
|
@@ -3502,7 +3658,7 @@ function ChoiceControl({
|
|
|
3502
3658
|
}
|
|
3503
3659
|
|
|
3504
3660
|
// src/core/controls/StepperControl.tsx
|
|
3505
|
-
var
|
|
3661
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3506
3662
|
function StepperControl({
|
|
3507
3663
|
id,
|
|
3508
3664
|
label,
|
|
@@ -3532,15 +3688,15 @@ function StepperControl({
|
|
|
3532
3688
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
3533
3689
|
}
|
|
3534
3690
|
};
|
|
3535
|
-
return /* @__PURE__ */ (0,
|
|
3691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3536
3692
|
"div",
|
|
3537
3693
|
{
|
|
3538
3694
|
id,
|
|
3539
3695
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3540
3696
|
style,
|
|
3541
3697
|
children: [
|
|
3542
|
-
/* @__PURE__ */ (0,
|
|
3543
|
-
/* @__PURE__ */ (0,
|
|
3698
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-controls", children: [
|
|
3699
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3544
3700
|
"button",
|
|
3545
3701
|
{
|
|
3546
3702
|
type: "button",
|
|
@@ -3551,8 +3707,8 @@ function StepperControl({
|
|
|
3551
3707
|
children: "\u2212"
|
|
3552
3708
|
}
|
|
3553
3709
|
),
|
|
3554
|
-
/* @__PURE__ */ (0,
|
|
3555
|
-
/* @__PURE__ */ (0,
|
|
3710
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
3711
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3556
3712
|
"button",
|
|
3557
3713
|
{
|
|
3558
3714
|
type: "button",
|
|
@@ -3564,7 +3720,7 @@ function StepperControl({
|
|
|
3564
3720
|
}
|
|
3565
3721
|
)
|
|
3566
3722
|
] }),
|
|
3567
|
-
showSlider && /* @__PURE__ */ (0,
|
|
3723
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3568
3724
|
"input",
|
|
3569
3725
|
{
|
|
3570
3726
|
type: "range",
|
|
@@ -3588,7 +3744,7 @@ function StepperControl({
|
|
|
3588
3744
|
}
|
|
3589
3745
|
|
|
3590
3746
|
// src/core/controls/FeatureCard.tsx
|
|
3591
|
-
var
|
|
3747
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3592
3748
|
function FeatureCard({
|
|
3593
3749
|
id,
|
|
3594
3750
|
featureKey,
|
|
@@ -3607,7 +3763,7 @@ function FeatureCard({
|
|
|
3607
3763
|
largeControls = false
|
|
3608
3764
|
}) {
|
|
3609
3765
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
3610
|
-
return /* @__PURE__ */ (0,
|
|
3766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3611
3767
|
"div",
|
|
3612
3768
|
{
|
|
3613
3769
|
id,
|
|
@@ -3616,27 +3772,27 @@ function FeatureCard({
|
|
|
3616
3772
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3617
3773
|
style,
|
|
3618
3774
|
children: [
|
|
3619
|
-
/* @__PURE__ */ (0,
|
|
3620
|
-
/* @__PURE__ */ (0,
|
|
3621
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
3622
|
-
/* @__PURE__ */ (0,
|
|
3775
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-card-header", children: [
|
|
3776
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "arap-label", children: [
|
|
3777
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
3778
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-card-title", children: title })
|
|
3623
3779
|
] }),
|
|
3624
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
3780
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
3625
3781
|
] }),
|
|
3626
|
-
description && /* @__PURE__ */ (0,
|
|
3627
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
3628
|
-
/* @__PURE__ */ (0,
|
|
3629
|
-
/* @__PURE__ */ (0,
|
|
3782
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
3783
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
3784
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3785
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: errorMessage })
|
|
3630
3786
|
] }),
|
|
3631
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
3632
|
-
/* @__PURE__ */ (0,
|
|
3633
|
-
/* @__PURE__ */ (0,
|
|
3787
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
3788
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
3789
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: unavailableMessage })
|
|
3634
3790
|
] }),
|
|
3635
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
3636
|
-
/* @__PURE__ */ (0,
|
|
3637
|
-
/* @__PURE__ */ (0,
|
|
3638
|
-
/* @__PURE__ */ (0,
|
|
3639
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
3791
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
3792
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
3793
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-permission-content", children: [
|
|
3794
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: permissionMessage }),
|
|
3795
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3640
3796
|
"button",
|
|
3641
3797
|
{
|
|
3642
3798
|
type: "button",
|
|
@@ -3647,14 +3803,14 @@ function FeatureCard({
|
|
|
3647
3803
|
)
|
|
3648
3804
|
] })
|
|
3649
3805
|
] }),
|
|
3650
|
-
/* @__PURE__ */ (0,
|
|
3806
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "arap-card-content", children })
|
|
3651
3807
|
]
|
|
3652
3808
|
}
|
|
3653
3809
|
);
|
|
3654
3810
|
}
|
|
3655
3811
|
|
|
3656
3812
|
// src/core/controls/FeatureStatusState.tsx
|
|
3657
|
-
var
|
|
3813
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3658
3814
|
function SearchCount({
|
|
3659
3815
|
totalCount,
|
|
3660
3816
|
matchedCount,
|
|
@@ -3663,7 +3819,7 @@ function SearchCount({
|
|
|
3663
3819
|
style
|
|
3664
3820
|
}) {
|
|
3665
3821
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
3666
|
-
return /* @__PURE__ */ (0,
|
|
3822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3667
3823
|
"div",
|
|
3668
3824
|
{
|
|
3669
3825
|
role: "status",
|
|
@@ -3683,17 +3839,17 @@ function EmptyState({
|
|
|
3683
3839
|
className = "",
|
|
3684
3840
|
style
|
|
3685
3841
|
}) {
|
|
3686
|
-
return /* @__PURE__ */ (0,
|
|
3842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
3687
3843
|
"div",
|
|
3688
3844
|
{
|
|
3689
3845
|
role: "status",
|
|
3690
3846
|
className: `arap-empty-state ${className}`,
|
|
3691
3847
|
style,
|
|
3692
3848
|
children: [
|
|
3693
|
-
/* @__PURE__ */ (0,
|
|
3694
|
-
/* @__PURE__ */ (0,
|
|
3695
|
-
/* @__PURE__ */ (0,
|
|
3696
|
-
onAction && /* @__PURE__ */ (0,
|
|
3849
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
3850
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h3", { className: "arap-empty-title", children: title }),
|
|
3851
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "arap-empty-desc", children: description }),
|
|
3852
|
+
onAction && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
3697
3853
|
]
|
|
3698
3854
|
}
|
|
3699
3855
|
);
|
|
@@ -3706,18 +3862,18 @@ function ErrorState({
|
|
|
3706
3862
|
className = "",
|
|
3707
3863
|
style
|
|
3708
3864
|
}) {
|
|
3709
|
-
return /* @__PURE__ */ (0,
|
|
3865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
3710
3866
|
"div",
|
|
3711
3867
|
{
|
|
3712
3868
|
role: "alert",
|
|
3713
3869
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
3714
3870
|
style,
|
|
3715
3871
|
children: [
|
|
3716
|
-
/* @__PURE__ */ (0,
|
|
3717
|
-
/* @__PURE__ */ (0,
|
|
3718
|
-
title && /* @__PURE__ */ (0,
|
|
3719
|
-
/* @__PURE__ */ (0,
|
|
3720
|
-
onRetry && /* @__PURE__ */ (0,
|
|
3872
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3873
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-error-content", children: [
|
|
3874
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "arap-error-message", children: message }),
|
|
3876
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
3721
3877
|
] })
|
|
3722
3878
|
]
|
|
3723
3879
|
}
|
|
@@ -3725,7 +3881,7 @@ function ErrorState({
|
|
|
3725
3881
|
}
|
|
3726
3882
|
|
|
3727
3883
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
3728
|
-
var
|
|
3884
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3729
3885
|
function ProfilePreviewCard({
|
|
3730
3886
|
profile,
|
|
3731
3887
|
isActive,
|
|
@@ -3775,7 +3931,7 @@ function ProfilePreviewCard({
|
|
|
3775
3931
|
if (val === null || val === void 0) return "Original";
|
|
3776
3932
|
return String(val);
|
|
3777
3933
|
};
|
|
3778
|
-
return /* @__PURE__ */ (0,
|
|
3934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3779
3935
|
"div",
|
|
3780
3936
|
{
|
|
3781
3937
|
role: "group",
|
|
@@ -3783,10 +3939,10 @@ function ProfilePreviewCard({
|
|
|
3783
3939
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3784
3940
|
style,
|
|
3785
3941
|
children: [
|
|
3786
|
-
/* @__PURE__ */ (0,
|
|
3787
|
-
/* @__PURE__ */ (0,
|
|
3788
|
-
/* @__PURE__ */ (0,
|
|
3789
|
-
isActive && /* @__PURE__ */ (0,
|
|
3942
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-profile-header", children: [
|
|
3943
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
3944
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
3945
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3790
3946
|
"span",
|
|
3791
3947
|
{
|
|
3792
3948
|
className: "arap-profile-active-badge",
|
|
@@ -3795,14 +3951,14 @@ function ProfilePreviewCard({
|
|
|
3795
3951
|
}
|
|
3796
3952
|
)
|
|
3797
3953
|
] }),
|
|
3798
|
-
/* @__PURE__ */ (0,
|
|
3954
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
3799
3955
|
] }),
|
|
3800
|
-
/* @__PURE__ */ (0,
|
|
3801
|
-
/* @__PURE__ */ (0,
|
|
3802
|
-
/* @__PURE__ */ (0,
|
|
3956
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
3957
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
3958
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
3803
3959
|
const val = profile.settings[key];
|
|
3804
|
-
return /* @__PURE__ */ (0,
|
|
3805
|
-
/* @__PURE__ */ (0,
|
|
3960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
3961
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("strong", { children: [
|
|
3806
3962
|
formatKeyName(key),
|
|
3807
3963
|
":"
|
|
3808
3964
|
] }),
|
|
@@ -3811,7 +3967,7 @@ function ProfilePreviewCard({
|
|
|
3811
3967
|
] }, key);
|
|
3812
3968
|
}) })
|
|
3813
3969
|
] }),
|
|
3814
|
-
/* @__PURE__ */ (0,
|
|
3970
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3815
3971
|
"button",
|
|
3816
3972
|
{
|
|
3817
3973
|
type: "button",
|
|
@@ -3820,7 +3976,7 @@ function ProfilePreviewCard({
|
|
|
3820
3976
|
"aria-label": `Revert ${profile.label} profile`,
|
|
3821
3977
|
children: "Revert to custom settings"
|
|
3822
3978
|
}
|
|
3823
|
-
) : /* @__PURE__ */ (0,
|
|
3979
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3824
3980
|
"button",
|
|
3825
3981
|
{
|
|
3826
3982
|
type: "button",
|
|
@@ -3854,11 +4010,13 @@ function ProfilePreviewCard({
|
|
|
3854
4010
|
FONT_FAMILY_PRESETS,
|
|
3855
4011
|
FONT_FAMILY_PROTECTED_SELECTOR,
|
|
3856
4012
|
FeatureCard,
|
|
4013
|
+
FocusHighlightController,
|
|
3857
4014
|
FontFamilyController,
|
|
3858
4015
|
FontSizeController,
|
|
3859
4016
|
GrayscaleController,
|
|
3860
4017
|
HideImagesController,
|
|
3861
4018
|
HideVideosController,
|
|
4019
|
+
HighlightFocusController,
|
|
3862
4020
|
InvertColorsController,
|
|
3863
4021
|
LEGIBLE_FONT_STACK,
|
|
3864
4022
|
LINE_HEIGHT_RATIOS,
|
|
@@ -3874,6 +4032,7 @@ function ProfilePreviewCard({
|
|
|
3874
4032
|
ResetController,
|
|
3875
4033
|
SaturationController,
|
|
3876
4034
|
SearchCount,
|
|
4035
|
+
SkipToMainLink,
|
|
3877
4036
|
StepperControl,
|
|
3878
4037
|
TEXT_ALIGN_BLOCK_SELECTOR,
|
|
3879
4038
|
TEXT_SCALE_PROTECTED_SELECTOR,
|
|
@@ -3885,6 +4044,7 @@ function ProfilePreviewCard({
|
|
|
3885
4044
|
WordSpacingController,
|
|
3886
4045
|
createInitialPreferencesState,
|
|
3887
4046
|
enLocale,
|
|
4047
|
+
findMainLandmark,
|
|
3888
4048
|
getScriptSpacingConstraints,
|
|
3889
4049
|
isForcedColorsActive,
|
|
3890
4050
|
isProtectedFromContrast,
|