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/README.md
CHANGED
|
@@ -101,7 +101,8 @@ site, and choose their order in JSX.
|
|
|
101
101
|
| `InvertColorsController` | Inverts eligible page content. |
|
|
102
102
|
| `GrayscaleController` | Removes color while preserving the selected saturation value for later. |
|
|
103
103
|
| `LinkHighlightController` | Highlights links or selects a link palette. |
|
|
104
|
-
| `TextAlignController` |
|
|
104
|
+
| `TextAlignController` | Scopes left, center, right, or justified alignment to text blocks; warns about justification. |
|
|
105
|
+
| `FontFamilyController` | Applies clean system-ui or OpenDyslexic with Sinhala/Tamil fallbacks while protecting code and icons. |
|
|
105
106
|
| `HideImagesController` | Hides images and CSS background images while retaining layout. |
|
|
106
107
|
| `HideVideosController` | Hides video elements and recognized YouTube/Vimeo embeds visually. |
|
|
107
108
|
| `BigCursorController` | Applies a larger high-contrast cursor where supported. |
|
package/dist/index.d.mts
CHANGED
|
@@ -369,11 +369,30 @@ type TextScaleStep = (typeof TEXT_SCALE_STEPS)[number];
|
|
|
369
369
|
*/
|
|
370
370
|
declare const LINE_HEIGHT_STEPS: readonly [100, 150, 175, 200];
|
|
371
371
|
declare const LINE_HEIGHT_RATIOS: readonly [1, 1.5, 1.75, 2];
|
|
372
|
+
/**
|
|
373
|
+
* Font family options: default (host fonts), legible (clean modern sans-serif), dyslexia-option (weighted baseline fonts).
|
|
374
|
+
*/
|
|
375
|
+
declare const FONT_FAMILY_PRESETS: readonly ["default", "legible", "dyslexia-option"];
|
|
376
|
+
type FontFamilyPreset = (typeof FONT_FAMILY_PRESETS)[number];
|
|
372
377
|
|
|
373
378
|
declare const TEXT_SCALE_PROTECTED_SELECTOR: string;
|
|
374
379
|
declare function isProtectedFromTextScale(element: HTMLElement): boolean;
|
|
375
380
|
declare const TEXT_SPACING_EXCLUDED_SELECTOR: string;
|
|
376
381
|
declare function isProtectedFromTextSpacing(element: HTMLElement): boolean;
|
|
382
|
+
declare const TEXT_ALIGN_BLOCK_SELECTOR: string;
|
|
383
|
+
declare function isProtectedFromTextAlign(element: HTMLElement): boolean;
|
|
384
|
+
/**
|
|
385
|
+
* Standard legible font stack with Sinhala ("Noto Sans Sinhala", "Iskoola Pota")
|
|
386
|
+
* and Tamil ("Noto Sans Tamil", "Latha", "Nirmala UI") script fallbacks.
|
|
387
|
+
*/
|
|
388
|
+
declare const LEGIBLE_FONT_STACK: string;
|
|
389
|
+
/**
|
|
390
|
+
* Dyslexia-friendly font stack with OpenDyslexic (licensed under SIL OFL / CC-BY),
|
|
391
|
+
* weighted rounded fallbacks, and Indic/Sinhala/Tamil script fallbacks.
|
|
392
|
+
*/
|
|
393
|
+
declare const DYSLEXIA_FONT_STACK: string;
|
|
394
|
+
declare const FONT_FAMILY_PROTECTED_SELECTOR: string;
|
|
395
|
+
declare function isProtectedFromFontFamily(element: HTMLElement): boolean;
|
|
377
396
|
interface ScriptSpacingConstraints {
|
|
378
397
|
allowLetterSpacing: boolean;
|
|
379
398
|
maxLetterSpacingPx: number;
|
|
@@ -430,6 +449,8 @@ declare function LinkHighlightController(): react.JSX.Element;
|
|
|
430
449
|
|
|
431
450
|
declare function TextAlignController(): react.JSX.Element;
|
|
432
451
|
|
|
452
|
+
declare function FontFamilyController(): react.JSX.Element;
|
|
453
|
+
|
|
433
454
|
declare function HideImagesController(): react.JSX.Element;
|
|
434
455
|
|
|
435
456
|
declare function HideVideosController(): react.JSX.Element;
|
|
@@ -442,4 +463,4 @@ declare function ReadingGuideController(): react.JSX.Element;
|
|
|
442
463
|
|
|
443
464
|
declare function ResetController(): react.JSX.Element;
|
|
444
465
|
|
|
445
|
-
export { AccessibilityButton, type AccessibilityButtonProps, AccessibilityContext, type AccessibilityContextValue, AccessibilityList, type AccessibilityListProps, AccessibilityPlugin, type AccessibilityPluginProps, type AccessibilityPreferences, type AccessibilityState, BigCursorController, ChoiceControl, type ChoiceControlProps, type ChoiceGroup, type ChoiceOption, ContrastController, type ContrastMode, type CursorSizePreference, DEFAULT_PREFERENCES, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FeatureCard, type FeatureCardProps, type FeatureOptions, type FeatureRegistration, type FeatureStatus, type FontFamilyPreference, FontSizeController, type FontSizeControllerProps, GrayscaleController, HideImagesController, HideVideosController, InvertColorsController, LINE_HEIGHT_RATIOS, LINE_HEIGHT_STEPS, LetterSpacingController, type LetterSpacingControllerProps, LineHeightController, type LineHeightControllerProps, LinkHighlightController, type LocaleStrings, PROFILE_DEFINITIONS, ParagraphSpacingController, type ParagraphSpacingControllerProps, type PluginPosition, type ProfileDefinition, type ProfilePresetId, ProfilePreviewCard, type ProfilePreviewCardProps, type ReaderMode, ReadingGuideController, ReadingMaskController, ResetController, SaturationController, type SaturationPreference, type ScriptSpacingConstraints, SearchCount, type SearchCountProps, StepperControl, type StepperControlProps, type StorageMode, type SupportedLocale, TEXT_SCALE_PROTECTED_SELECTOR, TEXT_SCALE_STEPS, TEXT_SPACING_EXCLUDED_SELECTOR, TextAlignController, type TextAlignPreference, TextScaleController, type TextScaleControllerProps, type TextScaleStep, ToggleControl, type ToggleControlProps, type WidgetPlacement, WordSpacingController, type WordSpacingControllerProps, createInitialPreferencesState, enLocale, getScriptSpacingConstraints, isProtectedFromTextScale, isProtectedFromTextSpacing, isRtlLocale, normalizePreferenceValue, normalizePreferences, preferencesReducer, registerLocale, resolveEffectivePreferences, resolveLocaleStrings, useAccessibility };
|
|
466
|
+
export { AccessibilityButton, type AccessibilityButtonProps, AccessibilityContext, type AccessibilityContextValue, AccessibilityList, type AccessibilityListProps, AccessibilityPlugin, type AccessibilityPluginProps, type AccessibilityPreferences, type AccessibilityState, BigCursorController, ChoiceControl, type ChoiceControlProps, type ChoiceGroup, type ChoiceOption, ContrastController, type ContrastMode, type CursorSizePreference, DEFAULT_PREFERENCES, DYSLEXIA_FONT_STACK, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FONT_FAMILY_PRESETS, FONT_FAMILY_PROTECTED_SELECTOR, FeatureCard, type FeatureCardProps, type FeatureOptions, type FeatureRegistration, type FeatureStatus, FontFamilyController, type FontFamilyPreference, type FontFamilyPreset, FontSizeController, type FontSizeControllerProps, GrayscaleController, HideImagesController, HideVideosController, InvertColorsController, LEGIBLE_FONT_STACK, LINE_HEIGHT_RATIOS, LINE_HEIGHT_STEPS, LetterSpacingController, type LetterSpacingControllerProps, LineHeightController, type LineHeightControllerProps, LinkHighlightController, type LocaleStrings, PROFILE_DEFINITIONS, ParagraphSpacingController, type ParagraphSpacingControllerProps, type PluginPosition, type ProfileDefinition, type ProfilePresetId, ProfilePreviewCard, type ProfilePreviewCardProps, type ReaderMode, ReadingGuideController, ReadingMaskController, ResetController, SaturationController, type SaturationPreference, type ScriptSpacingConstraints, SearchCount, type SearchCountProps, StepperControl, type StepperControlProps, type StorageMode, type SupportedLocale, TEXT_ALIGN_BLOCK_SELECTOR, TEXT_SCALE_PROTECTED_SELECTOR, TEXT_SCALE_STEPS, TEXT_SPACING_EXCLUDED_SELECTOR, TextAlignController, type TextAlignPreference, TextScaleController, type TextScaleControllerProps, type TextScaleStep, ToggleControl, type ToggleControlProps, type WidgetPlacement, WordSpacingController, type WordSpacingControllerProps, createInitialPreferencesState, enLocale, getScriptSpacingConstraints, isProtectedFromFontFamily, isProtectedFromTextAlign, isProtectedFromTextScale, isProtectedFromTextSpacing, isRtlLocale, normalizePreferenceValue, normalizePreferences, preferencesReducer, registerLocale, resolveEffectivePreferences, resolveLocaleStrings, useAccessibility };
|
package/dist/index.d.ts
CHANGED
|
@@ -369,11 +369,30 @@ type TextScaleStep = (typeof TEXT_SCALE_STEPS)[number];
|
|
|
369
369
|
*/
|
|
370
370
|
declare const LINE_HEIGHT_STEPS: readonly [100, 150, 175, 200];
|
|
371
371
|
declare const LINE_HEIGHT_RATIOS: readonly [1, 1.5, 1.75, 2];
|
|
372
|
+
/**
|
|
373
|
+
* Font family options: default (host fonts), legible (clean modern sans-serif), dyslexia-option (weighted baseline fonts).
|
|
374
|
+
*/
|
|
375
|
+
declare const FONT_FAMILY_PRESETS: readonly ["default", "legible", "dyslexia-option"];
|
|
376
|
+
type FontFamilyPreset = (typeof FONT_FAMILY_PRESETS)[number];
|
|
372
377
|
|
|
373
378
|
declare const TEXT_SCALE_PROTECTED_SELECTOR: string;
|
|
374
379
|
declare function isProtectedFromTextScale(element: HTMLElement): boolean;
|
|
375
380
|
declare const TEXT_SPACING_EXCLUDED_SELECTOR: string;
|
|
376
381
|
declare function isProtectedFromTextSpacing(element: HTMLElement): boolean;
|
|
382
|
+
declare const TEXT_ALIGN_BLOCK_SELECTOR: string;
|
|
383
|
+
declare function isProtectedFromTextAlign(element: HTMLElement): boolean;
|
|
384
|
+
/**
|
|
385
|
+
* Standard legible font stack with Sinhala ("Noto Sans Sinhala", "Iskoola Pota")
|
|
386
|
+
* and Tamil ("Noto Sans Tamil", "Latha", "Nirmala UI") script fallbacks.
|
|
387
|
+
*/
|
|
388
|
+
declare const LEGIBLE_FONT_STACK: string;
|
|
389
|
+
/**
|
|
390
|
+
* Dyslexia-friendly font stack with OpenDyslexic (licensed under SIL OFL / CC-BY),
|
|
391
|
+
* weighted rounded fallbacks, and Indic/Sinhala/Tamil script fallbacks.
|
|
392
|
+
*/
|
|
393
|
+
declare const DYSLEXIA_FONT_STACK: string;
|
|
394
|
+
declare const FONT_FAMILY_PROTECTED_SELECTOR: string;
|
|
395
|
+
declare function isProtectedFromFontFamily(element: HTMLElement): boolean;
|
|
377
396
|
interface ScriptSpacingConstraints {
|
|
378
397
|
allowLetterSpacing: boolean;
|
|
379
398
|
maxLetterSpacingPx: number;
|
|
@@ -430,6 +449,8 @@ declare function LinkHighlightController(): react.JSX.Element;
|
|
|
430
449
|
|
|
431
450
|
declare function TextAlignController(): react.JSX.Element;
|
|
432
451
|
|
|
452
|
+
declare function FontFamilyController(): react.JSX.Element;
|
|
453
|
+
|
|
433
454
|
declare function HideImagesController(): react.JSX.Element;
|
|
434
455
|
|
|
435
456
|
declare function HideVideosController(): react.JSX.Element;
|
|
@@ -442,4 +463,4 @@ declare function ReadingGuideController(): react.JSX.Element;
|
|
|
442
463
|
|
|
443
464
|
declare function ResetController(): react.JSX.Element;
|
|
444
465
|
|
|
445
|
-
export { AccessibilityButton, type AccessibilityButtonProps, AccessibilityContext, type AccessibilityContextValue, AccessibilityList, type AccessibilityListProps, AccessibilityPlugin, type AccessibilityPluginProps, type AccessibilityPreferences, type AccessibilityState, BigCursorController, ChoiceControl, type ChoiceControlProps, type ChoiceGroup, type ChoiceOption, ContrastController, type ContrastMode, type CursorSizePreference, DEFAULT_PREFERENCES, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FeatureCard, type FeatureCardProps, type FeatureOptions, type FeatureRegistration, type FeatureStatus, type FontFamilyPreference, FontSizeController, type FontSizeControllerProps, GrayscaleController, HideImagesController, HideVideosController, InvertColorsController, LINE_HEIGHT_RATIOS, LINE_HEIGHT_STEPS, LetterSpacingController, type LetterSpacingControllerProps, LineHeightController, type LineHeightControllerProps, LinkHighlightController, type LocaleStrings, PROFILE_DEFINITIONS, ParagraphSpacingController, type ParagraphSpacingControllerProps, type PluginPosition, type ProfileDefinition, type ProfilePresetId, ProfilePreviewCard, type ProfilePreviewCardProps, type ReaderMode, ReadingGuideController, ReadingMaskController, ResetController, SaturationController, type SaturationPreference, type ScriptSpacingConstraints, SearchCount, type SearchCountProps, StepperControl, type StepperControlProps, type StorageMode, type SupportedLocale, TEXT_SCALE_PROTECTED_SELECTOR, TEXT_SCALE_STEPS, TEXT_SPACING_EXCLUDED_SELECTOR, TextAlignController, type TextAlignPreference, TextScaleController, type TextScaleControllerProps, type TextScaleStep, ToggleControl, type ToggleControlProps, type WidgetPlacement, WordSpacingController, type WordSpacingControllerProps, createInitialPreferencesState, enLocale, getScriptSpacingConstraints, isProtectedFromTextScale, isProtectedFromTextSpacing, isRtlLocale, normalizePreferenceValue, normalizePreferences, preferencesReducer, registerLocale, resolveEffectivePreferences, resolveLocaleStrings, useAccessibility };
|
|
466
|
+
export { AccessibilityButton, type AccessibilityButtonProps, AccessibilityContext, type AccessibilityContextValue, AccessibilityList, type AccessibilityListProps, AccessibilityPlugin, type AccessibilityPluginProps, type AccessibilityPreferences, type AccessibilityState, BigCursorController, ChoiceControl, type ChoiceControlProps, type ChoiceGroup, type ChoiceOption, ContrastController, type ContrastMode, type CursorSizePreference, DEFAULT_PREFERENCES, DYSLEXIA_FONT_STACK, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FONT_FAMILY_PRESETS, FONT_FAMILY_PROTECTED_SELECTOR, FeatureCard, type FeatureCardProps, type FeatureOptions, type FeatureRegistration, type FeatureStatus, FontFamilyController, type FontFamilyPreference, type FontFamilyPreset, FontSizeController, type FontSizeControllerProps, GrayscaleController, HideImagesController, HideVideosController, InvertColorsController, LEGIBLE_FONT_STACK, LINE_HEIGHT_RATIOS, LINE_HEIGHT_STEPS, LetterSpacingController, type LetterSpacingControllerProps, LineHeightController, type LineHeightControllerProps, LinkHighlightController, type LocaleStrings, PROFILE_DEFINITIONS, ParagraphSpacingController, type ParagraphSpacingControllerProps, type PluginPosition, type ProfileDefinition, type ProfilePresetId, ProfilePreviewCard, type ProfilePreviewCardProps, type ReaderMode, ReadingGuideController, ReadingMaskController, ResetController, SaturationController, type SaturationPreference, type ScriptSpacingConstraints, SearchCount, type SearchCountProps, StepperControl, type StepperControlProps, type StorageMode, type SupportedLocale, TEXT_ALIGN_BLOCK_SELECTOR, TEXT_SCALE_PROTECTED_SELECTOR, TEXT_SCALE_STEPS, TEXT_SPACING_EXCLUDED_SELECTOR, TextAlignController, type TextAlignPreference, TextScaleController, type TextScaleControllerProps, type TextScaleStep, ToggleControl, type ToggleControlProps, type WidgetPlacement, WordSpacingController, type WordSpacingControllerProps, createInitialPreferencesState, enLocale, getScriptSpacingConstraints, isProtectedFromFontFamily, isProtectedFromTextAlign, isProtectedFromTextScale, isProtectedFromTextSpacing, isRtlLocale, normalizePreferenceValue, normalizePreferences, preferencesReducer, registerLocale, resolveEffectivePreferences, resolveLocaleStrings, useAccessibility };
|