accessibility-plugin-react 2.3.2 → 2.5.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 +20 -17
- package/dist/index.d.mts +85 -4
- package/dist/index.d.ts +85 -4
- package/dist/index.js +978 -251
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +967 -251
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +23 -0
- package/docs/API.md +21 -14
- package/docs/BUILD_AND_RELEASE_PLAN.md +2 -2
- package/docs/FEATURES.md +20 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,10 +38,13 @@ __export(index_exports, {
|
|
|
38
38
|
HideImagesController: () => HideImagesController,
|
|
39
39
|
HideVideosController: () => HideVideosController,
|
|
40
40
|
InvertColorsController: () => InvertColorsController,
|
|
41
|
+
LINE_HEIGHT_RATIOS: () => LINE_HEIGHT_RATIOS,
|
|
42
|
+
LINE_HEIGHT_STEPS: () => LINE_HEIGHT_STEPS,
|
|
41
43
|
LetterSpacingController: () => LetterSpacingController,
|
|
42
44
|
LineHeightController: () => LineHeightController,
|
|
43
45
|
LinkHighlightController: () => LinkHighlightController,
|
|
44
46
|
PROFILE_DEFINITIONS: () => PROFILE_DEFINITIONS,
|
|
47
|
+
ParagraphSpacingController: () => ParagraphSpacingController,
|
|
45
48
|
ProfilePreviewCard: () => ProfilePreviewCard,
|
|
46
49
|
ReadingGuideController: () => ReadingGuideController,
|
|
47
50
|
ReadingMaskController: () => ReadingMaskController,
|
|
@@ -49,10 +52,18 @@ __export(index_exports, {
|
|
|
49
52
|
SaturationController: () => SaturationController,
|
|
50
53
|
SearchCount: () => SearchCount,
|
|
51
54
|
StepperControl: () => StepperControl,
|
|
55
|
+
TEXT_SCALE_PROTECTED_SELECTOR: () => TEXT_SCALE_PROTECTED_SELECTOR,
|
|
56
|
+
TEXT_SCALE_STEPS: () => TEXT_SCALE_STEPS,
|
|
57
|
+
TEXT_SPACING_EXCLUDED_SELECTOR: () => TEXT_SPACING_EXCLUDED_SELECTOR,
|
|
52
58
|
TextAlignController: () => TextAlignController,
|
|
59
|
+
TextScaleController: () => TextScaleController,
|
|
53
60
|
ToggleControl: () => ToggleControl,
|
|
61
|
+
WordSpacingController: () => WordSpacingController,
|
|
54
62
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
55
63
|
enLocale: () => enLocale,
|
|
64
|
+
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
65
|
+
isProtectedFromTextScale: () => isProtectedFromTextScale,
|
|
66
|
+
isProtectedFromTextSpacing: () => isProtectedFromTextSpacing,
|
|
56
67
|
isRtlLocale: () => isRtlLocale,
|
|
57
68
|
normalizePreferenceValue: () => normalizePreferenceValue,
|
|
58
69
|
normalizePreferences: () => normalizePreferences,
|
|
@@ -87,7 +98,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
87
98
|
}
|
|
88
99
|
|
|
89
100
|
// src/styles/tailwind.css
|
|
90
|
-
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');
|
|
101
|
+
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');
|
|
91
102
|
|
|
92
103
|
// src/core/AccessibilityPlugin.tsx
|
|
93
104
|
var import_react4 = require("react");
|
|
@@ -296,10 +307,32 @@ function createPreferenceStore(key, persist, storageMode) {
|
|
|
296
307
|
// src/core/featureSchema.ts
|
|
297
308
|
var numberIn = (min, max) => (v) => typeof v === "number" && Number.isFinite(v) && v >= min && v <= max;
|
|
298
309
|
var oneOf = (...values) => (v) => values.includes(v);
|
|
310
|
+
var TEXT_SCALE_STEPS = [1, 1.125, 1.25, 1.5, 2];
|
|
311
|
+
var LINE_HEIGHT_STEPS = [100, 150, 175, 200];
|
|
312
|
+
var LINE_HEIGHT_RATIOS = [1, 1.5, 1.75, 2];
|
|
299
313
|
var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
300
314
|
fontSize: { defaultValue: 100, validate: numberIn(50, 200) },
|
|
301
|
-
|
|
302
|
-
|
|
315
|
+
fontScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
316
|
+
textScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
317
|
+
lineHeight: {
|
|
318
|
+
defaultValue: 100,
|
|
319
|
+
validate: (v) => typeof v === "number" && Number.isFinite(v) && (v >= 0.5 && v <= 2.5 || v >= 50 && v <= 200)
|
|
320
|
+
},
|
|
321
|
+
letterSpacing: { defaultValue: 0, validate: numberIn(0, 20) },
|
|
322
|
+
wordSpacing: { defaultValue: 0, validate: numberIn(0, 20) },
|
|
323
|
+
paragraphSpacing: { defaultValue: 0, validate: numberIn(0, 64) },
|
|
324
|
+
letterSpacingEm: {
|
|
325
|
+
defaultValue: null,
|
|
326
|
+
validate: (v) => v === null || numberIn(0, 1)(v)
|
|
327
|
+
},
|
|
328
|
+
wordSpacingEm: {
|
|
329
|
+
defaultValue: null,
|
|
330
|
+
validate: (v) => v === null || numberIn(0, 1)(v)
|
|
331
|
+
},
|
|
332
|
+
paragraphSpacingEm: {
|
|
333
|
+
defaultValue: null,
|
|
334
|
+
validate: (v) => v === null || numberIn(0, 2)(v)
|
|
335
|
+
},
|
|
303
336
|
contrast: {
|
|
304
337
|
defaultValue: 0,
|
|
305
338
|
validate: oneOf(
|
|
@@ -376,6 +409,197 @@ function composeFilter(values) {
|
|
|
376
409
|
values.grayscale && "grayscale(1)"
|
|
377
410
|
].filter(Boolean).join(" ");
|
|
378
411
|
}
|
|
412
|
+
var TEXT_SCALE_PROTECTED_SELECTOR = [
|
|
413
|
+
"input",
|
|
414
|
+
"textarea",
|
|
415
|
+
"select",
|
|
416
|
+
"select *",
|
|
417
|
+
"option",
|
|
418
|
+
"optgroup",
|
|
419
|
+
"button",
|
|
420
|
+
"button *",
|
|
421
|
+
"datalist",
|
|
422
|
+
"output",
|
|
423
|
+
"progress",
|
|
424
|
+
"meter",
|
|
425
|
+
"label",
|
|
426
|
+
"label *",
|
|
427
|
+
"legend",
|
|
428
|
+
"legend *",
|
|
429
|
+
"pre",
|
|
430
|
+
"pre *",
|
|
431
|
+
"code",
|
|
432
|
+
"kbd",
|
|
433
|
+
"samp",
|
|
434
|
+
"var",
|
|
435
|
+
"svg",
|
|
436
|
+
"svg *",
|
|
437
|
+
"[data-icon]",
|
|
438
|
+
"[data-icon] *",
|
|
439
|
+
'i[class*="icon"]',
|
|
440
|
+
'span[class*="icon"]',
|
|
441
|
+
'i[class*="fa-"]',
|
|
442
|
+
'span[class*="fa-"]',
|
|
443
|
+
'i[class*="material-symbols"]',
|
|
444
|
+
'span[class*="material-symbols"]',
|
|
445
|
+
'i[class*="lucide"]',
|
|
446
|
+
'span[class*="lucide"]',
|
|
447
|
+
"[data-arap-ignore]",
|
|
448
|
+
"[data-arap-ignore] *",
|
|
449
|
+
"[data-arap-exempt]",
|
|
450
|
+
"[data-arap-exempt] *"
|
|
451
|
+
].join(", ");
|
|
452
|
+
function isProtectedFromTextScale(element) {
|
|
453
|
+
try {
|
|
454
|
+
if (element.matches(EXCLUDED)) return true;
|
|
455
|
+
if (element.matches(TEXT_SCALE_PROTECTED_SELECTOR)) return true;
|
|
456
|
+
if (element.closest(
|
|
457
|
+
"pre, button, label, legend, select, [data-arap-ignore], [data-arap-exempt], [data-arap-ui]"
|
|
458
|
+
)) {
|
|
459
|
+
return true;
|
|
460
|
+
}
|
|
461
|
+
} catch {
|
|
462
|
+
return false;
|
|
463
|
+
}
|
|
464
|
+
return false;
|
|
465
|
+
}
|
|
466
|
+
var TEXT_SPACING_EXCLUDED_SELECTOR = [
|
|
467
|
+
"input",
|
|
468
|
+
"textarea",
|
|
469
|
+
"select",
|
|
470
|
+
"select *",
|
|
471
|
+
"option",
|
|
472
|
+
"optgroup",
|
|
473
|
+
"button",
|
|
474
|
+
"button *",
|
|
475
|
+
"datalist",
|
|
476
|
+
"output",
|
|
477
|
+
"progress",
|
|
478
|
+
"meter",
|
|
479
|
+
"label",
|
|
480
|
+
"label *",
|
|
481
|
+
"legend",
|
|
482
|
+
"legend *",
|
|
483
|
+
'[role="button"]',
|
|
484
|
+
'[role="button"] *',
|
|
485
|
+
'[role="checkbox"]',
|
|
486
|
+
'[role="combobox"]',
|
|
487
|
+
'[role="menuitem"]',
|
|
488
|
+
'[role="tab"]',
|
|
489
|
+
"pre",
|
|
490
|
+
"pre *",
|
|
491
|
+
"code",
|
|
492
|
+
"kbd",
|
|
493
|
+
"samp",
|
|
494
|
+
"var",
|
|
495
|
+
"table",
|
|
496
|
+
"table *",
|
|
497
|
+
"thead",
|
|
498
|
+
"thead *",
|
|
499
|
+
"tbody",
|
|
500
|
+
"tbody *",
|
|
501
|
+
"tfoot",
|
|
502
|
+
"tfoot *",
|
|
503
|
+
"tr",
|
|
504
|
+
"tr *",
|
|
505
|
+
"th",
|
|
506
|
+
"th *",
|
|
507
|
+
"td",
|
|
508
|
+
"td *",
|
|
509
|
+
"caption",
|
|
510
|
+
"colgroup",
|
|
511
|
+
"col",
|
|
512
|
+
'[role="table"]',
|
|
513
|
+
'[role="table"] *',
|
|
514
|
+
'[role="grid"]',
|
|
515
|
+
'[role="grid"] *',
|
|
516
|
+
'[role="row"]',
|
|
517
|
+
'[role="row"] *',
|
|
518
|
+
'[role="cell"]',
|
|
519
|
+
'[role="cell"] *',
|
|
520
|
+
'[role="columnheader"]',
|
|
521
|
+
'[role="columnheader"] *',
|
|
522
|
+
'[role="rowheader"]',
|
|
523
|
+
'[role="rowheader"] *',
|
|
524
|
+
"svg",
|
|
525
|
+
"svg *",
|
|
526
|
+
"[data-icon]",
|
|
527
|
+
"[data-icon] *",
|
|
528
|
+
'i[class*="icon"]',
|
|
529
|
+
'span[class*="icon"]',
|
|
530
|
+
'i[class*="fa-"]',
|
|
531
|
+
'span[class*="fa-"]',
|
|
532
|
+
'i[class*="material-symbols"]',
|
|
533
|
+
'span[class*="material-symbols"]',
|
|
534
|
+
'i[class*="lucide"]',
|
|
535
|
+
'span[class*="lucide"]',
|
|
536
|
+
"[data-arap-ignore]",
|
|
537
|
+
"[data-arap-ignore] *",
|
|
538
|
+
"[data-arap-exempt]",
|
|
539
|
+
"[data-arap-exempt] *",
|
|
540
|
+
"[data-arap-ui]",
|
|
541
|
+
"[data-arap-ui] *",
|
|
542
|
+
".arap-root",
|
|
543
|
+
".arap-root *"
|
|
544
|
+
].join(", ");
|
|
545
|
+
function isProtectedFromTextSpacing(element) {
|
|
546
|
+
try {
|
|
547
|
+
if (element.matches(EXCLUDED)) return true;
|
|
548
|
+
if (element.matches(TEXT_SPACING_EXCLUDED_SELECTOR)) return true;
|
|
549
|
+
if (element.closest(
|
|
550
|
+
"pre, button, label, legend, select, textarea, [role='button'], table, [role='table'], [role='grid'], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
551
|
+
)) {
|
|
552
|
+
return true;
|
|
553
|
+
}
|
|
554
|
+
} catch {
|
|
555
|
+
return false;
|
|
556
|
+
}
|
|
557
|
+
return false;
|
|
558
|
+
}
|
|
559
|
+
var ARABIC_SCRIPT_REGEX = /[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/;
|
|
560
|
+
var INDIC_SCRIPT_REGEX = /[\u0900-\u0DFF]/;
|
|
561
|
+
var CURSIVE_LANG_REGEX = /^(ar|fa|ur|ug|dv|ps|ku)($|-)/i;
|
|
562
|
+
var INDIC_LANG_REGEX = /^(si|ta|hi|bn|te|kn|ml|gu|pa|mr|ne|sa)($|-)/i;
|
|
563
|
+
function getScriptSpacingConstraints(element) {
|
|
564
|
+
const lang = element.closest("[lang]")?.getAttribute("lang") || document.documentElement.lang || "";
|
|
565
|
+
const dir = element.closest("[dir]")?.getAttribute("dir") || document.documentElement.dir || "";
|
|
566
|
+
if (CURSIVE_LANG_REGEX.test(lang) || dir.toLowerCase() === "rtl") {
|
|
567
|
+
return {
|
|
568
|
+
allowLetterSpacing: false,
|
|
569
|
+
maxLetterSpacingPx: 0,
|
|
570
|
+
script: "cursive"
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
if (INDIC_LANG_REGEX.test(lang)) {
|
|
574
|
+
return {
|
|
575
|
+
allowLetterSpacing: true,
|
|
576
|
+
maxLetterSpacingPx: 1,
|
|
577
|
+
script: "indic"
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
const text = element.textContent || "";
|
|
581
|
+
if (text.length > 0) {
|
|
582
|
+
if (ARABIC_SCRIPT_REGEX.test(text)) {
|
|
583
|
+
return {
|
|
584
|
+
allowLetterSpacing: false,
|
|
585
|
+
maxLetterSpacingPx: 0,
|
|
586
|
+
script: "cursive"
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
if (INDIC_SCRIPT_REGEX.test(text)) {
|
|
590
|
+
return {
|
|
591
|
+
allowLetterSpacing: true,
|
|
592
|
+
maxLetterSpacingPx: 1,
|
|
593
|
+
script: "indic"
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return {
|
|
598
|
+
allowLetterSpacing: true,
|
|
599
|
+
maxLetterSpacingPx: Infinity,
|
|
600
|
+
script: "standard"
|
|
601
|
+
};
|
|
602
|
+
}
|
|
379
603
|
function applyPage(values) {
|
|
380
604
|
const undo = [];
|
|
381
605
|
function set(element, property, value) {
|
|
@@ -394,20 +618,49 @@ function applyPage(values) {
|
|
|
394
618
|
document.body.querySelectorAll("*")
|
|
395
619
|
).filter((el) => el instanceof HTMLElement && !el.matches(EXCLUDED));
|
|
396
620
|
const elements = allElements.length > MAX_HOST_ELEMENTS ? allElements.slice(0, MAX_HOST_ELEMENTS) : allElements;
|
|
397
|
-
const
|
|
398
|
-
const
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
621
|
+
const fontScaleValue = typeof values.fontScale === "number" && values.fontScale !== 1 ? values.fontScale : typeof values.textScale === "number" && values.textScale !== 1 ? values.textScale : void 0;
|
|
622
|
+
const fontSizeScale = typeof values.fontSize === "number" && values.fontSize !== 100 ? values.fontSize / 100 : void 0;
|
|
623
|
+
const font = fontScaleValue ?? fontSizeScale ?? 1;
|
|
624
|
+
const rawLineHeight = typeof values.lineHeight === "number" ? values.lineHeight : 100;
|
|
625
|
+
const lineRatio = rawLineHeight <= 2.5 ? rawLineHeight : rawLineHeight / 100;
|
|
626
|
+
const fontActive = font !== 1;
|
|
627
|
+
const lineActive = lineRatio !== 1;
|
|
628
|
+
if (fontActive || lineActive) {
|
|
629
|
+
const measurements = elements.filter(
|
|
630
|
+
(el) => !isProtectedFromTextScale(el) || !isProtectedFromTextSpacing(el)
|
|
631
|
+
).map((el) => {
|
|
632
|
+
const computed = getComputedStyle(el);
|
|
633
|
+
return {
|
|
634
|
+
el,
|
|
635
|
+
protectScale: isProtectedFromTextScale(el),
|
|
636
|
+
protectSpacing: isProtectedFromTextSpacing(el),
|
|
637
|
+
font: parseFloat(computed.fontSize) || 16,
|
|
638
|
+
line: parseFloat(computed.lineHeight) || (parseFloat(computed.fontSize) || 16) * 1.2
|
|
639
|
+
};
|
|
640
|
+
});
|
|
641
|
+
for (const measured of measurements) {
|
|
642
|
+
if (fontActive && !measured.protectScale) {
|
|
643
|
+
set(measured.el, "font-size", `${measured.font * font}px`);
|
|
644
|
+
}
|
|
645
|
+
if (measured.protectSpacing) {
|
|
646
|
+
if (fontActive && !measured.protectScale) {
|
|
647
|
+
set(measured.el, "line-height", `${measured.line * font}px`);
|
|
648
|
+
} else if (lineActive) {
|
|
649
|
+
const prev = measured.el.style.getPropertyValue("line-height");
|
|
650
|
+
if (!prev) {
|
|
651
|
+
set(measured.el, "line-height", `${measured.line}px`);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
} else {
|
|
655
|
+
if (lineActive || fontActive) {
|
|
656
|
+
set(
|
|
657
|
+
measured.el,
|
|
658
|
+
"line-height",
|
|
659
|
+
`${measured.line * lineRatio * font}px`
|
|
660
|
+
);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
411
664
|
}
|
|
412
665
|
const filter = composeFilter(values);
|
|
413
666
|
for (const el of Array.from(document.body.children)) {
|
|
@@ -425,9 +678,76 @@ function applyPage(values) {
|
|
|
425
678
|
const base = computed.filter;
|
|
426
679
|
set(el, "filter", `${base && base !== "none" ? base + " " : ""}${filter}`);
|
|
427
680
|
}
|
|
681
|
+
const letterSpacingVal = typeof values.letterSpacing === "number" && values.letterSpacing > 0 ? values.letterSpacing : 0;
|
|
682
|
+
const letterSpacingEmVal = typeof values.letterSpacingEm === "number" && values.letterSpacingEm > 0 ? values.letterSpacingEm : null;
|
|
683
|
+
if (letterSpacingVal > 0 || letterSpacingEmVal !== null) {
|
|
684
|
+
for (const el of elements) {
|
|
685
|
+
if (isProtectedFromTextSpacing(el)) {
|
|
686
|
+
if (el.matches(
|
|
687
|
+
"table, [role='table'], td, th, pre, code, kbd, samp, var, button, input, select, textarea, [data-arap-ui]"
|
|
688
|
+
)) {
|
|
689
|
+
const previous = el.style.getPropertyValue("letter-spacing");
|
|
690
|
+
if (!previous) {
|
|
691
|
+
set(el, "letter-spacing", "normal");
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
continue;
|
|
695
|
+
}
|
|
696
|
+
const scriptLimits = getScriptSpacingConstraints(el);
|
|
697
|
+
if (!scriptLimits.allowLetterSpacing) {
|
|
698
|
+
const previous = el.style.getPropertyValue("letter-spacing");
|
|
699
|
+
if (!previous) {
|
|
700
|
+
set(el, "letter-spacing", "normal");
|
|
701
|
+
}
|
|
702
|
+
continue;
|
|
703
|
+
}
|
|
704
|
+
let targetSpacing;
|
|
705
|
+
if (letterSpacingEmVal !== null) {
|
|
706
|
+
const clampedEm = scriptLimits.maxLetterSpacingPx === 1 ? Math.min(letterSpacingEmVal, 0.05) : letterSpacingEmVal;
|
|
707
|
+
targetSpacing = `${clampedEm}em`;
|
|
708
|
+
} else {
|
|
709
|
+
const clampedPx = Math.min(
|
|
710
|
+
letterSpacingVal,
|
|
711
|
+
scriptLimits.maxLetterSpacingPx
|
|
712
|
+
);
|
|
713
|
+
targetSpacing = `${clampedPx}px`;
|
|
714
|
+
}
|
|
715
|
+
set(el, "letter-spacing", targetSpacing);
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
const wordSpacingVal = typeof values.wordSpacing === "number" && values.wordSpacing > 0 ? values.wordSpacing : 0;
|
|
719
|
+
const wordSpacingEmVal = typeof values.wordSpacingEm === "number" && values.wordSpacingEm > 0 ? values.wordSpacingEm : null;
|
|
720
|
+
if (wordSpacingVal > 0 || wordSpacingEmVal !== null) {
|
|
721
|
+
for (const el of elements) {
|
|
722
|
+
if (isProtectedFromTextSpacing(el)) {
|
|
723
|
+
if (el.matches(
|
|
724
|
+
"table, [role='table'], td, th, pre, code, kbd, samp, var, button, input, select, textarea, [data-arap-ui]"
|
|
725
|
+
)) {
|
|
726
|
+
const previous = el.style.getPropertyValue("word-spacing");
|
|
727
|
+
if (!previous) {
|
|
728
|
+
set(el, "word-spacing", "normal");
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
continue;
|
|
732
|
+
}
|
|
733
|
+
const targetSpacing = wordSpacingEmVal !== null ? `${wordSpacingEmVal}em` : `${wordSpacingVal}px`;
|
|
734
|
+
set(el, "word-spacing", targetSpacing);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
const paragraphSpacingVal = typeof values.paragraphSpacing === "number" && values.paragraphSpacing > 0 ? values.paragraphSpacing : 0;
|
|
738
|
+
const paragraphSpacingEmVal = typeof values.paragraphSpacingEm === "number" && values.paragraphSpacingEm > 0 ? values.paragraphSpacingEm : null;
|
|
739
|
+
if (paragraphSpacingVal > 0 || paragraphSpacingEmVal !== null) {
|
|
740
|
+
for (const el of elements) {
|
|
741
|
+
if (isProtectedFromTextSpacing(el)) continue;
|
|
742
|
+
if (el.matches("p, [role='paragraph']")) {
|
|
743
|
+
const computed = getComputedStyle(el);
|
|
744
|
+
const baseMargin = parseFloat(computed.marginBottom) || 0;
|
|
745
|
+
const targetMargin = paragraphSpacingEmVal !== null ? `${paragraphSpacingEmVal}em` : `${baseMargin + paragraphSpacingVal}px`;
|
|
746
|
+
set(el, "margin-bottom", targetMargin);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
428
750
|
for (const el of elements) {
|
|
429
|
-
if (Number(values.letterSpacing) > 0)
|
|
430
|
-
set(el, "letter-spacing", `${values.letterSpacing}px`);
|
|
431
751
|
if (values.textAlign && values.textAlign !== "default")
|
|
432
752
|
set(el, "text-align", String(values.textAlign));
|
|
433
753
|
if (values.bigCursor) set(el, "cursor", cursor);
|
|
@@ -748,6 +1068,9 @@ var enLocale = Object.freeze({
|
|
|
748
1068
|
resetAll: "Reset All",
|
|
749
1069
|
statementLink: "Accessibility Statement",
|
|
750
1070
|
openInNewTab: "opens in a new tab",
|
|
1071
|
+
creditsPrefix: "Designed and developed by",
|
|
1072
|
+
creditsName: "Praboth",
|
|
1073
|
+
documentationLink: "Official documentation",
|
|
751
1074
|
buttonTitle: "Accessibility",
|
|
752
1075
|
dragHelp: "Drag to move, or use Alt and arrow keys. The Move button menu offers click and keyboard controls.",
|
|
753
1076
|
positionLabel: "Button position",
|
|
@@ -1221,7 +1544,45 @@ function Panel({
|
|
|
1221
1544
|
] })
|
|
1222
1545
|
]
|
|
1223
1546
|
}
|
|
1224
|
-
) })
|
|
1547
|
+
) }),
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "arap-credits", children: [
|
|
1549
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
|
|
1550
|
+
strings.creditsPrefix ?? "Designed and developed by",
|
|
1551
|
+
" ",
|
|
1552
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1553
|
+
"a",
|
|
1554
|
+
{
|
|
1555
|
+
href: "https://www.praboth.com",
|
|
1556
|
+
target: "_blank",
|
|
1557
|
+
rel: "noopener noreferrer",
|
|
1558
|
+
children: [
|
|
1559
|
+
strings.creditsName ?? "Praboth",
|
|
1560
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "arap-sr-only", children: [
|
|
1561
|
+
" (",
|
|
1562
|
+
strings.openInNewTab,
|
|
1563
|
+
")"
|
|
1564
|
+
] })
|
|
1565
|
+
]
|
|
1566
|
+
}
|
|
1567
|
+
)
|
|
1568
|
+
] }),
|
|
1569
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1570
|
+
"a",
|
|
1571
|
+
{
|
|
1572
|
+
href: "https://www.praboth.com/accessibility-plugin-react",
|
|
1573
|
+
target: "_blank",
|
|
1574
|
+
rel: "noopener noreferrer",
|
|
1575
|
+
children: [
|
|
1576
|
+
strings.documentationLink ?? "Official documentation",
|
|
1577
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "arap-sr-only", children: [
|
|
1578
|
+
" (",
|
|
1579
|
+
strings.openInNewTab,
|
|
1580
|
+
")"
|
|
1581
|
+
] })
|
|
1582
|
+
]
|
|
1583
|
+
}
|
|
1584
|
+
)
|
|
1585
|
+
] })
|
|
1225
1586
|
]
|
|
1226
1587
|
}
|
|
1227
1588
|
);
|
|
@@ -1577,6 +1938,8 @@ var drawings = {
|
|
|
1577
1938
|
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" }) }),
|
|
1578
1939
|
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" }) }),
|
|
1579
1940
|
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" }) }),
|
|
1941
|
+
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" }) }),
|
|
1942
|
+
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" }) }),
|
|
1580
1943
|
contrast: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1581
1944
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
1582
1945
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 3a9 9 0 0 1 0 18Z", fill: "currentColor", stroke: "none" })
|
|
@@ -1642,11 +2005,44 @@ var DEFAULT_VALUE = 100;
|
|
|
1642
2005
|
var MIN = 50;
|
|
1643
2006
|
var MAX = 200;
|
|
1644
2007
|
var STEP = 10;
|
|
1645
|
-
|
|
2008
|
+
var DEFAULT_STEP_SCALE = [100, 112.5, 125, 150, 200];
|
|
2009
|
+
function FontSizeController({
|
|
2010
|
+
steps: customSteps,
|
|
2011
|
+
stepScale
|
|
2012
|
+
} = {}) {
|
|
1646
2013
|
const { value, setValue } = useAccessibility(
|
|
1647
2014
|
FEATURE_KEY,
|
|
1648
2015
|
DEFAULT_VALUE
|
|
1649
2016
|
);
|
|
2017
|
+
const steps = customSteps ? customSteps.map((s) => s <= 2.5 ? Math.round(s * 1e3) / 10 : s) : stepScale ? DEFAULT_STEP_SCALE : null;
|
|
2018
|
+
const handleDecrease = () => {
|
|
2019
|
+
if (steps && steps.length > 0) {
|
|
2020
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2021
|
+
if (idx > 0) {
|
|
2022
|
+
setValue(steps[idx - 1]);
|
|
2023
|
+
} else if (idx === -1) {
|
|
2024
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2025
|
+
setValue(lower ?? steps[0]);
|
|
2026
|
+
}
|
|
2027
|
+
} else {
|
|
2028
|
+
setValue(Math.max(MIN, value - STEP));
|
|
2029
|
+
}
|
|
2030
|
+
};
|
|
2031
|
+
const handleIncrease = () => {
|
|
2032
|
+
if (steps && steps.length > 0) {
|
|
2033
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2034
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2035
|
+
setValue(steps[idx + 1]);
|
|
2036
|
+
} else if (idx === -1) {
|
|
2037
|
+
const higher = steps.find((s) => s > value);
|
|
2038
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2039
|
+
}
|
|
2040
|
+
} else {
|
|
2041
|
+
setValue(Math.min(MAX, value + STEP));
|
|
2042
|
+
}
|
|
2043
|
+
};
|
|
2044
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= MIN;
|
|
2045
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= MAX;
|
|
1650
2046
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1651
2047
|
"div",
|
|
1652
2048
|
{
|
|
@@ -1663,23 +2059,23 @@ function FontSizeController() {
|
|
|
1663
2059
|
"button",
|
|
1664
2060
|
{
|
|
1665
2061
|
className: "arap-btn-sm",
|
|
1666
|
-
onClick:
|
|
1667
|
-
disabled:
|
|
2062
|
+
onClick: handleDecrease,
|
|
2063
|
+
disabled: isMin,
|
|
1668
2064
|
"aria-label": "Decrease font size",
|
|
1669
2065
|
type: "button",
|
|
1670
2066
|
children: "\u2212"
|
|
1671
2067
|
}
|
|
1672
2068
|
),
|
|
1673
2069
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1674
|
-
value,
|
|
2070
|
+
Math.round(value),
|
|
1675
2071
|
"%"
|
|
1676
2072
|
] }),
|
|
1677
2073
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1678
2074
|
"button",
|
|
1679
2075
|
{
|
|
1680
2076
|
className: "arap-btn-sm",
|
|
1681
|
-
onClick:
|
|
1682
|
-
disabled:
|
|
2077
|
+
onClick: handleIncrease,
|
|
2078
|
+
disabled: isMax,
|
|
1683
2079
|
"aria-label": "Increase font size",
|
|
1684
2080
|
type: "button",
|
|
1685
2081
|
children: "+"
|
|
@@ -1691,52 +2087,72 @@ function FontSizeController() {
|
|
|
1691
2087
|
);
|
|
1692
2088
|
}
|
|
1693
2089
|
|
|
1694
|
-
// src/features/
|
|
2090
|
+
// src/features/TextScaleController.tsx
|
|
1695
2091
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1696
|
-
var FEATURE_KEY2 = "
|
|
1697
|
-
var DEFAULT_VALUE2 =
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
2092
|
+
var FEATURE_KEY2 = "fontScale";
|
|
2093
|
+
var DEFAULT_VALUE2 = 1;
|
|
2094
|
+
function TextScaleController({
|
|
2095
|
+
steps = TEXT_SCALE_STEPS,
|
|
2096
|
+
label = "Bigger Text"
|
|
2097
|
+
} = {}) {
|
|
1702
2098
|
const { value, setValue } = useAccessibility(
|
|
1703
2099
|
FEATURE_KEY2,
|
|
1704
2100
|
DEFAULT_VALUE2
|
|
1705
2101
|
);
|
|
2102
|
+
const currentIndex = steps.findIndex((s) => Math.abs(s - value) < 0.01);
|
|
2103
|
+
const isMin = currentIndex === 0 || value <= steps[0];
|
|
2104
|
+
const isMax = currentIndex === steps.length - 1 || value >= steps[steps.length - 1];
|
|
2105
|
+
const handleDecrease = () => {
|
|
2106
|
+
if (currentIndex > 0) {
|
|
2107
|
+
setValue(steps[currentIndex - 1]);
|
|
2108
|
+
} else if (currentIndex === -1) {
|
|
2109
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2110
|
+
setValue(lower ?? steps[0]);
|
|
2111
|
+
}
|
|
2112
|
+
};
|
|
2113
|
+
const handleIncrease = () => {
|
|
2114
|
+
if (currentIndex !== -1 && currentIndex < steps.length - 1) {
|
|
2115
|
+
setValue(steps[currentIndex + 1]);
|
|
2116
|
+
} else if (currentIndex === -1) {
|
|
2117
|
+
const higher = steps.find((s) => s > value);
|
|
2118
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2119
|
+
}
|
|
2120
|
+
};
|
|
2121
|
+
const percentage = Math.round(value * 100);
|
|
1706
2122
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1707
2123
|
"div",
|
|
1708
2124
|
{
|
|
1709
2125
|
className: "arap-feature arap-feature-stepper",
|
|
1710
2126
|
role: "group",
|
|
1711
|
-
"aria-label":
|
|
2127
|
+
"aria-label": label,
|
|
1712
2128
|
children: [
|
|
1713
2129
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "arap-label", children: [
|
|
1714
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FeatureIcon, { name:
|
|
1715
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children:
|
|
2130
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FeatureIcon, { name: "fontSize" }),
|
|
2131
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: label })
|
|
1716
2132
|
] }),
|
|
1717
2133
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "arap-controls", children: [
|
|
1718
2134
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1719
2135
|
"button",
|
|
1720
2136
|
{
|
|
1721
2137
|
className: "arap-btn-sm",
|
|
1722
|
-
onClick:
|
|
1723
|
-
disabled:
|
|
1724
|
-
"aria-label": "Decrease
|
|
2138
|
+
onClick: handleDecrease,
|
|
2139
|
+
disabled: isMin,
|
|
2140
|
+
"aria-label": "Decrease text size",
|
|
1725
2141
|
type: "button",
|
|
1726
2142
|
children: "\u2212"
|
|
1727
2143
|
}
|
|
1728
2144
|
),
|
|
1729
2145
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1730
|
-
|
|
2146
|
+
percentage,
|
|
1731
2147
|
"%"
|
|
1732
2148
|
] }),
|
|
1733
2149
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1734
2150
|
"button",
|
|
1735
2151
|
{
|
|
1736
2152
|
className: "arap-btn-sm",
|
|
1737
|
-
onClick:
|
|
1738
|
-
disabled:
|
|
1739
|
-
"aria-label": "Increase
|
|
2153
|
+
onClick: handleIncrease,
|
|
2154
|
+
disabled: isMax,
|
|
2155
|
+
"aria-label": "Increase text size",
|
|
1740
2156
|
type: "button",
|
|
1741
2157
|
children: "+"
|
|
1742
2158
|
}
|
|
@@ -1747,51 +2163,173 @@ function LineHeightController() {
|
|
|
1747
2163
|
);
|
|
1748
2164
|
}
|
|
1749
2165
|
|
|
1750
|
-
// src/features/
|
|
2166
|
+
// src/features/LineHeightController.tsx
|
|
1751
2167
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1752
|
-
var FEATURE_KEY3 = "
|
|
1753
|
-
var DEFAULT_VALUE3 =
|
|
1754
|
-
var
|
|
1755
|
-
var
|
|
1756
|
-
var
|
|
1757
|
-
function
|
|
2168
|
+
var FEATURE_KEY3 = "lineHeight";
|
|
2169
|
+
var DEFAULT_VALUE3 = 100;
|
|
2170
|
+
var MIN2 = 50;
|
|
2171
|
+
var MAX2 = 200;
|
|
2172
|
+
var STEP2 = 10;
|
|
2173
|
+
function LineHeightController({
|
|
2174
|
+
steps: customSteps,
|
|
2175
|
+
stepPresets
|
|
2176
|
+
} = {}) {
|
|
1758
2177
|
const { value, setValue } = useAccessibility(
|
|
1759
2178
|
FEATURE_KEY3,
|
|
1760
2179
|
DEFAULT_VALUE3
|
|
1761
2180
|
);
|
|
2181
|
+
const normalizedValue = typeof value === "number" && value <= 2.5 ? Math.round(value * 100) : value ?? DEFAULT_VALUE3;
|
|
2182
|
+
const steps = customSteps ? customSteps.map((s) => s <= 2.5 ? Math.round(s * 100) : s) : stepPresets ? LINE_HEIGHT_STEPS : null;
|
|
2183
|
+
const handleDecrease = () => {
|
|
2184
|
+
if (steps && steps.length > 0) {
|
|
2185
|
+
const idx = steps.findIndex((s) => Math.abs(s - normalizedValue) < 0.1);
|
|
2186
|
+
if (idx > 0) {
|
|
2187
|
+
setValue(steps[idx - 1]);
|
|
2188
|
+
} else if (idx === -1) {
|
|
2189
|
+
const lower = [...steps].reverse().find((s) => s < normalizedValue);
|
|
2190
|
+
setValue(lower ?? steps[0]);
|
|
2191
|
+
}
|
|
2192
|
+
} else {
|
|
2193
|
+
setValue(Math.max(MIN2, normalizedValue - STEP2));
|
|
2194
|
+
}
|
|
2195
|
+
};
|
|
2196
|
+
const handleIncrease = () => {
|
|
2197
|
+
if (steps && steps.length > 0) {
|
|
2198
|
+
const idx = steps.findIndex((s) => Math.abs(s - normalizedValue) < 0.1);
|
|
2199
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2200
|
+
setValue(steps[idx + 1]);
|
|
2201
|
+
} else if (idx === -1) {
|
|
2202
|
+
const higher = steps.find((s) => s > normalizedValue);
|
|
2203
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2204
|
+
}
|
|
2205
|
+
} else {
|
|
2206
|
+
setValue(Math.min(MAX2, normalizedValue + STEP2));
|
|
2207
|
+
}
|
|
2208
|
+
};
|
|
2209
|
+
const isMin = steps && steps.length > 0 ? normalizedValue <= steps[0] : normalizedValue <= MIN2;
|
|
2210
|
+
const isMax = steps && steps.length > 0 ? normalizedValue >= steps[steps.length - 1] : normalizedValue >= MAX2;
|
|
1762
2211
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1763
2212
|
"div",
|
|
1764
2213
|
{
|
|
1765
2214
|
className: "arap-feature arap-feature-stepper",
|
|
1766
2215
|
role: "group",
|
|
1767
|
-
"aria-label": "
|
|
2216
|
+
"aria-label": "Line Height",
|
|
1768
2217
|
children: [
|
|
1769
2218
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "arap-label", children: [
|
|
1770
2219
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FeatureIcon, { name: FEATURE_KEY3 }),
|
|
1771
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "
|
|
2220
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Line Height" })
|
|
1772
2221
|
] }),
|
|
1773
2222
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "arap-controls", children: [
|
|
1774
2223
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1775
2224
|
"button",
|
|
1776
2225
|
{
|
|
1777
2226
|
className: "arap-btn-sm",
|
|
1778
|
-
onClick:
|
|
1779
|
-
disabled:
|
|
1780
|
-
"aria-label": "Decrease
|
|
2227
|
+
onClick: handleDecrease,
|
|
2228
|
+
disabled: isMin,
|
|
2229
|
+
"aria-label": "Decrease line height",
|
|
1781
2230
|
type: "button",
|
|
1782
2231
|
children: "\u2212"
|
|
1783
2232
|
}
|
|
1784
2233
|
),
|
|
1785
2234
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2235
|
+
Math.round(normalizedValue),
|
|
2236
|
+
"%"
|
|
2237
|
+
] }),
|
|
2238
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2239
|
+
"button",
|
|
2240
|
+
{
|
|
2241
|
+
className: "arap-btn-sm",
|
|
2242
|
+
onClick: handleIncrease,
|
|
2243
|
+
disabled: isMax,
|
|
2244
|
+
"aria-label": "Increase line height",
|
|
2245
|
+
type: "button",
|
|
2246
|
+
children: "+"
|
|
2247
|
+
}
|
|
2248
|
+
)
|
|
2249
|
+
] })
|
|
2250
|
+
]
|
|
2251
|
+
}
|
|
2252
|
+
);
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
// src/features/LetterSpacingController.tsx
|
|
2256
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2257
|
+
var FEATURE_KEY4 = "letterSpacing";
|
|
2258
|
+
var DEFAULT_VALUE4 = 0;
|
|
2259
|
+
var MIN3 = 0;
|
|
2260
|
+
var MAX3 = 10;
|
|
2261
|
+
var STEP3 = 1;
|
|
2262
|
+
function LetterSpacingController({
|
|
2263
|
+
min = MIN3,
|
|
2264
|
+
max = MAX3,
|
|
2265
|
+
step = STEP3,
|
|
2266
|
+
steps
|
|
2267
|
+
} = {}) {
|
|
2268
|
+
const { value, setValue } = useAccessibility(
|
|
2269
|
+
FEATURE_KEY4,
|
|
2270
|
+
DEFAULT_VALUE4
|
|
2271
|
+
);
|
|
2272
|
+
const handleDecrease = () => {
|
|
2273
|
+
if (steps && steps.length > 0) {
|
|
2274
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2275
|
+
if (idx > 0) {
|
|
2276
|
+
setValue(steps[idx - 1]);
|
|
2277
|
+
} else if (idx === -1) {
|
|
2278
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2279
|
+
setValue(lower ?? steps[0]);
|
|
2280
|
+
}
|
|
2281
|
+
} else {
|
|
2282
|
+
setValue(Math.max(min, value - step));
|
|
2283
|
+
}
|
|
2284
|
+
};
|
|
2285
|
+
const handleIncrease = () => {
|
|
2286
|
+
if (steps && steps.length > 0) {
|
|
2287
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2288
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2289
|
+
setValue(steps[idx + 1]);
|
|
2290
|
+
} else if (idx === -1) {
|
|
2291
|
+
const higher = steps.find((s) => s > value);
|
|
2292
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2293
|
+
}
|
|
2294
|
+
} else {
|
|
2295
|
+
setValue(Math.min(max, value + step));
|
|
2296
|
+
}
|
|
2297
|
+
};
|
|
2298
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2299
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2301
|
+
"div",
|
|
2302
|
+
{
|
|
2303
|
+
className: "arap-feature arap-feature-stepper",
|
|
2304
|
+
role: "group",
|
|
2305
|
+
"aria-label": "Letter Spacing",
|
|
2306
|
+
children: [
|
|
2307
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "arap-label", children: [
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FeatureIcon, { name: FEATURE_KEY4 }),
|
|
2309
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Letter Spacing" })
|
|
2310
|
+
] }),
|
|
2311
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "arap-controls", children: [
|
|
2312
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2313
|
+
"button",
|
|
2314
|
+
{
|
|
2315
|
+
className: "arap-btn-sm",
|
|
2316
|
+
onClick: handleDecrease,
|
|
2317
|
+
disabled: isMin,
|
|
2318
|
+
"aria-label": "Decrease letter spacing",
|
|
2319
|
+
type: "button",
|
|
2320
|
+
children: "\u2212"
|
|
2321
|
+
}
|
|
2322
|
+
),
|
|
2323
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
1786
2324
|
value,
|
|
1787
2325
|
"px"
|
|
1788
2326
|
] }),
|
|
1789
|
-
/* @__PURE__ */ (0,
|
|
2327
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1790
2328
|
"button",
|
|
1791
2329
|
{
|
|
1792
2330
|
className: "arap-btn-sm",
|
|
1793
|
-
onClick:
|
|
1794
|
-
disabled:
|
|
2331
|
+
onClick: handleIncrease,
|
|
2332
|
+
disabled: isMax,
|
|
1795
2333
|
"aria-label": "Increase letter spacing",
|
|
1796
2334
|
type: "button",
|
|
1797
2335
|
children: "+"
|
|
@@ -1803,10 +2341,188 @@ function LetterSpacingController() {
|
|
|
1803
2341
|
);
|
|
1804
2342
|
}
|
|
1805
2343
|
|
|
2344
|
+
// src/features/WordSpacingController.tsx
|
|
2345
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2346
|
+
var FEATURE_KEY5 = "wordSpacing";
|
|
2347
|
+
var DEFAULT_VALUE5 = 0;
|
|
2348
|
+
var MIN4 = 0;
|
|
2349
|
+
var MAX4 = 10;
|
|
2350
|
+
var STEP4 = 1;
|
|
2351
|
+
function WordSpacingController({
|
|
2352
|
+
min = MIN4,
|
|
2353
|
+
max = MAX4,
|
|
2354
|
+
step = STEP4,
|
|
2355
|
+
steps
|
|
2356
|
+
} = {}) {
|
|
2357
|
+
const { value, setValue } = useAccessibility(
|
|
2358
|
+
FEATURE_KEY5,
|
|
2359
|
+
DEFAULT_VALUE5
|
|
2360
|
+
);
|
|
2361
|
+
const handleDecrease = () => {
|
|
2362
|
+
if (steps && steps.length > 0) {
|
|
2363
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2364
|
+
if (idx > 0) {
|
|
2365
|
+
setValue(steps[idx - 1]);
|
|
2366
|
+
} else if (idx === -1) {
|
|
2367
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2368
|
+
setValue(lower ?? steps[0]);
|
|
2369
|
+
}
|
|
2370
|
+
} else {
|
|
2371
|
+
setValue(Math.max(min, value - step));
|
|
2372
|
+
}
|
|
2373
|
+
};
|
|
2374
|
+
const handleIncrease = () => {
|
|
2375
|
+
if (steps && steps.length > 0) {
|
|
2376
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2377
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2378
|
+
setValue(steps[idx + 1]);
|
|
2379
|
+
} else if (idx === -1) {
|
|
2380
|
+
const higher = steps.find((s) => s > value);
|
|
2381
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2382
|
+
}
|
|
2383
|
+
} else {
|
|
2384
|
+
setValue(Math.min(max, value + step));
|
|
2385
|
+
}
|
|
2386
|
+
};
|
|
2387
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2388
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2390
|
+
"div",
|
|
2391
|
+
{
|
|
2392
|
+
className: "arap-feature arap-feature-stepper",
|
|
2393
|
+
role: "group",
|
|
2394
|
+
"aria-label": "Word Spacing",
|
|
2395
|
+
children: [
|
|
2396
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "arap-label", children: [
|
|
2397
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FeatureIcon, { name: FEATURE_KEY5 }),
|
|
2398
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "Word Spacing" })
|
|
2399
|
+
] }),
|
|
2400
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "arap-controls", children: [
|
|
2401
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2402
|
+
"button",
|
|
2403
|
+
{
|
|
2404
|
+
className: "arap-btn-sm",
|
|
2405
|
+
onClick: handleDecrease,
|
|
2406
|
+
disabled: isMin,
|
|
2407
|
+
"aria-label": "Decrease word spacing",
|
|
2408
|
+
type: "button",
|
|
2409
|
+
children: "\u2212"
|
|
2410
|
+
}
|
|
2411
|
+
),
|
|
2412
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2413
|
+
value,
|
|
2414
|
+
"px"
|
|
2415
|
+
] }),
|
|
2416
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2417
|
+
"button",
|
|
2418
|
+
{
|
|
2419
|
+
className: "arap-btn-sm",
|
|
2420
|
+
onClick: handleIncrease,
|
|
2421
|
+
disabled: isMax,
|
|
2422
|
+
"aria-label": "Increase word spacing",
|
|
2423
|
+
type: "button",
|
|
2424
|
+
children: "+"
|
|
2425
|
+
}
|
|
2426
|
+
)
|
|
2427
|
+
] })
|
|
2428
|
+
]
|
|
2429
|
+
}
|
|
2430
|
+
);
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
// src/features/ParagraphSpacingController.tsx
|
|
2434
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2435
|
+
var FEATURE_KEY6 = "paragraphSpacing";
|
|
2436
|
+
var DEFAULT_VALUE6 = 0;
|
|
2437
|
+
var MIN5 = 0;
|
|
2438
|
+
var MAX5 = 32;
|
|
2439
|
+
var STEP5 = 4;
|
|
2440
|
+
function ParagraphSpacingController({
|
|
2441
|
+
min = MIN5,
|
|
2442
|
+
max = MAX5,
|
|
2443
|
+
step = STEP5,
|
|
2444
|
+
steps
|
|
2445
|
+
} = {}) {
|
|
2446
|
+
const { value, setValue } = useAccessibility(
|
|
2447
|
+
FEATURE_KEY6,
|
|
2448
|
+
DEFAULT_VALUE6
|
|
2449
|
+
);
|
|
2450
|
+
const handleDecrease = () => {
|
|
2451
|
+
if (steps && steps.length > 0) {
|
|
2452
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2453
|
+
if (idx > 0) {
|
|
2454
|
+
setValue(steps[idx - 1]);
|
|
2455
|
+
} else if (idx === -1) {
|
|
2456
|
+
const lower = [...steps].reverse().find((s) => s < value);
|
|
2457
|
+
setValue(lower ?? steps[0]);
|
|
2458
|
+
}
|
|
2459
|
+
} else {
|
|
2460
|
+
setValue(Math.max(min, value - step));
|
|
2461
|
+
}
|
|
2462
|
+
};
|
|
2463
|
+
const handleIncrease = () => {
|
|
2464
|
+
if (steps && steps.length > 0) {
|
|
2465
|
+
const idx = steps.findIndex((s) => Math.abs(s - value) < 0.1);
|
|
2466
|
+
if (idx !== -1 && idx < steps.length - 1) {
|
|
2467
|
+
setValue(steps[idx + 1]);
|
|
2468
|
+
} else if (idx === -1) {
|
|
2469
|
+
const higher = steps.find((s) => s > value);
|
|
2470
|
+
setValue(higher ?? steps[steps.length - 1]);
|
|
2471
|
+
}
|
|
2472
|
+
} else {
|
|
2473
|
+
setValue(Math.min(max, value + step));
|
|
2474
|
+
}
|
|
2475
|
+
};
|
|
2476
|
+
const isMin = steps && steps.length > 0 ? value <= steps[0] : value <= min;
|
|
2477
|
+
const isMax = steps && steps.length > 0 ? value >= steps[steps.length - 1] : value >= max;
|
|
2478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2479
|
+
"div",
|
|
2480
|
+
{
|
|
2481
|
+
className: "arap-feature arap-feature-stepper",
|
|
2482
|
+
role: "group",
|
|
2483
|
+
"aria-label": "Paragraph Spacing",
|
|
2484
|
+
children: [
|
|
2485
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "arap-label", children: [
|
|
2486
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FeatureIcon, { name: FEATURE_KEY6 }),
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Paragraph Spacing" })
|
|
2488
|
+
] }),
|
|
2489
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "arap-controls", children: [
|
|
2490
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2491
|
+
"button",
|
|
2492
|
+
{
|
|
2493
|
+
className: "arap-btn-sm",
|
|
2494
|
+
onClick: handleDecrease,
|
|
2495
|
+
disabled: isMin,
|
|
2496
|
+
"aria-label": "Decrease paragraph spacing",
|
|
2497
|
+
type: "button",
|
|
2498
|
+
children: "\u2212"
|
|
2499
|
+
}
|
|
2500
|
+
),
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("output", { className: "arap-value", "aria-live": "polite", children: [
|
|
2502
|
+
value,
|
|
2503
|
+
"px"
|
|
2504
|
+
] }),
|
|
2505
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2506
|
+
"button",
|
|
2507
|
+
{
|
|
2508
|
+
className: "arap-btn-sm",
|
|
2509
|
+
onClick: handleIncrease,
|
|
2510
|
+
disabled: isMax,
|
|
2511
|
+
"aria-label": "Increase paragraph spacing",
|
|
2512
|
+
type: "button",
|
|
2513
|
+
children: "+"
|
|
2514
|
+
}
|
|
2515
|
+
)
|
|
2516
|
+
] })
|
|
2517
|
+
]
|
|
2518
|
+
}
|
|
2519
|
+
);
|
|
2520
|
+
}
|
|
2521
|
+
|
|
1806
2522
|
// src/features/ContrastController.tsx
|
|
1807
|
-
var
|
|
1808
|
-
var
|
|
1809
|
-
var
|
|
2523
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2524
|
+
var FEATURE_KEY7 = "contrast";
|
|
2525
|
+
var DEFAULT_VALUE7 = 0;
|
|
1810
2526
|
var LEVELS = [
|
|
1811
2527
|
{ label: "Off", value: 0 },
|
|
1812
2528
|
{ label: "Reduced", value: "reduced" },
|
|
@@ -1819,15 +2535,15 @@ var LEVELS = [
|
|
|
1819
2535
|
];
|
|
1820
2536
|
function ContrastController() {
|
|
1821
2537
|
const { value, setValue } = useAccessibility(
|
|
1822
|
-
|
|
1823
|
-
|
|
2538
|
+
FEATURE_KEY7,
|
|
2539
|
+
DEFAULT_VALUE7
|
|
1824
2540
|
);
|
|
1825
|
-
return /* @__PURE__ */ (0,
|
|
1826
|
-
/* @__PURE__ */ (0,
|
|
1827
|
-
/* @__PURE__ */ (0,
|
|
1828
|
-
/* @__PURE__ */ (0,
|
|
2541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Contrast", children: [
|
|
2542
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "arap-label", children: [
|
|
2543
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FeatureIcon, { name: FEATURE_KEY7 }),
|
|
2544
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Contrast" })
|
|
1829
2545
|
] }),
|
|
1830
|
-
/* @__PURE__ */ (0,
|
|
2546
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "arap-segmented", children: LEVELS.map((level) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1831
2547
|
"button",
|
|
1832
2548
|
{
|
|
1833
2549
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -1835,7 +2551,7 @@ function ContrastController() {
|
|
|
1835
2551
|
"aria-pressed": value === level.value,
|
|
1836
2552
|
type: "button",
|
|
1837
2553
|
children: [
|
|
1838
|
-
value === level.value && /* @__PURE__ */ (0,
|
|
2554
|
+
value === level.value && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1839
2555
|
level.label
|
|
1840
2556
|
]
|
|
1841
2557
|
},
|
|
@@ -1845,9 +2561,9 @@ function ContrastController() {
|
|
|
1845
2561
|
}
|
|
1846
2562
|
|
|
1847
2563
|
// src/features/SaturationController.tsx
|
|
1848
|
-
var
|
|
1849
|
-
var
|
|
1850
|
-
var
|
|
2564
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2565
|
+
var FEATURE_KEY8 = "saturation";
|
|
2566
|
+
var DEFAULT_VALUE8 = 0;
|
|
1851
2567
|
var LEVELS2 = [
|
|
1852
2568
|
{ label: "Off", value: 0 },
|
|
1853
2569
|
{ label: "Low", value: 1 },
|
|
@@ -1855,15 +2571,15 @@ var LEVELS2 = [
|
|
|
1855
2571
|
];
|
|
1856
2572
|
function SaturationController() {
|
|
1857
2573
|
const { value, setValue } = useAccessibility(
|
|
1858
|
-
|
|
1859
|
-
|
|
2574
|
+
FEATURE_KEY8,
|
|
2575
|
+
DEFAULT_VALUE8
|
|
1860
2576
|
);
|
|
1861
|
-
return /* @__PURE__ */ (0,
|
|
1862
|
-
/* @__PURE__ */ (0,
|
|
1863
|
-
/* @__PURE__ */ (0,
|
|
1864
|
-
/* @__PURE__ */ (0,
|
|
2577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Saturation", children: [
|
|
2578
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "arap-label", children: [
|
|
2579
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FeatureIcon, { name: FEATURE_KEY8 }),
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Saturation" })
|
|
1865
2581
|
] }),
|
|
1866
|
-
/* @__PURE__ */ (0,
|
|
2582
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "arap-segmented", children: LEVELS2.map((level) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1867
2583
|
"button",
|
|
1868
2584
|
{
|
|
1869
2585
|
className: `arap-segment ${value === level.value ? "arap-segment-active" : ""}`,
|
|
@@ -1871,7 +2587,7 @@ function SaturationController() {
|
|
|
1871
2587
|
"aria-pressed": value === level.value,
|
|
1872
2588
|
type: "button",
|
|
1873
2589
|
children: [
|
|
1874
|
-
value === level.value && /* @__PURE__ */ (0,
|
|
2590
|
+
value === level.value && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1875
2591
|
level.label
|
|
1876
2592
|
]
|
|
1877
2593
|
},
|
|
@@ -1881,20 +2597,20 @@ function SaturationController() {
|
|
|
1881
2597
|
}
|
|
1882
2598
|
|
|
1883
2599
|
// src/features/InvertColorsController.tsx
|
|
1884
|
-
var
|
|
1885
|
-
var
|
|
1886
|
-
var
|
|
2600
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2601
|
+
var FEATURE_KEY9 = "invertColors";
|
|
2602
|
+
var DEFAULT_VALUE9 = false;
|
|
1887
2603
|
function InvertColorsController() {
|
|
1888
2604
|
const { value, setValue } = useAccessibility(
|
|
1889
|
-
|
|
1890
|
-
|
|
2605
|
+
FEATURE_KEY9,
|
|
2606
|
+
DEFAULT_VALUE9
|
|
1891
2607
|
);
|
|
1892
|
-
return /* @__PURE__ */ (0,
|
|
1893
|
-
/* @__PURE__ */ (0,
|
|
1894
|
-
/* @__PURE__ */ (0,
|
|
1895
|
-
/* @__PURE__ */ (0,
|
|
2608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Invert Colors", children: [
|
|
2609
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "arap-label", children: [
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FeatureIcon, { name: FEATURE_KEY9 }),
|
|
2611
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Invert Colors" })
|
|
1896
2612
|
] }),
|
|
1897
|
-
/* @__PURE__ */ (0,
|
|
2613
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1898
2614
|
"button",
|
|
1899
2615
|
{
|
|
1900
2616
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -1902,27 +2618,27 @@ function InvertColorsController() {
|
|
|
1902
2618
|
"aria-label": "Invert Colors",
|
|
1903
2619
|
"aria-pressed": value,
|
|
1904
2620
|
type: "button",
|
|
1905
|
-
children: /* @__PURE__ */ (0,
|
|
2621
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
1906
2622
|
}
|
|
1907
2623
|
)
|
|
1908
2624
|
] });
|
|
1909
2625
|
}
|
|
1910
2626
|
|
|
1911
2627
|
// src/features/GrayscaleController.tsx
|
|
1912
|
-
var
|
|
1913
|
-
var
|
|
1914
|
-
var
|
|
2628
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2629
|
+
var FEATURE_KEY10 = "grayscale";
|
|
2630
|
+
var DEFAULT_VALUE10 = false;
|
|
1915
2631
|
function GrayscaleController() {
|
|
1916
2632
|
const { value, setValue } = useAccessibility(
|
|
1917
|
-
|
|
1918
|
-
|
|
2633
|
+
FEATURE_KEY10,
|
|
2634
|
+
DEFAULT_VALUE10
|
|
1919
2635
|
);
|
|
1920
|
-
return /* @__PURE__ */ (0,
|
|
1921
|
-
/* @__PURE__ */ (0,
|
|
1922
|
-
/* @__PURE__ */ (0,
|
|
1923
|
-
/* @__PURE__ */ (0,
|
|
2636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Grayscale", children: [
|
|
2637
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "arap-label", children: [
|
|
2638
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FeatureIcon, { name: FEATURE_KEY10 }),
|
|
2639
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Grayscale" })
|
|
1924
2640
|
] }),
|
|
1925
|
-
/* @__PURE__ */ (0,
|
|
2641
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1926
2642
|
"button",
|
|
1927
2643
|
{
|
|
1928
2644
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -1930,27 +2646,27 @@ function GrayscaleController() {
|
|
|
1930
2646
|
"aria-label": "Grayscale",
|
|
1931
2647
|
"aria-pressed": value,
|
|
1932
2648
|
type: "button",
|
|
1933
|
-
children: /* @__PURE__ */ (0,
|
|
2649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
1934
2650
|
}
|
|
1935
2651
|
)
|
|
1936
2652
|
] });
|
|
1937
2653
|
}
|
|
1938
2654
|
|
|
1939
2655
|
// src/features/LinkHighlightController.tsx
|
|
1940
|
-
var
|
|
1941
|
-
var
|
|
1942
|
-
var
|
|
2656
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2657
|
+
var FEATURE_KEY11 = "linkHighlight";
|
|
2658
|
+
var DEFAULT_VALUE11 = false;
|
|
1943
2659
|
function LinkHighlightController() {
|
|
1944
2660
|
const { value, setValue } = useAccessibility(
|
|
1945
|
-
|
|
1946
|
-
|
|
2661
|
+
FEATURE_KEY11,
|
|
2662
|
+
DEFAULT_VALUE11
|
|
1947
2663
|
);
|
|
1948
|
-
return /* @__PURE__ */ (0,
|
|
1949
|
-
/* @__PURE__ */ (0,
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
1951
|
-
/* @__PURE__ */ (0,
|
|
2664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Link Highlight", children: [
|
|
2665
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "arap-label", children: [
|
|
2666
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FeatureIcon, { name: FEATURE_KEY11 }),
|
|
2667
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Link Highlight" })
|
|
1952
2668
|
] }),
|
|
1953
|
-
/* @__PURE__ */ (0,
|
|
2669
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1954
2670
|
"button",
|
|
1955
2671
|
{
|
|
1956
2672
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -1958,10 +2674,10 @@ function LinkHighlightController() {
|
|
|
1958
2674
|
"aria-label": "Link Highlight",
|
|
1959
2675
|
"aria-pressed": !!value,
|
|
1960
2676
|
type: "button",
|
|
1961
|
-
children: /* @__PURE__ */ (0,
|
|
2677
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
1962
2678
|
}
|
|
1963
2679
|
),
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
2680
|
+
/* @__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)(
|
|
1965
2681
|
"button",
|
|
1966
2682
|
{
|
|
1967
2683
|
type: "button",
|
|
@@ -1969,7 +2685,7 @@ function LinkHighlightController() {
|
|
|
1969
2685
|
"aria-pressed": value === mode,
|
|
1970
2686
|
onClick: () => setValue(mode),
|
|
1971
2687
|
children: [
|
|
1972
|
-
value === mode && /* @__PURE__ */ (0,
|
|
2688
|
+
value === mode && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
1973
2689
|
mode.split("-").join(" ")
|
|
1974
2690
|
]
|
|
1975
2691
|
},
|
|
@@ -1979,21 +2695,21 @@ function LinkHighlightController() {
|
|
|
1979
2695
|
}
|
|
1980
2696
|
|
|
1981
2697
|
// src/features/TextAlignController.tsx
|
|
1982
|
-
var
|
|
1983
|
-
var
|
|
1984
|
-
var
|
|
2698
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2699
|
+
var FEATURE_KEY12 = "textAlign";
|
|
2700
|
+
var DEFAULT_VALUE12 = "default";
|
|
1985
2701
|
var OPTIONS = ["default", "left", "center", "right", "justify"];
|
|
1986
2702
|
function TextAlignController() {
|
|
1987
2703
|
const { value, setValue } = useAccessibility(
|
|
1988
|
-
|
|
1989
|
-
|
|
2704
|
+
FEATURE_KEY12,
|
|
2705
|
+
DEFAULT_VALUE12
|
|
1990
2706
|
);
|
|
1991
|
-
return /* @__PURE__ */ (0,
|
|
1992
|
-
/* @__PURE__ */ (0,
|
|
1993
|
-
/* @__PURE__ */ (0,
|
|
1994
|
-
/* @__PURE__ */ (0,
|
|
2707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Text Alignment", children: [
|
|
2708
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "arap-label", children: [
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FeatureIcon, { name: FEATURE_KEY12 }),
|
|
2710
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Text Alignment" })
|
|
1995
2711
|
] }),
|
|
1996
|
-
/* @__PURE__ */ (0,
|
|
2712
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "arap-segmented", children: OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1997
2713
|
"button",
|
|
1998
2714
|
{
|
|
1999
2715
|
className: `arap-segment ${value === option ? "arap-segment-active" : ""}`,
|
|
@@ -2002,7 +2718,7 @@ function TextAlignController() {
|
|
|
2002
2718
|
type: "button",
|
|
2003
2719
|
style: { textTransform: "capitalize" },
|
|
2004
2720
|
children: [
|
|
2005
|
-
value === option && /* @__PURE__ */ (0,
|
|
2721
|
+
value === option && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2006
2722
|
option
|
|
2007
2723
|
]
|
|
2008
2724
|
},
|
|
@@ -2012,20 +2728,20 @@ function TextAlignController() {
|
|
|
2012
2728
|
}
|
|
2013
2729
|
|
|
2014
2730
|
// src/features/HideImagesController.tsx
|
|
2015
|
-
var
|
|
2016
|
-
var
|
|
2017
|
-
var
|
|
2731
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2732
|
+
var FEATURE_KEY13 = "hideImages";
|
|
2733
|
+
var DEFAULT_VALUE13 = false;
|
|
2018
2734
|
function HideImagesController() {
|
|
2019
2735
|
const { value, setValue } = useAccessibility(
|
|
2020
|
-
|
|
2021
|
-
|
|
2736
|
+
FEATURE_KEY13,
|
|
2737
|
+
DEFAULT_VALUE13
|
|
2022
2738
|
);
|
|
2023
|
-
return /* @__PURE__ */ (0,
|
|
2024
|
-
/* @__PURE__ */ (0,
|
|
2025
|
-
/* @__PURE__ */ (0,
|
|
2026
|
-
/* @__PURE__ */ (0,
|
|
2739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
2740
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "arap-label", children: [
|
|
2741
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FeatureIcon, { name: FEATURE_KEY13 }),
|
|
2742
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Hide Images" })
|
|
2027
2743
|
] }),
|
|
2028
|
-
/* @__PURE__ */ (0,
|
|
2744
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2029
2745
|
"button",
|
|
2030
2746
|
{
|
|
2031
2747
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2033,27 +2749,27 @@ function HideImagesController() {
|
|
|
2033
2749
|
"aria-label": "Hide Images",
|
|
2034
2750
|
"aria-pressed": value,
|
|
2035
2751
|
type: "button",
|
|
2036
|
-
children: /* @__PURE__ */ (0,
|
|
2752
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2037
2753
|
}
|
|
2038
2754
|
)
|
|
2039
2755
|
] });
|
|
2040
2756
|
}
|
|
2041
2757
|
|
|
2042
2758
|
// src/features/HideVideosController.tsx
|
|
2043
|
-
var
|
|
2044
|
-
var
|
|
2045
|
-
var
|
|
2759
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2760
|
+
var FEATURE_KEY14 = "hideVideos";
|
|
2761
|
+
var DEFAULT_VALUE14 = false;
|
|
2046
2762
|
function HideVideosController() {
|
|
2047
2763
|
const { value, setValue } = useAccessibility(
|
|
2048
|
-
|
|
2049
|
-
|
|
2764
|
+
FEATURE_KEY14,
|
|
2765
|
+
DEFAULT_VALUE14
|
|
2050
2766
|
);
|
|
2051
|
-
return /* @__PURE__ */ (0,
|
|
2052
|
-
/* @__PURE__ */ (0,
|
|
2053
|
-
/* @__PURE__ */ (0,
|
|
2054
|
-
/* @__PURE__ */ (0,
|
|
2767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
|
|
2768
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "arap-label", children: [
|
|
2769
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
2770
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Hide Videos" })
|
|
2055
2771
|
] }),
|
|
2056
|
-
/* @__PURE__ */ (0,
|
|
2772
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2057
2773
|
"button",
|
|
2058
2774
|
{
|
|
2059
2775
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2061,27 +2777,27 @@ function HideVideosController() {
|
|
|
2061
2777
|
"aria-label": "Hide Videos",
|
|
2062
2778
|
"aria-pressed": value,
|
|
2063
2779
|
type: "button",
|
|
2064
|
-
children: /* @__PURE__ */ (0,
|
|
2780
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2065
2781
|
}
|
|
2066
2782
|
)
|
|
2067
2783
|
] });
|
|
2068
2784
|
}
|
|
2069
2785
|
|
|
2070
2786
|
// src/features/BigCursorController.tsx
|
|
2071
|
-
var
|
|
2072
|
-
var
|
|
2073
|
-
var
|
|
2787
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2788
|
+
var FEATURE_KEY15 = "bigCursor";
|
|
2789
|
+
var DEFAULT_VALUE15 = false;
|
|
2074
2790
|
function BigCursorController() {
|
|
2075
2791
|
const { value, setValue } = useAccessibility(
|
|
2076
|
-
|
|
2077
|
-
|
|
2792
|
+
FEATURE_KEY15,
|
|
2793
|
+
DEFAULT_VALUE15
|
|
2078
2794
|
);
|
|
2079
|
-
return /* @__PURE__ */ (0,
|
|
2080
|
-
/* @__PURE__ */ (0,
|
|
2081
|
-
/* @__PURE__ */ (0,
|
|
2082
|
-
/* @__PURE__ */ (0,
|
|
2795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
2796
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "arap-label", children: [
|
|
2797
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
2798
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Big Cursor" })
|
|
2083
2799
|
] }),
|
|
2084
|
-
/* @__PURE__ */ (0,
|
|
2800
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2085
2801
|
"button",
|
|
2086
2802
|
{
|
|
2087
2803
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2089,27 +2805,27 @@ function BigCursorController() {
|
|
|
2089
2805
|
"aria-label": "Big Cursor",
|
|
2090
2806
|
"aria-pressed": value,
|
|
2091
2807
|
type: "button",
|
|
2092
|
-
children: /* @__PURE__ */ (0,
|
|
2808
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2093
2809
|
}
|
|
2094
2810
|
)
|
|
2095
2811
|
] });
|
|
2096
2812
|
}
|
|
2097
2813
|
|
|
2098
2814
|
// src/features/ReadingMaskController.tsx
|
|
2099
|
-
var
|
|
2100
|
-
var
|
|
2101
|
-
var
|
|
2815
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2816
|
+
var FEATURE_KEY16 = "readingMask";
|
|
2817
|
+
var DEFAULT_VALUE16 = false;
|
|
2102
2818
|
function ReadingMaskController() {
|
|
2103
2819
|
const { value, setValue } = useAccessibility(
|
|
2104
|
-
|
|
2105
|
-
|
|
2820
|
+
FEATURE_KEY16,
|
|
2821
|
+
DEFAULT_VALUE16
|
|
2106
2822
|
);
|
|
2107
|
-
return /* @__PURE__ */ (0,
|
|
2108
|
-
/* @__PURE__ */ (0,
|
|
2109
|
-
/* @__PURE__ */ (0,
|
|
2110
|
-
/* @__PURE__ */ (0,
|
|
2823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
|
|
2824
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "arap-label", children: [
|
|
2825
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FeatureIcon, { name: FEATURE_KEY16 }),
|
|
2826
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "Reading Mask" })
|
|
2111
2827
|
] }),
|
|
2112
|
-
/* @__PURE__ */ (0,
|
|
2828
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2113
2829
|
"button",
|
|
2114
2830
|
{
|
|
2115
2831
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2117,27 +2833,27 @@ function ReadingMaskController() {
|
|
|
2117
2833
|
"aria-label": "Reading Mask",
|
|
2118
2834
|
"aria-pressed": value,
|
|
2119
2835
|
type: "button",
|
|
2120
|
-
children: /* @__PURE__ */ (0,
|
|
2836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2121
2837
|
}
|
|
2122
2838
|
)
|
|
2123
2839
|
] });
|
|
2124
2840
|
}
|
|
2125
2841
|
|
|
2126
2842
|
// src/features/ReadingGuideController.tsx
|
|
2127
|
-
var
|
|
2128
|
-
var
|
|
2129
|
-
var
|
|
2843
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2844
|
+
var FEATURE_KEY17 = "readingGuide";
|
|
2845
|
+
var DEFAULT_VALUE17 = false;
|
|
2130
2846
|
function ReadingGuideController() {
|
|
2131
2847
|
const { value, setValue } = useAccessibility(
|
|
2132
|
-
|
|
2133
|
-
|
|
2848
|
+
FEATURE_KEY17,
|
|
2849
|
+
DEFAULT_VALUE17
|
|
2134
2850
|
);
|
|
2135
|
-
return /* @__PURE__ */ (0,
|
|
2136
|
-
/* @__PURE__ */ (0,
|
|
2137
|
-
/* @__PURE__ */ (0,
|
|
2138
|
-
/* @__PURE__ */ (0,
|
|
2851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
|
|
2852
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "arap-label", children: [
|
|
2853
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
2854
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "Reading Guide" })
|
|
2139
2855
|
] }),
|
|
2140
|
-
/* @__PURE__ */ (0,
|
|
2856
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2141
2857
|
"button",
|
|
2142
2858
|
{
|
|
2143
2859
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
@@ -2145,7 +2861,7 @@ function ReadingGuideController() {
|
|
|
2145
2861
|
"aria-label": "Reading Guide",
|
|
2146
2862
|
"aria-pressed": value,
|
|
2147
2863
|
type: "button",
|
|
2148
|
-
children: /* @__PURE__ */ (0,
|
|
2864
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
2149
2865
|
}
|
|
2150
2866
|
)
|
|
2151
2867
|
] });
|
|
@@ -2154,7 +2870,7 @@ function ReadingGuideController() {
|
|
|
2154
2870
|
// src/features/ResetController.tsx
|
|
2155
2871
|
var import_react_dom2 = require("react-dom");
|
|
2156
2872
|
var import_react11 = require("react");
|
|
2157
|
-
var
|
|
2873
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2158
2874
|
function ResetController() {
|
|
2159
2875
|
const ctx = (0, import_react11.useContext)(AccessibilityContext);
|
|
2160
2876
|
if (!ctx) {
|
|
@@ -2165,15 +2881,15 @@ function ResetController() {
|
|
|
2165
2881
|
const actionHost = (0, import_react11.useContext)(PanelActionsContext);
|
|
2166
2882
|
const { resetAll } = ctx;
|
|
2167
2883
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
2168
|
-
const button = /* @__PURE__ */ (0,
|
|
2169
|
-
/* @__PURE__ */ (0,
|
|
2884
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
2885
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeatureIcon, { name: "reset" }),
|
|
2170
2886
|
strings.resetAll
|
|
2171
2887
|
] }) });
|
|
2172
2888
|
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
2173
2889
|
}
|
|
2174
2890
|
|
|
2175
2891
|
// src/core/controls/ToggleControl.tsx
|
|
2176
|
-
var
|
|
2892
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2177
2893
|
function ToggleControl({
|
|
2178
2894
|
id,
|
|
2179
2895
|
label,
|
|
@@ -2195,12 +2911,12 @@ function ToggleControl({
|
|
|
2195
2911
|
onChange(!checked);
|
|
2196
2912
|
}
|
|
2197
2913
|
};
|
|
2198
|
-
return /* @__PURE__ */ (0,
|
|
2914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2199
2915
|
"div",
|
|
2200
2916
|
{
|
|
2201
2917
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2202
2918
|
style,
|
|
2203
|
-
children: /* @__PURE__ */ (0,
|
|
2919
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2204
2920
|
"button",
|
|
2205
2921
|
{
|
|
2206
2922
|
id,
|
|
@@ -2214,7 +2930,7 @@ function ToggleControl({
|
|
|
2214
2930
|
disabled: !isInteractive,
|
|
2215
2931
|
onClick: handleClick,
|
|
2216
2932
|
title: unavailableReason || description || toggleLabel,
|
|
2217
|
-
children: /* @__PURE__ */ (0,
|
|
2933
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2218
2934
|
"span",
|
|
2219
2935
|
{
|
|
2220
2936
|
className: "arap-toggle-knob",
|
|
@@ -2231,7 +2947,7 @@ function ToggleControl({
|
|
|
2231
2947
|
|
|
2232
2948
|
// src/core/controls/ChoiceControl.tsx
|
|
2233
2949
|
var import_react12 = require("react");
|
|
2234
|
-
var
|
|
2950
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2235
2951
|
function ChoiceControl({
|
|
2236
2952
|
id,
|
|
2237
2953
|
label,
|
|
@@ -2287,7 +3003,7 @@ function ChoiceControl({
|
|
|
2287
3003
|
const renderOptionButton = (opt) => {
|
|
2288
3004
|
const isSelected = value === opt.value;
|
|
2289
3005
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
2290
|
-
return /* @__PURE__ */ (0,
|
|
3006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2291
3007
|
"button",
|
|
2292
3008
|
{
|
|
2293
3009
|
type: "button",
|
|
@@ -2301,15 +3017,15 @@ function ChoiceControl({
|
|
|
2301
3017
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
2302
3018
|
title: opt.description,
|
|
2303
3019
|
children: [
|
|
2304
|
-
isSelected && /* @__PURE__ */ (0,
|
|
2305
|
-
/* @__PURE__ */ (0,
|
|
2306
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
3020
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3021
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: opt.label }),
|
|
3022
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
2307
3023
|
]
|
|
2308
3024
|
},
|
|
2309
3025
|
String(opt.value)
|
|
2310
3026
|
);
|
|
2311
3027
|
};
|
|
2312
|
-
return /* @__PURE__ */ (0,
|
|
3028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2313
3029
|
"div",
|
|
2314
3030
|
{
|
|
2315
3031
|
ref: containerRef,
|
|
@@ -2320,15 +3036,15 @@ function ChoiceControl({
|
|
|
2320
3036
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2321
3037
|
style,
|
|
2322
3038
|
onKeyDown: handleKeyDown,
|
|
2323
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
3039
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2324
3040
|
"div",
|
|
2325
3041
|
{
|
|
2326
3042
|
className: "arap-choice-group",
|
|
2327
3043
|
role: "group",
|
|
2328
3044
|
"aria-label": group.label,
|
|
2329
3045
|
children: [
|
|
2330
|
-
/* @__PURE__ */ (0,
|
|
2331
|
-
/* @__PURE__ */ (0,
|
|
3046
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
3047
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
2332
3048
|
]
|
|
2333
3049
|
},
|
|
2334
3050
|
group.label
|
|
@@ -2338,7 +3054,7 @@ function ChoiceControl({
|
|
|
2338
3054
|
}
|
|
2339
3055
|
|
|
2340
3056
|
// src/core/controls/StepperControl.tsx
|
|
2341
|
-
var
|
|
3057
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2342
3058
|
function StepperControl({
|
|
2343
3059
|
id,
|
|
2344
3060
|
label,
|
|
@@ -2368,15 +3084,15 @@ function StepperControl({
|
|
|
2368
3084
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
2369
3085
|
}
|
|
2370
3086
|
};
|
|
2371
|
-
return /* @__PURE__ */ (0,
|
|
3087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2372
3088
|
"div",
|
|
2373
3089
|
{
|
|
2374
3090
|
id,
|
|
2375
3091
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2376
3092
|
style,
|
|
2377
3093
|
children: [
|
|
2378
|
-
/* @__PURE__ */ (0,
|
|
2379
|
-
/* @__PURE__ */ (0,
|
|
3094
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "arap-controls", children: [
|
|
3095
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2380
3096
|
"button",
|
|
2381
3097
|
{
|
|
2382
3098
|
type: "button",
|
|
@@ -2387,8 +3103,8 @@ function StepperControl({
|
|
|
2387
3103
|
children: "\u2212"
|
|
2388
3104
|
}
|
|
2389
3105
|
),
|
|
2390
|
-
/* @__PURE__ */ (0,
|
|
2391
|
-
/* @__PURE__ */ (0,
|
|
3106
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
3107
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2392
3108
|
"button",
|
|
2393
3109
|
{
|
|
2394
3110
|
type: "button",
|
|
@@ -2400,7 +3116,7 @@ function StepperControl({
|
|
|
2400
3116
|
}
|
|
2401
3117
|
)
|
|
2402
3118
|
] }),
|
|
2403
|
-
showSlider && /* @__PURE__ */ (0,
|
|
3119
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2404
3120
|
"input",
|
|
2405
3121
|
{
|
|
2406
3122
|
type: "range",
|
|
@@ -2424,7 +3140,7 @@ function StepperControl({
|
|
|
2424
3140
|
}
|
|
2425
3141
|
|
|
2426
3142
|
// src/core/controls/FeatureCard.tsx
|
|
2427
|
-
var
|
|
3143
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2428
3144
|
function FeatureCard({
|
|
2429
3145
|
id,
|
|
2430
3146
|
featureKey,
|
|
@@ -2443,7 +3159,7 @@ function FeatureCard({
|
|
|
2443
3159
|
largeControls = false
|
|
2444
3160
|
}) {
|
|
2445
3161
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
2446
|
-
return /* @__PURE__ */ (0,
|
|
3162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2447
3163
|
"div",
|
|
2448
3164
|
{
|
|
2449
3165
|
id,
|
|
@@ -2452,27 +3168,27 @@ function FeatureCard({
|
|
|
2452
3168
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2453
3169
|
style,
|
|
2454
3170
|
children: [
|
|
2455
|
-
/* @__PURE__ */ (0,
|
|
2456
|
-
/* @__PURE__ */ (0,
|
|
2457
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
2458
|
-
/* @__PURE__ */ (0,
|
|
3171
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-card-header", children: [
|
|
3172
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "arap-label", children: [
|
|
3173
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
3174
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-card-title", children: title })
|
|
2459
3175
|
] }),
|
|
2460
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
3176
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
2461
3177
|
] }),
|
|
2462
|
-
description && /* @__PURE__ */ (0,
|
|
2463
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
2464
|
-
/* @__PURE__ */ (0,
|
|
2465
|
-
/* @__PURE__ */ (0,
|
|
3178
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
3179
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
3180
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3181
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: errorMessage })
|
|
2466
3182
|
] }),
|
|
2467
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
3183
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
3184
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
3185
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: unavailableMessage })
|
|
2470
3186
|
] }),
|
|
2471
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
2472
|
-
/* @__PURE__ */ (0,
|
|
2473
|
-
/* @__PURE__ */ (0,
|
|
2474
|
-
/* @__PURE__ */ (0,
|
|
2475
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
3187
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
3188
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
3189
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-permission-content", children: [
|
|
3190
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: permissionMessage }),
|
|
3191
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2476
3192
|
"button",
|
|
2477
3193
|
{
|
|
2478
3194
|
type: "button",
|
|
@@ -2483,14 +3199,14 @@ function FeatureCard({
|
|
|
2483
3199
|
)
|
|
2484
3200
|
] })
|
|
2485
3201
|
] }),
|
|
2486
|
-
/* @__PURE__ */ (0,
|
|
3202
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "arap-card-content", children })
|
|
2487
3203
|
]
|
|
2488
3204
|
}
|
|
2489
3205
|
);
|
|
2490
3206
|
}
|
|
2491
3207
|
|
|
2492
3208
|
// src/core/controls/FeatureStatusState.tsx
|
|
2493
|
-
var
|
|
3209
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2494
3210
|
function SearchCount({
|
|
2495
3211
|
totalCount,
|
|
2496
3212
|
matchedCount,
|
|
@@ -2499,7 +3215,7 @@ function SearchCount({
|
|
|
2499
3215
|
style
|
|
2500
3216
|
}) {
|
|
2501
3217
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
2502
|
-
return /* @__PURE__ */ (0,
|
|
3218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2503
3219
|
"div",
|
|
2504
3220
|
{
|
|
2505
3221
|
role: "status",
|
|
@@ -2519,17 +3235,17 @@ function EmptyState({
|
|
|
2519
3235
|
className = "",
|
|
2520
3236
|
style
|
|
2521
3237
|
}) {
|
|
2522
|
-
return /* @__PURE__ */ (0,
|
|
3238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2523
3239
|
"div",
|
|
2524
3240
|
{
|
|
2525
3241
|
role: "status",
|
|
2526
3242
|
className: `arap-empty-state ${className}`,
|
|
2527
3243
|
style,
|
|
2528
3244
|
children: [
|
|
2529
|
-
/* @__PURE__ */ (0,
|
|
2530
|
-
/* @__PURE__ */ (0,
|
|
2531
|
-
/* @__PURE__ */ (0,
|
|
2532
|
-
onAction && /* @__PURE__ */ (0,
|
|
3245
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
3246
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h3", { className: "arap-empty-title", children: title }),
|
|
3247
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "arap-empty-desc", children: description }),
|
|
3248
|
+
onAction && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
2533
3249
|
]
|
|
2534
3250
|
}
|
|
2535
3251
|
);
|
|
@@ -2542,18 +3258,18 @@ function ErrorState({
|
|
|
2542
3258
|
className = "",
|
|
2543
3259
|
style
|
|
2544
3260
|
}) {
|
|
2545
|
-
return /* @__PURE__ */ (0,
|
|
3261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2546
3262
|
"div",
|
|
2547
3263
|
{
|
|
2548
3264
|
role: "alert",
|
|
2549
3265
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
2550
3266
|
style,
|
|
2551
3267
|
children: [
|
|
2552
|
-
/* @__PURE__ */ (0,
|
|
2553
|
-
/* @__PURE__ */ (0,
|
|
2554
|
-
title && /* @__PURE__ */ (0,
|
|
2555
|
-
/* @__PURE__ */ (0,
|
|
2556
|
-
onRetry && /* @__PURE__ */ (0,
|
|
3268
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3269
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-error-content", children: [
|
|
3270
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
3271
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "arap-error-message", children: message }),
|
|
3272
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
2557
3273
|
] })
|
|
2558
3274
|
]
|
|
2559
3275
|
}
|
|
@@ -2561,7 +3277,7 @@ function ErrorState({
|
|
|
2561
3277
|
}
|
|
2562
3278
|
|
|
2563
3279
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
2564
|
-
var
|
|
3280
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2565
3281
|
function ProfilePreviewCard({
|
|
2566
3282
|
profile,
|
|
2567
3283
|
isActive,
|
|
@@ -2611,7 +3327,7 @@ function ProfilePreviewCard({
|
|
|
2611
3327
|
if (val === null || val === void 0) return "Original";
|
|
2612
3328
|
return String(val);
|
|
2613
3329
|
};
|
|
2614
|
-
return /* @__PURE__ */ (0,
|
|
3330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2615
3331
|
"div",
|
|
2616
3332
|
{
|
|
2617
3333
|
role: "group",
|
|
@@ -2619,10 +3335,10 @@ function ProfilePreviewCard({
|
|
|
2619
3335
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2620
3336
|
style,
|
|
2621
3337
|
children: [
|
|
2622
|
-
/* @__PURE__ */ (0,
|
|
2623
|
-
/* @__PURE__ */ (0,
|
|
2624
|
-
/* @__PURE__ */ (0,
|
|
2625
|
-
isActive && /* @__PURE__ */ (0,
|
|
3338
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-profile-header", children: [
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
3341
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2626
3342
|
"span",
|
|
2627
3343
|
{
|
|
2628
3344
|
className: "arap-profile-active-badge",
|
|
@@ -2631,14 +3347,14 @@ function ProfilePreviewCard({
|
|
|
2631
3347
|
}
|
|
2632
3348
|
)
|
|
2633
3349
|
] }),
|
|
2634
|
-
/* @__PURE__ */ (0,
|
|
3350
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
2635
3351
|
] }),
|
|
2636
|
-
/* @__PURE__ */ (0,
|
|
2637
|
-
/* @__PURE__ */ (0,
|
|
2638
|
-
/* @__PURE__ */ (0,
|
|
3352
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
3353
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
3354
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
2639
3355
|
const val = profile.settings[key];
|
|
2640
|
-
return /* @__PURE__ */ (0,
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
3356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
3357
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("strong", { children: [
|
|
2642
3358
|
formatKeyName(key),
|
|
2643
3359
|
":"
|
|
2644
3360
|
] }),
|
|
@@ -2647,7 +3363,7 @@ function ProfilePreviewCard({
|
|
|
2647
3363
|
] }, key);
|
|
2648
3364
|
}) })
|
|
2649
3365
|
] }),
|
|
2650
|
-
/* @__PURE__ */ (0,
|
|
3366
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2651
3367
|
"button",
|
|
2652
3368
|
{
|
|
2653
3369
|
type: "button",
|
|
@@ -2656,7 +3372,7 @@ function ProfilePreviewCard({
|
|
|
2656
3372
|
"aria-label": `Revert ${profile.label} profile`,
|
|
2657
3373
|
children: "Revert to custom settings"
|
|
2658
3374
|
}
|
|
2659
|
-
) : /* @__PURE__ */ (0,
|
|
3375
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2660
3376
|
"button",
|
|
2661
3377
|
{
|
|
2662
3378
|
type: "button",
|
|
@@ -2688,10 +3404,13 @@ function ProfilePreviewCard({
|
|
|
2688
3404
|
HideImagesController,
|
|
2689
3405
|
HideVideosController,
|
|
2690
3406
|
InvertColorsController,
|
|
3407
|
+
LINE_HEIGHT_RATIOS,
|
|
3408
|
+
LINE_HEIGHT_STEPS,
|
|
2691
3409
|
LetterSpacingController,
|
|
2692
3410
|
LineHeightController,
|
|
2693
3411
|
LinkHighlightController,
|
|
2694
3412
|
PROFILE_DEFINITIONS,
|
|
3413
|
+
ParagraphSpacingController,
|
|
2695
3414
|
ProfilePreviewCard,
|
|
2696
3415
|
ReadingGuideController,
|
|
2697
3416
|
ReadingMaskController,
|
|
@@ -2699,10 +3418,18 @@ function ProfilePreviewCard({
|
|
|
2699
3418
|
SaturationController,
|
|
2700
3419
|
SearchCount,
|
|
2701
3420
|
StepperControl,
|
|
3421
|
+
TEXT_SCALE_PROTECTED_SELECTOR,
|
|
3422
|
+
TEXT_SCALE_STEPS,
|
|
3423
|
+
TEXT_SPACING_EXCLUDED_SELECTOR,
|
|
2702
3424
|
TextAlignController,
|
|
3425
|
+
TextScaleController,
|
|
2703
3426
|
ToggleControl,
|
|
3427
|
+
WordSpacingController,
|
|
2704
3428
|
createInitialPreferencesState,
|
|
2705
3429
|
enLocale,
|
|
3430
|
+
getScriptSpacingConstraints,
|
|
3431
|
+
isProtectedFromTextScale,
|
|
3432
|
+
isProtectedFromTextSpacing,
|
|
2706
3433
|
isRtlLocale,
|
|
2707
3434
|
normalizePreferenceValue,
|
|
2708
3435
|
normalizePreferences,
|