accessibility-plugin-react 2.7.0 → 2.9.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 +4 -0
- package/dist/index.d.mts +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +648 -354
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +539 -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 +2 -2
- package/docs/FEATURES.md +4 -0
- package/docs/LINKS_AND_FOCUS.md +65 -0
- package/docs/REDUCE_MOTION.md +64 -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,
|
|
@@ -57,9 +59,11 @@ __export(index_exports, {
|
|
|
57
59
|
ProfilePreviewCard: () => ProfilePreviewCard,
|
|
58
60
|
ReadingGuideController: () => ReadingGuideController,
|
|
59
61
|
ReadingMaskController: () => ReadingMaskController,
|
|
62
|
+
ReduceMotionController: () => ReduceMotionController,
|
|
60
63
|
ResetController: () => ResetController,
|
|
61
64
|
SaturationController: () => SaturationController,
|
|
62
65
|
SearchCount: () => SearchCount,
|
|
66
|
+
SkipToMainLink: () => SkipToMainLink,
|
|
63
67
|
StepperControl: () => StepperControl,
|
|
64
68
|
TEXT_ALIGN_BLOCK_SELECTOR: () => TEXT_ALIGN_BLOCK_SELECTOR,
|
|
65
69
|
TEXT_SCALE_PROTECTED_SELECTOR: () => TEXT_SCALE_PROTECTED_SELECTOR,
|
|
@@ -71,6 +75,7 @@ __export(index_exports, {
|
|
|
71
75
|
WordSpacingController: () => WordSpacingController,
|
|
72
76
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
73
77
|
enLocale: () => enLocale,
|
|
78
|
+
findMainLandmark: () => findMainLandmark,
|
|
74
79
|
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
75
80
|
isForcedColorsActive: () => isForcedColorsActive,
|
|
76
81
|
isProtectedFromContrast: () => isProtectedFromContrast,
|
|
@@ -78,6 +83,7 @@ __export(index_exports, {
|
|
|
78
83
|
isProtectedFromTextAlign: () => isProtectedFromTextAlign,
|
|
79
84
|
isProtectedFromTextScale: () => isProtectedFromTextScale,
|
|
80
85
|
isProtectedFromTextSpacing: () => isProtectedFromTextSpacing,
|
|
86
|
+
isReducedMotionActive: () => isReducedMotionActive,
|
|
81
87
|
isRtlLocale: () => isRtlLocale,
|
|
82
88
|
normalizePreferenceValue: () => normalizePreferenceValue,
|
|
83
89
|
normalizePreferences: () => normalizePreferences,
|
|
@@ -85,6 +91,8 @@ __export(index_exports, {
|
|
|
85
91
|
registerLocale: () => registerLocale,
|
|
86
92
|
resolveEffectivePreferences: () => resolveEffectivePreferences,
|
|
87
93
|
resolveLocaleStrings: () => resolveLocaleStrings,
|
|
94
|
+
subscribeForcedColors: () => subscribeForcedColors,
|
|
95
|
+
subscribeReducedMotion: () => subscribeReducedMotion,
|
|
88
96
|
useAccessibility: () => useAccessibility
|
|
89
97
|
});
|
|
90
98
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -112,7 +120,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
112
120
|
}
|
|
113
121
|
|
|
114
122
|
// 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');
|
|
123
|
+
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
124
|
|
|
117
125
|
// src/core/AccessibilityPlugin.tsx
|
|
118
126
|
var import_react4 = require("react");
|
|
@@ -404,6 +412,7 @@ var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
|
404
412
|
validate: oneOf(
|
|
405
413
|
false,
|
|
406
414
|
true,
|
|
415
|
+
"underline",
|
|
407
416
|
"yellow-on-black",
|
|
408
417
|
"blue-on-yellow",
|
|
409
418
|
"black-on-white"
|
|
@@ -417,7 +426,10 @@ for (const key of [
|
|
|
417
426
|
"hideVideos",
|
|
418
427
|
"bigCursor",
|
|
419
428
|
"readingMask",
|
|
420
|
-
"readingGuide"
|
|
429
|
+
"readingGuide",
|
|
430
|
+
"highlightFocus",
|
|
431
|
+
"focusHighlight",
|
|
432
|
+
"reduceMotion"
|
|
421
433
|
]) {
|
|
422
434
|
builtins[key] = {
|
|
423
435
|
defaultValue: false,
|
|
@@ -461,6 +473,26 @@ function subscribeForcedColors(callback) {
|
|
|
461
473
|
};
|
|
462
474
|
}
|
|
463
475
|
}
|
|
476
|
+
function isReducedMotionActive() {
|
|
477
|
+
if (typeof window === "undefined" || !window.matchMedia) return false;
|
|
478
|
+
try {
|
|
479
|
+
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
480
|
+
} catch {
|
|
481
|
+
return false;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
function subscribeReducedMotion(callback) {
|
|
485
|
+
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
486
|
+
};
|
|
487
|
+
try {
|
|
488
|
+
const mql = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
489
|
+
mql.addEventListener("change", callback);
|
|
490
|
+
return () => mql.removeEventListener("change", callback);
|
|
491
|
+
} catch {
|
|
492
|
+
return () => {
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
}
|
|
464
496
|
var CONTRAST_PALETTES = {
|
|
465
497
|
light: {
|
|
466
498
|
text: "#0f172a",
|
|
@@ -1082,6 +1114,105 @@ function applyPage(values) {
|
|
|
1082
1114
|
}
|
|
1083
1115
|
}
|
|
1084
1116
|
}
|
|
1117
|
+
if (values.highlightFocus || values.focusHighlight) {
|
|
1118
|
+
const FOCUS_STYLE_ID = "arap-focus-highlight-style";
|
|
1119
|
+
let styleEl = document.getElementById(
|
|
1120
|
+
FOCUS_STYLE_ID
|
|
1121
|
+
);
|
|
1122
|
+
if (!styleEl) {
|
|
1123
|
+
styleEl = document.createElement("style");
|
|
1124
|
+
styleEl.id = FOCUS_STYLE_ID;
|
|
1125
|
+
styleEl.dataset.arapUi = "";
|
|
1126
|
+
styleEl.textContent = `
|
|
1127
|
+
*:not([data-arap-ui]):not([data-arap-ui] *):focus-visible {
|
|
1128
|
+
outline: 3px solid #2563eb !important;
|
|
1129
|
+
outline-offset: 3px !important;
|
|
1130
|
+
box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9) !important;
|
|
1131
|
+
}
|
|
1132
|
+
@media (forced-colors: active) {
|
|
1133
|
+
*:not([data-arap-ui]):not([data-arap-ui] *):focus-visible {
|
|
1134
|
+
outline: 3px solid Highlight !important;
|
|
1135
|
+
outline-offset: 3px !important;
|
|
1136
|
+
box-shadow: none !important;
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
*:disabled:focus-visible,
|
|
1140
|
+
*[aria-disabled="true"]:focus-visible {
|
|
1141
|
+
outline: none !important;
|
|
1142
|
+
box-shadow: none !important;
|
|
1143
|
+
}
|
|
1144
|
+
`;
|
|
1145
|
+
document.head.appendChild(styleEl);
|
|
1146
|
+
undo.push(() => {
|
|
1147
|
+
styleEl?.remove();
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
if (values.reduceMotion) {
|
|
1152
|
+
const MOTION_STYLE_ID = "arap-reduce-motion-style";
|
|
1153
|
+
let styleEl = document.getElementById(
|
|
1154
|
+
MOTION_STYLE_ID
|
|
1155
|
+
);
|
|
1156
|
+
if (!styleEl) {
|
|
1157
|
+
styleEl = document.createElement("style");
|
|
1158
|
+
styleEl.id = MOTION_STYLE_ID;
|
|
1159
|
+
styleEl.dataset.arapUi = "";
|
|
1160
|
+
styleEl.textContent = `
|
|
1161
|
+
*:not([data-arap-ui]):not([data-arap-ui] *),
|
|
1162
|
+
*:not([data-arap-ui]):not([data-arap-ui] *)::before,
|
|
1163
|
+
*:not([data-arap-ui]):not([data-arap-ui] *)::after {
|
|
1164
|
+
animation-duration: 0.001ms !important;
|
|
1165
|
+
animation-iteration-count: 1 !important;
|
|
1166
|
+
transition-duration: 0.001ms !important;
|
|
1167
|
+
scroll-behavior: auto !important;
|
|
1168
|
+
}
|
|
1169
|
+
`;
|
|
1170
|
+
document.head.appendChild(styleEl);
|
|
1171
|
+
undo.push(() => {
|
|
1172
|
+
styleEl?.remove();
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
const trackedAnimations = /* @__PURE__ */ new Set();
|
|
1176
|
+
if (typeof document !== "undefined" && typeof document.getAnimations === "function") {
|
|
1177
|
+
try {
|
|
1178
|
+
const animations = document.getAnimations();
|
|
1179
|
+
for (const anim of animations) {
|
|
1180
|
+
const target = anim.effect?.target;
|
|
1181
|
+
if (target instanceof Element && target.closest("[data-arap-ui]")) {
|
|
1182
|
+
continue;
|
|
1183
|
+
}
|
|
1184
|
+
if (anim.playState === "running") {
|
|
1185
|
+
anim.pause();
|
|
1186
|
+
trackedAnimations.add(anim);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
} catch {
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
if (typeof document !== "undefined") {
|
|
1193
|
+
const mediaList = Array.from(
|
|
1194
|
+
document.querySelectorAll("video, audio")
|
|
1195
|
+
).filter((media) => !media.closest("[data-arap-ui]"));
|
|
1196
|
+
for (const media of mediaList) {
|
|
1197
|
+
if (!media.paused) {
|
|
1198
|
+
try {
|
|
1199
|
+
media.pause();
|
|
1200
|
+
} catch {
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
undo.push(() => {
|
|
1206
|
+
for (const anim of trackedAnimations) {
|
|
1207
|
+
if (anim.playState === "paused") {
|
|
1208
|
+
try {
|
|
1209
|
+
anim.play();
|
|
1210
|
+
} catch {
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1085
1216
|
for (const el of elements) {
|
|
1086
1217
|
if (values.bigCursor) set(el, "cursor", cursor);
|
|
1087
1218
|
if (values.hideImages) {
|
|
@@ -1097,14 +1228,26 @@ function applyPage(values) {
|
|
|
1097
1228
|
set(el, "color", colors[0]);
|
|
1098
1229
|
set(el, "background-color", colors[1]);
|
|
1099
1230
|
}
|
|
1100
|
-
if (values.linkHighlight && el.matches("a[href]")) {
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1231
|
+
if (values.linkHighlight && el.matches("a[href]") && !el.closest("[data-arap-ui]")) {
|
|
1232
|
+
const isDisabled = el.getAttribute("aria-disabled") === "true" || el.hasAttribute("disabled") || el.classList.contains("disabled");
|
|
1233
|
+
if (!isDisabled) {
|
|
1234
|
+
if (isForcedColorsActive()) {
|
|
1235
|
+
set(el, "color", "LinkText");
|
|
1236
|
+
set(el, "text-decoration", "underline");
|
|
1237
|
+
set(el, "text-decoration-thickness", "2px");
|
|
1238
|
+
set(el, "text-underline-offset", "3px");
|
|
1239
|
+
} else {
|
|
1240
|
+
const colors2 = palette[String(values.linkHighlight)] ?? [
|
|
1241
|
+
"#111827",
|
|
1242
|
+
"#fef08a"
|
|
1243
|
+
];
|
|
1244
|
+
set(el, "color", colors2[0]);
|
|
1245
|
+
set(el, "background-color", colors2[1]);
|
|
1246
|
+
set(el, "text-decoration", "underline");
|
|
1247
|
+
set(el, "text-decoration-thickness", "2px");
|
|
1248
|
+
set(el, "text-underline-offset", "3px");
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1108
1251
|
}
|
|
1109
1252
|
}
|
|
1110
1253
|
return () => {
|
|
@@ -1367,7 +1510,7 @@ function AccessibilityPlugin({
|
|
|
1367
1510
|
}
|
|
1368
1511
|
|
|
1369
1512
|
// src/core/AccessibilityButton.tsx
|
|
1370
|
-
var
|
|
1513
|
+
var import_react7 = require("react");
|
|
1371
1514
|
|
|
1372
1515
|
// src/core/WidgetPortal.tsx
|
|
1373
1516
|
var import_react5 = require("react");
|
|
@@ -1389,12 +1532,16 @@ function WidgetPortal({ children }) {
|
|
|
1389
1532
|
) : null;
|
|
1390
1533
|
}
|
|
1391
1534
|
|
|
1535
|
+
// src/core/SkipToMainLink.tsx
|
|
1536
|
+
var import_react6 = require("react");
|
|
1537
|
+
|
|
1392
1538
|
// src/core/i18n/en.ts
|
|
1393
1539
|
var enLocale = Object.freeze({
|
|
1394
1540
|
title: "Accessibility settings",
|
|
1395
1541
|
description: "Adjust your reading experience",
|
|
1396
1542
|
closeLabel: "Close accessibility settings",
|
|
1397
1543
|
skipToActions: "Jump to quick actions",
|
|
1544
|
+
skipToMain: "Skip to main content",
|
|
1398
1545
|
toolsLabel: "Accessibility tools",
|
|
1399
1546
|
quickActionsLabel: "Quick actions",
|
|
1400
1547
|
resetLabel: "Reset all accessibility settings",
|
|
@@ -1460,8 +1607,69 @@ function resolveLocaleStrings(localeProp) {
|
|
|
1460
1607
|
return enLocale;
|
|
1461
1608
|
}
|
|
1462
1609
|
|
|
1463
|
-
// src/core/
|
|
1610
|
+
// src/core/SkipToMainLink.tsx
|
|
1464
1611
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1612
|
+
function findMainLandmark() {
|
|
1613
|
+
if (typeof document === "undefined") return null;
|
|
1614
|
+
const main = document.querySelector("main, [role='main']");
|
|
1615
|
+
return main instanceof HTMLElement ? main : null;
|
|
1616
|
+
}
|
|
1617
|
+
function subscribeLandmark(callback) {
|
|
1618
|
+
if (typeof MutationObserver === "undefined" || typeof document === "undefined" || !document.body) {
|
|
1619
|
+
return () => {
|
|
1620
|
+
};
|
|
1621
|
+
}
|
|
1622
|
+
const observer = new MutationObserver(callback);
|
|
1623
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
1624
|
+
return () => observer.disconnect();
|
|
1625
|
+
}
|
|
1626
|
+
function getMainTargetId() {
|
|
1627
|
+
if (typeof document === "undefined") return null;
|
|
1628
|
+
const main = findMainLandmark();
|
|
1629
|
+
if (main) {
|
|
1630
|
+
if (!main.id) {
|
|
1631
|
+
main.id = "arap-main-content";
|
|
1632
|
+
}
|
|
1633
|
+
if (!main.hasAttribute("tabindex")) {
|
|
1634
|
+
main.setAttribute("tabindex", "-1");
|
|
1635
|
+
}
|
|
1636
|
+
return main.id;
|
|
1637
|
+
}
|
|
1638
|
+
return null;
|
|
1639
|
+
}
|
|
1640
|
+
function SkipToMainLink({ className = "", label }) {
|
|
1641
|
+
const ctx = (0, import_react6.useContext)(AccessibilityContext);
|
|
1642
|
+
const strings = resolveLocaleStrings(ctx?.locale);
|
|
1643
|
+
const text = label ?? strings.skipToMain ?? "Skip to main content";
|
|
1644
|
+
const targetId = (0, import_react6.useSyncExternalStore)(
|
|
1645
|
+
subscribeLandmark,
|
|
1646
|
+
getMainTargetId,
|
|
1647
|
+
() => null
|
|
1648
|
+
);
|
|
1649
|
+
if (!targetId) return null;
|
|
1650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1651
|
+
"a",
|
|
1652
|
+
{
|
|
1653
|
+
href: `#${targetId}`,
|
|
1654
|
+
className: `arap-skip-to-main ${className}`,
|
|
1655
|
+
onClick: (e) => {
|
|
1656
|
+
const main = document.getElementById(targetId);
|
|
1657
|
+
if (main) {
|
|
1658
|
+
e.preventDefault();
|
|
1659
|
+
if (!main.hasAttribute("tabindex")) {
|
|
1660
|
+
main.setAttribute("tabindex", "-1");
|
|
1661
|
+
}
|
|
1662
|
+
main.focus();
|
|
1663
|
+
main.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
children: text
|
|
1667
|
+
}
|
|
1668
|
+
);
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
// src/core/AccessibilityButton.tsx
|
|
1672
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1465
1673
|
function AccessibilityButton({
|
|
1466
1674
|
icon,
|
|
1467
1675
|
draggable = true,
|
|
@@ -1471,7 +1679,7 @@ function AccessibilityButton({
|
|
|
1471
1679
|
style,
|
|
1472
1680
|
largeControls
|
|
1473
1681
|
}) {
|
|
1474
|
-
const ctx = (0,
|
|
1682
|
+
const ctx = (0, import_react7.useContext)(AccessibilityContext);
|
|
1475
1683
|
if (!ctx)
|
|
1476
1684
|
throw new Error(
|
|
1477
1685
|
"AccessibilityButton must be used within an <AccessibilityPlugin> provider."
|
|
@@ -1481,13 +1689,14 @@ function AccessibilityButton({
|
|
|
1481
1689
|
const isLarge = largeControls ?? ctx.largeControls ?? false;
|
|
1482
1690
|
const viewport = useViewport();
|
|
1483
1691
|
const triggerSize = useTriggerSize(`${ctx.panelId}-trigger`);
|
|
1484
|
-
const [preview, setPreview] = (0,
|
|
1485
|
-
const drag = (0,
|
|
1486
|
-
const suppressClick = (0,
|
|
1692
|
+
const [preview, setPreview] = (0, import_react7.useState)(null);
|
|
1693
|
+
const drag = (0, import_react7.useRef)(null);
|
|
1694
|
+
const suppressClick = (0, import_react7.useRef)(false);
|
|
1487
1695
|
const placement = preview ?? ctx.widgetPlacement;
|
|
1488
1696
|
const corner = placement?.kind === "corner" ? placement.corner : defaultCorner(ctx.position);
|
|
1489
|
-
return /* @__PURE__ */ (0,
|
|
1490
|
-
/* @__PURE__ */ (0,
|
|
1697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(WidgetPortal, { children: [
|
|
1698
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkipToMainLink, {}),
|
|
1699
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1491
1700
|
"button",
|
|
1492
1701
|
{
|
|
1493
1702
|
type: "button",
|
|
@@ -1585,7 +1794,7 @@ function AccessibilityButton({
|
|
|
1585
1794
|
"aria-expanded": ctx.isOpen,
|
|
1586
1795
|
"aria-controls": ctx.panelId,
|
|
1587
1796
|
children: [
|
|
1588
|
-
/* @__PURE__ */ (0,
|
|
1797
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": "true", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1589
1798
|
"svg",
|
|
1590
1799
|
{
|
|
1591
1800
|
width: "28",
|
|
@@ -1595,19 +1804,19 @@ function AccessibilityButton({
|
|
|
1595
1804
|
stroke: "currentColor",
|
|
1596
1805
|
strokeWidth: "2",
|
|
1597
1806
|
children: [
|
|
1598
|
-
/* @__PURE__ */ (0,
|
|
1599
|
-
/* @__PURE__ */ (0,
|
|
1807
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "4", r: "2" }),
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M4 9l8 2 8-2M12 11v5m0 0-5 6m5-6 5 6" })
|
|
1600
1809
|
]
|
|
1601
1810
|
}
|
|
1602
1811
|
) }),
|
|
1603
|
-
(description || draggable) && /* @__PURE__ */ (0,
|
|
1812
|
+
(description || draggable) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { id: `${ctx.panelId}-trigger-description`, hidden: true, children: [
|
|
1604
1813
|
description ? `${description} ` : "",
|
|
1605
1814
|
draggable && strings.dragHelp
|
|
1606
1815
|
] })
|
|
1607
1816
|
]
|
|
1608
1817
|
}
|
|
1609
1818
|
),
|
|
1610
|
-
/* @__PURE__ */ (0,
|
|
1819
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "arap-sr-only", role: "status", children: ctx.widgetPlacement?.kind === "point" ? strings.formatPointPosition ? strings.formatPointPosition(
|
|
1611
1820
|
ctx.widgetPlacement.x,
|
|
1612
1821
|
ctx.widgetPlacement.y
|
|
1613
1822
|
) : `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 +1824,22 @@ function AccessibilityButton({
|
|
|
1615
1824
|
}
|
|
1616
1825
|
|
|
1617
1826
|
// src/core/AccessibilityList.tsx
|
|
1618
|
-
var
|
|
1827
|
+
var import_react10 = require("react");
|
|
1619
1828
|
|
|
1620
1829
|
// src/core/PanelActionsContext.ts
|
|
1621
|
-
var
|
|
1622
|
-
var PanelActionsContext = (0,
|
|
1830
|
+
var import_react8 = require("react");
|
|
1831
|
+
var PanelActionsContext = (0, import_react8.createContext)(null);
|
|
1623
1832
|
|
|
1624
1833
|
// src/core/PositionControls.tsx
|
|
1625
|
-
var
|
|
1626
|
-
var
|
|
1834
|
+
var import_react9 = require("react");
|
|
1835
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1627
1836
|
function PositionControls() {
|
|
1628
|
-
const ctx = (0,
|
|
1837
|
+
const ctx = (0, import_react9.useContext)(AccessibilityContext);
|
|
1629
1838
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
1630
|
-
const [open, setOpen] = (0,
|
|
1631
|
-
const select = (0,
|
|
1632
|
-
const opener = (0,
|
|
1633
|
-
(0,
|
|
1839
|
+
const [open, setOpen] = (0, import_react9.useState)(false);
|
|
1840
|
+
const select = (0, import_react9.useRef)(null);
|
|
1841
|
+
const opener = (0, import_react9.useRef)(null);
|
|
1842
|
+
(0, import_react9.useEffect)(() => {
|
|
1634
1843
|
if (open) select.current?.focus();
|
|
1635
1844
|
}, [open]);
|
|
1636
1845
|
const close = () => {
|
|
@@ -1645,8 +1854,8 @@ function PositionControls() {
|
|
|
1645
1854
|
pointFromPixels(rect.left + dx, rect.top + dy, rect.width, rect.height)
|
|
1646
1855
|
);
|
|
1647
1856
|
};
|
|
1648
|
-
return /* @__PURE__ */ (0,
|
|
1649
|
-
/* @__PURE__ */ (0,
|
|
1857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "arap-position-tools", children: [
|
|
1858
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1650
1859
|
"button",
|
|
1651
1860
|
{
|
|
1652
1861
|
ref: opener,
|
|
@@ -1661,7 +1870,7 @@ function PositionControls() {
|
|
|
1661
1870
|
children: strings.moveButton
|
|
1662
1871
|
}
|
|
1663
1872
|
),
|
|
1664
|
-
/* @__PURE__ */ (0,
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1665
1874
|
"div",
|
|
1666
1875
|
{
|
|
1667
1876
|
id: `${ctx.panelId}-position`,
|
|
@@ -1676,7 +1885,7 @@ function PositionControls() {
|
|
|
1676
1885
|
}
|
|
1677
1886
|
},
|
|
1678
1887
|
children: [
|
|
1679
|
-
/* @__PURE__ */ (0,
|
|
1888
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1680
1889
|
"label",
|
|
1681
1890
|
{
|
|
1682
1891
|
className: "arap-position-label",
|
|
@@ -1684,7 +1893,7 @@ function PositionControls() {
|
|
|
1684
1893
|
children: strings.positionLabel
|
|
1685
1894
|
}
|
|
1686
1895
|
),
|
|
1687
|
-
/* @__PURE__ */ (0,
|
|
1896
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1688
1897
|
"select",
|
|
1689
1898
|
{
|
|
1690
1899
|
ref: select,
|
|
@@ -1696,17 +1905,17 @@ function PositionControls() {
|
|
|
1696
1905
|
corner: event.target.value
|
|
1697
1906
|
}),
|
|
1698
1907
|
children: [
|
|
1699
|
-
/* @__PURE__ */ (0,
|
|
1700
|
-
corners.map((corner) => /* @__PURE__ */ (0,
|
|
1908
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "custom", disabled: true, children: strings.customPosition }),
|
|
1909
|
+
corners.map((corner) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: corner, children: corner.split("-").join(" ") }, corner))
|
|
1701
1910
|
]
|
|
1702
1911
|
}
|
|
1703
1912
|
),
|
|
1704
|
-
/* @__PURE__ */ (0,
|
|
1913
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "arap-position-arrows", children: [
|
|
1705
1914
|
["left", -20, 0, "\u2190", strings.moveLeft],
|
|
1706
1915
|
["up", 0, -20, "\u2191", strings.moveUp],
|
|
1707
1916
|
["down", 0, 20, "\u2193", strings.moveDown],
|
|
1708
1917
|
["right", 20, 0, "\u2192", strings.moveRight]
|
|
1709
|
-
].map(([direction, dx, dy, arrowChar, label]) => /* @__PURE__ */ (0,
|
|
1918
|
+
].map(([direction, dx, dy, arrowChar, label]) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1710
1919
|
"button",
|
|
1711
1920
|
{
|
|
1712
1921
|
type: "button",
|
|
@@ -1719,7 +1928,7 @@ function PositionControls() {
|
|
|
1719
1928
|
},
|
|
1720
1929
|
direction
|
|
1721
1930
|
)) }),
|
|
1722
|
-
/* @__PURE__ */ (0,
|
|
1931
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1723
1932
|
"button",
|
|
1724
1933
|
{
|
|
1725
1934
|
className: "arap-position-default",
|
|
@@ -1731,7 +1940,7 @@ function PositionControls() {
|
|
|
1731
1940
|
children: strings.resetPosition
|
|
1732
1941
|
}
|
|
1733
1942
|
),
|
|
1734
|
-
/* @__PURE__ */ (0,
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { className: "arap-position-default", type: "button", onClick: close, children: strings.doneMoving })
|
|
1735
1944
|
]
|
|
1736
1945
|
}
|
|
1737
1946
|
)
|
|
@@ -1739,7 +1948,7 @@ function PositionControls() {
|
|
|
1739
1948
|
}
|
|
1740
1949
|
|
|
1741
1950
|
// src/core/AccessibilityList.tsx
|
|
1742
|
-
var
|
|
1951
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1743
1952
|
function Panel({
|
|
1744
1953
|
children,
|
|
1745
1954
|
footer,
|
|
@@ -1752,7 +1961,7 @@ function Panel({
|
|
|
1752
1961
|
largeControls,
|
|
1753
1962
|
locale
|
|
1754
1963
|
}) {
|
|
1755
|
-
const ctx = (0,
|
|
1964
|
+
const ctx = (0, import_react10.useContext)(AccessibilityContext);
|
|
1756
1965
|
const effectiveLocale = locale ?? ctx.locale;
|
|
1757
1966
|
const strings = resolveLocaleStrings(effectiveLocale);
|
|
1758
1967
|
const panelTitle = title ?? strings.title;
|
|
@@ -1761,13 +1970,13 @@ function Panel({
|
|
|
1761
1970
|
const effectiveStatementUrl = statementUrl ?? ctx.statementUrl;
|
|
1762
1971
|
const isLarge = largeControls ?? ctx.largeControls ?? false;
|
|
1763
1972
|
const isRtl = isRtlLocale(effectiveLocale);
|
|
1764
|
-
const panel = (0,
|
|
1765
|
-
const [actions, setActions] = (0,
|
|
1973
|
+
const panel = (0, import_react10.useRef)(null);
|
|
1974
|
+
const [actions, setActions] = (0, import_react10.useState)(null);
|
|
1766
1975
|
const viewport = useViewport();
|
|
1767
1976
|
const triggerSize = useTriggerSize(`${ctx.panelId}-trigger`);
|
|
1768
1977
|
const corner = ctx.widgetPlacement?.kind === "corner" ? ctx.widgetPlacement.corner : defaultCorner(ctx.position);
|
|
1769
|
-
const previous = (0,
|
|
1770
|
-
(0,
|
|
1978
|
+
const previous = (0, import_react10.useRef)(null);
|
|
1979
|
+
(0, import_react10.useEffect)(() => {
|
|
1771
1980
|
if (ctx.isOpen) {
|
|
1772
1981
|
previous.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
1773
1982
|
panel.current?.focus();
|
|
@@ -1776,13 +1985,13 @@ function Panel({
|
|
|
1776
1985
|
previous.current = null;
|
|
1777
1986
|
}
|
|
1778
1987
|
}, [ctx.isOpen]);
|
|
1779
|
-
(0,
|
|
1988
|
+
(0, import_react10.useEffect)(
|
|
1780
1989
|
() => () => {
|
|
1781
1990
|
if (previous.current?.isConnected) previous.current.focus();
|
|
1782
1991
|
},
|
|
1783
1992
|
[]
|
|
1784
1993
|
);
|
|
1785
|
-
return /* @__PURE__ */ (0,
|
|
1994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1786
1995
|
"div",
|
|
1787
1996
|
{
|
|
1788
1997
|
ref: panel,
|
|
@@ -1810,12 +2019,12 @@ function Panel({
|
|
|
1810
2019
|
}
|
|
1811
2020
|
},
|
|
1812
2021
|
children: [
|
|
1813
|
-
/* @__PURE__ */ (0,
|
|
1814
|
-
/* @__PURE__ */ (0,
|
|
1815
|
-
/* @__PURE__ */ (0,
|
|
1816
|
-
panelDescription && /* @__PURE__ */ (0,
|
|
2022
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "arap-heading", children: [
|
|
2023
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "arap-heading-copy", children: [
|
|
2024
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { children: panelTitle }),
|
|
2025
|
+
panelDescription && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { id: `${ctx.panelId}-description`, className: "arap-description", children: panelDescription })
|
|
1817
2026
|
] }),
|
|
1818
|
-
/* @__PURE__ */ (0,
|
|
2027
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1819
2028
|
"button",
|
|
1820
2029
|
{
|
|
1821
2030
|
type: "button",
|
|
@@ -1825,7 +2034,7 @@ function Panel({
|
|
|
1825
2034
|
}
|
|
1826
2035
|
)
|
|
1827
2036
|
] }),
|
|
1828
|
-
/* @__PURE__ */ (0,
|
|
2037
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1829
2038
|
"button",
|
|
1830
2039
|
{
|
|
1831
2040
|
type: "button",
|
|
@@ -1839,7 +2048,7 @@ function Panel({
|
|
|
1839
2048
|
children: strings.skipToActions
|
|
1840
2049
|
}
|
|
1841
2050
|
),
|
|
1842
|
-
/* @__PURE__ */ (0,
|
|
2051
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PanelActionsContext.Provider, { value: actions, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1843
2052
|
"div",
|
|
1844
2053
|
{
|
|
1845
2054
|
className: "arap-tools",
|
|
@@ -1849,19 +2058,19 @@ function Panel({
|
|
|
1849
2058
|
children
|
|
1850
2059
|
}
|
|
1851
2060
|
) }),
|
|
1852
|
-
/* @__PURE__ */ (0,
|
|
2061
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1853
2062
|
"div",
|
|
1854
2063
|
{
|
|
1855
2064
|
className: "arap-quick-actions",
|
|
1856
2065
|
role: "group",
|
|
1857
2066
|
"aria-label": strings.quickActionsLabel,
|
|
1858
2067
|
children: [
|
|
1859
|
-
/* @__PURE__ */ (0,
|
|
1860
|
-
/* @__PURE__ */ (0,
|
|
2068
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PositionControls, {}, ctx.isOpen ? "open" : "closed"),
|
|
2069
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "arap-actions", ref: setActions, children: footer })
|
|
1861
2070
|
]
|
|
1862
2071
|
}
|
|
1863
2072
|
),
|
|
1864
|
-
effectiveStatementUrl && /* @__PURE__ */ (0,
|
|
2073
|
+
effectiveStatementUrl && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "arap-statement", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1865
2074
|
"a",
|
|
1866
2075
|
{
|
|
1867
2076
|
href: effectiveStatementUrl,
|
|
@@ -1870,7 +2079,7 @@ function Panel({
|
|
|
1870
2079
|
rel: "noopener noreferrer",
|
|
1871
2080
|
children: [
|
|
1872
2081
|
strings.statementLink,
|
|
1873
|
-
/* @__PURE__ */ (0,
|
|
2082
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "arap-sr-only", children: [
|
|
1874
2083
|
" (",
|
|
1875
2084
|
strings.openInNewTab,
|
|
1876
2085
|
")"
|
|
@@ -1878,11 +2087,11 @@ function Panel({
|
|
|
1878
2087
|
]
|
|
1879
2088
|
}
|
|
1880
2089
|
) }),
|
|
1881
|
-
/* @__PURE__ */ (0,
|
|
1882
|
-
/* @__PURE__ */ (0,
|
|
2090
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "arap-credits", children: [
|
|
2091
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { children: [
|
|
1883
2092
|
strings.creditsPrefix ?? "Designed and developed by",
|
|
1884
2093
|
" ",
|
|
1885
|
-
/* @__PURE__ */ (0,
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1886
2095
|
"a",
|
|
1887
2096
|
{
|
|
1888
2097
|
href: "https://www.praboth.com",
|
|
@@ -1890,7 +2099,7 @@ function Panel({
|
|
|
1890
2099
|
rel: "noopener noreferrer",
|
|
1891
2100
|
children: [
|
|
1892
2101
|
strings.creditsName ?? "Praboth",
|
|
1893
|
-
/* @__PURE__ */ (0,
|
|
2102
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "arap-sr-only", children: [
|
|
1894
2103
|
" (",
|
|
1895
2104
|
strings.openInNewTab,
|
|
1896
2105
|
")"
|
|
@@ -1899,7 +2108,7 @@ function Panel({
|
|
|
1899
2108
|
}
|
|
1900
2109
|
)
|
|
1901
2110
|
] }),
|
|
1902
|
-
/* @__PURE__ */ (0,
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1903
2112
|
"a",
|
|
1904
2113
|
{
|
|
1905
2114
|
href: "https://www.praboth.com/accessibility-plugin-react",
|
|
@@ -1907,7 +2116,7 @@ function Panel({
|
|
|
1907
2116
|
rel: "noopener noreferrer",
|
|
1908
2117
|
children: [
|
|
1909
2118
|
strings.documentationLink ?? "Official documentation",
|
|
1910
|
-
/* @__PURE__ */ (0,
|
|
2119
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "arap-sr-only", children: [
|
|
1911
2120
|
" (",
|
|
1912
2121
|
strings.openInNewTab,
|
|
1913
2122
|
")"
|
|
@@ -1921,18 +2130,18 @@ function Panel({
|
|
|
1921
2130
|
);
|
|
1922
2131
|
}
|
|
1923
2132
|
function AccessibilityList(props) {
|
|
1924
|
-
const ctx = (0,
|
|
2133
|
+
const ctx = (0, import_react10.useContext)(AccessibilityContext);
|
|
1925
2134
|
if (!ctx)
|
|
1926
2135
|
throw new Error(
|
|
1927
2136
|
"AccessibilityList must be used within an <AccessibilityPlugin> provider."
|
|
1928
2137
|
);
|
|
1929
|
-
return /* @__PURE__ */ (0,
|
|
2138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(WidgetPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Panel, { ...props }) });
|
|
1930
2139
|
}
|
|
1931
2140
|
|
|
1932
2141
|
// src/core/useAccessibility.ts
|
|
1933
|
-
var
|
|
2142
|
+
var import_react11 = require("react");
|
|
1934
2143
|
function useAccessibility(featureKey, defaultValue, options) {
|
|
1935
|
-
const ctx = (0,
|
|
2144
|
+
const ctx = (0, import_react11.useContext)(AccessibilityContext);
|
|
1936
2145
|
if (!ctx)
|
|
1937
2146
|
throw new Error(
|
|
1938
2147
|
"useAccessibility must be used within an <AccessibilityPlugin> provider."
|
|
@@ -1941,16 +2150,16 @@ function useAccessibility(featureKey, defaultValue, options) {
|
|
|
1941
2150
|
throw new Error(
|
|
1942
2151
|
"Feature keys must be nonempty and cannot be prototype keys."
|
|
1943
2152
|
);
|
|
1944
|
-
const [definition] = (0,
|
|
2153
|
+
const [definition] = (0, import_react11.useState)({ defaultValue, ...options });
|
|
1945
2154
|
const { registerFeature, setFeatureState } = ctx;
|
|
1946
|
-
(0,
|
|
2155
|
+
(0, import_react11.useEffect)(() => {
|
|
1947
2156
|
registerFeature(featureKey, definition);
|
|
1948
2157
|
}, [featureKey, registerFeature, definition]);
|
|
1949
|
-
const setValue = (0,
|
|
2158
|
+
const setValue = (0, import_react11.useCallback)(
|
|
1950
2159
|
(next) => setFeatureState(featureKey, next),
|
|
1951
2160
|
[featureKey, setFeatureState]
|
|
1952
2161
|
);
|
|
1953
|
-
const reset = (0,
|
|
2162
|
+
const reset = (0, import_react11.useCallback)(
|
|
1954
2163
|
() => setFeatureState(featureKey, definition.defaultValue),
|
|
1955
2164
|
[featureKey, setFeatureState, definition]
|
|
1956
2165
|
);
|
|
@@ -2266,60 +2475,73 @@ function preferencesReducer(state, action) {
|
|
|
2266
2475
|
}
|
|
2267
2476
|
|
|
2268
2477
|
// src/core/FeatureIcon.tsx
|
|
2269
|
-
var
|
|
2478
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2270
2479
|
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,
|
|
2480
|
+
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" }) }),
|
|
2481
|
+
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" }) }),
|
|
2482
|
+
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" }) }),
|
|
2483
|
+
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" }) }),
|
|
2484
|
+
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" }) }),
|
|
2485
|
+
contrast: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2486
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
2488
|
+
] }),
|
|
2489
|
+
contrastMode: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2490
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
2491
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
2492
|
+
] }),
|
|
2493
|
+
saturation: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2494
|
+
/* @__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" }),
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M8 15a4 4 0 0 0 4 4" })
|
|
2279
2496
|
] }),
|
|
2280
|
-
|
|
2281
|
-
/* @__PURE__ */ (0,
|
|
2282
|
-
/* @__PURE__ */ (0,
|
|
2497
|
+
invertColors: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2498
|
+
/* @__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" }),
|
|
2499
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M12 3v19" })
|
|
2283
2500
|
] }),
|
|
2284
|
-
|
|
2285
|
-
/* @__PURE__ */ (0,
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2501
|
+
grayscale: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2502
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "8", cy: "12", r: "5" }),
|
|
2503
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "16", cy: "12", r: "5" }),
|
|
2504
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M8 7v10M16 7v10" })
|
|
2287
2505
|
] }),
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
/* @__PURE__ */ (0,
|
|
2506
|
+
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" }) }),
|
|
2507
|
+
highlightFocus: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2508
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4" }),
|
|
2509
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
2291
2510
|
] }),
|
|
2292
|
-
|
|
2293
|
-
/* @__PURE__ */ (0,
|
|
2294
|
-
/* @__PURE__ */ (0,
|
|
2295
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8 7v10M16 7v10" })
|
|
2511
|
+
focusHighlight: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4" }),
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
2296
2514
|
] }),
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
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" })
|
|
2515
|
+
reduceMotion: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2516
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 8h4M3 12h6M3 16h4" }),
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "14", y: "6", width: "2", height: "12", rx: "1" }),
|
|
2518
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "18", y: "6", width: "2", height: "12", rx: "1" })
|
|
2304
2519
|
] }),
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2520
|
+
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" }) }),
|
|
2521
|
+
fontFamily: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) }),
|
|
2522
|
+
hideImages: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2523
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
2524
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "8", cy: "9", r: "1" }),
|
|
2525
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "m3 17 5-5 4 4 3-3 6 5M2 2l20 20" })
|
|
2308
2526
|
] }),
|
|
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" })
|
|
2527
|
+
hideVideos: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2528
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "3", y: "5", width: "13", height: "14", rx: "2" }),
|
|
2529
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "m16 10 5-3v10l-5-3M2 2l20 20" })
|
|
2314
2530
|
] }),
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
/* @__PURE__ */ (0,
|
|
2531
|
+
bigCursor: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "m5 3 14 11-7 1-3 6Z" }),
|
|
2532
|
+
readingMask: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2533
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
2534
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 9h18M3 15h18" }),
|
|
2535
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M6 12h12" })
|
|
2318
2536
|
] }),
|
|
2319
|
-
|
|
2537
|
+
readingGuide: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
2538
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 5h18M3 10h12M3 19h18" }),
|
|
2539
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M2 15h20", strokeWidth: "3" })
|
|
2540
|
+
] }),
|
|
2541
|
+
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
2542
|
};
|
|
2321
2543
|
function FeatureIcon({ name }) {
|
|
2322
|
-
return /* @__PURE__ */ (0,
|
|
2544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2323
2545
|
"svg",
|
|
2324
2546
|
{
|
|
2325
2547
|
className: "arap-icon",
|
|
@@ -2337,7 +2559,7 @@ function FeatureIcon({ name }) {
|
|
|
2337
2559
|
}
|
|
2338
2560
|
|
|
2339
2561
|
// src/features/FontSizeController.tsx
|
|
2340
|
-
var
|
|
2562
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2341
2563
|
var FEATURE_KEY = "fontSize";
|
|
2342
2564
|
var DEFAULT_VALUE = 100;
|
|
2343
2565
|
var MIN = 50;
|
|
@@ -2381,19 +2603,19 @@ function FontSizeController({
|
|
|
2381
2603
|
};
|
|
2382
2604
|
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= MIN;
|
|
2383
2605
|
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= MAX;
|
|
2384
|
-
return /* @__PURE__ */ (0,
|
|
2606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2385
2607
|
"div",
|
|
2386
2608
|
{
|
|
2387
2609
|
className: "arap-feature arap-feature-stepper",
|
|
2388
2610
|
role: "group",
|
|
2389
2611
|
"aria-label": "Font Size",
|
|
2390
2612
|
children: [
|
|
2391
|
-
/* @__PURE__ */ (0,
|
|
2392
|
-
/* @__PURE__ */ (0,
|
|
2393
|
-
/* @__PURE__ */ (0,
|
|
2613
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "arap-label", children: [
|
|
2614
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FeatureIcon, { name: FEATURE_KEY }),
|
|
2615
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Font Size" })
|
|
2394
2616
|
] }),
|
|
2395
|
-
/* @__PURE__ */ (0,
|
|
2396
|
-
/* @__PURE__ */ (0,
|
|
2617
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "arap-controls", children: [
|
|
2618
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2397
2619
|
"button",
|
|
2398
2620
|
{
|
|
2399
2621
|
className: "arap-btn-sm",
|
|
@@ -2404,11 +2626,11 @@ function FontSizeController({
|
|
|
2404
2626
|
children: "\u2212"
|
|
2405
2627
|
}
|
|
2406
2628
|
),
|
|
2407
|
-
/* @__PURE__ */ (0,
|
|
2629
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2408
2630
|
Math.round(value),
|
|
2409
2631
|
"%"
|
|
2410
2632
|
] }),
|
|
2411
|
-
/* @__PURE__ */ (0,
|
|
2633
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2412
2634
|
"button",
|
|
2413
2635
|
{
|
|
2414
2636
|
className: "arap-btn-sm",
|
|
@@ -2426,7 +2648,7 @@ function FontSizeController({
|
|
|
2426
2648
|
}
|
|
2427
2649
|
|
|
2428
2650
|
// src/features/TextScaleController.tsx
|
|
2429
|
-
var
|
|
2651
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2430
2652
|
var FEATURE_KEY2 = "fontScale";
|
|
2431
2653
|
var DEFAULT_VALUE2 = 1;
|
|
2432
2654
|
function TextScaleController({
|
|
@@ -2457,19 +2679,19 @@ function TextScaleController({
|
|
|
2457
2679
|
}
|
|
2458
2680
|
};
|
|
2459
2681
|
const percentage = Math.round(value * 100);
|
|
2460
|
-
return /* @__PURE__ */ (0,
|
|
2682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2461
2683
|
"div",
|
|
2462
2684
|
{
|
|
2463
2685
|
className: "arap-feature arap-feature-stepper",
|
|
2464
2686
|
role: "group",
|
|
2465
2687
|
"aria-label": label,
|
|
2466
2688
|
children: [
|
|
2467
|
-
/* @__PURE__ */ (0,
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2689
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "arap-label", children: [
|
|
2690
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FeatureIcon, { name: "fontSize" }),
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: label })
|
|
2470
2692
|
] }),
|
|
2471
|
-
/* @__PURE__ */ (0,
|
|
2472
|
-
/* @__PURE__ */ (0,
|
|
2693
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "arap-controls", children: [
|
|
2694
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2473
2695
|
"button",
|
|
2474
2696
|
{
|
|
2475
2697
|
className: "arap-btn-sm",
|
|
@@ -2480,11 +2702,11 @@ function TextScaleController({
|
|
|
2480
2702
|
children: "\u2212"
|
|
2481
2703
|
}
|
|
2482
2704
|
),
|
|
2483
|
-
/* @__PURE__ */ (0,
|
|
2705
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2484
2706
|
percentage,
|
|
2485
2707
|
"%"
|
|
2486
2708
|
] }),
|
|
2487
|
-
/* @__PURE__ */ (0,
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2488
2710
|
"button",
|
|
2489
2711
|
{
|
|
2490
2712
|
className: "arap-btn-sm",
|
|
@@ -2502,7 +2724,7 @@ function TextScaleController({
|
|
|
2502
2724
|
}
|
|
2503
2725
|
|
|
2504
2726
|
// src/features/LineHeightController.tsx
|
|
2505
|
-
var
|
|
2727
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2506
2728
|
var FEATURE_KEY3 = "lineHeight";
|
|
2507
2729
|
var DEFAULT_VALUE3 = 100;
|
|
2508
2730
|
var MIN2 = 50;
|
|
@@ -2546,19 +2768,19 @@ function LineHeightController({
|
|
|
2546
2768
|
};
|
|
2547
2769
|
const isMin = steps && steps.length > 0 ? normalizedValue <= steps[0] : normalizedValue <= MIN2;
|
|
2548
2770
|
const isMax = steps && steps.length > 0 ? normalizedValue >= steps[steps.length - 1] : normalizedValue >= MAX2;
|
|
2549
|
-
return /* @__PURE__ */ (0,
|
|
2771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2550
2772
|
"div",
|
|
2551
2773
|
{
|
|
2552
2774
|
className: "arap-feature arap-feature-stepper",
|
|
2553
2775
|
role: "group",
|
|
2554
2776
|
"aria-label": "Line Height",
|
|
2555
2777
|
children: [
|
|
2556
|
-
/* @__PURE__ */ (0,
|
|
2557
|
-
/* @__PURE__ */ (0,
|
|
2558
|
-
/* @__PURE__ */ (0,
|
|
2778
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "arap-label", children: [
|
|
2779
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FeatureIcon, { name: FEATURE_KEY3 }),
|
|
2780
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Line Height" })
|
|
2559
2781
|
] }),
|
|
2560
|
-
/* @__PURE__ */ (0,
|
|
2561
|
-
/* @__PURE__ */ (0,
|
|
2782
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "arap-controls", children: [
|
|
2783
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2562
2784
|
"button",
|
|
2563
2785
|
{
|
|
2564
2786
|
className: "arap-btn-sm",
|
|
@@ -2569,11 +2791,11 @@ function LineHeightController({
|
|
|
2569
2791
|
children: "\u2212"
|
|
2570
2792
|
}
|
|
2571
2793
|
),
|
|
2572
|
-
/* @__PURE__ */ (0,
|
|
2794
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2573
2795
|
Math.round(normalizedValue),
|
|
2574
2796
|
"%"
|
|
2575
2797
|
] }),
|
|
2576
|
-
/* @__PURE__ */ (0,
|
|
2798
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2577
2799
|
"button",
|
|
2578
2800
|
{
|
|
2579
2801
|
className: "arap-btn-sm",
|
|
@@ -2591,7 +2813,7 @@ function LineHeightController({
|
|
|
2591
2813
|
}
|
|
2592
2814
|
|
|
2593
2815
|
// src/features/LetterSpacingController.tsx
|
|
2594
|
-
var
|
|
2816
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2595
2817
|
var FEATURE_KEY4 = "letterSpacing";
|
|
2596
2818
|
var DEFAULT_VALUE4 = 0;
|
|
2597
2819
|
var MIN3 = 0;
|
|
@@ -2635,19 +2857,19 @@ function LetterSpacingController({
|
|
|
2635
2857
|
};
|
|
2636
2858
|
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2637
2859
|
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2638
|
-
return /* @__PURE__ */ (0,
|
|
2860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2639
2861
|
"div",
|
|
2640
2862
|
{
|
|
2641
2863
|
className: "arap-feature arap-feature-stepper",
|
|
2642
2864
|
role: "group",
|
|
2643
2865
|
"aria-label": "Letter Spacing",
|
|
2644
2866
|
children: [
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2646
|
-
/* @__PURE__ */ (0,
|
|
2647
|
-
/* @__PURE__ */ (0,
|
|
2867
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "arap-label", children: [
|
|
2868
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FeatureIcon, { name: FEATURE_KEY4 }),
|
|
2869
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "Letter Spacing" })
|
|
2648
2870
|
] }),
|
|
2649
|
-
/* @__PURE__ */ (0,
|
|
2650
|
-
/* @__PURE__ */ (0,
|
|
2871
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "arap-controls", children: [
|
|
2872
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2651
2873
|
"button",
|
|
2652
2874
|
{
|
|
2653
2875
|
className: "arap-btn-sm",
|
|
@@ -2658,11 +2880,11 @@ function LetterSpacingController({
|
|
|
2658
2880
|
children: "\u2212"
|
|
2659
2881
|
}
|
|
2660
2882
|
),
|
|
2661
|
-
/* @__PURE__ */ (0,
|
|
2883
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2662
2884
|
value,
|
|
2663
2885
|
"px"
|
|
2664
2886
|
] }),
|
|
2665
|
-
/* @__PURE__ */ (0,
|
|
2887
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2666
2888
|
"button",
|
|
2667
2889
|
{
|
|
2668
2890
|
className: "arap-btn-sm",
|
|
@@ -2680,7 +2902,7 @@ function LetterSpacingController({
|
|
|
2680
2902
|
}
|
|
2681
2903
|
|
|
2682
2904
|
// src/features/WordSpacingController.tsx
|
|
2683
|
-
var
|
|
2905
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2684
2906
|
var FEATURE_KEY5 = "wordSpacing";
|
|
2685
2907
|
var DEFAULT_VALUE5 = 0;
|
|
2686
2908
|
var MIN4 = 0;
|
|
@@ -2724,19 +2946,19 @@ function WordSpacingController({
|
|
|
2724
2946
|
};
|
|
2725
2947
|
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2726
2948
|
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2727
|
-
return /* @__PURE__ */ (0,
|
|
2949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2728
2950
|
"div",
|
|
2729
2951
|
{
|
|
2730
2952
|
className: "arap-feature arap-feature-stepper",
|
|
2731
2953
|
role: "group",
|
|
2732
2954
|
"aria-label": "Word Spacing",
|
|
2733
2955
|
children: [
|
|
2734
|
-
/* @__PURE__ */ (0,
|
|
2735
|
-
/* @__PURE__ */ (0,
|
|
2736
|
-
/* @__PURE__ */ (0,
|
|
2956
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "arap-label", children: [
|
|
2957
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FeatureIcon, { name: FEATURE_KEY5 }),
|
|
2958
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Word Spacing" })
|
|
2737
2959
|
] }),
|
|
2738
|
-
/* @__PURE__ */ (0,
|
|
2739
|
-
/* @__PURE__ */ (0,
|
|
2960
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "arap-controls", children: [
|
|
2961
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2740
2962
|
"button",
|
|
2741
2963
|
{
|
|
2742
2964
|
className: "arap-btn-sm",
|
|
@@ -2747,11 +2969,11 @@ function WordSpacingController({
|
|
|
2747
2969
|
children: "\u2212"
|
|
2748
2970
|
}
|
|
2749
2971
|
),
|
|
2750
|
-
/* @__PURE__ */ (0,
|
|
2972
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2751
2973
|
value,
|
|
2752
2974
|
"px"
|
|
2753
2975
|
] }),
|
|
2754
|
-
/* @__PURE__ */ (0,
|
|
2976
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2755
2977
|
"button",
|
|
2756
2978
|
{
|
|
2757
2979
|
className: "arap-btn-sm",
|
|
@@ -2769,7 +2991,7 @@ function WordSpacingController({
|
|
|
2769
2991
|
}
|
|
2770
2992
|
|
|
2771
2993
|
// src/features/ParagraphSpacingController.tsx
|
|
2772
|
-
var
|
|
2994
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2773
2995
|
var FEATURE_KEY6 = "paragraphSpacing";
|
|
2774
2996
|
var DEFAULT_VALUE6 = 0;
|
|
2775
2997
|
var MIN5 = 0;
|
|
@@ -2813,19 +3035,19 @@ function ParagraphSpacingController({
|
|
|
2813
3035
|
};
|
|
2814
3036
|
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2815
3037
|
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2816
|
-
return /* @__PURE__ */ (0,
|
|
3038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2817
3039
|
"div",
|
|
2818
3040
|
{
|
|
2819
3041
|
className: "arap-feature arap-feature-stepper",
|
|
2820
3042
|
role: "group",
|
|
2821
3043
|
"aria-label": "Paragraph Spacing",
|
|
2822
3044
|
children: [
|
|
2823
|
-
/* @__PURE__ */ (0,
|
|
2824
|
-
/* @__PURE__ */ (0,
|
|
2825
|
-
/* @__PURE__ */ (0,
|
|
3045
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "arap-label", children: [
|
|
3046
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FeatureIcon, { name: FEATURE_KEY6 }),
|
|
3047
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Paragraph Spacing" })
|
|
2826
3048
|
] }),
|
|
2827
|
-
/* @__PURE__ */ (0,
|
|
2828
|
-
/* @__PURE__ */ (0,
|
|
3049
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "arap-controls", children: [
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2829
3051
|
"button",
|
|
2830
3052
|
{
|
|
2831
3053
|
className: "arap-btn-sm",
|
|
@@ -2836,11 +3058,11 @@ function ParagraphSpacingController({
|
|
|
2836
3058
|
children: "\u2212"
|
|
2837
3059
|
}
|
|
2838
3060
|
),
|
|
2839
|
-
/* @__PURE__ */ (0,
|
|
3061
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2840
3062
|
value,
|
|
2841
3063
|
"px"
|
|
2842
3064
|
] }),
|
|
2843
|
-
/* @__PURE__ */ (0,
|
|
3065
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2844
3066
|
"button",
|
|
2845
3067
|
{
|
|
2846
3068
|
className: "arap-btn-sm",
|
|
@@ -2858,8 +3080,8 @@ function ParagraphSpacingController({
|
|
|
2858
3080
|
}
|
|
2859
3081
|
|
|
2860
3082
|
// src/features/ContrastController.tsx
|
|
2861
|
-
var
|
|
2862
|
-
var
|
|
3083
|
+
var import_react12 = require("react");
|
|
3084
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2863
3085
|
var FEATURE_KEY7 = "contrast";
|
|
2864
3086
|
var DEFAULT_VALUE7 = 0;
|
|
2865
3087
|
var LEVELS = [
|
|
@@ -2881,19 +3103,19 @@ function ContrastController() {
|
|
|
2881
3103
|
FEATURE_KEY7,
|
|
2882
3104
|
DEFAULT_VALUE7
|
|
2883
3105
|
);
|
|
2884
|
-
const forcedColors = (0,
|
|
3106
|
+
const forcedColors = (0, import_react12.useSyncExternalStore)(
|
|
2885
3107
|
subscribeForcedColors,
|
|
2886
3108
|
isForcedColorsActive,
|
|
2887
3109
|
() => false
|
|
2888
3110
|
);
|
|
2889
|
-
return /* @__PURE__ */ (0,
|
|
2890
|
-
/* @__PURE__ */ (0,
|
|
2891
|
-
/* @__PURE__ */ (0,
|
|
2892
|
-
/* @__PURE__ */ (0,
|
|
3111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
|
|
3112
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "arap-label", children: [
|
|
3113
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FeatureIcon, { name: FEATURE_KEY7 }),
|
|
3114
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Contrast" })
|
|
2893
3115
|
] }),
|
|
2894
|
-
/* @__PURE__ */ (0,
|
|
3116
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "arap-segmented", children: LEVELS.map((level) => {
|
|
2895
3117
|
const isActive = value === level.value || level.value === 0 && (value === "off" || value === "original");
|
|
2896
|
-
return /* @__PURE__ */ (0,
|
|
3118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2897
3119
|
"button",
|
|
2898
3120
|
{
|
|
2899
3121
|
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
@@ -2901,20 +3123,20 @@ function ContrastController() {
|
|
|
2901
3123
|
"aria-pressed": isActive,
|
|
2902
3124
|
type: "button",
|
|
2903
3125
|
children: [
|
|
2904
|
-
isActive && /* @__PURE__ */ (0,
|
|
3126
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2905
3127
|
level.label
|
|
2906
3128
|
]
|
|
2907
3129
|
},
|
|
2908
3130
|
String(level.value)
|
|
2909
3131
|
);
|
|
2910
3132
|
}) }),
|
|
2911
|
-
forcedColors && /* @__PURE__ */ (0,
|
|
3133
|
+
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
3134
|
] });
|
|
2913
3135
|
}
|
|
2914
3136
|
|
|
2915
3137
|
// src/features/ContrastModeController.tsx
|
|
2916
|
-
var
|
|
2917
|
-
var
|
|
3138
|
+
var import_react13 = require("react");
|
|
3139
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2918
3140
|
var FEATURE_KEY8 = "contrastMode";
|
|
2919
3141
|
var DEFAULT_VALUE8 = "off";
|
|
2920
3142
|
var OPTIONS = [
|
|
@@ -2929,19 +3151,19 @@ function ContrastModeController() {
|
|
|
2929
3151
|
FEATURE_KEY8,
|
|
2930
3152
|
DEFAULT_VALUE8
|
|
2931
3153
|
);
|
|
2932
|
-
const forcedColors = (0,
|
|
3154
|
+
const forcedColors = (0, import_react13.useSyncExternalStore)(
|
|
2933
3155
|
subscribeForcedColors,
|
|
2934
3156
|
isForcedColorsActive,
|
|
2935
3157
|
() => false
|
|
2936
3158
|
);
|
|
2937
|
-
return /* @__PURE__ */ (0,
|
|
2938
|
-
/* @__PURE__ */ (0,
|
|
2939
|
-
/* @__PURE__ */ (0,
|
|
2940
|
-
/* @__PURE__ */ (0,
|
|
3159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Contrast Mode", children: [
|
|
3160
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "arap-label", children: [
|
|
3161
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FeatureIcon, { name: FEATURE_KEY8 }),
|
|
3162
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Contrast Mode" })
|
|
2941
3163
|
] }),
|
|
2942
|
-
/* @__PURE__ */ (0,
|
|
3164
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "arap-segmented", children: OPTIONS.map((option) => {
|
|
2943
3165
|
const isActive = value === option.value || option.value === "off" && (value === "original" || !value);
|
|
2944
|
-
return /* @__PURE__ */ (0,
|
|
3166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2945
3167
|
"button",
|
|
2946
3168
|
{
|
|
2947
3169
|
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
@@ -2949,19 +3171,19 @@ function ContrastModeController() {
|
|
|
2949
3171
|
"aria-pressed": isActive,
|
|
2950
3172
|
type: "button",
|
|
2951
3173
|
children: [
|
|
2952
|
-
isActive && /* @__PURE__ */ (0,
|
|
3174
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2953
3175
|
option.label
|
|
2954
3176
|
]
|
|
2955
3177
|
},
|
|
2956
3178
|
option.value
|
|
2957
3179
|
);
|
|
2958
3180
|
}) }),
|
|
2959
|
-
forcedColors && /* @__PURE__ */ (0,
|
|
3181
|
+
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
3182
|
] });
|
|
2961
3183
|
}
|
|
2962
3184
|
|
|
2963
3185
|
// src/features/SaturationController.tsx
|
|
2964
|
-
var
|
|
3186
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2965
3187
|
var FEATURE_KEY9 = "saturation";
|
|
2966
3188
|
var DEFAULT_VALUE9 = 0;
|
|
2967
3189
|
var LEVELS2 = [
|
|
@@ -2974,12 +3196,12 @@ function SaturationController() {
|
|
|
2974
3196
|
FEATURE_KEY9,
|
|
2975
3197
|
DEFAULT_VALUE9
|
|
2976
3198
|
);
|
|
2977
|
-
return /* @__PURE__ */ (0,
|
|
2978
|
-
/* @__PURE__ */ (0,
|
|
2979
|
-
/* @__PURE__ */ (0,
|
|
2980
|
-
/* @__PURE__ */ (0,
|
|
3199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
|
|
3200
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "arap-label", children: [
|
|
3201
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FeatureIcon, { name: FEATURE_KEY9 }),
|
|
3202
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Saturation" })
|
|
2981
3203
|
] }),
|
|
2982
|
-
/* @__PURE__ */ (0,
|
|
3204
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2983
3205
|
"button",
|
|
2984
3206
|
{
|
|
2985
3207
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -2987,7 +3209,7 @@ function SaturationController() {
|
|
|
2987
3209
|
"aria-pressed": value === level.value,
|
|
2988
3210
|
type: "button",
|
|
2989
3211
|
children: [
|
|
2990
|
-
value === level.value && /* @__PURE__ */ (0,
|
|
3212
|
+
value === level.value && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2991
3213
|
level.label
|
|
2992
3214
|
]
|
|
2993
3215
|
},
|
|
@@ -2997,7 +3219,7 @@ function SaturationController() {
|
|
|
2997
3219
|
}
|
|
2998
3220
|
|
|
2999
3221
|
// src/features/InvertColorsController.tsx
|
|
3000
|
-
var
|
|
3222
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3001
3223
|
var FEATURE_KEY10 = "invertColors";
|
|
3002
3224
|
var DEFAULT_VALUE10 = false;
|
|
3003
3225
|
function InvertColorsController() {
|
|
@@ -3005,12 +3227,12 @@ function InvertColorsController() {
|
|
|
3005
3227
|
FEATURE_KEY10,
|
|
3006
3228
|
DEFAULT_VALUE10
|
|
3007
3229
|
);
|
|
3008
|
-
return /* @__PURE__ */ (0,
|
|
3009
|
-
/* @__PURE__ */ (0,
|
|
3010
|
-
/* @__PURE__ */ (0,
|
|
3011
|
-
/* @__PURE__ */ (0,
|
|
3230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
|
|
3231
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "arap-label", children: [
|
|
3232
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FeatureIcon, { name: FEATURE_KEY10 }),
|
|
3233
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Invert Colors" })
|
|
3012
3234
|
] }),
|
|
3013
|
-
/* @__PURE__ */ (0,
|
|
3235
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3014
3236
|
"button",
|
|
3015
3237
|
{
|
|
3016
3238
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3018,14 +3240,14 @@ function InvertColorsController() {
|
|
|
3018
3240
|
"aria-label": "Invert Colors",
|
|
3019
3241
|
"aria-pressed": value,
|
|
3020
3242
|
type: "button",
|
|
3021
|
-
children: /* @__PURE__ */ (0,
|
|
3243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3022
3244
|
}
|
|
3023
3245
|
)
|
|
3024
3246
|
] });
|
|
3025
3247
|
}
|
|
3026
3248
|
|
|
3027
3249
|
// src/features/GrayscaleController.tsx
|
|
3028
|
-
var
|
|
3250
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3029
3251
|
var FEATURE_KEY11 = "grayscale";
|
|
3030
3252
|
var DEFAULT_VALUE11 = false;
|
|
3031
3253
|
function GrayscaleController() {
|
|
@@ -3033,12 +3255,12 @@ function GrayscaleController() {
|
|
|
3033
3255
|
FEATURE_KEY11,
|
|
3034
3256
|
DEFAULT_VALUE11
|
|
3035
3257
|
);
|
|
3036
|
-
return /* @__PURE__ */ (0,
|
|
3037
|
-
/* @__PURE__ */ (0,
|
|
3038
|
-
/* @__PURE__ */ (0,
|
|
3039
|
-
/* @__PURE__ */ (0,
|
|
3258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
|
|
3259
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "arap-label", children: [
|
|
3260
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FeatureIcon, { name: FEATURE_KEY11 }),
|
|
3261
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Grayscale" })
|
|
3040
3262
|
] }),
|
|
3041
|
-
/* @__PURE__ */ (0,
|
|
3263
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3042
3264
|
"button",
|
|
3043
3265
|
{
|
|
3044
3266
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3046,14 +3268,14 @@ function GrayscaleController() {
|
|
|
3046
3268
|
"aria-label": "Grayscale",
|
|
3047
3269
|
"aria-pressed": value,
|
|
3048
3270
|
type: "button",
|
|
3049
|
-
children: /* @__PURE__ */ (0,
|
|
3271
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3050
3272
|
}
|
|
3051
3273
|
)
|
|
3052
3274
|
] });
|
|
3053
3275
|
}
|
|
3054
3276
|
|
|
3055
3277
|
// src/features/LinkHighlightController.tsx
|
|
3056
|
-
var
|
|
3278
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3057
3279
|
var FEATURE_KEY12 = "linkHighlight";
|
|
3058
3280
|
var DEFAULT_VALUE12 = false;
|
|
3059
3281
|
function LinkHighlightController() {
|
|
@@ -3061,12 +3283,12 @@ function LinkHighlightController() {
|
|
|
3061
3283
|
FEATURE_KEY12,
|
|
3062
3284
|
DEFAULT_VALUE12
|
|
3063
3285
|
);
|
|
3064
|
-
return /* @__PURE__ */ (0,
|
|
3065
|
-
/* @__PURE__ */ (0,
|
|
3066
|
-
/* @__PURE__ */ (0,
|
|
3067
|
-
/* @__PURE__ */ (0,
|
|
3286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
|
|
3287
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "arap-label", children: [
|
|
3288
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FeatureIcon, { name: FEATURE_KEY12 }),
|
|
3289
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Link Highlight" })
|
|
3068
3290
|
] }),
|
|
3069
|
-
/* @__PURE__ */ (0,
|
|
3291
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3070
3292
|
"button",
|
|
3071
3293
|
{
|
|
3072
3294
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3074,10 +3296,10 @@ function LinkHighlightController() {
|
|
|
3074
3296
|
"aria-label": "Link Highlight",
|
|
3075
3297
|
"aria-pressed": !!value,
|
|
3076
3298
|
type: "button",
|
|
3077
|
-
children: /* @__PURE__ */ (0,
|
|
3299
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3078
3300
|
}
|
|
3079
3301
|
),
|
|
3080
|
-
/* @__PURE__ */ (0,
|
|
3302
|
+
/* @__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
3303
|
"button",
|
|
3082
3304
|
{
|
|
3083
3305
|
type: "button",
|
|
@@ -3085,7 +3307,7 @@ function LinkHighlightController() {
|
|
|
3085
3307
|
"aria-pressed": value === mode,
|
|
3086
3308
|
onClick: () => setValue(mode),
|
|
3087
3309
|
children: [
|
|
3088
|
-
value === mode && /* @__PURE__ */ (0,
|
|
3310
|
+
value === mode && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3089
3311
|
mode.split("-").join(" ")
|
|
3090
3312
|
]
|
|
3091
3313
|
},
|
|
@@ -3095,7 +3317,7 @@ function LinkHighlightController() {
|
|
|
3095
3317
|
}
|
|
3096
3318
|
|
|
3097
3319
|
// src/features/TextAlignController.tsx
|
|
3098
|
-
var
|
|
3320
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3099
3321
|
var FEATURE_KEY13 = "textAlign";
|
|
3100
3322
|
var DEFAULT_VALUE13 = "default";
|
|
3101
3323
|
var OPTIONS2 = ["default", "left", "center", "right", "justify"];
|
|
@@ -3104,12 +3326,12 @@ function TextAlignController() {
|
|
|
3104
3326
|
FEATURE_KEY13,
|
|
3105
3327
|
DEFAULT_VALUE13
|
|
3106
3328
|
);
|
|
3107
|
-
return /* @__PURE__ */ (0,
|
|
3108
|
-
/* @__PURE__ */ (0,
|
|
3109
|
-
/* @__PURE__ */ (0,
|
|
3110
|
-
/* @__PURE__ */ (0,
|
|
3329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
|
|
3330
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "arap-label", children: [
|
|
3331
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FeatureIcon, { name: FEATURE_KEY13 }),
|
|
3332
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Text Alignment" })
|
|
3111
3333
|
] }),
|
|
3112
|
-
/* @__PURE__ */ (0,
|
|
3334
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "arap-segmented", children: OPTIONS2.map((option) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3113
3335
|
"button",
|
|
3114
3336
|
{
|
|
3115
3337
|
className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
|
|
@@ -3118,13 +3340,13 @@ function TextAlignController() {
|
|
|
3118
3340
|
type: "button",
|
|
3119
3341
|
style: { textTransform: "capitalize" },
|
|
3120
3342
|
children: [
|
|
3121
|
-
value === option && /* @__PURE__ */ (0,
|
|
3343
|
+
value === option && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3122
3344
|
option
|
|
3123
3345
|
]
|
|
3124
3346
|
},
|
|
3125
3347
|
option
|
|
3126
3348
|
)) }),
|
|
3127
|
-
value === "justify" && /* @__PURE__ */ (0,
|
|
3349
|
+
value === "justify" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3128
3350
|
"div",
|
|
3129
3351
|
{
|
|
3130
3352
|
className: "arap-notice arap-notice-warning",
|
|
@@ -3137,7 +3359,7 @@ function TextAlignController() {
|
|
|
3137
3359
|
}
|
|
3138
3360
|
|
|
3139
3361
|
// src/features/FontFamilyController.tsx
|
|
3140
|
-
var
|
|
3362
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3141
3363
|
var FEATURE_KEY14 = "fontFamily";
|
|
3142
3364
|
var DEFAULT_VALUE14 = "default";
|
|
3143
3365
|
var OPTIONS3 = [
|
|
@@ -3150,14 +3372,14 @@ function FontFamilyController() {
|
|
|
3150
3372
|
FEATURE_KEY14,
|
|
3151
3373
|
DEFAULT_VALUE14
|
|
3152
3374
|
);
|
|
3153
|
-
return /* @__PURE__ */ (0,
|
|
3154
|
-
/* @__PURE__ */ (0,
|
|
3155
|
-
/* @__PURE__ */ (0,
|
|
3156
|
-
/* @__PURE__ */ (0,
|
|
3375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Font Family", children: [
|
|
3376
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "arap-label", children: [
|
|
3377
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
3378
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Font Family" })
|
|
3157
3379
|
] }),
|
|
3158
|
-
/* @__PURE__ */ (0,
|
|
3380
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "arap-segmented", children: OPTIONS3.map((option) => {
|
|
3159
3381
|
const isActive = value === option.value || option.value === "default" && (value === "original" || !value || value === "default");
|
|
3160
|
-
return /* @__PURE__ */ (0,
|
|
3382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3161
3383
|
"button",
|
|
3162
3384
|
{
|
|
3163
3385
|
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
@@ -3165,7 +3387,7 @@ function FontFamilyController() {
|
|
|
3165
3387
|
"aria-pressed": isActive,
|
|
3166
3388
|
type: "button",
|
|
3167
3389
|
children: [
|
|
3168
|
-
isActive && /* @__PURE__ */ (0,
|
|
3390
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3169
3391
|
option.label
|
|
3170
3392
|
]
|
|
3171
3393
|
},
|
|
@@ -3176,7 +3398,7 @@ function FontFamilyController() {
|
|
|
3176
3398
|
}
|
|
3177
3399
|
|
|
3178
3400
|
// src/features/HideImagesController.tsx
|
|
3179
|
-
var
|
|
3401
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3180
3402
|
var FEATURE_KEY15 = "hideImages";
|
|
3181
3403
|
var DEFAULT_VALUE15 = false;
|
|
3182
3404
|
function HideImagesController() {
|
|
@@ -3184,12 +3406,12 @@ function HideImagesController() {
|
|
|
3184
3406
|
FEATURE_KEY15,
|
|
3185
3407
|
DEFAULT_VALUE15
|
|
3186
3408
|
);
|
|
3187
|
-
return /* @__PURE__ */ (0,
|
|
3188
|
-
/* @__PURE__ */ (0,
|
|
3189
|
-
/* @__PURE__ */ (0,
|
|
3190
|
-
/* @__PURE__ */ (0,
|
|
3409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
3410
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "arap-label", children: [
|
|
3411
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
3412
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "Hide Images" })
|
|
3191
3413
|
] }),
|
|
3192
|
-
/* @__PURE__ */ (0,
|
|
3414
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3193
3415
|
"button",
|
|
3194
3416
|
{
|
|
3195
3417
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3197,14 +3419,14 @@ function HideImagesController() {
|
|
|
3197
3419
|
"aria-label": "Hide Images",
|
|
3198
3420
|
"aria-pressed": value,
|
|
3199
3421
|
type: "button",
|
|
3200
|
-
children: /* @__PURE__ */ (0,
|
|
3422
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3201
3423
|
}
|
|
3202
3424
|
)
|
|
3203
3425
|
] });
|
|
3204
3426
|
}
|
|
3205
3427
|
|
|
3206
3428
|
// src/features/HideVideosController.tsx
|
|
3207
|
-
var
|
|
3429
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3208
3430
|
var FEATURE_KEY16 = "hideVideos";
|
|
3209
3431
|
var DEFAULT_VALUE16 = false;
|
|
3210
3432
|
function HideVideosController() {
|
|
@@ -3212,12 +3434,12 @@ function HideVideosController() {
|
|
|
3212
3434
|
FEATURE_KEY16,
|
|
3213
3435
|
DEFAULT_VALUE16
|
|
3214
3436
|
);
|
|
3215
|
-
return /* @__PURE__ */ (0,
|
|
3216
|
-
/* @__PURE__ */ (0,
|
|
3217
|
-
/* @__PURE__ */ (0,
|
|
3218
|
-
/* @__PURE__ */ (0,
|
|
3437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
|
|
3438
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "arap-label", children: [
|
|
3439
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureIcon, { name: FEATURE_KEY16 }),
|
|
3440
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "Hide Videos" })
|
|
3219
3441
|
] }),
|
|
3220
|
-
/* @__PURE__ */ (0,
|
|
3442
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3221
3443
|
"button",
|
|
3222
3444
|
{
|
|
3223
3445
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3225,14 +3447,14 @@ function HideVideosController() {
|
|
|
3225
3447
|
"aria-label": "Hide Videos",
|
|
3226
3448
|
"aria-pressed": value,
|
|
3227
3449
|
type: "button",
|
|
3228
|
-
children: /* @__PURE__ */ (0,
|
|
3450
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3229
3451
|
}
|
|
3230
3452
|
)
|
|
3231
3453
|
] });
|
|
3232
3454
|
}
|
|
3233
3455
|
|
|
3234
3456
|
// src/features/BigCursorController.tsx
|
|
3235
|
-
var
|
|
3457
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3236
3458
|
var FEATURE_KEY17 = "bigCursor";
|
|
3237
3459
|
var DEFAULT_VALUE17 = false;
|
|
3238
3460
|
function BigCursorController() {
|
|
@@ -3240,12 +3462,12 @@ function BigCursorController() {
|
|
|
3240
3462
|
FEATURE_KEY17,
|
|
3241
3463
|
DEFAULT_VALUE17
|
|
3242
3464
|
);
|
|
3243
|
-
return /* @__PURE__ */ (0,
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3245
|
-
/* @__PURE__ */ (0,
|
|
3246
|
-
/* @__PURE__ */ (0,
|
|
3465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
3466
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "arap-label", children: [
|
|
3467
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
3468
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Big Cursor" })
|
|
3247
3469
|
] }),
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
3470
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3249
3471
|
"button",
|
|
3250
3472
|
{
|
|
3251
3473
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3253,14 +3475,14 @@ function BigCursorController() {
|
|
|
3253
3475
|
"aria-label": "Big Cursor",
|
|
3254
3476
|
"aria-pressed": value,
|
|
3255
3477
|
type: "button",
|
|
3256
|
-
children: /* @__PURE__ */ (0,
|
|
3478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3257
3479
|
}
|
|
3258
3480
|
)
|
|
3259
3481
|
] });
|
|
3260
3482
|
}
|
|
3261
3483
|
|
|
3262
3484
|
// src/features/ReadingMaskController.tsx
|
|
3263
|
-
var
|
|
3485
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3264
3486
|
var FEATURE_KEY18 = "readingMask";
|
|
3265
3487
|
var DEFAULT_VALUE18 = false;
|
|
3266
3488
|
function ReadingMaskController() {
|
|
@@ -3268,12 +3490,12 @@ function ReadingMaskController() {
|
|
|
3268
3490
|
FEATURE_KEY18,
|
|
3269
3491
|
DEFAULT_VALUE18
|
|
3270
3492
|
);
|
|
3271
|
-
return /* @__PURE__ */ (0,
|
|
3272
|
-
/* @__PURE__ */ (0,
|
|
3273
|
-
/* @__PURE__ */ (0,
|
|
3274
|
-
/* @__PURE__ */ (0,
|
|
3493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
|
|
3494
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "arap-label", children: [
|
|
3495
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FeatureIcon, { name: FEATURE_KEY18 }),
|
|
3496
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Reading Mask" })
|
|
3275
3497
|
] }),
|
|
3276
|
-
/* @__PURE__ */ (0,
|
|
3498
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3277
3499
|
"button",
|
|
3278
3500
|
{
|
|
3279
3501
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3281,14 +3503,14 @@ function ReadingMaskController() {
|
|
|
3281
3503
|
"aria-label": "Reading Mask",
|
|
3282
3504
|
"aria-pressed": value,
|
|
3283
3505
|
type: "button",
|
|
3284
|
-
children: /* @__PURE__ */ (0,
|
|
3506
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3285
3507
|
}
|
|
3286
3508
|
)
|
|
3287
3509
|
] });
|
|
3288
3510
|
}
|
|
3289
3511
|
|
|
3290
3512
|
// src/features/ReadingGuideController.tsx
|
|
3291
|
-
var
|
|
3513
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3292
3514
|
var FEATURE_KEY19 = "readingGuide";
|
|
3293
3515
|
var DEFAULT_VALUE19 = false;
|
|
3294
3516
|
function ReadingGuideController() {
|
|
@@ -3296,12 +3518,12 @@ function ReadingGuideController() {
|
|
|
3296
3518
|
FEATURE_KEY19,
|
|
3297
3519
|
DEFAULT_VALUE19
|
|
3298
3520
|
);
|
|
3299
|
-
return /* @__PURE__ */ (0,
|
|
3300
|
-
/* @__PURE__ */ (0,
|
|
3301
|
-
/* @__PURE__ */ (0,
|
|
3302
|
-
/* @__PURE__ */ (0,
|
|
3521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
|
|
3522
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "arap-label", children: [
|
|
3523
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FeatureIcon, { name: FEATURE_KEY19 }),
|
|
3524
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Reading Guide" })
|
|
3303
3525
|
] }),
|
|
3304
|
-
/* @__PURE__ */ (0,
|
|
3526
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3305
3527
|
"button",
|
|
3306
3528
|
{
|
|
3307
3529
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -3309,35 +3531,99 @@ function ReadingGuideController() {
|
|
|
3309
3531
|
"aria-label": "Reading Guide",
|
|
3310
3532
|
"aria-pressed": value,
|
|
3311
3533
|
type: "button",
|
|
3312
|
-
children: /* @__PURE__ */ (0,
|
|
3534
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3535
|
+
}
|
|
3536
|
+
)
|
|
3537
|
+
] });
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
// src/features/HighlightFocusController.tsx
|
|
3541
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3542
|
+
var FEATURE_KEY20 = "highlightFocus";
|
|
3543
|
+
var DEFAULT_VALUE20 = false;
|
|
3544
|
+
function HighlightFocusController() {
|
|
3545
|
+
const { value, setValue } = useAccessibility(
|
|
3546
|
+
FEATURE_KEY20,
|
|
3547
|
+
DEFAULT_VALUE20
|
|
3548
|
+
);
|
|
3549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Highlight Focus", children: [
|
|
3550
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "arap-label", children: [
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FeatureIcon, { name: FEATURE_KEY20 }),
|
|
3552
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: "Highlight Focus" })
|
|
3553
|
+
] }),
|
|
3554
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3555
|
+
"button",
|
|
3556
|
+
{
|
|
3557
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3558
|
+
onClick: () => setValue(!value),
|
|
3559
|
+
"aria-label": "Highlight Focus",
|
|
3560
|
+
"aria-pressed": Boolean(value),
|
|
3561
|
+
type: "button",
|
|
3562
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3313
3563
|
}
|
|
3314
3564
|
)
|
|
3315
3565
|
] });
|
|
3316
3566
|
}
|
|
3567
|
+
var FocusHighlightController = HighlightFocusController;
|
|
3568
|
+
|
|
3569
|
+
// src/features/ReduceMotionController.tsx
|
|
3570
|
+
var import_react14 = require("react");
|
|
3571
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3572
|
+
var FEATURE_KEY21 = "reduceMotion";
|
|
3573
|
+
var DEFAULT_VALUE21 = false;
|
|
3574
|
+
function ReduceMotionController() {
|
|
3575
|
+
const { value, setValue } = useAccessibility(
|
|
3576
|
+
FEATURE_KEY21,
|
|
3577
|
+
DEFAULT_VALUE21
|
|
3578
|
+
);
|
|
3579
|
+
const osReducedMotion = (0, import_react14.useSyncExternalStore)(
|
|
3580
|
+
subscribeReducedMotion,
|
|
3581
|
+
isReducedMotionActive,
|
|
3582
|
+
() => false
|
|
3583
|
+
);
|
|
3584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reduce Motion", children: [
|
|
3585
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "arap-label", children: [
|
|
3586
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FeatureIcon, { name: FEATURE_KEY21 }),
|
|
3587
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: "Reduce Motion" })
|
|
3588
|
+
] }),
|
|
3589
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3590
|
+
"button",
|
|
3591
|
+
{
|
|
3592
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3593
|
+
onClick: () => setValue(!value),
|
|
3594
|
+
"aria-label": "Reduce Motion",
|
|
3595
|
+
"aria-pressed": Boolean(value),
|
|
3596
|
+
type: "button",
|
|
3597
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3598
|
+
}
|
|
3599
|
+
),
|
|
3600
|
+
osReducedMotion && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "arap-notice", role: "status", "aria-live": "polite", children: "Operating system prefers-reduced-motion is active." })
|
|
3601
|
+
] });
|
|
3602
|
+
}
|
|
3317
3603
|
|
|
3318
3604
|
// src/features/ResetController.tsx
|
|
3319
3605
|
var import_react_dom2 = require("react-dom");
|
|
3320
|
-
var
|
|
3321
|
-
var
|
|
3606
|
+
var import_react15 = require("react");
|
|
3607
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3322
3608
|
function ResetController() {
|
|
3323
|
-
const ctx = (0,
|
|
3609
|
+
const ctx = (0, import_react15.useContext)(AccessibilityContext);
|
|
3324
3610
|
if (!ctx) {
|
|
3325
3611
|
throw new Error(
|
|
3326
3612
|
"ResetController must be used within an <AccessibilityPlugin> provider."
|
|
3327
3613
|
);
|
|
3328
3614
|
}
|
|
3329
|
-
const actionHost = (0,
|
|
3615
|
+
const actionHost = (0, import_react15.useContext)(PanelActionsContext);
|
|
3330
3616
|
const { resetAll } = ctx;
|
|
3331
3617
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
3332
|
-
const button = /* @__PURE__ */ (0,
|
|
3333
|
-
/* @__PURE__ */ (0,
|
|
3618
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
3619
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FeatureIcon, { name: "reset" }),
|
|
3334
3620
|
strings.resetAll
|
|
3335
3621
|
] }) });
|
|
3336
3622
|
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
3337
3623
|
}
|
|
3338
3624
|
|
|
3339
3625
|
// src/core/controls/ToggleControl.tsx
|
|
3340
|
-
var
|
|
3626
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3341
3627
|
function ToggleControl({
|
|
3342
3628
|
id,
|
|
3343
3629
|
label,
|
|
@@ -3359,12 +3645,12 @@ function ToggleControl({
|
|
|
3359
3645
|
onChange(!checked);
|
|
3360
3646
|
}
|
|
3361
3647
|
};
|
|
3362
|
-
return /* @__PURE__ */ (0,
|
|
3648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3363
3649
|
"div",
|
|
3364
3650
|
{
|
|
3365
3651
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3366
3652
|
style,
|
|
3367
|
-
children: /* @__PURE__ */ (0,
|
|
3653
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3368
3654
|
"button",
|
|
3369
3655
|
{
|
|
3370
3656
|
id,
|
|
@@ -3378,7 +3664,7 @@ function ToggleControl({
|
|
|
3378
3664
|
disabled: !isInteractive,
|
|
3379
3665
|
onClick: handleClick,
|
|
3380
3666
|
title: unavailableReason || description || toggleLabel,
|
|
3381
|
-
children: /* @__PURE__ */ (0,
|
|
3667
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3382
3668
|
"span",
|
|
3383
3669
|
{
|
|
3384
3670
|
className: "arap-toggle-knob",
|
|
@@ -3394,8 +3680,8 @@ function ToggleControl({
|
|
|
3394
3680
|
}
|
|
3395
3681
|
|
|
3396
3682
|
// src/core/controls/ChoiceControl.tsx
|
|
3397
|
-
var
|
|
3398
|
-
var
|
|
3683
|
+
var import_react16 = require("react");
|
|
3684
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3399
3685
|
function ChoiceControl({
|
|
3400
3686
|
id,
|
|
3401
3687
|
label,
|
|
@@ -3409,12 +3695,12 @@ function ChoiceControl({
|
|
|
3409
3695
|
style,
|
|
3410
3696
|
orientation = "horizontal"
|
|
3411
3697
|
}) {
|
|
3412
|
-
const containerRef = (0,
|
|
3413
|
-
const allOptions = (0,
|
|
3698
|
+
const containerRef = (0, import_react16.useRef)(null);
|
|
3699
|
+
const allOptions = (0, import_react16.useMemo)(
|
|
3414
3700
|
() => groups ? groups.flatMap((g) => g.options) : options || [],
|
|
3415
3701
|
[groups, options]
|
|
3416
3702
|
);
|
|
3417
|
-
const handleKeyDown = (0,
|
|
3703
|
+
const handleKeyDown = (0, import_react16.useCallback)(
|
|
3418
3704
|
(e) => {
|
|
3419
3705
|
if (disabled || allOptions.length === 0) return;
|
|
3420
3706
|
const enabledOptions = allOptions.filter((opt) => !opt.disabled);
|
|
@@ -3451,7 +3737,7 @@ function ChoiceControl({
|
|
|
3451
3737
|
const renderOptionButton = (opt) => {
|
|
3452
3738
|
const isSelected = value === opt.value;
|
|
3453
3739
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
3454
|
-
return /* @__PURE__ */ (0,
|
|
3740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3455
3741
|
"button",
|
|
3456
3742
|
{
|
|
3457
3743
|
type: "button",
|
|
@@ -3465,15 +3751,15 @@ function ChoiceControl({
|
|
|
3465
3751
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
3466
3752
|
title: opt.description,
|
|
3467
3753
|
children: [
|
|
3468
|
-
isSelected && /* @__PURE__ */ (0,
|
|
3469
|
-
/* @__PURE__ */ (0,
|
|
3470
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
3754
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: opt.label }),
|
|
3756
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
3471
3757
|
]
|
|
3472
3758
|
},
|
|
3473
3759
|
String(opt.value)
|
|
3474
3760
|
);
|
|
3475
3761
|
};
|
|
3476
|
-
return /* @__PURE__ */ (0,
|
|
3762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3477
3763
|
"div",
|
|
3478
3764
|
{
|
|
3479
3765
|
ref: containerRef,
|
|
@@ -3484,15 +3770,15 @@ function ChoiceControl({
|
|
|
3484
3770
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3485
3771
|
style,
|
|
3486
3772
|
onKeyDown: handleKeyDown,
|
|
3487
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
3773
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3488
3774
|
"div",
|
|
3489
3775
|
{
|
|
3490
3776
|
className: "arap-choice-group",
|
|
3491
3777
|
role: "group",
|
|
3492
3778
|
"aria-label": group.label,
|
|
3493
3779
|
children: [
|
|
3494
|
-
/* @__PURE__ */ (0,
|
|
3495
|
-
/* @__PURE__ */ (0,
|
|
3780
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
3781
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
3496
3782
|
]
|
|
3497
3783
|
},
|
|
3498
3784
|
group.label
|
|
@@ -3502,7 +3788,7 @@ function ChoiceControl({
|
|
|
3502
3788
|
}
|
|
3503
3789
|
|
|
3504
3790
|
// src/core/controls/StepperControl.tsx
|
|
3505
|
-
var
|
|
3791
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3506
3792
|
function StepperControl({
|
|
3507
3793
|
id,
|
|
3508
3794
|
label,
|
|
@@ -3532,15 +3818,15 @@ function StepperControl({
|
|
|
3532
3818
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
3533
3819
|
}
|
|
3534
3820
|
};
|
|
3535
|
-
return /* @__PURE__ */ (0,
|
|
3821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3536
3822
|
"div",
|
|
3537
3823
|
{
|
|
3538
3824
|
id,
|
|
3539
3825
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3540
3826
|
style,
|
|
3541
3827
|
children: [
|
|
3542
|
-
/* @__PURE__ */ (0,
|
|
3543
|
-
/* @__PURE__ */ (0,
|
|
3828
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "arap-controls", children: [
|
|
3829
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3544
3830
|
"button",
|
|
3545
3831
|
{
|
|
3546
3832
|
type: "button",
|
|
@@ -3551,8 +3837,8 @@ function StepperControl({
|
|
|
3551
3837
|
children: "\u2212"
|
|
3552
3838
|
}
|
|
3553
3839
|
),
|
|
3554
|
-
/* @__PURE__ */ (0,
|
|
3555
|
-
/* @__PURE__ */ (0,
|
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
3841
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3556
3842
|
"button",
|
|
3557
3843
|
{
|
|
3558
3844
|
type: "button",
|
|
@@ -3564,7 +3850,7 @@ function StepperControl({
|
|
|
3564
3850
|
}
|
|
3565
3851
|
)
|
|
3566
3852
|
] }),
|
|
3567
|
-
showSlider && /* @__PURE__ */ (0,
|
|
3853
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3568
3854
|
"input",
|
|
3569
3855
|
{
|
|
3570
3856
|
type: "range",
|
|
@@ -3588,7 +3874,7 @@ function StepperControl({
|
|
|
3588
3874
|
}
|
|
3589
3875
|
|
|
3590
3876
|
// src/core/controls/FeatureCard.tsx
|
|
3591
|
-
var
|
|
3877
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3592
3878
|
function FeatureCard({
|
|
3593
3879
|
id,
|
|
3594
3880
|
featureKey,
|
|
@@ -3607,7 +3893,7 @@ function FeatureCard({
|
|
|
3607
3893
|
largeControls = false
|
|
3608
3894
|
}) {
|
|
3609
3895
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
3610
|
-
return /* @__PURE__ */ (0,
|
|
3896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
3611
3897
|
"div",
|
|
3612
3898
|
{
|
|
3613
3899
|
id,
|
|
@@ -3616,27 +3902,27 @@ function FeatureCard({
|
|
|
3616
3902
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3617
3903
|
style,
|
|
3618
3904
|
children: [
|
|
3619
|
-
/* @__PURE__ */ (0,
|
|
3620
|
-
/* @__PURE__ */ (0,
|
|
3621
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
3622
|
-
/* @__PURE__ */ (0,
|
|
3905
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-card-header", children: [
|
|
3906
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "arap-label", children: [
|
|
3907
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
3908
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-card-title", children: title })
|
|
3623
3909
|
] }),
|
|
3624
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
3910
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
3625
3911
|
] }),
|
|
3626
|
-
description && /* @__PURE__ */ (0,
|
|
3627
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
3628
|
-
/* @__PURE__ */ (0,
|
|
3629
|
-
/* @__PURE__ */ (0,
|
|
3912
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
3913
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
3914
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3915
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: errorMessage })
|
|
3630
3916
|
] }),
|
|
3631
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
3632
|
-
/* @__PURE__ */ (0,
|
|
3633
|
-
/* @__PURE__ */ (0,
|
|
3917
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
3918
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
3919
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: unavailableMessage })
|
|
3634
3920
|
] }),
|
|
3635
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
3636
|
-
/* @__PURE__ */ (0,
|
|
3637
|
-
/* @__PURE__ */ (0,
|
|
3638
|
-
/* @__PURE__ */ (0,
|
|
3639
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
3921
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
3922
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
3923
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-permission-content", children: [
|
|
3924
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: permissionMessage }),
|
|
3925
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3640
3926
|
"button",
|
|
3641
3927
|
{
|
|
3642
3928
|
type: "button",
|
|
@@ -3647,14 +3933,14 @@ function FeatureCard({
|
|
|
3647
3933
|
)
|
|
3648
3934
|
] })
|
|
3649
3935
|
] }),
|
|
3650
|
-
/* @__PURE__ */ (0,
|
|
3936
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "arap-card-content", children })
|
|
3651
3937
|
]
|
|
3652
3938
|
}
|
|
3653
3939
|
);
|
|
3654
3940
|
}
|
|
3655
3941
|
|
|
3656
3942
|
// src/core/controls/FeatureStatusState.tsx
|
|
3657
|
-
var
|
|
3943
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3658
3944
|
function SearchCount({
|
|
3659
3945
|
totalCount,
|
|
3660
3946
|
matchedCount,
|
|
@@ -3663,7 +3949,7 @@ function SearchCount({
|
|
|
3663
3949
|
style
|
|
3664
3950
|
}) {
|
|
3665
3951
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
3666
|
-
return /* @__PURE__ */ (0,
|
|
3952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3667
3953
|
"div",
|
|
3668
3954
|
{
|
|
3669
3955
|
role: "status",
|
|
@@ -3683,17 +3969,17 @@ function EmptyState({
|
|
|
3683
3969
|
className = "",
|
|
3684
3970
|
style
|
|
3685
3971
|
}) {
|
|
3686
|
-
return /* @__PURE__ */ (0,
|
|
3972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3687
3973
|
"div",
|
|
3688
3974
|
{
|
|
3689
3975
|
role: "status",
|
|
3690
3976
|
className: `arap-empty-state ${className}`,
|
|
3691
3977
|
style,
|
|
3692
3978
|
children: [
|
|
3693
|
-
/* @__PURE__ */ (0,
|
|
3694
|
-
/* @__PURE__ */ (0,
|
|
3695
|
-
/* @__PURE__ */ (0,
|
|
3696
|
-
onAction && /* @__PURE__ */ (0,
|
|
3979
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
3980
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "arap-empty-title", children: title }),
|
|
3981
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "arap-empty-desc", children: description }),
|
|
3982
|
+
onAction && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
3697
3983
|
]
|
|
3698
3984
|
}
|
|
3699
3985
|
);
|
|
@@ -3706,18 +3992,18 @@ function ErrorState({
|
|
|
3706
3992
|
className = "",
|
|
3707
3993
|
style
|
|
3708
3994
|
}) {
|
|
3709
|
-
return /* @__PURE__ */ (0,
|
|
3995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3710
3996
|
"div",
|
|
3711
3997
|
{
|
|
3712
3998
|
role: "alert",
|
|
3713
3999
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
3714
4000
|
style,
|
|
3715
4001
|
children: [
|
|
3716
|
-
/* @__PURE__ */ (0,
|
|
3717
|
-
/* @__PURE__ */ (0,
|
|
3718
|
-
title && /* @__PURE__ */ (0,
|
|
3719
|
-
/* @__PURE__ */ (0,
|
|
3720
|
-
onRetry && /* @__PURE__ */ (0,
|
|
4002
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
4003
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-error-content", children: [
|
|
4004
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
4005
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "arap-error-message", children: message }),
|
|
4006
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
3721
4007
|
] })
|
|
3722
4008
|
]
|
|
3723
4009
|
}
|
|
@@ -3725,7 +4011,7 @@ function ErrorState({
|
|
|
3725
4011
|
}
|
|
3726
4012
|
|
|
3727
4013
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
3728
|
-
var
|
|
4014
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3729
4015
|
function ProfilePreviewCard({
|
|
3730
4016
|
profile,
|
|
3731
4017
|
isActive,
|
|
@@ -3775,7 +4061,7 @@ function ProfilePreviewCard({
|
|
|
3775
4061
|
if (val === null || val === void 0) return "Original";
|
|
3776
4062
|
return String(val);
|
|
3777
4063
|
};
|
|
3778
|
-
return /* @__PURE__ */ (0,
|
|
4064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3779
4065
|
"div",
|
|
3780
4066
|
{
|
|
3781
4067
|
role: "group",
|
|
@@ -3783,10 +4069,10 @@ function ProfilePreviewCard({
|
|
|
3783
4069
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3784
4070
|
style,
|
|
3785
4071
|
children: [
|
|
3786
|
-
/* @__PURE__ */ (0,
|
|
3787
|
-
/* @__PURE__ */ (0,
|
|
3788
|
-
/* @__PURE__ */ (0,
|
|
3789
|
-
isActive && /* @__PURE__ */ (0,
|
|
4072
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "arap-profile-header", children: [
|
|
4073
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
4074
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
4075
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3790
4076
|
"span",
|
|
3791
4077
|
{
|
|
3792
4078
|
className: "arap-profile-active-badge",
|
|
@@ -3795,14 +4081,14 @@ function ProfilePreviewCard({
|
|
|
3795
4081
|
}
|
|
3796
4082
|
)
|
|
3797
4083
|
] }),
|
|
3798
|
-
/* @__PURE__ */ (0,
|
|
4084
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
3799
4085
|
] }),
|
|
3800
|
-
/* @__PURE__ */ (0,
|
|
3801
|
-
/* @__PURE__ */ (0,
|
|
3802
|
-
/* @__PURE__ */ (0,
|
|
4086
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
4087
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
4088
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
3803
4089
|
const val = profile.settings[key];
|
|
3804
|
-
return /* @__PURE__ */ (0,
|
|
3805
|
-
/* @__PURE__ */ (0,
|
|
4090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
4091
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("strong", { children: [
|
|
3806
4092
|
formatKeyName(key),
|
|
3807
4093
|
":"
|
|
3808
4094
|
] }),
|
|
@@ -3811,7 +4097,7 @@ function ProfilePreviewCard({
|
|
|
3811
4097
|
] }, key);
|
|
3812
4098
|
}) })
|
|
3813
4099
|
] }),
|
|
3814
|
-
/* @__PURE__ */ (0,
|
|
4100
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3815
4101
|
"button",
|
|
3816
4102
|
{
|
|
3817
4103
|
type: "button",
|
|
@@ -3820,7 +4106,7 @@ function ProfilePreviewCard({
|
|
|
3820
4106
|
"aria-label": `Revert ${profile.label} profile`,
|
|
3821
4107
|
children: "Revert to custom settings"
|
|
3822
4108
|
}
|
|
3823
|
-
) : /* @__PURE__ */ (0,
|
|
4109
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3824
4110
|
"button",
|
|
3825
4111
|
{
|
|
3826
4112
|
type: "button",
|
|
@@ -3854,11 +4140,13 @@ function ProfilePreviewCard({
|
|
|
3854
4140
|
FONT_FAMILY_PRESETS,
|
|
3855
4141
|
FONT_FAMILY_PROTECTED_SELECTOR,
|
|
3856
4142
|
FeatureCard,
|
|
4143
|
+
FocusHighlightController,
|
|
3857
4144
|
FontFamilyController,
|
|
3858
4145
|
FontSizeController,
|
|
3859
4146
|
GrayscaleController,
|
|
3860
4147
|
HideImagesController,
|
|
3861
4148
|
HideVideosController,
|
|
4149
|
+
HighlightFocusController,
|
|
3862
4150
|
InvertColorsController,
|
|
3863
4151
|
LEGIBLE_FONT_STACK,
|
|
3864
4152
|
LINE_HEIGHT_RATIOS,
|
|
@@ -3871,9 +4159,11 @@ function ProfilePreviewCard({
|
|
|
3871
4159
|
ProfilePreviewCard,
|
|
3872
4160
|
ReadingGuideController,
|
|
3873
4161
|
ReadingMaskController,
|
|
4162
|
+
ReduceMotionController,
|
|
3874
4163
|
ResetController,
|
|
3875
4164
|
SaturationController,
|
|
3876
4165
|
SearchCount,
|
|
4166
|
+
SkipToMainLink,
|
|
3877
4167
|
StepperControl,
|
|
3878
4168
|
TEXT_ALIGN_BLOCK_SELECTOR,
|
|
3879
4169
|
TEXT_SCALE_PROTECTED_SELECTOR,
|
|
@@ -3885,6 +4175,7 @@ function ProfilePreviewCard({
|
|
|
3885
4175
|
WordSpacingController,
|
|
3886
4176
|
createInitialPreferencesState,
|
|
3887
4177
|
enLocale,
|
|
4178
|
+
findMainLandmark,
|
|
3888
4179
|
getScriptSpacingConstraints,
|
|
3889
4180
|
isForcedColorsActive,
|
|
3890
4181
|
isProtectedFromContrast,
|
|
@@ -3892,6 +4183,7 @@ function ProfilePreviewCard({
|
|
|
3892
4183
|
isProtectedFromTextAlign,
|
|
3893
4184
|
isProtectedFromTextScale,
|
|
3894
4185
|
isProtectedFromTextSpacing,
|
|
4186
|
+
isReducedMotionActive,
|
|
3895
4187
|
isRtlLocale,
|
|
3896
4188
|
normalizePreferenceValue,
|
|
3897
4189
|
normalizePreferences,
|
|
@@ -3899,6 +4191,8 @@ function ProfilePreviewCard({
|
|
|
3899
4191
|
registerLocale,
|
|
3900
4192
|
resolveEffectivePreferences,
|
|
3901
4193
|
resolveLocaleStrings,
|
|
4194
|
+
subscribeForcedColors,
|
|
4195
|
+
subscribeReducedMotion,
|
|
3902
4196
|
useAccessibility
|
|
3903
4197
|
});
|
|
3904
4198
|
//# sourceMappingURL=index.js.map
|