accessibility-plugin-react 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index.d.mts +22 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +324 -115
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +316 -115
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +16 -0
- package/docs/API.md +3 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +1 -1
- package/docs/FEATURES.md +20 -20
- package/docs/FONTS.md +97 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,14 +30,19 @@ __export(index_exports, {
|
|
|
30
30
|
ChoiceControl: () => ChoiceControl,
|
|
31
31
|
ContrastController: () => ContrastController,
|
|
32
32
|
DEFAULT_PREFERENCES: () => DEFAULT_PREFERENCES,
|
|
33
|
+
DYSLEXIA_FONT_STACK: () => DYSLEXIA_FONT_STACK,
|
|
33
34
|
EmptyState: () => EmptyState,
|
|
34
35
|
ErrorState: () => ErrorState,
|
|
36
|
+
FONT_FAMILY_PRESETS: () => FONT_FAMILY_PRESETS,
|
|
37
|
+
FONT_FAMILY_PROTECTED_SELECTOR: () => FONT_FAMILY_PROTECTED_SELECTOR,
|
|
35
38
|
FeatureCard: () => FeatureCard,
|
|
39
|
+
FontFamilyController: () => FontFamilyController,
|
|
36
40
|
FontSizeController: () => FontSizeController,
|
|
37
41
|
GrayscaleController: () => GrayscaleController,
|
|
38
42
|
HideImagesController: () => HideImagesController,
|
|
39
43
|
HideVideosController: () => HideVideosController,
|
|
40
44
|
InvertColorsController: () => InvertColorsController,
|
|
45
|
+
LEGIBLE_FONT_STACK: () => LEGIBLE_FONT_STACK,
|
|
41
46
|
LINE_HEIGHT_RATIOS: () => LINE_HEIGHT_RATIOS,
|
|
42
47
|
LINE_HEIGHT_STEPS: () => LINE_HEIGHT_STEPS,
|
|
43
48
|
LetterSpacingController: () => LetterSpacingController,
|
|
@@ -52,6 +57,7 @@ __export(index_exports, {
|
|
|
52
57
|
SaturationController: () => SaturationController,
|
|
53
58
|
SearchCount: () => SearchCount,
|
|
54
59
|
StepperControl: () => StepperControl,
|
|
60
|
+
TEXT_ALIGN_BLOCK_SELECTOR: () => TEXT_ALIGN_BLOCK_SELECTOR,
|
|
55
61
|
TEXT_SCALE_PROTECTED_SELECTOR: () => TEXT_SCALE_PROTECTED_SELECTOR,
|
|
56
62
|
TEXT_SCALE_STEPS: () => TEXT_SCALE_STEPS,
|
|
57
63
|
TEXT_SPACING_EXCLUDED_SELECTOR: () => TEXT_SPACING_EXCLUDED_SELECTOR,
|
|
@@ -62,6 +68,8 @@ __export(index_exports, {
|
|
|
62
68
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
63
69
|
enLocale: () => enLocale,
|
|
64
70
|
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
71
|
+
isProtectedFromFontFamily: () => isProtectedFromFontFamily,
|
|
72
|
+
isProtectedFromTextAlign: () => isProtectedFromTextAlign,
|
|
65
73
|
isProtectedFromTextScale: () => isProtectedFromTextScale,
|
|
66
74
|
isProtectedFromTextSpacing: () => isProtectedFromTextSpacing,
|
|
67
75
|
isRtlLocale: () => isRtlLocale,
|
|
@@ -98,7 +106,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
98
106
|
}
|
|
99
107
|
|
|
100
108
|
// src/styles/tailwind.css
|
|
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');
|
|
109
|
+
styleInject('.arap-root {\n --arap-surface: #fff;\n --arap-text: #111827;\n --arap-muted: #475569;\n --arap-border: #cbd5e1;\n --arap-divider: #e2e8f0;\n --arap-accent: #1d4ed8;\n --arap-accent-hover: #1e40af;\n --arap-selected: #eff6ff;\n --arap-control: #f8fafc;\n color-scheme: light;\n font: 15px/1.5 system-ui, sans-serif;\n color: var(--arap-text);\n text-align: left;\n letter-spacing: normal;\n}\n.arap-root *,\n.arap-root *::before,\n.arap-root *::after {\n box-sizing: border-box;\n}\n.arap-root button {\n font: inherit;\n cursor: pointer;\n color: inherit;\n text-transform: none;\n letter-spacing: normal;\n transition: background-color 0.15s, border-color 0.15s;\n}\n.arap-root button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.arap-root button:focus-visible,\n.arap-panel:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 3px;\n}\n.arap-root .arap-btn {\n position: fixed;\n z-index: 2147483001;\n bottom: max(16px, env(safe-area-inset-bottom));\n right: max(16px, env(safe-area-inset-right));\n width: 56px;\n height: 56px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--arap-surface);\n border-radius: 50%;\n background: var(--arap-accent);\n color: #fff;\n box-shadow: 0 4px 12px #0f172a26, 0 10px 24px #0f172a14;\n}\n.arap-root .arap-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-root .arap-btn[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-position=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-panel {\n position: fixed;\n z-index: 2147483000;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n right: max(16px, env(safe-area-inset-right));\n width: min(400px, calc(100vw - 32px));\n max-height: calc(100vh - 120px);\n max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 20px;\n border: 1px solid var(--arap-divider);\n border-radius: 16px;\n background: var(--arap-surface);\n box-shadow: 0 8px 16px #0f172a0d, 0 20px 48px #0f172a1a;\n}\n.arap-root .arap-panel[hidden] {\n display: none !important;\n}\n.arap-root .arap-panel[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-panel[data-position=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-heading {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n padding-bottom: 18px;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-heading-copy {\n min-width: 0;\n}\n.arap-heading h2 {\n margin: 0;\n font: 700 22px/1.3 system-ui, sans-serif;\n letter-spacing: -0.025em;\n color: var(--arap-text);\n overflow-wrap: anywhere;\n}\n.arap-description {\n margin: 6px 0 0;\n color: var(--arap-muted);\n font: 14px/1.5 system-ui, sans-serif;\n overflow-wrap: anywhere;\n}\n.arap-heading button {\n flex: none;\n width: 44px;\n height: 44px;\n margin-top: -6px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--arap-muted);\n font-size: 28px;\n line-height: 1;\n}\n.arap-heading button:hover {\n background: var(--arap-control);\n border-color: var(--arap-border);\n}\n.arap-feature {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px 12px;\n padding: 18px 0;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-feature:last-child {\n border: 0;\n padding-bottom: 0;\n}\n.arap-label {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.arap-icon {\n flex: none;\n width: 22px;\n height: 22px;\n display: inline-block;\n vertical-align: middle;\n}\n.arap-controls {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--arap-border);\n border-radius: 9px;\n overflow: hidden;\n background: var(--arap-control);\n}\n.arap-root .arap-btn-sm {\n flex: none;\n width: 44px;\n height: 44px;\n border: 0;\n border-radius: 0;\n background: transparent;\n font-size: 22px;\n}\n.arap-root .arap-btn-sm:hover:not(:disabled) {\n background: var(--arap-selected);\n color: var(--arap-accent);\n}\n.arap-root .arap-controls button:focus-visible {\n outline-offset: -4px;\n}\n.arap-value {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 56px;\n padding: 0 6px;\n text-align: center;\n font-weight: 600;\n border-inline: 1px solid var(--arap-divider);\n background: var(--arap-surface);\n}\n.arap-segmented {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.arap-root .arap-segment {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-muted);\n overflow-wrap: anywhere;\n}\n.arap-root .arap-segment:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-root .arap-segment-active {\n background: var(--arap-accent);\n color: #fff;\n border-color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-segment-active:hover {\n background: var(--arap-accent-hover);\n color: #fff;\n}\n.arap-check {\n flex: none;\n font-size: 15px;\n line-height: 1;\n}\n.arap-root .arap-toggle {\n position: relative;\n width: 56px;\n height: 44px;\n padding: 0;\n border: 0;\n border-radius: 10px;\n background: transparent;\n}\n.arap-toggle::before {\n content: "";\n position: absolute;\n inset: 6px 0;\n border: 2px solid #64748b;\n border-radius: 20px;\n background: #e2e8f0;\n}\n.arap-toggle-knob {\n position: absolute;\n top: 10px;\n left: 4px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: #475569;\n pointer-events: none;\n transition: transform 0.15s;\n}\n.arap-toggle-active::before {\n background: var(--arap-accent);\n border-color: var(--arap-accent);\n}\n.arap-toggle-active .arap-toggle-knob {\n transform: translateX(24px);\n background: #fff;\n}\n.arap-toggle-active .arap-toggle-knob::after {\n content: "\\2713";\n display: block;\n color: var(--arap-accent);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n text-align: center;\n}\n.arap-root .arap-toggle:hover::before {\n border-color: var(--arap-accent);\n}\n.arap-feature-reset {\n display: block;\n}\n.arap-root .arap-reset-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 10px;\n border: 1px solid var(--arap-border);\n border-radius: 10px;\n background: var(--arap-control);\n color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-reset-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n@media (max-width: 380px) {\n .arap-root .arap-panel {\n padding: 16px;\n }\n .arap-heading h2 {\n font-size: 20px;\n }\n .arap-feature-stepper {\n grid-template-columns: minmax(0, 1fr);\n }\n .arap-controls {\n width: 100%;\n }\n .arap-value {\n flex: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-root *,\n .arap-root *::before,\n .arap-root *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .arap-root {\n --arap-surface: Canvas;\n --arap-text: CanvasText;\n --arap-muted: CanvasText;\n --arap-border: ButtonText;\n --arap-divider: ButtonText;\n --arap-accent: Highlight;\n --arap-control: Canvas;\n --arap-selected: Canvas;\n }\n .arap-root button[aria-pressed=true] {\n outline: 2px solid Highlight;\n outline-offset: -4px;\n }\n .arap-root .arap-segment-active {\n color: HighlightText;\n background: Highlight;\n }\n .arap-toggle::before {\n border-color: ButtonText;\n background: Canvas;\n }\n .arap-toggle-knob {\n background: ButtonText;\n }\n .arap-toggle-active .arap-toggle-knob {\n background: Highlight;\n }\n .arap-toggle-active .arap-toggle-knob::after {\n color: HighlightText;\n }\n}\n.arap-root .arap-panel {\n display: flex;\n flex-direction: column;\n overflow: visible;\n}\n.arap-heading {\n flex: none;\n}\n.arap-tools {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 0 3px;\n margin: 0 -3px;\n}\n.arap-tools:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: -3px;\n}\n.arap-quick-actions {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 14px;\n margin-top: 8px;\n border-top: 1px solid var(--arap-divider);\n}\n.arap-actions {\n flex: 1;\n min-width: 0;\n}\n.arap-actions:empty {\n display: none;\n}\n.arap-actions .arap-feature-reset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n.arap-root .arap-position-button,\n.arap-root .arap-position-default,\n.arap-root .arap-position-arrows button {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-accent);\n}\n.arap-root .arap-position-button:hover,\n.arap-root .arap-position-default:hover,\n.arap-root .arap-position-arrows button:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-position-popover {\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 0;\n width: 100%;\n max-height: calc(100dvh - 160px);\n overflow: auto;\n padding: 14px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n box-shadow: 0 8px 24px #0f172a26;\n}\n.arap-position-popover[hidden] {\n display: none !important;\n}\n.arap-position-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.arap-position-popover select {\n width: 100%;\n min-height: 44px;\n padding: 8px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n font: inherit;\n color: var(--arap-text);\n background: var(--arap-surface);\n}\n.arap-position-popover select:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-position-arrows {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 10px;\n}\n.arap-position-default {\n width: 100%;\n margin-top: 8px;\n}\n.arap-root .arap-btn[data-draggable=true] {\n touch-action: none;\n user-select: none;\n cursor: grab;\n}\n.arap-root .arap-btn[data-dragging=true] {\n cursor: grabbing;\n}\n.arap-root .arap-btn[data-corner$=left],\n.arap-root .arap-panel[data-corner$=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-corner$=right],\n.arap-root .arap-panel[data-corner$=right] {\n left: auto;\n right: max(16px, env(safe-area-inset-right));\n}\n.arap-root .arap-btn[data-corner^=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-btn[data-corner^=bottom] {\n top: auto;\n bottom: max(16px, env(safe-area-inset-bottom));\n}\n.arap-root .arap-panel[data-corner^=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-root .arap-panel[data-corner^=bottom] {\n top: auto;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n}\n.arap-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.arap-root .arap-skip-actions {\n position: absolute;\n top: 12px;\n left: 20px;\n width: 44px;\n height: 44px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n}\n.arap-root .arap-skip-actions:focus-visible {\n right: 20px;\n width: auto;\n height: auto;\n min-height: 44px;\n clip-path: none;\n pointer-events: auto;\n z-index: 2;\n padding: 8px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-accent);\n}\n@media (max-height: 480px) {\n .arap-root .arap-panel {\n top: max(16px, env(safe-area-inset-top)) !important;\n bottom: max(16px, env(safe-area-inset-bottom)) !important;\n max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;\n padding: 8px;\n }\n .arap-heading {\n padding-bottom: 8px;\n }\n .arap-heading h2 {\n font-size: 18px;\n }\n .arap-heading button {\n margin-top: 0;\n }\n .arap-description {\n display: none;\n }\n .arap-quick-actions {\n padding-top: 8px;\n margin-top: 0;\n }\n .arap-root .arap-reset-btn {\n min-height: 44px;\n }\n .arap-root .arap-btn[data-open=true] {\n visibility: hidden;\n }\n .arap-position-popover {\n max-height: calc(100dvh - 96px);\n }\n}\n.arap-statement {\n flex: none;\n padding-top: 10px;\n text-align: center;\n}\n.arap-statement-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 44px;\n padding: 6px 12px;\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 4px;\n font-size: 14px;\n font-weight: 500;\n border-radius: 8px;\n}\n.arap-statement-link:hover {\n color: var(--arap-accent-hover);\n background: var(--arap-selected);\n}\n.arap-statement-link:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-credits {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 2px;\n padding-top: 8px;\n color: var(--arap-muted);\n text-align: center;\n font-size: 11px;\n line-height: 1.4;\n}\n.arap-credits a {\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.arap-credits a:hover {\n color: var(--arap-accent-hover);\n}\n.arap-credits a:focus-visible {\n outline: 2px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-root .arap-btn[data-large-controls=true] {\n width: 64px;\n height: 64px;\n min-width: 48px;\n min-height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] {\n width: min(440px, calc(100vw - 32px));\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-heading button {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 32px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-btn-sm {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 24px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-value {\n min-width: 64px;\n font-size: 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-segment {\n min-width: 48px;\n min-height: 48px;\n padding: 10px 14px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle {\n width: 64px;\n height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle::before {\n inset: 8px 0;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-knob {\n top: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-active .arap-toggle-knob {\n transform: translateX(28px);\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-reset-btn {\n min-height: 52px;\n font-size: 16px;\n padding: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-button,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-default,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-arrows button {\n min-width: 48px;\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-popover select {\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-statement-link {\n min-height: 48px;\n font-size: 15px;\n padding: 10px 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-skip-actions {\n min-width: 48px;\n min-height: 48px;\n}\n.arap-feature-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n}\n.arap-card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-card-title {\n font-weight: 600;\n font-size: 15px;\n color: var(--arap-text);\n}\n.arap-card-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-status-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 11px;\n font-weight: 600;\n background: var(--arap-control);\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-card-alert {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 1.4;\n}\n.arap-alert-icon {\n flex: none;\n font-size: 16px;\n line-height: 1;\n}\n.arap-card-error {\n background: #fef2f2;\n border: 1px solid #fecaca;\n color: #991b1b;\n}\n.arap-card-unavailable {\n background: #f8fafc;\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n}\n.arap-card-permission {\n background: #fffbeb;\n border: 1px solid #fde68a;\n color: #92400e;\n}\n.arap-permission-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-permission-btn {\n align-self: flex-start;\n padding: 4px 10px;\n border: 1px solid #d97706;\n border-radius: 6px;\n background: #f59e0b;\n color: #fff;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n.arap-permission-btn:hover {\n background: #d97706;\n}\n.arap-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.arap-choice-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n.arap-choice-group-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-choice-badge {\n font-size: 11px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--arap-divider);\n color: var(--arap-muted);\n}\n.arap-segment-active .arap-choice-badge {\n background: rgba(255, 255, 255, 0.25);\n color: #fff;\n}\n.arap-stepper-control-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n}\n.arap-slider-container {\n display: flex;\n align-items: center;\n padding: 4px 0;\n}\n.arap-slider {\n width: 100%;\n accent-color: var(--arap-accent);\n cursor: pointer;\n}\n.arap-search-count {\n padding: 6px 0;\n font-size: 12px;\n font-weight: 500;\n color: var(--arap-muted);\n}\n.arap-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 24px 16px;\n gap: 8px;\n}\n.arap-empty-icon {\n font-size: 32px;\n}\n.arap-empty-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-empty-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n}\n.arap-empty-btn,\n.arap-retry-btn {\n margin-top: 6px;\n padding: 8px 16px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n font-weight: 500;\n font-size: 13px;\n color: var(--arap-text);\n cursor: pointer;\n}\n.arap-empty-btn:hover,\n.arap-retry-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n color: var(--arap-accent);\n}\n.arap-profile-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.arap-profile-card-active {\n border-color: var(--arap-accent);\n background: var(--arap-selected);\n box-shadow: 0 0 0 1px var(--arap-accent);\n}\n.arap-profile-header {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-profile-active-badge {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-accent);\n background: #dbeafe;\n padding: 2px 8px;\n border-radius: 9999px;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-profile-affected {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-profile-affected-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.arap-profile-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--arap-control);\n border: 1px solid var(--arap-divider);\n font-size: 12px;\n color: var(--arap-text);\n}\n.arap-profile-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n.arap-profile-apply-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-apply-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-profile-revert-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-muted);\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-revert-btn:hover {\n background: var(--arap-control);\n color: var(--arap-text);\n border-color: var(--arap-text);\n}\n.arap-notice {\n grid-column: 1 / -1;\n margin-top: 6px;\n padding: 8px 12px;\n border-radius: 8px;\n font-size: 12px;\n line-height: 1.45;\n background: #fefce8;\n border: 1px solid #fef08a;\n color: #854d0e;\n}\n.arap-notice-warning {\n background: #fffbeb;\n border-color: #fde68a;\n color: #92400e;\n}\n');
|
|
102
110
|
|
|
103
111
|
// src/core/AccessibilityPlugin.tsx
|
|
104
112
|
var import_react4 = require("react");
|
|
@@ -310,6 +318,11 @@ var oneOf = (...values) => (v) => values.includes(v);
|
|
|
310
318
|
var TEXT_SCALE_STEPS = [1, 1.125, 1.25, 1.5, 2];
|
|
311
319
|
var LINE_HEIGHT_STEPS = [100, 150, 175, 200];
|
|
312
320
|
var LINE_HEIGHT_RATIOS = [1, 1.5, 1.75, 2];
|
|
321
|
+
var FONT_FAMILY_PRESETS = [
|
|
322
|
+
"default",
|
|
323
|
+
"legible",
|
|
324
|
+
"dyslexia-option"
|
|
325
|
+
];
|
|
313
326
|
var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
314
327
|
fontSize: { defaultValue: 100, validate: numberIn(50, 200) },
|
|
315
328
|
fontScale: { defaultValue: 1, validate: numberIn(0.5, 2) },
|
|
@@ -351,6 +364,16 @@ var builtins = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
|
351
364
|
defaultValue: "default",
|
|
352
365
|
validate: oneOf("default", "left", "center", "right", "justify")
|
|
353
366
|
},
|
|
367
|
+
fontFamily: {
|
|
368
|
+
defaultValue: "default",
|
|
369
|
+
validate: oneOf(
|
|
370
|
+
"default",
|
|
371
|
+
"original",
|
|
372
|
+
"legible",
|
|
373
|
+
"dyslexia-option",
|
|
374
|
+
"dyslexia"
|
|
375
|
+
)
|
|
376
|
+
},
|
|
354
377
|
linkHighlight: {
|
|
355
378
|
defaultValue: false,
|
|
356
379
|
validate: oneOf(
|
|
@@ -556,6 +579,108 @@ function isProtectedFromTextSpacing(element) {
|
|
|
556
579
|
}
|
|
557
580
|
return false;
|
|
558
581
|
}
|
|
582
|
+
var TEXT_ALIGN_BLOCK_SELECTOR = [
|
|
583
|
+
"p",
|
|
584
|
+
"h1",
|
|
585
|
+
"h2",
|
|
586
|
+
"h3",
|
|
587
|
+
"h4",
|
|
588
|
+
"h5",
|
|
589
|
+
"h6",
|
|
590
|
+
"li",
|
|
591
|
+
"blockquote",
|
|
592
|
+
"dt",
|
|
593
|
+
"dd",
|
|
594
|
+
"figcaption",
|
|
595
|
+
'[role="paragraph"]',
|
|
596
|
+
'[role="heading"]'
|
|
597
|
+
].join(", ");
|
|
598
|
+
function isProtectedFromTextAlign(element) {
|
|
599
|
+
try {
|
|
600
|
+
if (element.matches(EXCLUDED)) return true;
|
|
601
|
+
if (element.matches(TEXT_SPACING_EXCLUDED_SELECTOR)) return true;
|
|
602
|
+
if (element.closest(
|
|
603
|
+
"pre, code, kbd, samp, var, button, input, select, textarea, [role='button'], table, [role='table'], [role='grid'], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
604
|
+
)) {
|
|
605
|
+
return true;
|
|
606
|
+
}
|
|
607
|
+
} catch {
|
|
608
|
+
return false;
|
|
609
|
+
}
|
|
610
|
+
return false;
|
|
611
|
+
}
|
|
612
|
+
var LEGIBLE_FONT_STACK = [
|
|
613
|
+
"system-ui",
|
|
614
|
+
"-apple-system",
|
|
615
|
+
"BlinkMacSystemFont",
|
|
616
|
+
'"Segoe UI"',
|
|
617
|
+
"Roboto",
|
|
618
|
+
'"Helvetica Neue"',
|
|
619
|
+
"Arial",
|
|
620
|
+
'"Noto Sans Sinhala"',
|
|
621
|
+
'"Iskoola Pota"',
|
|
622
|
+
'"Noto Sans Tamil"',
|
|
623
|
+
'"Latha"',
|
|
624
|
+
'"Nirmala UI"',
|
|
625
|
+
"sans-serif"
|
|
626
|
+
].join(", ");
|
|
627
|
+
var DYSLEXIA_FONT_STACK = [
|
|
628
|
+
"OpenDyslexic",
|
|
629
|
+
'"Comic Sans MS"',
|
|
630
|
+
'"Trebuchet MS"',
|
|
631
|
+
'"Arial Rounded MT Bold"',
|
|
632
|
+
'"Noto Sans Sinhala"',
|
|
633
|
+
'"Iskoola Pota"',
|
|
634
|
+
'"Noto Sans Tamil"',
|
|
635
|
+
'"Latha"',
|
|
636
|
+
"sans-serif"
|
|
637
|
+
].join(", ");
|
|
638
|
+
var FONT_FAMILY_PROTECTED_SELECTOR = [
|
|
639
|
+
"pre",
|
|
640
|
+
"pre *",
|
|
641
|
+
"code",
|
|
642
|
+
"code *",
|
|
643
|
+
"kbd",
|
|
644
|
+
"kbd *",
|
|
645
|
+
"samp",
|
|
646
|
+
"samp *",
|
|
647
|
+
"var",
|
|
648
|
+
"var *",
|
|
649
|
+
"svg",
|
|
650
|
+
"svg *",
|
|
651
|
+
"[data-icon]",
|
|
652
|
+
"[data-icon] *",
|
|
653
|
+
'i[class*="icon"]',
|
|
654
|
+
'span[class*="icon"]',
|
|
655
|
+
'i[class*="fa-"]',
|
|
656
|
+
'span[class*="fa-"]',
|
|
657
|
+
'i[class*="material-symbols"]',
|
|
658
|
+
'span[class*="material-symbols"]',
|
|
659
|
+
'i[class*="lucide"]',
|
|
660
|
+
'span[class*="lucide"]',
|
|
661
|
+
"[data-arap-ignore]",
|
|
662
|
+
"[data-arap-ignore] *",
|
|
663
|
+
"[data-arap-exempt]",
|
|
664
|
+
"[data-arap-exempt] *",
|
|
665
|
+
"[data-arap-ui]",
|
|
666
|
+
"[data-arap-ui] *",
|
|
667
|
+
".arap-root",
|
|
668
|
+
".arap-root *"
|
|
669
|
+
].join(", ");
|
|
670
|
+
function isProtectedFromFontFamily(element) {
|
|
671
|
+
try {
|
|
672
|
+
if (element.matches(EXCLUDED)) return true;
|
|
673
|
+
if (element.matches(FONT_FAMILY_PROTECTED_SELECTOR)) return true;
|
|
674
|
+
if (element.closest(
|
|
675
|
+
"pre, code, kbd, samp, var, svg, [data-icon], [data-arap-ignore], [data-arap-exempt], [data-arap-ui], .arap-root"
|
|
676
|
+
)) {
|
|
677
|
+
return true;
|
|
678
|
+
}
|
|
679
|
+
} catch {
|
|
680
|
+
return false;
|
|
681
|
+
}
|
|
682
|
+
return false;
|
|
683
|
+
}
|
|
559
684
|
var ARABIC_SCRIPT_REGEX = /[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/;
|
|
560
685
|
var INDIC_SCRIPT_REGEX = /[\u0900-\u0DFF]/;
|
|
561
686
|
var CURSIVE_LANG_REGEX = /^(ar|fa|ur|ug|dv|ps|ku)($|-)/i;
|
|
@@ -747,9 +872,36 @@ function applyPage(values) {
|
|
|
747
872
|
}
|
|
748
873
|
}
|
|
749
874
|
}
|
|
875
|
+
const textAlignVal = values.textAlign ? String(values.textAlign) : "default";
|
|
876
|
+
if (textAlignVal !== "default" && textAlignVal !== "original") {
|
|
877
|
+
for (const el of elements) {
|
|
878
|
+
if (isProtectedFromTextAlign(el)) continue;
|
|
879
|
+
if (el.matches(TEXT_ALIGN_BLOCK_SELECTOR)) {
|
|
880
|
+
set(el, "text-align", textAlignVal);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
const fontFamilyVal = values.fontFamily ? String(values.fontFamily) : "default";
|
|
885
|
+
if (fontFamilyVal !== "default" && fontFamilyVal !== "original") {
|
|
886
|
+
const targetStack = fontFamilyVal === "dyslexia-option" || fontFamilyVal === "dyslexia" ? DYSLEXIA_FONT_STACK : LEGIBLE_FONT_STACK;
|
|
887
|
+
for (const el of elements) {
|
|
888
|
+
if (isProtectedFromFontFamily(el)) {
|
|
889
|
+
if (el.matches("pre, code, kbd, samp, var")) {
|
|
890
|
+
const previous = el.style.getPropertyValue("font-family");
|
|
891
|
+
if (!previous) {
|
|
892
|
+
set(
|
|
893
|
+
el,
|
|
894
|
+
"font-family",
|
|
895
|
+
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
|
|
896
|
+
);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
continue;
|
|
900
|
+
}
|
|
901
|
+
set(el, "font-family", targetStack);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
750
904
|
for (const el of elements) {
|
|
751
|
-
if (values.textAlign && values.textAlign !== "default")
|
|
752
|
-
set(el, "text-align", String(values.textAlign));
|
|
753
905
|
if (values.bigCursor) set(el, "cursor", cursor);
|
|
754
906
|
if (values.hideImages) {
|
|
755
907
|
if (el.matches("img, picture")) set(el, "visibility", "hidden");
|
|
@@ -1959,6 +2111,7 @@ var drawings = {
|
|
|
1959
2111
|
] }),
|
|
1960
2112
|
linkHighlight: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m10 14 4-4M8 16l-1 1a4 4 0 0 1-6-6l4-4a4 4 0 0 1 6 0M16 8l1-1a4 4 0 0 1 6 6l-4 4a4 4 0 0 1-6 0" }) }),
|
|
1961
2113
|
textAlign: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 5h18M3 10h12M3 15h18M3 20h12" }) }),
|
|
2114
|
+
fontFamily: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4 7V4h16v3M9 20h6M12 4v16" }) }),
|
|
1962
2115
|
hideImages: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1963
2116
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
1964
2117
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "8", cy: "9", r: "1" }),
|
|
@@ -2723,58 +2876,78 @@ function TextAlignController() {
|
|
|
2723
2876
|
]
|
|
2724
2877
|
},
|
|
2725
2878
|
option
|
|
2726
|
-
)) })
|
|
2879
|
+
)) }),
|
|
2880
|
+
value === "justify" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2881
|
+
"div",
|
|
2882
|
+
{
|
|
2883
|
+
className: "arap-notice arap-notice-warning",
|
|
2884
|
+
role: "note",
|
|
2885
|
+
"aria-live": "polite",
|
|
2886
|
+
children: "Justified text creates uneven word spacing (\u201Crivers of white\u201D) that can impair readability."
|
|
2887
|
+
}
|
|
2888
|
+
)
|
|
2727
2889
|
] });
|
|
2728
2890
|
}
|
|
2729
2891
|
|
|
2730
|
-
// src/features/
|
|
2892
|
+
// src/features/FontFamilyController.tsx
|
|
2731
2893
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2732
|
-
var FEATURE_KEY13 = "
|
|
2733
|
-
var DEFAULT_VALUE13 =
|
|
2734
|
-
|
|
2894
|
+
var FEATURE_KEY13 = "fontFamily";
|
|
2895
|
+
var DEFAULT_VALUE13 = "default";
|
|
2896
|
+
var OPTIONS2 = [
|
|
2897
|
+
{ label: "Default", value: "default" },
|
|
2898
|
+
{ label: "Legible", value: "legible" },
|
|
2899
|
+
{ label: "Dyslexia", value: "dyslexia-option" }
|
|
2900
|
+
];
|
|
2901
|
+
function FontFamilyController() {
|
|
2735
2902
|
const { value, setValue } = useAccessibility(
|
|
2736
2903
|
FEATURE_KEY13,
|
|
2737
2904
|
DEFAULT_VALUE13
|
|
2738
2905
|
);
|
|
2739
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "
|
|
2906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Font Family", children: [
|
|
2740
2907
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "arap-label", children: [
|
|
2741
2908
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FeatureIcon, { name: FEATURE_KEY13 }),
|
|
2742
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "
|
|
2909
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Font Family" })
|
|
2743
2910
|
] }),
|
|
2744
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2745
|
-
"
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2911
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "arap-segmented", children: OPTIONS2.map((option) => {
|
|
2912
|
+
const isActive = value === option.value || option.value === "default" && (value === "original" || !value || value === "default");
|
|
2913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2914
|
+
"button",
|
|
2915
|
+
{
|
|
2916
|
+
className: `arap-segment ${isActive ? "arap-segment-active" : ""}`,
|
|
2917
|
+
onClick: () => setValue(option.value),
|
|
2918
|
+
"aria-pressed": isActive,
|
|
2919
|
+
type: "button",
|
|
2920
|
+
children: [
|
|
2921
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
2922
|
+
option.label
|
|
2923
|
+
]
|
|
2924
|
+
},
|
|
2925
|
+
option.value
|
|
2926
|
+
);
|
|
2927
|
+
}) })
|
|
2755
2928
|
] });
|
|
2756
2929
|
}
|
|
2757
2930
|
|
|
2758
|
-
// src/features/
|
|
2931
|
+
// src/features/HideImagesController.tsx
|
|
2759
2932
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2760
|
-
var FEATURE_KEY14 = "
|
|
2933
|
+
var FEATURE_KEY14 = "hideImages";
|
|
2761
2934
|
var DEFAULT_VALUE14 = false;
|
|
2762
|
-
function
|
|
2935
|
+
function HideImagesController() {
|
|
2763
2936
|
const { value, setValue } = useAccessibility(
|
|
2764
2937
|
FEATURE_KEY14,
|
|
2765
2938
|
DEFAULT_VALUE14
|
|
2766
2939
|
);
|
|
2767
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide
|
|
2940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Images", children: [
|
|
2768
2941
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "arap-label", children: [
|
|
2769
2942
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FeatureIcon, { name: FEATURE_KEY14 }),
|
|
2770
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Hide
|
|
2943
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Hide Images" })
|
|
2771
2944
|
] }),
|
|
2772
2945
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2773
2946
|
"button",
|
|
2774
2947
|
{
|
|
2775
2948
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2776
2949
|
onClick: () => setValue(!value),
|
|
2777
|
-
"aria-label": "Hide
|
|
2950
|
+
"aria-label": "Hide Images",
|
|
2778
2951
|
"aria-pressed": value,
|
|
2779
2952
|
type: "button",
|
|
2780
2953
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -2783,26 +2956,26 @@ function HideVideosController() {
|
|
|
2783
2956
|
] });
|
|
2784
2957
|
}
|
|
2785
2958
|
|
|
2786
|
-
// src/features/
|
|
2959
|
+
// src/features/HideVideosController.tsx
|
|
2787
2960
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2788
|
-
var FEATURE_KEY15 = "
|
|
2961
|
+
var FEATURE_KEY15 = "hideVideos";
|
|
2789
2962
|
var DEFAULT_VALUE15 = false;
|
|
2790
|
-
function
|
|
2963
|
+
function HideVideosController() {
|
|
2791
2964
|
const { value, setValue } = useAccessibility(
|
|
2792
2965
|
FEATURE_KEY15,
|
|
2793
2966
|
DEFAULT_VALUE15
|
|
2794
2967
|
);
|
|
2795
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "
|
|
2968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Hide Videos", children: [
|
|
2796
2969
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "arap-label", children: [
|
|
2797
2970
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeatureIcon, { name: FEATURE_KEY15 }),
|
|
2798
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "
|
|
2971
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Hide Videos" })
|
|
2799
2972
|
] }),
|
|
2800
2973
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2801
2974
|
"button",
|
|
2802
2975
|
{
|
|
2803
2976
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2804
2977
|
onClick: () => setValue(!value),
|
|
2805
|
-
"aria-label": "
|
|
2978
|
+
"aria-label": "Hide Videos",
|
|
2806
2979
|
"aria-pressed": value,
|
|
2807
2980
|
type: "button",
|
|
2808
2981
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -2811,26 +2984,26 @@ function BigCursorController() {
|
|
|
2811
2984
|
] });
|
|
2812
2985
|
}
|
|
2813
2986
|
|
|
2814
|
-
// src/features/
|
|
2987
|
+
// src/features/BigCursorController.tsx
|
|
2815
2988
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2816
|
-
var FEATURE_KEY16 = "
|
|
2989
|
+
var FEATURE_KEY16 = "bigCursor";
|
|
2817
2990
|
var DEFAULT_VALUE16 = false;
|
|
2818
|
-
function
|
|
2991
|
+
function BigCursorController() {
|
|
2819
2992
|
const { value, setValue } = useAccessibility(
|
|
2820
2993
|
FEATURE_KEY16,
|
|
2821
2994
|
DEFAULT_VALUE16
|
|
2822
2995
|
);
|
|
2823
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "
|
|
2996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Big Cursor", children: [
|
|
2824
2997
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "arap-label", children: [
|
|
2825
2998
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FeatureIcon, { name: FEATURE_KEY16 }),
|
|
2826
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "
|
|
2999
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "Big Cursor" })
|
|
2827
3000
|
] }),
|
|
2828
3001
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2829
3002
|
"button",
|
|
2830
3003
|
{
|
|
2831
3004
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2832
3005
|
onClick: () => setValue(!value),
|
|
2833
|
-
"aria-label": "
|
|
3006
|
+
"aria-label": "Big Cursor",
|
|
2834
3007
|
"aria-pressed": value,
|
|
2835
3008
|
type: "button",
|
|
2836
3009
|
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -2839,26 +3012,26 @@ function ReadingMaskController() {
|
|
|
2839
3012
|
] });
|
|
2840
3013
|
}
|
|
2841
3014
|
|
|
2842
|
-
// src/features/
|
|
3015
|
+
// src/features/ReadingMaskController.tsx
|
|
2843
3016
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2844
|
-
var FEATURE_KEY17 = "
|
|
3017
|
+
var FEATURE_KEY17 = "readingMask";
|
|
2845
3018
|
var DEFAULT_VALUE17 = false;
|
|
2846
|
-
function
|
|
3019
|
+
function ReadingMaskController() {
|
|
2847
3020
|
const { value, setValue } = useAccessibility(
|
|
2848
3021
|
FEATURE_KEY17,
|
|
2849
3022
|
DEFAULT_VALUE17
|
|
2850
3023
|
);
|
|
2851
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading
|
|
3024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Mask", children: [
|
|
2852
3025
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "arap-label", children: [
|
|
2853
3026
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureIcon, { name: FEATURE_KEY17 }),
|
|
2854
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "Reading
|
|
3027
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "Reading Mask" })
|
|
2855
3028
|
] }),
|
|
2856
3029
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2857
3030
|
"button",
|
|
2858
3031
|
{
|
|
2859
3032
|
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
2860
3033
|
onClick: () => setValue(!value),
|
|
2861
|
-
"aria-label": "Reading
|
|
3034
|
+
"aria-label": "Reading Mask",
|
|
2862
3035
|
"aria-pressed": value,
|
|
2863
3036
|
type: "button",
|
|
2864
3037
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
@@ -2867,10 +3040,38 @@ function ReadingGuideController() {
|
|
|
2867
3040
|
] });
|
|
2868
3041
|
}
|
|
2869
3042
|
|
|
3043
|
+
// src/features/ReadingGuideController.tsx
|
|
3044
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3045
|
+
var FEATURE_KEY18 = "readingGuide";
|
|
3046
|
+
var DEFAULT_VALUE18 = false;
|
|
3047
|
+
function ReadingGuideController() {
|
|
3048
|
+
const { value, setValue } = useAccessibility(
|
|
3049
|
+
FEATURE_KEY18,
|
|
3050
|
+
DEFAULT_VALUE18
|
|
3051
|
+
);
|
|
3052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "arap-feature", role: "group", "aria-label": "Reading Guide", children: [
|
|
3053
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "arap-label", children: [
|
|
3054
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeatureIcon, { name: FEATURE_KEY18 }),
|
|
3055
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Reading Guide" })
|
|
3056
|
+
] }),
|
|
3057
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3058
|
+
"button",
|
|
3059
|
+
{
|
|
3060
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
3061
|
+
onClick: () => setValue(!value),
|
|
3062
|
+
"aria-label": "Reading Guide",
|
|
3063
|
+
"aria-pressed": value,
|
|
3064
|
+
type: "button",
|
|
3065
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
3066
|
+
}
|
|
3067
|
+
)
|
|
3068
|
+
] });
|
|
3069
|
+
}
|
|
3070
|
+
|
|
2870
3071
|
// src/features/ResetController.tsx
|
|
2871
3072
|
var import_react_dom2 = require("react-dom");
|
|
2872
3073
|
var import_react11 = require("react");
|
|
2873
|
-
var
|
|
3074
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2874
3075
|
function ResetController() {
|
|
2875
3076
|
const ctx = (0, import_react11.useContext)(AccessibilityContext);
|
|
2876
3077
|
if (!ctx) {
|
|
@@ -2881,15 +3082,15 @@ function ResetController() {
|
|
|
2881
3082
|
const actionHost = (0, import_react11.useContext)(PanelActionsContext);
|
|
2882
3083
|
const { resetAll } = ctx;
|
|
2883
3084
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
2884
|
-
const button = /* @__PURE__ */ (0,
|
|
2885
|
-
/* @__PURE__ */ (0,
|
|
3085
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
3086
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FeatureIcon, { name: "reset" }),
|
|
2886
3087
|
strings.resetAll
|
|
2887
3088
|
] }) });
|
|
2888
3089
|
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
2889
3090
|
}
|
|
2890
3091
|
|
|
2891
3092
|
// src/core/controls/ToggleControl.tsx
|
|
2892
|
-
var
|
|
3093
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2893
3094
|
function ToggleControl({
|
|
2894
3095
|
id,
|
|
2895
3096
|
label,
|
|
@@ -2911,12 +3112,12 @@ function ToggleControl({
|
|
|
2911
3112
|
onChange(!checked);
|
|
2912
3113
|
}
|
|
2913
3114
|
};
|
|
2914
|
-
return /* @__PURE__ */ (0,
|
|
3115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2915
3116
|
"div",
|
|
2916
3117
|
{
|
|
2917
3118
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
2918
3119
|
style,
|
|
2919
|
-
children: /* @__PURE__ */ (0,
|
|
3120
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2920
3121
|
"button",
|
|
2921
3122
|
{
|
|
2922
3123
|
id,
|
|
@@ -2930,7 +3131,7 @@ function ToggleControl({
|
|
|
2930
3131
|
disabled: !isInteractive,
|
|
2931
3132
|
onClick: handleClick,
|
|
2932
3133
|
title: unavailableReason || description || toggleLabel,
|
|
2933
|
-
children: /* @__PURE__ */ (0,
|
|
3134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2934
3135
|
"span",
|
|
2935
3136
|
{
|
|
2936
3137
|
className: "arap-toggle-knob",
|
|
@@ -2947,7 +3148,7 @@ function ToggleControl({
|
|
|
2947
3148
|
|
|
2948
3149
|
// src/core/controls/ChoiceControl.tsx
|
|
2949
3150
|
var import_react12 = require("react");
|
|
2950
|
-
var
|
|
3151
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2951
3152
|
function ChoiceControl({
|
|
2952
3153
|
id,
|
|
2953
3154
|
label,
|
|
@@ -3003,7 +3204,7 @@ function ChoiceControl({
|
|
|
3003
3204
|
const renderOptionButton = (opt) => {
|
|
3004
3205
|
const isSelected = value === opt.value;
|
|
3005
3206
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
3006
|
-
return /* @__PURE__ */ (0,
|
|
3207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3007
3208
|
"button",
|
|
3008
3209
|
{
|
|
3009
3210
|
type: "button",
|
|
@@ -3017,15 +3218,15 @@ function ChoiceControl({
|
|
|
3017
3218
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
3018
3219
|
title: opt.description,
|
|
3019
3220
|
children: [
|
|
3020
|
-
isSelected && /* @__PURE__ */ (0,
|
|
3021
|
-
/* @__PURE__ */ (0,
|
|
3022
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
3221
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
3222
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: opt.label }),
|
|
3223
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
3023
3224
|
]
|
|
3024
3225
|
},
|
|
3025
3226
|
String(opt.value)
|
|
3026
3227
|
);
|
|
3027
3228
|
};
|
|
3028
|
-
return /* @__PURE__ */ (0,
|
|
3229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3029
3230
|
"div",
|
|
3030
3231
|
{
|
|
3031
3232
|
ref: containerRef,
|
|
@@ -3036,15 +3237,15 @@ function ChoiceControl({
|
|
|
3036
3237
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3037
3238
|
style,
|
|
3038
3239
|
onKeyDown: handleKeyDown,
|
|
3039
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
3240
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3040
3241
|
"div",
|
|
3041
3242
|
{
|
|
3042
3243
|
className: "arap-choice-group",
|
|
3043
3244
|
role: "group",
|
|
3044
3245
|
"aria-label": group.label,
|
|
3045
3246
|
children: [
|
|
3046
|
-
/* @__PURE__ */ (0,
|
|
3047
|
-
/* @__PURE__ */ (0,
|
|
3247
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
3248
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
3048
3249
|
]
|
|
3049
3250
|
},
|
|
3050
3251
|
group.label
|
|
@@ -3054,7 +3255,7 @@ function ChoiceControl({
|
|
|
3054
3255
|
}
|
|
3055
3256
|
|
|
3056
3257
|
// src/core/controls/StepperControl.tsx
|
|
3057
|
-
var
|
|
3258
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3058
3259
|
function StepperControl({
|
|
3059
3260
|
id,
|
|
3060
3261
|
label,
|
|
@@ -3084,15 +3285,15 @@ function StepperControl({
|
|
|
3084
3285
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
3085
3286
|
}
|
|
3086
3287
|
};
|
|
3087
|
-
return /* @__PURE__ */ (0,
|
|
3288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3088
3289
|
"div",
|
|
3089
3290
|
{
|
|
3090
3291
|
id,
|
|
3091
3292
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3092
3293
|
style,
|
|
3093
3294
|
children: [
|
|
3094
|
-
/* @__PURE__ */ (0,
|
|
3095
|
-
/* @__PURE__ */ (0,
|
|
3295
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "arap-controls", children: [
|
|
3296
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3096
3297
|
"button",
|
|
3097
3298
|
{
|
|
3098
3299
|
type: "button",
|
|
@@ -3103,8 +3304,8 @@ function StepperControl({
|
|
|
3103
3304
|
children: "\u2212"
|
|
3104
3305
|
}
|
|
3105
3306
|
),
|
|
3106
|
-
/* @__PURE__ */ (0,
|
|
3107
|
-
/* @__PURE__ */ (0,
|
|
3307
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
3308
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3108
3309
|
"button",
|
|
3109
3310
|
{
|
|
3110
3311
|
type: "button",
|
|
@@ -3116,7 +3317,7 @@ function StepperControl({
|
|
|
3116
3317
|
}
|
|
3117
3318
|
)
|
|
3118
3319
|
] }),
|
|
3119
|
-
showSlider && /* @__PURE__ */ (0,
|
|
3320
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3120
3321
|
"input",
|
|
3121
3322
|
{
|
|
3122
3323
|
type: "range",
|
|
@@ -3140,7 +3341,7 @@ function StepperControl({
|
|
|
3140
3341
|
}
|
|
3141
3342
|
|
|
3142
3343
|
// src/core/controls/FeatureCard.tsx
|
|
3143
|
-
var
|
|
3344
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3144
3345
|
function FeatureCard({
|
|
3145
3346
|
id,
|
|
3146
3347
|
featureKey,
|
|
@@ -3159,7 +3360,7 @@ function FeatureCard({
|
|
|
3159
3360
|
largeControls = false
|
|
3160
3361
|
}) {
|
|
3161
3362
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
3162
|
-
return /* @__PURE__ */ (0,
|
|
3363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3163
3364
|
"div",
|
|
3164
3365
|
{
|
|
3165
3366
|
id,
|
|
@@ -3168,27 +3369,27 @@ function FeatureCard({
|
|
|
3168
3369
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3169
3370
|
style,
|
|
3170
3371
|
children: [
|
|
3171
|
-
/* @__PURE__ */ (0,
|
|
3172
|
-
/* @__PURE__ */ (0,
|
|
3173
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
3174
|
-
/* @__PURE__ */ (0,
|
|
3372
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-card-header", children: [
|
|
3373
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "arap-label", children: [
|
|
3374
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-card-title", children: title })
|
|
3175
3376
|
] }),
|
|
3176
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
3377
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
3177
3378
|
] }),
|
|
3178
|
-
description && /* @__PURE__ */ (0,
|
|
3179
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
3180
|
-
/* @__PURE__ */ (0,
|
|
3181
|
-
/* @__PURE__ */ (0,
|
|
3379
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
3380
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
3381
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3382
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: errorMessage })
|
|
3182
3383
|
] }),
|
|
3183
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
3184
|
-
/* @__PURE__ */ (0,
|
|
3185
|
-
/* @__PURE__ */ (0,
|
|
3384
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
3385
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
3386
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: unavailableMessage })
|
|
3186
3387
|
] }),
|
|
3187
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
3188
|
-
/* @__PURE__ */ (0,
|
|
3189
|
-
/* @__PURE__ */ (0,
|
|
3190
|
-
/* @__PURE__ */ (0,
|
|
3191
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
3388
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
3389
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
3390
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "arap-permission-content", children: [
|
|
3391
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: permissionMessage }),
|
|
3392
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3192
3393
|
"button",
|
|
3193
3394
|
{
|
|
3194
3395
|
type: "button",
|
|
@@ -3199,14 +3400,14 @@ function FeatureCard({
|
|
|
3199
3400
|
)
|
|
3200
3401
|
] })
|
|
3201
3402
|
] }),
|
|
3202
|
-
/* @__PURE__ */ (0,
|
|
3403
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "arap-card-content", children })
|
|
3203
3404
|
]
|
|
3204
3405
|
}
|
|
3205
3406
|
);
|
|
3206
3407
|
}
|
|
3207
3408
|
|
|
3208
3409
|
// src/core/controls/FeatureStatusState.tsx
|
|
3209
|
-
var
|
|
3410
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3210
3411
|
function SearchCount({
|
|
3211
3412
|
totalCount,
|
|
3212
3413
|
matchedCount,
|
|
@@ -3215,7 +3416,7 @@ function SearchCount({
|
|
|
3215
3416
|
style
|
|
3216
3417
|
}) {
|
|
3217
3418
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
3218
|
-
return /* @__PURE__ */ (0,
|
|
3419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3219
3420
|
"div",
|
|
3220
3421
|
{
|
|
3221
3422
|
role: "status",
|
|
@@ -3235,17 +3436,17 @@ function EmptyState({
|
|
|
3235
3436
|
className = "",
|
|
3236
3437
|
style
|
|
3237
3438
|
}) {
|
|
3238
|
-
return /* @__PURE__ */ (0,
|
|
3439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3239
3440
|
"div",
|
|
3240
3441
|
{
|
|
3241
3442
|
role: "status",
|
|
3242
3443
|
className: `arap-empty-state ${className}`,
|
|
3243
3444
|
style,
|
|
3244
3445
|
children: [
|
|
3245
|
-
/* @__PURE__ */ (0,
|
|
3246
|
-
/* @__PURE__ */ (0,
|
|
3247
|
-
/* @__PURE__ */ (0,
|
|
3248
|
-
onAction && /* @__PURE__ */ (0,
|
|
3446
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
3447
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { className: "arap-empty-title", children: title }),
|
|
3448
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "arap-empty-desc", children: description }),
|
|
3449
|
+
onAction && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
3249
3450
|
]
|
|
3250
3451
|
}
|
|
3251
3452
|
);
|
|
@@ -3258,18 +3459,18 @@ function ErrorState({
|
|
|
3258
3459
|
className = "",
|
|
3259
3460
|
style
|
|
3260
3461
|
}) {
|
|
3261
|
-
return /* @__PURE__ */ (0,
|
|
3462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3262
3463
|
"div",
|
|
3263
3464
|
{
|
|
3264
3465
|
role: "alert",
|
|
3265
3466
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
3266
3467
|
style,
|
|
3267
3468
|
children: [
|
|
3268
|
-
/* @__PURE__ */ (0,
|
|
3269
|
-
/* @__PURE__ */ (0,
|
|
3270
|
-
title && /* @__PURE__ */ (0,
|
|
3271
|
-
/* @__PURE__ */ (0,
|
|
3272
|
-
onRetry && /* @__PURE__ */ (0,
|
|
3469
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
3470
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "arap-error-content", children: [
|
|
3471
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
3472
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "arap-error-message", children: message }),
|
|
3473
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
3273
3474
|
] })
|
|
3274
3475
|
]
|
|
3275
3476
|
}
|
|
@@ -3277,7 +3478,7 @@ function ErrorState({
|
|
|
3277
3478
|
}
|
|
3278
3479
|
|
|
3279
3480
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
3280
|
-
var
|
|
3481
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3281
3482
|
function ProfilePreviewCard({
|
|
3282
3483
|
profile,
|
|
3283
3484
|
isActive,
|
|
@@ -3327,7 +3528,7 @@ function ProfilePreviewCard({
|
|
|
3327
3528
|
if (val === null || val === void 0) return "Original";
|
|
3328
3529
|
return String(val);
|
|
3329
3530
|
};
|
|
3330
|
-
return /* @__PURE__ */ (0,
|
|
3531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3331
3532
|
"div",
|
|
3332
3533
|
{
|
|
3333
3534
|
role: "group",
|
|
@@ -3335,10 +3536,10 @@ function ProfilePreviewCard({
|
|
|
3335
3536
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
3336
3537
|
style,
|
|
3337
3538
|
children: [
|
|
3338
|
-
/* @__PURE__ */ (0,
|
|
3339
|
-
/* @__PURE__ */ (0,
|
|
3340
|
-
/* @__PURE__ */ (0,
|
|
3341
|
-
isActive && /* @__PURE__ */ (0,
|
|
3539
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-profile-header", children: [
|
|
3540
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
3541
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
3542
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3342
3543
|
"span",
|
|
3343
3544
|
{
|
|
3344
3545
|
className: "arap-profile-active-badge",
|
|
@@ -3347,14 +3548,14 @@ function ProfilePreviewCard({
|
|
|
3347
3548
|
}
|
|
3348
3549
|
)
|
|
3349
3550
|
] }),
|
|
3350
|
-
/* @__PURE__ */ (0,
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
3351
3552
|
] }),
|
|
3352
|
-
/* @__PURE__ */ (0,
|
|
3353
|
-
/* @__PURE__ */ (0,
|
|
3354
|
-
/* @__PURE__ */ (0,
|
|
3553
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
3554
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
3355
3556
|
const val = profile.settings[key];
|
|
3356
|
-
return /* @__PURE__ */ (0,
|
|
3357
|
-
/* @__PURE__ */ (0,
|
|
3557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
3558
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("strong", { children: [
|
|
3358
3559
|
formatKeyName(key),
|
|
3359
3560
|
":"
|
|
3360
3561
|
] }),
|
|
@@ -3363,7 +3564,7 @@ function ProfilePreviewCard({
|
|
|
3363
3564
|
] }, key);
|
|
3364
3565
|
}) })
|
|
3365
3566
|
] }),
|
|
3366
|
-
/* @__PURE__ */ (0,
|
|
3567
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3367
3568
|
"button",
|
|
3368
3569
|
{
|
|
3369
3570
|
type: "button",
|
|
@@ -3372,7 +3573,7 @@ function ProfilePreviewCard({
|
|
|
3372
3573
|
"aria-label": `Revert ${profile.label} profile`,
|
|
3373
3574
|
children: "Revert to custom settings"
|
|
3374
3575
|
}
|
|
3375
|
-
) : /* @__PURE__ */ (0,
|
|
3576
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3376
3577
|
"button",
|
|
3377
3578
|
{
|
|
3378
3579
|
type: "button",
|
|
@@ -3396,14 +3597,19 @@ function ProfilePreviewCard({
|
|
|
3396
3597
|
ChoiceControl,
|
|
3397
3598
|
ContrastController,
|
|
3398
3599
|
DEFAULT_PREFERENCES,
|
|
3600
|
+
DYSLEXIA_FONT_STACK,
|
|
3399
3601
|
EmptyState,
|
|
3400
3602
|
ErrorState,
|
|
3603
|
+
FONT_FAMILY_PRESETS,
|
|
3604
|
+
FONT_FAMILY_PROTECTED_SELECTOR,
|
|
3401
3605
|
FeatureCard,
|
|
3606
|
+
FontFamilyController,
|
|
3402
3607
|
FontSizeController,
|
|
3403
3608
|
GrayscaleController,
|
|
3404
3609
|
HideImagesController,
|
|
3405
3610
|
HideVideosController,
|
|
3406
3611
|
InvertColorsController,
|
|
3612
|
+
LEGIBLE_FONT_STACK,
|
|
3407
3613
|
LINE_HEIGHT_RATIOS,
|
|
3408
3614
|
LINE_HEIGHT_STEPS,
|
|
3409
3615
|
LetterSpacingController,
|
|
@@ -3418,6 +3624,7 @@ function ProfilePreviewCard({
|
|
|
3418
3624
|
SaturationController,
|
|
3419
3625
|
SearchCount,
|
|
3420
3626
|
StepperControl,
|
|
3627
|
+
TEXT_ALIGN_BLOCK_SELECTOR,
|
|
3421
3628
|
TEXT_SCALE_PROTECTED_SELECTOR,
|
|
3422
3629
|
TEXT_SCALE_STEPS,
|
|
3423
3630
|
TEXT_SPACING_EXCLUDED_SELECTOR,
|
|
@@ -3428,6 +3635,8 @@ function ProfilePreviewCard({
|
|
|
3428
3635
|
createInitialPreferencesState,
|
|
3429
3636
|
enLocale,
|
|
3430
3637
|
getScriptSpacingConstraints,
|
|
3638
|
+
isProtectedFromFontFamily,
|
|
3639
|
+
isProtectedFromTextAlign,
|
|
3431
3640
|
isProtectedFromTextScale,
|
|
3432
3641
|
isProtectedFromTextSpacing,
|
|
3433
3642
|
isRtlLocale,
|