accessibility-plugin-react 2.4.0 → 2.6.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 +21 -18
- package/dist/index.d.mts +73 -3
- package/dist/index.d.ts +73 -3
- package/dist/index.js +1006 -246
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +970 -225
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +39 -0
- package/docs/API.md +7 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +2 -2
- package/docs/FEATURES.md +20 -18
- package/docs/FONTS.md +97 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,18 +30,26 @@ __export(index_exports, {
|
|
|
30
30
|
ChoiceControl: () => ChoiceControl,
|
|
31
31
|
ContrastController: () => ContrastController,
|
|
32
32
|
DEFAULT_PREFERENCES: () => DEFAULT_PREFERENCES,
|
|
33
|
+
DYSLEXIA_FONT_STACK: () => DYSLEXIA_FONT_STACK,
|
|
33
34
|
EmptyState: () => EmptyState,
|
|
34
35
|
ErrorState: () => ErrorState,
|
|
36
|
+
FONT_FAMILY_PRESETS: () => FONT_FAMILY_PRESETS,
|
|
37
|
+
FONT_FAMILY_PROTECTED_SELECTOR: () => FONT_FAMILY_PROTECTED_SELECTOR,
|
|
35
38
|
FeatureCard: () => FeatureCard,
|
|
39
|
+
FontFamilyController: () => FontFamilyController,
|
|
36
40
|
FontSizeController: () => FontSizeController,
|
|
37
41
|
GrayscaleController: () => GrayscaleController,
|
|
38
42
|
HideImagesController: () => HideImagesController,
|
|
39
43
|
HideVideosController: () => HideVideosController,
|
|
40
44
|
InvertColorsController: () => InvertColorsController,
|
|
45
|
+
LEGIBLE_FONT_STACK: () => LEGIBLE_FONT_STACK,
|
|
46
|
+
LINE_HEIGHT_RATIOS: () => LINE_HEIGHT_RATIOS,
|
|
47
|
+
LINE_HEIGHT_STEPS: () => LINE_HEIGHT_STEPS,
|
|
41
48
|
LetterSpacingController: () => LetterSpacingController,
|
|
42
49
|
LineHeightController: () => LineHeightController,
|
|
43
50
|
LinkHighlightController: () => LinkHighlightController,
|
|
44
51
|
PROFILE_DEFINITIONS: () => PROFILE_DEFINITIONS,
|
|
52
|
+
ParagraphSpacingController: () => ParagraphSpacingController,
|
|
45
53
|
ProfilePreviewCard: () => ProfilePreviewCard,
|
|
46
54
|
ReadingGuideController: () => ReadingGuideController,
|
|
47
55
|
ReadingMaskController: () => ReadingMaskController,
|
|
@@ -49,14 +57,21 @@ __export(index_exports, {
|
|
|
49
57
|
SaturationController: () => SaturationController,
|
|
50
58
|
SearchCount: () => SearchCount,
|
|
51
59
|
StepperControl: () => StepperControl,
|
|
60
|
+
TEXT_ALIGN_BLOCK_SELECTOR: () => TEXT_ALIGN_BLOCK_SELECTOR,
|
|
52
61
|
TEXT_SCALE_PROTECTED_SELECTOR: () => TEXT_SCALE_PROTECTED_SELECTOR,
|
|
53
62
|
TEXT_SCALE_STEPS: () => TEXT_SCALE_STEPS,
|
|
63
|
+
TEXT_SPACING_EXCLUDED_SELECTOR: () => TEXT_SPACING_EXCLUDED_SELECTOR,
|
|
54
64
|
TextAlignController: () => TextAlignController,
|
|
55
65
|
TextScaleController: () => TextScaleController,
|
|
56
66
|
ToggleControl: () => ToggleControl,
|
|
67
|
+
WordSpacingController: () => WordSpacingController,
|
|
57
68
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
58
69
|
enLocale: () => enLocale,
|
|
70
|
+
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
71
|
+
isProtectedFromFontFamily: () => isProtectedFromFontFamily,
|
|
72
|
+
isProtectedFromTextAlign: () => isProtectedFromTextAlign,
|
|
59
73
|
isProtectedFromTextScale: () => isProtectedFromTextScale,
|
|
74
|
+
isProtectedFromTextSpacing: () => isProtectedFromTextSpacing,
|
|
60
75
|
isRtlLocale: () => isRtlLocale,
|
|
61
76
|
normalizePreferenceValue: () => normalizePreferenceValue,
|
|
62
77
|
normalizePreferences: () => normalizePreferences,
|
|
@@ -91,7 +106,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
91
106
|
}
|
|
92
107
|
|
|
93
108
|
// src/styles/tailwind.css
|
|
94
|
-
styleInject('.arap-root {\n --arap-surface: #fff;\n --arap-text: #111827;\n --arap-muted: #475569;\n --arap-border: #cbd5e1;\n --arap-divider: #e2e8f0;\n --arap-accent: #1d4ed8;\n --arap-accent-hover: #1e40af;\n --arap-selected: #eff6ff;\n --arap-control: #f8fafc;\n color-scheme: light;\n font: 15px/1.5 system-ui, sans-serif;\n color: var(--arap-text);\n text-align: left;\n letter-spacing: normal;\n}\n.arap-root *,\n.arap-root *::before,\n.arap-root *::after {\n box-sizing: border-box;\n}\n.arap-root button {\n font: inherit;\n cursor: pointer;\n color: inherit;\n text-transform: none;\n letter-spacing: normal;\n transition: background-color 0.15s, border-color 0.15s;\n}\n.arap-root button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.arap-root button:focus-visible,\n.arap-panel:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 3px;\n}\n.arap-root .arap-btn {\n position: fixed;\n z-index: 2147483001;\n bottom: max(16px, env(safe-area-inset-bottom));\n right: max(16px, env(safe-area-inset-right));\n width: 56px;\n height: 56px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--arap-surface);\n border-radius: 50%;\n background: var(--arap-accent);\n color: #fff;\n box-shadow: 0 4px 12px #0f172a26, 0 10px 24px #0f172a14;\n}\n.arap-root .arap-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-root .arap-btn[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-position=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-panel {\n position: fixed;\n z-index: 2147483000;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n right: max(16px, env(safe-area-inset-right));\n width: min(400px, calc(100vw - 32px));\n max-height: calc(100vh - 120px);\n max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 20px;\n border: 1px solid var(--arap-divider);\n border-radius: 16px;\n background: var(--arap-surface);\n box-shadow: 0 8px 16px #0f172a0d, 0 20px 48px #0f172a1a;\n}\n.arap-root .arap-panel[hidden] {\n display: none !important;\n}\n.arap-root .arap-panel[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-panel[data-position=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-heading {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n padding-bottom: 18px;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-heading-copy {\n min-width: 0;\n}\n.arap-heading h2 {\n margin: 0;\n font: 700 22px/1.3 system-ui, sans-serif;\n letter-spacing: -0.025em;\n color: var(--arap-text);\n overflow-wrap: anywhere;\n}\n.arap-description {\n margin: 6px 0 0;\n color: var(--arap-muted);\n font: 14px/1.5 system-ui, sans-serif;\n overflow-wrap: anywhere;\n}\n.arap-heading button {\n flex: none;\n width: 44px;\n height: 44px;\n margin-top: -6px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--arap-muted);\n font-size: 28px;\n line-height: 1;\n}\n.arap-heading button:hover {\n background: var(--arap-control);\n border-color: var(--arap-border);\n}\n.arap-feature {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px 12px;\n padding: 18px 0;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-feature:last-child {\n border: 0;\n padding-bottom: 0;\n}\n.arap-label {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.arap-icon {\n flex: none;\n width: 22px;\n height: 22px;\n display: inline-block;\n vertical-align: middle;\n}\n.arap-controls {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--arap-border);\n border-radius: 9px;\n overflow: hidden;\n background: var(--arap-control);\n}\n.arap-root .arap-btn-sm {\n flex: none;\n width: 44px;\n height: 44px;\n border: 0;\n border-radius: 0;\n background: transparent;\n font-size: 22px;\n}\n.arap-root .arap-btn-sm:hover:not(:disabled) {\n background: var(--arap-selected);\n color: var(--arap-accent);\n}\n.arap-root .arap-controls button:focus-visible {\n outline-offset: -4px;\n}\n.arap-value {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 56px;\n padding: 0 6px;\n text-align: center;\n font-weight: 600;\n border-inline: 1px solid var(--arap-divider);\n background: var(--arap-surface);\n}\n.arap-segmented {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.arap-root .arap-segment {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-muted);\n overflow-wrap: anywhere;\n}\n.arap-root .arap-segment:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-root .arap-segment-active {\n background: var(--arap-accent);\n color: #fff;\n border-color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-segment-active:hover {\n background: var(--arap-accent-hover);\n color: #fff;\n}\n.arap-check {\n flex: none;\n font-size: 15px;\n line-height: 1;\n}\n.arap-root .arap-toggle {\n position: relative;\n width: 56px;\n height: 44px;\n padding: 0;\n border: 0;\n border-radius: 10px;\n background: transparent;\n}\n.arap-toggle::before {\n content: "";\n position: absolute;\n inset: 6px 0;\n border: 2px solid #64748b;\n border-radius: 20px;\n background: #e2e8f0;\n}\n.arap-toggle-knob {\n position: absolute;\n top: 10px;\n left: 4px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: #475569;\n pointer-events: none;\n transition: transform 0.15s;\n}\n.arap-toggle-active::before {\n background: var(--arap-accent);\n border-color: var(--arap-accent);\n}\n.arap-toggle-active .arap-toggle-knob {\n transform: translateX(24px);\n background: #fff;\n}\n.arap-toggle-active .arap-toggle-knob::after {\n content: "\\2713";\n display: block;\n color: var(--arap-accent);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n text-align: center;\n}\n.arap-root .arap-toggle:hover::before {\n border-color: var(--arap-accent);\n}\n.arap-feature-reset {\n display: block;\n}\n.arap-root .arap-reset-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 10px;\n border: 1px solid var(--arap-border);\n border-radius: 10px;\n background: var(--arap-control);\n color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-reset-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n@media (max-width: 380px) {\n .arap-root .arap-panel {\n padding: 16px;\n }\n .arap-heading h2 {\n font-size: 20px;\n }\n .arap-feature-stepper {\n grid-template-columns: minmax(0, 1fr);\n }\n .arap-controls {\n width: 100%;\n }\n .arap-value {\n flex: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-root *,\n .arap-root *::before,\n .arap-root *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .arap-root {\n --arap-surface: Canvas;\n --arap-text: CanvasText;\n --arap-muted: CanvasText;\n --arap-border: ButtonText;\n --arap-divider: ButtonText;\n --arap-accent: Highlight;\n --arap-control: Canvas;\n --arap-selected: Canvas;\n }\n .arap-root button[aria-pressed=true] {\n outline: 2px solid Highlight;\n outline-offset: -4px;\n }\n .arap-root .arap-segment-active {\n color: HighlightText;\n background: Highlight;\n }\n .arap-toggle::before {\n border-color: ButtonText;\n background: Canvas;\n }\n .arap-toggle-knob {\n background: ButtonText;\n }\n .arap-toggle-active .arap-toggle-knob {\n background: Highlight;\n }\n .arap-toggle-active .arap-toggle-knob::after {\n color: HighlightText;\n }\n}\n.arap-root .arap-panel {\n display: flex;\n flex-direction: column;\n overflow: visible;\n}\n.arap-heading {\n flex: none;\n}\n.arap-tools {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 0 3px;\n margin: 0 -3px;\n}\n.arap-tools:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: -3px;\n}\n.arap-quick-actions {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 14px;\n margin-top: 8px;\n border-top: 1px solid var(--arap-divider);\n}\n.arap-actions {\n flex: 1;\n min-width: 0;\n}\n.arap-actions:empty {\n display: none;\n}\n.arap-actions .arap-feature-reset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n.arap-root .arap-position-button,\n.arap-root .arap-position-default,\n.arap-root .arap-position-arrows button {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-accent);\n}\n.arap-root .arap-position-button:hover,\n.arap-root .arap-position-default:hover,\n.arap-root .arap-position-arrows button:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-position-popover {\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 0;\n width: 100%;\n max-height: calc(100dvh - 160px);\n overflow: auto;\n padding: 14px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n box-shadow: 0 8px 24px #0f172a26;\n}\n.arap-position-popover[hidden] {\n display: none !important;\n}\n.arap-position-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.arap-position-popover select {\n width: 100%;\n min-height: 44px;\n padding: 8px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n font: inherit;\n color: var(--arap-text);\n background: var(--arap-surface);\n}\n.arap-position-popover select:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-position-arrows {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 10px;\n}\n.arap-position-default {\n width: 100%;\n margin-top: 8px;\n}\n.arap-root .arap-btn[data-draggable=true] {\n touch-action: none;\n user-select: none;\n cursor: grab;\n}\n.arap-root .arap-btn[data-dragging=true] {\n cursor: grabbing;\n}\n.arap-root .arap-btn[data-corner$=left],\n.arap-root .arap-panel[data-corner$=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-corner$=right],\n.arap-root .arap-panel[data-corner$=right] {\n left: auto;\n right: max(16px, env(safe-area-inset-right));\n}\n.arap-root .arap-btn[data-corner^=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-btn[data-corner^=bottom] {\n top: auto;\n bottom: max(16px, env(safe-area-inset-bottom));\n}\n.arap-root .arap-panel[data-corner^=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-root .arap-panel[data-corner^=bottom] {\n top: auto;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n}\n.arap-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.arap-root .arap-skip-actions {\n position: absolute;\n top: 12px;\n left: 20px;\n width: 44px;\n height: 44px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n}\n.arap-root .arap-skip-actions:focus-visible {\n right: 20px;\n width: auto;\n height: auto;\n min-height: 44px;\n clip-path: none;\n pointer-events: auto;\n z-index: 2;\n padding: 8px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-accent);\n}\n@media (max-height: 480px) {\n .arap-root .arap-panel {\n top: max(16px, env(safe-area-inset-top)) !important;\n bottom: max(16px, env(safe-area-inset-bottom)) !important;\n max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;\n padding: 8px;\n }\n .arap-heading {\n padding-bottom: 8px;\n }\n .arap-heading h2 {\n font-size: 18px;\n }\n .arap-heading button {\n margin-top: 0;\n }\n .arap-description {\n display: none;\n }\n .arap-quick-actions {\n padding-top: 8px;\n margin-top: 0;\n }\n .arap-root .arap-reset-btn {\n min-height: 44px;\n }\n .arap-root .arap-btn[data-open=true] {\n visibility: hidden;\n }\n .arap-position-popover {\n max-height: calc(100dvh - 96px);\n }\n}\n.arap-statement {\n flex: none;\n padding-top: 10px;\n text-align: center;\n}\n.arap-statement-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 44px;\n padding: 6px 12px;\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 4px;\n font-size: 14px;\n font-weight: 500;\n border-radius: 8px;\n}\n.arap-statement-link:hover {\n color: var(--arap-accent-hover);\n background: var(--arap-selected);\n}\n.arap-statement-link:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-root .arap-btn[data-large-controls=true] {\n width: 64px;\n height: 64px;\n min-width: 48px;\n min-height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] {\n width: min(440px, calc(100vw - 32px));\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-heading button {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 32px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-btn-sm {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 24px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-value {\n min-width: 64px;\n font-size: 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-segment {\n min-width: 48px;\n min-height: 48px;\n padding: 10px 14px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle {\n width: 64px;\n height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle::before {\n inset: 8px 0;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-knob {\n top: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-active .arap-toggle-knob {\n transform: translateX(28px);\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-reset-btn {\n min-height: 52px;\n font-size: 16px;\n padding: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-button,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-default,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-arrows button {\n min-width: 48px;\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-popover select {\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-statement-link {\n min-height: 48px;\n font-size: 15px;\n padding: 10px 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-skip-actions {\n min-width: 48px;\n min-height: 48px;\n}\n.arap-feature-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n}\n.arap-card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-card-title {\n font-weight: 600;\n font-size: 15px;\n color: var(--arap-text);\n}\n.arap-card-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-status-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 11px;\n font-weight: 600;\n background: var(--arap-control);\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-card-alert {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 1.4;\n}\n.arap-alert-icon {\n flex: none;\n font-size: 16px;\n line-height: 1;\n}\n.arap-card-error {\n background: #fef2f2;\n border: 1px solid #fecaca;\n color: #991b1b;\n}\n.arap-card-unavailable {\n background: #f8fafc;\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n}\n.arap-card-permission {\n background: #fffbeb;\n border: 1px solid #fde68a;\n color: #92400e;\n}\n.arap-permission-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-permission-btn {\n align-self: flex-start;\n padding: 4px 10px;\n border: 1px solid #d97706;\n border-radius: 6px;\n background: #f59e0b;\n color: #fff;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n.arap-permission-btn:hover {\n background: #d97706;\n}\n.arap-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.arap-choice-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n.arap-choice-group-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-choice-badge {\n font-size: 11px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--arap-divider);\n color: var(--arap-muted);\n}\n.arap-segment-active .arap-choice-badge {\n background: rgba(255, 255, 255, 0.25);\n color: #fff;\n}\n.arap-stepper-control-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n}\n.arap-slider-container {\n display: flex;\n align-items: center;\n padding: 4px 0;\n}\n.arap-slider {\n width: 100%;\n accent-color: var(--arap-accent);\n cursor: pointer;\n}\n.arap-search-count {\n padding: 6px 0;\n font-size: 12px;\n font-weight: 500;\n color: var(--arap-muted);\n}\n.arap-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 24px 16px;\n gap: 8px;\n}\n.arap-empty-icon {\n font-size: 32px;\n}\n.arap-empty-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-empty-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n}\n.arap-empty-btn,\n.arap-retry-btn {\n margin-top: 6px;\n padding: 8px 16px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n font-weight: 500;\n font-size: 13px;\n color: var(--arap-text);\n cursor: pointer;\n}\n.arap-empty-btn:hover,\n.arap-retry-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n color: var(--arap-accent);\n}\n.arap-profile-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.arap-profile-card-active {\n border-color: var(--arap-accent);\n background: var(--arap-selected);\n box-shadow: 0 0 0 1px var(--arap-accent);\n}\n.arap-profile-header {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-profile-active-badge {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-accent);\n background: #dbeafe;\n padding: 2px 8px;\n border-radius: 9999px;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-profile-affected {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-profile-affected-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.arap-profile-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--arap-control);\n border: 1px solid var(--arap-divider);\n font-size: 12px;\n color: var(--arap-text);\n}\n.arap-profile-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n.arap-profile-apply-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-apply-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-profile-revert-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-muted);\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-revert-btn:hover {\n background: var(--arap-control);\n color: var(--arap-text);\n border-color: var(--arap-text);\n}\n');
|
|
109
|
+
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');
|
|
95
110
|
|
|
96
111
|
// src/core/AccessibilityPlugin.tsx
|
|
97
112
|
var import_react4 = require("react");
|
|
@@ -301,12 +316,36 @@ function createPreferenceStore(key, persist, storageMode) {
|
|
|
301
316
|
var numberIn = (min, max) => (v) => typeof v === "number" && Number.isFinite(v) && v >= min && v <= max;
|
|
302
317
|
var oneOf = (...values) => (v) => values.includes(v);
|
|
303
318
|
var TEXT_SCALE_STEPS = [1, 1.125, 1.25, 1.5, 2];
|
|
319
|
+
var LINE_HEIGHT_STEPS = [100, 150, 175, 200];
|
|
320
|
+
var LINE_HEIGHT_RATIOS = [1, 1.5, 1.75, 2];
|
|
321
|
+
var FONT_FAMILY_PRESETS = [
|
|
322
|
+
"default",
|
|
323
|
+
"legible",
|
|
324
|
+
"dyslexia-option"
|
|
325
|
+
];
|
|
304
326
|
var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
305
327
|
fontSize: { defaultValue: 100, validate: numberIn(50, 200) },
|
|
306
328
|
fontScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
307
329
|
textScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
308
|
-
lineHeight: {
|
|
309
|
-
|
|
330
|
+
lineHeight: {
|
|
331
|
+
defaultValue: 100,
|
|
332
|
+
validate: (v) => typeof v === "number" && Number.isFinite(v) && (v >= 0.5 && v <= 2.5 || v >= 50 && v <= 200)
|
|
333
|
+
},
|
|
334
|
+
letterSpacing: { defaultValue: 0, validate: numberIn(0, 20) },
|
|
335
|
+
wordSpacing: { defaultValue: 0, validate: numberIn(0, 20) },
|
|
336
|
+
paragraphSpacing: { defaultValue: 0, validate: numberIn(0, 64) },
|
|
337
|
+
letterSpacingEm: {
|
|
338
|
+
defaultValue: null,
|
|
339
|
+
validate: (v) => v === null || numberIn(0, 1)(v)
|
|
340
|
+
},
|
|
341
|
+
wordSpacingEm: {
|
|
342
|
+
defaultValue: null,
|
|
343
|
+
validate: (v) => v === null || numberIn(0, 1)(v)
|
|
344
|
+
},
|
|
345
|
+
paragraphSpacingEm: {
|
|
346
|
+
defaultValue: null,
|
|
347
|
+
validate: (v) => v === null || numberIn(0, 2)(v)
|
|
348
|
+
},
|
|
310
349
|
contrast: {
|
|
311
350
|
defaultValue: 0,
|
|
312
351
|
validate: oneOf(
|
|
@@ -325,6 +364,16 @@ var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
|
325
364
|
defaultValue: "default",
|
|
326
365
|
validate: oneOf("default", "left", "center", "right", "justify")
|
|
327
366
|
},
|
|
367
|
+
fontFamily: {
|
|
368
|
+
defaultValue: "default",
|
|
369
|
+
validate: oneOf(
|
|
370
|
+
"default",
|
|
371
|
+
"original",
|
|
372
|
+
"legible",
|
|
373
|
+
"dyslexia-option",
|
|
374
|
+
"dyslexia"
|
|
375
|
+
)
|
|
376
|
+
},
|
|
328
377
|
linkHighlight: {
|
|
329
378
|
defaultValue: false,
|
|
330
379
|
validate: oneOf(
|
|
@@ -437,6 +486,245 @@ function isProtectedFromTextScale(element) {
|
|
|
437
486
|
}
|
|
438
487
|
return false;
|
|
439
488
|
}
|
|
489
|
+
var TEXT_SPACING_EXCLUDED_SELECTOR = [
|
|
490
|
+
"input",
|
|
491
|
+
"textarea",
|
|
492
|
+
"select",
|
|
493
|
+
"select *",
|
|
494
|
+
"option",
|
|
495
|
+
"optgroup",
|
|
496
|
+
"button",
|
|
497
|
+
"button *",
|
|
498
|
+
"datalist",
|
|
499
|
+
"output",
|
|
500
|
+
"progress",
|
|
501
|
+
"meter",
|
|
502
|
+
"label",
|
|
503
|
+
"label *",
|
|
504
|
+
"legend",
|
|
505
|
+
"legend *",
|
|
506
|
+
'[role="button"]',
|
|
507
|
+
'[role="button"] *',
|
|
508
|
+
'[role="checkbox"]',
|
|
509
|
+
'[role="combobox"]',
|
|
510
|
+
'[role="menuitem"]',
|
|
511
|
+
'[role="tab"]',
|
|
512
|
+
"pre",
|
|
513
|
+
"pre *",
|
|
514
|
+
"code",
|
|
515
|
+
"kbd",
|
|
516
|
+
"samp",
|
|
517
|
+
"var",
|
|
518
|
+
"table",
|
|
519
|
+
"table *",
|
|
520
|
+
"thead",
|
|
521
|
+
"thead *",
|
|
522
|
+
"tbody",
|
|
523
|
+
"tbody *",
|
|
524
|
+
"tfoot",
|
|
525
|
+
"tfoot *",
|
|
526
|
+
"tr",
|
|
527
|
+
"tr *",
|
|
528
|
+
"th",
|
|
529
|
+
"th *",
|
|
530
|
+
"td",
|
|
531
|
+
"td *",
|
|
532
|
+
"caption",
|
|
533
|
+
"colgroup",
|
|
534
|
+
"col",
|
|
535
|
+
'[role="table"]',
|
|
536
|
+
'[role="table"] *',
|
|
537
|
+
'[role="grid"]',
|
|
538
|
+
'[role="grid"] *',
|
|
539
|
+
'[role="row"]',
|
|
540
|
+
'[role="row"] *',
|
|
541
|
+
'[role="cell"]',
|
|
542
|
+
'[role="cell"] *',
|
|
543
|
+
'[role="columnheader"]',
|
|
544
|
+
'[role="columnheader"] *',
|
|
545
|
+
'[role="rowheader"]',
|
|
546
|
+
'[role="rowheader"] *',
|
|
547
|
+
"svg",
|
|
548
|
+
"svg *",
|
|
549
|
+
"[data-icon]",
|
|
550
|
+
"[data-icon] *",
|
|
551
|
+
'i[class*="icon"]',
|
|
552
|
+
'span[class*="icon"]',
|
|
553
|
+
'i[class*="fa-"]',
|
|
554
|
+
'span[class*="fa-"]',
|
|
555
|
+
'i[class*="material-symbols"]',
|
|
556
|
+
'span[class*="material-symbols"]',
|
|
557
|
+
'i[class*="lucide"]',
|
|
558
|
+
'span[class*="lucide"]',
|
|
559
|
+
"[data-arap-ignore]",
|
|
560
|
+
"[data-arap-ignore] *",
|
|
561
|
+
"[data-arap-exempt]",
|
|
562
|
+
"[data-arap-exempt] *",
|
|
563
|
+
"[data-arap-ui]",
|
|
564
|
+
"[data-arap-ui] *",
|
|
565
|
+
".arap-root",
|
|
566
|
+
".arap-root *"
|
|
567
|
+
].join(", ");
|
|
568
|
+
function isProtectedFromTextSpacing(element) {
|
|
569
|
+
try {
|
|
570
|
+
if (element.matches(EXCLUDED)) return true;
|
|
571
|
+
if (element.matches(TEXT_SPACING_EXCLUDED_SELECTOR)) return true;
|
|
572
|
+
if (element.closest(
|
|
573
|
+
"pre, button, label, legend, select, textarea, [role='button'], table, [role='table'], [role='grid'], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
574
|
+
)) {
|
|
575
|
+
return true;
|
|
576
|
+
}
|
|
577
|
+
} catch {
|
|
578
|
+
return false;
|
|
579
|
+
}
|
|
580
|
+
return false;
|
|
581
|
+
}
|
|
582
|
+
var TEXT_ALIGN_BLOCK_SELECTOR = [
|
|
583
|
+
"p",
|
|
584
|
+
"h1",
|
|
585
|
+
"h2",
|
|
586
|
+
"h3",
|
|
587
|
+
"h4",
|
|
588
|
+
"h5",
|
|
589
|
+
"h6",
|
|
590
|
+
"li",
|
|
591
|
+
"blockquote",
|
|
592
|
+
"dt",
|
|
593
|
+
"dd",
|
|
594
|
+
"figcaption",
|
|
595
|
+
'[role="paragraph"]',
|
|
596
|
+
'[role="heading"]'
|
|
597
|
+
].join(", ");
|
|
598
|
+
function isProtectedFromTextAlign(element) {
|
|
599
|
+
try {
|
|
600
|
+
if (element.matches(EXCLUDED)) return true;
|
|
601
|
+
if (element.matches(TEXT_SPACING_EXCLUDED_SELECTOR)) return true;
|
|
602
|
+
if (element.closest(
|
|
603
|
+
"pre, code, kbd, samp, var, button, input, select, textarea, [role='button'], table, [role='table'], [role='grid'], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
604
|
+
)) {
|
|
605
|
+
return true;
|
|
606
|
+
}
|
|
607
|
+
} catch {
|
|
608
|
+
return false;
|
|
609
|
+
}
|
|
610
|
+
return false;
|
|
611
|
+
}
|
|
612
|
+
var LEGIBLE_FONT_STACK = [
|
|
613
|
+
"system-ui",
|
|
614
|
+
"-apple-system",
|
|
615
|
+
"BlinkMacSystemFont",
|
|
616
|
+
'"Segoe UI"',
|
|
617
|
+
"Roboto",
|
|
618
|
+
'"Helvetica Neue"',
|
|
619
|
+
"Arial",
|
|
620
|
+
'"Noto Sans Sinhala"',
|
|
621
|
+
'"Iskoola Pota"',
|
|
622
|
+
'"Noto Sans Tamil"',
|
|
623
|
+
'"Latha"',
|
|
624
|
+
'"Nirmala UI"',
|
|
625
|
+
"sans-serif"
|
|
626
|
+
].join(", ");
|
|
627
|
+
var DYSLEXIA_FONT_STACK = [
|
|
628
|
+
"OpenDyslexic",
|
|
629
|
+
'"Comic Sans MS"',
|
|
630
|
+
'"Trebuchet MS"',
|
|
631
|
+
'"Arial Rounded MT Bold"',
|
|
632
|
+
'"Noto Sans Sinhala"',
|
|
633
|
+
'"Iskoola Pota"',
|
|
634
|
+
'"Noto Sans Tamil"',
|
|
635
|
+
'"Latha"',
|
|
636
|
+
"sans-serif"
|
|
637
|
+
].join(", ");
|
|
638
|
+
var FONT_FAMILY_PROTECTED_SELECTOR = [
|
|
639
|
+
"pre",
|
|
640
|
+
"pre *",
|
|
641
|
+
"code",
|
|
642
|
+
"code *",
|
|
643
|
+
"kbd",
|
|
644
|
+
"kbd *",
|
|
645
|
+
"samp",
|
|
646
|
+
"samp *",
|
|
647
|
+
"var",
|
|
648
|
+
"var *",
|
|
649
|
+
"svg",
|
|
650
|
+
"svg *",
|
|
651
|
+
"[data-icon]",
|
|
652
|
+
"[data-icon] *",
|
|
653
|
+
'i[class*="icon"]',
|
|
654
|
+
'span[class*="icon"]',
|
|
655
|
+
'i[class*="fa-"]',
|
|
656
|
+
'span[class*="fa-"]',
|
|
657
|
+
'i[class*="material-symbols"]',
|
|
658
|
+
'span[class*="material-symbols"]',
|
|
659
|
+
'i[class*="lucide"]',
|
|
660
|
+
'span[class*="lucide"]',
|
|
661
|
+
"[data-arap-ignore]",
|
|
662
|
+
"[data-arap-ignore] *",
|
|
663
|
+
"[data-arap-exempt]",
|
|
664
|
+
"[data-arap-exempt] *",
|
|
665
|
+
"[data-arap-ui]",
|
|
666
|
+
"[data-arap-ui] *",
|
|
667
|
+
".arap-root",
|
|
668
|
+
".arap-root *"
|
|
669
|
+
].join(", ");
|
|
670
|
+
function isProtectedFromFontFamily(element) {
|
|
671
|
+
try {
|
|
672
|
+
if (element.matches(EXCLUDED)) return true;
|
|
673
|
+
if (element.matches(FONT_FAMILY_PROTECTED_SELECTOR)) return true;
|
|
674
|
+
if (element.closest(
|
|
675
|
+
"pre, code, kbd, samp, var, svg, [data-icon], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
676
|
+
)) {
|
|
677
|
+
return true;
|
|
678
|
+
}
|
|
679
|
+
} catch {
|
|
680
|
+
return false;
|
|
681
|
+
}
|
|
682
|
+
return false;
|
|
683
|
+
}
|
|
684
|
+
var ARABIC_SCRIPT_REGEX = /[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/;
|
|
685
|
+
var INDIC_SCRIPT_REGEX = /[\u0900-\u0DFF]/;
|
|
686
|
+
var CURSIVE_LANG_REGEX = /^(ar|fa|ur|ug|dv|ps|ku)($|-)/i;
|
|
687
|
+
var INDIC_LANG_REGEX = /^(si|ta|hi|bn|te|kn|ml|gu|pa|mr|ne|sa)($|-)/i;
|
|
688
|
+
function getScriptSpacingConstraints(element) {
|
|
689
|
+
const lang = element.closest("[lang]")?.getAttribute("lang") || document.documentElement.lang || "";
|
|
690
|
+
const dir = element.closest("[dir]")?.getAttribute("dir") || document.documentElement.dir || "";
|
|
691
|
+
if (CURSIVE_LANG_REGEX.test(lang) || dir.toLowerCase() === "rtl") {
|
|
692
|
+
return {
|
|
693
|
+
allowLetterSpacing: false,
|
|
694
|
+
maxLetterSpacingPx: 0,
|
|
695
|
+
script: "cursive"
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
if (INDIC_LANG_REGEX.test(lang)) {
|
|
699
|
+
return {
|
|
700
|
+
allowLetterSpacing: true,
|
|
701
|
+
maxLetterSpacingPx: 1,
|
|
702
|
+
script: "indic"
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
const text = element.textContent || "";
|
|
706
|
+
if (text.length > 0) {
|
|
707
|
+
if (ARABIC_SCRIPT_REGEX.test(text)) {
|
|
708
|
+
return {
|
|
709
|
+
allowLetterSpacing: false,
|
|
710
|
+
maxLetterSpacingPx: 0,
|
|
711
|
+
script: "cursive"
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
if (INDIC_SCRIPT_REGEX.test(text)) {
|
|
715
|
+
return {
|
|
716
|
+
allowLetterSpacing: true,
|
|
717
|
+
maxLetterSpacingPx: 1,
|
|
718
|
+
script: "indic"
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
return {
|
|
723
|
+
allowLetterSpacing: true,
|
|
724
|
+
maxLetterSpacingPx: Infinity,
|
|
725
|
+
script: "standard"
|
|
726
|
+
};
|
|
727
|
+
}
|
|
440
728
|
function applyPage(values) {
|
|
441
729
|
const undo = [];
|
|
442
730
|
function set(element, property, value) {
|
|
@@ -458,19 +746,46 @@ function applyPage(values) {
|
|
|
458
746
|
const fontScaleValue = typeof values.fontScale === "number" && values.fontScale !== 1 ? values.fontScale : typeof values.textScale === "number" && values.textScale !== 1 ? values.textScale : void 0;
|
|
459
747
|
const fontSizeScale = typeof values.fontSize === "number" && values.fontSize !== 100 ? values.fontSize / 100 : void 0;
|
|
460
748
|
const font = fontScaleValue ?? fontSizeScale ?? 1;
|
|
461
|
-
const
|
|
462
|
-
const
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
749
|
+
const rawLineHeight = typeof values.lineHeight === "number" ? values.lineHeight : 100;
|
|
750
|
+
const lineRatio = rawLineHeight <= 2.5 ? rawLineHeight : rawLineHeight / 100;
|
|
751
|
+
const fontActive = font !== 1;
|
|
752
|
+
const lineActive = lineRatio !== 1;
|
|
753
|
+
if (fontActive || lineActive) {
|
|
754
|
+
const measurements = elements.filter(
|
|
755
|
+
(el) => !isProtectedFromTextScale(el) || !isProtectedFromTextSpacing(el)
|
|
756
|
+
).map((el) => {
|
|
757
|
+
const computed = getComputedStyle(el);
|
|
758
|
+
return {
|
|
759
|
+
el,
|
|
760
|
+
protectScale: isProtectedFromTextScale(el),
|
|
761
|
+
protectSpacing: isProtectedFromTextSpacing(el),
|
|
762
|
+
font: parseFloat(computed.fontSize) || 16,
|
|
763
|
+
line: parseFloat(computed.lineHeight) || (parseFloat(computed.fontSize) || 16) * 1.2
|
|
764
|
+
};
|
|
765
|
+
});
|
|
766
|
+
for (const measured of measurements) {
|
|
767
|
+
if (fontActive && !measured.protectScale) {
|
|
768
|
+
set(measured.el, "font-size", `${measured.font * font}px`);
|
|
769
|
+
}
|
|
770
|
+
if (measured.protectSpacing) {
|
|
771
|
+
if (fontActive && !measured.protectScale) {
|
|
772
|
+
set(measured.el, "line-height", `${measured.line * font}px`);
|
|
773
|
+
} else if (lineActive) {
|
|
774
|
+
const prev = measured.el.style.getPropertyValue("line-height");
|
|
775
|
+
if (!prev) {
|
|
776
|
+
set(measured.el, "line-height", `${measured.line}px`);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
} else {
|
|
780
|
+
if (lineActive || fontActive) {
|
|
781
|
+
set(
|
|
782
|
+
measured.el,
|
|
783
|
+
"line-height",
|
|
784
|
+
`${measured.line * lineRatio * font}px`
|
|
785
|
+
);
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
}
|
|
474
789
|
}
|
|
475
790
|
const filter = composeFilter(values);
|
|
476
791
|
for (const el of Array.from(document.body.children)) {
|
|
@@ -488,11 +803,105 @@ function applyPage(values) {
|
|
|
488
803
|
const base = computed.filter;
|
|
489
804
|
set(el, "filter", `${base && base !== "none" ? base + " " : ""}${filter}`);
|
|
490
805
|
}
|
|
806
|
+
const letterSpacingVal = typeof values.letterSpacing === "number" && values.letterSpacing > 0 ? values.letterSpacing : 0;
|
|
807
|
+
const letterSpacingEmVal = typeof values.letterSpacingEm === "number" && values.letterSpacingEm > 0 ? values.letterSpacingEm : null;
|
|
808
|
+
if (letterSpacingVal > 0 || letterSpacingEmVal !== null) {
|
|
809
|
+
for (const el of elements) {
|
|
810
|
+
if (isProtectedFromTextSpacing(el)) {
|
|
811
|
+
if (el.matches(
|
|
812
|
+
"table, [role='table'], td, th, pre, code, kbd, samp, var, button, input, select, textarea, [data-arap-ui]"
|
|
813
|
+
)) {
|
|
814
|
+
const previous = el.style.getPropertyValue("letter-spacing");
|
|
815
|
+
if (!previous) {
|
|
816
|
+
set(el, "letter-spacing", "normal");
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
continue;
|
|
820
|
+
}
|
|
821
|
+
const scriptLimits = getScriptSpacingConstraints(el);
|
|
822
|
+
if (!scriptLimits.allowLetterSpacing) {
|
|
823
|
+
const previous = el.style.getPropertyValue("letter-spacing");
|
|
824
|
+
if (!previous) {
|
|
825
|
+
set(el, "letter-spacing", "normal");
|
|
826
|
+
}
|
|
827
|
+
continue;
|
|
828
|
+
}
|
|
829
|
+
let targetSpacing;
|
|
830
|
+
if (letterSpacingEmVal !== null) {
|
|
831
|
+
const clampedEm = scriptLimits.maxLetterSpacingPx === 1 ? Math.min(letterSpacingEmVal, 0.05) : letterSpacingEmVal;
|
|
832
|
+
targetSpacing = `${clampedEm}em`;
|
|
833
|
+
} else {
|
|
834
|
+
const clampedPx = Math.min(
|
|
835
|
+
letterSpacingVal,
|
|
836
|
+
scriptLimits.maxLetterSpacingPx
|
|
837
|
+
);
|
|
838
|
+
targetSpacing = `${clampedPx}px`;
|
|
839
|
+
}
|
|
840
|
+
set(el, "letter-spacing", targetSpacing);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
const wordSpacingVal = typeof values.wordSpacing === "number" && values.wordSpacing > 0 ? values.wordSpacing : 0;
|
|
844
|
+
const wordSpacingEmVal = typeof values.wordSpacingEm === "number" && values.wordSpacingEm > 0 ? values.wordSpacingEm : null;
|
|
845
|
+
if (wordSpacingVal > 0 || wordSpacingEmVal !== null) {
|
|
846
|
+
for (const el of elements) {
|
|
847
|
+
if (isProtectedFromTextSpacing(el)) {
|
|
848
|
+
if (el.matches(
|
|
849
|
+
"table, [role='table'], td, th, pre, code, kbd, samp, var, button, input, select, textarea, [data-arap-ui]"
|
|
850
|
+
)) {
|
|
851
|
+
const previous = el.style.getPropertyValue("word-spacing");
|
|
852
|
+
if (!previous) {
|
|
853
|
+
set(el, "word-spacing", "normal");
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
continue;
|
|
857
|
+
}
|
|
858
|
+
const targetSpacing = wordSpacingEmVal !== null ? `${wordSpacingEmVal}em` : `${wordSpacingVal}px`;
|
|
859
|
+
set(el, "word-spacing", targetSpacing);
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
const paragraphSpacingVal = typeof values.paragraphSpacing === "number" && values.paragraphSpacing > 0 ? values.paragraphSpacing : 0;
|
|
863
|
+
const paragraphSpacingEmVal = typeof values.paragraphSpacingEm === "number" && values.paragraphSpacingEm > 0 ? values.paragraphSpacingEm : null;
|
|
864
|
+
if (paragraphSpacingVal > 0 || paragraphSpacingEmVal !== null) {
|
|
865
|
+
for (const el of elements) {
|
|
866
|
+
if (isProtectedFromTextSpacing(el)) continue;
|
|
867
|
+
if (el.matches("p, [role='paragraph']")) {
|
|
868
|
+
const computed = getComputedStyle(el);
|
|
869
|
+
const baseMargin = parseFloat(computed.marginBottom) || 0;
|
|
870
|
+
const targetMargin = paragraphSpacingEmVal !== null ? `${paragraphSpacingEmVal}em` : `${baseMargin + paragraphSpacingVal}px`;
|
|
871
|
+
set(el, "margin-bottom", targetMargin);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
const textAlignVal = values.textAlign ? String(values.textAlign) : "default";
|
|
876
|
+
if (textAlignVal !== "default" && textAlignVal !== "original") {
|
|
877
|
+
for (const el of elements) {
|
|
878
|
+
if (isProtectedFromTextAlign(el)) continue;
|
|
879
|
+
if (el.matches(TEXT_ALIGN_BLOCK_SELECTOR)) {
|
|
880
|
+
set(el, "text-align", textAlignVal);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
const fontFamilyVal = values.fontFamily ? String(values.fontFamily) : "default";
|
|
885
|
+
if (fontFamilyVal !== "default" && fontFamilyVal !== "original") {
|
|
886
|
+
const targetStack = fontFamilyVal === "dyslexia-option" || fontFamilyVal === "dyslexia" ? DYSLEXIA_FONT_STACK : LEGIBLE_FONT_STACK;
|
|
887
|
+
for (const el of elements) {
|
|
888
|
+
if (isProtectedFromFontFamily(el)) {
|
|
889
|
+
if (el.matches("pre, code, kbd, samp, var")) {
|
|
890
|
+
const previous = el.style.getPropertyValue("font-family");
|
|
891
|
+
if (!previous) {
|
|
892
|
+
set(
|
|
893
|
+
el,
|
|
894
|
+
"font-family",
|
|
895
|
+
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
|
|
896
|
+
);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
continue;
|
|
900
|
+
}
|
|
901
|
+
set(el, "font-family", targetStack);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
491
904
|
for (const el of elements) {
|
|
492
|
-
if (Number(values.letterSpacing) > 0)
|
|
493
|
-
set(el, "letter-spacing", `${values.letterSpacing}px`);
|
|
494
|
-
if (values.textAlign && values.textAlign !== "default")
|
|
495
|
-
set(el, "text-align", String(values.textAlign));
|
|
496
905
|
if (values.bigCursor) set(el, "cursor", cursor);
|
|
497
906
|
if (values.hideImages) {
|
|
498
907
|
if (el.matches("img, picture")) set(el, "visibility", "hidden");
|
|
@@ -811,6 +1220,9 @@ var enLocale = Object.freeze({
|
|
|
811
1220
|
resetAll: "Reset All",
|
|
812
1221
|
statementLink: "Accessibility Statement",
|
|
813
1222
|
openInNewTab: "opens in a new tab",
|
|
1223
|
+
creditsPrefix: "Designed and developed by",
|
|
1224
|
+
creditsName: "Praboth",
|
|
1225
|
+
documentationLink: "Official documentation",
|
|
814
1226
|
buttonTitle: "Accessibility",
|
|
815
1227
|
dragHelp: "Drag to move, or use Alt and arrow keys. The Move button menu offers click and keyboard controls.",
|
|
816
1228
|
positionLabel: "Button position",
|
|
@@ -1284,7 +1696,45 @@ function Panel({
|
|
|
1284
1696
|
] })
|
|
1285
1697
|
]
|
|
1286
1698
|
}
|
|
1287
|
-
) })
|
|
1699
|
+
) }),
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "arap-credits", children: [
|
|
1701
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
|
|
1702
|
+
strings.creditsPrefix ?? "Designed and developed by",
|
|
1703
|
+
" ",
|
|
1704
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1705
|
+
"a",
|
|
1706
|
+
{
|
|
1707
|
+
href: "https://www.praboth.com",
|
|
1708
|
+
target: "_blank",
|
|
1709
|
+
rel: "noopener noreferrer",
|
|
1710
|
+
children: [
|
|
1711
|
+
strings.creditsName ?? "Praboth",
|
|
1712
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "arap-sr-only", children: [
|
|
1713
|
+
" (",
|
|
1714
|
+
strings.openInNewTab,
|
|
1715
|
+
")"
|
|
1716
|
+
] })
|
|
1717
|
+
]
|
|
1718
|
+
}
|
|
1719
|
+
)
|
|
1720
|
+
] }),
|
|
1721
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1722
|
+
"a",
|
|
1723
|
+
{
|
|
1724
|
+
href: "https://www.praboth.com/accessibility-plugin-react",
|
|
1725
|
+
target: "_blank",
|
|
1726
|
+
rel: "noopener noreferrer",
|
|
1727
|
+
children: [
|
|
1728
|
+
strings.documentationLink ?? "Official documentation",
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "arap-sr-only", children: [
|
|
1730
|
+
" (",
|
|
1731
|
+
strings.openInNewTab,
|
|
1732
|
+
")"
|
|
1733
|
+
] })
|
|
1734
|
+
]
|
|
1735
|
+
}
|
|
1736
|
+
)
|
|
1737
|
+
] })
|
|
1288
1738
|
]
|
|
1289
1739
|
}
|
|
1290
1740
|
);
|
|
@@ -1640,6 +2090,8 @@ var drawings = {
|
|
|
1640
2090
|
fontSize: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 18 8 5l5 13M5 13h6M15 18l3-8 3 8M16 15h4" }) }),
|
|
1641
2091
|
lineHeight: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M9 6h12M9 12h9M9 18h12M4 4v16m-2-2 2 2 2-2M2 6l2-2 2 2" }) }),
|
|
1642
2092
|
letterSpacing: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.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" }) }),
|
|
2093
|
+
wordSpacing: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 6v12M20 6v12M9 12h6m-2-3 3 3-3 3m-4-3-3-3 3 3" }) }),
|
|
2094
|
+
paragraphSpacing: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 5h16M4 9h12M4 19h16M4 15h12M18 10v4m-2-2 2-2 2 2m-4 2 2 2 2-2" }) }),
|
|
1643
2095
|
contrast: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1644
2096
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1645
2097
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
@@ -1659,6 +2111,7 @@ var drawings = {
|
|
|
1659
2111
|
] }),
|
|
1660
2112
|
linkHighlight: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.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" }) }),
|
|
1661
2113
|
textAlign: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 5h18M3 10h12M3 15h18M3 20h12" }) }),
|
|
2114
|
+
fontFamily: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) }),
|
|
1662
2115
|
hideImages: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1663
2116
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
1664
2117
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "8", cy: "9", r: "1" }),
|
|
@@ -1870,11 +2323,44 @@ var DEFAULT_VALUE3 = 100;
|
|
|
1870
2323
|
var MIN2 = 50;
|
|
1871
2324
|
var MAX2 = 200;
|
|
1872
2325
|
var STEP2 = 10;
|
|
1873
|
-
function LineHeightController(
|
|
2326
|
+
function LineHeightController({
|
|
2327
|
+
steps: customSteps,
|
|
2328
|
+
stepPresets
|
|
2329
|
+
} = {}) {
|
|
1874
2330
|
const { value, setValue } = useAccessibility(
|
|
1875
2331
|
FEATURE_KEY3,
|
|
1876
2332
|
DEFAULT_VALUE3
|
|
1877
2333
|
);
|
|
2334
|
+
const normalizedValue = typeof value === "number" && value <= 2.5 ? Math.round(value * 100) : value ?? DEFAULT_VALUE3;
|
|
2335
|
+
const steps = customSteps ? customSteps.map((s) => s <= 2.5 ? Math.round(s * 100) : s) : stepPresets ? LINE_HEIGHT_STEPS : null;
|
|
2336
|
+
const handleDecrease = () => {
|
|
2337
|
+
if (steps && steps.length > 0) {
|
|
2338
|
+
const idx = steps.findIndex((s) => Math.abs(s - normalizedValue) < 0.1);
|
|
2339
|
+
if (idx > 0) {
|
|
2340
|
+
setValue(steps[idx - 1]);
|
|
2341
|
+
} else if (idx === -1) {
|
|
2342
|
+
const lower = [...steps].reverse().find((s) => s < normalizedValue);
|
|
2343
|
+
setValue(lower ?? steps[0]);
|
|
2344
|
+
}
|
|
2345
|
+
} else {
|
|
2346
|
+
setValue(Math.max(MIN2, normalizedValue - STEP2));
|
|
2347
|
+
}
|
|
2348
|
+
};
|
|
2349
|
+
const handleIncrease = () => {
|
|
2350
|
+
if (steps && steps.length > 0) {
|
|
2351
|
+
const idx = steps.findIndex((s) => Math.abs(s - normalizedValue) < 0.1);
|
|
2352
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2353
|
+
setValue(steps[idx + 1]);
|
|
2354
|
+
} else if (idx === -1) {
|
|
2355
|
+
const higher = steps.find((s) => s > normalizedValue);
|
|
2356
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2357
|
+
}
|
|
2358
|
+
} else {
|
|
2359
|
+
setValue(Math.min(MAX2, normalizedValue + STEP2));
|
|
2360
|
+
}
|
|
2361
|
+
};
|
|
2362
|
+
const isMin = steps && steps.length > 0 ? normalizedValue <= steps[0] : normalizedValue <= MIN2;
|
|
2363
|
+
const isMax = steps && steps.length > 0 ? normalizedValue >= steps[steps.length - 1] : normalizedValue >= MAX2;
|
|
1878
2364
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1879
2365
|
"div",
|
|
1880
2366
|
{
|
|
@@ -1891,23 +2377,23 @@ function LineHeightController() {
|
|
|
1891
2377
|
"button",
|
|
1892
2378
|
{
|
|
1893
2379
|
className: "arap-btn-sm",
|
|
1894
|
-
onClick:
|
|
1895
|
-
disabled:
|
|
2380
|
+
onClick: handleDecrease,
|
|
2381
|
+
disabled: isMin,
|
|
1896
2382
|
"aria-label": "Decrease line height",
|
|
1897
2383
|
type: "button",
|
|
1898
2384
|
children: "\u2212"
|
|
1899
2385
|
}
|
|
1900
2386
|
),
|
|
1901
2387
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1902
|
-
|
|
2388
|
+
Math.round(normalizedValue),
|
|
1903
2389
|
"%"
|
|
1904
2390
|
] }),
|
|
1905
2391
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1906
2392
|
"button",
|
|
1907
2393
|
{
|
|
1908
2394
|
className: "arap-btn-sm",
|
|
1909
|
-
onClick:
|
|
1910
|
-
disabled:
|
|
2395
|
+
onClick: handleIncrease,
|
|
2396
|
+
disabled: isMax,
|
|
1911
2397
|
"aria-label": "Increase line height",
|
|
1912
2398
|
type: "button",
|
|
1913
2399
|
children: "+"
|
|
@@ -1926,11 +2412,44 @@ var DEFAULT_VALUE4 = 0;
|
|
|
1926
2412
|
var MIN3 = 0;
|
|
1927
2413
|
var MAX3 = 10;
|
|
1928
2414
|
var STEP3 = 1;
|
|
1929
|
-
function LetterSpacingController(
|
|
2415
|
+
function LetterSpacingController({
|
|
2416
|
+
min = MIN3,
|
|
2417
|
+
max = MAX3,
|
|
2418
|
+
step = STEP3,
|
|
2419
|
+
steps
|
|
2420
|
+
} = {}) {
|
|
1930
2421
|
const { value, setValue } = useAccessibility(
|
|
1931
2422
|
FEATURE_KEY4,
|
|
1932
2423
|
DEFAULT_VALUE4
|
|
1933
2424
|
);
|
|
2425
|
+
const handleDecrease = () => {
|
|
2426
|
+
if (steps && steps.length > 0) {
|
|
2427
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2428
|
+
if (idx > 0) {
|
|
2429
|
+
setValue(steps[idx - 1]);
|
|
2430
|
+
} else if (idx === -1) {
|
|
2431
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2432
|
+
setValue(lower ?? steps[0]);
|
|
2433
|
+
}
|
|
2434
|
+
} else {
|
|
2435
|
+
setValue(Math.max(min, value - step));
|
|
2436
|
+
}
|
|
2437
|
+
};
|
|
2438
|
+
const handleIncrease = () => {
|
|
2439
|
+
if (steps && steps.length > 0) {
|
|
2440
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2441
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2442
|
+
setValue(steps[idx + 1]);
|
|
2443
|
+
} else if (idx === -1) {
|
|
2444
|
+
const higher = steps.find((s) => s > value);
|
|
2445
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2446
|
+
}
|
|
2447
|
+
} else {
|
|
2448
|
+
setValue(Math.min(max, value + step));
|
|
2449
|
+
}
|
|
2450
|
+
};
|
|
2451
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2452
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
1934
2453
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1935
2454
|
"div",
|
|
1936
2455
|
{
|
|
@@ -1947,8 +2466,8 @@ function LetterSpacingController() {
|
|
|
1947
2466
|
"button",
|
|
1948
2467
|
{
|
|
1949
2468
|
className: "arap-btn-sm",
|
|
1950
|
-
onClick:
|
|
1951
|
-
disabled:
|
|
2469
|
+
onClick: handleDecrease,
|
|
2470
|
+
disabled: isMin,
|
|
1952
2471
|
"aria-label": "Decrease letter spacing",
|
|
1953
2472
|
type: "button",
|
|
1954
2473
|
children: "\u2212"
|
|
@@ -1962,8 +2481,8 @@ function LetterSpacingController() {
|
|
|
1962
2481
|
"button",
|
|
1963
2482
|
{
|
|
1964
2483
|
className: "arap-btn-sm",
|
|
1965
|
-
onClick:
|
|
1966
|
-
disabled:
|
|
2484
|
+
onClick: handleIncrease,
|
|
2485
|
+
disabled: isMax,
|
|
1967
2486
|
"aria-label": "Increase letter spacing",
|
|
1968
2487
|
type: "button",
|
|
1969
2488
|
children: "+"
|
|
@@ -1975,51 +2494,229 @@ function LetterSpacingController() {
|
|
|
1975
2494
|
);
|
|
1976
2495
|
}
|
|
1977
2496
|
|
|
1978
|
-
// src/features/
|
|
2497
|
+
// src/features/WordSpacingController.tsx
|
|
1979
2498
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1980
|
-
var FEATURE_KEY5 = "
|
|
2499
|
+
var FEATURE_KEY5 = "wordSpacing";
|
|
1981
2500
|
var DEFAULT_VALUE5 = 0;
|
|
1982
|
-
var
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
];
|
|
1992
|
-
function ContrastController() {
|
|
2501
|
+
var MIN4 = 0;
|
|
2502
|
+
var MAX4 = 10;
|
|
2503
|
+
var STEP4 = 1;
|
|
2504
|
+
function WordSpacingController({
|
|
2505
|
+
min = MIN4,
|
|
2506
|
+
max = MAX4,
|
|
2507
|
+
step = STEP4,
|
|
2508
|
+
steps
|
|
2509
|
+
} = {}) {
|
|
1993
2510
|
const { value, setValue } = useAccessibility(
|
|
1994
2511
|
FEATURE_KEY5,
|
|
1995
2512
|
DEFAULT_VALUE5
|
|
1996
2513
|
);
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2514
|
+
const handleDecrease = () => {
|
|
2515
|
+
if (steps && steps.length > 0) {
|
|
2516
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2517
|
+
if (idx > 0) {
|
|
2518
|
+
setValue(steps[idx - 1]);
|
|
2519
|
+
} else if (idx === -1) {
|
|
2520
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2521
|
+
setValue(lower ?? steps[0]);
|
|
2522
|
+
}
|
|
2523
|
+
} else {
|
|
2524
|
+
setValue(Math.max(min, value - step));
|
|
2525
|
+
}
|
|
2526
|
+
};
|
|
2527
|
+
const handleIncrease = () => {
|
|
2528
|
+
if (steps && steps.length > 0) {
|
|
2529
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2530
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2531
|
+
setValue(steps[idx + 1]);
|
|
2532
|
+
} else if (idx === -1) {
|
|
2533
|
+
const higher = steps.find((s) => s > value);
|
|
2534
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2535
|
+
}
|
|
2536
|
+
} else {
|
|
2537
|
+
setValue(Math.min(max, value + step));
|
|
2538
|
+
}
|
|
2539
|
+
};
|
|
2540
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2541
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2543
|
+
"div",
|
|
2544
|
+
{
|
|
2545
|
+
className: "arap-feature arap-feature-stepper",
|
|
2546
|
+
role: "group",
|
|
2547
|
+
"aria-label": "Word Spacing",
|
|
2548
|
+
children: [
|
|
2549
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "arap-label", children: [
|
|
2550
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FeatureIcon, { name: FEATURE_KEY5 }),
|
|
2551
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "Word Spacing" })
|
|
2552
|
+
] }),
|
|
2553
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "arap-controls", children: [
|
|
2554
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2555
|
+
"button",
|
|
2556
|
+
{
|
|
2557
|
+
className: "arap-btn-sm",
|
|
2558
|
+
onClick: handleDecrease,
|
|
2559
|
+
disabled: isMin,
|
|
2560
|
+
"aria-label": "Decrease word spacing",
|
|
2561
|
+
type: "button",
|
|
2562
|
+
children: "\u2212"
|
|
2563
|
+
}
|
|
2564
|
+
),
|
|
2565
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2566
|
+
value,
|
|
2567
|
+
"px"
|
|
2568
|
+
] }),
|
|
2569
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2570
|
+
"button",
|
|
2571
|
+
{
|
|
2572
|
+
className: "arap-btn-sm",
|
|
2573
|
+
onClick: handleIncrease,
|
|
2574
|
+
disabled: isMax,
|
|
2575
|
+
"aria-label": "Increase word spacing",
|
|
2576
|
+
type: "button",
|
|
2577
|
+
children: "+"
|
|
2578
|
+
}
|
|
2579
|
+
)
|
|
2580
|
+
] })
|
|
2581
|
+
]
|
|
2582
|
+
}
|
|
2583
|
+
);
|
|
2584
|
+
}
|
|
2585
|
+
|
|
2586
|
+
// src/features/ParagraphSpacingController.tsx
|
|
2587
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2588
|
+
var FEATURE_KEY6 = "paragraphSpacing";
|
|
2589
|
+
var DEFAULT_VALUE6 = 0;
|
|
2590
|
+
var MIN5 = 0;
|
|
2591
|
+
var MAX5 = 32;
|
|
2592
|
+
var STEP5 = 4;
|
|
2593
|
+
function ParagraphSpacingController({
|
|
2594
|
+
min = MIN5,
|
|
2595
|
+
max = MAX5,
|
|
2596
|
+
step = STEP5,
|
|
2597
|
+
steps
|
|
2598
|
+
} = {}) {
|
|
2599
|
+
const { value, setValue } = useAccessibility(
|
|
2600
|
+
FEATURE_KEY6,
|
|
2601
|
+
DEFAULT_VALUE6
|
|
2602
|
+
);
|
|
2603
|
+
const handleDecrease = () => {
|
|
2604
|
+
if (steps && steps.length > 0) {
|
|
2605
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2606
|
+
if (idx > 0) {
|
|
2607
|
+
setValue(steps[idx - 1]);
|
|
2608
|
+
} else if (idx === -1) {
|
|
2609
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2610
|
+
setValue(lower ?? steps[0]);
|
|
2611
|
+
}
|
|
2612
|
+
} else {
|
|
2613
|
+
setValue(Math.max(min, value - step));
|
|
2614
|
+
}
|
|
2615
|
+
};
|
|
2616
|
+
const handleIncrease = () => {
|
|
2617
|
+
if (steps && steps.length > 0) {
|
|
2618
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2619
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2620
|
+
setValue(steps[idx + 1]);
|
|
2621
|
+
} else if (idx === -1) {
|
|
2622
|
+
const higher = steps.find((s) => s > value);
|
|
2623
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2624
|
+
}
|
|
2625
|
+
} else {
|
|
2626
|
+
setValue(Math.min(max, value + step));
|
|
2627
|
+
}
|
|
2628
|
+
};
|
|
2629
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2630
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2632
|
+
"div",
|
|
2633
|
+
{
|
|
2634
|
+
className: "arap-feature arap-feature-stepper",
|
|
2635
|
+
role: "group",
|
|
2636
|
+
"aria-label": "Paragraph Spacing",
|
|
2637
|
+
children: [
|
|
2638
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "arap-label", children: [
|
|
2639
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FeatureIcon, { name: FEATURE_KEY6 }),
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Paragraph Spacing" })
|
|
2641
|
+
] }),
|
|
2642
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "arap-controls", children: [
|
|
2643
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2644
|
+
"button",
|
|
2645
|
+
{
|
|
2646
|
+
className: "arap-btn-sm",
|
|
2647
|
+
onClick: handleDecrease,
|
|
2648
|
+
disabled: isMin,
|
|
2649
|
+
"aria-label": "Decrease paragraph spacing",
|
|
2650
|
+
type: "button",
|
|
2651
|
+
children: "\u2212"
|
|
2652
|
+
}
|
|
2653
|
+
),
|
|
2654
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2655
|
+
value,
|
|
2656
|
+
"px"
|
|
2657
|
+
] }),
|
|
2658
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2659
|
+
"button",
|
|
2660
|
+
{
|
|
2661
|
+
className: "arap-btn-sm",
|
|
2662
|
+
onClick: handleIncrease,
|
|
2663
|
+
disabled: isMax,
|
|
2664
|
+
"aria-label": "Increase paragraph spacing",
|
|
2665
|
+
type: "button",
|
|
2666
|
+
children: "+"
|
|
2667
|
+
}
|
|
2668
|
+
)
|
|
2669
|
+
] })
|
|
2670
|
+
]
|
|
2671
|
+
}
|
|
2672
|
+
);
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
// src/features/ContrastController.tsx
|
|
2676
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2677
|
+
var FEATURE_KEY7 = "contrast";
|
|
2678
|
+
var DEFAULT_VALUE7 = 0;
|
|
2679
|
+
var LEVELS = [
|
|
2680
|
+
{ label: "Off", value: 0 },
|
|
2681
|
+
{ label: "Reduced", value: "reduced" },
|
|
2682
|
+
{ label: "Low", value: 1 },
|
|
2683
|
+
{ label: "High", value: 2 },
|
|
2684
|
+
{ label: "Extra", value: 3 },
|
|
2685
|
+
{ label: "Yellow on black", value: "yellow-on-black" },
|
|
2686
|
+
{ label: "White on black", value: "white-on-black" },
|
|
2687
|
+
{ label: "Blue on yellow", value: "blue-on-yellow" }
|
|
2688
|
+
];
|
|
2689
|
+
function ContrastController() {
|
|
2690
|
+
const { value, setValue } = useAccessibility(
|
|
2691
|
+
FEATURE_KEY7,
|
|
2692
|
+
DEFAULT_VALUE7
|
|
2693
|
+
);
|
|
2694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
|
|
2695
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "arap-label", children: [
|
|
2696
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FeatureIcon, { name: FEATURE_KEY7 }),
|
|
2697
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Contrast" })
|
|
2698
|
+
] }),
|
|
2699
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "arap-segmented", children: LEVELS.map((level) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2700
|
+
"button",
|
|
2701
|
+
{
|
|
2702
|
+
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
2703
|
+
onClick: () => setValue(level.value),
|
|
2704
|
+
"aria-pressed": value === level.value,
|
|
2705
|
+
type: "button",
|
|
2706
|
+
children: [
|
|
2707
|
+
value === level.value && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2708
|
+
level.label
|
|
2709
|
+
]
|
|
2710
|
+
},
|
|
2711
|
+
level.value
|
|
2015
2712
|
)) })
|
|
2016
2713
|
] });
|
|
2017
2714
|
}
|
|
2018
2715
|
|
|
2019
2716
|
// src/features/SaturationController.tsx
|
|
2020
|
-
var
|
|
2021
|
-
var
|
|
2022
|
-
var
|
|
2717
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2718
|
+
var FEATURE_KEY8 = "saturation";
|
|
2719
|
+
var DEFAULT_VALUE8 = 0;
|
|
2023
2720
|
var LEVELS2 = [
|
|
2024
2721
|
{ label: "Off", value: 0 },
|
|
2025
2722
|
{ label: "Low", value: 1 },
|
|
@@ -2027,15 +2724,15 @@ var LEVELS2 = [
|
|
|
2027
2724
|
];
|
|
2028
2725
|
function SaturationController() {
|
|
2029
2726
|
const { value, setValue } = useAccessibility(
|
|
2030
|
-
|
|
2031
|
-
|
|
2727
|
+
FEATURE_KEY8,
|
|
2728
|
+
DEFAULT_VALUE8
|
|
2032
2729
|
);
|
|
2033
|
-
return /* @__PURE__ */ (0,
|
|
2034
|
-
/* @__PURE__ */ (0,
|
|
2035
|
-
/* @__PURE__ */ (0,
|
|
2036
|
-
/* @__PURE__ */ (0,
|
|
2730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
|
|
2731
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "arap-label", children: [
|
|
2732
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FeatureIcon, { name: FEATURE_KEY8 }),
|
|
2733
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Saturation" })
|
|
2037
2734
|
] }),
|
|
2038
|
-
/* @__PURE__ */ (0,
|
|
2735
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2039
2736
|
"button",
|
|
2040
2737
|
{
|
|
2041
2738
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -2043,7 +2740,7 @@ function SaturationController() {
|
|
|
2043
2740
|
"aria-pressed": value === level.value,
|
|
2044
2741
|
type: "button",
|
|
2045
2742
|
children: [
|
|
2046
|
-
value === level.value && /* @__PURE__ */ (0,
|
|
2743
|
+
value === level.value && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2047
2744
|
level.label
|
|
2048
2745
|
]
|
|
2049
2746
|
},
|
|
@@ -2053,20 +2750,20 @@ function SaturationController() {
|
|
|
2053
2750
|
}
|
|
2054
2751
|
|
|
2055
2752
|
// src/features/InvertColorsController.tsx
|
|
2056
|
-
var
|
|
2057
|
-
var
|
|
2058
|
-
var
|
|
2753
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2754
|
+
var FEATURE_KEY9 = "invertColors";
|
|
2755
|
+
var DEFAULT_VALUE9 = false;
|
|
2059
2756
|
function InvertColorsController() {
|
|
2060
2757
|
const { value, setValue } = useAccessibility(
|
|
2061
|
-
|
|
2062
|
-
|
|
2758
|
+
FEATURE_KEY9,
|
|
2759
|
+
DEFAULT_VALUE9
|
|
2063
2760
|
);
|
|
2064
|
-
return /* @__PURE__ */ (0,
|
|
2065
|
-
/* @__PURE__ */ (0,
|
|
2066
|
-
/* @__PURE__ */ (0,
|
|
2067
|
-
/* @__PURE__ */ (0,
|
|
2761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
|
|
2762
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "arap-label", children: [
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FeatureIcon, { name: FEATURE_KEY9 }),
|
|
2764
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Invert Colors" })
|
|
2068
2765
|
] }),
|
|
2069
|
-
/* @__PURE__ */ (0,
|
|
2766
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2070
2767
|
"button",
|
|
2071
2768
|
{
|
|
2072
2769
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2074,27 +2771,27 @@ function InvertColorsController() {
|
|
|
2074
2771
|
"aria-label": "Invert Colors",
|
|
2075
2772
|
"aria-pressed": value,
|
|
2076
2773
|
type: "button",
|
|
2077
|
-
children: /* @__PURE__ */ (0,
|
|
2774
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2078
2775
|
}
|
|
2079
2776
|
)
|
|
2080
2777
|
] });
|
|
2081
2778
|
}
|
|
2082
2779
|
|
|
2083
2780
|
// src/features/GrayscaleController.tsx
|
|
2084
|
-
var
|
|
2085
|
-
var
|
|
2086
|
-
var
|
|
2781
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2782
|
+
var FEATURE_KEY10 = "grayscale";
|
|
2783
|
+
var DEFAULT_VALUE10 = false;
|
|
2087
2784
|
function GrayscaleController() {
|
|
2088
2785
|
const { value, setValue } = useAccessibility(
|
|
2089
|
-
|
|
2090
|
-
|
|
2786
|
+
FEATURE_KEY10,
|
|
2787
|
+
DEFAULT_VALUE10
|
|
2091
2788
|
);
|
|
2092
|
-
return /* @__PURE__ */ (0,
|
|
2093
|
-
/* @__PURE__ */ (0,
|
|
2094
|
-
/* @__PURE__ */ (0,
|
|
2095
|
-
/* @__PURE__ */ (0,
|
|
2789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
|
|
2790
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "arap-label", children: [
|
|
2791
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FeatureIcon, { name: FEATURE_KEY10 }),
|
|
2792
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Grayscale" })
|
|
2096
2793
|
] }),
|
|
2097
|
-
/* @__PURE__ */ (0,
|
|
2794
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2098
2795
|
"button",
|
|
2099
2796
|
{
|
|
2100
2797
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2102,27 +2799,27 @@ function GrayscaleController() {
|
|
|
2102
2799
|
"aria-label": "Grayscale",
|
|
2103
2800
|
"aria-pressed": value,
|
|
2104
2801
|
type: "button",
|
|
2105
|
-
children: /* @__PURE__ */ (0,
|
|
2802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2106
2803
|
}
|
|
2107
2804
|
)
|
|
2108
2805
|
] });
|
|
2109
2806
|
}
|
|
2110
2807
|
|
|
2111
2808
|
// src/features/LinkHighlightController.tsx
|
|
2112
|
-
var
|
|
2113
|
-
var
|
|
2114
|
-
var
|
|
2809
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2810
|
+
var FEATURE_KEY11 = "linkHighlight";
|
|
2811
|
+
var DEFAULT_VALUE11 = false;
|
|
2115
2812
|
function LinkHighlightController() {
|
|
2116
2813
|
const { value, setValue } = useAccessibility(
|
|
2117
|
-
|
|
2118
|
-
|
|
2814
|
+
FEATURE_KEY11,
|
|
2815
|
+
DEFAULT_VALUE11
|
|
2119
2816
|
);
|
|
2120
|
-
return /* @__PURE__ */ (0,
|
|
2121
|
-
/* @__PURE__ */ (0,
|
|
2122
|
-
/* @__PURE__ */ (0,
|
|
2123
|
-
/* @__PURE__ */ (0,
|
|
2817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
|
|
2818
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "arap-label", children: [
|
|
2819
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FeatureIcon, { name: FEATURE_KEY11 }),
|
|
2820
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Link Highlight" })
|
|
2124
2821
|
] }),
|
|
2125
|
-
/* @__PURE__ */ (0,
|
|
2822
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2126
2823
|
"button",
|
|
2127
2824
|
{
|
|
2128
2825
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2130,10 +2827,10 @@ function LinkHighlightController() {
|
|
|
2130
2827
|
"aria-label": "Link Highlight",
|
|
2131
2828
|
"aria-pressed": !!value,
|
|
2132
2829
|
type: "button",
|
|
2133
|
-
children: /* @__PURE__ */ (0,
|
|
2830
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2134
2831
|
}
|
|
2135
2832
|
),
|
|
2136
|
-
/* @__PURE__ */ (0,
|
|
2833
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "arap-segmented", children: ["yellow-on-black", "blue-on-yellow", "black-on-white"].map((mode) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2137
2834
|
"button",
|
|
2138
2835
|
{
|
|
2139
2836
|
type: "button",
|
|
@@ -2141,7 +2838,7 @@ function LinkHighlightController() {
|
|
|
2141
2838
|
"aria-pressed": value === mode,
|
|
2142
2839
|
onClick: () => setValue(mode),
|
|
2143
2840
|
children: [
|
|
2144
|
-
value === mode && /* @__PURE__ */ (0,
|
|
2841
|
+
value === mode && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2145
2842
|
mode.split("-").join(" ")
|
|
2146
2843
|
]
|
|
2147
2844
|
},
|
|
@@ -2151,21 +2848,21 @@ function LinkHighlightController() {
|
|
|
2151
2848
|
}
|
|
2152
2849
|
|
|
2153
2850
|
// src/features/TextAlignController.tsx
|
|
2154
|
-
var
|
|
2155
|
-
var
|
|
2156
|
-
var
|
|
2851
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2852
|
+
var FEATURE_KEY12 = "textAlign";
|
|
2853
|
+
var DEFAULT_VALUE12 = "default";
|
|
2157
2854
|
var OPTIONS = ["default", "left", "center", "right", "justify"];
|
|
2158
2855
|
function TextAlignController() {
|
|
2159
2856
|
const { value, setValue } = useAccessibility(
|
|
2160
|
-
|
|
2161
|
-
|
|
2857
|
+
FEATURE_KEY12,
|
|
2858
|
+
DEFAULT_VALUE12
|
|
2162
2859
|
);
|
|
2163
|
-
return /* @__PURE__ */ (0,
|
|
2164
|
-
/* @__PURE__ */ (0,
|
|
2165
|
-
/* @__PURE__ */ (0,
|
|
2166
|
-
/* @__PURE__ */ (0,
|
|
2860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "arap-label", children: [
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FeatureIcon, { name: FEATURE_KEY12 }),
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Text Alignment" })
|
|
2167
2864
|
] }),
|
|
2168
|
-
/* @__PURE__ */ (0,
|
|
2865
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "arap-segmented", children: OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2169
2866
|
"button",
|
|
2170
2867
|
{
|
|
2171
2868
|
className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
|
|
@@ -2174,30 +2871,78 @@ function TextAlignController() {
|
|
|
2174
2871
|
type: "button",
|
|
2175
2872
|
style: { textTransform: "capitalize" },
|
|
2176
2873
|
children: [
|
|
2177
|
-
value === option && /* @__PURE__ */ (0,
|
|
2874
|
+
value === option && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2178
2875
|
option
|
|
2179
2876
|
]
|
|
2180
2877
|
},
|
|
2181
2878
|
option
|
|
2182
|
-
)) })
|
|
2879
|
+
)) }),
|
|
2880
|
+
value === "justify" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2881
|
+
"div",
|
|
2882
|
+
{
|
|
2883
|
+
className: "arap-notice arap-notice-warning",
|
|
2884
|
+
role: "note",
|
|
2885
|
+
"aria-live": "polite",
|
|
2886
|
+
children: "Justified text creates uneven word spacing (\u201Crivers of white\u201D) that can impair readability."
|
|
2887
|
+
}
|
|
2888
|
+
)
|
|
2889
|
+
] });
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
// src/features/FontFamilyController.tsx
|
|
2893
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2894
|
+
var FEATURE_KEY13 = "fontFamily";
|
|
2895
|
+
var DEFAULT_VALUE13 = "default";
|
|
2896
|
+
var OPTIONS2 = [
|
|
2897
|
+
{ label: "Default", value: "default" },
|
|
2898
|
+
{ label: "Legible", value: "legible" },
|
|
2899
|
+
{ label: "Dyslexia", value: "dyslexia-option" }
|
|
2900
|
+
];
|
|
2901
|
+
function FontFamilyController() {
|
|
2902
|
+
const { value, setValue } = useAccessibility(
|
|
2903
|
+
FEATURE_KEY13,
|
|
2904
|
+
DEFAULT_VALUE13
|
|
2905
|
+
);
|
|
2906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Font Family", children: [
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "arap-label", children: [
|
|
2908
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FeatureIcon, { name: FEATURE_KEY13 }),
|
|
2909
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Font Family" })
|
|
2910
|
+
] }),
|
|
2911
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "arap-segmented", children: OPTIONS2.map((option) => {
|
|
2912
|
+
const isActive = value === option.value || option.value === "default" && (value === "original" || !value || value === "default");
|
|
2913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2914
|
+
"button",
|
|
2915
|
+
{
|
|
2916
|
+
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
2917
|
+
onClick: () => setValue(option.value),
|
|
2918
|
+
"aria-pressed": isActive,
|
|
2919
|
+
type: "button",
|
|
2920
|
+
children: [
|
|
2921
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2922
|
+
option.label
|
|
2923
|
+
]
|
|
2924
|
+
},
|
|
2925
|
+
option.value
|
|
2926
|
+
);
|
|
2927
|
+
}) })
|
|
2183
2928
|
] });
|
|
2184
2929
|
}
|
|
2185
2930
|
|
|
2186
2931
|
// src/features/HideImagesController.tsx
|
|
2187
|
-
var
|
|
2188
|
-
var
|
|
2189
|
-
var
|
|
2932
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2933
|
+
var FEATURE_KEY14 = "hideImages";
|
|
2934
|
+
var DEFAULT_VALUE14 = false;
|
|
2190
2935
|
function HideImagesController() {
|
|
2191
2936
|
const { value, setValue } = useAccessibility(
|
|
2192
|
-
|
|
2193
|
-
|
|
2937
|
+
FEATURE_KEY14,
|
|
2938
|
+
DEFAULT_VALUE14
|
|
2194
2939
|
);
|
|
2195
|
-
return /* @__PURE__ */ (0,
|
|
2196
|
-
/* @__PURE__ */ (0,
|
|
2197
|
-
/* @__PURE__ */ (0,
|
|
2198
|
-
/* @__PURE__ */ (0,
|
|
2940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "arap-label", children: [
|
|
2942
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
2943
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Hide Images" })
|
|
2199
2944
|
] }),
|
|
2200
|
-
/* @__PURE__ */ (0,
|
|
2945
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2201
2946
|
"button",
|
|
2202
2947
|
{
|
|
2203
2948
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2205,27 +2950,27 @@ function HideImagesController() {
|
|
|
2205
2950
|
"aria-label": "Hide Images",
|
|
2206
2951
|
"aria-pressed": value,
|
|
2207
2952
|
type: "button",
|
|
2208
|
-
children: /* @__PURE__ */ (0,
|
|
2953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2209
2954
|
}
|
|
2210
2955
|
)
|
|
2211
2956
|
] });
|
|
2212
2957
|
}
|
|
2213
2958
|
|
|
2214
2959
|
// src/features/HideVideosController.tsx
|
|
2215
|
-
var
|
|
2216
|
-
var
|
|
2217
|
-
var
|
|
2960
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2961
|
+
var FEATURE_KEY15 = "hideVideos";
|
|
2962
|
+
var DEFAULT_VALUE15 = false;
|
|
2218
2963
|
function HideVideosController() {
|
|
2219
2964
|
const { value, setValue } = useAccessibility(
|
|
2220
|
-
|
|
2221
|
-
|
|
2965
|
+
FEATURE_KEY15,
|
|
2966
|
+
DEFAULT_VALUE15
|
|
2222
2967
|
);
|
|
2223
|
-
return /* @__PURE__ */ (0,
|
|
2224
|
-
/* @__PURE__ */ (0,
|
|
2225
|
-
/* @__PURE__ */ (0,
|
|
2226
|
-
/* @__PURE__ */ (0,
|
|
2968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
|
|
2969
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "arap-label", children: [
|
|
2970
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
2971
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Hide Videos" })
|
|
2227
2972
|
] }),
|
|
2228
|
-
/* @__PURE__ */ (0,
|
|
2973
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2229
2974
|
"button",
|
|
2230
2975
|
{
|
|
2231
2976
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2233,27 +2978,27 @@ function HideVideosController() {
|
|
|
2233
2978
|
"aria-label": "Hide Videos",
|
|
2234
2979
|
"aria-pressed": value,
|
|
2235
2980
|
type: "button",
|
|
2236
|
-
children: /* @__PURE__ */ (0,
|
|
2981
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2237
2982
|
}
|
|
2238
2983
|
)
|
|
2239
2984
|
] });
|
|
2240
2985
|
}
|
|
2241
2986
|
|
|
2242
2987
|
// src/features/BigCursorController.tsx
|
|
2243
|
-
var
|
|
2244
|
-
var
|
|
2245
|
-
var
|
|
2988
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2989
|
+
var FEATURE_KEY16 = "bigCursor";
|
|
2990
|
+
var DEFAULT_VALUE16 = false;
|
|
2246
2991
|
function BigCursorController() {
|
|
2247
2992
|
const { value, setValue } = useAccessibility(
|
|
2248
|
-
|
|
2249
|
-
|
|
2993
|
+
FEATURE_KEY16,
|
|
2994
|
+
DEFAULT_VALUE16
|
|
2250
2995
|
);
|
|
2251
|
-
return /* @__PURE__ */ (0,
|
|
2252
|
-
/* @__PURE__ */ (0,
|
|
2253
|
-
/* @__PURE__ */ (0,
|
|
2254
|
-
/* @__PURE__ */ (0,
|
|
2996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
2997
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "arap-label", children: [
|
|
2998
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FeatureIcon, { name: FEATURE_KEY16 }),
|
|
2999
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "Big Cursor" })
|
|
2255
3000
|
] }),
|
|
2256
|
-
/* @__PURE__ */ (0,
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2257
3002
|
"button",
|
|
2258
3003
|
{
|
|
2259
3004
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2261,27 +3006,27 @@ function BigCursorController() {
|
|
|
2261
3006
|
"aria-label": "Big Cursor",
|
|
2262
3007
|
"aria-pressed": value,
|
|
2263
3008
|
type: "button",
|
|
2264
|
-
children: /* @__PURE__ */ (0,
|
|
3009
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2265
3010
|
}
|
|
2266
3011
|
)
|
|
2267
3012
|
] });
|
|
2268
3013
|
}
|
|
2269
3014
|
|
|
2270
3015
|
// src/features/ReadingMaskController.tsx
|
|
2271
|
-
var
|
|
2272
|
-
var
|
|
2273
|
-
var
|
|
3016
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3017
|
+
var FEATURE_KEY17 = "readingMask";
|
|
3018
|
+
var DEFAULT_VALUE17 = false;
|
|
2274
3019
|
function ReadingMaskController() {
|
|
2275
3020
|
const { value, setValue } = useAccessibility(
|
|
2276
|
-
|
|
2277
|
-
|
|
3021
|
+
FEATURE_KEY17,
|
|
3022
|
+
DEFAULT_VALUE17
|
|
2278
3023
|
);
|
|
2279
|
-
return /* @__PURE__ */ (0,
|
|
2280
|
-
/* @__PURE__ */ (0,
|
|
2281
|
-
/* @__PURE__ */ (0,
|
|
2282
|
-
/* @__PURE__ */ (0,
|
|
3024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
|
|
3025
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "arap-label", children: [
|
|
3026
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
3027
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "Reading Mask" })
|
|
2283
3028
|
] }),
|
|
2284
|
-
/* @__PURE__ */ (0,
|
|
3029
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2285
3030
|
"button",
|
|
2286
3031
|
{
|
|
2287
3032
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2289,27 +3034,27 @@ function ReadingMaskController() {
|
|
|
2289
3034
|
"aria-label": "Reading Mask",
|
|
2290
3035
|
"aria-pressed": value,
|
|
2291
3036
|
type: "button",
|
|
2292
|
-
children: /* @__PURE__ */ (0,
|
|
3037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2293
3038
|
}
|
|
2294
3039
|
)
|
|
2295
3040
|
] });
|
|
2296
3041
|
}
|
|
2297
3042
|
|
|
2298
3043
|
// src/features/ReadingGuideController.tsx
|
|
2299
|
-
var
|
|
2300
|
-
var
|
|
2301
|
-
var
|
|
3044
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3045
|
+
var FEATURE_KEY18 = "readingGuide";
|
|
3046
|
+
var DEFAULT_VALUE18 = false;
|
|
2302
3047
|
function ReadingGuideController() {
|
|
2303
3048
|
const { value, setValue } = useAccessibility(
|
|
2304
|
-
|
|
2305
|
-
|
|
3049
|
+
FEATURE_KEY18,
|
|
3050
|
+
DEFAULT_VALUE18
|
|
2306
3051
|
);
|
|
2307
|
-
return /* @__PURE__ */ (0,
|
|
2308
|
-
/* @__PURE__ */ (0,
|
|
2309
|
-
/* @__PURE__ */ (0,
|
|
2310
|
-
/* @__PURE__ */ (0,
|
|
3052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
|
|
3053
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "arap-label", children: [
|
|
3054
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeatureIcon, { name: FEATURE_KEY18 }),
|
|
3055
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Reading Guide" })
|
|
2311
3056
|
] }),
|
|
2312
|
-
/* @__PURE__ */ (0,
|
|
3057
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2313
3058
|
"button",
|
|
2314
3059
|
{
|
|
2315
3060
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2317,7 +3062,7 @@ function ReadingGuideController() {
|
|
|
2317
3062
|
"aria-label": "Reading Guide",
|
|
2318
3063
|
"aria-pressed": value,
|
|
2319
3064
|
type: "button",
|
|
2320
|
-
children: /* @__PURE__ */ (0,
|
|
3065
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2321
3066
|
}
|
|
2322
3067
|
)
|
|
2323
3068
|
] });
|
|
@@ -2326,7 +3071,7 @@ function ReadingGuideController() {
|
|
|
2326
3071
|
// src/features/ResetController.tsx
|
|
2327
3072
|
var import_react_dom2 = require("react-dom");
|
|
2328
3073
|
var import_react11 = require("react");
|
|
2329
|
-
var
|
|
3074
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2330
3075
|
function ResetController() {
|
|
2331
3076
|
const ctx = (0, import_react11.useContext)(AccessibilityContext);
|
|
2332
3077
|
if (!ctx) {
|
|
@@ -2337,15 +3082,15 @@ function ResetController() {
|
|
|
2337
3082
|
const actionHost = (0, import_react11.useContext)(PanelActionsContext);
|
|
2338
3083
|
const { resetAll } = ctx;
|
|
2339
3084
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
2340
|
-
const button = /* @__PURE__ */ (0,
|
|
2341
|
-
/* @__PURE__ */ (0,
|
|
3085
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
3086
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FeatureIcon, { name: "reset" }),
|
|
2342
3087
|
strings.resetAll
|
|
2343
3088
|
] }) });
|
|
2344
3089
|
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
2345
3090
|
}
|
|
2346
3091
|
|
|
2347
3092
|
// src/core/controls/ToggleControl.tsx
|
|
2348
|
-
var
|
|
3093
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2349
3094
|
function ToggleControl({
|
|
2350
3095
|
id,
|
|
2351
3096
|
label,
|
|
@@ -2367,12 +3112,12 @@ function ToggleControl({
|
|
|
2367
3112
|
onChange(!checked);
|
|
2368
3113
|
}
|
|
2369
3114
|
};
|
|
2370
|
-
return /* @__PURE__ */ (0,
|
|
3115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2371
3116
|
"div",
|
|
2372
3117
|
{
|
|
2373
3118
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2374
3119
|
style,
|
|
2375
|
-
children: /* @__PURE__ */ (0,
|
|
3120
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2376
3121
|
"button",
|
|
2377
3122
|
{
|
|
2378
3123
|
id,
|
|
@@ -2386,7 +3131,7 @@ function ToggleControl({
|
|
|
2386
3131
|
disabled: !isInteractive,
|
|
2387
3132
|
onClick: handleClick,
|
|
2388
3133
|
title: unavailableReason || description || toggleLabel,
|
|
2389
|
-
children: /* @__PURE__ */ (0,
|
|
3134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2390
3135
|
"span",
|
|
2391
3136
|
{
|
|
2392
3137
|
className: "arap-toggle-knob",
|
|
@@ -2403,7 +3148,7 @@ function ToggleControl({
|
|
|
2403
3148
|
|
|
2404
3149
|
// src/core/controls/ChoiceControl.tsx
|
|
2405
3150
|
var import_react12 = require("react");
|
|
2406
|
-
var
|
|
3151
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2407
3152
|
function ChoiceControl({
|
|
2408
3153
|
id,
|
|
2409
3154
|
label,
|
|
@@ -2459,7 +3204,7 @@ function ChoiceControl({
|
|
|
2459
3204
|
const renderOptionButton = (opt) => {
|
|
2460
3205
|
const isSelected = value === opt.value;
|
|
2461
3206
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
2462
|
-
return /* @__PURE__ */ (0,
|
|
3207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2463
3208
|
"button",
|
|
2464
3209
|
{
|
|
2465
3210
|
type: "button",
|
|
@@ -2473,15 +3218,15 @@ function ChoiceControl({
|
|
|
2473
3218
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
2474
3219
|
title: opt.description,
|
|
2475
3220
|
children: [
|
|
2476
|
-
isSelected && /* @__PURE__ */ (0,
|
|
2477
|
-
/* @__PURE__ */ (0,
|
|
2478
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
3221
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3222
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: opt.label }),
|
|
3223
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
2479
3224
|
]
|
|
2480
3225
|
},
|
|
2481
3226
|
String(opt.value)
|
|
2482
3227
|
);
|
|
2483
3228
|
};
|
|
2484
|
-
return /* @__PURE__ */ (0,
|
|
3229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2485
3230
|
"div",
|
|
2486
3231
|
{
|
|
2487
3232
|
ref: containerRef,
|
|
@@ -2492,15 +3237,15 @@ function ChoiceControl({
|
|
|
2492
3237
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2493
3238
|
style,
|
|
2494
3239
|
onKeyDown: handleKeyDown,
|
|
2495
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
3240
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2496
3241
|
"div",
|
|
2497
3242
|
{
|
|
2498
3243
|
className: "arap-choice-group",
|
|
2499
3244
|
role: "group",
|
|
2500
3245
|
"aria-label": group.label,
|
|
2501
3246
|
children: [
|
|
2502
|
-
/* @__PURE__ */ (0,
|
|
2503
|
-
/* @__PURE__ */ (0,
|
|
3247
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
3248
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
2504
3249
|
]
|
|
2505
3250
|
},
|
|
2506
3251
|
group.label
|
|
@@ -2510,7 +3255,7 @@ function ChoiceControl({
|
|
|
2510
3255
|
}
|
|
2511
3256
|
|
|
2512
3257
|
// src/core/controls/StepperControl.tsx
|
|
2513
|
-
var
|
|
3258
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2514
3259
|
function StepperControl({
|
|
2515
3260
|
id,
|
|
2516
3261
|
label,
|
|
@@ -2540,15 +3285,15 @@ function StepperControl({
|
|
|
2540
3285
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
2541
3286
|
}
|
|
2542
3287
|
};
|
|
2543
|
-
return /* @__PURE__ */ (0,
|
|
3288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2544
3289
|
"div",
|
|
2545
3290
|
{
|
|
2546
3291
|
id,
|
|
2547
3292
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2548
3293
|
style,
|
|
2549
3294
|
children: [
|
|
2550
|
-
/* @__PURE__ */ (0,
|
|
2551
|
-
/* @__PURE__ */ (0,
|
|
3295
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-controls", children: [
|
|
3296
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2552
3297
|
"button",
|
|
2553
3298
|
{
|
|
2554
3299
|
type: "button",
|
|
@@ -2559,8 +3304,8 @@ function StepperControl({
|
|
|
2559
3304
|
children: "\u2212"
|
|
2560
3305
|
}
|
|
2561
3306
|
),
|
|
2562
|
-
/* @__PURE__ */ (0,
|
|
2563
|
-
/* @__PURE__ */ (0,
|
|
3307
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
3308
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2564
3309
|
"button",
|
|
2565
3310
|
{
|
|
2566
3311
|
type: "button",
|
|
@@ -2572,7 +3317,7 @@ function StepperControl({
|
|
|
2572
3317
|
}
|
|
2573
3318
|
)
|
|
2574
3319
|
] }),
|
|
2575
|
-
showSlider && /* @__PURE__ */ (0,
|
|
3320
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2576
3321
|
"input",
|
|
2577
3322
|
{
|
|
2578
3323
|
type: "range",
|
|
@@ -2596,7 +3341,7 @@ function StepperControl({
|
|
|
2596
3341
|
}
|
|
2597
3342
|
|
|
2598
3343
|
// src/core/controls/FeatureCard.tsx
|
|
2599
|
-
var
|
|
3344
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2600
3345
|
function FeatureCard({
|
|
2601
3346
|
id,
|
|
2602
3347
|
featureKey,
|
|
@@ -2615,7 +3360,7 @@ function FeatureCard({
|
|
|
2615
3360
|
largeControls = false
|
|
2616
3361
|
}) {
|
|
2617
3362
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
2618
|
-
return /* @__PURE__ */ (0,
|
|
3363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2619
3364
|
"div",
|
|
2620
3365
|
{
|
|
2621
3366
|
id,
|
|
@@ -2624,27 +3369,27 @@ function FeatureCard({
|
|
|
2624
3369
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2625
3370
|
style,
|
|
2626
3371
|
children: [
|
|
2627
|
-
/* @__PURE__ */ (0,
|
|
2628
|
-
/* @__PURE__ */ (0,
|
|
2629
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
2630
|
-
/* @__PURE__ */ (0,
|
|
3372
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-card-header", children: [
|
|
3373
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "arap-label", children: [
|
|
3374
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-card-title", children: title })
|
|
2631
3376
|
] }),
|
|
2632
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
3377
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
2633
3378
|
] }),
|
|
2634
|
-
description && /* @__PURE__ */ (0,
|
|
2635
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
2636
|
-
/* @__PURE__ */ (0,
|
|
2637
|
-
/* @__PURE__ */ (0,
|
|
3379
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
3380
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
3381
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3382
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: errorMessage })
|
|
2638
3383
|
] }),
|
|
2639
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
2640
|
-
/* @__PURE__ */ (0,
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
3384
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
3385
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
3386
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: unavailableMessage })
|
|
2642
3387
|
] }),
|
|
2643
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
2644
|
-
/* @__PURE__ */ (0,
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2646
|
-
/* @__PURE__ */ (0,
|
|
2647
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
3388
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
3389
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
3390
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-permission-content", children: [
|
|
3391
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: permissionMessage }),
|
|
3392
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2648
3393
|
"button",
|
|
2649
3394
|
{
|
|
2650
3395
|
type: "button",
|
|
@@ -2655,14 +3400,14 @@ function FeatureCard({
|
|
|
2655
3400
|
)
|
|
2656
3401
|
] })
|
|
2657
3402
|
] }),
|
|
2658
|
-
/* @__PURE__ */ (0,
|
|
3403
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "arap-card-content", children })
|
|
2659
3404
|
]
|
|
2660
3405
|
}
|
|
2661
3406
|
);
|
|
2662
3407
|
}
|
|
2663
3408
|
|
|
2664
3409
|
// src/core/controls/FeatureStatusState.tsx
|
|
2665
|
-
var
|
|
3410
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2666
3411
|
function SearchCount({
|
|
2667
3412
|
totalCount,
|
|
2668
3413
|
matchedCount,
|
|
@@ -2671,7 +3416,7 @@ function SearchCount({
|
|
|
2671
3416
|
style
|
|
2672
3417
|
}) {
|
|
2673
3418
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
2674
|
-
return /* @__PURE__ */ (0,
|
|
3419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2675
3420
|
"div",
|
|
2676
3421
|
{
|
|
2677
3422
|
role: "status",
|
|
@@ -2691,17 +3436,17 @@ function EmptyState({
|
|
|
2691
3436
|
className = "",
|
|
2692
3437
|
style
|
|
2693
3438
|
}) {
|
|
2694
|
-
return /* @__PURE__ */ (0,
|
|
3439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2695
3440
|
"div",
|
|
2696
3441
|
{
|
|
2697
3442
|
role: "status",
|
|
2698
3443
|
className: `arap-empty-state ${className}`,
|
|
2699
3444
|
style,
|
|
2700
3445
|
children: [
|
|
2701
|
-
/* @__PURE__ */ (0,
|
|
2702
|
-
/* @__PURE__ */ (0,
|
|
2703
|
-
/* @__PURE__ */ (0,
|
|
2704
|
-
onAction && /* @__PURE__ */ (0,
|
|
3446
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
3447
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { className: "arap-empty-title", children: title }),
|
|
3448
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "arap-empty-desc", children: description }),
|
|
3449
|
+
onAction && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
2705
3450
|
]
|
|
2706
3451
|
}
|
|
2707
3452
|
);
|
|
@@ -2714,18 +3459,18 @@ function ErrorState({
|
|
|
2714
3459
|
className = "",
|
|
2715
3460
|
style
|
|
2716
3461
|
}) {
|
|
2717
|
-
return /* @__PURE__ */ (0,
|
|
3462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2718
3463
|
"div",
|
|
2719
3464
|
{
|
|
2720
3465
|
role: "alert",
|
|
2721
3466
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
2722
3467
|
style,
|
|
2723
3468
|
children: [
|
|
2724
|
-
/* @__PURE__ */ (0,
|
|
2725
|
-
/* @__PURE__ */ (0,
|
|
2726
|
-
title && /* @__PURE__ */ (0,
|
|
2727
|
-
/* @__PURE__ */ (0,
|
|
2728
|
-
onRetry && /* @__PURE__ */ (0,
|
|
3469
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3470
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-error-content", children: [
|
|
3471
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
3472
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "arap-error-message", children: message }),
|
|
3473
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
2729
3474
|
] })
|
|
2730
3475
|
]
|
|
2731
3476
|
}
|
|
@@ -2733,7 +3478,7 @@ function ErrorState({
|
|
|
2733
3478
|
}
|
|
2734
3479
|
|
|
2735
3480
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
2736
|
-
var
|
|
3481
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2737
3482
|
function ProfilePreviewCard({
|
|
2738
3483
|
profile,
|
|
2739
3484
|
isActive,
|
|
@@ -2783,7 +3528,7 @@ function ProfilePreviewCard({
|
|
|
2783
3528
|
if (val === null || val === void 0) return "Original";
|
|
2784
3529
|
return String(val);
|
|
2785
3530
|
};
|
|
2786
|
-
return /* @__PURE__ */ (0,
|
|
3531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2787
3532
|
"div",
|
|
2788
3533
|
{
|
|
2789
3534
|
role: "group",
|
|
@@ -2791,10 +3536,10 @@ function ProfilePreviewCard({
|
|
|
2791
3536
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2792
3537
|
style,
|
|
2793
3538
|
children: [
|
|
2794
|
-
/* @__PURE__ */ (0,
|
|
2795
|
-
/* @__PURE__ */ (0,
|
|
2796
|
-
/* @__PURE__ */ (0,
|
|
2797
|
-
isActive && /* @__PURE__ */ (0,
|
|
3539
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-profile-header", children: [
|
|
3540
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
3541
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
3542
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2798
3543
|
"span",
|
|
2799
3544
|
{
|
|
2800
3545
|
className: "arap-profile-active-badge",
|
|
@@ -2803,14 +3548,14 @@ function ProfilePreviewCard({
|
|
|
2803
3548
|
}
|
|
2804
3549
|
)
|
|
2805
3550
|
] }),
|
|
2806
|
-
/* @__PURE__ */ (0,
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
2807
3552
|
] }),
|
|
2808
|
-
/* @__PURE__ */ (0,
|
|
2809
|
-
/* @__PURE__ */ (0,
|
|
2810
|
-
/* @__PURE__ */ (0,
|
|
3553
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
3554
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
2811
3556
|
const val = profile.settings[key];
|
|
2812
|
-
return /* @__PURE__ */ (0,
|
|
2813
|
-
/* @__PURE__ */ (0,
|
|
3557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
3558
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("strong", { children: [
|
|
2814
3559
|
formatKeyName(key),
|
|
2815
3560
|
":"
|
|
2816
3561
|
] }),
|
|
@@ -2819,7 +3564,7 @@ function ProfilePreviewCard({
|
|
|
2819
3564
|
] }, key);
|
|
2820
3565
|
}) })
|
|
2821
3566
|
] }),
|
|
2822
|
-
/* @__PURE__ */ (0,
|
|
3567
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2823
3568
|
"button",
|
|
2824
3569
|
{
|
|
2825
3570
|
type: "button",
|
|
@@ -2828,7 +3573,7 @@ function ProfilePreviewCard({
|
|
|
2828
3573
|
"aria-label": `Revert ${profile.label} profile`,
|
|
2829
3574
|
children: "Revert to custom settings"
|
|
2830
3575
|
}
|
|
2831
|
-
) : /* @__PURE__ */ (0,
|
|
3576
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2832
3577
|
"button",
|
|
2833
3578
|
{
|
|
2834
3579
|
type: "button",
|
|
@@ -2852,18 +3597,26 @@ function ProfilePreviewCard({
|
|
|
2852
3597
|
ChoiceControl,
|
|
2853
3598
|
ContrastController,
|
|
2854
3599
|
DEFAULT_PREFERENCES,
|
|
3600
|
+
DYSLEXIA_FONT_STACK,
|
|
2855
3601
|
EmptyState,
|
|
2856
3602
|
ErrorState,
|
|
3603
|
+
FONT_FAMILY_PRESETS,
|
|
3604
|
+
FONT_FAMILY_PROTECTED_SELECTOR,
|
|
2857
3605
|
FeatureCard,
|
|
3606
|
+
FontFamilyController,
|
|
2858
3607
|
FontSizeController,
|
|
2859
3608
|
GrayscaleController,
|
|
2860
3609
|
HideImagesController,
|
|
2861
3610
|
HideVideosController,
|
|
2862
3611
|
InvertColorsController,
|
|
3612
|
+
LEGIBLE_FONT_STACK,
|
|
3613
|
+
LINE_HEIGHT_RATIOS,
|
|
3614
|
+
LINE_HEIGHT_STEPS,
|
|
2863
3615
|
LetterSpacingController,
|
|
2864
3616
|
LineHeightController,
|
|
2865
3617
|
LinkHighlightController,
|
|
2866
3618
|
PROFILE_DEFINITIONS,
|
|
3619
|
+
ParagraphSpacingController,
|
|
2867
3620
|
ProfilePreviewCard,
|
|
2868
3621
|
ReadingGuideController,
|
|
2869
3622
|
ReadingMaskController,
|
|
@@ -2871,14 +3624,21 @@ function ProfilePreviewCard({
|
|
|
2871
3624
|
SaturationController,
|
|
2872
3625
|
SearchCount,
|
|
2873
3626
|
StepperControl,
|
|
3627
|
+
TEXT_ALIGN_BLOCK_SELECTOR,
|
|
2874
3628
|
TEXT_SCALE_PROTECTED_SELECTOR,
|
|
2875
3629
|
TEXT_SCALE_STEPS,
|
|
3630
|
+
TEXT_SPACING_EXCLUDED_SELECTOR,
|
|
2876
3631
|
TextAlignController,
|
|
2877
3632
|
TextScaleController,
|
|
2878
3633
|
ToggleControl,
|
|
3634
|
+
WordSpacingController,
|
|
2879
3635
|
createInitialPreferencesState,
|
|
2880
3636
|
enLocale,
|
|
3637
|
+
getScriptSpacingConstraints,
|
|
3638
|
+
isProtectedFromFontFamily,
|
|
3639
|
+
isProtectedFromTextAlign,
|
|
2881
3640
|
isProtectedFromTextScale,
|
|
3641
|
+
isProtectedFromTextSpacing,
|
|
2882
3642
|
isRtlLocale,
|
|
2883
3643
|
normalizePreferenceValue,
|
|
2884
3644
|
normalizePreferences,
|